@piu-company/react-toolkit 1.0.4 → 1.0.5
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/axios.d.ts +24 -24
- package/dist/components/UseRedux/Sidebar/Sidebar.d.ts +2 -2
- package/dist/components/UseRedux/Sidebar/SidebarToggler.d.ts +1 -1
- package/dist/dataLayer/DataProvider.d.ts +2 -2
- package/dist/index.cjs.js +424 -236
- package/dist/index.esm.js +424 -236
- package/dist/tsconfig.rollup.tsbuildinfo +1 -1
- package/package.json +2 -2
package/dist/index.cjs.js
CHANGED
|
@@ -34394,10 +34394,10 @@ function require_interop_require_default () {
|
|
|
34394
34394
|
if (hasRequired_interop_require_default) return _interop_require_default;
|
|
34395
34395
|
hasRequired_interop_require_default = 1;
|
|
34396
34396
|
|
|
34397
|
-
_interop_require_default._ = _interop_require_default._interop_require_default = _interop_require_default$1;
|
|
34398
34397
|
function _interop_require_default$1(obj) {
|
|
34399
34398
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
34400
34399
|
}
|
|
34400
|
+
_interop_require_default._ = _interop_require_default$1;
|
|
34401
34401
|
return _interop_require_default;
|
|
34402
34402
|
}
|
|
34403
34403
|
|
|
@@ -34421,7 +34421,7 @@ function requireWarnOnce () {
|
|
|
34421
34421
|
}
|
|
34422
34422
|
});
|
|
34423
34423
|
let warnOnce = (_)=>{};
|
|
34424
|
-
if (process.env.NODE_ENV !==
|
|
34424
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
34425
34425
|
const warnings = new Set();
|
|
34426
34426
|
warnOnce = (msg)=>{
|
|
34427
34427
|
if (!warnings.has(msg)) {
|
|
@@ -34462,8 +34462,8 @@ function requireImageBlurSvg () {
|
|
|
34462
34462
|
const std = 20;
|
|
34463
34463
|
const svgWidth = blurWidth ? blurWidth * 40 : widthInt;
|
|
34464
34464
|
const svgHeight = blurHeight ? blurHeight * 40 : heightInt;
|
|
34465
|
-
const viewBox = svgWidth && svgHeight ? "viewBox='0 0 " + svgWidth + " " + svgHeight + "'" :
|
|
34466
|
-
const preserveAspectRatio = viewBox ?
|
|
34465
|
+
const viewBox = svgWidth && svgHeight ? "viewBox='0 0 " + svgWidth + " " + svgHeight + "'" : '';
|
|
34466
|
+
const preserveAspectRatio = viewBox ? 'none' : objectFit === 'contain' ? 'xMidYMid' : objectFit === 'cover' ? 'xMidYMid slice' : 'none';
|
|
34467
34467
|
return "%3Csvg xmlns='http://www.w3.org/2000/svg' " + viewBox + "%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='" + std + "'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='" + std + "'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='" + preserveAspectRatio + "' style='filter: url(%23b);' href='" + blurDataURL + "'/%3E%3C/svg%3E";
|
|
34468
34468
|
}
|
|
34469
34469
|
|
|
@@ -34498,11 +34498,11 @@ function requireImageConfig () {
|
|
|
34498
34498
|
}
|
|
34499
34499
|
});
|
|
34500
34500
|
const VALID_LOADERS = [
|
|
34501
|
-
|
|
34502
|
-
|
|
34503
|
-
|
|
34504
|
-
|
|
34505
|
-
|
|
34501
|
+
'default',
|
|
34502
|
+
'imgix',
|
|
34503
|
+
'cloudinary',
|
|
34504
|
+
'akamai',
|
|
34505
|
+
'custom'
|
|
34506
34506
|
];
|
|
34507
34507
|
const imageConfigDefault = {
|
|
34508
34508
|
deviceSizes: [
|
|
@@ -34525,18 +34525,20 @@ function requireImageConfig () {
|
|
|
34525
34525
|
256,
|
|
34526
34526
|
384
|
|
34527
34527
|
],
|
|
34528
|
-
path:
|
|
34529
|
-
loader:
|
|
34530
|
-
loaderFile:
|
|
34528
|
+
path: '/_next/image',
|
|
34529
|
+
loader: 'default',
|
|
34530
|
+
loaderFile: '',
|
|
34531
34531
|
domains: [],
|
|
34532
34532
|
disableStaticImages: false,
|
|
34533
34533
|
minimumCacheTTL: 60,
|
|
34534
34534
|
formats: [
|
|
34535
|
-
|
|
34535
|
+
'image/webp'
|
|
34536
34536
|
],
|
|
34537
|
+
maximumDiskCacheSize: undefined,
|
|
34538
|
+
maximumResponseBody: 50000000,
|
|
34537
34539
|
dangerouslyAllowSVG: false,
|
|
34538
34540
|
contentSecurityPolicy: "script-src 'none'; frame-src 'none'; sandbox;",
|
|
34539
|
-
contentDispositionType:
|
|
34541
|
+
contentDispositionType: 'attachment',
|
|
34540
34542
|
localPatterns: undefined,
|
|
34541
34543
|
remotePatterns: [],
|
|
34542
34544
|
qualities: undefined,
|
|
@@ -34567,8 +34569,16 @@ function requireGetImgProps () {
|
|
|
34567
34569
|
const _imageblursvg = requireImageBlurSvg();
|
|
34568
34570
|
const _imageconfig = requireImageConfig();
|
|
34569
34571
|
const VALID_LOADING_VALUES = [
|
|
34570
|
-
|
|
34571
|
-
|
|
34572
|
+
'lazy',
|
|
34573
|
+
'eager',
|
|
34574
|
+
undefined
|
|
34575
|
+
];
|
|
34576
|
+
// Object-fit values that are not valid background-size values
|
|
34577
|
+
const INVALID_BACKGROUND_SIZE_VALUES = [
|
|
34578
|
+
'-moz-initial',
|
|
34579
|
+
'fill',
|
|
34580
|
+
'none',
|
|
34581
|
+
'scale-down',
|
|
34572
34582
|
undefined
|
|
34573
34583
|
];
|
|
34574
34584
|
function isStaticRequire(src) {
|
|
@@ -34578,18 +34588,18 @@ function requireGetImgProps () {
|
|
|
34578
34588
|
return src.src !== undefined;
|
|
34579
34589
|
}
|
|
34580
34590
|
function isStaticImport(src) {
|
|
34581
|
-
return typeof src ===
|
|
34591
|
+
return !!src && typeof src === 'object' && (isStaticRequire(src) || isStaticImageData(src));
|
|
34582
34592
|
}
|
|
34583
34593
|
const allImgs = new Map();
|
|
34584
34594
|
let perfObserver;
|
|
34585
34595
|
function getInt(x) {
|
|
34586
|
-
if (typeof x ===
|
|
34596
|
+
if (typeof x === 'undefined') {
|
|
34587
34597
|
return x;
|
|
34588
34598
|
}
|
|
34589
|
-
if (typeof x ===
|
|
34599
|
+
if (typeof x === 'number') {
|
|
34590
34600
|
return Number.isFinite(x) ? x : NaN;
|
|
34591
34601
|
}
|
|
34592
|
-
if (typeof x ===
|
|
34602
|
+
if (typeof x === 'string' && /^[0-9]+$/.test(x)) {
|
|
34593
34603
|
return parseInt(x, 10);
|
|
34594
34604
|
}
|
|
34595
34605
|
return NaN;
|
|
@@ -34607,18 +34617,18 @@ function requireGetImgProps () {
|
|
|
34607
34617
|
const smallestRatio = Math.min(...percentSizes) * 0.01;
|
|
34608
34618
|
return {
|
|
34609
34619
|
widths: allSizes.filter((s)=>s >= deviceSizes[0] * smallestRatio),
|
|
34610
|
-
kind:
|
|
34620
|
+
kind: 'w'
|
|
34611
34621
|
};
|
|
34612
34622
|
}
|
|
34613
34623
|
return {
|
|
34614
34624
|
widths: allSizes,
|
|
34615
|
-
kind:
|
|
34625
|
+
kind: 'w'
|
|
34616
34626
|
};
|
|
34617
34627
|
}
|
|
34618
|
-
if (typeof width !==
|
|
34628
|
+
if (typeof width !== 'number') {
|
|
34619
34629
|
return {
|
|
34620
34630
|
widths: deviceSizes,
|
|
34621
|
-
kind:
|
|
34631
|
+
kind: 'w'
|
|
34622
34632
|
};
|
|
34623
34633
|
}
|
|
34624
34634
|
const widths = [
|
|
@@ -34637,7 +34647,7 @@ function requireGetImgProps () {
|
|
|
34637
34647
|
];
|
|
34638
34648
|
return {
|
|
34639
34649
|
widths,
|
|
34640
|
-
kind:
|
|
34650
|
+
kind: 'x'
|
|
34641
34651
|
};
|
|
34642
34652
|
}
|
|
34643
34653
|
function generateImgAttrs(param) {
|
|
@@ -34652,13 +34662,13 @@ function requireGetImgProps () {
|
|
|
34652
34662
|
const { widths, kind } = getWidths(config, width, sizes);
|
|
34653
34663
|
const last = widths.length - 1;
|
|
34654
34664
|
return {
|
|
34655
|
-
sizes: !sizes && kind ===
|
|
34665
|
+
sizes: !sizes && kind === 'w' ? '100vw' : sizes,
|
|
34656
34666
|
srcSet: widths.map((w, i)=>loader({
|
|
34657
34667
|
config,
|
|
34658
34668
|
src,
|
|
34659
34669
|
quality,
|
|
34660
34670
|
width: w
|
|
34661
|
-
}) + " " + (kind ===
|
|
34671
|
+
}) + " " + (kind === 'w' ? w : i + 1) + kind).join(', '),
|
|
34662
34672
|
// It's intended to keep `src` the last attribute because React updates
|
|
34663
34673
|
// attributes in order. If we keep `src` the first one, Safari will
|
|
34664
34674
|
// immediately start to fetch `src`, before `sizes` and `srcSet` are even
|
|
@@ -34674,11 +34684,11 @@ function requireGetImgProps () {
|
|
|
34674
34684
|
};
|
|
34675
34685
|
}
|
|
34676
34686
|
function getImgProps(param, _state) {
|
|
34677
|
-
let { src, sizes, unoptimized = false, priority = false, loading, className, quality, width, height, fill = false, style, overrideSrc, onLoad, onLoadingComplete, placeholder =
|
|
34687
|
+
let { src, sizes, unoptimized = false, priority = false, loading, className, quality, width, height, fill = false, style, overrideSrc, onLoad, onLoadingComplete, placeholder = 'empty', blurDataURL, fetchPriority, decoding = 'async', layout, objectFit, objectPosition, lazyBoundary, lazyRoot, ...rest } = param;
|
|
34678
34688
|
const { imgConf, showAltText, blurComplete, defaultLoader } = _state;
|
|
34679
34689
|
let config;
|
|
34680
34690
|
let c = imgConf || _imageconfig.imageConfigDefault;
|
|
34681
|
-
if (
|
|
34691
|
+
if ('allSizes' in c) {
|
|
34682
34692
|
config = c;
|
|
34683
34693
|
} else {
|
|
34684
34694
|
var _c_qualities;
|
|
@@ -34695,8 +34705,12 @@ function requireGetImgProps () {
|
|
|
34695
34705
|
qualities
|
|
34696
34706
|
};
|
|
34697
34707
|
}
|
|
34698
|
-
if (typeof defaultLoader ===
|
|
34699
|
-
throw new Error(
|
|
34708
|
+
if (typeof defaultLoader === 'undefined') {
|
|
34709
|
+
throw Object.defineProperty(new Error('images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config'), "__NEXT_ERROR_CODE", {
|
|
34710
|
+
value: "E163",
|
|
34711
|
+
enumerable: false,
|
|
34712
|
+
configurable: true
|
|
34713
|
+
});
|
|
34700
34714
|
}
|
|
34701
34715
|
let loader = rest.loader || defaultLoader;
|
|
34702
34716
|
// Remove property so it's not spread on <img> element
|
|
@@ -34704,10 +34718,14 @@ function requireGetImgProps () {
|
|
|
34704
34718
|
delete rest.srcSet;
|
|
34705
34719
|
// This special value indicates that the user
|
|
34706
34720
|
// didn't define a "loader" prop or "loader" config.
|
|
34707
|
-
const isDefaultLoader =
|
|
34721
|
+
const isDefaultLoader = '__next_img_default' in loader;
|
|
34708
34722
|
if (isDefaultLoader) {
|
|
34709
|
-
if (config.loader ===
|
|
34710
|
-
throw new Error('Image with src "' + src + '" is missing "loader" prop.' + "\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader")
|
|
34723
|
+
if (config.loader === 'custom') {
|
|
34724
|
+
throw Object.defineProperty(new Error('Image with src "' + src + '" is missing "loader" prop.' + "\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader"), "__NEXT_ERROR_CODE", {
|
|
34725
|
+
value: "E252",
|
|
34726
|
+
enumerable: false,
|
|
34727
|
+
configurable: true
|
|
34728
|
+
});
|
|
34711
34729
|
}
|
|
34712
34730
|
} else {
|
|
34713
34731
|
// The user defined a "loader" prop or config.
|
|
@@ -34720,22 +34738,22 @@ function requireGetImgProps () {
|
|
|
34720
34738
|
};
|
|
34721
34739
|
}
|
|
34722
34740
|
if (layout) {
|
|
34723
|
-
if (layout ===
|
|
34741
|
+
if (layout === 'fill') {
|
|
34724
34742
|
fill = true;
|
|
34725
34743
|
}
|
|
34726
34744
|
const layoutToStyle = {
|
|
34727
34745
|
intrinsic: {
|
|
34728
|
-
maxWidth:
|
|
34729
|
-
height:
|
|
34746
|
+
maxWidth: '100%',
|
|
34747
|
+
height: 'auto'
|
|
34730
34748
|
},
|
|
34731
34749
|
responsive: {
|
|
34732
|
-
width:
|
|
34733
|
-
height:
|
|
34750
|
+
width: '100%',
|
|
34751
|
+
height: 'auto'
|
|
34734
34752
|
}
|
|
34735
34753
|
};
|
|
34736
34754
|
const layoutToSizes = {
|
|
34737
|
-
responsive:
|
|
34738
|
-
fill:
|
|
34755
|
+
responsive: '100vw',
|
|
34756
|
+
fill: '100vw'
|
|
34739
34757
|
};
|
|
34740
34758
|
const layoutStyle = layoutToStyle[layout];
|
|
34741
34759
|
if (layoutStyle) {
|
|
@@ -34749,7 +34767,7 @@ function requireGetImgProps () {
|
|
|
34749
34767
|
sizes = layoutSizes;
|
|
34750
34768
|
}
|
|
34751
34769
|
}
|
|
34752
|
-
let staticSrc =
|
|
34770
|
+
let staticSrc = '';
|
|
34753
34771
|
let widthInt = getInt(width);
|
|
34754
34772
|
let heightInt = getInt(height);
|
|
34755
34773
|
let blurWidth;
|
|
@@ -34757,10 +34775,18 @@ function requireGetImgProps () {
|
|
|
34757
34775
|
if (isStaticImport(src)) {
|
|
34758
34776
|
const staticImageData = isStaticRequire(src) ? src.default : src;
|
|
34759
34777
|
if (!staticImageData.src) {
|
|
34760
|
-
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))
|
|
34778
|
+
throw Object.defineProperty(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)), "__NEXT_ERROR_CODE", {
|
|
34779
|
+
value: "E460",
|
|
34780
|
+
enumerable: false,
|
|
34781
|
+
configurable: true
|
|
34782
|
+
});
|
|
34761
34783
|
}
|
|
34762
34784
|
if (!staticImageData.height || !staticImageData.width) {
|
|
34763
|
-
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))
|
|
34785
|
+
throw Object.defineProperty(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)), "__NEXT_ERROR_CODE", {
|
|
34786
|
+
value: "E48",
|
|
34787
|
+
enumerable: false,
|
|
34788
|
+
configurable: true
|
|
34789
|
+
});
|
|
34764
34790
|
}
|
|
34765
34791
|
blurWidth = staticImageData.blurWidth;
|
|
34766
34792
|
blurHeight = staticImageData.blurHeight;
|
|
@@ -34779,9 +34805,9 @@ function requireGetImgProps () {
|
|
|
34779
34805
|
}
|
|
34780
34806
|
}
|
|
34781
34807
|
}
|
|
34782
|
-
src = typeof src ===
|
|
34783
|
-
let isLazy = !priority && (loading ===
|
|
34784
|
-
if (!src || src.startsWith(
|
|
34808
|
+
src = typeof src === 'string' ? src : staticSrc;
|
|
34809
|
+
let isLazy = !priority && (loading === 'lazy' || typeof loading === 'undefined');
|
|
34810
|
+
if (!src || src.startsWith('data:') || src.startsWith('blob:')) {
|
|
34785
34811
|
// https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs
|
|
34786
34812
|
unoptimized = true;
|
|
34787
34813
|
isLazy = false;
|
|
@@ -34789,18 +34815,20 @@ function requireGetImgProps () {
|
|
|
34789
34815
|
if (config.unoptimized) {
|
|
34790
34816
|
unoptimized = true;
|
|
34791
34817
|
}
|
|
34792
|
-
if (isDefaultLoader && src.endsWith(
|
|
34818
|
+
if (isDefaultLoader && !config.dangerouslyAllowSVG && src.split('?', 1)[0].endsWith('.svg')) {
|
|
34793
34819
|
// Special case to make svg serve as-is to avoid proxying
|
|
34794
34820
|
// through the built-in Image Optimization API.
|
|
34795
34821
|
unoptimized = true;
|
|
34796
34822
|
}
|
|
34797
|
-
if (priority) {
|
|
34798
|
-
fetchPriority = "high";
|
|
34799
|
-
}
|
|
34800
34823
|
const qualityInt = getInt(quality);
|
|
34801
|
-
if (process.env.NODE_ENV !==
|
|
34802
|
-
|
|
34803
|
-
|
|
34824
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
34825
|
+
var _config_localPatterns;
|
|
34826
|
+
if (config.output === 'export' && isDefaultLoader && !unoptimized) {
|
|
34827
|
+
throw Object.defineProperty(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"), "__NEXT_ERROR_CODE", {
|
|
34828
|
+
value: "E500",
|
|
34829
|
+
enumerable: false,
|
|
34830
|
+
configurable: true
|
|
34831
|
+
});
|
|
34804
34832
|
}
|
|
34805
34833
|
if (!src) {
|
|
34806
34834
|
// React doesn't show the stack trace and there's
|
|
@@ -34810,58 +34838,132 @@ function requireGetImgProps () {
|
|
|
34810
34838
|
} else {
|
|
34811
34839
|
if (fill) {
|
|
34812
34840
|
if (width) {
|
|
34813
|
-
throw new Error('Image with src "' + src + '" has both "width" and "fill" properties. Only one should be used.')
|
|
34841
|
+
throw Object.defineProperty(new Error('Image with src "' + src + '" has both "width" and "fill" properties. Only one should be used.'), "__NEXT_ERROR_CODE", {
|
|
34842
|
+
value: "E96",
|
|
34843
|
+
enumerable: false,
|
|
34844
|
+
configurable: true
|
|
34845
|
+
});
|
|
34814
34846
|
}
|
|
34815
34847
|
if (height) {
|
|
34816
|
-
throw new Error('Image with src "' + src + '" has both "height" and "fill" properties. Only one should be used.')
|
|
34848
|
+
throw Object.defineProperty(new Error('Image with src "' + src + '" has both "height" and "fill" properties. Only one should be used.'), "__NEXT_ERROR_CODE", {
|
|
34849
|
+
value: "E115",
|
|
34850
|
+
enumerable: false,
|
|
34851
|
+
configurable: true
|
|
34852
|
+
});
|
|
34817
34853
|
}
|
|
34818
|
-
if ((style == null ? void 0 : style.position) && style.position !==
|
|
34819
|
-
throw new Error('Image with src "' + src + '" has both "fill" and "style.position" properties. Images with "fill" always use position absolute - it cannot be modified.')
|
|
34854
|
+
if ((style == null ? void 0 : style.position) && style.position !== 'absolute') {
|
|
34855
|
+
throw Object.defineProperty(new Error('Image with src "' + src + '" has both "fill" and "style.position" properties. Images with "fill" always use position absolute - it cannot be modified.'), "__NEXT_ERROR_CODE", {
|
|
34856
|
+
value: "E216",
|
|
34857
|
+
enumerable: false,
|
|
34858
|
+
configurable: true
|
|
34859
|
+
});
|
|
34820
34860
|
}
|
|
34821
|
-
if ((style == null ? void 0 : style.width) && style.width !==
|
|
34822
|
-
throw new Error('Image with src "' + src + '" has both "fill" and "style.width" properties. Images with "fill" always use width 100% - it cannot be modified.')
|
|
34861
|
+
if ((style == null ? void 0 : style.width) && style.width !== '100%') {
|
|
34862
|
+
throw Object.defineProperty(new Error('Image with src "' + src + '" has both "fill" and "style.width" properties. Images with "fill" always use width 100% - it cannot be modified.'), "__NEXT_ERROR_CODE", {
|
|
34863
|
+
value: "E73",
|
|
34864
|
+
enumerable: false,
|
|
34865
|
+
configurable: true
|
|
34866
|
+
});
|
|
34823
34867
|
}
|
|
34824
|
-
if ((style == null ? void 0 : style.height) && style.height !==
|
|
34825
|
-
throw new Error('Image with src "' + src + '" has both "fill" and "style.height" properties. Images with "fill" always use height 100% - it cannot be modified.')
|
|
34868
|
+
if ((style == null ? void 0 : style.height) && style.height !== '100%') {
|
|
34869
|
+
throw Object.defineProperty(new Error('Image with src "' + src + '" has both "fill" and "style.height" properties. Images with "fill" always use height 100% - it cannot be modified.'), "__NEXT_ERROR_CODE", {
|
|
34870
|
+
value: "E404",
|
|
34871
|
+
enumerable: false,
|
|
34872
|
+
configurable: true
|
|
34873
|
+
});
|
|
34826
34874
|
}
|
|
34827
34875
|
} else {
|
|
34828
|
-
if (typeof widthInt ===
|
|
34829
|
-
throw new Error('Image with src "' + src + '" is missing required "width" property.')
|
|
34876
|
+
if (typeof widthInt === 'undefined') {
|
|
34877
|
+
throw Object.defineProperty(new Error('Image with src "' + src + '" is missing required "width" property.'), "__NEXT_ERROR_CODE", {
|
|
34878
|
+
value: "E451",
|
|
34879
|
+
enumerable: false,
|
|
34880
|
+
configurable: true
|
|
34881
|
+
});
|
|
34830
34882
|
} else if (isNaN(widthInt)) {
|
|
34831
|
-
throw new Error('Image with src "' + src + '" has invalid "width" property. Expected a numeric value in pixels but received "' + width + '".')
|
|
34883
|
+
throw Object.defineProperty(new Error('Image with src "' + src + '" has invalid "width" property. Expected a numeric value in pixels but received "' + width + '".'), "__NEXT_ERROR_CODE", {
|
|
34884
|
+
value: "E66",
|
|
34885
|
+
enumerable: false,
|
|
34886
|
+
configurable: true
|
|
34887
|
+
});
|
|
34832
34888
|
}
|
|
34833
|
-
if (typeof heightInt ===
|
|
34834
|
-
throw new Error('Image with src "' + src + '" is missing required "height" property.')
|
|
34889
|
+
if (typeof heightInt === 'undefined') {
|
|
34890
|
+
throw Object.defineProperty(new Error('Image with src "' + src + '" is missing required "height" property.'), "__NEXT_ERROR_CODE", {
|
|
34891
|
+
value: "E397",
|
|
34892
|
+
enumerable: false,
|
|
34893
|
+
configurable: true
|
|
34894
|
+
});
|
|
34835
34895
|
} else if (isNaN(heightInt)) {
|
|
34836
|
-
throw new Error('Image with src "' + src + '" has invalid "height" property. Expected a numeric value in pixels but received "' + height + '".')
|
|
34896
|
+
throw Object.defineProperty(new Error('Image with src "' + src + '" has invalid "height" property. Expected a numeric value in pixels but received "' + height + '".'), "__NEXT_ERROR_CODE", {
|
|
34897
|
+
value: "E444",
|
|
34898
|
+
enumerable: false,
|
|
34899
|
+
configurable: true
|
|
34900
|
+
});
|
|
34901
|
+
}
|
|
34902
|
+
// eslint-disable-next-line no-control-regex
|
|
34903
|
+
if (/^[\x00-\x20]/.test(src)) {
|
|
34904
|
+
throw Object.defineProperty(new Error('Image with src "' + src + '" cannot start with a space or control character. Use src.trimStart() to remove it or encodeURIComponent(src) to keep it.'), "__NEXT_ERROR_CODE", {
|
|
34905
|
+
value: "E176",
|
|
34906
|
+
enumerable: false,
|
|
34907
|
+
configurable: true
|
|
34908
|
+
});
|
|
34909
|
+
}
|
|
34910
|
+
// eslint-disable-next-line no-control-regex
|
|
34911
|
+
if (/[\x00-\x20]$/.test(src)) {
|
|
34912
|
+
throw Object.defineProperty(new Error('Image with src "' + src + '" cannot end with a space or control character. Use src.trimEnd() to remove it or encodeURIComponent(src) to keep it.'), "__NEXT_ERROR_CODE", {
|
|
34913
|
+
value: "E21",
|
|
34914
|
+
enumerable: false,
|
|
34915
|
+
configurable: true
|
|
34916
|
+
});
|
|
34837
34917
|
}
|
|
34838
34918
|
}
|
|
34839
34919
|
}
|
|
34840
34920
|
if (!VALID_LOADING_VALUES.includes(loading)) {
|
|
34841
|
-
throw new Error('Image with src "' + src + '" has invalid "loading" property. Provided "' + loading + '" should be one of ' + VALID_LOADING_VALUES.map(String).join(
|
|
34921
|
+
throw Object.defineProperty(new Error('Image with src "' + src + '" has invalid "loading" property. Provided "' + loading + '" should be one of ' + VALID_LOADING_VALUES.map(String).join(',') + "."), "__NEXT_ERROR_CODE", {
|
|
34922
|
+
value: "E357",
|
|
34923
|
+
enumerable: false,
|
|
34924
|
+
configurable: true
|
|
34925
|
+
});
|
|
34842
34926
|
}
|
|
34843
|
-
if (priority && loading ===
|
|
34844
|
-
throw new Error('Image with src "' + src + '" has both "priority" and "loading=\'lazy\'" properties. Only one should be used.')
|
|
34927
|
+
if (priority && loading === 'lazy') {
|
|
34928
|
+
throw Object.defineProperty(new Error('Image with src "' + src + '" has both "priority" and "loading=\'lazy\'" properties. Only one should be used.'), "__NEXT_ERROR_CODE", {
|
|
34929
|
+
value: "E218",
|
|
34930
|
+
enumerable: false,
|
|
34931
|
+
configurable: true
|
|
34932
|
+
});
|
|
34845
34933
|
}
|
|
34846
|
-
if (placeholder !==
|
|
34847
|
-
throw new Error('Image with src "' + src + '" has invalid "placeholder" property "' + placeholder + '".')
|
|
34934
|
+
if (placeholder !== 'empty' && placeholder !== 'blur' && !placeholder.startsWith('data:image/')) {
|
|
34935
|
+
throw Object.defineProperty(new Error('Image with src "' + src + '" has invalid "placeholder" property "' + placeholder + '".'), "__NEXT_ERROR_CODE", {
|
|
34936
|
+
value: "E431",
|
|
34937
|
+
enumerable: false,
|
|
34938
|
+
configurable: true
|
|
34939
|
+
});
|
|
34848
34940
|
}
|
|
34849
|
-
if (placeholder !==
|
|
34941
|
+
if (placeholder !== 'empty') {
|
|
34850
34942
|
if (widthInt && heightInt && widthInt * heightInt < 1600) {
|
|
34851
34943
|
(0, _warnonce.warnOnce)('Image with src "' + src + '" is smaller than 40x40. Consider removing the "placeholder" property to improve performance.');
|
|
34852
34944
|
}
|
|
34853
34945
|
}
|
|
34854
|
-
if (
|
|
34946
|
+
if (qualityInt && qualityInt !== 75 && !config.qualities) {
|
|
34947
|
+
(0, _warnonce.warnOnce)('Image with src "' + src + '" is using quality "' + qualityInt + '" which is not configured in images.qualities. This config will be required starting in Next.js 16.' + "\nRead more: https://nextjs.org/docs/messages/next-image-unconfigured-qualities");
|
|
34948
|
+
}
|
|
34949
|
+
if (src.startsWith('/') && src.includes('?') && (!(config == null ? void 0 : (_config_localPatterns = config.localPatterns) == null ? void 0 : _config_localPatterns.length) || config.localPatterns.length === 1 && config.localPatterns[0].pathname === '/_next/static/media/**')) {
|
|
34950
|
+
(0, _warnonce.warnOnce)('Image with src "' + src + '" is using a query string which is not configured in images.localPatterns. This config will be required starting in Next.js 16.' + "\nRead more: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns");
|
|
34951
|
+
}
|
|
34952
|
+
if (placeholder === 'blur' && !blurDataURL) {
|
|
34855
34953
|
const VALID_BLUR_EXT = [
|
|
34856
|
-
|
|
34857
|
-
|
|
34858
|
-
|
|
34859
|
-
|
|
34954
|
+
'jpeg',
|
|
34955
|
+
'png',
|
|
34956
|
+
'webp',
|
|
34957
|
+
'avif'
|
|
34860
34958
|
] // should match next-image-loader
|
|
34861
34959
|
;
|
|
34862
|
-
throw new Error('Image with src "' + src + '" has "placeholder=\'blur\'" property but is missing the "blurDataURL" property.\n Possible solutions:\n - Add a "blurDataURL" property, the contents should be a small Data URL to represent the image\n - Change the "src" property to a static import with one of the supported file types: ' + VALID_BLUR_EXT.join(
|
|
34960
|
+
throw Object.defineProperty(new Error('Image with src "' + src + '" has "placeholder=\'blur\'" property but is missing the "blurDataURL" property.\n Possible solutions:\n - Add a "blurDataURL" property, the contents should be a small Data URL to represent the image\n - Change the "src" property to a static import with one of the supported file types: ' + VALID_BLUR_EXT.join(',') + ' (animated images not supported)\n - Remove the "placeholder" property, effectively no blur effect\n Read more: https://nextjs.org/docs/messages/placeholder-blur-data-url'), "__NEXT_ERROR_CODE", {
|
|
34961
|
+
value: "E371",
|
|
34962
|
+
enumerable: false,
|
|
34963
|
+
configurable: true
|
|
34964
|
+
});
|
|
34863
34965
|
}
|
|
34864
|
-
if (
|
|
34966
|
+
if ('ref' in rest) {
|
|
34865
34967
|
(0, _warnonce.warnOnce)('Image with src "' + src + '" is using unsupported "ref" property. Consider using the "onLoad" property instead.');
|
|
34866
34968
|
}
|
|
34867
34969
|
if (!unoptimized && !isDefaultLoader) {
|
|
@@ -34893,14 +34995,14 @@ function requireGetImgProps () {
|
|
|
34893
34995
|
(0, _warnonce.warnOnce)('Image with src "' + src + '" has legacy prop "' + legacyKey + '". Did you forget to run the codemod?' + "\nRead more: https://nextjs.org/docs/messages/next-image-upgrade-to-13");
|
|
34894
34996
|
}
|
|
34895
34997
|
}
|
|
34896
|
-
if (typeof window !==
|
|
34998
|
+
if (typeof window !== 'undefined' && !perfObserver && window.PerformanceObserver) {
|
|
34897
34999
|
perfObserver = new PerformanceObserver((entryList)=>{
|
|
34898
35000
|
for (const entry of entryList.getEntries()){
|
|
34899
35001
|
var _entry_element;
|
|
34900
35002
|
// @ts-ignore - missing "LargestContentfulPaint" class with "element" prop
|
|
34901
|
-
const imgSrc = (entry == null ? void 0 : (_entry_element = entry.element) == null ? void 0 : _entry_element.src) ||
|
|
35003
|
+
const imgSrc = (entry == null ? void 0 : (_entry_element = entry.element) == null ? void 0 : _entry_element.src) || '';
|
|
34902
35004
|
const lcpImage = allImgs.get(imgSrc);
|
|
34903
|
-
if (lcpImage && !lcpImage.priority && lcpImage.placeholder ===
|
|
35005
|
+
if (lcpImage && !lcpImage.priority && lcpImage.placeholder === 'empty' && !lcpImage.src.startsWith('data:') && !lcpImage.src.startsWith('blob:')) {
|
|
34904
35006
|
// https://web.dev/lcp/#measure-lcp-in-javascript
|
|
34905
35007
|
(0, _warnonce.warnOnce)('Image with src "' + lcpImage.src + '" was detected as the Largest Contentful Paint (LCP). Please add the "priority" property if this image is above the fold.' + "\nRead more: https://nextjs.org/docs/api-reference/next/image#priority");
|
|
34906
35008
|
}
|
|
@@ -34908,7 +35010,7 @@ function requireGetImgProps () {
|
|
|
34908
35010
|
});
|
|
34909
35011
|
try {
|
|
34910
35012
|
perfObserver.observe({
|
|
34911
|
-
type:
|
|
35013
|
+
type: 'largest-contentful-paint',
|
|
34912
35014
|
buffered: true
|
|
34913
35015
|
});
|
|
34914
35016
|
} catch (err) {
|
|
@@ -34918,9 +35020,9 @@ function requireGetImgProps () {
|
|
|
34918
35020
|
}
|
|
34919
35021
|
}
|
|
34920
35022
|
const imgStyle = Object.assign(fill ? {
|
|
34921
|
-
position:
|
|
34922
|
-
height:
|
|
34923
|
-
width:
|
|
35023
|
+
position: 'absolute',
|
|
35024
|
+
height: '100%',
|
|
35025
|
+
width: '100%',
|
|
34924
35026
|
left: 0,
|
|
34925
35027
|
top: 0,
|
|
34926
35028
|
right: 0,
|
|
@@ -34928,25 +35030,27 @@ function requireGetImgProps () {
|
|
|
34928
35030
|
objectFit,
|
|
34929
35031
|
objectPosition
|
|
34930
35032
|
} : {}, showAltText ? {} : {
|
|
34931
|
-
color:
|
|
35033
|
+
color: 'transparent'
|
|
34932
35034
|
}, style);
|
|
34933
|
-
const backgroundImage = !blurComplete && placeholder !==
|
|
35035
|
+
const backgroundImage = !blurComplete && placeholder !== 'empty' ? placeholder === 'blur' ? 'url("data:image/svg+xml;charset=utf-8,' + (0, _imageblursvg.getImageBlurSvg)({
|
|
34934
35036
|
widthInt,
|
|
34935
35037
|
heightInt,
|
|
34936
35038
|
blurWidth,
|
|
34937
35039
|
blurHeight,
|
|
34938
|
-
blurDataURL: blurDataURL ||
|
|
35040
|
+
blurDataURL: blurDataURL || '',
|
|
34939
35041
|
objectFit: imgStyle.objectFit
|
|
34940
35042
|
}) + '")' : 'url("' + placeholder + '")' // assume `data:image/`
|
|
34941
35043
|
: null;
|
|
35044
|
+
const backgroundSize = !INVALID_BACKGROUND_SIZE_VALUES.includes(imgStyle.objectFit) ? imgStyle.objectFit : imgStyle.objectFit === 'fill' ? '100% 100%' // the background-size equivalent of `fill`
|
|
35045
|
+
: 'cover';
|
|
34942
35046
|
let placeholderStyle = backgroundImage ? {
|
|
34943
|
-
backgroundSize
|
|
34944
|
-
backgroundPosition: imgStyle.objectPosition ||
|
|
34945
|
-
backgroundRepeat:
|
|
35047
|
+
backgroundSize,
|
|
35048
|
+
backgroundPosition: imgStyle.objectPosition || '50% 50%',
|
|
35049
|
+
backgroundRepeat: 'no-repeat',
|
|
34946
35050
|
backgroundImage
|
|
34947
35051
|
} : {};
|
|
34948
|
-
if (process.env.NODE_ENV ===
|
|
34949
|
-
if (placeholderStyle.backgroundImage && placeholder ===
|
|
35052
|
+
if (process.env.NODE_ENV === 'development') {
|
|
35053
|
+
if (placeholderStyle.backgroundImage && placeholder === 'blur' && (blurDataURL == null ? void 0 : blurDataURL.startsWith('/'))) {
|
|
34950
35054
|
// During `next dev`, we don't want to generate blur placeholders with webpack
|
|
34951
35055
|
// because it can delay starting the dev server. Instead, `next-image-loader.js`
|
|
34952
35056
|
// will inline a special url to lazily generate the blur placeholder at request time.
|
|
@@ -34962,8 +35066,8 @@ function requireGetImgProps () {
|
|
|
34962
35066
|
sizes,
|
|
34963
35067
|
loader
|
|
34964
35068
|
});
|
|
34965
|
-
if (process.env.NODE_ENV !==
|
|
34966
|
-
if (typeof window !==
|
|
35069
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
35070
|
+
if (typeof window !== 'undefined') {
|
|
34967
35071
|
let fullUrl;
|
|
34968
35072
|
try {
|
|
34969
35073
|
fullUrl = new URL(imgAttributes.src);
|
|
@@ -34979,7 +35083,7 @@ function requireGetImgProps () {
|
|
|
34979
35083
|
}
|
|
34980
35084
|
const props = {
|
|
34981
35085
|
...rest,
|
|
34982
|
-
loading: isLazy ?
|
|
35086
|
+
loading: isLazy ? 'lazy' : loading,
|
|
34983
35087
|
fetchPriority,
|
|
34984
35088
|
width: widthInt,
|
|
34985
35089
|
height: heightInt,
|
|
@@ -35030,7 +35134,6 @@ function require_interop_require_wildcard () {
|
|
|
35030
35134
|
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
35031
35135
|
})(nodeInterop);
|
|
35032
35136
|
}
|
|
35033
|
-
_interop_require_wildcard._ = _interop_require_wildcard._interop_require_wildcard = _interop_require_wildcard$1;
|
|
35034
35137
|
function _interop_require_wildcard$1(obj, nodeInterop) {
|
|
35035
35138
|
if (!nodeInterop && obj && obj.__esModule) return obj;
|
|
35036
35139
|
if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { default: obj };
|
|
@@ -35056,6 +35159,7 @@ function require_interop_require_wildcard () {
|
|
|
35056
35159
|
|
|
35057
35160
|
return newObj;
|
|
35058
35161
|
}
|
|
35162
|
+
_interop_require_wildcard._ = _interop_require_wildcard$1;
|
|
35059
35163
|
return _interop_require_wildcard;
|
|
35060
35164
|
}
|
|
35061
35165
|
|
|
@@ -35079,7 +35183,7 @@ function requireSideEffect () {
|
|
|
35079
35183
|
}
|
|
35080
35184
|
});
|
|
35081
35185
|
const _react = o;
|
|
35082
|
-
const isServer = typeof window ===
|
|
35186
|
+
const isServer = typeof window === 'undefined';
|
|
35083
35187
|
const useClientOnlyLayoutEffect = isServer ? ()=>{} : _react.useLayoutEffect;
|
|
35084
35188
|
const useClientOnlyEffect = isServer ? ()=>{} : _react.useEffect;
|
|
35085
35189
|
function SideEffect(props) {
|
|
@@ -35158,8 +35262,8 @@ function requireAmpContext_sharedRuntime () {
|
|
|
35158
35262
|
const _interop_require_default = /*@__PURE__*/ require_interop_require_default();
|
|
35159
35263
|
const _react = /*#__PURE__*/ _interop_require_default._(o);
|
|
35160
35264
|
const AmpStateContext = _react.default.createContext({});
|
|
35161
|
-
if (process.env.NODE_ENV !==
|
|
35162
|
-
AmpStateContext.displayName =
|
|
35265
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
35266
|
+
AmpStateContext.displayName = 'AmpStateContext';
|
|
35163
35267
|
}
|
|
35164
35268
|
|
|
35165
35269
|
|
|
@@ -35187,8 +35291,8 @@ function requireHeadManagerContext_sharedRuntime () {
|
|
|
35187
35291
|
const _interop_require_default = /*@__PURE__*/ require_interop_require_default();
|
|
35188
35292
|
const _react = /*#__PURE__*/ _interop_require_default._(o);
|
|
35189
35293
|
const HeadManagerContext = _react.default.createContext({});
|
|
35190
|
-
if (process.env.NODE_ENV !==
|
|
35191
|
-
HeadManagerContext.displayName =
|
|
35294
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
35295
|
+
HeadManagerContext.displayName = 'HeadManagerContext';
|
|
35192
35296
|
}
|
|
35193
35297
|
|
|
35194
35298
|
|
|
@@ -35229,7 +35333,7 @@ function requireHead () {
|
|
|
35229
35333
|
if (hasRequiredHead) return head.exports;
|
|
35230
35334
|
hasRequiredHead = 1;
|
|
35231
35335
|
(function (module, exports$1) {
|
|
35232
|
-
|
|
35336
|
+
'use client';
|
|
35233
35337
|
Object.defineProperty(exports$1, "__esModule", {
|
|
35234
35338
|
value: true
|
|
35235
35339
|
});
|
|
@@ -35261,19 +35365,19 @@ function requireHead () {
|
|
|
35261
35365
|
const head = [
|
|
35262
35366
|
/*#__PURE__*/ (0, _jsxruntime.jsx)("meta", {
|
|
35263
35367
|
charSet: "utf-8"
|
|
35264
|
-
})
|
|
35368
|
+
}, "charset")
|
|
35265
35369
|
];
|
|
35266
35370
|
if (!inAmpMode) {
|
|
35267
35371
|
head.push(/*#__PURE__*/ (0, _jsxruntime.jsx)("meta", {
|
|
35268
35372
|
name: "viewport",
|
|
35269
35373
|
content: "width=device-width"
|
|
35270
|
-
}));
|
|
35374
|
+
}, "viewport"));
|
|
35271
35375
|
}
|
|
35272
35376
|
return head;
|
|
35273
35377
|
}
|
|
35274
35378
|
function onlyReactElement(list, child) {
|
|
35275
35379
|
// React children can be "string" or "number" in this case we ignore them for backwards compat
|
|
35276
|
-
if (typeof child ===
|
|
35380
|
+
if (typeof child === 'string' || typeof child === 'number') {
|
|
35277
35381
|
return list;
|
|
35278
35382
|
}
|
|
35279
35383
|
// Adds support for React.Fragment
|
|
@@ -35281,7 +35385,7 @@ function requireHead () {
|
|
|
35281
35385
|
return list.concat(// @ts-expect-error @types/react does not remove fragments but this could also return ReactPortal[]
|
|
35282
35386
|
_react.default.Children.toArray(child.props.children).reduce(// @ts-expect-error @types/react does not remove fragments but this could also return ReactPortal[]
|
|
35283
35387
|
(fragmentList, fragmentChild)=>{
|
|
35284
|
-
if (typeof fragmentChild ===
|
|
35388
|
+
if (typeof fragmentChild === 'string' || typeof fragmentChild === 'number') {
|
|
35285
35389
|
return fragmentList;
|
|
35286
35390
|
}
|
|
35287
35391
|
return fragmentList.concat(fragmentChild);
|
|
@@ -35290,10 +35394,10 @@ function requireHead () {
|
|
|
35290
35394
|
return list.concat(child);
|
|
35291
35395
|
}
|
|
35292
35396
|
const METATYPES = [
|
|
35293
|
-
|
|
35294
|
-
|
|
35295
|
-
|
|
35296
|
-
|
|
35397
|
+
'name',
|
|
35398
|
+
'httpEquiv',
|
|
35399
|
+
'charSet',
|
|
35400
|
+
'itemProp'
|
|
35297
35401
|
];
|
|
35298
35402
|
/*
|
|
35299
35403
|
returns a function for filtering head child elements
|
|
@@ -35307,9 +35411,9 @@ function requireHead () {
|
|
|
35307
35411
|
return (h)=>{
|
|
35308
35412
|
let isUnique = true;
|
|
35309
35413
|
let hasKey = false;
|
|
35310
|
-
if (h.key && typeof h.key !==
|
|
35414
|
+
if (h.key && typeof h.key !== 'number' && h.key.indexOf('$') > 0) {
|
|
35311
35415
|
hasKey = true;
|
|
35312
|
-
const key = h.key.slice(h.key.indexOf(
|
|
35416
|
+
const key = h.key.slice(h.key.indexOf('$') + 1);
|
|
35313
35417
|
if (keys.has(key)) {
|
|
35314
35418
|
isUnique = false;
|
|
35315
35419
|
} else {
|
|
@@ -35318,19 +35422,19 @@ function requireHead () {
|
|
|
35318
35422
|
}
|
|
35319
35423
|
// eslint-disable-next-line default-case
|
|
35320
35424
|
switch(h.type){
|
|
35321
|
-
case
|
|
35322
|
-
case
|
|
35425
|
+
case 'title':
|
|
35426
|
+
case 'base':
|
|
35323
35427
|
if (tags.has(h.type)) {
|
|
35324
35428
|
isUnique = false;
|
|
35325
35429
|
} else {
|
|
35326
35430
|
tags.add(h.type);
|
|
35327
35431
|
}
|
|
35328
35432
|
break;
|
|
35329
|
-
case
|
|
35433
|
+
case 'meta':
|
|
35330
35434
|
for(let i = 0, len = METATYPES.length; i < len; i++){
|
|
35331
35435
|
const metatype = METATYPES[i];
|
|
35332
35436
|
if (!h.props.hasOwnProperty(metatype)) continue;
|
|
35333
|
-
if (metatype ===
|
|
35437
|
+
if (metatype === 'charSet') {
|
|
35334
35438
|
if (metaTypes.has(metatype)) {
|
|
35335
35439
|
isUnique = false;
|
|
35336
35440
|
} else {
|
|
@@ -35339,7 +35443,7 @@ function requireHead () {
|
|
|
35339
35443
|
} else {
|
|
35340
35444
|
const category = h.props[metatype];
|
|
35341
35445
|
const categories = metaCategories[metatype] || new Set();
|
|
35342
|
-
if ((metatype !==
|
|
35446
|
+
if ((metatype !== 'name' || !hasKey) && categories.has(category)) {
|
|
35343
35447
|
isUnique = false;
|
|
35344
35448
|
} else {
|
|
35345
35449
|
categories.add(category);
|
|
@@ -35359,29 +35463,13 @@ function requireHead () {
|
|
|
35359
35463
|
const { inAmpMode } = props;
|
|
35360
35464
|
return headChildrenElements.reduce(onlyReactElement, []).reverse().concat(defaultHead(inAmpMode).reverse()).filter(unique()).reverse().map((c, i)=>{
|
|
35361
35465
|
const key = c.key || i;
|
|
35362
|
-
if (process.env.NODE_ENV
|
|
35363
|
-
if (c.type === "link" && c.props["href"] && // TODO(prateekbh@): Replace this with const from `constants` when the tree shaking works.
|
|
35364
|
-
[
|
|
35365
|
-
"https://fonts.googleapis.com/css",
|
|
35366
|
-
"https://use.typekit.net/"
|
|
35367
|
-
].some((url)=>c.props["href"].startsWith(url))) {
|
|
35368
|
-
const newProps = {
|
|
35369
|
-
...c.props || {}
|
|
35370
|
-
};
|
|
35371
|
-
newProps["data-href"] = newProps["href"];
|
|
35372
|
-
newProps["href"] = undefined;
|
|
35373
|
-
// Add this attribute to make it easy to identify optimized tags
|
|
35374
|
-
newProps["data-optimized-fonts"] = true;
|
|
35375
|
-
return /*#__PURE__*/ _react.default.cloneElement(c, newProps);
|
|
35376
|
-
}
|
|
35377
|
-
}
|
|
35378
|
-
if (process.env.NODE_ENV === "development") {
|
|
35466
|
+
if (process.env.NODE_ENV === 'development') {
|
|
35379
35467
|
// omit JSON-LD structured data snippets from the warning
|
|
35380
|
-
if (c.type ===
|
|
35381
|
-
const srcMessage = c.props[
|
|
35468
|
+
if (c.type === 'script' && c.props['type'] !== 'application/ld+json') {
|
|
35469
|
+
const srcMessage = c.props['src'] ? '<script> tag with src="' + c.props['src'] + '"' : "inline <script>";
|
|
35382
35470
|
(0, _warnonce.warnOnce)("Do not add <script> tags using next/head (see " + srcMessage + "). Use next/script instead. \nSee more info here: https://nextjs.org/docs/messages/no-script-tags-in-head-component");
|
|
35383
|
-
} else if (c.type ===
|
|
35384
|
-
(0, _warnonce.warnOnce)('Do not add stylesheets using next/head (see <link rel="stylesheet"> tag with href="' + c.props[
|
|
35471
|
+
} else if (c.type === 'link' && c.props['rel'] === 'stylesheet') {
|
|
35472
|
+
(0, _warnonce.warnOnce)('Do not add stylesheets using next/head (see <link rel="stylesheet"> tag with href="' + c.props['href'] + '"). Use Document instead. \nSee more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-component');
|
|
35385
35473
|
}
|
|
35386
35474
|
}
|
|
35387
35475
|
return /*#__PURE__*/ _react.default.cloneElement(c, {
|
|
@@ -35437,8 +35525,8 @@ function requireImageConfigContext_sharedRuntime () {
|
|
|
35437
35525
|
const _react = /*#__PURE__*/ _interop_require_default._(o);
|
|
35438
35526
|
const _imageconfig = requireImageConfig();
|
|
35439
35527
|
const ImageConfigContext = _react.default.createContext(_imageconfig.imageConfigDefault);
|
|
35440
|
-
if (process.env.NODE_ENV !==
|
|
35441
|
-
ImageConfigContext.displayName =
|
|
35528
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
35529
|
+
ImageConfigContext.displayName = 'ImageConfigContext';
|
|
35442
35530
|
}
|
|
35443
35531
|
|
|
35444
35532
|
|
|
@@ -35466,8 +35554,8 @@ function requireRouterContext_sharedRuntime () {
|
|
|
35466
35554
|
const _interop_require_default = /*@__PURE__*/ require_interop_require_default();
|
|
35467
35555
|
const _react = /*#__PURE__*/ _interop_require_default._(o);
|
|
35468
35556
|
const RouterContext = _react.default.createContext(null);
|
|
35469
|
-
if (process.env.NODE_ENV !==
|
|
35470
|
-
RouterContext.displayName =
|
|
35557
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
35558
|
+
RouterContext.displayName = 'RouterContext';
|
|
35471
35559
|
}
|
|
35472
35560
|
|
|
35473
35561
|
|
|
@@ -35521,7 +35609,7 @@ function requireMatchLocalPattern () {
|
|
|
35521
35609
|
}
|
|
35522
35610
|
}
|
|
35523
35611
|
var _pattern_pathname;
|
|
35524
|
-
if (!(0, _picomatch.makeRe)((_pattern_pathname = pattern.pathname) != null ? _pattern_pathname :
|
|
35612
|
+
if (!(0, _picomatch.makeRe)((_pattern_pathname = pattern.pathname) != null ? _pattern_pathname : '**', {
|
|
35525
35613
|
dot: true
|
|
35526
35614
|
}).test(url.pathname)) {
|
|
35527
35615
|
return false;
|
|
@@ -35533,7 +35621,7 @@ function requireMatchLocalPattern () {
|
|
|
35533
35621
|
// if the user didn't define "localPatterns", we allow all local images
|
|
35534
35622
|
return true;
|
|
35535
35623
|
}
|
|
35536
|
-
const url = new URL(urlPathAndQuery,
|
|
35624
|
+
const url = new URL(urlPathAndQuery, 'http://n');
|
|
35537
35625
|
return localPatterns.some((p)=>matchLocalPattern(p, url));
|
|
35538
35626
|
}
|
|
35539
35627
|
|
|
@@ -35570,8 +35658,7 @@ function requireMatchRemotePattern () {
|
|
|
35570
35658
|
const _picomatch = requirePicomatch();
|
|
35571
35659
|
function matchRemotePattern(pattern, url) {
|
|
35572
35660
|
if (pattern.protocol !== undefined) {
|
|
35573
|
-
|
|
35574
|
-
if (pattern.protocol !== actualProto) {
|
|
35661
|
+
if (pattern.protocol.replace(/:$/, '') !== url.protocol.replace(/:$/, '')) {
|
|
35575
35662
|
return false;
|
|
35576
35663
|
}
|
|
35577
35664
|
}
|
|
@@ -35581,7 +35668,11 @@ function requireMatchRemotePattern () {
|
|
|
35581
35668
|
}
|
|
35582
35669
|
}
|
|
35583
35670
|
if (pattern.hostname === undefined) {
|
|
35584
|
-
throw new Error("Pattern should define hostname but found\n" + JSON.stringify(pattern))
|
|
35671
|
+
throw Object.defineProperty(new Error("Pattern should define hostname but found\n" + JSON.stringify(pattern)), "__NEXT_ERROR_CODE", {
|
|
35672
|
+
value: "E410",
|
|
35673
|
+
enumerable: false,
|
|
35674
|
+
configurable: true
|
|
35675
|
+
});
|
|
35585
35676
|
} else {
|
|
35586
35677
|
if (!(0, _picomatch.makeRe)(pattern.hostname).test(url.hostname)) {
|
|
35587
35678
|
return false;
|
|
@@ -35594,7 +35685,7 @@ function requireMatchRemotePattern () {
|
|
|
35594
35685
|
}
|
|
35595
35686
|
var _pattern_pathname;
|
|
35596
35687
|
// Should be the same as writeImagesManifest()
|
|
35597
|
-
if (!(0, _picomatch.makeRe)((_pattern_pathname = pattern.pathname) != null ? _pattern_pathname :
|
|
35688
|
+
if (!(0, _picomatch.makeRe)((_pattern_pathname = pattern.pathname) != null ? _pattern_pathname : '**', {
|
|
35598
35689
|
dot: true
|
|
35599
35690
|
}).test(url.pathname)) {
|
|
35600
35691
|
return false;
|
|
@@ -35629,54 +35720,78 @@ function requireImageLoader () {
|
|
|
35629
35720
|
function defaultLoader(param) {
|
|
35630
35721
|
let { config, src, width, quality } = param;
|
|
35631
35722
|
var _config_qualities;
|
|
35632
|
-
if (process.env.NODE_ENV !==
|
|
35723
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
35633
35724
|
const missingValues = [];
|
|
35634
35725
|
// these should always be provided but make sure they are
|
|
35635
|
-
if (!src) missingValues.push(
|
|
35636
|
-
if (!width) missingValues.push(
|
|
35726
|
+
if (!src) missingValues.push('src');
|
|
35727
|
+
if (!width) missingValues.push('width');
|
|
35637
35728
|
if (missingValues.length > 0) {
|
|
35638
|
-
throw new Error("Next Image Optimization requires " + missingValues.join(
|
|
35729
|
+
throw Object.defineProperty(new Error("Next Image Optimization requires " + missingValues.join(', ') + " to be provided. Make sure you pass them as props to the `next/image` component. Received: " + JSON.stringify({
|
|
35639
35730
|
src,
|
|
35640
35731
|
width,
|
|
35641
35732
|
quality
|
|
35642
|
-
}))
|
|
35733
|
+
})), "__NEXT_ERROR_CODE", {
|
|
35734
|
+
value: "E188",
|
|
35735
|
+
enumerable: false,
|
|
35736
|
+
configurable: true
|
|
35737
|
+
});
|
|
35643
35738
|
}
|
|
35644
|
-
if (src.startsWith(
|
|
35645
|
-
throw new Error('Failed to parse src "' + src + '" on `next/image`, protocol-relative URL (//) must be changed to an absolute URL (http:// or https://)')
|
|
35739
|
+
if (src.startsWith('//')) {
|
|
35740
|
+
throw Object.defineProperty(new Error('Failed to parse src "' + src + '" on `next/image`, protocol-relative URL (//) must be changed to an absolute URL (http:// or https://)'), "__NEXT_ERROR_CODE", {
|
|
35741
|
+
value: "E360",
|
|
35742
|
+
enumerable: false,
|
|
35743
|
+
configurable: true
|
|
35744
|
+
});
|
|
35646
35745
|
}
|
|
35647
|
-
if (src.startsWith(
|
|
35648
|
-
if (process.env.NODE_ENV !==
|
|
35649
|
-
process.env.NEXT_RUNTIME !==
|
|
35746
|
+
if (src.startsWith('/') && config.localPatterns) {
|
|
35747
|
+
if (process.env.NODE_ENV !== 'test' && // micromatch isn't compatible with edge runtime
|
|
35748
|
+
process.env.NEXT_RUNTIME !== 'edge') {
|
|
35650
35749
|
// We use dynamic require because this should only error in development
|
|
35651
35750
|
const { hasLocalMatch } = requireMatchLocalPattern();
|
|
35652
35751
|
if (!hasLocalMatch(config.localPatterns, src)) {
|
|
35653
|
-
throw new Error("Invalid src prop (" + src + ") on `next/image` does not match `images.localPatterns` configured in your `next.config.js`\n" + "See more info: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns")
|
|
35752
|
+
throw Object.defineProperty(new Error("Invalid src prop (" + src + ") on `next/image` does not match `images.localPatterns` configured in your `next.config.js`\n" + "See more info: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns"), "__NEXT_ERROR_CODE", {
|
|
35753
|
+
value: "E426",
|
|
35754
|
+
enumerable: false,
|
|
35755
|
+
configurable: true
|
|
35756
|
+
});
|
|
35654
35757
|
}
|
|
35655
35758
|
}
|
|
35656
35759
|
}
|
|
35657
|
-
if (!src.startsWith(
|
|
35760
|
+
if (!src.startsWith('/') && (config.domains || config.remotePatterns)) {
|
|
35658
35761
|
let parsedSrc;
|
|
35659
35762
|
try {
|
|
35660
35763
|
parsedSrc = new URL(src);
|
|
35661
35764
|
} catch (err) {
|
|
35662
35765
|
console.error(err);
|
|
35663
|
-
throw new Error('Failed to parse src "' + src + '" on `next/image`, if using relative image it must start with a leading slash "/" or be an absolute URL (http:// or https://)')
|
|
35766
|
+
throw Object.defineProperty(new Error('Failed to parse src "' + src + '" on `next/image`, if using relative image it must start with a leading slash "/" or be an absolute URL (http:// or https://)'), "__NEXT_ERROR_CODE", {
|
|
35767
|
+
value: "E63",
|
|
35768
|
+
enumerable: false,
|
|
35769
|
+
configurable: true
|
|
35770
|
+
});
|
|
35664
35771
|
}
|
|
35665
|
-
if (process.env.NODE_ENV !==
|
|
35666
|
-
process.env.NEXT_RUNTIME !==
|
|
35772
|
+
if (process.env.NODE_ENV !== 'test' && // micromatch isn't compatible with edge runtime
|
|
35773
|
+
process.env.NEXT_RUNTIME !== 'edge') {
|
|
35667
35774
|
// We use dynamic require because this should only error in development
|
|
35668
35775
|
const { hasRemoteMatch } = requireMatchRemotePattern();
|
|
35669
35776
|
if (!hasRemoteMatch(config.domains, config.remotePatterns, parsedSrc)) {
|
|
35670
|
-
throw new Error("Invalid src prop (" + src + ') on `next/image`, hostname "' + parsedSrc.hostname + '" is not configured under images in your `next.config.js`\n' + "See more info: https://nextjs.org/docs/messages/next-image-unconfigured-host")
|
|
35777
|
+
throw Object.defineProperty(new Error("Invalid src prop (" + src + ') on `next/image`, hostname "' + parsedSrc.hostname + '" is not configured under images in your `next.config.js`\n' + "See more info: https://nextjs.org/docs/messages/next-image-unconfigured-host"), "__NEXT_ERROR_CODE", {
|
|
35778
|
+
value: "E231",
|
|
35779
|
+
enumerable: false,
|
|
35780
|
+
configurable: true
|
|
35781
|
+
});
|
|
35671
35782
|
}
|
|
35672
35783
|
}
|
|
35673
35784
|
}
|
|
35674
35785
|
if (quality && config.qualities && !config.qualities.includes(quality)) {
|
|
35675
|
-
throw new Error("Invalid quality prop (" + quality + ") on `next/image` does not match `images.qualities` configured in your `next.config.js`\n" + "See more info: https://nextjs.org/docs/messages/next-image-unconfigured-qualities")
|
|
35786
|
+
throw Object.defineProperty(new Error("Invalid quality prop (" + quality + ") on `next/image` does not match `images.qualities` configured in your `next.config.js`\n" + "See more info: https://nextjs.org/docs/messages/next-image-unconfigured-qualities"), "__NEXT_ERROR_CODE", {
|
|
35787
|
+
value: "E623",
|
|
35788
|
+
enumerable: false,
|
|
35789
|
+
configurable: true
|
|
35790
|
+
});
|
|
35676
35791
|
}
|
|
35677
35792
|
}
|
|
35678
35793
|
const q = quality || ((_config_qualities = config.qualities) == null ? void 0 : _config_qualities.reduce((prev, cur)=>Math.abs(cur - DEFAULT_Q) < Math.abs(prev - DEFAULT_Q) ? cur : prev)) || DEFAULT_Q;
|
|
35679
|
-
return config.path + "?url=" + encodeURIComponent(src) + "&w=" + width + "&q=" + q + (process.env.NEXT_DEPLOYMENT_ID ? "&dpl=" + process.env.NEXT_DEPLOYMENT_ID :
|
|
35794
|
+
return config.path + "?url=" + encodeURIComponent(src) + "&w=" + width + "&q=" + q + (src.startsWith('/_next/static/media/') && process.env.NEXT_DEPLOYMENT_ID ? "&dpl=" + process.env.NEXT_DEPLOYMENT_ID : '');
|
|
35680
35795
|
}
|
|
35681
35796
|
// We use this to determine if the import is the default loader
|
|
35682
35797
|
// or a custom loader defined by the user in next.config.js
|
|
@@ -35688,13 +35803,93 @@ function requireImageLoader () {
|
|
|
35688
35803
|
return imageLoader;
|
|
35689
35804
|
}
|
|
35690
35805
|
|
|
35806
|
+
var useMergedRef = {exports: {}};
|
|
35807
|
+
|
|
35808
|
+
var hasRequiredUseMergedRef;
|
|
35809
|
+
|
|
35810
|
+
function requireUseMergedRef () {
|
|
35811
|
+
if (hasRequiredUseMergedRef) return useMergedRef.exports;
|
|
35812
|
+
hasRequiredUseMergedRef = 1;
|
|
35813
|
+
(function (module, exports$1) {
|
|
35814
|
+
Object.defineProperty(exports$1, "__esModule", {
|
|
35815
|
+
value: true
|
|
35816
|
+
});
|
|
35817
|
+
Object.defineProperty(exports$1, "useMergedRef", {
|
|
35818
|
+
enumerable: true,
|
|
35819
|
+
get: function() {
|
|
35820
|
+
return useMergedRef;
|
|
35821
|
+
}
|
|
35822
|
+
});
|
|
35823
|
+
const _react = o;
|
|
35824
|
+
function useMergedRef(refA, refB) {
|
|
35825
|
+
const cleanupA = (0, _react.useRef)(null);
|
|
35826
|
+
const cleanupB = (0, _react.useRef)(null);
|
|
35827
|
+
// NOTE: In theory, we could skip the wrapping if only one of the refs is non-null.
|
|
35828
|
+
// (this happens often if the user doesn't pass a ref to Link/Form/Image)
|
|
35829
|
+
// But this can cause us to leak a cleanup-ref into user code (e.g. via `<Link legacyBehavior>`),
|
|
35830
|
+
// and the user might pass that ref into ref-merging library that doesn't support cleanup refs
|
|
35831
|
+
// (because it hasn't been updated for React 19)
|
|
35832
|
+
// which can then cause things to blow up, because a cleanup-returning ref gets called with `null`.
|
|
35833
|
+
// So in practice, it's safer to be defensive and always wrap the ref, even on React 19.
|
|
35834
|
+
return (0, _react.useCallback)((current)=>{
|
|
35835
|
+
if (current === null) {
|
|
35836
|
+
const cleanupFnA = cleanupA.current;
|
|
35837
|
+
if (cleanupFnA) {
|
|
35838
|
+
cleanupA.current = null;
|
|
35839
|
+
cleanupFnA();
|
|
35840
|
+
}
|
|
35841
|
+
const cleanupFnB = cleanupB.current;
|
|
35842
|
+
if (cleanupFnB) {
|
|
35843
|
+
cleanupB.current = null;
|
|
35844
|
+
cleanupFnB();
|
|
35845
|
+
}
|
|
35846
|
+
} else {
|
|
35847
|
+
if (refA) {
|
|
35848
|
+
cleanupA.current = applyRef(refA, current);
|
|
35849
|
+
}
|
|
35850
|
+
if (refB) {
|
|
35851
|
+
cleanupB.current = applyRef(refB, current);
|
|
35852
|
+
}
|
|
35853
|
+
}
|
|
35854
|
+
}, [
|
|
35855
|
+
refA,
|
|
35856
|
+
refB
|
|
35857
|
+
]);
|
|
35858
|
+
}
|
|
35859
|
+
function applyRef(refA, current) {
|
|
35860
|
+
if (typeof refA === 'function') {
|
|
35861
|
+
const cleanup = refA(current);
|
|
35862
|
+
if (typeof cleanup === 'function') {
|
|
35863
|
+
return cleanup;
|
|
35864
|
+
} else {
|
|
35865
|
+
return ()=>refA(null);
|
|
35866
|
+
}
|
|
35867
|
+
} else {
|
|
35868
|
+
refA.current = current;
|
|
35869
|
+
return ()=>{
|
|
35870
|
+
refA.current = null;
|
|
35871
|
+
};
|
|
35872
|
+
}
|
|
35873
|
+
}
|
|
35874
|
+
|
|
35875
|
+
if ((typeof exports$1.default === 'function' || (typeof exports$1.default === 'object' && exports$1.default !== null)) && typeof exports$1.default.__esModule === 'undefined') {
|
|
35876
|
+
Object.defineProperty(exports$1.default, '__esModule', { value: true });
|
|
35877
|
+
Object.assign(exports$1.default, exports$1);
|
|
35878
|
+
module.exports = exports$1.default;
|
|
35879
|
+
}
|
|
35880
|
+
|
|
35881
|
+
|
|
35882
|
+
} (useMergedRef, useMergedRef.exports));
|
|
35883
|
+
return useMergedRef.exports;
|
|
35884
|
+
}
|
|
35885
|
+
|
|
35691
35886
|
var hasRequiredImageComponent;
|
|
35692
35887
|
|
|
35693
35888
|
function requireImageComponent () {
|
|
35694
35889
|
if (hasRequiredImageComponent) return imageComponent.exports;
|
|
35695
35890
|
hasRequiredImageComponent = 1;
|
|
35696
35891
|
(function (module, exports$1) {
|
|
35697
|
-
|
|
35892
|
+
'use client';
|
|
35698
35893
|
Object.defineProperty(exports$1, "__esModule", {
|
|
35699
35894
|
value: true
|
|
35700
35895
|
});
|
|
@@ -35716,20 +35911,21 @@ function requireImageComponent () {
|
|
|
35716
35911
|
const _warnonce = requireWarnOnce();
|
|
35717
35912
|
const _routercontextsharedruntime = requireRouterContext_sharedRuntime();
|
|
35718
35913
|
const _imageloader = /*#__PURE__*/ _interop_require_default._(requireImageLoader());
|
|
35914
|
+
const _usemergedref = requireUseMergedRef();
|
|
35719
35915
|
// This is replaced by webpack define plugin
|
|
35720
35916
|
const configEnv = process.env.__NEXT_IMAGE_OPTS;
|
|
35721
|
-
if (typeof window ===
|
|
35917
|
+
if (typeof window === 'undefined') {
|
|
35722
35918
|
globalThis.__NEXT_IMAGE_IMPORTED = true;
|
|
35723
35919
|
}
|
|
35724
35920
|
// See https://stackoverflow.com/q/39777833/266535 for why we use this ref
|
|
35725
35921
|
// handler instead of the img's onLoad attribute.
|
|
35726
35922
|
function handleLoading(img, placeholder, onLoadRef, onLoadingCompleteRef, setBlurComplete, unoptimized, sizesInput) {
|
|
35727
35923
|
const src = img == null ? void 0 : img.src;
|
|
35728
|
-
if (!img || img[
|
|
35924
|
+
if (!img || img['data-loaded-src'] === src) {
|
|
35729
35925
|
return;
|
|
35730
35926
|
}
|
|
35731
|
-
img[
|
|
35732
|
-
const p =
|
|
35927
|
+
img['data-loaded-src'] = src;
|
|
35928
|
+
const p = 'decode' in img ? img.decode() : Promise.resolve();
|
|
35733
35929
|
p.catch(()=>{}).then(()=>{
|
|
35734
35930
|
if (!img.parentElement || !img.isConnected) {
|
|
35735
35931
|
// Exit early in case of race condition:
|
|
@@ -35739,15 +35935,15 @@ function requireImageComponent () {
|
|
|
35739
35935
|
// - decode() completes
|
|
35740
35936
|
return;
|
|
35741
35937
|
}
|
|
35742
|
-
if (placeholder !==
|
|
35938
|
+
if (placeholder !== 'empty') {
|
|
35743
35939
|
setBlurComplete(true);
|
|
35744
35940
|
}
|
|
35745
35941
|
if (onLoadRef == null ? void 0 : onLoadRef.current) {
|
|
35746
35942
|
// Since we don't have the SyntheticEvent here,
|
|
35747
35943
|
// we must create one with the same shape.
|
|
35748
35944
|
// See https://reactjs.org/docs/events.html
|
|
35749
|
-
const event = new Event(
|
|
35750
|
-
Object.defineProperty(event,
|
|
35945
|
+
const event = new Event('load');
|
|
35946
|
+
Object.defineProperty(event, 'target', {
|
|
35751
35947
|
writable: false,
|
|
35752
35948
|
value: img
|
|
35753
35949
|
});
|
|
@@ -35774,13 +35970,13 @@ function requireImageComponent () {
|
|
|
35774
35970
|
if (onLoadingCompleteRef == null ? void 0 : onLoadingCompleteRef.current) {
|
|
35775
35971
|
onLoadingCompleteRef.current(img);
|
|
35776
35972
|
}
|
|
35777
|
-
if (process.env.NODE_ENV !==
|
|
35778
|
-
const origSrc = new URL(src,
|
|
35779
|
-
if (img.getAttribute(
|
|
35780
|
-
if (!unoptimized && (!sizesInput || sizesInput ===
|
|
35973
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
35974
|
+
const origSrc = new URL(src, 'http://n').searchParams.get('url') || src;
|
|
35975
|
+
if (img.getAttribute('data-nimg') === 'fill') {
|
|
35976
|
+
if (!unoptimized && (!sizesInput || sizesInput === '100vw')) {
|
|
35781
35977
|
let widthViewportRatio = img.getBoundingClientRect().width / window.innerWidth;
|
|
35782
35978
|
if (widthViewportRatio < 0.6) {
|
|
35783
|
-
if (sizesInput ===
|
|
35979
|
+
if (sizesInput === '100vw') {
|
|
35784
35980
|
(0, _warnonce.warnOnce)('Image with src "' + origSrc + '" has "fill" prop and "sizes" prop of "100vw", but image is not rendered at full viewport width. Please adjust "sizes" to improve page performance. Read more: https://nextjs.org/docs/api-reference/next/image#sizes');
|
|
35785
35981
|
} else {
|
|
35786
35982
|
(0, _warnonce.warnOnce)('Image with src "' + origSrc + '" has "fill" but is missing "sizes" prop. Please add it to improve page performance. Read more: https://nextjs.org/docs/api-reference/next/image#sizes');
|
|
@@ -35790,20 +35986,20 @@ function requireImageComponent () {
|
|
|
35790
35986
|
if (img.parentElement) {
|
|
35791
35987
|
const { position } = window.getComputedStyle(img.parentElement);
|
|
35792
35988
|
const valid = [
|
|
35793
|
-
|
|
35794
|
-
|
|
35795
|
-
|
|
35989
|
+
'absolute',
|
|
35990
|
+
'fixed',
|
|
35991
|
+
'relative'
|
|
35796
35992
|
];
|
|
35797
35993
|
if (!valid.includes(position)) {
|
|
35798
|
-
(0, _warnonce.warnOnce)('Image with src "' + origSrc + '" has "fill" and parent element with invalid "position". Provided "' + position + '" should be one of ' + valid.map(String).join(
|
|
35994
|
+
(0, _warnonce.warnOnce)('Image with src "' + origSrc + '" has "fill" and parent element with invalid "position". Provided "' + position + '" should be one of ' + valid.map(String).join(',') + ".");
|
|
35799
35995
|
}
|
|
35800
35996
|
}
|
|
35801
35997
|
if (img.height === 0) {
|
|
35802
35998
|
(0, _warnonce.warnOnce)('Image with src "' + origSrc + '" has "fill" and a height value of 0. This is likely because the parent element of the image has not been styled to have a set height.');
|
|
35803
35999
|
}
|
|
35804
36000
|
}
|
|
35805
|
-
const heightModified = img.height.toString() !== img.getAttribute(
|
|
35806
|
-
const widthModified = img.width.toString() !== img.getAttribute(
|
|
36001
|
+
const heightModified = img.height.toString() !== img.getAttribute('height');
|
|
36002
|
+
const widthModified = img.width.toString() !== img.getAttribute('width');
|
|
35807
36003
|
if (heightModified && !widthModified || !heightModified && widthModified) {
|
|
35808
36004
|
(0, _warnonce.warnOnce)('Image with src "' + origSrc + '" has either width or height modified, but not the other. If you use CSS to change the size of your image, also include the styles \'width: "auto"\' or \'height: "auto"\' to maintain the aspect ratio.');
|
|
35809
36005
|
}
|
|
@@ -35827,6 +36023,39 @@ function requireImageComponent () {
|
|
|
35827
36023
|
}
|
|
35828
36024
|
const ImageElement = /*#__PURE__*/ (0, _react.forwardRef)((param, forwardedRef)=>{
|
|
35829
36025
|
let { src, srcSet, sizes, height, width, decoding, className, style, fetchPriority, placeholder, loading, unoptimized, fill, onLoadRef, onLoadingCompleteRef, setBlurComplete, setShowAltText, sizesInput, onLoad, onError, ...rest } = param;
|
|
36026
|
+
const ownRef = (0, _react.useCallback)((img)=>{
|
|
36027
|
+
if (!img) {
|
|
36028
|
+
return;
|
|
36029
|
+
}
|
|
36030
|
+
if (onError) {
|
|
36031
|
+
// If the image has an error before react hydrates, then the error is lost.
|
|
36032
|
+
// The workaround is to wait until the image is mounted which is after hydration,
|
|
36033
|
+
// then we set the src again to trigger the error handler (if there was an error).
|
|
36034
|
+
// eslint-disable-next-line no-self-assign
|
|
36035
|
+
img.src = img.src;
|
|
36036
|
+
}
|
|
36037
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
36038
|
+
if (!src) {
|
|
36039
|
+
console.error('Image is missing required "src" property:', img);
|
|
36040
|
+
}
|
|
36041
|
+
if (img.getAttribute('alt') === null) {
|
|
36042
|
+
console.error('Image is missing required "alt" property. Please add Alternative Text to describe the image for screen readers and search engines.');
|
|
36043
|
+
}
|
|
36044
|
+
}
|
|
36045
|
+
if (img.complete) {
|
|
36046
|
+
handleLoading(img, placeholder, onLoadRef, onLoadingCompleteRef, setBlurComplete, unoptimized, sizesInput);
|
|
36047
|
+
}
|
|
36048
|
+
}, [
|
|
36049
|
+
src,
|
|
36050
|
+
placeholder,
|
|
36051
|
+
onLoadRef,
|
|
36052
|
+
onLoadingCompleteRef,
|
|
36053
|
+
setBlurComplete,
|
|
36054
|
+
onError,
|
|
36055
|
+
unoptimized,
|
|
36056
|
+
sizesInput
|
|
36057
|
+
]);
|
|
36058
|
+
const ref = (0, _usemergedref.useMergedRef)(forwardedRef, ownRef);
|
|
35830
36059
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)("img", {
|
|
35831
36060
|
...rest,
|
|
35832
36061
|
...getDynamicProps(fetchPriority),
|
|
@@ -35837,7 +36066,7 @@ function requireImageComponent () {
|
|
|
35837
36066
|
width: width,
|
|
35838
36067
|
height: height,
|
|
35839
36068
|
decoding: decoding,
|
|
35840
|
-
"data-nimg": fill ?
|
|
36069
|
+
"data-nimg": fill ? 'fill' : '1',
|
|
35841
36070
|
className: className,
|
|
35842
36071
|
style: style,
|
|
35843
36072
|
// It's intended to keep `src` the last attribute because React updates
|
|
@@ -35849,46 +36078,7 @@ function requireImageComponent () {
|
|
|
35849
36078
|
sizes: sizes,
|
|
35850
36079
|
srcSet: srcSet,
|
|
35851
36080
|
src: src,
|
|
35852
|
-
ref:
|
|
35853
|
-
if (forwardedRef) {
|
|
35854
|
-
if (typeof forwardedRef === "function") forwardedRef(img);
|
|
35855
|
-
else if (typeof forwardedRef === "object") {
|
|
35856
|
-
// @ts-ignore - .current is read only it's usually assigned by react internally
|
|
35857
|
-
forwardedRef.current = img;
|
|
35858
|
-
}
|
|
35859
|
-
}
|
|
35860
|
-
if (!img) {
|
|
35861
|
-
return;
|
|
35862
|
-
}
|
|
35863
|
-
if (onError) {
|
|
35864
|
-
// If the image has an error before react hydrates, then the error is lost.
|
|
35865
|
-
// The workaround is to wait until the image is mounted which is after hydration,
|
|
35866
|
-
// then we set the src again to trigger the error handler (if there was an error).
|
|
35867
|
-
// eslint-disable-next-line no-self-assign
|
|
35868
|
-
img.src = img.src;
|
|
35869
|
-
}
|
|
35870
|
-
if (process.env.NODE_ENV !== "production") {
|
|
35871
|
-
if (!src) {
|
|
35872
|
-
console.error('Image is missing required "src" property:', img);
|
|
35873
|
-
}
|
|
35874
|
-
if (img.getAttribute("alt") === null) {
|
|
35875
|
-
console.error('Image is missing required "alt" property. Please add Alternative Text to describe the image for screen readers and search engines.');
|
|
35876
|
-
}
|
|
35877
|
-
}
|
|
35878
|
-
if (img.complete) {
|
|
35879
|
-
handleLoading(img, placeholder, onLoadRef, onLoadingCompleteRef, setBlurComplete, unoptimized, sizesInput);
|
|
35880
|
-
}
|
|
35881
|
-
}, [
|
|
35882
|
-
src,
|
|
35883
|
-
placeholder,
|
|
35884
|
-
onLoadRef,
|
|
35885
|
-
onLoadingCompleteRef,
|
|
35886
|
-
setBlurComplete,
|
|
35887
|
-
onError,
|
|
35888
|
-
unoptimized,
|
|
35889
|
-
sizesInput,
|
|
35890
|
-
forwardedRef
|
|
35891
|
-
]),
|
|
36081
|
+
ref: ref,
|
|
35892
36082
|
onLoad: (event)=>{
|
|
35893
36083
|
const img = event.currentTarget;
|
|
35894
36084
|
handleLoading(img, placeholder, onLoadRef, onLoadingCompleteRef, setBlurComplete, unoptimized, sizesInput);
|
|
@@ -35896,7 +36086,7 @@ function requireImageComponent () {
|
|
|
35896
36086
|
onError: (event)=>{
|
|
35897
36087
|
// if the real image fails to load, this will ensure "alt" is visible
|
|
35898
36088
|
setShowAltText(true);
|
|
35899
|
-
if (placeholder !==
|
|
36089
|
+
if (placeholder !== 'empty') {
|
|
35900
36090
|
// If the real image fails to load, this will still remove the placeholder.
|
|
35901
36091
|
setBlurComplete(true);
|
|
35902
36092
|
}
|
|
@@ -35909,7 +36099,7 @@ function requireImageComponent () {
|
|
|
35909
36099
|
function ImagePreload(param) {
|
|
35910
36100
|
let { isAppRouter, imgAttributes } = param;
|
|
35911
36101
|
const opts = {
|
|
35912
|
-
as:
|
|
36102
|
+
as: 'image',
|
|
35913
36103
|
imageSrcSet: imgAttributes.srcSet,
|
|
35914
36104
|
imageSizes: imgAttributes.sizes,
|
|
35915
36105
|
crossOrigin: imgAttributes.crossOrigin,
|
|
@@ -35917,9 +36107,7 @@ function requireImageComponent () {
|
|
|
35917
36107
|
...getDynamicProps(imgAttributes.fetchPriority)
|
|
35918
36108
|
};
|
|
35919
36109
|
if (isAppRouter && _reactdom.default.preload) {
|
|
35920
|
-
|
|
35921
|
-
_reactdom.default.preload(imgAttributes.src, // @ts-expect-error TODO: upgrade to `@types/react-dom@18.3.x`
|
|
35922
|
-
opts);
|
|
36110
|
+
_reactdom.default.preload(imgAttributes.src, opts);
|
|
35923
36111
|
return null;
|
|
35924
36112
|
}
|
|
35925
36113
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_head.default, {
|
|
@@ -35932,7 +36120,7 @@ function requireImageComponent () {
|
|
|
35932
36120
|
// https://html.spec.whatwg.org/multipage/semantics.html#attr-link-imagesrcset
|
|
35933
36121
|
href: imgAttributes.srcSet ? undefined : imgAttributes.src,
|
|
35934
36122
|
...opts
|
|
35935
|
-
},
|
|
36123
|
+
}, '__nimg-' + imgAttributes.src + imgAttributes.srcSet + imgAttributes.sizes)
|
|
35936
36124
|
});
|
|
35937
36125
|
}
|
|
35938
36126
|
const Image = /*#__PURE__*/ (0, _react.forwardRef)((props, forwardedRef)=>{
|