Files
Laca-City/frontend/node_modules/next/dist/esm/build/webpack-build/index.js
PhongPham c65cc97a33 🎯 MapView v2.0 - Global Deployment Ready
 MAJOR FEATURES:
• Auto-zoom intelligence với smart bounds fitting
• Enhanced 3D GPS markers với pulsing effects
• Professional route display với 6-layer rendering
• Status-based parking icons với availability indicators
• Production-ready build optimizations

🗺️ AUTO-ZOOM FEATURES:
• Smart bounds fitting cho GPS + selected parking
• Adaptive padding (50px) cho visual balance
• Max zoom control (level 16) để tránh quá gần
• Dynamic centering khi không có selection

🎨 ENHANCED VISUALS:
• 3D GPS marker với multi-layer pulse effects
• Advanced parking icons với status colors
• Selection highlighting với animation
• Dimming system cho non-selected items

🛣️ ROUTE SYSTEM:
• OpenRouteService API integration
• Multi-layer route rendering (glow, shadow, main, animated)
• Real-time distance & duration calculation
• Visual route info trong popup

📱 PRODUCTION READY:
• SSR safe với dynamic imports
• Build errors resolved
• Global deployment via Vercel
• Optimized performance

🌍 DEPLOYMENT:
• Vercel: https://whatever-ctk2auuxr-phong12hexdockworks-projects.vercel.app
• Bundle size: 22.8 kB optimized
• Global CDN distribution
• HTTPS enabled

💾 VERSION CONTROL:
• MapView-v2.0.tsx backup created
• MAPVIEW_VERSIONS.md documentation
• Full version history tracking
2025-07-20 19:52:16 +07:00

103 lines
4.0 KiB
JavaScript

import * as Log from "../output/log";
import { NextBuildContext } from "../build-context";
import { Worker } from "../../lib/worker";
import origDebug from "next/dist/compiled/debug";
import path from "path";
import { exportTraceState, recordTraceEvents } from "../../trace";
const debug = origDebug("next:build:webpack-build");
const ORDERED_COMPILER_NAMES = [
"server",
"edge-server",
"client"
];
let pluginState = {};
function deepMerge(target, source) {
const result = {
...target,
...source
};
for (const key of Object.keys(result)){
result[key] = Array.isArray(target[key]) ? target[key] = [
...target[key],
...source[key] || []
] : typeof target[key] == "object" && typeof source[key] == "object" ? deepMerge(target[key], source[key]) : result[key];
}
return result;
}
async function webpackBuildWithWorker(compilerNamesArg) {
const compilerNames = compilerNamesArg || ORDERED_COMPILER_NAMES;
const { nextBuildSpan, ...prunedBuildContext } = NextBuildContext;
prunedBuildContext.pluginState = pluginState;
const combinedResult = {
duration: 0,
buildTraceContext: {}
};
for (const compilerName of compilerNames){
var _curResult_buildTraceContext;
const worker = new Worker(path.join(__dirname, "impl.js"), {
exposedMethods: [
"workerMain"
],
numWorkers: 1,
maxRetries: 0,
forkOptions: {
env: {
...process.env,
NEXT_PRIVATE_BUILD_WORKER: "1"
}
}
});
const curResult = await worker.workerMain({
buildContext: prunedBuildContext,
compilerName,
traceState: {
...exportTraceState(),
defaultParentSpanId: nextBuildSpan == null ? void 0 : nextBuildSpan.getId(),
shouldSaveTraceEvents: true
}
});
if (nextBuildSpan && curResult.debugTraceEvents) {
recordTraceEvents(curResult.debugTraceEvents);
}
// destroy worker so it's not sticking around using memory
await worker.end();
// Update plugin state
pluginState = deepMerge(pluginState, curResult.pluginState);
prunedBuildContext.pluginState = pluginState;
if (curResult.telemetryState) {
NextBuildContext.telemetryState = curResult.telemetryState;
}
combinedResult.duration += curResult.duration;
if ((_curResult_buildTraceContext = curResult.buildTraceContext) == null ? void 0 : _curResult_buildTraceContext.entriesTrace) {
var _curResult_buildTraceContext1;
const { entryNameMap } = curResult.buildTraceContext.entriesTrace;
if (entryNameMap) {
combinedResult.buildTraceContext.entriesTrace = curResult.buildTraceContext.entriesTrace;
combinedResult.buildTraceContext.entriesTrace.entryNameMap = entryNameMap;
}
if ((_curResult_buildTraceContext1 = curResult.buildTraceContext) == null ? void 0 : _curResult_buildTraceContext1.chunksTrace) {
const { entryNameFilesMap } = curResult.buildTraceContext.chunksTrace;
if (entryNameFilesMap) {
combinedResult.buildTraceContext.chunksTrace = curResult.buildTraceContext.chunksTrace;
combinedResult.buildTraceContext.chunksTrace.entryNameFilesMap = entryNameFilesMap;
}
}
}
}
if (compilerNames.length === 3) {
Log.event("Compiled successfully");
}
return combinedResult;
}
export function webpackBuild(withWorker, compilerNames) {
if (withWorker) {
debug("using separate compiler workers");
return webpackBuildWithWorker(compilerNames);
} else {
debug("building all compilers in same process");
const webpackBuildImpl = require("./impl").webpackBuildImpl;
return webpackBuildImpl(null, null);
}
}
//# sourceMappingURL=index.js.map