@billgangcom/theme-lib 1.125.6 → 1.125.8

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.
Files changed (42) hide show
  1. package/dist/{builder-DajwWRB4.cjs → builder-CJIqIhVd.cjs} +2 -2
  2. package/dist/{builder-CQv65ONw.js → builder-SahR2uvC.js} +54 -54
  3. package/dist/builder-components-9lyVKOC8.cjs +5 -0
  4. package/dist/{builder-components-BR6CyOIi.js → builder-components-FRJ5IPFp.js} +1144 -1164
  5. package/dist/builder.cjs.js +1 -1
  6. package/dist/builder.es.js +30 -30
  7. package/dist/{charge-BOfQrkLv.cjs → charge-CjYciF-W.cjs} +1 -1
  8. package/dist/{charge-BIOFTYrp.js → charge-DNmGxN44.js} +6 -6
  9. package/dist/{checkout-g545jGLZ.js → checkout-C3a77bxM.js} +11 -11
  10. package/dist/{checkout-B1l5LksI.cjs → checkout-dVe_lHMH.cjs} +1 -1
  11. package/dist/exports.cjs.js +1 -1
  12. package/dist/exports.es.js +6 -6
  13. package/dist/{index-C3lnL6j6.js → index-9_AAM5a9.js} +5 -5
  14. package/dist/{index-BhSh0O1l.js → index-BNhxhFfd.js} +3 -3
  15. package/dist/{index-WT_hm-vy.cjs → index-CeU7WfNI.cjs} +1 -1
  16. package/dist/{index-B7-PVkQx.cjs → index-Cg-nL9bb.cjs} +1 -1
  17. package/dist/{index-C65UzOoU.cjs → index-CvdNtQ2J.cjs} +1 -1
  18. package/dist/{index-DCaryi7j.cjs → index-D2eKShGK.cjs} +1 -1
  19. package/dist/{index-Cm8S5Gki.js → index-DE_hf9UY.js} +17 -17
  20. package/dist/{index-CidKvUav.js → index-DQmfFZtX.js} +4 -4
  21. package/dist/{index-B1ymclv0.cjs → index-QiP-KCss.cjs} +1 -1
  22. package/dist/{index-r6UXCC-e.js → index-U-r9UAPK.js} +5 -5
  23. package/dist/{index-DXzoPSoa.cjs → index-XFy5q5Lj.cjs} +1 -1
  24. package/dist/{index-DPIhmGN5.js → index-_gbmy2Yz.js} +5 -5
  25. package/dist/index.cjs.js +1 -1
  26. package/dist/index.es.js +12 -12
  27. package/dist/{order-DUfIq98T.cjs → order-AHnWDP-9.cjs} +1 -1
  28. package/dist/{order-CCmQ1de6.js → order-BeKDOSHw.js} +25 -25
  29. package/dist/{subscription-Cr4tlTfV.js → subscription-CSGAuMS7.js} +11 -11
  30. package/dist/{subscription-BU1AfEvj.cjs → subscription-Clc51w6w.cjs} +1 -1
  31. package/dist/{ticket-D-hMXIqO.cjs → ticket-Bhyrlru1.cjs} +4 -4
  32. package/dist/{ticket-UPvqJdN6.js → ticket-jgvezivF.js} +118 -114
  33. package/dist/{top-up-BG4dnsZh.js → top-up-BveecteA.js} +5 -5
  34. package/dist/{top-up-C3qZGkbN.cjs → top-up-i7whmk0h.cjs} +1 -1
  35. package/dist/{ui-components-Bc8Z_6jF.js → ui-components--QcFqSUu.js} +4 -4
  36. package/dist/{ui-components-cdIfqSzy.cjs → ui-components-hiCSs7Xz.cjs} +1 -1
  37. package/dist/ui.cjs.js +1 -1
  38. package/dist/ui.es.js +1 -1
  39. package/dist/{validation-B5t0eZSV.js → validation-4iA1ZXE1.js} +9 -9
  40. package/dist/{validation-CGW91G0m.cjs → validation-COHLGka7.cjs} +1 -1
  41. package/package.json +1 -1
  42. package/dist/builder-components-Cy-VmxAd.cjs +0 -5
@@ -1,12 +1,12 @@
1
1
  import { jsx as t, jsxs as c } from "react/jsx-runtime";
2
- import { N as i, z as m } from "./builder-CQv65ONw.js";
3
- import { a3 as l, a4 as p, a5 as d, M as _ } from "./charge-BIOFTYrp.js";
4
- const x = "_wrapper_x27n6_1", f = "_content_x27n6_10", v = "_title_x27n6_18", h = "_text_x27n6_24", N = "_empty_x27n6_42", r = {
2
+ import { M as i, y as m } from "./builder-SahR2uvC.js";
3
+ import { a3 as l, a4 as p, a5 as d, M as _ } from "./charge-DNmGxN44.js";
4
+ const x = "_wrapper_x27n6_1", f = "_content_x27n6_10", v = "_title_x27n6_18", h = "_text_x27n6_24", y = "_empty_x27n6_42", r = {
5
5
  wrapper: x,
6
6
  content: f,
7
7
  title: v,
8
8
  text: h,
9
- empty: N
9
+ empty: y
10
10
  }, k = () => {
11
11
  const { shopTerms: e } = i(), { isAntistock: s } = m(), a = !!(e != null && e.termsOfService && e.termsOfService.length > 0);
12
12
  return /* @__PURE__ */ t("div", { className: r.wrapper, children: /* @__PURE__ */ c("div", { className: r.content, children: [
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("./ui-components-cdIfqSzy.cjs");require("react");const n=require("./builder-DajwWRB4.cjs");require("./charge-BOfQrkLv.cjs");require("./builder-components-Cy-VmxAd.cjs");require("react-dom");require("./ticket-D-hMXIqO.cjs");const s="_wrapper_ej209_1",c="_content_ej209_12",a="_title_ej209_22",r={wrapper:s,content:c,title:a},l=()=>{const o=n.useNavigate(),t=n.useRouteError();return console.error("ROUTE ERROR: ",t),alert(t),e.jsx("div",{className:r.wrapper,children:e.jsxs("div",{className:r.content,children:[e.jsx("h1",{className:r.title,children:"Something Went Wrong"}),e.jsx(i.Button,{type:"Primary",onClick:()=>{o("/")},children:"Go Home"})]})})};exports.DynamicErrorPage=l;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("./ui-components-hiCSs7Xz.cjs");require("react");const n=require("./builder-CJIqIhVd.cjs");require("./charge-CjYciF-W.cjs");require("./builder-components-9lyVKOC8.cjs");require("react-dom");require("./ticket-Bhyrlru1.cjs");const s="_wrapper_ej209_1",c="_content_ej209_12",a="_title_ej209_22",r={wrapper:s,content:c,title:a},l=()=>{const o=n.useNavigate(),t=n.useRouteError();return console.error("ROUTE ERROR: ",t),alert(t),e.jsx("div",{className:r.wrapper,children:e.jsxs("div",{className:r.content,children:[e.jsx("h1",{className:r.title,children:"Something Went Wrong"}),e.jsx(i.Button,{type:"Primary",onClick:()=>{o("/")},children:"Go Home"})]})})};exports.DynamicErrorPage=l;
@@ -1,11 +1,11 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import "./builder-CQv65ONw.js";
2
+ import "./builder-SahR2uvC.js";
3
3
  import e from "react";
4
- import { e as r } from "./ui-components-Bc8Z_6jF.js";
5
- import "./charge-BIOFTYrp.js";
6
- import "./builder-components-BR6CyOIi.js";
4
+ import { e as r } from "./ui-components--QcFqSUu.js";
5
+ import "./charge-DNmGxN44.js";
6
+ import "./builder-components-FRJ5IPFp.js";
7
7
  import "react-dom";
8
- import "./ticket-UPvqJdN6.js";
8
+ import "./ticket-jgvezivF.js";
9
9
  const f = () => (e.useEffect(() => {
10
10
  setTimeout(() => {
11
11
  window.location.reload();
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),e=require("./builder-DajwWRB4.cjs"),o=require("react"),l=r=>{const{children:i}=r,{pathname:a}=e.useLocation(),{setActiveBlock:t}=e.useNavbarStore(),{setActiveBlock:s}=e.useThemeSettingsStore(),{setActiveBlock:n}=e.usePreviewStore();return o.useEffect(()=>{switch(n({id:null,neededScroll:!1}),a){case"/admin/builder":t(e.navbarBlocks[0]);break;case"/admin/builder/add":t(e.navbarBlocks[1]);break;case"/admin/builder/theme":t(e.navbarBlocks[2]);break;case"/admin/builder/settings":t(e.navbarBlocks[3]);break;case"/admin/builder/theme/colors":t(e.navbarBlocks[2]),s(e.themeSettingsBlocks[0]);break;case"/admin/builder/theme/fonts":t(e.navbarBlocks[2]),s(e.themeSettingsBlocks[1]);break;case"/admin/builder/theme/borders":t(e.navbarBlocks[2]),s(e.themeSettingsBlocks[2]);break;case"/admin/builder/theme/buttons":t(e.navbarBlocks[2]),s(e.themeSettingsBlocks[3]);break;case"/admin/builder/theme/inputs":t(e.navbarBlocks[2]),s(e.themeSettingsBlocks[4]);break}},[a]),c.jsx(c.Fragment,{children:i})};exports.ActivePage=l;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),e=require("./builder-CJIqIhVd.cjs"),o=require("react"),l=r=>{const{children:i}=r,{pathname:a}=e.useLocation(),{setActiveBlock:t}=e.useNavbarStore(),{setActiveBlock:s}=e.useThemeSettingsStore(),{setActiveBlock:n}=e.usePreviewStore();return o.useEffect(()=>{switch(n({id:null,neededScroll:!1}),a){case"/admin/builder":t(e.navbarBlocks[0]);break;case"/admin/builder/add":t(e.navbarBlocks[1]);break;case"/admin/builder/theme":t(e.navbarBlocks[2]);break;case"/admin/builder/settings":t(e.navbarBlocks[3]);break;case"/admin/builder/theme/colors":t(e.navbarBlocks[2]),s(e.themeSettingsBlocks[0]);break;case"/admin/builder/theme/fonts":t(e.navbarBlocks[2]),s(e.themeSettingsBlocks[1]);break;case"/admin/builder/theme/borders":t(e.navbarBlocks[2]),s(e.themeSettingsBlocks[2]);break;case"/admin/builder/theme/buttons":t(e.navbarBlocks[2]),s(e.themeSettingsBlocks[3]);break;case"/admin/builder/theme/inputs":t(e.navbarBlocks[2]),s(e.themeSettingsBlocks[4]);break}},[a]),c.jsx(c.Fragment,{children:i})};exports.ActivePage=l;
@@ -1,11 +1,11 @@
1
1
  import { jsx as t, jsxs as n } from "react/jsx-runtime";
2
- import { g as i } from "./ui-components-Bc8Z_6jF.js";
2
+ import { g as i } from "./ui-components--QcFqSUu.js";
3
3
  import "react";
4
- import { p as s, an as a } from "./builder-CQv65ONw.js";
5
- import "./charge-BIOFTYrp.js";
6
- import "./builder-components-BR6CyOIi.js";
4
+ import { p as s, an as a } from "./builder-SahR2uvC.js";
5
+ import "./charge-DNmGxN44.js";
6
+ import "./builder-components-FRJ5IPFp.js";
7
7
  import "react-dom";
8
- import "./ticket-UPvqJdN6.js";
8
+ import "./ticket-jgvezivF.js";
9
9
  const c = "_wrapper_ej209_1", p = "_content_ej209_12", m = "_title_ej209_22", r = {
10
10
  wrapper: c,
11
11
  content: p,
package/dist/index.cjs.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./builder.cjs.js"),c=require("./builder-DajwWRB4.cjs"),u=require("react/jsx-runtime"),d=require("react"),e=require("./ui-components-cdIfqSzy.cjs"),r=require("./charge-BOfQrkLv.cjs");require("./builder-components-Cy-VmxAd.cjs");require("react-dom");const t=require("./ticket-D-hMXIqO.cjs");function I(o){d.useEffect(()=>{Object.entries(o).forEach(([s,i])=>{e.registerIcon(s,i)})},[o])}function f(o){Object.entries(o).forEach(([s,i])=>{e.registerIcon(s,i)})}function l(o){return o.endsWith("Icon")?o.slice(0,-4):o}function g(o,s=20,i=!0){return o.map(n=>({value:i?l(n):n,addon:u.jsx(e.Icon,{name:n,width:s,height:s,showPlaceholder:!0})}))}exports.App=a.App;exports.AntistockRoutes=c.AntistockRoutes;exports.Routes=c.Routes;exports.formatPrice=c.formatPrice;exports.Icon=e.Icon;exports.addIconSuffix=e.addIconSuffix;exports.getRegisteredIcon=e.getRegisteredIcon;exports.getRegisteredIcons=e.getRegisteredIcons;exports.isIconRegistered=e.isIconRegistered;exports.loadIcon=e.loadIcon;exports.registerIcon=e.registerIcon;exports.stripIconSuffix=e.stripIconSuffix;exports.useDynamicIconRegistration=e.useDynamicIconRegistration;exports.MarkdownText=r.MarkdownText;exports.ReCaptchaProvider=r.ReCaptchaProvider;exports.parseDraftJsText=r.parseDraftJsText;exports.useCart=r.useCart;exports.useGeneralInfo=r.useGeneralInfo;exports.useMarkdownIt=r.useMarkdownIt;exports.useReCaptcha=r.useReCaptcha;exports.ColorVariables=t.ColorVariables;exports.aspectRatioOptions=t.aspectRatioOptions;exports.hotReload=t.hotReload;exports.iconNames=t.iconNames;exports.removeNotification=t.removeNotification;exports.showNotification=t.showNotification;exports.splitTextIntoSpans=t.splitTextIntoSpans;exports.useAdaptiveStyles=t.useAdaptiveStyles;exports.useBalance=t.useBalance;exports.useBuilderPages=t.useBuilderPages;exports.useCreateTicket=t.useCreateTicket;exports.createIconLeftAddons=g;exports.registerIcons=f;exports.useIconRegistration=I;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./builder.cjs.js"),c=require("./builder-CJIqIhVd.cjs"),u=require("react/jsx-runtime"),d=require("react"),e=require("./ui-components-hiCSs7Xz.cjs"),r=require("./charge-CjYciF-W.cjs");require("./builder-components-9lyVKOC8.cjs");require("react-dom");const t=require("./ticket-Bhyrlru1.cjs");function I(o){d.useEffect(()=>{Object.entries(o).forEach(([s,i])=>{e.registerIcon(s,i)})},[o])}function f(o){Object.entries(o).forEach(([s,i])=>{e.registerIcon(s,i)})}function l(o){return o.endsWith("Icon")?o.slice(0,-4):o}function g(o,s=20,i=!0){return o.map(n=>({value:i?l(n):n,addon:u.jsx(e.Icon,{name:n,width:s,height:s,showPlaceholder:!0})}))}exports.App=a.App;exports.AntistockRoutes=c.AntistockRoutes;exports.Routes=c.Routes;exports.formatPrice=c.formatPrice;exports.Icon=e.Icon;exports.addIconSuffix=e.addIconSuffix;exports.getRegisteredIcon=e.getRegisteredIcon;exports.getRegisteredIcons=e.getRegisteredIcons;exports.isIconRegistered=e.isIconRegistered;exports.loadIcon=e.loadIcon;exports.registerIcon=e.registerIcon;exports.stripIconSuffix=e.stripIconSuffix;exports.useDynamicIconRegistration=e.useDynamicIconRegistration;exports.MarkdownText=r.MarkdownText;exports.ReCaptchaProvider=r.ReCaptchaProvider;exports.parseDraftJsText=r.parseDraftJsText;exports.useCart=r.useCart;exports.useGeneralInfo=r.useGeneralInfo;exports.useMarkdownIt=r.useMarkdownIt;exports.useReCaptcha=r.useReCaptcha;exports.ColorVariables=t.ColorVariables;exports.aspectRatioOptions=t.aspectRatioOptions;exports.hotReload=t.hotReload;exports.iconNames=t.iconNames;exports.removeNotification=t.removeNotification;exports.showNotification=t.showNotification;exports.splitTextIntoSpans=t.splitTextIntoSpans;exports.useAdaptiveStyles=t.useAdaptiveStyles;exports.useBalance=t.useBalance;exports.useBuilderPages=t.useBuilderPages;exports.useCreateTicket=t.useCreateTicket;exports.createIconLeftAddons=g;exports.registerIcons=f;exports.useIconRegistration=I;
package/dist/index.es.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import { App as R } from "./builder.es.js";
2
- import { U as v, V as w, W as b } from "./builder-CQv65ONw.js";
2
+ import { Q as v, U as w, V as b } from "./builder-SahR2uvC.js";
3
3
  import { jsx as r } from "react/jsx-runtime";
4
4
  import { useEffect as i } from "react";
5
- import { r as o, I as n } from "./ui-components-Bc8Z_6jF.js";
6
- import { v as A, o as P, q as S, p as T, s as j, t as E, n as M } from "./ui-components-Bc8Z_6jF.js";
7
- import { M as y, G as B, J as D, u as G, I as J, K as V, H as W } from "./charge-BIOFTYrp.js";
8
- import "./builder-components-BR6CyOIi.js";
5
+ import { r as o, I as n } from "./ui-components--QcFqSUu.js";
6
+ import { v as A, o as P, q as S, p as T, s as j, t as E, n as M } from "./ui-components--QcFqSUu.js";
7
+ import { M as y, G as B, J as D, u as G, I as J, K as V, H as q } from "./charge-DNmGxN44.js";
8
+ import "./builder-components-FRJ5IPFp.js";
9
9
  import "react-dom";
10
- import { C as H, c as K, h as L, i as U, r as F, d as Q, s as X, u as Y, e as Z, b as _, a as $ } from "./ticket-UPvqJdN6.js";
10
+ import { C as K, c as L, h as Q, i as U, r as W, d as F, s as X, u as Y, e as Z, b as _, a as $ } from "./ticket-jgvezivF.js";
11
11
  function m(e) {
12
12
  i(() => {
13
13
  Object.entries(e).forEach(([s, t]) => {
@@ -40,26 +40,26 @@ function l(e, s = 20, t = !0) {
40
40
  export {
41
41
  v as AntistockRoutes,
42
42
  R as App,
43
- H as ColorVariables,
43
+ K as ColorVariables,
44
44
  n as Icon,
45
45
  y as MarkdownText,
46
46
  B as ReCaptchaProvider,
47
47
  w as Routes,
48
48
  A as addIconSuffix,
49
- K as aspectRatioOptions,
49
+ L as aspectRatioOptions,
50
50
  l as createIconLeftAddons,
51
51
  b as formatPrice,
52
52
  P as getRegisteredIcon,
53
53
  S as getRegisteredIcons,
54
- L as hotReload,
54
+ Q as hotReload,
55
55
  U as iconNames,
56
56
  T as isIconRegistered,
57
57
  j as loadIcon,
58
58
  D as parseDraftJsText,
59
59
  o as registerIcon,
60
60
  h as registerIcons,
61
- F as removeNotification,
62
- Q as showNotification,
61
+ W as removeNotification,
62
+ F as showNotification,
63
63
  X as splitTextIntoSpans,
64
64
  E as stripIconSuffix,
65
65
  Y as useAdaptiveStyles,
@@ -71,5 +71,5 @@ export {
71
71
  J as useGeneralInfo,
72
72
  m as useIconRegistration,
73
73
  V as useMarkdownIt,
74
- W as useReCaptcha
74
+ q as useReCaptcha
75
75
  };
@@ -1 +1 @@
1
- "use strict";const t=require("react/jsx-runtime"),r=require("react"),O=require("./builder-DajwWRB4.cjs"),s=require("./charge-BOfQrkLv.cjs"),C=require("./ui-components-cdIfqSzy.cjs");require("./builder-components-Cy-VmxAd.cjs");require("react-dom");require("./ticket-D-hMXIqO.cjs");const K=async(n=1)=>await s.fetchOrders({PageNumber:n}),Q=()=>{const[n,l]=r.useState(null),[d,e]=r.useState(null),[p,g]=r.useState(0),{page:m}=O.usePaginationPagesStore(),[f,_]=r.useState(!0);async function j(){_(!0);const{list:S,totalCount:u}=await K(m);l(S),g(u),e(null),_(!1)}async function y(){const S=(n==null?void 0:n.map(c=>c.gatewayName))||[],u=await s.getGatewaysDetail(S);e(u)}return r.useEffect(()=>{!d&&n&&y()},[n,d]),r.useEffect(()=>{j()},[m]),t.jsx(t.Fragment,{children:n!=null&&n.length&&n.length===0?t.jsx(s.NoItemsBlock,{title:"No Orders",description:"When you purchase products from our website, you'll see a history of orders here."}):t.jsxs(t.Fragment,{children:[t.jsx(s.PageTitle,{title:"Orders"}),t.jsx(s.OrdersTable,{orders:n,gatewaysDetail:d,totalCount:p,isLoading:f})]})})},X="_orderPage_gc87l_1",Y="_leftSection_gc87l_15",Z="_content_gc87l_35",ee="_main_gc87l_42",te="_mainAntistock_gc87l_56",se="_orderMainDataAntistock_gc87l_69",ne="_timelineBlockAntistock_gc87l_81",ae="_footerAntistock_gc87l_92",oe="_statusBlock_gc87l_104",ie="_timelineBlock_gc87l_81",ce="_footer_gc87l_92",re="_rightSection_gc87l_121",le="_header_gc87l_142",ue="_productList_gc87l_150",de="_mobileFooter_gc87l_157",me="_loaderContainer_gc87l_166",he="_orderMainData_gc87l_69",ge="_prices_gc87l_181",fe="_headerTitle_gc87l_185",pe="_headerDescription_gc87l_189",i={orderPage:X,leftSection:Y,content:Z,main:ee,mainAntistock:te,orderMainDataAntistock:se,timelineBlockAntistock:ne,footerAntistock:ae,statusBlock:oe,timelineBlock:ie,footer:ce,rightSection:re,header:le,productList:ue,mobileFooter:de,loaderContainer:me,orderMainData:he,prices:ge,headerTitle:fe,headerDescription:pe},_e=n=>{if(!n)return null;const l=n.split(":");if(l.length!==3)return null;const[d,e,p]=l,g=Number(d),m=Number(e),f=Number(p);return Number.isNaN(g)||Number.isNaN(m)||Number.isNaN(f)?null:((g*60+m)*60+f)*1e3},ye=()=>{var A,R,M,T,F,E,I,V,B;const{id:n,accessToken:l}=O.useParams(),d=O.useNavigate(),[e,p]=r.useState(),[g,m]=r.useState(!1),[f,_]=r.useState(!1),[j,y]=r.useState(!1),S=s.useCopy(),{isAntistock:u,general:c}=O.useGeneralStore(),G=((A=e==null?void 0:e.rawPrice)==null?void 0:A.currency)||"USD",U=new Intl.NumberFormat("en-US",{style:"currency",currency:G}),D=r.useMemo(()=>{var h;const a=_e((e==null?void 0:e.estimatedProcessingTime)??null),N=(h=e==null?void 0:e.timeline)==null?void 0:h[s.OrderStatus.Processing],P=(e==null?void 0:e.status)===s.OrderStatus.Processing&&N&&a?{processingStartTime:new Date(N),expectedProcessingMs:a,processingExpiresAt:e!=null&&e.processingExpiresAt?new Date(e.processingExpiresAt):void 0}:null;return(e==null?void 0:e.partOrders.map(o=>{var x,$,q;return{id:Number((x=o.productWithVariant)==null?void 0:x.id)||0,partOrderId:Number(o==null?void 0:o.id)||0,image:o.productWithVariant.image,name:(()=>{var L,W;const v=((L=o.productWithVariant)==null?void 0:L.name)||"",k=((W=o.productWithVariant)==null?void 0:W.variantName)||"";return!v&&!k?"":!k||v===k?v:v?`${v} (${k})`:k})(),description:"",price:{quantity:o.quantity,amount:(($=o.productWithVariant)==null?void 0:$.price.amount)||0,currency:(q=o.productWithVariant)==null?void 0:q.price.currency},deliveryCategories:"deliveryCategories"in o?o.deliveryCategories:void 0,customerNote:o.customerNote,chargeType:o.chargeType||"ONE_TIME",replacementRequests:"replacementRequests"in o?o.replacementRequests:void 0,allowedReplacementReasons:"allowedReplacementReasons"in o?o.allowedReplacementReasons:void 0,processingInfo:P}}))||[]},[e]);r.useEffect(()=>{e&&(e.status===s.OrderStatus.FullDeliveryFailure||e.status===s.OrderStatus.PartiallyDelivered)&&e.refundedPrice&&e.refundedPrice.amount>0&&_(!0)},[e==null?void 0:e.status]);const w=r.useCallback(async(a,N,P=!1)=>{var o,x;P||m(!0);const{data:h}=await(N?s.fetchAuthorizedOrder(`${a}/${N}`):s.fetchOrder(a));m(!1),h.status!==s.OrderStatus.Completed&&((o=h.charge)==null?void 0:o.status)===s.ChargeStatus.NotPaid&&d(`/charges/${(x=h.charge)==null?void 0:x.id}`,{replace:!0}),p(h)},[d]);r.useLayoutEffect(()=>{if(n&&!l){const a=JSON.parse(localStorage.getItem("orders")||"{}");a[n]&&d(`/orders/${n}/${a[n].fullAccessToken}`)}},[n,l,d]),r.useEffect(()=>{n&&w(n,l,!0);const a=setInterval(()=>{n&&w(n,l,!0)},5e3);return()=>{clearInterval(a)}},[n,l,w]);const z=r.useMemo(()=>!!(e!=null&&e.isApplicableForReplacement&&(e.status===s.OrderStatus.Completed||e.status===s.OrderStatus.PartiallyDelivered||e.status===s.OrderStatus.FullDeliveryFailure)),[e]),b=r.useMemo(()=>{var a;return!!((a=c==null?void 0:c.info)!=null&&a.isVouchesEnabled&&l&&((e==null?void 0:e.status)===s.OrderStatus.Completed||(e==null?void 0:e.status)===s.OrderStatus.FullDeliveryFailure||(e==null?void 0:e.status)===s.OrderStatus.PartiallyDelivered))},[(R=c==null?void 0:c.info)==null?void 0:R.isVouchesEnabled,l]),H=r.useMemo(()=>{var a;return!!(!((a=c==null?void 0:c.info)!=null&&a.isVouchesEnabled)&&(e!=null&&e.review)&&"accessToken"in e.review&&!u)},[(M=c==null?void 0:c.info)==null?void 0:M.isVouchesEnabled,e==null?void 0:e.review,u]),J=r.useMemo(()=>{var a;return((a=c==null?void 0:c.info)==null?void 0:a.domain)||window.location.hostname},[(T=c==null?void 0:c.info)==null?void 0:T.domain]);return g?t.jsx("div",{className:i.loaderContainer,children:t.jsx(C.Loader,{})}):(console.log("ORDER PAGE"),console.log(e),t.jsxs("div",{className:i.orderPage,children:[t.jsx("div",{className:i.leftSection,children:t.jsxs("div",{className:i.content,children:[t.jsx(s.CheckoutHeader,{}),e&&t.jsxs("div",{className:`${i.main} ${u?i.mainAntistock:""}`,children:[t.jsx(s.OrderStatusBlock,{className:i.statusBlock,orderStatus:e.status}),t.jsxs("div",{className:`${i.orderMainData} ${u?i.orderMainDataAntistock:""}`,children:[b&&t.jsx(s.VouchCard,{onAddMessage:()=>y(!0),isVouchLeft:e.isVouchLeft}),t.jsx(s.CheckoutOrderMainData,{lastUpdate:e.createdAt,paymentType:(F=e.charge)==null?void 0:F.gateway,email:e.customer?e.customer.email:((E=e.charge)==null?void 0:E.customerForCharge.email)||"",orderId:e.id}),H&&e.review&&t.jsx(s.LeaveAReview,{orderId:e.id,review:e.review})]}),e.charge&&e.charge.timeline&&t.jsx(s.TrackPayment,{className:`${i.timelineBlock} ${u?i.timelineBlockAntistock:""}`,timeline:e.charge.timeline}),t.jsx(s.CheckoutFooter,{className:`${i.footer} ${u?i.footerAntistock:""}`})]})]})}),t.jsx("div",{className:i.rightSection,style:u?{borderLeft:"1px solid var(--border-secondary)"}:void 0,children:t.jsxs("div",{className:i.content,children:[((I=e==null?void 0:e.charge)==null?void 0:I.name)&&t.jsxs("header",{className:i.header,children:[t.jsxs("div",{children:[t.jsx("h1",{className:i.headerTitle,children:e.charge.name}),e.charge.description&&t.jsx("p",{className:i.headerDescription,children:e.charge.description})]}),u?null:t.jsxs(C.Button,{type:"Secondary",onClick:()=>S((e==null?void 0:e.id)||""),style:{whiteSpace:"nowrap",display:"flex",alignItems:"center",gap:"4px"},children:[t.jsx(C.Icon,{name:"Copy"}),t.jsx("span",{children:"Copy ID"})]})]}),t.jsxs("div",{children:[t.jsx("div",{className:i.productList,children:D.map(a=>t.jsx(s.CheckoutProduct,{product:a,isOrder:!0,isApplicableForReplacement:z,orderId:n,accessToken:l,allowedReplacementReasons:e==null?void 0:e.allowedReplacementReasons},a.id))}),u?null:t.jsx(s.CheckoutPrices,{formatter:U,coupon:null,total:((V=e==null?void 0:e.endPrice)==null?void 0:V.amount)||0,discount:0,totalWithDiscount:((B=e==null?void 0:e.endPrice)==null?void 0:B.amount)||0,className:i.prices,isShowSubtotal:!1}),t.jsx(s.CheckoutFooter,{className:i.mobileFooter})]})]})}),(e==null?void 0:e.refundedPrice)&&t.jsx(s.RefundNotificationModal,{isOpen:f,onClose:()=>_(!1),refundedAmount:e.refundedPrice.amount,currency:e.refundedPrice.currency}),b&&t.jsx(s.VouchModal,{isOpen:j,onClose:()=>y(!1),products:D,orderId:n,accessToken:l,shopDomain:J,onSuccess:()=>{y(!1),n&&w(n,l,!0)}})]}))},Se=Object.freeze(Object.defineProperty({__proto__:null,OrderPage:ye},Symbol.toStringTag,{value:"Module"}));exports.Orders=Q;exports.index=Se;
1
+ "use strict";const t=require("react/jsx-runtime"),r=require("react"),O=require("./builder-CJIqIhVd.cjs"),s=require("./charge-CjYciF-W.cjs"),C=require("./ui-components-hiCSs7Xz.cjs");require("./builder-components-9lyVKOC8.cjs");require("react-dom");require("./ticket-Bhyrlru1.cjs");const K=async(n=1)=>await s.fetchOrders({PageNumber:n}),Q=()=>{const[n,l]=r.useState(null),[d,e]=r.useState(null),[p,g]=r.useState(0),{page:m}=O.usePaginationPagesStore(),[f,_]=r.useState(!0);async function j(){_(!0);const{list:S,totalCount:u}=await K(m);l(S),g(u),e(null),_(!1)}async function y(){const S=(n==null?void 0:n.map(c=>c.gatewayName))||[],u=await s.getGatewaysDetail(S);e(u)}return r.useEffect(()=>{!d&&n&&y()},[n,d]),r.useEffect(()=>{j()},[m]),t.jsx(t.Fragment,{children:n!=null&&n.length&&n.length===0?t.jsx(s.NoItemsBlock,{title:"No Orders",description:"When you purchase products from our website, you'll see a history of orders here."}):t.jsxs(t.Fragment,{children:[t.jsx(s.PageTitle,{title:"Orders"}),t.jsx(s.OrdersTable,{orders:n,gatewaysDetail:d,totalCount:p,isLoading:f})]})})},X="_orderPage_gc87l_1",Y="_leftSection_gc87l_15",Z="_content_gc87l_35",ee="_main_gc87l_42",te="_mainAntistock_gc87l_56",se="_orderMainDataAntistock_gc87l_69",ne="_timelineBlockAntistock_gc87l_81",ae="_footerAntistock_gc87l_92",oe="_statusBlock_gc87l_104",ie="_timelineBlock_gc87l_81",ce="_footer_gc87l_92",re="_rightSection_gc87l_121",le="_header_gc87l_142",ue="_productList_gc87l_150",de="_mobileFooter_gc87l_157",me="_loaderContainer_gc87l_166",he="_orderMainData_gc87l_69",ge="_prices_gc87l_181",fe="_headerTitle_gc87l_185",pe="_headerDescription_gc87l_189",i={orderPage:X,leftSection:Y,content:Z,main:ee,mainAntistock:te,orderMainDataAntistock:se,timelineBlockAntistock:ne,footerAntistock:ae,statusBlock:oe,timelineBlock:ie,footer:ce,rightSection:re,header:le,productList:ue,mobileFooter:de,loaderContainer:me,orderMainData:he,prices:ge,headerTitle:fe,headerDescription:pe},_e=n=>{if(!n)return null;const l=n.split(":");if(l.length!==3)return null;const[d,e,p]=l,g=Number(d),m=Number(e),f=Number(p);return Number.isNaN(g)||Number.isNaN(m)||Number.isNaN(f)?null:((g*60+m)*60+f)*1e3},ye=()=>{var A,R,M,T,F,E,I,V,B;const{id:n,accessToken:l}=O.useParams(),d=O.useNavigate(),[e,p]=r.useState(),[g,m]=r.useState(!1),[f,_]=r.useState(!1),[j,y]=r.useState(!1),S=s.useCopy(),{isAntistock:u,general:c}=O.useGeneralStore(),G=((A=e==null?void 0:e.rawPrice)==null?void 0:A.currency)||"USD",U=new Intl.NumberFormat("en-US",{style:"currency",currency:G}),D=r.useMemo(()=>{var h;const a=_e((e==null?void 0:e.estimatedProcessingTime)??null),N=(h=e==null?void 0:e.timeline)==null?void 0:h[s.OrderStatus.Processing],P=(e==null?void 0:e.status)===s.OrderStatus.Processing&&N&&a?{processingStartTime:new Date(N),expectedProcessingMs:a,processingExpiresAt:e!=null&&e.processingExpiresAt?new Date(e.processingExpiresAt):void 0}:null;return(e==null?void 0:e.partOrders.map(o=>{var x,$,q;return{id:Number((x=o.productWithVariant)==null?void 0:x.id)||0,partOrderId:Number(o==null?void 0:o.id)||0,image:o.productWithVariant.image,name:(()=>{var L,W;const v=((L=o.productWithVariant)==null?void 0:L.name)||"",k=((W=o.productWithVariant)==null?void 0:W.variantName)||"";return!v&&!k?"":!k||v===k?v:v?`${v} (${k})`:k})(),description:"",price:{quantity:o.quantity,amount:(($=o.productWithVariant)==null?void 0:$.price.amount)||0,currency:(q=o.productWithVariant)==null?void 0:q.price.currency},deliveryCategories:"deliveryCategories"in o?o.deliveryCategories:void 0,customerNote:o.customerNote,chargeType:o.chargeType||"ONE_TIME",replacementRequests:"replacementRequests"in o?o.replacementRequests:void 0,allowedReplacementReasons:"allowedReplacementReasons"in o?o.allowedReplacementReasons:void 0,processingInfo:P}}))||[]},[e]);r.useEffect(()=>{e&&(e.status===s.OrderStatus.FullDeliveryFailure||e.status===s.OrderStatus.PartiallyDelivered)&&e.refundedPrice&&e.refundedPrice.amount>0&&_(!0)},[e==null?void 0:e.status]);const w=r.useCallback(async(a,N,P=!1)=>{var o,x;P||m(!0);const{data:h}=await(N?s.fetchAuthorizedOrder(`${a}/${N}`):s.fetchOrder(a));m(!1),h.status!==s.OrderStatus.Completed&&((o=h.charge)==null?void 0:o.status)===s.ChargeStatus.NotPaid&&d(`/charges/${(x=h.charge)==null?void 0:x.id}`,{replace:!0}),p(h)},[d]);r.useLayoutEffect(()=>{if(n&&!l){const a=JSON.parse(localStorage.getItem("orders")||"{}");a[n]&&d(`/orders/${n}/${a[n].fullAccessToken}`)}},[n,l,d]),r.useEffect(()=>{n&&w(n,l,!0);const a=setInterval(()=>{n&&w(n,l,!0)},5e3);return()=>{clearInterval(a)}},[n,l,w]);const z=r.useMemo(()=>!!(e!=null&&e.isApplicableForReplacement&&(e.status===s.OrderStatus.Completed||e.status===s.OrderStatus.PartiallyDelivered||e.status===s.OrderStatus.FullDeliveryFailure)),[e]),b=r.useMemo(()=>{var a;return!!((a=c==null?void 0:c.info)!=null&&a.isVouchesEnabled&&l&&((e==null?void 0:e.status)===s.OrderStatus.Completed||(e==null?void 0:e.status)===s.OrderStatus.FullDeliveryFailure||(e==null?void 0:e.status)===s.OrderStatus.PartiallyDelivered))},[(R=c==null?void 0:c.info)==null?void 0:R.isVouchesEnabled,l]),H=r.useMemo(()=>{var a;return!!(!((a=c==null?void 0:c.info)!=null&&a.isVouchesEnabled)&&(e!=null&&e.review)&&"accessToken"in e.review&&!u)},[(M=c==null?void 0:c.info)==null?void 0:M.isVouchesEnabled,e==null?void 0:e.review,u]),J=r.useMemo(()=>{var a;return((a=c==null?void 0:c.info)==null?void 0:a.domain)||window.location.hostname},[(T=c==null?void 0:c.info)==null?void 0:T.domain]);return g?t.jsx("div",{className:i.loaderContainer,children:t.jsx(C.Loader,{})}):(console.log("ORDER PAGE"),console.log(e),t.jsxs("div",{className:i.orderPage,children:[t.jsx("div",{className:i.leftSection,children:t.jsxs("div",{className:i.content,children:[t.jsx(s.CheckoutHeader,{}),e&&t.jsxs("div",{className:`${i.main} ${u?i.mainAntistock:""}`,children:[t.jsx(s.OrderStatusBlock,{className:i.statusBlock,orderStatus:e.status}),t.jsxs("div",{className:`${i.orderMainData} ${u?i.orderMainDataAntistock:""}`,children:[b&&t.jsx(s.VouchCard,{onAddMessage:()=>y(!0),isVouchLeft:e.isVouchLeft}),t.jsx(s.CheckoutOrderMainData,{lastUpdate:e.createdAt,paymentType:(F=e.charge)==null?void 0:F.gateway,email:e.customer?e.customer.email:((E=e.charge)==null?void 0:E.customerForCharge.email)||"",orderId:e.id}),H&&e.review&&t.jsx(s.LeaveAReview,{orderId:e.id,review:e.review})]}),e.charge&&e.charge.timeline&&t.jsx(s.TrackPayment,{className:`${i.timelineBlock} ${u?i.timelineBlockAntistock:""}`,timeline:e.charge.timeline}),t.jsx(s.CheckoutFooter,{className:`${i.footer} ${u?i.footerAntistock:""}`})]})]})}),t.jsx("div",{className:i.rightSection,style:u?{borderLeft:"1px solid var(--border-secondary)"}:void 0,children:t.jsxs("div",{className:i.content,children:[((I=e==null?void 0:e.charge)==null?void 0:I.name)&&t.jsxs("header",{className:i.header,children:[t.jsxs("div",{children:[t.jsx("h1",{className:i.headerTitle,children:e.charge.name}),e.charge.description&&t.jsx("p",{className:i.headerDescription,children:e.charge.description})]}),u?null:t.jsxs(C.Button,{type:"Secondary",onClick:()=>S((e==null?void 0:e.id)||""),style:{whiteSpace:"nowrap",display:"flex",alignItems:"center",gap:"4px"},children:[t.jsx(C.Icon,{name:"Copy"}),t.jsx("span",{children:"Copy ID"})]})]}),t.jsxs("div",{children:[t.jsx("div",{className:i.productList,children:D.map(a=>t.jsx(s.CheckoutProduct,{product:a,isOrder:!0,isApplicableForReplacement:z,orderId:n,accessToken:l,allowedReplacementReasons:e==null?void 0:e.allowedReplacementReasons},a.id))}),u?null:t.jsx(s.CheckoutPrices,{formatter:U,coupon:null,total:((V=e==null?void 0:e.endPrice)==null?void 0:V.amount)||0,discount:0,totalWithDiscount:((B=e==null?void 0:e.endPrice)==null?void 0:B.amount)||0,className:i.prices,isShowSubtotal:!1}),t.jsx(s.CheckoutFooter,{className:i.mobileFooter})]})]})}),(e==null?void 0:e.refundedPrice)&&t.jsx(s.RefundNotificationModal,{isOpen:f,onClose:()=>_(!1),refundedAmount:e.refundedPrice.amount,currency:e.refundedPrice.currency}),b&&t.jsx(s.VouchModal,{isOpen:j,onClose:()=>y(!1),products:D,orderId:n,accessToken:l,shopDomain:J,onSuccess:()=>{y(!1),n&&w(n,l,!0)}})]}))},Se=Object.freeze(Object.defineProperty({__proto__:null,OrderPage:ye},Symbol.toStringTag,{value:"Module"}));exports.Orders=Q;exports.index=Se;
@@ -1,14 +1,14 @@
1
1
  import { jsx as s, Fragment as G, jsxs as m } from "react/jsx-runtime";
2
- import r, { useState as X, useMemo as b } from "react";
3
- import { Q as Y, a8 as Z, p as ee, z as te } from "./builder-CQv65ONw.js";
4
- import { f as se, N as ae, P as oe, O as ne, g as ie, b as ce, c as u, d as re, e as le, h as ue, i as de, j as me, V as he, k as fe, L as pe, T as ge, l as z, m as _e, n as ye, R as Ne, o as ve } from "./charge-BIOFTYrp.js";
5
- import { e as ke, g as Se, I as we } from "./ui-components-Bc8Z_6jF.js";
6
- import "./builder-components-BR6CyOIi.js";
2
+ import r, { useState as X, useMemo as O } from "react";
3
+ import { O as Y, a7 as Z, p as ee, y as te } from "./builder-SahR2uvC.js";
4
+ import { f as se, N as ae, P as oe, O as ne, g as ie, b as ce, c as u, d as re, e as le, h as ue, i as de, j as me, V as he, k as fe, L as pe, T as ge, l as U, m as _e, n as ye, R as Ne, o as ve } from "./charge-DNmGxN44.js";
5
+ import { e as ke, g as Se, I as we } from "./ui-components--QcFqSUu.js";
6
+ import "./builder-components-FRJ5IPFp.js";
7
7
  import "react-dom";
8
- import "./ticket-UPvqJdN6.js";
8
+ import "./ticket-jgvezivF.js";
9
9
  const Pe = async (t = 1) => await se({ PageNumber: t }), tt = () => {
10
10
  const [t, c] = r.useState(null), [d, e] = X(null), [_, p] = r.useState(0), { page: h } = Y(), [g, y] = r.useState(!0);
11
- async function O() {
11
+ async function b() {
12
12
  y(!0);
13
13
  const { list: v, totalCount: l } = await Pe(h);
14
14
  c(v), p(l), e(null), y(!1);
@@ -20,7 +20,7 @@ const Pe = async (t = 1) => await se({ PageNumber: t }), tt = () => {
20
20
  return r.useEffect(() => {
21
21
  !d && t && N();
22
22
  }, [t, d]), r.useEffect(() => {
23
- O();
23
+ b();
24
24
  }, [h]), /* @__PURE__ */ s(G, { children: t != null && t.length && t.length === 0 ? /* @__PURE__ */ s(
25
25
  ae,
26
26
  {
@@ -39,10 +39,10 @@ const Pe = async (t = 1) => await se({ PageNumber: t }), tt = () => {
39
39
  }
40
40
  )
41
41
  ] }) });
42
- }, De = "_orderPage_gc87l_1", be = "_leftSection_gc87l_15", Oe = "_content_gc87l_35", Ae = "_main_gc87l_42", Ce = "_mainAntistock_gc87l_56", Re = "_orderMainDataAntistock_gc87l_69", Me = "_timelineBlockAntistock_gc87l_81", Te = "_footerAntistock_gc87l_92", Ie = "_statusBlock_gc87l_104", Ve = "_timelineBlock_gc87l_81", Ee = "_footer_gc87l_92", Be = "_rightSection_gc87l_121", Fe = "_header_gc87l_142", Le = "_productList_gc87l_150", $e = "_mobileFooter_gc87l_157", xe = "_loaderContainer_gc87l_166", We = "_orderMainData_gc87l_69", qe = "_prices_gc87l_181", je = "_headerTitle_gc87l_185", Ge = "_headerDescription_gc87l_189", n = {
42
+ }, De = "_orderPage_gc87l_1", Oe = "_leftSection_gc87l_15", be = "_content_gc87l_35", Ae = "_main_gc87l_42", Ce = "_mainAntistock_gc87l_56", Re = "_orderMainDataAntistock_gc87l_69", Me = "_timelineBlockAntistock_gc87l_81", Te = "_footerAntistock_gc87l_92", Ie = "_statusBlock_gc87l_104", Ve = "_timelineBlock_gc87l_81", Ee = "_footer_gc87l_92", Be = "_rightSection_gc87l_121", Fe = "_header_gc87l_142", Le = "_productList_gc87l_150", $e = "_mobileFooter_gc87l_157", xe = "_loaderContainer_gc87l_166", We = "_orderMainData_gc87l_69", qe = "_prices_gc87l_181", je = "_headerTitle_gc87l_185", Ge = "_headerDescription_gc87l_189", n = {
43
43
  orderPage: De,
44
- leftSection: be,
45
- content: Oe,
44
+ leftSection: Oe,
45
+ content: be,
46
46
  main: Ae,
47
47
  mainAntistock: Ce,
48
48
  orderMainDataAntistock: Re,
@@ -60,20 +60,20 @@ const Pe = async (t = 1) => await se({ PageNumber: t }), tt = () => {
60
60
  prices: qe,
61
61
  headerTitle: je,
62
62
  headerDescription: Ge
63
- }, ze = (t) => {
63
+ }, Ue = (t) => {
64
64
  if (!t) return null;
65
65
  const c = t.split(":");
66
66
  if (c.length !== 3) return null;
67
67
  const [d, e, _] = c, p = Number(d), h = Number(e), g = Number(_);
68
68
  return Number.isNaN(p) || Number.isNaN(h) || Number.isNaN(g) ? null : ((p * 60 + h) * 60 + g) * 1e3;
69
- }, Ue = () => {
69
+ }, ze = () => {
70
70
  var M, T, I, V, E, B, F, L, $;
71
- const { id: t, accessToken: c } = Z(), d = ee(), [e, _] = r.useState(), [p, h] = r.useState(!1), [g, y] = r.useState(!1), [O, N] = r.useState(!1), v = ce(), { isAntistock: l, general: i } = te(), U = ((M = e == null ? void 0 : e.rawPrice) == null ? void 0 : M.currency) || "USD", H = new Intl.NumberFormat("en-US", {
71
+ const { id: t, accessToken: c } = Z(), d = ee(), [e, _] = r.useState(), [p, h] = r.useState(!1), [g, y] = r.useState(!1), [b, N] = r.useState(!1), v = ce(), { isAntistock: l, general: i } = te(), z = ((M = e == null ? void 0 : e.rawPrice) == null ? void 0 : M.currency) || "USD", H = new Intl.NumberFormat("en-US", {
72
72
  style: "currency",
73
- currency: U
73
+ currency: z
74
74
  }), C = r.useMemo(() => {
75
75
  var f;
76
- const a = ze(
76
+ const a = Ue(
77
77
  (e == null ? void 0 : e.estimatedProcessingTime) ?? null
78
78
  ), k = (f = e == null ? void 0 : e.timeline) == null ? void 0 : f[u.Processing], A = (e == null ? void 0 : e.status) === u.Processing && k && a ? {
79
79
  processingStartTime: new Date(k),
@@ -134,13 +134,13 @@ const Pe = async (t = 1) => await se({ PageNumber: t }), tt = () => {
134
134
  clearInterval(a);
135
135
  };
136
136
  }, [t, c, D]);
137
- const J = b(() => !!(e != null && e.isApplicableForReplacement && (e.status === u.Completed || e.status === u.PartiallyDelivered || e.status === u.FullDeliveryFailure)), [e]), R = b(() => {
137
+ const J = O(() => !!(e != null && e.isApplicableForReplacement && (e.status === u.Completed || e.status === u.PartiallyDelivered || e.status === u.FullDeliveryFailure)), [e]), R = O(() => {
138
138
  var a;
139
139
  return !!((a = i == null ? void 0 : i.info) != null && a.isVouchesEnabled && c && ((e == null ? void 0 : e.status) === u.Completed || (e == null ? void 0 : e.status) === u.FullDeliveryFailure || (e == null ? void 0 : e.status) === u.PartiallyDelivered));
140
- }, [(T = i == null ? void 0 : i.info) == null ? void 0 : T.isVouchesEnabled, c]), Q = b(() => {
140
+ }, [(T = i == null ? void 0 : i.info) == null ? void 0 : T.isVouchesEnabled, c]), K = O(() => {
141
141
  var a;
142
142
  return !!(!((a = i == null ? void 0 : i.info) != null && a.isVouchesEnabled) && (e != null && e.review) && "accessToken" in e.review && !l);
143
- }, [(I = i == null ? void 0 : i.info) == null ? void 0 : I.isVouchesEnabled, e == null ? void 0 : e.review, l]), K = b(() => {
143
+ }, [(I = i == null ? void 0 : i.info) == null ? void 0 : I.isVouchesEnabled, e == null ? void 0 : e.review, l]), Q = O(() => {
144
144
  var a;
145
145
  return ((a = i == null ? void 0 : i.info) == null ? void 0 : a.domain) || window.location.hostname;
146
146
  }, [(V = i == null ? void 0 : i.info) == null ? void 0 : V.domain]);
@@ -176,7 +176,7 @@ const Pe = async (t = 1) => await se({ PageNumber: t }), tt = () => {
176
176
  orderId: e.id
177
177
  }
178
178
  ),
179
- Q && e.review && /* @__PURE__ */ s(
179
+ K && e.review && /* @__PURE__ */ s(
180
180
  pe,
181
181
  {
182
182
  orderId: e.id,
@@ -194,7 +194,7 @@ const Pe = async (t = 1) => await se({ PageNumber: t }), tt = () => {
194
194
  }
195
195
  ),
196
196
  /* @__PURE__ */ s(
197
- z,
197
+ U,
198
198
  {
199
199
  className: `${n.footer} ${l ? n.footerAntistock : ""}`
200
200
  }
@@ -255,7 +255,7 @@ const Pe = async (t = 1) => await se({ PageNumber: t }), tt = () => {
255
255
  isShowSubtotal: !1
256
256
  }
257
257
  ),
258
- /* @__PURE__ */ s(z, { className: n.mobileFooter })
258
+ /* @__PURE__ */ s(U, { className: n.mobileFooter })
259
259
  ] })
260
260
  ] })
261
261
  }
@@ -272,12 +272,12 @@ const Pe = async (t = 1) => await se({ PageNumber: t }), tt = () => {
272
272
  R && /* @__PURE__ */ s(
273
273
  ve,
274
274
  {
275
- isOpen: O,
275
+ isOpen: b,
276
276
  onClose: () => N(!1),
277
277
  products: C,
278
278
  orderId: t,
279
279
  accessToken: c,
280
- shopDomain: K,
280
+ shopDomain: Q,
281
281
  onSuccess: () => {
282
282
  N(!1), t && D(t, c, !0);
283
283
  }
@@ -286,7 +286,7 @@ const Pe = async (t = 1) => await se({ PageNumber: t }), tt = () => {
286
286
  ] }));
287
287
  }, st = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
288
288
  __proto__: null,
289
- OrderPage: Ue
289
+ OrderPage: ze
290
290
  }, Symbol.toStringTag, { value: "Module" }));
291
291
  export {
292
292
  tt as O,
@@ -1,11 +1,11 @@
1
1
  import { jsx as e, Fragment as d, jsxs as o } from "react/jsx-runtime";
2
2
  import a from "react";
3
- import { Q as C, O as _, a8 as y, a9 as v, K as P } from "./builder-CQv65ONw.js";
4
- import { p as w, N, P as j, S as D, g as I, i as x, q as E, l as f, r as G, A as T, s as k, t as B, v as O, w as A, x as L } from "./charge-BIOFTYrp.js";
5
- import { e as M, g as F } from "./ui-components-Bc8Z_6jF.js";
6
- import "./builder-components-BR6CyOIi.js";
3
+ import { O as C, N as _, a7 as y, a8 as v, J as P } from "./builder-SahR2uvC.js";
4
+ import { p as w, N, P as j, S as D, g as I, i as x, q as E, l as f, r as G, A as T, s as k, t as B, v as O, w as A, x as L } from "./charge-DNmGxN44.js";
5
+ import { e as M, g as F } from "./ui-components--QcFqSUu.js";
6
+ import "./builder-components-FRJ5IPFp.js";
7
7
  import "react-dom";
8
- import "./ticket-UPvqJdN6.js";
8
+ import "./ticket-jgvezivF.js";
9
9
  const H = async (s = 1) => await w({ PageNumber: s }), nt = () => {
10
10
  const [s, i] = a.useState(null), [t, S] = a.useState(0), { page: u, setPage: h } = C(), { gatewaysDetail: l, setGatewaysDetail: b, balanceSettings: n } = _();
11
11
  return a.useEffect(() => {
@@ -38,15 +38,15 @@ const H = async (s = 1) => await w({ PageNumber: s }), nt = () => {
38
38
  }
39
39
  )
40
40
  ] }) });
41
- }, U = "_subscriptionContainer_1j6ol_1", W = "_leftSection_1j6ol_15", q = "_content_1j6ol_26", z = "_mainContent_1j6ol_33", K = "_detailsSection_1j6ol_37", Q = "_buttonGroup_1j6ol_50", R = "_detailsContent_1j6ol_57", r = {
41
+ }, U = "_subscriptionContainer_1j6ol_1", W = "_leftSection_1j6ol_15", q = "_content_1j6ol_26", z = "_mainContent_1j6ol_33", J = "_detailsSection_1j6ol_37", R = "_buttonGroup_1j6ol_50", Y = "_detailsContent_1j6ol_57", r = {
42
42
  subscriptionContainer: U,
43
43
  leftSection: W,
44
44
  content: q,
45
45
  mainContent: z,
46
- detailsSection: K,
47
- buttonGroup: Q,
48
- detailsContent: R
49
- }, Y = () => {
46
+ detailsSection: J,
47
+ buttonGroup: R,
48
+ detailsContent: Y
49
+ }, K = () => {
50
50
  const { id: s, accessToken: i } = y(), { subscription: t, setSubscription: S } = v(), { setIsOpen: u } = P(), [h, l] = a.useState(!1), [b, n] = a.useState(!1);
51
51
  a.useLayoutEffect(() => {
52
52
  S(null);
@@ -145,7 +145,7 @@ const H = async (s = 1) => await w({ PageNumber: s }), nt = () => {
145
145
  ] });
146
146
  }, it = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
147
147
  __proto__: null,
148
- Subscription: Y
148
+ Subscription: K
149
149
  }, Symbol.toStringTag, { value: "Module" }));
150
150
  export {
151
151
  nt as S,
@@ -1 +1 @@
1
- "use strict";const t=require("react/jsx-runtime"),c=require("react"),u=require("./builder-DajwWRB4.cjs"),s=require("./charge-BOfQrkLv.cjs"),m=require("./ui-components-cdIfqSzy.cjs");require("./builder-components-Cy-VmxAd.cjs");require("react-dom");require("./ticket-D-hMXIqO.cjs");const x=async(n=1)=>await s.fetchSubscriptions({PageNumber:n}),f=()=>{const[n,o]=c.useState(null),[e,S]=c.useState(0),{page:l,setPage:b}=u.usePaginationPagesStore(),{gatewaysDetail:d,setGatewaysDetail:g,balanceSettings:i}=u.useCustomerDashboardStore();return c.useEffect(()=>{const h=async()=>{const{list:r,totalCount:p}=await x(l);o(r),S(p)},j=async()=>{const r=await s.getGatewaysDetail(i!=null&&i.isEnabled?(i==null?void 0:i.topUpSettings.gateways)||[]:[]);g(r)};h(),d||j()},[l]),t.jsx(t.Fragment,{children:n&&n.length===0?t.jsx(s.NoItemsBlock,{title:"Subscriptions History",description:"When you subscribe to a product on our website, you'll see a history of your subscriptions here."}):t.jsxs(t.Fragment,{children:[t.jsx(s.PageTitle,{title:"Subscriptions"}),t.jsx(s.SubscriptionsTable,{subscriptions:n,gatewaysDetail:d,totalCount:e,page:l,setPage:b})]})})},C="_subscriptionContainer_1j6ol_1",_="_leftSection_1j6ol_15",y="_content_1j6ol_26",v="_mainContent_1j6ol_33",P="_detailsSection_1j6ol_37",w="_buttonGroup_1j6ol_50",D="_detailsContent_1j6ol_57",a={subscriptionContainer:C,leftSection:_,content:y,mainContent:v,detailsSection:P,buttonGroup:w,detailsContent:D},N=()=>{const{id:n,accessToken:o}=u.useParams(),{subscription:e,setSubscription:S}=u.useSubscriptionStore(),{setIsOpen:l}=u.useModalStore(),[b,d]=c.useState(!1),[g,i]=c.useState(!1);c.useLayoutEffect(()=>{S(null)},[n,o]);const{balanceSettings:h,setBalanceSettings:j}=u.useCustomerDashboardStore();return c.useEffect(()=>{n&&o&&(async()=>{if(!n||!o)return;i(!0);const{data:p}=await s.fetchSubscription(n,o);S({...p}),i(!1)})()},[n,o]),c.useEffect(()=>{h||(async()=>{const p=await s.getBalanceSettings();j(p)})()},[h]),g?t.jsx(m.Loader,{}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:a.subscriptionContainer,children:[t.jsx("div",{className:a.leftSection,children:t.jsxs("div",{className:a.content,children:[t.jsx(s.CheckoutHeader,{}),t.jsxs("div",{className:a.mainContent,children:[e&&t.jsxs(t.Fragment,{children:[t.jsx("h3",{id:"h3",children:"Your Subscription"}),t.jsx(s.SubscriptionProduct,{subscription:{price:e.price,name:e.productName,description:e.productDescription,status:e.status,image:e.productImage,recurringInterval:e.recurringInterval}}),t.jsx("div",{className:a.buttonGroup,children:e.pricingPlanExists&&t.jsx(m.Button,{onClick:r=>{r.stopPropagation(),l(!0),d(!0)},style:{maxWidth:"500px",width:"100%"},children:"Change Plan"})})]}),t.jsx(s.CheckoutFooter,{})]})]})}),t.jsx("div",{className:a.detailsSection,children:t.jsxs("div",{className:a.detailsContent,children:[t.jsx("h3",{id:"h3",children:"Details"}),(e==null?void 0:e.coupon)&&t.jsx(s.SubscriptionCoupon,{coupon:e.coupon,currency:e.price.currency||"USD"}),e&&t.jsx(s.ActiveSubscriptionProduct,{id:n||"",accessToken:o||"",subscription:{price:e.price,name:e.productName,description:e.productDescription,status:e.status,image:e.productImage,recurringInterval:e.recurringInterval}}),e&&t.jsxs(t.Fragment,{children:[t.jsx(s.ActivePaymentMethod,{}),e.activeTo&&t.jsx(s.SubscriptionExpirationDate,{})]}),t.jsx(s.CheckoutFooter,{className:"flex md:hidden"})]})})]}),t.jsx(s.ChangeSubscriptionPlan,{isOpen:b,setIsOpen:d,subscription:e})]})},I=Object.freeze(Object.defineProperty({__proto__:null,Subscription:N},Symbol.toStringTag,{value:"Module"}));exports.Subscriptions=f;exports.index=I;
1
+ "use strict";const t=require("react/jsx-runtime"),c=require("react"),u=require("./builder-CJIqIhVd.cjs"),s=require("./charge-CjYciF-W.cjs"),m=require("./ui-components-hiCSs7Xz.cjs");require("./builder-components-9lyVKOC8.cjs");require("react-dom");require("./ticket-Bhyrlru1.cjs");const x=async(n=1)=>await s.fetchSubscriptions({PageNumber:n}),f=()=>{const[n,o]=c.useState(null),[e,S]=c.useState(0),{page:l,setPage:b}=u.usePaginationPagesStore(),{gatewaysDetail:d,setGatewaysDetail:g,balanceSettings:i}=u.useCustomerDashboardStore();return c.useEffect(()=>{const h=async()=>{const{list:r,totalCount:p}=await x(l);o(r),S(p)},j=async()=>{const r=await s.getGatewaysDetail(i!=null&&i.isEnabled?(i==null?void 0:i.topUpSettings.gateways)||[]:[]);g(r)};h(),d||j()},[l]),t.jsx(t.Fragment,{children:n&&n.length===0?t.jsx(s.NoItemsBlock,{title:"Subscriptions History",description:"When you subscribe to a product on our website, you'll see a history of your subscriptions here."}):t.jsxs(t.Fragment,{children:[t.jsx(s.PageTitle,{title:"Subscriptions"}),t.jsx(s.SubscriptionsTable,{subscriptions:n,gatewaysDetail:d,totalCount:e,page:l,setPage:b})]})})},C="_subscriptionContainer_1j6ol_1",_="_leftSection_1j6ol_15",y="_content_1j6ol_26",v="_mainContent_1j6ol_33",P="_detailsSection_1j6ol_37",w="_buttonGroup_1j6ol_50",D="_detailsContent_1j6ol_57",a={subscriptionContainer:C,leftSection:_,content:y,mainContent:v,detailsSection:P,buttonGroup:w,detailsContent:D},N=()=>{const{id:n,accessToken:o}=u.useParams(),{subscription:e,setSubscription:S}=u.useSubscriptionStore(),{setIsOpen:l}=u.useModalStore(),[b,d]=c.useState(!1),[g,i]=c.useState(!1);c.useLayoutEffect(()=>{S(null)},[n,o]);const{balanceSettings:h,setBalanceSettings:j}=u.useCustomerDashboardStore();return c.useEffect(()=>{n&&o&&(async()=>{if(!n||!o)return;i(!0);const{data:p}=await s.fetchSubscription(n,o);S({...p}),i(!1)})()},[n,o]),c.useEffect(()=>{h||(async()=>{const p=await s.getBalanceSettings();j(p)})()},[h]),g?t.jsx(m.Loader,{}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:a.subscriptionContainer,children:[t.jsx("div",{className:a.leftSection,children:t.jsxs("div",{className:a.content,children:[t.jsx(s.CheckoutHeader,{}),t.jsxs("div",{className:a.mainContent,children:[e&&t.jsxs(t.Fragment,{children:[t.jsx("h3",{id:"h3",children:"Your Subscription"}),t.jsx(s.SubscriptionProduct,{subscription:{price:e.price,name:e.productName,description:e.productDescription,status:e.status,image:e.productImage,recurringInterval:e.recurringInterval}}),t.jsx("div",{className:a.buttonGroup,children:e.pricingPlanExists&&t.jsx(m.Button,{onClick:r=>{r.stopPropagation(),l(!0),d(!0)},style:{maxWidth:"500px",width:"100%"},children:"Change Plan"})})]}),t.jsx(s.CheckoutFooter,{})]})]})}),t.jsx("div",{className:a.detailsSection,children:t.jsxs("div",{className:a.detailsContent,children:[t.jsx("h3",{id:"h3",children:"Details"}),(e==null?void 0:e.coupon)&&t.jsx(s.SubscriptionCoupon,{coupon:e.coupon,currency:e.price.currency||"USD"}),e&&t.jsx(s.ActiveSubscriptionProduct,{id:n||"",accessToken:o||"",subscription:{price:e.price,name:e.productName,description:e.productDescription,status:e.status,image:e.productImage,recurringInterval:e.recurringInterval}}),e&&t.jsxs(t.Fragment,{children:[t.jsx(s.ActivePaymentMethod,{}),e.activeTo&&t.jsx(s.SubscriptionExpirationDate,{})]}),t.jsx(s.CheckoutFooter,{className:"flex md:hidden"})]})})]}),t.jsx(s.ChangeSubscriptionPlan,{isOpen:b,setIsOpen:d,subscription:e})]})},I=Object.freeze(Object.defineProperty({__proto__:null,Subscription:N},Symbol.toStringTag,{value:"Module"}));exports.Subscriptions=f;exports.index=I;