@revenuecat/purchases-js 1.6.0 → 1.7.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.
@@ -162,7 +162,7 @@ function D(e, r) {
162
162
  (dr === null || !dr.includes(e)) && al(), Oa(e, r);
163
163
  }
164
164
  function Oa(e, r) {
165
- return e.equals(r) || (e.v, e.v = r, e.wv = ri(), Bo(e, qr), mn() && Z !== null && (Z.f & Ie) !== 0 && (Z.f & Ke) === 0 && (Pe !== null && Pe.includes(e) ? (Je(Z, qr), ba(Z)) : Tr === null ? fl([e]) : Tr.push(e))), r;
165
+ return e.equals(r) || (e.v, e.v = r, e.wv = ri(), Bo(e, qr), mn() && Z !== null && (Z.f & Ie) !== 0 && (Z.f & Ke) === 0 && (Se !== null && Se.includes(e) ? (Je(Z, qr), ba(Z)) : Tr === null ? fl([e]) : Tr.push(e))), r;
166
166
  }
167
167
  function Bo(e, r) {
168
168
  var t = e.reactions;
@@ -667,7 +667,7 @@ let dr = null;
667
667
  function ml(e) {
668
668
  dr = e;
669
669
  }
670
- let Pe = null, Me = 0, Tr = null;
670
+ let Se = null, Me = 0, Tr = null;
671
671
  function fl(e) {
672
672
  Tr = e;
673
673
  }
@@ -742,28 +742,28 @@ function Mt(e, r, t, a) {
742
742
  }
743
743
  function ti(e) {
744
744
  var _;
745
- var r = Pe, t = Me, a = Tr, n = le, o = Or, i = dr, s = $, l = e.f;
746
- Pe = /** @type {null | Value[]} */
745
+ var r = Se, t = Me, a = Tr, n = le, o = Or, i = dr, s = $, l = e.f;
746
+ Se = /** @type {null | Value[]} */
747
747
  null, Me = 0, Tr = null, le = (l & (Ke | zt)) === 0 ? e : null, Or = !rt && (l & Vr) !== 0, dr = null, $ = e.ctx, Ua++;
748
748
  try {
749
749
  var c = (
750
750
  /** @type {Function} */
751
751
  (0, e.fn)()
752
752
  ), p = e.deps;
753
- if (Pe !== null) {
753
+ if (Se !== null) {
754
754
  var u;
755
755
  if (St(e, Me), p !== null && Me > 0)
756
- for (p.length = Me + Pe.length, u = 0; u < Pe.length; u++)
757
- p[Me + u] = Pe[u];
756
+ for (p.length = Me + Se.length, u = 0; u < Se.length; u++)
757
+ p[Me + u] = Se[u];
758
758
  else
759
- e.deps = p = Pe;
759
+ e.deps = p = Se;
760
760
  if (!Or)
761
761
  for (u = Me; u < p.length; u++)
762
762
  ((_ = p[u]).reactions ?? (_.reactions = [])).push(e);
763
763
  } else p !== null && Me < p.length && (St(e, Me), p.length = Me);
764
764
  return c;
765
765
  } finally {
766
- Pe = r, Me = t, Tr = a, le = n, Or = o, dr = i, $ = s;
766
+ Se = r, Me = t, Tr = a, le = n, Or = o, dr = i, $ = s;
767
767
  }
768
768
  }
769
769
  function hl(e, r) {
@@ -778,7 +778,7 @@ function hl(e, r) {
778
778
  t === null && (r.f & Ze) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
779
779
  // to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
780
780
  // allows us to skip the expensive work of disconnecting and immediately reconnecting it
781
- (Pe === null || !Pe.includes(r)) && (Je(r, Dt), (r.f & (Vr | Kt)) === 0 && (r.f ^= Kt), St(
781
+ (Se === null || !Se.includes(r)) && (Je(r, Dt), (r.f & (Vr | Kt)) === 0 && (r.f ^= Kt), St(
782
782
  /** @type {Derived} **/
783
783
  r,
784
784
  0
@@ -926,7 +926,7 @@ function d(e) {
926
926
  if (le !== null) {
927
927
  dr !== null && dr.includes(e) && tl();
928
928
  var n = le.deps;
929
- e.rv < Ua && (e.rv = Ua, Pe === null && n !== null && n[Me] === e ? Me++ : Pe === null ? Pe = [e] : Pe.push(e), Tr !== null && Z !== null && (Z.f & Ie) !== 0 && (Z.f & Ke) === 0 && Tr.includes(e) && (Je(Z, qr), ba(Z)));
929
+ e.rv < Ua && (e.rv = Ua, Se === null && n !== null && n[Me] === e ? Me++ : Se === null ? Se = [e] : Se.push(e), Tr !== null && Z !== null && (Z.f & Ie) !== 0 && (Z.f & Ke) === 0 && Tr.includes(e) && (Je(Z, qr), ba(Z)));
930
930
  } else if (t && /** @type {Derived} */
931
931
  e.deps === null)
932
932
  for (var o = (
@@ -1366,7 +1366,7 @@ function it(e, r, t, a, n, o = null) {
1366
1366
  });
1367
1367
  }
1368
1368
  function Fl(e, r, t, a, n, o, i, s) {
1369
- var re, pe, ge, ce;
1369
+ var re, pe, me, ce;
1370
1370
  var l = (n & ws) !== 0, c = (n & (nn | on)) !== 0, p = e.length, u = r.items, _ = r.first, g = _, m, f = null, h, v = [], y = [], x, T, S, z;
1371
1371
  if (l)
1372
1372
  for (z = 0; z < p; z += 1)
@@ -1421,7 +1421,7 @@ function Fl(e, r, t, a, n, o, i, s) {
1421
1421
  var J = (n & zo) !== 0 && p === 0 ? t : null;
1422
1422
  if (l) {
1423
1423
  for (z = 0; z < ae; z += 1)
1424
- (ge = W[z].a) == null || ge.measure();
1424
+ (me = W[z].a) == null || me.measure();
1425
1425
  for (z = 0; z < ae; z += 1)
1426
1426
  (ce = W[z].a) == null || ce.fix();
1427
1427
  }
@@ -1429,10 +1429,10 @@ function Fl(e, r, t, a, n, o, i, s) {
1429
1429
  }
1430
1430
  }
1431
1431
  l && Hr(() => {
1432
- var he;
1432
+ var ke;
1433
1433
  if (h !== void 0)
1434
1434
  for (S of h)
1435
- (he = S.a) == null || he.apply();
1435
+ (ke = S.a) == null || ke.apply();
1436
1436
  }), Z.first = r.first && r.first.e, Z.last = f && f.e;
1437
1437
  }
1438
1438
  function zl(e, r, t, a) {
@@ -1498,7 +1498,7 @@ function Al(e, r, t, a, n) {
1498
1498
  var o = (s = r.$$slots) == null ? void 0 : s[t], i = !1;
1499
1499
  o === !0 && (o = r.children, i = !0), o === void 0 || o(e, i ? () => a : a);
1500
1500
  }
1501
- function _e(e, r, ...t) {
1501
+ function ge(e, r, ...t) {
1502
1502
  var a = e, n = ne, o;
1503
1503
  Dr(() => {
1504
1504
  n !== (n = r()) && (o && (Ve(o), o = null), o = Ue(() => (
@@ -2197,7 +2197,7 @@ function Gl(e, r, t) {
2197
2197
  }, n = Ue(() => t(a)), Ta();
2198
2198
  }, zr | Zt);
2199
2199
  }
2200
- var Se = /* @__PURE__ */ ((e) => (e[e.UnknownError = 0] = "UnknownError", e[e.UserCancelledError = 1] = "UserCancelledError", e[e.StoreProblemError = 2] = "StoreProblemError", e[e.PurchaseNotAllowedError = 3] = "PurchaseNotAllowedError", e[e.PurchaseInvalidError = 4] = "PurchaseInvalidError", e[e.ProductNotAvailableForPurchaseError = 5] = "ProductNotAvailableForPurchaseError", e[e.ProductAlreadyPurchasedError = 6] = "ProductAlreadyPurchasedError", e[e.ReceiptAlreadyInUseError = 7] = "ReceiptAlreadyInUseError", e[e.InvalidReceiptError = 8] = "InvalidReceiptError", e[e.MissingReceiptFileError = 9] = "MissingReceiptFileError", e[e.NetworkError = 10] = "NetworkError", e[e.InvalidCredentialsError = 11] = "InvalidCredentialsError", e[e.UnexpectedBackendResponseError = 12] = "UnexpectedBackendResponseError", e[e.InvalidAppUserIdError = 14] = "InvalidAppUserIdError", e[e.OperationAlreadyInProgressError = 15] = "OperationAlreadyInProgressError", e[e.UnknownBackendError = 16] = "UnknownBackendError", e[e.InvalidAppleSubscriptionKeyError = 17] = "InvalidAppleSubscriptionKeyError", e[e.IneligibleError = 18] = "IneligibleError", e[e.InsufficientPermissionsError = 19] = "InsufficientPermissionsError", e[e.PaymentPendingError = 20] = "PaymentPendingError", e[e.InvalidSubscriberAttributesError = 21] = "InvalidSubscriberAttributesError", e[e.LogOutWithAnonymousUserError = 22] = "LogOutWithAnonymousUserError", e[e.ConfigurationError = 23] = "ConfigurationError", e[e.UnsupportedError = 24] = "UnsupportedError", e[e.EmptySubscriberAttributesError = 25] = "EmptySubscriberAttributesError", e[e.CustomerInfoError = 28] = "CustomerInfoError", e[e.SignatureVerificationError = 36] = "SignatureVerificationError", e[e.InvalidEmailError = 38] = "InvalidEmailError", e))(Se || {});
2200
+ var he = /* @__PURE__ */ ((e) => (e[e.UnknownError = 0] = "UnknownError", e[e.UserCancelledError = 1] = "UserCancelledError", e[e.StoreProblemError = 2] = "StoreProblemError", e[e.PurchaseNotAllowedError = 3] = "PurchaseNotAllowedError", e[e.PurchaseInvalidError = 4] = "PurchaseInvalidError", e[e.ProductNotAvailableForPurchaseError = 5] = "ProductNotAvailableForPurchaseError", e[e.ProductAlreadyPurchasedError = 6] = "ProductAlreadyPurchasedError", e[e.ReceiptAlreadyInUseError = 7] = "ReceiptAlreadyInUseError", e[e.InvalidReceiptError = 8] = "InvalidReceiptError", e[e.MissingReceiptFileError = 9] = "MissingReceiptFileError", e[e.NetworkError = 10] = "NetworkError", e[e.InvalidCredentialsError = 11] = "InvalidCredentialsError", e[e.UnexpectedBackendResponseError = 12] = "UnexpectedBackendResponseError", e[e.InvalidAppUserIdError = 14] = "InvalidAppUserIdError", e[e.OperationAlreadyInProgressError = 15] = "OperationAlreadyInProgressError", e[e.UnknownBackendError = 16] = "UnknownBackendError", e[e.InvalidAppleSubscriptionKeyError = 17] = "InvalidAppleSubscriptionKeyError", e[e.IneligibleError = 18] = "IneligibleError", e[e.InsufficientPermissionsError = 19] = "InsufficientPermissionsError", e[e.PaymentPendingError = 20] = "PaymentPendingError", e[e.InvalidSubscriberAttributesError = 21] = "InvalidSubscriberAttributesError", e[e.LogOutWithAnonymousUserError = 22] = "LogOutWithAnonymousUserError", e[e.ConfigurationError = 23] = "ConfigurationError", e[e.UnsupportedError = 24] = "UnsupportedError", e[e.EmptySubscriberAttributesError = 25] = "EmptySubscriberAttributesError", e[e.CustomerInfoError = 28] = "CustomerInfoError", e[e.SignatureVerificationError = 36] = "SignatureVerificationError", e[e.InvalidEmailError = 38] = "InvalidEmailError", e))(he || {});
2201
2201
  class kt {
2202
2202
  // This is the message shown to developers. It is not intended to be displayed to end customers.
2203
2203
  static getPublicMessage(r) {
@@ -2335,16 +2335,16 @@ class kt {
2335
2335
  }
2336
2336
  }
2337
2337
  var wt = /* @__PURE__ */ ((e) => (e[e.BackendInvalidPlatform = 7e3] = "BackendInvalidPlatform", e[e.BackendInvalidEmail = 7012] = "BackendInvalidEmail", e[e.BackendStoreProblem = 7101] = "BackendStoreProblem", e[e.BackendCannotTransferPurchase = 7102] = "BackendCannotTransferPurchase", e[e.BackendInvalidReceiptToken = 7103] = "BackendInvalidReceiptToken", e[e.BackendInvalidAppStoreSharedSecret = 7104] = "BackendInvalidAppStoreSharedSecret", e[e.BackendInvalidPaymentModeOrIntroPriceNotProvided = 7105] = "BackendInvalidPaymentModeOrIntroPriceNotProvided", e[e.BackendProductIdForGoogleReceiptNotProvided = 7106] = "BackendProductIdForGoogleReceiptNotProvided", e[e.BackendInvalidPlayStoreCredentials = 7107] = "BackendInvalidPlayStoreCredentials", e[e.BackendInternalServerError = 7110] = "BackendInternalServerError", e[e.BackendEmptyAppUserId = 7220] = "BackendEmptyAppUserId", e[e.BackendInvalidAuthToken = 7224] = "BackendInvalidAuthToken", e[e.BackendInvalidAPIKey = 7225] = "BackendInvalidAPIKey", e[e.BackendBadRequest = 7226] = "BackendBadRequest", e[e.BackendPlayStoreQuotaExceeded = 7229] = "BackendPlayStoreQuotaExceeded", e[e.BackendPlayStoreInvalidPackageName = 7230] = "BackendPlayStoreInvalidPackageName", e[e.BackendPlayStoreGenericError = 7231] = "BackendPlayStoreGenericError", e[e.BackendUserIneligibleForPromoOffer = 7232] = "BackendUserIneligibleForPromoOffer", e[e.BackendInvalidAppleSubscriptionKey = 7234] = "BackendInvalidAppleSubscriptionKey", e[e.BackendSubscriberNotFound = 7259] = "BackendSubscriberNotFound", e[e.BackendInvalidSubscriberAttributes = 7263] = "BackendInvalidSubscriberAttributes", e[e.BackendInvalidSubscriberAttributesBody = 7264] = "BackendInvalidSubscriberAttributesBody", e[e.BackendProductIDsMalformed = 7662] = "BackendProductIDsMalformed", e[e.BackendAlreadySubscribedError = 7772] = "BackendAlreadySubscribedError", e[e.BackendPaymentGatewayGenericError = 7773] = "BackendPaymentGatewayGenericError", e[e.BackendOfferNotFound = 7814] = "BackendOfferNotFound", e[e.BackendNoMXRecordsFound = 7834] = "BackendNoMXRecordsFound", e[e.BackendInvalidOperationSession = 7877] = "BackendInvalidOperationSession", e[e.BackendPurchaseCannotBeCompleted = 7878] = "BackendPurchaseCannotBeCompleted", e[e.BackendEmailIsRequired = 7879] = "BackendEmailIsRequired", e[e.BackendGatewaySetupErrorStripeTaxNotActive = 7898] = "BackendGatewaySetupErrorStripeTaxNotActive", e[e.BackendGatewaySetupErrorInvalidTaxOriginAddress = 7899] = "BackendGatewaySetupErrorInvalidTaxOriginAddress", e[e.BackendGatewaySetupErrorMissingRequiredPermission = 7900] = "BackendGatewaySetupErrorMissingRequiredPermission", e[e.BackendGatewaySetupErrorSandboxModeOnly = 7901] = "BackendGatewaySetupErrorSandboxModeOnly", e))(wt || {});
2338
- class ye extends Error {
2338
+ class _e extends Error {
2339
2339
  constructor(t, a, n, o) {
2340
2340
  super(a);
2341
- M(this, "toString", () => `PurchasesError(code: ${Se[this.errorCode]}, message: ${this.message})`);
2341
+ M(this, "toString", () => `PurchasesError(code: ${he[this.errorCode]}, message: ${this.message})`);
2342
2342
  this.errorCode = t, this.underlyingErrorMessage = n, this.extra = o;
2343
2343
  }
2344
2344
  /** @internal */
2345
2345
  static getForBackendError(t, a) {
2346
2346
  const n = kt.getErrorCodeForBackendErrorCode(t);
2347
- return new ye(
2347
+ return new _e(
2348
2348
  n,
2349
2349
  kt.getPublicMessage(n),
2350
2350
  a,
@@ -2353,7 +2353,7 @@ class ye extends Error {
2353
2353
  }
2354
2354
  /** @internal */
2355
2355
  static getForPurchasesFlowError(t) {
2356
- return new ye(
2356
+ return new _e(
2357
2357
  kt.convertPurchaseFlowErrorCodeToErrorCode(
2358
2358
  t.errorCode
2359
2359
  ),
@@ -2428,7 +2428,7 @@ class de extends Error {
2428
2428
  static fromPurchasesError(r, t) {
2429
2429
  var n;
2430
2430
  let a;
2431
- return r.errorCode === Se.ProductAlreadyPurchasedError ? a = 5 : r.errorCode === Se.InvalidEmailError ? a = 4 : r.errorCode === Se.NetworkError ? a = 3 : a = de.fromBackendErrorCode((n = r.extra) == null ? void 0 : n.backendErrorCode) ?? t, new de(
2431
+ return r.errorCode === he.ProductAlreadyPurchasedError ? a = 5 : r.errorCode === he.InvalidEmailError ? a = 4 : r.errorCode === he.NetworkError ? a = 3 : a = de.fromBackendErrorCode((n = r.extra) == null ? void 0 : n.backendErrorCode) ?? t, new de(
2432
2432
  a,
2433
2433
  r.message,
2434
2434
  r.underlyingErrorMessage,
@@ -2471,7 +2471,7 @@ class Kl {
2471
2471
  );
2472
2472
  return this.operationSessionId = l.operation_session_id, l;
2473
2473
  } catch (s) {
2474
- if (s instanceof ye)
2474
+ if (s instanceof _e)
2475
2475
  throw de.fromPurchasesError(
2476
2476
  s,
2477
2477
  0
@@ -2501,7 +2501,7 @@ class Kl {
2501
2501
  a
2502
2502
  );
2503
2503
  } catch (o) {
2504
- if (o instanceof ye)
2504
+ if (o instanceof _e)
2505
2505
  throw de.fromPurchasesError(
2506
2506
  o,
2507
2507
  0
@@ -2529,7 +2529,7 @@ class Kl {
2529
2529
  r
2530
2530
  );
2531
2531
  } catch (a) {
2532
- if (a instanceof ye)
2532
+ if (a instanceof _e)
2533
2533
  throw de.fromPurchasesError(
2534
2534
  a,
2535
2535
  0
@@ -5634,7 +5634,7 @@ const Fc = {
5634
5634
  uk: Ic,
5635
5635
  vi: qc
5636
5636
  };
5637
- var we = /* @__PURE__ */ ((e) => (e.Year = "year", e.Month = "month", e.Week = "week", e.Day = "day", e))(we || {});
5637
+ var xe = /* @__PURE__ */ ((e) => (e.Year = "year", e.Month = "month", e.Week = "week", e.Day = "day", e))(xe || {});
5638
5638
  function mi(e) {
5639
5639
  const r = e.match(/^PT?([0-9]+)([MDYW])$/);
5640
5640
  if (!r || r.length < 3)
@@ -6383,7 +6383,7 @@ function Pi(e, r) {
6383
6383
  i.nodeName.includes("-")
6384
6384
  ));
6385
6385
  var c = ee(), p = Y(c);
6386
- _e(p, () => r.children ?? ne), b(s, c);
6386
+ ge(p, () => r.children ?? ne), b(s, c);
6387
6387
  }), b(e, n), H();
6388
6388
  }
6389
6389
  var $c = /* @__PURE__ */ I('<span class="rc-pw-text-wrapper svelte-11gzifq"><!></span>');
@@ -7126,7 +7126,7 @@ function Ei(e, r) {
7126
7126
  var t = xd();
7127
7127
  t.__click = [wd, r];
7128
7128
  var a = P(t);
7129
- _e(a, () => r.children ?? ne), A(() => {
7129
+ ge(a, () => r.children ?? ne), A(() => {
7130
7130
  Fr(t, li(r.class), "svelte-1wpam0z"), t.disabled = !r.onclick, j(t, "style", r.style);
7131
7131
  }), b(e, t), H();
7132
7132
  }
@@ -7231,7 +7231,7 @@ function Fd(e, r) {
7231
7231
  V(r, !0), R(e, qd);
7232
7232
  const t = U(r, "size", 3, "body-base");
7233
7233
  var a = Id(), n = P(a);
7234
- _e(n, () => r.children ?? ne), A(() => Fr(a, `rcb-typography rcb-typography-${t() ?? ""} svelte-byrjto`)), b(e, a), H();
7234
+ ge(n, () => r.children ?? ne), A(() => Fr(a, `rcb-typography rcb-typography-${t() ?? ""} svelte-byrjto`)), b(e, a), H();
7235
7235
  }
7236
7236
  const zd = {
7237
7237
  error: "#B0171F",
@@ -7311,7 +7311,7 @@ const zd = {
7311
7311
  tight: "0.20%",
7312
7312
  regular: "0",
7313
7313
  loose: "0.20%"
7314
- }, me = {
7314
+ }, fe = {
7315
7315
  heading2xl: {
7316
7316
  fontSize: Le[28],
7317
7317
  lineHeight: rr[120],
@@ -7374,79 +7374,79 @@ const zd = {
7374
7374
  }
7375
7375
  }, ar = {
7376
7376
  heading2xl: {
7377
- ...me.heading2xl,
7377
+ ...fe.heading2xl,
7378
7378
  fontSize: Le[36]
7379
7379
  },
7380
7380
  headingXl: {
7381
- ...me.headingXl,
7381
+ ...fe.headingXl,
7382
7382
  fontSize: Le[32]
7383
7383
  },
7384
7384
  headingLg: {
7385
- ...me.headingLg,
7385
+ ...fe.headingLg,
7386
7386
  fontSize: Le[24]
7387
7387
  },
7388
7388
  headingMd: {
7389
- ...me.headingMd,
7389
+ ...fe.headingMd,
7390
7390
  fontSize: Le[18]
7391
7391
  },
7392
7392
  bodyBase: {
7393
- ...me.bodyBase
7393
+ ...fe.bodyBase
7394
7394
  },
7395
7395
  bodySmall: {
7396
- ...me.bodySmall
7396
+ ...fe.bodySmall
7397
7397
  },
7398
7398
  labelButton: {
7399
- ...me.labelButton
7399
+ ...fe.labelButton
7400
7400
  },
7401
7401
  labelDefault: {
7402
- ...me.labelDefault
7402
+ ...fe.labelDefault
7403
7403
  },
7404
7404
  captionDefault: {
7405
- ...me.captionDefault
7405
+ ...fe.captionDefault
7406
7406
  },
7407
7407
  captionLink: {
7408
- ...me.captionLink
7408
+ ...fe.captionLink
7409
7409
  }
7410
7410
  }, Cd = {
7411
7411
  heading2xl: {
7412
- mobile: me.heading2xl,
7412
+ mobile: fe.heading2xl,
7413
7413
  desktop: ar.heading2xl
7414
7414
  },
7415
7415
  headingXl: {
7416
7416
  desktop: ar.headingXl,
7417
- mobile: me.headingXl
7417
+ mobile: fe.headingXl
7418
7418
  },
7419
7419
  headingLg: {
7420
7420
  desktop: ar.headingLg,
7421
- mobile: me.headingLg
7421
+ mobile: fe.headingLg
7422
7422
  },
7423
7423
  headingMd: {
7424
7424
  desktop: ar.headingMd,
7425
- mobile: me.headingMd
7425
+ mobile: fe.headingMd
7426
7426
  },
7427
7427
  bodyBase: {
7428
7428
  desktop: ar.bodyBase,
7429
- mobile: me.bodyBase
7429
+ mobile: fe.bodyBase
7430
7430
  },
7431
7431
  bodySmall: {
7432
7432
  desktop: ar.bodySmall,
7433
- mobile: me.bodySmall
7433
+ mobile: fe.bodySmall
7434
7434
  },
7435
7435
  labelButton: {
7436
7436
  desktop: ar.labelButton,
7437
- mobile: me.labelButton
7437
+ mobile: fe.labelButton
7438
7438
  },
7439
7439
  labelDefault: {
7440
7440
  desktop: ar.labelDefault,
7441
- mobile: me.labelDefault
7441
+ mobile: fe.labelDefault
7442
7442
  },
7443
7443
  captionDefault: {
7444
7444
  desktop: ar.captionDefault,
7445
- mobile: me.captionDefault
7445
+ mobile: fe.captionDefault
7446
7446
  },
7447
7447
  captionLink: {
7448
7448
  desktop: ar.captionLink,
7449
- mobile: me.captionLink
7449
+ mobile: fe.captionLink
7450
7450
  }
7451
7451
  }, Et = (e) => e.length == 7 ? {
7452
7452
  r: parseInt(e.slice(1, 3), 16),
@@ -7754,29 +7754,29 @@ function cu(e, r) {
7754
7754
  var G = (ae) => {
7755
7755
  var J = ou();
7756
7756
  it(J, 21, () => {
7757
- var re, pe, ge, ce;
7758
- return ((pe = (re = r.color_overlay) == null ? void 0 : re[r.purchaseState.colorMode]) == null ? void 0 : pe.points) || ((ce = (ge = r.color_overlay) == null ? void 0 : ge[Re]) == null ? void 0 : ce.points) || [];
7757
+ var re, pe, me, ce;
7758
+ return ((pe = (re = r.color_overlay) == null ? void 0 : re[r.purchaseState.colorMode]) == null ? void 0 : pe.points) || ((ce = (me = r.color_overlay) == null ? void 0 : me[Re]) == null ? void 0 : ce.points) || [];
7759
7759
  }, ot, (re, pe) => {
7760
- var ge = nu();
7760
+ var me = nu();
7761
7761
  A(() => {
7762
- j(ge, "offset", `${d(pe).percent}%`), j(ge, "style", `stop-color: ${d(pe).color}`);
7763
- }), b(re, ge);
7762
+ j(me, "offset", `${d(pe).percent}%`), j(me, "style", `stop-color: ${d(pe).color}`);
7763
+ }), b(re, me);
7764
7764
  }), A(() => j(J, "id", `gradient-${r.id}`)), b(ae, J);
7765
7765
  }, W = (ae) => {
7766
7766
  var J = ee(), re = Y(J);
7767
7767
  {
7768
- var pe = (ge) => {
7769
- var ce = iu(), he = P(ce);
7768
+ var pe = (me) => {
7769
+ var ce = iu(), ke = P(ce);
7770
7770
  A(() => {
7771
- var xe, vr, _r;
7772
- j(ce, "id", `gradient-${r.id}`), j(he, "style", `stop-color: ${((xe = r.color_overlay[r.purchaseState.colorMode]) == null ? void 0 : xe.value) || ((_r = (vr = r.color_overlay) == null ? void 0 : vr[Re]) == null ? void 0 : _r.value)}`);
7773
- }), b(ge, ce);
7771
+ var Pe, vr, _r;
7772
+ j(ce, "id", `gradient-${r.id}`), j(ke, "style", `stop-color: ${((Pe = r.color_overlay[r.purchaseState.colorMode]) == null ? void 0 : Pe.value) || ((_r = (vr = r.color_overlay) == null ? void 0 : vr[Re]) == null ? void 0 : _r.value)}`);
7773
+ }), b(me, ce);
7774
7774
  };
7775
7775
  N(
7776
7776
  re,
7777
- (ge) => {
7778
- var ce, he;
7779
- ((he = (ce = r.color_overlay) == null ? void 0 : ce[r.purchaseState.colorMode]) == null ? void 0 : he.type) === "hex" && ge(pe);
7777
+ (me) => {
7778
+ var ce, ke;
7779
+ ((ke = (ce = r.color_overlay) == null ? void 0 : ce[r.purchaseState.colorMode]) == null ? void 0 : ke.type) === "hex" && me(pe);
7780
7780
  },
7781
7781
  !0
7782
7782
  );
@@ -8111,7 +8111,7 @@ function Tu(e, r) {
8111
8111
  let t = U(r, "children", 8);
8112
8112
  Qe();
8113
8113
  var a = Su(), n = P(a);
8114
- _e(n, () => t() ?? ne), b(e, a), H();
8114
+ ge(n, () => t() ?? ne), b(e, a), H();
8115
8115
  }
8116
8116
  const Iu = {
8117
8117
  hash: "svelte-1bzqb13",
@@ -8125,7 +8125,7 @@ function qu(e, r) {
8125
8125
  ea(o, t, !1, (i, s) => {
8126
8126
  ra(i, null, { class: "rcb-modal-section" }, "svelte-1bzqb13", i.namespaceURI === xt, i.nodeName.includes("-"));
8127
8127
  var l = ee(), c = Y(l);
8128
- _e(c, () => a() ?? ne), b(s, l);
8128
+ ge(c, () => a() ?? ne), b(s, l);
8129
8129
  }), b(e, n), H();
8130
8130
  }
8131
8131
  var Fu = /* @__PURE__ */ I("<div><!></div>");
@@ -8141,7 +8141,7 @@ function Di(e, r) {
8141
8141
  let t = U(r, "gap", 8, "small"), a = U(r, "align", 8, "start"), n = U(r, "children", 8);
8142
8142
  Qe();
8143
8143
  var o = Fu(), i = P(o);
8144
- _e(i, () => n() ?? ne), A(() => Fr(o, `rcb-column gap-${t() ?? ""} align-${a() ?? ""} svelte-b5dygi`)), b(e, o), H();
8144
+ ge(i, () => n() ?? ne), A(() => Fr(o, `rcb-column gap-${t() ?? ""} align-${a() ?? ""} svelte-b5dygi`)), b(e, o), H();
8145
8145
  }
8146
8146
  var Du = /* @__PURE__ */ I('<div class="rcb-row svelte-1seeuxq"><!></div>');
8147
8147
  const Au = {
@@ -8153,7 +8153,7 @@ function Mu(e, r) {
8153
8153
  let t = U(r, "children", 8);
8154
8154
  Qe();
8155
8155
  var a = Du(), n = P(a);
8156
- _e(n, () => t() ?? ne), b(e, a), H();
8156
+ ge(n, () => t() ?? ne), b(e, a), H();
8157
8157
  }
8158
8158
  var ju = /* @__PURE__ */ I("<span><!></span>");
8159
8159
  const Nu = {
@@ -8207,7 +8207,7 @@ function se(e, r) {
8207
8207
  V(r, !0), R(e, Nu);
8208
8208
  const t = U(r, "size", 3, "body-base"), a = U(r, "branded", 3, !1);
8209
8209
  var n = ju(), o = P(n);
8210
- _e(o, () => r.children ?? ne), A(() => Fr(n, `rcb-typography rcb-typography-${t() ?? ""} ${(a() ? "rcb-typography-branded" : "") ?? ""} svelte-orw2sj`)), b(e, n), H();
8210
+ ge(o, () => r.children ?? ne), A(() => Fr(n, `rcb-typography rcb-typography-${t() ?? ""} ${(a() ? "rcb-typography-branded" : "") ?? ""} svelte-orw2sj`)), b(e, n), H();
8211
8211
  }
8212
8212
  var Cu = /* @__PURE__ */ I("<div><!></div>"), Ou = /* @__PURE__ */ I('<span style="display: block;"><!></span>'), Lu = /* @__PURE__ */ I("<!> <!>", 1), Bu = /* @__PURE__ */ I("<!> <!>", 1), Ru = /* @__PURE__ */ I('<div class="rcb-modal-message svelte-w46z5s" data-type="error"><!></div>');
8213
8213
  const Uu = {
@@ -8239,7 +8239,7 @@ function Vu(e, r) {
8239
8239
  {
8240
8240
  var T = (C) => {
8241
8241
  var k = Cu(), w = P(k);
8242
- _e(w, a), A(() => Fr(k, `rcb-modal-message-icon ${(d(i) ? "large" : "small") ?? ""} svelte-w46z5s`)), b(C, k);
8242
+ ge(w, a), A(() => Fr(k, `rcb-modal-message-icon ${(d(i) ? "large" : "small") ?? ""} svelte-w46z5s`)), b(C, k);
8243
8243
  };
8244
8244
  N(x, (C) => {
8245
8245
  a() && C(T);
@@ -8273,7 +8273,7 @@ function Vu(e, r) {
8273
8273
  size: "body-small",
8274
8274
  children: (v, y) => {
8275
8275
  var x = ee(), T = Y(x);
8276
- _e(T, () => r.message ?? ne), b(v, x);
8276
+ ge(T, () => r.message ?? ne), b(v, x);
8277
8277
  },
8278
8278
  $$slots: { default: !0 }
8279
8279
  });
@@ -8307,7 +8307,7 @@ function Xu(e, r) {
8307
8307
  {
8308
8308
  var p = (g) => {
8309
8309
  var m = Hu(), f = P(m);
8310
- _e(f, a), b(g, m);
8310
+ ge(f, a), b(g, m);
8311
8311
  };
8312
8312
  N(c, (g) => {
8313
8313
  a() && g(p);
@@ -8415,7 +8415,7 @@ function ur(e, r) {
8415
8415
  A(() => te(_, d(i))), b(u, _);
8416
8416
  }, p = (u) => {
8417
8417
  var _ = ee(), g = Y(_);
8418
- _e(g, () => r.children ?? ne), b(u, _);
8418
+ ge(g, () => r.children ?? ne), b(u, _);
8419
8419
  };
8420
8420
  N(l, (u) => {
8421
8421
  d(i) ? u(c) : u(p, !1);
@@ -8445,10 +8445,10 @@ function rp(e, r) {
8445
8445
  ), Kn(
8446
8446
  () => (Va(s()), a(), Xa),
8447
8447
  () => {
8448
- var h, v, y, x, T, S, z, C, k, w, q, G, W, ae, J, re, pe, ge, ce;
8448
+ var h, v, y, x, T, S, z, C, k, w, q, G, W, ae, J, re, pe, me, ce;
8449
8449
  D(o, (v = (h = s()) == null ? void 0 : h.base) != null && v.price && ((x = (y = s()) == null ? void 0 : y.trial) != null && x.period) && ((S = (T = s()) == null ? void 0 : T.base) != null && S.period) && ((k = (C = (z = s()) == null ? void 0 : z.base) == null ? void 0 : C.period) != null && k.unit) ? a().translate(L.PaymentEntryPageTrialInfo, {
8450
8450
  price: Ir((q = (w = s()) == null ? void 0 : w.base) == null ? void 0 : q.price.amountMicros, (W = (G = s()) == null ? void 0 : G.base) == null ? void 0 : W.price.currency, a().locale || a().fallbackLocale),
8451
- perFrequency: a().translatePeriodFrequency(((re = (J = (ae = s()) == null ? void 0 : ae.base) == null ? void 0 : J.period) == null ? void 0 : re.number) || 1, (ce = (ge = (pe = s()) == null ? void 0 : pe.base) == null ? void 0 : ge.period) == null ? void 0 : ce.unit, { useMultipleWords: !0 }),
8451
+ perFrequency: a().translatePeriodFrequency(((re = (J = (ae = s()) == null ? void 0 : ae.base) == null ? void 0 : J.period) == null ? void 0 : re.number) || 1, (ce = (me = (pe = s()) == null ? void 0 : pe.base) == null ? void 0 : me.period) == null ? void 0 : ce.unit, { useMultipleWords: !0 }),
8452
8452
  renewalDate: a().translateDate(Xa(/* @__PURE__ */ new Date(), s().trial.period || s().base.period, !0), {
8453
8453
  year: "numeric",
8454
8454
  month: "long",
@@ -8828,7 +8828,7 @@ const bp = {
8828
8828
  tight: "0.20%",
8829
8829
  regular: "0",
8830
8830
  loose: "0.20%"
8831
- }, fe = {
8831
+ }, ye = {
8832
8832
  heading2xl: {
8833
8833
  fontSize: Be[28],
8834
8834
  lineHeight: or[130],
@@ -8891,79 +8891,79 @@ const bp = {
8891
8891
  }
8892
8892
  }, sr = {
8893
8893
  heading2xl: {
8894
- ...fe.heading2xl,
8894
+ ...ye.heading2xl,
8895
8895
  fontSize: Be[36]
8896
8896
  },
8897
8897
  headingXl: {
8898
- ...fe.headingXl,
8898
+ ...ye.headingXl,
8899
8899
  fontSize: Be[32]
8900
8900
  },
8901
8901
  headingLg: {
8902
- ...fe.headingLg,
8902
+ ...ye.headingLg,
8903
8903
  fontSize: Be[24]
8904
8904
  },
8905
8905
  headingMd: {
8906
- ...fe.headingMd,
8906
+ ...ye.headingMd,
8907
8907
  fontSize: Be[18]
8908
8908
  },
8909
8909
  bodyBase: {
8910
- ...fe.bodyBase
8910
+ ...ye.bodyBase
8911
8911
  },
8912
8912
  bodySmall: {
8913
- ...fe.bodySmall
8913
+ ...ye.bodySmall
8914
8914
  },
8915
8915
  labelButton: {
8916
- ...fe.labelButton
8916
+ ...ye.labelButton
8917
8917
  },
8918
8918
  labelDefault: {
8919
- ...fe.labelDefault
8919
+ ...ye.labelDefault
8920
8920
  },
8921
8921
  captionDefault: {
8922
- ...fe.captionDefault
8922
+ ...ye.captionDefault
8923
8923
  },
8924
8924
  captionLink: {
8925
- ...fe.captionLink
8925
+ ...ye.captionLink
8926
8926
  }
8927
8927
  }, en = {
8928
8928
  heading2xl: {
8929
- mobile: fe.heading2xl,
8929
+ mobile: ye.heading2xl,
8930
8930
  desktop: sr.heading2xl
8931
8931
  },
8932
8932
  headingXl: {
8933
8933
  desktop: sr.headingXl,
8934
- mobile: fe.headingXl
8934
+ mobile: ye.headingXl
8935
8935
  },
8936
8936
  headingLg: {
8937
8937
  desktop: sr.headingLg,
8938
- mobile: fe.headingLg
8938
+ mobile: ye.headingLg
8939
8939
  },
8940
8940
  headingMd: {
8941
8941
  desktop: sr.headingMd,
8942
- mobile: fe.headingMd
8942
+ mobile: ye.headingMd
8943
8943
  },
8944
8944
  bodyBase: {
8945
8945
  desktop: sr.bodyBase,
8946
- mobile: fe.bodyBase
8946
+ mobile: ye.bodyBase
8947
8947
  },
8948
8948
  bodySmall: {
8949
8949
  desktop: sr.bodySmall,
8950
- mobile: fe.bodySmall
8950
+ mobile: ye.bodySmall
8951
8951
  },
8952
8952
  labelButton: {
8953
8953
  desktop: sr.labelButton,
8954
- mobile: fe.labelButton
8954
+ mobile: ye.labelButton
8955
8955
  },
8956
8956
  labelDefault: {
8957
8957
  desktop: sr.labelDefault,
8958
- mobile: fe.labelDefault
8958
+ mobile: ye.labelDefault
8959
8959
  },
8960
8960
  captionDefault: {
8961
8961
  desktop: sr.captionDefault,
8962
- mobile: fe.captionDefault
8962
+ mobile: ye.captionDefault
8963
8963
  },
8964
8964
  captionLink: {
8965
8965
  desktop: sr.captionLink,
8966
- mobile: fe.captionLink
8966
+ mobile: ye.captionLink
8967
8967
  }
8968
8968
  }, Tt = (e) => e.length == 7 ? {
8969
8969
  r: parseInt(e.slice(1, 3), 16),
@@ -9393,10 +9393,10 @@ const $r = class $r {
9393
9393
  };
9394
9394
  }
9395
9395
  static nextDateForPeriod(r, t) {
9396
- return r.unit === we.Year ? (t.setFullYear(t.getFullYear() + r.number), t) : r.unit === we.Month ? (t.setMonth(t.getMonth() + r.number), t) : r.unit === we.Week ? (t.setDate(t.getDate() + r.number * 7), t) : (r.unit === we.Day && t.setDate(t.getDate() + r.number), t);
9396
+ return r.unit === xe.Year ? (t.setFullYear(t.getFullYear() + r.number), t) : r.unit === xe.Month ? (t.setMonth(t.getMonth() + r.number), t) : r.unit === xe.Week ? (t.setDate(t.getDate() + r.number * 7), t) : (r.unit === xe.Day && t.setDate(t.getDate() + r.number), t);
9397
9397
  }
9398
9398
  static applePayPeriod(r) {
9399
- return r.unit === we.Week ? {
9399
+ return r.unit === xe.Week ? {
9400
9400
  recurringPaymentIntervalUnit: "day",
9401
9401
  recurringPaymentIntervalCount: r.number * 7
9402
9402
  } : {
@@ -9457,20 +9457,20 @@ M($r, "FORM_VALIDATED_CARD_ERROR_CODES", [
9457
9457
  "incorrect_cvc",
9458
9458
  "incorrect_number"
9459
9459
  ]);
9460
- let be = $r;
9460
+ let ve = $r;
9461
9461
  var jp = /* @__PURE__ */ I("<div></div>");
9462
9462
  function Np(e, r) {
9463
9463
  V(r, !0);
9464
9464
  let t = null;
9465
9465
  const a = "payment-element", n = async (i) => {
9466
- await r.onError(be.mapInitializationError(i.error));
9466
+ await r.onError(ve.mapInitializationError(i.error));
9467
9467
  };
9468
9468
  We(() => {
9469
9469
  var i;
9470
9470
  try {
9471
- t = be.createPaymentElement(r.elements, (i = r.brandingInfo) == null ? void 0 : i.app_name), t.mount(`#${a}`), t.on("ready", r.onReady), t.on("change", r.onChange), t.on("loaderror", n);
9471
+ t = ve.createPaymentElement(r.elements, (i = r.brandingInfo) == null ? void 0 : i.app_name), t.mount(`#${a}`), t.on("ready", r.onReady), t.on("change", r.onChange), t.on("loaderror", n);
9472
9472
  } catch (s) {
9473
- r.onError(be.mapInitializationError(s));
9473
+ r.onError(ve.mapInitializationError(s));
9474
9474
  }
9475
9475
  }), Nt(() => {
9476
9476
  t == null || t.destroy(), t = null;
@@ -9483,13 +9483,13 @@ function Op(e, r) {
9483
9483
  V(r, !0);
9484
9484
  let t = null;
9485
9485
  const a = "link-authentication-element", n = async (i) => {
9486
- await r.onError(be.mapInitializationError(i.error));
9486
+ await r.onError(ve.mapInitializationError(i.error));
9487
9487
  };
9488
9488
  We(() => {
9489
9489
  try {
9490
- t = be.createLinkAuthenticationElement(r.elements, r.email), t.mount(`#${a}`), t.on("ready", r.onReady), t.on("change", r.onChange), t.on("loaderror", n);
9490
+ t = ve.createLinkAuthenticationElement(r.elements, r.email), t.mount(`#${a}`), t.on("ready", r.onReady), t.on("change", r.onChange), t.on("loaderror", n);
9491
9491
  } catch (i) {
9492
- r.onError(be.mapInitializationError(i));
9492
+ r.onError(ve.mapInitializationError(i));
9493
9493
  }
9494
9494
  }), Nt(() => {
9495
9495
  t == null || t.destroy(), t = null;
@@ -9529,7 +9529,7 @@ function Vp(e, r) {
9529
9529
  };
9530
9530
  f.resolve(h);
9531
9531
  }, c = async (f) => {
9532
- await r.onError(be.mapInitializationError(f.error));
9532
+ await r.onError(ve.mapInitializationError(f.error));
9533
9533
  }, p = async (f) => {
9534
9534
  var h;
9535
9535
  r.onSubmit(f.expressPaymentType, ((h = f.billingDetails) == null ? void 0 : h.email) ?? "");
@@ -9538,9 +9538,9 @@ function Vp(e, r) {
9538
9538
  };
9539
9539
  We(() => {
9540
9540
  try {
9541
- o = be.createExpressCheckoutElement(r.elements, r.billingAddressRequired, r.expressCheckoutOptions), o.mount(`#${s}`), o.on("ready", u), o.on("confirm", p), o.on("loaderror", c), o.on("click", l);
9541
+ o = ve.createExpressCheckoutElement(r.elements, r.billingAddressRequired, r.expressCheckoutOptions), o.mount(`#${s}`), o.on("ready", u), o.on("confirm", p), o.on("loaderror", c), o.on("click", l);
9542
9542
  } catch (f) {
9543
- r.onError(be.mapInitializationError(f));
9543
+ r.onError(ve.mapInitializationError(f));
9544
9544
  }
9545
9545
  }), Nt(() => {
9546
9546
  o == null || o.destroy(), o = null;
@@ -9575,7 +9575,7 @@ function Yp(e, r) {
9575
9575
  V(r, !0), R(e, Wp);
9576
9576
  const t = De(), a = () => ze(i, "$translator", t);
9577
9577
  let n = U(r, "stripe", 15, null), o = U(r, "elements", 15, null);
9578
- const i = Ee(Ne), s = be.getStripeLocale(a().locale || a().fallbackLocale);
9578
+ const i = Ee(Ne), s = ve.getStripeLocale(a().locale || a().fallbackLocale);
9579
9579
  let l = X(!1), c = X(B(r.skipEmail)), p = X(!1), u = X(void 0), _ = X("mobile"), g = X(void 0);
9580
9580
  function m() {
9581
9581
  window.matchMedia && window.matchMedia("(max-width: 767px)").matches ? D(_, "mobile") : D(_, "desktop"), D(u, B({
@@ -9617,7 +9617,7 @@ function Yp(e, r) {
9617
9617
  We(() => (window.addEventListener("resize", f), () => {
9618
9618
  window.removeEventListener("resize", f);
9619
9619
  })), We(async () => {
9620
- m(), !n() && (o() || !r.stripeAccountId || !r.publishableApiKey || !r.elementsConfiguration || await be.initializeStripe(r.stripeAccountId, r.publishableApiKey, r.elementsConfiguration, r.brandingInfo, s, d(u), d(_)).then(({
9620
+ m(), !n() && (o() || !r.stripeAccountId || !r.publishableApiKey || !r.elementsConfiguration || await ve.initializeStripe(r.stripeAccountId, r.publishableApiKey, r.elementsConfiguration, r.brandingInfo, s, d(u), d(_)).then(({
9621
9621
  stripe: w,
9622
9622
  elements: q
9623
9623
  }) => {
@@ -9626,7 +9626,7 @@ function Yp(e, r) {
9626
9626
  r.onError(w);
9627
9627
  }));
9628
9628
  }), at(() => {
9629
- r.elementsConfiguration && o() && be.updateElementsConfiguration(o(), r.elementsConfiguration);
9629
+ r.elementsConfiguration && o() && ve.updateElementsConfiguration(o(), r.elementsConfiguration);
9630
9630
  });
9631
9631
  var z = ee(), C = Y(z);
9632
9632
  {
@@ -9769,7 +9769,7 @@ function a_(e, r) {
9769
9769
  taxCalculationStatus: d(s),
9770
9770
  taxAmountInMicros: d(l),
9771
9771
  taxBreakdown: d(c)
9772
- }), g = X(B(r.gatewayParams.elements_configuration)), m = X(null), f = X(null), h = X(null), v = X(B(r.customerEmail ?? void 0)), y = X(B(!!r.customerEmail)), x = X(!0), T = X(!1), S = X(void 0), z = X(void 0), C = X(void 0), k = X(!1), w = X(null), q = /* @__PURE__ */ E(() => d(x) || d(k) ? "loading" : d(z) ? "error" : "form"), G = X("unavailable"), W = /* @__PURE__ */ E(() => !d(k) && d(T) && d(y) && (d(s) === "disabled" || d(s) === "calculated" || d(s) === "miss-match")), ae = /* @__PURE__ */ E(() => i && r.managementUrl && d(_) ? be.buildStripeExpressCheckoutOptionsForSubscription(r.productDetails, d(_), i, a(), r.managementUrl) : void 0);
9772
+ }), g = X(B(r.gatewayParams.elements_configuration)), m = X(null), f = X(null), h = X(null), v = X(B(r.customerEmail ?? void 0)), y = X(B(!!r.customerEmail)), x = X(!0), T = X(!1), S = X(void 0), z = X(void 0), C = X(void 0), k = X(!1), w = X(null), q = /* @__PURE__ */ E(() => d(x) || d(k) ? "loading" : d(z) ? "error" : "form"), G = X("unavailable"), W = /* @__PURE__ */ E(() => !d(k) && d(T) && d(y) && (d(s) === "disabled" || d(s) === "calculated" || d(s) === "miss-match")), ae = /* @__PURE__ */ E(() => i && r.managementUrl && d(_) ? ve.buildStripeExpressCheckoutOptionsForSubscription(r.productDetails, d(_), i, a(), r.managementUrl) : void 0);
9773
9773
  at(() => {
9774
9774
  r.onPriceBreakdownUpdated(d(_));
9775
9775
  }), We(async () => {
@@ -9789,10 +9789,10 @@ function a_(e, r) {
9789
9789
  }), D(x, !1);
9790
9790
  }
9791
9791
  async function pe(F, Q) {
9792
- D(v, B(Q)), D(y, B(F)), await xe();
9792
+ D(v, B(Q)), D(y, B(F)), await Pe();
9793
9793
  }
9794
- async function ge({ complete: F, paymentMethod: Q }) {
9795
- D(S, B(Q)), D(T, B(F)), await xe();
9794
+ async function me({ complete: F, paymentMethod: Q }) {
9795
+ D(S, B(Q)), D(T, B(F)), await Pe();
9796
9796
  }
9797
9797
  async function ce(F) {
9798
9798
  if (F == null || F.preventDefault(), d(k)) return;
@@ -9801,10 +9801,10 @@ function a_(e, r) {
9801
9801
  });
9802
9802
  n.trackSDKEvent(Q), D(k, !0), await vr() ? r.onContinue() : D(k, !1);
9803
9803
  }
9804
- async function he(F, Q) {
9804
+ async function ke(F, Q) {
9805
9805
  D(S, B(F)), D(v, B(Q)), await ce();
9806
9806
  }
9807
- async function xe() {
9807
+ async function Pe() {
9808
9808
  d(S) !== "card" || !d(y) || !d(T) || d(k) || d(s) === "disabled" || (d(s) !== "loading" && (D(G, B(d(s))), D(s, "loading")), await _r(async (F) => {
9809
9809
  await Ge().then(() => F.throwIfAborted()).then(() => Oe(F)).then(() => F.throwIfAborted()).catch((Q) => {
9810
9810
  F.aborted || Xe(Q);
@@ -9834,7 +9834,7 @@ function a_(e, r) {
9834
9834
  }
9835
9835
  }
9836
9836
  async function Ge() {
9837
- d(h) && await be.submitElements(d(h));
9837
+ d(h) && await ve.submitElements(d(h));
9838
9838
  }
9839
9839
  async function Oe(F) {
9840
9840
  var Nr, _t;
@@ -9843,7 +9843,7 @@ function a_(e, r) {
9843
9843
  const {
9844
9844
  customerDetails: Q,
9845
9845
  confirmationTokenId: ue
9846
- } = await be.extractTaxCustomerDetails(d(h), d(f));
9846
+ } = await ve.extractTaxCustomerDetails(d(h), d(f));
9847
9847
  return F == null || F.throwIfAborted(), Q.postalCode === ((Nr = d(m)) == null ? void 0 : Nr.postalCode) && Q.countryCode === ((_t = d(m)) == null ? void 0 : _t.countryCode) || await J(Q, F), ue && d(S) !== "card" ? ue : void 0;
9848
9848
  }
9849
9849
  function kr(F) {
@@ -9858,7 +9858,7 @@ function a_(e, r) {
9858
9858
  Q && D(C, B(Q));
9859
9859
  }
9860
9860
  async function wr(F) {
9861
- !d(f) || !d(h) || !d(C) || await be.confirmElements(d(f), d(h), d(C), F);
9861
+ !d(f) || !d(h) || !d(C) || await ve.confirmElements(d(f), d(h), d(C), F);
9862
9862
  }
9863
9863
  async function Xe(F) {
9864
9864
  if (F instanceof wo)
@@ -9942,8 +9942,8 @@ function a_(e, r) {
9942
9942
  onLoadingComplete: re,
9943
9943
  onError: Yr,
9944
9944
  onEmailChange: pe,
9945
- onPaymentInfoChange: ge,
9946
- onExpressCheckoutElementSubmit: he,
9945
+ onPaymentInfoChange: me,
9946
+ onExpressCheckoutElementSubmit: ke,
9947
9947
  get expressCheckoutOptions() {
9948
9948
  return d(ae);
9949
9949
  },
@@ -10034,16 +10034,16 @@ function i_(e) {
10034
10034
  const { number: r, unit: t } = e, a = 7, n = 30, o = 365;
10035
10035
  let i;
10036
10036
  switch (t) {
10037
- case we.Day:
10037
+ case xe.Day:
10038
10038
  i = r;
10039
10039
  break;
10040
- case we.Week:
10040
+ case xe.Week:
10041
10041
  i = r * a;
10042
10042
  break;
10043
- case we.Month:
10043
+ case xe.Month:
10044
10044
  i = r * n;
10045
10045
  break;
10046
- case we.Year:
10046
+ case xe.Year:
10047
10047
  i = r * o;
10048
10048
  break;
10049
10049
  default:
@@ -10500,7 +10500,7 @@ function U_(e, r) {
10500
10500
  });
10501
10501
  }
10502
10502
  var f = O(c, 2), h = P(f), v = P(h);
10503
- _e(v, () => o() ?? ne), A(() => {
10503
+ ge(v, () => o() ?? ne), A(() => {
10504
10504
  j(c, "aria-expanded", n()), fr(f, "collapsed", !n());
10505
10505
  }), nt("click", c, s), nt("keydown", c, (y) => y.key === "Enter" || y.key === " " ? s() : null), b(e, l), H();
10506
10506
  }
@@ -10526,7 +10526,7 @@ function W_(e, r) {
10526
10526
  let t = U(r, "children", 8);
10527
10527
  Qe();
10528
10528
  var a = V_(), n = P(a);
10529
- _e(n, () => t() ?? ne), b(e, a), H();
10529
+ ge(n, () => t() ?? ne), b(e, a), H();
10530
10530
  }
10531
10531
  var Y_ = /* @__PURE__ */ I('<div class="rcb-pricing-table-row svelte-i12130" data-testid="tax-loading-skeleton"><div class="rcb-pricing-table-header svelte-i12130"><!></div> <div class="rcb-pricing-table-value svelte-i12130"><!></div></div>'), G_ = /* @__PURE__ */ I('<div class="rcb-pricing-table-row svelte-i12130"><div class="rcb-pricing-table-header svelte-i12130"> </div> <div class="rcb-pricing-table-value svelte-i12130"><!></div></div>'), X_ = /* @__PURE__ */ I('<div class="rcb-pricing-table-row svelte-i12130"><div class="rcb-pricing-table-header svelte-i12130"><!></div> <div class="rcb-pricing-table-value svelte-i12130"><!></div></div>'), Z_ = /* @__PURE__ */ I('<div class="rcb-pricing-table-row svelte-i12130"><div class="rcb-pricing-table-header svelte-i12130"><!></div> <div class="rcb-pricing-table-value svelte-i12130"><!></div></div> <!> <div class="rcb-pricing-table-separator svelte-i12130"></div>', 1), K_ = /* @__PURE__ */ I('<div class="rcb-pricing-table-row svelte-i12130"><div class="rcb-pricing-table-header svelte-i12130"><!></div> <div class="rcb-pricing-table-value svelte-i12130"><!></div></div>'), J_ = /* @__PURE__ */ I('<div class="rcb-pricing-table svelte-i12130"><!> <!> <div class="rcb-pricing-table-row rcb-header svelte-i12130"><div class="rcb-pricing-table-header svelte-i12130"><!></div> <div class="rcb-pricing-table-value svelte-i12130"><!></div></div></div>');
10532
10532
  const Q_ = {
@@ -10548,25 +10548,25 @@ function $_(e, r) {
10548
10548
  var w = Z_(), q = Y(w), G = P(q), W = P(G);
10549
10549
  se(W, {
10550
10550
  size: "body-small",
10551
- children: (ce, he) => {
10552
- var xe = ie();
10553
- A(() => te(xe, a().translate(L.PricingTotalExcludingTax))), b(ce, xe);
10551
+ children: (ce, ke) => {
10552
+ var Pe = ie();
10553
+ A(() => te(Pe, a().translate(L.PricingTotalExcludingTax))), b(ce, Pe);
10554
10554
  },
10555
10555
  $$slots: { default: !0 }
10556
10556
  });
10557
10557
  var ae = O(G, 2), J = P(ae);
10558
10558
  se(J, {
10559
10559
  size: "body-small",
10560
- children: (ce, he) => {
10561
- var xe = ie();
10562
- A(() => te(xe, a().formatPrice(r.priceBreakdown.totalExcludingTaxInMicros, r.priceBreakdown.currency))), b(ce, xe);
10560
+ children: (ce, ke) => {
10561
+ var Pe = ie();
10562
+ A(() => te(Pe, a().formatPrice(r.priceBreakdown.totalExcludingTaxInMicros, r.priceBreakdown.currency))), b(ce, Pe);
10563
10563
  },
10564
10564
  $$slots: { default: !0 }
10565
10565
  });
10566
10566
  var re = O(q, 2);
10567
10567
  {
10568
10568
  var pe = (ce) => {
10569
- var he = Y_(), xe = P(he), vr = P(xe);
10569
+ var ke = Y_(), Pe = P(ke), vr = P(Pe);
10570
10570
  se(vr, {
10571
10571
  size: "body-small",
10572
10572
  children: (Oe, kr) => {
@@ -10575,7 +10575,7 @@ function $_(e, r) {
10575
10575
  },
10576
10576
  $$slots: { default: !0 }
10577
10577
  });
10578
- var _r = O(xe, 2), Ge = P(_r);
10578
+ var _r = O(Pe, 2), Ge = P(_r);
10579
10579
  se(Ge, {
10580
10580
  size: "body-small",
10581
10581
  children: (Oe, kr) => {
@@ -10588,9 +10588,9 @@ function $_(e, r) {
10588
10588
  });
10589
10589
  },
10590
10590
  $$slots: { default: !0 }
10591
- }), b(ce, he);
10592
- }, ge = (ce) => {
10593
- var he = ee(), xe = Y(he);
10591
+ }), b(ce, ke);
10592
+ }, me = (ce) => {
10593
+ var ke = ee(), Pe = Y(ke);
10594
10594
  {
10595
10595
  var vr = (Ge) => {
10596
10596
  var Oe = G_(), kr = P(Oe), $e = P(kr);
@@ -10641,17 +10641,17 @@ function $_(e, r) {
10641
10641
  b(Ge, Oe);
10642
10642
  };
10643
10643
  N(
10644
- xe,
10644
+ Pe,
10645
10645
  (Ge) => {
10646
10646
  r.priceBreakdown.taxCalculationStatus === "pending" ? Ge(vr) : Ge(_r, !1);
10647
10647
  },
10648
10648
  !0
10649
10649
  );
10650
10650
  }
10651
- b(ce, he);
10651
+ b(ce, ke);
10652
10652
  };
10653
10653
  N(re, (ce) => {
10654
- r.priceBreakdown.taxCalculationStatus === "loading" ? ce(pe) : ce(ge, !1);
10654
+ r.priceBreakdown.taxCalculationStatus === "loading" ? ce(pe) : ce(me, !1);
10655
10655
  });
10656
10656
  }
10657
10657
  b(k, w);
@@ -10957,7 +10957,7 @@ function gg(e, r) {
10957
10957
  d(l) && c(d(l));
10958
10958
  });
10959
10959
  var p = pg(), u = P(p);
10960
- _e(u, () => r.children ?? ne), A(() => {
10960
+ ge(u, () => r.children ?? ne), A(() => {
10961
10961
  j(p, "style", d(s)), fr(p, "fullscreen", !n()), fr(p, "inside", n());
10962
10962
  }), b(e, p), H();
10963
10963
  }
@@ -10977,7 +10977,7 @@ function yg(e, r) {
10977
10977
  let t = U(r, "style", 8, ""), a = U(r, "children", 8);
10978
10978
  Qe();
10979
10979
  var n = mg(), o = P(n), i = P(o);
10980
- _e(i, () => a() ?? ne), A(() => j(o, "style", t())), b(e, n), H();
10980
+ ge(i, () => a() ?? ne), A(() => j(o, "style", t())), b(e, n), H();
10981
10981
  }
10982
10982
  const bg = (e) => e;
10983
10983
  function hg(e) {
@@ -11031,7 +11031,7 @@ function Vi(e, r) {
11031
11031
  var n = P(a), o = P(n);
11032
11032
  Fr(o, `layout-content ${t ?? ""} svelte-1w6qvx7`);
11033
11033
  var i = P(o);
11034
- _e(i, () => r.children ?? ne), pi(3, o, () => vg, () => ({ duration: 500, delay: 50 })), b(e, a), H();
11034
+ ge(i, () => r.children ?? ne), pi(3, o, () => vg, () => ({ duration: 500, delay: 50 })), b(e, a), H();
11035
11035
  }
11036
11036
  var Pg = /* @__PURE__ */ I('<div class="navbar-body svelte-jz90ay"><!></div>'), Sg = /* @__PURE__ */ I('<div class="navbar-header svelte-jz90ay"><!></div> <!>', 1), Eg = /* @__PURE__ */ I('<div class="rcb-ui-navbar svelte-jz90ay"><!></div>');
11037
11037
  const Tg = {
@@ -11052,12 +11052,12 @@ function Ig(e, r) {
11052
11052
  location: "navbar",
11053
11053
  children: (i, s) => {
11054
11054
  var l = Sg(), c = Y(l), p = P(c);
11055
- _e(p, () => r.headerContent ?? ne);
11055
+ ge(p, () => r.headerContent ?? ne);
11056
11056
  var u = O(c, 2);
11057
11057
  {
11058
11058
  var _ = (g) => {
11059
11059
  var m = Pg(), f = P(m);
11060
- _e(f, () => r.bodyContent ?? ne), b(g, m);
11060
+ ge(f, () => r.bodyContent ?? ne), b(g, m);
11061
11061
  };
11062
11062
  N(u, (g) => {
11063
11063
  r.bodyContent && g(_);
@@ -11137,7 +11137,7 @@ function Cg(e, r) {
11137
11137
  location: "main-block",
11138
11138
  children: (o, i) => {
11139
11139
  var s = ee(), l = Y(s);
11140
- _e(l, () => r.children ?? ne), b(o, s);
11140
+ ge(l, () => r.children ?? ne), b(o, s);
11141
11141
  },
11142
11142
  $$slots: { default: !0 }
11143
11143
  }), A(() => j(a, "style", d(t))), b(e, a), H();
@@ -11222,7 +11222,7 @@ function Bg(e, r) {
11222
11222
  },
11223
11223
  children: (y, x) => {
11224
11224
  var T = ee(), S = Y(T);
11225
- _e(S, () => r.mainContent ?? ne), b(y, T);
11225
+ ge(S, () => r.mainContent ?? ne), b(y, T);
11226
11226
  },
11227
11227
  $$slots: { default: !0 }
11228
11228
  }), b(u, g);
@@ -11578,7 +11578,7 @@ function im(e) {
11578
11578
  function sm(e) {
11579
11579
  if (e && !e.match(/^[A-Z]{3}$/)) {
11580
11580
  const r = `Currency code ${e} is not valid. Please provide a valid ISO 4217 currency code.`;
11581
- throw K.errorLog(r), new ye(Se.ConfigurationError, r);
11581
+ throw K.errorLog(r), new _e(he.ConfigurationError, r);
11582
11582
  }
11583
11583
  }
11584
11584
  function lm(e, r) {
@@ -11696,8 +11696,8 @@ function cm(e, r, t, a) {
11696
11696
  r,
11697
11697
  a[n]
11698
11698
  );
11699
- throw new ye(
11700
- Se.CustomerInfoError,
11699
+ throw new _e(
11700
+ he.CustomerInfoError,
11701
11701
  "Could not find entitlement product in subscriptions or non-subscriptions."
11702
11702
  );
11703
11703
  }
@@ -11879,7 +11879,7 @@ function ym(e) {
11879
11879
  }
11880
11880
  return r;
11881
11881
  }
11882
- const Gi = "1.6.0", bm = "https://api.revenuecat.com", hm = "https://e.revenue.cat";
11882
+ const Gi = "1.7.0", bm = "https://api.revenuecat.com", hm = "https://e.revenue.cat";
11883
11883
  var da;
11884
11884
  (function(e) {
11885
11885
  e[e.CONTINUE = 100] = "CONTINUE", e[e.SWITCHING_PROTOCOLS = 101] = "SWITCHING_PROTOCOLS", e[e.PROCESSING = 102] = "PROCESSING", e[e.EARLY_HINTS = 103] = "EARLY_HINTS", e[e.OK = 200] = "OK", e[e.CREATED = 201] = "CREATED", e[e.ACCEPTED = 202] = "ACCEPTED", e[e.NON_AUTHORITATIVE_INFORMATION = 203] = "NON_AUTHORITATIVE_INFORMATION", e[e.NO_CONTENT = 204] = "NO_CONTENT", e[e.RESET_CONTENT = 205] = "RESET_CONTENT", e[e.PARTIAL_CONTENT = 206] = "PARTIAL_CONTENT", e[e.MULTI_STATUS = 207] = "MULTI_STATUS", e[e.MULTIPLE_CHOICES = 300] = "MULTIPLE_CHOICES", e[e.MOVED_PERMANENTLY = 301] = "MOVED_PERMANENTLY", e[e.MOVED_TEMPORARILY = 302] = "MOVED_TEMPORARILY", e[e.SEE_OTHER = 303] = "SEE_OTHER", e[e.NOT_MODIFIED = 304] = "NOT_MODIFIED", e[e.USE_PROXY = 305] = "USE_PROXY", e[e.TEMPORARY_REDIRECT = 307] = "TEMPORARY_REDIRECT", e[e.PERMANENT_REDIRECT = 308] = "PERMANENT_REDIRECT", e[e.BAD_REQUEST = 400] = "BAD_REQUEST", e[e.UNAUTHORIZED = 401] = "UNAUTHORIZED", e[e.PAYMENT_REQUIRED = 402] = "PAYMENT_REQUIRED", e[e.FORBIDDEN = 403] = "FORBIDDEN", e[e.NOT_FOUND = 404] = "NOT_FOUND", e[e.METHOD_NOT_ALLOWED = 405] = "METHOD_NOT_ALLOWED", e[e.NOT_ACCEPTABLE = 406] = "NOT_ACCEPTABLE", e[e.PROXY_AUTHENTICATION_REQUIRED = 407] = "PROXY_AUTHENTICATION_REQUIRED", e[e.REQUEST_TIMEOUT = 408] = "REQUEST_TIMEOUT", e[e.CONFLICT = 409] = "CONFLICT", e[e.GONE = 410] = "GONE", e[e.LENGTH_REQUIRED = 411] = "LENGTH_REQUIRED", e[e.PRECONDITION_FAILED = 412] = "PRECONDITION_FAILED", e[e.REQUEST_TOO_LONG = 413] = "REQUEST_TOO_LONG", e[e.REQUEST_URI_TOO_LONG = 414] = "REQUEST_URI_TOO_LONG", e[e.UNSUPPORTED_MEDIA_TYPE = 415] = "UNSUPPORTED_MEDIA_TYPE", e[e.REQUESTED_RANGE_NOT_SATISFIABLE = 416] = "REQUESTED_RANGE_NOT_SATISFIABLE", e[e.EXPECTATION_FAILED = 417] = "EXPECTATION_FAILED", e[e.IM_A_TEAPOT = 418] = "IM_A_TEAPOT", e[e.INSUFFICIENT_SPACE_ON_RESOURCE = 419] = "INSUFFICIENT_SPACE_ON_RESOURCE", e[e.METHOD_FAILURE = 420] = "METHOD_FAILURE", e[e.MISDIRECTED_REQUEST = 421] = "MISDIRECTED_REQUEST", e[e.UNPROCESSABLE_ENTITY = 422] = "UNPROCESSABLE_ENTITY", e[e.LOCKED = 423] = "LOCKED", e[e.FAILED_DEPENDENCY = 424] = "FAILED_DEPENDENCY", e[e.UPGRADE_REQUIRED = 426] = "UPGRADE_REQUIRED", e[e.PRECONDITION_REQUIRED = 428] = "PRECONDITION_REQUIRED", e[e.TOO_MANY_REQUESTS = 429] = "TOO_MANY_REQUESTS", e[e.REQUEST_HEADER_FIELDS_TOO_LARGE = 431] = "REQUEST_HEADER_FIELDS_TOO_LARGE", e[e.UNAVAILABLE_FOR_LEGAL_REASONS = 451] = "UNAVAILABLE_FOR_LEGAL_REASONS", e[e.INTERNAL_SERVER_ERROR = 500] = "INTERNAL_SERVER_ERROR", e[e.NOT_IMPLEMENTED = 501] = "NOT_IMPLEMENTED", e[e.BAD_GATEWAY = 502] = "BAD_GATEWAY", e[e.SERVICE_UNAVAILABLE = 503] = "SERVICE_UNAVAILABLE", e[e.GATEWAY_TIMEOUT = 504] = "GATEWAY_TIMEOUT", e[e.HTTP_VERSION_NOT_SUPPORTED = 505] = "HTTP_VERSION_NOT_SUPPORTED", e[e.INSUFFICIENT_STORAGE = 507] = "INSUFFICIENT_STORAGE", e[e.NETWORK_AUTHENTICATION_REQUIRED = 511] = "NETWORK_AUTHENTICATION_REQUIRED";
@@ -11898,9 +11898,9 @@ async function gr(e, r, t) {
11898
11898
  });
11899
11899
  return await vm(c, e), await c.json();
11900
11900
  } catch (c) {
11901
- throw c instanceof TypeError ? new ye(
11902
- Se.NetworkError,
11903
- kt.getPublicMessage(Se.NetworkError),
11901
+ throw c instanceof TypeError ? new _e(
11902
+ he.NetworkError,
11903
+ kt.getPublicMessage(he.NetworkError),
11904
11904
  c.message
11905
11905
  ) : c;
11906
11906
  }
@@ -11921,7 +11921,7 @@ async function vm(e, r) {
11921
11921
  o
11922
11922
  );
11923
11923
  else
11924
- throw ye.getForBackendError(
11924
+ throw _e.getForBackendError(
11925
11925
  s,
11926
11926
  i
11927
11927
  );
@@ -11930,8 +11930,8 @@ async function vm(e, r) {
11930
11930
  }
11931
11931
  }
11932
11932
  function Da(e, r, t, a) {
11933
- throw new ye(
11934
- Se.UnknownBackendError,
11933
+ throw new _e(
11934
+ he.UnknownBackendError,
11935
11935
  "Unknown backend error.",
11936
11936
  `Request: ${e.name}. Status code: ${r}. Body: ${t}.`,
11937
11937
  { backendErrorCode: a }
@@ -12193,8 +12193,8 @@ class Dm {
12193
12193
  function Am(e) {
12194
12194
  const r = /^rcb_[a-zA-Z0-9_.-]+$/, t = /^pdl_[a-zA-Z0-9_.-]+$/;
12195
12195
  if (!r.test(e) && !t.test(e))
12196
- throw new ye(
12197
- Se.InvalidCredentialsError,
12196
+ throw new _e(
12197
+ he.InvalidCredentialsError,
12198
12198
  "Invalid API key. Use your Web Billing or Paddle API key."
12199
12199
  );
12200
12200
  }
@@ -12212,15 +12212,15 @@ function So(e) {
12212
12212
  "undefined",
12213
12213
  "unknown"
12214
12214
  ])).has(e) || e.includes("/"))
12215
- throw new ye(
12216
- Se.InvalidAppUserIdError,
12215
+ throw new _e(
12216
+ he.InvalidAppUserIdError,
12217
12217
  'Provided user id: "' + (e ?? "[Not provided]") + '" is not valid. See https://www.revenuecat.com/docs/customers/user-ids#tips-for-setting-app-user-ids for more information.'
12218
12218
  );
12219
12219
  }
12220
12220
  function Mm(e) {
12221
12221
  if (e != null && e.endsWith("/"))
12222
- throw new ye(
12223
- Se.ConfigurationError,
12222
+ throw new _e(
12223
+ he.ConfigurationError,
12224
12224
  "Invalid proxy URL. The proxy URL should not end with a trailing slash."
12225
12225
  );
12226
12226
  }
@@ -12228,8 +12228,8 @@ function jm(e) {
12228
12228
  if (e) {
12229
12229
  for (const r in e)
12230
12230
  if (wm.has(r))
12231
- throw new ye(
12232
- Se.ConfigurationError,
12231
+ throw new _e(
12232
+ he.ConfigurationError,
12233
12233
  "Invalid additional headers. Some headers are reserved for internal use."
12234
12234
  );
12235
12235
  }
@@ -12344,7 +12344,7 @@ function Eo(e, r, t, a = !1) {
12344
12344
  });
12345
12345
  }
12346
12346
  function Rm(e, r) {
12347
- return e.unit === "year" ? r.translatePeriod(e.number * 12, we.Month) : r.translatePeriod(e.number, e.unit);
12347
+ return e.unit === "year" ? r.translatePeriod(e.number * 12, xe.Month) : r.translatePeriod(e.number, e.unit);
12348
12348
  }
12349
12349
  function Um({
12350
12350
  price: e,
@@ -12383,29 +12383,29 @@ function To({
12383
12383
  full: t = !1,
12384
12384
  translator: a
12385
12385
  }) {
12386
- if (!r || !r.number || r.unit === we.Month && r.number == 1)
12386
+ if (!r || !r.number || r.unit === xe.Month && r.number == 1)
12387
12387
  return a.formatPrice(e.amountMicros, e.currency);
12388
12388
  let n = "";
12389
12389
  switch (r.unit) {
12390
- case we.Year:
12390
+ case xe.Year:
12391
12391
  n = a.formatPrice(
12392
12392
  e.amountMicros / 12,
12393
12393
  e.currency
12394
12394
  );
12395
12395
  break;
12396
- case we.Month:
12396
+ case xe.Month:
12397
12397
  n = a.formatPrice(
12398
12398
  e.amountMicros / r.number,
12399
12399
  e.currency
12400
12400
  );
12401
12401
  break;
12402
- case we.Week:
12402
+ case xe.Week:
12403
12403
  n = a.formatPrice(
12404
12404
  e.amountMicros * 4 / r.number,
12405
12405
  e.currency
12406
12406
  );
12407
12407
  break;
12408
- case we.Day:
12408
+ case xe.Day:
12409
12409
  n = a.formatPrice(
12410
12410
  e.amountMicros * 30 / r.number,
12411
12411
  e.currency
@@ -12424,7 +12424,7 @@ function To({
12424
12424
  short: !t
12425
12425
  }),
12426
12426
  formattedPricePerMonth: n,
12427
- monthPeriod: a.translatePeriodUnit(we.Month, {
12427
+ monthPeriod: a.translatePeriodUnit(xe.Month, {
12428
12428
  noWhitespace: !0,
12429
12429
  short: !t
12430
12430
  })
@@ -12528,11 +12528,11 @@ function Wm(e, r, t) {
12528
12528
  L.PeriodsLifetime
12529
12529
  ), s.sub_price_per_week = void 0, s.sub_relative_discount = void 0, s.price_per_period_full = n, s.total_price_and_per_month_full = n, s.sub_period_length = void 0, s.sub_period_abbreviated = void 0), s;
12530
12530
  }
12531
- const ve = [];
12531
+ const we = [];
12532
12532
  for (let e = 0; e < 256; ++e)
12533
- ve.push((e + 256).toString(16).slice(1));
12533
+ we.push((e + 256).toString(16).slice(1));
12534
12534
  function Ym(e, r = 0) {
12535
- return (ve[e[r + 0]] + ve[e[r + 1]] + ve[e[r + 2]] + ve[e[r + 3]] + "-" + ve[e[r + 4]] + ve[e[r + 5]] + "-" + ve[e[r + 6]] + ve[e[r + 7]] + "-" + ve[e[r + 8]] + ve[e[r + 9]] + "-" + ve[e[r + 10]] + ve[e[r + 11]] + ve[e[r + 12]] + ve[e[r + 13]] + ve[e[r + 14]] + ve[e[r + 15]]).toLowerCase();
12535
+ return (we[e[r + 0]] + we[e[r + 1]] + we[e[r + 2]] + we[e[r + 3]] + "-" + we[e[r + 4]] + we[e[r + 5]] + "-" + we[e[r + 6]] + we[e[r + 7]] + "-" + we[e[r + 8]] + we[e[r + 9]] + "-" + we[e[r + 10]] + we[e[r + 11]] + we[e[r + 12]] + we[e[r + 13]] + we[e[r + 14]] + we[e[r + 15]]).toLowerCase();
12536
12536
  }
12537
12537
  let Aa;
12538
12538
  const Gm = new Uint8Array(16);
@@ -12870,7 +12870,7 @@ var yf = /* @__PURE__ */ ((e) => (e.DisplayName = "$displayName", e.Email = "$em
12870
12870
  const qo = "$RCAnonymousID:";
12871
12871
  var Fo, ja;
12872
12872
  Fo = [Nm];
12873
- const ke = class ke {
12873
+ const be = class be {
12874
12874
  /** @internal */
12875
12875
  constructor(r, t, a = tn, n = Ma) {
12876
12876
  Wn(ja, 5, this);
@@ -12916,42 +12916,67 @@ const ke = class ke {
12916
12916
  * @experimental
12917
12917
  * */
12918
12918
  static setPlatformInfo(r) {
12919
- ke._platformInfo = r;
12919
+ be._platformInfo = r;
12920
12920
  }
12921
12921
  /** @internal */
12922
12922
  static getPlatformInfo() {
12923
- return ke._platformInfo;
12923
+ return be._platformInfo;
12924
12924
  }
12925
12925
  /**
12926
12926
  * Get the singleton instance of Purchases. It's preferred to use the instance
12927
- * obtained from the {@link Purchases.configure} method when possible.
12927
+ * obtained from the `configure` method when possible.
12928
12928
  * @throws {@link UninitializedPurchasesError} if the instance has not been initialized yet.
12929
12929
  */
12930
12930
  static getSharedInstance() {
12931
- if (ke.isConfigured())
12932
- return ke.instance;
12931
+ if (be.isConfigured())
12932
+ return be.instance;
12933
12933
  throw new Xl();
12934
12934
  }
12935
12935
  /**
12936
12936
  * Returns whether the Purchases SDK is configured or not.
12937
12937
  */
12938
12938
  static isConfigured() {
12939
- return ke.instance !== void 0;
12939
+ return be.instance !== void 0;
12940
12940
  }
12941
- /**
12942
- * Configures the Purchases SDK. This should be called as soon as your app
12943
- * has a unique user id for your user. You should only call this once, and
12944
- * keep the returned instance around for use throughout your application.
12945
- * @param apiKey - RevenueCat API Key. Can be obtained from the RevenueCat dashboard.
12946
- * @param appUserId - Your unique id for identifying the user.
12947
- * @param httpConfig - Advanced http configuration to customise the SDK usage {@link HttpConfig}.
12948
- * @param flags - Advanced functionality configuration {@link FlagsConfig}.
12949
- * @throws {@link PurchasesError} if the API key or user id are invalid.
12950
- */
12951
- static configure(r, t, a = tn, n = Ma) {
12952
- return ke.instance !== void 0 && K.warnLog(
12941
+ static configure(r, t, a, n) {
12942
+ be.instance !== void 0 && K.warnLog(
12953
12943
  "Purchases is already initialized. You normally should only configure Purchases once. Creating and returning new instance."
12954
- ), Am(r), So(t), Mm(a.proxyURL), jm(a.additionalHeaders), ke.instance = new ke(r, t, a, n), ke.getSharedInstance();
12944
+ );
12945
+ let o;
12946
+ if (typeof r == "object" && r !== null)
12947
+ o = r;
12948
+ else {
12949
+ if (typeof r != "string")
12950
+ throw new _e(
12951
+ he.ConfigurationError,
12952
+ "API key must be provided as a string"
12953
+ );
12954
+ if (typeof t != "string")
12955
+ throw new _e(
12956
+ he.ConfigurationError,
12957
+ "App user ID must be provided as a string"
12958
+ );
12959
+ o = {
12960
+ apiKey: r,
12961
+ appUserId: t,
12962
+ httpConfig: a,
12963
+ flags: n
12964
+ };
12965
+ }
12966
+ return be.configureInternal(o), be.getSharedInstance();
12967
+ }
12968
+ static configureInternal(r) {
12969
+ const { apiKey: t, appUserId: a, httpConfig: n, flags: o } = r, i = n ?? tn, s = o ?? Ma;
12970
+ be.validateConfig(r), be.instance = new be(
12971
+ t,
12972
+ a,
12973
+ i,
12974
+ s
12975
+ );
12976
+ }
12977
+ static validateConfig(r) {
12978
+ var t, a;
12979
+ Am(r.apiKey), So(r.appUserId), Mm((t = r.httpConfig) == null ? void 0 : t.proxyURL), jm((a = r.httpConfig) == null ? void 0 : a.additionalHeaders);
12955
12980
  }
12956
12981
  /**
12957
12982
  * Loads and caches some optional data in the Purchases SDK.
@@ -12970,7 +12995,7 @@ const ke = class ke {
12970
12995
  }
12971
12996
  return this._loadingResourcesPromise = this.fetchAndCacheBrandingInfo().catch((r) => {
12972
12997
  let t = `${r}`;
12973
- r instanceof ye && (t = `${r.message}. ${r.underlyingErrorMessage ? `Underlying error: ${r.underlyingErrorMessage}` : ""}`), K.errorLog(`Error fetching branding info: ${t}`);
12998
+ r instanceof _e && (t = `${r.message}. ${r.underlyingErrorMessage ? `Underlying error: ${r.underlyingErrorMessage}` : ""}`), K.errorLog(`Error fetching branding info: ${t}`);
12974
12999
  }).finally(() => {
12975
13000
  this._loadingResourcesPromise = null;
12976
13001
  }), this._loadingResourcesPromise;
@@ -13058,7 +13083,7 @@ const ke = class ke {
13058
13083
  r.onBack();
13059
13084
  return;
13060
13085
  }
13061
- n.innerHTML = "", K.debugLog("Purchase cancelled by user"), m(new ye(Se.UserCancelledError));
13086
+ n.innerHTML = "", K.debugLog("Purchase cancelled by user"), m(new _e(he.UserCancelledError));
13062
13087
  },
13063
13088
  onRestorePurchasesClicked: p,
13064
13089
  onPurchaseClicked: (f) => {
@@ -13180,7 +13205,7 @@ const ke = class ke {
13180
13205
  y || window.history.pushState({ checkoutOpen: !0 }, "");
13181
13206
  const C = this._flags.rcSource && mf.includes(this._flags.rcSource) ? void 0 : () => {
13182
13207
  const q = ip();
13183
- this.eventsTracker.trackSDKEvent(q), window.removeEventListener("popstate", C), h && qa(h), c.innerHTML = "", K.debugLog("Purchase cancelled by user"), S(new ye(Se.UserCancelledError));
13208
+ this.eventsTracker.trackSDKEvent(q), window.removeEventListener("popstate", C), h && qa(h), c.innerHTML = "", K.debugLog("Purchase cancelled by user"), S(new _e(he.UserCancelledError));
13184
13209
  };
13185
13210
  !y && C && window.addEventListener("popstate", C), h = ro(lm, {
13186
13211
  target: c,
@@ -13209,7 +13234,7 @@ const ke = class ke {
13209
13234
  errorCode: (W = q.errorCode) == null ? void 0 : W.toString(),
13210
13235
  errorMessage: q.message
13211
13236
  });
13212
- this.eventsTracker.trackSDKEvent(G), h && qa(h), c.innerHTML = "", S(ye.getForPurchasesFlowError(q));
13237
+ this.eventsTracker.trackSDKEvent(G), h && qa(h), c.innerHTML = "", S(_e.getForPurchasesFlowError(q));
13213
13238
  },
13214
13239
  purchases: this,
13215
13240
  eventsTracker: this.eventsTracker,
@@ -13288,7 +13313,7 @@ const ke = class ke {
13288
13313
  * Closes the Purchases instance. You should never have to do this normally.
13289
13314
  */
13290
13315
  close() {
13291
- ke.instance === this ? (this.eventsTracker && this.eventsTracker.dispose(), ke.instance = void 0) : K.warnLog(
13316
+ be.instance === this ? (this.eventsTracker && this.eventsTracker.dispose(), be.instance = void 0) : K.warnLog(
13292
13317
  "Trying to close a Purchases instance that is not the current instance. Ignoring."
13293
13318
  );
13294
13319
  }
@@ -13317,19 +13342,19 @@ const ke = class ke {
13317
13342
  this.eventsTracker.trackExternalEvent(r);
13318
13343
  }
13319
13344
  };
13320
- ja = Vn(null), Yn(ja, 1, "purchase", Fo, ke), Sa(ja, ke), /** @internal */
13321
- M(ke, "_platformInfo"), /** @internal */
13322
- M(ke, "instance");
13323
- let an = ke;
13345
+ ja = Vn(null), Yn(ja, 1, "purchase", Fo, be), Sa(ja, be), /** @internal */
13346
+ M(be, "_platformInfo"), /** @internal */
13347
+ M(be, "instance");
13348
+ let an = be;
13324
13349
  export {
13325
- Se as ErrorCode,
13350
+ he as ErrorCode,
13326
13351
  Ae as LogLevel,
13327
13352
  as as OfferingKeyword,
13328
13353
  o_ as PackageType,
13329
- we as PeriodUnit,
13354
+ xe as PeriodUnit,
13330
13355
  Lr as ProductType,
13331
13356
  an as Purchases,
13332
- ye as PurchasesError,
13357
+ _e as PurchasesError,
13333
13358
  yf as ReservedCustomerAttribute,
13334
13359
  Xl as UninitializedPurchasesError
13335
13360
  };