@schematichq/schematic-components 0.7.1 → 0.7.3

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.
@@ -30,28 +30,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
30
30
  mod
31
31
  ));
32
32
 
33
- // node_modules/void-elements/index.js
34
- var require_void_elements = __commonJS({
35
- "node_modules/void-elements/index.js"(exports, module) {
36
- module.exports = {
37
- "area": true,
38
- "base": true,
39
- "br": true,
40
- "col": true,
41
- "embed": true,
42
- "hr": true,
43
- "img": true,
44
- "input": true,
45
- "link": true,
46
- "meta": true,
47
- "param": true,
48
- "source": true,
49
- "track": true,
50
- "wbr": true
51
- };
52
- }
53
- });
54
-
55
33
  // node_modules/shallowequal/index.js
56
34
  var require_shallowequal = __commonJS({
57
35
  "node_modules/shallowequal/index.js"(exports, module) {
@@ -1664,6 +1642,28 @@ var require_merge = __commonJS({
1664
1642
  }
1665
1643
  });
1666
1644
 
1645
+ // node_modules/void-elements/index.js
1646
+ var require_void_elements = __commonJS({
1647
+ "node_modules/void-elements/index.js"(exports, module) {
1648
+ module.exports = {
1649
+ "area": true,
1650
+ "base": true,
1651
+ "br": true,
1652
+ "col": true,
1653
+ "embed": true,
1654
+ "hr": true,
1655
+ "img": true,
1656
+ "input": true,
1657
+ "link": true,
1658
+ "meta": true,
1659
+ "param": true,
1660
+ "source": true,
1661
+ "track": true,
1662
+ "wbr": true
1663
+ };
1664
+ }
1665
+ });
1666
+
1667
1667
  // node_modules/pluralize/pluralize.js
1668
1668
  var require_pluralize = __commonJS({
1669
1669
  "node_modules/pluralize/pluralize.js"(exports, module) {
@@ -2252,280 +2252,11 @@ var require_debounce = __commonJS({
2252
2252
  }
2253
2253
  });
2254
2254
 
2255
- // src/components/elements/included-features/IncludedFeatures.tsx
2256
- import { forwardRef as forwardRef7, useMemo as useMemo9, useRef as useRef7, useState as useState12 } from "react";
2257
-
2258
- // node_modules/react-i18next/dist/es/Trans.js
2259
- import { useContext } from "react";
2260
-
2261
- // node_modules/react-i18next/dist/es/TransWithoutContext.js
2262
- import { Fragment, isValidElement, cloneElement, createElement, Children } from "react";
2263
-
2264
- // node_modules/html-parse-stringify/dist/html-parse-stringify.module.js
2265
- var import_void_elements = __toESM(require_void_elements());
2266
-
2267
- // node_modules/react-i18next/dist/es/utils.js
2268
- var warn = (i18n, code, msg, rest) => {
2269
- const args = [msg, {
2270
- code,
2271
- ...rest || {}
2272
- }];
2273
- if (i18n?.services?.logger?.forward) {
2274
- return i18n.services.logger.forward(args, "warn", "react-i18next::", true);
2275
- }
2276
- if (isString(args[0])) args[0] = `react-i18next:: ${args[0]}`;
2277
- if (i18n?.services?.logger?.warn) {
2278
- i18n.services.logger.warn(...args);
2279
- } else if (console?.warn) {
2280
- console.warn(...args);
2281
- }
2282
- };
2283
- var alreadyWarned = {};
2284
- var warnOnce = (i18n, code, msg, rest) => {
2285
- if (isString(msg) && alreadyWarned[msg]) return;
2286
- if (isString(msg)) alreadyWarned[msg] = /* @__PURE__ */ new Date();
2287
- warn(i18n, code, msg, rest);
2288
- };
2289
- var loadedClb = (i18n, cb) => () => {
2290
- if (i18n.isInitialized) {
2291
- cb();
2292
- } else {
2293
- const initialized = () => {
2294
- setTimeout(() => {
2295
- i18n.off("initialized", initialized);
2296
- }, 0);
2297
- cb();
2298
- };
2299
- i18n.on("initialized", initialized);
2300
- }
2301
- };
2302
- var loadNamespaces = (i18n, ns, cb) => {
2303
- i18n.loadNamespaces(ns, loadedClb(i18n, cb));
2304
- };
2305
- var loadLanguages = (i18n, lng, ns, cb) => {
2306
- if (isString(ns)) ns = [ns];
2307
- if (i18n.options.preload && i18n.options.preload.indexOf(lng) > -1) return loadNamespaces(i18n, ns, cb);
2308
- ns.forEach((n) => {
2309
- if (i18n.options.ns.indexOf(n) < 0) i18n.options.ns.push(n);
2310
- });
2311
- i18n.loadLanguages(lng, loadedClb(i18n, cb));
2312
- };
2313
- var hasLoadedNamespace = (ns, i18n, options = {}) => {
2314
- if (!i18n.languages || !i18n.languages.length) {
2315
- warnOnce(i18n, "NO_LANGUAGES", "i18n.languages were undefined or empty", {
2316
- languages: i18n.languages
2317
- });
2318
- return true;
2319
- }
2320
- return i18n.hasLoadedNamespace(ns, {
2321
- lng: options.lng,
2322
- precheck: (i18nInstance2, loadNotPending) => {
2323
- if (options.bindI18n?.indexOf("languageChanging") > -1 && i18nInstance2.services.backendConnector.backend && i18nInstance2.isLanguageChangingTo && !loadNotPending(i18nInstance2.isLanguageChangingTo, ns)) return false;
2324
- }
2325
- });
2326
- };
2327
- var isString = (obj) => typeof obj === "string";
2328
- var isObject = (obj) => typeof obj === "object" && obj !== null;
2329
-
2330
- // node_modules/react-i18next/dist/es/unescape.js
2331
- var matchHtmlEntity = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
2332
- var htmlEntities = {
2333
- "&amp;": "&",
2334
- "&#38;": "&",
2335
- "&lt;": "<",
2336
- "&#60;": "<",
2337
- "&gt;": ">",
2338
- "&#62;": ">",
2339
- "&apos;": "'",
2340
- "&#39;": "'",
2341
- "&quot;": '"',
2342
- "&#34;": '"',
2343
- "&nbsp;": " ",
2344
- "&#160;": " ",
2345
- "&copy;": "\xA9",
2346
- "&#169;": "\xA9",
2347
- "&reg;": "\xAE",
2348
- "&#174;": "\xAE",
2349
- "&hellip;": "\u2026",
2350
- "&#8230;": "\u2026",
2351
- "&#x2F;": "/",
2352
- "&#47;": "/"
2353
- };
2354
- var unescapeHtmlEntity = (m2) => htmlEntities[m2];
2355
- var unescape = (text) => text.replace(matchHtmlEntity, unescapeHtmlEntity);
2255
+ // src/components/elements/button/Button.tsx
2256
+ import { forwardRef as forwardRef7 } from "react";
2356
2257
 
2357
- // node_modules/react-i18next/dist/es/defaults.js
2358
- var defaultOptions = {
2359
- bindI18n: "languageChanged",
2360
- bindI18nStore: "",
2361
- transEmptyNodeValue: "",
2362
- transSupportBasicHtmlNodes: true,
2363
- transWrapTextNodes: "",
2364
- transKeepBasicHtmlNodesFor: ["br", "strong", "i", "p"],
2365
- useSuspense: true,
2366
- unescape
2367
- };
2368
- var setDefaults = (options = {}) => {
2369
- defaultOptions = {
2370
- ...defaultOptions,
2371
- ...options
2372
- };
2373
- };
2374
- var getDefaults = () => defaultOptions;
2375
-
2376
- // node_modules/react-i18next/dist/es/i18nInstance.js
2377
- var i18nInstance;
2378
- var setI18n = (instance2) => {
2379
- i18nInstance = instance2;
2380
- };
2381
- var getI18n = () => i18nInstance;
2382
-
2383
- // node_modules/react-i18next/dist/es/context.js
2384
- import { createContext } from "react";
2385
-
2386
- // node_modules/react-i18next/dist/es/initReactI18next.js
2387
- var initReactI18next = {
2388
- type: "3rdParty",
2389
- init(instance2) {
2390
- setDefaults(instance2.options.react);
2391
- setI18n(instance2);
2392
- }
2393
- };
2394
-
2395
- // node_modules/react-i18next/dist/es/context.js
2396
- var I18nContext = createContext();
2397
- var ReportNamespaces = class {
2398
- constructor() {
2399
- this.usedNamespaces = {};
2400
- }
2401
- addUsedNamespaces(namespaces) {
2402
- namespaces.forEach((ns) => {
2403
- if (!this.usedNamespaces[ns]) this.usedNamespaces[ns] = true;
2404
- });
2405
- }
2406
- getUsedNamespaces() {
2407
- return Object.keys(this.usedNamespaces);
2408
- }
2409
- };
2410
-
2411
- // node_modules/react-i18next/dist/es/useTranslation.js
2412
- import { useState, useEffect, useContext as useContext2, useRef, useCallback } from "react";
2413
- var usePrevious = (value, ignore) => {
2414
- const ref = useRef();
2415
- useEffect(() => {
2416
- ref.current = ignore ? ref.current : value;
2417
- }, [value, ignore]);
2418
- return ref.current;
2419
- };
2420
- var alwaysNewT = (i18n, language, namespace, keyPrefix) => i18n.getFixedT(language, namespace, keyPrefix);
2421
- var useMemoizedT = (i18n, language, namespace, keyPrefix) => useCallback(alwaysNewT(i18n, language, namespace, keyPrefix), [i18n, language, namespace, keyPrefix]);
2422
- var useTranslation = (ns, props = {}) => {
2423
- const {
2424
- i18n: i18nFromProps
2425
- } = props;
2426
- const {
2427
- i18n: i18nFromContext,
2428
- defaultNS: defaultNSFromContext
2429
- } = useContext2(I18nContext) || {};
2430
- const i18n = i18nFromProps || i18nFromContext || getI18n();
2431
- if (i18n && !i18n.reportNamespaces) i18n.reportNamespaces = new ReportNamespaces();
2432
- if (!i18n) {
2433
- warnOnce(i18n, "NO_I18NEXT_INSTANCE", "useTranslation: You will need to pass in an i18next instance by using initReactI18next");
2434
- const notReadyT = (k2, optsOrDefaultValue) => {
2435
- if (isString(optsOrDefaultValue)) return optsOrDefaultValue;
2436
- if (isObject(optsOrDefaultValue) && isString(optsOrDefaultValue.defaultValue)) return optsOrDefaultValue.defaultValue;
2437
- return Array.isArray(k2) ? k2[k2.length - 1] : k2;
2438
- };
2439
- const retNotReady = [notReadyT, {}, false];
2440
- retNotReady.t = notReadyT;
2441
- retNotReady.i18n = {};
2442
- retNotReady.ready = false;
2443
- return retNotReady;
2444
- }
2445
- if (i18n.options.react?.wait) warnOnce(i18n, "DEPRECATED_OPTION", "useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
2446
- const i18nOptions = {
2447
- ...getDefaults(),
2448
- ...i18n.options.react,
2449
- ...props
2450
- };
2451
- const {
2452
- useSuspense,
2453
- keyPrefix
2454
- } = i18nOptions;
2455
- let namespaces = ns || defaultNSFromContext || i18n.options?.defaultNS;
2456
- namespaces = isString(namespaces) ? [namespaces] : namespaces || ["translation"];
2457
- i18n.reportNamespaces.addUsedNamespaces?.(namespaces);
2458
- const ready = (i18n.isInitialized || i18n.initializedStoreOnce) && namespaces.every((n) => hasLoadedNamespace(n, i18n, i18nOptions));
2459
- const memoGetT = useMemoizedT(i18n, props.lng || null, i18nOptions.nsMode === "fallback" ? namespaces : namespaces[0], keyPrefix);
2460
- const getT = () => memoGetT;
2461
- const getNewT = () => alwaysNewT(i18n, props.lng || null, i18nOptions.nsMode === "fallback" ? namespaces : namespaces[0], keyPrefix);
2462
- const [t2, setT] = useState(getT);
2463
- let joinedNS = namespaces.join();
2464
- if (props.lng) joinedNS = `${props.lng}${joinedNS}`;
2465
- const previousJoinedNS = usePrevious(joinedNS);
2466
- const isMounted = useRef(true);
2467
- useEffect(() => {
2468
- const {
2469
- bindI18n,
2470
- bindI18nStore
2471
- } = i18nOptions;
2472
- isMounted.current = true;
2473
- if (!ready && !useSuspense) {
2474
- if (props.lng) {
2475
- loadLanguages(i18n, props.lng, namespaces, () => {
2476
- if (isMounted.current) setT(getNewT);
2477
- });
2478
- } else {
2479
- loadNamespaces(i18n, namespaces, () => {
2480
- if (isMounted.current) setT(getNewT);
2481
- });
2482
- }
2483
- }
2484
- if (ready && previousJoinedNS && previousJoinedNS !== joinedNS && isMounted.current) {
2485
- setT(getNewT);
2486
- }
2487
- const boundReset = () => {
2488
- if (isMounted.current) setT(getNewT);
2489
- };
2490
- if (bindI18n) i18n?.on(bindI18n, boundReset);
2491
- if (bindI18nStore) i18n?.store.on(bindI18nStore, boundReset);
2492
- return () => {
2493
- isMounted.current = false;
2494
- if (i18n) bindI18n?.split(" ").forEach((e2) => i18n.off(e2, boundReset));
2495
- if (bindI18nStore && i18n) bindI18nStore.split(" ").forEach((e2) => i18n.store.off(e2, boundReset));
2496
- };
2497
- }, [i18n, joinedNS]);
2498
- useEffect(() => {
2499
- if (isMounted.current && ready) {
2500
- setT(getT);
2501
- }
2502
- }, [i18n, keyPrefix, ready]);
2503
- const ret = [t2, i18n, ready];
2504
- ret.t = t2;
2505
- ret.i18n = i18n;
2506
- ret.ready = ready;
2507
- if (ready) return ret;
2508
- if (!ready && !useSuspense) return ret;
2509
- throw new Promise((resolve) => {
2510
- if (props.lng) {
2511
- loadLanguages(i18n, props.lng, namespaces, () => resolve());
2512
- } else {
2513
- loadNamespaces(i18n, namespaces, () => resolve());
2514
- }
2515
- });
2516
- };
2517
-
2518
- // node_modules/react-i18next/dist/es/withTranslation.js
2519
- import { createElement as createElement2, forwardRef as forwardRefReact } from "react";
2520
-
2521
- // node_modules/react-i18next/dist/es/I18nextProvider.js
2522
- import { createElement as createElement3, useMemo } from "react";
2523
-
2524
- // node_modules/react-i18next/dist/es/withSSR.js
2525
- import { createElement as createElement4 } from "react";
2526
-
2527
- // node_modules/react-i18next/dist/es/useSSR.js
2528
- import { useContext as useContext3 } from "react";
2258
+ // src/components/layout/card/Card.tsx
2259
+ import { forwardRef as forwardRef3 } from "react";
2529
2260
 
2530
2261
  // node_modules/styled-components/node_modules/tslib/tslib.es6.mjs
2531
2262
  var __assign = function() {
@@ -3899,10 +3630,10 @@ var DEFAULT_CURRENCY = "USD";
3899
3630
  var MAXIMUM_SIGNIFICANT_DIGITS = 6;
3900
3631
 
3901
3632
  // src/hooks/useAvailablePlans.ts
3902
- import { useCallback as useCallback2, useMemo as useMemo2 } from "react";
3633
+ import { useCallback, useMemo } from "react";
3903
3634
  function useAvailablePlans(activePeriod) {
3904
3635
  const { data, mode } = useEmbed();
3905
- const getAvailablePeriods = useCallback2(() => {
3636
+ const getAvailablePeriods = useCallback(() => {
3906
3637
  const periods = [];
3907
3638
  if (data.activePlans.some((plan) => plan.monthlyPrice) || data.activeAddOns.some((addOn) => addOn.monthlyPrice)) {
3908
3639
  periods.push("month");
@@ -3912,7 +3643,7 @@ function useAvailablePlans(activePeriod) {
3912
3643
  }
3913
3644
  return periods;
3914
3645
  }, [data.activePlans, data.activeAddOns]);
3915
- const getActivePlans = useCallback2(
3646
+ const getActivePlans = useCallback(
3916
3647
  (plans) => {
3917
3648
  const customPlanExist = plans.some((plan) => plan.custom);
3918
3649
  const plansWithSelected = mode === "edit" ? plans.slice() : plans.filter(
@@ -3933,7 +3664,7 @@ function useAvailablePlans(activePeriod) {
3933
3664
  },
3934
3665
  [activePeriod, mode]
3935
3666
  );
3936
- return useMemo2(() => {
3667
+ return useMemo(() => {
3937
3668
  return {
3938
3669
  plans: getActivePlans(data.activePlans),
3939
3670
  addOns: getActivePlans(data.activeAddOns),
@@ -3951,7 +3682,7 @@ function useAvailablePlans(activePeriod) {
3951
3682
  import { useContext as useContext4 } from "react";
3952
3683
 
3953
3684
  // node_modules/i18next/dist/esm/i18next.js
3954
- var isString2 = (obj) => typeof obj === "string";
3685
+ var isString = (obj) => typeof obj === "string";
3955
3686
  var defer = () => {
3956
3687
  let res;
3957
3688
  let rej;
@@ -3974,9 +3705,9 @@ var copy2 = (a2, s2, t2) => {
3974
3705
  };
3975
3706
  var lastOfPathSeparatorRegExp = /###/g;
3976
3707
  var cleanKey = (key) => key && key.indexOf("###") > -1 ? key.replace(lastOfPathSeparatorRegExp, ".") : key;
3977
- var canNotTraverseDeeper = (object) => !object || isString2(object);
3708
+ var canNotTraverseDeeper = (object) => !object || isString(object);
3978
3709
  var getLastOfPath = (object, path, Empty) => {
3979
- const stack = !isString2(path) ? path : path.split(".");
3710
+ const stack = !isString(path) ? path : path.split(".");
3980
3711
  let stackIndex = 0;
3981
3712
  while (stackIndex < stack.length - 1) {
3982
3713
  if (canNotTraverseDeeper(object)) return {};
@@ -4045,7 +3776,7 @@ var deepExtend = (target, source, overwrite) => {
4045
3776
  for (const prop in source) {
4046
3777
  if (prop !== "__proto__" && prop !== "constructor") {
4047
3778
  if (prop in target) {
4048
- if (isString2(target[prop]) || target[prop] instanceof String || isString2(source[prop]) || source[prop] instanceof String) {
3779
+ if (isString(target[prop]) || target[prop] instanceof String || isString(source[prop]) || source[prop] instanceof String) {
4049
3780
  if (overwrite) target[prop] = source[prop];
4050
3781
  } else {
4051
3782
  deepExtend(target[prop], source[prop], overwrite);
@@ -4067,7 +3798,7 @@ var _entityMap = {
4067
3798
  "/": "&#x2F;"
4068
3799
  };
4069
3800
  var escape = (data) => {
4070
- if (isString2(data)) {
3801
+ if (isString(data)) {
4071
3802
  return data.replace(/[&<>"'\/]/g, (s2) => _entityMap[s2]);
4072
3803
  }
4073
3804
  return data;
@@ -4196,7 +3927,7 @@ var Logger = class _Logger {
4196
3927
  }
4197
3928
  forward(args, lvl, prefix2, debugOnly) {
4198
3929
  if (debugOnly && !this.debug) return null;
4199
- if (isString2(args[0])) args[0] = `${prefix2}${this.prefix} ${args[0]}`;
3930
+ if (isString(args[0])) args[0] = `${prefix2}${this.prefix} ${args[0]}`;
4200
3931
  return this.logger[lvl](args);
4201
3932
  }
4202
3933
  create(moduleName) {
@@ -4297,7 +4028,7 @@ var ResourceStore = class extends EventEmitter {
4297
4028
  if (key) {
4298
4029
  if (Array.isArray(key)) {
4299
4030
  path.push(...key);
4300
- } else if (isString2(key) && keySeparator) {
4031
+ } else if (isString(key) && keySeparator) {
4301
4032
  path.push(...key.split(keySeparator));
4302
4033
  } else {
4303
4034
  path.push(key);
@@ -4310,7 +4041,7 @@ var ResourceStore = class extends EventEmitter {
4310
4041
  ns = path[1];
4311
4042
  key = path.slice(2).join(".");
4312
4043
  }
4313
- if (result || !ignoreJSONStructure || !isString2(key)) return result;
4044
+ if (result || !ignoreJSONStructure || !isString(key)) return result;
4314
4045
  return deepFind(this.data?.[lng]?.[ns], key, keySeparator);
4315
4046
  }
4316
4047
  addResource(lng, ns, key, value) {
@@ -4334,7 +4065,7 @@ var ResourceStore = class extends EventEmitter {
4334
4065
  silent: false
4335
4066
  };
4336
4067
  for (const m2 in resources) {
4337
- if (isString2(resources[m2]) || Array.isArray(resources[m2])) this.addResource(lng, ns, m2, resources[m2], {
4068
+ if (isString(resources[m2]) || Array.isArray(resources[m2])) this.addResource(lng, ns, m2, resources[m2], {
4338
4069
  silent: true
4339
4070
  });
4340
4071
  }
@@ -4405,7 +4136,7 @@ var postProcessor = {
4405
4136
  }
4406
4137
  };
4407
4138
  var checkedLoadedFor = {};
4408
- var shouldHandleAsObject = (res) => !isString2(res) && typeof res !== "boolean" && typeof res !== "number";
4139
+ var shouldHandleAsObject = (res) => !isString(res) && typeof res !== "boolean" && typeof res !== "number";
4409
4140
  var Translator = class _Translator extends EventEmitter {
4410
4141
  constructor(services) {
4411
4142
  let options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
@@ -4442,7 +4173,7 @@ var Translator = class _Translator extends EventEmitter {
4442
4173
  if (m2 && m2.length > 0) {
4443
4174
  return {
4444
4175
  key,
4445
- namespaces: isString2(namespaces) ? [namespaces] : namespaces
4176
+ namespaces: isString(namespaces) ? [namespaces] : namespaces
4446
4177
  };
4447
4178
  }
4448
4179
  const parts = key.split(nsSeparator);
@@ -4451,7 +4182,7 @@ var Translator = class _Translator extends EventEmitter {
4451
4182
  }
4452
4183
  return {
4453
4184
  key,
4454
- namespaces: isString2(namespaces) ? [namespaces] : namespaces
4185
+ namespaces: isString(namespaces) ? [namespaces] : namespaces
4455
4186
  };
4456
4187
  }
4457
4188
  translate(keys, options, lastKey) {
@@ -4507,7 +4238,7 @@ var Translator = class _Translator extends EventEmitter {
4507
4238
  const noObject = ["[object Number]", "[object Function]", "[object RegExp]"];
4508
4239
  const joinArrays = options.joinArrays !== void 0 ? options.joinArrays : this.options.joinArrays;
4509
4240
  const handleAsObjectInI18nFormat = !this.i18nFormat || this.i18nFormat.handleAsObject;
4510
- const needsPluralHandling = options.count !== void 0 && !isString2(options.count);
4241
+ const needsPluralHandling = options.count !== void 0 && !isString(options.count);
4511
4242
  const hasDefaultValue = _Translator.hasDefaultValue(options);
4512
4243
  const defaultValueSuffix = needsPluralHandling ? this.pluralResolver.getSuffix(lng, options.count, options) : "";
4513
4244
  const defaultValueSuffixOrdinalFallback = options.ordinal && needsPluralHandling ? this.pluralResolver.getSuffix(lng, options.count, {
@@ -4521,7 +4252,7 @@ var Translator = class _Translator extends EventEmitter {
4521
4252
  }
4522
4253
  const handleAsObject = shouldHandleAsObject(resForObjHndl);
4523
4254
  const resType = Object.prototype.toString.apply(resForObjHndl);
4524
- if (handleAsObjectInI18nFormat && resForObjHndl && handleAsObject && noObject.indexOf(resType) < 0 && !(isString2(joinArrays) && Array.isArray(resForObjHndl))) {
4255
+ if (handleAsObjectInI18nFormat && resForObjHndl && handleAsObject && noObject.indexOf(resType) < 0 && !(isString(joinArrays) && Array.isArray(resForObjHndl))) {
4525
4256
  if (!options.returnObjects && !this.options.returnObjects) {
4526
4257
  if (!this.options.returnedObjectHandler) {
4527
4258
  this.logger.warn("accessing an object - but returnObjects options is not enabled!");
@@ -4567,7 +4298,7 @@ var Translator = class _Translator extends EventEmitter {
4567
4298
  }
4568
4299
  res = copy3;
4569
4300
  }
4570
- } else if (handleAsObjectInI18nFormat && isString2(joinArrays) && Array.isArray(res)) {
4301
+ } else if (handleAsObjectInI18nFormat && isString(joinArrays) && Array.isArray(res)) {
4571
4302
  res = res.join(joinArrays);
4572
4303
  if (res) res = this.extendTranslation(res, keys, options, lastKey);
4573
4304
  } else {
@@ -4661,13 +4392,13 @@ var Translator = class _Translator extends EventEmitter {
4661
4392
  }
4662
4393
  }
4663
4394
  });
4664
- const skipOnVariables = isString2(res) && (options?.interpolation?.skipOnVariables !== void 0 ? options.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
4395
+ const skipOnVariables = isString(res) && (options?.interpolation?.skipOnVariables !== void 0 ? options.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
4665
4396
  let nestBef;
4666
4397
  if (skipOnVariables) {
4667
4398
  const nb = res.match(this.interpolator.nestingRegexp);
4668
4399
  nestBef = nb && nb.length;
4669
4400
  }
4670
- let data = options.replace && !isString2(options.replace) ? options.replace : options;
4401
+ let data = options.replace && !isString(options.replace) ? options.replace : options;
4671
4402
  if (this.options.interpolation.defaultVariables) data = {
4672
4403
  ...this.options.interpolation.defaultVariables,
4673
4404
  ...data
@@ -4692,7 +4423,7 @@ var Translator = class _Translator extends EventEmitter {
4692
4423
  if (options.interpolation) this.interpolator.reset();
4693
4424
  }
4694
4425
  const postProcess = options.postProcess || this.options.postProcess;
4695
- const postProcessorNames = isString2(postProcess) ? [postProcess] : postProcess;
4426
+ const postProcessorNames = isString(postProcess) ? [postProcess] : postProcess;
4696
4427
  if (res != null && postProcessorNames?.length && options.applyPostProcessor !== false) {
4697
4428
  res = postProcessor.handle(postProcessorNames, res, key, this.options && this.options.postProcessPassResolved ? {
4698
4429
  i18nResolved: {
@@ -4711,7 +4442,7 @@ var Translator = class _Translator extends EventEmitter {
4711
4442
  let exactUsedKey;
4712
4443
  let usedLng;
4713
4444
  let usedNS;
4714
- if (isString2(keys)) keys = [keys];
4445
+ if (isString(keys)) keys = [keys];
4715
4446
  keys.forEach((k2) => {
4716
4447
  if (this.isValidLookup(found)) return;
4717
4448
  const extracted = this.extractFromKey(k2, options);
@@ -4719,9 +4450,9 @@ var Translator = class _Translator extends EventEmitter {
4719
4450
  usedKey = key;
4720
4451
  let namespaces = extracted.namespaces;
4721
4452
  if (this.options.fallbackNS) namespaces = namespaces.concat(this.options.fallbackNS);
4722
- const needsPluralHandling = options.count !== void 0 && !isString2(options.count);
4453
+ const needsPluralHandling = options.count !== void 0 && !isString(options.count);
4723
4454
  const needsZeroSuffixLookup = needsPluralHandling && !options.ordinal && options.count === 0;
4724
- const needsContextHandling = options.context !== void 0 && (isString2(options.context) || typeof options.context === "number") && options.context !== "";
4455
+ const needsContextHandling = options.context !== void 0 && (isString(options.context) || typeof options.context === "number") && options.context !== "";
4725
4456
  const codes = options.lngs ? options.lngs : this.languageUtils.toResolveHierarchy(options.lng || this.language, options.fallbackLng);
4726
4457
  namespaces.forEach((ns) => {
4727
4458
  if (this.isValidLookup(found)) return;
@@ -4793,7 +4524,7 @@ var Translator = class _Translator extends EventEmitter {
4793
4524
  getUsedParamsDetails() {
4794
4525
  let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
4795
4526
  const optionsKeys = ["defaultValue", "ordinal", "context", "replace", "lng", "lngs", "fallbackLng", "ns", "keySeparator", "nsSeparator", "returnObjects", "returnDetails", "joinArrays", "postProcess", "interpolation"];
4796
- const useOptionsReplaceForData = options.replace && !isString2(options.replace);
4527
+ const useOptionsReplaceForData = options.replace && !isString(options.replace);
4797
4528
  let data = useOptionsReplaceForData ? options.replace : options;
4798
4529
  if (useOptionsReplaceForData && typeof options.count !== "undefined") {
4799
4530
  data.count = options.count;
@@ -4846,7 +4577,7 @@ var LanguageUtil = class {
4846
4577
  return this.formatLanguageCode(p2[0]);
4847
4578
  }
4848
4579
  formatLanguageCode(code) {
4849
- if (isString2(code) && code.indexOf("-") > -1) {
4580
+ if (isString(code) && code.indexOf("-") > -1) {
4850
4581
  let formattedCode;
4851
4582
  try {
4852
4583
  formattedCode = Intl.getCanonicalLocales(code)[0];
@@ -4896,7 +4627,7 @@ var LanguageUtil = class {
4896
4627
  getFallbackCodes(fallbacks, code) {
4897
4628
  if (!fallbacks) return [];
4898
4629
  if (typeof fallbacks === "function") fallbacks = fallbacks(code);
4899
- if (isString2(fallbacks)) fallbacks = [fallbacks];
4630
+ if (isString(fallbacks)) fallbacks = [fallbacks];
4900
4631
  if (Array.isArray(fallbacks)) return fallbacks;
4901
4632
  if (!code) return fallbacks.default || [];
4902
4633
  let found = fallbacks[code];
@@ -4917,11 +4648,11 @@ var LanguageUtil = class {
4917
4648
  this.logger.warn(`rejecting language code not found in supportedLngs: ${c2}`);
4918
4649
  }
4919
4650
  };
4920
- if (isString2(code) && (code.indexOf("-") > -1 || code.indexOf("_") > -1)) {
4651
+ if (isString(code) && (code.indexOf("-") > -1 || code.indexOf("_") > -1)) {
4921
4652
  if (this.options.load !== "languageOnly") addCode(this.formatLanguageCode(code));
4922
4653
  if (this.options.load !== "languageOnly" && this.options.load !== "currentOnly") addCode(this.getScriptPartFromCode(code));
4923
4654
  if (this.options.load !== "currentOnly") addCode(this.getLanguagePartFromCode(code));
4924
- } else if (isString2(code)) {
4655
+ } else if (isString(code)) {
4925
4656
  addCode(this.formatLanguageCode(code));
4926
4657
  }
4927
4658
  fallbackCodes.forEach((fc) => {
@@ -5017,7 +4748,7 @@ var deepFindWithDefaults = function(data, defaultData, key) {
5017
4748
  let keySeparator = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ".";
5018
4749
  let ignoreJSONStructure = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : true;
5019
4750
  let path = getPathWithDefaults(data, defaultData, key);
5020
- if (!path && ignoreJSONStructure && isString2(key)) {
4751
+ if (!path && ignoreJSONStructure && isString(key)) {
5021
4752
  path = deepFind(data, key, keySeparator);
5022
4753
  if (path === void 0) path = deepFind(defaultData, key, keySeparator);
5023
4754
  }
@@ -5127,7 +4858,7 @@ var Interpolator = class {
5127
4858
  if (value === void 0) {
5128
4859
  if (typeof missingInterpolationHandler === "function") {
5129
4860
  const temp = missingInterpolationHandler(str, match2, options);
5130
- value = isString2(temp) ? temp : "";
4861
+ value = isString(temp) ? temp : "";
5131
4862
  } else if (options && Object.prototype.hasOwnProperty.call(options, matchedVar)) {
5132
4863
  value = "";
5133
4864
  } else if (skipOnVariables) {
@@ -5137,7 +4868,7 @@ var Interpolator = class {
5137
4868
  this.logger.warn(`missed to pass in variable ${matchedVar} for interpolating ${str}`);
5138
4869
  value = "";
5139
4870
  }
5140
- } else if (!isString2(value) && !this.useRawValueToEscape) {
4871
+ } else if (!isString(value) && !this.useRawValueToEscape) {
5141
4872
  value = makeString(value);
5142
4873
  }
5143
4874
  const safeValue = todo.safeValue(value);
@@ -5191,7 +4922,7 @@ var Interpolator = class {
5191
4922
  clonedOptions = {
5192
4923
  ...options
5193
4924
  };
5194
- clonedOptions = clonedOptions.replace && !isString2(clonedOptions.replace) ? clonedOptions.replace : clonedOptions;
4925
+ clonedOptions = clonedOptions.replace && !isString(clonedOptions.replace) ? clonedOptions.replace : clonedOptions;
5195
4926
  clonedOptions.applyPostProcessor = false;
5196
4927
  delete clonedOptions.defaultValue;
5197
4928
  let doReduce = false;
@@ -5202,8 +4933,8 @@ var Interpolator = class {
5202
4933
  doReduce = true;
5203
4934
  }
5204
4935
  value = fc(handleHasOptions.call(this, match2[1].trim(), clonedOptions), clonedOptions);
5205
- if (value && match2[0] === str && !isString2(value)) return value;
5206
- if (!isString2(value)) value = makeString(value);
4936
+ if (value && match2[0] === str && !isString(value)) return value;
4937
+ if (!isString(value)) value = makeString(value);
5207
4938
  if (!value) {
5208
4939
  this.logger.warn(`missed to resolve ${match2[1]} for nesting ${str}`);
5209
4940
  value = "";
@@ -5513,8 +5244,8 @@ var Connector = class extends EventEmitter {
5513
5244
  this.logger.warn("No backend was added via i18next.use. Will not load resources.");
5514
5245
  return callback && callback();
5515
5246
  }
5516
- if (isString2(languages)) languages = this.languageUtils.toResolveHierarchy(languages);
5517
- if (isString2(namespaces)) namespaces = [namespaces];
5247
+ if (isString(languages)) languages = this.languageUtils.toResolveHierarchy(languages);
5248
+ if (isString(namespaces)) namespaces = [namespaces];
5518
5249
  const toLoad = this.queueLoad(languages, namespaces, options, callback);
5519
5250
  if (!toLoad.toLoad.length) {
5520
5251
  if (!toLoad.pending.length) callback();
@@ -5618,8 +5349,8 @@ var get = () => ({
5618
5349
  overloadTranslationOptionHandler: (args) => {
5619
5350
  let ret = {};
5620
5351
  if (typeof args[1] === "object") ret = args[1];
5621
- if (isString2(args[1])) ret.defaultValue = args[1];
5622
- if (isString2(args[2])) ret.tDescription = args[2];
5352
+ if (isString(args[1])) ret.defaultValue = args[1];
5353
+ if (isString(args[2])) ret.tDescription = args[2];
5623
5354
  if (typeof args[2] === "object" || typeof args[3] === "object") {
5624
5355
  const options = args[3] || args[2];
5625
5356
  Object.keys(options).forEach((key) => {
@@ -5643,9 +5374,9 @@ var get = () => ({
5643
5374
  }
5644
5375
  });
5645
5376
  var transformOptions = (options) => {
5646
- if (isString2(options.ns)) options.ns = [options.ns];
5647
- if (isString2(options.fallbackLng)) options.fallbackLng = [options.fallbackLng];
5648
- if (isString2(options.fallbackNS)) options.fallbackNS = [options.fallbackNS];
5377
+ if (isString(options.ns)) options.ns = [options.ns];
5378
+ if (isString(options.fallbackLng)) options.fallbackLng = [options.fallbackLng];
5379
+ if (isString(options.fallbackNS)) options.fallbackNS = [options.fallbackNS];
5649
5380
  if (options.supportedLngs?.indexOf?.("cimode") < 0) {
5650
5381
  options.supportedLngs = options.supportedLngs.concat(["cimode"]);
5651
5382
  }
@@ -5694,7 +5425,7 @@ var I18n = class _I18n extends EventEmitter {
5694
5425
  options = {};
5695
5426
  }
5696
5427
  if (options.defaultNS == null && options.ns) {
5697
- if (isString2(options.ns)) {
5428
+ if (isString(options.ns)) {
5698
5429
  options.defaultNS = options.ns;
5699
5430
  } else if (options.ns.indexOf("translation") < 0) {
5700
5431
  options.defaultNS = options.ns[0];
@@ -5824,7 +5555,7 @@ var I18n = class _I18n extends EventEmitter {
5824
5555
  loadResources(language) {
5825
5556
  let callback = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : noop;
5826
5557
  let usedCallback = callback;
5827
- const usedLng = isString2(language) ? language : this.language;
5558
+ const usedLng = isString(language) ? language : this.language;
5828
5559
  if (typeof language === "function") usedCallback = language;
5829
5560
  if (!this.options.resources || this.options.partialBundledLanguages) {
5830
5561
  if (usedLng?.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return usedCallback();
@@ -5940,7 +5671,7 @@ var I18n = class _I18n extends EventEmitter {
5940
5671
  };
5941
5672
  const setLng = (lngs) => {
5942
5673
  if (!lng && !lngs && this.services.languageDetector) lngs = [];
5943
- const l2 = isString2(lngs) ? lngs : this.services.languageUtils.getBestMatchFromCodes(lngs);
5674
+ const l2 = isString(lngs) ? lngs : this.services.languageUtils.getBestMatchFromCodes(lngs);
5944
5675
  if (l2) {
5945
5676
  if (!this.language) {
5946
5677
  setLngProps(l2);
@@ -5992,7 +5723,7 @@ var I18n = class _I18n extends EventEmitter {
5992
5723
  }
5993
5724
  return _this3.t(resultKey, options);
5994
5725
  };
5995
- if (isString2(lng)) {
5726
+ if (isString(lng)) {
5996
5727
  fixedT.lng = lng;
5997
5728
  } else {
5998
5729
  fixedT.lngs = lng;
@@ -6049,7 +5780,7 @@ var I18n = class _I18n extends EventEmitter {
6049
5780
  if (callback) callback();
6050
5781
  return Promise.resolve();
6051
5782
  }
6052
- if (isString2(ns)) ns = [ns];
5783
+ if (isString(ns)) ns = [ns];
6053
5784
  ns.forEach((n) => {
6054
5785
  if (this.options.ns.indexOf(n) < 0) this.options.ns.push(n);
6055
5786
  });
@@ -6061,7 +5792,7 @@ var I18n = class _I18n extends EventEmitter {
6061
5792
  }
6062
5793
  loadLanguages(lngs, callback) {
6063
5794
  const deferred = defer();
6064
- if (isString2(lngs)) lngs = [lngs];
5795
+ if (isString(lngs)) lngs = [lngs];
6065
5796
  const preloaded = this.options.preload || [];
6066
5797
  const newLngs = lngs.filter((lng) => preloaded.indexOf(lng) < 0 && this.services.languageUtils.isSupportedCode(lng));
6067
5798
  if (!newLngs.length) {
@@ -6165,9 +5896,9 @@ var getFixedT = instance.getFixedT;
6165
5896
  var t = instance.t;
6166
5897
  var exists = instance.exists;
6167
5898
  var setDefaultNamespace = instance.setDefaultNamespace;
6168
- var hasLoadedNamespace2 = instance.hasLoadedNamespace;
6169
- var loadNamespaces2 = instance.loadNamespaces;
6170
- var loadLanguages2 = instance.loadLanguages;
5899
+ var hasLoadedNamespace = instance.hasLoadedNamespace;
5900
+ var loadNamespaces = instance.loadNamespaces;
5901
+ var loadLanguages = instance.loadLanguages;
6171
5902
 
6172
5903
  // src/context/embed.tsx
6173
5904
  var import_merge = __toESM(require_merge());
@@ -10293,61 +10024,333 @@ Inflate$1.prototype.push = function(data, flush_mode) {
10293
10024
  }
10294
10025
  }
10295
10026
  }
10296
- if (status === Z_OK && last_avail_out === 0) continue;
10297
- if (status === Z_STREAM_END) {
10298
- status = inflate_1$2.inflateEnd(this.strm);
10299
- this.onEnd(status);
10300
- this.ended = true;
10301
- return true;
10027
+ if (status === Z_OK && last_avail_out === 0) continue;
10028
+ if (status === Z_STREAM_END) {
10029
+ status = inflate_1$2.inflateEnd(this.strm);
10030
+ this.onEnd(status);
10031
+ this.ended = true;
10032
+ return true;
10033
+ }
10034
+ if (strm.avail_in === 0) break;
10035
+ }
10036
+ return true;
10037
+ };
10038
+ Inflate$1.prototype.onData = function(chunk) {
10039
+ this.chunks.push(chunk);
10040
+ };
10041
+ Inflate$1.prototype.onEnd = function(status) {
10042
+ if (status === Z_OK) {
10043
+ if (this.options.to === "string") {
10044
+ this.result = this.chunks.join("");
10045
+ } else {
10046
+ this.result = common.flattenChunks(this.chunks);
10047
+ }
10048
+ }
10049
+ this.chunks = [];
10050
+ this.err = status;
10051
+ this.msg = this.strm.msg;
10052
+ };
10053
+ function inflate$1(input, options) {
10054
+ const inflator = new Inflate$1(options);
10055
+ inflator.push(input);
10056
+ if (inflator.err) throw inflator.msg || messages[inflator.err];
10057
+ return inflator.result;
10058
+ }
10059
+ function inflateRaw$1(input, options) {
10060
+ options = options || {};
10061
+ options.raw = true;
10062
+ return inflate$1(input, options);
10063
+ }
10064
+ var Inflate_1$1 = Inflate$1;
10065
+ var inflate_2 = inflate$1;
10066
+ var inflateRaw_1$1 = inflateRaw$1;
10067
+ var ungzip$1 = inflate$1;
10068
+ var constants = constants$2;
10069
+ var inflate_1$1 = {
10070
+ Inflate: Inflate_1$1,
10071
+ inflate: inflate_2,
10072
+ inflateRaw: inflateRaw_1$1,
10073
+ ungzip: ungzip$1,
10074
+ constants
10075
+ };
10076
+ var { Deflate, deflate, deflateRaw, gzip } = deflate_1$1;
10077
+ var { Inflate, inflate, inflateRaw, ungzip } = inflate_1$1;
10078
+ var inflate_1 = inflate;
10079
+
10080
+ // src/context/embed.tsx
10081
+ import { createContext as createContext2, useCallback as useCallback3, useEffect as useEffect2, useRef as useRef2, useState as useState2 } from "react";
10082
+
10083
+ // node_modules/react-i18next/dist/es/Trans.js
10084
+ import { useContext } from "react";
10085
+
10086
+ // node_modules/react-i18next/dist/es/TransWithoutContext.js
10087
+ import { Fragment, isValidElement, cloneElement, createElement, Children } from "react";
10088
+
10089
+ // node_modules/html-parse-stringify/dist/html-parse-stringify.module.js
10090
+ var import_void_elements = __toESM(require_void_elements());
10091
+
10092
+ // node_modules/react-i18next/dist/es/utils.js
10093
+ var warn = (i18n, code, msg, rest) => {
10094
+ const args = [msg, {
10095
+ code,
10096
+ ...rest || {}
10097
+ }];
10098
+ if (i18n?.services?.logger?.forward) {
10099
+ return i18n.services.logger.forward(args, "warn", "react-i18next::", true);
10100
+ }
10101
+ if (isString2(args[0])) args[0] = `react-i18next:: ${args[0]}`;
10102
+ if (i18n?.services?.logger?.warn) {
10103
+ i18n.services.logger.warn(...args);
10104
+ } else if (console?.warn) {
10105
+ console.warn(...args);
10106
+ }
10107
+ };
10108
+ var alreadyWarned = {};
10109
+ var warnOnce = (i18n, code, msg, rest) => {
10110
+ if (isString2(msg) && alreadyWarned[msg]) return;
10111
+ if (isString2(msg)) alreadyWarned[msg] = /* @__PURE__ */ new Date();
10112
+ warn(i18n, code, msg, rest);
10113
+ };
10114
+ var loadedClb = (i18n, cb) => () => {
10115
+ if (i18n.isInitialized) {
10116
+ cb();
10117
+ } else {
10118
+ const initialized = () => {
10119
+ setTimeout(() => {
10120
+ i18n.off("initialized", initialized);
10121
+ }, 0);
10122
+ cb();
10123
+ };
10124
+ i18n.on("initialized", initialized);
10125
+ }
10126
+ };
10127
+ var loadNamespaces2 = (i18n, ns, cb) => {
10128
+ i18n.loadNamespaces(ns, loadedClb(i18n, cb));
10129
+ };
10130
+ var loadLanguages2 = (i18n, lng, ns, cb) => {
10131
+ if (isString2(ns)) ns = [ns];
10132
+ if (i18n.options.preload && i18n.options.preload.indexOf(lng) > -1) return loadNamespaces2(i18n, ns, cb);
10133
+ ns.forEach((n) => {
10134
+ if (i18n.options.ns.indexOf(n) < 0) i18n.options.ns.push(n);
10135
+ });
10136
+ i18n.loadLanguages(lng, loadedClb(i18n, cb));
10137
+ };
10138
+ var hasLoadedNamespace2 = (ns, i18n, options = {}) => {
10139
+ if (!i18n.languages || !i18n.languages.length) {
10140
+ warnOnce(i18n, "NO_LANGUAGES", "i18n.languages were undefined or empty", {
10141
+ languages: i18n.languages
10142
+ });
10143
+ return true;
10144
+ }
10145
+ return i18n.hasLoadedNamespace(ns, {
10146
+ lng: options.lng,
10147
+ precheck: (i18nInstance2, loadNotPending) => {
10148
+ if (options.bindI18n?.indexOf("languageChanging") > -1 && i18nInstance2.services.backendConnector.backend && i18nInstance2.isLanguageChangingTo && !loadNotPending(i18nInstance2.isLanguageChangingTo, ns)) return false;
10149
+ }
10150
+ });
10151
+ };
10152
+ var isString2 = (obj) => typeof obj === "string";
10153
+ var isObject = (obj) => typeof obj === "object" && obj !== null;
10154
+
10155
+ // node_modules/react-i18next/dist/es/unescape.js
10156
+ var matchHtmlEntity = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
10157
+ var htmlEntities = {
10158
+ "&amp;": "&",
10159
+ "&#38;": "&",
10160
+ "&lt;": "<",
10161
+ "&#60;": "<",
10162
+ "&gt;": ">",
10163
+ "&#62;": ">",
10164
+ "&apos;": "'",
10165
+ "&#39;": "'",
10166
+ "&quot;": '"',
10167
+ "&#34;": '"',
10168
+ "&nbsp;": " ",
10169
+ "&#160;": " ",
10170
+ "&copy;": "\xA9",
10171
+ "&#169;": "\xA9",
10172
+ "&reg;": "\xAE",
10173
+ "&#174;": "\xAE",
10174
+ "&hellip;": "\u2026",
10175
+ "&#8230;": "\u2026",
10176
+ "&#x2F;": "/",
10177
+ "&#47;": "/"
10178
+ };
10179
+ var unescapeHtmlEntity = (m2) => htmlEntities[m2];
10180
+ var unescape = (text) => text.replace(matchHtmlEntity, unescapeHtmlEntity);
10181
+
10182
+ // node_modules/react-i18next/dist/es/defaults.js
10183
+ var defaultOptions = {
10184
+ bindI18n: "languageChanged",
10185
+ bindI18nStore: "",
10186
+ transEmptyNodeValue: "",
10187
+ transSupportBasicHtmlNodes: true,
10188
+ transWrapTextNodes: "",
10189
+ transKeepBasicHtmlNodesFor: ["br", "strong", "i", "p"],
10190
+ useSuspense: true,
10191
+ unescape
10192
+ };
10193
+ var setDefaults = (options = {}) => {
10194
+ defaultOptions = {
10195
+ ...defaultOptions,
10196
+ ...options
10197
+ };
10198
+ };
10199
+ var getDefaults = () => defaultOptions;
10200
+
10201
+ // node_modules/react-i18next/dist/es/i18nInstance.js
10202
+ var i18nInstance;
10203
+ var setI18n = (instance2) => {
10204
+ i18nInstance = instance2;
10205
+ };
10206
+ var getI18n = () => i18nInstance;
10207
+
10208
+ // node_modules/react-i18next/dist/es/context.js
10209
+ import { createContext } from "react";
10210
+
10211
+ // node_modules/react-i18next/dist/es/initReactI18next.js
10212
+ var initReactI18next = {
10213
+ type: "3rdParty",
10214
+ init(instance2) {
10215
+ setDefaults(instance2.options.react);
10216
+ setI18n(instance2);
10217
+ }
10218
+ };
10219
+
10220
+ // node_modules/react-i18next/dist/es/context.js
10221
+ var I18nContext = createContext();
10222
+ var ReportNamespaces = class {
10223
+ constructor() {
10224
+ this.usedNamespaces = {};
10225
+ }
10226
+ addUsedNamespaces(namespaces) {
10227
+ namespaces.forEach((ns) => {
10228
+ if (!this.usedNamespaces[ns]) this.usedNamespaces[ns] = true;
10229
+ });
10230
+ }
10231
+ getUsedNamespaces() {
10232
+ return Object.keys(this.usedNamespaces);
10233
+ }
10234
+ };
10235
+
10236
+ // node_modules/react-i18next/dist/es/useTranslation.js
10237
+ import { useState, useEffect, useContext as useContext2, useRef, useCallback as useCallback2 } from "react";
10238
+ var usePrevious = (value, ignore) => {
10239
+ const ref = useRef();
10240
+ useEffect(() => {
10241
+ ref.current = ignore ? ref.current : value;
10242
+ }, [value, ignore]);
10243
+ return ref.current;
10244
+ };
10245
+ var alwaysNewT = (i18n, language, namespace, keyPrefix) => i18n.getFixedT(language, namespace, keyPrefix);
10246
+ var useMemoizedT = (i18n, language, namespace, keyPrefix) => useCallback2(alwaysNewT(i18n, language, namespace, keyPrefix), [i18n, language, namespace, keyPrefix]);
10247
+ var useTranslation = (ns, props = {}) => {
10248
+ const {
10249
+ i18n: i18nFromProps
10250
+ } = props;
10251
+ const {
10252
+ i18n: i18nFromContext,
10253
+ defaultNS: defaultNSFromContext
10254
+ } = useContext2(I18nContext) || {};
10255
+ const i18n = i18nFromProps || i18nFromContext || getI18n();
10256
+ if (i18n && !i18n.reportNamespaces) i18n.reportNamespaces = new ReportNamespaces();
10257
+ if (!i18n) {
10258
+ warnOnce(i18n, "NO_I18NEXT_INSTANCE", "useTranslation: You will need to pass in an i18next instance by using initReactI18next");
10259
+ const notReadyT = (k2, optsOrDefaultValue) => {
10260
+ if (isString2(optsOrDefaultValue)) return optsOrDefaultValue;
10261
+ if (isObject(optsOrDefaultValue) && isString2(optsOrDefaultValue.defaultValue)) return optsOrDefaultValue.defaultValue;
10262
+ return Array.isArray(k2) ? k2[k2.length - 1] : k2;
10263
+ };
10264
+ const retNotReady = [notReadyT, {}, false];
10265
+ retNotReady.t = notReadyT;
10266
+ retNotReady.i18n = {};
10267
+ retNotReady.ready = false;
10268
+ return retNotReady;
10269
+ }
10270
+ if (i18n.options.react?.wait) warnOnce(i18n, "DEPRECATED_OPTION", "useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
10271
+ const i18nOptions = {
10272
+ ...getDefaults(),
10273
+ ...i18n.options.react,
10274
+ ...props
10275
+ };
10276
+ const {
10277
+ useSuspense,
10278
+ keyPrefix
10279
+ } = i18nOptions;
10280
+ let namespaces = ns || defaultNSFromContext || i18n.options?.defaultNS;
10281
+ namespaces = isString2(namespaces) ? [namespaces] : namespaces || ["translation"];
10282
+ i18n.reportNamespaces.addUsedNamespaces?.(namespaces);
10283
+ const ready = (i18n.isInitialized || i18n.initializedStoreOnce) && namespaces.every((n) => hasLoadedNamespace2(n, i18n, i18nOptions));
10284
+ const memoGetT = useMemoizedT(i18n, props.lng || null, i18nOptions.nsMode === "fallback" ? namespaces : namespaces[0], keyPrefix);
10285
+ const getT = () => memoGetT;
10286
+ const getNewT = () => alwaysNewT(i18n, props.lng || null, i18nOptions.nsMode === "fallback" ? namespaces : namespaces[0], keyPrefix);
10287
+ const [t2, setT] = useState(getT);
10288
+ let joinedNS = namespaces.join();
10289
+ if (props.lng) joinedNS = `${props.lng}${joinedNS}`;
10290
+ const previousJoinedNS = usePrevious(joinedNS);
10291
+ const isMounted = useRef(true);
10292
+ useEffect(() => {
10293
+ const {
10294
+ bindI18n,
10295
+ bindI18nStore
10296
+ } = i18nOptions;
10297
+ isMounted.current = true;
10298
+ if (!ready && !useSuspense) {
10299
+ if (props.lng) {
10300
+ loadLanguages2(i18n, props.lng, namespaces, () => {
10301
+ if (isMounted.current) setT(getNewT);
10302
+ });
10303
+ } else {
10304
+ loadNamespaces2(i18n, namespaces, () => {
10305
+ if (isMounted.current) setT(getNewT);
10306
+ });
10307
+ }
10308
+ }
10309
+ if (ready && previousJoinedNS && previousJoinedNS !== joinedNS && isMounted.current) {
10310
+ setT(getNewT);
10302
10311
  }
10303
- if (strm.avail_in === 0) break;
10304
- }
10305
- return true;
10306
- };
10307
- Inflate$1.prototype.onData = function(chunk) {
10308
- this.chunks.push(chunk);
10309
- };
10310
- Inflate$1.prototype.onEnd = function(status) {
10311
- if (status === Z_OK) {
10312
- if (this.options.to === "string") {
10313
- this.result = this.chunks.join("");
10312
+ const boundReset = () => {
10313
+ if (isMounted.current) setT(getNewT);
10314
+ };
10315
+ if (bindI18n) i18n?.on(bindI18n, boundReset);
10316
+ if (bindI18nStore) i18n?.store.on(bindI18nStore, boundReset);
10317
+ return () => {
10318
+ isMounted.current = false;
10319
+ if (i18n) bindI18n?.split(" ").forEach((e2) => i18n.off(e2, boundReset));
10320
+ if (bindI18nStore && i18n) bindI18nStore.split(" ").forEach((e2) => i18n.store.off(e2, boundReset));
10321
+ };
10322
+ }, [i18n, joinedNS]);
10323
+ useEffect(() => {
10324
+ if (isMounted.current && ready) {
10325
+ setT(getT);
10326
+ }
10327
+ }, [i18n, keyPrefix, ready]);
10328
+ const ret = [t2, i18n, ready];
10329
+ ret.t = t2;
10330
+ ret.i18n = i18n;
10331
+ ret.ready = ready;
10332
+ if (ready) return ret;
10333
+ if (!ready && !useSuspense) return ret;
10334
+ throw new Promise((resolve) => {
10335
+ if (props.lng) {
10336
+ loadLanguages2(i18n, props.lng, namespaces, () => resolve());
10314
10337
  } else {
10315
- this.result = common.flattenChunks(this.chunks);
10338
+ loadNamespaces2(i18n, namespaces, () => resolve());
10316
10339
  }
10317
- }
10318
- this.chunks = [];
10319
- this.err = status;
10320
- this.msg = this.strm.msg;
10321
- };
10322
- function inflate$1(input, options) {
10323
- const inflator = new Inflate$1(options);
10324
- inflator.push(input);
10325
- if (inflator.err) throw inflator.msg || messages[inflator.err];
10326
- return inflator.result;
10327
- }
10328
- function inflateRaw$1(input, options) {
10329
- options = options || {};
10330
- options.raw = true;
10331
- return inflate$1(input, options);
10332
- }
10333
- var Inflate_1$1 = Inflate$1;
10334
- var inflate_2 = inflate$1;
10335
- var inflateRaw_1$1 = inflateRaw$1;
10336
- var ungzip$1 = inflate$1;
10337
- var constants = constants$2;
10338
- var inflate_1$1 = {
10339
- Inflate: Inflate_1$1,
10340
- inflate: inflate_2,
10341
- inflateRaw: inflateRaw_1$1,
10342
- ungzip: ungzip$1,
10343
- constants
10340
+ });
10344
10341
  };
10345
- var { Deflate, deflate, deflateRaw, gzip } = deflate_1$1;
10346
- var { Inflate, inflate, inflateRaw, ungzip } = inflate_1$1;
10347
- var inflate_1 = inflate;
10348
10342
 
10349
- // src/context/embed.tsx
10350
- import { createContext as createContext2, useCallback as useCallback3, useEffect as useEffect2, useRef as useRef2, useState as useState2 } from "react";
10343
+ // node_modules/react-i18next/dist/es/withTranslation.js
10344
+ import { createElement as createElement2, forwardRef as forwardRefReact } from "react";
10345
+
10346
+ // node_modules/react-i18next/dist/es/I18nextProvider.js
10347
+ import { createElement as createElement3, useMemo as useMemo2 } from "react";
10348
+
10349
+ // node_modules/react-i18next/dist/es/withSSR.js
10350
+ import { createElement as createElement4 } from "react";
10351
+
10352
+ // node_modules/react-i18next/dist/es/useSSR.js
10353
+ import { useContext as useContext3 } from "react";
10351
10354
 
10352
10355
  // node_modules/uuid/dist/esm-browser/stringify.js
10353
10356
  var byteToHex = [];
@@ -10672,7 +10675,23 @@ function BillingPriceResponseDataFromJSONTyped(json, ignoreDiscriminator) {
10672
10675
  id: json["id"],
10673
10676
  interval: json["interval"],
10674
10677
  price: json["price"],
10675
- priceDecimal: json["price_decimal"] == null ? void 0 : json["price_decimal"]
10678
+ priceDecimal: json["price_decimal"] == null ? void 0 : json["price_decimal"],
10679
+ scheme: json["scheme"]
10680
+ };
10681
+ }
10682
+
10683
+ // src/api/models/BillingProductPriceTierResponseData.ts
10684
+ function BillingProductPriceTierResponseDataFromJSON(json) {
10685
+ return BillingProductPriceTierResponseDataFromJSONTyped(json, false);
10686
+ }
10687
+ function BillingProductPriceTierResponseDataFromJSONTyped(json, ignoreDiscriminator) {
10688
+ if (json == null) {
10689
+ return json;
10690
+ }
10691
+ return {
10692
+ flatAmount: json["flat_amount"] == null ? void 0 : json["flat_amount"],
10693
+ perUnitPrice: json["per_unit_price"],
10694
+ upTo: json["up_to"] == null ? void 0 : json["up_to"]
10676
10695
  };
10677
10696
  }
10678
10697
 
@@ -10685,6 +10704,7 @@ function BillingPriceViewFromJSONTyped(json, ignoreDiscriminator) {
10685
10704
  return json;
10686
10705
  }
10687
10706
  return {
10707
+ billingScheme: json["billing_scheme"],
10688
10708
  createdAt: new Date(json["created_at"]),
10689
10709
  currency: json["currency"],
10690
10710
  id: json["id"],
@@ -10695,6 +10715,9 @@ function BillingPriceViewFromJSONTyped(json, ignoreDiscriminator) {
10695
10715
  priceDecimal: json["price_decimal"] == null ? void 0 : json["price_decimal"],
10696
10716
  priceExternalId: json["price_external_id"],
10697
10717
  priceId: json["price_id"],
10718
+ priceTier: json["price_tier"].map(
10719
+ BillingProductPriceTierResponseDataFromJSON
10720
+ ),
10698
10721
  productExternalId: json["product_external_id"],
10699
10722
  productId: json["product_id"],
10700
10723
  productName: json["product_name"],
@@ -10739,6 +10762,7 @@ function BillingProductForSubscriptionResponseDataFromJSONTyped(json, ignoreDisc
10739
10762
  return json;
10740
10763
  }
10741
10764
  return {
10765
+ billingScheme: json["billing_scheme"],
10742
10766
  createdAt: new Date(json["created_at"]),
10743
10767
  currency: json["currency"],
10744
10768
  environmentId: json["environment_id"],
@@ -10751,6 +10775,9 @@ function BillingProductForSubscriptionResponseDataFromJSONTyped(json, ignoreDisc
10751
10775
  priceDecimal: json["price_decimal"] == null ? void 0 : json["price_decimal"],
10752
10776
  priceExternalId: json["price_external_id"],
10753
10777
  priceId: json["price_id"],
10778
+ priceTier: json["price_tier"].map(
10779
+ BillingProductPriceTierResponseDataFromJSON
10780
+ ),
10754
10781
  quantity: json["quantity"],
10755
10782
  subscriptionId: json["subscription_id"],
10756
10783
  updatedAt: new Date(json["updated_at"]),
@@ -10758,6 +10785,29 @@ function BillingProductForSubscriptionResponseDataFromJSONTyped(json, ignoreDisc
10758
10785
  };
10759
10786
  }
10760
10787
 
10788
+ // src/api/models/BillingProductResponseData.ts
10789
+ function BillingProductResponseDataFromJSON(json) {
10790
+ return BillingProductResponseDataFromJSONTyped(json, false);
10791
+ }
10792
+ function BillingProductResponseDataFromJSONTyped(json, ignoreDiscriminator) {
10793
+ if (json == null) {
10794
+ return json;
10795
+ }
10796
+ return {
10797
+ accountId: json["account_id"],
10798
+ createdAt: new Date(json["created_at"]),
10799
+ currency: json["currency"],
10800
+ environmentId: json["environment_id"],
10801
+ externalId: json["external_id"],
10802
+ name: json["name"],
10803
+ price: json["price"],
10804
+ priceDecimal: json["price_decimal"] == null ? void 0 : json["price_decimal"],
10805
+ productId: json["product_id"],
10806
+ quantity: json["quantity"],
10807
+ updatedAt: new Date(json["updated_at"])
10808
+ };
10809
+ }
10810
+
10761
10811
  // src/api/models/BillingSubscriptionDiscountView.ts
10762
10812
  function BillingSubscriptionDiscountViewFromJSON(json) {
10763
10813
  return BillingSubscriptionDiscountViewFromJSONTyped(json, false);
@@ -11428,6 +11478,7 @@ function PlanEntitlementResponseDataFromJSONTyped(json, ignoreDiscriminator) {
11428
11478
  ruleIdUsageExceeded: json["rule_id_usage_exceeded"] == null ? void 0 : json["rule_id_usage_exceeded"],
11429
11479
  softLimit: json["soft_limit"] == null ? void 0 : json["soft_limit"],
11430
11480
  updatedAt: new Date(json["updated_at"]),
11481
+ usageBasedProduct: json["usage_based_product"] == null ? void 0 : BillingProductResponseDataFromJSON(json["usage_based_product"]),
11431
11482
  valueBool: json["value_bool"] == null ? void 0 : json["value_bool"],
11432
11483
  valueNumeric: json["value_numeric"] == null ? void 0 : json["value_numeric"],
11433
11484
  valueTrait: json["value_trait"] == null ? void 0 : EntityTraitDefinitionResponseDataFromJSON(json["value_trait"]),
@@ -11776,6 +11827,26 @@ function ListInvoicesResponseFromJSONTyped(json, ignoreDiscriminator) {
11776
11827
  };
11777
11828
  }
11778
11829
 
11830
+ // src/api/models/PreviewSubscriptionFinanceResponseData.ts
11831
+ function PreviewSubscriptionFinanceResponseDataFromJSON(json) {
11832
+ return PreviewSubscriptionFinanceResponseDataFromJSONTyped(json, false);
11833
+ }
11834
+ function PreviewSubscriptionFinanceResponseDataFromJSONTyped(json, ignoreDiscriminator) {
11835
+ if (json == null) {
11836
+ return json;
11837
+ }
11838
+ return {
11839
+ amountOff: json["amount_off"],
11840
+ dueNow: json["due_now"],
11841
+ newCharges: json["new_charges"],
11842
+ percentOff: json["percent_off"],
11843
+ periodStart: new Date(json["period_start"]),
11844
+ promoCodeApplied: json["promo_code_applied"],
11845
+ proration: json["proration"],
11846
+ trialEnd: json["trial_end"] == null ? void 0 : new Date(json["trial_end"])
11847
+ };
11848
+ }
11849
+
11779
11850
  // src/api/models/PreviewSubscriptionChangeResponseData.ts
11780
11851
  function PreviewSubscriptionChangeResponseDataFromJSON(json) {
11781
11852
  return PreviewSubscriptionChangeResponseDataFromJSONTyped(json, false);
@@ -11787,12 +11858,16 @@ function PreviewSubscriptionChangeResponseDataFromJSONTyped(json, ignoreDiscrimi
11787
11858
  return {
11788
11859
  amountOff: json["amount_off"],
11789
11860
  dueNow: json["due_now"],
11861
+ finance: json["finance"] == null ? void 0 : PreviewSubscriptionFinanceResponseDataFromJSON(json["finance"]),
11790
11862
  newCharges: json["new_charges"],
11791
11863
  percentOff: json["percent_off"],
11792
11864
  periodStart: new Date(json["period_start"]),
11793
11865
  promoCodeApplied: json["promo_code_applied"],
11794
11866
  proration: json["proration"],
11795
- trialEnd: json["trial_end"] == null ? void 0 : new Date(json["trial_end"])
11867
+ trialEnd: json["trial_end"] == null ? void 0 : new Date(json["trial_end"]),
11868
+ usageViolations: json["usage_violations"].map(
11869
+ FeatureUsageResponseDataFromJSON
11870
+ )
11796
11871
  };
11797
11872
  }
11798
11873
 
@@ -13061,7 +13136,7 @@ var EmbedProvider = ({
13061
13136
  useEffect2(() => {
13062
13137
  if (accessToken) {
13063
13138
  const { headers = {} } = apiConfig ?? {};
13064
- headers["X-Schematic-Components-Version"] = "0.7.1";
13139
+ headers["X-Schematic-Components-Version"] = "0.7.3";
13065
13140
  headers["X-Schematic-Session-ID"] = sessionIdRef.current;
13066
13141
  const config = new Configuration({
13067
13142
  ...apiConfig,
@@ -13400,9 +13475,6 @@ function useWrapChildren(elements) {
13400
13475
  return shouldWrap.some((wrap) => wrap);
13401
13476
  }
13402
13477
 
13403
- // src/components/layout/card/Card.tsx
13404
- import { forwardRef as forwardRef3 } from "react";
13405
-
13406
13478
  // src/components/ui/box/styles.ts
13407
13479
  var Box = dt.div((props) => {
13408
13480
  function reducer(acc, [key, value]) {
@@ -13617,6 +13689,8 @@ var EmbedButton = dt(Button2)`
13617
13689
  font-family: "Public Sans", sans-serif;
13618
13690
  font-weight: 500;
13619
13691
  text-align: center;
13692
+ display: flex;
13693
+ align-items: center;
13620
13694
 
13621
13695
  ${({ disabled, $color = "primary", theme }) => {
13622
13696
  const { l: l2 } = hexToHSL(theme[$color]);
@@ -13764,6 +13838,24 @@ var EmbedButton = dt(Button2)`
13764
13838
  `;
13765
13839
  }
13766
13840
  }}
13841
+
13842
+ ${({ $selfAlignment = "center" }) => {
13843
+ switch ($selfAlignment) {
13844
+ case "start":
13845
+ return lt`
13846
+ align-self: start;
13847
+ `;
13848
+ case "end":
13849
+ return lt`
13850
+ align-self: end;
13851
+ `;
13852
+ case "center":
13853
+ default:
13854
+ return lt`
13855
+ align-self: center;
13856
+ `;
13857
+ }
13858
+ }}
13767
13859
 
13768
13860
  ${({ $fullWidth = true }) => {
13769
13861
  if ($fullWidth) {
@@ -17359,7 +17451,7 @@ var CheckoutDialog = ({ top = 0 }) => {
17359
17451
  promoCode: updates.promoCode || promoCode
17360
17452
  }
17361
17453
  });
17362
- setCharges(data2);
17454
+ setCharges(data2.finance);
17363
17455
  } catch (error2) {
17364
17456
  if (error2 instanceof ResponseError && error2.response.status === 401) {
17365
17457
  const data2 = await error2.response.json();
@@ -18288,9 +18380,72 @@ var Viewport = forwardRef6(
18288
18380
  );
18289
18381
  Viewport.displayName = "Viewport";
18290
18382
 
18383
+ // src/components/elements/button/Button.tsx
18384
+ import { jsx as jsx27 } from "react/jsx-runtime";
18385
+ var resolveDesignProps = (props) => {
18386
+ return {
18387
+ button: {
18388
+ link: props.button?.link ?? "",
18389
+ openInNewTab: props.button?.openInNewTab ?? true,
18390
+ text: props.button?.text ?? "Button",
18391
+ style: props.button?.style ?? "primary",
18392
+ size: props.button?.size ?? "md",
18393
+ fullWidth: props.button?.fullWidth ?? true,
18394
+ alignment: props.button?.alignment ?? "center",
18395
+ selfAlignment: props.button?.selfAlignment ?? "center"
18396
+ }
18397
+ };
18398
+ };
18399
+ var ButtonElement = forwardRef7(({ children, className, ...rest }, ref) => {
18400
+ const props = resolveDesignProps(rest);
18401
+ const buttonStyles = {
18402
+ primary: {
18403
+ color: "primary",
18404
+ variant: "filled"
18405
+ },
18406
+ secondary: {
18407
+ color: "primary",
18408
+ variant: "outline"
18409
+ },
18410
+ tertiary: {
18411
+ color: "primary",
18412
+ variant: "text"
18413
+ }
18414
+ };
18415
+ return /* @__PURE__ */ jsx27(
18416
+ Element,
18417
+ {
18418
+ as: Flex,
18419
+ ref,
18420
+ className,
18421
+ $flexDirection: "column",
18422
+ $gap: "2rem",
18423
+ children: /* @__PURE__ */ jsx27(
18424
+ EmbedButton,
18425
+ {
18426
+ as: "a",
18427
+ href: props.button.link,
18428
+ target: props.button.openInNewTab ? "_blank" : "_self",
18429
+ $size: props.button.size,
18430
+ $color: buttonStyles[props.button.style].color,
18431
+ $variant: buttonStyles[props.button.style].variant,
18432
+ $alignment: props.button.alignment,
18433
+ $selfAlignment: props.button.selfAlignment,
18434
+ $fullWidth: props.button.fullWidth,
18435
+ children: props.button.text
18436
+ }
18437
+ )
18438
+ }
18439
+ );
18440
+ });
18441
+ ButtonElement.displayName = "Button";
18442
+
18443
+ // src/components/elements/included-features/IncludedFeatures.tsx
18444
+ import { forwardRef as forwardRef8, useMemo as useMemo9, useRef as useRef7, useState as useState12 } from "react";
18445
+
18291
18446
  // src/components/elements/included-features/Details.tsx
18292
18447
  import { useMemo as useMemo8 } from "react";
18293
- import { jsx as jsx27, jsxs as jsxs21 } from "react/jsx-runtime";
18448
+ import { jsx as jsx28, jsxs as jsxs21 } from "react/jsx-runtime";
18294
18449
  var Details = ({
18295
18450
  shouldWrapChildren,
18296
18451
  featureUsage,
@@ -18389,7 +18544,7 @@ var Details = ({
18389
18544
  $flexGrow: "1",
18390
18545
  $textAlign: shouldWrapChildren ? "left" : "right",
18391
18546
  children: [
18392
- props.entitlement.isVisible && /* @__PURE__ */ jsx27(Box, { $whiteSpace: "nowrap", children: /* @__PURE__ */ jsx27(
18547
+ props.entitlement.isVisible && /* @__PURE__ */ jsx28(Box, { $whiteSpace: "nowrap", children: /* @__PURE__ */ jsx28(
18393
18548
  Text,
18394
18549
  {
18395
18550
  $font: theme.typography[props.entitlement.fontStyle].fontFamily,
@@ -18400,7 +18555,7 @@ var Details = ({
18400
18555
  children: text
18401
18556
  }
18402
18557
  ) }),
18403
- props.usage.isVisible && usageText && /* @__PURE__ */ jsx27(Box, { $whiteSpace: "nowrap", children: /* @__PURE__ */ jsx27(
18558
+ props.usage.isVisible && usageText && /* @__PURE__ */ jsx28(Box, { $whiteSpace: "nowrap", children: /* @__PURE__ */ jsx28(
18404
18559
  Text,
18405
18560
  {
18406
18561
  $font: theme.typography[props.usage.fontStyle].fontFamily,
@@ -18417,8 +18572,8 @@ var Details = ({
18417
18572
  };
18418
18573
 
18419
18574
  // src/components/elements/included-features/IncludedFeatures.tsx
18420
- import { jsx as jsx28, jsxs as jsxs22 } from "react/jsx-runtime";
18421
- function resolveDesignProps(props) {
18575
+ import { jsx as jsx29, jsxs as jsxs22 } from "react/jsx-runtime";
18576
+ function resolveDesignProps2(props) {
18422
18577
  return {
18423
18578
  header: {
18424
18579
  isVisible: props.header?.isVisible ?? true,
@@ -18446,8 +18601,8 @@ function resolveDesignProps(props) {
18446
18601
  visibleFeatures: props.visibleFeatures
18447
18602
  };
18448
18603
  }
18449
- var IncludedFeatures = forwardRef7(({ className, ...rest }, ref) => {
18450
- const props = resolveDesignProps(rest);
18604
+ var IncludedFeatures = forwardRef8(({ className, ...rest }, ref) => {
18605
+ const props = resolveDesignProps2(rest);
18451
18606
  const { t: t2 } = useTranslation();
18452
18607
  const theme = nt();
18453
18608
  const { data } = useEmbed();
@@ -18491,7 +18646,7 @@ var IncludedFeatures = forwardRef7(({ className, ...rest }, ref) => {
18491
18646
  $flexDirection: "column",
18492
18647
  $gap: "1rem",
18493
18648
  children: [
18494
- props.header.isVisible && /* @__PURE__ */ jsx28(Box, { $marginBottom: "0.5rem", children: /* @__PURE__ */ jsx28(
18649
+ props.header.isVisible && /* @__PURE__ */ jsx29(Box, { $marginBottom: "0.5rem", children: /* @__PURE__ */ jsx29(
18495
18650
  Text,
18496
18651
  {
18497
18652
  $font: theme.typography[props.header.fontStyle].fontFamily,
@@ -18525,7 +18680,7 @@ var IncludedFeatures = forwardRef7(({ className, ...rest }, ref) => {
18525
18680
  $flexBasis: "min-content",
18526
18681
  $gap: "1rem",
18527
18682
  children: [
18528
- props.icons.isVisible && feature?.icon && /* @__PURE__ */ jsx28(
18683
+ props.icons.isVisible && feature?.icon && /* @__PURE__ */ jsx29(
18529
18684
  IconRound,
18530
18685
  {
18531
18686
  name: feature.icon,
@@ -18536,7 +18691,7 @@ var IncludedFeatures = forwardRef7(({ className, ...rest }, ref) => {
18536
18691
  ]
18537
18692
  }
18538
18693
  ),
18539
- feature?.name && /* @__PURE__ */ jsx28(
18694
+ feature?.name && /* @__PURE__ */ jsx29(
18540
18695
  Text,
18541
18696
  {
18542
18697
  $font: theme.typography[props.icons.fontStyle].fontFamily,
@@ -18566,7 +18721,7 @@ var IncludedFeatures = forwardRef7(({ className, ...rest }, ref) => {
18566
18721
  ]
18567
18722
  }
18568
18723
  ),
18569
- shouldShowDetails && /* @__PURE__ */ jsx28(
18724
+ shouldShowDetails && /* @__PURE__ */ jsx29(
18570
18725
  Details,
18571
18726
  {
18572
18727
  featureUsage: usage,
@@ -18580,7 +18735,7 @@ var IncludedFeatures = forwardRef7(({ className, ...rest }, ref) => {
18580
18735
  );
18581
18736
  }),
18582
18737
  shouldShowExpand && /* @__PURE__ */ jsxs22(Flex, { $alignItems: "center", $justifyContent: "start", $marginTop: "1rem", children: [
18583
- /* @__PURE__ */ jsx28(
18738
+ /* @__PURE__ */ jsx29(
18584
18739
  Icon2,
18585
18740
  {
18586
18741
  name: isExpanded ? "chevron-up" : "chevron-down",
@@ -18592,7 +18747,7 @@ var IncludedFeatures = forwardRef7(({ className, ...rest }, ref) => {
18592
18747
  }
18593
18748
  }
18594
18749
  ),
18595
- /* @__PURE__ */ jsx28(
18750
+ /* @__PURE__ */ jsx29(
18596
18751
  Text,
18597
18752
  {
18598
18753
  onClick: handleToggleShowAll,
@@ -18613,9 +18768,9 @@ var IncludedFeatures = forwardRef7(({ className, ...rest }, ref) => {
18613
18768
  IncludedFeatures.displayName = "IncludedFeatures";
18614
18769
 
18615
18770
  // src/components/elements/invoices/Invoices.tsx
18616
- import { forwardRef as forwardRef8, useEffect as useEffect6, useState as useState13 } from "react";
18617
- import { jsx as jsx29, jsxs as jsxs23 } from "react/jsx-runtime";
18618
- function resolveDesignProps2(props) {
18771
+ import { forwardRef as forwardRef9, useEffect as useEffect6, useState as useState13 } from "react";
18772
+ import { jsx as jsx30, jsxs as jsxs23 } from "react/jsx-runtime";
18773
+ function resolveDesignProps3(props) {
18619
18774
  return {
18620
18775
  header: {
18621
18776
  isVisible: props.header?.isVisible ?? true,
@@ -18648,7 +18803,7 @@ function formatInvoices(invoices = []) {
18648
18803
  }
18649
18804
  var InvoiceDate = ({ date, fontStyle, url }) => {
18650
18805
  const theme = nt();
18651
- const dateText = /* @__PURE__ */ jsx29(
18806
+ const dateText = /* @__PURE__ */ jsx30(
18652
18807
  Text,
18653
18808
  {
18654
18809
  ...url && { onClick: () => {
@@ -18661,12 +18816,12 @@ var InvoiceDate = ({ date, fontStyle, url }) => {
18661
18816
  }
18662
18817
  );
18663
18818
  if (url) {
18664
- return /* @__PURE__ */ jsx29("a", { href: url, target: "_blank", rel: "noreferrer", children: dateText });
18819
+ return /* @__PURE__ */ jsx30("a", { href: url, target: "_blank", rel: "noreferrer", children: dateText });
18665
18820
  }
18666
18821
  return dateText;
18667
18822
  };
18668
- var Invoices = forwardRef8(({ className, data, ...rest }, ref) => {
18669
- const props = resolveDesignProps2(rest);
18823
+ var Invoices = forwardRef9(({ className, data, ...rest }, ref) => {
18824
+ const props = resolveDesignProps3(rest);
18670
18825
  const { t: t2 } = useTranslation();
18671
18826
  const theme = nt();
18672
18827
  const { api } = useEmbed();
@@ -18685,8 +18840,8 @@ var Invoices = forwardRef8(({ className, data, ...rest }, ref) => {
18685
18840
  if (invoices.length === 0) {
18686
18841
  return null;
18687
18842
  }
18688
- return /* @__PURE__ */ jsx29(Element, { ref, className, children: /* @__PURE__ */ jsxs23(Flex, { $flexDirection: "column", $gap: "1rem", children: [
18689
- props.header.isVisible && /* @__PURE__ */ jsx29(Flex, { $justifyContent: "space-between", $alignItems: "center", children: /* @__PURE__ */ jsx29(
18843
+ return /* @__PURE__ */ jsx30(Element, { ref, className, children: /* @__PURE__ */ jsxs23(Flex, { $flexDirection: "column", $gap: "1rem", children: [
18844
+ props.header.isVisible && /* @__PURE__ */ jsx30(Flex, { $justifyContent: "space-between", $alignItems: "center", children: /* @__PURE__ */ jsx30(
18690
18845
  Text,
18691
18846
  {
18692
18847
  $font: theme.typography[props.header.fontStyle].fontFamily,
@@ -18696,9 +18851,9 @@ var Invoices = forwardRef8(({ className, data, ...rest }, ref) => {
18696
18851
  children: t2("Invoices")
18697
18852
  }
18698
18853
  ) }),
18699
- /* @__PURE__ */ jsx29(Flex, { $flexDirection: "column", $gap: "0.5rem", children: invoices.slice(0, listSize).map(({ date, amount, url }, index) => {
18854
+ /* @__PURE__ */ jsx30(Flex, { $flexDirection: "column", $gap: "0.5rem", children: invoices.slice(0, listSize).map(({ date, amount, url }, index) => {
18700
18855
  return /* @__PURE__ */ jsxs23(Flex, { $justifyContent: "space-between", children: [
18701
- props.date.isVisible && date && /* @__PURE__ */ jsx29(
18856
+ props.date.isVisible && date && /* @__PURE__ */ jsx30(
18702
18857
  InvoiceDate,
18703
18858
  {
18704
18859
  date,
@@ -18706,7 +18861,7 @@ var Invoices = forwardRef8(({ className, data, ...rest }, ref) => {
18706
18861
  url
18707
18862
  }
18708
18863
  ),
18709
- props.amount.isVisible && /* @__PURE__ */ jsx29(
18864
+ props.amount.isVisible && /* @__PURE__ */ jsx30(
18710
18865
  Text,
18711
18866
  {
18712
18867
  $font: theme.typography[props.amount.fontStyle].fontFamily,
@@ -18719,14 +18874,14 @@ var Invoices = forwardRef8(({ className, data, ...rest }, ref) => {
18719
18874
  ] }, index);
18720
18875
  }) }),
18721
18876
  props.collapse.isVisible && invoices.length > props.limit.number && /* @__PURE__ */ jsxs23(Flex, { $alignItems: "center", $gap: "0.5rem", children: [
18722
- /* @__PURE__ */ jsx29(
18877
+ /* @__PURE__ */ jsx30(
18723
18878
  Icon2,
18724
18879
  {
18725
18880
  name: `chevron-${listSize === props.limit.number ? "down" : "up"}`,
18726
18881
  style: { color: "#D0D0D0" }
18727
18882
  }
18728
18883
  ),
18729
- /* @__PURE__ */ jsx29(
18884
+ /* @__PURE__ */ jsx30(
18730
18885
  Text,
18731
18886
  {
18732
18887
  onClick: toggleListSize,
@@ -18743,7 +18898,7 @@ var Invoices = forwardRef8(({ className, data, ...rest }, ref) => {
18743
18898
  Invoices.displayName = "Invoices";
18744
18899
 
18745
18900
  // src/components/elements/metered-features/MeteredFeatures.tsx
18746
- import { forwardRef as forwardRef9, useMemo as useMemo10, useRef as useRef8 } from "react";
18901
+ import { forwardRef as forwardRef10, useMemo as useMemo10, useRef as useRef8 } from "react";
18747
18902
 
18748
18903
  // src/components/elements/metered-features/styles.ts
18749
18904
  var Container4 = dt.div`
@@ -18786,8 +18941,8 @@ var Container4 = dt.div`
18786
18941
  `;
18787
18942
 
18788
18943
  // src/components/elements/metered-features/MeteredFeatures.tsx
18789
- import { Fragment as Fragment10, jsx as jsx30, jsxs as jsxs24 } from "react/jsx-runtime";
18790
- function resolveDesignProps3(props) {
18944
+ import { Fragment as Fragment10, jsx as jsx31, jsxs as jsxs24 } from "react/jsx-runtime";
18945
+ function resolveDesignProps4(props) {
18791
18946
  return {
18792
18947
  isVisible: props.isVisible ?? true,
18793
18948
  header: {
@@ -18812,8 +18967,8 @@ function resolveDesignProps3(props) {
18812
18967
  visibleFeatures: props.visibleFeatures
18813
18968
  };
18814
18969
  }
18815
- var MeteredFeatures = forwardRef9(({ className, ...rest }, ref) => {
18816
- const props = resolveDesignProps3(rest);
18970
+ var MeteredFeatures = forwardRef10(({ className, ...rest }, ref) => {
18971
+ const props = resolveDesignProps4(rest);
18817
18972
  const elements = useRef8([]);
18818
18973
  const shouldWrapChildren = useWrapChildren(elements.current);
18819
18974
  const { t: t2 } = useTranslation();
@@ -18842,7 +18997,7 @@ var MeteredFeatures = forwardRef9(({ className, ...rest }, ref) => {
18842
18997
  if (!shouldShowFeatures) {
18843
18998
  return null;
18844
18999
  }
18845
- return /* @__PURE__ */ jsx30(Container4, { ref, className, children: featureUsage.map(
19000
+ return /* @__PURE__ */ jsx31(Container4, { ref, className, children: featureUsage.map(
18846
19001
  ({
18847
19002
  feature,
18848
19003
  priceBehavior,
@@ -18858,7 +19013,7 @@ var MeteredFeatures = forwardRef9(({ className, ...rest }, ref) => {
18858
19013
  const { price, currency } = getBillingPrice(
18859
19014
  planPeriod === "year" ? yearlyUsageBasedPrice : monthlyUsageBasedPrice
18860
19015
  ) || {};
18861
- const progressBar = props.isVisible && typeof usage === "number" && limit > 0 && priceBehavior !== "pay_as_you_go" && /* @__PURE__ */ jsx30(
19016
+ const progressBar = props.isVisible && typeof usage === "number" && limit > 0 && priceBehavior !== "pay_as_you_go" && /* @__PURE__ */ jsx31(
18862
19017
  ProgressBar,
18863
19018
  {
18864
19019
  progress: (isOverage ? softLimit / usage : usage / limit) * 100,
@@ -18884,7 +19039,7 @@ var MeteredFeatures = forwardRef9(({ className, ...rest }, ref) => {
18884
19039
  $borderBottomRightRadius: `${theme.card.borderRadius / TEXT_BASE_SIZE}rem`
18885
19040
  },
18886
19041
  children: [
18887
- /* @__PURE__ */ jsx30(
19042
+ /* @__PURE__ */ jsx31(
18888
19043
  Text,
18889
19044
  {
18890
19045
  $font: theme.typography.text.fontFamily,
@@ -18932,7 +19087,7 @@ var MeteredFeatures = forwardRef9(({ className, ...rest }, ref) => {
18932
19087
  }
18933
19088
  ),
18934
19089
  /* @__PURE__ */ jsxs24(Element, { as: Flex, $gap: "1.5rem", children: [
18935
- props.icon.isVisible && feature?.icon && /* @__PURE__ */ jsx30(
19090
+ props.icon.isVisible && feature?.icon && /* @__PURE__ */ jsx31(
18936
19091
  IconRound,
18937
19092
  {
18938
19093
  name: feature.icon,
@@ -18956,7 +19111,7 @@ var MeteredFeatures = forwardRef9(({ className, ...rest }, ref) => {
18956
19111
  $gap: "1rem",
18957
19112
  children: [
18958
19113
  feature?.name && /* @__PURE__ */ jsxs24(Flex, { $flexDirection: "column", $gap: "0.5rem", $flexGrow: 1, children: [
18959
- /* @__PURE__ */ jsx30(
19114
+ /* @__PURE__ */ jsx31(
18960
19115
  Text,
18961
19116
  {
18962
19117
  as: Box,
@@ -18972,7 +19127,7 @@ var MeteredFeatures = forwardRef9(({ className, ...rest }, ref) => {
18972
19127
  ] }) : feature.name
18973
19128
  }
18974
19129
  ),
18975
- props.description.isVisible && /* @__PURE__ */ jsx30(
19130
+ props.description.isVisible && /* @__PURE__ */ jsx31(
18976
19131
  Text,
18977
19132
  {
18978
19133
  as: Box,
@@ -18991,7 +19146,7 @@ var MeteredFeatures = forwardRef9(({ className, ...rest }, ref) => {
18991
19146
  $flexGrow: 1,
18992
19147
  $textAlign: shouldWrapChildren ? "left" : "right",
18993
19148
  children: [
18994
- props.usage.isVisible && /* @__PURE__ */ jsx30(
19149
+ props.usage.isVisible && /* @__PURE__ */ jsx31(
18995
19150
  Text,
18996
19151
  {
18997
19152
  as: Box,
@@ -19015,7 +19170,7 @@ var MeteredFeatures = forwardRef9(({ className, ...rest }, ref) => {
19015
19170
  ] })
19016
19171
  }
19017
19172
  ),
19018
- props.allocation.isVisible && priceBehavior !== "overage" && /* @__PURE__ */ jsx30(Box, { $whiteSpace: "nowrap", children: /* @__PURE__ */ jsx30(
19173
+ props.allocation.isVisible && priceBehavior !== "overage" && /* @__PURE__ */ jsx31(Box, { $whiteSpace: "nowrap", children: /* @__PURE__ */ jsx31(
19019
19174
  Text,
19020
19175
  {
19021
19176
  $font: theme.typography[props.allocation.fontStyle].fontFamily,
@@ -19041,11 +19196,11 @@ var MeteredFeatures = forwardRef9(({ className, ...rest }, ref) => {
19041
19196
  }
19042
19197
  ),
19043
19198
  props.isVisible && typeof usage === "number" && priceBehavior !== "pay_as_you_go" && /* @__PURE__ */ jsxs24(Flex, { $gap: "2rem", children: [
19044
- typeof allocation === "number" ? /* @__PURE__ */ jsx30(
19199
+ typeof allocation === "number" ? /* @__PURE__ */ jsx31(
19045
19200
  Tooltip,
19046
19201
  {
19047
19202
  trigger: progressBar,
19048
- content: /* @__PURE__ */ jsx30(
19203
+ content: /* @__PURE__ */ jsx31(
19049
19204
  Text,
19050
19205
  {
19051
19206
  $font: theme.typography.text.fontFamily,
@@ -19062,7 +19217,7 @@ var MeteredFeatures = forwardRef9(({ className, ...rest }, ref) => {
19062
19217
  $flexGrow: 1
19063
19218
  }
19064
19219
  ) : progressBar,
19065
- priceBehavior === "pay_in_advance" && /* @__PURE__ */ jsx30(
19220
+ priceBehavior === "pay_in_advance" && /* @__PURE__ */ jsx31(
19066
19221
  EmbedButton,
19067
19222
  {
19068
19223
  onClick: () => {
@@ -19086,11 +19241,11 @@ var MeteredFeatures = forwardRef9(({ className, ...rest }, ref) => {
19086
19241
  MeteredFeatures.displayName = "MeteredFeatures";
19087
19242
 
19088
19243
  // src/components/elements/payment-method/PaymentMethod.tsx
19089
- import { forwardRef as forwardRef10, useMemo as useMemo12 } from "react";
19244
+ import { forwardRef as forwardRef11, useMemo as useMemo12 } from "react";
19090
19245
 
19091
19246
  // src/components/elements/payment-method/PaymentMethodElement.tsx
19092
19247
  import { useMemo as useMemo11 } from "react";
19093
- import { jsx as jsx31, jsxs as jsxs25 } from "react/jsx-runtime";
19248
+ import { jsx as jsx32, jsxs as jsxs25 } from "react/jsx-runtime";
19094
19249
  var PaymentElement2 = ({
19095
19250
  iconName,
19096
19251
  iconTitle,
@@ -19099,17 +19254,17 @@ var PaymentElement2 = ({
19099
19254
  paymentLast4
19100
19255
  }) => {
19101
19256
  const theme = nt();
19102
- return /* @__PURE__ */ jsx31(Text, { $font: theme.typography.text.fontFamily, $size: 16, children: /* @__PURE__ */ jsxs25(Flex, { $flexDirection: "row", $alignItems: "center", $gap: "0.5rem", children: [
19103
- iconName && /* @__PURE__ */ jsx31(Box, { children: /* @__PURE__ */ jsx31(Icon2, { name: iconName, title: iconTitle, style: iconStyles }) }),
19257
+ return /* @__PURE__ */ jsx32(Text, { $font: theme.typography.text.fontFamily, $size: 16, children: /* @__PURE__ */ jsxs25(Flex, { $flexDirection: "row", $alignItems: "center", $gap: "0.5rem", children: [
19258
+ iconName && /* @__PURE__ */ jsx32(Box, { children: /* @__PURE__ */ jsx32(Icon2, { name: iconName, title: iconTitle, style: iconStyles }) }),
19104
19259
  /* @__PURE__ */ jsxs25(Flex, { $alignItems: "center", children: [
19105
- /* @__PURE__ */ jsx31(Box, { $lineHeight: "1", $marginRight: "4px", children: t(label) }),
19106
- paymentLast4 && /* @__PURE__ */ jsx31(Box, { $display: "inline-block", $fontWeight: "bold", children: paymentLast4 })
19260
+ /* @__PURE__ */ jsx32(Box, { $lineHeight: "1", $marginRight: "4px", children: t(label) }),
19261
+ paymentLast4 && /* @__PURE__ */ jsx32(Box, { $display: "inline-block", $fontWeight: "bold", children: paymentLast4 })
19107
19262
  ] })
19108
19263
  ] }) });
19109
19264
  };
19110
19265
  var EmptyPaymentElement = () => {
19111
19266
  const theme = nt();
19112
- return /* @__PURE__ */ jsx31(Text, { $font: theme.typography.text.fontFamily, $size: 16, children: /* @__PURE__ */ jsx31(Flex, { $flexDirection: "row", $alignItems: "center", children: /* @__PURE__ */ jsx31(Flex, { $alignItems: "center", children: /* @__PURE__ */ jsx31(Box, { $lineHeight: "1", $marginRight: "4px", children: t("No payment method selected") }) }) }) });
19267
+ return /* @__PURE__ */ jsx32(Text, { $font: theme.typography.text.fontFamily, $size: 16, children: /* @__PURE__ */ jsx32(Flex, { $flexDirection: "row", $alignItems: "center", children: /* @__PURE__ */ jsx32(Flex, { $alignItems: "center", children: /* @__PURE__ */ jsx32(Box, { $lineHeight: "1", $marginRight: "4px", children: t("No payment method selected") }) }) }) });
19113
19268
  };
19114
19269
  var getPaymentMethodData = ({
19115
19270
  accountLast4,
@@ -19200,7 +19355,7 @@ var PaymentMethodElement = ({
19200
19355
  }
19201
19356
  return /* @__PURE__ */ jsxs25(Flex, { $flexDirection: "column", $gap: `${sizeFactor}rem`, children: [
19202
19357
  props.header.isVisible && /* @__PURE__ */ jsxs25(Flex, { $justifyContent: "space-between", $alignItems: "center", children: [
19203
- /* @__PURE__ */ jsx31(
19358
+ /* @__PURE__ */ jsx32(
19204
19359
  Text,
19205
19360
  {
19206
19361
  $font: theme.typography[props.header.fontStyle].fontFamily,
@@ -19210,7 +19365,7 @@ var PaymentMethodElement = ({
19210
19365
  children: t2("Payment Method")
19211
19366
  }
19212
19367
  ),
19213
- props.functions.showExpiration && typeof monthsToExpiration === "number" && monthsToExpiration < 4 && /* @__PURE__ */ jsx31(
19368
+ props.functions.showExpiration && typeof monthsToExpiration === "number" && monthsToExpiration < 4 && /* @__PURE__ */ jsx32(
19214
19369
  Text,
19215
19370
  {
19216
19371
  $font: theme.typography.text.fontFamily,
@@ -19230,15 +19385,15 @@ var PaymentMethodElement = ({
19230
19385
  $padding: `${sizeFactor / 2.2}rem ${sizeFactor}rem`,
19231
19386
  $borderRadius: "9999px",
19232
19387
  children: [
19233
- paymentMethod && /* @__PURE__ */ jsx31(
19388
+ paymentMethod && /* @__PURE__ */ jsx32(
19234
19389
  PaymentElement2,
19235
19390
  {
19236
19391
  ...getPaymentMethodData(paymentMethod),
19237
19392
  ...getIconStyles({ size, theme })
19238
19393
  }
19239
19394
  ),
19240
- !paymentMethod && /* @__PURE__ */ jsx31(EmptyPaymentElement, {}),
19241
- props.functions.allowEdit && onEdit && /* @__PURE__ */ jsx31(
19395
+ !paymentMethod && /* @__PURE__ */ jsx32(EmptyPaymentElement, {}),
19396
+ props.functions.allowEdit && onEdit && /* @__PURE__ */ jsx32(
19242
19397
  Text,
19243
19398
  {
19244
19399
  onClick: onEdit,
@@ -19292,8 +19447,8 @@ var PaymentListElement = ({
19292
19447
  $font: theme.typography.text.fontFamily,
19293
19448
  $color: theme.typography.text.color,
19294
19449
  children: [
19295
- /* @__PURE__ */ jsx31(Box, { $paddingLeft: "0.5rem", $paddingRight: "0.5rem", children: iconName && /* @__PURE__ */ jsx31(Icon2, { name: iconName, title: iconTitle, style: iconStyles }) }),
19296
- /* @__PURE__ */ jsx31(Box, { $flexGrow: "1", children: /* @__PURE__ */ jsxs25(
19450
+ /* @__PURE__ */ jsx32(Box, { $paddingLeft: "0.5rem", $paddingRight: "0.5rem", children: iconName && /* @__PURE__ */ jsx32(Icon2, { name: iconName, title: iconTitle, style: iconStyles }) }),
19451
+ /* @__PURE__ */ jsx32(Box, { $flexGrow: "1", children: /* @__PURE__ */ jsxs25(
19297
19452
  Text,
19298
19453
  {
19299
19454
  $font: theme.typography.text.fontFamily,
@@ -19307,12 +19462,12 @@ var PaymentListElement = ({
19307
19462
  ]
19308
19463
  }
19309
19464
  ) }),
19310
- /* @__PURE__ */ jsx31(
19465
+ /* @__PURE__ */ jsx32(
19311
19466
  Box,
19312
19467
  {
19313
19468
  $flexGrow: "1",
19314
19469
  $color: isLightBackground ? "hsla(0, 0%, 0%, 0.375)" : "hsla(0, 0%, 100%, 0.375)",
19315
- children: /* @__PURE__ */ jsx31(
19470
+ children: /* @__PURE__ */ jsx32(
19316
19471
  Text,
19317
19472
  {
19318
19473
  $font: theme.typography.text.fontFamily,
@@ -19324,7 +19479,7 @@ var PaymentListElement = ({
19324
19479
  )
19325
19480
  }
19326
19481
  ),
19327
- /* @__PURE__ */ jsx31(Box, { children: /* @__PURE__ */ jsx31(
19482
+ /* @__PURE__ */ jsx32(Box, { children: /* @__PURE__ */ jsx32(
19328
19483
  Text,
19329
19484
  {
19330
19485
  onClick: () => {
@@ -19337,7 +19492,7 @@ var PaymentListElement = ({
19337
19492
  children: t("Set default")
19338
19493
  }
19339
19494
  ) }),
19340
- /* @__PURE__ */ jsx31(
19495
+ /* @__PURE__ */ jsx32(
19341
19496
  Box,
19342
19497
  {
19343
19498
  $cursor: "pointer",
@@ -19345,7 +19500,7 @@ var PaymentListElement = ({
19345
19500
  onClick: () => {
19346
19501
  handleDelete(paymentMethod.id);
19347
19502
  },
19348
- children: /* @__PURE__ */ jsx31(
19503
+ children: /* @__PURE__ */ jsx32(
19349
19504
  Icon2,
19350
19505
  {
19351
19506
  name: "close",
@@ -19363,8 +19518,8 @@ var PaymentListElement = ({
19363
19518
  };
19364
19519
 
19365
19520
  // src/components/elements/payment-method/PaymentMethod.tsx
19366
- import { jsx as jsx32 } from "react/jsx-runtime";
19367
- var resolveDesignProps4 = (props) => {
19521
+ import { jsx as jsx33 } from "react/jsx-runtime";
19522
+ var resolveDesignProps5 = (props) => {
19368
19523
  return {
19369
19524
  header: {
19370
19525
  isVisible: props.header?.isVisible ?? true,
@@ -19376,8 +19531,8 @@ var resolveDesignProps4 = (props) => {
19376
19531
  }
19377
19532
  };
19378
19533
  };
19379
- var PaymentMethod = forwardRef10(({ children, className, portal, allowEdit = true, ...rest }, ref) => {
19380
- const props = resolveDesignProps4(rest);
19534
+ var PaymentMethod = forwardRef11(({ children, className, portal, allowEdit = true, ...rest }, ref) => {
19535
+ const props = resolveDesignProps5(rest);
19381
19536
  const { data, setLayout } = useEmbed();
19382
19537
  const paymentMethod = useMemo12(() => {
19383
19538
  return data.subscription?.paymentMethod;
@@ -19395,7 +19550,7 @@ var PaymentMethod = forwardRef10(({ children, className, portal, allowEdit = tru
19395
19550
  }
19396
19551
  return expiration;
19397
19552
  }, [paymentMethod?.cardExpYear, paymentMethod?.cardExpMonth]);
19398
- return /* @__PURE__ */ jsx32(Element, { ref, className, children: /* @__PURE__ */ jsx32(
19553
+ return /* @__PURE__ */ jsx33(Element, { ref, className, children: /* @__PURE__ */ jsx33(
19399
19554
  PaymentMethodElement,
19400
19555
  {
19401
19556
  paymentMethod,
@@ -19410,8 +19565,8 @@ PaymentMethod.displayName = "PaymentMethod";
19410
19565
  // src/components/elements/payment-method/PaymentMethodDetails.tsx
19411
19566
  import { Elements } from "@stripe/react-stripe-js";
19412
19567
  import { useCallback as useCallback10, useEffect as useEffect7, useMemo as useMemo13, useState as useState14 } from "react";
19413
- import { jsx as jsx33, jsxs as jsxs26 } from "react/jsx-runtime";
19414
- var resolveDesignProps5 = () => {
19568
+ import { jsx as jsx34, jsxs as jsxs26 } from "react/jsx-runtime";
19569
+ var resolveDesignProps6 = () => {
19415
19570
  return {
19416
19571
  header: {
19417
19572
  isVisible: true,
@@ -19426,7 +19581,7 @@ var resolveDesignProps5 = () => {
19426
19581
  var PaymentMethodDetails = ({
19427
19582
  setPaymentMethodId
19428
19583
  }) => {
19429
- const props = resolveDesignProps5();
19584
+ const props = resolveDesignProps6();
19430
19585
  const { t: t2 } = useTranslation();
19431
19586
  const theme = nt();
19432
19587
  const { api, data, setData } = useEmbed();
@@ -19544,7 +19699,7 @@ var PaymentMethodDetails = ({
19544
19699
  [api, data, setData, t2]
19545
19700
  );
19546
19701
  return /* @__PURE__ */ jsxs26(Flex, { $position: "relative", children: [
19547
- isLoading && /* @__PURE__ */ jsx33(
19702
+ isLoading && /* @__PURE__ */ jsx34(
19548
19703
  Flex,
19549
19704
  {
19550
19705
  $position: "absolute",
@@ -19556,7 +19711,7 @@ var PaymentMethodDetails = ({
19556
19711
  $zIndex: 1,
19557
19712
  $backgroundColor: "black",
19558
19713
  $opacity: 0.5,
19559
- children: /* @__PURE__ */ jsx33(Loader, { $color: theme.primary, $size: "2xl" })
19714
+ children: /* @__PURE__ */ jsx34(Loader, { $color: theme.primary, $size: "2xl" })
19560
19715
  }
19561
19716
  ),
19562
19717
  /* @__PURE__ */ jsxs26(
@@ -19569,7 +19724,7 @@ var PaymentMethodDetails = ({
19569
19724
  $backgroundColor: isLightBackground ? "hsla(0, 0%, 0%, 0.025)" : "hsla(0, 0%, 100%, 0.025)",
19570
19725
  $overflow: "auto",
19571
19726
  children: [
19572
- showPaymentForm ? /* @__PURE__ */ jsx33(
19727
+ showPaymentForm ? /* @__PURE__ */ jsx34(
19573
19728
  Elements,
19574
19729
  {
19575
19730
  stripe,
@@ -19598,7 +19753,7 @@ var PaymentMethodDetails = ({
19598
19753
  },
19599
19754
  clientSecret: setupIntent?.setupIntentClientSecret
19600
19755
  },
19601
- children: /* @__PURE__ */ jsx33(
19756
+ children: /* @__PURE__ */ jsx34(
19602
19757
  PaymentForm,
19603
19758
  {
19604
19759
  onConfirm: async (paymentMethodId) => {
@@ -19610,7 +19765,7 @@ var PaymentMethodDetails = ({
19610
19765
  )
19611
19766
  }
19612
19767
  ) : /* @__PURE__ */ jsxs26(Flex, { $flexDirection: "column", $gap: "2rem", children: [
19613
- /* @__PURE__ */ jsx33(
19768
+ /* @__PURE__ */ jsx34(
19614
19769
  PaymentMethodElement,
19615
19770
  {
19616
19771
  size: "lg",
@@ -19619,7 +19774,7 @@ var PaymentMethodDetails = ({
19619
19774
  ...props
19620
19775
  }
19621
19776
  ),
19622
- (data.company?.paymentMethods || []).length > 0 && /* @__PURE__ */ jsx33(Box, { children: /* @__PURE__ */ jsxs26(
19777
+ (data.company?.paymentMethods || []).length > 0 && /* @__PURE__ */ jsx34(Box, { children: /* @__PURE__ */ jsxs26(
19623
19778
  Text,
19624
19779
  {
19625
19780
  onClick: dropDownDifferentPaymentMethods,
@@ -19629,7 +19784,7 @@ var PaymentMethodDetails = ({
19629
19784
  $color: theme.typography.link.color,
19630
19785
  children: [
19631
19786
  t2("Choose different payment method"),
19632
- /* @__PURE__ */ jsx33(
19787
+ /* @__PURE__ */ jsx34(
19633
19788
  Icon2,
19634
19789
  {
19635
19790
  name: "chevron-down",
@@ -19645,9 +19800,9 @@ var PaymentMethodDetails = ({
19645
19800
  ]
19646
19801
  }
19647
19802
  ) }),
19648
- showDifferentPaymentMethods && /* @__PURE__ */ jsx33(Flex, { $flexDirection: "column", $overflowY: "hidden", $height: "10rem", children: /* @__PURE__ */ jsx33(Flex, { $flexDirection: "column", $overflowY: "scroll", children: (data.company?.paymentMethods.filter(
19803
+ showDifferentPaymentMethods && /* @__PURE__ */ jsx34(Flex, { $flexDirection: "column", $overflowY: "hidden", $height: "10rem", children: /* @__PURE__ */ jsx34(Flex, { $flexDirection: "column", $overflowY: "scroll", children: (data.company?.paymentMethods.filter(
19649
19804
  (pm) => pm.id !== paymentMethod?.id
19650
- ) || []).map((paymentMethod2) => /* @__PURE__ */ jsx33(
19805
+ ) || []).map((paymentMethod2) => /* @__PURE__ */ jsx34(
19651
19806
  PaymentListElement,
19652
19807
  {
19653
19808
  paymentMethod: paymentMethod2,
@@ -19656,9 +19811,9 @@ var PaymentMethodDetails = ({
19656
19811
  },
19657
19812
  paymentMethod2.id
19658
19813
  )) }) }),
19659
- (!paymentMethod || showDifferentPaymentMethods) && /* @__PURE__ */ jsx33(EmbedButton, { onClick: createSetupIntent, size: "lg", children: t2("Add new payment method") })
19814
+ (!paymentMethod || showDifferentPaymentMethods) && /* @__PURE__ */ jsx34(EmbedButton, { onClick: createSetupIntent, size: "lg", children: t2("Add new payment method") })
19660
19815
  ] }),
19661
- !isLoading && error && /* @__PURE__ */ jsx33(Box, { children: /* @__PURE__ */ jsx33(
19816
+ !isLoading && error && /* @__PURE__ */ jsx34(Box, { children: /* @__PURE__ */ jsx34(
19662
19817
  Text,
19663
19818
  {
19664
19819
  $font: theme.typography.text.fontFamily,
@@ -19675,9 +19830,9 @@ var PaymentMethodDetails = ({
19675
19830
  };
19676
19831
 
19677
19832
  // src/components/elements/plan-manager/PlanManager.tsx
19678
- import { forwardRef as forwardRef11, useMemo as useMemo14 } from "react";
19679
- import { Fragment as Fragment11, jsx as jsx34, jsxs as jsxs27 } from "react/jsx-runtime";
19680
- var resolveDesignProps6 = (props) => {
19833
+ import { forwardRef as forwardRef12, useMemo as useMemo14 } from "react";
19834
+ import { Fragment as Fragment11, jsx as jsx35, jsxs as jsxs27 } from "react/jsx-runtime";
19835
+ var resolveDesignProps7 = (props) => {
19681
19836
  return {
19682
19837
  header: {
19683
19838
  isVisible: props.header?.isVisible ?? true,
@@ -19705,8 +19860,8 @@ var resolveDesignProps6 = (props) => {
19705
19860
  }
19706
19861
  };
19707
19862
  };
19708
- var PlanManager = forwardRef11(({ children, className, portal, ...rest }, ref) => {
19709
- const props = resolveDesignProps6(rest);
19863
+ var PlanManager = forwardRef12(({ children, className, portal, ...rest }, ref) => {
19864
+ const props = resolveDesignProps7(rest);
19710
19865
  const theme = nt();
19711
19866
  const { t: t2 } = useTranslation();
19712
19867
  const { data, setLayout, setSelected } = useEmbed();
@@ -19755,7 +19910,7 @@ var PlanManager = forwardRef11(({ children, className, portal, ...rest }, ref) =
19755
19910
  $textAlign: "center",
19756
19911
  $backgroundColor: isLightBackground ? darken(theme.card.background, 0.04) : lighten(theme.card.background, 0.04),
19757
19912
  children: [
19758
- /* @__PURE__ */ jsx34(
19913
+ /* @__PURE__ */ jsx35(
19759
19914
  Text,
19760
19915
  {
19761
19916
  as: "h3",
@@ -19766,7 +19921,7 @@ var PlanManager = forwardRef11(({ children, className, portal, ...rest }, ref) =
19766
19921
  children: t2("Trial ends in", { days: trialEndDays.toString() })
19767
19922
  }
19768
19923
  ),
19769
- /* @__PURE__ */ jsx34(
19924
+ /* @__PURE__ */ jsx35(
19770
19925
  Text,
19771
19926
  {
19772
19927
  as: "p",
@@ -19793,7 +19948,7 @@ var PlanManager = forwardRef11(({ children, className, portal, ...rest }, ref) =
19793
19948
  $textAlign: "center",
19794
19949
  $backgroundColor: isLightBackground ? darken(theme.card.background, 0.04) : lighten(theme.card.background, 0.04),
19795
19950
  children: [
19796
- /* @__PURE__ */ jsx34(
19951
+ /* @__PURE__ */ jsx35(
19797
19952
  Text,
19798
19953
  {
19799
19954
  as: "h3",
@@ -19804,7 +19959,7 @@ var PlanManager = forwardRef11(({ children, className, portal, ...rest }, ref) =
19804
19959
  children: t2("Subscription canceled")
19805
19960
  }
19806
19961
  ),
19807
- billingSubscription?.cancelAt && /* @__PURE__ */ jsx34(
19962
+ billingSubscription?.cancelAt && /* @__PURE__ */ jsx35(
19808
19963
  Text,
19809
19964
  {
19810
19965
  as: "p",
@@ -19843,7 +19998,7 @@ var PlanManager = forwardRef11(({ children, className, portal, ...rest }, ref) =
19843
19998
  $gap: "1rem",
19844
19999
  children: [
19845
20000
  /* @__PURE__ */ jsxs27(Flex, { $flexDirection: "column", $gap: "1rem", children: [
19846
- /* @__PURE__ */ jsx34(
20001
+ /* @__PURE__ */ jsx35(
19847
20002
  Text,
19848
20003
  {
19849
20004
  as: Box,
@@ -19855,7 +20010,7 @@ var PlanManager = forwardRef11(({ children, className, portal, ...rest }, ref) =
19855
20010
  children: currentPlan.name
19856
20011
  }
19857
20012
  ),
19858
- props.header.description.isVisible && currentPlan.description && /* @__PURE__ */ jsx34(
20013
+ props.header.description.isVisible && currentPlan.description && /* @__PURE__ */ jsx35(
19859
20014
  Text,
19860
20015
  {
19861
20016
  as: Box,
@@ -19868,7 +20023,7 @@ var PlanManager = forwardRef11(({ children, className, portal, ...rest }, ref) =
19868
20023
  )
19869
20024
  ] }),
19870
20025
  props.header.price.isVisible && typeof currentPlan.planPrice === "number" && currentPlan.planPeriod && /* @__PURE__ */ jsxs27(Box, { children: [
19871
- /* @__PURE__ */ jsx34(
20026
+ /* @__PURE__ */ jsx35(
19872
20027
  Text,
19873
20028
  {
19874
20029
  $font: headerPriceFontStyle.fontFamily,
@@ -19881,7 +20036,7 @@ var PlanManager = forwardRef11(({ children, className, portal, ...rest }, ref) =
19881
20036
  )
19882
20037
  }
19883
20038
  ),
19884
- !isUsageBasedPlan && /* @__PURE__ */ jsx34(
20039
+ !isUsageBasedPlan && /* @__PURE__ */ jsx35(
19885
20040
  Text,
19886
20041
  {
19887
20042
  $font: theme.typography[props.header.price.fontStyle].fontFamily,
@@ -19899,7 +20054,7 @@ var PlanManager = forwardRef11(({ children, className, portal, ...rest }, ref) =
19899
20054
  }
19900
20055
  ),
19901
20056
  props.addOns.isVisible && addOns.length > 0 && /* @__PURE__ */ jsxs27(Flex, { $flexDirection: "column", $gap: "1rem", children: [
19902
- props.addOns.showLabel && /* @__PURE__ */ jsx34(
20057
+ props.addOns.showLabel && /* @__PURE__ */ jsx35(
19903
20058
  Text,
19904
20059
  {
19905
20060
  $font: theme.typography.text.fontFamily,
@@ -19918,7 +20073,7 @@ var PlanManager = forwardRef11(({ children, className, portal, ...rest }, ref) =
19918
20073
  $flexWrap: "wrap",
19919
20074
  $gap: "1rem",
19920
20075
  children: [
19921
- /* @__PURE__ */ jsx34(
20076
+ /* @__PURE__ */ jsx35(
19922
20077
  Text,
19923
20078
  {
19924
20079
  $font: theme.typography[props.addOns.fontStyle].fontFamily,
@@ -19950,7 +20105,7 @@ var PlanManager = forwardRef11(({ children, className, portal, ...rest }, ref) =
19950
20105
  ))
19951
20106
  ] }),
19952
20107
  usageBasedEntitlements.length > 0 && /* @__PURE__ */ jsxs27(Flex, { $flexDirection: "column", $gap: "1rem", children: [
19953
- /* @__PURE__ */ jsx34(
20108
+ /* @__PURE__ */ jsx35(
19954
20109
  Text,
19955
20110
  {
19956
20111
  $font: theme.typography.text.fontFamily,
@@ -19997,7 +20152,7 @@ var PlanManager = forwardRef11(({ children, className, portal, ...rest }, ref) =
19997
20152
  }
19998
20153
  ),
19999
20154
  /* @__PURE__ */ jsxs27(Flex, { $alignItems: "center", $gap: "1rem", children: [
20000
- entitlement.priceBehavior === "overage" && currentPlan?.planPeriod ? /* @__PURE__ */ jsx34(
20155
+ entitlement.priceBehavior === "overage" && currentPlan?.planPeriod ? /* @__PURE__ */ jsx35(
20001
20156
  Text,
20002
20157
  {
20003
20158
  $font: theme.typography.text.fontFamily,
@@ -20076,7 +20231,7 @@ var PlanManager = forwardRef11(({ children, className, portal, ...rest }, ref) =
20076
20231
  []
20077
20232
  )
20078
20233
  ] }),
20079
- canCheckout && props.callToAction.isVisible && /* @__PURE__ */ jsx34(
20234
+ canCheckout && props.callToAction.isVisible && /* @__PURE__ */ jsx35(
20080
20235
  EmbedButton,
20081
20236
  {
20082
20237
  type: "button",
@@ -20101,9 +20256,9 @@ var PlanManager = forwardRef11(({ children, className, portal, ...rest }, ref) =
20101
20256
  PlanManager.displayName = "PlanManager";
20102
20257
 
20103
20258
  // src/components/elements/pricing-table/PricingTable.tsx
20104
- import { forwardRef as forwardRef12, useState as useState15 } from "react";
20105
- import { Fragment as Fragment12, jsx as jsx35, jsxs as jsxs28 } from "react/jsx-runtime";
20106
- var resolveDesignProps7 = (props) => {
20259
+ import { forwardRef as forwardRef13, useState as useState15 } from "react";
20260
+ import { Fragment as Fragment12, jsx as jsx36, jsxs as jsxs28 } from "react/jsx-runtime";
20261
+ var resolveDesignProps8 = (props) => {
20107
20262
  return {
20108
20263
  showPeriodToggle: props.showPeriodToggle ?? true,
20109
20264
  showDiscount: props.showDiscount ?? true,
@@ -20142,8 +20297,8 @@ var resolveDesignProps7 = (props) => {
20142
20297
  }
20143
20298
  };
20144
20299
  };
20145
- var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20146
- const props = resolveDesignProps7(rest);
20300
+ var PricingTable = forwardRef13(({ children, className, ...rest }, ref) => {
20301
+ const props = resolveDesignProps8(rest);
20147
20302
  const { t: t2 } = useTranslation();
20148
20303
  const theme = nt();
20149
20304
  const { data, setLayout, setSelected } = useEmbed();
@@ -20205,7 +20360,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20205
20360
  }
20206
20361
  },
20207
20362
  children: [
20208
- /* @__PURE__ */ jsx35(
20363
+ /* @__PURE__ */ jsx36(
20209
20364
  Text,
20210
20365
  {
20211
20366
  $font: theme.typography[props.header.fontStyle].fontFamily,
@@ -20215,7 +20370,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20215
20370
  children: props.header.isVisible && props.plans.isVisible && plans.length > 0 && t2("Plans")
20216
20371
  }
20217
20372
  ),
20218
- props.showPeriodToggle && /* @__PURE__ */ jsx35(
20373
+ props.showPeriodToggle && /* @__PURE__ */ jsx36(
20219
20374
  PeriodToggle,
20220
20375
  {
20221
20376
  options: periods,
@@ -20226,7 +20381,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20226
20381
  ]
20227
20382
  }
20228
20383
  ),
20229
- props.plans.isVisible && plans.length > 0 && /* @__PURE__ */ jsx35(
20384
+ props.plans.isVisible && plans.length > 0 && /* @__PURE__ */ jsx36(
20230
20385
  Box,
20231
20386
  {
20232
20387
  $display: "grid",
@@ -20268,7 +20423,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20268
20423
  $borderStyle: "solid",
20269
20424
  $borderColor: isLightBackground ? "hsla(0, 0%, 0%, 0.175)" : "hsla(0, 0%, 100%, 0.175)",
20270
20425
  children: [
20271
- /* @__PURE__ */ jsx35(Box, { children: /* @__PURE__ */ jsx35(
20426
+ /* @__PURE__ */ jsx36(Box, { children: /* @__PURE__ */ jsx36(
20272
20427
  Text,
20273
20428
  {
20274
20429
  $font: theme.typography[props.plans.name.fontStyle].fontFamily,
@@ -20278,7 +20433,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20278
20433
  children: plan.name
20279
20434
  }
20280
20435
  ) }),
20281
- props.plans.description.isVisible && /* @__PURE__ */ jsx35(Box, { $marginBottom: "0.5rem", children: /* @__PURE__ */ jsx35(
20436
+ props.plans.description.isVisible && /* @__PURE__ */ jsx36(Box, { $marginBottom: "0.5rem", children: /* @__PURE__ */ jsx36(
20282
20437
  Text,
20283
20438
  {
20284
20439
  $font: theme.typography[props.plans.description.fontStyle].fontFamily,
@@ -20289,7 +20444,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20289
20444
  }
20290
20445
  ) }),
20291
20446
  /* @__PURE__ */ jsxs28(Box, { children: [
20292
- /* @__PURE__ */ jsx35(
20447
+ /* @__PURE__ */ jsx36(
20293
20448
  Text,
20294
20449
  {
20295
20450
  $font: headerPriceFontStyle.fontFamily,
@@ -20313,7 +20468,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20313
20468
  }
20314
20469
  )
20315
20470
  ] }),
20316
- isActivePlan && /* @__PURE__ */ jsx35(
20471
+ isActivePlan && /* @__PURE__ */ jsx36(
20317
20472
  Flex,
20318
20473
  {
20319
20474
  $position: "absolute",
@@ -20322,7 +20477,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20322
20477
  $backgroundColor: theme.primary,
20323
20478
  $borderRadius: "9999px",
20324
20479
  $padding: "0.125rem 0.85rem",
20325
- children: /* @__PURE__ */ jsx35(
20480
+ children: /* @__PURE__ */ jsx36(
20326
20481
  Text,
20327
20482
  {
20328
20483
  $font: theme.typography.text.fontFamily,
@@ -20347,7 +20502,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20347
20502
  $padding: `${0.75 * cardPadding}rem ${cardPadding}rem 0`,
20348
20503
  children: [
20349
20504
  props.plans.showEntitlements && /* @__PURE__ */ jsxs28(Flex, { $flexDirection: "column", $gap: "1rem", $flexGrow: 1, children: [
20350
- props.plans.showInclusionText && planIndex > 0 && /* @__PURE__ */ jsx35(Box, { $marginBottom: "1.5rem", children: /* @__PURE__ */ jsx35(
20505
+ props.plans.showInclusionText && planIndex > 0 && /* @__PURE__ */ jsx36(Box, { $marginBottom: "1.5rem", children: /* @__PURE__ */ jsx36(
20351
20506
  Text,
20352
20507
  {
20353
20508
  $font: theme.typography.text.fontFamily,
@@ -20373,7 +20528,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20373
20528
  }
20374
20529
  acc.push(
20375
20530
  /* @__PURE__ */ jsxs28(Flex, { $gap: "1rem", children: [
20376
- props.plans.showFeatureIcons && entitlement.feature?.icon && /* @__PURE__ */ jsx35(
20531
+ props.plans.showFeatureIcons && entitlement.feature?.icon && /* @__PURE__ */ jsx36(
20377
20532
  IconRound,
20378
20533
  {
20379
20534
  name: entitlement.feature.icon,
@@ -20391,7 +20546,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20391
20546
  $justifyContent: "center",
20392
20547
  $gap: "0.5rem",
20393
20548
  children: [
20394
- /* @__PURE__ */ jsx35(
20549
+ /* @__PURE__ */ jsx36(
20395
20550
  Text,
20396
20551
  {
20397
20552
  $font: theme.typography.text.fontFamily,
@@ -20500,7 +20655,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20500
20655
  $justifyContent: "start",
20501
20656
  $marginTop: "1rem",
20502
20657
  children: [
20503
- /* @__PURE__ */ jsx35(
20658
+ /* @__PURE__ */ jsx36(
20504
20659
  Icon2,
20505
20660
  {
20506
20661
  name: isExpanded ? "chevron-up" : "chevron-down",
@@ -20512,7 +20667,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20512
20667
  }
20513
20668
  }
20514
20669
  ),
20515
- /* @__PURE__ */ jsx35(
20670
+ /* @__PURE__ */ jsx36(
20516
20671
  Text,
20517
20672
  {
20518
20673
  onClick: () => handleToggleShowAll(plan.id),
@@ -20537,7 +20692,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20537
20692
  $gap: "0.25rem",
20538
20693
  $padding: "0.625rem 0",
20539
20694
  children: [
20540
- /* @__PURE__ */ jsx35(
20695
+ /* @__PURE__ */ jsx36(
20541
20696
  Icon2,
20542
20697
  {
20543
20698
  name: "check-rounded",
@@ -20548,7 +20703,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20548
20703
  }
20549
20704
  }
20550
20705
  ),
20551
- /* @__PURE__ */ jsx35(
20706
+ /* @__PURE__ */ jsx36(
20552
20707
  Text,
20553
20708
  {
20554
20709
  $font: theme.typography.text.fontFamily,
@@ -20561,7 +20716,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20561
20716
  )
20562
20717
  ]
20563
20718
  }
20564
- ) : (props.upgrade.isVisible || props.downgrade.isVisible) && /* @__PURE__ */ jsx35(
20719
+ ) : (props.upgrade.isVisible || props.downgrade.isVisible) && /* @__PURE__ */ jsx36(
20565
20720
  EmbedButton,
20566
20721
  {
20567
20722
  type: "button",
@@ -20585,14 +20740,14 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20585
20740
  $color: props.downgrade.buttonStyle,
20586
20741
  $variant: "outline"
20587
20742
  },
20588
- children: plan.custom ? /* @__PURE__ */ jsx35(
20743
+ children: plan.custom ? /* @__PURE__ */ jsx36(
20589
20744
  ButtonLink,
20590
20745
  {
20591
20746
  href: plan.customPlanConfig?.ctaWebSite ?? "#",
20592
20747
  target: "_blank",
20593
20748
  children: plan.customPlanConfig?.ctaText ?? t2("Talk to support")
20594
20749
  }
20595
- ) : !plan.valid ? /* @__PURE__ */ jsx35(
20750
+ ) : !plan.valid ? /* @__PURE__ */ jsx36(
20596
20751
  Tooltip,
20597
20752
  {
20598
20753
  trigger: t2("Over usage limit"),
@@ -20614,14 +20769,14 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20614
20769
  }
20615
20770
  )
20616
20771
  ] }),
20617
- /* @__PURE__ */ jsx35(Box, { children: props.addOns.isVisible && addOns.length > 0 && /* @__PURE__ */ jsxs28(Fragment12, { children: [
20618
- props.header.isVisible && /* @__PURE__ */ jsx35(
20772
+ /* @__PURE__ */ jsx36(Box, { children: props.addOns.isVisible && addOns.length > 0 && /* @__PURE__ */ jsxs28(Fragment12, { children: [
20773
+ props.header.isVisible && /* @__PURE__ */ jsx36(
20619
20774
  Flex,
20620
20775
  {
20621
20776
  $justifyContent: "space-between",
20622
20777
  $alignItems: "center",
20623
20778
  $marginBottom: "1rem",
20624
- children: /* @__PURE__ */ jsx35(
20779
+ children: /* @__PURE__ */ jsx36(
20625
20780
  Text,
20626
20781
  {
20627
20782
  $font: theme.typography[props.header.fontStyle].fontFamily,
@@ -20633,7 +20788,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20633
20788
  )
20634
20789
  }
20635
20790
  ),
20636
- /* @__PURE__ */ jsx35(
20791
+ /* @__PURE__ */ jsx36(
20637
20792
  Box,
20638
20793
  {
20639
20794
  $display: "grid",
@@ -20659,7 +20814,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20659
20814
  ...theme.card.hasShadow && { $boxShadow: cardBoxShadow },
20660
20815
  children: [
20661
20816
  /* @__PURE__ */ jsxs28(Flex, { $flexDirection: "column", $gap: "0.75rem", children: [
20662
- /* @__PURE__ */ jsx35(Box, { children: /* @__PURE__ */ jsx35(
20817
+ /* @__PURE__ */ jsx36(Box, { children: /* @__PURE__ */ jsx36(
20663
20818
  Text,
20664
20819
  {
20665
20820
  $font: theme.typography[props.plans.name.fontStyle].fontFamily,
@@ -20669,7 +20824,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20669
20824
  children: addOn.name
20670
20825
  }
20671
20826
  ) }),
20672
- props.addOns.showDescription && /* @__PURE__ */ jsx35(Box, { $marginBottom: "0.5rem", children: /* @__PURE__ */ jsx35(
20827
+ props.addOns.showDescription && /* @__PURE__ */ jsx36(Box, { $marginBottom: "0.5rem", children: /* @__PURE__ */ jsx36(
20673
20828
  Text,
20674
20829
  {
20675
20830
  $font: theme.typography[props.plans.description.fontStyle].fontFamily,
@@ -20680,7 +20835,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20680
20835
  }
20681
20836
  ) }),
20682
20837
  /* @__PURE__ */ jsxs28(Box, { children: [
20683
- /* @__PURE__ */ jsx35(
20838
+ /* @__PURE__ */ jsx36(
20684
20839
  Text,
20685
20840
  {
20686
20841
  $font: theme.typography[props.plans.name.fontStyle].fontFamily,
@@ -20704,7 +20859,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20704
20859
  }
20705
20860
  )
20706
20861
  ] }),
20707
- isActiveAddOn && /* @__PURE__ */ jsx35(
20862
+ isActiveAddOn && /* @__PURE__ */ jsx36(
20708
20863
  Flex,
20709
20864
  {
20710
20865
  $position: "absolute",
@@ -20713,7 +20868,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20713
20868
  $backgroundColor: theme.primary,
20714
20869
  $borderRadius: "9999px",
20715
20870
  $padding: "0.125rem 0.85rem",
20716
- children: /* @__PURE__ */ jsx35(
20871
+ children: /* @__PURE__ */ jsx36(
20717
20872
  Text,
20718
20873
  {
20719
20874
  $font: theme.typography.text.fontFamily,
@@ -20734,7 +20889,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20734
20889
  $gap: `${cardPadding}rem`,
20735
20890
  $flexGrow: 1,
20736
20891
  children: [
20737
- props.addOns.showEntitlements && /* @__PURE__ */ jsx35(
20892
+ props.addOns.showEntitlements && /* @__PURE__ */ jsx36(
20738
20893
  Flex,
20739
20894
  {
20740
20895
  $flexDirection: "column",
@@ -20743,7 +20898,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20743
20898
  $flexGrow: 1,
20744
20899
  children: addOn.entitlements.map(
20745
20900
  (entitlement, entitlementIndex) => {
20746
- return /* @__PURE__ */ jsx35(
20901
+ return /* @__PURE__ */ jsx36(
20747
20902
  Flex,
20748
20903
  {
20749
20904
  $flexWrap: "wrap",
@@ -20751,7 +20906,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20751
20906
  $alignItems: "center",
20752
20907
  $gap: "1rem",
20753
20908
  children: /* @__PURE__ */ jsxs28(Flex, { $gap: "1rem", children: [
20754
- props.addOns.showFeatureIcons && entitlement.feature?.icon && /* @__PURE__ */ jsx35(
20909
+ props.addOns.showFeatureIcons && entitlement.feature?.icon && /* @__PURE__ */ jsx36(
20755
20910
  IconRound,
20756
20911
  {
20757
20912
  name: entitlement.feature.icon,
@@ -20762,7 +20917,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20762
20917
  ]
20763
20918
  }
20764
20919
  ),
20765
- entitlement.feature?.name && /* @__PURE__ */ jsx35(Flex, { $alignItems: "center", children: /* @__PURE__ */ jsx35(
20920
+ entitlement.feature?.name && /* @__PURE__ */ jsx36(Flex, { $alignItems: "center", children: /* @__PURE__ */ jsx36(
20766
20921
  Text,
20767
20922
  {
20768
20923
  $font: theme.typography.text.fontFamily,
@@ -20806,7 +20961,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20806
20961
  )
20807
20962
  }
20808
20963
  ),
20809
- props.upgrade.isVisible && /* @__PURE__ */ jsx35(
20964
+ props.upgrade.isVisible && /* @__PURE__ */ jsx36(
20810
20965
  EmbedButton,
20811
20966
  {
20812
20967
  type: "button",
@@ -20842,10 +20997,39 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20842
20997
  });
20843
20998
  PricingTable.displayName = "PricingTable";
20844
20999
 
21000
+ // src/components/elements/text/Text.tsx
21001
+ import { forwardRef as forwardRef14 } from "react";
21002
+ import { jsx as jsx37 } from "react/jsx-runtime";
21003
+ var resolveDesignProps9 = (props) => {
21004
+ return {
21005
+ text: {
21006
+ fontStyle: props.text?.fontStyle ?? "text",
21007
+ alignment: props.text?.alignment ?? "left",
21008
+ textContent: props.text?.textContent ?? "Text"
21009
+ }
21010
+ };
21011
+ };
21012
+ var TextElement = forwardRef14(({ children, className, ...rest }, ref) => {
21013
+ const props = resolveDesignProps9(rest);
21014
+ const theme = nt();
21015
+ return /* @__PURE__ */ jsx37(Element, { as: Flex, ref, className, children: /* @__PURE__ */ jsx37(
21016
+ Text,
21017
+ {
21018
+ $font: theme.typography[props.text.fontStyle].fontFamily,
21019
+ $size: theme.typography[props.text.fontStyle].fontSize,
21020
+ $weight: theme.typography[props.text.fontStyle].fontWeight,
21021
+ $color: theme.typography[props.text.fontStyle].color,
21022
+ $align: props.text.alignment,
21023
+ children: props.text.textContent
21024
+ }
21025
+ ) });
21026
+ });
21027
+ TextElement.displayName = "Text";
21028
+
20845
21029
  // src/components/elements/unsubscribe-button/UnsubscribeButton.tsx
20846
- import { forwardRef as forwardRef13 } from "react";
20847
- import { jsx as jsx36 } from "react/jsx-runtime";
20848
- var resolveDesignProps8 = (props) => {
21030
+ import { forwardRef as forwardRef15 } from "react";
21031
+ import { jsx as jsx38 } from "react/jsx-runtime";
21032
+ var resolveDesignProps10 = (props) => {
20849
21033
  return {
20850
21034
  button: {
20851
21035
  text: props.button?.text ?? "Unsubscribe",
@@ -20856,8 +21040,8 @@ var resolveDesignProps8 = (props) => {
20856
21040
  }
20857
21041
  };
20858
21042
  };
20859
- var UnsubscribeButton = forwardRef13(({ children, className, ...rest }, ref) => {
20860
- const props = resolveDesignProps8(rest);
21043
+ var UnsubscribeButton = forwardRef15(({ children, className, ...rest }, ref) => {
21044
+ const props = resolveDesignProps10(rest);
20861
21045
  const { t: t2 } = useTranslation();
20862
21046
  const { data, setLayout } = useEmbed();
20863
21047
  const disabled = !data.subscription || data.subscription.status === "cancelled" || data.subscription.cancelAtPeriodEnd;
@@ -20875,7 +21059,7 @@ var UnsubscribeButton = forwardRef13(({ children, className, ...rest }, ref) =>
20875
21059
  variant: "text"
20876
21060
  }
20877
21061
  };
20878
- return /* @__PURE__ */ jsx36(
21062
+ return /* @__PURE__ */ jsx38(
20879
21063
  Element,
20880
21064
  {
20881
21065
  as: Flex,
@@ -20883,7 +21067,7 @@ var UnsubscribeButton = forwardRef13(({ children, className, ...rest }, ref) =>
20883
21067
  className,
20884
21068
  $flexDirection: "column",
20885
21069
  $gap: "2rem",
20886
- children: /* @__PURE__ */ jsx36(
21070
+ children: /* @__PURE__ */ jsx38(
20887
21071
  EmbedButton,
20888
21072
  {
20889
21073
  $size: props.button.size,
@@ -20904,9 +21088,9 @@ var UnsubscribeButton = forwardRef13(({ children, className, ...rest }, ref) =>
20904
21088
  UnsubscribeButton.displayName = "UnsubscribeButton";
20905
21089
 
20906
21090
  // src/components/elements/upcoming-bill/UpcomingBill.tsx
20907
- import { forwardRef as forwardRef14, useMemo as useMemo15 } from "react";
20908
- import { jsx as jsx37, jsxs as jsxs29 } from "react/jsx-runtime";
20909
- function resolveDesignProps9(props) {
21091
+ import { forwardRef as forwardRef16, useMemo as useMemo15 } from "react";
21092
+ import { jsx as jsx39, jsxs as jsxs29 } from "react/jsx-runtime";
21093
+ function resolveDesignProps11(props) {
20910
21094
  return {
20911
21095
  header: {
20912
21096
  isVisible: props.header?.isVisible ?? true,
@@ -20924,8 +21108,8 @@ function resolveDesignProps9(props) {
20924
21108
  }
20925
21109
  };
20926
21110
  }
20927
- var UpcomingBill = forwardRef14(({ className, ...rest }, ref) => {
20928
- const props = resolveDesignProps9(rest);
21111
+ var UpcomingBill = forwardRef16(({ className, ...rest }, ref) => {
21112
+ const props = resolveDesignProps11(rest);
20929
21113
  const { t: t2 } = useTranslation();
20930
21114
  const theme = nt();
20931
21115
  const { data } = useEmbed();
@@ -20966,7 +21150,7 @@ var UpcomingBill = forwardRef14(({ className, ...rest }, ref) => {
20966
21150
  $flexDirection: "column",
20967
21151
  $gap: "1rem",
20968
21152
  children: [
20969
- props.header.isVisible && /* @__PURE__ */ jsx37(Flex, { $justifyContent: "space-between", $alignItems: "center", children: /* @__PURE__ */ jsxs29(
21153
+ props.header.isVisible && /* @__PURE__ */ jsx39(Flex, { $justifyContent: "space-between", $alignItems: "center", children: /* @__PURE__ */ jsxs29(
20970
21154
  Text,
20971
21155
  {
20972
21156
  $font: theme.typography[props.header.fontStyle].fontFamily,
@@ -20981,7 +21165,7 @@ var UpcomingBill = forwardRef14(({ className, ...rest }, ref) => {
20981
21165
  }
20982
21166
  ) }),
20983
21167
  /* @__PURE__ */ jsxs29(Flex, { $justifyContent: "space-between", $alignItems: "start", $gap: "1rem", children: [
20984
- props.price.isVisible && /* @__PURE__ */ jsx37(Flex, { $alignItems: "end", $flexGrow: "1", children: /* @__PURE__ */ jsx37(
21168
+ props.price.isVisible && /* @__PURE__ */ jsx39(Flex, { $alignItems: "end", $flexGrow: "1", children: /* @__PURE__ */ jsx39(
20985
21169
  Text,
20986
21170
  {
20987
21171
  $font: theme.typography[props.price.fontStyle].fontFamily,
@@ -20995,7 +21179,7 @@ var UpcomingBill = forwardRef14(({ className, ...rest }, ref) => {
20995
21179
  )
20996
21180
  }
20997
21181
  ) }),
20998
- /* @__PURE__ */ jsx37(Box, { $lineHeight: 1.15, $maxWidth: "10rem", $textAlign: "right", children: /* @__PURE__ */ jsx37(
21182
+ /* @__PURE__ */ jsx39(Box, { $lineHeight: 1.15, $maxWidth: "10rem", $textAlign: "right", children: /* @__PURE__ */ jsx39(
20999
21183
  Text,
21000
21184
  {
21001
21185
  $font: theme.typography[props.contractEndDate.fontStyle].fontFamily,
@@ -21008,7 +21192,7 @@ var UpcomingBill = forwardRef14(({ className, ...rest }, ref) => {
21008
21192
  ) })
21009
21193
  ] }),
21010
21194
  discounts.length > 0 && /* @__PURE__ */ jsxs29(Flex, { $justifyContent: "space-between", $alignItems: "center", children: [
21011
- /* @__PURE__ */ jsx37(Box, { children: /* @__PURE__ */ jsx37(
21195
+ /* @__PURE__ */ jsx39(Box, { children: /* @__PURE__ */ jsx39(
21012
21196
  Text,
21013
21197
  {
21014
21198
  $font: theme.typography.text.fontFamily,
@@ -21018,8 +21202,8 @@ var UpcomingBill = forwardRef14(({ className, ...rest }, ref) => {
21018
21202
  children: t2("Discount")
21019
21203
  }
21020
21204
  ) }),
21021
- /* @__PURE__ */ jsx37(Box, { children: discounts.map((discount) => /* @__PURE__ */ jsxs29(Flex, { $alignItems: "center", $gap: "0.5rem", children: [
21022
- /* @__PURE__ */ jsx37(
21205
+ /* @__PURE__ */ jsx39(Box, { children: discounts.map((discount) => /* @__PURE__ */ jsxs29(Flex, { $alignItems: "center", $gap: "0.5rem", children: [
21206
+ /* @__PURE__ */ jsx39(
21023
21207
  Flex,
21024
21208
  {
21025
21209
  $alignItems: "center",
@@ -21028,7 +21212,7 @@ var UpcomingBill = forwardRef14(({ className, ...rest }, ref) => {
21028
21212
  $borderStyle: "solid",
21029
21213
  $borderColor: isLightBackground ? "hsla(0, 0%, 0%, 0.15)" : "hsla(0, 0%, 100%, 0.15)",
21030
21214
  $borderRadius: "0.3125rem",
21031
- children: /* @__PURE__ */ jsx37(
21215
+ children: /* @__PURE__ */ jsx39(
21032
21216
  Text,
21033
21217
  {
21034
21218
  $font: theme.typography.text.fontFamily,
@@ -21040,7 +21224,7 @@ var UpcomingBill = forwardRef14(({ className, ...rest }, ref) => {
21040
21224
  )
21041
21225
  }
21042
21226
  ),
21043
- /* @__PURE__ */ jsx37(Box, { children: /* @__PURE__ */ jsx37(
21227
+ /* @__PURE__ */ jsx39(Box, { children: /* @__PURE__ */ jsx39(
21044
21228
  Text,
21045
21229
  {
21046
21230
  $font: theme.typography.text.fontFamily,
@@ -21075,7 +21259,8 @@ var components = {
21075
21259
  PaymentMethod,
21076
21260
  Invoices,
21077
21261
  PricingTable,
21078
- UnsubscribeButton
21262
+ UnsubscribeButton,
21263
+ ButtonElement
21079
21264
  };
21080
21265
  function createRenderer(options) {
21081
21266
  const { useFallback = false } = options || {};
@@ -21108,10 +21293,10 @@ function createRenderer(options) {
21108
21293
  }
21109
21294
 
21110
21295
  // src/components/embed/ComponentTree.tsx
21111
- import { Fragment as Fragment13, jsx as jsx38, jsxs as jsxs30 } from "react/jsx-runtime";
21296
+ import { Fragment as Fragment13, jsx as jsx40, jsxs as jsxs30 } from "react/jsx-runtime";
21112
21297
  var Loading = () => {
21113
21298
  const theme = nt();
21114
- return /* @__PURE__ */ jsx38(
21299
+ return /* @__PURE__ */ jsx40(
21115
21300
  Flex,
21116
21301
  {
21117
21302
  $width: "100%",
@@ -21119,7 +21304,7 @@ var Loading = () => {
21119
21304
  $alignItems: "center",
21120
21305
  $justifyContent: "center",
21121
21306
  $padding: `${theme.card.padding / TEXT_BASE_SIZE}rem`,
21122
- children: /* @__PURE__ */ jsx38(Loader, { $color: "#194BFB", $size: "2xl" })
21307
+ children: /* @__PURE__ */ jsx40(Loader, { $color: "#194BFB", $size: "2xl" })
21123
21308
  }
21124
21309
  );
21125
21310
  };
@@ -21136,7 +21321,7 @@ var Error2 = ({ message }) => {
21136
21321
  $alignItems: "center",
21137
21322
  $justifyContent: "center",
21138
21323
  children: [
21139
- /* @__PURE__ */ jsx38(
21324
+ /* @__PURE__ */ jsx40(
21140
21325
  Box,
21141
21326
  {
21142
21327
  $marginBottom: `${8 / TEXT_BASE_SIZE}rem`,
@@ -21147,7 +21332,7 @@ var Error2 = ({ message }) => {
21147
21332
  children: "Error"
21148
21333
  }
21149
21334
  ),
21150
- /* @__PURE__ */ jsx38(
21335
+ /* @__PURE__ */ jsx40(
21151
21336
  Box,
21152
21337
  {
21153
21338
  $marginBottom: `${8 / TEXT_BASE_SIZE}rem`,
@@ -21164,23 +21349,23 @@ var Error2 = ({ message }) => {
21164
21349
  };
21165
21350
  var ComponentTree = () => {
21166
21351
  const { error, nodes, isPending } = useEmbed();
21167
- const [children, setChildren] = useState16(/* @__PURE__ */ jsx38(Loading, {}));
21352
+ const [children, setChildren] = useState16(/* @__PURE__ */ jsx40(Loading, {}));
21168
21353
  useEffect8(() => {
21169
21354
  const renderer = createRenderer();
21170
21355
  setChildren(nodes.map(renderer));
21171
21356
  }, [nodes]);
21172
21357
  if (error) {
21173
21358
  console.error(error);
21174
- return /* @__PURE__ */ jsx38(Error2, { message: error.message });
21359
+ return /* @__PURE__ */ jsx40(Error2, { message: error.message });
21175
21360
  }
21176
21361
  if (isPending) {
21177
- return /* @__PURE__ */ jsx38(Loading, {});
21362
+ return /* @__PURE__ */ jsx40(Loading, {});
21178
21363
  }
21179
- return /* @__PURE__ */ jsx38(Fragment13, { children });
21364
+ return /* @__PURE__ */ jsx40(Fragment13, { children });
21180
21365
  };
21181
21366
 
21182
21367
  // src/components/embed/Embed.tsx
21183
- import { jsx as jsx39 } from "react/jsx-runtime";
21368
+ import { jsx as jsx41 } from "react/jsx-runtime";
21184
21369
  var SchematicEmbed = ({
21185
21370
  id,
21186
21371
  accessToken,
@@ -21188,25 +21373,26 @@ var SchematicEmbed = ({
21188
21373
  debug
21189
21374
  }) => {
21190
21375
  if (accessToken?.length === 0) {
21191
- return /* @__PURE__ */ jsx39("div", { children: "Please provide an access token." });
21376
+ return /* @__PURE__ */ jsx41("div", { children: "Please provide an access token." });
21192
21377
  }
21193
21378
  if (!accessToken?.startsWith("token_")) {
21194
- return /* @__PURE__ */ jsx39("div", { children: 'Invalid access token; your temporary access token will start with "token_".' });
21379
+ return /* @__PURE__ */ jsx41("div", { children: 'Invalid access token; your temporary access token will start with "token_".' });
21195
21380
  }
21196
- return /* @__PURE__ */ jsx39(
21381
+ return /* @__PURE__ */ jsx41(
21197
21382
  EmbedProvider,
21198
21383
  {
21199
21384
  id,
21200
21385
  accessToken,
21201
21386
  apiConfig,
21202
21387
  debug,
21203
- children: /* @__PURE__ */ jsx39(ComponentTree, {})
21388
+ children: /* @__PURE__ */ jsx41(ComponentTree, {})
21204
21389
  }
21205
21390
  );
21206
21391
  };
21207
21392
  export {
21208
21393
  Box,
21209
21394
  Button2 as Button,
21395
+ ButtonElement,
21210
21396
  Card,
21211
21397
  Column,
21212
21398
  Container2 as Container,
@@ -21235,6 +21421,7 @@ export {
21235
21421
  SchematicEmbed,
21236
21422
  StyledCard,
21237
21423
  Text,
21424
+ TextElement,
21238
21425
  TextPropNames,
21239
21426
  Tooltip,
21240
21427
  UnsubscribeButton,