@schematichq/schematic-components 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -573,10 +573,10 @@ var require_coreJsData = __commonJS({
573
573
  var require_isMasked = __commonJS({
574
574
  "node_modules/lodash/_isMasked.js"(exports, module) {
575
575
  var coreJsData = require_coreJsData();
576
- var maskSrcKey = function() {
576
+ var maskSrcKey = (function() {
577
577
  var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
578
578
  return uid ? "Symbol(src)_1." + uid : "";
579
- }();
579
+ })();
580
580
  function isMasked(func) {
581
581
  return !!maskSrcKey && maskSrcKey in func;
582
582
  }
@@ -939,14 +939,14 @@ var require_Stack = __commonJS({
939
939
  var require_defineProperty = __commonJS({
940
940
  "node_modules/lodash/_defineProperty.js"(exports, module) {
941
941
  var getNative = require_getNative();
942
- var defineProperty = function() {
942
+ var defineProperty = (function() {
943
943
  try {
944
944
  var func = getNative(Object, "defineProperty");
945
945
  func({}, "", {});
946
946
  return func;
947
947
  } catch (e2) {
948
948
  }
949
- }();
949
+ })();
950
950
  module.exports = defineProperty;
951
951
  }
952
952
  });
@@ -1088,7 +1088,7 @@ var require_baseCreate = __commonJS({
1088
1088
  "node_modules/lodash/_baseCreate.js"(exports, module) {
1089
1089
  var isObject2 = require_isObject();
1090
1090
  var objectCreate = Object.create;
1091
- var baseCreate = /* @__PURE__ */ function() {
1091
+ var baseCreate = /* @__PURE__ */ (function() {
1092
1092
  function object() {
1093
1093
  }
1094
1094
  return function(proto) {
@@ -1103,7 +1103,7 @@ var require_baseCreate = __commonJS({
1103
1103
  object.prototype = void 0;
1104
1104
  return result;
1105
1105
  };
1106
- }();
1106
+ })();
1107
1107
  module.exports = baseCreate;
1108
1108
  }
1109
1109
  });
@@ -1175,9 +1175,9 @@ var require_isArguments = __commonJS({
1175
1175
  var objectProto = Object.prototype;
1176
1176
  var hasOwnProperty = objectProto.hasOwnProperty;
1177
1177
  var propertyIsEnumerable = objectProto.propertyIsEnumerable;
1178
- var isArguments = baseIsArguments(/* @__PURE__ */ function() {
1178
+ var isArguments = baseIsArguments(/* @__PURE__ */ (function() {
1179
1179
  return arguments;
1180
- }()) ? baseIsArguments : function(value) {
1180
+ })()) ? baseIsArguments : function(value) {
1181
1181
  return isObjectLike(value) && hasOwnProperty.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
1182
1182
  };
1183
1183
  module.exports = isArguments;
@@ -1339,7 +1339,7 @@ var require_nodeUtil = __commonJS({
1339
1339
  var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
1340
1340
  var moduleExports = freeModule && freeModule.exports === freeExports;
1341
1341
  var freeProcess = moduleExports && freeGlobal.process;
1342
- var nodeUtil = function() {
1342
+ var nodeUtil = (function() {
1343
1343
  try {
1344
1344
  var types = freeModule && freeModule.require && freeModule.require("util").types;
1345
1345
  if (types) {
@@ -1348,7 +1348,7 @@ var require_nodeUtil = __commonJS({
1348
1348
  return freeProcess && freeProcess.binding && freeProcess.binding("util");
1349
1349
  } catch (e2) {
1350
1350
  }
1351
- }();
1351
+ })();
1352
1352
  module.exports = nodeUtil;
1353
1353
  }
1354
1354
  });
@@ -3547,7 +3547,7 @@ function he(t2) {
3547
3547
  for (var n = [], o2 = 1; o2 < arguments.length; o2++) n[o2 - 1] = arguments[o2];
3548
3548
  return false ? new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(t2, " for more information.").concat(n.length > 0 ? " Args: ".concat(n.join(", ")) : "")) : new Error(de.apply(void 0, __spreadArray([pe[t2]], n, false)).trim());
3549
3549
  }
3550
- var fe = function() {
3550
+ var fe = (function() {
3551
3551
  function e2(e3) {
3552
3552
  this.groupSizes = new Uint32Array(512), this.length = 512, this.tag = e3;
3553
3553
  }
@@ -3573,7 +3573,7 @@ var fe = function() {
3573
3573
  for (var n = this.groupSizes[e3], o2 = this.indexOfGroup(e3), r2 = o2 + n, s2 = o2; s2 < r2; s2++) t2 += "".concat(this.tag.getRule(s2)).concat(g);
3574
3574
  return t2;
3575
3575
  }, e2;
3576
- }();
3576
+ })();
3577
3577
  var me = 1 << 30;
3578
3578
  var ye = /* @__PURE__ */ new Map();
3579
3579
  var ve = /* @__PURE__ */ new Map();
@@ -3615,24 +3615,24 @@ function Ce() {
3615
3615
  return "undefined" != typeof __webpack_nonce__ ? __webpack_nonce__ : null;
3616
3616
  }
3617
3617
  var Ie = function(e2) {
3618
- var t2 = document.head, n = e2 || t2, o2 = document.createElement("style"), r2 = function(e3) {
3618
+ var t2 = document.head, n = e2 || t2, o2 = document.createElement("style"), r2 = (function(e3) {
3619
3619
  var t3 = Array.from(e3.querySelectorAll("style[".concat(f, "]")));
3620
3620
  return t3[t3.length - 1];
3621
- }(n), s2 = void 0 !== r2 ? r2.nextSibling : null;
3621
+ })(n), s2 = void 0 !== r2 ? r2.nextSibling : null;
3622
3622
  o2.setAttribute(f, m), o2.setAttribute(y, v);
3623
3623
  var i2 = Ce();
3624
3624
  return i2 && o2.setAttribute("nonce", i2), n.insertBefore(o2, s2), o2;
3625
3625
  };
3626
- var Ae = function() {
3626
+ var Ae = (function() {
3627
3627
  function e2(e3) {
3628
- this.element = Ie(e3), this.element.appendChild(document.createTextNode("")), this.sheet = function(e4) {
3628
+ this.element = Ie(e3), this.element.appendChild(document.createTextNode("")), this.sheet = (function(e4) {
3629
3629
  if (e4.sheet) return e4.sheet;
3630
3630
  for (var t2 = document.styleSheets, n = 0, o2 = t2.length; n < o2; n++) {
3631
3631
  var r2 = t2[n];
3632
3632
  if (r2.ownerNode === e4) return r2;
3633
3633
  }
3634
3634
  throw he(17);
3635
- }(this.element), this.length = 0;
3635
+ })(this.element), this.length = 0;
3636
3636
  }
3637
3637
  return e2.prototype.insertRule = function(e3, t2) {
3638
3638
  try {
@@ -3646,8 +3646,8 @@ var Ae = function() {
3646
3646
  var t2 = this.sheet.cssRules[e3];
3647
3647
  return t2 && t2.cssText ? t2.cssText : "";
3648
3648
  }, e2;
3649
- }();
3650
- var Oe = function() {
3649
+ })();
3650
+ var Oe = (function() {
3651
3651
  function e2(e3) {
3652
3652
  this.element = Ie(e3), this.nodes = this.element.childNodes, this.length = 0;
3653
3653
  }
@@ -3662,8 +3662,8 @@ var Oe = function() {
3662
3662
  }, e2.prototype.getRule = function(e3) {
3663
3663
  return e3 < this.length ? this.nodes[e3].textContent : "";
3664
3664
  }, e2;
3665
- }();
3666
- var De = function() {
3665
+ })();
3666
+ var De = (function() {
3667
3667
  function e2(e3) {
3668
3668
  this.rules = [], this.length = 0;
3669
3669
  }
@@ -3674,19 +3674,19 @@ var De = function() {
3674
3674
  }, e2.prototype.getRule = function(e3) {
3675
3675
  return e3 < this.length ? this.rules[e3] : "";
3676
3676
  }, e2;
3677
- }();
3677
+ })();
3678
3678
  var Re = S;
3679
3679
  var Te = { isServer: !S, useCSSOMInjection: !w };
3680
- var ke = function() {
3680
+ var ke = (function() {
3681
3681
  function e2(e3, n, o2) {
3682
3682
  void 0 === e3 && (e3 = C), void 0 === n && (n = {});
3683
3683
  var r2 = this;
3684
3684
  this.options = __assign(__assign({}, Te), e3), this.gs = n, this.names = new Map(o2), this.server = !!e3.isServer, !this.server && S && Re && (Re = false, _e(this)), ue(this, function() {
3685
- return function(e4) {
3685
+ return (function(e4) {
3686
3686
  for (var t2 = e4.getTag(), n2 = t2.length, o3 = "", r3 = function(n3) {
3687
- var r4 = function(e5) {
3687
+ var r4 = (function(e5) {
3688
3688
  return ve.get(e5);
3689
- }(n3);
3689
+ })(n3);
3690
3690
  if (void 0 === r4) return "continue";
3691
3691
  var s3 = e4.names.get(r4), i2 = t2.getGroup(n3);
3692
3692
  if (void 0 === s3 || !s3.size || 0 === i2.length) return "continue";
@@ -3696,7 +3696,7 @@ var ke = function() {
3696
3696
  }), o3 += "".concat(i2).concat(a2, '{content:"').concat(c2, '"}').concat(g);
3697
3697
  }, s2 = 0; s2 < n2; s2++) r3(s2);
3698
3698
  return o3;
3699
- }(r2);
3699
+ })(r2);
3700
3700
  });
3701
3701
  }
3702
3702
  return e2.registerId = function(e3) {
@@ -3708,10 +3708,10 @@ var ke = function() {
3708
3708
  }, e2.prototype.allocateGSInstance = function(e3) {
3709
3709
  return this.gs[e3] = (this.gs[e3] || 0) + 1;
3710
3710
  }, e2.prototype.getTag = function() {
3711
- return this.tag || (this.tag = (e3 = function(e4) {
3711
+ return this.tag || (this.tag = (e3 = (function(e4) {
3712
3712
  var t2 = e4.useCSSOMInjection, n = e4.target;
3713
3713
  return e4.isServer ? new De(n) : t2 ? new Ae(n) : new Oe(n);
3714
- }(this.options), new fe(e3)));
3714
+ })(this.options), new fe(e3)));
3715
3715
  var e3;
3716
3716
  }, e2.prototype.hasNameForId = function(e3, t2) {
3717
3717
  return this.names.has(e3) && this.names.get(e3).has(t2);
@@ -3730,7 +3730,7 @@ var ke = function() {
3730
3730
  }, e2.prototype.clearTag = function() {
3731
3731
  this.tag = void 0;
3732
3732
  }, e2;
3733
- }();
3733
+ })();
3734
3734
  var je = /&/g;
3735
3735
  var xe = /^\s*\/\/.*$/gm;
3736
3736
  function Ve(e2, t2) {
@@ -3783,7 +3783,7 @@ function Ye(e2) {
3783
3783
  }, [e2.shouldForwardProp, l2, u2]);
3784
3784
  return o.createElement($e.Provider, { value: d }, o.createElement(Le.Provider, { value: u2 }, e2.children));
3785
3785
  }
3786
- var We = function() {
3786
+ var We = (function() {
3787
3787
  function e2(e3, t2) {
3788
3788
  var n = this;
3789
3789
  this.inject = function(e4, t3) {
@@ -3797,7 +3797,7 @@ var We = function() {
3797
3797
  return e2.prototype.getName = function(e3) {
3798
3798
  return void 0 === e3 && (e3 = ze), this.name + e3.hash;
3799
3799
  }, e2;
3800
- }();
3800
+ })();
3801
3801
  var qe = function(e2) {
3802
3802
  return e2 >= "A" && e2 <= "Z";
3803
3803
  };
@@ -3841,7 +3841,7 @@ function Ze(e2) {
3841
3841
  return true;
3842
3842
  }
3843
3843
  var Ke = z(v);
3844
- var Qe = function() {
3844
+ var Qe = (function() {
3845
3845
  function e2(e3, t2, n) {
3846
3846
  this.rules = e3, this.staticRulesId = "", this.isStatic = false, this.componentId = t2, this.baseHash = M(Ke, t2), this.baseStyle = n, ke.registerId(t2);
3847
3847
  }
@@ -3872,12 +3872,12 @@ var Qe = function() {
3872
3872
  }
3873
3873
  return o2;
3874
3874
  }, e2;
3875
- }();
3875
+ })();
3876
3876
  var et = o.createContext(void 0);
3877
3877
  var tt = et.Consumer;
3878
3878
  function ot(e2) {
3879
3879
  var n = o.useContext(et), r2 = i(function() {
3880
- return function(e3, n2) {
3880
+ return (function(e3, n2) {
3881
3881
  if (!e3) throw he(14);
3882
3882
  if (re(e3)) {
3883
3883
  var o2 = e3(n2);
@@ -3886,21 +3886,21 @@ function ot(e2) {
3886
3886
  }
3887
3887
  if (Array.isArray(e3) || "object" != typeof e3) throw he(8);
3888
3888
  return n2 ? __assign(__assign({}, n2), e3) : e3;
3889
- }(e2.theme, n);
3889
+ })(e2.theme, n);
3890
3890
  }, [e2.theme, n]);
3891
3891
  return e2.children ? o.createElement(et.Provider, { value: r2 }, e2.children) : null;
3892
3892
  }
3893
3893
  var rt = {};
3894
3894
  var st = /* @__PURE__ */ new Set();
3895
3895
  function it(e2, r2, s2) {
3896
- var i2 = se(e2), a2 = e2, c2 = !L(e2), p2 = r2.attrs, d = void 0 === p2 ? _ : p2, h = r2.componentId, f2 = void 0 === h ? function(e3, t2) {
3896
+ var i2 = se(e2), a2 = e2, c2 = !L(e2), p2 = r2.attrs, d = void 0 === p2 ? _ : p2, h = r2.componentId, f2 = void 0 === h ? (function(e3, t2) {
3897
3897
  var n = "string" != typeof e3 ? "sc" : R(e3);
3898
3898
  rt[n] = (rt[n] || 0) + 1;
3899
3899
  var o2 = "".concat(n, "-").concat($(v + n + rt[n]));
3900
3900
  return t2 ? "".concat(t2, "-").concat(o2) : o2;
3901
- }(r2.displayName, r2.parentComponentId) : h, m2 = r2.displayName, y2 = void 0 === m2 ? function(e3) {
3901
+ })(r2.displayName, r2.parentComponentId) : h, m2 = r2.displayName, y2 = void 0 === m2 ? (function(e3) {
3902
3902
  return L(e3) ? "styled.".concat(e3) : "Styled(".concat(B(e3), ")");
3903
- }(e2) : m2, g2 = r2.displayName && r2.componentId ? "".concat(R(r2.displayName), "-").concat(r2.componentId) : r2.componentId || f2, S2 = i2 && a2.attrs ? a2.attrs.concat(d).filter(Boolean) : d, w2 = r2.shouldForwardProp;
3903
+ })(e2) : m2, g2 = r2.displayName && r2.componentId ? "".concat(R(r2.displayName), "-").concat(r2.componentId) : r2.componentId || f2, S2 = i2 && a2.attrs ? a2.attrs.concat(d).filter(Boolean) : d, w2 = r2.shouldForwardProp;
3904
3904
  if (i2 && a2.shouldForwardProp) {
3905
3905
  var b2 = a2.shouldForwardProp;
3906
3906
  if (r2.shouldForwardProp) {
@@ -3912,37 +3912,37 @@ function it(e2, r2, s2) {
3912
3912
  }
3913
3913
  var N2 = new Qe(s2, g2, i2 ? a2.componentStyle : void 0);
3914
3914
  function O2(e3, r3) {
3915
- return function(e4, r4, s3) {
3915
+ return (function(e4, r4, s3) {
3916
3916
  var i3 = e4.attrs, a3 = e4.componentStyle, c3 = e4.defaultProps, p3 = e4.foldedComponentIds, d2 = e4.styledComponentId, h2 = e4.target, f3 = o.useContext(et), m3 = Ge(), y3 = e4.shouldForwardProp || m3.shouldForwardProp;
3917
3917
  l(d2);
3918
- var v2 = I(r4, f3, c3) || C, g3 = function(e5, n, o2) {
3918
+ var v2 = I(r4, f3, c3) || C, g3 = (function(e5, n, o2) {
3919
3919
  for (var r5, s4 = __assign(__assign({}, n), { className: void 0, theme: o2 }), i4 = 0; i4 < e5.length; i4 += 1) {
3920
3920
  var a4 = re(r5 = e5[i4]) ? r5(s4) : r5;
3921
3921
  for (var c4 in a4) s4[c4] = "className" === c4 ? ie(s4[c4], a4[c4]) : "style" === c4 ? __assign(__assign({}, s4[c4]), a4[c4]) : a4[c4];
3922
3922
  }
3923
3923
  return n.className && (s4.className = ie(s4.className, n.className)), s4;
3924
- }(i3, r4, v2), S3 = g3.as || h2, w3 = {};
3924
+ })(i3, r4, v2), S3 = g3.as || h2, w3 = {};
3925
3925
  for (var b3 in g3) void 0 === g3[b3] || "$" === b3[0] || "as" === b3 || "theme" === b3 && g3.theme === v2 || ("forwardedAs" === b3 ? w3.as = g3.forwardedAs : y3 && !y3(b3, S3) || (w3[b3] = g3[b3], y3 || false || isPropValid(b3) || st.has(b3) || !A.has(S3) || (st.add(b3), console.warn('styled-components: it looks like an unknown prop "'.concat(b3, '" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via `<StyleSheetManager shouldForwardProp={...}>` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)')))));
3926
- var E3 = function(e5, t2) {
3926
+ var E3 = (function(e5, t2) {
3927
3927
  var n = Ge(), o2 = e5.generateAndInjectStyles(t2, n.styleSheet, n.stylis);
3928
3928
  return l(o2), o2;
3929
- }(a3, g3);
3929
+ })(a3, g3);
3930
3930
  e4.warnTooManyClasses && e4.warnTooManyClasses(E3);
3931
3931
  var N3 = ie(p3, d2);
3932
3932
  return E3 && (N3 += " " + E3), g3.className && (N3 += " " + g3.className), w3[L(S3) && !A.has(S3) ? "class" : "className"] = N3, s3 && (w3.ref = s3), u(S3, w3);
3933
- }(D2, e3, r3);
3933
+ })(D2, e3, r3);
3934
3934
  }
3935
3935
  O2.displayName = y2;
3936
3936
  var D2 = o.forwardRef(O2);
3937
3937
  return D2.attrs = S2, D2.componentStyle = N2, D2.displayName = y2, D2.shouldForwardProp = w2, D2.foldedComponentIds = i2 ? ie(a2.foldedComponentIds, a2.styledComponentId) : "", D2.styledComponentId = g2, D2.target = i2 ? a2.target : e2, Object.defineProperty(D2, "defaultProps", { get: function() {
3938
3938
  return this._foldedDefaultProps;
3939
3939
  }, set: function(e3) {
3940
- this._foldedDefaultProps = i2 ? function(e4) {
3940
+ this._foldedDefaultProps = i2 ? (function(e4) {
3941
3941
  for (var t2 = [], n = 1; n < arguments.length; n++) t2[n - 1] = arguments[n];
3942
3942
  for (var o2 = 0, r3 = t2; o2 < r3.length; o2++) le(e4, r3[o2], true);
3943
3943
  return e4;
3944
- }({}, a2.defaultProps, e3) : e3;
3945
- } }), P(y2, g2), D2.warnTooManyClasses = /* @__PURE__ */ function(e3, t2) {
3944
+ })({}, a2.defaultProps, e3) : e3;
3945
+ } }), P(y2, g2), D2.warnTooManyClasses = /* @__PURE__ */ (function(e3, t2) {
3946
3946
  var n = {}, o2 = false;
3947
3947
  return function(r3) {
3948
3948
  if (!o2 && (n[r3] = true, Object.keys(n).length >= 200)) {
@@ -3950,7 +3950,7 @@ function it(e2, r2, s2) {
3950
3950
  console.warn("Over ".concat(200, " classes were generated for component ").concat(e3).concat(s3, ".\n") + "Consider using the attrs method, together with a style object for frequently changed styles.\nExample:\n const Component = styled.div.attrs(props => ({\n style: {\n background: props.background,\n },\n }))`width: 100%;`\n\n <Component />"), o2 = true, n = {};
3951
3951
  }
3952
3952
  };
3953
- }(y2, g2), ue(D2, function() {
3953
+ })(y2, g2), ue(D2, function() {
3954
3954
  return ".".concat(D2.styledComponentId);
3955
3955
  }), c2 && oe(D2, e2, { attrs: true, componentStyle: true, displayName: true, foldedComponentIds: true, shouldForwardProp: true, styledComponentId: true, target: true }), D2;
3956
3956
  }
@@ -3986,7 +3986,7 @@ var dt = pt;
3986
3986
  A.forEach(function(e2) {
3987
3987
  dt[e2] = pt(e2);
3988
3988
  });
3989
- var ht = function() {
3989
+ var ht = (function() {
3990
3990
  function e2(e3, t2) {
3991
3991
  this.rules = e3, this.componentId = t2, this.isStatic = Ze(e3), ke.registerId(this.componentId + 1);
3992
3992
  }
@@ -3998,7 +3998,7 @@ var ht = function() {
3998
3998
  }, e2.prototype.renderStyles = function(e3, t2, n, o2) {
3999
3999
  e3 > 2 && ke.registerId(this.componentId + e3), this.removeStyles(e3, n), this.createStyles(e3, t2, n, o2);
4000
4000
  }, e2;
4001
- }();
4001
+ })();
4002
4002
  function ft(n) {
4003
4003
  for (var r2 = [], s2 = 1; s2 < arguments.length; s2++) r2[s2 - 1] = arguments[s2];
4004
4004
  var i2 = lt.apply(void 0, __spreadArray([n], r2, false)), a2 = "sc-global-".concat($(JSON.stringify(i2))), c2 = new ht(i2, a2);
@@ -4028,7 +4028,7 @@ function mt(t2) {
4028
4028
  var r2 = ae(lt.apply(void 0, __spreadArray([t2], n, false))), s2 = $(r2);
4029
4029
  return new We(s2, r2);
4030
4030
  }
4031
- var vt = function() {
4031
+ var vt = (function() {
4032
4032
  function e2() {
4033
4033
  var e3 = this;
4034
4034
  this._emitSheetCSS = function() {
@@ -4056,7 +4056,7 @@ var vt = function() {
4056
4056
  }, e2.prototype.interleaveWithNodeStream = function(e3) {
4057
4057
  throw he(3);
4058
4058
  }, e2;
4059
- }();
4059
+ })();
4060
4060
  "undefined" != typeof navigator && "ReactNative" === navigator.product && console.warn("It looks like you've imported 'styled-components' on React Native.\nPerhaps you're looking to import 'styled-components/native'?\nRead more about this at https://www.styled-components.com/docs/basics#react-native");
4061
4061
  var St = "__sc-".concat(f, "__");
4062
4062
  "undefined" != typeof window && (window[St] || (window[St] = 0), 1 === window[St] && console.warn("It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.\n\nSee https://s-c.sh/2BAXzed for more info."), window[St] += 1);
@@ -4986,22 +4986,22 @@ var Translator = class _Translator extends EventEmitter {
4986
4986
  const zeroSuffix = `${this.options.pluralSeparator}zero`;
4987
4987
  const ordinalPrefix = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
4988
4988
  if (needsPluralHandling) {
4989
- finalKeys.push(key + pluralSuffix);
4990
4989
  if (opt.ordinal && pluralSuffix.indexOf(ordinalPrefix) === 0) {
4991
4990
  finalKeys.push(key + pluralSuffix.replace(ordinalPrefix, this.options.pluralSeparator));
4992
4991
  }
4992
+ finalKeys.push(key + pluralSuffix);
4993
4993
  if (needsZeroSuffixLookup) {
4994
4994
  finalKeys.push(key + zeroSuffix);
4995
4995
  }
4996
4996
  }
4997
4997
  if (needsContextHandling) {
4998
- const contextKey = `${key}${this.options.contextSeparator}${opt.context}`;
4998
+ const contextKey = `${key}${this.options.contextSeparator || "_"}${opt.context}`;
4999
4999
  finalKeys.push(contextKey);
5000
5000
  if (needsPluralHandling) {
5001
- finalKeys.push(contextKey + pluralSuffix);
5002
5001
  if (opt.ordinal && pluralSuffix.indexOf(ordinalPrefix) === 0) {
5003
5002
  finalKeys.push(contextKey + pluralSuffix.replace(ordinalPrefix, this.options.pluralSeparator));
5004
5003
  }
5004
+ finalKeys.push(contextKey + pluralSuffix);
5005
5005
  if (needsZeroSuffixLookup) {
5006
5006
  finalKeys.push(contextKey + zeroSuffix);
5007
5007
  }
@@ -6657,6 +6657,7 @@ var en_default = {
6657
6657
  "Add new payment method": "Add new payment method",
6658
6658
  "Add Seats": "Add More",
6659
6659
  "Add-ons": "Add-ons",
6660
+ "Add-ons Quantity": "Add-ons Quantity",
6660
6661
  Additional: "Additional",
6661
6662
  "After the trial, cancel no default": "After the trial, you will be lose access to {{planName}} plan and your subscription will be cancelled.",
6662
6663
  "After the trial, cancel": "After the trial, you will be downgraded to the {{defaultPlanName}} plan and your subscription will be cancelled.",
@@ -6727,6 +6728,7 @@ var en_default = {
6727
6728
  "Powered by": "Powered by",
6728
6729
  "Price by unit based on final tier reached.": "Price by unit based on final tier reached.",
6729
6730
  Proration: "Proration",
6731
+ "Quantity to pay for in advance": "Quantity to pay for in advance",
6730
6732
  "Remove add-on": "Remove add-on",
6731
6733
  Resets: "Resets {{date}}",
6732
6734
  "Save payment method": "Save payment method",
@@ -6741,6 +6743,7 @@ var en_default = {
6741
6743
  "Select payment method": "Select payment method",
6742
6744
  "Select plan": "Select plan",
6743
6745
  "Select quantity": "Select quantity",
6746
+ "Select quantities for add-ons": "Select quantities for add-ons",
6744
6747
  Selected: "Selected",
6745
6748
  "Selected plan or associated price is missing.": "Selected plan or associated price is missing.",
6746
6749
  "Session expired. Please refresh and try again.": "Session expired. Please refresh and try again.",
@@ -7787,6 +7790,33 @@ function CheckoutUnsubscribeResponseFromJSONTyped(json, ignoreDiscriminator) {
7787
7790
  };
7788
7791
  }
7789
7792
 
7793
+ // src/api/checkoutexternal/models/CurrencyBalance.ts
7794
+ function CurrencyBalanceFromJSON(json) {
7795
+ return CurrencyBalanceFromJSONTyped(json, false);
7796
+ }
7797
+ function CurrencyBalanceFromJSONTyped(json, ignoreDiscriminator) {
7798
+ if (json == null) {
7799
+ return json;
7800
+ }
7801
+ return {
7802
+ balance: json["balance"],
7803
+ currency: json["currency"]
7804
+ };
7805
+ }
7806
+
7807
+ // src/api/checkoutexternal/models/CompanyCustomerBalance.ts
7808
+ function CompanyCustomerBalanceFromJSON(json) {
7809
+ return CompanyCustomerBalanceFromJSONTyped(json, false);
7810
+ }
7811
+ function CompanyCustomerBalanceFromJSONTyped(json, ignoreDiscriminator) {
7812
+ if (json == null) {
7813
+ return json;
7814
+ }
7815
+ return {
7816
+ balances: json["balances"].map(CurrencyBalanceFromJSON)
7817
+ };
7818
+ }
7819
+
7790
7820
  // src/api/checkoutexternal/models/CompanyEventPeriodMetricsResponseData.ts
7791
7821
  function CompanyEventPeriodMetricsResponseDataFromJSON(json) {
7792
7822
  return CompanyEventPeriodMetricsResponseDataFromJSONTyped(json, false);
@@ -8047,12 +8077,12 @@ function EventSummaryResponseDataFromJSONTyped(json, ignoreDiscriminator) {
8047
8077
  return json;
8048
8078
  }
8049
8079
  return {
8050
- companyCount: json["company_count"] == null ? void 0 : json["company_count"],
8080
+ companyCount: json["company_count"],
8051
8081
  environmentId: json["environment_id"],
8052
8082
  eventCount: json["event_count"],
8053
8083
  eventSubtype: json["event_subtype"],
8054
8084
  lastSeenAt: json["last_seen_at"] == null ? void 0 : new Date(json["last_seen_at"]),
8055
- userCount: json["user_count"] == null ? void 0 : json["user_count"]
8085
+ userCount: json["user_count"]
8056
8086
  };
8057
8087
  }
8058
8088
 
@@ -8668,6 +8698,20 @@ function DeletePaymentMethodResponseFromJSONTyped(json, ignoreDiscriminator) {
8668
8698
  };
8669
8699
  }
8670
8700
 
8701
+ // src/api/checkoutexternal/models/FetchCustomerBalanceResponse.ts
8702
+ function FetchCustomerBalanceResponseFromJSON(json) {
8703
+ return FetchCustomerBalanceResponseFromJSONTyped(json, false);
8704
+ }
8705
+ function FetchCustomerBalanceResponseFromJSONTyped(json, ignoreDiscriminator) {
8706
+ if (json == null) {
8707
+ return json;
8708
+ }
8709
+ return {
8710
+ data: CompanyCustomerBalanceFromJSON(json["data"]),
8711
+ params: json["params"]
8712
+ };
8713
+ }
8714
+
8671
8715
  // src/api/checkoutexternal/models/GetSetupIntentResponse.ts
8672
8716
  function GetSetupIntentResponseFromJSON(json) {
8673
8717
  return GetSetupIntentResponseFromJSONTyped(json, false);
@@ -8991,6 +9035,38 @@ var CheckoutexternalApi = class extends BaseAPI {
8991
9035
  );
8992
9036
  return await response.value();
8993
9037
  }
9038
+ /**
9039
+ * Fetch customer balance
9040
+ */
9041
+ async fetchCustomerBalanceRaw(initOverrides) {
9042
+ const queryParameters = {};
9043
+ const headerParameters = {};
9044
+ if (this.configuration && this.configuration.apiKey) {
9045
+ headerParameters["X-Schematic-Api-Key"] = await this.configuration.apiKey(
9046
+ "X-Schematic-Api-Key"
9047
+ );
9048
+ }
9049
+ const response = await this.request(
9050
+ {
9051
+ path: `/checkout/balance`,
9052
+ method: "GET",
9053
+ headers: headerParameters,
9054
+ query: queryParameters
9055
+ },
9056
+ initOverrides
9057
+ );
9058
+ return new JSONApiResponse(
9059
+ response,
9060
+ (jsonValue) => FetchCustomerBalanceResponseFromJSON(jsonValue)
9061
+ );
9062
+ }
9063
+ /**
9064
+ * Fetch customer balance
9065
+ */
9066
+ async fetchCustomerBalance(initOverrides) {
9067
+ const response = await this.fetchCustomerBalanceRaw(initOverrides);
9068
+ return await response.value();
9069
+ }
8994
9070
  /**
8995
9071
  * Get setup intent
8996
9072
  */
@@ -9725,12 +9801,12 @@ function EventSummaryResponseDataFromJSONTyped3(json, ignoreDiscriminator) {
9725
9801
  return json;
9726
9802
  }
9727
9803
  return {
9728
- companyCount: json["company_count"] == null ? void 0 : json["company_count"],
9804
+ companyCount: json["company_count"],
9729
9805
  environmentId: json["environment_id"],
9730
9806
  eventCount: json["event_count"],
9731
9807
  eventSubtype: json["event_subtype"],
9732
9808
  lastSeenAt: json["last_seen_at"] == null ? void 0 : new Date(json["last_seen_at"]),
9733
- userCount: json["user_count"] == null ? void 0 : json["user_count"]
9809
+ userCount: json["user_count"]
9734
9810
  };
9735
9811
  }
9736
9812
 
@@ -10243,7 +10319,7 @@ var EmbedProvider = ({
10243
10319
  });
10244
10320
  const customHeaders = useMemo3(
10245
10321
  () => ({
10246
- "X-Schematic-Components-Version": "1.2.0",
10322
+ "X-Schematic-Components-Version": "1.3.0",
10247
10323
  "X-Schematic-Session-ID": sessionIdRef.current
10248
10324
  }),
10249
10325
  []
@@ -12097,6 +12173,47 @@ var StageButton = ({
12097
12173
  );
12098
12174
  }
12099
12175
  if (checkoutStage === "addons") {
12176
+ const hasAddonsUsageStage = checkoutStages?.some(
12177
+ (stage) => stage.id === "addonsUsage"
12178
+ );
12179
+ const hasCreditsStage = checkoutStages?.some(
12180
+ (stage) => stage.id === "credits"
12181
+ );
12182
+ if (!isPaymentMethodRequired && !hasAddonsUsageStage && !hasCreditsStage) {
12183
+ return /* @__PURE__ */ jsx12(NoPaymentRequired, {});
12184
+ }
12185
+ return /* @__PURE__ */ jsx12(
12186
+ Button,
12187
+ {
12188
+ type: "button",
12189
+ disabled: isDisabled,
12190
+ onClick: async () => {
12191
+ setCheckoutStage?.(
12192
+ hasAddonsUsageStage ? "addonsUsage" : hasCreditsStage ? "credits" : "checkout"
12193
+ );
12194
+ },
12195
+ $isLoading: isLoading,
12196
+ $fullWidth: true,
12197
+ children: /* @__PURE__ */ jsxs8(
12198
+ Flex,
12199
+ {
12200
+ $gap: "0.5rem",
12201
+ $justifyContent: "center",
12202
+ $alignItems: "center",
12203
+ $padding: "0 1rem",
12204
+ children: [
12205
+ t2("Next"),
12206
+ ":",
12207
+ " ",
12208
+ hasAddonsUsageStage ? t2("Add-ons Quantity") : hasCreditsStage ? t2("Credits") : t2("Checkout"),
12209
+ /* @__PURE__ */ jsx12(Icon3, { name: "arrow-right" })
12210
+ ]
12211
+ }
12212
+ )
12213
+ }
12214
+ );
12215
+ }
12216
+ if (checkoutStage === "addonsUsage") {
12100
12217
  if (!isPaymentMethodRequired && !checkoutStages?.some((stage) => stage.id === "credits")) {
12101
12218
  return /* @__PURE__ */ jsx12(NoPaymentRequired, {});
12102
12219
  }
@@ -12992,6 +13109,22 @@ var AddOns = ({ addOns, toggle, isLoading, period }) => {
12992
13109
  const { price, currency } = getAddOnPrice(addOn, period) || {};
12993
13110
  const isAddOnValid = isHydratedPlan(addOn) && addOn.valid;
12994
13111
  const isAddOnCurrent = isHydratedPlan(addOn) && addOn.current;
13112
+ const overageEntitlement = addOn.entitlements?.find(
13113
+ (entitlement) => entitlement.priceBehavior === "overage" /* Overage */
13114
+ );
13115
+ let overageInfo = null;
13116
+ if (overageEntitlement) {
13117
+ const priceData = period === "year" ? overageEntitlement.meteredYearlyPrice : overageEntitlement.meteredMonthlyPrice;
13118
+ if (priceData?.priceTier && priceData.priceTier.length >= 2) {
13119
+ const overageTier = priceData.priceTier[priceData.priceTier.length - 1];
13120
+ overageInfo = {
13121
+ softLimit: overageEntitlement.softLimit,
13122
+ perUnitPrice: overageTier.perUnitPriceDecimal ? Number(overageTier.perUnitPriceDecimal) : overageTier.perUnitPrice || 0,
13123
+ currency: priceData.currency || currency,
13124
+ featureName: overageEntitlement.feature?.name
13125
+ };
13126
+ }
13127
+ }
12995
13128
  return /* @__PURE__ */ jsxs10(
12996
13129
  Flex,
12997
13130
  {
@@ -13011,19 +13144,34 @@ var AddOns = ({ addOns, toggle, isLoading, period }) => {
13011
13144
  /* @__PURE__ */ jsxs10(Flex, { $flexDirection: "column", $gap: "0.75rem", children: [
13012
13145
  /* @__PURE__ */ jsx14(Box, { children: /* @__PURE__ */ jsx14(Text, { display: "heading3", children: addOn.name }) }),
13013
13146
  addOn.description && /* @__PURE__ */ jsx14(Box, { $marginBottom: "0.5rem", children: /* @__PURE__ */ jsx14(Text, { children: addOn.description }) }),
13014
- (addOn[periodKey] || addOn.chargeType === ChargeType.oneTime) && /* @__PURE__ */ jsxs10(Box, { children: [
13015
- /* @__PURE__ */ jsx14(Text, { display: "heading2", children: formatCurrency(price ?? 0, currency) }),
13016
- /* @__PURE__ */ jsx14(
13017
- Text,
13018
- {
13019
- display: "heading2",
13020
- $size: 16 / 30 * settings.theme.typography.heading2.fontSize,
13021
- children: addOn.chargeType === ChargeType.oneTime ? /* @__PURE__ */ jsxs10(Fragment5, { children: [
13022
- " ",
13023
- t2("one time")
13024
- ] }) : `/${period}`
13025
- }
13026
- )
13147
+ (addOn[periodKey] || addOn.chargeType === ChargeType.oneTime) && /* @__PURE__ */ jsxs10(Flex, { $flexDirection: "column", $gap: "0.25rem", children: [
13148
+ /* @__PURE__ */ jsxs10(Box, { children: [
13149
+ /* @__PURE__ */ jsx14(Text, { display: "heading2", children: formatCurrency(price ?? 0, currency) }),
13150
+ /* @__PURE__ */ jsx14(
13151
+ Text,
13152
+ {
13153
+ display: "heading2",
13154
+ $size: 16 / 30 * settings.theme.typography.heading2.fontSize,
13155
+ children: addOn.chargeType === ChargeType.oneTime ? /* @__PURE__ */ jsxs10(Fragment5, { children: [
13156
+ " ",
13157
+ t2("one time")
13158
+ ] }) : `/${period}`
13159
+ }
13160
+ )
13161
+ ] }),
13162
+ overageInfo && overageInfo.softLimit && /* @__PURE__ */ jsx14(Box, { children: /* @__PURE__ */ jsxs10(Text, { $size: 0.875, style: { opacity: 0.8 }, children: [
13163
+ overageInfo.softLimit,
13164
+ " ",
13165
+ overageInfo.featureName || "units",
13166
+ " included, then",
13167
+ " ",
13168
+ formatCurrency(
13169
+ overageInfo.perUnitPrice,
13170
+ overageInfo.currency
13171
+ ),
13172
+ "/",
13173
+ overageInfo.featureName?.toLowerCase() || "unit"
13174
+ ] }) })
13027
13175
  ] }),
13028
13176
  isAddOnCurrent && /* @__PURE__ */ jsx14(
13029
13177
  Flex,
@@ -14030,10 +14178,9 @@ var CheckoutDialog = ({ top = 0 }) => {
14030
14178
  }, [data]);
14031
14179
  const [selectedPlan, setSelectedPlan] = useState9(
14032
14180
  () => {
14033
- const currentSelectedPlan = availablePlans.find(
14181
+ return availablePlans.find(
14034
14182
  (plan) => checkoutState?.planId ? plan.id === checkoutState.planId : isHydratedPlan(plan) && plan.current
14035
14183
  );
14036
- return currentSelectedPlan;
14037
14184
  }
14038
14185
  );
14039
14186
  const [shouldTrial, setShouldTrial] = useState9(false);
@@ -14066,6 +14213,23 @@ var CheckoutDialog = ({ top = 0 }) => {
14066
14213
  []
14067
14214
  )
14068
14215
  );
14216
+ const [addOnUsageBasedEntitlements, setAddOnUsageBasedEntitlements] = useState9(() => {
14217
+ if (!isCheckoutData(data)) return [];
14218
+ const currentAddOns = data.company?.addOns || [];
14219
+ return currentAddOns.flatMap((currentAddOn) => {
14220
+ const availableAddOn = availableAddOns.find(
14221
+ (available) => available.id === currentAddOn.id
14222
+ );
14223
+ if (!availableAddOn) return [];
14224
+ return availableAddOn.entitlements.reduce(
14225
+ createActiveUsageBasedEntitlementsReducer(
14226
+ currentEntitlements,
14227
+ planPeriod
14228
+ ),
14229
+ []
14230
+ );
14231
+ });
14232
+ });
14069
14233
  const payInAdvanceEntitlements = useMemo9(
14070
14234
  () => usageBasedEntitlements.filter(
14071
14235
  (entitlement) => entitlement.priceBehavior === "pay_in_advance" /* PayInAdvance */
@@ -14106,6 +14270,19 @@ var CheckoutDialog = ({ top = 0 }) => {
14106
14270
  description: t2("Optionally add features to your subscription")
14107
14271
  });
14108
14272
  }
14273
+ const hasUsageBasedAddOnSelected = addOns.some((addOn) => {
14274
+ return addOn.isSelected && addOn.entitlements.some((entitlement) => {
14275
+ return entitlement.priceBehavior === "pay_in_advance" /* PayInAdvance */;
14276
+ });
14277
+ });
14278
+ if (hasUsageBasedAddOnSelected) {
14279
+ stages.push({
14280
+ id: "addonsUsage",
14281
+ name: t2("Add-ons Quantity"),
14282
+ label: t2("Select quantities for add-ons"),
14283
+ description: t2("Quantity to pay for in advance")
14284
+ });
14285
+ }
14109
14286
  if (creditBundles.length > 0) {
14110
14287
  stages.push({
14111
14288
  id: "credits",
@@ -14137,6 +14314,9 @@ var CheckoutDialog = ({ top = 0 }) => {
14137
14314
  if (checkoutState?.addOnId) {
14138
14315
  return "addons";
14139
14316
  }
14317
+ if (checkoutState?.addOnUsage) {
14318
+ return "addonsUsage";
14319
+ }
14140
14320
  if (checkoutState?.usage) {
14141
14321
  return "usage";
14142
14322
  }
@@ -14144,7 +14324,19 @@ var CheckoutDialog = ({ top = 0 }) => {
14144
14324
  return "credits";
14145
14325
  }
14146
14326
  if (checkoutState?.planId !== currentPlanId) {
14147
- return checkoutStages.some((stage) => stage.id === "usage") ? "usage" : checkoutStages.some((stage) => stage.id === "addons") ? "addons" : checkoutStages.some((stage) => stage.id === "credits") ? "credits" : "plan";
14327
+ const hasUsageStage = checkoutStages.some(
14328
+ (stage) => stage.id === "usage"
14329
+ );
14330
+ const hasAddonsStage = checkoutStages.some(
14331
+ (stage) => stage.id === "addons"
14332
+ );
14333
+ const hasAddonsUsageStage = checkoutStages.some(
14334
+ (stage) => stage.id === "addonsUsage"
14335
+ );
14336
+ if (hasUsageStage) return "usage";
14337
+ if (hasAddonsStage) return "addons";
14338
+ if (hasAddonsUsageStage) return "addonsUsage";
14339
+ return "plan";
14148
14340
  }
14149
14341
  return "plan";
14150
14342
  });
@@ -14181,19 +14373,34 @@ var CheckoutDialog = ({ top = 0 }) => {
14181
14373
  },
14182
14374
  []
14183
14375
  ),
14184
- payInAdvance: (updates.payInAdvanceEntitlements || payInAdvanceEntitlements).reduce(
14185
- (acc, { meteredMonthlyPrice, meteredYearlyPrice, quantity }) => {
14186
- const priceId = (period === "year" ? meteredYearlyPrice : meteredMonthlyPrice)?.priceId;
14187
- if (priceId) {
14188
- acc.push({
14189
- priceId,
14190
- quantity
14191
- });
14192
- }
14193
- return acc;
14194
- },
14195
- []
14196
- ),
14376
+ payInAdvance: [
14377
+ ...(updates.payInAdvanceEntitlements || payInAdvanceEntitlements).reduce(
14378
+ (acc, { meteredMonthlyPrice, meteredYearlyPrice, quantity }) => {
14379
+ const priceId = (period === "year" ? meteredYearlyPrice : meteredMonthlyPrice)?.priceId;
14380
+ if (priceId) {
14381
+ acc.push({
14382
+ priceId,
14383
+ quantity
14384
+ });
14385
+ }
14386
+ return acc;
14387
+ },
14388
+ []
14389
+ ),
14390
+ ...(updates.addOnPayInAdvanceEntitlements || addOnUsageBasedEntitlements).reduce(
14391
+ (acc, { meteredMonthlyPrice, meteredYearlyPrice, quantity }) => {
14392
+ const priceId = (period === "year" ? meteredYearlyPrice : meteredMonthlyPrice)?.priceId;
14393
+ if (priceId) {
14394
+ acc.push({
14395
+ priceId,
14396
+ quantity
14397
+ });
14398
+ }
14399
+ return acc;
14400
+ },
14401
+ []
14402
+ )
14403
+ ],
14197
14404
  creditBundles: (updates.creditBundles || creditBundles).reduce(
14198
14405
  (acc, { id, count }) => {
14199
14406
  if (count > 0) {
@@ -14250,6 +14457,7 @@ var CheckoutDialog = ({ top = 0 }) => {
14250
14457
  planPeriod,
14251
14458
  selectedPlan,
14252
14459
  payInAdvanceEntitlements,
14460
+ addOnUsageBasedEntitlements,
14253
14461
  addOns,
14254
14462
  creditBundles,
14255
14463
  shouldTrial,
@@ -14323,6 +14531,17 @@ var CheckoutDialog = ({ top = 0 }) => {
14323
14531
  ...addOn,
14324
14532
  ...addOn.id === id && { isSelected: !addOn.isSelected }
14325
14533
  }));
14534
+ const updatedAddOnEntitlements = updated.filter((addOn) => addOn.isSelected).flatMap(
14535
+ (addOn) => addOn.entitlements.filter(
14536
+ (entitlement) => entitlement.priceBehavior === "pay_in_advance" /* PayInAdvance */
14537
+ ).map((entitlement) => ({
14538
+ ...entitlement,
14539
+ allocation: entitlement.valueNumeric || 0,
14540
+ usage: 0,
14541
+ quantity: 1
14542
+ }))
14543
+ );
14544
+ setAddOnUsageBasedEntitlements(updatedAddOnEntitlements);
14326
14545
  handlePreviewCheckout({ addOns: updated });
14327
14546
  return updated;
14328
14547
  });
@@ -14363,6 +14582,23 @@ var CheckoutDialog = ({ top = 0 }) => {
14363
14582
  },
14364
14583
  [handlePreviewCheckout]
14365
14584
  );
14585
+ const updateAddOnEntitlementQuantity = useCallback9(
14586
+ (id, updatedQuantity) => {
14587
+ setAddOnUsageBasedEntitlements((prev2) => {
14588
+ const updated = prev2.map(
14589
+ (entitlement) => entitlement.id === id ? {
14590
+ ...entitlement,
14591
+ quantity: updatedQuantity
14592
+ } : entitlement
14593
+ );
14594
+ handlePreviewCheckout({
14595
+ addOnPayInAdvanceEntitlements: updated
14596
+ });
14597
+ return updated;
14598
+ });
14599
+ },
14600
+ [handlePreviewCheckout]
14601
+ );
14366
14602
  const updatePromoCode = useCallback9(
14367
14603
  async (code) => {
14368
14604
  handlePreviewCheckout({ promoCode: code });
@@ -14538,6 +14774,16 @@ var CheckoutDialog = ({ top = 0 }) => {
14538
14774
  toggle: (id) => toggleAddOn(id)
14539
14775
  }
14540
14776
  ),
14777
+ checkoutStage === "addonsUsage" && /* @__PURE__ */ jsx20(
14778
+ Usage,
14779
+ {
14780
+ isLoading,
14781
+ period: planPeriod,
14782
+ selectedPlan,
14783
+ entitlements: addOnUsageBasedEntitlements,
14784
+ updateQuantity: updateAddOnEntitlementQuantity
14785
+ }
14786
+ ),
14541
14787
  checkoutStage === "credits" && /* @__PURE__ */ jsx20(
14542
14788
  Credits,
14543
14789
  {
@@ -18256,7 +18502,7 @@ var PricingTable = forwardRef12(
18256
18502
  ({ className, callToActionUrl, callToActionTarget, onCallToAction, ...rest }, ref) => {
18257
18503
  const props = resolveDesignProps8(rest);
18258
18504
  const { t: t2 } = useTranslation();
18259
- const { data, settings, hydratePublic } = useEmbed();
18505
+ const { data, settings, isPending, hydratePublic } = useEmbed();
18260
18506
  const { currentPeriod, isStandalone } = useMemo26(() => {
18261
18507
  if (isCheckoutData(data)) {
18262
18508
  const billingSubscription = data.company?.billingSubscription;
@@ -18308,6 +18554,19 @@ var PricingTable = forwardRef12(
18308
18554
  useEffect8(() => {
18309
18555
  setEntitlementCounts(plans.reduce(entitlementCountsReducer, {}));
18310
18556
  }, [plans]);
18557
+ if (isStandalone && isPending) {
18558
+ return /* @__PURE__ */ jsx46(
18559
+ Flex,
18560
+ {
18561
+ $width: "100%",
18562
+ $height: "100%",
18563
+ $alignItems: "center",
18564
+ $justifyContent: "center",
18565
+ $padding: `${settings.theme.card.padding / TEXT_BASE_SIZE}rem`,
18566
+ children: /* @__PURE__ */ jsx46(Loader, { $size: "2xl" })
18567
+ }
18568
+ );
18569
+ }
18311
18570
  const Wrapper = isStandalone ? Container : Fragment24;
18312
18571
  return /* @__PURE__ */ jsx46(Wrapper, { children: /* @__PURE__ */ jsxs38(
18313
18572
  FussyChild,