@schematichq/schematic-components 2.14.1 → 2.15.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.
@@ -8695,6 +8695,7 @@ function ChangeSubscriptionRequestBodyToJSONTyped(value, ignoreDiscriminator = f
8695
8695
  ),
8696
8696
  new_plan_id: value["newPlanId"],
8697
8697
  new_price_id: value["newPriceId"],
8698
+ opt_in_accepted: value["optInAccepted"],
8698
8699
  pay_in_advance: value["payInAdvance"].map(
8699
8700
  UpdatePayInAdvanceRequestBodyToJSON
8700
8701
  ),
@@ -9002,6 +9003,8 @@ function FeatureEntitlementFromJSONTyped(json, ignoreDiscriminator) {
9002
9003
  allocation: json["allocation"] == null ? void 0 : json["allocation"],
9003
9004
  creditId: json["credit_id"] == null ? void 0 : json["credit_id"],
9004
9005
  creditRemaining: json["credit_remaining"] == null ? void 0 : json["credit_remaining"],
9006
+ creditReserved: json["credit_reserved"] == null ? void 0 : json["credit_reserved"],
9007
+ creditSettled: json["credit_settled"] == null ? void 0 : json["credit_settled"],
9005
9008
  creditTotal: json["credit_total"] == null ? void 0 : json["credit_total"],
9006
9009
  creditUsed: json["credit_used"] == null ? void 0 : json["credit_used"],
9007
9010
  eventName: json["event_name"] == null ? void 0 : json["event_name"],
@@ -10576,6 +10579,9 @@ function PreviewSubscriptionChangeResponseDataFromJSONTyped(json, ignoreDiscrimi
10576
10579
  finance: json["finance"] == null ? void 0 : PreviewSubscriptionFinanceResponseDataFromJSON(json["finance"]),
10577
10580
  isScheduledDowngrade: json["is_scheduled_downgrade"],
10578
10581
  newCharges: json["new_charges"],
10582
+ optInRequired: json["opt_in_required"],
10583
+ optInText: json["opt_in_text"] == null ? void 0 : json["opt_in_text"],
10584
+ optInTitle: json["opt_in_title"] == null ? void 0 : json["opt_in_title"],
10579
10585
  paymentMethodRequired: json["payment_method_required"],
10580
10586
  percentOff: json["percent_off"],
10581
10587
  periodStart: new Date(json["period_start"]),
@@ -12626,6 +12632,17 @@ function getPlanPrice(plan, period = "month", options = { useSelectedPeriod: tru
12626
12632
  return { ...billingPrice, price: getPriceValue(billingPrice) };
12627
12633
  }
12628
12634
  }
12635
+ function planOffersCurrencyForPeriod(plan, period = "month", currency) {
12636
+ if (!currency) return true;
12637
+ const price = getPlanPrice(
12638
+ plan,
12639
+ period,
12640
+ { useSelectedPeriod: true },
12641
+ currency
12642
+ );
12643
+ if (!price) return true;
12644
+ return price.currency.toUpperCase() === currency.toUpperCase();
12645
+ }
12629
12646
  function getAddOnPrice(addOn, period = "month", currency) {
12630
12647
  if (currency && addOn.currencyPrices?.length) {
12631
12648
  const currencyPrice = addOn.currencyPrices.find(
@@ -13956,6 +13973,12 @@ var reducer = (state, action) => {
13956
13973
  bypassAddOnSelection,
13957
13974
  bypassCreditsSelection,
13958
13975
  ...config.addOnIds && { addOnIds: config.addOnIds },
13976
+ ...config.currency && {
13977
+ selectedCurrency: config.currency.toUpperCase()
13978
+ },
13979
+ ...config.showCurrencySelector !== void 0 && {
13980
+ showCurrencySelector: config.showCurrencySelector
13981
+ },
13959
13982
  hideSkippedStages: config.hideSkipped ?? false,
13960
13983
  startTrialIfAvailable: isStringFormat || config.startTrialIfAvailable === void 0 ? true : config.startTrialIfAvailable
13961
13984
  }
@@ -13985,7 +14008,7 @@ var reducer = (state, action) => {
13985
14008
  // src/context/EmbedProvider.tsx
13986
14009
  var import_jsx_runtime2 = require("react/jsx-runtime");
13987
14010
  var getCustomHeaders = (sessionId) => ({
13988
- "X-Schematic-Components-Version": "2.14.1",
14011
+ "X-Schematic-Components-Version": "2.15.0",
13989
14012
  "X-Schematic-Session-ID": sessionId
13990
14013
  });
13991
14014
  var normalizeCurrencyFilter = (filter2) => {
@@ -17698,11 +17721,16 @@ var CheckoutDialog = ({ top }) => {
17698
17721
  const lockedCurrency = useSubscriptionCurrency();
17699
17722
  const hasCurrencyFilter = !!currencyFilter && currencyFilter.length > 0;
17700
17723
  const filterBlocksSubscriptionCurrency = hasCurrencyFilter && !!lockedCurrency && !currencyFilter.includes(lockedCurrency);
17724
+ const prefilledCurrency = checkoutState?.selectedCurrency?.toUpperCase();
17701
17725
  const [selectedCurrency, setSelectedCurrency] = (0, import_react36.useState)(
17702
- () => (checkoutState?.selectedCurrency && currencies.includes(checkoutState.selectedCurrency) ? checkoutState.selectedCurrency : void 0) ?? currencies[0] ?? DEFAULT_CURRENCY
17726
+ () => prefilledCurrency ?? currencies[0] ?? DEFAULT_CURRENCY
17703
17727
  );
17728
+ if (currencies.length > 0 && !currencies.includes(selectedCurrency)) {
17729
+ setSelectedCurrency(currencies[0]);
17730
+ }
17704
17731
  const effectiveCurrency = lockedCurrency ?? selectedCurrency;
17705
- const showCurrencySelector = currencies.length > 1 && !lockedCurrency;
17732
+ const currencySelectorEnabled = checkoutState?.showCurrencySelector ?? true;
17733
+ const canSelectCurrency = currencies.length > 1 && !lockedCurrency && currencySelectorEnabled;
17706
17734
  const hasCurrency = !!lockedCurrency || currencies.length > 1 || hasCurrencyFilter;
17707
17735
  const hasNoUsableCurrency = !lockedCurrency && currencies.length === 0;
17708
17736
  (0, import_react36.useEffect)(() => {
@@ -18037,6 +18065,34 @@ var CheckoutDialog = ({ top }) => {
18037
18065
  return id;
18038
18066
  }, [checkoutStage, checkoutStages, checkoutState, isBypassLoading]);
18039
18067
  const previewRequestIdRef = (0, import_react36.useRef)(0);
18068
+ const planStageVisible = checkoutStages.some((stage) => stage.id === "plan") && !checkoutState?.bypassPlanSelection;
18069
+ const checkoutStageCurrencies = (0, import_react36.useMemo)(() => {
18070
+ if (!selectedPlan) return currencies;
18071
+ return currencies.filter(
18072
+ (currency) => planOffersCurrencyForPeriod(selectedPlan, planPeriod, currency)
18073
+ );
18074
+ }, [currencies, selectedPlan, planPeriod]);
18075
+ const showPlanCurrencySelector = canSelectCurrency && planStageVisible;
18076
+ const showCheckoutCurrencySelector = canSelectCurrency && !planStageVisible && checkoutStageCurrencies.length > 1;
18077
+ const currencyPeriodMismatch = hasCurrency && !lockedCurrency && !planStageVisible && !!selectedPlan && !planOffersCurrencyForPeriod(selectedPlan, planPeriod, effectiveCurrency);
18078
+ (0, import_react36.useEffect)(() => {
18079
+ if (currencyPeriodMismatch) {
18080
+ console.error(
18081
+ `[Schematic] No ${effectiveCurrency} price for the "${planPeriod}" billing period on the selected plan; refusing to fall back to the default currency.`
18082
+ );
18083
+ debug("currency/period mismatch in checkout bypass config", {
18084
+ currency: effectiveCurrency,
18085
+ period: planPeriod,
18086
+ planId: selectedPlan?.id
18087
+ });
18088
+ }
18089
+ }, [
18090
+ currencyPeriodMismatch,
18091
+ effectiveCurrency,
18092
+ planPeriod,
18093
+ selectedPlan?.id,
18094
+ debug
18095
+ ]);
18040
18096
  const handlePreviewCheckout = (0, import_react36.useCallback)(
18041
18097
  async (updates) => {
18042
18098
  const period = updates.period || planPeriod;
@@ -18548,6 +18604,35 @@ var CheckoutDialog = ({ top }) => {
18548
18604
  }
18549
18605
  );
18550
18606
  }
18607
+ if (currencyPeriodMismatch) {
18608
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
18609
+ Dialog2,
18610
+ {
18611
+ ref: setDialog,
18612
+ isModal,
18613
+ size: "lg",
18614
+ top,
18615
+ onClose: handleClose,
18616
+ ...!isModal && { open: layout === "checkout" },
18617
+ children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(DialogContent2, { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
18618
+ Flex,
18619
+ {
18620
+ $flexGrow: 1,
18621
+ $alignItems: "center",
18622
+ $justifyContent: "center",
18623
+ $padding: "2rem",
18624
+ children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
18625
+ CurrencyPeriodMismatchNotice,
18626
+ {
18627
+ currency: effectiveCurrency,
18628
+ period: planPeriod
18629
+ }
18630
+ )
18631
+ }
18632
+ ) })
18633
+ }
18634
+ );
18635
+ }
18551
18636
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
18552
18637
  Dialog2,
18553
18638
  {
@@ -18638,7 +18723,7 @@ var CheckoutDialog = ({ top }) => {
18638
18723
  activeCheckoutStage.description && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { as: "p", children: activeCheckoutStage.description })
18639
18724
  ] }),
18640
18725
  effectiveCheckoutStage === "plan" && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Flex, { $alignItems: "center", $gap: "0.75rem", children: [
18641
- showCurrencySelector && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
18726
+ showPlanCurrencySelector && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
18642
18727
  CurrencyToggle,
18643
18728
  {
18644
18729
  currencies,
@@ -18656,7 +18741,15 @@ var CheckoutDialog = ({ top }) => {
18656
18741
  onSelect: changePlanPeriod
18657
18742
  }
18658
18743
  )
18659
- ] })
18744
+ ] }),
18745
+ effectiveCheckoutStage === "checkout" && showCheckoutCurrencySelector && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Flex, { $alignItems: "center", $gap: "0.75rem", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
18746
+ CurrencyToggle,
18747
+ {
18748
+ currencies: checkoutStageCurrencies,
18749
+ selectedCurrency: effectiveCurrency,
18750
+ onSelect: setSelectedCurrency
18751
+ }
18752
+ ) })
18660
18753
  ]
18661
18754
  }
18662
18755
  ),
@@ -18783,8 +18876,49 @@ var CheckoutDialog = ({ top }) => {
18783
18876
  );
18784
18877
  };
18785
18878
 
18786
- // src/components/shared/currency-toggle/CurrencyToggle.tsx
18879
+ // src/components/shared/currency-period-mismatch-notice/CurrencyPeriodMismatchNotice.tsx
18787
18880
  var import_jsx_runtime26 = require("react/jsx-runtime");
18881
+ var CurrencyPeriodMismatchNotice = ({
18882
+ currency,
18883
+ period
18884
+ }) => {
18885
+ const { settings } = useEmbed();
18886
+ const { t: t3 } = useTranslation();
18887
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
18888
+ Flex,
18889
+ {
18890
+ "data-testid": "sch-currency-period-mismatch-notice",
18891
+ $flexDirection: "column",
18892
+ $alignItems: "center",
18893
+ $gap: "0.75rem",
18894
+ $padding: "1.5rem 2rem",
18895
+ $maxWidth: "28rem",
18896
+ $borderWidth: "1px",
18897
+ $borderStyle: "solid",
18898
+ $borderColor: settings.theme.danger,
18899
+ $borderRadius: "0.5rem",
18900
+ children: [
18901
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon3, { name: "info-rounded", color: settings.theme.danger, size: "lg" }),
18902
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Text, { $weight: 600, $size: 16, $color: settings.theme.danger, children: t3("This plan is not available in the selected currency and period.") }),
18903
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
18904
+ Text,
18905
+ {
18906
+ $size: 13,
18907
+ $color: settings.theme.danger,
18908
+ style: { opacity: 0.85, textAlign: "center" },
18909
+ children: t3("No {{currency}} price for the {{period}} billing period.", {
18910
+ currency: currency.toUpperCase(),
18911
+ period
18912
+ })
18913
+ }
18914
+ )
18915
+ ]
18916
+ }
18917
+ );
18918
+ };
18919
+
18920
+ // src/components/shared/currency-toggle/CurrencyToggle.tsx
18921
+ var import_jsx_runtime27 = require("react/jsx-runtime");
18788
18922
  var CurrencyToggle = ({
18789
18923
  currencies,
18790
18924
  selectedCurrency,
@@ -18793,7 +18927,7 @@ var CurrencyToggle = ({
18793
18927
  }) => {
18794
18928
  const { settings } = useEmbed();
18795
18929
  const isLightBackground = useIsLightBackground();
18796
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
18930
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
18797
18931
  Flex,
18798
18932
  {
18799
18933
  "data-testid": "sch-currency-toggle",
@@ -18806,14 +18940,14 @@ var CurrencyToggle = ({
18806
18940
  $borderRadius: "2.5rem",
18807
18941
  $cursor: disabled ? "default" : "pointer",
18808
18942
  $opacity: disabled ? 0.6 : 1,
18809
- children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
18943
+ children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
18810
18944
  Flex,
18811
18945
  {
18812
18946
  $alignItems: "center",
18813
18947
  $padding: "0.375rem 0.75rem",
18814
18948
  style: { position: "relative" },
18815
18949
  children: [
18816
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
18950
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
18817
18951
  Text,
18818
18952
  {
18819
18953
  style: {
@@ -18830,7 +18964,7 @@ var CurrencyToggle = ({
18830
18964
  ]
18831
18965
  }
18832
18966
  ),
18833
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
18967
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
18834
18968
  "select",
18835
18969
  {
18836
18970
  "data-testid": "sch-currency-select",
@@ -18846,7 +18980,7 @@ var CurrencyToggle = ({
18846
18980
  cursor: disabled ? "default" : "pointer",
18847
18981
  fontSize: "inherit"
18848
18982
  },
18849
- children: currencies.map((currency) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("option", { value: currency, children: [
18983
+ children: currencies.map((currency) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("option", { value: currency, children: [
18850
18984
  getCurrencyFlag(currency),
18851
18985
  " ",
18852
18986
  getCurrencySymbol(currency),
@@ -18855,7 +18989,7 @@ var CurrencyToggle = ({
18855
18989
  ] }, currency))
18856
18990
  }
18857
18991
  ),
18858
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
18992
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
18859
18993
  "svg",
18860
18994
  {
18861
18995
  width: 12,
@@ -18863,7 +18997,7 @@ var CurrencyToggle = ({
18863
18997
  viewBox: "0 0 12 12",
18864
18998
  fill: "none",
18865
18999
  style: { marginLeft: "0.25rem", flexShrink: 0 },
18866
- children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
19000
+ children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
18867
19001
  "path",
18868
19002
  {
18869
19003
  d: "M3 4.5L6 7.5L9 4.5",
@@ -18883,7 +19017,7 @@ var CurrencyToggle = ({
18883
19017
  };
18884
19018
 
18885
19019
  // src/components/shared/hard-limit-tooltip/HardLimitTooltip.tsx
18886
- var import_jsx_runtime27 = require("react/jsx-runtime");
19020
+ var import_jsx_runtime28 = require("react/jsx-runtime");
18887
19021
  var HardLimitTooltip = ({
18888
19022
  portal,
18889
19023
  feature,
@@ -18896,11 +19030,11 @@ var HardLimitTooltip = ({
18896
19030
  if (!showHardLimit || !feature || typeof limit !== "number") {
18897
19031
  return null;
18898
19032
  }
18899
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
19033
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
18900
19034
  Tooltip,
18901
19035
  {
18902
19036
  portal,
18903
- trigger: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
19037
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
18904
19038
  Icon3,
18905
19039
  {
18906
19040
  title: "limit",
@@ -18909,7 +19043,7 @@ var HardLimitTooltip = ({
18909
19043
  style: { lineHeight: 0 }
18910
19044
  }
18911
19045
  ),
18912
- content: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { children: t3("Up to a limit of", {
19046
+ content: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { children: t3("Up to a limit of", {
18913
19047
  amount: limit,
18914
19048
  units: getFeatureName(feature, limit)
18915
19049
  }) })
@@ -18918,13 +19052,13 @@ var HardLimitTooltip = ({
18918
19052
  };
18919
19053
 
18920
19054
  // src/components/shared/invalid-currency-notice/InvalidCurrencyNotice.tsx
18921
- var import_jsx_runtime28 = require("react/jsx-runtime");
19055
+ var import_jsx_runtime29 = require("react/jsx-runtime");
18922
19056
  var InvalidCurrencyNotice = ({
18923
19057
  invalidEntries = []
18924
19058
  }) => {
18925
19059
  const { settings } = useEmbed();
18926
19060
  const { t: t3 } = useTranslation();
18927
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
19061
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
18928
19062
  Flex,
18929
19063
  {
18930
19064
  "data-testid": "sch-invalid-currency-notice",
@@ -18938,9 +19072,9 @@ var InvalidCurrencyNotice = ({
18938
19072
  $borderColor: settings.theme.danger,
18939
19073
  $borderRadius: "0.5rem",
18940
19074
  children: [
18941
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Icon3, { name: "info-rounded", color: settings.theme.danger, size: "lg" }),
18942
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { $weight: 600, $size: 16, $color: settings.theme.danger, children: t3("No supported currencies are available.") }),
18943
- invalidEntries.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
19075
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon3, { name: "info-rounded", color: settings.theme.danger, size: "lg" }),
19076
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { $weight: 600, $size: 16, $color: settings.theme.danger, children: t3("No supported currencies are available.") }),
19077
+ invalidEntries.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
18944
19078
  Text,
18945
19079
  {
18946
19080
  $size: 13,
@@ -18958,7 +19092,7 @@ var InvalidCurrencyNotice = ({
18958
19092
 
18959
19093
  // src/components/shared/payment-dialog/PaymentDialog.tsx
18960
19094
  var import_react37 = require("react");
18961
- var import_jsx_runtime29 = require("react/jsx-runtime");
19095
+ var import_jsx_runtime30 = require("react/jsx-runtime");
18962
19096
  var PaymentDialog = ({ top }) => {
18963
19097
  const { t: t3 } = useTranslation();
18964
19098
  const { layout, setLayout, clearCheckoutState } = useEmbed();
@@ -18984,7 +19118,7 @@ var PaymentDialog = ({ top }) => {
18984
19118
  element.show();
18985
19119
  }
18986
19120
  }, [layout]);
18987
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
19121
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
18988
19122
  Dialog2,
18989
19123
  {
18990
19124
  ref: dialogRef,
@@ -18994,8 +19128,8 @@ var PaymentDialog = ({ top }) => {
18994
19128
  onClose: handleClose,
18995
19129
  ...!isModal && { open: layout === "payment" },
18996
19130
  children: [
18997
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(DialogHeader, { bordered: true, onClose: handleClose, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { $size: 18, children: t3("Edit payment method") }) }),
18998
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(DialogContent2, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Flex, { $position: "relative", $flexGrow: 1, $overflow: "auto", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(PaymentMethodDetails, {}) }) })
19131
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DialogHeader, { bordered: true, onClose: handleClose, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { $size: 18, children: t3("Edit payment method") }) }),
19132
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DialogContent2, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Flex, { $position: "relative", $flexGrow: 1, $overflow: "auto", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(PaymentMethodDetails, {}) }) })
18999
19133
  ]
19000
19134
  }
19001
19135
  );
@@ -19059,7 +19193,7 @@ var Input2 = gt2.input`
19059
19193
  `;
19060
19194
 
19061
19195
  // src/components/shared/payment-form/PaymentForm.tsx
19062
- var import_jsx_runtime30 = require("react/jsx-runtime");
19196
+ var import_jsx_runtime31 = require("react/jsx-runtime");
19063
19197
  var PaymentForm = ({ onConfirm, financeData }) => {
19064
19198
  const { t: t3 } = useTranslation();
19065
19199
  const stripe = (0, import_react_stripe_js.useStripe)();
@@ -19148,7 +19282,7 @@ var PaymentForm = ({ onConfirm, financeData }) => {
19148
19282
  }
19149
19283
  };
19150
19284
  }, [t3, isPaymentReady]);
19151
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
19285
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
19152
19286
  Flex,
19153
19287
  {
19154
19288
  as: "form",
@@ -19156,8 +19290,8 @@ var PaymentForm = ({ onConfirm, financeData }) => {
19156
19290
  onSubmit: handleSubmit,
19157
19291
  $flexDirection: "column",
19158
19292
  children: [
19159
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Box, { $marginBottom: "1.5rem", children: [
19160
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
19293
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(Box, { $marginBottom: "1.5rem", children: [
19294
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
19161
19295
  import_react_stripe_js.PaymentElement,
19162
19296
  {
19163
19297
  id: "payment-element",
@@ -19178,7 +19312,7 @@ var PaymentForm = ({ onConfirm, financeData }) => {
19178
19312
  }
19179
19313
  }
19180
19314
  ),
19181
- loadError && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
19315
+ loadError && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
19182
19316
  Flex,
19183
19317
  {
19184
19318
  as: TransitionBox,
@@ -19186,13 +19320,13 @@ var PaymentForm = ({ onConfirm, financeData }) => {
19186
19320
  $justifyContent: "center",
19187
19321
  $alignItems: "center",
19188
19322
  $gap: "1rem",
19189
- children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { $weight: 500, $color: "#DB6669", children: loadError })
19323
+ children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { $weight: 500, $color: "#DB6669", children: loadError })
19190
19324
  }
19191
19325
  )
19192
19326
  ] }),
19193
- stripe && collectEmail && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Box, { "data-field": "name", $marginBottom: "1.5rem", $verticalAlign: "top", children: [
19194
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Label, { htmlFor: "email", children: "Email" }),
19195
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
19327
+ stripe && collectEmail && /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(Box, { "data-field": "name", $marginBottom: "1.5rem", $verticalAlign: "top", children: [
19328
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Label, { htmlFor: "email", children: "Email" }),
19329
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
19196
19330
  Input2,
19197
19331
  {
19198
19332
  id: "email",
@@ -19207,7 +19341,7 @@ var PaymentForm = ({ onConfirm, financeData }) => {
19207
19341
  }
19208
19342
  )
19209
19343
  ] }),
19210
- showBillingAddress && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Box, { $marginBottom: "3.5rem", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
19344
+ showBillingAddress && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Box, { $marginBottom: "3.5rem", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
19211
19345
  import_react_stripe_js.AddressElement,
19212
19346
  {
19213
19347
  options: {
@@ -19226,7 +19360,7 @@ var PaymentForm = ({ onConfirm, financeData }) => {
19226
19360
  },
19227
19361
  addressDefaultsKey
19228
19362
  ) }),
19229
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
19363
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
19230
19364
  Button,
19231
19365
  {
19232
19366
  id: "submit",
@@ -19238,7 +19372,7 @@ var PaymentForm = ({ onConfirm, financeData }) => {
19238
19372
  children: isLoading ? t3("Loading") : t3("Save payment method")
19239
19373
  }
19240
19374
  ),
19241
- message && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Box, { $margin: "1rem 0", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { id: "payment-message", $size: 15, $weight: 500, $color: "#DB6669", children: message }) })
19375
+ message && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Box, { $margin: "1rem 0", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { id: "payment-message", $size: 15, $weight: 500, $color: "#DB6669", children: message }) })
19242
19376
  ]
19243
19377
  }
19244
19378
  );
@@ -19246,7 +19380,7 @@ var PaymentForm = ({ onConfirm, financeData }) => {
19246
19380
 
19247
19381
  // src/components/shared/period-toggle/PeriodToggle.tsx
19248
19382
  var import_react39 = require("react");
19249
- var import_jsx_runtime31 = require("react/jsx-runtime");
19383
+ var import_jsx_runtime32 = require("react/jsx-runtime");
19250
19384
  var PERIOD_MONTH_COUNT = {
19251
19385
  year: 12,
19252
19386
  quarter: 3
@@ -19279,7 +19413,7 @@ var PeriodToggle = ({
19279
19413
  }
19280
19414
  return result;
19281
19415
  }, [selectedPlan]);
19282
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
19416
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
19283
19417
  Flex,
19284
19418
  {
19285
19419
  "data-testid": "sch-period-toggle",
@@ -19292,7 +19426,7 @@ var PeriodToggle = ({
19292
19426
  $borderRadius: "2.5rem",
19293
19427
  $cursor: "pointer",
19294
19428
  children: options.map((option) => {
19295
- const element = /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
19429
+ const element = /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
19296
19430
  Button,
19297
19431
  {
19298
19432
  "data-testid": "sch-period-toggle-button",
@@ -19316,7 +19450,7 @@ var PeriodToggle = ({
19316
19450
  backgroundColor: isLightBackground ? "hsla(0, 0%, 0%, 0.125)" : "hsla(0, 0%, 100%, 0.125)"
19317
19451
  }
19318
19452
  },
19319
- children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
19453
+ children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
19320
19454
  Text,
19321
19455
  {
19322
19456
  style: {
@@ -19334,12 +19468,12 @@ var PeriodToggle = ({
19334
19468
  const savingsPercentage = savingsByPeriod[option];
19335
19469
  if (typeof savingsPercentage === "number") {
19336
19470
  const isOptionYear = option === "year";
19337
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
19471
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
19338
19472
  Tooltip,
19339
19473
  {
19340
19474
  portal,
19341
19475
  trigger: element,
19342
- content: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { $size: 11, $leading: "none", children: selectedOption === option ? t3(
19476
+ content: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Text, { $size: 11, $leading: "none", children: selectedOption === option ? t3(
19343
19477
  isOptionYear ? "Saving with yearly billing" : "Saving with quarterly billing",
19344
19478
  { percent: savingsPercentage }
19345
19479
  ) : t3(
@@ -19363,7 +19497,7 @@ var import_react41 = require("react");
19363
19497
 
19364
19498
  // src/components/shared/pricing-tiers-tooltip/PriceText.tsx
19365
19499
  var import_react40 = require("react");
19366
- var import_jsx_runtime32 = require("react/jsx-runtime");
19500
+ var import_jsx_runtime33 = require("react/jsx-runtime");
19367
19501
  var PriceText = ({
19368
19502
  feature,
19369
19503
  period,
@@ -19374,38 +19508,38 @@ var PriceText = ({
19374
19508
  const { settings } = useEmbed();
19375
19509
  const text = (0, import_react40.useMemo)(() => {
19376
19510
  if (!flatAmount && perUnitPrice) {
19377
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
19511
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
19378
19512
  formatCurrency(perUnitPrice, currency),
19379
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("sub", { children: [
19513
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("sub", { children: [
19380
19514
  "/",
19381
19515
  getFeatureName(feature, 1)
19382
19516
  ] })
19383
19517
  ] });
19384
19518
  }
19385
19519
  if (flatAmount && !perUnitPrice) {
19386
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
19520
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
19387
19521
  formatCurrency(flatAmount, currency),
19388
- period && /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("sub", { children: [
19522
+ period && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("sub", { children: [
19389
19523
  "/",
19390
19524
  shortenPeriod(period)
19391
19525
  ] })
19392
19526
  ] });
19393
19527
  }
19394
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
19528
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
19395
19529
  formatCurrency(perUnitPrice, currency),
19396
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("sub", { children: [
19530
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("sub", { children: [
19397
19531
  "/",
19398
19532
  getFeatureName(feature, 1)
19399
19533
  ] }),
19400
19534
  " + ",
19401
19535
  formatCurrency(flatAmount, currency),
19402
- period && /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("sub", { children: [
19536
+ period && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("sub", { children: [
19403
19537
  "/",
19404
19538
  shortenPeriod(period)
19405
19539
  ] })
19406
19540
  ] });
19407
19541
  }, [feature, period, currency, flatAmount, perUnitPrice]);
19408
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
19542
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
19409
19543
  Text,
19410
19544
  {
19411
19545
  $size: 0.875 * settings.theme.typography.text.fontSize,
@@ -19416,7 +19550,7 @@ var PriceText = ({
19416
19550
  };
19417
19551
 
19418
19552
  // src/components/shared/pricing-tiers-tooltip/PricingTiersTooltip.tsx
19419
- var import_jsx_runtime33 = require("react/jsx-runtime");
19553
+ var import_jsx_runtime34 = require("react/jsx-runtime");
19420
19554
  var PricingTiersTooltip = ({
19421
19555
  portal,
19422
19556
  feature,
@@ -19449,11 +19583,11 @@ var PricingTiersTooltip = ({
19449
19583
  if (!priceTiers.length) {
19450
19584
  return null;
19451
19585
  }
19452
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
19586
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
19453
19587
  Tooltip,
19454
19588
  {
19455
19589
  portal,
19456
- trigger: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
19590
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
19457
19591
  Icon3,
19458
19592
  {
19459
19593
  title: "tiered pricing",
@@ -19462,11 +19596,11 @@ var PricingTiersTooltip = ({
19462
19596
  style: { lineHeight: 0 }
19463
19597
  }
19464
19598
  ),
19465
- content: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Flex, { $flexDirection: "column", $gap: "1rem", children: [
19466
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("dl", { children: tiers.map((tier, index) => {
19599
+ content: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Flex, { $flexDirection: "column", $gap: "1rem", children: [
19600
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("dl", { children: tiers.map((tier, index) => {
19467
19601
  const flatAmount = typeof tier.flatAmount === "number" ? tier.flatAmount : void 0;
19468
19602
  const perUnitPrice = typeof tier.perUnitPriceDecimal === "string" ? Number(tier.perUnitPriceDecimal) : typeof tier.perUnitPrice === "number" ? tier.perUnitPrice : void 0;
19469
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
19603
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
19470
19604
  Flex,
19471
19605
  {
19472
19606
  $justifyContent: "space-between",
@@ -19474,17 +19608,17 @@ var PricingTiersTooltip = ({
19474
19608
  $gap: "1rem",
19475
19609
  $padding: "0.5rem",
19476
19610
  children: [
19477
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("dt", { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
19611
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("dt", { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
19478
19612
  Text,
19479
19613
  {
19480
19614
  $size: 0.875 * settings.theme.typography.text.fontSize,
19481
19615
  children: [
19482
19616
  tier.from,
19483
- tier.from !== tier.to && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_jsx_runtime33.Fragment, { children: tier.to === Infinity ? "+" : `\u2013${tier.to}` })
19617
+ tier.from !== tier.to && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_jsx_runtime34.Fragment, { children: tier.to === Infinity ? "+" : `\u2013${tier.to}` })
19484
19618
  ]
19485
19619
  }
19486
19620
  ) }),
19487
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("dd", { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
19621
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("dd", { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
19488
19622
  PriceText,
19489
19623
  {
19490
19624
  period,
@@ -19499,8 +19633,8 @@ var PricingTiersTooltip = ({
19499
19633
  index
19500
19634
  );
19501
19635
  }) }),
19502
- tiersMode && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
19503
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
19636
+ tiersMode && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
19637
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
19504
19638
  "hr",
19505
19639
  {
19506
19640
  style: {
@@ -19510,7 +19644,7 @@ var PricingTiersTooltip = ({
19510
19644
  }
19511
19645
  }
19512
19646
  ),
19513
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Text, { $size: 0.875 * settings.theme.typography.text.fontSize, children: [
19647
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Text, { $size: 0.875 * settings.theme.typography.text.fontSize, children: [
19514
19648
  "\u2139\uFE0F",
19515
19649
  " ",
19516
19650
  tiersMode === BillingTiersMode.Volume ? t3("Price by unit based on final tier reached.") : t3("Tiers apply progressively as quantity increases.")
@@ -19527,7 +19661,7 @@ var import_react43 = require("react");
19527
19661
  var import_react_dom2 = require("react-dom");
19528
19662
 
19529
19663
  // src/components/shared/subscription-sidebar/CheckoutStageButton.tsx
19530
- var import_jsx_runtime34 = require("react/jsx-runtime");
19664
+ var import_jsx_runtime35 = require("react/jsx-runtime");
19531
19665
  var NoPaymentRequired = ({
19532
19666
  isDisabled,
19533
19667
  isLoading,
@@ -19537,7 +19671,7 @@ var NoPaymentRequired = ({
19537
19671
  onClick
19538
19672
  }) => {
19539
19673
  const { t: t3 } = useTranslation();
19540
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
19674
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
19541
19675
  Button,
19542
19676
  {
19543
19677
  type: "button",
@@ -19599,7 +19733,7 @@ var CheckoutStageButton = ({
19599
19733
  if (checkoutStage === "plan") {
19600
19734
  const nextStage = getNextStageId("plan");
19601
19735
  if (isSelectedPlanTrialable && trialPaymentMethodRequired && shouldTrial) {
19602
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
19736
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
19603
19737
  Button,
19604
19738
  {
19605
19739
  type: "button",
@@ -19609,7 +19743,7 @@ var CheckoutStageButton = ({
19609
19743
  },
19610
19744
  $fullWidth: true,
19611
19745
  $isLoading: isLoading,
19612
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
19746
+ children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
19613
19747
  Flex,
19614
19748
  {
19615
19749
  $gap: "0.5rem",
@@ -19620,7 +19754,7 @@ var CheckoutStageButton = ({
19620
19754
  t3("Next"),
19621
19755
  ": ",
19622
19756
  t3("Checkout"),
19623
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Icon3, { name: "arrow-right" })
19757
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Icon3, { name: "arrow-right" })
19624
19758
  ]
19625
19759
  }
19626
19760
  )
@@ -19628,7 +19762,7 @@ var CheckoutStageButton = ({
19628
19762
  );
19629
19763
  }
19630
19764
  if (!isPaymentMethodRequired && !nextStage) {
19631
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
19765
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
19632
19766
  NoPaymentRequired,
19633
19767
  {
19634
19768
  isDisabled,
@@ -19639,7 +19773,7 @@ var CheckoutStageButton = ({
19639
19773
  }
19640
19774
  );
19641
19775
  }
19642
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
19776
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
19643
19777
  Button,
19644
19778
  {
19645
19779
  type: "button",
@@ -19650,11 +19784,11 @@ var CheckoutStageButton = ({
19650
19784
  $size: isSticky ? "sm" : "md",
19651
19785
  $fullWidth: true,
19652
19786
  $isLoading: isLoading,
19653
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Flex, { $gap: "0.5rem", $justifyContent: "center", $alignItems: "center", children: [
19787
+ children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Flex, { $gap: "0.5rem", $justifyContent: "center", $alignItems: "center", children: [
19654
19788
  t3("Next"),
19655
19789
  ": ",
19656
19790
  getStageDisplayName(nextStage),
19657
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Icon3, { name: "arrow-right" })
19791
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Icon3, { name: "arrow-right" })
19658
19792
  ] })
19659
19793
  }
19660
19794
  );
@@ -19662,7 +19796,7 @@ var CheckoutStageButton = ({
19662
19796
  if (checkoutStage === "autoTopup") {
19663
19797
  const nextStage = getNextStageId("autoTopup");
19664
19798
  if (!isPaymentMethodRequired && !nextStage) {
19665
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
19799
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
19666
19800
  NoPaymentRequired,
19667
19801
  {
19668
19802
  isDisabled,
@@ -19673,7 +19807,7 @@ var CheckoutStageButton = ({
19673
19807
  }
19674
19808
  );
19675
19809
  }
19676
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
19810
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
19677
19811
  Button,
19678
19812
  {
19679
19813
  type: "button",
@@ -19684,7 +19818,7 @@ var CheckoutStageButton = ({
19684
19818
  $size: isSticky ? "sm" : "md",
19685
19819
  $fullWidth: true,
19686
19820
  $isLoading: isLoading,
19687
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
19821
+ children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
19688
19822
  Flex,
19689
19823
  {
19690
19824
  $gap: "0.5rem",
@@ -19695,7 +19829,7 @@ var CheckoutStageButton = ({
19695
19829
  t3("Next"),
19696
19830
  ": ",
19697
19831
  getStageDisplayName(nextStage),
19698
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Icon3, { name: "arrow-right" })
19832
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Icon3, { name: "arrow-right" })
19699
19833
  ]
19700
19834
  }
19701
19835
  )
@@ -19705,7 +19839,7 @@ var CheckoutStageButton = ({
19705
19839
  if (checkoutStage === "usage") {
19706
19840
  const nextStage = getNextStageId("usage");
19707
19841
  if (!isPaymentMethodRequired && !nextStage) {
19708
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
19842
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
19709
19843
  NoPaymentRequired,
19710
19844
  {
19711
19845
  isDisabled,
@@ -19716,7 +19850,7 @@ var CheckoutStageButton = ({
19716
19850
  }
19717
19851
  );
19718
19852
  }
19719
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
19853
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
19720
19854
  Button,
19721
19855
  {
19722
19856
  type: "button",
@@ -19727,7 +19861,7 @@ var CheckoutStageButton = ({
19727
19861
  $size: isSticky ? "sm" : "md",
19728
19862
  $fullWidth: true,
19729
19863
  $isLoading: isLoading,
19730
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
19864
+ children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
19731
19865
  Flex,
19732
19866
  {
19733
19867
  $gap: "0.5rem",
@@ -19738,7 +19872,7 @@ var CheckoutStageButton = ({
19738
19872
  t3("Next"),
19739
19873
  ": ",
19740
19874
  getStageDisplayName(nextStage),
19741
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Icon3, { name: "arrow-right" })
19875
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Icon3, { name: "arrow-right" })
19742
19876
  ]
19743
19877
  }
19744
19878
  )
@@ -19748,7 +19882,7 @@ var CheckoutStageButton = ({
19748
19882
  if (checkoutStage === "addons") {
19749
19883
  const nextStage = getNextStageId("addons");
19750
19884
  if (!isPaymentMethodRequired && !nextStage) {
19751
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
19885
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
19752
19886
  NoPaymentRequired,
19753
19887
  {
19754
19888
  isDisabled,
@@ -19759,7 +19893,7 @@ var CheckoutStageButton = ({
19759
19893
  }
19760
19894
  );
19761
19895
  }
19762
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
19896
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
19763
19897
  Button,
19764
19898
  {
19765
19899
  type: "button",
@@ -19769,7 +19903,7 @@ var CheckoutStageButton = ({
19769
19903
  },
19770
19904
  $fullWidth: true,
19771
19905
  $isLoading: isLoading,
19772
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
19906
+ children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
19773
19907
  Flex,
19774
19908
  {
19775
19909
  $gap: "0.5rem",
@@ -19780,7 +19914,7 @@ var CheckoutStageButton = ({
19780
19914
  t3("Next"),
19781
19915
  ": ",
19782
19916
  getStageDisplayName(nextStage),
19783
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Icon3, { name: "arrow-right" })
19917
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Icon3, { name: "arrow-right" })
19784
19918
  ]
19785
19919
  }
19786
19920
  )
@@ -19790,7 +19924,7 @@ var CheckoutStageButton = ({
19790
19924
  if (checkoutStage === "addonsUsage") {
19791
19925
  const nextStage = getNextStageId("addonsUsage");
19792
19926
  if (!isPaymentMethodRequired && !nextStage) {
19793
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
19927
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
19794
19928
  NoPaymentRequired,
19795
19929
  {
19796
19930
  isDisabled,
@@ -19801,7 +19935,7 @@ var CheckoutStageButton = ({
19801
19935
  }
19802
19936
  );
19803
19937
  }
19804
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
19938
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
19805
19939
  Button,
19806
19940
  {
19807
19941
  type: "button",
@@ -19812,7 +19946,7 @@ var CheckoutStageButton = ({
19812
19946
  $size: isSticky ? "sm" : "md",
19813
19947
  $fullWidth: true,
19814
19948
  $isLoading: isLoading,
19815
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
19949
+ children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
19816
19950
  Flex,
19817
19951
  {
19818
19952
  $gap: "0.5rem",
@@ -19823,7 +19957,7 @@ var CheckoutStageButton = ({
19823
19957
  t3("Next"),
19824
19958
  ": ",
19825
19959
  getStageDisplayName(nextStage),
19826
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Icon3, { name: "arrow-right" })
19960
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Icon3, { name: "arrow-right" })
19827
19961
  ]
19828
19962
  }
19829
19963
  )
@@ -19833,7 +19967,7 @@ var CheckoutStageButton = ({
19833
19967
  if (checkoutStage === "credits") {
19834
19968
  const nextStage = getNextStageId("credits");
19835
19969
  if (!nextStage) {
19836
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
19970
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
19837
19971
  NoPaymentRequired,
19838
19972
  {
19839
19973
  isDisabled,
@@ -19844,7 +19978,7 @@ var CheckoutStageButton = ({
19844
19978
  }
19845
19979
  );
19846
19980
  }
19847
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
19981
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
19848
19982
  Button,
19849
19983
  {
19850
19984
  type: "button",
@@ -19854,7 +19988,7 @@ var CheckoutStageButton = ({
19854
19988
  },
19855
19989
  $fullWidth: true,
19856
19990
  $isLoading: isLoading,
19857
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
19991
+ children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
19858
19992
  Flex,
19859
19993
  {
19860
19994
  $gap: "0.5rem",
@@ -19865,7 +19999,7 @@ var CheckoutStageButton = ({
19865
19999
  t3("Next"),
19866
20000
  ": ",
19867
20001
  getStageDisplayName(nextStage),
19868
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Icon3, { name: "arrow-right" })
20002
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Icon3, { name: "arrow-right" })
19869
20003
  ]
19870
20004
  }
19871
20005
  )
@@ -19874,7 +20008,7 @@ var CheckoutStageButton = ({
19874
20008
  }
19875
20009
  if (checkoutStage === "checkout") {
19876
20010
  if (!isPaymentMethodRequired) {
19877
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
20011
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
19878
20012
  NoPaymentRequired,
19879
20013
  {
19880
20014
  isDisabled,
@@ -19885,7 +20019,7 @@ var CheckoutStageButton = ({
19885
20019
  }
19886
20020
  );
19887
20021
  }
19888
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
20022
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
19889
20023
  Button,
19890
20024
  {
19891
20025
  type: "button",
@@ -19900,7 +20034,7 @@ var CheckoutStageButton = ({
19900
20034
  };
19901
20035
 
19902
20036
  // src/components/shared/subscription-sidebar/EntitlementRow.tsx
19903
- var import_jsx_runtime35 = require("react/jsx-runtime");
20037
+ var import_jsx_runtime36 = require("react/jsx-runtime");
19904
20038
  var EntitlementRow = (props) => {
19905
20039
  const { t: t3 } = useTranslation();
19906
20040
  const { settings } = useEmbed();
@@ -19920,41 +20054,41 @@ var EntitlementRow = (props) => {
19920
20054
  tiersMode
19921
20055
  } = entitlementPrice || {};
19922
20056
  const tiered = priceBehavior === EntitlementPriceBehavior.PayInAdvance && isTieredPrice(entitlementPrice);
19923
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
19924
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { display: "heading4", children: priceBehavior === EntitlementPriceBehavior.PayInAdvance ? /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
20057
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
20058
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Text, { display: "heading4", children: priceBehavior === EntitlementPriceBehavior.PayInAdvance ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
19925
20059
  quantity,
19926
20060
  " ",
19927
20061
  getFeatureName(feature, quantity)
19928
- ] }) : priceBehavior === EntitlementPriceBehavior.Overage && typeof softLimit === "number" ? /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
20062
+ ] }) : priceBehavior === EntitlementPriceBehavior.Overage && typeof softLimit === "number" ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
19929
20063
  softLimit,
19930
20064
  " ",
19931
20065
  getFeatureName(feature, softLimit)
19932
20066
  ] }) : feature.name }) }),
19933
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Box, { $whiteSpace: "nowrap", $lineHeight: 1, children: priceBehavior === EntitlementPriceBehavior.PayInAdvance && !tiered ? /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Text, { children: [
20067
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Box, { $whiteSpace: "nowrap", $lineHeight: 1, children: priceBehavior === EntitlementPriceBehavior.PayInAdvance && !tiered ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(Text, { children: [
19934
20068
  formatCurrency((price ?? 0) * quantity, currency),
19935
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("sub", { children: [
20069
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("sub", { children: [
19936
20070
  "/",
19937
20071
  shortenPeriod(planPeriod)
19938
20072
  ] })
19939
- ] }) : priceBehavior === EntitlementPriceBehavior.PayAsYouGo || priceBehavior === EntitlementPriceBehavior.Overage ? /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Text, { children: [
19940
- priceBehavior === EntitlementPriceBehavior.Overage && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
20073
+ ] }) : priceBehavior === EntitlementPriceBehavior.PayAsYouGo || priceBehavior === EntitlementPriceBehavior.Overage ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(Text, { children: [
20074
+ priceBehavior === EntitlementPriceBehavior.Overage && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
19941
20075
  t3("then"),
19942
20076
  " "
19943
20077
  ] }),
19944
20078
  formatCurrency(price ?? 0, currency),
19945
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("sub", { children: [
20079
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("sub", { children: [
19946
20080
  "/",
19947
- packageSize > 1 && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
20081
+ packageSize > 1 && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
19948
20082
  packageSize,
19949
20083
  " "
19950
20084
  ] }),
19951
20085
  getFeatureName(feature, packageSize),
19952
- feature.featureType === FeatureType.Trait && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
20086
+ feature.featureType === FeatureType.Trait && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
19953
20087
  "/",
19954
20088
  shortenPeriod(planPeriod)
19955
20089
  ] })
19956
20090
  ] })
19957
- ] }) : (priceBehavior === EntitlementPriceBehavior.Tier || tiered) && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
20091
+ ] }) : (priceBehavior === EntitlementPriceBehavior.Tier || tiered) && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
19958
20092
  Text,
19959
20093
  {
19960
20094
  style: { opacity: 0.54 },
@@ -19962,7 +20096,7 @@ var EntitlementRow = (props) => {
19962
20096
  $color: settings.theme.typography.text.color,
19963
20097
  children: [
19964
20098
  t3("Tier-based"),
19965
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
20099
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
19966
20100
  PricingTiersTooltip,
19967
20101
  {
19968
20102
  portal,
@@ -19983,7 +20117,7 @@ var EntitlementRow = (props) => {
19983
20117
 
19984
20118
  // src/components/shared/subscription-sidebar/Proration.tsx
19985
20119
  var import_react42 = require("react");
19986
- var import_jsx_runtime36 = require("react/jsx-runtime");
20120
+ var import_jsx_runtime37 = require("react/jsx-runtime");
19987
20121
  var Proration = ({ currency, charges }) => {
19988
20122
  const { t: t3 } = useTranslation();
19989
20123
  const { settings } = useEmbed();
@@ -19993,21 +20127,21 @@ var Proration = ({ currency, charges }) => {
19993
20127
  e2.stopPropagation();
19994
20128
  setOpen((open2) => !open2);
19995
20129
  };
19996
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
19997
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Box, { $opacity: "0.625", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Text, { $size: 14, children: t3("Proration") }) }),
19998
- /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(Flex, { $flexDirection: "column", $gap: "0.5rem", children: [
20130
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_jsx_runtime37.Fragment, { children: [
20131
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Box, { $opacity: "0.625", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { $size: 14, children: t3("Proration") }) }),
20132
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Flex, { $flexDirection: "column", $gap: "0.5rem", children: [
19999
20133
  open && charges?.upcomingInvoiceLineItems.map(
20000
20134
  ({ amount, description }, index) => {
20001
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(Flex, { $gap: "1rem", children: [
20002
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Text, { children: description }),
20003
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Text, { children: formatCurrency(amount, currency) })
20135
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Flex, { $gap: "1rem", children: [
20136
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { children: description }),
20137
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { children: formatCurrency(amount, currency) })
20004
20138
  ] }, index);
20005
20139
  }
20006
20140
  ),
20007
- /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(Flex, { $justifyContent: "space-between", $alignItems: "center", $gap: "1rem", children: [
20008
- /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(Flex, { children: [
20009
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Text, { display: "heading4", children: t3("Total") }),
20010
- /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
20141
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Flex, { $justifyContent: "space-between", $alignItems: "center", $gap: "1rem", children: [
20142
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Flex, { children: [
20143
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { display: "heading4", children: t3("Total") }),
20144
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
20011
20145
  Button,
20012
20146
  {
20013
20147
  type: "button",
@@ -20015,26 +20149,26 @@ var Proration = ({ currency, charges }) => {
20015
20149
  style: { height: "auto", padding: 0 },
20016
20150
  $variant: "text",
20017
20151
  children: [
20018
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
20152
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
20019
20153
  Icon3,
20020
20154
  {
20021
20155
  name: open ? "chevron-up" : "chevron-down",
20022
20156
  color: settings.theme.typography.text.color
20023
20157
  }
20024
20158
  ),
20025
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Text, { children: open ? t3("Hide details") : t3("Show details") })
20159
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { children: open ? t3("Hide details") : t3("Show details") })
20026
20160
  ]
20027
20161
  }
20028
20162
  )
20029
20163
  ] }),
20030
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Flex, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Text, { children: formatCurrency(charges.proration, currency) }) })
20164
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Flex, { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { children: formatCurrency(charges.proration, currency) }) })
20031
20165
  ] })
20032
20166
  ] })
20033
20167
  ] });
20034
20168
  };
20035
20169
 
20036
20170
  // src/components/shared/subscription-sidebar/SubscriptionSidebar.tsx
20037
- var import_jsx_runtime37 = require("react/jsx-runtime");
20171
+ var import_jsx_runtime38 = require("react/jsx-runtime");
20038
20172
  var SubscriptionSidebar = (0, import_react43.forwardRef)(
20039
20173
  ({
20040
20174
  portal,
@@ -20440,7 +20574,7 @@ var SubscriptionSidebar = (0, import_react43.forwardRef)(
20440
20574
  const isSticky = !isButtonInView;
20441
20575
  switch (layout) {
20442
20576
  case "checkout":
20443
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
20577
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
20444
20578
  CheckoutStageButton,
20445
20579
  {
20446
20580
  canCheckout,
@@ -20463,7 +20597,7 @@ var SubscriptionSidebar = (0, import_react43.forwardRef)(
20463
20597
  }
20464
20598
  );
20465
20599
  case "unsubscribe":
20466
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
20600
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
20467
20601
  Button,
20468
20602
  {
20469
20603
  type: "button",
@@ -20529,7 +20663,7 @@ var SubscriptionSidebar = (0, import_react43.forwardRef)(
20529
20663
  if (isSelectedPlanTrialable && selectedPlan.trialDays) {
20530
20664
  trialEndsOn.setDate(trialEndsOn.getDate() + selectedPlan.trialDays);
20531
20665
  }
20532
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
20666
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
20533
20667
  Flex,
20534
20668
  {
20535
20669
  ref,
@@ -20546,7 +20680,7 @@ var SubscriptionSidebar = (0, import_react43.forwardRef)(
20546
20680
  },
20547
20681
  ...rest,
20548
20682
  children: [
20549
- showHeader && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
20683
+ showHeader && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
20550
20684
  Flex,
20551
20685
  {
20552
20686
  $position: "relative",
@@ -20558,10 +20692,10 @@ var SubscriptionSidebar = (0, import_react43.forwardRef)(
20558
20692
  $borderBottomWidth: "1px",
20559
20693
  $borderStyle: "solid",
20560
20694
  $borderColor: isLightBackground ? "hsla(0, 0%, 0%, 0.1)" : "hsla(0, 0%, 100%, 0.2)",
20561
- children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Flex, { $justifyContent: "space-between", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { as: "h3", display: "heading3", children: t3("Subscription") }) })
20695
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Flex, { $justifyContent: "space-between", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { as: "h3", display: "heading3", children: t3("Subscription") }) })
20562
20696
  }
20563
20697
  ),
20564
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
20698
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
20565
20699
  Flex,
20566
20700
  {
20567
20701
  $position: "relative",
@@ -20575,9 +20709,9 @@ var SubscriptionSidebar = (0, import_react43.forwardRef)(
20575
20709
  $borderStyle: "solid",
20576
20710
  $borderColor: isLightBackground ? "hsla(0, 0%, 0%, 0.1)" : "hsla(0, 0%, 100%, 0.2)",
20577
20711
  children: [
20578
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Box, { $opacity: "0.625", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { $size: 14, children: t3("Plan") }) }),
20579
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Flex, { $flexDirection: "column", $gap: "0.5rem", $marginBottom: "1.5rem", children: [
20580
- currentPlan && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
20712
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Box, { $opacity: "0.625", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { $size: 14, children: t3("Plan") }) }),
20713
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Flex, { $flexDirection: "column", $gap: "0.5rem", $marginBottom: "1.5rem", children: [
20714
+ currentPlan && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
20581
20715
  Flex,
20582
20716
  {
20583
20717
  $justifyContent: "space-between",
@@ -20589,13 +20723,13 @@ var SubscriptionSidebar = (0, import_react43.forwardRef)(
20589
20723
  $color: settings.theme.typography.heading4.color
20590
20724
  },
20591
20725
  children: [
20592
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { display: "heading4", children: currentPlan.name }) }),
20593
- typeof currentPlan.planPrice === "number" && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Box, { $whiteSpace: "nowrap", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Text, { children: [
20726
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { display: "heading4", children: currentPlan.name }) }),
20727
+ typeof currentPlan.planPrice === "number" && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Box, { $whiteSpace: "nowrap", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Text, { children: [
20594
20728
  formatCurrency(
20595
20729
  currentPlan.planPrice,
20596
20730
  billingSubscription?.currency
20597
20731
  ),
20598
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("sub", { children: [
20732
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("sub", { children: [
20599
20733
  "/",
20600
20734
  shortenPeriod(
20601
20735
  getSubscriptionPeriod(billingSubscription) || currentPlan.planPeriod || planPeriod
@@ -20605,8 +20739,8 @@ var SubscriptionSidebar = (0, import_react43.forwardRef)(
20605
20739
  ]
20606
20740
  }
20607
20741
  ),
20608
- selectedPlan && !selectedPlan.current && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Box, { children: [
20609
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
20742
+ selectedPlan && !selectedPlan.current && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Box, { children: [
20743
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
20610
20744
  Box,
20611
20745
  {
20612
20746
  $width: "100%",
@@ -20614,7 +20748,7 @@ var SubscriptionSidebar = (0, import_react43.forwardRef)(
20614
20748
  $opacity: "50%",
20615
20749
  $marginBottom: "0.25rem",
20616
20750
  $marginTop: "-0.25rem",
20617
- children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
20751
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
20618
20752
  Icon3,
20619
20753
  {
20620
20754
  name: "arrow-down",
@@ -20626,20 +20760,20 @@ var SubscriptionSidebar = (0, import_react43.forwardRef)(
20626
20760
  )
20627
20761
  }
20628
20762
  ),
20629
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
20763
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
20630
20764
  Flex,
20631
20765
  {
20632
20766
  $justifyContent: "space-between",
20633
20767
  $alignItems: "center",
20634
20768
  $gap: "1rem",
20635
20769
  children: [
20636
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Flex, { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { display: "heading4", children: selectedPlan.name }) }),
20637
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Flex, { $whiteSpace: "nowrap", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Text, { children: [
20770
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Flex, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { display: "heading4", children: selectedPlan.name }) }),
20771
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Flex, { $whiteSpace: "nowrap", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Text, { children: [
20638
20772
  formatCurrency(
20639
20773
  selectedPlanPrice ?? 0,
20640
20774
  selectedPlanCurrency
20641
20775
  ),
20642
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("sub", { children: [
20776
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("sub", { children: [
20643
20777
  "/",
20644
20778
  shortenPeriod(planPeriod)
20645
20779
  ] })
@@ -20649,13 +20783,13 @@ var SubscriptionSidebar = (0, import_react43.forwardRef)(
20649
20783
  )
20650
20784
  ] })
20651
20785
  ] }),
20652
- updatedUsageBasedEntitlements.willChange && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Flex, { $flexDirection: "column", $gap: "0.5rem", $marginBottom: "1.5rem", children: [
20653
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Box, { $opacity: "0.625", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { $size: 14, children: t3("Usage-based") }) }),
20786
+ updatedUsageBasedEntitlements.willChange && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Flex, { $flexDirection: "column", $gap: "0.5rem", $marginBottom: "1.5rem", children: [
20787
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Box, { $opacity: "0.625", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { $size: 14, children: t3("Usage-based") }) }),
20654
20788
  updatedUsageBasedEntitlements.removed.reduce(
20655
20789
  (acc, entitlement, index) => {
20656
20790
  if (entitlement.feature?.name) {
20657
20791
  acc.push(
20658
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
20792
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
20659
20793
  Flex,
20660
20794
  {
20661
20795
  $justifyContent: "space-between",
@@ -20664,7 +20798,7 @@ var SubscriptionSidebar = (0, import_react43.forwardRef)(
20664
20798
  $opacity: "0.625",
20665
20799
  $textDecoration: "line-through",
20666
20800
  $color: settings.theme.typography.heading4.color,
20667
- children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
20801
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
20668
20802
  EntitlementRow,
20669
20803
  {
20670
20804
  portal: resolvedPortal,
@@ -20686,8 +20820,8 @@ var SubscriptionSidebar = (0, import_react43.forwardRef)(
20686
20820
  (acc, { previous, next: next2 }, index) => {
20687
20821
  if (next2.feature?.name) {
20688
20822
  acc.push(
20689
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Flex, { $flexDirection: "column", $gap: "0.5rem", children: [
20690
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
20823
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Flex, { $flexDirection: "column", $gap: "0.5rem", children: [
20824
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
20691
20825
  Flex,
20692
20826
  {
20693
20827
  $justifyContent: "space-between",
@@ -20696,7 +20830,7 @@ var SubscriptionSidebar = (0, import_react43.forwardRef)(
20696
20830
  $opacity: "0.625",
20697
20831
  $textDecoration: "line-through",
20698
20832
  $color: settings.theme.typography.heading4.color,
20699
- children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
20833
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
20700
20834
  EntitlementRow,
20701
20835
  {
20702
20836
  portal: resolvedPortal,
@@ -20707,13 +20841,13 @@ var SubscriptionSidebar = (0, import_react43.forwardRef)(
20707
20841
  )
20708
20842
  }
20709
20843
  ),
20710
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
20844
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
20711
20845
  Flex,
20712
20846
  {
20713
20847
  $justifyContent: "space-between",
20714
20848
  $alignItems: "baseline",
20715
20849
  $gap: "1rem",
20716
- children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
20850
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
20717
20851
  EntitlementRow,
20718
20852
  {
20719
20853
  portal: resolvedPortal,
@@ -20735,13 +20869,13 @@ var SubscriptionSidebar = (0, import_react43.forwardRef)(
20735
20869
  (acc, entitlement, index) => {
20736
20870
  if (entitlement.feature?.name) {
20737
20871
  acc.push(
20738
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
20872
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
20739
20873
  Flex,
20740
20874
  {
20741
20875
  $justifyContent: "space-between",
20742
20876
  $alignItems: "baseline",
20743
20877
  $gap: "1rem",
20744
- children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
20878
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
20745
20879
  EntitlementRow,
20746
20880
  {
20747
20881
  portal: resolvedPortal,
@@ -20760,33 +20894,33 @@ var SubscriptionSidebar = (0, import_react43.forwardRef)(
20760
20894
  []
20761
20895
  )
20762
20896
  ] }),
20763
- selectedPlan && isSelectedPlanTrialable && shouldTrial && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Box, { children: [
20764
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Box, { $opacity: "0.625", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { $size: 14, children: t3("Trial") }) }),
20765
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
20897
+ selectedPlan && isSelectedPlanTrialable && shouldTrial && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Box, { children: [
20898
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Box, { $opacity: "0.625", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { $size: 14, children: t3("Trial") }) }),
20899
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
20766
20900
  Flex,
20767
20901
  {
20768
20902
  $justifyContent: "space-between",
20769
20903
  $alignItems: "center",
20770
20904
  $gap: "1rem",
20771
20905
  children: [
20772
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Flex, { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { display: "heading4", children: t3("Ends on", { date: trialEndsOn.toLocaleDateString() }) }) }),
20773
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Flex, { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Text, { children: [
20906
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Flex, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { display: "heading4", children: t3("Ends on", { date: trialEndsOn.toLocaleDateString() }) }) }),
20907
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Flex, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Text, { children: [
20774
20908
  "-",
20775
20909
  formatCurrency(
20776
20910
  selectedPlanPrice ?? 0,
20777
20911
  selectedPlanCurrency
20778
20912
  ),
20779
20913
  "/",
20780
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("sub", { children: shortenPeriod(planPeriod) })
20914
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("sub", { children: shortenPeriod(planPeriod) })
20781
20915
  ] }) })
20782
20916
  ]
20783
20917
  }
20784
20918
  )
20785
20919
  ] }),
20786
- (willAddOnsChange || selectedAddOnsWithPrice.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Flex, { $flexDirection: "column", $gap: "0.5rem", $marginBottom: "1.5rem", children: [
20787
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Box, { $opacity: "0.625", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { $size: 14, children: t3("Add-ons") }) }),
20920
+ (willAddOnsChange || selectedAddOnsWithPrice.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Flex, { $flexDirection: "column", $gap: "0.5rem", $marginBottom: "1.5rem", children: [
20921
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Box, { $opacity: "0.625", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { $size: 14, children: t3("Add-ons") }) }),
20788
20922
  removedAddOns.map((addOn, index) => {
20789
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
20923
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
20790
20924
  Flex,
20791
20925
  {
20792
20926
  $justifyContent: "space-between",
@@ -20796,13 +20930,13 @@ var SubscriptionSidebar = (0, import_react43.forwardRef)(
20796
20930
  $textDecoration: "line-through",
20797
20931
  $color: settings.theme.typography.heading4.color,
20798
20932
  children: [
20799
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { display: "heading4", children: addOn.name }) }),
20800
- typeof addOn.planPrice === "number" && addOn.planPeriod && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Box, { $whiteSpace: "nowrap", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Text, { children: [
20933
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { display: "heading4", children: addOn.name }) }),
20934
+ typeof addOn.planPrice === "number" && addOn.planPeriod && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Box, { $whiteSpace: "nowrap", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Text, { children: [
20801
20935
  formatCurrency(
20802
20936
  addOn.planPrice,
20803
20937
  selectedPlanCurrency
20804
20938
  ),
20805
- addOn.planPeriod !== "one-time" && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("sub", { children: [
20939
+ addOn.planPeriod !== "one-time" && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("sub", { children: [
20806
20940
  "/",
20807
20941
  shortenPeriod(planPeriod)
20808
20942
  ] })
@@ -20814,17 +20948,17 @@ var SubscriptionSidebar = (0, import_react43.forwardRef)(
20814
20948
  }),
20815
20949
  selectedAddOnsWithPrice.map((addOn, index) => {
20816
20950
  const { price: addOnPrice, currency: addOnCurrency } = getAddOnPrice(addOn, planPeriod, currency) || {};
20817
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
20951
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
20818
20952
  Flex,
20819
20953
  {
20820
20954
  $justifyContent: "space-between",
20821
20955
  $alignItems: "center",
20822
20956
  $gap: "1rem",
20823
20957
  children: [
20824
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { display: "heading4", children: addOn.name }) }),
20825
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Box, { $whiteSpace: "nowrap", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Text, { children: [
20958
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { display: "heading4", children: addOn.name }) }),
20959
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Box, { $whiteSpace: "nowrap", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Text, { children: [
20826
20960
  formatCurrency(addOnPrice ?? 0, addOnCurrency),
20827
- addOn.chargeType !== ChargeType.oneTime && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("sub", { children: [
20961
+ addOn.chargeType !== ChargeType.oneTime && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("sub", { children: [
20828
20962
  "/",
20829
20963
  shortenPeriod(planPeriod)
20830
20964
  ] })
@@ -20835,35 +20969,35 @@ var SubscriptionSidebar = (0, import_react43.forwardRef)(
20835
20969
  );
20836
20970
  })
20837
20971
  ] }),
20838
- addedCreditBundles.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Flex, { $flexDirection: "column", $gap: "0.5rem", $marginBottom: "1.5rem", children: [
20839
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Box, { $opacity: "0.625", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { $size: 14, children: t3("Credits") }) }),
20972
+ addedCreditBundles.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Flex, { $flexDirection: "column", $gap: "0.5rem", $marginBottom: "1.5rem", children: [
20973
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Box, { $opacity: "0.625", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { $size: 14, children: t3("Credits") }) }),
20840
20974
  addedCreditBundles.reduce(
20841
20975
  (acc, bundle, index) => {
20842
20976
  const price = typeof bundle.price?.priceDecimal === "string" ? Number(bundle.price.priceDecimal) : typeof bundle.price?.price === "number" ? bundle.price.price : void 0;
20843
20977
  const amount = (bundle.quantity ?? 0) * bundle.count;
20844
20978
  if (price)
20845
20979
  acc.push(
20846
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
20980
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
20847
20981
  Flex,
20848
20982
  {
20849
20983
  $justifyContent: "space-between",
20850
20984
  $alignItems: "center",
20851
20985
  $gap: "1rem",
20852
20986
  children: [
20853
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Box, { children: [
20854
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Text, { display: "heading4", children: [
20987
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Box, { children: [
20988
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Text, { display: "heading4", children: [
20855
20989
  bundle.name,
20856
20990
  " (",
20857
20991
  bundle.count,
20858
20992
  ")"
20859
20993
  ] }) }),
20860
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Text, { children: [
20994
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Text, { children: [
20861
20995
  amount,
20862
20996
  " ",
20863
20997
  getFeatureName(bundle, amount)
20864
20998
  ] }) })
20865
20999
  ] }),
20866
- bundle.count > 0 && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Box, { $whiteSpace: "nowrap", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { children: formatCurrency(
21000
+ bundle.count > 0 && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Box, { $whiteSpace: "nowrap", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { children: formatCurrency(
20867
21001
  price * bundle.count,
20868
21002
  bundle.price?.currency
20869
21003
  ) }) })
@@ -20877,7 +21011,7 @@ var SubscriptionSidebar = (0, import_react43.forwardRef)(
20877
21011
  []
20878
21012
  )
20879
21013
  ] }),
20880
- proration !== 0 && charges && selectedPlanCurrency && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
21014
+ proration !== 0 && charges && selectedPlanCurrency && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
20881
21015
  Proration,
20882
21016
  {
20883
21017
  charges,
@@ -20888,7 +21022,7 @@ var SubscriptionSidebar = (0, import_react43.forwardRef)(
20888
21022
  ]
20889
21023
  }
20890
21024
  ),
20891
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
21025
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
20892
21026
  Flex,
20893
21027
  {
20894
21028
  $flexDirection: "column",
@@ -20897,15 +21031,15 @@ var SubscriptionSidebar = (0, import_react43.forwardRef)(
20897
21031
  $width: "100%",
20898
21032
  $padding: "1.5rem",
20899
21033
  children: [
20900
- discountApplied && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
21034
+ discountApplied && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
20901
21035
  Flex,
20902
21036
  {
20903
21037
  $justifyContent: "space-between",
20904
21038
  $alignItems: "center",
20905
21039
  $gap: "1rem",
20906
21040
  children: [
20907
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Box, { $opacity: "0.625", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { children: t3("Discount") }) }),
20908
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
21041
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Box, { $opacity: "0.625", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { children: t3("Discount") }) }),
21042
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
20909
21043
  Flex,
20910
21044
  {
20911
21045
  $alignItems: "center",
@@ -20915,15 +21049,15 @@ var SubscriptionSidebar = (0, import_react43.forwardRef)(
20915
21049
  $outlineColor: isLightBackground ? "hsla(0, 0%, 0%, 0.15)" : "hsla(0, 0%, 100%, 0.15)",
20916
21050
  $borderRadius: "0.3125rem",
20917
21051
  children: [
20918
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { $size: 0.75 * settings.theme.typography.text.fontSize, children: promoCode }),
20919
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
21052
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { $size: 0.75 * settings.theme.typography.text.fontSize, children: promoCode }),
21053
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
20920
21054
  Box,
20921
21055
  {
20922
21056
  $cursor: "pointer",
20923
21057
  onClick: () => {
20924
21058
  updatePromoCode?.(null);
20925
21059
  },
20926
- children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
21060
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
20927
21061
  Icon3,
20928
21062
  {
20929
21063
  name: "close",
@@ -20939,55 +21073,55 @@ var SubscriptionSidebar = (0, import_react43.forwardRef)(
20939
21073
  ]
20940
21074
  }
20941
21075
  ),
20942
- percentOff > 0 && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
21076
+ percentOff > 0 && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
20943
21077
  Flex,
20944
21078
  {
20945
21079
  $justifyContent: "space-between",
20946
21080
  $alignItems: "center",
20947
21081
  $gap: "1rem",
20948
21082
  children: [
20949
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Box, { $opacity: "0.625", $lineHeight: 1.15, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { children: t3("X% off", { percent: percentOff }) }) }),
20950
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { children: formatCurrency(
21083
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Box, { $opacity: "0.625", $lineHeight: 1.15, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { children: t3("X% off", { percent: percentOff }) }) }),
21084
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { children: formatCurrency(
20951
21085
  newCharges / 100 * percentOff,
20952
21086
  selectedPlanCurrency
20953
21087
  ) }) })
20954
21088
  ]
20955
21089
  }
20956
21090
  ),
20957
- amountOff > 0 && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
21091
+ amountOff > 0 && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
20958
21092
  Flex,
20959
21093
  {
20960
21094
  $justifyContent: "space-between",
20961
21095
  $alignItems: "center",
20962
21096
  $gap: "1rem",
20963
21097
  children: [
20964
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Box, { $opacity: "0.625", $lineHeight: 1.15, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { children: t3("X off", {
21098
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Box, { $opacity: "0.625", $lineHeight: 1.15, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { children: t3("X off", {
20965
21099
  amount: formatCurrency(
20966
21100
  Math.abs(amountOff),
20967
21101
  selectedPlanCurrency
20968
21102
  )
20969
21103
  }) }) }),
20970
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Text, { children: [
21104
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Text, { children: [
20971
21105
  "-",
20972
21106
  formatCurrency(Math.abs(amountOff), selectedPlanCurrency)
20973
21107
  ] }) })
20974
21108
  ]
20975
21109
  }
20976
21110
  ),
20977
- !isCreditOnlyPurchase && subscriptionPrice && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
21111
+ !isCreditOnlyPurchase && subscriptionPrice && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
20978
21112
  Flex,
20979
21113
  {
20980
21114
  $justifyContent: "space-between",
20981
21115
  $alignItems: "center",
20982
21116
  $gap: "1rem",
20983
21117
  children: [
20984
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Box, { $opacity: "0.625", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Text, { children: [
21118
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Box, { $opacity: "0.625", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Text, { children: [
20985
21119
  planPeriod === "year" ? t3("Yearly total") : planPeriod === "quarter" ? t3("Quarterly total") : t3("Monthly total"),
20986
21120
  ":"
20987
21121
  ] }) }),
20988
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Box, { $whiteSpace: "nowrap", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Text, { children: [
21122
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Box, { $whiteSpace: "nowrap", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Text, { children: [
20989
21123
  subscriptionPrice,
20990
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("sub", { children: [
21124
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("sub", { children: [
20991
21125
  "/",
20992
21126
  shortenPeriod(planPeriod)
20993
21127
  ] })
@@ -20995,46 +21129,46 @@ var SubscriptionSidebar = (0, import_react43.forwardRef)(
20995
21129
  ]
20996
21130
  }
20997
21131
  ),
20998
- taxAmount > 0 && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
21132
+ taxAmount > 0 && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
20999
21133
  Flex,
21000
21134
  {
21001
21135
  $justifyContent: "space-between",
21002
21136
  $alignItems: "center",
21003
21137
  $gap: "1rem",
21004
21138
  children: [
21005
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Box, { $opacity: "0.625", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { children: t3("Tax (description):", {
21139
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Box, { $opacity: "0.625", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { children: t3("Tax (description):", {
21006
21140
  description: taxDescription
21007
21141
  }) }) }),
21008
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { children: formatCurrency(taxAmount, selectedPlanCurrency) }) })
21142
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { children: formatCurrency(taxAmount, selectedPlanCurrency) }) })
21009
21143
  ]
21010
21144
  }
21011
21145
  ),
21012
- charges && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
21146
+ charges && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
21013
21147
  Flex,
21014
21148
  {
21015
21149
  $justifyContent: "space-between",
21016
21150
  $alignItems: "center",
21017
21151
  $gap: "1rem",
21018
21152
  children: [
21019
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Box, { $opacity: "0.625", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Text, { children: [
21153
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Box, { $opacity: "0.625", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Text, { children: [
21020
21154
  t3("Due today"),
21021
21155
  ":"
21022
21156
  ] }) }),
21023
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { children: formatCurrency(Math.max(0, dueNow), selectedPlanCurrency) }) })
21157
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { children: formatCurrency(Math.max(0, dueNow), selectedPlanCurrency) }) })
21024
21158
  ]
21025
21159
  }
21026
21160
  ),
21027
- dueNow < 0 && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Flex, { $justifyContent: "space-between", $gap: "1rem", children: [
21028
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Box, { $opacity: "0.625", $lineHeight: 1.15, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Text, { children: [
21161
+ dueNow < 0 && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Flex, { $justifyContent: "space-between", $gap: "1rem", children: [
21162
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Box, { $opacity: "0.625", $lineHeight: 1.15, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Text, { children: [
21029
21163
  t3("Credits to be applied to future invoices"),
21030
21164
  ":"
21031
21165
  ] }) }),
21032
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { children: formatCurrency(Math.abs(dueNow), selectedPlanCurrency) }) })
21166
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { children: formatCurrency(Math.abs(dueNow), selectedPlanCurrency) }) })
21033
21167
  ] }),
21034
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { ref: buttonRef, children: [
21168
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { ref: buttonRef, children: [
21035
21169
  button,
21036
21170
  (0, import_react_dom2.createPortal)(
21037
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
21171
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
21038
21172
  Box,
21039
21173
  {
21040
21174
  $position: "sticky",
@@ -21048,15 +21182,15 @@ var SubscriptionSidebar = (0, import_react43.forwardRef)(
21048
21182
  $borderTopWidth: "1px",
21049
21183
  $borderTopStyle: "solid",
21050
21184
  $borderTopColor: isLightBackground ? "hsla(0, 0%, 0%, 0.1)" : "hsla(0, 0%, 100%, 0.2)",
21051
- children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Box, { $padding: "1rem 1.5rem", children: button })
21185
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Box, { $padding: "1rem 1.5rem", children: button })
21052
21186
  }
21053
21187
  ),
21054
21188
  resolvedPortal
21055
21189
  )
21056
21190
  ] }),
21057
- !isLoading && error && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Flex, { $flexDirection: "column", children: [
21058
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { $weight: 500, $color: "#DB6669", children: error }),
21059
- error === t3("Downgrade not permitted.") && data?.preventSelfServiceDowngrade && data?.preventSelfServiceDowngradeUrl && data?.preventSelfServiceDowngradeButtonText && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
21191
+ !isLoading && error && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Flex, { $flexDirection: "column", children: [
21192
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { $weight: 500, $color: "#DB6669", children: error }),
21193
+ error === t3("Downgrade not permitted.") && data?.preventSelfServiceDowngrade && data?.preventSelfServiceDowngradeUrl && data?.preventSelfServiceDowngradeButtonText && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
21060
21194
  Text,
21061
21195
  {
21062
21196
  as: "a",
@@ -21066,7 +21200,7 @@ var SubscriptionSidebar = (0, import_react43.forwardRef)(
21066
21200
  }
21067
21201
  )
21068
21202
  ] }),
21069
- layout !== "unsubscribe" && !isCreditOnlyPurchase && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Box, { $opacity: "0.625", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { children: willScheduleDowngrade && selectedPlan?.name && billingSubscription ? t3(
21203
+ layout !== "unsubscribe" && !isCreditOnlyPurchase && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Box, { $opacity: "0.625", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { children: willScheduleDowngrade && selectedPlan?.name && billingSubscription ? t3(
21070
21204
  "You will be downgraded at the end of your billing period.",
21071
21205
  {
21072
21206
  plan: selectedPlan.name,
@@ -21147,7 +21281,7 @@ var TieredPricingDetails = ({
21147
21281
 
21148
21282
  // src/components/shared/unsubscribe-dialog/UnsubscribeDialog.tsx
21149
21283
  var import_react45 = require("react");
21150
- var import_jsx_runtime38 = require("react/jsx-runtime");
21284
+ var import_jsx_runtime39 = require("react/jsx-runtime");
21151
21285
  var UnsubscribeDialog = ({ top }) => {
21152
21286
  const { t: t3 } = useTranslation();
21153
21287
  const { data, layout, setLayout, setCheckoutState, clearCheckoutState } = useEmbed();
@@ -21217,7 +21351,7 @@ var UnsubscribeDialog = ({ top }) => {
21217
21351
  element.show();
21218
21352
  }
21219
21353
  }, [layout]);
21220
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
21354
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
21221
21355
  Dialog2,
21222
21356
  {
21223
21357
  ref: setDialog,
@@ -21226,8 +21360,8 @@ var UnsubscribeDialog = ({ top }) => {
21226
21360
  top,
21227
21361
  onClose: handleClose,
21228
21362
  ...!isModal && { open: layout === "unsubscribe" },
21229
- children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(DialogContent2, { children: [
21230
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
21363
+ children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(DialogContent2, { children: [
21364
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
21231
21365
  DialogClose,
21232
21366
  {
21233
21367
  onClose: handleClose,
@@ -21237,7 +21371,7 @@ var UnsubscribeDialog = ({ top }) => {
21237
21371
  $margin: "1rem 0.75rem 0 0"
21238
21372
  }
21239
21373
  ),
21240
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
21374
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
21241
21375
  Flex,
21242
21376
  {
21243
21377
  $flexDirection: "column",
@@ -21247,9 +21381,9 @@ var UnsubscribeDialog = ({ top }) => {
21247
21381
  $padding: "2.5rem",
21248
21382
  $overflow: "auto",
21249
21383
  children: [
21250
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Flex, { $flexDirection: "column", $flexWrap: "wrap", $gap: "0.5rem", children: [
21251
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { as: "h2", display: "heading2", children: t3("Cancel subscription") }),
21252
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Text, { as: "p", children: [
21384
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Flex, { $flexDirection: "column", $flexWrap: "wrap", $gap: "0.5rem", children: [
21385
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Text, { as: "h2", display: "heading2", children: t3("Cancel subscription") }),
21386
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Text, { as: "p", children: [
21253
21387
  t3(
21254
21388
  "You will retain access to your plan until the end of the billing period, on"
21255
21389
  ),
@@ -21259,9 +21393,9 @@ var UnsubscribeDialog = ({ top }) => {
21259
21393
  })
21260
21394
  ] })
21261
21395
  ] }),
21262
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Flex, { $flexDirection: "column", $flexWrap: "wrap", $gap: "0.5rem", children: [
21263
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { as: "p", children: t3("Not ready to cancel?") }),
21264
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
21396
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Flex, { $flexDirection: "column", $flexWrap: "wrap", $gap: "0.5rem", children: [
21397
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Text, { as: "p", children: t3("Not ready to cancel?") }),
21398
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
21265
21399
  Button,
21266
21400
  {
21267
21401
  type: "button",
@@ -21282,7 +21416,7 @@ var UnsubscribeDialog = ({ top }) => {
21282
21416
  ]
21283
21417
  }
21284
21418
  ),
21285
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
21419
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
21286
21420
  SubscriptionSidebar,
21287
21421
  {
21288
21422
  ref: sidebarRef,
@@ -21309,14 +21443,14 @@ var UnsubscribeDialog = ({ top }) => {
21309
21443
  };
21310
21444
 
21311
21445
  // src/components/shared/usage-violation-text/UsageViolationText.tsx
21312
- var import_jsx_runtime39 = require("react/jsx-runtime");
21446
+ var import_jsx_runtime40 = require("react/jsx-runtime");
21313
21447
  var UsageViolationText = ({ violations }) => {
21314
21448
  const { t: t3 } = useTranslation();
21315
21449
  const { settings } = useEmbed();
21316
21450
  if (violations.length === 0) {
21317
21451
  return null;
21318
21452
  }
21319
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
21453
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
21320
21454
  Text,
21321
21455
  {
21322
21456
  $size: 0.875 * settings.theme.typography.text.fontSize,
@@ -21335,11 +21469,11 @@ var UsageViolationText = ({ violations }) => {
21335
21469
  };
21336
21470
 
21337
21471
  // src/components/ui/badge/Badge.tsx
21338
- var import_jsx_runtime40 = require("react/jsx-runtime");
21472
+ var import_jsx_runtime41 = require("react/jsx-runtime");
21339
21473
  var Badge = () => {
21340
21474
  const { t: t3 } = useTranslation();
21341
21475
  const { settings } = useEmbed();
21342
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
21476
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
21343
21477
  Flex,
21344
21478
  {
21345
21479
  as: "a",
@@ -21352,82 +21486,82 @@ var Badge = () => {
21352
21486
  $gridColumn: "1 / -1",
21353
21487
  $color: settings.theme.typography.text.color,
21354
21488
  children: [
21355
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(Text, { $size: 12, children: [
21489
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { $size: 12, children: [
21356
21490
  t3("Powered by"),
21357
21491
  " "
21358
21492
  ] }),
21359
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("svg", { viewBox: "0 0 86 16", width: 86, height: 16, children: [
21360
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
21493
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("svg", { viewBox: "0 0 86 16", width: 86, height: 16, children: [
21494
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
21361
21495
  "path",
21362
21496
  {
21363
21497
  d: "M21.2354 6.16227C21.1796 5.95015 21.0494 5.76779 20.8261 5.61893C20.6028 5.46635 20.3423 5.39564 20.0408 5.39564C19.3151 5.39564 18.7941 5.69708 18.7941 6.2367C18.7941 6.49721 18.9095 6.69073 19.1402 6.81726C19.3635 6.94379 19.732 7.07033 20.2344 7.18569C21.0084 7.37177 21.4922 7.51691 21.9686 7.7402C22.203 7.85557 22.3928 7.97465 22.5305 8.10863C22.7948 8.3803 22.9548 8.74501 22.9362 9.20276C22.9176 9.86147 22.6571 10.375 22.1547 10.7397C21.6523 11.1082 20.9563 11.2905 20.0818 11.2905C19.2072 11.2905 18.5597 11.1268 18.0312 10.8067C17.5065 10.4867 17.2013 10.0215 17.1194 9.41116L18.6192 9.27719C18.6974 9.57491 18.8723 9.7982 19.1514 9.94706C19.4305 10.0959 19.7394 10.1778 20.0818 10.1778C20.4614 10.1778 20.7777 10.0996 21.0308 9.9359C21.2838 9.77959 21.4104 9.56002 21.4104 9.28835C21.4104 8.90876 21.0531 8.61104 20.5991 8.43613C20.3683 8.35053 20.0855 8.27238 19.7468 8.19423C19.2705 8.07886 18.8946 7.97094 18.6155 7.87418C18.3364 7.78486 18.0908 7.66205 17.8712 7.51319C17.4358 7.21547 17.2832 6.8247 17.2832 6.2367C17.2832 5.61521 17.5325 5.13141 18.0312 4.79648C18.5262 4.46526 19.2035 4.29407 20.0669 4.29407C21.5853 4.29407 22.5752 4.9044 22.7389 6.05807L21.228 6.16227H21.2354Z",
21364
21498
  fill: "currentColor"
21365
21499
  }
21366
21500
  ),
21367
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
21501
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
21368
21502
  "path",
21369
21503
  {
21370
21504
  d: "M29.4145 8.9796L30.7803 9.55271C30.49 10.0923 30.0621 10.5129 29.5001 10.8217C28.9382 11.1344 28.3167 11.2944 27.6319 11.2944C26.9472 11.2944 26.3629 11.1567 25.8121 10.8701C25.2613 10.5873 24.8147 10.1742 24.4835 9.6383C24.1523 9.09868 23.9811 8.48835 23.9811 7.79987C23.9811 7.11138 24.1486 6.49361 24.4835 5.95771C24.8147 5.41809 25.2613 5.00873 25.8121 4.72589C26.3629 4.44305 26.9732 4.30164 27.6319 4.30164C28.2906 4.30164 28.9382 4.45794 29.5038 4.77427C30.0658 5.08688 30.4938 5.51113 30.7803 6.05075L29.4145 6.62015C29.0535 5.93539 28.3985 5.56323 27.6319 5.56323C27.0327 5.56323 26.5303 5.77536 26.1135 6.19961C25.6967 6.62387 25.492 7.15977 25.492 7.80731C25.492 8.45486 25.6967 8.99076 26.1135 9.40757C26.5303 9.83182 27.0327 10.0439 27.6319 10.0439C28.3985 10.0439 29.0535 9.66807 29.4145 8.98703V8.9796Z",
21371
21505
  fill: "currentColor"
21372
21506
  }
21373
21507
  ),
21374
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
21508
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
21375
21509
  "path",
21376
21510
  {
21377
21511
  d: "M37.4386 11.2049V7.80341C37.4386 6.35945 36.9139 5.59282 35.697 5.59282C35.0978 5.59282 34.614 5.7975 34.2419 6.21059C33.8623 6.61996 33.6725 7.15214 33.6725 7.80713V11.2086H32.1615V1.9234H33.6725V5.47745C34.1004 4.73315 35.001 4.29773 36.1919 4.29773C37.167 4.29773 37.8666 4.59917 38.302 5.19834C38.7375 5.7975 38.9533 6.66834 38.9533 7.80341V11.2049H37.4349H37.4386Z",
21378
21512
  fill: "currentColor"
21379
21513
  }
21380
21514
  ),
21381
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
21515
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
21382
21516
  "path",
21383
21517
  {
21384
21518
  d: "M46.5692 5.38819C47.2167 6.07295 47.5777 7.1187 47.5107 8.30587H41.8242C41.9284 8.83805 42.1741 9.26602 42.5611 9.59352C42.9481 9.92473 43.4022 10.0885 43.9157 10.0885C44.8052 10.0885 45.5234 9.59724 45.8844 8.78222L47.1795 9.40372C46.8818 9.99172 46.4352 10.4495 45.8509 10.7881C45.2629 11.1268 44.6191 11.2943 43.9157 11.2943C42.9295 11.2943 42.0178 10.9444 41.3516 10.3453C40.6855 9.7461 40.2649 8.83432 40.2649 7.79602C40.2649 6.75771 40.6892 5.84222 41.3516 5.23933C42.0178 4.64017 42.9295 4.29034 43.9157 4.29034C44.9801 4.29034 45.9216 4.69971 46.5692 5.38447V5.38819ZM42.5388 6.00224C42.1592 6.32974 41.921 6.75772 41.8205 7.29734H46.0221C45.9179 6.75772 45.6835 6.3223 45.3039 5.99852C44.9243 5.67847 44.4628 5.51473 43.9195 5.51473C43.3761 5.51473 42.9221 5.67847 42.5425 6.00597L42.5388 6.00224Z",
21385
21519
  fill: "currentColor"
21386
21520
  }
21387
21521
  ),
21388
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
21522
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
21389
21523
  "path",
21390
21524
  {
21391
21525
  d: "M59.7699 5.23933C60.1495 5.86827 60.3132 6.68329 60.3132 7.80347V11.2049H58.8023V7.80347C58.8023 6.35952 58.3371 5.59288 57.2318 5.59288C56.6438 5.59288 56.1861 5.79384 55.8586 6.19577C55.5311 6.60141 55.3673 7.13731 55.3673 7.80347V11.2049H53.8489V7.80347C53.8489 6.35952 53.3838 5.59288 52.2785 5.59288C51.6905 5.59288 51.2327 5.79384 50.9052 6.19577C50.574 6.60141 50.4102 7.13731 50.4102 7.80347V11.2049H48.8993V4.39827H50.3433L50.4102 5.47379C50.8196 4.65878 51.5825 4.29407 52.8106 4.29407C53.9606 4.29407 54.7161 4.78531 55.077 5.76407C55.5199 4.81508 56.4428 4.29407 57.7677 4.29407C58.7093 4.29407 59.3829 4.61412 59.7699 5.23562V5.23933Z",
21392
21526
  fill: "currentColor"
21393
21527
  }
21394
21528
  ),
21395
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
21529
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
21396
21530
  "path",
21397
21531
  {
21398
21532
  d: "M67.4264 5.47382L67.4934 4.3983H68.9373V11.205H67.4934L67.4264 10.1294C67.0282 10.9147 66.1797 11.3092 64.8809 11.3017C63.102 11.3427 61.591 9.79823 61.6283 7.8035C61.591 5.8162 63.102 4.2606 64.8809 4.29782C66.0643 4.29782 67.0096 4.7444 67.4264 5.47754V5.47382ZM66.8049 9.37398C67.2217 8.95717 67.4264 8.43243 67.4264 7.79605C67.4264 7.15967 67.2217 6.64238 66.8049 6.21813C66.3881 5.80132 65.8782 5.58919 65.2828 5.58919C64.6874 5.58919 64.1887 5.80132 63.7719 6.21813C63.355 6.64238 63.1504 7.16711 63.1504 7.79605C63.1504 8.42499 63.355 8.95717 63.7719 9.37398C64.1887 9.79823 64.6911 10.0104 65.2828 10.0104C65.8745 10.0104 66.3881 9.79823 66.8049 9.37398Z",
21399
21533
  fill: "currentColor"
21400
21534
  }
21401
21535
  ),
21402
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
21536
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
21403
21537
  "path",
21404
21538
  {
21405
21539
  d: "M71.3891 2.85757H72.8926V4.39828H74.6455V5.58172H72.8926V8.9683C72.8926 9.5898 73.1048 9.90985 73.5923 9.96568C73.89 10.0252 74.2398 10.0141 74.6455 9.9359V11.1863C74.1989 11.257 73.7858 11.2943 73.4062 11.2943C72.6731 11.2943 72.1595 11.1082 71.8543 10.7323C71.5454 10.3639 71.3891 9.79076 71.3891 9.02041V5.58172H70.4215V4.39828H71.3891V2.85757Z",
21406
21540
  fill: "currentColor"
21407
21541
  }
21408
21542
  ),
21409
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
21543
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
21410
21544
  "path",
21411
21545
  {
21412
21546
  d: "M76.1747 3.15526C75.9923 2.98035 75.903 2.76078 75.903 2.50772C75.903 2.25466 75.9923 2.04997 76.1747 1.86762C76.3496 1.69271 76.5691 1.60339 76.8222 1.60339C77.0753 1.60339 77.2874 1.69271 77.4623 1.86762C77.6372 2.04997 77.7265 2.2621 77.7265 2.50772C77.7265 2.75334 77.6372 2.97291 77.4623 3.15526C77.2874 3.33762 77.0678 3.42694 76.8222 3.42694C76.5766 3.42694 76.3496 3.33762 76.1747 3.15526ZM76.0593 4.39826H77.5777V11.2049H76.0593V4.39826Z",
21413
21547
  fill: "currentColor"
21414
21548
  }
21415
21549
  ),
21416
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
21550
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
21417
21551
  "path",
21418
21552
  {
21419
21553
  d: "M84.3023 8.9796L85.6681 9.55271C85.3778 10.0923 84.9498 10.5129 84.3879 10.8217C83.8259 11.1344 83.2044 11.2944 82.5197 11.2944C81.8349 11.2944 81.2506 11.1567 80.6998 10.8701C80.1491 10.5873 79.7025 10.1742 79.3713 9.6383C79.04 9.09868 78.8689 8.48835 78.8689 7.79987C78.8689 7.11138 79.0363 6.49361 79.3713 5.95771C79.7025 5.41809 80.1528 5.00873 80.6998 4.72589C81.2469 4.44305 81.8609 4.30164 82.5197 4.30164C83.1784 4.30164 83.8259 4.45794 84.3916 4.77427C84.9535 5.08688 85.3815 5.51113 85.6681 6.05075L84.3023 6.62015C83.9413 5.93539 83.2863 5.56323 82.5197 5.56323C81.9205 5.56323 81.4181 5.77536 81.0013 6.19961C80.5845 6.62387 80.3798 7.15977 80.3798 7.80731C80.3798 8.45486 80.5845 8.99076 81.0013 9.40757C81.4181 9.83182 81.9205 10.0439 82.5197 10.0439C83.2863 10.0439 83.9413 9.66807 84.3023 8.98703V8.9796Z",
21420
21554
  fill: "currentColor"
21421
21555
  }
21422
21556
  ),
21423
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
21557
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
21424
21558
  "path",
21425
21559
  {
21426
21560
  d: "M5.93091 10.8141L7.2758 9.41753L3.83719 5.84667C2.98568 4.9624 2.98568 3.52157 3.83719 2.63731C4.68871 1.75305 6.07617 1.75305 6.92769 2.63731L10.3663 6.20817L11.7112 4.81156L8.27258 1.24069C6.67975 -0.413401 4.08513 -0.413401 2.4923 1.24069C0.899472 2.89479 0.899472 5.58919 2.4923 7.24328L5.93091 10.8141Z",
21427
21561
  fill: "currentColor"
21428
21562
  }
21429
21563
  ),
21430
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
21564
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
21431
21565
  "path",
21432
21566
  {
21433
21567
  d: "M6.05827 3.54751C5.68761 3.1626 5.08404 3.1626 4.71338 3.54751C4.34272 3.93243 4.34272 4.55921 4.71338 4.94413L9.02103 9.41746L5.93054 12.6268L1.62288 8.15349C1.25223 7.76857 0.648653 7.76857 0.277994 8.15349C-0.0926647 8.5384 -0.0926647 9.16519 0.277994 9.5501L5.93054 15.4201L11.7108 9.41746L6.05827 3.54751Z",
@@ -21441,9 +21575,9 @@ var Badge = () => {
21441
21575
  };
21442
21576
 
21443
21577
  // src/components/layout/RenderLayout.tsx
21444
- var import_jsx_runtime41 = require("react/jsx-runtime");
21578
+ var import_jsx_runtime42 = require("react/jsx-runtime");
21445
21579
  var Disabled = () => {
21446
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Box, { $width: "max-content", $height: "max-content", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Card, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
21580
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Box, { $width: "max-content", $height: "max-content", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Card, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
21447
21581
  Element,
21448
21582
  {
21449
21583
  as: Flex,
@@ -21452,8 +21586,8 @@ var Disabled = () => {
21452
21586
  $alignItems: "center",
21453
21587
  $whiteSpace: "nowrap",
21454
21588
  children: [
21455
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Box, { $marginBottom: "0.5rem", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { as: "h1", display: "heading1", children: "Portal not found" }) }),
21456
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { as: "p", children: "Please try again later." })
21589
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Box, { $marginBottom: "0.5rem", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { as: "h1", display: "heading1", children: "Portal not found" }) }),
21590
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { as: "p", children: "Please try again later." })
21457
21591
  ]
21458
21592
  }
21459
21593
  ) }) });
@@ -21462,7 +21596,7 @@ var RenderLayout = ({ children }) => {
21462
21596
  const { layout } = useEmbed();
21463
21597
  switch (layout) {
21464
21598
  case "disabled":
21465
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Disabled, {});
21599
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Disabled, {});
21466
21600
  default:
21467
21601
  return children;
21468
21602
  }
@@ -21487,7 +21621,7 @@ var StyledViewport = gt2.div.withConfig({
21487
21621
  `;
21488
21622
 
21489
21623
  // src/components/layout/viewport/Viewport.tsx
21490
- var import_jsx_runtime42 = require("react/jsx-runtime");
21624
+ var import_jsx_runtime43 = require("react/jsx-runtime");
21491
21625
  var Viewport = (0, import_react46.forwardRef)(
21492
21626
  ({ children, portal, ...props }, ref) => {
21493
21627
  portal = portal || document.body;
@@ -21508,21 +21642,21 @@ var Viewport = (0, import_react46.forwardRef)(
21508
21642
  };
21509
21643
  }, []);
21510
21644
  const isBadgeVisible = !data?.capabilities?.badgeVisibility || settings.badge?.visibility !== "hidden";
21511
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
21512
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(StyledViewport, { ref, ...props, children: [
21513
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(RenderLayout, { children }),
21514
- isBadgeVisible && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Badge, {})
21645
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
21646
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(StyledViewport, { ref, ...props, children: [
21647
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(RenderLayout, { children }),
21648
+ isBadgeVisible && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Badge, {})
21515
21649
  ] }),
21516
- layout === "checkout" && (0, import_react_dom3.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(CheckoutDialog, { top }), portal),
21517
- layout === "unsubscribe" && (0, import_react_dom3.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(UnsubscribeDialog, { top }), portal),
21518
- layout === "payment" && (0, import_react_dom3.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(PaymentDialog, { top }), portal)
21650
+ layout === "checkout" && (0, import_react_dom3.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(CheckoutDialog, { top }), portal),
21651
+ layout === "unsubscribe" && (0, import_react_dom3.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(UnsubscribeDialog, { top }), portal),
21652
+ layout === "payment" && (0, import_react_dom3.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(PaymentDialog, { top }), portal)
21519
21653
  ] });
21520
21654
  }
21521
21655
  );
21522
21656
  Viewport.displayName = "Viewport";
21523
21657
 
21524
21658
  // src/components/elements/button/Button.tsx
21525
- var import_jsx_runtime43 = require("react/jsx-runtime");
21659
+ var import_jsx_runtime44 = require("react/jsx-runtime");
21526
21660
  var resolveDesignProps = (props) => {
21527
21661
  return {
21528
21662
  button: {
@@ -21553,7 +21687,7 @@ var ButtonElement = (0, import_react47.forwardRef)(({ children, className, ...re
21553
21687
  variant: "text"
21554
21688
  }
21555
21689
  };
21556
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
21690
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
21557
21691
  Element,
21558
21692
  {
21559
21693
  as: Flex,
@@ -21561,7 +21695,7 @@ var ButtonElement = (0, import_react47.forwardRef)(({ children, className, ...re
21561
21695
  className,
21562
21696
  $flexDirection: "column",
21563
21697
  $gap: "2rem",
21564
- children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
21698
+ children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
21565
21699
  Button,
21566
21700
  {
21567
21701
  as: "a",
@@ -21586,7 +21720,7 @@ var import_react49 = require("react");
21586
21720
 
21587
21721
  // src/components/elements/included-features/UsageDetails.tsx
21588
21722
  var import_react48 = require("react");
21589
- var import_jsx_runtime44 = require("react/jsx-runtime");
21723
+ var import_jsx_runtime45 = require("react/jsx-runtime");
21590
21724
  var UsageDetails = ({ entitlement, layout }) => {
21591
21725
  const {
21592
21726
  allocation,
@@ -21717,7 +21851,7 @@ var UsageDetails = ({ entitlement, layout }) => {
21717
21851
  let index = 0;
21718
21852
  if (priceBehavior === EntitlementPriceBehavior.PayInAdvance && !tiered && typeof period === "string" && typeof price === "number") {
21719
21853
  acc.push(
21720
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react48.Fragment, { children: packageSize > 1 ? t3("$X/Y units/period", {
21854
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react48.Fragment, { children: packageSize > 1 ? t3("$X/Y units/period", {
21721
21855
  cost: formatCurrency(price, currency),
21722
21856
  size: packageSize,
21723
21857
  units: getFeatureName(feature, packageSize),
@@ -21731,7 +21865,7 @@ var UsageDetails = ({ entitlement, layout }) => {
21731
21865
  index += 1;
21732
21866
  } else if ((priceBehavior === EntitlementPriceBehavior.PayAsYouGo || priceBehavior === EntitlementPriceBehavior.Overage || priceBehavior === EntitlementPriceBehavior.Tier || priceBehavior === EntitlementPriceBehavior.CreditBurndown || tiered) && typeof usage === "number") {
21733
21867
  acc.push(
21734
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react48.Fragment, { children: t3("X units used", {
21868
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react48.Fragment, { children: t3("X units used", {
21735
21869
  amount: usage,
21736
21870
  units: getFeatureName(feature, usage)
21737
21871
  }) }, index)
@@ -21740,14 +21874,14 @@ var UsageDetails = ({ entitlement, layout }) => {
21740
21874
  }
21741
21875
  if (typeof cost === "number" && cost > 0) {
21742
21876
  acc.push(
21743
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_react48.Fragment, { children: [
21744
- acc.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_jsx_runtime44.Fragment, { children: " \u2022 " }),
21877
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_react48.Fragment, { children: [
21878
+ acc.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_jsx_runtime45.Fragment, { children: " \u2022 " }),
21745
21879
  formatCurrency(cost, currency)
21746
21880
  ] }, index)
21747
21881
  );
21748
21882
  index += 1;
21749
21883
  if (feature.featureType === FeatureType.Trait && typeof period === "string") {
21750
- acc.push(/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_react48.Fragment, { children: [
21884
+ acc.push(/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_react48.Fragment, { children: [
21751
21885
  "/",
21752
21886
  shortenPeriod(period)
21753
21887
  ] }, index));
@@ -21756,8 +21890,8 @@ var UsageDetails = ({ entitlement, layout }) => {
21756
21890
  }
21757
21891
  if (metricResetAt) {
21758
21892
  acc.push(
21759
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_react48.Fragment, { children: [
21760
- acc.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_jsx_runtime44.Fragment, { children: " \u2022 " }),
21893
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_react48.Fragment, { children: [
21894
+ acc.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_jsx_runtime45.Fragment, { children: " \u2022 " }),
21761
21895
  t3("Resets", {
21762
21896
  date: toPrettyDate(metricResetAt, {
21763
21897
  month: "numeric",
@@ -21796,8 +21930,8 @@ var UsageDetails = ({ entitlement, layout }) => {
21796
21930
  if (!text && !usageText || !feature) {
21797
21931
  return null;
21798
21932
  }
21799
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_jsx_runtime44.Fragment, { children: [
21800
- layout.entitlement.isVisible && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
21933
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
21934
+ layout.entitlement.isVisible && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
21801
21935
  Flex,
21802
21936
  {
21803
21937
  $marginTop: "0.75rem",
@@ -21807,9 +21941,9 @@ var UsageDetails = ({ entitlement, layout }) => {
21807
21941
  $marginTop: 0
21808
21942
  }
21809
21943
  },
21810
- children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { display: layout.entitlement.fontStyle, children: [
21944
+ children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(Text, { display: layout.entitlement.fontStyle, children: [
21811
21945
  text,
21812
- entitlementHasHardLimit(entitlement) && entitlement.allocationType === EntitlementValueType.Numeric && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
21946
+ entitlementHasHardLimit(entitlement) && entitlement.allocationType === EntitlementValueType.Numeric && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
21813
21947
  HardLimitTooltip,
21814
21948
  {
21815
21949
  feature: entitlement.feature,
@@ -21819,7 +21953,7 @@ var UsageDetails = ({ entitlement, layout }) => {
21819
21953
  ] })
21820
21954
  }
21821
21955
  ),
21822
- layout.usage.isVisible && usageText && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
21956
+ layout.usage.isVisible && usageText && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
21823
21957
  Flex,
21824
21958
  {
21825
21959
  $viewport: {
@@ -21827,9 +21961,9 @@ var UsageDetails = ({ entitlement, layout }) => {
21827
21961
  $justifyContent: "end"
21828
21962
  }
21829
21963
  },
21830
- children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { display: layout.usage.fontStyle, children: [
21964
+ children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(Text, { display: layout.usage.fontStyle, children: [
21831
21965
  usageText,
21832
- (priceBehavior === EntitlementPriceBehavior.Tier || tiered) && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
21966
+ (priceBehavior === EntitlementPriceBehavior.Tier || tiered) && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
21833
21967
  PricingTiersTooltip,
21834
21968
  {
21835
21969
  feature,
@@ -21846,7 +21980,7 @@ var UsageDetails = ({ entitlement, layout }) => {
21846
21980
  };
21847
21981
 
21848
21982
  // src/components/elements/included-features/IncludedFeatures.tsx
21849
- var import_jsx_runtime45 = require("react/jsx-runtime");
21983
+ var import_jsx_runtime46 = require("react/jsx-runtime");
21850
21984
  function resolveDesignProps2(props) {
21851
21985
  return {
21852
21986
  // there is a typescript bug with `DeepPartial` so we must cast to `string[] | undefined`
@@ -21921,9 +22055,9 @@ var IncludedFeatures = (0, import_react49.forwardRef)(({ className, ...rest }, r
21921
22055
  }
21922
22056
  const shouldShowExpand = featureListSize > VISIBLE_ENTITLEMENT_COUNT;
21923
22057
  const isExpanded = showCount > VISIBLE_ENTITLEMENT_COUNT;
21924
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(Element, { ref, className, $containerType: "inline-size", children: [
21925
- props.header.isVisible && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Box, { $marginBottom: "1.5rem", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Text, { display: props.header.fontStyle, children: props.header.text }) }),
21926
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
22058
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Element, { ref, className, $containerType: "inline-size", children: [
22059
+ props.header.isVisible && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Box, { $marginBottom: "1.5rem", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Text, { display: props.header.fontStyle, children: props.header.text }) }),
22060
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
21927
22061
  Box,
21928
22062
  {
21929
22063
  $display: "grid",
@@ -21936,8 +22070,8 @@ var IncludedFeatures = (0, import_react49.forwardRef)(({ className, ...rest }, r
21936
22070
  }
21937
22071
  },
21938
22072
  children: featureUsage.slice(0, showCount).map((entitlement, index) => {
21939
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_react49.Fragment, { children: [
21940
- props.icons.isVisible && entitlement.feature?.icon && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
22073
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react49.Fragment, { children: [
22074
+ props.icons.isVisible && entitlement.feature?.icon && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
21941
22075
  Icon3,
21942
22076
  {
21943
22077
  name: entitlement.feature.icon,
@@ -21947,16 +22081,16 @@ var IncludedFeatures = (0, import_react49.forwardRef)(({ className, ...rest }, r
21947
22081
  style: { marginRight: "0.5rem" }
21948
22082
  }
21949
22083
  ),
21950
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
22084
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
21951
22085
  Flex,
21952
22086
  {
21953
22087
  $flexDirection: "column",
21954
22088
  $alignSelf: "baseline",
21955
22089
  $gap: "0.25rem",
21956
22090
  children: [
21957
- entitlement.feature?.name && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Text, { display: props.icons.fontStyle, children: entitlement.feature.name }),
21958
- props.description.isVisible && entitlement.feature?.description && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Text, { display: props.description.fontStyle, children: entitlement.feature.description }),
21959
- props.entitlementExpiration.isVisible && entitlement.entitlementExpirationDate && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
22091
+ entitlement.feature?.name && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Text, { display: props.icons.fontStyle, children: entitlement.feature.name }),
22092
+ props.description.isVisible && entitlement.feature?.description && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Text, { display: props.description.fontStyle, children: entitlement.feature.description }),
22093
+ props.entitlementExpiration.isVisible && entitlement.entitlementExpirationDate && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
21960
22094
  Text,
21961
22095
  {
21962
22096
  as: "em",
@@ -21974,7 +22108,7 @@ var IncludedFeatures = (0, import_react49.forwardRef)(({ className, ...rest }, r
21974
22108
  ]
21975
22109
  }
21976
22110
  ),
21977
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
22111
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
21978
22112
  Flex,
21979
22113
  {
21980
22114
  $gridColumn: "span 2",
@@ -21991,22 +22125,22 @@ var IncludedFeatures = (0, import_react49.forwardRef)(({ className, ...rest }, r
21991
22125
  $marginLeft: 0
21992
22126
  }
21993
22127
  },
21994
- children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(UsageDetails, { entitlement, layout: props })
22128
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(UsageDetails, { entitlement, layout: props })
21995
22129
  }
21996
22130
  )
21997
22131
  ] }, index);
21998
22132
  })
21999
22133
  }
22000
22134
  ),
22001
- shouldShowExpand && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(Flex, { $alignItems: "center", $marginTop: "1rem", children: [
22002
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
22135
+ shouldShowExpand && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Flex, { $alignItems: "center", $marginTop: "1rem", children: [
22136
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
22003
22137
  Icon3,
22004
22138
  {
22005
22139
  name: isExpanded ? "chevron-up" : "chevron-down",
22006
22140
  color: "#D0D0D0"
22007
22141
  }
22008
22142
  ),
22009
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
22143
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
22010
22144
  Text,
22011
22145
  {
22012
22146
  onClick: handleToggleShowAll,
@@ -22022,7 +22156,7 @@ IncludedFeatures.displayName = "IncludedFeatures";
22022
22156
 
22023
22157
  // src/components/elements/invoices/Invoices.tsx
22024
22158
  var import_react50 = require("react");
22025
- var import_jsx_runtime46 = require("react/jsx-runtime");
22159
+ var import_jsx_runtime47 = require("react/jsx-runtime");
22026
22160
  function resolveDesignProps3(props) {
22027
22161
  return {
22028
22162
  header: {
@@ -22125,9 +22259,9 @@ var Invoices = (0, import_react50.forwardRef)(({ className, ...rest }, ref) => {
22125
22259
  if (invoices.length === 0) {
22126
22260
  return null;
22127
22261
  }
22128
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Element, { ref, className, children: [
22129
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Flex, { as: TransitionBox, $justifyContent: "center", $alignItems: "center", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Loader, { $color: settings.theme.primary, $isLoading: isLoading }) }),
22130
- error ? /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
22262
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Element, { ref, className, children: [
22263
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Flex, { as: TransitionBox, $justifyContent: "center", $alignItems: "center", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Loader, { $color: settings.theme.primary, $isLoading: isLoading }) }),
22264
+ error ? /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
22131
22265
  Flex,
22132
22266
  {
22133
22267
  as: TransitionBox,
@@ -22136,8 +22270,8 @@ var Invoices = (0, import_react50.forwardRef)(({ className, ...rest }, ref) => {
22136
22270
  $alignItems: "center",
22137
22271
  $gap: "1rem",
22138
22272
  children: [
22139
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Text, { $weight: 500, $color: "#DB6669", children: t3("There was a problem retrieving your invoices.") }),
22140
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
22273
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Text, { $weight: 500, $color: "#DB6669", children: t3("There was a problem retrieving your invoices.") }),
22274
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
22141
22275
  Button,
22142
22276
  {
22143
22277
  type: "button",
@@ -22150,17 +22284,17 @@ var Invoices = (0, import_react50.forwardRef)(({ className, ...rest }, ref) => {
22150
22284
  )
22151
22285
  ]
22152
22286
  }
22153
- ) : !isLoading && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(TransitionBox, { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Flex, { $flexDirection: "column", $gap: "1rem", children: [
22154
- props.header.isVisible && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Flex, { $justifyContent: "space-between", $alignItems: "center", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Text, { display: props.header.fontStyle, children: t3("Invoices") }) }),
22155
- invoices.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
22156
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Flex, { $flexDirection: "column", $gap: "0.5rem", children: invoices.slice(0, listSize).map(({ date, amount, amountDue, url }, index) => {
22157
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
22287
+ ) : !isLoading && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TransitionBox, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Flex, { $flexDirection: "column", $gap: "1rem", children: [
22288
+ props.header.isVisible && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Flex, { $justifyContent: "space-between", $alignItems: "center", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Text, { display: props.header.fontStyle, children: t3("Invoices") }) }),
22289
+ invoices.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
22290
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Flex, { $flexDirection: "column", $gap: "0.5rem", children: invoices.slice(0, listSize).map(({ date, amount, amountDue, url }, index) => {
22291
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
22158
22292
  Flex,
22159
22293
  {
22160
22294
  $justifyContent: "space-between",
22161
22295
  $alignItems: "center",
22162
22296
  children: [
22163
- props.date.isVisible && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
22297
+ props.date.isVisible && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
22164
22298
  Text,
22165
22299
  {
22166
22300
  display: props.date.fontStyle,
@@ -22174,10 +22308,10 @@ var Invoices = (0, import_react50.forwardRef)(({ className, ...rest }, ref) => {
22174
22308
  children: date
22175
22309
  }
22176
22310
  ),
22177
- props.amount.isVisible && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
22311
+ props.amount.isVisible && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
22178
22312
  Tooltip,
22179
22313
  {
22180
- trigger: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Text, { display: props.amount.fontStyle, children: amount }),
22314
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Text, { display: props.amount.fontStyle, children: amount }),
22181
22315
  content: amountDue < 0 ? t3("Invoice credit tooltip") : t3("Invoice charge tooltip")
22182
22316
  }
22183
22317
  )
@@ -22186,15 +22320,15 @@ var Invoices = (0, import_react50.forwardRef)(({ className, ...rest }, ref) => {
22186
22320
  index
22187
22321
  );
22188
22322
  }) }),
22189
- props.collapse.isVisible && invoices.length > props.limit.number && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Flex, { $alignItems: "center", $gap: "0.5rem", children: [
22190
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
22323
+ props.collapse.isVisible && invoices.length > props.limit.number && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Flex, { $alignItems: "center", $gap: "0.5rem", children: [
22324
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
22191
22325
  Icon3,
22192
22326
  {
22193
22327
  name: `chevron-${listSize === props.limit.number ? "down" : "up"}`,
22194
22328
  color: "#D0D0D0"
22195
22329
  }
22196
22330
  ),
22197
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
22331
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
22198
22332
  Text,
22199
22333
  {
22200
22334
  onClick: toggleListSize,
@@ -22206,7 +22340,7 @@ var Invoices = (0, import_react50.forwardRef)(({ className, ...rest }, ref) => {
22206
22340
  }
22207
22341
  )
22208
22342
  ] })
22209
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Text, { display: "heading2", children: t3("No invoices created yet") })
22343
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Text, { display: "heading2", children: t3("No invoices created yet") })
22210
22344
  ] }) })
22211
22345
  ] });
22212
22346
  });
@@ -22216,7 +22350,7 @@ Invoices.displayName = "Invoices";
22216
22350
  var import_react51 = require("react");
22217
22351
 
22218
22352
  // src/components/elements/metered-features/Meter.tsx
22219
- var import_jsx_runtime47 = require("react/jsx-runtime");
22353
+ var import_jsx_runtime48 = require("react/jsx-runtime");
22220
22354
  var Meter = ({ entitlement }) => {
22221
22355
  const { allocation, priceBehavior, softLimit, usage } = entitlement;
22222
22356
  const limit = softLimit ?? allocation;
@@ -22224,7 +22358,7 @@ var Meter = ({ entitlement }) => {
22224
22358
  return null;
22225
22359
  }
22226
22360
  const progress = (priceBehavior === EntitlementPriceBehavior.Overage && usage > limit ? Math.min(usage, limit) / Math.max(usage, limit) : usage / limit) * 100;
22227
- const meter = /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
22361
+ const meter = /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
22228
22362
  ProgressBar,
22229
22363
  {
22230
22364
  progress,
@@ -22241,7 +22375,7 @@ var Meter = ({ entitlement }) => {
22241
22375
  };
22242
22376
 
22243
22377
  // src/components/elements/metered-features/PriceDetails.tsx
22244
- var import_jsx_runtime48 = require("react/jsx-runtime");
22378
+ var import_jsx_runtime49 = require("react/jsx-runtime");
22245
22379
  var PriceDetails = ({
22246
22380
  entitlement,
22247
22381
  usageDetails,
@@ -22268,7 +22402,7 @@ var PriceDetails = ({
22268
22402
  if (!feature || typeof currentTierPerUnitPrice !== "number") {
22269
22403
  return null;
22270
22404
  }
22271
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
22405
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
22272
22406
  Flex,
22273
22407
  {
22274
22408
  $justifyContent: "space-between",
@@ -22282,28 +22416,28 @@ var PriceDetails = ({
22282
22416
  $borderBottomRightRadius: `${settings.theme.card.borderRadius / TEXT_BASE_SIZE}rem`
22283
22417
  },
22284
22418
  children: [
22285
- priceBehavior === EntitlementPriceBehavior.Overage ? /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { children: [
22419
+ priceBehavior === EntitlementPriceBehavior.Overage ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Text, { children: [
22286
22420
  t3("Additional"),
22287
22421
  ": ",
22288
22422
  formatCurrency(currentTierPerUnitPrice, currency),
22289
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Box, { as: "sub", $whiteSpace: "nowrap", children: [
22423
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Box, { as: "sub", $whiteSpace: "nowrap", children: [
22290
22424
  "/",
22291
- packageSize > 1 && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
22425
+ packageSize > 1 && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
22292
22426
  packageSize,
22293
22427
  " "
22294
22428
  ] }),
22295
22429
  getFeatureName(feature, packageSize),
22296
- feature.featureType === FeatureType.Trait && period && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
22430
+ feature.featureType === FeatureType.Trait && period && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
22297
22431
  "/",
22298
22432
  shortenPeriod(period)
22299
22433
  ] })
22300
22434
  ] })
22301
- ] }) : priceBehavior === EntitlementPriceBehavior.Tier && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { children: [
22435
+ ] }) : priceBehavior === EntitlementPriceBehavior.Tier && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Text, { children: [
22302
22436
  t3("Tier"),
22303
22437
  ": ",
22304
22438
  currentTier?.from || 1,
22305
- typeof currentTier?.to === "number" && (currentTier.from || 1) !== currentTier.to && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_jsx_runtime48.Fragment, { children: currentTier.to === Infinity ? "+" : `\u2013${currentTier.to}` }),
22306
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
22439
+ typeof currentTier?.to === "number" && (currentTier.from || 1) !== currentTier.to && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_jsx_runtime49.Fragment, { children: currentTier.to === Infinity ? "+" : `\u2013${currentTier.to}` }),
22440
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
22307
22441
  PricingTiersTooltip,
22308
22442
  {
22309
22443
  period,
@@ -22314,19 +22448,19 @@ var PriceDetails = ({
22314
22448
  }
22315
22449
  )
22316
22450
  ] }),
22317
- typeof amount === "number" && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_jsx_runtime48.Fragment, { children: priceBehavior === EntitlementPriceBehavior.Overage ? /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { children: [
22451
+ typeof amount === "number" && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_jsx_runtime49.Fragment, { children: priceBehavior === EntitlementPriceBehavior.Overage ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Text, { children: [
22318
22452
  formatNumber(amount),
22319
22453
  " ",
22320
22454
  getFeatureName(feature, amount),
22321
22455
  " \xB7 ",
22322
22456
  formatCurrency(currentTierPerUnitPrice * amount, currency),
22323
- feature.featureType === FeatureType.Trait && typeof period === "string" && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Box, { as: "sub", $whiteSpace: "nowrap", children: [
22457
+ feature.featureType === FeatureType.Trait && typeof period === "string" && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Box, { as: "sub", $whiteSpace: "nowrap", children: [
22324
22458
  "/",
22325
22459
  shortenPeriod(period)
22326
22460
  ] })
22327
- ] }) : priceBehavior === EntitlementPriceBehavior.Tier && typeof cost === "number" && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { children: [
22461
+ ] }) : priceBehavior === EntitlementPriceBehavior.Tier && typeof cost === "number" && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Text, { children: [
22328
22462
  formatCurrency(cost, currency),
22329
- feature.featureType === FeatureType.Trait && typeof period === "string" && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Box, { as: "sub", $whiteSpace: "nowrap", children: [
22463
+ feature.featureType === FeatureType.Trait && typeof period === "string" && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Box, { as: "sub", $whiteSpace: "nowrap", children: [
22330
22464
  "/",
22331
22465
  shortenPeriod(period)
22332
22466
  ] })
@@ -22354,7 +22488,7 @@ var Container2 = gt2.div`
22354
22488
  `;
22355
22489
 
22356
22490
  // src/components/elements/metered-features/MeteredFeatures.tsx
22357
- var import_jsx_runtime49 = require("react/jsx-runtime");
22491
+ var import_jsx_runtime50 = require("react/jsx-runtime");
22358
22492
  var Limit = ({ entitlement, usageDetails, fontStyle }) => {
22359
22493
  const { t: t3 } = useTranslation();
22360
22494
  const { data } = useEmbed();
@@ -22400,9 +22534,9 @@ var Limit = ({ entitlement, usageDetails, fontStyle }) => {
22400
22534
  })
22401
22535
  );
22402
22536
  }
22403
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Text, { display: fontStyle, children: [
22537
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Text, { display: fontStyle, children: [
22404
22538
  acc.join(" \u2022 "),
22405
- entitlementHasHardLimit(entitlement) && entitlement.allocationType === EntitlementValueType.Numeric && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
22539
+ entitlementHasHardLimit(entitlement) && entitlement.allocationType === EntitlementValueType.Numeric && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
22406
22540
  HardLimitTooltip,
22407
22541
  {
22408
22542
  feature: entitlement.feature,
@@ -22480,7 +22614,7 @@ var MeteredFeatures = (0, import_react51.forwardRef)(({ className, ...rest }, re
22480
22614
  const period = getSubscriptionPeriod(data?.company?.billingSubscription) ?? (typeof data?.company?.plan?.planPeriod === "string" ? data.company?.plan?.planPeriod : void 0);
22481
22615
  const canCheckout = data?.capabilities?.checkout ?? false;
22482
22616
  const showCredits = data?.displaySettings?.showCredits ?? true;
22483
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Container2, { ref, className, children: [
22617
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Container2, { ref, className, children: [
22484
22618
  meteredFeatures.reduce((acc, entitlement, index) => {
22485
22619
  if (!entitlement.feature) {
22486
22620
  return acc;
@@ -22489,9 +22623,9 @@ var MeteredFeatures = (0, import_react51.forwardRef)(({ className, ...rest }, re
22489
22623
  const usageDetails = getUsageDetails(entitlement, period);
22490
22624
  const { limit } = usageDetails;
22491
22625
  acc.push(
22492
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Element, { as: Flex, $flexDirection: "column", $gap: "1.5rem", children: [
22493
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Flex, { $gap: "1.5rem", children: [
22494
- props.icon.isVisible && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
22626
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Element, { as: Flex, $flexDirection: "column", $gap: "1.5rem", children: [
22627
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Flex, { $gap: "1.5rem", children: [
22628
+ props.icon.isVisible && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
22495
22629
  Icon3,
22496
22630
  {
22497
22631
  name: feature.icon,
@@ -22500,8 +22634,8 @@ var MeteredFeatures = (0, import_react51.forwardRef)(({ className, ...rest }, re
22500
22634
  rounded: true
22501
22635
  }
22502
22636
  ),
22503
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Flex, { $flexDirection: "column", $gap: "2rem", $flexGrow: 1, children: [
22504
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
22637
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Flex, { $flexDirection: "column", $gap: "2rem", $flexGrow: 1, children: [
22638
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
22505
22639
  Flex,
22506
22640
  {
22507
22641
  ref: (el) => {
@@ -22512,31 +22646,31 @@ var MeteredFeatures = (0, import_react51.forwardRef)(({ className, ...rest }, re
22512
22646
  $flexWrap: "wrap",
22513
22647
  $gap: "1rem",
22514
22648
  children: [
22515
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Flex, { $flexDirection: "column", $gap: "0.5rem", $flexGrow: 1, children: [
22516
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { display: props.header.fontStyle, children: feature.name }) }),
22517
- props.description.isVisible && feature.description && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { display: props.description.fontStyle, children: feature.description }) })
22649
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Flex, { $flexDirection: "column", $gap: "0.5rem", $flexGrow: 1, children: [
22650
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { display: props.header.fontStyle, children: feature.name }) }),
22651
+ props.description.isVisible && feature.description && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { display: props.description.fontStyle, children: feature.description }) })
22518
22652
  ] }),
22519
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
22653
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
22520
22654
  Box,
22521
22655
  {
22522
22656
  $flexBasis: "min-content",
22523
22657
  $flexGrow: 1,
22524
22658
  $textAlign: shouldWrapChildren ? "left" : "right",
22525
22659
  children: [
22526
- props.usage.isVisible && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Box, { $whiteSpace: "nowrap", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { display: props.usage.fontStyle, children: priceBehavior === EntitlementPriceBehavior.PayInAdvance ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
22527
- typeof limit === "number" && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
22660
+ props.usage.isVisible && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Box, { $whiteSpace: "nowrap", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { display: props.usage.fontStyle, children: priceBehavior === EntitlementPriceBehavior.PayInAdvance ? /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
22661
+ typeof limit === "number" && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
22528
22662
  formatNumber(limit),
22529
22663
  " "
22530
22664
  ] }),
22531
22665
  getFeatureName(feature, limit)
22532
- ] }) : typeof usage === "number" && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
22666
+ ] }) : typeof usage === "number" && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
22533
22667
  formatNumber(usage),
22534
22668
  " ",
22535
22669
  getFeatureName(feature, usage),
22536
22670
  " ",
22537
22671
  t3("used")
22538
22672
  ] }) }) }),
22539
- props.allocation.isVisible && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
22673
+ props.allocation.isVisible && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
22540
22674
  Limit,
22541
22675
  {
22542
22676
  entitlement,
@@ -22550,8 +22684,8 @@ var MeteredFeatures = (0, import_react51.forwardRef)(({ className, ...rest }, re
22550
22684
  ]
22551
22685
  }
22552
22686
  ),
22553
- props.isVisible && priceBehavior !== EntitlementPriceBehavior.PayAsYouGo && priceBehavior !== EntitlementPriceBehavior.CreditBurndown && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Meter, { entitlement }),
22554
- canCheckout && priceBehavior === EntitlementPriceBehavior.PayInAdvance && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
22687
+ props.isVisible && priceBehavior !== EntitlementPriceBehavior.PayAsYouGo && priceBehavior !== EntitlementPriceBehavior.CreditBurndown && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Meter, { entitlement }),
22688
+ canCheckout && priceBehavior === EntitlementPriceBehavior.PayInAdvance && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
22555
22689
  Button,
22556
22690
  {
22557
22691
  type: "button",
@@ -22564,7 +22698,7 @@ var MeteredFeatures = (0, import_react51.forwardRef)(({ className, ...rest }, re
22564
22698
  )
22565
22699
  ] })
22566
22700
  ] }),
22567
- (priceBehavior === EntitlementPriceBehavior.Overage || priceBehavior === EntitlementPriceBehavior.Tier) && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
22701
+ (priceBehavior === EntitlementPriceBehavior.Overage || priceBehavior === EntitlementPriceBehavior.Tier) && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
22568
22702
  PriceDetails,
22569
22703
  {
22570
22704
  entitlement,
@@ -22578,9 +22712,9 @@ var MeteredFeatures = (0, import_react51.forwardRef)(({ className, ...rest }, re
22578
22712
  }, []),
22579
22713
  showCredits && creditGroups.map((credit, index) => {
22580
22714
  const isExpanded = creditVisibility.find(({ id }) => credit.id === id)?.isExpanded ?? false;
22581
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Element, { as: Flex, $flexDirection: "column", $gap: "1rem", children: [
22582
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Flex, { $gap: "1.5rem", children: [
22583
- props.icon.isVisible && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
22715
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Element, { as: Flex, $flexDirection: "column", $gap: "1rem", children: [
22716
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Flex, { $gap: "1.5rem", children: [
22717
+ props.icon.isVisible && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
22584
22718
  Icon3,
22585
22719
  {
22586
22720
  name: credit.icon,
@@ -22589,13 +22723,13 @@ var MeteredFeatures = (0, import_react51.forwardRef)(({ className, ...rest }, re
22589
22723
  rounded: true
22590
22724
  }
22591
22725
  ),
22592
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Flex, { $flexDirection: "column", $gap: "2rem", $flexGrow: 1, children: [
22593
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Flex, { $flexWrap: "wrap", $gap: "1rem", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Flex, { $flexDirection: "column", $gap: "0.5rem", $flexGrow: 1, children: [
22594
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { display: props.header.fontStyle, children: credit.name }) }),
22595
- props.description.isVisible && credit.description && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { display: props.description.fontStyle, children: credit.description }) })
22726
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Flex, { $flexDirection: "column", $gap: "2rem", $flexGrow: 1, children: [
22727
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Flex, { $flexWrap: "wrap", $gap: "1rem", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Flex, { $flexDirection: "column", $gap: "0.5rem", $flexGrow: 1, children: [
22728
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { display: props.header.fontStyle, children: credit.name }) }),
22729
+ props.description.isVisible && credit.description && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { display: props.description.fontStyle, children: credit.description }) })
22596
22730
  ] }) }),
22597
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Flex, { $gap: "1rem", children: [
22598
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
22731
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Flex, { $gap: "1rem", children: [
22732
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
22599
22733
  ProgressBar,
22600
22734
  {
22601
22735
  progress: credit.total.used / credit.total.value * 100,
@@ -22606,7 +22740,7 @@ var MeteredFeatures = (0, import_react51.forwardRef)(({ className, ...rest }, re
22606
22740
  )]
22607
22741
  }
22608
22742
  ),
22609
- canCheckout && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
22743
+ canCheckout && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
22610
22744
  Button,
22611
22745
  {
22612
22746
  type: "button",
@@ -22621,12 +22755,12 @@ var MeteredFeatures = (0, import_react51.forwardRef)(({ className, ...rest }, re
22621
22755
  ] })
22622
22756
  ] })
22623
22757
  ] }),
22624
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
22758
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
22625
22759
  Box,
22626
22760
  {
22627
22761
  $width: `calc(100% + ${2 * settings.theme.card.padding / TEXT_BASE_SIZE}rem)`,
22628
22762
  $margin: `0 0 0 -${settings.theme.card.padding / TEXT_BASE_SIZE}rem`,
22629
- children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
22763
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
22630
22764
  TransitionBox,
22631
22765
  {
22632
22766
  $backgroundColor: isLightBackground ? "hsla(0, 0%, 0%, 0.0375)" : "hsla(0, 0%, 100%, 0.075)",
@@ -22634,19 +22768,19 @@ var MeteredFeatures = (0, import_react51.forwardRef)(({ className, ...rest }, re
22634
22768
  children: credit.grants.map((grant, index2) => {
22635
22769
  const paddingX = settings.theme.card.padding / TEXT_BASE_SIZE;
22636
22770
  const padding = index2 > 0 ? `0 ${paddingX}rem 1rem` : `1rem ${paddingX}rem`;
22637
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Box, { $display: "table-row", children: grant.grantReason === BillingCreditGrantReason.Plan ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
22638
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Box, { $display: "table-cell", $padding: padding, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { children: t3("X items included in plan", {
22771
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Box, { $display: "table-row", children: grant.grantReason === BillingCreditGrantReason.Plan ? /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
22772
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Box, { $display: "table-cell", $padding: padding, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { children: t3("X items included in plan", {
22639
22773
  amount: grant.quantity,
22640
22774
  item: getFeatureName(credit, grant.quantity)
22641
22775
  }) }) }),
22642
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
22776
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
22643
22777
  Box,
22644
22778
  {
22645
22779
  $display: "table-cell",
22646
22780
  $padding: padding,
22647
22781
  $textAlign: "right",
22648
22782
  $whiteSpace: "nowrap",
22649
- children: grant.expiresAt && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { children: t3("Resets", {
22783
+ children: grant.expiresAt && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { children: t3("Resets", {
22650
22784
  date: toPrettyDate(
22651
22785
  modifyDate(grant.expiresAt, 1),
22652
22786
  {
@@ -22658,8 +22792,8 @@ var MeteredFeatures = (0, import_react51.forwardRef)(({ className, ...rest }, re
22658
22792
  }) })
22659
22793
  }
22660
22794
  )
22661
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
22662
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Box, { $display: "table-cell", $padding: padding, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { children: grant.grantReason === BillingCreditGrantReason.Purchased ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_jsx_runtime49.Fragment, { children: t3("X item bundle", {
22795
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
22796
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Box, { $display: "table-cell", $padding: padding, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { children: grant.grantReason === BillingCreditGrantReason.Purchased ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_jsx_runtime50.Fragment, { children: t3("X item bundle", {
22663
22797
  amount: grant.quantity,
22664
22798
  item: getFeatureName(credit, 1),
22665
22799
  createdAt: toPrettyDate(grant.createdAt, {
@@ -22667,7 +22801,7 @@ var MeteredFeatures = (0, import_react51.forwardRef)(({ className, ...rest }, re
22667
22801
  month: "2-digit",
22668
22802
  year: "2-digit"
22669
22803
  })
22670
- }) }) : grant.grantReason === BillingCreditGrantReason.BillingCreditAutoTopup ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_jsx_runtime49.Fragment, { children: t3("X item auto-topup", {
22804
+ }) }) : grant.grantReason === BillingCreditGrantReason.BillingCreditAutoTopup ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_jsx_runtime50.Fragment, { children: t3("X item auto-topup", {
22671
22805
  amount: grant.quantity,
22672
22806
  item: getFeatureName(
22673
22807
  credit,
@@ -22678,7 +22812,7 @@ var MeteredFeatures = (0, import_react51.forwardRef)(({ className, ...rest }, re
22678
22812
  month: "2-digit",
22679
22813
  year: "2-digit"
22680
22814
  })
22681
- }) }) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_jsx_runtime49.Fragment, { children: t3("X item grant", {
22815
+ }) }) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_jsx_runtime50.Fragment, { children: t3("X item grant", {
22682
22816
  amount: grant.quantity,
22683
22817
  item: getFeatureName(
22684
22818
  credit,
@@ -22690,14 +22824,14 @@ var MeteredFeatures = (0, import_react51.forwardRef)(({ className, ...rest }, re
22690
22824
  year: "2-digit"
22691
22825
  })
22692
22826
  }) }) }) }),
22693
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
22827
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
22694
22828
  Box,
22695
22829
  {
22696
22830
  $display: "table-cell",
22697
22831
  $padding: padding,
22698
22832
  $textAlign: "right",
22699
22833
  $whiteSpace: "nowrap",
22700
- children: grant.expiresAt && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { children: t3("Expires", {
22834
+ children: grant.expiresAt && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { children: t3("Expires", {
22701
22835
  date: toPrettyDate(
22702
22836
  modifyDate(grant.expiresAt, 1),
22703
22837
  {
@@ -22715,8 +22849,8 @@ var MeteredFeatures = (0, import_react51.forwardRef)(({ className, ...rest }, re
22715
22849
  )
22716
22850
  }
22717
22851
  ),
22718
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Flex, { $gap: "0.25rem", children: [
22719
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
22852
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Flex, { $gap: "0.25rem", children: [
22853
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
22720
22854
  Icon3,
22721
22855
  {
22722
22856
  name: "chevron-down",
@@ -22727,7 +22861,7 @@ var MeteredFeatures = (0, import_react51.forwardRef)(({ className, ...rest }, re
22727
22861
  }
22728
22862
  }
22729
22863
  ),
22730
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
22864
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
22731
22865
  Text,
22732
22866
  {
22733
22867
  onClick: () => toggleBalanceDetails(credit.id),
@@ -22747,7 +22881,7 @@ var import_react53 = require("react");
22747
22881
 
22748
22882
  // src/components/elements/payment-method/PaymentMethodElement.tsx
22749
22883
  var import_react52 = require("react");
22750
- var import_jsx_runtime50 = require("react/jsx-runtime");
22884
+ var import_jsx_runtime51 = require("react/jsx-runtime");
22751
22885
  var PaymentElement2 = ({
22752
22886
  iconName,
22753
22887
  iconTitle,
@@ -22755,8 +22889,8 @@ var PaymentElement2 = ({
22755
22889
  paymentLast4
22756
22890
  }) => {
22757
22891
  const { settings } = useEmbed();
22758
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Flex, { $flexDirection: "row", $alignItems: "center", $gap: "0.5rem", children: [
22759
- iconName && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
22892
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(Flex, { $flexDirection: "row", $alignItems: "center", $gap: "0.5rem", children: [
22893
+ iconName && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
22760
22894
  Icon3,
22761
22895
  {
22762
22896
  name: iconName,
@@ -22764,15 +22898,15 @@ var PaymentElement2 = ({
22764
22898
  color: settings.theme.typography.text.color
22765
22899
  }
22766
22900
  ),
22767
- (label || paymentLast4) && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Box, { $flexGrow: 1, children: [
22768
- label && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { children: label }),
22901
+ (label || paymentLast4) && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(Box, { $flexGrow: 1, children: [
22902
+ label && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Text, { children: label }),
22769
22903
  " ",
22770
- paymentLast4 && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { children: paymentLast4 })
22904
+ paymentLast4 && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Text, { children: paymentLast4 })
22771
22905
  ] })
22772
22906
  ] });
22773
22907
  };
22774
22908
  var EmptyPaymentElement = () => {
22775
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Flex, { $flexDirection: "row", $alignItems: "center", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Flex, { $alignItems: "center", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Box, { $lineHeight: 1, children: t("No payment method added yet") }) }) }) });
22909
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Text, { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Flex, { $flexDirection: "row", $alignItems: "center", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Flex, { $alignItems: "center", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Box, { $lineHeight: 1, children: t("No payment method added yet") }) }) }) });
22776
22910
  };
22777
22911
  var getPaymentMethodData = ({
22778
22912
  accountLast4,
@@ -22838,12 +22972,12 @@ var PaymentMethodElement = ({
22838
22972
  const { t: t3 } = useTranslation();
22839
22973
  const isLightBackground = useIsLightBackground();
22840
22974
  const sizeFactor = size === "lg" ? 1.5 : size === "md" ? 1 : 0.5;
22841
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Flex, { $flexDirection: "column", $gap: `${sizeFactor}rem`, children: [
22842
- props.header.isVisible && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Flex, { $justifyContent: "space-between", $alignItems: "center", children: [
22843
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { display: props.header.fontStyle, children: t3("Payment Method") }),
22844
- props.functions.showExpiration && typeof monthsToExpiration === "number" && monthsToExpiration < 4 && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { $size: 14, $color: "#DB6769", children: monthsToExpiration > 0 ? t3("Expires in X months", { months: monthsToExpiration }) : t3("Expired") })
22975
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(Flex, { $flexDirection: "column", $gap: `${sizeFactor}rem`, children: [
22976
+ props.header.isVisible && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(Flex, { $justifyContent: "space-between", $alignItems: "center", children: [
22977
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Text, { display: props.header.fontStyle, children: t3("Payment Method") }),
22978
+ props.functions.showExpiration && typeof monthsToExpiration === "number" && monthsToExpiration < 4 && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Text, { $size: 14, $color: "#DB6769", children: monthsToExpiration > 0 ? t3("Expires in X months", { months: monthsToExpiration }) : t3("Expired") })
22845
22979
  ] }),
22846
- /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
22980
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
22847
22981
  Flex,
22848
22982
  {
22849
22983
  $justifyContent: "space-between",
@@ -22852,8 +22986,8 @@ var PaymentMethodElement = ({
22852
22986
  $padding: `${sizeFactor / 2.25}rem ${sizeFactor}rem`,
22853
22987
  $borderRadius: "9999px",
22854
22988
  children: [
22855
- paymentMethod ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(PaymentElement2, { ...getPaymentMethodData(paymentMethod) }) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(EmptyPaymentElement, {}),
22856
- onRemove && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
22989
+ paymentMethod ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(PaymentElement2, { ...getPaymentMethodData(paymentMethod) }) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(EmptyPaymentElement, {}),
22990
+ onRemove && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
22857
22991
  Text,
22858
22992
  {
22859
22993
  onClick: onRemove,
@@ -22863,7 +22997,7 @@ var PaymentMethodElement = ({
22863
22997
  children: t3("Remove")
22864
22998
  }
22865
22999
  ),
22866
- props.functions.allowEdit && onEdit && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
23000
+ props.functions.allowEdit && onEdit && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
22867
23001
  Text,
22868
23002
  {
22869
23003
  onClick: onEdit,
@@ -22897,7 +23031,7 @@ var PaymentListElement = ({
22897
23031
  }
22898
23032
  return `${cardExpMonth}/${formatedYear}`;
22899
23033
  }, [paymentMethod]);
22900
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
23034
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
22901
23035
  Flex,
22902
23036
  {
22903
23037
  $flexDirection: "row",
@@ -22909,7 +23043,7 @@ var PaymentListElement = ({
22909
23043
  $borderStyle: "solid",
22910
23044
  $borderColor: isLightBackground ? "hsla(0, 0%, 0%, 0.175)" : "hsla(0, 0%, 100%, 0.175)",
22911
23045
  children: [
22912
- iconName && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
23046
+ iconName && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
22913
23047
  Icon3,
22914
23048
  {
22915
23049
  name: iconName,
@@ -22917,20 +23051,20 @@ var PaymentListElement = ({
22917
23051
  color: settings.theme.typography.text.color
22918
23052
  }
22919
23053
  ),
22920
- (label || paymentLast4) && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Box, { $flexGrow: 1, children: [
22921
- label && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { children: label }),
23054
+ (label || paymentLast4) && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(Box, { $flexGrow: 1, children: [
23055
+ label && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Text, { children: label }),
22922
23056
  " ",
22923
- paymentLast4 && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { children: paymentLast4 })
23057
+ paymentLast4 && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Text, { children: paymentLast4 })
22924
23058
  ] }),
22925
- expirationDate && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
23059
+ expirationDate && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
22926
23060
  Box,
22927
23061
  {
22928
23062
  $flexGrow: 1,
22929
23063
  $color: isLightBackground ? "hsla(0, 0%, 0%, 0.375)" : "hsla(0, 0%, 100%, 0.375)",
22930
- children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { children: t("Expires", { date: expirationDate }) })
23064
+ children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Text, { children: t("Expires", { date: expirationDate }) })
22931
23065
  }
22932
23066
  ),
22933
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
23067
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
22934
23068
  Text,
22935
23069
  {
22936
23070
  onClick: () => {
@@ -22943,7 +23077,7 @@ var PaymentListElement = ({
22943
23077
  children: t("Set default")
22944
23078
  }
22945
23079
  ) }),
22946
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
23080
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
22947
23081
  Icon3,
22948
23082
  {
22949
23083
  tabIndex: 0,
@@ -22965,7 +23099,7 @@ var PaymentListElement = ({
22965
23099
  };
22966
23100
 
22967
23101
  // src/components/elements/payment-method/PaymentMethod.tsx
22968
- var import_jsx_runtime51 = require("react/jsx-runtime");
23102
+ var import_jsx_runtime52 = require("react/jsx-runtime");
22969
23103
  var resolveDesignProps5 = (props) => {
22970
23104
  return {
22971
23105
  header: {
@@ -23000,7 +23134,7 @@ var PaymentMethod = (0, import_react53.forwardRef)(({ children, className, porta
23000
23134
  monthsToExpiration: monthsToExpiration2
23001
23135
  };
23002
23136
  }, [data?.company?.defaultPaymentMethod, data?.subscription?.paymentMethod]);
23003
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Element, { ref, className, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
23137
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Element, { ref, className, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
23004
23138
  PaymentMethodElement,
23005
23139
  {
23006
23140
  paymentMethod,
@@ -23069,7 +23203,7 @@ var registerWrapper = function registerWrapper2(stripe, startTime) {
23069
23203
  }
23070
23204
  stripe._registerWrapper({
23071
23205
  name: "stripe-js",
23072
- version: "9.6.0",
23206
+ version: "9.7.0",
23073
23207
  startTime
23074
23208
  });
23075
23209
  };
@@ -23147,7 +23281,7 @@ var initStripe = function initStripe2(maybeStripe, args, startTime) {
23147
23281
  var version = runtimeVersionToUrlVersion(maybeStripe.version);
23148
23282
  var expectedVersion = RELEASE_TRAIN;
23149
23283
  if (isTestKey && version !== expectedVersion) {
23150
- console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("9.6.0", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
23284
+ console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("9.7.0", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
23151
23285
  }
23152
23286
  var stripe = maybeStripe.apply(void 0, args);
23153
23287
  registerWrapper(stripe, startTime);
@@ -23185,7 +23319,7 @@ var loadStripe = function loadStripe2() {
23185
23319
 
23186
23320
  // src/components/elements/payment-method/PaymentMethodDetails.tsx
23187
23321
  var import_react54 = require("react");
23188
- var import_jsx_runtime52 = require("react/jsx-runtime");
23322
+ var import_jsx_runtime53 = require("react/jsx-runtime");
23189
23323
  var resolveDesignProps6 = () => {
23190
23324
  return {
23191
23325
  header: {
@@ -23357,7 +23491,7 @@ var PaymentMethodDetails = ({
23357
23491
  showPaymentForm,
23358
23492
  initializePaymentMethod
23359
23493
  ]);
23360
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
23494
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
23361
23495
  Flex,
23362
23496
  {
23363
23497
  $position: "relative",
@@ -23365,7 +23499,7 @@ var PaymentMethodDetails = ({
23365
23499
  $flexGrow: 1,
23366
23500
  $gap: "1.5rem",
23367
23501
  children: [
23368
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
23502
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
23369
23503
  Flex,
23370
23504
  {
23371
23505
  $position: "absolute",
@@ -23374,7 +23508,7 @@ var PaymentMethodDetails = ({
23374
23508
  $alignItems: "center",
23375
23509
  $width: "100%",
23376
23510
  $height: "100%",
23377
- children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
23511
+ children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
23378
23512
  Loader,
23379
23513
  {
23380
23514
  $color: settings.theme.primary,
@@ -23384,7 +23518,7 @@ var PaymentMethodDetails = ({
23384
23518
  )
23385
23519
  }
23386
23520
  ),
23387
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
23521
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
23388
23522
  Flex,
23389
23523
  {
23390
23524
  $zIndex: isLoading || isConfirmingPayment ? 0 : 1,
@@ -23401,7 +23535,7 @@ var PaymentMethodDetails = ({
23401
23535
  }
23402
23536
  },
23403
23537
  children: [
23404
- setupIntent && showPaymentForm && stripe ? /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
23538
+ setupIntent && showPaymentForm && stripe ? /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
23405
23539
  import_react_stripe_js2.Elements,
23406
23540
  {
23407
23541
  stripe,
@@ -23431,7 +23565,7 @@ var PaymentMethodDetails = ({
23431
23565
  clientSecret: setupIntent?.setupIntentClientSecret
23432
23566
  },
23433
23567
  children: [
23434
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
23568
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
23435
23569
  PaymentForm,
23436
23570
  {
23437
23571
  financeData,
@@ -23442,7 +23576,7 @@ var PaymentMethodDetails = ({
23442
23576
  }
23443
23577
  }
23444
23578
  ),
23445
- currentPaymentMethod && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
23579
+ currentPaymentMethod && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
23446
23580
  Text,
23447
23581
  {
23448
23582
  onClick: focusExistingPaymentMethods,
@@ -23455,8 +23589,8 @@ var PaymentMethodDetails = ({
23455
23589
  ) })
23456
23590
  ]
23457
23591
  }
23458
- ) : /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Flex, { $flexDirection: "column", $gap: "2rem", children: [
23459
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
23592
+ ) : /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(Flex, { $flexDirection: "column", $gap: "2rem", children: [
23593
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
23460
23594
  PaymentMethodElement,
23461
23595
  {
23462
23596
  paymentMethod: currentPaymentMethod,
@@ -23469,8 +23603,8 @@ var PaymentMethodDetails = ({
23469
23603
  ...props
23470
23604
  }
23471
23605
  ),
23472
- paymentMethods.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Flex, { $alignItems: "center", $gap: "0.5rem", children: [
23473
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
23606
+ paymentMethods.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(Flex, { $alignItems: "center", $gap: "0.5rem", children: [
23607
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
23474
23608
  Text,
23475
23609
  {
23476
23610
  onClick: toggleShowPaymentMethods,
@@ -23481,7 +23615,7 @@ var PaymentMethodDetails = ({
23481
23615
  children: t3("Choose different payment method")
23482
23616
  }
23483
23617
  ),
23484
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
23618
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
23485
23619
  Icon3,
23486
23620
  {
23487
23621
  name: showDifferentPaymentMethods ? "chevron-up" : "chevron-down",
@@ -23489,10 +23623,10 @@ var PaymentMethodDetails = ({
23489
23623
  }
23490
23624
  )
23491
23625
  ] }),
23492
- showDifferentPaymentMethods && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Flex, { $flexDirection: "column", $gap: "2rem", $marginTop: "-1rem", children: [
23493
- paymentMethods.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Flex, { $flexDirection: "column", $overflow: "auto", children: (paymentMethods.filter(
23626
+ showDifferentPaymentMethods && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(Flex, { $flexDirection: "column", $gap: "2rem", $marginTop: "-1rem", children: [
23627
+ paymentMethods.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Flex, { $flexDirection: "column", $overflow: "auto", children: (paymentMethods.filter(
23494
23628
  (paymentMethod) => paymentMethod.id !== currentPaymentMethod?.id
23495
- ) || []).map((paymentMethod) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
23629
+ ) || []).map((paymentMethod) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
23496
23630
  PaymentListElement,
23497
23631
  {
23498
23632
  paymentMethod,
@@ -23501,7 +23635,7 @@ var PaymentMethodDetails = ({
23501
23635
  },
23502
23636
  paymentMethod.id
23503
23637
  )) }),
23504
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
23638
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
23505
23639
  Button,
23506
23640
  {
23507
23641
  type: "button",
@@ -23516,7 +23650,7 @@ var PaymentMethodDetails = ({
23516
23650
  )
23517
23651
  ] })
23518
23652
  ] }),
23519
- !isLoading && error && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { $weight: 500, $color: "#DB6669", children: error }) })
23653
+ !isLoading && error && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Text, { $weight: 500, $color: "#DB6669", children: error }) })
23520
23654
  ]
23521
23655
  }
23522
23656
  )
@@ -23529,10 +23663,10 @@ var PaymentMethodDetails = ({
23529
23663
  var import_react56 = require("react");
23530
23664
 
23531
23665
  // src/components/elements/plan-manager/AddOn.tsx
23532
- var import_jsx_runtime53 = require("react/jsx-runtime");
23666
+ var import_jsx_runtime54 = require("react/jsx-runtime");
23533
23667
  var AddOn = ({ addOn, currency, period, layout }) => {
23534
23668
  const resolvedPeriod = addOn.planPeriod === "one-time" ? addOn.planPeriod : period ?? addOn.planPeriod;
23535
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
23669
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
23536
23670
  Flex,
23537
23671
  {
23538
23672
  $justifyContent: "space-between",
@@ -23540,10 +23674,10 @@ var AddOn = ({ addOn, currency, period, layout }) => {
23540
23674
  $flexWrap: "wrap",
23541
23675
  $gap: "1rem",
23542
23676
  children: [
23543
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Text, { display: layout.addOns.fontStyle, children: addOn.name }),
23544
- typeof addOn.planPrice === "number" && resolvedPeriod && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(Text, { children: [
23677
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Text, { display: layout.addOns.fontStyle, children: addOn.name }),
23678
+ typeof addOn.planPrice === "number" && resolvedPeriod && /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(Text, { children: [
23545
23679
  formatCurrency(addOn.planPrice, currency),
23546
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("sub", { children: resolvedPeriod === "one-time" ? shortenPeriod(resolvedPeriod) : `/${shortenPeriod(resolvedPeriod)}` })
23680
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("sub", { children: resolvedPeriod === "one-time" ? shortenPeriod(resolvedPeriod) : `/${shortenPeriod(resolvedPeriod)}` })
23547
23681
  ] })
23548
23682
  ]
23549
23683
  }
@@ -23552,7 +23686,7 @@ var AddOn = ({ addOn, currency, period, layout }) => {
23552
23686
 
23553
23687
  // src/components/elements/plan-manager/UsageDetails.tsx
23554
23688
  var import_react55 = require("react");
23555
- var import_jsx_runtime54 = require("react/jsx-runtime");
23689
+ var import_jsx_runtime55 = require("react/jsx-runtime");
23556
23690
  var UsageDetails2 = ({
23557
23691
  entitlement,
23558
23692
  period,
@@ -23574,30 +23708,30 @@ var UsageDetails2 = ({
23574
23708
  const acc = [];
23575
23709
  let index = 0;
23576
23710
  if (entitlement.priceBehavior === EntitlementPriceBehavior.Overage) {
23577
- acc.push(/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_react55.Fragment, { children: [
23711
+ acc.push(/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_react55.Fragment, { children: [
23578
23712
  t3("Additional"),
23579
23713
  ": "
23580
23714
  ] }, index));
23581
23715
  index += 1;
23582
23716
  }
23583
23717
  if (entitlement.priceBehavior === EntitlementPriceBehavior.Tier) {
23584
- acc.push(/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_react55.Fragment, { children: t3("Tier-based") }, index));
23718
+ acc.push(/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react55.Fragment, { children: t3("Tier-based") }, index));
23585
23719
  index += 1;
23586
23720
  }
23587
23721
  const { price } = getEntitlementPrice(entitlement, period, currency) || {};
23588
23722
  if ((entitlement.priceBehavior === EntitlementPriceBehavior.PayAsYouGo || entitlement.priceBehavior === EntitlementPriceBehavior.Overage) && entitlement.feature && typeof price === "number") {
23589
23723
  const packageSize = billingPrice?.packageSize ?? 1;
23590
23724
  acc.push(
23591
- /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_react55.Fragment, { children: [
23725
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_react55.Fragment, { children: [
23592
23726
  formatCurrency(price, billingPrice?.currency),
23593
- /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("sub", { children: [
23727
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("sub", { children: [
23594
23728
  "/",
23595
- packageSize > 1 && /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_jsx_runtime54.Fragment, { children: [
23729
+ packageSize > 1 && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
23596
23730
  packageSize,
23597
23731
  " "
23598
23732
  ] }),
23599
23733
  getFeatureName(entitlement.feature, packageSize),
23600
- entitlement.feature.featureType === FeatureType.Trait && /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_jsx_runtime54.Fragment, { children: [
23734
+ entitlement.feature.featureType === FeatureType.Trait && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
23601
23735
  "/",
23602
23736
  shortenPeriod(period)
23603
23737
  ] })
@@ -23608,7 +23742,7 @@ var UsageDetails2 = ({
23608
23742
  }
23609
23743
  if (showCredits && entitlement.priceBehavior === EntitlementPriceBehavior.CreditBurndown && entitlement.planEntitlement?.consumptionRate && entitlement.planEntitlement?.valueCredit) {
23610
23744
  acc.push(
23611
- /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_react55.Fragment, { children: [
23745
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_react55.Fragment, { children: [
23612
23746
  entitlement.planEntitlement.consumptionRate,
23613
23747
  " ",
23614
23748
  getFeatureName(
@@ -23636,7 +23770,7 @@ var UsageDetails2 = ({
23636
23770
  return null;
23637
23771
  }
23638
23772
  const quantity = entitlement.priceBehavior !== EntitlementPriceBehavior.CreditBurndown ? limit : void 0;
23639
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
23773
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
23640
23774
  Flex,
23641
23775
  {
23642
23776
  $justifyContent: "space-between",
@@ -23644,13 +23778,13 @@ var UsageDetails2 = ({
23644
23778
  $flexWrap: "wrap",
23645
23779
  $gap: "0.5rem",
23646
23780
  children: [
23647
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Text, { display: layout.addOns.fontStyle, children: typeof quantity === "number" ? /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_jsx_runtime54.Fragment, { children: [
23781
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Text, { display: layout.addOns.fontStyle, children: typeof quantity === "number" ? /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
23648
23782
  quantity,
23649
23783
  " ",
23650
23784
  getFeatureName(entitlement.feature, quantity, true)
23651
23785
  ] }) : entitlement.feature.name }),
23652
- /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(Text, { children: [
23653
- description.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
23786
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Text, { children: [
23787
+ description.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
23654
23788
  Text,
23655
23789
  {
23656
23790
  style: { opacity: 0.54 },
@@ -23661,15 +23795,15 @@ var UsageDetails2 = ({
23661
23795
  ),
23662
23796
  // only show cost for pay-in-advance entitlements
23663
23797
  // `description` will include price for other price behaviors
23664
- entitlement.priceBehavior === EntitlementPriceBehavior.PayInAdvance && /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_jsx_runtime54.Fragment, { children: [
23798
+ entitlement.priceBehavior === EntitlementPriceBehavior.PayInAdvance && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
23665
23799
  " ",
23666
23800
  formatCurrency(cost, billingPrice?.currency),
23667
- entitlement.feature.featureType === FeatureType.Trait && /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("sub", { children: [
23801
+ entitlement.feature.featureType === FeatureType.Trait && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("sub", { children: [
23668
23802
  "/",
23669
23803
  shortenPeriod(period)
23670
23804
  ] })
23671
23805
  ] }),
23672
- entitlement.priceBehavior === EntitlementPriceBehavior.Tier && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
23806
+ entitlement.priceBehavior === EntitlementPriceBehavior.Tier && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
23673
23807
  PricingTiersTooltip,
23674
23808
  {
23675
23809
  feature: entitlement.feature,
@@ -23679,7 +23813,7 @@ var UsageDetails2 = ({
23679
23813
  tiersMode: billingPrice?.tiersMode ?? void 0
23680
23814
  }
23681
23815
  ),
23682
- entitlementHasHardLimit(entitlement) && entitlement.allocationType === EntitlementValueType.Numeric && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
23816
+ entitlementHasHardLimit(entitlement) && entitlement.allocationType === EntitlementValueType.Numeric && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
23683
23817
  HardLimitTooltip,
23684
23818
  {
23685
23819
  feature: entitlement.feature,
@@ -23693,7 +23827,7 @@ var UsageDetails2 = ({
23693
23827
  };
23694
23828
 
23695
23829
  // src/components/elements/plan-manager/PlanManager.tsx
23696
- var import_jsx_runtime55 = require("react/jsx-runtime");
23830
+ var import_jsx_runtime56 = require("react/jsx-runtime");
23697
23831
  var resolveDesignProps7 = (props) => {
23698
23832
  return {
23699
23833
  header: {
@@ -23815,8 +23949,8 @@ var PlanManager = (0, import_react56.forwardRef)(({ children, className, portal,
23815
23949
  const hasAutoTopupSelfService = currentPlan?.includedCreditGrants.some((grant) => {
23816
23950
  return grant.billingCreditAutoTopupSelfService;
23817
23951
  }) ?? false;
23818
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
23819
- isTrialSubscription && !willSubscriptionCancel ? /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
23952
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx_runtime56.Fragment, { children: [
23953
+ isTrialSubscription && !willSubscriptionCancel ? /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
23820
23954
  Notice,
23821
23955
  {
23822
23956
  as: Flex,
@@ -23826,8 +23960,8 @@ var PlanManager = (0, import_react56.forwardRef)(({ children, className, portal,
23826
23960
  $textAlign: "center",
23827
23961
  $backgroundColor: isLightBackground ? darken(settings.theme.card.background, 0.04) : lighten(settings.theme.card.background, 0.04),
23828
23962
  children: [
23829
- typeof trialEnd.endDate !== "undefined" && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Text, { as: "h3", display: "heading3", children: t3("Trial ends in", trialEnd) }),
23830
- (trialPaymentMethodRequired || postTrialPlan || currentPlan) && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
23963
+ typeof trialEnd.endDate !== "undefined" && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Text, { as: "h3", display: "heading3", children: t3("Trial ends in", trialEnd) }),
23964
+ (trialPaymentMethodRequired || postTrialPlan || currentPlan) && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
23831
23965
  Text,
23832
23966
  {
23833
23967
  as: "p",
@@ -23841,7 +23975,7 @@ var PlanManager = (0, import_react56.forwardRef)(({ children, className, portal,
23841
23975
  )
23842
23976
  ]
23843
23977
  }
23844
- ) : willSubscriptionCancel ? /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
23978
+ ) : willSubscriptionCancel ? /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
23845
23979
  Notice,
23846
23980
  {
23847
23981
  as: Flex,
@@ -23851,8 +23985,8 @@ var PlanManager = (0, import_react56.forwardRef)(({ children, className, portal,
23851
23985
  $textAlign: "center",
23852
23986
  $backgroundColor: isLightBackground ? darken(settings.theme.card.background, 0.04) : lighten(settings.theme.card.background, 0.04),
23853
23987
  children: [
23854
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Text, { as: "h3", display: "heading3", children: t3("Subscription canceled") }),
23855
- typeof billingSubscription?.cancelAt === "number" && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
23988
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Text, { as: "h3", display: "heading3", children: t3("Subscription canceled") }),
23989
+ typeof billingSubscription?.cancelAt === "number" && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
23856
23990
  Text,
23857
23991
  {
23858
23992
  as: "p",
@@ -23870,7 +24004,7 @@ var PlanManager = (0, import_react56.forwardRef)(({ children, className, portal,
23870
24004
  )
23871
24005
  ]
23872
24006
  }
23873
- ) : customPlanBilling ? /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
24007
+ ) : customPlanBilling ? /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
23874
24008
  Notice,
23875
24009
  {
23876
24010
  as: Flex,
@@ -23880,7 +24014,7 @@ var PlanManager = (0, import_react56.forwardRef)(({ children, className, portal,
23880
24014
  $textAlign: "center",
23881
24015
  $backgroundColor: isLightBackground ? darken(settings.theme.card.background, 0.04) : lighten(settings.theme.card.background, 0.04),
23882
24016
  children: [
23883
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Text, { as: "h3", display: "heading3", children: customPlanBilling.isAwaitingActivation ? t3("Custom plan awaiting payment", {
24017
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Text, { as: "h3", display: "heading3", children: customPlanBilling.isAwaitingActivation ? t3("Custom plan awaiting payment", {
23884
24018
  plan: customPlanBilling.planName ?? t3("your plan")
23885
24019
  }) : t3("Custom plan payment due", {
23886
24020
  plan: customPlanBilling.planName ?? t3("your plan"),
@@ -23888,7 +24022,7 @@ var PlanManager = (0, import_react56.forwardRef)(({ children, className, portal,
23888
24022
  month: "numeric"
23889
24023
  })
23890
24024
  }) }),
23891
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Text, { as: "p", $size: 0.8125 * settings.theme.typography.text.fontSize, children: customPlanBilling.isAwaitingActivation ? t3("Custom plan awaiting payment description", {
24025
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Text, { as: "p", $size: 0.8125 * settings.theme.typography.text.fontSize, children: customPlanBilling.isAwaitingActivation ? t3("Custom plan awaiting payment description", {
23892
24026
  date: toPrettyDate(customPlanBilling.deadline, {
23893
24027
  month: "numeric"
23894
24028
  })
@@ -23898,7 +24032,7 @@ var PlanManager = (0, import_react56.forwardRef)(({ children, className, portal,
23898
24032
  month: "numeric"
23899
24033
  })
23900
24034
  }) }),
23901
- customPlanBilling.billing.stripeInvoiceUrl && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
24035
+ customPlanBilling.billing.stripeInvoiceUrl && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
23902
24036
  Button,
23903
24037
  {
23904
24038
  as: "a",
@@ -23912,7 +24046,7 @@ var PlanManager = (0, import_react56.forwardRef)(({ children, className, portal,
23912
24046
  )
23913
24047
  ]
23914
24048
  }
23915
- ) : data?.company?.scheduledDowngrade?.toPlanName && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
24049
+ ) : data?.company?.scheduledDowngrade?.toPlanName && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
23916
24050
  Notice,
23917
24051
  {
23918
24052
  as: Flex,
@@ -23922,10 +24056,10 @@ var PlanManager = (0, import_react56.forwardRef)(({ children, className, portal,
23922
24056
  $textAlign: "center",
23923
24057
  $backgroundColor: isLightBackground ? darken(settings.theme.card.background, 0.04) : lighten(settings.theme.card.background, 0.04),
23924
24058
  children: [
23925
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Text, { as: "h3", display: "heading3", children: t3("Downgrade to plan scheduled", {
24059
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Text, { as: "h3", display: "heading3", children: t3("Downgrade to plan scheduled", {
23926
24060
  plan: data.company.scheduledDowngrade.toPlanName
23927
24061
  }) }),
23928
- typeof billingSubscription?.periodEnd === "number" && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
24062
+ typeof billingSubscription?.periodEnd === "number" && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
23929
24063
  Text,
23930
24064
  {
23931
24065
  as: "p",
@@ -23944,7 +24078,7 @@ var PlanManager = (0, import_react56.forwardRef)(({ children, className, portal,
23944
24078
  ]
23945
24079
  }
23946
24080
  ),
23947
- /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
24081
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
23948
24082
  Element,
23949
24083
  {
23950
24084
  as: Flex,
@@ -23953,19 +24087,19 @@ var PlanManager = (0, import_react56.forwardRef)(({ children, className, portal,
23953
24087
  $flexDirection: "column",
23954
24088
  $gap: "2rem",
23955
24089
  children: [
23956
- props.header.isVisible && currentPlan && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
24090
+ props.header.isVisible && currentPlan && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
23957
24091
  Flex,
23958
24092
  {
23959
24093
  $justifyContent: "space-between",
23960
24094
  $alignItems: "center",
23961
24095
  $gap: "1rem",
23962
24096
  children: [
23963
- /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Flex, { $flexDirection: "column", $gap: "1rem", children: [
23964
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Text, { display: props.header.title.fontStyle, $leading: "none", children: currentPlan.name }),
23965
- props.header.description.isVisible && currentPlan.description && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Text, { display: props.header.description.fontStyle, children: currentPlan.description })
24097
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Flex, { $flexDirection: "column", $gap: "1rem", children: [
24098
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Text, { display: props.header.title.fontStyle, $leading: "none", children: currentPlan.name }),
24099
+ props.header.description.isVisible && currentPlan.description && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Text, { display: props.header.description.fontStyle, children: currentPlan.description })
23966
24100
  ] }),
23967
- props.header.price.isVisible && typeof currentPlan.planPrice === "number" && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Box, { children: [
23968
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
24101
+ props.header.price.isVisible && typeof currentPlan.planPrice === "number" && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Box, { children: [
24102
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
23969
24103
  Text,
23970
24104
  {
23971
24105
  display: isUsageBasedPlan ? "heading3" : props.header.price.fontStyle,
@@ -23975,7 +24109,7 @@ var PlanManager = (0, import_react56.forwardRef)(({ children, className, portal,
23975
24109
  )
23976
24110
  }
23977
24111
  ),
23978
- !isFreePlan && currentPlanPeriod && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Text, { display: props.header.price.fontStyle, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("sub", { children: [
24112
+ !isFreePlan && currentPlanPeriod && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Text, { display: props.header.price.fontStyle, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("sub", { children: [
23979
24113
  "/",
23980
24114
  shortenPeriod(currentPlanPeriod)
23981
24115
  ] }) })
@@ -23983,8 +24117,8 @@ var PlanManager = (0, import_react56.forwardRef)(({ children, className, portal,
23983
24117
  ]
23984
24118
  }
23985
24119
  ),
23986
- props.addOns.isVisible && currentAddOns.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Flex, { $flexDirection: "column", $gap: "0.5rem", children: [
23987
- props.addOns.showLabel && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
24120
+ props.addOns.isVisible && currentAddOns.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Flex, { $flexDirection: "column", $gap: "0.5rem", children: [
24121
+ props.addOns.showLabel && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
23988
24122
  Text,
23989
24123
  {
23990
24124
  $color: isLightBackground ? darken(settings.theme.card.background, 0.46) : lighten(settings.theme.card.background, 0.46),
@@ -23992,7 +24126,7 @@ var PlanManager = (0, import_react56.forwardRef)(({ children, className, portal,
23992
24126
  children: t3("Add-ons")
23993
24127
  }
23994
24128
  ),
23995
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Flex, { $flexDirection: "column", $gap: "1rem", children: currentAddOns.map((addOn, addOnIndex) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
24129
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Flex, { $flexDirection: "column", $gap: "1rem", children: currentAddOns.map((addOn, addOnIndex) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
23996
24130
  AddOn,
23997
24131
  {
23998
24132
  addOn,
@@ -24003,8 +24137,8 @@ var PlanManager = (0, import_react56.forwardRef)(({ children, className, portal,
24003
24137
  addOnIndex
24004
24138
  )) })
24005
24139
  ] }),
24006
- props.addOns.isVisible && usageBasedEntitlements.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Flex, { $flexDirection: "column", $gap: "0.5rem", children: [
24007
- props.addOns.showLabel && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
24140
+ props.addOns.isVisible && usageBasedEntitlements.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Flex, { $flexDirection: "column", $gap: "0.5rem", children: [
24141
+ props.addOns.showLabel && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
24008
24142
  Text,
24009
24143
  {
24010
24144
  $color: isLightBackground ? darken(settings.theme.card.background, 0.46) : lighten(settings.theme.card.background, 0.46),
@@ -24012,8 +24146,8 @@ var PlanManager = (0, import_react56.forwardRef)(({ children, className, portal,
24012
24146
  children: t3("Usage-based")
24013
24147
  }
24014
24148
  ),
24015
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Flex, { $flexDirection: "column", $gap: "1rem", children: usageBasedEntitlements.map((entitlement, entitlementIndex) => {
24016
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
24149
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Flex, { $flexDirection: "column", $gap: "1rem", children: usageBasedEntitlements.map((entitlement, entitlementIndex) => {
24150
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
24017
24151
  UsageDetails2,
24018
24152
  {
24019
24153
  entitlement,
@@ -24026,8 +24160,8 @@ var PlanManager = (0, import_react56.forwardRef)(({ children, className, portal,
24026
24160
  );
24027
24161
  }) })
24028
24162
  ] }),
24029
- props.addOns.isVisible && showCredits && creditGroups.plan.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Flex, { $flexDirection: "column", $gap: "0.5rem", children: [
24030
- props.addOns.showLabel && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
24163
+ props.addOns.isVisible && showCredits && creditGroups.plan.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Flex, { $flexDirection: "column", $gap: "0.5rem", children: [
24164
+ props.addOns.showLabel && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
24031
24165
  Text,
24032
24166
  {
24033
24167
  $color: isLightBackground ? darken(settings.theme.card.background, 0.46) : lighten(settings.theme.card.background, 0.46),
@@ -24035,19 +24169,19 @@ var PlanManager = (0, import_react56.forwardRef)(({ children, className, portal,
24035
24169
  children: t3("Credits in plan")
24036
24170
  }
24037
24171
  ),
24038
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Flex, { $flexDirection: "column", $gap: "1rem", children: creditGroups.plan.map((group, groupIndex) => {
24172
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Flex, { $flexDirection: "column", $gap: "1rem", children: creditGroups.plan.map((group, groupIndex) => {
24039
24173
  const planCreditGrant = currentPlan?.includedCreditGrants.find(
24040
24174
  (grant) => grant.creditId === group.id
24041
24175
  );
24042
24176
  const hasAutoTopup = isAutoTopupEnabled(planCreditGrant);
24043
24177
  const thresholdCredits = getAutoTopupThresholdCredits(planCreditGrant);
24044
24178
  const topupAmount = getAutoTopupAmount(planCreditGrant);
24045
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
24179
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
24046
24180
  Flex,
24047
24181
  {
24048
24182
  $flexDirection: "column",
24049
24183
  $gap: "0.25rem",
24050
- children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
24184
+ children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
24051
24185
  Flex,
24052
24186
  {
24053
24187
  $justifyContent: "space-between",
@@ -24055,18 +24189,18 @@ var PlanManager = (0, import_react56.forwardRef)(({ children, className, portal,
24055
24189
  $flexWrap: "wrap",
24056
24190
  $gap: "0.5rem",
24057
24191
  children: [
24058
- /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Text, { display: props.addOns.fontStyle, children: [
24192
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Text, { display: props.addOns.fontStyle, children: [
24059
24193
  group.quantity,
24060
24194
  " ",
24061
24195
  getFeatureName(group, group.quantity),
24062
24196
  " ",
24063
- subscriptionInterval && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
24197
+ subscriptionInterval && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx_runtime56.Fragment, { children: [
24064
24198
  t3("per"),
24065
24199
  " ",
24066
24200
  t3(subscriptionInterval)
24067
24201
  ] })
24068
24202
  ] }),
24069
- group.total.used > 0 && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Flex, { $alignItems: "baseline", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
24203
+ group.total.used > 0 && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Flex, { $alignItems: "baseline", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
24070
24204
  Text,
24071
24205
  {
24072
24206
  style: { opacity: 0.54 },
@@ -24076,7 +24210,7 @@ var PlanManager = (0, import_react56.forwardRef)(({ children, className, portal,
24076
24210
  group.total.used,
24077
24211
  " ",
24078
24212
  t3("used"),
24079
- hasAutoTopup && planCreditGrant && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
24213
+ hasAutoTopup && planCreditGrant && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
24080
24214
  AutoTopupNotice,
24081
24215
  {
24082
24216
  thresholdCredits,
@@ -24093,7 +24227,7 @@ var PlanManager = (0, import_react56.forwardRef)(({ children, className, portal,
24093
24227
  groupIndex
24094
24228
  );
24095
24229
  }) }),
24096
- hasAutoTopupSelfService && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
24230
+ hasAutoTopupSelfService && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
24097
24231
  Flex,
24098
24232
  {
24099
24233
  $justifyContent: "space-between",
@@ -24103,8 +24237,8 @@ var PlanManager = (0, import_react56.forwardRef)(({ children, className, portal,
24103
24237
  $backgroundColor: isLightBackground ? darken(settings.theme.card.background, 0.04) : lighten(settings.theme.card.background, 0.04),
24104
24238
  $borderRadius: "0.5rem",
24105
24239
  children: [
24106
- /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Flex, { $flexDirection: "column", $gap: "0.5rem", children: [
24107
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Text, { display: props.addOns.fontStyle, children: t3("Auto top-up") }),
24240
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Flex, { $flexDirection: "column", $gap: "0.5rem", children: [
24241
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Text, { display: props.addOns.fontStyle, children: t3("Auto top-up") }),
24108
24242
  currentPlan?.includedCreditGrants.reduce(
24109
24243
  (acc, grant) => {
24110
24244
  if (!grant.credit || !grant.billingCreditAutoTopupSelfService) {
@@ -24113,7 +24247,7 @@ var PlanManager = (0, import_react56.forwardRef)(({ children, className, portal,
24113
24247
  const autoTopupEnabled = grant.companyAutoTopupEnabled ?? false;
24114
24248
  if (!autoTopupEnabled) {
24115
24249
  acc.push(
24116
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Text, { $leading: "tight", children: t3("Auto top-up disabled for token", {
24250
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Text, { $leading: "tight", children: t3("Auto top-up disabled for token", {
24117
24251
  unit: getFeatureName(grant.credit, 1)
24118
24252
  }) }, grant.id)
24119
24253
  );
@@ -24123,7 +24257,7 @@ var PlanManager = (0, import_react56.forwardRef)(({ children, className, portal,
24123
24257
  const autoTopupAmount = getAutoTopupAmount(grant);
24124
24258
  if (typeof autoTopupThresholdCredits === "number" && typeof autoTopupAmount === "number") {
24125
24259
  acc.push(
24126
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Text, { $leading: "tight", children: t3("Adds X tokens when Y remaining in balance", {
24260
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Text, { $leading: "tight", children: t3("Adds X tokens when Y remaining in balance", {
24127
24261
  unit: getFeatureName(
24128
24262
  grant.credit,
24129
24263
  autoTopupAmount
@@ -24138,7 +24272,7 @@ var PlanManager = (0, import_react56.forwardRef)(({ children, className, portal,
24138
24272
  []
24139
24273
  )
24140
24274
  ] }),
24141
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
24275
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
24142
24276
  Button,
24143
24277
  {
24144
24278
  type: "button",
@@ -24155,8 +24289,8 @@ var PlanManager = (0, import_react56.forwardRef)(({ children, className, portal,
24155
24289
  }
24156
24290
  )
24157
24291
  ] }),
24158
- props.addOns.isVisible && creditGroups.bundles.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Flex, { $flexDirection: "column", $gap: "0.5rem", children: [
24159
- props.addOns.showLabel && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
24292
+ props.addOns.isVisible && creditGroups.bundles.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Flex, { $flexDirection: "column", $gap: "0.5rem", children: [
24293
+ props.addOns.showLabel && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
24160
24294
  Text,
24161
24295
  {
24162
24296
  $color: isLightBackground ? darken(settings.theme.card.background, 0.46) : lighten(settings.theme.card.background, 0.46),
@@ -24164,9 +24298,9 @@ var PlanManager = (0, import_react56.forwardRef)(({ children, className, portal,
24164
24298
  children: t3("Credit bundles")
24165
24299
  }
24166
24300
  ),
24167
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Flex, { $flexDirection: "column", $gap: "1rem", children: creditGroups.bundles.map((group, groupIndex) => {
24301
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Flex, { $flexDirection: "column", $gap: "1rem", children: creditGroups.bundles.map((group, groupIndex) => {
24168
24302
  const bundle = group?.bundleId ? creditBundles.find((b3) => b3.id === group.bundleId) : void 0;
24169
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
24303
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
24170
24304
  Flex,
24171
24305
  {
24172
24306
  $justifyContent: "space-between",
@@ -24174,8 +24308,8 @@ var PlanManager = (0, import_react56.forwardRef)(({ children, className, portal,
24174
24308
  $flexWrap: "wrap",
24175
24309
  $gap: "0.5rem",
24176
24310
  children: [
24177
- bundle ? /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Text, { display: props.addOns.fontStyle, children: [
24178
- group.grants.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Text, { style: { opacity: 0.5 }, children: [
24311
+ bundle ? /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Text, { display: props.addOns.fontStyle, children: [
24312
+ group.grants.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Text, { style: { opacity: 0.5 }, children: [
24179
24313
  "(",
24180
24314
  group.grants.length,
24181
24315
  ")",
@@ -24187,12 +24321,12 @@ var PlanManager = (0, import_react56.forwardRef)(({ children, className, portal,
24187
24321
  " ",
24188
24322
  getFeatureName(group, group.quantity),
24189
24323
  ")"
24190
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Text, { display: props.addOns.fontStyle, children: [
24324
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Text, { display: props.addOns.fontStyle, children: [
24191
24325
  group.quantity,
24192
24326
  " ",
24193
24327
  getFeatureName(group, group.quantity)
24194
24328
  ] }),
24195
- group.total.used > 0 && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
24329
+ group.total.used > 0 && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
24196
24330
  Text,
24197
24331
  {
24198
24332
  style: { opacity: 0.54 },
@@ -24211,8 +24345,8 @@ var PlanManager = (0, import_react56.forwardRef)(({ children, className, portal,
24211
24345
  );
24212
24346
  }) })
24213
24347
  ] }),
24214
- props.addOns.isVisible && creditGroups.promotional.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Flex, { $flexDirection: "column", $gap: "0.5rem", children: [
24215
- props.addOns.showLabel && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
24348
+ props.addOns.isVisible && creditGroups.promotional.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Flex, { $flexDirection: "column", $gap: "0.5rem", children: [
24349
+ props.addOns.showLabel && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
24216
24350
  Text,
24217
24351
  {
24218
24352
  $color: isLightBackground ? darken(settings.theme.card.background, 0.46) : lighten(settings.theme.card.background, 0.46),
@@ -24220,8 +24354,8 @@ var PlanManager = (0, import_react56.forwardRef)(({ children, className, portal,
24220
24354
  children: t3("Promotional credits")
24221
24355
  }
24222
24356
  ),
24223
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Flex, { $flexDirection: "column", $gap: "1rem", children: creditGroups.promotional.map((group, groupIndex) => {
24224
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
24357
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Flex, { $flexDirection: "column", $gap: "1rem", children: creditGroups.promotional.map((group, groupIndex) => {
24358
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
24225
24359
  Flex,
24226
24360
  {
24227
24361
  $justifyContent: "space-between",
@@ -24229,12 +24363,12 @@ var PlanManager = (0, import_react56.forwardRef)(({ children, className, portal,
24229
24363
  $flexWrap: "wrap",
24230
24364
  $gap: "0.5rem",
24231
24365
  children: [
24232
- /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Text, { display: props.addOns.fontStyle, children: [
24366
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Text, { display: props.addOns.fontStyle, children: [
24233
24367
  group.quantity,
24234
24368
  " ",
24235
24369
  getFeatureName(group, group.quantity)
24236
24370
  ] }),
24237
- group.total.used > 0 && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
24371
+ group.total.used > 0 && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
24238
24372
  Text,
24239
24373
  {
24240
24374
  style: { opacity: 0.54 },
@@ -24253,7 +24387,7 @@ var PlanManager = (0, import_react56.forwardRef)(({ children, className, portal,
24253
24387
  );
24254
24388
  }) })
24255
24389
  ] }),
24256
- canCheckout && props.callToAction.isVisible && !customPlanBilling?.isAwaitingActivation && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
24390
+ canCheckout && props.callToAction.isVisible && !customPlanBilling?.isAwaitingActivation && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
24257
24391
  Button,
24258
24392
  {
24259
24393
  type: "button",
@@ -24278,7 +24412,7 @@ var import_react59 = require("react");
24278
24412
 
24279
24413
  // src/components/elements/pricing-table/AddOn.tsx
24280
24414
  var import_react57 = require("react");
24281
- var import_jsx_runtime56 = require("react/jsx-runtime");
24415
+ var import_jsx_runtime57 = require("react/jsx-runtime");
24282
24416
  function renderMeteredEntitlementPricing2({
24283
24417
  priceBehavior,
24284
24418
  softLimit,
@@ -24290,7 +24424,7 @@ function renderMeteredEntitlementPricing2({
24290
24424
  isTiered
24291
24425
  }) {
24292
24426
  if (priceBehavior === EntitlementPriceBehavior.Overage && softLimit) {
24293
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx_runtime56.Fragment, { children: [
24427
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
24294
24428
  "Additional: ",
24295
24429
  formatCurrency(price, currency),
24296
24430
  "/",
@@ -24301,13 +24435,13 @@ function renderMeteredEntitlementPricing2({
24301
24435
  ] });
24302
24436
  }
24303
24437
  if (isTiered) {
24304
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_jsx_runtime56.Fragment, { children: "Tier-based pricing" });
24438
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_jsx_runtime57.Fragment, { children: "Tier-based pricing" });
24305
24439
  }
24306
24440
  if (priceBehavior === EntitlementPriceBehavior.PayAsYouGo || priceBehavior === EntitlementPriceBehavior.PayInAdvance) {
24307
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx_runtime56.Fragment, { children: [
24441
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
24308
24442
  formatCurrency(price, currency),
24309
24443
  "/",
24310
- packageSize > 1 && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx_runtime56.Fragment, { children: [
24444
+ packageSize > 1 && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
24311
24445
  packageSize,
24312
24446
  " "
24313
24447
  ] }),
@@ -24371,7 +24505,7 @@ var AddOn2 = ({
24371
24505
  isTiered: entitlement.priceBehavior === EntitlementPriceBehavior.Tier || isTieredPrice(priceData)
24372
24506
  };
24373
24507
  }) || [];
24374
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
24508
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
24375
24509
  Flex,
24376
24510
  {
24377
24511
  as: "li",
@@ -24391,7 +24525,7 @@ var AddOn2 = ({
24391
24525
  $boxShadow: cardBoxShadow
24392
24526
  },
24393
24527
  children: [
24394
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
24528
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
24395
24529
  Flex,
24396
24530
  {
24397
24531
  $flexDirection: "column",
@@ -24402,7 +24536,7 @@ var AddOn2 = ({
24402
24536
  $borderStyle: "solid",
24403
24537
  $borderColor: isLightBackground ? "hsla(0, 0%, 0%, 0.175)" : "hsla(0, 0%, 100%, 0.175)",
24404
24538
  children: [
24405
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
24539
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
24406
24540
  Text,
24407
24541
  {
24408
24542
  as: "h3",
@@ -24411,22 +24545,22 @@ var AddOn2 = ({
24411
24545
  children: addOn.name
24412
24546
  }
24413
24547
  ) }),
24414
- layout.addOns.showDescription && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Box, { $marginBottom: "0.5rem", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Text, { display: layout.plans.description.fontStyle, children: addOn.description }) }),
24415
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
24548
+ layout.addOns.showDescription && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Box, { $marginBottom: "0.5rem", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Text, { display: layout.plans.description.fontStyle, children: addOn.description }) }),
24549
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
24416
24550
  Text,
24417
24551
  {
24418
24552
  "data-testid": "sch-addon-price",
24419
24553
  display: layout.plans.name.fontStyle,
24420
- children: shouldShowUsageBased2(addOnPrice ?? 0, displayableEntitlements) ? t3("Usage-based") : /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx_runtime56.Fragment, { children: [
24554
+ children: shouldShowUsageBased2(addOnPrice ?? 0, displayableEntitlements) ? t3("Usage-based") : /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
24421
24555
  formatCurrency(addOnPrice ?? 0, addOnCurrency),
24422
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("sub", { children: [
24556
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("sub", { children: [
24423
24557
  "/",
24424
24558
  selectedPeriod
24425
24559
  ] })
24426
24560
  ] })
24427
24561
  }
24428
24562
  ) }),
24429
- isActiveAddOn && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
24563
+ isActiveAddOn && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
24430
24564
  Flex,
24431
24565
  {
24432
24566
  "data-testid": "sch-addon-active",
@@ -24436,7 +24570,7 @@ var AddOn2 = ({
24436
24570
  $backgroundColor: settings.theme.primary,
24437
24571
  $borderRadius: "9999px",
24438
24572
  $padding: "0.125rem 0.85rem",
24439
- children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
24573
+ children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
24440
24574
  Text,
24441
24575
  {
24442
24576
  $size: 0.75 * settings.theme.typography.text.fontSize,
@@ -24449,7 +24583,7 @@ var AddOn2 = ({
24449
24583
  ]
24450
24584
  }
24451
24585
  ),
24452
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
24586
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
24453
24587
  Flex,
24454
24588
  {
24455
24589
  $flexDirection: "column",
@@ -24458,7 +24592,7 @@ var AddOn2 = ({
24458
24592
  $flexGrow: 1,
24459
24593
  $padding: `${0.75 * cardPadding}rem ${cardPadding}rem 0`,
24460
24594
  children: [
24461
- layout.addOns.showEntitlements && displayableEntitlements.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
24595
+ layout.addOns.showEntitlements && displayableEntitlements.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
24462
24596
  Flex,
24463
24597
  {
24464
24598
  as: "ul",
@@ -24470,7 +24604,7 @@ var AddOn2 = ({
24470
24604
  $listStyle: "none",
24471
24605
  children: displayableEntitlements.map((entitlement, idx) => {
24472
24606
  if (entitlement.isUnlimited) {
24473
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
24607
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
24474
24608
  Flex,
24475
24609
  {
24476
24610
  as: "li",
@@ -24479,8 +24613,8 @@ var AddOn2 = ({
24479
24613
  $alignItems: "center",
24480
24614
  $gap: "1rem",
24481
24615
  children: [
24482
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Flex, { $gap: "1rem", children: [
24483
- layout.addOns.showFeatureIcons && entitlement.feature?.icon && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
24616
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Flex, { $gap: "1rem", children: [
24617
+ layout.addOns.showFeatureIcons && entitlement.feature?.icon && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
24484
24618
  Icon3,
24485
24619
  {
24486
24620
  name: entitlement.feature.icon,
@@ -24489,16 +24623,16 @@ var AddOn2 = ({
24489
24623
  rounded: true
24490
24624
  }
24491
24625
  ),
24492
- entitlement.feature && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
24626
+ entitlement.feature && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
24493
24627
  Flex,
24494
24628
  {
24495
24629
  $flexDirection: "column",
24496
24630
  $justifyContent: "center",
24497
- children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Text, { children: getFeatureName(entitlement.feature) })
24631
+ children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Text, { children: getFeatureName(entitlement.feature) })
24498
24632
  }
24499
24633
  )
24500
24634
  ] }),
24501
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
24635
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
24502
24636
  Text,
24503
24637
  {
24504
24638
  style: { opacity: 0.54 },
@@ -24513,7 +24647,7 @@ var AddOn2 = ({
24513
24647
  );
24514
24648
  }
24515
24649
  const meteredEntitlement = entitlement;
24516
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
24650
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
24517
24651
  Flex,
24518
24652
  {
24519
24653
  as: "li",
@@ -24523,8 +24657,8 @@ var AddOn2 = ({
24523
24657
  $gap: "1rem",
24524
24658
  $listStyle: "none",
24525
24659
  children: [
24526
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Flex, { $gap: "1rem", children: [
24527
- meteredEntitlement.feature?.icon && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
24660
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Flex, { $gap: "1rem", children: [
24661
+ meteredEntitlement.feature?.icon && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
24528
24662
  Icon3,
24529
24663
  {
24530
24664
  "data-testid": "sch-feature-icon",
@@ -24534,9 +24668,9 @@ var AddOn2 = ({
24534
24668
  rounded: true
24535
24669
  }
24536
24670
  ),
24537
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Flex, { $flexDirection: "column", $justifyContent: "center", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Text, { children: meteredEntitlement.priceBehavior === EntitlementPriceBehavior.Overage && meteredEntitlement.softLimit ? `${meteredEntitlement.softLimit} ${getEntitlementFeatureName(meteredEntitlement, "units")}` : getEntitlementFeatureName(meteredEntitlement) }) })
24671
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Flex, { $flexDirection: "column", $justifyContent: "center", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Text, { children: meteredEntitlement.priceBehavior === EntitlementPriceBehavior.Overage && meteredEntitlement.softLimit ? `${meteredEntitlement.softLimit} ${getEntitlementFeatureName(meteredEntitlement, "units")}` : getEntitlementFeatureName(meteredEntitlement) }) })
24538
24672
  ] }),
24539
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
24673
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
24540
24674
  Text,
24541
24675
  {
24542
24676
  style: { opacity: 0.54 },
@@ -24552,7 +24686,7 @@ var AddOn2 = ({
24552
24686
  })
24553
24687
  }
24554
24688
  ),
24555
- sharedProps.showCallToAction && (layout.upgrade.isVisible || layout.downgrade.isVisible) && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Flex, { $flexDirection: "column", $gap: "0.5rem", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
24689
+ sharedProps.showCallToAction && (layout.upgrade.isVisible || layout.downgrade.isVisible) && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Flex, { $flexDirection: "column", $gap: "0.5rem", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
24556
24690
  Button,
24557
24691
  {
24558
24692
  type: "button",
@@ -24594,7 +24728,7 @@ var AddOn2 = ({
24594
24728
  var import_react58 = require("react");
24595
24729
 
24596
24730
  // src/components/elements/pricing-table/Entitlement.tsx
24597
- var import_jsx_runtime57 = require("react/jsx-runtime");
24731
+ var import_jsx_runtime58 = require("react/jsx-runtime");
24598
24732
  var Entitlement2 = ({
24599
24733
  entitlement,
24600
24734
  sharedProps,
@@ -24626,8 +24760,8 @@ var Entitlement2 = ({
24626
24760
  entitlement,
24627
24761
  credits
24628
24762
  );
24629
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Flex, { as: "li", $gap: "1rem", style: { listStyle: "none" }, children: [
24630
- layout.plans.showFeatureIcons && entitlement.feature?.icon && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
24763
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Flex, { as: "li", $gap: "1rem", style: { listStyle: "none" }, children: [
24764
+ layout.plans.showFeatureIcons && entitlement.feature?.icon && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
24631
24765
  Icon3,
24632
24766
  {
24633
24767
  "data-testid": "sch-feature-icon",
@@ -24637,31 +24771,31 @@ var Entitlement2 = ({
24637
24771
  rounded: true
24638
24772
  }
24639
24773
  ),
24640
- entitlement.feature?.name && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Flex, { $flexDirection: "column", $gap: "0.5rem", children: [
24641
- /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Flex, { $flexDirection: "column", $justifyContent: "center", $flexGrow: 1, children: [
24642
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Text, { children: typeof entitlementPrice === "number" && !tiered && (entitlement.priceBehavior === EntitlementPriceBehavior.PayInAdvance || entitlement.priceBehavior === EntitlementPriceBehavior.PayAsYouGo) ? /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
24774
+ entitlement.feature?.name && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Flex, { $flexDirection: "column", $gap: "0.5rem", children: [
24775
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Flex, { $flexDirection: "column", $justifyContent: "center", $flexGrow: 1, children: [
24776
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Text, { children: typeof entitlementPrice === "number" && !tiered && (entitlement.priceBehavior === EntitlementPriceBehavior.PayInAdvance || entitlement.priceBehavior === EntitlementPriceBehavior.PayAsYouGo) ? /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
24643
24777
  formatCurrency(entitlementPrice, entitlementCurrency),
24644
24778
  " ",
24645
24779
  t3("per"),
24646
24780
  " ",
24647
- entitlementPackageSize > 1 && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
24781
+ entitlementPackageSize > 1 && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
24648
24782
  formatNumber(entitlementPackageSize),
24649
24783
  " "
24650
24784
  ] }),
24651
24785
  getFeatureName(entitlement.feature, entitlementPackageSize),
24652
- entitlement.priceBehavior === EntitlementPriceBehavior.PayInAdvance && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
24786
+ entitlement.priceBehavior === EntitlementPriceBehavior.PayInAdvance && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
24653
24787
  " ",
24654
24788
  t3("per"),
24655
24789
  " ",
24656
24790
  selectedPeriod
24657
24791
  ] })
24658
- ] }) : entitlement.priceBehavior === EntitlementPriceBehavior.Tier || tiered ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
24792
+ ] }) : entitlement.priceBehavior === EntitlementPriceBehavior.Tier || tiered ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
24659
24793
  TieredPricingDetails,
24660
24794
  {
24661
24795
  entitlement,
24662
24796
  period: selectedPeriod
24663
24797
  }
24664
- ) : showCredits && entitlement.priceBehavior === EntitlementPriceBehavior.CreditBurndown && entitlement.valueCredit && entitlement.consumptionRate ? /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
24798
+ ) : showCredits && entitlement.priceBehavior === EntitlementPriceBehavior.CreditBurndown && entitlement.valueCredit && entitlement.consumptionRate ? /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
24665
24799
  formatNumber(entitlement.consumptionRate),
24666
24800
  " ",
24667
24801
  getFeatureName(
@@ -24672,7 +24806,7 @@ var Entitlement2 = ({
24672
24806
  t3("per"),
24673
24807
  " ",
24674
24808
  getFeatureName(entitlement.feature, 1)
24675
- ] }) : entitlement.priceBehavior === EntitlementPriceBehavior.CreditBurndown && creditBasedEntitlementLimit ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_jsx_runtime57.Fragment, { children: creditBasedEntitlementLimit?.period ? t3("Up to X units per period", {
24809
+ ] }) : entitlement.priceBehavior === EntitlementPriceBehavior.CreditBurndown && creditBasedEntitlementLimit ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_jsx_runtime58.Fragment, { children: creditBasedEntitlementLimit?.period ? t3("Up to X units per period", {
24676
24810
  amount: formatNumber(creditBasedEntitlementLimit.limit),
24677
24811
  units: getFeatureName(
24678
24812
  entitlement.feature,
@@ -24685,25 +24819,25 @@ var Entitlement2 = ({
24685
24819
  entitlement.feature,
24686
24820
  creditBasedEntitlementLimit.limit
24687
24821
  )
24688
- }) }) : entitlement.valueType === EntitlementValueType.Numeric || entitlement.valueType === EntitlementValueType.Unlimited || entitlement.valueType === EntitlementValueType.Trait ? /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
24822
+ }) }) : entitlement.valueType === EntitlementValueType.Numeric || entitlement.valueType === EntitlementValueType.Unlimited || entitlement.valueType === EntitlementValueType.Trait ? /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
24689
24823
  entitlement.valueType === EntitlementValueType.Unlimited && !entitlement.priceBehavior ? t3("Unlimited", {
24690
24824
  item: getFeatureName(entitlement.feature)
24691
- }) : /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
24692
- typeof limit === "number" && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
24825
+ }) : /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
24826
+ typeof limit === "number" && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
24693
24827
  formatNumber(limit),
24694
24828
  " "
24695
24829
  ] }),
24696
24830
  getFeatureName(entitlement.feature, limit)
24697
24831
  ] }),
24698
- metricPeriodName && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
24832
+ metricPeriodName && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
24699
24833
  " ",
24700
24834
  t3("per"),
24701
24835
  " ",
24702
24836
  t3(metricPeriodName)
24703
24837
  ] })
24704
24838
  ] }) : entitlement.feature.name }),
24705
- /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Text, { children: [
24706
- entitlement.priceBehavior === EntitlementPriceBehavior.Overage && typeof entitlementPrice === "number" ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_jsx_runtime57.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
24839
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Text, { children: [
24840
+ entitlement.priceBehavior === EntitlementPriceBehavior.Overage && typeof entitlementPrice === "number" ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_jsx_runtime58.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
24707
24841
  Text,
24708
24842
  {
24709
24843
  $size: 0.875 * settings.theme.typography.text.fontSize,
@@ -24713,7 +24847,7 @@ var Entitlement2 = ({
24713
24847
  " ",
24714
24848
  formatCurrency(entitlementPrice, entitlementCurrency),
24715
24849
  "/",
24716
- entitlementPackageSize > 1 && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
24850
+ entitlementPackageSize > 1 && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
24717
24851
  formatNumber(entitlementPackageSize),
24718
24852
  " "
24719
24853
  ] }),
@@ -24721,14 +24855,14 @@ var Entitlement2 = ({
24721
24855
  entitlement.feature,
24722
24856
  entitlementPackageSize
24723
24857
  ),
24724
- entitlement.feature.featureType === FeatureType.Trait && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
24858
+ entitlement.feature.featureType === FeatureType.Trait && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
24725
24859
  "/",
24726
24860
  shortenPeriod(selectedPeriod)
24727
24861
  ] })
24728
24862
  ]
24729
24863
  }
24730
- ) }) : (entitlement.priceBehavior === EntitlementPriceBehavior.Tier || tiered) && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
24731
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
24864
+ ) }) : (entitlement.priceBehavior === EntitlementPriceBehavior.Tier || tiered) && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
24865
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
24732
24866
  Text,
24733
24867
  {
24734
24868
  style: { opacity: 0.54 },
@@ -24737,7 +24871,7 @@ var Entitlement2 = ({
24737
24871
  children: t3("Tier-based")
24738
24872
  }
24739
24873
  ),
24740
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
24874
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
24741
24875
  PricingTiersTooltip,
24742
24876
  {
24743
24877
  feature: entitlement.feature,
@@ -24748,14 +24882,14 @@ var Entitlement2 = ({
24748
24882
  }
24749
24883
  )
24750
24884
  ] }),
24751
- entitlementHasHardLimit(entitlement) && entitlement.valueType === EntitlementValueType.Numeric && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
24885
+ entitlementHasHardLimit(entitlement) && entitlement.valueType === EntitlementValueType.Numeric && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
24752
24886
  HardLimitTooltip,
24753
24887
  {
24754
24888
  feature: entitlement.feature,
24755
24889
  limit: entitlement.valueNumeric
24756
24890
  }
24757
24891
  ),
24758
- entitlement.billingThreshold && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
24892
+ entitlement.billingThreshold && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
24759
24893
  BillingThresholdTooltip,
24760
24894
  {
24761
24895
  billingThreshold: entitlement.billingThreshold
@@ -24763,7 +24897,7 @@ var Entitlement2 = ({
24763
24897
  )
24764
24898
  ] })
24765
24899
  ] }),
24766
- layout.plans.showFeatureDescriptions && entitlement.feature?.description && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
24900
+ layout.plans.showFeatureDescriptions && entitlement.feature?.description && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
24767
24901
  Text,
24768
24902
  {
24769
24903
  $size: 0.875 * settings.theme.typography.text.fontSize,
@@ -24776,7 +24910,7 @@ var Entitlement2 = ({
24776
24910
  };
24777
24911
 
24778
24912
  // src/components/elements/pricing-table/Plan.tsx
24779
- var import_jsx_runtime58 = require("react/jsx-runtime");
24913
+ var import_jsx_runtime59 = require("react/jsx-runtime");
24780
24914
  var Plan2 = ({
24781
24915
  plan,
24782
24916
  index,
@@ -24819,7 +24953,7 @@ var Plan2 = ({
24819
24953
  const isUsageBasedPlan = isFreePlan && hasUsageBasedEntitlements;
24820
24954
  const headerPriceFontStyle = settings.theme.typography[layout.plans.name.fontStyle];
24821
24955
  const isExpanded = entitlementVisibility[plan.id] ?? false;
24822
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
24956
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
24823
24957
  Flex,
24824
24958
  {
24825
24959
  as: "li",
@@ -24839,7 +24973,7 @@ var Plan2 = ({
24839
24973
  $boxShadow: cardBoxShadow
24840
24974
  },
24841
24975
  children: [
24842
- /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
24976
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
24843
24977
  Flex,
24844
24978
  {
24845
24979
  $flexDirection: "column",
@@ -24850,7 +24984,7 @@ var Plan2 = ({
24850
24984
  $borderStyle: "solid",
24851
24985
  $borderColor: isLightBackground ? "hsla(0, 0%, 0%, 0.175)" : "hsla(0, 0%, 100%, 0.175)",
24852
24986
  children: [
24853
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
24987
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
24854
24988
  Text,
24855
24989
  {
24856
24990
  as: "h3",
@@ -24859,8 +24993,8 @@ var Plan2 = ({
24859
24993
  children: plan.name
24860
24994
  }
24861
24995
  ) }),
24862
- layout.plans.description.isVisible && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Box, { $marginBottom: "0.5rem", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Text, { display: layout.plans.description.fontStyle, children: plan.description }) }),
24863
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
24996
+ layout.plans.description.isVisible && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Box, { $marginBottom: "0.5rem", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Text, { display: layout.plans.description.fontStyle, children: plan.description }) }),
24997
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
24864
24998
  Text,
24865
24999
  {
24866
25000
  "data-testid": "sch-plan-price",
@@ -24876,14 +25010,14 @@ var Plan2 = ({
24876
25010
  currency: planCurrency,
24877
25011
  testSignificantDigits: false
24878
25012
  }) : formatCurrency(planPrice ?? 0, planCurrency),
24879
- !plan.custom && !isFreePlan && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("sub", { children: [
25013
+ !plan.custom && !isFreePlan && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("sub", { children: [
24880
25014
  "/",
24881
25015
  showAsMonthlyPrices && selectedPeriod === BillingProductPriceInterval.Year ? t3("month, billed yearly") : showAsMonthlyPrices && selectedPeriod === "quarter" ? t3("month, billed quarterly") : t3(selectedPeriod)
24882
25016
  ] })
24883
25017
  ]
24884
25018
  }
24885
25019
  ) }),
24886
- showCredits && credits.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
25020
+ showCredits && credits.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
24887
25021
  Flex,
24888
25022
  {
24889
25023
  as: "ul",
@@ -24895,8 +25029,8 @@ var Plan2 = ({
24895
25029
  $margin: 0,
24896
25030
  $listStyle: "none",
24897
25031
  children: credits.map((credit, idx) => {
24898
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Flex, { as: "li", $gap: "1rem", $listStyle: "none", children: [
24899
- layout.plans.showFeatureIcons && credit.icon && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
25032
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(Flex, { as: "li", $gap: "1rem", $listStyle: "none", children: [
25033
+ layout.plans.showFeatureIcons && credit.icon && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
24900
25034
  Icon3,
24901
25035
  {
24902
25036
  "data-testid": "sch-feature-icon",
@@ -24906,17 +25040,17 @@ var Plan2 = ({
24906
25040
  rounded: true
24907
25041
  }
24908
25042
  ),
24909
- credit.name && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
25043
+ credit.name && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
24910
25044
  Flex,
24911
25045
  {
24912
25046
  $flexDirection: "column",
24913
25047
  $justifyContent: "center",
24914
25048
  $gap: "0.5rem",
24915
- children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Text, { children: [
25049
+ children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(Text, { children: [
24916
25050
  credit.quantity,
24917
25051
  " ",
24918
25052
  getFeatureName(credit, credit.quantity),
24919
- credit.period && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
25053
+ credit.period && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_jsx_runtime59.Fragment, { children: [
24920
25054
  " ",
24921
25055
  t3("per"),
24922
25056
  " ",
@@ -24929,7 +25063,7 @@ var Plan2 = ({
24929
25063
  })
24930
25064
  }
24931
25065
  ),
24932
- isActivePlan && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
25066
+ isActivePlan && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
24933
25067
  Flex,
24934
25068
  {
24935
25069
  "data-testid": "sch-plan-active",
@@ -24939,7 +25073,7 @@ var Plan2 = ({
24939
25073
  $backgroundColor: settings.theme.primary,
24940
25074
  $borderRadius: "9999px",
24941
25075
  $padding: "0.125rem 0.85rem",
24942
- children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
25076
+ children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
24943
25077
  Text,
24944
25078
  {
24945
25079
  $size: 0.75 * settings.theme.typography.text.fontSize,
@@ -24952,7 +25086,7 @@ var Plan2 = ({
24952
25086
  ]
24953
25087
  }
24954
25088
  ),
24955
- /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
25089
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
24956
25090
  Flex,
24957
25091
  {
24958
25092
  $flexDirection: "column",
@@ -24961,7 +25095,7 @@ var Plan2 = ({
24961
25095
  $gap: `${cardPadding}rem`,
24962
25096
  $padding: `${0.75 * cardPadding}rem ${cardPadding}rem 0`,
24963
25097
  children: [
24964
- layout.plans.showEntitlements && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
25098
+ layout.plans.showEntitlements && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
24965
25099
  Flex,
24966
25100
  {
24967
25101
  as: "ul",
@@ -24972,14 +25106,14 @@ var Plan2 = ({
24972
25106
  $margin: 0,
24973
25107
  $listStyle: "none",
24974
25108
  children: [
24975
- layout.plans.showInclusionText && index > 0 && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Box, { $marginBottom: "1.5rem", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Text, { children: t3("Everything in", {
25109
+ layout.plans.showInclusionText && index > 0 && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Box, { $marginBottom: "1.5rem", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Text, { children: t3("Everything in", {
24976
25110
  plan: plans[index - 1].name
24977
25111
  }) }) }),
24978
25112
  (plan.entitlements ?? []).reduce(
24979
25113
  (acc, entitlement, idx) => {
24980
25114
  if (isExpanded || idx < VISIBLE_ENTITLEMENT_COUNT) {
24981
25115
  acc.push(
24982
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
25116
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
24983
25117
  Entitlement2,
24984
25118
  {
24985
25119
  entitlement,
@@ -24997,7 +25131,7 @@ var Plan2 = ({
24997
25131
  },
24998
25132
  []
24999
25133
  ),
25000
- (plan.entitlements ?? []).length > VISIBLE_ENTITLEMENT_COUNT && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
25134
+ (plan.entitlements ?? []).length > VISIBLE_ENTITLEMENT_COUNT && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
25001
25135
  Flex,
25002
25136
  {
25003
25137
  as: "li",
@@ -25007,14 +25141,14 @@ var Plan2 = ({
25007
25141
  $marginTop: "1rem",
25008
25142
  $listStyle: "none",
25009
25143
  children: [
25010
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
25144
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
25011
25145
  Icon3,
25012
25146
  {
25013
25147
  name: isExpanded ? "chevron-up" : "chevron-down",
25014
25148
  color: "#D0D0D0"
25015
25149
  }
25016
25150
  ),
25017
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
25151
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
25018
25152
  Text,
25019
25153
  {
25020
25154
  as: "button",
@@ -25043,7 +25177,7 @@ var Plan2 = ({
25043
25177
  ]
25044
25178
  }
25045
25179
  ),
25046
- isActivePlan ? /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
25180
+ isActivePlan ? /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
25047
25181
  Flex,
25048
25182
  {
25049
25183
  $justifyContent: "center",
@@ -25051,7 +25185,7 @@ var Plan2 = ({
25051
25185
  $gap: "0.25rem",
25052
25186
  $padding: "0.625rem 0",
25053
25187
  children: [
25054
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
25188
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
25055
25189
  Icon3,
25056
25190
  {
25057
25191
  name: "check-rounded",
@@ -25059,11 +25193,11 @@ var Plan2 = ({
25059
25193
  color: settings.theme.primary
25060
25194
  }
25061
25195
  ),
25062
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Text, { $size: 15, $leading: "none", children: t3("Current plan") })
25196
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Text, { $size: 15, $leading: "none", children: t3("Current plan") })
25063
25197
  ]
25064
25198
  }
25065
- ) : sharedProps.showCallToAction && (layout.upgrade.isVisible || layout.downgrade.isVisible) && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Flex, { $flexDirection: "column", $gap: "0.5rem", children: [
25066
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
25199
+ ) : sharedProps.showCallToAction && (layout.upgrade.isVisible || layout.downgrade.isVisible) && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(Flex, { $flexDirection: "column", $gap: "0.5rem", children: [
25200
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
25067
25201
  Button,
25068
25202
  {
25069
25203
  type: "button",
@@ -25101,10 +25235,10 @@ var Plan2 = ({
25101
25235
  }
25102
25236
  },
25103
25237
  $fullWidth: true,
25104
- children: plan.custom ? plan.customPlanConfig?.ctaText ?? t3("Talk to support") : !plan.valid ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Text, { as: Box, $align: "center", children: t3("Over plan limit") }) : t3("Choose plan")
25238
+ children: plan.custom ? plan.customPlanConfig?.ctaText ?? t3("Talk to support") : !plan.valid ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Text, { as: Box, $align: "center", children: t3("Over plan limit") }) : t3("Choose plan")
25105
25239
  }
25106
25240
  ),
25107
- !plan.valid && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(UsageViolationText, { violations: plan.usageViolations })
25241
+ !plan.valid && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(UsageViolationText, { violations: plan.usageViolations })
25108
25242
  ] })
25109
25243
  ]
25110
25244
  }
@@ -25115,7 +25249,7 @@ var Plan2 = ({
25115
25249
  };
25116
25250
 
25117
25251
  // src/components/elements/pricing-table/PricingTable.tsx
25118
- var import_jsx_runtime59 = require("react/jsx-runtime");
25252
+ var import_jsx_runtime60 = require("react/jsx-runtime");
25119
25253
  var resolveDesignProps8 = (props) => {
25120
25254
  return {
25121
25255
  showPeriodToggle: props.showPeriodToggle ?? true,
@@ -25220,7 +25354,7 @@ var PricingTable = (0, import_react59.forwardRef)(({ className, ...rest }, ref)
25220
25354
  }
25221
25355
  }, [data?.component, hydratePublic]);
25222
25356
  if (isPending) {
25223
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
25357
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
25224
25358
  Flex,
25225
25359
  {
25226
25360
  $width: "100%",
@@ -25228,12 +25362,12 @@ var PricingTable = (0, import_react59.forwardRef)(({ className, ...rest }, ref)
25228
25362
  $alignItems: "center",
25229
25363
  $justifyContent: "center",
25230
25364
  $padding: `${settings.theme.card.padding / TEXT_BASE_SIZE}rem`,
25231
- children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Loader, { "aria-label": "loading", $size: "2xl" })
25365
+ children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Loader, { "aria-label": "loading", $size: "2xl" })
25232
25366
  }
25233
25367
  );
25234
25368
  }
25235
25369
  if (hasNoUsableCurrency) {
25236
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Container, { children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Flex, { $justifyContent: "center", $padding: "2rem 0", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(InvalidCurrencyNotice, { invalidEntries: invalidFilterEntries }) }) });
25370
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Container, { children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Flex, { $justifyContent: "center", $padding: "2rem 0", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(InvalidCurrencyNotice, { invalidEntries: invalidFilterEntries }) }) });
25237
25371
  }
25238
25372
  const currentPlan = plans.find((plan) => plan.id === data?.company?.plan?.id);
25239
25373
  const showCallToAction = typeof data?.component !== "undefined" || typeof rest.callToActionUrl === "string" || typeof rest.onCallToAction === "function";
@@ -25242,7 +25376,7 @@ var PricingTable = (0, import_react59.forwardRef)(({ className, ...rest }, ref)
25242
25376
  rest.callToActionTarget
25243
25377
  );
25244
25378
  const Wrapper = typeof data?.component === "undefined" ? Container : import_react59.Fragment;
25245
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Wrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
25379
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Wrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
25246
25380
  FussyChild,
25247
25381
  {
25248
25382
  ref,
@@ -25252,8 +25386,8 @@ var PricingTable = (0, import_react59.forwardRef)(({ className, ...rest }, ref)
25252
25386
  $flexDirection: "column",
25253
25387
  $gap: "2rem",
25254
25388
  children: [
25255
- /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(Box, { children: [
25256
- /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
25389
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(Box, { children: [
25390
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
25257
25391
  Flex,
25258
25392
  {
25259
25393
  $flexDirection: "column",
@@ -25268,7 +25402,7 @@ var PricingTable = (0, import_react59.forwardRef)(({ className, ...rest }, ref)
25268
25402
  }
25269
25403
  },
25270
25404
  children: [
25271
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
25405
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
25272
25406
  Text,
25273
25407
  {
25274
25408
  as: "h2",
@@ -25277,8 +25411,8 @@ var PricingTable = (0, import_react59.forwardRef)(({ className, ...rest }, ref)
25277
25411
  children: props.header.isVisible && props.plans.isVisible && plans.length > 0 && t3("Plans")
25278
25412
  }
25279
25413
  ),
25280
- /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(Flex, { $alignItems: "center", $gap: "0.75rem", children: [
25281
- showCurrencySelector && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
25414
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(Flex, { $alignItems: "center", $gap: "0.75rem", children: [
25415
+ showCurrencySelector && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
25282
25416
  CurrencyToggle,
25283
25417
  {
25284
25418
  currencies,
@@ -25286,7 +25420,7 @@ var PricingTable = (0, import_react59.forwardRef)(({ className, ...rest }, ref)
25286
25420
  onSelect: setSelectedCurrency
25287
25421
  }
25288
25422
  ),
25289
- showPeriodToggle && periods.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
25423
+ showPeriodToggle && periods.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
25290
25424
  PeriodToggle,
25291
25425
  {
25292
25426
  options: periods,
@@ -25303,7 +25437,7 @@ var PricingTable = (0, import_react59.forwardRef)(({ className, ...rest }, ref)
25303
25437
  ]
25304
25438
  }
25305
25439
  ),
25306
- props.plans.isVisible && plans.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
25440
+ props.plans.isVisible && plans.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
25307
25441
  Box,
25308
25442
  {
25309
25443
  as: "ul",
@@ -25316,7 +25450,7 @@ var PricingTable = (0, import_react59.forwardRef)(({ className, ...rest }, ref)
25316
25450
  $listStyle: "none",
25317
25451
  children: plans.map((plan, index, self2) => {
25318
25452
  const planPeriod = showPeriodToggle ? selectedPeriod : plan.monthlyPrice ? BillingProductPriceInterval.Month : plan.quarterlyPrice ? "quarter" : plan.yearlyPrice ? BillingProductPriceInterval.Year : BillingProductPriceInterval.Month;
25319
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
25453
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
25320
25454
  Plan2,
25321
25455
  {
25322
25456
  plan,
@@ -25338,14 +25472,14 @@ var PricingTable = (0, import_react59.forwardRef)(({ className, ...rest }, ref)
25338
25472
  }
25339
25473
  )
25340
25474
  ] }),
25341
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Box, { children: props.addOns.isVisible && addOns.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_jsx_runtime59.Fragment, { children: [
25342
- props.header.isVisible && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
25475
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Box, { children: props.addOns.isVisible && addOns.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_jsx_runtime60.Fragment, { children: [
25476
+ props.header.isVisible && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
25343
25477
  Flex,
25344
25478
  {
25345
25479
  $justifyContent: "space-between",
25346
25480
  $alignItems: "center",
25347
25481
  $marginBottom: "1rem",
25348
- children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
25482
+ children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
25349
25483
  Text,
25350
25484
  {
25351
25485
  as: "h2",
@@ -25356,7 +25490,7 @@ var PricingTable = (0, import_react59.forwardRef)(({ className, ...rest }, ref)
25356
25490
  )
25357
25491
  }
25358
25492
  ),
25359
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
25493
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
25360
25494
  Box,
25361
25495
  {
25362
25496
  as: "ul",
@@ -25368,7 +25502,7 @@ var PricingTable = (0, import_react59.forwardRef)(({ className, ...rest }, ref)
25368
25502
  $listStyle: "none",
25369
25503
  children: addOns.map((addOn, index) => {
25370
25504
  const addOnPeriod = showPeriodToggle ? selectedPeriod : addOn.monthlyPrice ? BillingProductPriceInterval.Month : addOn.quarterlyPrice ? "quarter" : addOn.yearlyPrice ? BillingProductPriceInterval.Year : BillingProductPriceInterval.Month;
25371
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
25505
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
25372
25506
  AddOn2,
25373
25507
  {
25374
25508
  addOn,
@@ -25396,7 +25530,7 @@ PricingTable.displayName = "PricingTable";
25396
25530
 
25397
25531
  // src/components/elements/text/Text.tsx
25398
25532
  var import_react60 = require("react");
25399
- var import_jsx_runtime60 = require("react/jsx-runtime");
25533
+ var import_jsx_runtime61 = require("react/jsx-runtime");
25400
25534
  var resolveDesignProps9 = (props) => {
25401
25535
  return {
25402
25536
  text: {
@@ -25408,7 +25542,7 @@ var resolveDesignProps9 = (props) => {
25408
25542
  };
25409
25543
  var TextElement = (0, import_react60.forwardRef)(({ children, className, ...rest }, ref) => {
25410
25544
  const props = resolveDesignProps9(rest);
25411
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Element, { as: Flex, ref, className, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
25545
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Element, { as: Flex, ref, className, children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
25412
25546
  Text,
25413
25547
  {
25414
25548
  display: props.text.fontStyle,
@@ -25422,7 +25556,7 @@ TextElement.displayName = "Text";
25422
25556
 
25423
25557
  // src/components/elements/unsubscribe-button/UnsubscribeButton.tsx
25424
25558
  var import_react61 = require("react");
25425
- var import_jsx_runtime61 = require("react/jsx-runtime");
25559
+ var import_jsx_runtime62 = require("react/jsx-runtime");
25426
25560
  var buttonStyles = {
25427
25561
  primary: {
25428
25562
  color: "primary",
@@ -25458,7 +25592,7 @@ var UnsubscribeButton = (0, import_react61.forwardRef)(({ children, className, .
25458
25592
  if (!hasActiveSubscription) {
25459
25593
  return null;
25460
25594
  }
25461
- return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
25595
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
25462
25596
  Element,
25463
25597
  {
25464
25598
  as: Flex,
@@ -25466,7 +25600,7 @@ var UnsubscribeButton = (0, import_react61.forwardRef)(({ children, className, .
25466
25600
  className,
25467
25601
  $flexDirection: "column",
25468
25602
  $gap: "2rem",
25469
- children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
25603
+ children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
25470
25604
  Button,
25471
25605
  {
25472
25606
  type: "button",
@@ -25488,7 +25622,7 @@ UnsubscribeButton.displayName = "UnsubscribeButton";
25488
25622
 
25489
25623
  // src/components/elements/upcoming-bill/UpcomingBill.tsx
25490
25624
  var import_react62 = require("react");
25491
- var import_jsx_runtime62 = require("react/jsx-runtime");
25625
+ var import_jsx_runtime63 = require("react/jsx-runtime");
25492
25626
  function resolveDesignProps11(props) {
25493
25627
  return {
25494
25628
  header: {
@@ -25566,9 +25700,9 @@ var UpcomingBill = (0, import_react62.forwardRef)(({ className, ...rest }, ref)
25566
25700
  if (!data?.subscription || data.subscription.cancelAt) {
25567
25701
  return null;
25568
25702
  }
25569
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(Element, { ref, className, children: [
25570
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Flex, { as: TransitionBox, $justifyContent: "center", $alignItems: "center", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Loader, { $color: settings.theme.primary, $isLoading: isLoading }) }),
25571
- error ? /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
25703
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(Element, { ref, className, children: [
25704
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Flex, { as: TransitionBox, $justifyContent: "center", $alignItems: "center", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Loader, { $color: settings.theme.primary, $isLoading: isLoading }) }),
25705
+ error ? /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
25572
25706
  Flex,
25573
25707
  {
25574
25708
  as: TransitionBox,
@@ -25577,8 +25711,8 @@ var UpcomingBill = (0, import_react62.forwardRef)(({ className, ...rest }, ref)
25577
25711
  $alignItems: "center",
25578
25712
  $gap: "1rem",
25579
25713
  children: [
25580
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Text, { $weight: 500, $color: "#DB6669", children: t3("There was a problem retrieving your upcoming invoice.") }),
25581
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
25714
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Text, { $weight: 500, $color: "#DB6669", children: t3("There was a problem retrieving your upcoming invoice.") }),
25715
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
25582
25716
  Button,
25583
25717
  {
25584
25718
  type: "button",
@@ -25591,28 +25725,28 @@ var UpcomingBill = (0, import_react62.forwardRef)(({ className, ...rest }, ref)
25591
25725
  )
25592
25726
  ]
25593
25727
  }
25594
- ) : !isLoading && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(TransitionBox, { children: upcomingInvoice ? /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(Flex, { $flexDirection: "column", $gap: "1rem", children: [
25595
- props.header.isVisible && upcomingInvoice.dueDate && /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(Text, { display: props.header.fontStyle, children: [
25728
+ ) : !isLoading && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(TransitionBox, { children: upcomingInvoice ? /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(Flex, { $flexDirection: "column", $gap: "1rem", children: [
25729
+ props.header.isVisible && upcomingInvoice.dueDate && /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(Text, { display: props.header.fontStyle, children: [
25596
25730
  props.header.prefix,
25597
25731
  " ",
25598
25732
  toPrettyDate(upcomingInvoice.dueDate)
25599
25733
  ] }),
25600
- /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
25734
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
25601
25735
  Flex,
25602
25736
  {
25603
25737
  $justifyContent: "space-between",
25604
25738
  $alignItems: "start",
25605
25739
  $gap: "1rem",
25606
25740
  children: [
25607
- props.price.isVisible && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Text, { display: props.price.fontStyle, $leading: "none", children: formatCurrency(
25741
+ props.price.isVisible && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Text, { display: props.price.fontStyle, $leading: "none", children: formatCurrency(
25608
25742
  upcomingInvoice.amountDue,
25609
25743
  upcomingInvoice.currency
25610
25744
  ) }),
25611
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Box, { $maxWidth: "10rem", $textAlign: "right", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Text, { display: props.contractEndDate.fontStyle, children: t3("Estimated bill") }) })
25745
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Box, { $maxWidth: "10rem", $textAlign: "right", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Text, { display: props.contractEndDate.fontStyle, children: t3("Estimated bill") }) })
25612
25746
  ]
25613
25747
  }
25614
25748
  ),
25615
- balances.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
25749
+ balances.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
25616
25750
  Flex,
25617
25751
  {
25618
25752
  as: TransitionBox,
@@ -25620,20 +25754,20 @@ var UpcomingBill = (0, import_react62.forwardRef)(({ className, ...rest }, ref)
25620
25754
  $alignItems: "start",
25621
25755
  $gap: "1rem",
25622
25756
  children: [
25623
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Text, { $weight: 600, children: t3("Remaining balance") }),
25624
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Flex, { $flexDirection: "column", $gap: "0.5rem", children: balances.map((item, idx) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Text, { children: formatCurrency(item.balance, item.currency) }, idx)) })
25757
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Text, { $weight: 600, children: t3("Remaining balance") }),
25758
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Flex, { $flexDirection: "column", $gap: "0.5rem", children: balances.map((item, idx) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Text, { children: formatCurrency(item.balance, item.currency) }, idx)) })
25625
25759
  ]
25626
25760
  }
25627
25761
  ),
25628
- discounts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
25762
+ discounts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
25629
25763
  Flex,
25630
25764
  {
25631
25765
  $justifyContent: "space-between",
25632
25766
  $alignItems: "start",
25633
25767
  $gap: "1rem",
25634
25768
  children: [
25635
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Text, { $weight: 600, children: t3("Discount") }),
25636
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
25769
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Text, { $weight: 600, children: t3("Discount") }),
25770
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
25637
25771
  Flex,
25638
25772
  {
25639
25773
  $flexDirection: "column",
@@ -25643,13 +25777,13 @@ var UpcomingBill = (0, import_react62.forwardRef)(({ className, ...rest }, ref)
25643
25777
  (acc, discount) => {
25644
25778
  if (typeof discount.percentOff === "number" || typeof discount.amountOff === "number") {
25645
25779
  acc.push(
25646
- /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
25780
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
25647
25781
  Flex,
25648
25782
  {
25649
25783
  $alignItems: "center",
25650
25784
  $gap: "0.5rem",
25651
25785
  children: [
25652
- discount.customerFacingCode && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
25786
+ discount.customerFacingCode && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
25653
25787
  Flex,
25654
25788
  {
25655
25789
  $alignItems: "center",
@@ -25658,7 +25792,7 @@ var UpcomingBill = (0, import_react62.forwardRef)(({ className, ...rest }, ref)
25658
25792
  $borderStyle: "solid",
25659
25793
  $borderColor: isLightBackground ? "hsla(0, 0%, 0%, 0.15)" : "hsla(0, 0%, 100%, 0.15)",
25660
25794
  $borderRadius: "0.3125rem",
25661
- children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
25795
+ children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
25662
25796
  Text,
25663
25797
  {
25664
25798
  $size: 0.75 * settings.theme.typography.text.fontSize,
@@ -25668,7 +25802,7 @@ var UpcomingBill = (0, import_react62.forwardRef)(({ className, ...rest }, ref)
25668
25802
  )
25669
25803
  }
25670
25804
  ),
25671
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Text, { children: typeof discount.percentOff === "number" ? t3("Percent off", {
25805
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Text, { children: typeof discount.percentOff === "number" ? t3("Percent off", {
25672
25806
  percent: discount.percentOff
25673
25807
  }) : t3("Amount off", {
25674
25808
  amount: formatCurrency(
@@ -25692,7 +25826,7 @@ var UpcomingBill = (0, import_react62.forwardRef)(({ className, ...rest }, ref)
25692
25826
  ]
25693
25827
  }
25694
25828
  )
25695
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Text, { display: "heading2", children: t3("No upcoming invoice") }) })
25829
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Text, { display: "heading2", children: t3("No upcoming invoice") }) })
25696
25830
  ] });
25697
25831
  });
25698
25832
  UpcomingBill.displayName = "UpcomingBill";
@@ -29952,11 +30086,11 @@ function createRenderer(options) {
29952
30086
  }
29953
30087
 
29954
30088
  // src/components/embed/Embed.tsx
29955
- var import_jsx_runtime63 = require("react/jsx-runtime");
30089
+ var import_jsx_runtime64 = require("react/jsx-runtime");
29956
30090
  var renderer = createRenderer();
29957
30091
  var Loading = () => {
29958
30092
  const { settings } = useEmbed();
29959
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
30093
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
29960
30094
  Flex,
29961
30095
  {
29962
30096
  $width: "100%",
@@ -29964,13 +30098,13 @@ var Loading = () => {
29964
30098
  $alignItems: "center",
29965
30099
  $justifyContent: "center",
29966
30100
  $padding: `${settings.theme.card.padding / TEXT_BASE_SIZE}rem`,
29967
- children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Loader, { $color: settings.theme.primary, $size: "2xl" })
30101
+ children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Loader, { $color: settings.theme.primary, $size: "2xl" })
29968
30102
  }
29969
30103
  );
29970
30104
  };
29971
30105
  var Error2 = ({ message }) => {
29972
30106
  const { settings } = useEmbed();
29973
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
30107
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
29974
30108
  Flex,
29975
30109
  {
29976
30110
  $flexDirection: "column",
@@ -29981,8 +30115,8 @@ var Error2 = ({ message }) => {
29981
30115
  $alignItems: "center",
29982
30116
  $justifyContent: "center",
29983
30117
  children: [
29984
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Box, { $marginBottom: "0.5rem", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Text, { display: "heading1", children: "Error" }) }),
29985
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Box, { $marginBottom: "0.5rem", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Text, { children: message }) })
30118
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Box, { $marginBottom: "0.5rem", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Text, { display: "heading1", children: "Error" }) }),
30119
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Box, { $marginBottom: "0.5rem", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Text, { children: message }) })
29986
30120
  ]
29987
30121
  }
29988
30122
  );
@@ -30056,13 +30190,13 @@ var SchematicEmbed = ({ id, accessToken }) => {
30056
30190
  return stub();
30057
30191
  }
30058
30192
  if (error) {
30059
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Error2, { message: error.message });
30193
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Error2, { message: error.message });
30060
30194
  }
30061
30195
  if (accessToken?.length === 0) {
30062
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Error2, { message: "Please provide an access token." });
30196
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Error2, { message: "Please provide an access token." });
30063
30197
  }
30064
30198
  if (!accessToken?.startsWith("token_")) {
30065
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
30199
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
30066
30200
  Error2,
30067
30201
  {
30068
30202
  message: 'Invalid access token; your temporary access token will start with "token_".'
@@ -30070,9 +30204,9 @@ var SchematicEmbed = ({ id, accessToken }) => {
30070
30204
  );
30071
30205
  }
30072
30206
  if (isPending) {
30073
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Loading, {});
30207
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Loading, {});
30074
30208
  }
30075
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Box, { className: "sch-Embed", "data-testid": "sch-embed", children: children ?? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Loading, {}) });
30209
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Box, { className: "sch-Embed", "data-testid": "sch-embed", children: children ?? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Loading, {}) });
30076
30210
  };
30077
30211
  /*! Bundled license information:
30078
30212