/opt/canhelp/node_modules/next/dist/client
NameSizeModeActions
app-dir/-0755rm
compat/-0755rm
components/-0755rm
dev/-0755rm
legacy/-0755rm
lib/-0755rm
portal/-0755rm
react-client-callbacks/-0755rm
request/-0755rm
tracing/-0755rm
add-base-path.d.ts790644editdlrm
add-base-path.js10100644editdlrm
add-base-path.js.map9730644editdlrm
add-locale.d.ts1210644editdlrm
add-locale.js10520644editdlrm
add-locale.js.map9000644editdlrm
app-bootstrap.d.ts2850644editdlrm
app-bootstrap.js27710644editdlrm
app-bootstrap.js.map39670644editdlrm
app-build-id.d.ts1110644editdlrm
app-build-id.js17670644editdlrm
app-build-id.js.map14610644editdlrm
app-call-server.d.ts910644editdlrm
app-call-server.js11640644editdlrm
app-call-server.js.map10170644editdlrm
app-find-source-map-url.d.ts900644editdlrm
app-find-source-map-url.js16620644editdlrm
app-find-source-map-url.js.map20920644editdlrm
app-globals.d.ts450644editdlrm
app-globals.js7080644editdlrm
app-globals.js.map5910644editdlrm
app-index.d.ts6250644editdlrm
app-index.js114290644editdlrm
app-index.js.map170630644editdlrm
app-link-gc.d.ts400644editdlrm
app-link-gc.js45430644editdlrm
app-link-gc.js.map51630644editdlrm
app-next-dev.d.ts240644editdlrm
app-next-dev.js12140644editdlrm
app-next-dev.js.map11980644editdlrm
app-next-turbopack.d.ts110644editdlrm
app-next-turbopack.js12910644editdlrm
app-next-turbopack.js.map16590644editdlrm
app-next.d.ts240644editdlrm
app-next.js12840644editdlrm
app-next.js.map12490644editdlrm
app-webpack.d.ts110644editdlrm
app-webpack.js31740644editdlrm
app-webpack.js.map32030644editdlrm
assign-location.d.ts3630644editdlrm
assign-location.js12590644editdlrm
assign-location.js.map15490644editdlrm
detect-domain-locale.d.ts1410644editdlrm
detect-domain-locale.js9220644editdlrm
detect-domain-locale.js.map7220644editdlrm
flight-data-helpers.d.ts14910644editdlrm
flight-data-helpers.js54390644editdlrm
flight-data-helpers.js.map86650644editdlrm
form-shared.d.ts28860644editdlrm
form-shared.js71320644editdlrm
form-shared.js.map107620644editdlrm
form.d.ts4890644editdlrm
form.js58160644editdlrm
form.js.map82650644editdlrm
get-domain-locale.d.ts2200644editdlrm
get-domain-locale.js15610644editdlrm
get-domain-locale.js.map24570644editdlrm
has-base-path.d.ts600644editdlrm
has-base-path.js8070644editdlrm
has-base-path.js.map6050644editdlrm
head-manager.d.ts10410644editdlrm
head-manager.js49810644editdlrm
head-manager.js.map83420644editdlrm
image-component.d.ts13370644editdlrm
image-component.js139610644editdlrm
image-component.js.map213850644editdlrm
index.d.ts7730644editdlrm
index.js334400644editdlrm
index.js.map525760644editdlrm
link.d.ts50620644editdlrm
link.js194570644editdlrm
link.js.map343670644editdlrm
next-dev-turbopack.d.ts110644editdlrm
next-dev-turbopack.js19400644editdlrm
next-dev-turbopack.js.map30020644editdlrm
next-dev.d.ts200644editdlrm
next-dev.js12230644editdlrm
next-dev.js.map11940644editdlrm
next-turbopack.d.ts480644editdlrm
next-turbopack.js14600644editdlrm
next-turbopack.js.map23300644editdlrm
next.d.ts1350644editdlrm
next.js7870644editdlrm
next.js.map8600644editdlrm
normalize-locale-path.d.ts1440644editdlrm
normalize-locale-path.js8830644editdlrm
normalize-locale-path.js.map8830644editdlrm
normalize-trailing-slash.d.ts1900644editdlrm
normalize-trailing-slash.js14500644editdlrm
normalize-trailing-slash.js.map17230644editdlrm
page-bootstrap.d.ts1230644editdlrm
page-bootstrap.js74270644editdlrm
page-bootstrap.js.map89990644editdlrm
page-loader.d.ts13700644editdlrm
page-loader.js75950644editdlrm
page-loader.js.map121060644editdlrm
remove-base-path.d.ts620644editdlrm
remove-base-path.js10800644editdlrm
remove-base-path.js.map11450644editdlrm
remove-locale.d.ts770644editdlrm
remove-locale.js11480644editdlrm
remove-locale.js.map13080644editdlrm
request-idle-callback.d.ts2650644editdlrm
request-idle-callback.js14490644editdlrm
request-idle-callback.js.map14320644editdlrm
resolve-href.d.ts3960644editdlrm
resolve-href.js55060644editdlrm
resolve-href.js.map78990644editdlrm
route-announcer.d.ts1150644editdlrm
route-announcer.js33120644editdlrm
route-announcer.js.map35530644editdlrm
route-loader.d.ts17360644editdlrm
route-loader.js139680644editdlrm
route-loader.js.map230120644editdlrm
route-params.d.ts11130644editdlrm
route-params.js82580644editdlrm
route-params.js.map108840644editdlrm
router.d.ts10780644editdlrm
router.js67160644editdlrm
router.js.map88230644editdlrm
script.d.ts9230644editdlrm
script.js140470644editdlrm
script.js.map187820644editdlrm
set-attributes-from-props.d.ts860644editdlrm
set-attributes-from-props.js23670644editdlrm
set-attributes-from-props.js.map31210644editdlrm
trusted-types.d.ts5440644editdlrm
trusted-types.js15280644editdlrm
trusted-types.js.map19570644editdlrm
use-client-disallowed.d.ts530644editdlrm
use-client-disallowed.js10060644editdlrm
use-client-disallowed.js.map7530644editdlrm
use-intersection.d.ts4120644editdlrm
use-intersection.js38450644editdlrm
use-intersection.js.map66460644editdlrm
use-merged-ref.d.ts1390644editdlrm
use-merged-ref.js24020644editdlrm
use-merged-ref.js.map34960644editdlrm
web-vitals.d.ts1560644editdlrm
web-vitals.js11090644editdlrm
web-vitals.js.map10080644editdlrm
webpack.d.ts110644editdlrm
webpack.js22820644editdlrm
webpack.js.map25350644editdlrm
with-router.d.ts5050644editdlrm
with-router.js14580644editdlrm
with-router.js.map19210644editdlrm
Edit: /opt/canhelp/node_modules/next/dist/client/app-index.js (11429B)
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "hydrate", { enumerable: true, get: function() { return hydrate; } }); const _interop_require_default = require("@swc/helpers/_/_interop_require_default"); const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard"); const _jsxruntime = require("react/jsx-runtime"); require("./app-globals"); const _client = /*#__PURE__*/ _interop_require_default._(require("react-dom/client")); const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react")); const _client1 = require("react-server-dom-webpack/client"); const _headmanagercontextsharedruntime = require("../shared/lib/head-manager-context.shared-runtime"); const _onrecoverableerror = require("./react-client-callbacks/on-recoverable-error"); const _errorboundarycallbacks = require("./react-client-callbacks/error-boundary-callbacks"); const _appcallserver = require("./app-call-server"); const _appfindsourcemapurl = require("./app-find-source-map-url"); const _approuterinstance = require("./components/app-router-instance"); const _approuter = /*#__PURE__*/ _interop_require_default._(require("./components/app-router")); const _createinitialrouterstate = require("./components/router-reducer/create-initial-router-state"); const _approutercontextsharedruntime = require("../shared/lib/app-router-context.shared-runtime"); const _appbuildid = require("./app-build-id"); /// const createFromReadableStream = _client1.createFromReadableStream; const appElement = document; const encoder = new TextEncoder(); let initialServerDataBuffer = undefined; let initialServerDataWriter = undefined; let initialServerDataLoaded = false; let initialServerDataFlushed = false; let initialFormStateData = null; function nextServerDataCallback(seg) { if (seg[0] === 0) { initialServerDataBuffer = []; } else if (seg[0] === 1) { if (!initialServerDataBuffer) throw Object.defineProperty(new Error('Unexpected server data: missing bootstrap script.'), "__NEXT_ERROR_CODE", { value: "E18", enumerable: false, configurable: true }); if (initialServerDataWriter) { initialServerDataWriter.enqueue(encoder.encode(seg[1])); } else { initialServerDataBuffer.push(seg[1]); } } else if (seg[0] === 2) { initialFormStateData = seg[1]; } else if (seg[0] === 3) { if (!initialServerDataBuffer) throw Object.defineProperty(new Error('Unexpected server data: missing bootstrap script.'), "__NEXT_ERROR_CODE", { value: "E18", enumerable: false, configurable: true }); // Decode the base64 string back to binary data. const binaryString = atob(seg[1]); const decodedChunk = new Uint8Array(binaryString.length); for(var i = 0; i < binaryString.length; i++){ decodedChunk[i] = binaryString.charCodeAt(i); } if (initialServerDataWriter) { initialServerDataWriter.enqueue(decodedChunk); } else { initialServerDataBuffer.push(decodedChunk); } } } function isStreamErrorOrUnfinished(ctr) { // If `desiredSize` is null, it means the stream is closed or errored. If it is lower than 0, the stream is still unfinished. return ctr.desiredSize === null || ctr.desiredSize < 0; } // There might be race conditions between `nextServerDataRegisterWriter` and // `DOMContentLoaded`. The former will be called when React starts to hydrate // the root, the latter will be called when the DOM is fully loaded. // For streaming, the former is called first due to partial hydration. // For non-streaming, the latter can be called first. // Hence, we use two variables `initialServerDataLoaded` and // `initialServerDataFlushed` to make sure the writer will be closed and // `initialServerDataBuffer` will be cleared in the right time. function nextServerDataRegisterWriter(ctr) { if (initialServerDataBuffer) { initialServerDataBuffer.forEach((val)=>{ ctr.enqueue(typeof val === 'string' ? encoder.encode(val) : val); }); if (initialServerDataLoaded && !initialServerDataFlushed) { if (isStreamErrorOrUnfinished(ctr)) { ctr.error(Object.defineProperty(new Error('The connection to the page was unexpectedly closed, possibly due to the stop button being clicked, loss of Wi-Fi, or an unstable internet connection.'), "__NEXT_ERROR_CODE", { value: "E117", enumerable: false, configurable: true })); } else { ctr.close(); } initialServerDataFlushed = true; initialServerDataBuffer = undefined; } } initialServerDataWriter = ctr; } // When `DOMContentLoaded`, we can close all pending writers to finish hydration. const DOMContentLoaded = function() { if (initialServerDataWriter && !initialServerDataFlushed) { initialServerDataWriter.close(); initialServerDataFlushed = true; initialServerDataBuffer = undefined; } initialServerDataLoaded = true; }; // It's possible that the DOM is already loaded. if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', DOMContentLoaded, false); } else { // Delayed in marco task to ensure it's executed later than hydration setTimeout(DOMContentLoaded); } const nextServerDataLoadingGlobal = self.__next_f = self.__next_f || []; nextServerDataLoadingGlobal.forEach(nextServerDataCallback); nextServerDataLoadingGlobal.push = nextServerDataCallback; const readable = new ReadableStream({ start (controller) { nextServerDataRegisterWriter(controller); } }); const initialServerResponse = createFromReadableStream(readable, { callServer: _appcallserver.callServer, findSourceMapURL: _appfindsourcemapurl.findSourceMapURL }); function ServerRoot(param) { let { pendingActionQueue } = param; const initialRSCPayload = (0, _react.use)(initialServerResponse); const actionQueue = (0, _react.use)(pendingActionQueue); const router = /*#__PURE__*/ (0, _jsxruntime.jsx)(_approuter.default, { actionQueue: actionQueue, globalErrorState: initialRSCPayload.G, assetPrefix: initialRSCPayload.p }); if (process.env.NODE_ENV === 'development' && initialRSCPayload.m) { // We provide missing slot information in a context provider only during development // as we log some additional information about the missing slots in the console. return /*#__PURE__*/ (0, _jsxruntime.jsx)(_approutercontextsharedruntime.MissingSlotContext, { value: initialRSCPayload.m, children: router }); } return router; } const StrictModeIfEnabled = process.env.__NEXT_STRICT_MODE_APP ? _react.default.StrictMode : _react.default.Fragment; function Root(param) { let { children } = param; if (process.env.__NEXT_TEST_MODE) { // eslint-disable-next-line react-hooks/rules-of-hooks _react.default.useEffect(()=>{ window.__NEXT_HYDRATED = true; window.__NEXT_HYDRATED_AT = performance.now(); window.__NEXT_HYDRATED_CB == null ? void 0 : window.__NEXT_HYDRATED_CB.call(window); }, []); } return children; } function onDefaultTransitionIndicator() { // TODO: Compose default with user-configureable (e.g. nprogress) // TODO: Use React's default once we figure out hanging indicators: https://codesandbox.io/p/sandbox/charming-moon-hktkp6?file=%2Fsrc%2Findex.js%3A106%2C30 return ()=>{}; } const reactRootOptions = { onDefaultTransitionIndicator: onDefaultTransitionIndicator, onRecoverableError: _onrecoverableerror.onRecoverableError, onCaughtError: _errorboundarycallbacks.onCaughtError, onUncaughtError: _errorboundarycallbacks.onUncaughtError }; function hydrate(instrumentationHooks) { // React overrides `.then` and doesn't return a new promise chain, // so we wrap the action queue in a promise to ensure that its value // is defined when the promise resolves. // https://github.com/facebook/react/blob/163365a07872337e04826c4f501565d43dbd2fd4/packages/react-client/src/ReactFlightClient.js#L189-L190 const pendingActionQueue = new Promise((resolve, reject)=>{ initialServerResponse.then((initialRSCPayload)=>{ // setAppBuildId should be called only once, during JS initialization // and before any components have hydrated. (0, _appbuildid.setAppBuildId)(initialRSCPayload.b); const initialTimestamp = Date.now(); resolve((0, _approuterinstance.createMutableActionQueue)((0, _createinitialrouterstate.createInitialRouterState)({ navigatedAt: initialTimestamp, initialFlightData: initialRSCPayload.f, initialCanonicalUrlParts: initialRSCPayload.c, initialParallelRoutes: new Map(), location: window.location, couldBeIntercepted: initialRSCPayload.i, postponed: initialRSCPayload.s, prerendered: initialRSCPayload.S }), instrumentationHooks)); }, (err)=>reject(err)); }); const reactEl = /*#__PURE__*/ (0, _jsxruntime.jsx)(StrictModeIfEnabled, { children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_headmanagercontextsharedruntime.HeadManagerContext.Provider, { value: { appDir: true }, children: /*#__PURE__*/ (0, _jsxruntime.jsx)(Root, { children: /*#__PURE__*/ (0, _jsxruntime.jsx)(ServerRoot, { pendingActionQueue: pendingActionQueue }) }) }) }); if (document.documentElement.id === '__next_error__') { let element = reactEl; // Server rendering failed, fall back to client-side rendering if (process.env.NODE_ENV !== 'production') { const { RootLevelDevOverlayElement } = require('../next-devtools/userspace/app/client-entry'); // Note this won't cause hydration mismatch because we are doing CSR w/o hydration element = /*#__PURE__*/ (0, _jsxruntime.jsx)(RootLevelDevOverlayElement, { children: element }); } _client.default.createRoot(appElement, reactRootOptions).render(element); } else { _react.default.startTransition(()=>{ _client.default.hydrateRoot(appElement, reactEl, { ...reactRootOptions, formState: initialFormStateData }); }); } // TODO-APP: Remove this logic when Float has GC built-in in development. if (process.env.NODE_ENV !== 'production') { const { linkGc } = require('./app-link-gc'); linkGc(); } } 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=app-index.js.map