Files
Laca-City/frontend/node_modules/next/dist/esm/shared/lib/magic-identifier.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

77 lines
2.2 KiB
JavaScript

function decodeHex(hexStr) {
if (hexStr.trim() === "") {
throw new Error("can't decode empty hex");
}
const num = parseInt(hexStr, 16);
if (isNaN(num)) {
throw new Error("invalid hex: `" + hexStr + "`");
}
return String.fromCodePoint(num);
}
var Mode;
const DECODE_REGEX = /^__TURBOPACK__([a-zA-Z0-9_$]+)__$/;
export function decodeMagicIdentifier(identifier) {
const matches = identifier.match(DECODE_REGEX);
if (!matches) {
return identifier;
}
const inner = matches[1];
let output = "";
let mode = 0;
let buffer = "";
for(let i = 0; i < inner.length; i++){
const char = inner[i];
if (mode === 0) {
if (char === "_") {
mode = 1;
} else if (char === "$") {
mode = 2;
} else {
output += char;
}
} else if (mode === 1) {
if (char === "_") {
output += " ";
mode = 0;
} else if (char === "$") {
output += "_";
mode = 2;
} else {
output += char;
mode = 0;
}
} else if (mode === 2) {
if (buffer.length === 2) {
output += decodeHex(buffer);
buffer = "";
}
if (char === "_") {
if (buffer !== "") {
throw new Error("invalid hex: `" + buffer + "`");
}
mode = 3;
} else if (char === "$") {
if (buffer !== "") {
throw new Error("invalid hex: `" + buffer + "`");
}
mode = 0;
} else {
buffer += char;
}
} else if (mode === 3) {
if (char === "_") {
throw new Error("invalid hex: `" + (buffer + char) + "`");
} else if (char === "$") {
output += decodeHex(buffer);
buffer = "";
mode = 0;
} else {
buffer += char;
}
}
}
return output;
}
export const MAGIC_IDENTIFIER_REGEX = /__TURBOPACK__[a-zA-Z0-9_$]+__/g;
//# sourceMappingURL=magic-identifier.js.map