@schematichq/schematic-components 2.28.0 → 2.29.0

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.
@@ -13223,6 +13223,7 @@ var en = {
13223
13223
  "An invoice is created when charges reach $X; the rest is billed monthly.": "An invoice is created when charges reach {{amount}}; the rest is billed monthly.",
13224
13224
  "An unknown error occurred.": "An unknown error occurred.",
13225
13225
  "Billed": "Billed {{period}}",
13226
+ "Billing threshold": "Billing threshold",
13226
13227
  "Bundle selected": "Bundle selected",
13227
13228
  "Buy credits": "Buy credits",
13228
13229
  "Cancel": "Cancel",
@@ -13257,8 +13258,11 @@ var en = {
13257
13258
  "Due today": "Due today",
13258
13259
  "Edit payment details": "Edit payment details",
13259
13260
  "Edit": "Edit",
13261
+ "Email": "Email",
13260
13262
  "Ends on": "Ends on {{date}}",
13261
13263
  "Enter discount code": "Enter discount code",
13264
+ "Enter email address": "Enter email address",
13265
+ "Error": "Error",
13262
13266
  "Error initializing payment method change. Please try again.": "Error initializing payment method change. Please try again.",
13263
13267
  "Error processing payment. Please try a different payment method.": "Error processing payment. Please try a different payment method.",
13264
13268
  "Error retrieving plan details. Please try again in a moment.": "Error retrieving plan details. Please try again in a moment.",
@@ -13279,6 +13283,7 @@ var en = {
13279
13283
  "Invoice credit tooltip": "Credit \u2014 this amount was returned to your account, typically due to a plan change or proration",
13280
13284
  "Invoice charge tooltip": "Charge \u2014 you were billed this amount",
13281
13285
  "Invoices": "Invoices",
13286
+ "Limit": "Limit",
13282
13287
  "Limit of": "Limit of {{amount}}",
13283
13288
  "Loading": "Loading",
13284
13289
  "Manage plan": "Manage plan",
@@ -13303,6 +13308,8 @@ var en = {
13303
13308
  "Payment Details": "Payment Details",
13304
13309
  "Plan selected": "Plan selected",
13305
13310
  "Please accept the agreement to continue.": "Please accept the agreement to continue.",
13311
+ "Please try again later.": "Please try again later.",
13312
+ "Portal not found": "Portal not found",
13306
13313
  "Plan": "Plan",
13307
13314
  "Plans": "Plans",
13308
13315
  "Please provide an access token.": "Please provide an access token.",
@@ -13354,6 +13361,7 @@ var en = {
13354
13361
  "There was a problem retrieving your upcoming invoice.": "There was a problem retrieving your upcoming invoice.",
13355
13362
  "There was a problem retrieving your invoices.": "There was a problem retrieving your invoices.",
13356
13363
  "Tier-based": "Tier-based",
13364
+ "Tiered pricing": "Tiered pricing",
13357
13365
  "Tiers apply progressively as quantity increases.": "Tiers apply progressively as quantity increases.",
13358
13366
  "Top up balance with:": "Top up balance with:",
13359
13367
  "Top-ups": "Top-ups",
@@ -13427,6 +13435,15 @@ var en = {
13427
13435
  "$X/unit/period": "{{cost}}/{{unit}}/{{period}}",
13428
13436
  "$X/Y units/period": "{{cost}}/{{size}} {{units}}/{{period}}",
13429
13437
  "day": "day",
13438
+ "day_one": "day",
13439
+ "day_other": "days",
13440
+ "hour_one": "hour",
13441
+ "hour_other": "hours",
13442
+ "minute_one": "minute",
13443
+ "minute_other": "minutes",
13444
+ "second_one": "second",
13445
+ "second_other": "seconds",
13446
+ "week": "week",
13430
13447
  "month": "month",
13431
13448
  "quarter": "quarter",
13432
13449
  "year": "year",
@@ -13435,6 +13452,13 @@ var en = {
13435
13452
  "yr": "yr",
13436
13453
  "one time": "one time",
13437
13454
  "billing period": "billing period",
13455
+ "billing period_one": "billing period",
13456
+ "billing period_other": "billing periods",
13457
+ "daily": "daily",
13458
+ "weekly": "weekly",
13459
+ "monthly": "monthly",
13460
+ "quarterly": "quarterly",
13461
+ "yearly": "yearly",
13438
13462
  "expires after purchase": "expires {{amount}} {{unit}} after purchase",
13439
13463
  "expires at the end of the billing period": "expires at the end of the billing period",
13440
13464
  "expires at the end of the next billing period": "expires at the end of the next billing period",
@@ -14124,11 +14148,9 @@ function formatBundleExpiry(bundle, t3) {
14124
14148
  if (typeof bundle.expiryUnitCount !== "number") {
14125
14149
  return void 0;
14126
14150
  }
14127
- const unit = bundle.expiryUnit === BillingCreditExpiryUnit.BillingPeriods ? t3("billing period") : t3("day");
14128
- return t3("expires after purchase", {
14129
- amount: bundle.expiryUnitCount,
14130
- unit: pluralize(unit, bundle.expiryUnitCount)
14131
- });
14151
+ const count = bundle.expiryUnitCount;
14152
+ const unit = bundle.expiryUnit === BillingCreditExpiryUnit.BillingPeriods ? t3("billing period", { count }) : t3("day", { count });
14153
+ return t3("expires after purchase", { amount: count, unit });
14132
14154
  }
14133
14155
  case BillingCreditExpiryType.EndOfBillingPeriod:
14134
14156
  return t3("expires at the end of the billing period");
@@ -14373,16 +14395,33 @@ function entitlementHasHardLimit(entitlement) {
14373
14395
  }
14374
14396
 
14375
14397
  // src/utils/api/feature.ts
14376
- function getFeatureName(feature, count = 0, ignore = false) {
14377
- const shouldBePlural = count === 0 || count > 1;
14398
+ function isEnglish(locale) {
14399
+ try {
14400
+ return new Intl.Locale(locale).language === "en";
14401
+ } catch {
14402
+ return true;
14403
+ }
14404
+ }
14405
+ function isOne(count, locale) {
14406
+ return new Intl.PluralRules(locale).select(count) === "one";
14407
+ }
14408
+ function getFeatureName(feature, locale, count, ignore = false) {
14409
+ if (!isEnglish(locale)) {
14410
+ const named = ignore ? { name: feature.name } : feature;
14411
+ const singularName2 = named.singularName || named.name;
14412
+ const pluralName2 = named.pluralName || singularName2;
14413
+ return count !== void 0 && isOne(count, locale) ? singularName2 : pluralName2;
14414
+ }
14415
+ const resolvedCount = count ?? 0;
14416
+ const shouldBePlural = resolvedCount === 0 || resolvedCount > 1;
14378
14417
  const { name, singularName, pluralName } = feature;
14379
14418
  if (!ignore && pluralName && shouldBePlural) {
14380
14419
  return pluralName;
14381
14420
  }
14382
14421
  if (!ignore && singularName) {
14383
- return shouldBePlural ? pluralize(singularName, count) : singularName;
14422
+ return shouldBePlural ? pluralize(singularName, resolvedCount) : singularName;
14384
14423
  }
14385
- return pluralize(name, count);
14424
+ return pluralize(name, resolvedCount);
14386
14425
  }
14387
14426
 
14388
14427
  // src/utils/color.ts
@@ -14592,8 +14631,21 @@ function formatCurrency(amount, {
14592
14631
  function formatOrdinal(n2, t3) {
14593
14632
  return t3("Ordinal", { count: n2, ordinal: true });
14594
14633
  }
14595
- function adjectify(str) {
14596
- return `${str}ly`;
14634
+ function adjectify(period, t3) {
14635
+ switch (period) {
14636
+ case "day":
14637
+ return t3("daily");
14638
+ case "week":
14639
+ return t3("weekly");
14640
+ case "month":
14641
+ return t3("monthly");
14642
+ case "quarter":
14643
+ return t3("quarterly");
14644
+ case "year":
14645
+ return t3("yearly");
14646
+ default:
14647
+ return period;
14648
+ }
14597
14649
  }
14598
14650
  var CURRENCY_FLAGS = {
14599
14651
  usd: "\u{1F1FA}\u{1F1F8}",
@@ -14709,11 +14761,12 @@ function getBillingPreviewText({
14709
14761
  );
14710
14762
  }
14711
14763
  const schedule = scheduleParts.length > 0 ? `${scheduleParts.join(" ")} ` : "";
14764
+ const period = t3(planPeriod);
14712
14765
  if (!discount) {
14713
14766
  return t3("You will be billed", {
14714
14767
  price: subscriptionPrice,
14715
14768
  usage,
14716
- period: planPeriod,
14769
+ period,
14717
14770
  schedule
14718
14771
  });
14719
14772
  }
@@ -14722,7 +14775,7 @@ function getBillingPreviewText({
14722
14775
  return t3("You will be billed", {
14723
14776
  price: discountedPrice,
14724
14777
  usage,
14725
- period: planPeriod,
14778
+ period,
14726
14779
  schedule
14727
14780
  });
14728
14781
  }
@@ -14730,7 +14783,7 @@ function getBillingPreviewText({
14730
14783
  return t3("You will be billed with discount window", {
14731
14784
  price: discountedPrice,
14732
14785
  usage,
14733
- period: planPeriod,
14786
+ period,
14734
14787
  schedule,
14735
14788
  window: t3("for the next months", { count: durationInMonths }),
14736
14789
  fullPrice: subscriptionPrice
@@ -14739,7 +14792,7 @@ function getBillingPreviewText({
14739
14792
  return t3("You will be billed next bill discount", {
14740
14793
  price: discountedPrice,
14741
14794
  usage,
14742
- period: planPeriod,
14795
+ period,
14743
14796
  schedule,
14744
14797
  fullPrice: subscriptionPrice
14745
14798
  });
@@ -15514,7 +15567,7 @@ var reducer = (state, action) => {
15514
15567
  // src/context/EmbedProvider.tsx
15515
15568
  var import_jsx_runtime4 = require("react/jsx-runtime");
15516
15569
  var getCustomHeaders = (sessionId) => ({
15517
- "X-Schematic-Components-Version": "2.28.0",
15570
+ "X-Schematic-Components-Version": "2.29.0",
15518
15571
  "X-Schematic-Session-ID": sessionId
15519
15572
  });
15520
15573
  var normalizeCurrencyFilter = (filter2) => {
@@ -16438,6 +16491,7 @@ function useRequest(fn) {
16438
16491
  var import_react13 = require("react");
16439
16492
  function useTrialEnd() {
16440
16493
  const { data } = useEmbed();
16494
+ const { t: t3 } = useTranslation();
16441
16495
  const { endDate, amount, units } = (0, import_react13.useMemo)(() => {
16442
16496
  const billingSubscription = data?.company?.billingSubscription;
16443
16497
  const end = typeof billingSubscription?.trialEnd === "number" ? new Date(billingSubscription.trialEnd * 1e3) : void 0;
@@ -16460,10 +16514,10 @@ function useTrialEnd() {
16460
16514
  amount2 = Math.floor(difference / SECONDS_IN_MS);
16461
16515
  unit = "second";
16462
16516
  }
16463
- units2 = pluralize(unit, amount2);
16517
+ units2 = t3(unit, { count: amount2 });
16464
16518
  }
16465
16519
  return { endDate: end, amount: amount2, units: units2 };
16466
- }, [data?.company?.billingSubscription]);
16520
+ }, [data?.company?.billingSubscription, t3]);
16467
16521
  return { endDate, amount, units };
16468
16522
  }
16469
16523
 
@@ -17866,7 +17920,7 @@ var AutoTopupNotice = ({
17866
17920
  trigger: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
17867
17921
  Icon3,
17868
17922
  {
17869
- title: "auto top-up",
17923
+ title: t3("Auto Top-up"),
17870
17924
  name: "info-rounded",
17871
17925
  color: `hsla(0, 0%, ${isLightBackground ? 0 : 100}%, 0.5)`,
17872
17926
  style: { lineHeight: 0 }
@@ -17905,7 +17959,7 @@ var BillingThresholdTooltip = ({
17905
17959
  trigger: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
17906
17960
  Icon3,
17907
17961
  {
17908
- title: "billing threshold",
17962
+ title: t3("Billing threshold"),
17909
17963
  name: "info-rounded",
17910
17964
  color: `hsla(0, 0%, ${isLightBackground ? 0 : 100}%, 0.5)`,
17911
17965
  style: { lineHeight: 0 }
@@ -18101,7 +18155,7 @@ var Entitlement = ({
18101
18155
  packageSize,
18102
18156
  " "
18103
18157
  ] }),
18104
- getFeatureName(entitlement.feature, packageSize),
18158
+ getFeatureName(entitlement.feature, locale, packageSize),
18105
18159
  entitlement.priceBehavior === EntitlementPriceBehavior.PayInAdvance && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
18106
18160
  " ",
18107
18161
  t3("per"),
@@ -18126,12 +18180,13 @@ var Entitlement = ({
18126
18180
  " ",
18127
18181
  getFeatureName(
18128
18182
  entitlement.valueCredit,
18183
+ locale,
18129
18184
  entitlement.consumptionRate || void 0
18130
18185
  ),
18131
18186
  " ",
18132
18187
  t3("per"),
18133
18188
  " ",
18134
- getFeatureName(entitlement.feature, 1)
18189
+ getFeatureName(entitlement.feature, locale, 1)
18135
18190
  ] });
18136
18191
  }
18137
18192
  if (entitlement.priceBehavior === EntitlementPriceBehavior.CreditBurndown && creditBasedEntitlementLimit) {
@@ -18139,13 +18194,17 @@ var Entitlement = ({
18139
18194
  amount: creditBasedEntitlementLimit.limit,
18140
18195
  units: getFeatureName(
18141
18196
  entitlement.feature,
18197
+ locale,
18142
18198
  creditBasedEntitlementLimit.limit
18143
18199
  ),
18144
- period: creditBasedEntitlementLimit.period
18200
+ period: t3(
18201
+ creditBasedEntitlementLimit.period
18202
+ )
18145
18203
  }) : t3("Up to X units", {
18146
18204
  amount: creditBasedEntitlementLimit.limit,
18147
18205
  units: getFeatureName(
18148
18206
  entitlement.feature,
18207
+ locale,
18149
18208
  creditBasedEntitlementLimit.limit
18150
18209
  )
18151
18210
  }) });
@@ -18153,11 +18212,11 @@ var Entitlement = ({
18153
18212
  if (hasNumericValue) {
18154
18213
  return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
18155
18214
  entitlement.valueType === EntitlementValueType.Unlimited && !entitlement.priceBehavior ? t3("Unlimited", {
18156
- item: getFeatureName(entitlement.feature)
18215
+ item: getFeatureName(entitlement.feature, locale)
18157
18216
  }) : typeof limit === "number" && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
18158
18217
  formatNumber(limit, { locale }),
18159
18218
  " ",
18160
- getFeatureName(entitlement.feature, limit)
18219
+ getFeatureName(entitlement.feature, locale, limit)
18161
18220
  ] }),
18162
18221
  metricPeriodName && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
18163
18222
  " ",
@@ -18196,7 +18255,7 @@ var Entitlement = ({
18196
18255
  packageSize,
18197
18256
  " "
18198
18257
  ] }),
18199
- getFeatureName(entitlement.feature, packageSize),
18258
+ getFeatureName(entitlement.feature, locale, packageSize),
18200
18259
  entitlement.feature.featureType === FeatureType.Trait && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
18201
18260
  "/",
18202
18261
  shortenPeriod(period, t3)
@@ -18536,7 +18595,7 @@ var AutoTopup = ({
18536
18595
  updateAutoTopupConfig
18537
18596
  }) => {
18538
18597
  const { settings } = useEmbed();
18539
- const { t: t3 } = useTranslation();
18598
+ const { t: t3, locale } = useTranslation();
18540
18599
  const cardPadding = settings.theme.card.padding / TEXT_BASE_SIZE;
18541
18600
  const configurableCreditGrants = (0, import_react25.useMemo)(() => {
18542
18601
  return planCreditGrants.reduce(
@@ -18583,7 +18642,7 @@ var AutoTopup = ({
18583
18642
  }) }) }),
18584
18643
  /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Box, { as: "p", $marginBottom: "2rem", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { children: t3(
18585
18644
  "Automatically purchase more credits when your balance is low",
18586
- { units: getFeatureName(grant.credit) }
18645
+ { units: getFeatureName(grant.credit, locale) }
18587
18646
  ) }) })
18588
18647
  ] }),
18589
18648
  /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Flex, { $alignItems: "center", $gap: "0.5rem", $marginBottom: "1rem", children: [
@@ -18780,7 +18839,7 @@ var Quantity = ({
18780
18839
  $color: settings.theme.typography.text.color,
18781
18840
  children: t3("Currently using", {
18782
18841
  quantity: entitlement.usage,
18783
- unit: getFeatureName(entitlement.feature)
18842
+ unit: getFeatureName(entitlement.feature, locale)
18784
18843
  })
18785
18844
  }
18786
18845
  ),
@@ -18845,7 +18904,11 @@ var Quantity = ({
18845
18904
  packageSize,
18846
18905
  " "
18847
18906
  ] }),
18848
- getFeatureName(entitlement.feature, packageSize),
18907
+ getFeatureName(
18908
+ entitlement.feature,
18909
+ locale,
18910
+ packageSize
18911
+ ),
18849
18912
  "/",
18850
18913
  shortenPeriod(period, t3)
18851
18914
  ] })
@@ -18882,12 +18945,14 @@ var Quantity = ({
18882
18945
  quantity: entitlement.quantity,
18883
18946
  licenseName: getFeatureName(
18884
18947
  entitlement.feature,
18948
+ locale,
18885
18949
  entitlement.quantity
18886
18950
  ),
18887
18951
  perUnit: perLicenseGrant.amount,
18888
18952
  total: includedCredits,
18889
18953
  creditName: getFeatureName(
18890
18954
  licenseCredit,
18955
+ locale,
18891
18956
  includedCredits
18892
18957
  ),
18893
18958
  period: shortenPeriod(licenseCredit.period, t3)
@@ -18909,11 +18974,13 @@ var Quantity = ({
18909
18974
  added: addedQuantity,
18910
18975
  licenseName: getFeatureName(
18911
18976
  entitlement.feature,
18977
+ locale,
18912
18978
  addedQuantity
18913
18979
  ),
18914
18980
  credits: addedCredits,
18915
18981
  creditName: getFeatureName(
18916
18982
  licenseCredit,
18983
+ locale,
18917
18984
  addedCredits
18918
18985
  )
18919
18986
  }),
@@ -18923,9 +18990,10 @@ var Quantity = ({
18923
18990
  total: includedCredits,
18924
18991
  creditName: getFeatureName(
18925
18992
  licenseCredit,
18993
+ locale,
18926
18994
  includedCredits
18927
18995
  ),
18928
- cadence: adjectify(licenseCredit.period),
18996
+ cadence: adjectify(licenseCredit.period, t3),
18929
18997
  day: formatOrdinal(renewalDate.getDate(), t3)
18930
18998
  })
18931
18999
  ] })
@@ -18964,6 +19032,7 @@ function renderMeteredEntitlementPricing({
18964
19032
  "/",
18965
19033
  feature ? getFeatureName(
18966
19034
  feature,
19035
+ locale,
18967
19036
  packageSize
18968
19037
  ) : featureName || "unit"
18969
19038
  ] });
@@ -18981,6 +19050,7 @@ function renderMeteredEntitlementPricing({
18981
19050
  ] }),
18982
19051
  feature ? getFeatureName(
18983
19052
  feature,
19053
+ locale,
18984
19054
  packageSize
18985
19055
  ) : featureName || "unit"
18986
19056
  ] });
@@ -19298,7 +19368,7 @@ var Credits = ({
19298
19368
  /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Text, { display: "heading6", children: [
19299
19369
  formatNumber(bundle.quantity ?? 0, { locale }),
19300
19370
  " ",
19301
- getFeatureName(bundle)
19371
+ getFeatureName(bundle, locale)
19302
19372
  ] }) })
19303
19373
  ] }),
19304
19374
  typeof price === "number" && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box, { $marginBottom: "0.5rem", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { children: formatCurrency(price, {
@@ -21250,7 +21320,7 @@ var CurrencyPeriodMismatchNotice = ({
21250
21320
  style: { opacity: 0.85, textAlign: "center" },
21251
21321
  children: t3("No {{currency}} price for the {{period}} billing period.", {
21252
21322
  currency: currency.toUpperCase(),
21253
- period
21323
+ period: adjectify(period, t3)
21254
21324
  })
21255
21325
  }
21256
21326
  )
@@ -21412,7 +21482,7 @@ var HardLimitTooltip = ({
21412
21482
  feature,
21413
21483
  limit
21414
21484
  }) => {
21415
- const { t: t3 } = useTranslation();
21485
+ const { t: t3, locale } = useTranslation();
21416
21486
  const { data } = useEmbed();
21417
21487
  const isLightBackground = useIsLightBackground();
21418
21488
  const showHardLimit = data?.displaySettings?.showHardLimit ?? false;
@@ -21426,7 +21496,7 @@ var HardLimitTooltip = ({
21426
21496
  trigger: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
21427
21497
  Icon3,
21428
21498
  {
21429
- title: "limit",
21499
+ title: t3("Limit"),
21430
21500
  name: "info-rounded",
21431
21501
  color: `hsla(0, 0%, ${isLightBackground ? 0 : 100}%, 0.5)`,
21432
21502
  style: { lineHeight: 0 }
@@ -21434,7 +21504,7 @@ var HardLimitTooltip = ({
21434
21504
  ),
21435
21505
  content: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { children: t3("Up to a limit of", {
21436
21506
  amount: limit,
21437
- units: getFeatureName(feature, limit)
21507
+ units: getFeatureName(feature, locale, limit)
21438
21508
  }) })
21439
21509
  }
21440
21510
  );
@@ -21798,7 +21868,7 @@ var PaymentForm = ({ onConfirm, financeData }) => {
21798
21868
  )
21799
21869
  ] }),
21800
21870
  stripe && collectEmail && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Box, { "data-field": "name", $marginBottom: "1.5rem", $verticalAlign: "top", children: [
21801
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Label, { htmlFor: "email", children: "Email" }),
21871
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Label, { htmlFor: "email", children: t3("Email") }),
21802
21872
  /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
21803
21873
  Input2,
21804
21874
  {
@@ -21807,7 +21877,7 @@ var PaymentForm = ({ onConfirm, financeData }) => {
21807
21877
  type: "email",
21808
21878
  value: email,
21809
21879
  autoComplete: "email",
21810
- placeholder: "Enter email address",
21880
+ placeholder: t3("Enter email address"),
21811
21881
  required: true,
21812
21882
  onChange: (e) => {
21813
21883
  userEditedEmailRef.current = true;
@@ -21934,7 +22004,7 @@ var PeriodToggle = ({
21934
22004
  },
21935
22005
  $size: 15,
21936
22006
  $weight: option === selectedOption ? 600 : 400,
21937
- children: t3("Billed", { period: adjectify(option) })
22007
+ children: t3("Billed", { period: adjectify(option, t3) })
21938
22008
  }
21939
22009
  )
21940
22010
  },
@@ -21974,7 +22044,7 @@ var PlanCreditText = ({
21974
22044
  entitlements,
21975
22045
  children
21976
22046
  }) => {
21977
- const { t: t3 } = useTranslation();
22047
+ const { t: t3, locale } = useTranslation();
21978
22048
  const { settings } = useEmbed();
21979
22049
  const sources = entitlements ?? [];
21980
22050
  const { perLicenseGrants } = credit;
@@ -21982,7 +22052,7 @@ var PlanCreditText = ({
21982
22052
  return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Text, { children: [
21983
22053
  credit.quantity,
21984
22054
  " ",
21985
- getFeatureName(credit, credit.quantity),
22055
+ getFeatureName(credit, locale, credit.quantity),
21986
22056
  credit.period && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
21987
22057
  " ",
21988
22058
  t3("per"),
@@ -21994,18 +22064,18 @@ var PlanCreditText = ({
21994
22064
  }
21995
22065
  const resolveLicenseName = (grant) => {
21996
22066
  const licenseFeature = (findLicenseSource(sources, grant.licenseId) ?? (grant.licenseId ? void 0 : findSoleLicenseSource(sources)))?.feature;
21997
- return licenseFeature ? getFeatureName(licenseFeature, 1) : t3("license");
22067
+ return licenseFeature ? getFeatureName(licenseFeature, locale, 1) : t3("license");
21998
22068
  };
21999
22069
  return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Flex, { $flexDirection: "column", $gap: "0.25rem", children: [
22000
22070
  perLicenseGrants.map((grant, grantIndex) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Text, { children: [
22001
22071
  credit.period ? t3("X credits per license per period", {
22002
22072
  amount: grant.amount,
22003
- creditName: getFeatureName(credit, grant.amount),
22073
+ creditName: getFeatureName(credit, locale, grant.amount),
22004
22074
  licenseName: resolveLicenseName(grant),
22005
22075
  period: t3(credit.period)
22006
22076
  }) : t3("X credits per license", {
22007
22077
  amount: grant.amount,
22008
- creditName: getFeatureName(credit, grant.amount),
22078
+ creditName: getFeatureName(credit, locale, grant.amount),
22009
22079
  licenseName: resolveLicenseName(grant)
22010
22080
  }),
22011
22081
  grantIndex === 0 && children
@@ -22018,7 +22088,7 @@ var PlanCreditText = ({
22018
22088
  $color: settings.theme.typography.text.color,
22019
22089
  children: t3("Plus X credits per period for your company", {
22020
22090
  amount: credit.fixedQuantity,
22021
- creditName: getFeatureName(credit, credit.fixedQuantity),
22091
+ creditName: getFeatureName(credit, locale, credit.fixedQuantity),
22022
22092
  period: t3(credit.period)
22023
22093
  })
22024
22094
  }
@@ -22047,7 +22117,7 @@ var PriceText = ({
22047
22117
  formatCurrency(perUnitPrice, { locale, currency }),
22048
22118
  /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("sub", { children: [
22049
22119
  "/",
22050
- getFeatureName(feature, 1)
22120
+ getFeatureName(feature, locale, 1)
22051
22121
  ] })
22052
22122
  ] });
22053
22123
  }
@@ -22064,7 +22134,7 @@ var PriceText = ({
22064
22134
  formatCurrency(perUnitPrice, { locale, currency }),
22065
22135
  /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("sub", { children: [
22066
22136
  "/",
22067
- getFeatureName(feature, 1)
22137
+ getFeatureName(feature, locale, 1)
22068
22138
  ] }),
22069
22139
  " + ",
22070
22140
  formatCurrency(flatAmount, { locale, currency }),
@@ -22125,7 +22195,7 @@ var PricingTiersTooltip = ({
22125
22195
  trigger: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
22126
22196
  Icon3,
22127
22197
  {
22128
- title: "tiered pricing",
22198
+ title: t3("Tiered pricing"),
22129
22199
  name: "info-rounded",
22130
22200
  color: `hsla(0, 0%, ${isLightBackground ? 0 : 100}%, 0.5)`,
22131
22201
  style: { lineHeight: 0 }
@@ -22627,11 +22697,11 @@ var EntitlementRow = (props) => {
22627
22697
  /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { display: "heading4", children: priceBehavior === EntitlementPriceBehavior.PayInAdvance ? /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
22628
22698
  quantity,
22629
22699
  " ",
22630
- getFeatureName(feature, quantity)
22700
+ getFeatureName(feature, locale, quantity)
22631
22701
  ] }) : priceBehavior === EntitlementPriceBehavior.Overage && typeof softLimit === "number" ? /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
22632
22702
  softLimit,
22633
22703
  " ",
22634
- getFeatureName(feature, softLimit)
22704
+ getFeatureName(feature, locale, softLimit)
22635
22705
  ] }) : feature.name }) }),
22636
22706
  /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Box, { $whiteSpace: "nowrap", $lineHeight: 1, children: priceBehavior === EntitlementPriceBehavior.PayInAdvance ? (
22637
22707
  // A tiered scheme still resolves to a fixed amount at the chosen
@@ -22662,7 +22732,7 @@ var EntitlementRow = (props) => {
22662
22732
  packageSize,
22663
22733
  " "
22664
22734
  ] }),
22665
- getFeatureName(feature, packageSize),
22735
+ getFeatureName(feature, locale, packageSize),
22666
22736
  feature.featureType === FeatureType.Trait && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
22667
22737
  "/",
22668
22738
  shortenPeriod(planPeriod, t3)
@@ -22959,7 +23029,7 @@ var SubscriptionSidebar = (0, import_react37.forwardRef)(
22959
23029
  $color: settings.theme.typography.text.color,
22960
23030
  children: t3("Includes X credits per period", {
22961
23031
  total: includedCredits,
22962
- creditName: getFeatureName(credit, includedCredits),
23032
+ creditName: getFeatureName(credit, locale, includedCredits),
22963
23033
  period: shortenPeriod(credit.period, t3)
22964
23034
  })
22965
23035
  }
@@ -23697,7 +23767,7 @@ var SubscriptionSidebar = (0, import_react37.forwardRef)(
23697
23767
  /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(Text, { children: [
23698
23768
  formatNumber(amount, { locale }),
23699
23769
  " ",
23700
- getFeatureName(bundle, amount),
23770
+ getFeatureName(bundle, locale, amount),
23701
23771
  expiry && ` \xB7 ${expiry}`
23702
23772
  ] }) })
23703
23773
  ] }),
@@ -23991,21 +24061,21 @@ var TieredPricingDetails = ({
23991
24061
  if (flatAmount === 0 && perUnitPrice === 0) {
23992
24062
  return t3("Up to X units for free", {
23993
24063
  X: upTo,
23994
- units: getFeatureName(entitlement.feature, upTo)
24064
+ units: getFeatureName(entitlement.feature, locale, upTo)
23995
24065
  });
23996
24066
  }
23997
24067
  if (flatAmount === 0 && perUnitPrice > 0) {
23998
24068
  return t3("Up to X units at $Y/unit", {
23999
24069
  X: upTo,
24000
- units: getFeatureName(entitlement.feature, upTo),
24070
+ units: getFeatureName(entitlement.feature, locale, upTo),
24001
24071
  Y: formatCurrency(perUnitPrice, { locale, currency }),
24002
- unit: getFeatureName(entitlement.feature, 1)
24072
+ unit: getFeatureName(entitlement.feature, locale, 1)
24003
24073
  });
24004
24074
  }
24005
24075
  if (flatAmount > 0 && perUnitPrice === 0) {
24006
24076
  return t3("Up to X units for $Y/period", {
24007
24077
  X: upTo,
24008
- units: getFeatureName(entitlement.feature, upTo),
24078
+ units: getFeatureName(entitlement.feature, locale, upTo),
24009
24079
  Y: formatCurrency(flatAmount, { locale, currency }),
24010
24080
  period
24011
24081
  });
@@ -24013,9 +24083,9 @@ var TieredPricingDetails = ({
24013
24083
  if (flatAmount > 0 && perUnitPrice > 0) {
24014
24084
  return t3("Up to X units at $Y/unit + $Z/period", {
24015
24085
  X: upTo,
24016
- units: getFeatureName(entitlement.feature, upTo),
24086
+ units: getFeatureName(entitlement.feature, locale, upTo),
24017
24087
  Y: formatCurrency(perUnitPrice, { locale, currency }),
24018
- unit: getFeatureName(entitlement.feature, 1),
24088
+ unit: getFeatureName(entitlement.feature, locale, 1),
24019
24089
  Z: formatCurrency(flatAmount, { locale, currency }),
24020
24090
  period
24021
24091
  });
@@ -24318,6 +24388,7 @@ var Badge = () => {
24318
24388
  // src/components/layout/RenderLayout.tsx
24319
24389
  var import_jsx_runtime49 = require("react/jsx-runtime");
24320
24390
  var Disabled = () => {
24391
+ const { t: t3 } = useTranslation();
24321
24392
  return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Box, { $width: "max-content", $height: "max-content", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Card, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
24322
24393
  Element,
24323
24394
  {
@@ -24327,8 +24398,8 @@ var Disabled = () => {
24327
24398
  $alignItems: "center",
24328
24399
  $whiteSpace: "nowrap",
24329
24400
  children: [
24330
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Box, { $marginBottom: "0.5rem", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { as: "h1", display: "heading1", children: "Portal not found" }) }),
24331
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { as: "p", children: "Please try again later." })
24401
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Box, { $marginBottom: "0.5rem", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { as: "h1", display: "heading1", children: t3("Portal not found") }) }),
24402
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { as: "p", children: t3("Please try again later.") })
24332
24403
  ]
24333
24404
  }
24334
24405
  ) }) });
@@ -24522,12 +24593,12 @@ var UsageDetails = ({ entitlement, layout }) => {
24522
24593
  if (priceBehavior === EntitlementPriceBehavior.PayInAdvance && typeof allocation === "number") {
24523
24594
  return t3("X units", {
24524
24595
  amount: formatNumber(allocation, { locale }),
24525
- units: getFeatureName(feature, allocation)
24596
+ units: getFeatureName(feature, locale, allocation)
24526
24597
  });
24527
24598
  }
24528
24599
  if (priceBehavior === EntitlementPriceBehavior.PayAsYouGo && typeof price === "number") {
24529
24600
  const formattedCost = formatCurrency(price, { locale, currency });
24530
- const featureName = getFeatureName(feature, packageSize);
24601
+ const featureName = getFeatureName(feature, locale, packageSize);
24531
24602
  return packageSize > 1 ? t3("$X per Y units", {
24532
24603
  cost: formattedCost,
24533
24604
  size: packageSize,
@@ -24537,15 +24608,15 @@ var UsageDetails = ({ entitlement, layout }) => {
24537
24608
  if (priceBehavior === EntitlementPriceBehavior.Overage && typeof softLimit === "number") {
24538
24609
  return t3("X units", {
24539
24610
  amount: formatNumber(softLimit, { locale }),
24540
- units: getFeatureName(feature, softLimit)
24611
+ units: getFeatureName(feature, locale, softLimit)
24541
24612
  });
24542
24613
  }
24543
24614
  if (priceBehavior === EntitlementPriceBehavior.Tier) {
24544
24615
  return typeof currentTier?.to === "number" && (currentTier?.to === Infinity ? t3("Unlimited in this tier", {
24545
- feature: getFeatureName(feature)
24616
+ feature: getFeatureName(feature, locale)
24546
24617
  }) : t3("Up to X units in this tier", {
24547
24618
  amount: formatNumber(currentTier.to, { locale }),
24548
- feature: getFeatureName(feature, currentTier.to)
24619
+ feature: getFeatureName(feature, locale, currentTier.to)
24549
24620
  }));
24550
24621
  }
24551
24622
  if (showCredits && priceBehavior === EntitlementPriceBehavior.CreditBurndown && planEntitlement?.valueCredit && typeof planEntitlement?.consumptionRate === "number") {
@@ -24553,6 +24624,7 @@ var UsageDetails = ({ entitlement, layout }) => {
24553
24624
  amount: formatConsumptionRate(planEntitlement.consumptionRate, locale),
24554
24625
  units: getFeatureName(
24555
24626
  planEntitlement.valueCredit,
24627
+ locale,
24556
24628
  planEntitlement.consumptionRate
24557
24629
  )
24558
24630
  });
@@ -24560,18 +24632,18 @@ var UsageDetails = ({ entitlement, layout }) => {
24560
24632
  if (priceBehavior === EntitlementPriceBehavior.CreditBurndown && typeof limit === "number") {
24561
24633
  return t3("X units remaining", {
24562
24634
  amount: formatNumber(limit, { locale }),
24563
- units: getFeatureName(feature, limit)
24635
+ units: getFeatureName(feature, locale, limit)
24564
24636
  });
24565
24637
  }
24566
24638
  if (!priceBehavior && typeof allocation === "number") {
24567
24639
  const numericLimit = limit ?? allocation;
24568
24640
  return t3("X units", {
24569
24641
  amount: formatNumber(numericLimit, { locale }),
24570
- units: getFeatureName(feature, numericLimit)
24642
+ units: getFeatureName(feature, locale, numericLimit)
24571
24643
  });
24572
24644
  }
24573
24645
  if (!priceBehavior && allocationType === "unlimited") {
24574
- return t3("Unlimited", { item: getFeatureName(feature) });
24646
+ return t3("Unlimited", { item: getFeatureName(feature, locale) });
24575
24647
  }
24576
24648
  }, [
24577
24649
  t3,
@@ -24600,11 +24672,11 @@ var UsageDetails = ({ entitlement, layout }) => {
24600
24672
  /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react42.Fragment, { children: packageSize > 1 ? t3("$X/Y units/period", {
24601
24673
  cost: formatCurrency(price, { locale, currency }),
24602
24674
  size: packageSize,
24603
- units: getFeatureName(feature, packageSize),
24675
+ units: getFeatureName(feature, locale, packageSize),
24604
24676
  period: shortenPeriod(period, t3)
24605
24677
  }) : t3("$X/unit/period", {
24606
24678
  cost: formatCurrency(price, { locale, currency }),
24607
- unit: getFeatureName(feature, packageSize),
24679
+ unit: getFeatureName(feature, locale, packageSize),
24608
24680
  period: shortenPeriod(period, t3)
24609
24681
  }) }, index)
24610
24682
  );
@@ -24613,7 +24685,7 @@ var UsageDetails = ({ entitlement, layout }) => {
24613
24685
  acc.push(
24614
24686
  /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react42.Fragment, { children: t3("X units used", {
24615
24687
  amount: usage,
24616
- units: getFeatureName(feature, usage)
24688
+ units: getFeatureName(feature, locale, usage)
24617
24689
  }) }, index)
24618
24690
  );
24619
24691
  index += 1;
@@ -24843,9 +24915,10 @@ var IncludedFeatures = (0, import_react43.forwardRef)(({ className, ...rest }, r
24843
24915
  singularName: grant.singularName,
24844
24916
  pluralName: grant.pluralName
24845
24917
  },
24918
+ locale,
24846
24919
  grant.creditAmount
24847
24920
  ),
24848
- licenseName: entitlement.feature ? getFeatureName(entitlement.feature, 1) : ""
24921
+ licenseName: entitlement.feature ? getFeatureName(entitlement.feature, locale, 1) : ""
24849
24922
  }) }, grantIndex)),
24850
24923
  props.entitlementExpiration.isVisible && entitlement.entitlementExpirationDate && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
24851
24924
  Text,
@@ -25179,7 +25252,7 @@ var PriceDetails = ({
25179
25252
  packageSize,
25180
25253
  " "
25181
25254
  ] }),
25182
- getFeatureName(feature, packageSize),
25255
+ getFeatureName(feature, locale, packageSize),
25183
25256
  feature.featureType === FeatureType.Trait && period && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx_runtime56.Fragment, { children: [
25184
25257
  "/",
25185
25258
  shortenPeriod(period, t3)
@@ -25204,7 +25277,7 @@ var PriceDetails = ({
25204
25277
  typeof amount === "number" && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_jsx_runtime56.Fragment, { children: priceBehavior === EntitlementPriceBehavior.Overage ? /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Text, { children: [
25205
25278
  formatNumber(amount, { locale }),
25206
25279
  " ",
25207
- getFeatureName(feature, amount),
25280
+ getFeatureName(feature, locale, amount),
25208
25281
  " \xB7 ",
25209
25282
  formatCurrency(currentTierPerUnitPrice * amount, {
25210
25283
  locale,
@@ -25332,7 +25405,7 @@ var UsageByUser = ({ source, unit }) => {
25332
25405
  const total = current?.section?.total ?? 0;
25333
25406
  const totalUsers = current?.section?.totalUsers ?? 0;
25334
25407
  const unattributed = current?.section?.unattributed;
25335
- const formatAmount = (amount) => `${formatNumber(amount, { locale })} ${getFeatureName(unit, amount)}`;
25408
+ const formatAmount = (amount) => `${formatNumber(amount, { locale })} ${getFeatureName(unit, locale, amount)}`;
25336
25409
  if (error) {
25337
25410
  return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Flex, { $flexDirection: "column", $gap: "0.5rem", $alignItems: "flex-start", children: [
25338
25411
  /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Text, { display: "heading4", children: t3("Usage by user") }),
@@ -25437,10 +25510,10 @@ var Limit = ({ entitlement, usageDetails, fontStyle }) => {
25437
25510
  const acc = [];
25438
25511
  acc.push(
25439
25512
  priceBehavior === EntitlementPriceBehavior.Tier && typeof currentTier?.to === "number" && typeof feature !== "undefined" ? currentTier?.to === Infinity ? t3("Unlimited in this tier", {
25440
- feature: getFeatureName(feature)
25513
+ feature: getFeatureName(feature, locale)
25441
25514
  }) : t3("Up to X units in this tier", {
25442
25515
  amount: currentTier.to,
25443
- feature: getFeatureName(feature)
25516
+ feature: getFeatureName(feature, locale)
25444
25517
  }) : priceBehavior === EntitlementPriceBehavior.Overage && typeof limit === "number" ? t3("X included", {
25445
25518
  amount: formatNumber(limit, { locale })
25446
25519
  }) : priceBehavior === EntitlementPriceBehavior.PayInAdvance && typeof usage === "number" ? `${formatNumber(usage, { locale })} ${t3("used")}` : priceBehavior === EntitlementPriceBehavior.PayAsYouGo && typeof cost === "number" ? formatCurrency(cost, { locale, currency: billingPrice?.currency }) : data?.displaySettings?.showCredits && priceBehavior === EntitlementPriceBehavior.CreditBurndown && typeof planEntitlement?.valueCredit !== "undefined" && typeof planEntitlement?.consumptionRate === "number" ? t3("X units per use", {
@@ -25450,11 +25523,12 @@ var Limit = ({ entitlement, usageDetails, fontStyle }) => {
25450
25523
  ),
25451
25524
  units: getFeatureName(
25452
25525
  planEntitlement.valueCredit,
25526
+ locale,
25453
25527
  planEntitlement.consumptionRate
25454
25528
  )
25455
25529
  }) : priceBehavior === EntitlementPriceBehavior.CreditBurndown && typeof feature !== "undefined" && typeof limit === "number" ? t3("X units remaining", {
25456
25530
  amount: formatNumber(limit, { locale }),
25457
- units: getFeatureName(feature, limit)
25531
+ units: getFeatureName(feature, locale, limit)
25458
25532
  }) : typeof limit === "number" ? t3("Limit of", {
25459
25533
  amount: formatNumber(limit, { locale })
25460
25534
  }) : t3("No limit")
@@ -25656,11 +25730,11 @@ var MeteredFeatures = (0, import_react46.forwardRef)(({ className, ...rest }, re
25656
25730
  formatNumber(limit, { locale }),
25657
25731
  " "
25658
25732
  ] }),
25659
- getFeatureName(feature, limit)
25733
+ getFeatureName(feature, locale, limit)
25660
25734
  ] }) : typeof usage === "number" && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
25661
25735
  formatNumber(usage, { locale }),
25662
25736
  " ",
25663
- getFeatureName(feature, usage),
25737
+ getFeatureName(feature, locale, usage),
25664
25738
  " ",
25665
25739
  t3("used")
25666
25740
  ] }) }) }),
@@ -25749,6 +25823,7 @@ var MeteredFeatures = (0, import_react46.forwardRef)(({ className, ...rest }, re
25749
25823
  }),
25750
25824
  units: getFeatureName(
25751
25825
  credit,
25826
+ locale,
25752
25827
  credit.total.remaining
25753
25828
  )
25754
25829
  }) }) }),
@@ -25790,6 +25865,7 @@ var MeteredFeatures = (0, import_react46.forwardRef)(({ className, ...rest }, re
25790
25865
  quantity: licenseQuantity,
25791
25866
  licenseName: getFeatureName(
25792
25867
  licenseFeature,
25868
+ locale,
25793
25869
  licenseQuantity
25794
25870
  ),
25795
25871
  perUnit: perLicenseGrant.amount
@@ -25814,7 +25890,7 @@ var MeteredFeatures = (0, import_react46.forwardRef)(({ className, ...rest }, re
25814
25890
  children: [
25815
25891
  t3("Your plan includes credits", {
25816
25892
  total,
25817
- creditName: getFeatureName(credit, total),
25893
+ creditName: getFeatureName(credit, locale, total),
25818
25894
  period: shortenPeriod(composition.period, t3),
25819
25895
  composition: ` \u2014 ${parts.join(" + ")}`
25820
25896
  }),
@@ -25849,6 +25925,7 @@ var MeteredFeatures = (0, import_react46.forwardRef)(({ className, ...rest }, re
25849
25925
  amount: grant.quantity,
25850
25926
  item: getFeatureName(
25851
25927
  credit,
25928
+ locale,
25852
25929
  grant.quantity
25853
25930
  )
25854
25931
  }) }) }),
@@ -25870,7 +25947,7 @@ var MeteredFeatures = (0, import_react46.forwardRef)(({ className, ...rest }, re
25870
25947
  ] }) : /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
25871
25948
  /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Box, { $display: "table-cell", $padding: padding, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Text, { children: grant.grantReason === BillingCreditGrantReason.Purchased ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_jsx_runtime58.Fragment, { children: t3("X item bundle", {
25872
25949
  amount: grant.quantity,
25873
- item: getFeatureName(credit, 1),
25950
+ item: getFeatureName(credit, locale, 1),
25874
25951
  createdAt: toPrettyDate(
25875
25952
  grant.createdAt,
25876
25953
  { locale, month: "short" }
@@ -25879,6 +25956,7 @@ var MeteredFeatures = (0, import_react46.forwardRef)(({ className, ...rest }, re
25879
25956
  amount: grant.quantity,
25880
25957
  item: getFeatureName(
25881
25958
  credit,
25959
+ locale,
25882
25960
  grant.quantity
25883
25961
  ),
25884
25962
  createdAt: toPrettyDate(
@@ -25889,6 +25967,7 @@ var MeteredFeatures = (0, import_react46.forwardRef)(({ className, ...rest }, re
25889
25967
  amount: grant.quantity,
25890
25968
  item: getFeatureName(
25891
25969
  credit,
25970
+ locale,
25892
25971
  grant.quantity
25893
25972
  ),
25894
25973
  createdAt: toPrettyDate(
@@ -26856,7 +26935,7 @@ var UsageDetails2 = ({
26856
26935
  packageSize,
26857
26936
  " "
26858
26937
  ] }),
26859
- getFeatureName(entitlement.feature, packageSize),
26938
+ getFeatureName(entitlement.feature, locale, packageSize),
26860
26939
  entitlement.feature.featureType === FeatureType.Trait && /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_jsx_runtime63.Fragment, { children: [
26861
26940
  "/",
26862
26941
  shortenPeriod(period, t3)
@@ -26876,6 +26955,7 @@ var UsageDetails2 = ({
26876
26955
  " ",
26877
26956
  getFeatureName(
26878
26957
  entitlement.planEntitlement.valueCredit,
26958
+ locale,
26879
26959
  entitlement.planEntitlement.consumptionRate
26880
26960
  ),
26881
26961
  " ",
@@ -26911,7 +26991,7 @@ var UsageDetails2 = ({
26911
26991
  /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Text, { display: layout.addOns.fontStyle, children: typeof quantity === "number" ? /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_jsx_runtime63.Fragment, { children: [
26912
26992
  quantity,
26913
26993
  " ",
26914
- getFeatureName(entitlement.feature, quantity, true)
26994
+ getFeatureName(entitlement.feature, locale, quantity, true)
26915
26995
  ] }) : entitlement.feature.name }),
26916
26996
  /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(Text, { children: [
26917
26997
  description.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
@@ -27372,9 +27452,14 @@ var PlanManager = (0, import_react51.forwardRef)(({ children, className, portal,
27372
27452
  amount: perLicenseGrant.amount,
27373
27453
  creditName: getFeatureName(
27374
27454
  group,
27455
+ locale,
27375
27456
  perLicenseGrant.amount
27376
27457
  ),
27377
- licenseName: getFeatureName(licenseFeature, 1)
27458
+ licenseName: getFeatureName(
27459
+ licenseFeature,
27460
+ locale,
27461
+ 1
27462
+ )
27378
27463
  }),
27379
27464
  composition.fixedQuantity > 0 && creditPeriod && /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_jsx_runtime64.Fragment, { children: [
27380
27465
  " ",
@@ -27382,6 +27467,7 @@ var PlanManager = (0, import_react51.forwardRef)(({ children, className, portal,
27382
27467
  amount: composition.fixedQuantity,
27383
27468
  creditName: getFeatureName(
27384
27469
  group,
27470
+ locale,
27385
27471
  composition.fixedQuantity
27386
27472
  ),
27387
27473
  period: t3(
@@ -27392,7 +27478,7 @@ var PlanManager = (0, import_react51.forwardRef)(({ children, className, portal,
27392
27478
  ] }) : /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_jsx_runtime64.Fragment, { children: [
27393
27479
  group.total.value,
27394
27480
  " ",
27395
- getFeatureName(group, group.total.value),
27481
+ getFeatureName(group, locale, group.total.value),
27396
27482
  " ",
27397
27483
  subscriptionInterval && /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_jsx_runtime64.Fragment, { children: [
27398
27484
  t3("per"),
@@ -27435,6 +27521,7 @@ var PlanManager = (0, import_react51.forwardRef)(({ children, className, portal,
27435
27521
  quantity: licenseQuantity,
27436
27522
  licenseName: getFeatureName(
27437
27523
  licenseFeature,
27524
+ locale,
27438
27525
  licenseQuantity
27439
27526
  ),
27440
27527
  perUnit: perLicenseGrant.amount,
@@ -27442,6 +27529,7 @@ var PlanManager = (0, import_react51.forwardRef)(({ children, className, portal,
27442
27529
  total: resolvedTotal,
27443
27530
  creditName: getFeatureName(
27444
27531
  group,
27532
+ locale,
27445
27533
  resolvedTotal
27446
27534
  ),
27447
27535
  period: shortenPeriod(creditPeriod, t3)
@@ -27449,12 +27537,14 @@ var PlanManager = (0, import_react51.forwardRef)(({ children, className, portal,
27449
27537
  quantity: licenseQuantity,
27450
27538
  licenseName: getFeatureName(
27451
27539
  licenseFeature,
27540
+ locale,
27452
27541
  licenseQuantity
27453
27542
  ),
27454
27543
  perUnit: perLicenseGrant.amount,
27455
27544
  total: resolvedTotal,
27456
27545
  creditName: getFeatureName(
27457
27546
  group,
27547
+ locale,
27458
27548
  resolvedTotal
27459
27549
  ),
27460
27550
  period: shortenPeriod(creditPeriod, t3)
@@ -27496,7 +27586,7 @@ var PlanManager = (0, import_react51.forwardRef)(({ children, className, portal,
27496
27586
  if (!autoTopupEnabled) {
27497
27587
  acc.push(
27498
27588
  /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Text, { $leading: "tight", children: t3("Auto top-up disabled for token", {
27499
- unit: getFeatureName(grant.credit, 1)
27589
+ unit: getFeatureName(grant.credit, locale, 1)
27500
27590
  }) }, grant.id)
27501
27591
  );
27502
27592
  return acc;
@@ -27508,6 +27598,7 @@ var PlanManager = (0, import_react51.forwardRef)(({ children, className, portal,
27508
27598
  /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Text, { $leading: "tight", children: t3("Adds X tokens when Y remaining in balance", {
27509
27599
  unit: getFeatureName(
27510
27600
  grant.credit,
27601
+ locale,
27511
27602
  autoTopupAmount
27512
27603
  ),
27513
27604
  amount: autoTopupAmount,
@@ -27567,7 +27658,7 @@ var PlanManager = (0, import_react51.forwardRef)(({ children, className, portal,
27567
27658
  " (",
27568
27659
  group.quantity,
27569
27660
  " ",
27570
- getFeatureName(group, group.quantity),
27661
+ getFeatureName(group, locale, group.quantity),
27571
27662
  ")"
27572
27663
  ] }) : /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(Text, { display: props.addOns.fontStyle, children: [
27573
27664
  group.grants.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(Text, { style: { opacity: 0.5 }, children: [
@@ -27578,7 +27669,7 @@ var PlanManager = (0, import_react51.forwardRef)(({ children, className, portal,
27578
27669
  ] }),
27579
27670
  group.quantity,
27580
27671
  " ",
27581
- getFeatureName(group, group.quantity)
27672
+ getFeatureName(group, locale, group.quantity)
27582
27673
  ] }),
27583
27674
  group.total.used > 0 && /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
27584
27675
  Text,
@@ -27638,12 +27729,12 @@ var PlanManager = (0, import_react51.forwardRef)(({ children, className, portal,
27638
27729
  " (",
27639
27730
  group.quantity,
27640
27731
  " ",
27641
- getFeatureName(group, group.quantity),
27732
+ getFeatureName(group, locale, group.quantity),
27642
27733
  ")"
27643
27734
  ] }) : /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(Text, { display: props.addOns.fontStyle, children: [
27644
27735
  group.quantity,
27645
27736
  " ",
27646
- getFeatureName(group, group.quantity)
27737
+ getFeatureName(group, locale, group.quantity)
27647
27738
  ] }),
27648
27739
  group.total.used > 0 && /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
27649
27740
  Text,
@@ -27694,7 +27785,7 @@ var PlanManager = (0, import_react51.forwardRef)(({ children, className, portal,
27694
27785
  /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(Text, { display: props.addOns.fontStyle, children: [
27695
27786
  group.quantity,
27696
27787
  " ",
27697
- getFeatureName(group, group.quantity)
27788
+ getFeatureName(group, locale, group.quantity)
27698
27789
  ] }),
27699
27790
  group.total.used > 0 && /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
27700
27791
  Text,
@@ -27767,6 +27858,7 @@ function renderMeteredEntitlementPricing2({
27767
27858
  "/",
27768
27859
  feature ? getFeatureName(
27769
27860
  feature,
27861
+ locale,
27770
27862
  packageSize
27771
27863
  ) : featureName || "unit"
27772
27864
  ] });
@@ -27784,6 +27876,7 @@ function renderMeteredEntitlementPricing2({
27784
27876
  ] }),
27785
27877
  feature ? getFeatureName(
27786
27878
  feature,
27879
+ locale,
27787
27880
  packageSize
27788
27881
  ) : featureName || "unit"
27789
27882
  ] });
@@ -27973,7 +28066,7 @@ var AddOn2 = ({
27973
28066
  {
27974
28067
  $flexDirection: "column",
27975
28068
  $justifyContent: "center",
27976
- children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Text, { children: getFeatureName(entitlement.feature) })
28069
+ children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Text, { children: getFeatureName(entitlement.feature, locale) })
27977
28070
  }
27978
28071
  )
27979
28072
  ] }),
@@ -28135,7 +28228,11 @@ var Entitlement2 = ({
28135
28228
  formatNumber(entitlementPackageSize, { locale }),
28136
28229
  " "
28137
28230
  ] }),
28138
- getFeatureName(entitlement.feature, entitlementPackageSize),
28231
+ getFeatureName(
28232
+ entitlement.feature,
28233
+ locale,
28234
+ entitlementPackageSize
28235
+ ),
28139
28236
  entitlement.priceBehavior === EntitlementPriceBehavior.PayInAdvance && /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_jsx_runtime66.Fragment, { children: [
28140
28237
  " ",
28141
28238
  t3("per"),
@@ -28153,12 +28250,13 @@ var Entitlement2 = ({
28153
28250
  " ",
28154
28251
  getFeatureName(
28155
28252
  entitlement.valueCredit,
28253
+ locale,
28156
28254
  entitlement.consumptionRate
28157
28255
  ),
28158
28256
  " ",
28159
28257
  t3("per"),
28160
28258
  " ",
28161
- getFeatureName(entitlement.feature, 1)
28259
+ getFeatureName(entitlement.feature, locale, 1)
28162
28260
  ] }) : entitlement.priceBehavior === EntitlementPriceBehavior.CreditBurndown && creditBasedEntitlementLimit ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_jsx_runtime66.Fragment, { children: creditBasedEntitlementLimit?.period ? t3("Up to X units per period", {
28163
28261
  amount: formatNumber(
28164
28262
  creditBasedEntitlementLimit.limit,
@@ -28166,9 +28264,12 @@ var Entitlement2 = ({
28166
28264
  ),
28167
28265
  units: getFeatureName(
28168
28266
  entitlement.feature,
28267
+ locale,
28169
28268
  creditBasedEntitlementLimit.limit
28170
28269
  ),
28171
- period: creditBasedEntitlementLimit.period
28270
+ period: t3(
28271
+ creditBasedEntitlementLimit.period
28272
+ )
28172
28273
  }) : t3("Up to X units", {
28173
28274
  amount: formatNumber(
28174
28275
  creditBasedEntitlementLimit.limit,
@@ -28176,17 +28277,18 @@ var Entitlement2 = ({
28176
28277
  ),
28177
28278
  units: getFeatureName(
28178
28279
  entitlement.feature,
28280
+ locale,
28179
28281
  creditBasedEntitlementLimit.limit
28180
28282
  )
28181
28283
  }) }) : entitlement.valueType === EntitlementValueType.Numeric || entitlement.valueType === EntitlementValueType.Unlimited || entitlement.valueType === EntitlementValueType.Trait ? /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_jsx_runtime66.Fragment, { children: [
28182
28284
  entitlement.valueType === EntitlementValueType.Unlimited && !entitlement.priceBehavior ? t3("Unlimited", {
28183
- item: getFeatureName(entitlement.feature)
28285
+ item: getFeatureName(entitlement.feature, locale)
28184
28286
  }) : /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_jsx_runtime66.Fragment, { children: [
28185
28287
  typeof limit === "number" && /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_jsx_runtime66.Fragment, { children: [
28186
28288
  formatNumber(limit, { locale }),
28187
28289
  " "
28188
28290
  ] }),
28189
- getFeatureName(entitlement.feature, limit)
28291
+ getFeatureName(entitlement.feature, locale, limit)
28190
28292
  ] }),
28191
28293
  metricPeriodName && /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_jsx_runtime66.Fragment, { children: [
28192
28294
  " ",
@@ -28215,6 +28317,7 @@ var Entitlement2 = ({
28215
28317
  ] }),
28216
28318
  getFeatureName(
28217
28319
  entitlement.feature,
28320
+ locale,
28218
28321
  entitlementPackageSize
28219
28322
  ),
28220
28323
  entitlement.feature.featureType === FeatureType.Trait && /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_jsx_runtime66.Fragment, { children: [
@@ -28694,7 +28797,7 @@ var PricingTable = (0, import_react54.forwardRef)(({ className, ...rest }, ref)
28694
28797
  $alignItems: "center",
28695
28798
  $justifyContent: "center",
28696
28799
  $padding: `${settings.theme.card.padding / TEXT_BASE_SIZE}rem`,
28697
- children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Loader, { "aria-label": "loading", $size: "2xl" })
28800
+ children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Loader, { "aria-label": t3("Loading"), $size: "2xl" })
28698
28801
  }
28699
28802
  );
28700
28803
  }
@@ -31911,6 +32014,7 @@ var Loading = () => {
31911
32014
  };
31912
32015
  var Error2 = ({ message }) => {
31913
32016
  const { settings } = useEmbed();
32017
+ const { t: t3 } = useTranslation();
31914
32018
  return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
31915
32019
  Flex,
31916
32020
  {
@@ -31922,7 +32026,7 @@ var Error2 = ({ message }) => {
31922
32026
  $alignItems: "center",
31923
32027
  $justifyContent: "center",
31924
32028
  children: [
31925
- /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Box, { $marginBottom: "0.5rem", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Text, { display: "heading1", children: "Error" }) }),
32029
+ /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Box, { $marginBottom: "0.5rem", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Text, { display: "heading1", children: t3("Error") }) }),
31926
32030
  /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Box, { $marginBottom: "0.5rem", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Text, { children: message }) })
31927
32031
  ]
31928
32032
  }
@@ -31930,6 +32034,7 @@ var Error2 = ({ message }) => {
31930
32034
  };
31931
32035
  var SchematicEmbed = ({ id, accessToken }) => {
31932
32036
  const theme = (0, import_react59.useContext)(nt);
32037
+ const { t: t3 } = useTranslation();
31933
32038
  const {
31934
32039
  data,
31935
32040
  error,
@@ -32000,13 +32105,15 @@ var SchematicEmbed = ({ id, accessToken }) => {
32000
32105
  return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Error2, { message: error.message });
32001
32106
  }
32002
32107
  if (accessToken?.length === 0) {
32003
- return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Error2, { message: "Please provide an access token." });
32108
+ return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Error2, { message: t3("Please provide an access token.") });
32004
32109
  }
32005
32110
  if (!accessToken?.startsWith("token_")) {
32006
32111
  return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
32007
32112
  Error2,
32008
32113
  {
32009
- message: 'Invalid access token; your temporary access token will start with "token_".'
32114
+ message: t3(
32115
+ "Invalid access token; your temporary access token will start with `token_`."
32116
+ )
32010
32117
  }
32011
32118
  );
32012
32119
  }