/home/techb158/balavpn.abdallabala.com/node_modules/next/dist/client/components
NameSizeModeActions
builtin/-0777rm
errors/-0777rm
http-access-fallback/-0777rm
metadata/-0777rm
router-reducer/-0777rm
segment-cache-impl/-0777rm
styles/-0777rm
app-router-announcer.d.ts1960666editdlrm
app-router-announcer.js33520666editdlrm
app-router-announcer.js.map46780666editdlrm
app-router-headers.d.ts12430666editdlrm
app-router-headers.js37970666editdlrm
app-router-headers.js.map31100666editdlrm
app-router-instance.d.ts20810666editdlrm
app-router-instance.js144320666editdlrm
app-router-instance.js.map211790666editdlrm
app-router.d.ts9320666editdlrm
app-router.js249870666editdlrm
app-router.js.map348630666editdlrm
bailout-to-client-rendering.d.ts800666editdlrm
bailout-to-client-rendering.js18770666editdlrm
bailout-to-client-rendering.js.map16650666editdlrm
bfcache.d.ts13970666editdlrm
bfcache.js40350666editdlrm
bfcache.js.map63760666editdlrm
client-page.d.ts8760666editdlrm
client-page.js26030666editdlrm
client-page.js.map39070666editdlrm
client-segment.d.ts8420666editdlrm
client-segment.js21920666editdlrm
client-segment.js.map30870666editdlrm
dev-root-http-access-fallback-boundary.d.ts2300666editdlrm
dev-root-http-access-fallback-boundary.js18620666editdlrm
dev-root-http-access-fallback-boundary.js.map12900666editdlrm
error-boundary.d.ts15660666editdlrm
error-boundary.js54990666editdlrm
error-boundary.js.map74090666editdlrm
forbidden.d.ts440666editdlrm
forbidden.js20770666editdlrm
forbidden.js.map19860666editdlrm
handle-isr-error.d.ts780666editdlrm
handle-isr-error.js10850666editdlrm
handle-isr-error.js.map12950666editdlrm
hooks-server-context.d.ts3260666editdlrm
hooks-server-context.js13520666editdlrm
hooks-server-context.js.map11820666editdlrm
is-next-router-error.d.ts4310666editdlrm
is-next-router-error.js8860666editdlrm
is-next-router-error.js.map8990666editdlrm
layout-router.d.ts9990666editdlrm
layout-router.js279470666editdlrm
layout-router.js.map377010666editdlrm
links.d.ts22410666editdlrm
links.js140530666editdlrm
links.js.map210560666editdlrm
match-segments.d.ts1540666editdlrm
match-segments.js10540666editdlrm
match-segments.js.map10450666editdlrm
nav-failure-handler.d.ts1230666editdlrm
nav-failure-handler.js24920666editdlrm
nav-failure-handler.js.map28680666editdlrm
navigation-untracked.d.ts110666editdlrm
navigation-untracked.js26070666editdlrm
navigation-untracked.js.map33490666editdlrm
navigation.d.ts46350666editdlrm
navigation.js79420666editdlrm
navigation.js.map127130666editdlrm
navigation.react-server.d.ts12380666editdlrm
navigation.react-server.js35010666editdlrm
navigation.react-server.js.map28380666editdlrm
noop-head.d.ts420666editdlrm
noop-head.js6070666editdlrm
noop-head.js.map2490666editdlrm
not-found.d.ts430666editdlrm
not-found.js18880666editdlrm
not-found.js.map17500666editdlrm
promise-queue.d.ts1920666editdlrm
promise-queue.js42740666editdlrm
promise-queue.js.map36070666editdlrm
redirect-boundary.d.ts7760666editdlrm
redirect-boundary.js32700666editdlrm
redirect-boundary.js.map39750666editdlrm
redirect-error.d.ts6330666editdlrm
redirect-error.js18190666editdlrm
redirect-error.js.map21240666editdlrm
redirect-status-code.d.ts1200666editdlrm
redirect-status-code.js9670666editdlrm
redirect-status-code.js.map3300666editdlrm
redirect.d.ts24690666editdlrm
redirect.js37460666editdlrm
redirect.js.map59190666editdlrm
render-from-template-context.d.ts1000666editdlrm
render-from-template-context.js11700666editdlrm
render-from-template-context.js.map6450666editdlrm
segment-cache.d.ts34980666editdlrm
segment-cache.js76110666editdlrm
segment-cache.js.map89460666editdlrm
static-generation-bailout.d.ts2050666editdlrm
static-generation-bailout.js13020666editdlrm
static-generation-bailout.js.map9260666editdlrm
unauthorized.d.ts470666editdlrm
unauthorized.js21100666editdlrm
unauthorized.js.map20180666editdlrm
unrecognized-action-error.d.ts7900666editdlrm
unrecognized-action-error.js12440666editdlrm
unrecognized-action-error.js.map15020666editdlrm
unresolved-thenable.d.ts1830666editdlrm
unresolved-thenable.js7690666editdlrm
unresolved-thenable.js.map4500666editdlrm
unstable-rethrow.browser.d.ts640666editdlrm
unstable-rethrow.browser.js10110666editdlrm
unstable-rethrow.browser.js.map8320666editdlrm
unstable-rethrow.d.ts5910666editdlrm
unstable-rethrow.js12500666editdlrm
unstable-rethrow.js.map11220666editdlrm
unstable-rethrow.server.d.ts640666editdlrm
unstable-rethrow.server.js15210666editdlrm
unstable-rethrow.server.js.map15050666editdlrm
use-action-queue.d.ts3300666editdlrm
use-action-queue.js29030666editdlrm
use-action-queue.js.map33000666editdlrm
Edit: /home/techb158/balavpn.abdallabala.com/node_modules/next/dist/client/components/links.js (14053B)
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { IDLE_LINK_STATUS: null, PENDING_LINK_STATUS: null, mountFormInstance: null, mountLinkInstance: null, onLinkVisibilityChanged: null, onNavigationIntent: null, pingVisibleLinks: null, setLinkForCurrentNavigation: null, unmountLinkForCurrentNavigation: null, unmountPrefetchableInstance: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { IDLE_LINK_STATUS: function() { return IDLE_LINK_STATUS; }, PENDING_LINK_STATUS: function() { return PENDING_LINK_STATUS; }, mountFormInstance: function() { return mountFormInstance; }, mountLinkInstance: function() { return mountLinkInstance; }, onLinkVisibilityChanged: function() { return onLinkVisibilityChanged; }, onNavigationIntent: function() { return onNavigationIntent; }, pingVisibleLinks: function() { return pingVisibleLinks; }, setLinkForCurrentNavigation: function() { return setLinkForCurrentNavigation; }, unmountLinkForCurrentNavigation: function() { return unmountLinkForCurrentNavigation; }, unmountPrefetchableInstance: function() { return unmountPrefetchableInstance; } }); const _approuterinstance = require("./app-router-instance"); const _approuter = require("./app-router"); const _segmentcache = require("./segment-cache"); const _react = require("react"); const _routerreducertypes = require("./router-reducer/router-reducer-types"); const _invarianterror = require("../../shared/lib/invariant-error"); // Tracks the most recently navigated link instance. When null, indicates // the current navigation was not initiated by a link click. let linkForMostRecentNavigation = null; const PENDING_LINK_STATUS = { pending: true }; const IDLE_LINK_STATUS = { pending: false }; function setLinkForCurrentNavigation(link) { (0, _react.startTransition)(()=>{ linkForMostRecentNavigation == null ? void 0 : linkForMostRecentNavigation.setOptimisticLinkStatus(IDLE_LINK_STATUS); link == null ? void 0 : link.setOptimisticLinkStatus(PENDING_LINK_STATUS); linkForMostRecentNavigation = link; }); } function unmountLinkForCurrentNavigation(link) { if (linkForMostRecentNavigation === link) { linkForMostRecentNavigation = null; } } // Use a WeakMap to associate a Link instance with its DOM element. This is // used by the IntersectionObserver to track the link's visibility. const prefetchable = typeof WeakMap === 'function' ? new WeakMap() : new Map(); // A Set of the currently visible links. We re-prefetch visible links after a // cache invalidation, or when the current URL changes. It's a separate data // structure from the WeakMap above because only the visible links need to // be enumerated. const prefetchableAndVisible = new Set(); // A single IntersectionObserver instance shared by all components. const observer = typeof IntersectionObserver === 'function' ? new IntersectionObserver(handleIntersect, { rootMargin: '200px' }) : null; function observeVisibility(element, instance) { const existingInstance = prefetchable.get(element); if (existingInstance !== undefined) { // This shouldn't happen because each component should have its own // anchor tag instance, but it's defensive coding to avoid a memory leak in // case there's a logical error somewhere else. unmountPrefetchableInstance(element); } // Only track prefetchable links that have a valid prefetch URL prefetchable.set(element, instance); if (observer !== null) { observer.observe(element); } } function coercePrefetchableUrl(href) { try { return (0, _approuter.createPrefetchURL)(href); } catch (e) { // createPrefetchURL sometimes throws an error if an invalid URL is // provided, though I'm not sure if it's actually necessary. // TODO: Consider removing the throw from the inner function, or change it // to reportError. Or maybe the error isn't even necessary for automatic // prefetches, just navigations. const reportErrorFn = typeof reportError === 'function' ? reportError : console.error; reportErrorFn("Cannot prefetch '" + href + "' because it cannot be converted to a URL."); return null; } } function mountLinkInstance(element, href, router, fetchStrategy, prefetchEnabled, setOptimisticLinkStatus) { if (prefetchEnabled) { const prefetchURL = coercePrefetchableUrl(href); if (prefetchURL !== null) { const instance = { router, fetchStrategy, isVisible: false, prefetchTask: null, prefetchHref: prefetchURL.href, setOptimisticLinkStatus }; // We only observe the link's visibility if it's prefetchable. For // example, this excludes links to external URLs. observeVisibility(element, instance); return instance; } } // If the link is not prefetchable, we still create an instance so we can // track its optimistic state (i.e. useLinkStatus). const instance = { router, fetchStrategy, isVisible: false, prefetchTask: null, prefetchHref: null, setOptimisticLinkStatus }; return instance; } function mountFormInstance(element, href, router, fetchStrategy) { const prefetchURL = coercePrefetchableUrl(href); if (prefetchURL === null) { // This href is not prefetchable, so we don't track it. // TODO: We currently observe/unobserve a form every time its href changes. // For Links, this isn't a big deal because the href doesn't usually change, // but for forms it's extremely common. We should optimize this. return; } const instance = { router, fetchStrategy, isVisible: false, prefetchTask: null, prefetchHref: prefetchURL.href, setOptimisticLinkStatus: null }; observeVisibility(element, instance); } function unmountPrefetchableInstance(element) { const instance = prefetchable.get(element); if (instance !== undefined) { prefetchable.delete(element); prefetchableAndVisible.delete(instance); const prefetchTask = instance.prefetchTask; if (prefetchTask !== null) { (0, _segmentcache.cancelPrefetchTask)(prefetchTask); } } if (observer !== null) { observer.unobserve(element); } } function handleIntersect(entries) { for (const entry of entries){ // Some extremely old browsers or polyfills don't reliably support // isIntersecting so we check intersectionRatio instead. (Do we care? Not // really. But whatever this is fine.) const isVisible = entry.intersectionRatio > 0; onLinkVisibilityChanged(entry.target, isVisible); } } function onLinkVisibilityChanged(element, isVisible) { if (process.env.NODE_ENV !== 'production') { // Prefetching on viewport is disabled in development for performance // reasons, because it requires compiling the target page. // TODO: Investigate re-enabling this. return; } const instance = prefetchable.get(element); if (instance === undefined) { return; } instance.isVisible = isVisible; if (isVisible) { prefetchableAndVisible.add(instance); } else { prefetchableAndVisible.delete(instance); } rescheduleLinkPrefetch(instance, _segmentcache.PrefetchPriority.Default); } function onNavigationIntent(element, unstable_upgradeToDynamicPrefetch) { const instance = prefetchable.get(element); if (instance === undefined) { return; } // Prefetch the link on hover/touchstart. if (instance !== undefined) { if (process.env.__NEXT_DYNAMIC_ON_HOVER && unstable_upgradeToDynamicPrefetch) { // Switch to a full prefetch instance.fetchStrategy = _segmentcache.FetchStrategy.Full; } rescheduleLinkPrefetch(instance, _segmentcache.PrefetchPriority.Intent); } } function rescheduleLinkPrefetch(instance, priority) { const existingPrefetchTask = instance.prefetchTask; if (!instance.isVisible) { // Cancel any in-progress prefetch task. (If it already finished then this // is a no-op.) if (existingPrefetchTask !== null) { (0, _segmentcache.cancelPrefetchTask)(existingPrefetchTask); } // We don't need to reset the prefetchTask to null upon cancellation; an // old task object can be rescheduled with reschedulePrefetchTask. This is a // micro-optimization but also makes the code simpler (don't need to // worry about whether an old task object is stale). return; } if (!process.env.__NEXT_CLIENT_SEGMENT_CACHE) { // The old prefetch implementation does not have different priority levels. // Just schedule a new prefetch task. prefetchWithOldCacheImplementation(instance); return; } const appRouterState = (0, _approuterinstance.getCurrentAppRouterState)(); if (appRouterState !== null) { const treeAtTimeOfPrefetch = appRouterState.tree; if (existingPrefetchTask === null) { // Initiate a prefetch task. const nextUrl = appRouterState.nextUrl; const cacheKey = (0, _segmentcache.createCacheKey)(instance.prefetchHref, nextUrl); instance.prefetchTask = (0, _segmentcache.schedulePrefetchTask)(cacheKey, treeAtTimeOfPrefetch, instance.fetchStrategy, priority, null); } else { // We already have an old task object that we can reschedule. This is // effectively the same as canceling the old task and creating a new one. (0, _segmentcache.reschedulePrefetchTask)(existingPrefetchTask, treeAtTimeOfPrefetch, instance.fetchStrategy, priority); } } } function pingVisibleLinks(nextUrl, tree) { // For each currently visible link, cancel the existing prefetch task (if it // exists) and schedule a new one. This is effectively the same as if all the // visible links left and then re-entered the viewport. // // This is called when the Next-Url or the base tree changes, since those // may affect the result of a prefetch task. It's also called after a // cache invalidation. for (const instance of prefetchableAndVisible){ const task = instance.prefetchTask; if (task !== null && !(0, _segmentcache.isPrefetchTaskDirty)(task, nextUrl, tree)) { continue; } // Something changed. Cancel the existing prefetch task and schedule a // new one. if (task !== null) { (0, _segmentcache.cancelPrefetchTask)(task); } const cacheKey = (0, _segmentcache.createCacheKey)(instance.prefetchHref, nextUrl); instance.prefetchTask = (0, _segmentcache.schedulePrefetchTask)(cacheKey, tree, instance.fetchStrategy, _segmentcache.PrefetchPriority.Default, null); } } function prefetchWithOldCacheImplementation(instance) { // This is the path used when the Segment Cache is not enabled. if (typeof window === 'undefined') { return; } const doPrefetch = async ()=>{ // note that `appRouter.prefetch()` is currently sync, // so we have to wrap this call in an async function to be able to catch() errors below. let prefetchKind; switch(instance.fetchStrategy){ case _segmentcache.FetchStrategy.PPR: { prefetchKind = _routerreducertypes.PrefetchKind.AUTO; break; } case _segmentcache.FetchStrategy.Full: { prefetchKind = _routerreducertypes.PrefetchKind.FULL; break; } case _segmentcache.FetchStrategy.PPRRuntime: { // We can only get here if Client Segment Cache is off, and in that case // it shouldn't be possible for a link to request a runtime prefetch. throw Object.defineProperty(new _invarianterror.InvariantError('FetchStrategy.PPRRuntime should never be used when `experimental.clientSegmentCache` is disabled'), "__NEXT_ERROR_CODE", { value: "E772", enumerable: false, configurable: true }); } default: { instance.fetchStrategy; // Unreachable, but otherwise typescript will consider the variable unassigned prefetchKind = undefined; } } return instance.router.prefetch(instance.prefetchHref, { kind: prefetchKind }); }; // Prefetch the page if asked (only in the client) // We need to handle a prefetch error here since we may be // loading with priority which can reject but we don't // want to force navigation since this is only a prefetch doPrefetch().catch((err)=>{ if (process.env.NODE_ENV !== 'production') { // rethrow to show invalid URL errors throw err; } }); } if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') { Object.defineProperty(exports.default, '__esModule', { value: true }); Object.assign(exports.default, exports); module.exports = exports.default; } //# sourceMappingURL=links.js.map