@amoa/casting 0.1.2 → 0.1.4
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/_virtual/_commonjsHelpers.js +5 -0
- package/dist/_virtual/_interop_require_default.js +3 -0
- package/dist/_virtual/_interop_require_wildcard.js +3 -0
- package/dist/_virtual/action-async-storage-instance.js +3 -0
- package/dist/_virtual/action-async-storage.external.js +3 -0
- package/dist/_virtual/add-base-path.js +3 -0
- package/dist/_virtual/add-locale.js +3 -0
- package/dist/_virtual/add-locale2.js +3 -0
- package/dist/_virtual/add-path-prefix.js +3 -0
- package/dist/_virtual/app-paths.js +3 -0
- package/dist/_virtual/app-router-context.shared-runtime.js +3 -0
- package/dist/_virtual/app-router-headers.js +3 -0
- package/dist/_virtual/app.js +3 -0
- package/dist/_virtual/async-local-storage.js +3 -0
- package/dist/_virtual/bailout-to-csr.js +3 -0
- package/dist/_virtual/boundary-constants.js +3 -0
- package/dist/_virtual/constants.js +3 -0
- package/dist/_virtual/deployment-id.js +3 -0
- package/dist/_virtual/detect-domain-locale.js +3 -0
- package/dist/_virtual/detect-domain-locale2.js +3 -0
- package/dist/_virtual/dynamic-rendering-utils.js +3 -0
- package/dist/_virtual/dynamic-rendering.js +3 -0
- package/dist/_virtual/ensure-leading-slash.js +3 -0
- package/dist/_virtual/error-once.js +3 -0
- package/dist/_virtual/escape-regexp.js +3 -0
- package/dist/_virtual/find-closest-quality.js +3 -0
- package/dist/_virtual/forbidden.js +3 -0
- package/dist/_virtual/format-url.js +3 -0
- package/dist/_virtual/get-domain-locale.js +3 -0
- package/dist/_virtual/get-dynamic-param.js +3 -0
- package/dist/_virtual/get-img-props.js +3 -0
- package/dist/_virtual/get-segment-param.js +3 -0
- package/dist/_virtual/has-base-path.js +3 -0
- package/dist/_virtual/head-manager-context.shared-runtime.js +3 -0
- package/dist/_virtual/head.js +3 -0
- package/dist/_virtual/hooks-client-context.shared-runtime.js +3 -0
- package/dist/_virtual/hooks-server-context.js +3 -0
- package/dist/_virtual/http-access-fallback.js +3 -0
- package/dist/_virtual/image-blur-svg.js +3 -0
- package/dist/_virtual/image-component.js +3 -0
- package/dist/_virtual/image-config-context.shared-runtime.js +3 -0
- package/dist/_virtual/image-config.js +3 -0
- package/dist/_virtual/image-external.js +3 -0
- package/dist/_virtual/image-loader.js +3 -0
- package/dist/_virtual/image.js +7 -0
- package/dist/_virtual/index.js +3 -0
- package/dist/_virtual/index2.js +3 -0
- package/dist/_virtual/index3.js +3 -0
- package/dist/_virtual/interception-prefix-from-param-type.js +3 -0
- package/dist/_virtual/interception-routes.js +3 -0
- package/dist/_virtual/interpolate-as.js +3 -0
- package/dist/_virtual/invariant-error.js +3 -0
- package/dist/_virtual/is-dynamic.js +3 -0
- package/dist/_virtual/is-local-url.js +3 -0
- package/dist/_virtual/is-next-router-error.js +3 -0
- package/dist/_virtual/is-postpone.js +3 -0
- package/dist/_virtual/jsx-runtime.js +5 -0
- package/dist/_virtual/jsx-runtime2.js +3 -0
- package/dist/_virtual/link.js +7 -0
- package/dist/_virtual/link2.js +3 -0
- package/dist/_virtual/match-local-pattern.js +3 -0
- package/dist/_virtual/match-remote-pattern.js +3 -0
- package/dist/_virtual/navigation.js +3 -0
- package/dist/_virtual/navigation.react-server.js +3 -0
- package/dist/_virtual/navigation2.js +3 -0
- package/dist/_virtual/normalize-locale-path.js +3 -0
- package/dist/_virtual/normalize-locale-path2.js +3 -0
- package/dist/_virtual/normalize-trailing-slash.js +3 -0
- package/dist/_virtual/not-found.js +3 -0
- package/dist/_virtual/omit.js +3 -0
- package/dist/_virtual/parse-loader-tree.js +3 -0
- package/dist/_virtual/parse-path.js +3 -0
- package/dist/_virtual/path-has-prefix.js +3 -0
- package/dist/_virtual/querystring.js +3 -0
- package/dist/_virtual/react-jsx-runtime.development.js +3 -0
- package/dist/_virtual/react-jsx-runtime.production.js +3 -0
- package/dist/_virtual/readonly-url-search-params.js +3 -0
- package/dist/_virtual/redirect-error.js +3 -0
- package/dist/_virtual/redirect-status-code.js +3 -0
- package/dist/_virtual/redirect.js +3 -0
- package/dist/_virtual/remove-trailing-slash.js +3 -0
- package/dist/_virtual/request-idle-callback.js +3 -0
- package/dist/_virtual/resolve-href.js +3 -0
- package/dist/_virtual/resolve-param-value.js +3 -0
- package/dist/_virtual/route-match-utils.js +3 -0
- package/dist/_virtual/route-matcher.js +3 -0
- package/dist/_virtual/route-pattern-normalizer.js +3 -0
- package/dist/_virtual/route-regex.js +3 -0
- package/dist/_virtual/router-context.shared-runtime.js +3 -0
- package/dist/_virtual/scheduler.js +3 -0
- package/dist/_virtual/segment.js +3 -0
- package/dist/_virtual/server-inserted-html.shared-runtime.js +3 -0
- package/dist/_virtual/side-effect.js +3 -0
- package/dist/_virtual/sorted-routes.js +3 -0
- package/dist/_virtual/static-generation-bailout.js +3 -0
- package/dist/_virtual/unauthorized.js +3 -0
- package/dist/_virtual/unrecognized-action-error.js +3 -0
- package/dist/_virtual/unstable-rethrow.browser.js +3 -0
- package/dist/_virtual/unstable-rethrow.js +3 -0
- package/dist/_virtual/unstable-rethrow.server.js +3 -0
- package/dist/_virtual/use-intersection.js +3 -0
- package/dist/_virtual/use-merged-ref.js +3 -0
- package/dist/_virtual/utils.js +3 -0
- package/dist/_virtual/warn-once.js +3 -0
- package/dist/_virtual/work-async-storage-instance.js +3 -0
- package/dist/_virtual/work-async-storage.external.js +3 -0
- package/dist/_virtual/work-unit-async-storage-instance.js +3 -0
- package/dist/_virtual/work-unit-async-storage.external.js +3 -0
- package/dist/config/config.json.js +37 -0
- package/dist/export/index.js +46 -0
- package/dist/form/buttons/index.js +13 -0
- package/dist/form/buttons/index.module.css.js +7 -0
- package/dist/form/caption/index.js +13 -0
- package/dist/form/caption/index.module.css.js +7 -0
- package/dist/form/description/index.js +13 -0
- package/dist/form/description/index.module.css.js +7 -0
- package/dist/form/email/index.js +24 -0
- package/dist/form/index.js +17 -0
- package/dist/form/index.module.css.js +7 -0
- package/dist/form/inputs/index.js +13 -0
- package/dist/form/inputs/index.module.css.js +7 -0
- package/dist/form/password/index.js +24 -0
- package/dist/node_modules/@swc/helpers/cjs/_interop_require_default.js +16 -0
- package/dist/node_modules/@swc/helpers/cjs/_interop_require_wildcard.js +48 -0
- package/dist/node_modules/next/dist/client/add-base-path.js +38 -0
- package/dist/node_modules/next/dist/client/add-locale.js +39 -0
- package/dist/node_modules/next/dist/client/components/app-router-headers.js +112 -0
- package/dist/node_modules/next/dist/client/components/forbidden.js +62 -0
- package/dist/node_modules/next/dist/client/components/hooks-server-context.js +50 -0
- package/dist/node_modules/next/dist/client/components/http-access-fallback/http-access-fallback.js +77 -0
- package/dist/node_modules/next/dist/client/components/is-next-router-error.js +37 -0
- package/dist/node_modules/next/dist/client/components/navigation.js +198 -0
- package/dist/node_modules/next/dist/client/components/navigation.react-server.js +80 -0
- package/dist/node_modules/next/dist/client/components/not-found.js +56 -0
- package/dist/node_modules/next/dist/client/components/readonly-url-search-params.js +58 -0
- package/dist/node_modules/next/dist/client/components/redirect-error.js +60 -0
- package/dist/node_modules/next/dist/client/components/redirect-status-code.js +36 -0
- package/dist/node_modules/next/dist/client/components/redirect.js +98 -0
- package/dist/node_modules/next/dist/client/components/static-generation-bailout.js +50 -0
- package/dist/node_modules/next/dist/client/components/unauthorized.js +63 -0
- package/dist/node_modules/next/dist/client/components/unrecognized-action-error.js +47 -0
- package/dist/node_modules/next/dist/client/components/unstable-rethrow.browser.js +42 -0
- package/dist/node_modules/next/dist/client/components/unstable-rethrow.js +41 -0
- package/dist/node_modules/next/dist/client/components/unstable-rethrow.server.js +50 -0
- package/dist/node_modules/next/dist/client/detect-domain-locale.js +36 -0
- package/dist/node_modules/next/dist/client/get-domain-locale.js +51 -0
- package/dist/node_modules/next/dist/client/has-base-path.js +36 -0
- package/dist/node_modules/next/dist/client/image-component.js +343 -0
- package/dist/node_modules/next/dist/client/link.js +466 -0
- package/dist/node_modules/next/dist/client/normalize-locale-path.js +40 -0
- package/dist/node_modules/next/dist/client/normalize-trailing-slash.js +54 -0
- package/dist/node_modules/next/dist/client/request-idle-callback.js +52 -0
- package/dist/node_modules/next/dist/client/resolve-href.js +124 -0
- package/dist/node_modules/next/dist/client/use-intersection.js +126 -0
- package/dist/node_modules/next/dist/client/use-merged-ref.js +79 -0
- package/dist/node_modules/next/dist/compiled/path-to-regexp/index.js +439 -0
- package/dist/node_modules/next/dist/compiled/picomatch/index.js +1662 -0
- package/dist/node_modules/next/dist/lib/constants.js +339 -0
- package/dist/node_modules/next/dist/lib/framework/boundary-constants.js +41 -0
- package/dist/node_modules/next/dist/lib/route-pattern-normalizer.js +114 -0
- package/dist/node_modules/next/dist/lib/scheduler.js +69 -0
- package/dist/node_modules/next/dist/server/app-render/action-async-storage-instance.js +26 -0
- package/dist/node_modules/next/dist/server/app-render/action-async-storage.external.js +25 -0
- package/dist/node_modules/next/dist/server/app-render/async-local-storage.js +83 -0
- package/dist/node_modules/next/dist/server/app-render/dynamic-rendering.js +804 -0
- package/dist/node_modules/next/dist/server/app-render/work-async-storage-instance.js +26 -0
- package/dist/node_modules/next/dist/server/app-render/work-async-storage.external.js +25 -0
- package/dist/node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js +26 -0
- package/dist/node_modules/next/dist/server/app-render/work-unit-async-storage.external.js +221 -0
- package/dist/node_modules/next/dist/server/dynamic-rendering-utils.js +90 -0
- package/dist/node_modules/next/dist/server/lib/router-utils/is-postpone.js +27 -0
- package/dist/node_modules/next/dist/shared/lib/app-router-context.shared-runtime.js +56 -0
- package/dist/node_modules/next/dist/shared/lib/deployment-id.js +41 -0
- package/dist/node_modules/next/dist/shared/lib/escape-regexp.js +32 -0
- package/dist/node_modules/next/dist/shared/lib/find-closest-quality.js +30 -0
- package/dist/node_modules/next/dist/shared/lib/get-img-props.js +617 -0
- package/dist/node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js +31 -0
- package/dist/node_modules/next/dist/shared/lib/head.js +177 -0
- package/dist/node_modules/next/dist/shared/lib/hooks-client-context.shared-runtime.js +65 -0
- package/dist/node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js +36 -0
- package/dist/node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js +66 -0
- package/dist/node_modules/next/dist/shared/lib/image-blur-svg.js +42 -0
- package/dist/node_modules/next/dist/shared/lib/image-config-context.shared-runtime.js +33 -0
- package/dist/node_modules/next/dist/shared/lib/image-config.js +56 -0
- package/dist/node_modules/next/dist/shared/lib/image-external.js +60 -0
- package/dist/node_modules/next/dist/shared/lib/image-loader.js +119 -0
- package/dist/node_modules/next/dist/shared/lib/invariant-error.js +29 -0
- package/dist/node_modules/next/dist/shared/lib/lazy-dynamic/bailout-to-csr.js +43 -0
- package/dist/node_modules/next/dist/shared/lib/match-local-pattern.js +54 -0
- package/dist/node_modules/next/dist/shared/lib/match-remote-pattern.js +71 -0
- package/dist/node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js +31 -0
- package/dist/node_modules/next/dist/shared/lib/router/routes/app.js +130 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/add-locale.js +41 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js +36 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/app-paths.js +61 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/format-url.js +88 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/get-dynamic-param.js +176 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/get-segment-param.js +89 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/index.js +38 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/interception-prefix-from-param-type.js +44 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/interception-routes.js +109 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/interpolate-as.js +71 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/is-dynamic.js +38 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/is-local-url.js +39 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/omit.js +32 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/parse-loader-tree.js +46 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/parse-path.js +46 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js +34 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/querystring.js +82 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js +34 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/resolve-param-value.js +128 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/route-match-utils.js +122 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/route-matcher.js +61 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/route-regex.js +312 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/sorted-routes.js +246 -0
- package/dist/node_modules/next/dist/shared/lib/router-context.shared-runtime.js +31 -0
- package/dist/node_modules/next/dist/shared/lib/segment.js +102 -0
- package/dist/node_modules/next/dist/shared/lib/server-inserted-html.shared-runtime.js +44 -0
- package/dist/node_modules/next/dist/shared/lib/side-effect.js +78 -0
- package/dist/node_modules/next/dist/shared/lib/utils/error-once.js +33 -0
- package/dist/node_modules/next/dist/shared/lib/utils/warn-once.js +33 -0
- package/dist/node_modules/next/dist/shared/lib/utils.js +192 -0
- package/dist/node_modules/next/image.js +13 -0
- package/dist/node_modules/next/link.js +13 -0
- package/dist/node_modules/next/navigation.js +13 -0
- package/dist/node_modules/react/cjs/react-jsx-runtime.development.js +240 -0
- package/dist/node_modules/react/cjs/react-jsx-runtime.production.js +44 -0
- package/dist/node_modules/react/jsx-runtime.js +19 -0
- package/dist/node_modules/style-inject/dist/style-inject.es.js +26 -0
- package/dist/packages/carving/src/carving.js +34 -0
- package/dist/packages/carving/src/condo.js +17 -0
- package/dist/packages/carving/src/logos/amoa.js +17 -0
- package/dist/packages/forge/src/classes.js +17 -0
- package/dist/packages/forge/src/dates/date.js +8 -0
- package/dist/packages/forge/src/dates/day.js +7 -0
- package/dist/packages/forge/src/dates/index.js +31 -0
- package/dist/packages/forge/src/dates/month.js +35 -0
- package/dist/packages/forge/src/dates/year.js +16 -0
- package/dist/packages/forge/src/fetcher/index.js +37 -0
- package/dist/packages/forge/src/fetcher/querystring.js +9 -0
- package/dist/packages/forge/src/files.js +17 -0
- package/dist/packages/forge/src/numbers/index.js +5 -0
- package/dist/packages/forge/src/strings/characters.js +3 -0
- package/dist/packages/forge/src/strings/diacritics.js +261 -0
- package/dist/packages/forge/src/strings/index.js +24 -0
- package/dist/packages/hooks/src/use-debounce.js +19 -0
- package/dist/packages/hooks/src/use-tooltip.js +27 -0
- package/dist/packages/ingots/src/address/api/form.js +12 -0
- package/dist/packages/ingots/src/address/config.json.js +16 -0
- package/dist/packages/ingots/src/address/index.js +117 -0
- package/dist/packages/ingots/src/address/index.module.css.js +7 -0
- package/dist/packages/ingots/src/address/service.js +41 -0
- package/dist/packages/ingots/src/backdrop/index.js +18 -0
- package/dist/packages/ingots/src/backdrop/index.module.css.js +7 -0
- package/dist/packages/ingots/src/button/index.js +56 -0
- package/dist/packages/ingots/src/button/index.module.css.js +7 -0
- package/dist/packages/ingots/src/checkbox/index.js +47 -0
- package/dist/packages/ingots/src/checkbox/index.module.css.js +7 -0
- package/dist/packages/ingots/src/date/erase/index.js +22 -0
- package/dist/packages/ingots/src/date/erase/index.module.css.js +7 -0
- package/dist/packages/ingots/src/date/input/index.js +113 -0
- package/dist/packages/ingots/src/date/input/index.module.css.js +7 -0
- package/dist/packages/ingots/src/date/picker/day/index.js +35 -0
- package/dist/packages/ingots/src/date/picker/day/index.module.css.js +7 -0
- package/dist/packages/ingots/src/date/picker/days/index.js +59 -0
- package/dist/packages/ingots/src/date/picker/days/index.module.css.js +7 -0
- package/dist/packages/ingots/src/date/picker/handle/index.js +40 -0
- package/dist/packages/ingots/src/date/picker/handle/index.module.css.js +7 -0
- package/dist/packages/ingots/src/date/picker/index.js +154 -0
- package/dist/packages/ingots/src/date/picker/index.module.css.js +7 -0
- package/dist/packages/ingots/src/date/picker/menu/index.js +32 -0
- package/dist/packages/ingots/src/date/picker/menu/index.module.css.js +7 -0
- package/dist/packages/ingots/src/date/picker/menu/item.js +30 -0
- package/dist/packages/ingots/src/date/picker/menu/item.module.css.js +7 -0
- package/dist/packages/ingots/src/file/api/index.js +14 -0
- package/dist/packages/ingots/src/file/card/index.js +65 -0
- package/dist/packages/ingots/src/file/card/index.module.css.js +7 -0
- package/dist/packages/ingots/src/file/index.js +34 -0
- package/dist/packages/ingots/src/file/index.module.css.js +7 -0
- package/dist/packages/ingots/src/file/input/index.js +261 -0
- package/dist/packages/ingots/src/file/input/index.module.css.js +7 -0
- package/dist/packages/ingots/src/input/index.js +75 -0
- package/dist/packages/ingots/src/input/src/validation/index.js +3 -0
- package/dist/packages/ingots/src/loader/index.js +23 -0
- package/dist/packages/ingots/src/loader/index.module.css.js +7 -0
- package/dist/packages/ingots/src/loader/variants/spinner/index.js +31 -0
- package/dist/packages/ingots/src/loader/variants/spinner/index.module.css.js +7 -0
- package/dist/packages/ingots/src/select/card/index.js +33 -0
- package/dist/packages/ingots/src/select/card/index.module.css.js +7 -0
- package/dist/packages/ingots/src/select/category/index.js +13 -0
- package/dist/packages/ingots/src/select/category/index.module.css.js +7 -0
- package/dist/packages/ingots/src/select/content/index.js +46 -0
- package/dist/packages/ingots/src/select/index.js +155 -0
- package/dist/packages/ingots/src/select/index.module.css.js +7 -0
- package/dist/packages/ingots/src/select/option/index.js +35 -0
- package/dist/packages/ingots/src/select/option/index.module.css.js +7 -0
- package/dist/packages/ingots/src/select/options/index.js +59 -0
- package/dist/packages/ingots/src/select/options/index.module.css.js +7 -0
- package/dist/packages/ingots/src/snackbar/context.js +9 -0
- package/dist/packages/ingots/src/tag/index.js +16 -0
- package/dist/packages/ingots/src/tag/index.module.css.js +7 -0
- package/dist/packages/ingots/src/text/index.js +92 -0
- package/dist/packages/ingots/src/text/index.module.css.js +7 -0
- package/dist/packages/ingots/src/textarea/index.js +62 -0
- package/dist/packages/ingots/src/textarea/index.module.css.js +7 -0
- package/dist/packages/ingots/src/toggle/index.js +43 -0
- package/dist/packages/ingots/src/toggle/index.module.css.js +7 -0
- package/dist/packages/runes/src/icon.js +16 -0
- package/dist/packages/runes/src/paths/alert.js +18 -0
- package/dist/packages/runes/src/paths/arrow/path.js +18 -0
- package/dist/packages/runes/src/paths/calendar.js +18 -0
- package/dist/packages/runes/src/paths/check/fill.js +18 -0
- package/dist/packages/runes/src/paths/check/regular.js +18 -0
- package/dist/packages/runes/src/paths/chevron/down.js +18 -0
- package/dist/packages/runes/src/paths/chevron/left.js +18 -0
- package/dist/packages/runes/src/paths/chevron/right.js +18 -0
- package/dist/packages/runes/src/paths/click.js +18 -0
- package/dist/packages/runes/src/paths/cross/regular.js +16 -0
- package/dist/packages/runes/src/paths/download.js +18 -0
- package/dist/packages/runes/src/paths/file.js +18 -0
- package/dist/packages/runes/src/paths/link.js +23 -0
- package/dist/packages/wares/src/authentication/index.js +11 -0
- package/dist/waiter/index.js +41 -0
- package/dist/waiter/index.module.css.js +7 -0
- package/package.json +6 -6
- package/dist/export.js +0 -2
- package/dist/export.js.LICENSE.txt +0 -9
- package/dist/form.js +0 -2
- package/dist/form.js.LICENSE.txt +0 -9
- package/dist/waiter.js +0 -2
- package/dist/waiter.js.LICENSE.txt +0 -9
|
@@ -0,0 +1,466 @@
|
|
|
1
|
+
import { __module as link } from '../../../../_virtual/link2.js';
|
|
2
|
+
import { __require as require_interop_require_wildcard } from '../../../@swc/helpers/cjs/_interop_require_wildcard.js';
|
|
3
|
+
import { __require as requireJsxRuntime } from '../../../react/jsx-runtime.js';
|
|
4
|
+
import React__default from 'react';
|
|
5
|
+
import { __require as requireResolveHref } from './resolve-href.js';
|
|
6
|
+
import { __require as requireIsLocalUrl } from '../shared/lib/router/utils/is-local-url.js';
|
|
7
|
+
import { __require as requireFormatUrl } from '../shared/lib/router/utils/format-url.js';
|
|
8
|
+
import { __require as requireUtils } from '../shared/lib/utils.js';
|
|
9
|
+
import { __require as requireAddLocale } from './add-locale.js';
|
|
10
|
+
import { __require as requireRouterContext_sharedRuntime } from '../shared/lib/router-context.shared-runtime.js';
|
|
11
|
+
import { __require as requireUseIntersection } from './use-intersection.js';
|
|
12
|
+
import { __require as requireGetDomainLocale } from './get-domain-locale.js';
|
|
13
|
+
import { __require as requireAddBasePath } from './add-base-path.js';
|
|
14
|
+
import { __require as requireUseMergedRef } from './use-merged-ref.js';
|
|
15
|
+
import { __require as requireErrorOnce } from '../shared/lib/utils/error-once.js';
|
|
16
|
+
|
|
17
|
+
var hasRequiredLink;
|
|
18
|
+
|
|
19
|
+
function requireLink () {
|
|
20
|
+
if (hasRequiredLink) return link.exports;
|
|
21
|
+
hasRequiredLink = 1;
|
|
22
|
+
(function (module, exports$1) {
|
|
23
|
+
'use client';
|
|
24
|
+
|
|
25
|
+
Object.defineProperty(exports$1, "__esModule", {
|
|
26
|
+
value: true
|
|
27
|
+
});
|
|
28
|
+
function _export(target, all) {
|
|
29
|
+
for (var name in all) Object.defineProperty(target, name, {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
get: all[name]
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
_export(exports$1, {
|
|
35
|
+
default: function () {
|
|
36
|
+
return _default;
|
|
37
|
+
},
|
|
38
|
+
useLinkStatus: function () {
|
|
39
|
+
return useLinkStatus;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
const _interop_require_wildcard = /*@__PURE__*/ require_interop_require_wildcard();
|
|
43
|
+
const _jsxruntime = requireJsxRuntime();
|
|
44
|
+
const _react = /*#__PURE__*/_interop_require_wildcard._(React__default);
|
|
45
|
+
const _resolvehref = requireResolveHref();
|
|
46
|
+
const _islocalurl = requireIsLocalUrl();
|
|
47
|
+
const _formaturl = requireFormatUrl();
|
|
48
|
+
const _utils = requireUtils();
|
|
49
|
+
const _addlocale = requireAddLocale();
|
|
50
|
+
const _routercontextsharedruntime = requireRouterContext_sharedRuntime();
|
|
51
|
+
const _useintersection = requireUseIntersection();
|
|
52
|
+
const _getdomainlocale = requireGetDomainLocale();
|
|
53
|
+
const _addbasepath = requireAddBasePath();
|
|
54
|
+
const _usemergedref = requireUseMergedRef();
|
|
55
|
+
const _erroronce = requireErrorOnce();
|
|
56
|
+
const prefetched = new Set();
|
|
57
|
+
function prefetch(router, href, as, options) {
|
|
58
|
+
if (typeof window === 'undefined') {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
if (!(0, _islocalurl.isLocalURL)(href)) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
// We should only dedupe requests when experimental.optimisticClientCache is
|
|
65
|
+
// disabled.
|
|
66
|
+
if (!options.bypassPrefetchedCheck) {
|
|
67
|
+
const locale =
|
|
68
|
+
// Let the link's locale prop override the default router locale.
|
|
69
|
+
typeof options.locale !== 'undefined' ? options.locale : 'locale' in router ? router.locale : undefined;
|
|
70
|
+
const prefetchedKey = href + '%' + as + '%' + locale;
|
|
71
|
+
// If we've already fetched the key, then don't prefetch it again!
|
|
72
|
+
if (prefetched.has(prefetchedKey)) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
// Mark this URL as prefetched.
|
|
76
|
+
prefetched.add(prefetchedKey);
|
|
77
|
+
}
|
|
78
|
+
// Prefetch the JSON page if asked (only in the client)
|
|
79
|
+
// We need to handle a prefetch error here since we may be
|
|
80
|
+
// loading with priority which can reject but we don't
|
|
81
|
+
// want to force navigation since this is only a prefetch
|
|
82
|
+
router.prefetch(href, as, options).catch(err => {
|
|
83
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
84
|
+
// rethrow to show invalid URL errors
|
|
85
|
+
throw err;
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
function isModifiedEvent(event) {
|
|
90
|
+
const eventTarget = event.currentTarget;
|
|
91
|
+
const target = eventTarget.getAttribute('target');
|
|
92
|
+
return target && target !== '_self' || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey ||
|
|
93
|
+
// triggers resource download
|
|
94
|
+
event.nativeEvent && event.nativeEvent.which === 2;
|
|
95
|
+
}
|
|
96
|
+
function linkClicked(e, router, href, as, replace, shallow, scroll, locale, onNavigate) {
|
|
97
|
+
const {
|
|
98
|
+
nodeName
|
|
99
|
+
} = e.currentTarget;
|
|
100
|
+
// anchors inside an svg have a lowercase nodeName
|
|
101
|
+
const isAnchorNodeName = nodeName.toUpperCase() === 'A';
|
|
102
|
+
if (isAnchorNodeName && isModifiedEvent(e) || e.currentTarget.hasAttribute('download')) {
|
|
103
|
+
// ignore click for browser’s default behavior
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
if (!(0, _islocalurl.isLocalURL)(href)) {
|
|
107
|
+
if (replace) {
|
|
108
|
+
// browser default behavior does not replace the history state
|
|
109
|
+
// so we need to do it manually
|
|
110
|
+
e.preventDefault();
|
|
111
|
+
location.replace(href);
|
|
112
|
+
}
|
|
113
|
+
// ignore click for browser’s default behavior
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
e.preventDefault();
|
|
117
|
+
const navigate = () => {
|
|
118
|
+
if (onNavigate) {
|
|
119
|
+
let isDefaultPrevented = false;
|
|
120
|
+
onNavigate({
|
|
121
|
+
preventDefault: () => {
|
|
122
|
+
isDefaultPrevented = true;
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
if (isDefaultPrevented) {
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
// If the router is an NextRouter instance it will have `beforePopState`
|
|
130
|
+
const routerScroll = scroll ?? true;
|
|
131
|
+
if ('beforePopState' in router) {
|
|
132
|
+
router[replace ? 'replace' : 'push'](href, as, {
|
|
133
|
+
shallow,
|
|
134
|
+
locale,
|
|
135
|
+
scroll: routerScroll
|
|
136
|
+
});
|
|
137
|
+
} else {
|
|
138
|
+
router[replace ? 'replace' : 'push'](as || href, {
|
|
139
|
+
scroll: routerScroll
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
navigate();
|
|
144
|
+
}
|
|
145
|
+
function formatStringOrUrl(urlObjOrString) {
|
|
146
|
+
if (typeof urlObjOrString === 'string') {
|
|
147
|
+
return urlObjOrString;
|
|
148
|
+
}
|
|
149
|
+
return (0, _formaturl.formatUrl)(urlObjOrString);
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* A React component that extends the HTML `<a>` element to provide [prefetching](https://nextjs.org/docs/app/building-your-application/routing/linking-and-navigating#2-prefetching)
|
|
153
|
+
* and client-side navigation between routes.
|
|
154
|
+
*
|
|
155
|
+
* It is the primary way to navigate between routes in Next.js.
|
|
156
|
+
*
|
|
157
|
+
* Read more: [Next.js docs: `<Link>`](https://nextjs.org/docs/app/api-reference/components/link)
|
|
158
|
+
*/
|
|
159
|
+
const Link = /*#__PURE__*/_react.default.forwardRef(function LinkComponent(props, forwardedRef) {
|
|
160
|
+
let children;
|
|
161
|
+
const {
|
|
162
|
+
href: hrefProp,
|
|
163
|
+
as: asProp,
|
|
164
|
+
children: childrenProp,
|
|
165
|
+
prefetch: prefetchProp = null,
|
|
166
|
+
passHref,
|
|
167
|
+
replace,
|
|
168
|
+
shallow,
|
|
169
|
+
scroll,
|
|
170
|
+
locale,
|
|
171
|
+
onClick,
|
|
172
|
+
onNavigate,
|
|
173
|
+
onMouseEnter: onMouseEnterProp,
|
|
174
|
+
onTouchStart: onTouchStartProp,
|
|
175
|
+
legacyBehavior = false,
|
|
176
|
+
...restProps
|
|
177
|
+
} = props;
|
|
178
|
+
children = childrenProp;
|
|
179
|
+
if (legacyBehavior && (typeof children === 'string' || typeof children === 'number')) {
|
|
180
|
+
children = /*#__PURE__*/(0, _jsxruntime.jsx)("a", {
|
|
181
|
+
children: children
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
const router = _react.default.useContext(_routercontextsharedruntime.RouterContext);
|
|
185
|
+
const prefetchEnabled = prefetchProp !== false;
|
|
186
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
187
|
+
function createPropError(args) {
|
|
188
|
+
return Object.defineProperty(new Error(`Failed prop type: The prop \`${args.key}\` expects a ${args.expected} in \`<Link>\`, but got \`${args.actual}\` instead.` + (typeof window !== 'undefined' ? "\nOpen your browser's console to view the Component stack trace." : '')), "__NEXT_ERROR_CODE", {
|
|
189
|
+
value: "E319",
|
|
190
|
+
enumerable: false,
|
|
191
|
+
configurable: true
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
// TypeScript trick for type-guarding:
|
|
195
|
+
const requiredPropsGuard = {
|
|
196
|
+
href: true
|
|
197
|
+
};
|
|
198
|
+
const requiredProps = Object.keys(requiredPropsGuard);
|
|
199
|
+
requiredProps.forEach(key => {
|
|
200
|
+
if (key === 'href') {
|
|
201
|
+
if (props[key] == null || typeof props[key] !== 'string' && typeof props[key] !== 'object') {
|
|
202
|
+
throw createPropError({
|
|
203
|
+
key,
|
|
204
|
+
expected: '`string` or `object`',
|
|
205
|
+
actual: props[key] === null ? 'null' : typeof props[key]
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
// TypeScript trick for type-guarding:
|
|
211
|
+
const optionalPropsGuard = {
|
|
212
|
+
as: true,
|
|
213
|
+
replace: true,
|
|
214
|
+
scroll: true,
|
|
215
|
+
shallow: true,
|
|
216
|
+
passHref: true,
|
|
217
|
+
prefetch: true,
|
|
218
|
+
locale: true,
|
|
219
|
+
onClick: true,
|
|
220
|
+
onMouseEnter: true,
|
|
221
|
+
onTouchStart: true,
|
|
222
|
+
legacyBehavior: true,
|
|
223
|
+
onNavigate: true
|
|
224
|
+
};
|
|
225
|
+
const optionalProps = Object.keys(optionalPropsGuard);
|
|
226
|
+
optionalProps.forEach(key => {
|
|
227
|
+
const valType = typeof props[key];
|
|
228
|
+
if (key === 'as') {
|
|
229
|
+
if (props[key] && valType !== 'string' && valType !== 'object') {
|
|
230
|
+
throw createPropError({
|
|
231
|
+
key,
|
|
232
|
+
expected: '`string` or `object`',
|
|
233
|
+
actual: valType
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
} else if (key === 'locale') {
|
|
237
|
+
if (props[key] && valType !== 'string') {
|
|
238
|
+
throw createPropError({
|
|
239
|
+
key,
|
|
240
|
+
expected: '`string`',
|
|
241
|
+
actual: valType
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
} else if (key === 'onClick' || key === 'onMouseEnter' || key === 'onTouchStart' || key === 'onNavigate') {
|
|
245
|
+
if (props[key] && valType !== 'function') {
|
|
246
|
+
throw createPropError({
|
|
247
|
+
key,
|
|
248
|
+
expected: '`function`',
|
|
249
|
+
actual: valType
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
} else if (key === 'replace' || key === 'scroll' || key === 'shallow' || key === 'passHref' || key === 'legacyBehavior') {
|
|
253
|
+
if (props[key] != null && valType !== 'boolean') {
|
|
254
|
+
throw createPropError({
|
|
255
|
+
key,
|
|
256
|
+
expected: '`boolean`',
|
|
257
|
+
actual: valType
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
} else if (key === 'prefetch') {
|
|
261
|
+
if (props[key] != null && valType !== 'boolean' && props[key] !== 'auto') {
|
|
262
|
+
throw createPropError({
|
|
263
|
+
key,
|
|
264
|
+
expected: '`boolean | "auto"`',
|
|
265
|
+
actual: valType
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
} else ;
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
const {
|
|
272
|
+
href,
|
|
273
|
+
as
|
|
274
|
+
} = _react.default.useMemo(() => {
|
|
275
|
+
if (!router) {
|
|
276
|
+
const resolvedHref = formatStringOrUrl(hrefProp);
|
|
277
|
+
return {
|
|
278
|
+
href: resolvedHref,
|
|
279
|
+
as: asProp ? formatStringOrUrl(asProp) : resolvedHref
|
|
280
|
+
};
|
|
281
|
+
}
|
|
282
|
+
const [resolvedHref, resolvedAs] = (0, _resolvehref.resolveHref)(router, hrefProp, true);
|
|
283
|
+
return {
|
|
284
|
+
href: resolvedHref,
|
|
285
|
+
as: asProp ? (0, _resolvehref.resolveHref)(router, asProp) : resolvedAs || resolvedHref
|
|
286
|
+
};
|
|
287
|
+
}, [router, hrefProp, asProp]);
|
|
288
|
+
const previousHref = _react.default.useRef(href);
|
|
289
|
+
const previousAs = _react.default.useRef(as);
|
|
290
|
+
// This will return the first child, if multiple are provided it will throw an error
|
|
291
|
+
let child;
|
|
292
|
+
if (legacyBehavior) {
|
|
293
|
+
if (process.env.NODE_ENV === 'development') {
|
|
294
|
+
if (onClick) {
|
|
295
|
+
console.warn(`"onClick" was passed to <Link> with \`href\` of \`${hrefProp}\` but "legacyBehavior" was set. The legacy behavior requires onClick be set on the child of next/link`);
|
|
296
|
+
}
|
|
297
|
+
if (onMouseEnterProp) {
|
|
298
|
+
console.warn(`"onMouseEnter" was passed to <Link> with \`href\` of \`${hrefProp}\` but "legacyBehavior" was set. The legacy behavior requires onMouseEnter be set on the child of next/link`);
|
|
299
|
+
}
|
|
300
|
+
try {
|
|
301
|
+
child = _react.default.Children.only(children);
|
|
302
|
+
} catch (err) {
|
|
303
|
+
if (!children) {
|
|
304
|
+
throw Object.defineProperty(new Error(`No children were passed to <Link> with \`href\` of \`${hrefProp}\` but one child is required https://nextjs.org/docs/messages/link-no-children`), "__NEXT_ERROR_CODE", {
|
|
305
|
+
value: "E320",
|
|
306
|
+
enumerable: false,
|
|
307
|
+
configurable: true
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
throw Object.defineProperty(new Error(`Multiple children were passed to <Link> with \`href\` of \`${hrefProp}\` but only one child is supported https://nextjs.org/docs/messages/link-multiple-children` + (typeof window !== 'undefined' ? " \nOpen your browser's console to view the Component stack trace." : '')), "__NEXT_ERROR_CODE", {
|
|
311
|
+
value: "E266",
|
|
312
|
+
enumerable: false,
|
|
313
|
+
configurable: true
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
} else {
|
|
317
|
+
child = _react.default.Children.only(children);
|
|
318
|
+
}
|
|
319
|
+
} else {
|
|
320
|
+
if (process.env.NODE_ENV === 'development') {
|
|
321
|
+
if (children?.type === 'a') {
|
|
322
|
+
throw Object.defineProperty(new Error('Invalid <Link> with <a> child. Please remove <a> or use <Link legacyBehavior>.\nLearn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor'), "__NEXT_ERROR_CODE", {
|
|
323
|
+
value: "E209",
|
|
324
|
+
enumerable: false,
|
|
325
|
+
configurable: true
|
|
326
|
+
});
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
const childRef = legacyBehavior ? child && typeof child === 'object' && child.ref : forwardedRef;
|
|
331
|
+
const [setIntersectionRef, isVisible, resetVisible] = (0, _useintersection.useIntersection)({
|
|
332
|
+
rootMargin: '200px'
|
|
333
|
+
});
|
|
334
|
+
const setIntersectionWithResetRef = _react.default.useCallback(el => {
|
|
335
|
+
// Before the link getting observed, check if visible state need to be reset
|
|
336
|
+
if (previousAs.current !== as || previousHref.current !== href) {
|
|
337
|
+
resetVisible();
|
|
338
|
+
previousAs.current = as;
|
|
339
|
+
previousHref.current = href;
|
|
340
|
+
}
|
|
341
|
+
setIntersectionRef(el);
|
|
342
|
+
}, [as, href, resetVisible, setIntersectionRef]);
|
|
343
|
+
const setRef = (0, _usemergedref.useMergedRef)(setIntersectionWithResetRef, childRef);
|
|
344
|
+
// Prefetch the URL if we haven't already and it's visible.
|
|
345
|
+
_react.default.useEffect(() => {
|
|
346
|
+
// in dev, we only prefetch on hover to avoid wasting resources as the prefetch will trigger compiling the page.
|
|
347
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
348
|
+
return;
|
|
349
|
+
}
|
|
350
|
+
if (!router) {
|
|
351
|
+
return;
|
|
352
|
+
}
|
|
353
|
+
// If we don't need to prefetch the URL, don't do prefetch.
|
|
354
|
+
if (!isVisible || !prefetchEnabled) {
|
|
355
|
+
return;
|
|
356
|
+
}
|
|
357
|
+
// Prefetch the URL.
|
|
358
|
+
prefetch(router, href, as, {
|
|
359
|
+
locale
|
|
360
|
+
});
|
|
361
|
+
}, [as, href, isVisible, locale, prefetchEnabled, router?.locale, router]);
|
|
362
|
+
const childProps = {
|
|
363
|
+
ref: setRef,
|
|
364
|
+
onClick(e) {
|
|
365
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
366
|
+
if (!e) {
|
|
367
|
+
throw Object.defineProperty(new Error(`Component rendered inside next/link has to pass click event to "onClick" prop.`), "__NEXT_ERROR_CODE", {
|
|
368
|
+
value: "E312",
|
|
369
|
+
enumerable: false,
|
|
370
|
+
configurable: true
|
|
371
|
+
});
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
if (!legacyBehavior && typeof onClick === 'function') {
|
|
375
|
+
onClick(e);
|
|
376
|
+
}
|
|
377
|
+
if (legacyBehavior && child.props && typeof child.props.onClick === 'function') {
|
|
378
|
+
child.props.onClick(e);
|
|
379
|
+
}
|
|
380
|
+
if (!router) {
|
|
381
|
+
return;
|
|
382
|
+
}
|
|
383
|
+
if (e.defaultPrevented) {
|
|
384
|
+
return;
|
|
385
|
+
}
|
|
386
|
+
linkClicked(e, router, href, as, replace, shallow, scroll, locale, onNavigate);
|
|
387
|
+
},
|
|
388
|
+
onMouseEnter(e) {
|
|
389
|
+
if (!legacyBehavior && typeof onMouseEnterProp === 'function') {
|
|
390
|
+
onMouseEnterProp(e);
|
|
391
|
+
}
|
|
392
|
+
if (legacyBehavior && child.props && typeof child.props.onMouseEnter === 'function') {
|
|
393
|
+
child.props.onMouseEnter(e);
|
|
394
|
+
}
|
|
395
|
+
if (!router) {
|
|
396
|
+
return;
|
|
397
|
+
}
|
|
398
|
+
prefetch(router, href, as, {
|
|
399
|
+
locale,
|
|
400
|
+
priority: true,
|
|
401
|
+
// @see {https://github.com/vercel/next.js/discussions/40268?sort=top#discussioncomment-3572642}
|
|
402
|
+
bypassPrefetchedCheck: true
|
|
403
|
+
});
|
|
404
|
+
},
|
|
405
|
+
onTouchStart: process.env.__NEXT_LINK_NO_TOUCH_START ? undefined : function onTouchStart(e) {
|
|
406
|
+
if (!legacyBehavior && typeof onTouchStartProp === 'function') {
|
|
407
|
+
onTouchStartProp(e);
|
|
408
|
+
}
|
|
409
|
+
if (legacyBehavior && child.props && typeof child.props.onTouchStart === 'function') {
|
|
410
|
+
child.props.onTouchStart(e);
|
|
411
|
+
}
|
|
412
|
+
if (!router) {
|
|
413
|
+
return;
|
|
414
|
+
}
|
|
415
|
+
prefetch(router, href, as, {
|
|
416
|
+
locale,
|
|
417
|
+
priority: true,
|
|
418
|
+
// @see {https://github.com/vercel/next.js/discussions/40268?sort=top#discussioncomment-3572642}
|
|
419
|
+
bypassPrefetchedCheck: true
|
|
420
|
+
});
|
|
421
|
+
}
|
|
422
|
+
};
|
|
423
|
+
// If the url is absolute, we can bypass the logic to prepend the domain and locale.
|
|
424
|
+
if ((0, _utils.isAbsoluteUrl)(as)) {
|
|
425
|
+
childProps.href = as;
|
|
426
|
+
} else if (!legacyBehavior || passHref || child.type === 'a' && !('href' in child.props)) {
|
|
427
|
+
const curLocale = typeof locale !== 'undefined' ? locale : router?.locale;
|
|
428
|
+
// we only render domain locales if we are currently on a domain locale
|
|
429
|
+
// so that locale links are still visitable in development/preview envs
|
|
430
|
+
const localeDomain = router?.isLocaleDomain && (0, _getdomainlocale.getDomainLocale)(as, curLocale, router?.locales, router?.domainLocales);
|
|
431
|
+
childProps.href = localeDomain || (0, _addbasepath.addBasePath)((0, _addlocale.addLocale)(as, curLocale, router?.defaultLocale));
|
|
432
|
+
}
|
|
433
|
+
if (legacyBehavior) {
|
|
434
|
+
if (process.env.NODE_ENV === 'development') {
|
|
435
|
+
(0, _erroronce.errorOnce)('`legacyBehavior` is deprecated and will be removed in a future ' + 'release. A codemod is available to upgrade your components:\n\n' + 'npx @next/codemod@latest new-link .\n\n' + 'Learn more: https://nextjs.org/docs/app/building-your-application/upgrading/codemods#remove-a-tags-from-link-components');
|
|
436
|
+
}
|
|
437
|
+
return /*#__PURE__*/_react.default.cloneElement(child, childProps);
|
|
438
|
+
}
|
|
439
|
+
return /*#__PURE__*/(0, _jsxruntime.jsx)("a", {
|
|
440
|
+
...restProps,
|
|
441
|
+
...childProps,
|
|
442
|
+
children: children
|
|
443
|
+
});
|
|
444
|
+
});
|
|
445
|
+
const LinkStatusContext = /*#__PURE__*/(0, _react.createContext)({
|
|
446
|
+
// We do not support link status in the Pages Router, so we always return false
|
|
447
|
+
pending: false
|
|
448
|
+
});
|
|
449
|
+
const useLinkStatus = () => {
|
|
450
|
+
// This behaviour is like React's useFormStatus. When the component is not under
|
|
451
|
+
// a <form> tag, it will get the default value, instead of throwing an error.
|
|
452
|
+
return (0, _react.useContext)(LinkStatusContext);
|
|
453
|
+
};
|
|
454
|
+
const _default = Link;
|
|
455
|
+
if ((typeof exports$1.default === 'function' || typeof exports$1.default === 'object' && exports$1.default !== null) && typeof exports$1.default.__esModule === 'undefined') {
|
|
456
|
+
Object.defineProperty(exports$1.default, '__esModule', {
|
|
457
|
+
value: true
|
|
458
|
+
});
|
|
459
|
+
Object.assign(exports$1.default, exports$1);
|
|
460
|
+
module.exports = exports$1.default;
|
|
461
|
+
}
|
|
462
|
+
} (link, link.exports));
|
|
463
|
+
return link.exports;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
export { requireLink as __require };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { __module as normalizeLocalePath } from '../../../../_virtual/normalize-locale-path.js';
|
|
2
|
+
import { __require as requireNormalizeLocalePath$1 } from '../shared/lib/i18n/normalize-locale-path.js';
|
|
3
|
+
|
|
4
|
+
var hasRequiredNormalizeLocalePath;
|
|
5
|
+
|
|
6
|
+
function requireNormalizeLocalePath () {
|
|
7
|
+
if (hasRequiredNormalizeLocalePath) return normalizeLocalePath.exports;
|
|
8
|
+
hasRequiredNormalizeLocalePath = 1;
|
|
9
|
+
(function (module, exports$1) {
|
|
10
|
+
|
|
11
|
+
Object.defineProperty(exports$1, "__esModule", {
|
|
12
|
+
value: true
|
|
13
|
+
});
|
|
14
|
+
Object.defineProperty(exports$1, "normalizeLocalePath", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () {
|
|
17
|
+
return normalizeLocalePath;
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
const normalizeLocalePath = (pathname, locales) => {
|
|
21
|
+
if (process.env.__NEXT_I18N_SUPPORT) {
|
|
22
|
+
return requireNormalizeLocalePath$1().normalizeLocalePath(pathname, locales);
|
|
23
|
+
}
|
|
24
|
+
return {
|
|
25
|
+
pathname,
|
|
26
|
+
detectedLocale: undefined
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
if ((typeof exports$1.default === 'function' || typeof exports$1.default === 'object' && exports$1.default !== null) && typeof exports$1.default.__esModule === 'undefined') {
|
|
30
|
+
Object.defineProperty(exports$1.default, '__esModule', {
|
|
31
|
+
value: true
|
|
32
|
+
});
|
|
33
|
+
Object.assign(exports$1.default, exports$1);
|
|
34
|
+
module.exports = exports$1.default;
|
|
35
|
+
}
|
|
36
|
+
} (normalizeLocalePath, normalizeLocalePath.exports));
|
|
37
|
+
return normalizeLocalePath.exports;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export { requireNormalizeLocalePath as __require };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { __module as normalizeTrailingSlash } from '../../../../_virtual/normalize-trailing-slash.js';
|
|
2
|
+
import { __require as requireRemoveTrailingSlash } from '../shared/lib/router/utils/remove-trailing-slash.js';
|
|
3
|
+
import { __require as requireParsePath } from '../shared/lib/router/utils/parse-path.js';
|
|
4
|
+
|
|
5
|
+
var hasRequiredNormalizeTrailingSlash;
|
|
6
|
+
|
|
7
|
+
function requireNormalizeTrailingSlash () {
|
|
8
|
+
if (hasRequiredNormalizeTrailingSlash) return normalizeTrailingSlash.exports;
|
|
9
|
+
hasRequiredNormalizeTrailingSlash = 1;
|
|
10
|
+
(function (module, exports$1) {
|
|
11
|
+
|
|
12
|
+
Object.defineProperty(exports$1, "__esModule", {
|
|
13
|
+
value: true
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(exports$1, "normalizePathTrailingSlash", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () {
|
|
18
|
+
return normalizePathTrailingSlash;
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
const _removetrailingslash = requireRemoveTrailingSlash();
|
|
22
|
+
const _parsepath = requireParsePath();
|
|
23
|
+
const normalizePathTrailingSlash = path => {
|
|
24
|
+
if (!path.startsWith('/') || process.env.__NEXT_MANUAL_TRAILING_SLASH) {
|
|
25
|
+
return path;
|
|
26
|
+
}
|
|
27
|
+
const {
|
|
28
|
+
pathname,
|
|
29
|
+
query,
|
|
30
|
+
hash
|
|
31
|
+
} = (0, _parsepath.parsePath)(path);
|
|
32
|
+
if (process.env.__NEXT_TRAILING_SLASH) {
|
|
33
|
+
if (/\.[^/]+\/?$/.test(pathname)) {
|
|
34
|
+
return `${(0, _removetrailingslash.removeTrailingSlash)(pathname)}${query}${hash}`;
|
|
35
|
+
} else if (pathname.endsWith('/')) {
|
|
36
|
+
return `${pathname}${query}${hash}`;
|
|
37
|
+
} else {
|
|
38
|
+
return `${pathname}/${query}${hash}`;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return `${(0, _removetrailingslash.removeTrailingSlash)(pathname)}${query}${hash}`;
|
|
42
|
+
};
|
|
43
|
+
if ((typeof exports$1.default === 'function' || typeof exports$1.default === 'object' && exports$1.default !== null) && typeof exports$1.default.__esModule === 'undefined') {
|
|
44
|
+
Object.defineProperty(exports$1.default, '__esModule', {
|
|
45
|
+
value: true
|
|
46
|
+
});
|
|
47
|
+
Object.assign(exports$1.default, exports$1);
|
|
48
|
+
module.exports = exports$1.default;
|
|
49
|
+
}
|
|
50
|
+
} (normalizeTrailingSlash, normalizeTrailingSlash.exports));
|
|
51
|
+
return normalizeTrailingSlash.exports;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export { requireNormalizeTrailingSlash as __require };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { __module as requestIdleCallback } from '../../../../_virtual/request-idle-callback.js';
|
|
2
|
+
|
|
3
|
+
var hasRequiredRequestIdleCallback;
|
|
4
|
+
|
|
5
|
+
function requireRequestIdleCallback () {
|
|
6
|
+
if (hasRequiredRequestIdleCallback) return requestIdleCallback.exports;
|
|
7
|
+
hasRequiredRequestIdleCallback = 1;
|
|
8
|
+
(function (module, exports$1) {
|
|
9
|
+
|
|
10
|
+
Object.defineProperty(exports$1, "__esModule", {
|
|
11
|
+
value: true
|
|
12
|
+
});
|
|
13
|
+
function _export(target, all) {
|
|
14
|
+
for (var name in all) Object.defineProperty(target, name, {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: all[name]
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
_export(exports$1, {
|
|
20
|
+
cancelIdleCallback: function () {
|
|
21
|
+
return cancelIdleCallback;
|
|
22
|
+
},
|
|
23
|
+
requestIdleCallback: function () {
|
|
24
|
+
return requestIdleCallback;
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
const requestIdleCallback = typeof self !== 'undefined' && self.requestIdleCallback && self.requestIdleCallback.bind(window) || function (cb) {
|
|
28
|
+
let start = Date.now();
|
|
29
|
+
return self.setTimeout(function () {
|
|
30
|
+
cb({
|
|
31
|
+
didTimeout: false,
|
|
32
|
+
timeRemaining: function () {
|
|
33
|
+
return Math.max(0, 50 - (Date.now() - start));
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
}, 1);
|
|
37
|
+
};
|
|
38
|
+
const cancelIdleCallback = typeof self !== 'undefined' && self.cancelIdleCallback && self.cancelIdleCallback.bind(window) || function (id) {
|
|
39
|
+
return clearTimeout(id);
|
|
40
|
+
};
|
|
41
|
+
if ((typeof exports$1.default === 'function' || typeof exports$1.default === 'object' && exports$1.default !== null) && typeof exports$1.default.__esModule === 'undefined') {
|
|
42
|
+
Object.defineProperty(exports$1.default, '__esModule', {
|
|
43
|
+
value: true
|
|
44
|
+
});
|
|
45
|
+
Object.assign(exports$1.default, exports$1);
|
|
46
|
+
module.exports = exports$1.default;
|
|
47
|
+
}
|
|
48
|
+
} (requestIdleCallback, requestIdleCallback.exports));
|
|
49
|
+
return requestIdleCallback.exports;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export { requireRequestIdleCallback as __require };
|