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/get-domain-locale.js","webpack://_N_E/../../node_modules/next/dist/client/link.js","webpack://_N_E/../../node_modules/next/dist/client/use-intersection.js","webpack://_N_E/../../node_modules/next/link.js","webpack://_N_E/"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getDomainLocale = getDomainLocale;\nconst basePath = process.env.__NEXT_ROUTER_BASEPATH || '';\nfunction getDomainLocale(path, locale, locales, domainLocales) {\n if (process.env.__NEXT_I18N_SUPPORT) {\n const normalizeLocalePath = require('./normalize-locale-path').normalizeLocalePath;\n const detectDomainLocale = require('./detect-domain-locale').detectDomainLocale;\n const target = locale || normalizeLocalePath(path, locales).detectedLocale;\n const domain = detectDomainLocale(domainLocales, undefined, target);\n if (domain) {\n const proto = `http${domain.http ? '' : 's'}://`;\n const finalLocale = target === domain.defaultLocale ? '' : `/${target}`;\n return `${proto}${domain.domain}${basePath}${finalLocale}${path}`;\n }\n return false;\n } else {\n return false;\n }\n}\n\nif ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {\n Object.defineProperty(exports.default, '__esModule', { value: true });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n}\n\n//# sourceMappingURL=get-domain-locale.js.map","\"use client\";\n\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _interop_require_default = require(\"@swc/helpers/lib/_interop_require_default.js\").default;\nvar _object_without_properties_loose = require(\"@swc/helpers/lib/_object_without_properties_loose.js\").default;\nvar _react = _interop_require_default(require(\"react\"));\nvar _resolveHref = require(\"../shared/lib/router/utils/resolve-href\");\nvar _isLocalUrl = require(\"../shared/lib/router/utils/is-local-url\");\nvar _formatUrl = require(\"../shared/lib/router/utils/format-url\");\nvar _utils = require(\"../shared/lib/utils\");\nvar _addLocale = require(\"./add-locale\");\nvar _routerContext = require(\"../shared/lib/router-context\");\nvar _appRouterContext = require(\"../shared/lib/app-router-context\");\nvar _useIntersection = require(\"./use-intersection\");\nvar _getDomainLocale = require(\"./get-domain-locale\");\nvar _addBasePath = require(\"./add-base-path\");\n\nconst prefetched = new Set();\nfunction prefetch(router, href, as, options, isAppRouter) {\n if (typeof window === 'undefined') {\n return;\n }\n // app-router supports external urls out of the box so it shouldn't short-circuit here as support for e.g. `replace` is added in the app-router.\n if (!isAppRouter && !(0, _isLocalUrl).isLocalURL(href)) {\n return;\n }\n // We should only dedupe requests when experimental.optimisticClientCache is\n // disabled.\n if (!options.bypassPrefetchedCheck) {\n const locale = // Let the link's locale prop override the default router locale.\n typeof options.locale !== 'undefined' ? options.locale : 'locale' in router ? router.locale : undefined;\n const prefetchedKey = href + '%' + as + '%' + locale;\n // If we've already fetched the key, then don't prefetch it again!\n if (prefetched.has(prefetchedKey)) {\n return;\n }\n // Mark this URL as prefetched.\n prefetched.add(prefetchedKey);\n }\n // Prefetch the JSON page if asked (only in the client)\n // We need to handle a prefetch error here since we may be\n // loading with priority which can reject but we don't\n // want to force navigation since this is only a prefetch\n Promise.resolve(router.prefetch(href, as, options)).catch((err)=>{\n if (process.env.NODE_ENV !== 'production') {\n // rethrow to show invalid URL errors\n throw err;\n }\n });\n}\nfunction isModifiedEvent(event) {\n const eventTarget = event.currentTarget;\n const target = eventTarget.getAttribute('target');\n return target && target !== '_self' || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey || event.nativeEvent && event.nativeEvent.which === 2;\n}\nfunction linkClicked(e, router, href, as, replace, shallow, scroll, locale, isAppRouter, prefetchEnabled) {\n const { nodeName } = e.currentTarget;\n // anchors inside an svg have a lowercase nodeName\n const isAnchorNodeName = nodeName.toUpperCase() === 'A';\n if (isAnchorNodeName && (isModifiedEvent(e) || // app-router supports external urls out of the box so it shouldn't short-circuit here as support for e.g. `replace` is added in the app-router.\n (!isAppRouter && !(0, _isLocalUrl).isLocalURL(href)))) {\n // ignore click for browser’s default behavior\n return;\n }\n e.preventDefault();\n const navigate = ()=>{\n // If the router is an NextRouter instance it will have `beforePopState`\n if ('beforePopState' in router) {\n router[replace ? 'replace' : 'push'](href, as, {\n shallow,\n locale,\n scroll\n });\n } else {\n router[replace ? 'replace' : 'push'](as || href, {\n forceOptimisticNavigation: !prefetchEnabled\n });\n }\n };\n if (isAppRouter) {\n // @ts-expect-error startTransition exists.\n _react.default.startTransition(navigate);\n } else {\n navigate();\n }\n}\nfunction formatStringOrUrl(urlObjOrString) {\n if (typeof urlObjOrString === 'string') {\n return urlObjOrString;\n }\n return (0, _formatUrl).formatUrl(urlObjOrString);\n}\n/**\n * React Component that enables client-side transitions between routes.\n */ const Link = /*#__PURE__*/ _react.default.forwardRef(function LinkComponent(props, forwardedRef) {\n if (process.env.NODE_ENV !== 'production') {\n function createPropError(args) {\n return new Error(`Failed prop type: The prop \\`${args.key}\\` expects a ${args.expected} in \\`\\`, but got \\`${args.actual}\\` instead.` + (typeof window !== 'undefined' ? \"\\nOpen your browser's console to view the Component stack trace.\" : ''));\n }\n // TypeScript trick for type-guarding:\n const requiredPropsGuard = {\n href: true\n };\n const requiredProps = Object.keys(requiredPropsGuard);\n requiredProps.forEach((key)=>{\n if (key === 'href') {\n if (props[key] == null || typeof props[key] !== 'string' && typeof props[key] !== 'object') {\n throw createPropError({\n key,\n expected: '`string` or `object`',\n actual: props[key] === null ? 'null' : typeof props[key]\n });\n }\n } else {\n // TypeScript trick for type-guarding:\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const _ = key;\n }\n });\n // TypeScript trick for type-guarding:\n const optionalPropsGuard = {\n as: true,\n replace: true,\n scroll: true,\n shallow: true,\n passHref: true,\n prefetch: true,\n locale: true,\n onClick: true,\n onMouseEnter: true,\n onTouchStart: true,\n legacyBehavior: true\n };\n const optionalProps = Object.keys(optionalPropsGuard);\n optionalProps.forEach((key)=>{\n const valType = typeof props[key];\n if (key === 'as') {\n if (props[key] && valType !== 'string' && valType !== 'object') {\n throw createPropError({\n key,\n expected: '`string` or `object`',\n actual: valType\n });\n }\n } else if (key === 'locale') {\n if (props[key] && valType !== 'string') {\n throw createPropError({\n key,\n expected: '`string`',\n actual: valType\n });\n }\n } else if (key === 'onClick' || key === 'onMouseEnter' || key === 'onTouchStart') {\n if (props[key] && valType !== 'function') {\n throw createPropError({\n key,\n expected: '`function`',\n actual: valType\n });\n }\n } else if (key === 'replace' || key === 'scroll' || key === 'shallow' || key === 'passHref' || key === 'prefetch' || key === 'legacyBehavior') {\n if (props[key] != null && valType !== 'boolean') {\n throw createPropError({\n key,\n expected: '`boolean`',\n actual: valType\n });\n }\n } else {\n // TypeScript trick for type-guarding:\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const _ = key;\n }\n });\n // This hook is in a conditional but that is ok because `process.env.NODE_ENV` never changes\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const hasWarned = _react.default.useRef(false);\n if (props.prefetch && !hasWarned.current) {\n hasWarned.current = true;\n console.warn('Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://nextjs.org/docs/messages/prefetch-true-deprecated');\n }\n }\n let children;\n const { href: hrefProp , as: asProp , children: childrenProp , prefetch: prefetchProp , passHref , replace , shallow , scroll , locale , onClick , onMouseEnter: onMouseEnterProp , onTouchStart: onTouchStartProp , // @ts-expect-error this is inlined as a literal boolean not a string\n legacyBehavior =process.env.__NEXT_NEW_LINK_BEHAVIOR === false } = props, restProps = _object_without_properties_loose(props, [\n \"href\",\n \"as\",\n \"children\",\n \"prefetch\",\n \"passHref\",\n \"replace\",\n \"shallow\",\n \"scroll\",\n \"locale\",\n \"onClick\",\n \"onMouseEnter\",\n \"onTouchStart\",\n \"legacyBehavior\"\n ]);\n children = childrenProp;\n if (legacyBehavior && (typeof children === 'string' || typeof children === 'number')) {\n children = /*#__PURE__*/ _react.default.createElement(\"a\", null, children);\n }\n const prefetchEnabled = prefetchProp !== false;\n const pagesRouter = _react.default.useContext(_routerContext.RouterContext);\n const appRouter = _react.default.useContext(_appRouterContext.AppRouterContext);\n const router = pagesRouter != null ? pagesRouter : appRouter;\n // We're in the app directory if there is no pages router.\n const isAppRouter = !pagesRouter;\n if (process.env.NODE_ENV !== 'production') {\n if (isAppRouter && !asProp) {\n let href;\n if (typeof hrefProp === 'string') {\n href = hrefProp;\n } else if (typeof hrefProp === 'object' && typeof hrefProp.pathname === 'string') {\n href = hrefProp.pathname;\n }\n if (href) {\n const hasDynamicSegment = href.split('/').some((segment)=>segment.startsWith('[') && segment.endsWith(']'));\n if (hasDynamicSegment) {\n throw new Error(`Dynamic href \\`${href}\\` found in while using the \\`/app\\` router, this is not supported. Read more: https://nextjs.org/docs/messages/app-dir-dynamic-href`);\n }\n }\n }\n }\n const { href , as } = _react.default.useMemo(()=>{\n if (!pagesRouter) {\n const resolvedHref = formatStringOrUrl(hrefProp);\n return {\n href: resolvedHref,\n as: asProp ? formatStringOrUrl(asProp) : resolvedHref\n };\n }\n const [resolvedHref, resolvedAs] = (0, _resolveHref).resolveHref(pagesRouter, hrefProp, true);\n return {\n href: resolvedHref,\n as: asProp ? (0, _resolveHref).resolveHref(pagesRouter, asProp) : resolvedAs || resolvedHref\n };\n }, [\n pagesRouter,\n hrefProp,\n asProp\n ]);\n const previousHref = _react.default.useRef(href);\n const previousAs = _react.default.useRef(as);\n // This will return the first child, if multiple are provided it will throw an error\n let child;\n if (legacyBehavior) {\n if (process.env.NODE_ENV === 'development') {\n if (onClick) {\n console.warn(`\"onClick\" was passed to with \\`href\\` of \\`${hrefProp}\\` but \"legacyBehavior\" was set. The legacy behavior requires onClick be set on the child of next/link`);\n }\n if (onMouseEnterProp) {\n console.warn(`\"onMouseEnter\" was passed to with \\`href\\` of \\`${hrefProp}\\` but \"legacyBehavior\" was set. The legacy behavior requires onMouseEnter be set on the child of next/link`);\n }\n try {\n child = _react.default.Children.only(children);\n } catch (err) {\n if (!children) {\n throw new Error(`No children were passed to with \\`href\\` of \\`${hrefProp}\\` but one child is required https://nextjs.org/docs/messages/link-no-children`);\n }\n throw new Error(`Multiple children were passed to 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.\" : ''));\n }\n } else {\n child = _react.default.Children.only(children);\n }\n } else {\n if (process.env.NODE_ENV === 'development') {\n var ref;\n if (((ref = children) == null ? void 0 : ref.type) === 'a') {\n throw new Error('Invalid with child. Please remove or use .\\nLearn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor');\n }\n }\n }\n const childRef = legacyBehavior ? child && typeof child === 'object' && child.ref : forwardedRef;\n const [setIntersectionRef, isVisible, resetVisible] = (0, _useIntersection).useIntersection({\n rootMargin: '200px'\n });\n const setRef = _react.default.useCallback((el)=>{\n // Before the link getting observed, check if visible state need to be reset\n if (previousAs.current !== as || previousHref.current !== href) {\n resetVisible();\n previousAs.current = as;\n previousHref.current = href;\n }\n setIntersectionRef(el);\n if (childRef) {\n if (typeof childRef === 'function') childRef(el);\n else if (typeof childRef === 'object') {\n childRef.current = el;\n }\n }\n }, [\n as,\n childRef,\n href,\n resetVisible,\n setIntersectionRef\n ]);\n // Prefetch the URL if we haven't already and it's visible.\n _react.default.useEffect(()=>{\n // in dev, we only prefetch on hover to avoid wasting resources as the prefetch will trigger compiling the page.\n if (process.env.NODE_ENV !== 'production') {\n return;\n }\n if (!router) {\n return;\n }\n // If we don't need to prefetch the URL, don't do prefetch.\n if (!isVisible || !prefetchEnabled) {\n return;\n }\n // Prefetch the URL.\n prefetch(router, href, as, {\n locale\n }, isAppRouter);\n }, [\n as,\n href,\n isVisible,\n locale,\n prefetchEnabled,\n pagesRouter == null ? void 0 : pagesRouter.locale,\n router,\n isAppRouter, \n ]);\n const childProps = {\n ref: setRef,\n onClick (e) {\n if (process.env.NODE_ENV !== 'production') {\n if (!e) {\n throw new Error(`Component rendered inside next/link has to pass click event to \"onClick\" prop.`);\n }\n }\n if (!legacyBehavior && typeof onClick === 'function') {\n onClick(e);\n }\n if (legacyBehavior && child.props && typeof child.props.onClick === 'function') {\n child.props.onClick(e);\n }\n if (!router) {\n return;\n }\n if (e.defaultPrevented) {\n return;\n }\n linkClicked(e, router, href, as, replace, shallow, scroll, locale, isAppRouter, prefetchEnabled);\n },\n onMouseEnter (e) {\n if (!legacyBehavior && typeof onMouseEnterProp === 'function') {\n onMouseEnterProp(e);\n }\n if (legacyBehavior && child.props && typeof child.props.onMouseEnter === 'function') {\n child.props.onMouseEnter(e);\n }\n if (!router) {\n return;\n }\n if (!prefetchEnabled && isAppRouter) {\n return;\n }\n prefetch(router, href, as, {\n locale,\n priority: true,\n // @see {https://github.com/vercel/next.js/discussions/40268?sort=top#discussioncomment-3572642}\n bypassPrefetchedCheck: true\n }, isAppRouter);\n },\n onTouchStart (e) {\n if (!legacyBehavior && typeof onTouchStartProp === 'function') {\n onTouchStartProp(e);\n }\n if (legacyBehavior && child.props && typeof child.props.onTouchStart === 'function') {\n child.props.onTouchStart(e);\n }\n if (!router) {\n return;\n }\n if (!prefetchEnabled && isAppRouter) {\n return;\n }\n prefetch(router, href, as, {\n locale,\n priority: true,\n // @see {https://github.com/vercel/next.js/discussions/40268?sort=top#discussioncomment-3572642}\n bypassPrefetchedCheck: true\n }, isAppRouter);\n }\n };\n // If child is an tag and doesn't have a href attribute, or if the 'passHref' property is\n // defined, we specify the current 'href', so that repetition is not needed by the user.\n // If the url is absolute, we can bypass the logic to prepend the domain and locale.\n if ((0, _utils).isAbsoluteUrl(as)) {\n childProps.href = as;\n } else if (!legacyBehavior || passHref || child.type === 'a' && !('href' in child.props)) {\n const curLocale = typeof locale !== 'undefined' ? locale : pagesRouter == null ? void 0 : pagesRouter.locale;\n // we only render domain locales if we are currently on a domain locale\n // so that locale links are still visitable in development/preview envs\n const localeDomain = (pagesRouter == null ? void 0 : pagesRouter.isLocaleDomain) && (0, _getDomainLocale).getDomainLocale(as, curLocale, pagesRouter == null ? void 0 : pagesRouter.locales, pagesRouter == null ? void 0 : pagesRouter.domainLocales);\n childProps.href = localeDomain || (0, _addBasePath).addBasePath((0, _addLocale).addLocale(as, curLocale, pagesRouter == null ? void 0 : pagesRouter.defaultLocale));\n }\n return legacyBehavior ? /*#__PURE__*/ _react.default.cloneElement(child, childProps) : /*#__PURE__*/ _react.default.createElement(\"a\", Object.assign({}, restProps, childProps), children);\n});\nvar _default = Link;\nexports.default = _default;\n\nif ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {\n Object.defineProperty(exports.default, '__esModule', { value: true });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n}\n\n//# sourceMappingURL=link.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.useIntersection = useIntersection;\nvar _react = require(\"react\");\nvar _requestIdleCallback = require(\"./request-idle-callback\");\nconst hasIntersectionObserver = typeof IntersectionObserver === 'function';\nconst observers = new Map();\nconst idList = [];\nfunction createObserver(options) {\n const id = {\n root: options.root || null,\n margin: options.rootMargin || ''\n };\n const existing = idList.find((obj)=>obj.root === id.root && obj.margin === id.margin);\n let instance;\n if (existing) {\n instance = observers.get(existing);\n if (instance) {\n return instance;\n }\n }\n const elements = new Map();\n const observer = new IntersectionObserver((entries)=>{\n entries.forEach((entry)=>{\n const callback = elements.get(entry.target);\n const isVisible = entry.isIntersecting || entry.intersectionRatio > 0;\n if (callback && isVisible) {\n callback(isVisible);\n }\n });\n }, options);\n instance = {\n id,\n observer,\n elements\n };\n idList.push(id);\n observers.set(id, instance);\n return instance;\n}\nfunction observe(element, callback, options) {\n const { id , observer , elements } = createObserver(options);\n elements.set(element, callback);\n observer.observe(element);\n return function unobserve() {\n elements.delete(element);\n observer.unobserve(element);\n // Destroy observer when there's nothing left to watch:\n if (elements.size === 0) {\n observer.disconnect();\n observers.delete(id);\n const index = idList.findIndex((obj)=>obj.root === id.root && obj.margin === id.margin);\n if (index > -1) {\n idList.splice(index, 1);\n }\n }\n };\n}\nfunction useIntersection({ rootRef , rootMargin , disabled }) {\n const isDisabled = disabled || !hasIntersectionObserver;\n const [visible, setVisible] = (0, _react).useState(false);\n const elementRef = (0, _react).useRef(null);\n const setElement = (0, _react).useCallback((element)=>{\n elementRef.current = element;\n }, []);\n (0, _react).useEffect(()=>{\n if (hasIntersectionObserver) {\n if (isDisabled || visible) return;\n const element = elementRef.current;\n if (element && element.tagName) {\n const unobserve = observe(element, (isVisible)=>isVisible && setVisible(isVisible), {\n root: rootRef == null ? void 0 : rootRef.current,\n rootMargin\n });\n return unobserve;\n }\n } else {\n if (!visible) {\n const idleCallback = (0, _requestIdleCallback).requestIdleCallback(()=>setVisible(true));\n return ()=>(0, _requestIdleCallback).cancelIdleCallback(idleCallback);\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n isDisabled,\n rootMargin,\n rootRef,\n visible,\n elementRef.current\n ]);\n const resetVisible = (0, _react).useCallback(()=>{\n setVisible(false);\n }, []);\n return [\n setElement,\n visible,\n resetVisible\n ];\n}\n\nif ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {\n Object.defineProperty(exports.default, '__esModule', { value: true });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n}\n\n//# sourceMappingURL=use-intersection.js.map","module.exports = require('./dist/client/link')\n"],"names":["Object","value","exports","path","locale","locales","domainLocales","default","__esModule","defineProperty","assign","module","_interop_require_default","require","_object_without_properties_loose","_react","_resolveHref","_isLocalUrl","_formatUrl","_utils","_addLocale","_routerContext","_appRouterContext","_useIntersection","_getDomainLocale","_addBasePath","prefetched","Set","prefetch","router","href","as","options","isAppRouter","isLocalURL","bypassPrefetchedCheck","undefined","prefetchedKey","has","add","resolve","catch","formatStringOrUrl","urlObjOrString","formatUrl","Link","forwardRef","props","forwardedRef","children","child","hrefProp","asProp","childrenProp","prefetchProp","passHref","replace","shallow","scroll","onClick","onMouseEnter","onMouseEnterProp","onTouchStart","onTouchStartProp","legacyBehavior","process","restProps","createElement","prefetchEnabled","pagesRouter","useContext","RouterContext","appRouter","AppRouterContext","useMemo","resolvedHref","resolvedAs","resolveHref","previousHref","useRef","previousAs","Children","only","childRef","ref","setIntersectionRef","isVisible","resetVisible","useIntersection","rootMargin","setRef","useCallback","current","el","useEffect","childProps","e","defaultPrevented","linkClicked","nodeName","currentTarget","isAnchorNodeName","toUpperCase","isModifiedEvent","event","eventTarget","target","getAttribute","metaKey","ctrlKey","shiftKey","altKey","nativeEvent","which","preventDefault","navigate","forceOptimisticNavigation","startTransition","priority","isAbsoluteUrl","type","curLocale","localeDomain","isLocaleDomain","getDomainLocale","addBasePath","addLocale","defaultLocale","cloneElement","param","rootRef","disabled","isDisabled","hasIntersectionObserver","visible","setVisible","useState","elementRef","setElement","element","tagName","unobserve","observe","callback","id","observer","elements","createObserver","instance","root","margin","existing","idList","find","obj","observers","get","Map","IntersectionObserver","entries","forEach","entry","isIntersecting","intersectionRatio","push","set","delete","size","disconnect","index","findIndex","splice","idleCallback","requestIdleCallback","cancelIdleCallback","_requestIdleCallback","__webpack_require__"],"sourceRoot":""}