/opt/canhelp/node_modules/next/dist/esm/shared/lib/router/utils
NameSizeModeActions
add-locale.js10200644editdlrm
add-locale.js.map17200644editdlrm
add-path-prefix.js4320644editdlrm
add-path-prefix.js.map8880644editdlrm
add-path-suffix.js4900644editdlrm
add-path-suffix.js.map9480644editdlrm
app-paths.js17680644editdlrm
app-paths.js.map27220644editdlrm
as-path-to-search-params.js2620644editdlrm
as-path-to-search-params.js.map5490644editdlrm
cache-busting-search-param.js5800644editdlrm
cache-busting-search-param.js.map13070644editdlrm
compare-states.js8500644editdlrm
compare-states.js.map19140644editdlrm
disable-smooth-scroll.js23760644editdlrm
disable-smooth-scroll.js.map36260644editdlrm
escape-path-delimiters.js3070644editdlrm
escape-path-delimiters.js.map7370644editdlrm
format-next-pathname-info.js9080644editdlrm
format-next-pathname-info.js.map20790644editdlrm
format-url.js32690644editdlrm
format-url.js.map56970644editdlrm
get-asset-path-from-route.js4370644editdlrm
get-asset-path-from-route.js.map8300644editdlrm
get-dynamic-param.js53080644editdlrm
get-dynamic-param.js.map74360644editdlrm
get-next-pathname-info.js21580644editdlrm
get-next-pathname-info.js.map51770644editdlrm
get-route-from-asset-path.js7160644editdlrm
get-route-from-asset-path.js.map13160644editdlrm
html-bots.js9090644editdlrm
html-bots.js.map11360644editdlrm
index.js1550644editdlrm
index.js.map3890644editdlrm
interception-routes.js37080644editdlrm
interception-routes.js.map50160644editdlrm
interpolate-as.js20000644editdlrm
interpolate-as.js.map38050644editdlrm
is-bot.js11000644editdlrm
is-bot.js.map19470644editdlrm
is-dynamic.js8840644editdlrm
is-dynamic.js.map15040644editdlrm
is-local-url.js7220644editdlrm
is-local-url.js.map12820644editdlrm
middleware-route-matcher.js6780644editdlrm
middleware-route-matcher.js.map17550644editdlrm
omit.js2500644editdlrm
omit.js.map7610644editdlrm
parse-path.js8410644editdlrm
parse-path.js.map14950644editdlrm
parse-relative-url.js12510644editdlrm
parse-relative-url.js.map30150644editdlrm
parse-url.js7220644editdlrm
parse-url.js.map18500644editdlrm
path-has-prefix.js5950644editdlrm
path-has-prefix.js.map10020644editdlrm
path-match.js19700644editdlrm
path-match.js.map37910644editdlrm
prepare-destination.js98280644editdlrm
prepare-destination.js.map171430644editdlrm
querystring.js17030644editdlrm
querystring.js.map32240644editdlrm
relativize-url.js8510644editdlrm
relativize-url.js.map18390644editdlrm
remove-path-prefix.js13340644editdlrm
remove-path-prefix.js.map20090644editdlrm
remove-trailing-slash.js3320644editdlrm
remove-trailing-slash.js.map5830644editdlrm
resolve-rewrites.js42400644editdlrm
resolve-rewrites.js.map78050644editdlrm
route-match-utils.js33610644editdlrm
route-match-utils.js.map56600644editdlrm
route-matcher.js12710644editdlrm
route-matcher.js.map25670644editdlrm
route-regex.js93150644editdlrm
route-regex.js.map175260644editdlrm
sortable-routes.js85020644editdlrm
sortable-routes.js.map125360644editdlrm
sorted-routes.js113320644editdlrm
sorted-routes.js.map147570644editdlrm
Edit: /opt/canhelp/node_modules/next/dist/esm/shared/lib/router/utils/disable-smooth-scroll.js.map (3626B)
{"version":3,"sources":["../../../../../src/shared/lib/router/utils/disable-smooth-scroll.ts"],"sourcesContent":["import { warnOnce } from '../../utils/warn-once'\n\n/**\n * Run function with `scroll-behavior: auto` applied to ``.\n * This css change will be reverted after the function finishes.\n */\nexport function disableSmoothScrollDuringRouteTransition(\n fn: () => void,\n options: { dontForceLayout?: boolean; onlyHashChange?: boolean } = {}\n) {\n // if only the hash is changed, we don't need to disable smooth scrolling\n // we only care to prevent smooth scrolling when navigating to a new page to avoid jarring UX\n if (options.onlyHashChange) {\n fn()\n return\n }\n\n const htmlElement = document.documentElement\n const hasDataAttribute = htmlElement.dataset.scrollBehavior === 'smooth'\n\n // Since this is a breaking change, this is temporarily flagged\n // and will be false by default.\n // In the next major (v16), this will be automatically enabled\n if (process.env.__NEXT_OPTIMIZE_ROUTER_SCROLL) {\n if (!hasDataAttribute) {\n // No smooth scrolling configured, run directly without style manipulation\n fn()\n return\n }\n } else {\n // Old behavior: always manipulate styles, but warn about upcoming change\n\n // Warn if smooth scrolling is detected but no data attribute is present\n if (\n process.env.NODE_ENV === 'development' &&\n !hasDataAttribute &&\n getComputedStyle(htmlElement).scrollBehavior === 'smooth'\n ) {\n warnOnce(\n 'Detected `scroll-behavior: smooth` on the `` element. In a future version, ' +\n 'Next.js will no longer automatically disable smooth scrolling during route transitions. ' +\n 'To prepare for this change, add `data-scroll-behavior=\"smooth\"` to your element. ' +\n 'Learn more: https://nextjs.org/docs/messages/missing-data-scroll-behavior'\n )\n }\n }\n\n // Proceed with temporarily disabling smooth scrolling\n const existing = htmlElement.style.scrollBehavior\n htmlElement.style.scrollBehavior = 'auto'\n if (!options.dontForceLayout) {\n // In Chrome-based browsers we need to force reflow before calling `scrollTo`.\n // Otherwise it will not pickup the change in scrollBehavior\n // More info here: https://github.com/vercel/next.js/issues/40719#issuecomment-1336248042\n htmlElement.getClientRects()\n }\n fn()\n htmlElement.style.scrollBehavior = existing\n}\n"],"names":["warnOnce","disableSmoothScrollDuringRouteTransition","fn","options","onlyHashChange","htmlElement","document","documentElement","hasDataAttribute","dataset","scrollBehavior","process","env","__NEXT_OPTIMIZE_ROUTER_SCROLL","NODE_ENV","getComputedStyle","existing","style","dontForceLayout","getClientRects"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,wBAAuB;AAEhD;;;CAGC,GACD,OAAO,SAASC,yCACdC,EAAc,EACdC,OAAqE;IAArEA,IAAAA,oBAAAA,UAAmE,CAAC;IAEpE,yEAAyE;IACzE,6FAA6F;IAC7F,IAAIA,QAAQC,cAAc,EAAE;QAC1BF;QACA;IACF;IAEA,MAAMG,cAAcC,SAASC,eAAe;IAC5C,MAAMC,mBAAmBH,YAAYI,OAAO,CAACC,cAAc,KAAK;IAEhE,+DAA+D;IAC/D,gCAAgC;IAChC,8DAA8D;IAC9D,IAAIC,QAAQC,GAAG,CAACC,6BAA6B,EAAE;QAC7C,IAAI,CAACL,kBAAkB;YACrB,0EAA0E;YAC1EN;YACA;QACF;IACF,OAAO;QACL,yEAAyE;QAEzE,wEAAwE;QACxE,IACES,QAAQC,GAAG,CAACE,QAAQ,KAAK,iBACzB,CAACN,oBACDO,iBAAiBV,aAAaK,cAAc,KAAK,UACjD;YACAV,SACE,sFACE,6FACA,6FACA;QAEN;IACF;IAEA,sDAAsD;IACtD,MAAMgB,WAAWX,YAAYY,KAAK,CAACP,cAAc;IACjDL,YAAYY,KAAK,CAACP,cAAc,GAAG;IACnC,IAAI,CAACP,QAAQe,eAAe,EAAE;QAC5B,8EAA8E;QAC9E,4DAA4D;QAC5D,yFAAyF;QACzFb,YAAYc,cAAc;IAC5B;IACAjB;IACAG,YAAYY,KAAK,CAACP,cAAc,GAAGM;AACrC","ignoreList":[0]}