feat(planning): grille hebdomadaire complète avec API et filtres
- Connexion API via proxy Angular (résolution CORS, base path /api) - Import CSS ng-zorro global pour les modales et composants - Filtres Camion/Show câblés sur l'affichage de la grille - Camions affichés via TrucksService (linkés au show du même créneau) - Panneau de détails : spectacles + camions du jour sélectionné - Modale de création de spectacle stylisée avec fond et centrage - Positionnement précis des events à la minute dans leur créneau - Auto-scroll vers l'heure courante au chargement - Ligne "maintenant" sur la colonne du jour actuel - Régénération des services OpenAPI (nouveaux noms de types) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+19
-51
@@ -30,6 +30,13 @@
|
||||
var sequentialMode = false;
|
||||
var inlineObjectReadThreshold = 2;
|
||||
var readStruct$1, onLoadedStructures$1, onSaveState;
|
||||
// no-eval build
|
||||
try {
|
||||
new Function('');
|
||||
} catch(error) {
|
||||
// if eval variants are not supported, do not create inline object readers ever
|
||||
inlineObjectReadThreshold = Infinity;
|
||||
}
|
||||
|
||||
let Unpackr$1 = class Unpackr {
|
||||
constructor(options) {
|
||||
@@ -499,18 +506,11 @@
|
||||
function readObject() {
|
||||
// This initial function is quick to instantiate, but runs slower. After several iterations pay the cost to build the faster function
|
||||
if (readObject.count++ > inlineObjectReadThreshold) {
|
||||
let optimizedReadObject;
|
||||
try {
|
||||
optimizedReadObject = structure.read = (new Function('r', 'return function(){return ' + (currentUnpackr.freezeData ? 'Object.freeze' : '') +
|
||||
'({' + structure.map(key => key === '__proto__' ? '__proto_:r()' : validName.test(key) ? key + ':r()' : ('[' + JSON.stringify(key) + ']:r()')).join(',') + '})}'))(read);
|
||||
} catch(error) {
|
||||
// in CF workers, the new Function call could begin to fail at any point in time
|
||||
inlineObjectReadThreshold = Infinity; // disable going forward
|
||||
return readObject(); // recursively try again
|
||||
}
|
||||
let readObject = structure.read = (new Function('r', 'return function(){return ' + (currentUnpackr.freezeData ? 'Object.freeze' : '') +
|
||||
'({' + structure.map(key => key === '__proto__' ? '__proto_:r()' : validName.test(key) ? key + ':r()' : ('[' + JSON.stringify(key) + ']:r()')).join(',') + '})}'))(read);
|
||||
if (structure.highByte === 0)
|
||||
structure.read = createSecondByteReader(firstId, structure.read);
|
||||
return optimizedReadObject() // second byte is already read, if there is one so immediately read object
|
||||
return readObject() // second byte is already read, if there is one so immediately read object
|
||||
}
|
||||
let object = {};
|
||||
for (let i = 0, l = structure.length; i < l; i++) {
|
||||
@@ -617,45 +617,26 @@
|
||||
} else if ((byte1 & 0xe0) === 0xc0) {
|
||||
// 2 bytes
|
||||
const byte2 = src[position$1++] & 0x3f;
|
||||
const codePoint = ((byte1 & 0x1f) << 6) | byte2;
|
||||
// Reject overlong encoding: 2-byte sequences must encode values >= 0x80
|
||||
if (codePoint < 0x80) {
|
||||
units.push(0xFFFD); // replacement character
|
||||
} else {
|
||||
units.push(codePoint);
|
||||
}
|
||||
units.push(((byte1 & 0x1f) << 6) | byte2);
|
||||
} else if ((byte1 & 0xf0) === 0xe0) {
|
||||
// 3 bytes
|
||||
const byte2 = src[position$1++] & 0x3f;
|
||||
const byte3 = src[position$1++] & 0x3f;
|
||||
const codePoint = ((byte1 & 0x1f) << 12) | (byte2 << 6) | byte3;
|
||||
// Reject overlong encoding: 3-byte sequences must encode values >= 0x800
|
||||
// Also reject surrogates (0xD800-0xDFFF)
|
||||
if (codePoint < 0x800 || (codePoint >= 0xD800 && codePoint <= 0xDFFF)) {
|
||||
units.push(0xFFFD); // replacement character
|
||||
} else {
|
||||
units.push(codePoint);
|
||||
}
|
||||
units.push(((byte1 & 0x1f) << 12) | (byte2 << 6) | byte3);
|
||||
} else if ((byte1 & 0xf8) === 0xf0) {
|
||||
// 4 bytes
|
||||
const byte2 = src[position$1++] & 0x3f;
|
||||
const byte3 = src[position$1++] & 0x3f;
|
||||
const byte4 = src[position$1++] & 0x3f;
|
||||
let unit = ((byte1 & 0x07) << 0x12) | (byte2 << 0x0c) | (byte3 << 0x06) | byte4;
|
||||
// Reject overlong encoding: 4-byte sequences must encode values >= 0x10000
|
||||
// Also reject values > 0x10FFFF (maximum valid Unicode)
|
||||
if (unit < 0x10000 || unit > 0x10FFFF) {
|
||||
units.push(0xFFFD); // replacement character
|
||||
} else if (unit > 0xffff) {
|
||||
if (unit > 0xffff) {
|
||||
unit -= 0x10000;
|
||||
units.push(((unit >>> 10) & 0x3ff) | 0xd800);
|
||||
unit = 0xdc00 | (unit & 0x3ff);
|
||||
units.push(unit);
|
||||
} else {
|
||||
units.push(unit);
|
||||
}
|
||||
units.push(unit);
|
||||
} else {
|
||||
units.push(0xFFFD); // replacement character for invalid lead byte
|
||||
units.push(byte1);
|
||||
}
|
||||
|
||||
if (units.length >= 0x1000) {
|
||||
@@ -1028,7 +1009,7 @@
|
||||
if (length <= 40) {
|
||||
let out = view.getBigUint64(start);
|
||||
for (let i = start + 8; i < end; i += 8) {
|
||||
out <<= BigInt(64);
|
||||
out <<= BigInt(64n);
|
||||
out |= view.getBigUint64(i);
|
||||
}
|
||||
return out
|
||||
@@ -1357,13 +1338,9 @@
|
||||
hasSharedUpdate = false;
|
||||
let encodingError;
|
||||
try {
|
||||
if (packr.randomAccessStructure && value && typeof value === 'object') {
|
||||
if (value.constructor === Object) writeStruct(value); // simple object
|
||||
else if (value.constructor !== Map && !Array.isArray(value) && !extensionClasses.some(extClass => value instanceof extClass)) {
|
||||
// allow user classes, if they don't need special handling (but do use toJSON if available)
|
||||
writeStruct(value.toJSON ? value.toJSON() : value);
|
||||
} else pack(value);
|
||||
} else
|
||||
if (packr.randomAccessStructure && value && value.constructor && value.constructor === Object)
|
||||
writeStruct(value);
|
||||
else
|
||||
pack(value);
|
||||
let lastBundle = bundledStrings;
|
||||
if (bundledStrings)
|
||||
@@ -3294,15 +3271,6 @@
|
||||
var deserialized = unpack(serialized);
|
||||
assert.equal(deserialized, data);
|
||||
});
|
||||
test('overlong UTF-8 string', function () {
|
||||
const payload = Buffer.concat([
|
||||
Buffer.from([0xa2]), // msgpack fixstr, 2 bytes
|
||||
Buffer.from([0xc0, 0xaf]), // overlong "/"
|
||||
]);
|
||||
|
||||
const result = unpack(payload);
|
||||
assert.notEqual(result, '/');
|
||||
});
|
||||
test('use ArrayBuffer', function () {
|
||||
const data = {prop: 'a test'};
|
||||
var serialized = pack(data);
|
||||
|
||||
Reference in New Issue
Block a user