@instockng/storefront-ui 1.0.65 → 1.0.67
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/components/ProductAddOns.d.ts.map +1 -1
- package/dist/index10.mjs +50 -45
- package/dist/index100.mjs +52 -41
- package/dist/index101.mjs +6 -2
- package/dist/index102.mjs +5 -2
- package/dist/index103.mjs +176 -25
- package/dist/index104.mjs +52 -17
- package/dist/index105.mjs +69 -215
- package/dist/index106.mjs +2 -180
- package/dist/index107.mjs +34 -22
- package/dist/index108.mjs +42 -22
- package/dist/index109.mjs +2 -33
- package/dist/index110.mjs +22 -155
- package/dist/index111.mjs +9 -11
- package/dist/index112.mjs +207 -23
- package/dist/index113.mjs +171 -74
- package/dist/index114.mjs +15 -31
- package/dist/index115.mjs +17 -139
- package/dist/index116.mjs +28 -50
- package/dist/index117.mjs +152 -19
- package/dist/index118.mjs +13 -20
- package/dist/index119.mjs +25 -17
- package/dist/index120.mjs +76 -17
- package/dist/index121.mjs +31 -14
- package/dist/index122.mjs +140 -17
- package/dist/index123.mjs +51 -16
- package/dist/index124.mjs +17 -59
- package/dist/index125.mjs +20 -11
- package/dist/index126.mjs +17 -33
- package/dist/index127.mjs +18 -17
- package/dist/index128.mjs +13 -26
- package/dist/index129.mjs +13 -18
- package/dist/index13.mjs +1 -1
- package/dist/index130.mjs +14 -12
- package/dist/index131.mjs +57 -13
- package/dist/index132.mjs +11 -40
- package/dist/index133.mjs +31 -15
- package/dist/index134.mjs +19 -263
- package/dist/index135.mjs +25 -61
- package/dist/index136.mjs +26 -7
- package/dist/index137.mjs +19 -2
- package/dist/index138.mjs +21 -2
- package/dist/index139.mjs +42 -28
- package/dist/index140.mjs +23 -2
- package/dist/index141.mjs +267 -20
- package/dist/index142.mjs +68 -54
- package/dist/index143.mjs +7 -28
- package/dist/index144.mjs +2 -7
- package/dist/index145.mjs +2 -52
- package/dist/index146.mjs +2 -6
- package/dist/index147.mjs +32 -11
- package/dist/index148.mjs +2 -7
- package/dist/index149.mjs +19 -30
- package/dist/index15.mjs +4 -4
- package/dist/index150.mjs +16 -4
- package/dist/index151.mjs +62 -70
- package/dist/index152.mjs +2 -167
- package/dist/index156.mjs +129 -13
- package/dist/index157.mjs +16 -26
- package/dist/index158.mjs +32 -32
- package/dist/index159.mjs +2 -18
- package/dist/index16.mjs +2 -2
- package/dist/index160.mjs +35 -13
- package/dist/index161.mjs +47 -2
- package/dist/index162.mjs +20 -19
- package/dist/index163.mjs +54 -44
- package/dist/index164.mjs +29 -2
- package/dist/index165.mjs +6 -29
- package/dist/index166.mjs +50 -16
- package/dist/index167.mjs +6 -2
- package/dist/index168.mjs +12 -2
- package/dist/index169.mjs +7 -2
- package/dist/index170.mjs +28 -2
- package/dist/index171.mjs +2 -72
- package/dist/index172.mjs +70 -2
- package/dist/index173.mjs +164 -50
- package/dist/index174.mjs +2 -2
- package/dist/index175.mjs +2 -36
- package/dist/index176.mjs +2 -152
- package/dist/index177.mjs +18 -2
- package/dist/index178.mjs +32 -2
- package/dist/index179.mjs +33 -14
- package/dist/index18.mjs +1 -1
- package/dist/index180.mjs +18 -2
- package/dist/index181.mjs +18 -2
- package/dist/index182.mjs +2 -26
- package/dist/index183.mjs +20 -2
- package/dist/index184.mjs +46 -2
- package/dist/index185.mjs +2 -24
- package/dist/index186.mjs +26 -19
- package/dist/index187.mjs +18 -2
- package/dist/index188.mjs +2 -2
- package/dist/index189.mjs +2 -2
- package/dist/index19.mjs +1 -1
- package/dist/index190.mjs +2 -23
- package/dist/index191.mjs +2 -2
- package/dist/index192.mjs +67 -18
- package/dist/index193.mjs +2 -2
- package/dist/index194.mjs +53 -2
- package/dist/index196.mjs +28 -15
- package/dist/index197.mjs +152 -2
- package/dist/index198.mjs +2 -23
- package/dist/index199.mjs +2 -2
- package/dist/index200.mjs +19 -2
- package/dist/index201.mjs +2 -2
- package/dist/index202.mjs +2 -2
- package/dist/index203.mjs +26 -2
- package/dist/index204.mjs +2 -2
- package/dist/index205.mjs +2 -2
- package/dist/index206.mjs +24 -2
- package/dist/index207.mjs +20 -124
- package/dist/index209.mjs +2 -74
- package/dist/index210.mjs +2 -74
- package/dist/index211.mjs +23 -2
- package/dist/index212.mjs +2 -31
- package/dist/index213.mjs +22 -10
- package/dist/index214.mjs +2 -4
- package/dist/index215.mjs +2 -4
- package/dist/index216.mjs +2 -13
- package/dist/index217.mjs +23 -7
- package/dist/index218.mjs +2 -12
- package/dist/index219.mjs +22 -4
- package/dist/index22.mjs +2 -2
- package/dist/index220.mjs +2 -33
- package/dist/index221.mjs +2 -31
- package/dist/index222.mjs +2 -28
- package/dist/index223.mjs +2 -61
- package/dist/index225.mjs +2 -2
- package/dist/index226.mjs +2 -2
- package/dist/index227.mjs +2 -2
- package/dist/index228.mjs +127 -2
- package/dist/index229.mjs +2 -2
- package/dist/index230.mjs +74 -2
- package/dist/index231.mjs +74 -2
- package/dist/index232.mjs +2 -108
- package/dist/index233.mjs +648 -2
- package/dist/index234.mjs +2 -2
- package/dist/index235.mjs +2 -37
- package/dist/index236.mjs +43 -2
- package/dist/index237.mjs +17 -241
- package/dist/index238.mjs +19 -2
- package/dist/index239.mjs +2 -33
- package/dist/index240.mjs +2 -65
- package/dist/index241.mjs +30 -24
- package/dist/index242.mjs +11 -2
- package/dist/index243.mjs +4 -2
- package/dist/index244.mjs +4 -2
- package/dist/index245.mjs +13 -2
- package/dist/index246.mjs +7 -2
- package/dist/index247.mjs +12 -2
- package/dist/index248.mjs +5 -2
- package/dist/index249.mjs +33 -2
- package/dist/index25.mjs +2 -2
- package/dist/index250.mjs +31 -2
- package/dist/index251.mjs +28 -2
- package/dist/index252.mjs +61 -4
- package/dist/index253.mjs +2 -2
- package/dist/index254.mjs +2 -2
- package/dist/index255.mjs +2 -3
- package/dist/index256.mjs +2 -2
- package/dist/index257.mjs +2 -2
- package/dist/index258.mjs +2 -2
- package/dist/index259.mjs +108 -2
- package/dist/index26.mjs +1 -1
- package/dist/index260.mjs +2 -18
- package/dist/index261.mjs +2 -47
- package/dist/index262.mjs +2 -17
- package/dist/index263.mjs +2 -13
- package/dist/index264.mjs +37 -6
- package/dist/index265.mjs +2 -30
- package/dist/index266.mjs +2 -2
- package/dist/index267.mjs +2 -2
- package/dist/index268.mjs +244 -2
- package/dist/index270.mjs +31 -89
- package/dist/index271.mjs +65 -2
- package/dist/index272.mjs +25 -2
- package/dist/index274.mjs +2 -2
- package/dist/index275.mjs +5 -0
- package/dist/index276.mjs +5 -0
- package/dist/index277.mjs +5 -0
- package/dist/index278.mjs +5 -0
- package/dist/index279.mjs +5 -0
- package/dist/index280.mjs +5 -0
- package/dist/index281.mjs +7 -0
- package/dist/index282.mjs +5 -0
- package/dist/index283.mjs +5 -0
- package/dist/index284.mjs +5 -0
- package/dist/index285.mjs +5 -0
- package/dist/index286.mjs +5 -0
- package/dist/index287.mjs +5 -0
- package/dist/index288.mjs +6 -0
- package/dist/index289.mjs +5 -0
- package/dist/index290.mjs +5 -0
- package/dist/index291.mjs +20 -0
- package/dist/index292.mjs +16 -0
- package/dist/index293.mjs +9 -0
- package/dist/index294.mjs +33 -0
- package/dist/index295.mjs +5 -0
- package/dist/index296.mjs +5 -0
- package/dist/index297.mjs +21 -0
- package/dist/index298.mjs +50 -0
- package/dist/index299.mjs +5 -0
- package/dist/index300.mjs +5 -0
- package/dist/index301.mjs +5 -0
- package/dist/index302.mjs +5 -0
- package/dist/index303.mjs +94 -0
- package/dist/index304.mjs +5 -0
- package/dist/index305.mjs +5 -0
- package/dist/index306.mjs +5 -0
- package/dist/index307.mjs +5 -0
- package/dist/index34.mjs +11 -11
- package/dist/index40.mjs +2 -2
- package/dist/index42.mjs +2 -2
- package/dist/index43.mjs +6 -32
- package/dist/index44.mjs +32 -7
- package/dist/index45.mjs +6 -1432
- package/dist/index46.mjs +1432 -69
- package/dist/index47.mjs +70 -2
- package/dist/index48.mjs +2 -60
- package/dist/index49.mjs +57 -48
- package/dist/index50.mjs +51 -33
- package/dist/index51.mjs +33 -15
- package/dist/index52.mjs +12 -2260
- package/dist/index53.mjs +2263 -36
- package/dist/index54.mjs +36 -44
- package/dist/index55.mjs +44 -99
- package/dist/index56.mjs +99 -113
- package/dist/index57.mjs +82 -50
- package/dist/index58.mjs +53 -79
- package/dist/index59.mjs +75 -63
- package/dist/index60.mjs +71 -57
- package/dist/index61.mjs +57 -55
- package/dist/index62.mjs +75 -15
- package/dist/index63.mjs +13 -14
- package/dist/index64.mjs +16 -59
- package/dist/index65.mjs +43 -105
- package/dist/index66.mjs +89 -93
- package/dist/index67.mjs +128 -23
- package/dist/index68.mjs +19 -149
- package/dist/index69.mjs +24 -2
- package/dist/index70.mjs +2 -23
- package/dist/index71.mjs +37 -74
- package/dist/index72.mjs +2 -15
- package/dist/index73.mjs +148 -58
- package/dist/index75.mjs +75 -2
- package/dist/index76.mjs +15 -6
- package/dist/index77.mjs +57 -1128
- package/dist/index78.mjs +5 -19
- package/dist/index79.mjs +352 -51
- package/dist/index80.mjs +216 -30
- package/dist/index81.mjs +59 -2
- package/dist/index82.mjs +2 -235
- package/dist/index83.mjs +2 -6
- package/dist/index84.mjs +2 -134
- package/dist/index85.mjs +1134 -67
- package/dist/index86.mjs +19 -86
- package/dist/index87.mjs +54 -28
- package/dist/index88.mjs +32 -8
- package/dist/index89.mjs +229 -69
- package/dist/index90.mjs +5 -3
- package/dist/index91.mjs +134 -2
- package/dist/index92.mjs +64 -79
- package/dist/index93.mjs +84 -51
- package/dist/index94.mjs +28 -5
- package/dist/index95.mjs +8 -4
- package/dist/index96.mjs +69 -173
- package/dist/index97.mjs +4 -53
- package/dist/index98.mjs +2 -69
- package/dist/index99.mjs +80 -31
- package/package.json +1 -1
- package/src/components/ProductAddOns.tsx +10 -5
package/dist/index78.mjs
CHANGED
|
@@ -1,23 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __exports as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { __exports as n } from "./index81.mjs";
|
|
6
|
-
var o;
|
|
7
|
-
function d() {
|
|
8
|
-
return o ? e : (o = 1, function(t) {
|
|
9
|
-
Object.defineProperty(t, "__esModule", {
|
|
10
|
-
value: !0
|
|
11
|
-
}), Object.defineProperty(t, "RouterContext", {
|
|
12
|
-
enumerable: !0,
|
|
13
|
-
get: function() {
|
|
14
|
-
return r;
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
const r = (/* @__PURE__ */ n._(u)).default.createContext(null);
|
|
18
|
-
process.env.NODE_ENV !== "production" && (r.displayName = "RouterContext");
|
|
19
|
-
}(e), e);
|
|
2
|
+
import { __exports as r } from "./index82.mjs";
|
|
3
|
+
function t(e) {
|
|
4
|
+
return e && e.__esModule ? e : { default: e };
|
|
20
5
|
}
|
|
6
|
+
r._ = t;
|
|
21
7
|
export {
|
|
22
|
-
|
|
8
|
+
r as default
|
|
23
9
|
};
|
package/dist/index79.mjs
CHANGED
|
@@ -1,58 +1,359 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __exports as
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
2
|
+
import { __exports as ce } from "./index83.mjs";
|
|
3
|
+
import "./index149.mjs";
|
|
4
|
+
import "./index150.mjs";
|
|
5
|
+
import "./index151.mjs";
|
|
6
|
+
import { __exports as he } from "./index152.mjs";
|
|
7
|
+
import { __exports as pe } from "./index153.mjs";
|
|
8
|
+
import { __exports as ue } from "./index154.mjs";
|
|
9
|
+
(function(U) {
|
|
10
|
+
Object.defineProperty(U, "__esModule", {
|
|
11
|
+
value: !0
|
|
12
|
+
}), Object.defineProperty(U, "getImgProps", {
|
|
13
|
+
enumerable: !0,
|
|
14
|
+
get: function() {
|
|
15
|
+
return ee;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
const z = pe, $ = ue, K = he, C = [
|
|
19
|
+
"lazy",
|
|
20
|
+
"eager",
|
|
21
|
+
void 0
|
|
22
|
+
];
|
|
23
|
+
function k(i) {
|
|
24
|
+
return i.default !== void 0;
|
|
25
|
+
}
|
|
26
|
+
function X(i) {
|
|
27
|
+
return i.src !== void 0;
|
|
28
|
+
}
|
|
29
|
+
function Q(i) {
|
|
30
|
+
return !!i && typeof i == "object" && (k(i) || X(i));
|
|
31
|
+
}
|
|
32
|
+
const A = /* @__PURE__ */ new Map();
|
|
33
|
+
let _;
|
|
34
|
+
function N(i) {
|
|
35
|
+
return typeof i > "u" ? i : typeof i == "number" ? Number.isFinite(i) ? i : NaN : typeof i == "string" && /^[0-9]+$/.test(i) ? parseInt(i, 10) : NaN;
|
|
36
|
+
}
|
|
37
|
+
function Y(i, m, e) {
|
|
38
|
+
let { deviceSizes: w, allSizes: o } = i;
|
|
39
|
+
if (e) {
|
|
40
|
+
const s = /(^|\s)(1?\d?\d)vw/g, u = [];
|
|
41
|
+
for (let p; p = s.exec(e); p)
|
|
42
|
+
u.push(parseInt(p[2]));
|
|
43
|
+
if (u.length) {
|
|
44
|
+
const p = Math.min(...u) * 0.01;
|
|
45
|
+
return {
|
|
46
|
+
widths: o.filter((g) => g >= w[0] * p),
|
|
47
|
+
kind: "w"
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
widths: o,
|
|
52
|
+
kind: "w"
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
return typeof m != "number" ? {
|
|
56
|
+
widths: w,
|
|
57
|
+
kind: "w"
|
|
58
|
+
} : {
|
|
59
|
+
widths: [
|
|
60
|
+
...new Set(
|
|
61
|
+
// > This means that most OLED screens that say they are 3x resolution,
|
|
62
|
+
// > are actually 3x in the green color, but only 1.5x in the red and
|
|
63
|
+
// > blue colors. Showing a 3x resolution image in the app vs a 2x
|
|
64
|
+
// > resolution image will be visually the same, though the 3x image
|
|
65
|
+
// > takes significantly more data. Even true 3x resolution screens are
|
|
66
|
+
// > wasteful as the human eye cannot see that level of detail without
|
|
67
|
+
// > something like a magnifying glass.
|
|
68
|
+
// https://blog.twitter.com/engineering/en_us/topics/infrastructure/2019/capping-image-fidelity-on-ultra-high-resolution-devices.html
|
|
69
|
+
[
|
|
70
|
+
m,
|
|
71
|
+
m * 2
|
|
72
|
+
/*, width * 3*/
|
|
73
|
+
].map((s) => o.find((u) => u >= s) || o[o.length - 1])
|
|
74
|
+
)
|
|
75
|
+
],
|
|
76
|
+
kind: "x"
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
function Z(i) {
|
|
80
|
+
let { config: m, src: e, unoptimized: w, width: o, quality: y, sizes: s, loader: u } = i;
|
|
81
|
+
if (w)
|
|
82
|
+
return {
|
|
83
|
+
src: e,
|
|
84
|
+
srcSet: void 0,
|
|
85
|
+
sizes: void 0
|
|
86
|
+
};
|
|
87
|
+
const { widths: p, kind: g } = Y(m, o, s), E = p.length - 1;
|
|
88
|
+
return {
|
|
89
|
+
sizes: !s && g === "w" ? "100vw" : s,
|
|
90
|
+
srcSet: p.map((b, n) => u({
|
|
91
|
+
config: m,
|
|
92
|
+
src: e,
|
|
93
|
+
quality: y,
|
|
94
|
+
width: b
|
|
95
|
+
}) + " " + (g === "w" ? b : n + 1) + g).join(", "),
|
|
96
|
+
// It's intended to keep `src` the last attribute because React updates
|
|
97
|
+
// attributes in order. If we keep `src` the first one, Safari will
|
|
98
|
+
// immediately start to fetch `src`, before `sizes` and `srcSet` are even
|
|
99
|
+
// updated by React. That causes multiple unnecessary requests if `srcSet`
|
|
100
|
+
// and `sizes` are defined.
|
|
101
|
+
// This bug cannot be reproduced in Chrome or Firefox.
|
|
102
|
+
src: u({
|
|
103
|
+
config: m,
|
|
104
|
+
src: e,
|
|
105
|
+
quality: y,
|
|
106
|
+
width: p[E]
|
|
107
|
+
})
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
function ee(i, m) {
|
|
111
|
+
let { src: e, sizes: w, unoptimized: o = !1, priority: y = !1, loading: s, className: u, quality: p, width: g, height: E, fill: b = !1, style: n, overrideSrc: te, onLoad: me, onLoadingComplete: ie, placeholder: l = "empty", blurDataURL: I, fetchPriority: re, decoding: oe = "async", layout: x, objectFit: W, objectPosition: q, lazyBoundary: se, lazyRoot: ne, ...R } = i;
|
|
112
|
+
const { imgConf: ae, showAltText: le, blurComplete: de, defaultLoader: V } = m;
|
|
113
|
+
let v, S = ae || K.imageConfigDefault;
|
|
114
|
+
if ("allSizes" in S)
|
|
115
|
+
v = S;
|
|
116
|
+
else {
|
|
117
|
+
var F;
|
|
118
|
+
const t = [
|
|
119
|
+
...S.deviceSizes,
|
|
120
|
+
...S.imageSizes
|
|
121
|
+
].sort((c, h) => c - h), r = S.deviceSizes.sort((c, h) => c - h), f = (F = S.qualities) == null ? void 0 : F.sort((c, h) => c - h);
|
|
122
|
+
v = {
|
|
123
|
+
...S,
|
|
124
|
+
allSizes: t,
|
|
125
|
+
deviceSizes: r,
|
|
126
|
+
qualities: f
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
if (typeof V > "u")
|
|
130
|
+
throw new Error(`images.loaderFile detected but the file is missing default export.
|
|
131
|
+
Read more: https://nextjs.org/docs/messages/invalid-images-config`);
|
|
132
|
+
let O = R.loader || V;
|
|
133
|
+
delete R.loader, delete R.srcSet;
|
|
134
|
+
const L = "__next_img_default" in O;
|
|
135
|
+
if (L) {
|
|
136
|
+
if (v.loader === "custom")
|
|
137
|
+
throw new Error('Image with src "' + e + `" is missing "loader" prop.
|
|
138
|
+
Read more: https://nextjs.org/docs/messages/next-image-missing-loader`);
|
|
139
|
+
} else {
|
|
140
|
+
const t = O;
|
|
141
|
+
O = (r) => {
|
|
142
|
+
const { config: f, ...c } = r;
|
|
143
|
+
return t(c);
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
if (x) {
|
|
147
|
+
x === "fill" && (b = !0);
|
|
148
|
+
const t = {
|
|
149
|
+
intrinsic: {
|
|
150
|
+
maxWidth: "100%",
|
|
151
|
+
height: "auto"
|
|
152
|
+
},
|
|
153
|
+
responsive: {
|
|
154
|
+
width: "100%",
|
|
155
|
+
height: "auto"
|
|
156
|
+
}
|
|
157
|
+
}, r = {
|
|
158
|
+
responsive: "100vw",
|
|
159
|
+
fill: "100vw"
|
|
160
|
+
}, f = t[x];
|
|
161
|
+
f && (n = {
|
|
162
|
+
...n,
|
|
163
|
+
...f
|
|
14
164
|
});
|
|
165
|
+
const c = r[x];
|
|
166
|
+
c && !w && (w = c);
|
|
15
167
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
168
|
+
let M = "", a = N(g), d = N(E), B, T;
|
|
169
|
+
if (Q(e)) {
|
|
170
|
+
const t = k(e) ? e.default : e;
|
|
171
|
+
if (!t.src)
|
|
172
|
+
throw new Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received " + JSON.stringify(t));
|
|
173
|
+
if (!t.height || !t.width)
|
|
174
|
+
throw new Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received " + JSON.stringify(t));
|
|
175
|
+
if (B = t.blurWidth, T = t.blurHeight, I = I || t.blurDataURL, M = t.src, !b) {
|
|
176
|
+
if (!a && !d)
|
|
177
|
+
a = t.width, d = t.height;
|
|
178
|
+
else if (a && !d) {
|
|
179
|
+
const r = a / t.width;
|
|
180
|
+
d = Math.round(t.height * r);
|
|
181
|
+
} else if (!a && d) {
|
|
182
|
+
const r = d / t.height;
|
|
183
|
+
a = Math.round(t.width * r);
|
|
184
|
+
}
|
|
26
185
|
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
186
|
+
}
|
|
187
|
+
e = typeof e == "string" ? e : M;
|
|
188
|
+
let G = !y && (s === "lazy" || typeof s > "u");
|
|
189
|
+
(!e || e.startsWith("data:") || e.startsWith("blob:")) && (o = !0, G = !1), v.unoptimized && (o = !0), L && !v.dangerouslyAllowSVG && e.split("?", 1)[0].endsWith(".svg") && (o = !0);
|
|
190
|
+
const H = N(p);
|
|
191
|
+
if (process.env.NODE_ENV !== "production") {
|
|
192
|
+
if (v.output === "export" && L && !o)
|
|
193
|
+
throw new Error("Image Optimization using the default loader is not compatible with `{ output: 'export' }`.\n Possible solutions:\n - Remove `{ output: 'export' }` and run \"next start\" to run server mode including the Image Optimization API.\n - Configure `{ images: { unoptimized: true } }` in `next.config.js` to disable the Image Optimization API.\n Read more: https://nextjs.org/docs/messages/export-image-api");
|
|
194
|
+
if (!e)
|
|
195
|
+
o = !0;
|
|
196
|
+
else if (b) {
|
|
197
|
+
if (g)
|
|
198
|
+
throw new Error('Image with src "' + e + '" has both "width" and "fill" properties. Only one should be used.');
|
|
199
|
+
if (E)
|
|
200
|
+
throw new Error('Image with src "' + e + '" has both "height" and "fill" properties. Only one should be used.');
|
|
201
|
+
if (n != null && n.position && n.position !== "absolute")
|
|
202
|
+
throw new Error('Image with src "' + e + '" has both "fill" and "style.position" properties. Images with "fill" always use position absolute - it cannot be modified.');
|
|
203
|
+
if (n != null && n.width && n.width !== "100%")
|
|
204
|
+
throw new Error('Image with src "' + e + '" has both "fill" and "style.width" properties. Images with "fill" always use width 100% - it cannot be modified.');
|
|
205
|
+
if (n != null && n.height && n.height !== "100%")
|
|
206
|
+
throw new Error('Image with src "' + e + '" has both "fill" and "style.height" properties. Images with "fill" always use height 100% - it cannot be modified.');
|
|
207
|
+
} else {
|
|
208
|
+
if (typeof a > "u")
|
|
209
|
+
throw new Error('Image with src "' + e + '" is missing required "width" property.');
|
|
210
|
+
if (isNaN(a))
|
|
211
|
+
throw new Error('Image with src "' + e + '" has invalid "width" property. Expected a numeric value in pixels but received "' + g + '".');
|
|
212
|
+
if (typeof d > "u")
|
|
213
|
+
throw new Error('Image with src "' + e + '" is missing required "height" property.');
|
|
214
|
+
if (isNaN(d))
|
|
215
|
+
throw new Error('Image with src "' + e + '" has invalid "height" property. Expected a numeric value in pixels but received "' + E + '".');
|
|
216
|
+
if (/^[\x00-\x20]/.test(e))
|
|
217
|
+
throw new Error('Image with src "' + e + '" cannot start with a space or control character. Use src.trimStart() to remove it or encodeURIComponent(src) to keep it.');
|
|
218
|
+
if (/[\x00-\x20]$/.test(e))
|
|
219
|
+
throw new Error('Image with src "' + e + '" cannot end with a space or control character. Use src.trimEnd() to remove it or encodeURIComponent(src) to keep it.');
|
|
220
|
+
}
|
|
221
|
+
if (!C.includes(s))
|
|
222
|
+
throw new Error('Image with src "' + e + '" has invalid "loading" property. Provided "' + s + '" should be one of ' + C.map(String).join(",") + ".");
|
|
223
|
+
if (y && s === "lazy")
|
|
224
|
+
throw new Error('Image with src "' + e + `" has both "priority" and "loading='lazy'" properties. Only one should be used.`);
|
|
225
|
+
if (l !== "empty" && l !== "blur" && !l.startsWith("data:image/"))
|
|
226
|
+
throw new Error('Image with src "' + e + '" has invalid "placeholder" property "' + l + '".');
|
|
227
|
+
if (l !== "empty" && a && d && a * d < 1600 && (0, z.warnOnce)('Image with src "' + e + '" is smaller than 40x40. Consider removing the "placeholder" property to improve performance.'), l === "blur" && !I) {
|
|
228
|
+
const t = [
|
|
229
|
+
"jpeg",
|
|
230
|
+
"png",
|
|
231
|
+
"webp",
|
|
232
|
+
"avif"
|
|
233
|
+
];
|
|
234
|
+
throw new Error('Image with src "' + e + `" has "placeholder='blur'" property but is missing the "blurDataURL" property.
|
|
235
|
+
Possible solutions:
|
|
236
|
+
- Add a "blurDataURL" property, the contents should be a small Data URL to represent the image
|
|
237
|
+
- Change the "src" property to a static import with one of the supported file types: ` + t.join(",") + ` (animated images not supported)
|
|
238
|
+
- Remove the "placeholder" property, effectively no blur effect
|
|
239
|
+
Read more: https://nextjs.org/docs/messages/placeholder-blur-data-url`);
|
|
240
|
+
}
|
|
241
|
+
if ("ref" in R && (0, z.warnOnce)('Image with src "' + e + '" is using unsupported "ref" property. Consider using the "onLoad" property instead.'), !o && !L) {
|
|
242
|
+
const t = O({
|
|
243
|
+
config: v,
|
|
244
|
+
src: e,
|
|
245
|
+
width: a || 400,
|
|
246
|
+
quality: H || 75
|
|
247
|
+
});
|
|
248
|
+
let r;
|
|
249
|
+
try {
|
|
250
|
+
r = new URL(t);
|
|
251
|
+
} catch {
|
|
39
252
|
}
|
|
40
|
-
|
|
253
|
+
(t === e || r && r.pathname === e && !r.search) && (0, z.warnOnce)('Image with src "' + e + `" has a "loader" property that does not implement width. Please implement it or use the "unoptimized" property instead.
|
|
254
|
+
Read more: https://nextjs.org/docs/messages/next-image-missing-loader-width`);
|
|
255
|
+
}
|
|
256
|
+
ie && (0, z.warnOnce)('Image with src "' + e + '" is using deprecated "onLoadingComplete" property. Please use the "onLoad" property instead.');
|
|
257
|
+
for (const [t, r] of Object.entries({
|
|
258
|
+
layout: x,
|
|
259
|
+
objectFit: W,
|
|
260
|
+
objectPosition: q,
|
|
261
|
+
lazyBoundary: se,
|
|
262
|
+
lazyRoot: ne
|
|
263
|
+
}))
|
|
264
|
+
r && (0, z.warnOnce)('Image with src "' + e + '" has legacy prop "' + t + `". Did you forget to run the codemod?
|
|
265
|
+
Read more: https://nextjs.org/docs/messages/next-image-upgrade-to-13`);
|
|
266
|
+
if (typeof window < "u" && !_ && window.PerformanceObserver) {
|
|
267
|
+
_ = new PerformanceObserver((t) => {
|
|
268
|
+
for (const f of t.getEntries()) {
|
|
269
|
+
var r;
|
|
270
|
+
const c = (f == null || (r = f.element) == null ? void 0 : r.src) || "", h = A.get(c);
|
|
271
|
+
h && !h.priority && h.placeholder === "empty" && !h.src.startsWith("data:") && !h.src.startsWith("blob:") && (0, z.warnOnce)('Image with src "' + h.src + `" was detected as the Largest Contentful Paint (LCP). Please add the "priority" property if this image is above the fold.
|
|
272
|
+
Read more: https://nextjs.org/docs/api-reference/next/image#priority`);
|
|
273
|
+
}
|
|
274
|
+
});
|
|
275
|
+
try {
|
|
276
|
+
_.observe({
|
|
277
|
+
type: "largest-contentful-paint",
|
|
278
|
+
buffered: !0
|
|
279
|
+
});
|
|
280
|
+
} catch (t) {
|
|
281
|
+
console.error(t);
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
const P = Object.assign(b ? {
|
|
286
|
+
position: "absolute",
|
|
287
|
+
height: "100%",
|
|
288
|
+
width: "100%",
|
|
289
|
+
left: 0,
|
|
290
|
+
top: 0,
|
|
291
|
+
right: 0,
|
|
292
|
+
bottom: 0,
|
|
293
|
+
objectFit: W,
|
|
294
|
+
objectPosition: q
|
|
295
|
+
} : {}, le ? {} : {
|
|
296
|
+
color: "transparent"
|
|
297
|
+
}, n), J = !de && l !== "empty" ? l === "blur" ? 'url("data:image/svg+xml;charset=utf-8,' + (0, $.getImageBlurSvg)({
|
|
298
|
+
widthInt: a,
|
|
299
|
+
heightInt: d,
|
|
300
|
+
blurWidth: B,
|
|
301
|
+
blurHeight: T,
|
|
302
|
+
blurDataURL: I || "",
|
|
303
|
+
objectFit: P.objectFit
|
|
304
|
+
}) + '")' : 'url("' + l + '")' : null;
|
|
305
|
+
let D = J ? {
|
|
306
|
+
backgroundSize: P.objectFit || "cover",
|
|
307
|
+
backgroundPosition: P.objectPosition || "50% 50%",
|
|
308
|
+
backgroundRepeat: "no-repeat",
|
|
309
|
+
backgroundImage: J
|
|
310
|
+
} : {};
|
|
311
|
+
process.env.NODE_ENV === "development" && D.backgroundImage && l === "blur" && I != null && I.startsWith("/") && (D.backgroundImage = 'url("' + I + '")');
|
|
312
|
+
const j = Z({
|
|
313
|
+
config: v,
|
|
314
|
+
src: e,
|
|
315
|
+
unoptimized: o,
|
|
316
|
+
width: a,
|
|
317
|
+
quality: H,
|
|
318
|
+
sizes: w,
|
|
319
|
+
loader: O
|
|
320
|
+
});
|
|
321
|
+
if (process.env.NODE_ENV !== "production" && typeof window < "u") {
|
|
322
|
+
let t;
|
|
323
|
+
try {
|
|
324
|
+
t = new URL(j.src);
|
|
325
|
+
} catch {
|
|
326
|
+
t = new URL(j.src, window.location.href);
|
|
327
|
+
}
|
|
328
|
+
A.set(t.href, {
|
|
329
|
+
src: e,
|
|
330
|
+
priority: y,
|
|
331
|
+
placeholder: l
|
|
41
332
|
});
|
|
42
333
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
334
|
+
return {
|
|
335
|
+
props: {
|
|
336
|
+
...R,
|
|
337
|
+
loading: G ? "lazy" : s,
|
|
338
|
+
fetchPriority: re,
|
|
339
|
+
width: a,
|
|
340
|
+
height: d,
|
|
341
|
+
decoding: oe,
|
|
342
|
+
className: u,
|
|
343
|
+
style: {
|
|
344
|
+
...P,
|
|
345
|
+
...D
|
|
346
|
+
},
|
|
347
|
+
sizes: j.sizes,
|
|
348
|
+
srcSet: j.srcSet,
|
|
349
|
+
src: te || j.src
|
|
350
|
+
},
|
|
351
|
+
meta: {
|
|
352
|
+
unoptimized: o,
|
|
353
|
+
priority: y,
|
|
354
|
+
placeholder: l,
|
|
355
|
+
fill: b
|
|
356
|
+
}
|
|
357
|
+
};
|
|
358
|
+
}
|
|
359
|
+
})(ce);
|