@bpinternal/billing-ui 0.8.0 → 0.8.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.d.ts +8 -2
- package/dist/index.js +913 -899
- package/dist/index.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -75,15 +75,15 @@ var xr = { parse: function(a, e) {
|
|
|
75
75
|
if (c !== "</" + t.name + ">") return;
|
|
76
76
|
i = !1;
|
|
77
77
|
}
|
|
78
|
-
var p,
|
|
79
|
-
if (
|
|
80
|
-
var
|
|
81
|
-
return s < 0 ? (n.push(
|
|
78
|
+
var p, g = c.charAt(1) !== "/", m = c.startsWith("<!--"), h = d + c.length, b = a.charAt(h);
|
|
79
|
+
if (m) {
|
|
80
|
+
var _ = wt(c);
|
|
81
|
+
return s < 0 ? (n.push(_), n) : ((p = r[s]).children.push(_), n);
|
|
82
82
|
}
|
|
83
|
-
if (
|
|
83
|
+
if (g && (s++, (t = wt(c)).type === "tag" && e.components[t.name] && (t.type = "component", i = !0), t.voidElement || i || !b || b === "<" || t.children.push({ type: "text", content: a.slice(h, a.indexOf("<", h)) }), s === 0 && n.push(t), (p = r[s - 1]) && p.children.push(t), r[s] = t), (!g || t.voidElement) && (s > -1 && (t.voidElement || t.name === c.slice(2, -1)) && (s--, t = s === -1 ? n : r[s]), !i && b !== "<" && b)) {
|
|
84
84
|
p = s === -1 ? n : r[s].children;
|
|
85
|
-
var
|
|
86
|
-
kr.test(v) && (v = " "), (
|
|
85
|
+
var N = a.indexOf("<", h), v = a.slice(h, N === -1 ? void 0 : N);
|
|
86
|
+
kr.test(v) && (v = " "), (N > -1 && s + p.length >= 0 || v !== " ") && p.push({ type: "text", content: v });
|
|
87
87
|
}
|
|
88
88
|
}), n;
|
|
89
89
|
}, stringify: function(a) {
|
|
@@ -204,16 +204,16 @@ const Rr = (a) => {
|
|
|
204
204
|
const {
|
|
205
205
|
props: l,
|
|
206
206
|
type: c
|
|
207
|
-
} = s, d = Object.keys(l).length, p = r.indexOf(c) > -1,
|
|
208
|
-
if (!
|
|
207
|
+
} = s, d = Object.keys(l).length, p = r.indexOf(c) > -1, g = l.children;
|
|
208
|
+
if (!g && p && !d)
|
|
209
209
|
t += `<${c}/>`;
|
|
210
|
-
else if (!
|
|
210
|
+
else if (!g && (!p || d) || l.i18nIsDynamicList)
|
|
211
211
|
t += `<${i}></${i}>`;
|
|
212
|
-
else if (p && d === 1 && xe(
|
|
213
|
-
t += `<${c}>${
|
|
212
|
+
else if (p && d === 1 && xe(g))
|
|
213
|
+
t += `<${c}>${g}</${c}>`;
|
|
214
214
|
else {
|
|
215
|
-
const
|
|
216
|
-
t += `<${i}>${
|
|
215
|
+
const m = dn(g, e);
|
|
216
|
+
t += `<${i}>${m}</${i}>`;
|
|
217
217
|
}
|
|
218
218
|
} else if (s === null)
|
|
219
219
|
Na("Trans: the passed in value is invalid - seems you passed in a null child.");
|
|
@@ -232,91 +232,91 @@ const Rr = (a) => {
|
|
|
232
232
|
}), t;
|
|
233
233
|
}, zr = (a, e, t, n, r, s) => {
|
|
234
234
|
if (e === "") return [];
|
|
235
|
-
const i = n.transKeepBasicHtmlNodesFor || [], l = e && new RegExp(i.map((
|
|
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 c = {}, d = (
|
|
238
|
-
aa(
|
|
237
|
+
const c = {}, d = (N) => {
|
|
238
|
+
aa(N).forEach((y) => {
|
|
239
239
|
xe(y) || (Ua(y) ? d(qa(y)) : ea(y) && !wa(y) && Object.assign(c, y));
|
|
240
240
|
});
|
|
241
241
|
};
|
|
242
242
|
d(a);
|
|
243
|
-
const p = xr.parse(`<0>${e}</0>`),
|
|
243
|
+
const p = xr.parse(`<0>${e}</0>`), g = {
|
|
244
244
|
...c,
|
|
245
245
|
...r
|
|
246
|
-
},
|
|
247
|
-
const k = qa(
|
|
248
|
-
return Br(k) && x.length === 0 ||
|
|
249
|
-
},
|
|
250
|
-
|
|
246
|
+
}, m = (N, v, y) => {
|
|
247
|
+
const k = qa(N), x = b(k, v.children, y);
|
|
248
|
+
return Br(k) && x.length === 0 || N.props && N.props.i18nIsDynamicList ? k : x;
|
|
249
|
+
}, h = (N, v, y, k, x) => {
|
|
250
|
+
N.dummy ? (N.children = v, y.push(hr(N, {
|
|
251
251
|
key: k
|
|
252
|
-
}, x ? void 0 : v))) : y.push(...br.map([
|
|
253
|
-
const
|
|
254
|
-
...
|
|
252
|
+
}, x ? void 0 : v))) : y.push(...br.map([N], (S) => {
|
|
253
|
+
const w = {
|
|
254
|
+
...S.props
|
|
255
255
|
};
|
|
256
|
-
return delete
|
|
257
|
-
...
|
|
256
|
+
return delete w.i18nIsDynamicList, Ve(S.type, {
|
|
257
|
+
...w,
|
|
258
258
|
key: k,
|
|
259
|
-
ref:
|
|
259
|
+
ref: S.ref
|
|
260
260
|
}, x ? null : v);
|
|
261
261
|
}));
|
|
262
|
-
},
|
|
263
|
-
const k = aa(
|
|
264
|
-
return aa(v).reduce((
|
|
265
|
-
const f =
|
|
266
|
-
if (
|
|
267
|
-
let T = k[parseInt(
|
|
268
|
-
y.length === 1 && !T && (T = y[0][
|
|
269
|
-
const
|
|
270
|
-
props:
|
|
271
|
-
}, T) : T, D = wa(
|
|
272
|
-
if (xe(
|
|
273
|
-
const
|
|
274
|
-
|
|
275
|
-
} else if (Ua(
|
|
276
|
-
const
|
|
277
|
-
|
|
278
|
-
} else if (
|
|
279
|
-
const
|
|
280
|
-
|
|
281
|
-
} else if (Number.isNaN(parseFloat(
|
|
282
|
-
if (
|
|
283
|
-
const
|
|
284
|
-
|
|
285
|
-
} else if (n.transSupportBasicHtmlNodes && i.indexOf(
|
|
286
|
-
if (
|
|
287
|
-
|
|
288
|
-
key: `${
|
|
262
|
+
}, b = (N, v, y) => {
|
|
263
|
+
const k = aa(N);
|
|
264
|
+
return aa(v).reduce((S, w, A) => {
|
|
265
|
+
const f = w.children && w.children[0] && w.children[0].content && t.services.interpolator.interpolate(w.children[0].content, g, t.language);
|
|
266
|
+
if (w.type === "tag") {
|
|
267
|
+
let T = k[parseInt(w.name, 10)];
|
|
268
|
+
y.length === 1 && !T && (T = y[0][w.name]), T || (T = {});
|
|
269
|
+
const I = Object.keys(w.attrs).length !== 0 ? Mr({
|
|
270
|
+
props: w.attrs
|
|
271
|
+
}, T) : T, D = wa(I), q = D && Ua(w, !0) && !w.voidElement, R = l && ea(I) && I.dummy && !D, j = ea(a) && Object.hasOwnProperty.call(a, w.name);
|
|
272
|
+
if (xe(I)) {
|
|
273
|
+
const E = t.services.interpolator.interpolate(I, g, t.language);
|
|
274
|
+
S.push(E);
|
|
275
|
+
} else if (Ua(I) || q) {
|
|
276
|
+
const E = m(I, w, y);
|
|
277
|
+
h(I, E, S, A);
|
|
278
|
+
} else if (R) {
|
|
279
|
+
const E = b(k, w.children, y);
|
|
280
|
+
h(I, E, S, A);
|
|
281
|
+
} else if (Number.isNaN(parseFloat(w.name)))
|
|
282
|
+
if (j) {
|
|
283
|
+
const E = m(I, w, y);
|
|
284
|
+
h(I, E, S, A, w.voidElement);
|
|
285
|
+
} else if (n.transSupportBasicHtmlNodes && i.indexOf(w.name) > -1)
|
|
286
|
+
if (w.voidElement)
|
|
287
|
+
S.push(Ve(w.name, {
|
|
288
|
+
key: `${w.name}-${A}`
|
|
289
289
|
}));
|
|
290
290
|
else {
|
|
291
|
-
const
|
|
292
|
-
|
|
293
|
-
key: `${
|
|
294
|
-
},
|
|
291
|
+
const E = b(k, w.children, y);
|
|
292
|
+
S.push(Ve(w.name, {
|
|
293
|
+
key: `${w.name}-${A}`
|
|
294
|
+
}, E));
|
|
295
295
|
}
|
|
296
|
-
else if (
|
|
297
|
-
|
|
296
|
+
else if (w.voidElement)
|
|
297
|
+
S.push(`<${w.name} />`);
|
|
298
298
|
else {
|
|
299
|
-
const
|
|
300
|
-
|
|
299
|
+
const E = b(k, w.children, y);
|
|
300
|
+
S.push(`<${w.name}>${E}</${w.name}>`);
|
|
301
301
|
}
|
|
302
|
-
else if (ea(
|
|
303
|
-
const
|
|
304
|
-
|
|
302
|
+
else if (ea(I) && !D) {
|
|
303
|
+
const E = w.children[0] ? f : null;
|
|
304
|
+
E && S.push(E);
|
|
305
305
|
} else
|
|
306
|
-
|
|
307
|
-
} else if (
|
|
308
|
-
const T = n.transWrapTextNodes,
|
|
309
|
-
T ?
|
|
310
|
-
key: `${
|
|
311
|
-
},
|
|
306
|
+
h(I, f, S, A, w.children.length !== 1 || !f);
|
|
307
|
+
} else if (w.type === "text") {
|
|
308
|
+
const T = n.transWrapTextNodes, I = s ? n.unescape(t.services.interpolator.interpolate(w.content, g, t.language)) : t.services.interpolator.interpolate(w.content, g, t.language);
|
|
309
|
+
T ? S.push(Ve(T, {
|
|
310
|
+
key: `${w.name}-${A}`
|
|
311
|
+
}, I)) : S.push(I);
|
|
312
312
|
}
|
|
313
|
-
return
|
|
313
|
+
return S;
|
|
314
314
|
}, []);
|
|
315
|
-
},
|
|
315
|
+
}, _ = b([{
|
|
316
316
|
dummy: !0,
|
|
317
317
|
children: a || []
|
|
318
318
|
}], p, aa(a || []));
|
|
319
|
-
return qa(
|
|
319
|
+
return qa(_[0]);
|
|
320
320
|
};
|
|
321
321
|
function Or(a) {
|
|
322
322
|
let {
|
|
@@ -330,28 +330,28 @@ function Or(a) {
|
|
|
330
330
|
defaults: c,
|
|
331
331
|
components: d,
|
|
332
332
|
ns: p,
|
|
333
|
-
i18n:
|
|
334
|
-
t:
|
|
335
|
-
shouldUnescape:
|
|
336
|
-
...
|
|
333
|
+
i18n: g,
|
|
334
|
+
t: m,
|
|
335
|
+
shouldUnescape: h,
|
|
336
|
+
...b
|
|
337
337
|
} = a;
|
|
338
|
-
const
|
|
339
|
-
if (!
|
|
338
|
+
const _ = g || Xa();
|
|
339
|
+
if (!_)
|
|
340
340
|
return xa("You will need to pass in an i18next instance by using i18nextReactModule"), e;
|
|
341
|
-
const
|
|
341
|
+
const N = m || _.t.bind(_) || ((q) => q), v = {
|
|
342
342
|
...on(),
|
|
343
|
-
...
|
|
343
|
+
..._.options && _.options.react
|
|
344
344
|
};
|
|
345
|
-
let y = p ||
|
|
345
|
+
let y = p || N.ns || _.options && _.options.defaultNS;
|
|
346
346
|
y = xe(y) ? [y] : y || ["translation"];
|
|
347
347
|
const k = dn(e, v), x = c || k || v.transEmptyNodeValue || r, {
|
|
348
|
-
hashTransKey:
|
|
349
|
-
} = v,
|
|
350
|
-
|
|
348
|
+
hashTransKey: S
|
|
349
|
+
} = v, w = r || (S ? S(k || x) : k || x);
|
|
350
|
+
_.options && _.options.interpolation && _.options.interpolation.defaultVariables && (l = l && Object.keys(l).length > 0 ? {
|
|
351
351
|
...l,
|
|
352
|
-
...
|
|
352
|
+
..._.options.interpolation.defaultVariables
|
|
353
353
|
} : {
|
|
354
|
-
...
|
|
354
|
+
..._.options.interpolation.defaultVariables
|
|
355
355
|
});
|
|
356
356
|
const A = l || t !== void 0 || !e ? i.interpolation : {
|
|
357
357
|
interpolation: {
|
|
@@ -367,17 +367,17 @@ function Or(a) {
|
|
|
367
367
|
...A,
|
|
368
368
|
defaultValue: x,
|
|
369
369
|
ns: y
|
|
370
|
-
}, T =
|
|
371
|
-
d && Object.keys(d).forEach((
|
|
372
|
-
const
|
|
373
|
-
if (typeof
|
|
374
|
-
function
|
|
375
|
-
return Ve(gr, null,
|
|
370
|
+
}, T = w ? N(w, f) : x;
|
|
371
|
+
d && Object.keys(d).forEach((q) => {
|
|
372
|
+
const R = d[q];
|
|
373
|
+
if (typeof R.type == "function" || !R.props || !R.props.children || T.indexOf(`${q}/>`) < 0 && T.indexOf(`${q} />`) < 0) return;
|
|
374
|
+
function j() {
|
|
375
|
+
return Ve(gr, null, R);
|
|
376
376
|
}
|
|
377
|
-
d[
|
|
377
|
+
d[q] = Ve(j);
|
|
378
378
|
});
|
|
379
|
-
const
|
|
380
|
-
return D ? Ve(D,
|
|
379
|
+
const I = zr(d || e, T, _, v, f, h), D = n !== void 0 ? n : v.defaultTransParent;
|
|
380
|
+
return D ? Ve(D, b, I) : I;
|
|
381
381
|
}
|
|
382
382
|
const Ur = {
|
|
383
383
|
type: "3rdParty",
|
|
@@ -408,15 +408,15 @@ function Tt(a) {
|
|
|
408
408
|
defaults: c,
|
|
409
409
|
components: d,
|
|
410
410
|
ns: p,
|
|
411
|
-
i18n:
|
|
412
|
-
t:
|
|
413
|
-
shouldUnescape:
|
|
414
|
-
...
|
|
411
|
+
i18n: g,
|
|
412
|
+
t: m,
|
|
413
|
+
shouldUnescape: h,
|
|
414
|
+
...b
|
|
415
415
|
} = a;
|
|
416
416
|
const {
|
|
417
|
-
i18n:
|
|
418
|
-
defaultNS:
|
|
419
|
-
} = ba(et) || {}, v =
|
|
417
|
+
i18n: _,
|
|
418
|
+
defaultNS: N
|
|
419
|
+
} = ba(et) || {}, v = g || _ || Xa(), y = m || v && v.t.bind(v);
|
|
420
420
|
return Or({
|
|
421
421
|
children: e,
|
|
422
422
|
count: t,
|
|
@@ -427,11 +427,11 @@ function Tt(a) {
|
|
|
427
427
|
values: l,
|
|
428
428
|
defaults: c,
|
|
429
429
|
components: d,
|
|
430
|
-
ns: p || y && y.ns ||
|
|
430
|
+
ns: p || y && y.ns || N || v && v.options && v.options.defaultNS,
|
|
431
431
|
i18n: v,
|
|
432
|
-
t:
|
|
433
|
-
shouldUnescape:
|
|
434
|
-
...
|
|
432
|
+
t: m,
|
|
433
|
+
shouldUnescape: h,
|
|
434
|
+
...b
|
|
435
435
|
});
|
|
436
436
|
}
|
|
437
437
|
const $r = (a, e) => {
|
|
@@ -449,8 +449,8 @@ const $r = (a, e) => {
|
|
|
449
449
|
} = ba(et) || {}, s = t || n || Xa();
|
|
450
450
|
if (s && !s.reportNamespaces && (s.reportNamespaces = new qr()), !s) {
|
|
451
451
|
xa("You will need to pass in an i18next instance by using initReactI18next");
|
|
452
|
-
const x = (
|
|
453
|
-
return
|
|
452
|
+
const x = (w, A) => xe(A) ? A : ea(A) && xe(A.defaultValue) ? A.defaultValue : Array.isArray(w) ? w[w.length - 1] : w, S = [x, {}, !1];
|
|
453
|
+
return S.t = x, S.i18n = {}, S.ready = !1, S;
|
|
454
454
|
}
|
|
455
455
|
s.options.react && s.options.react.wait !== void 0 && xa("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
|
|
456
456
|
const i = {
|
|
@@ -463,31 +463,31 @@ const $r = (a, e) => {
|
|
|
463
463
|
} = i;
|
|
464
464
|
let d = r || s.options && s.options.defaultNS;
|
|
465
465
|
d = xe(d) ? [d] : d || ["translation"], s.reportNamespaces.addUsedNamespaces && s.reportNamespaces.addUsedNamespaces(d);
|
|
466
|
-
const p = (s.isInitialized || s.initializedStoreOnce) && d.every((x) => Dr(x, s, i)),
|
|
467
|
-
let
|
|
468
|
-
e.lng && (
|
|
469
|
-
const v = $r(
|
|
466
|
+
const p = (s.isInitialized || s.initializedStoreOnce) && d.every((x) => Dr(x, s, i)), g = Vr(s, e.lng || null, i.nsMode === "fallback" ? d : d[0], c), m = () => g, h = () => cn(s, e.lng || null, i.nsMode === "fallback" ? d : d[0], c), [b, _] = H(m);
|
|
467
|
+
let N = d.join();
|
|
468
|
+
e.lng && (N = `${e.lng}${N}`);
|
|
469
|
+
const v = $r(N), y = Ea(!0);
|
|
470
470
|
we(() => {
|
|
471
471
|
const {
|
|
472
472
|
bindI18n: x,
|
|
473
|
-
bindI18nStore:
|
|
473
|
+
bindI18nStore: S
|
|
474
474
|
} = i;
|
|
475
475
|
y.current = !0, !p && !l && (e.lng ? xt(s, e.lng, d, () => {
|
|
476
|
-
y.current &&
|
|
476
|
+
y.current && _(h);
|
|
477
477
|
}) : At(s, d, () => {
|
|
478
|
-
y.current &&
|
|
479
|
-
})), p && v && v !==
|
|
480
|
-
const
|
|
481
|
-
y.current &&
|
|
478
|
+
y.current && _(h);
|
|
479
|
+
})), p && v && v !== N && y.current && _(h);
|
|
480
|
+
const w = () => {
|
|
481
|
+
y.current && _(h);
|
|
482
482
|
};
|
|
483
|
-
return x && s && s.on(x,
|
|
484
|
-
y.current = !1, x && s && x.split(" ").forEach((A) => s.off(A,
|
|
483
|
+
return x && s && s.on(x, w), S && s && s.store.on(S, w), () => {
|
|
484
|
+
y.current = !1, x && s && x.split(" ").forEach((A) => s.off(A, w)), S && s && S.split(" ").forEach((A) => s.store.off(A, w));
|
|
485
485
|
};
|
|
486
|
-
}, [s,
|
|
487
|
-
y.current && p &&
|
|
486
|
+
}, [s, N]), we(() => {
|
|
487
|
+
y.current && p && _(m);
|
|
488
488
|
}, [s, c, p]);
|
|
489
|
-
const k = [
|
|
490
|
-
if (k.t =
|
|
489
|
+
const k = [b, s, p];
|
|
490
|
+
if (k.t = b, k.i18n = s, k.ready = p, p || !p && !l) return k;
|
|
491
491
|
throw new Promise((x) => {
|
|
492
492
|
e.lng ? xt(s, e.lng, d, () => x()) : At(s, d, () => x());
|
|
493
493
|
});
|
|
@@ -506,7 +506,7 @@ function jr(a) {
|
|
|
506
506
|
value: r
|
|
507
507
|
}, n);
|
|
508
508
|
}
|
|
509
|
-
const
|
|
509
|
+
const V = (a) => typeof a == "string", ua = () => {
|
|
510
510
|
let a, e;
|
|
511
511
|
const t = new Promise((n, r) => {
|
|
512
512
|
a = n, e = r;
|
|
@@ -516,8 +516,8 @@ const j = (a) => typeof a == "string", ua = () => {
|
|
|
516
516
|
a.forEach((n) => {
|
|
517
517
|
e[n] && (t[n] = e[n]);
|
|
518
518
|
});
|
|
519
|
-
}, Gr = /###/g, Pt = (a) => a && a.indexOf("###") > -1 ? a.replace(Gr, ".") : a, Ft = (a) => !a ||
|
|
520
|
-
const n =
|
|
519
|
+
}, Gr = /###/g, Pt = (a) => a && a.indexOf("###") > -1 ? a.replace(Gr, ".") : a, Ft = (a) => !a || V(a), ma = (a, e, t) => {
|
|
520
|
+
const n = V(e) ? e.split(".") : e;
|
|
521
521
|
let r = 0;
|
|
522
522
|
for (; r < n.length - 1; ) {
|
|
523
523
|
if (Ft(a)) return {};
|
|
@@ -559,7 +559,7 @@ const j = (a) => typeof a == "string", ua = () => {
|
|
|
559
559
|
return n !== void 0 ? n : Ta(e, t);
|
|
560
560
|
}, un = (a, e, t) => {
|
|
561
561
|
for (const n in e)
|
|
562
|
-
n !== "__proto__" && n !== "constructor" && (n in a ?
|
|
562
|
+
n !== "__proto__" && n !== "constructor" && (n in a ? V(a[n]) || a[n] instanceof String || V(e[n]) || e[n] instanceof String ? t && (a[n] = e[n]) : un(a[n], e[n], t) : a[n] = e[n]);
|
|
563
563
|
return a;
|
|
564
564
|
}, Qe = (a) => a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
|
|
565
565
|
var Yr = {
|
|
@@ -570,7 +570,7 @@ var Yr = {
|
|
|
570
570
|
"'": "'",
|
|
571
571
|
"/": "/"
|
|
572
572
|
};
|
|
573
|
-
const Jr = (a) =>
|
|
573
|
+
const Jr = (a) => V(a) ? a.replace(/[&<>"'\/]/g, (e) => Yr[e]) : a;
|
|
574
574
|
class Qr {
|
|
575
575
|
constructor(e) {
|
|
576
576
|
this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
|
|
@@ -659,7 +659,7 @@ class Pa {
|
|
|
659
659
|
return this.forward(t, "warn", "WARNING DEPRECATED: ", !0);
|
|
660
660
|
}
|
|
661
661
|
forward(e, t, n, r) {
|
|
662
|
-
return r && !this.debug ? null : (
|
|
662
|
+
return r && !this.debug ? null : (V(e[0]) && (e[0] = `${n}${this.prefix} ${e[0]}`), this.logger[t](e));
|
|
663
663
|
}
|
|
664
664
|
create(e) {
|
|
665
665
|
return new Pa(this.logger, {
|
|
@@ -725,9 +725,9 @@ class It extends Ra {
|
|
|
725
725
|
let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
|
|
726
726
|
const s = r.keySeparator !== void 0 ? r.keySeparator : this.options.keySeparator, i = r.ignoreJSONStructure !== void 0 ? r.ignoreJSONStructure : this.options.ignoreJSONStructure;
|
|
727
727
|
let l;
|
|
728
|
-
e.indexOf(".") > -1 ? l = e.split(".") : (l = [e, t], n && (Array.isArray(n) ? l.push(...n) :
|
|
728
|
+
e.indexOf(".") > -1 ? l = e.split(".") : (l = [e, t], n && (Array.isArray(n) ? l.push(...n) : V(n) && s ? l.push(...n.split(s)) : l.push(n)));
|
|
729
729
|
const c = Ta(this.data, l);
|
|
730
|
-
return !c && !t && !n && e.indexOf(".") > -1 && (e = l[0], t = l[1], n = l.slice(2).join(".")), c || !i || !
|
|
730
|
+
return !c && !t && !n && e.indexOf(".") > -1 && (e = l[0], t = l[1], n = l.slice(2).join(".")), c || !i || !V(n) ? c : Ka(this.data && this.data[e] && this.data[e][t], n, s);
|
|
731
731
|
}
|
|
732
732
|
addResource(e, t, n, r) {
|
|
733
733
|
let s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {
|
|
@@ -742,7 +742,7 @@ class It extends Ra {
|
|
|
742
742
|
silent: !1
|
|
743
743
|
};
|
|
744
744
|
for (const s in n)
|
|
745
|
-
(
|
|
745
|
+
(V(n[s]) || Array.isArray(n[s])) && this.addResource(e, t, s, n[s], {
|
|
746
746
|
silent: !0
|
|
747
747
|
});
|
|
748
748
|
r.silent || this.emit("added", e, t, n);
|
|
@@ -821,14 +821,14 @@ class Fa extends Ra {
|
|
|
821
821
|
if (c && c.length > 0)
|
|
822
822
|
return {
|
|
823
823
|
key: e,
|
|
824
|
-
namespaces:
|
|
824
|
+
namespaces: V(s) ? [s] : s
|
|
825
825
|
};
|
|
826
826
|
const d = e.split(n);
|
|
827
827
|
(n !== r || n === r && this.options.ns.indexOf(d[0]) > -1) && (s = d.shift()), e = d.join(r);
|
|
828
828
|
}
|
|
829
829
|
return {
|
|
830
830
|
key: e,
|
|
831
|
-
namespaces:
|
|
831
|
+
namespaces: V(s) ? [s] : s
|
|
832
832
|
};
|
|
833
833
|
}
|
|
834
834
|
translate(e, t, n) {
|
|
@@ -861,68 +861,68 @@ class Fa extends Ra {
|
|
|
861
861
|
usedParams: this.getUsedParamsDetails(t)
|
|
862
862
|
} : i;
|
|
863
863
|
}
|
|
864
|
-
const
|
|
865
|
-
let
|
|
866
|
-
const
|
|
867
|
-
if (y &&
|
|
864
|
+
const g = this.resolve(e, t);
|
|
865
|
+
let m = g && g.res;
|
|
866
|
+
const h = g && g.usedKey || i, b = g && g.exactUsedKey || i, _ = Object.prototype.toString.apply(m), N = ["[object Number]", "[object Function]", "[object RegExp]"], v = t.joinArrays !== void 0 ? t.joinArrays : this.options.joinArrays, y = !this.i18nFormat || this.i18nFormat.handleAsObject, k = !V(m) && typeof m != "boolean" && typeof m != "number";
|
|
867
|
+
if (y && m && k && N.indexOf(_) < 0 && !(V(v) && Array.isArray(m))) {
|
|
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
|
-
const x = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(
|
|
870
|
+
const x = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(h, m, {
|
|
871
871
|
...t,
|
|
872
872
|
ns: l
|
|
873
873
|
}) : `key '${i} (${this.language})' returned an object instead of string.`;
|
|
874
|
-
return r ? (
|
|
874
|
+
return r ? (g.res = x, g.usedParams = this.getUsedParamsDetails(t), g) : x;
|
|
875
875
|
}
|
|
876
876
|
if (s) {
|
|
877
|
-
const x = Array.isArray(
|
|
878
|
-
for (const A in
|
|
879
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
880
|
-
const f = `${
|
|
881
|
-
|
|
877
|
+
const x = Array.isArray(m), S = x ? [] : {}, w = x ? b : h;
|
|
878
|
+
for (const A in m)
|
|
879
|
+
if (Object.prototype.hasOwnProperty.call(m, A)) {
|
|
880
|
+
const f = `${w}${s}${A}`;
|
|
881
|
+
S[A] = this.translate(f, {
|
|
882
882
|
...t,
|
|
883
883
|
joinArrays: !1,
|
|
884
884
|
ns: l
|
|
885
|
-
}),
|
|
885
|
+
}), S[A] === f && (S[A] = m[A]);
|
|
886
886
|
}
|
|
887
|
-
|
|
887
|
+
m = S;
|
|
888
888
|
}
|
|
889
|
-
} else if (y &&
|
|
890
|
-
|
|
889
|
+
} else if (y && V(v) && Array.isArray(m))
|
|
890
|
+
m = m.join(v), m && (m = this.extendTranslation(m, e, t, n));
|
|
891
891
|
else {
|
|
892
|
-
let x = !1,
|
|
893
|
-
const
|
|
892
|
+
let x = !1, S = !1;
|
|
893
|
+
const w = t.count !== void 0 && !V(t.count), A = Fa.hasDefaultValue(t), f = w ? this.pluralResolver.getSuffix(d, t.count, t) : "", T = t.ordinal && w ? this.pluralResolver.getSuffix(d, t.count, {
|
|
894
894
|
ordinal: !1
|
|
895
|
-
}) : "",
|
|
896
|
-
!this.isValidLookup(
|
|
897
|
-
const
|
|
898
|
-
if (
|
|
899
|
-
if (this.logger.log(
|
|
895
|
+
}) : "", I = w && !t.ordinal && t.count === 0 && this.pluralResolver.shouldUseIntlApi(), D = I && t[`defaultValue${this.options.pluralSeparator}zero`] || t[`defaultValue${f}`] || t[`defaultValue${T}`] || t.defaultValue;
|
|
896
|
+
!this.isValidLookup(m) && A && (x = !0, m = D), this.isValidLookup(m) || (S = !0, m = i);
|
|
897
|
+
const R = (t.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && S ? void 0 : m, j = A && D !== m && this.options.updateMissing;
|
|
898
|
+
if (S || x || j) {
|
|
899
|
+
if (this.logger.log(j ? "updateKey" : "missingKey", d, c, i, j ? D : m), s) {
|
|
900
900
|
const K = this.resolve(i, {
|
|
901
901
|
...t,
|
|
902
902
|
keySeparator: !1
|
|
903
903
|
});
|
|
904
904
|
K && K.res && this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.");
|
|
905
905
|
}
|
|
906
|
-
let
|
|
907
|
-
const
|
|
908
|
-
if (this.options.saveMissingTo === "fallback" &&
|
|
909
|
-
for (let K = 0; K <
|
|
910
|
-
|
|
911
|
-
else this.options.saveMissingTo === "all" ?
|
|
912
|
-
const
|
|
913
|
-
const ee = A && C !==
|
|
914
|
-
this.options.missingKeyHandler ? this.options.missingKeyHandler(K, c, z, ee,
|
|
906
|
+
let E = [];
|
|
907
|
+
const B = this.languageUtils.getFallbackCodes(this.options.fallbackLng, t.lng || this.language);
|
|
908
|
+
if (this.options.saveMissingTo === "fallback" && B && B[0])
|
|
909
|
+
for (let K = 0; K < B.length; K++)
|
|
910
|
+
E.push(B[K]);
|
|
911
|
+
else this.options.saveMissingTo === "all" ? E = this.languageUtils.toResolveHierarchy(t.lng || this.language) : E.push(t.lng || this.language);
|
|
912
|
+
const $ = (K, z, C) => {
|
|
913
|
+
const ee = A && C !== m ? C : R;
|
|
914
|
+
this.options.missingKeyHandler ? this.options.missingKeyHandler(K, c, z, ee, j, t) : this.backendConnector && this.backendConnector.saveMissing && this.backendConnector.saveMissing(K, c, z, ee, j, t), this.emit("missingKey", K, c, z, m);
|
|
915
915
|
};
|
|
916
|
-
this.options.saveMissing && (this.options.saveMissingPlurals &&
|
|
916
|
+
this.options.saveMissing && (this.options.saveMissingPlurals && w ? E.forEach((K) => {
|
|
917
917
|
const z = this.pluralResolver.getSuffixes(K, t);
|
|
918
|
-
|
|
919
|
-
|
|
918
|
+
I && t[`defaultValue${this.options.pluralSeparator}zero`] && z.indexOf(`${this.options.pluralSeparator}zero`) < 0 && z.push(`${this.options.pluralSeparator}zero`), z.forEach((C) => {
|
|
919
|
+
$([K], i + C, t[`defaultValue${C}`] || D);
|
|
920
920
|
});
|
|
921
|
-
}) :
|
|
921
|
+
}) : $(E, i, D));
|
|
922
922
|
}
|
|
923
|
-
|
|
923
|
+
m = this.extendTranslation(m, e, t, g, n), S && m === i && this.options.appendNamespaceToMissingKey && (m = `${c}:${i}`), (S || x) && this.options.parseMissingKeyHandler && (this.options.compatibilityAPI !== "v1" ? m = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${c}:${i}` : i, x ? m : void 0) : m = this.options.parseMissingKeyHandler(m));
|
|
924
924
|
}
|
|
925
|
-
return r ? (
|
|
925
|
+
return r ? (g.res = m, g.usedParams = this.getUsedParamsDetails(t), g) : m;
|
|
926
926
|
}
|
|
927
927
|
extendTranslation(e, t, n, r, s) {
|
|
928
928
|
var i = this;
|
|
@@ -941,27 +941,27 @@ class Fa extends Ra {
|
|
|
941
941
|
...n.interpolation
|
|
942
942
|
}
|
|
943
943
|
});
|
|
944
|
-
const d =
|
|
944
|
+
const d = V(e) && (n && n.interpolation && n.interpolation.skipOnVariables !== void 0 ? n.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
|
|
945
945
|
let p;
|
|
946
946
|
if (d) {
|
|
947
|
-
const
|
|
948
|
-
p =
|
|
947
|
+
const m = e.match(this.interpolator.nestingRegexp);
|
|
948
|
+
p = m && m.length;
|
|
949
949
|
}
|
|
950
|
-
let
|
|
951
|
-
if (this.options.interpolation.defaultVariables && (
|
|
950
|
+
let g = n.replace && !V(n.replace) ? n.replace : n;
|
|
951
|
+
if (this.options.interpolation.defaultVariables && (g = {
|
|
952
952
|
...this.options.interpolation.defaultVariables,
|
|
953
|
-
...
|
|
954
|
-
}), e = this.interpolator.interpolate(e,
|
|
955
|
-
const
|
|
956
|
-
p <
|
|
953
|
+
...g
|
|
954
|
+
}), e = this.interpolator.interpolate(e, g, n.lng || this.language || r.usedLng, n), d) {
|
|
955
|
+
const m = e.match(this.interpolator.nestingRegexp), h = m && m.length;
|
|
956
|
+
p < h && (n.nest = !1);
|
|
957
957
|
}
|
|
958
958
|
!n.lng && this.options.compatibilityAPI !== "v1" && r && r.res && (n.lng = this.language || r.usedLng), n.nest !== !1 && (e = this.interpolator.nest(e, function() {
|
|
959
|
-
for (var
|
|
960
|
-
b
|
|
961
|
-
return s && s[0] ===
|
|
959
|
+
for (var m = arguments.length, h = new Array(m), b = 0; b < m; b++)
|
|
960
|
+
h[b] = arguments[b];
|
|
961
|
+
return s && s[0] === h[0] && !n.context ? (i.logger.warn(`It seems you are nesting recursively key: ${h[0]} in key: ${t[0]}`), null) : i.translate(...h, t);
|
|
962
962
|
}, n)), n.interpolation && this.interpolator.reset();
|
|
963
963
|
}
|
|
964
|
-
const l = n.postProcess || this.options.postProcess, c =
|
|
964
|
+
const l = n.postProcess || this.options.postProcess, c = V(l) ? [l] : l;
|
|
965
965
|
return e != null && c && c.length && n.applyPostProcessor !== !1 && (e = pn.handle(c, e, t, this.options && this.options.postProcessPassResolved ? {
|
|
966
966
|
i18nResolved: {
|
|
967
967
|
...r,
|
|
@@ -972,32 +972,32 @@ class Fa extends Ra {
|
|
|
972
972
|
}
|
|
973
973
|
resolve(e) {
|
|
974
974
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n, r, s, i, l;
|
|
975
|
-
return
|
|
975
|
+
return V(e) && (e = [e]), e.forEach((c) => {
|
|
976
976
|
if (this.isValidLookup(n)) return;
|
|
977
977
|
const d = this.extractFromKey(c, t), p = d.key;
|
|
978
978
|
r = p;
|
|
979
|
-
let
|
|
980
|
-
this.options.fallbackNS && (
|
|
981
|
-
const
|
|
982
|
-
|
|
983
|
-
this.isValidLookup(n) || (l =
|
|
979
|
+
let g = d.namespaces;
|
|
980
|
+
this.options.fallbackNS && (g = g.concat(this.options.fallbackNS));
|
|
981
|
+
const m = t.count !== void 0 && !V(t.count), h = m && !t.ordinal && t.count === 0 && this.pluralResolver.shouldUseIntlApi(), b = t.context !== void 0 && (V(t.context) || typeof t.context == "number") && t.context !== "", _ = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
|
|
982
|
+
g.forEach((N) => {
|
|
983
|
+
this.isValidLookup(n) || (l = N, !Et[`${_[0]}-${N}`] && this.utils && this.utils.hasLoadedNamespace && !this.utils.hasLoadedNamespace(l) && (Et[`${_[0]}-${N}`] = !0, this.logger.warn(`key "${r}" for languages "${_.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!!!")), _.forEach((v) => {
|
|
984
984
|
if (this.isValidLookup(n)) return;
|
|
985
985
|
i = v;
|
|
986
986
|
const y = [p];
|
|
987
987
|
if (this.i18nFormat && this.i18nFormat.addLookupKeys)
|
|
988
|
-
this.i18nFormat.addLookupKeys(y, p, v,
|
|
988
|
+
this.i18nFormat.addLookupKeys(y, p, v, N, t);
|
|
989
989
|
else {
|
|
990
990
|
let x;
|
|
991
|
-
|
|
992
|
-
const
|
|
993
|
-
if (
|
|
991
|
+
m && (x = this.pluralResolver.getSuffix(v, t.count, t));
|
|
992
|
+
const S = `${this.options.pluralSeparator}zero`, w = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
|
|
993
|
+
if (m && (y.push(p + x), t.ordinal && x.indexOf(w) === 0 && y.push(p + x.replace(w, this.options.pluralSeparator)), h && y.push(p + S)), b) {
|
|
994
994
|
const A = `${p}${this.options.contextSeparator}${t.context}`;
|
|
995
|
-
y.push(A),
|
|
995
|
+
y.push(A), m && (y.push(A + x), t.ordinal && x.indexOf(w) === 0 && y.push(A + x.replace(w, this.options.pluralSeparator)), h && y.push(A + S));
|
|
996
996
|
}
|
|
997
997
|
}
|
|
998
998
|
let k;
|
|
999
999
|
for (; k = y.pop(); )
|
|
1000
|
-
this.isValidLookup(n) || (s = k, n = this.getResource(v,
|
|
1000
|
+
this.isValidLookup(n) || (s = k, n = this.getResource(v, N, k, t));
|
|
1001
1001
|
}));
|
|
1002
1002
|
});
|
|
1003
1003
|
}), {
|
|
@@ -1017,7 +1017,7 @@ class Fa extends Ra {
|
|
|
1017
1017
|
}
|
|
1018
1018
|
getUsedParamsDetails() {
|
|
1019
1019
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
1020
|
-
const t = ["defaultValue", "ordinal", "context", "replace", "lng", "lngs", "fallbackLng", "ns", "keySeparator", "nsSeparator", "returnObjects", "returnDetails", "joinArrays", "postProcess", "interpolation"], n = e.replace && !
|
|
1020
|
+
const t = ["defaultValue", "ordinal", "context", "replace", "lng", "lngs", "fallbackLng", "ns", "keySeparator", "nsSeparator", "returnObjects", "returnDetails", "joinArrays", "postProcess", "interpolation"], n = e.replace && !V(e.replace);
|
|
1021
1021
|
let r = n ? e.replace : e;
|
|
1022
1022
|
if (n && typeof e.count < "u" && (r.count = e.count), this.options.interpolation.defaultVariables && (r = {
|
|
1023
1023
|
...this.options.interpolation.defaultVariables,
|
|
@@ -1055,7 +1055,7 @@ class Rt {
|
|
|
1055
1055
|
return this.formatLanguageCode(t[0]);
|
|
1056
1056
|
}
|
|
1057
1057
|
formatLanguageCode(e) {
|
|
1058
|
-
if (
|
|
1058
|
+
if (V(e) && e.indexOf("-") > -1) {
|
|
1059
1059
|
if (typeof Intl < "u" && typeof Intl.getCanonicalLocales < "u")
|
|
1060
1060
|
try {
|
|
1061
1061
|
let r = Intl.getCanonicalLocales(e)[0];
|
|
@@ -1091,7 +1091,7 @@ class Rt {
|
|
|
1091
1091
|
}
|
|
1092
1092
|
getFallbackCodes(e, t) {
|
|
1093
1093
|
if (!e) return [];
|
|
1094
|
-
if (typeof e == "function" && (e = e(t)),
|
|
1094
|
+
if (typeof e == "function" && (e = e(t)), V(e) && (e = [e]), Array.isArray(e)) return e;
|
|
1095
1095
|
if (!t) return e.default || [];
|
|
1096
1096
|
let n = e[t];
|
|
1097
1097
|
return n || (n = e[this.getScriptPartFromCode(t)]), n || (n = e[this.formatLanguageCode(t)]), n || (n = e[this.getLanguagePartFromCode(t)]), n || (n = e.default), n || [];
|
|
@@ -1100,7 +1100,7 @@ class Rt {
|
|
|
1100
1100
|
const n = this.getFallbackCodes(t || this.options.fallbackLng || [], e), r = [], s = (i) => {
|
|
1101
1101
|
i && (this.isSupportedCode(i) ? r.push(i) : this.logger.warn(`rejecting language code not found in supportedLngs: ${i}`));
|
|
1102
1102
|
};
|
|
1103
|
-
return
|
|
1103
|
+
return V(e) && (e.indexOf("-") > -1 || e.indexOf("_") > -1) ? (this.options.load !== "languageOnly" && s(this.formatLanguageCode(e)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && s(this.getScriptPartFromCode(e)), this.options.load !== "currentOnly" && s(this.getLanguagePartFromCode(e))) : V(e) && s(this.formatLanguageCode(e)), n.forEach((i) => {
|
|
1104
1104
|
r.indexOf(i) < 0 && s(this.formatLanguageCode(i));
|
|
1105
1105
|
}), r;
|
|
1106
1106
|
}
|
|
@@ -1305,7 +1305,7 @@ class is {
|
|
|
1305
1305
|
}
|
|
1306
1306
|
const Mt = function(a, e, t) {
|
|
1307
1307
|
let n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ".", r = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, s = Hr(a, e, t);
|
|
1308
|
-
return !s && r &&
|
|
1308
|
+
return !s && r && V(t) && (s = Ka(a, t, n), s === void 0 && (s = Ka(e, t, n))), s;
|
|
1309
1309
|
}, Va = (a) => a.replace(/\$/g, "$$$$");
|
|
1310
1310
|
class ls {
|
|
1311
1311
|
constructor() {
|
|
@@ -1327,16 +1327,16 @@ class ls {
|
|
|
1327
1327
|
suffixEscaped: c,
|
|
1328
1328
|
formatSeparator: d,
|
|
1329
1329
|
unescapeSuffix: p,
|
|
1330
|
-
unescapePrefix:
|
|
1331
|
-
nestingPrefix:
|
|
1332
|
-
nestingPrefixEscaped:
|
|
1333
|
-
nestingSuffix:
|
|
1334
|
-
nestingSuffixEscaped:
|
|
1335
|
-
nestingOptionsSeparator:
|
|
1330
|
+
unescapePrefix: g,
|
|
1331
|
+
nestingPrefix: m,
|
|
1332
|
+
nestingPrefixEscaped: h,
|
|
1333
|
+
nestingSuffix: b,
|
|
1334
|
+
nestingSuffixEscaped: _,
|
|
1335
|
+
nestingOptionsSeparator: N,
|
|
1336
1336
|
maxReplaces: v,
|
|
1337
1337
|
alwaysFormat: y
|
|
1338
1338
|
} = e.interpolation;
|
|
1339
|
-
this.escape = t !== void 0 ? t : Jr, this.escapeValue = n !== void 0 ? n : !0, this.useRawValueToEscape = r !== void 0 ? r : !1, this.prefix = s ? Qe(s) : i || "{{", this.suffix = l ? Qe(l) : c || "}}", this.formatSeparator = d || ",", this.unescapePrefix = p ? "" :
|
|
1339
|
+
this.escape = t !== void 0 ? t : Jr, this.escapeValue = n !== void 0 ? n : !0, this.useRawValueToEscape = r !== void 0 ? r : !1, this.prefix = s ? Qe(s) : i || "{{", this.suffix = l ? Qe(l) : c || "}}", this.formatSeparator = d || ",", this.unescapePrefix = p ? "" : g || "-", this.unescapeSuffix = this.unescapePrefix ? "" : p || "", this.nestingPrefix = m ? Qe(m) : h || Qe("$t("), this.nestingSuffix = b ? Qe(b) : _ || Qe(")"), this.nestingOptionsSeparator = N || ",", this.maxReplaces = v || 1e3, this.alwaysFormat = y !== void 0 ? y : !1, this.resetRegExp();
|
|
1340
1340
|
}
|
|
1341
1341
|
reset() {
|
|
1342
1342
|
this.options && this.init(this.options);
|
|
@@ -1347,47 +1347,47 @@ class ls {
|
|
|
1347
1347
|
}
|
|
1348
1348
|
interpolate(e, t, n, r) {
|
|
1349
1349
|
let s, i, l;
|
|
1350
|
-
const c = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, d = (
|
|
1351
|
-
if (
|
|
1352
|
-
const v = Mt(t, c,
|
|
1350
|
+
const c = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, d = (h) => {
|
|
1351
|
+
if (h.indexOf(this.formatSeparator) < 0) {
|
|
1352
|
+
const v = Mt(t, c, h, this.options.keySeparator, this.options.ignoreJSONStructure);
|
|
1353
1353
|
return this.alwaysFormat ? this.format(v, void 0, n, {
|
|
1354
1354
|
...r,
|
|
1355
1355
|
...t,
|
|
1356
|
-
interpolationkey:
|
|
1356
|
+
interpolationkey: h
|
|
1357
1357
|
}) : v;
|
|
1358
1358
|
}
|
|
1359
|
-
const
|
|
1360
|
-
return this.format(Mt(t, c,
|
|
1359
|
+
const b = h.split(this.formatSeparator), _ = b.shift().trim(), N = b.join(this.formatSeparator).trim();
|
|
1360
|
+
return this.format(Mt(t, c, _, this.options.keySeparator, this.options.ignoreJSONStructure), N, n, {
|
|
1361
1361
|
...r,
|
|
1362
1362
|
...t,
|
|
1363
|
-
interpolationkey:
|
|
1363
|
+
interpolationkey: _
|
|
1364
1364
|
});
|
|
1365
1365
|
};
|
|
1366
1366
|
this.resetRegExp();
|
|
1367
|
-
const p = r && r.missingInterpolationHandler || this.options.missingInterpolationHandler,
|
|
1367
|
+
const p = r && r.missingInterpolationHandler || this.options.missingInterpolationHandler, g = r && r.interpolation && r.interpolation.skipOnVariables !== void 0 ? r.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;
|
|
1368
1368
|
return [{
|
|
1369
1369
|
regex: this.regexpUnescape,
|
|
1370
|
-
safeValue: (
|
|
1370
|
+
safeValue: (h) => Va(h)
|
|
1371
1371
|
}, {
|
|
1372
1372
|
regex: this.regexp,
|
|
1373
|
-
safeValue: (
|
|
1374
|
-
}].forEach((
|
|
1375
|
-
for (l = 0; s =
|
|
1376
|
-
const
|
|
1377
|
-
if (i = d(
|
|
1373
|
+
safeValue: (h) => this.escapeValue ? Va(this.escape(h)) : Va(h)
|
|
1374
|
+
}].forEach((h) => {
|
|
1375
|
+
for (l = 0; s = h.regex.exec(e); ) {
|
|
1376
|
+
const b = s[1].trim();
|
|
1377
|
+
if (i = d(b), i === void 0)
|
|
1378
1378
|
if (typeof p == "function") {
|
|
1379
|
-
const
|
|
1380
|
-
i =
|
|
1381
|
-
} else if (r && Object.prototype.hasOwnProperty.call(r,
|
|
1379
|
+
const N = p(e, s, r);
|
|
1380
|
+
i = V(N) ? N : "";
|
|
1381
|
+
} else if (r && Object.prototype.hasOwnProperty.call(r, b))
|
|
1382
1382
|
i = "";
|
|
1383
|
-
else if (
|
|
1383
|
+
else if (g) {
|
|
1384
1384
|
i = s[0];
|
|
1385
1385
|
continue;
|
|
1386
1386
|
} else
|
|
1387
|
-
this.logger.warn(`missed to pass in variable ${
|
|
1388
|
-
else !
|
|
1389
|
-
const
|
|
1390
|
-
if (e = e.replace(s[0],
|
|
1387
|
+
this.logger.warn(`missed to pass in variable ${b} for interpolating ${e}`), i = "";
|
|
1388
|
+
else !V(i) && !this.useRawValueToEscape && (i = Dt(i));
|
|
1389
|
+
const _ = h.safeValue(i);
|
|
1390
|
+
if (e = e.replace(s[0], _), g ? (h.regex.lastIndex += i.length, h.regex.lastIndex -= s[0].length) : h.regex.lastIndex = 0, l++, l >= this.maxReplaces)
|
|
1391
1391
|
break;
|
|
1392
1392
|
}
|
|
1393
1393
|
}), e;
|
|
@@ -1397,18 +1397,18 @@ class ls {
|
|
|
1397
1397
|
const l = (c, d) => {
|
|
1398
1398
|
const p = this.nestingOptionsSeparator;
|
|
1399
1399
|
if (c.indexOf(p) < 0) return c;
|
|
1400
|
-
const
|
|
1401
|
-
let
|
|
1402
|
-
c =
|
|
1403
|
-
const
|
|
1404
|
-
(
|
|
1400
|
+
const g = c.split(new RegExp(`${p}[ ]*{`));
|
|
1401
|
+
let m = `{${g[1]}`;
|
|
1402
|
+
c = g[0], m = this.interpolate(m, i);
|
|
1403
|
+
const h = m.match(/'/g), b = m.match(/"/g);
|
|
1404
|
+
(h && h.length % 2 === 0 && !b || b.length % 2 !== 0) && (m = m.replace(/'/g, '"'));
|
|
1405
1405
|
try {
|
|
1406
|
-
i = JSON.parse(
|
|
1406
|
+
i = JSON.parse(m), d && (i = {
|
|
1407
1407
|
...d,
|
|
1408
1408
|
...i
|
|
1409
1409
|
});
|
|
1410
|
-
} catch (
|
|
1411
|
-
return this.logger.warn(`failed parsing options string in nesting for key ${c}`,
|
|
1410
|
+
} catch (_) {
|
|
1411
|
+
return this.logger.warn(`failed parsing options string in nesting for key ${c}`, _), `${c}${p}${m}`;
|
|
1412
1412
|
}
|
|
1413
1413
|
return i.defaultValue && i.defaultValue.indexOf(this.prefix) > -1 && delete i.defaultValue, c;
|
|
1414
1414
|
};
|
|
@@ -1416,14 +1416,14 @@ class ls {
|
|
|
1416
1416
|
let c = [];
|
|
1417
1417
|
i = {
|
|
1418
1418
|
...n
|
|
1419
|
-
}, i = i.replace && !
|
|
1419
|
+
}, i = i.replace && !V(i.replace) ? i.replace : i, i.applyPostProcessor = !1, delete i.defaultValue;
|
|
1420
1420
|
let d = !1;
|
|
1421
1421
|
if (r[0].indexOf(this.formatSeparator) !== -1 && !/{.*}/.test(r[1])) {
|
|
1422
|
-
const p = r[1].split(this.formatSeparator).map((
|
|
1422
|
+
const p = r[1].split(this.formatSeparator).map((g) => g.trim());
|
|
1423
1423
|
r[1] = p.shift(), c = p, d = !0;
|
|
1424
1424
|
}
|
|
1425
|
-
if (s = t(l.call(this, r[1].trim(), i), i), s && r[0] === e && !
|
|
1426
|
-
|
|
1425
|
+
if (s = t(l.call(this, r[1].trim(), i), i), s && r[0] === e && !V(s)) return s;
|
|
1426
|
+
V(s) || (s = Dt(s)), s || (this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`), s = ""), d && (s = c.reduce((p, g) => this.format(p, g, n.lng, {
|
|
1427
1427
|
...n,
|
|
1428
1428
|
interpolationkey: r[1].trim()
|
|
1429
1429
|
}), s.trim())), e = e.replace(r[0], s), this.regexp.lastIndex = 0;
|
|
@@ -1524,18 +1524,18 @@ class cs {
|
|
|
1524
1524
|
formatOptions: p
|
|
1525
1525
|
} = ds(c);
|
|
1526
1526
|
if (this.formats[d]) {
|
|
1527
|
-
let
|
|
1527
|
+
let g = l;
|
|
1528
1528
|
try {
|
|
1529
|
-
const
|
|
1530
|
-
|
|
1529
|
+
const m = r && r.formatParams && r.formatParams[r.interpolationkey] || {}, h = m.locale || m.lng || r.locale || r.lng || n;
|
|
1530
|
+
g = this.formats[d](l, h, {
|
|
1531
1531
|
...p,
|
|
1532
1532
|
...r,
|
|
1533
|
-
...
|
|
1533
|
+
...m
|
|
1534
1534
|
});
|
|
1535
|
-
} catch (
|
|
1536
|
-
this.logger.warn(
|
|
1535
|
+
} catch (m) {
|
|
1536
|
+
this.logger.warn(m);
|
|
1537
1537
|
}
|
|
1538
|
-
return
|
|
1538
|
+
return g;
|
|
1539
1539
|
} else
|
|
1540
1540
|
this.logger.warn(`there was no format function for ${d}`);
|
|
1541
1541
|
return l;
|
|
@@ -1554,9 +1554,9 @@ class ps extends Ra {
|
|
|
1554
1554
|
const s = {}, i = {}, l = {}, c = {};
|
|
1555
1555
|
return e.forEach((d) => {
|
|
1556
1556
|
let p = !0;
|
|
1557
|
-
t.forEach((
|
|
1558
|
-
const
|
|
1559
|
-
!n.reload && this.store.hasResourceBundle(d,
|
|
1557
|
+
t.forEach((g) => {
|
|
1558
|
+
const m = `${d}|${g}`;
|
|
1559
|
+
!n.reload && this.store.hasResourceBundle(d, g) ? this.state[m] = 2 : this.state[m] < 0 || (this.state[m] === 1 ? i[m] === void 0 && (i[m] = !0) : (this.state[m] = 1, p = !1, i[m] === void 0 && (i[m] = !0), s[m] === void 0 && (s[m] = !0), c[g] === void 0 && (c[g] = !0)));
|
|
1560
1560
|
}), p || (l[d] = !0);
|
|
1561
1561
|
}), (Object.keys(s).length || Object.keys(i).length) && this.queue.push({
|
|
1562
1562
|
pending: i,
|
|
@@ -1581,8 +1581,8 @@ class ps extends Ra {
|
|
|
1581
1581
|
Kr(c.loaded, [s], i), us(c, e), t && c.errors.push(t), c.pendingCount === 0 && !c.done && (Object.keys(c.loaded).forEach((d) => {
|
|
1582
1582
|
l[d] || (l[d] = {});
|
|
1583
1583
|
const p = c.loaded[d];
|
|
1584
|
-
p.length && p.forEach((
|
|
1585
|
-
l[d][
|
|
1584
|
+
p.length && p.forEach((g) => {
|
|
1585
|
+
l[d][g] === void 0 && (l[d][g] = !0);
|
|
1586
1586
|
});
|
|
1587
1587
|
}), c.done = !0, c.errors.length ? c.callback(c.errors) : c.callback());
|
|
1588
1588
|
}), this.emit("loaded", l), this.queue = this.queue.filter((c) => !c.done);
|
|
@@ -1604,8 +1604,8 @@ class ps extends Ra {
|
|
|
1604
1604
|
this.readingCalls++;
|
|
1605
1605
|
const l = (d, p) => {
|
|
1606
1606
|
if (this.readingCalls--, this.waitingReads.length > 0) {
|
|
1607
|
-
const
|
|
1608
|
-
this.read(
|
|
1607
|
+
const g = this.waitingReads.shift();
|
|
1608
|
+
this.read(g.lng, g.ns, g.fcName, g.tried, g.wait, g.callback);
|
|
1609
1609
|
}
|
|
1610
1610
|
if (d && p && r < this.maxRetries) {
|
|
1611
1611
|
setTimeout(() => {
|
|
@@ -1630,7 +1630,7 @@ class ps extends Ra {
|
|
|
1630
1630
|
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = arguments.length > 3 ? arguments[3] : void 0;
|
|
1631
1631
|
if (!this.backend)
|
|
1632
1632
|
return this.logger.warn("No backend was added via i18next.use. Will not load resources."), r && r();
|
|
1633
|
-
|
|
1633
|
+
V(e) && (e = this.languageUtils.toResolveHierarchy(e)), V(t) && (t = [t]);
|
|
1634
1634
|
const s = this.queueLoad(e, t, n, r);
|
|
1635
1635
|
if (!s.toLoad.length)
|
|
1636
1636
|
return s.pending.length || r(), null;
|
|
@@ -1669,7 +1669,7 @@ class ps extends Ra {
|
|
|
1669
1669
|
if (d.length < 6)
|
|
1670
1670
|
try {
|
|
1671
1671
|
let p;
|
|
1672
|
-
d.length === 5 ? p = d(e, t, n, r, c) : p = d(e, t, n, r), p && typeof p.then == "function" ? p.then((
|
|
1672
|
+
d.length === 5 ? p = d(e, t, n, r, c) : p = d(e, t, n, r), p && typeof p.then == "function" ? p.then((g) => l(null, g)).catch(l) : l(null, p);
|
|
1673
1673
|
} catch (p) {
|
|
1674
1674
|
l(p);
|
|
1675
1675
|
}
|
|
@@ -1715,7 +1715,7 @@ const zt = () => ({
|
|
|
1715
1715
|
appendNamespaceToCIMode: !1,
|
|
1716
1716
|
overloadTranslationOptionHandler: (a) => {
|
|
1717
1717
|
let e = {};
|
|
1718
|
-
if (typeof a[1] == "object" && (e = a[1]),
|
|
1718
|
+
if (typeof a[1] == "object" && (e = a[1]), V(a[1]) && (e.defaultValue = a[1]), V(a[2]) && (e.tDescription = a[2]), typeof a[2] == "object" || typeof a[3] == "object") {
|
|
1719
1719
|
const t = a[3] || a[2];
|
|
1720
1720
|
Object.keys(t).forEach((n) => {
|
|
1721
1721
|
e[n] = t[n];
|
|
@@ -1736,7 +1736,7 @@ const zt = () => ({
|
|
|
1736
1736
|
maxReplaces: 1e3,
|
|
1737
1737
|
skipOnVariables: !0
|
|
1738
1738
|
}
|
|
1739
|
-
}), Ot = (a) => (
|
|
1739
|
+
}), Ot = (a) => (V(a.ns) && (a.ns = [a.ns]), V(a.fallbackLng) && (a.fallbackLng = [a.fallbackLng]), V(a.fallbackNS) && (a.fallbackNS = [a.fallbackNS]), a.supportedLngs && a.supportedLngs.indexOf("cimode") < 0 && (a.supportedLngs = a.supportedLngs.concat(["cimode"])), a), ya = () => {
|
|
1740
1740
|
}, ms = (a) => {
|
|
1741
1741
|
Object.getOwnPropertyNames(Object.getPrototypeOf(a)).forEach((t) => {
|
|
1742
1742
|
typeof a[t] == "function" && (a[t] = a[t].bind(a));
|
|
@@ -1758,7 +1758,7 @@ class ha extends Ra {
|
|
|
1758
1758
|
init() {
|
|
1759
1759
|
var e = this;
|
|
1760
1760
|
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = arguments.length > 1 ? arguments[1] : void 0;
|
|
1761
|
-
this.isInitializing = !0, typeof t == "function" && (n = t, t = {}), !t.defaultNS && t.defaultNS !== !1 && t.ns && (
|
|
1761
|
+
this.isInitializing = !0, typeof t == "function" && (n = t, t = {}), !t.defaultNS && t.defaultNS !== !1 && t.ns && (V(t.ns) ? t.defaultNS = t.ns : t.ns.indexOf("translation") < 0 && (t.defaultNS = t.ns[0]));
|
|
1762
1762
|
const r = zt();
|
|
1763
1763
|
this.options = {
|
|
1764
1764
|
...r,
|
|
@@ -1773,25 +1773,25 @@ class ha extends Ra {
|
|
|
1773
1773
|
this.modules.logger ? Ee.init(s(this.modules.logger), this.options) : Ee.init(null, this.options);
|
|
1774
1774
|
let p;
|
|
1775
1775
|
this.modules.formatter ? p = this.modules.formatter : typeof Intl < "u" && (p = cs);
|
|
1776
|
-
const
|
|
1776
|
+
const g = new Rt(this.options);
|
|
1777
1777
|
this.store = new It(this.options.resources, this.options);
|
|
1778
|
-
const
|
|
1779
|
-
|
|
1778
|
+
const m = this.services;
|
|
1779
|
+
m.logger = Ee, m.resourceStore = this.store, m.languageUtils = g, m.pluralResolver = new is(g, {
|
|
1780
1780
|
prepend: this.options.pluralSeparator,
|
|
1781
1781
|
compatibilityJSON: this.options.compatibilityJSON,
|
|
1782
1782
|
simplifyPluralSuffix: this.options.simplifyPluralSuffix
|
|
1783
|
-
}), p && (!this.options.interpolation.format || this.options.interpolation.format === r.interpolation.format) && (
|
|
1783
|
+
}), p && (!this.options.interpolation.format || this.options.interpolation.format === r.interpolation.format) && (m.formatter = s(p), m.formatter.init(m, this.options), this.options.interpolation.format = m.formatter.format.bind(m.formatter)), m.interpolator = new ls(this.options), m.utils = {
|
|
1784
1784
|
hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
|
|
1785
|
-
},
|
|
1786
|
-
for (var
|
|
1787
|
-
N
|
|
1788
|
-
e.emit(
|
|
1789
|
-
}), this.modules.languageDetector && (
|
|
1790
|
-
for (var
|
|
1791
|
-
N
|
|
1792
|
-
e.emit(
|
|
1793
|
-
}), this.modules.external.forEach((
|
|
1794
|
-
|
|
1785
|
+
}, m.backendConnector = new ps(s(this.modules.backend), m.resourceStore, m, this.options), m.backendConnector.on("*", function(h) {
|
|
1786
|
+
for (var b = arguments.length, _ = new Array(b > 1 ? b - 1 : 0), N = 1; N < b; N++)
|
|
1787
|
+
_[N - 1] = arguments[N];
|
|
1788
|
+
e.emit(h, ..._);
|
|
1789
|
+
}), this.modules.languageDetector && (m.languageDetector = s(this.modules.languageDetector), m.languageDetector.init && m.languageDetector.init(m, this.options.detection, this.options)), this.modules.i18nFormat && (m.i18nFormat = s(this.modules.i18nFormat), m.i18nFormat.init && m.i18nFormat.init(this)), this.translator = new Fa(this.services, this.options), this.translator.on("*", function(h) {
|
|
1790
|
+
for (var b = arguments.length, _ = new Array(b > 1 ? b - 1 : 0), N = 1; N < b; N++)
|
|
1791
|
+
_[N - 1] = arguments[N];
|
|
1792
|
+
e.emit(h, ..._);
|
|
1793
|
+
}), this.modules.external.forEach((h) => {
|
|
1794
|
+
h.init && h.init(this);
|
|
1795
1795
|
});
|
|
1796
1796
|
}
|
|
1797
1797
|
if (this.format = this.options.interpolation.format, n || (n = ya), this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
|
|
@@ -1808,8 +1808,8 @@ class ha extends Ra {
|
|
|
1808
1808
|
};
|
|
1809
1809
|
});
|
|
1810
1810
|
const c = ua(), d = () => {
|
|
1811
|
-
const p = (
|
|
1812
|
-
this.isInitializing = !1, this.isInitialized && !this.initializedStoreOnce && this.logger.warn("init: i18next is already initialized. You should call init just once!"), this.isInitialized = !0, this.options.isClone || this.logger.log("initialized", this.options), this.emit("initialized", this.options), c.resolve(
|
|
1811
|
+
const p = (g, m) => {
|
|
1812
|
+
this.isInitializing = !1, this.isInitialized && !this.initializedStoreOnce && this.logger.warn("init: i18next is already initialized. You should call init just once!"), this.isInitialized = !0, this.options.isClone || this.logger.log("initialized", this.options), this.emit("initialized", this.options), c.resolve(m), n(g, m);
|
|
1813
1813
|
};
|
|
1814
1814
|
if (this.languages && this.options.compatibilityAPI !== "v1" && !this.isInitialized) return p(null, this.t.bind(this));
|
|
1815
1815
|
this.changeLanguage(this.options.lng, p);
|
|
@@ -1818,7 +1818,7 @@ class ha extends Ra {
|
|
|
1818
1818
|
}
|
|
1819
1819
|
loadResources(e) {
|
|
1820
1820
|
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ya;
|
|
1821
|
-
const r =
|
|
1821
|
+
const r = V(e) ? e : this.language;
|
|
1822
1822
|
if (typeof e == "function" && (n = e), !this.options.resources || this.options.partialBundledLanguages) {
|
|
1823
1823
|
if (r && r.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return n();
|
|
1824
1824
|
const s = [], i = (l) => {
|
|
@@ -1869,7 +1869,7 @@ class ha extends Ra {
|
|
|
1869
1869
|
});
|
|
1870
1870
|
}, l = (c) => {
|
|
1871
1871
|
!e && !c && this.services.languageDetector && (c = []);
|
|
1872
|
-
const d =
|
|
1872
|
+
const d = V(c) ? c : this.services.languageUtils.getBestMatchFromCodes(c);
|
|
1873
1873
|
d && (this.language || s(d), this.translator.language || this.translator.changeLanguage(d), this.services.languageDetector && this.services.languageDetector.cacheUserLanguage && this.services.languageDetector.cacheUserLanguage(d)), this.loadResources(d, (p) => {
|
|
1874
1874
|
i(p, d);
|
|
1875
1875
|
});
|
|
@@ -1881,19 +1881,19 @@ class ha extends Ra {
|
|
|
1881
1881
|
const s = function(i, l) {
|
|
1882
1882
|
let c;
|
|
1883
1883
|
if (typeof l != "object") {
|
|
1884
|
-
for (var d = arguments.length, p = new Array(d > 2 ? d - 2 : 0),
|
|
1885
|
-
p[
|
|
1884
|
+
for (var d = arguments.length, p = new Array(d > 2 ? d - 2 : 0), g = 2; g < d; g++)
|
|
1885
|
+
p[g - 2] = arguments[g];
|
|
1886
1886
|
c = r.options.overloadTranslationOptionHandler([i, l].concat(p));
|
|
1887
1887
|
} else
|
|
1888
1888
|
c = {
|
|
1889
1889
|
...l
|
|
1890
1890
|
};
|
|
1891
1891
|
c.lng = c.lng || s.lng, c.lngs = c.lngs || s.lngs, c.ns = c.ns || s.ns, c.keyPrefix !== "" && (c.keyPrefix = c.keyPrefix || n || s.keyPrefix);
|
|
1892
|
-
const
|
|
1893
|
-
let
|
|
1894
|
-
return c.keyPrefix && Array.isArray(i) ?
|
|
1892
|
+
const m = r.options.keySeparator || ".";
|
|
1893
|
+
let h;
|
|
1894
|
+
return c.keyPrefix && Array.isArray(i) ? h = i.map((b) => `${c.keyPrefix}${m}${b}`) : h = c.keyPrefix ? `${c.keyPrefix}${m}${i}` : i, r.t(h, c);
|
|
1895
1895
|
};
|
|
1896
|
-
return
|
|
1896
|
+
return V(e) ? s.lng = e : s.lngs = e, s.ns = t, s.keyPrefix = n, s;
|
|
1897
1897
|
}
|
|
1898
1898
|
t() {
|
|
1899
1899
|
return this.translator && this.translator.translate(...arguments);
|
|
@@ -1924,7 +1924,7 @@ class ha extends Ra {
|
|
|
1924
1924
|
}
|
|
1925
1925
|
loadNamespaces(e, t) {
|
|
1926
1926
|
const n = ua();
|
|
1927
|
-
return this.options.ns ? (
|
|
1927
|
+
return this.options.ns ? (V(e) && (e = [e]), e.forEach((r) => {
|
|
1928
1928
|
this.options.ns.indexOf(r) < 0 && this.options.ns.push(r);
|
|
1929
1929
|
}), this.loadResources((r) => {
|
|
1930
1930
|
n.resolve(), t && t(r);
|
|
@@ -1932,7 +1932,7 @@ class ha extends Ra {
|
|
|
1932
1932
|
}
|
|
1933
1933
|
loadLanguages(e, t) {
|
|
1934
1934
|
const n = ua();
|
|
1935
|
-
|
|
1935
|
+
V(e) && (e = [e]);
|
|
1936
1936
|
const r = this.options.preload || [], s = e.filter((i) => r.indexOf(i) < 0 && this.services.languageUtils.isSupportedCode(i));
|
|
1937
1937
|
return s.length ? (this.options.preload = r.concat(s), this.loadResources((i) => {
|
|
1938
1938
|
n.resolve(), t && t(i);
|
|
@@ -3266,19 +3266,19 @@ const vi = ({
|
|
|
3266
3266
|
featureLabels: c,
|
|
3267
3267
|
billingVersion: d,
|
|
3268
3268
|
workspaceId: p,
|
|
3269
|
-
persist:
|
|
3270
|
-
manageBillingUrl:
|
|
3271
|
-
onBillingChange:
|
|
3272
|
-
refreshInterval:
|
|
3273
|
-
children:
|
|
3269
|
+
persist: g = !0,
|
|
3270
|
+
manageBillingUrl: m,
|
|
3271
|
+
onBillingChange: h,
|
|
3272
|
+
refreshInterval: b = 3e4,
|
|
3273
|
+
children: _
|
|
3274
3274
|
}) => {
|
|
3275
|
-
const
|
|
3275
|
+
const N = p || "default", [v] = H(
|
|
3276
3276
|
() => new ur({ defaultOptions: { queries: { retry: 1, staleTime: 3e4, gcTime: 1e3 * 60 * 60 } } })
|
|
3277
3277
|
), y = Cs(r), k = ke(() => vr(e), [e]);
|
|
3278
3278
|
we(() => {
|
|
3279
|
-
if (!
|
|
3279
|
+
if (!g || typeof window > "u")
|
|
3280
3280
|
return;
|
|
3281
|
-
const f = `bpb-cache:${
|
|
3281
|
+
const f = `bpb-cache:${N}`;
|
|
3282
3282
|
try {
|
|
3283
3283
|
const D = window.localStorage.getItem(f);
|
|
3284
3284
|
D && pr(v, JSON.parse(D));
|
|
@@ -3286,7 +3286,7 @@ const vi = ({
|
|
|
3286
3286
|
window.localStorage.removeItem(f);
|
|
3287
3287
|
}
|
|
3288
3288
|
let T = null;
|
|
3289
|
-
const
|
|
3289
|
+
const I = v.getQueryCache().subscribe((D) => {
|
|
3290
3290
|
D.type !== "added" && D.type !== "removed" && D.type !== "updated" || (T && clearTimeout(T), T = setTimeout(() => {
|
|
3291
3291
|
try {
|
|
3292
3292
|
window.localStorage.setItem(f, JSON.stringify(mr(v)));
|
|
@@ -3295,16 +3295,16 @@ const vi = ({
|
|
|
3295
3295
|
}, 250));
|
|
3296
3296
|
});
|
|
3297
3297
|
return () => {
|
|
3298
|
-
T && clearTimeout(T),
|
|
3298
|
+
T && clearTimeout(T), I();
|
|
3299
3299
|
};
|
|
3300
|
-
}, [
|
|
3301
|
-
const x = ka(() => v.invalidateQueries({ queryKey: ["bpb",
|
|
3300
|
+
}, [g, N, v]);
|
|
3301
|
+
const x = ka(() => v.invalidateQueries({ queryKey: ["bpb", N] }), [v, N]), S = ka((f) => h == null ? void 0 : h(f), [h]), w = b > 0 ? b : !1;
|
|
3302
3302
|
Ha.changeLanguage(n);
|
|
3303
3303
|
const A = ke(
|
|
3304
3304
|
() => ({
|
|
3305
3305
|
client: a,
|
|
3306
3306
|
queryClient: v,
|
|
3307
|
-
scope:
|
|
3307
|
+
scope: N,
|
|
3308
3308
|
stripePromise: k,
|
|
3309
3309
|
email: t,
|
|
3310
3310
|
locale: n,
|
|
@@ -3315,15 +3315,15 @@ const vi = ({
|
|
|
3315
3315
|
analytics: l ?? vs,
|
|
3316
3316
|
featureLabels: c,
|
|
3317
3317
|
isOutdatedBilling: d !== void 0 && d !== "v4",
|
|
3318
|
-
manageBillingUrl:
|
|
3319
|
-
refetchInterval:
|
|
3318
|
+
manageBillingUrl: m,
|
|
3319
|
+
refetchInterval: w,
|
|
3320
3320
|
refresh: x,
|
|
3321
|
-
notifyBillingChange:
|
|
3321
|
+
notifyBillingChange: S
|
|
3322
3322
|
}),
|
|
3323
3323
|
[
|
|
3324
3324
|
a,
|
|
3325
3325
|
v,
|
|
3326
|
-
|
|
3326
|
+
N,
|
|
3327
3327
|
k,
|
|
3328
3328
|
t,
|
|
3329
3329
|
n,
|
|
@@ -3333,10 +3333,10 @@ const vi = ({
|
|
|
3333
3333
|
l,
|
|
3334
3334
|
c,
|
|
3335
3335
|
d,
|
|
3336
|
-
|
|
3337
|
-
|
|
3336
|
+
m,
|
|
3337
|
+
w,
|
|
3338
3338
|
x,
|
|
3339
|
-
|
|
3339
|
+
S
|
|
3340
3340
|
]
|
|
3341
3341
|
);
|
|
3342
3342
|
return /* @__PURE__ */ o(Ba.Provider, { value: A, children: /* @__PURE__ */ o(jr, { i18n: Ha, children: /* @__PURE__ */ o(
|
|
@@ -3346,7 +3346,7 @@ const vi = ({
|
|
|
3346
3346
|
"data-bpb-theme": y ? "dark" : "light",
|
|
3347
3347
|
"data-bpb-color-scheme": s,
|
|
3348
3348
|
style: { display: "contents" },
|
|
3349
|
-
children:
|
|
3349
|
+
children: _
|
|
3350
3350
|
}
|
|
3351
3351
|
) }) });
|
|
3352
3352
|
};
|
|
@@ -3507,11 +3507,11 @@ function ws(a, e) {
|
|
|
3507
3507
|
{
|
|
3508
3508
|
queryKey: me.usageByBot(r, a, p),
|
|
3509
3509
|
queryFn: async () => {
|
|
3510
|
-
const [
|
|
3510
|
+
const [g, m] = await Promise.all([
|
|
3511
3511
|
i({ id: r, type: a, period: `${p}-01T00:00:00.000Z` }),
|
|
3512
3512
|
l({})
|
|
3513
|
-
]),
|
|
3514
|
-
return
|
|
3513
|
+
]), h = new Map(m.bots.map((b) => [b.id, b.name]));
|
|
3514
|
+
return g.data.map((b) => ({ botId: b.botId, name: h.get(b.botId) ?? b.botId, value: b.value })).sort((b, _) => _.value - b.value);
|
|
3515
3515
|
},
|
|
3516
3516
|
enabled: c && ((e == null ? void 0 : e.enabled) ?? !0),
|
|
3517
3517
|
refetchInterval: s
|
|
@@ -3762,31 +3762,31 @@ const Ts = (a, e) => {
|
|
|
3762
3762
|
const s = [];
|
|
3763
3763
|
let i = 0, l = 0, c = 0, d;
|
|
3764
3764
|
const p = r.length;
|
|
3765
|
-
for (let
|
|
3766
|
-
const
|
|
3765
|
+
for (let _ = 0; _ < p; _++) {
|
|
3766
|
+
const N = r[_];
|
|
3767
3767
|
if (i === 0 && l === 0) {
|
|
3768
|
-
if (
|
|
3769
|
-
s.push(r.slice(c,
|
|
3768
|
+
if (N === qt) {
|
|
3769
|
+
s.push(r.slice(c, _)), c = _ + 1;
|
|
3770
3770
|
continue;
|
|
3771
3771
|
}
|
|
3772
|
-
if (
|
|
3773
|
-
d =
|
|
3772
|
+
if (N === "/") {
|
|
3773
|
+
d = _;
|
|
3774
3774
|
continue;
|
|
3775
3775
|
}
|
|
3776
3776
|
}
|
|
3777
|
-
|
|
3777
|
+
N === "[" ? i++ : N === "]" ? i-- : N === "(" ? l++ : N === ")" && l--;
|
|
3778
3778
|
}
|
|
3779
|
-
const
|
|
3780
|
-
let
|
|
3781
|
-
|
|
3779
|
+
const g = s.length === 0 ? r : r.slice(c);
|
|
3780
|
+
let m = g, h = !1;
|
|
3781
|
+
g.endsWith(Ya) ? (m = g.slice(0, -1), h = !0) : (
|
|
3782
3782
|
/**
|
|
3783
3783
|
* In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons.
|
|
3784
3784
|
* @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864
|
|
3785
3785
|
*/
|
|
3786
|
-
|
|
3786
|
+
g.startsWith(Ya) && (m = g.slice(1), h = !0)
|
|
3787
3787
|
);
|
|
3788
|
-
const
|
|
3789
|
-
return $t(s,
|
|
3788
|
+
const b = d && d > c ? d - c : void 0;
|
|
3789
|
+
return $t(s, h, m, b);
|
|
3790
3790
|
};
|
|
3791
3791
|
if (e) {
|
|
3792
3792
|
const r = e + qt, s = n;
|
|
@@ -3835,46 +3835,46 @@ const Ts = (a, e) => {
|
|
|
3835
3835
|
} = e, l = [], c = a.trim().split(Gs);
|
|
3836
3836
|
let d = "";
|
|
3837
3837
|
for (let p = c.length - 1; p >= 0; p -= 1) {
|
|
3838
|
-
const
|
|
3839
|
-
isExternal:
|
|
3840
|
-
modifiers:
|
|
3841
|
-
hasImportantModifier:
|
|
3842
|
-
baseClassName:
|
|
3843
|
-
maybePostfixModifierPosition:
|
|
3844
|
-
} = t(
|
|
3845
|
-
if (
|
|
3846
|
-
d =
|
|
3838
|
+
const g = c[p], {
|
|
3839
|
+
isExternal: m,
|
|
3840
|
+
modifiers: h,
|
|
3841
|
+
hasImportantModifier: b,
|
|
3842
|
+
baseClassName: _,
|
|
3843
|
+
maybePostfixModifierPosition: N
|
|
3844
|
+
} = t(g);
|
|
3845
|
+
if (m) {
|
|
3846
|
+
d = g + (d.length > 0 ? " " + d : d);
|
|
3847
3847
|
continue;
|
|
3848
3848
|
}
|
|
3849
|
-
let v = !!
|
|
3849
|
+
let v = !!N, y;
|
|
3850
3850
|
if (v) {
|
|
3851
|
-
const A =
|
|
3851
|
+
const A = _.substring(0, N);
|
|
3852
3852
|
y = n(A);
|
|
3853
|
-
const f = y && i[y] ? n(
|
|
3853
|
+
const f = y && i[y] ? n(_) : void 0;
|
|
3854
3854
|
f && f !== y && (y = f, v = !1);
|
|
3855
3855
|
} else
|
|
3856
|
-
y = n(
|
|
3856
|
+
y = n(_);
|
|
3857
3857
|
if (!y) {
|
|
3858
3858
|
if (!v) {
|
|
3859
|
-
d =
|
|
3859
|
+
d = g + (d.length > 0 ? " " + d : d);
|
|
3860
3860
|
continue;
|
|
3861
3861
|
}
|
|
3862
|
-
if (y = n(
|
|
3863
|
-
d =
|
|
3862
|
+
if (y = n(_), !y) {
|
|
3863
|
+
d = g + (d.length > 0 ? " " + d : d);
|
|
3864
3864
|
continue;
|
|
3865
3865
|
}
|
|
3866
3866
|
v = !1;
|
|
3867
3867
|
}
|
|
3868
|
-
const k =
|
|
3869
|
-
if (l.indexOf(
|
|
3868
|
+
const k = h.length === 0 ? "" : h.length === 1 ? h[0] : s(h).join(":"), x = b ? k + Ya : k, S = x + y;
|
|
3869
|
+
if (l.indexOf(S) > -1)
|
|
3870
3870
|
continue;
|
|
3871
|
-
l.push(
|
|
3872
|
-
const
|
|
3873
|
-
for (let A = 0; A <
|
|
3874
|
-
const f =
|
|
3871
|
+
l.push(S);
|
|
3872
|
+
const w = r(y, v);
|
|
3873
|
+
for (let A = 0; A < w.length; ++A) {
|
|
3874
|
+
const f = w[A];
|
|
3875
3875
|
l.push(x + f);
|
|
3876
3876
|
}
|
|
3877
|
-
d =
|
|
3877
|
+
d = g + (d.length > 0 ? " " + d : d);
|
|
3878
3878
|
}
|
|
3879
3879
|
return d;
|
|
3880
3880
|
}, Hs = (...a) => {
|
|
@@ -3892,7 +3892,7 @@ const Ts = (a, e) => {
|
|
|
3892
3892
|
}, Ys = (a, ...e) => {
|
|
3893
3893
|
let t, n, r, s;
|
|
3894
3894
|
const i = (c) => {
|
|
3895
|
-
const d = e.reduce((p,
|
|
3895
|
+
const d = e.reduce((p, g) => g(p), a());
|
|
3896
3896
|
return t = js(d), n = t.cache.get, r = t.cache.set, s = l, l(c);
|
|
3897
3897
|
}, l = (c) => {
|
|
3898
3898
|
const d = n(c);
|
|
@@ -3910,14 +3910,14 @@ const Ts = (a, e) => {
|
|
|
3910
3910
|
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
3911
3911
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
3912
3912
|
Xs.test(a) && !eo.test(a)
|
|
3913
|
-
), tt = () => !1, ro = (a) => ao.test(a), so = (a) => to.test(a), oo = (a) => !F(a) && !
|
|
3913
|
+
), tt = () => !1, ro = (a) => ao.test(a), so = (a) => to.test(a), oo = (a) => !F(a) && !L(a), io = (a) => a.startsWith("@container") && (a[10] === "/" && a[11] !== void 0 || a[11] === "s" && a[16] !== void 0 && a.startsWith("-size/", 10) || a[11] === "n" && a[18] !== void 0 && a.startsWith("-normal/", 10)), lo = (a) => je(a, In, tt), F = (a) => Tn.test(a), Ye = (a) => je(a, En, no), Vt = (a) => je(a, fo, W), co = (a) => je(a, Bn, Pn), uo = (a) => je(a, Rn, tt), jt = (a) => je(a, Fn, tt), po = (a) => je(a, Ln, so), va = (a) => je(a, Mn, ro), L = (a) => Dn.test(a), pa = (a) => Je(a, En), mo = (a) => Je(a, Rn), Wt = (a) => Je(a, Fn), go = (a) => Je(a, In), ho = (a) => Je(a, Ln), Ca = (a) => Je(a, Mn, !0), bo = (a) => Je(a, Bn, !0), je = (a, e, t) => {
|
|
3914
3914
|
const n = Tn.exec(a);
|
|
3915
3915
|
return n ? n[1] ? e(n[1]) : t(n[2]) : !1;
|
|
3916
3916
|
}, Je = (a, e, t = !1) => {
|
|
3917
3917
|
const n = Dn.exec(a);
|
|
3918
3918
|
return n ? n[1] ? e(n[1]) : t : !1;
|
|
3919
3919
|
}, Fn = (a) => a === "position" || a === "percentage", Ln = (a) => a === "image" || a === "url", In = (a) => a === "length" || a === "size" || a === "bg-size", En = (a) => a === "length", fo = (a) => a === "number", Rn = (a) => a === "family-name", Bn = (a) => a === "number" || a === "weight", Mn = (a) => a === "shadow", yo = () => {
|
|
3920
|
-
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"), c = he("spacing"), d = he("radius"), p = he("shadow"),
|
|
3920
|
+
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"), c = he("spacing"), d = he("radius"), p = he("shadow"), g = he("inset-shadow"), m = he("text-shadow"), h = he("drop-shadow"), b = he("blur"), _ = he("perspective"), N = he("aspect"), v = he("ease"), y = he("animate"), k = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], x = () => [
|
|
3921
3921
|
"center",
|
|
3922
3922
|
"top",
|
|
3923
3923
|
"bottom",
|
|
@@ -3935,30 +3935,30 @@ const Ts = (a, e) => {
|
|
|
3935
3935
|
"bottom-left",
|
|
3936
3936
|
// Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
|
|
3937
3937
|
"left-bottom"
|
|
3938
|
-
],
|
|
3939
|
-
span: ["full", Ie,
|
|
3940
|
-
}, Ie,
|
|
3941
|
-
position: [
|
|
3938
|
+
], S = () => [...x(), L, F], w = () => ["auto", "hidden", "clip", "visible", "scroll"], A = () => ["auto", "contain", "none"], f = () => [L, F, c], T = () => [qe, "full", "auto", ...f()], I = () => [Ie, "none", "subgrid", L, F], D = () => ["auto", {
|
|
3939
|
+
span: ["full", Ie, L, F]
|
|
3940
|
+
}, Ie, L, F], q = () => [Ie, "auto", L, F], R = () => ["auto", "min", "max", "fr", L, F], j = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], E = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], B = () => ["auto", ...f()], $ = () => [qe, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...f()], K = () => [qe, "screen", "full", "dvw", "lvw", "svw", "min", "max", "fit", ...f()], z = () => [qe, "screen", "full", "lh", "dvh", "lvh", "svh", "min", "max", "fit", ...f()], C = () => [a, L, F], ee = () => [...x(), Wt, jt, {
|
|
3941
|
+
position: [L, F]
|
|
3942
3942
|
}], ae = () => ["no-repeat", {
|
|
3943
3943
|
repeat: ["", "x", "y", "space", "round"]
|
|
3944
3944
|
}], ie = () => ["auto", "cover", "contain", go, lo, {
|
|
3945
|
-
size: [
|
|
3945
|
+
size: [L, F]
|
|
3946
3946
|
}], P = () => [ja, pa, Ye], O = () => [
|
|
3947
3947
|
// Deprecated since Tailwind CSS v4.0.0
|
|
3948
3948
|
"",
|
|
3949
3949
|
"none",
|
|
3950
3950
|
"full",
|
|
3951
3951
|
d,
|
|
3952
|
-
|
|
3952
|
+
L,
|
|
3953
3953
|
F
|
|
3954
3954
|
], M = () => ["", W, pa, Ye], Y = () => ["solid", "dashed", "dotted", "double"], ge = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], J = () => [W, ja, Wt, jt], le = () => [
|
|
3955
3955
|
// Deprecated since Tailwind CSS v4.0.0
|
|
3956
3956
|
"",
|
|
3957
3957
|
"none",
|
|
3958
|
-
|
|
3959
|
-
|
|
3958
|
+
b,
|
|
3959
|
+
L,
|
|
3960
3960
|
F
|
|
3961
|
-
], fe = () => ["none", W,
|
|
3961
|
+
], fe = () => ["none", W, L, F], de = () => ["none", W, L, F], Pe = () => [W, L, F], Ce = () => [qe, "full", ...f()];
|
|
3962
3962
|
return {
|
|
3963
3963
|
cacheSize: 500,
|
|
3964
3964
|
theme: {
|
|
@@ -3991,7 +3991,7 @@ const Ts = (a, e) => {
|
|
|
3991
3991
|
* @see https://tailwindcss.com/docs/aspect-ratio
|
|
3992
3992
|
*/
|
|
3993
3993
|
aspect: [{
|
|
3994
|
-
aspect: ["auto", "square", qe, F,
|
|
3994
|
+
aspect: ["auto", "square", qe, F, L, N]
|
|
3995
3995
|
}],
|
|
3996
3996
|
/**
|
|
3997
3997
|
* Container
|
|
@@ -4004,7 +4004,7 @@ const Ts = (a, e) => {
|
|
|
4004
4004
|
* @see https://tailwindcss.com/docs/responsive-design#container-queries
|
|
4005
4005
|
*/
|
|
4006
4006
|
"container-type": [{
|
|
4007
|
-
"@container": ["", "normal", "size",
|
|
4007
|
+
"@container": ["", "normal", "size", L, F]
|
|
4008
4008
|
}],
|
|
4009
4009
|
/**
|
|
4010
4010
|
* Container Name
|
|
@@ -4016,7 +4016,7 @@ const Ts = (a, e) => {
|
|
|
4016
4016
|
* @see https://tailwindcss.com/docs/columns
|
|
4017
4017
|
*/
|
|
4018
4018
|
columns: [{
|
|
4019
|
-
columns: [W, F,
|
|
4019
|
+
columns: [W, F, L, l]
|
|
4020
4020
|
}],
|
|
4021
4021
|
/**
|
|
4022
4022
|
* Break After
|
|
@@ -4094,28 +4094,28 @@ const Ts = (a, e) => {
|
|
|
4094
4094
|
* @see https://tailwindcss.com/docs/object-position
|
|
4095
4095
|
*/
|
|
4096
4096
|
"object-position": [{
|
|
4097
|
-
object:
|
|
4097
|
+
object: S()
|
|
4098
4098
|
}],
|
|
4099
4099
|
/**
|
|
4100
4100
|
* Overflow
|
|
4101
4101
|
* @see https://tailwindcss.com/docs/overflow
|
|
4102
4102
|
*/
|
|
4103
4103
|
overflow: [{
|
|
4104
|
-
overflow:
|
|
4104
|
+
overflow: w()
|
|
4105
4105
|
}],
|
|
4106
4106
|
/**
|
|
4107
4107
|
* Overflow X
|
|
4108
4108
|
* @see https://tailwindcss.com/docs/overflow
|
|
4109
4109
|
*/
|
|
4110
4110
|
"overflow-x": [{
|
|
4111
|
-
"overflow-x":
|
|
4111
|
+
"overflow-x": w()
|
|
4112
4112
|
}],
|
|
4113
4113
|
/**
|
|
4114
4114
|
* Overflow Y
|
|
4115
4115
|
* @see https://tailwindcss.com/docs/overflow
|
|
4116
4116
|
*/
|
|
4117
4117
|
"overflow-y": [{
|
|
4118
|
-
"overflow-y":
|
|
4118
|
+
"overflow-y": w()
|
|
4119
4119
|
}],
|
|
4120
4120
|
/**
|
|
4121
4121
|
* Overscroll Behavior
|
|
@@ -4242,7 +4242,7 @@ const Ts = (a, e) => {
|
|
|
4242
4242
|
* @see https://tailwindcss.com/docs/z-index
|
|
4243
4243
|
*/
|
|
4244
4244
|
z: [{
|
|
4245
|
-
z: [Ie, "auto",
|
|
4245
|
+
z: [Ie, "auto", L, F]
|
|
4246
4246
|
}],
|
|
4247
4247
|
// ------------------------
|
|
4248
4248
|
// --- Flexbox and Grid ---
|
|
@@ -4280,28 +4280,28 @@ const Ts = (a, e) => {
|
|
|
4280
4280
|
* @see https://tailwindcss.com/docs/flex-grow
|
|
4281
4281
|
*/
|
|
4282
4282
|
grow: [{
|
|
4283
|
-
grow: ["", W,
|
|
4283
|
+
grow: ["", W, L, F]
|
|
4284
4284
|
}],
|
|
4285
4285
|
/**
|
|
4286
4286
|
* Flex Shrink
|
|
4287
4287
|
* @see https://tailwindcss.com/docs/flex-shrink
|
|
4288
4288
|
*/
|
|
4289
4289
|
shrink: [{
|
|
4290
|
-
shrink: ["", W,
|
|
4290
|
+
shrink: ["", W, L, F]
|
|
4291
4291
|
}],
|
|
4292
4292
|
/**
|
|
4293
4293
|
* Order
|
|
4294
4294
|
* @see https://tailwindcss.com/docs/order
|
|
4295
4295
|
*/
|
|
4296
4296
|
order: [{
|
|
4297
|
-
order: [Ie, "first", "last", "none",
|
|
4297
|
+
order: [Ie, "first", "last", "none", L, F]
|
|
4298
4298
|
}],
|
|
4299
4299
|
/**
|
|
4300
4300
|
* Grid Template Columns
|
|
4301
4301
|
* @see https://tailwindcss.com/docs/grid-template-columns
|
|
4302
4302
|
*/
|
|
4303
4303
|
"grid-cols": [{
|
|
4304
|
-
"grid-cols":
|
|
4304
|
+
"grid-cols": I()
|
|
4305
4305
|
}],
|
|
4306
4306
|
/**
|
|
4307
4307
|
* Grid Column Start / End
|
|
@@ -4315,21 +4315,21 @@ const Ts = (a, e) => {
|
|
|
4315
4315
|
* @see https://tailwindcss.com/docs/grid-column
|
|
4316
4316
|
*/
|
|
4317
4317
|
"col-start": [{
|
|
4318
|
-
"col-start":
|
|
4318
|
+
"col-start": q()
|
|
4319
4319
|
}],
|
|
4320
4320
|
/**
|
|
4321
4321
|
* Grid Column End
|
|
4322
4322
|
* @see https://tailwindcss.com/docs/grid-column
|
|
4323
4323
|
*/
|
|
4324
4324
|
"col-end": [{
|
|
4325
|
-
"col-end":
|
|
4325
|
+
"col-end": q()
|
|
4326
4326
|
}],
|
|
4327
4327
|
/**
|
|
4328
4328
|
* Grid Template Rows
|
|
4329
4329
|
* @see https://tailwindcss.com/docs/grid-template-rows
|
|
4330
4330
|
*/
|
|
4331
4331
|
"grid-rows": [{
|
|
4332
|
-
"grid-rows":
|
|
4332
|
+
"grid-rows": I()
|
|
4333
4333
|
}],
|
|
4334
4334
|
/**
|
|
4335
4335
|
* Grid Row Start / End
|
|
@@ -4343,14 +4343,14 @@ const Ts = (a, e) => {
|
|
|
4343
4343
|
* @see https://tailwindcss.com/docs/grid-row
|
|
4344
4344
|
*/
|
|
4345
4345
|
"row-start": [{
|
|
4346
|
-
"row-start":
|
|
4346
|
+
"row-start": q()
|
|
4347
4347
|
}],
|
|
4348
4348
|
/**
|
|
4349
4349
|
* Grid Row End
|
|
4350
4350
|
* @see https://tailwindcss.com/docs/grid-row
|
|
4351
4351
|
*/
|
|
4352
4352
|
"row-end": [{
|
|
4353
|
-
"row-end":
|
|
4353
|
+
"row-end": q()
|
|
4354
4354
|
}],
|
|
4355
4355
|
/**
|
|
4356
4356
|
* Grid Auto Flow
|
|
@@ -4364,14 +4364,14 @@ const Ts = (a, e) => {
|
|
|
4364
4364
|
* @see https://tailwindcss.com/docs/grid-auto-columns
|
|
4365
4365
|
*/
|
|
4366
4366
|
"auto-cols": [{
|
|
4367
|
-
"auto-cols":
|
|
4367
|
+
"auto-cols": R()
|
|
4368
4368
|
}],
|
|
4369
4369
|
/**
|
|
4370
4370
|
* Grid Auto Rows
|
|
4371
4371
|
* @see https://tailwindcss.com/docs/grid-auto-rows
|
|
4372
4372
|
*/
|
|
4373
4373
|
"auto-rows": [{
|
|
4374
|
-
"auto-rows":
|
|
4374
|
+
"auto-rows": R()
|
|
4375
4375
|
}],
|
|
4376
4376
|
/**
|
|
4377
4377
|
* Gap
|
|
@@ -4399,35 +4399,35 @@ const Ts = (a, e) => {
|
|
|
4399
4399
|
* @see https://tailwindcss.com/docs/justify-content
|
|
4400
4400
|
*/
|
|
4401
4401
|
"justify-content": [{
|
|
4402
|
-
justify: [...
|
|
4402
|
+
justify: [...j(), "normal"]
|
|
4403
4403
|
}],
|
|
4404
4404
|
/**
|
|
4405
4405
|
* Justify Items
|
|
4406
4406
|
* @see https://tailwindcss.com/docs/justify-items
|
|
4407
4407
|
*/
|
|
4408
4408
|
"justify-items": [{
|
|
4409
|
-
"justify-items": [...
|
|
4409
|
+
"justify-items": [...E(), "normal"]
|
|
4410
4410
|
}],
|
|
4411
4411
|
/**
|
|
4412
4412
|
* Justify Self
|
|
4413
4413
|
* @see https://tailwindcss.com/docs/justify-self
|
|
4414
4414
|
*/
|
|
4415
4415
|
"justify-self": [{
|
|
4416
|
-
"justify-self": ["auto", ...
|
|
4416
|
+
"justify-self": ["auto", ...E()]
|
|
4417
4417
|
}],
|
|
4418
4418
|
/**
|
|
4419
4419
|
* Align Content
|
|
4420
4420
|
* @see https://tailwindcss.com/docs/align-content
|
|
4421
4421
|
*/
|
|
4422
4422
|
"align-content": [{
|
|
4423
|
-
content: ["normal", ...
|
|
4423
|
+
content: ["normal", ...j()]
|
|
4424
4424
|
}],
|
|
4425
4425
|
/**
|
|
4426
4426
|
* Align Items
|
|
4427
4427
|
* @see https://tailwindcss.com/docs/align-items
|
|
4428
4428
|
*/
|
|
4429
4429
|
"align-items": [{
|
|
4430
|
-
items: [...
|
|
4430
|
+
items: [...E(), {
|
|
4431
4431
|
baseline: ["", "last"]
|
|
4432
4432
|
}]
|
|
4433
4433
|
}],
|
|
@@ -4436,7 +4436,7 @@ const Ts = (a, e) => {
|
|
|
4436
4436
|
* @see https://tailwindcss.com/docs/align-self
|
|
4437
4437
|
*/
|
|
4438
4438
|
"align-self": [{
|
|
4439
|
-
self: ["auto", ...
|
|
4439
|
+
self: ["auto", ...E(), {
|
|
4440
4440
|
baseline: ["", "last"]
|
|
4441
4441
|
}]
|
|
4442
4442
|
}],
|
|
@@ -4445,21 +4445,21 @@ const Ts = (a, e) => {
|
|
|
4445
4445
|
* @see https://tailwindcss.com/docs/place-content
|
|
4446
4446
|
*/
|
|
4447
4447
|
"place-content": [{
|
|
4448
|
-
"place-content":
|
|
4448
|
+
"place-content": j()
|
|
4449
4449
|
}],
|
|
4450
4450
|
/**
|
|
4451
4451
|
* Place Items
|
|
4452
4452
|
* @see https://tailwindcss.com/docs/place-items
|
|
4453
4453
|
*/
|
|
4454
4454
|
"place-items": [{
|
|
4455
|
-
"place-items": [...
|
|
4455
|
+
"place-items": [...E(), "baseline"]
|
|
4456
4456
|
}],
|
|
4457
4457
|
/**
|
|
4458
4458
|
* Place Self
|
|
4459
4459
|
* @see https://tailwindcss.com/docs/place-self
|
|
4460
4460
|
*/
|
|
4461
4461
|
"place-self": [{
|
|
4462
|
-
"place-self": ["auto", ...
|
|
4462
|
+
"place-self": ["auto", ...E()]
|
|
4463
4463
|
}],
|
|
4464
4464
|
// Spacing
|
|
4465
4465
|
/**
|
|
@@ -4544,77 +4544,77 @@ const Ts = (a, e) => {
|
|
|
4544
4544
|
* @see https://tailwindcss.com/docs/margin
|
|
4545
4545
|
*/
|
|
4546
4546
|
m: [{
|
|
4547
|
-
m:
|
|
4547
|
+
m: B()
|
|
4548
4548
|
}],
|
|
4549
4549
|
/**
|
|
4550
4550
|
* Margin Inline
|
|
4551
4551
|
* @see https://tailwindcss.com/docs/margin
|
|
4552
4552
|
*/
|
|
4553
4553
|
mx: [{
|
|
4554
|
-
mx:
|
|
4554
|
+
mx: B()
|
|
4555
4555
|
}],
|
|
4556
4556
|
/**
|
|
4557
4557
|
* Margin Block
|
|
4558
4558
|
* @see https://tailwindcss.com/docs/margin
|
|
4559
4559
|
*/
|
|
4560
4560
|
my: [{
|
|
4561
|
-
my:
|
|
4561
|
+
my: B()
|
|
4562
4562
|
}],
|
|
4563
4563
|
/**
|
|
4564
4564
|
* Margin Inline Start
|
|
4565
4565
|
* @see https://tailwindcss.com/docs/margin
|
|
4566
4566
|
*/
|
|
4567
4567
|
ms: [{
|
|
4568
|
-
ms:
|
|
4568
|
+
ms: B()
|
|
4569
4569
|
}],
|
|
4570
4570
|
/**
|
|
4571
4571
|
* Margin Inline End
|
|
4572
4572
|
* @see https://tailwindcss.com/docs/margin
|
|
4573
4573
|
*/
|
|
4574
4574
|
me: [{
|
|
4575
|
-
me:
|
|
4575
|
+
me: B()
|
|
4576
4576
|
}],
|
|
4577
4577
|
/**
|
|
4578
4578
|
* Margin Block Start
|
|
4579
4579
|
* @see https://tailwindcss.com/docs/margin
|
|
4580
4580
|
*/
|
|
4581
4581
|
mbs: [{
|
|
4582
|
-
mbs:
|
|
4582
|
+
mbs: B()
|
|
4583
4583
|
}],
|
|
4584
4584
|
/**
|
|
4585
4585
|
* Margin Block End
|
|
4586
4586
|
* @see https://tailwindcss.com/docs/margin
|
|
4587
4587
|
*/
|
|
4588
4588
|
mbe: [{
|
|
4589
|
-
mbe:
|
|
4589
|
+
mbe: B()
|
|
4590
4590
|
}],
|
|
4591
4591
|
/**
|
|
4592
4592
|
* Margin Top
|
|
4593
4593
|
* @see https://tailwindcss.com/docs/margin
|
|
4594
4594
|
*/
|
|
4595
4595
|
mt: [{
|
|
4596
|
-
mt:
|
|
4596
|
+
mt: B()
|
|
4597
4597
|
}],
|
|
4598
4598
|
/**
|
|
4599
4599
|
* Margin Right
|
|
4600
4600
|
* @see https://tailwindcss.com/docs/margin
|
|
4601
4601
|
*/
|
|
4602
4602
|
mr: [{
|
|
4603
|
-
mr:
|
|
4603
|
+
mr: B()
|
|
4604
4604
|
}],
|
|
4605
4605
|
/**
|
|
4606
4606
|
* Margin Bottom
|
|
4607
4607
|
* @see https://tailwindcss.com/docs/margin
|
|
4608
4608
|
*/
|
|
4609
4609
|
mb: [{
|
|
4610
|
-
mb:
|
|
4610
|
+
mb: B()
|
|
4611
4611
|
}],
|
|
4612
4612
|
/**
|
|
4613
4613
|
* Margin Left
|
|
4614
4614
|
* @see https://tailwindcss.com/docs/margin
|
|
4615
4615
|
*/
|
|
4616
4616
|
ml: [{
|
|
4617
|
-
ml:
|
|
4617
|
+
ml: B()
|
|
4618
4618
|
}],
|
|
4619
4619
|
/**
|
|
4620
4620
|
* Space Between X
|
|
@@ -4648,7 +4648,7 @@ const Ts = (a, e) => {
|
|
|
4648
4648
|
* @see https://tailwindcss.com/docs/width#setting-both-width-and-height
|
|
4649
4649
|
*/
|
|
4650
4650
|
size: [{
|
|
4651
|
-
size:
|
|
4651
|
+
size: $()
|
|
4652
4652
|
}],
|
|
4653
4653
|
/**
|
|
4654
4654
|
* Inline Size
|
|
@@ -4697,7 +4697,7 @@ const Ts = (a, e) => {
|
|
|
4697
4697
|
* @see https://tailwindcss.com/docs/width
|
|
4698
4698
|
*/
|
|
4699
4699
|
w: [{
|
|
4700
|
-
w: [l, "screen",
|
|
4700
|
+
w: [l, "screen", ...$()]
|
|
4701
4701
|
}],
|
|
4702
4702
|
/**
|
|
4703
4703
|
* Min-Width
|
|
@@ -4709,7 +4709,7 @@ const Ts = (a, e) => {
|
|
|
4709
4709
|
"screen",
|
|
4710
4710
|
/** Deprecated. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
|
|
4711
4711
|
"none",
|
|
4712
|
-
|
|
4712
|
+
...$()
|
|
4713
4713
|
]
|
|
4714
4714
|
}],
|
|
4715
4715
|
/**
|
|
@@ -4727,7 +4727,7 @@ const Ts = (a, e) => {
|
|
|
4727
4727
|
{
|
|
4728
4728
|
screen: [i]
|
|
4729
4729
|
},
|
|
4730
|
-
|
|
4730
|
+
...$()
|
|
4731
4731
|
]
|
|
4732
4732
|
}],
|
|
4733
4733
|
/**
|
|
@@ -4735,21 +4735,21 @@ const Ts = (a, e) => {
|
|
|
4735
4735
|
* @see https://tailwindcss.com/docs/height
|
|
4736
4736
|
*/
|
|
4737
4737
|
h: [{
|
|
4738
|
-
h: ["screen", "lh",
|
|
4738
|
+
h: ["screen", "lh", ...$()]
|
|
4739
4739
|
}],
|
|
4740
4740
|
/**
|
|
4741
4741
|
* Min-Height
|
|
4742
4742
|
* @see https://tailwindcss.com/docs/min-height
|
|
4743
4743
|
*/
|
|
4744
4744
|
"min-h": [{
|
|
4745
|
-
"min-h": ["screen", "lh", "none",
|
|
4745
|
+
"min-h": ["screen", "lh", "none", ...$()]
|
|
4746
4746
|
}],
|
|
4747
4747
|
/**
|
|
4748
4748
|
* Max-Height
|
|
4749
4749
|
* @see https://tailwindcss.com/docs/max-height
|
|
4750
4750
|
*/
|
|
4751
4751
|
"max-h": [{
|
|
4752
|
-
"max-h": ["screen", "lh",
|
|
4752
|
+
"max-h": ["screen", "lh", ...$()]
|
|
4753
4753
|
}],
|
|
4754
4754
|
// ------------------
|
|
4755
4755
|
// --- Typography ---
|
|
@@ -4834,14 +4834,14 @@ const Ts = (a, e) => {
|
|
|
4834
4834
|
* @see https://tailwindcss.com/docs/letter-spacing
|
|
4835
4835
|
*/
|
|
4836
4836
|
tracking: [{
|
|
4837
|
-
tracking: [r,
|
|
4837
|
+
tracking: [r, L, F]
|
|
4838
4838
|
}],
|
|
4839
4839
|
/**
|
|
4840
4840
|
* Line Clamp
|
|
4841
4841
|
* @see https://tailwindcss.com/docs/line-clamp
|
|
4842
4842
|
*/
|
|
4843
4843
|
"line-clamp": [{
|
|
4844
|
-
"line-clamp": [W, "none",
|
|
4844
|
+
"line-clamp": [W, "none", L, Vt]
|
|
4845
4845
|
}],
|
|
4846
4846
|
/**
|
|
4847
4847
|
* Line Height
|
|
@@ -4859,7 +4859,7 @@ const Ts = (a, e) => {
|
|
|
4859
4859
|
* @see https://tailwindcss.com/docs/list-style-image
|
|
4860
4860
|
*/
|
|
4861
4861
|
"list-image": [{
|
|
4862
|
-
"list-image": ["none",
|
|
4862
|
+
"list-image": ["none", L, F]
|
|
4863
4863
|
}],
|
|
4864
4864
|
/**
|
|
4865
4865
|
* List Style Position
|
|
@@ -4873,7 +4873,7 @@ const Ts = (a, e) => {
|
|
|
4873
4873
|
* @see https://tailwindcss.com/docs/list-style-type
|
|
4874
4874
|
*/
|
|
4875
4875
|
"list-style-type": [{
|
|
4876
|
-
list: ["disc", "decimal", "none",
|
|
4876
|
+
list: ["disc", "decimal", "none", L, F]
|
|
4877
4877
|
}],
|
|
4878
4878
|
/**
|
|
4879
4879
|
* Text Alignment
|
|
@@ -4914,7 +4914,7 @@ const Ts = (a, e) => {
|
|
|
4914
4914
|
* @see https://tailwindcss.com/docs/text-decoration-thickness
|
|
4915
4915
|
*/
|
|
4916
4916
|
"text-decoration-thickness": [{
|
|
4917
|
-
decoration: [W, "from-font", "auto",
|
|
4917
|
+
decoration: [W, "from-font", "auto", L, Ye]
|
|
4918
4918
|
}],
|
|
4919
4919
|
/**
|
|
4920
4920
|
* Text Decoration Color
|
|
@@ -4928,7 +4928,7 @@ const Ts = (a, e) => {
|
|
|
4928
4928
|
* @see https://tailwindcss.com/docs/text-underline-offset
|
|
4929
4929
|
*/
|
|
4930
4930
|
"underline-offset": [{
|
|
4931
|
-
"underline-offset": [W, "auto",
|
|
4931
|
+
"underline-offset": [W, "auto", L, F]
|
|
4932
4932
|
}],
|
|
4933
4933
|
/**
|
|
4934
4934
|
* Text Transform
|
|
@@ -4959,14 +4959,14 @@ const Ts = (a, e) => {
|
|
|
4959
4959
|
* @see https://tailwindcss.com/docs/tab-size
|
|
4960
4960
|
*/
|
|
4961
4961
|
"tab-size": [{
|
|
4962
|
-
tab: [Ie,
|
|
4962
|
+
tab: [Ie, L, F]
|
|
4963
4963
|
}],
|
|
4964
4964
|
/**
|
|
4965
4965
|
* Vertical Alignment
|
|
4966
4966
|
* @see https://tailwindcss.com/docs/vertical-align
|
|
4967
4967
|
*/
|
|
4968
4968
|
"vertical-align": [{
|
|
4969
|
-
align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super",
|
|
4969
|
+
align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", L, F]
|
|
4970
4970
|
}],
|
|
4971
4971
|
/**
|
|
4972
4972
|
* Whitespace
|
|
@@ -5001,7 +5001,7 @@ const Ts = (a, e) => {
|
|
|
5001
5001
|
* @see https://tailwindcss.com/docs/content
|
|
5002
5002
|
*/
|
|
5003
5003
|
content: [{
|
|
5004
|
-
content: ["none",
|
|
5004
|
+
content: ["none", L, F]
|
|
5005
5005
|
}],
|
|
5006
5006
|
// -------------------
|
|
5007
5007
|
// --- Backgrounds ---
|
|
@@ -5056,9 +5056,9 @@ const Ts = (a, e) => {
|
|
|
5056
5056
|
bg: ["none", {
|
|
5057
5057
|
linear: [{
|
|
5058
5058
|
to: ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
|
|
5059
|
-
}, Ie,
|
|
5060
|
-
radial: ["",
|
|
5061
|
-
conic: [Ie,
|
|
5059
|
+
}, Ie, L, F],
|
|
5060
|
+
radial: ["", L, F],
|
|
5061
|
+
conic: [Ie, L, F]
|
|
5062
5062
|
}, ho, po]
|
|
5063
5063
|
}],
|
|
5064
5064
|
/**
|
|
@@ -5429,7 +5429,7 @@ const Ts = (a, e) => {
|
|
|
5429
5429
|
* @see https://tailwindcss.com/docs/outline-offset
|
|
5430
5430
|
*/
|
|
5431
5431
|
"outline-offset": [{
|
|
5432
|
-
"outline-offset": [W,
|
|
5432
|
+
"outline-offset": [W, L, F]
|
|
5433
5433
|
}],
|
|
5434
5434
|
/**
|
|
5435
5435
|
* Outline Width
|
|
@@ -5474,7 +5474,7 @@ const Ts = (a, e) => {
|
|
|
5474
5474
|
* @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-shadow
|
|
5475
5475
|
*/
|
|
5476
5476
|
"inset-shadow": [{
|
|
5477
|
-
"inset-shadow": ["none",
|
|
5477
|
+
"inset-shadow": ["none", g, Ca, va]
|
|
5478
5478
|
}],
|
|
5479
5479
|
/**
|
|
5480
5480
|
* Inset Box Shadow Color
|
|
@@ -5541,7 +5541,7 @@ const Ts = (a, e) => {
|
|
|
5541
5541
|
* @see https://tailwindcss.com/docs/text-shadow
|
|
5542
5542
|
*/
|
|
5543
5543
|
"text-shadow": [{
|
|
5544
|
-
"text-shadow": ["none",
|
|
5544
|
+
"text-shadow": ["none", m, Ca, va]
|
|
5545
5545
|
}],
|
|
5546
5546
|
/**
|
|
5547
5547
|
* Text Shadow Color
|
|
@@ -5555,7 +5555,7 @@ const Ts = (a, e) => {
|
|
|
5555
5555
|
* @see https://tailwindcss.com/docs/opacity
|
|
5556
5556
|
*/
|
|
5557
5557
|
opacity: [{
|
|
5558
|
-
opacity: [W,
|
|
5558
|
+
opacity: [W, L, F]
|
|
5559
5559
|
}],
|
|
5560
5560
|
/**
|
|
5561
5561
|
* Mix Blend Mode
|
|
@@ -5677,7 +5677,7 @@ const Ts = (a, e) => {
|
|
|
5677
5677
|
"mask-y-to": C()
|
|
5678
5678
|
}],
|
|
5679
5679
|
"mask-image-radial": [{
|
|
5680
|
-
"mask-radial": [
|
|
5680
|
+
"mask-radial": [L, F]
|
|
5681
5681
|
}],
|
|
5682
5682
|
"mask-image-radial-from-pos": [{
|
|
5683
5683
|
"mask-radial-from": J()
|
|
@@ -5765,7 +5765,7 @@ const Ts = (a, e) => {
|
|
|
5765
5765
|
* @see https://tailwindcss.com/docs/mask-image
|
|
5766
5766
|
*/
|
|
5767
5767
|
"mask-image": [{
|
|
5768
|
-
mask: ["none",
|
|
5768
|
+
mask: ["none", L, F]
|
|
5769
5769
|
}],
|
|
5770
5770
|
// ---------------
|
|
5771
5771
|
// --- Filters ---
|
|
@@ -5779,7 +5779,7 @@ const Ts = (a, e) => {
|
|
|
5779
5779
|
// Deprecated since Tailwind CSS v3.0.0
|
|
5780
5780
|
"",
|
|
5781
5781
|
"none",
|
|
5782
|
-
|
|
5782
|
+
L,
|
|
5783
5783
|
F
|
|
5784
5784
|
]
|
|
5785
5785
|
}],
|
|
@@ -5795,14 +5795,14 @@ const Ts = (a, e) => {
|
|
|
5795
5795
|
* @see https://tailwindcss.com/docs/brightness
|
|
5796
5796
|
*/
|
|
5797
5797
|
brightness: [{
|
|
5798
|
-
brightness: [W,
|
|
5798
|
+
brightness: [W, L, F]
|
|
5799
5799
|
}],
|
|
5800
5800
|
/**
|
|
5801
5801
|
* Contrast
|
|
5802
5802
|
* @see https://tailwindcss.com/docs/contrast
|
|
5803
5803
|
*/
|
|
5804
5804
|
contrast: [{
|
|
5805
|
-
contrast: [W,
|
|
5805
|
+
contrast: [W, L, F]
|
|
5806
5806
|
}],
|
|
5807
5807
|
/**
|
|
5808
5808
|
* Drop Shadow
|
|
@@ -5813,7 +5813,7 @@ const Ts = (a, e) => {
|
|
|
5813
5813
|
// Deprecated since Tailwind CSS v4.0.0
|
|
5814
5814
|
"",
|
|
5815
5815
|
"none",
|
|
5816
|
-
|
|
5816
|
+
h,
|
|
5817
5817
|
Ca,
|
|
5818
5818
|
va
|
|
5819
5819
|
]
|
|
@@ -5830,35 +5830,35 @@ const Ts = (a, e) => {
|
|
|
5830
5830
|
* @see https://tailwindcss.com/docs/grayscale
|
|
5831
5831
|
*/
|
|
5832
5832
|
grayscale: [{
|
|
5833
|
-
grayscale: ["", W,
|
|
5833
|
+
grayscale: ["", W, L, F]
|
|
5834
5834
|
}],
|
|
5835
5835
|
/**
|
|
5836
5836
|
* Hue Rotate
|
|
5837
5837
|
* @see https://tailwindcss.com/docs/hue-rotate
|
|
5838
5838
|
*/
|
|
5839
5839
|
"hue-rotate": [{
|
|
5840
|
-
"hue-rotate": [W,
|
|
5840
|
+
"hue-rotate": [W, L, F]
|
|
5841
5841
|
}],
|
|
5842
5842
|
/**
|
|
5843
5843
|
* Invert
|
|
5844
5844
|
* @see https://tailwindcss.com/docs/invert
|
|
5845
5845
|
*/
|
|
5846
5846
|
invert: [{
|
|
5847
|
-
invert: ["", W,
|
|
5847
|
+
invert: ["", W, L, F]
|
|
5848
5848
|
}],
|
|
5849
5849
|
/**
|
|
5850
5850
|
* Saturate
|
|
5851
5851
|
* @see https://tailwindcss.com/docs/saturate
|
|
5852
5852
|
*/
|
|
5853
5853
|
saturate: [{
|
|
5854
|
-
saturate: [W,
|
|
5854
|
+
saturate: [W, L, F]
|
|
5855
5855
|
}],
|
|
5856
5856
|
/**
|
|
5857
5857
|
* Sepia
|
|
5858
5858
|
* @see https://tailwindcss.com/docs/sepia
|
|
5859
5859
|
*/
|
|
5860
5860
|
sepia: [{
|
|
5861
|
-
sepia: ["", W,
|
|
5861
|
+
sepia: ["", W, L, F]
|
|
5862
5862
|
}],
|
|
5863
5863
|
/**
|
|
5864
5864
|
* Backdrop Filter
|
|
@@ -5869,7 +5869,7 @@ const Ts = (a, e) => {
|
|
|
5869
5869
|
// Deprecated since Tailwind CSS v3.0.0
|
|
5870
5870
|
"",
|
|
5871
5871
|
"none",
|
|
5872
|
-
|
|
5872
|
+
L,
|
|
5873
5873
|
F
|
|
5874
5874
|
]
|
|
5875
5875
|
}],
|
|
@@ -5885,56 +5885,56 @@ const Ts = (a, e) => {
|
|
|
5885
5885
|
* @see https://tailwindcss.com/docs/backdrop-brightness
|
|
5886
5886
|
*/
|
|
5887
5887
|
"backdrop-brightness": [{
|
|
5888
|
-
"backdrop-brightness": [W,
|
|
5888
|
+
"backdrop-brightness": [W, L, F]
|
|
5889
5889
|
}],
|
|
5890
5890
|
/**
|
|
5891
5891
|
* Backdrop Contrast
|
|
5892
5892
|
* @see https://tailwindcss.com/docs/backdrop-contrast
|
|
5893
5893
|
*/
|
|
5894
5894
|
"backdrop-contrast": [{
|
|
5895
|
-
"backdrop-contrast": [W,
|
|
5895
|
+
"backdrop-contrast": [W, L, F]
|
|
5896
5896
|
}],
|
|
5897
5897
|
/**
|
|
5898
5898
|
* Backdrop Grayscale
|
|
5899
5899
|
* @see https://tailwindcss.com/docs/backdrop-grayscale
|
|
5900
5900
|
*/
|
|
5901
5901
|
"backdrop-grayscale": [{
|
|
5902
|
-
"backdrop-grayscale": ["", W,
|
|
5902
|
+
"backdrop-grayscale": ["", W, L, F]
|
|
5903
5903
|
}],
|
|
5904
5904
|
/**
|
|
5905
5905
|
* Backdrop Hue Rotate
|
|
5906
5906
|
* @see https://tailwindcss.com/docs/backdrop-hue-rotate
|
|
5907
5907
|
*/
|
|
5908
5908
|
"backdrop-hue-rotate": [{
|
|
5909
|
-
"backdrop-hue-rotate": [W,
|
|
5909
|
+
"backdrop-hue-rotate": [W, L, F]
|
|
5910
5910
|
}],
|
|
5911
5911
|
/**
|
|
5912
5912
|
* Backdrop Invert
|
|
5913
5913
|
* @see https://tailwindcss.com/docs/backdrop-invert
|
|
5914
5914
|
*/
|
|
5915
5915
|
"backdrop-invert": [{
|
|
5916
|
-
"backdrop-invert": ["", W,
|
|
5916
|
+
"backdrop-invert": ["", W, L, F]
|
|
5917
5917
|
}],
|
|
5918
5918
|
/**
|
|
5919
5919
|
* Backdrop Opacity
|
|
5920
5920
|
* @see https://tailwindcss.com/docs/backdrop-opacity
|
|
5921
5921
|
*/
|
|
5922
5922
|
"backdrop-opacity": [{
|
|
5923
|
-
"backdrop-opacity": [W,
|
|
5923
|
+
"backdrop-opacity": [W, L, F]
|
|
5924
5924
|
}],
|
|
5925
5925
|
/**
|
|
5926
5926
|
* Backdrop Saturate
|
|
5927
5927
|
* @see https://tailwindcss.com/docs/backdrop-saturate
|
|
5928
5928
|
*/
|
|
5929
5929
|
"backdrop-saturate": [{
|
|
5930
|
-
"backdrop-saturate": [W,
|
|
5930
|
+
"backdrop-saturate": [W, L, F]
|
|
5931
5931
|
}],
|
|
5932
5932
|
/**
|
|
5933
5933
|
* Backdrop Sepia
|
|
5934
5934
|
* @see https://tailwindcss.com/docs/backdrop-sepia
|
|
5935
5935
|
*/
|
|
5936
5936
|
"backdrop-sepia": [{
|
|
5937
|
-
"backdrop-sepia": ["", W,
|
|
5937
|
+
"backdrop-sepia": ["", W, L, F]
|
|
5938
5938
|
}],
|
|
5939
5939
|
// --------------
|
|
5940
5940
|
// --- Tables ---
|
|
@@ -5989,7 +5989,7 @@ const Ts = (a, e) => {
|
|
|
5989
5989
|
* @see https://tailwindcss.com/docs/transition-property
|
|
5990
5990
|
*/
|
|
5991
5991
|
transition: [{
|
|
5992
|
-
transition: ["", "all", "colors", "opacity", "shadow", "transform", "none",
|
|
5992
|
+
transition: ["", "all", "colors", "opacity", "shadow", "transform", "none", L, F]
|
|
5993
5993
|
}],
|
|
5994
5994
|
/**
|
|
5995
5995
|
* Transition Behavior
|
|
@@ -6003,28 +6003,28 @@ const Ts = (a, e) => {
|
|
|
6003
6003
|
* @see https://tailwindcss.com/docs/transition-duration
|
|
6004
6004
|
*/
|
|
6005
6005
|
duration: [{
|
|
6006
|
-
duration: [W, "initial",
|
|
6006
|
+
duration: [W, "initial", L, F]
|
|
6007
6007
|
}],
|
|
6008
6008
|
/**
|
|
6009
6009
|
* Transition Timing Function
|
|
6010
6010
|
* @see https://tailwindcss.com/docs/transition-timing-function
|
|
6011
6011
|
*/
|
|
6012
6012
|
ease: [{
|
|
6013
|
-
ease: ["linear", "initial", v,
|
|
6013
|
+
ease: ["linear", "initial", v, L, F]
|
|
6014
6014
|
}],
|
|
6015
6015
|
/**
|
|
6016
6016
|
* Transition Delay
|
|
6017
6017
|
* @see https://tailwindcss.com/docs/transition-delay
|
|
6018
6018
|
*/
|
|
6019
6019
|
delay: [{
|
|
6020
|
-
delay: [W,
|
|
6020
|
+
delay: [W, L, F]
|
|
6021
6021
|
}],
|
|
6022
6022
|
/**
|
|
6023
6023
|
* Animation
|
|
6024
6024
|
* @see https://tailwindcss.com/docs/animation
|
|
6025
6025
|
*/
|
|
6026
6026
|
animate: [{
|
|
6027
|
-
animate: ["none", y,
|
|
6027
|
+
animate: ["none", y, L, F]
|
|
6028
6028
|
}],
|
|
6029
6029
|
// ------------------
|
|
6030
6030
|
// --- Transforms ---
|
|
@@ -6041,14 +6041,14 @@ const Ts = (a, e) => {
|
|
|
6041
6041
|
* @see https://tailwindcss.com/docs/perspective
|
|
6042
6042
|
*/
|
|
6043
6043
|
perspective: [{
|
|
6044
|
-
perspective: [
|
|
6044
|
+
perspective: [_, L, F]
|
|
6045
6045
|
}],
|
|
6046
6046
|
/**
|
|
6047
6047
|
* Perspective Origin
|
|
6048
6048
|
* @see https://tailwindcss.com/docs/perspective-origin
|
|
6049
6049
|
*/
|
|
6050
6050
|
"perspective-origin": [{
|
|
6051
|
-
"perspective-origin":
|
|
6051
|
+
"perspective-origin": S()
|
|
6052
6052
|
}],
|
|
6053
6053
|
/**
|
|
6054
6054
|
* Rotate
|
|
@@ -6137,14 +6137,14 @@ const Ts = (a, e) => {
|
|
|
6137
6137
|
* @see https://tailwindcss.com/docs/transform
|
|
6138
6138
|
*/
|
|
6139
6139
|
transform: [{
|
|
6140
|
-
transform: [
|
|
6140
|
+
transform: [L, F, "", "none", "gpu", "cpu"]
|
|
6141
6141
|
}],
|
|
6142
6142
|
/**
|
|
6143
6143
|
* Transform Origin
|
|
6144
6144
|
* @see https://tailwindcss.com/docs/transform-origin
|
|
6145
6145
|
*/
|
|
6146
6146
|
"transform-origin": [{
|
|
6147
|
-
origin:
|
|
6147
|
+
origin: S()
|
|
6148
6148
|
}],
|
|
6149
6149
|
/**
|
|
6150
6150
|
* Transform Style
|
|
@@ -6191,7 +6191,7 @@ const Ts = (a, e) => {
|
|
|
6191
6191
|
* @see https://tailwindcss.com/docs/zoom
|
|
6192
6192
|
*/
|
|
6193
6193
|
zoom: [{
|
|
6194
|
-
zoom: [Ie,
|
|
6194
|
+
zoom: [Ie, L, F]
|
|
6195
6195
|
}],
|
|
6196
6196
|
// ---------------------
|
|
6197
6197
|
// --- Interactivity ---
|
|
@@ -6229,7 +6229,7 @@ const Ts = (a, e) => {
|
|
|
6229
6229
|
* @see https://tailwindcss.com/docs/cursor
|
|
6230
6230
|
*/
|
|
6231
6231
|
cursor: [{
|
|
6232
|
-
cursor: ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out",
|
|
6232
|
+
cursor: ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out", L, F]
|
|
6233
6233
|
}],
|
|
6234
6234
|
/**
|
|
6235
6235
|
* Field Sizing
|
|
@@ -6507,7 +6507,7 @@ const Ts = (a, e) => {
|
|
|
6507
6507
|
* @see https://tailwindcss.com/docs/will-change
|
|
6508
6508
|
*/
|
|
6509
6509
|
"will-change": [{
|
|
6510
|
-
"will-change": ["auto", "scroll", "contents", "transform",
|
|
6510
|
+
"will-change": ["auto", "scroll", "contents", "transform", L, F]
|
|
6511
6511
|
}],
|
|
6512
6512
|
// -----------
|
|
6513
6513
|
// --- SVG ---
|
|
@@ -6602,7 +6602,7 @@ const Ts = (a, e) => {
|
|
|
6602
6602
|
orderSensitiveModifiers: ["*", "**", "after", "backdrop", "before", "details-content", "file", "first-letter", "first-line", "marker", "placeholder", "selection"]
|
|
6603
6603
|
};
|
|
6604
6604
|
}, vo = /* @__PURE__ */ Ys(yo);
|
|
6605
|
-
function
|
|
6605
|
+
function U(...a) {
|
|
6606
6606
|
return vo(xs(a));
|
|
6607
6607
|
}
|
|
6608
6608
|
function Z(a, e = "usd", t = 2, n = "en-US") {
|
|
@@ -6792,7 +6792,7 @@ const Un = {
|
|
|
6792
6792
|
],
|
|
6793
6793
|
enterprise: ["Voice channel", "Dedicated support", "SLA & security review", "Custom storage"],
|
|
6794
6794
|
managed: []
|
|
6795
|
-
}, ot = ({ variant: a = "accent", children: e, className: t }) => /* @__PURE__ */ o("span", { className:
|
|
6795
|
+
}, ot = ({ variant: a = "accent", children: e, className: t }) => /* @__PURE__ */ o("span", { className: U("bpb-badge", `bpb-badge--${a}`, t), children: e }), be = ({
|
|
6796
6796
|
variant: a = "primary",
|
|
6797
6797
|
size: e = "md",
|
|
6798
6798
|
block: t = !1,
|
|
@@ -6806,7 +6806,7 @@ const Un = {
|
|
|
6806
6806
|
"button",
|
|
6807
6807
|
{
|
|
6808
6808
|
type: l,
|
|
6809
|
-
className:
|
|
6809
|
+
className: U("bpb-btn", `bpb-btn--${a}`, `bpb-btn--${e}`, t && "bpb-btn--block", r),
|
|
6810
6810
|
disabled: s || n,
|
|
6811
6811
|
"data-loading": n || void 0,
|
|
6812
6812
|
...c,
|
|
@@ -7062,16 +7062,16 @@ const Te = ({
|
|
|
7062
7062
|
}) => {
|
|
7063
7063
|
const l = Ea(null), c = Ns(), d = _s(), p = ka(() => e(!1), [e]);
|
|
7064
7064
|
return we(() => {
|
|
7065
|
-
var
|
|
7065
|
+
var h;
|
|
7066
7066
|
if (!a)
|
|
7067
7067
|
return;
|
|
7068
|
-
const
|
|
7069
|
-
|
|
7068
|
+
const g = (b) => {
|
|
7069
|
+
b.key === "Escape" && p();
|
|
7070
7070
|
};
|
|
7071
|
-
document.addEventListener("keydown",
|
|
7072
|
-
const
|
|
7073
|
-
return document.body.style.overflow = "hidden", (
|
|
7074
|
-
document.removeEventListener("keydown",
|
|
7071
|
+
document.addEventListener("keydown", g);
|
|
7072
|
+
const m = document.body.style.overflow;
|
|
7073
|
+
return document.body.style.overflow = "hidden", (h = l.current) == null || h.focus(), () => {
|
|
7074
|
+
document.removeEventListener("keydown", g), document.body.style.overflow = m;
|
|
7075
7075
|
};
|
|
7076
7076
|
}, [a, p]), a ? yr(
|
|
7077
7077
|
/* @__PURE__ */ o(
|
|
@@ -7089,8 +7089,8 @@ const Te = ({
|
|
|
7089
7089
|
"aria-modal": "true",
|
|
7090
7090
|
"aria-label": i["aria-label"],
|
|
7091
7091
|
tabIndex: -1,
|
|
7092
|
-
className:
|
|
7093
|
-
onClick: (
|
|
7092
|
+
className: U("bpb-dialog", `bpb-dialog--${t}`, r),
|
|
7093
|
+
onClick: (g) => g.stopPropagation(),
|
|
7094
7094
|
children: [
|
|
7095
7095
|
s && /* @__PURE__ */ o("button", { type: "button", className: "bpb-dialog__close", "aria-label": "Close", onClick: p, children: /* @__PURE__ */ o(dt, { size: 18 }) }),
|
|
7096
7096
|
n
|
|
@@ -7120,7 +7120,7 @@ const Te = ({
|
|
|
7120
7120
|
onChange: t,
|
|
7121
7121
|
className: n,
|
|
7122
7122
|
...r
|
|
7123
|
-
}) => /* @__PURE__ */ o("div", { role: "radiogroup", "aria-label": r["aria-label"], className:
|
|
7123
|
+
}) => /* @__PURE__ */ o("div", { role: "radiogroup", "aria-label": r["aria-label"], className: U("bpb-segmented", n), children: a.map((s) => {
|
|
7124
7124
|
const i = s.value === e;
|
|
7125
7125
|
return /* @__PURE__ */ u(
|
|
7126
7126
|
"button",
|
|
@@ -7128,7 +7128,7 @@ const Te = ({
|
|
|
7128
7128
|
type: "button",
|
|
7129
7129
|
role: "radio",
|
|
7130
7130
|
"aria-checked": i,
|
|
7131
|
-
className:
|
|
7131
|
+
className: U("bpb-segmented__option", i && "bpb-segmented__option--selected"),
|
|
7132
7132
|
onClick: () => t(s.value),
|
|
7133
7133
|
children: [
|
|
7134
7134
|
s.label,
|
|
@@ -7141,7 +7141,7 @@ const Te = ({
|
|
|
7141
7141
|
"span",
|
|
7142
7142
|
{
|
|
7143
7143
|
"aria-hidden": !0,
|
|
7144
|
-
className:
|
|
7144
|
+
className: U("bpb-skeleton", t && "bpb-skeleton--rounded", n),
|
|
7145
7145
|
style: { width: a ?? "100%", height: e }
|
|
7146
7146
|
}
|
|
7147
7147
|
);
|
|
@@ -7176,39 +7176,39 @@ const qo = ({
|
|
|
7176
7176
|
planFeatures: i = {},
|
|
7177
7177
|
featureDescriptions: l
|
|
7178
7178
|
}) => {
|
|
7179
|
-
var
|
|
7180
|
-
const { isOutdatedBilling: c, toast: d, analytics: p } = G(), { t:
|
|
7179
|
+
var $, K, z;
|
|
7180
|
+
const { isOutdatedBilling: c, toast: d, analytics: p } = G(), { t: g } = oe(), [m, h] = H(r), { data: b, isLoading: _ } = Ue(), { data: N } = ia(), { data: v } = Re({ enabled: a }), { data: y } = fn({ enabled: a }), k = _n(), x = (y == null ? void 0 : y.planReadonly) ?? !1;
|
|
7181
7181
|
we(() => {
|
|
7182
|
-
a && p.capture(pe.PLAN_PICKER_VIEWED, { interval:
|
|
7182
|
+
a && p.capture(pe.PLAN_PICKER_VIEWED, { interval: m });
|
|
7183
7183
|
}, [a, p]);
|
|
7184
|
-
const
|
|
7185
|
-
C !==
|
|
7186
|
-
},
|
|
7184
|
+
const S = (C) => {
|
|
7185
|
+
C !== m && p.capture(pe.PLAN_INTERVAL_TOGGLED, { interval: C }), h(C);
|
|
7186
|
+
}, w = v == null ? void 0 : v.plan.current.interval, A = b == null ? void 0 : b.find((C) => C.id === (v == null ? void 0 : v.plan.current.planId)), f = v ? A ? ue(A) : "community" : void 0, T = (($ = v == null ? void 0 : v.plan.next) == null ? void 0 : $.planId) ?? null, I = !!T && T !== (v == null ? void 0 : v.plan.current.planId), D = x || f === "enterprise" || f === "managed", q = ke(() => b ? b.filter(
|
|
7187
7187
|
(C) => ue(C) !== "managed" && ue(C) !== "enterprise" && !s.includes(C.id)
|
|
7188
|
-
).sort((C, ee) => ta.indexOf(ue(C)) - ta.indexOf(ue(ee))) : [], [
|
|
7188
|
+
).sort((C, ee) => ta.indexOf(ue(C)) - ta.indexOf(ue(ee))) : [], [b, s]), R = ke(() => Uo(q), [q]), j = ((z = (K = b == null ? void 0 : b.find((C) => ue(C) === "enterprise")) == null ? void 0 : K.metadata) == null ? void 0 : z.contact_url) ?? zn, E = (C) => {
|
|
7189
7189
|
k.mutate(
|
|
7190
|
-
{ planId: C.id, interval:
|
|
7190
|
+
{ planId: C.id, interval: m },
|
|
7191
7191
|
{
|
|
7192
7192
|
onSuccess: () => {
|
|
7193
7193
|
p.capture(pe.PLAN_DOWNGRADED, {
|
|
7194
7194
|
plan_name: se(C.name),
|
|
7195
|
-
interval:
|
|
7195
|
+
interval: m,
|
|
7196
7196
|
previous_plan_name: A ? se(A.name) : void 0
|
|
7197
|
-
}), d({ type: "success", message:
|
|
7197
|
+
}), d({ type: "success", message: g("upgradeDowngradeSuccess") });
|
|
7198
7198
|
},
|
|
7199
|
-
onError: () => d({ type: "error", message:
|
|
7199
|
+
onError: () => d({ type: "error", message: g("upgradeDowngradeError") })
|
|
7200
7200
|
}
|
|
7201
7201
|
);
|
|
7202
|
-
},
|
|
7202
|
+
}, B = () => {
|
|
7203
7203
|
v && k.mutate(
|
|
7204
7204
|
{ planId: v.plan.current.planId, interval: v.plan.current.interval },
|
|
7205
7205
|
{
|
|
7206
7206
|
onSuccess: () => {
|
|
7207
7207
|
p.capture(pe.PLAN_DOWNGRADE_CANCELLED, {
|
|
7208
7208
|
plan_name: A ? se(A.name) : v.plan.current.planId
|
|
7209
|
-
}), d({ type: "success", message:
|
|
7209
|
+
}), d({ type: "success", message: g("upgradeCancelDowngradeSuccess") });
|
|
7210
7210
|
},
|
|
7211
|
-
onError: () => d({ type: "error", message:
|
|
7211
|
+
onError: () => d({ type: "error", message: g("upgradeCancelDowngradeError") })
|
|
7212
7212
|
}
|
|
7213
7213
|
);
|
|
7214
7214
|
};
|
|
@@ -7218,7 +7218,7 @@ const qo = ({
|
|
|
7218
7218
|
open: a,
|
|
7219
7219
|
onOpenChange: e,
|
|
7220
7220
|
size: "md",
|
|
7221
|
-
"aria-label":
|
|
7221
|
+
"aria-label": g("upgradeDialogTitle"),
|
|
7222
7222
|
className: "bpb-scope",
|
|
7223
7223
|
children: /* @__PURE__ */ o(da, {})
|
|
7224
7224
|
}
|
|
@@ -7228,67 +7228,67 @@ const qo = ({
|
|
|
7228
7228
|
open: a,
|
|
7229
7229
|
onOpenChange: e,
|
|
7230
7230
|
size: "xl",
|
|
7231
|
-
"aria-label":
|
|
7231
|
+
"aria-label": g("upgradeDialogTitle"),
|
|
7232
7232
|
className: "bpb-scope",
|
|
7233
7233
|
children: /* @__PURE__ */ u("div", { className: "bpb-upgrade", children: [
|
|
7234
|
-
/* @__PURE__ */ o("h2", { className: "bpb-upgrade__title", children:
|
|
7234
|
+
/* @__PURE__ */ o("h2", { className: "bpb-upgrade__title", children: g("upgradeDialogTitle") }),
|
|
7235
7235
|
/* @__PURE__ */ o("div", { className: "bpb-upgrade__toggle", children: /* @__PURE__ */ o(
|
|
7236
7236
|
Mo,
|
|
7237
7237
|
{
|
|
7238
|
-
"aria-label":
|
|
7239
|
-
value:
|
|
7240
|
-
onChange:
|
|
7238
|
+
"aria-label": g("dashboardBillingPeriod"),
|
|
7239
|
+
value: m,
|
|
7240
|
+
onChange: S,
|
|
7241
7241
|
options: [
|
|
7242
|
-
{ value: "month", label:
|
|
7242
|
+
{ value: "month", label: g("upgradeMonthly") },
|
|
7243
7243
|
{
|
|
7244
7244
|
value: "year",
|
|
7245
|
-
label:
|
|
7246
|
-
badge:
|
|
7245
|
+
label: g("upgradeAnnual"),
|
|
7246
|
+
badge: R > 0 ? g("upgradeSaveBadge", { savings: R }) : void 0
|
|
7247
7247
|
}
|
|
7248
7248
|
]
|
|
7249
7249
|
}
|
|
7250
7250
|
) }),
|
|
7251
7251
|
/* @__PURE__ */ u("div", { className: "bpb-upgrade__grid", children: [
|
|
7252
|
-
|
|
7252
|
+
_ && [0, 1, 2].map((C) => /* @__PURE__ */ u("div", { className: "bpb-plan-card", "aria-hidden": !0, children: [
|
|
7253
7253
|
/* @__PURE__ */ o(X, { width: 120, height: 22 }),
|
|
7254
7254
|
/* @__PURE__ */ o(X, { width: 90, height: 40 }),
|
|
7255
7255
|
/* @__PURE__ */ o(X, { width: "100%", height: 36, rounded: !0 }),
|
|
7256
7256
|
/* @__PURE__ */ o(X, { width: "100%", height: 140 })
|
|
7257
7257
|
] }, C)),
|
|
7258
|
-
|
|
7258
|
+
q.map((C, ee) => {
|
|
7259
7259
|
var te, ce;
|
|
7260
|
-
const ae = ue(C), ie = zo(C,
|
|
7260
|
+
const ae = ue(C), ie = zo(C, m), P = Oo(C, m), O = (((te = C.prices.month) == null ? void 0 : te.amount) ?? 0) <= 0, M = ae === f, Y = M && (f === "community" || m === w), ge = ae === f && f !== "community" && m !== w, J = !!T && C.id === T && !Y, le = f !== void 0 && ta.indexOf(ae) < ta.indexOf(f), fe = (ae === n || C.id === n) && !Y, de = M && I ? "cancel_downgrade" : Y ? "current" : ge ? "switch_interval" : J ? "next" : le ? "downgrade" : "upgrade", Pe = ee > 0 ? q[ee - 1] : void 0, Ce = i[ae] ?? st[ae], We = C.features.conversation_sessions, Q = rt(N, C, m), ve = k.isPending && (de === "downgrade" && ((ce = k.variables) == null ? void 0 : ce.planId) === C.id || de === "cancel_downgrade");
|
|
7261
7261
|
return /* @__PURE__ */ u(
|
|
7262
7262
|
"div",
|
|
7263
7263
|
{
|
|
7264
|
-
className:
|
|
7264
|
+
className: U("bpb-plan-card", fe && "bpb-plan-card--highlighted bpb-glow"),
|
|
7265
7265
|
"data-plan-id": C.id,
|
|
7266
7266
|
children: [
|
|
7267
7267
|
/* @__PURE__ */ u("div", { className: "bpb-plan-card__header", children: [
|
|
7268
7268
|
/* @__PURE__ */ u("h3", { className: "bpb-plan-card__name", children: [
|
|
7269
7269
|
se(C.name),
|
|
7270
|
-
fe && /* @__PURE__ */ o(ot, { className: "bpb-plan-card__badge", children:
|
|
7270
|
+
fe && /* @__PURE__ */ o(ot, { className: "bpb-plan-card__badge", children: g("upgradeRecommended") })
|
|
7271
7271
|
] }),
|
|
7272
|
-
/* @__PURE__ */ o("p", { className: "bpb-plan-card__tagline", children:
|
|
7272
|
+
/* @__PURE__ */ o("p", { className: "bpb-plan-card__tagline", children: g(ko[ue(C)]) }),
|
|
7273
7273
|
/* @__PURE__ */ o("div", { className: "bpb-plan-card__price", children: P !== null && ie ? /* @__PURE__ */ u(ye, { children: [
|
|
7274
7274
|
/* @__PURE__ */ o("span", { className: "bpb-plan-card__currency", children: _a(ie.currency) }),
|
|
7275
7275
|
/* @__PURE__ */ o("span", { className: "bpb-plan-card__amount", children: Number.isInteger(P) ? P : P.toFixed(2).replace(/\.00$/, "") }),
|
|
7276
|
-
/* @__PURE__ */ o("span", { className: "bpb-plan-card__per", children:
|
|
7276
|
+
/* @__PURE__ */ o("span", { className: "bpb-plan-card__per", children: g("upgradePerMonthSuffix", { currency: ie.currency.toUpperCase() }) })
|
|
7277
7277
|
] }) : /* @__PURE__ */ o("span", { className: "bpb-plan-card__amount", children: Z(0, "usd", 0) }) })
|
|
7278
7278
|
] }),
|
|
7279
7279
|
We !== void 0 && /* @__PURE__ */ u("div", { className: "bpb-plan-card__allowance", children: [
|
|
7280
7280
|
/* @__PURE__ */ u("div", { className: "bpb-plan-card__metric", children: [
|
|
7281
7281
|
/* @__PURE__ */ o("span", { className: "bpb-plan-card__metric-value", children: re(We) }),
|
|
7282
|
-
/* @__PURE__ */ o("span", { className: "bpb-plan-card__metric-unit", children:
|
|
7282
|
+
/* @__PURE__ */ o("span", { className: "bpb-plan-card__metric-unit", children: g(O ? "conversationsUnit" : "conversationsPerMonth") })
|
|
7283
7283
|
] }),
|
|
7284
|
-
Q ? /* @__PURE__ */ o("p", { className: "bpb-plan-card__pack", children:
|
|
7284
|
+
Q ? /* @__PURE__ */ o("p", { className: "bpb-plan-card__pack", children: g("upgradeThenPer", {
|
|
7285
7285
|
price: Z(Q.amount, Q.currency, 0),
|
|
7286
7286
|
packSize: re(Q.packSize)
|
|
7287
|
-
}) }) : /* @__PURE__ */ o("p", { className: "bpb-plan-card__pack", children:
|
|
7287
|
+
}) }) : /* @__PURE__ */ o("p", { className: "bpb-plan-card__pack", children: g("upgradeNoTopup") })
|
|
7288
7288
|
] }),
|
|
7289
|
-
de === "current" && /* @__PURE__ */ o(be, { variant: "outline", block: !0, disabled: !0, children:
|
|
7290
|
-
de === "next" && /* @__PURE__ */ o(be, { variant: "outline", block: !0, disabled: !0, children:
|
|
7291
|
-
de === "cancel_downgrade" && /* @__PURE__ */ o(be, { variant: "primary", block: !0, loading: ve, onClick:
|
|
7289
|
+
de === "current" && /* @__PURE__ */ o(be, { variant: "outline", block: !0, disabled: !0, children: g("upgradeCurrentPlan") }),
|
|
7290
|
+
de === "next" && /* @__PURE__ */ o(be, { variant: "outline", block: !0, disabled: !0, children: g("upgradeNextPlan") }),
|
|
7291
|
+
de === "cancel_downgrade" && /* @__PURE__ */ o(be, { variant: "primary", block: !0, loading: ve, onClick: B, children: g("upgradeCancelDowngrade") }),
|
|
7292
7292
|
de === "downgrade" && /* @__PURE__ */ o(
|
|
7293
7293
|
be,
|
|
7294
7294
|
{
|
|
@@ -7296,8 +7296,8 @@ const qo = ({
|
|
|
7296
7296
|
block: !0,
|
|
7297
7297
|
disabled: D || k.isPending,
|
|
7298
7298
|
loading: ve,
|
|
7299
|
-
onClick: () =>
|
|
7300
|
-
children:
|
|
7299
|
+
onClick: () => E(C),
|
|
7300
|
+
children: g("upgradeDowngrade")
|
|
7301
7301
|
}
|
|
7302
7302
|
),
|
|
7303
7303
|
de === "switch_interval" && /* @__PURE__ */ o(
|
|
@@ -7306,15 +7306,15 @@ const qo = ({
|
|
|
7306
7306
|
variant: "primary",
|
|
7307
7307
|
block: !0,
|
|
7308
7308
|
disabled: D || k.isPending,
|
|
7309
|
-
title: D ?
|
|
7309
|
+
title: D ? g("upgradePlanManaged") : void 0,
|
|
7310
7310
|
onClick: () => {
|
|
7311
7311
|
p.capture(pe.PLAN_UPGRADE_INITIATED, {
|
|
7312
7312
|
plan_name: se(C.name),
|
|
7313
|
-
interval:
|
|
7313
|
+
interval: m,
|
|
7314
7314
|
current_plan_name: A ? se(A.name) : void 0
|
|
7315
|
-
}), t(C.id,
|
|
7315
|
+
}), t(C.id, m);
|
|
7316
7316
|
},
|
|
7317
|
-
children: m
|
|
7317
|
+
children: g(m === "year" ? "upgradeSwitchToAnnual" : "upgradeSwitchToMonthly")
|
|
7318
7318
|
}
|
|
7319
7319
|
),
|
|
7320
7320
|
de === "upgrade" && /* @__PURE__ */ o(
|
|
@@ -7323,24 +7323,24 @@ const qo = ({
|
|
|
7323
7323
|
variant: fe ? "accent" : "primary",
|
|
7324
7324
|
block: !0,
|
|
7325
7325
|
disabled: D || k.isPending,
|
|
7326
|
-
title: D ?
|
|
7326
|
+
title: D ? g("upgradePlanManaged") : void 0,
|
|
7327
7327
|
onClick: () => {
|
|
7328
7328
|
p.capture(pe.PLAN_UPGRADE_INITIATED, {
|
|
7329
7329
|
plan_name: se(C.name),
|
|
7330
|
-
interval:
|
|
7330
|
+
interval: m,
|
|
7331
7331
|
current_plan_name: A ? se(A.name) : void 0
|
|
7332
|
-
}), t(C.id,
|
|
7332
|
+
}), t(C.id, m);
|
|
7333
7333
|
},
|
|
7334
|
-
children:
|
|
7334
|
+
children: g("upgradeUpgrade")
|
|
7335
7335
|
}
|
|
7336
7336
|
),
|
|
7337
7337
|
/* @__PURE__ */ u("ul", { className: "bpb-plan-card__features", children: [
|
|
7338
7338
|
Pe && /* @__PURE__ */ u("li", { className: "bpb-plan-card__features-lead", children: [
|
|
7339
7339
|
/* @__PURE__ */ o("span", { className: "bpb-plan-card__feature-chip bpb-plan-card__feature-chip--lead", children: /* @__PURE__ */ o(Ao, { size: 13 }) }),
|
|
7340
|
-
/* @__PURE__ */ o("span", { children:
|
|
7340
|
+
/* @__PURE__ */ o("span", { children: g("upgradeEverythingIn", { planName: se(Pe.name) }) })
|
|
7341
7341
|
] }),
|
|
7342
7342
|
Ce.map((Se) => {
|
|
7343
|
-
const Ge = pt(Se), Fe = Un[Se], ca = Fe !== void 0 ?
|
|
7343
|
+
const Ge = pt(Se), Fe = Un[Se], ca = Fe !== void 0 ? g(Fe.label) : Se, Le = (l == null ? void 0 : l[Se]) ?? (Fe !== void 0 ? g(Fe.desc) : void 0);
|
|
7344
7344
|
return /* @__PURE__ */ u("li", { children: [
|
|
7345
7345
|
/* @__PURE__ */ o("span", { className: "bpb-plan-card__feature-chip", children: /* @__PURE__ */ o(Ge, { size: 13 }) }),
|
|
7346
7346
|
Le ? /* @__PURE__ */ o(Ia, { label: ca, children: Le }) : /* @__PURE__ */ o("span", { children: ca })
|
|
@@ -7354,11 +7354,11 @@ const qo = ({
|
|
|
7354
7354
|
})
|
|
7355
7355
|
] }),
|
|
7356
7356
|
/* @__PURE__ */ u("p", { className: "bpb-upgrade__footer", children: [
|
|
7357
|
-
|
|
7357
|
+
g("upgradeFooterEnterprise"),
|
|
7358
7358
|
" ",
|
|
7359
|
-
/* @__PURE__ */ o("a", { href:
|
|
7359
|
+
/* @__PURE__ */ o("a", { href: j, target: "_blank", rel: "noopener noreferrer", children: g("upgradeContactUs") }),
|
|
7360
7360
|
" ",
|
|
7361
|
-
|
|
7361
|
+
g("upgradeFooterAboutEnterprise"),
|
|
7362
7362
|
" ",
|
|
7363
7363
|
/* @__PURE__ */ o("a", { href: "https://botpress.com/pricing", target: "_blank", rel: "noopener noreferrer", children: "botpress.com/pricing" }),
|
|
7364
7364
|
"."
|
|
@@ -7459,17 +7459,17 @@ const Vo = 4, jo = ({
|
|
|
7459
7459
|
isSubmitting: i,
|
|
7460
7460
|
onSubscribe: l
|
|
7461
7461
|
}) => {
|
|
7462
|
-
var
|
|
7463
|
-
const { locale: c } = G(), { t: d } = oe(), { data: p } = ia(),
|
|
7462
|
+
var j, E, B, $, K;
|
|
7463
|
+
const { locale: c } = G(), { t: d } = oe(), { data: p } = ia(), g = ((j = a == null ? void 0 : a.prices.month) == null ? void 0 : j.currency) ?? ((E = a == null ? void 0 : a.prices.year) == null ? void 0 : E.currency) ?? "usd", m = a == null ? void 0 : a.features.conversation_sessions, h = a && ue(a) === "community" ? d("conversationsUnit") : d("conversationsPerMonth"), b = a ? rt(p, a, e) : null, _ = (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, y = t != null && t.nextBillingDate ? Co(t.nextBillingDate, 1) : null, k = y && !sa(y) ? Oe(y, c) : null, x = a ? st[ue(a)].slice(0, Vo) : [], S = a ? ((B = a.prices[e]) == null ? void 0 : B.amount) ?? 0 : 0, w = (t == null ? void 0 : t.costs.immediate.lineItems) ?? [], A = w.filter((z) => z.type === "discount"), f = w.filter((z) => z.type === "proration_credit" || z.type === "proration_charge").reduce((z, C) => z + C.amount, 0), T = !!(t != null && t.subscription.plan.effectiveDate), I = (($ = a == null ? void 0 : a.prices.month) == null ? void 0 : $.amount) ?? 0, D = ((K = a == null ? void 0 : a.prices.year) == null ? void 0 : K.amount) ?? 0, q = e === "year" && I > 0 && D > 0 ? Math.round(I * 12 - D) : 0, R = Math.round(q / 12);
|
|
7464
7464
|
return /* @__PURE__ */ u("div", { className: "bpb-summary-wrap", children: [
|
|
7465
7465
|
/* @__PURE__ */ u("div", { className: "bpb-summary bpb-glow", children: [
|
|
7466
7466
|
/* @__PURE__ */ o("h3", { className: "bpb-summary__title", children: a ? `${se(a.name)} plan` : /* @__PURE__ */ o(X, { width: 140, height: 24 }) }),
|
|
7467
|
-
|
|
7468
|
-
/* @__PURE__ */ o("span", { className: "bpb-summary__metric-value", children: re(
|
|
7469
|
-
/* @__PURE__ */ o("span", { className: "bpb-summary__metric-unit", children:
|
|
7470
|
-
|
|
7471
|
-
price: Z(
|
|
7472
|
-
packSize: re(
|
|
7467
|
+
m !== void 0 && /* @__PURE__ */ u("div", { className: "bpb-summary__metric", children: [
|
|
7468
|
+
/* @__PURE__ */ o("span", { className: "bpb-summary__metric-value", children: re(m) }),
|
|
7469
|
+
/* @__PURE__ */ o("span", { className: "bpb-summary__metric-unit", children: h }),
|
|
7470
|
+
b && /* @__PURE__ */ o("span", { className: "bpb-summary__metric-pack", children: d("orderThen", {
|
|
7471
|
+
price: Z(b.amount, b.currency, 0),
|
|
7472
|
+
packSize: re(b.packSize)
|
|
7473
7473
|
}) })
|
|
7474
7474
|
] }),
|
|
7475
7475
|
x.length > 0 && /* @__PURE__ */ u(ye, { children: [
|
|
@@ -7498,19 +7498,19 @@ const Vo = 4, jo = ({
|
|
|
7498
7498
|
/* @__PURE__ */ u("div", { className: "bpb-summary__line", children: [
|
|
7499
7499
|
/* @__PURE__ */ o("span", { className: "bpb-summary__line-label", children: k ? d("orderPlanFromDate", { plan: a ? se(a.name) : "", date: k }) : `${a ? se(a.name) : ""} plan` }),
|
|
7500
7500
|
/* @__PURE__ */ u("span", { className: "bpb-summary__line-amount", children: [
|
|
7501
|
-
Z(v,
|
|
7501
|
+
Z(v, g),
|
|
7502
7502
|
d(e === "year" ? "perYear" : "perMonth")
|
|
7503
7503
|
] })
|
|
7504
7504
|
] }),
|
|
7505
7505
|
/* @__PURE__ */ u("div", { className: "bpb-summary__line", children: [
|
|
7506
7506
|
/* @__PURE__ */ o("span", { className: "bpb-summary__line-label", children: /* @__PURE__ */ o(Ia, { label: d("orderProratedToday"), children: d("orderProratedTodayDesc") }) }),
|
|
7507
|
-
/* @__PURE__ */ o("span", { className: "bpb-summary__line-amount", children: Z(
|
|
7507
|
+
/* @__PURE__ */ o("span", { className: "bpb-summary__line-amount", children: Z(_, g) })
|
|
7508
7508
|
] }),
|
|
7509
7509
|
/* @__PURE__ */ u("div", { className: "bpb-summary__line bpb-summary__line--total", children: [
|
|
7510
7510
|
/* @__PURE__ */ o("span", { children: d("orderDueToday") }),
|
|
7511
|
-
/* @__PURE__ */ o("span", { children: Z(
|
|
7511
|
+
/* @__PURE__ */ o("span", { children: Z(_, g) })
|
|
7512
7512
|
] }),
|
|
7513
|
-
f < 0 && /* @__PURE__ */ o("p", { className: "bpb-summary__addon-note", children: d("orderCreditTowardNext", { amount: Z(Math.abs(f),
|
|
7513
|
+
f < 0 && /* @__PURE__ */ o("p", { className: "bpb-summary__addon-note", children: d("orderCreditTowardNext", { amount: Z(Math.abs(f), g) }) })
|
|
7514
7514
|
] }),
|
|
7515
7515
|
t && !n && !T && /* @__PURE__ */ u("div", { className: "bpb-summary__lines", children: [
|
|
7516
7516
|
/* @__PURE__ */ u("div", { className: "bpb-summary__line", children: [
|
|
@@ -7521,33 +7521,33 @@ const Vo = 4, jo = ({
|
|
|
7521
7521
|
")"
|
|
7522
7522
|
] }),
|
|
7523
7523
|
/* @__PURE__ */ u("span", { className: "bpb-summary__line-amount", children: [
|
|
7524
|
-
Z(
|
|
7524
|
+
Z(S, g),
|
|
7525
7525
|
d(e === "year" ? "perYear" : "perMonth")
|
|
7526
7526
|
] })
|
|
7527
7527
|
] }),
|
|
7528
7528
|
A.map((z, C) => /* @__PURE__ */ u("div", { className: "bpb-summary__line", children: [
|
|
7529
7529
|
/* @__PURE__ */ o("span", { className: "bpb-summary__line-label", children: z.description }),
|
|
7530
|
-
/* @__PURE__ */ o("span", { className: "bpb-summary__line-amount", children: Z(z.amount,
|
|
7530
|
+
/* @__PURE__ */ o("span", { className: "bpb-summary__line-amount", children: Z(z.amount, g) })
|
|
7531
7531
|
] }, `${z.id}-${C}`)),
|
|
7532
7532
|
f !== 0 && /* @__PURE__ */ u("div", { className: "bpb-summary__line", children: [
|
|
7533
7533
|
/* @__PURE__ */ o("span", { className: "bpb-summary__line-label", children: /* @__PURE__ */ o(Ia, { label: f < 0 ? d("orderCreditUnusedTime") : d("orderAdjustUnusedTime"), children: f < 0 ? d("orderCreditUnusedTimeDesc") : d("orderAdjustUnusedTimeDesc") }) }),
|
|
7534
|
-
/* @__PURE__ */ o("span", { className: "bpb-summary__line-amount", children: Z(f,
|
|
7534
|
+
/* @__PURE__ */ o("span", { className: "bpb-summary__line-amount", children: Z(f, g) })
|
|
7535
7535
|
] }),
|
|
7536
|
-
|
|
7536
|
+
N !== 0 && /* @__PURE__ */ u("div", { className: "bpb-summary__line", children: [
|
|
7537
7537
|
/* @__PURE__ */ o("span", { className: "bpb-summary__line-label", children: d("orderAccountCredit") }),
|
|
7538
|
-
/* @__PURE__ */ o("span", { className: "bpb-summary__line-amount", children: Z(
|
|
7538
|
+
/* @__PURE__ */ o("span", { className: "bpb-summary__line-amount", children: Z(N, g) })
|
|
7539
7539
|
] }),
|
|
7540
7540
|
/* @__PURE__ */ u("div", { className: "bpb-summary__line bpb-summary__line--total", children: [
|
|
7541
7541
|
/* @__PURE__ */ o("span", { children: d("orderDueToday") }),
|
|
7542
|
-
/* @__PURE__ */ o("span", { children: Z(
|
|
7542
|
+
/* @__PURE__ */ o("span", { children: Z(_, g) })
|
|
7543
7543
|
] }),
|
|
7544
|
-
f < 0 &&
|
|
7544
|
+
f < 0 && _ === 0 && /* @__PURE__ */ o("p", { className: "bpb-summary__addon-note", children: d("orderBalanceAsCredit", { amount: Z(Math.abs(f), g) }) })
|
|
7545
7545
|
] }),
|
|
7546
|
-
|
|
7546
|
+
q > 0 && /* @__PURE__ */ u("div", { className: "bpb-summary__savings", children: [
|
|
7547
7547
|
/* @__PURE__ */ o(qn, { size: 18, className: "bpb-summary__savings-icon" }),
|
|
7548
7548
|
/* @__PURE__ */ o("span", { children: d("orderSavingsNote", {
|
|
7549
|
-
monthlySavings: Z(
|
|
7550
|
-
yearlySavings: Z(
|
|
7549
|
+
monthlySavings: Z(R, g, 0),
|
|
7550
|
+
yearlySavings: Z(q, g, 0)
|
|
7551
7551
|
}) })
|
|
7552
7552
|
] }),
|
|
7553
7553
|
/* @__PURE__ */ o(
|
|
@@ -7569,11 +7569,11 @@ const Vo = 4, jo = ({
|
|
|
7569
7569
|
t && /* @__PURE__ */ u(ye, { children: [
|
|
7570
7570
|
" ",
|
|
7571
7571
|
k ? d("orderChargedStarting", {
|
|
7572
|
-
amount: Z(v,
|
|
7572
|
+
amount: Z(v, g),
|
|
7573
7573
|
period: d(e === "month" ? "perMonthLong" : "perYearLong"),
|
|
7574
7574
|
date: k
|
|
7575
7575
|
}) : d("orderChargedNoDate", {
|
|
7576
|
-
amount: Z(v,
|
|
7576
|
+
amount: Z(v, g),
|
|
7577
7577
|
period: d(e === "month" ? "perMonthLong" : "perYearLong")
|
|
7578
7578
|
})
|
|
7579
7579
|
] }),
|
|
@@ -7643,16 +7643,16 @@ function Yn(a) {
|
|
|
7643
7643
|
const e = a.toUpperCase();
|
|
7644
7644
|
return Wo.includes(e) ? Ko : Go[e] ?? [];
|
|
7645
7645
|
}
|
|
7646
|
-
const Za = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ u("label", { className:
|
|
7646
|
+
const Za = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ u("label", { className: U("bpb-input", e), children: [
|
|
7647
7647
|
/* @__PURE__ */ o("span", { className: "bpb-input__label", children: a }),
|
|
7648
7648
|
/* @__PURE__ */ o("input", { className: "bpb-input__field bpb-input__field--labeled", id: t, ...n })
|
|
7649
|
-
] }) : /* @__PURE__ */ o("input", { className:
|
|
7649
|
+
] }) : /* @__PURE__ */ o("input", { className: U("bpb-input__field", e), id: t, ...n }), Jn = ({ label: a, className: e, children: t, ...n }) => /* @__PURE__ */ u("label", { className: U("bpb-input", e), children: [
|
|
7650
7650
|
a && /* @__PURE__ */ o("span", { className: "bpb-input__label", children: a }),
|
|
7651
7651
|
/* @__PURE__ */ u("span", { className: "bpb-input__select-wrap", children: [
|
|
7652
7652
|
/* @__PURE__ */ o(
|
|
7653
7653
|
"select",
|
|
7654
7654
|
{
|
|
7655
|
-
className:
|
|
7655
|
+
className: U("bpb-input__field bpb-input__field--select", a && "bpb-input__field--labeled"),
|
|
7656
7656
|
...n,
|
|
7657
7657
|
children: t
|
|
7658
7658
|
}
|
|
@@ -7674,7 +7674,7 @@ const Za = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ u("l
|
|
|
7674
7674
|
type: "button",
|
|
7675
7675
|
role: "radio",
|
|
7676
7676
|
"aria-checked": e === "month",
|
|
7677
|
-
className:
|
|
7677
|
+
className: U("bpb-interval-card", e === "month" && "bpb-interval-card--selected"),
|
|
7678
7678
|
onClick: () => t("month"),
|
|
7679
7679
|
children: [
|
|
7680
7680
|
/* @__PURE__ */ o("span", { className: "bpb-interval-card__title", children: n("checkoutMonthlyBilling") }),
|
|
@@ -7692,7 +7692,7 @@ const Za = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ u("l
|
|
|
7692
7692
|
type: "button",
|
|
7693
7693
|
role: "radio",
|
|
7694
7694
|
"aria-checked": e === "year",
|
|
7695
|
-
className:
|
|
7695
|
+
className: U("bpb-interval-card", e === "year" && "bpb-interval-card--selected"),
|
|
7696
7696
|
onClick: () => t("year"),
|
|
7697
7697
|
children: [
|
|
7698
7698
|
/* @__PURE__ */ u("span", { className: "bpb-interval-card__title", children: [
|
|
@@ -7745,7 +7745,7 @@ const Za = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ u("l
|
|
|
7745
7745
|
type: "button",
|
|
7746
7746
|
role: "tab",
|
|
7747
7747
|
"aria-selected": n === "saved",
|
|
7748
|
-
className:
|
|
7748
|
+
className: U("bpb-pay-tab", n === "saved" && "bpb-pay-tab--selected"),
|
|
7749
7749
|
onClick: () => r("saved"),
|
|
7750
7750
|
children: [
|
|
7751
7751
|
/* @__PURE__ */ o(Ht, { size: 16 }),
|
|
@@ -7759,7 +7759,7 @@ const Za = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ u("l
|
|
|
7759
7759
|
type: "button",
|
|
7760
7760
|
role: "tab",
|
|
7761
7761
|
"aria-selected": n === "new",
|
|
7762
|
-
className:
|
|
7762
|
+
className: U("bpb-pay-tab", n === "new" && "bpb-pay-tab--selected"),
|
|
7763
7763
|
onClick: () => r("new"),
|
|
7764
7764
|
children: [
|
|
7765
7765
|
/* @__PURE__ */ o(Ht, { size: 16 }),
|
|
@@ -7783,7 +7783,7 @@ const Za = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ u("l
|
|
|
7783
7783
|
] }),
|
|
7784
7784
|
d && /* @__PURE__ */ u("div", { className: "bpb-payment-element", children: [
|
|
7785
7785
|
!l && /* @__PURE__ */ o("div", { className: "bpb-payment-element__skeleton", children: /* @__PURE__ */ o(X, { height: 48 }) }),
|
|
7786
|
-
/* @__PURE__ */ o("div", { className:
|
|
7786
|
+
/* @__PURE__ */ o("div", { className: U("bpb-card-element", !l && "bpb-payment-element--hidden"), children: /* @__PURE__ */ o(
|
|
7787
7787
|
Aa,
|
|
7788
7788
|
{
|
|
7789
7789
|
options: { style: Kn(t), hidePostalCode: !0 },
|
|
@@ -7805,23 +7805,23 @@ const Za = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ u("l
|
|
|
7805
7805
|
onCountryChange: c,
|
|
7806
7806
|
country: d,
|
|
7807
7807
|
isBusiness: p,
|
|
7808
|
-
onIsBusinessChange:
|
|
7809
|
-
businessName:
|
|
7810
|
-
onBusinessNameChange:
|
|
7811
|
-
taxType:
|
|
7812
|
-
onTaxTypeChange:
|
|
7813
|
-
taxValue:
|
|
7808
|
+
onIsBusinessChange: g,
|
|
7809
|
+
businessName: m,
|
|
7810
|
+
onBusinessNameChange: h,
|
|
7811
|
+
taxType: b,
|
|
7812
|
+
onTaxTypeChange: _,
|
|
7813
|
+
taxValue: N,
|
|
7814
7814
|
onTaxValueChange: v
|
|
7815
7815
|
}) => {
|
|
7816
|
-
const { t: y } = oe(), [k, x] = H(!1),
|
|
7816
|
+
const { t: y } = oe(), [k, x] = H(!1), S = r || !e, w = Yn(d), A = w.find((f) => f.type === b);
|
|
7817
7817
|
return /* @__PURE__ */ u("section", { className: "bpb-step", children: [
|
|
7818
7818
|
/* @__PURE__ */ o(Qn, { number: a, title: y("checkoutBillingAddressTitle") }),
|
|
7819
|
-
n ? /* @__PURE__ */ o(X, { height: 72 }) :
|
|
7819
|
+
n ? /* @__PURE__ */ o(X, { height: 72 }) : S ? /* @__PURE__ */ u("div", { className: "bpb-payment-element", children: [
|
|
7820
7820
|
!k && /* @__PURE__ */ u("div", { className: "bpb-payment-element__skeleton", children: [
|
|
7821
7821
|
/* @__PURE__ */ o(X, { height: 48 }),
|
|
7822
7822
|
/* @__PURE__ */ o(X, { height: 48 })
|
|
7823
7823
|
] }),
|
|
7824
|
-
/* @__PURE__ */ o("div", { className:
|
|
7824
|
+
/* @__PURE__ */ o("div", { className: U(!k && "bpb-payment-element--hidden"), children: /* @__PURE__ */ o(
|
|
7825
7825
|
en,
|
|
7826
7826
|
{
|
|
7827
7827
|
options: {
|
|
@@ -7881,7 +7881,7 @@ const Za = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ u("l
|
|
|
7881
7881
|
type: "checkbox",
|
|
7882
7882
|
checked: p,
|
|
7883
7883
|
onChange: (f) => {
|
|
7884
|
-
|
|
7884
|
+
g(f.target.checked), f.target.checked && !b && w[0] && _(w[0].type);
|
|
7885
7885
|
}
|
|
7886
7886
|
}
|
|
7887
7887
|
),
|
|
@@ -7893,19 +7893,19 @@ const Za = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ u("l
|
|
|
7893
7893
|
Za,
|
|
7894
7894
|
{
|
|
7895
7895
|
placeholder: y("checkoutBusinessNamePlaceholder"),
|
|
7896
|
-
value:
|
|
7897
|
-
onChange: (f) =>
|
|
7896
|
+
value: m,
|
|
7897
|
+
onChange: (f) => h(f.target.value),
|
|
7898
7898
|
autoComplete: "organization"
|
|
7899
7899
|
}
|
|
7900
7900
|
),
|
|
7901
|
-
|
|
7901
|
+
w.length > 0 ? /* @__PURE__ */ u(ye, { children: [
|
|
7902
7902
|
/* @__PURE__ */ o(
|
|
7903
7903
|
Jn,
|
|
7904
7904
|
{
|
|
7905
7905
|
"aria-label": y("checkoutTaxIdTypeLabel"),
|
|
7906
|
-
value:
|
|
7907
|
-
onChange: (f) =>
|
|
7908
|
-
children:
|
|
7906
|
+
value: b,
|
|
7907
|
+
onChange: (f) => _(f.target.value),
|
|
7908
|
+
children: w.map((f) => /* @__PURE__ */ u("option", { value: f.type, children: [
|
|
7909
7909
|
f.label,
|
|
7910
7910
|
" — ",
|
|
7911
7911
|
f.description
|
|
@@ -7916,7 +7916,7 @@ const Za = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ u("l
|
|
|
7916
7916
|
Za,
|
|
7917
7917
|
{
|
|
7918
7918
|
placeholder: A ? A.description : y("checkoutTaxIdNumberPlaceholder"),
|
|
7919
|
-
value:
|
|
7919
|
+
value: N,
|
|
7920
7920
|
onChange: (f) => v(f.target.value),
|
|
7921
7921
|
inputMode: "text"
|
|
7922
7922
|
}
|
|
@@ -7926,30 +7926,30 @@ const Za = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ u("l
|
|
|
7926
7926
|
] });
|
|
7927
7927
|
}, Qo = ({ planId: a, initialInterval: e, onSuccess: t }) => {
|
|
7928
7928
|
var bt;
|
|
7929
|
-
const n = an(), r = tn(), { email: s, toast: i, analytics: l, isDark: c } = G(), { t: d } = oe(), [p,
|
|
7929
|
+
const n = an(), r = tn(), { email: s, toast: i, analytics: l, isDark: c } = G(), { t: d } = oe(), [p, g] = H(e), [m, h] = H("payment"), [b, _] = H(null), [N, v] = H(!1), [y, k] = H(!1), [x, S] = H(!1), [w, A] = H(void 0), [f, T] = H(!1), [I, D] = H(""), [q, R] = H(""), [j, E] = H(""), [B, $] = H(!1), [K, z] = H(null), [C, ee] = H(!1), ae = yn(), { data: ie } = Ue(), { data: P } = Re(), { data: O, isLoading: M } = gn(), { data: Y, isLoading: ge } = hn(), { data: J } = bn(), le = ie == null ? void 0 : ie.find((Ne) => Ne.id === a), fe = ((bt = O == null ? void 0 : O.paymentMethod) == null ? void 0 : bt.card) ?? null, de = (Y == null ? void 0 : Y.address) ?? null;
|
|
7930
7930
|
we(() => {
|
|
7931
|
-
|
|
7932
|
-
}, [
|
|
7933
|
-
|
|
7934
|
-
}, [
|
|
7935
|
-
const Pe = ke(() => ({ plan: { planId: a, interval: p } }), [a, p]), Ce = mn(Pe), We = vn(), Q = Cn(), ve = Nn(), te = _n(), ce = le ? se(le.name) : "", Se =
|
|
7931
|
+
b === null && !M && O !== void 0 && _(fe ? "saved" : "new");
|
|
7932
|
+
}, [b, M, O, fe]), we(() => {
|
|
7933
|
+
w === void 0 && de && A(de.country);
|
|
7934
|
+
}, [w, de]);
|
|
7935
|
+
const Pe = ke(() => ({ plan: { planId: a, interval: p } }), [a, p]), Ce = mn(Pe), We = vn(), Q = Cn(), ve = Nn(), te = _n(), ce = le ? se(le.name) : "", Se = b === "new" || !fe, Ge = y || !de, Fe = Se ? N : !!fe, ca = Ge ? x : !0;
|
|
7936
7936
|
we(() => {
|
|
7937
|
-
|
|
7937
|
+
h(Fe ? "address" : "payment");
|
|
7938
7938
|
}, [Fe]), we(() => {
|
|
7939
|
-
l.capture(pe.CHECKOUT_STEP_VIEWED, { plan_name: ce, interval: p, step:
|
|
7940
|
-
}, [l,
|
|
7939
|
+
l.capture(pe.CHECKOUT_STEP_VIEWED, { plan_name: ce, interval: p, step: m });
|
|
7940
|
+
}, [l, m]);
|
|
7941
7941
|
const Le = (Ne) => {
|
|
7942
|
-
Ne !== p && l.capture(pe.CHECKOUT_INTERVAL_CHANGED, { plan_name: ce, interval: Ne }),
|
|
7942
|
+
Ne !== p && l.capture(pe.CHECKOUT_INTERVAL_CHANGED, { plan_name: ce, interval: Ne }), g(Ne);
|
|
7943
7943
|
}, nr = (Ne) => {
|
|
7944
|
-
l.capture(pe.PAYMENT_METHOD_SELECTED, { method: Ne === "saved" ? "saved_card" : "new_card" }),
|
|
7944
|
+
l.capture(pe.PAYMENT_METHOD_SELECTED, { method: Ne === "saved" ? "saved_card" : "new_card" }), _(Ne);
|
|
7945
7945
|
}, rr = (Ne) => {
|
|
7946
7946
|
v(Ne), ee(!1);
|
|
7947
|
-
}, sr = !!n && !!r && !!le && !Ce.isError && !!Ce.data && Fe && ca && !
|
|
7947
|
+
}, sr = !!n && !!r && !!le && !Ce.isError && !!Ce.data && Fe && ca && !B, or = async () => {
|
|
7948
7948
|
var ft, yt, vt, Ct;
|
|
7949
7949
|
if (!n || !r || !le)
|
|
7950
7950
|
return;
|
|
7951
|
-
|
|
7952
|
-
const Ne = (Ke, fa) => l.capture(pe.CHECKOUT_ERROR, { plan_name: ce, interval: p, step:
|
|
7951
|
+
$(!0), z(null);
|
|
7952
|
+
const Ne = (Ke, fa) => l.capture(pe.CHECKOUT_ERROR, { plan_name: ce, interval: p, step: m, reason: Ke, message: fa });
|
|
7953
7953
|
try {
|
|
7954
7954
|
if (l.capture(pe.PAYMENT_DETAILS_CONFIRMED, { plan_name: ce, interval: p }), Se && !C) {
|
|
7955
7955
|
const He = r.getElement(Aa);
|
|
@@ -7964,7 +7964,7 @@ const Za = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ u("l
|
|
|
7964
7964
|
z(Be.message ?? d("checkoutPaymentSetupFailed")), l.capture(pe.CHECKOUT_ERROR, {
|
|
7965
7965
|
plan_name: ce,
|
|
7966
7966
|
interval: p,
|
|
7967
|
-
step:
|
|
7967
|
+
step: m,
|
|
7968
7968
|
reason: Be.code ?? "card_setup_failed",
|
|
7969
7969
|
decline_code: Be.decline_code,
|
|
7970
7970
|
message: Be.message
|
|
@@ -7997,7 +7997,7 @@ const Za = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ u("l
|
|
|
7997
7997
|
});
|
|
7998
7998
|
}
|
|
7999
7999
|
}
|
|
8000
|
-
const fa = f &&
|
|
8000
|
+
const fa = f && I.trim() || Ke || void 0, Nt = f && q && j.trim() ? [{ type: q, value: j.trim() }] : void 0;
|
|
8001
8001
|
(fa !== void 0 || Nt !== void 0) && await ve.mutateAsync({ name: fa, taxIds: Nt });
|
|
8002
8002
|
const ir = ((yt = Ce.data) == null ? void 0 : yt.costs.immediate.amountDue) ?? 0, lr = ((vt = Ce.data) == null ? void 0 : vt.costs.nextCycle.total) ?? 0;
|
|
8003
8003
|
await te.mutateAsync({ planId: a, interval: p }), l.capture(pe.PLAN_UPGRADED, {
|
|
@@ -8011,7 +8011,7 @@ const Za = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ u("l
|
|
|
8011
8011
|
} catch (Ke) {
|
|
8012
8012
|
z(d("checkoutGenericError")), Ne("exception", Ke instanceof Error ? Ke.message : void 0), i({ type: "error", message: d("checkoutErrorToast") });
|
|
8013
8013
|
} finally {
|
|
8014
|
-
|
|
8014
|
+
$(!1);
|
|
8015
8015
|
}
|
|
8016
8016
|
};
|
|
8017
8017
|
return /* @__PURE__ */ u("div", { className: "bpb-checkout__columns", children: [
|
|
@@ -8030,12 +8030,12 @@ const Za = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ u("l
|
|
|
8030
8030
|
stepNumber: 1,
|
|
8031
8031
|
savedCard: fe,
|
|
8032
8032
|
isDark: c,
|
|
8033
|
-
tab:
|
|
8033
|
+
tab: b ?? "new",
|
|
8034
8034
|
onTabChange: nr,
|
|
8035
8035
|
onPaymentChange: rr
|
|
8036
8036
|
}
|
|
8037
8037
|
),
|
|
8038
|
-
|
|
8038
|
+
m === "address" && /* @__PURE__ */ o(
|
|
8039
8039
|
Jo,
|
|
8040
8040
|
{
|
|
8041
8041
|
stepNumber: 2,
|
|
@@ -8045,17 +8045,17 @@ const Za = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ u("l
|
|
|
8045
8045
|
editing: y,
|
|
8046
8046
|
onEdit: () => k(!0),
|
|
8047
8047
|
onCancelEdit: de ? () => k(!1) : void 0,
|
|
8048
|
-
onReady: () =>
|
|
8048
|
+
onReady: () => S(!0),
|
|
8049
8049
|
onCountryChange: A,
|
|
8050
|
-
country:
|
|
8050
|
+
country: w,
|
|
8051
8051
|
isBusiness: f,
|
|
8052
8052
|
onIsBusinessChange: T,
|
|
8053
|
-
businessName:
|
|
8053
|
+
businessName: I,
|
|
8054
8054
|
onBusinessNameChange: D,
|
|
8055
|
-
taxType:
|
|
8056
|
-
onTaxTypeChange:
|
|
8057
|
-
taxValue:
|
|
8058
|
-
onTaxValueChange:
|
|
8055
|
+
taxType: q,
|
|
8056
|
+
onTaxTypeChange: R,
|
|
8057
|
+
taxValue: j,
|
|
8058
|
+
onTaxValueChange: E
|
|
8059
8059
|
}
|
|
8060
8060
|
),
|
|
8061
8061
|
K && /* @__PURE__ */ o("p", { role: "alert", className: "bpb-checkout__submit-error", children: K })
|
|
@@ -8069,13 +8069,13 @@ const Za = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ u("l
|
|
|
8069
8069
|
isLoadingPreview: Ce.isLoading,
|
|
8070
8070
|
isPreviewError: Ce.isError,
|
|
8071
8071
|
canSubscribe: sr,
|
|
8072
|
-
isSubmitting:
|
|
8072
|
+
isSubmitting: B,
|
|
8073
8073
|
onSubscribe: () => void or()
|
|
8074
8074
|
}
|
|
8075
8075
|
) })
|
|
8076
8076
|
] });
|
|
8077
8077
|
}, Zo = ({ open: a, onOpenChange: e, planId: t, interval: n, onBack: r, onSuccess: s }) => {
|
|
8078
|
-
const { stripePromise: i, isDark: l, locale: c, isOutdatedBilling: d } = G(), { t: p } = oe(),
|
|
8078
|
+
const { stripePromise: i, isDark: l, locale: c, isOutdatedBilling: d } = G(), { t: p } = oe(), g = ke(
|
|
8079
8079
|
() => ({
|
|
8080
8080
|
appearance: Gn(l),
|
|
8081
8081
|
locale: Hn(c)
|
|
@@ -8087,7 +8087,7 @@ const Za = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ u("l
|
|
|
8087
8087
|
r && /* @__PURE__ */ o("button", { type: "button", className: "bpb-checkout__back", "aria-label": p("checkoutBackLabel"), onClick: r, children: /* @__PURE__ */ o($n, { size: 18 }) }),
|
|
8088
8088
|
/* @__PURE__ */ o("h2", { className: "bpb-checkout__title", children: p("checkoutTitle") })
|
|
8089
8089
|
] }),
|
|
8090
|
-
/* @__PURE__ */ o(nn, { stripe: i, options:
|
|
8090
|
+
/* @__PURE__ */ o(nn, { stripe: i, options: g, children: /* @__PURE__ */ o(
|
|
8091
8091
|
Qo,
|
|
8092
8092
|
{
|
|
8093
8093
|
planId: t,
|
|
@@ -8100,7 +8100,7 @@ const Za = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ u("l
|
|
|
8100
8100
|
] }) });
|
|
8101
8101
|
}, Xo = ({ value: a, onChange: e, min: t = 0, max: n, step: r = 1, className: s, ...i }) => {
|
|
8102
8102
|
const l = () => e(Math.max(t, a - r)), c = () => e(n === void 0 ? a + r : Math.min(n, a + r));
|
|
8103
|
-
return /* @__PURE__ */ u("div", { className:
|
|
8103
|
+
return /* @__PURE__ */ u("div", { className: U("bpb-stepper", s), children: [
|
|
8104
8104
|
/* @__PURE__ */ o(
|
|
8105
8105
|
"button",
|
|
8106
8106
|
{
|
|
@@ -8144,7 +8144,7 @@ const Za = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ u("l
|
|
|
8144
8144
|
onUpgrade: t
|
|
8145
8145
|
}) => {
|
|
8146
8146
|
var C, ee, ae, ie;
|
|
8147
|
-
const { toast: n, locale: r } = G(), { t: s } = oe(), { data: i } = Re(), { data: l } = ia(), { data: c } = Ue(), { data: d } = fn(), p = As(), [
|
|
8147
|
+
const { toast: n, locale: r } = G(), { t: s } = oe(), { data: i } = Re(), { data: l } = ia(), { data: c } = Ue(), { data: d } = fn(), p = As(), [g, m] = H(null), h = c == null ? void 0 : c.find((P) => P.id === (i == null ? void 0 : i.plan.current.planId)), b = (i == null ? void 0 : i.plan.current.interval) ?? "month", _ = (d == null ? void 0 : d.addonsReadonly) ?? !1, N = i == null ? void 0 : i.plan.current.periodEnd, v = N && !sa(N) ? Oe(N, r) : null, y = ke(() => {
|
|
8148
8148
|
var O;
|
|
8149
8149
|
if (!i || !l)
|
|
8150
8150
|
return null;
|
|
@@ -8154,18 +8154,18 @@ const Za = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ u("l
|
|
|
8154
8154
|
P[M.id] = ((O = Y == null ? void 0 : Y.next) == null ? void 0 : O.quantity) ?? (Y == null ? void 0 : Y.current.quantity) ?? 0;
|
|
8155
8155
|
}
|
|
8156
8156
|
return P;
|
|
8157
|
-
}, [i, l]), k =
|
|
8158
|
-
const O = nt(P,
|
|
8157
|
+
}, [i, l]), k = g ?? y, x = ke(() => !l || !h ? [] : l.flatMap((P) => {
|
|
8158
|
+
const O = nt(P, h, b);
|
|
8159
8159
|
return O ? [{ addon: P, price: O }] : [];
|
|
8160
|
-
}), [l,
|
|
8160
|
+
}), [l, h, b]), S = !!k && !!y && Object.keys(k).some((P) => k[P] !== y[P]), w = x.reduce(
|
|
8161
8161
|
(P, { addon: O, price: M }) => P + ((k == null ? void 0 : k[O.id]) ?? 0) * M.amount,
|
|
8162
8162
|
0
|
|
8163
8163
|
), A = ke(
|
|
8164
|
-
() =>
|
|
8165
|
-
[
|
|
8166
|
-
), f = mn(A ?? { plan: { planId: "", interval:
|
|
8167
|
-
enabled: !!A &&
|
|
8168
|
-
}), T = ((C =
|
|
8164
|
+
() => h && k ? { plan: { planId: h.id, interval: b }, addons: k } : null,
|
|
8165
|
+
[h, b, k]
|
|
8166
|
+
), f = mn(A ?? { plan: { planId: "", interval: b } }, {
|
|
8167
|
+
enabled: !!A && S
|
|
8168
|
+
}), T = ((C = h == null ? void 0 : h.prices[b]) == null ? void 0 : C.currency) ?? "usd", I = ((ee = f.data) == null ? void 0 : ee.costs.immediate.amountDue) ?? 0, D = (ae = f.data) == null ? void 0 : ae.nextBillingDate, q = D && !sa(D) ? Oe(D, r) : null, R = ((ie = h == null ? void 0 : h.prices[b]) == null ? void 0 : ie.amount) ?? 0, j = R + w, E = h && k ? So(h, l, k) : [], B = (P, O) => O === "bytes" ? na(P) : re(P), $ = (P, O) => {
|
|
8169
8169
|
const M = l == null ? void 0 : l.find((le) => le.id === P), Y = M == null ? void 0 : M.increments;
|
|
8170
8170
|
if (!Y || O <= 0)
|
|
8171
8171
|
return null;
|
|
@@ -8187,7 +8187,7 @@ const Za = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ u("l
|
|
|
8187
8187
|
}, z = !i || !l || !c;
|
|
8188
8188
|
return /* @__PURE__ */ u("div", { className: "bpb-manage-addons", children: [
|
|
8189
8189
|
/* @__PURE__ */ o("h2", { className: "bpb-manage-addons__title", children: s("addonsDialogTitle") }),
|
|
8190
|
-
(z || x.length > 0) && /* @__PURE__ */ o("p", { className: "bpb-manage-addons__subtitle", children:
|
|
8190
|
+
(z || x.length > 0) && /* @__PURE__ */ o("p", { className: "bpb-manage-addons__subtitle", children: h ? s("addonsSubtitleWithPlan", { planName: se(h.name) }) : s("addonsSubtitleGeneric") }),
|
|
8191
8191
|
z ? /* @__PURE__ */ u("div", { className: "bpb-manage-addons__loading", "aria-busy": "true", children: [
|
|
8192
8192
|
/* @__PURE__ */ o(X, { height: 56 }),
|
|
8193
8193
|
/* @__PURE__ */ o(X, { height: 56 })
|
|
@@ -8213,7 +8213,7 @@ const Za = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ u("l
|
|
|
8213
8213
|
] }) : /* @__PURE__ */ u(ye, { children: [
|
|
8214
8214
|
/* @__PURE__ */ o("div", { className: "bpb-addons", children: x.map(({ addon: P, price: O }) => {
|
|
8215
8215
|
var le;
|
|
8216
|
-
const M = ((le = i == null ? void 0 : i.addons[P.id]) == null ? void 0 : le.current.quantity) ?? 0, Y = (k == null ? void 0 : k[P.id]) ?? 0, ge = Y !== M ? Y === 0 ? v ? s("addonRemovedOnDate", { activeNow: M, date: v }) : s("addonRemovedNextCycle", { activeNow: M }) : v ? s("addonChangedOnDate", { activeNow: M, pending: Y, date: v }) : s("addonChangedNextCycle", { activeNow: M, pending: Y }) : M > 0 ? s("addonActiveOnly", { count: M }) : null, J =
|
|
8216
|
+
const M = ((le = i == null ? void 0 : i.addons[P.id]) == null ? void 0 : le.current.quantity) ?? 0, Y = (k == null ? void 0 : k[P.id]) ?? 0, ge = Y !== M ? Y === 0 ? v ? s("addonRemovedOnDate", { activeNow: M, date: v }) : s("addonRemovedNextCycle", { activeNow: M }) : v ? s("addonChangedOnDate", { activeNow: M, pending: Y, date: v }) : s("addonChangedNextCycle", { activeNow: M, pending: Y }) : M > 0 ? s("addonActiveOnly", { count: M }) : null, J = $(P.id, Y);
|
|
8217
8217
|
return /* @__PURE__ */ u("div", { className: "bpb-addon-row", children: [
|
|
8218
8218
|
/* @__PURE__ */ u("div", { className: "bpb-addon-row__info", children: [
|
|
8219
8219
|
/* @__PURE__ */ o("span", { className: "bpb-addon-row__name", children: $e[P.id] ? s($e[P.id]) : Sa(P.name) }),
|
|
@@ -8226,7 +8226,7 @@ const Za = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ u("l
|
|
|
8226
8226
|
ge && /* @__PURE__ */ o(
|
|
8227
8227
|
"span",
|
|
8228
8228
|
{
|
|
8229
|
-
className:
|
|
8229
|
+
className: U(
|
|
8230
8230
|
"bpb-addon-row__status",
|
|
8231
8231
|
Y !== M && "bpb-addon-row__status--changed"
|
|
8232
8232
|
),
|
|
@@ -8241,15 +8241,15 @@ const Za = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ u("l
|
|
|
8241
8241
|
{
|
|
8242
8242
|
"aria-label": `${$e[P.id] ? s($e[P.id]) : Sa(P.name)} quantity`,
|
|
8243
8243
|
value: Y,
|
|
8244
|
-
onChange: (fe) =>
|
|
8244
|
+
onChange: (fe) => m({ ...k ?? {}, [P.id]: fe })
|
|
8245
8245
|
}
|
|
8246
8246
|
)
|
|
8247
8247
|
] })
|
|
8248
8248
|
] }, P.id);
|
|
8249
8249
|
}) }),
|
|
8250
|
-
|
|
8250
|
+
E.length > 0 && /* @__PURE__ */ u("div", { className: "bpb-manage-addons__limits", children: [
|
|
8251
8251
|
/* @__PURE__ */ o("p", { className: "bpb-manage-addons__limits-title", children: s("addonsNewLimits") }),
|
|
8252
|
-
|
|
8252
|
+
E.map((P) => {
|
|
8253
8253
|
const O = {
|
|
8254
8254
|
conversation_sessions: "resourceConversations",
|
|
8255
8255
|
table_rows: "resourceTableRows",
|
|
@@ -8259,17 +8259,17 @@ const Za = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ u("l
|
|
|
8259
8259
|
return /* @__PURE__ */ u("div", { className: "bpb-manage-addons__limit-row", children: [
|
|
8260
8260
|
/* @__PURE__ */ o("span", { className: "bpb-manage-addons__limit-label", children: O ? s(O) : P.label }),
|
|
8261
8261
|
/* @__PURE__ */ u("span", { className: "bpb-manage-addons__limit-values", children: [
|
|
8262
|
-
/* @__PURE__ */ o("span", { className: "bpb-manage-addons__limit-now", children:
|
|
8262
|
+
/* @__PURE__ */ o("span", { className: "bpb-manage-addons__limit-now", children: B(P.now, P.unit) }),
|
|
8263
8263
|
/* @__PURE__ */ o("span", { className: "bpb-manage-addons__limit-arrow", "aria-hidden": !0, children: "→" }),
|
|
8264
|
-
/* @__PURE__ */ o("span", { className: "bpb-manage-addons__limit-next", children:
|
|
8264
|
+
/* @__PURE__ */ o("span", { className: "bpb-manage-addons__limit-next", children: B(P.next, P.unit) })
|
|
8265
8265
|
] })
|
|
8266
8266
|
] }, P.key);
|
|
8267
8267
|
})
|
|
8268
8268
|
] }),
|
|
8269
8269
|
/* @__PURE__ */ u("div", { className: "bpb-manage-addons__totals", children: [
|
|
8270
8270
|
/* @__PURE__ */ u("div", { className: "bpb-manage-addons__line", children: [
|
|
8271
|
-
/* @__PURE__ */ o("span", { children:
|
|
8272
|
-
/* @__PURE__ */ o("span", { children: Z(
|
|
8271
|
+
/* @__PURE__ */ o("span", { children: h ? s("addonsPlanLine", { planName: se(h.name) }) : s("addonsGenericPlan") }),
|
|
8272
|
+
/* @__PURE__ */ o("span", { children: Z(R, T) })
|
|
8273
8273
|
] }),
|
|
8274
8274
|
x.map(({ addon: P, price: O }) => {
|
|
8275
8275
|
const M = (k == null ? void 0 : k[P.id]) ?? 0;
|
|
@@ -8284,36 +8284,36 @@ const Za = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ u("l
|
|
|
8284
8284
|
] }, P.id);
|
|
8285
8285
|
}),
|
|
8286
8286
|
/* @__PURE__ */ u("div", { className: "bpb-manage-addons__line bpb-manage-addons__line--total", children: [
|
|
8287
|
-
/* @__PURE__ */ o("span", { children: s(
|
|
8287
|
+
/* @__PURE__ */ o("span", { children: s(b === "year" ? "addonsTotalYearly" : "addonsTotalMonthly") }),
|
|
8288
8288
|
/* @__PURE__ */ u("span", { children: [
|
|
8289
|
-
Z(
|
|
8290
|
-
s(
|
|
8289
|
+
Z(j, T),
|
|
8290
|
+
s(b === "year" ? "perYear" : "perMonth")
|
|
8291
8291
|
] })
|
|
8292
8292
|
] }),
|
|
8293
|
-
|
|
8293
|
+
S && /* @__PURE__ */ u("div", { className: "bpb-manage-addons__line bpb-manage-addons__line--due", children: [
|
|
8294
8294
|
/* @__PURE__ */ o("span", { children: s("addonsDueToday") }),
|
|
8295
|
-
/* @__PURE__ */ o("span", { children: f.isLoading ? "…" : f.isError ? "—" : Z(Math.max(
|
|
8295
|
+
/* @__PURE__ */ o("span", { children: f.isLoading ? "…" : f.isError ? "—" : Z(Math.max(I, 0), T) })
|
|
8296
8296
|
] })
|
|
8297
8297
|
] }),
|
|
8298
|
-
|
|
8299
|
-
|
|
8300
|
-
|
|
8301
|
-
date:
|
|
8302
|
-
amount: Z(
|
|
8303
|
-
interval: s(
|
|
8298
|
+
S && !f.isError && /* @__PURE__ */ u("p", { className: "bpb-manage-addons__note", children: [
|
|
8299
|
+
I > 0 ? s("addonsChargedNow", { amount: Z(I, T) }) : s("addonsNoChargeToday"),
|
|
8300
|
+
q ? s("addonsRenewalWithDate", {
|
|
8301
|
+
date: q,
|
|
8302
|
+
amount: Z(w, T),
|
|
8303
|
+
interval: s(b === "year" ? "perYear" : "perMonth")
|
|
8304
8304
|
}) : s("addonsRenewalNoDate", {
|
|
8305
|
-
amount: Z(
|
|
8306
|
-
interval: s(
|
|
8305
|
+
amount: Z(w, T),
|
|
8306
|
+
interval: s(b === "year" ? "perYear" : "perMonth")
|
|
8307
8307
|
})
|
|
8308
8308
|
] }),
|
|
8309
|
-
|
|
8309
|
+
_ && /* @__PURE__ */ o("p", { className: "bpb-manage-addons__note", role: "alert", children: s("addonsReadonlyNote") }),
|
|
8310
8310
|
/* @__PURE__ */ u("div", { className: "bpb-manage-addons__actions", children: [
|
|
8311
8311
|
/* @__PURE__ */ o(be, { variant: "outline", onClick: () => a(!1), disabled: p.isPending, children: s("cancel") }),
|
|
8312
8312
|
/* @__PURE__ */ o(
|
|
8313
8313
|
be,
|
|
8314
8314
|
{
|
|
8315
8315
|
variant: "primary",
|
|
8316
|
-
disabled: !
|
|
8316
|
+
disabled: !S || _,
|
|
8317
8317
|
loading: p.isPending,
|
|
8318
8318
|
onClick: K,
|
|
8319
8319
|
children: s("addonsUpdateSubscription")
|
|
@@ -8362,12 +8362,12 @@ const Za = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ u("l
|
|
|
8362
8362
|
] }, d.id)) })
|
|
8363
8363
|
] });
|
|
8364
8364
|
}, ki = ({ open: a, onOpenChange: e, onSuccess: t }) => {
|
|
8365
|
-
var
|
|
8366
|
-
const { stripePromise: n, isDark: r, locale: s, isOutdatedBilling: i } = G(), { t: l } = oe(), c = yn(), d = (
|
|
8365
|
+
var h;
|
|
8366
|
+
const { stripePromise: n, isDark: r, locale: s, isOutdatedBilling: i } = G(), { t: l } = oe(), c = yn(), d = (h = c.data) == null ? void 0 : h.clientSecret, { mutate: p, reset: g } = c;
|
|
8367
8367
|
we(() => {
|
|
8368
|
-
a && !i ? p() :
|
|
8369
|
-
}, [a, i, p,
|
|
8370
|
-
const
|
|
8368
|
+
a && !i ? p() : g();
|
|
8369
|
+
}, [a, i, p, g]);
|
|
8370
|
+
const m = ke(
|
|
8371
8371
|
() => d ? {
|
|
8372
8372
|
clientSecret: d,
|
|
8373
8373
|
appearance: Gn(r),
|
|
@@ -8398,10 +8398,10 @@ const Za = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ u("l
|
|
|
8398
8398
|
c.isError ? /* @__PURE__ */ u("div", { className: "bpb-payment-dialog__error", children: [
|
|
8399
8399
|
/* @__PURE__ */ o("p", { children: l("paymentSessionError") }),
|
|
8400
8400
|
/* @__PURE__ */ o(be, { variant: "outline", onClick: () => p(), children: l("tryAgain") })
|
|
8401
|
-
] }) : !
|
|
8401
|
+
] }) : !m || !d ? /* @__PURE__ */ u("div", { className: "bpb-payment-dialog__loading", "aria-busy": "true", children: [
|
|
8402
8402
|
/* @__PURE__ */ o(X, { height: 48 }),
|
|
8403
8403
|
/* @__PURE__ */ o(X, { height: 120 })
|
|
8404
|
-
] }) : /* @__PURE__ */ o(nn, { stripe: n, options:
|
|
8404
|
+
] }) : /* @__PURE__ */ o(nn, { stripe: n, options: m, children: /* @__PURE__ */ o(ti, { clientSecret: d, isDark: r, onSuccess: t }) })
|
|
8405
8405
|
] })
|
|
8406
8406
|
}
|
|
8407
8407
|
);
|
|
@@ -8411,7 +8411,7 @@ const Za = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ u("l
|
|
|
8411
8411
|
onSuccess: t
|
|
8412
8412
|
}) => {
|
|
8413
8413
|
var We;
|
|
8414
|
-
const n = an(), r = tn(), { toast: s, analytics: i } = G(), { t: l } = oe(), { data: c, isLoading: d } = gn(), { data: p, isLoading:
|
|
8414
|
+
const n = an(), r = tn(), { toast: s, analytics: i } = G(), { t: l } = oe(), { data: c, isLoading: d } = gn(), { data: p, isLoading: g } = hn(), { data: m, isLoading: h } = bn(), b = vn(), _ = Cn(), N = Nn(), v = ((We = c == null ? void 0 : c.paymentMethod) == null ? void 0 : We.card) ?? null, y = (p == null ? void 0 : p.address) ?? null, k = (m == null ? void 0 : m.taxIds) ?? [], [x, S] = H(!1), [w, A] = H(!1), [f, T] = H(!1), [I, D] = H(!1), [q, R] = H(null), [j, E] = H(!1), [B, $] = H(!1), [K, z] = H(null), [C, ee] = H(y == null ? void 0 : y.country), [ae, ie] = H(k.length > 0), [P, O] = H(null), M = P ?? k.map((Q) => ({ type: Q.type, value: Q.value })), Y = Yn(C), ge = P !== null, J = x || !v, le = (Q, ve) => O(M.map((te, ce) => ce === Q ? { ...te, ...ve } : te)), fe = () => {
|
|
8415
8415
|
var Q;
|
|
8416
8416
|
return O([...M, { type: ((Q = Y[0]) == null ? void 0 : Q.type) ?? "", value: "" }]);
|
|
8417
8417
|
}, de = (Q) => O(M.filter((ve, te) => te !== Q)), Pe = async () => {
|
|
@@ -8419,22 +8419,22 @@ const Za = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ u("l
|
|
|
8419
8419
|
return;
|
|
8420
8420
|
const Q = r.getElement(Aa);
|
|
8421
8421
|
if (Q) {
|
|
8422
|
-
D(!0),
|
|
8422
|
+
D(!0), R(null);
|
|
8423
8423
|
try {
|
|
8424
8424
|
const { error: ve, setupIntent: te } = await n.confirmCardSetup(a, {
|
|
8425
8425
|
payment_method: { card: Q }
|
|
8426
8426
|
});
|
|
8427
8427
|
if (ve) {
|
|
8428
|
-
|
|
8428
|
+
R(ve.message ?? l("paymentCardSaveError"));
|
|
8429
8429
|
return;
|
|
8430
8430
|
}
|
|
8431
8431
|
if (!(te != null && te.payment_method) || typeof te.payment_method != "string") {
|
|
8432
|
-
|
|
8432
|
+
R(l("paymentMethodMissing"));
|
|
8433
8433
|
return;
|
|
8434
8434
|
}
|
|
8435
|
-
await
|
|
8435
|
+
await b.mutateAsync({ paymentMethodId: te.payment_method }), i.capture(pe.PAYMENT_METHOD_UPDATED), s({ type: "success", message: l("paymentCardUpdated") }), S(!1), t == null || t();
|
|
8436
8436
|
} catch {
|
|
8437
|
-
|
|
8437
|
+
R(l("paymentCardGenericError"));
|
|
8438
8438
|
} finally {
|
|
8439
8439
|
D(!1);
|
|
8440
8440
|
}
|
|
@@ -8450,10 +8450,10 @@ const Za = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ u("l
|
|
|
8450
8450
|
z(l("paymentAddressIncomplete"));
|
|
8451
8451
|
return;
|
|
8452
8452
|
}
|
|
8453
|
-
|
|
8453
|
+
$(!0), z(null);
|
|
8454
8454
|
try {
|
|
8455
8455
|
const { address: ce, name: Se } = te;
|
|
8456
|
-
await
|
|
8456
|
+
await _.mutateAsync({
|
|
8457
8457
|
lineOne: ce.line1 ?? "",
|
|
8458
8458
|
lineTwo: ce.line2 ?? void 0,
|
|
8459
8459
|
city: ce.city ?? "",
|
|
@@ -8462,20 +8462,20 @@ const Za = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ u("l
|
|
|
8462
8462
|
country: ce.country ?? ""
|
|
8463
8463
|
});
|
|
8464
8464
|
const Ge = (Se == null ? void 0 : Se.trim()) || void 0, Fe = M.filter((Le) => !!Le.type && Le.value.trim() !== "").map((Le) => ({ type: Le.type, value: Le.value.trim() }));
|
|
8465
|
-
(Ge !== ((
|
|
8465
|
+
(Ge !== ((m == null ? void 0 : m.name) ?? void 0) || ge) && await N.mutateAsync({ name: Ge, taxIds: Fe }), i.capture(pe.BILLING_ADDRESS_UPDATED), s({ type: "success", message: l("paymentDetailsUpdated") }), t == null || t();
|
|
8466
8466
|
} catch (ce) {
|
|
8467
8467
|
const Se = ce instanceof Error && ce.message ? ce.message : l("paymentAddressError");
|
|
8468
8468
|
z(Se), s({ type: "error", message: l("paymentDetailsUpdateError") });
|
|
8469
8469
|
} finally {
|
|
8470
|
-
|
|
8470
|
+
$(!1);
|
|
8471
8471
|
}
|
|
8472
8472
|
};
|
|
8473
8473
|
return /* @__PURE__ */ u("div", { className: "bpb-payment-dialog__sections", children: [
|
|
8474
8474
|
/* @__PURE__ */ u("section", { className: "bpb-payment-dialog__section", children: [
|
|
8475
8475
|
/* @__PURE__ */ o("h3", { className: "bpb-payment-dialog__section-title", children: l("paymentMethodSection") }),
|
|
8476
8476
|
d ? /* @__PURE__ */ o(X, { height: 56 }) : J ? /* @__PURE__ */ u("div", { className: "bpb-payment-element", children: [
|
|
8477
|
-
!
|
|
8478
|
-
/* @__PURE__ */ o("div", { className:
|
|
8477
|
+
!w && /* @__PURE__ */ o(X, { height: 48 }),
|
|
8478
|
+
/* @__PURE__ */ o("div", { className: w ? "bpb-card-element" : "bpb-payment-element--hidden", children: /* @__PURE__ */ o(
|
|
8479
8479
|
Aa,
|
|
8480
8480
|
{
|
|
8481
8481
|
options: { style: Kn(e), hidePostalCode: !0 },
|
|
@@ -8483,10 +8483,10 @@ const Za = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ u("l
|
|
|
8483
8483
|
onChange: (Q) => T(Q.complete)
|
|
8484
8484
|
}
|
|
8485
8485
|
) }),
|
|
8486
|
-
|
|
8486
|
+
q && /* @__PURE__ */ o("p", { role: "alert", className: "bpb-payment-dialog__field-error", children: q }),
|
|
8487
8487
|
/* @__PURE__ */ u("div", { className: "bpb-payment-dialog__section-actions", children: [
|
|
8488
|
-
v && /* @__PURE__ */ o(be, { variant: "ghost", onClick: () =>
|
|
8489
|
-
/* @__PURE__ */ o(be, { variant: "primary", disabled: !f, loading:
|
|
8488
|
+
v && /* @__PURE__ */ o(be, { variant: "ghost", onClick: () => S(!1), disabled: I, children: l("cancel") }),
|
|
8489
|
+
/* @__PURE__ */ o(be, { variant: "primary", disabled: !f, loading: I, onClick: Pe, children: l("paymentSaveCard") })
|
|
8490
8490
|
] })
|
|
8491
8491
|
] }) : /* @__PURE__ */ u("div", { className: "bpb-saved-card", children: [
|
|
8492
8492
|
/* @__PURE__ */ o(Wn, { brand: v.brand }),
|
|
@@ -8500,21 +8500,21 @@ const Za = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ u("l
|
|
|
8500
8500
|
"/",
|
|
8501
8501
|
String(v.expYear).slice(-2)
|
|
8502
8502
|
] }),
|
|
8503
|
-
/* @__PURE__ */ o("button", { type: "button", className: "bpb-link-button", onClick: () =>
|
|
8503
|
+
/* @__PURE__ */ o("button", { type: "button", className: "bpb-link-button", onClick: () => S(!0), children: l("paymentReplace") })
|
|
8504
8504
|
] })
|
|
8505
8505
|
] }),
|
|
8506
8506
|
/* @__PURE__ */ u("section", { className: "bpb-payment-dialog__section", children: [
|
|
8507
8507
|
/* @__PURE__ */ o("h3", { className: "bpb-payment-dialog__section-title", children: l("paymentBillingAddressSection") }),
|
|
8508
|
-
|
|
8509
|
-
!
|
|
8510
|
-
/* @__PURE__ */ o("div", { className:
|
|
8508
|
+
g || h ? /* @__PURE__ */ o(X, { height: 72 }) : /* @__PURE__ */ u("div", { className: "bpb-payment-element", children: [
|
|
8509
|
+
!j && /* @__PURE__ */ o(X, { height: 120 }),
|
|
8510
|
+
/* @__PURE__ */ o("div", { className: j ? void 0 : "bpb-payment-element--hidden", children: /* @__PURE__ */ o(
|
|
8511
8511
|
en,
|
|
8512
8512
|
{
|
|
8513
8513
|
options: {
|
|
8514
8514
|
mode: "billing",
|
|
8515
8515
|
display: { name: "full" },
|
|
8516
8516
|
defaultValues: y ? {
|
|
8517
|
-
name: (
|
|
8517
|
+
name: (m == null ? void 0 : m.name) ?? void 0,
|
|
8518
8518
|
address: {
|
|
8519
8519
|
line1: y.lineOne,
|
|
8520
8520
|
line2: y.lineTwo,
|
|
@@ -8525,7 +8525,7 @@ const Za = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ u("l
|
|
|
8525
8525
|
}
|
|
8526
8526
|
} : void 0
|
|
8527
8527
|
},
|
|
8528
|
-
onReady: () =>
|
|
8528
|
+
onReady: () => E(!0),
|
|
8529
8529
|
onChange: (Q) => ee(Q.value.address.country || void 0)
|
|
8530
8530
|
}
|
|
8531
8531
|
) }),
|
|
@@ -8542,7 +8542,7 @@ const Za = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ u("l
|
|
|
8542
8542
|
ct,
|
|
8543
8543
|
{
|
|
8544
8544
|
size: 16,
|
|
8545
|
-
className:
|
|
8545
|
+
className: U("bpb-tax-toggle__chevron", ae && "bpb-tax-toggle__chevron--open")
|
|
8546
8546
|
}
|
|
8547
8547
|
),
|
|
8548
8548
|
l("paymentTaxIds"),
|
|
@@ -8589,7 +8589,7 @@ const Za = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ u("l
|
|
|
8589
8589
|
] })
|
|
8590
8590
|
] }),
|
|
8591
8591
|
K && /* @__PURE__ */ o("p", { role: "alert", className: "bpb-payment-dialog__field-error", children: K }),
|
|
8592
|
-
/* @__PURE__ */ o("div", { className: "bpb-payment-dialog__section-actions", children: /* @__PURE__ */ o(be, { variant: "primary", loading:
|
|
8592
|
+
/* @__PURE__ */ o("div", { className: "bpb-payment-dialog__section-actions", children: /* @__PURE__ */ o(be, { variant: "primary", loading: B, onClick: Ce, children: l("paymentSaveBillingDetails") }) })
|
|
8593
8593
|
] })
|
|
8594
8594
|
] })
|
|
8595
8595
|
] });
|
|
@@ -8670,26 +8670,26 @@ const xi = ({
|
|
|
8670
8670
|
featureDescriptions: i,
|
|
8671
8671
|
period: l
|
|
8672
8672
|
}) => {
|
|
8673
|
-
var
|
|
8674
|
-
const { isOutdatedBilling: c, analytics: d, scope: p } = G(), { t:
|
|
8673
|
+
var j, E;
|
|
8674
|
+
const { isOutdatedBilling: c, analytics: d, scope: p } = G(), { t: g } = oe(), { data: m } = Ue(), { data: h } = ia(), { data: b } = Re({ enabled: !c }), { data: _ } = la({ period: l, enabled: !c }), N = a !== void 0, [v, y] = H(!1), k = m == null ? void 0 : m.find((B) => B.id === (b == null ? void 0 : b.plan.current.planId)), x = b ? k ? ue(k) === "community" : !0 : !1, S = ke(() => za(_).find((B) => B.key === "conversation_sessions"), [_]), w = !N && !c && x && !!S && S.pct / 100 >= si && !v && !er(Qt, p, "modal"), A = N ? !!a : w;
|
|
8675
8675
|
we(() => {
|
|
8676
8676
|
A && d.capture(pe.PLAN_PICKER_VIEWED, {
|
|
8677
|
-
source:
|
|
8677
|
+
source: N ? "outgrow_free" : "outgrow_free_auto",
|
|
8678
8678
|
interval: r
|
|
8679
8679
|
});
|
|
8680
|
-
}, [A,
|
|
8680
|
+
}, [A, N, d]);
|
|
8681
8681
|
const f = () => {
|
|
8682
|
-
|
|
8683
|
-
}, T = ke(() =>
|
|
8684
|
-
const
|
|
8685
|
-
return
|
|
8686
|
-
}).sort((
|
|
8682
|
+
N || (ar(Qt, p, "modal"), y(!0)), e == null || e(!1);
|
|
8683
|
+
}, T = ke(() => m ? m.filter((B) => {
|
|
8684
|
+
const $ = ue(B);
|
|
8685
|
+
return $ !== "community" && $ !== "enterprise" && $ !== "managed";
|
|
8686
|
+
}).sort((B, $) => ta.indexOf(ue(B)) - ta.indexOf(ue($))) : [], [m]), I = ((E = (j = m == null ? void 0 : m.find((B) => ue(B) === "enterprise")) == null ? void 0 : j.metadata) == null ? void 0 : E.contact_url) ?? zn;
|
|
8687
8687
|
if (c || !A)
|
|
8688
8688
|
return null;
|
|
8689
|
-
const D = (
|
|
8690
|
-
return /* @__PURE__ */ o(Te, { open: A, onOpenChange: f, size: "xl", "aria-label":
|
|
8689
|
+
const D = (S == null ? void 0 : S.quota) ?? (k == null ? void 0 : k.features.conversation_sessions) ?? 100, q = (S == null ? void 0 : S.used) ?? 0, R = S && S.pct > 0 ? Math.min(100, Math.max(5, Math.round(S.pct))) : 0;
|
|
8690
|
+
return /* @__PURE__ */ o(Te, { open: A, onOpenChange: f, size: "xl", "aria-label": g("outgrowTitle"), children: /* @__PURE__ */ u("div", { className: "bpb-outgrow", children: [
|
|
8691
8691
|
/* @__PURE__ */ u("header", { className: "bpb-outgrow__head", children: [
|
|
8692
|
-
/* @__PURE__ */ o("h2", { className: "bpb-outgrow__title", children:
|
|
8692
|
+
/* @__PURE__ */ o("h2", { className: "bpb-outgrow__title", children: g("outgrowTitle") }),
|
|
8693
8693
|
/* @__PURE__ */ o("p", { className: "bpb-outgrow__lede", children: /* @__PURE__ */ o(
|
|
8694
8694
|
Tt,
|
|
8695
8695
|
{
|
|
@@ -8700,44 +8700,44 @@ const xi = ({
|
|
|
8700
8700
|
) })
|
|
8701
8701
|
] }),
|
|
8702
8702
|
/* @__PURE__ */ u("div", { className: "bpb-outgrow__usage", children: [
|
|
8703
|
-
/* @__PURE__ */ o("span", { className: "bpb-outgrow__usage-label", children:
|
|
8703
|
+
/* @__PURE__ */ o("span", { className: "bpb-outgrow__usage-label", children: g("outgrowSoFar") }),
|
|
8704
8704
|
/* @__PURE__ */ o(
|
|
8705
8705
|
"span",
|
|
8706
8706
|
{
|
|
8707
8707
|
className: "bpb-outgrow__usage-bar",
|
|
8708
8708
|
role: "progressbar",
|
|
8709
|
-
"aria-valuenow":
|
|
8709
|
+
"aria-valuenow": R,
|
|
8710
8710
|
"aria-valuemin": 0,
|
|
8711
8711
|
"aria-valuemax": 100,
|
|
8712
|
-
children: /* @__PURE__ */ o("span", { className: "bpb-outgrow__usage-fill", style: { width: `${
|
|
8712
|
+
children: /* @__PURE__ */ o("span", { className: "bpb-outgrow__usage-fill", style: { width: `${R}%` } })
|
|
8713
8713
|
}
|
|
8714
8714
|
),
|
|
8715
8715
|
/* @__PURE__ */ o("span", { className: "bpb-outgrow__usage-text", children: /* @__PURE__ */ o(
|
|
8716
8716
|
Tt,
|
|
8717
8717
|
{
|
|
8718
8718
|
i18nKey: "outgrowUsageText",
|
|
8719
|
-
values: { used: re(
|
|
8719
|
+
values: { used: re(q), quota: re(D) },
|
|
8720
8720
|
components: { bold: /* @__PURE__ */ o("strong", {}) }
|
|
8721
8721
|
}
|
|
8722
8722
|
) })
|
|
8723
8723
|
] }),
|
|
8724
|
-
/* @__PURE__ */ o("div", { className: "bpb-outgrow__grid", children: T.map((
|
|
8725
|
-
const K = ue(
|
|
8724
|
+
/* @__PURE__ */ o("div", { className: "bpb-outgrow__grid", children: T.map((B, $) => {
|
|
8725
|
+
const K = ue(B), z = ii(B, r), C = li(B, r), ee = K === n || B.id === n, ae = B.features.conversation_sessions, ie = rt(h, B, r), P = $ > 0 ? T[$ - 1] : void 0, O = (s[K] ?? st[K]).slice(0, oi);
|
|
8726
8726
|
return /* @__PURE__ */ u(
|
|
8727
8727
|
"div",
|
|
8728
8728
|
{
|
|
8729
|
-
className:
|
|
8730
|
-
"data-plan-id":
|
|
8729
|
+
className: U("bpb-plan-card", ee && "bpb-plan-card--highlighted bpb-glow"),
|
|
8730
|
+
"data-plan-id": B.id,
|
|
8731
8731
|
children: [
|
|
8732
8732
|
/* @__PURE__ */ u("div", { className: "bpb-plan-card__header", children: [
|
|
8733
8733
|
/* @__PURE__ */ u("h3", { className: "bpb-plan-card__name", children: [
|
|
8734
|
-
se(
|
|
8735
|
-
ee && /* @__PURE__ */ o(ot, { className: "bpb-plan-card__badge", children:
|
|
8734
|
+
se(B.name),
|
|
8735
|
+
ee && /* @__PURE__ */ o(ot, { className: "bpb-plan-card__badge", children: g("upgradeRecommended") })
|
|
8736
8736
|
] }),
|
|
8737
8737
|
/* @__PURE__ */ o("div", { className: "bpb-plan-card__price", children: C !== null && z ? /* @__PURE__ */ u(ye, { children: [
|
|
8738
8738
|
/* @__PURE__ */ o("span", { className: "bpb-plan-card__currency", children: _a(z.currency) }),
|
|
8739
8739
|
/* @__PURE__ */ o("span", { className: "bpb-plan-card__amount", children: Number.isInteger(C) ? C : C.toFixed(2).replace(/\.00$/, "") }),
|
|
8740
|
-
/* @__PURE__ */ o("span", { className: "bpb-plan-card__per", children:
|
|
8740
|
+
/* @__PURE__ */ o("span", { className: "bpb-plan-card__per", children: g("perMonth") })
|
|
8741
8741
|
] }) : /* @__PURE__ */ u("span", { className: "bpb-plan-card__amount", children: [
|
|
8742
8742
|
_a((z == null ? void 0 : z.currency) ?? "usd"),
|
|
8743
8743
|
"0"
|
|
@@ -8748,16 +8748,16 @@ const xi = ({
|
|
|
8748
8748
|
/* @__PURE__ */ u("strong", { children: [
|
|
8749
8749
|
re(ae),
|
|
8750
8750
|
" ",
|
|
8751
|
-
|
|
8751
|
+
g("conversationsUnit")
|
|
8752
8752
|
] }),
|
|
8753
8753
|
" ",
|
|
8754
|
-
|
|
8754
|
+
g("perMonth")
|
|
8755
8755
|
] }),
|
|
8756
|
-
/* @__PURE__ */ o("p", { className: "bpb-outgrow__allowance-pack", children: ie ?
|
|
8756
|
+
/* @__PURE__ */ o("p", { className: "bpb-outgrow__allowance-pack", children: ie ? g("outgrowThenPer", {
|
|
8757
8757
|
symbol: _a(ie.currency),
|
|
8758
8758
|
amount: ie.amount,
|
|
8759
8759
|
packSize: re(ie.packSize)
|
|
8760
|
-
}) :
|
|
8760
|
+
}) : g("outgrowNoTopup") })
|
|
8761
8761
|
] }),
|
|
8762
8762
|
/* @__PURE__ */ u(
|
|
8763
8763
|
be,
|
|
@@ -8766,21 +8766,21 @@ const xi = ({
|
|
|
8766
8766
|
block: !0,
|
|
8767
8767
|
onClick: () => {
|
|
8768
8768
|
d.capture(pe.PLAN_UPGRADE_INITIATED, {
|
|
8769
|
-
plan_name: se(
|
|
8769
|
+
plan_name: se(B.name),
|
|
8770
8770
|
interval: r,
|
|
8771
8771
|
source: "outgrow_free"
|
|
8772
|
-
}), t(
|
|
8772
|
+
}), t(B.id, r), f();
|
|
8773
8773
|
},
|
|
8774
8774
|
children: [
|
|
8775
|
-
|
|
8775
|
+
g("outgrowUpgradeTo", { planName: se(B.name) }),
|
|
8776
8776
|
ee && /* @__PURE__ */ o(ut, { size: 15 })
|
|
8777
8777
|
]
|
|
8778
8778
|
}
|
|
8779
8779
|
),
|
|
8780
8780
|
/* @__PURE__ */ u("ul", { className: "bpb-plan-card__features", children: [
|
|
8781
|
-
P && /* @__PURE__ */ o("li", { className: "bpb-outgrow__features-lead", children:
|
|
8781
|
+
P && /* @__PURE__ */ o("li", { className: "bpb-outgrow__features-lead", children: g("outgrowEverythingIn", { planName: se(P.name) }) }),
|
|
8782
8782
|
O.map((M) => {
|
|
8783
|
-
const Y = pt(M), ge = Un[M], J = ge !== void 0 ?
|
|
8783
|
+
const Y = pt(M), ge = Un[M], J = ge !== void 0 ? g(ge.label) : M, le = (i == null ? void 0 : i[M]) ?? (ge !== void 0 ? g(ge.desc) : void 0);
|
|
8784
8784
|
return /* @__PURE__ */ u("li", { children: [
|
|
8785
8785
|
/* @__PURE__ */ o("span", { className: "bpb-plan-card__feature-chip", children: /* @__PURE__ */ o(Y, { size: 13 }) }),
|
|
8786
8786
|
le ? /* @__PURE__ */ o(Ia, { label: J, children: le }) : /* @__PURE__ */ o("span", { children: J })
|
|
@@ -8789,14 +8789,14 @@ const xi = ({
|
|
|
8789
8789
|
] })
|
|
8790
8790
|
]
|
|
8791
8791
|
},
|
|
8792
|
-
|
|
8792
|
+
B.id
|
|
8793
8793
|
);
|
|
8794
8794
|
}) }),
|
|
8795
8795
|
/* @__PURE__ */ u("footer", { className: "bpb-outgrow__footer", children: [
|
|
8796
8796
|
/* @__PURE__ */ u("span", { children: [
|
|
8797
|
-
|
|
8797
|
+
g("outgrowNeedCustom"),
|
|
8798
8798
|
" ",
|
|
8799
|
-
/* @__PURE__ */ o("a", { href:
|
|
8799
|
+
/* @__PURE__ */ o("a", { href: I, target: "_blank", rel: "noopener noreferrer", children: g("outgrowTalkToSales") })
|
|
8800
8800
|
] }),
|
|
8801
8801
|
/* @__PURE__ */ u(
|
|
8802
8802
|
"a",
|
|
@@ -8806,7 +8806,7 @@ const xi = ({
|
|
|
8806
8806
|
target: "_blank",
|
|
8807
8807
|
rel: "noopener noreferrer",
|
|
8808
8808
|
children: [
|
|
8809
|
-
|
|
8809
|
+
g("outgrowCompareAll"),
|
|
8810
8810
|
/* @__PURE__ */ o(Ma, { size: 14 })
|
|
8811
8811
|
]
|
|
8812
8812
|
}
|
|
@@ -8851,16 +8851,16 @@ const xi = ({
|
|
|
8851
8851
|
planName: n,
|
|
8852
8852
|
stacked: r
|
|
8853
8853
|
}) => {
|
|
8854
|
-
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, c = l > 0 ? Math.max(5, l) : 0, d = l >= 90 ? "critical" : l >= 75 ? "warning" : "normal", p = t ?? a.quota,
|
|
8854
|
+
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, c = l > 0 ? Math.max(5, l) : 0, d = l >= 90 ? "critical" : l >= 75 ? "warning" : "normal", p = t ?? a.quota, g = Math.max(0, a.quota - p), m = g > 0 ? n ? s("dashboardFromPlanWithAddons", {
|
|
8855
8855
|
amount: ze(p, e.unit),
|
|
8856
8856
|
planName: n,
|
|
8857
|
-
addonAmount: ze(
|
|
8857
|
+
addonAmount: ze(g, e.unit)
|
|
8858
8858
|
}) : s("dashboardFromPlanGenericWithAddons", {
|
|
8859
8859
|
amount: ze(p, e.unit),
|
|
8860
|
-
addonAmount: ze(
|
|
8860
|
+
addonAmount: ze(g, e.unit)
|
|
8861
8861
|
}) : n ? s("dashboardFromPlan", { amount: ze(a.quota, e.unit), planName: n }) : s("dashboardFromPlanGeneric", { amount: ze(a.quota, e.unit) });
|
|
8862
8862
|
return /* @__PURE__ */ u("div", { className: "bpb-usage-row", children: [
|
|
8863
|
-
/* @__PURE__ */ u("div", { className:
|
|
8863
|
+
/* @__PURE__ */ u("div", { className: U("bpb-usage-row__head", r && "bpb-usage-row__head--stacked"), children: [
|
|
8864
8864
|
/* @__PURE__ */ o("span", { className: "bpb-usage-row__label", children: e.label }),
|
|
8865
8865
|
/* @__PURE__ */ u("span", { className: "bpb-usage-row__value", children: [
|
|
8866
8866
|
/* @__PURE__ */ o("span", { className: "bpb-usage-row__used", children: ze(i, e.unit) }),
|
|
@@ -8876,20 +8876,20 @@ const xi = ({
|
|
|
8876
8876
|
className: "bpb-usage-tip",
|
|
8877
8877
|
tabIndex: 0,
|
|
8878
8878
|
role: "note",
|
|
8879
|
-
"aria-label":
|
|
8880
|
-
onMouseMove: (
|
|
8881
|
-
const
|
|
8882
|
-
|
|
8879
|
+
"aria-label": m,
|
|
8880
|
+
onMouseMove: (h) => {
|
|
8881
|
+
const b = h.currentTarget.getBoundingClientRect(), _ = (h.clientX - b.left) / b.width * 100;
|
|
8882
|
+
h.currentTarget.style.setProperty("--bpb-tip-x", `${_}%`);
|
|
8883
8883
|
},
|
|
8884
8884
|
children: [
|
|
8885
8885
|
/* @__PURE__ */ o("div", { className: "bpb-usage-bar", role: "progressbar", "aria-valuenow": l, "aria-valuemin": 0, "aria-valuemax": 100, children: /* @__PURE__ */ o(
|
|
8886
8886
|
"div",
|
|
8887
8887
|
{
|
|
8888
|
-
className:
|
|
8888
|
+
className: U("bpb-usage-bar__fill", `bpb-usage-bar__fill--${d}`),
|
|
8889
8889
|
style: { width: `${c}%` }
|
|
8890
8890
|
}
|
|
8891
8891
|
) }),
|
|
8892
|
-
/* @__PURE__ */ o("span", { className: "bpb-usage-tip__bubble", role: "tooltip", children:
|
|
8892
|
+
/* @__PURE__ */ o("span", { className: "bpb-usage-tip__bubble", role: "tooltip", children: m })
|
|
8893
8893
|
]
|
|
8894
8894
|
}
|
|
8895
8895
|
)
|
|
@@ -8901,30 +8901,30 @@ const xi = ({
|
|
|
8901
8901
|
className: n,
|
|
8902
8902
|
onIncreaseLimits: r
|
|
8903
8903
|
}) => {
|
|
8904
|
-
var
|
|
8905
|
-
const { isOutdatedBilling: s, locale: i } = G(), { t: l } = oe(), c = ke(() => di(t, i), [t, i]), [d, p] = H(a ?? ((
|
|
8904
|
+
var q;
|
|
8905
|
+
const { isOutdatedBilling: s, locale: i } = G(), { t: l } = oe(), c = ke(() => di(t, i), [t, i]), [d, p] = H(a ?? ((q = c[0]) == null ? void 0 : q.value) ?? ""), g = ks(), m = Math.max(
|
|
8906
8906
|
0,
|
|
8907
|
-
c.findIndex((
|
|
8908
|
-
),
|
|
8909
|
-
const
|
|
8910
|
-
|
|
8911
|
-
}, { data:
|
|
8907
|
+
c.findIndex((R) => R.value === d)
|
|
8908
|
+
), h = (R) => {
|
|
8909
|
+
const j = c[m + R];
|
|
8910
|
+
j && p(j.value);
|
|
8911
|
+
}, { data: b, isLoading: _, isError: N } = la({ period: d, enabled: !s }), { data: v } = Re({ enabled: !s }), { data: y } = Ue(), k = y == null ? void 0 : y.find((R) => R.id === (v == null ? void 0 : v.plan.current.planId)), x = k ? se(k.name) : void 0, S = k ? ue(k) : "community", w = S === "enterprise" || S === "managed", A = (R) => k == null ? void 0 : k.features[R];
|
|
8912
8912
|
if (s)
|
|
8913
|
-
return /* @__PURE__ */ o("div", { className:
|
|
8914
|
-
if (
|
|
8915
|
-
return /* @__PURE__ */ u("div", { className:
|
|
8913
|
+
return /* @__PURE__ */ o("div", { className: U("bpb-usage bpb-scope", n), children: /* @__PURE__ */ o(da, {}) });
|
|
8914
|
+
if (_)
|
|
8915
|
+
return /* @__PURE__ */ u("div", { className: U("bpb-usage bpb-scope", n), "aria-busy": "true", children: [
|
|
8916
8916
|
/* @__PURE__ */ o(X, { height: 80 }),
|
|
8917
8917
|
/* @__PURE__ */ o(X, { height: 140 })
|
|
8918
8918
|
] });
|
|
8919
|
-
if (
|
|
8920
|
-
return /* @__PURE__ */ o("div", { className:
|
|
8921
|
-
const f =
|
|
8919
|
+
if (N || !b)
|
|
8920
|
+
return /* @__PURE__ */ o("div", { className: U("bpb-usage bpb-scope", n), children: /* @__PURE__ */ o("p", { className: "bpb-usage__error", role: "alert", children: l("dashboardLoadError") }) });
|
|
8921
|
+
const f = b.conversation_sessions, T = b.ai_spend, D = [
|
|
8922
8922
|
{ key: "table_rows", label: l("dashboardTableRows"), unit: "count" },
|
|
8923
8923
|
{ key: "vector_db_storage", label: l("dashboardVectorDb"), unit: "bytes" },
|
|
8924
8924
|
{ key: "file_storage", label: l("dashboardFileStorage"), unit: "bytes" }
|
|
8925
|
-
].filter((
|
|
8926
|
-
return /* @__PURE__ */ u("div", { className:
|
|
8927
|
-
|
|
8925
|
+
].filter((R) => b[R.key]);
|
|
8926
|
+
return /* @__PURE__ */ u("div", { className: U("bpb-usage bpb-scope", n), children: [
|
|
8927
|
+
w && /* @__PURE__ */ o("p", { className: "bpb-usage__enterprise-note", children: l("dashboardEnterpriseUsageNotice") }),
|
|
8928
8928
|
(e && c.length > 1 || r) && /* @__PURE__ */ u("div", { className: "bpb-usage__header", children: [
|
|
8929
8929
|
e && c.length > 1 && /* @__PURE__ */ u("div", { className: "bpb-usage__period", children: [
|
|
8930
8930
|
/* @__PURE__ */ o("span", { className: "bpb-usage__period-label", children: l("dashboardBillingPeriod") }),
|
|
@@ -8935,8 +8935,8 @@ const xi = ({
|
|
|
8935
8935
|
type: "button",
|
|
8936
8936
|
className: "bpb-usage__period-step",
|
|
8937
8937
|
"aria-label": l("dashboardPrevMonth"),
|
|
8938
|
-
onClick: () =>
|
|
8939
|
-
disabled:
|
|
8938
|
+
onClick: () => h(1),
|
|
8939
|
+
disabled: m >= c.length - 1,
|
|
8940
8940
|
children: /* @__PURE__ */ o($n, { size: 15 })
|
|
8941
8941
|
}
|
|
8942
8942
|
),
|
|
@@ -8948,8 +8948,8 @@ const xi = ({
|
|
|
8948
8948
|
className: "bpb-usage__period-select",
|
|
8949
8949
|
"aria-label": l("dashboardBillingPeriod"),
|
|
8950
8950
|
value: d,
|
|
8951
|
-
onChange: (
|
|
8952
|
-
children: c.map((
|
|
8951
|
+
onChange: (R) => p(R.target.value),
|
|
8952
|
+
children: c.map((R) => /* @__PURE__ */ o("option", { value: R.value, children: R.label }, R.value))
|
|
8953
8953
|
}
|
|
8954
8954
|
),
|
|
8955
8955
|
/* @__PURE__ */ o(ct, { size: 14, className: "bpb-usage__period-chevron" })
|
|
@@ -8960,8 +8960,8 @@ const xi = ({
|
|
|
8960
8960
|
type: "button",
|
|
8961
8961
|
className: "bpb-usage__period-step",
|
|
8962
8962
|
"aria-label": l("dashboardNextMonth"),
|
|
8963
|
-
onClick: () =>
|
|
8964
|
-
disabled:
|
|
8963
|
+
onClick: () => h(-1),
|
|
8964
|
+
disabled: m <= 0,
|
|
8965
8965
|
children: /* @__PURE__ */ o(ra, { size: 15 })
|
|
8966
8966
|
}
|
|
8967
8967
|
)
|
|
@@ -8989,15 +8989,15 @@ const xi = ({
|
|
|
8989
8989
|
D.length > 0 && /* @__PURE__ */ u("section", { className: "bpb-usage__group", children: [
|
|
8990
8990
|
/* @__PURE__ */ o("h3", { className: "bpb-usage__group-title", children: l("dashboardStorageTitle") }),
|
|
8991
8991
|
/* @__PURE__ */ o("p", { className: "bpb-usage__group-hint", children: l("dashboardStorageHint") }),
|
|
8992
|
-
/* @__PURE__ */ o("div", { className: "bpb-usage__card", children: D.map((
|
|
8992
|
+
/* @__PURE__ */ o("div", { className: "bpb-usage__card", children: D.map((R) => /* @__PURE__ */ o(
|
|
8993
8993
|
Wa,
|
|
8994
8994
|
{
|
|
8995
|
-
entry:
|
|
8996
|
-
metric:
|
|
8997
|
-
planAllowance: A(
|
|
8995
|
+
entry: b[R.key],
|
|
8996
|
+
metric: R,
|
|
8997
|
+
planAllowance: A(R.key),
|
|
8998
8998
|
planName: x
|
|
8999
8999
|
},
|
|
9000
|
-
|
|
9000
|
+
R.key
|
|
9001
9001
|
)) })
|
|
9002
9002
|
] }),
|
|
9003
9003
|
T && /* @__PURE__ */ u("section", { className: "bpb-usage__group", children: [
|
|
@@ -9011,7 +9011,7 @@ const xi = ({
|
|
|
9011
9011
|
stacked: !0
|
|
9012
9012
|
}
|
|
9013
9013
|
) }),
|
|
9014
|
-
|
|
9014
|
+
g && /* @__PURE__ */ u("div", { className: "bpb-usage__card bpb-usage__card--bots", children: [
|
|
9015
9015
|
/* @__PURE__ */ o("span", { className: "bpb-usage__subhead", children: l("dashboardAiByBot") }),
|
|
9016
9016
|
/* @__PURE__ */ o(ci, { period: d })
|
|
9017
9017
|
] })
|
|
@@ -9026,27 +9026,27 @@ const xi = ({
|
|
|
9026
9026
|
period: s,
|
|
9027
9027
|
className: i
|
|
9028
9028
|
}) => {
|
|
9029
|
-
const { isOutdatedBilling: l, analytics: c, scope: d } = G(), { t: p } = oe(), { data:
|
|
9029
|
+
const { isOutdatedBilling: l, analytics: c, scope: d } = G(), { t: p } = oe(), { data: g } = la({ period: s, enabled: !l }), [m, h] = H({}), [b, _] = H(!1), [N, v] = H(null), y = g ? Object.entries(g).map(([I, D]) => ({ key: I, pct: D.quota > 0 ? (D.usage ?? 0) / D.quota : 0 })).filter((I) => I.pct >= e).sort((I, D) => D.pct - I.pct)[0] : void 0, k = !!y && (m[y.key] || er(Zt, d, y.key));
|
|
9030
9030
|
if (l || !y || k)
|
|
9031
9031
|
return null;
|
|
9032
|
-
const
|
|
9032
|
+
const S = {
|
|
9033
9033
|
conversation_sessions: p("metricConversations"),
|
|
9034
9034
|
table_rows: p("metricTableRows"),
|
|
9035
9035
|
vector_db_storage: p("metricVectorDb"),
|
|
9036
9036
|
file_storage: p("metricFileStorage"),
|
|
9037
9037
|
ai_spend: p("metricAiSpend")
|
|
9038
|
-
}[y.key] ?? y.key.replace(/_/g, " "),
|
|
9038
|
+
}[y.key] ?? y.key.replace(/_/g, " "), w = Math.min(100, Math.round(y.pct * 100)), A = y.pct >= 1, f = () => {
|
|
9039
9039
|
c.capture(pe.UPGRADE_CTA_CLICKED, {
|
|
9040
9040
|
source: "usage_banner",
|
|
9041
9041
|
metric: y.key,
|
|
9042
9042
|
usage_pct: Math.round(y.pct * 100)
|
|
9043
|
-
}), t ? t() :
|
|
9043
|
+
}), t ? t() : _(!0);
|
|
9044
9044
|
}, T = A ? "critical" : "warning";
|
|
9045
9045
|
return /* @__PURE__ */ u(ye, { children: [
|
|
9046
9046
|
/* @__PURE__ */ u(
|
|
9047
9047
|
"div",
|
|
9048
9048
|
{
|
|
9049
|
-
className:
|
|
9049
|
+
className: U(
|
|
9050
9050
|
"bpb-usage-banner bpb-scope",
|
|
9051
9051
|
`bpb-usage-banner--${a}`,
|
|
9052
9052
|
`bpb-usage-banner--${T}`,
|
|
@@ -9056,7 +9056,7 @@ const xi = ({
|
|
|
9056
9056
|
"aria-live": "polite",
|
|
9057
9057
|
children: [
|
|
9058
9058
|
/* @__PURE__ */ o(jn, { size: 18, className: "bpb-usage-banner__icon" }),
|
|
9059
|
-
/* @__PURE__ */ o("p", { className: "bpb-usage-banner__text", children: A ? p("usageBannerLimitReached", { label:
|
|
9059
|
+
/* @__PURE__ */ o("p", { className: "bpb-usage-banner__text", children: A ? p("usageBannerLimitReached", { label: S }) : p("usageBannerNearLimit", { pct: w, label: S }) }),
|
|
9060
9060
|
/* @__PURE__ */ u("div", { className: "bpb-usage-banner__actions", children: [
|
|
9061
9061
|
/* @__PURE__ */ o(be, { variant: "primary", size: "sm", onClick: f, children: r ?? p("usageBannerDefaultCta") }),
|
|
9062
9062
|
n && /* @__PURE__ */ o(
|
|
@@ -9066,7 +9066,7 @@ const xi = ({
|
|
|
9066
9066
|
className: "bpb-usage-banner__dismiss",
|
|
9067
9067
|
"aria-label": p("usageBannerDismiss"),
|
|
9068
9068
|
onClick: () => {
|
|
9069
|
-
ar(Zt, d, y.key),
|
|
9069
|
+
ar(Zt, d, y.key), h((I) => ({ ...I, [y.key]: !0 }));
|
|
9070
9070
|
},
|
|
9071
9071
|
children: /* @__PURE__ */ o(dt, { size: 16 })
|
|
9072
9072
|
}
|
|
@@ -9079,29 +9079,29 @@ const xi = ({
|
|
|
9079
9079
|
/* @__PURE__ */ o(
|
|
9080
9080
|
qo,
|
|
9081
9081
|
{
|
|
9082
|
-
open:
|
|
9083
|
-
onOpenChange:
|
|
9084
|
-
onSelectPlan: (
|
|
9085
|
-
|
|
9082
|
+
open: b,
|
|
9083
|
+
onOpenChange: _,
|
|
9084
|
+
onSelectPlan: (I, D) => {
|
|
9085
|
+
_(!1), v({ planId: I, interval: D });
|
|
9086
9086
|
}
|
|
9087
9087
|
}
|
|
9088
9088
|
),
|
|
9089
|
-
|
|
9089
|
+
N && /* @__PURE__ */ o(
|
|
9090
9090
|
Zo,
|
|
9091
9091
|
{
|
|
9092
|
-
open: !!
|
|
9093
|
-
onOpenChange: (
|
|
9094
|
-
planId:
|
|
9095
|
-
interval:
|
|
9092
|
+
open: !!N,
|
|
9093
|
+
onOpenChange: (I) => !I && v(null),
|
|
9094
|
+
planId: N.planId,
|
|
9095
|
+
interval: N.interval,
|
|
9096
9096
|
onBack: () => {
|
|
9097
|
-
v(null),
|
|
9097
|
+
v(null), _(!0);
|
|
9098
9098
|
},
|
|
9099
9099
|
onSuccess: () => v(null)
|
|
9100
9100
|
}
|
|
9101
9101
|
)
|
|
9102
9102
|
] })
|
|
9103
9103
|
] });
|
|
9104
|
-
}, Pi = ({ Icon: a, title: e, description: t, onClick: n, className: r }) => /* @__PURE__ */ u("button", { type: "button", className:
|
|
9104
|
+
}, Pi = ({ Icon: a, title: e, description: t, onClick: n, className: r }) => /* @__PURE__ */ u("button", { type: "button", className: U("bpb-action-card bpb-scope", r), onClick: n, children: [
|
|
9105
9105
|
/* @__PURE__ */ u("div", { className: "bpb-action-card__header", children: [
|
|
9106
9106
|
/* @__PURE__ */ o(a, { size: 20 }),
|
|
9107
9107
|
e
|
|
@@ -9113,7 +9113,7 @@ const xi = ({
|
|
|
9113
9113
|
"button",
|
|
9114
9114
|
{
|
|
9115
9115
|
type: "button",
|
|
9116
|
-
className:
|
|
9116
|
+
className: U(
|
|
9117
9117
|
"bpb-summary-card bpb-scope",
|
|
9118
9118
|
a ? "bpb-summary-card--addons" : "bpb-summary-card--plan",
|
|
9119
9119
|
e
|
|
@@ -9137,20 +9137,20 @@ const xi = ({
|
|
|
9137
9137
|
}
|
|
9138
9138
|
);
|
|
9139
9139
|
}, Fi = ({ onManage: a, className: e }) => {
|
|
9140
|
-
var
|
|
9140
|
+
var _, N;
|
|
9141
9141
|
const { isOutdatedBilling: t } = G(), { t: n } = oe(), { data: r, isLoading: s } = Re({ enabled: !t }), { data: i, isLoading: l } = Ue();
|
|
9142
9142
|
if (t)
|
|
9143
9143
|
return /* @__PURE__ */ o(tr, { isAddons: !1, className: e });
|
|
9144
9144
|
if (s || l)
|
|
9145
|
-
return /* @__PURE__ */ o(X, { height: 84, rounded: !0, className:
|
|
9146
|
-
const c = r == null ? void 0 : r.plan.current, d = i == null ? void 0 : i.find((v) => v.id === (c == null ? void 0 : c.planId)), p = (c == null ? void 0 : c.interval) ?? "month",
|
|
9145
|
+
return /* @__PURE__ */ o(X, { height: 84, rounded: !0, className: U("bpb-scope", e) });
|
|
9146
|
+
const c = r == null ? void 0 : r.plan.current, d = i == null ? void 0 : i.find((v) => v.id === (c == null ? void 0 : c.planId)), p = (c == null ? void 0 : c.interval) ?? "month", g = ((_ = d == null ? void 0 : d.prices[p]) == null ? void 0 : _.amount) ?? 0, m = ((N = d == null ? void 0 : d.prices[p]) == null ? void 0 : N.currency) ?? "usd", h = d == null ? void 0 : d.features.conversation_sessions, b = d ? ue(d) : "community";
|
|
9147
9147
|
return /* @__PURE__ */ u(
|
|
9148
9148
|
"button",
|
|
9149
9149
|
{
|
|
9150
9150
|
type: "button",
|
|
9151
|
-
className:
|
|
9151
|
+
className: U(
|
|
9152
9152
|
"bpb-summary-card bpb-summary-card--plan bpb-scope",
|
|
9153
|
-
`bpb-summary-card--tier-${
|
|
9153
|
+
`bpb-summary-card--tier-${b === "managed" ? "enterprise" : b}`,
|
|
9154
9154
|
e
|
|
9155
9155
|
),
|
|
9156
9156
|
onClick: a,
|
|
@@ -9161,8 +9161,8 @@ const xi = ({
|
|
|
9161
9161
|
/* @__PURE__ */ o("span", { className: "bpb-summary-card__eyebrow", children: n("summaryCurrentPlan") }),
|
|
9162
9162
|
/* @__PURE__ */ o("span", { className: "bpb-summary-card__title", children: d ? se(d.name) : n("summaryNoPlan") }),
|
|
9163
9163
|
/* @__PURE__ */ u("span", { className: "bpb-summary-card__meta", children: [
|
|
9164
|
-
|
|
9165
|
-
|
|
9164
|
+
g > 0 ? `${Z(g, m, 0)}${n(p === "year" ? "perYear" : "perMonth")}` : n("free"),
|
|
9165
|
+
h !== void 0 && ` · ${n("summaryConversationsPerMo", { n: re(h) })}`
|
|
9166
9166
|
] })
|
|
9167
9167
|
] }),
|
|
9168
9168
|
/* @__PURE__ */ u("span", { className: "bpb-summary-card__action", children: [
|
|
@@ -9178,17 +9178,17 @@ const xi = ({
|
|
|
9178
9178
|
if (t)
|
|
9179
9179
|
return /* @__PURE__ */ o(tr, { isAddons: !0, className: e });
|
|
9180
9180
|
if (s || l)
|
|
9181
|
-
return /* @__PURE__ */ o(X, { height: 84, rounded: !0, className:
|
|
9181
|
+
return /* @__PURE__ */ o(X, { height: 84, rounded: !0, className: U("bpb-scope", e) });
|
|
9182
9182
|
const c = (i ?? []).flatMap((d) => {
|
|
9183
|
-
var
|
|
9184
|
-
const p = ((
|
|
9183
|
+
var g;
|
|
9184
|
+
const p = ((g = r == null ? void 0 : r.addons[d.id]) == null ? void 0 : g.current.quantity) ?? 0;
|
|
9185
9185
|
return p > 0 ? [{ name: $e[d.id] ? n($e[d.id]) : Sa(d.name), quantity: p }] : [];
|
|
9186
9186
|
});
|
|
9187
9187
|
return /* @__PURE__ */ u(
|
|
9188
9188
|
"button",
|
|
9189
9189
|
{
|
|
9190
9190
|
type: "button",
|
|
9191
|
-
className:
|
|
9191
|
+
className: U(
|
|
9192
9192
|
"bpb-summary-card bpb-summary-card--addons bpb-scope",
|
|
9193
9193
|
c.length > 0 && "bpb-summary-card--active",
|
|
9194
9194
|
e
|
|
@@ -9217,14 +9217,14 @@ const xi = ({
|
|
|
9217
9217
|
);
|
|
9218
9218
|
}, Ii = ({ onManage: a, className: e }) => {
|
|
9219
9219
|
var K, z;
|
|
9220
|
-
const { isOutdatedBilling: t, locale: n, manageBillingUrl: r, analytics: s } = G(), { t: i } = oe(), { data: l, isLoading: c } = Re({ enabled: !t }), { data: d, isLoading: p } = Ue(), { data:
|
|
9220
|
+
const { isOutdatedBilling: t, locale: n, manageBillingUrl: r, analytics: s } = G(), { t: i } = oe(), { data: l, isLoading: c } = Re({ enabled: !t }), { data: d, isLoading: p } = Ue(), { data: g, isLoading: m } = ia();
|
|
9221
9221
|
if (t) {
|
|
9222
9222
|
const C = () => r && window.open(r, "_blank", "noopener");
|
|
9223
9223
|
return /* @__PURE__ */ u(
|
|
9224
9224
|
"button",
|
|
9225
9225
|
{
|
|
9226
9226
|
type: "button",
|
|
9227
|
-
className:
|
|
9227
|
+
className: U("bpb-plan-banner bpb-plan-banner--community bpb-scope", e),
|
|
9228
9228
|
onClick: C,
|
|
9229
9229
|
disabled: !r,
|
|
9230
9230
|
children: [
|
|
@@ -9242,32 +9242,32 @@ const xi = ({
|
|
|
9242
9242
|
}
|
|
9243
9243
|
);
|
|
9244
9244
|
}
|
|
9245
|
-
if (c || p ||
|
|
9246
|
-
return /* @__PURE__ */ o(X, { height: 132, rounded: !0, className:
|
|
9247
|
-
const
|
|
9245
|
+
if (c || p || m)
|
|
9246
|
+
return /* @__PURE__ */ o(X, { height: 132, rounded: !0, className: U("bpb-scope", e) });
|
|
9247
|
+
const h = l == null ? void 0 : l.plan.current, b = d == null ? void 0 : d.find((C) => C.id === (h == null ? void 0 : h.planId)), _ = (h == null ? void 0 : h.interval) ?? "month", N = ((K = b == null ? void 0 : b.prices[_]) == null ? void 0 : K.currency) ?? "usd", v = b ? ue(b) : "community", y = Object.fromEntries(
|
|
9248
9248
|
Object.entries((l == null ? void 0 : l.addons) ?? {}).map(([C, ee]) => {
|
|
9249
9249
|
var ae;
|
|
9250
9250
|
return [C, ((ae = ee.current) == null ? void 0 : ae.quantity) ?? 0];
|
|
9251
9251
|
})
|
|
9252
|
-
), k = ((z =
|
|
9253
|
-
const ae =
|
|
9252
|
+
), k = ((z = b == null ? void 0 : b.prices[_]) == null ? void 0 : z.amount) ?? 0, x = (g ?? []).reduce((C, ee) => {
|
|
9253
|
+
const ae = b ? nt(ee, b, _) : null;
|
|
9254
9254
|
return C + (y[ee.id] ?? 0) * ((ae == null ? void 0 : ae.amount) ?? 0);
|
|
9255
|
-
}, 0),
|
|
9256
|
-
plan: se(
|
|
9257
|
-
date: Oe(
|
|
9255
|
+
}, 0), S = k + x, w = _ === "year" ? "/yr" : "/mo", A = wo(b, g, y).find((C) => C.key === "conversation_sessions"), f = i(v === "community" ? "conversationsUnit" : "conversationsPerMonth"), T = v === "enterprise" || v === "managed", I = v !== "community" && !T, D = l == null ? void 0 : l.plan.next, q = D && D.planId !== (h == null ? void 0 : h.planId), R = h == null ? void 0 : h.periodEnd, j = I && !q && R && !sa(R) ? Oe(R, n) : null, E = d == null ? void 0 : d.find((C) => C.id === (D == null ? void 0 : D.planId)), B = D == null ? void 0 : D.effectiveDate, $ = q && E && B ? i("planBannerDowngradesTo", {
|
|
9256
|
+
plan: se(E.name),
|
|
9257
|
+
date: Oe(B, n)
|
|
9258
9258
|
}) : null;
|
|
9259
9259
|
return /* @__PURE__ */ u(
|
|
9260
9260
|
"button",
|
|
9261
9261
|
{
|
|
9262
9262
|
type: "button",
|
|
9263
|
-
className:
|
|
9263
|
+
className: U("bpb-plan-banner", `bpb-plan-banner--${v}`, "bpb-scope", e),
|
|
9264
9264
|
onClick: () => {
|
|
9265
9265
|
s.capture(pe.UPGRADE_CTA_CLICKED, { source: "plan_banner", current_tier: v }), a();
|
|
9266
9266
|
},
|
|
9267
9267
|
children: [
|
|
9268
9268
|
/* @__PURE__ */ u("div", { className: "bpb-plan-banner__main", children: [
|
|
9269
9269
|
/* @__PURE__ */ o("span", { className: "bpb-plan-banner__eyebrow", children: i("planBannerEyebrow") }),
|
|
9270
|
-
/* @__PURE__ */ o("span", { className: "bpb-plan-banner__name", children:
|
|
9270
|
+
/* @__PURE__ */ o("span", { className: "bpb-plan-banner__name", children: b ? se(b.name) : i("planBannerNoPlan") }),
|
|
9271
9271
|
T ? /* @__PURE__ */ o("span", { className: "bpb-plan-banner__sub", children: A && A.added > 0 ? /* @__PURE__ */ u(ye, { children: [
|
|
9272
9272
|
i("planBannerCustom"),
|
|
9273
9273
|
" + ",
|
|
@@ -9283,16 +9283,16 @@ const xi = ({
|
|
|
9283
9283
|
] }) : `${re(A.total)} ${f}` })
|
|
9284
9284
|
] }),
|
|
9285
9285
|
/* @__PURE__ */ u("div", { className: "bpb-plan-banner__summary", children: [
|
|
9286
|
-
T ? /* @__PURE__ */ o("span", { className: "bpb-plan-banner__price", children: i("planBannerCustomPricing") }) : /* @__PURE__ */ o("span", { className: "bpb-plan-banner__price", children:
|
|
9287
|
-
Z(
|
|
9288
|
-
/* @__PURE__ */ o("span", { className: "bpb-plan-banner__price-suffix", children:
|
|
9286
|
+
T ? /* @__PURE__ */ o("span", { className: "bpb-plan-banner__price", children: i("planBannerCustomPricing") }) : /* @__PURE__ */ o("span", { className: "bpb-plan-banner__price", children: S > 0 && /* @__PURE__ */ u(ye, { children: [
|
|
9287
|
+
Z(S, N, 0),
|
|
9288
|
+
/* @__PURE__ */ o("span", { className: "bpb-plan-banner__price-suffix", children: w })
|
|
9289
9289
|
] }) }),
|
|
9290
|
-
|
|
9291
|
-
i(
|
|
9290
|
+
I && /* @__PURE__ */ u("span", { className: "bpb-plan-banner__meta", children: [
|
|
9291
|
+
i(_ === "year" ? "billedAnnually" : "billedMonthly"),
|
|
9292
9292
|
x > 0 && ` ${i("planBannerInclAddons")}`
|
|
9293
9293
|
] }),
|
|
9294
|
-
|
|
9295
|
-
|
|
9294
|
+
j && /* @__PURE__ */ o("span", { className: "bpb-plan-banner__meta", children: i("planBannerRenews", { date: j }) }),
|
|
9295
|
+
$ && /* @__PURE__ */ o("span", { className: "bpb-plan-banner__meta", children: $ })
|
|
9296
9296
|
] }),
|
|
9297
9297
|
/* @__PURE__ */ u("span", { className: "bpb-plan-banner__cta", children: [
|
|
9298
9298
|
i("planBannerManageCta"),
|
|
@@ -9303,28 +9303,28 @@ const xi = ({
|
|
|
9303
9303
|
}
|
|
9304
9304
|
);
|
|
9305
9305
|
}, Ei = ({ onManage: a, period: e, variant: t = "card", className: n, style: r }) => {
|
|
9306
|
-
const { isOutdatedBilling: s, locale: i } = G(), { t: l } = oe(), { data: c, isLoading: d } = Re({ enabled: !s }), { data: p, isLoading:
|
|
9306
|
+
const { isOutdatedBilling: s, locale: i } = G(), { t: l } = oe(), { data: c, isLoading: d } = Re({ enabled: !s }), { data: p, isLoading: g } = Ue(), { data: m, isLoading: h } = la({ period: e, enabled: !s });
|
|
9307
9307
|
if (s)
|
|
9308
9308
|
return null;
|
|
9309
|
-
if (d ||
|
|
9310
|
-
return /* @__PURE__ */ o(X, { height: 72, rounded: !0, className:
|
|
9311
|
-
const
|
|
9312
|
-
if (
|
|
9309
|
+
if (d || g || h)
|
|
9310
|
+
return /* @__PURE__ */ o(X, { height: 72, rounded: !0, className: U("bpb-scope", n) });
|
|
9311
|
+
const b = p == null ? void 0 : p.find(($) => $.id === (c == null ? void 0 : c.plan.current.planId)), _ = b ? ue(b) : "community", N = _ === "enterprise" || _ === "managed", v = za(m), y = v.find(($) => $.used > $.quota);
|
|
9312
|
+
if (N && !y)
|
|
9313
9313
|
return null;
|
|
9314
|
-
const k = v.find((
|
|
9315
|
-
let
|
|
9316
|
-
if (
|
|
9317
|
-
const
|
|
9318
|
-
|
|
9314
|
+
const k = v.find(($) => $.key === "conversation_sessions"), x = v[0], S = y ?? (x && x.key !== "conversation_sessions" && x.pct >= 75 ? x : k ?? x), w = S ? Math.round(S.pct) : 0, A = w > 0 ? Math.max(5, w) : 0, f = S ? gt(S.pct) : "normal", T = f !== "normal", I = _ === "community", D = c == null ? void 0 : c.plan.current.periodEnd, q = D && !sa(D) ? Oe(D, i) : null;
|
|
9315
|
+
let R = null, j = null;
|
|
9316
|
+
if (S && T) {
|
|
9317
|
+
const $ = ga(S.remaining, S.unit);
|
|
9318
|
+
R = l(f === "critical" ? "usageWidgetLimitReached" : "usageWidgetRunningLow"), N ? j = l("usageWidgetEnterpriseOverQuota") : I && S.key === "conversation_sessions" ? j = f === "critical" ? l("usageWidgetFreeExhausted") : l("usageWidgetFreeLeft", { left: $ }) : j = f === "critical" ? l("usageWidgetUpgradeToKeepGoing") : l("usageWidgetOnlyLeft", { left: $ });
|
|
9319
9319
|
}
|
|
9320
|
-
const
|
|
9320
|
+
const E = /* @__PURE__ */ o(ye, { children: S ? /* @__PURE__ */ u(ye, { children: [
|
|
9321
9321
|
/* @__PURE__ */ u("div", { className: "bpb-plan-usage__head", children: [
|
|
9322
|
-
T && /* @__PURE__ */ o(jn, { size: 16, className:
|
|
9323
|
-
/* @__PURE__ */ o("span", { className: "bpb-plan-usage__plan", children:
|
|
9322
|
+
T && /* @__PURE__ */ o(jn, { size: 16, className: U("bpb-plan-usage__alert", `bpb-plan-usage__alert--${f}`) }),
|
|
9323
|
+
/* @__PURE__ */ o("span", { className: "bpb-plan-usage__plan", children: S.label }),
|
|
9324
9324
|
/* @__PURE__ */ u("span", { className: "bpb-plan-usage__count", children: [
|
|
9325
|
-
ga(
|
|
9325
|
+
ga(S.used, S.unit),
|
|
9326
9326
|
" / ",
|
|
9327
|
-
ga(
|
|
9327
|
+
ga(S.quota, S.unit)
|
|
9328
9328
|
] }),
|
|
9329
9329
|
a && !T && /* @__PURE__ */ o(ra, { size: 15, className: "bpb-plan-usage__chevron" })
|
|
9330
9330
|
] }),
|
|
@@ -9333,125 +9333,137 @@ const xi = ({
|
|
|
9333
9333
|
{
|
|
9334
9334
|
className: "bpb-plan-usage__bar",
|
|
9335
9335
|
role: "progressbar",
|
|
9336
|
-
"aria-valuenow":
|
|
9336
|
+
"aria-valuenow": w,
|
|
9337
9337
|
"aria-valuemin": 0,
|
|
9338
9338
|
"aria-valuemax": 100,
|
|
9339
9339
|
children: /* @__PURE__ */ o(
|
|
9340
9340
|
"div",
|
|
9341
9341
|
{
|
|
9342
|
-
className:
|
|
9342
|
+
className: U("bpb-plan-usage__fill", `bpb-plan-usage__fill--${f}`),
|
|
9343
9343
|
style: { width: `${A}%` }
|
|
9344
9344
|
}
|
|
9345
9345
|
)
|
|
9346
9346
|
}
|
|
9347
9347
|
),
|
|
9348
|
-
|
|
9349
|
-
/* @__PURE__ */ u("strong", { className:
|
|
9350
|
-
|
|
9348
|
+
R ? /* @__PURE__ */ u("p", { className: "bpb-plan-usage__status", children: [
|
|
9349
|
+
/* @__PURE__ */ u("strong", { className: U("bpb-plan-usage__status-word", `bpb-plan-usage__status-word--${f}`), children: [
|
|
9350
|
+
R,
|
|
9351
9351
|
"."
|
|
9352
9352
|
] }),
|
|
9353
9353
|
" ",
|
|
9354
|
-
|
|
9355
|
-
] }) :
|
|
9356
|
-
a && T && !
|
|
9354
|
+
j && /* @__PURE__ */ o("span", { className: "bpb-plan-usage__status-detail", children: j })
|
|
9355
|
+
] }) : q && /* @__PURE__ */ o("span", { className: "bpb-plan-usage__reset", children: l("usageWidgetResets", { date: q }) }),
|
|
9356
|
+
a && T && !N && /* @__PURE__ */ u("span", { className: "bpb-plan-usage__cta", children: [
|
|
9357
9357
|
l("usageWidgetViewOptions"),
|
|
9358
9358
|
/* @__PURE__ */ o(ut, { size: 14 })
|
|
9359
9359
|
] })
|
|
9360
9360
|
] }) : /* @__PURE__ */ u("div", { className: "bpb-plan-usage__head", children: [
|
|
9361
|
-
/* @__PURE__ */ o("span", { className: "bpb-plan-usage__plan", children:
|
|
9361
|
+
/* @__PURE__ */ o("span", { className: "bpb-plan-usage__plan", children: b ? se(b.name) : l("free") }),
|
|
9362
9362
|
a && /* @__PURE__ */ o(ra, { size: 15, className: "bpb-plan-usage__chevron" })
|
|
9363
|
-
] }) }),
|
|
9363
|
+
] }) }), B = U(
|
|
9364
9364
|
"bpb-plan-usage bpb-scope",
|
|
9365
9365
|
`bpb-plan-usage--${t}`,
|
|
9366
9366
|
T && `bpb-plan-usage--${f}`,
|
|
9367
9367
|
a && "bpb-plan-usage--clickable",
|
|
9368
9368
|
n
|
|
9369
9369
|
);
|
|
9370
|
-
return a ? /* @__PURE__ */ o("button", { type: "button", className:
|
|
9370
|
+
return a ? /* @__PURE__ */ o("button", { type: "button", className: B, style: r, onClick: a, children: E }) : /* @__PURE__ */ o("div", { className: B, style: r, children: E });
|
|
9371
9371
|
}, ui = ({
|
|
9372
9372
|
children: a,
|
|
9373
9373
|
delay: e = 200,
|
|
9374
9374
|
placement: t = "top",
|
|
9375
|
-
|
|
9376
|
-
|
|
9377
|
-
|
|
9378
|
-
|
|
9375
|
+
align: n = "center",
|
|
9376
|
+
period: r,
|
|
9377
|
+
onUpgrade: s,
|
|
9378
|
+
block: i = !1,
|
|
9379
|
+
className: l
|
|
9379
9380
|
}) => {
|
|
9380
|
-
const { isOutdatedBilling:
|
|
9381
|
+
const { isOutdatedBilling: c, locale: d, analytics: p } = G(), { data: g } = la({ period: r, enabled: !c }), { data: m } = Re({ enabled: !c }), { data: h } = Ue(), [b, _] = H(!1), N = Ea(null), v = () => {
|
|
9381
9382
|
N.current && (clearTimeout(N.current), N.current = null);
|
|
9382
9383
|
};
|
|
9383
|
-
we(() =>
|
|
9384
|
-
const
|
|
9385
|
-
|
|
9386
|
-
},
|
|
9387
|
-
|
|
9388
|
-
},
|
|
9389
|
-
|
|
9384
|
+
we(() => v, []);
|
|
9385
|
+
const y = h == null ? void 0 : h.find((E) => E.id === (m == null ? void 0 : m.plan.current.planId)), k = y ? ue(y) : "community", x = za(g), S = !c && x.length > 0, w = () => {
|
|
9386
|
+
S && (v(), N.current = setTimeout(() => _(!0), Math.max(0, e)));
|
|
9387
|
+
}, A = () => {
|
|
9388
|
+
v(), _(!1);
|
|
9389
|
+
}, f = y ? se(y.name) : "Free", T = m == null ? void 0 : m.plan.current.periodEnd, I = T && !sa(T) ? Oe(T, d) : null, D = k === "community", q = D ? x.find((E) => E.key === "conversation_sessions") : void 0, R = D && !!s, j = () => {
|
|
9390
|
+
p.capture(pe.UPGRADE_CTA_CLICKED, { source: "usage_popover" }), s == null || s();
|
|
9390
9391
|
};
|
|
9391
9392
|
return /* @__PURE__ */ u(
|
|
9392
9393
|
"span",
|
|
9393
9394
|
{
|
|
9394
|
-
className:
|
|
9395
|
+
className: U("bpb-usage-pop bpb-scope", i && "bpb-usage-pop--block", l),
|
|
9395
9396
|
onMouseEnter: w,
|
|
9396
|
-
onMouseLeave:
|
|
9397
|
+
onMouseLeave: A,
|
|
9397
9398
|
onFocus: w,
|
|
9398
|
-
onBlur:
|
|
9399
|
+
onBlur: A,
|
|
9399
9400
|
children: [
|
|
9400
9401
|
a,
|
|
9401
|
-
b &&
|
|
9402
|
-
|
|
9403
|
-
|
|
9404
|
-
|
|
9405
|
-
|
|
9406
|
-
|
|
9407
|
-
|
|
9408
|
-
|
|
9409
|
-
|
|
9410
|
-
|
|
9411
|
-
|
|
9412
|
-
|
|
9413
|
-
|
|
9414
|
-
|
|
9415
|
-
|
|
9416
|
-
|
|
9417
|
-
|
|
9418
|
-
|
|
9419
|
-
T
|
|
9420
|
-
] })
|
|
9421
|
-
] }),
|
|
9422
|
-
/* @__PURE__ */ o("span", { className: "bpb-usage-pop__title", children: "Usage this period" })
|
|
9423
|
-
] }),
|
|
9424
|
-
k.map((B) => {
|
|
9425
|
-
const U = B.pct > 0 ? Math.max(5, B.pct) : 0;
|
|
9426
|
-
return /* @__PURE__ */ u("span", { className: "bpb-usage-pop__item", children: [
|
|
9427
|
-
/* @__PURE__ */ u("span", { className: "bpb-usage-pop__head", children: [
|
|
9428
|
-
/* @__PURE__ */ o("span", { className: "bpb-usage-pop__name", children: B.label }),
|
|
9429
|
-
/* @__PURE__ */ u("span", { className: "bpb-usage-pop__val", children: [
|
|
9430
|
-
ga(B.used, B.unit),
|
|
9431
|
-
" / ",
|
|
9432
|
-
ga(B.quota, B.unit)
|
|
9402
|
+
b && S && /* @__PURE__ */ u(
|
|
9403
|
+
"span",
|
|
9404
|
+
{
|
|
9405
|
+
className: U(
|
|
9406
|
+
"bpb-usage-pop__card",
|
|
9407
|
+
`bpb-usage-pop__card--${t}`,
|
|
9408
|
+
`bpb-usage-pop__card--align-${n}`
|
|
9409
|
+
),
|
|
9410
|
+
role: "tooltip",
|
|
9411
|
+
children: [
|
|
9412
|
+
D ? /* @__PURE__ */ u("span", { className: "bpb-usage-pop__header", children: [
|
|
9413
|
+
/* @__PURE__ */ o("span", { className: "bpb-usage-pop__plan-name", children: "Free plan usage" }),
|
|
9414
|
+
q && /* @__PURE__ */ u("span", { className: "bpb-usage-pop__subtitle", children: [
|
|
9415
|
+
/* @__PURE__ */ u("strong", { children: [
|
|
9416
|
+
re(q.quota),
|
|
9417
|
+
" conversations"
|
|
9418
|
+
] }),
|
|
9419
|
+
" included, total. They do not renew, and Free has no top-ups."
|
|
9433
9420
|
] })
|
|
9421
|
+
] }) : /* @__PURE__ */ u(ye, { children: [
|
|
9422
|
+
/* @__PURE__ */ u("span", { className: "bpb-usage-pop__plan", children: [
|
|
9423
|
+
/* @__PURE__ */ u("span", { className: "bpb-usage-pop__plan-name", children: [
|
|
9424
|
+
f,
|
|
9425
|
+
" plan"
|
|
9426
|
+
] }),
|
|
9427
|
+
I && /* @__PURE__ */ u("span", { className: "bpb-usage-pop__reset", children: [
|
|
9428
|
+
"Resets ",
|
|
9429
|
+
I
|
|
9430
|
+
] })
|
|
9431
|
+
] }),
|
|
9432
|
+
/* @__PURE__ */ o("span", { className: "bpb-usage-pop__title", children: "Usage this period" })
|
|
9434
9433
|
] }),
|
|
9435
|
-
|
|
9436
|
-
|
|
9437
|
-
{
|
|
9438
|
-
className:
|
|
9439
|
-
|
|
9440
|
-
|
|
9441
|
-
|
|
9442
|
-
|
|
9443
|
-
|
|
9444
|
-
|
|
9445
|
-
|
|
9446
|
-
|
|
9447
|
-
|
|
9448
|
-
|
|
9449
|
-
|
|
9450
|
-
|
|
9451
|
-
|
|
9452
|
-
|
|
9453
|
-
|
|
9454
|
-
|
|
9434
|
+
x.map((E) => {
|
|
9435
|
+
const B = E.pct > 0 ? Math.max(5, E.pct) : 0;
|
|
9436
|
+
return /* @__PURE__ */ u("span", { className: "bpb-usage-pop__item", children: [
|
|
9437
|
+
/* @__PURE__ */ u("span", { className: "bpb-usage-pop__head", children: [
|
|
9438
|
+
/* @__PURE__ */ o("span", { className: "bpb-usage-pop__name", children: E.label }),
|
|
9439
|
+
/* @__PURE__ */ u("span", { className: "bpb-usage-pop__val", children: [
|
|
9440
|
+
ga(E.used, E.unit),
|
|
9441
|
+
" / ",
|
|
9442
|
+
ga(E.quota, E.unit)
|
|
9443
|
+
] })
|
|
9444
|
+
] }),
|
|
9445
|
+
/* @__PURE__ */ o("span", { className: "bpb-usage-pop__bar", children: /* @__PURE__ */ o(
|
|
9446
|
+
"span",
|
|
9447
|
+
{
|
|
9448
|
+
className: U("bpb-usage-pop__fill", `bpb-usage-pop__fill--${gt(E.pct)}`),
|
|
9449
|
+
style: { width: `${B}%` }
|
|
9450
|
+
}
|
|
9451
|
+
) })
|
|
9452
|
+
] }, E.key);
|
|
9453
|
+
}),
|
|
9454
|
+
R && /* @__PURE__ */ u("span", { className: "bpb-usage-pop__nudge", children: [
|
|
9455
|
+
/* @__PURE__ */ u("span", { className: "bpb-usage-pop__nudge-text", children: [
|
|
9456
|
+
/* @__PURE__ */ o("strong", { children: "Need more room?" }),
|
|
9457
|
+
" Plus includes 250 conversations a month, unlimited AI agents, and packs of 100 when you need them."
|
|
9458
|
+
] }),
|
|
9459
|
+
/* @__PURE__ */ u("button", { type: "button", className: "bpb-usage-pop__nudge-cta", onClick: j, children: [
|
|
9460
|
+
"See what you get with Plus",
|
|
9461
|
+
/* @__PURE__ */ o(ut, { size: 14 })
|
|
9462
|
+
] })
|
|
9463
|
+
] })
|
|
9464
|
+
]
|
|
9465
|
+
}
|
|
9466
|
+
)
|
|
9455
9467
|
]
|
|
9456
9468
|
}
|
|
9457
9469
|
);
|
|
@@ -9461,22 +9473,24 @@ const xi = ({
|
|
|
9461
9473
|
showLabel: t = !1,
|
|
9462
9474
|
onClick: n,
|
|
9463
9475
|
popoverDelay: r = 200,
|
|
9464
|
-
|
|
9465
|
-
|
|
9466
|
-
|
|
9476
|
+
popoverAlign: s = "center",
|
|
9477
|
+
trackColor: i = "light",
|
|
9478
|
+
period: l,
|
|
9479
|
+
className: c,
|
|
9480
|
+
...d
|
|
9467
9481
|
}) => {
|
|
9468
|
-
const { isOutdatedBilling:
|
|
9469
|
-
if (
|
|
9482
|
+
const { isOutdatedBilling: p } = G(), { data: g } = la({ period: l, enabled: !p }), m = za(g);
|
|
9483
|
+
if (p || m.length === 0)
|
|
9470
9484
|
return null;
|
|
9471
|
-
const
|
|
9485
|
+
const h = m[0], b = gt(h.pct), _ = h.pct > 0 ? Math.max(5, h.pct) : 0, N = (a - e) / 2, v = 2 * Math.PI * N, y = v * (1 - _ / 100), k = d["aria-label"] ?? `${Math.round(h.pct)}% of your ${h.label.toLowerCase()} used`, x = /* @__PURE__ */ u(ye, { children: [
|
|
9472
9486
|
/* @__PURE__ */ u("svg", { className: "bpb-usage-ring__svg", width: a, height: a, viewBox: `0 0 ${a} ${a}`, "aria-hidden": !0, children: [
|
|
9473
9487
|
/* @__PURE__ */ o(
|
|
9474
9488
|
"circle",
|
|
9475
9489
|
{
|
|
9476
|
-
className: "bpb-usage-ring__track",
|
|
9490
|
+
className: U("bpb-usage-ring__track", `bpb-usage-ring__track--${i}`),
|
|
9477
9491
|
cx: a / 2,
|
|
9478
9492
|
cy: a / 2,
|
|
9479
|
-
r:
|
|
9493
|
+
r: N,
|
|
9480
9494
|
fill: "none",
|
|
9481
9495
|
strokeWidth: e
|
|
9482
9496
|
}
|
|
@@ -9484,25 +9498,25 @@ const xi = ({
|
|
|
9484
9498
|
/* @__PURE__ */ o(
|
|
9485
9499
|
"circle",
|
|
9486
9500
|
{
|
|
9487
|
-
className:
|
|
9501
|
+
className: U("bpb-usage-ring__arc", `bpb-usage-ring__arc--${b}`),
|
|
9488
9502
|
cx: a / 2,
|
|
9489
9503
|
cy: a / 2,
|
|
9490
|
-
r:
|
|
9504
|
+
r: N,
|
|
9491
9505
|
fill: "none",
|
|
9492
9506
|
strokeWidth: e,
|
|
9493
9507
|
strokeLinecap: "round",
|
|
9494
|
-
strokeDasharray:
|
|
9495
|
-
strokeDashoffset:
|
|
9508
|
+
strokeDasharray: v,
|
|
9509
|
+
strokeDashoffset: y,
|
|
9496
9510
|
transform: `rotate(-90 ${a / 2} ${a / 2})`
|
|
9497
9511
|
}
|
|
9498
9512
|
)
|
|
9499
9513
|
] }),
|
|
9500
9514
|
t && /* @__PURE__ */ u("span", { className: "bpb-usage-ring__label", children: [
|
|
9501
|
-
Math.round(
|
|
9515
|
+
Math.round(h.pct),
|
|
9502
9516
|
"%"
|
|
9503
9517
|
] })
|
|
9504
|
-
] }),
|
|
9505
|
-
return /* @__PURE__ */ o(ui, { delay: r,
|
|
9518
|
+
] }), S = U("bpb-usage-ring", n && "bpb-usage-ring--clickable");
|
|
9519
|
+
return /* @__PURE__ */ o(ui, { delay: r, align: s, period: l, className: c, children: n ? /* @__PURE__ */ o("button", { type: "button", className: S, onClick: n, "aria-label": k, children: x }) : /* @__PURE__ */ o("span", { className: S, tabIndex: 0, role: "img", "aria-label": k, children: x }) });
|
|
9506
9520
|
};
|
|
9507
9521
|
export {
|
|
9508
9522
|
Li as AddonsSummaryCard,
|
|
@@ -9571,7 +9585,7 @@ export {
|
|
|
9571
9585
|
So as addonLimitsPreview,
|
|
9572
9586
|
nt as addonPrice,
|
|
9573
9587
|
me as billingKeys,
|
|
9574
|
-
|
|
9588
|
+
U as cn,
|
|
9575
9589
|
rt as conversationPackPrice,
|
|
9576
9590
|
_o as conversationsAddon,
|
|
9577
9591
|
_a as currencySymbol,
|