@amoa/casting 0.1.4 → 0.1.6
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/export/index.js +9 -9
- package/dist/form/buttons/index.js +2 -2
- package/dist/form/buttons/index.module.css.js +0 -4
- package/dist/form/caption/index.js +2 -2
- package/dist/form/caption/index.module.css.js +0 -4
- package/dist/form/description/index.js +2 -2
- package/dist/form/description/index.module.css.js +0 -4
- package/dist/form/email/index.js +3 -3
- package/dist/form/index.js +4 -4
- package/dist/form/index.module.css.js +0 -4
- package/dist/form/inputs/index.js +2 -2
- package/dist/form/inputs/index.module.css.js +0 -4
- package/dist/form/password/index.js +3 -3
- package/dist/index.css +94 -0
- package/dist/waiter/index.js +11 -13
- package/dist/waiter/index.module.css.js +0 -4
- package/package.json +5 -4
- package/dist/_virtual/_commonjsHelpers.js +0 -5
- package/dist/_virtual/_interop_require_default.js +0 -3
- package/dist/_virtual/_interop_require_wildcard.js +0 -3
- package/dist/_virtual/action-async-storage-instance.js +0 -3
- package/dist/_virtual/action-async-storage.external.js +0 -3
- package/dist/_virtual/add-base-path.js +0 -3
- package/dist/_virtual/add-locale.js +0 -3
- package/dist/_virtual/add-locale2.js +0 -3
- package/dist/_virtual/add-path-prefix.js +0 -3
- package/dist/_virtual/app-paths.js +0 -3
- package/dist/_virtual/app-router-context.shared-runtime.js +0 -3
- package/dist/_virtual/app-router-headers.js +0 -3
- package/dist/_virtual/app.js +0 -3
- package/dist/_virtual/async-local-storage.js +0 -3
- package/dist/_virtual/bailout-to-csr.js +0 -3
- package/dist/_virtual/boundary-constants.js +0 -3
- package/dist/_virtual/constants.js +0 -3
- package/dist/_virtual/deployment-id.js +0 -3
- package/dist/_virtual/detect-domain-locale.js +0 -3
- package/dist/_virtual/detect-domain-locale2.js +0 -3
- package/dist/_virtual/dynamic-rendering-utils.js +0 -3
- package/dist/_virtual/dynamic-rendering.js +0 -3
- package/dist/_virtual/ensure-leading-slash.js +0 -3
- package/dist/_virtual/error-once.js +0 -3
- package/dist/_virtual/escape-regexp.js +0 -3
- package/dist/_virtual/find-closest-quality.js +0 -3
- package/dist/_virtual/forbidden.js +0 -3
- package/dist/_virtual/format-url.js +0 -3
- package/dist/_virtual/get-domain-locale.js +0 -3
- package/dist/_virtual/get-dynamic-param.js +0 -3
- package/dist/_virtual/get-img-props.js +0 -3
- package/dist/_virtual/get-segment-param.js +0 -3
- package/dist/_virtual/has-base-path.js +0 -3
- package/dist/_virtual/head-manager-context.shared-runtime.js +0 -3
- package/dist/_virtual/head.js +0 -3
- package/dist/_virtual/hooks-client-context.shared-runtime.js +0 -3
- package/dist/_virtual/hooks-server-context.js +0 -3
- package/dist/_virtual/http-access-fallback.js +0 -3
- package/dist/_virtual/image-blur-svg.js +0 -3
- package/dist/_virtual/image-component.js +0 -3
- package/dist/_virtual/image-config-context.shared-runtime.js +0 -3
- package/dist/_virtual/image-config.js +0 -3
- package/dist/_virtual/image-external.js +0 -3
- package/dist/_virtual/image-loader.js +0 -3
- package/dist/_virtual/image.js +0 -7
- package/dist/_virtual/index.js +0 -3
- package/dist/_virtual/index2.js +0 -3
- package/dist/_virtual/index3.js +0 -3
- package/dist/_virtual/interception-prefix-from-param-type.js +0 -3
- package/dist/_virtual/interception-routes.js +0 -3
- package/dist/_virtual/interpolate-as.js +0 -3
- package/dist/_virtual/invariant-error.js +0 -3
- package/dist/_virtual/is-dynamic.js +0 -3
- package/dist/_virtual/is-local-url.js +0 -3
- package/dist/_virtual/is-next-router-error.js +0 -3
- package/dist/_virtual/is-postpone.js +0 -3
- package/dist/_virtual/jsx-runtime.js +0 -5
- package/dist/_virtual/jsx-runtime2.js +0 -3
- package/dist/_virtual/link.js +0 -7
- package/dist/_virtual/link2.js +0 -3
- package/dist/_virtual/match-local-pattern.js +0 -3
- package/dist/_virtual/match-remote-pattern.js +0 -3
- package/dist/_virtual/navigation.js +0 -3
- package/dist/_virtual/navigation.react-server.js +0 -3
- package/dist/_virtual/navigation2.js +0 -3
- package/dist/_virtual/normalize-locale-path.js +0 -3
- package/dist/_virtual/normalize-locale-path2.js +0 -3
- package/dist/_virtual/normalize-trailing-slash.js +0 -3
- package/dist/_virtual/not-found.js +0 -3
- package/dist/_virtual/omit.js +0 -3
- package/dist/_virtual/parse-loader-tree.js +0 -3
- package/dist/_virtual/parse-path.js +0 -3
- package/dist/_virtual/path-has-prefix.js +0 -3
- package/dist/_virtual/querystring.js +0 -3
- package/dist/_virtual/react-jsx-runtime.development.js +0 -3
- package/dist/_virtual/react-jsx-runtime.production.js +0 -3
- package/dist/_virtual/readonly-url-search-params.js +0 -3
- package/dist/_virtual/redirect-error.js +0 -3
- package/dist/_virtual/redirect-status-code.js +0 -3
- package/dist/_virtual/redirect.js +0 -3
- package/dist/_virtual/remove-trailing-slash.js +0 -3
- package/dist/_virtual/request-idle-callback.js +0 -3
- package/dist/_virtual/resolve-href.js +0 -3
- package/dist/_virtual/resolve-param-value.js +0 -3
- package/dist/_virtual/route-match-utils.js +0 -3
- package/dist/_virtual/route-matcher.js +0 -3
- package/dist/_virtual/route-pattern-normalizer.js +0 -3
- package/dist/_virtual/route-regex.js +0 -3
- package/dist/_virtual/router-context.shared-runtime.js +0 -3
- package/dist/_virtual/scheduler.js +0 -3
- package/dist/_virtual/segment.js +0 -3
- package/dist/_virtual/server-inserted-html.shared-runtime.js +0 -3
- package/dist/_virtual/side-effect.js +0 -3
- package/dist/_virtual/sorted-routes.js +0 -3
- package/dist/_virtual/static-generation-bailout.js +0 -3
- package/dist/_virtual/unauthorized.js +0 -3
- package/dist/_virtual/unrecognized-action-error.js +0 -3
- package/dist/_virtual/unstable-rethrow.browser.js +0 -3
- package/dist/_virtual/unstable-rethrow.js +0 -3
- package/dist/_virtual/unstable-rethrow.server.js +0 -3
- package/dist/_virtual/use-intersection.js +0 -3
- package/dist/_virtual/use-merged-ref.js +0 -3
- package/dist/_virtual/utils.js +0 -3
- package/dist/_virtual/warn-once.js +0 -3
- package/dist/_virtual/work-async-storage-instance.js +0 -3
- package/dist/_virtual/work-async-storage.external.js +0 -3
- package/dist/_virtual/work-unit-async-storage-instance.js +0 -3
- package/dist/_virtual/work-unit-async-storage.external.js +0 -3
- package/dist/config/config.json.js +0 -37
- package/dist/node_modules/@swc/helpers/cjs/_interop_require_default.js +0 -16
- package/dist/node_modules/@swc/helpers/cjs/_interop_require_wildcard.js +0 -48
- package/dist/node_modules/next/dist/client/add-base-path.js +0 -38
- package/dist/node_modules/next/dist/client/add-locale.js +0 -39
- package/dist/node_modules/next/dist/client/components/app-router-headers.js +0 -112
- package/dist/node_modules/next/dist/client/components/forbidden.js +0 -62
- package/dist/node_modules/next/dist/client/components/hooks-server-context.js +0 -50
- package/dist/node_modules/next/dist/client/components/http-access-fallback/http-access-fallback.js +0 -77
- package/dist/node_modules/next/dist/client/components/is-next-router-error.js +0 -37
- package/dist/node_modules/next/dist/client/components/navigation.js +0 -198
- package/dist/node_modules/next/dist/client/components/navigation.react-server.js +0 -80
- package/dist/node_modules/next/dist/client/components/not-found.js +0 -56
- package/dist/node_modules/next/dist/client/components/readonly-url-search-params.js +0 -58
- package/dist/node_modules/next/dist/client/components/redirect-error.js +0 -60
- package/dist/node_modules/next/dist/client/components/redirect-status-code.js +0 -36
- package/dist/node_modules/next/dist/client/components/redirect.js +0 -98
- package/dist/node_modules/next/dist/client/components/static-generation-bailout.js +0 -50
- package/dist/node_modules/next/dist/client/components/unauthorized.js +0 -63
- package/dist/node_modules/next/dist/client/components/unrecognized-action-error.js +0 -47
- package/dist/node_modules/next/dist/client/components/unstable-rethrow.browser.js +0 -42
- package/dist/node_modules/next/dist/client/components/unstable-rethrow.js +0 -41
- package/dist/node_modules/next/dist/client/components/unstable-rethrow.server.js +0 -50
- package/dist/node_modules/next/dist/client/detect-domain-locale.js +0 -36
- package/dist/node_modules/next/dist/client/get-domain-locale.js +0 -51
- package/dist/node_modules/next/dist/client/has-base-path.js +0 -36
- package/dist/node_modules/next/dist/client/image-component.js +0 -343
- package/dist/node_modules/next/dist/client/link.js +0 -466
- package/dist/node_modules/next/dist/client/normalize-locale-path.js +0 -40
- package/dist/node_modules/next/dist/client/normalize-trailing-slash.js +0 -54
- package/dist/node_modules/next/dist/client/request-idle-callback.js +0 -52
- package/dist/node_modules/next/dist/client/resolve-href.js +0 -124
- package/dist/node_modules/next/dist/client/use-intersection.js +0 -126
- package/dist/node_modules/next/dist/client/use-merged-ref.js +0 -79
- package/dist/node_modules/next/dist/compiled/path-to-regexp/index.js +0 -439
- package/dist/node_modules/next/dist/compiled/picomatch/index.js +0 -1662
- package/dist/node_modules/next/dist/lib/constants.js +0 -339
- package/dist/node_modules/next/dist/lib/framework/boundary-constants.js +0 -41
- package/dist/node_modules/next/dist/lib/route-pattern-normalizer.js +0 -114
- package/dist/node_modules/next/dist/lib/scheduler.js +0 -69
- package/dist/node_modules/next/dist/server/app-render/action-async-storage-instance.js +0 -26
- package/dist/node_modules/next/dist/server/app-render/action-async-storage.external.js +0 -25
- package/dist/node_modules/next/dist/server/app-render/async-local-storage.js +0 -83
- package/dist/node_modules/next/dist/server/app-render/dynamic-rendering.js +0 -804
- package/dist/node_modules/next/dist/server/app-render/work-async-storage-instance.js +0 -26
- package/dist/node_modules/next/dist/server/app-render/work-async-storage.external.js +0 -25
- package/dist/node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js +0 -26
- package/dist/node_modules/next/dist/server/app-render/work-unit-async-storage.external.js +0 -221
- package/dist/node_modules/next/dist/server/dynamic-rendering-utils.js +0 -90
- package/dist/node_modules/next/dist/server/lib/router-utils/is-postpone.js +0 -27
- package/dist/node_modules/next/dist/shared/lib/app-router-context.shared-runtime.js +0 -56
- package/dist/node_modules/next/dist/shared/lib/deployment-id.js +0 -41
- package/dist/node_modules/next/dist/shared/lib/escape-regexp.js +0 -32
- package/dist/node_modules/next/dist/shared/lib/find-closest-quality.js +0 -30
- package/dist/node_modules/next/dist/shared/lib/get-img-props.js +0 -617
- package/dist/node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js +0 -31
- package/dist/node_modules/next/dist/shared/lib/head.js +0 -177
- package/dist/node_modules/next/dist/shared/lib/hooks-client-context.shared-runtime.js +0 -65
- package/dist/node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js +0 -36
- package/dist/node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js +0 -66
- package/dist/node_modules/next/dist/shared/lib/image-blur-svg.js +0 -42
- package/dist/node_modules/next/dist/shared/lib/image-config-context.shared-runtime.js +0 -33
- package/dist/node_modules/next/dist/shared/lib/image-config.js +0 -56
- package/dist/node_modules/next/dist/shared/lib/image-external.js +0 -60
- package/dist/node_modules/next/dist/shared/lib/image-loader.js +0 -119
- package/dist/node_modules/next/dist/shared/lib/invariant-error.js +0 -29
- package/dist/node_modules/next/dist/shared/lib/lazy-dynamic/bailout-to-csr.js +0 -43
- package/dist/node_modules/next/dist/shared/lib/match-local-pattern.js +0 -54
- package/dist/node_modules/next/dist/shared/lib/match-remote-pattern.js +0 -71
- package/dist/node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js +0 -31
- package/dist/node_modules/next/dist/shared/lib/router/routes/app.js +0 -130
- package/dist/node_modules/next/dist/shared/lib/router/utils/add-locale.js +0 -41
- package/dist/node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js +0 -36
- package/dist/node_modules/next/dist/shared/lib/router/utils/app-paths.js +0 -61
- package/dist/node_modules/next/dist/shared/lib/router/utils/format-url.js +0 -88
- package/dist/node_modules/next/dist/shared/lib/router/utils/get-dynamic-param.js +0 -176
- package/dist/node_modules/next/dist/shared/lib/router/utils/get-segment-param.js +0 -89
- package/dist/node_modules/next/dist/shared/lib/router/utils/index.js +0 -38
- package/dist/node_modules/next/dist/shared/lib/router/utils/interception-prefix-from-param-type.js +0 -44
- package/dist/node_modules/next/dist/shared/lib/router/utils/interception-routes.js +0 -109
- package/dist/node_modules/next/dist/shared/lib/router/utils/interpolate-as.js +0 -71
- package/dist/node_modules/next/dist/shared/lib/router/utils/is-dynamic.js +0 -38
- package/dist/node_modules/next/dist/shared/lib/router/utils/is-local-url.js +0 -39
- package/dist/node_modules/next/dist/shared/lib/router/utils/omit.js +0 -32
- package/dist/node_modules/next/dist/shared/lib/router/utils/parse-loader-tree.js +0 -46
- package/dist/node_modules/next/dist/shared/lib/router/utils/parse-path.js +0 -46
- package/dist/node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js +0 -34
- package/dist/node_modules/next/dist/shared/lib/router/utils/querystring.js +0 -82
- package/dist/node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js +0 -34
- package/dist/node_modules/next/dist/shared/lib/router/utils/resolve-param-value.js +0 -128
- package/dist/node_modules/next/dist/shared/lib/router/utils/route-match-utils.js +0 -122
- package/dist/node_modules/next/dist/shared/lib/router/utils/route-matcher.js +0 -61
- package/dist/node_modules/next/dist/shared/lib/router/utils/route-regex.js +0 -312
- package/dist/node_modules/next/dist/shared/lib/router/utils/sorted-routes.js +0 -246
- package/dist/node_modules/next/dist/shared/lib/router-context.shared-runtime.js +0 -31
- package/dist/node_modules/next/dist/shared/lib/segment.js +0 -102
- package/dist/node_modules/next/dist/shared/lib/server-inserted-html.shared-runtime.js +0 -44
- package/dist/node_modules/next/dist/shared/lib/side-effect.js +0 -78
- package/dist/node_modules/next/dist/shared/lib/utils/error-once.js +0 -33
- package/dist/node_modules/next/dist/shared/lib/utils/warn-once.js +0 -33
- package/dist/node_modules/next/dist/shared/lib/utils.js +0 -192
- package/dist/node_modules/next/image.js +0 -13
- package/dist/node_modules/next/link.js +0 -13
- package/dist/node_modules/next/navigation.js +0 -13
- package/dist/node_modules/react/cjs/react-jsx-runtime.development.js +0 -240
- package/dist/node_modules/react/cjs/react-jsx-runtime.production.js +0 -44
- package/dist/node_modules/react/jsx-runtime.js +0 -19
- package/dist/node_modules/style-inject/dist/style-inject.es.js +0 -26
- package/dist/packages/carving/src/carving.js +0 -34
- package/dist/packages/carving/src/condo.js +0 -17
- package/dist/packages/carving/src/logos/amoa.js +0 -17
- package/dist/packages/forge/src/classes.js +0 -17
- package/dist/packages/forge/src/dates/date.js +0 -8
- package/dist/packages/forge/src/dates/day.js +0 -7
- package/dist/packages/forge/src/dates/index.js +0 -31
- package/dist/packages/forge/src/dates/month.js +0 -35
- package/dist/packages/forge/src/dates/year.js +0 -16
- package/dist/packages/forge/src/fetcher/index.js +0 -37
- package/dist/packages/forge/src/fetcher/querystring.js +0 -9
- package/dist/packages/forge/src/files.js +0 -17
- package/dist/packages/forge/src/numbers/index.js +0 -5
- package/dist/packages/forge/src/strings/characters.js +0 -3
- package/dist/packages/forge/src/strings/diacritics.js +0 -261
- package/dist/packages/forge/src/strings/index.js +0 -24
- package/dist/packages/hooks/src/use-debounce.js +0 -19
- package/dist/packages/hooks/src/use-tooltip.js +0 -27
- package/dist/packages/ingots/src/address/api/form.js +0 -12
- package/dist/packages/ingots/src/address/config.json.js +0 -16
- package/dist/packages/ingots/src/address/index.js +0 -117
- package/dist/packages/ingots/src/address/index.module.css.js +0 -7
- package/dist/packages/ingots/src/address/service.js +0 -41
- package/dist/packages/ingots/src/backdrop/index.js +0 -18
- package/dist/packages/ingots/src/backdrop/index.module.css.js +0 -7
- package/dist/packages/ingots/src/button/index.js +0 -56
- package/dist/packages/ingots/src/button/index.module.css.js +0 -7
- package/dist/packages/ingots/src/checkbox/index.js +0 -47
- package/dist/packages/ingots/src/checkbox/index.module.css.js +0 -7
- package/dist/packages/ingots/src/date/erase/index.js +0 -22
- package/dist/packages/ingots/src/date/erase/index.module.css.js +0 -7
- package/dist/packages/ingots/src/date/input/index.js +0 -113
- package/dist/packages/ingots/src/date/input/index.module.css.js +0 -7
- package/dist/packages/ingots/src/date/picker/day/index.js +0 -35
- package/dist/packages/ingots/src/date/picker/day/index.module.css.js +0 -7
- package/dist/packages/ingots/src/date/picker/days/index.js +0 -59
- package/dist/packages/ingots/src/date/picker/days/index.module.css.js +0 -7
- package/dist/packages/ingots/src/date/picker/handle/index.js +0 -40
- package/dist/packages/ingots/src/date/picker/handle/index.module.css.js +0 -7
- package/dist/packages/ingots/src/date/picker/index.js +0 -154
- package/dist/packages/ingots/src/date/picker/index.module.css.js +0 -7
- package/dist/packages/ingots/src/date/picker/menu/index.js +0 -32
- package/dist/packages/ingots/src/date/picker/menu/index.module.css.js +0 -7
- package/dist/packages/ingots/src/date/picker/menu/item.js +0 -30
- package/dist/packages/ingots/src/date/picker/menu/item.module.css.js +0 -7
- package/dist/packages/ingots/src/file/api/index.js +0 -14
- package/dist/packages/ingots/src/file/card/index.js +0 -65
- package/dist/packages/ingots/src/file/card/index.module.css.js +0 -7
- package/dist/packages/ingots/src/file/index.js +0 -34
- package/dist/packages/ingots/src/file/index.module.css.js +0 -7
- package/dist/packages/ingots/src/file/input/index.js +0 -261
- package/dist/packages/ingots/src/file/input/index.module.css.js +0 -7
- package/dist/packages/ingots/src/input/index.js +0 -75
- package/dist/packages/ingots/src/input/src/validation/index.js +0 -3
- package/dist/packages/ingots/src/loader/index.js +0 -23
- package/dist/packages/ingots/src/loader/index.module.css.js +0 -7
- package/dist/packages/ingots/src/loader/variants/spinner/index.js +0 -31
- package/dist/packages/ingots/src/loader/variants/spinner/index.module.css.js +0 -7
- package/dist/packages/ingots/src/select/card/index.js +0 -33
- package/dist/packages/ingots/src/select/card/index.module.css.js +0 -7
- package/dist/packages/ingots/src/select/category/index.js +0 -13
- package/dist/packages/ingots/src/select/category/index.module.css.js +0 -7
- package/dist/packages/ingots/src/select/content/index.js +0 -46
- package/dist/packages/ingots/src/select/index.js +0 -155
- package/dist/packages/ingots/src/select/index.module.css.js +0 -7
- package/dist/packages/ingots/src/select/option/index.js +0 -35
- package/dist/packages/ingots/src/select/option/index.module.css.js +0 -7
- package/dist/packages/ingots/src/select/options/index.js +0 -59
- package/dist/packages/ingots/src/select/options/index.module.css.js +0 -7
- package/dist/packages/ingots/src/snackbar/context.js +0 -9
- package/dist/packages/ingots/src/tag/index.js +0 -16
- package/dist/packages/ingots/src/tag/index.module.css.js +0 -7
- package/dist/packages/ingots/src/text/index.js +0 -92
- package/dist/packages/ingots/src/text/index.module.css.js +0 -7
- package/dist/packages/ingots/src/textarea/index.js +0 -62
- package/dist/packages/ingots/src/textarea/index.module.css.js +0 -7
- package/dist/packages/ingots/src/toggle/index.js +0 -43
- package/dist/packages/ingots/src/toggle/index.module.css.js +0 -7
- package/dist/packages/runes/src/icon.js +0 -16
- package/dist/packages/runes/src/paths/alert.js +0 -18
- package/dist/packages/runes/src/paths/arrow/path.js +0 -18
- package/dist/packages/runes/src/paths/calendar.js +0 -18
- package/dist/packages/runes/src/paths/check/fill.js +0 -18
- package/dist/packages/runes/src/paths/check/regular.js +0 -18
- package/dist/packages/runes/src/paths/chevron/down.js +0 -18
- package/dist/packages/runes/src/paths/chevron/left.js +0 -18
- package/dist/packages/runes/src/paths/chevron/right.js +0 -18
- package/dist/packages/runes/src/paths/click.js +0 -18
- package/dist/packages/runes/src/paths/cross/regular.js +0 -16
- package/dist/packages/runes/src/paths/download.js +0 -18
- package/dist/packages/runes/src/paths/file.js +0 -18
- package/dist/packages/runes/src/paths/link.js +0 -23
- package/dist/packages/wares/src/authentication/index.js +0 -11
|
@@ -1,617 +0,0 @@
|
|
|
1
|
-
import { __exports as getImgProps } from '../../../../../_virtual/get-img-props.js';
|
|
2
|
-
import { __require as requireWarnOnce } from './utils/warn-once.js';
|
|
3
|
-
import { __require as requireDeploymentId } from './deployment-id.js';
|
|
4
|
-
import { __require as requireImageBlurSvg } from './image-blur-svg.js';
|
|
5
|
-
import { __require as requireImageConfig } from './image-config.js';
|
|
6
|
-
|
|
7
|
-
var hasRequiredGetImgProps;
|
|
8
|
-
|
|
9
|
-
function requireGetImgProps () {
|
|
10
|
-
if (hasRequiredGetImgProps) return getImgProps;
|
|
11
|
-
hasRequiredGetImgProps = 1;
|
|
12
|
-
(function (exports$1) {
|
|
13
|
-
|
|
14
|
-
Object.defineProperty(exports$1, "__esModule", {
|
|
15
|
-
value: true
|
|
16
|
-
});
|
|
17
|
-
Object.defineProperty(exports$1, "getImgProps", {
|
|
18
|
-
enumerable: true,
|
|
19
|
-
get: function () {
|
|
20
|
-
return getImgProps;
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
const _warnonce = requireWarnOnce();
|
|
24
|
-
const _deploymentid = requireDeploymentId();
|
|
25
|
-
const _imageblursvg = requireImageBlurSvg();
|
|
26
|
-
const _imageconfig = requireImageConfig();
|
|
27
|
-
const VALID_LOADING_VALUES = ['lazy', 'eager', undefined];
|
|
28
|
-
// Object-fit values that are not valid background-size values
|
|
29
|
-
const INVALID_BACKGROUND_SIZE_VALUES = ['-moz-initial', 'fill', 'none', 'scale-down', undefined];
|
|
30
|
-
function isStaticRequire(src) {
|
|
31
|
-
return src.default !== undefined;
|
|
32
|
-
}
|
|
33
|
-
function isStaticImageData(src) {
|
|
34
|
-
return src.src !== undefined;
|
|
35
|
-
}
|
|
36
|
-
function isStaticImport(src) {
|
|
37
|
-
return !!src && typeof src === 'object' && (isStaticRequire(src) || isStaticImageData(src));
|
|
38
|
-
}
|
|
39
|
-
const allImgs = new Map();
|
|
40
|
-
let perfObserver;
|
|
41
|
-
function getInt(x) {
|
|
42
|
-
if (typeof x === 'undefined') {
|
|
43
|
-
return x;
|
|
44
|
-
}
|
|
45
|
-
if (typeof x === 'number') {
|
|
46
|
-
return Number.isFinite(x) ? x : NaN;
|
|
47
|
-
}
|
|
48
|
-
if (typeof x === 'string' && /^[0-9]+$/.test(x)) {
|
|
49
|
-
return parseInt(x, 10);
|
|
50
|
-
}
|
|
51
|
-
return NaN;
|
|
52
|
-
}
|
|
53
|
-
function getWidths({
|
|
54
|
-
deviceSizes,
|
|
55
|
-
allSizes
|
|
56
|
-
}, width, sizes) {
|
|
57
|
-
if (sizes) {
|
|
58
|
-
// Find all the "vw" percent sizes used in the sizes prop
|
|
59
|
-
const viewportWidthRe = /(^|\s)(1?\d?\d)vw/g;
|
|
60
|
-
const percentSizes = [];
|
|
61
|
-
for (let match; match = viewportWidthRe.exec(sizes); match) {
|
|
62
|
-
percentSizes.push(parseInt(match[2]));
|
|
63
|
-
}
|
|
64
|
-
if (percentSizes.length) {
|
|
65
|
-
const smallestRatio = Math.min(...percentSizes) * 0.01;
|
|
66
|
-
return {
|
|
67
|
-
widths: allSizes.filter(s => s >= deviceSizes[0] * smallestRatio),
|
|
68
|
-
kind: 'w'
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
return {
|
|
72
|
-
widths: allSizes,
|
|
73
|
-
kind: 'w'
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
if (typeof width !== 'number') {
|
|
77
|
-
return {
|
|
78
|
-
widths: deviceSizes,
|
|
79
|
-
kind: 'w'
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
const widths = [...new Set(
|
|
83
|
-
// > This means that most OLED screens that say they are 3x resolution,
|
|
84
|
-
// > are actually 3x in the green color, but only 1.5x in the red and
|
|
85
|
-
// > blue colors. Showing a 3x resolution image in the app vs a 2x
|
|
86
|
-
// > resolution image will be visually the same, though the 3x image
|
|
87
|
-
// > takes significantly more data. Even true 3x resolution screens are
|
|
88
|
-
// > wasteful as the human eye cannot see that level of detail without
|
|
89
|
-
// > something like a magnifying glass.
|
|
90
|
-
// https://blog.twitter.com/engineering/en_us/topics/infrastructure/2019/capping-image-fidelity-on-ultra-high-resolution-devices.html
|
|
91
|
-
[width, width * 2 /*, width * 3*/].map(w => allSizes.find(p => p >= w) || allSizes[allSizes.length - 1]))];
|
|
92
|
-
return {
|
|
93
|
-
widths,
|
|
94
|
-
kind: 'x'
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
function generateImgAttrs({
|
|
98
|
-
config,
|
|
99
|
-
src,
|
|
100
|
-
unoptimized,
|
|
101
|
-
width,
|
|
102
|
-
quality,
|
|
103
|
-
sizes,
|
|
104
|
-
loader
|
|
105
|
-
}) {
|
|
106
|
-
if (unoptimized) {
|
|
107
|
-
const deploymentId = (0, _deploymentid.getDeploymentId)();
|
|
108
|
-
if (src.startsWith('/') && !src.startsWith('//') && deploymentId) {
|
|
109
|
-
const sep = src.includes('?') ? '&' : '?';
|
|
110
|
-
src = `${src}${sep}dpl=${deploymentId}`;
|
|
111
|
-
}
|
|
112
|
-
return {
|
|
113
|
-
src,
|
|
114
|
-
srcSet: undefined,
|
|
115
|
-
sizes: undefined
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
const {
|
|
119
|
-
widths,
|
|
120
|
-
kind
|
|
121
|
-
} = getWidths(config, width, sizes);
|
|
122
|
-
const last = widths.length - 1;
|
|
123
|
-
return {
|
|
124
|
-
sizes: !sizes && kind === 'w' ? '100vw' : sizes,
|
|
125
|
-
srcSet: widths.map((w, i) => `${loader({
|
|
126
|
-
config,
|
|
127
|
-
src,
|
|
128
|
-
quality,
|
|
129
|
-
width: w
|
|
130
|
-
})} ${kind === 'w' ? w : i + 1}${kind}`).join(', '),
|
|
131
|
-
// It's intended to keep `src` the last attribute because React updates
|
|
132
|
-
// attributes in order. If we keep `src` the first one, Safari will
|
|
133
|
-
// immediately start to fetch `src`, before `sizes` and `srcSet` are even
|
|
134
|
-
// updated by React. That causes multiple unnecessary requests if `srcSet`
|
|
135
|
-
// and `sizes` are defined.
|
|
136
|
-
// This bug cannot be reproduced in Chrome or Firefox.
|
|
137
|
-
src: loader({
|
|
138
|
-
config,
|
|
139
|
-
src,
|
|
140
|
-
quality,
|
|
141
|
-
width: widths[last]
|
|
142
|
-
})
|
|
143
|
-
};
|
|
144
|
-
}
|
|
145
|
-
function getImgProps({
|
|
146
|
-
src,
|
|
147
|
-
sizes,
|
|
148
|
-
unoptimized = false,
|
|
149
|
-
priority = false,
|
|
150
|
-
preload = false,
|
|
151
|
-
loading,
|
|
152
|
-
className,
|
|
153
|
-
quality,
|
|
154
|
-
width,
|
|
155
|
-
height,
|
|
156
|
-
fill = false,
|
|
157
|
-
style,
|
|
158
|
-
overrideSrc,
|
|
159
|
-
onLoad,
|
|
160
|
-
onLoadingComplete,
|
|
161
|
-
placeholder = 'empty',
|
|
162
|
-
blurDataURL,
|
|
163
|
-
fetchPriority,
|
|
164
|
-
decoding = 'async',
|
|
165
|
-
layout,
|
|
166
|
-
objectFit,
|
|
167
|
-
objectPosition,
|
|
168
|
-
lazyBoundary,
|
|
169
|
-
lazyRoot,
|
|
170
|
-
...rest
|
|
171
|
-
}, _state) {
|
|
172
|
-
const {
|
|
173
|
-
imgConf,
|
|
174
|
-
showAltText,
|
|
175
|
-
blurComplete,
|
|
176
|
-
defaultLoader
|
|
177
|
-
} = _state;
|
|
178
|
-
let config;
|
|
179
|
-
let c = imgConf || _imageconfig.imageConfigDefault;
|
|
180
|
-
if ('allSizes' in c) {
|
|
181
|
-
config = c;
|
|
182
|
-
} else {
|
|
183
|
-
const allSizes = [...c.deviceSizes, ...c.imageSizes].sort((a, b) => a - b);
|
|
184
|
-
const deviceSizes = c.deviceSizes.sort((a, b) => a - b);
|
|
185
|
-
const qualities = c.qualities?.sort((a, b) => a - b);
|
|
186
|
-
config = {
|
|
187
|
-
...c,
|
|
188
|
-
allSizes,
|
|
189
|
-
deviceSizes,
|
|
190
|
-
qualities
|
|
191
|
-
};
|
|
192
|
-
}
|
|
193
|
-
if (typeof defaultLoader === 'undefined') {
|
|
194
|
-
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", {
|
|
195
|
-
value: "E163",
|
|
196
|
-
enumerable: false,
|
|
197
|
-
configurable: true
|
|
198
|
-
});
|
|
199
|
-
}
|
|
200
|
-
let loader = rest.loader || defaultLoader;
|
|
201
|
-
// Remove property so it's not spread on <img> element
|
|
202
|
-
delete rest.loader;
|
|
203
|
-
delete rest.srcSet;
|
|
204
|
-
// This special value indicates that the user
|
|
205
|
-
// didn't define a "loader" prop or "loader" config.
|
|
206
|
-
const isDefaultLoader = '__next_img_default' in loader;
|
|
207
|
-
if (isDefaultLoader) {
|
|
208
|
-
if (config.loader === 'custom') {
|
|
209
|
-
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", {
|
|
210
|
-
value: "E252",
|
|
211
|
-
enumerable: false,
|
|
212
|
-
configurable: true
|
|
213
|
-
});
|
|
214
|
-
}
|
|
215
|
-
} else {
|
|
216
|
-
// The user defined a "loader" prop or config.
|
|
217
|
-
// Since the config object is internal only, we
|
|
218
|
-
// must not pass it to the user-defined "loader".
|
|
219
|
-
const customImageLoader = loader;
|
|
220
|
-
loader = obj => {
|
|
221
|
-
const {
|
|
222
|
-
config: _,
|
|
223
|
-
...opts
|
|
224
|
-
} = obj;
|
|
225
|
-
return customImageLoader(opts);
|
|
226
|
-
};
|
|
227
|
-
}
|
|
228
|
-
if (layout) {
|
|
229
|
-
if (layout === 'fill') {
|
|
230
|
-
fill = true;
|
|
231
|
-
}
|
|
232
|
-
const layoutToStyle = {
|
|
233
|
-
intrinsic: {
|
|
234
|
-
maxWidth: '100%',
|
|
235
|
-
height: 'auto'
|
|
236
|
-
},
|
|
237
|
-
responsive: {
|
|
238
|
-
width: '100%',
|
|
239
|
-
height: 'auto'
|
|
240
|
-
}
|
|
241
|
-
};
|
|
242
|
-
const layoutToSizes = {
|
|
243
|
-
responsive: '100vw',
|
|
244
|
-
fill: '100vw'
|
|
245
|
-
};
|
|
246
|
-
const layoutStyle = layoutToStyle[layout];
|
|
247
|
-
if (layoutStyle) {
|
|
248
|
-
style = {
|
|
249
|
-
...style,
|
|
250
|
-
...layoutStyle
|
|
251
|
-
};
|
|
252
|
-
}
|
|
253
|
-
const layoutSizes = layoutToSizes[layout];
|
|
254
|
-
if (layoutSizes && !sizes) {
|
|
255
|
-
sizes = layoutSizes;
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
let staticSrc = '';
|
|
259
|
-
let widthInt = getInt(width);
|
|
260
|
-
let heightInt = getInt(height);
|
|
261
|
-
let blurWidth;
|
|
262
|
-
let blurHeight;
|
|
263
|
-
if (isStaticImport(src)) {
|
|
264
|
-
const staticImageData = isStaticRequire(src) ? src.default : src;
|
|
265
|
-
if (!staticImageData.src) {
|
|
266
|
-
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", {
|
|
267
|
-
value: "E460",
|
|
268
|
-
enumerable: false,
|
|
269
|
-
configurable: true
|
|
270
|
-
});
|
|
271
|
-
}
|
|
272
|
-
if (!staticImageData.height || !staticImageData.width) {
|
|
273
|
-
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", {
|
|
274
|
-
value: "E48",
|
|
275
|
-
enumerable: false,
|
|
276
|
-
configurable: true
|
|
277
|
-
});
|
|
278
|
-
}
|
|
279
|
-
blurWidth = staticImageData.blurWidth;
|
|
280
|
-
blurHeight = staticImageData.blurHeight;
|
|
281
|
-
blurDataURL = blurDataURL || staticImageData.blurDataURL;
|
|
282
|
-
staticSrc = staticImageData.src;
|
|
283
|
-
if (!fill) {
|
|
284
|
-
if (!widthInt && !heightInt) {
|
|
285
|
-
widthInt = staticImageData.width;
|
|
286
|
-
heightInt = staticImageData.height;
|
|
287
|
-
} else if (widthInt && !heightInt) {
|
|
288
|
-
const ratio = widthInt / staticImageData.width;
|
|
289
|
-
heightInt = Math.round(staticImageData.height * ratio);
|
|
290
|
-
} else if (!widthInt && heightInt) {
|
|
291
|
-
const ratio = heightInt / staticImageData.height;
|
|
292
|
-
widthInt = Math.round(staticImageData.width * ratio);
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
src = typeof src === 'string' ? src : staticSrc;
|
|
297
|
-
let isLazy = !priority && !preload && (loading === 'lazy' || typeof loading === 'undefined');
|
|
298
|
-
if (!src || src.startsWith('data:') || src.startsWith('blob:')) {
|
|
299
|
-
// https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs
|
|
300
|
-
unoptimized = true;
|
|
301
|
-
isLazy = false;
|
|
302
|
-
}
|
|
303
|
-
if (config.unoptimized) {
|
|
304
|
-
unoptimized = true;
|
|
305
|
-
}
|
|
306
|
-
if (isDefaultLoader && !config.dangerouslyAllowSVG && src.split('?', 1)[0].endsWith('.svg')) {
|
|
307
|
-
// Special case to make svg serve as-is to avoid proxying
|
|
308
|
-
// through the built-in Image Optimization API.
|
|
309
|
-
unoptimized = true;
|
|
310
|
-
}
|
|
311
|
-
const qualityInt = getInt(quality);
|
|
312
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
313
|
-
if (config.output === 'export' && isDefaultLoader && !unoptimized) {
|
|
314
|
-
throw Object.defineProperty(new Error(`Image Optimization using the default loader is not compatible with \`{ output: 'export' }\`.
|
|
315
|
-
Possible solutions:
|
|
316
|
-
- Remove \`{ output: 'export' }\` and run "next start" to run server mode including the Image Optimization API.
|
|
317
|
-
- Configure \`{ images: { unoptimized: true } }\` in \`next.config.js\` to disable the Image Optimization API.
|
|
318
|
-
Read more: https://nextjs.org/docs/messages/export-image-api`), "__NEXT_ERROR_CODE", {
|
|
319
|
-
value: "E500",
|
|
320
|
-
enumerable: false,
|
|
321
|
-
configurable: true
|
|
322
|
-
});
|
|
323
|
-
}
|
|
324
|
-
if (!src) {
|
|
325
|
-
// React doesn't show the stack trace and there's
|
|
326
|
-
// no `src` to help identify which image, so we
|
|
327
|
-
// instead console.error(ref) during mount.
|
|
328
|
-
unoptimized = true;
|
|
329
|
-
} else {
|
|
330
|
-
if (fill) {
|
|
331
|
-
if (width) {
|
|
332
|
-
throw Object.defineProperty(new Error(`Image with src "${src}" has both "width" and "fill" properties. Only one should be used.`), "__NEXT_ERROR_CODE", {
|
|
333
|
-
value: "E96",
|
|
334
|
-
enumerable: false,
|
|
335
|
-
configurable: true
|
|
336
|
-
});
|
|
337
|
-
}
|
|
338
|
-
if (height) {
|
|
339
|
-
throw Object.defineProperty(new Error(`Image with src "${src}" has both "height" and "fill" properties. Only one should be used.`), "__NEXT_ERROR_CODE", {
|
|
340
|
-
value: "E115",
|
|
341
|
-
enumerable: false,
|
|
342
|
-
configurable: true
|
|
343
|
-
});
|
|
344
|
-
}
|
|
345
|
-
if (style?.position && style.position !== 'absolute') {
|
|
346
|
-
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", {
|
|
347
|
-
value: "E216",
|
|
348
|
-
enumerable: false,
|
|
349
|
-
configurable: true
|
|
350
|
-
});
|
|
351
|
-
}
|
|
352
|
-
if (style?.width && style.width !== '100%') {
|
|
353
|
-
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", {
|
|
354
|
-
value: "E73",
|
|
355
|
-
enumerable: false,
|
|
356
|
-
configurable: true
|
|
357
|
-
});
|
|
358
|
-
}
|
|
359
|
-
if (style?.height && style.height !== '100%') {
|
|
360
|
-
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", {
|
|
361
|
-
value: "E404",
|
|
362
|
-
enumerable: false,
|
|
363
|
-
configurable: true
|
|
364
|
-
});
|
|
365
|
-
}
|
|
366
|
-
} else {
|
|
367
|
-
if (typeof widthInt === 'undefined') {
|
|
368
|
-
throw Object.defineProperty(new Error(`Image with src "${src}" is missing required "width" property.`), "__NEXT_ERROR_CODE", {
|
|
369
|
-
value: "E451",
|
|
370
|
-
enumerable: false,
|
|
371
|
-
configurable: true
|
|
372
|
-
});
|
|
373
|
-
} else if (isNaN(widthInt)) {
|
|
374
|
-
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", {
|
|
375
|
-
value: "E66",
|
|
376
|
-
enumerable: false,
|
|
377
|
-
configurable: true
|
|
378
|
-
});
|
|
379
|
-
}
|
|
380
|
-
if (typeof heightInt === 'undefined') {
|
|
381
|
-
throw Object.defineProperty(new Error(`Image with src "${src}" is missing required "height" property.`), "__NEXT_ERROR_CODE", {
|
|
382
|
-
value: "E397",
|
|
383
|
-
enumerable: false,
|
|
384
|
-
configurable: true
|
|
385
|
-
});
|
|
386
|
-
} else if (isNaN(heightInt)) {
|
|
387
|
-
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", {
|
|
388
|
-
value: "E444",
|
|
389
|
-
enumerable: false,
|
|
390
|
-
configurable: true
|
|
391
|
-
});
|
|
392
|
-
}
|
|
393
|
-
// eslint-disable-next-line no-control-regex
|
|
394
|
-
if (/^[\x00-\x20]/.test(src)) {
|
|
395
|
-
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", {
|
|
396
|
-
value: "E176",
|
|
397
|
-
enumerable: false,
|
|
398
|
-
configurable: true
|
|
399
|
-
});
|
|
400
|
-
}
|
|
401
|
-
// eslint-disable-next-line no-control-regex
|
|
402
|
-
if (/[\x00-\x20]$/.test(src)) {
|
|
403
|
-
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", {
|
|
404
|
-
value: "E21",
|
|
405
|
-
enumerable: false,
|
|
406
|
-
configurable: true
|
|
407
|
-
});
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
if (!VALID_LOADING_VALUES.includes(loading)) {
|
|
412
|
-
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", {
|
|
413
|
-
value: "E357",
|
|
414
|
-
enumerable: false,
|
|
415
|
-
configurable: true
|
|
416
|
-
});
|
|
417
|
-
}
|
|
418
|
-
if (priority && loading === 'lazy') {
|
|
419
|
-
throw Object.defineProperty(new Error(`Image with src "${src}" has both "priority" and "loading='lazy'" properties. Only one should be used.`), "__NEXT_ERROR_CODE", {
|
|
420
|
-
value: "E218",
|
|
421
|
-
enumerable: false,
|
|
422
|
-
configurable: true
|
|
423
|
-
});
|
|
424
|
-
}
|
|
425
|
-
if (preload && loading === 'lazy') {
|
|
426
|
-
throw Object.defineProperty(new Error(`Image with src "${src}" has both "preload" and "loading='lazy'" properties. Only one should be used.`), "__NEXT_ERROR_CODE", {
|
|
427
|
-
value: "E803",
|
|
428
|
-
enumerable: false,
|
|
429
|
-
configurable: true
|
|
430
|
-
});
|
|
431
|
-
}
|
|
432
|
-
if (preload && priority) {
|
|
433
|
-
throw Object.defineProperty(new Error(`Image with src "${src}" has both "preload" and "priority" properties. Only "preload" should be used.`), "__NEXT_ERROR_CODE", {
|
|
434
|
-
value: "E802",
|
|
435
|
-
enumerable: false,
|
|
436
|
-
configurable: true
|
|
437
|
-
});
|
|
438
|
-
}
|
|
439
|
-
if (placeholder !== 'empty' && placeholder !== 'blur' && !placeholder.startsWith('data:image/')) {
|
|
440
|
-
throw Object.defineProperty(new Error(`Image with src "${src}" has invalid "placeholder" property "${placeholder}".`), "__NEXT_ERROR_CODE", {
|
|
441
|
-
value: "E431",
|
|
442
|
-
enumerable: false,
|
|
443
|
-
configurable: true
|
|
444
|
-
});
|
|
445
|
-
}
|
|
446
|
-
if (placeholder !== 'empty') {
|
|
447
|
-
if (widthInt && heightInt && widthInt * heightInt < 1600) {
|
|
448
|
-
(0, _warnonce.warnOnce)(`Image with src "${src}" is smaller than 40x40. Consider removing the "placeholder" property to improve performance.`);
|
|
449
|
-
}
|
|
450
|
-
}
|
|
451
|
-
if (qualityInt && config.qualities && !config.qualities.includes(qualityInt)) {
|
|
452
|
-
(0, _warnonce.warnOnce)(`Image with src "${src}" is using quality "${qualityInt}" which is not configured in images.qualities [${config.qualities.join(', ')}]. Please update your config to [${[...config.qualities, qualityInt].sort().join(', ')}].` + `\nRead more: https://nextjs.org/docs/messages/next-image-unconfigured-qualities`);
|
|
453
|
-
}
|
|
454
|
-
if (placeholder === 'blur' && !blurDataURL) {
|
|
455
|
-
const VALID_BLUR_EXT = ['jpeg', 'png', 'webp', 'avif'] // should match next-image-loader
|
|
456
|
-
;
|
|
457
|
-
throw Object.defineProperty(new Error(`Image with src "${src}" has "placeholder='blur'" property but is missing the "blurDataURL" property.
|
|
458
|
-
Possible solutions:
|
|
459
|
-
- Add a "blurDataURL" property, the contents should be a small Data URL to represent the image
|
|
460
|
-
- Change the "src" property to a static import with one of the supported file types: ${VALID_BLUR_EXT.join(',')} (animated images not supported)
|
|
461
|
-
- Remove the "placeholder" property, effectively no blur effect
|
|
462
|
-
Read more: https://nextjs.org/docs/messages/placeholder-blur-data-url`), "__NEXT_ERROR_CODE", {
|
|
463
|
-
value: "E371",
|
|
464
|
-
enumerable: false,
|
|
465
|
-
configurable: true
|
|
466
|
-
});
|
|
467
|
-
}
|
|
468
|
-
if ('ref' in rest) {
|
|
469
|
-
(0, _warnonce.warnOnce)(`Image with src "${src}" is using unsupported "ref" property. Consider using the "onLoad" property instead.`);
|
|
470
|
-
}
|
|
471
|
-
if (!unoptimized && !isDefaultLoader) {
|
|
472
|
-
const urlStr = loader({
|
|
473
|
-
config,
|
|
474
|
-
src,
|
|
475
|
-
width: widthInt || 400,
|
|
476
|
-
quality: qualityInt || 75
|
|
477
|
-
});
|
|
478
|
-
let url;
|
|
479
|
-
try {
|
|
480
|
-
url = new URL(urlStr);
|
|
481
|
-
} catch (err) {}
|
|
482
|
-
if (urlStr === src || url && url.pathname === src && !url.search) {
|
|
483
|
-
(0, _warnonce.warnOnce)(`Image with src "${src}" has a "loader" property that does not implement width. Please implement it or use the "unoptimized" property instead.` + `\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader-width`);
|
|
484
|
-
}
|
|
485
|
-
}
|
|
486
|
-
if (onLoadingComplete) {
|
|
487
|
-
(0, _warnonce.warnOnce)(`Image with src "${src}" is using deprecated "onLoadingComplete" property. Please use the "onLoad" property instead.`);
|
|
488
|
-
}
|
|
489
|
-
for (const [legacyKey, legacyValue] of Object.entries({
|
|
490
|
-
layout,
|
|
491
|
-
objectFit,
|
|
492
|
-
objectPosition,
|
|
493
|
-
lazyBoundary,
|
|
494
|
-
lazyRoot
|
|
495
|
-
})) {
|
|
496
|
-
if (legacyValue) {
|
|
497
|
-
(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`);
|
|
498
|
-
}
|
|
499
|
-
}
|
|
500
|
-
if (typeof window !== 'undefined' && !perfObserver && window.PerformanceObserver) {
|
|
501
|
-
perfObserver = new PerformanceObserver(entryList => {
|
|
502
|
-
for (const entry of entryList.getEntries()) {
|
|
503
|
-
// @ts-ignore - missing "LargestContentfulPaint" class with "element" prop
|
|
504
|
-
const imgSrc = entry?.element?.src || '';
|
|
505
|
-
const lcpImage = allImgs.get(imgSrc);
|
|
506
|
-
if (lcpImage && lcpImage.loading === 'lazy' && lcpImage.placeholder === 'empty' && !lcpImage.src.startsWith('data:') && !lcpImage.src.startsWith('blob:')) {
|
|
507
|
-
// https://web.dev/lcp/#measure-lcp-in-javascript
|
|
508
|
-
(0, _warnonce.warnOnce)(`Image with src "${lcpImage.src}" was detected as the Largest Contentful Paint (LCP). Please add the \`loading="eager"\` property if this image is above the fold.` + `\nRead more: https://nextjs.org/docs/app/api-reference/components/image#loading`);
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
});
|
|
512
|
-
try {
|
|
513
|
-
perfObserver.observe({
|
|
514
|
-
type: 'largest-contentful-paint',
|
|
515
|
-
buffered: true
|
|
516
|
-
});
|
|
517
|
-
} catch (err) {
|
|
518
|
-
// Log error but don't crash the app
|
|
519
|
-
console.error(err);
|
|
520
|
-
}
|
|
521
|
-
}
|
|
522
|
-
}
|
|
523
|
-
const imgStyle = Object.assign(fill ? {
|
|
524
|
-
position: 'absolute',
|
|
525
|
-
height: '100%',
|
|
526
|
-
width: '100%',
|
|
527
|
-
left: 0,
|
|
528
|
-
top: 0,
|
|
529
|
-
right: 0,
|
|
530
|
-
bottom: 0,
|
|
531
|
-
objectFit,
|
|
532
|
-
objectPosition
|
|
533
|
-
} : {}, showAltText ? {} : {
|
|
534
|
-
color: 'transparent'
|
|
535
|
-
}, style);
|
|
536
|
-
const backgroundImage = !blurComplete && placeholder !== 'empty' ? placeholder === 'blur' ? `url("data:image/svg+xml;charset=utf-8,${(0, _imageblursvg.getImageBlurSvg)({
|
|
537
|
-
widthInt,
|
|
538
|
-
heightInt,
|
|
539
|
-
blurWidth,
|
|
540
|
-
blurHeight,
|
|
541
|
-
blurDataURL: blurDataURL || '',
|
|
542
|
-
objectFit: imgStyle.objectFit
|
|
543
|
-
})}")` : `url("${placeholder}")` // assume `data:image/`
|
|
544
|
-
: null;
|
|
545
|
-
const backgroundSize = !INVALID_BACKGROUND_SIZE_VALUES.includes(imgStyle.objectFit) ? imgStyle.objectFit : imgStyle.objectFit === 'fill' ? '100% 100%' // the background-size equivalent of `fill`
|
|
546
|
-
: 'cover';
|
|
547
|
-
let placeholderStyle = backgroundImage ? {
|
|
548
|
-
backgroundSize,
|
|
549
|
-
backgroundPosition: imgStyle.objectPosition || '50% 50%',
|
|
550
|
-
backgroundRepeat: 'no-repeat',
|
|
551
|
-
backgroundImage
|
|
552
|
-
} : {};
|
|
553
|
-
if (process.env.NODE_ENV === 'development') {
|
|
554
|
-
if (placeholderStyle.backgroundImage && placeholder === 'blur' && blurDataURL?.startsWith('/')) {
|
|
555
|
-
// During `next dev`, we don't want to generate blur placeholders with webpack
|
|
556
|
-
// because it can delay starting the dev server. Instead, `next-image-loader.js`
|
|
557
|
-
// will inline a special url to lazily generate the blur placeholder at request time.
|
|
558
|
-
placeholderStyle.backgroundImage = `url("${blurDataURL}")`;
|
|
559
|
-
}
|
|
560
|
-
}
|
|
561
|
-
const imgAttributes = generateImgAttrs({
|
|
562
|
-
config,
|
|
563
|
-
src,
|
|
564
|
-
unoptimized,
|
|
565
|
-
width: widthInt,
|
|
566
|
-
quality: qualityInt,
|
|
567
|
-
sizes,
|
|
568
|
-
loader
|
|
569
|
-
});
|
|
570
|
-
const loadingFinal = isLazy ? 'lazy' : loading;
|
|
571
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
572
|
-
if (typeof window !== 'undefined') {
|
|
573
|
-
let fullUrl;
|
|
574
|
-
try {
|
|
575
|
-
fullUrl = new URL(imgAttributes.src);
|
|
576
|
-
} catch (e) {
|
|
577
|
-
fullUrl = new URL(imgAttributes.src, window.location.href);
|
|
578
|
-
}
|
|
579
|
-
allImgs.set(fullUrl.href, {
|
|
580
|
-
src,
|
|
581
|
-
loading: loadingFinal,
|
|
582
|
-
placeholder
|
|
583
|
-
});
|
|
584
|
-
}
|
|
585
|
-
}
|
|
586
|
-
const props = {
|
|
587
|
-
...rest,
|
|
588
|
-
loading: loadingFinal,
|
|
589
|
-
fetchPriority,
|
|
590
|
-
width: widthInt,
|
|
591
|
-
height: heightInt,
|
|
592
|
-
decoding,
|
|
593
|
-
className,
|
|
594
|
-
style: {
|
|
595
|
-
...imgStyle,
|
|
596
|
-
...placeholderStyle
|
|
597
|
-
},
|
|
598
|
-
sizes: imgAttributes.sizes,
|
|
599
|
-
srcSet: imgAttributes.srcSet,
|
|
600
|
-
src: overrideSrc || imgAttributes.src
|
|
601
|
-
};
|
|
602
|
-
const meta = {
|
|
603
|
-
unoptimized,
|
|
604
|
-
preload: preload || priority,
|
|
605
|
-
placeholder,
|
|
606
|
-
fill
|
|
607
|
-
};
|
|
608
|
-
return {
|
|
609
|
-
props,
|
|
610
|
-
meta
|
|
611
|
-
};
|
|
612
|
-
}
|
|
613
|
-
} (getImgProps));
|
|
614
|
-
return getImgProps;
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
export { requireGetImgProps as __require };
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { __exports as headManagerContext_sharedRuntime } from '../../../../../_virtual/head-manager-context.shared-runtime.js';
|
|
2
|
-
import { __require as require_interop_require_default } from '../../../../@swc/helpers/cjs/_interop_require_default.js';
|
|
3
|
-
import React__default from 'react';
|
|
4
|
-
|
|
5
|
-
var hasRequiredHeadManagerContext_sharedRuntime;
|
|
6
|
-
|
|
7
|
-
function requireHeadManagerContext_sharedRuntime () {
|
|
8
|
-
if (hasRequiredHeadManagerContext_sharedRuntime) return headManagerContext_sharedRuntime;
|
|
9
|
-
hasRequiredHeadManagerContext_sharedRuntime = 1;
|
|
10
|
-
(function (exports$1) {
|
|
11
|
-
|
|
12
|
-
Object.defineProperty(exports$1, "__esModule", {
|
|
13
|
-
value: true
|
|
14
|
-
});
|
|
15
|
-
Object.defineProperty(exports$1, "HeadManagerContext", {
|
|
16
|
-
enumerable: true,
|
|
17
|
-
get: function () {
|
|
18
|
-
return HeadManagerContext;
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
const _interop_require_default = /*@__PURE__*/ require_interop_require_default();
|
|
22
|
-
const _react = /*#__PURE__*/_interop_require_default._(React__default);
|
|
23
|
-
const HeadManagerContext = _react.default.createContext({});
|
|
24
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
25
|
-
HeadManagerContext.displayName = 'HeadManagerContext';
|
|
26
|
-
}
|
|
27
|
-
} (headManagerContext_sharedRuntime));
|
|
28
|
-
return headManagerContext_sharedRuntime;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export { requireHeadManagerContext_sharedRuntime as __require };
|