Files
Laca-City/backend/node_modules/webpack/lib/runtime/OnChunksLoadedRuntimeModule.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

79 lines
2.1 KiB
JavaScript

/*
MIT License http://www.opensource.org/licenses/mit-license.php
*/
"use strict";
const RuntimeGlobals = require("../RuntimeGlobals");
const RuntimeModule = require("../RuntimeModule");
const Template = require("../Template");
/** @typedef {import("../Compilation")} Compilation */
class OnChunksLoadedRuntimeModule extends RuntimeModule {
constructor() {
super("chunk loaded");
}
/**
* @returns {string | null} runtime code
*/
generate() {
const compilation = /** @type {Compilation} */ (this.compilation);
const { runtimeTemplate } = compilation;
return Template.asString([
"var deferred = [];",
`${RuntimeGlobals.onChunksLoaded} = ${runtimeTemplate.basicFunction(
"result, chunkIds, fn, priority",
[
"if(chunkIds) {",
Template.indent([
"priority = priority || 0;",
"for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];",
"deferred[i] = [chunkIds, fn, priority];",
"return;"
]),
"}",
"var notFulfilled = Infinity;",
"for (var i = 0; i < deferred.length; i++) {",
Template.indent([
runtimeTemplate.destructureArray(
["chunkIds", "fn", "priority"],
"deferred[i]"
),
"var fulfilled = true;",
"for (var j = 0; j < chunkIds.length; j++) {",
Template.indent([
`if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(${
RuntimeGlobals.onChunksLoaded
}).every(${runtimeTemplate.returningFunction(
`${RuntimeGlobals.onChunksLoaded}[key](chunkIds[j])`,
"key"
)})) {`,
Template.indent(["chunkIds.splice(j--, 1);"]),
"} else {",
Template.indent([
"fulfilled = false;",
"if(priority < notFulfilled) notFulfilled = priority;"
]),
"}"
]),
"}",
"if(fulfilled) {",
Template.indent([
"deferred.splice(i--, 1)",
"var r = fn();",
"if (r !== undefined) result = r;"
]),
"}"
]),
"}",
"return result;"
]
)};`
]);
}
}
module.exports = OnChunksLoadedRuntimeModule;