Files
Laca-City/frontend/node_modules/next/dist/server/render-result.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

147 lines
5.4 KiB
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: function() {
return RenderResult;
}
});
const _nodewebstreamshelper = require("./stream-utils/node-web-streams-helper");
const _pipereadable = require("./pipe-readable");
class RenderResult {
/**
* Creates a new RenderResult instance from a static response.
*
* @param value the static response value
* @returns a new RenderResult instance
*/ static fromStatic(value) {
return new RenderResult(value, {
metadata: {}
});
}
constructor(response, { contentType, waitUntil, metadata }){
this.response = response;
this.contentType = contentType;
this.metadata = metadata;
this.waitUntil = waitUntil;
}
assignMetadata(metadata) {
Object.assign(this.metadata, metadata);
}
/**
* Returns true if the response is null. It can be null if the response was
* not found or was already sent.
*/ get isNull() {
return this.response === null;
}
/**
* Returns false if the response is a string. It can be a string if the page
* was prerendered. If it's not, then it was generated dynamically.
*/ get isDynamic() {
return typeof this.response !== "string";
}
toUnchunkedString(stream = false) {
if (this.response === null) {
throw new Error("Invariant: null responses cannot be unchunked");
}
if (typeof this.response !== "string") {
if (!stream) {
throw new Error("Invariant: dynamic responses cannot be unchunked. This is a bug in Next.js");
}
return (0, _nodewebstreamshelper.streamToString)(this.readable);
}
return this.response;
}
/**
* Returns the response if it is a stream, or throws an error if it is a
* string.
*/ get readable() {
if (this.response === null) {
throw new Error("Invariant: null responses cannot be streamed");
}
if (typeof this.response === "string") {
throw new Error("Invariant: static responses cannot be streamed");
}
// If the response is an array of streams, then chain them together.
if (Array.isArray(this.response)) {
return (0, _nodewebstreamshelper.chainStreams)(...this.response);
}
return this.response;
}
/**
* Chains a new stream to the response. This will convert the response to an
* array of streams if it is not already one and will add the new stream to
* the end. When this response is piped, all of the streams will be piped
* one after the other.
*
* @param readable The new stream to chain
*/ chain(readable) {
if (this.response === null) {
throw new Error("Invariant: response is null. This is a bug in Next.js");
}
// If the response is not an array of streams already, make it one.
let responses;
if (typeof this.response === "string") {
responses = [
(0, _nodewebstreamshelper.streamFromString)(this.response)
];
} else if (Array.isArray(this.response)) {
responses = this.response;
} else {
responses = [
this.response
];
}
// Add the new stream to the array.
responses.push(readable);
// Update the response.
this.response = responses;
}
/**
* Pipes the response to a writable stream. This will close/cancel the
* writable stream if an error is encountered. If this doesn't throw, then
* the writable stream will be closed or aborted.
*
* @param writable Writable stream to pipe the response to
*/ async pipeTo(writable) {
try {
await this.readable.pipeTo(writable, {
// We want to close the writable stream ourselves so that we can wait
// for the waitUntil promise to resolve before closing it. If an error
// is encountered, we'll abort the writable stream if we swallowed the
// error.
preventClose: true
});
// If there is a waitUntil promise, wait for it to resolve before
// closing the writable stream.
if (this.waitUntil) await this.waitUntil;
// Close the writable stream.
await writable.close();
} catch (err) {
// If this is an abort error, we should abort the writable stream (as we
// took ownership of it when we started piping). We don't need to re-throw
// because we handled the error.
if ((0, _pipereadable.isAbortError)(err)) {
// Abort the writable stream if an error is encountered.
await writable.abort(err);
return;
}
// We're not aborting the writer here as when this method throws it's not
// clear as to how so the caller should assume it's their responsibility
// to clean up the writer.
throw err;
}
}
/**
* Pipes the response to a node response. This will close/cancel the node
* response if an error is encountered.
*
* @param res
*/ async pipeToNodeResponse(res) {
await (0, _pipereadable.pipeToNodeResponse)(this.readable, res, this.waitUntil);
}
}
//# sourceMappingURL=render-result.js.map