✨ 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
73 lines
1.5 KiB
JavaScript
73 lines
1.5 KiB
JavaScript
'use strict';
|
|
|
|
var tape = require('tape');
|
|
var vectors = require('hash-test-vectors');
|
|
// var from = require('bops/typedarray/from')
|
|
var Buffer = require('safe-buffer').Buffer;
|
|
|
|
var createHash = require('../');
|
|
|
|
function makeTest(alg, i, verbose) {
|
|
var v = vectors[i];
|
|
|
|
tape(alg + ': NIST vector ' + i, function (t) {
|
|
if (verbose) {
|
|
t.comment(v);
|
|
t.comment('VECTOR', i);
|
|
t.comment('INPUT', v.input);
|
|
t.comment(Buffer.from(v.input, 'base64').toString('hex'));
|
|
}
|
|
|
|
var buf = Buffer.from(v.input, 'base64');
|
|
t.equal(createHash(alg).update(buf).digest('hex'), v[alg]);
|
|
|
|
// eslint-disable-next-line no-param-reassign
|
|
i = ~~(buf.length / 2);
|
|
var buf1 = buf.slice(0, i);
|
|
var buf2 = buf.slice(i, buf.length);
|
|
|
|
t.comment(buf1.length + ', ' + buf2.length + ', ' + buf.length);
|
|
t.comment(createHash(alg)._block.length);
|
|
|
|
t.equal(
|
|
createHash(alg)
|
|
.update(buf1)
|
|
.update(buf2)
|
|
.digest('hex'),
|
|
v[alg]
|
|
);
|
|
|
|
var j, buf3;
|
|
|
|
// eslint-disable-next-line no-param-reassign
|
|
i = ~~(buf.length / 3);
|
|
j = ~~(buf.length * 2 / 3);
|
|
buf1 = buf.slice(0, i);
|
|
buf2 = buf.slice(i, j);
|
|
buf3 = buf.slice(j, buf.length);
|
|
|
|
t.equal(
|
|
createHash(alg)
|
|
.update(buf1)
|
|
.update(buf2)
|
|
.update(buf3)
|
|
.digest('hex'),
|
|
v[alg]
|
|
);
|
|
|
|
setTimeout(function () {
|
|
// avoid "too much recursion" errors in tape in firefox
|
|
t.end();
|
|
});
|
|
});
|
|
}
|
|
|
|
vectors.forEach(function (v, i) {
|
|
makeTest('sha', i);
|
|
makeTest('sha1', i);
|
|
makeTest('sha224', i);
|
|
makeTest('sha256', i);
|
|
makeTest('sha384', i);
|
|
makeTest('sha512', i);
|
|
});
|