@odynn/awayz-core 0.3.20 → 0.3.22

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.
@@ -1,24 +1,24 @@
1
- import { jsx as d, Fragment as tt, jsxs as R } from "react/jsx-runtime";
1
+ import { jsx as c, Fragment as rt, jsxs as R } from "react/jsx-runtime";
2
2
  import * as i from "react";
3
- import { useMemo as rt } from "react";
4
- import { u as N, a as nt, c as A, b as Z, d as he, e as ot, f as st, g as G, o as it, s as at, h as lt, i as ct, j as dt, k as ut, l as pt, m as ft, n as ht, p as vt, P as ve } from "../../index-BC-KTkxU.js";
5
- import { r as mt, R as yt } from "../../index-Cv-wvFlM.js";
3
+ import { useMemo as nt } from "react";
4
+ import { u as D, a as ot, c as A, b as q, d as ve, e as st, f as it, g as G, o as at, s as lt, h as ct, i as dt, j as ut, k as pt, l as ft, m as ht, n as vt, p as mt, P as me } from "../../index-BC-KTkxU.js";
5
+ import { r as yt, R as gt } from "../../index-Cv-wvFlM.js";
6
6
  import { b as ue } from "../../index-CDh8vAM_.js";
7
7
  import "../../arrayExtensions-DlcBOj5a.js";
8
- import { E as gt } from "../../AccountService-D_6U8vP6.js";
9
- import { useQuery as wt } from "@tanstack/react-query";
10
- import { CurrencyService as Ct } from "../../services/currency/CurrencyService.js";
8
+ import { E as Ct } from "../../AccountService-D_6U8vP6.js";
9
+ import { useQuery as Et } from "@tanstack/react-query";
10
+ import { CurrencyService as wt } from "../../services/currency/CurrencyService.js";
11
11
  import '../../assets/_styles5.css';import '../../assets/_styles4.css';import '../../assets/_styles3.css';import '../../assets/_styles2.css';import '../../assets/_styles.css';/* empty css */
12
12
  import "../../context/AwayzContext.js";
13
13
  import "../../configs/awayzClient.js";
14
- import { useAwayzContext as Et } from "../../hooks/useAwayzContext.js";
14
+ import { useAwayzContext as Pt } from "../../hooks/useAwayzContext.js";
15
15
  import "../../services/noRetryInstance.js";
16
- import { EInvalidAmountDisplayOption as M, EToolTipPosition as Pt } from "./CashValueTypes.js";
16
+ import { EInvalidAmountDisplayOption as N, EToolTipPosition as bt } from "./CashValueTypes.js";
17
17
  /* empty css */
18
18
  /* empty css */
19
19
  /* empty css */
20
20
  /* empty css */
21
- const j = (e, t) => {
21
+ const Y = (e, t) => {
22
22
  var r = new Intl.NumberFormat("en-US", {
23
23
  style: "currency",
24
24
  currency: t ?? "USD"
@@ -26,30 +26,30 @@ const j = (e, t) => {
26
26
  if (!e) return r.format(0);
27
27
  const o = parseFloat(e.toString());
28
28
  return r.format(o);
29
- }, bt = (e, t) => {
30
- if (e <= 0) return "N/A";
29
+ }, pe = (e, t) => {
30
+ if (e < 0) return "N/A";
31
31
  var r = new Intl.NumberFormat("en-US", {
32
32
  style: "currency",
33
33
  currency: t ?? "USD"
34
34
  });
35
- return e ? r.format(Math.round(e)).toString().split(".")[0] : r.format(0);
35
+ return r.format(Math.round(e)).toString().split(".")[0];
36
36
  };
37
37
  // @__NO_SIDE_EFFECTS__
38
38
  function xt(e) {
39
39
  const t = /* @__PURE__ */ Tt(e), r = i.forwardRef((o, n) => {
40
40
  const { children: s, ...a } = o, u = i.Children.toArray(s), l = u.find(Rt);
41
41
  if (l) {
42
- const p = l.props.children, c = u.map((f) => f === l ? i.Children.count(p) > 1 ? i.Children.only(null) : i.isValidElement(p) ? p.props.children : null : f);
43
- return /* @__PURE__ */ d(t, { ...a, ref: n, children: i.isValidElement(p) ? i.cloneElement(p, void 0, c) : null });
42
+ const p = l.props.children, d = u.map((f) => f === l ? i.Children.count(p) > 1 ? i.Children.only(null) : i.isValidElement(p) ? p.props.children : null : f);
43
+ return /* @__PURE__ */ c(t, { ...a, ref: n, children: i.isValidElement(p) ? i.cloneElement(p, void 0, d) : null });
44
44
  }
45
- return /* @__PURE__ */ d(t, { ...a, ref: n, children: s });
45
+ return /* @__PURE__ */ c(t, { ...a, ref: n, children: s });
46
46
  });
47
47
  return r.displayName = `${e}.Slot`, r;
48
48
  }
49
49
  // @__NO_SIDE_EFFECTS__
50
50
  function Tt(e) {
51
51
  const t = i.forwardRef((r, o) => {
52
- const { children: n, ...s } = r, a = i.isValidElement(n) ? St(n) : void 0, u = N(a, o);
52
+ const { children: n, ...s } = r, a = i.isValidElement(n) ? St(n) : void 0, u = D(a, o);
53
53
  if (i.isValidElement(n)) {
54
54
  const l = Ot(s, n.props);
55
55
  return n.type !== i.Fragment && (l.ref = u), i.cloneElement(n, l);
@@ -58,14 +58,14 @@ function Tt(e) {
58
58
  });
59
59
  return t.displayName = `${e}.SlotClone`, t;
60
60
  }
61
- var me = Symbol("radix.slottable");
61
+ var ye = Symbol("radix.slottable");
62
62
  // @__NO_SIDE_EFFECTS__
63
63
  function At(e) {
64
- const t = ({ children: r }) => /* @__PURE__ */ d(tt, { children: r });
65
- return t.displayName = `${e}.Slottable`, t.__radixId = me, t;
64
+ const t = ({ children: r }) => /* @__PURE__ */ c(rt, { children: r });
65
+ return t.displayName = `${e}.Slottable`, t.__radixId = ye, t;
66
66
  }
67
67
  function Rt(e) {
68
- return i.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === me;
68
+ return i.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === ye;
69
69
  }
70
70
  function Ot(e, t) {
71
71
  const r = { ...t };
@@ -104,18 +104,18 @@ var Nt = [
104
104
  ], O = Nt.reduce((e, t) => {
105
105
  const r = /* @__PURE__ */ xt(`Primitive.${t}`), o = i.forwardRef((n, s) => {
106
106
  const { asChild: a, ...u } = n, l = a ? r : t;
107
- return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ d(l, { ...u, ref: s });
107
+ return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ c(l, { ...u, ref: s });
108
108
  });
109
109
  return o.displayName = `Primitive.${t}`, { ...e, [t]: o };
110
110
  }, {});
111
111
  function Dt(e, t) {
112
- e && mt.flushSync(() => e.dispatchEvent(t));
112
+ e && yt.flushSync(() => e.dispatchEvent(t));
113
113
  }
114
- var _t = "DismissableLayer", z = "dismissableLayer.update", Lt = "dismissableLayer.pointerDownOutside", It = "dismissableLayer.focusOutside", pe, ye = i.createContext({
114
+ var _t = "DismissableLayer", z = "dismissableLayer.update", Lt = "dismissableLayer.pointerDownOutside", It = "dismissableLayer.focusOutside", fe, ge = i.createContext({
115
115
  layers: /* @__PURE__ */ new Set(),
116
116
  layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
117
117
  branches: /* @__PURE__ */ new Set()
118
- }), ge = i.forwardRef(
118
+ }), Ce = i.forwardRef(
119
119
  (e, t) => {
120
120
  const {
121
121
  disableOutsidePointerEvents: r = !1,
@@ -125,26 +125,26 @@ var _t = "DismissableLayer", z = "dismissableLayer.update", Lt = "dismissableLay
125
125
  onInteractOutside: a,
126
126
  onDismiss: u,
127
127
  ...l
128
- } = e, p = i.useContext(ye), [c, f] = i.useState(null), h = (c == null ? void 0 : c.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, v] = i.useState({}), m = N(t, (g) => f(g)), y = Array.from(p.layers), [w] = [...p.layersWithOutsidePointerEventsDisabled].slice(-1), E = y.indexOf(w), C = c ? y.indexOf(c) : -1, x = p.layersWithOutsidePointerEventsDisabled.size > 0, P = C >= E, T = kt((g) => {
129
- const S = g.target, F = [...p.branches].some((L) => L.contains(S));
128
+ } = e, p = i.useContext(ge), [d, f] = i.useState(null), h = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, v] = i.useState({}), m = D(t, (g) => f(g)), y = Array.from(p.layers), [C] = [...p.layersWithOutsidePointerEventsDisabled].slice(-1), w = y.indexOf(C), E = d ? y.indexOf(d) : -1, x = p.layersWithOutsidePointerEventsDisabled.size > 0, P = E >= w, T = kt((g) => {
129
+ const S = g.target, F = [...p.branches].some((I) => I.contains(S));
130
130
  !P || F || (n == null || n(g), a == null || a(g), g.defaultPrevented || u == null || u());
131
131
  }, h), b = Ft((g) => {
132
132
  const S = g.target;
133
- [...p.branches].some((L) => L.contains(S)) || (s == null || s(g), a == null || a(g), g.defaultPrevented || u == null || u());
133
+ [...p.branches].some((I) => I.contains(S)) || (s == null || s(g), a == null || a(g), g.defaultPrevented || u == null || u());
134
134
  }, h);
135
- return nt((g) => {
136
- C === p.layers.size - 1 && (o == null || o(g), !g.defaultPrevented && u && (g.preventDefault(), u()));
135
+ return ot((g) => {
136
+ E === p.layers.size - 1 && (o == null || o(g), !g.defaultPrevented && u && (g.preventDefault(), u()));
137
137
  }, h), i.useEffect(() => {
138
- if (c)
139
- return r && (p.layersWithOutsidePointerEventsDisabled.size === 0 && (pe = h.body.style.pointerEvents, h.body.style.pointerEvents = "none"), p.layersWithOutsidePointerEventsDisabled.add(c)), p.layers.add(c), fe(), () => {
140
- r && p.layersWithOutsidePointerEventsDisabled.size === 1 && (h.body.style.pointerEvents = pe);
138
+ if (d)
139
+ return r && (p.layersWithOutsidePointerEventsDisabled.size === 0 && (fe = h.body.style.pointerEvents, h.body.style.pointerEvents = "none"), p.layersWithOutsidePointerEventsDisabled.add(d)), p.layers.add(d), he(), () => {
140
+ r && p.layersWithOutsidePointerEventsDisabled.size === 1 && (h.body.style.pointerEvents = fe);
141
141
  };
142
- }, [c, h, r, p]), i.useEffect(() => () => {
143
- c && (p.layers.delete(c), p.layersWithOutsidePointerEventsDisabled.delete(c), fe());
144
- }, [c, p]), i.useEffect(() => {
142
+ }, [d, h, r, p]), i.useEffect(() => () => {
143
+ d && (p.layers.delete(d), p.layersWithOutsidePointerEventsDisabled.delete(d), he());
144
+ }, [d, p]), i.useEffect(() => {
145
145
  const g = () => v({});
146
146
  return document.addEventListener(z, g), () => document.removeEventListener(z, g);
147
- }, []), /* @__PURE__ */ d(
147
+ }, []), /* @__PURE__ */ c(
148
148
  O.div,
149
149
  {
150
150
  ...l,
@@ -163,26 +163,26 @@ var _t = "DismissableLayer", z = "dismissableLayer.update", Lt = "dismissableLay
163
163
  );
164
164
  }
165
165
  );
166
- ge.displayName = _t;
166
+ Ce.displayName = _t;
167
167
  var Mt = "DismissableLayerBranch", Ht = i.forwardRef((e, t) => {
168
- const r = i.useContext(ye), o = i.useRef(null), n = N(t, o);
168
+ const r = i.useContext(ge), o = i.useRef(null), n = D(t, o);
169
169
  return i.useEffect(() => {
170
170
  const s = o.current;
171
171
  if (s)
172
172
  return r.branches.add(s), () => {
173
173
  r.branches.delete(s);
174
174
  };
175
- }, [r.branches]), /* @__PURE__ */ d(O.div, { ...e, ref: n });
175
+ }, [r.branches]), /* @__PURE__ */ c(O.div, { ...e, ref: n });
176
176
  });
177
177
  Ht.displayName = Mt;
178
178
  function kt(e, t = globalThis == null ? void 0 : globalThis.document) {
179
- const r = Z(e), o = i.useRef(!1), n = i.useRef(() => {
179
+ const r = q(e), o = i.useRef(!1), n = i.useRef(() => {
180
180
  });
181
181
  return i.useEffect(() => {
182
182
  const s = (u) => {
183
183
  if (u.target && !o.current) {
184
184
  let l = function() {
185
- we(
185
+ Ee(
186
186
  Lt,
187
187
  r,
188
188
  p,
@@ -206,10 +206,10 @@ function kt(e, t = globalThis == null ? void 0 : globalThis.document) {
206
206
  };
207
207
  }
208
208
  function Ft(e, t = globalThis == null ? void 0 : globalThis.document) {
209
- const r = Z(e), o = i.useRef(!1);
209
+ const r = q(e), o = i.useRef(!1);
210
210
  return i.useEffect(() => {
211
211
  const n = (s) => {
212
- s.target && !o.current && we(It, r, { originalEvent: s }, {
212
+ s.target && !o.current && Ee(It, r, { originalEvent: s }, {
213
213
  discrete: !1
214
214
  });
215
215
  };
@@ -219,17 +219,17 @@ function Ft(e, t = globalThis == null ? void 0 : globalThis.document) {
219
219
  onBlurCapture: () => o.current = !1
220
220
  };
221
221
  }
222
- function fe() {
222
+ function he() {
223
223
  const e = new CustomEvent(z);
224
224
  document.dispatchEvent(e);
225
225
  }
226
- function we(e, t, r, { discrete: o }) {
226
+ function Ee(e, t, r, { discrete: o }) {
227
227
  const n = r.originalEvent.target, s = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: r });
228
228
  t && n.addEventListener(e, t, { once: !0 }), o ? Dt(n, s) : n.dispatchEvent(s);
229
229
  }
230
- var $t = "Arrow", Ce = i.forwardRef((e, t) => {
230
+ var $t = "Arrow", we = i.forwardRef((e, t) => {
231
231
  const { children: r, width: o = 10, height: n = 5, ...s } = e;
232
- return /* @__PURE__ */ d(
232
+ return /* @__PURE__ */ c(
233
233
  O.svg,
234
234
  {
235
235
  ...s,
@@ -238,26 +238,26 @@ var $t = "Arrow", Ce = i.forwardRef((e, t) => {
238
238
  height: n,
239
239
  viewBox: "0 0 30 10",
240
240
  preserveAspectRatio: "none",
241
- children: e.asChild ? r : /* @__PURE__ */ d("polygon", { points: "0,0 30,0 15,10" })
241
+ children: e.asChild ? r : /* @__PURE__ */ c("polygon", { points: "0,0 30,0 15,10" })
242
242
  }
243
243
  );
244
244
  });
245
- Ce.displayName = $t;
246
- var Wt = Ce, K = "Popper", [Ee, Pe] = he(K), [Bt, be] = Ee(K), xe = (e) => {
245
+ we.displayName = $t;
246
+ var Wt = we, K = "Popper", [Pe, be] = ve(K), [Bt, xe] = Pe(K), Te = (e) => {
247
247
  const { __scopePopper: t, children: r } = e, [o, n] = i.useState(null);
248
- return /* @__PURE__ */ d(Bt, { scope: t, anchor: o, onAnchorChange: n, children: r });
248
+ return /* @__PURE__ */ c(Bt, { scope: t, anchor: o, onAnchorChange: n, children: r });
249
249
  };
250
- xe.displayName = K;
251
- var Te = "PopperAnchor", Ae = i.forwardRef(
250
+ Te.displayName = K;
251
+ var Ae = "PopperAnchor", Re = i.forwardRef(
252
252
  (e, t) => {
253
- const { __scopePopper: r, virtualRef: o, ...n } = e, s = be(Te, r), a = i.useRef(null), u = N(t, a);
253
+ const { __scopePopper: r, virtualRef: o, ...n } = e, s = xe(Ae, r), a = i.useRef(null), u = D(t, a);
254
254
  return i.useEffect(() => {
255
255
  s.onAnchorChange((o == null ? void 0 : o.current) || a.current);
256
- }), o ? null : /* @__PURE__ */ d(O.div, { ...n, ref: u });
256
+ }), o ? null : /* @__PURE__ */ c(O.div, { ...n, ref: u });
257
257
  }
258
258
  );
259
- Ae.displayName = Te;
260
- var Q = "PopperContent", [Ut, Vt] = Ee(Q), Re = i.forwardRef(
259
+ Re.displayName = Ae;
260
+ var Q = "PopperContent", [Ut, Yt] = Pe(Q), Oe = i.forwardRef(
261
261
  (e, t) => {
262
262
  var oe, se, ie, ae, le, ce;
263
263
  const {
@@ -269,55 +269,55 @@ var Q = "PopperContent", [Ut, Vt] = Ee(Q), Re = i.forwardRef(
269
269
  arrowPadding: u = 0,
270
270
  avoidCollisions: l = !0,
271
271
  collisionBoundary: p = [],
272
- collisionPadding: c = 0,
272
+ collisionPadding: d = 0,
273
273
  sticky: f = "partial",
274
274
  hideWhenDetached: h = !1,
275
275
  updatePositionStrategy: v = "optimized",
276
276
  onPlaced: m,
277
277
  ...y
278
- } = e, w = be(Q, r), [E, C] = i.useState(null), x = N(t, (I) => C(I)), [P, T] = i.useState(null), b = ot(P), g = (b == null ? void 0 : b.width) ?? 0, S = (b == null ? void 0 : b.height) ?? 0, F = o + (s !== "center" ? "-" + s : ""), L = typeof c == "number" ? c : { top: 0, right: 0, bottom: 0, left: 0, ...c }, te = Array.isArray(p) ? p : [p], Ue = te.length > 0, $ = {
279
- padding: L,
278
+ } = e, C = xe(Q, r), [w, E] = i.useState(null), x = D(t, (M) => E(M)), [P, T] = i.useState(null), b = st(P), g = (b == null ? void 0 : b.width) ?? 0, S = (b == null ? void 0 : b.height) ?? 0, F = o + (s !== "center" ? "-" + s : ""), I = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, te = Array.isArray(p) ? p : [p], Ye = te.length > 0, $ = {
279
+ padding: I,
280
280
  boundary: te.filter(jt),
281
281
  // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
282
- altBoundary: Ue
283
- }, { refs: Ve, floatingStyles: re, placement: Ye, isPositioned: W, middlewareData: D } = st({
282
+ altBoundary: Ye
283
+ }, { refs: Ve, floatingStyles: re, placement: je, isPositioned: W, middlewareData: _ } = it({
284
284
  // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
285
285
  strategy: "fixed",
286
286
  placement: F,
287
- whileElementsMounted: (...I) => ft(...I, {
287
+ whileElementsMounted: (...M) => ht(...M, {
288
288
  animationFrame: v === "always"
289
289
  }),
290
290
  elements: {
291
- reference: w.anchor
291
+ reference: C.anchor
292
292
  },
293
293
  middleware: [
294
- it({ mainAxis: n + S, alignmentAxis: a }),
295
- l && at({
294
+ at({ mainAxis: n + S, alignmentAxis: a }),
295
+ l && lt({
296
296
  mainAxis: !0,
297
297
  crossAxis: !1,
298
- limiter: f === "partial" ? pt() : void 0,
298
+ limiter: f === "partial" ? ft() : void 0,
299
299
  ...$
300
300
  }),
301
- l && lt({ ...$ }),
302
- ct({
301
+ l && ct({ ...$ }),
302
+ dt({
303
303
  ...$,
304
- apply: ({ elements: I, rects: de, availableWidth: Ke, availableHeight: Qe }) => {
305
- const { width: Je, height: et } = de.reference, U = I.floating.style;
306
- U.setProperty("--radix-popper-available-width", `${Ke}px`), U.setProperty("--radix-popper-available-height", `${Qe}px`), U.setProperty("--radix-popper-anchor-width", `${Je}px`), U.setProperty("--radix-popper-anchor-height", `${et}px`);
304
+ apply: ({ elements: M, rects: de, availableWidth: Qe, availableHeight: Je }) => {
305
+ const { width: et, height: tt } = de.reference, U = M.floating.style;
306
+ U.setProperty("--radix-popper-available-width", `${Qe}px`), U.setProperty("--radix-popper-available-height", `${Je}px`), U.setProperty("--radix-popper-anchor-width", `${et}px`), U.setProperty("--radix-popper-anchor-height", `${tt}px`);
307
307
  }
308
308
  }),
309
- P && dt({ element: P, padding: u }),
309
+ P && ut({ element: P, padding: u }),
310
310
  Gt({ arrowWidth: g, arrowHeight: S }),
311
- h && ut({ strategy: "referenceHidden", ...$ })
311
+ h && pt({ strategy: "referenceHidden", ...$ })
312
312
  ]
313
- }), [ne, je] = Ne(Ye), B = Z(m);
313
+ }), [ne, Ge] = De(je), B = q(m);
314
314
  G(() => {
315
315
  W && (B == null || B());
316
316
  }, [W, B]);
317
- const Ge = (oe = D.arrow) == null ? void 0 : oe.x, ze = (se = D.arrow) == null ? void 0 : se.y, Xe = ((ie = D.arrow) == null ? void 0 : ie.centerOffset) !== 0, [qe, Ze] = i.useState();
317
+ const ze = (oe = _.arrow) == null ? void 0 : oe.x, Xe = (se = _.arrow) == null ? void 0 : se.y, Ze = ((ie = _.arrow) == null ? void 0 : ie.centerOffset) !== 0, [qe, Ke] = i.useState();
318
318
  return G(() => {
319
- E && Ze(window.getComputedStyle(E).zIndex);
320
- }, [E]), /* @__PURE__ */ d(
319
+ w && Ke(window.getComputedStyle(w).zIndex);
320
+ }, [w]), /* @__PURE__ */ c(
321
321
  "div",
322
322
  {
323
323
  ref: Ve.setFloating,
@@ -329,32 +329,32 @@ var Q = "PopperContent", [Ut, Vt] = Ee(Q), Re = i.forwardRef(
329
329
  minWidth: "max-content",
330
330
  zIndex: qe,
331
331
  "--radix-popper-transform-origin": [
332
- (ae = D.transformOrigin) == null ? void 0 : ae.x,
333
- (le = D.transformOrigin) == null ? void 0 : le.y
332
+ (ae = _.transformOrigin) == null ? void 0 : ae.x,
333
+ (le = _.transformOrigin) == null ? void 0 : le.y
334
334
  ].join(" "),
335
335
  // hide the content if using the hide middleware and should be hidden
336
336
  // set visibility to hidden and disable pointer events so the UI behaves
337
337
  // as if the PopperContent isn't there at all
338
- ...((ce = D.hide) == null ? void 0 : ce.referenceHidden) && {
338
+ ...((ce = _.hide) == null ? void 0 : ce.referenceHidden) && {
339
339
  visibility: "hidden",
340
340
  pointerEvents: "none"
341
341
  }
342
342
  },
343
343
  dir: e.dir,
344
- children: /* @__PURE__ */ d(
344
+ children: /* @__PURE__ */ c(
345
345
  Ut,
346
346
  {
347
347
  scope: r,
348
348
  placedSide: ne,
349
349
  onArrowChange: T,
350
- arrowX: Ge,
351
- arrowY: ze,
352
- shouldHideArrow: Xe,
353
- children: /* @__PURE__ */ d(
350
+ arrowX: ze,
351
+ arrowY: Xe,
352
+ shouldHideArrow: Ze,
353
+ children: /* @__PURE__ */ c(
354
354
  O.div,
355
355
  {
356
356
  "data-side": ne,
357
- "data-align": je,
357
+ "data-align": Ge,
358
358
  ...y,
359
359
  ref: x,
360
360
  style: {
@@ -371,19 +371,19 @@ var Q = "PopperContent", [Ut, Vt] = Ee(Q), Re = i.forwardRef(
371
371
  );
372
372
  }
373
373
  );
374
- Re.displayName = Q;
375
- var Oe = "PopperArrow", Yt = {
374
+ Oe.displayName = Q;
375
+ var Se = "PopperArrow", Vt = {
376
376
  top: "bottom",
377
377
  right: "left",
378
378
  bottom: "top",
379
379
  left: "right"
380
- }, Se = i.forwardRef(function(t, r) {
381
- const { __scopePopper: o, ...n } = t, s = Vt(Oe, o), a = Yt[s.placedSide];
380
+ }, Ne = i.forwardRef(function(t, r) {
381
+ const { __scopePopper: o, ...n } = t, s = Yt(Se, o), a = Vt[s.placedSide];
382
382
  return (
383
383
  // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
384
384
  // doesn't report size as we'd expect on SVG elements.
385
385
  // it reports their bounding box which is effectively the largest path inside the SVG.
386
- /* @__PURE__ */ d(
386
+ /* @__PURE__ */ c(
387
387
  "span",
388
388
  {
389
389
  ref: s.onArrowChange,
@@ -406,7 +406,7 @@ var Oe = "PopperArrow", Yt = {
406
406
  }[s.placedSide],
407
407
  visibility: s.shouldHideArrow ? "hidden" : void 0
408
408
  },
409
- children: /* @__PURE__ */ d(
409
+ children: /* @__PURE__ */ c(
410
410
  Wt,
411
411
  {
412
412
  ...n,
@@ -422,7 +422,7 @@ var Oe = "PopperArrow", Yt = {
422
422
  )
423
423
  );
424
424
  });
425
- Se.displayName = Oe;
425
+ Ne.displayName = Se;
426
426
  function jt(e) {
427
427
  return e !== null;
428
428
  }
@@ -430,24 +430,24 @@ var Gt = (e) => ({
430
430
  name: "transformOrigin",
431
431
  options: e,
432
432
  fn(t) {
433
- var w, E, C;
434
- const { placement: r, rects: o, middlewareData: n } = t, a = ((w = n.arrow) == null ? void 0 : w.centerOffset) !== 0, u = a ? 0 : e.arrowWidth, l = a ? 0 : e.arrowHeight, [p, c] = Ne(r), f = { start: "0%", center: "50%", end: "100%" }[c], h = (((E = n.arrow) == null ? void 0 : E.x) ?? 0) + u / 2, v = (((C = n.arrow) == null ? void 0 : C.y) ?? 0) + l / 2;
433
+ var C, w, E;
434
+ const { placement: r, rects: o, middlewareData: n } = t, a = ((C = n.arrow) == null ? void 0 : C.centerOffset) !== 0, u = a ? 0 : e.arrowWidth, l = a ? 0 : e.arrowHeight, [p, d] = De(r), f = { start: "0%", center: "50%", end: "100%" }[d], h = (((w = n.arrow) == null ? void 0 : w.x) ?? 0) + u / 2, v = (((E = n.arrow) == null ? void 0 : E.y) ?? 0) + l / 2;
435
435
  let m = "", y = "";
436
436
  return p === "bottom" ? (m = a ? f : `${h}px`, y = `${-l}px`) : p === "top" ? (m = a ? f : `${h}px`, y = `${o.floating.height + l}px`) : p === "right" ? (m = `${-l}px`, y = a ? f : `${v}px`) : p === "left" && (m = `${o.floating.width + l}px`, y = a ? f : `${v}px`), { data: { x: m, y } };
437
437
  }
438
438
  });
439
- function Ne(e) {
439
+ function De(e) {
440
440
  const [t, r = "center"] = e.split("-");
441
441
  return [t, r];
442
442
  }
443
- var zt = xe, Xt = Ae, qt = Re, Zt = Se, Kt = "Portal", De = i.forwardRef((e, t) => {
443
+ var zt = Te, Xt = Re, Zt = Oe, qt = Ne, Kt = "Portal", _e = i.forwardRef((e, t) => {
444
444
  var u;
445
445
  const { container: r, ...o } = e, [n, s] = i.useState(!1);
446
446
  G(() => s(!0), []);
447
447
  const a = r || n && ((u = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : u.body);
448
- return a ? yt.createPortal(/* @__PURE__ */ d(O.div, { ...o, ref: t }), a) : null;
448
+ return a ? gt.createPortal(/* @__PURE__ */ c(O.div, { ...o, ref: t }), a) : null;
449
449
  });
450
- De.displayName = Kt;
450
+ _e.displayName = Kt;
451
451
  var Qt = Object.freeze({
452
452
  // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
453
453
  position: "absolute",
@@ -460,8 +460,8 @@ var Qt = Object.freeze({
460
460
  clip: "rect(0, 0, 0, 0)",
461
461
  whiteSpace: "nowrap",
462
462
  wordWrap: "normal"
463
- }), Jt = "VisuallyHidden", _e = i.forwardRef(
464
- (e, t) => /* @__PURE__ */ d(
463
+ }), Jt = "VisuallyHidden", Le = i.forwardRef(
464
+ (e, t) => /* @__PURE__ */ c(
465
465
  O.span,
466
466
  {
467
467
  ...e,
@@ -470,10 +470,10 @@ var Qt = Object.freeze({
470
470
  }
471
471
  )
472
472
  );
473
- _e.displayName = Jt;
474
- var er = _e, [V, Vr] = he("Tooltip", [
475
- Pe
476
- ]), Y = Pe(), Le = "TooltipProvider", tr = 700, X = "tooltip.open", [rr, J] = V(Le), Ie = (e) => {
473
+ Le.displayName = Jt;
474
+ var er = Le, [V, Yr] = ve("Tooltip", [
475
+ be
476
+ ]), j = be(), Ie = "TooltipProvider", tr = 700, X = "tooltip.open", [rr, J] = V(Ie), Me = (e) => {
477
477
  const {
478
478
  __scopeTooltip: t,
479
479
  delayDuration: r = tr,
@@ -484,7 +484,7 @@ var er = _e, [V, Vr] = he("Tooltip", [
484
484
  return i.useEffect(() => {
485
485
  const p = l.current;
486
486
  return () => window.clearTimeout(p);
487
- }, []), /* @__PURE__ */ d(
487
+ }, []), /* @__PURE__ */ c(
488
488
  rr,
489
489
  {
490
490
  scope: t,
@@ -508,8 +508,8 @@ var er = _e, [V, Vr] = he("Tooltip", [
508
508
  }
509
509
  );
510
510
  };
511
- Ie.displayName = Le;
512
- var H = "Tooltip", [nr, k] = V(H), Me = (e) => {
511
+ Me.displayName = Ie;
512
+ var H = "Tooltip", [nr, k] = V(H), He = (e) => {
513
513
  const {
514
514
  __scopeTooltip: t,
515
515
  children: r,
@@ -518,32 +518,32 @@ var H = "Tooltip", [nr, k] = V(H), Me = (e) => {
518
518
  onOpenChange: s,
519
519
  disableHoverableContent: a,
520
520
  delayDuration: u
521
- } = e, l = J(H, e.__scopeTooltip), p = Y(t), [c, f] = i.useState(null), h = ht(), v = i.useRef(0), m = a ?? l.disableHoverableContent, y = u ?? l.delayDuration, w = i.useRef(!1), [E, C] = vt({
521
+ } = e, l = J(H, e.__scopeTooltip), p = j(t), [d, f] = i.useState(null), h = vt(), v = i.useRef(0), m = a ?? l.disableHoverableContent, y = u ?? l.delayDuration, C = i.useRef(!1), [w, E] = mt({
522
522
  prop: o,
523
523
  defaultProp: n ?? !1,
524
524
  onChange: (g) => {
525
525
  g ? (l.onOpen(), document.dispatchEvent(new CustomEvent(X))) : l.onClose(), s == null || s(g);
526
526
  },
527
527
  caller: H
528
- }), x = i.useMemo(() => E ? w.current ? "delayed-open" : "instant-open" : "closed", [E]), P = i.useCallback(() => {
529
- window.clearTimeout(v.current), v.current = 0, w.current = !1, C(!0);
530
- }, [C]), T = i.useCallback(() => {
531
- window.clearTimeout(v.current), v.current = 0, C(!1);
532
- }, [C]), b = i.useCallback(() => {
528
+ }), x = i.useMemo(() => w ? C.current ? "delayed-open" : "instant-open" : "closed", [w]), P = i.useCallback(() => {
529
+ window.clearTimeout(v.current), v.current = 0, C.current = !1, E(!0);
530
+ }, [E]), T = i.useCallback(() => {
531
+ window.clearTimeout(v.current), v.current = 0, E(!1);
532
+ }, [E]), b = i.useCallback(() => {
533
533
  window.clearTimeout(v.current), v.current = window.setTimeout(() => {
534
- w.current = !0, C(!0), v.current = 0;
534
+ C.current = !0, E(!0), v.current = 0;
535
535
  }, y);
536
- }, [y, C]);
536
+ }, [y, E]);
537
537
  return i.useEffect(() => () => {
538
538
  v.current && (window.clearTimeout(v.current), v.current = 0);
539
- }, []), /* @__PURE__ */ d(zt, { ...p, children: /* @__PURE__ */ d(
539
+ }, []), /* @__PURE__ */ c(zt, { ...p, children: /* @__PURE__ */ c(
540
540
  nr,
541
541
  {
542
542
  scope: t,
543
543
  contentId: h,
544
- open: E,
544
+ open: w,
545
545
  stateAttribute: x,
546
- trigger: c,
546
+ trigger: d,
547
547
  onTriggerChange: f,
548
548
  onTriggerEnter: i.useCallback(() => {
549
549
  l.isOpenDelayedRef.current ? b() : P();
@@ -558,11 +558,11 @@ var H = "Tooltip", [nr, k] = V(H), Me = (e) => {
558
558
  }
559
559
  ) });
560
560
  };
561
- Me.displayName = H;
562
- var q = "TooltipTrigger", He = i.forwardRef(
561
+ He.displayName = H;
562
+ var Z = "TooltipTrigger", ke = i.forwardRef(
563
563
  (e, t) => {
564
- const { __scopeTooltip: r, ...o } = e, n = k(q, r), s = J(q, r), a = Y(r), u = i.useRef(null), l = N(t, u, n.onTriggerChange), p = i.useRef(!1), c = i.useRef(!1), f = i.useCallback(() => p.current = !1, []);
565
- return i.useEffect(() => () => document.removeEventListener("pointerup", f), [f]), /* @__PURE__ */ d(Xt, { asChild: !0, ...a, children: /* @__PURE__ */ d(
564
+ const { __scopeTooltip: r, ...o } = e, n = k(Z, r), s = J(Z, r), a = j(r), u = i.useRef(null), l = D(t, u, n.onTriggerChange), p = i.useRef(!1), d = i.useRef(!1), f = i.useCallback(() => p.current = !1, []);
565
+ return i.useEffect(() => () => document.removeEventListener("pointerup", f), [f]), /* @__PURE__ */ c(Xt, { asChild: !0, ...a, children: /* @__PURE__ */ c(
566
566
  O.button,
567
567
  {
568
568
  "aria-describedby": n.open ? n.contentId : void 0,
@@ -570,10 +570,10 @@ var q = "TooltipTrigger", He = i.forwardRef(
570
570
  ...o,
571
571
  ref: l,
572
572
  onPointerMove: A(e.onPointerMove, (h) => {
573
- h.pointerType !== "touch" && !c.current && !s.isPointerInTransitRef.current && (n.onTriggerEnter(), c.current = !0);
573
+ h.pointerType !== "touch" && !d.current && !s.isPointerInTransitRef.current && (n.onTriggerEnter(), d.current = !0);
574
574
  }),
575
575
  onPointerLeave: A(e.onPointerLeave, () => {
576
- n.onTriggerLeave(), c.current = !1;
576
+ n.onTriggerLeave(), d.current = !1;
577
577
  }),
578
578
  onPointerDown: A(e.onPointerDown, () => {
579
579
  n.open && n.onClose(), p.current = !0, document.addEventListener("pointerup", f, { once: !0 });
@@ -587,46 +587,46 @@ var q = "TooltipTrigger", He = i.forwardRef(
587
587
  ) });
588
588
  }
589
589
  );
590
- He.displayName = q;
590
+ ke.displayName = Z;
591
591
  var ee = "TooltipPortal", [or, sr] = V(ee, {
592
592
  forceMount: void 0
593
- }), ke = (e) => {
593
+ }), Fe = (e) => {
594
594
  const { __scopeTooltip: t, forceMount: r, children: o, container: n } = e, s = k(ee, t);
595
- return /* @__PURE__ */ d(or, { scope: t, forceMount: r, children: /* @__PURE__ */ d(ve, { present: r || s.open, children: /* @__PURE__ */ d(De, { asChild: !0, container: n, children: o }) }) });
595
+ return /* @__PURE__ */ c(or, { scope: t, forceMount: r, children: /* @__PURE__ */ c(me, { present: r || s.open, children: /* @__PURE__ */ c(_e, { asChild: !0, container: n, children: o }) }) });
596
596
  };
597
- ke.displayName = ee;
598
- var _ = "TooltipContent", Fe = i.forwardRef(
597
+ Fe.displayName = ee;
598
+ var L = "TooltipContent", $e = i.forwardRef(
599
599
  (e, t) => {
600
- const r = sr(_, e.__scopeTooltip), { forceMount: o = r.forceMount, side: n = "top", ...s } = e, a = k(_, e.__scopeTooltip);
601
- return /* @__PURE__ */ d(ve, { present: o || a.open, children: a.disableHoverableContent ? /* @__PURE__ */ d($e, { side: n, ...s, ref: t }) : /* @__PURE__ */ d(ir, { side: n, ...s, ref: t }) });
600
+ const r = sr(L, e.__scopeTooltip), { forceMount: o = r.forceMount, side: n = "top", ...s } = e, a = k(L, e.__scopeTooltip);
601
+ return /* @__PURE__ */ c(me, { present: o || a.open, children: a.disableHoverableContent ? /* @__PURE__ */ c(We, { side: n, ...s, ref: t }) : /* @__PURE__ */ c(ir, { side: n, ...s, ref: t }) });
602
602
  }
603
603
  ), ir = i.forwardRef((e, t) => {
604
- const r = k(_, e.__scopeTooltip), o = J(_, e.__scopeTooltip), n = i.useRef(null), s = N(t, n), [a, u] = i.useState(null), { trigger: l, onClose: p } = r, c = n.current, { onPointerInTransitChange: f } = o, h = i.useCallback(() => {
604
+ const r = k(L, e.__scopeTooltip), o = J(L, e.__scopeTooltip), n = i.useRef(null), s = D(t, n), [a, u] = i.useState(null), { trigger: l, onClose: p } = r, d = n.current, { onPointerInTransitChange: f } = o, h = i.useCallback(() => {
605
605
  u(null), f(!1);
606
606
  }, [f]), v = i.useCallback(
607
607
  (m, y) => {
608
- const w = m.currentTarget, E = { x: m.clientX, y: m.clientY }, C = dr(E, w.getBoundingClientRect()), x = ur(E, C), P = pr(y.getBoundingClientRect()), T = hr([...x, ...P]);
608
+ const C = m.currentTarget, w = { x: m.clientX, y: m.clientY }, E = dr(w, C.getBoundingClientRect()), x = ur(w, E), P = pr(y.getBoundingClientRect()), T = hr([...x, ...P]);
609
609
  u(T), f(!0);
610
610
  },
611
611
  [f]
612
612
  );
613
613
  return i.useEffect(() => () => h(), [h]), i.useEffect(() => {
614
- if (l && c) {
615
- const m = (w) => v(w, c), y = (w) => v(w, l);
616
- return l.addEventListener("pointerleave", m), c.addEventListener("pointerleave", y), () => {
617
- l.removeEventListener("pointerleave", m), c.removeEventListener("pointerleave", y);
614
+ if (l && d) {
615
+ const m = (C) => v(C, d), y = (C) => v(C, l);
616
+ return l.addEventListener("pointerleave", m), d.addEventListener("pointerleave", y), () => {
617
+ l.removeEventListener("pointerleave", m), d.removeEventListener("pointerleave", y);
618
618
  };
619
619
  }
620
- }, [l, c, v, h]), i.useEffect(() => {
620
+ }, [l, d, v, h]), i.useEffect(() => {
621
621
  if (a) {
622
622
  const m = (y) => {
623
- const w = y.target, E = { x: y.clientX, y: y.clientY }, C = (l == null ? void 0 : l.contains(w)) || (c == null ? void 0 : c.contains(w)), x = !fr(E, a);
624
- C ? h() : x && (h(), p());
623
+ const C = y.target, w = { x: y.clientX, y: y.clientY }, E = (l == null ? void 0 : l.contains(C)) || (d == null ? void 0 : d.contains(C)), x = !fr(w, a);
624
+ E ? h() : x && (h(), p());
625
625
  };
626
626
  return document.addEventListener("pointermove", m), () => document.removeEventListener("pointermove", m);
627
627
  }
628
- }, [l, c, a, p, h]), /* @__PURE__ */ d($e, { ...e, ref: s });
629
- }), [ar, lr] = V(H, { isInside: !1 }), cr = /* @__PURE__ */ At("TooltipContent"), $e = i.forwardRef(
628
+ }, [l, d, a, p, h]), /* @__PURE__ */ c(We, { ...e, ref: s });
629
+ }), [ar, lr] = V(H, { isInside: !1 }), cr = /* @__PURE__ */ At("TooltipContent"), We = i.forwardRef(
630
630
  (e, t) => {
631
631
  const {
632
632
  __scopeTooltip: r,
@@ -635,26 +635,26 @@ var _ = "TooltipContent", Fe = i.forwardRef(
635
635
  onEscapeKeyDown: s,
636
636
  onPointerDownOutside: a,
637
637
  ...u
638
- } = e, l = k(_, r), p = Y(r), { onClose: c } = l;
639
- return i.useEffect(() => (document.addEventListener(X, c), () => document.removeEventListener(X, c)), [c]), i.useEffect(() => {
638
+ } = e, l = k(L, r), p = j(r), { onClose: d } = l;
639
+ return i.useEffect(() => (document.addEventListener(X, d), () => document.removeEventListener(X, d)), [d]), i.useEffect(() => {
640
640
  if (l.trigger) {
641
641
  const f = (h) => {
642
642
  const v = h.target;
643
- v != null && v.contains(l.trigger) && c();
643
+ v != null && v.contains(l.trigger) && d();
644
644
  };
645
645
  return window.addEventListener("scroll", f, { capture: !0 }), () => window.removeEventListener("scroll", f, { capture: !0 });
646
646
  }
647
- }, [l.trigger, c]), /* @__PURE__ */ d(
648
- ge,
647
+ }, [l.trigger, d]), /* @__PURE__ */ c(
648
+ Ce,
649
649
  {
650
650
  asChild: !0,
651
651
  disableOutsidePointerEvents: !1,
652
652
  onEscapeKeyDown: s,
653
653
  onPointerDownOutside: a,
654
654
  onFocusOutside: (f) => f.preventDefault(),
655
- onDismiss: c,
655
+ onDismiss: d,
656
656
  children: /* @__PURE__ */ R(
657
- qt,
657
+ Zt,
658
658
  {
659
659
  "data-state": l.stateAttribute,
660
660
  ...p,
@@ -669,8 +669,8 @@ var _ = "TooltipContent", Fe = i.forwardRef(
669
669
  "--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
670
670
  },
671
671
  children: [
672
- /* @__PURE__ */ d(cr, { children: o }),
673
- /* @__PURE__ */ d(ar, { scope: r, isInside: !0, children: /* @__PURE__ */ d(er, { id: l.contentId, role: "tooltip", children: n || o }) })
672
+ /* @__PURE__ */ c(cr, { children: o }),
673
+ /* @__PURE__ */ c(ar, { scope: r, isInside: !0, children: /* @__PURE__ */ c(er, { id: l.contentId, role: "tooltip", children: n || o }) })
674
674
  ]
675
675
  }
676
676
  )
@@ -678,17 +678,17 @@ var _ = "TooltipContent", Fe = i.forwardRef(
678
678
  );
679
679
  }
680
680
  );
681
- Fe.displayName = _;
682
- var We = "TooltipArrow", Be = i.forwardRef(
681
+ $e.displayName = L;
682
+ var Be = "TooltipArrow", Ue = i.forwardRef(
683
683
  (e, t) => {
684
- const { __scopeTooltip: r, ...o } = e, n = Y(r);
684
+ const { __scopeTooltip: r, ...o } = e, n = j(r);
685
685
  return lr(
686
- We,
686
+ Be,
687
687
  r
688
- ).isInside ? null : /* @__PURE__ */ d(Zt, { ...n, ...o, ref: t });
688
+ ).isInside ? null : /* @__PURE__ */ c(qt, { ...n, ...o, ref: t });
689
689
  }
690
690
  );
691
- Be.displayName = We;
691
+ Ue.displayName = Be;
692
692
  function dr(e, t) {
693
693
  const r = Math.abs(t.top - e.y), o = Math.abs(t.bottom - e.y), n = Math.abs(t.right - e.x), s = Math.abs(t.left - e.x);
694
694
  switch (Math.min(r, o, n, s)) {
@@ -747,8 +747,8 @@ function fr(e, t) {
747
747
  const { x: r, y: o } = e;
748
748
  let n = !1;
749
749
  for (let s = 0, a = t.length - 1; s < t.length; a = s++) {
750
- const u = t[s], l = t[a], p = u.x, c = u.y, f = l.x, h = l.y;
751
- c > o != h > o && r < (f - p) * (o - c) / (h - c) + p && (n = !n);
750
+ const u = t[s], l = t[a], p = u.x, d = u.y, f = l.x, h = l.y;
751
+ d > o != h > o && r < (f - p) * (o - d) / (h - d) + p && (n = !n);
752
752
  }
753
753
  return n;
754
754
  }
@@ -781,21 +781,21 @@ function vr(e) {
781
781
  }
782
782
  return r.pop(), t.length === 1 && r.length === 1 && t[0].x === r[0].x && t[0].y === r[0].y ? t : t.concat(r);
783
783
  }
784
- var mr = Ie, yr = Me, gr = He, wr = ke, Cr = Fe, Er = Be;
785
- const Pr = 1e3 * 60 * 60, Yr = ({
784
+ var mr = Me, yr = He, gr = ke, Cr = Fe, Er = $e, wr = Ue;
785
+ const Pr = 1e3 * 60 * 60, Vr = ({
786
786
  amount: e,
787
787
  currency: t,
788
- position: r = Pt.RIGHT,
789
- zeroDisplayOption: o = M.NA,
788
+ position: r = bt.RIGHT,
789
+ zeroDisplayOption: o = N.NA,
790
790
  customDisplay: n
791
791
  }) => {
792
792
  var f;
793
- const { user: s } = Et(), a = (f = s == null ? void 0 : s.userRegion) == null ? void 0 : f.currency, u = a !== t, { data: l, isPending: p } = wt({
794
- queryKey: [gt.CONVERT_CURRENCY, t],
795
- queryFn: () => Ct.convertCurrency({ baseCurrency: t }),
793
+ const { user: s } = Pt(), a = (f = s == null ? void 0 : s.userRegion) == null ? void 0 : f.currency, u = a !== t, { data: l, isPending: p } = Et({
794
+ queryKey: [Ct.CONVERT_CURRENCY, t],
795
+ queryFn: () => wt.convertCurrency({ baseCurrency: t }),
796
796
  enabled: u,
797
797
  staleTime: Pr
798
- }), c = rt(() => {
798
+ }), d = nt(() => {
799
799
  if (!s)
800
800
  return null;
801
801
  let h = typeof e == "string" ? parseFloat(e) : e;
@@ -805,25 +805,29 @@ const Pr = 1e3 * 60 * 60, Yr = ({
805
805
  }
806
806
  return h;
807
807
  }, [e, s, p, u, l]);
808
- if (!a || !c || c < 0)
808
+ if (!a || !d || d < 0)
809
809
  switch (o) {
810
- case M.NA:
811
- return /* @__PURE__ */ d("span", { children: "N/A" });
812
- case M.HIDDEN:
813
- return /* @__PURE__ */ d("span", { className: "hidden", children: "N/A" });
814
- case M.DISPLAY_AS_ZERO:
815
- return /* @__PURE__ */ d("span", { children: c });
816
- case M.CUSTOM:
817
- return /* @__PURE__ */ d("span", { children: c == 0 ? n : "N/A" });
810
+ case N.NA:
811
+ return /* @__PURE__ */ c("span", { children: "N/A" });
812
+ case N.HIDDEN:
813
+ return /* @__PURE__ */ c("span", { className: "hidden", children: "N/A" });
814
+ case N.DISPLAY_AS_ZERO:
815
+ return /* @__PURE__ */ c("span", { children: "0" });
816
+ case N.DISPLAY_AS_ZERO_WITH_CURRENCY:
817
+ return /* @__PURE__ */ c("span", { children: Y(0, a ?? t) });
818
+ case N.DISPLAY_AS_ZERO_WITH_CURRENCY_NO_DECIMAL:
819
+ return /* @__PURE__ */ c("span", { children: pe(0, a ?? t) });
820
+ case N.CUSTOM:
821
+ return /* @__PURE__ */ c("span", { children: d == 0 ? n : "N/A" });
818
822
  default:
819
- return /* @__PURE__ */ d("span", { children: "N/A" });
823
+ return /* @__PURE__ */ c("span", { children: "N/A" });
820
824
  }
821
825
  return /* @__PURE__ */ R("span", { className: "currency-conversion", children: [
822
- bt(c, a),
823
- u && /* @__PURE__ */ d(
826
+ pe(d, a),
827
+ u && /* @__PURE__ */ c(
824
828
  br,
825
829
  {
826
- trigger: /* @__PURE__ */ d("sup", { children: /* @__PURE__ */ d(ue, {}) }),
830
+ trigger: /* @__PURE__ */ c("sup", { children: /* @__PURE__ */ c(ue, {}) }),
827
831
  position: r,
828
832
  children: /* @__PURE__ */ R("div", { className: "currency-conversion-container", children: [
829
833
  /* @__PURE__ */ R("p", { children: [
@@ -833,11 +837,11 @@ const Pr = 1e3 * 60 * 60, Yr = ({
833
837
  a
834
838
  ] }),
835
839
  /* @__PURE__ */ R("div", { className: "currency-conversion-amounts", children: [
836
- /* @__PURE__ */ d("div", { children: /* @__PURE__ */ d("p", { children: j(e, t) }) }),
837
- /* @__PURE__ */ d("div", { children: /* @__PURE__ */ d("p", { children: j(c, a) }) }),
838
- /* @__PURE__ */ d("span", { className: "conversion-icon", children: /* @__PURE__ */ d(ue, {}) })
840
+ /* @__PURE__ */ c("div", { children: /* @__PURE__ */ c("p", { children: Y(e, t) }) }),
841
+ /* @__PURE__ */ c("div", { children: /* @__PURE__ */ c("p", { children: Y(d, a) }) }),
842
+ /* @__PURE__ */ c("span", { className: "conversion-icon", children: /* @__PURE__ */ c(ue, {}) })
839
843
  ] }),
840
- /* @__PURE__ */ d("div", { className: "currency-conversion-rate", children: /* @__PURE__ */ R("p", { children: [
844
+ /* @__PURE__ */ c("div", { className: "currency-conversion-rate", children: /* @__PURE__ */ R("p", { children: [
841
845
  "Current Rate:",
842
846
  " ",
843
847
  l ? (
@@ -848,28 +852,28 @@ const Pr = 1e3 * 60 * 60, Yr = ({
848
852
  ) : "N/A",
849
853
  " ",
850
854
  "≈ ",
851
- j(1, a)
855
+ Y(1, a)
852
856
  ] }) })
853
857
  ] })
854
858
  }
855
859
  )
856
860
  ] });
857
- }, br = ({ children: e, trigger: t, position: r }) => /* @__PURE__ */ d(mr, { delayDuration: 100, children: /* @__PURE__ */ R(yr, { children: [
858
- /* @__PURE__ */ d(gr, { asChild: !0, children: t }),
859
- /* @__PURE__ */ d(wr, { children: /* @__PURE__ */ R(
860
- Cr,
861
+ }, br = ({ children: e, trigger: t, position: r }) => /* @__PURE__ */ c(mr, { delayDuration: 100, children: /* @__PURE__ */ R(yr, { children: [
862
+ /* @__PURE__ */ c(gr, { asChild: !0, children: t }),
863
+ /* @__PURE__ */ c(Cr, { children: /* @__PURE__ */ R(
864
+ Er,
861
865
  {
862
866
  className: `tooltip-content ${r}`,
863
867
  side: r,
864
868
  align: "center",
865
869
  children: [
866
870
  e,
867
- /* @__PURE__ */ d(Er, { className: "tooltip-arrow" })
871
+ /* @__PURE__ */ c(wr, { className: "tooltip-arrow" })
868
872
  ]
869
873
  }
870
874
  ) })
871
875
  ] }) });
872
876
  export {
873
- Yr as CashValue,
877
+ Vr as CashValue,
874
878
  Pr as CurrencyCallStaleTimeMs
875
879
  };
@@ -14,7 +14,7 @@ import '../../assets/_styles5.css';import '../../assets/_styles4.css';import '..
14
14
  /* empty css */
15
15
  /* empty css */
16
16
  /* empty css */
17
- const h = {
17
+ const f = {
18
18
  title: "Core/Cash Value",
19
19
  component: n,
20
20
  parameters: {
@@ -56,32 +56,46 @@ const h = {
56
56
  }
57
57
  )
58
58
  ]
59
- }, R = {
59
+ }, h = {
60
60
  name: "Euro to Dollar Cash Value",
61
61
  args: {
62
62
  amount: 100,
63
63
  currency: "EUR"
64
64
  }
65
- }, j = {
65
+ }, _ = {
66
66
  name: "Invalid Amount",
67
67
  args: {
68
68
  amount: "invalid",
69
69
  currency: "EUR"
70
70
  }
71
- }, C = {
71
+ }, v = {
72
72
  name: "Zero Amount with Display as Zero",
73
73
  args: {
74
74
  amount: 0,
75
75
  zeroDisplayOption: o.DISPLAY_AS_ZERO,
76
76
  currency: "EUR"
77
77
  }
78
- }, T = {
78
+ }, I = {
79
+ name: "Zero Amount with Display as Zero With Currency",
80
+ args: {
81
+ amount: 0,
82
+ zeroDisplayOption: o.DISPLAY_AS_ZERO_WITH_CURRENCY,
83
+ currency: "EUR"
84
+ }
85
+ }, U = {
86
+ name: "Zero Amount with Display as Zero With Currency No Decimal",
87
+ args: {
88
+ amount: 0,
89
+ zeroDisplayOption: o.DISPLAY_AS_ZERO_WITH_CURRENCY_NO_DECIMAL,
90
+ currency: "EUR"
91
+ }
92
+ }, b = {
79
93
  name: "Negative Amount",
80
94
  args: {
81
95
  amount: -100,
82
96
  currency: "EUR"
83
97
  }
84
- }, U = {
98
+ }, N = {
85
99
  name: "Custom Zero Amount",
86
100
  args: {
87
101
  amount: 0,
@@ -91,10 +105,12 @@ const h = {
91
105
  }
92
106
  };
93
107
  export {
94
- U as CustomZeroAmount,
95
- R as Default,
96
- j as InvalidAmount,
97
- T as NegativeAmount,
98
- C as ZeroAmount,
99
- h as default
108
+ N as CustomZeroAmount,
109
+ h as Default,
110
+ _ as InvalidAmount,
111
+ b as NegativeAmount,
112
+ v as ZeroAmount,
113
+ I as ZeroCurrencyAmount,
114
+ U as ZeroCurrencyNoDecimalAmount,
115
+ f as default
100
116
  };
@@ -1,5 +1,5 @@
1
- var e = /* @__PURE__ */ ((r) => (r.TOP = "top", r.BOTTOM = "bottom", r.RIGHT = "right", r.LEFT = "left", r))(e || {}), H = /* @__PURE__ */ ((r) => (r.NA = "N/A", r.HIDDEN = "Hidden", r.DISPLAY_AS_ZERO = "Display as Zero", r.CUSTOM = "Custom", r))(H || {});
1
+ var _ = /* @__PURE__ */ ((r) => (r.TOP = "top", r.BOTTOM = "bottom", r.RIGHT = "right", r.LEFT = "left", r))(_ || {}), e = /* @__PURE__ */ ((r) => (r.NA = "N/A", r.HIDDEN = "Hidden", r.DISPLAY_AS_ZERO = "Display as Zero", r.DISPLAY_AS_ZERO_WITH_CURRENCY = "Display as Zero with Currency", r.DISPLAY_AS_ZERO_WITH_CURRENCY_NO_DECIMAL = "Display as Zero with Currency (No Decimal)", r.CUSTOM = "Custom", r))(e || {});
2
2
  export {
3
- H as EInvalidAmountDisplayOption,
4
- e as EToolTipPosition
3
+ e as EInvalidAmountDisplayOption,
4
+ _ as EToolTipPosition
5
5
  };
@@ -124,7 +124,6 @@ s("useBookingManagement", () => {
124
124
  taxAmount: e.any(Number),
125
125
  extrasAmount: e.any(Number),
126
126
  baseAmount: e.any(Number),
127
- feeAmount: e.any(Number),
128
127
  totalAmount: e.any(Number),
129
128
  currency: e.any(String),
130
129
  status: e.any(String),
@@ -32,5 +32,7 @@ type Story = StoryObj<typeof meta>;
32
32
  export declare const Default: Story;
33
33
  export declare const InvalidAmount: Story;
34
34
  export declare const ZeroAmount: Story;
35
+ export declare const ZeroCurrencyAmount: Story;
36
+ export declare const ZeroCurrencyNoDecimalAmount: Story;
35
37
  export declare const NegativeAmount: Story;
36
38
  export declare const CustomZeroAmount: Story;
@@ -25,5 +25,7 @@ export declare enum EInvalidAmountDisplayOption {
25
25
  NA = "N/A",
26
26
  HIDDEN = "Hidden",
27
27
  DISPLAY_AS_ZERO = "Display as Zero",
28
+ DISPLAY_AS_ZERO_WITH_CURRENCY = "Display as Zero with Currency",
29
+ DISPLAY_AS_ZERO_WITH_CURRENCY_NO_DECIMAL = "Display as Zero with Currency (No Decimal)",
28
30
  CUSTOM = "Custom"
29
31
  }
@@ -1,6 +1,6 @@
1
1
  import { IFlightBookingDetails, IHotelBookingDetails } from './BookingService.types';
2
2
  declare class _BookingService {
3
- getHotelBooking: (bookindId: string) => Promise<IHotelBookingDetails>;
3
+ getHotelBooking: (bookingId: string) => Promise<IHotelBookingDetails>;
4
4
  getFlightBooking: (bookingId: string) => Promise<IFlightBookingDetails>;
5
5
  initiateCancelFlightBooking: (bookingId: string) => Promise<any>;
6
6
  confirmCancelFlightBooking: (bookingId: string) => Promise<any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odynn/awayz-core",
3
- "version": "0.3.20",
3
+ "version": "0.3.22",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"