Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub (part 8)
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
Files changed (50)
- .gitattributes+2
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/server-reference-info.jsAdded+52
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/side-effect.jsAdded+66
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/turbopack/compilation-events.jsAdded+47
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/turbopack/entry-key.jsAdded+39
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/turbopack/manifest-loader.jsAdded+477
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/turbopack/utils.jsAdded+305
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/utils.jsAdded+211
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/utils/warn-once.jsAdded+22
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/zod.jsAdded+101
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/telemetry/anonymous-meta.jsAdded+89
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/telemetry/detached-flush.jsAdded+53
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/telemetry/events/build.jsAdded+144
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/telemetry/events/error-feedback.jsAdded+31
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/telemetry/events/index.jsAdded+23
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/telemetry/events/plugins.jsAdded+51
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/telemetry/events/swc-load-failure.jsAdded+55
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/telemetry/events/version.jsAdded+90
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/telemetry/flush-and-exit.jsAdded+20
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/telemetry/post-telemetry-payload.jsAdded+48
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/telemetry/project-id.jsAdded+48
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/telemetry/storage.jsAdded+288
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/trace/index.jsAdded+54
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/trace/report/index.jsAdded+35
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/trace/report/to-json.jsAdded+157
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/trace/report/to-telemetry.jsAdded+36
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/trace/shared.jsAdded+39
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/trace/trace.jsAdded+197
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/font/google/target.cssAdded+1
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/package.jsonAdded+378
- .next/standalone/node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/package.jsonAdded+25
- .next/standalone/node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.jsAdded+75
- .next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/at-rule.jsAdded+25
- .next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/comment.jsAdded+13
- .next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/container.jsAdded+439
- .next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/css-syntax-error.jsAdded+100
- .next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/declaration.jsAdded+24
- .next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/document.jsAdded+33
- .next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/fromJSON.jsAdded+54
- .next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/input.jsAdded+248
- .next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/lazy-result.jsAdded+550
- .next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/list.jsAdded+58
- .next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/map-generator.jsAdded+359
- .next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/no-work-result.jsAdded+135
- .next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/node.jsAdded+381
- .next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/parse.jsAdded+42
- .next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/parser.jsAdded+610
- .next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/postcss.jsAdded+101
- .next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/previous-map.jsAdded+142
- .next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/processor.jsAdded+67
40 unmodified lines41424340 unmodified lines.next/standalone/node_modules/.pnpm/@img+sharp-libvips-linuxmusl-x64@1.2.0/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/libvips-cpp.so.8.17.1 filter=lfs diff=lfs merge=lfs -text.next/standalone/node_modules/.pnpm/@img+sharp-linux-x64@0.34.3/node_modules/@img/sharp-linux-x64/lib/sharp-linux-x64.node filter=lfs diff=lfs merge=lfs -text.next/standalone/node_modules/.pnpm/@img+sharp-linuxmusl-x64@0.34.3/node_modules/@img/sharp-linuxmusl-x64/lib/sharp-linuxmusl-x64.node filter=lfs diff=lfs merge=lfs -text40 unmodified lines414243444540 unmodified lines.next/standalone/node_modules/.pnpm/@img+sharp-libvips-linuxmusl-x64@1.2.0/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/libvips-cpp.so.8.17.1 filter=lfs diff=lfs merge=lfs -text.next/standalone/node_modules/.pnpm/@img+sharp-linux-x64@0.34.3/node_modules/@img/sharp-linux-x64/lib/sharp-linux-x64.node filter=lfs diff=lfs merge=lfs -text.next/standalone/node_modules/.pnpm/@img+sharp-linuxmusl-x64@0.34.3/node_modules/@img/sharp-linuxmusl-x64/lib/sharp-linuxmusl-x64.node filter=lfs diff=lfs merge=lfs -textassets/papercoder_overview.png filter=lfs diff=lfs merge=lfs -textexamples/Transformer.pdf filter=lfs diff=lfs merge=lfs -text
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152"use strict";Object.defineProperty(exports, "__esModule", { value: true});0 && (module.exports = { extractInfoFromServerReferenceId: null, omitUnusedArgs: null});function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] });}_export(exports, { extractInfoFromServerReferenceId: function() { return extractInfoFromServerReferenceId; }, omitUnusedArgs: function() { return omitUnusedArgs; }});function extractInfoFromServerReferenceId(id) { const infoByte = parseInt(id.slice(0, 2), 16); const typeBit = infoByte >> 7 & 0x1; const argMask = infoByte >> 1 & 0x3f; const restArgs = infoByte & 0x1; const usedArgs = Array(6); for(let index = 0; index < 6; index++){ const bitPosition = 5 - index; const bit = argMask >> bitPosition & 0x1; usedArgs[index] = bit === 1; } return { type: typeBit === 1 ? 'use-cache' : 'server-action', usedArgs: usedArgs, hasRestArgs: restArgs === 1 };}function omitUnusedArgs(args, info) { const filteredArgs = new Array(args.length); for(let index = 0; index < args.length; index++){ if (index < 6 && info.usedArgs[index] || // This assumes that the server reference info byte has the restArgs bit // set to 1 if there are more than 6 args. index >= 6 && info.hasRestArgs) { filteredArgs[index] = args[index]; } } return filteredArgs;}
//# sourceMappingURL=server-reference-info.js.map123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566"use strict";Object.defineProperty(exports, "__esModule", { value: true});Object.defineProperty(exports, "default", { enumerable: true, get: function() { return SideEffect; }});const _react = require("react");const isServer = typeof window === 'undefined';const useClientOnlyLayoutEffect = isServer ? ()=>{} : _react.useLayoutEffect;const useClientOnlyEffect = isServer ? ()=>{} : _react.useEffect;function SideEffect(props) { const { headManager, reduceComponentsToState } = props; function emitChange() { if (headManager && headManager.mountedInstances) { const headElements = _react.Children.toArray(Array.from(headManager.mountedInstances).filter(Boolean)); headManager.updateHead(reduceComponentsToState(headElements, props)); } } if (isServer) { var _headManager_mountedInstances; headManager == null ? void 0 : (_headManager_mountedInstances = headManager.mountedInstances) == null ? void 0 : _headManager_mountedInstances.add(props.children); emitChange(); } useClientOnlyLayoutEffect(()=>{ var _headManager_mountedInstances; headManager == null ? void 0 : (_headManager_mountedInstances = headManager.mountedInstances) == null ? void 0 : _headManager_mountedInstances.add(props.children); return ()=>{ var _headManager_mountedInstances; headManager == null ? void 0 : (_headManager_mountedInstances = headManager.mountedInstances) == null ? void 0 : _headManager_mountedInstances.delete(props.children); }; }); // We need to call `updateHead` method whenever the `SideEffect` is trigger in all // life-cycles: mount, update, unmount. However, if there are multiple `SideEffect`s // being rendered, we only trigger the method from the last one. // This is ensured by keeping the last unflushed `updateHead` in the `_pendingUpdate` // singleton in the layout effect pass, and actually trigger it in the effect pass. useClientOnlyLayoutEffect(()=>{ if (headManager) { headManager._pendingUpdate = emitChange; } return ()=>{ if (headManager) { headManager._pendingUpdate = emitChange; } }; }); useClientOnlyEffect(()=>{ if (headManager && headManager._pendingUpdate) { headManager._pendingUpdate(); headManager._pendingUpdate = null; } return ()=>{ if (headManager && headManager._pendingUpdate) { headManager._pendingUpdate(); headManager._pendingUpdate = null; } }; }); return null;}
//# sourceMappingURL=side-effect.js.map1234567891011121314151617181920212223242526272829303132333435363738394041424344454647"use strict";Object.defineProperty(exports, "__esModule", { value: true});Object.defineProperty(exports, "backgroundLogCompilationEvents", { enumerable: true, get: function() { return backgroundLogCompilationEvents; }});const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");const _log = /*#__PURE__*/ _interop_require_wildcard._(require("../../../build/output/log"));function backgroundLogCompilationEvents(project, param) { let { eventTypes, signal } = param === void 0 ? {} : param; ; (async function() { for await (const event of project.compilationEventsSubscribe(eventTypes)){ if (signal == null ? void 0 : signal.aborted) { return; } switch(event.severity){ case 'EVENT': _log.event(event.message); break; case 'TRACE': _log.trace(event.message); break; case 'INFO': _log.info(event.message); break; case 'WARNING': _log.warn(event.message); break; case 'ERROR': _log.error(event.message); break; case 'FATAL': _log.error(event.message); break; default: break; } } })();}
//# sourceMappingURL=compilation-events.js.map123456789101112131415161718192021222324252627282930313233343536373839/** * `app` -> app dir * `pages` -> pages dir * `root` -> middleware / instrumentation * `assets` -> assets */ "use strict";Object.defineProperty(exports, "__esModule", { value: true});0 && (module.exports = { getEntryKey: null, splitEntryKey: null});function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] });}_export(exports, { getEntryKey: function() { return getEntryKey; }, splitEntryKey: function() { return splitEntryKey; }});function getEntryKey(type, side, page) { return JSON.stringify({ type, side, page });}function splitEntryKey(key) { return JSON.parse(key);}
//# sourceMappingURL=entry-key.js.map123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477"use strict";Object.defineProperty(exports, "__esModule", { value: true});Object.defineProperty(exports, "TurbopackManifestLoader", { enumerable: true, get: function() { return TurbopackManifestLoader; }});const _interop_require_default = require("@swc/helpers/_/_interop_require_default");const _pathtoregexp = require("next/dist/compiled/path-to-regexp");const _constants = require("../constants");const _path = require("path");const _promises = require("fs/promises");const _requirecache = require("../../../server/dev/require-cache");const _writeatomic = require("../../../lib/fs/write-atomic");const _generateinterceptionroutesrewrites = require("../../../lib/generate-interception-routes-rewrites");const _buildmanifestplugin = require("../../../build/webpack/plugins/build-manifest-plugin");const _getassetpathfromroute = /*#__PURE__*/ _interop_require_default._(require("../router/utils/get-asset-path-from-route"));const _entrykey = require("./entry-key");const _utils = require("../router/utils");const _fs = require("fs");const _turbopackutils = require("../../../server/dev/turbopack-utils");const _trytoparsepath = require("../../../lib/try-to-parse-path");const getManifestPath = (page, distDir, name, type, firstCall)=>{ let manifestPath = _path.posix.join(distDir, "server", type, type === 'middleware' || type === 'instrumentation' ? '' : type === 'app' ? page : (0, _getassetpathfromroute.default)(page), name); if (firstCall) { const isSitemapRoute = /[\\/]sitemap(.xml)?\/route$/.test(page); // Check the ambiguity of /sitemap and /sitemap.xml if (isSitemapRoute && !(0, _fs.existsSync)(manifestPath)) { manifestPath = getManifestPath(page.replace(/\/sitemap\/route$/, '/sitemap.xml/route'), distDir, name, type, false); } // existsSync is faster than using the async version if (!(0, _fs.existsSync)(manifestPath) && page.endsWith('/route')) { // TODO: Improve implementation of metadata routes, currently it requires this extra check for the variants of the files that can be written. let metadataPage = (0, _turbopackutils.addRouteSuffix)((0, _turbopackutils.addMetadataIdToRoute)((0, _turbopackutils.removeRouteSuffix)(page))); manifestPath = getManifestPath(metadataPage, distDir, name, type, false); } } return manifestPath;};async function readPartialManifest(distDir, name, pageName, type) { if (type === void 0) type = 'pages'; const page = pageName; const manifestPath = getManifestPath(page, distDir, name, type, true); return JSON.parse(await (0, _promises.readFile)(_path.posix.join(manifestPath), 'utf-8'));}class TurbopackManifestLoader { delete(key) { this.actionManifests.delete(key); this.appBuildManifests.delete(key); this.appPathsManifests.delete(key); this.buildManifests.delete(key); this.fontManifests.delete(key); this.middlewareManifests.delete(key); this.pagesManifests.delete(key); this.webpackStats.delete(key); } async loadActionManifest(pageName) { this.actionManifests.set((0, _entrykey.getEntryKey)('app', 'server', pageName), await readPartialManifest(this.distDir, "" + _constants.SERVER_REFERENCE_MANIFEST + ".json", pageName, 'app')); } async mergeActionManifests(manifests) { const manifest = { node: {}, edge: {}, encryptionKey: this.encryptionKey }; function mergeActionIds(actionEntries, other) { for(const key in other){ var _actionEntries, _key; var _; const action = (_ = (_actionEntries = actionEntries)[_key = key]) != null ? _ : _actionEntries[_key] = { workers: {}, layer: {} }; Object.assign(action.workers, other[key].workers); Object.assign(action.layer, other[key].layer); } } for (const m of manifests){ mergeActionIds(manifest.node, m.node); mergeActionIds(manifest.edge, m.edge); } for(const key in manifest.node){ const entry = manifest.node[key]; entry.workers = sortObjectByKey(entry.workers); entry.layer = sortObjectByKey(entry.layer); } for(const key in manifest.edge){ const entry = manifest.edge[key]; entry.workers = sortObjectByKey(entry.workers); entry.layer = sortObjectByKey(entry.layer); } return manifest; } async writeActionManifest() { const actionManifest = await this.mergeActionManifests(this.actionManifests.values()); const actionManifestJsonPath = (0, _path.join)(this.distDir, 'server', "" + _constants.SERVER_REFERENCE_MANIFEST + ".json"); const actionManifestJsPath = (0, _path.join)(this.distDir, 'server', "" + _constants.SERVER_REFERENCE_MANIFEST + ".js"); const json = JSON.stringify(actionManifest, null, 2); (0, _requirecache.deleteCache)(actionManifestJsonPath); (0, _requirecache.deleteCache)(actionManifestJsPath); await (0, _writeatomic.writeFileAtomic)(actionManifestJsonPath, json); await (0, _writeatomic.writeFileAtomic)(actionManifestJsPath, "self.__RSC_SERVER_MANIFEST=" + JSON.stringify(json)); } async loadAppBuildManifest(pageName) { this.appBuildManifests.set((0, _entrykey.getEntryKey)('app', 'server', pageName), await readPartialManifest(this.distDir, _constants.APP_BUILD_MANIFEST, pageName, 'app')); } mergeAppBuildManifests(manifests) { const manifest = { pages: {} }; for (const m of manifests){ Object.assign(manifest.pages, m.pages); } manifest.pages = sortObjectByKey(manifest.pages); return manifest; } async writeAppBuildManifest() { const appBuildManifest = this.mergeAppBuildManifests(this.appBuildManifests.values()); const appBuildManifestPath = (0, _path.join)(this.distDir, _constants.APP_BUILD_MANIFEST); (0, _requirecache.deleteCache)(appBuildManifestPath); await (0, _writeatomic.writeFileAtomic)(appBuildManifestPath, JSON.stringify(appBuildManifest, null, 2)); } async loadAppPathsManifest(pageName) { this.appPathsManifests.set((0, _entrykey.getEntryKey)('app', 'server', pageName), await readPartialManifest(this.distDir, _constants.APP_PATHS_MANIFEST, pageName, 'app')); } async writeAppPathsManifest() { const appPathsManifest = this.mergePagesManifests(this.appPathsManifests.values()); const appPathsManifestPath = (0, _path.join)(this.distDir, 'server', _constants.APP_PATHS_MANIFEST); (0, _requirecache.deleteCache)(appPathsManifestPath); await (0, _writeatomic.writeFileAtomic)(appPathsManifestPath, JSON.stringify(appPathsManifest, null, 2)); } async writeWebpackStats() { const webpackStats = this.mergeWebpackStats(this.webpackStats.values()); const path = (0, _path.join)(this.distDir, 'server', _constants.WEBPACK_STATS); (0, _requirecache.deleteCache)(path); await (0, _writeatomic.writeFileAtomic)(path, JSON.stringify(webpackStats, null, 2)); } async loadBuildManifest(pageName, type) { if (type === void 0) type = 'pages'; this.buildManifests.set((0, _entrykey.getEntryKey)(type, 'server', pageName), await readPartialManifest(this.distDir, _constants.BUILD_MANIFEST, pageName, type)); } async loadWebpackStats(pageName, type) { if (type === void 0) type = 'pages'; this.webpackStats.set((0, _entrykey.getEntryKey)(type, 'client', pageName), await readPartialManifest(this.distDir, _constants.WEBPACK_STATS, pageName, type)); } mergeWebpackStats(statsFiles) { const entrypoints = {}; const assets = new Map(); const chunks = new Map(); const modules = new Map(); for (const statsFile of statsFiles){ if (statsFile.entrypoints) { for (const [k, v] of Object.entries(statsFile.entrypoints)){ if (!entrypoints[k]) { entrypoints[k] = v; } } } if (statsFile.assets) { for (const asset of statsFile.assets){ if (!assets.has(asset.name)) { assets.set(asset.name, asset); } } } if (statsFile.chunks) { for (const chunk of statsFile.chunks){ if (!chunks.has(chunk.id)) { chunks.set(chunk.id, chunk); } } } if (statsFile.modules) { for (const module of statsFile.modules){ const id = module.id; if (id != null) { // Merge the chunk list for the module. This can vary across endpoints. const existing = modules.get(id); if (existing == null) { modules.set(id, module); } else if (module.chunks != null && existing.chunks != null) { for (const chunk of module.chunks){ if (!existing.chunks.includes(chunk)) { existing.chunks.push(chunk); } } } } } } } return { version: 'Turbopack', entrypoints, assets: [ ...assets.values() ], chunks: [ ...chunks.values() ], modules: [ ...modules.values() ] }; } mergeBuildManifests(manifests) { const manifest = { pages: { '/_app': [] }, // Something in next.js depends on these to exist even for app dir rendering devFiles: [], ampDevFiles: [], polyfillFiles: [], lowPriorityFiles: [ "static/" + this.buildId + "/_ssgManifest.js", "static/" + this.buildId + "/_buildManifest.js" ], rootMainFiles: [], ampFirstPages: [] }; for (const m of manifests){ Object.assign(manifest.pages, m.pages); if (m.rootMainFiles.length) manifest.rootMainFiles = m.rootMainFiles; // polyfillFiles should always be the same, so we can overwrite instead of actually merging if (m.polyfillFiles.length) manifest.polyfillFiles = m.polyfillFiles; } manifest.pages = sortObjectByKey(manifest.pages); return manifest; } async writeBuildManifest(entrypoints, devRewrites, productionRewrites) { var _devRewrites_beforeFiles, _devRewrites_afterFiles, _devRewrites_fallback; const rewrites = productionRewrites != null ? productionRewrites : { ...devRewrites, beforeFiles: ((_devRewrites_beforeFiles = devRewrites == null ? void 0 : devRewrites.beforeFiles) != null ? _devRewrites_beforeFiles : []).map(_buildmanifestplugin.processRoute), afterFiles: ((_devRewrites_afterFiles = devRewrites == null ? void 0 : devRewrites.afterFiles) != null ? _devRewrites_afterFiles : []).map(_buildmanifestplugin.processRoute), fallback: ((_devRewrites_fallback = devRewrites == null ? void 0 : devRewrites.fallback) != null ? _devRewrites_fallback : []).map(_buildmanifestplugin.processRoute) }; const buildManifest = this.mergeBuildManifests(this.buildManifests.values()); const buildManifestPath = (0, _path.join)(this.distDir, _constants.BUILD_MANIFEST); const middlewareBuildManifestPath = (0, _path.join)(this.distDir, 'server', "" + _constants.MIDDLEWARE_BUILD_MANIFEST + ".js"); const interceptionRewriteManifestPath = (0, _path.join)(this.distDir, 'server', "" + _constants.INTERCEPTION_ROUTE_REWRITE_MANIFEST + ".js"); (0, _requirecache.deleteCache)(buildManifestPath); (0, _requirecache.deleteCache)(middlewareBuildManifestPath); (0, _requirecache.deleteCache)(interceptionRewriteManifestPath); await (0, _writeatomic.writeFileAtomic)(buildManifestPath, JSON.stringify(buildManifest, null, 2)); await (0, _writeatomic.writeFileAtomic)(middlewareBuildManifestPath, // we use globalThis here because middleware can be node // which doesn't have "self" (0, _buildmanifestplugin.createEdgeRuntimeManifest)(buildManifest)); const interceptionRewrites = JSON.stringify(rewrites.beforeFiles.filter(_generateinterceptionroutesrewrites.isInterceptionRouteRewrite)); await (0, _writeatomic.writeFileAtomic)(interceptionRewriteManifestPath, "self.__INTERCEPTION_ROUTE_REWRITE_MANIFEST=" + JSON.stringify(interceptionRewrites) + ";"); const pagesKeys = [ ...entrypoints.page.keys() ]; if (entrypoints.global.app) { pagesKeys.push('/_app'); } if (entrypoints.global.error) { pagesKeys.push('/_error'); } const sortedPageKeys = (0, _utils.getSortedRoutes)(pagesKeys); const clientBuildManifest = { __rewrites: (0, _buildmanifestplugin.normalizeRewritesForBuildManifest)(rewrites), ...Object.fromEntries(sortedPageKeys.map((pathname)=>{ let filePath; if (pathname === '/') { filePath = '/index.js'; } else if (pathname.endsWith('/index')) { filePath = "" + pathname + "/index.js"; } else { filePath = "" + pathname + ".js"; } return [ pathname, [ "static/chunks/pages" + filePath ] ]; })), sortedPages: sortedPageKeys }; const clientBuildManifestJs = "self.__BUILD_MANIFEST = " + JSON.stringify(clientBuildManifest) + ";self.__BUILD_MANIFEST_CB && self.__BUILD_MANIFEST_CB()"; await (0, _writeatomic.writeFileAtomic)((0, _path.join)(this.distDir, 'static', this.buildId, '_buildManifest.js'), clientBuildManifestJs); await (0, _writeatomic.writeFileAtomic)((0, _path.join)(this.distDir, 'static', this.buildId, '_ssgManifest.js'), _buildmanifestplugin.srcEmptySsgManifest); } async writeClientMiddlewareManifest() { var _middlewareManifest_middleware_; const middlewareManifest = this.mergeMiddlewareManifests(this.middlewareManifests.values()); const matchers = (middlewareManifest == null ? void 0 : (_middlewareManifest_middleware_ = middlewareManifest.middleware['/']) == null ? void 0 : _middlewareManifest_middleware_.matchers) || []; const clientMiddlewareManifestPath = (0, _path.join)(this.distDir, 'static', this.buildId, "" + _constants.TURBOPACK_CLIENT_MIDDLEWARE_MANIFEST); (0, _requirecache.deleteCache)(clientMiddlewareManifestPath); await (0, _writeatomic.writeFileAtomic)(clientMiddlewareManifestPath, JSON.stringify(matchers, null, 2)); } async writeFallbackBuildManifest() { const fallbackBuildManifest = this.mergeBuildManifests([ this.buildManifests.get((0, _entrykey.getEntryKey)('pages', 'server', '_app')), this.buildManifests.get((0, _entrykey.getEntryKey)('pages', 'server', '_error')) ].filter(Boolean)); const fallbackBuildManifestPath = (0, _path.join)(this.distDir, "fallback-" + _constants.BUILD_MANIFEST); (0, _requirecache.deleteCache)(fallbackBuildManifestPath); await (0, _writeatomic.writeFileAtomic)(fallbackBuildManifestPath, JSON.stringify(fallbackBuildManifest, null, 2)); } async loadFontManifest(pageName, type) { if (type === void 0) type = 'pages'; this.fontManifests.set((0, _entrykey.getEntryKey)(type, 'server', pageName), await readPartialManifest(this.distDir, "" + _constants.NEXT_FONT_MANIFEST + ".json", pageName, type)); } mergeFontManifests(manifests) { const manifest = { app: {}, appUsingSizeAdjust: false, pages: {}, pagesUsingSizeAdjust: false }; for (const m of manifests){ Object.assign(manifest.app, m.app); Object.assign(manifest.pages, m.pages); manifest.appUsingSizeAdjust = manifest.appUsingSizeAdjust || m.appUsingSizeAdjust; manifest.pagesUsingSizeAdjust = manifest.pagesUsingSizeAdjust || m.pagesUsingSizeAdjust; } manifest.app = sortObjectByKey(manifest.app); manifest.pages = sortObjectByKey(manifest.pages); return manifest; } async writeNextFontManifest() { const fontManifest = this.mergeFontManifests(this.fontManifests.values()); const json = JSON.stringify(fontManifest, null, 2); const fontManifestJsonPath = (0, _path.join)(this.distDir, 'server', "" + _constants.NEXT_FONT_MANIFEST + ".json"); const fontManifestJsPath = (0, _path.join)(this.distDir, 'server', "" + _constants.NEXT_FONT_MANIFEST + ".js"); (0, _requirecache.deleteCache)(fontManifestJsonPath); (0, _requirecache.deleteCache)(fontManifestJsPath); await (0, _writeatomic.writeFileAtomic)(fontManifestJsonPath, json); await (0, _writeatomic.writeFileAtomic)(fontManifestJsPath, "self.__NEXT_FONT_MANIFEST=" + JSON.stringify(json)); } /** * @returns If the manifest was written or not */ async loadMiddlewareManifest(pageName, type) { const middlewareManifestPath = getManifestPath(pageName, this.distDir, _constants.MIDDLEWARE_MANIFEST, type, true); // middlewareManifest is actually "edge manifest" and not all routes are edge runtime. If it is not written we skip it. if (!(0, _fs.existsSync)(middlewareManifestPath)) { return false; } this.middlewareManifests.set((0, _entrykey.getEntryKey)(type === 'middleware' || type === 'instrumentation' ? 'root' : type, 'server', pageName), await readPartialManifest(this.distDir, _constants.MIDDLEWARE_MANIFEST, pageName, type)); return true; } getMiddlewareManifest(key) { return this.middlewareManifests.get(key); } deleteMiddlewareManifest(key) { return this.middlewareManifests.delete(key); } mergeMiddlewareManifests(manifests) { const manifest = { version: 3, middleware: {}, sortedMiddleware: [], functions: {} }; let instrumentation = undefined; for (const m of manifests){ Object.assign(manifest.functions, m.functions); Object.assign(manifest.middleware, m.middleware); if (m.instrumentation) { instrumentation = m.instrumentation; } } manifest.functions = sortObjectByKey(manifest.functions); manifest.middleware = sortObjectByKey(manifest.middleware); const updateFunctionDefinition = (fun)=>{ var _instrumentation_files; return { ...fun, files: [ ...(_instrumentation_files = instrumentation == null ? void 0 : instrumentation.files) != null ? _instrumentation_files : [], ...fun.files ] }; }; for (const key of Object.keys(manifest.middleware)){ const value = manifest.middleware[key]; manifest.middleware[key] = updateFunctionDefinition(value); } for (const key of Object.keys(manifest.functions)){ const value = manifest.functions[key]; manifest.functions[key] = updateFunctionDefinition(value); } for (const fun of Object.values(manifest.functions).concat(Object.values(manifest.middleware))){ for (const matcher of fun.matchers){ if (!matcher.regexp) { matcher.regexp = (0, _pathtoregexp.pathToRegexp)(matcher.originalSource, [], { delimiter: '/', sensitive: false, strict: true }).source.replaceAll('\\/', '/'); } } } manifest.sortedMiddleware = Object.keys(manifest.middleware); return manifest; } async writeMiddlewareManifest() { const middlewareManifest = this.mergeMiddlewareManifests(this.middlewareManifests.values()); // Normalize regexes as it uses path-to-regexp for(const key in middlewareManifest.middleware){ middlewareManifest.middleware[key].matchers.forEach((matcher)=>{ if (!matcher.regexp.startsWith('^')) { const parsedPage = (0, _trytoparsepath.tryToParsePath)(matcher.regexp); if (parsedPage.error || !parsedPage.regexStr) { throw Object.defineProperty(new Error("Invalid source: " + matcher.regexp), "__NEXT_ERROR_CODE", { value: "E442", enumerable: false, configurable: true }); } matcher.regexp = parsedPage.regexStr; } }); } const middlewareManifestPath = (0, _path.join)(this.distDir, 'server', _constants.MIDDLEWARE_MANIFEST); (0, _requirecache.deleteCache)(middlewareManifestPath); await (0, _writeatomic.writeFileAtomic)(middlewareManifestPath, JSON.stringify(middlewareManifest, null, 2)); } async loadPagesManifest(pageName) { this.pagesManifests.set((0, _entrykey.getEntryKey)('pages', 'server', pageName), await readPartialManifest(this.distDir, _constants.PAGES_MANIFEST, pageName)); } mergePagesManifests(manifests) { const manifest = {}; for (const m of manifests){ Object.assign(manifest, m); } return sortObjectByKey(manifest); } async writePagesManifest() { const pagesManifest = this.mergePagesManifests(this.pagesManifests.values()); const pagesManifestPath = (0, _path.join)(this.distDir, 'server', _constants.PAGES_MANIFEST); (0, _requirecache.deleteCache)(pagesManifestPath); await (0, _writeatomic.writeFileAtomic)(pagesManifestPath, JSON.stringify(pagesManifest, null, 2)); } async writeManifests(param) { let { devRewrites, productionRewrites, entrypoints } = param; await this.writeActionManifest(); await this.writeAppBuildManifest(); await this.writeAppPathsManifest(); await this.writeBuildManifest(entrypoints, devRewrites, productionRewrites); await this.writeFallbackBuildManifest(); await this.writeMiddlewareManifest(); await this.writeClientMiddlewareManifest(); await this.writeNextFontManifest(); await this.writePagesManifest(); if (process.env.TURBOPACK_STATS != null) { await this.writeWebpackStats(); } } constructor({ distDir, buildId, encryptionKey }){ this.actionManifests = new Map(); this.appBuildManifests = new Map(); this.appPathsManifests = new Map(); this.buildManifests = new Map(); this.fontManifests = new Map(); this.middlewareManifests = new Map(); this.pagesManifests = new Map(); this.webpackStats = new Map(); this.distDir = distDir; this.buildId = buildId; this.encryptionKey = encryptionKey; }}function sortObjectByKey(obj) { return Object.keys(obj).sort().reduce((acc, key)=>{ acc[key] = obj[key]; return acc; }, {});}
//# sourceMappingURL=manifest-loader.js.map123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305"use strict";Object.defineProperty(exports, "__esModule", { value: true});0 && (module.exports = { ModuleBuildError: null, TurbopackInternalError: null, formatIssue: null, getIssueKey: null, getTurbopackJsConfig: null, isPersistentCachingEnabled: null, isRelevantWarning: null, isWellKnownError: null, processIssues: null, renderStyledStringToErrorAnsi: null});function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] });}_export(exports, { ModuleBuildError: function() { return ModuleBuildError; }, TurbopackInternalError: function() { return TurbopackInternalError; }, formatIssue: function() { return formatIssue; }, getIssueKey: function() { return getIssueKey; }, getTurbopackJsConfig: function() { return getTurbopackJsConfig; }, isPersistentCachingEnabled: function() { return isPersistentCachingEnabled; }, isRelevantWarning: function() { return isRelevantWarning; }, isWellKnownError: function() { return isWellKnownError; }, processIssues: function() { return processIssues; }, renderStyledStringToErrorAnsi: function() { return renderStyledStringToErrorAnsi; }});const _interop_require_default = require("@swc/helpers/_/_interop_require_default");const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");const _picocolors = require("../../../lib/picocolors");const _isinternal = /*#__PURE__*/ _interop_require_default._(require("../is-internal"));const _magicidentifier = require("../magic-identifier");const _log = /*#__PURE__*/ _interop_require_wildcard._(require("../../../build/output/log"));const _loadjsconfig = /*#__PURE__*/ _interop_require_default._(require("../../../build/load-jsconfig"));const _events = require("../../../telemetry/events");const _shared = require("../../../trace/shared");class ModuleBuildError extends Error { constructor(...args){ super(...args), this.name = 'ModuleBuildError'; }}class TurbopackInternalError extends Error { static createAndRecordTelemetry(cause) { const error = new TurbopackInternalError(cause); const telemetry = _shared.traceGlobals.get('telemetry'); if (telemetry) { telemetry.record((0, _events.eventErrorThrown)(error)); } else { console.error('Expected `telemetry` to be set in globals'); } return error; } constructor(cause){ super(cause.message), this.name = 'TurbopackInternalError', // Manually set this as this isn't statically determinable this.__NEXT_ERROR_CODE = 'TurbopackInternalError'; this.stack = cause.stack; }}function isWellKnownError(issue) { const { title } = issue; const formattedTitle = renderStyledStringToErrorAnsi(title); // TODO: add more well known errors if (formattedTitle.includes('Module not found') || formattedTitle.includes('Unknown module type')) { return true; } return false;}function getIssueKey(issue) { return issue.severity + "-" + issue.filePath + "-" + JSON.stringify(issue.title) + "-" + JSON.stringify(issue.description);}async function getTurbopackJsConfig(dir, nextConfig) { const { jsConfig } = await (0, _loadjsconfig.default)(dir, nextConfig); return jsConfig != null ? jsConfig : { compilerOptions: {} };}function processIssues(currentEntryIssues, key, result, throwIssue, logErrors) { const newIssues = new Map(); currentEntryIssues.set(key, newIssues); const relevantIssues = new Set(); for (const issue of result.issues){ if (issue.severity !== 'error' && issue.severity !== 'fatal' && issue.severity !== 'warning') continue; const issueKey = getIssueKey(issue); newIssues.set(issueKey, issue); if (issue.severity !== 'warning') { if (throwIssue) { const formatted = formatIssue(issue); relevantIssues.add(formatted); } else if (logErrors && isWellKnownError(issue)) { const formatted = formatIssue(issue); _log.error(formatted); } } } if (relevantIssues.size && throwIssue) { throw Object.defineProperty(new ModuleBuildError([ ...relevantIssues ].join('\n\n')), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); }}function formatIssue(issue) { const { filePath, title, description, source, importTraces } = issue; let { documentationLink } = issue; const formattedTitle = renderStyledStringToErrorAnsi(title).replace(/\n/g, '\n '); // TODO: Use error codes to identify these // TODO: Generalize adapting Turbopack errors to Next.js errors if (formattedTitle.includes('Module not found')) { // For compatiblity with webpack // TODO: include columns in webpack errors. documentationLink = 'https://nextjs.org/docs/messages/module-not-found'; } const formattedFilePath = filePath.replace('[project]/', './').replaceAll('/./', '/').replace('\\\\?\\', ''); let message = ''; if (source == null ? void 0 : source.range) { const { start } = source.range; message = formattedFilePath + ":" + (start.line + 1) + ":" + (start.column + 1) + "\n" + formattedTitle; } else if (formattedFilePath) { message = formattedFilePath + "\n" + formattedTitle; } else { message = formattedTitle; } message += '\n'; if ((source == null ? void 0 : source.range) && source.source.content && // ignore Next.js/React internals, as these can often be huge bundled files. !(0, _isinternal.default)(filePath)) { const { start, end } = source.range; const { codeFrameColumns } = require('next/dist/compiled/babel/code-frame'); message += codeFrameColumns(source.source.content, { start: { line: start.line + 1, column: start.column + 1 }, end: { line: end.line + 1, column: end.column + 1 } }, { forceColor: true }).trim() + '\n\n'; } if (description) { if (description.type === 'text' && description.value.includes("Cannot find module 'sass'")) { message += "To use Next.js' built-in Sass support, you first need to install `sass`.\n"; message += 'Run `npm i sass` or `yarn add sass` inside your workspace.\n'; message += '\nLearn more: https://nextjs.org/docs/messages/install-sass'; } else { message += renderStyledStringToErrorAnsi(description) + '\n\n'; } } // TODO: make it possible to enable this for debugging, but not in tests. // if (detail) { // message += renderStyledStringToErrorAnsi(detail) + '\n\n' // } if (importTraces == null ? void 0 : importTraces.length) { // This is the same logic as in turbopack/crates/turbopack-cli-utils/src/issue.rs if (importTraces.length === 1) { const trace = importTraces[0]; // We only display the layer if there is more than one for the trace message += "Import trace:\n" + formatIssueTrace(trace, ' ', !identicalLayers(trace)); } else { // We end up with multiple traces when the file with the error is reachable from multiple // different entry points (e.g. ssr, client) message += 'Import traces:\n'; const everyTraceHasADistinctRootLayer = new Set(importTraces.map(leafLayerName).filter((l)=>l != null)).size === importTraces.length; for(let i = 0; i < importTraces.length; i++){ const trace = importTraces[i]; const layer = leafLayerName(trace); if (everyTraceHasADistinctRootLayer) { message += " " + layer + ":\n"; } else { message += " #" + (i + 1); if (layer) { message += " [" + layer + "]"; } message += ':\n'; } message += formatIssueTrace(trace, ' ', !identicalLayers(trace)); } } } if (documentationLink) { message += documentationLink + '\n\n'; } return message;}/** Returns the first present layer name in the trace */ function leafLayerName(items) { for (const item of items){ const layer = item.layer; if (layer != null) return layer; } return undefined;}/** * Returns whether or not all items share the same layer. * If a layer is absent we ignore it in this analysis */ function identicalLayers(items) { const firstPresentLayer = items.findIndex((t)=>t.layer != null); if (firstPresentLayer === -1) return true // all layers are absent ; const layer = items[firstPresentLayer].layer; for(let i = firstPresentLayer + 1; i < items.length; i++){ const itemLayer = items[i].layer; if (itemLayer == null || itemLayer !== layer) { return false; } } return true;}function formatIssueTrace(items, indent, printLayers) { return items.map((item)=>{ let r = indent; if (item.fsName !== 'project') { r += "[" + item.fsName + "]/"; } else { // This is consistent with webpack's output r += './'; } r += item.path; if (printLayers && item.layer) { r += " [" + item.layer + "]"; } return r; }).join('\n') + '\n\n';}function isRelevantWarning(issue) { return issue.severity === 'warning' && !isNodeModulesIssue(issue);}function isNodeModulesIssue(issue) { if (issue.severity === 'warning' && issue.stage === 'config') { // Override for the externalize issue // `Package foo (serverExternalPackages or default list) can't be external` if (renderStyledStringToErrorAnsi(issue.title).includes("can't be external")) { return false; } } return issue.severity === 'warning' && (issue.filePath.match(/^(?:.*[\\/])?node_modules(?:[\\/].*)?$/) !== null || // Ignore Next.js itself when running next directly in the monorepo where it is not inside // node_modules anyway. // TODO(mischnic) prevent matches when this is published to npm issue.filePath.startsWith('[project]/packages/next/'));}function renderStyledStringToErrorAnsi(string) { function decodeMagicIdentifiers(str) { return str.replaceAll(_magicidentifier.MAGIC_IDENTIFIER_REGEX, (ident)=>{ try { return (0, _picocolors.magenta)("{" + (0, _magicidentifier.decodeMagicIdentifier)(ident) + "}"); } catch (e) { return (0, _picocolors.magenta)("{" + ident + " (decoding failed: " + e + ")}"); } }); } switch(string.type){ case 'text': return decodeMagicIdentifiers(string.value); case 'strong': return (0, _picocolors.bold)((0, _picocolors.red)(decodeMagicIdentifiers(string.value))); case 'code': return (0, _picocolors.green)(decodeMagicIdentifiers(string.value)); case 'line': return string.value.map(renderStyledStringToErrorAnsi).join(''); case 'stack': return string.value.map(renderStyledStringToErrorAnsi).join('\n'); default: throw Object.defineProperty(new Error('Unknown StyledString type', string), "__NEXT_ERROR_CODE", { value: "E138", enumerable: false, configurable: true }); }}function isPersistentCachingEnabled(config) { var _config_experimental; return ((_config_experimental = config.experimental) == null ? void 0 : _config_experimental.turbopackPersistentCaching) || false;}
//# sourceMappingURL=utils.js.map123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211"use strict";Object.defineProperty(exports, "__esModule", { value: true});0 && (module.exports = { DecodeError: null, MiddlewareNotFoundError: null, MissingStaticPage: null, NormalizeError: null, PageNotFoundError: null, SP: null, ST: null, WEB_VITALS: null, execOnce: null, getDisplayName: null, getLocationOrigin: null, getURL: null, isAbsoluteUrl: null, isResSent: null, loadGetInitialProps: null, normalizeRepeatedSlashes: null, stringifyError: null});function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] });}_export(exports, { DecodeError: function() { return DecodeError; }, MiddlewareNotFoundError: function() { return MiddlewareNotFoundError; }, MissingStaticPage: function() { return MissingStaticPage; }, NormalizeError: function() { return NormalizeError; }, PageNotFoundError: function() { return PageNotFoundError; }, SP: function() { return SP; }, ST: function() { return ST; }, WEB_VITALS: function() { return WEB_VITALS; }, execOnce: function() { return execOnce; }, getDisplayName: function() { return getDisplayName; }, getLocationOrigin: function() { return getLocationOrigin; }, getURL: function() { return getURL; }, isAbsoluteUrl: function() { return isAbsoluteUrl; }, isResSent: function() { return isResSent; }, loadGetInitialProps: function() { return loadGetInitialProps; }, normalizeRepeatedSlashes: function() { return normalizeRepeatedSlashes; }, stringifyError: function() { return stringifyError; }});const WEB_VITALS = [ 'CLS', 'FCP', 'FID', 'INP', 'LCP', 'TTFB'];function execOnce(fn) { let used = false; let result; return function() { for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){ args[_key] = arguments[_key]; } if (!used) { used = true; result = fn(...args); } return result; };}// Scheme: https://tools.ietf.org/html/rfc3986#section-3.1// Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3const ABSOLUTE_URL_REGEX = /^[a-zA-Z][a-zA-Z\d+\-.]*?:/;const isAbsoluteUrl = (url)=>ABSOLUTE_URL_REGEX.test(url);function getLocationOrigin() { const { protocol, hostname, port } = window.location; return protocol + "//" + hostname + (port ? ':' + port : '');}function getURL() { const { href } = window.location; const origin = getLocationOrigin(); return href.substring(origin.length);}function getDisplayName(Component) { return typeof Component === 'string' ? Component : Component.displayName || Component.name || 'Unknown';}function isResSent(res) { return res.finished || res.headersSent;}function normalizeRepeatedSlashes(url) { const urlParts = url.split('?'); const urlNoQuery = urlParts[0]; return urlNoQuery// first we replace any non-encoded backslashes with forward // then normalize repeated forward slashes .replace(/\\/g, '/').replace(/\/\/+/g, '/') + (urlParts[1] ? "?" + urlParts.slice(1).join('?') : '');}async function loadGetInitialProps(App, ctx) { if (process.env.NODE_ENV !== 'production') { var _App_prototype; if ((_App_prototype = App.prototype) == null ? void 0 : _App_prototype.getInitialProps) { const message = '"' + getDisplayName(App) + '.getInitialProps()" is defined as an instance method - visit https://nextjs.org/docs/messages/get-initial-props-as-an-instance-method for more information.'; throw Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } } // when called from _app `ctx` is nested in `ctx` const res = ctx.res || ctx.ctx && ctx.ctx.res; if (!App.getInitialProps) { if (ctx.ctx && ctx.Component) { // @ts-ignore pageProps default return { pageProps: await loadGetInitialProps(ctx.Component, ctx.ctx) }; } return {}; } const props = await App.getInitialProps(ctx); if (res && isResSent(res)) { return props; } if (!props) { const message = '"' + getDisplayName(App) + '.getInitialProps()" should resolve to an object. But found "' + props + '" instead.'; throw Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } if (process.env.NODE_ENV !== 'production') { if (Object.keys(props).length === 0 && !ctx.ctx) { console.warn("" + getDisplayName(App) + " returned an empty object from `getInitialProps`. This de-optimizes and prevents automatic static optimization. https://nextjs.org/docs/messages/empty-object-getInitialProps"); } } return props;}const SP = typeof performance !== 'undefined';const ST = SP && [ 'mark', 'measure', 'getEntriesByName'].every((method)=>typeof performance[method] === 'function');class DecodeError extends Error {}class NormalizeError extends Error {}class PageNotFoundError extends Error { constructor(page){ super(); this.code = 'ENOENT'; this.name = 'PageNotFoundError'; this.message = "Cannot find module for page: " + page; }}class MissingStaticPage extends Error { constructor(page, message){ super(); this.message = "Failed to load static file for page: " + page + " " + message; }}class MiddlewareNotFoundError extends Error { constructor(){ super(); this.code = 'ENOENT'; this.message = "Cannot find the middleware module"; }}function stringifyError(error) { return JSON.stringify({ message: error.message, stack: error.stack });}
//# sourceMappingURL=utils.js.map12345678910111213141516171819202122"use strict";Object.defineProperty(exports, "__esModule", { value: true});Object.defineProperty(exports, "warnOnce", { enumerable: true, get: function() { return warnOnce; }});let warnOnce = (_)=>{};if (process.env.NODE_ENV !== 'production') { const warnings = new Set(); warnOnce = (msg)=>{ if (!warnings.has(msg)) { console.warn(msg); } warnings.add(msg); };}
//# sourceMappingURL=warn-once.js.map123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101"use strict";Object.defineProperty(exports, "__esModule", { value: true});0 && (module.exports = { formatZodError: null, normalizeZodErrors: null, reportZodError: null});function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] });}_export(exports, { formatZodError: function() { return formatZodError; }, normalizeZodErrors: function() { return normalizeZodErrors; }, reportZodError: function() { return reportZodError; }});const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");const _zod = require("next/dist/compiled/zod");const _zodvalidationerror = require("next/dist/compiled/zod-validation-error");const _log = /*#__PURE__*/ _interop_require_wildcard._(require("../../build/output/log"));function processZodErrorMessage(issue) { let message = issue.message; let path; if (issue.path.length > 0) { if (issue.path.length === 1) { const identifier = issue.path[0]; if (typeof identifier === 'number') { // The first identifier inside path is a number path = "index " + identifier; } else { path = '"' + identifier + '"'; } } else { // joined path to be shown in the error message path = '"' + issue.path.reduce((acc, cur)=>{ if (typeof cur === 'number') { // array index return acc + "[" + cur + "]"; } if (cur.includes('"')) { // escape quotes return acc + '["' + cur.replaceAll('"', '\\"') + '"]'; } // dot notation const separator = acc.length === 0 ? '' : '.'; return acc + separator + cur; }, '') + '"'; } } else { path = ''; } if (issue.code === 'invalid_type' && issue.received === _zod.ZodParsedType.undefined) { // Missing key in object. return path + " is missing, expected " + issue.expected; } if (issue.code === 'invalid_enum_value') { // Remove "Invalid enum value" prefix from zod default error message return "Expected " + _zod.util.joinValues(issue.options) + ", received '" + issue.received + "' at " + path; } return message + (path ? " at " + path : '');}function normalizeZodErrors(error) { return error.issues.flatMap((issue)=>{ const issues = [ { issue, message: processZodErrorMessage(issue) } ]; if ('unionErrors' in issue) { for (const unionError of issue.unionErrors){ issues.push(...normalizeZodErrors(unionError)); } } return issues; });}function formatZodError(prefix, error) { return Object.defineProperty(new Error((0, _zodvalidationerror.fromZodError)(error, { prefix: prefix }).toString()), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true });}function reportZodError(prefix, error) { _log.error(formatZodError(prefix, error).message);}
//# sourceMappingURL=zod.js.map1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889"use strict";Object.defineProperty(exports, "__esModule", { value: true});Object.defineProperty(exports, "getAnonymousMeta", { enumerable: true, get: function() { return getAnonymousMeta; }});const _isdocker = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/is-docker"));const _iswsl = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/is-wsl"));const _os = /*#__PURE__*/ _interop_require_default(require("os"));const _ciinfo = /*#__PURE__*/ _interop_require_wildcard(require("../server/ci-info"));function _interop_require_default(obj) { return obj && obj.__esModule ? obj : { default: obj };}function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop);}function _interop_require_wildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = { __proto__: null }; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for(var key in obj){ if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj;}let traits;function getAnonymousMeta() { if (traits) { return traits; } const cpus = _os.default.cpus() || []; const { NOW_REGION } = process.env; traits = { // Software information systemPlatform: _os.default.platform(), systemRelease: _os.default.release(), systemArchitecture: _os.default.arch(), // Machine information cpuCount: cpus.length, cpuModel: cpus.length ? cpus[0].model : null, cpuSpeed: cpus.length ? cpus[0].speed : null, memoryInMb: Math.trunc(_os.default.totalmem() / Math.pow(1024, 2)), // Environment information isDocker: (0, _isdocker.default)(), isNowDev: NOW_REGION === 'dev1', isWsl: _iswsl.default, isCI: _ciinfo.isCI, ciName: _ciinfo.isCI && _ciinfo.name || null, nextVersion: "15.4.3" }; return traits;}
//# sourceMappingURL=anonymous-meta.js.map1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253"use strict";Object.defineProperty(exports, "__esModule", { value: true});const _fs = /*#__PURE__*/ _interop_require_default(require("fs"));const _path = /*#__PURE__*/ _interop_require_default(require("path"));const _storage = require("./storage");const _config = /*#__PURE__*/ _interop_require_default(require("../server/config"));const _getprojectdir = require("../lib/get-project-dir");const _constants = require("../shared/lib/constants");function _interop_require_default(obj) { return obj && obj.__esModule ? obj : { default: obj };}(async ()=>{ const args = [ ...process.argv ]; let dir = args.pop(); const mode = args.pop(); if (!dir || mode !== 'dev') { throw Object.defineProperty(new Error(`Invalid flags should be run as node detached-flush dev ./path-to/project`), "__NEXT_ERROR_CODE", { value: "E24", enumerable: false, configurable: true }); } dir = (0, _getprojectdir.getProjectDir)(dir); const config = await (0, _config.default)(_constants.PHASE_DEVELOPMENT_SERVER, dir); const distDir = _path.default.join(dir, config.distDir || '.next'); const eventsPath = _path.default.join(distDir, '_events.json'); let events; try { events = JSON.parse(_fs.default.readFileSync(eventsPath, 'utf8')); } catch (err) { if (err.code === 'ENOENT') { // no events to process we can exit now process.exit(0); } throw err; } const telemetry = new _storage.Telemetry({ distDir }); await telemetry.record(events); await telemetry.flush(); // finished flushing events clean-up/exit _fs.default.unlinkSync(eventsPath); process.exit(0);})();
//# sourceMappingURL=detached-flush.js.map123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144"use strict";Object.defineProperty(exports, "__esModule", { value: true});0 && (module.exports = { ERROR_THROWN_EVENT: null, EVENT_BUILD_FEATURE_USAGE: null, EVENT_NAME_PACKAGE_USED_IN_GET_SERVER_SIDE_PROPS: null, eventBuildCompleted: null, eventBuildFailed: null, eventBuildFeatureUsage: null, eventBuildOptimize: null, eventErrorThrown: null, eventLintCheckCompleted: null, eventPackageUsedInGetServerSideProps: null, eventTypeCheckCompleted: null});function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] });}_export(exports, { ERROR_THROWN_EVENT: function() { return ERROR_THROWN_EVENT; }, EVENT_BUILD_FEATURE_USAGE: function() { return EVENT_BUILD_FEATURE_USAGE; }, EVENT_NAME_PACKAGE_USED_IN_GET_SERVER_SIDE_PROPS: function() { return EVENT_NAME_PACKAGE_USED_IN_GET_SERVER_SIDE_PROPS; }, eventBuildCompleted: function() { return eventBuildCompleted; }, eventBuildFailed: function() { return eventBuildFailed; }, eventBuildFeatureUsage: function() { return eventBuildFeatureUsage; }, eventBuildOptimize: function() { return eventBuildOptimize; }, eventErrorThrown: function() { return eventErrorThrown; }, eventLintCheckCompleted: function() { return eventLintCheckCompleted; }, eventPackageUsedInGetServerSideProps: function() { return eventPackageUsedInGetServerSideProps; }, eventTypeCheckCompleted: function() { return eventTypeCheckCompleted; }});const _errortelemetryutils = require("../../lib/error-telemetry-utils");const REGEXP_DIRECTORY_DUNDER = /[\\/]__[^\\/]+(?<![\\/]__(?:tests|mocks))__[\\/]/i;const REGEXP_DIRECTORY_TESTS = /[\\/]__(tests|mocks)__[\\/]/i;const REGEXP_FILE_TEST = /\.(?:spec|test)\.[^.]+$/i;const EVENT_TYPE_CHECK_COMPLETED = 'NEXT_TYPE_CHECK_COMPLETED';function eventTypeCheckCompleted(event) { return { eventName: EVENT_TYPE_CHECK_COMPLETED, payload: event };}const EVENT_LINT_CHECK_COMPLETED = 'NEXT_LINT_CHECK_COMPLETED';function eventLintCheckCompleted(event) { return { eventName: EVENT_LINT_CHECK_COMPLETED, payload: event };}const EVENT_BUILD_COMPLETED = 'NEXT_BUILD_COMPLETED';function eventBuildCompleted(pagePaths, event) { return { eventName: EVENT_BUILD_COMPLETED, payload: { ...event, totalPageCount: pagePaths.length, hasDunderPages: pagePaths.some((path)=>REGEXP_DIRECTORY_DUNDER.test(path)), hasTestPages: pagePaths.some((path)=>REGEXP_DIRECTORY_TESTS.test(path) || REGEXP_FILE_TEST.test(path)), totalAppPagesCount: event.totalAppPagesCount } };}const EVENT_BUILD_FAILED = 'NEXT_BUILD_FAILED';function eventBuildFailed(event) { return { eventName: EVENT_BUILD_FAILED, payload: event };}const EVENT_BUILD_OPTIMIZED = 'NEXT_BUILD_OPTIMIZED';function eventBuildOptimize(pagePaths, event) { return { eventName: EVENT_BUILD_OPTIMIZED, payload: { ...event, totalPageCount: pagePaths.length, hasDunderPages: pagePaths.some((path)=>REGEXP_DIRECTORY_DUNDER.test(path)), hasTestPages: pagePaths.some((path)=>REGEXP_DIRECTORY_TESTS.test(path) || REGEXP_FILE_TEST.test(path)), totalAppPagesCount: event.totalAppPagesCount, staticAppPagesCount: event.staticAppPagesCount, serverAppPagesCount: event.serverAppPagesCount, edgeRuntimeAppCount: event.edgeRuntimeAppCount, edgeRuntimePagesCount: event.edgeRuntimePagesCount, isRspack: process.env.NEXT_RSPACK !== undefined } };}const EVENT_BUILD_FEATURE_USAGE = 'NEXT_BUILD_FEATURE_USAGE';function eventBuildFeatureUsage(usages) { return usages.map(({ featureName, invocationCount })=>({ eventName: EVENT_BUILD_FEATURE_USAGE, payload: { featureName, invocationCount } }));}const EVENT_NAME_PACKAGE_USED_IN_GET_SERVER_SIDE_PROPS = 'NEXT_PACKAGE_USED_IN_GET_SERVER_SIDE_PROPS';function eventPackageUsedInGetServerSideProps(packagesUsedInServerSideProps) { return packagesUsedInServerSideProps.map((packageName)=>({ eventName: EVENT_NAME_PACKAGE_USED_IN_GET_SERVER_SIDE_PROPS, payload: { package: packageName } }));}const ERROR_THROWN_EVENT = 'NEXT_ERROR_THROWN';function eventErrorThrown(error) { return { eventName: ERROR_THROWN_EVENT, payload: { errorCode: (0, _errortelemetryutils.extractNextErrorCode)(error) || 'Unknown' } };}
//# sourceMappingURL=build.js.map12345678910111213141516171819202122232425262728293031"use strict";Object.defineProperty(exports, "__esModule", { value: true});0 && (module.exports = { eventErrorFeedback: null, eventNameErrorFeedback: null});function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] });}_export(exports, { eventErrorFeedback: function() { return eventErrorFeedback; }, eventNameErrorFeedback: function() { return eventNameErrorFeedback; }});const eventNameErrorFeedback = 'NEXT_ERROR_FEEDBACK';function eventErrorFeedback(event) { return { eventName: eventNameErrorFeedback, payload: event };}
//# sourceMappingURL=error-feedback.js.map1234567891011121314151617181920212223"use strict";Object.defineProperty(exports, "__esModule", { value: true});0 && __export(require("./version")) && __export(require("./build")) && __export(require("./plugins"));_export_star(require("./version"), exports);_export_star(require("./build"), exports);_export_star(require("./plugins"), exports);function _export_star(from, to) { Object.keys(from).forEach(function(k) { if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) { Object.defineProperty(to, k, { enumerable: true, get: function() { return from[k]; } }); } }); return from;}
//# sourceMappingURL=index.js.map123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051"use strict";Object.defineProperty(exports, "__esModule", { value: true});Object.defineProperty(exports, "eventNextPlugins", { enumerable: true, get: function() { return eventNextPlugins; }});const _findup = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/find-up"));function _interop_require_default(obj) { return obj && obj.__esModule ? obj : { default: obj };}const EVENT_PLUGIN_PRESENT = 'NEXT_PACKAGE_DETECTED';async function eventNextPlugins(dir) { try { const packageJsonPath = await (0, _findup.default)('package.json', { cwd: dir }); if (!packageJsonPath) { return []; } const { dependencies = {}, devDependencies = {} } = require(packageJsonPath); const deps = { ...devDependencies, ...dependencies }; return Object.keys(deps).reduce((events, plugin)=>{ const version = deps[plugin]; // Don't add deps without a version set if (!version) { return events; } events.push({ eventName: EVENT_PLUGIN_PRESENT, payload: { packageName: plugin, packageVersion: version } }); return events; }, []); } catch (_) { return []; }}
//# sourceMappingURL=plugins.js.map12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455"use strict";Object.defineProperty(exports, "__esModule", { value: true});Object.defineProperty(exports, "eventSwcLoadFailure", { enumerable: true, get: function() { return eventSwcLoadFailure; }});const _shared = require("../../trace/shared");const _packagejson = require("next/package.json");const EVENT_PLUGIN_PRESENT = 'NEXT_SWC_LOAD_FAILURE';async function eventSwcLoadFailure(event) { const telemetry = _shared.traceGlobals.get('telemetry'); // can't continue if telemetry isn't set if (!telemetry) return; let glibcVersion; let installedSwcPackages; try { var _process_report; // @ts-ignore glibcVersion = (_process_report = process.report) == null ? void 0 : _process_report.getReport().header.glibcVersionRuntime; } catch {} try { const pkgNames = Object.keys(_packagejson.optionalDependencies || {}).filter((pkg)=>pkg.startsWith('@next/swc')); const installedPkgs = []; for (const pkg of pkgNames){ try { const { version } = require(`${pkg}/package.json`); installedPkgs.push(`${pkg}@${version}`); } catch {} } if (installedPkgs.length > 0) { installedSwcPackages = installedPkgs.sort().join(','); } } catch {} telemetry.record({ eventName: EVENT_PLUGIN_PRESENT, payload: { nextVersion: _packagejson.version, glibcVersion, installedSwcPackages, arch: process.arch, platform: process.platform, nodeVersion: process.versions.node, wasm: event == null ? void 0 : event.wasm, nativeBindingsErrorCode: event == null ? void 0 : event.nativeBindingsErrorCode } }); // ensure this event is flushed before process exits await telemetry.flush();}
//# sourceMappingURL=swc-load-failure.js.map123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990"use strict";Object.defineProperty(exports, "__esModule", { value: true});Object.defineProperty(exports, "eventCliSession", { enumerable: true, get: function() { return eventCliSession; }});const _path = /*#__PURE__*/ _interop_require_default(require("path"));function _interop_require_default(obj) { return obj && obj.__esModule ? obj : { default: obj };}const EVENT_VERSION = 'NEXT_CLI_SESSION_STARTED';function hasBabelConfig(dir) { try { var _res_options_presets, _res_options, _res_options_plugins, _res_options1; const noopFile = _path.default.join(dir, 'noop.js'); const res = require('next/dist/compiled/babel/core').loadPartialConfig({ cwd: dir, filename: noopFile, sourceFileName: noopFile }); const isForTooling = ((_res_options = res.options) == null ? void 0 : (_res_options_presets = _res_options.presets) == null ? void 0 : _res_options_presets.every((e)=>{ var _e_file; return (e == null ? void 0 : (_e_file = e.file) == null ? void 0 : _e_file.request) === 'next/babel'; })) && ((_res_options1 = res.options) == null ? void 0 : (_res_options_plugins = _res_options1.plugins) == null ? void 0 : _res_options_plugins.length) === 0; return res.hasFilesystemConfig() && !isForTooling; } catch { return false; }}function eventCliSession(dir, nextConfig, event) { var _nextConfig_experimental_staleTimes, _nextConfig_experimental_staleTimes1, _nextConfig_experimental_reactCompiler, _nextConfig_experimental_reactCompiler1; // This should be an invariant, if it fails our build tooling is broken. if (typeof "15.4.3" !== 'string') { return []; } const { images, i18n } = nextConfig || {}; const payload = { nextVersion: "15.4.3", nodeVersion: process.version, cliCommand: event.cliCommand, isSrcDir: event.isSrcDir, hasNowJson: event.hasNowJson, isCustomServer: event.isCustomServer, hasNextConfig: nextConfig.configOrigin !== 'default', buildTarget: 'default', hasWebpackConfig: typeof (nextConfig == null ? void 0 : nextConfig.webpack) === 'function', hasBabelConfig: hasBabelConfig(dir), imageEnabled: !!images, imageFutureEnabled: !!images, basePathEnabled: !!(nextConfig == null ? void 0 : nextConfig.basePath), i18nEnabled: !!i18n, locales: (i18n == null ? void 0 : i18n.locales) ? i18n.locales.join(',') : null, localeDomainsCount: (i18n == null ? void 0 : i18n.domains) ? i18n.domains.length : null, localeDetectionEnabled: !i18n ? null : i18n.localeDetection !== false, imageDomainsCount: (images == null ? void 0 : images.domains) ? images.domains.length : null, imageRemotePatternsCount: (images == null ? void 0 : images.remotePatterns) ? images.remotePatterns.length : null, imageLocalPatternsCount: (images == null ? void 0 : images.localPatterns) ? images.localPatterns.length : null, imageSizes: (images == null ? void 0 : images.imageSizes) ? images.imageSizes.join(',') : null, imageQualities: (images == null ? void 0 : images.qualities) ? images.qualities.join(',') : null, imageLoader: images == null ? void 0 : images.loader, imageFormats: (images == null ? void 0 : images.formats) ? images.formats.join(',') : null, nextConfigOutput: (nextConfig == null ? void 0 : nextConfig.output) || null, trailingSlashEnabled: !!(nextConfig == null ? void 0 : nextConfig.trailingSlash), reactStrictMode: !!(nextConfig == null ? void 0 : nextConfig.reactStrictMode), webpackVersion: event.webpackVersion || null, turboFlag: event.turboFlag || false, isRspack: process.env.NEXT_RSPACK !== undefined, appDir: event.appDir, pagesDir: event.pagesDir, staticStaleTime: ((_nextConfig_experimental_staleTimes = nextConfig.experimental.staleTimes) == null ? void 0 : _nextConfig_experimental_staleTimes.static) ?? null, dynamicStaleTime: ((_nextConfig_experimental_staleTimes1 = nextConfig.experimental.staleTimes) == null ? void 0 : _nextConfig_experimental_staleTimes1.dynamic) ?? null, reactCompiler: Boolean(nextConfig.experimental.reactCompiler), reactCompilerCompilationMode: typeof nextConfig.experimental.reactCompiler !== 'boolean' ? ((_nextConfig_experimental_reactCompiler = nextConfig.experimental.reactCompiler) == null ? void 0 : _nextConfig_experimental_reactCompiler.compilationMode) ?? null : null, reactCompilerPanicThreshold: typeof nextConfig.experimental.reactCompiler !== 'boolean' ? ((_nextConfig_experimental_reactCompiler1 = nextConfig.experimental.reactCompiler) == null ? void 0 : _nextConfig_experimental_reactCompiler1.panicThreshold) ?? null : null }; return [ { eventName: EVENT_VERSION, payload } ];}
//# sourceMappingURL=version.js.map1234567891011121314151617181920"use strict";Object.defineProperty(exports, "__esModule", { value: true});Object.defineProperty(exports, "flushAndExit", { enumerable: true, get: function() { return flushAndExit; }});const _shared = require("../trace/shared");async function flushAndExit(code) { let telemetry = _shared.traceGlobals.get('telemetry'); if (telemetry) { await telemetry.flush(); } process.exit(code);}
//# sourceMappingURL=flush-and-exit.js.map123456789101112131415161718192021222324252627282930313233343536373839404142434445464748"use strict";Object.defineProperty(exports, "__esModule", { value: true});Object.defineProperty(exports, "postNextTelemetryPayload", { enumerable: true, get: function() { return postNextTelemetryPayload; }});const _asyncretry = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/async-retry"));function _interop_require_default(obj) { return obj && obj.__esModule ? obj : { default: obj };}function postNextTelemetryPayload(payload, signal) { if (!signal && 'timeout' in AbortSignal) { signal = AbortSignal.timeout(5000); } return (0, _asyncretry.default)(()=>fetch('https://telemetry.nextjs.org/api/v1/record', { method: 'POST', body: JSON.stringify(payload), headers: { 'content-type': 'application/json' }, signal }).then((res)=>{ if (!res.ok) { const err = Object.defineProperty(new Error(res.statusText), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); err.response = res; throw err; } }), { minTimeout: 500, retries: 1, factor: 1 }).catch(()=>{ // We swallow errors when telemetry cannot be sent })// Ensure promise is voided .then(()=>{}, ()=>{});}
//# sourceMappingURL=post-telemetry-payload.js.map123456789101112131415161718192021222324252627282930313233343536373839404142434445464748"use strict";Object.defineProperty(exports, "__esModule", { value: true});Object.defineProperty(exports, "getRawProjectId", { enumerable: true, get: function() { return getRawProjectId; }});const _child_process = require("child_process");// Q: Why does Next.js need a project ID? Why is it looking at my git remote?// A:// Next.js' telemetry is and always will be completely anonymous. Because of// this, we need a way to differentiate different projects to track feature// usage accurately. For example, to prevent a feature from appearing to be// constantly `used` and then `unused` when switching between local projects.// To reiterate,// we **never** can read your actual git remote. The value is hashed one-way// with random salt data, making it impossible for us to reverse or try to// guess the remote by re-computing hashes.async function _getProjectIdByGit() { try { let resolve, reject; const promise = new Promise((res, rej)=>{ resolve = res; reject = rej; }); (0, _child_process.exec)(`git config --local --get remote.origin.url`, { timeout: 1000, windowsHide: true }, (error, stdout)=>{ if (error) { reject(error); return; } resolve(stdout); }); return String(await promise).trim(); } catch (_) { return null; }}async function getRawProjectId() { return await _getProjectIdByGit() || process.env.REPOSITORY_URL || process.cwd();}
//# sourceMappingURL=project-id.js.map123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288"use strict";Object.defineProperty(exports, "__esModule", { value: true});Object.defineProperty(exports, "Telemetry", { enumerable: true, get: function() { return Telemetry; }});const _picocolors = require("../lib/picocolors");const _conf = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/conf"));const _crypto = require("crypto");const _isdocker = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/is-docker"));const _path = /*#__PURE__*/ _interop_require_default(require("path"));const _anonymousmeta = require("./anonymous-meta");const _ciinfo = /*#__PURE__*/ _interop_require_wildcard(require("../server/ci-info"));const _posttelemetrypayload = require("./post-telemetry-payload");const _projectid = require("./project-id");const _ponyfill = require("next/dist/compiled/@edge-runtime/ponyfill");const _fs = /*#__PURE__*/ _interop_require_default(require("fs"));function _interop_require_default(obj) { return obj && obj.__esModule ? obj : { default: obj };}function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop);}function _interop_require_wildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = { __proto__: null }; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for(var key in obj){ if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj;}// This is the key that stores whether or not telemetry is enabled or disabled.const TELEMETRY_KEY_ENABLED = 'telemetry.enabled';// This is the key that specifies when the user was informed about anonymous// telemetry collection.const TELEMETRY_KEY_NOTIFY_DATE = 'telemetry.notifiedAt';// This is a quasi-persistent identifier used to dedupe recurring events. It's// generated from random data and completely anonymous.const TELEMETRY_KEY_ID = `telemetry.anonymousId`;// This is the cryptographic salt that is included within every hashed value.// This salt value is never sent to us, ensuring privacy and the one-way nature// of the hash (prevents dictionary lookups of pre-computed hashes).// See the `oneWayHash` function.const TELEMETRY_KEY_SALT = `telemetry.salt`;function getStorageDirectory(distDir) { const isLikelyEphemeral = _ciinfo.isCI || (0, _isdocker.default)(); if (isLikelyEphemeral) { return _path.default.join(distDir, 'cache'); } return undefined;}class Telemetry { constructor({ distDir }){ this.notify = ()=>{ if (this.isDisabled || !this.conf) { return; } // The end-user has already been notified about our telemetry integration. We // don't need to constantly annoy them about it. // We will re-inform users about the telemetry if significant changes are // ever made. if (this.conf.get(TELEMETRY_KEY_NOTIFY_DATE, '')) { return; } this.conf.set(TELEMETRY_KEY_NOTIFY_DATE, Date.now().toString()); console.log(`${(0, _picocolors.magenta)((0, _picocolors.bold)('Attention'))}: Next.js now collects completely anonymous telemetry regarding usage.`); console.log(`This information is used to shape Next.js' roadmap and prioritize features.`); console.log(`You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:`); console.log((0, _picocolors.cyan)('https://nextjs.org/telemetry')); console.log(); }; this.setEnabled = (_enabled)=>{ const enabled = !!_enabled; this.conf && this.conf.set(TELEMETRY_KEY_ENABLED, enabled); return this.conf && this.conf.path; }; this.oneWayHash = (payload)=>{ const hash = (0, _crypto.createHash)('sha256'); // Always prepend the payload value with salt. This ensures the hash is truly // one-way. hash.update(this.salt); // Update is an append operation, not a replacement. The salt from the prior // update is still present! hash.update(payload); return hash.digest('hex'); }; this.record = (_events, deferred)=>{ const prom = (deferred ? // flushDetached we can skip starting the initial // submitRecord which will then be cancelled new Promise((resolve)=>resolve({ isFulfilled: true, isRejected: false, value: _events })) : this.submitRecord(_events)).then((value)=>({ isFulfilled: true, isRejected: false, value })).catch((reason)=>({ isFulfilled: false, isRejected: true, reason }))// Acts as `Promise#finally` because `catch` transforms the error .then((res)=>{ // Clean up the event to prevent unbounded `Set` growth if (!deferred) { this.queue.delete(prom); } return res; }); prom._events = Array.isArray(_events) ? _events : [ _events ]; prom._controller = prom._controller; // Track this `Promise` so we can flush pending events this.queue.add(prom); return prom; }; this.flush = async ()=>Promise.all(this.queue).catch(()=>null); // writes current events to disk and spawns separate // detached process to submit the records without blocking // the main process from exiting this.flushDetached = (mode, dir)=>{ const allEvents = []; this.queue.forEach((item)=>{ try { var _item__controller; (_item__controller = item._controller) == null ? void 0 : _item__controller.abort(); allEvents.push(...item._events); } catch (_) { // if we fail to abort ignore this event } }); _fs.default.mkdirSync(this.distDir, { recursive: true }); _fs.default.writeFileSync(_path.default.join(this.distDir, '_events.json'), JSON.stringify(allEvents)); // Note: cross-spawn is not used here as it causes // a new command window to appear when we don't want it to const child_process = require('child_process'); // we use spawnSync when debugging to ensure logs are piped // correctly to stdout/stderr const spawn = this.NEXT_TELEMETRY_DEBUG ? child_process.spawnSync : child_process.spawn; spawn(process.execPath, [ require.resolve('./detached-flush'), mode, dir ], { detached: !this.NEXT_TELEMETRY_DEBUG, windowsHide: true, shell: false, ...this.NEXT_TELEMETRY_DEBUG ? { stdio: 'inherit' } : {} }); }; this.submitRecord = async (_events)=>{ let events; if (Array.isArray(_events)) { events = _events; } else { events = [ _events ]; } if (events.length < 1) { return Promise.resolve(); } if (this.NEXT_TELEMETRY_DEBUG) { // Print to standard error to simplify selecting the output events.forEach(({ eventName, payload })=>console.error(`[telemetry] ` + JSON.stringify({ eventName, payload }, null, 2))); // Do not send the telemetry data if debugging. Users may use this feature // to preview what data would be sent. return Promise.resolve(); } // Skip recording telemetry if the feature is disabled if (this.isDisabled) { return Promise.resolve(); } const postController = new _ponyfill.AbortController(); const res = (0, _posttelemetrypayload.postNextTelemetryPayload)({ context: { anonymousId: this.anonymousId, projectId: await this.getProjectId(), sessionId: this.sessionId }, meta: (0, _anonymousmeta.getAnonymousMeta)(), events: events.map(({ eventName, payload })=>({ eventName, fields: payload })) }, postController.signal); res._controller = postController; return res; }; // Read in the constructor so that .env can be loaded before reading const { NEXT_TELEMETRY_DISABLED, NEXT_TELEMETRY_DEBUG } = process.env; this.NEXT_TELEMETRY_DISABLED = NEXT_TELEMETRY_DISABLED; this.NEXT_TELEMETRY_DEBUG = NEXT_TELEMETRY_DEBUG; this.distDir = distDir; const storageDirectory = getStorageDirectory(distDir); try { // `conf` incorrectly throws a permission error during initialization // instead of waiting for first use. We need to handle it, otherwise the // process may crash. this.conf = new _conf.default({ projectName: 'nextjs', cwd: storageDirectory }); } catch (_) { this.conf = null; } this.sessionId = (0, _crypto.randomBytes)(32).toString('hex'); this.queue = new Set(); this.notify(); } get anonymousId() { const val = this.conf && this.conf.get(TELEMETRY_KEY_ID); if (val) { return val; } const generated = (0, _crypto.randomBytes)(32).toString('hex'); this.conf && this.conf.set(TELEMETRY_KEY_ID, generated); return generated; } get salt() { const val = this.conf && this.conf.get(TELEMETRY_KEY_SALT); if (val) { return val; } const generated = (0, _crypto.randomBytes)(16).toString('hex'); this.conf && this.conf.set(TELEMETRY_KEY_SALT, generated); return generated; } get isDisabled() { if (!!this.NEXT_TELEMETRY_DISABLED || !this.conf) { return true; } return this.conf.get(TELEMETRY_KEY_ENABLED, true) === false; } get isEnabled() { return !this.NEXT_TELEMETRY_DISABLED && !!this.conf && this.conf.get(TELEMETRY_KEY_ENABLED, true) !== false; } async getProjectId() { this.loadProjectId = this.loadProjectId || (0, _projectid.getRawProjectId)(); return this.oneWayHash(await this.loadProjectId); }}
//# sourceMappingURL=storage.js.map123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354"use strict";Object.defineProperty(exports, "__esModule", { value: true});0 && (module.exports = { Span: null, SpanStatus: null, exportTraceState: null, flushAllTraces: null, getTraceEvents: null, initializeTraceState: null, recordTraceEvents: null, setGlobal: null, trace: null});function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] });}_export(exports, { Span: function() { return _trace.Span; }, SpanStatus: function() { return _trace.SpanStatus; }, exportTraceState: function() { return _trace.exportTraceState; }, flushAllTraces: function() { return _trace.flushAllTraces; }, getTraceEvents: function() { return _trace.getTraceEvents; }, initializeTraceState: function() { return _trace.initializeTraceState; }, recordTraceEvents: function() { return _trace.recordTraceEvents; }, setGlobal: function() { return _shared.setGlobal; }, trace: function() { return _trace.trace; }});const _trace = require("./trace");const _shared = require("./shared");
//# sourceMappingURL=index.js.map1234567891011121314151617181920212223242526272829303132333435"use strict";Object.defineProperty(exports, "__esModule", { value: true});Object.defineProperty(exports, "reporter", { enumerable: true, get: function() { return reporter; }});const _totelemetry = /*#__PURE__*/ _interop_require_default(require("./to-telemetry"));const _tojson = /*#__PURE__*/ _interop_require_default(require("./to-json"));function _interop_require_default(obj) { return obj && obj.__esModule ? obj : { default: obj };}class MultiReporter { constructor(reporters){ this.reporters = []; this.reporters = reporters; } async flushAll(opts) { await Promise.all(this.reporters.map((reporter)=>reporter.flushAll(opts))); } report(event) { this.reporters.forEach((reporter)=>reporter.report(event)); }}const reporter = new MultiReporter([ _tojson.default, _totelemetry.default]);
//# sourceMappingURL=index.js.map123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157"use strict";Object.defineProperty(exports, "__esModule", { value: true});0 && (module.exports = { batcher: null, default: null});function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] });}_export(exports, { batcher: function() { return batcher; }, default: function() { return _default; }});const _shared = require("../shared");const _fs = /*#__PURE__*/ _interop_require_default(require("fs"));const _path = /*#__PURE__*/ _interop_require_default(require("path"));const _constants = require("../../shared/lib/constants");function _interop_require_default(obj) { return obj && obj.__esModule ? obj : { default: obj };}// eslint-disable-next-line @typescript-eslint/no-unused-varsconst localEndpoint = { serviceName: 'nextjs', ipv4: '127.0.0.1', port: 9411};function batcher(reportEvents) { const events = []; // Promise queue to ensure events are always sent on flushAll const queue = new Set(); return { flushAll: async ()=>{ await Promise.all(queue); if (events.length > 0) { await reportEvents(events); events.length = 0; } }, report: (event)=>{ events.push(event); if (events.length > 100) { const evts = events.slice(); events.length = 0; const report = reportEvents(evts); queue.add(report); report.then(()=>queue.delete(report)); } } };}let writeStream;let batch;const writeStreamOptions = { flags: 'a', encoding: 'utf8'};class RotatingWriteStream { constructor(file, sizeLimit){ this.file = file; this.size = 0; this.sizeLimit = sizeLimit; this.createWriteStream(); } createWriteStream() { this.writeStream = _fs.default.createWriteStream(this.file, writeStreamOptions); } // Recreate the file async rotate() { await this.end(); try { _fs.default.unlinkSync(this.file); } catch (err) { // It's fine if the file does not exist yet if (err.code !== 'ENOENT') { throw err; } } this.size = 0; this.createWriteStream(); this.rotatePromise = undefined; } async write(data) { if (this.rotatePromise) await this.rotatePromise; this.size += data.length; if (this.size > this.sizeLimit) { await (this.rotatePromise = this.rotate()); } if (!this.writeStream.write(data, 'utf8')) { if (this.drainPromise === undefined) { this.drainPromise = new Promise((resolve, _reject)=>{ this.writeStream.once('drain', ()=>{ this.drainPromise = undefined; resolve(); }); }); } await this.drainPromise; } } end() { return new Promise((resolve)=>{ this.writeStream.end(resolve); }); }}const reportToLocalHost = (event)=>{ const distDir = _shared.traceGlobals.get('distDir'); const phase = _shared.traceGlobals.get('phase'); if (!distDir || !phase) { return; } if (!batch) { batch = batcher(async (events)=>{ if (!writeStream) { await _fs.default.promises.mkdir(distDir, { recursive: true }); const file = _path.default.join(distDir, 'trace'); writeStream = new RotatingWriteStream(file, // Development is limited to 50MB, production is unlimited phase === _constants.PHASE_DEVELOPMENT_SERVER ? 52428800 : Infinity); } const eventsJson = JSON.stringify(events); try { await writeStream.write(eventsJson + '\n'); } catch (err) { console.log(err); } }); } batch.report({ ...event, traceId: _shared.traceId });};const _default = { flushAll: (opts)=>batch ? batch.flushAll().then(()=>{ const phase = _shared.traceGlobals.get('phase'); // Only end writeStream when manually flushing in production if ((opts == null ? void 0 : opts.end) || phase !== _constants.PHASE_DEVELOPMENT_SERVER) { return writeStream.end(); } }) : undefined, report: reportToLocalHost};
//# sourceMappingURL=to-json.js.map123456789101112131415161718192021222324252627282930313233343536"use strict";Object.defineProperty(exports, "__esModule", { value: true});Object.defineProperty(exports, "default", { enumerable: true, get: function() { return _default; }});const _shared = require("../shared");const TRACE_EVENT_ACCESSLIST = new Map(Object.entries({ 'webpack-invalidated': 'WEBPACK_INVALIDATED'}));const reportToTelemetry = ({ name, duration })=>{ const eventName = TRACE_EVENT_ACCESSLIST.get(name); if (!eventName) { return; } const telemetry = _shared.traceGlobals.get('telemetry'); if (!telemetry) { return; } telemetry.record({ eventName, payload: { durationInMicroseconds: duration } });};const _default = { flushAll: ()=>{}, report: reportToTelemetry};
//# sourceMappingURL=to-telemetry.js.map123456789101112131415161718192021222324252627282930313233343536373839"use strict";Object.defineProperty(exports, "__esModule", { value: true});0 && (module.exports = { setGlobal: null, traceGlobals: null, traceId: null});function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] });}_export(exports, { setGlobal: function() { return setGlobal; }, traceGlobals: function() { return traceGlobals; }, traceId: function() { return traceId; }});const _nodecrypto = require("node:crypto");let _traceGlobals = global._traceGlobals;if (!_traceGlobals) { _traceGlobals = new Map();}global._traceGlobals = _traceGlobals;const traceGlobals = _traceGlobals;const setGlobal = (key, val)=>{ traceGlobals.set(key, val);};const traceId = process.env.TRACE_ID || process.env.NEXT_PRIVATE_TRACE_ID || (0, _nodecrypto.randomBytes)(8).toString('hex');
//# sourceMappingURL=shared.js.map123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197"use strict";Object.defineProperty(exports, "__esModule", { value: true});0 && (module.exports = { Span: null, SpanStatus: null, clearTraceEvents: null, exportTraceState: null, flushAllTraces: null, getTraceEvents: null, initializeTraceState: null, recordTraceEvents: null, trace: null});function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] });}_export(exports, { Span: function() { return Span; }, SpanStatus: function() { return SpanStatus; }, clearTraceEvents: function() { return clearTraceEvents; }, exportTraceState: function() { return exportTraceState; }, flushAllTraces: function() { return flushAllTraces; }, getTraceEvents: function() { return getTraceEvents; }, initializeTraceState: function() { return initializeTraceState; }, recordTraceEvents: function() { return recordTraceEvents; }, trace: function() { return trace; }});const _report = require("./report");const NUM_OF_MICROSEC_IN_NANOSEC = BigInt('1000');const NUM_OF_MILLISEC_IN_NANOSEC = BigInt('1000000');let count = 0;const getId = ()=>{ count++; return count;};let defaultParentSpanId;let shouldSaveTraceEvents;let savedTraceEvents = [];const RECORD_SPAN_THRESHOLD_MS = parseInt(process.env.NEXT_TRACE_SPAN_THRESHOLD_MS ?? '-1');var SpanStatus = /*#__PURE__*/ function(SpanStatus) { SpanStatus["Started"] = "started"; SpanStatus["Stopped"] = "stopped"; return SpanStatus;}({});class Span { constructor({ name, parentId, attrs, startTime }){ this.name = name; this.parentId = parentId ?? defaultParentSpanId; this.attrs = attrs ? { ...attrs } : {}; this.status = "started"; this.id = getId(); this._start = startTime || process.hrtime.bigint(); // hrtime cannot be used to reconstruct tracing span's actual start time // since it does not have relation to clock time: // `These times are relative to an arbitrary time in the past, and not related to the time of day and therefore not subject to clock drift` // https://nodejs.org/api/process.html#processhrtimetime // Capturing current datetime as additional metadata for external reconstruction. this.now = Date.now(); } // Durations are reported as microseconds. This gives 1000x the precision // of something like Date.now(), which reports in milliseconds. // Additionally, ~285 years can be safely represented as microseconds as // a float64 in both JSON and JavaScript. stop(stopTime) { if (this.status === "stopped") { // Don't report the same span twice. // TODO: In the future this should throw as `.stop()` shouldn't be called multiple times. return; } const end = stopTime || process.hrtime.bigint(); const duration = (end - this._start) / NUM_OF_MICROSEC_IN_NANOSEC; this.status = "stopped"; if (duration > Number.MAX_SAFE_INTEGER) { throw Object.defineProperty(new Error(`Duration is too long to express as float64: ${duration}`), "__NEXT_ERROR_CODE", { value: "E513", enumerable: false, configurable: true }); } const timestamp = this._start / NUM_OF_MICROSEC_IN_NANOSEC; const traceEvent = { name: this.name, duration: Number(duration), timestamp: Number(timestamp), id: this.id, parentId: this.parentId, tags: this.attrs, startTime: this.now }; if (duration > RECORD_SPAN_THRESHOLD_MS * 1000) { _report.reporter.report(traceEvent); if (shouldSaveTraceEvents) { savedTraceEvents.push(traceEvent); } } } traceChild(name, attrs) { return new Span({ name, parentId: this.id, attrs }); } manualTraceChild(name, // Start time in nanoseconds since epoch. startTime, // Stop time in nanoseconds since epoch. stopTime, attrs) { // We need to convert the time info to the same base as hrtime since that is used usually. const correction = process.hrtime.bigint() - BigInt(Date.now()) * NUM_OF_MILLISEC_IN_NANOSEC; const span = new Span({ name, parentId: this.id, attrs, startTime: startTime ? startTime + correction : process.hrtime.bigint() }); span.stop(stopTime ? stopTime + correction : process.hrtime.bigint()); } getId() { return this.id; } setAttribute(key, value) { this.attrs[key] = value; } traceFn(fn) { try { return fn(this); } finally{ this.stop(); } } async traceAsyncFn(fn) { try { return await fn(this); } finally{ this.stop(); } }}const trace = (name, parentId, attrs)=>{ return new Span({ name, parentId, attrs });};const flushAllTraces = (opts)=>_report.reporter.flushAll(opts);const exportTraceState = ()=>({ defaultParentSpanId, lastId: count, shouldSaveTraceEvents });const initializeTraceState = (state)=>{ count = state.lastId; defaultParentSpanId = state.defaultParentSpanId; shouldSaveTraceEvents = state.shouldSaveTraceEvents;};function getTraceEvents() { return savedTraceEvents;}function recordTraceEvents(events) { for (const traceEvent of events){ _report.reporter.report(traceEvent); if (traceEvent.id > count) { count = traceEvent.id + 1; } } if (shouldSaveTraceEvents) { savedTraceEvents.push(...events); }}const clearTraceEvents = ()=>savedTraceEvents = [];
//# sourceMappingURL=trace.js.map1/* target file for webpack loader */123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378{ "name": "next", "version": "15.4.3", "description": "The React Framework", "main": "./dist/server/next.js", "license": "MIT", "repository": "vercel/next.js", "bugs": "https://github.com/vercel/next.js/issues", "homepage": "https://nextjs.org", "types": "index.d.ts", "files": [ "dist", "app.js", "app.d.ts", "babel.js", "babel.d.ts", "client.js", "client.d.ts", "compat", "cache.js", "cache.d.ts", "config.js", "config.d.ts", "constants.js", "constants.d.ts", "document.js", "document.d.ts", "dynamic.js", "dynamic.d.ts", "error.js", "error.d.ts", "future", "legacy", "script.js", "script.d.ts", "server.js", "server.d.ts", "head.js", "head.d.ts", "image.js", "image.d.ts", "link.js", "link.d.ts", "form.js", "form.d.ts", "router.js", "router.d.ts", "jest.js", "jest.d.ts", "amp.js", "amp.d.ts", "og.js", "og.d.ts", "types.d.ts", "types.js", "index.d.ts", "types/global.d.ts", "types/compiled.d.ts", "image-types/global.d.ts", "navigation-types/navigation.d.ts", "navigation-types/compat/navigation.d.ts", "font", "navigation.js", "navigation.d.ts", "headers.js", "headers.d.ts", "navigation-types", "web-vitals.js", "web-vitals.d.ts", "experimental/testing/server.js", "experimental/testing/server.d.ts", "experimental/testmode/playwright.js", "experimental/testmode/playwright.d.ts", "experimental/testmode/playwright/msw.js", "experimental/testmode/playwright/msw.d.ts", "experimental/testmode/proxy.js", "experimental/testmode/proxy.d.ts" ], "bin": { "next": "./dist/bin/next" }, "scripts": { "dev": "cross-env NEXT_SERVER_NO_MANGLE=1 taskr", "release": "taskr release", "build": "pnpm release", "prepublishOnly": "cd ../../ && turbo run build", "types": "tsc --project tsconfig.build.json --declaration --emitDeclarationOnly --stripInternal --declarationDir dist", "typescript": "tsec --noEmit", "ncc-compiled": "taskr ncc", "storybook": "BROWSER=none storybook dev -p 6006", "build-storybook": "storybook build", "test-storybook": "test-storybook" }, "taskr": { "requires": [ "./taskfile-webpack.js", "./taskfile-ncc.js", "./taskfile-swc.js", "./taskfile-watch.js" ] }, "dependencies": { "@next/env": "15.4.3", "@swc/helpers": "0.5.15", "caniuse-lite": "^1.0.30001579", "postcss": "8.4.31", "styled-jsx": "5.1.6" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", "@playwright/test": "^1.51.1", "babel-plugin-react-compiler": "*", "react": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "react-dom": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "sass": "^1.3.0" }, "peerDependenciesMeta": { "babel-plugin-react-compiler": { "optional": true }, "sass": { "optional": true }, "@opentelemetry/api": { "optional": true }, "@playwright/test": { "optional": true } }, "optionalDependencies": { "sharp": "^0.34.3", "@next/swc-darwin-arm64": "15.4.3", "@next/swc-darwin-x64": "15.4.3", "@next/swc-linux-arm64-gnu": "15.4.3", "@next/swc-linux-arm64-musl": "15.4.3", "@next/swc-linux-x64-gnu": "15.4.3", "@next/swc-linux-x64-musl": "15.4.3", "@next/swc-win32-arm64-msvc": "15.4.3", "@next/swc-win32-x64-msvc": "15.4.3" }, "devDependencies": { "@ampproject/toolbox-optimizer": "2.8.3", "@babel/code-frame": "7.26.2", "@babel/core": "7.26.10", "@babel/eslint-parser": "7.24.6", "@babel/generator": "7.27.0", "@babel/plugin-syntax-bigint": "7.8.3", "@babel/plugin-syntax-dynamic-import": "7.8.3", "@babel/plugin-syntax-import-attributes": "7.26.0", "@babel/plugin-syntax-jsx": "7.25.9", "@babel/plugin-transform-class-properties": "7.25.9", "@babel/plugin-transform-export-namespace-from": "7.25.9", "@babel/plugin-transform-modules-commonjs": "7.26.3", "@babel/plugin-transform-numeric-separator": "7.25.9", "@babel/plugin-transform-object-rest-spread": "7.25.9", "@babel/plugin-transform-runtime": "7.26.10", "@babel/preset-env": "7.26.9", "@babel/preset-react": "7.26.3", "@babel/preset-typescript": "7.27.0", "@babel/runtime": "7.27.0", "@babel/traverse": "7.27.0", "@babel/types": "7.27.0", "@base-ui-components/react": "1.0.0-beta.1", "@capsizecss/metrics": "3.4.0", "@edge-runtime/cookies": "6.0.0", "@edge-runtime/ponyfill": "4.0.0", "@edge-runtime/primitives": "6.0.0", "@hapi/accept": "5.0.2", "@jest/transform": "29.5.0", "@jest/types": "29.5.0", "@mswjs/interceptors": "0.23.0", "@napi-rs/triples": "1.2.0", "@next/font": "15.4.3", "@next/polyfill-module": "15.4.3", "@next/polyfill-nomodule": "15.4.3", "@next/react-refresh-utils": "15.4.3", "@next/swc": "15.4.3", "@opentelemetry/api": "1.6.0", "@playwright/test": "1.51.1", "@rspack/core": "1.4.5", "@storybook/addon-a11y": "8.6.0", "@storybook/addon-essentials": "8.6.0", "@storybook/addon-interactions": "8.6.0", "@storybook/addon-webpack5-compiler-swc": "3.0.0", "@storybook/blocks": "8.6.0", "@storybook/react": "8.6.0", "@storybook/react-webpack5": "8.6.0", "@storybook/test": "8.6.0", "@storybook/test-runner": "0.21.0", "@swc/core": "1.11.24", "@swc/types": "0.1.7", "@taskr/clear": "1.1.0", "@taskr/esnext": "1.1.0", "@types/amphtml-validator": "1.0.0", "@types/babel__code-frame": "7.0.2", "@types/babel__core": "7.1.12", "@types/babel__generator": "7.6.2", "@types/babel__template": "7.4.0", "@types/babel__traverse": "7.11.0", "@types/bytes": "3.1.1", "@types/ci-info": "2.0.0", "@types/compression": "0.0.36", "@types/content-disposition": "0.5.4", "@types/content-type": "1.1.3", "@types/cookie": "0.3.3", "@types/cross-spawn": "6.0.0", "@types/debug": "4.1.5", "@types/express-serve-static-core": "4.17.33", "@types/fresh": "0.5.0", "@types/glob": "7.1.1", "@types/jsonwebtoken": "9.0.0", "@types/lodash": "4.14.198", "@types/lodash.curry": "4.1.6", "@types/path-to-regexp": "1.7.0", "@types/picomatch": "2.3.3", "@types/platform": "1.3.4", "@types/react": "19.0.8", "@types/react-dom": "19.0.3", "@types/react-is": "18.2.4", "@types/semver": "7.3.1", "@types/send": "0.14.4", "@types/shell-quote": "1.7.1", "@types/tar": "6.1.5", "@types/text-table": "0.2.1", "@types/ua-parser-js": "0.7.36", "@types/webpack-sources1": "npm:@types/webpack-sources@0.1.5", "@types/ws": "8.2.0", "@vercel/ncc": "0.34.0", "@vercel/nft": "0.27.1", "@vercel/turbopack-ecmascript-runtime": "*", "acorn": "8.14.0", "amphtml-validator": "1.0.38", "anser": "1.4.9", "arg": "4.1.0", "assert": "2.0.0", "async-retry": "1.2.3", "async-sema": "3.0.0", "axe-playwright": "2.0.3", "babel-plugin-react-compiler": "19.0.0-beta-e552027-20250112", "babel-plugin-transform-define": "2.0.0", "babel-plugin-transform-react-remove-prop-types": "0.4.24", "browserify-zlib": "0.2.0", "browserslist": "4.24.4", "buffer": "5.6.0", "busboy": "1.6.0", "bytes": "3.1.1", "ci-info": "watson/ci-info#f43f6a1cefff47fb361c88cf4b943fdbcaafe540", "cli-select": "1.1.2", "client-only": "0.0.1", "commander": "12.1.0", "comment-json": "3.0.3", "compression": "1.7.4", "conf": "5.0.0", "constants-browserify": "1.0.0", "content-disposition": "0.5.3", "content-type": "1.0.4", "cookie": "0.4.1", "cross-env": "6.0.3", "cross-spawn": "7.0.3", "crypto-browserify": "3.12.0", "css-loader": "7.1.2", "css.escape": "1.5.1", "cssnano-preset-default": "7.0.6", "data-uri-to-buffer": "3.0.1", "debug": "4.1.1", "devalue": "2.0.1", "domain-browser": "4.19.0", "edge-runtime": "4.0.1", "events": "3.3.0", "find-up": "4.1.0", "fresh": "0.5.2", "glob": "7.1.7", "gzip-size": "5.1.1", "http-proxy": "1.18.1", "http-proxy-agent": "5.0.0", "https-browserify": "1.0.0", "https-proxy-agent": "5.0.1", "icss-utils": "5.1.0", "ignore-loader": "0.1.2", "image-size": "1.2.1", "is-docker": "2.0.0", "is-wsl": "2.2.0", "jest-worker": "27.5.1", "json5": "2.2.3", "jsonwebtoken": "9.0.0", "loader-runner": "4.3.0", "loader-utils2": "npm:loader-utils@2.0.4", "loader-utils3": "npm:loader-utils@3.1.3", "lodash.curry": "4.1.1", "mini-css-extract-plugin": "2.4.4", "msw": "2.3.0", "nanoid": "3.1.32", "native-url": "0.3.4", "neo-async": "2.6.1", "node-html-parser": "5.3.3", "ora": "4.0.4", "os-browserify": "0.3.0", "p-limit": "3.1.0", "p-queue": "6.6.2", "path-browserify": "1.0.1", "path-to-regexp": "6.1.0", "picomatch": "4.0.1", "postcss-flexbugs-fixes": "5.0.2", "postcss-modules-extract-imports": "3.0.0", "postcss-modules-local-by-default": "4.2.0", "postcss-modules-scope": "3.0.0", "postcss-modules-values": "4.0.0", "postcss-preset-env": "7.4.3", "postcss-safe-parser": "6.0.0", "postcss-scss": "4.0.3", "postcss-value-parser": "4.2.0", "process": "0.11.10", "punycode": "2.1.1", "querystring-es3": "0.2.1", "raw-body": "2.4.1", "react-refresh": "0.12.0", "recast": "0.23.11", "regenerator-runtime": "0.13.4", "safe-stable-stringify": "2.5.0", "sass-loader": "15.0.0", "schema-utils2": "npm:schema-utils@2.7.1", "schema-utils3": "npm:schema-utils@3.0.0", "semver": "7.3.2", "send": "0.18.0", "server-only": "0.0.1", "setimmediate": "1.0.5", "shell-quote": "1.7.3", "source-map": "0.6.1", "source-map-loader": "5.0.0", "source-map08": "npm:source-map@0.8.0-beta.0", "stacktrace-parser": "0.1.10", "storybook": "8.6.0", "stream-browserify": "3.0.0", "stream-http": "3.1.1", "strict-event-emitter": "0.5.0", "string-hash": "1.1.3", "string_decoder": "1.3.0", "strip-ansi": "6.0.0", "style-loader": "4.0.0", "superstruct": "1.0.3", "tar": "6.1.15", "taskr": "1.1.0", "terser": "5.27.0", "terser-webpack-plugin": "5.3.9", "text-table": "0.2.0", "timers-browserify": "2.0.12", "tty-browserify": "0.0.1", "typescript": "5.8.2", "ua-parser-js": "1.0.35", "unistore": "3.4.1", "util": "0.12.4", "vm-browserify": "1.1.2", "watchpack": "2.4.0", "web-vitals": "4.2.1", "webpack": "5.98.0", "webpack-sources1": "npm:webpack-sources@1.4.3", "webpack-sources3": "npm:webpack-sources@3.2.3", "ws": "8.2.3", "zod": "3.22.3", "zod-validation-error": "3.4.0" }, "keywords": [ "react", "framework", "nextjs", "web", "server", "node", "front-end", "backend", "cli", "vercel" ], "engines": { "node": "^18.18.0 || ^19.8.0 || >= 20.0.0" }}12345678910111213141516171819202122232425{ "name": "picocolors", "version": "1.1.1", "main": "./picocolors.js", "types": "./picocolors.d.ts", "browser": { "./picocolors.js": "./picocolors.browser.js" }, "sideEffects": false, "description": "The tiniest and the fastest library for terminal output formatting with ANSI colors", "files": [ "picocolors.*", "types.d.ts" ], "keywords": [ "terminal", "colors", "formatting", "cli", "console" ], "author": "Alexey Raspopov", "repository": "alexeyraspopov/picocolors", "license": "ISC"}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475let p = process || {}, argv = p.argv || [], env = p.env || {}let isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || ((p.stdout || {}).isTTY && env.TERM !== "dumb") || !!env.CI)
let formatter = (open, close, replace = open) => input => { let string = "" + input, index = string.indexOf(close, open.length) return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close }
let replaceClose = (string, close, replace, index) => { let result = "", cursor = 0 do { result += string.substring(cursor, index) + replace cursor = index + close.length index = string.indexOf(close, cursor) } while (~index) return result + string.substring(cursor)}
let createColors = (enabled = isColorSupported) => { let f = enabled ? formatter : () => String return { isColorSupported: enabled, reset: f("\x1b[0m", "\x1b[0m"), bold: f("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m"), dim: f("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m"), italic: f("\x1b[3m", "\x1b[23m"), underline: f("\x1b[4m", "\x1b[24m"), inverse: f("\x1b[7m", "\x1b[27m"), hidden: f("\x1b[8m", "\x1b[28m"), strikethrough: f("\x1b[9m", "\x1b[29m"),
black: f("\x1b[30m", "\x1b[39m"), red: f("\x1b[31m", "\x1b[39m"), green: f("\x1b[32m", "\x1b[39m"), yellow: f("\x1b[33m", "\x1b[39m"), blue: f("\x1b[34m", "\x1b[39m"), magenta: f("\x1b[35m", "\x1b[39m"), cyan: f("\x1b[36m", "\x1b[39m"), white: f("\x1b[37m", "\x1b[39m"), gray: f("\x1b[90m", "\x1b[39m"),
bgBlack: f("\x1b[40m", "\x1b[49m"), bgRed: f("\x1b[41m", "\x1b[49m"), bgGreen: f("\x1b[42m", "\x1b[49m"), bgYellow: f("\x1b[43m", "\x1b[49m"), bgBlue: f("\x1b[44m", "\x1b[49m"), bgMagenta: f("\x1b[45m", "\x1b[49m"), bgCyan: f("\x1b[46m", "\x1b[49m"), bgWhite: f("\x1b[47m", "\x1b[49m"),
blackBright: f("\x1b[90m", "\x1b[39m"), redBright: f("\x1b[91m", "\x1b[39m"), greenBright: f("\x1b[92m", "\x1b[39m"), yellowBright: f("\x1b[93m", "\x1b[39m"), blueBright: f("\x1b[94m", "\x1b[39m"), magentaBright: f("\x1b[95m", "\x1b[39m"), cyanBright: f("\x1b[96m", "\x1b[39m"), whiteBright: f("\x1b[97m", "\x1b[39m"),
bgBlackBright: f("\x1b[100m", "\x1b[49m"), bgRedBright: f("\x1b[101m", "\x1b[49m"), bgGreenBright: f("\x1b[102m", "\x1b[49m"), bgYellowBright: f("\x1b[103m", "\x1b[49m"), bgBlueBright: f("\x1b[104m", "\x1b[49m"), bgMagentaBright: f("\x1b[105m", "\x1b[49m"), bgCyanBright: f("\x1b[106m", "\x1b[49m"), bgWhiteBright: f("\x1b[107m", "\x1b[49m"), }}
module.exports = createColors()module.exports.createColors = createColors12345678910111213141516171819202122232425'use strict'
let Container = require('./container')
class AtRule extends Container { constructor(defaults) { super(defaults) this.type = 'atrule' }
append(...children) { if (!this.proxyOf.nodes) this.nodes = [] return super.append(...children) }
prepend(...children) { if (!this.proxyOf.nodes) this.nodes = [] return super.prepend(...children) }}
module.exports = AtRuleAtRule.default = AtRule
Container.registerAtRule(AtRule)12345678910111213'use strict'
let Node = require('./node')
class Comment extends Node { constructor(defaults) { super(defaults) this.type = 'comment' }}
module.exports = CommentComment.default = Comment123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439'use strict'
let { isClean, my } = require('./symbols')let Declaration = require('./declaration')let Comment = require('./comment')let Node = require('./node')
let parse, Rule, AtRule, Root
function cleanSource(nodes) { return nodes.map(i => { if (i.nodes) i.nodes = cleanSource(i.nodes) delete i.source return i })}
function markDirtyUp(node) { node[isClean] = false if (node.proxyOf.nodes) { for (let i of node.proxyOf.nodes) { markDirtyUp(i) } }}
class Container extends Node { append(...children) { for (let child of children) { let nodes = this.normalize(child, this.last) for (let node of nodes) this.proxyOf.nodes.push(node) }
this.markDirty()
return this }
cleanRaws(keepBetween) { super.cleanRaws(keepBetween) if (this.nodes) { for (let node of this.nodes) node.cleanRaws(keepBetween) } }
each(callback) { if (!this.proxyOf.nodes) return undefined let iterator = this.getIterator()
let index, result while (this.indexes[iterator] < this.proxyOf.nodes.length) { index = this.indexes[iterator] result = callback(this.proxyOf.nodes[index], index) if (result === false) break
this.indexes[iterator] += 1 }
delete this.indexes[iterator] return result }
every(condition) { return this.nodes.every(condition) }
getIterator() { if (!this.lastEach) this.lastEach = 0 if (!this.indexes) this.indexes = {}
this.lastEach += 1 let iterator = this.lastEach this.indexes[iterator] = 0
return iterator }
getProxyProcessor() { return { get(node, prop) { if (prop === 'proxyOf') { return node } else if (!node[prop]) { return node[prop] } else if ( prop === 'each' || (typeof prop === 'string' && prop.startsWith('walk')) ) { return (...args) => { return node[prop]( ...args.map(i => { if (typeof i === 'function') { return (child, index) => i(child.toProxy(), index) } else { return i } }) ) } } else if (prop === 'every' || prop === 'some') { return cb => { return node[prop]((child, ...other) => cb(child.toProxy(), ...other) ) } } else if (prop === 'root') { return () => node.root().toProxy() } else if (prop === 'nodes') { return node.nodes.map(i => i.toProxy()) } else if (prop === 'first' || prop === 'last') { return node[prop].toProxy() } else { return node[prop] } },
set(node, prop, value) { if (node[prop] === value) return true node[prop] = value if (prop === 'name' || prop === 'params' || prop === 'selector') { node.markDirty() } return true } } }
index(child) { if (typeof child === 'number') return child if (child.proxyOf) child = child.proxyOf return this.proxyOf.nodes.indexOf(child) }
insertAfter(exist, add) { let existIndex = this.index(exist) let nodes = this.normalize(add, this.proxyOf.nodes[existIndex]).reverse() existIndex = this.index(exist) for (let node of nodes) this.proxyOf.nodes.splice(existIndex + 1, 0, node)
let index for (let id in this.indexes) { index = this.indexes[id] if (existIndex < index) { this.indexes[id] = index + nodes.length } }
this.markDirty()
return this }
insertBefore(exist, add) { let existIndex = this.index(exist) let type = existIndex === 0 ? 'prepend' : false let nodes = this.normalize(add, this.proxyOf.nodes[existIndex], type).reverse() existIndex = this.index(exist) for (let node of nodes) this.proxyOf.nodes.splice(existIndex, 0, node)
let index for (let id in this.indexes) { index = this.indexes[id] if (existIndex <= index) { this.indexes[id] = index + nodes.length } }
this.markDirty()
return this }
normalize(nodes, sample) { if (typeof nodes === 'string') { nodes = cleanSource(parse(nodes).nodes) } else if (Array.isArray(nodes)) { nodes = nodes.slice(0) for (let i of nodes) { if (i.parent) i.parent.removeChild(i, 'ignore') } } else if (nodes.type === 'root' && this.type !== 'document') { nodes = nodes.nodes.slice(0) for (let i of nodes) { if (i.parent) i.parent.removeChild(i, 'ignore') } } else if (nodes.type) { nodes = [nodes] } else if (nodes.prop) { if (typeof nodes.value === 'undefined') { throw new Error('Value field is missed in node creation') } else if (typeof nodes.value !== 'string') { nodes.value = String(nodes.value) } nodes = [new Declaration(nodes)] } else if (nodes.selector) { nodes = [new Rule(nodes)] } else if (nodes.name) { nodes = [new AtRule(nodes)] } else if (nodes.text) { nodes = [new Comment(nodes)] } else { throw new Error('Unknown node type in node creation') }
let processed = nodes.map(i => { /* c8 ignore next */ if (!i[my]) Container.rebuild(i) i = i.proxyOf if (i.parent) i.parent.removeChild(i) if (i[isClean]) markDirtyUp(i) if (typeof i.raws.before === 'undefined') { if (sample && typeof sample.raws.before !== 'undefined') { i.raws.before = sample.raws.before.replace(/\S/g, '') } } i.parent = this.proxyOf return i })
return processed }
prepend(...children) { children = children.reverse() for (let child of children) { let nodes = this.normalize(child, this.first, 'prepend').reverse() for (let node of nodes) this.proxyOf.nodes.unshift(node) for (let id in this.indexes) { this.indexes[id] = this.indexes[id] + nodes.length } }
this.markDirty()
return this }
push(child) { child.parent = this this.proxyOf.nodes.push(child) return this }
removeAll() { for (let node of this.proxyOf.nodes) node.parent = undefined this.proxyOf.nodes = []
this.markDirty()
return this }
removeChild(child) { child = this.index(child) this.proxyOf.nodes[child].parent = undefined this.proxyOf.nodes.splice(child, 1)
let index for (let id in this.indexes) { index = this.indexes[id] if (index >= child) { this.indexes[id] = index - 1 } }
this.markDirty()
return this }
replaceValues(pattern, opts, callback) { if (!callback) { callback = opts opts = {} }
this.walkDecls(decl => { if (opts.props && !opts.props.includes(decl.prop)) return if (opts.fast && !decl.value.includes(opts.fast)) return
decl.value = decl.value.replace(pattern, callback) })
this.markDirty()
return this }
some(condition) { return this.nodes.some(condition) }
walk(callback) { return this.each((child, i) => { let result try { result = callback(child, i) } catch (e) { throw child.addToError(e) } if (result !== false && child.walk) { result = child.walk(callback) }
return result }) }
walkAtRules(name, callback) { if (!callback) { callback = name return this.walk((child, i) => { if (child.type === 'atrule') { return callback(child, i) } }) } if (name instanceof RegExp) { return this.walk((child, i) => { if (child.type === 'atrule' && name.test(child.name)) { return callback(child, i) } }) } return this.walk((child, i) => { if (child.type === 'atrule' && child.name === name) { return callback(child, i) } }) }
walkComments(callback) { return this.walk((child, i) => { if (child.type === 'comment') { return callback(child, i) } }) }
walkDecls(prop, callback) { if (!callback) { callback = prop return this.walk((child, i) => { if (child.type === 'decl') { return callback(child, i) } }) } if (prop instanceof RegExp) { return this.walk((child, i) => { if (child.type === 'decl' && prop.test(child.prop)) { return callback(child, i) } }) } return this.walk((child, i) => { if (child.type === 'decl' && child.prop === prop) { return callback(child, i) } }) }
walkRules(selector, callback) { if (!callback) { callback = selector
return this.walk((child, i) => { if (child.type === 'rule') { return callback(child, i) } }) } if (selector instanceof RegExp) { return this.walk((child, i) => { if (child.type === 'rule' && selector.test(child.selector)) { return callback(child, i) } }) } return this.walk((child, i) => { if (child.type === 'rule' && child.selector === selector) { return callback(child, i) } }) }
get first() { if (!this.proxyOf.nodes) return undefined return this.proxyOf.nodes[0] }
get last() { if (!this.proxyOf.nodes) return undefined return this.proxyOf.nodes[this.proxyOf.nodes.length - 1] }}
Container.registerParse = dependant => { parse = dependant}
Container.registerRule = dependant => { Rule = dependant}
Container.registerAtRule = dependant => { AtRule = dependant}
Container.registerRoot = dependant => { Root = dependant}
module.exports = ContainerContainer.default = Container
/* c8 ignore start */Container.rebuild = node => { if (node.type === 'atrule') { Object.setPrototypeOf(node, AtRule.prototype) } else if (node.type === 'rule') { Object.setPrototypeOf(node, Rule.prototype) } else if (node.type === 'decl') { Object.setPrototypeOf(node, Declaration.prototype) } else if (node.type === 'comment') { Object.setPrototypeOf(node, Comment.prototype) } else if (node.type === 'root') { Object.setPrototypeOf(node, Root.prototype) }
node[my] = true
if (node.nodes) { node.nodes.forEach(child => { Container.rebuild(child) }) }}/* c8 ignore stop */123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100'use strict'
let pico = require('picocolors')
let terminalHighlight = require('./terminal-highlight')
class CssSyntaxError extends Error { constructor(message, line, column, source, file, plugin) { super(message) this.name = 'CssSyntaxError' this.reason = message
if (file) { this.file = file } if (source) { this.source = source } if (plugin) { this.plugin = plugin } if (typeof line !== 'undefined' && typeof column !== 'undefined') { if (typeof line === 'number') { this.line = line this.column = column } else { this.line = line.line this.column = line.column this.endLine = column.line this.endColumn = column.column } }
this.setMessage()
if (Error.captureStackTrace) { Error.captureStackTrace(this, CssSyntaxError) } }
setMessage() { this.message = this.plugin ? this.plugin + ': ' : '' this.message += this.file ? this.file : '<css input>' if (typeof this.line !== 'undefined') { this.message += ':' + this.line + ':' + this.column } this.message += ': ' + this.reason }
showSourceCode(color) { if (!this.source) return ''
let css = this.source if (color == null) color = pico.isColorSupported if (terminalHighlight) { if (color) css = terminalHighlight(css) }
let lines = css.split(/\r?\n/) let start = Math.max(this.line - 3, 0) let end = Math.min(this.line + 2, lines.length)
let maxWidth = String(end).length
let mark, aside if (color) { let { bold, gray, red } = pico.createColors(true) mark = text => bold(red(text)) aside = text => gray(text) } else { mark = aside = str => str }
return lines .slice(start, end) .map((line, index) => { let number = start + 1 + index let gutter = ' ' + (' ' + number).slice(-maxWidth) + ' | ' if (number === this.line) { let spacing = aside(gutter.replace(/\d/g, ' ')) + line.slice(0, this.column - 1).replace(/[^\t]/g, ' ') return mark('>') + aside(gutter) + line + '\n ' + spacing + mark('^') } return ' ' + aside(gutter) + line }) .join('\n') }
toString() { let code = this.showSourceCode() if (code) { code = '\n\n' + code + '\n' } return this.name + ': ' + this.message + code }}
module.exports = CssSyntaxErrorCssSyntaxError.default = CssSyntaxError123456789101112131415161718192021222324'use strict'
let Node = require('./node')
class Declaration extends Node { constructor(defaults) { if ( defaults && typeof defaults.value !== 'undefined' && typeof defaults.value !== 'string' ) { defaults = { ...defaults, value: String(defaults.value) } } super(defaults) this.type = 'decl' }
get variable() { return this.prop.startsWith('--') || this.prop[0] === '$' }}
module.exports = DeclarationDeclaration.default = Declaration123456789101112131415161718192021222324252627282930313233'use strict'
let Container = require('./container')
let LazyResult, Processor
class Document extends Container { constructor(defaults) { // type needs to be passed to super, otherwise child roots won't be normalized correctly super({ type: 'document', ...defaults })
if (!this.nodes) { this.nodes = [] } }
toResult(opts = {}) { let lazy = new LazyResult(new Processor(), this, opts)
return lazy.stringify() }}
Document.registerLazyResult = dependant => { LazyResult = dependant}
Document.registerProcessor = dependant => { Processor = dependant}
module.exports = DocumentDocument.default = Document123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354'use strict'
let Declaration = require('./declaration')let PreviousMap = require('./previous-map')let Comment = require('./comment')let AtRule = require('./at-rule')let Input = require('./input')let Root = require('./root')let Rule = require('./rule')
function fromJSON(json, inputs) { if (Array.isArray(json)) return json.map(n => fromJSON(n))
let { inputs: ownInputs, ...defaults } = json if (ownInputs) { inputs = [] for (let input of ownInputs) { let inputHydrated = { ...input, __proto__: Input.prototype } if (inputHydrated.map) { inputHydrated.map = { ...inputHydrated.map, __proto__: PreviousMap.prototype } } inputs.push(inputHydrated) } } if (defaults.nodes) { defaults.nodes = json.nodes.map(n => fromJSON(n, inputs)) } if (defaults.source) { let { inputId, ...source } = defaults.source defaults.source = source if (inputId != null) { defaults.source.input = inputs[inputId] } } if (defaults.type === 'root') { return new Root(defaults) } else if (defaults.type === 'decl') { return new Declaration(defaults) } else if (defaults.type === 'rule') { return new Rule(defaults) } else if (defaults.type === 'comment') { return new Comment(defaults) } else if (defaults.type === 'atrule') { return new AtRule(defaults) } else { throw new Error('Unknown node type: ' + json.type) }}
module.exports = fromJSONfromJSON.default = fromJSON123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248'use strict'
let { SourceMapConsumer, SourceMapGenerator } = require('source-map-js')let { fileURLToPath, pathToFileURL } = require('url')let { isAbsolute, resolve } = require('path')let { nanoid } = require('nanoid/non-secure')
let terminalHighlight = require('./terminal-highlight')let CssSyntaxError = require('./css-syntax-error')let PreviousMap = require('./previous-map')
let fromOffsetCache = Symbol('fromOffsetCache')
let sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator)let pathAvailable = Boolean(resolve && isAbsolute)
class Input { constructor(css, opts = {}) { if ( css === null || typeof css === 'undefined' || (typeof css === 'object' && !css.toString) ) { throw new Error(`PostCSS received ${css} instead of CSS string`) }
this.css = css.toString()
if (this.css[0] === '\uFEFF' || this.css[0] === '\uFFFE') { this.hasBOM = true this.css = this.css.slice(1) } else { this.hasBOM = false }
if (opts.from) { if ( !pathAvailable || /^\w+:\/\//.test(opts.from) || isAbsolute(opts.from) ) { this.file = opts.from } else { this.file = resolve(opts.from) } }
if (pathAvailable && sourceMapAvailable) { let map = new PreviousMap(this.css, opts) if (map.text) { this.map = map let file = map.consumer().file if (!this.file && file) this.file = this.mapResolve(file) } }
if (!this.file) { this.id = '<input css ' + nanoid(6) + '>' } if (this.map) this.map.file = this.from }
error(message, line, column, opts = {}) { let result, endLine, endColumn
if (line && typeof line === 'object') { let start = line let end = column if (typeof start.offset === 'number') { let pos = this.fromOffset(start.offset) line = pos.line column = pos.col } else { line = start.line column = start.column } if (typeof end.offset === 'number') { let pos = this.fromOffset(end.offset) endLine = pos.line endColumn = pos.col } else { endLine = end.line endColumn = end.column } } else if (!column) { let pos = this.fromOffset(line) line = pos.line column = pos.col }
let origin = this.origin(line, column, endLine, endColumn) if (origin) { result = new CssSyntaxError( message, origin.endLine === undefined ? origin.line : { column: origin.column, line: origin.line }, origin.endLine === undefined ? origin.column : { column: origin.endColumn, line: origin.endLine }, origin.source, origin.file, opts.plugin ) } else { result = new CssSyntaxError( message, endLine === undefined ? line : { column, line }, endLine === undefined ? column : { column: endColumn, line: endLine }, this.css, this.file, opts.plugin ) }
result.input = { column, endColumn, endLine, line, source: this.css } if (this.file) { if (pathToFileURL) { result.input.url = pathToFileURL(this.file).toString() } result.input.file = this.file }
return result }
fromOffset(offset) { let lastLine, lineToIndex if (!this[fromOffsetCache]) { let lines = this.css.split('\n') lineToIndex = new Array(lines.length) let prevIndex = 0
for (let i = 0, l = lines.length; i < l; i++) { lineToIndex[i] = prevIndex prevIndex += lines[i].length + 1 }
this[fromOffsetCache] = lineToIndex } else { lineToIndex = this[fromOffsetCache] } lastLine = lineToIndex[lineToIndex.length - 1]
let min = 0 if (offset >= lastLine) { min = lineToIndex.length - 1 } else { let max = lineToIndex.length - 2 let mid while (min < max) { mid = min + ((max - min) >> 1) if (offset < lineToIndex[mid]) { max = mid - 1 } else if (offset >= lineToIndex[mid + 1]) { min = mid + 1 } else { min = mid break } } } return { col: offset - lineToIndex[min] + 1, line: min + 1 } }
mapResolve(file) { if (/^\w+:\/\//.test(file)) { return file } return resolve(this.map.consumer().sourceRoot || this.map.root || '.', file) }
origin(line, column, endLine, endColumn) { if (!this.map) return false let consumer = this.map.consumer()
let from = consumer.originalPositionFor({ column, line }) if (!from.source) return false
let to if (typeof endLine === 'number') { to = consumer.originalPositionFor({ column: endColumn, line: endLine }) }
let fromUrl
if (isAbsolute(from.source)) { fromUrl = pathToFileURL(from.source) } else { fromUrl = new URL( from.source, this.map.consumer().sourceRoot || pathToFileURL(this.map.mapFile) ) }
let result = { column: from.column, endColumn: to && to.column, endLine: to && to.line, line: from.line, url: fromUrl.toString() }
if (fromUrl.protocol === 'file:') { if (fileURLToPath) { result.file = fileURLToPath(fromUrl) } else { /* c8 ignore next 2 */ throw new Error(`file: protocol is not available in this PostCSS build`) } }
let source = consumer.sourceContentFor(from.source) if (source) result.source = source
return result }
toJSON() { let json = {} for (let name of ['hasBOM', 'css', 'file', 'id']) { if (this[name] != null) { json[name] = this[name] } } if (this.map) { json.map = { ...this.map } if (json.map.consumerCache) { json.map.consumerCache = undefined } } return json }
get from() { return this.file || this.id }}
module.exports = InputInput.default = Input
if (terminalHighlight && terminalHighlight.registerInput) { terminalHighlight.registerInput(Input)}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550'use strict'
let { isClean, my } = require('./symbols')let MapGenerator = require('./map-generator')let stringify = require('./stringify')let Container = require('./container')let Document = require('./document')let warnOnce = require('./warn-once')let Result = require('./result')let parse = require('./parse')let Root = require('./root')
const TYPE_TO_CLASS_NAME = { atrule: 'AtRule', comment: 'Comment', decl: 'Declaration', document: 'Document', root: 'Root', rule: 'Rule'}
const PLUGIN_PROPS = { AtRule: true, AtRuleExit: true, Comment: true, CommentExit: true, Declaration: true, DeclarationExit: true, Document: true, DocumentExit: true, Once: true, OnceExit: true, postcssPlugin: true, prepare: true, Root: true, RootExit: true, Rule: true, RuleExit: true}
const NOT_VISITORS = { Once: true, postcssPlugin: true, prepare: true}
const CHILDREN = 0
function isPromise(obj) { return typeof obj === 'object' && typeof obj.then === 'function'}
function getEvents(node) { let key = false let type = TYPE_TO_CLASS_NAME[node.type] if (node.type === 'decl') { key = node.prop.toLowerCase() } else if (node.type === 'atrule') { key = node.name.toLowerCase() }
if (key && node.append) { return [ type, type + '-' + key, CHILDREN, type + 'Exit', type + 'Exit-' + key ] } else if (key) { return [type, type + '-' + key, type + 'Exit', type + 'Exit-' + key] } else if (node.append) { return [type, CHILDREN, type + 'Exit'] } else { return [type, type + 'Exit'] }}
function toStack(node) { let events if (node.type === 'document') { events = ['Document', CHILDREN, 'DocumentExit'] } else if (node.type === 'root') { events = ['Root', CHILDREN, 'RootExit'] } else { events = getEvents(node) }
return { eventIndex: 0, events, iterator: 0, node, visitorIndex: 0, visitors: [] }}
function cleanMarks(node) { node[isClean] = false if (node.nodes) node.nodes.forEach(i => cleanMarks(i)) return node}
let postcss = {}
class LazyResult { constructor(processor, css, opts) { this.stringified = false this.processed = false
let root if ( typeof css === 'object' && css !== null && (css.type === 'root' || css.type === 'document') ) { root = cleanMarks(css) } else if (css instanceof LazyResult || css instanceof Result) { root = cleanMarks(css.root) if (css.map) { if (typeof opts.map === 'undefined') opts.map = {} if (!opts.map.inline) opts.map.inline = false opts.map.prev = css.map } } else { let parser = parse if (opts.syntax) parser = opts.syntax.parse if (opts.parser) parser = opts.parser if (parser.parse) parser = parser.parse
try { root = parser(css, opts) } catch (error) { this.processed = true this.error = error }
if (root && !root[my]) { /* c8 ignore next 2 */ Container.rebuild(root) } }
this.result = new Result(processor, root, opts) this.helpers = { ...postcss, postcss, result: this.result } this.plugins = this.processor.plugins.map(plugin => { if (typeof plugin === 'object' && plugin.prepare) { return { ...plugin, ...plugin.prepare(this.result) } } else { return plugin } }) }
async() { if (this.error) return Promise.reject(this.error) if (this.processed) return Promise.resolve(this.result) if (!this.processing) { this.processing = this.runAsync() } return this.processing }
catch(onRejected) { return this.async().catch(onRejected) }
finally(onFinally) { return this.async().then(onFinally, onFinally) }
getAsyncError() { throw new Error('Use process(css).then(cb) to work with async plugins') }
handleError(error, node) { let plugin = this.result.lastPlugin try { if (node) node.addToError(error) this.error = error if (error.name === 'CssSyntaxError' && !error.plugin) { error.plugin = plugin.postcssPlugin error.setMessage() } else if (plugin.postcssVersion) { if (process.env.NODE_ENV !== 'production') { let pluginName = plugin.postcssPlugin let pluginVer = plugin.postcssVersion let runtimeVer = this.result.processor.version let a = pluginVer.split('.') let b = runtimeVer.split('.')
if (a[0] !== b[0] || parseInt(a[1]) > parseInt(b[1])) { // eslint-disable-next-line no-console console.error( 'Unknown error from PostCSS plugin. Your current PostCSS ' + 'version is ' + runtimeVer + ', but ' + pluginName + ' uses ' + pluginVer + '. Perhaps this is the source of the error below.' ) } } } } catch (err) { /* c8 ignore next 3 */ // eslint-disable-next-line no-console if (console && console.error) console.error(err) } return error }
prepareVisitors() { this.listeners = {} let add = (plugin, type, cb) => { if (!this.listeners[type]) this.listeners[type] = [] this.listeners[type].push([plugin, cb]) } for (let plugin of this.plugins) { if (typeof plugin === 'object') { for (let event in plugin) { if (!PLUGIN_PROPS[event] && /^[A-Z]/.test(event)) { throw new Error( `Unknown event ${event} in ${plugin.postcssPlugin}. ` + `Try to update PostCSS (${this.processor.version} now).` ) } if (!NOT_VISITORS[event]) { if (typeof plugin[event] === 'object') { for (let filter in plugin[event]) { if (filter === '*') { add(plugin, event, plugin[event][filter]) } else { add( plugin, event + '-' + filter.toLowerCase(), plugin[event][filter] ) } } } else if (typeof plugin[event] === 'function') { add(plugin, event, plugin[event]) } } } } } this.hasListener = Object.keys(this.listeners).length > 0 }
async runAsync() { this.plugin = 0 for (let i = 0; i < this.plugins.length; i++) { let plugin = this.plugins[i] let promise = this.runOnRoot(plugin) if (isPromise(promise)) { try { await promise } catch (error) { throw this.handleError(error) } } }
this.prepareVisitors() if (this.hasListener) { let root = this.result.root while (!root[isClean]) { root[isClean] = true let stack = [toStack(root)] while (stack.length > 0) { let promise = this.visitTick(stack) if (isPromise(promise)) { try { await promise } catch (e) { let node = stack[stack.length - 1].node throw this.handleError(e, node) } } } }
if (this.listeners.OnceExit) { for (let [plugin, visitor] of this.listeners.OnceExit) { this.result.lastPlugin = plugin try { if (root.type === 'document') { let roots = root.nodes.map(subRoot => visitor(subRoot, this.helpers) )
await Promise.all(roots) } else { await visitor(root, this.helpers) } } catch (e) { throw this.handleError(e) } } } }
this.processed = true return this.stringify() }
runOnRoot(plugin) { this.result.lastPlugin = plugin try { if (typeof plugin === 'object' && plugin.Once) { if (this.result.root.type === 'document') { let roots = this.result.root.nodes.map(root => plugin.Once(root, this.helpers) )
if (isPromise(roots[0])) { return Promise.all(roots) }
return roots }
return plugin.Once(this.result.root, this.helpers) } else if (typeof plugin === 'function') { return plugin(this.result.root, this.result) } } catch (error) { throw this.handleError(error) } }
stringify() { if (this.error) throw this.error if (this.stringified) return this.result this.stringified = true
this.sync()
let opts = this.result.opts let str = stringify if (opts.syntax) str = opts.syntax.stringify if (opts.stringifier) str = opts.stringifier if (str.stringify) str = str.stringify
let map = new MapGenerator(str, this.result.root, this.result.opts) let data = map.generate() this.result.css = data[0] this.result.map = data[1]
return this.result }
sync() { if (this.error) throw this.error if (this.processed) return this.result this.processed = true
if (this.processing) { throw this.getAsyncError() }
for (let plugin of this.plugins) { let promise = this.runOnRoot(plugin) if (isPromise(promise)) { throw this.getAsyncError() } }
this.prepareVisitors() if (this.hasListener) { let root = this.result.root while (!root[isClean]) { root[isClean] = true this.walkSync(root) } if (this.listeners.OnceExit) { if (root.type === 'document') { for (let subRoot of root.nodes) { this.visitSync(this.listeners.OnceExit, subRoot) } } else { this.visitSync(this.listeners.OnceExit, root) } } }
return this.result }
then(onFulfilled, onRejected) { if (process.env.NODE_ENV !== 'production') { if (!('from' in this.opts)) { warnOnce( 'Without `from` option PostCSS could generate wrong source map ' + 'and will not find Browserslist config. Set it to CSS file path ' + 'or to `undefined` to prevent this warning.' ) } } return this.async().then(onFulfilled, onRejected) }
toString() { return this.css }
visitSync(visitors, node) { for (let [plugin, visitor] of visitors) { this.result.lastPlugin = plugin let promise try { promise = visitor(node, this.helpers) } catch (e) { throw this.handleError(e, node.proxyOf) } if (node.type !== 'root' && node.type !== 'document' && !node.parent) { return true } if (isPromise(promise)) { throw this.getAsyncError() } } }
visitTick(stack) { let visit = stack[stack.length - 1] let { node, visitors } = visit
if (node.type !== 'root' && node.type !== 'document' && !node.parent) { stack.pop() return }
if (visitors.length > 0 && visit.visitorIndex < visitors.length) { let [plugin, visitor] = visitors[visit.visitorIndex] visit.visitorIndex += 1 if (visit.visitorIndex === visitors.length) { visit.visitors = [] visit.visitorIndex = 0 } this.result.lastPlugin = plugin try { return visitor(node.toProxy(), this.helpers) } catch (e) { throw this.handleError(e, node) } }
if (visit.iterator !== 0) { let iterator = visit.iterator let child while ((child = node.nodes[node.indexes[iterator]])) { node.indexes[iterator] += 1 if (!child[isClean]) { child[isClean] = true stack.push(toStack(child)) return } } visit.iterator = 0 delete node.indexes[iterator] }
let events = visit.events while (visit.eventIndex < events.length) { let event = events[visit.eventIndex] visit.eventIndex += 1 if (event === CHILDREN) { if (node.nodes && node.nodes.length) { node[isClean] = true visit.iterator = node.getIterator() } return } else if (this.listeners[event]) { visit.visitors = this.listeners[event] return } } stack.pop() }
walkSync(node) { node[isClean] = true let events = getEvents(node) for (let event of events) { if (event === CHILDREN) { if (node.nodes) { node.each(child => { if (!child[isClean]) this.walkSync(child) }) } } else { let visitors = this.listeners[event] if (visitors) { if (this.visitSync(visitors, node.toProxy())) return } } } }
warnings() { return this.sync().warnings() }
get content() { return this.stringify().content }
get css() { return this.stringify().css }
get map() { return this.stringify().map }
get messages() { return this.sync().messages }
get opts() { return this.result.opts }
get processor() { return this.result.processor }
get root() { return this.sync().root }
get [Symbol.toStringTag]() { return 'LazyResult' }}
LazyResult.registerPostcss = dependant => { postcss = dependant}
module.exports = LazyResultLazyResult.default = LazyResult
Root.registerLazyResult(LazyResult)Document.registerLazyResult(LazyResult)12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758'use strict'
let list = { comma(string) { return list.split(string, [','], true) },
space(string) { let spaces = [' ', '\n', '\t'] return list.split(string, spaces) },
split(string, separators, last) { let array = [] let current = '' let split = false
let func = 0 let inQuote = false let prevQuote = '' let escape = false
for (let letter of string) { if (escape) { escape = false } else if (letter === '\\') { escape = true } else if (inQuote) { if (letter === prevQuote) { inQuote = false } } else if (letter === '"' || letter === "'") { inQuote = true prevQuote = letter } else if (letter === '(') { func += 1 } else if (letter === ')') { if (func > 0) func -= 1 } else if (func === 0) { if (separators.includes(letter)) split = true }
if (split) { if (current !== '') array.push(current.trim()) current = '' split = false } else { current += letter } }
if (last || current !== '') array.push(current.trim()) return array }}
module.exports = listlist.default = list123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359'use strict'
let { SourceMapConsumer, SourceMapGenerator } = require('source-map-js')let { dirname, relative, resolve, sep } = require('path')let { pathToFileURL } = require('url')
let Input = require('./input')
let sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator)let pathAvailable = Boolean(dirname && resolve && relative && sep)
class MapGenerator { constructor(stringify, root, opts, cssString) { this.stringify = stringify this.mapOpts = opts.map || {} this.root = root this.opts = opts this.css = cssString this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute
this.memoizedFileURLs = new Map() this.memoizedPaths = new Map() this.memoizedURLs = new Map() }
addAnnotation() { let content
if (this.isInline()) { content = 'data:application/json;base64,' + this.toBase64(this.map.toString()) } else if (typeof this.mapOpts.annotation === 'string') { content = this.mapOpts.annotation } else if (typeof this.mapOpts.annotation === 'function') { content = this.mapOpts.annotation(this.opts.to, this.root) } else { content = this.outputFile() + '.map' } let eol = '\n' if (this.css.includes('\r\n')) eol = '\r\n'
this.css += eol + '/*# sourceMappingURL=' + content + ' */' }
applyPrevMaps() { for (let prev of this.previous()) { let from = this.toUrl(this.path(prev.file)) let root = prev.root || dirname(prev.file) let map
if (this.mapOpts.sourcesContent === false) { map = new SourceMapConsumer(prev.text) if (map.sourcesContent) { map.sourcesContent = map.sourcesContent.map(() => null) } } else { map = prev.consumer() }
this.map.applySourceMap(map, from, this.toUrl(this.path(root))) } }
clearAnnotation() { if (this.mapOpts.annotation === false) return
if (this.root) { let node for (let i = this.root.nodes.length - 1; i >= 0; i--) { node = this.root.nodes[i] if (node.type !== 'comment') continue if (node.text.indexOf('# sourceMappingURL=') === 0) { this.root.removeChild(i) } } } else if (this.css) { this.css = this.css.replace(/(\n)?\/\*#[\S\s]*?\*\/$/gm, '') } }
generate() { this.clearAnnotation() if (pathAvailable && sourceMapAvailable && this.isMap()) { return this.generateMap() } else { let result = '' this.stringify(this.root, i => { result += i }) return [result] } }
generateMap() { if (this.root) { this.generateString() } else if (this.previous().length === 1) { let prev = this.previous()[0].consumer() prev.file = this.outputFile() this.map = SourceMapGenerator.fromSourceMap(prev) } else { this.map = new SourceMapGenerator({ file: this.outputFile() }) this.map.addMapping({ generated: { column: 0, line: 1 }, original: { column: 0, line: 1 }, source: this.opts.from ? this.toUrl(this.path(this.opts.from)) : '<no source>' }) }
if (this.isSourcesContent()) this.setSourcesContent() if (this.root && this.previous().length > 0) this.applyPrevMaps() if (this.isAnnotation()) this.addAnnotation()
if (this.isInline()) { return [this.css] } else { return [this.css, this.map] } }
generateString() { this.css = '' this.map = new SourceMapGenerator({ file: this.outputFile() })
let line = 1 let column = 1
let noSource = '<no source>' let mapping = { generated: { column: 0, line: 0 }, original: { column: 0, line: 0 }, source: '' }
let lines, last this.stringify(this.root, (str, node, type) => { this.css += str
if (node && type !== 'end') { mapping.generated.line = line mapping.generated.column = column - 1 if (node.source && node.source.start) { mapping.source = this.sourcePath(node) mapping.original.line = node.source.start.line mapping.original.column = node.source.start.column - 1 this.map.addMapping(mapping) } else { mapping.source = noSource mapping.original.line = 1 mapping.original.column = 0 this.map.addMapping(mapping) } }
lines = str.match(/\n/g) if (lines) { line += lines.length last = str.lastIndexOf('\n') column = str.length - last } else { column += str.length }
if (node && type !== 'start') { let p = node.parent || { raws: {} } let childless = node.type === 'decl' || (node.type === 'atrule' && !node.nodes) if (!childless || node !== p.last || p.raws.semicolon) { if (node.source && node.source.end) { mapping.source = this.sourcePath(node) mapping.original.line = node.source.end.line mapping.original.column = node.source.end.column - 1 mapping.generated.line = line mapping.generated.column = column - 2 this.map.addMapping(mapping) } else { mapping.source = noSource mapping.original.line = 1 mapping.original.column = 0 mapping.generated.line = line mapping.generated.column = column - 1 this.map.addMapping(mapping) } } } }) }
isAnnotation() { if (this.isInline()) { return true } if (typeof this.mapOpts.annotation !== 'undefined') { return this.mapOpts.annotation } if (this.previous().length) { return this.previous().some(i => i.annotation) } return true }
isInline() { if (typeof this.mapOpts.inline !== 'undefined') { return this.mapOpts.inline }
let annotation = this.mapOpts.annotation if (typeof annotation !== 'undefined' && annotation !== true) { return false }
if (this.previous().length) { return this.previous().some(i => i.inline) } return true }
isMap() { if (typeof this.opts.map !== 'undefined') { return !!this.opts.map } return this.previous().length > 0 }
isSourcesContent() { if (typeof this.mapOpts.sourcesContent !== 'undefined') { return this.mapOpts.sourcesContent } if (this.previous().length) { return this.previous().some(i => i.withContent()) } return true }
outputFile() { if (this.opts.to) { return this.path(this.opts.to) } else if (this.opts.from) { return this.path(this.opts.from) } else { return 'to.css' } }
path(file) { if (this.mapOpts.absolute) return file if (file.charCodeAt(0) === 60 /* `<` */) return file if (/^\w+:\/\//.test(file)) return file let cached = this.memoizedPaths.get(file) if (cached) return cached
let from = this.opts.to ? dirname(this.opts.to) : '.'
if (typeof this.mapOpts.annotation === 'string') { from = dirname(resolve(from, this.mapOpts.annotation)) }
let path = relative(from, file) this.memoizedPaths.set(file, path)
return path }
previous() { if (!this.previousMaps) { this.previousMaps = [] if (this.root) { this.root.walk(node => { if (node.source && node.source.input.map) { let map = node.source.input.map if (!this.previousMaps.includes(map)) { this.previousMaps.push(map) } } }) } else { let input = new Input(this.css, this.opts) if (input.map) this.previousMaps.push(input.map) } }
return this.previousMaps }
setSourcesContent() { let already = {} if (this.root) { this.root.walk(node => { if (node.source) { let from = node.source.input.from if (from && !already[from]) { already[from] = true let fromUrl = this.usesFileUrls ? this.toFileUrl(from) : this.toUrl(this.path(from)) this.map.setSourceContent(fromUrl, node.source.input.css) } } }) } else if (this.css) { let from = this.opts.from ? this.toUrl(this.path(this.opts.from)) : '<no source>' this.map.setSourceContent(from, this.css) } }
sourcePath(node) { if (this.mapOpts.from) { return this.toUrl(this.mapOpts.from) } else if (this.usesFileUrls) { return this.toFileUrl(node.source.input.from) } else { return this.toUrl(this.path(node.source.input.from)) } }
toBase64(str) { if (Buffer) { return Buffer.from(str).toString('base64') } else { return window.btoa(unescape(encodeURIComponent(str))) } }
toFileUrl(path) { let cached = this.memoizedFileURLs.get(path) if (cached) return cached
if (pathToFileURL) { let fileURL = pathToFileURL(path).toString() this.memoizedFileURLs.set(path, fileURL)
return fileURL } else { throw new Error( '`map.absolute` option is not available in this PostCSS build' ) } }
toUrl(path) { let cached = this.memoizedURLs.get(path) if (cached) return cached
if (sep === '\\') { path = path.replace(/\\/g, '/') }
let url = encodeURI(path).replace(/[#?]/g, encodeURIComponent) this.memoizedURLs.set(path, url)
return url }}
module.exports = MapGenerator123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135'use strict'
let MapGenerator = require('./map-generator')let stringify = require('./stringify')let warnOnce = require('./warn-once')let parse = require('./parse')const Result = require('./result')
class NoWorkResult { constructor(processor, css, opts) { css = css.toString() this.stringified = false
this._processor = processor this._css = css this._opts = opts this._map = undefined let root
let str = stringify this.result = new Result(this._processor, root, this._opts) this.result.css = css
let self = this Object.defineProperty(this.result, 'root', { get() { return self.root } })
let map = new MapGenerator(str, root, this._opts, css) if (map.isMap()) { let [generatedCSS, generatedMap] = map.generate() if (generatedCSS) { this.result.css = generatedCSS } if (generatedMap) { this.result.map = generatedMap } } }
async() { if (this.error) return Promise.reject(this.error) return Promise.resolve(this.result) }
catch(onRejected) { return this.async().catch(onRejected) }
finally(onFinally) { return this.async().then(onFinally, onFinally) }
sync() { if (this.error) throw this.error return this.result }
then(onFulfilled, onRejected) { if (process.env.NODE_ENV !== 'production') { if (!('from' in this._opts)) { warnOnce( 'Without `from` option PostCSS could generate wrong source map ' + 'and will not find Browserslist config. Set it to CSS file path ' + 'or to `undefined` to prevent this warning.' ) } }
return this.async().then(onFulfilled, onRejected) }
toString() { return this._css }
warnings() { return [] }
get content() { return this.result.css }
get css() { return this.result.css }
get map() { return this.result.map }
get messages() { return [] }
get opts() { return this.result.opts }
get processor() { return this.result.processor }
get root() { if (this._root) { return this._root }
let root let parser = parse
try { root = parser(this._css, this._opts) } catch (error) { this.error = error }
if (this.error) { throw this.error } else { this._root = root return root } }
get [Symbol.toStringTag]() { return 'NoWorkResult' }}
module.exports = NoWorkResultNoWorkResult.default = NoWorkResult123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381'use strict'
let { isClean, my } = require('./symbols')let CssSyntaxError = require('./css-syntax-error')let Stringifier = require('./stringifier')let stringify = require('./stringify')
function cloneNode(obj, parent) { let cloned = new obj.constructor()
for (let i in obj) { if (!Object.prototype.hasOwnProperty.call(obj, i)) { /* c8 ignore next 2 */ continue } if (i === 'proxyCache') continue let value = obj[i] let type = typeof value
if (i === 'parent' && type === 'object') { if (parent) cloned[i] = parent } else if (i === 'source') { cloned[i] = value } else if (Array.isArray(value)) { cloned[i] = value.map(j => cloneNode(j, cloned)) } else { if (type === 'object' && value !== null) value = cloneNode(value) cloned[i] = value } }
return cloned}
class Node { constructor(defaults = {}) { this.raws = {} this[isClean] = false this[my] = true
for (let name in defaults) { if (name === 'nodes') { this.nodes = [] for (let node of defaults[name]) { if (typeof node.clone === 'function') { this.append(node.clone()) } else { this.append(node) } } } else { this[name] = defaults[name] } } }
addToError(error) { error.postcssNode = this if (error.stack && this.source && /\n\s{4}at /.test(error.stack)) { let s = this.source error.stack = error.stack.replace( /\n\s{4}at /, `$&${s.input.from}:${s.start.line}:${s.start.column}$&` ) } return error }
after(add) { this.parent.insertAfter(this, add) return this }
assign(overrides = {}) { for (let name in overrides) { this[name] = overrides[name] } return this }
before(add) { this.parent.insertBefore(this, add) return this }
cleanRaws(keepBetween) { delete this.raws.before delete this.raws.after if (!keepBetween) delete this.raws.between }
clone(overrides = {}) { let cloned = cloneNode(this) for (let name in overrides) { cloned[name] = overrides[name] } return cloned }
cloneAfter(overrides = {}) { let cloned = this.clone(overrides) this.parent.insertAfter(this, cloned) return cloned }
cloneBefore(overrides = {}) { let cloned = this.clone(overrides) this.parent.insertBefore(this, cloned) return cloned }
error(message, opts = {}) { if (this.source) { let { end, start } = this.rangeBy(opts) return this.source.input.error( message, { column: start.column, line: start.line }, { column: end.column, line: end.line }, opts ) } return new CssSyntaxError(message) }
getProxyProcessor() { return { get(node, prop) { if (prop === 'proxyOf') { return node } else if (prop === 'root') { return () => node.root().toProxy() } else { return node[prop] } },
set(node, prop, value) { if (node[prop] === value) return true node[prop] = value if ( prop === 'prop' || prop === 'value' || prop === 'name' || prop === 'params' || prop === 'important' || /* c8 ignore next */ prop === 'text' ) { node.markDirty() } return true } } }
markDirty() { if (this[isClean]) { this[isClean] = false let next = this while ((next = next.parent)) { next[isClean] = false } } }
next() { if (!this.parent) return undefined let index = this.parent.index(this) return this.parent.nodes[index + 1] }
positionBy(opts, stringRepresentation) { let pos = this.source.start if (opts.index) { pos = this.positionInside(opts.index, stringRepresentation) } else if (opts.word) { stringRepresentation = this.toString() let index = stringRepresentation.indexOf(opts.word) if (index !== -1) pos = this.positionInside(index, stringRepresentation) } return pos }
positionInside(index, stringRepresentation) { let string = stringRepresentation || this.toString() let column = this.source.start.column let line = this.source.start.line
for (let i = 0; i < index; i++) { if (string[i] === '\n') { column = 1 line += 1 } else { column += 1 } }
return { column, line } }
prev() { if (!this.parent) return undefined let index = this.parent.index(this) return this.parent.nodes[index - 1] }
rangeBy(opts) { let start = { column: this.source.start.column, line: this.source.start.line } let end = this.source.end ? { column: this.source.end.column + 1, line: this.source.end.line } : { column: start.column + 1, line: start.line }
if (opts.word) { let stringRepresentation = this.toString() let index = stringRepresentation.indexOf(opts.word) if (index !== -1) { start = this.positionInside(index, stringRepresentation) end = this.positionInside(index + opts.word.length, stringRepresentation) } } else { if (opts.start) { start = { column: opts.start.column, line: opts.start.line } } else if (opts.index) { start = this.positionInside(opts.index) }
if (opts.end) { end = { column: opts.end.column, line: opts.end.line } } else if (opts.endIndex) { end = this.positionInside(opts.endIndex) } else if (opts.index) { end = this.positionInside(opts.index + 1) } }
if ( end.line < start.line || (end.line === start.line && end.column <= start.column) ) { end = { column: start.column + 1, line: start.line } }
return { end, start } }
raw(prop, defaultType) { let str = new Stringifier() return str.raw(this, prop, defaultType) }
remove() { if (this.parent) { this.parent.removeChild(this) } this.parent = undefined return this }
replaceWith(...nodes) { if (this.parent) { let bookmark = this let foundSelf = false for (let node of nodes) { if (node === this) { foundSelf = true } else if (foundSelf) { this.parent.insertAfter(bookmark, node) bookmark = node } else { this.parent.insertBefore(bookmark, node) } }
if (!foundSelf) { this.remove() } }
return this }
root() { let result = this while (result.parent && result.parent.type !== 'document') { result = result.parent } return result }
toJSON(_, inputs) { let fixed = {} let emitInputs = inputs == null inputs = inputs || new Map() let inputsNextIndex = 0
for (let name in this) { if (!Object.prototype.hasOwnProperty.call(this, name)) { /* c8 ignore next 2 */ continue } if (name === 'parent' || name === 'proxyCache') continue let value = this[name]
if (Array.isArray(value)) { fixed[name] = value.map(i => { if (typeof i === 'object' && i.toJSON) { return i.toJSON(null, inputs) } else { return i } }) } else if (typeof value === 'object' && value.toJSON) { fixed[name] = value.toJSON(null, inputs) } else if (name === 'source') { let inputId = inputs.get(value.input) if (inputId == null) { inputId = inputsNextIndex inputs.set(value.input, inputsNextIndex) inputsNextIndex++ } fixed[name] = { end: value.end, inputId, start: value.start } } else { fixed[name] = value } }
if (emitInputs) { fixed.inputs = [...inputs.keys()].map(input => input.toJSON()) }
return fixed }
toProxy() { if (!this.proxyCache) { this.proxyCache = new Proxy(this, this.getProxyProcessor()) } return this.proxyCache }
toString(stringifier = stringify) { if (stringifier.stringify) stringifier = stringifier.stringify let result = '' stringifier(this, i => { result += i }) return result }
warn(result, text, opts) { let data = { node: this } for (let i in opts) data[i] = opts[i] return result.warn(text, data) }
get proxyOf() { return this }}
module.exports = NodeNode.default = Node123456789101112131415161718192021222324252627282930313233343536373839404142'use strict'
let Container = require('./container')let Parser = require('./parser')let Input = require('./input')
function parse(css, opts) { let input = new Input(css, opts) let parser = new Parser(input) try { parser.parse() } catch (e) { if (process.env.NODE_ENV !== 'production') { if (e.name === 'CssSyntaxError' && opts && opts.from) { if (/\.scss$/i.test(opts.from)) { e.message += '\nYou tried to parse SCSS with ' + 'the standard CSS parser; ' + 'try again with the postcss-scss parser' } else if (/\.sass/i.test(opts.from)) { e.message += '\nYou tried to parse Sass with ' + 'the standard CSS parser; ' + 'try again with the postcss-sass parser' } else if (/\.less$/i.test(opts.from)) { e.message += '\nYou tried to parse Less with ' + 'the standard CSS parser; ' + 'try again with the postcss-less parser' } } } throw e }
return parser.root}
module.exports = parseparse.default = parse
Container.registerParse(parse)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610'use strict'
let Declaration = require('./declaration')let tokenizer = require('./tokenize')let Comment = require('./comment')let AtRule = require('./at-rule')let Root = require('./root')let Rule = require('./rule')
const SAFE_COMMENT_NEIGHBOR = { empty: true, space: true}
function findLastWithPosition(tokens) { for (let i = tokens.length - 1; i >= 0; i--) { let token = tokens[i] let pos = token[3] || token[2] if (pos) return pos }}
class Parser { constructor(input) { this.input = input
this.root = new Root() this.current = this.root this.spaces = '' this.semicolon = false this.customProperty = false
this.createTokenizer() this.root.source = { input, start: { column: 1, line: 1, offset: 0 } } }
atrule(token) { let node = new AtRule() node.name = token[1].slice(1) if (node.name === '') { this.unnamedAtrule(node, token) } this.init(node, token[2])
let type let prev let shift let last = false let open = false let params = [] let brackets = []
while (!this.tokenizer.endOfFile()) { token = this.tokenizer.nextToken() type = token[0]
if (type === '(' || type === '[') { brackets.push(type === '(' ? ')' : ']') } else if (type === '{' && brackets.length > 0) { brackets.push('}') } else if (type === brackets[brackets.length - 1]) { brackets.pop() }
if (brackets.length === 0) { if (type === ';') { node.source.end = this.getPosition(token[2]) node.source.end.offset++ this.semicolon = true break } else if (type === '{') { open = true break } else if (type === '}') { if (params.length > 0) { shift = params.length - 1 prev = params[shift] while (prev && prev[0] === 'space') { prev = params[--shift] } if (prev) { node.source.end = this.getPosition(prev[3] || prev[2]) node.source.end.offset++ } } this.end(token) break } else { params.push(token) } } else { params.push(token) }
if (this.tokenizer.endOfFile()) { last = true break } }
node.raws.between = this.spacesAndCommentsFromEnd(params) if (params.length) { node.raws.afterName = this.spacesAndCommentsFromStart(params) this.raw(node, 'params', params) if (last) { token = params[params.length - 1] node.source.end = this.getPosition(token[3] || token[2]) node.source.end.offset++ this.spaces = node.raws.between node.raws.between = '' } } else { node.raws.afterName = '' node.params = '' }
if (open) { node.nodes = [] this.current = node } }
checkMissedSemicolon(tokens) { let colon = this.colon(tokens) if (colon === false) return
let founded = 0 let token for (let j = colon - 1; j >= 0; j--) { token = tokens[j] if (token[0] !== 'space') { founded += 1 if (founded === 2) break } } // If the token is a word, e.g. `!important`, `red` or any other valid property's value. // Then we need to return the colon after that word token. [3] is the "end" colon of that word. // And because we need it after that one we do +1 to get the next one. throw this.input.error( 'Missed semicolon', token[0] === 'word' ? token[3] + 1 : token[2] ) }
colon(tokens) { let brackets = 0 let token, type, prev for (let [i, element] of tokens.entries()) { token = element type = token[0]
if (type === '(') { brackets += 1 } if (type === ')') { brackets -= 1 } if (brackets === 0 && type === ':') { if (!prev) { this.doubleColon(token) } else if (prev[0] === 'word' && prev[1] === 'progid') { continue } else { return i } }
prev = token } return false }
comment(token) { let node = new Comment() this.init(node, token[2]) node.source.end = this.getPosition(token[3] || token[2]) node.source.end.offset++
let text = token[1].slice(2, -2) if (/^\s*$/.test(text)) { node.text = '' node.raws.left = text node.raws.right = '' } else { let match = text.match(/^(\s*)([^]*\S)(\s*)$/) node.text = match[2] node.raws.left = match[1] node.raws.right = match[3] } }
createTokenizer() { this.tokenizer = tokenizer(this.input) }
decl(tokens, customProperty) { let node = new Declaration() this.init(node, tokens[0][2])
let last = tokens[tokens.length - 1] if (last[0] === ';') { this.semicolon = true tokens.pop() }
node.source.end = this.getPosition( last[3] || last[2] || findLastWithPosition(tokens) ) node.source.end.offset++
while (tokens[0][0] !== 'word') { if (tokens.length === 1) this.unknownWord(tokens) node.raws.before += tokens.shift()[1] } node.source.start = this.getPosition(tokens[0][2])
node.prop = '' while (tokens.length) { let type = tokens[0][0] if (type === ':' || type === 'space' || type === 'comment') { break } node.prop += tokens.shift()[1] }
node.raws.between = ''
let token while (tokens.length) { token = tokens.shift()
if (token[0] === ':') { node.raws.between += token[1] break } else { if (token[0] === 'word' && /\w/.test(token[1])) { this.unknownWord([token]) } node.raws.between += token[1] } }
if (node.prop[0] === '_' || node.prop[0] === '*') { node.raws.before += node.prop[0] node.prop = node.prop.slice(1) }
let firstSpaces = [] let next while (tokens.length) { next = tokens[0][0] if (next !== 'space' && next !== 'comment') break firstSpaces.push(tokens.shift()) }
this.precheckMissedSemicolon(tokens)
for (let i = tokens.length - 1; i >= 0; i--) { token = tokens[i] if (token[1].toLowerCase() === '!important') { node.important = true let string = this.stringFrom(tokens, i) string = this.spacesFromEnd(tokens) + string if (string !== ' !important') node.raws.important = string break } else if (token[1].toLowerCase() === 'important') { let cache = tokens.slice(0) let str = '' for (let j = i; j > 0; j--) { let type = cache[j][0] if (str.trim().indexOf('!') === 0 && type !== 'space') { break } str = cache.pop()[1] + str } if (str.trim().indexOf('!') === 0) { node.important = true node.raws.important = str tokens = cache } }
if (token[0] !== 'space' && token[0] !== 'comment') { break } }
let hasWord = tokens.some(i => i[0] !== 'space' && i[0] !== 'comment')
if (hasWord) { node.raws.between += firstSpaces.map(i => i[1]).join('') firstSpaces = [] } this.raw(node, 'value', firstSpaces.concat(tokens), customProperty)
if (node.value.includes(':') && !customProperty) { this.checkMissedSemicolon(tokens) } }
doubleColon(token) { throw this.input.error( 'Double colon', { offset: token[2] }, { offset: token[2] + token[1].length } ) }
emptyRule(token) { let node = new Rule() this.init(node, token[2]) node.selector = '' node.raws.between = '' this.current = node }
end(token) { if (this.current.nodes && this.current.nodes.length) { this.current.raws.semicolon = this.semicolon } this.semicolon = false
this.current.raws.after = (this.current.raws.after || '') + this.spaces this.spaces = ''
if (this.current.parent) { this.current.source.end = this.getPosition(token[2]) this.current.source.end.offset++ this.current = this.current.parent } else { this.unexpectedClose(token) } }
endFile() { if (this.current.parent) this.unclosedBlock() if (this.current.nodes && this.current.nodes.length) { this.current.raws.semicolon = this.semicolon } this.current.raws.after = (this.current.raws.after || '') + this.spaces this.root.source.end = this.getPosition(this.tokenizer.position()) }
freeSemicolon(token) { this.spaces += token[1] if (this.current.nodes) { let prev = this.current.nodes[this.current.nodes.length - 1] if (prev && prev.type === 'rule' && !prev.raws.ownSemicolon) { prev.raws.ownSemicolon = this.spaces this.spaces = '' } } }
// Helpers
getPosition(offset) { let pos = this.input.fromOffset(offset) return { column: pos.col, line: pos.line, offset } }
init(node, offset) { this.current.push(node) node.source = { input: this.input, start: this.getPosition(offset) } node.raws.before = this.spaces this.spaces = '' if (node.type !== 'comment') this.semicolon = false }
other(start) { let end = false let type = null let colon = false let bracket = null let brackets = [] let customProperty = start[1].startsWith('--')
let tokens = [] let token = start while (token) { type = token[0] tokens.push(token)
if (type === '(' || type === '[') { if (!bracket) bracket = token brackets.push(type === '(' ? ')' : ']') } else if (customProperty && colon && type === '{') { if (!bracket) bracket = token brackets.push('}') } else if (brackets.length === 0) { if (type === ';') { if (colon) { this.decl(tokens, customProperty) return } else { break } } else if (type === '{') { this.rule(tokens) return } else if (type === '}') { this.tokenizer.back(tokens.pop()) end = true break } else if (type === ':') { colon = true } } else if (type === brackets[brackets.length - 1]) { brackets.pop() if (brackets.length === 0) bracket = null }
token = this.tokenizer.nextToken() }
if (this.tokenizer.endOfFile()) end = true if (brackets.length > 0) this.unclosedBracket(bracket)
if (end && colon) { if (!customProperty) { while (tokens.length) { token = tokens[tokens.length - 1][0] if (token !== 'space' && token !== 'comment') break this.tokenizer.back(tokens.pop()) } } this.decl(tokens, customProperty) } else { this.unknownWord(tokens) } }
parse() { let token while (!this.tokenizer.endOfFile()) { token = this.tokenizer.nextToken()
switch (token[0]) { case 'space': this.spaces += token[1] break
case ';': this.freeSemicolon(token) break
case '}': this.end(token) break
case 'comment': this.comment(token) break
case 'at-word': this.atrule(token) break
case '{': this.emptyRule(token) break
default: this.other(token) break } } this.endFile() }
precheckMissedSemicolon(/* tokens */) { // Hook for Safe Parser }
raw(node, prop, tokens, customProperty) { let token, type let length = tokens.length let value = '' let clean = true let next, prev
for (let i = 0; i < length; i += 1) { token = tokens[i] type = token[0] if (type === 'space' && i === length - 1 && !customProperty) { clean = false } else if (type === 'comment') { prev = tokens[i - 1] ? tokens[i - 1][0] : 'empty' next = tokens[i + 1] ? tokens[i + 1][0] : 'empty' if (!SAFE_COMMENT_NEIGHBOR[prev] && !SAFE_COMMENT_NEIGHBOR[next]) { if (value.slice(-1) === ',') { clean = false } else { value += token[1] } } else { clean = false } } else { value += token[1] } } if (!clean) { let raw = tokens.reduce((all, i) => all + i[1], '') node.raws[prop] = { raw, value } } node[prop] = value }
rule(tokens) { tokens.pop()
let node = new Rule() this.init(node, tokens[0][2])
node.raws.between = this.spacesAndCommentsFromEnd(tokens) this.raw(node, 'selector', tokens) this.current = node }
spacesAndCommentsFromEnd(tokens) { let lastTokenType let spaces = '' while (tokens.length) { lastTokenType = tokens[tokens.length - 1][0] if (lastTokenType !== 'space' && lastTokenType !== 'comment') break spaces = tokens.pop()[1] + spaces } return spaces }
// Errors
spacesAndCommentsFromStart(tokens) { let next let spaces = '' while (tokens.length) { next = tokens[0][0] if (next !== 'space' && next !== 'comment') break spaces += tokens.shift()[1] } return spaces }
spacesFromEnd(tokens) { let lastTokenType let spaces = '' while (tokens.length) { lastTokenType = tokens[tokens.length - 1][0] if (lastTokenType !== 'space') break spaces = tokens.pop()[1] + spaces } return spaces }
stringFrom(tokens, from) { let result = '' for (let i = from; i < tokens.length; i++) { result += tokens[i][1] } tokens.splice(from, tokens.length - from) return result }
unclosedBlock() { let pos = this.current.source.start throw this.input.error('Unclosed block', pos.line, pos.column) }
unclosedBracket(bracket) { throw this.input.error( 'Unclosed bracket', { offset: bracket[2] }, { offset: bracket[2] + 1 } ) }
unexpectedClose(token) { throw this.input.error( 'Unexpected }', { offset: token[2] }, { offset: token[2] + 1 } ) }
unknownWord(tokens) { throw this.input.error( 'Unknown word', { offset: tokens[0][2] }, { offset: tokens[0][2] + tokens[0][1].length } ) }
unnamedAtrule(node, token) { throw this.input.error( 'At-rule without name', { offset: token[2] }, { offset: token[2] + token[1].length } ) }}
module.exports = Parser123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101'use strict'
let CssSyntaxError = require('./css-syntax-error')let Declaration = require('./declaration')let LazyResult = require('./lazy-result')let Container = require('./container')let Processor = require('./processor')let stringify = require('./stringify')let fromJSON = require('./fromJSON')let Document = require('./document')let Warning = require('./warning')let Comment = require('./comment')let AtRule = require('./at-rule')let Result = require('./result.js')let Input = require('./input')let parse = require('./parse')let list = require('./list')let Rule = require('./rule')let Root = require('./root')let Node = require('./node')
function postcss(...plugins) { if (plugins.length === 1 && Array.isArray(plugins[0])) { plugins = plugins[0] } return new Processor(plugins)}
postcss.plugin = function plugin(name, initializer) { let warningPrinted = false function creator(...args) { // eslint-disable-next-line no-console if (console && console.warn && !warningPrinted) { warningPrinted = true // eslint-disable-next-line no-console console.warn( name + ': postcss.plugin was deprecated. Migration guide:\n' + 'https://evilmartians.com/chronicles/postcss-8-plugin-migration' ) if (process.env.LANG && process.env.LANG.startsWith('cn')) { /* c8 ignore next 7 */ // eslint-disable-next-line no-console console.warn( name + ': 里面 postcss.plugin 被弃用. 迁移指南:\n' + 'https://www.w3ctech.com/topic/2226' ) } } let transformer = initializer(...args) transformer.postcssPlugin = name transformer.postcssVersion = new Processor().version return transformer }
let cache Object.defineProperty(creator, 'postcss', { get() { if (!cache) cache = creator() return cache } })
creator.process = function (css, processOpts, pluginOpts) { return postcss([creator(pluginOpts)]).process(css, processOpts) }
return creator}
postcss.stringify = stringifypostcss.parse = parsepostcss.fromJSON = fromJSONpostcss.list = list
postcss.comment = defaults => new Comment(defaults)postcss.atRule = defaults => new AtRule(defaults)postcss.decl = defaults => new Declaration(defaults)postcss.rule = defaults => new Rule(defaults)postcss.root = defaults => new Root(defaults)postcss.document = defaults => new Document(defaults)
postcss.CssSyntaxError = CssSyntaxErrorpostcss.Declaration = Declarationpostcss.Container = Containerpostcss.Processor = Processorpostcss.Document = Documentpostcss.Comment = Commentpostcss.Warning = Warningpostcss.AtRule = AtRulepostcss.Result = Resultpostcss.Input = Inputpostcss.Rule = Rulepostcss.Root = Rootpostcss.Node = Node
LazyResult.registerPostcss(postcss)
module.exports = postcsspostcss.default = postcss123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142'use strict'
let { SourceMapConsumer, SourceMapGenerator } = require('source-map-js')let { existsSync, readFileSync } = require('fs')let { dirname, join } = require('path')
function fromBase64(str) { if (Buffer) { return Buffer.from(str, 'base64').toString() } else { /* c8 ignore next 2 */ return window.atob(str) }}
class PreviousMap { constructor(css, opts) { if (opts.map === false) return this.loadAnnotation(css) this.inline = this.startWith(this.annotation, 'data:')
let prev = opts.map ? opts.map.prev : undefined let text = this.loadMap(opts.from, prev) if (!this.mapFile && opts.from) { this.mapFile = opts.from } if (this.mapFile) this.root = dirname(this.mapFile) if (text) this.text = text }
consumer() { if (!this.consumerCache) { this.consumerCache = new SourceMapConsumer(this.text) } return this.consumerCache }
decodeInline(text) { let baseCharsetUri = /^data:application\/json;charset=utf-?8;base64,/ let baseUri = /^data:application\/json;base64,/ let charsetUri = /^data:application\/json;charset=utf-?8,/ let uri = /^data:application\/json,/
if (charsetUri.test(text) || uri.test(text)) { return decodeURIComponent(text.substr(RegExp.lastMatch.length)) }
if (baseCharsetUri.test(text) || baseUri.test(text)) { return fromBase64(text.substr(RegExp.lastMatch.length)) }
let encoding = text.match(/data:application\/json;([^,]+),/)[1] throw new Error('Unsupported source map encoding ' + encoding) }
getAnnotationURL(sourceMapString) { return sourceMapString.replace(/^\/\*\s*# sourceMappingURL=/, '').trim() }
isMap(map) { if (typeof map !== 'object') return false return ( typeof map.mappings === 'string' || typeof map._mappings === 'string' || Array.isArray(map.sections) ) }
loadAnnotation(css) { let comments = css.match(/\/\*\s*# sourceMappingURL=/gm) if (!comments) return
// sourceMappingURLs from comments, strings, etc. let start = css.lastIndexOf(comments.pop()) let end = css.indexOf('*/', start)
if (start > -1 && end > -1) { // Locate the last sourceMappingURL to avoid pickin this.annotation = this.getAnnotationURL(css.substring(start, end)) } }
loadFile(path) { this.root = dirname(path) if (existsSync(path)) { this.mapFile = path return readFileSync(path, 'utf-8').toString().trim() } }
loadMap(file, prev) { if (prev === false) return false
if (prev) { if (typeof prev === 'string') { return prev } else if (typeof prev === 'function') { let prevPath = prev(file) if (prevPath) { let map = this.loadFile(prevPath) if (!map) { throw new Error( 'Unable to load previous source map: ' + prevPath.toString() ) } return map } } else if (prev instanceof SourceMapConsumer) { return SourceMapGenerator.fromSourceMap(prev).toString() } else if (prev instanceof SourceMapGenerator) { return prev.toString() } else if (this.isMap(prev)) { return JSON.stringify(prev) } else { throw new Error( 'Unsupported previous source map format: ' + prev.toString() ) } } else if (this.inline) { return this.decodeInline(this.annotation) } else if (this.annotation) { let map = this.annotation if (file) map = join(dirname(file), map) return this.loadFile(map) } }
startWith(string, start) { if (!string) return false return string.substr(0, start.length) === start }
withContent() { return !!( this.consumer().sourcesContent && this.consumer().sourcesContent.length > 0 ) }}
module.exports = PreviousMapPreviousMap.default = PreviousMap12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667'use strict'
let NoWorkResult = require('./no-work-result')let LazyResult = require('./lazy-result')let Document = require('./document')let Root = require('./root')
class Processor { constructor(plugins = []) { this.version = '8.4.31' this.plugins = this.normalize(plugins) }
normalize(plugins) { let normalized = [] for (let i of plugins) { if (i.postcss === true) { i = i() } else if (i.postcss) { i = i.postcss }
if (typeof i === 'object' && Array.isArray(i.plugins)) { normalized = normalized.concat(i.plugins) } else if (typeof i === 'object' && i.postcssPlugin) { normalized.push(i) } else if (typeof i === 'function') { normalized.push(i) } else if (typeof i === 'object' && (i.parse || i.stringify)) { if (process.env.NODE_ENV !== 'production') { throw new Error( 'PostCSS syntaxes cannot be used as plugins. Instead, please use ' + 'one of the syntax/parser/stringifier options as outlined ' + 'in your PostCSS runner documentation.' ) } } else { throw new Error(i + ' is not a PostCSS plugin') } } return normalized }
process(css, opts = {}) { if ( this.plugins.length === 0 && typeof opts.parser === 'undefined' && typeof opts.stringifier === 'undefined' && typeof opts.syntax === 'undefined' ) { return new NoWorkResult(this, css, opts) } else { return new LazyResult(this, css, opts) } }
use(plugin) { this.plugins = this.plugins.concat(this.normalize([plugin])) return this }}
module.exports = ProcessorProcessor.default = Processor
Root.registerProcessor(Processor)Document.registerProcessor(Processor).gitattributes+2
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/server-reference-info.jsAdded+52
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/side-effect.jsAdded+66
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/turbopack/compilation-events.jsAdded+47
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/turbopack/entry-key.jsAdded+39
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/turbopack/manifest-loader.jsAdded+477
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/turbopack/utils.jsAdded+305
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/utils.jsAdded+211
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/utils/warn-once.jsAdded+22
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/zod.jsAdded+101
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/telemetry/anonymous-meta.jsAdded+89
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/telemetry/detached-flush.jsAdded+53
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/telemetry/events/build.jsAdded+144
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/telemetry/events/error-feedback.jsAdded+31
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/telemetry/events/index.jsAdded+23
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/telemetry/events/plugins.jsAdded+51
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/telemetry/events/swc-load-failure.jsAdded+55
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/telemetry/events/version.jsAdded+90
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/telemetry/flush-and-exit.jsAdded+20
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/telemetry/post-telemetry-payload.jsAdded+48
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/telemetry/project-id.jsAdded+48
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/telemetry/storage.jsAdded+288
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/trace/index.jsAdded+54
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/trace/report/index.jsAdded+35
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/trace/report/to-json.jsAdded+157
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/trace/report/to-telemetry.jsAdded+36
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/trace/shared.jsAdded+39
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/trace/trace.jsAdded+197
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/font/google/target.cssAdded+1
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/package.jsonAdded+378
.next/standalone/node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/package.jsonAdded+25
.next/standalone/node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.jsAdded+75
.next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/at-rule.jsAdded+25
.next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/comment.jsAdded+13
.next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/container.jsAdded+439
.next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/css-syntax-error.jsAdded+100
.next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/declaration.jsAdded+24
.next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/document.jsAdded+33
.next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/fromJSON.jsAdded+54
.next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/input.jsAdded+248
.next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/lazy-result.jsAdded+550
.next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/list.jsAdded+58
.next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/map-generator.jsAdded+359
.next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/no-work-result.jsAdded+135
.next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/node.jsAdded+381
.next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/parse.jsAdded+42
.next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/parser.jsAdded+610
.next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/postcss.jsAdded+101
.next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/previous-map.jsAdded+142
.next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/processor.jsAdded+67