@scrabble-solver/scrabble-solver 2.13.2 → 2.13.3
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/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +16 -16
- package/.next/cache/.tsbuildinfo +1 -1
- package/.next/cache/eslint/.cache_8dgz12 +1 -1
- package/.next/cache/webpack/client-production/0.pack +0 -0
- package/.next/cache/webpack/client-production/index.pack +0 -0
- package/.next/cache/webpack/edge-server-production/0.pack +0 -0
- package/.next/cache/webpack/edge-server-production/index.pack +0 -0
- package/.next/cache/webpack/server-production/0.pack +0 -0
- package/.next/cache/webpack/server-production/index.pack +0 -0
- package/.next/next-minimal-server.js.nft.json +1 -0
- package/.next/next-server.js.nft.json +1 -1
- package/.next/prerender-manifest.js +1 -0
- package/.next/prerender-manifest.json +1 -1
- package/.next/required-server-files.json +1 -1
- package/.next/routes-manifest.json +1 -1
- package/.next/server/InjectManifest.js.nft.json +1 -1
- package/.next/server/chunks/28.js +1 -0
- package/.next/server/chunks/331.js +6 -0
- package/.next/server/chunks/577.js +1 -0
- package/.next/server/chunks/911.js +1 -1083
- package/.next/server/chunks/977.js +1 -0
- package/.next/server/functions-config-manifest.json +1 -0
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/server/next-font-manifest.js +1 -1
- package/.next/server/next-font-manifest.json +1 -6
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/404.js.nft.json +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/pages/_app.js +1 -380
- package/.next/server/pages/_app.js.nft.json +1 -1
- package/.next/server/pages/_document.js +1 -212
- package/.next/server/pages/_document.js.nft.json +1 -1
- package/.next/server/pages/_error.js +1 -166
- package/.next/server/pages/_error.js.nft.json +1 -1
- package/.next/server/pages/api/dictionary/[locale]/[word].js +2 -836
- package/.next/server/pages/api/dictionary/[locale]/[word].js.nft.json +1 -1
- package/.next/server/pages/api/dictionary/[locale].js +1 -192
- package/.next/server/pages/api/dictionary/[locale].js.nft.json +1 -1
- package/.next/server/pages/api/solve.js +1 -1121
- package/.next/server/pages/api/solve.js.nft.json +1 -1
- package/.next/server/pages/api/verify.js +1 -213
- package/.next/server/pages/api/verify.js.nft.json +1 -1
- package/.next/server/pages/api/visit.js +1 -131
- package/.next/server/pages/api/visit.js.nft.json +1 -1
- package/.next/server/pages/index.html +1 -1
- package/.next/server/pages/index.js +1 -2088
- package/.next/server/pages/index.js.nft.json +1 -1
- package/.next/server/pages/index.json +1 -1
- package/.next/server/pages-manifest.json +1 -12
- package/.next/server/webpack-api-runtime.js +1 -172
- package/.next/server/webpack-runtime.js +1 -229
- package/.next/static/chunks/framework-1728d40275bc359a.js +49 -0
- package/.next/static/chunks/main-5fb7abbfc135de15.js +1 -0
- package/.next/static/chunks/pages/404-b6e238bb4117d451.js +1 -0
- package/.next/static/chunks/pages/_app-b95404c40a0092e6.js +17 -0
- package/.next/static/chunks/pages/_error-db043fa3544f8809.js +1 -0
- package/.next/static/chunks/pages/index-59d569ef79bc2580.js +1 -0
- package/.next/static/css/8fa2fb99b90e109e.css +1 -0
- package/.next/static/css/c80ebc6fd13311f1.css +2 -0
- package/.next/static/r00VHxlMI-jbGWpg3nm2M/_buildManifest.js +1 -0
- package/.next/trace +44 -51
- package/package.json +31 -32
- package/src/state/slices/boardSlice.ts +4 -4
- package/src/state/store.ts +1 -1
- package/.next/cache/next-server.js.nft.json +0 -1
- package/.next/server/chunks/210.js +0 -109
- package/.next/server/chunks/277.js +0 -11942
- package/.next/server/chunks/44.js +0 -1838
- package/.next/server/chunks/50.js +0 -12119
- package/.next/server/chunks/636.js +0 -286
- package/.next/server/chunks/675.js +0 -572
- package/.next/server/chunks/859.js +0 -835
- package/.next/server/chunks/865.js +0 -20424
- package/.next/server/chunks/907.js +0 -42530
- package/.next/server/chunks/987.js +0 -91
- package/.next/static/16S6EJJ0_LRmtRPwnUIw5/_buildManifest.js +0 -1
- package/.next/static/chunks/framework-2c29dc3cd933590b.js +0 -49
- package/.next/static/chunks/main-4dcb7f9b52833aba.js +0 -1
- package/.next/static/chunks/pages/404-b4b5ce15153d4825.js +0 -1
- package/.next/static/chunks/pages/_app-122dc8ecfa0220d5.js +0 -32
- package/.next/static/chunks/pages/_error-54de1933a164a1ff.js +0 -1
- package/.next/static/chunks/pages/index-f56eaa969a831c70.js +0 -1
- package/.next/static/css/4e8b47fe382a8a8f.css +0 -2
- package/.next/static/css/cfae5256f1689f57.css +0 -1
- /package/.next/static/{16S6EJJ0_LRmtRPwnUIw5 → r00VHxlMI-jbGWpg3nm2M}/_ssgManifest.js +0 -0
|
@@ -1,572 +0,0 @@
|
|
|
1
|
-
exports.id = 675;
|
|
2
|
-
exports.ids = [675];
|
|
3
|
-
exports.modules = {
|
|
4
|
-
|
|
5
|
-
/***/ 17273:
|
|
6
|
-
/***/ ((__unused_webpack_module, exports) => {
|
|
7
|
-
|
|
8
|
-
"use strict";
|
|
9
|
-
var __webpack_unused_export__;
|
|
10
|
-
|
|
11
|
-
__webpack_unused_export__ = ({
|
|
12
|
-
value: true
|
|
13
|
-
});
|
|
14
|
-
Object.defineProperty(exports, "Z", ({
|
|
15
|
-
enumerable: true,
|
|
16
|
-
get: function() {
|
|
17
|
-
return _objectWithoutPropertiesLoose;
|
|
18
|
-
}
|
|
19
|
-
}));
|
|
20
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
21
|
-
if (source == null) return {};
|
|
22
|
-
var target = {};
|
|
23
|
-
var sourceKeys = Object.keys(source);
|
|
24
|
-
var key, i;
|
|
25
|
-
for(i = 0; i < sourceKeys.length; i++){
|
|
26
|
-
key = sourceKeys[i];
|
|
27
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
28
|
-
target[key] = source[key];
|
|
29
|
-
}
|
|
30
|
-
return target;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
/***/ }),
|
|
35
|
-
|
|
36
|
-
/***/ 93740:
|
|
37
|
-
/***/ ((module, exports, __webpack_require__) => {
|
|
38
|
-
|
|
39
|
-
"use strict";
|
|
40
|
-
|
|
41
|
-
"use client";
|
|
42
|
-
Object.defineProperty(exports, "__esModule", ({
|
|
43
|
-
value: true
|
|
44
|
-
}));
|
|
45
|
-
exports["default"] = void 0;
|
|
46
|
-
var _extends = (__webpack_require__(6495)/* ["default"] */ .Z);
|
|
47
|
-
var _interop_require_default = (__webpack_require__(92648)/* ["default"] */ .Z);
|
|
48
|
-
var _interop_require_wildcard = (__webpack_require__(91598)/* ["default"] */ .Z);
|
|
49
|
-
var _object_without_properties_loose = (__webpack_require__(17273)/* ["default"] */ .Z);
|
|
50
|
-
var _react = _interop_require_wildcard(__webpack_require__(16689));
|
|
51
|
-
var _head = _interop_require_default(__webpack_require__(42636));
|
|
52
|
-
var _imageBlurSvg = __webpack_require__(64486);
|
|
53
|
-
var _imageConfig = __webpack_require__(35843);
|
|
54
|
-
var _imageConfigContext = __webpack_require__(50744);
|
|
55
|
-
var _warnOnce = __webpack_require__(40618);
|
|
56
|
-
var _imageLoader = _interop_require_default(__webpack_require__(99552));
|
|
57
|
-
const configEnv = {"deviceSizes":[640,750,828,1080,1200,1920,2048,3840],"imageSizes":[16,32,48,64,96,128,256,384],"path":"/_next/image","loader":"default","dangerouslyAllowSVG":false,"unoptimized":false};
|
|
58
|
-
const allImgs = new Map();
|
|
59
|
-
let perfObserver;
|
|
60
|
-
if (true) {
|
|
61
|
-
globalThis.__NEXT_IMAGE_IMPORTED = true;
|
|
62
|
-
}
|
|
63
|
-
const VALID_LOADING_VALUES = (/* unused pure expression or super */ null && ([
|
|
64
|
-
"lazy",
|
|
65
|
-
"eager",
|
|
66
|
-
undefined
|
|
67
|
-
]));
|
|
68
|
-
function isStaticRequire(src) {
|
|
69
|
-
return src.default !== undefined;
|
|
70
|
-
}
|
|
71
|
-
function isStaticImageData(src) {
|
|
72
|
-
return src.src !== undefined;
|
|
73
|
-
}
|
|
74
|
-
function isStaticImport(src) {
|
|
75
|
-
return typeof src === "object" && (isStaticRequire(src) || isStaticImageData(src));
|
|
76
|
-
}
|
|
77
|
-
function getWidths({ deviceSizes , allSizes }, width, sizes) {
|
|
78
|
-
if (sizes) {
|
|
79
|
-
// Find all the "vw" percent sizes used in the sizes prop
|
|
80
|
-
const viewportWidthRe = /(^|\s)(1?\d?\d)vw/g;
|
|
81
|
-
const percentSizes = [];
|
|
82
|
-
for(let match; match = viewportWidthRe.exec(sizes); match){
|
|
83
|
-
percentSizes.push(parseInt(match[2]));
|
|
84
|
-
}
|
|
85
|
-
if (percentSizes.length) {
|
|
86
|
-
const smallestRatio = Math.min(...percentSizes) * 0.01;
|
|
87
|
-
return {
|
|
88
|
-
widths: allSizes.filter((s)=>s >= deviceSizes[0] * smallestRatio),
|
|
89
|
-
kind: "w"
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
return {
|
|
93
|
-
widths: allSizes,
|
|
94
|
-
kind: "w"
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
if (typeof width !== "number") {
|
|
98
|
-
return {
|
|
99
|
-
widths: deviceSizes,
|
|
100
|
-
kind: "w"
|
|
101
|
-
};
|
|
102
|
-
}
|
|
103
|
-
const widths = [
|
|
104
|
-
...new Set(// > are actually 3x in the green color, but only 1.5x in the red and
|
|
105
|
-
// > blue colors. Showing a 3x resolution image in the app vs a 2x
|
|
106
|
-
// > resolution image will be visually the same, though the 3x image
|
|
107
|
-
// > takes significantly more data. Even true 3x resolution screens are
|
|
108
|
-
// > wasteful as the human eye cannot see that level of detail without
|
|
109
|
-
// > something like a magnifying glass.
|
|
110
|
-
// https://blog.twitter.com/engineering/en_us/topics/infrastructure/2019/capping-image-fidelity-on-ultra-high-resolution-devices.html
|
|
111
|
-
[
|
|
112
|
-
width,
|
|
113
|
-
width * 2 /*, width * 3*/
|
|
114
|
-
].map((w)=>allSizes.find((p)=>p >= w) || allSizes[allSizes.length - 1]))
|
|
115
|
-
];
|
|
116
|
-
return {
|
|
117
|
-
widths,
|
|
118
|
-
kind: "x"
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
function generateImgAttrs({ config , src , unoptimized , width , quality , sizes , loader }) {
|
|
122
|
-
if (unoptimized) {
|
|
123
|
-
return {
|
|
124
|
-
src,
|
|
125
|
-
srcSet: undefined,
|
|
126
|
-
sizes: undefined
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
const { widths , kind } = getWidths(config, width, sizes);
|
|
130
|
-
const last = widths.length - 1;
|
|
131
|
-
return {
|
|
132
|
-
sizes: !sizes && kind === "w" ? "100vw" : sizes,
|
|
133
|
-
srcSet: widths.map((w, i)=>`${loader({
|
|
134
|
-
config,
|
|
135
|
-
src,
|
|
136
|
-
quality,
|
|
137
|
-
width: w
|
|
138
|
-
})} ${kind === "w" ? w : i + 1}${kind}`).join(", "),
|
|
139
|
-
// It's intended to keep `src` the last attribute because React updates
|
|
140
|
-
// attributes in order. If we keep `src` the first one, Safari will
|
|
141
|
-
// immediately start to fetch `src`, before `sizes` and `srcSet` are even
|
|
142
|
-
// updated by React. That causes multiple unnecessary requests if `srcSet`
|
|
143
|
-
// and `sizes` are defined.
|
|
144
|
-
// This bug cannot be reproduced in Chrome or Firefox.
|
|
145
|
-
src: loader({
|
|
146
|
-
config,
|
|
147
|
-
src,
|
|
148
|
-
quality,
|
|
149
|
-
width: widths[last]
|
|
150
|
-
})
|
|
151
|
-
};
|
|
152
|
-
}
|
|
153
|
-
function getInt(x) {
|
|
154
|
-
if (typeof x === "number" || typeof x === "undefined") {
|
|
155
|
-
return x;
|
|
156
|
-
}
|
|
157
|
-
if (typeof x === "string" && /^[0-9]+$/.test(x)) {
|
|
158
|
-
return parseInt(x, 10);
|
|
159
|
-
}
|
|
160
|
-
return NaN;
|
|
161
|
-
}
|
|
162
|
-
// See https://stackoverflow.com/q/39777833/266535 for why we use this ref
|
|
163
|
-
// handler instead of the img's onLoad attribute.
|
|
164
|
-
function handleLoading(img, src, placeholder, onLoadRef, onLoadingCompleteRef, setBlurComplete, unoptimized) {
|
|
165
|
-
if (!img || img["data-loaded-src"] === src) {
|
|
166
|
-
return;
|
|
167
|
-
}
|
|
168
|
-
img["data-loaded-src"] = src;
|
|
169
|
-
const p = "decode" in img ? img.decode() : Promise.resolve();
|
|
170
|
-
p.catch(()=>{}).then(()=>{
|
|
171
|
-
if (!img.parentElement || !img.isConnected) {
|
|
172
|
-
// Exit early in case of race condition:
|
|
173
|
-
// - onload() is called
|
|
174
|
-
// - decode() is called but incomplete
|
|
175
|
-
// - unmount is called
|
|
176
|
-
// - decode() completes
|
|
177
|
-
return;
|
|
178
|
-
}
|
|
179
|
-
if (placeholder === "blur") {
|
|
180
|
-
setBlurComplete(true);
|
|
181
|
-
}
|
|
182
|
-
if (onLoadRef == null ? void 0 : onLoadRef.current) {
|
|
183
|
-
// Since we don't have the SyntheticEvent here,
|
|
184
|
-
// we must create one with the same shape.
|
|
185
|
-
// See https://reactjs.org/docs/events.html
|
|
186
|
-
const event = new Event("load");
|
|
187
|
-
Object.defineProperty(event, "target", {
|
|
188
|
-
writable: false,
|
|
189
|
-
value: img
|
|
190
|
-
});
|
|
191
|
-
let prevented = false;
|
|
192
|
-
let stopped = false;
|
|
193
|
-
onLoadRef.current(_extends({}, event, {
|
|
194
|
-
nativeEvent: event,
|
|
195
|
-
currentTarget: img,
|
|
196
|
-
target: img,
|
|
197
|
-
isDefaultPrevented: ()=>prevented,
|
|
198
|
-
isPropagationStopped: ()=>stopped,
|
|
199
|
-
persist: ()=>{},
|
|
200
|
-
preventDefault: ()=>{
|
|
201
|
-
prevented = true;
|
|
202
|
-
event.preventDefault();
|
|
203
|
-
},
|
|
204
|
-
stopPropagation: ()=>{
|
|
205
|
-
stopped = true;
|
|
206
|
-
event.stopPropagation();
|
|
207
|
-
}
|
|
208
|
-
}));
|
|
209
|
-
}
|
|
210
|
-
if (onLoadingCompleteRef == null ? void 0 : onLoadingCompleteRef.current) {
|
|
211
|
-
onLoadingCompleteRef.current(img);
|
|
212
|
-
}
|
|
213
|
-
if (false) {}
|
|
214
|
-
});
|
|
215
|
-
}
|
|
216
|
-
function getDynamicProps(fetchPriority) {
|
|
217
|
-
const [majorStr, minorStr] = _react.version.split(".");
|
|
218
|
-
const major = parseInt(majorStr, 10);
|
|
219
|
-
const minor = parseInt(minorStr, 10);
|
|
220
|
-
if (major > 18 || major === 18 && minor >= 3) {
|
|
221
|
-
// In React 18.3.0 or newer, we must use camelCase
|
|
222
|
-
// prop to avoid "Warning: Invalid DOM property".
|
|
223
|
-
// See https://github.com/facebook/react/pull/25927
|
|
224
|
-
return {
|
|
225
|
-
fetchPriority
|
|
226
|
-
};
|
|
227
|
-
}
|
|
228
|
-
// In React 18.2.0 or older, we must use lowercase prop
|
|
229
|
-
// to avoid "Warning: Invalid DOM property".
|
|
230
|
-
return {
|
|
231
|
-
fetchpriority: fetchPriority
|
|
232
|
-
};
|
|
233
|
-
}
|
|
234
|
-
const ImageElement = /*#__PURE__*/ (0, _react).forwardRef((_param, forwardedRef)=>{
|
|
235
|
-
var { imgAttributes , heightInt , widthInt , qualityInt , className , imgStyle , blurStyle , isLazy , fetchPriority , fill , placeholder , loading , srcString , config , unoptimized , loader , onLoadRef , onLoadingCompleteRef , setBlurComplete , setShowAltText , onLoad , onError } = _param, rest = _object_without_properties_loose(_param, [
|
|
236
|
-
"imgAttributes",
|
|
237
|
-
"heightInt",
|
|
238
|
-
"widthInt",
|
|
239
|
-
"qualityInt",
|
|
240
|
-
"className",
|
|
241
|
-
"imgStyle",
|
|
242
|
-
"blurStyle",
|
|
243
|
-
"isLazy",
|
|
244
|
-
"fetchPriority",
|
|
245
|
-
"fill",
|
|
246
|
-
"placeholder",
|
|
247
|
-
"loading",
|
|
248
|
-
"srcString",
|
|
249
|
-
"config",
|
|
250
|
-
"unoptimized",
|
|
251
|
-
"loader",
|
|
252
|
-
"onLoadRef",
|
|
253
|
-
"onLoadingCompleteRef",
|
|
254
|
-
"setBlurComplete",
|
|
255
|
-
"setShowAltText",
|
|
256
|
-
"onLoad",
|
|
257
|
-
"onError"
|
|
258
|
-
]);
|
|
259
|
-
loading = isLazy ? "lazy" : loading;
|
|
260
|
-
return /*#__PURE__*/ _react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/ _react.default.createElement("img", Object.assign({}, rest, getDynamicProps(fetchPriority), {
|
|
261
|
-
// @ts-expect-error - TODO: upgrade to `@types/react@18`
|
|
262
|
-
loading: loading,
|
|
263
|
-
width: widthInt,
|
|
264
|
-
height: heightInt,
|
|
265
|
-
decoding: "async",
|
|
266
|
-
"data-nimg": fill ? "fill" : "1",
|
|
267
|
-
className: className,
|
|
268
|
-
style: _extends({}, imgStyle, blurStyle)
|
|
269
|
-
}, imgAttributes, {
|
|
270
|
-
ref: (0, _react).useCallback((img)=>{
|
|
271
|
-
if (forwardedRef) {
|
|
272
|
-
if (typeof forwardedRef === "function") forwardedRef(img);
|
|
273
|
-
else if (typeof forwardedRef === "object") {
|
|
274
|
-
// @ts-ignore - .current is read only it's usually assigned by react internally
|
|
275
|
-
forwardedRef.current = img;
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
if (!img) {
|
|
279
|
-
return;
|
|
280
|
-
}
|
|
281
|
-
if (onError) {
|
|
282
|
-
// If the image has an error before react hydrates, then the error is lost.
|
|
283
|
-
// The workaround is to wait until the image is mounted which is after hydration,
|
|
284
|
-
// then we set the src again to trigger the error handler (if there was an error).
|
|
285
|
-
// eslint-disable-next-line no-self-assign
|
|
286
|
-
img.src = img.src;
|
|
287
|
-
}
|
|
288
|
-
if (false) {}
|
|
289
|
-
if (img.complete) {
|
|
290
|
-
handleLoading(img, srcString, placeholder, onLoadRef, onLoadingCompleteRef, setBlurComplete, unoptimized);
|
|
291
|
-
}
|
|
292
|
-
}, [
|
|
293
|
-
srcString,
|
|
294
|
-
placeholder,
|
|
295
|
-
onLoadRef,
|
|
296
|
-
onLoadingCompleteRef,
|
|
297
|
-
setBlurComplete,
|
|
298
|
-
onError,
|
|
299
|
-
unoptimized,
|
|
300
|
-
forwardedRef
|
|
301
|
-
]),
|
|
302
|
-
onLoad: (event)=>{
|
|
303
|
-
const img = event.currentTarget;
|
|
304
|
-
handleLoading(img, srcString, placeholder, onLoadRef, onLoadingCompleteRef, setBlurComplete, unoptimized);
|
|
305
|
-
},
|
|
306
|
-
onError: (event)=>{
|
|
307
|
-
// if the real image fails to load, this will ensure "alt" is visible
|
|
308
|
-
setShowAltText(true);
|
|
309
|
-
if (placeholder === "blur") {
|
|
310
|
-
// If the real image fails to load, this will still remove the placeholder.
|
|
311
|
-
setBlurComplete(true);
|
|
312
|
-
}
|
|
313
|
-
if (onError) {
|
|
314
|
-
onError(event);
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
})));
|
|
318
|
-
});
|
|
319
|
-
const Image = /*#__PURE__*/ (0, _react).forwardRef((_param, forwardedRef)=>{
|
|
320
|
-
var { src , sizes , unoptimized =false , priority =false , loading , className , quality , width , height , fill , style , onLoad , onLoadingComplete , placeholder ="empty" , blurDataURL , fetchPriority , layout , objectFit , objectPosition , lazyBoundary , lazyRoot } = _param, all = _object_without_properties_loose(_param, [
|
|
321
|
-
"src",
|
|
322
|
-
"sizes",
|
|
323
|
-
"unoptimized",
|
|
324
|
-
"priority",
|
|
325
|
-
"loading",
|
|
326
|
-
"className",
|
|
327
|
-
"quality",
|
|
328
|
-
"width",
|
|
329
|
-
"height",
|
|
330
|
-
"fill",
|
|
331
|
-
"style",
|
|
332
|
-
"onLoad",
|
|
333
|
-
"onLoadingComplete",
|
|
334
|
-
"placeholder",
|
|
335
|
-
"blurDataURL",
|
|
336
|
-
"fetchPriority",
|
|
337
|
-
"layout",
|
|
338
|
-
"objectFit",
|
|
339
|
-
"objectPosition",
|
|
340
|
-
"lazyBoundary",
|
|
341
|
-
"lazyRoot"
|
|
342
|
-
]);
|
|
343
|
-
const configContext = (0, _react).useContext(_imageConfigContext.ImageConfigContext);
|
|
344
|
-
const config = (0, _react).useMemo(()=>{
|
|
345
|
-
const c = configEnv || configContext || _imageConfig.imageConfigDefault;
|
|
346
|
-
const allSizes = [
|
|
347
|
-
...c.deviceSizes,
|
|
348
|
-
...c.imageSizes
|
|
349
|
-
].sort((a, b)=>a - b);
|
|
350
|
-
const deviceSizes = c.deviceSizes.sort((a, b)=>a - b);
|
|
351
|
-
return _extends({}, c, {
|
|
352
|
-
allSizes,
|
|
353
|
-
deviceSizes
|
|
354
|
-
});
|
|
355
|
-
}, [
|
|
356
|
-
configContext
|
|
357
|
-
]);
|
|
358
|
-
let rest = all;
|
|
359
|
-
let loader = rest.loader || _imageLoader.default;
|
|
360
|
-
// Remove property so it's not spread on <img> element
|
|
361
|
-
delete rest.loader;
|
|
362
|
-
// This special value indicates that the user
|
|
363
|
-
// didn't define a "loader" prop or "loader" config.
|
|
364
|
-
const isDefaultLoader = "__next_img_default" in loader;
|
|
365
|
-
if (isDefaultLoader) {
|
|
366
|
-
if (config.loader === "custom") {
|
|
367
|
-
throw new Error(`Image with src "${src}" is missing "loader" prop.` + `\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader`);
|
|
368
|
-
}
|
|
369
|
-
} else {
|
|
370
|
-
// The user defined a "loader" prop or config.
|
|
371
|
-
// Since the config object is internal only, we
|
|
372
|
-
// must not pass it to the user-defined "loader".
|
|
373
|
-
const customImageLoader = loader;
|
|
374
|
-
var _tmp;
|
|
375
|
-
_tmp = (obj)=>{
|
|
376
|
-
const { config: _ } = obj, opts = _object_without_properties_loose(obj, [
|
|
377
|
-
"config"
|
|
378
|
-
]);
|
|
379
|
-
return customImageLoader(opts);
|
|
380
|
-
}, loader = _tmp, _tmp;
|
|
381
|
-
}
|
|
382
|
-
if (layout) {
|
|
383
|
-
if (layout === "fill") {
|
|
384
|
-
fill = true;
|
|
385
|
-
}
|
|
386
|
-
const layoutToStyle = {
|
|
387
|
-
intrinsic: {
|
|
388
|
-
maxWidth: "100%",
|
|
389
|
-
height: "auto"
|
|
390
|
-
},
|
|
391
|
-
responsive: {
|
|
392
|
-
width: "100%",
|
|
393
|
-
height: "auto"
|
|
394
|
-
}
|
|
395
|
-
};
|
|
396
|
-
const layoutToSizes = {
|
|
397
|
-
responsive: "100vw",
|
|
398
|
-
fill: "100vw"
|
|
399
|
-
};
|
|
400
|
-
const layoutStyle = layoutToStyle[layout];
|
|
401
|
-
if (layoutStyle) {
|
|
402
|
-
style = _extends({}, style, layoutStyle);
|
|
403
|
-
}
|
|
404
|
-
const layoutSizes = layoutToSizes[layout];
|
|
405
|
-
if (layoutSizes && !sizes) {
|
|
406
|
-
sizes = layoutSizes;
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
let staticSrc = "";
|
|
410
|
-
let widthInt = getInt(width);
|
|
411
|
-
let heightInt = getInt(height);
|
|
412
|
-
let blurWidth;
|
|
413
|
-
let blurHeight;
|
|
414
|
-
if (isStaticImport(src)) {
|
|
415
|
-
const staticImageData = isStaticRequire(src) ? src.default : src;
|
|
416
|
-
if (!staticImageData.src) {
|
|
417
|
-
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(staticImageData)}`);
|
|
418
|
-
}
|
|
419
|
-
if (!staticImageData.height || !staticImageData.width) {
|
|
420
|
-
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(staticImageData)}`);
|
|
421
|
-
}
|
|
422
|
-
blurWidth = staticImageData.blurWidth;
|
|
423
|
-
blurHeight = staticImageData.blurHeight;
|
|
424
|
-
blurDataURL = blurDataURL || staticImageData.blurDataURL;
|
|
425
|
-
staticSrc = staticImageData.src;
|
|
426
|
-
if (!fill) {
|
|
427
|
-
if (!widthInt && !heightInt) {
|
|
428
|
-
widthInt = staticImageData.width;
|
|
429
|
-
heightInt = staticImageData.height;
|
|
430
|
-
} else if (widthInt && !heightInt) {
|
|
431
|
-
const ratio = widthInt / staticImageData.width;
|
|
432
|
-
heightInt = Math.round(staticImageData.height * ratio);
|
|
433
|
-
} else if (!widthInt && heightInt) {
|
|
434
|
-
const ratio = heightInt / staticImageData.height;
|
|
435
|
-
widthInt = Math.round(staticImageData.width * ratio);
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
}
|
|
439
|
-
src = typeof src === "string" ? src : staticSrc;
|
|
440
|
-
let isLazy = !priority && (loading === "lazy" || typeof loading === "undefined");
|
|
441
|
-
if (!src || src.startsWith("data:") || src.startsWith("blob:")) {
|
|
442
|
-
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs
|
|
443
|
-
unoptimized = true;
|
|
444
|
-
isLazy = false;
|
|
445
|
-
}
|
|
446
|
-
if (config.unoptimized) {
|
|
447
|
-
unoptimized = true;
|
|
448
|
-
}
|
|
449
|
-
if (isDefaultLoader && src.endsWith(".svg") && !config.dangerouslyAllowSVG) {
|
|
450
|
-
// Special case to make svg serve as-is to avoid proxying
|
|
451
|
-
// through the built-in Image Optimization API.
|
|
452
|
-
unoptimized = true;
|
|
453
|
-
}
|
|
454
|
-
if (priority) {
|
|
455
|
-
fetchPriority = "high";
|
|
456
|
-
}
|
|
457
|
-
const [blurComplete, setBlurComplete] = (0, _react).useState(false);
|
|
458
|
-
const [showAltText, setShowAltText] = (0, _react).useState(false);
|
|
459
|
-
const qualityInt = getInt(quality);
|
|
460
|
-
if (false) {}
|
|
461
|
-
const imgStyle = Object.assign(fill ? {
|
|
462
|
-
position: "absolute",
|
|
463
|
-
height: "100%",
|
|
464
|
-
width: "100%",
|
|
465
|
-
left: 0,
|
|
466
|
-
top: 0,
|
|
467
|
-
right: 0,
|
|
468
|
-
bottom: 0,
|
|
469
|
-
objectFit,
|
|
470
|
-
objectPosition
|
|
471
|
-
} : {}, showAltText ? {} : {
|
|
472
|
-
color: "transparent"
|
|
473
|
-
}, style);
|
|
474
|
-
const blurStyle = placeholder === "blur" && blurDataURL && !blurComplete ? {
|
|
475
|
-
backgroundSize: imgStyle.objectFit || "cover",
|
|
476
|
-
backgroundPosition: imgStyle.objectPosition || "50% 50%",
|
|
477
|
-
backgroundRepeat: "no-repeat",
|
|
478
|
-
backgroundImage: `url("data:image/svg+xml;charset=utf-8,${(0, _imageBlurSvg).getImageBlurSvg({
|
|
479
|
-
widthInt,
|
|
480
|
-
heightInt,
|
|
481
|
-
blurWidth,
|
|
482
|
-
blurHeight,
|
|
483
|
-
blurDataURL,
|
|
484
|
-
objectFit: imgStyle.objectFit
|
|
485
|
-
})}")`
|
|
486
|
-
} : {};
|
|
487
|
-
if (false) {}
|
|
488
|
-
const imgAttributes = generateImgAttrs({
|
|
489
|
-
config,
|
|
490
|
-
src,
|
|
491
|
-
unoptimized,
|
|
492
|
-
width: widthInt,
|
|
493
|
-
quality: qualityInt,
|
|
494
|
-
sizes,
|
|
495
|
-
loader
|
|
496
|
-
});
|
|
497
|
-
let srcString = src;
|
|
498
|
-
if (false) {}
|
|
499
|
-
const onLoadRef = (0, _react).useRef(onLoad);
|
|
500
|
-
(0, _react).useEffect(()=>{
|
|
501
|
-
onLoadRef.current = onLoad;
|
|
502
|
-
}, [
|
|
503
|
-
onLoad
|
|
504
|
-
]);
|
|
505
|
-
const onLoadingCompleteRef = (0, _react).useRef(onLoadingComplete);
|
|
506
|
-
(0, _react).useEffect(()=>{
|
|
507
|
-
onLoadingCompleteRef.current = onLoadingComplete;
|
|
508
|
-
}, [
|
|
509
|
-
onLoadingComplete
|
|
510
|
-
]);
|
|
511
|
-
const imgElementArgs = _extends({
|
|
512
|
-
isLazy,
|
|
513
|
-
imgAttributes,
|
|
514
|
-
heightInt,
|
|
515
|
-
widthInt,
|
|
516
|
-
qualityInt,
|
|
517
|
-
className,
|
|
518
|
-
imgStyle,
|
|
519
|
-
blurStyle,
|
|
520
|
-
loading,
|
|
521
|
-
config,
|
|
522
|
-
fetchPriority,
|
|
523
|
-
fill,
|
|
524
|
-
unoptimized,
|
|
525
|
-
placeholder,
|
|
526
|
-
loader,
|
|
527
|
-
srcString,
|
|
528
|
-
onLoadRef,
|
|
529
|
-
onLoadingCompleteRef,
|
|
530
|
-
setBlurComplete,
|
|
531
|
-
setShowAltText
|
|
532
|
-
}, rest);
|
|
533
|
-
return /*#__PURE__*/ _react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/ _react.default.createElement(ImageElement, Object.assign({}, imgElementArgs, {
|
|
534
|
-
ref: forwardedRef
|
|
535
|
-
})), priority ? // for browsers that do not support `imagesrcset`, and in those cases
|
|
536
|
-
// it would likely cause the incorrect image to be preloaded.
|
|
537
|
-
//
|
|
538
|
-
// https://html.spec.whatwg.org/multipage/semantics.html#attr-link-imagesrcset
|
|
539
|
-
/*#__PURE__*/ _react.default.createElement(_head.default, null, /*#__PURE__*/ _react.default.createElement("link", Object.assign({
|
|
540
|
-
key: "__nimg-" + imgAttributes.src + imgAttributes.srcSet + imgAttributes.sizes,
|
|
541
|
-
rel: "preload",
|
|
542
|
-
as: "image",
|
|
543
|
-
href: imgAttributes.srcSet ? undefined : imgAttributes.src,
|
|
544
|
-
// @ts-expect-error - TODO: upgrade to `@types/react@18`
|
|
545
|
-
imageSrcSet: imgAttributes.srcSet,
|
|
546
|
-
imageSizes: imgAttributes.sizes,
|
|
547
|
-
crossOrigin: rest.crossOrigin
|
|
548
|
-
}, getDynamicProps(fetchPriority)))) : null);
|
|
549
|
-
});
|
|
550
|
-
var _default = Image;
|
|
551
|
-
exports["default"] = _default;
|
|
552
|
-
if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
|
|
553
|
-
Object.defineProperty(exports.default, "__esModule", {
|
|
554
|
-
value: true
|
|
555
|
-
});
|
|
556
|
-
Object.assign(exports.default, exports);
|
|
557
|
-
module.exports = exports.default;
|
|
558
|
-
} //# sourceMappingURL=image.js.map
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
/***/ }),
|
|
562
|
-
|
|
563
|
-
/***/ 25675:
|
|
564
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
565
|
-
|
|
566
|
-
module.exports = __webpack_require__(93740)
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
/***/ })
|
|
570
|
-
|
|
571
|
-
};
|
|
572
|
-
;
|