@instockng/storefront-ui 1.0.47 → 1.0.48
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/contexts/CartContext.d.ts.map +1 -1
- package/dist/index100.mjs +26 -20
- package/dist/index101.mjs +10 -13
- package/dist/index102.mjs +205 -55
- package/dist/index103.mjs +175 -13
- package/dist/index104.mjs +15 -32
- package/dist/index105.mjs +16 -17
- package/dist/index106.mjs +26 -27
- package/dist/index107.mjs +150 -21
- package/dist/index108.mjs +13 -12
- package/dist/index109.mjs +24 -14
- package/dist/index110.mjs +76 -39
- package/dist/index111.mjs +31 -16
- package/dist/index112.mjs +132 -255
- package/dist/index113.mjs +49 -64
- package/dist/index114.mjs +22 -7
- package/dist/index115.mjs +27 -2
- package/dist/index116.mjs +23 -2
- package/dist/index117.mjs +20 -28
- package/dist/index118.mjs +21 -2
- package/dist/index119.mjs +22 -34
- package/dist/index120.mjs +20 -42
- package/dist/index121.mjs +61 -231
- package/dist/index122.mjs +17 -5
- package/dist/index123.mjs +34 -129
- package/dist/index124.mjs +23 -67
- package/dist/index125.mjs +31 -84
- package/dist/index126.mjs +26 -28
- package/dist/index127.mjs +18 -8
- package/dist/index128.mjs +18 -72
- package/dist/index129.mjs +46 -3
- package/dist/index130.mjs +23 -2
- package/dist/index131.mjs +266 -81
- package/dist/index132.mjs +69 -53
- package/dist/index133.mjs +7 -5
- package/dist/index134.mjs +2 -5
- package/dist/index135.mjs +2 -179
- package/dist/index136.mjs +30 -50
- package/dist/index137.mjs +2 -69
- package/dist/index138.mjs +21 -2
- package/dist/index139.mjs +56 -2
- package/dist/index140.mjs +29 -2
- package/dist/index141.mjs +7 -2
- package/dist/index142.mjs +50 -16
- package/dist/index143.mjs +6 -32
- package/dist/index144.mjs +11 -37
- package/dist/index145.mjs +7 -18
- package/dist/index146.mjs +28 -18
- package/dist/index147.mjs +2 -2
- package/dist/index148.mjs +70 -20
- package/dist/index149.mjs +163 -42
- package/dist/index151.mjs +2 -30
- package/dist/index152.mjs +2 -18
- package/dist/index153.mjs +2 -2
- package/dist/index154.mjs +18 -2
- package/dist/index155.mjs +32 -2
- package/dist/index156.mjs +38 -2
- package/dist/index157.mjs +13 -67
- package/dist/index158.mjs +18 -2
- package/dist/index159.mjs +2 -53
- package/dist/index160.mjs +20 -2
- package/dist/index161.mjs +39 -29
- package/dist/index162.mjs +2 -152
- package/dist/index163.mjs +30 -2
- package/dist/index164.mjs +18 -2
- package/dist/index165.mjs +2 -19
- package/dist/index166.mjs +2 -2
- package/dist/index167.mjs +2 -2
- package/dist/index168.mjs +2 -26
- package/dist/index169.mjs +72 -2
- package/dist/index170.mjs +2 -2
- package/dist/index171.mjs +49 -20
- package/dist/index172.mjs +2 -23
- package/dist/index173.mjs +36 -2
- package/dist/index174.mjs +152 -2
- package/dist/index175.mjs +2 -2
- package/dist/index176.mjs +2 -23
- package/dist/index177.mjs +19 -2
- package/dist/index178.mjs +2 -23
- package/dist/index180.mjs +26 -2
- package/dist/index181.mjs +2 -2
- package/dist/index182.mjs +2 -23
- package/dist/index183.mjs +24 -2
- package/dist/index184.mjs +15 -15
- package/dist/index185.mjs +2 -2
- package/dist/index186.mjs +2 -2
- package/dist/index187.mjs +2 -2
- package/dist/index188.mjs +23 -2
- package/dist/index189.mjs +2 -2
- package/dist/index190.mjs +23 -2
- package/dist/index191.mjs +2 -2
- package/dist/index192.mjs +2 -2
- package/dist/index193.mjs +2 -127
- package/dist/index194.mjs +23 -2
- package/dist/index195.mjs +2 -74
- package/dist/index196.mjs +20 -71
- package/dist/index197.mjs +2 -21
- package/dist/index198.mjs +2 -56
- package/dist/index199.mjs +2 -29
- package/dist/index200.mjs +2 -7
- package/dist/index201.mjs +2 -52
- package/dist/index202.mjs +2 -6
- package/dist/index203.mjs +2 -12
- package/dist/index204.mjs +2 -7
- package/dist/index205.mjs +127 -28
- package/dist/index206.mjs +2 -2
- package/dist/index207.mjs +73 -69
- package/dist/index208.mjs +71 -164
- package/dist/index209.mjs +31 -2
- package/dist/index210.mjs +11 -2
- package/dist/index211.mjs +4 -2
- package/dist/index212.mjs +4 -2
- package/dist/index213.mjs +13 -2
- package/dist/index214.mjs +7 -2
- package/dist/index215.mjs +12 -2
- package/dist/index216.mjs +5 -2
- package/dist/index217.mjs +33 -108
- package/dist/index218.mjs +31 -2
- package/dist/index219.mjs +28 -2
- package/dist/index220.mjs +58 -34
- package/dist/index221.mjs +2 -2
- package/dist/index222.mjs +2 -244
- package/dist/index223.mjs +2 -2
- package/dist/index224.mjs +2 -33
- package/dist/index225.mjs +2 -65
- package/dist/index226.mjs +2 -25
- package/dist/index227.mjs +108 -2
- package/dist/index228.mjs +2 -2
- package/dist/index230.mjs +2 -2
- package/dist/index231.mjs +2 -2
- package/dist/index232.mjs +2 -2
- package/dist/index233.mjs +37 -2
- package/dist/index234.mjs +2 -2
- package/dist/index236.mjs +2 -2
- package/dist/index237.mjs +244 -4
- package/dist/index238.mjs +2 -2
- package/dist/index239.mjs +33 -2
- package/dist/index240.mjs +64 -30
- package/dist/index241.mjs +24 -10
- package/dist/index242.mjs +2 -4
- package/dist/index243.mjs +2 -4
- package/dist/index244.mjs +2 -13
- package/dist/index245.mjs +2 -7
- package/dist/index246.mjs +2 -12
- package/dist/index247.mjs +2 -5
- package/dist/index248.mjs +2 -33
- package/dist/index249.mjs +4 -31
- package/dist/index250.mjs +2 -28
- package/dist/index251.mjs +2 -61
- package/dist/index252.mjs +2 -2
- package/dist/index253.mjs +2 -18
- package/dist/index254.mjs +13 -42
- package/dist/index255.mjs +47 -2
- package/dist/index260.mjs +1 -1
- package/dist/index261.mjs +2 -1
- package/dist/index262.mjs +2 -2
- package/dist/index263.mjs +2 -2
- package/dist/index264.mjs +17 -2
- package/dist/index265.mjs +13 -3
- package/dist/index266.mjs +6 -2
- package/dist/index267.mjs +30 -2
- package/dist/index268.mjs +2 -17
- package/dist/index269.mjs +2 -13
- package/dist/index270.mjs +2 -6
- package/dist/index271.mjs +2 -30
- package/dist/index3.mjs +16 -16
- package/dist/index38.mjs +1 -1
- package/dist/index40.mjs +1 -1
- package/dist/index51.mjs +17 -17
- package/dist/index52.mjs +2 -2
- package/dist/index65.mjs +153 -2
- package/dist/index66.mjs +2 -153
- package/dist/index70.mjs +1 -1
- package/dist/index74.mjs +35 -35
- package/dist/index75.mjs +1 -1
- package/dist/index76.mjs +2 -2
- package/dist/index77.mjs +2 -2
- package/dist/index79.mjs +34 -2
- package/dist/index80.mjs +43 -2
- package/dist/index81.mjs +232 -25
- package/dist/index82.mjs +5 -17
- package/dist/index83.mjs +125 -206
- package/dist/index84.mjs +67 -179
- package/dist/index85.mjs +85 -20
- package/dist/index86.mjs +28 -22
- package/dist/index87.mjs +8 -32
- package/dist/index88.mjs +71 -152
- package/dist/index89.mjs +3 -19
- package/dist/index90.mjs +2 -31
- package/dist/index91.mjs +81 -82
- package/dist/index92.mjs +53 -37
- package/dist/index93.mjs +5 -144
- package/dist/index94.mjs +4 -54
- package/dist/index95.mjs +177 -21
- package/dist/index96.mjs +52 -26
- package/dist/index97.mjs +69 -23
- package/dist/index98.mjs +2 -25
- package/dist/index99.mjs +2 -21
- package/package.json +1 -1
- package/src/contexts/CartContext.tsx +2 -0
package/dist/index267.mjs
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
2
|
+
import r from "./index81.mjs";
|
|
3
|
+
import c from "./index145.mjs";
|
|
4
|
+
const p = c.hasStandardBrowserEnv ? (
|
|
5
|
+
// Standard browser envs support document.cookie
|
|
6
|
+
{
|
|
7
|
+
write(e, t, n, i, s, u) {
|
|
8
|
+
const o = [e + "=" + encodeURIComponent(t)];
|
|
9
|
+
r.isNumber(n) && o.push("expires=" + new Date(n).toGMTString()), r.isString(i) && o.push("path=" + i), r.isString(s) && o.push("domain=" + s), u === !0 && o.push("secure"), document.cookie = o.join("; ");
|
|
10
|
+
},
|
|
11
|
+
read(e) {
|
|
12
|
+
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
|
13
|
+
return t ? decodeURIComponent(t[3]) : null;
|
|
14
|
+
},
|
|
15
|
+
remove(e) {
|
|
16
|
+
this.write(e, "", Date.now() - 864e5);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
) : (
|
|
20
|
+
// Non-standard browser env (web workers, react-native) lack needed support.
|
|
21
|
+
{
|
|
22
|
+
write() {
|
|
23
|
+
},
|
|
24
|
+
read() {
|
|
25
|
+
return null;
|
|
26
|
+
},
|
|
27
|
+
remove() {
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
);
|
|
3
31
|
export {
|
|
4
|
-
|
|
32
|
+
p as default
|
|
5
33
|
};
|
package/dist/index268.mjs
CHANGED
|
@@ -1,20 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
3
|
-
t = t || 10;
|
|
4
|
-
const c = new Array(t), o = new Array(t);
|
|
5
|
-
let e = 0, r = 0, i;
|
|
6
|
-
return n = n !== void 0 ? n : 1e3, function(h) {
|
|
7
|
-
const d = Date.now(), a = o[r];
|
|
8
|
-
i || (i = d), c[e] = h, o[e] = d;
|
|
9
|
-
let f = r, u = 0;
|
|
10
|
-
for (; f !== e; )
|
|
11
|
-
u += c[f++], f = f % t;
|
|
12
|
-
if (e = (e + 1) % t, e === r && (r = (r + 1) % t), d - i < n)
|
|
13
|
-
return;
|
|
14
|
-
const w = a && d - a;
|
|
15
|
-
return w ? Math.round(u * 1e3 / w) : void 0;
|
|
16
|
-
};
|
|
17
|
-
}
|
|
2
|
+
const e = {};
|
|
18
3
|
export {
|
|
19
|
-
|
|
4
|
+
e as default
|
|
20
5
|
};
|
package/dist/index269.mjs
CHANGED
|
@@ -1,16 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
3
|
-
let s = 0, u = 1e3 / a, e, t;
|
|
4
|
-
const n = (l, o = Date.now()) => {
|
|
5
|
-
s = o, e = null, t && (clearTimeout(t), t = null), r(...l);
|
|
6
|
-
};
|
|
7
|
-
return [(...l) => {
|
|
8
|
-
const o = Date.now(), i = o - s;
|
|
9
|
-
i >= u ? n(l, o) : (e = l, t || (t = setTimeout(() => {
|
|
10
|
-
t = null, n(e);
|
|
11
|
-
}, u - i)));
|
|
12
|
-
}, () => e && n(e)];
|
|
13
|
-
}
|
|
2
|
+
var o = { exports: {} };
|
|
14
3
|
export {
|
|
15
|
-
|
|
4
|
+
o as __module
|
|
16
5
|
};
|
package/dist/index270.mjs
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
3
|
-
const n = o.hasStandardBrowserEnv ? /* @__PURE__ */ ((r, e) => (t) => (t = new URL(t, o.origin), r.protocol === t.protocol && r.host === t.host && (e || r.port === t.port)))(
|
|
4
|
-
new URL(o.origin),
|
|
5
|
-
o.navigator && /(msie|trident)/i.test(o.navigator.userAgent)
|
|
6
|
-
) : () => !0;
|
|
2
|
+
var e = {};
|
|
7
3
|
export {
|
|
8
|
-
|
|
4
|
+
e as __exports
|
|
9
5
|
};
|
package/dist/index271.mjs
CHANGED
|
@@ -1,33 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
3
|
-
import c from "./index204.mjs";
|
|
4
|
-
const p = c.hasStandardBrowserEnv ? (
|
|
5
|
-
// Standard browser envs support document.cookie
|
|
6
|
-
{
|
|
7
|
-
write(e, t, n, i, s, u) {
|
|
8
|
-
const o = [e + "=" + encodeURIComponent(t)];
|
|
9
|
-
r.isNumber(n) && o.push("expires=" + new Date(n).toGMTString()), r.isString(i) && o.push("path=" + i), r.isString(s) && o.push("domain=" + s), u === !0 && o.push("secure"), document.cookie = o.join("; ");
|
|
10
|
-
},
|
|
11
|
-
read(e) {
|
|
12
|
-
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
|
13
|
-
return t ? decodeURIComponent(t[3]) : null;
|
|
14
|
-
},
|
|
15
|
-
remove(e) {
|
|
16
|
-
this.write(e, "", Date.now() - 864e5);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
) : (
|
|
20
|
-
// Non-standard browser env (web workers, react-native) lack needed support.
|
|
21
|
-
{
|
|
22
|
-
write() {
|
|
23
|
-
},
|
|
24
|
-
read() {
|
|
25
|
-
return null;
|
|
26
|
-
},
|
|
27
|
-
remove() {
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
);
|
|
2
|
+
var e = {};
|
|
31
3
|
export {
|
|
32
|
-
|
|
4
|
+
e as __exports
|
|
33
5
|
};
|
package/dist/index3.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsxs as it, jsx as ut } from "react/jsx-runtime";
|
|
3
|
-
import { createContext as mt, useState as
|
|
3
|
+
import { createContext as mt, useState as _, useRef as g, useEffect as d, useCallback as n, useContext as dt } from "react";
|
|
4
4
|
import "./index21.mjs";
|
|
5
5
|
import { queryKeys as ft } from "./index30.mjs";
|
|
6
6
|
import { useGetCart as lt, useCreateCart as Ct, useAddCartItem as It, useUpdateCartItem as wt, useRemoveCartItem as pt, useApplyDiscount as kt, useRemoveDiscount as yt, useUpdateCart as ht, useCheckoutCart as vt } from "./index33.mjs";
|
|
@@ -11,7 +11,7 @@ import { useTikTokPixel as Mt } from "./index5.mjs";
|
|
|
11
11
|
import { getFbCookies as Et, getTikTokCookies as St } from "./index20.mjs";
|
|
12
12
|
const f = "oms_cart_id", j = mt(null);
|
|
13
13
|
function Lt({ children: l, brandSlug: u, initialCartId: C, shoppingCartProps: q }) {
|
|
14
|
-
const [t, m] =
|
|
14
|
+
const [t, m] = _(C || null), [I, T] = _(!1), [O, Q] = _(!1), x = g(!1), R = g(!1), A = g(!1), G = Tt(), { trackAddToCart: D, trackInitiateCheckout: P } = Dt(), { trackAddToCart: M, trackInitiateCheckout: b } = Mt();
|
|
15
15
|
d(() => {
|
|
16
16
|
Q(!0);
|
|
17
17
|
}, []), d(() => {
|
|
@@ -19,7 +19,7 @@ function Lt({ children: l, brandSlug: u, initialCartId: C, shoppingCartProps: q
|
|
|
19
19
|
x.current = !0;
|
|
20
20
|
const r = new URLSearchParams(window.location.search).get("cartId");
|
|
21
21
|
if (r) {
|
|
22
|
-
m(r);
|
|
22
|
+
m(r), T(!0);
|
|
23
23
|
return;
|
|
24
24
|
}
|
|
25
25
|
const o = localStorage.getItem(f);
|
|
@@ -29,7 +29,7 @@ function Lt({ children: l, brandSlug: u, initialCartId: C, shoppingCartProps: q
|
|
|
29
29
|
enabled: !!t,
|
|
30
30
|
retry: !1
|
|
31
31
|
// Don't retry on failure - cart might be invalid/expired
|
|
32
|
-
}),
|
|
32
|
+
}), E = Ct({
|
|
33
33
|
onSuccess: (e) => {
|
|
34
34
|
if ("error" in e) {
|
|
35
35
|
console.error("Failed to create cart:", e.error);
|
|
@@ -46,12 +46,12 @@ function Lt({ children: l, brandSlug: u, initialCartId: C, shoppingCartProps: q
|
|
|
46
46
|
if (R.current) return;
|
|
47
47
|
R.current = !0;
|
|
48
48
|
const e = setTimeout(() => {
|
|
49
|
-
!(typeof window < "u" ? localStorage.getItem(f) : null) && !C &&
|
|
49
|
+
!(typeof window < "u" ? localStorage.getItem(f) : null) && !C && E.mutate(u);
|
|
50
50
|
}, 150);
|
|
51
51
|
return () => clearTimeout(e);
|
|
52
52
|
}, []), d(() => {
|
|
53
|
-
w && t && !
|
|
54
|
-
|
|
53
|
+
w && t && !A.current && (A.current = !0, console.warn("Cart fetch failed, creating new cart:", w), m(null), typeof window < "u" && localStorage.removeItem(f), setTimeout(() => {
|
|
54
|
+
E.mutate(u), A.current = !1;
|
|
55
55
|
}, 100));
|
|
56
56
|
}, [w, t, u]);
|
|
57
57
|
const Y = It(t || "", {
|
|
@@ -80,13 +80,13 @@ function Lt({ children: l, brandSlug: u, initialCartId: C, shoppingCartProps: q
|
|
|
80
80
|
async (e, r, o, p, a) => {
|
|
81
81
|
var L;
|
|
82
82
|
if (!t) throw new Error("No cart ID");
|
|
83
|
-
const { fbc: k, fbp: y } = Et(), { ttp: s, ttclid:
|
|
83
|
+
const { fbc: k, fbp: y } = Et(), { ttp: s, ttclid: S } = St(), U = await Y.mutateAsync({
|
|
84
84
|
sku: p,
|
|
85
85
|
quantity: a,
|
|
86
86
|
fbc: k,
|
|
87
87
|
fbp: y,
|
|
88
88
|
ttp: s,
|
|
89
|
-
ttclid:
|
|
89
|
+
ttclid: S,
|
|
90
90
|
refreshRecommendations: !I
|
|
91
91
|
});
|
|
92
92
|
if ("error" in U) return;
|
|
@@ -98,12 +98,12 @@ function Lt({ children: l, brandSlug: u, initialCartId: C, shoppingCartProps: q
|
|
|
98
98
|
), K = h == null ? void 0 : h[h.length - 1];
|
|
99
99
|
if (K) {
|
|
100
100
|
const v = `cart_${t}_item_${K.id}`;
|
|
101
|
-
|
|
101
|
+
D(e, r, o, a, v), M(e, r, o, a, v);
|
|
102
102
|
} else
|
|
103
|
-
|
|
103
|
+
D(e, r, o, a), M(e, r, o, a);
|
|
104
104
|
},
|
|
105
105
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
106
|
-
[t, I,
|
|
106
|
+
[t, I, D, M]
|
|
107
107
|
), tt = n(
|
|
108
108
|
async (e, r) => {
|
|
109
109
|
if (!t) throw new Error("No cart ID");
|
|
@@ -131,15 +131,15 @@ function Lt({ children: l, brandSlug: u, initialCartId: C, shoppingCartProps: q
|
|
|
131
131
|
}, [t]), F = n(() => {
|
|
132
132
|
m(null), typeof window < "u" && localStorage.removeItem(f);
|
|
133
133
|
}, []), nt = n(() => {
|
|
134
|
-
F(),
|
|
134
|
+
F(), E.mutate(u);
|
|
135
135
|
}, [u]), at = n(() => {
|
|
136
|
-
|
|
136
|
+
T(!0);
|
|
137
137
|
}, []), N = n(() => {
|
|
138
|
-
|
|
138
|
+
T(!1);
|
|
139
139
|
}, []), ct = n(() => {
|
|
140
140
|
var a, k, y;
|
|
141
141
|
if (!i || !t) return;
|
|
142
|
-
const e = Number(((a = i.pricing) == null ? void 0 : a.total) || 0), r = ((k = i.items) == null ? void 0 : k.reduce((s,
|
|
142
|
+
const e = Number(((a = i.pricing) == null ? void 0 : a.total) || 0), r = ((k = i.items) == null ? void 0 : k.reduce((s, S) => s + S.quantity, 0)) || 0, o = `cart_${t}_checkout`, p = ((y = i.items) == null ? void 0 : y.map((s) => ({
|
|
143
143
|
content_id: s.variant.sku,
|
|
144
144
|
quantity: s.quantity,
|
|
145
145
|
price: Number(s.variant.price)
|
package/dist/index38.mjs
CHANGED
package/dist/index40.mjs
CHANGED
package/dist/index51.mjs
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import a from "./
|
|
3
|
-
import p from "./
|
|
4
|
-
import m from "./
|
|
5
|
-
import i from "./
|
|
6
|
-
import f from "./
|
|
7
|
-
import l from "./
|
|
8
|
-
import c from "./
|
|
9
|
-
import d from "./
|
|
10
|
-
import u from "./
|
|
11
|
-
import { VERSION as x } from "./
|
|
12
|
-
import C from "./
|
|
13
|
-
import A from "./
|
|
14
|
-
import E from "./
|
|
15
|
-
import O from "./
|
|
16
|
-
import S from "./
|
|
17
|
-
import H from "./
|
|
18
|
-
import T from "./
|
|
2
|
+
import a from "./index81.mjs";
|
|
3
|
+
import p from "./index82.mjs";
|
|
4
|
+
import m from "./index83.mjs";
|
|
5
|
+
import i from "./index84.mjs";
|
|
6
|
+
import f from "./index85.mjs";
|
|
7
|
+
import l from "./index86.mjs";
|
|
8
|
+
import c from "./index87.mjs";
|
|
9
|
+
import d from "./index88.mjs";
|
|
10
|
+
import u from "./index89.mjs";
|
|
11
|
+
import { VERSION as x } from "./index90.mjs";
|
|
12
|
+
import C from "./index91.mjs";
|
|
13
|
+
import A from "./index92.mjs";
|
|
14
|
+
import E from "./index93.mjs";
|
|
15
|
+
import O from "./index94.mjs";
|
|
16
|
+
import S from "./index95.mjs";
|
|
17
|
+
import H from "./index96.mjs";
|
|
18
|
+
import T from "./index97.mjs";
|
|
19
19
|
function n(o) {
|
|
20
20
|
const t = new m(o), e = p(m.prototype.request, t);
|
|
21
21
|
return a.extend(e, m.prototype, t, { allOwnKeys: !0 }), a.extend(e, t, null, { allOwnKeys: !0 }), e.create = function(s) {
|
package/dist/index52.mjs
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
var p = Object.defineProperty;
|
|
3
3
|
var k = (r, e, i) => e in r ? p(r, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : r[e] = i;
|
|
4
4
|
var h = (r, e, i) => k(r, typeof e != "symbol" ? e + "" : e, i);
|
|
5
|
-
import { serialize as j } from "./
|
|
6
|
-
import { mergePath as U, replaceUrlParam as P, buildSearchParams as S, removeIndexString as w, replaceUrlProtocol as x, deepMerge as C } from "./
|
|
5
|
+
import { serialize as j } from "./index79.mjs";
|
|
6
|
+
import { mergePath as U, replaceUrlParam as P, buildSearchParams as S, removeIndexString as w, replaceUrlProtocol as x, deepMerge as C } from "./index80.mjs";
|
|
7
7
|
var v = (r, e) => new Proxy(() => {
|
|
8
8
|
}, {
|
|
9
9
|
get(t, s) {
|
package/dist/index65.mjs
CHANGED
|
@@ -1,5 +1,156 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
2
|
+
import { __module as l } from "./index72.mjs";
|
|
3
|
+
import "./index73.mjs";
|
|
4
|
+
import j from "react";
|
|
5
|
+
import { __require as A } from "./index74.mjs";
|
|
6
|
+
import { __require as O } from "./index75.mjs";
|
|
7
|
+
import { __require as x } from "./index76.mjs";
|
|
8
|
+
import { __require as F } from "./index77.mjs";
|
|
9
|
+
import { __exports as M } from "./index78.mjs";
|
|
10
|
+
var p;
|
|
11
|
+
function W() {
|
|
12
|
+
return p ? l.exports : (p = 1, function(g, u) {
|
|
13
|
+
Object.defineProperty(u, "__esModule", {
|
|
14
|
+
value: !0
|
|
15
|
+
});
|
|
16
|
+
function _(e, o) {
|
|
17
|
+
for (var t in o) Object.defineProperty(e, t, {
|
|
18
|
+
enumerable: !0,
|
|
19
|
+
get: o[t]
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
_(u, {
|
|
23
|
+
Router: function() {
|
|
24
|
+
return i.default;
|
|
25
|
+
},
|
|
26
|
+
createRouter: function() {
|
|
27
|
+
return P;
|
|
28
|
+
},
|
|
29
|
+
// Export the singletonRouter and this is the public API.
|
|
30
|
+
default: function() {
|
|
31
|
+
return v;
|
|
32
|
+
},
|
|
33
|
+
makePublicRouterInstance: function() {
|
|
34
|
+
return E;
|
|
35
|
+
},
|
|
36
|
+
useRouter: function() {
|
|
37
|
+
return q;
|
|
38
|
+
},
|
|
39
|
+
withRouter: function() {
|
|
40
|
+
return w.default;
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
const f = M, R = /* @__PURE__ */ f._(j), i = /* @__PURE__ */ f._(A()), b = O(), y = /* @__PURE__ */ f._(x()), w = /* @__PURE__ */ f._(F()), n = {
|
|
44
|
+
router: null,
|
|
45
|
+
readyCallbacks: [],
|
|
46
|
+
ready(e) {
|
|
47
|
+
if (this.router) return e();
|
|
48
|
+
typeof window < "u" && this.readyCallbacks.push(e);
|
|
49
|
+
}
|
|
50
|
+
}, d = [
|
|
51
|
+
"pathname",
|
|
52
|
+
"route",
|
|
53
|
+
"query",
|
|
54
|
+
"asPath",
|
|
55
|
+
"components",
|
|
56
|
+
"isFallback",
|
|
57
|
+
"basePath",
|
|
58
|
+
"locale",
|
|
59
|
+
"locales",
|
|
60
|
+
"defaultLocale",
|
|
61
|
+
"isReady",
|
|
62
|
+
"isPreview",
|
|
63
|
+
"isLocaleDomain",
|
|
64
|
+
"domainLocales"
|
|
65
|
+
], C = [
|
|
66
|
+
"routeChangeStart",
|
|
67
|
+
"beforeHistoryChange",
|
|
68
|
+
"routeChangeComplete",
|
|
69
|
+
"routeChangeError",
|
|
70
|
+
"hashChangeStart",
|
|
71
|
+
"hashChangeComplete"
|
|
72
|
+
], h = [
|
|
73
|
+
"push",
|
|
74
|
+
"replace",
|
|
75
|
+
"reload",
|
|
76
|
+
"back",
|
|
77
|
+
"prefetch",
|
|
78
|
+
"beforePopState"
|
|
79
|
+
];
|
|
80
|
+
Object.defineProperty(n, "events", {
|
|
81
|
+
get() {
|
|
82
|
+
return i.default.events;
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
function m() {
|
|
86
|
+
if (!n.router) {
|
|
87
|
+
const e = `No router instance found.
|
|
88
|
+
You should only use "next/router" on the client side of your app.
|
|
89
|
+
`;
|
|
90
|
+
throw new Error(e);
|
|
91
|
+
}
|
|
92
|
+
return n.router;
|
|
93
|
+
}
|
|
94
|
+
d.forEach((e) => {
|
|
95
|
+
Object.defineProperty(n, e, {
|
|
96
|
+
get() {
|
|
97
|
+
return m()[e];
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
}), h.forEach((e) => {
|
|
101
|
+
n[e] = function() {
|
|
102
|
+
for (var o = arguments.length, t = new Array(o), r = 0; r < o; r++)
|
|
103
|
+
t[r] = arguments[r];
|
|
104
|
+
return m()[e](...t);
|
|
105
|
+
};
|
|
106
|
+
}), C.forEach((e) => {
|
|
107
|
+
n.ready(() => {
|
|
108
|
+
i.default.events.on(e, function() {
|
|
109
|
+
for (var o = arguments.length, t = new Array(o), r = 0; r < o; r++)
|
|
110
|
+
t[r] = arguments[r];
|
|
111
|
+
const s = "on" + e.charAt(0).toUpperCase() + e.substring(1), c = n;
|
|
112
|
+
if (c[s])
|
|
113
|
+
try {
|
|
114
|
+
c[s](...t);
|
|
115
|
+
} catch (a) {
|
|
116
|
+
console.error("Error when running the Router event: " + s), console.error((0, y.default)(a) ? a.message + `
|
|
117
|
+
` + a.stack : a + "");
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
const v = n;
|
|
123
|
+
function q() {
|
|
124
|
+
const e = R.default.useContext(b.RouterContext);
|
|
125
|
+
if (!e)
|
|
126
|
+
throw new Error("NextRouter was not mounted. https://nextjs.org/docs/messages/next-router-not-mounted");
|
|
127
|
+
return e;
|
|
128
|
+
}
|
|
129
|
+
function P() {
|
|
130
|
+
for (var e = arguments.length, o = new Array(e), t = 0; t < e; t++)
|
|
131
|
+
o[t] = arguments[t];
|
|
132
|
+
return n.router = new i.default(...o), n.readyCallbacks.forEach((r) => r()), n.readyCallbacks = [], n.router;
|
|
133
|
+
}
|
|
134
|
+
function E(e) {
|
|
135
|
+
const o = e, t = {};
|
|
136
|
+
for (const r of d) {
|
|
137
|
+
if (typeof o[r] == "object") {
|
|
138
|
+
t[r] = Object.assign(Array.isArray(o[r]) ? [] : {}, o[r]);
|
|
139
|
+
continue;
|
|
140
|
+
}
|
|
141
|
+
t[r] = o[r];
|
|
142
|
+
}
|
|
143
|
+
return t.events = i.default.events, h.forEach((r) => {
|
|
144
|
+
t[r] = function() {
|
|
145
|
+
for (var s = arguments.length, c = new Array(s), a = 0; a < s; a++)
|
|
146
|
+
c[a] = arguments[a];
|
|
147
|
+
return o[r](...c);
|
|
148
|
+
};
|
|
149
|
+
}), t;
|
|
150
|
+
}
|
|
151
|
+
(typeof u.default == "function" || typeof u.default == "object" && u.default !== null) && typeof u.default.__esModule > "u" && (Object.defineProperty(u.default, "__esModule", { value: !0 }), Object.assign(u.default, u), g.exports = u.default);
|
|
152
|
+
}(l, l.exports), l.exports);
|
|
153
|
+
}
|
|
3
154
|
export {
|
|
4
|
-
|
|
155
|
+
W as __require
|
|
5
156
|
};
|
package/dist/index66.mjs
CHANGED
|
@@ -1,156 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
3
|
-
import "./index73.mjs";
|
|
4
|
-
import j from "react";
|
|
5
|
-
import { __require as A } from "./index74.mjs";
|
|
6
|
-
import { __require as O } from "./index75.mjs";
|
|
7
|
-
import { __require as x } from "./index76.mjs";
|
|
8
|
-
import { __require as F } from "./index77.mjs";
|
|
9
|
-
import { __exports as M } from "./index78.mjs";
|
|
10
|
-
var p;
|
|
11
|
-
function W() {
|
|
12
|
-
return p ? l.exports : (p = 1, function(g, u) {
|
|
13
|
-
Object.defineProperty(u, "__esModule", {
|
|
14
|
-
value: !0
|
|
15
|
-
});
|
|
16
|
-
function _(e, o) {
|
|
17
|
-
for (var t in o) Object.defineProperty(e, t, {
|
|
18
|
-
enumerable: !0,
|
|
19
|
-
get: o[t]
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
_(u, {
|
|
23
|
-
Router: function() {
|
|
24
|
-
return i.default;
|
|
25
|
-
},
|
|
26
|
-
createRouter: function() {
|
|
27
|
-
return P;
|
|
28
|
-
},
|
|
29
|
-
// Export the singletonRouter and this is the public API.
|
|
30
|
-
default: function() {
|
|
31
|
-
return v;
|
|
32
|
-
},
|
|
33
|
-
makePublicRouterInstance: function() {
|
|
34
|
-
return E;
|
|
35
|
-
},
|
|
36
|
-
useRouter: function() {
|
|
37
|
-
return q;
|
|
38
|
-
},
|
|
39
|
-
withRouter: function() {
|
|
40
|
-
return w.default;
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
const f = M, R = /* @__PURE__ */ f._(j), i = /* @__PURE__ */ f._(A()), b = O(), y = /* @__PURE__ */ f._(x()), w = /* @__PURE__ */ f._(F()), n = {
|
|
44
|
-
router: null,
|
|
45
|
-
readyCallbacks: [],
|
|
46
|
-
ready(e) {
|
|
47
|
-
if (this.router) return e();
|
|
48
|
-
typeof window < "u" && this.readyCallbacks.push(e);
|
|
49
|
-
}
|
|
50
|
-
}, d = [
|
|
51
|
-
"pathname",
|
|
52
|
-
"route",
|
|
53
|
-
"query",
|
|
54
|
-
"asPath",
|
|
55
|
-
"components",
|
|
56
|
-
"isFallback",
|
|
57
|
-
"basePath",
|
|
58
|
-
"locale",
|
|
59
|
-
"locales",
|
|
60
|
-
"defaultLocale",
|
|
61
|
-
"isReady",
|
|
62
|
-
"isPreview",
|
|
63
|
-
"isLocaleDomain",
|
|
64
|
-
"domainLocales"
|
|
65
|
-
], C = [
|
|
66
|
-
"routeChangeStart",
|
|
67
|
-
"beforeHistoryChange",
|
|
68
|
-
"routeChangeComplete",
|
|
69
|
-
"routeChangeError",
|
|
70
|
-
"hashChangeStart",
|
|
71
|
-
"hashChangeComplete"
|
|
72
|
-
], h = [
|
|
73
|
-
"push",
|
|
74
|
-
"replace",
|
|
75
|
-
"reload",
|
|
76
|
-
"back",
|
|
77
|
-
"prefetch",
|
|
78
|
-
"beforePopState"
|
|
79
|
-
];
|
|
80
|
-
Object.defineProperty(n, "events", {
|
|
81
|
-
get() {
|
|
82
|
-
return i.default.events;
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
function m() {
|
|
86
|
-
if (!n.router) {
|
|
87
|
-
const e = `No router instance found.
|
|
88
|
-
You should only use "next/router" on the client side of your app.
|
|
89
|
-
`;
|
|
90
|
-
throw new Error(e);
|
|
91
|
-
}
|
|
92
|
-
return n.router;
|
|
93
|
-
}
|
|
94
|
-
d.forEach((e) => {
|
|
95
|
-
Object.defineProperty(n, e, {
|
|
96
|
-
get() {
|
|
97
|
-
return m()[e];
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
}), h.forEach((e) => {
|
|
101
|
-
n[e] = function() {
|
|
102
|
-
for (var o = arguments.length, t = new Array(o), r = 0; r < o; r++)
|
|
103
|
-
t[r] = arguments[r];
|
|
104
|
-
return m()[e](...t);
|
|
105
|
-
};
|
|
106
|
-
}), C.forEach((e) => {
|
|
107
|
-
n.ready(() => {
|
|
108
|
-
i.default.events.on(e, function() {
|
|
109
|
-
for (var o = arguments.length, t = new Array(o), r = 0; r < o; r++)
|
|
110
|
-
t[r] = arguments[r];
|
|
111
|
-
const s = "on" + e.charAt(0).toUpperCase() + e.substring(1), c = n;
|
|
112
|
-
if (c[s])
|
|
113
|
-
try {
|
|
114
|
-
c[s](...t);
|
|
115
|
-
} catch (a) {
|
|
116
|
-
console.error("Error when running the Router event: " + s), console.error((0, y.default)(a) ? a.message + `
|
|
117
|
-
` + a.stack : a + "");
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
});
|
|
121
|
-
});
|
|
122
|
-
const v = n;
|
|
123
|
-
function q() {
|
|
124
|
-
const e = R.default.useContext(b.RouterContext);
|
|
125
|
-
if (!e)
|
|
126
|
-
throw new Error("NextRouter was not mounted. https://nextjs.org/docs/messages/next-router-not-mounted");
|
|
127
|
-
return e;
|
|
128
|
-
}
|
|
129
|
-
function P() {
|
|
130
|
-
for (var e = arguments.length, o = new Array(e), t = 0; t < e; t++)
|
|
131
|
-
o[t] = arguments[t];
|
|
132
|
-
return n.router = new i.default(...o), n.readyCallbacks.forEach((r) => r()), n.readyCallbacks = [], n.router;
|
|
133
|
-
}
|
|
134
|
-
function E(e) {
|
|
135
|
-
const o = e, t = {};
|
|
136
|
-
for (const r of d) {
|
|
137
|
-
if (typeof o[r] == "object") {
|
|
138
|
-
t[r] = Object.assign(Array.isArray(o[r]) ? [] : {}, o[r]);
|
|
139
|
-
continue;
|
|
140
|
-
}
|
|
141
|
-
t[r] = o[r];
|
|
142
|
-
}
|
|
143
|
-
return t.events = i.default.events, h.forEach((r) => {
|
|
144
|
-
t[r] = function() {
|
|
145
|
-
for (var s = arguments.length, c = new Array(s), a = 0; a < s; a++)
|
|
146
|
-
c[a] = arguments[a];
|
|
147
|
-
return o[r](...c);
|
|
148
|
-
};
|
|
149
|
-
}), t;
|
|
150
|
-
}
|
|
151
|
-
(typeof u.default == "function" || typeof u.default == "object" && u.default !== null) && typeof u.default.__esModule > "u" && (Object.defineProperty(u.default, "__esModule", { value: !0 }), Object.assign(u.default, u), g.exports = u.default);
|
|
152
|
-
}(l, l.exports), l.exports);
|
|
153
|
-
}
|
|
2
|
+
var e = { exports: {} };
|
|
154
3
|
export {
|
|
155
|
-
|
|
4
|
+
e as __module
|
|
156
5
|
};
|