{"version":3,"sources":["../../../../src/client/components/segment-cache/fetch.ts"],"sourcesContent":["import { getPreLockFetch } from './navigation-testing-lock'\n\n/**\n * Internal `fetch` used by the Next.js client router.\n *\n * When the Instant Navigation Testing API is enabled, the navigation lock may\n * install a blocking override on `window.fetch` for the duration of a lock\n * scope. To let internal fetches bypass the lock, callers go through a wrapper\n * that falls back to the pre-lock fetch captured at lock-acquire time.\n *\n * When the testing API is not enabled, this calls window.fetch directly.\n */\nfunction fetchInternal(\n  input: RequestInfo | URL,\n  init?: RequestInit\n): Promise<Response> {\n  if (process.env.__NEXT_EXPOSE_TESTING_API) {\n    const preLockFetch = getPreLockFetch()\n    if (preLockFetch !== null) {\n      return preLockFetch(input, init)\n    }\n  }\n  return fetch(input, init)\n}\n\nexport { fetchInternal as fetch }\n"],"names":["fetch","fetchInternal","input","init","process","env","__NEXT_EXPOSE_TESTING_API","preLockFetch","getPreLockFetch"],"mappings":";;;;+BAyB0BA;;;eAAjBC;;;uCAzBuB;AAEhC;;;;;;;;;CASC,GACD,SAASA,cACPC,KAAwB,EACxBC,IAAkB;IAElB,IAAIC,QAAQC,GAAG,CAACC,yBAAyB,EAAE;QACzC,MAAMC,eAAeC,IAAAA,sCAAe;QACpC,IAAID,iBAAiB,MAAM;YACzB,OAAOA,aAAaL,OAAOC;QAC7B;IACF;IACA,OAAOH,MAAME,OAAOC;AACtB","ignoreList":[0]}