🎯 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
This commit is contained in:
2025-07-20 19:52:16 +07:00
parent 3203463a6a
commit c65cc97a33
64624 changed files with 7199453 additions and 6462 deletions

15
backend/node_modules/uid/dist/index.js generated vendored Normal file
View File

@@ -0,0 +1,15 @@
var IDX=256, HEX=[], SIZE=256, BUFFER;
while (IDX--) HEX[IDX] = (IDX + 256).toString(16).substring(1);
function uid(len) {
var i=0, tmp=(len || 11);
if (!BUFFER || ((IDX + tmp) > SIZE*2)) {
for (BUFFER='',IDX=0; i < SIZE; i++) {
BUFFER += HEX[Math.random() * 256 | 0];
}
}
return BUFFER.substring(IDX, IDX++ + tmp);
}
exports.uid = uid;

1
backend/node_modules/uid/dist/index.min.js generated vendored Normal file
View File

@@ -0,0 +1 @@
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(n.uid={})}(this,(function(n){for(var t,e=256,o=[];e--;)o[e]=(e+256).toString(16).substring(1);n.uid=function(n){var i=0,f=n||11;if(!t||e+f>512)for(t="",e=0;i<256;i++)t+=o[256*Math.random()|0];return t.substring(e,e+++f)}}));

13
backend/node_modules/uid/dist/index.mjs generated vendored Normal file
View File

@@ -0,0 +1,13 @@
var IDX=256, HEX=[], SIZE=256, BUFFER;
while (IDX--) HEX[IDX] = (IDX + 256).toString(16).substring(1);
export function uid(len) {
var i=0, tmp=(len || 11);
if (!BUFFER || ((IDX + tmp) > SIZE*2)) {
for (BUFFER='',IDX=0; i < SIZE; i++) {
BUFFER += HEX[Math.random() * 256 | 0];
}
}
return BUFFER.substring(IDX, IDX++ + tmp);
}

6
backend/node_modules/uid/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,6 @@
/**
* Produce a UID of desired length.
* @NOTE Relies on a hexadecimal alphabet (A-E, 0-9).
* @param {number} [length] Defaults to `11`
*/
export function uid(length?: number): string;

9
backend/node_modules/uid/license generated vendored Normal file
View File

@@ -0,0 +1,9 @@
MIT License
Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

70
backend/node_modules/uid/package.json generated vendored Normal file
View File

@@ -0,0 +1,70 @@
{
"name": "uid",
"version": "2.0.2",
"repository": "lukeed/uid",
"description": "A tiny (130B to 205B) and fast utility to randomize unique IDs of fixed length",
"unpkg": "dist/index.min.js",
"module": "dist/index.mjs",
"main": "dist/index.js",
"types": "index.d.ts",
"license": "MIT",
"author": {
"name": "Luke Edwards",
"email": "luke.edwards05@gmail.com",
"url": "https://lukeed.com"
},
"engines": {
"node": ">=8"
},
"scripts": {
"build": "bundt",
"test": "uvu -r esm test -i collisions"
},
"exports": {
".": {
"types": "./index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./single": {
"types": "./single/index.d.ts",
"import": "./single/index.mjs",
"require": "./single/index.js"
},
"./secure": {
"types": "./secure/index.d.ts",
"import": "./secure/index.mjs",
"require": "./secure/index.js"
},
"./package.json": "./package.json"
},
"files": [
"*.d.ts",
"single",
"secure",
"dist"
],
"keywords": [
"id",
"uid",
"uuid",
"random",
"generate",
"secure",
"crypto",
"foid"
],
"modes": {
"secure": "src/secure.js",
"default": "src/index.js",
"single": "src/single.js"
},
"dependencies": {
"@lukeed/csprng": "^1.0.0"
},
"devDependencies": {
"bundt": "1.1.1",
"esm": "3.2.25",
"uvu": "0.3.4"
}
}

194
backend/node_modules/uid/readme.md generated vendored Normal file
View File

@@ -0,0 +1,194 @@
# uid [![CI](https://github.com/lukeed/uid/workflows/CI/badge.svg)](https://github.com/lukeed/uid/actions) [![codecov](https://badgen.now.sh/codecov/c/github/lukeed/uid)](https://codecov.io/gh/lukeed/uid)
> A tiny (130B to 205B) and [fast](#benchmarks) utility to randomize unique IDs of fixed length
_**Fast object IDs.** Available for Node.js and the browser._<br>Generate **randomized** output strings of fixed length using lowercase alphanumeric characters (`a-z0-9`). To produce IDs in UUID.V4 format, please see [`@lukeed/uuid`](https://github.com/lukeed/uuid).
This module offers multiple [modes](#modes) for your needs:
* [`uid`](#uid)<br>_The default is "non-secure", which uses `Math.random` to produce UUIDs._
* [`uid/secure`](#uidsecure)<br>_The "secure" mode produces cryptographically secure (CSPRNG) UUIDs using the current environment's `crypto` module._
* [`uid/single`](#uidsingle)<br>_The "single" mode does not maintain an internal cache, which makes it ideal for short-lived environments._
Additionally, this module is preconfigured for native ESM support in Node.js with fallback to CommonJS. It will also work with any Rollup and webpack configuration, regardless of the "mode" selected.
## Install
```
$ npm install --save uid
```
## Modes
There are three "versions" of `uid` available:
#### `uid`
> **Size (gzip):** 174 bytes<br>
> **Availability:** [CommonJS](https://unpkg.com/uid/dist/index.js), [ES Module](https://unpkg.com/uid/dist/index.mjs), [UMD](https://unpkg.com/uid/dist/index.min.js)
Relies on `Math.random`, which means that, while faster, this mode **is not** cryptographically secure. <br>Works in Node.js and all browsers. <br>Alphabet: ***Hexadecimal***
#### `uid/secure`
> **Size (gzip):** 205 bytes<br>
> **Availability:** [CommonJS](https://unpkg.com/uid/secure/index.js), [ES Module](https://unpkg.com/uid/secure/index.mjs), [UMD](https://unpkg.com/uid/secure/index.min.js)
Relies on the environment's `crypto` module in order to produce cryptographically secure (CSPRNG) values. <br>Works in all versions of Node.js. Works in all browsers with [`crypto.getRandomValues()` support](https://caniuse.com/#feat=getrandomvalues). <br>Alphabet: ***Hexadecimal***
#### `uid/single`
> **Size (gzip):** 131 bytes<br>
> **Availability:** [CommonJS](https://unpkg.com/uid/single/index.js), [ES Module](https://unpkg.com/uid/single/index.mjs), [UMD](https://unpkg.com/uid/single/index.min.js)
Relies on `Math.random`, which means that this mode **is not** cryptographically secure. <br>Does **not** maintain an internal buffer, which makes this mode ideal for single-use and/or short-lived environments. <br>Works in Node.js and all browsers. <br>Alphabet: ***Alphanumeric***
## Usage
```js
import { uid } from 'uid';
// or: import { uid } from 'uid/secure';
// or: import { uid } from 'uid/single';
// length = 11 (default)
uid(); //=> 'c92054d1dd6'
uid(); //=> 'ac84bbb3728'
// customize length
uid(16); //=> '8234dbf9a7dcec3b'
uid(25); //=> '4bbb3728b7a00a12209ec5ff5'
uid(32); //=> 'dcbc3e65506a7e6f15d30a357e884432'
```
## API
### uid(length?)
Returns: `String`
Creates a new random identifer of fixed length.
#### length
Type: `Number`<br>
Default: `11`
Then length of the output string.
> **Important:** Your risk of collisions decreases with longer strings!
## Benchmarks
You can run the benchmark(s) yourself via the [`/bench`](/bench) directory.
All items listed pass a validation step for length and uniqueness. <br>
Items marked with a `†` are cryptographically secure (via CSPRNG).
> Running on Node.js v12.18.4
```
Benchmark (length = 11):
hashids/fixed x 387,306 ops/sec ±1.03% (92 runs sampled)
nanoid/non-secure x 5,338,433 ops/sec ±0.20% (95 runs sampled)
† nanoid x 2,705,158 ops/sec ±0.31% (95 runs sampled)
† uid/secure x 9,648,755 ops/sec ±0.18% (96 runs sampled)
uid/single x 4,843,529 ops/sec ±0.19% (96 runs sampled)
uid x 21,276,788 ops/sec ±0.37% (94 runs sampled)
Benchmark (length = 16):
hashids/fixed x 409,228 ops/sec ±0.36% (98 runs sampled)
nanoid/non-secure x 3,643,896 ops/sec ±1.27% (96 runs sampled)
† nanoid x 2,273,555 ops/sec ±0.15% (95 runs sampled)
† uid/secure x 9,167,545 ops/sec ±0.32% (95 runs sampled)
uid/single x 3,624,579 ops/sec ±0.29% (95 runs sampled)
uid x 24,770,463 ops/sec ±0.41% (97 runs sampled)
Benchmark (length = 25):
cuid x 177,241 ops/sec ±1.38% (91 runs sampled)
hashids/fixed x 396,013 ops/sec ±0.21% (98 runs sampled)
nanoid/non-secure x 2,477,463 ops/sec ±0.37% (96 runs sampled)
† nanoid x 1,794,062 ops/sec ±0.18% (97 runs sampled)
† uid/secure x 3,778,663 ops/sec ±0.16% (95 runs sampled)
uid/single x 2,428,167 ops/sec ±0.27% (96 runs sampled)
uid x 24,580,091 ops/sec ±0.31% (96 runs sampled)
Benchmark (length = 36):
uuid/v1 x 1,738,574 ops/sec ±0.36% (97 runs sampled)
uuid/v4 x 1,276,888 ops/sec ±0.26% (94 runs sampled)
hashids/fixed x 374,294 ops/sec ±0.14% (98 runs sampled)
nanoid/non-secure x 1,816,630 ops/sec ±0.31% (97 runs sampled)
† nanoid x 1,364,928 ops/sec ±0.18% (95 runs sampled)
† @lukeed/uuid/secure x 5,144,752 ops/sec ±0.28% (93 runs sampled)
@lukeed/uuid x 5,950,932 ops/sec ±0.53% (95 runs sampled)
† uid/secure x 5,163,209 ops/sec ±0.32% (96 runs sampled)
uid/single x 1,755,748 ops/sec ±0.24% (99 runs sampled)
uid x 20,166,119 ops/sec ±0.66% (94 runs sampled)
```
> Running on Chrome 85.0.4183.121
```
Benchmark (length = 11):
hashids/fixed x 369,393 ops/sec ±1.04% (67 runs sampled)
nanoid/non-secure x 4,741,795 ops/sec ±0.67% (68 runs sampled)
† nanoid x 176,138 ops/sec ±7.17% (57 runs sampled)
† uid/secure x 2,061,703 ops/sec ±3.95% (65 runs sampled)
uid/single x 4,547,527 ops/sec ±0.29% (67 runs sampled)
uid x 21,073,518 ops/sec ±0.60% (67 runs sampled)
Benchmark (length = 16):
hashids/fixed x 362,882 ops/sec ±0.25% (67 runs sampled)
nanoid/non-secure x 3,245,036 ops/sec ±1.05% (67 runs sampled)
† nanoid x 165,535 ops/sec ±5.21% (59 runs sampled)
† uid/secure x 1,676,705 ops/sec ±0.25% (68 runs sampled)
uid/single x 3,322,695 ops/sec ±0.49% (67 runs sampled)
uid x 24,074,441 ops/sec ±0.35% (67 runs sampled)
Benchmark (length = 25):
cuid x 99,011 ops/sec ±6.09% (57 runs sampled)
hashids/fixed x 349,187 ops/sec ±0.21% (68 runs sampled)
nanoid/non-secure x 2,245,251 ops/sec ±1.21% (61 runs sampled)
† nanoid x 143,529 ops/sec ±4.53% (62 runs sampled)
† uid/secure x 936,133 ops/sec ±2.14% (67 runs sampled)
uid/single x 2,276,265 ops/sec ±1.17% (66 runs sampled)
uid x 23,409,912 ops/sec ±1.81% (67 runs sampled)
Benchmark (length = 36):
uuid/v1 x 1,695,352 ops/sec ±0.26% (67 runs sampled)
uuid/v4 x 294,032 ops/sec ±1.75% (63 runs sampled)
hashids/fixed x 340,402 ops/sec ±0.37% (50 runs sampled)
nanoid/non-secure x 1,611,905 ops/sec ±0.45% (66 runs sampled)
† nanoid x 118,006 ops/sec ±6.31% (52 runs sampled)
† @lukeed/uuid/secure x 859,592 ops/sec ±0.54% (67 runs sampled)
@lukeed/uuid x 6,041,873 ops/sec ±0.33% (66 runs sampled)
† uid/secure x 776,658 ops/sec ±0.31% (56 runs sampled)
uid/single x 1,646,199 ops/sec ±1.17% (66 runs sampled)
uid x 22,779,817 ops/sec ±0.66% (67 runs sampled)
```
## Performance
The reason `uid` and `uid/secure` are so much faster than its alternatives is two-fold:
1) It composes an output with hexadecimal pairs (from a cached dictionary) instead of single characters.
2) It allocates a larger Buffer/ArrayBuffer up front (expensive) and slices off chunks as needed (cheap).
The `uid/secure` module maintains an internal ArrayBuffer of 4096 bytes, which supplies **256** `uid()` invocations. However, the default module (`uid`) preallocates **512** invocations using less memory upfront. Both implementations will regenerate its internal allocation as needed.
Larger buffers would result in higher performance over time, but I found these to be a good balance of performance and memory space.
> **Note:** If you want to don't want to preallocate memory, and do not need a CSPRNG, check out the `uid/single` mode.
## Related
- [hexoid](https://github.com/lukeed/hexoid) - A slightly larger (190B) but extremely fast variant of this module with a different API
- [@lukeed/uuid](https://github.com/lukeed/uuid) - A tiny (230B), fast, and cryptographically secure UUID (V4) generator for Node and the browser
## Credits
Thank you [Matthew Mueller](https://github.com/matthewmueller) for gifting the `uid` name on npm.<br>
This module was previously known as `foid` (fast object IDs).
## License
MIT © [Luke Edwards](https://lukeed.com)

6
backend/node_modules/uid/secure/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,6 @@
/**
* Produce a cryptographically secure (CSPRNG) UID of desired length using the current environment's `crypto` module.
* @NOTE Relies on a hexadecimal alphabet (A-E, 0-9).
* @param {number} [length] Defaults to `11`
*/
export function uid(length?: number): string;

20
backend/node_modules/uid/secure/index.js generated vendored Normal file
View File

@@ -0,0 +1,20 @@
const { random } = require('@lukeed/csprng');
var IDX=256, HEX=[], SIZE=256*16, BUFFER;
while (IDX--) HEX[IDX] = (IDX + 256).toString(16).substring(1);
function uid(len) {
var str='', tmp=(len || 11), num=(1+tmp) / 2 | 0;
if (!BUFFER || ((IDX + num) > SIZE)) {
BUFFER = random(SIZE);
IDX = 0;
}
while (num--) {
str += HEX[BUFFER[IDX++]];
}
return str.substring(0, tmp);
}
exports.uid = uid;

1
backend/node_modules/uid/secure/index.min.js generated vendored Normal file
View File

@@ -0,0 +1 @@
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(e.uid={})}(this,(function(e){const{random:n}=require("@lukeed/csprng");for(var t,o=256,r=[];o--;)r[o]=(o+256).toString(16).substring(1);e.uid=function(e){var i="",f=e||11,u=(1+f)/2|0;for((!t||o+u>4096)&&(t=n(4096),o=0);u--;)i+=r[t[o++]];return i.substring(0,f)}}));

18
backend/node_modules/uid/secure/index.mjs generated vendored Normal file
View File

@@ -0,0 +1,18 @@
import { random } from '@lukeed/csprng';
var IDX=256, HEX=[], SIZE=256*16, BUFFER;
while (IDX--) HEX[IDX] = (IDX + 256).toString(16).substring(1);
export function uid(len) {
var str='', tmp=(len || 11), num=(1+tmp) / 2 | 0;
if (!BUFFER || ((IDX + num) > SIZE)) {
BUFFER = random(SIZE);
IDX = 0;
}
while (num--) {
str += HEX[BUFFER[IDX++]];
}
return str.substring(0, tmp);
}

6
backend/node_modules/uid/single/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,6 @@
/**
* Produce a UID of desired length.
* @NOTE Relies on a alpanumic alphabet (A-Z, 0-9).
* @param {number} [length] Defaults to `11`
*/
export function uid(length?: number): string;

10
backend/node_modules/uid/single/index.js generated vendored Normal file
View File

@@ -0,0 +1,10 @@
var IDX=36, HEX='';
while (IDX--) HEX += IDX.toString(36);
function uid(len) {
var str='', num = len || 11;
while (num--) str += HEX[Math.random() * 36 | 0];
return str;
}
exports.uid = uid;

1
backend/node_modules/uid/single/index.min.js generated vendored Normal file
View File

@@ -0,0 +1 @@
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(e.uid={})}(this,(function(e){for(var n=36,o="";n--;)o+=n.toString(36);e.uid=function(e){for(var n="",t=e||11;t--;)n+=o[36*Math.random()|0];return n}}));

8
backend/node_modules/uid/single/index.mjs generated vendored Normal file
View File

@@ -0,0 +1,8 @@
var IDX=36, HEX='';
while (IDX--) HEX += IDX.toString(36);
export function uid(len) {
var str='', num = len || 11;
while (num--) str += HEX[Math.random() * 36 | 0];
return str;
}