@utilix-tech/sdk 0.70.0 → 0.72.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +21 -5
- package/dist/{chunk-226EH3ZI.js → chunk-PT4N4UBL.js} +132 -1
- package/dist/{chunk-653HDWXW.js → chunk-S5FTESKL.js} +91 -1
- package/dist/index.cjs +221 -0
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/{media-BUvwm4wU.d.cts → media-56zrIBw4.d.cts} +47 -2
- package/dist/{media-BUvwm4wU.d.ts → media-56zrIBw4.d.ts} +47 -2
- package/dist/tools/media.cjs +131 -0
- package/dist/tools/media.d.cts +1 -1
- package/dist/tools/media.d.ts +1 -1
- package/dist/tools/media.js +1 -1
- package/dist/tools/units.cjs +90 -0
- package/dist/tools/units.d.cts +1 -1
- package/dist/tools/units.d.ts +1 -1
- package/dist/tools/units.js +1 -1
- package/dist/{units-BT8P27G0.d.cts → units-DB0W2pvU.d.cts} +47 -2
- package/dist/{units-BT8P27G0.d.ts → units-DB0W2pvU.d.ts} +47 -2
- package/package.json +1 -1
|
@@ -224,6 +224,45 @@ interface GifInfoError {
|
|
|
224
224
|
* any LZW-compressed pixel data.
|
|
225
225
|
*/
|
|
226
226
|
declare function inspectGifFrames(bytes: Uint8Array): GifInfo | GifInfoError;
|
|
227
|
+
type MidiDivision = {
|
|
228
|
+
type: 'ppq';
|
|
229
|
+
ticksPerQuarterNote: number;
|
|
230
|
+
} | {
|
|
231
|
+
type: 'smpte';
|
|
232
|
+
framesPerSecond: number;
|
|
233
|
+
ticksPerFrame: number;
|
|
234
|
+
};
|
|
235
|
+
interface MidiTrackInfo {
|
|
236
|
+
index: number;
|
|
237
|
+
name: string | null;
|
|
238
|
+
eventCount: number;
|
|
239
|
+
noteOnCount: number;
|
|
240
|
+
}
|
|
241
|
+
interface MidiTimeSignature {
|
|
242
|
+
numerator: number;
|
|
243
|
+
denominator: number;
|
|
244
|
+
}
|
|
245
|
+
interface MidiInfo {
|
|
246
|
+
format: number;
|
|
247
|
+
trackCount: number;
|
|
248
|
+
division: MidiDivision;
|
|
249
|
+
initialTempoBpm: number;
|
|
250
|
+
timeSignature: MidiTimeSignature | null;
|
|
251
|
+
durationSeconds: number | null;
|
|
252
|
+
tracks: MidiTrackInfo[];
|
|
253
|
+
}
|
|
254
|
+
interface MidiInfoError {
|
|
255
|
+
error: string;
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Parse a Standard MIDI File (SMF) header and every track chunk to report
|
|
259
|
+
* format (0/1/2), the tick division, initial tempo, time signature, a
|
|
260
|
+
* per-track event/note-on count, and total duration in seconds. Duration
|
|
261
|
+
* accounts for tempo-change meta events across the whole file when the
|
|
262
|
+
* division is ticks-per-quarter-note; the rarer SMPTE division uses a fixed
|
|
263
|
+
* frames-per-second/ticks-per-frame rate instead.
|
|
264
|
+
*/
|
|
265
|
+
declare function readMidiInfo(bytes: Uint8Array): MidiInfo | MidiInfoError;
|
|
227
266
|
|
|
228
267
|
type media_ExifData = ExifData;
|
|
229
268
|
type media_ExifError = ExifError;
|
|
@@ -239,6 +278,11 @@ type media_Id3TagsError = Id3TagsError;
|
|
|
239
278
|
type media_ImageFormat = ImageFormat;
|
|
240
279
|
type media_ImageInfo = ImageInfo;
|
|
241
280
|
type media_ImageInfoError = ImageInfoError;
|
|
281
|
+
type media_MidiDivision = MidiDivision;
|
|
282
|
+
type media_MidiInfo = MidiInfo;
|
|
283
|
+
type media_MidiInfoError = MidiInfoError;
|
|
284
|
+
type media_MidiTimeSignature = MidiTimeSignature;
|
|
285
|
+
type media_MidiTrackInfo = MidiTrackInfo;
|
|
242
286
|
type media_PdfMetadata = PdfMetadata;
|
|
243
287
|
type media_PdfMetadataError = PdfMetadataError;
|
|
244
288
|
type media_PdfPageDimension = PdfPageDimension;
|
|
@@ -254,12 +298,13 @@ declare const media_readFlacInfo: typeof readFlacInfo;
|
|
|
254
298
|
declare const media_readIcoInfo: typeof readIcoInfo;
|
|
255
299
|
declare const media_readId3Tags: typeof readId3Tags;
|
|
256
300
|
declare const media_readImageInfo: typeof readImageInfo;
|
|
301
|
+
declare const media_readMidiInfo: typeof readMidiInfo;
|
|
257
302
|
declare const media_readPdfMetadata: typeof readPdfMetadata;
|
|
258
303
|
declare const media_readPdfPageDimensions: typeof readPdfPageDimensions;
|
|
259
304
|
declare const media_readVideoInfo: typeof readVideoInfo;
|
|
260
305
|
declare const media_readWavInfo: typeof readWavInfo;
|
|
261
306
|
declare namespace media {
|
|
262
|
-
export { type media_ExifData as ExifData, type media_ExifError as ExifError, type media_FlacInfo as FlacInfo, type media_FlacInfoError as FlacInfoError, type media_GifInfo as GifInfo, type media_GifInfoError as GifInfoError, type media_IcoImageEntry as IcoImageEntry, type media_IcoInfo as IcoInfo, type media_IcoInfoError as IcoInfoError, type media_Id3Tags as Id3Tags, type media_Id3TagsError as Id3TagsError, type media_ImageFormat as ImageFormat, type media_ImageInfo as ImageInfo, type media_ImageInfoError as ImageInfoError, type media_PdfMetadata as PdfMetadata, type media_PdfMetadataError as PdfMetadataError, type media_PdfPageDimension as PdfPageDimension, type media_PdfPageDimensionsResult as PdfPageDimensionsResult, type media_PdfPageOrientation as PdfPageOrientation, type media_VideoInfo as VideoInfo, type media_VideoInfoError as VideoInfoError, type media_WavInfo as WavInfo, type media_WavInfoError as WavInfoError, media_inspectGifFrames as inspectGifFrames, media_readExifData as readExifData, media_readFlacInfo as readFlacInfo, media_readIcoInfo as readIcoInfo, media_readId3Tags as readId3Tags, media_readImageInfo as readImageInfo, media_readPdfMetadata as readPdfMetadata, media_readPdfPageDimensions as readPdfPageDimensions, media_readVideoInfo as readVideoInfo, media_readWavInfo as readWavInfo };
|
|
307
|
+
export { type media_ExifData as ExifData, type media_ExifError as ExifError, type media_FlacInfo as FlacInfo, type media_FlacInfoError as FlacInfoError, type media_GifInfo as GifInfo, type media_GifInfoError as GifInfoError, type media_IcoImageEntry as IcoImageEntry, type media_IcoInfo as IcoInfo, type media_IcoInfoError as IcoInfoError, type media_Id3Tags as Id3Tags, type media_Id3TagsError as Id3TagsError, type media_ImageFormat as ImageFormat, type media_ImageInfo as ImageInfo, type media_ImageInfoError as ImageInfoError, type media_MidiDivision as MidiDivision, type media_MidiInfo as MidiInfo, type media_MidiInfoError as MidiInfoError, type media_MidiTimeSignature as MidiTimeSignature, type media_MidiTrackInfo as MidiTrackInfo, type media_PdfMetadata as PdfMetadata, type media_PdfMetadataError as PdfMetadataError, type media_PdfPageDimension as PdfPageDimension, type media_PdfPageDimensionsResult as PdfPageDimensionsResult, type media_PdfPageOrientation as PdfPageOrientation, type media_VideoInfo as VideoInfo, type media_VideoInfoError as VideoInfoError, type media_WavInfo as WavInfo, type media_WavInfoError as WavInfoError, media_inspectGifFrames as inspectGifFrames, media_readExifData as readExifData, media_readFlacInfo as readFlacInfo, media_readIcoInfo as readIcoInfo, media_readId3Tags as readId3Tags, media_readImageInfo as readImageInfo, media_readMidiInfo as readMidiInfo, media_readPdfMetadata as readPdfMetadata, media_readPdfPageDimensions as readPdfPageDimensions, media_readVideoInfo as readVideoInfo, media_readWavInfo as readWavInfo };
|
|
263
308
|
}
|
|
264
309
|
|
|
265
|
-
export {
|
|
310
|
+
export { readImageInfo as A, readMidiInfo as B, readPdfMetadata as C, readPdfPageDimensions as D, type ExifData as E, type FlacInfo as F, type GifInfo as G, readVideoInfo as H, type IcoImageEntry as I, readWavInfo as J, type MidiDivision as M, type PdfMetadata as P, type VideoInfo as V, type WavInfo as W, type ExifError as a, type FlacInfoError as b, type GifInfoError as c, type IcoInfo as d, type IcoInfoError as e, type Id3Tags as f, type Id3TagsError as g, type ImageFormat as h, type ImageInfo as i, type ImageInfoError as j, type MidiInfo as k, type MidiInfoError as l, media as m, type MidiTimeSignature as n, type MidiTrackInfo as o, type PdfMetadataError as p, type PdfPageDimension as q, type PdfPageDimensionsResult as r, type PdfPageOrientation as s, type VideoInfoError as t, type WavInfoError as u, inspectGifFrames as v, readExifData as w, readFlacInfo as x, readIcoInfo as y, readId3Tags as z };
|
|
@@ -224,6 +224,45 @@ interface GifInfoError {
|
|
|
224
224
|
* any LZW-compressed pixel data.
|
|
225
225
|
*/
|
|
226
226
|
declare function inspectGifFrames(bytes: Uint8Array): GifInfo | GifInfoError;
|
|
227
|
+
type MidiDivision = {
|
|
228
|
+
type: 'ppq';
|
|
229
|
+
ticksPerQuarterNote: number;
|
|
230
|
+
} | {
|
|
231
|
+
type: 'smpte';
|
|
232
|
+
framesPerSecond: number;
|
|
233
|
+
ticksPerFrame: number;
|
|
234
|
+
};
|
|
235
|
+
interface MidiTrackInfo {
|
|
236
|
+
index: number;
|
|
237
|
+
name: string | null;
|
|
238
|
+
eventCount: number;
|
|
239
|
+
noteOnCount: number;
|
|
240
|
+
}
|
|
241
|
+
interface MidiTimeSignature {
|
|
242
|
+
numerator: number;
|
|
243
|
+
denominator: number;
|
|
244
|
+
}
|
|
245
|
+
interface MidiInfo {
|
|
246
|
+
format: number;
|
|
247
|
+
trackCount: number;
|
|
248
|
+
division: MidiDivision;
|
|
249
|
+
initialTempoBpm: number;
|
|
250
|
+
timeSignature: MidiTimeSignature | null;
|
|
251
|
+
durationSeconds: number | null;
|
|
252
|
+
tracks: MidiTrackInfo[];
|
|
253
|
+
}
|
|
254
|
+
interface MidiInfoError {
|
|
255
|
+
error: string;
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Parse a Standard MIDI File (SMF) header and every track chunk to report
|
|
259
|
+
* format (0/1/2), the tick division, initial tempo, time signature, a
|
|
260
|
+
* per-track event/note-on count, and total duration in seconds. Duration
|
|
261
|
+
* accounts for tempo-change meta events across the whole file when the
|
|
262
|
+
* division is ticks-per-quarter-note; the rarer SMPTE division uses a fixed
|
|
263
|
+
* frames-per-second/ticks-per-frame rate instead.
|
|
264
|
+
*/
|
|
265
|
+
declare function readMidiInfo(bytes: Uint8Array): MidiInfo | MidiInfoError;
|
|
227
266
|
|
|
228
267
|
type media_ExifData = ExifData;
|
|
229
268
|
type media_ExifError = ExifError;
|
|
@@ -239,6 +278,11 @@ type media_Id3TagsError = Id3TagsError;
|
|
|
239
278
|
type media_ImageFormat = ImageFormat;
|
|
240
279
|
type media_ImageInfo = ImageInfo;
|
|
241
280
|
type media_ImageInfoError = ImageInfoError;
|
|
281
|
+
type media_MidiDivision = MidiDivision;
|
|
282
|
+
type media_MidiInfo = MidiInfo;
|
|
283
|
+
type media_MidiInfoError = MidiInfoError;
|
|
284
|
+
type media_MidiTimeSignature = MidiTimeSignature;
|
|
285
|
+
type media_MidiTrackInfo = MidiTrackInfo;
|
|
242
286
|
type media_PdfMetadata = PdfMetadata;
|
|
243
287
|
type media_PdfMetadataError = PdfMetadataError;
|
|
244
288
|
type media_PdfPageDimension = PdfPageDimension;
|
|
@@ -254,12 +298,13 @@ declare const media_readFlacInfo: typeof readFlacInfo;
|
|
|
254
298
|
declare const media_readIcoInfo: typeof readIcoInfo;
|
|
255
299
|
declare const media_readId3Tags: typeof readId3Tags;
|
|
256
300
|
declare const media_readImageInfo: typeof readImageInfo;
|
|
301
|
+
declare const media_readMidiInfo: typeof readMidiInfo;
|
|
257
302
|
declare const media_readPdfMetadata: typeof readPdfMetadata;
|
|
258
303
|
declare const media_readPdfPageDimensions: typeof readPdfPageDimensions;
|
|
259
304
|
declare const media_readVideoInfo: typeof readVideoInfo;
|
|
260
305
|
declare const media_readWavInfo: typeof readWavInfo;
|
|
261
306
|
declare namespace media {
|
|
262
|
-
export { type media_ExifData as ExifData, type media_ExifError as ExifError, type media_FlacInfo as FlacInfo, type media_FlacInfoError as FlacInfoError, type media_GifInfo as GifInfo, type media_GifInfoError as GifInfoError, type media_IcoImageEntry as IcoImageEntry, type media_IcoInfo as IcoInfo, type media_IcoInfoError as IcoInfoError, type media_Id3Tags as Id3Tags, type media_Id3TagsError as Id3TagsError, type media_ImageFormat as ImageFormat, type media_ImageInfo as ImageInfo, type media_ImageInfoError as ImageInfoError, type media_PdfMetadata as PdfMetadata, type media_PdfMetadataError as PdfMetadataError, type media_PdfPageDimension as PdfPageDimension, type media_PdfPageDimensionsResult as PdfPageDimensionsResult, type media_PdfPageOrientation as PdfPageOrientation, type media_VideoInfo as VideoInfo, type media_VideoInfoError as VideoInfoError, type media_WavInfo as WavInfo, type media_WavInfoError as WavInfoError, media_inspectGifFrames as inspectGifFrames, media_readExifData as readExifData, media_readFlacInfo as readFlacInfo, media_readIcoInfo as readIcoInfo, media_readId3Tags as readId3Tags, media_readImageInfo as readImageInfo, media_readPdfMetadata as readPdfMetadata, media_readPdfPageDimensions as readPdfPageDimensions, media_readVideoInfo as readVideoInfo, media_readWavInfo as readWavInfo };
|
|
307
|
+
export { type media_ExifData as ExifData, type media_ExifError as ExifError, type media_FlacInfo as FlacInfo, type media_FlacInfoError as FlacInfoError, type media_GifInfo as GifInfo, type media_GifInfoError as GifInfoError, type media_IcoImageEntry as IcoImageEntry, type media_IcoInfo as IcoInfo, type media_IcoInfoError as IcoInfoError, type media_Id3Tags as Id3Tags, type media_Id3TagsError as Id3TagsError, type media_ImageFormat as ImageFormat, type media_ImageInfo as ImageInfo, type media_ImageInfoError as ImageInfoError, type media_MidiDivision as MidiDivision, type media_MidiInfo as MidiInfo, type media_MidiInfoError as MidiInfoError, type media_MidiTimeSignature as MidiTimeSignature, type media_MidiTrackInfo as MidiTrackInfo, type media_PdfMetadata as PdfMetadata, type media_PdfMetadataError as PdfMetadataError, type media_PdfPageDimension as PdfPageDimension, type media_PdfPageDimensionsResult as PdfPageDimensionsResult, type media_PdfPageOrientation as PdfPageOrientation, type media_VideoInfo as VideoInfo, type media_VideoInfoError as VideoInfoError, type media_WavInfo as WavInfo, type media_WavInfoError as WavInfoError, media_inspectGifFrames as inspectGifFrames, media_readExifData as readExifData, media_readFlacInfo as readFlacInfo, media_readIcoInfo as readIcoInfo, media_readId3Tags as readId3Tags, media_readImageInfo as readImageInfo, media_readMidiInfo as readMidiInfo, media_readPdfMetadata as readPdfMetadata, media_readPdfPageDimensions as readPdfPageDimensions, media_readVideoInfo as readVideoInfo, media_readWavInfo as readWavInfo };
|
|
263
308
|
}
|
|
264
309
|
|
|
265
|
-
export {
|
|
310
|
+
export { readImageInfo as A, readMidiInfo as B, readPdfMetadata as C, readPdfPageDimensions as D, type ExifData as E, type FlacInfo as F, type GifInfo as G, readVideoInfo as H, type IcoImageEntry as I, readWavInfo as J, type MidiDivision as M, type PdfMetadata as P, type VideoInfo as V, type WavInfo as W, type ExifError as a, type FlacInfoError as b, type GifInfoError as c, type IcoInfo as d, type IcoInfoError as e, type Id3Tags as f, type Id3TagsError as g, type ImageFormat as h, type ImageInfo as i, type ImageInfoError as j, type MidiInfo as k, type MidiInfoError as l, media as m, type MidiTimeSignature as n, type MidiTrackInfo as o, type PdfMetadataError as p, type PdfPageDimension as q, type PdfPageDimensionsResult as r, type PdfPageOrientation as s, type VideoInfoError as t, type WavInfoError as u, inspectGifFrames as v, readExifData as w, readFlacInfo as x, readIcoInfo as y, readId3Tags as z };
|
package/dist/tools/media.cjs
CHANGED
|
@@ -1293,6 +1293,136 @@ function inspectGifFrames(bytes) {
|
|
|
1293
1293
|
hasTransparency
|
|
1294
1294
|
};
|
|
1295
1295
|
}
|
|
1296
|
+
function readU16BE(bytes, offset) {
|
|
1297
|
+
return bytes[offset] << 8 | bytes[offset + 1];
|
|
1298
|
+
}
|
|
1299
|
+
function readMidiVarLen(bytes, pos) {
|
|
1300
|
+
let value = 0;
|
|
1301
|
+
let i = pos;
|
|
1302
|
+
for (let n = 0; n < 4; n++) {
|
|
1303
|
+
if (i >= bytes.length) return null;
|
|
1304
|
+
const b = bytes[i];
|
|
1305
|
+
value = value << 7 | b & 127;
|
|
1306
|
+
i++;
|
|
1307
|
+
if ((b & 128) === 0) return { value, next: i };
|
|
1308
|
+
}
|
|
1309
|
+
return null;
|
|
1310
|
+
}
|
|
1311
|
+
function readMidiInfo(bytes) {
|
|
1312
|
+
if (bytes.length < 14) return { error: "File is too small to be a valid MIDI file" };
|
|
1313
|
+
if (Buffer.from(bytes.subarray(0, 4)).toString("ascii") !== "MThd") {
|
|
1314
|
+
return { error: 'Not a valid MIDI file (missing "MThd" header chunk)' };
|
|
1315
|
+
}
|
|
1316
|
+
const headerLength = readU32BE(bytes, 4);
|
|
1317
|
+
if (headerLength < 6 || 8 + headerLength > bytes.length) return { error: "Truncated or invalid MThd header chunk" };
|
|
1318
|
+
const format = readU16BE(bytes, 8);
|
|
1319
|
+
if (format !== 0 && format !== 1 && format !== 2) return { error: `Unsupported MIDI format: ${format} (expected 0, 1, or 2)` };
|
|
1320
|
+
const trackCount = readU16BE(bytes, 10);
|
|
1321
|
+
if (trackCount < 1) return { error: "MIDI file declares zero tracks" };
|
|
1322
|
+
const divisionRaw = readU16BE(bytes, 12);
|
|
1323
|
+
const division = (divisionRaw & 32768) !== 0 ? { type: "smpte", framesPerSecond: -(divisionRaw >> 8 << 24 >> 24), ticksPerFrame: divisionRaw & 255 } : { type: "ppq", ticksPerQuarterNote: divisionRaw & 32767 };
|
|
1324
|
+
const tracks = [];
|
|
1325
|
+
const tempoChanges = [];
|
|
1326
|
+
let timeSignature = null;
|
|
1327
|
+
let maxEndTick = 0;
|
|
1328
|
+
let offset = 8 + headerLength;
|
|
1329
|
+
let tracksParsed = 0;
|
|
1330
|
+
while (tracksParsed < trackCount && offset + 8 <= bytes.length) {
|
|
1331
|
+
const chunkId = Buffer.from(bytes.subarray(offset, offset + 4)).toString("ascii");
|
|
1332
|
+
const chunkLength = readU32BE(bytes, offset + 4);
|
|
1333
|
+
const dataStart = offset + 8;
|
|
1334
|
+
const dataEnd = Math.min(dataStart + chunkLength, bytes.length);
|
|
1335
|
+
if (chunkId !== "MTrk") {
|
|
1336
|
+
offset = dataEnd;
|
|
1337
|
+
continue;
|
|
1338
|
+
}
|
|
1339
|
+
let pos = dataStart;
|
|
1340
|
+
let runningStatus = 0;
|
|
1341
|
+
let absoluteTick = 0;
|
|
1342
|
+
let eventCount = 0;
|
|
1343
|
+
let noteOnCount = 0;
|
|
1344
|
+
let name = null;
|
|
1345
|
+
while (pos < dataEnd) {
|
|
1346
|
+
const delta = readMidiVarLen(bytes, pos);
|
|
1347
|
+
if (!delta) break;
|
|
1348
|
+
pos = delta.next;
|
|
1349
|
+
absoluteTick += delta.value;
|
|
1350
|
+
if (pos >= dataEnd) break;
|
|
1351
|
+
let statusByte = bytes[pos];
|
|
1352
|
+
if (statusByte & 128) {
|
|
1353
|
+
runningStatus = statusByte;
|
|
1354
|
+
pos++;
|
|
1355
|
+
}
|
|
1356
|
+
statusByte = runningStatus;
|
|
1357
|
+
eventCount++;
|
|
1358
|
+
if (statusByte === 255) {
|
|
1359
|
+
const metaType = bytes[pos];
|
|
1360
|
+
pos++;
|
|
1361
|
+
const len = readMidiVarLen(bytes, pos);
|
|
1362
|
+
if (!len) break;
|
|
1363
|
+
pos = len.next;
|
|
1364
|
+
const data = bytes.subarray(pos, Math.min(pos + len.value, dataEnd));
|
|
1365
|
+
pos += len.value;
|
|
1366
|
+
if (metaType === 81 && data.length >= 3) {
|
|
1367
|
+
tempoChanges.push({ tick: absoluteTick, usPerQuarter: data[0] << 16 | data[1] << 8 | data[2] });
|
|
1368
|
+
} else if (metaType === 88 && data.length >= 2) {
|
|
1369
|
+
if (!timeSignature) timeSignature = { numerator: data[0], denominator: 2 ** data[1] };
|
|
1370
|
+
} else if (metaType === 3 && name === null) {
|
|
1371
|
+
name = Buffer.from(data).toString("utf8").trim() || null;
|
|
1372
|
+
} else if (metaType === 47) {
|
|
1373
|
+
break;
|
|
1374
|
+
}
|
|
1375
|
+
} else if (statusByte === 240 || statusByte === 247) {
|
|
1376
|
+
const len = readMidiVarLen(bytes, pos);
|
|
1377
|
+
if (!len) break;
|
|
1378
|
+
pos = len.next + len.value;
|
|
1379
|
+
} else if (statusByte >= 128) {
|
|
1380
|
+
const type = statusByte & 240;
|
|
1381
|
+
if (type === 192 || type === 208) {
|
|
1382
|
+
pos += 1;
|
|
1383
|
+
} else {
|
|
1384
|
+
if (type === 144 && (bytes[pos + 1] ?? 0) > 0) noteOnCount++;
|
|
1385
|
+
pos += 2;
|
|
1386
|
+
}
|
|
1387
|
+
} else {
|
|
1388
|
+
break;
|
|
1389
|
+
}
|
|
1390
|
+
}
|
|
1391
|
+
tracks.push({ index: tracksParsed, name, eventCount, noteOnCount });
|
|
1392
|
+
maxEndTick = Math.max(maxEndTick, absoluteTick);
|
|
1393
|
+
offset = dataEnd;
|
|
1394
|
+
tracksParsed++;
|
|
1395
|
+
}
|
|
1396
|
+
if (tracks.length === 0) return { error: "No MTrk track chunks found in this MIDI file" };
|
|
1397
|
+
const DEFAULT_US_PER_QUARTER = 5e5;
|
|
1398
|
+
const initialTempoBpm = Math.round(6e7 / (tempoChanges[0]?.usPerQuarter ?? DEFAULT_US_PER_QUARTER) * 100) / 100;
|
|
1399
|
+
let durationSeconds = null;
|
|
1400
|
+
if (division.type === "smpte") {
|
|
1401
|
+
const ticksPerSecond = division.framesPerSecond * division.ticksPerFrame;
|
|
1402
|
+
durationSeconds = ticksPerSecond > 0 ? Math.round(maxEndTick / ticksPerSecond * 1e3) / 1e3 : null;
|
|
1403
|
+
} else {
|
|
1404
|
+
const sorted = [...tempoChanges].sort((a, b) => a.tick - b.tick);
|
|
1405
|
+
let seconds = 0;
|
|
1406
|
+
let prevTick = 0;
|
|
1407
|
+
let currentUsPerQuarter = DEFAULT_US_PER_QUARTER;
|
|
1408
|
+
for (const change of sorted) {
|
|
1409
|
+
seconds += (change.tick - prevTick) / division.ticksPerQuarterNote * (currentUsPerQuarter / 1e6);
|
|
1410
|
+
prevTick = change.tick;
|
|
1411
|
+
currentUsPerQuarter = change.usPerQuarter;
|
|
1412
|
+
}
|
|
1413
|
+
seconds += (maxEndTick - prevTick) / division.ticksPerQuarterNote * (currentUsPerQuarter / 1e6);
|
|
1414
|
+
durationSeconds = Math.round(seconds * 1e3) / 1e3;
|
|
1415
|
+
}
|
|
1416
|
+
return {
|
|
1417
|
+
format,
|
|
1418
|
+
trackCount: tracks.length,
|
|
1419
|
+
division,
|
|
1420
|
+
initialTempoBpm,
|
|
1421
|
+
timeSignature,
|
|
1422
|
+
durationSeconds,
|
|
1423
|
+
tracks
|
|
1424
|
+
};
|
|
1425
|
+
}
|
|
1296
1426
|
|
|
1297
1427
|
exports.inspectGifFrames = inspectGifFrames;
|
|
1298
1428
|
exports.readExifData = readExifData;
|
|
@@ -1300,6 +1430,7 @@ exports.readFlacInfo = readFlacInfo;
|
|
|
1300
1430
|
exports.readIcoInfo = readIcoInfo;
|
|
1301
1431
|
exports.readId3Tags = readId3Tags;
|
|
1302
1432
|
exports.readImageInfo = readImageInfo;
|
|
1433
|
+
exports.readMidiInfo = readMidiInfo;
|
|
1303
1434
|
exports.readPdfMetadata = readPdfMetadata;
|
|
1304
1435
|
exports.readPdfPageDimensions = readPdfPageDimensions;
|
|
1305
1436
|
exports.readVideoInfo = readVideoInfo;
|
package/dist/tools/media.d.cts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { E as ExifData, a as ExifError, F as FlacInfo, b as FlacInfoError, G as GifInfo, c as GifInfoError, I as IcoImageEntry, d as IcoInfo, e as IcoInfoError, f as Id3Tags, g as Id3TagsError, h as ImageFormat, i as ImageInfo, j as ImageInfoError, P as PdfMetadata,
|
|
1
|
+
export { E as ExifData, a as ExifError, F as FlacInfo, b as FlacInfoError, G as GifInfo, c as GifInfoError, I as IcoImageEntry, d as IcoInfo, e as IcoInfoError, f as Id3Tags, g as Id3TagsError, h as ImageFormat, i as ImageInfo, j as ImageInfoError, M as MidiDivision, k as MidiInfo, l as MidiInfoError, n as MidiTimeSignature, o as MidiTrackInfo, P as PdfMetadata, p as PdfMetadataError, q as PdfPageDimension, r as PdfPageDimensionsResult, s as PdfPageOrientation, V as VideoInfo, t as VideoInfoError, W as WavInfo, u as WavInfoError, v as inspectGifFrames, w as readExifData, x as readFlacInfo, y as readIcoInfo, z as readId3Tags, A as readImageInfo, B as readMidiInfo, C as readPdfMetadata, D as readPdfPageDimensions, H as readVideoInfo, J as readWavInfo } from '../media-56zrIBw4.cjs';
|
package/dist/tools/media.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { E as ExifData, a as ExifError, F as FlacInfo, b as FlacInfoError, G as GifInfo, c as GifInfoError, I as IcoImageEntry, d as IcoInfo, e as IcoInfoError, f as Id3Tags, g as Id3TagsError, h as ImageFormat, i as ImageInfo, j as ImageInfoError, P as PdfMetadata,
|
|
1
|
+
export { E as ExifData, a as ExifError, F as FlacInfo, b as FlacInfoError, G as GifInfo, c as GifInfoError, I as IcoImageEntry, d as IcoInfo, e as IcoInfoError, f as Id3Tags, g as Id3TagsError, h as ImageFormat, i as ImageInfo, j as ImageInfoError, M as MidiDivision, k as MidiInfo, l as MidiInfoError, n as MidiTimeSignature, o as MidiTrackInfo, P as PdfMetadata, p as PdfMetadataError, q as PdfPageDimension, r as PdfPageDimensionsResult, s as PdfPageOrientation, V as VideoInfo, t as VideoInfoError, W as WavInfo, u as WavInfoError, v as inspectGifFrames, w as readExifData, x as readFlacInfo, y as readIcoInfo, z as readId3Tags, A as readImageInfo, B as readMidiInfo, C as readPdfMetadata, D as readPdfPageDimensions, H as readVideoInfo, J as readWavInfo } from '../media-56zrIBw4.js';
|
package/dist/tools/media.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { inspectGifFrames, readExifData, readFlacInfo, readIcoInfo, readId3Tags, readImageInfo, readPdfMetadata, readPdfPageDimensions, readVideoInfo, readWavInfo } from '../chunk-
|
|
1
|
+
export { inspectGifFrames, readExifData, readFlacInfo, readIcoInfo, readId3Tags, readImageInfo, readMidiInfo, readPdfMetadata, readPdfPageDimensions, readVideoInfo, readWavInfo } from '../chunk-PT4N4UBL.js';
|
|
2
2
|
import '../chunk-MLKGABMK.js';
|
package/dist/tools/units.cjs
CHANGED
|
@@ -2438,6 +2438,94 @@ function calculateTaxEquivalentYield(inputYieldPercent, federalTaxRatePercent, s
|
|
|
2438
2438
|
yieldDifference: round6(taxableYield - taxFreeYield)
|
|
2439
2439
|
};
|
|
2440
2440
|
}
|
|
2441
|
+
var VIN_TRANSLITERATION = {
|
|
2442
|
+
A: 1,
|
|
2443
|
+
B: 2,
|
|
2444
|
+
C: 3,
|
|
2445
|
+
D: 4,
|
|
2446
|
+
E: 5,
|
|
2447
|
+
F: 6,
|
|
2448
|
+
G: 7,
|
|
2449
|
+
H: 8,
|
|
2450
|
+
J: 1,
|
|
2451
|
+
K: 2,
|
|
2452
|
+
L: 3,
|
|
2453
|
+
M: 4,
|
|
2454
|
+
N: 5,
|
|
2455
|
+
P: 7,
|
|
2456
|
+
R: 9,
|
|
2457
|
+
S: 2,
|
|
2458
|
+
T: 3,
|
|
2459
|
+
U: 4,
|
|
2460
|
+
V: 5,
|
|
2461
|
+
W: 6,
|
|
2462
|
+
X: 7,
|
|
2463
|
+
Y: 8,
|
|
2464
|
+
Z: 9
|
|
2465
|
+
};
|
|
2466
|
+
var VIN_WEIGHTS = [8, 7, 6, 5, 4, 3, 2, 10, 0, 9, 8, 7, 6, 5, 4, 3, 2];
|
|
2467
|
+
function validateVin(input) {
|
|
2468
|
+
if (!input || !input.trim()) return { error: "Input is empty" };
|
|
2469
|
+
const cleaned = input.replace(/\s/g, "").toUpperCase();
|
|
2470
|
+
if (cleaned.length !== 17) return { error: `VIN length (${cleaned.length}) must be exactly 17 characters` };
|
|
2471
|
+
if (!/^[A-HJ-NPR-Z0-9]{17}$/.test(cleaned)) {
|
|
2472
|
+
return { error: "VIN must contain only letters and digits, excluding I, O, and Q" };
|
|
2473
|
+
}
|
|
2474
|
+
let sum = 0;
|
|
2475
|
+
for (let i = 0; i < 17; i++) {
|
|
2476
|
+
const ch = cleaned[i];
|
|
2477
|
+
const value = /[0-9]/.test(ch) ? Number(ch) : VIN_TRANSLITERATION[ch];
|
|
2478
|
+
sum += value * VIN_WEIGHTS[i];
|
|
2479
|
+
}
|
|
2480
|
+
const remainder = sum % 11;
|
|
2481
|
+
const expectedCheckDigit = remainder === 10 ? "X" : String(remainder);
|
|
2482
|
+
const checkDigit = cleaned[8];
|
|
2483
|
+
return {
|
|
2484
|
+
valid: checkDigit === expectedCheckDigit,
|
|
2485
|
+
vin: cleaned,
|
|
2486
|
+
checkDigit,
|
|
2487
|
+
expectedCheckDigit,
|
|
2488
|
+
wmi: cleaned.slice(0, 3),
|
|
2489
|
+
vds: cleaned.slice(3, 9),
|
|
2490
|
+
vis: cleaned.slice(9, 17)
|
|
2491
|
+
};
|
|
2492
|
+
}
|
|
2493
|
+
function isinLuhnCheckDigit(payloadDigits) {
|
|
2494
|
+
let sum = 0;
|
|
2495
|
+
let shouldDouble = true;
|
|
2496
|
+
for (let i = payloadDigits.length - 1; i >= 0; i--) {
|
|
2497
|
+
let d = parseInt(payloadDigits[i], 10);
|
|
2498
|
+
if (shouldDouble) {
|
|
2499
|
+
d *= 2;
|
|
2500
|
+
if (d > 9) d -= 9;
|
|
2501
|
+
}
|
|
2502
|
+
sum += d;
|
|
2503
|
+
shouldDouble = !shouldDouble;
|
|
2504
|
+
}
|
|
2505
|
+
return (10 - sum % 10) % 10;
|
|
2506
|
+
}
|
|
2507
|
+
function validateIsin(input) {
|
|
2508
|
+
if (!input || !input.trim()) return { error: "Input is empty" };
|
|
2509
|
+
const cleaned = input.replace(/\s/g, "").toUpperCase();
|
|
2510
|
+
if (cleaned.length !== 12) return { error: `ISIN length (${cleaned.length}) must be exactly 12 characters` };
|
|
2511
|
+
if (!/^[A-Z]{2}[A-Z0-9]{9}\d$/.test(cleaned)) {
|
|
2512
|
+
return { error: "ISIN must be a 2-letter country code, 9 alphanumeric characters, then 1 numeric check digit" };
|
|
2513
|
+
}
|
|
2514
|
+
const countryCode = cleaned.slice(0, 2);
|
|
2515
|
+
const securityIdentifier = cleaned.slice(2, 11);
|
|
2516
|
+
const checkDigit = Number(cleaned[11]);
|
|
2517
|
+
const payload = cleaned.slice(0, 11).split("").map((ch) => /[A-Z]/.test(ch) ? String(ch.charCodeAt(0) - 55) : ch).join("");
|
|
2518
|
+
const expectedCheckDigit = isinLuhnCheckDigit(payload);
|
|
2519
|
+
return {
|
|
2520
|
+
valid: checkDigit === expectedCheckDigit,
|
|
2521
|
+
isin: cleaned,
|
|
2522
|
+
countryCode,
|
|
2523
|
+
securityIdentifier,
|
|
2524
|
+
checkDigit,
|
|
2525
|
+
expectedCheckDigit,
|
|
2526
|
+
formatted: `${countryCode} ${securityIdentifier} ${checkDigit}`
|
|
2527
|
+
};
|
|
2528
|
+
}
|
|
2441
2529
|
|
|
2442
2530
|
exports.BASE_LABELS = BASE_LABELS;
|
|
2443
2531
|
exports.BASE_PREFIXES = BASE_PREFIXES;
|
|
@@ -2540,4 +2628,6 @@ exports.validateBarcode = validateBarcode;
|
|
|
2540
2628
|
exports.validateCardNumber = validateCardNumber;
|
|
2541
2629
|
exports.validateIban = validateIban;
|
|
2542
2630
|
exports.validateIsbn = validateIsbn;
|
|
2631
|
+
exports.validateIsin = validateIsin;
|
|
2632
|
+
exports.validateVin = validateVin;
|
|
2543
2633
|
exports.viewportToPx = viewportToPx;
|
package/dist/tools/units.d.cts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { A as AmortizationRow, a as AprApyDirection, b as AprApyResult, c as AspectRatioResult, B as BASE_LABELS, d as BASE_PREFIXES, e as BYTE_UNITS, f as BarcodeFormat, g as BarcodeValidationResult, h as BaseConvertResult, i as BlendedLoanRateResult, j as BreakEvenInput, k as BreakEvenResult, l as ByteConvertResult, m as ByteUnit, C as COMMON_CURRENCIES, n as COMMON_LOCALES, o as COMMON_PERMISSIONS, p as COMMON_RATIOS, q as COMMON_SIZES, r as COMMON_TAX_RATES, s as COMMON_TIP_PERCENTAGES, t as COMMON_VIEWPORTS, v as CardValidationResult, w as CashBreakdownResult, x as CashChangeResult, y as CashDenominationItem, z as CashRoundingMode, D as CashRoundingResult, E as CdMaturityResult, F as CompareUnitPricesResult, G as CompoundInterestResult, H as CompoundYearRow, I as CreditAccountInput, J as CreditAccountResult, K as CreditUtilizationResult, L as DebtItemInput, M as DebtItemResult, N as DebtPayoffComparison, O as DebtPayoffInput, P as DebtPayoffPlanResult, Q as DebtPayoffScheduleEntry, R as DebtPayoffStrategy, S as DebtPayoffStrategyResult, T as DebtToIncomeRatioResult, U as DepreciationMethod, V as DepreciationResult, W as DepreciationYear, X as Dimensions, Y as DiscountField, Z as DiscountInput, _ as DiscountResult, $ as DtiTier, a0 as EmiResult, a1 as EmiTenureUnit, a2 as EmiYearlyBreakdownRow, a3 as ExtraPaymentPayoffResult, a4 as FilePermissions, a5 as FormatOptions, a6 as FreelancerRateInput, a7 as FreelancerRateResult, a8 as GPA_GRADE_POINTS, a9 as GpaCourse, aa as GpaCourseResult, ab as GpaResult, ac as IbanValidationResult, ad as IpConversion, ae as IsbnFormat, af as IsbnResult, ag as
|
|
1
|
+
export { A as AmortizationRow, a as AprApyDirection, b as AprApyResult, c as AspectRatioResult, B as BASE_LABELS, d as BASE_PREFIXES, e as BYTE_UNITS, f as BarcodeFormat, g as BarcodeValidationResult, h as BaseConvertResult, i as BlendedLoanRateResult, j as BreakEvenInput, k as BreakEvenResult, l as ByteConvertResult, m as ByteUnit, C as COMMON_CURRENCIES, n as COMMON_LOCALES, o as COMMON_PERMISSIONS, p as COMMON_RATIOS, q as COMMON_SIZES, r as COMMON_TAX_RATES, s as COMMON_TIP_PERCENTAGES, t as COMMON_VIEWPORTS, v as CardValidationResult, w as CashBreakdownResult, x as CashChangeResult, y as CashDenominationItem, z as CashRoundingMode, D as CashRoundingResult, E as CdMaturityResult, F as CompareUnitPricesResult, G as CompoundInterestResult, H as CompoundYearRow, I as CreditAccountInput, J as CreditAccountResult, K as CreditUtilizationResult, L as DebtItemInput, M as DebtItemResult, N as DebtPayoffComparison, O as DebtPayoffInput, P as DebtPayoffPlanResult, Q as DebtPayoffScheduleEntry, R as DebtPayoffStrategy, S as DebtPayoffStrategyResult, T as DebtToIncomeRatioResult, U as DepreciationMethod, V as DepreciationResult, W as DepreciationYear, X as Dimensions, Y as DiscountField, Z as DiscountInput, _ as DiscountResult, $ as DtiTier, a0 as EmiResult, a1 as EmiTenureUnit, a2 as EmiYearlyBreakdownRow, a3 as ExtraPaymentPayoffResult, a4 as FilePermissions, a5 as FormatOptions, a6 as FreelancerRateInput, a7 as FreelancerRateResult, a8 as GPA_GRADE_POINTS, a9 as GpaCourse, aa as GpaCourseResult, ab as GpaResult, ac as IbanValidationResult, ad as IpConversion, ae as IsbnFormat, af as IsbnResult, ag as IsinValidationResult, ah as LoanBalanceInput, ai as LoanBalanceResult, aj as LoanRefinanceResult, ak as LoanResult, al as MarginMarkupField, am as MarginMarkupInput, an as MarginMarkupResult, ao as MovingAveragePoint, ap as MovingAverageResult, aq as NotationStyle, ar as NumberBase, as as PaybackPeriodInput, at as PaybackPeriodResult, au as PercentChangeDirection, av as PercentageChangeResult, aw as Permission, ax as PxConvertResult, ay as RoiInput, az as RoiResult, aA as RuleOf72Direction, aB as RuleOf72Result, aC as SavingsGoalInput, aD as SavingsGoalMode, aE as SavingsGoalResult, aF as SemverVersion, aG as SimpleInterestResult, aH as SubnetInfo, aI as SuccessiveDiscountResult, aJ as SuccessiveDiscountStep, aK as TaxDirection, aL as TaxEquivalentYieldDirection, aM as TaxEquivalentYieldResult, aN as TaxResult, aO as TimeValueDirection, aP as TimeValueResult, aQ as TipSplitResult, aR as USD_DENOMINATIONS, aS as UnitPriceItem, aT as UnitPriceResult, aU as UtilizationTier, aV as VideoBitrateInput, aW as VideoBitrateMode, aX as VideoBitrateResult, aY as ViewportConvertResult, aZ as VinValidationResult, a_ as applySuccessiveDiscounts, a$ as autoFormat, b0 as bumpVersion, b1 as calcAspectRatio, b2 as calcSubnet, b3 as calculateBlendedLoanRate, b4 as calculateBreakEven, b5 as calculateCashBreakdown, b6 as calculateCashRounding, b7 as calculateCdMaturity, b8 as calculateChange, b9 as calculateCompoundInterest, ba as calculateCreditUtilization, bb as calculateDebtToIncomeRatio, bc as calculateDepreciationSchedule, bd as calculateDiscount, be as calculateEmi, bf as calculateExtraPaymentPayoff, bg as calculateFreelancerRate, bh as calculateGpa, bi as calculateLoan, bj as calculateLoanRefinance, bk as calculateMarginMarkup, bl as calculateMovingAverages, bm as calculatePaybackPeriod, bn as calculatePercentageChange, bo as calculateRoi, bp as calculateRuleOf72, bq as calculateSavingsGoal, br as calculateSimpleInterest, bs as calculateTax, bt as calculateTaxEquivalentYield, bu as calculateTimeValue, bv as calculateTipSplit, bw as calculateVideoBitrate, bx as compareSemver, by as compareUnitPrices, bz as convert, bA as convertAprApy, bB as convertBytes, bC as convertIp, bD as coverBox, bE as decimalToIp, bF as decimalToIpCidr, bG as describePermissions, bH as fitIntoBox, bI as formatNumber, bJ as formatValue, bK as formatVwValue, bL as formatWithSeparator, bM as gcd, bN as ipFromBinary, bO as ipFromDecimal, bP as ipFromHex, bQ as ipToBinary, bR as ipToDecimal, bS as ipToDecimalCidr, bT as ipToHex, bU as ipToOctal, bV as isValid, bW as isValidCidr, bX as isValidIp, bY as isValidIpv4, bZ as marginToMarkup, b_ as markupToMargin, b$ as octalToPermissions, c0 as parseFileSize, c1 as parseInput, c2 as parseNumberString, c3 as parseSemver, c4 as permissionsToChmod, c5 as permissionsToOctal, c6 as permissionsToSymbolic, c7 as planDebtPayoff, c8 as ptToPx, c9 as pxToAll, ca as pxToViewport, cb as remToPx, cc as satisfiesRange, cd as scaleByHeight, ce as scaleByWidth, cf as sortVersions, cg as splitSubnet, ch as symbolicToPermissions, ci as validateBarcode, cj as validateCardNumber, ck as validateIban, cl as validateIsbn, cm as validateIsin, cn as validateVin, co as viewportToPx } from '../units-DB0W2pvU.cjs';
|
package/dist/tools/units.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { A as AmortizationRow, a as AprApyDirection, b as AprApyResult, c as AspectRatioResult, B as BASE_LABELS, d as BASE_PREFIXES, e as BYTE_UNITS, f as BarcodeFormat, g as BarcodeValidationResult, h as BaseConvertResult, i as BlendedLoanRateResult, j as BreakEvenInput, k as BreakEvenResult, l as ByteConvertResult, m as ByteUnit, C as COMMON_CURRENCIES, n as COMMON_LOCALES, o as COMMON_PERMISSIONS, p as COMMON_RATIOS, q as COMMON_SIZES, r as COMMON_TAX_RATES, s as COMMON_TIP_PERCENTAGES, t as COMMON_VIEWPORTS, v as CardValidationResult, w as CashBreakdownResult, x as CashChangeResult, y as CashDenominationItem, z as CashRoundingMode, D as CashRoundingResult, E as CdMaturityResult, F as CompareUnitPricesResult, G as CompoundInterestResult, H as CompoundYearRow, I as CreditAccountInput, J as CreditAccountResult, K as CreditUtilizationResult, L as DebtItemInput, M as DebtItemResult, N as DebtPayoffComparison, O as DebtPayoffInput, P as DebtPayoffPlanResult, Q as DebtPayoffScheduleEntry, R as DebtPayoffStrategy, S as DebtPayoffStrategyResult, T as DebtToIncomeRatioResult, U as DepreciationMethod, V as DepreciationResult, W as DepreciationYear, X as Dimensions, Y as DiscountField, Z as DiscountInput, _ as DiscountResult, $ as DtiTier, a0 as EmiResult, a1 as EmiTenureUnit, a2 as EmiYearlyBreakdownRow, a3 as ExtraPaymentPayoffResult, a4 as FilePermissions, a5 as FormatOptions, a6 as FreelancerRateInput, a7 as FreelancerRateResult, a8 as GPA_GRADE_POINTS, a9 as GpaCourse, aa as GpaCourseResult, ab as GpaResult, ac as IbanValidationResult, ad as IpConversion, ae as IsbnFormat, af as IsbnResult, ag as
|
|
1
|
+
export { A as AmortizationRow, a as AprApyDirection, b as AprApyResult, c as AspectRatioResult, B as BASE_LABELS, d as BASE_PREFIXES, e as BYTE_UNITS, f as BarcodeFormat, g as BarcodeValidationResult, h as BaseConvertResult, i as BlendedLoanRateResult, j as BreakEvenInput, k as BreakEvenResult, l as ByteConvertResult, m as ByteUnit, C as COMMON_CURRENCIES, n as COMMON_LOCALES, o as COMMON_PERMISSIONS, p as COMMON_RATIOS, q as COMMON_SIZES, r as COMMON_TAX_RATES, s as COMMON_TIP_PERCENTAGES, t as COMMON_VIEWPORTS, v as CardValidationResult, w as CashBreakdownResult, x as CashChangeResult, y as CashDenominationItem, z as CashRoundingMode, D as CashRoundingResult, E as CdMaturityResult, F as CompareUnitPricesResult, G as CompoundInterestResult, H as CompoundYearRow, I as CreditAccountInput, J as CreditAccountResult, K as CreditUtilizationResult, L as DebtItemInput, M as DebtItemResult, N as DebtPayoffComparison, O as DebtPayoffInput, P as DebtPayoffPlanResult, Q as DebtPayoffScheduleEntry, R as DebtPayoffStrategy, S as DebtPayoffStrategyResult, T as DebtToIncomeRatioResult, U as DepreciationMethod, V as DepreciationResult, W as DepreciationYear, X as Dimensions, Y as DiscountField, Z as DiscountInput, _ as DiscountResult, $ as DtiTier, a0 as EmiResult, a1 as EmiTenureUnit, a2 as EmiYearlyBreakdownRow, a3 as ExtraPaymentPayoffResult, a4 as FilePermissions, a5 as FormatOptions, a6 as FreelancerRateInput, a7 as FreelancerRateResult, a8 as GPA_GRADE_POINTS, a9 as GpaCourse, aa as GpaCourseResult, ab as GpaResult, ac as IbanValidationResult, ad as IpConversion, ae as IsbnFormat, af as IsbnResult, ag as IsinValidationResult, ah as LoanBalanceInput, ai as LoanBalanceResult, aj as LoanRefinanceResult, ak as LoanResult, al as MarginMarkupField, am as MarginMarkupInput, an as MarginMarkupResult, ao as MovingAveragePoint, ap as MovingAverageResult, aq as NotationStyle, ar as NumberBase, as as PaybackPeriodInput, at as PaybackPeriodResult, au as PercentChangeDirection, av as PercentageChangeResult, aw as Permission, ax as PxConvertResult, ay as RoiInput, az as RoiResult, aA as RuleOf72Direction, aB as RuleOf72Result, aC as SavingsGoalInput, aD as SavingsGoalMode, aE as SavingsGoalResult, aF as SemverVersion, aG as SimpleInterestResult, aH as SubnetInfo, aI as SuccessiveDiscountResult, aJ as SuccessiveDiscountStep, aK as TaxDirection, aL as TaxEquivalentYieldDirection, aM as TaxEquivalentYieldResult, aN as TaxResult, aO as TimeValueDirection, aP as TimeValueResult, aQ as TipSplitResult, aR as USD_DENOMINATIONS, aS as UnitPriceItem, aT as UnitPriceResult, aU as UtilizationTier, aV as VideoBitrateInput, aW as VideoBitrateMode, aX as VideoBitrateResult, aY as ViewportConvertResult, aZ as VinValidationResult, a_ as applySuccessiveDiscounts, a$ as autoFormat, b0 as bumpVersion, b1 as calcAspectRatio, b2 as calcSubnet, b3 as calculateBlendedLoanRate, b4 as calculateBreakEven, b5 as calculateCashBreakdown, b6 as calculateCashRounding, b7 as calculateCdMaturity, b8 as calculateChange, b9 as calculateCompoundInterest, ba as calculateCreditUtilization, bb as calculateDebtToIncomeRatio, bc as calculateDepreciationSchedule, bd as calculateDiscount, be as calculateEmi, bf as calculateExtraPaymentPayoff, bg as calculateFreelancerRate, bh as calculateGpa, bi as calculateLoan, bj as calculateLoanRefinance, bk as calculateMarginMarkup, bl as calculateMovingAverages, bm as calculatePaybackPeriod, bn as calculatePercentageChange, bo as calculateRoi, bp as calculateRuleOf72, bq as calculateSavingsGoal, br as calculateSimpleInterest, bs as calculateTax, bt as calculateTaxEquivalentYield, bu as calculateTimeValue, bv as calculateTipSplit, bw as calculateVideoBitrate, bx as compareSemver, by as compareUnitPrices, bz as convert, bA as convertAprApy, bB as convertBytes, bC as convertIp, bD as coverBox, bE as decimalToIp, bF as decimalToIpCidr, bG as describePermissions, bH as fitIntoBox, bI as formatNumber, bJ as formatValue, bK as formatVwValue, bL as formatWithSeparator, bM as gcd, bN as ipFromBinary, bO as ipFromDecimal, bP as ipFromHex, bQ as ipToBinary, bR as ipToDecimal, bS as ipToDecimalCidr, bT as ipToHex, bU as ipToOctal, bV as isValid, bW as isValidCidr, bX as isValidIp, bY as isValidIpv4, bZ as marginToMarkup, b_ as markupToMargin, b$ as octalToPermissions, c0 as parseFileSize, c1 as parseInput, c2 as parseNumberString, c3 as parseSemver, c4 as permissionsToChmod, c5 as permissionsToOctal, c6 as permissionsToSymbolic, c7 as planDebtPayoff, c8 as ptToPx, c9 as pxToAll, ca as pxToViewport, cb as remToPx, cc as satisfiesRange, cd as scaleByHeight, ce as scaleByWidth, cf as sortVersions, cg as splitSubnet, ch as symbolicToPermissions, ci as validateBarcode, cj as validateCardNumber, ck as validateIban, cl as validateIsbn, cm as validateIsin, cn as validateVin, co as viewportToPx } from '../units-DB0W2pvU.js';
|
package/dist/tools/units.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { BASE_LABELS, BASE_PREFIXES, BYTE_UNITS, COMMON_CURRENCIES, COMMON_LOCALES, COMMON_PERMISSIONS, COMMON_RATIOS, COMMON_SIZES, COMMON_TAX_RATES, COMMON_TIP_PERCENTAGES, COMMON_VIEWPORTS, GPA_GRADE_POINTS, USD_DENOMINATIONS, applySuccessiveDiscounts, autoFormat, bumpVersion, calcAspectRatio, calcSubnet, calculateBlendedLoanRate, calculateBreakEven, calculateCashBreakdown, calculateCashRounding, calculateCdMaturity, calculateChange, calculateCompoundInterest, calculateCreditUtilization, calculateDebtToIncomeRatio, calculateDepreciationSchedule, calculateDiscount, calculateEmi, calculateExtraPaymentPayoff, calculateFreelancerRate, calculateGpa, calculateLoan, calculateLoanRefinance, calculateMarginMarkup, calculateMovingAverages, calculatePaybackPeriod, calculatePercentageChange, calculateRoi, calculateRuleOf72, calculateSavingsGoal, calculateSimpleInterest, calculateTax, calculateTaxEquivalentYield, calculateTimeValue, calculateTipSplit, calculateVideoBitrate, compareSemver, compareUnitPrices, convert, convertAprApy, convertBytes, convertIp, coverBox, decimalToIp, decimalToIpCidr, describePermissions, fitIntoBox, formatNumber, formatValue, formatVwValue, formatWithSeparator, gcd, ipFromBinary, ipFromDecimal, ipFromHex, ipToBinary, ipToDecimal, ipToDecimalCidr, ipToHex, ipToOctal, isValid, isValidCidr, isValidIp, isValidIpv4, marginToMarkup, markupToMargin, octalToPermissions, parseFileSize, parseInput, parseNumberString, parseSemver, permissionsToChmod, permissionsToOctal, permissionsToSymbolic, planDebtPayoff, ptToPx, pxToAll, pxToViewport, remToPx, satisfiesRange, scaleByHeight, scaleByWidth, sortVersions, splitSubnet, symbolicToPermissions, validateBarcode, validateCardNumber, validateIban, validateIsbn, viewportToPx } from '../chunk-
|
|
1
|
+
export { BASE_LABELS, BASE_PREFIXES, BYTE_UNITS, COMMON_CURRENCIES, COMMON_LOCALES, COMMON_PERMISSIONS, COMMON_RATIOS, COMMON_SIZES, COMMON_TAX_RATES, COMMON_TIP_PERCENTAGES, COMMON_VIEWPORTS, GPA_GRADE_POINTS, USD_DENOMINATIONS, applySuccessiveDiscounts, autoFormat, bumpVersion, calcAspectRatio, calcSubnet, calculateBlendedLoanRate, calculateBreakEven, calculateCashBreakdown, calculateCashRounding, calculateCdMaturity, calculateChange, calculateCompoundInterest, calculateCreditUtilization, calculateDebtToIncomeRatio, calculateDepreciationSchedule, calculateDiscount, calculateEmi, calculateExtraPaymentPayoff, calculateFreelancerRate, calculateGpa, calculateLoan, calculateLoanRefinance, calculateMarginMarkup, calculateMovingAverages, calculatePaybackPeriod, calculatePercentageChange, calculateRoi, calculateRuleOf72, calculateSavingsGoal, calculateSimpleInterest, calculateTax, calculateTaxEquivalentYield, calculateTimeValue, calculateTipSplit, calculateVideoBitrate, compareSemver, compareUnitPrices, convert, convertAprApy, convertBytes, convertIp, coverBox, decimalToIp, decimalToIpCidr, describePermissions, fitIntoBox, formatNumber, formatValue, formatVwValue, formatWithSeparator, gcd, ipFromBinary, ipFromDecimal, ipFromHex, ipToBinary, ipToDecimal, ipToDecimalCidr, ipToHex, ipToOctal, isValid, isValidCidr, isValidIp, isValidIpv4, marginToMarkup, markupToMargin, octalToPermissions, parseFileSize, parseInput, parseNumberString, parseSemver, permissionsToChmod, permissionsToOctal, permissionsToSymbolic, planDebtPayoff, ptToPx, pxToAll, pxToViewport, remToPx, satisfiesRange, scaleByHeight, scaleByWidth, sortVersions, splitSubnet, symbolicToPermissions, validateBarcode, validateCardNumber, validateIban, validateIsbn, validateIsin, validateVin, viewportToPx } from '../chunk-S5FTESKL.js';
|
|
2
2
|
import '../chunk-MLKGABMK.js';
|