@billgangcom/theme-lib 1.114.3 → 1.115.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{builder-C4IiRjp5.js → builder-CVbCKY8a.js} +5 -5
- package/dist/{builder-CZiRl_4b.cjs → builder-Iu70o8Zi.cjs} +2 -2
- package/dist/{builder-components-Ds0B6KAh.cjs → builder-components-3ULrMVTv.cjs} +1 -1
- package/dist/{builder-components-DUtnQsMR.js → builder-components-BuaB_nik.js} +4 -4
- package/dist/builder.cjs.js +1 -1
- package/dist/builder.es.js +22 -22
- package/dist/{charge-BAjv22Uu.js → charge-CqeINukp.js} +46 -38
- package/dist/{charge-Swo2yUda.cjs → charge-pzp63q8N.cjs} +2 -2
- package/dist/{checkout-BihRJw1G.cjs → checkout-B98fqO6J.cjs} +1 -1
- package/dist/{checkout-CsTWd6tI.js → checkout-YVutPZ7f.js} +5 -5
- package/dist/exports.cjs.js +1 -1
- package/dist/exports.es.js +6 -6
- package/dist/{index-CGhg-CkV.js → index-B3WK0Wpu.js} +5 -5
- package/dist/{index-D4BCHJ4l.js → index-BUlydTOo.js} +5 -5
- package/dist/{index-0itRmU2L.cjs → index-BV4ZiotJ.cjs} +1 -1
- package/dist/{index-BXuENnlY.js → index-C32vke_m.js} +5 -5
- package/dist/{index-BbTAMqA3.js → index-CiY9zOlN.js} +1 -1
- package/dist/{index-BQKbOYps.cjs → index-Ck3jvxGA.cjs} +1 -1
- package/dist/{index-eaTS3-Aj.cjs → index-D0izKDtJ.cjs} +1 -1
- package/dist/{index-CJ8gac-X.cjs → index-D50xf07C.cjs} +1 -1
- package/dist/{index-DEpz6kqr.cjs → index-Lf_IZiQr.cjs} +1 -1
- package/dist/{index-DcAv5U36.js → index-dHSb9Tg9.js} +5 -5
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +6 -6
- package/dist/order-C0KsOrOK.cjs +1 -0
- package/dist/order-D4daxyzU.js +325 -0
- package/dist/src/storefront/models/shop.d.ts +2 -0
- package/dist/{subscription-BAy6WRcF.cjs → subscription-4CHOOBkd.cjs} +1 -1
- package/dist/{subscription-2rmlPxD5.js → subscription-D9tguRYG.js} +5 -5
- package/dist/{ticket-Buu-gWi7.cjs → ticket-BKgdPBSh.cjs} +62 -62
- package/dist/{ticket-D5JmN5l9.js → ticket-BODLy8iD.js} +420 -414
- package/dist/{top-up-iDz6xeq5.js → top-up-BxIXamXN.js} +5 -5
- package/dist/{top-up-Cj3r_l4u.cjs → top-up-DR4KDupr.cjs} +1 -1
- package/dist/{ui-components-CAvXxpG4.js → ui-components-B2XdfTmJ.js} +4 -4
- package/dist/{ui-components-DhvDTRiU.cjs → ui-components-DnGzB9kA.cjs} +1 -1
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +1 -1
- package/dist/{validation-BzWFnVQz.cjs → validation-B_jzusSg.cjs} +1 -1
- package/dist/{validation-CVlQrUBl.js → validation-BusGxggf.js} +5 -5
- package/package.json +1 -1
- package/dist/order-DepPRtns.cjs +0 -1
- package/dist/order-sMlMoj4y.js +0 -320
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
var ee = Object.defineProperty;
|
|
2
|
-
var oe = (
|
|
3
|
-
var D = (
|
|
4
|
-
import { jsx as
|
|
5
|
-
import
|
|
6
|
-
import { j as
|
|
7
|
-
import { x as le, y as se, N as Ie, P as ue, z as de, B as R, D as pe, E as ge, u as he, F as Se, J as me, K as Ce } from "./charge-
|
|
8
|
-
import { e as F, g as
|
|
9
|
-
import { R as J, a as Y, b as Q, c as fe } from "./builder-components-
|
|
2
|
+
var oe = (n, r, e) => r in n ? ee(n, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[r] = e;
|
|
3
|
+
var D = (n, r, e) => oe(n, typeof r != "symbol" ? r + "" : r, e);
|
|
4
|
+
import { jsx as i, jsxs as m, Fragment as ne } from "react/jsx-runtime";
|
|
5
|
+
import p from "react";
|
|
6
|
+
import { j as q, K as z, r as j, aa as re, e as E, v as N, N as te, X as ce, p as U, V as x, c as X, a as V, b as O, f as B, ab as ae, u as ie, U as K } from "./builder-CVbCKY8a.js";
|
|
7
|
+
import { x as le, y as se, N as Ie, P as ue, z as de, B as R, D as pe, E as ge, u as he, F as Se, J as me, K as Ce } from "./charge-CqeINukp.js";
|
|
8
|
+
import { e as F, g as _, E as G, I as we } from "./ui-components-B2XdfTmJ.js";
|
|
9
|
+
import { R as J, a as Y, b as Q, c as fe } from "./builder-components-BuaB_nik.js";
|
|
10
10
|
import "react-dom";
|
|
11
|
-
import "./checkout-
|
|
12
|
-
const ye = "_wrapper_1vt13_1", be = "_bg_1vt13_10", Le = "_main_1vt13_32", ke = "_noAnimation_1vt13_37", Te = "_loading_1vt13_51", Ae = "_loadingContent_1vt13_61", Pe = "_loader_1vt13_66",
|
|
11
|
+
import "./checkout-YVutPZ7f.js";
|
|
12
|
+
const ye = "_wrapper_1vt13_1", be = "_bg_1vt13_10", Le = "_main_1vt13_32", ke = "_noAnimation_1vt13_37", Te = "_loading_1vt13_51", Ae = "_loadingContent_1vt13_61", Pe = "_loader_1vt13_66", T = {
|
|
13
13
|
wrapper: ye,
|
|
14
14
|
bg: be,
|
|
15
15
|
main: Le,
|
|
@@ -17,19 +17,19 @@ const ye = "_wrapper_1vt13_1", be = "_bg_1vt13_10", Le = "_main_1vt13_32", ke =
|
|
|
17
17
|
loading: Te,
|
|
18
18
|
loadingContent: Ae,
|
|
19
19
|
loader: Pe
|
|
20
|
-
}, Be = async (
|
|
21
|
-
const e =
|
|
22
|
-
if (r && !
|
|
20
|
+
}, Be = async (n, r) => {
|
|
21
|
+
const e = q.getState().apiUrls, o = z ? localStorage.getItem("fakeDomain") || "flagship-theme.pages.dev" : window.location.hostname, l = localStorage.getItem("shopPassword");
|
|
22
|
+
if (r && !l)
|
|
23
23
|
return null;
|
|
24
|
-
const
|
|
24
|
+
const t = `${e.storeApi}/v2/shops/${o}/pages/${n}` + (r ? `?password=${l}` : "");
|
|
25
25
|
try {
|
|
26
|
-
return await
|
|
27
|
-
url:
|
|
26
|
+
return await j({
|
|
27
|
+
url: t,
|
|
28
28
|
withToken: !0,
|
|
29
29
|
method: "get"
|
|
30
30
|
});
|
|
31
|
-
} catch (
|
|
32
|
-
if (re.isAxiosError(
|
|
31
|
+
} catch (c) {
|
|
32
|
+
if (re.isAxiosError(c) && c.response && c.response.status === 404)
|
|
33
33
|
return null;
|
|
34
34
|
}
|
|
35
35
|
}, Lo = [
|
|
@@ -3078,11 +3078,11 @@ const ye = "_wrapper_1vt13_1", be = "_bg_1vt13_10", Le = "_main_1vt13_32", ke =
|
|
|
3078
3078
|
"YoutubeLogo",
|
|
3079
3079
|
"YoutubeLogoIcon"
|
|
3080
3080
|
];
|
|
3081
|
-
var Fe = /* @__PURE__ */ ((
|
|
3081
|
+
var Fe = /* @__PURE__ */ ((n) => (n.ICON_LINK = "--icon-link", n.ICON_ERROR = "--icon-error", n.ICON_ACTION = "--icon-action", n.ICON_PRIMARY = "--icon-primary", n.ICON_SUCCESS = "--icon-success", n.ICON_WARNING = "--icon-warning", n.ICON_DISABLED = "--icon-disabled", n.ICON_INVERTED = "--icon-inverted", n.ICON_TERTIARY = "--icon-tertiary", n.ICON_SECONDARY = "--icon-secondary", n.ICON_ACTION_HOVER = "--icon-actionHover", n.ICON_INFORMATION = "--icon-information", n.TEXT_LINK = "--text-link", n.TEXT_ERROR = "--text-error", n.TEXT_ACTION = "--text-action", n.TEXT_PRIMARY = "--text-primary", n.TEXT_SUCCESS = "--text-success", n.TEXT_WARNING = "--text-warning", n.TEXT_DISABLED = "--text-disabled", n.TEXT_INVERTED = "--text-inverted", n.TEXT_TERTIARY = "--text-tertiary", n.TEXT_SECONDARY = "--text-secondary", n.TEXT_ACTION_HOVER = "--text-actionHover", n.TEXT_INFORMATION = "--text-information", n.BORDER_ERROR = "--border-error", n.BORDER_FOCUS = "--border-focus", n.BORDER_ACTION = "--border-action", n.BORDER_PRIMARY = "--border-primary", n.BORDER_SUCCESS = "--border-success", n.BORDER_WARNING = "--border-warning", n.BORDER_DISABLED = "--border-disabled", n.BORDER_SECONDARY = "--border-secondary", n.BORDER_ACTION_HOVER = "--border-actionHover", n.BORDER_INFORMATION = "--border-information", n.SURFACE_ERROR = "--surface-error", n.SURFACE_MODAL = "--surface-modal", n.SURFACE_ACTION1 = "--surface-action1", n.SURFACE_ACTION2 = "--surface-action2", n.SURFACE_PRIMARY = "--surface-primary", n.SURFACE_SUCCESS = "--surface-success", n.SURFACE_WARNING = "--surface-warning", n.SURFACE_DISABLED = "--surface-disabled", n.SURFACE_SECONDARY = "--surface-secondary", n.SURFACE_INFORMATION = "--surface-information", n.SURFACE_ACTION1_HOVER = "--surface-action1Hover", n.SURFACE_ACTION2_HOVER = "--surface-action2Hover", n))(Fe || {});
|
|
3082
3082
|
const ko = [
|
|
3083
3083
|
{
|
|
3084
3084
|
value: "4:3",
|
|
3085
|
-
addon: /* @__PURE__ */
|
|
3085
|
+
addon: /* @__PURE__ */ i(
|
|
3086
3086
|
"div",
|
|
3087
3087
|
{
|
|
3088
3088
|
style: {
|
|
@@ -3092,7 +3092,7 @@ const ko = [
|
|
|
3092
3092
|
alignItems: "center",
|
|
3093
3093
|
justifyContent: "center"
|
|
3094
3094
|
},
|
|
3095
|
-
children: /* @__PURE__ */
|
|
3095
|
+
children: /* @__PURE__ */ i(
|
|
3096
3096
|
"div",
|
|
3097
3097
|
{
|
|
3098
3098
|
style: {
|
|
@@ -3108,7 +3108,7 @@ const ko = [
|
|
|
3108
3108
|
},
|
|
3109
3109
|
{
|
|
3110
3110
|
value: "16:9",
|
|
3111
|
-
addon: /* @__PURE__ */
|
|
3111
|
+
addon: /* @__PURE__ */ i(
|
|
3112
3112
|
"div",
|
|
3113
3113
|
{
|
|
3114
3114
|
style: {
|
|
@@ -3118,7 +3118,7 @@ const ko = [
|
|
|
3118
3118
|
alignItems: "center",
|
|
3119
3119
|
justifyContent: "center"
|
|
3120
3120
|
},
|
|
3121
|
-
children: /* @__PURE__ */
|
|
3121
|
+
children: /* @__PURE__ */ i(
|
|
3122
3122
|
"div",
|
|
3123
3123
|
{
|
|
3124
3124
|
style: {
|
|
@@ -3134,7 +3134,7 @@ const ko = [
|
|
|
3134
3134
|
},
|
|
3135
3135
|
{
|
|
3136
3136
|
value: "9:16",
|
|
3137
|
-
addon: /* @__PURE__ */
|
|
3137
|
+
addon: /* @__PURE__ */ i(
|
|
3138
3138
|
"div",
|
|
3139
3139
|
{
|
|
3140
3140
|
style: {
|
|
@@ -3144,7 +3144,7 @@ const ko = [
|
|
|
3144
3144
|
alignItems: "center",
|
|
3145
3145
|
justifyContent: "center"
|
|
3146
3146
|
},
|
|
3147
|
-
children: /* @__PURE__ */
|
|
3147
|
+
children: /* @__PURE__ */ i(
|
|
3148
3148
|
"div",
|
|
3149
3149
|
{
|
|
3150
3150
|
style: {
|
|
@@ -3160,7 +3160,7 @@ const ko = [
|
|
|
3160
3160
|
},
|
|
3161
3161
|
{
|
|
3162
3162
|
value: "1:1",
|
|
3163
|
-
addon: /* @__PURE__ */
|
|
3163
|
+
addon: /* @__PURE__ */ i(
|
|
3164
3164
|
"div",
|
|
3165
3165
|
{
|
|
3166
3166
|
style: {
|
|
@@ -3170,7 +3170,7 @@ const ko = [
|
|
|
3170
3170
|
alignItems: "center",
|
|
3171
3171
|
justifyContent: "center"
|
|
3172
3172
|
},
|
|
3173
|
-
children: /* @__PURE__ */
|
|
3173
|
+
children: /* @__PURE__ */ i(
|
|
3174
3174
|
"div",
|
|
3175
3175
|
{
|
|
3176
3176
|
style: {
|
|
@@ -3184,18 +3184,18 @@ const ko = [
|
|
|
3184
3184
|
}
|
|
3185
3185
|
)
|
|
3186
3186
|
}
|
|
3187
|
-
], To = (
|
|
3187
|
+
], To = (n) => {
|
|
3188
3188
|
const { notifications: r, setNotifications: e } = E.getState();
|
|
3189
|
-
e(r.filter((
|
|
3190
|
-
}, Ao = (
|
|
3191
|
-
const { notifications: r, setNotifications: e } = E.getState(),
|
|
3189
|
+
e(r.filter((o) => o.id !== n));
|
|
3190
|
+
}, Ao = (n) => {
|
|
3191
|
+
const { notifications: r, setNotifications: e } = E.getState(), o = N();
|
|
3192
3192
|
return e([
|
|
3193
3193
|
...r,
|
|
3194
3194
|
{
|
|
3195
|
-
id:
|
|
3196
|
-
...
|
|
3195
|
+
id: o,
|
|
3196
|
+
...n
|
|
3197
3197
|
}
|
|
3198
|
-
]),
|
|
3198
|
+
]), o;
|
|
3199
3199
|
};
|
|
3200
3200
|
class De {
|
|
3201
3201
|
constructor() {
|
|
@@ -3203,34 +3203,34 @@ class De {
|
|
|
3203
3203
|
D(this, "callbacks", /* @__PURE__ */ new Map());
|
|
3204
3204
|
D(this, "handleWindowResize", () => {
|
|
3205
3205
|
this.callbacks.forEach((r, e) => {
|
|
3206
|
-
const
|
|
3207
|
-
r.forEach((
|
|
3206
|
+
const o = e.getBoundingClientRect().width;
|
|
3207
|
+
r.forEach((l) => l(o));
|
|
3208
3208
|
});
|
|
3209
3209
|
});
|
|
3210
3210
|
this.observer = new ResizeObserver((r) => {
|
|
3211
3211
|
var e;
|
|
3212
|
-
for (const
|
|
3213
|
-
const
|
|
3214
|
-
this.callbacks.has(
|
|
3212
|
+
for (const o of r) {
|
|
3213
|
+
const l = o.contentRect.width, t = o.target;
|
|
3214
|
+
this.callbacks.has(t) && ((e = this.callbacks.get(t)) == null || e.forEach((c) => c(l)));
|
|
3215
3215
|
}
|
|
3216
3216
|
}), window.addEventListener("resize", this.handleWindowResize);
|
|
3217
3217
|
}
|
|
3218
3218
|
observe(r, e) {
|
|
3219
|
-
var
|
|
3219
|
+
var l;
|
|
3220
3220
|
if (!this.observer) return;
|
|
3221
|
-
this.callbacks.has(r) || (this.callbacks.set(r, []), this.observer.observe(r)), (this.callbacks.get(r) || []).includes(e) || (
|
|
3221
|
+
this.callbacks.has(r) || (this.callbacks.set(r, []), this.observer.observe(r)), (this.callbacks.get(r) || []).includes(e) || (l = this.callbacks.get(r)) == null || l.push(e);
|
|
3222
3222
|
}
|
|
3223
3223
|
unobserve(r, e) {
|
|
3224
|
-
var
|
|
3224
|
+
var o;
|
|
3225
3225
|
if (!(!this.observer || !this.callbacks.has(r))) {
|
|
3226
3226
|
if (e) {
|
|
3227
|
-
const
|
|
3227
|
+
const l = this.callbacks.get(r) || [];
|
|
3228
3228
|
this.callbacks.set(
|
|
3229
3229
|
r,
|
|
3230
|
-
|
|
3230
|
+
l.filter((t) => t !== e)
|
|
3231
3231
|
);
|
|
3232
3232
|
}
|
|
3233
|
-
(
|
|
3233
|
+
(o = this.callbacks.get(r)) != null && o.length || (this.callbacks.delete(r), this.observer.unobserve(r));
|
|
3234
3234
|
}
|
|
3235
3235
|
}
|
|
3236
3236
|
// Метод для очистки всех слушателей при необходимости
|
|
@@ -3238,41 +3238,41 @@ class De {
|
|
|
3238
3238
|
this.observer && (this.observer.disconnect(), this.observer = null), this.callbacks.clear(), window.removeEventListener("resize", this.handleWindowResize);
|
|
3239
3239
|
}
|
|
3240
3240
|
}
|
|
3241
|
-
const
|
|
3242
|
-
function Po(
|
|
3243
|
-
const [r, e] =
|
|
3244
|
-
return
|
|
3245
|
-
const
|
|
3246
|
-
if (!
|
|
3247
|
-
const
|
|
3248
|
-
const I =
|
|
3241
|
+
const W = new De();
|
|
3242
|
+
function Po(n) {
|
|
3243
|
+
const [r, e] = p.useState("desktop");
|
|
3244
|
+
return p.useEffect(() => {
|
|
3245
|
+
const o = n.current;
|
|
3246
|
+
if (!o) return;
|
|
3247
|
+
const l = (s) => s >= 1081 ? "desktop" : s >= 720 ? "tablet" : "mobile", t = (s) => {
|
|
3248
|
+
const I = l(s);
|
|
3249
3249
|
e(I);
|
|
3250
3250
|
};
|
|
3251
|
-
|
|
3252
|
-
const
|
|
3253
|
-
return c
|
|
3254
|
-
|
|
3251
|
+
W.observe(o, t);
|
|
3252
|
+
const c = o.getBoundingClientRect().width;
|
|
3253
|
+
return t(c), () => {
|
|
3254
|
+
W.unobserve(o, t);
|
|
3255
3255
|
};
|
|
3256
|
-
}, [
|
|
3256
|
+
}, [n]), r;
|
|
3257
3257
|
}
|
|
3258
3258
|
const Bo = () => {
|
|
3259
|
-
const { balance:
|
|
3260
|
-
return
|
|
3261
|
-
|
|
3259
|
+
const { balance: n, setBalance: r } = te();
|
|
3260
|
+
return p.useEffect(() => {
|
|
3261
|
+
n || (async () => {
|
|
3262
3262
|
if (!localStorage.getItem("token")) return;
|
|
3263
|
-
const
|
|
3264
|
-
r(
|
|
3263
|
+
const l = await le();
|
|
3264
|
+
r(l);
|
|
3265
3265
|
})();
|
|
3266
|
-
}, [
|
|
3267
|
-
}, Re = "_wrapper_ysrl4_1", ve = "_tableContainer_ysrl4_6", xe = "_ticketsTable_ysrl4_19", Me = "_tableItem_ysrl4_37", He = "_tableLoader_ysrl4_41",
|
|
3266
|
+
}, [n]), n;
|
|
3267
|
+
}, Re = "_wrapper_ysrl4_1", ve = "_tableContainer_ysrl4_6", xe = "_ticketsTable_ysrl4_19", Me = "_tableItem_ysrl4_37", He = "_tableLoader_ysrl4_41", k = {
|
|
3268
3268
|
wrapper: Re,
|
|
3269
3269
|
tableContainer: ve,
|
|
3270
3270
|
ticketsTable: xe,
|
|
3271
3271
|
tableItem: Me,
|
|
3272
3272
|
tableLoader: He
|
|
3273
|
-
}, Ne = async (
|
|
3273
|
+
}, Ne = async (n = 1) => {
|
|
3274
3274
|
try {
|
|
3275
|
-
return await se({ PageNumber:
|
|
3275
|
+
return await se({ PageNumber: n });
|
|
3276
3276
|
} catch (r) {
|
|
3277
3277
|
return console.error("Failed to fetch tickets:", r), {
|
|
3278
3278
|
list: [],
|
|
@@ -3280,45 +3280,45 @@ const Bo = () => {
|
|
|
3280
3280
|
};
|
|
3281
3281
|
}
|
|
3282
3282
|
}, Fo = () => {
|
|
3283
|
-
const [
|
|
3284
|
-
|
|
3283
|
+
const [n, r] = p.useState(null), { page: e, setPage: o } = ce(), [l, t] = p.useState(!0), [c, s] = p.useState(0);
|
|
3284
|
+
p.useEffect(() => {
|
|
3285
3285
|
(async () => {
|
|
3286
|
-
|
|
3287
|
-
const { list:
|
|
3288
|
-
r(
|
|
3286
|
+
t(!0);
|
|
3287
|
+
const { list: y, totalCount: C } = await Ne(e);
|
|
3288
|
+
r(y), s(C), t(!1);
|
|
3289
3289
|
})();
|
|
3290
3290
|
}, [e]);
|
|
3291
|
-
const I = !
|
|
3292
|
-
return I &&
|
|
3291
|
+
const I = !l && n;
|
|
3292
|
+
return I && n.length === 0 ? /* @__PURE__ */ i(
|
|
3293
3293
|
Ie,
|
|
3294
3294
|
{
|
|
3295
3295
|
title: "Tickets",
|
|
3296
3296
|
description: "You don't have any tickets yet. If you contact support, tickets will be displayed here.",
|
|
3297
3297
|
centered: !0
|
|
3298
3298
|
}
|
|
3299
|
-
) : /* @__PURE__ */ m("div", { className:
|
|
3300
|
-
/* @__PURE__ */
|
|
3301
|
-
/* @__PURE__ */ m("div", { className:
|
|
3302
|
-
/* @__PURE__ */ m(de, { className:
|
|
3303
|
-
/* @__PURE__ */
|
|
3304
|
-
/* @__PURE__ */
|
|
3305
|
-
/* @__PURE__ */
|
|
3306
|
-
/* @__PURE__ */
|
|
3307
|
-
I && (
|
|
3299
|
+
) : /* @__PURE__ */ m("div", { className: k.wrapper, children: [
|
|
3300
|
+
/* @__PURE__ */ i(ue, { title: "Tickets" }),
|
|
3301
|
+
/* @__PURE__ */ m("div", { className: k.tableContainer, children: [
|
|
3302
|
+
/* @__PURE__ */ m(de, { className: k.ticketsTable, children: [
|
|
3303
|
+
/* @__PURE__ */ i(R, { className: k.tableItem, children: "TICKET ID" }),
|
|
3304
|
+
/* @__PURE__ */ i(R, { className: k.tableItem, children: "LAST MESSAGE" }),
|
|
3305
|
+
/* @__PURE__ */ i(R, { className: k.tableItem, children: "CREATED" }),
|
|
3306
|
+
/* @__PURE__ */ i(R, { className: k.tableItem, children: "STATUS" }),
|
|
3307
|
+
I && (n == null ? void 0 : n.map((S) => /* @__PURE__ */ i(
|
|
3308
3308
|
pe,
|
|
3309
3309
|
{
|
|
3310
|
-
item:
|
|
3310
|
+
item: S
|
|
3311
3311
|
},
|
|
3312
|
-
|
|
3312
|
+
S.id
|
|
3313
3313
|
)))
|
|
3314
3314
|
] }),
|
|
3315
|
-
!I && /* @__PURE__ */
|
|
3316
|
-
I && /* @__PURE__ */
|
|
3315
|
+
!I && /* @__PURE__ */ i("div", { className: k.tableLoader, children: /* @__PURE__ */ i(F, {}) }),
|
|
3316
|
+
I && /* @__PURE__ */ i(
|
|
3317
3317
|
ge,
|
|
3318
3318
|
{
|
|
3319
3319
|
currentPage: e,
|
|
3320
|
-
totalCount:
|
|
3321
|
-
onPageChange:
|
|
3320
|
+
totalCount: c,
|
|
3321
|
+
onPageChange: o
|
|
3322
3322
|
}
|
|
3323
3323
|
)
|
|
3324
3324
|
] })
|
|
@@ -3328,7 +3328,7 @@ const Bo = () => {
|
|
|
3328
3328
|
content: Ue,
|
|
3329
3329
|
title: Oe
|
|
3330
3330
|
}, _e = () => {
|
|
3331
|
-
const
|
|
3331
|
+
const n = U(), { isAntistock: r } = x();
|
|
3332
3332
|
return r ? /* @__PURE__ */ m(
|
|
3333
3333
|
"div",
|
|
3334
3334
|
{
|
|
@@ -3343,8 +3343,8 @@ const Bo = () => {
|
|
|
3343
3343
|
color: "var(--text-primary)"
|
|
3344
3344
|
},
|
|
3345
3345
|
children: [
|
|
3346
|
-
/* @__PURE__ */
|
|
3347
|
-
/* @__PURE__ */
|
|
3346
|
+
/* @__PURE__ */ i(J, {}),
|
|
3347
|
+
/* @__PURE__ */ i(Y, {}),
|
|
3348
3348
|
/* @__PURE__ */ m(
|
|
3349
3349
|
"div",
|
|
3350
3350
|
{
|
|
@@ -3357,7 +3357,7 @@ const Bo = () => {
|
|
|
3357
3357
|
gap: "24px"
|
|
3358
3358
|
},
|
|
3359
3359
|
children: [
|
|
3360
|
-
/* @__PURE__ */
|
|
3360
|
+
/* @__PURE__ */ i(
|
|
3361
3361
|
"h2",
|
|
3362
3362
|
{
|
|
3363
3363
|
style: {
|
|
@@ -3367,32 +3367,32 @@ const Bo = () => {
|
|
|
3367
3367
|
children: "404 Not Found"
|
|
3368
3368
|
}
|
|
3369
3369
|
),
|
|
3370
|
-
/* @__PURE__ */
|
|
3371
|
-
|
|
3370
|
+
/* @__PURE__ */ i(
|
|
3371
|
+
_,
|
|
3372
3372
|
{
|
|
3373
3373
|
type: "Primary",
|
|
3374
|
-
onClick: () =>
|
|
3374
|
+
onClick: () => n("/"),
|
|
3375
3375
|
children: "GO HOME"
|
|
3376
3376
|
}
|
|
3377
3377
|
)
|
|
3378
3378
|
]
|
|
3379
3379
|
}
|
|
3380
3380
|
),
|
|
3381
|
-
/* @__PURE__ */
|
|
3381
|
+
/* @__PURE__ */ i(Q, {})
|
|
3382
3382
|
]
|
|
3383
3383
|
}
|
|
3384
|
-
) : /* @__PURE__ */
|
|
3385
|
-
/* @__PURE__ */
|
|
3386
|
-
/* @__PURE__ */
|
|
3387
|
-
|
|
3384
|
+
) : /* @__PURE__ */ i("div", { className: M.wrapper, children: /* @__PURE__ */ m("div", { className: M.content, children: [
|
|
3385
|
+
/* @__PURE__ */ i("h1", { className: M.title, children: "Page Not Found" }),
|
|
3386
|
+
/* @__PURE__ */ i(
|
|
3387
|
+
_,
|
|
3388
3388
|
{
|
|
3389
3389
|
type: "Primary",
|
|
3390
|
-
onClick: () =>
|
|
3390
|
+
onClick: () => n("/"),
|
|
3391
3391
|
children: "Go to Home"
|
|
3392
3392
|
}
|
|
3393
3393
|
)
|
|
3394
3394
|
] }) });
|
|
3395
|
-
},
|
|
3395
|
+
}, $ = {
|
|
3396
3396
|
"/": "Home",
|
|
3397
3397
|
"/products": "Products",
|
|
3398
3398
|
"/reviews": "Reviews",
|
|
@@ -3401,204 +3401,210 @@ const Bo = () => {
|
|
|
3401
3401
|
"/faq": "FAQ",
|
|
3402
3402
|
"/support": "Support",
|
|
3403
3403
|
"/cart": "Cart"
|
|
3404
|
-
}, Ge = ({ pagePath:
|
|
3405
|
-
const { sourceBlocks: r } = X(),
|
|
3406
|
-
|
|
3404
|
+
}, Ge = ({ pagePath: n }) => {
|
|
3405
|
+
const { sourceBlocks: r } = X(), e = U(), [o, l] = p.useState(null), [t, c] = p.useState(!0), [s, I] = p.useState(null), { settings: S } = V(), { addProducts: y } = he(), { pageContext: C } = O(), { isAntistock: d, general: h } = x();
|
|
3406
|
+
p.useEffect(() => {
|
|
3407
|
+
var g, b;
|
|
3408
|
+
if (n === "/support" && ((g = h == null ? void 0 : h.info) != null && g.disableSupport)) {
|
|
3409
|
+
const a = (b = h == null ? void 0 : h.info) == null ? void 0 : b.thirdPartySupportUrl;
|
|
3410
|
+
a ? window.open(a, "_self") : e("/", { replace: !0 });
|
|
3411
|
+
}
|
|
3412
|
+
}, [n, h]), p.useEffect(() => {
|
|
3407
3413
|
c(!0);
|
|
3408
|
-
const
|
|
3414
|
+
const g = async () => {
|
|
3409
3415
|
const b = await Be(
|
|
3410
|
-
encodeURIComponent(
|
|
3411
|
-
|
|
3416
|
+
encodeURIComponent(n),
|
|
3417
|
+
h == null ? void 0 : h.info.passwordProtected
|
|
3412
3418
|
);
|
|
3413
3419
|
if (b) {
|
|
3414
|
-
const { data:
|
|
3415
|
-
if (
|
|
3416
|
-
const
|
|
3417
|
-
order: [...(
|
|
3420
|
+
const { data: a } = b;
|
|
3421
|
+
if (a.seo && a.seo.pageTitle ? document.title = a.seo.pageTitle : $[n] ? document.title = $[n] : a.products.length > 0 ? document.title = `Product | ${a.products[0].name}` : a.fullPosts.length > 0 && (document.title = `Post | ${a.fullPosts[0].title}`), a.preserveContent) {
|
|
3422
|
+
const w = {
|
|
3423
|
+
order: [...(s == null ? void 0 : s.order) ?? [], ...a.layout.order],
|
|
3418
3424
|
data: {
|
|
3419
|
-
...
|
|
3420
|
-
...
|
|
3425
|
+
...s == null ? void 0 : s.data,
|
|
3426
|
+
...a.layout.data
|
|
3421
3427
|
}
|
|
3422
3428
|
};
|
|
3423
|
-
|
|
3429
|
+
I(w);
|
|
3424
3430
|
} else
|
|
3425
|
-
|
|
3426
|
-
const
|
|
3427
|
-
(
|
|
3428
|
-
),
|
|
3429
|
-
if (
|
|
3430
|
-
const
|
|
3431
|
+
I(a.layout);
|
|
3432
|
+
const L = a.listings.filter(
|
|
3433
|
+
(w) => w.type === "PRODUCT" || w.type === "GROUP"
|
|
3434
|
+
), f = L && L.length > 0 ? a.listings : [...C.listings ?? [], ...a.listings];
|
|
3435
|
+
if (a.preserveContent) {
|
|
3436
|
+
const w = {
|
|
3431
3437
|
...C,
|
|
3432
|
-
products: [...(
|
|
3433
|
-
reviews: [...(
|
|
3434
|
-
categories: [...(
|
|
3435
|
-
faqs: [...(
|
|
3436
|
-
general:
|
|
3437
|
-
fullPosts: [...(
|
|
3438
|
-
posts: [...(
|
|
3439
|
-
preserveContent:
|
|
3440
|
-
listings:
|
|
3438
|
+
products: [...(o == null ? void 0 : o.products) ?? [], ...a.products],
|
|
3439
|
+
reviews: [...(o == null ? void 0 : o.reviews) ?? [], ...a.reviews],
|
|
3440
|
+
categories: [...(o == null ? void 0 : o.categories) ?? [], ...a.categories],
|
|
3441
|
+
faqs: [...(o == null ? void 0 : o.faqs) ?? [], ...a.faqs],
|
|
3442
|
+
general: a.general,
|
|
3443
|
+
fullPosts: [...(o == null ? void 0 : o.fullPosts) ?? [], ...a.fullPosts],
|
|
3444
|
+
posts: [...(o == null ? void 0 : o.posts) ?? [], ...a.posts],
|
|
3445
|
+
preserveContent: a.preserveContent,
|
|
3446
|
+
listings: f
|
|
3441
3447
|
};
|
|
3442
|
-
|
|
3448
|
+
l(w);
|
|
3443
3449
|
} else
|
|
3444
|
-
|
|
3450
|
+
l({
|
|
3445
3451
|
...C,
|
|
3446
|
-
products:
|
|
3447
|
-
reviews:
|
|
3448
|
-
categories:
|
|
3449
|
-
faqs:
|
|
3450
|
-
general:
|
|
3451
|
-
fullPosts:
|
|
3452
|
-
posts:
|
|
3453
|
-
preserveContent:
|
|
3454
|
-
listings:
|
|
3452
|
+
products: a.products,
|
|
3453
|
+
reviews: a.reviews,
|
|
3454
|
+
categories: a.categories,
|
|
3455
|
+
faqs: a.faqs,
|
|
3456
|
+
general: a.general,
|
|
3457
|
+
fullPosts: a.fullPosts,
|
|
3458
|
+
posts: a.posts,
|
|
3459
|
+
preserveContent: a.preserveContent,
|
|
3460
|
+
listings: f
|
|
3455
3461
|
});
|
|
3456
|
-
|
|
3462
|
+
y(a.products);
|
|
3457
3463
|
}
|
|
3458
3464
|
c(!1);
|
|
3459
3465
|
};
|
|
3460
|
-
C.listings &&
|
|
3461
|
-
}, [
|
|
3462
|
-
const
|
|
3463
|
-
if (!
|
|
3464
|
-
return /* @__PURE__ */
|
|
3465
|
-
if (!r || !r[
|
|
3466
|
-
return /* @__PURE__ */
|
|
3467
|
-
const b = new r[
|
|
3468
|
-
return
|
|
3466
|
+
C.listings && h && g();
|
|
3467
|
+
}, [n, C.listings, h]);
|
|
3468
|
+
const A = (g) => {
|
|
3469
|
+
if (!g || !g.name)
|
|
3470
|
+
return /* @__PURE__ */ i(G, { error: "Block or block.name is undefined." });
|
|
3471
|
+
if (!r || !r[g.name])
|
|
3472
|
+
return /* @__PURE__ */ i(G, { error: `Block "${g.name}" does not exist in blocks.` });
|
|
3473
|
+
const b = new r[g.name]();
|
|
3474
|
+
return g.value && Object.assign(b, g.value), b.renderBlock(S, o);
|
|
3469
3475
|
};
|
|
3470
|
-
return !
|
|
3476
|
+
return !t && s === null ? /* @__PURE__ */ i(_e, {}) : /* @__PURE__ */ m(
|
|
3471
3477
|
"div",
|
|
3472
3478
|
{
|
|
3473
|
-
className: B(
|
|
3474
|
-
[
|
|
3475
|
-
[
|
|
3479
|
+
className: B(T.wrapper, {
|
|
3480
|
+
[T.bg]: !d,
|
|
3481
|
+
[T.loadingContent]: t
|
|
3476
3482
|
}),
|
|
3477
3483
|
children: [
|
|
3478
|
-
/* @__PURE__ */
|
|
3479
|
-
/* @__PURE__ */
|
|
3484
|
+
/* @__PURE__ */ i(J, {}),
|
|
3485
|
+
/* @__PURE__ */ i(
|
|
3480
3486
|
Y,
|
|
3481
3487
|
{
|
|
3482
|
-
settings:
|
|
3483
|
-
pageContext:
|
|
3488
|
+
settings: S,
|
|
3489
|
+
pageContext: o
|
|
3484
3490
|
}
|
|
3485
3491
|
),
|
|
3486
|
-
|
|
3487
|
-
/* @__PURE__ */
|
|
3492
|
+
s ? /* @__PURE__ */ m(ne, { children: [
|
|
3493
|
+
/* @__PURE__ */ i(
|
|
3488
3494
|
"div",
|
|
3489
3495
|
{
|
|
3490
|
-
className: B(
|
|
3491
|
-
[
|
|
3496
|
+
className: B(T.main, {
|
|
3497
|
+
[T.noAnimation]: d
|
|
3492
3498
|
}),
|
|
3493
|
-
children:
|
|
3499
|
+
children: s.order && s.order.map((g) => /* @__PURE__ */ i(
|
|
3494
3500
|
fe,
|
|
3495
3501
|
{
|
|
3496
|
-
block:
|
|
3497
|
-
render:
|
|
3502
|
+
block: s.data[g],
|
|
3503
|
+
render: A
|
|
3498
3504
|
},
|
|
3499
|
-
|
|
3505
|
+
g
|
|
3500
3506
|
))
|
|
3501
3507
|
}
|
|
3502
3508
|
),
|
|
3503
|
-
/* @__PURE__ */
|
|
3509
|
+
/* @__PURE__ */ i(
|
|
3504
3510
|
Q,
|
|
3505
3511
|
{
|
|
3506
|
-
settings:
|
|
3507
|
-
pageContext:
|
|
3512
|
+
settings: S,
|
|
3513
|
+
pageContext: o
|
|
3508
3514
|
}
|
|
3509
3515
|
)
|
|
3510
|
-
] }) : /* @__PURE__ */
|
|
3511
|
-
|
|
3516
|
+
] }) : /* @__PURE__ */ i("div", { className: T.loading, children: /* @__PURE__ */ i(F, {}) }),
|
|
3517
|
+
t && /* @__PURE__ */ i("div", { className: T.loader, children: /* @__PURE__ */ i(F, {}) })
|
|
3512
3518
|
]
|
|
3513
3519
|
}
|
|
3514
3520
|
);
|
|
3515
3521
|
};
|
|
3516
3522
|
function Do() {
|
|
3517
|
-
const
|
|
3518
|
-
return /* @__PURE__ */
|
|
3523
|
+
const n = ae();
|
|
3524
|
+
return /* @__PURE__ */ i(Ge, { pagePath: n.pathname });
|
|
3519
3525
|
}
|
|
3520
|
-
const Ro = (
|
|
3526
|
+
const Ro = (n, r) => {
|
|
3521
3527
|
let e = `:root {
|
|
3522
3528
|
`;
|
|
3523
3529
|
if (r && (e += ` --max-width-store: ${r.maxStoreWidth};
|
|
3524
3530
|
`, r.aspectRatio && (e += ` --aspect-ratio: ${r.aspectRatio.toString().replace(":", "/")};
|
|
3525
3531
|
`), r.showParticles !== void 0 && (e += ` --showParticles: ${r.showParticles};
|
|
3526
|
-
`)),
|
|
3527
|
-
Object.entries(
|
|
3528
|
-
e += ` --${
|
|
3532
|
+
`)), n.colors && Object.entries(n.colors).forEach(([o, l]) => {
|
|
3533
|
+
Object.entries(l).forEach(([t, c]) => {
|
|
3534
|
+
e += ` --${o}-${t}: ${c};
|
|
3529
3535
|
`;
|
|
3530
3536
|
});
|
|
3531
|
-
}),
|
|
3532
|
-
typeof
|
|
3533
|
-
|
|
3534
|
-
`, e += ` --font-${
|
|
3535
|
-
`, e += ` --font-${
|
|
3536
|
-
`, e += ` --font-${
|
|
3537
|
-
`, e += ` --font-${
|
|
3537
|
+
}), n.fonts && Object.entries(n.fonts.desktop).forEach(([o, l]) => {
|
|
3538
|
+
typeof l == "object" && Object.entries(l).forEach(([t, c]) => {
|
|
3539
|
+
c && (e += ` --font-${o}-${t}-family: ${c.font};
|
|
3540
|
+
`, e += ` --font-${o}-${t}-size: ${c.size}px;
|
|
3541
|
+
`, e += ` --font-${o}-${t}-weight: ${c.weight};
|
|
3542
|
+
`, e += ` --font-${o}-${t}-boldWeight: ${c.boldWeight};
|
|
3543
|
+
`, e += ` --font-${o}-${t}-case: ${c.case};
|
|
3538
3544
|
`);
|
|
3539
3545
|
});
|
|
3540
|
-
}),
|
|
3541
|
-
const { buttons:
|
|
3542
|
-
if (
|
|
3543
|
-
const
|
|
3544
|
-
e += ` --button-primary-size: ${
|
|
3545
|
-
`, e += ` --button-primary-height: ${
|
|
3546
|
-
`, e += ` --button-primary-radius: ${
|
|
3547
|
-
`, e += ` --button-primary-alignment: ${
|
|
3548
|
-
`, e += ` --button-primary-background: ${
|
|
3549
|
-
`, e += ` --button-primary-hover: ${
|
|
3550
|
-
`, e += ` --button-primary-box-shadow: ${
|
|
3551
|
-
`, e += ` --button-primary-font: ${
|
|
3552
|
-
`, e += ` --button-primary-text-color: ${
|
|
3553
|
-
`, e += ` --button-primary-text-color-hover: ${
|
|
3554
|
-
`, e += ` --button-primary-background-hover: ${
|
|
3555
|
-
`, e += ` --button-secondary-size: ${
|
|
3556
|
-
`, e += ` --button-secondary-height: ${
|
|
3557
|
-
`, e += ` --button-secondary-radius: ${
|
|
3558
|
-
`, e += ` --button-secondary-alignment: ${
|
|
3559
|
-
`, e += ` --button-secondary-background: ${
|
|
3560
|
-
`, e += ` --button-secondary-hover: ${
|
|
3561
|
-
`, e += ` --button-secondary-box-shadow: ${
|
|
3562
|
-
`, e += ` --button-secondary-font: ${
|
|
3563
|
-
`, e += ` --button-secondary-text-color: ${
|
|
3564
|
-
`, e += ` --button-secondary-text-color-hover: ${
|
|
3565
|
-
`, e += ` --button-secondary-background-hover: ${
|
|
3566
|
-
`, e += ` --button-tertiary-size: ${
|
|
3567
|
-
`, e += ` --button-tertiary-height: ${
|
|
3568
|
-
`, e += ` --button-tertiary-radius: ${
|
|
3569
|
-
`, e += ` --button-tertiary-alignment: ${
|
|
3570
|
-
`, e += ` --button-tertiary-background: ${
|
|
3571
|
-
`, e += ` --button-tertiary-hover: ${
|
|
3572
|
-
`, e += ` --button-tertiary-box-shadow: ${
|
|
3573
|
-
`, e += ` --button-tertiary-font: ${
|
|
3574
|
-
`, e += ` --button-tertiary-text-color: ${
|
|
3575
|
-
`, e += ` --button-tertiary-text-color-hover: ${
|
|
3576
|
-
`, e += ` --button-tertiary-background-hover: ${
|
|
3546
|
+
}), n.buttons) {
|
|
3547
|
+
const { buttons: o } = n;
|
|
3548
|
+
if (o.primary && o.secondary && o.tertiary) {
|
|
3549
|
+
const l = `${o.primary.boxShadow.left}px ${o.primary.boxShadow.top}px ${o.primary.boxShadow.blur}px ${o.primary.boxShadow.spread}px ${o.primary.boxShadow.color}`, t = `${o.secondary.boxShadow.left}px ${o.secondary.boxShadow.top}px ${o.secondary.boxShadow.blur}px ${o.secondary.boxShadow.spread}px ${o.secondary.boxShadow.color}`, c = `${o.tertiary.boxShadow.left}px ${o.tertiary.boxShadow.top}px ${o.tertiary.boxShadow.blur}px ${o.tertiary.boxShadow.spread}px ${o.tertiary.boxShadow.color}`;
|
|
3550
|
+
e += ` --button-primary-size: ${o.primary.size}px;
|
|
3551
|
+
`, e += ` --button-primary-height: ${o.primary.height}px;
|
|
3552
|
+
`, e += ` --button-primary-radius: ${o.primary.radius}px;
|
|
3553
|
+
`, e += ` --button-primary-alignment: ${o.primary.alignment};
|
|
3554
|
+
`, e += ` --button-primary-background: ${o.primary.background};
|
|
3555
|
+
`, e += ` --button-primary-hover: ${o.primary.hover};
|
|
3556
|
+
`, e += ` --button-primary-box-shadow: ${l};
|
|
3557
|
+
`, e += ` --button-primary-font: ${o.primary.font};
|
|
3558
|
+
`, e += ` --button-primary-text-color: ${o.primary.color};
|
|
3559
|
+
`, e += ` --button-primary-text-color-hover: ${o.primary.colorHover};
|
|
3560
|
+
`, e += ` --button-primary-background-hover: ${o.primary.backgroundHover};
|
|
3561
|
+
`, e += ` --button-secondary-size: ${o.secondary.size}px;
|
|
3562
|
+
`, e += ` --button-secondary-height: ${o.secondary.height}px;
|
|
3563
|
+
`, e += ` --button-secondary-radius: ${o.secondary.radius}px;
|
|
3564
|
+
`, e += ` --button-secondary-alignment: ${o.secondary.alignment};
|
|
3565
|
+
`, e += ` --button-secondary-background: ${o.secondary.background};
|
|
3566
|
+
`, e += ` --button-secondary-hover: ${o.secondary.hover};
|
|
3567
|
+
`, e += ` --button-secondary-box-shadow: ${t};
|
|
3568
|
+
`, e += ` --button-secondary-font: ${o.secondary.font};
|
|
3569
|
+
`, e += ` --button-secondary-text-color: ${o.secondary.color};
|
|
3570
|
+
`, e += ` --button-secondary-text-color-hover: ${o.secondary.colorHover};
|
|
3571
|
+
`, e += ` --button-secondary-background-hover: ${o.secondary.backgroundHover};
|
|
3572
|
+
`, e += ` --button-tertiary-size: ${o.tertiary.size}px;
|
|
3573
|
+
`, e += ` --button-tertiary-height: ${o.tertiary.height}px;
|
|
3574
|
+
`, e += ` --button-tertiary-radius: ${o.tertiary.radius}px;
|
|
3575
|
+
`, e += ` --button-tertiary-alignment: ${o.tertiary.alignment};
|
|
3576
|
+
`, e += ` --button-tertiary-background: ${o.tertiary.background};
|
|
3577
|
+
`, e += ` --button-tertiary-hover: ${o.tertiary.hover};
|
|
3578
|
+
`, e += ` --button-tertiary-box-shadow: ${c};
|
|
3579
|
+
`, e += ` --button-tertiary-font: ${o.tertiary.font};
|
|
3580
|
+
`, e += ` --button-tertiary-text-color: ${o.tertiary.color};
|
|
3581
|
+
`, e += ` --button-tertiary-text-color-hover: ${o.tertiary.colorHover};
|
|
3582
|
+
`, e += ` --button-tertiary-background-hover: ${o.tertiary.backgroundHover};
|
|
3577
3583
|
`;
|
|
3578
3584
|
}
|
|
3579
3585
|
}
|
|
3580
|
-
if (
|
|
3581
|
-
const { borders:
|
|
3582
|
-
e += ` --border-radius: ${
|
|
3583
|
-
`, e += ` --border-thickness: ${
|
|
3586
|
+
if (n.borders) {
|
|
3587
|
+
const { borders: o } = n;
|
|
3588
|
+
e += ` --border-radius: ${o.radius};
|
|
3589
|
+
`, e += ` --border-thickness: ${o.thickness};
|
|
3584
3590
|
`;
|
|
3585
3591
|
}
|
|
3586
|
-
if (
|
|
3587
|
-
const { inputs:
|
|
3588
|
-
e += ` --input-border-radius: ${
|
|
3589
|
-
`, e += ` --input-border-thickness: ${
|
|
3590
|
-
`, e += ` --input-border-color: ${
|
|
3591
|
-
`, e += ` --input-border-style: ${
|
|
3592
|
-
`, e += ` --input-label-size: ${
|
|
3593
|
-
`, e += ` --input-label-height: ${
|
|
3594
|
-
`, e += ` --input-label-color: ${
|
|
3595
|
-
`, e += ` --input-placeholder-color: ${
|
|
3596
|
-
`, e += ` --input-label-alignment: ${
|
|
3597
|
-
`, e += ` --input-color: ${
|
|
3598
|
-
`, e += ` --input-height: ${
|
|
3599
|
-
`, e += ` --input-size: ${
|
|
3600
|
-
`, e += ` --input-field-color: ${
|
|
3601
|
-
`, e += ` --input-field-opacity: ${
|
|
3592
|
+
if (n.inputs) {
|
|
3593
|
+
const { inputs: o } = n;
|
|
3594
|
+
e += ` --input-border-radius: ${o.border.radius}px;
|
|
3595
|
+
`, e += ` --input-border-thickness: ${o.border.thickness}px;
|
|
3596
|
+
`, e += ` --input-border-color: ${o.border.color};
|
|
3597
|
+
`, e += ` --input-border-style: ${o.border.style};
|
|
3598
|
+
`, e += ` --input-label-size: ${o.label.size}px;
|
|
3599
|
+
`, e += ` --input-label-height: ${o.label.height}px;
|
|
3600
|
+
`, e += ` --input-label-color: ${o.label.color};
|
|
3601
|
+
`, e += ` --input-placeholder-color: ${o.placeholder.color};
|
|
3602
|
+
`, e += ` --input-label-alignment: ${o.label.alignment};
|
|
3603
|
+
`, e += ` --input-color: ${o.general.color};
|
|
3604
|
+
`, e += ` --input-height: ${o.general.height}px;
|
|
3605
|
+
`, e += ` --input-size: ${o.general.size}px;
|
|
3606
|
+
`, e += ` --input-field-color: ${o.field.color};
|
|
3607
|
+
`, e += ` --input-field-opacity: ${o.field.opacity / 100};
|
|
3602
3608
|
`;
|
|
3603
3609
|
}
|
|
3604
3610
|
return e += ` --scale-0: 0px;
|
|
@@ -3642,62 +3648,62 @@ const Ro = (o, r) => {
|
|
|
3642
3648
|
`, e += ` --border-md: var(--scale-2);
|
|
3643
3649
|
`, e += ` --border-lg: var(--scale-4);
|
|
3644
3650
|
`, e += "}", e;
|
|
3645
|
-
}, vo = (
|
|
3651
|
+
}, vo = (n) => {
|
|
3646
3652
|
const r = document.getElementById("dynamic-styles");
|
|
3647
3653
|
if (r)
|
|
3648
|
-
r.innerHTML =
|
|
3654
|
+
r.innerHTML = n;
|
|
3649
3655
|
else {
|
|
3650
3656
|
const e = document.createElement("style");
|
|
3651
|
-
e.id = "dynamic-styles", e.innerHTML =
|
|
3657
|
+
e.id = "dynamic-styles", e.innerHTML = n, document.head.appendChild(e);
|
|
3652
3658
|
}
|
|
3653
|
-
}, v = /* @__PURE__ */ new Set(), We = (
|
|
3659
|
+
}, v = /* @__PURE__ */ new Set(), We = (n) => {
|
|
3654
3660
|
const r = /* @__PURE__ */ new Map();
|
|
3655
|
-
return Object.entries(
|
|
3656
|
-
typeof e == "object" && Object.entries(e).forEach(([,
|
|
3657
|
-
var
|
|
3658
|
-
if (
|
|
3659
|
-
const
|
|
3660
|
-
r.has(
|
|
3661
|
+
return Object.entries(n).forEach(([, e]) => {
|
|
3662
|
+
typeof e == "object" && Object.entries(e).forEach(([, o]) => {
|
|
3663
|
+
var l, t;
|
|
3664
|
+
if (o && o.font) {
|
|
3665
|
+
const c = o.font.replace(/\s+/g, "+");
|
|
3666
|
+
r.has(c) || r.set(c, /* @__PURE__ */ new Set()), (l = r.get(c)) == null || l.add(o.weight), (t = r.get(c)) == null || t.add(o.boldWeight);
|
|
3661
3667
|
}
|
|
3662
3668
|
});
|
|
3663
3669
|
}), r;
|
|
3664
|
-
}, $e = (
|
|
3670
|
+
}, $e = (n) => {
|
|
3665
3671
|
const r = /* @__PURE__ */ new Map();
|
|
3666
|
-
return Object.entries(
|
|
3667
|
-
typeof e == "object" && Object.keys(e).forEach((
|
|
3668
|
-
var
|
|
3669
|
-
if (
|
|
3670
|
-
const
|
|
3671
|
-
r.has(
|
|
3672
|
+
return Object.entries(n).forEach(([, e]) => {
|
|
3673
|
+
typeof e == "object" && Object.keys(e).forEach((o) => {
|
|
3674
|
+
var l;
|
|
3675
|
+
if (o === "font" && e[o]) {
|
|
3676
|
+
const t = e[o].replace(/\s+/g, "+");
|
|
3677
|
+
r.has(t) || r.set(t, /* @__PURE__ */ new Set()), (l = r.get(t)) == null || l.add("400");
|
|
3672
3678
|
}
|
|
3673
3679
|
});
|
|
3674
3680
|
}), r;
|
|
3675
|
-
}, qe = (
|
|
3681
|
+
}, qe = (n) => {
|
|
3676
3682
|
v.forEach((r) => {
|
|
3677
|
-
if (!
|
|
3683
|
+
if (!n.has(r)) {
|
|
3678
3684
|
const e = document.querySelector(`link[data-font="${r}"]`);
|
|
3679
3685
|
e && e.remove(), v.delete(r);
|
|
3680
3686
|
}
|
|
3681
3687
|
});
|
|
3682
|
-
}, ze = (
|
|
3688
|
+
}, ze = (n) => {
|
|
3683
3689
|
const r = /* @__PURE__ */ new Set();
|
|
3684
|
-
|
|
3685
|
-
const
|
|
3686
|
-
if (r.add(
|
|
3687
|
-
const
|
|
3688
|
-
|
|
3690
|
+
n.forEach((e, o) => {
|
|
3691
|
+
const l = Array.from(e).sort().join(";"), t = `${o}:wght@${l}`;
|
|
3692
|
+
if (r.add(t), !v.has(t)) {
|
|
3693
|
+
const c = document.createElement("link");
|
|
3694
|
+
c.rel = "stylesheet", c.href = `https://fonts.googleapis.com/css2?family=${t}&display=swap`, c.setAttribute("data-font", t), document.head.appendChild(c), v.add(t);
|
|
3689
3695
|
}
|
|
3690
3696
|
}), qe(r);
|
|
3691
|
-
}, xo = (
|
|
3692
|
-
if (
|
|
3693
|
-
const r = We(
|
|
3694
|
-
e.forEach((
|
|
3695
|
-
if (
|
|
3696
|
-
const
|
|
3697
|
-
|
|
3697
|
+
}, xo = (n) => {
|
|
3698
|
+
if (n.fonts) {
|
|
3699
|
+
const r = We(n.fonts.desktop), e = $e(n.buttons), o = new Map(r);
|
|
3700
|
+
e.forEach((l, t) => {
|
|
3701
|
+
if (o.has(t)) {
|
|
3702
|
+
const c = o.get(t);
|
|
3703
|
+
l.forEach((s) => c == null ? void 0 : c.add(s));
|
|
3698
3704
|
} else
|
|
3699
|
-
|
|
3700
|
-
}), ze(
|
|
3705
|
+
o.set(t, new Set(l));
|
|
3706
|
+
}), ze(o);
|
|
3701
3707
|
}
|
|
3702
3708
|
}, H = [
|
|
3703
3709
|
{
|
|
@@ -3742,9 +3748,9 @@ const Ro = (o, r) => {
|
|
|
3742
3748
|
{ filename: "Ubuntu-Bold.ttf", weight: "700", style: "normal" }
|
|
3743
3749
|
]
|
|
3744
3750
|
}
|
|
3745
|
-
], je = (
|
|
3751
|
+
], je = (n) => {
|
|
3746
3752
|
var e;
|
|
3747
|
-
switch ((e =
|
|
3753
|
+
switch ((e = n.split(".").pop()) == null ? void 0 : e.toLowerCase()) {
|
|
3748
3754
|
case "woff2":
|
|
3749
3755
|
return "woff2";
|
|
3750
3756
|
case "woff":
|
|
@@ -3756,103 +3762,103 @@ const Ro = (o, r) => {
|
|
|
3756
3762
|
default:
|
|
3757
3763
|
return "opentype";
|
|
3758
3764
|
}
|
|
3759
|
-
}, Xe = (
|
|
3760
|
-
const
|
|
3765
|
+
}, Xe = (n, r, e, o) => {
|
|
3766
|
+
const l = je(r);
|
|
3761
3767
|
return `
|
|
3762
3768
|
@font-face {
|
|
3763
|
-
font-family: '${
|
|
3764
|
-
src: url('./src/assets/fonts/${r}') format('${
|
|
3769
|
+
font-family: '${n}';
|
|
3770
|
+
src: url('./src/assets/fonts/${r}') format('${l}');
|
|
3765
3771
|
font-weight: ${e};
|
|
3766
|
-
font-style: ${
|
|
3772
|
+
font-style: ${o};
|
|
3767
3773
|
font-display: swap;
|
|
3768
3774
|
}`;
|
|
3769
3775
|
}, Mo = () => {
|
|
3770
3776
|
if (document.getElementById("custom-fonts-styles"))
|
|
3771
3777
|
return;
|
|
3772
|
-
let
|
|
3778
|
+
let n = "";
|
|
3773
3779
|
H.forEach((e) => {
|
|
3774
|
-
e.files.forEach((
|
|
3775
|
-
|
|
3780
|
+
e.files.forEach((o) => {
|
|
3781
|
+
n += Xe(e.family, o.filename, o.weight, o.style) + `
|
|
3776
3782
|
`;
|
|
3777
3783
|
});
|
|
3778
3784
|
});
|
|
3779
3785
|
const r = document.createElement("style");
|
|
3780
|
-
r.id = "custom-fonts-styles", r.type = "text/css", r.textContent =
|
|
3781
|
-
console.log(`Font "${e.family}":`, e.files.map((
|
|
3786
|
+
r.id = "custom-fonts-styles", r.type = "text/css", r.textContent = n, document.head.appendChild(r), console.log("Custom fonts loaded:", H.map((e) => e.family).join(", ")), H.forEach((e) => {
|
|
3787
|
+
console.log(`Font "${e.family}":`, e.files.map((o) => `${o.filename} (${o.weight})`).join(", "));
|
|
3782
3788
|
});
|
|
3783
3789
|
};
|
|
3784
3790
|
function Ho() {
|
|
3785
3791
|
if (window.location.pathname.includes("/admin/builder"))
|
|
3786
3792
|
try {
|
|
3787
3793
|
const {
|
|
3788
|
-
editBlock:
|
|
3794
|
+
editBlock: n,
|
|
3789
3795
|
currentBlock: r,
|
|
3790
3796
|
blocks: e,
|
|
3791
|
-
setHeader:
|
|
3792
|
-
setFooter:
|
|
3793
|
-
setAnnouncement:
|
|
3794
|
-
} = ie.getState(), { currentPage:
|
|
3795
|
-
if (r ||
|
|
3797
|
+
setHeader: o,
|
|
3798
|
+
setFooter: l,
|
|
3799
|
+
setAnnouncement: t
|
|
3800
|
+
} = ie.getState(), { currentPage: c, pages: s } = O.getState(), { currentInstance: I, settingsInstance: S } = X.getState(), { setSettings: y } = V.getState();
|
|
3801
|
+
if (r || y(S.blockSettings), I && r) {
|
|
3796
3802
|
if (r === "header")
|
|
3797
|
-
|
|
3803
|
+
o(I);
|
|
3798
3804
|
else if (r === "footer")
|
|
3799
|
-
|
|
3805
|
+
l(I);
|
|
3800
3806
|
else if (r === "announcement")
|
|
3801
|
-
|
|
3807
|
+
t(I);
|
|
3802
3808
|
else if (r === "header" || r === "footer" || r === "announcement")
|
|
3803
3809
|
throw new Error(`Missing ${r} data.`);
|
|
3804
3810
|
}
|
|
3805
|
-
if (I &&
|
|
3806
|
-
const
|
|
3811
|
+
if (I && s && r && !["header", "footer", "announcement"].includes(r)) {
|
|
3812
|
+
const C = {
|
|
3807
3813
|
blockSettings: {}
|
|
3808
3814
|
};
|
|
3809
3815
|
if (!I.blockSettings)
|
|
3810
3816
|
throw new Error("currentInstance.blockSettings is undefined.");
|
|
3811
3817
|
if (Object.keys(I.blockSettings).filter((d) => !["displayName", "isAddable"].includes(d)).forEach((d) => {
|
|
3812
|
-
|
|
3813
|
-
}), !
|
|
3814
|
-
throw new Error(`Page "${
|
|
3815
|
-
if (!e[
|
|
3818
|
+
C.blockSettings[d] = I.blockSettings[d];
|
|
3819
|
+
}), !s[c])
|
|
3820
|
+
throw new Error(`Page "${c}" does not exist.`);
|
|
3821
|
+
if (!e[s[c].path].data || !e[s[c].path].data[r])
|
|
3816
3822
|
throw new Error(
|
|
3817
|
-
`Layer or block for page "${
|
|
3823
|
+
`Layer or block for page "${s[c].path}" and block "${r}" does not exist.`
|
|
3818
3824
|
);
|
|
3819
|
-
|
|
3820
|
-
name: e[
|
|
3821
|
-
value:
|
|
3825
|
+
n(s[c].path, r, {
|
|
3826
|
+
name: e[s[c].path].data[r].name,
|
|
3827
|
+
value: C
|
|
3822
3828
|
});
|
|
3823
3829
|
}
|
|
3824
|
-
} catch (
|
|
3825
|
-
console.error("Error in hotReload function:",
|
|
3830
|
+
} catch (n) {
|
|
3831
|
+
console.error("Error in hotReload function:", n);
|
|
3826
3832
|
}
|
|
3827
3833
|
}
|
|
3828
|
-
function No(
|
|
3829
|
-
if (!
|
|
3834
|
+
function No(n, r = !0) {
|
|
3835
|
+
if (!n || typeof n != "string")
|
|
3830
3836
|
return "";
|
|
3831
|
-
if (/<[a-z][\s\S]*>/i.test(
|
|
3832
|
-
return
|
|
3833
|
-
const
|
|
3837
|
+
if (/<[a-z][\s\S]*>/i.test(n))
|
|
3838
|
+
return n;
|
|
3839
|
+
const o = n.split(" "), l = 20;
|
|
3834
3840
|
if (r) {
|
|
3835
|
-
let
|
|
3836
|
-
return
|
|
3837
|
-
|
|
3838
|
-
}),
|
|
3841
|
+
let t = "", c = [];
|
|
3842
|
+
return o.forEach((s) => {
|
|
3843
|
+
s.length > l ? (c.length > 0 && (t += `<span style="hyphens: manual">${c.join(" ")} </span>`, c = []), t += `<span style="hyphens: auto" lang="en">${s} </span>`) : c.push(s);
|
|
3844
|
+
}), c.length > 0 && (t += `<span style="hyphens: manual">${c.join(" ")}</span>`), t;
|
|
3839
3845
|
} else {
|
|
3840
|
-
const
|
|
3841
|
-
let
|
|
3842
|
-
return
|
|
3843
|
-
I.length >
|
|
3846
|
+
const t = [];
|
|
3847
|
+
let c = [], s = 0;
|
|
3848
|
+
return o.forEach((I) => {
|
|
3849
|
+
I.length > l ? (c.length > 0 && (t.push(
|
|
3844
3850
|
/* @__PURE__ */ m(
|
|
3845
3851
|
"span",
|
|
3846
3852
|
{
|
|
3847
3853
|
style: { hyphens: "manual" },
|
|
3848
3854
|
children: [
|
|
3849
|
-
|
|
3855
|
+
c.join(" "),
|
|
3850
3856
|
" "
|
|
3851
3857
|
]
|
|
3852
3858
|
},
|
|
3853
|
-
|
|
3859
|
+
s++
|
|
3854
3860
|
)
|
|
3855
|
-
),
|
|
3861
|
+
), c = []), t.push(
|
|
3856
3862
|
/* @__PURE__ */ m(
|
|
3857
3863
|
"span",
|
|
3858
3864
|
{
|
|
@@ -3863,49 +3869,49 @@ function No(o, r = !0) {
|
|
|
3863
3869
|
" "
|
|
3864
3870
|
]
|
|
3865
3871
|
},
|
|
3866
|
-
|
|
3872
|
+
s++
|
|
3867
3873
|
)
|
|
3868
|
-
)) :
|
|
3869
|
-
}),
|
|
3870
|
-
/* @__PURE__ */
|
|
3874
|
+
)) : c.push(I);
|
|
3875
|
+
}), c.length > 0 && t.push(
|
|
3876
|
+
/* @__PURE__ */ i(
|
|
3871
3877
|
"span",
|
|
3872
3878
|
{
|
|
3873
3879
|
style: { hyphens: "manual" },
|
|
3874
|
-
children:
|
|
3880
|
+
children: c.join(" ")
|
|
3875
3881
|
},
|
|
3876
|
-
|
|
3882
|
+
s++
|
|
3877
3883
|
)
|
|
3878
|
-
),
|
|
3884
|
+
), t;
|
|
3879
3885
|
}
|
|
3880
3886
|
}
|
|
3881
3887
|
const Eo = () => {
|
|
3882
|
-
const
|
|
3883
|
-
return async (
|
|
3884
|
-
const
|
|
3888
|
+
const n = q.getState().apiUrls, r = U(), { notifications: e, setNotifications: o } = E(), { isAntistock: l } = x();
|
|
3889
|
+
return async (t, c, s, I, S) => {
|
|
3890
|
+
const y = z ? localStorage.getItem("fakeDomain") : window.location.hostname, C = `${n.slApi}/v1/public/${y}/tickets`;
|
|
3885
3891
|
try {
|
|
3886
|
-
const d = await
|
|
3892
|
+
const d = await j({
|
|
3887
3893
|
method: "post",
|
|
3888
|
-
url:
|
|
3894
|
+
url: C,
|
|
3889
3895
|
body: {
|
|
3890
|
-
title:
|
|
3891
|
-
firstMessage:
|
|
3896
|
+
title: t,
|
|
3897
|
+
firstMessage: c,
|
|
3892
3898
|
email: I,
|
|
3893
|
-
recaptcha:
|
|
3899
|
+
recaptcha: s,
|
|
3894
3900
|
tsId: K(),
|
|
3895
|
-
orderId:
|
|
3901
|
+
orderId: S
|
|
3896
3902
|
},
|
|
3897
3903
|
withToken: !1
|
|
3898
3904
|
});
|
|
3899
|
-
return
|
|
3905
|
+
return o([
|
|
3900
3906
|
...e,
|
|
3901
3907
|
{
|
|
3902
3908
|
id: N(),
|
|
3903
|
-
message:
|
|
3909
|
+
message: l ? "Support ticket successfully created. You can expect to hear from us soon." : "Ticket created successfully. We will contact you by mail",
|
|
3904
3910
|
status: "success"
|
|
3905
3911
|
}
|
|
3906
3912
|
]), r(`/ticket/${d.data.id}/${d.data.accessToken}`), d;
|
|
3907
3913
|
} catch (d) {
|
|
3908
|
-
|
|
3914
|
+
o([
|
|
3909
3915
|
...e,
|
|
3910
3916
|
{
|
|
3911
3917
|
id: N(),
|
|
@@ -3916,13 +3922,13 @@ const Eo = () => {
|
|
|
3916
3922
|
}
|
|
3917
3923
|
};
|
|
3918
3924
|
}, Uo = () => {
|
|
3919
|
-
const { pages:
|
|
3920
|
-
return
|
|
3921
|
-
e(
|
|
3922
|
-
}, [
|
|
3925
|
+
const { pages: n } = O(), [r, e] = p.useState(n);
|
|
3926
|
+
return p.useEffect(() => {
|
|
3927
|
+
e(n);
|
|
3928
|
+
}, [n]), r;
|
|
3923
3929
|
};
|
|
3924
|
-
var Z = /* @__PURE__ */ ((
|
|
3925
|
-
const Ve = "_wrapper_mlj8m_1", Ke = "_ticketContainer_mlj8m_23", Je = "_title_mlj8m_28", Ye = "_subtext_mlj8m_35", Qe = "_container_mlj8m_41", Ze = "_content_mlj8m_52", eo = "_messages_mlj8m_63", oo = "_input_mlj8m_81", no = "_textarea_mlj8m_94", ro = "_textareaAntistock_mlj8m_123", to = "_message_mlj8m_63", co = "_messageDate_mlj8m_153", ao = "_messageAntistock_mlj8m_159", io = "_myMessage_mlj8m_164", lo = "_otherMessage_mlj8m_171", so = "_button_mlj8m_178", Io = "_disabled_mlj8m_178", uo = "_loadingMessage_mlj8m_204",
|
|
3930
|
+
var Z = /* @__PURE__ */ ((n) => (n.NEW = "NEW", n.ANSWERED = "ANSWERED", n.NOT_ANSWERED = "NOT_ANSWERED", n.CLOSED = "CLOSED", n))(Z || {});
|
|
3931
|
+
const Ve = "_wrapper_mlj8m_1", Ke = "_ticketContainer_mlj8m_23", Je = "_title_mlj8m_28", Ye = "_subtext_mlj8m_35", Qe = "_container_mlj8m_41", Ze = "_content_mlj8m_52", eo = "_messages_mlj8m_63", oo = "_input_mlj8m_81", no = "_textarea_mlj8m_94", ro = "_textareaAntistock_mlj8m_123", to = "_message_mlj8m_63", co = "_messageDate_mlj8m_153", ao = "_messageAntistock_mlj8m_159", io = "_myMessage_mlj8m_164", lo = "_otherMessage_mlj8m_171", so = "_button_mlj8m_178", Io = "_disabled_mlj8m_178", uo = "_loadingMessage_mlj8m_204", u = {
|
|
3926
3932
|
wrapper: Ve,
|
|
3927
3933
|
ticketContainer: Ke,
|
|
3928
3934
|
title: Je,
|
|
@@ -3942,58 +3948,58 @@ const Ve = "_wrapper_mlj8m_1", Ke = "_ticketContainer_mlj8m_23", Je = "_title_ml
|
|
|
3942
3948
|
disabled: Io,
|
|
3943
3949
|
loadingMessage: uo
|
|
3944
3950
|
}, po = () => {
|
|
3945
|
-
const
|
|
3951
|
+
const n = window.location.pathname.split("/"), r = n[n.length - 1], e = n[n.length - 2], [o, l] = p.useState(!0), [t, c] = p.useState(null), [s, I] = p.useState(""), [S, y] = p.useState(null), { executeRecaptcha: C } = Se(), { isAntistock: d } = x(), h = (t == null ? void 0 : t.status) === Z.CLOSED, A = async () => {
|
|
3946
3952
|
if (e && r) {
|
|
3947
|
-
const { data:
|
|
3948
|
-
|
|
3953
|
+
const { data: a } = await me(e, r);
|
|
3954
|
+
c(a), l(!1);
|
|
3949
3955
|
}
|
|
3950
3956
|
};
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
const
|
|
3954
|
-
|
|
3957
|
+
p.useEffect(() => {
|
|
3958
|
+
A();
|
|
3959
|
+
const a = setInterval(() => {
|
|
3960
|
+
A();
|
|
3955
3961
|
}, 5e3);
|
|
3956
|
-
return () => clearInterval(
|
|
3962
|
+
return () => clearInterval(a);
|
|
3957
3963
|
}, []);
|
|
3958
|
-
const
|
|
3959
|
-
const
|
|
3960
|
-
if (!e || !r || !
|
|
3961
|
-
const
|
|
3962
|
-
content:
|
|
3964
|
+
const g = async () => {
|
|
3965
|
+
const a = await C();
|
|
3966
|
+
if (!e || !r || !a || !s.trim()) return;
|
|
3967
|
+
const L = {
|
|
3968
|
+
content: s,
|
|
3963
3969
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
3964
3970
|
id: Date.now(),
|
|
3965
3971
|
// Уникальный временный ID
|
|
3966
3972
|
isSellerReply: !1
|
|
3967
3973
|
};
|
|
3968
|
-
|
|
3969
|
-
(
|
|
3970
|
-
...
|
|
3971
|
-
messages: [...
|
|
3974
|
+
c(
|
|
3975
|
+
(f) => f ? {
|
|
3976
|
+
...f,
|
|
3977
|
+
messages: [...f.messages, L]
|
|
3972
3978
|
} : null
|
|
3973
|
-
),
|
|
3979
|
+
), y(L.id), I("");
|
|
3974
3980
|
try {
|
|
3975
|
-
await Ce(e, r,
|
|
3981
|
+
await Ce(e, r, s, a, K()), await A();
|
|
3976
3982
|
} finally {
|
|
3977
3983
|
setTimeout(() => {
|
|
3978
|
-
|
|
3984
|
+
y(null);
|
|
3979
3985
|
}, 1e4);
|
|
3980
3986
|
}
|
|
3981
|
-
},
|
|
3982
|
-
const
|
|
3983
|
-
if (
|
|
3987
|
+
}, b = (a) => {
|
|
3988
|
+
const L = /* @__PURE__ */ new Date(), f = new Date(a), w = Math.floor((L.getTime() - f.getTime()) / 1e3);
|
|
3989
|
+
if (w < 60)
|
|
3984
3990
|
return "just now";
|
|
3985
|
-
if (
|
|
3986
|
-
const P = Math.floor(
|
|
3991
|
+
if (w < 3600) {
|
|
3992
|
+
const P = Math.floor(w / 60);
|
|
3987
3993
|
return `${P} minute${P > 1 ? "s" : ""} ago`;
|
|
3988
|
-
} else if (
|
|
3989
|
-
const P = Math.floor(
|
|
3994
|
+
} else if (w < 10800) {
|
|
3995
|
+
const P = Math.floor(w / 3600);
|
|
3990
3996
|
return `${P} hour${P > 1 ? "s" : ""} ago`;
|
|
3991
|
-
} else return
|
|
3997
|
+
} else return f.getFullYear() === L.getFullYear() ? f.toLocaleDateString("en-US", {
|
|
3992
3998
|
month: "short",
|
|
3993
3999
|
day: "2-digit",
|
|
3994
4000
|
hour: "2-digit",
|
|
3995
4001
|
minute: "2-digit"
|
|
3996
|
-
}) :
|
|
4002
|
+
}) : f.toLocaleDateString("en-US", {
|
|
3997
4003
|
year: "numeric",
|
|
3998
4004
|
month: "short",
|
|
3999
4005
|
day: "2-digit",
|
|
@@ -4001,76 +4007,76 @@ const Ve = "_wrapper_mlj8m_1", Ke = "_ticketContainer_mlj8m_23", Je = "_title_ml
|
|
|
4001
4007
|
minute: "2-digit"
|
|
4002
4008
|
});
|
|
4003
4009
|
};
|
|
4004
|
-
return /* @__PURE__ */
|
|
4005
|
-
d ? /* @__PURE__ */ m("div", { className:
|
|
4006
|
-
/* @__PURE__ */
|
|
4010
|
+
return /* @__PURE__ */ i("div", { className: u.wrapper, children: o && !t ? /* @__PURE__ */ i(F, {}) : /* @__PURE__ */ m("div", { className: u.container, children: [
|
|
4011
|
+
d ? /* @__PURE__ */ m("div", { className: u.ticketContainer, children: [
|
|
4012
|
+
/* @__PURE__ */ i(
|
|
4007
4013
|
"div",
|
|
4008
4014
|
{
|
|
4009
|
-
className:
|
|
4015
|
+
className: u.title,
|
|
4010
4016
|
style: { fontSize: "var(--font-heading-h3-size)" },
|
|
4011
|
-
children:
|
|
4017
|
+
children: t == null ? void 0 : t.title
|
|
4012
4018
|
}
|
|
4013
4019
|
),
|
|
4014
|
-
/* @__PURE__ */
|
|
4020
|
+
/* @__PURE__ */ i(
|
|
4015
4021
|
"div",
|
|
4016
4022
|
{
|
|
4017
|
-
className:
|
|
4023
|
+
className: u.subtext,
|
|
4018
4024
|
style: { fontSize: "var(--font-body-md-size)" },
|
|
4019
4025
|
children: "We’re going to respond to your ticket shortly. You’ll receive updates in your email inbox. Feel free to close this page."
|
|
4020
4026
|
}
|
|
4021
4027
|
)
|
|
4022
|
-
] }) : /* @__PURE__ */
|
|
4028
|
+
] }) : /* @__PURE__ */ i("div", { className: u.title, children: `#${e} (${t == null ? void 0 : t.title})` }),
|
|
4023
4029
|
/* @__PURE__ */ m(
|
|
4024
4030
|
"div",
|
|
4025
4031
|
{
|
|
4026
|
-
className:
|
|
4032
|
+
className: u.content,
|
|
4027
4033
|
style: {
|
|
4028
4034
|
position: d ? "relative" : void 0,
|
|
4029
4035
|
border: d ? "1px solid var(--border-secondary)" : void 0
|
|
4030
4036
|
},
|
|
4031
4037
|
children: [
|
|
4032
|
-
/* @__PURE__ */
|
|
4038
|
+
/* @__PURE__ */ i("div", { className: u.messages, children: t == null ? void 0 : t.messages.sort((a, L) => new Date(a.createdAt).getTime() - new Date(L.createdAt).getTime()).map((a) => /* @__PURE__ */ m(
|
|
4033
4039
|
"div",
|
|
4034
4040
|
{
|
|
4035
|
-
className: B(
|
|
4036
|
-
[
|
|
4037
|
-
[
|
|
4038
|
-
[
|
|
4039
|
-
[
|
|
4041
|
+
className: B(u.message, {
|
|
4042
|
+
[u.messageAntistock]: d,
|
|
4043
|
+
[u.myMessage]: !a.isSellerReply,
|
|
4044
|
+
[u.otherMessage]: a.isSellerReply,
|
|
4045
|
+
[u.loadingMessage]: S === a.id
|
|
4040
4046
|
// Добавляем класс загрузки
|
|
4041
4047
|
}),
|
|
4042
4048
|
children: [
|
|
4043
|
-
/* @__PURE__ */
|
|
4044
|
-
|
|
4045
|
-
|
|
4049
|
+
/* @__PURE__ */ i("div", { className: u.messageContent, children: a.content }),
|
|
4050
|
+
S !== a.id && /* @__PURE__ */ i("div", { className: u.messageDate, children: b(a.createdAt) }),
|
|
4051
|
+
S === a.id && /* @__PURE__ */ i("div", { className: u.messageDate, children: /* @__PURE__ */ i(F, {}) })
|
|
4046
4052
|
]
|
|
4047
4053
|
},
|
|
4048
|
-
|
|
4054
|
+
a.id
|
|
4049
4055
|
)) }),
|
|
4050
|
-
/* @__PURE__ */ m("div", { className:
|
|
4051
|
-
/* @__PURE__ */
|
|
4056
|
+
/* @__PURE__ */ m("div", { className: u.input, children: [
|
|
4057
|
+
/* @__PURE__ */ i(
|
|
4052
4058
|
"textarea",
|
|
4053
4059
|
{
|
|
4054
|
-
disabled:
|
|
4055
|
-
className: B(
|
|
4056
|
-
[
|
|
4060
|
+
disabled: h,
|
|
4061
|
+
className: B(u.textarea, {
|
|
4062
|
+
[u.textareaAntistock]: d
|
|
4057
4063
|
}),
|
|
4058
|
-
value:
|
|
4059
|
-
placeholder:
|
|
4060
|
-
onChange: (
|
|
4061
|
-
onKeyDown: (
|
|
4062
|
-
|
|
4064
|
+
value: s,
|
|
4065
|
+
placeholder: h ? "The ticket has been closed. Need further assistance? Please submit a new request." : d ? "Type a message..." : "What worries you?",
|
|
4066
|
+
onChange: (a) => I(a.target.value),
|
|
4067
|
+
onKeyDown: (a) => {
|
|
4068
|
+
a.key === "Enter" && !a.shiftKey && (a.preventDefault(), g());
|
|
4063
4069
|
}
|
|
4064
4070
|
}
|
|
4065
4071
|
),
|
|
4066
|
-
/* @__PURE__ */
|
|
4072
|
+
/* @__PURE__ */ i(
|
|
4067
4073
|
"div",
|
|
4068
4074
|
{
|
|
4069
|
-
onClick:
|
|
4070
|
-
className: B(
|
|
4071
|
-
[
|
|
4075
|
+
onClick: g,
|
|
4076
|
+
className: B(u.button, {
|
|
4077
|
+
[u.disabled]: h
|
|
4072
4078
|
}),
|
|
4073
|
-
children: /* @__PURE__ */
|
|
4079
|
+
children: /* @__PURE__ */ i(we, { name: "PaperPlaneRight" })
|
|
4074
4080
|
}
|
|
4075
4081
|
)
|
|
4076
4082
|
] })
|