iq-line-form-builder-renderer 1.1.64 → 1.1.66

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.
@@ -10866,20 +10866,80 @@ function ax(e) {
10866
10866
  };
10867
10867
  });
10868
10868
  }
10869
- let sp = null;
10869
+ const su = {};
10870
+ function co() {
10871
+ const e = su?.VITE_CLIENT_ID?.trim() || su?.VITE_DEFAULT_CLIENT_ID?.trim() || null;
10872
+ return (typeof localStorage < "u" ? localStorage.getItem("clientId") : null) || (typeof sessionStorage < "u" ? sessionStorage.getItem("clientId") : null) || (typeof window < "u" ? new URLSearchParams(window.location.search).get("clientId") : null) || e;
10873
+ }
10874
+ function lx(e) {
10875
+ return !e || typeof e != "object" ? !1 : e.userId != null && String(e.userId) !== "" || e.userType != null && String(e.userType) !== "" || e.role != null && String(e.role) !== "";
10876
+ }
10877
+ function cx(e) {
10878
+ if (!e || typeof e != "object") return;
10879
+ const t = {};
10880
+ for (const [n, r] of Object.entries(e))
10881
+ r !== void 0 && r !== "" && (t[n] = r);
10882
+ return Object.keys(t).length > 0 ? t : void 0;
10883
+ }
10884
+ const xo = hd((e) => ({
10885
+ viewerContext: void 0,
10886
+ authHeaders: void 0,
10887
+ _setViewerContext: (t) => e({ viewerContext: lx(t) ? t : void 0 }),
10888
+ _setAuthHeaders: (t) => e({ authHeaders: cx(t) }),
10889
+ _reset: () => e({ viewerContext: void 0, authHeaders: void 0 })
10890
+ }));
10870
10891
  function cN(e) {
10892
+ xo.getState()._setViewerContext(e);
10893
+ }
10894
+ function uN(e) {
10895
+ xo.getState()._setAuthHeaders(e);
10896
+ }
10897
+ function dN() {
10898
+ xo.getState()._reset();
10899
+ }
10900
+ function fN() {
10901
+ return xo.getState().viewerContext;
10902
+ }
10903
+ function ux() {
10904
+ return xo.getState().authHeaders;
10905
+ }
10906
+ const au = {};
10907
+ let sp = null;
10908
+ function pN(e) {
10871
10909
  sp = e;
10872
10910
  }
10873
- function lx() {
10874
- return (sp?.() ?? "").replace(/\/+$/, "");
10911
+ function dx() {
10912
+ return (au?.VITE_API_BASE_URL?.trim() || au?.VITE_API_URL?.trim() || "").replace(/\/$/, "");
10913
+ }
10914
+ const uo = _t.create({
10915
+ baseURL: dx()
10916
+ });
10917
+ uo.interceptors.request.use((e) => {
10918
+ const t = co();
10919
+ t && (e.params = { ...e.params, clientId: t }), typeof FormData < "u" && e.data instanceof FormData && delete e.headers["Content-Type"];
10920
+ let n = sp?.();
10921
+ if ((!n || Object.keys(n).length === 0) && (n = ux()), n) {
10922
+ const r = e.headers ?? {};
10923
+ for (const [o, i] of Object.entries(n))
10924
+ i !== void 0 && i !== "" && (r[o] = i);
10925
+ e.headers = r;
10926
+ }
10927
+ return e;
10928
+ });
10929
+ let ap = null;
10930
+ function mN(e) {
10931
+ ap = e;
10932
+ }
10933
+ function fx() {
10934
+ return (ap?.() ?? "").replace(/\/+$/, "");
10875
10935
  }
10876
10936
  function nr(e) {
10877
10937
  const t = typeof e == "string" ? e.trim() : "";
10878
10938
  if (!t || /^https?:\/\//i.test(t)) return t;
10879
- const n = lx();
10939
+ const n = fx();
10880
10940
  return n ? t.startsWith("/") ? `${n}${t}` : `${n}/${t}` : t;
10881
10941
  }
10882
- const ap = ({
10942
+ const lp = ({
10883
10943
  field: e,
10884
10944
  value: t,
10885
10945
  onChange: n,
@@ -11191,13 +11251,13 @@ const ap = ({
11191
11251
  ]
11192
11252
  }
11193
11253
  ) });
11194
- }, su = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, au = Yu, lp = (e, t) => (n) => {
11254
+ }, lu = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, cu = Yu, cp = (e, t) => (n) => {
11195
11255
  var r;
11196
- if (t?.variants == null) return au(e, n?.class, n?.className);
11256
+ if (t?.variants == null) return cu(e, n?.class, n?.className);
11197
11257
  const { variants: o, defaultVariants: i } = t, s = Object.keys(o).map((c) => {
11198
11258
  const l = n?.[c], d = i?.[c];
11199
11259
  if (l === null) return null;
11200
- const f = su(l) || su(d);
11260
+ const f = lu(l) || lu(d);
11201
11261
  return o[c][f];
11202
11262
  }), a = n && Object.entries(n).reduce((c, l) => {
11203
11263
  let [d, f] = l;
@@ -11219,8 +11279,8 @@ const ap = ({
11219
11279
  f
11220
11280
  ] : c;
11221
11281
  }, []);
11222
- return au(e, s, u, n?.class, n?.className);
11223
- }, cx = lp(
11282
+ return cu(e, s, u, n?.class, n?.className);
11283
+ }, px = cp(
11224
11284
  "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all cursor-pointer disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
11225
11285
  {
11226
11286
  variants: {
@@ -11256,21 +11316,21 @@ function An({
11256
11316
  r ? yd : "button",
11257
11317
  {
11258
11318
  "data-slot": "button",
11259
- className: W(cx({ variant: t, size: n, className: e })),
11319
+ className: W(px({ variant: t, size: n, className: e })),
11260
11320
  ...o
11261
11321
  }
11262
11322
  );
11263
11323
  }
11264
- function ux(e, t) {
11324
+ function mx(e, t) {
11265
11325
  return g.useReducer((n, r) => t[n][r] ?? n, e);
11266
11326
  }
11267
11327
  var Cn = (e) => {
11268
- const { present: t, children: n } = e, r = dx(t), o = typeof n == "function" ? n({ present: r.isPresent }) : g.Children.only(n), i = at(r.ref, fx(o));
11328
+ const { present: t, children: n } = e, r = hx(t), o = typeof n == "function" ? n({ present: r.isPresent }) : g.Children.only(n), i = at(r.ref, gx(o));
11269
11329
  return typeof n == "function" || r.isPresent ? g.cloneElement(o, { ref: i }) : null;
11270
11330
  };
11271
11331
  Cn.displayName = "Presence";
11272
- function dx(e) {
11273
- const [t, n] = g.useState(), r = g.useRef(null), o = g.useRef(e), i = g.useRef("none"), s = e ? "mounted" : "unmounted", [a, u] = ux(s, {
11332
+ function hx(e) {
11333
+ const [t, n] = g.useState(), r = g.useRef(null), o = g.useRef(e), i = g.useRef("none"), s = e ? "mounted" : "unmounted", [a, u] = mx(s, {
11274
11334
  mounted: {
11275
11335
  UNMOUNT: "unmounted",
11276
11336
  ANIMATION_OUT: "unmountSuspended"
@@ -11321,14 +11381,14 @@ function dx(e) {
11321
11381
  function vi(e) {
11322
11382
  return e?.animationName || "none";
11323
11383
  }
11324
- function fx(e) {
11384
+ function gx(e) {
11325
11385
  let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
11326
11386
  return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
11327
11387
  }
11328
11388
  // @__NO_SIDE_EFFECTS__
11329
- function px(e) {
11330
- const t = /* @__PURE__ */ mx(e), n = g.forwardRef((r, o) => {
11331
- const { children: i, ...s } = r, a = g.Children.toArray(i), u = a.find(gx);
11389
+ function yx(e) {
11390
+ const t = /* @__PURE__ */ bx(e), n = g.forwardRef((r, o) => {
11391
+ const { children: i, ...s } = r, a = g.Children.toArray(i), u = a.find(wx);
11332
11392
  if (u) {
11333
11393
  const c = u.props.children, l = a.map((d) => d === u ? g.Children.count(c) > 1 ? g.Children.only(null) : g.isValidElement(c) ? c.props.children : null : d);
11334
11394
  return /* @__PURE__ */ p(t, { ...s, ref: o, children: g.isValidElement(c) ? g.cloneElement(c, void 0, l) : null });
@@ -11338,22 +11398,22 @@ function px(e) {
11338
11398
  return n.displayName = `${e}.Slot`, n;
11339
11399
  }
11340
11400
  // @__NO_SIDE_EFFECTS__
11341
- function mx(e) {
11401
+ function bx(e) {
11342
11402
  const t = g.forwardRef((n, r) => {
11343
11403
  const { children: o, ...i } = n;
11344
11404
  if (g.isValidElement(o)) {
11345
- const s = bx(o), a = yx(i, o.props);
11405
+ const s = xx(o), a = Sx(i, o.props);
11346
11406
  return o.type !== g.Fragment && (a.ref = r ? Hr(r, s) : s), g.cloneElement(o, a);
11347
11407
  }
11348
11408
  return g.Children.count(o) > 1 ? g.Children.only(null) : null;
11349
11409
  });
11350
11410
  return t.displayName = `${e}.SlotClone`, t;
11351
11411
  }
11352
- var hx = /* @__PURE__ */ Symbol("radix.slottable");
11353
- function gx(e) {
11354
- return g.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === hx;
11412
+ var vx = /* @__PURE__ */ Symbol("radix.slottable");
11413
+ function wx(e) {
11414
+ return g.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === vx;
11355
11415
  }
11356
- function yx(e, t) {
11416
+ function Sx(e, t) {
11357
11417
  const n = { ...t };
11358
11418
  for (const r in t) {
11359
11419
  const o = e[r], i = t[r];
@@ -11364,13 +11424,13 @@ function yx(e, t) {
11364
11424
  }
11365
11425
  return { ...e, ...n };
11366
11426
  }
11367
- function bx(e) {
11427
+ function xx(e) {
11368
11428
  let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
11369
11429
  return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
11370
11430
  }
11371
- var Cs = "Popover", [cp] = En(Cs, [
11431
+ var Cs = "Popover", [up] = En(Cs, [
11372
11432
  fs
11373
- ]), Zo = fs(), [vx, Sr] = cp(Cs), up = (e) => {
11433
+ ]), Zo = fs(), [Ax, Sr] = up(Cs), dp = (e) => {
11374
11434
  const {
11375
11435
  __scopePopover: t,
11376
11436
  children: n,
@@ -11385,7 +11445,7 @@ var Cs = "Popover", [cp] = En(Cs, [
11385
11445
  caller: Cs
11386
11446
  });
11387
11447
  return /* @__PURE__ */ p(Zd, { ...a, children: /* @__PURE__ */ p(
11388
- vx,
11448
+ Ax,
11389
11449
  {
11390
11450
  scope: t,
11391
11451
  contentId: tr(),
@@ -11401,24 +11461,24 @@ var Cs = "Popover", [cp] = En(Cs, [
11401
11461
  }
11402
11462
  ) });
11403
11463
  };
11404
- up.displayName = Cs;
11405
- var dp = "PopoverAnchor", fp = g.forwardRef(
11464
+ dp.displayName = Cs;
11465
+ var fp = "PopoverAnchor", pp = g.forwardRef(
11406
11466
  (e, t) => {
11407
- const { __scopePopover: n, ...r } = e, o = Sr(dp, n), i = Zo(n), { onCustomAnchorAdd: s, onCustomAnchorRemove: a } = o;
11467
+ const { __scopePopover: n, ...r } = e, o = Sr(fp, n), i = Zo(n), { onCustomAnchorAdd: s, onCustomAnchorRemove: a } = o;
11408
11468
  return g.useEffect(() => (s(), () => a()), [s, a]), /* @__PURE__ */ p(hl, { ...i, ...r, ref: t });
11409
11469
  }
11410
11470
  );
11411
- fp.displayName = dp;
11412
- var pp = "PopoverTrigger", mp = g.forwardRef(
11471
+ pp.displayName = fp;
11472
+ var mp = "PopoverTrigger", hp = g.forwardRef(
11413
11473
  (e, t) => {
11414
- const { __scopePopover: n, ...r } = e, o = Sr(pp, n), i = Zo(n), s = at(t, o.triggerRef), a = /* @__PURE__ */ p(
11474
+ const { __scopePopover: n, ...r } = e, o = Sr(mp, n), i = Zo(n), s = at(t, o.triggerRef), a = /* @__PURE__ */ p(
11415
11475
  qe.button,
11416
11476
  {
11417
11477
  type: "button",
11418
11478
  "aria-haspopup": "dialog",
11419
11479
  "aria-expanded": o.open,
11420
11480
  "aria-controls": o.contentId,
11421
- "data-state": vp(o.open),
11481
+ "data-state": wp(o.open),
11422
11482
  ...r,
11423
11483
  ref: s,
11424
11484
  onClick: ze(e.onClick, o.onOpenToggle)
@@ -11427,29 +11487,29 @@ var pp = "PopoverTrigger", mp = g.forwardRef(
11427
11487
  return o.hasCustomAnchor ? a : /* @__PURE__ */ p(hl, { asChild: !0, ...i, children: a });
11428
11488
  }
11429
11489
  );
11430
- mp.displayName = pp;
11431
- var Al = "PopoverPortal", [wx, Sx] = cp(Al, {
11490
+ hp.displayName = mp;
11491
+ var Al = "PopoverPortal", [Ex, Cx] = up(Al, {
11432
11492
  forceMount: void 0
11433
- }), hp = (e) => {
11493
+ }), gp = (e) => {
11434
11494
  const { __scopePopover: t, forceMount: n, children: r, container: o } = e, i = Sr(Al, t);
11435
- return /* @__PURE__ */ p(wx, { scope: t, forceMount: n, children: /* @__PURE__ */ p(Cn, { present: n || i.open, children: /* @__PURE__ */ p(ps, { asChild: !0, container: o, children: r }) }) });
11495
+ return /* @__PURE__ */ p(Ex, { scope: t, forceMount: n, children: /* @__PURE__ */ p(Cn, { present: n || i.open, children: /* @__PURE__ */ p(ps, { asChild: !0, container: o, children: r }) }) });
11436
11496
  };
11437
- hp.displayName = Al;
11438
- var co = "PopoverContent", gp = g.forwardRef(
11497
+ gp.displayName = Al;
11498
+ var fo = "PopoverContent", yp = g.forwardRef(
11439
11499
  (e, t) => {
11440
- const n = Sx(co, e.__scopePopover), { forceMount: r = n.forceMount, ...o } = e, i = Sr(co, e.__scopePopover);
11441
- return /* @__PURE__ */ p(Cn, { present: r || i.open, children: i.modal ? /* @__PURE__ */ p(Ax, { ...o, ref: t }) : /* @__PURE__ */ p(Ex, { ...o, ref: t }) });
11500
+ const n = Cx(fo, e.__scopePopover), { forceMount: r = n.forceMount, ...o } = e, i = Sr(fo, e.__scopePopover);
11501
+ return /* @__PURE__ */ p(Cn, { present: r || i.open, children: i.modal ? /* @__PURE__ */ p(Tx, { ...o, ref: t }) : /* @__PURE__ */ p(Nx, { ...o, ref: t }) });
11442
11502
  }
11443
11503
  );
11444
- gp.displayName = co;
11445
- var xx = /* @__PURE__ */ px("PopoverContent.RemoveScroll"), Ax = g.forwardRef(
11504
+ yp.displayName = fo;
11505
+ var Rx = /* @__PURE__ */ yx("PopoverContent.RemoveScroll"), Tx = g.forwardRef(
11446
11506
  (e, t) => {
11447
- const n = Sr(co, e.__scopePopover), r = g.useRef(null), o = at(t, r), i = g.useRef(!1);
11507
+ const n = Sr(fo, e.__scopePopover), r = g.useRef(null), o = at(t, r), i = g.useRef(!1);
11448
11508
  return g.useEffect(() => {
11449
11509
  const s = r.current;
11450
11510
  if (s) return gl(s);
11451
- }, []), /* @__PURE__ */ p(hs, { as: xx, allowPinchZoom: !0, children: /* @__PURE__ */ p(
11452
- yp,
11511
+ }, []), /* @__PURE__ */ p(hs, { as: Rx, allowPinchZoom: !0, children: /* @__PURE__ */ p(
11512
+ bp,
11453
11513
  {
11454
11514
  ...e,
11455
11515
  ref: o,
@@ -11474,11 +11534,11 @@ var xx = /* @__PURE__ */ px("PopoverContent.RemoveScroll"), Ax = g.forwardRef(
11474
11534
  }
11475
11535
  ) });
11476
11536
  }
11477
- ), Ex = g.forwardRef(
11537
+ ), Nx = g.forwardRef(
11478
11538
  (e, t) => {
11479
- const n = Sr(co, e.__scopePopover), r = g.useRef(!1), o = g.useRef(!1);
11539
+ const n = Sr(fo, e.__scopePopover), r = g.useRef(!1), o = g.useRef(!1);
11480
11540
  return /* @__PURE__ */ p(
11481
- yp,
11541
+ bp,
11482
11542
  {
11483
11543
  ...e,
11484
11544
  ref: t,
@@ -11495,7 +11555,7 @@ var xx = /* @__PURE__ */ px("PopoverContent.RemoveScroll"), Ax = g.forwardRef(
11495
11555
  }
11496
11556
  );
11497
11557
  }
11498
- ), yp = g.forwardRef(
11558
+ ), bp = g.forwardRef(
11499
11559
  (e, t) => {
11500
11560
  const {
11501
11561
  __scopePopover: n,
@@ -11508,7 +11568,7 @@ var xx = /* @__PURE__ */ px("PopoverContent.RemoveScroll"), Ax = g.forwardRef(
11508
11568
  onFocusOutside: c,
11509
11569
  onInteractOutside: l,
11510
11570
  ...d
11511
- } = e, f = Sr(co, n), m = Zo(n);
11571
+ } = e, f = Sr(fo, n), m = Zo(n);
11512
11572
  return sl(), /* @__PURE__ */ p(
11513
11573
  as,
11514
11574
  {
@@ -11530,7 +11590,7 @@ var xx = /* @__PURE__ */ px("PopoverContent.RemoveScroll"), Ax = g.forwardRef(
11530
11590
  children: /* @__PURE__ */ p(
11531
11591
  ef,
11532
11592
  {
11533
- "data-state": vp(f.open),
11593
+ "data-state": wp(f.open),
11534
11594
  role: "dialog",
11535
11595
  id: f.contentId,
11536
11596
  ...m,
@@ -11551,9 +11611,9 @@ var xx = /* @__PURE__ */ px("PopoverContent.RemoveScroll"), Ax = g.forwardRef(
11551
11611
  }
11552
11612
  );
11553
11613
  }
11554
- ), bp = "PopoverClose", Cx = g.forwardRef(
11614
+ ), vp = "PopoverClose", _x = g.forwardRef(
11555
11615
  (e, t) => {
11556
- const { __scopePopover: n, ...r } = e, o = Sr(bp, n);
11616
+ const { __scopePopover: n, ...r } = e, o = Sr(vp, n);
11557
11617
  return /* @__PURE__ */ p(
11558
11618
  qe.button,
11559
11619
  {
@@ -11565,36 +11625,36 @@ var xx = /* @__PURE__ */ px("PopoverContent.RemoveScroll"), Ax = g.forwardRef(
11565
11625
  );
11566
11626
  }
11567
11627
  );
11568
- Cx.displayName = bp;
11569
- var Rx = "PopoverArrow", Tx = g.forwardRef(
11628
+ _x.displayName = vp;
11629
+ var Ox = "PopoverArrow", Px = g.forwardRef(
11570
11630
  (e, t) => {
11571
11631
  const { __scopePopover: n, ...r } = e, o = Zo(n);
11572
11632
  return /* @__PURE__ */ p(tf, { ...o, ...r, ref: t });
11573
11633
  }
11574
11634
  );
11575
- Tx.displayName = Rx;
11576
- function vp(e) {
11635
+ Px.displayName = Ox;
11636
+ function wp(e) {
11577
11637
  return e ? "open" : "closed";
11578
11638
  }
11579
- var Nx = up, _x = fp, Ox = mp, Px = hp, Fx = gp;
11580
- function wp({
11639
+ var Fx = dp, kx = pp, Ix = hp, Lx = gp, Mx = yp;
11640
+ function Sp({
11581
11641
  ...e
11582
11642
  }) {
11583
- return /* @__PURE__ */ p(Nx, { "data-slot": "popover", ...e });
11643
+ return /* @__PURE__ */ p(Fx, { "data-slot": "popover", ...e });
11584
11644
  }
11585
- function kx({
11645
+ function Dx({
11586
11646
  ...e
11587
11647
  }) {
11588
- return /* @__PURE__ */ p(Ox, { "data-slot": "popover-trigger", ...e });
11648
+ return /* @__PURE__ */ p(Ix, { "data-slot": "popover-trigger", ...e });
11589
11649
  }
11590
- function Sp({
11650
+ function xp({
11591
11651
  className: e,
11592
11652
  align: t = "center",
11593
11653
  sideOffset: n = 4,
11594
11654
  ...r
11595
11655
  }) {
11596
- return /* @__PURE__ */ p(Px, { children: /* @__PURE__ */ p(
11597
- Fx,
11656
+ return /* @__PURE__ */ p(Lx, { children: /* @__PURE__ */ p(
11657
+ Mx,
11598
11658
  {
11599
11659
  "data-slot": "popover-content",
11600
11660
  align: t,
@@ -11607,71 +11667,11 @@ function Sp({
11607
11667
  }
11608
11668
  ) });
11609
11669
  }
11610
- function Ix({
11670
+ function Bx({
11611
11671
  ...e
11612
11672
  }) {
11613
- return /* @__PURE__ */ p(_x, { "data-slot": "popover-anchor", ...e });
11614
- }
11615
- const lu = {};
11616
- function uo() {
11617
- const e = lu?.VITE_CLIENT_ID?.trim() || lu?.VITE_DEFAULT_CLIENT_ID?.trim() || null;
11618
- return (typeof localStorage < "u" ? localStorage.getItem("clientId") : null) || (typeof sessionStorage < "u" ? sessionStorage.getItem("clientId") : null) || (typeof window < "u" ? new URLSearchParams(window.location.search).get("clientId") : null) || e;
11619
- }
11620
- function Lx(e) {
11621
- return !e || typeof e != "object" ? !1 : e.userId != null && String(e.userId) !== "" || e.userType != null && String(e.userType) !== "" || e.role != null && String(e.role) !== "";
11622
- }
11623
- function Mx(e) {
11624
- if (!e || typeof e != "object") return;
11625
- const t = {};
11626
- for (const [n, r] of Object.entries(e))
11627
- r !== void 0 && r !== "" && (t[n] = r);
11628
- return Object.keys(t).length > 0 ? t : void 0;
11629
- }
11630
- const xo = hd((e) => ({
11631
- viewerContext: void 0,
11632
- authHeaders: void 0,
11633
- _setViewerContext: (t) => e({ viewerContext: Lx(t) ? t : void 0 }),
11634
- _setAuthHeaders: (t) => e({ authHeaders: Mx(t) }),
11635
- _reset: () => e({ viewerContext: void 0, authHeaders: void 0 })
11636
- }));
11637
- function uN(e) {
11638
- xo.getState()._setViewerContext(e);
11673
+ return /* @__PURE__ */ p(kx, { "data-slot": "popover-anchor", ...e });
11639
11674
  }
11640
- function dN(e) {
11641
- xo.getState()._setAuthHeaders(e);
11642
- }
11643
- function fN() {
11644
- xo.getState()._reset();
11645
- }
11646
- function pN() {
11647
- return xo.getState().viewerContext;
11648
- }
11649
- function Dx() {
11650
- return xo.getState().authHeaders;
11651
- }
11652
- const cu = {};
11653
- let xp = null;
11654
- function mN(e) {
11655
- xp = e;
11656
- }
11657
- function Bx() {
11658
- return (cu?.VITE_API_BASE_URL?.trim() || cu?.VITE_API_URL?.trim() || "").replace(/\/$/, "");
11659
- }
11660
- const fo = _t.create({
11661
- baseURL: Bx()
11662
- });
11663
- fo.interceptors.request.use((e) => {
11664
- const t = uo();
11665
- t && (e.params = { ...e.params, clientId: t }), typeof FormData < "u" && e.data instanceof FormData && delete e.headers["Content-Type"];
11666
- let n = xp?.();
11667
- if ((!n || Object.keys(n).length === 0) && (n = Dx()), n) {
11668
- const r = e.headers ?? {};
11669
- for (const [o, i] of Object.entries(n))
11670
- i !== void 0 && i !== "" && (r[o] = i);
11671
- e.headers = r;
11672
- }
11673
- return e;
11674
- });
11675
11675
  function $x(e, t, n, r) {
11676
11676
  let o = Ba(e, n);
11677
11677
  return r && (o = Fr(o, t, n)), o;
@@ -11947,7 +11947,7 @@ const Cp = ({
11947
11947
  try {
11948
11948
  let xt;
11949
11949
  if (!w)
11950
- xt = (await fo.get(Ee, {
11950
+ xt = (await uo.get(Ee, {
11951
11951
  params: { [A]: ie },
11952
11952
  signal: pe.signal,
11953
11953
  headers: Object.keys(Ke).length ? Ke : void 0
@@ -11963,7 +11963,7 @@ const Cp = ({
11963
11963
  Tt = { ...Jt, ...sn };
11964
11964
  } else
11965
11965
  Tt = { ...Jt, [A]: ie };
11966
- xt = (await fo.post(Ee, Tt, {
11966
+ xt = (await uo.post(Ee, Tt, {
11967
11967
  signal: pe.signal,
11968
11968
  headers: Object.keys(Ke).length ? Ke : void 0
11969
11969
  })).data;
@@ -12145,14 +12145,14 @@ const Cp = ({
12145
12145
  isRequired: a,
12146
12146
  className: u,
12147
12147
  children: /* @__PURE__ */ q(
12148
- wp,
12148
+ Sp,
12149
12149
  {
12150
12150
  open: Re,
12151
12151
  onOpenChange: (ie) => {
12152
12152
  ie || M(!1);
12153
12153
  },
12154
12154
  children: [
12155
- /* @__PURE__ */ p(Ix, { asChild: !0, children: /* @__PURE__ */ q("div", { className: "relative flex w-full min-w-0 items-center gap-1", children: [
12155
+ /* @__PURE__ */ p(Bx, { asChild: !0, children: /* @__PURE__ */ q("div", { className: "relative flex w-full min-w-0 items-center gap-1", children: [
12156
12156
  /* @__PURE__ */ p(
12157
12157
  go,
12158
12158
  {
@@ -12205,7 +12205,7 @@ const Cp = ({
12205
12205
  ] })
12206
12206
  ] }) }),
12207
12207
  /* @__PURE__ */ p(
12208
- Sp,
12208
+ xp,
12209
12209
  {
12210
12210
  className: "p-0 w-[var(--radix-popover-trigger-width)] min-w-[12rem] overflow-hidden",
12211
12211
  align: "start",
@@ -12511,7 +12511,7 @@ function Hi({
12511
12511
  }
12512
12512
  );
12513
12513
  }
12514
- const Jx = lp(
12514
+ const Jx = cp(
12515
12515
  "inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
12516
12516
  {
12517
12517
  variants: {
@@ -13280,8 +13280,8 @@ const Gp = ({
13280
13280
  isRequired: s,
13281
13281
  className: a,
13282
13282
  children: [
13283
- /* @__PURE__ */ q(wp, { children: [
13284
- /* @__PURE__ */ p(kx, { asChild: !0, children: /* @__PURE__ */ q(
13283
+ /* @__PURE__ */ q(Sp, { children: [
13284
+ /* @__PURE__ */ p(Dx, { asChild: !0, children: /* @__PURE__ */ q(
13285
13285
  An,
13286
13286
  {
13287
13287
  type: "button",
@@ -13311,7 +13311,7 @@ const Gp = ({
13311
13311
  ]
13312
13312
  }
13313
13313
  ) }),
13314
- /* @__PURE__ */ p(Sp, { className: "w-[var(--radix-popover-trigger-width)] p-0 overflow-hidden", align: "start", children: /* @__PURE__ */ p(pA, { className: "h-60 overflow-hidden rounded-md", children: /* @__PURE__ */ p(
13314
+ /* @__PURE__ */ p(xp, { className: "w-[var(--radix-popover-trigger-width)] p-0 overflow-hidden", align: "start", children: /* @__PURE__ */ p(pA, { className: "h-60 overflow-hidden rounded-md", children: /* @__PURE__ */ p(
13315
13315
  "ul",
13316
13316
  {
13317
13317
  role: "listbox",
@@ -17269,7 +17269,7 @@ const cC = ({
17269
17269
  );
17270
17270
  case "select":
17271
17271
  return /* @__PURE__ */ p(
17272
- ap,
17272
+ lp,
17273
17273
  {
17274
17274
  field: k,
17275
17275
  value: typeof P == "string" ? P : Y(P),
@@ -18740,9 +18740,9 @@ async function xR(e, t = {}) {
18740
18740
  d.trim() && (l[d] = i(f));
18741
18741
  }));
18742
18742
  try {
18743
- return s === "POST" ? (await fo.post(a, l ?? {}, {
18743
+ return s === "POST" ? (await uo.post(a, l ?? {}, {
18744
18744
  headers: Object.keys(c).length ? c : void 0
18745
- })).data : (await fo.get(a, {
18745
+ })).data : (await uo.get(a, {
18746
18746
  headers: Object.keys(c).length ? c : void 0
18747
18747
  })).data;
18748
18748
  } catch (d) {
@@ -19038,7 +19038,7 @@ const AR = ({
19038
19038
  case "select": {
19039
19039
  const L = z ?? e.name ?? e.key ?? e.id, Y = !!(L && M?.has(L));
19040
19040
  return /* @__PURE__ */ p(
19041
- ap,
19041
+ lp,
19042
19042
  {
19043
19043
  field: e,
19044
19044
  value: t || "",
@@ -19458,8 +19458,8 @@ class RR {
19458
19458
  * Get form for rendering (fields, layout, rules, client overrides, optional BFF_submit_api).
19459
19459
  */
19460
19460
  async getForRendering(t, n) {
19461
- if (!uo()) throw new Error("Client ID is required");
19462
- const o = n !== void 0 ? `${this.basePath}/${t}/render?version=${n}` : `${this.basePath}/${t}/render`, i = await fo.get(
19461
+ if (!co()) throw new Error("Client ID is required");
19462
+ const o = n !== void 0 ? `${this.basePath}/${t}/render?version=${n}` : `${this.basePath}/${t}/render`, i = await uo.get(
19463
19463
  o
19464
19464
  ), s = i.data?.data || i.data, a = s?.BFF_submit_api || s?.bff_submit_api || i.data?.BFF_submit_api || i.data?.bff_submit_api, u = s.form || s;
19465
19465
  if (!u.moduleId && !s.form?.moduleId)
@@ -20571,7 +20571,7 @@ const hT = ({
20571
20571
  xe && xe !== R && O(xe);
20572
20572
  }, [xe]), wt(() => {
20573
20573
  if (t && !e) {
20574
- const _ = (uo() ?? "").trim() || "default", B = ph({
20574
+ const _ = (co() ?? "").trim() || "default", B = ph({
20575
20575
  scope: _,
20576
20576
  formId: t,
20577
20577
  version: "latest"
@@ -20592,7 +20592,7 @@ const hT = ({
20592
20592
  );
20593
20593
  if (B !== t) return;
20594
20594
  O(J), ee.BFF_submit_api && k(ee.BFF_submit_api);
20595
- const ne = (uo() ?? "").trim() || "default";
20595
+ const ne = (co() ?? "").trim() || "default";
20596
20596
  mh(
20597
20597
  { scope: ne, formId: B, version: "latest" },
20598
20598
  { schema: J, bffSubmitApi: ee.BFF_submit_api }
@@ -22615,7 +22615,7 @@ const yN = ({
22615
22615
  const Z = Pe(() => {
22616
22616
  const ue = E?.form;
22617
22617
  if (!ue) return null;
22618
- const Ae = (n ?? uo() ?? "").trim() || "default", X = ph({
22618
+ const Ae = (n ?? co() ?? "").trim() || "default", X = ph({
22619
22619
  scope: Ae,
22620
22620
  formId: ue._id,
22621
22621
  version: ue.version
@@ -22644,7 +22644,7 @@ const yN = ({
22644
22644
  } : null, [Z, re]);
22645
22645
  wt(() => {
22646
22646
  if (!Z?.id) return;
22647
- const ue = (n ?? uo() ?? "").trim() || "default";
22647
+ const ue = (n ?? co() ?? "").trim() || "default";
22648
22648
  mh({ scope: ue, formId: Z.id, version: Z.version }, Z);
22649
22649
  }, [Z, n]);
22650
22650
  const ae = Pe(() => {
@@ -23641,11 +23641,11 @@ export {
23641
23641
  dd as fieldBlockWidthStyle,
23642
23642
  Lg as fieldBlockWidthStyleForField,
23643
23643
  tl as fieldGridShellFillsCellVertically,
23644
- fo as formBuilderHttp,
23645
- lx as getBusinessApiOrigin,
23646
- uo as getClientId,
23647
- Dx as getRendererHostAuthHeaders,
23648
- pN as getRendererHostViewerContext,
23644
+ uo as formBuilderHttp,
23645
+ fx as getBusinessApiOrigin,
23646
+ co as getClientId,
23647
+ ux as getRendererHostAuthHeaders,
23648
+ fN as getRendererHostViewerContext,
23649
23649
  HT as getRendererStore,
23650
23650
  Pg as gridCellFlexClasses,
23651
23651
  sc as gridCellFlexClassesForField,
@@ -23657,17 +23657,17 @@ export {
23657
23657
  Ul as normalizeWorkflowFormToRendererSchema,
23658
23658
  fd as parseContentVerticalAlign,
23659
23659
  oh as parseMetadataJson,
23660
- fN as resetRendererHostAuth,
23660
+ dN as resetRendererHostAuth,
23661
23661
  nr as resolveBusinessApiUrl,
23662
23662
  Gu as resolveFormGridLayout,
23663
23663
  Ii as resolvedGridCellVerticalJustifyClasses,
23664
23664
  $n as resolvedHorizontalAlign,
23665
23665
  ki as resolvedVerticalAlign,
23666
23666
  pd as resolvedVerticalAlignForField,
23667
- cN as setBusinessApiOrigin,
23668
- mN as setFormBuilderAuthProvider,
23669
- dN as setRendererHostAuthHeaders,
23670
- uN as setRendererHostViewerContext,
23667
+ mN as setBusinessApiOrigin,
23668
+ pN as setFormBuilderAuthProvider,
23669
+ uN as setRendererHostAuthHeaders,
23670
+ cN as setRendererHostViewerContext,
23671
23671
  wN as useFieldValidation,
23672
23672
  Qg as useFormRenderer,
23673
23673
  vN as useFormValidation,