From 82876bf515d69a3d49c36f344abf4f1d83a6c268 Mon Sep 17 00:00:00 2001 From: Borgar Date: Tue, 25 Aug 2026 19:01:11 +0000 Subject: [PATCH 01/14] Rename test files ahead of vitest conversion --- test/{bigint-test.js => bigint.spec.ts} | 0 test/{color-test.js => color.spec.ts} | 0 test/{comma-test.js => comma.spec.ts} | 0 test/{conditionals-test.js => conditionals.spec.ts} | 0 test/{date-parsing-test.js => date-parsing.spec.ts} | 0 test/{datebounds-test.js => datebounds.spec.ts} | 0 test/{error-test.js => error.spec.ts} | 0 test/{expformat-test.js => expformat.spec.ts} | 0 test/{fragmented-numbers-test.js => fragmented-numbers.spec.ts} | 0 test/{info-test.js => info.spec.ts} | 0 test/{leap1900-test.js => leap1900.spec.ts} | 0 test/{locale-test.js => locale.spec.ts} | 0 test/{numdec-test.js => numdec.spec.ts} | 0 test/{numfmt-test.js => numfmt.spec.ts} | 0 test/{options-test.js => options.spec.ts} | 0 test/{parseValue-test.js => parseValue.spec.ts} | 0 test/{robust-mode-test.js => robust-mode.spec.ts} | 0 test/{serialDate-test.js => serialDate.spec.ts} | 0 test/{ssf-cal-test.js => ssf-cal.spec.ts} | 0 test/{ssf-comma-test.js => ssf-comma.spec.ts} | 0 test/{ssf-dates-test.js => ssf-dates.spec.ts} | 0 test/{ssf-exp-test.js => ssf-exp.spec.ts} | 0 test/{ssf-fraction-test.js => ssf-fraction.spec.ts} | 0 test/{ssf-general-test.js => ssf-general.spec.ts} | 0 test/{ssf-oddities-test.js => ssf-oddities.spec.ts} | 0 test/{ssf-times-test.js => ssf-times.spec.ts} | 0 test/{ssf-valid-test.js => ssf-valid.spec.ts} | 0 test/{text-test.js => text.spec.ts} | 0 test/{utils.js => utils.ts} | 0 29 files changed, 0 insertions(+), 0 deletions(-) rename test/{bigint-test.js => bigint.spec.ts} (100%) rename test/{color-test.js => color.spec.ts} (100%) rename test/{comma-test.js => comma.spec.ts} (100%) rename test/{conditionals-test.js => conditionals.spec.ts} (100%) rename test/{date-parsing-test.js => date-parsing.spec.ts} (100%) rename test/{datebounds-test.js => datebounds.spec.ts} (100%) rename test/{error-test.js => error.spec.ts} (100%) rename test/{expformat-test.js => expformat.spec.ts} (100%) rename test/{fragmented-numbers-test.js => fragmented-numbers.spec.ts} (100%) rename test/{info-test.js => info.spec.ts} (100%) rename test/{leap1900-test.js => leap1900.spec.ts} (100%) rename test/{locale-test.js => locale.spec.ts} (100%) rename test/{numdec-test.js => numdec.spec.ts} (100%) rename test/{numfmt-test.js => numfmt.spec.ts} (100%) rename test/{options-test.js => options.spec.ts} (100%) rename test/{parseValue-test.js => parseValue.spec.ts} (100%) rename test/{robust-mode-test.js => robust-mode.spec.ts} (100%) rename test/{serialDate-test.js => serialDate.spec.ts} (100%) rename test/{ssf-cal-test.js => ssf-cal.spec.ts} (100%) rename test/{ssf-comma-test.js => ssf-comma.spec.ts} (100%) rename test/{ssf-dates-test.js => ssf-dates.spec.ts} (100%) rename test/{ssf-exp-test.js => ssf-exp.spec.ts} (100%) rename test/{ssf-fraction-test.js => ssf-fraction.spec.ts} (100%) rename test/{ssf-general-test.js => ssf-general.spec.ts} (100%) rename test/{ssf-oddities-test.js => ssf-oddities.spec.ts} (100%) rename test/{ssf-times-test.js => ssf-times.spec.ts} (100%) rename test/{ssf-valid-test.js => ssf-valid.spec.ts} (100%) rename test/{text-test.js => text.spec.ts} (100%) rename test/{utils.js => utils.ts} (100%) diff --git a/test/bigint-test.js b/test/bigint.spec.ts similarity index 100% rename from test/bigint-test.js rename to test/bigint.spec.ts diff --git a/test/color-test.js b/test/color.spec.ts similarity index 100% rename from test/color-test.js rename to test/color.spec.ts diff --git a/test/comma-test.js b/test/comma.spec.ts similarity index 100% rename from test/comma-test.js rename to test/comma.spec.ts diff --git a/test/conditionals-test.js b/test/conditionals.spec.ts similarity index 100% rename from test/conditionals-test.js rename to test/conditionals.spec.ts diff --git a/test/date-parsing-test.js b/test/date-parsing.spec.ts similarity index 100% rename from test/date-parsing-test.js rename to test/date-parsing.spec.ts diff --git a/test/datebounds-test.js b/test/datebounds.spec.ts similarity index 100% rename from test/datebounds-test.js rename to test/datebounds.spec.ts diff --git a/test/error-test.js b/test/error.spec.ts similarity index 100% rename from test/error-test.js rename to test/error.spec.ts diff --git a/test/expformat-test.js b/test/expformat.spec.ts similarity index 100% rename from test/expformat-test.js rename to test/expformat.spec.ts diff --git a/test/fragmented-numbers-test.js b/test/fragmented-numbers.spec.ts similarity index 100% rename from test/fragmented-numbers-test.js rename to test/fragmented-numbers.spec.ts diff --git a/test/info-test.js b/test/info.spec.ts similarity index 100% rename from test/info-test.js rename to test/info.spec.ts diff --git a/test/leap1900-test.js b/test/leap1900.spec.ts similarity index 100% rename from test/leap1900-test.js rename to test/leap1900.spec.ts diff --git a/test/locale-test.js b/test/locale.spec.ts similarity index 100% rename from test/locale-test.js rename to test/locale.spec.ts diff --git a/test/numdec-test.js b/test/numdec.spec.ts similarity index 100% rename from test/numdec-test.js rename to test/numdec.spec.ts diff --git a/test/numfmt-test.js b/test/numfmt.spec.ts similarity index 100% rename from test/numfmt-test.js rename to test/numfmt.spec.ts diff --git a/test/options-test.js b/test/options.spec.ts similarity index 100% rename from test/options-test.js rename to test/options.spec.ts diff --git a/test/parseValue-test.js b/test/parseValue.spec.ts similarity index 100% rename from test/parseValue-test.js rename to test/parseValue.spec.ts diff --git a/test/robust-mode-test.js b/test/robust-mode.spec.ts similarity index 100% rename from test/robust-mode-test.js rename to test/robust-mode.spec.ts diff --git a/test/serialDate-test.js b/test/serialDate.spec.ts similarity index 100% rename from test/serialDate-test.js rename to test/serialDate.spec.ts diff --git a/test/ssf-cal-test.js b/test/ssf-cal.spec.ts similarity index 100% rename from test/ssf-cal-test.js rename to test/ssf-cal.spec.ts diff --git a/test/ssf-comma-test.js b/test/ssf-comma.spec.ts similarity index 100% rename from test/ssf-comma-test.js rename to test/ssf-comma.spec.ts diff --git a/test/ssf-dates-test.js b/test/ssf-dates.spec.ts similarity index 100% rename from test/ssf-dates-test.js rename to test/ssf-dates.spec.ts diff --git a/test/ssf-exp-test.js b/test/ssf-exp.spec.ts similarity index 100% rename from test/ssf-exp-test.js rename to test/ssf-exp.spec.ts diff --git a/test/ssf-fraction-test.js b/test/ssf-fraction.spec.ts similarity index 100% rename from test/ssf-fraction-test.js rename to test/ssf-fraction.spec.ts diff --git a/test/ssf-general-test.js b/test/ssf-general.spec.ts similarity index 100% rename from test/ssf-general-test.js rename to test/ssf-general.spec.ts diff --git a/test/ssf-oddities-test.js b/test/ssf-oddities.spec.ts similarity index 100% rename from test/ssf-oddities-test.js rename to test/ssf-oddities.spec.ts diff --git a/test/ssf-times-test.js b/test/ssf-times.spec.ts similarity index 100% rename from test/ssf-times-test.js rename to test/ssf-times.spec.ts diff --git a/test/ssf-valid-test.js b/test/ssf-valid.spec.ts similarity index 100% rename from test/ssf-valid-test.js rename to test/ssf-valid.spec.ts diff --git a/test/text-test.js b/test/text.spec.ts similarity index 100% rename from test/text-test.js rename to test/text.spec.ts diff --git a/test/utils.js b/test/utils.ts similarity index 100% rename from test/utils.js rename to test/utils.ts From 8618e92e64dc77e41aafd0891b0aa74cc9f298ca Mon Sep 17 00:00:00 2001 From: Borgar Date: Tue, 25 Aug 2026 19:01:38 +0000 Subject: [PATCH 02/14] Convert test suite from tape to vitest --- test/bigint.spec.ts | 39 +- test/color.spec.ts | 70 +- test/comma.spec.ts | 81 ++- test/conditionals.spec.ts | 1137 +++++++++++++++---------------- test/date-parsing.spec.ts | 302 ++++---- test/datebounds.spec.ts | 420 ++++++------ test/error.spec.ts | 519 +++++++------- test/expformat.spec.ts | 774 +++++++++++---------- test/fragmented-numbers.spec.ts | 47 +- test/info.spec.ts | 340 ++++----- test/leap1900.spec.ts | 257 ++++--- test/locale.spec.ts | 164 +++-- test/numdec.spec.ts | 1077 +++++++++++++++-------------- test/numfmt.spec.ts | 461 ++++++------- test/options.spec.ts | 131 ++-- test/parseValue.spec.ts | 185 +++-- test/robust-mode.spec.ts | 24 +- test/serialDate.spec.ts | 91 ++- test/ssf-cal.spec.ts | 8 +- test/ssf-comma.spec.ts | 234 ++++--- test/ssf-dates.spec.ts | 8 +- test/ssf-exp.spec.ts | 375 +++++----- test/ssf-fraction.spec.ts | 277 ++++---- test/ssf-general.spec.ts | 1027 ++++++++++++++-------------- test/ssf-oddities.spec.ts | 904 +++++++++++------------- test/ssf-times.spec.ts | 8 +- test/ssf-valid.spec.ts | 897 ++++++++++++------------ test/text.spec.ts | 37 +- test/utils.ts | 144 +--- 29 files changed, 4876 insertions(+), 5162 deletions(-) diff --git a/test/bigint.spec.ts b/test/bigint.spec.ts index 810f983..e817e9f 100644 --- a/test/bigint.spec.ts +++ b/test/bigint.spec.ts @@ -1,30 +1,29 @@ -import test from './utils.js'; +import { expect, test } from 'vitest'; +import { format } from '../lib/index.js'; -test('bigint', t => { - t.format('0', Number.MAX_SAFE_INTEGER, String(Number.MAX_SAFE_INTEGER)); - t.format('0', 10n, '10'); +test('bigint', () => { + expect(format('0', Number.MAX_SAFE_INTEGER)).toBe(String(Number.MAX_SAFE_INTEGER)); + expect(format('0', 10n)).toBe('10'); - t.format('General', 10n, '10'); - t.format('General', 9007199254740991n, '9.0072E+15'); + expect(format('General', 10n)).toBe('10'); + expect(format('General', 9007199254740991n)).toBe('9.0072E+15'); - t.format('0.0', 9007199254740991n, '9007199254740990.0'); + expect(format('0.0', 9007199254740991n)).toBe('9007199254740990.0'); - t.format('#,##0.0', 9007199254740991n, '9,007,199,254,740,990.0'); - t.format('#,##0.0', 9007199254750000n, '######'); - t.format('#,##0.0', -9007199254750000n, '######'); + expect(format('#,##0.0', 9007199254740991n)).toBe('9,007,199,254,740,990.0'); + expect(format('#,##0.0', 9007199254750000n)).toBe('######'); + expect(format('#,##0.0', -9007199254750000n)).toBe('######'); - t.format('#0-000-00', 9007199254750000n, '######'); - t.format('0%', 9007199254750000n, '######'); + expect(format('#0-000-00', 9007199254750000n)).toBe('######'); + expect(format('0%', 9007199254750000n)).toBe('######'); - t.format('#0-000-00', 9007199254750000n, '9007199254750000', { bigintErrorNumber: true }); - t.format('0%', 9007199254750000n, '9007199254750000', { bigintErrorNumber: true }); + expect(format('#0-000-00', 9007199254750000n, { bigintErrorNumber: true })).toBe('9007199254750000'); + expect(format('0%', 9007199254750000n, { bigintErrorNumber: true })).toBe('9007199254750000'); // preferably we should support bigint throughout: - // t.format('#0-000-00', 9007199254750000n, '90071992547-500-00'); - // t.format('0%', 9007199254750000n, '900719925475000000%'); + // expect(format('#0-000-00', 9007199254750000n)).toBe('90071992547-500-00'); + // expect(format('0%', 9007199254750000n)).toBe('900719925475000000%'); - t.format('0.000E+00', 999990000, '1.000E+09'); - t.format('0.000E+00', 999990000n, '1.000E+09'); - - t.end(); + expect(format('0.000E+00', 999990000)).toBe('1.000E+09'); + expect(format('0.000E+00', 999990000n)).toBe('1.000E+09'); }); diff --git a/test/color.spec.ts b/test/color.spec.ts index 6ee5517..50320e6 100644 --- a/test/color.spec.ts +++ b/test/color.spec.ts @@ -1,44 +1,44 @@ -import test from './utils.js'; +import { expect, test } from 'vitest'; +import { formatColor } from '../lib/index.js'; -test('formatColor', t => { +test('formatColor', () => { // color works the same across number sections, but not text - t.formatColor('0', 123, null); - t.formatColor('0', 0, null); - t.formatColor('0', -123, null); - t.formatColor('0', 'foo', null); - t.formatColor('[blue]0', 123, 'blue'); - t.formatColor('[blue]0', 0, 'blue'); - t.formatColor('[blue]0', -123, 'blue'); - t.formatColor('[blue]0', 'foo', null); + expect(formatColor('0', 123)).toBe(null); + expect(formatColor('0', 0)).toBe(null); + expect(formatColor('0', -123)).toBe(null); + expect(formatColor('0', 'foo')).toBe(null); + expect(formatColor('[blue]0', 123)).toBe('blue'); + expect(formatColor('[blue]0', 0)).toBe('blue'); + expect(formatColor('[blue]0', -123)).toBe('blue'); + expect(formatColor('[blue]0', 'foo')).toBe(null); // can define separate colors per section - t.formatColor('[blue]0;[green]-0;[magenta]0;[cyan]@', 1, 'blue'); - t.formatColor('[blue]0;[green]-0;[magenta]0;[cyan]@', -1, 'green'); - t.formatColor('[blue]0;[green]-0;[magenta]0;[cyan]@', 0, 'magenta'); - t.formatColor('[blue]0;[green]-0;[magenta]0;[cyan]@', 'foo', 'cyan'); + expect(formatColor('[blue]0;[green]-0;[magenta]0;[cyan]@', 1)).toBe('blue'); + expect(formatColor('[blue]0;[green]-0;[magenta]0;[cyan]@', -1)).toBe('green'); + expect(formatColor('[blue]0;[green]-0;[magenta]0;[cyan]@', 0)).toBe('magenta'); + expect(formatColor('[blue]0;[green]-0;[magenta]0;[cyan]@', 'foo')).toBe('cyan'); // color is case insensitive - t.formatColor('[red]0', 0, 'red'); - t.formatColor('[Red]0', 0, 'red'); - t.formatColor('[RED]0', 0, 'red'); + expect(formatColor('[red]0', 0)).toBe('red'); + expect(formatColor('[Red]0', 0)).toBe('red'); + expect(formatColor('[RED]0', 0)).toBe('red'); // all known primaries work - t.formatColor('[black]0', 0, 'black'); - t.formatColor('[blue]0', 0, 'blue'); - t.formatColor('[cyan]0', 0, 'cyan'); - t.formatColor('[green]0', 0, 'green'); - t.formatColor('[magenta]0', 0, 'magenta'); - t.formatColor('[red]0', 0, 'red'); - t.formatColor('[white]0', 0, 'white'); - t.formatColor('[yellow]0', 0, 'yellow'); + expect(formatColor('[black]0', 0)).toBe('black'); + expect(formatColor('[blue]0', 0)).toBe('blue'); + expect(formatColor('[cyan]0', 0)).toBe('cyan'); + expect(formatColor('[green]0', 0)).toBe('green'); + expect(formatColor('[magenta]0', 0)).toBe('magenta'); + expect(formatColor('[red]0', 0)).toBe('red'); + expect(formatColor('[white]0', 0)).toBe('white'); + expect(formatColor('[yellow]0', 0)).toBe('yellow'); // 1-based index color resolutions - t.formatColor('[color 0]0', 0, null); - t.formatColor('[color 1]0', 0, '#000000'); - t.formatColor('[color 2]0', 0, '#FFFFFF'); - t.formatColor('[color3]0', 0, '#FF0000'); + expect(formatColor('[color 0]0', 0)).toBe(null); + expect(formatColor('[color 1]0', 0)).toBe('#000000'); + expect(formatColor('[color 2]0', 0)).toBe('#FFFFFF'); + expect(formatColor('[color3]0', 0)).toBe('#FF0000'); // numbers are returned when indexColors is off - t.formatColor('[color 0]0', 0, null, { indexColors: false }); - t.formatColor('[color 1]0', 0, 1, { indexColors: false }); - t.formatColor('[color 2]0', 0, 2, { indexColors: false }); - t.formatColor('[color3]0', 0, 3, { indexColors: false }); + expect(formatColor('[color 0]0', 0, { indexColors: false })).toBe(null); + expect(formatColor('[color 1]0', 0, { indexColors: false })).toBe(1); + expect(formatColor('[color 2]0', 0, { indexColors: false })).toBe(2); + expect(formatColor('[color3]0', 0, { indexColors: false })).toBe(3); // keywords are still returned when indexColors is off - t.formatColor('[yellow]0', 0, 'yellow', { indexColors: false }); - t.end(); + expect(formatColor('[yellow]0', 0, { indexColors: false })).toBe('yellow'); }); diff --git a/test/comma.spec.ts b/test/comma.spec.ts index 576dee1..4cc6fa9 100644 --- a/test/comma.spec.ts +++ b/test/comma.spec.ts @@ -1,46 +1,45 @@ -import test from './utils.js'; +import { expect, test } from 'vitest'; +import { format } from '../lib/index.js'; -test('Correct handling of the comma operator', t => { - t.format('0,', 1234567.89, '1235'); - t.format('0,,', 1234567.89, '1'); - t.format('0,,,', 1234567.89, '0'); - t.format('0,0', 1234567.89, '1,234,568'); - t.format('0,00', 1234567.89, '1,234,568'); - t.format('0,000', 1234567.89, '1,234,568'); - t.format('0,0,0', 1234567.89, '1,234,568'); - t.format('0,,0', 1234567.89, '1,234,568'); - t.format('0,,,0', 1234567.89, '1,234,568'); - t.format('0,x', 1234567.89, '1235x'); - t.format('0,x,', 1234567.89, '1235x,'); - t.format('0x,', 1234567.89, '1234568x,'); - t.format('0,,x', 1234567.89, '1x'); - t.format('0,x0', 1234567.89, '123456x8'); - t.format('0 , 0', 1234567.89, '123456 , 8'); - t.format('0, ,0', 1234567.89, '123456 ,8'); - t.format('0.,', 1234567.89, '1235.'); - t.format('0.0,', 1234567.89, '1234.6'); - t.format('0.0,0', 1234567.89, '1234567.89'); - t.format('0,0 0/0', 1234567.89, '1,234,567 8/9'); - t.format('0,0,,0', 1234567.89, '1,234,568'); - t.format('0.0,0,', 1234567.89, '1234.57'); - t.format('0.0 , 0 ,', 1234567.89, '1234567.8 , 9 ,'); - t.format('0 ,', 1234567.89, '1234568 ,'); - t.format('0x,', 1234567.89, '1234568x,'); - t.format('0 ,', 1234567.89, '1234568 ,'); - t.format('0 ,,', 1234567.89, '1234568 ,'); - t.format('0x,', 1234567.89, '1234568x,'); - t.format('x,0', 1234567.89, 'x,1234568'); +test('Correct handling of the comma operator', () => { + expect(format('0,', 1234567.89)).toBe('1235'); + expect(format('0,,', 1234567.89)).toBe('1'); + expect(format('0,,,', 1234567.89)).toBe('0'); + expect(format('0,0', 1234567.89)).toBe('1,234,568'); + expect(format('0,00', 1234567.89)).toBe('1,234,568'); + expect(format('0,000', 1234567.89)).toBe('1,234,568'); + expect(format('0,0,0', 1234567.89)).toBe('1,234,568'); + expect(format('0,,0', 1234567.89)).toBe('1,234,568'); + expect(format('0,,,0', 1234567.89)).toBe('1,234,568'); + expect(format('0,x', 1234567.89)).toBe('1235x'); + expect(format('0,x,', 1234567.89)).toBe('1235x,'); + expect(format('0x,', 1234567.89)).toBe('1234568x,'); + expect(format('0,,x', 1234567.89)).toBe('1x'); + expect(format('0,x0', 1234567.89)).toBe('123456x8'); + expect(format('0 , 0', 1234567.89)).toBe('123456 , 8'); + expect(format('0, ,0', 1234567.89)).toBe('123456 ,8'); + expect(format('0.,', 1234567.89)).toBe('1235.'); + expect(format('0.0,', 1234567.89)).toBe('1234.6'); + expect(format('0.0,0', 1234567.89)).toBe('1234567.89'); + expect(format('0,0 0/0', 1234567.89)).toBe('1,234,567 8/9'); + expect(format('0,0,,0', 1234567.89)).toBe('1,234,568'); + expect(format('0.0,0,', 1234567.89)).toBe('1234.57'); + expect(format('0.0 , 0 ,', 1234567.89)).toBe('1234567.8 , 9 ,'); + expect(format('0 ,', 1234567.89)).toBe('1234568 ,'); + expect(format('0x,', 1234567.89)).toBe('1234568x,'); + expect(format('0 ,', 1234567.89)).toBe('1234568 ,'); + expect(format('0 ,,', 1234567.89)).toBe('1234568 ,'); + expect(format('0x,', 1234567.89)).toBe('1234568x,'); + expect(format('x,0', 1234567.89)).toBe('x,1234568'); // Still unsolved by the formatter: digit interplay with 0#? - t.format('01,', 1234567.89, '12351'); - t.format('09,', 1234567.89, '12359'); - // t.format('01,0', 1234567.89, '1,234,5618'); - // t.format('09,0', 1234567.89, '1,234,5698'); - // t.format('0, 9', 1234567.89, '1234568 9'); + expect(format('01,', 1234567.89)).toBe('12351'); + expect(format('09,', 1234567.89)).toBe('12359'); + // expect(format('01,0', 1234567.89)).toBe('1,234,5618'); + // expect(format('09,0', 1234567.89)).toBe('1,234,5698'); + // expect(format('0, 9', 1234567.89)).toBe('1234568 9'); - t.formatInvalid('0,0/0'); - t.formatInvalid('0/0,0'); - // t.formatInvalid('0 0/0,'); "1234 4/7" gets emitted, same as Sheets - - t.end(); + expect(() => format('0,0/0', '')).toThrow(); + expect(() => format('0/0,0', '')).toThrow(); + // expect(() => format('0 0/0,', '')).toThrow(); // "1234 4/7" gets emitted, same as Sheets }); diff --git a/test/conditionals.spec.ts b/test/conditionals.spec.ts index 542c581..cec19fc 100644 --- a/test/conditionals.spec.ts +++ b/test/conditionals.spec.ts @@ -1,582 +1,577 @@ -import test from './utils.js'; +import { expect, test } from 'vitest'; +import { format } from '../lib/index.js'; -test('conditional parts', t => { - t.format('[>=100]"A"0;[<=-100]"B"0;"C"0', 6.3, 'C6'); - t.format('[>=100]"A"0;[<=-100]"B"0;"C"0', -6.3, '-C6'); - t.format('[>=100]"A"0;[<=0]"B"0;"C"0', 6.3, 'C6'); - t.format('[>=100]"A"0;[<=0]"B"0;"C"0', -6.3, '-B6'); - t.format('[>=0]"A"0;[<=-100]"B"0;"C"0', 6.3, 'A6'); - t.format('[>=0]"A"0;[<=-100]"B"0;"C"0', -6.3, '-C6'); - t.format('[>=0]"A"0;[<=0]"B"0;"C"0', 6.3, 'A6'); - t.format('[>=0]"A"0;[<=0]"B"0;"C"0', -6.3, '-B6'); - t.format('[>=0]"A"0;[<=-100]"B"0', 6.3, 'A6'); - t.format('[>=100]"A"0;[<=0]"B"0', -6.3, '-B6'); - t.format('[<=-100]"B"0;"C"0', 6.3, 'C6'); - t.format('[<=-100]"B"0;"C"0', -6.3, 'C6'); - t.format('[<=0]"B"0', 6.3, '6.3'); - t.format('[<=0]"B"0', -6.3, '-B6'); - t.format('[=6.3]"B"0', 6.3, 'B6'); - t.format('[=6.3]"B"0', -6.3, '-6.3'); - t.format('[<>6]"B"0', 6.3, 'B6'); - t.format('[<>6]"B"0', -6.3, '-B6'); - t.format('[=6.3]"B"0', 6.3, 'B6'); - t.format('[=6.3]"B"0', -6.3, '-6.3'); - t.format('[>6]"A"0;[<-6]"B"0', 6.3, 'A6'); - t.format('[>6]"A"0;[<-6]"B"0', -6.3, 'B6'); - t.format('[>=100]"A"0;[<=-100]"B"0;"C"0;"D"@', 6.3, 'C6'); - t.format('[>=100]"A"0;[<=-100]"B"0;"C"0;"D"@', -6.3, '-C6'); - t.format('[>=100]"A"-0;[<=-100]"B"-0;"C"-0', 6.3, 'C-6'); - t.format('[>=100]"A"-0;[<=-100]"B"-0;"C"-0', -6.3, '-C-6'); - t.format('[>=100]"A"-#,##0;[<=0]"B"-#,##0;"C"-#,##0', 6.3, 'C-6'); - t.format('[>=100]"A"-#,##0;[<=0]"B"-#,##0;"C"-#,##0', -6.3, '-B-6'); - t.format('[>=0]"A"-0;[<=-100]"B"-0;"C"-0', 6.3, 'A-6'); - t.format('[>=0]"A"-0;[<=-100]"B"-0;"C"-0', -6.3, '-C-6'); - t.format('[>=0]"A"-0;[<=0]"B"-0;"C"-0', 6.3, 'A-6'); - t.format('[>=0]"A"-0;[<=0]"B"-0;"C"-0', -6.3, '-B-6'); +test('conditional parts', () => { + expect(format('[>=100]"A"0;[<=-100]"B"0;"C"0', 6.3)).toBe('C6'); + expect(format('[>=100]"A"0;[<=-100]"B"0;"C"0', -6.3)).toBe('-C6'); + expect(format('[>=100]"A"0;[<=0]"B"0;"C"0', 6.3)).toBe('C6'); + expect(format('[>=100]"A"0;[<=0]"B"0;"C"0', -6.3)).toBe('-B6'); + expect(format('[>=0]"A"0;[<=-100]"B"0;"C"0', 6.3)).toBe('A6'); + expect(format('[>=0]"A"0;[<=-100]"B"0;"C"0', -6.3)).toBe('-C6'); + expect(format('[>=0]"A"0;[<=0]"B"0;"C"0', 6.3)).toBe('A6'); + expect(format('[>=0]"A"0;[<=0]"B"0;"C"0', -6.3)).toBe('-B6'); + expect(format('[>=0]"A"0;[<=-100]"B"0', 6.3)).toBe('A6'); + expect(format('[>=100]"A"0;[<=0]"B"0', -6.3)).toBe('-B6'); + expect(format('[<=-100]"B"0;"C"0', 6.3)).toBe('C6'); + expect(format('[<=-100]"B"0;"C"0', -6.3)).toBe('C6'); + expect(format('[<=0]"B"0', 6.3)).toBe('6.3'); + expect(format('[<=0]"B"0', -6.3)).toBe('-B6'); + expect(format('[=6.3]"B"0', 6.3)).toBe('B6'); + expect(format('[=6.3]"B"0', -6.3)).toBe('-6.3'); + expect(format('[<>6]"B"0', 6.3)).toBe('B6'); + expect(format('[<>6]"B"0', -6.3)).toBe('-B6'); + expect(format('[=6.3]"B"0', 6.3)).toBe('B6'); + expect(format('[=6.3]"B"0', -6.3)).toBe('-6.3'); + expect(format('[>6]"A"0;[<-6]"B"0', 6.3)).toBe('A6'); + expect(format('[>6]"A"0;[<-6]"B"0', -6.3)).toBe('B6'); + expect(format('[>=100]"A"0;[<=-100]"B"0;"C"0;"D"@', 6.3)).toBe('C6'); + expect(format('[>=100]"A"0;[<=-100]"B"0;"C"0;"D"@', -6.3)).toBe('-C6'); + expect(format('[>=100]"A"-0;[<=-100]"B"-0;"C"-0', 6.3)).toBe('C-6'); + expect(format('[>=100]"A"-0;[<=-100]"B"-0;"C"-0', -6.3)).toBe('-C-6'); + expect(format('[>=100]"A"-#,##0;[<=0]"B"-#,##0;"C"-#,##0', 6.3)).toBe('C-6'); + expect(format('[>=100]"A"-#,##0;[<=0]"B"-#,##0;"C"-#,##0', -6.3)).toBe('-B-6'); + expect(format('[>=0]"A"-0;[<=-100]"B"-0;"C"-0', 6.3)).toBe('A-6'); + expect(format('[>=0]"A"-0;[<=-100]"B"-0;"C"-0', -6.3)).toBe('-C-6'); + expect(format('[>=0]"A"-0;[<=0]"B"-0;"C"-0', 6.3)).toBe('A-6'); + expect(format('[>=0]"A"-0;[<=0]"B"-0;"C"-0', -6.3)).toBe('-B-6'); - t.format('[>=100]"A"0;[<=-100]"B"0', 6.3, '######'); - t.format('[>=100]"A"0;[<=-100]"B"0', -6.3, '######'); - t.format('[>=0]"A"0;[<=-100]"B"0', -6.3, '######'); - t.format('[>=100]"A"0;[<=0]"B"0', 6.3, '######'); - t.formatInvalid('[>=100]"A"0;[<=-100]"B"0;"C"0;"D"0'); - t.formatInvalid('[>=100]"A"0;[<=-100]"B"0;"C"0;"D"0'); - t.formatInvalid('[<-25]0;[>25]0;0;"foo".#'); - - t.end(); + expect(format('[>=100]"A"0;[<=-100]"B"0', 6.3)).toBe('######'); + expect(format('[>=100]"A"0;[<=-100]"B"0', -6.3)).toBe('######'); + expect(format('[>=0]"A"0;[<=-100]"B"0', -6.3)).toBe('######'); + expect(format('[>=100]"A"0;[<=0]"B"0', 6.3)).toBe('######'); + expect(() => format('[>=100]"A"0;[<=-100]"B"0;"C"0;"D"0', '')).toThrow(); + expect(() => format('[>=100]"A"0;[<=-100]"B"0;"C"0;"D"0', '')).toThrow(); + expect(() => format('[<-25]0;[>25]0;0;"foo".#', '')).toThrow(); }); -test('conditional parts vs negative numbers', t => { - t.format('[<>-6]\\A0', -5, '-A5'); - t.format('[<-4]\\A0', -5, 'A5'); - t.format('[<=-4]\\A0', -5, 'A5'); - t.format('[=-5]\\A0', -5, 'A5'); - t.format('[>-6]\\A0', -5, '-A5'); - t.format('[>=-6]\\A0', -5, '-A5'); - t.format('[<>-5]\\A0', -5, '5'); - t.format('[<-6]\\A0', -5, '5'); - t.format('[<=-6]\\A0', -5, '5'); - t.format('[=-6]\\A0', -5, '-5'); - t.format('[>2]\\A0', -5, '-5'); - t.format('[>=2]\\A0', -5, '-5'); - - t.format('[<>-6]\\A0;\\B0', -5, '-A5'); - t.format('[<-4]\\A0;\\B0', -5, 'A5'); - t.format('[<=-4]\\A0;\\B0', -5, 'A5'); - t.format('[=-5]\\A0;\\B0', -5, 'A5'); - t.format('[>-6]\\A0;\\B0', -5, '-A5'); - t.format('[>=-6]\\A0;\\B0', -5, '-A5'); - t.format('[<>-5]\\A0;\\B0', -5, 'B5'); - t.format('[<-6]\\A0;\\B0', -5, 'B5'); - t.format('[<=-6]\\A0;\\B0', -5, 'B5'); - t.format('[=-6]\\A0;\\B0', -5, '-B5'); - t.format('[>2]\\A0;\\B0', -5, '-B5'); - t.format('[>=2]\\A0;\\B0', -5, '-B5'); +test('conditional parts vs negative numbers', () => { + expect(format('[<>-6]\\A0', -5)).toBe('-A5'); + expect(format('[<-4]\\A0', -5)).toBe('A5'); + expect(format('[<=-4]\\A0', -5)).toBe('A5'); + expect(format('[=-5]\\A0', -5)).toBe('A5'); + expect(format('[>-6]\\A0', -5)).toBe('-A5'); + expect(format('[>=-6]\\A0', -5)).toBe('-A5'); + expect(format('[<>-5]\\A0', -5)).toBe('5'); + expect(format('[<-6]\\A0', -5)).toBe('5'); + expect(format('[<=-6]\\A0', -5)).toBe('5'); + expect(format('[=-6]\\A0', -5)).toBe('-5'); + expect(format('[>2]\\A0', -5)).toBe('-5'); + expect(format('[>=2]\\A0', -5)).toBe('-5'); - t.format('[<>-6]\\A0;[<>-6]\\B0;\\C0', -5, '-A5'); - t.format('[<>-6]\\A0;[<-4]\\B0;\\C0', -5, '-A5'); - t.format('[<>-6]\\A0;[<=-4]\\B0;\\C0', -5, '-A5'); - t.format('[<>-6]\\A0;[=-5]\\B0;\\C0', -5, '-A5'); - t.format('[<>-6]\\A0;[>-6]\\B0;\\C0', -5, '-A5'); - t.format('[<>-6]\\A0;[>=-6]\\B0;\\C0', -5, '-A5'); - t.format('[<-4]\\A0;[<>-6]\\B0;\\C0', -5, 'A5'); - t.format('[<-4]\\A0;[<-4]\\B0;\\C0', -5, 'A5'); - t.format('[<-4]\\A0;[<=-4]\\B0;\\C0', -5, 'A5'); - t.format('[<-4]\\A0;[=-5]\\B0;\\C0', -5, 'A5'); - t.format('[<-4]\\A0;[>-6]\\B0;\\C0', -5, 'A5'); - t.format('[<-4]\\A0;[>=-6]\\B0;\\C0', -5, 'A5'); - t.format('[<=-4]\\A0;[<>-6]\\B0;\\C0', -5, 'A5'); - t.format('[<=-4]\\A0;[<-4]\\B0;\\C0', -5, 'A5'); - t.format('[<=-4]\\A0;[<=-4]\\B0;\\C0', -5, 'A5'); - t.format('[<=-4]\\A0;[=-5]\\B0;\\C0', -5, 'A5'); - t.format('[<=-4]\\A0;[>-6]\\B0;\\C0', -5, 'A5'); - t.format('[<=-4]\\A0;[>=-6]\\B0;\\C0', -5, 'A5'); - t.format('[=-5]\\A0;[<>-6]\\B0;\\C0', -5, 'A5'); - t.format('[=-5]\\A0;[<-4]\\B0;\\C0', -5, 'A5'); - t.format('[=-5]\\A0;[<=-4]\\B0;\\C0', -5, 'A5'); - t.format('[=-5]\\A0;[=-5]\\B0;\\C0', -5, 'A5'); - t.format('[=-5]\\A0;[>-6]\\B0;\\C0', -5, 'A5'); - t.format('[=-5]\\A0;[>=-6]\\B0;\\C0', -5, 'A5'); - t.format('[>-6]\\A0;[<>-6]\\B0;\\C0', -5, '-A5'); - t.format('[>-6]\\A0;[<-4]\\B0;\\C0', -5, '-A5'); - t.format('[>-6]\\A0;[<=-4]\\B0;\\C0', -5, '-A5'); - t.format('[>-6]\\A0;[=-5]\\B0;\\C0', -5, '-A5'); - t.format('[>-6]\\A0;[>-6]\\B0;\\C0', -5, '-A5'); - t.format('[>-6]\\A0;[>=-6]\\B0;\\C0', -5, '-A5'); - t.format('[>=-6]\\A0;[<>-6]\\B0;\\C0', -5, '-A5'); - t.format('[>=-6]\\A0;[<-4]\\B0;\\C0', -5, '-A5'); - t.format('[>=-6]\\A0;[<=-4]\\B0;\\C0', -5, '-A5'); - t.format('[>=-6]\\A0;[=-5]\\B0;\\C0', -5, '-A5'); - t.format('[>=-6]\\A0;[>-6]\\B0;\\C0', -5, '-A5'); - t.format('[>=-6]\\A0;[>=-6]\\B0;\\C0', -5, '-A5'); + expect(format('[<>-6]\\A0;\\B0', -5)).toBe('-A5'); + expect(format('[<-4]\\A0;\\B0', -5)).toBe('A5'); + expect(format('[<=-4]\\A0;\\B0', -5)).toBe('A5'); + expect(format('[=-5]\\A0;\\B0', -5)).toBe('A5'); + expect(format('[>-6]\\A0;\\B0', -5)).toBe('-A5'); + expect(format('[>=-6]\\A0;\\B0', -5)).toBe('-A5'); + expect(format('[<>-5]\\A0;\\B0', -5)).toBe('B5'); + expect(format('[<-6]\\A0;\\B0', -5)).toBe('B5'); + expect(format('[<=-6]\\A0;\\B0', -5)).toBe('B5'); + expect(format('[=-6]\\A0;\\B0', -5)).toBe('-B5'); + expect(format('[>2]\\A0;\\B0', -5)).toBe('-B5'); + expect(format('[>=2]\\A0;\\B0', -5)).toBe('-B5'); - t.format('[<>-5]\\A0;[<>-6]\\B0;\\C0', -5, '-B5'); - t.format('[<>-5]\\A0;[<-4]\\B0;\\C0', -5, 'B5'); - t.format('[<>-5]\\A0;[<=-4]\\B0;\\C0', -5, 'B5'); - t.format('[<>-5]\\A0;[=-5]\\B0;\\C0', -5, 'B5'); - t.format('[<>-5]\\A0;[>-6]\\B0;\\C0', -5, '-B5'); - t.format('[<>-5]\\A0;[>=-6]\\B0;\\C0', -5, '-B5'); - t.format('[<-6]\\A0;[<>-6]\\B0;\\C0', -5, '-B5'); - t.format('[<-6]\\A0;[<-4]\\B0;\\C0', -5, 'B5'); - t.format('[<-6]\\A0;[<=-4]\\B0;\\C0', -5, 'B5'); - t.format('[<-6]\\A0;[=-5]\\B0;\\C0', -5, 'B5'); - t.format('[<-6]\\A0;[>-6]\\B0;\\C0', -5, '-B5'); - t.format('[<-6]\\A0;[>=-6]\\B0;\\C0', -5, '-B5'); - t.format('[<=-6]\\A0;[<>-6]\\B0;\\C0', -5, '-B5'); - t.format('[<=-6]\\A0;[<-4]\\B0;\\C0', -5, 'B5'); - t.format('[<=-6]\\A0;[<=-4]\\B0;\\C0', -5, 'B5'); - t.format('[<=-6]\\A0;[=-5]\\B0;\\C0', -5, 'B5'); - t.format('[<=-6]\\A0;[>-6]\\B0;\\C0', -5, '-B5'); - t.format('[<=-6]\\A0;[>=-6]\\B0;\\C0', -5, '-B5'); - t.format('[=-6]\\A0;[<>-6]\\B0;\\C0', -5, '-B5'); - t.format('[=-6]\\A0;[<-4]\\B0;\\C0', -5, 'B5'); - t.format('[=-6]\\A0;[<=-4]\\B0;\\C0', -5, 'B5'); - t.format('[=-6]\\A0;[=-5]\\B0;\\C0', -5, 'B5'); - t.format('[=-6]\\A0;[>-6]\\B0;\\C0', -5, '-B5'); - t.format('[=-6]\\A0;[>=-6]\\B0;\\C0', -5, '-B5'); - t.format('[>2]\\A0;[<>-6]\\B0;\\C0', -5, '-B5'); - t.format('[>2]\\A0;[<-4]\\B0;\\C0', -5, 'B5'); - t.format('[>2]\\A0;[<=-4]\\B0;\\C0', -5, 'B5'); - t.format('[>2]\\A0;[=-5]\\B0;\\C0', -5, 'B5'); - t.format('[>2]\\A0;[>-6]\\B0;\\C0', -5, '-B5'); - t.format('[>2]\\A0;[>=-6]\\B0;\\C0', -5, '-B5'); - t.format('[>=2]\\A0;[<>-6]\\B0;\\C0', -5, '-B5'); - t.format('[>=2]\\A0;[<-4]\\B0;\\C0', -5, 'B5'); - t.format('[>=2]\\A0;[<=-4]\\B0;\\C0', -5, 'B5'); - t.format('[>=2]\\A0;[=-5]\\B0;\\C0', -5, 'B5'); - t.format('[>=2]\\A0;[>-6]\\B0;\\C0', -5, '-B5'); - t.format('[>=2]\\A0;[>=-6]\\B0;\\C0', -5, '-B5'); + expect(format('[<>-6]\\A0;[<>-6]\\B0;\\C0', -5)).toBe('-A5'); + expect(format('[<>-6]\\A0;[<-4]\\B0;\\C0', -5)).toBe('-A5'); + expect(format('[<>-6]\\A0;[<=-4]\\B0;\\C0', -5)).toBe('-A5'); + expect(format('[<>-6]\\A0;[=-5]\\B0;\\C0', -5)).toBe('-A5'); + expect(format('[<>-6]\\A0;[>-6]\\B0;\\C0', -5)).toBe('-A5'); + expect(format('[<>-6]\\A0;[>=-6]\\B0;\\C0', -5)).toBe('-A5'); + expect(format('[<-4]\\A0;[<>-6]\\B0;\\C0', -5)).toBe('A5'); + expect(format('[<-4]\\A0;[<-4]\\B0;\\C0', -5)).toBe('A5'); + expect(format('[<-4]\\A0;[<=-4]\\B0;\\C0', -5)).toBe('A5'); + expect(format('[<-4]\\A0;[=-5]\\B0;\\C0', -5)).toBe('A5'); + expect(format('[<-4]\\A0;[>-6]\\B0;\\C0', -5)).toBe('A5'); + expect(format('[<-4]\\A0;[>=-6]\\B0;\\C0', -5)).toBe('A5'); + expect(format('[<=-4]\\A0;[<>-6]\\B0;\\C0', -5)).toBe('A5'); + expect(format('[<=-4]\\A0;[<-4]\\B0;\\C0', -5)).toBe('A5'); + expect(format('[<=-4]\\A0;[<=-4]\\B0;\\C0', -5)).toBe('A5'); + expect(format('[<=-4]\\A0;[=-5]\\B0;\\C0', -5)).toBe('A5'); + expect(format('[<=-4]\\A0;[>-6]\\B0;\\C0', -5)).toBe('A5'); + expect(format('[<=-4]\\A0;[>=-6]\\B0;\\C0', -5)).toBe('A5'); + expect(format('[=-5]\\A0;[<>-6]\\B0;\\C0', -5)).toBe('A5'); + expect(format('[=-5]\\A0;[<-4]\\B0;\\C0', -5)).toBe('A5'); + expect(format('[=-5]\\A0;[<=-4]\\B0;\\C0', -5)).toBe('A5'); + expect(format('[=-5]\\A0;[=-5]\\B0;\\C0', -5)).toBe('A5'); + expect(format('[=-5]\\A0;[>-6]\\B0;\\C0', -5)).toBe('A5'); + expect(format('[=-5]\\A0;[>=-6]\\B0;\\C0', -5)).toBe('A5'); + expect(format('[>-6]\\A0;[<>-6]\\B0;\\C0', -5)).toBe('-A5'); + expect(format('[>-6]\\A0;[<-4]\\B0;\\C0', -5)).toBe('-A5'); + expect(format('[>-6]\\A0;[<=-4]\\B0;\\C0', -5)).toBe('-A5'); + expect(format('[>-6]\\A0;[=-5]\\B0;\\C0', -5)).toBe('-A5'); + expect(format('[>-6]\\A0;[>-6]\\B0;\\C0', -5)).toBe('-A5'); + expect(format('[>-6]\\A0;[>=-6]\\B0;\\C0', -5)).toBe('-A5'); + expect(format('[>=-6]\\A0;[<>-6]\\B0;\\C0', -5)).toBe('-A5'); + expect(format('[>=-6]\\A0;[<-4]\\B0;\\C0', -5)).toBe('-A5'); + expect(format('[>=-6]\\A0;[<=-4]\\B0;\\C0', -5)).toBe('-A5'); + expect(format('[>=-6]\\A0;[=-5]\\B0;\\C0', -5)).toBe('-A5'); + expect(format('[>=-6]\\A0;[>-6]\\B0;\\C0', -5)).toBe('-A5'); + expect(format('[>=-6]\\A0;[>=-6]\\B0;\\C0', -5)).toBe('-A5'); - t.format('[<>-5]\\A0;[<>-5]\\B0;\\C0', -5, '-C5'); - t.format('[<>-5]\\A0;[<-6]\\B0;\\C0', -5, '-C5'); - t.format('[<>-5]\\A0;[<=-6]\\B0;\\C0', -5, '-C5'); - t.format('[<>-5]\\A0;[=-6]\\B0;\\C0', -5, '-C5'); - t.format('[<>-5]\\A0;[>2]\\B0;\\C0', -5, '-C5'); - t.format('[<>-5]\\A0;[>=2]\\B0;\\C0', -5, '-C5'); - t.format('[<-6]\\A0;[<>-5]\\B0;\\C0', -5, '-C5'); - t.format('[<-6]\\A0;[<-6]\\B0;\\C0', -5, '-C5'); - t.format('[<-6]\\A0;[<=-6]\\B0;\\C0', -5, '-C5'); - t.format('[<-6]\\A0;[=-6]\\B0;\\C0', -5, '-C5'); - t.format('[<-6]\\A0;[>2]\\B0;\\C0', -5, '-C5'); - t.format('[<-6]\\A0;[>=2]\\B0;\\C0', -5, '-C5'); - t.format('[<=-6]\\A0;[<>-5]\\B0;\\C0', -5, '-C5'); - t.format('[<=-6]\\A0;[<-6]\\B0;\\C0', -5, '-C5'); - t.format('[<=-6]\\A0;[<=-6]\\B0;\\C0', -5, '-C5'); - t.format('[<=-6]\\A0;[=-6]\\B0;\\C0', -5, '-C5'); - t.format('[<=-6]\\A0;[>2]\\B0;\\C0', -5, '-C5'); - t.format('[<=-6]\\A0;[>=2]\\B0;\\C0', -5, '-C5'); - t.format('[=-6]\\A0;[<>-5]\\B0;\\C0', -5, '-C5'); - t.format('[=-6]\\A0;[<-6]\\B0;\\C0', -5, '-C5'); - t.format('[=-6]\\A0;[<=-6]\\B0;\\C0', -5, '-C5'); - t.format('[=-6]\\A0;[=-6]\\B0;\\C0', -5, '-C5'); - t.format('[=-6]\\A0;[>2]\\B0;\\C0', -5, '-C5'); - t.format('[=-6]\\A0;[>=2]\\B0;\\C0', -5, '-C5'); - t.format('[>2]\\A0;[<>-5]\\B0;\\C0', -5, '-C5'); - t.format('[>2]\\A0;[<-6]\\B0;\\C0', -5, '-C5'); - t.format('[>2]\\A0;[<=-6]\\B0;\\C0', -5, '-C5'); - t.format('[>2]\\A0;[=-6]\\B0;\\C0', -5, '-C5'); - t.format('[>2]\\A0;[>2]\\B0;\\C0', -5, '-C5'); - t.format('[>2]\\A0;[>=2]\\B0;\\C0', -5, '-C5'); - t.format('[>=2]\\A0;[<>-5]\\B0;\\C0', -5, '-C5'); - t.format('[>=2]\\A0;[<-6]\\B0;\\C0', -5, '-C5'); - t.format('[>=2]\\A0;[<=-6]\\B0;\\C0', -5, '-C5'); - t.format('[>=2]\\A0;[=-6]\\B0;\\C0', -5, '-C5'); - t.format('[>=2]\\A0;[>2]\\B0;\\C0', -5, '-C5'); - t.format('[>=2]\\A0;[>=2]\\B0;\\C0', -5, '-C5'); + expect(format('[<>-5]\\A0;[<>-6]\\B0;\\C0', -5)).toBe('-B5'); + expect(format('[<>-5]\\A0;[<-4]\\B0;\\C0', -5)).toBe('B5'); + expect(format('[<>-5]\\A0;[<=-4]\\B0;\\C0', -5)).toBe('B5'); + expect(format('[<>-5]\\A0;[=-5]\\B0;\\C0', -5)).toBe('B5'); + expect(format('[<>-5]\\A0;[>-6]\\B0;\\C0', -5)).toBe('-B5'); + expect(format('[<>-5]\\A0;[>=-6]\\B0;\\C0', -5)).toBe('-B5'); + expect(format('[<-6]\\A0;[<>-6]\\B0;\\C0', -5)).toBe('-B5'); + expect(format('[<-6]\\A0;[<-4]\\B0;\\C0', -5)).toBe('B5'); + expect(format('[<-6]\\A0;[<=-4]\\B0;\\C0', -5)).toBe('B5'); + expect(format('[<-6]\\A0;[=-5]\\B0;\\C0', -5)).toBe('B5'); + expect(format('[<-6]\\A0;[>-6]\\B0;\\C0', -5)).toBe('-B5'); + expect(format('[<-6]\\A0;[>=-6]\\B0;\\C0', -5)).toBe('-B5'); + expect(format('[<=-6]\\A0;[<>-6]\\B0;\\C0', -5)).toBe('-B5'); + expect(format('[<=-6]\\A0;[<-4]\\B0;\\C0', -5)).toBe('B5'); + expect(format('[<=-6]\\A0;[<=-4]\\B0;\\C0', -5)).toBe('B5'); + expect(format('[<=-6]\\A0;[=-5]\\B0;\\C0', -5)).toBe('B5'); + expect(format('[<=-6]\\A0;[>-6]\\B0;\\C0', -5)).toBe('-B5'); + expect(format('[<=-6]\\A0;[>=-6]\\B0;\\C0', -5)).toBe('-B5'); + expect(format('[=-6]\\A0;[<>-6]\\B0;\\C0', -5)).toBe('-B5'); + expect(format('[=-6]\\A0;[<-4]\\B0;\\C0', -5)).toBe('B5'); + expect(format('[=-6]\\A0;[<=-4]\\B0;\\C0', -5)).toBe('B5'); + expect(format('[=-6]\\A0;[=-5]\\B0;\\C0', -5)).toBe('B5'); + expect(format('[=-6]\\A0;[>-6]\\B0;\\C0', -5)).toBe('-B5'); + expect(format('[=-6]\\A0;[>=-6]\\B0;\\C0', -5)).toBe('-B5'); + expect(format('[>2]\\A0;[<>-6]\\B0;\\C0', -5)).toBe('-B5'); + expect(format('[>2]\\A0;[<-4]\\B0;\\C0', -5)).toBe('B5'); + expect(format('[>2]\\A0;[<=-4]\\B0;\\C0', -5)).toBe('B5'); + expect(format('[>2]\\A0;[=-5]\\B0;\\C0', -5)).toBe('B5'); + expect(format('[>2]\\A0;[>-6]\\B0;\\C0', -5)).toBe('-B5'); + expect(format('[>2]\\A0;[>=-6]\\B0;\\C0', -5)).toBe('-B5'); + expect(format('[>=2]\\A0;[<>-6]\\B0;\\C0', -5)).toBe('-B5'); + expect(format('[>=2]\\A0;[<-4]\\B0;\\C0', -5)).toBe('B5'); + expect(format('[>=2]\\A0;[<=-4]\\B0;\\C0', -5)).toBe('B5'); + expect(format('[>=2]\\A0;[=-5]\\B0;\\C0', -5)).toBe('B5'); + expect(format('[>=2]\\A0;[>-6]\\B0;\\C0', -5)).toBe('-B5'); + expect(format('[>=2]\\A0;[>=-6]\\B0;\\C0', -5)).toBe('-B5'); - t.end(); + expect(format('[<>-5]\\A0;[<>-5]\\B0;\\C0', -5)).toBe('-C5'); + expect(format('[<>-5]\\A0;[<-6]\\B0;\\C0', -5)).toBe('-C5'); + expect(format('[<>-5]\\A0;[<=-6]\\B0;\\C0', -5)).toBe('-C5'); + expect(format('[<>-5]\\A0;[=-6]\\B0;\\C0', -5)).toBe('-C5'); + expect(format('[<>-5]\\A0;[>2]\\B0;\\C0', -5)).toBe('-C5'); + expect(format('[<>-5]\\A0;[>=2]\\B0;\\C0', -5)).toBe('-C5'); + expect(format('[<-6]\\A0;[<>-5]\\B0;\\C0', -5)).toBe('-C5'); + expect(format('[<-6]\\A0;[<-6]\\B0;\\C0', -5)).toBe('-C5'); + expect(format('[<-6]\\A0;[<=-6]\\B0;\\C0', -5)).toBe('-C5'); + expect(format('[<-6]\\A0;[=-6]\\B0;\\C0', -5)).toBe('-C5'); + expect(format('[<-6]\\A0;[>2]\\B0;\\C0', -5)).toBe('-C5'); + expect(format('[<-6]\\A0;[>=2]\\B0;\\C0', -5)).toBe('-C5'); + expect(format('[<=-6]\\A0;[<>-5]\\B0;\\C0', -5)).toBe('-C5'); + expect(format('[<=-6]\\A0;[<-6]\\B0;\\C0', -5)).toBe('-C5'); + expect(format('[<=-6]\\A0;[<=-6]\\B0;\\C0', -5)).toBe('-C5'); + expect(format('[<=-6]\\A0;[=-6]\\B0;\\C0', -5)).toBe('-C5'); + expect(format('[<=-6]\\A0;[>2]\\B0;\\C0', -5)).toBe('-C5'); + expect(format('[<=-6]\\A0;[>=2]\\B0;\\C0', -5)).toBe('-C5'); + expect(format('[=-6]\\A0;[<>-5]\\B0;\\C0', -5)).toBe('-C5'); + expect(format('[=-6]\\A0;[<-6]\\B0;\\C0', -5)).toBe('-C5'); + expect(format('[=-6]\\A0;[<=-6]\\B0;\\C0', -5)).toBe('-C5'); + expect(format('[=-6]\\A0;[=-6]\\B0;\\C0', -5)).toBe('-C5'); + expect(format('[=-6]\\A0;[>2]\\B0;\\C0', -5)).toBe('-C5'); + expect(format('[=-6]\\A0;[>=2]\\B0;\\C0', -5)).toBe('-C5'); + expect(format('[>2]\\A0;[<>-5]\\B0;\\C0', -5)).toBe('-C5'); + expect(format('[>2]\\A0;[<-6]\\B0;\\C0', -5)).toBe('-C5'); + expect(format('[>2]\\A0;[<=-6]\\B0;\\C0', -5)).toBe('-C5'); + expect(format('[>2]\\A0;[=-6]\\B0;\\C0', -5)).toBe('-C5'); + expect(format('[>2]\\A0;[>2]\\B0;\\C0', -5)).toBe('-C5'); + expect(format('[>2]\\A0;[>=2]\\B0;\\C0', -5)).toBe('-C5'); + expect(format('[>=2]\\A0;[<>-5]\\B0;\\C0', -5)).toBe('-C5'); + expect(format('[>=2]\\A0;[<-6]\\B0;\\C0', -5)).toBe('-C5'); + expect(format('[>=2]\\A0;[<=-6]\\B0;\\C0', -5)).toBe('-C5'); + expect(format('[>=2]\\A0;[=-6]\\B0;\\C0', -5)).toBe('-C5'); + expect(format('[>=2]\\A0;[>2]\\B0;\\C0', -5)).toBe('-C5'); + expect(format('[>=2]\\A0;[>=2]\\B0;\\C0', -5)).toBe('-C5'); }); -test('secondary only conditional', t => { - t.format('"A-"0;[=-11]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[=-11]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[=-11]"B-"0;"C-"0', -10, '-C-10'); - t.format('"A-"0;[=-11]"B-"0;"C-"0', -1, '-C-1'); - t.format('"A-"0;[=-11]"B-"0;"C-"0', 0, 'C-0'); - t.format('"A-"0;[=-10]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[=-10]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[=-10]"B-"0;"C-"0', -10, 'B-10'); - t.format('"A-"0;[=-10]"B-"0;"C-"0', -1, '-C-1'); - t.format('"A-"0;[=-10]"B-"0;"C-"0', 0, 'C-0'); - t.format('"A-"0;[=-5]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[=-5]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[=-5]"B-"0;"C-"0', -10, '-C-10'); - t.format('"A-"0;[=-5]"B-"0;"C-"0', -1, '-C-1'); - t.format('"A-"0;[=-5]"B-"0;"C-"0', 0, 'C-0'); - t.format('"A-"0;[=-2]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[=-2]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[=-2]"B-"0;"C-"0', -10, '-C-10'); - t.format('"A-"0;[=-2]"B-"0;"C-"0', -1, '-C-1'); - t.format('"A-"0;[=-2]"B-"0;"C-"0', 0, 'C-0'); - t.format('"A-"0;[=-1]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[=-1]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[=-1]"B-"0;"C-"0', -10, '-C-10'); - t.format('"A-"0;[=-1]"B-"0;"C-"0', -1, 'B-1'); - t.format('"A-"0;[=-1]"B-"0;"C-"0', 0, 'C-0'); - t.format('"A-"0;[=-0.5]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[=-0.5]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[=-0.5]"B-"0;"C-"0', -10, '-C-10'); - t.format('"A-"0;[=-0.5]"B-"0;"C-"0', -1, '-C-1'); - t.format('"A-"0;[=-0.5]"B-"0;"C-"0', 0, 'C-0'); - t.format('"A-"0;[=0]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[=0]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[=0]"B-"0;"C-"0', -10, '-C-10'); - t.format('"A-"0;[=0]"B-"0;"C-"0', -1, '-C-1'); - t.format('"A-"0;[=0]"B-"0;"C-"0', 0, 'B-0'); - t.format('"A-"0;[=0.5]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[=0.5]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[=0.5]"B-"0;"C-"0', -10, '-C-10'); - t.format('"A-"0;[=0.5]"B-"0;"C-"0', -1, '-C-1'); - t.format('"A-"0;[=0.5]"B-"0;"C-"0', 0, 'C-0'); - t.format('"A-"0;[=1]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[=1]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[=1]"B-"0;"C-"0', -10, '-C-10'); - t.format('"A-"0;[=1]"B-"0;"C-"0', -1, '-C-1'); - t.format('"A-"0;[=1]"B-"0;"C-"0', 0, 'C-0'); - t.format('"A-"0;[=2]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[=2]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[=2]"B-"0;"C-"0', -10, '-C-10'); - t.format('"A-"0;[=2]"B-"0;"C-"0', -1, '-C-1'); - t.format('"A-"0;[=2]"B-"0;"C-"0', 0, 'C-0'); - t.format('"A-"0;[=5]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[=5]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[=5]"B-"0;"C-"0', -10, '-C-10'); - t.format('"A-"0;[=5]"B-"0;"C-"0', -1, '-C-1'); - t.format('"A-"0;[=5]"B-"0;"C-"0', 0, 'C-0'); - t.format('"A-"0;[=10]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[=10]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[=10]"B-"0;"C-"0', -10, '-C-10'); - t.format('"A-"0;[=10]"B-"0;"C-"0', -1, '-C-1'); - t.format('"A-"0;[=10]"B-"0;"C-"0', 0, 'C-0'); - t.format('"A-"0;[=11]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[=11]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[=11]"B-"0;"C-"0', -10, '-C-10'); - t.format('"A-"0;[=11]"B-"0;"C-"0', -1, '-C-1'); - t.format('"A-"0;[=11]"B-"0;"C-"0', 0, 'C-0'); - t.format('"A-"0;[<-11]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[<-11]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[<-11]"B-"0;"C-"0', -10, '-C-10'); - t.format('"A-"0;[<-11]"B-"0;"C-"0', -1, '-C-1'); - t.format('"A-"0;[<-11]"B-"0;"C-"0', 0, 'C-0'); - t.format('"A-"0;[<-10]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[<-10]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[<-10]"B-"0;"C-"0', -10, '-C-10'); - t.format('"A-"0;[<-10]"B-"0;"C-"0', -1, '-C-1'); - t.format('"A-"0;[<-10]"B-"0;"C-"0', 0, 'C-0'); - t.format('"A-"0;[<-5]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[<-5]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[<-5]"B-"0;"C-"0', -10, 'B-10'); - t.format('"A-"0;[<-5]"B-"0;"C-"0', -1, '-C-1'); - t.format('"A-"0;[<-5]"B-"0;"C-"0', 0, 'C-0'); - t.format('"A-"0;[<-2]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[<-2]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[<-2]"B-"0;"C-"0', -10, 'B-10'); - t.format('"A-"0;[<-2]"B-"0;"C-"0', -1, '-C-1'); - t.format('"A-"0;[<-2]"B-"0;"C-"0', 0, 'C-0'); - t.format('"A-"0;[<-1]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[<-1]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[<-1]"B-"0;"C-"0', -10, 'B-10'); - t.format('"A-"0;[<-1]"B-"0;"C-"0', -1, '-C-1'); - t.format('"A-"0;[<-1]"B-"0;"C-"0', 0, 'C-0'); - t.format('"A-"0;[<-0.5]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[<-0.5]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[<-0.5]"B-"0;"C-"0', -10, 'B-10'); - t.format('"A-"0;[<-0.5]"B-"0;"C-"0', -1, 'B-1'); - t.format('"A-"0;[<-0.5]"B-"0;"C-"0', 0, 'C-0'); - t.format('"A-"0;[<0]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[<0]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[<0]"B-"0;"C-"0', -10, 'B-10'); - t.format('"A-"0;[<0]"B-"0;"C-"0', -1, 'B-1'); - t.format('"A-"0;[<0]"B-"0;"C-"0', 0, 'C-0'); - t.format('"A-"0;[<0.5]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[<0.5]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[<0.5]"B-"0;"C-"0', -10, '-B-10'); - t.format('"A-"0;[<0.5]"B-"0;"C-"0', -1, '-B-1'); - t.format('"A-"0;[<0.5]"B-"0;"C-"0', 0, 'B-0'); - t.format('"A-"0;[<1]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[<1]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[<1]"B-"0;"C-"0', -10, '-B-10'); - t.format('"A-"0;[<1]"B-"0;"C-"0', -1, '-B-1'); - t.format('"A-"0;[<1]"B-"0;"C-"0', 0, 'B-0'); - t.format('"A-"0;[<2]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[<2]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[<2]"B-"0;"C-"0', -10, '-B-10'); - t.format('"A-"0;[<2]"B-"0;"C-"0', -1, '-B-1'); - t.format('"A-"0;[<2]"B-"0;"C-"0', 0, 'B-0'); - t.format('"A-"0;[<5]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[<5]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[<5]"B-"0;"C-"0', -10, '-B-10'); - t.format('"A-"0;[<5]"B-"0;"C-"0', -1, '-B-1'); - t.format('"A-"0;[<5]"B-"0;"C-"0', 0, 'B-0'); - t.format('"A-"0;[<10]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[<10]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[<10]"B-"0;"C-"0', -10, '-B-10'); - t.format('"A-"0;[<10]"B-"0;"C-"0', -1, '-B-1'); - t.format('"A-"0;[<10]"B-"0;"C-"0', 0, 'B-0'); - t.format('"A-"0;[<11]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[<11]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[<11]"B-"0;"C-"0', -10, '-B-10'); - t.format('"A-"0;[<11]"B-"0;"C-"0', -1, '-B-1'); - t.format('"A-"0;[<11]"B-"0;"C-"0', 0, 'B-0'); - t.format('"A-"0;[>-11]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[>-11]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[>-11]"B-"0;"C-"0', -10, '-B-10'); - t.format('"A-"0;[>-11]"B-"0;"C-"0', -1, '-B-1'); - t.format('"A-"0;[>-11]"B-"0;"C-"0', 0, 'B-0'); - t.format('"A-"0;[>-10]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[>-10]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[>-10]"B-"0;"C-"0', -10, '-C-10'); - t.format('"A-"0;[>-10]"B-"0;"C-"0', -1, '-B-1'); - t.format('"A-"0;[>-10]"B-"0;"C-"0', 0, 'B-0'); - t.format('"A-"0;[>-5]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[>-5]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[>-5]"B-"0;"C-"0', -10, '-C-10'); - t.format('"A-"0;[>-5]"B-"0;"C-"0', -1, '-B-1'); - t.format('"A-"0;[>-5]"B-"0;"C-"0', 0, 'B-0'); - t.format('"A-"0;[>-2]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[>-2]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[>-2]"B-"0;"C-"0', -10, '-C-10'); - t.format('"A-"0;[>-2]"B-"0;"C-"0', -1, '-B-1'); - t.format('"A-"0;[>-2]"B-"0;"C-"0', 0, 'B-0'); - t.format('"A-"0;[>-1]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[>-1]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[>-1]"B-"0;"C-"0', -10, '-C-10'); - t.format('"A-"0;[>-1]"B-"0;"C-"0', -1, '-C-1'); - t.format('"A-"0;[>-1]"B-"0;"C-"0', 0, 'B-0'); - t.format('"A-"0;[>-0.5]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[>-0.5]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[>-0.5]"B-"0;"C-"0', -10, '-C-10'); - t.format('"A-"0;[>-0.5]"B-"0;"C-"0', -1, '-C-1'); - t.format('"A-"0;[>-0.5]"B-"0;"C-"0', 0, 'B-0'); - t.format('"A-"0;[>0]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[>0]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[>0]"B-"0;"C-"0', -10, '-C-10'); - t.format('"A-"0;[>0]"B-"0;"C-"0', -1, '-C-1'); - t.format('"A-"0;[>0]"B-"0;"C-"0', 0, 'C-0'); - t.format('"A-"0;[>0.5]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[>0.5]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[>0.5]"B-"0;"C-"0', -10, '-C-10'); - t.format('"A-"0;[>0.5]"B-"0;"C-"0', -1, '-C-1'); - t.format('"A-"0;[>0.5]"B-"0;"C-"0', 0, 'C-0'); - t.format('"A-"0;[>1]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[>1]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[>1]"B-"0;"C-"0', -10, '-C-10'); - t.format('"A-"0;[>1]"B-"0;"C-"0', -1, '-C-1'); - t.format('"A-"0;[>1]"B-"0;"C-"0', 0, 'C-0'); - t.format('"A-"0;[>2]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[>2]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[>2]"B-"0;"C-"0', -10, '-C-10'); - t.format('"A-"0;[>2]"B-"0;"C-"0', -1, '-C-1'); - t.format('"A-"0;[>2]"B-"0;"C-"0', 0, 'C-0'); - t.format('"A-"0;[>5]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[>5]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[>5]"B-"0;"C-"0', -10, '-C-10'); - t.format('"A-"0;[>5]"B-"0;"C-"0', -1, '-C-1'); - t.format('"A-"0;[>5]"B-"0;"C-"0', 0, 'C-0'); - t.format('"A-"0;[>10]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[>10]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[>10]"B-"0;"C-"0', -10, '-C-10'); - t.format('"A-"0;[>10]"B-"0;"C-"0', -1, '-C-1'); - t.format('"A-"0;[>10]"B-"0;"C-"0', 0, 'C-0'); - t.format('"A-"0;[>11]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[>11]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[>11]"B-"0;"C-"0', -10, '-C-10'); - t.format('"A-"0;[>11]"B-"0;"C-"0', -1, '-C-1'); - t.format('"A-"0;[>11]"B-"0;"C-"0', 0, 'C-0'); - t.format('"A-"0;[<=-11]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[<=-11]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[<=-11]"B-"0;"C-"0', -10, '-C-10'); - t.format('"A-"0;[<=-11]"B-"0;"C-"0', -1, '-C-1'); - t.format('"A-"0;[<=-11]"B-"0;"C-"0', 0, 'C-0'); - t.format('"A-"0;[<=-10]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[<=-10]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[<=-10]"B-"0;"C-"0', -10, 'B-10'); - t.format('"A-"0;[<=-10]"B-"0;"C-"0', -1, '-C-1'); - t.format('"A-"0;[<=-10]"B-"0;"C-"0', 0, 'C-0'); - t.format('"A-"0;[<=-5]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[<=-5]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[<=-5]"B-"0;"C-"0', -10, 'B-10'); - t.format('"A-"0;[<=-5]"B-"0;"C-"0', -1, '-C-1'); - t.format('"A-"0;[<=-5]"B-"0;"C-"0', 0, 'C-0'); - t.format('"A-"0;[<=-2]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[<=-2]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[<=-2]"B-"0;"C-"0', -10, 'B-10'); - t.format('"A-"0;[<=-2]"B-"0;"C-"0', -1, '-C-1'); - t.format('"A-"0;[<=-2]"B-"0;"C-"0', 0, 'C-0'); - t.format('"A-"0;[<=-1]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[<=-1]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[<=-1]"B-"0;"C-"0', -10, 'B-10'); - t.format('"A-"0;[<=-1]"B-"0;"C-"0', -1, 'B-1'); - t.format('"A-"0;[<=-1]"B-"0;"C-"0', 0, 'C-0'); - t.format('"A-"0;[<=-0.5]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[<=-0.5]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[<=-0.5]"B-"0;"C-"0', -10, 'B-10'); - t.format('"A-"0;[<=-0.5]"B-"0;"C-"0', -1, 'B-1'); - t.format('"A-"0;[<=-0.5]"B-"0;"C-"0', 0, 'C-0'); - t.format('"A-"0;[<=0]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[<=0]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[<=0]"B-"0;"C-"0', -10, '-B-10'); - t.format('"A-"0;[<=0]"B-"0;"C-"0', -1, '-B-1'); - t.format('"A-"0;[<=0]"B-"0;"C-"0', 0, 'B-0'); - t.format('"A-"0;[<=0.5]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[<=0.5]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[<=0.5]"B-"0;"C-"0', -10, '-B-10'); - t.format('"A-"0;[<=0.5]"B-"0;"C-"0', -1, '-B-1'); - t.format('"A-"0;[<=0.5]"B-"0;"C-"0', 0, 'B-0'); - t.format('"A-"0;[<=1]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[<=1]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[<=1]"B-"0;"C-"0', -10, '-B-10'); - t.format('"A-"0;[<=1]"B-"0;"C-"0', -1, '-B-1'); - t.format('"A-"0;[<=1]"B-"0;"C-"0', 0, 'B-0'); - t.format('"A-"0;[<=2]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[<=2]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[<=2]"B-"0;"C-"0', -10, '-B-10'); - t.format('"A-"0;[<=2]"B-"0;"C-"0', -1, '-B-1'); - t.format('"A-"0;[<=2]"B-"0;"C-"0', 0, 'B-0'); - t.format('"A-"0;[<=5]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[<=5]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[<=5]"B-"0;"C-"0', -10, '-B-10'); - t.format('"A-"0;[<=5]"B-"0;"C-"0', -1, '-B-1'); - t.format('"A-"0;[<=5]"B-"0;"C-"0', 0, 'B-0'); - t.format('"A-"0;[<=10]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[<=10]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[<=10]"B-"0;"C-"0', -10, '-B-10'); - t.format('"A-"0;[<=10]"B-"0;"C-"0', -1, '-B-1'); - t.format('"A-"0;[<=10]"B-"0;"C-"0', 0, 'B-0'); - t.format('"A-"0;[<=11]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[<=11]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[<=11]"B-"0;"C-"0', -10, '-B-10'); - t.format('"A-"0;[<=11]"B-"0;"C-"0', -1, '-B-1'); - t.format('"A-"0;[<=11]"B-"0;"C-"0', 0, 'B-0'); - t.format('"A-"0;[>=-11]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[>=-11]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[>=-11]"B-"0;"C-"0', -10, '-B-10'); - t.format('"A-"0;[>=-11]"B-"0;"C-"0', -1, '-B-1'); - t.format('"A-"0;[>=-11]"B-"0;"C-"0', 0, 'B-0'); - t.format('"A-"0;[>=-10]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[>=-10]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[>=-10]"B-"0;"C-"0', -10, '-B-10'); - t.format('"A-"0;[>=-10]"B-"0;"C-"0', -1, '-B-1'); - t.format('"A-"0;[>=-10]"B-"0;"C-"0', 0, 'B-0'); - t.format('"A-"0;[>=-5]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[>=-5]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[>=-5]"B-"0;"C-"0', -10, '-C-10'); - t.format('"A-"0;[>=-5]"B-"0;"C-"0', -1, '-B-1'); - t.format('"A-"0;[>=-5]"B-"0;"C-"0', 0, 'B-0'); - t.format('"A-"0;[>=-2]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[>=-2]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[>=-2]"B-"0;"C-"0', -10, '-C-10'); - t.format('"A-"0;[>=-2]"B-"0;"C-"0', -1, '-B-1'); - t.format('"A-"0;[>=-2]"B-"0;"C-"0', 0, 'B-0'); - t.format('"A-"0;[>=-1]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[>=-1]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[>=-1]"B-"0;"C-"0', -10, '-C-10'); - t.format('"A-"0;[>=-1]"B-"0;"C-"0', -1, '-B-1'); - t.format('"A-"0;[>=-1]"B-"0;"C-"0', 0, 'B-0'); - t.format('"A-"0;[>=-0.5]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[>=-0.5]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[>=-0.5]"B-"0;"C-"0', -10, '-C-10'); - t.format('"A-"0;[>=-0.5]"B-"0;"C-"0', -1, '-C-1'); - t.format('"A-"0;[>=-0.5]"B-"0;"C-"0', 0, 'B-0'); - t.format('"A-"0;[>=0]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[>=0]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[>=0]"B-"0;"C-"0', -10, '-C-10'); - t.format('"A-"0;[>=0]"B-"0;"C-"0', -1, '-C-1'); - t.format('"A-"0;[>=0]"B-"0;"C-"0', 0, 'B-0'); - t.format('"A-"0;[>=0.5]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[>=0.5]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[>=0.5]"B-"0;"C-"0', -10, '-C-10'); - t.format('"A-"0;[>=0.5]"B-"0;"C-"0', -1, '-C-1'); - t.format('"A-"0;[>=0.5]"B-"0;"C-"0', 0, 'C-0'); - t.format('"A-"0;[>=1]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[>=1]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[>=1]"B-"0;"C-"0', -10, '-C-10'); - t.format('"A-"0;[>=1]"B-"0;"C-"0', -1, '-C-1'); - t.format('"A-"0;[>=1]"B-"0;"C-"0', 0, 'C-0'); - t.format('"A-"0;[>=2]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[>=2]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[>=2]"B-"0;"C-"0', -10, '-C-10'); - t.format('"A-"0;[>=2]"B-"0;"C-"0', -1, '-C-1'); - t.format('"A-"0;[>=2]"B-"0;"C-"0', 0, 'C-0'); - t.format('"A-"0;[>=5]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[>=5]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[>=5]"B-"0;"C-"0', -10, '-C-10'); - t.format('"A-"0;[>=5]"B-"0;"C-"0', -1, '-C-1'); - t.format('"A-"0;[>=5]"B-"0;"C-"0', 0, 'C-0'); - t.format('"A-"0;[>=10]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[>=10]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[>=10]"B-"0;"C-"0', -10, '-C-10'); - t.format('"A-"0;[>=10]"B-"0;"C-"0', -1, '-C-1'); - t.format('"A-"0;[>=10]"B-"0;"C-"0', 0, 'C-0'); - t.format('"A-"0;[>=11]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[>=11]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[>=11]"B-"0;"C-"0', -10, '-C-10'); - t.format('"A-"0;[>=11]"B-"0;"C-"0', -1, '-C-1'); - t.format('"A-"0;[>=11]"B-"0;"C-"0', 0, 'C-0'); - t.format('"A-"0;[<>-11]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[<>-11]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[<>-11]"B-"0;"C-"0', -10, '-B-10'); - t.format('"A-"0;[<>-11]"B-"0;"C-"0', -1, '-B-1'); - t.format('"A-"0;[<>-11]"B-"0;"C-"0', 0, 'B-0'); - t.format('"A-"0;[<>-10]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[<>-10]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[<>-10]"B-"0;"C-"0', -10, '-C-10'); - t.format('"A-"0;[<>-10]"B-"0;"C-"0', -1, '-B-1'); - t.format('"A-"0;[<>-10]"B-"0;"C-"0', 0, 'B-0'); - t.format('"A-"0;[<>-5]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[<>-5]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[<>-5]"B-"0;"C-"0', -10, '-B-10'); - t.format('"A-"0;[<>-5]"B-"0;"C-"0', -1, '-B-1'); - t.format('"A-"0;[<>-5]"B-"0;"C-"0', 0, 'B-0'); - t.format('"A-"0;[<>-2]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[<>-2]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[<>-2]"B-"0;"C-"0', -10, '-B-10'); - t.format('"A-"0;[<>-2]"B-"0;"C-"0', -1, '-B-1'); - t.format('"A-"0;[<>-2]"B-"0;"C-"0', 0, 'B-0'); - t.format('"A-"0;[<>-1]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[<>-1]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[<>-1]"B-"0;"C-"0', -10, '-B-10'); - t.format('"A-"0;[<>-1]"B-"0;"C-"0', -1, '-C-1'); - t.format('"A-"0;[<>-1]"B-"0;"C-"0', 0, 'B-0'); - t.format('"A-"0;[<>-0.5]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[<>-0.5]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[<>-0.5]"B-"0;"C-"0', -10, '-B-10'); - t.format('"A-"0;[<>-0.5]"B-"0;"C-"0', -1, '-B-1'); - t.format('"A-"0;[<>-0.5]"B-"0;"C-"0', 0, 'B-0'); - t.format('"A-"0;[<>0]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[<>0]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[<>0]"B-"0;"C-"0', -10, '-B-10'); - t.format('"A-"0;[<>0]"B-"0;"C-"0', -1, '-B-1'); - t.format('"A-"0;[<>0]"B-"0;"C-"0', 0, 'C-0'); - t.format('"A-"0;[<>0.5]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[<>0.5]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[<>0.5]"B-"0;"C-"0', -10, '-B-10'); - t.format('"A-"0;[<>0.5]"B-"0;"C-"0', -1, '-B-1'); - t.format('"A-"0;[<>0.5]"B-"0;"C-"0', 0, 'B-0'); - t.format('"A-"0;[<>1]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[<>1]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[<>1]"B-"0;"C-"0', -10, '-B-10'); - t.format('"A-"0;[<>1]"B-"0;"C-"0', -1, '-B-1'); - t.format('"A-"0;[<>1]"B-"0;"C-"0', 0, 'B-0'); - t.format('"A-"0;[<>2]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[<>2]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[<>2]"B-"0;"C-"0', -10, '-B-10'); - t.format('"A-"0;[<>2]"B-"0;"C-"0', -1, '-B-1'); - t.format('"A-"0;[<>2]"B-"0;"C-"0', 0, 'B-0'); - t.format('"A-"0;[<>5]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[<>5]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[<>5]"B-"0;"C-"0', -10, '-B-10'); - t.format('"A-"0;[<>5]"B-"0;"C-"0', -1, '-B-1'); - t.format('"A-"0;[<>5]"B-"0;"C-"0', 0, 'B-0'); - t.format('"A-"0;[<>10]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[<>10]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[<>10]"B-"0;"C-"0', -10, '-B-10'); - t.format('"A-"0;[<>10]"B-"0;"C-"0', -1, '-B-1'); - t.format('"A-"0;[<>10]"B-"0;"C-"0', 0, 'B-0'); - t.format('"A-"0;[<>11]"B-"0;"C-"0', 10, 'A-10'); - t.format('"A-"0;[<>11]"B-"0;"C-"0', 1, 'A-1'); - t.format('"A-"0;[<>11]"B-"0;"C-"0', -10, '-B-10'); - t.format('"A-"0;[<>11]"B-"0;"C-"0', -1, '-B-1'); - t.format('"A-"0;[<>11]"B-"0;"C-"0', 0, 'B-0'); - - t.end(); +test('secondary only conditional', () => { + expect(format('"A-"0;[=-11]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[=-11]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[=-11]"B-"0;"C-"0', -10)).toBe('-C-10'); + expect(format('"A-"0;[=-11]"B-"0;"C-"0', -1)).toBe('-C-1'); + expect(format('"A-"0;[=-11]"B-"0;"C-"0', 0)).toBe('C-0'); + expect(format('"A-"0;[=-10]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[=-10]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[=-10]"B-"0;"C-"0', -10)).toBe('B-10'); + expect(format('"A-"0;[=-10]"B-"0;"C-"0', -1)).toBe('-C-1'); + expect(format('"A-"0;[=-10]"B-"0;"C-"0', 0)).toBe('C-0'); + expect(format('"A-"0;[=-5]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[=-5]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[=-5]"B-"0;"C-"0', -10)).toBe('-C-10'); + expect(format('"A-"0;[=-5]"B-"0;"C-"0', -1)).toBe('-C-1'); + expect(format('"A-"0;[=-5]"B-"0;"C-"0', 0)).toBe('C-0'); + expect(format('"A-"0;[=-2]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[=-2]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[=-2]"B-"0;"C-"0', -10)).toBe('-C-10'); + expect(format('"A-"0;[=-2]"B-"0;"C-"0', -1)).toBe('-C-1'); + expect(format('"A-"0;[=-2]"B-"0;"C-"0', 0)).toBe('C-0'); + expect(format('"A-"0;[=-1]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[=-1]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[=-1]"B-"0;"C-"0', -10)).toBe('-C-10'); + expect(format('"A-"0;[=-1]"B-"0;"C-"0', -1)).toBe('B-1'); + expect(format('"A-"0;[=-1]"B-"0;"C-"0', 0)).toBe('C-0'); + expect(format('"A-"0;[=-0.5]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[=-0.5]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[=-0.5]"B-"0;"C-"0', -10)).toBe('-C-10'); + expect(format('"A-"0;[=-0.5]"B-"0;"C-"0', -1)).toBe('-C-1'); + expect(format('"A-"0;[=-0.5]"B-"0;"C-"0', 0)).toBe('C-0'); + expect(format('"A-"0;[=0]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[=0]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[=0]"B-"0;"C-"0', -10)).toBe('-C-10'); + expect(format('"A-"0;[=0]"B-"0;"C-"0', -1)).toBe('-C-1'); + expect(format('"A-"0;[=0]"B-"0;"C-"0', 0)).toBe('B-0'); + expect(format('"A-"0;[=0.5]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[=0.5]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[=0.5]"B-"0;"C-"0', -10)).toBe('-C-10'); + expect(format('"A-"0;[=0.5]"B-"0;"C-"0', -1)).toBe('-C-1'); + expect(format('"A-"0;[=0.5]"B-"0;"C-"0', 0)).toBe('C-0'); + expect(format('"A-"0;[=1]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[=1]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[=1]"B-"0;"C-"0', -10)).toBe('-C-10'); + expect(format('"A-"0;[=1]"B-"0;"C-"0', -1)).toBe('-C-1'); + expect(format('"A-"0;[=1]"B-"0;"C-"0', 0)).toBe('C-0'); + expect(format('"A-"0;[=2]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[=2]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[=2]"B-"0;"C-"0', -10)).toBe('-C-10'); + expect(format('"A-"0;[=2]"B-"0;"C-"0', -1)).toBe('-C-1'); + expect(format('"A-"0;[=2]"B-"0;"C-"0', 0)).toBe('C-0'); + expect(format('"A-"0;[=5]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[=5]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[=5]"B-"0;"C-"0', -10)).toBe('-C-10'); + expect(format('"A-"0;[=5]"B-"0;"C-"0', -1)).toBe('-C-1'); + expect(format('"A-"0;[=5]"B-"0;"C-"0', 0)).toBe('C-0'); + expect(format('"A-"0;[=10]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[=10]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[=10]"B-"0;"C-"0', -10)).toBe('-C-10'); + expect(format('"A-"0;[=10]"B-"0;"C-"0', -1)).toBe('-C-1'); + expect(format('"A-"0;[=10]"B-"0;"C-"0', 0)).toBe('C-0'); + expect(format('"A-"0;[=11]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[=11]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[=11]"B-"0;"C-"0', -10)).toBe('-C-10'); + expect(format('"A-"0;[=11]"B-"0;"C-"0', -1)).toBe('-C-1'); + expect(format('"A-"0;[=11]"B-"0;"C-"0', 0)).toBe('C-0'); + expect(format('"A-"0;[<-11]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[<-11]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[<-11]"B-"0;"C-"0', -10)).toBe('-C-10'); + expect(format('"A-"0;[<-11]"B-"0;"C-"0', -1)).toBe('-C-1'); + expect(format('"A-"0;[<-11]"B-"0;"C-"0', 0)).toBe('C-0'); + expect(format('"A-"0;[<-10]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[<-10]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[<-10]"B-"0;"C-"0', -10)).toBe('-C-10'); + expect(format('"A-"0;[<-10]"B-"0;"C-"0', -1)).toBe('-C-1'); + expect(format('"A-"0;[<-10]"B-"0;"C-"0', 0)).toBe('C-0'); + expect(format('"A-"0;[<-5]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[<-5]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[<-5]"B-"0;"C-"0', -10)).toBe('B-10'); + expect(format('"A-"0;[<-5]"B-"0;"C-"0', -1)).toBe('-C-1'); + expect(format('"A-"0;[<-5]"B-"0;"C-"0', 0)).toBe('C-0'); + expect(format('"A-"0;[<-2]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[<-2]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[<-2]"B-"0;"C-"0', -10)).toBe('B-10'); + expect(format('"A-"0;[<-2]"B-"0;"C-"0', -1)).toBe('-C-1'); + expect(format('"A-"0;[<-2]"B-"0;"C-"0', 0)).toBe('C-0'); + expect(format('"A-"0;[<-1]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[<-1]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[<-1]"B-"0;"C-"0', -10)).toBe('B-10'); + expect(format('"A-"0;[<-1]"B-"0;"C-"0', -1)).toBe('-C-1'); + expect(format('"A-"0;[<-1]"B-"0;"C-"0', 0)).toBe('C-0'); + expect(format('"A-"0;[<-0.5]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[<-0.5]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[<-0.5]"B-"0;"C-"0', -10)).toBe('B-10'); + expect(format('"A-"0;[<-0.5]"B-"0;"C-"0', -1)).toBe('B-1'); + expect(format('"A-"0;[<-0.5]"B-"0;"C-"0', 0)).toBe('C-0'); + expect(format('"A-"0;[<0]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[<0]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[<0]"B-"0;"C-"0', -10)).toBe('B-10'); + expect(format('"A-"0;[<0]"B-"0;"C-"0', -1)).toBe('B-1'); + expect(format('"A-"0;[<0]"B-"0;"C-"0', 0)).toBe('C-0'); + expect(format('"A-"0;[<0.5]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[<0.5]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[<0.5]"B-"0;"C-"0', -10)).toBe('-B-10'); + expect(format('"A-"0;[<0.5]"B-"0;"C-"0', -1)).toBe('-B-1'); + expect(format('"A-"0;[<0.5]"B-"0;"C-"0', 0)).toBe('B-0'); + expect(format('"A-"0;[<1]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[<1]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[<1]"B-"0;"C-"0', -10)).toBe('-B-10'); + expect(format('"A-"0;[<1]"B-"0;"C-"0', -1)).toBe('-B-1'); + expect(format('"A-"0;[<1]"B-"0;"C-"0', 0)).toBe('B-0'); + expect(format('"A-"0;[<2]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[<2]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[<2]"B-"0;"C-"0', -10)).toBe('-B-10'); + expect(format('"A-"0;[<2]"B-"0;"C-"0', -1)).toBe('-B-1'); + expect(format('"A-"0;[<2]"B-"0;"C-"0', 0)).toBe('B-0'); + expect(format('"A-"0;[<5]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[<5]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[<5]"B-"0;"C-"0', -10)).toBe('-B-10'); + expect(format('"A-"0;[<5]"B-"0;"C-"0', -1)).toBe('-B-1'); + expect(format('"A-"0;[<5]"B-"0;"C-"0', 0)).toBe('B-0'); + expect(format('"A-"0;[<10]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[<10]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[<10]"B-"0;"C-"0', -10)).toBe('-B-10'); + expect(format('"A-"0;[<10]"B-"0;"C-"0', -1)).toBe('-B-1'); + expect(format('"A-"0;[<10]"B-"0;"C-"0', 0)).toBe('B-0'); + expect(format('"A-"0;[<11]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[<11]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[<11]"B-"0;"C-"0', -10)).toBe('-B-10'); + expect(format('"A-"0;[<11]"B-"0;"C-"0', -1)).toBe('-B-1'); + expect(format('"A-"0;[<11]"B-"0;"C-"0', 0)).toBe('B-0'); + expect(format('"A-"0;[>-11]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[>-11]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[>-11]"B-"0;"C-"0', -10)).toBe('-B-10'); + expect(format('"A-"0;[>-11]"B-"0;"C-"0', -1)).toBe('-B-1'); + expect(format('"A-"0;[>-11]"B-"0;"C-"0', 0)).toBe('B-0'); + expect(format('"A-"0;[>-10]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[>-10]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[>-10]"B-"0;"C-"0', -10)).toBe('-C-10'); + expect(format('"A-"0;[>-10]"B-"0;"C-"0', -1)).toBe('-B-1'); + expect(format('"A-"0;[>-10]"B-"0;"C-"0', 0)).toBe('B-0'); + expect(format('"A-"0;[>-5]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[>-5]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[>-5]"B-"0;"C-"0', -10)).toBe('-C-10'); + expect(format('"A-"0;[>-5]"B-"0;"C-"0', -1)).toBe('-B-1'); + expect(format('"A-"0;[>-5]"B-"0;"C-"0', 0)).toBe('B-0'); + expect(format('"A-"0;[>-2]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[>-2]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[>-2]"B-"0;"C-"0', -10)).toBe('-C-10'); + expect(format('"A-"0;[>-2]"B-"0;"C-"0', -1)).toBe('-B-1'); + expect(format('"A-"0;[>-2]"B-"0;"C-"0', 0)).toBe('B-0'); + expect(format('"A-"0;[>-1]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[>-1]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[>-1]"B-"0;"C-"0', -10)).toBe('-C-10'); + expect(format('"A-"0;[>-1]"B-"0;"C-"0', -1)).toBe('-C-1'); + expect(format('"A-"0;[>-1]"B-"0;"C-"0', 0)).toBe('B-0'); + expect(format('"A-"0;[>-0.5]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[>-0.5]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[>-0.5]"B-"0;"C-"0', -10)).toBe('-C-10'); + expect(format('"A-"0;[>-0.5]"B-"0;"C-"0', -1)).toBe('-C-1'); + expect(format('"A-"0;[>-0.5]"B-"0;"C-"0', 0)).toBe('B-0'); + expect(format('"A-"0;[>0]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[>0]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[>0]"B-"0;"C-"0', -10)).toBe('-C-10'); + expect(format('"A-"0;[>0]"B-"0;"C-"0', -1)).toBe('-C-1'); + expect(format('"A-"0;[>0]"B-"0;"C-"0', 0)).toBe('C-0'); + expect(format('"A-"0;[>0.5]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[>0.5]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[>0.5]"B-"0;"C-"0', -10)).toBe('-C-10'); + expect(format('"A-"0;[>0.5]"B-"0;"C-"0', -1)).toBe('-C-1'); + expect(format('"A-"0;[>0.5]"B-"0;"C-"0', 0)).toBe('C-0'); + expect(format('"A-"0;[>1]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[>1]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[>1]"B-"0;"C-"0', -10)).toBe('-C-10'); + expect(format('"A-"0;[>1]"B-"0;"C-"0', -1)).toBe('-C-1'); + expect(format('"A-"0;[>1]"B-"0;"C-"0', 0)).toBe('C-0'); + expect(format('"A-"0;[>2]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[>2]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[>2]"B-"0;"C-"0', -10)).toBe('-C-10'); + expect(format('"A-"0;[>2]"B-"0;"C-"0', -1)).toBe('-C-1'); + expect(format('"A-"0;[>2]"B-"0;"C-"0', 0)).toBe('C-0'); + expect(format('"A-"0;[>5]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[>5]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[>5]"B-"0;"C-"0', -10)).toBe('-C-10'); + expect(format('"A-"0;[>5]"B-"0;"C-"0', -1)).toBe('-C-1'); + expect(format('"A-"0;[>5]"B-"0;"C-"0', 0)).toBe('C-0'); + expect(format('"A-"0;[>10]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[>10]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[>10]"B-"0;"C-"0', -10)).toBe('-C-10'); + expect(format('"A-"0;[>10]"B-"0;"C-"0', -1)).toBe('-C-1'); + expect(format('"A-"0;[>10]"B-"0;"C-"0', 0)).toBe('C-0'); + expect(format('"A-"0;[>11]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[>11]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[>11]"B-"0;"C-"0', -10)).toBe('-C-10'); + expect(format('"A-"0;[>11]"B-"0;"C-"0', -1)).toBe('-C-1'); + expect(format('"A-"0;[>11]"B-"0;"C-"0', 0)).toBe('C-0'); + expect(format('"A-"0;[<=-11]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[<=-11]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[<=-11]"B-"0;"C-"0', -10)).toBe('-C-10'); + expect(format('"A-"0;[<=-11]"B-"0;"C-"0', -1)).toBe('-C-1'); + expect(format('"A-"0;[<=-11]"B-"0;"C-"0', 0)).toBe('C-0'); + expect(format('"A-"0;[<=-10]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[<=-10]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[<=-10]"B-"0;"C-"0', -10)).toBe('B-10'); + expect(format('"A-"0;[<=-10]"B-"0;"C-"0', -1)).toBe('-C-1'); + expect(format('"A-"0;[<=-10]"B-"0;"C-"0', 0)).toBe('C-0'); + expect(format('"A-"0;[<=-5]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[<=-5]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[<=-5]"B-"0;"C-"0', -10)).toBe('B-10'); + expect(format('"A-"0;[<=-5]"B-"0;"C-"0', -1)).toBe('-C-1'); + expect(format('"A-"0;[<=-5]"B-"0;"C-"0', 0)).toBe('C-0'); + expect(format('"A-"0;[<=-2]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[<=-2]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[<=-2]"B-"0;"C-"0', -10)).toBe('B-10'); + expect(format('"A-"0;[<=-2]"B-"0;"C-"0', -1)).toBe('-C-1'); + expect(format('"A-"0;[<=-2]"B-"0;"C-"0', 0)).toBe('C-0'); + expect(format('"A-"0;[<=-1]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[<=-1]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[<=-1]"B-"0;"C-"0', -10)).toBe('B-10'); + expect(format('"A-"0;[<=-1]"B-"0;"C-"0', -1)).toBe('B-1'); + expect(format('"A-"0;[<=-1]"B-"0;"C-"0', 0)).toBe('C-0'); + expect(format('"A-"0;[<=-0.5]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[<=-0.5]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[<=-0.5]"B-"0;"C-"0', -10)).toBe('B-10'); + expect(format('"A-"0;[<=-0.5]"B-"0;"C-"0', -1)).toBe('B-1'); + expect(format('"A-"0;[<=-0.5]"B-"0;"C-"0', 0)).toBe('C-0'); + expect(format('"A-"0;[<=0]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[<=0]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[<=0]"B-"0;"C-"0', -10)).toBe('-B-10'); + expect(format('"A-"0;[<=0]"B-"0;"C-"0', -1)).toBe('-B-1'); + expect(format('"A-"0;[<=0]"B-"0;"C-"0', 0)).toBe('B-0'); + expect(format('"A-"0;[<=0.5]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[<=0.5]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[<=0.5]"B-"0;"C-"0', -10)).toBe('-B-10'); + expect(format('"A-"0;[<=0.5]"B-"0;"C-"0', -1)).toBe('-B-1'); + expect(format('"A-"0;[<=0.5]"B-"0;"C-"0', 0)).toBe('B-0'); + expect(format('"A-"0;[<=1]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[<=1]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[<=1]"B-"0;"C-"0', -10)).toBe('-B-10'); + expect(format('"A-"0;[<=1]"B-"0;"C-"0', -1)).toBe('-B-1'); + expect(format('"A-"0;[<=1]"B-"0;"C-"0', 0)).toBe('B-0'); + expect(format('"A-"0;[<=2]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[<=2]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[<=2]"B-"0;"C-"0', -10)).toBe('-B-10'); + expect(format('"A-"0;[<=2]"B-"0;"C-"0', -1)).toBe('-B-1'); + expect(format('"A-"0;[<=2]"B-"0;"C-"0', 0)).toBe('B-0'); + expect(format('"A-"0;[<=5]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[<=5]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[<=5]"B-"0;"C-"0', -10)).toBe('-B-10'); + expect(format('"A-"0;[<=5]"B-"0;"C-"0', -1)).toBe('-B-1'); + expect(format('"A-"0;[<=5]"B-"0;"C-"0', 0)).toBe('B-0'); + expect(format('"A-"0;[<=10]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[<=10]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[<=10]"B-"0;"C-"0', -10)).toBe('-B-10'); + expect(format('"A-"0;[<=10]"B-"0;"C-"0', -1)).toBe('-B-1'); + expect(format('"A-"0;[<=10]"B-"0;"C-"0', 0)).toBe('B-0'); + expect(format('"A-"0;[<=11]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[<=11]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[<=11]"B-"0;"C-"0', -10)).toBe('-B-10'); + expect(format('"A-"0;[<=11]"B-"0;"C-"0', -1)).toBe('-B-1'); + expect(format('"A-"0;[<=11]"B-"0;"C-"0', 0)).toBe('B-0'); + expect(format('"A-"0;[>=-11]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[>=-11]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[>=-11]"B-"0;"C-"0', -10)).toBe('-B-10'); + expect(format('"A-"0;[>=-11]"B-"0;"C-"0', -1)).toBe('-B-1'); + expect(format('"A-"0;[>=-11]"B-"0;"C-"0', 0)).toBe('B-0'); + expect(format('"A-"0;[>=-10]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[>=-10]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[>=-10]"B-"0;"C-"0', -10)).toBe('-B-10'); + expect(format('"A-"0;[>=-10]"B-"0;"C-"0', -1)).toBe('-B-1'); + expect(format('"A-"0;[>=-10]"B-"0;"C-"0', 0)).toBe('B-0'); + expect(format('"A-"0;[>=-5]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[>=-5]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[>=-5]"B-"0;"C-"0', -10)).toBe('-C-10'); + expect(format('"A-"0;[>=-5]"B-"0;"C-"0', -1)).toBe('-B-1'); + expect(format('"A-"0;[>=-5]"B-"0;"C-"0', 0)).toBe('B-0'); + expect(format('"A-"0;[>=-2]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[>=-2]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[>=-2]"B-"0;"C-"0', -10)).toBe('-C-10'); + expect(format('"A-"0;[>=-2]"B-"0;"C-"0', -1)).toBe('-B-1'); + expect(format('"A-"0;[>=-2]"B-"0;"C-"0', 0)).toBe('B-0'); + expect(format('"A-"0;[>=-1]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[>=-1]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[>=-1]"B-"0;"C-"0', -10)).toBe('-C-10'); + expect(format('"A-"0;[>=-1]"B-"0;"C-"0', -1)).toBe('-B-1'); + expect(format('"A-"0;[>=-1]"B-"0;"C-"0', 0)).toBe('B-0'); + expect(format('"A-"0;[>=-0.5]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[>=-0.5]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[>=-0.5]"B-"0;"C-"0', -10)).toBe('-C-10'); + expect(format('"A-"0;[>=-0.5]"B-"0;"C-"0', -1)).toBe('-C-1'); + expect(format('"A-"0;[>=-0.5]"B-"0;"C-"0', 0)).toBe('B-0'); + expect(format('"A-"0;[>=0]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[>=0]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[>=0]"B-"0;"C-"0', -10)).toBe('-C-10'); + expect(format('"A-"0;[>=0]"B-"0;"C-"0', -1)).toBe('-C-1'); + expect(format('"A-"0;[>=0]"B-"0;"C-"0', 0)).toBe('B-0'); + expect(format('"A-"0;[>=0.5]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[>=0.5]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[>=0.5]"B-"0;"C-"0', -10)).toBe('-C-10'); + expect(format('"A-"0;[>=0.5]"B-"0;"C-"0', -1)).toBe('-C-1'); + expect(format('"A-"0;[>=0.5]"B-"0;"C-"0', 0)).toBe('C-0'); + expect(format('"A-"0;[>=1]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[>=1]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[>=1]"B-"0;"C-"0', -10)).toBe('-C-10'); + expect(format('"A-"0;[>=1]"B-"0;"C-"0', -1)).toBe('-C-1'); + expect(format('"A-"0;[>=1]"B-"0;"C-"0', 0)).toBe('C-0'); + expect(format('"A-"0;[>=2]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[>=2]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[>=2]"B-"0;"C-"0', -10)).toBe('-C-10'); + expect(format('"A-"0;[>=2]"B-"0;"C-"0', -1)).toBe('-C-1'); + expect(format('"A-"0;[>=2]"B-"0;"C-"0', 0)).toBe('C-0'); + expect(format('"A-"0;[>=5]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[>=5]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[>=5]"B-"0;"C-"0', -10)).toBe('-C-10'); + expect(format('"A-"0;[>=5]"B-"0;"C-"0', -1)).toBe('-C-1'); + expect(format('"A-"0;[>=5]"B-"0;"C-"0', 0)).toBe('C-0'); + expect(format('"A-"0;[>=10]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[>=10]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[>=10]"B-"0;"C-"0', -10)).toBe('-C-10'); + expect(format('"A-"0;[>=10]"B-"0;"C-"0', -1)).toBe('-C-1'); + expect(format('"A-"0;[>=10]"B-"0;"C-"0', 0)).toBe('C-0'); + expect(format('"A-"0;[>=11]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[>=11]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[>=11]"B-"0;"C-"0', -10)).toBe('-C-10'); + expect(format('"A-"0;[>=11]"B-"0;"C-"0', -1)).toBe('-C-1'); + expect(format('"A-"0;[>=11]"B-"0;"C-"0', 0)).toBe('C-0'); + expect(format('"A-"0;[<>-11]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[<>-11]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[<>-11]"B-"0;"C-"0', -10)).toBe('-B-10'); + expect(format('"A-"0;[<>-11]"B-"0;"C-"0', -1)).toBe('-B-1'); + expect(format('"A-"0;[<>-11]"B-"0;"C-"0', 0)).toBe('B-0'); + expect(format('"A-"0;[<>-10]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[<>-10]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[<>-10]"B-"0;"C-"0', -10)).toBe('-C-10'); + expect(format('"A-"0;[<>-10]"B-"0;"C-"0', -1)).toBe('-B-1'); + expect(format('"A-"0;[<>-10]"B-"0;"C-"0', 0)).toBe('B-0'); + expect(format('"A-"0;[<>-5]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[<>-5]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[<>-5]"B-"0;"C-"0', -10)).toBe('-B-10'); + expect(format('"A-"0;[<>-5]"B-"0;"C-"0', -1)).toBe('-B-1'); + expect(format('"A-"0;[<>-5]"B-"0;"C-"0', 0)).toBe('B-0'); + expect(format('"A-"0;[<>-2]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[<>-2]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[<>-2]"B-"0;"C-"0', -10)).toBe('-B-10'); + expect(format('"A-"0;[<>-2]"B-"0;"C-"0', -1)).toBe('-B-1'); + expect(format('"A-"0;[<>-2]"B-"0;"C-"0', 0)).toBe('B-0'); + expect(format('"A-"0;[<>-1]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[<>-1]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[<>-1]"B-"0;"C-"0', -10)).toBe('-B-10'); + expect(format('"A-"0;[<>-1]"B-"0;"C-"0', -1)).toBe('-C-1'); + expect(format('"A-"0;[<>-1]"B-"0;"C-"0', 0)).toBe('B-0'); + expect(format('"A-"0;[<>-0.5]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[<>-0.5]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[<>-0.5]"B-"0;"C-"0', -10)).toBe('-B-10'); + expect(format('"A-"0;[<>-0.5]"B-"0;"C-"0', -1)).toBe('-B-1'); + expect(format('"A-"0;[<>-0.5]"B-"0;"C-"0', 0)).toBe('B-0'); + expect(format('"A-"0;[<>0]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[<>0]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[<>0]"B-"0;"C-"0', -10)).toBe('-B-10'); + expect(format('"A-"0;[<>0]"B-"0;"C-"0', -1)).toBe('-B-1'); + expect(format('"A-"0;[<>0]"B-"0;"C-"0', 0)).toBe('C-0'); + expect(format('"A-"0;[<>0.5]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[<>0.5]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[<>0.5]"B-"0;"C-"0', -10)).toBe('-B-10'); + expect(format('"A-"0;[<>0.5]"B-"0;"C-"0', -1)).toBe('-B-1'); + expect(format('"A-"0;[<>0.5]"B-"0;"C-"0', 0)).toBe('B-0'); + expect(format('"A-"0;[<>1]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[<>1]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[<>1]"B-"0;"C-"0', -10)).toBe('-B-10'); + expect(format('"A-"0;[<>1]"B-"0;"C-"0', -1)).toBe('-B-1'); + expect(format('"A-"0;[<>1]"B-"0;"C-"0', 0)).toBe('B-0'); + expect(format('"A-"0;[<>2]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[<>2]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[<>2]"B-"0;"C-"0', -10)).toBe('-B-10'); + expect(format('"A-"0;[<>2]"B-"0;"C-"0', -1)).toBe('-B-1'); + expect(format('"A-"0;[<>2]"B-"0;"C-"0', 0)).toBe('B-0'); + expect(format('"A-"0;[<>5]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[<>5]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[<>5]"B-"0;"C-"0', -10)).toBe('-B-10'); + expect(format('"A-"0;[<>5]"B-"0;"C-"0', -1)).toBe('-B-1'); + expect(format('"A-"0;[<>5]"B-"0;"C-"0', 0)).toBe('B-0'); + expect(format('"A-"0;[<>10]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[<>10]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[<>10]"B-"0;"C-"0', -10)).toBe('-B-10'); + expect(format('"A-"0;[<>10]"B-"0;"C-"0', -1)).toBe('-B-1'); + expect(format('"A-"0;[<>10]"B-"0;"C-"0', 0)).toBe('B-0'); + expect(format('"A-"0;[<>11]"B-"0;"C-"0', 10)).toBe('A-10'); + expect(format('"A-"0;[<>11]"B-"0;"C-"0', 1)).toBe('A-1'); + expect(format('"A-"0;[<>11]"B-"0;"C-"0', -10)).toBe('-B-10'); + expect(format('"A-"0;[<>11]"B-"0;"C-"0', -1)).toBe('-B-1'); + expect(format('"A-"0;[<>11]"B-"0;"C-"0', 0)).toBe('B-0'); }); diff --git a/test/date-parsing.spec.ts b/test/date-parsing.spec.ts index c83821b..f555450 100644 --- a/test/date-parsing.spec.ts +++ b/test/date-parsing.spec.ts @@ -1,167 +1,165 @@ -import test from './utils.js'; +import { expect, test } from 'vitest'; +import { format } from '../lib/index.js'; const date = 3290.1278435; // 1909-01-02 03:04:05.678 -test('Date specifiers:', t => { - t.format('s', date, '6'); - t.format('ss', date, '06'); - t.format('sss', date, '06'); - t.format('ssss', date, '06'); - t.format('sssss', date, '06'); - t.format('ssssss', date, '06'); - t.format('S', date, '6'); - t.format('SS', date, '06'); - t.format('SSS', date, '06'); - t.format('SSSS', date, '06'); - t.format('SSSSS', date, '06'); - t.format('SSSSSS', date, '06'); - t.format('m', date, '1'); - t.format('mm', date, '01'); - t.format('mmm', date, 'Jan'); - t.format('mmmm', date, 'January'); - t.format('mmmmm', date, 'J'); - t.format('mmmmmm', date, 'January'); - t.format('M', date, '1'); - t.format('MM', date, '01'); - t.format('MMM', date, 'Jan'); - t.format('MMMM', date, 'January'); - t.format('MMMMM', date, 'J'); - t.format('MMMMMM', date, 'January'); - t.format('h', date, '3'); - t.format('hh', date, '03'); - t.format('hhh', date, '03'); - t.format('hhhh', date, '03'); - t.format('hhhhh', date, '03'); - t.format('hhhhhh', date, '03'); - t.format('H', date, '3'); - t.format('HH', date, '03'); - t.format('HHH', date, '03'); - t.format('HHHH', date, '03'); - t.format('HHHHH', date, '03'); - t.format('HHHHHH', date, '03'); - t.format('a', date, 'a'); - t.format('aa', date, 'aa'); - t.format('aaa', date, 'Sat'); - t.format('aaaa', date, 'Saturday'); - t.format('aaaaa', date, 'Saturday'); - t.format('aaaaaa', date, 'Saturday'); - t.format('d', date, '2'); - t.format('dd', date, '02'); - t.format('ddd', date, 'Sat'); - t.format('dddd', date, 'Saturday'); - t.format('ddddd', date, 'Saturday'); - t.format('dddddd', date, 'Saturday'); - t.format('D', date, '2'); - t.format('DD', date, '02'); - t.format('DDD', date, 'Sat'); - t.format('DDDD', date, 'Saturday'); - t.format('DDDDD', date, 'Saturday'); - t.format('DDDDDD', date, 'Saturday'); - t.format('y', date, '09'); - t.format('yy', date, '09'); - t.format('yyy', date, '1909'); - t.format('yyyy', date, '1909'); - t.format('yyyyy', date, '1909'); - t.format('yyyyyy', date, '1909'); - t.format('Y', date, '09'); - t.format('YY', date, '09'); - t.format('YYY', date, '1909'); - t.format('YYYY', date, '1909'); - t.format('YYYYY', date, '1909'); - t.format('YYYYYY', date, '1909'); +test('Date specifiers:', () => { + expect(format('s', date)).toBe('6'); + expect(format('ss', date)).toBe('06'); + expect(format('sss', date)).toBe('06'); + expect(format('ssss', date)).toBe('06'); + expect(format('sssss', date)).toBe('06'); + expect(format('ssssss', date)).toBe('06'); + expect(format('S', date)).toBe('6'); + expect(format('SS', date)).toBe('06'); + expect(format('SSS', date)).toBe('06'); + expect(format('SSSS', date)).toBe('06'); + expect(format('SSSSS', date)).toBe('06'); + expect(format('SSSSSS', date)).toBe('06'); + expect(format('m', date)).toBe('1'); + expect(format('mm', date)).toBe('01'); + expect(format('mmm', date)).toBe('Jan'); + expect(format('mmmm', date)).toBe('January'); + expect(format('mmmmm', date)).toBe('J'); + expect(format('mmmmmm', date)).toBe('January'); + expect(format('M', date)).toBe('1'); + expect(format('MM', date)).toBe('01'); + expect(format('MMM', date)).toBe('Jan'); + expect(format('MMMM', date)).toBe('January'); + expect(format('MMMMM', date)).toBe('J'); + expect(format('MMMMMM', date)).toBe('January'); + expect(format('h', date)).toBe('3'); + expect(format('hh', date)).toBe('03'); + expect(format('hhh', date)).toBe('03'); + expect(format('hhhh', date)).toBe('03'); + expect(format('hhhhh', date)).toBe('03'); + expect(format('hhhhhh', date)).toBe('03'); + expect(format('H', date)).toBe('3'); + expect(format('HH', date)).toBe('03'); + expect(format('HHH', date)).toBe('03'); + expect(format('HHHH', date)).toBe('03'); + expect(format('HHHHH', date)).toBe('03'); + expect(format('HHHHHH', date)).toBe('03'); + expect(format('a', date)).toBe('a'); + expect(format('aa', date)).toBe('aa'); + expect(format('aaa', date)).toBe('Sat'); + expect(format('aaaa', date)).toBe('Saturday'); + expect(format('aaaaa', date)).toBe('Saturday'); + expect(format('aaaaaa', date)).toBe('Saturday'); + expect(format('d', date)).toBe('2'); + expect(format('dd', date)).toBe('02'); + expect(format('ddd', date)).toBe('Sat'); + expect(format('dddd', date)).toBe('Saturday'); + expect(format('ddddd', date)).toBe('Saturday'); + expect(format('dddddd', date)).toBe('Saturday'); + expect(format('D', date)).toBe('2'); + expect(format('DD', date)).toBe('02'); + expect(format('DDD', date)).toBe('Sat'); + expect(format('DDDD', date)).toBe('Saturday'); + expect(format('DDDDD', date)).toBe('Saturday'); + expect(format('DDDDDD', date)).toBe('Saturday'); + expect(format('y', date)).toBe('09'); + expect(format('yy', date)).toBe('09'); + expect(format('yyy', date)).toBe('1909'); + expect(format('yyyy', date)).toBe('1909'); + expect(format('yyyyy', date)).toBe('1909'); + expect(format('yyyyyy', date)).toBe('1909'); + expect(format('Y', date)).toBe('09'); + expect(format('YY', date)).toBe('09'); + expect(format('YYY', date)).toBe('1909'); + expect(format('YYYY', date)).toBe('1909'); + expect(format('YYYYY', date)).toBe('1909'); + expect(format('YYYYYY', date)).toBe('1909'); // elapsed - t.format('[h]', date, '78963'); - t.format('[hh]', date, '78963'); - t.format('[hhh]', date, '78963'); - t.format('[hhhh]', date, '78963'); - t.format('[hhhhh]', date, '78963'); - t.format('[m]', date, '4737784'); - t.format('[mm]', date, '4737784'); - t.format('[mmm]', date, '4737784'); - t.format('[mmmm]', date, '4737784'); - t.format('[s]', date, '284267046'); - t.format('[ss]', date, '284267046'); - t.format('[sss]', date, '284267046'); - t.format('[ssss]', date, '284267046'); + expect(format('[h]', date)).toBe('78963'); + expect(format('[hh]', date)).toBe('78963'); + expect(format('[hhh]', date)).toBe('78963'); + expect(format('[hhhh]', date)).toBe('78963'); + expect(format('[hhhhh]', date)).toBe('78963'); + expect(format('[m]', date)).toBe('4737784'); + expect(format('[mm]', date)).toBe('4737784'); + expect(format('[mmm]', date)).toBe('4737784'); + expect(format('[mmmm]', date)).toBe('4737784'); + expect(format('[s]', date)).toBe('284267046'); + expect(format('[ss]', date)).toBe('284267046'); + expect(format('[sss]', date)).toBe('284267046'); + expect(format('[ssss]', date)).toBe('284267046'); // fractional seconds - t.format('[s].0', date, '284267045.7'); - t.format('[s].00', date, '284267045.68'); - t.format('[s].000', date, '284267045.678'); - t.format('s.0', date, '5.7'); - t.format('s.00', date, '5.68'); - t.format('s.000', date, '5.678'); - t.end(); + expect(format('[s].0', date)).toBe('284267045.7'); + expect(format('[s].00', date)).toBe('284267045.68'); + expect(format('[s].000', date)).toBe('284267045.678'); + expect(format('s.0', date)).toBe('5.7'); + expect(format('s.00', date)).toBe('5.68'); + expect(format('s.000', date)).toBe('5.678'); }); -test('Date specifiers: month vs. minute', t => { - t.format('h', date, '3'); - t.format('m', date, '1'); - t.format('s', date, '6'); +test('Date specifiers: month vs. minute', () => { + expect(format('h', date)).toBe('3'); + expect(format('m', date)).toBe('1'); + expect(format('s', date)).toBe('6'); - t.format('h-h', date, '3-3'); - t.format('h-m', date, '3-4'); - t.format('h-s', date, '3-6'); - t.format('m-h', date, '1-3'); - t.format('m-m', date, '1-1'); - t.format('m-s', date, '4-6'); - t.format('s-h', date, '6-3'); - t.format('s-m', date, '6-4'); - t.format('s-s', date, '6-6'); + expect(format('h-h', date)).toBe('3-3'); + expect(format('h-m', date)).toBe('3-4'); + expect(format('h-s', date)).toBe('3-6'); + expect(format('m-h', date)).toBe('1-3'); + expect(format('m-m', date)).toBe('1-1'); + expect(format('m-s', date)).toBe('4-6'); + expect(format('s-h', date)).toBe('6-3'); + expect(format('s-m', date)).toBe('6-4'); + expect(format('s-s', date)).toBe('6-6'); - t.format('h-h-m', date, '3-3-4'); - t.format('h-h-s', date, '3-3-6'); - t.format('h-m-h', date, '3-4-3'); - t.format('h-m-m', date, '3-4-1'); - t.format('h-m-s', date, '3-4-6'); - t.format('h-s-h', date, '3-6-3'); - t.format('h-s-m', date, '3-6-4'); - t.format('h-s-s', date, '3-6-6'); - t.format('m-h-h', date, '1-3-3'); - t.format('m-h-m', date, '1-3-4'); - t.format('m-h-s', date, '1-3-6'); - t.format('m-m-h', date, '1-1-3'); - t.format('m-m-m', date, '1-1-1'); - t.format('m-m-s', date, '1-4-6'); - t.format('m-s-h', date, '4-6-3'); - t.format('m-s-m', date, '4-6-1'); - t.format('m-s-s', date, '4-6-6'); - t.format('s-h-h', date, '6-3-3'); - t.format('s-h-m', date, '6-3-4'); - t.format('s-h-s', date, '6-3-6'); - t.format('s-m-h', date, '6-4-3'); - t.format('s-m-m', date, '6-4-1'); - t.format('s-m-s', date, '6-4-6'); - t.format('s-s-h', date, '6-6-3'); - t.format('s-s-m', date, '6-6-4'); + expect(format('h-h-m', date)).toBe('3-3-4'); + expect(format('h-h-s', date)).toBe('3-3-6'); + expect(format('h-m-h', date)).toBe('3-4-3'); + expect(format('h-m-m', date)).toBe('3-4-1'); + expect(format('h-m-s', date)).toBe('3-4-6'); + expect(format('h-s-h', date)).toBe('3-6-3'); + expect(format('h-s-m', date)).toBe('3-6-4'); + expect(format('h-s-s', date)).toBe('3-6-6'); + expect(format('m-h-h', date)).toBe('1-3-3'); + expect(format('m-h-m', date)).toBe('1-3-4'); + expect(format('m-h-s', date)).toBe('1-3-6'); + expect(format('m-m-h', date)).toBe('1-1-3'); + expect(format('m-m-m', date)).toBe('1-1-1'); + expect(format('m-m-s', date)).toBe('1-4-6'); + expect(format('m-s-h', date)).toBe('4-6-3'); + expect(format('m-s-m', date)).toBe('4-6-1'); + expect(format('m-s-s', date)).toBe('4-6-6'); + expect(format('s-h-h', date)).toBe('6-3-3'); + expect(format('s-h-m', date)).toBe('6-3-4'); + expect(format('s-h-s', date)).toBe('6-3-6'); + expect(format('s-m-h', date)).toBe('6-4-3'); + expect(format('s-m-m', date)).toBe('6-4-1'); + expect(format('s-m-s', date)).toBe('6-4-6'); + expect(format('s-s-h', date)).toBe('6-6-3'); + expect(format('s-s-m', date)).toBe('6-6-4'); - t.format('h-m-m-s', date, '3-4-4-6'); - t.format('h-m-s-m', date, '3-4-6-1'); - t.format('h-s-m-m', date, '3-6-4-1'); - t.format('m-h-m-s', date, '1-3-4-6'); - t.format('m-h-s-m', date, '1-3-6-4'); - t.format('m-m-h-s', date, '1-1-3-6'); - t.format('m-m-s-h', date, '1-4-6-3'); - t.format('m-s-h-m', date, '4-6-3-4'); - t.format('m-s-m-h', date, '4-6-1-3'); - t.format('s-h-m-m', date, '6-3-4-1'); - t.format('s-m-h-m', date, '6-4-3-4'); - t.format('s-m-m-h', date, '6-4-1-3'); + expect(format('h-m-m-s', date)).toBe('3-4-4-6'); + expect(format('h-m-s-m', date)).toBe('3-4-6-1'); + expect(format('h-s-m-m', date)).toBe('3-6-4-1'); + expect(format('m-h-m-s', date)).toBe('1-3-4-6'); + expect(format('m-h-s-m', date)).toBe('1-3-6-4'); + expect(format('m-m-h-s', date)).toBe('1-1-3-6'); + expect(format('m-m-s-h', date)).toBe('1-4-6-3'); + expect(format('m-s-h-m', date)).toBe('4-6-3-4'); + expect(format('m-s-m-h', date)).toBe('4-6-1-3'); + expect(format('s-h-m-m', date)).toBe('6-3-4-1'); + expect(format('s-m-h-m', date)).toBe('6-4-3-4'); + expect(format('s-m-m-h', date)).toBe('6-4-1-3'); - t.format('y-m-d', date, '09-1-2'); - t.format('d-m-y', date, '2-1-09'); - t.format('yy-mm-dd', date, '09-01-02'); + expect(format('y-m-d', date)).toBe('09-1-2'); + expect(format('d-m-y', date)).toBe('2-1-09'); + expect(format('yy-mm-dd', date)).toBe('09-01-02'); - t.format('yyyy', date, '1909'); - t.format('yyyy-mm', date, '1909-01'); - t.format('yyyy-mm-dd', date, '1909-01-02'); - t.format('yyyy-mm-dd\\Thh', date, '1909-01-02T03'); - t.format('yyyy-mm-dd\\Thh-mm', date, '1909-01-02T03-04'); - t.format('yyyy-mm-dd\\Thh-mm-ss', date, '1909-01-02T03-04-06'); - t.format('yyyy-mm-dd\\Thh-mm-ss.000', date, '1909-01-02T03-04-05.678'); + expect(format('yyyy', date)).toBe('1909'); + expect(format('yyyy-mm', date)).toBe('1909-01'); + expect(format('yyyy-mm-dd', date)).toBe('1909-01-02'); + expect(format('yyyy-mm-dd\\Thh', date)).toBe('1909-01-02T03'); + expect(format('yyyy-mm-dd\\Thh-mm', date)).toBe('1909-01-02T03-04'); + expect(format('yyyy-mm-dd\\Thh-mm-ss', date)).toBe('1909-01-02T03-04-06'); + expect(format('yyyy-mm-dd\\Thh-mm-ss.000', date)).toBe('1909-01-02T03-04-05.678'); - t.format('yyyy-mm-dd\\Thh-mm-ss.000', 60, '1900-02-29T00-00-00.000'); - t.format('yyyy-mm-dd\\Thh-mm-ss.000', 61, '1900-03-01T00-00-00.000'); - - t.end(); + expect(format('yyyy-mm-dd\\Thh-mm-ss.000', 60)).toBe('1900-02-29T00-00-00.000'); + expect(format('yyyy-mm-dd\\Thh-mm-ss.000', 61)).toBe('1900-03-01T00-00-00.000'); }); diff --git a/test/datebounds.spec.ts b/test/datebounds.spec.ts index bf93c6b..41e6d05 100644 --- a/test/datebounds.spec.ts +++ b/test/datebounds.spec.ts @@ -1,243 +1,237 @@ -import test from './utils.js'; +import { expect, test } from 'vitest'; import { format } from '../lib/index.js'; const ISODATE = 'yyyy-mm-dd'; const ISODATETIME = 'yyyy-mm-dd\\Thh:mm:ss'; -test('dateSpanLarge: OFF', t => { +test('dateSpanLarge: OFF', () => { const opts = { leap1900: false, dateSpanLarge: false, dateErrorThrows: true }; - t.throws(() => format(ISODATE, -0.1, opts), '-0.1'); - t.throws(() => format(ISODATE, -0.01, opts), '-0.01'); - t.throws(() => format(ISODATE, -0.001, opts), '-0.001'); - t.throws(() => format(ISODATE, -0.0001, opts), '-0.0001'); - t.throws(() => format(ISODATE, -0.00001, opts), '-0.00001'); - t.throws(() => format(ISODATE, -0.000001, opts), '-0.000001'); - t.equal(format(ISODATE, 0, opts), '1899-12-30', '0'); + expect(() => format(ISODATE, -0.1, opts), '-0.1').toThrow(); + expect(() => format(ISODATE, -0.01, opts), '-0.01').toThrow(); + expect(() => format(ISODATE, -0.001, opts), '-0.001').toThrow(); + expect(() => format(ISODATE, -0.0001, opts), '-0.0001').toThrow(); + expect(() => format(ISODATE, -0.00001, opts), '-0.00001').toThrow(); + expect(() => format(ISODATE, -0.000001, opts), '-0.000001').toThrow(); + expect(format(ISODATE, 0, opts), '0').toBe('1899-12-30'); - t.throws(() => format(ISODATE, 2958465.99999422, opts), '2958465.99999422'); - t.equal(format(ISODATE, 2958465.99999421, opts), '9999-12-31', '2958465.99999421'); + expect(() => format(ISODATE, 2958465.99999422, opts), '2958465.99999422').toThrow(); + expect(format(ISODATE, 2958465.99999421, opts), '2958465.99999421').toBe('9999-12-31'); const dt = 'yyyy-mm-dd/hh:mm:ss'; - t.throws(() => format(dt, 2958465.99999422, opts), '2958465.99999422'); - t.equal(format(dt, 2958465.99999421, opts), '9999-12-31/23:59:59', '2958465.99999421'); + expect(() => format(dt, 2958465.99999422, opts), '2958465.99999422').toThrow(); + expect(format(dt, 2958465.99999421, opts), '2958465.99999421').toBe('9999-12-31/23:59:59'); const dt0 = 'yyyy-mm-dd/hh:mm:ss.0'; - t.throws(() => format(dt0, 2958465.99999943, opts), '2958465.99999943'); - t.equal(format(dt0, 2958465.99999942, opts), '9999-12-31/23:59:59.9', '2958465.99999942'); + expect(() => format(dt0, 2958465.99999943, opts), '2958465.99999943').toThrow(); + expect(format(dt0, 2958465.99999942, opts), '2958465.99999942').toBe('9999-12-31/23:59:59.9'); const dt00 = ISODATE + '/hh:mm:ss.00'; - t.throws(() => format(dt00, 2958465.99999995, opts), '2958465.99999995'); - t.equal(format(dt00, 2958465.99999994, opts), '9999-12-31/23:59:59.99', '2958465.99999994'); + expect(() => format(dt00, 2958465.99999995, opts), '2958465.99999995').toThrow(); + expect(format(dt00, 2958465.99999994, opts), '2958465.99999994').toBe('9999-12-31/23:59:59.99'); const dt000 = ISODATE + '/hh:mm:ss.000'; // Excel can't really represent 2958465.999999995 so this never happens, but: - t.throws(() => format(dt000, 2958465.999999995, opts), '2958465.99999999'); - t.equal(format(dt000, 2958465.99999999, opts), '9999-12-31/23:59:59.999', '2958465.99999999'); - - t.end(); + expect(() => format(dt000, 2958465.999999995, opts), '2958465.99999999').toThrow(); + expect(format(dt000, 2958465.99999999, opts), '2958465.99999999').toBe('9999-12-31/23:59:59.999'); }); -test('dateSpanLarge: ON', t => { - t.format(ISODATETIME, 0.1, '1899-12-30T02:24:00', { leap1900: false, dateSpanLarge: true }); - t.format(ISODATETIME, -0.00001157407, '1899-12-29T23:59:59', { leap1900: false, dateSpanLarge: true }); - t.format(ISODATETIME, 0, '1899-12-30T00:00:00', { leap1900: false, dateSpanLarge: true }); - t.format(ISODATETIME, -0.1, '1899-12-29T21:36:00', { leap1900: false, dateSpanLarge: true }); - - t.format('[s]', -0.1, '-8640', { leap1900: false, dateSpanLarge: true }); - t.format('[m]', -0.1, '-144', { leap1900: false, dateSpanLarge: true }); - t.format('[h]', -0.1, '-2', { leap1900: false, dateSpanLarge: true }); - t.format('[s]', -2, '-172800', { leap1900: false, dateSpanLarge: true }); - t.format('[m]', -2, '-2880', { leap1900: false, dateSpanLarge: true }); - t.format('[h]', -2, '-48', { leap1900: false, dateSpanLarge: true }); - - t.format(ISODATETIME, -0.2, '1899-12-29T19:12:00', { leap1900: false, dateSpanLarge: true }); - t.format(ISODATETIME, -0.3, '1899-12-29T16:48:00', { leap1900: false, dateSpanLarge: true }); - t.format(ISODATETIME, -0.4, '1899-12-29T14:24:00', { leap1900: false, dateSpanLarge: true }); - t.format(ISODATETIME, -0.5, '1899-12-29T12:00:00', { leap1900: false, dateSpanLarge: true }); - t.format(ISODATETIME, -0.6, '1899-12-29T09:36:00', { leap1900: false, dateSpanLarge: true }); - t.format(ISODATETIME, -0.7, '1899-12-29T07:12:00', { leap1900: false, dateSpanLarge: true }); - t.format(ISODATETIME, -0.8, '1899-12-29T04:48:00', { leap1900: false, dateSpanLarge: true }); - t.format(ISODATETIME, -0.9, '1899-12-29T02:24:00', { leap1900: false, dateSpanLarge: true }); - t.format(ISODATETIME, -1, '1899-12-29T00:00:00', { leap1900: false, dateSpanLarge: true }); - t.format(ISODATETIME, -1.1, '1899-12-28T21:36:00', { leap1900: false, dateSpanLarge: true }); - t.format(ISODATETIME, -1.2, '1899-12-28T19:12:00', { leap1900: false, dateSpanLarge: true }); - t.format(ISODATETIME, -1.3, '1899-12-28T16:48:00', { leap1900: false, dateSpanLarge: true }); - t.format(ISODATETIME, -1.4, '1899-12-28T14:24:00', { leap1900: false, dateSpanLarge: true }); - t.format(ISODATETIME, -1.5, '1899-12-28T12:00:00', { leap1900: false, dateSpanLarge: true }); - t.format(ISODATETIME, -1.6, '1899-12-28T09:36:00', { leap1900: false, dateSpanLarge: true }); - t.format(ISODATETIME, -1.7, '1899-12-28T07:12:00', { leap1900: false, dateSpanLarge: true }); - t.format(ISODATETIME, -1.8, '1899-12-28T04:48:00', { leap1900: false, dateSpanLarge: true }); - t.format(ISODATETIME, -1.9, '1899-12-28T02:24:00', { leap1900: false, dateSpanLarge: true }); - t.format(ISODATETIME, -2, '1899-12-28T00:00:00', { leap1900: false, dateSpanLarge: true }); +test('dateSpanLarge: ON', () => { + expect(format(ISODATETIME, 0.1, { leap1900: false, dateSpanLarge: true })).toBe('1899-12-30T02:24:00'); + expect(format(ISODATETIME, -0.00001157407, { leap1900: false, dateSpanLarge: true })).toBe('1899-12-29T23:59:59'); + expect(format(ISODATETIME, 0, { leap1900: false, dateSpanLarge: true })).toBe('1899-12-30T00:00:00'); + expect(format(ISODATETIME, -0.1, { leap1900: false, dateSpanLarge: true })).toBe('1899-12-29T21:36:00'); + + expect(format('[s]', -0.1, { leap1900: false, dateSpanLarge: true })).toBe('-8640'); + expect(format('[m]', -0.1, { leap1900: false, dateSpanLarge: true })).toBe('-144'); + expect(format('[h]', -0.1, { leap1900: false, dateSpanLarge: true })).toBe('-2'); + expect(format('[s]', -2, { leap1900: false, dateSpanLarge: true })).toBe('-172800'); + expect(format('[m]', -2, { leap1900: false, dateSpanLarge: true })).toBe('-2880'); + expect(format('[h]', -2, { leap1900: false, dateSpanLarge: true })).toBe('-48'); + + expect(format(ISODATETIME, -0.2, { leap1900: false, dateSpanLarge: true })).toBe('1899-12-29T19:12:00'); + expect(format(ISODATETIME, -0.3, { leap1900: false, dateSpanLarge: true })).toBe('1899-12-29T16:48:00'); + expect(format(ISODATETIME, -0.4, { leap1900: false, dateSpanLarge: true })).toBe('1899-12-29T14:24:00'); + expect(format(ISODATETIME, -0.5, { leap1900: false, dateSpanLarge: true })).toBe('1899-12-29T12:00:00'); + expect(format(ISODATETIME, -0.6, { leap1900: false, dateSpanLarge: true })).toBe('1899-12-29T09:36:00'); + expect(format(ISODATETIME, -0.7, { leap1900: false, dateSpanLarge: true })).toBe('1899-12-29T07:12:00'); + expect(format(ISODATETIME, -0.8, { leap1900: false, dateSpanLarge: true })).toBe('1899-12-29T04:48:00'); + expect(format(ISODATETIME, -0.9, { leap1900: false, dateSpanLarge: true })).toBe('1899-12-29T02:24:00'); + expect(format(ISODATETIME, -1, { leap1900: false, dateSpanLarge: true })).toBe('1899-12-29T00:00:00'); + expect(format(ISODATETIME, -1.1, { leap1900: false, dateSpanLarge: true })).toBe('1899-12-28T21:36:00'); + expect(format(ISODATETIME, -1.2, { leap1900: false, dateSpanLarge: true })).toBe('1899-12-28T19:12:00'); + expect(format(ISODATETIME, -1.3, { leap1900: false, dateSpanLarge: true })).toBe('1899-12-28T16:48:00'); + expect(format(ISODATETIME, -1.4, { leap1900: false, dateSpanLarge: true })).toBe('1899-12-28T14:24:00'); + expect(format(ISODATETIME, -1.5, { leap1900: false, dateSpanLarge: true })).toBe('1899-12-28T12:00:00'); + expect(format(ISODATETIME, -1.6, { leap1900: false, dateSpanLarge: true })).toBe('1899-12-28T09:36:00'); + expect(format(ISODATETIME, -1.7, { leap1900: false, dateSpanLarge: true })).toBe('1899-12-28T07:12:00'); + expect(format(ISODATETIME, -1.8, { leap1900: false, dateSpanLarge: true })).toBe('1899-12-28T04:48:00'); + expect(format(ISODATETIME, -1.9, { leap1900: false, dateSpanLarge: true })).toBe('1899-12-28T02:24:00'); + expect(format(ISODATETIME, -2, { leap1900: false, dateSpanLarge: true })).toBe('1899-12-28T00:00:00'); // negative dates should not be affected by the leap year bug - t.format(ISODATETIME, -0.2, '1899-12-29T19:12:00', { dateSpanLarge: true }); - t.format(ISODATETIME, -0.3, '1899-12-29T16:48:00', { dateSpanLarge: true }); - t.format(ISODATETIME, -0.4, '1899-12-29T14:24:00', { dateSpanLarge: true }); - t.format(ISODATETIME, -0.5, '1899-12-29T12:00:00', { dateSpanLarge: true }); - t.format(ISODATETIME, -0.6, '1899-12-29T09:36:00', { dateSpanLarge: true }); - t.format(ISODATETIME, -0.7, '1899-12-29T07:12:00', { dateSpanLarge: true }); - t.format(ISODATETIME, -0.8, '1899-12-29T04:48:00', { dateSpanLarge: true }); - t.format(ISODATETIME, -0.9, '1899-12-29T02:24:00', { dateSpanLarge: true }); - t.format(ISODATETIME, -1, '1899-12-29T00:00:00', { dateSpanLarge: true }); - t.format(ISODATETIME, -1.1, '1899-12-28T21:36:00', { dateSpanLarge: true }); - t.format(ISODATETIME, -1.2, '1899-12-28T19:12:00', { dateSpanLarge: true }); - t.format(ISODATETIME, -1.3, '1899-12-28T16:48:00', { dateSpanLarge: true }); - t.format(ISODATETIME, -1.4, '1899-12-28T14:24:00', { dateSpanLarge: true }); - t.format(ISODATETIME, -1.5, '1899-12-28T12:00:00', { dateSpanLarge: true }); - t.format(ISODATETIME, -1.6, '1899-12-28T09:36:00', { dateSpanLarge: true }); - t.format(ISODATETIME, -1.7, '1899-12-28T07:12:00', { dateSpanLarge: true }); - t.format(ISODATETIME, -1.8, '1899-12-28T04:48:00', { dateSpanLarge: true }); - t.format(ISODATETIME, -1.9, '1899-12-28T02:24:00', { dateSpanLarge: true }); - t.format(ISODATETIME, -2, '1899-12-28T00:00:00', { dateSpanLarge: true }); - - t.format(ISODATE, -45000, '1776-10-15', { leap1900: false, dateSpanLarge: true }); - t.format(ISODATE, 35830289, '99999-12-30', { leap1900: false, dateSpanLarge: true }); - t.format(ISODATE, 35830290, '99999-12-31', { leap1900: false, dateSpanLarge: true }); - t.format(ISODATETIME, 35830290.9, '99999-12-31T21:36:00', { leap1900: false, dateSpanLarge: true }); + expect(format(ISODATETIME, -0.2, { dateSpanLarge: true })).toBe('1899-12-29T19:12:00'); + expect(format(ISODATETIME, -0.3, { dateSpanLarge: true })).toBe('1899-12-29T16:48:00'); + expect(format(ISODATETIME, -0.4, { dateSpanLarge: true })).toBe('1899-12-29T14:24:00'); + expect(format(ISODATETIME, -0.5, { dateSpanLarge: true })).toBe('1899-12-29T12:00:00'); + expect(format(ISODATETIME, -0.6, { dateSpanLarge: true })).toBe('1899-12-29T09:36:00'); + expect(format(ISODATETIME, -0.7, { dateSpanLarge: true })).toBe('1899-12-29T07:12:00'); + expect(format(ISODATETIME, -0.8, { dateSpanLarge: true })).toBe('1899-12-29T04:48:00'); + expect(format(ISODATETIME, -0.9, { dateSpanLarge: true })).toBe('1899-12-29T02:24:00'); + expect(format(ISODATETIME, -1, { dateSpanLarge: true })).toBe('1899-12-29T00:00:00'); + expect(format(ISODATETIME, -1.1, { dateSpanLarge: true })).toBe('1899-12-28T21:36:00'); + expect(format(ISODATETIME, -1.2, { dateSpanLarge: true })).toBe('1899-12-28T19:12:00'); + expect(format(ISODATETIME, -1.3, { dateSpanLarge: true })).toBe('1899-12-28T16:48:00'); + expect(format(ISODATETIME, -1.4, { dateSpanLarge: true })).toBe('1899-12-28T14:24:00'); + expect(format(ISODATETIME, -1.5, { dateSpanLarge: true })).toBe('1899-12-28T12:00:00'); + expect(format(ISODATETIME, -1.6, { dateSpanLarge: true })).toBe('1899-12-28T09:36:00'); + expect(format(ISODATETIME, -1.7, { dateSpanLarge: true })).toBe('1899-12-28T07:12:00'); + expect(format(ISODATETIME, -1.8, { dateSpanLarge: true })).toBe('1899-12-28T04:48:00'); + expect(format(ISODATETIME, -1.9, { dateSpanLarge: true })).toBe('1899-12-28T02:24:00'); + expect(format(ISODATETIME, -2, { dateSpanLarge: true })).toBe('1899-12-28T00:00:00'); + + expect(format(ISODATE, -45000, { leap1900: false, dateSpanLarge: true })).toBe('1776-10-15'); + expect(format(ISODATE, 35830289, { leap1900: false, dateSpanLarge: true })).toBe('99999-12-30'); + expect(format(ISODATE, 35830290, { leap1900: false, dateSpanLarge: true })).toBe('99999-12-31'); + expect(format(ISODATETIME, 35830290.9, { leap1900: false, dateSpanLarge: true })).toBe('99999-12-31T21:36:00'); // out of bounds - t.format(ISODATETIME, 35830291, '######', { leap1900: false, dateSpanLarge: true, dateErrorNumber: false }); - t.format(ISODATETIME, 35830291, '35830291', { leap1900: false, dateSpanLarge: true, dateErrorNumber: true }); + expect(format(ISODATETIME, 35830291, { leap1900: false, dateSpanLarge: true, dateErrorNumber: false })).toBe('######'); + expect(format(ISODATETIME, 35830291, { leap1900: false, dateSpanLarge: true, dateErrorNumber: true })).toBe('35830291'); // Google Sheets emits "00-1-01-02" for TEXT(-694324, ISODATE) // this is does not seem all that useful to anyone - t.format(ISODATE, -694323, '-0001-01-02', { leap1900: false, dateSpanLarge: true, dateErrorNumber: false }); - t.format(ISODATE, -694324, '-0001-01-01', { leap1900: false, dateSpanLarge: true, dateErrorNumber: false }); - t.format(ISODATETIME, -694324.1, '######', { leap1900: false, dateSpanLarge: true, dateErrorNumber: false }); - t.format(ISODATETIME, -694324.1, '-694324.1', { leap1900: false, dateSpanLarge: true, dateErrorNumber: true }); - - t.end(); + expect(format(ISODATE, -694323, { leap1900: false, dateSpanLarge: true, dateErrorNumber: false })).toBe('-0001-01-02'); + expect(format(ISODATE, -694324, { leap1900: false, dateSpanLarge: true, dateErrorNumber: false })).toBe('-0001-01-01'); + expect(format(ISODATETIME, -694324.1, { leap1900: false, dateSpanLarge: true, dateErrorNumber: false })).toBe('######'); + expect(format(ISODATETIME, -694324.1, { leap1900: false, dateSpanLarge: true, dateErrorNumber: true })).toBe('-694324.1'); }); -test('Excel leap 1900 bug: ON', t => { - t.format(ISODATE, 61, '1900-03-01', { leap1900: true }); - t.format(ISODATE, 60, '1900-02-29', { leap1900: true }); - t.format(ISODATE, 59, '1900-02-28', { leap1900: true }); - t.format(ISODATE, 58, '1900-02-27', { leap1900: true }); - t.format(ISODATE, 57, '1900-02-26', { leap1900: true }); - t.format(ISODATE, 56, '1900-02-25', { leap1900: true }); - t.format(ISODATE, 55, '1900-02-24', { leap1900: true }); - t.format(ISODATE, 54, '1900-02-23', { leap1900: true }); - t.format(ISODATE, 53, '1900-02-22', { leap1900: true }); - t.format(ISODATE, 52, '1900-02-21', { leap1900: true }); - t.format(ISODATE, 51, '1900-02-20', { leap1900: true }); - t.format(ISODATE, 50, '1900-02-19', { leap1900: true }); - t.format(ISODATE, 49, '1900-02-18', { leap1900: true }); - t.format(ISODATE, 48, '1900-02-17', { leap1900: true }); - t.format(ISODATE, 47, '1900-02-16', { leap1900: true }); - t.format(ISODATE, 46, '1900-02-15', { leap1900: true }); - t.format(ISODATE, 45, '1900-02-14', { leap1900: true }); - t.format(ISODATE, 44, '1900-02-13', { leap1900: true }); - t.format(ISODATE, 43, '1900-02-12', { leap1900: true }); - t.format(ISODATE, 42, '1900-02-11', { leap1900: true }); - t.format(ISODATE, 41, '1900-02-10', { leap1900: true }); - t.format(ISODATE, 40, '1900-02-09', { leap1900: true }); - t.format(ISODATE, 39, '1900-02-08', { leap1900: true }); - t.format(ISODATE, 38, '1900-02-07', { leap1900: true }); - t.format(ISODATE, 37, '1900-02-06', { leap1900: true }); - t.format(ISODATE, 36, '1900-02-05', { leap1900: true }); - t.format(ISODATE, 35, '1900-02-04', { leap1900: true }); - t.format(ISODATE, 34, '1900-02-03', { leap1900: true }); - t.format(ISODATE, 33, '1900-02-02', { leap1900: true }); - t.format(ISODATE, 32, '1900-02-01', { leap1900: true }); - t.format(ISODATE, 31, '1900-01-31', { leap1900: true }); - t.format(ISODATE, 30, '1900-01-30', { leap1900: true }); - t.format(ISODATE, 29, '1900-01-29', { leap1900: true }); - t.format(ISODATE, 28, '1900-01-28', { leap1900: true }); - t.format(ISODATE, 27, '1900-01-27', { leap1900: true }); - t.format(ISODATE, 26, '1900-01-26', { leap1900: true }); - t.format(ISODATE, 25, '1900-01-25', { leap1900: true }); - t.format(ISODATE, 24, '1900-01-24', { leap1900: true }); - t.format(ISODATE, 23, '1900-01-23', { leap1900: true }); - t.format(ISODATE, 22, '1900-01-22', { leap1900: true }); - t.format(ISODATE, 21, '1900-01-21', { leap1900: true }); - t.format(ISODATE, 20, '1900-01-20', { leap1900: true }); - t.format(ISODATE, 19, '1900-01-19', { leap1900: true }); - t.format(ISODATE, 18, '1900-01-18', { leap1900: true }); - t.format(ISODATE, 17, '1900-01-17', { leap1900: true }); - t.format(ISODATE, 16, '1900-01-16', { leap1900: true }); - t.format(ISODATE, 15, '1900-01-15', { leap1900: true }); - t.format(ISODATE, 14, '1900-01-14', { leap1900: true }); - t.format(ISODATE, 13, '1900-01-13', { leap1900: true }); - t.format(ISODATE, 12, '1900-01-12', { leap1900: true }); - t.format(ISODATE, 11, '1900-01-11', { leap1900: true }); - t.format(ISODATE, 10, '1900-01-10', { leap1900: true }); - t.format(ISODATE, 9, '1900-01-09', { leap1900: true }); - t.format(ISODATE, 8, '1900-01-08', { leap1900: true }); - t.format(ISODATE, 7, '1900-01-07', { leap1900: true }); - t.format(ISODATE, 6, '1900-01-06', { leap1900: true }); - t.format(ISODATE, 5, '1900-01-05', { leap1900: true }); - t.format(ISODATE, 4, '1900-01-04', { leap1900: true }); - t.format(ISODATE, 3, '1900-01-03', { leap1900: true }); - t.format(ISODATE, 2, '1900-01-02', { leap1900: true }); - t.format(ISODATE, 1, '1900-01-01', { leap1900: true }); - t.format(ISODATE, 0, '1900-01-00', { leap1900: true }); - t.end(); +test('Excel leap 1900 bug: ON', () => { + expect(format(ISODATE, 61, { leap1900: true })).toBe('1900-03-01'); + expect(format(ISODATE, 60, { leap1900: true })).toBe('1900-02-29'); + expect(format(ISODATE, 59, { leap1900: true })).toBe('1900-02-28'); + expect(format(ISODATE, 58, { leap1900: true })).toBe('1900-02-27'); + expect(format(ISODATE, 57, { leap1900: true })).toBe('1900-02-26'); + expect(format(ISODATE, 56, { leap1900: true })).toBe('1900-02-25'); + expect(format(ISODATE, 55, { leap1900: true })).toBe('1900-02-24'); + expect(format(ISODATE, 54, { leap1900: true })).toBe('1900-02-23'); + expect(format(ISODATE, 53, { leap1900: true })).toBe('1900-02-22'); + expect(format(ISODATE, 52, { leap1900: true })).toBe('1900-02-21'); + expect(format(ISODATE, 51, { leap1900: true })).toBe('1900-02-20'); + expect(format(ISODATE, 50, { leap1900: true })).toBe('1900-02-19'); + expect(format(ISODATE, 49, { leap1900: true })).toBe('1900-02-18'); + expect(format(ISODATE, 48, { leap1900: true })).toBe('1900-02-17'); + expect(format(ISODATE, 47, { leap1900: true })).toBe('1900-02-16'); + expect(format(ISODATE, 46, { leap1900: true })).toBe('1900-02-15'); + expect(format(ISODATE, 45, { leap1900: true })).toBe('1900-02-14'); + expect(format(ISODATE, 44, { leap1900: true })).toBe('1900-02-13'); + expect(format(ISODATE, 43, { leap1900: true })).toBe('1900-02-12'); + expect(format(ISODATE, 42, { leap1900: true })).toBe('1900-02-11'); + expect(format(ISODATE, 41, { leap1900: true })).toBe('1900-02-10'); + expect(format(ISODATE, 40, { leap1900: true })).toBe('1900-02-09'); + expect(format(ISODATE, 39, { leap1900: true })).toBe('1900-02-08'); + expect(format(ISODATE, 38, { leap1900: true })).toBe('1900-02-07'); + expect(format(ISODATE, 37, { leap1900: true })).toBe('1900-02-06'); + expect(format(ISODATE, 36, { leap1900: true })).toBe('1900-02-05'); + expect(format(ISODATE, 35, { leap1900: true })).toBe('1900-02-04'); + expect(format(ISODATE, 34, { leap1900: true })).toBe('1900-02-03'); + expect(format(ISODATE, 33, { leap1900: true })).toBe('1900-02-02'); + expect(format(ISODATE, 32, { leap1900: true })).toBe('1900-02-01'); + expect(format(ISODATE, 31, { leap1900: true })).toBe('1900-01-31'); + expect(format(ISODATE, 30, { leap1900: true })).toBe('1900-01-30'); + expect(format(ISODATE, 29, { leap1900: true })).toBe('1900-01-29'); + expect(format(ISODATE, 28, { leap1900: true })).toBe('1900-01-28'); + expect(format(ISODATE, 27, { leap1900: true })).toBe('1900-01-27'); + expect(format(ISODATE, 26, { leap1900: true })).toBe('1900-01-26'); + expect(format(ISODATE, 25, { leap1900: true })).toBe('1900-01-25'); + expect(format(ISODATE, 24, { leap1900: true })).toBe('1900-01-24'); + expect(format(ISODATE, 23, { leap1900: true })).toBe('1900-01-23'); + expect(format(ISODATE, 22, { leap1900: true })).toBe('1900-01-22'); + expect(format(ISODATE, 21, { leap1900: true })).toBe('1900-01-21'); + expect(format(ISODATE, 20, { leap1900: true })).toBe('1900-01-20'); + expect(format(ISODATE, 19, { leap1900: true })).toBe('1900-01-19'); + expect(format(ISODATE, 18, { leap1900: true })).toBe('1900-01-18'); + expect(format(ISODATE, 17, { leap1900: true })).toBe('1900-01-17'); + expect(format(ISODATE, 16, { leap1900: true })).toBe('1900-01-16'); + expect(format(ISODATE, 15, { leap1900: true })).toBe('1900-01-15'); + expect(format(ISODATE, 14, { leap1900: true })).toBe('1900-01-14'); + expect(format(ISODATE, 13, { leap1900: true })).toBe('1900-01-13'); + expect(format(ISODATE, 12, { leap1900: true })).toBe('1900-01-12'); + expect(format(ISODATE, 11, { leap1900: true })).toBe('1900-01-11'); + expect(format(ISODATE, 10, { leap1900: true })).toBe('1900-01-10'); + expect(format(ISODATE, 9, { leap1900: true })).toBe('1900-01-09'); + expect(format(ISODATE, 8, { leap1900: true })).toBe('1900-01-08'); + expect(format(ISODATE, 7, { leap1900: true })).toBe('1900-01-07'); + expect(format(ISODATE, 6, { leap1900: true })).toBe('1900-01-06'); + expect(format(ISODATE, 5, { leap1900: true })).toBe('1900-01-05'); + expect(format(ISODATE, 4, { leap1900: true })).toBe('1900-01-04'); + expect(format(ISODATE, 3, { leap1900: true })).toBe('1900-01-03'); + expect(format(ISODATE, 2, { leap1900: true })).toBe('1900-01-02'); + expect(format(ISODATE, 1, { leap1900: true })).toBe('1900-01-01'); + expect(format(ISODATE, 0, { leap1900: true })).toBe('1900-01-00'); }); -test('Excel 1900 bug: OFF', t => { - t.format(ISODATE, 61, '1900-03-01', { leap1900: false }); - t.format(ISODATE, 60, '1900-02-28', { leap1900: false }); - t.format(ISODATE, 59, '1900-02-27', { leap1900: false }); - t.format(ISODATE, 58, '1900-02-26', { leap1900: false }); - t.format(ISODATE, 57, '1900-02-25', { leap1900: false }); - t.format(ISODATE, 56, '1900-02-24', { leap1900: false }); - t.format(ISODATE, 55, '1900-02-23', { leap1900: false }); - t.format(ISODATE, 54, '1900-02-22', { leap1900: false }); - t.format(ISODATE, 53, '1900-02-21', { leap1900: false }); - t.format(ISODATE, 52, '1900-02-20', { leap1900: false }); - t.format(ISODATE, 51, '1900-02-19', { leap1900: false }); - t.format(ISODATE, 50, '1900-02-18', { leap1900: false }); - t.format(ISODATE, 49, '1900-02-17', { leap1900: false }); - t.format(ISODATE, 48, '1900-02-16', { leap1900: false }); - t.format(ISODATE, 47, '1900-02-15', { leap1900: false }); - t.format(ISODATE, 46, '1900-02-14', { leap1900: false }); - t.format(ISODATE, 45, '1900-02-13', { leap1900: false }); - t.format(ISODATE, 44, '1900-02-12', { leap1900: false }); - t.format(ISODATE, 43, '1900-02-11', { leap1900: false }); - t.format(ISODATE, 42, '1900-02-10', { leap1900: false }); - t.format(ISODATE, 41, '1900-02-09', { leap1900: false }); - t.format(ISODATE, 40, '1900-02-08', { leap1900: false }); - t.format(ISODATE, 39, '1900-02-07', { leap1900: false }); - t.format(ISODATE, 38, '1900-02-06', { leap1900: false }); - t.format(ISODATE, 37, '1900-02-05', { leap1900: false }); - t.format(ISODATE, 36, '1900-02-04', { leap1900: false }); - t.format(ISODATE, 35, '1900-02-03', { leap1900: false }); - t.format(ISODATE, 34, '1900-02-02', { leap1900: false }); - t.format(ISODATE, 33, '1900-02-01', { leap1900: false }); - t.format(ISODATE, 32, '1900-01-31', { leap1900: false }); - t.format(ISODATE, 31, '1900-01-30', { leap1900: false }); - t.format(ISODATE, 30, '1900-01-29', { leap1900: false }); - t.format(ISODATE, 29, '1900-01-28', { leap1900: false }); - t.format(ISODATE, 28, '1900-01-27', { leap1900: false }); - t.format(ISODATE, 27, '1900-01-26', { leap1900: false }); - t.format(ISODATE, 26, '1900-01-25', { leap1900: false }); - t.format(ISODATE, 25, '1900-01-24', { leap1900: false }); - t.format(ISODATE, 24, '1900-01-23', { leap1900: false }); - t.format(ISODATE, 23, '1900-01-22', { leap1900: false }); - t.format(ISODATE, 22, '1900-01-21', { leap1900: false }); - t.format(ISODATE, 21, '1900-01-20', { leap1900: false }); - t.format(ISODATE, 20, '1900-01-19', { leap1900: false }); - t.format(ISODATE, 19, '1900-01-18', { leap1900: false }); - t.format(ISODATE, 18, '1900-01-17', { leap1900: false }); - t.format(ISODATE, 17, '1900-01-16', { leap1900: false }); - t.format(ISODATE, 16, '1900-01-15', { leap1900: false }); - t.format(ISODATE, 15, '1900-01-14', { leap1900: false }); - t.format(ISODATE, 14, '1900-01-13', { leap1900: false }); - t.format(ISODATE, 13, '1900-01-12', { leap1900: false }); - t.format(ISODATE, 12, '1900-01-11', { leap1900: false }); - t.format(ISODATE, 11, '1900-01-10', { leap1900: false }); - t.format(ISODATE, 10, '1900-01-09', { leap1900: false }); - t.format(ISODATE, 9, '1900-01-08', { leap1900: false }); - t.format(ISODATE, 8, '1900-01-07', { leap1900: false }); - t.format(ISODATE, 7, '1900-01-06', { leap1900: false }); - t.format(ISODATE, 6, '1900-01-05', { leap1900: false }); - t.format(ISODATE, 5, '1900-01-04', { leap1900: false }); - t.format(ISODATE, 4, '1900-01-03', { leap1900: false }); - t.format(ISODATE, 3, '1900-01-02', { leap1900: false }); - t.format(ISODATE, 2, '1900-01-01', { leap1900: false }); - t.format(ISODATE, 1, '1899-12-31', { leap1900: false }); - t.format(ISODATE, 0, '1899-12-30', { leap1900: false }); - t.end(); +test('Excel 1900 bug: OFF', () => { + expect(format(ISODATE, 61, { leap1900: false })).toBe('1900-03-01'); + expect(format(ISODATE, 60, { leap1900: false })).toBe('1900-02-28'); + expect(format(ISODATE, 59, { leap1900: false })).toBe('1900-02-27'); + expect(format(ISODATE, 58, { leap1900: false })).toBe('1900-02-26'); + expect(format(ISODATE, 57, { leap1900: false })).toBe('1900-02-25'); + expect(format(ISODATE, 56, { leap1900: false })).toBe('1900-02-24'); + expect(format(ISODATE, 55, { leap1900: false })).toBe('1900-02-23'); + expect(format(ISODATE, 54, { leap1900: false })).toBe('1900-02-22'); + expect(format(ISODATE, 53, { leap1900: false })).toBe('1900-02-21'); + expect(format(ISODATE, 52, { leap1900: false })).toBe('1900-02-20'); + expect(format(ISODATE, 51, { leap1900: false })).toBe('1900-02-19'); + expect(format(ISODATE, 50, { leap1900: false })).toBe('1900-02-18'); + expect(format(ISODATE, 49, { leap1900: false })).toBe('1900-02-17'); + expect(format(ISODATE, 48, { leap1900: false })).toBe('1900-02-16'); + expect(format(ISODATE, 47, { leap1900: false })).toBe('1900-02-15'); + expect(format(ISODATE, 46, { leap1900: false })).toBe('1900-02-14'); + expect(format(ISODATE, 45, { leap1900: false })).toBe('1900-02-13'); + expect(format(ISODATE, 44, { leap1900: false })).toBe('1900-02-12'); + expect(format(ISODATE, 43, { leap1900: false })).toBe('1900-02-11'); + expect(format(ISODATE, 42, { leap1900: false })).toBe('1900-02-10'); + expect(format(ISODATE, 41, { leap1900: false })).toBe('1900-02-09'); + expect(format(ISODATE, 40, { leap1900: false })).toBe('1900-02-08'); + expect(format(ISODATE, 39, { leap1900: false })).toBe('1900-02-07'); + expect(format(ISODATE, 38, { leap1900: false })).toBe('1900-02-06'); + expect(format(ISODATE, 37, { leap1900: false })).toBe('1900-02-05'); + expect(format(ISODATE, 36, { leap1900: false })).toBe('1900-02-04'); + expect(format(ISODATE, 35, { leap1900: false })).toBe('1900-02-03'); + expect(format(ISODATE, 34, { leap1900: false })).toBe('1900-02-02'); + expect(format(ISODATE, 33, { leap1900: false })).toBe('1900-02-01'); + expect(format(ISODATE, 32, { leap1900: false })).toBe('1900-01-31'); + expect(format(ISODATE, 31, { leap1900: false })).toBe('1900-01-30'); + expect(format(ISODATE, 30, { leap1900: false })).toBe('1900-01-29'); + expect(format(ISODATE, 29, { leap1900: false })).toBe('1900-01-28'); + expect(format(ISODATE, 28, { leap1900: false })).toBe('1900-01-27'); + expect(format(ISODATE, 27, { leap1900: false })).toBe('1900-01-26'); + expect(format(ISODATE, 26, { leap1900: false })).toBe('1900-01-25'); + expect(format(ISODATE, 25, { leap1900: false })).toBe('1900-01-24'); + expect(format(ISODATE, 24, { leap1900: false })).toBe('1900-01-23'); + expect(format(ISODATE, 23, { leap1900: false })).toBe('1900-01-22'); + expect(format(ISODATE, 22, { leap1900: false })).toBe('1900-01-21'); + expect(format(ISODATE, 21, { leap1900: false })).toBe('1900-01-20'); + expect(format(ISODATE, 20, { leap1900: false })).toBe('1900-01-19'); + expect(format(ISODATE, 19, { leap1900: false })).toBe('1900-01-18'); + expect(format(ISODATE, 18, { leap1900: false })).toBe('1900-01-17'); + expect(format(ISODATE, 17, { leap1900: false })).toBe('1900-01-16'); + expect(format(ISODATE, 16, { leap1900: false })).toBe('1900-01-15'); + expect(format(ISODATE, 15, { leap1900: false })).toBe('1900-01-14'); + expect(format(ISODATE, 14, { leap1900: false })).toBe('1900-01-13'); + expect(format(ISODATE, 13, { leap1900: false })).toBe('1900-01-12'); + expect(format(ISODATE, 12, { leap1900: false })).toBe('1900-01-11'); + expect(format(ISODATE, 11, { leap1900: false })).toBe('1900-01-10'); + expect(format(ISODATE, 10, { leap1900: false })).toBe('1900-01-09'); + expect(format(ISODATE, 9, { leap1900: false })).toBe('1900-01-08'); + expect(format(ISODATE, 8, { leap1900: false })).toBe('1900-01-07'); + expect(format(ISODATE, 7, { leap1900: false })).toBe('1900-01-06'); + expect(format(ISODATE, 6, { leap1900: false })).toBe('1900-01-05'); + expect(format(ISODATE, 5, { leap1900: false })).toBe('1900-01-04'); + expect(format(ISODATE, 4, { leap1900: false })).toBe('1900-01-03'); + expect(format(ISODATE, 3, { leap1900: false })).toBe('1900-01-02'); + expect(format(ISODATE, 2, { leap1900: false })).toBe('1900-01-01'); + expect(format(ISODATE, 1, { leap1900: false })).toBe('1899-12-31'); + expect(format(ISODATE, 0, { leap1900: false })).toBe('1899-12-30'); }); diff --git a/test/error.spec.ts b/test/error.spec.ts index 321416f..ee13306 100644 --- a/test/error.spec.ts +++ b/test/error.spec.ts @@ -1,289 +1,284 @@ -import { isDateFormat, isPercentFormat, isTextFormat } from '../lib/index.js'; -import test from './utils.js'; +import { expect, test } from 'vitest'; +import { format, isDateFormat, isPercentFormat, isTextFormat } from '../lib/index.js'; const excelOpts = { dateSpanLarge: false, dateErrorNumber: false }; -test('Various format restrictions', t => { +test('Various format restrictions', () => { // no more than 4 sections - t.formatInvalid('a;b;c;d;'); - t.formatInvalid('#;#;#;#;#'); + expect(() => format('a;b;c;d;', '')).toThrow(); + expect(() => format('#;#;#;#;#', '')).toThrow(); // no more than 2 conditional sections - t.formatInvalid('[<-2]a;[<-1]b;[>2]c;d;'); + expect(() => format('[<-2]a;[<-1]b;[>2]c;d;', '')).toThrow(); // can't mix dates and numbers (within a segment) - t.formatInvalid('y 0'); - t.formatInvalid('yyyy 0'); - t.formatInvalid('m 0'); - t.formatInvalid('mmmm 0'); - t.formatInvalid('d 0'); - t.formatInvalid('dddd 0'); - t.formatInvalid('s 0'); - t.formatInvalid('h 0'); - t.formatInvalid('AM/PM 0'); - t.formatInvalid('[h] 0'); - t.formatInvalid('[m] 0'); - t.formatInvalid('[s] 0'); - t.formatInvalid('y #'); - t.formatInvalid('yyyy #'); - t.formatInvalid('m #'); - t.formatInvalid('mmmm #'); - t.formatInvalid('d #'); - t.formatInvalid('dddd #'); - t.formatInvalid('s #'); - t.formatInvalid('h #'); - t.formatInvalid('AM/PM #'); - t.formatInvalid('[h] #'); - t.formatInvalid('[m] #'); - t.formatInvalid('[s] #'); - t.formatInvalid('y ?'); - t.formatInvalid('yyyy ?'); - t.formatInvalid('m ?'); - t.formatInvalid('mmmm ?'); - t.formatInvalid('d ?'); - t.formatInvalid('dddd ?'); - t.formatInvalid('s ?'); - t.formatInvalid('h ?'); - t.formatInvalid('AM/PM ?'); - t.formatInvalid('[h] ?'); - t.formatInvalid('[m] ?'); - t.formatInvalid('[s] ?'); + expect(() => format('y 0', '')).toThrow(); + expect(() => format('yyyy 0', '')).toThrow(); + expect(() => format('m 0', '')).toThrow(); + expect(() => format('mmmm 0', '')).toThrow(); + expect(() => format('d 0', '')).toThrow(); + expect(() => format('dddd 0', '')).toThrow(); + expect(() => format('s 0', '')).toThrow(); + expect(() => format('h 0', '')).toThrow(); + expect(() => format('AM/PM 0', '')).toThrow(); + expect(() => format('[h] 0', '')).toThrow(); + expect(() => format('[m] 0', '')).toThrow(); + expect(() => format('[s] 0', '')).toThrow(); + expect(() => format('y #', '')).toThrow(); + expect(() => format('yyyy #', '')).toThrow(); + expect(() => format('m #', '')).toThrow(); + expect(() => format('mmmm #', '')).toThrow(); + expect(() => format('d #', '')).toThrow(); + expect(() => format('dddd #', '')).toThrow(); + expect(() => format('s #', '')).toThrow(); + expect(() => format('h #', '')).toThrow(); + expect(() => format('AM/PM #', '')).toThrow(); + expect(() => format('[h] #', '')).toThrow(); + expect(() => format('[m] #', '')).toThrow(); + expect(() => format('[s] #', '')).toThrow(); + expect(() => format('y ?', '')).toThrow(); + expect(() => format('yyyy ?', '')).toThrow(); + expect(() => format('m ?', '')).toThrow(); + expect(() => format('mmmm ?', '')).toThrow(); + expect(() => format('d ?', '')).toThrow(); + expect(() => format('dddd ?', '')).toThrow(); + expect(() => format('s ?', '')).toThrow(); + expect(() => format('h ?', '')).toThrow(); + expect(() => format('AM/PM ?', '')).toThrow(); + expect(() => format('[h] ?', '')).toThrow(); + expect(() => format('[m] ?', '')).toThrow(); + expect(() => format('[s] ?', '')).toThrow(); - t.formatInvalid('d .#'); - t.formatInvalid('mm%'); - t.formatInvalid('mm@'); + expect(() => format('d .#', '')).toThrow(); + expect(() => format('mm%', '')).toThrow(); + expect(() => format('mm@', '')).toThrow(); // no out of bounds dates - t.format('dddd, dd. mmmm yyy', -1, '######', excelOpts); - t.format('dddd, dd. mmmm yyy', 2958470, '######', excelOpts); + expect(format('dddd, dd. mmmm yyy', -1, excelOpts)).toBe('######'); + expect(format('dddd, dd. mmmm yyy', 2958470, excelOpts)).toBe('######'); // isDate should not throw on malformed input - t.equal(isDateFormat('dddd, dd. mmmm yyy'), true, "isDateFormat('dddd, dd. mmmm yyy')"); - t.equal(isDateFormat('0.0M'), false, "isDateFormat('0.0M')"); + expect(isDateFormat('dddd, dd. mmmm yyy'), "isDateFormat('dddd, dd. mmmm yyy')").toBe(true); + expect(isDateFormat('0.0M'), "isDateFormat('0.0M')").toBe(false); // utility functions exist and work on error formatters - t.equal(isDateFormat('y 0'), false, "isDateFormat('y 0')"); - t.equal(isPercentFormat('y 0'), false, "isPercentFormat('y 0')"); - t.equal(isTextFormat('y 0'), false, "isTextFormat('y 0')"); - - t.end(); + expect(isDateFormat('y 0'), "isDateFormat('y 0')").toBe(false); + expect(isPercentFormat('y 0'), "isPercentFormat('y 0')").toBe(false); + expect(isTextFormat('y 0'), "isTextFormat('y 0')").toBe(false); }); -test('Single characters', t => { - t.format(' ', 1, ' '); - t.format('!', 1, '!'); - t.formatInvalid('"'); - t.format('#', 1, '1'); - t.format('$', 1, '$'); - t.format('%', 1, '%'); - t.format('&', 1, '&'); - t.format('\'', 1, '\''); - t.format('(', 1, '('); - t.format(')', 1, ')'); - t.formatInvalid('*'); - t.format('+', 1, '+'); - t.format(',', 1, ','); - t.format('-', 1, '-'); - t.format('.', 1, '.'); +test('Single characters', () => { + expect(format(' ', 1)).toBe(' '); + expect(format('!', 1)).toBe('!'); + expect(() => format('"', '')).toThrow(); + expect(format('#', 1)).toBe('1'); + expect(format('$', 1)).toBe('$'); + expect(format('%', 1)).toBe('%'); + expect(format('&', 1)).toBe('&'); + expect(format('\'', 1)).toBe('\''); + expect(format('(', 1)).toBe('('); + expect(format(')', 1)).toBe(')'); + expect(() => format('*', '')).toThrow(); + expect(format('+', 1)).toBe('+'); + expect(format(',', 1)).toBe(','); + expect(format('-', 1)).toBe('-'); + expect(format('.', 1)).toBe('.'); // slash is allowed in date formats - t.format('d/', 1, '1/'); + expect(format('d/', 1)).toBe('1/'); // slash otherwise means vulgar fractions - t.format('0/0', 0, '0/1'); - t.format('0/0', 1, '1/1'); - t.formatInvalid('0/'); - t.formatInvalid('/0'); - t.formatInvalid('/'); - t.format('0', 1, '1'); - t.format('1', 1, '1'); - t.format('2', 1, '2'); - t.format('3', 1, '3'); - t.format('4', 1, '4'); - t.format('5', 1, '5'); - t.format('6', 1, '6'); - t.format('7', 1, '7'); - t.format('8', 1, '8'); - t.format('9', 1, '9'); - t.format(':', 1, ':'); - t.format(';', 1, ''); - t.format('<', 1, '<'); - t.format('=', 1, '='); - t.format('>', 1, '>'); - t.format('?', 1, '1'); - t.format('@', 1, '1'); - t.format('A', 1, 'A'); + expect(format('0/0', 0)).toBe('0/1'); + expect(format('0/0', 1)).toBe('1/1'); + expect(() => format('0/', '')).toThrow(); + expect(() => format('/0', '')).toThrow(); + expect(() => format('/', '')).toThrow(); + expect(format('0', 1)).toBe('1'); + expect(format('1', 1)).toBe('1'); + expect(format('2', 1)).toBe('2'); + expect(format('3', 1)).toBe('3'); + expect(format('4', 1)).toBe('4'); + expect(format('5', 1)).toBe('5'); + expect(format('6', 1)).toBe('6'); + expect(format('7', 1)).toBe('7'); + expect(format('8', 1)).toBe('8'); + expect(format('9', 1)).toBe('9'); + expect(format(':', 1)).toBe(':'); + expect(format(';', 1)).toBe(''); + expect(format('<', 1)).toBe('<'); + expect(format('=', 1)).toBe('='); + expect(format('>', 1)).toBe('>'); + expect(format('?', 1)).toBe('1'); + expect(format('@', 1)).toBe('1'); + expect(format('A', 1)).toBe('A'); // B is not allowed at the end of the pattern - t.formatInvalid('B'); - t.format('B ', 1, '43 '); - t.format('B;', 1, '43'); - t.format('C', 1, 'C'); - t.format('D', 1, '1'); + expect(() => format('B', '')).toThrow(); + expect(format('B ', 1)).toBe('43 '); + expect(format('B;', 1)).toBe('43'); + expect(format('C', 1)).toBe('C'); + expect(format('D', 1)).toBe('1'); // E is stricter than e, for whatever reason (see E tests below) - t.formatInvalid('E'); - t.format('F', 1, 'F'); - t.format('G', 1, ''); - t.format('H', 1, '0'); - t.format('I', 1, 'I'); - t.format('J', 1, 'J'); - t.format('K', 1, 'K'); - t.format('L', 1, 'L'); - t.format('M', 1, '1'); - t.formatInvalid('N'); - t.format('O', 1, 'O'); - t.format('P', 1, 'P'); - t.format('Q', 1, 'Q'); - t.format('R', 1, 'R'); - t.format('S', 1, '0'); - t.format('T', 1, 'T'); - t.format('U', 1, 'U'); - t.format('V', 1, 'V'); - t.format('W', 1, 'W'); - t.format('X', 1, 'X'); - t.format('Y', 1, '00'); - t.format('Z', 1, 'Z'); - t.formatInvalid('['); - t.formatInvalid('\\'); - t.format(']', 1, ']'); - t.format('^', 1, '^'); - t.formatInvalid('_'); - t.format('`', 1, '`'); - t.format('a', 1, 'a'); - t.format('b', 1, '43'); - t.format('c', 1, 'c'); - t.format('d', 1, '1'); - t.format('e', 1, '1900'); - t.format('f', 1, 'f'); - t.format('g', 1, ''); - t.format('h', 1, '0'); - t.format('i', 1, 'i'); - t.format('j', 1, 'j'); - t.format('k', 1, 'k'); - t.format('l', 1, 'l'); - t.format('m', 1, '1'); - t.formatInvalid('n'); - t.format('o', 1, 'o'); - t.format('p', 1, 'p'); - t.format('q', 1, 'q'); - t.format('r', 1, 'r'); - t.format('s', 1, '0'); - t.format('t', 1, 't'); - t.format('u', 1, 'u'); - t.format('v', 1, 'v'); - t.format('w', 1, 'w'); - t.format('x', 1, 'x'); - t.format('y', 1, '00'); - t.format('z', 1, 'z'); - t.format('{', 1, '{'); - t.format('|', 1, '|'); - t.format('}', 1, '}'); - t.format('~', 1, '~'); - t.format('', 1, ''); - t.format('Ä', 1, 'Ä'); - t.format('Å', 1, 'Å'); - t.format('Ç', 1, 'Ç'); - t.formatInvalid('É'); - t.formatInvalid('Ñ'); - t.format('Ö', 1, 'Ö'); - t.format('Ü', 1, 'Ü'); - t.format('á', 1, 'á'); - t.format('à', 1, 'à'); - t.format('â', 1, 'â'); - t.format('ä', 1, 'ä'); - t.format('ã', 1, 'ã'); - t.format('å', 1, 'å'); - t.format('ç', 1, 'ç'); - t.formatInvalid('é'); - t.formatInvalid('è'); - t.formatInvalid('ê'); - t.formatInvalid('ë'); - t.format('í', 1, 'í'); - t.format('ì', 1, 'ì'); - t.format('î', 1, 'î'); - t.format('ï', 1, 'ï'); - t.formatInvalid('ñ'); - t.format('ó', 1, 'ó'); - t.format('ò', 1, 'ò'); - t.format('ô', 1, 'ô'); - t.format('ö', 1, 'ö'); - t.format('õ', 1, 'õ'); - t.format('ú', 1, 'ú'); - t.format('ù', 1, 'ù'); - t.format('û', 1, 'û'); - t.format('ü', 1, 'ü'); - t.format('†', 1, '†'); - t.format('°', 1, '°'); - t.format('¢', 1, '¢'); - t.format('£', 1, '£'); - t.format('§', 1, '§'); - t.format('•', 1, '•'); - t.format('¶', 1, '¶'); - t.format('ß', 1, 'ß'); - t.format('®', 1, '®'); - t.format('©', 1, '©'); - t.format('™', 1, '™'); - t.format('´', 1, '´'); - t.format('¨', 1, '¨'); - t.format('≠', 1, '≠'); - t.format('Æ', 1, 'Æ'); - t.format('Ø', 1, 'Ø'); - t.format('∞', 1, '∞'); - t.format('±', 1, '±'); - t.format('≤', 1, '≤'); - t.format('≥', 1, '≥'); - t.format('¥', 1, '¥'); - t.format('µ', 1, 'µ'); - t.format('∂', 1, '∂'); - t.format('∑', 1, '∑'); - t.format('∏', 1, '∏'); - t.format('π', 1, 'π'); - t.format('∫', 1, '∫'); - t.format('ª', 1, 'ª'); - t.format('º', 1, 'º'); - t.format('Ω', 1, 'Ω'); - t.format('æ', 1, 'æ'); - t.format('ø', 1, 'ø'); - t.format('¿', 1, '¿'); - t.format('¡', 1, '¡'); - t.format('¬', 1, '¬'); - t.end(); + expect(() => format('E', '')).toThrow(); + expect(format('F', 1)).toBe('F'); + expect(format('G', 1)).toBe(''); + expect(format('H', 1)).toBe('0'); + expect(format('I', 1)).toBe('I'); + expect(format('J', 1)).toBe('J'); + expect(format('K', 1)).toBe('K'); + expect(format('L', 1)).toBe('L'); + expect(format('M', 1)).toBe('1'); + expect(() => format('N', '')).toThrow(); + expect(format('O', 1)).toBe('O'); + expect(format('P', 1)).toBe('P'); + expect(format('Q', 1)).toBe('Q'); + expect(format('R', 1)).toBe('R'); + expect(format('S', 1)).toBe('0'); + expect(format('T', 1)).toBe('T'); + expect(format('U', 1)).toBe('U'); + expect(format('V', 1)).toBe('V'); + expect(format('W', 1)).toBe('W'); + expect(format('X', 1)).toBe('X'); + expect(format('Y', 1)).toBe('00'); + expect(format('Z', 1)).toBe('Z'); + expect(() => format('[', '')).toThrow(); + expect(() => format('\\', '')).toThrow(); + expect(format(']', 1)).toBe(']'); + expect(format('^', 1)).toBe('^'); + expect(() => format('_', '')).toThrow(); + expect(format('`', 1)).toBe('`'); + expect(format('a', 1)).toBe('a'); + expect(format('b', 1)).toBe('43'); + expect(format('c', 1)).toBe('c'); + expect(format('d', 1)).toBe('1'); + expect(format('e', 1)).toBe('1900'); + expect(format('f', 1)).toBe('f'); + expect(format('g', 1)).toBe(''); + expect(format('h', 1)).toBe('0'); + expect(format('i', 1)).toBe('i'); + expect(format('j', 1)).toBe('j'); + expect(format('k', 1)).toBe('k'); + expect(format('l', 1)).toBe('l'); + expect(format('m', 1)).toBe('1'); + expect(() => format('n', '')).toThrow(); + expect(format('o', 1)).toBe('o'); + expect(format('p', 1)).toBe('p'); + expect(format('q', 1)).toBe('q'); + expect(format('r', 1)).toBe('r'); + expect(format('s', 1)).toBe('0'); + expect(format('t', 1)).toBe('t'); + expect(format('u', 1)).toBe('u'); + expect(format('v', 1)).toBe('v'); + expect(format('w', 1)).toBe('w'); + expect(format('x', 1)).toBe('x'); + expect(format('y', 1)).toBe('00'); + expect(format('z', 1)).toBe('z'); + expect(format('{', 1)).toBe('{'); + expect(format('|', 1)).toBe('|'); + expect(format('}', 1)).toBe('}'); + expect(format('~', 1)).toBe('~'); + expect(format('\x7f', 1)).toBe('\x7f'); + expect(format('Ä', 1)).toBe('Ä'); + expect(format('Å', 1)).toBe('Å'); + expect(format('Ç', 1)).toBe('Ç'); + expect(() => format('É', '')).toThrow(); + expect(() => format('Ñ', '')).toThrow(); + expect(format('Ö', 1)).toBe('Ö'); + expect(format('Ü', 1)).toBe('Ü'); + expect(format('á', 1)).toBe('á'); + expect(format('à', 1)).toBe('à'); + expect(format('â', 1)).toBe('â'); + expect(format('ä', 1)).toBe('ä'); + expect(format('ã', 1)).toBe('ã'); + expect(format('å', 1)).toBe('å'); + expect(format('ç', 1)).toBe('ç'); + expect(() => format('é', '')).toThrow(); + expect(() => format('è', '')).toThrow(); + expect(() => format('ê', '')).toThrow(); + expect(() => format('ë', '')).toThrow(); + expect(format('í', 1)).toBe('í'); + expect(format('ì', 1)).toBe('ì'); + expect(format('î', 1)).toBe('î'); + expect(format('ï', 1)).toBe('ï'); + expect(() => format('ñ', '')).toThrow(); + expect(format('ó', 1)).toBe('ó'); + expect(format('ò', 1)).toBe('ò'); + expect(format('ô', 1)).toBe('ô'); + expect(format('ö', 1)).toBe('ö'); + expect(format('õ', 1)).toBe('õ'); + expect(format('ú', 1)).toBe('ú'); + expect(format('ù', 1)).toBe('ù'); + expect(format('û', 1)).toBe('û'); + expect(format('ü', 1)).toBe('ü'); + expect(format('†', 1)).toBe('†'); + expect(format('°', 1)).toBe('°'); + expect(format('¢', 1)).toBe('¢'); + expect(format('£', 1)).toBe('£'); + expect(format('§', 1)).toBe('§'); + expect(format('•', 1)).toBe('•'); + expect(format('¶', 1)).toBe('¶'); + expect(format('ß', 1)).toBe('ß'); + expect(format('®', 1)).toBe('®'); + expect(format('©', 1)).toBe('©'); + expect(format('™', 1)).toBe('™'); + expect(format('´', 1)).toBe('´'); + expect(format('¨', 1)).toBe('¨'); + expect(format('≠', 1)).toBe('≠'); + expect(format('Æ', 1)).toBe('Æ'); + expect(format('Ø', 1)).toBe('Ø'); + expect(format('∞', 1)).toBe('∞'); + expect(format('±', 1)).toBe('±'); + expect(format('≤', 1)).toBe('≤'); + expect(format('≥', 1)).toBe('≥'); + expect(format('¥', 1)).toBe('¥'); + expect(format('µ', 1)).toBe('µ'); + expect(format('∂', 1)).toBe('∂'); + expect(format('∑', 1)).toBe('∑'); + expect(format('∏', 1)).toBe('∏'); + expect(format('π', 1)).toBe('π'); + expect(format('∫', 1)).toBe('∫'); + expect(format('ª', 1)).toBe('ª'); + expect(format('º', 1)).toBe('º'); + expect(format('Ω', 1)).toBe('Ω'); + expect(format('æ', 1)).toBe('æ'); + expect(format('ø', 1)).toBe('ø'); + expect(format('¿', 1)).toBe('¿'); + expect(format('¡', 1)).toBe('¡'); + expect(format('¬', 1)).toBe('¬'); }); -test('The "E" and "e" operators', t => { - t.format('e', 1, '1900'); - t.formatInvalid('0e'); - t.formatInvalid('e0'); - t.formatInvalid('0e0'); - t.format('e+', 1, '1900+'); // Sheets does not allow this - t.formatInvalid('0e+'); - t.formatInvalid('e+0'); - t.formatInvalid('0e+0'); // Sheets emits "1e+0" - t.format('e-', 1, '1900-'); // Sheets emits "1e+0" - t.formatInvalid('0e-'); - t.formatInvalid('e-0'); - t.formatInvalid('0e-0'); // Sheets emits "1e0" - t.formatInvalid('E'); - t.formatInvalid('0E'); - t.formatInvalid('E0'); - t.formatInvalid('0E0'); - t.formatInvalid('E+'); - t.formatInvalid('0E+'); - t.formatInvalid('E+0'); - t.format('0E+0', 1, '1E+0'); - t.formatInvalid('E-'); - t.formatInvalid('0E-'); - t.formatInvalid('E-0'); - t.format('0E-0', 1, '1E0'); - - t.formatInvalid('0 e 0'); - t.formatInvalid('0 e + 0'); - t.formatInvalid('0 e +0'); - t.formatInvalid('0 e+ 0'); // Sheets emits "1 e +4" +test('The "E" and "e" operators', () => { + expect(format('e', 1)).toBe('1900'); + expect(() => format('0e', '')).toThrow(); + expect(() => format('e0', '')).toThrow(); + expect(() => format('0e0', '')).toThrow(); + expect(format('e+', 1)).toBe('1900+'); // Sheets does not allow this + expect(() => format('0e+', '')).toThrow(); + expect(() => format('e+0', '')).toThrow(); + expect(() => format('0e+0', '')).toThrow(); // Sheets emits "1e+0" + expect(format('e-', 1)).toBe('1900-'); // Sheets emits "1e+0" + expect(() => format('0e-', '')).toThrow(); + expect(() => format('e-0', '')).toThrow(); + expect(() => format('0e-0', '')).toThrow(); // Sheets emits "1e0" + expect(() => format('E', '')).toThrow(); + expect(() => format('0E', '')).toThrow(); + expect(() => format('E0', '')).toThrow(); + expect(() => format('0E0', '')).toThrow(); + expect(() => format('E+', '')).toThrow(); + expect(() => format('0E+', '')).toThrow(); + expect(() => format('E+0', '')).toThrow(); + expect(format('0E+0', 1)).toBe('1E+0'); + expect(() => format('E-', '')).toThrow(); + expect(() => format('0E-', '')).toThrow(); + expect(() => format('E-0', '')).toThrow(); + expect(format('0E-0', 1)).toBe('1E0'); - t.formatInvalid('0 E 0'); - t.formatInvalid('0 E + 0'); - t.formatInvalid('0 E +0'); - t.format('0 E+ 0', 1, '1 E +0'); + expect(() => format('0 e 0', '')).toThrow(); + expect(() => format('0 e + 0', '')).toThrow(); + expect(() => format('0 e +0', '')).toThrow(); + expect(() => format('0 e+ 0', '')).toThrow(); // Sheets emits "1 e +4" - t.format('e-m', 1, '1900-1'); + expect(() => format('0 E 0', '')).toThrow(); + expect(() => format('0 E + 0', '')).toThrow(); + expect(() => format('0 E +0', '')).toThrow(); + expect(format('0 E+ 0', 1)).toBe('1 E +0'); - t.end(); + expect(format('e-m', 1)).toBe('1900-1'); }); diff --git a/test/expformat.spec.ts b/test/expformat.spec.ts index 94f5486..cfc7216 100644 --- a/test/expformat.spec.ts +++ b/test/expformat.spec.ts @@ -1,402 +1,396 @@ -import test from './utils.js'; +import { expect, test } from 'vitest'; +import { format } from '../lib/index.js'; -test('Exponent detection', t => { - t.format('0E+00', 95000000, '1E+08'); - t.format('0E+00', 96000000, '1E+08'); - t.format('0E+00', 97000000, '1E+08'); - t.format('0E+00', 98000000, '1E+08'); - t.format('0E+00', 99000000, '1E+08'); - t.format('0E+00', 100000000, '1E+08'); - t.format('0E+00', 110000000, '1E+08'); - t.format('0E+00', 120000000, '1E+08'); - t.format('0E+00', 130000000, '1E+08'); - t.format('0E+00', 140000000, '1E+08'); - t.format('0E+00', 199999999, '2E+08'); - t.format('0E+00', 899999999, '9E+08'); - t.format('0E+00', 990000000, '1E+09'); - t.format('0E+00', 999000000, '1E+09'); - t.format('0E+00', 999900000, '1E+09'); - t.format('0E+00', 999990000, '1E+09'); - t.format('0.0E+00', 95000000, '9.5E+07'); - t.format('0.0E+00', 96000000, '9.6E+07'); - t.format('0.0E+00', 97000000, '9.7E+07'); - t.format('0.0E+00', 98000000, '9.8E+07'); - t.format('0.0E+00', 99000000, '9.9E+07'); - t.format('0.0E+00', 100000000, '1.0E+08'); - t.format('0.0E+00', 110000000, '1.1E+08'); - t.format('0.0E+00', 120000000, '1.2E+08'); - t.format('0.0E+00', 130000000, '1.3E+08'); - t.format('0.0E+00', 140000000, '1.4E+08'); - t.format('0.0E+00', 199999999, '2.0E+08'); - t.format('0.0E+00', 899999999, '9.0E+08'); - t.format('0.0E+00', 990000000, '9.9E+08'); - t.format('0.0E+00', 999000000, '1.0E+09'); - t.format('0.0E+00', 999900000, '1.0E+09'); - t.format('0.0E+00', 999990000, '1.0E+09'); - t.format('0.00E+00', 95000000, '9.50E+07'); - t.format('0.00E+00', 96000000, '9.60E+07'); - t.format('0.00E+00', 97000000, '9.70E+07'); - t.format('0.00E+00', 98000000, '9.80E+07'); - t.format('0.00E+00', 99000000, '9.90E+07'); - t.format('0.00E+00', 100000000, '1.00E+08'); - t.format('0.00E+00', 110000000, '1.10E+08'); - t.format('0.00E+00', 120000000, '1.20E+08'); - t.format('0.00E+00', 130000000, '1.30E+08'); - t.format('0.00E+00', 140000000, '1.40E+08'); - t.format('0.00E+00', 199999999, '2.00E+08'); - t.format('0.00E+00', 899999999, '9.00E+08'); - t.format('0.00E+00', 990000000, '9.90E+08'); - t.format('0.00E+00', 999000000, '9.99E+08'); - t.format('0.00E+00', 999900000, '1.00E+09'); - t.format('0.00E+00', 999990000, '1.00E+09'); - t.format('0.000E+00', 95000000, '9.500E+07'); - t.format('0.000E+00', 96000000, '9.600E+07'); - t.format('0.000E+00', 97000000, '9.700E+07'); - t.format('0.000E+00', 98000000, '9.800E+07'); - t.format('0.000E+00', 99000000, '9.900E+07'); - t.format('0.000E+00', 100000000, '1.000E+08'); - t.format('0.000E+00', 110000000, '1.100E+08'); - t.format('0.000E+00', 120000000, '1.200E+08'); - t.format('0.000E+00', 130000000, '1.300E+08'); - t.format('0.000E+00', 140000000, '1.400E+08'); - t.format('0.000E+00', 199999999, '2.000E+08'); - t.format('0.000E+00', 899999999, '9.000E+08'); - t.format('0.000E+00', 990000000, '9.900E+08'); - t.format('0.000E+00', 999000000, '9.990E+08'); - t.format('0.000E+00', 999900000, '9.999E+08'); - t.format('0.000E+00', 999990000, '1.000E+09'); - t.end(); +test('Exponent detection', () => { + expect(format('0E+00', 95000000)).toBe('1E+08'); + expect(format('0E+00', 96000000)).toBe('1E+08'); + expect(format('0E+00', 97000000)).toBe('1E+08'); + expect(format('0E+00', 98000000)).toBe('1E+08'); + expect(format('0E+00', 99000000)).toBe('1E+08'); + expect(format('0E+00', 100000000)).toBe('1E+08'); + expect(format('0E+00', 110000000)).toBe('1E+08'); + expect(format('0E+00', 120000000)).toBe('1E+08'); + expect(format('0E+00', 130000000)).toBe('1E+08'); + expect(format('0E+00', 140000000)).toBe('1E+08'); + expect(format('0E+00', 199999999)).toBe('2E+08'); + expect(format('0E+00', 899999999)).toBe('9E+08'); + expect(format('0E+00', 990000000)).toBe('1E+09'); + expect(format('0E+00', 999000000)).toBe('1E+09'); + expect(format('0E+00', 999900000)).toBe('1E+09'); + expect(format('0E+00', 999990000)).toBe('1E+09'); + expect(format('0.0E+00', 95000000)).toBe('9.5E+07'); + expect(format('0.0E+00', 96000000)).toBe('9.6E+07'); + expect(format('0.0E+00', 97000000)).toBe('9.7E+07'); + expect(format('0.0E+00', 98000000)).toBe('9.8E+07'); + expect(format('0.0E+00', 99000000)).toBe('9.9E+07'); + expect(format('0.0E+00', 100000000)).toBe('1.0E+08'); + expect(format('0.0E+00', 110000000)).toBe('1.1E+08'); + expect(format('0.0E+00', 120000000)).toBe('1.2E+08'); + expect(format('0.0E+00', 130000000)).toBe('1.3E+08'); + expect(format('0.0E+00', 140000000)).toBe('1.4E+08'); + expect(format('0.0E+00', 199999999)).toBe('2.0E+08'); + expect(format('0.0E+00', 899999999)).toBe('9.0E+08'); + expect(format('0.0E+00', 990000000)).toBe('9.9E+08'); + expect(format('0.0E+00', 999000000)).toBe('1.0E+09'); + expect(format('0.0E+00', 999900000)).toBe('1.0E+09'); + expect(format('0.0E+00', 999990000)).toBe('1.0E+09'); + expect(format('0.00E+00', 95000000)).toBe('9.50E+07'); + expect(format('0.00E+00', 96000000)).toBe('9.60E+07'); + expect(format('0.00E+00', 97000000)).toBe('9.70E+07'); + expect(format('0.00E+00', 98000000)).toBe('9.80E+07'); + expect(format('0.00E+00', 99000000)).toBe('9.90E+07'); + expect(format('0.00E+00', 100000000)).toBe('1.00E+08'); + expect(format('0.00E+00', 110000000)).toBe('1.10E+08'); + expect(format('0.00E+00', 120000000)).toBe('1.20E+08'); + expect(format('0.00E+00', 130000000)).toBe('1.30E+08'); + expect(format('0.00E+00', 140000000)).toBe('1.40E+08'); + expect(format('0.00E+00', 199999999)).toBe('2.00E+08'); + expect(format('0.00E+00', 899999999)).toBe('9.00E+08'); + expect(format('0.00E+00', 990000000)).toBe('9.90E+08'); + expect(format('0.00E+00', 999000000)).toBe('9.99E+08'); + expect(format('0.00E+00', 999900000)).toBe('1.00E+09'); + expect(format('0.00E+00', 999990000)).toBe('1.00E+09'); + expect(format('0.000E+00', 95000000)).toBe('9.500E+07'); + expect(format('0.000E+00', 96000000)).toBe('9.600E+07'); + expect(format('0.000E+00', 97000000)).toBe('9.700E+07'); + expect(format('0.000E+00', 98000000)).toBe('9.800E+07'); + expect(format('0.000E+00', 99000000)).toBe('9.900E+07'); + expect(format('0.000E+00', 100000000)).toBe('1.000E+08'); + expect(format('0.000E+00', 110000000)).toBe('1.100E+08'); + expect(format('0.000E+00', 120000000)).toBe('1.200E+08'); + expect(format('0.000E+00', 130000000)).toBe('1.300E+08'); + expect(format('0.000E+00', 140000000)).toBe('1.400E+08'); + expect(format('0.000E+00', 199999999)).toBe('2.000E+08'); + expect(format('0.000E+00', 899999999)).toBe('9.000E+08'); + expect(format('0.000E+00', 990000000)).toBe('9.900E+08'); + expect(format('0.000E+00', 999000000)).toBe('9.990E+08'); + expect(format('0.000E+00', 999900000)).toBe('9.999E+08'); + expect(format('0.000E+00', 999990000)).toBe('1.000E+09'); }); -test('Exponent detection', t => { - t.format('0.E+00', 9, '9.E+00'); - t.format('0.E+00', 9.49999, '9.E+00'); - t.format('0.E+00', 9.59999, '1.E+01'); - t.format('0.E+00', 9.69999, '1.E+01'); - t.format('0.E+00', 10, '1.E+01'); - t.format('0.E+00', 90, '9.E+01'); - t.format('0.E+00', 94.9999, '9.E+01'); - t.format('0.E+00', 95.9999, '1.E+02'); - t.format('0.E+00', 96.9999, '1.E+02'); - t.format('0.E+00', 100, '1.E+02'); - t.format('0.E+00', 900, '9.E+02'); - t.format('0.E+00', 949.999, '9.E+02'); - t.format('0.E+00', 959.999, '1.E+03'); - t.format('0.E+00', 969.999, '1.E+03'); - t.format('0.E+00', 1000, '1.E+03'); - t.format('0.E+00', 9000, '9.E+03'); - t.format('0.E+00', 9499.99, '9.E+03'); - t.format('0.E+00', 9599.99, '1.E+04'); - t.format('0.E+00', 9699.99, '1.E+04'); - t.format('0.E+00', 10000, '1.E+04'); - t.format('0.E+00', 90000, '9.E+04'); - t.format('0.E+00', 94999.9, '9.E+04'); - t.format('0.E+00', 95999.9, '1.E+05'); - t.format('0.E+00', 96999.9, '1.E+05'); - t.format('0.E+00', 100000, '1.E+05'); - t.format('0.0E+00', 9, '9.0E+00'); - t.format('0.0E+00', 9.49999, '9.5E+00'); - t.format('0.0E+00', 9.59999, '9.6E+00'); - t.format('0.0E+00', 9.69999, '9.7E+00'); - t.format('0.0E+00', 10, '1.0E+01'); - t.format('0.0E+00', 90, '9.0E+01'); - t.format('0.0E+00', 94.9999, '9.5E+01'); - t.format('0.0E+00', 95.9999, '9.6E+01'); - t.format('0.0E+00', 96.9999, '9.7E+01'); - t.format('0.0E+00', 100, '1.0E+02'); - t.format('0.0E+00', 900, '9.0E+02'); - t.format('0.0E+00', 949.999, '9.5E+02'); - t.format('0.0E+00', 959.999, '9.6E+02'); - t.format('0.0E+00', 969.999, '9.7E+02'); - t.format('0.0E+00', 1000, '1.0E+03'); - t.format('0.0E+00', 9000, '9.0E+03'); - t.format('0.0E+00', 9499.99, '9.5E+03'); - t.format('0.0E+00', 9599.99, '9.6E+03'); - t.format('0.0E+00', 9699.99, '9.7E+03'); - t.format('0.0E+00', 10000, '1.0E+04'); - t.format('0.0E+00', 90000, '9.0E+04'); - t.format('0.0E+00', 94999.9, '9.5E+04'); - t.format('0.0E+00', 95999.9, '9.6E+04'); - t.format('0.0E+00', 96999.9, '9.7E+04'); - t.format('0.0E+00', 100000, '1.0E+05'); - t.format('0.00E+00', 9, '9.00E+00'); - t.format('0.00E+00', 9.49999, '9.50E+00'); - t.format('0.00E+00', 9.59999, '9.60E+00'); - t.format('0.00E+00', 9.69999, '9.70E+00'); - t.format('0.00E+00', 10, '1.00E+01'); - t.format('0.00E+00', 90, '9.00E+01'); - t.format('0.00E+00', 94.9999, '9.50E+01'); - t.format('0.00E+00', 95.9999, '9.60E+01'); - t.format('0.00E+00', 96.9999, '9.70E+01'); - t.format('0.00E+00', 100, '1.00E+02'); - t.format('0.00E+00', 900, '9.00E+02'); - t.format('0.00E+00', 949.999, '9.50E+02'); - t.format('0.00E+00', 959.999, '9.60E+02'); - t.format('0.00E+00', 969.999, '9.70E+02'); - t.format('0.00E+00', 1000, '1.00E+03'); - t.format('0.00E+00', 9000, '9.00E+03'); - t.format('0.00E+00', 9499.99, '9.50E+03'); - t.format('0.00E+00', 9599.99, '9.60E+03'); - t.format('0.00E+00', 9699.99, '9.70E+03'); - t.format('0.00E+00', 10000, '1.00E+04'); - t.format('0.00E+00', 90000, '9.00E+04'); - t.format('0.00E+00', 94999.9, '9.50E+04'); - t.format('0.00E+00', 95999.9, '9.60E+04'); - t.format('0.00E+00', 96999.9, '9.70E+04'); - t.format('0.00E+00', 100000, '1.00E+05'); - t.format('00.E+00', 9, '09.E+00'); - t.format('00.E+00', 9.49999, '09.E+00'); - t.format('00.E+00', 9.59999, '10.E+00'); - t.format('00.E+00', 9.69999, '10.E+00'); - t.format('00.E+00', 10, '10.E+00'); - t.format('00.E+00', 90, '90.E+00'); - t.format('00.E+00', 94.9999, '95.E+00'); - t.format('00.E+00', 95.9999, '96.E+00'); - t.format('00.E+00', 96.9999, '97.E+00'); - t.format('00.E+00', 100, '01.E+02'); - t.format('00.E+00', 900, '09.E+02'); - t.format('00.E+00', 949.999, '09.E+02'); - t.format('00.E+00', 959.999, '10.E+02'); - t.format('00.E+00', 969.999, '10.E+02'); - t.format('00.E+00', 1000, '10.E+02'); - t.format('00.E+00', 9000, '90.E+02'); - t.format('00.E+00', 9499.99, '95.E+02'); - t.format('00.E+00', 9599.99, '96.E+02'); - t.format('00.E+00', 9699.99, '97.E+02'); - t.format('00.E+00', 10000, '01.E+04'); - t.format('00.E+00', 90000, '09.E+04'); - t.format('00.E+00', 94999.9, '09.E+04'); - t.format('00.E+00', 95999.9, '10.E+04'); - t.format('00.E+00', 96999.9, '10.E+04'); - t.format('00.E+00', 100000, '10.E+04'); - t.format('00.0E+00', 9, '09.0E+00'); - t.format('00.0E+00', 9.49999, '09.5E+00'); - t.format('00.0E+00', 9.59999, '09.6E+00'); - t.format('00.0E+00', 9.69999, '09.7E+00'); - t.format('00.0E+00', 10, '10.0E+00'); - t.format('00.0E+00', 90, '90.0E+00'); - t.format('00.0E+00', 94.9999, '95.0E+00'); - t.format('00.0E+00', 95.9999, '96.0E+00'); - t.format('00.0E+00', 96.9999, '97.0E+00'); - t.format('00.0E+00', 100, '01.0E+02'); - t.format('00.0E+00', 900, '09.0E+02'); - t.format('00.0E+00', 949.999, '09.5E+02'); - t.format('00.0E+00', 959.999, '09.6E+02'); - t.format('00.0E+00', 969.999, '09.7E+02'); - t.format('00.0E+00', 1000, '10.0E+02'); - t.format('00.0E+00', 9000, '90.0E+02'); - t.format('00.0E+00', 9499.99, '95.0E+02'); - t.format('00.0E+00', 9599.99, '96.0E+02'); - t.format('00.0E+00', 9699.99, '97.0E+02'); - t.format('00.0E+00', 10000, '01.0E+04'); - t.format('00.0E+00', 90000, '09.0E+04'); - t.format('00.0E+00', 94999.9, '09.5E+04'); - t.format('00.0E+00', 95999.9, '09.6E+04'); - t.format('00.0E+00', 96999.9, '09.7E+04'); - t.format('00.0E+00', 100000, '10.0E+04'); - t.format('00.00E+00', 9, '09.00E+00'); - t.format('00.00E+00', 9.49999, '09.50E+00'); - t.format('00.00E+00', 9.59999, '09.60E+00'); - t.format('00.00E+00', 9.69999, '09.70E+00'); - t.format('00.00E+00', 10, '10.00E+00'); - t.format('00.00E+00', 90, '90.00E+00'); - t.format('00.00E+00', 94.9999, '95.00E+00'); - t.format('00.00E+00', 95.9999, '96.00E+00'); - t.format('00.00E+00', 96.9999, '97.00E+00'); - t.format('00.00E+00', 100, '01.00E+02'); - t.format('00.00E+00', 900, '09.00E+02'); - t.format('00.00E+00', 949.999, '09.50E+02'); - t.format('00.00E+00', 959.999, '09.60E+02'); - t.format('00.00E+00', 969.999, '09.70E+02'); - t.format('00.00E+00', 1000, '10.00E+02'); - t.format('00.00E+00', 9000, '90.00E+02'); - t.format('00.00E+00', 9499.99, '95.00E+02'); - t.format('00.00E+00', 9599.99, '96.00E+02'); - t.format('00.00E+00', 9699.99, '97.00E+02'); - t.format('00.00E+00', 10000, '01.00E+04'); - t.format('00.00E+00', 90000, '09.00E+04'); - t.format('00.00E+00', 94999.9, '09.50E+04'); - t.format('00.00E+00', 95999.9, '09.60E+04'); - t.format('00.00E+00', 96999.9, '09.70E+04'); - t.format('00.00E+00', 100000, '10.00E+04'); - t.format('000.E+00', 9, '009.E+00'); - t.format('000.E+00', 9.49999, '009.E+00'); - t.format('000.E+00', 9.59999, '010.E+00'); - t.format('000.E+00', 9.69999, '010.E+00'); - t.format('000.E+00', 10, '010.E+00'); - t.format('000.E+00', 90, '090.E+00'); - t.format('000.E+00', 94.9999, '095.E+00'); - t.format('000.E+00', 95.9999, '096.E+00'); - t.format('000.E+00', 96.9999, '097.E+00'); - t.format('000.E+00', 100, '100.E+00'); - t.format('000.E+00', 900, '900.E+00'); - t.format('000.E+00', 949.999, '950.E+00'); - t.format('000.E+00', 959.999, '960.E+00'); - t.format('000.E+00', 969.999, '970.E+00'); - t.format('000.E+00', 1000, '001.E+03'); - t.format('000.E+00', 9000, '009.E+03'); - t.format('000.E+00', 9499.99, '009.E+03'); - t.format('000.E+00', 9599.99, '010.E+03'); - t.format('000.E+00', 9699.99, '010.E+03'); - t.format('000.E+00', 10000, '010.E+03'); - t.format('000.E+00', 90000, '090.E+03'); - t.format('000.E+00', 94999.9, '095.E+03'); - t.format('000.E+00', 95999.9, '096.E+03'); - t.format('000.E+00', 96999.9, '097.E+03'); - t.format('000.E+00', 100000, '100.E+03'); - t.format('000.0E+00', 9, '009.0E+00'); - t.format('000.0E+00', 9.49999, '009.5E+00'); - t.format('000.0E+00', 9.59999, '009.6E+00'); - t.format('000.0E+00', 9.69999, '009.7E+00'); - t.format('000.0E+00', 10, '010.0E+00'); - t.format('000.0E+00', 90, '090.0E+00'); - t.format('000.0E+00', 94.9999, '095.0E+00'); - t.format('000.0E+00', 95.9999, '096.0E+00'); - t.format('000.0E+00', 96.9999, '097.0E+00'); - t.format('000.0E+00', 100, '100.0E+00'); - t.format('000.0E+00', 900, '900.0E+00'); - t.format('000.0E+00', 949.999, '950.0E+00'); - t.format('000.0E+00', 959.999, '960.0E+00'); - t.format('000.0E+00', 969.999, '970.0E+00'); - t.format('000.0E+00', 1000, '001.0E+03'); - t.format('000.0E+00', 9000, '009.0E+03'); - t.format('000.0E+00', 9499.99, '009.5E+03'); - t.format('000.0E+00', 9599.99, '009.6E+03'); - t.format('000.0E+00', 9699.99, '009.7E+03'); - t.format('000.0E+00', 10000, '010.0E+03'); - t.format('000.0E+00', 90000, '090.0E+03'); - t.format('000.0E+00', 94999.9, '095.0E+03'); - t.format('000.0E+00', 95999.9, '096.0E+03'); - t.format('000.0E+00', 96999.9, '097.0E+03'); - t.format('000.0E+00', 100000, '100.0E+03'); - t.format('000.00E+00', 9, '009.00E+00'); - t.format('000.00E+00', 9.49999, '009.50E+00'); - t.format('000.00E+00', 9.59999, '009.60E+00'); - t.format('000.00E+00', 9.69999, '009.70E+00'); - t.format('000.00E+00', 10, '010.00E+00'); - t.format('000.00E+00', 90, '090.00E+00'); - t.format('000.00E+00', 94.9999, '095.00E+00'); - t.format('000.00E+00', 95.9999, '096.00E+00'); - t.format('000.00E+00', 96.9999, '097.00E+00'); - t.format('000.00E+00', 100, '100.00E+00'); - t.format('000.00E+00', 900, '900.00E+00'); - t.format('000.00E+00', 949.999, '950.00E+00'); - t.format('000.00E+00', 959.999, '960.00E+00'); - t.format('000.00E+00', 969.999, '970.00E+00'); - t.format('000.00E+00', 1000, '001.00E+03'); - t.format('000.00E+00', 9000, '009.00E+03'); - t.format('000.00E+00', 9499.99, '009.50E+03'); - t.format('000.00E+00', 9599.99, '009.60E+03'); - t.format('000.00E+00', 9699.99, '009.70E+03'); - t.format('000.00E+00', 10000, '010.00E+03'); - t.format('000.00E+00', 90000, '090.00E+03'); - t.format('000.00E+00', 94999.9, '095.00E+03'); - t.format('000.00E+00', 95999.9, '096.00E+03'); - t.format('000.00E+00', 96999.9, '097.00E+03'); - t.format('000.00E+00', 100000, '100.00E+03'); - - t.end(); +test('Exponent detection', () => { + expect(format('0.E+00', 9)).toBe('9.E+00'); + expect(format('0.E+00', 9.49999)).toBe('9.E+00'); + expect(format('0.E+00', 9.59999)).toBe('1.E+01'); + expect(format('0.E+00', 9.69999)).toBe('1.E+01'); + expect(format('0.E+00', 10)).toBe('1.E+01'); + expect(format('0.E+00', 90)).toBe('9.E+01'); + expect(format('0.E+00', 94.9999)).toBe('9.E+01'); + expect(format('0.E+00', 95.9999)).toBe('1.E+02'); + expect(format('0.E+00', 96.9999)).toBe('1.E+02'); + expect(format('0.E+00', 100)).toBe('1.E+02'); + expect(format('0.E+00', 900)).toBe('9.E+02'); + expect(format('0.E+00', 949.999)).toBe('9.E+02'); + expect(format('0.E+00', 959.999)).toBe('1.E+03'); + expect(format('0.E+00', 969.999)).toBe('1.E+03'); + expect(format('0.E+00', 1000)).toBe('1.E+03'); + expect(format('0.E+00', 9000)).toBe('9.E+03'); + expect(format('0.E+00', 9499.99)).toBe('9.E+03'); + expect(format('0.E+00', 9599.99)).toBe('1.E+04'); + expect(format('0.E+00', 9699.99)).toBe('1.E+04'); + expect(format('0.E+00', 10000)).toBe('1.E+04'); + expect(format('0.E+00', 90000)).toBe('9.E+04'); + expect(format('0.E+00', 94999.9)).toBe('9.E+04'); + expect(format('0.E+00', 95999.9)).toBe('1.E+05'); + expect(format('0.E+00', 96999.9)).toBe('1.E+05'); + expect(format('0.E+00', 100000)).toBe('1.E+05'); + expect(format('0.0E+00', 9)).toBe('9.0E+00'); + expect(format('0.0E+00', 9.49999)).toBe('9.5E+00'); + expect(format('0.0E+00', 9.59999)).toBe('9.6E+00'); + expect(format('0.0E+00', 9.69999)).toBe('9.7E+00'); + expect(format('0.0E+00', 10)).toBe('1.0E+01'); + expect(format('0.0E+00', 90)).toBe('9.0E+01'); + expect(format('0.0E+00', 94.9999)).toBe('9.5E+01'); + expect(format('0.0E+00', 95.9999)).toBe('9.6E+01'); + expect(format('0.0E+00', 96.9999)).toBe('9.7E+01'); + expect(format('0.0E+00', 100)).toBe('1.0E+02'); + expect(format('0.0E+00', 900)).toBe('9.0E+02'); + expect(format('0.0E+00', 949.999)).toBe('9.5E+02'); + expect(format('0.0E+00', 959.999)).toBe('9.6E+02'); + expect(format('0.0E+00', 969.999)).toBe('9.7E+02'); + expect(format('0.0E+00', 1000)).toBe('1.0E+03'); + expect(format('0.0E+00', 9000)).toBe('9.0E+03'); + expect(format('0.0E+00', 9499.99)).toBe('9.5E+03'); + expect(format('0.0E+00', 9599.99)).toBe('9.6E+03'); + expect(format('0.0E+00', 9699.99)).toBe('9.7E+03'); + expect(format('0.0E+00', 10000)).toBe('1.0E+04'); + expect(format('0.0E+00', 90000)).toBe('9.0E+04'); + expect(format('0.0E+00', 94999.9)).toBe('9.5E+04'); + expect(format('0.0E+00', 95999.9)).toBe('9.6E+04'); + expect(format('0.0E+00', 96999.9)).toBe('9.7E+04'); + expect(format('0.0E+00', 100000)).toBe('1.0E+05'); + expect(format('0.00E+00', 9)).toBe('9.00E+00'); + expect(format('0.00E+00', 9.49999)).toBe('9.50E+00'); + expect(format('0.00E+00', 9.59999)).toBe('9.60E+00'); + expect(format('0.00E+00', 9.69999)).toBe('9.70E+00'); + expect(format('0.00E+00', 10)).toBe('1.00E+01'); + expect(format('0.00E+00', 90)).toBe('9.00E+01'); + expect(format('0.00E+00', 94.9999)).toBe('9.50E+01'); + expect(format('0.00E+00', 95.9999)).toBe('9.60E+01'); + expect(format('0.00E+00', 96.9999)).toBe('9.70E+01'); + expect(format('0.00E+00', 100)).toBe('1.00E+02'); + expect(format('0.00E+00', 900)).toBe('9.00E+02'); + expect(format('0.00E+00', 949.999)).toBe('9.50E+02'); + expect(format('0.00E+00', 959.999)).toBe('9.60E+02'); + expect(format('0.00E+00', 969.999)).toBe('9.70E+02'); + expect(format('0.00E+00', 1000)).toBe('1.00E+03'); + expect(format('0.00E+00', 9000)).toBe('9.00E+03'); + expect(format('0.00E+00', 9499.99)).toBe('9.50E+03'); + expect(format('0.00E+00', 9599.99)).toBe('9.60E+03'); + expect(format('0.00E+00', 9699.99)).toBe('9.70E+03'); + expect(format('0.00E+00', 10000)).toBe('1.00E+04'); + expect(format('0.00E+00', 90000)).toBe('9.00E+04'); + expect(format('0.00E+00', 94999.9)).toBe('9.50E+04'); + expect(format('0.00E+00', 95999.9)).toBe('9.60E+04'); + expect(format('0.00E+00', 96999.9)).toBe('9.70E+04'); + expect(format('0.00E+00', 100000)).toBe('1.00E+05'); + expect(format('00.E+00', 9)).toBe('09.E+00'); + expect(format('00.E+00', 9.49999)).toBe('09.E+00'); + expect(format('00.E+00', 9.59999)).toBe('10.E+00'); + expect(format('00.E+00', 9.69999)).toBe('10.E+00'); + expect(format('00.E+00', 10)).toBe('10.E+00'); + expect(format('00.E+00', 90)).toBe('90.E+00'); + expect(format('00.E+00', 94.9999)).toBe('95.E+00'); + expect(format('00.E+00', 95.9999)).toBe('96.E+00'); + expect(format('00.E+00', 96.9999)).toBe('97.E+00'); + expect(format('00.E+00', 100)).toBe('01.E+02'); + expect(format('00.E+00', 900)).toBe('09.E+02'); + expect(format('00.E+00', 949.999)).toBe('09.E+02'); + expect(format('00.E+00', 959.999)).toBe('10.E+02'); + expect(format('00.E+00', 969.999)).toBe('10.E+02'); + expect(format('00.E+00', 1000)).toBe('10.E+02'); + expect(format('00.E+00', 9000)).toBe('90.E+02'); + expect(format('00.E+00', 9499.99)).toBe('95.E+02'); + expect(format('00.E+00', 9599.99)).toBe('96.E+02'); + expect(format('00.E+00', 9699.99)).toBe('97.E+02'); + expect(format('00.E+00', 10000)).toBe('01.E+04'); + expect(format('00.E+00', 90000)).toBe('09.E+04'); + expect(format('00.E+00', 94999.9)).toBe('09.E+04'); + expect(format('00.E+00', 95999.9)).toBe('10.E+04'); + expect(format('00.E+00', 96999.9)).toBe('10.E+04'); + expect(format('00.E+00', 100000)).toBe('10.E+04'); + expect(format('00.0E+00', 9)).toBe('09.0E+00'); + expect(format('00.0E+00', 9.49999)).toBe('09.5E+00'); + expect(format('00.0E+00', 9.59999)).toBe('09.6E+00'); + expect(format('00.0E+00', 9.69999)).toBe('09.7E+00'); + expect(format('00.0E+00', 10)).toBe('10.0E+00'); + expect(format('00.0E+00', 90)).toBe('90.0E+00'); + expect(format('00.0E+00', 94.9999)).toBe('95.0E+00'); + expect(format('00.0E+00', 95.9999)).toBe('96.0E+00'); + expect(format('00.0E+00', 96.9999)).toBe('97.0E+00'); + expect(format('00.0E+00', 100)).toBe('01.0E+02'); + expect(format('00.0E+00', 900)).toBe('09.0E+02'); + expect(format('00.0E+00', 949.999)).toBe('09.5E+02'); + expect(format('00.0E+00', 959.999)).toBe('09.6E+02'); + expect(format('00.0E+00', 969.999)).toBe('09.7E+02'); + expect(format('00.0E+00', 1000)).toBe('10.0E+02'); + expect(format('00.0E+00', 9000)).toBe('90.0E+02'); + expect(format('00.0E+00', 9499.99)).toBe('95.0E+02'); + expect(format('00.0E+00', 9599.99)).toBe('96.0E+02'); + expect(format('00.0E+00', 9699.99)).toBe('97.0E+02'); + expect(format('00.0E+00', 10000)).toBe('01.0E+04'); + expect(format('00.0E+00', 90000)).toBe('09.0E+04'); + expect(format('00.0E+00', 94999.9)).toBe('09.5E+04'); + expect(format('00.0E+00', 95999.9)).toBe('09.6E+04'); + expect(format('00.0E+00', 96999.9)).toBe('09.7E+04'); + expect(format('00.0E+00', 100000)).toBe('10.0E+04'); + expect(format('00.00E+00', 9)).toBe('09.00E+00'); + expect(format('00.00E+00', 9.49999)).toBe('09.50E+00'); + expect(format('00.00E+00', 9.59999)).toBe('09.60E+00'); + expect(format('00.00E+00', 9.69999)).toBe('09.70E+00'); + expect(format('00.00E+00', 10)).toBe('10.00E+00'); + expect(format('00.00E+00', 90)).toBe('90.00E+00'); + expect(format('00.00E+00', 94.9999)).toBe('95.00E+00'); + expect(format('00.00E+00', 95.9999)).toBe('96.00E+00'); + expect(format('00.00E+00', 96.9999)).toBe('97.00E+00'); + expect(format('00.00E+00', 100)).toBe('01.00E+02'); + expect(format('00.00E+00', 900)).toBe('09.00E+02'); + expect(format('00.00E+00', 949.999)).toBe('09.50E+02'); + expect(format('00.00E+00', 959.999)).toBe('09.60E+02'); + expect(format('00.00E+00', 969.999)).toBe('09.70E+02'); + expect(format('00.00E+00', 1000)).toBe('10.00E+02'); + expect(format('00.00E+00', 9000)).toBe('90.00E+02'); + expect(format('00.00E+00', 9499.99)).toBe('95.00E+02'); + expect(format('00.00E+00', 9599.99)).toBe('96.00E+02'); + expect(format('00.00E+00', 9699.99)).toBe('97.00E+02'); + expect(format('00.00E+00', 10000)).toBe('01.00E+04'); + expect(format('00.00E+00', 90000)).toBe('09.00E+04'); + expect(format('00.00E+00', 94999.9)).toBe('09.50E+04'); + expect(format('00.00E+00', 95999.9)).toBe('09.60E+04'); + expect(format('00.00E+00', 96999.9)).toBe('09.70E+04'); + expect(format('00.00E+00', 100000)).toBe('10.00E+04'); + expect(format('000.E+00', 9)).toBe('009.E+00'); + expect(format('000.E+00', 9.49999)).toBe('009.E+00'); + expect(format('000.E+00', 9.59999)).toBe('010.E+00'); + expect(format('000.E+00', 9.69999)).toBe('010.E+00'); + expect(format('000.E+00', 10)).toBe('010.E+00'); + expect(format('000.E+00', 90)).toBe('090.E+00'); + expect(format('000.E+00', 94.9999)).toBe('095.E+00'); + expect(format('000.E+00', 95.9999)).toBe('096.E+00'); + expect(format('000.E+00', 96.9999)).toBe('097.E+00'); + expect(format('000.E+00', 100)).toBe('100.E+00'); + expect(format('000.E+00', 900)).toBe('900.E+00'); + expect(format('000.E+00', 949.999)).toBe('950.E+00'); + expect(format('000.E+00', 959.999)).toBe('960.E+00'); + expect(format('000.E+00', 969.999)).toBe('970.E+00'); + expect(format('000.E+00', 1000)).toBe('001.E+03'); + expect(format('000.E+00', 9000)).toBe('009.E+03'); + expect(format('000.E+00', 9499.99)).toBe('009.E+03'); + expect(format('000.E+00', 9599.99)).toBe('010.E+03'); + expect(format('000.E+00', 9699.99)).toBe('010.E+03'); + expect(format('000.E+00', 10000)).toBe('010.E+03'); + expect(format('000.E+00', 90000)).toBe('090.E+03'); + expect(format('000.E+00', 94999.9)).toBe('095.E+03'); + expect(format('000.E+00', 95999.9)).toBe('096.E+03'); + expect(format('000.E+00', 96999.9)).toBe('097.E+03'); + expect(format('000.E+00', 100000)).toBe('100.E+03'); + expect(format('000.0E+00', 9)).toBe('009.0E+00'); + expect(format('000.0E+00', 9.49999)).toBe('009.5E+00'); + expect(format('000.0E+00', 9.59999)).toBe('009.6E+00'); + expect(format('000.0E+00', 9.69999)).toBe('009.7E+00'); + expect(format('000.0E+00', 10)).toBe('010.0E+00'); + expect(format('000.0E+00', 90)).toBe('090.0E+00'); + expect(format('000.0E+00', 94.9999)).toBe('095.0E+00'); + expect(format('000.0E+00', 95.9999)).toBe('096.0E+00'); + expect(format('000.0E+00', 96.9999)).toBe('097.0E+00'); + expect(format('000.0E+00', 100)).toBe('100.0E+00'); + expect(format('000.0E+00', 900)).toBe('900.0E+00'); + expect(format('000.0E+00', 949.999)).toBe('950.0E+00'); + expect(format('000.0E+00', 959.999)).toBe('960.0E+00'); + expect(format('000.0E+00', 969.999)).toBe('970.0E+00'); + expect(format('000.0E+00', 1000)).toBe('001.0E+03'); + expect(format('000.0E+00', 9000)).toBe('009.0E+03'); + expect(format('000.0E+00', 9499.99)).toBe('009.5E+03'); + expect(format('000.0E+00', 9599.99)).toBe('009.6E+03'); + expect(format('000.0E+00', 9699.99)).toBe('009.7E+03'); + expect(format('000.0E+00', 10000)).toBe('010.0E+03'); + expect(format('000.0E+00', 90000)).toBe('090.0E+03'); + expect(format('000.0E+00', 94999.9)).toBe('095.0E+03'); + expect(format('000.0E+00', 95999.9)).toBe('096.0E+03'); + expect(format('000.0E+00', 96999.9)).toBe('097.0E+03'); + expect(format('000.0E+00', 100000)).toBe('100.0E+03'); + expect(format('000.00E+00', 9)).toBe('009.00E+00'); + expect(format('000.00E+00', 9.49999)).toBe('009.50E+00'); + expect(format('000.00E+00', 9.59999)).toBe('009.60E+00'); + expect(format('000.00E+00', 9.69999)).toBe('009.70E+00'); + expect(format('000.00E+00', 10)).toBe('010.00E+00'); + expect(format('000.00E+00', 90)).toBe('090.00E+00'); + expect(format('000.00E+00', 94.9999)).toBe('095.00E+00'); + expect(format('000.00E+00', 95.9999)).toBe('096.00E+00'); + expect(format('000.00E+00', 96.9999)).toBe('097.00E+00'); + expect(format('000.00E+00', 100)).toBe('100.00E+00'); + expect(format('000.00E+00', 900)).toBe('900.00E+00'); + expect(format('000.00E+00', 949.999)).toBe('950.00E+00'); + expect(format('000.00E+00', 959.999)).toBe('960.00E+00'); + expect(format('000.00E+00', 969.999)).toBe('970.00E+00'); + expect(format('000.00E+00', 1000)).toBe('001.00E+03'); + expect(format('000.00E+00', 9000)).toBe('009.00E+03'); + expect(format('000.00E+00', 9499.99)).toBe('009.50E+03'); + expect(format('000.00E+00', 9599.99)).toBe('009.60E+03'); + expect(format('000.00E+00', 9699.99)).toBe('009.70E+03'); + expect(format('000.00E+00', 10000)).toBe('010.00E+03'); + expect(format('000.00E+00', 90000)).toBe('090.00E+03'); + expect(format('000.00E+00', 94999.9)).toBe('095.00E+03'); + expect(format('000.00E+00', 95999.9)).toBe('096.00E+03'); + expect(format('000.00E+00', 96999.9)).toBe('097.00E+03'); + expect(format('000.00E+00', 100000)).toBe('100.00E+03'); }); -test('Exponential 0E+00', t => { - t.format('0E+00', 1000000000000, '1E+12'); - t.format('0E+00', 999999999999, '1E+12'); - t.format('0E+00', 950000000000, '1E+12'); - t.format('0E+00', 100000000000, '1E+11'); - t.format('0E+00', 95000000000, '1E+11'); - t.format('0E+00', 10000000000, '1E+10'); - t.format('0E+00', 9500000000, '1E+10'); - t.format('0E+00', 1000000000, '1E+09'); - t.format('0E+00', 950000000, '1E+09'); - t.format('0E+00', 100000000, '1E+08'); - t.format('0E+00', 95000000, '1E+08'); - t.format('0E+00', 10000000, '1E+07'); - t.format('0E+00', 9500000, '1E+07'); - t.format('0E+00', 1000000, '1E+06'); - t.format('0E+00', 950000, '1E+06'); - t.format('0E+00', 100000, '1E+05'); - t.format('0E+00', 95000, '1E+05'); - t.format('0E+00', 10000, '1E+04'); - t.format('0E+00', 9500, '1E+04'); - t.format('0E+00', 1000, '1E+03'); - t.format('0E+00', 950, '1E+03'); - t.format('0E+00', 100, '1E+02'); - t.format('0E+00', 95, '1E+02'); - t.format('0E+00', 10, '1E+01'); - t.format('0E+00', 9.5, '1E+01'); - t.format('0E+00', 1.4999999, '1E+00'); - t.format('0E+00', 1, '1E+00'); - t.format('0E+00', 0.95, '1E+00'); - t.format('0E+00', 0.14999999, '1E-01'); - t.format('0E+00', 0.1, '1E-01'); - t.format('0E+00', 0.014999999, '1E-02'); - t.format('0E+00', 0.01, '1E-02'); - t.format('0E+00', 0.0014999999, '1E-03'); - t.format('0E+00', 0.001, '1E-03'); - t.format('0E+00', 0.00014999999, '1E-04'); - t.format('0E+00', 0.0001, '1E-04'); - t.format('0E+00', 0.000014999999, '1E-05'); - t.format('0E+00', 0.00001, '1E-05'); - t.format('0E+00', 0.00000149999999, '1E-06'); - t.format('0E+00', 0.000001, '1E-06'); - t.format('0E+00', 0.00000014999999, '1E-07'); - t.format('0E+00', 0.0000001, '1E-07'); - t.format('0E+00', 0.000000014999999, '1E-08'); - t.format('0E+00', 0.00000001, '1E-08'); - t.format('0E+00', 0.0000000014999999, '1E-09'); - t.format('0E+00', 0.000000001, '1E-09'); - t.format('0E+00', 0.00000000014999999, '1E-10'); - t.format('0E+00', 0.0000000001, '1E-10'); - t.format('0E+00', 0.000000000014999999, '1E-11'); - t.format('0E+00', 0.00000000001, '1E-11'); - t.format('0E+00', 0.0000000000014999999, '1E-12'); - t.format('0E+00', 0.000000000001, '1E-12'); - t.end(); +test('Exponential 0E+00', () => { + expect(format('0E+00', 1000000000000)).toBe('1E+12'); + expect(format('0E+00', 999999999999)).toBe('1E+12'); + expect(format('0E+00', 950000000000)).toBe('1E+12'); + expect(format('0E+00', 100000000000)).toBe('1E+11'); + expect(format('0E+00', 95000000000)).toBe('1E+11'); + expect(format('0E+00', 10000000000)).toBe('1E+10'); + expect(format('0E+00', 9500000000)).toBe('1E+10'); + expect(format('0E+00', 1000000000)).toBe('1E+09'); + expect(format('0E+00', 950000000)).toBe('1E+09'); + expect(format('0E+00', 100000000)).toBe('1E+08'); + expect(format('0E+00', 95000000)).toBe('1E+08'); + expect(format('0E+00', 10000000)).toBe('1E+07'); + expect(format('0E+00', 9500000)).toBe('1E+07'); + expect(format('0E+00', 1000000)).toBe('1E+06'); + expect(format('0E+00', 950000)).toBe('1E+06'); + expect(format('0E+00', 100000)).toBe('1E+05'); + expect(format('0E+00', 95000)).toBe('1E+05'); + expect(format('0E+00', 10000)).toBe('1E+04'); + expect(format('0E+00', 9500)).toBe('1E+04'); + expect(format('0E+00', 1000)).toBe('1E+03'); + expect(format('0E+00', 950)).toBe('1E+03'); + expect(format('0E+00', 100)).toBe('1E+02'); + expect(format('0E+00', 95)).toBe('1E+02'); + expect(format('0E+00', 10)).toBe('1E+01'); + expect(format('0E+00', 9.5)).toBe('1E+01'); + expect(format('0E+00', 1.4999999)).toBe('1E+00'); + expect(format('0E+00', 1)).toBe('1E+00'); + expect(format('0E+00', 0.95)).toBe('1E+00'); + expect(format('0E+00', 0.14999999)).toBe('1E-01'); + expect(format('0E+00', 0.1)).toBe('1E-01'); + expect(format('0E+00', 0.014999999)).toBe('1E-02'); + expect(format('0E+00', 0.01)).toBe('1E-02'); + expect(format('0E+00', 0.0014999999)).toBe('1E-03'); + expect(format('0E+00', 0.001)).toBe('1E-03'); + expect(format('0E+00', 0.00014999999)).toBe('1E-04'); + expect(format('0E+00', 0.0001)).toBe('1E-04'); + expect(format('0E+00', 0.000014999999)).toBe('1E-05'); + expect(format('0E+00', 0.00001)).toBe('1E-05'); + expect(format('0E+00', 0.00000149999999)).toBe('1E-06'); + expect(format('0E+00', 0.000001)).toBe('1E-06'); + expect(format('0E+00', 0.00000014999999)).toBe('1E-07'); + expect(format('0E+00', 0.0000001)).toBe('1E-07'); + expect(format('0E+00', 0.000000014999999)).toBe('1E-08'); + expect(format('0E+00', 0.00000001)).toBe('1E-08'); + expect(format('0E+00', 0.0000000014999999)).toBe('1E-09'); + expect(format('0E+00', 0.000000001)).toBe('1E-09'); + expect(format('0E+00', 0.00000000014999999)).toBe('1E-10'); + expect(format('0E+00', 0.0000000001)).toBe('1E-10'); + expect(format('0E+00', 0.000000000014999999)).toBe('1E-11'); + expect(format('0E+00', 0.00000000001)).toBe('1E-11'); + expect(format('0E+00', 0.0000000000014999999)).toBe('1E-12'); + expect(format('0E+00', 0.000000000001)).toBe('1E-12'); }); -test('Exponential 0.00E+00', t => { - t.format('0.00E+00', 10000000, '1.00E+07'); - t.format('0.00E+00', 20000000, '2.00E+07'); - t.format('0.00E+00', 30000000, '3.00E+07'); - t.format('0.00E+00', 30010000, '3.00E+07'); - t.format('0.00E+00', 30100000, '3.01E+07'); - t.format('0.00E+00', 31000000, '3.10E+07'); - t.format('0.00E+00', 31680000, '3.17E+07'); - t.format('0.00E+00', 31700000, '3.17E+07'); - t.format('0.00E+00', 32500000, '3.25E+07'); - t.format('0.00E+00', 35000000, '3.50E+07'); - t.format('0.00E+00', 40000000, '4.00E+07'); - t.format('0.00E+00', 50000000, '5.00E+07'); - t.format('0.00E+00', 60000000, '6.00E+07'); - t.format('0.00E+00', 70000000, '7.00E+07'); - t.format('0.00E+00', 80000000, '8.00E+07'); - t.format('0.00E+00', 90000000, '9.00E+07'); - t.end(); +test('Exponential 0.00E+00', () => { + expect(format('0.00E+00', 10000000)).toBe('1.00E+07'); + expect(format('0.00E+00', 20000000)).toBe('2.00E+07'); + expect(format('0.00E+00', 30000000)).toBe('3.00E+07'); + expect(format('0.00E+00', 30010000)).toBe('3.00E+07'); + expect(format('0.00E+00', 30100000)).toBe('3.01E+07'); + expect(format('0.00E+00', 31000000)).toBe('3.10E+07'); + expect(format('0.00E+00', 31680000)).toBe('3.17E+07'); + expect(format('0.00E+00', 31700000)).toBe('3.17E+07'); + expect(format('0.00E+00', 32500000)).toBe('3.25E+07'); + expect(format('0.00E+00', 35000000)).toBe('3.50E+07'); + expect(format('0.00E+00', 40000000)).toBe('4.00E+07'); + expect(format('0.00E+00', 50000000)).toBe('5.00E+07'); + expect(format('0.00E+00', 60000000)).toBe('6.00E+07'); + expect(format('0.00E+00', 70000000)).toBe('7.00E+07'); + expect(format('0.00E+00', 80000000)).toBe('8.00E+07'); + expect(format('0.00E+00', 90000000)).toBe('9.00E+07'); }); -test('Sign is grouped with digit in output', t => { - t.format('0 E+ 0', 10000000, '1 E +7'); - t.format('0 E+ 00', 10000000, '1 E +07'); - t.format('0 E- 0', 10000000, '1 E 7'); - t.format('0 E- 0', 0.0000001, '1 E -7'); - t.format('0 E- 00', 0.0000001, '1 E -07'); - t.end(); +test('Sign is grouped with digit in output', () => { + expect(format('0 E+ 0', 10000000)).toBe('1 E +7'); + expect(format('0 E+ 00', 10000000)).toBe('1 E +07'); + expect(format('0 E- 0', 10000000)).toBe('1 E 7'); + expect(format('0 E- 0', 0.0000001)).toBe('1 E -7'); + expect(format('0 E- 00', 0.0000001)).toBe('1 E -07'); }); -test('Exponent is shifted when integer part is omitted:', t => { - t.format('.0E+0', 0, '.0E+0'); - t.format('.0E+0', 1, '.1E+1'); - t.format('.0E+0', 10, '.1E+2'); - t.format('.0E+0', 100, '.1E+3'); - t.format('.0E+0', 1000, '.1E+4'); - t.format('.0E+0', 10000, '.1E+5'); - t.format('.0E+0', 100000, '.1E+6'); - t.format('.0E+0', 123456789, '.1E+9'); - t.format('.0E+0', 0.1, '.1E+0'); - t.format('.0E+0', 0.01, '.1E-1'); - t.format('.0E+0', 0.001, '.1E-2'); - t.format('.0E+0', 0.0001, '.1E-3'); - t.format('.0E+0', 0.12345, '.1E+0'); - t.format('.0E+0', 0.012345, '.1E-1'); - t.end(); +test('Exponent is shifted when integer part is omitted:', () => { + expect(format('.0E+0', 0)).toBe('.0E+0'); + expect(format('.0E+0', 1)).toBe('.1E+1'); + expect(format('.0E+0', 10)).toBe('.1E+2'); + expect(format('.0E+0', 100)).toBe('.1E+3'); + expect(format('.0E+0', 1000)).toBe('.1E+4'); + expect(format('.0E+0', 10000)).toBe('.1E+5'); + expect(format('.0E+0', 100000)).toBe('.1E+6'); + expect(format('.0E+0', 123456789)).toBe('.1E+9'); + expect(format('.0E+0', 0.1)).toBe('.1E+0'); + expect(format('.0E+0', 0.01)).toBe('.1E-1'); + expect(format('.0E+0', 0.001)).toBe('.1E-2'); + expect(format('.0E+0', 0.0001)).toBe('.1E-3'); + expect(format('.0E+0', 0.12345)).toBe('.1E+0'); + expect(format('.0E+0', 0.012345)).toBe('.1E-1'); }); diff --git a/test/fragmented-numbers.spec.ts b/test/fragmented-numbers.spec.ts index edfbe87..8d69df4 100644 --- a/test/fragmented-numbers.spec.ts +++ b/test/fragmented-numbers.spec.ts @@ -1,29 +1,28 @@ -import test from './utils.js'; +import { expect, test } from 'vitest'; +import { format } from '../lib/index.js'; -test('Fragmented number parts', t => { +test('Fragmented number parts', () => { // exps with fragments - t.format('0.00E+0x0', 123456789, '1.23E+0x8'); - t.format('0.00E+0x0', 123456789, '1.23E+0x8'); - t.format('0.00E+?x?', 123456789, '1.23E+ x8'); - t.format('0.00E+#x#', 123456789, '1.23E+x8'); - t.format('0.0x0E+0', 123456789, '1.2x3E+8'); - t.format('0x0.00E+0', 123456789, '0x1.23E+8'); - t.format('0x0.0x0E+0x0', 1, '0x1.0x0E+0x0'); - t.format('#x#.#x#E+#x#', 1, 'x1.xE+x0'); - t.format('?x?.?x?E+?x?', 1, ' x1. x E+ x0'); + expect(format('0.00E+0x0', 123456789)).toBe('1.23E+0x8'); + expect(format('0.00E+0x0', 123456789)).toBe('1.23E+0x8'); + expect(format('0.00E+?x?', 123456789)).toBe('1.23E+ x8'); + expect(format('0.00E+#x#', 123456789)).toBe('1.23E+x8'); + expect(format('0.0x0E+0', 123456789)).toBe('1.2x3E+8'); + expect(format('0x0.00E+0', 123456789)).toBe('0x1.23E+8'); + expect(format('0x0.0x0E+0x0', 1)).toBe('0x1.0x0E+0x0'); + expect(format('#x#.#x#E+#x#', 1)).toBe('x1.xE+x0'); + expect(format('?x?.?x?E+?x?', 1)).toBe(' x1. x E+ x0'); - t.format('00 00/00', 1, '01 00/01'); - t.format('00x00/00', 12345.67, '12345x65/97'); - t.format('0z0 00/00', 12345.67, '1234z5 65/97'); - t.format('00 0z0/00', 12345.67, '1234 5z65/97'); - t.format('00 00/0z0', 12345.67, '12345 02/3z0'); - t.format('00 0/0', 12345.67, '12345 2/3'); - t.format('00 ??/?z?', 12345.67, '12345 2/3z '); + expect(format('00 00/00', 1)).toBe('01 00/01'); + expect(format('00x00/00', 12345.67)).toBe('12345x65/97'); + expect(format('0z0 00/00', 12345.67)).toBe('1234z5 65/97'); + expect(format('00 0z0/00', 12345.67)).toBe('1234 5z65/97'); + expect(format('00 00/0z0', 12345.67)).toBe('12345 02/3z0'); + expect(format('00 0/0', 12345.67)).toBe('12345 2/3'); + expect(format('00 ??/?z?', 12345.67)).toBe('12345 2/3z '); - t.format('000E+00', 12345.67, '012E+03'); - t.format('00x0E+00', 12345.67, '01x2E+03'); - t.format('000E+0x0', 12345.67, '012E+0x3'); - t.format('0.0E+0x00', 1234567890000, '1.2E+0x12'); - - t.end(); + expect(format('000E+00', 12345.67)).toBe('012E+03'); + expect(format('00x0E+00', 12345.67)).toBe('01x2E+03'); + expect(format('000E+0x0', 12345.67)).toBe('012E+0x3'); + expect(format('0.0E+0x00', 1234567890000)).toBe('1.2E+0x12'); }); diff --git a/test/info.spec.ts b/test/info.spec.ts index 7235e3c..dd821a8 100644 --- a/test/info.spec.ts +++ b/test/info.spec.ts @@ -1,10 +1,42 @@ -import { getFormatInfo } from '../lib/index.js'; -import test from './utils.js'; +import { expect, test } from 'vitest'; +import { getFormatDateInfo, getFormatInfo } from '../lib/index.js'; -test('numfmt.info', t => { +const commonProps = { + isDate: false, + isText: false, + isPercent: false, + maxDecimals: 0, + grouped: 0, + parentheses: 0, + color: 0, + scale: 1, + level: 0 +}; + +function assertInfo (fmtString: string, expectProps: object) { + expect({ ...getFormatInfo(fmtString) }, fmtString) + .toEqual({ ...commonProps, ...expectProps }); +} + +const commonDateProps = { + year: false, + month: false, + day: false, + hours: false, + minutes: false, + seconds: false, + clockType: 24 +}; + +function assertDateInfo (fmtString: string, expectProps: object) { + expect(getFormatDateInfo(fmtString), fmtString) + .toEqual({ ...commonDateProps, ...expectProps }); +} + +test('numfmt.info', () => { const i1 = { ...getFormatInfo('0') }; - t.equal(typeof i1, 'object', 'getFormatInfo emits object'); - t.deepEqual(i1, { + expect(typeof i1, 'getFormatInfo emits object').toBe('object'); + expect(i1, 'numfmt.info object is what we expect').toEqual({ type: 'number', isDate: false, isText: false, @@ -16,11 +48,11 @@ test('numfmt.info', t => { grouped: 0, code: 'F0', level: 4 - }, 'numfmt.info object is what we expect'); + }); const i2 = { ...getFormatInfo('0') }; - t.equal(typeof i2, 'object', 'formatters have info objects'); - t.deepEqual(i2, { + expect(typeof i2, 'formatters have info objects').toBe('object'); + expect(i2, 'formatters info is what we expect').toEqual({ type: 'number', isDate: false, isText: false, @@ -32,10 +64,10 @@ test('numfmt.info', t => { grouped: 0, code: 'F0', level: 4 - }, 'formatters info is what we expect'); + }); const borked = { ...getFormatInfo('y 0') }; - t.deepEqual(borked, { + expect(borked, 'info makes sense even when pattern is bogus').toEqual({ type: 'error', isDate: false, isText: false, @@ -47,79 +79,76 @@ test('numfmt.info', t => { grouped: 0, code: 'G', level: 0 - }, 'info makes sense even when pattern is bogus'); - - t.end(); + }); }); -test('General', t => { - t.assertInfo('General', { +test('General', () => { + assertInfo('General', { type: 'general', maxDecimals: 9, code: 'G' }); - t.assertInfo('General;-General', { + assertInfo('General;-General', { type: 'general', maxDecimals: 9, code: 'G' }); - t.assertInfo('(General);[blue](-General);0;@', { + assertInfo('(General);[blue](-General);0;@', { type: 'general', maxDecimals: 9, code: 'G-()', color: 1, parentheses: 1 }); - t.end(); }); -test('Numbers', t => { - t.assertInfo('0', { +test('Numbers', () => { + assertInfo('0', { type: 'number', maxDecimals: 0, code: 'F0', level: 4 }); - t.assertInfo('0.0', { + assertInfo('0.0', { type: 'number', maxDecimals: 1, code: 'F1', level: 4 }); - t.assertInfo('0.000', { + assertInfo('0.000', { type: 'number', maxDecimals: 3, code: 'F3', level: 4 }); - t.assertInfo('0.000000000000000', { + assertInfo('0.000000000000000', { type: 'number', maxDecimals: 15, code: 'F15', level: 4 }); - t.assertInfo('0.0000000000000000', { + assertInfo('0.0000000000000000', { type: 'number', maxDecimals: 16, code: 'F15', level: 4 }); - t.assertInfo('#,##0', { + assertInfo('#,##0', { type: 'grouped', maxDecimals: 0, code: ',0', grouped: 1, level: 10.2 }); - t.assertInfo('#,##0.00', { + assertInfo('#,##0.00', { type: 'grouped', maxDecimals: 2, code: ',2', grouped: 1, level: 10.2 }); - t.assertInfo('(#,##0.00)', { + assertInfo('(#,##0.00)', { type: 'grouped', maxDecimals: 2, code: ',2()', @@ -128,124 +157,118 @@ test('Numbers', t => { level: 10.2 }); - t.assertInfo('0.00,"K"', { + assertInfo('0.00,"K"', { type: 'number', maxDecimals: 2, code: 'F2', scale: 0.001, level: 4 }); - t.assertInfo('0.00,,"K"', { + assertInfo('0.00,,"K"', { type: 'number', maxDecimals: 2, code: 'F2', scale: 0.000001, level: 4 }); - - t.end(); }); -test('Parentheses', t => { - t.assertInfo('(0)', { +test('Parentheses', () => { + assertInfo('(0)', { type: 'number', parentheses: 1, code: 'F0()', level: 4 }); - t.assertInfo('0;(0)', { + assertInfo('0;(0)', { type: 'number', code: 'F0', level: 4 }); - t.assertInfo('0;0;(0)', { + assertInfo('0;0;(0)', { type: 'number', code: 'F0', level: 4 }); - t.assertInfo('(General)', { + assertInfo('(General)', { type: 'general', parentheses: 1, code: 'G()', maxDecimals: 9 }); - t.assertInfo('(0', { + assertInfo('(0', { type: 'number', parentheses: 1, code: 'F0()', level: 4 }); - t.assertInfo('0)', { + assertInfo('0)', { type: 'number', code: 'F0', level: 4 }); - t.end(); }); -test('Fractions', t => { - t.assertInfo('# ?/?', { +test('Fractions', () => { + assertInfo('# ?/?', { type: 'fraction', maxDecimals: 0, code: 'G', level: 2 }); - t.assertInfo('0 ??/??', { + assertInfo('0 ??/??', { type: 'fraction', maxDecimals: 0, code: 'G', level: 2 }); - t.end(); }); -test('Text', t => { - t.assertInfo('@', { +test('Text', () => { + assertInfo('@', { type: 'text', isText: true, code: 'G', level: 15 }); - t.assertInfo('(@)', { + assertInfo('(@)', { type: 'text', isText: true, code: 'G', level: 15 }); - t.end(); }); -test('Text', t => { - t.assertInfo('@', { +test('Text', () => { + assertInfo('@', { type: 'text', isText: true, code: 'G', level: 15 }); - t.assertInfo('(@)', { + assertInfo('(@)', { type: 'text', isText: true, code: 'G', level: 15 }); - t.end(); }); -test('Currency', t => { - t.assertInfo('$#,##0;($#,##0)', { +test('Currency', () => { + assertInfo('$#,##0;($#,##0)', { type: 'currency', code: 'C0', grouped: 1, level: 10.4 }); - t.assertInfo('#,##0.00 €', { + assertInfo('#,##0.00 €', { type: 'currency', code: 'C2', maxDecimals: 2, grouped: 1, level: 10.4 }); - t.assertInfo('₿ 0.0000', { + assertInfo('₿ 0.0000', { type: 'currency', code: 'C4', maxDecimals: 4, @@ -253,9 +276,9 @@ test('Currency', t => { }); // can pass in own currency - const testCurrency = (str, identifier, code) => { + const testCurrency = (str: string, identifier: string, code: string) => { const info = getFormatInfo(str, { currency: identifier }); - t.equal(info.code, code, str); + expect(info.code, str).toBe(code); }; // Excel doesn't really have a great solution to this: // It just contorts the string to ensure that the current @@ -268,19 +291,17 @@ test('Currency', t => { testCurrency('#,##0\\ "ISK"', 'ISK', 'C0'); testCurrency('#,##0\\a"ISK"\\a', 'ISK', 'C0'); testCurrency('#,##0"aISKa"', 'ISK', ',0'); - - t.end(); }); -test('Percentages', t => { - t.assertInfo('0%', { +test('Percentages', () => { + assertInfo('0%', { type: 'percent', isPercent: true, scale: 100, code: 'P0', level: 10.6 }); - t.assertInfo('0.00%;[red]0.00%', { + assertInfo('0.00%;[red]0.00%', { type: 'percent', isPercent: true, scale: 100, @@ -289,145 +310,140 @@ test('Percentages', t => { maxDecimals: 2, level: 10.6 }); - t.end(); }); -test('Scientific', t => { - t.assertInfo('0E+0', { +test('Scientific', () => { + assertInfo('0E+0', { type: 'scientific', code: 'S0', level: 6 }); - t.assertInfo('0.00E+00', { + assertInfo('0.00E+00', { type: 'scientific', code: 'S2', maxDecimals: 2, level: 6 }); - t.assertInfo('0.0E+0;[red]0.0E+0', { + assertInfo('0.0E+0;[red]0.0E+0', { type: 'scientific', code: 'S1-', color: 1, maxDecimals: 1, level: 6 }); - t.end(); }); -test('Dates', t => { +test('Dates', () => { const dt = { type: 'date', isDate: true, level: 10.8 }; const tm = { type: 'time', isDate: true, level: 10.8 }; // D1 - t.assertInfo('dd-mmm-yyyy h:mm:ss A/P', { ...dt, code: 'D1', type: 'datetime' }); - t.assertInfo('dd-mmm-yyyy h:mm:ss', { ...dt, code: 'D1', type: 'datetime' }); - t.assertInfo('dd-mmm-yyyy', { ...dt, code: 'D1' }); - t.assertInfo('d-mmm-yyyy', { ...dt, code: 'D1' }); - t.assertInfo('d-mm-yyyy', { ...dt, code: 'D1' }); - t.assertInfo('d-m-yyyy', { ...dt, code: 'D1' }); - t.assertInfo('d-m-yy', { ...dt, code: 'D1' }); - t.assertInfo('d-m-b', { ...dt, code: 'D1' }); + assertInfo('dd-mmm-yyyy h:mm:ss A/P', { ...dt, code: 'D1', type: 'datetime' }); + assertInfo('dd-mmm-yyyy h:mm:ss', { ...dt, code: 'D1', type: 'datetime' }); + assertInfo('dd-mmm-yyyy', { ...dt, code: 'D1' }); + assertInfo('d-mmm-yyyy', { ...dt, code: 'D1' }); + assertInfo('d-mm-yyyy', { ...dt, code: 'D1' }); + assertInfo('d-m-yyyy', { ...dt, code: 'D1' }); + assertInfo('d-m-yy', { ...dt, code: 'D1' }); + assertInfo('d-m-b', { ...dt, code: 'D1' }); // D2 - t.assertInfo('dd-mmmm h:mm A/P', { ...dt, code: 'D2', type: 'datetime' }); - t.assertInfo('dd-mmm h:mm:ss', { ...dt, code: 'D2', type: 'datetime' }); - t.assertInfo('dd-mmm', { ...dt, code: 'D2' }); - t.assertInfo('d-mmm', { ...dt, code: 'D2' }); - t.assertInfo('d-mm', { ...dt, code: 'D2' }); - t.assertInfo('d-m', { ...dt, code: 'D2' }); - t.assertInfo('d-m-m', { ...dt, code: 'D2' }); - t.assertInfo('d-m-d', { ...dt, code: 'D2' }); + assertInfo('dd-mmmm h:mm A/P', { ...dt, code: 'D2', type: 'datetime' }); + assertInfo('dd-mmm h:mm:ss', { ...dt, code: 'D2', type: 'datetime' }); + assertInfo('dd-mmm', { ...dt, code: 'D2' }); + assertInfo('d-mmm', { ...dt, code: 'D2' }); + assertInfo('d-mm', { ...dt, code: 'D2' }); + assertInfo('d-m', { ...dt, code: 'D2' }); + assertInfo('d-m-m', { ...dt, code: 'D2' }); + assertInfo('d-m-d', { ...dt, code: 'D2' }); // D3 - t.assertInfo('mmmm-yyyy h:mm A/P', { ...dt, code: 'D3', type: 'datetime' }); - t.assertInfo('mmmm-yyyy', { ...dt, code: 'D3' }); - t.assertInfo('m-y', { ...dt, code: 'D3' }); - t.assertInfo('m-y-m', { ...dt, code: 'D3' }); - t.assertInfo('m-y-d', { ...dt, code: 'D3' }); - t.assertInfo('m-b', { ...dt, code: 'D3' }); + assertInfo('mmmm-yyyy h:mm A/P', { ...dt, code: 'D3', type: 'datetime' }); + assertInfo('mmmm-yyyy', { ...dt, code: 'D3' }); + assertInfo('m-y', { ...dt, code: 'D3' }); + assertInfo('m-y-m', { ...dt, code: 'D3' }); + assertInfo('m-y-d', { ...dt, code: 'D3' }); + assertInfo('m-b', { ...dt, code: 'D3' }); // D4 (same as D1 but month first) - t.assertInfo('mmm-dd-yyyy h:mm:ss A/P', { ...dt, code: 'D4', type: 'datetime' }); - t.assertInfo('mmm-dd-yyyy h:mm:ss', { ...dt, code: 'D4', type: 'datetime' }); - t.assertInfo('mmm-dd-yyyy', { ...dt, code: 'D4' }); - t.assertInfo('mmm-d-yyyy', { ...dt, code: 'D4' }); - t.assertInfo('mm-d-yyyy', { ...dt, code: 'D4' }); - t.assertInfo('m-d-yyyy', { ...dt, code: 'D4' }); - t.assertInfo('m-d-yy', { ...dt, code: 'D4' }); - t.assertInfo('m-d-y-m', { ...dt, code: 'D4' }); - t.assertInfo('m-d-b', { ...dt, code: 'D4' }); + assertInfo('mmm-dd-yyyy h:mm:ss A/P', { ...dt, code: 'D4', type: 'datetime' }); + assertInfo('mmm-dd-yyyy h:mm:ss', { ...dt, code: 'D4', type: 'datetime' }); + assertInfo('mmm-dd-yyyy', { ...dt, code: 'D4' }); + assertInfo('mmm-d-yyyy', { ...dt, code: 'D4' }); + assertInfo('mm-d-yyyy', { ...dt, code: 'D4' }); + assertInfo('m-d-yyyy', { ...dt, code: 'D4' }); + assertInfo('m-d-yy', { ...dt, code: 'D4' }); + assertInfo('m-d-y-m', { ...dt, code: 'D4' }); + assertInfo('m-d-b', { ...dt, code: 'D4' }); // D5 (same as D2 but month first) - t.assertInfo('mmmm-dd h:mm A/P', { ...dt, code: 'D5', type: 'datetime' }); - t.assertInfo('mmm-dd h:mm:ss', { ...dt, code: 'D5', type: 'datetime' }); - t.assertInfo('mmm-dd', { ...dt, code: 'D5' }); - t.assertInfo('mmm-d', { ...dt, code: 'D5' }); - t.assertInfo('mm-d', { ...dt, code: 'D5' }); - t.assertInfo('m-d', { ...dt, code: 'D5' }); - t.assertInfo('m-d-d', { ...dt, code: 'D5' }); - t.assertInfo('m-d-m', { ...dt, code: 'D5' }); - t.assertInfo('m-d-d-y', { ...dt, code: 'D5' }); + assertInfo('mmmm-dd h:mm A/P', { ...dt, code: 'D5', type: 'datetime' }); + assertInfo('mmm-dd h:mm:ss', { ...dt, code: 'D5', type: 'datetime' }); + assertInfo('mmm-dd', { ...dt, code: 'D5' }); + assertInfo('mmm-d', { ...dt, code: 'D5' }); + assertInfo('mm-d', { ...dt, code: 'D5' }); + assertInfo('m-d', { ...dt, code: 'D5' }); + assertInfo('m-d-d', { ...dt, code: 'D5' }); + assertInfo('m-d-m', { ...dt, code: 'D5' }); + assertInfo('m-d-d-y', { ...dt, code: 'D5' }); // D6 - t.assertInfo('h:mm:ss AM/PM', { ...tm, code: 'D6' }); - t.assertInfo('h:mm:ss "foo" AM/PM', { ...tm, code: 'D6' }); - t.assertInfo('h:m:s A/P', { ...tm, code: 'D6' }); + assertInfo('h:mm:ss AM/PM', { ...tm, code: 'D6' }); + assertInfo('h:mm:ss "foo" AM/PM', { ...tm, code: 'D6' }); + assertInfo('h:m:s A/P', { ...tm, code: 'D6' }); // D7 - t.assertInfo('h:mm AM/PM', { ...tm, code: 'D7' }); - t.assertInfo('h:mm "foo" AM/PM', { ...tm, code: 'D7' }); - t.assertInfo('h:m A/P', { ...tm, code: 'D7' }); + assertInfo('h:mm AM/PM', { ...tm, code: 'D7' }); + assertInfo('h:mm "foo" AM/PM', { ...tm, code: 'D7' }); + assertInfo('h:m A/P', { ...tm, code: 'D7' }); // D8 - t.assertInfo('h:mm:ss', { ...tm, code: 'D8' }); - t.assertInfo('"foo" h:mm:ss "bar"', { ...tm, code: 'D8' }); - t.assertInfo('h:m:s', { ...tm, code: 'D8' }); + assertInfo('h:mm:ss', { ...tm, code: 'D8' }); + assertInfo('"foo" h:mm:ss "bar"', { ...tm, code: 'D8' }); + assertInfo('h:m:s', { ...tm, code: 'D8' }); // D9 - t.assertInfo('h:mm', { ...tm, code: 'D9' }); - t.assertInfo('"foo" h:mm "bar"', { ...tm, code: 'D9' }); - t.assertInfo('h:m', { ...tm, code: 'D9' }); + assertInfo('h:mm', { ...tm, code: 'D9' }); + assertInfo('"foo" h:mm "bar"', { ...tm, code: 'D9' }); + assertInfo('h:m', { ...tm, code: 'D9' }); // Non coded dates - t.assertInfo('yyyy', { ...dt, code: 'G' }); - t.assertInfo('yyyy-mm-dd', { ...dt, code: 'G' }); - t.assertInfo('yyyy-mm-dd"T"hh:mm:ss', { ...dt, code: 'G', type: 'datetime' }); - t.assertInfo('dddd h:mm:ss', { ...dt, code: 'G', type: 'datetime' }); - t.end(); + assertInfo('yyyy', { ...dt, code: 'G' }); + assertInfo('yyyy-mm-dd', { ...dt, code: 'G' }); + assertInfo('yyyy-mm-dd"T"hh:mm:ss', { ...dt, code: 'G', type: 'datetime' }); + assertInfo('dddd h:mm:ss', { ...dt, code: 'G', type: 'datetime' }); }); -test('dateInfo', t => { +test('dateInfo', () => { // numfmt.getDateInfo returns "all off" for non dates - t.assertDateInfo('0', {}); + assertDateInfo('0', {}); // dateInfo makes sense even when pattern is bogus - t.assertDateInfo('y 0', {}); - - t.assertDateInfo('yyyy', { year: true }); - t.assertDateInfo('yyy', { year: true }); - t.assertDateInfo('yy', { year: true }); - t.assertDateInfo('y', { year: true }); - t.assertDateInfo('mmmm', { month: true }); - t.assertDateInfo('mmm', { month: true }); - t.assertDateInfo('mm', { month: true }); - t.assertDateInfo('m', { month: true }); - t.assertDateInfo('dddd', { day: true }); - t.assertDateInfo('ddd', { day: true }); - t.assertDateInfo('dd', { day: true }); - t.assertDateInfo('d', { day: true }); - t.assertDateInfo('hh', { hours: true }); - t.assertDateInfo('h', { hours: true }); - t.assertDateInfo('h:mm', { hours: true, minutes: true }); - t.assertDateInfo('h:m', { hours: true, minutes: true }); - t.assertDateInfo('ss', { seconds: true }); - t.assertDateInfo('s', { seconds: true }); - t.assertDateInfo('hh am/pm', { hours: true, clockType: 12 }); - t.assertDateInfo('hh A/P', { hours: true, clockType: 12 }); + assertDateInfo('y 0', {}); - t.assertDateInfo('yyyy-mm', { year: true, month: true }); - t.assertDateInfo('yyyy-mm-dd', { year: true, month: true, day: true }); - t.assertDateInfo('yyyy-mm-ddThh', { year: true, month: true, day: true, hours: true }); - t.assertDateInfo('yyyy-mm-ddThh:mm', { year: true, month: true, day: true, hours: true, minutes: true }); - t.assertDateInfo('yyyy-mm-ddThh:mm:ss', { year: true, month: true, day: true, hours: true, minutes: true, seconds: true }); - t.assertDateInfo('yyyy-mm-ddThh:mm:ss AM/PM', { year: true, month: true, day: true, hours: true, minutes: true, seconds: true, clockType: 12 }); + assertDateInfo('yyyy', { year: true }); + assertDateInfo('yyy', { year: true }); + assertDateInfo('yy', { year: true }); + assertDateInfo('y', { year: true }); + assertDateInfo('mmmm', { month: true }); + assertDateInfo('mmm', { month: true }); + assertDateInfo('mm', { month: true }); + assertDateInfo('m', { month: true }); + assertDateInfo('dddd', { day: true }); + assertDateInfo('ddd', { day: true }); + assertDateInfo('dd', { day: true }); + assertDateInfo('d', { day: true }); + assertDateInfo('hh', { hours: true }); + assertDateInfo('h', { hours: true }); + assertDateInfo('h:mm', { hours: true, minutes: true }); + assertDateInfo('h:m', { hours: true, minutes: true }); + assertDateInfo('ss', { seconds: true }); + assertDateInfo('s', { seconds: true }); + assertDateInfo('hh am/pm', { hours: true, clockType: 12 }); + assertDateInfo('hh A/P', { hours: true, clockType: 12 }); - t.assertDateInfo('yy dd mm:ss', { year: true, day: true, month: true, seconds: true }); + assertDateInfo('yyyy-mm', { year: true, month: true }); + assertDateInfo('yyyy-mm-dd', { year: true, month: true, day: true }); + assertDateInfo('yyyy-mm-ddThh', { year: true, month: true, day: true, hours: true }); + assertDateInfo('yyyy-mm-ddThh:mm', { year: true, month: true, day: true, hours: true, minutes: true }); + assertDateInfo('yyyy-mm-ddThh:mm:ss', { year: true, month: true, day: true, hours: true, minutes: true, seconds: true }); + assertDateInfo('yyyy-mm-ddThh:mm:ss AM/PM', { year: true, month: true, day: true, hours: true, minutes: true, seconds: true, clockType: 12 }); - t.assertDateInfo('dd', { year: false, month: false, day: true }); + assertDateInfo('yy dd mm:ss', { year: true, day: true, month: true, seconds: true }); - t.assertDateInfo('yyyy-mm-dd', { year: true, month: true, day: true }); - t.assertDateInfo('dd-mm-yyyy', { year: true, month: true, day: true }); - t.assertDateInfo('dd yyyy', { year: true, day: true }); + assertDateInfo('dd', { year: false, month: false, day: true }); - t.end(); + assertDateInfo('yyyy-mm-dd', { year: true, month: true, day: true }); + assertDateInfo('dd-mm-yyyy', { year: true, month: true, day: true }); + assertDateInfo('dd yyyy', { year: true, day: true }); }); diff --git a/test/leap1900.spec.ts b/test/leap1900.spec.ts index b899ae5..e6ab023 100644 --- a/test/leap1900.spec.ts +++ b/test/leap1900.spec.ts @@ -1,136 +1,135 @@ -import test from './utils.js'; +import { expect, test } from 'vitest'; +import { format } from '../lib/index.js'; const ISODATE = 'yyyy-mm-dd'; -test('Excel leap 1900 bug: ON', t => { - t.format(ISODATE, 61, '1900-03-01', { leap1900: true }); - t.format(ISODATE, 60, '1900-02-29', { leap1900: true }); - t.format(ISODATE, 59, '1900-02-28', { leap1900: true }); - t.format(ISODATE, 58, '1900-02-27', { leap1900: true }); - t.format(ISODATE, 57, '1900-02-26', { leap1900: true }); - t.format(ISODATE, 56, '1900-02-25', { leap1900: true }); - t.format(ISODATE, 55, '1900-02-24', { leap1900: true }); - t.format(ISODATE, 54, '1900-02-23', { leap1900: true }); - t.format(ISODATE, 53, '1900-02-22', { leap1900: true }); - t.format(ISODATE, 52, '1900-02-21', { leap1900: true }); - t.format(ISODATE, 51, '1900-02-20', { leap1900: true }); - t.format(ISODATE, 50, '1900-02-19', { leap1900: true }); - t.format(ISODATE, 49, '1900-02-18', { leap1900: true }); - t.format(ISODATE, 48, '1900-02-17', { leap1900: true }); - t.format(ISODATE, 47, '1900-02-16', { leap1900: true }); - t.format(ISODATE, 46, '1900-02-15', { leap1900: true }); - t.format(ISODATE, 45, '1900-02-14', { leap1900: true }); - t.format(ISODATE, 44, '1900-02-13', { leap1900: true }); - t.format(ISODATE, 43, '1900-02-12', { leap1900: true }); - t.format(ISODATE, 42, '1900-02-11', { leap1900: true }); - t.format(ISODATE, 41, '1900-02-10', { leap1900: true }); - t.format(ISODATE, 40, '1900-02-09', { leap1900: true }); - t.format(ISODATE, 39, '1900-02-08', { leap1900: true }); - t.format(ISODATE, 38, '1900-02-07', { leap1900: true }); - t.format(ISODATE, 37, '1900-02-06', { leap1900: true }); - t.format(ISODATE, 36, '1900-02-05', { leap1900: true }); - t.format(ISODATE, 35, '1900-02-04', { leap1900: true }); - t.format(ISODATE, 34, '1900-02-03', { leap1900: true }); - t.format(ISODATE, 33, '1900-02-02', { leap1900: true }); - t.format(ISODATE, 32, '1900-02-01', { leap1900: true }); - t.format(ISODATE, 31, '1900-01-31', { leap1900: true }); - t.format(ISODATE, 30, '1900-01-30', { leap1900: true }); - t.format(ISODATE, 29, '1900-01-29', { leap1900: true }); - t.format(ISODATE, 28, '1900-01-28', { leap1900: true }); - t.format(ISODATE, 27, '1900-01-27', { leap1900: true }); - t.format(ISODATE, 26, '1900-01-26', { leap1900: true }); - t.format(ISODATE, 25, '1900-01-25', { leap1900: true }); - t.format(ISODATE, 24, '1900-01-24', { leap1900: true }); - t.format(ISODATE, 23, '1900-01-23', { leap1900: true }); - t.format(ISODATE, 22, '1900-01-22', { leap1900: true }); - t.format(ISODATE, 21, '1900-01-21', { leap1900: true }); - t.format(ISODATE, 20, '1900-01-20', { leap1900: true }); - t.format(ISODATE, 19, '1900-01-19', { leap1900: true }); - t.format(ISODATE, 18, '1900-01-18', { leap1900: true }); - t.format(ISODATE, 17, '1900-01-17', { leap1900: true }); - t.format(ISODATE, 16, '1900-01-16', { leap1900: true }); - t.format(ISODATE, 15, '1900-01-15', { leap1900: true }); - t.format(ISODATE, 14, '1900-01-14', { leap1900: true }); - t.format(ISODATE, 13, '1900-01-13', { leap1900: true }); - t.format(ISODATE, 12, '1900-01-12', { leap1900: true }); - t.format(ISODATE, 11, '1900-01-11', { leap1900: true }); - t.format(ISODATE, 10, '1900-01-10', { leap1900: true }); - t.format(ISODATE, 9, '1900-01-09', { leap1900: true }); - t.format(ISODATE, 8, '1900-01-08', { leap1900: true }); - t.format(ISODATE, 7, '1900-01-07', { leap1900: true }); - t.format(ISODATE, 6, '1900-01-06', { leap1900: true }); - t.format(ISODATE, 5, '1900-01-05', { leap1900: true }); - t.format(ISODATE, 4, '1900-01-04', { leap1900: true }); - t.format(ISODATE, 3, '1900-01-03', { leap1900: true }); - t.format(ISODATE, 2, '1900-01-02', { leap1900: true }); - t.format(ISODATE, 1, '1900-01-01', { leap1900: true }); - t.format(ISODATE, 0, '1900-01-00', { leap1900: true }); - t.end(); +test('Excel leap 1900 bug: ON', () => { + expect(format(ISODATE, 61, { leap1900: true })).toBe('1900-03-01'); + expect(format(ISODATE, 60, { leap1900: true })).toBe('1900-02-29'); + expect(format(ISODATE, 59, { leap1900: true })).toBe('1900-02-28'); + expect(format(ISODATE, 58, { leap1900: true })).toBe('1900-02-27'); + expect(format(ISODATE, 57, { leap1900: true })).toBe('1900-02-26'); + expect(format(ISODATE, 56, { leap1900: true })).toBe('1900-02-25'); + expect(format(ISODATE, 55, { leap1900: true })).toBe('1900-02-24'); + expect(format(ISODATE, 54, { leap1900: true })).toBe('1900-02-23'); + expect(format(ISODATE, 53, { leap1900: true })).toBe('1900-02-22'); + expect(format(ISODATE, 52, { leap1900: true })).toBe('1900-02-21'); + expect(format(ISODATE, 51, { leap1900: true })).toBe('1900-02-20'); + expect(format(ISODATE, 50, { leap1900: true })).toBe('1900-02-19'); + expect(format(ISODATE, 49, { leap1900: true })).toBe('1900-02-18'); + expect(format(ISODATE, 48, { leap1900: true })).toBe('1900-02-17'); + expect(format(ISODATE, 47, { leap1900: true })).toBe('1900-02-16'); + expect(format(ISODATE, 46, { leap1900: true })).toBe('1900-02-15'); + expect(format(ISODATE, 45, { leap1900: true })).toBe('1900-02-14'); + expect(format(ISODATE, 44, { leap1900: true })).toBe('1900-02-13'); + expect(format(ISODATE, 43, { leap1900: true })).toBe('1900-02-12'); + expect(format(ISODATE, 42, { leap1900: true })).toBe('1900-02-11'); + expect(format(ISODATE, 41, { leap1900: true })).toBe('1900-02-10'); + expect(format(ISODATE, 40, { leap1900: true })).toBe('1900-02-09'); + expect(format(ISODATE, 39, { leap1900: true })).toBe('1900-02-08'); + expect(format(ISODATE, 38, { leap1900: true })).toBe('1900-02-07'); + expect(format(ISODATE, 37, { leap1900: true })).toBe('1900-02-06'); + expect(format(ISODATE, 36, { leap1900: true })).toBe('1900-02-05'); + expect(format(ISODATE, 35, { leap1900: true })).toBe('1900-02-04'); + expect(format(ISODATE, 34, { leap1900: true })).toBe('1900-02-03'); + expect(format(ISODATE, 33, { leap1900: true })).toBe('1900-02-02'); + expect(format(ISODATE, 32, { leap1900: true })).toBe('1900-02-01'); + expect(format(ISODATE, 31, { leap1900: true })).toBe('1900-01-31'); + expect(format(ISODATE, 30, { leap1900: true })).toBe('1900-01-30'); + expect(format(ISODATE, 29, { leap1900: true })).toBe('1900-01-29'); + expect(format(ISODATE, 28, { leap1900: true })).toBe('1900-01-28'); + expect(format(ISODATE, 27, { leap1900: true })).toBe('1900-01-27'); + expect(format(ISODATE, 26, { leap1900: true })).toBe('1900-01-26'); + expect(format(ISODATE, 25, { leap1900: true })).toBe('1900-01-25'); + expect(format(ISODATE, 24, { leap1900: true })).toBe('1900-01-24'); + expect(format(ISODATE, 23, { leap1900: true })).toBe('1900-01-23'); + expect(format(ISODATE, 22, { leap1900: true })).toBe('1900-01-22'); + expect(format(ISODATE, 21, { leap1900: true })).toBe('1900-01-21'); + expect(format(ISODATE, 20, { leap1900: true })).toBe('1900-01-20'); + expect(format(ISODATE, 19, { leap1900: true })).toBe('1900-01-19'); + expect(format(ISODATE, 18, { leap1900: true })).toBe('1900-01-18'); + expect(format(ISODATE, 17, { leap1900: true })).toBe('1900-01-17'); + expect(format(ISODATE, 16, { leap1900: true })).toBe('1900-01-16'); + expect(format(ISODATE, 15, { leap1900: true })).toBe('1900-01-15'); + expect(format(ISODATE, 14, { leap1900: true })).toBe('1900-01-14'); + expect(format(ISODATE, 13, { leap1900: true })).toBe('1900-01-13'); + expect(format(ISODATE, 12, { leap1900: true })).toBe('1900-01-12'); + expect(format(ISODATE, 11, { leap1900: true })).toBe('1900-01-11'); + expect(format(ISODATE, 10, { leap1900: true })).toBe('1900-01-10'); + expect(format(ISODATE, 9, { leap1900: true })).toBe('1900-01-09'); + expect(format(ISODATE, 8, { leap1900: true })).toBe('1900-01-08'); + expect(format(ISODATE, 7, { leap1900: true })).toBe('1900-01-07'); + expect(format(ISODATE, 6, { leap1900: true })).toBe('1900-01-06'); + expect(format(ISODATE, 5, { leap1900: true })).toBe('1900-01-05'); + expect(format(ISODATE, 4, { leap1900: true })).toBe('1900-01-04'); + expect(format(ISODATE, 3, { leap1900: true })).toBe('1900-01-03'); + expect(format(ISODATE, 2, { leap1900: true })).toBe('1900-01-02'); + expect(format(ISODATE, 1, { leap1900: true })).toBe('1900-01-01'); + expect(format(ISODATE, 0, { leap1900: true })).toBe('1900-01-00'); }); -test('Excel 1900 bug: OFF', t => { - t.format(ISODATE, 61, '1900-03-01', { leap1900: false }); - t.format(ISODATE, 60, '1900-02-28', { leap1900: false }); - t.format(ISODATE, 59, '1900-02-27', { leap1900: false }); - t.format(ISODATE, 58, '1900-02-26', { leap1900: false }); - t.format(ISODATE, 57, '1900-02-25', { leap1900: false }); - t.format(ISODATE, 56, '1900-02-24', { leap1900: false }); - t.format(ISODATE, 55, '1900-02-23', { leap1900: false }); - t.format(ISODATE, 54, '1900-02-22', { leap1900: false }); - t.format(ISODATE, 53, '1900-02-21', { leap1900: false }); - t.format(ISODATE, 52, '1900-02-20', { leap1900: false }); - t.format(ISODATE, 51, '1900-02-19', { leap1900: false }); - t.format(ISODATE, 50, '1900-02-18', { leap1900: false }); - t.format(ISODATE, 49, '1900-02-17', { leap1900: false }); - t.format(ISODATE, 48, '1900-02-16', { leap1900: false }); - t.format(ISODATE, 47, '1900-02-15', { leap1900: false }); - t.format(ISODATE, 46, '1900-02-14', { leap1900: false }); - t.format(ISODATE, 45, '1900-02-13', { leap1900: false }); - t.format(ISODATE, 44, '1900-02-12', { leap1900: false }); - t.format(ISODATE, 43, '1900-02-11', { leap1900: false }); - t.format(ISODATE, 42, '1900-02-10', { leap1900: false }); - t.format(ISODATE, 41, '1900-02-09', { leap1900: false }); - t.format(ISODATE, 40, '1900-02-08', { leap1900: false }); - t.format(ISODATE, 39, '1900-02-07', { leap1900: false }); - t.format(ISODATE, 38, '1900-02-06', { leap1900: false }); - t.format(ISODATE, 37, '1900-02-05', { leap1900: false }); - t.format(ISODATE, 36, '1900-02-04', { leap1900: false }); - t.format(ISODATE, 35, '1900-02-03', { leap1900: false }); - t.format(ISODATE, 34, '1900-02-02', { leap1900: false }); - t.format(ISODATE, 33, '1900-02-01', { leap1900: false }); - t.format(ISODATE, 32, '1900-01-31', { leap1900: false }); - t.format(ISODATE, 31, '1900-01-30', { leap1900: false }); - t.format(ISODATE, 30, '1900-01-29', { leap1900: false }); - t.format(ISODATE, 29, '1900-01-28', { leap1900: false }); - t.format(ISODATE, 28, '1900-01-27', { leap1900: false }); - t.format(ISODATE, 27, '1900-01-26', { leap1900: false }); - t.format(ISODATE, 26, '1900-01-25', { leap1900: false }); - t.format(ISODATE, 25, '1900-01-24', { leap1900: false }); - t.format(ISODATE, 24, '1900-01-23', { leap1900: false }); - t.format(ISODATE, 23, '1900-01-22', { leap1900: false }); - t.format(ISODATE, 22, '1900-01-21', { leap1900: false }); - t.format(ISODATE, 21, '1900-01-20', { leap1900: false }); - t.format(ISODATE, 20, '1900-01-19', { leap1900: false }); - t.format(ISODATE, 19, '1900-01-18', { leap1900: false }); - t.format(ISODATE, 18, '1900-01-17', { leap1900: false }); - t.format(ISODATE, 17, '1900-01-16', { leap1900: false }); - t.format(ISODATE, 16, '1900-01-15', { leap1900: false }); - t.format(ISODATE, 15, '1900-01-14', { leap1900: false }); - t.format(ISODATE, 14, '1900-01-13', { leap1900: false }); - t.format(ISODATE, 13, '1900-01-12', { leap1900: false }); - t.format(ISODATE, 12, '1900-01-11', { leap1900: false }); - t.format(ISODATE, 11, '1900-01-10', { leap1900: false }); - t.format(ISODATE, 10, '1900-01-09', { leap1900: false }); - t.format(ISODATE, 9, '1900-01-08', { leap1900: false }); - t.format(ISODATE, 8, '1900-01-07', { leap1900: false }); - t.format(ISODATE, 7, '1900-01-06', { leap1900: false }); - t.format(ISODATE, 6, '1900-01-05', { leap1900: false }); - t.format(ISODATE, 5, '1900-01-04', { leap1900: false }); - t.format(ISODATE, 4, '1900-01-03', { leap1900: false }); - t.format(ISODATE, 3, '1900-01-02', { leap1900: false }); - t.format(ISODATE, 2, '1900-01-01', { leap1900: false }); - t.format(ISODATE, 1, '1899-12-31', { leap1900: false }); - t.format(ISODATE, 0, '1899-12-30', { leap1900: false }); - t.end(); +test('Excel 1900 bug: OFF', () => { + expect(format(ISODATE, 61, { leap1900: false })).toBe('1900-03-01'); + expect(format(ISODATE, 60, { leap1900: false })).toBe('1900-02-28'); + expect(format(ISODATE, 59, { leap1900: false })).toBe('1900-02-27'); + expect(format(ISODATE, 58, { leap1900: false })).toBe('1900-02-26'); + expect(format(ISODATE, 57, { leap1900: false })).toBe('1900-02-25'); + expect(format(ISODATE, 56, { leap1900: false })).toBe('1900-02-24'); + expect(format(ISODATE, 55, { leap1900: false })).toBe('1900-02-23'); + expect(format(ISODATE, 54, { leap1900: false })).toBe('1900-02-22'); + expect(format(ISODATE, 53, { leap1900: false })).toBe('1900-02-21'); + expect(format(ISODATE, 52, { leap1900: false })).toBe('1900-02-20'); + expect(format(ISODATE, 51, { leap1900: false })).toBe('1900-02-19'); + expect(format(ISODATE, 50, { leap1900: false })).toBe('1900-02-18'); + expect(format(ISODATE, 49, { leap1900: false })).toBe('1900-02-17'); + expect(format(ISODATE, 48, { leap1900: false })).toBe('1900-02-16'); + expect(format(ISODATE, 47, { leap1900: false })).toBe('1900-02-15'); + expect(format(ISODATE, 46, { leap1900: false })).toBe('1900-02-14'); + expect(format(ISODATE, 45, { leap1900: false })).toBe('1900-02-13'); + expect(format(ISODATE, 44, { leap1900: false })).toBe('1900-02-12'); + expect(format(ISODATE, 43, { leap1900: false })).toBe('1900-02-11'); + expect(format(ISODATE, 42, { leap1900: false })).toBe('1900-02-10'); + expect(format(ISODATE, 41, { leap1900: false })).toBe('1900-02-09'); + expect(format(ISODATE, 40, { leap1900: false })).toBe('1900-02-08'); + expect(format(ISODATE, 39, { leap1900: false })).toBe('1900-02-07'); + expect(format(ISODATE, 38, { leap1900: false })).toBe('1900-02-06'); + expect(format(ISODATE, 37, { leap1900: false })).toBe('1900-02-05'); + expect(format(ISODATE, 36, { leap1900: false })).toBe('1900-02-04'); + expect(format(ISODATE, 35, { leap1900: false })).toBe('1900-02-03'); + expect(format(ISODATE, 34, { leap1900: false })).toBe('1900-02-02'); + expect(format(ISODATE, 33, { leap1900: false })).toBe('1900-02-01'); + expect(format(ISODATE, 32, { leap1900: false })).toBe('1900-01-31'); + expect(format(ISODATE, 31, { leap1900: false })).toBe('1900-01-30'); + expect(format(ISODATE, 30, { leap1900: false })).toBe('1900-01-29'); + expect(format(ISODATE, 29, { leap1900: false })).toBe('1900-01-28'); + expect(format(ISODATE, 28, { leap1900: false })).toBe('1900-01-27'); + expect(format(ISODATE, 27, { leap1900: false })).toBe('1900-01-26'); + expect(format(ISODATE, 26, { leap1900: false })).toBe('1900-01-25'); + expect(format(ISODATE, 25, { leap1900: false })).toBe('1900-01-24'); + expect(format(ISODATE, 24, { leap1900: false })).toBe('1900-01-23'); + expect(format(ISODATE, 23, { leap1900: false })).toBe('1900-01-22'); + expect(format(ISODATE, 22, { leap1900: false })).toBe('1900-01-21'); + expect(format(ISODATE, 21, { leap1900: false })).toBe('1900-01-20'); + expect(format(ISODATE, 20, { leap1900: false })).toBe('1900-01-19'); + expect(format(ISODATE, 19, { leap1900: false })).toBe('1900-01-18'); + expect(format(ISODATE, 18, { leap1900: false })).toBe('1900-01-17'); + expect(format(ISODATE, 17, { leap1900: false })).toBe('1900-01-16'); + expect(format(ISODATE, 16, { leap1900: false })).toBe('1900-01-15'); + expect(format(ISODATE, 15, { leap1900: false })).toBe('1900-01-14'); + expect(format(ISODATE, 14, { leap1900: false })).toBe('1900-01-13'); + expect(format(ISODATE, 13, { leap1900: false })).toBe('1900-01-12'); + expect(format(ISODATE, 12, { leap1900: false })).toBe('1900-01-11'); + expect(format(ISODATE, 11, { leap1900: false })).toBe('1900-01-10'); + expect(format(ISODATE, 10, { leap1900: false })).toBe('1900-01-09'); + expect(format(ISODATE, 9, { leap1900: false })).toBe('1900-01-08'); + expect(format(ISODATE, 8, { leap1900: false })).toBe('1900-01-07'); + expect(format(ISODATE, 7, { leap1900: false })).toBe('1900-01-06'); + expect(format(ISODATE, 6, { leap1900: false })).toBe('1900-01-05'); + expect(format(ISODATE, 5, { leap1900: false })).toBe('1900-01-04'); + expect(format(ISODATE, 4, { leap1900: false })).toBe('1900-01-03'); + expect(format(ISODATE, 3, { leap1900: false })).toBe('1900-01-02'); + expect(format(ISODATE, 2, { leap1900: false })).toBe('1900-01-01'); + expect(format(ISODATE, 1, { leap1900: false })).toBe('1899-12-31'); + expect(format(ISODATE, 0, { leap1900: false })).toBe('1899-12-30'); }); diff --git a/test/locale.spec.ts b/test/locale.spec.ts index 4c4571c..9efa3c9 100644 --- a/test/locale.spec.ts +++ b/test/locale.spec.ts @@ -1,11 +1,11 @@ -import test from './utils.js'; -import { addLocale } from '../lib/index.js'; +import { expect, test } from 'vitest'; +import { addLocale, format } from '../lib/index.js'; const date = 3290.1278435; // 1909-01-02 03:04:05.678 -test('locale options', t => { +test('locale options', () => { // default locale - t.format('dddd, dd. mmmm yyy', date, 'Saturday, 02. January 1909'); + expect(format('dddd, dd. mmmm yyy', date)).toBe('Saturday, 02. January 1909'); // General is localized addLocale({ @@ -15,102 +15,100 @@ test('locale options', t => { percent: '٪', exponent: 'X' }, 'xx'); - t.format('General', 123456700000000, '1·23457Xᐩ14', { locale: 'xx' }); - t.format('General', 10000000000, '10000000000', { locale: 'xx' }); - t.format('General', 0.000000001, '0·000000001', { locale: 'xx' }); - t.format('General', 1234.56, '1234·56', { locale: 'xx' }); - t.format('General', 0.1, '0·1', { locale: 'xx' }); + expect(format('General', 123456700000000, { locale: 'xx' })).toBe('1·23457Xᐩ14'); + expect(format('General', 10000000000, { locale: 'xx' })).toBe('10000000000'); + expect(format('General', 0.000000001, { locale: 'xx' })).toBe('0·000000001'); + expect(format('General', 1234.56, { locale: 'xx' })).toBe('1234·56'); + expect(format('General', 0.1, { locale: 'xx' })).toBe('0·1'); // general should respect locale in all cases - t.format('General', 0.0001, '0,0001', { locale: 'de' }); - t.format('General', 10000000000, '10000000000', { locale: 'de' }); - t.format('General', 1.1, '1,1', { locale: 'de' }); - t.format('General', 1.1, '1,1', { locale: 'de' }); - t.format('General', 1000000000.1, '1000000000', { locale: 'de' }); - t.format('General', 1.1111111111, '1,111111111', { locale: 'de' }); - t.format('General', 1.1e-9, '1,1E-09', { locale: 'de' }); - t.format('General', 1.1e-10, '1,1E-10', { locale: 'de' }); - t.format('General', 1.1e-10, '1,1E-10', { locale: 'de' }); + expect(format('General', 0.0001, { locale: 'de' })).toBe('0,0001'); + expect(format('General', 10000000000, { locale: 'de' })).toBe('10000000000'); + expect(format('General', 1.1, { locale: 'de' })).toBe('1,1'); + expect(format('General', 1.1, { locale: 'de' })).toBe('1,1'); + expect(format('General', 1000000000.1, { locale: 'de' })).toBe('1000000000'); + expect(format('General', 1.1111111111, { locale: 'de' })).toBe('1,111111111'); + expect(format('General', 1.1e-9, { locale: 'de' })).toBe('1,1E-09'); + expect(format('General', 1.1e-10, { locale: 'de' })).toBe('1,1E-10'); + expect(format('General', 1.1e-10, { locale: 'de' })).toBe('1,1E-10'); // #59 - t.format('General', 111.1111111, '111,1111111', { locale: 'de' }); - t.format('General', 111.11111111, '111,1111111', { locale: 'de' }); - t.format('General', 111.111111111, '111,1111111', { locale: 'de' }); + expect(format('General', 111.1111111, { locale: 'de' })).toBe('111,1111111'); + expect(format('General', 111.11111111, { locale: 'de' })).toBe('111,1111111'); + expect(format('General', 111.111111111, { locale: 'de' })).toBe('111,1111111'); // different locale address modes (both is-IS and is_IS are supported) - t.format('[$-is]dddd, dd. mmmm yyy', date, 'laugardagur, 02. janúar 1909'); - t.format('[$-is_IS]dddd, dd. mmmm yyy', date, 'laugardagur, 02. janúar 1909'); - t.format('[$-is_IS]dddd, dd. mmmm yyy', date, 'laugardagur, 02. janúar 1909'); - t.format('[$-is_IS]dddd, dd. mmmm yyy', date, 'laugardagur, 02. janúar 1909'); - t.format('[$-is-IS]dddd, dd. mmmm yyy', date, 'laugardagur, 02. janúar 1909'); - t.format('[$-040F]dddd, dd. mmmm yyy', date, 'laugardagur, 02. janúar 1909'); - t.format('[$-01040F]dddd, dd. mmmm yyy', date, 'laugardagur, 02. janúar 1909'); - t.format('[$-00040F]dddd, dd. mmmm yyy', date, 'laugardagur, 02. janúar 1909'); - t.format('[$-0000040F]dddd, dd. mmmm yyy', date, 'laugardagur, 02. janúar 1909'); - t.format('[$-0101040F]dddd, dd. mmmm yyy', date, 'laugardagur, 02. janúar 1909'); - t.format('dddd, dd. mmmm yyy', date, 'laugardagur, 02. janúar 1909', { locale: 'is' }); + expect(format('[$-is]dddd, dd. mmmm yyy', date)).toBe('laugardagur, 02. janúar 1909'); + expect(format('[$-is_IS]dddd, dd. mmmm yyy', date)).toBe('laugardagur, 02. janúar 1909'); + expect(format('[$-is_IS]dddd, dd. mmmm yyy', date)).toBe('laugardagur, 02. janúar 1909'); + expect(format('[$-is_IS]dddd, dd. mmmm yyy', date)).toBe('laugardagur, 02. janúar 1909'); + expect(format('[$-is-IS]dddd, dd. mmmm yyy', date)).toBe('laugardagur, 02. janúar 1909'); + expect(format('[$-040F]dddd, dd. mmmm yyy', date)).toBe('laugardagur, 02. janúar 1909'); + expect(format('[$-01040F]dddd, dd. mmmm yyy', date)).toBe('laugardagur, 02. janúar 1909'); + expect(format('[$-00040F]dddd, dd. mmmm yyy', date)).toBe('laugardagur, 02. janúar 1909'); + expect(format('[$-0000040F]dddd, dd. mmmm yyy', date)).toBe('laugardagur, 02. janúar 1909'); + expect(format('[$-0101040F]dddd, dd. mmmm yyy', date)).toBe('laugardagur, 02. janúar 1909'); + expect(format('dddd, dd. mmmm yyy', date, { locale: 'is' })).toBe('laugardagur, 02. janúar 1909'); // setting a locale does not overwrite the format locale - t.format('[$-040F]dddd, dd. mmmm yyy', date, 'laugardagur, 02. janúar 1909', { locale: 'fr' }); + expect(format('[$-040F]dddd, dd. mmmm yyy', date, { locale: 'fr' })).toBe('laugardagur, 02. janúar 1909'); // all types are present - t.format('d dd ddd dddd ddddd', date, '2 02 lau. laugardagur laugardagur', { locale: 'is' }); - t.format('m mm mmm mmmm mmmmm', date, '1 01 jan. janúar j', { locale: 'is' }); - t.format('#,##0.000', date, '3.290,128', { locale: 'is' }); - t.format('h AM/PM', date, '3 f.h.', { locale: 'is' }); + expect(format('d dd ddd dddd ddddd', date, { locale: 'is' })).toBe('2 02 lau. laugardagur laugardagur'); + expect(format('m mm mmm mmmm mmmmm', date, { locale: 'is' })).toBe('1 01 jan. janúar j'); + expect(format('#,##0.000', date, { locale: 'is' })).toBe('3.290,128'); + expect(format('h AM/PM', date, { locale: 'is' })).toBe('3 f.h.'); - t.format('d dd ddd dddd ddddd', date, '2 02 周六 星期六 星期六', { locale: 'zh-CH' }); - t.format('m mm mmm mmmm mmmmm', date, '1 01 1月 一月 一', { locale: 'zh-CH' }); - t.format('#,##0.000', date, '3,290.128', { locale: 'zh-CH' }); - t.format('h AM/PM', date, '3 上午', { locale: 'zh-CH' }); + expect(format('d dd ddd dddd ddddd', date, { locale: 'zh-CH' })).toBe('2 02 周六 星期六 星期六'); + expect(format('m mm mmm mmmm mmmmm', date, { locale: 'zh-CH' })).toBe('1 01 1月 一月 一'); + expect(format('#,##0.000', date, { locale: 'zh-CH' })).toBe('3,290.128'); + expect(format('h AM/PM', date, { locale: 'zh-CH' })).toBe('3 上午'); - t.format('d dd ddd dddd ddddd', date, '2 02 сб суббота суббота', { locale: 0x0419 }); - t.format('m mm mmm mmmm mmmmm', date, '1 01 янв. января я', { locale: 0x0419 }); - t.format('#,##0.000', date, '3\u00a0290,128', { locale: 0x0419 }); - t.format('h AM/PM', date, '3 AM', { locale: 0x0419 }); + expect(format('d dd ddd dddd ddddd', date, { locale: 0x0419 })).toBe('2 02 сб суббота суббота'); + expect(format('m mm mmm mmmm mmmmm', date, { locale: 0x0419 })).toBe('1 01 янв. января я'); + expect(format('#,##0.000', date, { locale: 0x0419 })).toBe('3\u00a0290,128'); + expect(format('h AM/PM', date, { locale: 0x0419 })).toBe('3 AM'); // Currency - t.format('[$$-409]#,##0', 1234, '$1,234'); - t.format('#,##0\\ [$kr-438]', 1234, '1,234 kr'); - t.format('[$ISK] #,##0', 1234, 'ISK 1,234'); - t.format('[$ISK-] #,##0', 1234, 'ISK 1,234'); - t.format('[$NZ$-481]#,##0', 1234, 'NZ$1,234'); - t.format('[$whatever is here just gets through] #,##0', 1234, 'whatever is here just gets through 1,234'); + expect(format('[$$-409]#,##0', 1234)).toBe('$1,234'); + expect(format('#,##0\\ [$kr-438]', 1234)).toBe('1,234 kr'); + expect(format('[$ISK] #,##0', 1234)).toBe('ISK 1,234'); + expect(format('[$ISK-] #,##0', 1234)).toBe('ISK 1,234'); + expect(format('[$NZ$-481]#,##0', 1234)).toBe('NZ$1,234'); + expect(format('[$whatever is here just gets through] #,##0', 1234)).toBe('whatever is here just gets through 1,234'); // Hijri month names are emitted - t.format('[$-060409]mmmm', 42999, 'Muharram'); - t.format('[$-060409]mmmm', 43029, 'Safar'); - t.format('[$-060409]mmmm', 43058, 'Rabiʻ I'); - t.format('[$-060409]mmmm', 43088, 'Rabiʻ II'); - t.format('[$-060409]mmmm', 43118, 'Jumada I'); - t.format('[$-060409]mmmm', 43148, 'Jumada II'); - t.format('[$-060409]mmmm', 43177, 'Rajab'); - t.format('[$-060409]mmmm', 43207, 'Shaʻban'); - t.format('[$-060409]mmmm', 43237, 'Ramadan'); - t.format('[$-060409]mmmm', 43266, 'Shawwal'); - t.format('[$-060409]mmmm', 43295, 'Dhuʻl-Qiʻdah'); - t.format('[$-060409]mmmm', 43324, 'Dhuʻl-Hijjah'); - - t.format('[$Fr.-807] #,##0.00', 12345.67, 'Fr. 12\'345.67'); + expect(format('[$-060409]mmmm', 42999)).toBe('Muharram'); + expect(format('[$-060409]mmmm', 43029)).toBe('Safar'); + expect(format('[$-060409]mmmm', 43058)).toBe('Rabiʻ I'); + expect(format('[$-060409]mmmm', 43088)).toBe('Rabiʻ II'); + expect(format('[$-060409]mmmm', 43118)).toBe('Jumada I'); + expect(format('[$-060409]mmmm', 43148)).toBe('Jumada II'); + expect(format('[$-060409]mmmm', 43177)).toBe('Rajab'); + expect(format('[$-060409]mmmm', 43207)).toBe('Shaʻban'); + expect(format('[$-060409]mmmm', 43237)).toBe('Ramadan'); + expect(format('[$-060409]mmmm', 43266)).toBe('Shawwal'); + expect(format('[$-060409]mmmm', 43295)).toBe('Dhuʻl-Qiʻdah'); + expect(format('[$-060409]mmmm', 43324)).toBe('Dhuʻl-Hijjah'); + + expect(format('[$Fr.-807] #,##0.00', 12345.67)).toBe('Fr. 12\'345.67'); // TODO: names for hijri months // Next test is known to be incorrect, Excel emits "1439 محرم 1" - t.format('B2yyyy mmmm d', 42999, '1439 Muharram 1', 'B2yyyy mmmm d'); - - t.format('[$-060409]yyyy mmmm d', 42999, '1439 Muharram 1', '[$-060409]yyyy mmmm d'); - t.format('[$-060C01]yyyy mmmm d', 42999, '1439 رمضان 1', '[$-060C01]yyyy mmmm d'); - t.format('[$-010C01]yyyy mmmm d', 42999, '2017 سبتمبر 21', '[$-010C01]yyyy mmmm d'); - - t.format('[$-0409]B2yyyy mmmm d', 42999, '2017 September 21', '[$-0409]yyyy mmmm d'); - - t.format('General', true, 'TRUE', { locale: 'en' }); - t.format('General', false, 'FALSE', { locale: 'en' }); - t.format('General', true, 'VRAI', { locale: 'fr' }); - t.format('General', false, 'FAUX', { locale: 'fr' }); - t.format('General', true, 'TRUE', { locale: 'is' }); - t.format('General', false, 'FALSE', { locale: 'is' }); - t.format('General', true, 'WAAR', { locale: 'nl' }); - t.format('General', false, 'ONWAAR', { locale: 'nl' }); - - t.end(); + expect(format('B2yyyy mmmm d', 42999), 'B2yyyy mmmm d').toBe('1439 Muharram 1'); + + expect(format('[$-060409]yyyy mmmm d', 42999), '[$-060409]yyyy mmmm d').toBe('1439 Muharram 1'); + expect(format('[$-060C01]yyyy mmmm d', 42999), '[$-060C01]yyyy mmmm d').toBe('1439 رمضان 1'); + expect(format('[$-010C01]yyyy mmmm d', 42999), '[$-010C01]yyyy mmmm d').toBe('2017 سبتمبر 21'); + + expect(format('[$-0409]B2yyyy mmmm d', 42999), '[$-0409]yyyy mmmm d').toBe('2017 September 21'); + + expect(format('General', true, { locale: 'en' })).toBe('TRUE'); + expect(format('General', false, { locale: 'en' })).toBe('FALSE'); + expect(format('General', true, { locale: 'fr' })).toBe('VRAI'); + expect(format('General', false, { locale: 'fr' })).toBe('FAUX'); + expect(format('General', true, { locale: 'is' })).toBe('TRUE'); + expect(format('General', false, { locale: 'is' })).toBe('FALSE'); + expect(format('General', true, { locale: 'nl' })).toBe('WAAR'); + expect(format('General', false, { locale: 'nl' })).toBe('ONWAAR'); }); diff --git a/test/numdec.spec.ts b/test/numdec.spec.ts index 8c0fdeb..ccb8b54 100644 --- a/test/numdec.spec.ts +++ b/test/numdec.spec.ts @@ -1,556 +1,553 @@ /* eslint-disable no-loss-of-precision */ // tests converted from SSF -import test from 'tape'; +import { expect, test } from 'vitest'; import numdec from '../lib/numdec.js'; -function _f (v) { +function _f (v: number) { return numdec(v).total; } -test('numdec', t => { - t.equal(_f(1.234567E-14), 22, '1.234567E-14'); - t.equal(_f(1.234567E-13), 21, '1.234567E-13'); - t.equal(_f(0.000000000001234567), 20, '0.000000000001234567'); - t.equal(_f(0.00000000001234567), 19, '0.00000000001234567'); - t.equal(_f(0.0000000001234567), 18, '0.0000000001234567'); - t.equal(_f(0.000000001234567), 17, '0.000000001234567'); - t.equal(_f(0.00000001234567), 16, '0.00000001234567'); - t.equal(_f(0.0000001234567), 15, '0.0000001234567'); - t.equal(_f(0.000001234567), 14, '0.000001234567'); - t.equal(_f(0.00001234567), 13, '0.00001234567'); - t.equal(_f(0.0001234567), 12, '0.0001234567'); - t.equal(_f(0.001234567), 11, '0.001234567'); - t.equal(_f(0.01234567), 10, '0.01234567'); - t.equal(_f(0.1234567), 9, '0.1234567'); - t.equal(_f(1.234567), 8, '1.234567'); - t.equal(_f(12.34567), 8, '12.34567'); - t.equal(_f(123.4567), 8, '123.4567'); - t.equal(_f(1234.567), 8, '1234.567'); - t.equal(_f(12345.67), 8, '12345.67'); - t.equal(_f(123456.7), 8, '123456.7'); - t.equal(_f(1234567), 7, '1234567'); - t.equal(_f(12345670), 8, '12345670'); - t.equal(_f(123456700), 9, '123456700'); - t.equal(_f(1234567000), 10, '1234567000'); - t.equal(_f(12345670000), 11, '12345670000'); - t.equal(_f(123456700000), 12, '123456700000'); - t.equal(_f(1234567000000), 13, '1234567000000'); - t.equal(_f(12345670000000), 14, '12345670000000'); - t.equal(_f(123456700000000), 15, '123456700000000'); - t.equal(_f(0.00000000000001), 16, '0.00000000000001'); - t.equal(_f(0.0000000000001), 15, '0.0000000000001'); - t.equal(_f(0.000000000001), 14, '0.000000000001'); - t.equal(_f(0.00000000001), 13, '0.00000000001'); - t.equal(_f(0.0000000001), 12, '0.0000000001'); - t.equal(_f(0.000000001), 11, '0.000000001'); - t.equal(_f(0.00000001), 10, '0.00000001'); - t.equal(_f(0.0000001), 9, '0.0000001'); - t.equal(_f(0.000001), 8, '0.000001'); - t.equal(_f(0.00001), 7, '0.00001'); - t.equal(_f(0.0001), 6, '0.0001'); - t.equal(_f(0.001), 5, '0.001'); - t.equal(_f(0.01), 4, '0.01'); - t.equal(_f(0.1), 3, '0.1'); - t.equal(_f(1), 1, '1'); - t.equal(_f(10), 2, '10'); - t.equal(_f(100), 3, '100'); - t.equal(_f(1000), 4, '1000'); - t.equal(_f(10000), 5, '10000'); - t.equal(_f(100000), 6, '100000'); - t.equal(_f(1000000), 7, '1000000'); - t.equal(_f(10000000), 8, '10000000'); - t.equal(_f(100000000), 9, '100000000'); - t.equal(_f(1000000000), 10, '1000000000'); - t.equal(_f(10000000000), 11, '10000000000'); - t.equal(_f(100000000000), 12, '100000000000'); - t.equal(_f(1000000000000), 13, '1000000000000'); - t.equal(_f(10000000000000), 14, '10000000000000'); - t.equal(_f(100000000000000), 15, '100000000000000'); - t.equal(_f(0.000000000000012), 17, '0.000000000000012'); - t.equal(_f(0.00000000000012), 16, '0.00000000000012'); - t.equal(_f(0.0000000000012), 15, '0.0000000000012'); - t.equal(_f(0.000000000012), 14, '0.000000000012'); - t.equal(_f(0.00000000012), 13, '0.00000000012'); - t.equal(_f(0.0000000012), 12, '0.0000000012'); - t.equal(_f(0.000000012), 11, '0.000000012'); - t.equal(_f(0.00000012), 10, '0.00000012'); - t.equal(_f(0.0000012), 9, '0.0000012'); - t.equal(_f(0.000012), 8, '0.000012'); - t.equal(_f(0.00012), 7, '0.00012'); - t.equal(_f(0.0012), 6, '0.0012'); - t.equal(_f(0.012), 5, '0.012'); - t.equal(_f(0.12), 4, '0.12'); - t.equal(_f(1.2), 3, '1.2'); - t.equal(_f(12), 2, '12'); - t.equal(_f(120), 3, '120'); - t.equal(_f(1200), 4, '1200'); - t.equal(_f(12000), 5, '12000'); - t.equal(_f(120000), 6, '120000'); - t.equal(_f(1200000), 7, '1200000'); - t.equal(_f(12000000), 8, '12000000'); - t.equal(_f(120000000), 9, '120000000'); - t.equal(_f(1200000000), 10, '1200000000'); - t.equal(_f(12000000000), 11, '12000000000'); - t.equal(_f(120000000000), 12, '120000000000'); - t.equal(_f(1200000000000), 13, '1200000000000'); - t.equal(_f(12000000000000), 14, '12000000000000'); - t.equal(_f(120000000000000), 15, '120000000000000'); - t.equal(_f(0.0000000000000123), 18, '0.0000000000000123'); - t.equal(_f(0.000000000000123), 17, '0.000000000000123'); - t.equal(_f(0.00000000000123), 16, '0.00000000000123'); - t.equal(_f(0.0000000000123), 15, '0.0000000000123'); - t.equal(_f(0.000000000123), 14, '0.000000000123'); - t.equal(_f(0.00000000123), 13, '0.00000000123'); - t.equal(_f(0.0000000123), 12, '0.0000000123'); - t.equal(_f(0.000000123), 11, '0.000000123'); - t.equal(_f(0.00000123), 10, '0.00000123'); - t.equal(_f(0.0000123), 9, '0.0000123'); - t.equal(_f(0.000123), 8, '0.000123'); - t.equal(_f(0.00123), 7, '0.00123'); - t.equal(_f(0.0123), 6, '0.0123'); - t.equal(_f(0.123), 5, '0.123'); - t.equal(_f(1.23), 4, '1.23'); - t.equal(_f(12.3), 4, '12.3'); - t.equal(_f(123), 3, '123'); - t.equal(_f(1230), 4, '1230'); - t.equal(_f(12300), 5, '12300'); - t.equal(_f(123000), 6, '123000'); - t.equal(_f(1230000), 7, '1230000'); - t.equal(_f(12300000), 8, '12300000'); - t.equal(_f(123000000), 9, '123000000'); - t.equal(_f(1230000000), 10, '1230000000'); - t.equal(_f(12300000000), 11, '12300000000'); - t.equal(_f(123000000000), 12, '123000000000'); - t.equal(_f(1230000000000), 13, '1230000000000'); - t.equal(_f(12300000000000), 14, '12300000000000'); - t.equal(_f(123000000000000), 15, '123000000000000'); - t.equal(_f(0.00000000000001234), 19, '0.00000000000001234'); - t.equal(_f(0.0000000000001234), 18, '0.0000000000001234'); - t.equal(_f(0.000000000001234), 17, '0.000000000001234'); - t.equal(_f(0.00000000001234), 16, '0.00000000001234'); - t.equal(_f(0.0000000001234), 15, '0.0000000001234'); - t.equal(_f(0.000000001234), 14, '0.000000001234'); - t.equal(_f(0.00000001234), 13, '0.00000001234'); - t.equal(_f(0.0000001234), 12, '0.0000001234'); - t.equal(_f(0.000001234), 11, '0.000001234'); - t.equal(_f(0.00001234), 10, '0.00001234'); - t.equal(_f(0.0001234), 9, '0.0001234'); - t.equal(_f(0.001234), 8, '0.001234'); - t.equal(_f(0.01234), 7, '0.01234'); - t.equal(_f(0.1234), 6, '0.1234'); - t.equal(_f(1.234), 5, '1.234'); - t.equal(_f(12.34), 5, '12.34'); - t.equal(_f(123.4), 5, '123.4'); - t.equal(_f(1234), 4, '1234'); - t.equal(_f(12340), 5, '12340'); - t.equal(_f(123400), 6, '123400'); - t.equal(_f(1234000), 7, '1234000'); - t.equal(_f(12340000), 8, '12340000'); - t.equal(_f(123400000), 9, '123400000'); - t.equal(_f(1234000000), 10, '1234000000'); - t.equal(_f(12340000000), 11, '12340000000'); - t.equal(_f(123400000000), 12, '123400000000'); - t.equal(_f(1234000000000), 13, '1234000000000'); - t.equal(_f(12340000000000), 14, '12340000000000'); - t.equal(_f(123400000000000), 15, '123400000000000'); - t.equal(_f(0.000000000000012345), 20, '0.000000000000012345'); - t.equal(_f(0.00000000000012345), 19, '0.00000000000012345'); - t.equal(_f(0.0000000000012345), 18, '0.0000000000012345'); - t.equal(_f(0.000000000012345), 17, '0.000000000012345'); - t.equal(_f(0.00000000012345), 16, '0.00000000012345'); - t.equal(_f(0.0000000012345), 15, '0.0000000012345'); - t.equal(_f(0.000000012345), 14, '0.000000012345'); - t.equal(_f(0.00000012345), 13, '0.00000012345'); - t.equal(_f(0.0000012345), 12, '0.0000012345'); - t.equal(_f(0.000012345), 11, '0.000012345'); - t.equal(_f(0.00012345), 10, '0.00012345'); - t.equal(_f(0.0012345), 9, '0.0012345'); - t.equal(_f(0.012345), 8, '0.012345'); - t.equal(_f(0.12345), 7, '0.12345'); - t.equal(_f(1.2345), 6, '1.2345'); - t.equal(_f(12.345), 6, '12.345'); - t.equal(_f(123.45), 6, '123.45'); - t.equal(_f(1234.5), 6, '1234.5'); - t.equal(_f(12345), 5, '12345'); - t.equal(_f(123450), 6, '123450'); - t.equal(_f(1234500), 7, '1234500'); - t.equal(_f(12345000), 8, '12345000'); - t.equal(_f(123450000), 9, '123450000'); - t.equal(_f(1234500000), 10, '1234500000'); - t.equal(_f(12345000000), 11, '12345000000'); - t.equal(_f(123450000000), 12, '123450000000'); - t.equal(_f(1234500000000), 13, '1234500000000'); - t.equal(_f(12345000000000), 14, '12345000000000'); - t.equal(_f(123450000000000), 15, '123450000000000'); - t.equal(_f(1.23456E-14), 21, '1.23456E-14'); - t.equal(_f(0.000000000000123456), 20, '0.000000000000123456'); - t.equal(_f(0.00000000000123456), 19, '0.00000000000123456'); - t.equal(_f(0.0000000000123456), 18, '0.0000000000123456'); - t.equal(_f(0.000000000123456), 17, '0.000000000123456'); - t.equal(_f(0.00000000123456), 16, '0.00000000123456'); - t.equal(_f(0.0000000123456), 15, '0.0000000123456'); - t.equal(_f(0.000000123456), 14, '0.000000123456'); - t.equal(_f(0.00000123456), 13, '0.00000123456'); - t.equal(_f(0.0000123456), 12, '0.0000123456'); - t.equal(_f(0.000123456), 11, '0.000123456'); - t.equal(_f(0.00123456), 10, '0.00123456'); - t.equal(_f(0.0123456), 9, '0.0123456'); - t.equal(_f(0.123456), 8, '0.123456'); - t.equal(_f(1.23456), 7, '1.23456'); - t.equal(_f(12.3456), 7, '12.3456'); - t.equal(_f(123.456), 7, '123.456'); - t.equal(_f(1234.56), 7, '1234.56'); - t.equal(_f(12345.6), 7, '12345.6'); - t.equal(_f(123456), 6, '123456'); - t.equal(_f(1234560), 7, '1234560'); - t.equal(_f(12345600), 8, '12345600'); - t.equal(_f(123456000), 9, '123456000'); - t.equal(_f(1234560000), 10, '1234560000'); - t.equal(_f(12345600000), 11, '12345600000'); - t.equal(_f(123456000000), 12, '123456000000'); - t.equal(_f(1234560000000), 13, '1234560000000'); - t.equal(_f(12345600000000), 14, '12345600000000'); - t.equal(_f(123456000000000), 15, '123456000000000'); - t.equal(_f(1.234567E-14), 22, '1.234567E-14'); - t.equal(_f(1.234567E-13), 21, '1.234567E-13'); - t.equal(_f(0.000000000001234567), 20, '0.000000000001234567'); - t.equal(_f(0.00000000001234567), 19, '0.00000000001234567'); - t.equal(_f(0.0000000001234567), 18, '0.0000000001234567'); - t.equal(_f(0.000000001234567), 17, '0.000000001234567'); - t.equal(_f(0.00000001234567), 16, '0.00000001234567'); - t.equal(_f(0.0000001234567), 15, '0.0000001234567'); - t.equal(_f(0.000001234567), 14, '0.000001234567'); - t.equal(_f(0.00001234567), 13, '0.00001234567'); - t.equal(_f(0.0001234567), 12, '0.0001234567'); - t.equal(_f(0.001234567), 11, '0.001234567'); - t.equal(_f(0.01234567), 10, '0.01234567'); - t.equal(_f(0.1234567), 9, '0.1234567'); - t.equal(_f(1.234567), 8, '1.234567'); - t.equal(_f(12.34567), 8, '12.34567'); - t.equal(_f(123.4567), 8, '123.4567'); - t.equal(_f(1234.567), 8, '1234.567'); - t.equal(_f(12345.67), 8, '12345.67'); - t.equal(_f(123456.7), 8, '123456.7'); - t.equal(_f(1234567), 7, '1234567'); - t.equal(_f(12345670), 8, '12345670'); - t.equal(_f(123456700), 9, '123456700'); - t.equal(_f(1234567000), 10, '1234567000'); - t.equal(_f(12345670000), 11, '12345670000'); - t.equal(_f(123456700000), 12, '123456700000'); - t.equal(_f(1234567000000), 13, '1234567000000'); - t.equal(_f(12345670000000), 14, '12345670000000'); - t.equal(_f(123456700000000), 15, '123456700000000'); - t.equal(_f(1.2345678E-14), 23, '1.2345678E-14'); - t.equal(_f(1.2345678E-13), 22, '1.2345678E-13'); - t.equal(_f(1.2345678E-12), 21, '1.2345678E-12'); - t.equal(_f(0.000000000012345678), 20, '0.000000000012345678'); - t.equal(_f(0.00000000012345678), 19, '0.00000000012345678'); - t.equal(_f(0.0000000012345678), 18, '0.0000000012345678'); - t.equal(_f(0.000000012345678), 17, '0.000000012345678'); - t.equal(_f(0.00000012345678), 16, '0.00000012345678'); - t.equal(_f(0.0000012345678), 15, '0.0000012345678'); - t.equal(_f(0.000012345678), 14, '0.000012345678'); - t.equal(_f(0.00012345678), 13, '0.00012345678'); - t.equal(_f(0.0012345678), 12, '0.0012345678'); - t.equal(_f(0.012345678), 11, '0.012345678'); - t.equal(_f(0.12345678), 10, '0.12345678'); - t.equal(_f(1.2345678), 9, '1.2345678'); - t.equal(_f(12.345678), 9, '12.345678'); - t.equal(_f(123.45678), 9, '123.45678'); - t.equal(_f(1234.5678), 9, '1234.5678'); - t.equal(_f(12345.678), 9, '12345.678'); - t.equal(_f(123456.78), 9, '123456.78'); - t.equal(_f(1234567.8), 9, '1234567.8'); - t.equal(_f(12345678), 8, '12345678'); - t.equal(_f(123456780), 9, '123456780'); - t.equal(_f(1234567800), 10, '1234567800'); - t.equal(_f(12345678000), 11, '12345678000'); - t.equal(_f(123456780000), 12, '123456780000'); - t.equal(_f(1234567800000), 13, '1234567800000'); - t.equal(_f(12345678000000), 14, '12345678000000'); - t.equal(_f(123456780000000), 15, '123456780000000'); - t.equal(_f(1.23456789E-14), 24, '1.23456789E-14'); - t.equal(_f(1.23456789E-13), 23, '1.23456789E-13'); - t.equal(_f(1.23456789E-12), 22, '1.23456789E-12'); - t.equal(_f(1.23456789E-11), 21, '1.23456789E-11'); - t.equal(_f(0.000000000123456789), 20, '0.000000000123456789'); - t.equal(_f(0.00000000123456789), 19, '0.00000000123456789'); - t.equal(_f(0.0000000123456789), 18, '0.0000000123456789'); - t.equal(_f(0.000000123456789), 17, '0.000000123456789'); - t.equal(_f(0.00000123456789), 16, '0.00000123456789'); - t.equal(_f(0.0000123456789), 15, '0.0000123456789'); - t.equal(_f(0.000123456789), 14, '0.000123456789'); - t.equal(_f(0.00123456789), 13, '0.00123456789'); - t.equal(_f(0.0123456789), 12, '0.0123456789'); - t.equal(_f(0.123456789), 11, '0.123456789'); - t.equal(_f(1.23456789), 10, '1.23456789'); - t.equal(_f(12.3456789), 10, '12.3456789'); - t.equal(_f(123.456789), 10, '123.456789'); - t.equal(_f(1234.56789), 10, '1234.56789'); - t.equal(_f(12345.6789), 10, '12345.6789'); - t.equal(_f(123456.789), 10, '123456.789'); - t.equal(_f(1234567.89), 10, '1234567.89'); - t.equal(_f(12345678.9), 10, '12345678.9'); - t.equal(_f(123456789), 9, '123456789'); - t.equal(_f(1234567890), 10, '1234567890'); - t.equal(_f(12345678900), 11, '12345678900'); - t.equal(_f(123456789000), 12, '123456789000'); - t.equal(_f(1234567890000), 13, '1234567890000'); - t.equal(_f(12345678900000), 14, '12345678900000'); - t.equal(_f(123456789000000), 15, '123456789000000'); - t.equal(_f(1.234567891E-14), 25, '1.234567891E-14'); - t.equal(_f(1.234567891E-13), 24, '1.234567891E-13'); - t.equal(_f(1.234567891E-12), 23, '1.234567891E-12'); - t.equal(_f(1.234567891E-11), 22, '1.234567891E-11'); - t.equal(_f(1.234567891E-10), 21, '1.234567891E-10'); - t.equal(_f(0.000000001234567891), 20, '0.000000001234567891'); - t.equal(_f(0.00000001234567891), 19, '0.00000001234567891'); - t.equal(_f(0.0000001234567891), 18, '0.0000001234567891'); - t.equal(_f(0.000001234567891), 17, '0.000001234567891'); - t.equal(_f(0.00001234567891), 16, '0.00001234567891'); - t.equal(_f(0.0001234567891), 15, '0.0001234567891'); - t.equal(_f(0.001234567891), 14, '0.001234567891'); - t.equal(_f(0.01234567891), 13, '0.01234567891'); - t.equal(_f(0.1234567891), 12, '0.1234567891'); - t.equal(_f(1.234567891), 11, '1.234567891'); - t.equal(_f(12.34567891), 11, '12.34567891'); - t.equal(_f(123.4567891), 11, '123.4567891'); - t.equal(_f(1234.567891), 11, '1234.567891'); - t.equal(_f(12345.67891), 11, '12345.67891'); - t.equal(_f(123456.7891), 11, '123456.7891'); - t.equal(_f(1234567.891), 11, '1234567.891'); - t.equal(_f(12345678.91), 11, '12345678.91'); - t.equal(_f(123456789.1), 11, '123456789.1'); - t.equal(_f(1234567891), 10, '1234567891'); - t.equal(_f(12345678910), 11, '12345678910'); - t.equal(_f(123456789100), 12, '123456789100'); - t.equal(_f(1234567891000), 13, '1234567891000'); - t.equal(_f(12345678910000), 14, '12345678910000'); - t.equal(_f(123456789100000), 15, '123456789100000'); - t.equal(_f(1.2345678912E-14), 26, '1.2345678912E-14'); // 0.000000000000012345678912 - t.equal(_f(1.2345678912E-13), 25, '1.2345678912E-13'); - t.equal(_f(1.2345678912E-12), 24, '1.2345678912E-12'); - t.equal(_f(1.2345678912E-11), 23, '1.2345678912E-11'); - t.equal(_f(1.2345678912E-10), 22, '1.2345678912E-10'); - t.equal(_f(1.2345678912E-09), 21, '1.2345678912E-09'); - t.equal(_f(0.000000012345678912), 20, '0.000000012345678912'); - t.equal(_f(0.00000012345678912), 19, '0.00000012345678912'); - t.equal(_f(0.0000012345678912), 18, '0.0000012345678912'); - t.equal(_f(0.000012345678912), 17, '0.000012345678912'); - t.equal(_f(0.00012345678912), 16, '0.00012345678912'); - t.equal(_f(0.0012345678912), 15, '0.0012345678912'); - t.equal(_f(0.012345678912), 14, '0.012345678912'); - t.equal(_f(0.12345678912), 13, '0.12345678912'); - t.equal(_f(1.2345678912), 12, '1.2345678912'); - t.equal(_f(12.345678912), 12, '12.345678912'); - t.equal(_f(123.45678912), 12, '123.45678912'); - t.equal(_f(1234.5678912), 12, '1234.5678912'); - t.equal(_f(12345.678912), 12, '12345.678912'); - t.equal(_f(123456.78912), 12, '123456.78912'); - t.equal(_f(1234567.8912), 12, '1234567.8912'); - t.equal(_f(12345678.912), 12, '12345678.912'); - t.equal(_f(123456789.12), 12, '123456789.12'); - t.equal(_f(1234567891.2), 12, '1234567891.2'); - t.equal(_f(12345678912), 11, '12345678912'); - t.equal(_f(123456789120), 12, '123456789120'); - t.equal(_f(1234567891200), 13, '1234567891200'); - t.equal(_f(12345678912000), 14, '12345678912000'); - t.equal(_f(123456789120000), 15, '123456789120000'); - t.equal(_f(1.23456789123E-14), 27, '1.23456789123E-14'); - t.equal(_f(1.23456789123E-13), 26, '1.23456789123E-13'); - t.equal(_f(1.23456789123E-12), 25, '1.23456789123E-12'); - t.equal(_f(1.23456789123E-11), 24, '1.23456789123E-11'); - t.equal(_f(1.23456789123E-10), 23, '1.23456789123E-10'); - t.equal(_f(1.23456789123E-09), 22, '1.23456789123E-09'); - t.equal(_f(1.23456789123E-08), 21, '1.23456789123E-08'); - t.equal(_f(0.000000123456789123), 20, '0.000000123456789123'); - t.equal(_f(0.00000123456789123), 19, '0.00000123456789123'); - t.equal(_f(0.0000123456789123), 18, '0.0000123456789123'); - t.equal(_f(0.000123456789123), 17, '0.000123456789123'); - t.equal(_f(0.00123456789123), 16, '0.00123456789123'); - t.equal(_f(0.0123456789123), 15, '0.0123456789123'); - t.equal(_f(0.123456789123), 14, '0.123456789123'); - t.equal(_f(1.23456789123), 13, '1.23456789123'); - t.equal(_f(12.3456789123), 13, '12.3456789123'); - t.equal(_f(123.456789123), 13, '123.456789123'); - t.equal(_f(1234.56789123), 13, '1234.56789123'); - t.equal(_f(12345.6789123), 13, '12345.6789123'); - t.equal(_f(123456.789123), 13, '123456.789123'); - t.equal(_f(1234567.89123), 13, '1234567.89123'); - t.equal(_f(12345678.9123), 13, '12345678.9123'); - t.equal(_f(123456789.123), 13, '123456789.123'); - t.equal(_f(1234567891.23), 13, '1234567891.23'); - t.equal(_f(12345678912.3), 13, '12345678912.3'); - t.equal(_f(123456789123), 12, '123456789123'); - t.equal(_f(1234567891230), 13, '1234567891230'); - t.equal(_f(12345678912300), 14, '12345678912300'); - t.equal(_f(123456789123000), 15, '123456789123000'); - t.equal(_f(1.234567891234E-14), 28, '1.234567891234E-14'); - t.equal(_f(1.234567891234E-13), 27, '1.234567891234E-13'); - t.equal(_f(1.234567891234E-12), 26, '1.234567891234E-12'); - t.equal(_f(1.234567891234E-11), 25, '1.234567891234E-11'); - t.equal(_f(1.234567891234E-10), 24, '1.234567891234E-10'); - t.equal(_f(1.234567891234E-09), 23, '1.234567891234E-09'); - t.equal(_f(1.234567891234E-08), 22, '1.234567891234E-08'); - t.equal(_f(1.234567891234E-07), 21, '1.234567891234E-07'); - t.equal(_f(0.000001234567891234), 20, '0.000001234567891234'); - t.equal(_f(0.00001234567891234), 19, '0.00001234567891234'); - t.equal(_f(0.0001234567891234), 18, '0.0001234567891234'); - t.equal(_f(0.001234567891234), 17, '0.001234567891234'); - t.equal(_f(0.01234567891234), 16, '0.01234567891234'); - t.equal(_f(0.1234567891234), 15, '0.1234567891234'); - t.equal(_f(1.234567891234), 14, '1.234567891234'); - t.equal(_f(12.34567891234), 14, '12.34567891234'); - t.equal(_f(123.4567891234), 14, '123.4567891234'); - t.equal(_f(1234.567891234), 14, '1234.567891234'); - t.equal(_f(12345.67891234), 14, '12345.67891234'); - t.equal(_f(123456.7891234), 14, '123456.7891234'); - t.equal(_f(1234567.891234), 14, '1234567.891234'); - t.equal(_f(12345678.91234), 14, '12345678.91234'); - t.equal(_f(123456789.1234), 14, '123456789.1234'); - t.equal(_f(1234567891.234), 14, '1234567891.234'); - t.equal(_f(12345678912.34), 14, '12345678912.34'); - t.equal(_f(123456789123.4), 14, '123456789123.4'); - t.equal(_f(1234567891234), 13, '1234567891234'); - t.equal(_f(12345678912340), 14, '12345678912340'); - t.equal(_f(123456789123400), 15, '123456789123400'); - t.equal(_f(1.2345678912345E-14), 29, '1.2345678912345E-14'); - t.equal(_f(1.2345678912345E-13), 28, '1.2345678912345E-13'); - t.equal(_f(1.2345678912345E-12), 27, '1.2345678912345E-12'); - t.equal(_f(1.2345678912345E-11), 26, '1.2345678912345E-11'); - t.equal(_f(1.2345678912345E-10), 25, '1.2345678912345E-10'); - t.equal(_f(1.2345678912345E-09), 24, '1.2345678912345E-09'); - t.equal(_f(1.2345678912345E-08), 23, '1.2345678912345E-08'); - t.equal(_f(1.2345678912345E-07), 22, '1.2345678912345E-07'); - t.equal(_f(1.2345678912345E-06), 21, '1.2345678912345E-06'); - t.equal(_f(0.000012345678912345), 20, '0.000012345678912345'); - t.equal(_f(0.00012345678912345), 19, '0.00012345678912345'); - t.equal(_f(0.0012345678912345), 18, '0.0012345678912345'); - t.equal(_f(0.012345678912345), 17, '0.012345678912345'); - t.equal(_f(0.12345678912345), 16, '0.12345678912345'); - t.equal(_f(1.2345678912345), 15, '1.2345678912345'); - t.equal(_f(12.345678912345), 15, '12.345678912345'); - t.equal(_f(123.45678912345), 15, '123.45678912345'); - t.equal(_f(1234.5678912345), 15, '1234.5678912345'); - t.equal(_f(12345.678912345), 15, '12345.678912345'); - t.equal(_f(123456.78912345), 15, '123456.78912345'); - t.equal(_f(1234567.8912345), 15, '1234567.8912345'); - t.equal(_f(12345678.912345), 15, '12345678.912345'); - t.equal(_f(123456789.12345), 15, '123456789.12345'); - t.equal(_f(1234567891.2345), 15, '1234567891.2345'); - t.equal(_f(12345678912.345), 15, '12345678912.345'); - t.equal(_f(123456789123.45), 15, '123456789123.45'); - t.equal(_f(1234567891234.5), 15, '1234567891234.5'); - t.equal(_f(12345678912345), 14, '12345678912345'); - t.equal(_f(123456789123450), 15, '123456789123450'); - t.equal(_f(1.23456789123456E-14), 30, '1.23456789123456E-14'); - t.equal(_f(1.23456789123456E-13), 29, '1.23456789123456E-13'); - t.equal(_f(1.23456789123456E-12), 28, '1.23456789123456E-12'); - t.equal(_f(1.23456789123456E-11), 27, '1.23456789123456E-11'); - t.equal(_f(1.23456789123456E-10), 26, '1.23456789123456E-10'); - t.equal(_f(1.23456789123456E-09), 25, '1.23456789123456E-09'); - t.equal(_f(1.23456789123456E-08), 24, '1.23456789123456E-08'); - t.equal(_f(1.23456789123456E-07), 23, '1.23456789123456E-07'); - t.equal(_f(1.23456789123456E-06), 22, '1.23456789123456E-06'); - t.equal(_f(1.23456789123456E-05), 21, '1.23456789123456E-05'); - t.equal(_f(0.000123456789123456), 20, '0.000123456789123456'); - t.equal(_f(0.00123456789123456), 19, '0.00123456789123456'); - t.equal(_f(0.0123456789123456), 18, '0.0123456789123456'); - t.equal(_f(0.123456789123456), 17, '0.123456789123456'); - t.equal(_f(1.23456789123456), 16, '1.23456789123456'); - t.equal(_f(12.3456789123456), 16, '12.3456789123456'); - t.equal(_f(123.456789123456), 16, '123.456789123456'); - t.equal(_f(1234.56789123456), 16, '1234.56789123456'); - t.equal(_f(12345.6789123456), 16, '12345.6789123456'); - t.equal(_f(123456.789123456), 16, '123456.789123456'); - t.equal(_f(1234567.89123456), 16, '1234567.89123456'); - t.equal(_f(12345678.9123456), 16, '12345678.9123456'); - t.equal(_f(123456789.123456), 16, '123456789.123456'); - t.equal(_f(1234567891.23456), 16, '1234567891.23456'); - t.equal(_f(12345678912.3456), 16, '12345678912.3456'); - t.equal(_f(123456789123.456), 16, '123456789123.456'); - t.equal(_f(1234567891234.56), 16, '1234567891234.56'); - t.equal(_f(12345678912345.6), 16, '12345678912345.6'); - t.equal(_f(123456789123456), 15, '123456789123456'); - t.equal(_f(-1.234567E-14), 23, '-1.234567E-14'); - t.equal(_f(-1.234567E-13), 22, '-1.234567E-13'); - t.equal(_f(-0.000000000001234567), 21, '-0.000000000001234567'); - t.equal(_f(-0.00000000001234567), 20, '-0.00000000001234567'); - t.equal(_f(-0.0000000001234567), 19, '-0.0000000001234567'); - t.equal(_f(-0.000000001234567), 18, '-0.000000001234567'); - t.equal(_f(-0.00000001234567), 17, '-0.00000001234567'); - t.equal(_f(-0.0000001234567), 16, '-0.0000001234567'); - t.equal(_f(-0.000001234567), 15, '-0.000001234567'); - t.equal(_f(-0.00001234567), 14, '-0.00001234567'); - t.equal(_f(-0.0001234567), 13, '-0.0001234567'); - t.equal(_f(-0.001234567), 12, '-0.001234567'); - t.equal(_f(-0.01234567), 11, '-0.01234567'); - t.equal(_f(-0.1234567), 10, '-0.1234567'); - t.equal(_f(-1.234567), 9, '-1.234567'); - t.equal(_f(-12.34567), 9, '-12.34567'); - t.equal(_f(-123.4567), 9, '-123.4567'); - t.equal(_f(-1234.567), 9, '-1234.567'); - t.equal(_f(-12345.67), 9, '-12345.67'); - t.equal(_f(-123456.7), 9, '-123456.7'); - t.equal(_f(-1234567), 8, '-1234567'); - t.equal(_f(-12345670), 9, '-12345670'); - t.equal(_f(-123456700), 10, '-123456700'); - t.equal(_f(-1234567000), 11, '-1234567000'); - t.equal(_f(-12345670000), 12, '-12345670000'); - t.equal(_f(-123456700000), 13, '-123456700000'); - t.equal(_f(-1234567000000), 14, '-1234567000000'); - t.equal(_f(-12345670000000), 15, '-12345670000000'); - t.equal(_f(-123456700000000), 16, '-123456700000000'); +test('numdec', () => { + expect(_f(1.234567E-14), '1.234567E-14').toBe(22); + expect(_f(1.234567E-13), '1.234567E-13').toBe(21); + expect(_f(0.000000000001234567), '0.000000000001234567').toBe(20); + expect(_f(0.00000000001234567), '0.00000000001234567').toBe(19); + expect(_f(0.0000000001234567), '0.0000000001234567').toBe(18); + expect(_f(0.000000001234567), '0.000000001234567').toBe(17); + expect(_f(0.00000001234567), '0.00000001234567').toBe(16); + expect(_f(0.0000001234567), '0.0000001234567').toBe(15); + expect(_f(0.000001234567), '0.000001234567').toBe(14); + expect(_f(0.00001234567), '0.00001234567').toBe(13); + expect(_f(0.0001234567), '0.0001234567').toBe(12); + expect(_f(0.001234567), '0.001234567').toBe(11); + expect(_f(0.01234567), '0.01234567').toBe(10); + expect(_f(0.1234567), '0.1234567').toBe(9); + expect(_f(1.234567), '1.234567').toBe(8); + expect(_f(12.34567), '12.34567').toBe(8); + expect(_f(123.4567), '123.4567').toBe(8); + expect(_f(1234.567), '1234.567').toBe(8); + expect(_f(12345.67), '12345.67').toBe(8); + expect(_f(123456.7), '123456.7').toBe(8); + expect(_f(1234567), '1234567').toBe(7); + expect(_f(12345670), '12345670').toBe(8); + expect(_f(123456700), '123456700').toBe(9); + expect(_f(1234567000), '1234567000').toBe(10); + expect(_f(12345670000), '12345670000').toBe(11); + expect(_f(123456700000), '123456700000').toBe(12); + expect(_f(1234567000000), '1234567000000').toBe(13); + expect(_f(12345670000000), '12345670000000').toBe(14); + expect(_f(123456700000000), '123456700000000').toBe(15); + expect(_f(0.00000000000001), '0.00000000000001').toBe(16); + expect(_f(0.0000000000001), '0.0000000000001').toBe(15); + expect(_f(0.000000000001), '0.000000000001').toBe(14); + expect(_f(0.00000000001), '0.00000000001').toBe(13); + expect(_f(0.0000000001), '0.0000000001').toBe(12); + expect(_f(0.000000001), '0.000000001').toBe(11); + expect(_f(0.00000001), '0.00000001').toBe(10); + expect(_f(0.0000001), '0.0000001').toBe(9); + expect(_f(0.000001), '0.000001').toBe(8); + expect(_f(0.00001), '0.00001').toBe(7); + expect(_f(0.0001), '0.0001').toBe(6); + expect(_f(0.001), '0.001').toBe(5); + expect(_f(0.01), '0.01').toBe(4); + expect(_f(0.1), '0.1').toBe(3); + expect(_f(1), '1').toBe(1); + expect(_f(10), '10').toBe(2); + expect(_f(100), '100').toBe(3); + expect(_f(1000), '1000').toBe(4); + expect(_f(10000), '10000').toBe(5); + expect(_f(100000), '100000').toBe(6); + expect(_f(1000000), '1000000').toBe(7); + expect(_f(10000000), '10000000').toBe(8); + expect(_f(100000000), '100000000').toBe(9); + expect(_f(1000000000), '1000000000').toBe(10); + expect(_f(10000000000), '10000000000').toBe(11); + expect(_f(100000000000), '100000000000').toBe(12); + expect(_f(1000000000000), '1000000000000').toBe(13); + expect(_f(10000000000000), '10000000000000').toBe(14); + expect(_f(100000000000000), '100000000000000').toBe(15); + expect(_f(0.000000000000012), '0.000000000000012').toBe(17); + expect(_f(0.00000000000012), '0.00000000000012').toBe(16); + expect(_f(0.0000000000012), '0.0000000000012').toBe(15); + expect(_f(0.000000000012), '0.000000000012').toBe(14); + expect(_f(0.00000000012), '0.00000000012').toBe(13); + expect(_f(0.0000000012), '0.0000000012').toBe(12); + expect(_f(0.000000012), '0.000000012').toBe(11); + expect(_f(0.00000012), '0.00000012').toBe(10); + expect(_f(0.0000012), '0.0000012').toBe(9); + expect(_f(0.000012), '0.000012').toBe(8); + expect(_f(0.00012), '0.00012').toBe(7); + expect(_f(0.0012), '0.0012').toBe(6); + expect(_f(0.012), '0.012').toBe(5); + expect(_f(0.12), '0.12').toBe(4); + expect(_f(1.2), '1.2').toBe(3); + expect(_f(12), '12').toBe(2); + expect(_f(120), '120').toBe(3); + expect(_f(1200), '1200').toBe(4); + expect(_f(12000), '12000').toBe(5); + expect(_f(120000), '120000').toBe(6); + expect(_f(1200000), '1200000').toBe(7); + expect(_f(12000000), '12000000').toBe(8); + expect(_f(120000000), '120000000').toBe(9); + expect(_f(1200000000), '1200000000').toBe(10); + expect(_f(12000000000), '12000000000').toBe(11); + expect(_f(120000000000), '120000000000').toBe(12); + expect(_f(1200000000000), '1200000000000').toBe(13); + expect(_f(12000000000000), '12000000000000').toBe(14); + expect(_f(120000000000000), '120000000000000').toBe(15); + expect(_f(0.0000000000000123), '0.0000000000000123').toBe(18); + expect(_f(0.000000000000123), '0.000000000000123').toBe(17); + expect(_f(0.00000000000123), '0.00000000000123').toBe(16); + expect(_f(0.0000000000123), '0.0000000000123').toBe(15); + expect(_f(0.000000000123), '0.000000000123').toBe(14); + expect(_f(0.00000000123), '0.00000000123').toBe(13); + expect(_f(0.0000000123), '0.0000000123').toBe(12); + expect(_f(0.000000123), '0.000000123').toBe(11); + expect(_f(0.00000123), '0.00000123').toBe(10); + expect(_f(0.0000123), '0.0000123').toBe(9); + expect(_f(0.000123), '0.000123').toBe(8); + expect(_f(0.00123), '0.00123').toBe(7); + expect(_f(0.0123), '0.0123').toBe(6); + expect(_f(0.123), '0.123').toBe(5); + expect(_f(1.23), '1.23').toBe(4); + expect(_f(12.3), '12.3').toBe(4); + expect(_f(123), '123').toBe(3); + expect(_f(1230), '1230').toBe(4); + expect(_f(12300), '12300').toBe(5); + expect(_f(123000), '123000').toBe(6); + expect(_f(1230000), '1230000').toBe(7); + expect(_f(12300000), '12300000').toBe(8); + expect(_f(123000000), '123000000').toBe(9); + expect(_f(1230000000), '1230000000').toBe(10); + expect(_f(12300000000), '12300000000').toBe(11); + expect(_f(123000000000), '123000000000').toBe(12); + expect(_f(1230000000000), '1230000000000').toBe(13); + expect(_f(12300000000000), '12300000000000').toBe(14); + expect(_f(123000000000000), '123000000000000').toBe(15); + expect(_f(0.00000000000001234), '0.00000000000001234').toBe(19); + expect(_f(0.0000000000001234), '0.0000000000001234').toBe(18); + expect(_f(0.000000000001234), '0.000000000001234').toBe(17); + expect(_f(0.00000000001234), '0.00000000001234').toBe(16); + expect(_f(0.0000000001234), '0.0000000001234').toBe(15); + expect(_f(0.000000001234), '0.000000001234').toBe(14); + expect(_f(0.00000001234), '0.00000001234').toBe(13); + expect(_f(0.0000001234), '0.0000001234').toBe(12); + expect(_f(0.000001234), '0.000001234').toBe(11); + expect(_f(0.00001234), '0.00001234').toBe(10); + expect(_f(0.0001234), '0.0001234').toBe(9); + expect(_f(0.001234), '0.001234').toBe(8); + expect(_f(0.01234), '0.01234').toBe(7); + expect(_f(0.1234), '0.1234').toBe(6); + expect(_f(1.234), '1.234').toBe(5); + expect(_f(12.34), '12.34').toBe(5); + expect(_f(123.4), '123.4').toBe(5); + expect(_f(1234), '1234').toBe(4); + expect(_f(12340), '12340').toBe(5); + expect(_f(123400), '123400').toBe(6); + expect(_f(1234000), '1234000').toBe(7); + expect(_f(12340000), '12340000').toBe(8); + expect(_f(123400000), '123400000').toBe(9); + expect(_f(1234000000), '1234000000').toBe(10); + expect(_f(12340000000), '12340000000').toBe(11); + expect(_f(123400000000), '123400000000').toBe(12); + expect(_f(1234000000000), '1234000000000').toBe(13); + expect(_f(12340000000000), '12340000000000').toBe(14); + expect(_f(123400000000000), '123400000000000').toBe(15); + expect(_f(0.000000000000012345), '0.000000000000012345').toBe(20); + expect(_f(0.00000000000012345), '0.00000000000012345').toBe(19); + expect(_f(0.0000000000012345), '0.0000000000012345').toBe(18); + expect(_f(0.000000000012345), '0.000000000012345').toBe(17); + expect(_f(0.00000000012345), '0.00000000012345').toBe(16); + expect(_f(0.0000000012345), '0.0000000012345').toBe(15); + expect(_f(0.000000012345), '0.000000012345').toBe(14); + expect(_f(0.00000012345), '0.00000012345').toBe(13); + expect(_f(0.0000012345), '0.0000012345').toBe(12); + expect(_f(0.000012345), '0.000012345').toBe(11); + expect(_f(0.00012345), '0.00012345').toBe(10); + expect(_f(0.0012345), '0.0012345').toBe(9); + expect(_f(0.012345), '0.012345').toBe(8); + expect(_f(0.12345), '0.12345').toBe(7); + expect(_f(1.2345), '1.2345').toBe(6); + expect(_f(12.345), '12.345').toBe(6); + expect(_f(123.45), '123.45').toBe(6); + expect(_f(1234.5), '1234.5').toBe(6); + expect(_f(12345), '12345').toBe(5); + expect(_f(123450), '123450').toBe(6); + expect(_f(1234500), '1234500').toBe(7); + expect(_f(12345000), '12345000').toBe(8); + expect(_f(123450000), '123450000').toBe(9); + expect(_f(1234500000), '1234500000').toBe(10); + expect(_f(12345000000), '12345000000').toBe(11); + expect(_f(123450000000), '123450000000').toBe(12); + expect(_f(1234500000000), '1234500000000').toBe(13); + expect(_f(12345000000000), '12345000000000').toBe(14); + expect(_f(123450000000000), '123450000000000').toBe(15); + expect(_f(1.23456E-14), '1.23456E-14').toBe(21); + expect(_f(0.000000000000123456), '0.000000000000123456').toBe(20); + expect(_f(0.00000000000123456), '0.00000000000123456').toBe(19); + expect(_f(0.0000000000123456), '0.0000000000123456').toBe(18); + expect(_f(0.000000000123456), '0.000000000123456').toBe(17); + expect(_f(0.00000000123456), '0.00000000123456').toBe(16); + expect(_f(0.0000000123456), '0.0000000123456').toBe(15); + expect(_f(0.000000123456), '0.000000123456').toBe(14); + expect(_f(0.00000123456), '0.00000123456').toBe(13); + expect(_f(0.0000123456), '0.0000123456').toBe(12); + expect(_f(0.000123456), '0.000123456').toBe(11); + expect(_f(0.00123456), '0.00123456').toBe(10); + expect(_f(0.0123456), '0.0123456').toBe(9); + expect(_f(0.123456), '0.123456').toBe(8); + expect(_f(1.23456), '1.23456').toBe(7); + expect(_f(12.3456), '12.3456').toBe(7); + expect(_f(123.456), '123.456').toBe(7); + expect(_f(1234.56), '1234.56').toBe(7); + expect(_f(12345.6), '12345.6').toBe(7); + expect(_f(123456), '123456').toBe(6); + expect(_f(1234560), '1234560').toBe(7); + expect(_f(12345600), '12345600').toBe(8); + expect(_f(123456000), '123456000').toBe(9); + expect(_f(1234560000), '1234560000').toBe(10); + expect(_f(12345600000), '12345600000').toBe(11); + expect(_f(123456000000), '123456000000').toBe(12); + expect(_f(1234560000000), '1234560000000').toBe(13); + expect(_f(12345600000000), '12345600000000').toBe(14); + expect(_f(123456000000000), '123456000000000').toBe(15); + expect(_f(1.234567E-14), '1.234567E-14').toBe(22); + expect(_f(1.234567E-13), '1.234567E-13').toBe(21); + expect(_f(0.000000000001234567), '0.000000000001234567').toBe(20); + expect(_f(0.00000000001234567), '0.00000000001234567').toBe(19); + expect(_f(0.0000000001234567), '0.0000000001234567').toBe(18); + expect(_f(0.000000001234567), '0.000000001234567').toBe(17); + expect(_f(0.00000001234567), '0.00000001234567').toBe(16); + expect(_f(0.0000001234567), '0.0000001234567').toBe(15); + expect(_f(0.000001234567), '0.000001234567').toBe(14); + expect(_f(0.00001234567), '0.00001234567').toBe(13); + expect(_f(0.0001234567), '0.0001234567').toBe(12); + expect(_f(0.001234567), '0.001234567').toBe(11); + expect(_f(0.01234567), '0.01234567').toBe(10); + expect(_f(0.1234567), '0.1234567').toBe(9); + expect(_f(1.234567), '1.234567').toBe(8); + expect(_f(12.34567), '12.34567').toBe(8); + expect(_f(123.4567), '123.4567').toBe(8); + expect(_f(1234.567), '1234.567').toBe(8); + expect(_f(12345.67), '12345.67').toBe(8); + expect(_f(123456.7), '123456.7').toBe(8); + expect(_f(1234567), '1234567').toBe(7); + expect(_f(12345670), '12345670').toBe(8); + expect(_f(123456700), '123456700').toBe(9); + expect(_f(1234567000), '1234567000').toBe(10); + expect(_f(12345670000), '12345670000').toBe(11); + expect(_f(123456700000), '123456700000').toBe(12); + expect(_f(1234567000000), '1234567000000').toBe(13); + expect(_f(12345670000000), '12345670000000').toBe(14); + expect(_f(123456700000000), '123456700000000').toBe(15); + expect(_f(1.2345678E-14), '1.2345678E-14').toBe(23); + expect(_f(1.2345678E-13), '1.2345678E-13').toBe(22); + expect(_f(1.2345678E-12), '1.2345678E-12').toBe(21); + expect(_f(0.000000000012345678), '0.000000000012345678').toBe(20); + expect(_f(0.00000000012345678), '0.00000000012345678').toBe(19); + expect(_f(0.0000000012345678), '0.0000000012345678').toBe(18); + expect(_f(0.000000012345678), '0.000000012345678').toBe(17); + expect(_f(0.00000012345678), '0.00000012345678').toBe(16); + expect(_f(0.0000012345678), '0.0000012345678').toBe(15); + expect(_f(0.000012345678), '0.000012345678').toBe(14); + expect(_f(0.00012345678), '0.00012345678').toBe(13); + expect(_f(0.0012345678), '0.0012345678').toBe(12); + expect(_f(0.012345678), '0.012345678').toBe(11); + expect(_f(0.12345678), '0.12345678').toBe(10); + expect(_f(1.2345678), '1.2345678').toBe(9); + expect(_f(12.345678), '12.345678').toBe(9); + expect(_f(123.45678), '123.45678').toBe(9); + expect(_f(1234.5678), '1234.5678').toBe(9); + expect(_f(12345.678), '12345.678').toBe(9); + expect(_f(123456.78), '123456.78').toBe(9); + expect(_f(1234567.8), '1234567.8').toBe(9); + expect(_f(12345678), '12345678').toBe(8); + expect(_f(123456780), '123456780').toBe(9); + expect(_f(1234567800), '1234567800').toBe(10); + expect(_f(12345678000), '12345678000').toBe(11); + expect(_f(123456780000), '123456780000').toBe(12); + expect(_f(1234567800000), '1234567800000').toBe(13); + expect(_f(12345678000000), '12345678000000').toBe(14); + expect(_f(123456780000000), '123456780000000').toBe(15); + expect(_f(1.23456789E-14), '1.23456789E-14').toBe(24); + expect(_f(1.23456789E-13), '1.23456789E-13').toBe(23); + expect(_f(1.23456789E-12), '1.23456789E-12').toBe(22); + expect(_f(1.23456789E-11), '1.23456789E-11').toBe(21); + expect(_f(0.000000000123456789), '0.000000000123456789').toBe(20); + expect(_f(0.00000000123456789), '0.00000000123456789').toBe(19); + expect(_f(0.0000000123456789), '0.0000000123456789').toBe(18); + expect(_f(0.000000123456789), '0.000000123456789').toBe(17); + expect(_f(0.00000123456789), '0.00000123456789').toBe(16); + expect(_f(0.0000123456789), '0.0000123456789').toBe(15); + expect(_f(0.000123456789), '0.000123456789').toBe(14); + expect(_f(0.00123456789), '0.00123456789').toBe(13); + expect(_f(0.0123456789), '0.0123456789').toBe(12); + expect(_f(0.123456789), '0.123456789').toBe(11); + expect(_f(1.23456789), '1.23456789').toBe(10); + expect(_f(12.3456789), '12.3456789').toBe(10); + expect(_f(123.456789), '123.456789').toBe(10); + expect(_f(1234.56789), '1234.56789').toBe(10); + expect(_f(12345.6789), '12345.6789').toBe(10); + expect(_f(123456.789), '123456.789').toBe(10); + expect(_f(1234567.89), '1234567.89').toBe(10); + expect(_f(12345678.9), '12345678.9').toBe(10); + expect(_f(123456789), '123456789').toBe(9); + expect(_f(1234567890), '1234567890').toBe(10); + expect(_f(12345678900), '12345678900').toBe(11); + expect(_f(123456789000), '123456789000').toBe(12); + expect(_f(1234567890000), '1234567890000').toBe(13); + expect(_f(12345678900000), '12345678900000').toBe(14); + expect(_f(123456789000000), '123456789000000').toBe(15); + expect(_f(1.234567891E-14), '1.234567891E-14').toBe(25); + expect(_f(1.234567891E-13), '1.234567891E-13').toBe(24); + expect(_f(1.234567891E-12), '1.234567891E-12').toBe(23); + expect(_f(1.234567891E-11), '1.234567891E-11').toBe(22); + expect(_f(1.234567891E-10), '1.234567891E-10').toBe(21); + expect(_f(0.000000001234567891), '0.000000001234567891').toBe(20); + expect(_f(0.00000001234567891), '0.00000001234567891').toBe(19); + expect(_f(0.0000001234567891), '0.0000001234567891').toBe(18); + expect(_f(0.000001234567891), '0.000001234567891').toBe(17); + expect(_f(0.00001234567891), '0.00001234567891').toBe(16); + expect(_f(0.0001234567891), '0.0001234567891').toBe(15); + expect(_f(0.001234567891), '0.001234567891').toBe(14); + expect(_f(0.01234567891), '0.01234567891').toBe(13); + expect(_f(0.1234567891), '0.1234567891').toBe(12); + expect(_f(1.234567891), '1.234567891').toBe(11); + expect(_f(12.34567891), '12.34567891').toBe(11); + expect(_f(123.4567891), '123.4567891').toBe(11); + expect(_f(1234.567891), '1234.567891').toBe(11); + expect(_f(12345.67891), '12345.67891').toBe(11); + expect(_f(123456.7891), '123456.7891').toBe(11); + expect(_f(1234567.891), '1234567.891').toBe(11); + expect(_f(12345678.91), '12345678.91').toBe(11); + expect(_f(123456789.1), '123456789.1').toBe(11); + expect(_f(1234567891), '1234567891').toBe(10); + expect(_f(12345678910), '12345678910').toBe(11); + expect(_f(123456789100), '123456789100').toBe(12); + expect(_f(1234567891000), '1234567891000').toBe(13); + expect(_f(12345678910000), '12345678910000').toBe(14); + expect(_f(123456789100000), '123456789100000').toBe(15); + expect(_f(1.2345678912E-14), '1.2345678912E-14').toBe(26); // 0.000000000000012345678912 + expect(_f(1.2345678912E-13), '1.2345678912E-13').toBe(25); + expect(_f(1.2345678912E-12), '1.2345678912E-12').toBe(24); + expect(_f(1.2345678912E-11), '1.2345678912E-11').toBe(23); + expect(_f(1.2345678912E-10), '1.2345678912E-10').toBe(22); + expect(_f(1.2345678912E-09), '1.2345678912E-09').toBe(21); + expect(_f(0.000000012345678912), '0.000000012345678912').toBe(20); + expect(_f(0.00000012345678912), '0.00000012345678912').toBe(19); + expect(_f(0.0000012345678912), '0.0000012345678912').toBe(18); + expect(_f(0.000012345678912), '0.000012345678912').toBe(17); + expect(_f(0.00012345678912), '0.00012345678912').toBe(16); + expect(_f(0.0012345678912), '0.0012345678912').toBe(15); + expect(_f(0.012345678912), '0.012345678912').toBe(14); + expect(_f(0.12345678912), '0.12345678912').toBe(13); + expect(_f(1.2345678912), '1.2345678912').toBe(12); + expect(_f(12.345678912), '12.345678912').toBe(12); + expect(_f(123.45678912), '123.45678912').toBe(12); + expect(_f(1234.5678912), '1234.5678912').toBe(12); + expect(_f(12345.678912), '12345.678912').toBe(12); + expect(_f(123456.78912), '123456.78912').toBe(12); + expect(_f(1234567.8912), '1234567.8912').toBe(12); + expect(_f(12345678.912), '12345678.912').toBe(12); + expect(_f(123456789.12), '123456789.12').toBe(12); + expect(_f(1234567891.2), '1234567891.2').toBe(12); + expect(_f(12345678912), '12345678912').toBe(11); + expect(_f(123456789120), '123456789120').toBe(12); + expect(_f(1234567891200), '1234567891200').toBe(13); + expect(_f(12345678912000), '12345678912000').toBe(14); + expect(_f(123456789120000), '123456789120000').toBe(15); + expect(_f(1.23456789123E-14), '1.23456789123E-14').toBe(27); + expect(_f(1.23456789123E-13), '1.23456789123E-13').toBe(26); + expect(_f(1.23456789123E-12), '1.23456789123E-12').toBe(25); + expect(_f(1.23456789123E-11), '1.23456789123E-11').toBe(24); + expect(_f(1.23456789123E-10), '1.23456789123E-10').toBe(23); + expect(_f(1.23456789123E-09), '1.23456789123E-09').toBe(22); + expect(_f(1.23456789123E-08), '1.23456789123E-08').toBe(21); + expect(_f(0.000000123456789123), '0.000000123456789123').toBe(20); + expect(_f(0.00000123456789123), '0.00000123456789123').toBe(19); + expect(_f(0.0000123456789123), '0.0000123456789123').toBe(18); + expect(_f(0.000123456789123), '0.000123456789123').toBe(17); + expect(_f(0.00123456789123), '0.00123456789123').toBe(16); + expect(_f(0.0123456789123), '0.0123456789123').toBe(15); + expect(_f(0.123456789123), '0.123456789123').toBe(14); + expect(_f(1.23456789123), '1.23456789123').toBe(13); + expect(_f(12.3456789123), '12.3456789123').toBe(13); + expect(_f(123.456789123), '123.456789123').toBe(13); + expect(_f(1234.56789123), '1234.56789123').toBe(13); + expect(_f(12345.6789123), '12345.6789123').toBe(13); + expect(_f(123456.789123), '123456.789123').toBe(13); + expect(_f(1234567.89123), '1234567.89123').toBe(13); + expect(_f(12345678.9123), '12345678.9123').toBe(13); + expect(_f(123456789.123), '123456789.123').toBe(13); + expect(_f(1234567891.23), '1234567891.23').toBe(13); + expect(_f(12345678912.3), '12345678912.3').toBe(13); + expect(_f(123456789123), '123456789123').toBe(12); + expect(_f(1234567891230), '1234567891230').toBe(13); + expect(_f(12345678912300), '12345678912300').toBe(14); + expect(_f(123456789123000), '123456789123000').toBe(15); + expect(_f(1.234567891234E-14), '1.234567891234E-14').toBe(28); + expect(_f(1.234567891234E-13), '1.234567891234E-13').toBe(27); + expect(_f(1.234567891234E-12), '1.234567891234E-12').toBe(26); + expect(_f(1.234567891234E-11), '1.234567891234E-11').toBe(25); + expect(_f(1.234567891234E-10), '1.234567891234E-10').toBe(24); + expect(_f(1.234567891234E-09), '1.234567891234E-09').toBe(23); + expect(_f(1.234567891234E-08), '1.234567891234E-08').toBe(22); + expect(_f(1.234567891234E-07), '1.234567891234E-07').toBe(21); + expect(_f(0.000001234567891234), '0.000001234567891234').toBe(20); + expect(_f(0.00001234567891234), '0.00001234567891234').toBe(19); + expect(_f(0.0001234567891234), '0.0001234567891234').toBe(18); + expect(_f(0.001234567891234), '0.001234567891234').toBe(17); + expect(_f(0.01234567891234), '0.01234567891234').toBe(16); + expect(_f(0.1234567891234), '0.1234567891234').toBe(15); + expect(_f(1.234567891234), '1.234567891234').toBe(14); + expect(_f(12.34567891234), '12.34567891234').toBe(14); + expect(_f(123.4567891234), '123.4567891234').toBe(14); + expect(_f(1234.567891234), '1234.567891234').toBe(14); + expect(_f(12345.67891234), '12345.67891234').toBe(14); + expect(_f(123456.7891234), '123456.7891234').toBe(14); + expect(_f(1234567.891234), '1234567.891234').toBe(14); + expect(_f(12345678.91234), '12345678.91234').toBe(14); + expect(_f(123456789.1234), '123456789.1234').toBe(14); + expect(_f(1234567891.234), '1234567891.234').toBe(14); + expect(_f(12345678912.34), '12345678912.34').toBe(14); + expect(_f(123456789123.4), '123456789123.4').toBe(14); + expect(_f(1234567891234), '1234567891234').toBe(13); + expect(_f(12345678912340), '12345678912340').toBe(14); + expect(_f(123456789123400), '123456789123400').toBe(15); + expect(_f(1.2345678912345E-14), '1.2345678912345E-14').toBe(29); + expect(_f(1.2345678912345E-13), '1.2345678912345E-13').toBe(28); + expect(_f(1.2345678912345E-12), '1.2345678912345E-12').toBe(27); + expect(_f(1.2345678912345E-11), '1.2345678912345E-11').toBe(26); + expect(_f(1.2345678912345E-10), '1.2345678912345E-10').toBe(25); + expect(_f(1.2345678912345E-09), '1.2345678912345E-09').toBe(24); + expect(_f(1.2345678912345E-08), '1.2345678912345E-08').toBe(23); + expect(_f(1.2345678912345E-07), '1.2345678912345E-07').toBe(22); + expect(_f(1.2345678912345E-06), '1.2345678912345E-06').toBe(21); + expect(_f(0.000012345678912345), '0.000012345678912345').toBe(20); + expect(_f(0.00012345678912345), '0.00012345678912345').toBe(19); + expect(_f(0.0012345678912345), '0.0012345678912345').toBe(18); + expect(_f(0.012345678912345), '0.012345678912345').toBe(17); + expect(_f(0.12345678912345), '0.12345678912345').toBe(16); + expect(_f(1.2345678912345), '1.2345678912345').toBe(15); + expect(_f(12.345678912345), '12.345678912345').toBe(15); + expect(_f(123.45678912345), '123.45678912345').toBe(15); + expect(_f(1234.5678912345), '1234.5678912345').toBe(15); + expect(_f(12345.678912345), '12345.678912345').toBe(15); + expect(_f(123456.78912345), '123456.78912345').toBe(15); + expect(_f(1234567.8912345), '1234567.8912345').toBe(15); + expect(_f(12345678.912345), '12345678.912345').toBe(15); + expect(_f(123456789.12345), '123456789.12345').toBe(15); + expect(_f(1234567891.2345), '1234567891.2345').toBe(15); + expect(_f(12345678912.345), '12345678912.345').toBe(15); + expect(_f(123456789123.45), '123456789123.45').toBe(15); + expect(_f(1234567891234.5), '1234567891234.5').toBe(15); + expect(_f(12345678912345), '12345678912345').toBe(14); + expect(_f(123456789123450), '123456789123450').toBe(15); + expect(_f(1.23456789123456E-14), '1.23456789123456E-14').toBe(30); + expect(_f(1.23456789123456E-13), '1.23456789123456E-13').toBe(29); + expect(_f(1.23456789123456E-12), '1.23456789123456E-12').toBe(28); + expect(_f(1.23456789123456E-11), '1.23456789123456E-11').toBe(27); + expect(_f(1.23456789123456E-10), '1.23456789123456E-10').toBe(26); + expect(_f(1.23456789123456E-09), '1.23456789123456E-09').toBe(25); + expect(_f(1.23456789123456E-08), '1.23456789123456E-08').toBe(24); + expect(_f(1.23456789123456E-07), '1.23456789123456E-07').toBe(23); + expect(_f(1.23456789123456E-06), '1.23456789123456E-06').toBe(22); + expect(_f(1.23456789123456E-05), '1.23456789123456E-05').toBe(21); + expect(_f(0.000123456789123456), '0.000123456789123456').toBe(20); + expect(_f(0.00123456789123456), '0.00123456789123456').toBe(19); + expect(_f(0.0123456789123456), '0.0123456789123456').toBe(18); + expect(_f(0.123456789123456), '0.123456789123456').toBe(17); + expect(_f(1.23456789123456), '1.23456789123456').toBe(16); + expect(_f(12.3456789123456), '12.3456789123456').toBe(16); + expect(_f(123.456789123456), '123.456789123456').toBe(16); + expect(_f(1234.56789123456), '1234.56789123456').toBe(16); + expect(_f(12345.6789123456), '12345.6789123456').toBe(16); + expect(_f(123456.789123456), '123456.789123456').toBe(16); + expect(_f(1234567.89123456), '1234567.89123456').toBe(16); + expect(_f(12345678.9123456), '12345678.9123456').toBe(16); + expect(_f(123456789.123456), '123456789.123456').toBe(16); + expect(_f(1234567891.23456), '1234567891.23456').toBe(16); + expect(_f(12345678912.3456), '12345678912.3456').toBe(16); + expect(_f(123456789123.456), '123456789123.456').toBe(16); + expect(_f(1234567891234.56), '1234567891234.56').toBe(16); + expect(_f(12345678912345.6), '12345678912345.6').toBe(16); + expect(_f(123456789123456), '123456789123456').toBe(15); + expect(_f(-1.234567E-14), '-1.234567E-14').toBe(23); + expect(_f(-1.234567E-13), '-1.234567E-13').toBe(22); + expect(_f(-0.000000000001234567), '-0.000000000001234567').toBe(21); + expect(_f(-0.00000000001234567), '-0.00000000001234567').toBe(20); + expect(_f(-0.0000000001234567), '-0.0000000001234567').toBe(19); + expect(_f(-0.000000001234567), '-0.000000001234567').toBe(18); + expect(_f(-0.00000001234567), '-0.00000001234567').toBe(17); + expect(_f(-0.0000001234567), '-0.0000001234567').toBe(16); + expect(_f(-0.000001234567), '-0.000001234567').toBe(15); + expect(_f(-0.00001234567), '-0.00001234567').toBe(14); + expect(_f(-0.0001234567), '-0.0001234567').toBe(13); + expect(_f(-0.001234567), '-0.001234567').toBe(12); + expect(_f(-0.01234567), '-0.01234567').toBe(11); + expect(_f(-0.1234567), '-0.1234567').toBe(10); + expect(_f(-1.234567), '-1.234567').toBe(9); + expect(_f(-12.34567), '-12.34567').toBe(9); + expect(_f(-123.4567), '-123.4567').toBe(9); + expect(_f(-1234.567), '-1234.567').toBe(9); + expect(_f(-12345.67), '-12345.67').toBe(9); + expect(_f(-123456.7), '-123456.7').toBe(9); + expect(_f(-1234567), '-1234567').toBe(8); + expect(_f(-12345670), '-12345670').toBe(9); + expect(_f(-123456700), '-123456700').toBe(10); + expect(_f(-1234567000), '-1234567000').toBe(11); + expect(_f(-12345670000), '-12345670000').toBe(12); + expect(_f(-123456700000), '-123456700000').toBe(13); + expect(_f(-1234567000000), '-1234567000000').toBe(14); + expect(_f(-12345670000000), '-12345670000000').toBe(15); + expect(_f(-123456700000000), '-123456700000000').toBe(16); // supposed corner cases, found on teh internets // https://stackoverflow.com/questions/9539513/ - t.equal(_f(0.0028), 6, '0.0028'); - t.equal(_f(0.0029), 6, '0.0029'); - t.equal(_f(0.0408), 6, '0.0408'); - t.equal(_f(0.1584), 6, '0.1584'); - t.equal(_f(4.3573), 6, '4.3573'); - t.equal(_f(11.6894), 7, '11.6894'); - t.equal(_f(0), 1, '0'); - t.equal(_f(1), 1, '1.0'); - t.equal(_f(0.123), 5, '0.123'); - t.equal(_f(1e-3), 5, '1e-3'); - t.equal(_f(-1e2), 4, '-1e2'); - t.equal(_f(-1e-2), 5, '-1e-2'); - t.equal(_f(-0.1), 4, '-0.1'); - t.equal(_f(1 / 3), 17, '1/3'); - t.equal(_f(3.14), 4, '3.14'); - t.equal(_f(2e-3), 5, '2e-3'); - t.equal(_f(2e-14), 16, '2e-14'); - t.equal(_f(Math.PI), 16, 'Math.PI'); - t.equal(_f(1e-9), 11, '1e-9'); - t.equal(_f(1e-10), 12, '1e-10'); - t.equal(_f(-3.14e-13), 18, '-3.14e-13'); - t.equal(_f(3e-13), 15, '3e-13'); - t.equal(_f(3e-14), 16, '3e-14'); - t.equal(_f(123.12345678901234567890), 16, '123.12345678901235...'); // overflows - t.equal(_f(5555), 4, '5555'); - t.equal(_f(555.5), 5, '555.5'); - t.equal(_f(55.55), 5, '55.55'); - t.equal(_f(0.0000005), 9, '0.0000005'); - t.equal(_f(5e-7), 9, '5e-7'); - t.equal(_f(0.00000055), 10, '0.00000055'); - t.equal(_f(5e-8), 10, '5e-8'); - t.equal(_f(0.000006), 8, '0.000006'); - t.equal(_f(0.0000007), 9, '0.0000007'); - t.equal(_f(0.123), 5, '0.123'); - t.equal(_f(0.121), 5, '0.121'); - t.equal(_f(0.1215), 6, '0.1215'); + expect(_f(0.0028), '0.0028').toBe(6); + expect(_f(0.0029), '0.0029').toBe(6); + expect(_f(0.0408), '0.0408').toBe(6); + expect(_f(0.1584), '0.1584').toBe(6); + expect(_f(4.3573), '4.3573').toBe(6); + expect(_f(11.6894), '11.6894').toBe(7); + expect(_f(0), '0').toBe(1); + expect(_f(1), '1.0').toBe(1); + expect(_f(0.123), '0.123').toBe(5); + expect(_f(1e-3), '1e-3').toBe(5); + expect(_f(-1e2), '-1e2').toBe(4); + expect(_f(-1e-2), '-1e-2').toBe(5); + expect(_f(-0.1), '-0.1').toBe(4); + expect(_f(1 / 3), '1/3').toBe(17); + expect(_f(3.14), '3.14').toBe(4); + expect(_f(2e-3), '2e-3').toBe(5); + expect(_f(2e-14), '2e-14').toBe(16); + expect(_f(Math.PI), 'Math.PI').toBe(16); + expect(_f(1e-9), '1e-9').toBe(11); + expect(_f(1e-10), '1e-10').toBe(12); + expect(_f(-3.14e-13), '-3.14e-13').toBe(18); + expect(_f(3e-13), '3e-13').toBe(15); + expect(_f(3e-14), '3e-14').toBe(16); + expect(_f(123.12345678901234567890), '123.12345678901235...').toBe(16); // overflows + expect(_f(5555), '5555').toBe(4); + expect(_f(555.5), '555.5').toBe(5); + expect(_f(55.55), '55.55').toBe(5); + expect(_f(0.0000005), '0.0000005').toBe(9); + expect(_f(5e-7), '5e-7').toBe(9); + expect(_f(0.00000055), '0.00000055').toBe(10); + expect(_f(5e-8), '5e-8').toBe(10); + expect(_f(0.000006), '0.000006').toBe(8); + expect(_f(0.0000007), '0.0000007').toBe(9); + expect(_f(0.123), '0.123').toBe(5); + expect(_f(0.121), '0.121').toBe(5); + expect(_f(0.1215), '0.1215').toBe(6); // truncation test 4+11 = 15 (plus period) - t.equal(_f(1000.00000000001), 16, '1000.00000000001'); - t.equal(_f(-1000.00000000001), 17, '-1000.00000000001'); + expect(_f(1000.00000000001), '1000.00000000001').toBe(16); + expect(_f(-1000.00000000001), '-1000.00000000001').toBe(17); // truncation test 4+12 = 16 - t.equal(_f(1000.000000000001), 4, '1000.000000000001'); + expect(_f(1000.000000000001), '1000.000000000001').toBe(4); // truncation test 4+13 = 17 - t.equal(_f(1000.0000000000001), 4, '1000.0000000000001'); + expect(_f(1000.0000000000001), '1000.0000000000001').toBe(4); // truncation test 5+13 = 18 - t.equal(_f(10000.0000000000001), 5, '10000.0000000000001'); - - t.end(); + expect(_f(10000.0000000000001), '10000.0000000000001').toBe(5); }); - diff --git a/test/numfmt.spec.ts b/test/numfmt.spec.ts index e401a8a..b7bcce2 100644 --- a/test/numfmt.spec.ts +++ b/test/numfmt.spec.ts @@ -1,299 +1,280 @@ /* globals process */ /* eslint-disable no-loss-of-precision */ -import test, { getTimeZoneName, getTimeZoneOffset } from './utils.js'; +import { expect, test } from 'vitest'; +import { getTimeZoneName, getTimeZoneOffset } from './utils.ts'; import { format as numfmt, isDateFormat, isPercentFormat, isTextFormat } from '../lib/index.js'; -test('near zero negatives:', t => { - t.format('-0', -1, '--1'); - t.format('-general', -1, '--1'); - t.throws(() => numfmt('0.0 general'), '0.0 general'); - t.format('0.0', -1, '-1.0'); - t.format('0.0', -0.1, '-0.1'); - t.format('-0.0', -0.01, '-0.0'); - t.format('0.0', -0.01, '0.0'); - t.format(' - 0.0', -0.01, ' - 0.0'); - t.format(' - 0.0', -1, '- - 1.0'); - t.format('0.0;-0.0', -0.01, '-0.0'); - t.format('# ?/?', -0.01, '-0 '); - t.format('\\p\\o\\s 0.0;\\n\\e\\g 0.0;', -0.01, 'neg 0.0'); - t.end(); +test('near zero negatives:', () => { + expect(numfmt('-0', -1)).toBe('--1'); + expect(numfmt('-general', -1)).toBe('--1'); + expect(() => numfmt('0.0 general'), '0.0 general').toThrow(); + expect(numfmt('0.0', -1)).toBe('-1.0'); + expect(numfmt('0.0', -0.1)).toBe('-0.1'); + expect(numfmt('-0.0', -0.01)).toBe('-0.0'); + expect(numfmt('0.0', -0.01)).toBe('0.0'); + expect(numfmt(' - 0.0', -0.01)).toBe(' - 0.0'); + expect(numfmt(' - 0.0', -1)).toBe('- - 1.0'); + expect(numfmt('0.0;-0.0', -0.01)).toBe('-0.0'); + expect(numfmt('# ?/?', -0.01)).toBe('-0 '); + expect(numfmt('\\p\\o\\s 0.0;\\n\\e\\g 0.0;', -0.01)).toBe('neg 0.0'); }); -test('scaling should not mess number up:', t => { - t.format('0.0%', 0.0295, '3.0%'); - t.format('0.0,', 2950, '3.0'); - t.format('0%', 0, '0%'); - t.end(); +test('scaling should not mess number up:', () => { + expect(numfmt('0.0%', 0.0295)).toBe('3.0%'); + expect(numfmt('0.0,', 2950)).toBe('3.0'); + expect(numfmt('0%', 0)).toBe('0%'); }); -test('Misc input:', t => { - t.format('0', undefined, ''); - t.format('0', null, ''); - t.format('0', NaN, 'NaN'); - t.format('0', Infinity, '∞'); - t.format('0', -Infinity, '-∞'); - t.format('0', true, 'TRUE'); - t.format('0', false, 'FALSE'); - t.end(); +test('Misc input:', () => { + expect(numfmt('0', undefined)).toBe(''); + expect(numfmt('0', null)).toBe(''); + expect(numfmt('0', NaN)).toBe('NaN'); + expect(numfmt('0', Infinity)).toBe('∞'); + expect(numfmt('0', -Infinity)).toBe('-∞'); + expect(numfmt('0', true)).toBe('TRUE'); + expect(numfmt('0', false)).toBe('FALSE'); }); -test('isDate:', t => { - t.equal(isDateFormat('y'), true, 'isDate(y)'); - t.equal(isDateFormat('#;y'), true, 'isDate(#;y)'); - t.equal(isDateFormat('"y"'), false, 'isDate("y")'); - t.equal(isDateFormat('#;"y"'), false, 'isDate(#;"y")'); - t.equal(isDateFormat('\\y'), false, 'isDate(\\y)'); - t.equal(isDateFormat('#;\\y'), false, 'isDate(#;\\y)'); - t.equal(isDateFormat('#'), false, 'isDate(#)'); - t.equal(isDateFormat('@'), false, 'isDate(@)'); - t.equal(isDateFormat(''), false, 'isDate()'); - t.end(); +test('isDate:', () => { + expect(isDateFormat('y'), 'isDate(y)').toBe(true); + expect(isDateFormat('#;y'), 'isDate(#;y)').toBe(true); + expect(isDateFormat('"y"'), 'isDate("y")').toBe(false); + expect(isDateFormat('#;"y"'), 'isDate(#;"y")').toBe(false); + expect(isDateFormat('\\y'), 'isDate(\\y)').toBe(false); + expect(isDateFormat('#;\\y'), 'isDate(#;\\y)').toBe(false); + expect(isDateFormat('#'), 'isDate(#)').toBe(false); + expect(isDateFormat('@'), 'isDate(@)').toBe(false); + expect(isDateFormat(''), 'isDate()').toBe(false); }); -test('isPercent:', t => { - t.equal(isPercentFormat('0%'), true, 'isPercent(0%)'); - t.equal(isPercentFormat('#%'), true, 'isPercent(#%)'); - t.equal(isPercentFormat('#;#%'), true, 'isPercent(#;#%)'); - t.equal(isPercentFormat('%'), true, 'isPercent(%)'); - t.equal(isPercentFormat('#"%"'), false, 'isPercent(#"%")'); - t.equal(isPercentFormat('#\\%'), false, 'isPercent(#\\%)'); - t.equal(isPercentFormat('@'), false, 'isPercent(@)'); - t.equal(isPercentFormat(''), false, 'isPercent()'); - t.end(); +test('isPercent:', () => { + expect(isPercentFormat('0%'), 'isPercent(0%)').toBe(true); + expect(isPercentFormat('#%'), 'isPercent(#%)').toBe(true); + expect(isPercentFormat('#;#%'), 'isPercent(#;#%)').toBe(true); + expect(isPercentFormat('%'), 'isPercent(%)').toBe(true); + expect(isPercentFormat('#"%"'), 'isPercent(#"%")').toBe(false); + expect(isPercentFormat('#\\%'), 'isPercent(#\\%)').toBe(false); + expect(isPercentFormat('@'), 'isPercent(@)').toBe(false); + expect(isPercentFormat(''), 'isPercent()').toBe(false); }); -test('isText:', t => { - t.equal(isTextFormat('0%'), false, 'isText(0%)'); - t.equal(isTextFormat('#%'), false, 'isText(#%)'); - t.equal(isTextFormat('#;#%'), false, 'isText(#;#%)'); - t.equal(isTextFormat('%'), false, 'isText(%)'); - t.equal(isTextFormat('#"%"'), false, 'isText(#"%")'); - t.equal(isTextFormat('#\\%'), false, 'isText(#\\%)'); - t.equal(isTextFormat(''), false, 'isText()'); - t.equal(isTextFormat('@'), true, 'isText(@)'); - t.equal(isTextFormat('[blue]@'), true, 'isText([blue]@)'); - t.equal(isTextFormat('#;@'), false, 'isText(#;@)'); - t.equal(isTextFormat('#;#;@'), false, 'isText(#;#;@)'); - t.equal(isTextFormat('#;#;#;@'), false, 'isText(#;#;#;@)'); - t.end(); +test('isText:', () => { + expect(isTextFormat('0%'), 'isText(0%)').toBe(false); + expect(isTextFormat('#%'), 'isText(#%)').toBe(false); + expect(isTextFormat('#;#%'), 'isText(#;#%)').toBe(false); + expect(isTextFormat('%'), 'isText(%)').toBe(false); + expect(isTextFormat('#"%"'), 'isText(#"%")').toBe(false); + expect(isTextFormat('#\\%'), 'isText(#\\%)').toBe(false); + expect(isTextFormat(''), 'isText()').toBe(false); + expect(isTextFormat('@'), 'isText(@)').toBe(true); + expect(isTextFormat('[blue]@'), 'isText([blue]@)').toBe(true); + expect(isTextFormat('#;@'), 'isText(#;@)').toBe(false); + expect(isTextFormat('#;#;@'), 'isText(#;#;@)').toBe(false); + expect(isTextFormat('#;#;#;@'), 'isText(#;#;#;@)').toBe(false); }); -test('Date object as a value:', t => { +test('Date object as a value:', () => { process.env.TZ = 'Etc/UTC'; - t.equal(getTimeZoneName(), 'Coordinated Universal Time'); + expect(getTimeZoneName()).toBe('Coordinated Universal Time'); - t.format('0.######', new Date(1900, 1 - 1, 0), '0.'); - t.format('0.######', new Date(1900, 1 - 1, 1), '1.'); - t.format('0.######', new Date(1900, 1 - 1, 2), '2.'); - t.format('0.######', new Date(1900, 1 - 1, 3), '3.'); - t.format('0.######', new Date(1900, 1 - 1, 4), '4.'); - t.format('0.######', new Date(1900, 1 - 1, 5), '5.'); - t.format('0.######', new Date(1900, 1 - 1, 20), '20.'); - t.format('0.######', new Date(1900, 2 - 1, 1), '32.'); - t.equal(numfmt('0.######', new Date(1900, 2 - 1, 28)), '59.', 'new Date(1900, 2 - 1, 28, 0, 0, 0)'); + expect(numfmt('0.######', new Date(1900, 1 - 1, 0))).toBe('0.'); + expect(numfmt('0.######', new Date(1900, 1 - 1, 1))).toBe('1.'); + expect(numfmt('0.######', new Date(1900, 1 - 1, 2))).toBe('2.'); + expect(numfmt('0.######', new Date(1900, 1 - 1, 3))).toBe('3.'); + expect(numfmt('0.######', new Date(1900, 1 - 1, 4))).toBe('4.'); + expect(numfmt('0.######', new Date(1900, 1 - 1, 5))).toBe('5.'); + expect(numfmt('0.######', new Date(1900, 1 - 1, 20))).toBe('20.'); + expect(numfmt('0.######', new Date(1900, 2 - 1, 1))).toBe('32.'); + expect(numfmt('0.######', new Date(1900, 2 - 1, 28)), 'new Date(1900, 2 - 1, 28, 0, 0, 0)').toBe('59.'); // 1900-02-29 (serial number 60) is a date that only exists in Excel - t.equal(numfmt('0.######', new Date(1900, 3 - 1, 1)), '61.', 'new Date(1900, 3 - 1, 1, 0, 0, 0)'); - t.equal(numfmt('0.######', new Date(1900, 3 - 1, 2)), '62.', 'new Date(1900, 3 - 1, 2, 0, 0, 0)'); - t.equal(numfmt('0.######', new Date(1900, 3 - 1, 3)), '63.', 'new Date(1900, 3 - 1, 3, 0, 0, 0)'); - t.format('0.######', new Date(2000, 10 - 1, 10), '36809.'); - t.format('0.######', new Date(2100, 10 - 1, 30), '73353.'); - t.format('0.######', new Date(2004, 2 - 1, 29), '38046.'); - t.format('0.######', new Date(2020, 2 - 1, 29), '43890.'); - t.format('0.######', new Date(2000, 5 - 1, 9, 1, 0, 0), '36655.041667'); - t.format('0.######', new Date(1900, 1 - 1, 0, 1, 0, 0), '0.041667'); - t.format('0.######', new Date(1900, 1 - 1, 0, 0, 1, 0), '0.000694'); - t.format('0.######', new Date(1900, 1 - 1, 0, 0, 0, 1), '0.000012'); - t.format('0.######', new Date(1900, 1 - 1, 0, 23, 0, 0), '0.958333'); - t.format('0.######', new Date(1900, 1 - 1, 0, 0, 59, 0), '0.040972'); - t.format('0.######', new Date(1900, 1 - 1, 0, 0, 0, 59), '0.000683'); - t.format('0.######', new Date(1900, 1 - 1, 0, 23, 59, 59), '0.999988'); - t.format('0.######', new Date(1909, 1 - 1, 2, 3, 4, 5), '3290.127836'); - t.format('0.######', new Date(1909, 1 - 1, 2, 3, 4, 5), '3290.127836'); + expect(numfmt('0.######', new Date(1900, 3 - 1, 1)), 'new Date(1900, 3 - 1, 1, 0, 0, 0)').toBe('61.'); + expect(numfmt('0.######', new Date(1900, 3 - 1, 2)), 'new Date(1900, 3 - 1, 2, 0, 0, 0)').toBe('62.'); + expect(numfmt('0.######', new Date(1900, 3 - 1, 3)), 'new Date(1900, 3 - 1, 3, 0, 0, 0)').toBe('63.'); + expect(numfmt('0.######', new Date(2000, 10 - 1, 10))).toBe('36809.'); + expect(numfmt('0.######', new Date(2100, 10 - 1, 30))).toBe('73353.'); + expect(numfmt('0.######', new Date(2004, 2 - 1, 29))).toBe('38046.'); + expect(numfmt('0.######', new Date(2020, 2 - 1, 29))).toBe('43890.'); + expect(numfmt('0.######', new Date(2000, 5 - 1, 9, 1, 0, 0))).toBe('36655.041667'); + expect(numfmt('0.######', new Date(1900, 1 - 1, 0, 1, 0, 0))).toBe('0.041667'); + expect(numfmt('0.######', new Date(1900, 1 - 1, 0, 0, 1, 0))).toBe('0.000694'); + expect(numfmt('0.######', new Date(1900, 1 - 1, 0, 0, 0, 1))).toBe('0.000012'); + expect(numfmt('0.######', new Date(1900, 1 - 1, 0, 23, 0, 0))).toBe('0.958333'); + expect(numfmt('0.######', new Date(1900, 1 - 1, 0, 0, 59, 0))).toBe('0.040972'); + expect(numfmt('0.######', new Date(1900, 1 - 1, 0, 0, 0, 59))).toBe('0.000683'); + expect(numfmt('0.######', new Date(1900, 1 - 1, 0, 23, 59, 59))).toBe('0.999988'); + expect(numfmt('0.######', new Date(1909, 1 - 1, 2, 3, 4, 5))).toBe('3290.127836'); + expect(numfmt('0.######', new Date(1909, 1 - 1, 2, 3, 4, 5))).toBe('3290.127836'); // these were yielding "Sep 0, 2020" - t.format('MMM D, YYYY', new Date(2020, 8 - 1, 31, 13, 3, 0), 'Aug 31, 2020'); - t.format('MMM D, YYYY', new Date(Date.parse('2020-08-31T02:42:00.1')), 'Aug 31, 2020'); + expect(numfmt('MMM D, YYYY', new Date(2020, 8 - 1, 31, 13, 3, 0))).toBe('Aug 31, 2020'); + expect(numfmt('MMM D, YYYY', new Date(Date.parse('2020-08-31T02:42:00.1')))).toBe('Aug 31, 2020'); // test ignoreTimezone - const testYMD = (y, m, d) => { + const testYMD = (y: number, m: number, d: number) => { const dt = new Date(y, m, d); const tzSkew = getTimeZoneOffset(dt) / (60 * 24); const output = numfmt('General', dt, { ignoreTimezone: true }); - const diff = (output.replace(/^\d*(\.\d*)?$/, '0$1')) - tzSkew; + const diff = Number(output.replace(/^\d*(\.\d*)?$/, '0$1')) - tzSkew; return Math.abs(diff); }; - t.ok(testYMD(1900, 0, 0) < 0.00001, '1900 [ignoreTimezone]'); - t.ok(testYMD(1950, 0, 0) < 0.00001, '1950 [ignoreTimezone]'); - t.ok(testYMD(2000, 0, 0) < 0.00001, '2000 [ignoreTimezone]'); - - t.end(); + expect(testYMD(1900, 0, 0) < 0.00001, '1900 [ignoreTimezone]').toBeTruthy(); + expect(testYMD(1950, 0, 0) < 0.00001, '1950 [ignoreTimezone]').toBeTruthy(); + expect(testYMD(2000, 0, 0) < 0.00001, '2000 [ignoreTimezone]').toBeTruthy(); }); -test('Significant digits truncation:', t => { - t.format('General', 3300.0000000000005, '3300'); - t.format('General', -33000.000000000001, '-33000'); - t.end(); +test('Significant digits truncation:', () => { + expect(numfmt('General', 3300.0000000000005)).toBe('3300'); + expect(numfmt('General', -33000.000000000001)).toBe('-33000'); }); -test('Order of operators in fractions doesn\'t matter:', t => { +test('Order of operators in fractions doesn\'t matter:', () => { // 0 after # - t.format('#.##0', -10.29, '-10.290'); - t.format('#.###0', -10.29, '-10.290'); - t.format('#.####0', -10.29, '-10.290'); - t.format('#.###000', -10.29, '-10.29000'); - t.format('#.#0#0#0', -10.29, '-10.2900'); - t.format('#.#00', 1, '1.00'); - t.format('#.####0', 1, '1.0'); - t.format('#.###000', 1, '1.000'); - t.format('#.#0#0#0', 1, '1.000'); - t.format('#.##0', 0.01, '.010'); - t.format('#.###0', 0.01, '.010'); - t.format('#.#00', 0.01, '.010'); - t.format('#.####0', 0.0001, '.00010'); - t.format('#.#00', 0.0001, '.00'); - t.format('#.#0', 0.1, '.10'); - t.format('#.##0', 0.1, '.10'); - t.format('#.###0', 0.1, '.10'); + expect(numfmt('#.##0', -10.29)).toBe('-10.290'); + expect(numfmt('#.###0', -10.29)).toBe('-10.290'); + expect(numfmt('#.####0', -10.29)).toBe('-10.290'); + expect(numfmt('#.###000', -10.29)).toBe('-10.29000'); + expect(numfmt('#.#0#0#0', -10.29)).toBe('-10.2900'); + expect(numfmt('#.#00', 1)).toBe('1.00'); + expect(numfmt('#.####0', 1)).toBe('1.0'); + expect(numfmt('#.###000', 1)).toBe('1.000'); + expect(numfmt('#.#0#0#0', 1)).toBe('1.000'); + expect(numfmt('#.##0', 0.01)).toBe('.010'); + expect(numfmt('#.###0', 0.01)).toBe('.010'); + expect(numfmt('#.#00', 0.01)).toBe('.010'); + expect(numfmt('#.####0', 0.0001)).toBe('.00010'); + expect(numfmt('#.#00', 0.0001)).toBe('.00'); + expect(numfmt('#.#0', 0.1)).toBe('.10'); + expect(numfmt('#.##0', 0.1)).toBe('.10'); + expect(numfmt('#.###0', 0.1)).toBe('.10'); // 0 after ? - t.format('#.?00', 1, '1. 00'); - t.format('#.?0', 0.0001, '. 0'); - t.format('#.????0', -10.29, '-10.29 0'); - t.format('#.????0', 0.01, '.01 0'); + expect(numfmt('#.?00', 1)).toBe('1. 00'); + expect(numfmt('#.?0', 0.0001)).toBe('. 0'); + expect(numfmt('#.????0', -10.29)).toBe('-10.29 0'); + expect(numfmt('#.????0', 0.01)).toBe('.01 0'); // split pattern - t.format('#.#x#0', 1, '1.x0'); - t.format('#.#x#0', 0.1, '.1x0'); - t.format('#.??x?0', 0.01, '.01x 0'); - t.end(); + expect(numfmt('#.#x#0', 1)).toBe('1.x0'); + expect(numfmt('#.#x#0', 0.1)).toBe('.1x0'); + expect(numfmt('#.??x?0', 0.01)).toBe('.01x 0'); }); -test('Order of operators in integers doesn\'t matter:', t => { - t.format('0#', 0, '0'); - t.format('0?', 0, '0 '); - t.format('0#0#', 0, '00'); - t.format('0?0?', 0, '0 0 '); - t.end(); +test('Order of operators in integers doesn\'t matter:', () => { + expect(numfmt('0#', 0)).toBe('0'); + expect(numfmt('0?', 0)).toBe('0 '); + expect(numfmt('0#0#', 0)).toBe('00'); + expect(numfmt('0?0?', 0)).toBe('0 0 '); }); -test('Automatic minus injection for the third condition:', t => { // issue #27 - t.format('[>=100]#,##0;[<=-100]-#,##0;#,##0.00', -3.96, '-3.96'); - t.format('[>=100]#,##0;[<=-100]-#,##0;-#,##0.00', -3.96, '--3.96'); - t.format('[>=100]0;[<=-100]-0;"xx"0', -10, '-xx10'); - t.format('[<=-100]-0;"xx"0', -10, 'xx10'); - t.end(); +test('Automatic minus injection for the third condition:', () => { // issue #27 + expect(numfmt('[>=100]#,##0;[<=-100]-#,##0;#,##0.00', -3.96)).toBe('-3.96'); + expect(numfmt('[>=100]#,##0;[<=-100]-#,##0;-#,##0.00', -3.96)).toBe('--3.96'); + expect(numfmt('[>=100]0;[<=-100]-0;"xx"0', -10)).toBe('-xx10'); + expect(numfmt('[<=-100]-0;"xx"0', -10)).toBe('xx10'); }); -test('Excel ignores extra , in fractions:', t => { // issue #22 - t.format('#.##0,00', 0, '.000'); - t.format('#.##0,0,0', 0, '.000'); - t.end(); +test('Excel ignores extra , in fractions:', () => { // issue #22 + expect(numfmt('#.##0,00', 0)).toBe('.000'); + expect(numfmt('#.##0,0,0', 0)).toBe('.000'); }); -test.skip('Order of operators in exponential notation does not matter:', t => { - t.format('0?.?0E+1', 0, '00. 0E+1'); - t.format('0?.?0E+0', 0, '00. 0E+0'); - t.end(); +test.skip('Order of operators in exponential notation does not matter:', () => { + expect(numfmt('0?.?0E+1', 0)).toBe('00. 0E+1'); + expect(numfmt('0?.?0E+0', 0)).toBe('00. 0E+0'); }); -test.skip('Digits following denominator are padding', t => { - t.format('00 00/0z0', 12345.67, '12345 02/3z0'); - t.format('00 00/0 0', 12345.67, '12345 02/3 0'); - t.format('00 00/? ?', 12345.67, '12345 02/3 '); - t.format('00 00/# #', 12345.67, '12345 02/3 0'); - t.end(); +test.skip('Digits following denominator are padding', () => { + expect(numfmt('00 00/0z0', 12345.67)).toBe('12345 02/3z0'); + expect(numfmt('00 00/0 0', 12345.67)).toBe('12345 02/3 0'); + expect(numfmt('00 00/? ?', 12345.67)).toBe('12345 02/3 '); + expect(numfmt('00 00/# #', 12345.67)).toBe('12345 02/3 0'); }); -test('Integer gets injected if not present:', t => { - t.format('.0', 1234, '1234.0'); - t.format(' .0', 1234, ' 1234.0'); - t.format('x.0', 1234, 'x1234.0'); - t.format(' . 0', 1234, ' 1234. 0'); - t.format('0 0/0', 1234, '1234 0/1'); - t.format('0/0', 1234, '1234/1'); - t.end(); +test('Integer gets injected if not present:', () => { + expect(numfmt('.0', 1234)).toBe('1234.0'); + expect(numfmt(' .0', 1234)).toBe(' 1234.0'); + expect(numfmt('x.0', 1234)).toBe('x1234.0'); + expect(numfmt(' . 0', 1234)).toBe(' 1234. 0'); + expect(numfmt('0 0/0', 1234)).toBe('1234 0/1'); + expect(numfmt('0/0', 1234)).toBe('1234/1'); }); -test('Padding:', t => { - t.format('0', 1, '1'); - t.format('0?', 1, '01'); - t.format('0??', 1, '0 1'); - t.format('0???', 1, '0 1'); - t.format('0????', 1, '0 1'); - t.format('0', 0, '0'); - t.format('0?', 0, '0 '); - t.format('0??', 0, '0 '); - t.format('0???', 0, '0 '); - t.format('0????', 0, '0 '); - t.format('0', 1, '1'); - t.format('0#', 1, '01'); - t.format('0##', 1, '01'); - t.format('0###', 1, '01'); - t.format('0####', 1, '01'); - t.format('0', 0, '0'); - t.format('0#', 0, '0'); - t.format('0##', 0, '0'); - t.format('0###', 0, '0'); - t.format('0####', 0, '0'); +test('Padding:', () => { + expect(numfmt('0', 1)).toBe('1'); + expect(numfmt('0?', 1)).toBe('01'); + expect(numfmt('0??', 1)).toBe('0 1'); + expect(numfmt('0???', 1)).toBe('0 1'); + expect(numfmt('0????', 1)).toBe('0 1'); + expect(numfmt('0', 0)).toBe('0'); + expect(numfmt('0?', 0)).toBe('0 '); + expect(numfmt('0??', 0)).toBe('0 '); + expect(numfmt('0???', 0)).toBe('0 '); + expect(numfmt('0????', 0)).toBe('0 '); + expect(numfmt('0', 1)).toBe('1'); + expect(numfmt('0#', 1)).toBe('01'); + expect(numfmt('0##', 1)).toBe('01'); + expect(numfmt('0###', 1)).toBe('01'); + expect(numfmt('0####', 1)).toBe('01'); + expect(numfmt('0', 0)).toBe('0'); + expect(numfmt('0#', 0)).toBe('0'); + expect(numfmt('0##', 0)).toBe('0'); + expect(numfmt('0###', 0)).toBe('0'); + expect(numfmt('0####', 0)).toBe('0'); - t.format('0,', 1, '0'); - t.format('0,?', 1, '01'); - t.format('0,??', 1, '0 1'); - t.format('0,???', 1, '0, 1'); - t.format('0,????', 1, '0 1'); - t.format('0,', 0, '0'); - t.format('0,?', 0, '0 '); - t.format('0,??', 0, '0 '); - t.format('0,???', 0, '0, '); - t.format('0,????', 0, '0 '); + expect(numfmt('0,', 1)).toBe('0'); + expect(numfmt('0,?', 1)).toBe('01'); + expect(numfmt('0,??', 1)).toBe('0 1'); + expect(numfmt('0,???', 1)).toBe('0, 1'); + expect(numfmt('0,????', 1)).toBe('0 1'); + expect(numfmt('0,', 0)).toBe('0'); + expect(numfmt('0,?', 0)).toBe('0 '); + expect(numfmt('0,??', 0)).toBe('0 '); + expect(numfmt('0,???', 0)).toBe('0, '); + expect(numfmt('0,????', 0)).toBe('0 '); - t.format('.0', 1, '1.0'); - t.format('.?0', 1, '1. 0'); - t.format('.??0', 1, '1. 0'); - t.format('.???0', 1, '1. 0'); - t.format('.????0', 1, '1. 0'); - t.format('.0', 0, '.0'); - t.format('.?0', 0, '. 0'); - t.format('.??0', 0, '. 0'); - t.format('.???0', 0, '. 0'); - t.format('.????0', 0, '. 0'); - t.format('.0', 1, '1.0'); - t.format('.#0', 1, '1.0'); - t.format('.##0', 1, '1.0'); - t.format('.###0', 1, '1.0'); - t.format('.####0', 1, '1.0'); - t.format('.0', 0, '.0'); - t.format('.#0', 0, '.0'); - t.format('.##0', 0, '.0'); - t.format('.###0', 0, '.0'); - t.format('.####0', 0, '.0'); - t.end(); + expect(numfmt('.0', 1)).toBe('1.0'); + expect(numfmt('.?0', 1)).toBe('1. 0'); + expect(numfmt('.??0', 1)).toBe('1. 0'); + expect(numfmt('.???0', 1)).toBe('1. 0'); + expect(numfmt('.????0', 1)).toBe('1. 0'); + expect(numfmt('.0', 0)).toBe('.0'); + expect(numfmt('.?0', 0)).toBe('. 0'); + expect(numfmt('.??0', 0)).toBe('. 0'); + expect(numfmt('.???0', 0)).toBe('. 0'); + expect(numfmt('.????0', 0)).toBe('. 0'); + expect(numfmt('.0', 1)).toBe('1.0'); + expect(numfmt('.#0', 1)).toBe('1.0'); + expect(numfmt('.##0', 1)).toBe('1.0'); + expect(numfmt('.###0', 1)).toBe('1.0'); + expect(numfmt('.####0', 1)).toBe('1.0'); + expect(numfmt('.0', 0)).toBe('.0'); + expect(numfmt('.#0', 0)).toBe('.0'); + expect(numfmt('.##0', 0)).toBe('.0'); + expect(numfmt('.###0', 0)).toBe('.0'); + expect(numfmt('.####0', 0)).toBe('.0'); }); -test('Tokenizer is not case sensitive:', t => { - t.format('mmmm', 1234, 'May'); - t.format('MMMM', 1234, 'May'); - t.format('Mmmm', 1234, 'May'); - t.format('MmMm', 1234, 'May'); - t.format('dddd', 1234, 'Monday'); - t.format('DDDD', 1234, 'Monday'); - t.format('Dddd', 1234, 'Monday'); - t.format('dDdD', 1234, 'Monday'); - t.end(); +test('Tokenizer is not case sensitive:', () => { + expect(numfmt('mmmm', 1234)).toBe('May'); + expect(numfmt('MMMM', 1234)).toBe('May'); + expect(numfmt('Mmmm', 1234)).toBe('May'); + expect(numfmt('MmMm', 1234)).toBe('May'); + expect(numfmt('dddd', 1234)).toBe('Monday'); + expect(numfmt('DDDD', 1234)).toBe('Monday'); + expect(numfmt('Dddd', 1234)).toBe('Monday'); + expect(numfmt('dDdD', 1234)).toBe('Monday'); }); -test('Comma resolution test:', t => { - t.format('#,,"M"', 6000000, '6M'); - t.format('#,,"M";', 6000000, '6M'); - t.format('#,,"M";#,,"M";0', 6000000, '6M'); - t.end(); +test('Comma resolution test:', () => { + expect(numfmt('#,,"M"', 6000000)).toBe('6M'); + expect(numfmt('#,,"M";', 6000000)).toBe('6M'); + expect(numfmt('#,,"M";#,,"M";0', 6000000)).toBe('6M'); }); -test('Issue #64 (very small number):', t => { - t.format('0.000E+000', 2.33e-32, '2.330E-032'); - t.format('0.000E+000', 2.33e-321, '2.330E-321'); - t.format('0.000E+000', 2.33e+307, '2.330E+307'); - t.format('0.000E+000', 2.33e+309, '∞'); +test('Issue #64 (very small number):', () => { + expect(numfmt('0.000E+000', 2.33e-32)).toBe('2.330E-032'); + expect(numfmt('0.000E+000', 2.33e-321)).toBe('2.330E-321'); + expect(numfmt('0.000E+000', 2.33e+307)).toBe('2.330E+307'); + expect(numfmt('0.000E+000', 2.33e+309)).toBe('∞'); - t.format('General', 2.33e-321, '2.33E-321'); - t.format('0.0', 2.33e-321, '0.0'); - t.end(); + expect(numfmt('General', 2.33e-321)).toBe('2.33E-321'); + expect(numfmt('0.0', 2.33e-321)).toBe('0.0'); }); diff --git a/test/options.spec.ts b/test/options.spec.ts index e48e9b0..fa66eef 100644 --- a/test/options.spec.ts +++ b/test/options.spec.ts @@ -1,103 +1,94 @@ /* global process */ -import test, { getTimeZoneName } from './utils.js'; +import { expect, test } from 'vitest'; +import { getTimeZoneName } from './utils.ts'; import { format } from '../lib/index.js'; const excelOpts = { dateSpanLarge: false, dateErrorNumber: false }; -test('option: overflow', t => { - t.format('yyyy', -1, '######', { ...excelOpts }); - t.format('yyyy', -1, '🦆', { ...excelOpts, overflow: '🦆' }); - t.format('yyyy', -1, '👻', { ...excelOpts, overflow: '👻' }); - t.end(); +test('option: overflow', () => { + expect(format('yyyy', -1, { ...excelOpts })).toBe('######'); + expect(format('yyyy', -1, { ...excelOpts, overflow: '🦆' })).toBe('🦆'); + expect(format('yyyy', -1, { ...excelOpts, overflow: '👻' })).toBe('👻'); }); -test('option: locale', t => { - t.format('mmmm', 2000, 'June'); - t.format('mmmm', 2000, '六月', { locale: 'zh_CN' }); - t.format('mmmm', 2000, 'kesäkuuta', { locale: 'fi' }); - t.end(); +test('option: locale', () => { + expect(format('mmmm', 2000)).toBe('June'); + expect(format('mmmm', 2000, { locale: 'zh_CN' })).toBe('六月'); + expect(format('mmmm', 2000, { locale: 'fi' })).toBe('kesäkuuta'); }); -test('option: throws', t => { - t.throws(() => format('h #', 0), '{}'); - t.equal(format('h #', 0, { throws: false }), '######', '{ throws: false }'); - t.throws(() => format('h #', 0, { throws: true }), '{ throws: true }'); - t.end(); +test('option: throws', () => { + expect(() => format('h #', 0), '{}').toThrow(); + expect(format('h #', 0, { throws: false }), '{ throws: false }').toBe('######'); + expect(() => format('h #', 0, { throws: true }), '{ throws: true }').toThrow(); }); -test('option: invalid', t => { - t.format('h #', 0, '######', { throws: false }); - t.format('h #', 0, '🦂', { invalid: '🦂', throws: false }); - t.format('h #', 0, '#VALUE!', { invalid: '#VALUE!', throws: false }); - t.format('h #', 0, 'true', { invalid: true, throws: false }); - t.end(); +test('option: invalid', () => { + expect(format('h #', 0, { throws: false })).toBe('######'); + expect(format('h #', 0, { invalid: '🦂', throws: false })).toBe('🦂'); + expect(format('h #', 0, { invalid: '#VALUE!', throws: false })).toBe('#VALUE!'); + expect(format('h #', 0, { invalid: true, throws: false })).toBe('true'); }); -test('option: leap1900', t => { - t.format('yyyy-mm-dd', 60, '1900-02-29', {}); - t.format('yyyy-mm-dd', 60, '1900-02-29', { leap1900: true }); - t.format('yyyy-mm-dd', 60, '1900-02-28', { leap1900: false }); - t.end(); +test('option: leap1900', () => { + expect(format('yyyy-mm-dd', 60, {})).toBe('1900-02-29'); + expect(format('yyyy-mm-dd', 60, { leap1900: true })).toBe('1900-02-29'); + expect(format('yyyy-mm-dd', 60, { leap1900: false })).toBe('1900-02-28'); }); -test('option: dateErrorThrows', t => { - t.format('yyyy', -694325, '-694325', {}); - t.format('yyyy', -1, '-1', { dateSpanLarge: false }); - t.formatThrows('yyyy', -1, '-1', { dateSpanLarge: false, dateErrorThrows: true }); - t.formatThrows('yyyy', -694325, '-694325', { dateErrorThrows: true }); - t.end(); +test('option: dateErrorThrows', () => { + expect(format('yyyy', -694325, {})).toBe('-694325'); + expect(format('yyyy', -1, { dateSpanLarge: false })).toBe('-1'); + expect(() => format('yyyy', -1, { dateSpanLarge: false, dateErrorThrows: true })).toThrow(); + expect(() => format('yyyy', -694325, { dateErrorThrows: true })).toThrow(); }); -test('option: dateErrorNumber', t => { - t.format('yyyy', -1, '-1', { dateSpanLarge: false }); - t.format('yyyy', -1, '-1', { dateSpanLarge: false, dateErrorNumber: true }); - t.format('yyyy', -1, '######', { dateSpanLarge: false, dateErrorNumber: false }); - t.end(); +test('option: dateErrorNumber', () => { + expect(format('yyyy', -1, { dateSpanLarge: false })).toBe('-1'); + expect(format('yyyy', -1, { dateSpanLarge: false, dateErrorNumber: true })).toBe('-1'); + expect(format('yyyy', -1, { dateSpanLarge: false, dateErrorNumber: false })).toBe('######'); }); -test('option: nbsp', t => { +test('option: nbsp', () => { const spaceFmt = '???0" ". 0??'; - t.format(spaceFmt, 1, ' 1 . 0 '); - t.format(spaceFmt, 1, '   1 . 0  ', { nbsp: true }); - t.format(spaceFmt, 1, ' 1 . 0 ', { nbsp: false }); - t.format('0 "foo bar" .0', 1.1, '1 foo bar .1'); - t.format('0 "foo bar" .0', 1.1, '1 foo bar .1', { nbsp: false }); - t.format('0 "foo bar" .0', 1.1, '1 foo bar .1', { nbsp: true }); - t.end(); + expect(format(spaceFmt, 1)).toBe(' 1 . 0 '); + expect(format(spaceFmt, 1, { nbsp: true })).toBe('   1 . 0  '); + expect(format(spaceFmt, 1, { nbsp: false })).toBe(' 1 . 0 '); + expect(format('0 "foo bar" .0', 1.1)).toBe('1 foo bar .1'); + expect(format('0 "foo bar" .0', 1.1, { nbsp: false })).toBe('1 foo bar .1'); + expect(format('0 "foo bar" .0', 1.1, { nbsp: true })).toBe('1 foo bar .1'); }); -test('option: grouping', t => { - t.format('0', 1234567890, '1234567890', { grouping: [ 2, 2 ] }); - t.format('#,##0', 1234567890, '1,234,567,890', { grouping: [ 3, 3 ] }); - t.format('#,##0', 1234567890, '1,234,567,890', { grouping: [ 3 ] }); - t.format('#,##0', 1234567890, '1,23,45,67,890', { grouping: [ 3, 2 ] }); - t.format('#,##0', 1234567890, '12,34,56,78,90', { grouping: [ 2, 2 ] }); - t.format('#,##0', 1234567890, '12,34,56,78,90', { grouping: [ 2 ] }); - t.format('#,##0', 1234567890, '12,345,678,90', { grouping: [ 2, 3 ] }); - t.end(); +test('option: grouping', () => { + expect(format('0', 1234567890, { grouping: [ 2, 2 ] })).toBe('1234567890'); + expect(format('#,##0', 1234567890, { grouping: [ 3, 3 ] })).toBe('1,234,567,890'); + expect(format('#,##0', 1234567890, { grouping: [ 3 ] })).toBe('1,234,567,890'); + expect(format('#,##0', 1234567890, { grouping: [ 3, 2 ] })).toBe('1,23,45,67,890'); + expect(format('#,##0', 1234567890, { grouping: [ 2, 2 ] })).toBe('12,34,56,78,90'); + expect(format('#,##0', 1234567890, { grouping: [ 2 ] })).toBe('12,34,56,78,90'); + expect(format('#,##0', 1234567890, { grouping: [ 2, 3 ] })).toBe('12,345,678,90'); }); -test('option: grouping', t => { - t.format('_($* #,##0.00_)', 12345.67, ' $12,345.67 '); - t.format('_($* #,##0.00_)', 12345.67, '\x03($12,345.67\x03)', { skipChar: '\x03' }); - t.format('_($* #,##0.00_)', 12345.67, 'ÆÐ($12,345.67ÆÐ)', { skipChar: 'ÆÐ' }); - t.format('_($* #,##0.00_)', 12345.67, ' $\x04 12,345.67 ', { fillChar: '\x04' }); - t.format('_($* #,##0.00_)', 12345.67, ' $ÞÖ 12,345.67 ', { fillChar: 'ÞÖ' }); - t.format('_($* #,##0.00_)', 12345.67, '\x03($\x04 12,345.67\x03)', { skipChar: '\x03', fillChar: '\x04' }); - t.end(); +test('option: grouping', () => { + expect(format('_($* #,##0.00_)', 12345.67)).toBe(' $12,345.67 '); + expect(format('_($* #,##0.00_)', 12345.67, { skipChar: '\x03' })).toBe('\x03($12,345.67\x03)'); + expect(format('_($* #,##0.00_)', 12345.67, { skipChar: 'ÆÐ' })).toBe('ÆÐ($12,345.67ÆÐ)'); + expect(format('_($* #,##0.00_)', 12345.67, { fillChar: '\x04' })).toBe(' $\x04 12,345.67 '); + expect(format('_($* #,##0.00_)', 12345.67, { fillChar: 'ÞÖ' })).toBe(' $ÞÖ 12,345.67 '); + expect(format('_($* #,##0.00_)', 12345.67, { skipChar: '\x03', fillChar: '\x04' })) + .toBe('\x03($\x04 12,345.67\x03)'); }); // this test is flaky at best in node versions < 14 so only run it in 14+ if (parseInt(process.version.replace(/^v/, ''), 10) >= 14) { - test('option: ignoreTimezone', t => { + test('option: ignoreTimezone', () => { process.env.TZ = 'Asia/Calcutta'; - t.equal(getTimeZoneName(), 'India Standard Time', 'Timezone is IST'); + expect(getTimeZoneName(), 'Timezone is IST').toBe('India Standard Time'); const baseDate = new Date(2000, 0, 1); - t.equal(baseDate.toUTCString(), 'Fri, 31 Dec 1999 18:30:00 GMT', 'Date has a timezone'); + expect(baseDate.toUTCString(), 'Date has a timezone').toBe('Fri, 31 Dec 1999 18:30:00 GMT'); const gmtStr = 'ddd, dd mmm yyyy hh:mm:ss "GMT"'; - t.format(gmtStr, baseDate, 'Sat, 01 Jan 2000 00:00:00 GMT', { nbsp: 0 }); - t.format(gmtStr, baseDate, 'Fri, 31 Dec 1999 18:30:00 GMT', { nbsp: 0, ignoreTimezone: true }); - t.format(gmtStr, baseDate, 'Sat, 01 Jan 2000 00:00:00 GMT', { nbsp: 0, ignoreTimezone: false }); - t.end(); + expect(format(gmtStr, baseDate, { nbsp: 0 })).toBe('Sat, 01 Jan 2000 00:00:00 GMT'); + expect(format(gmtStr, baseDate, { nbsp: 0, ignoreTimezone: true })).toBe('Fri, 31 Dec 1999 18:30:00 GMT'); + expect(format(gmtStr, baseDate, { nbsp: 0, ignoreTimezone: false })).toBe('Sat, 01 Jan 2000 00:00:00 GMT'); }); } diff --git a/test/parseValue.spec.ts b/test/parseValue.spec.ts index 9b7bb85..09b8ea7 100644 --- a/test/parseValue.spec.ts +++ b/test/parseValue.spec.ts @@ -1,16 +1,12 @@ -/* globals process */ -import tape, { getTimeZoneName, isLeapYear } from './utils.js'; +import { expect, test } from 'vitest'; +import { getTimeZoneName, isLeapYear } from './utils.ts'; import { addLocale, dateToSerial, format, parseBool, parseDate, parseNumber, parseTime, parseValue } from '../lib/index.js'; import { getLocale, listLocales } from '../lib/locale.js'; const currentYear = dateToSerial([ new Date().getUTCFullYear(), 1, 1 ]) || 0; const leapDay = isLeapYear(new Date().getUTCFullYear()) ? 1 : 0; -/** - * @type {[ string, number | boolean | null, string | null ][]} - * @ignore - */ -const tests = [ +const tests: [ string, number | boolean | null, string | null ][] = [ // general [ '1234', 1234, null ], [ '12.34', 12.34, null ], @@ -546,85 +542,73 @@ const tests = [ [ ' FALSE ', false, null ] ]; -tape('parseNumber', t => { +test('parseNumber', () => { process.env.TZ = 'Asia/Calcutta'; - t.equal(getTimeZoneName(), 'India Standard Time', 'Timezone is IST'); + expect(getTimeZoneName(), 'Timezone is IST').toBe('India Standard Time'); - t.deepLooseEqual( + expect( parseNumber('-123'), - { v: -123 }, 'parseNumber parses numbers' - ); - t.deepLooseEqual( + ).toEqual({ v: -123 }); + expect( parseNumber('1999.10.01'), - null, 'parseNumber does not parse invalid numbers' - ); - t.deepLooseEqual( + ).toEqual(null); + expect( parseNumber('1999-10-01'), - null, 'parseNumber does not parse non-numbers' - ); + ).toEqual(null); - t.deepLooseEqual( + expect( parseDate('1999-10-01 12:00:00'), - { v: 36434.5, z: 'yyyy-mm-dd hh:mm:ss' }, 'parseDate parses dates' - ); - t.deepLooseEqual( + ).toEqual({ v: 36434.5, z: 'yyyy-mm-dd hh:mm:ss' }); + expect( parseDate('-123'), - null, 'parseDate does not parse non-dates' - ); + ).toEqual(null); - t.deepLooseEqual( + expect( parseTime('09:18 PM'), - { v: 0.8875, z: 'hh:mm AM/PM' }, 'parseTime parses time' - ); - t.deepLooseEqual( + ).toEqual({ v: 0.8875, z: 'hh:mm AM/PM' }); + expect( parseTime('-123'), - null, 'parseTime does not parse non-time' - ); + ).toEqual(null); - t.deepLooseEqual( + expect( parseBool('False'), - { v: false }, 'parseBool parses booleans' - ); - t.deepLooseEqual( + ).toEqual({ v: false }); + expect( parseBool('-123'), - null, 'parseBool does not parse non-booleans' - ); + ).toEqual(null); - t.deepLooseEqual( + expect( parseBool('False'), - { v: false }, 'parseBool parses booleans' - ); - t.deepLooseEqual( + ).toEqual({ v: false }); + expect( parseBool('-123'), - null, 'parseBool does not parse non-booleans' - ); + ).toEqual(null); - t.deepLooseEqual( + expect( parseDate('5.2022'), - null, 'parseDate does not parse "decimals"' - ); + ).toEqual(null); // test value parsing tests.forEach(ts => { const [ input, value ] = ts; const p = parseValue(input); if (p == null) { - t.equal(null, value, input); + expect(null, input).toBe(value); } else { - t.equal(p.v, value, `valueOf("${input}")`); + expect(p.v, `valueOf("${input}")`).toBe(value); } }); @@ -633,26 +617,24 @@ tape('parseNumber', t => { const [ input, , expectedZ ] = ts; const p = parseValue(input); if (p == null) { - t.equal(null, expectedZ, input); + expect(null, input).toBe(expectedZ); } else { - t.equal(p.z ?? null, expectedZ, `formatOf("${input}")`); + expect(p.z ?? null, `formatOf("${input}")`).toBe(expectedZ); } }); - - t.end(); }); -tape('parseNumber locale support', t => { +test('parseNumber locale support', () => { // can parse numbers in any language - t.deepEqual(parseNumber('1,234,567.89', { locale: 'en' }), { v: 1234567.89, z: '#,##0.00' }); - t.deepEqual(parseNumber('1.234.567,89', { locale: 'en' }), null); + expect(parseNumber('1,234,567.89', { locale: 'en' })).toEqual({ v: 1234567.89, z: '#,##0.00' }); + expect(parseNumber('1.234.567,89', { locale: 'en' })).toEqual(null); - t.deepEqual(parseNumber('1,234,567.89', { locale: 'de' }), null); - t.deepEqual(parseNumber('1.234.567,89', { locale: 'de' }), { v: 1234567.89, z: '#,##0.00' }); + expect(parseNumber('1,234,567.89', { locale: 'de' })).toEqual(null); + expect(parseNumber('1.234.567,89', { locale: 'de' })).toEqual({ v: 1234567.89, z: '#,##0.00' }); - t.deepEqual(parseNumber('1,234,567.89', { locale: 'de' }), null); - t.deepEqual(parseNumber('1.234.567,89', { locale: 'de' }), { v: 1234567.89, z: '#,##0.00' }); + expect(parseNumber('1,234,567.89', { locale: 'de' })).toEqual(null); + expect(parseNumber('1.234.567,89', { locale: 'de' })).toEqual({ v: 1234567.89, z: '#,##0.00' }); addLocale({ decimal: '·', @@ -662,28 +644,26 @@ tape('parseNumber locale support', t => { percent: '٪', exponent: 'X' }, 'xy'); - // t.format('#,##0.00', 1234567.89, '1~234~567·89', { locale: 'xy' }); - t.deepEqual(parseNumber('1~234~567·89', { locale: 'xy' }), { v: 1234567.89, z: '#,##0.00' }); - t.deepEqual(parseNumber('1\u202f234\u202f567,89', { locale: 'fr' }), { v: 1234567.89, z: '#,##0.00' }); - t.deepEqual(parseNumber('1٬234٬567٫89', { locale: 'ar' }), { v: 1234567.89, z: '#,##0.00' }); - - t.end(); + // expect(format('#,##0.00', 1234567.89, { locale: 'xy' })).toBe('1~234~567·89'); + expect(parseNumber('1~234~567·89', { locale: 'xy' })).toEqual({ v: 1234567.89, z: '#,##0.00' }); + expect(parseNumber('1\u202f234\u202f567,89', { locale: 'fr' })).toEqual({ v: 1234567.89, z: '#,##0.00' }); + expect(parseNumber('1٬234٬567٫89', { locale: 'ar' })).toEqual({ v: 1234567.89, z: '#,##0.00' }); }); -tape('parseDate locale support', t => { +test('parseDate locale support', () => { // can parse dates in any language - t.deepEqual(parseDate('Wednesday, 13. march 1989', { locale: 'en' }), { v: 32580, z: 'dddd, d. mmmm yyyy' }); - t.deepEqual(parseDate('sreda, 13. marec 1989', { locale: 'sl' }), { v: 32580, z: 'dddd, d. mmmm yyyy' }); - t.deepEqual(parseDate('miðvikudagur, 13. mars 1989', { locale: 'is' }), { v: 32580, z: 'dddd, d. mmmm yyyy' }); + expect(parseDate('Wednesday, 13. march 1989', { locale: 'en' })).toEqual({ v: 32580, z: 'dddd, d. mmmm yyyy' }); + expect(parseDate('sreda, 13. marec 1989', { locale: 'sl' })).toEqual({ v: 32580, z: 'dddd, d. mmmm yyyy' }); + expect(parseDate('miðvikudagur, 13. mars 1989', { locale: 'is' })).toEqual({ v: 32580, z: 'dddd, d. mmmm yyyy' }); - t.deepEqual(parseDate('Fri, 23 Dec 1988', { locale: 'en' }), { v: 32500, z: 'ddd, d mmm yyyy' }); - t.deepEqual(parseDate('Fös, 23 DES 1988', { locale: 'is' }), { v: 32500, z: 'ddd, d mmm yyyy' }); - t.deepEqual(parseDate('vin, 23 dec 1988', { locale: 'ro' }), { v: 32500, z: 'ddd, d mmm yyyy' }); + expect(parseDate('Fri, 23 Dec 1988', { locale: 'en' })).toEqual({ v: 32500, z: 'ddd, d mmm yyyy' }); + expect(parseDate('Fös, 23 DES 1988', { locale: 'is' })).toEqual({ v: 32500, z: 'ddd, d mmm yyyy' }); + expect(parseDate('vin, 23 dec 1988', { locale: 'ro' })).toEqual({ v: 32500, z: 'ddd, d mmm yyyy' }); - t.deepEqual(parseDate('31/febrero/27', { locale: 'es_UY' }), { v: 11381, z: 'yy/mmmm/d' }); + expect(parseDate('31/febrero/27', { locale: 'es_UY' })).toEqual({ v: 11381, z: 'yy/mmmm/d' }); - t.deepEqual(parseDate('kedd 29 február 1916', { locale: 'hu' }), { v: 5904, z: 'dddd d mmmm yyyy' }); - t.deepEqual(parseDate('01 oct 1975', { locale: 'eb' }), { v: 27668, z: 'dd mmm yyyy' }); + expect(parseDate('kedd 29 február 1916', { locale: 'hu' })).toEqual({ v: 5904, z: 'dddd d mmmm yyyy' }); + expect(parseDate('01 oct 1975', { locale: 'eb' })).toEqual({ v: 27668, z: 'dd mmm yyyy' }); const fm = [ 'dddd d mmmm yyyy', @@ -705,46 +685,43 @@ tape('parseDate locale support', t => { for (const f of fm) { const o = format(f, 3290.1278435, opt); const parsed = parseDate(o, opt); - t.ok(!!parsed, `Locale: "${f}" in ${l} (${o})`); + expect(!!parsed, `Locale: "${f}" in ${l} (${o})`).toBeTruthy(); } // locales with preferMDY should allow dates that fit, else only allow DMY const MDY = getLocale(l)?.preferMDY; if (MDY) { - t.deepEqual(parseDate('07/05/82', opt), { v: 30137, z: 'mm/dd/yy' }, `${l} prefers MDY (07/05/82)`); - t.deepEqual(parseDate('31/05/82', opt), null, `${l} prefers MDY (31/05/82)`); - t.deepEqual(parseDate('05/31/82', opt), { v: 30102, z: 'mm/dd/yy' }, `${l} prefers MDY (05/31/82)`); + expect(parseDate('07/05/82', opt), `${l} prefers MDY (07/05/82)`).toEqual({ v: 30137, z: 'mm/dd/yy' }); + expect(parseDate('31/05/82', opt), `${l} prefers MDY (31/05/82)`).toEqual(null); + expect(parseDate('05/31/82', opt), `${l} prefers MDY (05/31/82)`).toEqual({ v: 30102, z: 'mm/dd/yy' }); } else { - t.deepEqual(parseDate('07/05/82', opt), { v: 30078, z: 'dd/mm/yy' }, `${l} prefers DMY (07/05/82)`); - t.deepEqual(parseDate('07/31/82', opt), null, `${l} prefers DMY (07/31/82)`); - t.deepEqual(parseDate('31/05/82', opt), { v: 30102, z: 'dd/mm/yy' }, `${l} prefers MDY (31/05/82)`); + expect(parseDate('07/05/82', opt), `${l} prefers DMY (07/05/82)`).toEqual({ v: 30078, z: 'dd/mm/yy' }); + expect(parseDate('07/31/82', opt), `${l} prefers DMY (07/31/82)`).toEqual(null); + expect(parseDate('31/05/82', opt), `${l} prefers MDY (31/05/82)`).toEqual({ v: 30102, z: 'dd/mm/yy' }); } } - t.end(); }); -tape('parseTime locale support', t => { - t.deepEqual(parseTime('01:31 a', { locale: 'fi' }), { v: 0.06319444444444444, z: 'hh:mm AM/PM' }, 'fi: 01:31 a'); - t.deepEqual(parseTime('01:31 am', { locale: 'fi' }), { v: 0.06319444444444444, z: 'hh:mm AM/PM' }, 'fi: 01:31 am'); - t.deepEqual(parseTime('01:31 ap.', { locale: 'fi' }), { v: 0.06319444444444444, z: 'hh:mm AM/PM' }, 'fi: 01:31 ap.'); - t.deepEqual(parseTime('01:31 ap', { locale: 'fi' }), { v: 0.06319444444444444, z: 'hh:mm AM/PM' }, 'fi: 01:31 ap'); - t.deepEqual(parseTime('01:31 a', { locale: 'is' }), { v: 0.06319444444444444, z: 'hh:mm AM/PM' }, 'is: 01:31 a'); - t.deepEqual(parseTime('01:31 am', { locale: 'is' }), { v: 0.06319444444444444, z: 'hh:mm AM/PM' }, 'is: 01:31 am'); - t.deepEqual(parseTime('01:31 fh', { locale: 'is' }), { v: 0.06319444444444444, z: 'hh:mm AM/PM' }, 'is: 01:31 fh'); - t.deepEqual(parseTime('01:31 fh.', { locale: 'is' }), { v: 0.06319444444444444, z: 'hh:mm AM/PM' }, 'is: 01:31 fh.'); - t.deepEqual(parseTime('01:31 f.h.', { locale: 'is' }), { v: 0.06319444444444444, z: 'hh:mm AM/PM' }, 'is: 01:31 f.h.'); - t.deepEqual(parseTime('01:31 f. h.', { locale: 'is' }), { v: 0.06319444444444444, z: 'hh:mm AM/PM' }, 'is: 01:31 f. h.'); - t.end(); +test('parseTime locale support', () => { + expect(parseTime('01:31 a', { locale: 'fi' }), 'fi: 01:31 a').toEqual({ v: 0.06319444444444444, z: 'hh:mm AM/PM' }); + expect(parseTime('01:31 am', { locale: 'fi' }), 'fi: 01:31 am').toEqual({ v: 0.06319444444444444, z: 'hh:mm AM/PM' }); + expect(parseTime('01:31 ap.', { locale: 'fi' }), 'fi: 01:31 ap.').toEqual({ v: 0.06319444444444444, z: 'hh:mm AM/PM' }); + expect(parseTime('01:31 ap', { locale: 'fi' }), 'fi: 01:31 ap').toEqual({ v: 0.06319444444444444, z: 'hh:mm AM/PM' }); + expect(parseTime('01:31 a', { locale: 'is' }), 'is: 01:31 a').toEqual({ v: 0.06319444444444444, z: 'hh:mm AM/PM' }); + expect(parseTime('01:31 am', { locale: 'is' }), 'is: 01:31 am').toEqual({ v: 0.06319444444444444, z: 'hh:mm AM/PM' }); + expect(parseTime('01:31 fh', { locale: 'is' }), 'is: 01:31 fh').toEqual({ v: 0.06319444444444444, z: 'hh:mm AM/PM' }); + expect(parseTime('01:31 fh.', { locale: 'is' }), 'is: 01:31 fh.').toEqual({ v: 0.06319444444444444, z: 'hh:mm AM/PM' }); + expect(parseTime('01:31 f.h.', { locale: 'is' }), 'is: 01:31 f.h.').toEqual({ v: 0.06319444444444444, z: 'hh:mm AM/PM' }); + expect(parseTime('01:31 f. h.', { locale: 'is' }), 'is: 01:31 f. h.').toEqual({ v: 0.06319444444444444, z: 'hh:mm AM/PM' }); }); -tape('parseBool locale support', t => { - t.deepEqual(parseBool('TRUE', { locale: 'en' }), { v: true }, 'en: TRUE'); - t.deepEqual(parseBool('FALSE', { locale: 'en' }), { v: false }, 'en: FALSE'); - t.deepEqual(parseBool('TRUE', { locale: 'jn' }), { v: true }, 'jn: TRUE'); - t.deepEqual(parseBool('FALSE', { locale: 'jn' }), { v: false }, 'jn: FALSE'); - t.deepEqual(parseBool('TRUE', { locale: 'hu' }), { v: true }, 'hu: TRUE'); - t.deepEqual(parseBool('FALSE', { locale: 'hu' }), { v: false }, 'hu: FALSE'); - t.deepEqual(parseBool('IGAZ', { locale: 'hu' }), { v: true }, 'hu: IGAZ'); - t.deepEqual(parseBool('HAMIS', { locale: 'hu' }), { v: false }, 'hu: HAMIS'); - t.end(); +test('parseBool locale support', () => { + expect(parseBool('TRUE', { locale: 'en' }), 'en: TRUE').toEqual({ v: true }); + expect(parseBool('FALSE', { locale: 'en' }), 'en: FALSE').toEqual({ v: false }); + expect(parseBool('TRUE', { locale: 'jn' }), 'jn: TRUE').toEqual({ v: true }); + expect(parseBool('FALSE', { locale: 'jn' }), 'jn: FALSE').toEqual({ v: false }); + expect(parseBool('TRUE', { locale: 'hu' }), 'hu: TRUE').toEqual({ v: true }); + expect(parseBool('FALSE', { locale: 'hu' }), 'hu: FALSE').toEqual({ v: false }); + expect(parseBool('IGAZ', { locale: 'hu' }), 'hu: IGAZ').toEqual({ v: true }); + expect(parseBool('HAMIS', { locale: 'hu' }), 'hu: HAMIS').toEqual({ v: false }); }); diff --git a/test/robust-mode.spec.ts b/test/robust-mode.spec.ts index 034d7a0..6a8d55c 100644 --- a/test/robust-mode.spec.ts +++ b/test/robust-mode.spec.ts @@ -1,24 +1,22 @@ -import test from './utils.js'; +import { expect, test } from 'vitest'; import { format, formatColor, isDateFormat } from '../lib/index.js'; const excelOpts = { dateSpanLarge: false, dateErrorNumber: false }; -test('Robust mode', t => { - t.equal(format('dddd, dd. mmmm yyy', -1, excelOpts), '######'); +test('Robust mode', () => { + expect(format('dddd, dd. mmmm yyy', -1, excelOpts)).toBe('######'); // these things should throw - t.throws(() => format('a;b;c;d;', 0, excelOpts), 'a;b;c;d;'); - t.throws(() => format('y 0', 0, excelOpts), 'y 0'); + expect(() => format('a;b;c;d;', 0, excelOpts), 'a;b;c;d;').toThrow(); + expect(() => format('y 0', 0, excelOpts), 'y 0').toThrow(); // ...but not in robust mode const opts = { locale: 'en', throws: false, ...excelOpts }; - t.equal(format('a;b;c;d;', 0, opts), '######', 'format does not throw with "a;b;c;d;"'); - t.equal(format('y 0', 1, opts), '######', 'format does not throw with "y 0"'); - t.equal(format('dddd, dd. mmmm yyy', -1, opts), '######', 'format does not throw with "dddd, dd. mmmm yyy"'); - t.equal(format('y 0', 1, opts), '######', 'format does not throw with "dddd, dd. mmmm yyy"'); + expect(format('a;b;c;d;', 0, opts), 'format does not throw with "a;b;c;d;"').toBe('######'); + expect(format('y 0', 1, opts), 'format does not throw with "y 0"').toBe('######'); + expect(format('dddd, dd. mmmm yyy', -1, opts), 'format does not throw with "dddd, dd. mmmm yyy"').toBe('######'); + expect(format('y 0', 1, opts), 'format does not throw with "dddd, dd. mmmm yyy"').toBe('######'); - t.equal(formatColor('a;b;c;d;', 0, opts), null, 'formatColor does not throw'); - t.equal(isDateFormat('a;b;c;d;', opts), false, 'isDateFormat does not throw'); - - t.end(); + expect(formatColor('a;b;c;d;', 0, opts), 'formatColor does not throw').toBe(null); + expect(isDateFormat('a;b;c;d;', opts), 'isDateFormat does not throw').toBe(false); }); diff --git a/test/serialDate.spec.ts b/test/serialDate.spec.ts index 82505f5..a618cf8 100644 --- a/test/serialDate.spec.ts +++ b/test/serialDate.spec.ts @@ -1,91 +1,82 @@ /* globals process */ -import test, { getTimeZoneName } from './utils.js'; +import { expect, test } from 'vitest'; +import { getTimeZoneName } from './utils.ts'; import { dateToSerial, dateFromSerial } from '../lib/index.js'; -function round (n) { +function round (n: number): number { return Math.round(n * 1e10) / 1e10; } -test('dateToSerial (Date):', t => { +test('dateToSerial (Date):', () => { process.env.TZ = 'Asia/Calcutta'; - t.equal(getTimeZoneName(), 'India Standard Time', 'Timezone is IST'); + expect(getTimeZoneName(), 'Timezone is IST').toBe('India Standard Time'); - const testYMD = (y, m, d, hh, mm, ss, tz = false) => { + const testYMD = (y: number, m: number, d: number, hh: number, mm: number, ss: number, tz = false) => { const dt = new Date(y, m - 1, d, hh, mm, ss); return round(dateToSerial(dt, { ignoreTimezone: tz })); }; - t.equal(testYMD(1978, 5, 17, 10, 25, 30, true), 28627.2052083333, '[1978, 5, 17, 10, 25, 30] ignoreTimezone'); - t.equal(testYMD(1978, 5, 17, 10, 25, 30), 28627.434375, '[1978, 5, 17, 10, 25, 30]'); + expect(testYMD(1978, 5, 17, 10, 25, 30, true), '[1978, 5, 17, 10, 25, 30] ignoreTimezone').toBe(28627.2052083333); + expect(testYMD(1978, 5, 17, 10, 25, 30), '[1978, 5, 17, 10, 25, 30]').toBe(28627.434375); - t.equal(testYMD(2022, 3, 1, 13, 53, 11), 44621.578599537, '[2022, 3, 1, 13, 53, 11]'); - t.equal(testYMD(2022, 3, 1, 13, 53, 11, true), 44621.3494328704, '[2022, 3, 1, 13, 53, 11] ignoreTimezone'); + expect(testYMD(2022, 3, 1, 13, 53, 11), '[2022, 3, 1, 13, 53, 11]').toBe(44621.578599537); + expect(testYMD(2022, 3, 1, 13, 53, 11, true), '[2022, 3, 1, 13, 53, 11] ignoreTimezone').toBe(44621.3494328704); - t.equal(testYMD(1900, 1, 1, 0, 0, 0), 1, '[1900, 1, 1, 0, 0, 0]'); - t.equal(testYMD(1900, 1, 1, 0, 0, 0, true), 0.7769675926, '[1900, 1, 1, 0, 0, 0] ignoreTimezone'); + expect(testYMD(1900, 1, 1, 0, 0, 0), '[1900, 1, 1, 0, 0, 0]').toBe(1); + expect(testYMD(1900, 1, 1, 0, 0, 0, true), '[1900, 1, 1, 0, 0, 0] ignoreTimezone').toBe(0.7769675926); - t.equal(testYMD(1950, 1, 1, 0, 0, 0), 18264, '[1950, 1, 1, 0, 0, 0]'); - t.equal(testYMD(1950, 1, 1, 0, 0, 0, true), 18263.7708333333, '[1950, 1, 1, 0, 0, 0] ignoreTimezone'); + expect(testYMD(1950, 1, 1, 0, 0, 0), '[1950, 1, 1, 0, 0, 0]').toBe(18264); + expect(testYMD(1950, 1, 1, 0, 0, 0, true), '[1950, 1, 1, 0, 0, 0] ignoreTimezone').toBe(18263.7708333333); - t.equal(testYMD(2000, 1, 1, 0, 0, 0), 36526, '[2000, 1, 1, 0, 0, 0]'); - t.equal(testYMD(2000, 1, 1, 0, 0, 0, true), 36525.7708333333, '[2000, 1, 1, 0, 0, 0] ignoreTimezone'); - - t.end(); + expect(testYMD(2000, 1, 1, 0, 0, 0), '[2000, 1, 1, 0, 0, 0]').toBe(36526); + expect(testYMD(2000, 1, 1, 0, 0, 0, true), '[2000, 1, 1, 0, 0, 0] ignoreTimezone').toBe(36525.7708333333); }); -test('dateToSerial (Array):', t => { - const testYMD = (y, m, d, hh, mm, ss, tz = false) => { +test('dateToSerial (Array):', () => { + const testYMD = (y: number, m: number, d: number, hh: number, mm: number, ss: number, tz = false) => { return round(dateToSerial( [ y, m, d, hh, mm, ss ], { ignoreTimezone: tz } )); }; - t.equal(testYMD(1978, 5, 17, 10, 25, 30, false), 28627.434375, '[1978, 5, 17, 10, 25, 30]'); - t.equal(testYMD(1978, 5, 17, 10, 25, 30, true), 28627.434375, '[1978, 5, 17, 10, 25, 30]'); - t.equal(testYMD(2022, 3, 1, 13, 53, 11, false), 44621.578599537, '[2022, 3, 1, 13, 53, 11]'); - t.equal(testYMD(2022, 3, 1, 13, 53, 11, true), 44621.578599537, '[2022, 3, 1, 13, 53, 11]'); - t.equal(testYMD(1900, 1, 1, 0, 0, 0, false), 1, '[1900, 1, 1, 0, 0, 0]'); - t.equal(testYMD(1900, 1, 1, 0, 0, 0, true), 1, '[1900, 1, 1, 0, 0, 0]'); - t.equal(testYMD(1950, 1, 1, 0, 0, 0, false), 18264, '[1950, 1, 1, 0, 0, 0]'); - t.equal(testYMD(1950, 1, 1, 0, 0, 0, true), 18264, '[1950, 1, 1, 0, 0, 0]'); - t.equal(testYMD(2000, 1, 1, 0, 0, 0, false), 36526, '[2000, 1, 1, 0, 0, 0]'); - t.equal(testYMD(2000, 1, 1, 0, 0, 0, true), 36526, '[2000, 1, 1, 0, 0, 0]'); - t.end(); + expect(testYMD(1978, 5, 17, 10, 25, 30, false), '[1978, 5, 17, 10, 25, 30]').toBe(28627.434375); + expect(testYMD(1978, 5, 17, 10, 25, 30, true), '[1978, 5, 17, 10, 25, 30]').toBe(28627.434375); + expect(testYMD(2022, 3, 1, 13, 53, 11, false), '[2022, 3, 1, 13, 53, 11]').toBe(44621.578599537); + expect(testYMD(2022, 3, 1, 13, 53, 11, true), '[2022, 3, 1, 13, 53, 11]').toBe(44621.578599537); + expect(testYMD(1900, 1, 1, 0, 0, 0, false), '[1900, 1, 1, 0, 0, 0]').toBe(1); + expect(testYMD(1900, 1, 1, 0, 0, 0, true), '[1900, 1, 1, 0, 0, 0]').toBe(1); + expect(testYMD(1950, 1, 1, 0, 0, 0, false), '[1950, 1, 1, 0, 0, 0]').toBe(18264); + expect(testYMD(1950, 1, 1, 0, 0, 0, true), '[1950, 1, 1, 0, 0, 0]').toBe(18264); + expect(testYMD(2000, 1, 1, 0, 0, 0, false), '[2000, 1, 1, 0, 0, 0]').toBe(36526); + expect(testYMD(2000, 1, 1, 0, 0, 0, true), '[2000, 1, 1, 0, 0, 0]').toBe(36526); }); -test('dateFromSerial:', t => { +test('dateFromSerial:', () => { process.env.TZ = 'Europe/Amsterdam'; - t.ok( + expect( /^Central European (Standard|Summer) Time$/.test(getTimeZoneName()), 'Timezone is what we think it is' - ); + ).toBeTruthy(); - t.deepLooseEqual( + expect( dateFromSerial(1234), - [ 1903, 5, 18, 0, 0, 0 ], 'dateFromSerial(1234)' - ); - t.deepLooseEqual( + ).toEqual([ 1903, 5, 18, 0, 0, 0 ]); + expect( dateFromSerial(1234.567), - [ 1903, 5, 18, 13, 36, 28 ], 'dateFromSerial(1234)' - ); - t.deepLooseEqual( + ).toEqual([ 1903, 5, 18, 13, 36, 28 ]); + expect( dateFromSerial(12), - [ 1900, 1, 12, 0, 0, 0 ], 'dateFromSerial(12)' - ); - t.deepLooseEqual( + ).toEqual([ 1900, 1, 12, 0, 0, 0 ]); + expect( dateFromSerial(24052.8361), - [ 1965, 11, 6, 20, 3, 59 ], 'dateFromSerial(24052.8361)' - ); - t.deepLooseEqual( + ).toEqual([ 1965, 11, 6, 20, 3, 59 ]); + expect( dateFromSerial(42341), - [ 2015, 12, 3, 0, 0, 0 ], 'dateFromSerial(42341)' - ); - - t.end(); + ).toEqual([ 2015, 12, 3, 0, 0, 0 ]); }); diff --git a/test/ssf-cal.spec.ts b/test/ssf-cal.spec.ts index 7035d03..2a1f203 100644 --- a/test/ssf-cal.spec.ts +++ b/test/ssf-cal.spec.ts @@ -1,6 +1,6 @@ -import test from './utils.js'; +import { describe } from 'vitest'; +import { runTable } from './utils.ts'; -test('SSF table: tables/cal-updated.tsv', t => { - t.runTable('tables/cal-updated.tsv'); - t.end(); +describe('SSF table: tables/cal-updated.tsv', () => { + runTable('tables/cal-updated.tsv'); }); diff --git a/test/ssf-comma.spec.ts b/test/ssf-comma.spec.ts index ae0eff8..608eafd 100644 --- a/test/ssf-comma.spec.ts +++ b/test/ssf-comma.spec.ts @@ -1,135 +1,129 @@ // tests converted from SSF -import test from './utils.js'; +import { expect, test } from 'vitest'; +import { format } from '../lib/index.js'; -test('Exponential: #.0000,,,', t => { - t.format('#.0000,,,', 0.99, '.0000'); - t.format('#.0000,,,', 1.2345, '.0000'); - t.format('#.0000,,,', 12.345, '.0000'); - t.format('#.0000,,,', 123.456, '.0000'); - t.format('#.0000,,,', 1234, '.0000'); - t.format('#.0000,,,', 12345, '.0000'); - t.format('#.0000,,,', 123456, '.0001'); - t.format('#.0000,,,', 1234567, '.0012'); - t.format('#.0000,,,', 12345678, '.0123'); - t.format('#.0000,,,', 123456789, '.1235'); - t.format('#.0000,,,', 1234567890, '1.2346'); - t.format('#.0000,,,', 12345678901, '12.3457'); - t.format('#.0000,,,', 123456789012, '123.4568'); - t.format('#.0000,,,', 4321, '.0000'); - t.format('#.0000,,,', 4321234, '.0043'); - t.end(); +test('Exponential: #.0000,,,', () => { + expect(format('#.0000,,,', 0.99)).toBe('.0000'); + expect(format('#.0000,,,', 1.2345)).toBe('.0000'); + expect(format('#.0000,,,', 12.345)).toBe('.0000'); + expect(format('#.0000,,,', 123.456)).toBe('.0000'); + expect(format('#.0000,,,', 1234)).toBe('.0000'); + expect(format('#.0000,,,', 12345)).toBe('.0000'); + expect(format('#.0000,,,', 123456)).toBe('.0001'); + expect(format('#.0000,,,', 1234567)).toBe('.0012'); + expect(format('#.0000,,,', 12345678)).toBe('.0123'); + expect(format('#.0000,,,', 123456789)).toBe('.1235'); + expect(format('#.0000,,,', 1234567890)).toBe('1.2346'); + expect(format('#.0000,,,', 12345678901)).toBe('12.3457'); + expect(format('#.0000,,,', 123456789012)).toBe('123.4568'); + expect(format('#.0000,,,', 4321)).toBe('.0000'); + expect(format('#.0000,,,', 4321234)).toBe('.0043'); }); -test('Exponential: #.0000,,', t => { - t.format('#.0000,,', 0.99, '.0000'); - t.format('#.0000,,', 1.2345, '.0000'); - t.format('#.0000,,', 12.345, '.0000'); - t.format('#.0000,,', 123.456, '.0001'); - t.format('#.0000,,', 1234, '.0012'); - t.format('#.0000,,', 12345, '.0123'); - t.format('#.0000,,', 123456, '.1235'); - t.format('#.0000,,', 1234567, '1.2346'); - t.format('#.0000,,', 12345678, '12.3457'); - t.format('#.0000,,', 123456789, '123.4568'); - t.format('#.0000,,', 1234567890, '1234.5679'); - t.format('#.0000,,', 12345678901, '12345.6789'); - t.format('#.0000,,', 123456789012, '123456.7890'); - t.format('#.0000,,', 4321, '.0043'); - t.format('#.0000,,', 4321234, '4.3212'); - t.end(); +test('Exponential: #.0000,,', () => { + expect(format('#.0000,,', 0.99)).toBe('.0000'); + expect(format('#.0000,,', 1.2345)).toBe('.0000'); + expect(format('#.0000,,', 12.345)).toBe('.0000'); + expect(format('#.0000,,', 123.456)).toBe('.0001'); + expect(format('#.0000,,', 1234)).toBe('.0012'); + expect(format('#.0000,,', 12345)).toBe('.0123'); + expect(format('#.0000,,', 123456)).toBe('.1235'); + expect(format('#.0000,,', 1234567)).toBe('1.2346'); + expect(format('#.0000,,', 12345678)).toBe('12.3457'); + expect(format('#.0000,,', 123456789)).toBe('123.4568'); + expect(format('#.0000,,', 1234567890)).toBe('1234.5679'); + expect(format('#.0000,,', 12345678901)).toBe('12345.6789'); + expect(format('#.0000,,', 123456789012)).toBe('123456.7890'); + expect(format('#.0000,,', 4321)).toBe('.0043'); + expect(format('#.0000,,', 4321234)).toBe('4.3212'); }); -test('Exponential: #.0000,', t => { - t.format('#.0000,', 0.99, '.0010'); - t.format('#.0000,', 1.2345, '.0012'); - t.format('#.0000,', 12.345, '.0123'); - t.format('#.0000,', 123.456, '.1235'); - t.format('#.0000,', 1234, '1.2340'); - t.format('#.0000,', 12345, '12.3450'); - t.format('#.0000,', 123456, '123.4560'); - t.format('#.0000,', 1234567, '1234.5670'); - t.format('#.0000,', 12345678, '12345.6780'); - t.format('#.0000,', 123456789, '123456.7890'); - t.format('#.0000,', 1234567890, '1234567.8900'); - t.format('#.0000,', 12345678901, '12345678.9010'); - t.format('#.0000,', 123456789012, '123456789.0120'); - t.format('#.0000,', 4321, '4.3210'); - t.format('#.0000,', 4321234, '4321.2340'); - t.end(); +test('Exponential: #.0000,', () => { + expect(format('#.0000,', 0.99)).toBe('.0010'); + expect(format('#.0000,', 1.2345)).toBe('.0012'); + expect(format('#.0000,', 12.345)).toBe('.0123'); + expect(format('#.0000,', 123.456)).toBe('.1235'); + expect(format('#.0000,', 1234)).toBe('1.2340'); + expect(format('#.0000,', 12345)).toBe('12.3450'); + expect(format('#.0000,', 123456)).toBe('123.4560'); + expect(format('#.0000,', 1234567)).toBe('1234.5670'); + expect(format('#.0000,', 12345678)).toBe('12345.6780'); + expect(format('#.0000,', 123456789)).toBe('123456.7890'); + expect(format('#.0000,', 1234567890)).toBe('1234567.8900'); + expect(format('#.0000,', 12345678901)).toBe('12345678.9010'); + expect(format('#.0000,', 123456789012)).toBe('123456789.0120'); + expect(format('#.0000,', 4321)).toBe('4.3210'); + expect(format('#.0000,', 4321234)).toBe('4321.2340'); }); -test('Exponential: #,##0.0', t => { - t.format('#,##0.0', 0.99, '1.0'); - t.format('#,##0.0', 1.2345, '1.2'); - t.format('#,##0.0', 12.345, '12.3'); - t.format('#,##0.0', 123.456, '123.5'); - t.format('#,##0.0', 1234, '1,234.0'); - t.format('#,##0.0', 12345, '12,345.0'); - t.format('#,##0.0', 123456, '123,456.0'); - t.format('#,##0.0', 1234567, '1,234,567.0'); - t.format('#,##0.0', 12345678, '12,345,678.0'); - t.format('#,##0.0', 123456789, '123,456,789.0'); - t.format('#,##0.0', 1234567890, '1,234,567,890.0'); - t.format('#,##0.0', 12345678901, '12,345,678,901.0'); - t.format('#,##0.0', 123456789012, '123,456,789,012.0'); - t.format('#,##0.0', 4321, '4,321.0'); - t.format('#,##0.0', 4321234, '4,321,234.0'); - t.end(); +test('Exponential: #,##0.0', () => { + expect(format('#,##0.0', 0.99)).toBe('1.0'); + expect(format('#,##0.0', 1.2345)).toBe('1.2'); + expect(format('#,##0.0', 12.345)).toBe('12.3'); + expect(format('#,##0.0', 123.456)).toBe('123.5'); + expect(format('#,##0.0', 1234)).toBe('1,234.0'); + expect(format('#,##0.0', 12345)).toBe('12,345.0'); + expect(format('#,##0.0', 123456)).toBe('123,456.0'); + expect(format('#,##0.0', 1234567)).toBe('1,234,567.0'); + expect(format('#,##0.0', 12345678)).toBe('12,345,678.0'); + expect(format('#,##0.0', 123456789)).toBe('123,456,789.0'); + expect(format('#,##0.0', 1234567890)).toBe('1,234,567,890.0'); + expect(format('#,##0.0', 12345678901)).toBe('12,345,678,901.0'); + expect(format('#,##0.0', 123456789012)).toBe('123,456,789,012.0'); + expect(format('#,##0.0', 4321)).toBe('4,321.0'); + expect(format('#,##0.0', 4321234)).toBe('4,321,234.0'); }); -test('Exponential: ###,##0', t => { - t.format('###,##0', 0.99, '1'); - t.format('###,##0', 1.2345, '1'); - t.format('###,##0', 12.345, '12'); - t.format('###,##0', 123.456, '123'); - t.format('###,##0', 1234, '1,234'); - t.format('###,##0', 12345, '12,345'); - t.format('###,##0', 123456, '123,456'); - t.format('###,##0', 1234567, '1,234,567'); - t.format('###,##0', 12345678, '12,345,678'); - t.format('###,##0', 123456789, '123,456,789'); - t.format('###,##0', 1234567890, '1,234,567,890'); - t.format('###,##0', 12345678901, '12,345,678,901'); - t.format('###,##0', 123456789012, '123,456,789,012'); - t.format('###,##0', 4321, '4,321'); - t.format('###,##0', 4321234, '4,321,234'); - t.end(); +test('Exponential: ###,##0', () => { + expect(format('###,##0', 0.99)).toBe('1'); + expect(format('###,##0', 1.2345)).toBe('1'); + expect(format('###,##0', 12.345)).toBe('12'); + expect(format('###,##0', 123.456)).toBe('123'); + expect(format('###,##0', 1234)).toBe('1,234'); + expect(format('###,##0', 12345)).toBe('12,345'); + expect(format('###,##0', 123456)).toBe('123,456'); + expect(format('###,##0', 1234567)).toBe('1,234,567'); + expect(format('###,##0', 12345678)).toBe('12,345,678'); + expect(format('###,##0', 123456789)).toBe('123,456,789'); + expect(format('###,##0', 1234567890)).toBe('1,234,567,890'); + expect(format('###,##0', 12345678901)).toBe('12,345,678,901'); + expect(format('###,##0', 123456789012)).toBe('123,456,789,012'); + expect(format('###,##0', 4321)).toBe('4,321'); + expect(format('###,##0', 4321234)).toBe('4,321,234'); }); -test('Exponential: ###,###', t => { - t.format('###,###', 0.99, '1'); - t.format('###,###', 1.2345, '1'); - t.format('###,###', 12.345, '12'); - t.format('###,###', 123.456, '123'); - t.format('###,###', 1234, '1,234'); - t.format('###,###', 12345, '12,345'); - t.format('###,###', 123456, '123,456'); - t.format('###,###', 1234567, '1,234,567'); - t.format('###,###', 12345678, '12,345,678'); - t.format('###,###', 123456789, '123,456,789'); - t.format('###,###', 1234567890, '1,234,567,890'); - t.format('###,###', 12345678901, '12,345,678,901'); - t.format('###,###', 123456789012, '123,456,789,012'); - t.format('###,###', 4321, '4,321'); - t.format('###,###', 4321234, '4,321,234'); - t.end(); +test('Exponential: ###,###', () => { + expect(format('###,###', 0.99)).toBe('1'); + expect(format('###,###', 1.2345)).toBe('1'); + expect(format('###,###', 12.345)).toBe('12'); + expect(format('###,###', 123.456)).toBe('123'); + expect(format('###,###', 1234)).toBe('1,234'); + expect(format('###,###', 12345)).toBe('12,345'); + expect(format('###,###', 123456)).toBe('123,456'); + expect(format('###,###', 1234567)).toBe('1,234,567'); + expect(format('###,###', 12345678)).toBe('12,345,678'); + expect(format('###,###', 123456789)).toBe('123,456,789'); + expect(format('###,###', 1234567890)).toBe('1,234,567,890'); + expect(format('###,###', 12345678901)).toBe('12,345,678,901'); + expect(format('###,###', 123456789012)).toBe('123,456,789,012'); + expect(format('###,###', 4321)).toBe('4,321'); + expect(format('###,###', 4321234)).toBe('4,321,234'); }); -test('Exponential: #,###.00', t => { - t.format('#,###.00', 0.99, '.99'); - t.format('#,###.00', 1.2345, '1.23'); - t.format('#,###.00', 12.345, '12.35'); - t.format('#,###.00', 123.456, '123.46'); - t.format('#,###.00', 1234, '1,234.00'); - t.format('#,###.00', 12345, '12,345.00'); - t.format('#,###.00', 123456, '123,456.00'); - t.format('#,###.00', 1234567, '1,234,567.00'); - t.format('#,###.00', 12345678, '12,345,678.00'); - t.format('#,###.00', 123456789, '123,456,789.00'); - t.format('#,###.00', 1234567890, '1,234,567,890.00'); - t.format('#,###.00', 12345678901, '12,345,678,901.00'); - t.format('#,###.00', 123456789012, '123,456,789,012.00'); - t.format('#,###.00', 4321, '4,321.00'); - t.format('#,###.00', 4321234, '4,321,234.00'); - t.end(); +test('Exponential: #,###.00', () => { + expect(format('#,###.00', 0.99)).toBe('.99'); + expect(format('#,###.00', 1.2345)).toBe('1.23'); + expect(format('#,###.00', 12.345)).toBe('12.35'); + expect(format('#,###.00', 123.456)).toBe('123.46'); + expect(format('#,###.00', 1234)).toBe('1,234.00'); + expect(format('#,###.00', 12345)).toBe('12,345.00'); + expect(format('#,###.00', 123456)).toBe('123,456.00'); + expect(format('#,###.00', 1234567)).toBe('1,234,567.00'); + expect(format('#,###.00', 12345678)).toBe('12,345,678.00'); + expect(format('#,###.00', 123456789)).toBe('123,456,789.00'); + expect(format('#,###.00', 1234567890)).toBe('1,234,567,890.00'); + expect(format('#,###.00', 12345678901)).toBe('12,345,678,901.00'); + expect(format('#,###.00', 123456789012)).toBe('123,456,789,012.00'); + expect(format('#,###.00', 4321)).toBe('4,321.00'); + expect(format('#,###.00', 4321234)).toBe('4,321,234.00'); }); diff --git a/test/ssf-dates.spec.ts b/test/ssf-dates.spec.ts index fcf9767..8cddf79 100644 --- a/test/ssf-dates.spec.ts +++ b/test/ssf-dates.spec.ts @@ -1,6 +1,6 @@ -import test from './utils.js'; +import { describe } from 'vitest'; +import { runTable } from './utils.ts'; -test('SSF table: tables/ssf-dates.tsv', t => { - t.runTable('tables/ssf-dates.tsv'); - t.end(); +describe('SSF table: tables/ssf-dates.tsv', () => { + runTable('tables/ssf-dates.tsv'); }); diff --git a/test/ssf-exp.spec.ts b/test/ssf-exp.spec.ts index a6694c9..37fc6de 100644 --- a/test/ssf-exp.spec.ts +++ b/test/ssf-exp.spec.ts @@ -1,198 +1,195 @@ // tests converted from SSF -import test from './utils.js'; +import { expect, test } from 'vitest'; +import { format } from '../lib/index.js'; -test('Exponential: #0.0E+0', t => { - t.format('#0.0E+0', 1.23457E-13, '12.3E-14'); - t.format('#0.0E+0', 1.23457E-12, '1.2E-12'); - t.format('#0.0E+0', 1.23457E-11, '12.3E-12'); - t.format('#0.0E+0', 1.23457E-10, '1.2E-10'); - t.format('#0.0E+0', 1.23457E-09, '12.3E-10'); - t.format('#0.0E+0', 1.23457E-08, '1.2E-8'); - t.format('#0.0E+0', 0.000000123457, '12.3E-8'); - t.format('#0.0E+0', 0.00000123457, '1.2E-6'); - t.format('#0.0E+0', 0.0000123457, '12.3E-6'); - t.format('#0.0E+0', 0.000123457, '1.2E-4'); - t.format('#0.0E+0', 0.001234568, '12.3E-4'); - t.format('#0.0E+0', 0.012345679, '1.2E-2'); - t.format('#0.0E+0', 0.123456789, '12.3E-2'); - t.format('#0.0E+0', 1.23456789, '1.2E+0'); - t.format('#0.0E+0', 12.3456789, '12.3E+0'); - t.format('#0.0E+0', 123.456789, '1.2E+2'); - t.format('#0.0E+0', 1234.56789, '12.3E+2'); - t.format('#0.0E+0', 12345.6789, '1.2E+4'); - t.format('#0.0E+0', 123456.789, '12.3E+4'); - t.format('#0.0E+0', 1234567.89, '1.2E+6'); - t.format('#0.0E+0', 12345678.9, '12.3E+6'); - t.format('#0.0E+0', 123456789, '1.2E+8'); - t.format('#0.0E+0', 1234567890, '12.3E+8'); - t.format('#0.0E+0', 12345678900, '1.2E+10'); - t.format('#0.0E+0', 123456789000, '12.3E+10'); - t.format('#0.0E+0', 1234567890000, '1.2E+12'); - t.format('#0.0E+0', 12345678900000, '12.3E+12'); - t.format('#0.0E+0', 123456789000000, '1.2E+14'); - t.format('#0.0E+0', 1234567890000000, '12.3E+14'); - t.format('#0.0E+0', 12345678900000000, '1.2E+16'); - t.format('#0.0E+0', 123456789000000000, '12.3E+16'); - t.format('#0.0E+0', 1234567890000000000, '1.2E+18'); - t.format('#0.0E+0', 12345678900000000000, '12.3E+18'); - t.format('#0.0E+0', 123456789000000000000, '1.2E+20'); - t.format('#0.0E+0', 1234567890000000000000, '12.3E+20'); - t.format('#0.0E+0', 12345678900000000000000, '1.2E+22'); - t.format('#0.0E+0', 123456789000000000000000, '12.3E+22'); - t.format('#0.0E+0', 1234567890000000000000000, '1.2E+24'); - t.format('#0.0E+0', 12345678900000000000000000, '12.3E+24'); - t.format('#0.0E+0', 123456789000000000000000000, '1.2E+26'); - t.format('#0.0E+0', 1234567890000000000000000000, '12.3E+26'); - t.format('#0.0E+0', 12345678900000000000000000000, '1.2E+28'); - t.format('#0.0E+0', 123456789000000000000000000000, '12.3E+28'); - t.format('#0.0E+0', 1234567890000000000000000000000, '1.2E+30'); - t.format('#0.0E+0', 12345678900000000000000000000000, '12.3E+30'); - t.end(); +test('Exponential: #0.0E+0', () => { + expect(format('#0.0E+0', 1.23457E-13)).toBe('12.3E-14'); + expect(format('#0.0E+0', 1.23457E-12)).toBe('1.2E-12'); + expect(format('#0.0E+0', 1.23457E-11)).toBe('12.3E-12'); + expect(format('#0.0E+0', 1.23457E-10)).toBe('1.2E-10'); + expect(format('#0.0E+0', 1.23457E-09)).toBe('12.3E-10'); + expect(format('#0.0E+0', 1.23457E-08)).toBe('1.2E-8'); + expect(format('#0.0E+0', 0.000000123457)).toBe('12.3E-8'); + expect(format('#0.0E+0', 0.00000123457)).toBe('1.2E-6'); + expect(format('#0.0E+0', 0.0000123457)).toBe('12.3E-6'); + expect(format('#0.0E+0', 0.000123457)).toBe('1.2E-4'); + expect(format('#0.0E+0', 0.001234568)).toBe('12.3E-4'); + expect(format('#0.0E+0', 0.012345679)).toBe('1.2E-2'); + expect(format('#0.0E+0', 0.123456789)).toBe('12.3E-2'); + expect(format('#0.0E+0', 1.23456789)).toBe('1.2E+0'); + expect(format('#0.0E+0', 12.3456789)).toBe('12.3E+0'); + expect(format('#0.0E+0', 123.456789)).toBe('1.2E+2'); + expect(format('#0.0E+0', 1234.56789)).toBe('12.3E+2'); + expect(format('#0.0E+0', 12345.6789)).toBe('1.2E+4'); + expect(format('#0.0E+0', 123456.789)).toBe('12.3E+4'); + expect(format('#0.0E+0', 1234567.89)).toBe('1.2E+6'); + expect(format('#0.0E+0', 12345678.9)).toBe('12.3E+6'); + expect(format('#0.0E+0', 123456789)).toBe('1.2E+8'); + expect(format('#0.0E+0', 1234567890)).toBe('12.3E+8'); + expect(format('#0.0E+0', 12345678900)).toBe('1.2E+10'); + expect(format('#0.0E+0', 123456789000)).toBe('12.3E+10'); + expect(format('#0.0E+0', 1234567890000)).toBe('1.2E+12'); + expect(format('#0.0E+0', 12345678900000)).toBe('12.3E+12'); + expect(format('#0.0E+0', 123456789000000)).toBe('1.2E+14'); + expect(format('#0.0E+0', 1234567890000000)).toBe('12.3E+14'); + expect(format('#0.0E+0', 12345678900000000)).toBe('1.2E+16'); + expect(format('#0.0E+0', 123456789000000000)).toBe('12.3E+16'); + expect(format('#0.0E+0', 1234567890000000000)).toBe('1.2E+18'); + expect(format('#0.0E+0', 12345678900000000000)).toBe('12.3E+18'); + expect(format('#0.0E+0', 123456789000000000000)).toBe('1.2E+20'); + expect(format('#0.0E+0', 1234567890000000000000)).toBe('12.3E+20'); + expect(format('#0.0E+0', 12345678900000000000000)).toBe('1.2E+22'); + expect(format('#0.0E+0', 123456789000000000000000)).toBe('12.3E+22'); + expect(format('#0.0E+0', 1234567890000000000000000)).toBe('1.2E+24'); + expect(format('#0.0E+0', 12345678900000000000000000)).toBe('12.3E+24'); + expect(format('#0.0E+0', 123456789000000000000000000)).toBe('1.2E+26'); + expect(format('#0.0E+0', 1234567890000000000000000000)).toBe('12.3E+26'); + expect(format('#0.0E+0', 12345678900000000000000000000)).toBe('1.2E+28'); + expect(format('#0.0E+0', 123456789000000000000000000000)).toBe('12.3E+28'); + expect(format('#0.0E+0', 1234567890000000000000000000000)).toBe('1.2E+30'); + expect(format('#0.0E+0', 12345678900000000000000000000000)).toBe('12.3E+30'); }); -test('Exponential: ##0.0E+0', t => { - t.format('##0.0E+0', 1.23457E-13, '123.5E-15'); - t.format('##0.0E+0', 1.23457E-12, '1.2E-12'); - t.format('##0.0E+0', 1.23457E-11, '12.3E-12'); - t.format('##0.0E+0', 1.23457E-10, '123.5E-12'); - t.format('##0.0E+0', 1.23457E-09, '1.2E-9'); - t.format('##0.0E+0', 1.23457E-08, '12.3E-9'); - t.format('##0.0E+0', 0.000000123457, '123.5E-9'); - t.format('##0.0E+0', 0.00000123457, '1.2E-6'); - t.format('##0.0E+0', 0.0000123457, '12.3E-6'); - t.format('##0.0E+0', 0.000123457, '123.5E-6'); - t.format('##0.0E+0', 0.001234568, '1.2E-3'); - t.format('##0.0E+0', 0.012345679, '12.3E-3'); - t.format('##0.0E+0', 0.123456789, '123.5E-3'); - t.format('##0.0E+0', 1.23456789, '1.2E+0'); - t.format('##0.0E+0', 12.3456789, '12.3E+0'); - t.format('##0.0E+0', 123.456789, '123.5E+0'); - t.format('##0.0E+0', 1234.56789, '1.2E+3'); - t.format('##0.0E+0', 12345.6789, '12.3E+3'); - t.format('##0.0E+0', 123456.789, '123.5E+3'); - t.format('##0.0E+0', 1234567.89, '1.2E+6'); - t.format('##0.0E+0', 12345678.9, '12.3E+6'); - t.format('##0.0E+0', 123456789, '123.5E+6'); - t.format('##0.0E+0', 1234567890, '1.2E+9'); - t.format('##0.0E+0', 12345678900, '12.3E+9'); - t.format('##0.0E+0', 123456789000, '123.5E+9'); - t.format('##0.0E+0', 1234567890000, '1.2E+12'); - t.format('##0.0E+0', 12345678900000, '12.3E+12'); - t.format('##0.0E+0', 123456789000000, '123.5E+12'); - t.format('##0.0E+0', 1234567890000000, '1.2E+15'); - t.format('##0.0E+0', 12345678900000000, '12.3E+15'); - t.format('##0.0E+0', 123456789000000000, '123.5E+15'); - t.format('##0.0E+0', 1234567890000000000, '1.2E+18'); - t.format('##0.0E+0', 12345678900000000000, '12.3E+18'); - t.format('##0.0E+0', 123456789000000000000, '123.5E+18'); - t.format('##0.0E+0', 1234567890000000000000, '1.2E+21'); - t.format('##0.0E+0', 12345678900000000000000, '12.3E+21'); - t.format('##0.0E+0', 123456789000000000000000, '123.5E+21'); - t.format('##0.0E+0', 1234567890000000000000000, '1.2E+24'); - t.format('##0.0E+0', 12345678900000000000000000, '12.3E+24'); - t.format('##0.0E+0', 123456789000000000000000000, '123.5E+24'); - t.format('##0.0E+0', 1234567890000000000000000000, '1.2E+27'); - t.format('##0.0E+0', 12345678900000000000000000000, '12.3E+27'); - t.format('##0.0E+0', 123456789000000000000000000000, '123.5E+27'); - t.format('##0.0E+0', 1234567890000000000000000000000, '1.2E+30'); - t.format('##0.0E+0', 12345678900000000000000000000000, '12.3E+30'); - t.end(); +test('Exponential: ##0.0E+0', () => { + expect(format('##0.0E+0', 1.23457E-13)).toBe('123.5E-15'); + expect(format('##0.0E+0', 1.23457E-12)).toBe('1.2E-12'); + expect(format('##0.0E+0', 1.23457E-11)).toBe('12.3E-12'); + expect(format('##0.0E+0', 1.23457E-10)).toBe('123.5E-12'); + expect(format('##0.0E+0', 1.23457E-09)).toBe('1.2E-9'); + expect(format('##0.0E+0', 1.23457E-08)).toBe('12.3E-9'); + expect(format('##0.0E+0', 0.000000123457)).toBe('123.5E-9'); + expect(format('##0.0E+0', 0.00000123457)).toBe('1.2E-6'); + expect(format('##0.0E+0', 0.0000123457)).toBe('12.3E-6'); + expect(format('##0.0E+0', 0.000123457)).toBe('123.5E-6'); + expect(format('##0.0E+0', 0.001234568)).toBe('1.2E-3'); + expect(format('##0.0E+0', 0.012345679)).toBe('12.3E-3'); + expect(format('##0.0E+0', 0.123456789)).toBe('123.5E-3'); + expect(format('##0.0E+0', 1.23456789)).toBe('1.2E+0'); + expect(format('##0.0E+0', 12.3456789)).toBe('12.3E+0'); + expect(format('##0.0E+0', 123.456789)).toBe('123.5E+0'); + expect(format('##0.0E+0', 1234.56789)).toBe('1.2E+3'); + expect(format('##0.0E+0', 12345.6789)).toBe('12.3E+3'); + expect(format('##0.0E+0', 123456.789)).toBe('123.5E+3'); + expect(format('##0.0E+0', 1234567.89)).toBe('1.2E+6'); + expect(format('##0.0E+0', 12345678.9)).toBe('12.3E+6'); + expect(format('##0.0E+0', 123456789)).toBe('123.5E+6'); + expect(format('##0.0E+0', 1234567890)).toBe('1.2E+9'); + expect(format('##0.0E+0', 12345678900)).toBe('12.3E+9'); + expect(format('##0.0E+0', 123456789000)).toBe('123.5E+9'); + expect(format('##0.0E+0', 1234567890000)).toBe('1.2E+12'); + expect(format('##0.0E+0', 12345678900000)).toBe('12.3E+12'); + expect(format('##0.0E+0', 123456789000000)).toBe('123.5E+12'); + expect(format('##0.0E+0', 1234567890000000)).toBe('1.2E+15'); + expect(format('##0.0E+0', 12345678900000000)).toBe('12.3E+15'); + expect(format('##0.0E+0', 123456789000000000)).toBe('123.5E+15'); + expect(format('##0.0E+0', 1234567890000000000)).toBe('1.2E+18'); + expect(format('##0.0E+0', 12345678900000000000)).toBe('12.3E+18'); + expect(format('##0.0E+0', 123456789000000000000)).toBe('123.5E+18'); + expect(format('##0.0E+0', 1234567890000000000000)).toBe('1.2E+21'); + expect(format('##0.0E+0', 12345678900000000000000)).toBe('12.3E+21'); + expect(format('##0.0E+0', 123456789000000000000000)).toBe('123.5E+21'); + expect(format('##0.0E+0', 1234567890000000000000000)).toBe('1.2E+24'); + expect(format('##0.0E+0', 12345678900000000000000000)).toBe('12.3E+24'); + expect(format('##0.0E+0', 123456789000000000000000000)).toBe('123.5E+24'); + expect(format('##0.0E+0', 1234567890000000000000000000)).toBe('1.2E+27'); + expect(format('##0.0E+0', 12345678900000000000000000000)).toBe('12.3E+27'); + expect(format('##0.0E+0', 123456789000000000000000000000)).toBe('123.5E+27'); + expect(format('##0.0E+0', 1234567890000000000000000000000)).toBe('1.2E+30'); + expect(format('##0.0E+0', 12345678900000000000000000000000)).toBe('12.3E+30'); }); -test('Exponential: ###0.0E+0', t => { - t.format('###0.0E+0', 1.23457E-13, '1234.6E-16'); - t.format('###0.0E+0', 1.23457E-12, '1.2E-12'); - t.format('###0.0E+0', 1.23457E-11, '12.3E-12'); - t.format('###0.0E+0', 1.23457E-10, '123.5E-12'); - t.format('###0.0E+0', 1.23457E-09, '1234.6E-12'); - t.format('###0.0E+0', 1.23457E-08, '1.2E-8'); - t.format('###0.0E+0', 0.000000123457, '12.3E-8'); - t.format('###0.0E+0', 0.00000123457, '123.5E-8'); - t.format('###0.0E+0', 0.0000123457, '1234.6E-8'); - t.format('###0.0E+0', 0.000123457, '1.2E-4'); - t.format('###0.0E+0', 0.001234568, '12.3E-4'); - t.format('###0.0E+0', 0.012345679, '123.5E-4'); - t.format('###0.0E+0', 0.123456789, '1234.6E-4'); - t.format('###0.0E+0', 1.23456789, '1.2E+0'); - t.format('###0.0E+0', 12.3456789, '12.3E+0'); - t.format('###0.0E+0', 123.456789, '123.5E+0'); - t.format('###0.0E+0', 1234.56789, '1234.6E+0'); - t.format('###0.0E+0', 12345.6789, '1.2E+4'); - t.format('###0.0E+0', 123456.789, '12.3E+4'); - t.format('###0.0E+0', 1234567.89, '123.5E+4'); - t.format('###0.0E+0', 12345678.9, '1234.6E+4'); - t.format('###0.0E+0', 123456789, '1.2E+8'); - t.format('###0.0E+0', 1234567890, '12.3E+8'); - t.format('###0.0E+0', 12345678900, '123.5E+8'); - t.format('###0.0E+0', 123456789000, '1234.6E+8'); - t.format('###0.0E+0', 1234567890000, '1.2E+12'); - t.format('###0.0E+0', 12345678900000, '12.3E+12'); - t.format('###0.0E+0', 123456789000000, '123.5E+12'); - t.format('###0.0E+0', 1234567890000000, '1234.6E+12'); - t.format('###0.0E+0', 12345678900000000, '1.2E+16'); - t.format('###0.0E+0', 123456789000000000, '12.3E+16'); - t.format('###0.0E+0', 1234567890000000000, '123.5E+16'); - t.format('###0.0E+0', 12345678900000000000, '1234.6E+16'); - t.format('###0.0E+0', 123456789000000000000, '1.2E+20'); - t.format('###0.0E+0', 1234567890000000000000, '12.3E+20'); - t.format('###0.0E+0', 12345678900000000000000, '123.5E+20'); - t.format('###0.0E+0', 123456789000000000000000, '1234.6E+20'); - t.format('###0.0E+0', 1234567890000000000000000, '1.2E+24'); - t.format('###0.0E+0', 12345678900000000000000000, '12.3E+24'); - t.format('###0.0E+0', 123456789000000000000000000, '123.5E+24'); - t.format('###0.0E+0', 1234567890000000000000000000, '1234.6E+24'); - t.format('###0.0E+0', 12345678900000000000000000000, '1.2E+28'); - t.format('###0.0E+0', 123456789000000000000000000000, '12.3E+28'); - t.format('###0.0E+0', 1234567890000000000000000000000, '123.5E+28'); - t.format('###0.0E+0', 12345678900000000000000000000000, '1234.6E+28'); - t.end(); +test('Exponential: ###0.0E+0', () => { + expect(format('###0.0E+0', 1.23457E-13)).toBe('1234.6E-16'); + expect(format('###0.0E+0', 1.23457E-12)).toBe('1.2E-12'); + expect(format('###0.0E+0', 1.23457E-11)).toBe('12.3E-12'); + expect(format('###0.0E+0', 1.23457E-10)).toBe('123.5E-12'); + expect(format('###0.0E+0', 1.23457E-09)).toBe('1234.6E-12'); + expect(format('###0.0E+0', 1.23457E-08)).toBe('1.2E-8'); + expect(format('###0.0E+0', 0.000000123457)).toBe('12.3E-8'); + expect(format('###0.0E+0', 0.00000123457)).toBe('123.5E-8'); + expect(format('###0.0E+0', 0.0000123457)).toBe('1234.6E-8'); + expect(format('###0.0E+0', 0.000123457)).toBe('1.2E-4'); + expect(format('###0.0E+0', 0.001234568)).toBe('12.3E-4'); + expect(format('###0.0E+0', 0.012345679)).toBe('123.5E-4'); + expect(format('###0.0E+0', 0.123456789)).toBe('1234.6E-4'); + expect(format('###0.0E+0', 1.23456789)).toBe('1.2E+0'); + expect(format('###0.0E+0', 12.3456789)).toBe('12.3E+0'); + expect(format('###0.0E+0', 123.456789)).toBe('123.5E+0'); + expect(format('###0.0E+0', 1234.56789)).toBe('1234.6E+0'); + expect(format('###0.0E+0', 12345.6789)).toBe('1.2E+4'); + expect(format('###0.0E+0', 123456.789)).toBe('12.3E+4'); + expect(format('###0.0E+0', 1234567.89)).toBe('123.5E+4'); + expect(format('###0.0E+0', 12345678.9)).toBe('1234.6E+4'); + expect(format('###0.0E+0', 123456789)).toBe('1.2E+8'); + expect(format('###0.0E+0', 1234567890)).toBe('12.3E+8'); + expect(format('###0.0E+0', 12345678900)).toBe('123.5E+8'); + expect(format('###0.0E+0', 123456789000)).toBe('1234.6E+8'); + expect(format('###0.0E+0', 1234567890000)).toBe('1.2E+12'); + expect(format('###0.0E+0', 12345678900000)).toBe('12.3E+12'); + expect(format('###0.0E+0', 123456789000000)).toBe('123.5E+12'); + expect(format('###0.0E+0', 1234567890000000)).toBe('1234.6E+12'); + expect(format('###0.0E+0', 12345678900000000)).toBe('1.2E+16'); + expect(format('###0.0E+0', 123456789000000000)).toBe('12.3E+16'); + expect(format('###0.0E+0', 1234567890000000000)).toBe('123.5E+16'); + expect(format('###0.0E+0', 12345678900000000000)).toBe('1234.6E+16'); + expect(format('###0.0E+0', 123456789000000000000)).toBe('1.2E+20'); + expect(format('###0.0E+0', 1234567890000000000000)).toBe('12.3E+20'); + expect(format('###0.0E+0', 12345678900000000000000)).toBe('123.5E+20'); + expect(format('###0.0E+0', 123456789000000000000000)).toBe('1234.6E+20'); + expect(format('###0.0E+0', 1234567890000000000000000)).toBe('1.2E+24'); + expect(format('###0.0E+0', 12345678900000000000000000)).toBe('12.3E+24'); + expect(format('###0.0E+0', 123456789000000000000000000)).toBe('123.5E+24'); + expect(format('###0.0E+0', 1234567890000000000000000000)).toBe('1234.6E+24'); + expect(format('###0.0E+0', 12345678900000000000000000000)).toBe('1.2E+28'); + expect(format('###0.0E+0', 123456789000000000000000000000)).toBe('12.3E+28'); + expect(format('###0.0E+0', 1234567890000000000000000000000)).toBe('123.5E+28'); + expect(format('###0.0E+0', 12345678900000000000000000000000)).toBe('1234.6E+28'); }); -test('Exponential: ####0.0E+0', t => { - t.format('####0.0E+0', 1.23457E-13, '123.5E-15'); - t.format('####0.0E+0', 1.23457E-12, '1234.6E-15'); - t.format('####0.0E+0', 1.23457E-11, '12345.7E-15'); - t.format('####0.0E+0', 1.23457E-10, '1.2E-10'); - t.format('####0.0E+0', 1.23457E-09, '12.3E-10'); - t.format('####0.0E+0', 1.23457E-08, '123.5E-10'); - t.format('####0.0E+0', 0.000000123457, '1234.6E-10'); - t.format('####0.0E+0', 0.00000123457, '12345.7E-10'); - t.format('####0.0E+0', 0.0000123457, '1.2E-5'); - t.format('####0.0E+0', 0.000123457, '12.3E-5'); - t.format('####0.0E+0', 0.001234568, '123.5E-5'); - t.format('####0.0E+0', 0.012345679, '1234.6E-5'); - t.format('####0.0E+0', 0.123456789, '12345.7E-5'); - t.format('####0.0E+0', 1.23456789, '1.2E+0'); - t.format('####0.0E+0', 12.3456789, '12.3E+0'); - t.format('####0.0E+0', 123.456789, '123.5E+0'); - t.format('####0.0E+0', 1234.56789, '1234.6E+0'); - t.format('####0.0E+0', 12345.6789, '12345.7E+0'); - t.format('####0.0E+0', 123456.789, '1.2E+5'); - t.format('####0.0E+0', 1234567.89, '12.3E+5'); - t.format('####0.0E+0', 12345678.9, '123.5E+5'); - t.format('####0.0E+0', 123456789, '1234.6E+5'); - t.format('####0.0E+0', 1234567890, '12345.7E+5'); - t.format('####0.0E+0', 12345678900, '1.2E+10'); - t.format('####0.0E+0', 123456789000, '12.3E+10'); - t.format('####0.0E+0', 1234567890000, '123.5E+10'); - t.format('####0.0E+0', 12345678900000, '1234.6E+10'); - t.format('####0.0E+0', 123456789000000, '12345.7E+10'); - t.format('####0.0E+0', 1234567890000000, '1.2E+15'); - t.format('####0.0E+0', 12345678900000000, '12.3E+15'); - t.format('####0.0E+0', 123456789000000000, '123.5E+15'); - t.format('####0.0E+0', 1234567890000000000, '1234.6E+15'); - t.format('####0.0E+0', 12345678900000000000, '12345.7E+15'); - t.format('####0.0E+0', 123456789000000000000, '1.2E+20'); - t.format('####0.0E+0', 1234567890000000000000, '12.3E+20'); - t.format('####0.0E+0', 12345678900000000000000, '123.5E+20'); - t.format('####0.0E+0', 123456789000000000000000, '1234.6E+20'); - t.format('####0.0E+0', 1234567890000000000000000, '12345.7E+20'); - t.format('####0.0E+0', 12345678900000000000000000, '1.2E+25'); - t.format('####0.0E+0', 123456789000000000000000000, '12.3E+25'); - t.format('####0.0E+0', 1234567890000000000000000000, '123.5E+25'); - t.format('####0.0E+0', 12345678900000000000000000000, '1234.6E+25'); - t.format('####0.0E+0', 123456789000000000000000000000, '12345.7E+25'); - t.format('####0.0E+0', 1234567890000000000000000000000, '1.2E+30'); - t.format('####0.0E+0', 12345678900000000000000000000000, '12.3E+30'); - t.end(); +test('Exponential: ####0.0E+0', () => { + expect(format('####0.0E+0', 1.23457E-13)).toBe('123.5E-15'); + expect(format('####0.0E+0', 1.23457E-12)).toBe('1234.6E-15'); + expect(format('####0.0E+0', 1.23457E-11)).toBe('12345.7E-15'); + expect(format('####0.0E+0', 1.23457E-10)).toBe('1.2E-10'); + expect(format('####0.0E+0', 1.23457E-09)).toBe('12.3E-10'); + expect(format('####0.0E+0', 1.23457E-08)).toBe('123.5E-10'); + expect(format('####0.0E+0', 0.000000123457)).toBe('1234.6E-10'); + expect(format('####0.0E+0', 0.00000123457)).toBe('12345.7E-10'); + expect(format('####0.0E+0', 0.0000123457)).toBe('1.2E-5'); + expect(format('####0.0E+0', 0.000123457)).toBe('12.3E-5'); + expect(format('####0.0E+0', 0.001234568)).toBe('123.5E-5'); + expect(format('####0.0E+0', 0.012345679)).toBe('1234.6E-5'); + expect(format('####0.0E+0', 0.123456789)).toBe('12345.7E-5'); + expect(format('####0.0E+0', 1.23456789)).toBe('1.2E+0'); + expect(format('####0.0E+0', 12.3456789)).toBe('12.3E+0'); + expect(format('####0.0E+0', 123.456789)).toBe('123.5E+0'); + expect(format('####0.0E+0', 1234.56789)).toBe('1234.6E+0'); + expect(format('####0.0E+0', 12345.6789)).toBe('12345.7E+0'); + expect(format('####0.0E+0', 123456.789)).toBe('1.2E+5'); + expect(format('####0.0E+0', 1234567.89)).toBe('12.3E+5'); + expect(format('####0.0E+0', 12345678.9)).toBe('123.5E+5'); + expect(format('####0.0E+0', 123456789)).toBe('1234.6E+5'); + expect(format('####0.0E+0', 1234567890)).toBe('12345.7E+5'); + expect(format('####0.0E+0', 12345678900)).toBe('1.2E+10'); + expect(format('####0.0E+0', 123456789000)).toBe('12.3E+10'); + expect(format('####0.0E+0', 1234567890000)).toBe('123.5E+10'); + expect(format('####0.0E+0', 12345678900000)).toBe('1234.6E+10'); + expect(format('####0.0E+0', 123456789000000)).toBe('12345.7E+10'); + expect(format('####0.0E+0', 1234567890000000)).toBe('1.2E+15'); + expect(format('####0.0E+0', 12345678900000000)).toBe('12.3E+15'); + expect(format('####0.0E+0', 123456789000000000)).toBe('123.5E+15'); + expect(format('####0.0E+0', 1234567890000000000)).toBe('1234.6E+15'); + expect(format('####0.0E+0', 12345678900000000000)).toBe('12345.7E+15'); + expect(format('####0.0E+0', 123456789000000000000)).toBe('1.2E+20'); + expect(format('####0.0E+0', 1234567890000000000000)).toBe('12.3E+20'); + expect(format('####0.0E+0', 12345678900000000000000)).toBe('123.5E+20'); + expect(format('####0.0E+0', 123456789000000000000000)).toBe('1234.6E+20'); + expect(format('####0.0E+0', 1234567890000000000000000)).toBe('12345.7E+20'); + expect(format('####0.0E+0', 12345678900000000000000000)).toBe('1.2E+25'); + expect(format('####0.0E+0', 123456789000000000000000000)).toBe('12.3E+25'); + expect(format('####0.0E+0', 1234567890000000000000000000)).toBe('123.5E+25'); + expect(format('####0.0E+0', 12345678900000000000000000000)).toBe('1234.6E+25'); + expect(format('####0.0E+0', 123456789000000000000000000000)).toBe('12345.7E+25'); + expect(format('####0.0E+0', 1234567890000000000000000000000)).toBe('1.2E+30'); + expect(format('####0.0E+0', 12345678900000000000000000000000)).toBe('12.3E+30'); }); diff --git a/test/ssf-fraction.spec.ts b/test/ssf-fraction.spec.ts index ad51d68..3bace79 100644 --- a/test/ssf-fraction.spec.ts +++ b/test/ssf-fraction.spec.ts @@ -1,147 +1,144 @@ -import test from './utils.js'; +import { expect, test } from 'vitest'; +import { format } from '../lib/index.js'; -test('SSF-fractions tests', t => { - t.format('# ?/?', 1, '1 ', '# ?/?'); - t.format('# ?/?', -1.2, '-1 1/5', '# ?/?'); - t.format('# ?/?', 12.3, '12 1/3', '# ?/?'); - t.format('# ?/?', -12.34, '-12 1/3', '# ?/?'); - t.format('# ?/?', 123.45, '123 4/9', '# ?/?'); - t.format('# ?/?', -123.456, '-123 1/2', '# ?/?'); - t.format('# ?/?', 1234.567, '1234 4/7', '# ?/?'); - t.format('# ?/?', -1234.5678, '-1234 4/7', '# ?/?'); - t.format('# ?/?', 12345.6789, '12345 2/3', '# ?/?'); - t.format('# ?/?', -12345.67891, '-12345 2/3', '# ?/?'); - t.format('# ??/??', 1, '1 ', '# ??/??'); - t.format('# ??/??', -1.2, '-1 1/5 ', '# ??/??'); - t.format('# ??/??', 12.3, '12 3/10', '# ??/??'); - t.format('# ??/??', -12.34, '-12 17/50', '# ??/??'); - t.format('# ??/??', 123.45, '123 9/20', '# ??/??'); - t.format('# ??/??', -123.456, '-123 26/57', '# ??/??'); - t.format('# ??/??', 1234.567, '1234 55/97', '# ??/??'); - t.format('# ??/??', -1234.5678, '-1234 46/81', '# ??/??'); - t.format('# ??/??', 12345.6789, '12345 55/81', '# ??/??'); - t.format('# ??/??', -12345.67891, '-12345 55/81', '# ??/??'); - t.format('# ???/???', 1, '1 ', '# ???/???'); - t.format('# ???/???', -1.2, '-1 1/5 ', '# ???/???'); - t.format('# ???/???', 12.3, '12 3/10 ', '# ???/???'); - t.format('# ???/???', -12.34, '-12 17/50 ', '# ???/???'); - t.format('# ???/???', 123.45, '123 9/20 ', '# ???/???'); - t.format('# ???/???', -123.456, '-123 57/125', '# ???/???'); - t.format('# ???/???', 1234.567, '1234 55/97 ', '# ???/???'); - t.format('# ???/???', -1234.5678, '-1234 67/118', '# ???/???'); - t.format('# ???/???', 12345.6789, '12345 74/109', '# ???/???'); - t.format('# ???/???', -12345.67891, '-12345 573/844', '# ???/???'); - t.format('# ?/2', 1, '1 ', '# ?/2'); - t.format('# ?/2', -1.2, '-1 ', '# ?/2'); - t.format('# ?/2', 12.3, '12 1/2', '# ?/2'); - t.format('# ?/2', -12.34, '-12 1/2', '# ?/2'); - t.format('# ?/2', 123.45, '123 1/2', '# ?/2'); - t.format('# ?/2', -123.456, '-123 1/2', '# ?/2'); - t.format('# ?/2', 1234.567, '1234 1/2', '# ?/2'); - t.format('# ?/2', -1234.5678, '-1234 1/2', '# ?/2'); - t.format('# ?/2', 12345.6789, '12345 1/2', '# ?/2'); - t.format('# ?/2', -12345.67891, '-12345 1/2', '# ?/2'); - t.format('# ?/4', 1, '1 ', '# ?/4'); - t.format('# ?/4', -1.2, '-1 1/4', '# ?/4'); - t.format('# ?/4', 12.3, '12 1/4', '# ?/4'); - t.format('# ?/4', -12.34, '-12 1/4', '# ?/4'); - t.format('# ?/4', 123.45, '123 2/4', '# ?/4'); - t.format('# ?/4', -123.456, '-123 2/4', '# ?/4'); - t.format('# ?/4', 1234.567, '1234 2/4', '# ?/4'); - t.format('# ?/4', -1234.5678, '-1234 2/4', '# ?/4'); - t.format('# ?/4', 12345.6789, '12345 3/4', '# ?/4'); - t.format('# ?/4', -12345.67891, '-12345 3/4', '# ?/4'); - t.format('# ?/8', 1, '1 ', '# ?/8'); - t.format('# ?/8', -1.2, '-1 2/8', '# ?/8'); - t.format('# ?/8', 12.3, '12 2/8', '# ?/8'); - t.format('# ?/8', -12.34, '-12 3/8', '# ?/8'); - t.format('# ?/8', 123.45, '123 4/8', '# ?/8'); - t.format('# ?/8', -123.456, '-123 4/8', '# ?/8'); - t.format('# ?/8', 1234.567, '1234 5/8', '# ?/8'); - t.format('# ?/8', -1234.5678, '-1234 5/8', '# ?/8'); - t.format('# ?/8', 12345.6789, '12345 5/8', '# ?/8'); - t.format('# ?/8', -12345.67891, '-12345 5/8', '# ?/8'); - t.format('# ??/16', 1, '1 ', '# ??/16'); - t.format('# ??/16', -1.2, '-1 3/16', '# ??/16'); - t.format('# ??/16', 12.3, '12 5/16', '# ??/16'); - t.format('# ??/16', -12.34, '-12 5/16', '# ??/16'); - t.format('# ??/16', 123.45, '123 7/16', '# ??/16'); - t.format('# ??/16', -123.456, '-123 7/16', '# ??/16'); - t.format('# ??/16', 1234.567, '1234 9/16', '# ??/16'); - t.format('# ??/16', -1234.5678, '-1234 9/16', '# ??/16'); - t.format('# ??/16', 12345.6789, '12345 11/16', '# ??/16'); - t.format('# ??/16', -12345.67891, '-12345 11/16', '# ??/16'); - t.format('# ?/10', 1, '1 ', '# ?/10'); - t.format('# ?/10', -1.2, '-1 2/10', '# ?/10'); - t.format('# ?/10', 12.3, '12 3/10', '# ?/10'); - t.format('# ?/10', -12.34, '-12 3/10', '# ?/10'); - t.format('# ?/10', 123.45, '123 5/10', '# ?/10'); - t.format('# ?/10', -123.456, '-123 5/10', '# ?/10'); - t.format('# ?/10', 1234.567, '1234 6/10', '# ?/10'); - t.format('# ?/10', -1234.5678, '-1234 6/10', '# ?/10'); - t.format('# ?/10', 12345.6789, '12345 7/10', '# ?/10'); - t.format('# ?/10', -12345.67891, '-12345 7/10', '# ?/10'); - t.format('# ??/100', 1, '1 ', '# ??/100'); - t.format('# ??/100', -1.2, '-1 20/100', '# ??/100'); - t.format('# ??/100', 12.3, '12 30/100', '# ??/100'); - t.format('# ??/100', -12.34, '-12 34/100', '# ??/100'); - t.format('# ??/100', 123.45, '123 45/100', '# ??/100'); - t.format('# ??/100', -123.456, '-123 46/100', '# ??/100'); - t.format('# ??/100', 1234.567, '1234 57/100', '# ??/100'); - t.format('# ??/100', -1234.5678, '-1234 57/100', '# ??/100'); - t.format('# ??/100', 12345.6789, '12345 68/100', '# ??/100'); - t.format('# ??/100', -12345.67891, '-12345 68/100', '# ??/100'); - t.format('??/??', 1, ' 1/1 ', '??/??'); - t.format('??/??', -1.2, '- 6/5 ', '??/??'); - t.format('??/??', 12.3, '123/10', '??/??'); - t.format('??/??', -12.34, '-617/50', '??/??'); - t.format('??/??', 123.45, '2469/20', '??/??'); - t.format('??/??', -123.456, '-7037/57', '??/??'); - t.format('??/??', 1234.567, '119753/97', '??/??'); - t.format('??/??', -1234.5678, '-100000/81', '??/??'); - t.format('??/??', 12345.6789, '1000000/81', '??/??'); - t.format('??/??', -12345.67891, '-1000000/81', '??/??'); - t.format('# ?/?', 0.3, ' 2/7', '# ?/?'); - t.format('# ?/?', 1.3, '1 1/3', '# ?/?'); - t.format('# ?/?', 2.3, '2 2/7', '# ?/?'); - t.format('# ??/?????????', 0.123251512342345, ' 480894/3901729 ', '# ??/?????????'); - t.format('# ?? / ?????????', 0.123251512342345, ' 480894 / 3901729 ', '# ?? / ?????????'); - t.format('0', 0, '0', '0'); - - t.end(); +test('SSF-fractions tests', () => { + expect(format('# ?/?', 1, '# ?/?')).toBe('1 '); + expect(format('# ?/?', -1.2, '# ?/?')).toBe('-1 1/5'); + expect(format('# ?/?', 12.3, '# ?/?')).toBe('12 1/3'); + expect(format('# ?/?', -12.34, '# ?/?')).toBe('-12 1/3'); + expect(format('# ?/?', 123.45, '# ?/?')).toBe('123 4/9'); + expect(format('# ?/?', -123.456, '# ?/?')).toBe('-123 1/2'); + expect(format('# ?/?', 1234.567, '# ?/?')).toBe('1234 4/7'); + expect(format('# ?/?', -1234.5678, '# ?/?')).toBe('-1234 4/7'); + expect(format('# ?/?', 12345.6789, '# ?/?')).toBe('12345 2/3'); + expect(format('# ?/?', -12345.67891, '# ?/?')).toBe('-12345 2/3'); + expect(format('# ??/??', 1, '# ??/??')).toBe('1 '); + expect(format('# ??/??', -1.2, '# ??/??')).toBe('-1 1/5 '); + expect(format('# ??/??', 12.3, '# ??/??')).toBe('12 3/10'); + expect(format('# ??/??', -12.34, '# ??/??')).toBe('-12 17/50'); + expect(format('# ??/??', 123.45, '# ??/??')).toBe('123 9/20'); + expect(format('# ??/??', -123.456, '# ??/??')).toBe('-123 26/57'); + expect(format('# ??/??', 1234.567, '# ??/??')).toBe('1234 55/97'); + expect(format('# ??/??', -1234.5678, '# ??/??')).toBe('-1234 46/81'); + expect(format('# ??/??', 12345.6789, '# ??/??')).toBe('12345 55/81'); + expect(format('# ??/??', -12345.67891, '# ??/??')).toBe('-12345 55/81'); + expect(format('# ???/???', 1, '# ???/???')).toBe('1 '); + expect(format('# ???/???', -1.2, '# ???/???')).toBe('-1 1/5 '); + expect(format('# ???/???', 12.3, '# ???/???')).toBe('12 3/10 '); + expect(format('# ???/???', -12.34, '# ???/???')).toBe('-12 17/50 '); + expect(format('# ???/???', 123.45, '# ???/???')).toBe('123 9/20 '); + expect(format('# ???/???', -123.456, '# ???/???')).toBe('-123 57/125'); + expect(format('# ???/???', 1234.567, '# ???/???')).toBe('1234 55/97 '); + expect(format('# ???/???', -1234.5678, '# ???/???')).toBe('-1234 67/118'); + expect(format('# ???/???', 12345.6789, '# ???/???')).toBe('12345 74/109'); + expect(format('# ???/???', -12345.67891, '# ???/???')).toBe('-12345 573/844'); + expect(format('# ?/2', 1, '# ?/2')).toBe('1 '); + expect(format('# ?/2', -1.2, '# ?/2')).toBe('-1 '); + expect(format('# ?/2', 12.3, '# ?/2')).toBe('12 1/2'); + expect(format('# ?/2', -12.34, '# ?/2')).toBe('-12 1/2'); + expect(format('# ?/2', 123.45, '# ?/2')).toBe('123 1/2'); + expect(format('# ?/2', -123.456, '# ?/2')).toBe('-123 1/2'); + expect(format('# ?/2', 1234.567, '# ?/2')).toBe('1234 1/2'); + expect(format('# ?/2', -1234.5678, '# ?/2')).toBe('-1234 1/2'); + expect(format('# ?/2', 12345.6789, '# ?/2')).toBe('12345 1/2'); + expect(format('# ?/2', -12345.67891, '# ?/2')).toBe('-12345 1/2'); + expect(format('# ?/4', 1, '# ?/4')).toBe('1 '); + expect(format('# ?/4', -1.2, '# ?/4')).toBe('-1 1/4'); + expect(format('# ?/4', 12.3, '# ?/4')).toBe('12 1/4'); + expect(format('# ?/4', -12.34, '# ?/4')).toBe('-12 1/4'); + expect(format('# ?/4', 123.45, '# ?/4')).toBe('123 2/4'); + expect(format('# ?/4', -123.456, '# ?/4')).toBe('-123 2/4'); + expect(format('# ?/4', 1234.567, '# ?/4')).toBe('1234 2/4'); + expect(format('# ?/4', -1234.5678, '# ?/4')).toBe('-1234 2/4'); + expect(format('# ?/4', 12345.6789, '# ?/4')).toBe('12345 3/4'); + expect(format('# ?/4', -12345.67891, '# ?/4')).toBe('-12345 3/4'); + expect(format('# ?/8', 1, '# ?/8')).toBe('1 '); + expect(format('# ?/8', -1.2, '# ?/8')).toBe('-1 2/8'); + expect(format('# ?/8', 12.3, '# ?/8')).toBe('12 2/8'); + expect(format('# ?/8', -12.34, '# ?/8')).toBe('-12 3/8'); + expect(format('# ?/8', 123.45, '# ?/8')).toBe('123 4/8'); + expect(format('# ?/8', -123.456, '# ?/8')).toBe('-123 4/8'); + expect(format('# ?/8', 1234.567, '# ?/8')).toBe('1234 5/8'); + expect(format('# ?/8', -1234.5678, '# ?/8')).toBe('-1234 5/8'); + expect(format('# ?/8', 12345.6789, '# ?/8')).toBe('12345 5/8'); + expect(format('# ?/8', -12345.67891, '# ?/8')).toBe('-12345 5/8'); + expect(format('# ??/16', 1, '# ??/16')).toBe('1 '); + expect(format('# ??/16', -1.2, '# ??/16')).toBe('-1 3/16'); + expect(format('# ??/16', 12.3, '# ??/16')).toBe('12 5/16'); + expect(format('# ??/16', -12.34, '# ??/16')).toBe('-12 5/16'); + expect(format('# ??/16', 123.45, '# ??/16')).toBe('123 7/16'); + expect(format('# ??/16', -123.456, '# ??/16')).toBe('-123 7/16'); + expect(format('# ??/16', 1234.567, '# ??/16')).toBe('1234 9/16'); + expect(format('# ??/16', -1234.5678, '# ??/16')).toBe('-1234 9/16'); + expect(format('# ??/16', 12345.6789, '# ??/16')).toBe('12345 11/16'); + expect(format('# ??/16', -12345.67891, '# ??/16')).toBe('-12345 11/16'); + expect(format('# ?/10', 1, '# ?/10')).toBe('1 '); + expect(format('# ?/10', -1.2, '# ?/10')).toBe('-1 2/10'); + expect(format('# ?/10', 12.3, '# ?/10')).toBe('12 3/10'); + expect(format('# ?/10', -12.34, '# ?/10')).toBe('-12 3/10'); + expect(format('# ?/10', 123.45, '# ?/10')).toBe('123 5/10'); + expect(format('# ?/10', -123.456, '# ?/10')).toBe('-123 5/10'); + expect(format('# ?/10', 1234.567, '# ?/10')).toBe('1234 6/10'); + expect(format('# ?/10', -1234.5678, '# ?/10')).toBe('-1234 6/10'); + expect(format('# ?/10', 12345.6789, '# ?/10')).toBe('12345 7/10'); + expect(format('# ?/10', -12345.67891, '# ?/10')).toBe('-12345 7/10'); + expect(format('# ??/100', 1, '# ??/100')).toBe('1 '); + expect(format('# ??/100', -1.2, '# ??/100')).toBe('-1 20/100'); + expect(format('# ??/100', 12.3, '# ??/100')).toBe('12 30/100'); + expect(format('# ??/100', -12.34, '# ??/100')).toBe('-12 34/100'); + expect(format('# ??/100', 123.45, '# ??/100')).toBe('123 45/100'); + expect(format('# ??/100', -123.456, '# ??/100')).toBe('-123 46/100'); + expect(format('# ??/100', 1234.567, '# ??/100')).toBe('1234 57/100'); + expect(format('# ??/100', -1234.5678, '# ??/100')).toBe('-1234 57/100'); + expect(format('# ??/100', 12345.6789, '# ??/100')).toBe('12345 68/100'); + expect(format('# ??/100', -12345.67891, '# ??/100')).toBe('-12345 68/100'); + expect(format('??/??', 1, '??/??')).toBe(' 1/1 '); + expect(format('??/??', -1.2, '??/??')).toBe('- 6/5 '); + expect(format('??/??', 12.3, '??/??')).toBe('123/10'); + expect(format('??/??', -12.34, '??/??')).toBe('-617/50'); + expect(format('??/??', 123.45, '??/??')).toBe('2469/20'); + expect(format('??/??', -123.456, '??/??')).toBe('-7037/57'); + expect(format('??/??', 1234.567, '??/??')).toBe('119753/97'); + expect(format('??/??', -1234.5678, '??/??')).toBe('-100000/81'); + expect(format('??/??', 12345.6789, '??/??')).toBe('1000000/81'); + expect(format('??/??', -12345.67891, '??/??')).toBe('-1000000/81'); + expect(format('# ?/?', 0.3, '# ?/?')).toBe(' 2/7'); + expect(format('# ?/?', 1.3, '# ?/?')).toBe('1 1/3'); + expect(format('# ?/?', 2.3, '# ?/?')).toBe('2 2/7'); + expect(format('# ??/?????????', 0.123251512342345, '# ??/?????????')).toBe(' 480894/3901729 '); + expect(format('# ?? / ?????????', 0.123251512342345, '# ?? / ?????????')).toBe(' 480894 / 3901729 '); + expect(format('0', 0, '0')).toBe('0'); }); -test('More fraction cases', t => { - t.formatInvalid('0/'); - t.formatInvalid('/0'); - t.formatInvalid('/'); - - t.format('0/0', 0, '0/1'); - t.format('0/0', 1, '1/1'); - t.format('0/0', 123, '123/1'); - t.format('0/0', 12.345, '37/3'); - t.format('0 0/0', 0, '0 0/1'); - t.format('0 0/0', 1, '1 0/1'); - t.format('0 0/0', 123, '123 0/1'); - t.format('0 0/0', 12.345, '12 1/3'); +test('More fraction cases', () => { + expect(() => format('0/', '')).toThrow(); + expect(() => format('/0', '')).toThrow(); + expect(() => format('/', '')).toThrow(); - t.format('?/?', 0, '0/1'); - t.format('?/?', 1, '1/1'); - t.format('?/?', 123, '123/1'); - t.format('?/?', 12.345, '37/3'); - t.format('? ?/?', 0, '0 '); - t.format('? ?/?', 1, '1 '); - t.format('? ?/?', 123, '123 '); - t.format('? ?/?', 12.345, '12 1/3'); + expect(format('0/0', 0)).toBe('0/1'); + expect(format('0/0', 1)).toBe('1/1'); + expect(format('0/0', 123)).toBe('123/1'); + expect(format('0/0', 12.345)).toBe('37/3'); + expect(format('0 0/0', 0)).toBe('0 0/1'); + expect(format('0 0/0', 1)).toBe('1 0/1'); + expect(format('0 0/0', 123)).toBe('123 0/1'); + expect(format('0 0/0', 12.345)).toBe('12 1/3'); - t.format('#/#', 0, '0/1'); - t.format('#/#', 1, '1/1'); - t.format('#/#', 123, '123/1'); - t.format('#/#', 12.345, '37/3'); - t.format('# #/#', 0, '0'); - t.format('# #/#', 1, '1'); - t.format('# #/#', 123, '123'); - t.format('# #/#', 12.345, '12 1/3'); + expect(format('?/?', 0)).toBe('0/1'); + expect(format('?/?', 1)).toBe('1/1'); + expect(format('?/?', 123)).toBe('123/1'); + expect(format('?/?', 12.345)).toBe('37/3'); + expect(format('? ?/?', 0)).toBe('0 '); + expect(format('? ?/?', 1)).toBe('1 '); + expect(format('? ?/?', 123)).toBe('123 '); + expect(format('? ?/?', 12.345)).toBe('12 1/3'); - t.end(); + expect(format('#/#', 0)).toBe('0/1'); + expect(format('#/#', 1)).toBe('1/1'); + expect(format('#/#', 123)).toBe('123/1'); + expect(format('#/#', 12.345)).toBe('37/3'); + expect(format('# #/#', 0)).toBe('0'); + expect(format('# #/#', 1)).toBe('1'); + expect(format('# #/#', 123)).toBe('123'); + expect(format('# #/#', 12.345)).toBe('12 1/3'); }); diff --git a/test/ssf-general.spec.ts b/test/ssf-general.spec.ts index afb720d..9d75bae 100644 --- a/test/ssf-general.spec.ts +++ b/test/ssf-general.spec.ts @@ -1,520 +1,519 @@ // tests converted from SSF -import test from './utils.js'; +import { expect, test } from 'vitest'; +import { format } from '../lib/index.js'; -test('General format', t => { - t.format('General', 1.234567e-14, '1.23457E-14'); - t.format('General', 1.234567e-13, '1.23457E-13'); - t.format('General', 1.234567e-12, '1.23457E-12'); - t.format('General', 1.234567e-11, '1.23457E-11'); - t.format('General', 1.234567e-10, '1.23457E-10'); - t.format('General', 1.234567e-9, '1.23457E-09'); - t.format('General', 1.234567e-8, '1.23457E-08'); - t.format('General', 1.234567e-7, '1.23457E-07'); - t.format('General', 0.000001234567, '1.23457E-06'); - t.format('General', 0.00001234567, '1.23457E-05'); - t.format('General', 0.0001234567, '0.000123457'); - t.format('General', 0.001234567, '0.001234567'); - t.format('General', 0.01234567, '0.01234567'); - t.format('General', 0.1234567, '0.1234567'); - t.format('General', 1.234567, '1.234567'); - t.format('General', 12.34567, '12.34567'); - t.format('General', 123.4567, '123.4567'); - t.format('General', 1234.567, '1234.567'); - t.format('General', 12345.67, '12345.67'); - t.format('General', 123456.7, '123456.7'); - t.format('General', 1234567, '1234567'); - t.format('General', 12345670, '12345670'); - t.format('General', 123456700, '123456700'); - t.format('General', 1234567000, '1234567000'); - t.format('General', 12345670000, '12345670000'); - t.format('General', 123456700000, '1.23457E+11'); - t.format('General', 1234567000000, '1.23457E+12'); - t.format('General', 12345670000000, '1.23457E+13'); - t.format('General', 123456700000000, '1.23457E+14'); - t.format('General', 1e-14, '1E-14'); - t.format('General', 1e-13, '1E-13'); - t.format('General', 1e-12, '1E-12'); - t.format('General', 1e-11, '1E-11'); - t.format('General', 1e-10, '1E-10'); - t.format('General', 1e-9, '0.000000001'); - t.format('General', 1e-8, '0.00000001'); - t.format('General', 1e-7, '0.0000001'); - t.format('General', 0.000001, '0.000001'); - t.format('General', 0.00001, '0.00001'); - t.format('General', 0.0001, '0.0001'); - t.format('General', 0.001, '0.001'); - t.format('General', 0.01, '0.01'); - t.format('General', 0.1, '0.1'); - t.format('General', 1, '1'); - t.format('General', 10, '10'); - t.format('General', 100, '100'); - t.format('General', 1000, '1000'); - t.format('General', 10000, '10000'); - t.format('General', 100000, '100000'); - t.format('General', 1000000, '1000000'); - t.format('General', 10000000, '10000000'); - t.format('General', 100000000, '100000000'); - t.format('General', 1000000000, '1000000000'); - t.format('General', 10000000000, '10000000000'); - t.format('General', 100000000000, '1E+11'); - t.format('General', 1000000000000, '1E+12'); - t.format('General', 10000000000000, '1E+13'); - t.format('General', 100000000000000, '1E+14'); - t.format('General', 1.2e-14, '1.2E-14'); - t.format('General', 1.2e-13, '1.2E-13'); - t.format('General', 1.2e-12, '1.2E-12'); - t.format('General', 1.2e-11, '1.2E-11'); - t.format('General', 1.2e-10, '1.2E-10'); - t.format('General', 1.2e-9, '1.2E-09'); - t.format('General', 1.2e-8, '0.000000012'); - t.format('General', 1.2e-7, '0.00000012'); - t.format('General', 0.0000012, '0.0000012'); - t.format('General', 0.000012, '0.000012'); - t.format('General', 0.00012, '0.00012'); - t.format('General', 0.0012, '0.0012'); - t.format('General', 0.012, '0.012'); - t.format('General', 0.12, '0.12'); - t.format('General', 1.2, '1.2'); - t.format('General', 12, '12'); - t.format('General', 120, '120'); - t.format('General', 1200, '1200'); - t.format('General', 12000, '12000'); - t.format('General', 120000, '120000'); - t.format('General', 1200000, '1200000'); - t.format('General', 12000000, '12000000'); - t.format('General', 120000000, '120000000'); - t.format('General', 1200000000, '1200000000'); - t.format('General', 12000000000, '12000000000'); - t.format('General', 120000000000, '1.2E+11'); - t.format('General', 1200000000000, '1.2E+12'); - t.format('General', 12000000000000, '1.2E+13'); - t.format('General', 120000000000000, '1.2E+14'); - t.format('General', 1.23e-14, '1.23E-14'); - t.format('General', 1.23e-13, '1.23E-13'); - t.format('General', 1.23e-12, '1.23E-12'); - t.format('General', 1.23e-11, '1.23E-11'); - t.format('General', 1.23e-10, '1.23E-10'); - t.format('General', 1.23e-9, '1.23E-09'); - t.format('General', 1.23e-8, '1.23E-08'); - t.format('General', 1.23e-7, '0.000000123'); - t.format('General', 0.00000123, '0.00000123'); - t.format('General', 0.0000123, '0.0000123'); - t.format('General', 0.000123, '0.000123'); - t.format('General', 0.00123, '0.00123'); - t.format('General', 0.0123, '0.0123'); - t.format('General', 0.123, '0.123'); - t.format('General', 1.23, '1.23'); - t.format('General', 12.3, '12.3'); - t.format('General', 123, '123'); - t.format('General', 1230, '1230'); - t.format('General', 12300, '12300'); - t.format('General', 123000, '123000'); - t.format('General', 1230000, '1230000'); - t.format('General', 12300000, '12300000'); - t.format('General', 123000000, '123000000'); - t.format('General', 1230000000, '1230000000'); - t.format('General', 12300000000, '12300000000'); - t.format('General', 123000000000, '1.23E+11'); - t.format('General', 1230000000000, '1.23E+12'); - t.format('General', 12300000000000, '1.23E+13'); - t.format('General', 123000000000000, '1.23E+14'); - t.format('General', 1.234e-14, '1.234E-14'); - t.format('General', 1.234e-13, '1.234E-13'); - t.format('General', 1.234e-12, '1.234E-12'); - t.format('General', 1.234e-11, '1.234E-11'); - t.format('General', 1.234e-10, '1.234E-10'); - t.format('General', 1.234e-9, '1.234E-09'); - t.format('General', 1.234e-8, '1.234E-08'); - t.format('General', 1.234e-7, '1.234E-07'); - t.format('General', 0.000001234, '0.000001234'); - t.format('General', 0.00001234, '0.00001234'); - t.format('General', 0.0001234, '0.0001234'); - t.format('General', 0.001234, '0.001234'); - t.format('General', 0.01234, '0.01234'); - t.format('General', 0.1234, '0.1234'); - t.format('General', 1.234, '1.234'); - t.format('General', 12.34, '12.34'); - t.format('General', 123.4, '123.4'); - t.format('General', 1234, '1234'); - t.format('General', 12340, '12340'); - t.format('General', 123400, '123400'); - t.format('General', 1234000, '1234000'); - t.format('General', 12340000, '12340000'); - t.format('General', 123400000, '123400000'); - t.format('General', 1234000000, '1234000000'); - t.format('General', 12340000000, '12340000000'); - t.format('General', 123400000000, '1.234E+11'); - t.format('General', 1234000000000, '1.234E+12'); - t.format('General', 12340000000000, '1.234E+13'); - t.format('General', 123400000000000, '1.234E+14'); - t.format('General', 1.2345e-14, '1.2345E-14'); - t.format('General', 1.2345e-13, '1.2345E-13'); - t.format('General', 1.2345e-12, '1.2345E-12'); - t.format('General', 1.2345e-11, '1.2345E-11'); - t.format('General', 1.2345e-10, '1.2345E-10'); - t.format('General', 1.2345e-9, '1.2345E-09'); - t.format('General', 1.2345e-8, '1.2345E-08'); - t.format('General', 1.2345e-7, '1.2345E-07'); - t.format('General', 0.0000012345, '1.2345E-06'); - t.format('General', 0.000012345, '0.000012345'); - t.format('General', 0.00012345, '0.00012345'); - t.format('General', 0.0012345, '0.0012345'); - t.format('General', 0.012345, '0.012345'); - t.format('General', 0.12345, '0.12345'); - t.format('General', 1.2345, '1.2345'); - t.format('General', 12.345, '12.345'); - t.format('General', 123.45, '123.45'); - t.format('General', 1234.5, '1234.5'); - t.format('General', 12345, '12345'); - t.format('General', 123450, '123450'); - t.format('General', 1234500, '1234500'); - t.format('General', 12345000, '12345000'); - t.format('General', 123450000, '123450000'); - t.format('General', 1234500000, '1234500000'); - t.format('General', 12345000000, '12345000000'); - t.format('General', 123450000000, '1.2345E+11'); - t.format('General', 1234500000000, '1.2345E+12'); - t.format('General', 12345000000000, '1.2345E+13'); - t.format('General', 123450000000000, '1.2345E+14'); - t.format('General', 1.23456e-14, '1.23456E-14'); - t.format('General', 1.23456e-13, '1.23456E-13'); - t.format('General', 1.23456e-12, '1.23456E-12'); - t.format('General', 1.23456e-11, '1.23456E-11'); - t.format('General', 1.23456e-10, '1.23456E-10'); - t.format('General', 1.23456e-9, '1.23456E-09'); - t.format('General', 1.23456e-8, '1.23456E-08'); - t.format('General', 1.23456e-7, '1.23456E-07'); - t.format('General', 0.00000123456, '1.23456E-06'); - t.format('General', 0.0000123456, '1.23456E-05'); - t.format('General', 0.000123456, '0.000123456'); - t.format('General', 0.00123456, '0.00123456'); - t.format('General', 0.0123456, '0.0123456'); - t.format('General', 0.123456, '0.123456'); - t.format('General', 1.23456, '1.23456'); - t.format('General', 12.3456, '12.3456'); - t.format('General', 123.456, '123.456'); - t.format('General', 1234.56, '1234.56'); - t.format('General', 12345.6, '12345.6'); - t.format('General', 123456, '123456'); - t.format('General', 1234560, '1234560'); - t.format('General', 12345600, '12345600'); - t.format('General', 123456000, '123456000'); - t.format('General', 1234560000, '1234560000'); - t.format('General', 12345600000, '12345600000'); - t.format('General', 123456000000, '1.23456E+11'); - t.format('General', 1234560000000, '1.23456E+12'); - t.format('General', 12345600000000, '1.23456E+13'); - t.format('General', 123456000000000, '1.23456E+14'); - t.format('General', 1.234567e-14, '1.23457E-14'); - t.format('General', 1.234567e-13, '1.23457E-13'); - t.format('General', 1.234567e-12, '1.23457E-12'); - t.format('General', 1.234567e-11, '1.23457E-11'); - t.format('General', 1.234567e-10, '1.23457E-10'); - t.format('General', 1.234567e-9, '1.23457E-09'); - t.format('General', 1.234567e-8, '1.23457E-08'); - t.format('General', 1.234567e-7, '1.23457E-07'); - t.format('General', 0.000001234567, '1.23457E-06'); - t.format('General', 0.00001234567, '1.23457E-05'); - t.format('General', 0.0001234567, '0.000123457'); - t.format('General', 0.001234567, '0.001234567'); - t.format('General', 0.01234567, '0.01234567'); - t.format('General', 0.1234567, '0.1234567'); - t.format('General', 1.234567, '1.234567'); - t.format('General', 12.34567, '12.34567'); - t.format('General', 123.4567, '123.4567'); - t.format('General', 1234.567, '1234.567'); - t.format('General', 12345.67, '12345.67'); - t.format('General', 123456.7, '123456.7'); - t.format('General', 1234567, '1234567'); - t.format('General', 12345670, '12345670'); - t.format('General', 123456700, '123456700'); - t.format('General', 1234567000, '1234567000'); - t.format('General', 12345670000, '12345670000'); - t.format('General', 123456700000, '1.23457E+11'); - t.format('General', 1234567000000, '1.23457E+12'); - t.format('General', 12345670000000, '1.23457E+13'); - t.format('General', 123456700000000, '1.23457E+14'); - t.format('General', 1.2345678e-14, '1.23457E-14'); - t.format('General', 1.2345678e-13, '1.23457E-13'); - t.format('General', 1.2345678e-12, '1.23457E-12'); - t.format('General', 1.2345678e-11, '1.23457E-11'); - t.format('General', 1.2345678e-10, '1.23457E-10'); - t.format('General', 1.2345678e-9, '1.23457E-09'); - t.format('General', 1.2345678e-8, '1.23457E-08'); - t.format('General', 1.2345678e-7, '1.23457E-07'); - t.format('General', 0.0000012345678, '1.23457E-06'); - t.format('General', 0.000012345678, '1.23457E-05'); - t.format('General', 0.00012345678, '0.000123457'); - t.format('General', 0.0012345678, '0.001234568'); - t.format('General', 0.012345678, '0.012345678'); - t.format('General', 0.12345678, '0.12345678'); - t.format('General', 1.2345678, '1.2345678'); - t.format('General', 12.345678, '12.345678'); - t.format('General', 123.45678, '123.45678'); - t.format('General', 1234.5678, '1234.5678'); - t.format('General', 12345.678, '12345.678'); - t.format('General', 123456.78, '123456.78'); - t.format('General', 1234567.8, '1234567.8'); - t.format('General', 12345678, '12345678'); - t.format('General', 123456780, '123456780'); - t.format('General', 1234567800, '1234567800'); - t.format('General', 12345678000, '12345678000'); - t.format('General', 123456780000, '1.23457E+11'); - t.format('General', 1234567800000, '1.23457E+12'); - t.format('General', 12345678000000, '1.23457E+13'); - t.format('General', 123456780000000, '1.23457E+14'); - t.format('General', 1.23456789e-14, '1.23457E-14'); - t.format('General', 1.23456789e-13, '1.23457E-13'); - t.format('General', 1.23456789e-12, '1.23457E-12'); - t.format('General', 1.23456789e-11, '1.23457E-11'); - t.format('General', 1.23456789e-10, '1.23457E-10'); - t.format('General', 1.23456789e-9, '1.23457E-09'); - t.format('General', 1.23456789e-8, '1.23457E-08'); - t.format('General', 1.23456789e-7, '1.23457E-07'); - t.format('General', 0.00000123456789, '1.23457E-06'); - t.format('General', 0.0000123456789, '1.23457E-05'); - t.format('General', 0.000123456789, '0.000123457'); - t.format('General', 0.00123456789, '0.001234568'); - t.format('General', 0.0123456789, '0.012345679'); - t.format('General', 0.123456789, '0.123456789'); - t.format('General', 1.23456789, '1.23456789'); - t.format('General', 12.3456789, '12.3456789'); - t.format('General', 123.456789, '123.456789'); - t.format('General', 1234.56789, '1234.56789'); - t.format('General', 12345.6789, '12345.6789'); - t.format('General', 123456.789, '123456.789'); - t.format('General', 1234567.89, '1234567.89'); - t.format('General', 12345678.9, '12345678.9'); - t.format('General', 123456789, '123456789'); - t.format('General', 1234567890, '1234567890'); - t.format('General', 12345678900, '12345678900'); - t.format('General', 123456789000, '1.23457E+11'); - t.format('General', 1234567890000, '1.23457E+12'); - t.format('General', 12345678900000, '1.23457E+13'); - t.format('General', 123456789000000, '1.23457E+14'); - t.format('General', 1.234567891e-14, '1.23457E-14'); - t.format('General', 1.234567891e-13, '1.23457E-13'); - t.format('General', 1.234567891e-12, '1.23457E-12'); - t.format('General', 1.234567891e-11, '1.23457E-11'); - t.format('General', 1.234567891e-10, '1.23457E-10'); - t.format('General', 1.234567891e-9, '1.23457E-09'); - t.format('General', 1.234567891e-8, '1.23457E-08'); - t.format('General', 1.234567891e-7, '1.23457E-07'); - t.format('General', 0.000001234567891, '1.23457E-06'); - t.format('General', 0.00001234567891, '1.23457E-05'); - t.format('General', 0.0001234567891, '0.000123457'); - t.format('General', 0.001234567891, '0.001234568'); - t.format('General', 0.01234567891, '0.012345679'); - t.format('General', 0.1234567891, '0.123456789'); - t.format('General', 1.234567891, '1.234567891'); - t.format('General', 12.34567891, '12.34567891'); - t.format('General', 123.4567891, '123.4567891'); - t.format('General', 1234.567891, '1234.567891'); - t.format('General', 12345.67891, '12345.67891'); - t.format('General', 123456.7891, '123456.7891'); - t.format('General', 1234567.891, '1234567.891'); - t.format('General', 12345678.91, '12345678.91'); - t.format('General', 123456789.1, '123456789.1'); - t.format('General', 1234567891, '1234567891'); - t.format('General', 12345678910, '12345678910'); - t.format('General', 123456789100, '1.23457E+11'); - t.format('General', 1234567891000, '1.23457E+12'); - t.format('General', 12345678910000, '1.23457E+13'); - t.format('General', 123456789100000, '1.23457E+14'); - t.format('General', 1.2345678912e-14, '1.23457E-14'); - t.format('General', 1.2345678912e-13, '1.23457E-13'); - t.format('General', 1.2345678912e-12, '1.23457E-12'); - t.format('General', 1.2345678912e-11, '1.23457E-11'); - t.format('General', 1.2345678912e-10, '1.23457E-10'); - t.format('General', 1.2345678912e-9, '1.23457E-09'); - t.format('General', 1.2345678912e-8, '1.23457E-08'); - t.format('General', 1.2345678912e-7, '1.23457E-07'); - t.format('General', 0.0000012345678912, '1.23457E-06'); - t.format('General', 0.000012345678912, '1.23457E-05'); - t.format('General', 0.00012345678912, '0.000123457'); - t.format('General', 0.0012345678912, '0.001234568'); - t.format('General', 0.012345678912, '0.012345679'); - t.format('General', 0.12345678912, '0.123456789'); - t.format('General', 1.2345678912, '1.234567891'); - t.format('General', 12.345678912, '12.34567891'); - t.format('General', 123.45678912, '123.4567891'); - t.format('General', 1234.5678912, '1234.567891'); - t.format('General', 12345.678912, '12345.67891'); - t.format('General', 123456.78912, '123456.7891'); - t.format('General', 1234567.8912, '1234567.891'); - t.format('General', 12345678.912, '12345678.91'); - t.format('General', 123456789.12, '123456789.1'); - t.format('General', 1234567891.2, '1234567891'); - t.format('General', 12345678912, '12345678912'); - t.format('General', 123456789120, '1.23457E+11'); - t.format('General', 1234567891200, '1.23457E+12'); - t.format('General', 12345678912000, '1.23457E+13'); - t.format('General', 123456789120000, '1.23457E+14'); - t.format('General', 1.23456789123e-14, '1.23457E-14'); - t.format('General', 1.23456789123e-13, '1.23457E-13'); - t.format('General', 1.23456789123e-12, '1.23457E-12'); - t.format('General', 1.23456789123e-11, '1.23457E-11'); - t.format('General', 1.23456789123e-10, '1.23457E-10'); - t.format('General', 1.23456789123e-9, '1.23457E-09'); - t.format('General', 1.23456789123e-8, '1.23457E-08'); - t.format('General', 1.23456789123e-7, '1.23457E-07'); - t.format('General', 0.00000123456789123, '1.23457E-06'); - t.format('General', 0.0000123456789123, '1.23457E-05'); - t.format('General', 0.000123456789123, '0.000123457'); - t.format('General', 0.00123456789123, '0.001234568'); - t.format('General', 0.0123456789123, '0.012345679'); - t.format('General', 0.123456789123, '0.123456789'); - t.format('General', 1.23456789123, '1.234567891'); - t.format('General', 12.3456789123, '12.34567891'); - t.format('General', 123.456789123, '123.4567891'); - t.format('General', 1234.56789123, '1234.567891'); - t.format('General', 12345.6789123, '12345.67891'); - t.format('General', 123456.789123, '123456.7891'); - t.format('General', 1234567.89123, '1234567.891'); - t.format('General', 12345678.9123, '12345678.91'); - t.format('General', 123456789.123, '123456789.1'); - t.format('General', 1234567891.23, '1234567891'); - t.format('General', 12345678912.3, '12345678912'); - t.format('General', 123456789123, '1.23457E+11'); - t.format('General', 1234567891230, '1.23457E+12'); - t.format('General', 12345678912300, '1.23457E+13'); - t.format('General', 123456789123000, '1.23457E+14'); - t.format('General', 1.234567891234e-14, '1.23457E-14'); - t.format('General', 1.234567891234e-13, '1.23457E-13'); - t.format('General', 1.234567891234e-12, '1.23457E-12'); - t.format('General', 1.234567891234e-11, '1.23457E-11'); - t.format('General', 1.234567891234e-10, '1.23457E-10'); - t.format('General', 1.234567891234e-9, '1.23457E-09'); - t.format('General', 1.234567891234e-8, '1.23457E-08'); - t.format('General', 1.234567891234e-7, '1.23457E-07'); - t.format('General', 0.000001234567891234, '1.23457E-06'); - t.format('General', 0.00001234567891234, '1.23457E-05'); - t.format('General', 0.0001234567891234, '0.000123457'); - t.format('General', 0.001234567891234, '0.001234568'); - t.format('General', 0.01234567891234, '0.012345679'); - t.format('General', 0.1234567891234, '0.123456789'); - t.format('General', 1.234567891234, '1.234567891'); - t.format('General', 12.34567891234, '12.34567891'); - t.format('General', 123.4567891234, '123.4567891'); - t.format('General', 1234.567891234, '1234.567891'); - t.format('General', 12345.67891234, '12345.67891'); - t.format('General', 123456.7891234, '123456.7891'); - t.format('General', 1234567.891234, '1234567.891'); - t.format('General', 12345678.91234, '12345678.91'); - t.format('General', 123456789.1234, '123456789.1'); - t.format('General', 1234567891.234, '1234567891'); - t.format('General', 12345678912.34, '12345678912'); - t.format('General', 123456789123.4, '1.23457E+11'); - t.format('General', 1234567891234, '1.23457E+12'); - t.format('General', 12345678912340, '1.23457E+13'); - t.format('General', 123456789123400, '1.23457E+14'); - t.format('General', 1.2345678912345e-14, '1.23457E-14'); - t.format('General', 1.2345678912345e-13, '1.23457E-13'); - t.format('General', 1.2345678912345e-12, '1.23457E-12'); - t.format('General', 1.2345678912345e-11, '1.23457E-11'); - t.format('General', 1.2345678912345e-10, '1.23457E-10'); - t.format('General', 1.2345678912345e-9, '1.23457E-09'); - t.format('General', 1.2345678912345e-8, '1.23457E-08'); - t.format('General', 1.2345678912345e-7, '1.23457E-07'); - t.format('General', 0.0000012345678912345, '1.23457E-06'); - t.format('General', 0.000012345678912345, '1.23457E-05'); - t.format('General', 0.00012345678912345, '0.000123457'); - t.format('General', 0.0012345678912345, '0.001234568'); - t.format('General', 0.012345678912345, '0.012345679'); - t.format('General', 0.12345678912345, '0.123456789'); - t.format('General', 1.2345678912345, '1.234567891'); - t.format('General', 12.345678912345, '12.34567891'); - t.format('General', 123.45678912345, '123.4567891'); - t.format('General', 1234.5678912345, '1234.567891'); - t.format('General', 12345.678912345, '12345.67891'); - t.format('General', 123456.78912345, '123456.7891'); - t.format('General', 1234567.8912345, '1234567.891'); - t.format('General', 12345678.912345, '12345678.91'); - t.format('General', 123456789.12345, '123456789.1'); - t.format('General', 1234567891.2345, '1234567891'); - t.format('General', 12345678912.345, '12345678912'); - t.format('General', 123456789123.45, '1.23457E+11'); - t.format('General', 1234567891234.5, '1.23457E+12'); - t.format('General', 12345678912345, '1.23457E+13'); - t.format('General', 123456789123450, '1.23457E+14'); - t.format('General', 1.23456789123456e-14, '1.23457E-14'); - t.format('General', 1.23456789123456e-13, '1.23457E-13'); - t.format('General', 1.23456789123456e-12, '1.23457E-12'); - t.format('General', 1.23456789123456e-11, '1.23457E-11'); - t.format('General', 1.23456789123456e-10, '1.23457E-10'); - t.format('General', 1.23456789123456e-9, '1.23457E-09'); - t.format('General', 1.23456789123456e-8, '1.23457E-08'); - t.format('General', 1.23456789123456e-7, '1.23457E-07'); - t.format('General', 0.00000123456789123456, '1.23457E-06'); - t.format('General', 0.0000123456789123456, '1.23457E-05'); - t.format('General', 0.000123456789123456, '0.000123457'); - t.format('General', 0.00123456789123456, '0.001234568'); - t.format('General', 0.0123456789123456, '0.012345679'); - t.format('General', 0.123456789123456, '0.123456789'); - t.format('General', 1.23456789123456, '1.234567891'); - t.format('General', 12.3456789123456, '12.34567891'); - t.format('General', 123.456789123456, '123.4567891'); - t.format('General', 1234.56789123456, '1234.567891'); - t.format('General', 12345.6789123456, '12345.67891'); - t.format('General', 123456.789123456, '123456.7891'); - t.format('General', 1234567.89123456, '1234567.891'); - t.format('General', 12345678.9123456, '12345678.91'); - t.format('General', 123456789.123456, '123456789.1'); - t.format('General', 1234567891.23456, '1234567891'); - t.format('General', 12345678912.3456, '12345678912'); - t.format('General', 123456789123.456, '1.23457E+11'); - t.format('General', 1234567891234.56, '1.23457E+12'); - t.format('General', 12345678912345.6, '1.23457E+13'); - t.format('General', 123456789123456, '1.23457E+14'); - t.format('General', -1.234567e-14, '-1.23457E-14'); - t.format('General', -1.234567e-13, '-1.23457E-13'); - t.format('General', -1.234567e-12, '-1.23457E-12'); - t.format('General', -1.234567e-11, '-1.23457E-11'); - t.format('General', -1.234567e-10, '-1.23457E-10'); - t.format('General', -1.234567e-9, '-1.23457E-09'); - t.format('General', -1.234567e-8, '-1.23457E-08'); - t.format('General', -1.234567e-7, '-1.23457E-07'); - t.format('General', -0.000001234567, '-1.23457E-06'); - t.format('General', -0.00001234567, '-1.23457E-05'); - t.format('General', -0.0001234567, '-0.000123457'); - t.format('General', -0.001234567, '-0.001234567'); - t.format('General', -0.01234567, '-0.01234567'); - t.format('General', -0.1234567, '-0.1234567'); - t.format('General', -1.234567, '-1.234567'); - t.format('General', -12.34567, '-12.34567'); - t.format('General', -123.4567, '-123.4567'); - t.format('General', -1234.567, '-1234.567'); - t.format('General', -12345.67, '-12345.67'); - t.format('General', -123456.7, '-123456.7'); - t.format('General', -1234567, '-1234567'); - t.format('General', -12345670, '-12345670'); - t.format('General', -123456700, '-123456700'); - t.format('General', -1234567000, '-1234567000'); - t.format('General', -12345670000, '-12345670000'); - t.format('General', -123456700000, '-1.23457E+11'); - t.format('General', -1234567000000, '-1.23457E+12'); - t.format('General', -12345670000000, '-1.23457E+13'); - t.format('General', -123456700000000, '-1.23457E+14'); - t.format('General', true, 'TRUE'); - t.format('General', false, 'FALSE'); - t.format('General', 'sheetjs', 'sheetjs'); +test('General format', () => { + expect(format('General', 1.234567e-14)).toBe('1.23457E-14'); + expect(format('General', 1.234567e-13)).toBe('1.23457E-13'); + expect(format('General', 1.234567e-12)).toBe('1.23457E-12'); + expect(format('General', 1.234567e-11)).toBe('1.23457E-11'); + expect(format('General', 1.234567e-10)).toBe('1.23457E-10'); + expect(format('General', 1.234567e-9)).toBe('1.23457E-09'); + expect(format('General', 1.234567e-8)).toBe('1.23457E-08'); + expect(format('General', 1.234567e-7)).toBe('1.23457E-07'); + expect(format('General', 0.000001234567)).toBe('1.23457E-06'); + expect(format('General', 0.00001234567)).toBe('1.23457E-05'); + expect(format('General', 0.0001234567)).toBe('0.000123457'); + expect(format('General', 0.001234567)).toBe('0.001234567'); + expect(format('General', 0.01234567)).toBe('0.01234567'); + expect(format('General', 0.1234567)).toBe('0.1234567'); + expect(format('General', 1.234567)).toBe('1.234567'); + expect(format('General', 12.34567)).toBe('12.34567'); + expect(format('General', 123.4567)).toBe('123.4567'); + expect(format('General', 1234.567)).toBe('1234.567'); + expect(format('General', 12345.67)).toBe('12345.67'); + expect(format('General', 123456.7)).toBe('123456.7'); + expect(format('General', 1234567)).toBe('1234567'); + expect(format('General', 12345670)).toBe('12345670'); + expect(format('General', 123456700)).toBe('123456700'); + expect(format('General', 1234567000)).toBe('1234567000'); + expect(format('General', 12345670000)).toBe('12345670000'); + expect(format('General', 123456700000)).toBe('1.23457E+11'); + expect(format('General', 1234567000000)).toBe('1.23457E+12'); + expect(format('General', 12345670000000)).toBe('1.23457E+13'); + expect(format('General', 123456700000000)).toBe('1.23457E+14'); + expect(format('General', 1e-14)).toBe('1E-14'); + expect(format('General', 1e-13)).toBe('1E-13'); + expect(format('General', 1e-12)).toBe('1E-12'); + expect(format('General', 1e-11)).toBe('1E-11'); + expect(format('General', 1e-10)).toBe('1E-10'); + expect(format('General', 1e-9)).toBe('0.000000001'); + expect(format('General', 1e-8)).toBe('0.00000001'); + expect(format('General', 1e-7)).toBe('0.0000001'); + expect(format('General', 0.000001)).toBe('0.000001'); + expect(format('General', 0.00001)).toBe('0.00001'); + expect(format('General', 0.0001)).toBe('0.0001'); + expect(format('General', 0.001)).toBe('0.001'); + expect(format('General', 0.01)).toBe('0.01'); + expect(format('General', 0.1)).toBe('0.1'); + expect(format('General', 1)).toBe('1'); + expect(format('General', 10)).toBe('10'); + expect(format('General', 100)).toBe('100'); + expect(format('General', 1000)).toBe('1000'); + expect(format('General', 10000)).toBe('10000'); + expect(format('General', 100000)).toBe('100000'); + expect(format('General', 1000000)).toBe('1000000'); + expect(format('General', 10000000)).toBe('10000000'); + expect(format('General', 100000000)).toBe('100000000'); + expect(format('General', 1000000000)).toBe('1000000000'); + expect(format('General', 10000000000)).toBe('10000000000'); + expect(format('General', 100000000000)).toBe('1E+11'); + expect(format('General', 1000000000000)).toBe('1E+12'); + expect(format('General', 10000000000000)).toBe('1E+13'); + expect(format('General', 100000000000000)).toBe('1E+14'); + expect(format('General', 1.2e-14)).toBe('1.2E-14'); + expect(format('General', 1.2e-13)).toBe('1.2E-13'); + expect(format('General', 1.2e-12)).toBe('1.2E-12'); + expect(format('General', 1.2e-11)).toBe('1.2E-11'); + expect(format('General', 1.2e-10)).toBe('1.2E-10'); + expect(format('General', 1.2e-9)).toBe('1.2E-09'); + expect(format('General', 1.2e-8)).toBe('0.000000012'); + expect(format('General', 1.2e-7)).toBe('0.00000012'); + expect(format('General', 0.0000012)).toBe('0.0000012'); + expect(format('General', 0.000012)).toBe('0.000012'); + expect(format('General', 0.00012)).toBe('0.00012'); + expect(format('General', 0.0012)).toBe('0.0012'); + expect(format('General', 0.012)).toBe('0.012'); + expect(format('General', 0.12)).toBe('0.12'); + expect(format('General', 1.2)).toBe('1.2'); + expect(format('General', 12)).toBe('12'); + expect(format('General', 120)).toBe('120'); + expect(format('General', 1200)).toBe('1200'); + expect(format('General', 12000)).toBe('12000'); + expect(format('General', 120000)).toBe('120000'); + expect(format('General', 1200000)).toBe('1200000'); + expect(format('General', 12000000)).toBe('12000000'); + expect(format('General', 120000000)).toBe('120000000'); + expect(format('General', 1200000000)).toBe('1200000000'); + expect(format('General', 12000000000)).toBe('12000000000'); + expect(format('General', 120000000000)).toBe('1.2E+11'); + expect(format('General', 1200000000000)).toBe('1.2E+12'); + expect(format('General', 12000000000000)).toBe('1.2E+13'); + expect(format('General', 120000000000000)).toBe('1.2E+14'); + expect(format('General', 1.23e-14)).toBe('1.23E-14'); + expect(format('General', 1.23e-13)).toBe('1.23E-13'); + expect(format('General', 1.23e-12)).toBe('1.23E-12'); + expect(format('General', 1.23e-11)).toBe('1.23E-11'); + expect(format('General', 1.23e-10)).toBe('1.23E-10'); + expect(format('General', 1.23e-9)).toBe('1.23E-09'); + expect(format('General', 1.23e-8)).toBe('1.23E-08'); + expect(format('General', 1.23e-7)).toBe('0.000000123'); + expect(format('General', 0.00000123)).toBe('0.00000123'); + expect(format('General', 0.0000123)).toBe('0.0000123'); + expect(format('General', 0.000123)).toBe('0.000123'); + expect(format('General', 0.00123)).toBe('0.00123'); + expect(format('General', 0.0123)).toBe('0.0123'); + expect(format('General', 0.123)).toBe('0.123'); + expect(format('General', 1.23)).toBe('1.23'); + expect(format('General', 12.3)).toBe('12.3'); + expect(format('General', 123)).toBe('123'); + expect(format('General', 1230)).toBe('1230'); + expect(format('General', 12300)).toBe('12300'); + expect(format('General', 123000)).toBe('123000'); + expect(format('General', 1230000)).toBe('1230000'); + expect(format('General', 12300000)).toBe('12300000'); + expect(format('General', 123000000)).toBe('123000000'); + expect(format('General', 1230000000)).toBe('1230000000'); + expect(format('General', 12300000000)).toBe('12300000000'); + expect(format('General', 123000000000)).toBe('1.23E+11'); + expect(format('General', 1230000000000)).toBe('1.23E+12'); + expect(format('General', 12300000000000)).toBe('1.23E+13'); + expect(format('General', 123000000000000)).toBe('1.23E+14'); + expect(format('General', 1.234e-14)).toBe('1.234E-14'); + expect(format('General', 1.234e-13)).toBe('1.234E-13'); + expect(format('General', 1.234e-12)).toBe('1.234E-12'); + expect(format('General', 1.234e-11)).toBe('1.234E-11'); + expect(format('General', 1.234e-10)).toBe('1.234E-10'); + expect(format('General', 1.234e-9)).toBe('1.234E-09'); + expect(format('General', 1.234e-8)).toBe('1.234E-08'); + expect(format('General', 1.234e-7)).toBe('1.234E-07'); + expect(format('General', 0.000001234)).toBe('0.000001234'); + expect(format('General', 0.00001234)).toBe('0.00001234'); + expect(format('General', 0.0001234)).toBe('0.0001234'); + expect(format('General', 0.001234)).toBe('0.001234'); + expect(format('General', 0.01234)).toBe('0.01234'); + expect(format('General', 0.1234)).toBe('0.1234'); + expect(format('General', 1.234)).toBe('1.234'); + expect(format('General', 12.34)).toBe('12.34'); + expect(format('General', 123.4)).toBe('123.4'); + expect(format('General', 1234)).toBe('1234'); + expect(format('General', 12340)).toBe('12340'); + expect(format('General', 123400)).toBe('123400'); + expect(format('General', 1234000)).toBe('1234000'); + expect(format('General', 12340000)).toBe('12340000'); + expect(format('General', 123400000)).toBe('123400000'); + expect(format('General', 1234000000)).toBe('1234000000'); + expect(format('General', 12340000000)).toBe('12340000000'); + expect(format('General', 123400000000)).toBe('1.234E+11'); + expect(format('General', 1234000000000)).toBe('1.234E+12'); + expect(format('General', 12340000000000)).toBe('1.234E+13'); + expect(format('General', 123400000000000)).toBe('1.234E+14'); + expect(format('General', 1.2345e-14)).toBe('1.2345E-14'); + expect(format('General', 1.2345e-13)).toBe('1.2345E-13'); + expect(format('General', 1.2345e-12)).toBe('1.2345E-12'); + expect(format('General', 1.2345e-11)).toBe('1.2345E-11'); + expect(format('General', 1.2345e-10)).toBe('1.2345E-10'); + expect(format('General', 1.2345e-9)).toBe('1.2345E-09'); + expect(format('General', 1.2345e-8)).toBe('1.2345E-08'); + expect(format('General', 1.2345e-7)).toBe('1.2345E-07'); + expect(format('General', 0.0000012345)).toBe('1.2345E-06'); + expect(format('General', 0.000012345)).toBe('0.000012345'); + expect(format('General', 0.00012345)).toBe('0.00012345'); + expect(format('General', 0.0012345)).toBe('0.0012345'); + expect(format('General', 0.012345)).toBe('0.012345'); + expect(format('General', 0.12345)).toBe('0.12345'); + expect(format('General', 1.2345)).toBe('1.2345'); + expect(format('General', 12.345)).toBe('12.345'); + expect(format('General', 123.45)).toBe('123.45'); + expect(format('General', 1234.5)).toBe('1234.5'); + expect(format('General', 12345)).toBe('12345'); + expect(format('General', 123450)).toBe('123450'); + expect(format('General', 1234500)).toBe('1234500'); + expect(format('General', 12345000)).toBe('12345000'); + expect(format('General', 123450000)).toBe('123450000'); + expect(format('General', 1234500000)).toBe('1234500000'); + expect(format('General', 12345000000)).toBe('12345000000'); + expect(format('General', 123450000000)).toBe('1.2345E+11'); + expect(format('General', 1234500000000)).toBe('1.2345E+12'); + expect(format('General', 12345000000000)).toBe('1.2345E+13'); + expect(format('General', 123450000000000)).toBe('1.2345E+14'); + expect(format('General', 1.23456e-14)).toBe('1.23456E-14'); + expect(format('General', 1.23456e-13)).toBe('1.23456E-13'); + expect(format('General', 1.23456e-12)).toBe('1.23456E-12'); + expect(format('General', 1.23456e-11)).toBe('1.23456E-11'); + expect(format('General', 1.23456e-10)).toBe('1.23456E-10'); + expect(format('General', 1.23456e-9)).toBe('1.23456E-09'); + expect(format('General', 1.23456e-8)).toBe('1.23456E-08'); + expect(format('General', 1.23456e-7)).toBe('1.23456E-07'); + expect(format('General', 0.00000123456)).toBe('1.23456E-06'); + expect(format('General', 0.0000123456)).toBe('1.23456E-05'); + expect(format('General', 0.000123456)).toBe('0.000123456'); + expect(format('General', 0.00123456)).toBe('0.00123456'); + expect(format('General', 0.0123456)).toBe('0.0123456'); + expect(format('General', 0.123456)).toBe('0.123456'); + expect(format('General', 1.23456)).toBe('1.23456'); + expect(format('General', 12.3456)).toBe('12.3456'); + expect(format('General', 123.456)).toBe('123.456'); + expect(format('General', 1234.56)).toBe('1234.56'); + expect(format('General', 12345.6)).toBe('12345.6'); + expect(format('General', 123456)).toBe('123456'); + expect(format('General', 1234560)).toBe('1234560'); + expect(format('General', 12345600)).toBe('12345600'); + expect(format('General', 123456000)).toBe('123456000'); + expect(format('General', 1234560000)).toBe('1234560000'); + expect(format('General', 12345600000)).toBe('12345600000'); + expect(format('General', 123456000000)).toBe('1.23456E+11'); + expect(format('General', 1234560000000)).toBe('1.23456E+12'); + expect(format('General', 12345600000000)).toBe('1.23456E+13'); + expect(format('General', 123456000000000)).toBe('1.23456E+14'); + expect(format('General', 1.234567e-14)).toBe('1.23457E-14'); + expect(format('General', 1.234567e-13)).toBe('1.23457E-13'); + expect(format('General', 1.234567e-12)).toBe('1.23457E-12'); + expect(format('General', 1.234567e-11)).toBe('1.23457E-11'); + expect(format('General', 1.234567e-10)).toBe('1.23457E-10'); + expect(format('General', 1.234567e-9)).toBe('1.23457E-09'); + expect(format('General', 1.234567e-8)).toBe('1.23457E-08'); + expect(format('General', 1.234567e-7)).toBe('1.23457E-07'); + expect(format('General', 0.000001234567)).toBe('1.23457E-06'); + expect(format('General', 0.00001234567)).toBe('1.23457E-05'); + expect(format('General', 0.0001234567)).toBe('0.000123457'); + expect(format('General', 0.001234567)).toBe('0.001234567'); + expect(format('General', 0.01234567)).toBe('0.01234567'); + expect(format('General', 0.1234567)).toBe('0.1234567'); + expect(format('General', 1.234567)).toBe('1.234567'); + expect(format('General', 12.34567)).toBe('12.34567'); + expect(format('General', 123.4567)).toBe('123.4567'); + expect(format('General', 1234.567)).toBe('1234.567'); + expect(format('General', 12345.67)).toBe('12345.67'); + expect(format('General', 123456.7)).toBe('123456.7'); + expect(format('General', 1234567)).toBe('1234567'); + expect(format('General', 12345670)).toBe('12345670'); + expect(format('General', 123456700)).toBe('123456700'); + expect(format('General', 1234567000)).toBe('1234567000'); + expect(format('General', 12345670000)).toBe('12345670000'); + expect(format('General', 123456700000)).toBe('1.23457E+11'); + expect(format('General', 1234567000000)).toBe('1.23457E+12'); + expect(format('General', 12345670000000)).toBe('1.23457E+13'); + expect(format('General', 123456700000000)).toBe('1.23457E+14'); + expect(format('General', 1.2345678e-14)).toBe('1.23457E-14'); + expect(format('General', 1.2345678e-13)).toBe('1.23457E-13'); + expect(format('General', 1.2345678e-12)).toBe('1.23457E-12'); + expect(format('General', 1.2345678e-11)).toBe('1.23457E-11'); + expect(format('General', 1.2345678e-10)).toBe('1.23457E-10'); + expect(format('General', 1.2345678e-9)).toBe('1.23457E-09'); + expect(format('General', 1.2345678e-8)).toBe('1.23457E-08'); + expect(format('General', 1.2345678e-7)).toBe('1.23457E-07'); + expect(format('General', 0.0000012345678)).toBe('1.23457E-06'); + expect(format('General', 0.000012345678)).toBe('1.23457E-05'); + expect(format('General', 0.00012345678)).toBe('0.000123457'); + expect(format('General', 0.0012345678)).toBe('0.001234568'); + expect(format('General', 0.012345678)).toBe('0.012345678'); + expect(format('General', 0.12345678)).toBe('0.12345678'); + expect(format('General', 1.2345678)).toBe('1.2345678'); + expect(format('General', 12.345678)).toBe('12.345678'); + expect(format('General', 123.45678)).toBe('123.45678'); + expect(format('General', 1234.5678)).toBe('1234.5678'); + expect(format('General', 12345.678)).toBe('12345.678'); + expect(format('General', 123456.78)).toBe('123456.78'); + expect(format('General', 1234567.8)).toBe('1234567.8'); + expect(format('General', 12345678)).toBe('12345678'); + expect(format('General', 123456780)).toBe('123456780'); + expect(format('General', 1234567800)).toBe('1234567800'); + expect(format('General', 12345678000)).toBe('12345678000'); + expect(format('General', 123456780000)).toBe('1.23457E+11'); + expect(format('General', 1234567800000)).toBe('1.23457E+12'); + expect(format('General', 12345678000000)).toBe('1.23457E+13'); + expect(format('General', 123456780000000)).toBe('1.23457E+14'); + expect(format('General', 1.23456789e-14)).toBe('1.23457E-14'); + expect(format('General', 1.23456789e-13)).toBe('1.23457E-13'); + expect(format('General', 1.23456789e-12)).toBe('1.23457E-12'); + expect(format('General', 1.23456789e-11)).toBe('1.23457E-11'); + expect(format('General', 1.23456789e-10)).toBe('1.23457E-10'); + expect(format('General', 1.23456789e-9)).toBe('1.23457E-09'); + expect(format('General', 1.23456789e-8)).toBe('1.23457E-08'); + expect(format('General', 1.23456789e-7)).toBe('1.23457E-07'); + expect(format('General', 0.00000123456789)).toBe('1.23457E-06'); + expect(format('General', 0.0000123456789)).toBe('1.23457E-05'); + expect(format('General', 0.000123456789)).toBe('0.000123457'); + expect(format('General', 0.00123456789)).toBe('0.001234568'); + expect(format('General', 0.0123456789)).toBe('0.012345679'); + expect(format('General', 0.123456789)).toBe('0.123456789'); + expect(format('General', 1.23456789)).toBe('1.23456789'); + expect(format('General', 12.3456789)).toBe('12.3456789'); + expect(format('General', 123.456789)).toBe('123.456789'); + expect(format('General', 1234.56789)).toBe('1234.56789'); + expect(format('General', 12345.6789)).toBe('12345.6789'); + expect(format('General', 123456.789)).toBe('123456.789'); + expect(format('General', 1234567.89)).toBe('1234567.89'); + expect(format('General', 12345678.9)).toBe('12345678.9'); + expect(format('General', 123456789)).toBe('123456789'); + expect(format('General', 1234567890)).toBe('1234567890'); + expect(format('General', 12345678900)).toBe('12345678900'); + expect(format('General', 123456789000)).toBe('1.23457E+11'); + expect(format('General', 1234567890000)).toBe('1.23457E+12'); + expect(format('General', 12345678900000)).toBe('1.23457E+13'); + expect(format('General', 123456789000000)).toBe('1.23457E+14'); + expect(format('General', 1.234567891e-14)).toBe('1.23457E-14'); + expect(format('General', 1.234567891e-13)).toBe('1.23457E-13'); + expect(format('General', 1.234567891e-12)).toBe('1.23457E-12'); + expect(format('General', 1.234567891e-11)).toBe('1.23457E-11'); + expect(format('General', 1.234567891e-10)).toBe('1.23457E-10'); + expect(format('General', 1.234567891e-9)).toBe('1.23457E-09'); + expect(format('General', 1.234567891e-8)).toBe('1.23457E-08'); + expect(format('General', 1.234567891e-7)).toBe('1.23457E-07'); + expect(format('General', 0.000001234567891)).toBe('1.23457E-06'); + expect(format('General', 0.00001234567891)).toBe('1.23457E-05'); + expect(format('General', 0.0001234567891)).toBe('0.000123457'); + expect(format('General', 0.001234567891)).toBe('0.001234568'); + expect(format('General', 0.01234567891)).toBe('0.012345679'); + expect(format('General', 0.1234567891)).toBe('0.123456789'); + expect(format('General', 1.234567891)).toBe('1.234567891'); + expect(format('General', 12.34567891)).toBe('12.34567891'); + expect(format('General', 123.4567891)).toBe('123.4567891'); + expect(format('General', 1234.567891)).toBe('1234.567891'); + expect(format('General', 12345.67891)).toBe('12345.67891'); + expect(format('General', 123456.7891)).toBe('123456.7891'); + expect(format('General', 1234567.891)).toBe('1234567.891'); + expect(format('General', 12345678.91)).toBe('12345678.91'); + expect(format('General', 123456789.1)).toBe('123456789.1'); + expect(format('General', 1234567891)).toBe('1234567891'); + expect(format('General', 12345678910)).toBe('12345678910'); + expect(format('General', 123456789100)).toBe('1.23457E+11'); + expect(format('General', 1234567891000)).toBe('1.23457E+12'); + expect(format('General', 12345678910000)).toBe('1.23457E+13'); + expect(format('General', 123456789100000)).toBe('1.23457E+14'); + expect(format('General', 1.2345678912e-14)).toBe('1.23457E-14'); + expect(format('General', 1.2345678912e-13)).toBe('1.23457E-13'); + expect(format('General', 1.2345678912e-12)).toBe('1.23457E-12'); + expect(format('General', 1.2345678912e-11)).toBe('1.23457E-11'); + expect(format('General', 1.2345678912e-10)).toBe('1.23457E-10'); + expect(format('General', 1.2345678912e-9)).toBe('1.23457E-09'); + expect(format('General', 1.2345678912e-8)).toBe('1.23457E-08'); + expect(format('General', 1.2345678912e-7)).toBe('1.23457E-07'); + expect(format('General', 0.0000012345678912)).toBe('1.23457E-06'); + expect(format('General', 0.000012345678912)).toBe('1.23457E-05'); + expect(format('General', 0.00012345678912)).toBe('0.000123457'); + expect(format('General', 0.0012345678912)).toBe('0.001234568'); + expect(format('General', 0.012345678912)).toBe('0.012345679'); + expect(format('General', 0.12345678912)).toBe('0.123456789'); + expect(format('General', 1.2345678912)).toBe('1.234567891'); + expect(format('General', 12.345678912)).toBe('12.34567891'); + expect(format('General', 123.45678912)).toBe('123.4567891'); + expect(format('General', 1234.5678912)).toBe('1234.567891'); + expect(format('General', 12345.678912)).toBe('12345.67891'); + expect(format('General', 123456.78912)).toBe('123456.7891'); + expect(format('General', 1234567.8912)).toBe('1234567.891'); + expect(format('General', 12345678.912)).toBe('12345678.91'); + expect(format('General', 123456789.12)).toBe('123456789.1'); + expect(format('General', 1234567891.2)).toBe('1234567891'); + expect(format('General', 12345678912)).toBe('12345678912'); + expect(format('General', 123456789120)).toBe('1.23457E+11'); + expect(format('General', 1234567891200)).toBe('1.23457E+12'); + expect(format('General', 12345678912000)).toBe('1.23457E+13'); + expect(format('General', 123456789120000)).toBe('1.23457E+14'); + expect(format('General', 1.23456789123e-14)).toBe('1.23457E-14'); + expect(format('General', 1.23456789123e-13)).toBe('1.23457E-13'); + expect(format('General', 1.23456789123e-12)).toBe('1.23457E-12'); + expect(format('General', 1.23456789123e-11)).toBe('1.23457E-11'); + expect(format('General', 1.23456789123e-10)).toBe('1.23457E-10'); + expect(format('General', 1.23456789123e-9)).toBe('1.23457E-09'); + expect(format('General', 1.23456789123e-8)).toBe('1.23457E-08'); + expect(format('General', 1.23456789123e-7)).toBe('1.23457E-07'); + expect(format('General', 0.00000123456789123)).toBe('1.23457E-06'); + expect(format('General', 0.0000123456789123)).toBe('1.23457E-05'); + expect(format('General', 0.000123456789123)).toBe('0.000123457'); + expect(format('General', 0.00123456789123)).toBe('0.001234568'); + expect(format('General', 0.0123456789123)).toBe('0.012345679'); + expect(format('General', 0.123456789123)).toBe('0.123456789'); + expect(format('General', 1.23456789123)).toBe('1.234567891'); + expect(format('General', 12.3456789123)).toBe('12.34567891'); + expect(format('General', 123.456789123)).toBe('123.4567891'); + expect(format('General', 1234.56789123)).toBe('1234.567891'); + expect(format('General', 12345.6789123)).toBe('12345.67891'); + expect(format('General', 123456.789123)).toBe('123456.7891'); + expect(format('General', 1234567.89123)).toBe('1234567.891'); + expect(format('General', 12345678.9123)).toBe('12345678.91'); + expect(format('General', 123456789.123)).toBe('123456789.1'); + expect(format('General', 1234567891.23)).toBe('1234567891'); + expect(format('General', 12345678912.3)).toBe('12345678912'); + expect(format('General', 123456789123)).toBe('1.23457E+11'); + expect(format('General', 1234567891230)).toBe('1.23457E+12'); + expect(format('General', 12345678912300)).toBe('1.23457E+13'); + expect(format('General', 123456789123000)).toBe('1.23457E+14'); + expect(format('General', 1.234567891234e-14)).toBe('1.23457E-14'); + expect(format('General', 1.234567891234e-13)).toBe('1.23457E-13'); + expect(format('General', 1.234567891234e-12)).toBe('1.23457E-12'); + expect(format('General', 1.234567891234e-11)).toBe('1.23457E-11'); + expect(format('General', 1.234567891234e-10)).toBe('1.23457E-10'); + expect(format('General', 1.234567891234e-9)).toBe('1.23457E-09'); + expect(format('General', 1.234567891234e-8)).toBe('1.23457E-08'); + expect(format('General', 1.234567891234e-7)).toBe('1.23457E-07'); + expect(format('General', 0.000001234567891234)).toBe('1.23457E-06'); + expect(format('General', 0.00001234567891234)).toBe('1.23457E-05'); + expect(format('General', 0.0001234567891234)).toBe('0.000123457'); + expect(format('General', 0.001234567891234)).toBe('0.001234568'); + expect(format('General', 0.01234567891234)).toBe('0.012345679'); + expect(format('General', 0.1234567891234)).toBe('0.123456789'); + expect(format('General', 1.234567891234)).toBe('1.234567891'); + expect(format('General', 12.34567891234)).toBe('12.34567891'); + expect(format('General', 123.4567891234)).toBe('123.4567891'); + expect(format('General', 1234.567891234)).toBe('1234.567891'); + expect(format('General', 12345.67891234)).toBe('12345.67891'); + expect(format('General', 123456.7891234)).toBe('123456.7891'); + expect(format('General', 1234567.891234)).toBe('1234567.891'); + expect(format('General', 12345678.91234)).toBe('12345678.91'); + expect(format('General', 123456789.1234)).toBe('123456789.1'); + expect(format('General', 1234567891.234)).toBe('1234567891'); + expect(format('General', 12345678912.34)).toBe('12345678912'); + expect(format('General', 123456789123.4)).toBe('1.23457E+11'); + expect(format('General', 1234567891234)).toBe('1.23457E+12'); + expect(format('General', 12345678912340)).toBe('1.23457E+13'); + expect(format('General', 123456789123400)).toBe('1.23457E+14'); + expect(format('General', 1.2345678912345e-14)).toBe('1.23457E-14'); + expect(format('General', 1.2345678912345e-13)).toBe('1.23457E-13'); + expect(format('General', 1.2345678912345e-12)).toBe('1.23457E-12'); + expect(format('General', 1.2345678912345e-11)).toBe('1.23457E-11'); + expect(format('General', 1.2345678912345e-10)).toBe('1.23457E-10'); + expect(format('General', 1.2345678912345e-9)).toBe('1.23457E-09'); + expect(format('General', 1.2345678912345e-8)).toBe('1.23457E-08'); + expect(format('General', 1.2345678912345e-7)).toBe('1.23457E-07'); + expect(format('General', 0.0000012345678912345)).toBe('1.23457E-06'); + expect(format('General', 0.000012345678912345)).toBe('1.23457E-05'); + expect(format('General', 0.00012345678912345)).toBe('0.000123457'); + expect(format('General', 0.0012345678912345)).toBe('0.001234568'); + expect(format('General', 0.012345678912345)).toBe('0.012345679'); + expect(format('General', 0.12345678912345)).toBe('0.123456789'); + expect(format('General', 1.2345678912345)).toBe('1.234567891'); + expect(format('General', 12.345678912345)).toBe('12.34567891'); + expect(format('General', 123.45678912345)).toBe('123.4567891'); + expect(format('General', 1234.5678912345)).toBe('1234.567891'); + expect(format('General', 12345.678912345)).toBe('12345.67891'); + expect(format('General', 123456.78912345)).toBe('123456.7891'); + expect(format('General', 1234567.8912345)).toBe('1234567.891'); + expect(format('General', 12345678.912345)).toBe('12345678.91'); + expect(format('General', 123456789.12345)).toBe('123456789.1'); + expect(format('General', 1234567891.2345)).toBe('1234567891'); + expect(format('General', 12345678912.345)).toBe('12345678912'); + expect(format('General', 123456789123.45)).toBe('1.23457E+11'); + expect(format('General', 1234567891234.5)).toBe('1.23457E+12'); + expect(format('General', 12345678912345)).toBe('1.23457E+13'); + expect(format('General', 123456789123450)).toBe('1.23457E+14'); + expect(format('General', 1.23456789123456e-14)).toBe('1.23457E-14'); + expect(format('General', 1.23456789123456e-13)).toBe('1.23457E-13'); + expect(format('General', 1.23456789123456e-12)).toBe('1.23457E-12'); + expect(format('General', 1.23456789123456e-11)).toBe('1.23457E-11'); + expect(format('General', 1.23456789123456e-10)).toBe('1.23457E-10'); + expect(format('General', 1.23456789123456e-9)).toBe('1.23457E-09'); + expect(format('General', 1.23456789123456e-8)).toBe('1.23457E-08'); + expect(format('General', 1.23456789123456e-7)).toBe('1.23457E-07'); + expect(format('General', 0.00000123456789123456)).toBe('1.23457E-06'); + expect(format('General', 0.0000123456789123456)).toBe('1.23457E-05'); + expect(format('General', 0.000123456789123456)).toBe('0.000123457'); + expect(format('General', 0.00123456789123456)).toBe('0.001234568'); + expect(format('General', 0.0123456789123456)).toBe('0.012345679'); + expect(format('General', 0.123456789123456)).toBe('0.123456789'); + expect(format('General', 1.23456789123456)).toBe('1.234567891'); + expect(format('General', 12.3456789123456)).toBe('12.34567891'); + expect(format('General', 123.456789123456)).toBe('123.4567891'); + expect(format('General', 1234.56789123456)).toBe('1234.567891'); + expect(format('General', 12345.6789123456)).toBe('12345.67891'); + expect(format('General', 123456.789123456)).toBe('123456.7891'); + expect(format('General', 1234567.89123456)).toBe('1234567.891'); + expect(format('General', 12345678.9123456)).toBe('12345678.91'); + expect(format('General', 123456789.123456)).toBe('123456789.1'); + expect(format('General', 1234567891.23456)).toBe('1234567891'); + expect(format('General', 12345678912.3456)).toBe('12345678912'); + expect(format('General', 123456789123.456)).toBe('1.23457E+11'); + expect(format('General', 1234567891234.56)).toBe('1.23457E+12'); + expect(format('General', 12345678912345.6)).toBe('1.23457E+13'); + expect(format('General', 123456789123456)).toBe('1.23457E+14'); + expect(format('General', -1.234567e-14)).toBe('-1.23457E-14'); + expect(format('General', -1.234567e-13)).toBe('-1.23457E-13'); + expect(format('General', -1.234567e-12)).toBe('-1.23457E-12'); + expect(format('General', -1.234567e-11)).toBe('-1.23457E-11'); + expect(format('General', -1.234567e-10)).toBe('-1.23457E-10'); + expect(format('General', -1.234567e-9)).toBe('-1.23457E-09'); + expect(format('General', -1.234567e-8)).toBe('-1.23457E-08'); + expect(format('General', -1.234567e-7)).toBe('-1.23457E-07'); + expect(format('General', -0.000001234567)).toBe('-1.23457E-06'); + expect(format('General', -0.00001234567)).toBe('-1.23457E-05'); + expect(format('General', -0.0001234567)).toBe('-0.000123457'); + expect(format('General', -0.001234567)).toBe('-0.001234567'); + expect(format('General', -0.01234567)).toBe('-0.01234567'); + expect(format('General', -0.1234567)).toBe('-0.1234567'); + expect(format('General', -1.234567)).toBe('-1.234567'); + expect(format('General', -12.34567)).toBe('-12.34567'); + expect(format('General', -123.4567)).toBe('-123.4567'); + expect(format('General', -1234.567)).toBe('-1234.567'); + expect(format('General', -12345.67)).toBe('-12345.67'); + expect(format('General', -123456.7)).toBe('-123456.7'); + expect(format('General', -1234567)).toBe('-1234567'); + expect(format('General', -12345670)).toBe('-12345670'); + expect(format('General', -123456700)).toBe('-123456700'); + expect(format('General', -1234567000)).toBe('-1234567000'); + expect(format('General', -12345670000)).toBe('-12345670000'); + expect(format('General', -123456700000)).toBe('-1.23457E+11'); + expect(format('General', -1234567000000)).toBe('-1.23457E+12'); + expect(format('General', -12345670000000)).toBe('-1.23457E+13'); + expect(format('General', -123456700000000)).toBe('-1.23457E+14'); + expect(format('General', true)).toBe('TRUE'); + expect(format('General', false)).toBe('FALSE'); + expect(format('General', 'sheetjs')).toBe('sheetjs'); - t.format('General', undefined, ''); - t.format('General', null, ''); - t.end(); + expect(format('General', undefined)).toBe(''); + expect(format('General', null)).toBe(''); }); -test('No decimal point', t => { - t.format('General', 0.9999999999999999, '1'); - t.format('General', 0.999999999999999, '1'); - t.format('General', 0.99999999999999, '1'); - t.format('General', 0.9999999999999, '1'); - t.format('General', 0.999999999999, '1'); - t.format('General', 0.99999999999, '1'); - t.format('General', 0.9999999999, '1'); // Sheets emits "0.9999999999" here which is not by spec - t.format('General', 0.999999999, '0.999999999'); // Excel yeilds a "1" here, but this is not by spec - t.format('General', 0.99999999, '0.99999999'); - t.format('General', 0.9999999, '0.9999999'); - t.format('General', 0.999999, '0.999999'); - t.end(); +test('No decimal point', () => { + expect(format('General', 0.9999999999999999)).toBe('1'); + expect(format('General', 0.999999999999999)).toBe('1'); + expect(format('General', 0.99999999999999)).toBe('1'); + expect(format('General', 0.9999999999999)).toBe('1'); + expect(format('General', 0.999999999999)).toBe('1'); + expect(format('General', 0.99999999999)).toBe('1'); + expect(format('General', 0.9999999999)).toBe('1'); // Sheets emits "0.9999999999" here which is not by spec + expect(format('General', 0.999999999)).toBe('0.999999999'); // Excel yeilds a "1" here, but this is not by spec + expect(format('General', 0.99999999)).toBe('0.99999999'); + expect(format('General', 0.9999999)).toBe('0.9999999'); + expect(format('General', 0.999999)).toBe('0.999999'); }); diff --git a/test/ssf-oddities.spec.ts b/test/ssf-oddities.spec.ts index 3b61dae..f7cd298 100644 --- a/test/ssf-oddities.spec.ts +++ b/test/ssf-oddities.spec.ts @@ -1,685 +1,593 @@ // Tests originally converted from SSF but have been reviewed // and corrected and conformed to Excel for Mac version 16.35 -import test from './utils.js'; +import { expect, test } from 'vitest'; import { format } from '../lib/index.js'; -test('Oddity: "foo";"bar";"baz";"qux"', t => { - t.format('"foo";"bar";"baz";"qux"', 1, 'foo'); - t.format('"foo";"bar";"baz";"qux"', -1, 'bar'); - t.format('"foo";"bar";"baz";"qux"', 0, 'baz'); - t.format('"foo";"bar";"baz";"qux"', 'text', 'qux'); - t.end(); +test('Oddity: "foo";"bar";"baz";"qux"', () => { + expect(format('"foo";"bar";"baz";"qux"', 1)).toBe('foo'); + expect(format('"foo";"bar";"baz";"qux"', -1)).toBe('bar'); + expect(format('"foo";"bar";"baz";"qux"', 0)).toBe('baz'); + expect(format('"foo";"bar";"baz";"qux"', 'text')).toBe('qux'); }); -test('Oddity: "foo";"bar";"baz"', t => { - t.format('"foo";"bar";"baz"', 1, 'foo'); - t.format('"foo";"bar";"baz"', -1, 'bar'); - t.format('"foo";"bar";"baz"', 0, 'baz'); - t.format('"foo";"bar";"baz"', 'text', 'text'); - t.end(); +test('Oddity: "foo";"bar";"baz"', () => { + expect(format('"foo";"bar";"baz"', 1)).toBe('foo'); + expect(format('"foo";"bar";"baz"', -1)).toBe('bar'); + expect(format('"foo";"bar";"baz"', 0)).toBe('baz'); + expect(format('"foo";"bar";"baz"', 'text')).toBe('text'); }); -test('Oddity: "foo";"bar";@', t => { - t.format('"foo";"bar";@', 1, 'foo'); - t.format('"foo";"bar";@', -1, 'bar'); - t.format('"foo";"bar";@', 0, 'foo'); - t.format('"foo";"bar";@', 'text', 'text'); - t.end(); +test('Oddity: "foo";"bar";@', () => { + expect(format('"foo";"bar";@', 1)).toBe('foo'); + expect(format('"foo";"bar";@', -1)).toBe('bar'); + expect(format('"foo";"bar";@', 0)).toBe('foo'); + expect(format('"foo";"bar";@', 'text')).toBe('text'); }); -test('Oddity: "foo";"bar"', t => { - t.format('"foo";"bar"', 1, 'foo'); - t.format('"foo";"bar"', -1, 'bar'); - t.format('"foo";"bar"', 0, 'foo'); - t.format('"foo";"bar"', 'text', 'text'); - t.end(); +test('Oddity: "foo";"bar"', () => { + expect(format('"foo";"bar"', 1)).toBe('foo'); + expect(format('"foo";"bar"', -1)).toBe('bar'); + expect(format('"foo";"bar"', 0)).toBe('foo'); + expect(format('"foo";"bar"', 'text')).toBe('text'); }); -test('Oddity: @@', t => { - t.format('@@', 1, '1'); - t.format('@@', -1, '-1'); - t.format('@@', 0, '0'); - t.format('@@', 'text', 'texttext'); - t.end(); +test('Oddity: @@', () => { + expect(format('@@', 1)).toBe('1'); + expect(format('@@', -1)).toBe('-1'); + expect(format('@@', 0)).toBe('0'); + expect(format('@@', 'text')).toBe('texttext'); }); -test('Oddity: [Blue]General', t => { - t.format('[Blue]General', 1, '1'); - t.format('[Blue]General', -1, '-1'); - t.format('[Blue]General', 0, '0'); - t.format('[Blue]General', 'text', 'text'); - t.end(); +test('Oddity: [Blue]General', () => { + expect(format('[Blue]General', 1)).toBe('1'); + expect(format('[Blue]General', -1)).toBe('-1'); + expect(format('[Blue]General', 0)).toBe('0'); + expect(format('[Blue]General', 'text')).toBe('text'); }); -test('Oddity: [Blue]G3neral', t => { - t.formatInvalid('[Blue]G3neral', 0); - t.end(); +test('Oddity: [Blue]G3neral', () => { + expect(() => format('[Blue]G3neral', '', 0)).toThrow(); }); -test('Oddity: A"TODO"', t => { - t.format('A"TODO"', 1, 'ATODO'); - t.format('A"TODO"', -1, '-ATODO'); - t.format('A"TODO"', 0, 'ATODO'); - t.format('A"TODO"', 'text', 'text'); - t.end(); +test('Oddity: A"TODO"', () => { + expect(format('A"TODO"', 1)).toBe('ATODO'); + expect(format('A"TODO"', -1)).toBe('-ATODO'); + expect(format('A"TODO"', 0)).toBe('ATODO'); + expect(format('A"TODO"', 'text')).toBe('text'); }); -test('Oddity: r', t => { - t.format('r', 1, 'r'); - t.format('r', -1, '-r'); - t.format('r', 0, 'r'); - t.format('r', 'text', 'text'); - t.end(); +test('Oddity: r', () => { + expect(format('r', 1)).toBe('r'); + expect(format('r', -1)).toBe('-r'); + expect(format('r', 0)).toBe('r'); + expect(format('r', 'text')).toBe('text'); }); -test('Oddity: ((;@', t => { - t.format('((;@', 1, '(('); - t.format('((;@', 0, '(('); - t.format('((;@', 'text', 'text'); - t.end(); +test('Oddity: ((;@', () => { + expect(format('((;@', 1)).toBe('(('); + expect(format('((;@', 0)).toBe('(('); + expect(format('((;@', 'text')).toBe('text'); }); -test('Oddity: \\r', t => { - t.format('\\r', 1, 'r'); - t.format('\\r', -1, '-r'); - t.format('\\r', 0, 'r'); - t.format('\\r', 'text', 'text'); - t.end(); +test('Oddity: \\r', () => { + expect(format('\\r', 1)).toBe('r'); + expect(format('\\r', -1)).toBe('-r'); + expect(format('\\r', 0)).toBe('r'); + expect(format('\\r', 'text')).toBe('text'); }); -test('Oddity: _($* #,##0_);_($* (#,##0);_($* "-"_);_(@_)', t => { - t.format('_($* #,##0_);_($* (#,##0);_($* "-"_);_(@_)', (1), ' $1 '); - t.format('_($* #,##0_);_($* (#,##0);_($* "-"_);_(@_)', (-1), ' $(1)'); - t.format('_($* #,##0_);_($* (#,##0);_($* "-"_);_(@_)', (0), ' $- '); - t.format('_($* #,##0_);_($* (#,##0);_($* "-"_);_(@_)', ('text'), ' text '); - // t.format('_($* #,##0_);_($* (#,##0);_($* "-"_);_(@_)', (null), ' $- '); - // t.format('_($* #,##0_);_($* (#,##0);_($* "-"_);_(@_)', (''), ''); - t.end(); +test('Oddity: _($* #,##0_);_($* (#,##0);_($* "-"_);_(@_)', () => { + expect(format('_($* #,##0_);_($* (#,##0);_($* "-"_);_(@_)', (1))).toBe(' $1 '); + expect(format('_($* #,##0_);_($* (#,##0);_($* "-"_);_(@_)', (-1))).toBe(' $(1)'); + expect(format('_($* #,##0_);_($* (#,##0);_($* "-"_);_(@_)', (0))).toBe(' $- '); + expect(format('_($* #,##0_);_($* (#,##0);_($* "-"_);_(@_)', ('text'))).toBe(' text '); + // expect(format('_($* #,##0_);_($* (#,##0);_($* "-"_);_(@_)', (null))).toBe(' $- '); + // expect(format('_($* #,##0_);_($* (#,##0);_($* "-"_);_(@_)', (''))).toBe(''); }); -test('Oddity: #0.#', t => { - t.format('#0.#', 0, '0.'); - t.format('#0.#', 1, '1.'); - t.format('#0.#', 12, '12.'); - t.format('#0.#', 12.34, '12.3'); - t.format('#0.#', -1.23, '-1.2'); - t.end(); +test('Oddity: #0.#', () => { + expect(format('#0.#', 0)).toBe('0.'); + expect(format('#0.#', 1)).toBe('1.'); + expect(format('#0.#', 12)).toBe('12.'); + expect(format('#0.#', 12.34)).toBe('12.3'); + expect(format('#0.#', -1.23)).toBe('-1.2'); }); -test('Oddity: #,##0.0', t => { - t.format('#,##0.0', 1, '1.0'); - t.format('#,##0.0', -1, '-1.0'); - t.format('#,##0.0', 0, '0.0'); - t.format('#,##0.0', 'text', 'text'); - t.end(); +test('Oddity: #,##0.0', () => { + expect(format('#,##0.0', 1)).toBe('1.0'); + expect(format('#,##0.0', -1)).toBe('-1.0'); + expect(format('#,##0.0', 0)).toBe('0.0'); + expect(format('#,##0.0', 'text')).toBe('text'); }); -test('Oddity: #,##0.00', t => { - t.format('#,##0.00', 1, '1.00'); - t.format('#,##0.00', -1, '-1.00'); - t.format('#,##0.00', 0, '0.00'); - t.format('#,##0.00', 'text', 'text'); - t.end(); +test('Oddity: #,##0.00', () => { + expect(format('#,##0.00', 1)).toBe('1.00'); + expect(format('#,##0.00', -1)).toBe('-1.00'); + expect(format('#,##0.00', 0)).toBe('0.00'); + expect(format('#,##0.00', 'text')).toBe('text'); }); -test('Oddity: #,##0.000', t => { - t.format('#,##0.000', 1, '1.000'); - t.format('#,##0.000', -1, '-1.000'); - t.format('#,##0.000', 0, '0.000'); - t.format('#,##0.000', 'text', 'text'); - t.end(); +test('Oddity: #,##0.000', () => { + expect(format('#,##0.000', 1)).toBe('1.000'); + expect(format('#,##0.000', -1)).toBe('-1.000'); + expect(format('#,##0.000', 0)).toBe('0.000'); + expect(format('#,##0.000', 'text')).toBe('text'); }); -test('Oddity: #,##0.0000', t => { - t.format('#,##0.0000', 1, '1.0000'); - t.format('#,##0.0000', -1, '-1.0000'); - t.format('#,##0.0000', 0, '0.0000'); - t.format('#,##0.0000', 'text', 'text'); - t.end(); +test('Oddity: #,##0.0000', () => { + expect(format('#,##0.0000', 1)).toBe('1.0000'); + expect(format('#,##0.0000', -1)).toBe('-1.0000'); + expect(format('#,##0.0000', 0)).toBe('0.0000'); + expect(format('#,##0.0000', 'text')).toBe('text'); }); -test('Oddity: #,##0.00000', t => { - t.format('#,##0.00000', 1000000, '1,000,000.00000'); - t.end(); +test('Oddity: #,##0.00000', () => { + expect(format('#,##0.00000', 1000000)).toBe('1,000,000.00000'); }); -test('Oddity: #,##0.000000', t => { - t.format('#,##0.000000', 1000000, '1,000,000.000000'); - t.end(); +test('Oddity: #,##0.000000', () => { + expect(format('#,##0.000000', 1000000)).toBe('1,000,000.000000'); }); -test('Oddity: #,##0.0000000', t => { - t.format('#,##0.0000000', 1000000, '1,000,000.0000000'); - t.end(); +test('Oddity: #,##0.0000000', () => { + expect(format('#,##0.0000000', 1000000)).toBe('1,000,000.0000000'); }); -test('Oddity: #,##0.00000000', t => { - t.format('#,##0.00000000', 1000000, '1,000,000.00000000'); - t.end(); +test('Oddity: #,##0.00000000', () => { + expect(format('#,##0.00000000', 1000000)).toBe('1,000,000.00000000'); }); -test('Oddity: #,##0.000000000', t => { - t.format('#,##0.000000000', 1000000, '1,000,000.000000000'); - t.end(); +test('Oddity: #,##0.000000000', () => { + expect(format('#,##0.000000000', 1000000)).toBe('1,000,000.000000000'); }); -test('Oddity: #,###', t => { - t.format('#,###', 1, '1'); - t.format('#,###', -1, '-1'); - t.format('#,###', 0, ''); - t.format('#,###', 12345.6789, '12,346'); - t.format('#,###', 'TODO', 'TODO'); - t.end(); +test('Oddity: #,###', () => { + expect(format('#,###', 1)).toBe('1'); + expect(format('#,###', -1)).toBe('-1'); + expect(format('#,###', 0)).toBe(''); + expect(format('#,###', 12345.6789)).toBe('12,346'); + expect(format('#,###', 'TODO')).toBe('TODO'); }); -test('Oddity: #.##', t => { - t.format('#.##', 1, '1.'); - t.format('#.##', -1, '-1.'); - t.format('#.##', 0, '.'); - t.format('#.##', 'text', 'text'); - t.end(); +test('Oddity: #.##', () => { + expect(format('#.##', 1)).toBe('1.'); + expect(format('#.##', -1)).toBe('-1.'); + expect(format('#.##', 0)).toBe('.'); + expect(format('#.##', 'text')).toBe('text'); }); -test('Oddity: 0;0', t => { - t.format('0;0', 1.1, '1'); - t.format('0;0', -1.1, '1'); - t.format('0;0', 0, '0'); - t.format('0;0', 'text', 'text'); - t.end(); +test('Oddity: 0;0', () => { + expect(format('0;0', 1.1)).toBe('1'); + expect(format('0;0', -1.1)).toBe('1'); + expect(format('0;0', 0)).toBe('0'); + expect(format('0;0', 'text')).toBe('text'); }); -test('Oddity: 0.0', t => { - t.format('0.0', 1, '1.0'); - t.format('0.0', -1, '-1.0'); - t.format('0.0', 0, '0.0'); - t.format('0.0', 'text', 'text'); - t.end(); +test('Oddity: 0.0', () => { + expect(format('0.0', 1)).toBe('1.0'); + expect(format('0.0', -1)).toBe('-1.0'); + expect(format('0.0', 0)).toBe('0.0'); + expect(format('0.0', 'text')).toBe('text'); }); -test('Oddity: 0.00', t => { - t.format('0.00', 1.0001, '1.00'); - t.format('0.00', -1, '-1.00'); - t.format('0.00', 0, '0.00'); - t.format('0.00', 'text', 'text'); - t.end(); +test('Oddity: 0.00', () => { + expect(format('0.00', 1.0001)).toBe('1.00'); + expect(format('0.00', -1)).toBe('-1.00'); + expect(format('0.00', 0)).toBe('0.00'); + expect(format('0.00', 'text')).toBe('text'); }); -test('Oddity: 0.000', t => { - t.format('0.000', 1, '1.000'); - t.format('0.000', -1, '-1.000'); - t.format('0.000', 0, '0.000'); - t.format('0.000', 'text', 'text'); - t.end(); +test('Oddity: 0.000', () => { + expect(format('0.000', 1)).toBe('1.000'); + expect(format('0.000', -1)).toBe('-1.000'); + expect(format('0.000', 0)).toBe('0.000'); + expect(format('0.000', 'text')).toBe('text'); }); -test('Oddity: 0.0000', t => { - t.format('0.0000', 1, '1.0000'); - t.format('0.0000', -1, '-1.0000'); - t.format('0.0000', 0, '0.0000'); - t.format('0.0000', 'text', 'text'); - t.end(); +test('Oddity: 0.0000', () => { + expect(format('0.0000', 1)).toBe('1.0000'); + expect(format('0.0000', -1)).toBe('-1.0000'); + expect(format('0.0000', 0)).toBe('0.0000'); + expect(format('0.0000', 'text')).toBe('text'); }); -test('Oddity: hh:mm AM/PM', t => { - t.format('hh:mm AM/PM', 0.7, '04:48 PM'); - t.end(); +test('Oddity: hh:mm AM/PM', () => { + expect(format('hh:mm AM/PM', 0.7)).toBe('04:48 PM'); }); -test('Oddity: hhh:mm AM/PM', t => { - t.format('hhh:mm AM/PM', 0.7, '04:48 PM'); - t.end(); +test('Oddity: hhh:mm AM/PM', () => { + expect(format('hhh:mm AM/PM', 0.7)).toBe('04:48 PM'); }); -test('Oddity: hhh:mmm:sss', t => { - t.format('hhh:mmm:sss', 0.7, '16:Jan:00'); - t.end(); +test('Oddity: hhh:mmm:sss', () => { + expect(format('hhh:mmm:sss', 0.7)).toBe('16:Jan:00'); }); -test('Oddity: hh:mmm:sss', t => { - t.format('hhh:mmm:sss', 0.7, '16:Jan:00'); - t.end(); +test('Oddity: hh:mmm:sss', () => { + expect(format('hhh:mmm:sss', 0.7)).toBe('16:Jan:00'); }); -test('Oddity: hh:mm:sss', t => { - t.format('hh:mm:sss', 0.7, '16:48:00'); - t.end(); +test('Oddity: hh:mm:sss', () => { + expect(format('hh:mm:sss', 0.7)).toBe('16:48:00'); }); -test('Oddity: hh:mm:ss.000', t => { - t.format('hh:mm:ss.000', 0.7, '16:48:00.000'); - t.format('hh:mm:ss.000', 0.70707, '16:58:10.848'); - t.end(); +test('Oddity: hh:mm:ss.000', () => { + expect(format('hh:mm:ss.000', 0.7)).toBe('16:48:00.000'); + expect(format('hh:mm:ss.000', 0.70707)).toBe('16:58:10.848'); }); -test('Oddity: hh.000', t => { - t.format('hh.000', 0.70707, '16.848'); - t.end(); +test('Oddity: hh.000', () => { + expect(format('hh.000', 0.70707)).toBe('16.848'); }); -test('Oddity: hh .00', t => { - t.format('hh .00', 0.70707, '16 .85'); - t.end(); +test('Oddity: hh .00', () => { + expect(format('hh .00', 0.70707)).toBe('16 .85'); }); -test('Oddity: hh .0', t => { - t.format('hh .0', 0.70707, '16 .8'); - t.end(); +test('Oddity: hh .0', () => { + expect(format('hh .0', 0.70707)).toBe('16 .8'); }); -test('Oddity: hh .00 .000', t => { - t.format('hh .00 .000', 0.70707, '16 .84 .848'); - t.end(); +test('Oddity: hh .00 .000', () => { + expect(format('hh .00 .000', 0.70707)).toBe('16 .84 .848'); }); -test('Oddity: [hhh]', t => { - t.format('[hhh]', 1, '024'); - t.format('[hhh]', -1, '-024'); - t.format('[hhh]', 0, '000'); - t.format('[hhh]', 'text', 'text'); - t.end(); +test('Oddity: [hhh]', () => { + expect(format('[hhh]', 1)).toBe('024'); + expect(format('[hhh]', -1)).toBe('-024'); + expect(format('[hhh]', 0)).toBe('000'); + expect(format('[hhh]', 'text')).toBe('text'); }); -test('Oddity: [', t => { - t.throws(() => format('['), '['); - t.end(); +test('Oddity: [', () => { + expect(() => format('['), '[').toThrow(); }); -test('Oddity: A/P', t => { - t.format('A/P', 0.7, 'P'); - t.end(); +test('Oddity: A/P', () => { + expect(format('A/P', 0.7)).toBe('P'); }); -test('Oddity: e', t => { - t.format('e', 0.7, '1900'); - t.end(); +test('Oddity: e', () => { + expect(format('e', 0.7)).toBe('1900'); }); -test('Oddity: 123', t => { - t.format('123', 0.7, '123'); - t.format('123', 0, '123'); - t.format('123', 'text', 'text'); - t.end(); +test('Oddity: 123', () => { + expect(format('123', 0.7)).toBe('123'); + expect(format('123', 0)).toBe('123'); + expect(format('123', 'text')).toBe('text'); }); -test('Oddity: 0.##', t => { - t.format('0.##', 1, '1.'); - t.format('0.##', -1, '-1.'); - t.format('0.##', 0, '0.'); - t.format('0.##', 1.1, '1.1'); - t.format('0.##', -1.2, '-1.2'); - t.format('0.##', 1000000000000.01, '1000000000000.01'); - t.format('0.##', -1000.01, '-1000.01'); - t.format('0.##', 0.1, '0.1'); - t.format('0.##', 1.007, '1.01'); - t.format('0.##', -1.008, '-1.01'); - t.end(); +test('Oddity: 0.##', () => { + expect(format('0.##', 1)).toBe('1.'); + expect(format('0.##', -1)).toBe('-1.'); + expect(format('0.##', 0)).toBe('0.'); + expect(format('0.##', 1.1)).toBe('1.1'); + expect(format('0.##', -1.2)).toBe('-1.2'); + expect(format('0.##', 1000000000000.01)).toBe('1000000000000.01'); + expect(format('0.##', -1000.01)).toBe('-1000.01'); + expect(format('0.##', 0.1)).toBe('0.1'); + expect(format('0.##', 1.007)).toBe('1.01'); + expect(format('0.##', -1.008)).toBe('-1.01'); }); -test('Oddity: ** #,###,#00,000.00,**', t => { - t.format('** #,###,#00,000.00,**', 1.2345, ' 00,000.00'); - t.format('** #,###,#00,000.00,**', 12.345, ' 00,000.01'); - t.format('** #,###,#00,000.00,**', 123.45, ' 00,000.12'); - t.format('** #,###,#00,000.00,**', 1234.56, ' 00,001.23'); - t.format('** #,###,#00,000.00,**', 12345.67, ' 00,012.35'); - t.format('** #,###,#00,000.00,**', 123456.78, ' 00,123.46'); - t.format('** #,###,#00,000.00,**', 1234567.89, ' 01,234.57'); - t.format('** #,###,#00,000.00,**', 12345681.9, ' 12,345.68'); - t.format('** #,###,#00,000.00,**', 123456822, ' 123,456.82'); - t.format('** #,###,#00,000.00,**', 1234568223, ' 1,234,568.22'); - t.format('** #,###,#00,000.00,**', 12345682233, ' 12,345,682.23'); - t.format('** #,###,#00,000.00,**', 123456822333, ' 123,456,822.33'); - t.format('** #,###,#00,000.00,**', 1234568223333, ' 1,234,568,223.33'); - t.format('** #,###,#00,000.00,**', 12345682233333, ' 12,345,682,233.33'); - t.format('** #,###,#00,000.00,**', 123456822333333, ' 123,456,822,333.33'); - t.format('** #,###,#00,000.00,**', 1234568223333330, ' 1,234,568,223,333.33'); - t.format('** #,###,#00,000.00,**', 12345682233333300, ' 12,345,682,233,333.30'); - t.format('** #,###,#00,000.00,**', 123456822333333000, ' 123,456,822,333,333.00'); - t.format('** #,###,#00,000.00,**', 1234568223333330000, ' 1,234,568,223,333,330.00'); - t.format('** #,###,#00,000.00,**', 12345682233333300000, ' 12,345,682,233,333,300.00'); - t.format('** #,###,#00,000.00,**', 123456822333333000000, ' 123,456,822,333,333,000.00'); - t.format('** #,###,#00,000.00,**', 1.23456822333333e+21, ' 1,234,568,223,333,330,000.00'); - t.end(); +test('Oddity: ** #,###,#00,000.00,**', () => { + expect(format('** #,###,#00,000.00,**', 1.2345)).toBe(' 00,000.00'); + expect(format('** #,###,#00,000.00,**', 12.345)).toBe(' 00,000.01'); + expect(format('** #,###,#00,000.00,**', 123.45)).toBe(' 00,000.12'); + expect(format('** #,###,#00,000.00,**', 1234.56)).toBe(' 00,001.23'); + expect(format('** #,###,#00,000.00,**', 12345.67)).toBe(' 00,012.35'); + expect(format('** #,###,#00,000.00,**', 123456.78)).toBe(' 00,123.46'); + expect(format('** #,###,#00,000.00,**', 1234567.89)).toBe(' 01,234.57'); + expect(format('** #,###,#00,000.00,**', 12345681.9)).toBe(' 12,345.68'); + expect(format('** #,###,#00,000.00,**', 123456822)).toBe(' 123,456.82'); + expect(format('** #,###,#00,000.00,**', 1234568223)).toBe(' 1,234,568.22'); + expect(format('** #,###,#00,000.00,**', 12345682233)).toBe(' 12,345,682.23'); + expect(format('** #,###,#00,000.00,**', 123456822333)).toBe(' 123,456,822.33'); + expect(format('** #,###,#00,000.00,**', 1234568223333)).toBe(' 1,234,568,223.33'); + expect(format('** #,###,#00,000.00,**', 12345682233333)).toBe(' 12,345,682,233.33'); + expect(format('** #,###,#00,000.00,**', 123456822333333)).toBe(' 123,456,822,333.33'); + expect(format('** #,###,#00,000.00,**', 1234568223333330)).toBe(' 1,234,568,223,333.33'); + expect(format('** #,###,#00,000.00,**', 12345682233333300)).toBe(' 12,345,682,233,333.30'); + expect(format('** #,###,#00,000.00,**', 123456822333333000)).toBe(' 123,456,822,333,333.00'); + expect(format('** #,###,#00,000.00,**', 1234568223333330000)).toBe(' 1,234,568,223,333,330.00'); + expect(format('** #,###,#00,000.00,**', 12345682233333300000)).toBe(' 12,345,682,233,333,300.00'); + expect(format('** #,###,#00,000.00,**', 123456822333333000000)).toBe(' 123,456,822,333,333,000.00'); + expect(format('** #,###,#00,000.00,**', 1.23456822333333e+21)).toBe(' 1,234,568,223,333,330,000.00'); }); -test('Oddity: 00,000.00,', t => { - t.format('00,000.00,', 12345, '00,012.35'); - t.end(); +test('Oddity: 00,000.00,', () => { + expect(format('00,000.00,', 12345)).toBe('00,012.35'); }); -test('Oddity: 00,000.00', t => { - t.format('00,000.00', 12345, '12,345.00'); - t.end(); +test('Oddity: 00,000.00', () => { + expect(format('00,000.00', 12345)).toBe('12,345.00'); }); -test('Oddity: ##0.0E+0', t => { - t.format('##0.0E+0', 1, '1.0E+0'); - t.format('##0.0E+0', 12, '12.0E+0'); - t.format('##0.0E+0', 123, '123.0E+0'); - t.format('##0.0E+0', 1234, '1.2E+3'); - t.format('##0.0E+0', 12345, '12.3E+3'); - t.format('##0.0E+0', 123456, '123.5E+3'); - t.format('##0.0E+0', 1234567, '1.2E+6'); - t.format('##0.0E+0', 12345678, '12.3E+6'); - t.format('##0.0E+0', 123456789, '123.5E+6'); - t.end(); -}); - -test.skip('Oddity: 000#0#0#0##00##00##0#########', t => { +test('Oddity: ##0.0E+0', () => { + expect(format('##0.0E+0', 1)).toBe('1.0E+0'); + expect(format('##0.0E+0', 12)).toBe('12.0E+0'); + expect(format('##0.0E+0', 123)).toBe('123.0E+0'); + expect(format('##0.0E+0', 1234)).toBe('1.2E+3'); + expect(format('##0.0E+0', 12345)).toBe('12.3E+3'); + expect(format('##0.0E+0', 123456)).toBe('123.5E+3'); + expect(format('##0.0E+0', 1234567)).toBe('1.2E+6'); + expect(format('##0.0E+0', 12345678)).toBe('12.3E+6'); + expect(format('##0.0E+0', 123456789)).toBe('123.5E+6'); +}); + +test.skip('Oddity: 000#0#0#0##00##00##0#########', () => { // 000#0#0#0##00##00##0######### // 000 0 0 0 00 00 0 12345 (12345) // 000 0 0 0 00 00 0 1 (1) - t.format('000#0#0#0##00##00##0#########', 12345, '0000000000012345'); - t.end(); + expect(format('000#0#0#0##00##00##0#########', 12345)).toBe('0000000000012345'); }); -test.skip('Oddity: 0#######0.##0##0######00######0', t => { - t.format('0#######0.##0##0######00######0', 12.3456789, '012.3456789000'); - t.format('0#######0.##0##0######00######0', 123456789, '123456789.00000'); - t.end(); +test.skip('Oddity: 0#######0.##0##0######00######0', () => { + expect(format('0#######0.##0##0######00######0', 12.3456789)).toBe('012.3456789000'); + expect(format('0#######0.##0##0######00######0', 123456789)).toBe('123456789.00000'); }); -test('Oddity: ###\\###\\##0.00', t => { - t.format('###\\###\\##0.00', 0.00101, '##0.00'); - t.format('###\\###\\##0.00', 0.0101, '##0.01'); - t.format('###\\###\\##0.00', 0.101, '##0.10'); - t.format('###\\###\\##0.00', 1.01, '##1.01'); - t.format('###\\###\\##0.00', 10.1, '##10.10'); - t.format('###\\###\\##0.00', 101, '#1#01.00'); - t.format('###\\###\\##0.00', 1010, '#10#10.00'); - t.format('###\\###\\##0.00', 10100, '1#01#00.00'); - t.format('###\\###\\##0.00', 101000, '10#10#00.00'); - t.format('###\\###\\##0.00', 1010000, '101#00#00.00'); - t.format('###\\###\\##0.00', 10100000, '1010#00#00.00'); - t.format('###\\###\\##0.00', 101000000, '10100#00#00.00'); - t.format('###\\###\\##0.00', 123456789.01, '12345#67#89.01'); - t.end(); +test('Oddity: ###\\###\\##0.00', () => { + expect(format('###\\###\\##0.00', 0.00101)).toBe('##0.00'); + expect(format('###\\###\\##0.00', 0.0101)).toBe('##0.01'); + expect(format('###\\###\\##0.00', 0.101)).toBe('##0.10'); + expect(format('###\\###\\##0.00', 1.01)).toBe('##1.01'); + expect(format('###\\###\\##0.00', 10.1)).toBe('##10.10'); + expect(format('###\\###\\##0.00', 101)).toBe('#1#01.00'); + expect(format('###\\###\\##0.00', 1010)).toBe('#10#10.00'); + expect(format('###\\###\\##0.00', 10100)).toBe('1#01#00.00'); + expect(format('###\\###\\##0.00', 101000)).toBe('10#10#00.00'); + expect(format('###\\###\\##0.00', 1010000)).toBe('101#00#00.00'); + expect(format('###\\###\\##0.00', 10100000)).toBe('1010#00#00.00'); + expect(format('###\\###\\##0.00', 101000000)).toBe('10100#00#00.00'); + expect(format('###\\###\\##0.00', 123456789.01)).toBe('12345#67#89.01'); }); -test('Oddity: ###\\\\###\\\\##\\0.00', t => { - t.format('###\\\\###\\\\##\\0.00', 0.00101, '\\\\0.00'); - t.format('###\\\\###\\\\##\\0.00', 0.0101, '\\\\0.01'); - t.format('###\\\\###\\\\##\\0.00', 0.101, '\\\\0.10'); - t.format('###\\\\###\\\\##\\0.00', 1.01, '\\\\10.01'); - t.format('###\\\\###\\\\##\\0.00', 10.1, '\\\\100.10'); - t.format('###\\\\###\\\\##\\0.00', 101, '\\1\\010.00'); - t.format('###\\\\###\\\\##\\0.00', 1010, '\\10\\100.00'); - t.format('###\\\\###\\\\##\\0.00', 10100, '\\101\\000.00'); - t.format('###\\\\###\\\\##\\0.00', 101000, '1\\010\\000.00'); - t.format('###\\\\###\\\\##\\0.00', 1010000, '10\\100\\000.00'); - t.format('###\\\\###\\\\##\\0.00', 10100000, '101\\000\\000.00'); - t.format('###\\\\###\\\\##\\0.00', 101000000, '1010\\000\\000.00'); - t.format('###\\\\###\\\\##\\0.00', 123456789.01, '1234\\567\\890.01'); - t.end(); +test('Oddity: ###\\\\###\\\\##\\0.00', () => { + expect(format('###\\\\###\\\\##\\0.00', 0.00101)).toBe('\\\\0.00'); + expect(format('###\\\\###\\\\##\\0.00', 0.0101)).toBe('\\\\0.01'); + expect(format('###\\\\###\\\\##\\0.00', 0.101)).toBe('\\\\0.10'); + expect(format('###\\\\###\\\\##\\0.00', 1.01)).toBe('\\\\10.01'); + expect(format('###\\\\###\\\\##\\0.00', 10.1)).toBe('\\\\100.10'); + expect(format('###\\\\###\\\\##\\0.00', 101)).toBe('\\1\\010.00'); + expect(format('###\\\\###\\\\##\\0.00', 1010)).toBe('\\10\\100.00'); + expect(format('###\\\\###\\\\##\\0.00', 10100)).toBe('\\101\\000.00'); + expect(format('###\\\\###\\\\##\\0.00', 101000)).toBe('1\\010\\000.00'); + expect(format('###\\\\###\\\\##\\0.00', 1010000)).toBe('10\\100\\000.00'); + expect(format('###\\\\###\\\\##\\0.00', 10100000)).toBe('101\\000\\000.00'); + expect(format('###\\\\###\\\\##\\0.00', 101000000)).toBe('1010\\000\\000.00'); + expect(format('###\\\\###\\\\##\\0.00', 123456789.01)).toBe('1234\\567\\890.01'); }); -test('Oddity: 0.0#', t => { - t.format('0.0#', 12345, '12345.0'); - t.format('0.0#', 1234.5, '1234.5'); - t.format('0.0#', 123.45, '123.45'); - t.format('0.0#', 12.345, '12.35'); - t.format('0.0#', 1.2345, '1.23'); - t.format('0.0#', 0.12345, '0.12'); - t.format('0.0#', 0.012345, '0.01'); - t.format('0.0#', 0.0012345, '0.0'); - t.format('0.0#', 0.00012345, '0.0'); - t.format('0.0#', 15.04, '15.04'); - t.format('0.0#', 15.06, '15.06'); - t.end(); +test('Oddity: 0.0#', () => { + expect(format('0.0#', 12345)).toBe('12345.0'); + expect(format('0.0#', 1234.5)).toBe('1234.5'); + expect(format('0.0#', 123.45)).toBe('123.45'); + expect(format('0.0#', 12.345)).toBe('12.35'); + expect(format('0.0#', 1.2345)).toBe('1.23'); + expect(format('0.0#', 0.12345)).toBe('0.12'); + expect(format('0.0#', 0.012345)).toBe('0.01'); + expect(format('0.0#', 0.0012345)).toBe('0.0'); + expect(format('0.0#', 0.00012345)).toBe('0.0'); + expect(format('0.0#', 15.04)).toBe('15.04'); + expect(format('0.0#', 15.06)).toBe('15.06'); }); -test('Oddity: ###\\\\###\\\\##\\0', t => { - t.format('###\\\\###\\\\##\\0', 12345.6789, '\\123\\460'); - t.end(); +test('Oddity: ###\\\\###\\\\##\\0', () => { + expect(format('###\\\\###\\\\##\\0', 12345.6789)).toBe('\\123\\460'); }); -test('Oddity: 00000-0000', t => { - t.format('00000-0000', 941051630, '94105-1630'); - t.format('00000-0000', 12345.6789, '00001-2346'); - t.end(); +test('Oddity: 00000-0000', () => { + expect(format('00000-0000', 941051630)).toBe('94105-1630'); + expect(format('00000-0000', 12345.6789)).toBe('00001-2346'); }); -test('Oddity: 000-00-0000', t => { - t.format('000-00-0000', 123456789, '123-45-6789'); - t.end(); +test('Oddity: 000-00-0000', () => { + expect(format('000-00-0000', 123456789)).toBe('123-45-6789'); }); -test('Oddity: 00000\\-0000', t => { - t.format('00000\\-0000', 941051630, '94105-1630'); - t.end(); +test('Oddity: 00000\\-0000', () => { + expect(format('00000\\-0000', 941051630)).toBe('94105-1630'); }); -test('Oddity: 000\\-00\\-0000', t => { - t.format('000\\-00\\-0000', 123456789, '123-45-6789'); - t.end(); +test('Oddity: 000\\-00\\-0000', () => { + expect(format('000\\-00\\-0000', 123456789)).toBe('123-45-6789'); }); -test('Oddity: ??/??', t => { - t.format('??/??', 12.3456789, '1000/81'); - t.format('??/??', 0.00001, ' 0/1 '); - t.end(); +test('Oddity: ??/??', () => { + expect(format('??/??', 12.3456789)).toBe('1000/81'); + expect(format('??/??', 0.00001)).toBe(' 0/1 '); }); -test('Oddity: # ??/??', t => { - t.format('# ??/??', 12.3456789, '12 28/81'); - t.end(); +test('Oddity: # ??/??', () => { + expect(format('# ??/??', 12.3456789)).toBe('12 28/81'); }); -test('Oddity: #??/??', t => { - t.format('#??/??', 12.3456789, '1000/81'); - t.end(); +test('Oddity: #??/??', () => { + expect(format('#??/??', 12.3456789)).toBe('1000/81'); }); -test('Oddity: #0#00??/??', t => { - t.format('#0#00??/??', 12.3456789, '01000/81'); - t.end(); +test('Oddity: #0#00??/??', () => { + expect(format('#0#00??/??', 12.3456789)).toBe('01000/81'); }); -test('Oddity: [<=9999999]###-####;(###) ###-####', t => { - t.format('[<=9999999]###-####;(###) ###-####', 8675309, '867-5309'); - t.format('[<=9999999]###-####;(###) ###-####', 2813308004, '(281) 330-8004'); - t.format('[<=9999999]###-####;(###) ###-####', 2018675309, '(201) 867-5309'); - t.end(); +test('Oddity: [<=9999999]###-####;(###) ###-####', () => { + expect(format('[<=9999999]###-####;(###) ###-####', 8675309)).toBe('867-5309'); + expect(format('[<=9999999]###-####;(###) ###-####', 2813308004)).toBe('(281) 330-8004'); + expect(format('[<=9999999]###-####;(###) ###-####', 2018675309)).toBe('(201) 867-5309'); }); -test('Oddity: [<=9999999]###\\-####;(###) ###\\-####', t => { - t.format('[<=9999999]###\\-####;(###) ###\\-####', 8675309, '867-5309'); - t.format('[<=9999999]###\\-####;(###) ###\\-####', 2813308004, '(281) 330-8004'); - t.end(); +test('Oddity: [<=9999999]###\\-####;(###) ###\\-####', () => { + expect(format('[<=9999999]###\\-####;(###) ###\\-####', 8675309)).toBe('867-5309'); + expect(format('[<=9999999]###\\-####;(###) ###\\-####', 2813308004)).toBe('(281) 330-8004'); }); -test('Oddity: [Red][<-25]General;[Blue][>25]General;[Green]General;[Yellow]General', t => { +test('Oddity: [Red][<-25]General;[Blue][>25]General;[Green]General;[Yellow]General', () => { const z = '[Red][<-25]General;[Blue][>25]General;[Green]General;[Yellow]General'; - t.format(z, 50, '50'); - t.format(z, 26, '26'); - t.format(z, 25, '25'); - t.format(z, 1, '1'); - t.format(z, 0, '0'); - t.format(z, -1, '-1'); - t.format(z, -25, '-25'); - t.format(z, -26, '26'); - t.format(z, -50.1, '50.1'); - t.format(z, 'foo', 'foo'); - t.format(z, 'bar', 'bar'); - t.end(); -}); - -test('Oddity: [Red][<=-25]General;[Blue][>=25]General;[Green]General;[Yellow]General', t => { + expect(format(z, 50)).toBe('50'); + expect(format(z, 26)).toBe('26'); + expect(format(z, 25)).toBe('25'); + expect(format(z, 1)).toBe('1'); + expect(format(z, 0)).toBe('0'); + expect(format(z, -1)).toBe('-1'); + expect(format(z, -25)).toBe('-25'); + expect(format(z, -26)).toBe('26'); + expect(format(z, -50.1)).toBe('50.1'); + expect(format(z, 'foo')).toBe('foo'); + expect(format(z, 'bar')).toBe('bar'); +}); + +test('Oddity: [Red][<=-25]General;[Blue][>=25]General;[Green]General;[Yellow]General', () => { const z = '[Red][<=-25]General;[Blue][>=25]General;[Green]General;[Yellow]General'; - t.format(z, 50, '50'); - t.format(z, 26, '26'); - t.format(z, 25, '25'); - t.format(z, 1, '1'); - t.format(z, 0, '0'); - t.format(z, -1, '-1'); - t.format(z, -25, '25'); - t.format(z, -26.1, '26.1'); - t.format(z, -50, '50'); - t.format(z, 'foo', 'foo'); - t.format(z, 'bar', 'bar'); - t.end(); -}); - -test("Oddity: [Red]General ;[Blue]General\\ ;[Green]Generalp;[Yellow]General'", t => { + expect(format(z, 50)).toBe('50'); + expect(format(z, 26)).toBe('26'); + expect(format(z, 25)).toBe('25'); + expect(format(z, 1)).toBe('1'); + expect(format(z, 0)).toBe('0'); + expect(format(z, -1)).toBe('-1'); + expect(format(z, -25)).toBe('25'); + expect(format(z, -26.1)).toBe('26.1'); + expect(format(z, -50)).toBe('50'); + expect(format(z, 'foo')).toBe('foo'); + expect(format(z, 'bar')).toBe('bar'); +}); + +test("Oddity: [Red]General ;[Blue]General\\ ;[Green]Generalp;[Yellow]General'", () => { const z = "[Red]General ;[Blue]General\\ ;[Green]Generalp;[Yellow]General'"; - t.format(z, 50, '50 '); - t.format(z, 0, '0p'); - t.format(z, -25, '25 '); - t.format(z, 'foo', 'foo\''); - t.end(); + expect(format(z, 50)).toBe('50 '); + expect(format(z, 0)).toBe('0p'); + expect(format(z, -25)).toBe('25 '); + expect(format(z, 'foo')).toBe('foo\''); }); -test('Oddity: [Red][=50]General;[Blue]000', t => { - t.format('[Red][=50]General;[Blue]000', 50, '50'); - t.format('[Red][=50]General;[Blue]000', 51, '051'); - t.format('[Red][=50]General;[Blue]000', 49, '049'); - t.end(); +test('Oddity: [Red][=50]General;[Blue]000', () => { + expect(format('[Red][=50]General;[Blue]000', 50)).toBe('50'); + expect(format('[Red][=50]General;[Blue]000', 51)).toBe('051'); + expect(format('[Red][=50]General;[Blue]000', 49)).toBe('049'); }); -test('Oddity: [Red][<>50]General;[Blue]000', t => { - t.format('[Red][<>50]General;[Blue]000', 50, '050'); - t.format('[Red][<>50]General;[Blue]000', 51, '51'); - t.format('[Red][<>50]General;[Blue]000', 49, '49'); - t.end(); +test('Oddity: [Red][<>50]General;[Blue]000', () => { + expect(format('[Red][<>50]General;[Blue]000', 50)).toBe('050'); + expect(format('[Red][<>50]General;[Blue]000', 51)).toBe('51'); + expect(format('[Red][<>50]General;[Blue]000', 49)).toBe('49'); }); -test('Oddity: b', t => { - t.format('b', 1, '43'); - t.format('b', 1000, '45'); - t.format('b', 10000, '70'); - t.end(); +test('Oddity: b', () => { + expect(format('b', 1)).toBe('43'); + expect(format('b', 1000)).toBe('45'); + expect(format('b', 10000)).toBe('70'); }); -test('Oddity: B2yyyy-mm-dd', t => { - t.format('B2yyyy-mm-dd', 0, '1317-08-29'); - t.format('B2yyyy-mm-dd', 59, '1317-10-28'); - t.formatThrows('B2yyyy-mm-dd', 60); - t.format('B2yyyy-mm-dd', 61, '1317-10-29'); - t.format('B2yyyy-mm-dd', 1000, '1320-06-23'); - t.format('B2yyyy-mm-dd', 10000, '1345-11-17'); - t.end(); +test('Oddity: B2yyyy-mm-dd', () => { + expect(format('B2yyyy-mm-dd', 0)).toBe('1317-08-29'); + expect(format('B2yyyy-mm-dd', 59)).toBe('1317-10-28'); + expect(() => format('B2yyyy-mm-dd', 60)).toThrow(); + expect(format('B2yyyy-mm-dd', 61)).toBe('1317-10-29'); + expect(format('B2yyyy-mm-dd', 1000)).toBe('1320-06-23'); + expect(format('B2yyyy-mm-dd', 10000)).toBe('1345-11-17'); }); -test('Oddity: ☃', t => { - t.format('☃', 0, '☃'); - t.format('☃', 1, '☃'); - t.format('☃', -1, '-☃'); - t.format('☃', 'foo', 'foo'); - t.end(); +test('Oddity: ☃', () => { + expect(format('☃', 0)).toBe('☃'); + expect(format('☃', 1)).toBe('☃'); + expect(format('☃', -1)).toBe('-☃'); + expect(format('☃', 'foo')).toBe('foo'); }); -test.skip('Oddity: #0#######', t => { - t.format('#0#######', 12345, '012345'); - t.format('#0#######', 12345.4321, '012345'); - t.format('#0#######', 12345.6789, '012346'); - t.end(); +test.skip('Oddity: #0#######', () => { + expect(format('#0#######', 12345)).toBe('012345'); + expect(format('#0#######', 12345.4321)).toBe('012345'); + expect(format('#0#######', 12345.6789)).toBe('012346'); }); -test.skip('Oddity: ##,##', t => { - t.format('##,##', 0, ''); - t.format('##,##', 1, '1'); - t.format('##,##', 1234, '1,234'); - t.format('##,##', 12345, '12,345'); - t.format('##,##', 1234567, '1,234,567'); - t.end(); +test.skip('Oddity: ##,##', () => { + expect(format('##,##', 0)).toBe(''); + expect(format('##,##', 1)).toBe('1'); + expect(format('##,##', 1234)).toBe('1,234'); + expect(format('##,##', 12345)).toBe('12,345'); + expect(format('##,##', 1234567)).toBe('1,234,567'); }); -test('Oddity: 0', t => { - t.format('0', 12345, '12345'); - t.format('0', 4294967296.5, '4294967297'); - t.end(); +test('Oddity: 0', () => { + expect(format('0', 12345)).toBe('12345'); + expect(format('0', 4294967296.5)).toBe('4294967297'); }); -test('Oddity: "Rs."#,##0.00', t => { - t.format('"Rs."#,##0.00', -51968287, '-Rs.51,968,287.00'); - t.format('"Rs."#,##0.00', 2000000, 'Rs.2,000,000.00'); - t.end(); +test('Oddity: "Rs."#,##0.00', () => { + expect(format('"Rs."#,##0.00', -51968287)).toBe('-Rs.51,968,287.00'); + expect(format('"Rs."#,##0.00', 2000000)).toBe('Rs.2,000,000.00'); }); -test('Oddity: $#.00', t => { - t.format('$#.00', 3.14159, '$3.14'); - t.format('$#.00', -3.14159, '-$3.14'); - t.end(); +test('Oddity: $#.00', () => { + expect(format('$#.00', 3.14159)).toBe('$3.14'); + expect(format('$#.00', -3.14159)).toBe('-$3.14'); }); -test.skip('Oddity: "This is a ".00"test"000', t => { - t.format('"This is a ".00"test"000', -3.14159, '-This is a 3.14test159'); - t.format('"This is a ".00"test"000', 3.14159, 'This is a 3.14test159'); - t.end(); +test.skip('Oddity: "This is a ".00"test"000', () => { + expect(format('"This is a ".00"test"000', -3.14159)).toBe('-This is a 3.14test159'); + expect(format('"This is a ".00"test"000', 3.14159)).toBe('This is a 3.14test159'); }); -test('Oddity: [$INR]\\ #,##0.00', t => { - t.format('[$INR]\\ #,##0.00', 3.14159, 'INR 3.14'); - t.format('[$INR]\\ #,##0.00', -3.14159, '-INR 3.14'); - t.end(); +test('Oddity: [$INR]\\ #,##0.00', () => { + expect(format('[$INR]\\ #,##0.00', 3.14159)).toBe('INR 3.14'); + expect(format('[$INR]\\ #,##0.00', -3.14159)).toBe('-INR 3.14'); }); -test('Oddity: [$₹-4009]\\ #,##0.00', t => { - t.format('[$₹-4009]\\ #,##0.00', 3.14159, '₹ 3.14'); - t.format('[$₹-4009]\\ #,##0.00', -3.14159, '-₹ 3.14'); - t.end(); +test('Oddity: [$₹-4009]\\ #,##0.00', () => { + expect(format('[$₹-4009]\\ #,##0.00', 3.14159)).toBe('₹ 3.14'); + expect(format('[$₹-4009]\\ #,##0.00', -3.14159)).toBe('-₹ 3.14'); }); -test('Oddity: [$£-809]#,##0.0000;\\-[$£-809]#,##0.0000', t => { - t.format('[$£-809]#,##0.0000;\\-[$£-809]#,##0.0000', 3.14159, '£3.1416'); - t.format('[$£-809]#,##0.0000;\\-[$£-809]#,##0.0000', -3.14159, '-£3.1416'); - t.end(); +test('Oddity: [$£-809]#,##0.0000;\\-[$£-809]#,##0.0000', () => { + expect(format('[$£-809]#,##0.0000;\\-[$£-809]#,##0.0000', 3.14159)).toBe('£3.1416'); + expect(format('[$£-809]#,##0.0000;\\-[$£-809]#,##0.0000', -3.14159)).toBe('-£3.1416'); }); -test('Oddity: "-"0.00', t => { - t.format('"-"0.00', 3.14159, '-3.14'); - t.format('"-"0.00', -3.14159, '--3.14'); - t.end(); +test('Oddity: "-"0.00', () => { + expect(format('"-"0.00', 3.14159)).toBe('-3.14'); + expect(format('"-"0.00', -3.14159)).toBe('--3.14'); }); -test('Oddity: [$-409]mmm\\-yy', t => { - t.format('[$-409]mmm\\-yy', 12345, 'Oct-33'); - t.end(); +test('Oddity: [$-409]mmm\\-yy', () => { + expect(format('[$-409]mmm\\-yy', 12345)).toBe('Oct-33'); }); -test('Oddity: \\,##.??;\\(#,###.??\\);0', t => { - t.format('\\,##.??;\\(#,###.??\\);0', 15, ',15. '); - t.format('\\,##.??;\\(#,###.??\\);0', 14.3453453, ',14.35'); - t.format('\\,##.??;\\(#,###.??\\);0', 12.1, ',12.1 '); - t.format('\\,##.??;\\(#,###.??\\);0', 0, '0'); - t.format('\\,##.??;\\(#,###.??\\);0', -15, '(15. )'); - t.format('\\,##.??;\\(#,###.??\\);0', -14.3453453, '(14.35)'); - t.format('\\,##.??;\\(#,###.??\\);0', -12.1, '(12.1 )'); - t.format('\\,##.??;\\(#,###.??\\);0', 1, ',1. '); - t.end(); +test('Oddity: \\,##.??;\\(#,###.??\\);0', () => { + expect(format('\\,##.??;\\(#,###.??\\);0', 15)).toBe(',15. '); + expect(format('\\,##.??;\\(#,###.??\\);0', 14.3453453)).toBe(',14.35'); + expect(format('\\,##.??;\\(#,###.??\\);0', 12.1)).toBe(',12.1 '); + expect(format('\\,##.??;\\(#,###.??\\);0', 0)).toBe('0'); + expect(format('\\,##.??;\\(#,###.??\\);0', -15)).toBe('(15. )'); + expect(format('\\,##.??;\\(#,###.??\\);0', -14.3453453)).toBe('(14.35)'); + expect(format('\\,##.??;\\(#,###.??\\);0', -12.1)).toBe('(12.1 )'); + expect(format('\\,##.??;\\(#,###.??\\);0', 1)).toBe(',1. '); }); -test('Oddity: "£"#.####;-"£"#.####', t => { - t.format('"£"#.####;-"£"#.####', 3.141592654, '£3.1416'); - t.format('"£"#.####;-"£"#.####', -3.141592654, '-£3.1416'); - t.end(); +test('Oddity: "£"#.####;-"£"#.####', () => { + expect(format('"£"#.####;-"£"#.####', 3.141592654)).toBe('£3.1416'); + expect(format('"£"#.####;-"£"#.####', -3.141592654)).toBe('-£3.1416'); }); -test('Oddity: [h]:mm:ss;@', t => { - t.format('[h]:mm:ss;@', 2.9999999999999996, '72:00:00'); - t.end(); +test('Oddity: [h]:mm:ss;@', () => { + expect(format('[h]:mm:ss;@', 2.9999999999999996)).toBe('72:00:00'); }); -test('Oddity: hh:mm:ss AM/PM', t => { - t.format('hh:mm:ss AM/PM', 0.5, '12:00:00 PM'); - t.end(); +test('Oddity: hh:mm:ss AM/PM', () => { + expect(format('hh:mm:ss AM/PM', 0.5)).toBe('12:00:00 PM'); }); -test('Oddity: hh:mm:ss am/pm', t => { - t.format('hh:mm:ss am/pm', 0.5, '12:00:00 PM'); - t.end(); +test('Oddity: hh:mm:ss am/pm', () => { + expect(format('hh:mm:ss am/pm', 0.5)).toBe('12:00:00 PM'); }); -test('Oddity: hh:mm:ss AM/P', t => { - t.format('hh:mm:ss AM/P', 0.5, '12:00:00 A1/P'); - t.end(); +test('Oddity: hh:mm:ss AM/P', () => { + expect(format('hh:mm:ss AM/P', 0.5)).toBe('12:00:00 A1/P'); }); -test('Oddity: hh:mm:ss am/p', t => { - t.format('hh:mm:ss am/p', 0.5, '12:00:00 a1/p'); - t.end(); +test('Oddity: hh:mm:ss am/p', () => { + expect(format('hh:mm:ss am/p', 0.5)).toBe('12:00:00 a1/p'); }); -test('Oddity: "foo";"bar";"baz";"qux";"foobar"', t => { - t.throws(() => format('"foo";"bar";"baz";"qux";"foobar"'), '"foo";"bar";"baz";"qux";"foobar"'); - t.end(); +test('Oddity: "foo";"bar";"baz";"qux";"foobar"', () => { + expect(() => format('"foo";"bar";"baz";"qux";"foobar"'), '"foo";"bar";"baz";"qux";"foobar"').toThrow(); }); diff --git a/test/ssf-times.spec.ts b/test/ssf-times.spec.ts index af171bf..9ae8773 100644 --- a/test/ssf-times.spec.ts +++ b/test/ssf-times.spec.ts @@ -1,13 +1,13 @@ -import test from './utils.js'; +import { describe } from 'vitest'; +import { runTable } from './utils.ts'; // -- running the full table takes a while const FULL = false; -test('SSF table: tables/ssf-times.tsv', t => { - t.runTable( +describe('SSF table: tables/ssf-times.tsv', () => { + runTable( FULL ? 'tables/ssf-times-full.tsv' : 'tables/ssf-times.tsv' ); - t.end(); }); diff --git a/test/ssf-valid.spec.ts b/test/ssf-valid.spec.ts index 2eefa14..85afd8b 100644 --- a/test/ssf-valid.spec.ts +++ b/test/ssf-valid.spec.ts @@ -1,449 +1,454 @@ -import test from './utils.js'; +import { expect, test } from 'vitest'; +import { format } from '../lib/index.js'; -test('Validity tests', t => { - t.validFormat('" Excellent"', '" Excellent"'); - t.validFormat('" Fair"', '" Fair"'); - t.validFormat('" Good"', '" Good"'); - t.validFormat('" Poor"', '" Poor"'); - t.validFormat('" Very Good"', '" Very Good"'); - t.validFormat('"$"#,##0', '"$"#,##0'); - t.validFormat('"$"#,##0.00', '"$"#,##0.00'); - t.validFormat('"$"#,##0.00_);[Red]\\("$"#,##0.00\\)', '"$"#,##0.00_);[Red]\\("$"#,##0.00\\)'); - t.validFormat('"$"#,##0.00_);\\("$"#,##0.00\\)', '"$"#,##0.00_);\\("$"#,##0.00\\)'); - t.validFormat('"$"#,##0;[Red]\\-"$"#,##0', '"$"#,##0;[Red]\\-"$"#,##0'); - t.validFormat('"$"#,##0_);[Red]\\("$"#,##0\\)', '"$"#,##0_);[Red]\\("$"#,##0\\)'); - t.validFormat('"$"#,##0_);\\("$"#,##0\\)', '"$"#,##0_);\\("$"#,##0\\)'); - t.validFormat('"Haha!"\\ @\\ "Yeah!"', '"Haha!"\\ @\\ "Yeah!"'); - t.validFormat('"TRUE";"TRUE";"FALSE"', '"TRUE";"TRUE";"FALSE"'); - t.validFormat('"True";"True";"False";@', '"True";"True";"False";@'); - t.validFormat('"Years: "0', '"Years: "0'); - t.validFormat('"Yes";"Yes";"No";@', '"Yes";"Yes";"No";@'); - t.validFormat('"kl "hh:mm:ss;@', '"kl "hh:mm:ss;@'); - t.validFormat('"£"#,##0.00', '"£"#,##0.00'); - t.validFormat('"£"#,##0;[Red]\\-"£"#,##0', '"£"#,##0;[Red]\\-"£"#,##0'); - t.validFormat('"€"#,##0.00', '"€"#,##0.00'); - t.validFormat('"€"\\ #,##0.00_-', '"€"\\ #,##0.00_-'); - t.validFormat('"上午/下午 "hh"時"mm"分"ss"秒 "', '"上午/下午 "hh"時"mm"分"ss"秒 "'); - t.validFormat('"¥"#,##0.00;"¥"\\-#,##0.00', '"¥"#,##0.00;"¥"\\-#,##0.00'); - t.validFormat('#', '#'); - t.validFormat('# ?/?', '# ?/?'); - t.validFormat('# ??/??', '# ??/??'); - t.validFormat('#" "?/?', '#" "?/?'); - t.validFormat('#" "??/??', '#" "??/??'); - t.validFormat('#"abded"\\ ??/??', '#"abded"\\ ??/??'); - t.validFormat('###0.00;-###0.00', '###0.00;-###0.00'); - t.validFormat('###0;-###0', '###0;-###0'); - t.validFormat('##0.0E+0', '##0.0E+0'); - t.validFormat('#,##0', '#,##0'); - t.validFormat('#,##0 ;(#,##0)', '#,##0 ;(#,##0)'); - t.validFormat('#,##0 ;[Red](#,##0)', '#,##0 ;[Red](#,##0)'); - t.validFormat('#,##0"р.";[Red]\\-#,##0"р."', '#,##0"р.";[Red]\\-#,##0"р."'); - t.validFormat('#,##0.0', '#,##0.0'); - t.validFormat('#,##0.00', '#,##0.00'); - t.validFormat('#,##0.00 "�"', '#,##0.00 "�"'); - t.validFormat('#,##0.00 €;-#,##0.00 €', '#,##0.00 €;-#,##0.00 €'); - t.validFormat('#,##0.00"р.";[Red]\\-#,##0.00"р."', '#,##0.00"р.";[Red]\\-#,##0.00"р."'); - t.validFormat('#,##0.000', '#,##0.000'); - t.validFormat('#,##0.0000', '#,##0.0000'); - t.validFormat('#,##0.00000', '#,##0.00000'); - t.validFormat('#,##0.000000', '#,##0.000000'); - t.validFormat('#,##0.0000000', '#,##0.0000000'); - t.validFormat('#,##0.00000000', '#,##0.00000000'); - t.validFormat('#,##0.000000000', '#,##0.000000000'); - t.validFormat('#,##0.00000000;[Red]#,##0.00000000', '#,##0.00000000;[Red]#,##0.00000000'); - t.validFormat('#,##0.0000_ ', '#,##0.0000_ '); - t.validFormat('#,##0.000_ ', '#,##0.000_ '); - t.validFormat('#,##0.000_);\\(#,##0.000\\)', '#,##0.000_);\\(#,##0.000\\)'); - t.validFormat('#,##0.00;(#,##0.00)', '#,##0.00;(#,##0.00)'); - t.validFormat('#,##0.00;(#,##0.00);0.00', '#,##0.00;(#,##0.00);0.00'); - t.validFormat('#,##0.00;[Red](#,##0.00)', '#,##0.00;[Red](#,##0.00)'); - t.validFormat('#,##0.00;[Red]\\(#,##0.00\\)', '#,##0.00;[Red]\\(#,##0.00\\)'); - t.validFormat('#,##0.00;\\(#,##0.00\\)', '#,##0.00;\\(#,##0.00\\)'); - t.validFormat('#,##0.00[$₹-449]_);\\(#,##0.00[$₹-449]\\)', '#,##0.00[$₹-449]_);\\(#,##0.00[$₹-449]\\)'); - t.validFormat('#,##0.00\\ "р."', '#,##0.00\\ "р."'); - t.validFormat('#,##0.00\\ "р.";[Red]\\-#,##0.00\\ "р."', '#,##0.00\\ "р.";[Red]\\-#,##0.00\\ "р."'); - t.validFormat('#,##0.00\\ [$€-407]', '#,##0.00\\ [$€-407]'); - t.validFormat('#,##0.00\\ [$€-40C]', '#,##0.00\\ [$€-40C]'); - t.validFormat('#,##0.00_);\\(#,##0.00\\)', '#,##0.00_);\\(#,##0.00\\)'); - t.validFormat('#,##0.00_р_.;[Red]\\-#,##0.00_р_.', '#,##0.00_р_.;[Red]\\-#,##0.00_р_.'); - t.validFormat('#,##0.00_р_.;\\-#,##0.00_р_.', '#,##0.00_р_.;\\-#,##0.00_р_.'); - t.validFormat('#,##0.0;[Red]#,##0.0', '#,##0.0;[Red]#,##0.0'); - t.validFormat('#,##0.0_ ;\\-#,##0.0\\ ', '#,##0.0_ ;\\-#,##0.0\\ '); - t.validFormat('#,##0.0_);[Red]\\(#,##0.0\\)', '#,##0.0_);[Red]\\(#,##0.0\\)'); - t.validFormat('#,##0.0_);\\(#,##0.0\\)', '#,##0.0_);\\(#,##0.0\\)'); - t.validFormat('#,##0;\\-#,##0;0', '#,##0;\\-#,##0;0'); - t.validFormat('#,##0\\ "р.";[Red]\\-#,##0\\ "р."', '#,##0\\ "р.";[Red]\\-#,##0\\ "р."'); - t.validFormat('#,##0\\ "р.";\\-#,##0\\ "р."', '#,##0\\ "р.";\\-#,##0\\ "р."'); - t.validFormat('#,##0\\ ;[Red]\\(#,##0\\)', '#,##0\\ ;[Red]\\(#,##0\\)'); - t.validFormat('#,##0\\ ;\\(#,##0\\)', '#,##0\\ ;\\(#,##0\\)'); - t.validFormat('#,##0_ ', '#,##0_ '); - t.validFormat('#,##0_ ;[Red]\\-#,##0\\ ', '#,##0_ ;[Red]\\-#,##0\\ '); - t.validFormat('#,##0_);[Red]\\(#,##0\\)', '#,##0_);[Red]\\(#,##0\\)'); - t.validFormat('#,##0_р_.;[Red]\\-#,##0_р_.', '#,##0_р_.;[Red]\\-#,##0_р_.'); - t.validFormat('#,##0_р_.;\\-#,##0_р_.', '#,##0_р_.;\\-#,##0_р_.'); - t.validFormat('#.0000,,', '#.0000,,'); - t.validFormat('#0', '#0'); - t.validFormat('#0.00', '#0.00'); - t.validFormat('#0.0000', '#0.0000'); - t.validFormat('#\\ ?/10', '#\\ ?/10'); - t.validFormat('#\\ ?/2', '#\\ ?/2'); - t.validFormat('#\\ ?/4', '#\\ ?/4'); - t.validFormat('#\\ ?/8', '#\\ ?/8'); - t.validFormat('#\\ ?/?', '#\\ ?/?'); - t.validFormat('#\\ ??/100', '#\\ ??/100'); - t.validFormat('#\\ ??/100;[Red]\\(#\\ ??/16\\)', '#\\ ??/100;[Red]\\(#\\ ??/16\\)'); - t.validFormat('#\\ ??/16', '#\\ ??/16'); - t.validFormat('#\\ ??/??', '#\\ ??/??'); - t.validFormat('#\\ ??/?????????', '#\\ ??/?????????'); - t.validFormat('#\\ ???/???', '#\\ ???/???'); - t.validFormat('**\\ #,###,#00,000.00,**', '**\\ #,###,#00,000.00,**'); - t.validFormat('0', '0'); - t.validFormat('0"abde".0"??"000E+00', '0"abde".0"??"000E+00'); - t.validFormat('0%', '0%'); - t.validFormat('0.0', '0.0'); - t.validFormat('0.0%', '0.0%'); - t.validFormat('0.00', '0.00'); - t.validFormat('0.00"°"', '0.00"°"'); - t.validFormat('0.00%', '0.00%'); - t.validFormat('0.000', '0.000'); - t.validFormat('0.000%', '0.000%'); - t.validFormat('0.0000', '0.0000'); - t.validFormat('0.000000', '0.000000'); - t.validFormat('0.00000000', '0.00000000'); - t.validFormat('0.000000000', '0.000000000'); - t.validFormat('0.000000000%', '0.000000000%'); - t.validFormat('0.00000000000', '0.00000000000'); - t.validFormat('0.000000000000000', '0.000000000000000'); - t.validFormat('0.00000000E+00', '0.00000000E+00'); - t.validFormat('0.0000E+00', '0.0000E+00'); - t.validFormat('0.00;[Red]0.00', '0.00;[Red]0.00'); - t.validFormat('0.00E+00', '0.00E+00'); - t.validFormat('0.00_);[Red]\\(0.00\\)', '0.00_);[Red]\\(0.00\\)'); - t.validFormat('0.00_);\\(0.00\\)', '0.00_);\\(0.00\\)'); - t.validFormat('0.0_ ', '0.0_ '); - t.validFormat('00.00.00.000', '00.00.00.000'); - t.validFormat('00.000%', '00.000%'); - t.validFormat('0000', '0000'); - t.validFormat('00000', '00000'); - t.validFormat('00000000', '00000000'); - t.validFormat('000000000', '000000000'); - t.validFormat('00000\\-0000', '00000\\-0000'); - t.validFormat('00000\\-00000', '00000\\-00000'); - t.validFormat('000\\-00\\-0000', '000\\-00\\-0000'); - t.validFormat('0;[Red]0', '0;[Red]0'); - t.validFormat('0\\-00000\\-00000\\-0', '0\\-00000\\-00000\\-0'); - t.validFormat('0_);[Red]\\(0\\)', '0_);[Red]\\(0\\)'); - t.validFormat('0_);\\(0\\)', '0_);\\(0\\)'); - t.validFormat('@', '@'); - t.validFormat('A/P', 'A/P'); - t.validFormat('AM/PM', 'AM/PM'); - t.validFormat('AM/PMh"時"mm"分"ss"秒";@', 'AM/PMh"時"mm"分"ss"秒";@'); - t.validFormat('D', 'D'); - t.validFormat('DD', 'DD'); - t.validFormat('DD/MM/YY;@', 'DD/MM/YY;@'); - t.validFormat('DD/MM/YYYY', 'DD/MM/YYYY'); - t.validFormat('DD/MM/YYYY;@', 'DD/MM/YYYY;@'); - t.validFormat('DDD', 'DDD'); - t.validFormat('DDDD', 'DDDD'); - t.validFormat('DDDD", "MMMM\\ DD", "YYYY', 'DDDD", "MMMM\\ DD", "YYYY'); - t.validFormat('GENERAL', 'GENERAL'); - t.validFormat('General', 'General'); - t.validFormat('H', 'H'); - t.validFormat('H:MM:SS\\ AM/PM', 'H:MM:SS\\ AM/PM'); - t.validFormat('HH:MM', 'HH:MM'); - t.validFormat('HH:MM:SS\\ AM/PM', 'HH:MM:SS\\ AM/PM'); - t.validFormat('HHM', 'HHM'); - t.validFormat('HHMM', 'HHMM'); - t.validFormat('HH[MM]', 'HH[MM]'); - t.validFormat('HH[M]', 'HH[M]'); - t.validFormat('M/D/YYYY', 'M/D/YYYY'); - t.validFormat('M/D/YYYY\\ H:MM', 'M/D/YYYY\\ H:MM'); - t.validFormat('MM/DD/YY', 'MM/DD/YY'); - t.validFormat('S', 'S'); - t.validFormat('SS', 'SS'); - t.validFormat('YY', 'YY'); - t.validFormat('YYM', 'YYM'); - t.validFormat('YYMM', 'YYMM'); - t.validFormat('YYMMM', 'YYMMM'); - t.validFormat('YYMMMM', 'YYMMMM'); - t.validFormat('YYMMMMM', 'YYMMMMM'); - t.validFormat('YYYY', 'YYYY'); - t.validFormat('YYYY-MM-DD HH:MM:SS', 'YYYY-MM-DD HH:MM:SS'); - t.validFormat('YYYY\\-MM\\-DD', 'YYYY\\-MM\\-DD'); - t.validFormat('[$$-409]#,##0', '[$$-409]#,##0'); - t.validFormat('[$$-409]#,##0.00', '[$$-409]#,##0.00'); - t.validFormat('[$$-409]#,##0.00_);[Red]\\([$$-409]#,##0.00\\)', '[$$-409]#,##0.00_);[Red]\\([$$-409]#,##0.00\\)'); - t.validFormat('[$$-C09]#,##0.00', '[$$-C09]#,##0.00'); - t.validFormat('[$-100042A]h:mm:ss\\ AM/PM;@', '[$-100042A]h:mm:ss\\ AM/PM;@'); - t.validFormat('[$-1010409]0.000%', '[$-1010409]0.000%'); - t.validFormat('[$-1010409]General', '[$-1010409]General'); - t.validFormat('[$-1010409]d/m/yyyy\\ h:mm\\ AM/PM;@', '[$-1010409]d/m/yyyy\\ h:mm\\ AM/PM;@'); - t.validFormat('[$-1010409]dddd, mmmm dd, yyyy', '[$-1010409]dddd, mmmm dd, yyyy'); - t.validFormat('[$-1010409]m/d/yyyy', '[$-1010409]m/d/yyyy'); - t.validFormat('[$-1409]h:mm:ss\\ AM/PM;@', '[$-1409]h:mm:ss\\ AM/PM;@'); - t.validFormat('[$-2000000]h:mm:ss;@', '[$-2000000]h:mm:ss;@'); - t.validFormat('[$-2010401]d/mm/yyyy\\ h:mm\\ AM/PM;@', '[$-2010401]d/mm/yyyy\\ h:mm\\ AM/PM;@'); - t.validFormat('[$-4000439]h:mm:ss\\ AM/PM;@', '[$-4000439]h:mm:ss\\ AM/PM;@'); - t.validFormat('[$-4010439]d/m/yyyy\\ h:mm\\ AM/PM;@', '[$-4010439]d/m/yyyy\\ h:mm\\ AM/PM;@'); - t.validFormat('[$-409]AM/PM\\ hh:mm:ss;@', '[$-409]AM/PM\\ hh:mm:ss;@'); - t.validFormat('[$-409]d/m/yyyy\\ hh:mm;@', '[$-409]d/m/yyyy\\ hh:mm;@'); - t.validFormat('[$-409]d\\-mmm;@', '[$-409]d\\-mmm;@'); - t.validFormat('[$-409]d\\-mmm\\-yy;@', '[$-409]d\\-mmm\\-yy;@'); - t.validFormat('[$-409]d\\-mmm\\-yyyy;@', '[$-409]d\\-mmm\\-yyyy;@'); - t.validFormat('[$-409]dd/mm/yyyy\\ hh:mm;@', '[$-409]dd/mm/yyyy\\ hh:mm;@'); - t.validFormat('[$-409]dd\\-mmm\\-yy;@', '[$-409]dd\\-mmm\\-yy;@'); - t.validFormat('[$-409]h:mm:ss\\ AM/PM;@', '[$-409]h:mm:ss\\ AM/PM;@'); - t.validFormat('[$-409]h:mm\\ AM/PM;@', '[$-409]h:mm\\ AM/PM;@'); - t.validFormat('[$-409]m/d/yy\\ h:mm\\ AM/PM;@', '[$-409]m/d/yy\\ h:mm\\ AM/PM;@'); - t.validFormat('[$-409]mmm\\-yy;@', '[$-409]mmm\\-yy;@'); - t.validFormat('[$-409]mmmm\\ d\\,\\ yyyy;@', '[$-409]mmmm\\ d\\,\\ yyyy;@'); - t.validFormat('[$-409]mmmm\\-yy;@', '[$-409]mmmm\\-yy;@'); - t.validFormat('[$-409]mmmmm;@', '[$-409]mmmmm;@'); - t.validFormat('[$-409]mmmmm\\-yy;@', '[$-409]mmmmm\\-yy;@'); - t.validFormat('[$-40E]h\\ "óra"\\ m\\ "perckor"\\ AM/PM;@', '[$-40E]h\\ "óra"\\ m\\ "perckor"\\ AM/PM;@'); - t.validFormat('[$-412]AM/PM\\ h"시"\\ mm"분"\\ ss"초";@', '[$-412]AM/PM\\ h"시"\\ mm"분"\\ ss"초";@'); - t.validFormat('[$-41C]h:mm:ss\\.AM/PM;@', '[$-41C]h:mm:ss\\.AM/PM;@'); - t.validFormat('[$-449]hh:mm:ss\\ AM/PM;@', '[$-449]hh:mm:ss\\ AM/PM;@'); - t.validFormat('[$-44E]hh:mm:ss\\ AM/PM;@', '[$-44E]hh:mm:ss\\ AM/PM;@'); - t.validFormat('[$-44F]hh:mm:ss\\ AM/PM;@', '[$-44F]hh:mm:ss\\ AM/PM;@'); - t.validFormat('[$-D000409]h:mm\\ AM/PM;@', '[$-D000409]h:mm\\ AM/PM;@'); - t.validFormat('[$-D010000]d/mm/yyyy\\ h:mm\\ "น.";@', '[$-D010000]d/mm/yyyy\\ h:mm\\ "น.";@'); - t.validFormat('[$-F400]h:mm:ss\\ AM/PM', '[$-F400]h:mm:ss\\ AM/PM'); - t.validFormat('[$-F800]dddd\\,\\ mmmm\\ dd\\,\\ yyyy', '[$-F800]dddd\\,\\ mmmm\\ dd\\,\\ yyyy'); - t.validFormat('[$AUD]\\ #,##0.00', '[$AUD]\\ #,##0.00'); - t.validFormat('[$RD$-1C0A]#,##0.00;[Red]\\-[$RD$-1C0A]#,##0.00', '[$RD$-1C0A]#,##0.00;[Red]\\-[$RD$-1C0A]#,##0.00'); - t.validFormat('[$SFr.-810]\\ #,##0.00_);[Red]\\([$SFr.-810]\\ #,##0.00\\)', '[$SFr.-810]\\ #,##0.00_);[Red]\\([$SFr.-810]\\ #,##0.00\\)'); - t.validFormat('[$£-809]#,##0.00;[Red][$£-809]#,##0.00', '[$£-809]#,##0.00;[Red][$£-809]#,##0.00'); - t.validFormat('[$¥-411]#,##0.00', '[$¥-411]#,##0.00'); - t.validFormat('[$¥-804]#,##0.00', '[$¥-804]#,##0.00'); - t.validFormat('[<0]"";0%', '[<0]"";0%'); - t.validFormat('[<=9999999]###\\-####;\\(###\\)\\ ###\\-####', '[<=9999999]###\\-####;\\(###\\)\\ ###\\-####'); - t.validFormat('[=0]?;#,##0.00', '[=0]?;#,##0.00'); - t.validFormat('[=0]?;0%', '[=0]?;0%'); - t.validFormat('[=0]?;[<4.16666666666667][hh]:mm:ss;[hh]:mm', '[=0]?;[<4.16666666666667][hh]:mm:ss;[hh]:mm'); - t.validFormat('[>999999]#,,"M";[>999]#,"K";#', '[>999999]#,,"M";[>999]#,"K";#'); - t.validFormat('[>999999]#.000,,"M";[>999]#.000,"K";#.000', '[>999999]#.000,,"M";[>999]#.000,"K";#.000'); - t.validFormat("[>=100000]0.000\\ \\\";[Red]0.000\\ \\<\\ \\>\\ \\\"\\ \\&\\ \\'\\ ", "[>=100000]0.000\\ \\\";[Red]0.000\\ \\<\\ \\>\\ \\\"\\ \\&\\ \\'\\ "); - t.validFormat('[>=100000]0.000\\ \\<;[Red]0.000\\ \\>', '[>=100000]0.000\\ \\<;[Red]0.000\\ \\>'); - t.validFormat('[BLACK]@', '[BLACK]@'); - t.validFormat('[BLUE]GENERAL', '[BLUE]GENERAL'); - t.validFormat('[Black]@', '[Black]@'); - t.validFormat('[Blue]General', '[Blue]General'); - t.validFormat('[CYAN]@', '[CYAN]@'); - t.validFormat('[Cyan]@', '[Cyan]@'); - t.validFormat('[DBNum1][$-804]AM/PMh"时"mm"分";@', '[DBNum1][$-804]AM/PMh"时"mm"分";@'); - t.validFormat('[DBNum1][$-804]General', '[DBNum1][$-804]General'); - t.validFormat('[DBNum1][$-804]h"时"mm"分";@', '[DBNum1][$-804]h"时"mm"分";@'); - t.validFormat('[$-1004]dddd\\,\\ d\\ mmmm\\,\\ yyyy;@', '[$-1004]dddd\\,\\ d\\ mmmm\\,\\ yyyy;@'); - t.validFormat('[$-101040D]d\\ mmmm\\ yyyy;@', '[$-101040D]d\\ mmmm\\ yyyy;@'); - t.validFormat('[$-101042A]d\\ mmmm\\ yyyy;@', '[$-101042A]d\\ mmmm\\ yyyy;@'); - t.validFormat('[$-140C]dddd\\ "YeahWoo!"\\ ddd\\ mmmm\\ yyyy;@', '[$-140C]dddd\\ "YeahWoo!"\\ ddd\\ mmmm\\ yyyy;@'); - t.validFormat('[$-2C0A]dddd\\ d" de "mmmm" de "yyyy;@', '[$-2C0A]dddd\\ d" de "mmmm" de "yyyy;@'); - t.validFormat('[$-402]dd\\ mmmm\\ yyyy\\ "г.";@', '[$-402]dd\\ mmmm\\ yyyy\\ "г.";@'); - t.validFormat('[$-403]dddd\\,\\ d" / "mmmm" / "yyyy;@', '[$-403]dddd\\,\\ d" / "mmmm" / "yyyy;@'); - t.validFormat('[$-405]d\\.\\ mmmm\\ yyyy;@', '[$-405]d\\.\\ mmmm\\ yyyy;@'); - t.validFormat('[$-408]d\\ mmmm\\ yyyy;@', '[$-408]d\\ mmmm\\ yyyy;@'); - t.validFormat('[$-409]d\\-mmm;@', '[$-409]d\\-mmm;@'); - t.validFormat('[$-409]d\\-mmm\\-yy;@', '[$-409]d\\-mmm\\-yy;@'); - t.validFormat('[$-409]d\\-mmm\\-yyyy;@', '[$-409]d\\-mmm\\-yyyy;@'); - t.validFormat('[$-409]dd\\-mmm\\-yy;@', '[$-409]dd\\-mmm\\-yy;@'); - t.validFormat('[$-409]mmm\\-yy;@', '[$-409]mmm\\-yy;@'); - t.validFormat('[$-409]mmmm\\ d\\,\\ yyyy;@', '[$-409]mmmm\\ d\\,\\ yyyy;@'); - t.validFormat('[$-409]mmmm\\-yy;@', '[$-409]mmmm\\-yy;@'); - t.validFormat('[$-40B]d\\.\\ mmmm\\t\\a\\ yyyy;@', '[$-40B]d\\.\\ mmmm\\t\\a\\ yyyy;@'); - t.validFormat('[$-40C]d/mmm/yyyy;@', '[$-40C]d/mmm/yyyy;@'); - t.validFormat('[$-40E]yyyy/\\ mmmm\\ d\\.;@', '[$-40E]yyyy/\\ mmmm\\ d\\.;@'); - t.validFormat('[$-40F]dd\\.\\ mmmm\\ yyyy;@', '[$-40F]dd\\.\\ mmmm\\ yyyy;@'); - t.validFormat('[$-410]d\\ mmmm\\ yyyy;@', '[$-410]d\\ mmmm\\ yyyy;@'); - t.validFormat('[$-415]d\\ mmmm\\ yyyy;@', '[$-415]d\\ mmmm\\ yyyy;@'); - t.validFormat('[$-416]d\\ \\ mmmm\\,\\ yyyy;@', '[$-416]d\\ \\ mmmm\\,\\ yyyy;@'); - t.validFormat('[$-418]d\\ mmmm\\ yyyy;@', '[$-418]d\\ mmmm\\ yyyy;@'); - t.validFormat('[$-41A]d\\.\\ mmmm\\ yyyy\\.;@', '[$-41A]d\\.\\ mmmm\\ yyyy\\.;@'); - t.validFormat('[$-41B]d\\.\\ mmmm\\ yyyy;@', '[$-41B]d\\.\\ mmmm\\ yyyy;@'); - t.validFormat('[$-41D]"den "\\ d\\ mmmm\\ yyyy;@', '[$-41D]"den "\\ d\\ mmmm\\ yyyy;@'); - t.validFormat('[$-420]dddd\\,\\ dd\\ mmmm\\,\\ yyyy;@', '[$-420]dddd\\,\\ dd\\ mmmm\\,\\ yyyy;@'); - t.validFormat('[$-421]dd\\ mmmm\\ yyyy;@', '[$-421]dd\\ mmmm\\ yyyy;@'); - t.validFormat('[$-424]dddd\\,\\ d\\.\\ mmmm\\ yyyy;@', '[$-424]dddd\\,\\ d\\.\\ mmmm\\ yyyy;@'); - t.validFormat('[$-425]dddd\\,\\ d\\.\\ mmmm\\ yyyy;@', '[$-425]dddd\\,\\ d\\.\\ mmmm\\ yyyy;@'); - t.validFormat('[$-426]dddd\\,\\ yyyy". gada "d\\.\\ mmmm;@', '[$-426]dddd\\,\\ yyyy". gada "d\\.\\ mmmm;@'); - t.validFormat('[$-427]yyyy\\ "m."\\ mmmm\\ d\\ "d.";@', '[$-427]yyyy\\ "m."\\ mmmm\\ d\\ "d.";@'); - t.validFormat('[$-42B]dddd\\,\\ d\\ mmmm\\ yyyy;@', '[$-42B]dddd\\,\\ d\\ mmmm\\ yyyy;@'); - t.validFormat('[$-42C]d\\ mmmm\\ yyyy;@', '[$-42C]d\\ mmmm\\ yyyy;@'); - t.validFormat('[$-42D]yyyy"(e)ko"\\ mmmm"ren"\\ d"a";@', '[$-42D]yyyy"(e)ko"\\ mmmm"ren"\\ d"a";@'); - t.validFormat('[$-42F]dddd\\,\\ dd\\ mmmm\\ yyyy;@', '[$-42F]dddd\\,\\ dd\\ mmmm\\ yyyy;@'); - t.validFormat('[$-437]yyyy\\ \\წ\\ლ\\ი\\ს\\ dd\\ mm\\,\\ dddd;@', '[$-437]yyyy\\ \\წ\\ლ\\ი\\ს\\ dd\\ mm\\,\\ dddd;@'); - t.validFormat('[$-438]d\\.\\ mmmm\\ yyyy;@', '[$-438]d\\.\\ mmmm\\ yyyy;@'); - t.validFormat('[$-43F]d\\ mmmm\\ yyyy\\ "ж.";@', '[$-43F]d\\ mmmm\\ yyyy\\ "ж.";@'); - t.validFormat('[$-444]d\\ mmmm\\ yyyy;@', '[$-444]d\\ mmmm\\ yyyy;@'); - t.validFormat('[$-449]dd\\ mmmm\\ yyyy;@', '[$-449]dd\\ mmmm\\ yyyy;@'); - t.validFormat('[$-44E]d\\ mmmm\\ yyyy;@', '[$-44E]d\\ mmmm\\ yyyy;@'); - t.validFormat('[$-44F]dd\\ mmmm\\ yyyy\\ dddd;@', '[$-44F]dd\\ mmmm\\ yyyy\\ dddd;@'); - t.validFormat('[$-457]dd\\ mmmm\\ yyyy;@', '[$-457]dd\\ mmmm\\ yyyy;@'); - t.validFormat('[$-813]dddd\\ d\\ mmmm\\ yyyy;@', '[$-813]dddd\\ d\\ mmmm\\ yyyy;@'); - t.validFormat('[$-81A]dddd\\,\\ d\\.\\ mmmm\\ yyyy;@', '[$-81A]dddd\\,\\ d\\.\\ mmmm\\ yyyy;@'); - t.validFormat('[$-82C]d\\ mmmm\\ yyyy;@', '[$-82C]d\\ mmmm\\ yyyy;@'); - t.validFormat('[$-843]yyyy\\ "й""и""л"\\ d/mmmm;@', '[$-843]yyyy\\ "й""и""л"\\ d/mmmm;@'); - t.validFormat('[$-C07]dddd\\,\\ dd\\.\\ mmmm\\ yyyy;@', '[$-C07]dddd\\,\\ dd\\.\\ mmmm\\ yyyy;@'); - t.validFormat('[$-FC19]yyyy\\,\\ dd\\ mmmm;@', '[$-FC19]yyyy\\,\\ dd\\ mmmm;@'); - t.validFormat('[$-FC22]d\\ mmmm\\ yyyy" р.";@', '[$-FC22]d\\ mmmm\\ yyyy" р.";@'); - t.validFormat('[$-FC23]d\\ mmmm\\ yyyy;@', '[$-FC23]d\\ mmmm\\ yyyy;@'); - t.validFormat('[GREEN]#,###', '[GREEN]#,###'); - t.validFormat('[Green]#,###', '[Green]#,###'); - t.validFormat('[HH]', '[HH]'); - t.validFormat('[$-2060401]d/mm/yyyy\\ h:mm\\ AM/PM;@', '[$-2060401]d/mm/yyyy\\ h:mm\\ AM/PM;@'); - t.validFormat('[$-2060401]d\\ mmmm\\ yyyy;@', '[$-2060401]d\\ mmmm\\ yyyy;@'); - t.validFormat('[H]', '[H]'); - t.validFormat('[$-411]gggyy"年"m"月"d"日"\\ dddd;@', '[$-411]gggyy"年"m"月"d"日"\\ dddd;@'); - t.validFormat('[MAGENTA]0.00', '[MAGENTA]0.00'); - t.validFormat('[Magenta]0.00', '[Magenta]0.00'); - t.validFormat('[RED]#.##', '[RED]#.##'); - t.validFormat('[Red]#.##', '[Red]#.##'); - t.validFormat('[Red][<-25]General;[Blue][>25]General;[Green]General;[Yellow]General\\ ', '[Red][<-25]General;[Blue][>25]General;[Green]General;[Yellow]General\\ '); - t.validFormat('[Red][<=-25]General;[Blue][>=25]General;[Green]General;[Yellow]General', '[Red][<=-25]General;[Blue][>=25]General;[Green]General;[Yellow]General'); - t.validFormat('[Red][<>50]General;[Blue]000', '[Red][<>50]General;[Blue]000'); - t.validFormat('[Red][=50]General;[Blue]000', '[Red][=50]General;[Blue]000'); - t.validFormat('[SS]', '[SS]'); - t.validFormat('[S]', '[S]'); - t.validFormat('[DBNum1][$-404]y"年"m"月"d"日";@', '[DBNum1][$-404]y"年"m"月"d"日";@'); - t.validFormat('[WHITE]0.0', '[WHITE]0.0'); - t.validFormat('[White]0.0', '[White]0.0'); - t.validFormat('[YELLOW]@', '[YELLOW]@'); - t.validFormat('[Yellow]@', '[Yellow]@'); - t.validFormat('[h]', '[h]'); - t.validFormat('[h]:mm:ss', '[h]:mm:ss'); - t.validFormat('[h]:mm:ss;@', '[h]:mm:ss;@'); - t.validFormat('[h]\\.mm" Uhr ";@', '[h]\\.mm" Uhr ";@'); - t.validFormat('[hh]', '[hh]'); - t.validFormat('[s]', '[s]'); - t.validFormat('[ss]', '[ss]'); - t.validFormat('\\#\\r\\e\\c', '\\#\\r\\e\\c'); - t.validFormat('\\$#,##0_);[Red]"($"#,##0\\)', '\\$#,##0_);[Red]"($"#,##0\\)'); - t.validFormat('\\$0.00', '\\$0.00'); - t.validFormat('\\C\\O\\B\\ \\o\\n\\ @', '\\C\\O\\B\\ \\o\\n\\ @'); - t.validFormat('\\C\\R\\O\\N\\T\\A\\B\\ \\o\\n\\ @', '\\C\\R\\O\\N\\T\\A\\B\\ \\o\\n\\ @'); - t.validFormat('\\R\\e\\s\\u\\l\\t\\ \\o\\n\\ @', '\\R\\e\\s\\u\\l\\t\\ \\o\\n\\ @'); - t.validFormat('\\S\\Q\\L\\ \\:\\ @', '\\S\\Q\\L\\ \\:\\ @'); - t.validFormat('\\S\\Q\\L\\ \\R\\e\\q\\u\\e\\s\\t\\ \\f\\o\\r\\ @', '\\S\\Q\\L\\ \\R\\e\\q\\u\\e\\s\\t\\ \\f\\o\\r\\ @'); - t.validFormat('\\c\\c\\c?????0"aaaa"0"bbbb"000000.00%', '\\c\\c\\c?????0"aaaa"0"bbbb"000000.00%'); - t.validFormat('\\u\\n\\t\\i\\l\\ h:mm;@', '\\u\\n\\t\\i\\l\\ h:mm;@'); - t.validFormat('_ "¥"* #,##0.00_ "Positive";_ "¥"* \\-#,##0.00_ ;_ "¥"* "-"??_ "Negtive";_ @_ \\ "Zero"', '_ "¥"* #,##0.00_ "Positive";_ "¥"* \\-#,##0.00_ ;_ "¥"* "-"??_ "Negtive";_ @_ \\ "Zero"'); - t.validFormat('_ * #,##0.00_)[$﷼-429]_ ;_ * \\(#,##0.00\\)[$﷼-429]_ ;_ * "-"??_)[$﷼-429]_ ;_ @_ ', '_ * #,##0.00_)[$﷼-429]_ ;_ * \\(#,##0.00\\)[$﷼-429]_ ;_ * "-"??_)[$﷼-429]_ ;_ @_ '); - t.validFormat('_ * #,##0_ ;_ * \\-#,##0_ ;[Red]_ * "-"_ ;_ @_ ', '_ * #,##0_ ;_ * \\-#,##0_ ;[Red]_ * "-"_ ;_ @_ '); - t.validFormat('_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)', '_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)'); - t.validFormat('_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"??_);_(@_)', '_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"??_);_(@_)'); - t.validFormat('_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)', '_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)'); - t.validFormat('_(* #,##0.0000_);_(* \\(#,##0.0000\\);_(* "-"??_);_(@_)', '_(* #,##0.0000_);_(* \\(#,##0.0000\\);_(* "-"??_);_(@_)'); - t.validFormat('_(* #,##0.000_);_(* \\(#,##0.000\\);_(* "-"??_);_(@_)', '_(* #,##0.000_);_(* \\(#,##0.000\\);_(* "-"??_);_(@_)'); - t.validFormat('_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)', '_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)'); - t.validFormat('_(* #,##0.0_);_(* \\(#,##0.0\\);_(* "-"??_);_(@_)', '_(* #,##0.0_);_(* \\(#,##0.0\\);_(* "-"??_);_(@_)'); - t.validFormat('_(* #,##0_);_(* \\(#,##0\\);_(* "-"??_);_(@_)', '_(* #,##0_);_(* \\(#,##0\\);_(* "-"??_);_(@_)'); - t.validFormat('_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)', '_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)'); - t.validFormat('_([$ANG]\\ * #,##0.0_);_([$ANG]\\ * \\(#,##0.0\\);_([$ANG]\\ * "-"?_);_(@_)', '_([$ANG]\\ * #,##0.0_);_([$ANG]\\ * \\(#,##0.0\\);_([$ANG]\\ * "-"?_);_(@_)'); - t.validFormat('_-"€"\\ * #,##0.00_-;_-"€"\\ * #,##0.00\\-;_-"€"\\ * "-"??_-;_-@_-', '_-"€"\\ * #,##0.00_-;_-"€"\\ * #,##0.00\\-;_-"€"\\ * "-"??_-;_-@_-'); - t.validFormat('_-* #,##0.00" TL"_-;\\-* #,##0.00" TL"_-;_-* \\-??" TL"_-;_-@_-', '_-* #,##0.00" TL"_-;\\-* #,##0.00" TL"_-;_-* \\-??" TL"_-;_-@_-'); - t.validFormat('_-* #,##0.00" €"_-;\\-* #,##0.00" €"_-;_-* \\-??" €"_-;_-@_-', '_-* #,##0.00" €"_-;\\-* #,##0.00" €"_-;_-* \\-??" €"_-;_-@_-'); - t.validFormat('_-* #,##0.00\\ "р."_-;\\-* #,##0.00\\ "р."_-;_-* "-"??\\ "р."_-;_-@_-', '_-* #,##0.00\\ "р."_-;\\-* #,##0.00\\ "р."_-;_-* "-"??\\ "р."_-;_-@_-'); - t.validFormat('_-* #,##0.00\\ "€"_-;\\-* #,##0.00\\ "€"_-;_-* "-"??\\ "€"_-;_-@_-', '_-* #,##0.00\\ "€"_-;\\-* #,##0.00\\ "€"_-;_-* "-"??\\ "€"_-;_-@_-'); - t.validFormat('_-* #,##0.00\\ [$€-407]_-;\\-* #,##0.00\\ [$€-407]_-;_-* \\-??\\ [$€-407]_-;_-@_-', '_-* #,##0.00\\ [$€-407]_-;\\-* #,##0.00\\ [$€-407]_-;_-* \\-??\\ [$€-407]_-;_-@_-'); - t.validFormat('_-* #,##0.0\\ _F_-;\\-* #,##0.0\\ _F_-;_-* "-"??\\ _F_-;_-@_-', '_-* #,##0.0\\ _F_-;\\-* #,##0.0\\ _F_-;_-* "-"??\\ _F_-;_-@_-'); - t.validFormat('_-* #,##0\\ "€"_-;\\-* #,##0\\ "€"_-;_-* "-"\\ "€"_-;_-@_-', '_-* #,##0\\ "€"_-;\\-* #,##0\\ "€"_-;_-* "-"\\ "€"_-;_-@_-'); - t.validFormat('_-* #,##0_-;\\-* #,##0_-;_-* "-"??_-;_-@_-', '_-* #,##0_-;\\-* #,##0_-;_-* "-"??_-;_-@_-'); - t.validFormat('_-\\$* #,##0.0_ ;_-\\$* \\-#,##0.0\\ ;_-\\$* "-"?_ ;_-@_ ', '_-\\$* #,##0.0_ ;_-\\$* \\-#,##0.0\\ ;_-\\$* "-"?_ ;_-@_ '); - t.validFormat('d', 'd'); - t.validFormat('d-mmm', 'd-mmm'); - t.validFormat('d-mmm-yy', 'd-mmm-yy'); - t.validFormat('d/m', 'd/m'); - t.validFormat('d/m/yy;@', 'd/m/yy;@'); - t.validFormat('d/m/yyyy;@', 'd/m/yyyy;@'); - t.validFormat('d/mm/yy;@', 'd/mm/yy;@'); - t.validFormat('d/mm/yyyy;@', 'd/mm/yyyy;@'); - t.validFormat('d\\-mmm', 'd\\-mmm'); - t.validFormat('d\\-mmm\\-yyyy', 'd\\-mmm\\-yyyy'); - t.validFormat('dd', 'dd'); - t.validFormat('dd"-"mmm"-"yyyy', 'dd"-"mmm"-"yyyy'); - t.validFormat('dd/m/yyyy', 'dd/m/yyyy'); - t.validFormat('dd/mm/yy', 'dd/mm/yy'); - t.validFormat('dd/mm/yy;@', 'dd/mm/yy;@'); - t.validFormat('dd/mm/yy\\ hh:mm', 'dd/mm/yy\\ hh:mm'); - t.validFormat('dd/mm/yyyy', 'dd/mm/yyyy'); - t.validFormat('dd/mm/yyyy\\ hh:mm:ss', 'dd/mm/yyyy\\ hh:mm:ss'); - t.validFormat('dd/mmm', 'dd/mmm'); - t.validFormat('dd\\-mm\\-yy', 'dd\\-mm\\-yy'); - t.validFormat('dd\\-mmm\\-yy', 'dd\\-mmm\\-yy'); - t.validFormat('dd\\-mmm\\-yyyy\\ hh:mm:ss.000', 'dd\\-mmm\\-yyyy\\ hh:mm:ss.000'); - t.validFormat('dd\\/mm\\/yy', 'dd\\/mm\\/yy'); - t.validFormat('dd\\/mm\\/yyyy', 'dd\\/mm\\/yyyy'); - t.validFormat('ddd', 'ddd'); - t.validFormat('dddd', 'dddd'); - t.validFormat('dddd, mmmm dd, yyyy', 'dddd, mmmm dd, yyyy'); - t.validFormat('h', 'h'); - t.validFormat('h"时"mm"分"ss"秒";@', 'h"时"mm"分"ss"秒";@'); - t.validFormat('h"時"mm"分"ss"秒";@', 'h"時"mm"分"ss"秒";@'); - t.validFormat('h:mm', 'h:mm'); - t.validFormat('h:mm AM/PM', 'h:mm AM/PM'); - t.validFormat('h:mm:ss', 'h:mm:ss'); - t.validFormat('h:mm:ss AM/PM', 'h:mm:ss AM/PM'); - t.validFormat('h:mm:ss;@', 'h:mm:ss;@'); - t.validFormat('h:mm;@', 'h:mm;@'); - t.validFormat('h\\.mm" Uhr ";@', 'h\\.mm" Uhr ";@'); - t.validFormat('h\\.mm" h";@', 'h\\.mm" h";@'); - t.validFormat('h\\.mm" u.";@', 'h\\.mm" u.";@'); - t.validFormat('hh":"mm AM/PM', 'hh":"mm AM/PM'); - t.validFormat('hh:mm:ss', 'hh:mm:ss'); - t.validFormat('hh:mm:ss\\ AM/PM', 'hh:mm:ss\\ AM/PM'); - t.validFormat('hh\\.mm" h";@', 'hh\\.mm" h";@'); - t.validFormat('hhm', 'hhm'); - t.validFormat('hhmm', 'hhmm'); - t.validFormat('m"月"d"日"', 'm"月"d"日"'); - t.validFormat('m/d/yy', 'm/d/yy'); - t.validFormat('m/d/yy h:mm', 'm/d/yy h:mm'); - t.validFormat('m/d/yy;@', 'm/d/yy;@'); - t.validFormat('m/d/yy\\ h:mm', 'm/d/yy\\ h:mm'); - t.validFormat('m/d/yy\\ h:mm;@', 'm/d/yy\\ h:mm;@'); - t.validFormat('m/d/yyyy', 'm/d/yyyy'); - t.validFormat('m/d/yyyy;@', 'm/d/yyyy;@'); - t.validFormat('m/d/yyyy\\ h:mm:ss;@', 'm/d/yyyy\\ h:mm:ss;@'); - t.validFormat('m/d;@', 'm/d;@'); - t.validFormat('m\\/d\\/yyyy', 'm\\/d\\/yyyy'); - t.validFormat('mm/dd', 'mm/dd'); - t.validFormat('mm/dd/yy', 'mm/dd/yy'); - t.validFormat('mm/dd/yy;@', 'mm/dd/yy;@'); - t.validFormat('mm/dd/yyyy', 'mm/dd/yyyy'); - t.validFormat('mm:ss', 'mm:ss'); - t.validFormat('mm:ss.0;@', 'mm:ss.0;@'); - t.validFormat('mmm d, yyyy', 'mmm d, yyyy'); - t.validFormat('mmm" "d", "yyyy', 'mmm" "d", "yyyy'); - t.validFormat('mmm-yy', 'mmm-yy'); - t.validFormat('mmm-yy;@', 'mmm-yy;@'); - t.validFormat('mmm/yy', 'mmm/yy'); - t.validFormat('mmm\\-yy', 'mmm\\-yy'); - t.validFormat('mmm\\-yy;@', 'mmm\\-yy;@'); - t.validFormat('mmm\\-yyyy', 'mmm\\-yyyy'); - t.validFormat('mmmm\\ d\\,\\ yyyy', 'mmmm\\ d\\,\\ yyyy'); - t.validFormat('mmmm\\ yyyy', 'mmmm\\ yyyy'); - t.validFormat('mmss.0', 'mmss.0'); - t.validFormat('s', 's'); - t.validFormat('ss', 'ss'); - t.validFormat('yy', 'yy'); - t.validFormat('yy/mm/dd', 'yy/mm/dd'); - t.validFormat('yy\\.mm\\.dd', 'yy\\.mm\\.dd'); - t.validFormat('yym', 'yym'); - t.validFormat('yymm', 'yymm'); - t.validFormat('yymmm', 'yymmm'); - t.validFormat('yymmmm', 'yymmmm'); - t.validFormat('yymmmmm', 'yymmmmm'); - t.validFormat('yyyy', 'yyyy'); - t.validFormat('yyyy"년"\\ m"월"\\ d"일";@', 'yyyy"년"\\ m"월"\\ d"일";@'); - t.validFormat('yyyy-m-d h:mm AM/PM', 'yyyy-m-d h:mm AM/PM'); - t.validFormat('yyyy-mm-dd', 'yyyy-mm-dd'); - t.validFormat('yyyy/mm/dd', 'yyyy/mm/dd'); - t.validFormat('yyyy\\-m\\-d\\ hh:mm:ss', 'yyyy\\-m\\-d\\ hh:mm:ss'); - t.validFormat('yyyy\\-mm\\-dd', 'yyyy\\-mm\\-dd'); - t.validFormat('yyyy\\-mm\\-dd;@', 'yyyy\\-mm\\-dd;@'); - t.validFormat('yyyy\\-mm\\-dd\\ h:mm', 'yyyy\\-mm\\-dd\\ h:mm'); - t.validFormat('yyyy\\-mm\\-dd\\Thh:mm', 'yyyy\\-mm\\-dd\\Thh:mm'); - t.validFormat('yyyy\\-mm\\-dd\\Thhmmss.000', 'yyyy\\-mm\\-dd\\Thhmmss.000'); - - t.end(); +test('Validity tests', () => { + expect(() => format('" Excellent"', 1)).not.toThrow(); + expect(() => format('" Fair"', 1)).not.toThrow(); + expect(() => format('" Good"', 1)).not.toThrow(); + expect(() => format('" Poor"', 1)).not.toThrow(); + expect(() => format('" Very Good"', 1)).not.toThrow(); + expect(() => format('"$"#,##0', 1)).not.toThrow(); + expect(() => format('"$"#,##0.00', 1)).not.toThrow(); + expect(() => format('"$"#,##0.00_);[Red]\\("$"#,##0.00\\)', 1)).not.toThrow(); + expect(() => format('"$"#,##0.00_);\\("$"#,##0.00\\)', 1)).not.toThrow(); + expect(() => format('"$"#,##0;[Red]\\-"$"#,##0', 1)).not.toThrow(); + expect(() => format('"$"#,##0_);[Red]\\("$"#,##0\\)', 1)).not.toThrow(); + expect(() => format('"$"#,##0_);\\("$"#,##0\\)', 1)).not.toThrow(); + expect(() => format('"Haha!"\\ @\\ "Yeah!"', 1)).not.toThrow(); + expect(() => format('"TRUE";"TRUE";"FALSE"', 1)).not.toThrow(); + expect(() => format('"True";"True";"False";@', 1)).not.toThrow(); + expect(() => format('"Years: "0', 1)).not.toThrow(); + expect(() => format('"Yes";"Yes";"No";@', 1)).not.toThrow(); + expect(() => format('"kl "hh:mm:ss;@', 1)).not.toThrow(); + expect(() => format('"£"#,##0.00', 1)).not.toThrow(); + expect(() => format('"£"#,##0;[Red]\\-"£"#,##0', 1)).not.toThrow(); + expect(() => format('"€"#,##0.00', 1)).not.toThrow(); + expect(() => format('"€"\\ #,##0.00_-', 1)).not.toThrow(); + expect(() => format('"上午/下午 "hh"時"mm"分"ss"秒 "', 1)).not.toThrow(); + expect(() => format('"¥"#,##0.00;"¥"\\-#,##0.00', 1)).not.toThrow(); + expect(() => format('#', 1)).not.toThrow(); + expect(() => format('# ?/?', 1)).not.toThrow(); + expect(() => format('# ??/??', 1)).not.toThrow(); + expect(() => format('#" "?/?', 1)).not.toThrow(); + expect(() => format('#" "??/??', 1)).not.toThrow(); + expect(() => format('#"abded"\\ ??/??', 1)).not.toThrow(); + expect(() => format('###0.00;-###0.00', 1)).not.toThrow(); + expect(() => format('###0;-###0', 1)).not.toThrow(); + expect(() => format('##0.0E+0', 1)).not.toThrow(); + expect(() => format('#,##0', 1)).not.toThrow(); + expect(() => format('#,##0 ;(#,##0)', 1)).not.toThrow(); + expect(() => format('#,##0 ;[Red](#,##0)', 1)).not.toThrow(); + expect(() => format('#,##0"р.";[Red]\\-#,##0"р."', 1)).not.toThrow(); + expect(() => format('#,##0.0', 1)).not.toThrow(); + expect(() => format('#,##0.00', 1)).not.toThrow(); + expect(() => format('#,##0.00 "�"', 1)).not.toThrow(); + expect(() => format('#,##0.00 €;-#,##0.00 €', 1)).not.toThrow(); + expect(() => format('#,##0.00"р.";[Red]\\-#,##0.00"р."', 1)).not.toThrow(); + expect(() => format('#,##0.000', 1)).not.toThrow(); + expect(() => format('#,##0.0000', 1)).not.toThrow(); + expect(() => format('#,##0.00000', 1)).not.toThrow(); + expect(() => format('#,##0.000000', 1)).not.toThrow(); + expect(() => format('#,##0.0000000', 1)).not.toThrow(); + expect(() => format('#,##0.00000000', 1)).not.toThrow(); + expect(() => format('#,##0.000000000', 1)).not.toThrow(); + expect(() => format('#,##0.00000000;[Red]#,##0.00000000', 1)).not.toThrow(); + expect(() => format('#,##0.0000_ ', 1)).not.toThrow(); + expect(() => format('#,##0.000_ ', 1)).not.toThrow(); + expect(() => format('#,##0.000_);\\(#,##0.000\\)', 1)).not.toThrow(); + expect(() => format('#,##0.00;(#,##0.00)', 1)).not.toThrow(); + expect(() => format('#,##0.00;(#,##0.00);0.00', 1)).not.toThrow(); + expect(() => format('#,##0.00;[Red](#,##0.00)', 1)).not.toThrow(); + expect(() => format('#,##0.00;[Red]\\(#,##0.00\\)', 1)).not.toThrow(); + expect(() => format('#,##0.00;\\(#,##0.00\\)', 1)).not.toThrow(); + expect(() => format('#,##0.00[$₹-449]_);\\(#,##0.00[$₹-449]\\)', 1)).not.toThrow(); + expect(() => format('#,##0.00\\ "р."', 1)).not.toThrow(); + expect(() => format('#,##0.00\\ "р.";[Red]\\-#,##0.00\\ "р."', 1)).not.toThrow(); + expect(() => format('#,##0.00\\ [$€-407]', 1)).not.toThrow(); + expect(() => format('#,##0.00\\ [$€-40C]', 1)).not.toThrow(); + expect(() => format('#,##0.00_);\\(#,##0.00\\)', 1)).not.toThrow(); + expect(() => format('#,##0.00_р_.;[Red]\\-#,##0.00_р_.', 1)).not.toThrow(); + expect(() => format('#,##0.00_р_.;\\-#,##0.00_р_.', 1)).not.toThrow(); + expect(() => format('#,##0.0;[Red]#,##0.0', 1)).not.toThrow(); + expect(() => format('#,##0.0_ ;\\-#,##0.0\\ ', 1)).not.toThrow(); + expect(() => format('#,##0.0_);[Red]\\(#,##0.0\\)', 1)).not.toThrow(); + expect(() => format('#,##0.0_);\\(#,##0.0\\)', 1)).not.toThrow(); + expect(() => format('#,##0;\\-#,##0;0', 1)).not.toThrow(); + expect(() => format('#,##0\\ "р.";[Red]\\-#,##0\\ "р."', 1)).not.toThrow(); + expect(() => format('#,##0\\ "р.";\\-#,##0\\ "р."', 1)).not.toThrow(); + expect(() => format('#,##0\\ ;[Red]\\(#,##0\\)', 1)).not.toThrow(); + expect(() => format('#,##0\\ ;\\(#,##0\\)', 1)).not.toThrow(); + expect(() => format('#,##0_ ', 1)).not.toThrow(); + expect(() => format('#,##0_ ;[Red]\\-#,##0\\ ', 1)).not.toThrow(); + expect(() => format('#,##0_);[Red]\\(#,##0\\)', 1)).not.toThrow(); + expect(() => format('#,##0_р_.;[Red]\\-#,##0_р_.', 1)).not.toThrow(); + expect(() => format('#,##0_р_.;\\-#,##0_р_.', 1)).not.toThrow(); + expect(() => format('#.0000,,', 1)).not.toThrow(); + expect(() => format('#0', 1)).not.toThrow(); + expect(() => format('#0.00', 1)).not.toThrow(); + expect(() => format('#0.0000', 1)).not.toThrow(); + expect(() => format('#\\ ?/10', 1)).not.toThrow(); + expect(() => format('#\\ ?/2', 1)).not.toThrow(); + expect(() => format('#\\ ?/4', 1)).not.toThrow(); + expect(() => format('#\\ ?/8', 1)).not.toThrow(); + expect(() => format('#\\ ?/?', 1)).not.toThrow(); + expect(() => format('#\\ ??/100', 1)).not.toThrow(); + expect(() => format('#\\ ??/100;[Red]\\(#\\ ??/16\\)', 1)).not.toThrow(); + expect(() => format('#\\ ??/16', 1)).not.toThrow(); + expect(() => format('#\\ ??/??', 1)).not.toThrow(); + expect(() => format('#\\ ??/?????????', 1)).not.toThrow(); + expect(() => format('#\\ ???/???', 1)).not.toThrow(); + expect(() => format('**\\ #,###,#00,000.00,**', 1)).not.toThrow(); + expect(() => format('0', 1)).not.toThrow(); + expect(() => format('0"abde".0"??"000E+00', 1)).not.toThrow(); + expect(() => format('0%', 1)).not.toThrow(); + expect(() => format('0.0', 1)).not.toThrow(); + expect(() => format('0.0%', 1)).not.toThrow(); + expect(() => format('0.00', 1)).not.toThrow(); + expect(() => format('0.00"°"', 1)).not.toThrow(); + expect(() => format('0.00%', 1)).not.toThrow(); + expect(() => format('0.000', 1)).not.toThrow(); + expect(() => format('0.000%', 1)).not.toThrow(); + expect(() => format('0.0000', 1)).not.toThrow(); + expect(() => format('0.000000', 1)).not.toThrow(); + expect(() => format('0.00000000', 1)).not.toThrow(); + expect(() => format('0.000000000', 1)).not.toThrow(); + expect(() => format('0.000000000%', 1)).not.toThrow(); + expect(() => format('0.00000000000', 1)).not.toThrow(); + expect(() => format('0.000000000000000', 1)).not.toThrow(); + expect(() => format('0.00000000E+00', 1)).not.toThrow(); + expect(() => format('0.0000E+00', 1)).not.toThrow(); + expect(() => format('0.00;[Red]0.00', 1)).not.toThrow(); + expect(() => format('0.00E+00', 1)).not.toThrow(); + expect(() => format('0.00_);[Red]\\(0.00\\)', 1)).not.toThrow(); + expect(() => format('0.00_);\\(0.00\\)', 1)).not.toThrow(); + expect(() => format('0.0_ ', 1)).not.toThrow(); + expect(() => format('00.00.00.000', 1)).not.toThrow(); + expect(() => format('00.000%', 1)).not.toThrow(); + expect(() => format('0000', 1)).not.toThrow(); + expect(() => format('00000', 1)).not.toThrow(); + expect(() => format('00000000', 1)).not.toThrow(); + expect(() => format('000000000', 1)).not.toThrow(); + expect(() => format('00000\\-0000', 1)).not.toThrow(); + expect(() => format('00000\\-00000', 1)).not.toThrow(); + expect(() => format('000\\-00\\-0000', 1)).not.toThrow(); + expect(() => format('0;[Red]0', 1)).not.toThrow(); + expect(() => format('0\\-00000\\-00000\\-0', 1)).not.toThrow(); + expect(() => format('0_);[Red]\\(0\\)', 1)).not.toThrow(); + expect(() => format('0_);\\(0\\)', 1)).not.toThrow(); + expect(() => format('@', 1)).not.toThrow(); + expect(() => format('A/P', 1)).not.toThrow(); + expect(() => format('AM/PM', 1)).not.toThrow(); + expect(() => format('AM/PMh"時"mm"分"ss"秒";@', 1)).not.toThrow(); + expect(() => format('D', 1)).not.toThrow(); + expect(() => format('DD', 1)).not.toThrow(); + expect(() => format('DD/MM/YY;@', 1)).not.toThrow(); + expect(() => format('DD/MM/YYYY', 1)).not.toThrow(); + expect(() => format('DD/MM/YYYY;@', 1)).not.toThrow(); + expect(() => format('DDD', 1)).not.toThrow(); + expect(() => format('DDDD', 1)).not.toThrow(); + expect(() => format('DDDD", "MMMM\\ DD", "YYYY', 1)).not.toThrow(); + expect(() => format('GENERAL', 1)).not.toThrow(); + expect(() => format('General', 1)).not.toThrow(); + expect(() => format('H', 1)).not.toThrow(); + expect(() => format('H:MM:SS\\ AM/PM', 1)).not.toThrow(); + expect(() => format('HH:MM', 1)).not.toThrow(); + expect(() => format('HH:MM:SS\\ AM/PM', 1)).not.toThrow(); + expect(() => format('HHM', 1)).not.toThrow(); + expect(() => format('HHMM', 1)).not.toThrow(); + expect(() => format('HH[MM]', 1)).not.toThrow(); + expect(() => format('HH[M]', 1)).not.toThrow(); + expect(() => format('M/D/YYYY', 1)).not.toThrow(); + expect(() => format('M/D/YYYY\\ H:MM', 1)).not.toThrow(); + expect(() => format('MM/DD/YY', 1)).not.toThrow(); + expect(() => format('S', 1)).not.toThrow(); + expect(() => format('SS', 1)).not.toThrow(); + expect(() => format('YY', 1)).not.toThrow(); + expect(() => format('YYM', 1)).not.toThrow(); + expect(() => format('YYMM', 1)).not.toThrow(); + expect(() => format('YYMMM', 1)).not.toThrow(); + expect(() => format('YYMMMM', 1)).not.toThrow(); + expect(() => format('YYMMMMM', 1)).not.toThrow(); + expect(() => format('YYYY', 1)).not.toThrow(); + expect(() => format('YYYY-MM-DD HH:MM:SS', 1)).not.toThrow(); + expect(() => format('YYYY\\-MM\\-DD', 1)).not.toThrow(); + expect(() => format('[$$-409]#,##0', 1)).not.toThrow(); + expect(() => format('[$$-409]#,##0.00', 1)).not.toThrow(); + expect(() => format('[$$-409]#,##0.00_);[Red]\\([$$-409]#,##0.00\\)', 1)).not.toThrow(); + expect(() => format('[$$-C09]#,##0.00', 1)).not.toThrow(); + expect(() => format('[$-100042A]h:mm:ss\\ AM/PM;@', 1)).not.toThrow(); + expect(() => format('[$-1010409]0.000%', 1)).not.toThrow(); + expect(() => format('[$-1010409]General', 1)).not.toThrow(); + expect(() => format('[$-1010409]d/m/yyyy\\ h:mm\\ AM/PM;@', 1)).not.toThrow(); + expect(() => format('[$-1010409]dddd, mmmm dd, yyyy', 1)).not.toThrow(); + expect(() => format('[$-1010409]m/d/yyyy', 1)).not.toThrow(); + expect(() => format('[$-1409]h:mm:ss\\ AM/PM;@', 1)).not.toThrow(); + expect(() => format('[$-2000000]h:mm:ss;@', 1)).not.toThrow(); + expect(() => format('[$-2010401]d/mm/yyyy\\ h:mm\\ AM/PM;@', 1)).not.toThrow(); + expect(() => format('[$-4000439]h:mm:ss\\ AM/PM;@', 1)).not.toThrow(); + expect(() => format('[$-4010439]d/m/yyyy\\ h:mm\\ AM/PM;@', 1)).not.toThrow(); + expect(() => format('[$-409]AM/PM\\ hh:mm:ss;@', 1)).not.toThrow(); + expect(() => format('[$-409]d/m/yyyy\\ hh:mm;@', 1)).not.toThrow(); + expect(() => format('[$-409]d\\-mmm;@', 1)).not.toThrow(); + expect(() => format('[$-409]d\\-mmm\\-yy;@', 1)).not.toThrow(); + expect(() => format('[$-409]d\\-mmm\\-yyyy;@', 1)).not.toThrow(); + expect(() => format('[$-409]dd/mm/yyyy\\ hh:mm;@', 1)).not.toThrow(); + expect(() => format('[$-409]dd\\-mmm\\-yy;@', 1)).not.toThrow(); + expect(() => format('[$-409]h:mm:ss\\ AM/PM;@', 1)).not.toThrow(); + expect(() => format('[$-409]h:mm\\ AM/PM;@', 1)).not.toThrow(); + expect(() => format('[$-409]m/d/yy\\ h:mm\\ AM/PM;@', 1)).not.toThrow(); + expect(() => format('[$-409]mmm\\-yy;@', 1)).not.toThrow(); + expect(() => format('[$-409]mmmm\\ d\\,\\ yyyy;@', 1)).not.toThrow(); + expect(() => format('[$-409]mmmm\\-yy;@', 1)).not.toThrow(); + expect(() => format('[$-409]mmmmm;@', 1)).not.toThrow(); + expect(() => format('[$-409]mmmmm\\-yy;@', 1)).not.toThrow(); + expect(() => format('[$-40E]h\\ "óra"\\ m\\ "perckor"\\ AM/PM;@', 1)).not.toThrow(); + expect(() => format('[$-412]AM/PM\\ h"시"\\ mm"분"\\ ss"초";@', 1)).not.toThrow(); + expect(() => format('[$-41C]h:mm:ss\\.AM/PM;@', 1)).not.toThrow(); + expect(() => format('[$-449]hh:mm:ss\\ AM/PM;@', 1)).not.toThrow(); + expect(() => format('[$-44E]hh:mm:ss\\ AM/PM;@', 1)).not.toThrow(); + expect(() => format('[$-44F]hh:mm:ss\\ AM/PM;@', 1)).not.toThrow(); + expect(() => format('[$-D000409]h:mm\\ AM/PM;@', 1)).not.toThrow(); + expect(() => format('[$-D010000]d/mm/yyyy\\ h:mm\\ "น.";@', 1)).not.toThrow(); + expect(() => format('[$-F400]h:mm:ss\\ AM/PM', 1)).not.toThrow(); + expect(() => format('[$-F800]dddd\\,\\ mmmm\\ dd\\,\\ yyyy', 1)).not.toThrow(); + expect(() => format('[$AUD]\\ #,##0.00', 1)).not.toThrow(); + expect(() => format('[$RD$-1C0A]#,##0.00;[Red]\\-[$RD$-1C0A]#,##0.00', 1)).not.toThrow(); + expect(() => format('[$SFr.-810]\\ #,##0.00_);[Red]\\([$SFr.-810]\\ #,##0.00\\)', 1)).not.toThrow(); + expect(() => format('[$£-809]#,##0.00;[Red][$£-809]#,##0.00', 1)).not.toThrow(); + expect(() => format('[$¥-411]#,##0.00', 1)).not.toThrow(); + expect(() => format('[$¥-804]#,##0.00', 1)).not.toThrow(); + expect(() => format('[<0]"";0%', 1)).not.toThrow(); + expect(() => format('[<=9999999]###\\-####;\\(###\\)\\ ###\\-####', 1)).not.toThrow(); + expect(() => format('[=0]?;#,##0.00', 1)).not.toThrow(); + expect(() => format('[=0]?;0%', 1)).not.toThrow(); + expect(() => format('[=0]?;[<4.16666666666667][hh]:mm:ss;[hh]:mm', 1)).not.toThrow(); + expect(() => format('[>999999]#,,"M";[>999]#,"K";#', 1)).not.toThrow(); + expect(() => format('[>999999]#.000,,"M";[>999]#.000,"K";#.000', 1)).not.toThrow(); + expect(() => format("[>=100000]0.000\\ \\\";[Red]0.000\\ \\<\\ \\>\\ \\\"\\ \\&\\ \\'\\ ", 1)).not.toThrow(); + expect(() => format('[>=100000]0.000\\ \\<;[Red]0.000\\ \\>', 1)).not.toThrow(); + expect(() => format('[BLACK]@', 1)).not.toThrow(); + expect(() => format('[BLUE]GENERAL', 1)).not.toThrow(); + expect(() => format('[Black]@', 1)).not.toThrow(); + expect(() => format('[Blue]General', 1)).not.toThrow(); + expect(() => format('[CYAN]@', 1)).not.toThrow(); + expect(() => format('[Cyan]@', 1)).not.toThrow(); + expect(() => format('[DBNum1][$-804]AM/PMh"时"mm"分";@', 1)).not.toThrow(); + expect(() => format('[DBNum1][$-804]General', 1)).not.toThrow(); + expect(() => format('[DBNum1][$-804]h"时"mm"分";@', 1)).not.toThrow(); + expect(() => format('[$-1004]dddd\\,\\ d\\ mmmm\\,\\ yyyy;@', 1)).not.toThrow(); + expect(() => format('[$-101040D]d\\ mmmm\\ yyyy;@', 1)).not.toThrow(); + expect(() => format('[$-101042A]d\\ mmmm\\ yyyy;@', 1)).not.toThrow(); + expect(() => format('[$-140C]dddd\\ "YeahWoo!"\\ ddd\\ mmmm\\ yyyy;@', 1)).not.toThrow(); + expect(() => format('[$-2C0A]dddd\\ d" de "mmmm" de "yyyy;@', 1)).not.toThrow(); + expect(() => format('[$-402]dd\\ mmmm\\ yyyy\\ "г.";@', 1)).not.toThrow(); + expect(() => format('[$-403]dddd\\,\\ d" / "mmmm" / "yyyy;@', 1)).not.toThrow(); + expect(() => format('[$-405]d\\.\\ mmmm\\ yyyy;@', 1)).not.toThrow(); + expect(() => format('[$-408]d\\ mmmm\\ yyyy;@', 1)).not.toThrow(); + expect(() => format('[$-409]d\\-mmm;@', 1)).not.toThrow(); + expect(() => format('[$-409]d\\-mmm\\-yy;@', 1)).not.toThrow(); + expect(() => format('[$-409]d\\-mmm\\-yyyy;@', 1)).not.toThrow(); + expect(() => format('[$-409]dd\\-mmm\\-yy;@', 1)).not.toThrow(); + expect(() => format('[$-409]mmm\\-yy;@', 1)).not.toThrow(); + expect(() => format('[$-409]mmmm\\ d\\,\\ yyyy;@', 1)).not.toThrow(); + expect(() => format('[$-409]mmmm\\-yy;@', 1)).not.toThrow(); + expect(() => format('[$-40B]d\\.\\ mmmm\\t\\a\\ yyyy;@', 1)).not.toThrow(); + expect(() => format('[$-40C]d/mmm/yyyy;@', 1)).not.toThrow(); + expect(() => format('[$-40E]yyyy/\\ mmmm\\ d\\.;@', 1)).not.toThrow(); + expect(() => format('[$-40F]dd\\.\\ mmmm\\ yyyy;@', 1)).not.toThrow(); + expect(() => format('[$-410]d\\ mmmm\\ yyyy;@', 1)).not.toThrow(); + expect(() => format('[$-415]d\\ mmmm\\ yyyy;@', 1)).not.toThrow(); + expect(() => format('[$-416]d\\ \\ mmmm\\,\\ yyyy;@', 1)).not.toThrow(); + expect(() => format('[$-418]d\\ mmmm\\ yyyy;@', 1)).not.toThrow(); + expect(() => format('[$-41A]d\\.\\ mmmm\\ yyyy\\.;@', 1)).not.toThrow(); + expect(() => format('[$-41B]d\\.\\ mmmm\\ yyyy;@', 1)).not.toThrow(); + expect(() => format('[$-41D]"den "\\ d\\ mmmm\\ yyyy;@', 1)).not.toThrow(); + expect(() => format('[$-420]dddd\\,\\ dd\\ mmmm\\,\\ yyyy;@', 1)).not.toThrow(); + expect(() => format('[$-421]dd\\ mmmm\\ yyyy;@', 1)).not.toThrow(); + expect(() => format('[$-424]dddd\\,\\ d\\.\\ mmmm\\ yyyy;@', 1)).not.toThrow(); + expect(() => format('[$-425]dddd\\,\\ d\\.\\ mmmm\\ yyyy;@', 1)).not.toThrow(); + expect(() => format('[$-426]dddd\\,\\ yyyy". gada "d\\.\\ mmmm;@', 1)).not.toThrow(); + expect(() => format('[$-427]yyyy\\ "m."\\ mmmm\\ d\\ "d.";@', 1)).not.toThrow(); + expect(() => format('[$-42B]dddd\\,\\ d\\ mmmm\\ yyyy;@', 1)).not.toThrow(); + expect(() => format('[$-42C]d\\ mmmm\\ yyyy;@', 1)).not.toThrow(); + expect(() => format('[$-42D]yyyy"(e)ko"\\ mmmm"ren"\\ d"a";@', 1)).not.toThrow(); + expect(() => format('[$-42F]dddd\\,\\ dd\\ mmmm\\ yyyy;@', 1)).not.toThrow(); + expect(() => format('[$-437]yyyy\\ \\წ\\ლ\\ი\\ს\\ dd\\ mm\\,\\ dddd;@', 1)).not.toThrow(); + expect(() => format('[$-438]d\\.\\ mmmm\\ yyyy;@', 1)).not.toThrow(); + expect(() => format('[$-43F]d\\ mmmm\\ yyyy\\ "ж.";@', 1)).not.toThrow(); + expect(() => format('[$-444]d\\ mmmm\\ yyyy;@', 1)).not.toThrow(); + expect(() => format('[$-449]dd\\ mmmm\\ yyyy;@', 1)).not.toThrow(); + expect(() => format('[$-44E]d\\ mmmm\\ yyyy;@', 1)).not.toThrow(); + expect(() => format('[$-44F]dd\\ mmmm\\ yyyy\\ dddd;@', 1)).not.toThrow(); + expect(() => format('[$-457]dd\\ mmmm\\ yyyy;@', 1)).not.toThrow(); + expect(() => format('[$-813]dddd\\ d\\ mmmm\\ yyyy;@', 1)).not.toThrow(); + expect(() => format('[$-81A]dddd\\,\\ d\\.\\ mmmm\\ yyyy;@', 1)).not.toThrow(); + expect(() => format('[$-82C]d\\ mmmm\\ yyyy;@', 1)).not.toThrow(); + expect(() => format('[$-843]yyyy\\ "й""и""л"\\ d/mmmm;@', 1)).not.toThrow(); + expect(() => format('[$-C07]dddd\\,\\ dd\\.\\ mmmm\\ yyyy;@', 1)).not.toThrow(); + expect(() => format('[$-FC19]yyyy\\,\\ dd\\ mmmm;@', 1)).not.toThrow(); + expect(() => format('[$-FC22]d\\ mmmm\\ yyyy" р.";@', 1)).not.toThrow(); + expect(() => format('[$-FC23]d\\ mmmm\\ yyyy;@', 1)).not.toThrow(); + expect(() => format('[GREEN]#,###', 1)).not.toThrow(); + expect(() => format('[Green]#,###', 1)).not.toThrow(); + expect(() => format('[HH]', 1)).not.toThrow(); + expect(() => format('[$-2060401]d/mm/yyyy\\ h:mm\\ AM/PM;@', 1)).not.toThrow(); + expect(() => format('[$-2060401]d\\ mmmm\\ yyyy;@', 1)).not.toThrow(); + expect(() => format('[H]', 1)).not.toThrow(); + expect(() => format('[$-411]gggyy"年"m"月"d"日"\\ dddd;@', 1)).not.toThrow(); + expect(() => format('[MAGENTA]0.00', 1)).not.toThrow(); + expect(() => format('[Magenta]0.00', 1)).not.toThrow(); + expect(() => format('[RED]#.##', 1)).not.toThrow(); + expect(() => format('[Red]#.##', 1)).not.toThrow(); + expect(() => format('[Red][<-25]General;[Blue][>25]General;[Green]General;[Yellow]General\\ ', 1)).not.toThrow(); + expect(() => format('[Red][<=-25]General;[Blue][>=25]General;[Green]General;[Yellow]General', 1)).not.toThrow(); + expect(() => format('[Red][<>50]General;[Blue]000', 1)).not.toThrow(); + expect(() => format('[Red][=50]General;[Blue]000', 1)).not.toThrow(); + expect(() => format('[SS]', 1)).not.toThrow(); + expect(() => format('[S]', 1)).not.toThrow(); + expect(() => format('[DBNum1][$-404]y"年"m"月"d"日";@', 1)).not.toThrow(); + expect(() => format('[WHITE]0.0', 1)).not.toThrow(); + expect(() => format('[White]0.0', 1)).not.toThrow(); + expect(() => format('[YELLOW]@', 1)).not.toThrow(); + expect(() => format('[Yellow]@', 1)).not.toThrow(); + expect(() => format('[h]', 1)).not.toThrow(); + expect(() => format('[h]:mm:ss', 1)).not.toThrow(); + expect(() => format('[h]:mm:ss;@', 1)).not.toThrow(); + expect(() => format('[h]\\.mm" Uhr ";@', 1)).not.toThrow(); + expect(() => format('[hh]', 1)).not.toThrow(); + expect(() => format('[s]', 1)).not.toThrow(); + expect(() => format('[ss]', 1)).not.toThrow(); + expect(() => format('\\#\\r\\e\\c', 1)).not.toThrow(); + expect(() => format('\\$#,##0_);[Red]"($"#,##0\\)', 1)).not.toThrow(); + expect(() => format('\\$0.00', 1)).not.toThrow(); + expect(() => format('\\C\\O\\B\\ \\o\\n\\ @', 1)).not.toThrow(); + expect(() => format('\\C\\R\\O\\N\\T\\A\\B\\ \\o\\n\\ @', 1)).not.toThrow(); + expect(() => format('\\R\\e\\s\\u\\l\\t\\ \\o\\n\\ @', 1)).not.toThrow(); + expect(() => format('\\S\\Q\\L\\ \\:\\ @', 1)).not.toThrow(); + expect(() => format('\\S\\Q\\L\\ \\R\\e\\q\\u\\e\\s\\t\\ \\f\\o\\r\\ @', 1)).not.toThrow(); + expect(() => format('\\c\\c\\c?????0"aaaa"0"bbbb"000000.00%', 1)).not.toThrow(); + expect(() => format('\\u\\n\\t\\i\\l\\ h:mm;@', 1)).not.toThrow(); + expect( + () => format('_ "¥"* #,##0.00_ "Positive";_ "¥"* \\-#,##0.00_ ;_ "¥"* "-"??_ "Negtive";_ @_ \\ "Zero"', 1) + ).not.toThrow(); + expect( + () => format('_ * #,##0.00_)[$﷼-429]_ ;_ * \\(#,##0.00\\)[$﷼-429]_ ;_ * "-"??_)[$﷼-429]_ ;_ @_ ', 1) + ).not.toThrow(); + expect(() => format('_ * #,##0_ ;_ * \\-#,##0_ ;[Red]_ * "-"_ ;_ @_ ', 1)).not.toThrow(); + expect(() => format('_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)', 1)).not.toThrow(); + expect(() => format('_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"??_);_(@_)', 1)).not.toThrow(); + expect(() => format('_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)', 1)).not.toThrow(); + expect(() => format('_(* #,##0.0000_);_(* \\(#,##0.0000\\);_(* "-"??_);_(@_)', 1)).not.toThrow(); + expect(() => format('_(* #,##0.000_);_(* \\(#,##0.000\\);_(* "-"??_);_(@_)', 1)).not.toThrow(); + expect(() => format('_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)', 1)).not.toThrow(); + expect(() => format('_(* #,##0.0_);_(* \\(#,##0.0\\);_(* "-"??_);_(@_)', 1)).not.toThrow(); + expect(() => format('_(* #,##0_);_(* \\(#,##0\\);_(* "-"??_);_(@_)', 1)).not.toThrow(); + expect(() => format('_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)', 1)).not.toThrow(); + expect(() => format('_([$ANG]\\ * #,##0.0_);_([$ANG]\\ * \\(#,##0.0\\);_([$ANG]\\ * "-"?_);_(@_)', 1)).not.toThrow(); + expect(() => format('_-"€"\\ * #,##0.00_-;_-"€"\\ * #,##0.00\\-;_-"€"\\ * "-"??_-;_-@_-', 1)).not.toThrow(); + expect(() => format('_-* #,##0.00" TL"_-;\\-* #,##0.00" TL"_-;_-* \\-??" TL"_-;_-@_-', 1)).not.toThrow(); + expect(() => format('_-* #,##0.00" €"_-;\\-* #,##0.00" €"_-;_-* \\-??" €"_-;_-@_-', 1)).not.toThrow(); + expect(() => format('_-* #,##0.00\\ "р."_-;\\-* #,##0.00\\ "р."_-;_-* "-"??\\ "р."_-;_-@_-', 1)).not.toThrow(); + expect(() => format('_-* #,##0.00\\ "€"_-;\\-* #,##0.00\\ "€"_-;_-* "-"??\\ "€"_-;_-@_-', 1)).not.toThrow(); + expect( + () => format('_-* #,##0.00\\ [$€-407]_-;\\-* #,##0.00\\ [$€-407]_-;_-* \\-??\\ [$€-407]_-;_-@_-', 1) + ).not.toThrow(); + expect(() => format('_-* #,##0.0\\ _F_-;\\-* #,##0.0\\ _F_-;_-* "-"??\\ _F_-;_-@_-', 1)).not.toThrow(); + expect(() => format('_-* #,##0\\ "€"_-;\\-* #,##0\\ "€"_-;_-* "-"\\ "€"_-;_-@_-', 1)).not.toThrow(); + expect(() => format('_-* #,##0_-;\\-* #,##0_-;_-* "-"??_-;_-@_-', 1)).not.toThrow(); + expect(() => format('_-\\$* #,##0.0_ ;_-\\$* \\-#,##0.0\\ ;_-\\$* "-"?_ ;_-@_ ', 1)).not.toThrow(); + expect(() => format('d', 1)).not.toThrow(); + expect(() => format('d-mmm', 1)).not.toThrow(); + expect(() => format('d-mmm-yy', 1)).not.toThrow(); + expect(() => format('d/m', 1)).not.toThrow(); + expect(() => format('d/m/yy;@', 1)).not.toThrow(); + expect(() => format('d/m/yyyy;@', 1)).not.toThrow(); + expect(() => format('d/mm/yy;@', 1)).not.toThrow(); + expect(() => format('d/mm/yyyy;@', 1)).not.toThrow(); + expect(() => format('d\\-mmm', 1)).not.toThrow(); + expect(() => format('d\\-mmm\\-yyyy', 1)).not.toThrow(); + expect(() => format('dd', 1)).not.toThrow(); + expect(() => format('dd"-"mmm"-"yyyy', 1)).not.toThrow(); + expect(() => format('dd/m/yyyy', 1)).not.toThrow(); + expect(() => format('dd/mm/yy', 1)).not.toThrow(); + expect(() => format('dd/mm/yy;@', 1)).not.toThrow(); + expect(() => format('dd/mm/yy\\ hh:mm', 1)).not.toThrow(); + expect(() => format('dd/mm/yyyy', 1)).not.toThrow(); + expect(() => format('dd/mm/yyyy\\ hh:mm:ss', 1)).not.toThrow(); + expect(() => format('dd/mmm', 1)).not.toThrow(); + expect(() => format('dd\\-mm\\-yy', 1)).not.toThrow(); + expect(() => format('dd\\-mmm\\-yy', 1)).not.toThrow(); + expect(() => format('dd\\-mmm\\-yyyy\\ hh:mm:ss.000', 1)).not.toThrow(); + expect(() => format('dd\\/mm\\/yy', 1)).not.toThrow(); + expect(() => format('dd\\/mm\\/yyyy', 1)).not.toThrow(); + expect(() => format('ddd', 1)).not.toThrow(); + expect(() => format('dddd', 1)).not.toThrow(); + expect(() => format('dddd, mmmm dd, yyyy', 1)).not.toThrow(); + expect(() => format('h', 1)).not.toThrow(); + expect(() => format('h"时"mm"分"ss"秒";@', 1)).not.toThrow(); + expect(() => format('h"時"mm"分"ss"秒";@', 1)).not.toThrow(); + expect(() => format('h:mm', 1)).not.toThrow(); + expect(() => format('h:mm AM/PM', 1)).not.toThrow(); + expect(() => format('h:mm:ss', 1)).not.toThrow(); + expect(() => format('h:mm:ss AM/PM', 1)).not.toThrow(); + expect(() => format('h:mm:ss;@', 1)).not.toThrow(); + expect(() => format('h:mm;@', 1)).not.toThrow(); + expect(() => format('h\\.mm" Uhr ";@', 1)).not.toThrow(); + expect(() => format('h\\.mm" h";@', 1)).not.toThrow(); + expect(() => format('h\\.mm" u.";@', 1)).not.toThrow(); + expect(() => format('hh":"mm AM/PM', 1)).not.toThrow(); + expect(() => format('hh:mm:ss', 1)).not.toThrow(); + expect(() => format('hh:mm:ss\\ AM/PM', 1)).not.toThrow(); + expect(() => format('hh\\.mm" h";@', 1)).not.toThrow(); + expect(() => format('hhm', 1)).not.toThrow(); + expect(() => format('hhmm', 1)).not.toThrow(); + expect(() => format('m"月"d"日"', 1)).not.toThrow(); + expect(() => format('m/d/yy', 1)).not.toThrow(); + expect(() => format('m/d/yy h:mm', 1)).not.toThrow(); + expect(() => format('m/d/yy;@', 1)).not.toThrow(); + expect(() => format('m/d/yy\\ h:mm', 1)).not.toThrow(); + expect(() => format('m/d/yy\\ h:mm;@', 1)).not.toThrow(); + expect(() => format('m/d/yyyy', 1)).not.toThrow(); + expect(() => format('m/d/yyyy;@', 1)).not.toThrow(); + expect(() => format('m/d/yyyy\\ h:mm:ss;@', 1)).not.toThrow(); + expect(() => format('m/d;@', 1)).not.toThrow(); + expect(() => format('m\\/d\\/yyyy', 1)).not.toThrow(); + expect(() => format('mm/dd', 1)).not.toThrow(); + expect(() => format('mm/dd/yy', 1)).not.toThrow(); + expect(() => format('mm/dd/yy;@', 1)).not.toThrow(); + expect(() => format('mm/dd/yyyy', 1)).not.toThrow(); + expect(() => format('mm:ss', 1)).not.toThrow(); + expect(() => format('mm:ss.0;@', 1)).not.toThrow(); + expect(() => format('mmm d, yyyy', 1)).not.toThrow(); + expect(() => format('mmm" "d", "yyyy', 1)).not.toThrow(); + expect(() => format('mmm-yy', 1)).not.toThrow(); + expect(() => format('mmm-yy;@', 1)).not.toThrow(); + expect(() => format('mmm/yy', 1)).not.toThrow(); + expect(() => format('mmm\\-yy', 1)).not.toThrow(); + expect(() => format('mmm\\-yy;@', 1)).not.toThrow(); + expect(() => format('mmm\\-yyyy', 1)).not.toThrow(); + expect(() => format('mmmm\\ d\\,\\ yyyy', 1)).not.toThrow(); + expect(() => format('mmmm\\ yyyy', 1)).not.toThrow(); + expect(() => format('mmss.0', 1)).not.toThrow(); + expect(() => format('s', 1)).not.toThrow(); + expect(() => format('ss', 1)).not.toThrow(); + expect(() => format('yy', 1)).not.toThrow(); + expect(() => format('yy/mm/dd', 1)).not.toThrow(); + expect(() => format('yy\\.mm\\.dd', 1)).not.toThrow(); + expect(() => format('yym', 1)).not.toThrow(); + expect(() => format('yymm', 1)).not.toThrow(); + expect(() => format('yymmm', 1)).not.toThrow(); + expect(() => format('yymmmm', 1)).not.toThrow(); + expect(() => format('yymmmmm', 1)).not.toThrow(); + expect(() => format('yyyy', 1)).not.toThrow(); + expect(() => format('yyyy"년"\\ m"월"\\ d"일";@', 1)).not.toThrow(); + expect(() => format('yyyy-m-d h:mm AM/PM', 1)).not.toThrow(); + expect(() => format('yyyy-mm-dd', 1)).not.toThrow(); + expect(() => format('yyyy/mm/dd', 1)).not.toThrow(); + expect(() => format('yyyy\\-m\\-d\\ hh:mm:ss', 1)).not.toThrow(); + expect(() => format('yyyy\\-mm\\-dd', 1)).not.toThrow(); + expect(() => format('yyyy\\-mm\\-dd;@', 1)).not.toThrow(); + expect(() => format('yyyy\\-mm\\-dd\\ h:mm', 1)).not.toThrow(); + expect(() => format('yyyy\\-mm\\-dd\\Thh:mm', 1)).not.toThrow(); + expect(() => format('yyyy\\-mm\\-dd\\Thhmmss.000', 1)).not.toThrow(); }); diff --git a/test/text.spec.ts b/test/text.spec.ts index 992ecd3..68a69a5 100644 --- a/test/text.spec.ts +++ b/test/text.spec.ts @@ -1,29 +1,26 @@ +import { expect, test } from 'vitest'; import { format } from '../lib/index.js'; -import test from './utils.js'; -test('Errors', t => { +test('Errors', () => { // no more than a single text section - t.throws(() => format('@;@'), '@;@'); - t.end(); + expect(() => format('@;@'), '@;@').toThrow(); }); -test('Repeated @ in same pattern', t => { - t.format('@@', 1, '1'); - t.format('@@', -1, '-1'); - t.format('@@', 0, '0'); - t.format('@@', 'text', 'texttext'); - t.end(); +test('Repeated @ in same pattern', () => { + expect(format('@@', 1)).toBe('1'); + expect(format('@@', -1)).toBe('-1'); + expect(format('@@', 0)).toBe('0'); + expect(format('@@', 'text')).toBe('texttext'); }); -test('Text in combination with other things', t => { - t.format('@ "foo"', 1, '1'); - t.format('@ "foo"', -1, '-1'); - t.format('@ "foo"', 0, '0'); - t.format('@ "foo"', 'text', 'text foo'); +test('Text in combination with other things', () => { + expect(format('@ "foo"', 1)).toBe('1'); + expect(format('@ "foo"', -1)).toBe('-1'); + expect(format('@ "foo"', 0)).toBe('0'); + expect(format('@ "foo"', 'text')).toBe('text foo'); - t.format('"bar" @ "foo"', 1, '1'); - t.format('"bar" @ "foo"', -1, '-1'); - t.format('"bar" @ "foo"', 0, '0'); - t.format('"bar" @ "foo"', 'text', 'bar text foo'); - t.end(); + expect(format('"bar" @ "foo"', 1)).toBe('1'); + expect(format('"bar" @ "foo"', -1)).toBe('-1'); + expect(format('"bar" @ "foo"', 0)).toBe('0'); + expect(format('"bar" @ "foo"', 'text')).toBe('bar text foo'); }); diff --git a/test/utils.ts b/test/utils.ts index bb7853d..92bb583 100644 --- a/test/utils.ts +++ b/test/utils.ts @@ -1,18 +1,17 @@ -import test, { Test } from 'tape'; -import { format, formatColor, getFormatDateInfo, getFormatInfo } from '../lib/index.js'; -import fs from 'fs'; -import path from 'path'; -import zlib from 'zlib'; -import { fileURLToPath } from 'url'; +import fs from 'node:fs'; +import zlib from 'node:zlib'; +import { fileURLToPath } from 'node:url'; +import { expect, test } from 'vitest'; +import { format } from '../lib/index.js'; const VALUE_ERROR = '#VALUE!'; -function getTimeZoneName () { +export function getTimeZoneName (): string { const ds = new Date().toString(); return ds.replace(/^.*GMT\+\d{4} \((.*?)\)$/, '$1'); } -function getTimeZoneOffset (d) { +export function getTimeZoneOffset (d: Date): number { const temp = new Date(); temp.setUTCFullYear( d.getFullYear(), @@ -25,18 +24,20 @@ function getTimeZoneOffset (d) { d.getSeconds(), d.getMilliseconds() ); - return (d - temp) / 60000; + return (d.getTime() - temp.getTime()) / 60000; } -function isLeapYear (year) { +export function isLeapYear (year: number): boolean { return !!(!(year % 4) && year % 100) || !(year % 400); } -Test.prototype.runTable = function runSSFTable (pathToTable) { +export function runTable (pathToTable: string): void { + if (process.env.SKIPTABLES) { + test.skip('Table: ' + pathToTable); + return; + } const filename = fileURLToPath(new URL(pathToTable, import.meta.url)); - // eslint-disable-next-line - if (process.env.SKIPTABLES) { return; } - const tableFN = path.join(filename) + '.gz'; + const tableFN = filename + '.gz'; const table = zlib.gunzipSync(fs.readFileSync(tableFN)) .toString('utf8') .replace(/\r/g, '') @@ -47,8 +48,8 @@ Test.prototype.runTable = function runSSFTable (pathToTable) { const startPos = 1; const endPos = table.length; headers.slice(1).forEach((code, hi) => { - this.test('Pattern: ' + code, t => { - let failCount = 0; + test('Pattern: ' + code, () => { + const failures: string[] = []; for (let i = startPos; i < endPos; i++) { const d = table[i]; if (!d[0]) { break; } @@ -65,119 +66,14 @@ Test.prototype.runTable = function runSSFTable (pathToTable) { dateErrorThrows: true }); } - catch (err) { + catch { res = VALUE_ERROR; } if (res !== exp) { - failCount++; - t.fail(`${i - 1}: numfmt('${code}', ${d[0]}) => ${res} !== ${exp}`); + failures.push(`${i - 1}: numfmt('${code}', ${d[0]}) => ${res} !== ${exp}`); } } - if (!failCount) { - t.pass('OK'); - } - t.end(); + expect(failures, failures.join('\n')).toEqual([]); }); }); -}; - -function formatMessage (pattern, value, options) { - let message = pattern; - const suffix = (typeof value === 'bigint') ? 'n' : ''; - message += '\x1b[36m <=> ' + value + suffix; - const o = JSON.stringify(options); - if (o !== '{}') { - message += '\x1b[2m\x1b[33m [ OPTIONS=' + o + ' ]'; - } - message += '\x1b[0m'; - return message; } - -// extend tape to be able to omit descriptions - -Test.prototype.format = function assertFormat (pattern, value, expected, options = {}) { - const output = format(pattern, value, options); - this.is(output, expected, formatMessage(pattern, value, options)); -}; - -Test.prototype.validFormat = function assertFormatParses (pattern, options = {}) { - const message = formatMessage(pattern, null, options); - try { - format(pattern, 1); - this.pass(message); - } - catch (err) { - this.fail(message); - } -}; - -Test.prototype.formatColor = function assertFormat (pattern, value, expected, options = {}) { - const output = formatColor(pattern, value, options); - this.is(output, expected, formatMessage(pattern, value, options)); -}; - -Test.prototype.formatInvalid = function assertFormatThrows (pattern, options = {}) { - this.throws( - () => { - format(pattern, '', options); - }, - null, - formatMessage(pattern, null, options) - ); -}; - -Test.prototype.formatThrows = function assertFormatThrows (pattern, value, expected, options = {}) { - this.throws( - () => format(pattern, value, options), - expected, - formatMessage(pattern, value, options) - ); -}; - -const commonProps = { - isDate: false, - isText: false, - isPercent: false, - maxDecimals: 0, - grouped: 0, - parentheses: 0, - color: 0, - scale: 1, - level: 0 -}; - -function alphabetizeProps (obj) { - const keys = Object.keys(obj).sort(); - return keys.reduce((a, c) => { a[c] = obj[c]; return a; }, {}); -} - -Test.prototype.assertInfo = function (fmtString, expectProps) { - const output = { ...getFormatInfo(fmtString) }; - this.deepEqual( - alphabetizeProps(output), - alphabetizeProps({ ...commonProps, ...expectProps }), - fmtString - ); -}; - -const commonDateProps = { - year: false, - month: false, - day: false, - hours: false, - minutes: false, - seconds: false, - clockType: 24 -}; - -Test.prototype.assertDateInfo = function (fmtString, expectProps) { - const output = getFormatDateInfo(fmtString); - this.deepEqual( - alphabetizeProps(output), - alphabetizeProps({ ...commonDateProps, ...expectProps }), - fmtString - ); -}; - -export { test, Test, getTimeZoneName, getTimeZoneOffset, isLeapYear }; -export default test; From e008331ffb436a4d551b4d706a3338001932d5cf Mon Sep 17 00:00:00 2001 From: Borgar Date: Tue, 25 Aug 2026 19:02:04 +0000 Subject: [PATCH 03/14] Remove tape packages and add vitest --- package-lock.json | 5254 +++++++++++++++------------------------------ package.json | 9 +- 2 files changed, 1704 insertions(+), 3559 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5f38f21..7e86357 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,11 +21,10 @@ "globals": "~17.11.0", "jsdoc": "~4.0.5", "rollup": "~4.62.5", - "tap-min": "~3.0.0", - "tape": "~5.10.2", "typedoc-plugin-markdown": "~4.12.0", "typescript": "~5.9.3", - "typescript-eslint": "~8.68.0" + "typescript-eslint": "~8.68.0", + "vitest": "~4.1.11" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -1907,58 +1906,146 @@ "node": ">=v12.0.0" } }, - "node_modules/@ljharb/now": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@ljharb/now/-/now-1.0.1.tgz", - "integrity": "sha512-yRQ3B8l2v4vTLQ2l+4kBu6EsXaX7czuLB7fvUz0vkHHziHje75R2t/0Mm/vIo31tlZVCEvCoXHkNKW+ugv3uSA==", + "node_modules/@napi-rs/lzma-linux-x64-gnu": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-x64-gnu/-/lzma-linux-x64-gnu-1.5.1.tgz", + "integrity": "sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ==", + "cpu": [ + "x64" + ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "call-bound": "^1.0.4", - "get-intrinsic": "^1.3.0" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">= 0.4" - }, + "node": "^22.20 || ^24.12 || >=25" + } + }, + "node_modules/@oxc-project/types": { + "version": "0.146.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.146.0.tgz", + "integrity": "sha512-XC0QsnnhVe7sLIWmYmdPw7x5P0h4W8vUU3Nv1ySgWXtvCz8NizoAEpGXA0sOYoJQV2Rl13LgURAHQ5cI5ILCSA==", + "dev": true, + "license": "MIT", "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/Boshen" } }, - "node_modules/@ljharb/resumer": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@ljharb/resumer/-/resumer-0.1.3.tgz", - "integrity": "sha512-d+tsDgfkj9X5QTriqM4lKesCkMMJC3IrbPKHvayP00ELx2axdXvDfWkqjxrLXIzGcQzmj7VAUT1wopqARTvafw==", + "node_modules/@rolldown/binding-android-arm-eabi": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm-eabi/-/binding-android-arm-eabi-1.2.5.tgz", + "integrity": "sha512-DLe/i+l8ynIBY7XEQ191TeZvCoowIGa18R+dIV30GW7DiOtp74i/xX8hs8GUjW5ARV7VZuie3d6AumSmCwbeRA==", + "cpu": [ + "arm" + ], "dev": true, - "dependencies": { - "@ljharb/through": "^2.3.13", - "call-bind": "^1.0.7" - }, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], "engines": { - "node": ">= 0.4" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@ljharb/through": { - "version": "2.3.14", - "resolved": "https://registry.npmjs.org/@ljharb/through/-/through-2.3.14.tgz", - "integrity": "sha512-ajBvlKpWucBB17FuQYUShqpqy8GRgYEpJW0vWJbUu1CV9lWyrDCapy0lScU8T8Z6qn49sSwJB3+M+evYIdGg+A==", + "node_modules/@rolldown/binding-android-arm64": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.2.5.tgz", + "integrity": "sha512-zXcwKlQApYAOELHd8PwKDFkagYF9Wy4e0RJ+0qnzl9Pjnpj75TEG8ufv40p2J7kCEfwZAsNiuzRIyNNMWT38ig==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8" - }, + "optional": true, + "os": [ + "android" + ], "engines": { - "node": ">= 0.4" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@napi-rs/lzma-linux-x64-gnu": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-x64-gnu/-/lzma-linux-x64-gnu-1.5.1.tgz", - "integrity": "sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ==", + "node_modules/@rolldown/binding-darwin-arm64": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.2.5.tgz", + "integrity": "sha512-dK4QakI42nzWgJT5sm4y4y/O//D4OxM75/cH28RLV+nzIN9AY+YsbuUVrUTjlLjXR6vpyxFbSsbmNuJ6BP9sww==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-darwin-x64": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.2.5.tgz", + "integrity": "sha512-fqSALaUu1Wjd1nK2uW2kJDWdLCc8lx1IcY+MTY26Aurfdx19anlzhqXOgCFbBFQnlFDTn4TC1/7Nz4Bl2mLP3A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-freebsd-x64": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.2.5.tgz", + "integrity": "sha512-/vCnNxlkxs9tKxNDcyWUePpJ/PgTzxIaVhoM5SmG8UV+GR/IcPam4VYxi7GIMo7PSDuNqlJqvprqii9NqqVCMw==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm-gnueabihf": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.2.5.tgz", + "integrity": "sha512-abk0NLA519LxRCszmbE0jYKuQ9YPocOXTiOXOo6Yr+YAT95VH+PtqYAjOJvGKt3viEd/x4qzabAlwd5bHOOARg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm64-gnu": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.2.5.tgz", + "integrity": "sha512-Y7eALiJ8lr0M2HH103Js+g7V34wf6snlpZLAsHI90uLhr3PVlNsbFVAXJC9d/V6BnPyKtpSwI+NcB/RLxsQxuA==", + "cpu": [ + "arm64" + ], + "dev": true, "libc": [ "glibc" ], @@ -1968,9 +2055,167 @@ "linux" ], "engines": { - "node": "^22.20 || ^24.12 || >=25" + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm64-musl": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.2.5.tgz", + "integrity": "sha512-xMvZgnbZg4YVnR/AX2b3oOPDTFYJvUVaJg5FedA/LuvexAtXibZQej4cnTkw3rjsJ/ggUROB64TdtETiim+FYA==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-ppc64-gnu": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.2.5.tgz", + "integrity": "sha512-GRjeqTUDHTo5GwntsLaAMcBahG3nlpjftXWZLN73HiYQlhwEowvarFgQnRnQZtIp4keXX7quXFbG38uPZBa2EA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-s390x-gnu": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.2.5.tgz", + "integrity": "sha512-vLNTR45F2Uwc8AufkNXPmB4VliaXs+FvcheEogIzOXzO4l+LzieXF5A/TWxLy5HtqpsRCHUfd0lPVrrdgXdLHQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-gnu": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.2.5.tgz", + "integrity": "sha512-Mgj59/HTuYeK9Gz2MA+mBWKnHsAgkBSec15ZMb1st3oIfFbX7gCjOae7GydHhzcyQi9Z/7M1QuN9bR3oFqF0jQ==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-musl": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.2.5.tgz", + "integrity": "sha512-mY8AP0/ichsbhAxGnLa3d3+MwV0EfgrPND2bplI3Ym8T6R2pJ0N87bvrKVwNXmdy3jnr6eQBecdqx/HMknBmpA==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-openharmony-arm64": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.2.5.tgz", + "integrity": "sha512-8SLssA2oweAxyRgDp789ACfRb/3P+zNRJpzZxSizxF9m8NUDQ4+3xjo8ttjhVGGw6Qxb70oZiEtIjaKikCO7Yw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-win32-arm64-msvc": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.2.5.tgz", + "integrity": "sha512-vGbruD5zquhoc8D9SViXgN2FBJtNdTyQ4DtG+SWiEGlJiAzoKcZ2xp+xuXCffhubVdt0NJlTZqkeRuERy7g8Cw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-win32-x64-msvc": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.2.5.tgz", + "integrity": "sha512-e/SXpgISz+IoqVcSSI0rx/d/he8zqLex+/rCWpnHpmVfmPIUjag9H6P7zotf0gJHwPUhQxZ/mF8tr6acebT9yw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" } }, + "node_modules/@rolldown/pluginutils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.1.tgz", + "integrity": "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==", + "dev": true, + "license": "MIT" + }, "node_modules/@rollup/plugin-babel": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-7.1.0.tgz", @@ -2487,6 +2732,13 @@ "license": "MIT", "peer": true }, + "node_modules/@standard-schema/spec": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz", + "integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==", + "dev": true, + "license": "MIT" + }, "node_modules/@stylistic/eslint-plugin": { "version": "5.9.0", "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin/-/eslint-plugin-5.9.0.tgz", @@ -2521,6 +2773,24 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/@types/chai": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz", + "integrity": "sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/deep-eql": "*", + "assertion-error": "^2.0.1" + } + }, + "node_modules/@types/deep-eql": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz", + "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/esrecurse": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/@types/esrecurse/-/esrecurse-4.3.1.tgz", @@ -2888,153 +3158,183 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/acorn": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz", - "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==", + "node_modules/@vitest/expect": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.11.tgz", + "integrity": "sha512-VX2x5vNJXET47KAFzwERI+KRMtTTCSWTfSMKsW7JsUsXV4psq++e3DvZpuTDOpHcxytiDs6p2nhVb2tVDiiUYw==", "dev": true, "license": "MIT", - "bin": { - "acorn": "bin/acorn" + "dependencies": { + "@standard-schema/spec": "^1.1.0", + "@types/chai": "^5.2.2", + "@vitest/spy": "4.1.11", + "@vitest/utils": "4.1.11", + "chai": "^6.2.2", + "tinyrainbow": "^3.1.0" }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + "funding": { + "url": "https://opencollective.com/vitest" } }, - "node_modules/ajv": { - "version": "6.15.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.15.0.tgz", - "integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==", + "node_modules/@vitest/mocker": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.1.11.tgz", + "integrity": "sha512-2XJVD55d1o5AZous5CCGKS74g/riOj9odEt2bQpCVZeblHyHdnMeFl4jl0XjU21stf4mbjUkew2eXQZt65g5CQ==", "dev": true, "license": "MIT", "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" + "@vitest/spy": "4.1.11", + "estree-walker": "^3.0.3", + "magic-string": "^0.30.21" }, "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "msw": "^2.4.9", + "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "msw": { + "optional": true + }, + "vite": { + "optional": true + } } }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true + "node_modules/@vitest/mocker/node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0" + } }, - "node_modules/array-buffer-byte-length": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz", - "integrity": "sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==", + "node_modules/@vitest/pretty-format": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.1.11.tgz", + "integrity": "sha512-yiZzPbGTS9Sr/JpFl8zHrcIkAofNbFV6k21vIgQN/cY/oxZeXhJv5sc/MBJ5jFKWmWs+oJHw0UXLZjmf931+Vw==", "dev": true, "license": "MIT", "dependencies": { - "call-bound": "^1.0.3", - "is-array-buffer": "^3.0.5" - }, - "engines": { - "node": ">= 0.4" + "tinyrainbow": "^3.1.0" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://opencollective.com/vitest" } }, - "node_modules/array.prototype.every": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/array.prototype.every/-/array.prototype.every-1.1.7.tgz", - "integrity": "sha512-BIP72rKvrKd08ptbetLb4qvrlGjkv30yOKgKcTtOIbHyQt3shr/jyOzdApiCOh3LPYrpJo5M6i0zmVldOF2pUw==", + "node_modules/@vitest/runner": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.1.11.tgz", + "integrity": "sha512-LztvUgdwMNJMIkj3hQnnxiC2Xy1zNxq928W/xhjCLaNCzqTZOudjwbQf6v9IntZGPw132i2Lq2rgTRZHD3JHNw==", "dev": true, "license": "MIT", "dependencies": { - "call-bound": "^1.0.2", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-object-atoms": "^1.0.0", - "is-string": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" + "@vitest/utils": "4.1.11", + "pathe": "^2.0.3" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://opencollective.com/vitest" } }, - "node_modules/array.prototype.flatmap": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.3.tgz", - "integrity": "sha512-Y7Wt51eKJSyi80hFrJCePGGNo5ktJCslFuboqJsbf57CCPcm5zztluPlc4/aD8sWsKvlwatezpV4U1efk8kpjg==", + "node_modules/@vitest/snapshot": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.1.11.tgz", + "integrity": "sha512-pN7ikn1ON7h8ee4gIAp4AzyK+zBtJPzVbqOgu5LCEh4VaJVbPQcgYQYJIMGQPXVeJJq1fnfazis7a5pFNPahog==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" + "@vitest/pretty-format": "4.1.11", + "@vitest/utils": "4.1.11", + "magic-string": "^0.30.21", + "pathe": "^2.0.3" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://opencollective.com/vitest" } }, - "node_modules/arraybuffer.prototype.slice": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz", - "integrity": "sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==", + "node_modules/@vitest/spy": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.1.11.tgz", + "integrity": "sha512-apNa/prQy2qCeywhnixOHPRCgGNhvg7T4Dapfl1GahLp/R+uhBm5cPyFoNVyqsNd2h1nJxL6BqqdIjiABL60YA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/utils": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.11.tgz", + "integrity": "sha512-zTCVGpyFsGWBhllOyKlTw/vnr6D9qxsfSDyfbyZmTyjHw5N/VuvzHpHoQjm2ZJzn4RJgx5w4r7V0er69CmLgPQ==", "dev": true, "license": "MIT", "dependencies": { - "array-buffer-byte-length": "^1.0.1", - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6", - "is-array-buffer": "^3.0.4" - }, - "engines": { - "node": ">= 0.4" + "@vitest/pretty-format": "4.1.11", + "convert-source-map": "^2.0.0", + "tinyrainbow": "^3.1.0" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://opencollective.com/vitest" } }, - "node_modules/async-function": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/async-function/-/async-function-1.0.0.tgz", - "integrity": "sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==", + "node_modules/acorn": { + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz", + "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==", "dev": true, "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, "engines": { - "node": ">= 0.4" + "node": ">=0.4.0" } }, - "node_modules/available-typed-arrays": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", - "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.15.0.tgz", + "integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==", "dev": true, + "license": "MIT", "dependencies": { - "possible-typed-array-names": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/assertion-error": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", + "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" } }, "node_modules/babel-plugin-polyfill-corejs2": { @@ -3079,12 +3379,6 @@ "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" } }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, "node_modules/baseline-browser-mapping": { "version": "2.9.19", "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.9.19.tgz", @@ -3101,17 +3395,6 @@ "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", "dev": true }, - "node_modules/brace-expansion": { - "version": "1.1.18", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.18.tgz", - "integrity": "sha512-Edep/X9fGqVNmzKBVsDYIOtD+z1tuezV70LBjdCst9Tqu76lsnvRiZ6oTic1n+/BIwX6QDGAO94PN4N2SADvtw==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, "node_modules/browserslist": { "version": "4.28.1", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.1.tgz", @@ -3152,56 +3435,6 @@ "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "dev": true }, - "node_modules/call-bind": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.9.tgz", - "integrity": "sha512-a/hy+pNsFUTR+Iz8TCJvXudKVLAnz/DyeSUo10I5yvFDQJBFU2s9uqQpoSrJlroHUKoKqzg+epxyP9lqFdzfBQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "es-define-property": "^1.0.1", - "get-intrinsic": "^1.3.0", - "set-function-length": "^1.2.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/call-bind-apply-helpers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", - "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/call-bound": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", - "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "get-intrinsic": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/caniuse-lite": { "version": "1.0.30001769", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001769.tgz", @@ -3235,18 +3468,22 @@ "node": ">= 10" } }, + "node_modules/chai": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/chai/-/chai-6.2.2.tgz", + "integrity": "sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, "node_modules/commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "dev": true }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, "node_modules/convert-source-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", @@ -3281,60 +3518,6 @@ "node": ">= 8" } }, - "node_modules/data-view-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.2.tgz", - "integrity": "sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/data-view-byte-length": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.2.tgz", - "integrity": "sha512-tuhGbE6CfTM9+5ANGf+oQb72Ky/0+s3xKUpHvShfiz2RxMFgFPjsXuRLBVMtvMs15awe45SRb83D6wH4ew6wlQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/inspect-js" - } - }, - "node_modules/data-view-byte-offset": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.1.tgz", - "integrity": "sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/debug": { "version": "4.4.3", "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", @@ -3353,124 +3536,20 @@ } } }, - "node_modules/deep-equal": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.3.tgz", - "integrity": "sha512-ZIwpnevOurS8bpT4192sqAowWM76JDKSHYzMLty3BZGSswgq6pBaH3DhCSW5xVAZICZyKdOBPjwww5wfgT/6PA==", - "dev": true, - "dependencies": { - "array-buffer-byte-length": "^1.0.0", - "call-bind": "^1.0.5", - "es-get-iterator": "^1.1.3", - "get-intrinsic": "^1.2.2", - "is-arguments": "^1.1.1", - "is-array-buffer": "^3.0.2", - "is-date-object": "^1.0.5", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.2", - "isarray": "^2.0.5", - "object-is": "^1.1.5", - "object-keys": "^1.1.1", - "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.5.1", - "side-channel": "^1.0.4", - "which-boxed-primitive": "^1.0.2", - "which-collection": "^1.0.1", - "which-typed-array": "^1.1.13" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, - "node_modules/define-data-property": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", - "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", - "dev": true, - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/define-properties": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", - "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", - "dev": true, - "dependencies": { - "define-data-property": "^1.0.1", - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/defined": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.1.tgz", - "integrity": "sha512-hsBd2qSVCRE+5PmNdHt1uzyrFu5d3RwmFDKzyNZMFq/EwDNJF7Ee5+D5oEKF0hU6LhtoUF1macFvOe4AskQC1Q==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/dotignore": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/dotignore/-/dotignore-0.1.2.tgz", - "integrity": "sha512-UGGGWfSauusaVJC+8fgV+NVvBXkCTmVv7sk6nojDZZvuOUNGUy0Zk4UpHQD6EDjS0jpBwcACvH4eofvyzBcRDw==", - "dev": true, - "dependencies": { - "minimatch": "^3.0.4" - }, - "bin": { - "ignored": "bin/ignored" - } - }, - "node_modules/dunder-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", - "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.1", - "es-errors": "^1.3.0", - "gopd": "^1.2.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/duplexer3": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-1.0.0.tgz", - "integrity": "sha512-6O5ndCyJ9CGF9cR2Yi3VFq1OvXXLEgX848InIOl8xUBPYwb8jn/93j10lGaZyLnMRa71IT5OHhURlOiVjH9OVg==", + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", "dev": true, + "license": "Apache-2.0", "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=8" } }, "node_modules/electron-to-chromium": { @@ -3492,210 +3571,27 @@ "url": "https://github.com/fb55/entities?sponsor=1" } }, - "node_modules/es-abstract": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.24.2.tgz", - "integrity": "sha512-2FpH9Q5i2RRwyEP1AylXe6nYLR5OhaJTZwmlcP0dL/+JCbgg7yyEo/sEK6HeGZRf3dFpWwThaRHVApXSkW3xeg==", - "dev": true, - "license": "MIT", - "dependencies": { - "array-buffer-byte-length": "^1.0.2", - "arraybuffer.prototype.slice": "^1.0.4", - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.8", - "call-bound": "^1.0.4", - "data-view-buffer": "^1.0.2", - "data-view-byte-length": "^1.0.2", - "data-view-byte-offset": "^1.0.1", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.1.1", - "es-set-tostringtag": "^2.1.0", - "es-to-primitive": "^1.3.0", - "function.prototype.name": "^1.1.8", - "get-intrinsic": "^1.3.0", - "get-proto": "^1.0.1", - "get-symbol-description": "^1.1.0", - "globalthis": "^1.0.4", - "gopd": "^1.2.0", - "has-property-descriptors": "^1.0.2", - "has-proto": "^1.2.0", - "has-symbols": "^1.1.0", - "hasown": "^2.0.2", - "internal-slot": "^1.1.0", - "is-array-buffer": "^3.0.5", - "is-callable": "^1.2.7", - "is-data-view": "^1.0.2", - "is-negative-zero": "^2.0.3", - "is-regex": "^1.2.1", - "is-set": "^2.0.3", - "is-shared-array-buffer": "^1.0.4", - "is-string": "^1.1.1", - "is-typed-array": "^1.1.15", - "is-weakref": "^1.1.1", - "math-intrinsics": "^1.1.0", - "object-inspect": "^1.13.4", - "object-keys": "^1.1.1", - "object.assign": "^4.1.7", - "own-keys": "^1.0.1", - "regexp.prototype.flags": "^1.5.4", - "safe-array-concat": "^1.1.3", - "safe-push-apply": "^1.0.0", - "safe-regex-test": "^1.1.0", - "set-proto": "^1.0.0", - "stop-iteration-iterator": "^1.1.0", - "string.prototype.trim": "^1.2.10", - "string.prototype.trimend": "^1.0.9", - "string.prototype.trimstart": "^1.0.8", - "typed-array-buffer": "^1.0.3", - "typed-array-byte-length": "^1.0.3", - "typed-array-byte-offset": "^1.0.4", - "typed-array-length": "^1.0.7", - "unbox-primitive": "^1.1.0", - "which-typed-array": "^1.1.19" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "node_modules/es-module-lexer": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.3.2.tgz", + "integrity": "sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw==", + "dev": true, + "license": "MIT" }, - "node_modules/es-abstract-get": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-abstract-get/-/es-abstract-get-1.0.0.tgz", - "integrity": "sha512-6PMWXpdhshVvFp+FoWYs1EvG1Nj0tvk0dZM+XcK0xMEM1czRVcP6ohqPWHy6qPagSpC8j4+p89WXlT+xXJs/fg==", + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", "dev": true, "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "es-object-atoms": "^1.1.2", - "is-callable": "^1.2.7", - "object-inspect": "^1.13.4" - }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=6" } }, - "node_modules/es-define-property": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", - "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-errors": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", - "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-get-iterator": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.3.tgz", - "integrity": "sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.3", - "has-symbols": "^1.0.3", - "is-arguments": "^1.1.1", - "is-map": "^2.0.2", - "is-set": "^2.0.2", - "is-string": "^1.0.7", - "isarray": "^2.0.5", - "stop-iteration-iterator": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/es-object-atoms": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz", - "integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-set-tostringtag": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", - "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-shim-unscopables": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.1.0.tgz", - "integrity": "sha512-d9T8ucsEhh8Bi1woXCf+TIKDIROLG5WCkxg8geBCbvk22kzwC5G2OnXVMO6FUsvQlgUUXQ2itephWDLqDzbeCw==", - "dev": true, - "license": "MIT", - "dependencies": { - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-to-primitive": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.3.4.tgz", - "integrity": "sha512-yPDz7wqpg1/mmHLmS3tcfTfbw5f1eryXvyghYBffGdERwe+mV7ZcWzTR8LR17Kvqt3qfPurjlonmnq3MKXIOXw==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-abstract-get": "^1.0.0", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "is-callable": "^1.2.7", - "is-date-object": "^1.1.0", - "is-symbol": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/escalade": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", - "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/eslint": { - "version": "10.9.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.9.1.tgz", - "integrity": "sha512-9VaAkDURekixUQJy0oJYl2DcN6oKMfxay7XzaGYAWQwsb6qfKf+x76R2k1L8kb1boc+FyCAaTA9GmiKaaiaF+A==", + "node_modules/eslint": { + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.9.1.tgz", + "integrity": "sha512-9VaAkDURekixUQJy0oJYl2DcN6oKMfxay7XzaGYAWQwsb6qfKf+x76R2k1L8kb1boc+FyCAaTA9GmiKaaiaF+A==", "dev": true, "license": "MIT", "workspaces": [ @@ -3934,13 +3830,14 @@ "node": ">=0.10.0" } }, - "node_modules/events-to-array": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/events-to-array/-/events-to-array-2.0.3.tgz", - "integrity": "sha512-f/qE2gImHRa4Cp2y1stEOSgw8wTFyUdVJX7G//bMwbaV9JqISFxg99NbmVQeP7YLnDUZ2un851jlaDrlpmGehQ==", + "node_modules/expect-type": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.4.0.tgz", + "integrity": "sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==", "dev": true, + "license": "Apache-2.0", "engines": { - "node": ">=12" + "node": ">=12.0.0" } }, "node_modules/fast-deep-equal": { @@ -4022,28 +3919,6 @@ "dev": true, "license": "ISC" }, - "node_modules/for-each": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", - "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-callable": "^1.2.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", @@ -4067,49 +3942,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/function.prototype.name": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.2.0.tgz", - "integrity": "sha512-jObKIik1P2QjPHP5nz5BaOtUlfgS0fWo8IUByNXkM+o+02sJOi94em77GwJKQSJ3gfPHdgzLNrHc1uokV4P/ew==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.9", - "call-bound": "^1.0.4", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "functions-have-names": "^1.2.3", - "has-property-descriptors": "^1.0.2", - "hasown": "^2.0.4", - "is-callable": "^1.2.7", - "is-document.all": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/functions-have-names": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/generator-function": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/generator-function/-/generator-function-2.0.1.tgz", - "integrity": "sha512-SFdFmIJi+ybC0vjlHN0ZGVGHc3lgE0DxPAT0djjVg+kjOnSqclqmj0KQ7ykTOLP6YxoqOvuAODGdcHJn+43q3g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, "node_modules/gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", @@ -4119,92 +3951,6 @@ "node": ">=6.9.0" } }, - "node_modules/get-intrinsic": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", - "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.1.1", - "function-bind": "^1.1.2", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "has-symbols": "^1.1.0", - "hasown": "^2.0.2", - "math-intrinsics": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-package-type": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", - "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", - "dev": true, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/get-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", - "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", - "dev": true, - "license": "MIT", - "dependencies": { - "dunder-proto": "^1.0.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/get-symbol-description": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.1.0.tgz", - "integrity": "sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/glob-parent": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", @@ -4230,125 +3976,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/globalthis": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", - "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "define-properties": "^1.2.1", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/gopd": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", - "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, - "node_modules/has-bigints": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", - "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-dynamic-import": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/has-dynamic-import/-/has-dynamic-import-2.1.1.tgz", - "integrity": "sha512-DuTCn6K/RW8S27npDMumGKsjG6HE7MxzedZka5tJP+9dqfxks+UMqKBmeCijHtIhsBEZPlbMg0qMHi2nKYVtKQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "get-intrinsic": "^1.2.6" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-property-descriptors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", - "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", - "dev": true, - "dependencies": { - "es-define-property": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-proto": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.2.0.tgz", - "integrity": "sha512-KIL7eQPfHQRC8+XluaIw7BHUwwqL19bQn4hzNgdr+1wXoU0KKj6rufu47lhY7KbJR2C6T6+PfyN0Ea7wkSS+qQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "dunder-proto": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-symbols": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", - "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-tostringtag": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", - "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", - "dev": true, - "dependencies": { - "has-symbols": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/hasown": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz", @@ -4362,15 +3995,6 @@ "node": ">= 0.4" } }, - "node_modules/hirestime": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/hirestime/-/hirestime-7.0.3.tgz", - "integrity": "sha512-XmjAwwjLJlDjVVljWht/+Pb6vTfs6A0z2ZpaCkVmzEkwiZcO/+lbj1DsxpsDvkVprYHCmNBxTr7tUohdlxG2Hw==", - "dev": true, - "engines": { - "node": ">=6.0" - } - }, "node_modules/ignore": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", @@ -4390,45 +4014,14 @@ "node": ">=0.8.19" } }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "node_modules/internal-slot": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz", - "integrity": "sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==", + "node_modules/is-core-module": { + "version": "2.16.2", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.2.tgz", + "integrity": "sha512-evOr8xfXKxE6qSR0hSXL2r3sd7ALj8+7jQEUvPYcm5sgZFdJ+AYzT6yNmJenvIYQBgIGwfwz08sL8zoL7yq2BA==", "dev": true, "license": "MIT", "dependencies": { - "es-errors": "^1.3.0", - "hasown": "^2.0.2", - "side-channel": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/is-arguments": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", - "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" + "hasown": "^2.0.3" }, "engines": { "node": ">= 0.4" @@ -4437,550 +4030,447 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-array-buffer": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz", - "integrity": "sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "get-intrinsic": "^1.2.6" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-async-function": { + "node_modules/is-extglob": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.1.1.tgz", - "integrity": "sha512-9dgM/cZBnNvjzaMYHVoxxfPj2QXt22Ev7SuuPrs+xav0ukGB0S6d4ydZdEiM48kLx5kDV+QBPrpVnFyefL8kkQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "async-function": "^1.0.0", - "call-bound": "^1.0.3", - "get-proto": "^1.0.1", - "has-tostringtag": "^1.0.2", - "safe-regex-test": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-bigint": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.1.0.tgz", - "integrity": "sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ==", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", "dev": true, - "license": "MIT", - "dependencies": { - "has-bigints": "^1.0.2" - }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=0.10.0" } }, - "node_modules/is-boolean-object": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.2.tgz", - "integrity": "sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A==", + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, - "license": "MIT", "dependencies": { - "call-bound": "^1.0.3", - "has-tostringtag": "^1.0.2" + "is-extglob": "^2.1.1" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=0.10.0" } }, - "node_modules/is-callable": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", - "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true }, - "node_modules/is-core-module": { - "version": "2.16.2", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.2.tgz", - "integrity": "sha512-evOr8xfXKxE6qSR0hSXL2r3sd7ALj8+7jQEUvPYcm5sgZFdJ+AYzT6yNmJenvIYQBgIGwfwz08sL8zoL7yq2BA==", - "dev": true, - "license": "MIT", - "dependencies": { - "hasown": "^2.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true }, - "node_modules/is-data-view": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.2.tgz", - "integrity": "sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw==", + "node_modules/js2xmlparser": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-4.0.2.tgz", + "integrity": "sha512-6n4D8gLlLf1n5mNLQPRfViYzu9RATblzPEtm1SthMX1Pjao0r9YI9nw7ZIfRxQMERS87mcswrg+r/OYrPRX6jA==", "dev": true, - "license": "MIT", "dependencies": { - "call-bound": "^1.0.2", - "get-intrinsic": "^1.2.6", - "is-typed-array": "^1.1.13" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "xmlcreate": "^2.0.4" } }, - "node_modules/is-date-object": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.1.0.tgz", - "integrity": "sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg==", + "node_modules/jsdoc": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-4.0.5.tgz", + "integrity": "sha512-P4C6MWP9yIlMiK8nwoZvxN84vb6MsnXcHuy7XzVOvQoCizWX5JFCBsWIIWKXBltpoRZXddUOVQmCTOZt9yDj9g==", "dev": true, - "license": "MIT", + "license": "Apache-2.0", "dependencies": { - "call-bound": "^1.0.2", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" + "@babel/parser": "^7.20.15", + "@jsdoc/salty": "^0.2.1", + "@types/markdown-it": "^14.1.1", + "bluebird": "^3.7.2", + "catharsis": "^0.9.0", + "escape-string-regexp": "^2.0.0", + "js2xmlparser": "^4.0.2", + "klaw": "^3.0.0", + "markdown-it": "^14.1.0", + "markdown-it-anchor": "^8.6.7", + "marked": "^4.0.10", + "mkdirp": "^1.0.4", + "requizzle": "^0.2.3", + "strip-json-comments": "^3.1.0", + "underscore": "~1.13.2" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-document.all": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-document.all/-/is-document.all-1.0.0.tgz", - "integrity": "sha512-+XSoyS05OdBbhFuELhgTCpFNHkpBOJqtsZfUFFpe5QTw+9Sjbh8zitxhQkYAo6wV7e1Vb8cAPvpCk9jGam/82g==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.4" + "bin": { + "jsdoc": "jsdoc.js" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=12.0.0" } }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "node_modules/jsdoc/node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/is-finalizationregistry": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.1.1.tgz", - "integrity": "sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg==", + "node_modules/jsdoctypeparser": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/jsdoctypeparser/-/jsdoctypeparser-9.0.0.tgz", + "integrity": "sha512-jrTA2jJIL6/DAEILBEh2/w9QxCuwmvNXIry39Ay/HVfhE3o2yVV0U44blYkqdHA/OKloJEqvJy0xU+GSdE2SIw==", "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3" + "bin": { + "jsdoctypeparser": "bin/jsdoctypeparser" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=10" } }, - "node_modules/is-generator-function": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.2.tgz", - "integrity": "sha512-upqt1SkGkODW9tsGNG5mtXTXtECizwtS2kA161M+gJPc1xdb/Ax629af6YrTwcOeQHbewrPNlE5Dx7kzvXTizA==", + "node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", "dev": true, "license": "MIT", - "dependencies": { - "call-bound": "^1.0.4", - "generator-function": "^2.0.0", - "get-proto": "^1.0.1", - "has-tostringtag": "^1.0.2", - "safe-regex-test": "^1.1.0" + "bin": { + "jsesc": "bin/jsesc" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=6" } }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } + "license": "MIT" }, - "node_modules/is-map": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", - "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==", + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "license": "MIT" }, - "node_modules/is-negative-zero": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", - "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true }, - "node_modules/is-number-object": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.1.tgz", - "integrity": "sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw==", + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "has-tostringtag": "^1.0.2" + "bin": { + "json5": "lib/cli.js" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=6" } }, - "node_modules/is-regex": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", - "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==", + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", "dev": true, "license": "MIT", "dependencies": { - "call-bound": "^1.0.2", - "gopd": "^1.2.0", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-set": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", - "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "json-buffer": "3.0.1" } }, - "node_modules/is-shared-array-buffer": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.4.tgz", - "integrity": "sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A==", + "node_modules/klaw": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-3.0.0.tgz", + "integrity": "sha512-0Fo5oir+O9jnXu5EefYbVK+mHMBeEVEy2cmctR1O1NECcCkPRreJKrS6Qt/j3KC2C148Dfo9i3pCmCMsdqGr0g==", "dev": true, - "license": "MIT", "dependencies": { - "call-bound": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "graceful-fs": "^4.1.9" } }, - "node_modules/is-string": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.1.1.tgz", - "integrity": "sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==", + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, - "license": "MIT", "dependencies": { - "call-bound": "^1.0.3", - "has-tostringtag": "^1.0.2" + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">= 0.8.0" } }, - "node_modules/is-symbol": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.1.1.tgz", - "integrity": "sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w==", + "node_modules/lightningcss": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.33.0.tgz", + "integrity": "sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==", "dev": true, - "license": "MIT", + "license": "MPL-2.0", "dependencies": { - "call-bound": "^1.0.2", - "has-symbols": "^1.1.0", - "safe-regex-test": "^1.1.0" + "detect-libc": "^2.0.3" }, "engines": { - "node": ">= 0.4" + "node": ">= 12.0.0" }, "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-typed-array": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", - "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "which-typed-array": "^1.1.16" - }, - "engines": { - "node": ">= 0.4" + "type": "opencollective", + "url": "https://opencollective.com/parcel" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-weakmap": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", - "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==", + "optionalDependencies": { + "lightningcss-android-arm64": "1.33.0", + "lightningcss-darwin-arm64": "1.33.0", + "lightningcss-darwin-x64": "1.33.0", + "lightningcss-freebsd-x64": "1.33.0", + "lightningcss-linux-arm-gnueabihf": "1.33.0", + "lightningcss-linux-arm64-gnu": "1.33.0", + "lightningcss-linux-arm64-musl": "1.33.0", + "lightningcss-linux-x64-gnu": "1.33.0", + "lightningcss-linux-x64-musl": "1.33.0", + "lightningcss-win32-arm64-msvc": "1.33.0", + "lightningcss-win32-x64-msvc": "1.33.0" + } + }, + "node_modules/lightningcss-android-arm64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.33.0.tgz", + "integrity": "sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==", + "cpu": [ + "arm64" + ], "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "android" + ], "engines": { - "node": ">= 0.4" + "node": ">= 12.0.0" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/is-weakref": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.1.1.tgz", - "integrity": "sha512-6i9mGWSlqzNMEqpCp93KwRS1uUOodk2OJ6b+sq7ZPDSy2WuI5NFIxp/254TytR8ftefexkWn5xNiHUNpPOfSew==", + "node_modules/lightningcss-darwin-arm64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.33.0.tgz", + "integrity": "sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3" - }, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">= 0.4" + "node": ">= 12.0.0" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/is-weakset": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.3.tgz", - "integrity": "sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==", + "node_modules/lightningcss-darwin-x64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.33.0.tgz", + "integrity": "sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "get-intrinsic": "^1.2.4" - }, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">= 0.4" + "node": ">= 12.0.0" }, "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "node_modules/js2xmlparser": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-4.0.2.tgz", - "integrity": "sha512-6n4D8gLlLf1n5mNLQPRfViYzu9RATblzPEtm1SthMX1Pjao0r9YI9nw7ZIfRxQMERS87mcswrg+r/OYrPRX6jA==", - "dev": true, - "dependencies": { - "xmlcreate": "^2.0.4" - } - }, - "node_modules/jsdoc": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-4.0.5.tgz", - "integrity": "sha512-P4C6MWP9yIlMiK8nwoZvxN84vb6MsnXcHuy7XzVOvQoCizWX5JFCBsWIIWKXBltpoRZXddUOVQmCTOZt9yDj9g==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@babel/parser": "^7.20.15", - "@jsdoc/salty": "^0.2.1", - "@types/markdown-it": "^14.1.1", - "bluebird": "^3.7.2", - "catharsis": "^0.9.0", - "escape-string-regexp": "^2.0.0", - "js2xmlparser": "^4.0.2", - "klaw": "^3.0.0", - "markdown-it": "^14.1.0", - "markdown-it-anchor": "^8.6.7", - "marked": "^4.0.10", - "mkdirp": "^1.0.4", - "requizzle": "^0.2.3", - "strip-json-comments": "^3.1.0", - "underscore": "~1.13.2" - }, - "bin": { - "jsdoc": "jsdoc.js" - }, - "engines": { - "node": ">=12.0.0" + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/jsdoc/node_modules/escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "node_modules/lightningcss-freebsd-x64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.33.0.tgz", + "integrity": "sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==", + "cpu": [ + "x64" + ], "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], "engines": { - "node": ">=8" + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/jsdoctypeparser": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/jsdoctypeparser/-/jsdoctypeparser-9.0.0.tgz", - "integrity": "sha512-jrTA2jJIL6/DAEILBEh2/w9QxCuwmvNXIry39Ay/HVfhE3o2yVV0U44blYkqdHA/OKloJEqvJy0xU+GSdE2SIw==", + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.33.0.tgz", + "integrity": "sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==", + "cpu": [ + "arm" + ], "dev": true, - "bin": { - "jsdoctypeparser": "bin/jsdoctypeparser" - }, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=10" + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/jsesc": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", - "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.33.0.tgz", + "integrity": "sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" - }, + "libc": [ + "glibc" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=6" + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.33.0.tgz", + "integrity": "sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "MIT" - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", - "dev": true + "libc": [ + "musl" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } }, - "node_modules/json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.33.0.tgz", + "integrity": "sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==", + "cpu": [ + "x64" + ], "dev": true, - "bin": { - "json5": "lib/cli.js" - }, + "libc": [ + "glibc" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=6" + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/keyv": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", - "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.33.0.tgz", + "integrity": "sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "json-buffer": "3.0.1" + "libc": [ + "musl" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/klaw": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/klaw/-/klaw-3.0.0.tgz", - "integrity": "sha512-0Fo5oir+O9jnXu5EefYbVK+mHMBeEVEy2cmctR1O1NECcCkPRreJKrS6Qt/j3KC2C148Dfo9i3pCmCMsdqGr0g==", + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.33.0.tgz", + "integrity": "sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==", + "cpu": [ + "arm64" + ], "dev": true, - "dependencies": { - "graceful-fs": "^4.1.9" + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.33.0.tgz", + "integrity": "sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], "engines": { - "node": ">= 0.8.0" + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, "node_modules/linkify-it": { @@ -5050,6 +4540,16 @@ "license": "MIT", "peer": true }, + "node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, "node_modules/markdown-it": { "version": "14.3.0", "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.3.0.tgz", @@ -5100,44 +4600,12 @@ "node": ">= 12" } }, - "node_modules/math-intrinsics": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", - "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, "node_modules/mdurl": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz", "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==", "dev": true }, - "node_modules/minimatch": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", - "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/mkdirp": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", @@ -5150,148 +4618,57 @@ "node": ">=10" } }, - "node_modules/mock-property": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/mock-property/-/mock-property-1.1.0.tgz", - "integrity": "sha512-1/JjbLoGwv87xVsutkX0XJc0M0W4kb40cZl/K41xtTViBOD9JuFPKfyMNTrLJ/ivYAd0aPqu/vduamXO0emTFQ==", - "dev": true, - "dependencies": { - "define-data-property": "^1.1.4", - "functions-have-names": "^1.2.3", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2", - "hasown": "^2.0.2", - "isarray": "^2.0.5", - "object-inspect": "^1.13.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true, - "license": "MIT" - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", - "dev": true - }, - "node_modules/node-exports-info": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/node-exports-info/-/node-exports-info-1.6.2.tgz", - "integrity": "sha512-kXs9Go0cah0qHVV2v389IXQLdLCeE1xfFtjOAF+iobu0OIoG1pje8At2vMHyaPMiPMnG/LWP50twML21eMcAag==", - "dev": true, - "license": "MIT", - "dependencies": { - "array.prototype.flatmap": "^1.3.3", - "es-errors": "^1.3.0", - "object.entries": "^1.1.9", - "semver": "^6.3.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/node-releases": { - "version": "2.0.27", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.27.tgz", - "integrity": "sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA==", - "dev": true, - "license": "MIT" - }, - "node_modules/object-inspect": { - "version": "1.13.4", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", - "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object-is": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.6.tgz", - "integrity": "sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.assign": { - "version": "4.1.7", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.7.tgz", - "integrity": "sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0", - "has-symbols": "^1.1.0", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" }, - "node_modules/object.entries": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.9.tgz", - "integrity": "sha512-8u/hfXFRBD1O0hPUjioLhoWFHRmt6tKA4/vZPyckBr18l1KE9uHrFaFaUi8MDRTpi4uak2goyPTSNJLXX2k2Hw==", + "node_modules/nanoid": { + "version": "3.3.18", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.18.tgz", + "integrity": "sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w==", "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.4", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.1.1" + "bin": { + "nanoid": "bin/nanoid.cjs" }, "engines": { - "node": ">= 0.4" + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, - "node_modules/once": { + "node_modules/natural-compare": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "node_modules/node-releases": { + "version": "2.0.27", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.27.tgz", + "integrity": "sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA==", "dev": true, - "dependencies": { - "wrappy": "1" + "license": "MIT" + }, + "node_modules/obug": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/obug/-/obug-2.1.4.tgz", + "integrity": "sha512-4a+OsYv9UktOJKE+l1A4OufDgdRF9PifWj+tJnHURo/P+WOxpG4GzUFL9qCalmWauao6ogiG+QvnCovwPoyAWA==", + "dev": true, + "funding": [ + "https://github.com/sponsors/sxzz", + "https://opencollective.com/debug" + ], + "license": "MIT", + "engines": { + "node": ">=12.20.0" } }, "node_modules/optionator": { @@ -5311,25 +4688,6 @@ "node": ">= 0.8.0" } }, - "node_modules/own-keys": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/own-keys/-/own-keys-1.0.2.tgz", - "integrity": "sha512-19YVAg7T+WTrxggPukVq7DjTv6+PJ867TmhCvBsYwmbFCsZd344rq2Ld1p0wo8f8Qrrhgp82c6FJRqdXWtSEhg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.4", - "get-intrinsic": "^1.3.0", - "object-keys": "^1.1.1", - "safe-push-apply": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/p-locate": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", @@ -5360,27 +4718,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/parse-ms": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-3.0.0.tgz", - "integrity": "sha512-Tpb8Z7r7XbbtBTrM9UhpkzzaMrqA2VXMT3YChzYltwV3P3pM6t8wl7TvpMnSTosz1aQAdVib7kdoys7vYOPerw==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -5396,6 +4733,13 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, + "node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", + "dev": true, + "license": "MIT" + }, "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", @@ -5415,14 +4759,33 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/possible-typed-array-names": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", - "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==", + "node_modules/postcss": { + "version": "8.5.26", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.26.tgz", + "integrity": "sha512-u82N74LFzG8ca+dD8puPnplTXoGH4fTPpVGuIbt36G3qvNlkvfD0lEAZSxaly3KX8TS/L1A1gsCEmvKmBcVbkQ==", "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], "license": "MIT", + "dependencies": { + "nanoid": "^3.3.17", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, "engines": { - "node": ">= 0.4" + "node": "^10 || ^12 || >=14" } }, "node_modules/prelude-ls": { @@ -5434,21 +4797,6 @@ "node": ">= 0.8.0" } }, - "node_modules/pretty-ms": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-8.0.0.tgz", - "integrity": "sha512-ASJqOugUF1bbzI35STMBUpZqdfYKlJugy6JBziGi2EE+AL5JPJGSzvpeVXojxrr0ViUYoToUjb5kjSEGf7Y83Q==", - "dev": true, - "dependencies": { - "parse-ms": "^3.0.0" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", @@ -5468,29 +4816,6 @@ "node": ">=6" } }, - "node_modules/reflect.getprototypeof": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz", - "integrity": "sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.9", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "get-intrinsic": "^1.2.7", - "get-proto": "^1.0.1", - "which-builtin-type": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/regenerate": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", @@ -5511,27 +4836,6 @@ "node": ">=4" } }, - "node_modules/regexp.prototype.flags": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz", - "integrity": "sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-errors": "^1.3.0", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "set-function-name": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/regexpu-core": { "version": "6.4.0", "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-6.4.0.tgz", @@ -5600,6 +4904,40 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/rolldown": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.5.tgz", + "integrity": "sha512-VD2IE5PUG4Oj8zz2VGykiYd5wbnjdIiSsNQb8Qu5B+noEp+A78mu2iVvpp27g8es14Tk9rofNs5Tku9iQCS4fA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@oxc-project/types": "=0.146.0", + "@rolldown/pluginutils": "^1.0.0" + }, + "bin": { + "rolldown": "bin/cli.mjs" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "optionalDependencies": { + "@rolldown/binding-android-arm-eabi": "1.2.5", + "@rolldown/binding-android-arm64": "1.2.5", + "@rolldown/binding-darwin-arm64": "1.2.5", + "@rolldown/binding-darwin-x64": "1.2.5", + "@rolldown/binding-freebsd-x64": "1.2.5", + "@rolldown/binding-linux-arm-gnueabihf": "1.2.5", + "@rolldown/binding-linux-arm64-gnu": "1.2.5", + "@rolldown/binding-linux-arm64-musl": "1.2.5", + "@rolldown/binding-linux-ppc64-gnu": "1.2.5", + "@rolldown/binding-linux-s390x-gnu": "1.2.5", + "@rolldown/binding-linux-x64-gnu": "1.2.5", + "@rolldown/binding-linux-x64-musl": "1.2.5", + "@rolldown/binding-openharmony-arm64": "1.2.5", + "@rolldown/binding-win32-arm64-msvc": "1.2.5", + "@rolldown/binding-win32-x64-msvc": "1.2.5" + } + }, "node_modules/rollup": { "version": "4.62.5", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.62.5.tgz", @@ -5646,61 +4984,6 @@ "fsevents": "~2.3.2" } }, - "node_modules/safe-array-concat": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.4.tgz", - "integrity": "sha512-wtZlHyOje6OZTGqAoaDKxFkgRtkF9CnHAVnCHKfuj200wAgL+bSJhdsCD2l0Qx/2ekEXjPWcyKkfGb5CPboslg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.9", - "call-bound": "^1.0.4", - "get-intrinsic": "^1.3.0", - "has-symbols": "^1.1.0", - "isarray": "^2.0.5" - }, - "engines": { - "node": ">=0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/safe-push-apply": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/safe-push-apply/-/safe-push-apply-1.0.0.tgz", - "integrity": "sha512-iKE9w/Z7xCzUMIZqdBsp6pEQvwuEebH4vdpjcDWnyzaI6yl6O9FHvVpmGelvEHNsoY6wGblkxR6Zty/h00WiSA==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "isarray": "^2.0.5" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/safe-regex-test": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz", - "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "is-regex": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", @@ -5720,53 +5003,6 @@ "node": ">=20.0.0" } }, - "node_modules/set-function-length": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", - "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", - "dev": true, - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/set-function-name": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", - "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", - "dev": true, - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "functions-have-names": "^1.2.3", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/set-proto": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/set-proto/-/set-proto-1.0.0.tgz", - "integrity": "sha512-RJRdvCo6IAnPdsvP/7m6bsQqNnn1FCBX5ZNtFL98MmFF/4xAIJTIg1YbHW5DC2W5SKZanrC6i4HsJqlajw/dZw==", - "dev": true, - "license": "MIT", - "dependencies": { - "dunder-proto": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -5788,81 +5024,12 @@ "node": ">=8" } }, - "node_modules/side-channel": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", - "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "object-inspect": "^1.13.3", - "side-channel-list": "^1.0.0", - "side-channel-map": "^1.0.1", - "side-channel-weakmap": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-list": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", - "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "object-inspect": "^1.13.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-map": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", - "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.5", - "object-inspect": "^1.13.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-weakmap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", - "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "node_modules/siginfo": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", + "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.5", - "object-inspect": "^1.13.3", - "side-channel-map": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "license": "ISC" }, "node_modules/smob": { "version": "1.5.0", @@ -5879,90 +5046,40 @@ "node": ">=0.10.0" } }, - "node_modules/source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/stop-iteration-iterator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.1.0.tgz", - "integrity": "sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "internal-slot": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/string.prototype.trim": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.11.tgz", - "integrity": "sha512-PwvK7BU+CMTJGYQCTZb5RWXIML92lftJLhQz1tBzgKiqGxJaMlBAa48POXaNAC2s4y8jr3EFqrkF9+44neS46w==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.9", - "call-bound": "^1.0.4", - "define-data-property": "^1.1.4", - "define-properties": "^1.2.1", - "es-abstract": "^1.24.2", - "es-object-atoms": "^1.1.2", - "has-property-descriptors": "^1.0.2", - "safe-regex-test": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimend": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.10.tgz", - "integrity": "sha512-2+3aDAOmPTmuFwjDnmJG2ctEkQKVki7vOSqaxkv42Mowj1V6PnvuwFCRrR5lChUux1TBskPjfkeTOhqczDMxTw==", + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.9", - "call-bound": "^1.0.4", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.1.2" - }, + "license": "BSD-3-Clause", "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=0.10.0" } }, - "node_modules/string.prototype.trimstart": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", - "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" } }, + "node_modules/stackback": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", + "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", + "dev": true, + "license": "MIT" + }, + "node_modules/std-env": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-4.2.0.tgz", + "integrity": "sha512-oCUKSupKTHX53EyjDtuZQ64pjLJ6yYCtpmEw0goYxtjG9KpbRe8KAsl2tBUGU9DyMcJ0RwJ8GqJAFzMXcXW1Rw==", + "dev": true, + "license": "MIT" + }, "node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -5987,127 +5104,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/tap-min": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/tap-min/-/tap-min-3.0.0.tgz", - "integrity": "sha512-oEhFyYCUEmRLYwtlIkRgeVkX538yEQfoSg6BcWXMq05TFsnpsi3vtQZJeEBkXzMWlj1h/rKaRMaWPCvCTmIIXg==", - "dev": true, - "dependencies": { - "chalk": "^5.3.0", - "duplexer3": "^1.0.0", - "hirestime": "^7.0.3", - "pretty-ms": "^8.0.0", - "tap-parser": "^13.0.2-1" - }, - "bin": { - "tap-min": "cli.js" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/tap-min/node_modules/chalk": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", - "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", - "dev": true, - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/tap-parser": { - "version": "13.0.2-1", - "resolved": "https://registry.npmjs.org/tap-parser/-/tap-parser-13.0.2-1.tgz", - "integrity": "sha512-A6U6TvfwEUFVivyZFiTth3LVrGw9aa4j4cSU8W6ui3sfrZBRNzE1y5YhBomz0+RIRURdspFJdaJvVgSXI68h0Q==", - "dev": true, - "dependencies": { - "events-to-array": "^2.0.3", - "tap-yaml": "2.1.1-1" - }, - "bin": { - "tap-parser": "bin/cmd.js" - }, - "engines": { - "node": ">= 12" - } - }, - "node_modules/tap-yaml": { - "version": "2.1.1-1", - "resolved": "https://registry.npmjs.org/tap-yaml/-/tap-yaml-2.1.1-1.tgz", - "integrity": "sha512-acWZWpwstr0YMms30FW2nlFkJ0hSm/o2x32Hq5v10IKqYKwnRXARSx6TKbz/gzcSoODPi9PkFQYGYBgowxKDfA==", - "dev": true, - "dependencies": { - "yaml": "^2.3.0", - "yaml-types": "^0.3.0" - } - }, - "node_modules/tape": { - "version": "5.10.2", - "resolved": "https://registry.npmjs.org/tape/-/tape-5.10.2.tgz", - "integrity": "sha512-MfhVVAWa834kfYL4KgrqHblWfwkjaQvfaQhAX/bBTNQsK8oJ4ztpUe7jiemR2Vegw4pYwpnQMy51MhEmRzbbsg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@ljharb/now": "^1.0.1", - "@ljharb/resumer": "^0.1.3", - "@ljharb/through": "^2.3.14", - "array.prototype.every": "^1.1.7", - "call-bind": "^1.0.9", - "call-bound": "^1.0.4", - "deep-equal": "^2.2.3", - "defined": "^1.0.1", - "dotignore": "^0.1.2", - "es-object-atoms": "^1.1.2", - "for-each": "^0.3.5", - "get-package-type": "^0.1.0", - "glob": "^7.2.3", - "has-dynamic-import": "^2.1.1", - "hasown": "^2.0.4", - "inherits": "^2.0.4", - "is-regex": "^1.2.1", - "minimist": "^1.2.8", - "mock-property": "^1.1.0", - "object-inspect": "^1.13.4", - "object-is": "^1.1.6", - "object-keys": "^1.1.1", - "object.assign": "^4.1.7", - "resolve": "^2.0.0-next.7", - "string.prototype.trim": "^1.2.11" - }, - "bin": { - "tape": "bin/tape" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/tape/node_modules/resolve": { - "version": "2.0.0-next.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.7.tgz", - "integrity": "sha512-tqt+NBWwyaMgw3zDsnygx4CByWjQEJHOPMdslYhppaQSJUtL/D4JO9CcBBlhPoI8lz9oJIDXkwXfhF4aWqP8xQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "is-core-module": "^2.16.2", - "node-exports-info": "^1.6.0", - "object-keys": "^1.1.1", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/terser": { "version": "5.31.0", "resolved": "https://registry.npmjs.org/terser/-/terser-5.31.0.tgz", @@ -6126,6 +5122,23 @@ "node": ">=10" } }, + "node_modules/tinybench": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", + "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinyexec": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.3.0.tgz", + "integrity": "sha512-QKAl9m8gWWGHV8jZcPeym6j+XULi6tOf1mT83WYJ4Lk2ytW/uwAWkrP0uFsdoYMdueVJ0qs26wZ+23xeB4ibNQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, "node_modules/tinyglobby": { "version": "0.2.17", "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", @@ -6174,6 +5187,16 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/tinyrainbow": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-3.1.1.tgz", + "integrity": "sha512-yau8yJdTt989Mm0Bd/236QnzEiPf2xLLTqUZRUJOo/3CB078LSwzei343DgtJVmfJKJE3TMINY1u42SQsP6mXw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/ts-api-utils": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.5.0.tgz", @@ -6199,84 +5222,6 @@ "node": ">= 0.8.0" } }, - "node_modules/typed-array-buffer": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", - "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "is-typed-array": "^1.1.14" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/typed-array-byte-length": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.3.tgz", - "integrity": "sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "for-each": "^0.3.3", - "gopd": "^1.2.0", - "has-proto": "^1.2.0", - "is-typed-array": "^1.1.14" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/typed-array-byte-offset": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.4.tgz", - "integrity": "sha512-bTlAFB/FBYMcuX81gbL4OcpH5PmlFHqlCCpAl8AlEzMz5k53oNDvN8p1PNOWLEmI2x4orp3raOFB51tv9X+MFQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.8", - "for-each": "^0.3.3", - "gopd": "^1.2.0", - "has-proto": "^1.2.0", - "is-typed-array": "^1.1.15", - "reflect.getprototypeof": "^1.0.9" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/typed-array-length": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.8.tgz", - "integrity": "sha512-phPGCwqr2+Qo0fwniCE8e4pKnGu/yFb5nD5Y8bf0EEeiI5GklnACYA9GFy/DrAeRrKHXvHn+1SUsOWgJp6RO+g==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.9", - "for-each": "^0.3.5", - "gopd": "^1.2.0", - "is-typed-array": "^1.1.15", - "possible-typed-array-names": "^1.1.0", - "reflect.getprototypeof": "^1.0.10" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/typedoc": { "version": "0.28.18", "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.28.18.tgz", @@ -6402,25 +5347,6 @@ "dev": true, "license": "MIT" }, - "node_modules/unbox-primitive": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz", - "integrity": "sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "has-bigints": "^1.0.2", - "has-symbols": "^1.1.0", - "which-boxed-primitive": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/underscore": { "version": "1.13.8", "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.8.tgz", @@ -6520,107 +5446,230 @@ "punycode": "^2.1.0" } }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "node_modules/vite": { + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/vite/-/vite-8.2.2.tgz", + "integrity": "sha512-cFKLV/PRgAUlIRm5WjMjJ86jrftzpqcgH+Us+DS8mI3CDNiH30Whrz8uHL3+MOLPAgqbMBAqWdAHAphOAM+z/Q==", "dev": true, + "license": "MIT", "dependencies": { - "isexe": "^2.0.0" + "lightningcss": "^1.33.0", + "picomatch": "^4.0.5", + "postcss": "^8.5.26", + "rolldown": "~1.2.4", + "tinyglobby": "^0.2.17" }, "bin": { - "node-which": "bin/node-which" + "vite": "bin/vite.js" }, "engines": { - "node": ">= 8" + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^20.19.0 || >=22.12.0", + "@vitejs/devtools": "^0.4.0 || ^0.5.0", + "esbuild": "^0.27.0 || ^0.28.0", + "jiti": ">=1.21.0", + "less": "^4.0.0", + "sass": "^1.70.0", + "sass-embedded": "^1.70.0", + "stylus": ">=0.54.8", + "sugarss": "^5.0.0", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "@vitejs/devtools": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } } }, - "node_modules/which-boxed-primitive": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz", - "integrity": "sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==", + "node_modules/vite/node_modules/picomatch": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", + "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", "dev": true, "license": "MIT", - "dependencies": { - "is-bigint": "^1.1.0", - "is-boolean-object": "^1.2.1", - "is-number-object": "^1.1.1", - "is-string": "^1.1.1", - "is-symbol": "^1.1.1" + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/vitest": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.1.11.tgz", + "integrity": "sha512-fhACrNXUidIbGSBr5FlbuBkO7VWC1ZyLl0DO4CU2DrQoAPxX84Ysxs+HeGQpii5lZWV1Q4gBZTTu49mF+A6Edw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/expect": "4.1.11", + "@vitest/mocker": "4.1.11", + "@vitest/pretty-format": "4.1.11", + "@vitest/runner": "4.1.11", + "@vitest/snapshot": "4.1.11", + "@vitest/spy": "4.1.11", + "@vitest/utils": "4.1.11", + "es-module-lexer": "^2.0.0", + "expect-type": "^1.3.0", + "magic-string": "^0.30.21", + "obug": "^2.1.1", + "pathe": "^2.0.3", + "picomatch": "^4.0.3", + "std-env": "^4.0.0-rc.1", + "tinybench": "^2.9.0", + "tinyexec": "^1.0.2", + "tinyglobby": "^0.2.15", + "tinyrainbow": "^3.1.0", + "vite": "^6.0.0 || ^7.0.0 || ^8.0.0", + "why-is-node-running": "^2.3.0" + }, + "bin": { + "vitest": "vitest.mjs" }, "engines": { - "node": ">= 0.4" + "node": "^20.0.0 || ^22.0.0 || >=24.0.0" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@edge-runtime/vm": "*", + "@opentelemetry/api": "^1.9.0", + "@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0", + "@vitest/browser-playwright": "4.1.11", + "@vitest/browser-preview": "4.1.11", + "@vitest/browser-webdriverio": "4.1.11", + "@vitest/coverage-istanbul": "4.1.11", + "@vitest/coverage-v8": "4.1.11", + "@vitest/ui": "4.1.11", + "happy-dom": "*", + "jsdom": "*", + "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "@edge-runtime/vm": { + "optional": true + }, + "@opentelemetry/api": { + "optional": true + }, + "@types/node": { + "optional": true + }, + "@vitest/browser-playwright": { + "optional": true + }, + "@vitest/browser-preview": { + "optional": true + }, + "@vitest/browser-webdriverio": { + "optional": true + }, + "@vitest/coverage-istanbul": { + "optional": true + }, + "@vitest/coverage-v8": { + "optional": true + }, + "@vitest/ui": { + "optional": true + }, + "happy-dom": { + "optional": true + }, + "jsdom": { + "optional": true + }, + "vite": { + "optional": false + } } }, - "node_modules/which-builtin-type": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.2.1.tgz", - "integrity": "sha512-6iBczoX+kDQ7a3+YJBnh3T+KZRxM/iYNPXicqk66/Qfm1b93iu+yOImkg0zHbj5LNOcNv1TEADiZ0xa34B4q6Q==", + "node_modules/vitest/node_modules/picomatch": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", + "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", "dev": true, "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "function.prototype.name": "^1.1.6", - "has-tostringtag": "^1.0.2", - "is-async-function": "^2.0.0", - "is-date-object": "^1.1.0", - "is-finalizationregistry": "^1.1.0", - "is-generator-function": "^1.0.10", - "is-regex": "^1.2.1", - "is-weakref": "^1.0.2", - "isarray": "^2.0.5", - "which-boxed-primitive": "^1.1.0", - "which-collection": "^1.0.2", - "which-typed-array": "^1.1.16" - }, "engines": { - "node": ">= 0.4" + "node": ">=12" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/which-collection": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", - "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, "dependencies": { - "is-map": "^2.0.3", - "is-set": "^2.0.3", - "is-weakmap": "^2.0.2", - "is-weakset": "^2.0.3" + "isexe": "^2.0.0" }, - "engines": { - "node": ">= 0.4" + "bin": { + "node-which": "bin/node-which" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">= 8" } }, - "node_modules/which-typed-array": { - "version": "1.1.20", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.20.tgz", - "integrity": "sha512-LYfpUkmqwl0h9A2HL09Mms427Q1RZWuOHsukfVcKRq9q95iQxdw0ix1JQrqbcDR9PH1QDwf5Qo8OZb5lksZ8Xg==", + "node_modules/why-is-node-running": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", + "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", "dev": true, "license": "MIT", "dependencies": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.8", - "call-bound": "^1.0.4", - "for-each": "^0.3.5", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "has-tostringtag": "^1.0.2" + "siginfo": "^2.0.0", + "stackback": "0.0.2" }, - "engines": { - "node": ">= 0.4" + "bin": { + "why-is-node-running": "cli.js" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=8" } }, "node_modules/workerpool": { @@ -6630,12 +5679,6 @@ "dev": true, "license": "Apache-2.0" }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, "node_modules/xmlcreate": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.4.tgz", @@ -6655,6 +5698,7 @@ "integrity": "sha512-AvbaCLOO2Otw/lW5bmh9d/WEdcDFdQp2Z2ZUH3pX9U2ihyUY0nvLv7J6TrWowklRGPYbB/IuIMfYgxaCPg5Bpg==", "dev": true, "license": "ISC", + "peer": true, "bin": { "yaml": "bin.mjs" }, @@ -6665,19 +5709,6 @@ "url": "https://github.com/sponsors/eemeli" } }, - "node_modules/yaml-types": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/yaml-types/-/yaml-types-0.3.0.tgz", - "integrity": "sha512-i9RxAO/LZBiE0NJUy9pbN5jFz5EasYDImzRkj8Y81kkInTi1laia3P3K/wlMKzOxFQutZip8TejvQP/DwgbU7A==", - "dev": true, - "engines": { - "node": ">= 16", - "npm": ">= 7" - }, - "peerDependencies": { - "yaml": "^2.3.0" - } - }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", @@ -7894,43 +6925,130 @@ "lodash": "^4.17.21" } }, - "@ljharb/now": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@ljharb/now/-/now-1.0.1.tgz", - "integrity": "sha512-yRQ3B8l2v4vTLQ2l+4kBu6EsXaX7czuLB7fvUz0vkHHziHje75R2t/0Mm/vIo31tlZVCEvCoXHkNKW+ugv3uSA==", + "@napi-rs/lzma-linux-x64-gnu": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-x64-gnu/-/lzma-linux-x64-gnu-1.5.1.tgz", + "integrity": "sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ==", "dev": true, - "requires": { - "call-bind-apply-helpers": "^1.0.2", - "call-bound": "^1.0.4", - "get-intrinsic": "^1.3.0" - } + "optional": true }, - "@ljharb/resumer": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@ljharb/resumer/-/resumer-0.1.3.tgz", - "integrity": "sha512-d+tsDgfkj9X5QTriqM4lKesCkMMJC3IrbPKHvayP00ELx2axdXvDfWkqjxrLXIzGcQzmj7VAUT1wopqARTvafw==", + "@oxc-project/types": { + "version": "0.146.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.146.0.tgz", + "integrity": "sha512-XC0QsnnhVe7sLIWmYmdPw7x5P0h4W8vUU3Nv1ySgWXtvCz8NizoAEpGXA0sOYoJQV2Rl13LgURAHQ5cI5ILCSA==", + "dev": true + }, + "@rolldown/binding-android-arm-eabi": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm-eabi/-/binding-android-arm-eabi-1.2.5.tgz", + "integrity": "sha512-DLe/i+l8ynIBY7XEQ191TeZvCoowIGa18R+dIV30GW7DiOtp74i/xX8hs8GUjW5ARV7VZuie3d6AumSmCwbeRA==", "dev": true, - "requires": { - "@ljharb/through": "^2.3.13", - "call-bind": "^1.0.7" - } + "optional": true }, - "@ljharb/through": { - "version": "2.3.14", - "resolved": "https://registry.npmjs.org/@ljharb/through/-/through-2.3.14.tgz", - "integrity": "sha512-ajBvlKpWucBB17FuQYUShqpqy8GRgYEpJW0vWJbUu1CV9lWyrDCapy0lScU8T8Z6qn49sSwJB3+M+evYIdGg+A==", + "@rolldown/binding-android-arm64": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.2.5.tgz", + "integrity": "sha512-zXcwKlQApYAOELHd8PwKDFkagYF9Wy4e0RJ+0qnzl9Pjnpj75TEG8ufv40p2J7kCEfwZAsNiuzRIyNNMWT38ig==", "dev": true, - "requires": { - "call-bind": "^1.0.8" - } + "optional": true }, - "@napi-rs/lzma-linux-x64-gnu": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-x64-gnu/-/lzma-linux-x64-gnu-1.5.1.tgz", - "integrity": "sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ==", + "@rolldown/binding-darwin-arm64": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.2.5.tgz", + "integrity": "sha512-dK4QakI42nzWgJT5sm4y4y/O//D4OxM75/cH28RLV+nzIN9AY+YsbuUVrUTjlLjXR6vpyxFbSsbmNuJ6BP9sww==", + "dev": true, + "optional": true + }, + "@rolldown/binding-darwin-x64": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.2.5.tgz", + "integrity": "sha512-fqSALaUu1Wjd1nK2uW2kJDWdLCc8lx1IcY+MTY26Aurfdx19anlzhqXOgCFbBFQnlFDTn4TC1/7Nz4Bl2mLP3A==", + "dev": true, + "optional": true + }, + "@rolldown/binding-freebsd-x64": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.2.5.tgz", + "integrity": "sha512-/vCnNxlkxs9tKxNDcyWUePpJ/PgTzxIaVhoM5SmG8UV+GR/IcPam4VYxi7GIMo7PSDuNqlJqvprqii9NqqVCMw==", + "dev": true, + "optional": true + }, + "@rolldown/binding-linux-arm-gnueabihf": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.2.5.tgz", + "integrity": "sha512-abk0NLA519LxRCszmbE0jYKuQ9YPocOXTiOXOo6Yr+YAT95VH+PtqYAjOJvGKt3viEd/x4qzabAlwd5bHOOARg==", + "dev": true, + "optional": true + }, + "@rolldown/binding-linux-arm64-gnu": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.2.5.tgz", + "integrity": "sha512-Y7eALiJ8lr0M2HH103Js+g7V34wf6snlpZLAsHI90uLhr3PVlNsbFVAXJC9d/V6BnPyKtpSwI+NcB/RLxsQxuA==", + "dev": true, + "optional": true + }, + "@rolldown/binding-linux-arm64-musl": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.2.5.tgz", + "integrity": "sha512-xMvZgnbZg4YVnR/AX2b3oOPDTFYJvUVaJg5FedA/LuvexAtXibZQej4cnTkw3rjsJ/ggUROB64TdtETiim+FYA==", + "dev": true, + "optional": true + }, + "@rolldown/binding-linux-ppc64-gnu": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.2.5.tgz", + "integrity": "sha512-GRjeqTUDHTo5GwntsLaAMcBahG3nlpjftXWZLN73HiYQlhwEowvarFgQnRnQZtIp4keXX7quXFbG38uPZBa2EA==", + "dev": true, + "optional": true + }, + "@rolldown/binding-linux-s390x-gnu": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.2.5.tgz", + "integrity": "sha512-vLNTR45F2Uwc8AufkNXPmB4VliaXs+FvcheEogIzOXzO4l+LzieXF5A/TWxLy5HtqpsRCHUfd0lPVrrdgXdLHQ==", + "dev": true, + "optional": true + }, + "@rolldown/binding-linux-x64-gnu": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.2.5.tgz", + "integrity": "sha512-Mgj59/HTuYeK9Gz2MA+mBWKnHsAgkBSec15ZMb1st3oIfFbX7gCjOae7GydHhzcyQi9Z/7M1QuN9bR3oFqF0jQ==", + "dev": true, + "optional": true + }, + "@rolldown/binding-linux-x64-musl": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.2.5.tgz", + "integrity": "sha512-mY8AP0/ichsbhAxGnLa3d3+MwV0EfgrPND2bplI3Ym8T6R2pJ0N87bvrKVwNXmdy3jnr6eQBecdqx/HMknBmpA==", + "dev": true, + "optional": true + }, + "@rolldown/binding-openharmony-arm64": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.2.5.tgz", + "integrity": "sha512-8SLssA2oweAxyRgDp789ACfRb/3P+zNRJpzZxSizxF9m8NUDQ4+3xjo8ttjhVGGw6Qxb70oZiEtIjaKikCO7Yw==", + "dev": true, + "optional": true + }, + "@rolldown/binding-win32-arm64-msvc": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.2.5.tgz", + "integrity": "sha512-vGbruD5zquhoc8D9SViXgN2FBJtNdTyQ4DtG+SWiEGlJiAzoKcZ2xp+xuXCffhubVdt0NJlTZqkeRuERy7g8Cw==", + "dev": true, + "optional": true + }, + "@rolldown/binding-win32-x64-msvc": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.2.5.tgz", + "integrity": "sha512-e/SXpgISz+IoqVcSSI0rx/d/he8zqLex+/rCWpnHpmVfmPIUjag9H6P7zotf0gJHwPUhQxZ/mF8tr6acebT9yw==", "dev": true, "optional": true }, + "@rolldown/pluginutils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.1.tgz", + "integrity": "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==", + "dev": true + }, "@rollup/plugin-babel": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-7.1.0.tgz", @@ -8188,6 +7306,12 @@ "dev": true, "peer": true }, + "@standard-schema/spec": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz", + "integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==", + "dev": true + }, "@stylistic/eslint-plugin": { "version": "5.9.0", "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin/-/eslint-plugin-5.9.0.tgz", @@ -8210,6 +7334,22 @@ } } }, + "@types/chai": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz", + "integrity": "sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==", + "dev": true, + "requires": { + "@types/deep-eql": "*", + "assertion-error": "^2.0.1" + } + }, + "@types/deep-eql": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz", + "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==", + "dev": true + }, "@types/esrecurse": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/@types/esrecurse/-/esrecurse-4.3.1.tgz", @@ -8439,6 +7579,90 @@ } } }, + "@vitest/expect": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.11.tgz", + "integrity": "sha512-VX2x5vNJXET47KAFzwERI+KRMtTTCSWTfSMKsW7JsUsXV4psq++e3DvZpuTDOpHcxytiDs6p2nhVb2tVDiiUYw==", + "dev": true, + "requires": { + "@standard-schema/spec": "^1.1.0", + "@types/chai": "^5.2.2", + "@vitest/spy": "4.1.11", + "@vitest/utils": "4.1.11", + "chai": "^6.2.2", + "tinyrainbow": "^3.1.0" + } + }, + "@vitest/mocker": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.1.11.tgz", + "integrity": "sha512-2XJVD55d1o5AZous5CCGKS74g/riOj9odEt2bQpCVZeblHyHdnMeFl4jl0XjU21stf4mbjUkew2eXQZt65g5CQ==", + "dev": true, + "requires": { + "@vitest/spy": "4.1.11", + "estree-walker": "^3.0.3", + "magic-string": "^0.30.21" + }, + "dependencies": { + "estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "dev": true, + "requires": { + "@types/estree": "^1.0.0" + } + } + } + }, + "@vitest/pretty-format": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.1.11.tgz", + "integrity": "sha512-yiZzPbGTS9Sr/JpFl8zHrcIkAofNbFV6k21vIgQN/cY/oxZeXhJv5sc/MBJ5jFKWmWs+oJHw0UXLZjmf931+Vw==", + "dev": true, + "requires": { + "tinyrainbow": "^3.1.0" + } + }, + "@vitest/runner": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.1.11.tgz", + "integrity": "sha512-LztvUgdwMNJMIkj3hQnnxiC2Xy1zNxq928W/xhjCLaNCzqTZOudjwbQf6v9IntZGPw132i2Lq2rgTRZHD3JHNw==", + "dev": true, + "requires": { + "@vitest/utils": "4.1.11", + "pathe": "^2.0.3" + } + }, + "@vitest/snapshot": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.1.11.tgz", + "integrity": "sha512-pN7ikn1ON7h8ee4gIAp4AzyK+zBtJPzVbqOgu5LCEh4VaJVbPQcgYQYJIMGQPXVeJJq1fnfazis7a5pFNPahog==", + "dev": true, + "requires": { + "@vitest/pretty-format": "4.1.11", + "@vitest/utils": "4.1.11", + "magic-string": "^0.30.21", + "pathe": "^2.0.3" + } + }, + "@vitest/spy": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.1.11.tgz", + "integrity": "sha512-apNa/prQy2qCeywhnixOHPRCgGNhvg7T4Dapfl1GahLp/R+uhBm5cPyFoNVyqsNd2h1nJxL6BqqdIjiABL60YA==", + "dev": true + }, + "@vitest/utils": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.11.tgz", + "integrity": "sha512-zTCVGpyFsGWBhllOyKlTw/vnr6D9qxsfSDyfbyZmTyjHw5N/VuvzHpHoQjm2ZJzn4RJgx5w4r7V0er69CmLgPQ==", + "dev": true, + "requires": { + "@vitest/pretty-format": "4.1.11", + "convert-source-map": "^2.0.0", + "tinyrainbow": "^3.1.0" + } + }, "acorn": { "version": "8.16.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz", @@ -8470,71 +7694,12 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, - "array-buffer-byte-length": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz", - "integrity": "sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==", - "dev": true, - "requires": { - "call-bound": "^1.0.3", - "is-array-buffer": "^3.0.5" - } - }, - "array.prototype.every": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/array.prototype.every/-/array.prototype.every-1.1.7.tgz", - "integrity": "sha512-BIP72rKvrKd08ptbetLb4qvrlGjkv30yOKgKcTtOIbHyQt3shr/jyOzdApiCOh3LPYrpJo5M6i0zmVldOF2pUw==", - "dev": true, - "requires": { - "call-bound": "^1.0.2", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-object-atoms": "^1.0.0", - "is-string": "^1.1.0" - } - }, - "array.prototype.flatmap": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.3.tgz", - "integrity": "sha512-Y7Wt51eKJSyi80hFrJCePGGNo5ktJCslFuboqJsbf57CCPcm5zztluPlc4/aD8sWsKvlwatezpV4U1efk8kpjg==", - "dev": true, - "requires": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-shim-unscopables": "^1.0.2" - } - }, - "arraybuffer.prototype.slice": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz", - "integrity": "sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==", - "dev": true, - "requires": { - "array-buffer-byte-length": "^1.0.1", - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6", - "is-array-buffer": "^3.0.4" - } - }, - "async-function": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/async-function/-/async-function-1.0.0.tgz", - "integrity": "sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==", + "assertion-error": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", + "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", "dev": true }, - "available-typed-arrays": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", - "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", - "dev": true, - "requires": { - "possible-typed-array-names": "^1.0.0" - } - }, "babel-plugin-polyfill-corejs2": { "version": "0.4.15", "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.15.tgz", @@ -8565,12 +7730,6 @@ "@babel/helper-define-polyfill-provider": "^0.6.6" } }, - "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, "baseline-browser-mapping": { "version": "2.9.19", "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.9.19.tgz", @@ -8583,16 +7742,6 @@ "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", "dev": true }, - "brace-expansion": { - "version": "1.1.18", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.18.tgz", - "integrity": "sha512-Edep/X9fGqVNmzKBVsDYIOtD+z1tuezV70LBjdCst9Tqu76lsnvRiZ6oTic1n+/BIwX6QDGAO94PN4N2SADvtw==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, "browserslist": { "version": "4.28.1", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.1.tgz", @@ -8612,38 +7761,6 @@ "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "dev": true }, - "call-bind": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.9.tgz", - "integrity": "sha512-a/hy+pNsFUTR+Iz8TCJvXudKVLAnz/DyeSUo10I5yvFDQJBFU2s9uqQpoSrJlroHUKoKqzg+epxyP9lqFdzfBQ==", - "dev": true, - "requires": { - "call-bind-apply-helpers": "^1.0.2", - "es-define-property": "^1.0.1", - "get-intrinsic": "^1.3.0", - "set-function-length": "^1.2.2" - } - }, - "call-bind-apply-helpers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", - "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", - "dev": true, - "requires": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2" - } - }, - "call-bound": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", - "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", - "dev": true, - "requires": { - "call-bind-apply-helpers": "^1.0.2", - "get-intrinsic": "^1.3.0" - } - }, "caniuse-lite": { "version": "1.0.30001769", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001769.tgz", @@ -8659,18 +7776,18 @@ "lodash": "^4.17.15" } }, + "chai": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/chai/-/chai-6.2.2.tgz", + "integrity": "sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==", + "dev": true + }, "commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "dev": true }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, "convert-source-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", @@ -8697,292 +7814,44 @@ "which": "^2.0.1" } }, - "data-view-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.2.tgz", - "integrity": "sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ==", - "dev": true, - "requires": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.2" - } - }, - "data-view-byte-length": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.2.tgz", - "integrity": "sha512-tuhGbE6CfTM9+5ANGf+oQb72Ky/0+s3xKUpHvShfiz2RxMFgFPjsXuRLBVMtvMs15awe45SRb83D6wH4ew6wlQ==", - "dev": true, - "requires": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.2" - } - }, - "data-view-byte-offset": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.1.tgz", - "integrity": "sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==", - "dev": true, - "requires": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" - } - }, "debug": { "version": "4.4.3", "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", "dev": true, "requires": { - "ms": "^2.1.3" - } - }, - "deep-equal": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.3.tgz", - "integrity": "sha512-ZIwpnevOurS8bpT4192sqAowWM76JDKSHYzMLty3BZGSswgq6pBaH3DhCSW5xVAZICZyKdOBPjwww5wfgT/6PA==", - "dev": true, - "requires": { - "array-buffer-byte-length": "^1.0.0", - "call-bind": "^1.0.5", - "es-get-iterator": "^1.1.3", - "get-intrinsic": "^1.2.2", - "is-arguments": "^1.1.1", - "is-array-buffer": "^3.0.2", - "is-date-object": "^1.0.5", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.2", - "isarray": "^2.0.5", - "object-is": "^1.1.5", - "object-keys": "^1.1.1", - "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.5.1", - "side-channel": "^1.0.4", - "which-boxed-primitive": "^1.0.2", - "which-collection": "^1.0.1", - "which-typed-array": "^1.1.13" - } - }, - "deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true - }, - "define-data-property": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", - "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", - "dev": true, - "requires": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "gopd": "^1.0.1" - } - }, - "define-properties": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", - "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", - "dev": true, - "requires": { - "define-data-property": "^1.0.1", - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" - } - }, - "defined": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.1.tgz", - "integrity": "sha512-hsBd2qSVCRE+5PmNdHt1uzyrFu5d3RwmFDKzyNZMFq/EwDNJF7Ee5+D5oEKF0hU6LhtoUF1macFvOe4AskQC1Q==", - "dev": true - }, - "dotignore": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/dotignore/-/dotignore-0.1.2.tgz", - "integrity": "sha512-UGGGWfSauusaVJC+8fgV+NVvBXkCTmVv7sk6nojDZZvuOUNGUy0Zk4UpHQD6EDjS0jpBwcACvH4eofvyzBcRDw==", - "dev": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "dunder-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", - "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", - "dev": true, - "requires": { - "call-bind-apply-helpers": "^1.0.1", - "es-errors": "^1.3.0", - "gopd": "^1.2.0" - } - }, - "duplexer3": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-1.0.0.tgz", - "integrity": "sha512-6O5ndCyJ9CGF9cR2Yi3VFq1OvXXLEgX848InIOl8xUBPYwb8jn/93j10lGaZyLnMRa71IT5OHhURlOiVjH9OVg==", - "dev": true - }, - "electron-to-chromium": { - "version": "1.5.286", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.286.tgz", - "integrity": "sha512-9tfDXhJ4RKFNerfjdCcZfufu49vg620741MNs26a9+bhLThdB+plgMeou98CAaHu/WATj2iHOOHTp1hWtABj2A==", - "dev": true - }, - "entities": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", - "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", - "dev": true - }, - "es-abstract": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.24.2.tgz", - "integrity": "sha512-2FpH9Q5i2RRwyEP1AylXe6nYLR5OhaJTZwmlcP0dL/+JCbgg7yyEo/sEK6HeGZRf3dFpWwThaRHVApXSkW3xeg==", - "dev": true, - "requires": { - "array-buffer-byte-length": "^1.0.2", - "arraybuffer.prototype.slice": "^1.0.4", - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.8", - "call-bound": "^1.0.4", - "data-view-buffer": "^1.0.2", - "data-view-byte-length": "^1.0.2", - "data-view-byte-offset": "^1.0.1", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.1.1", - "es-set-tostringtag": "^2.1.0", - "es-to-primitive": "^1.3.0", - "function.prototype.name": "^1.1.8", - "get-intrinsic": "^1.3.0", - "get-proto": "^1.0.1", - "get-symbol-description": "^1.1.0", - "globalthis": "^1.0.4", - "gopd": "^1.2.0", - "has-property-descriptors": "^1.0.2", - "has-proto": "^1.2.0", - "has-symbols": "^1.1.0", - "hasown": "^2.0.2", - "internal-slot": "^1.1.0", - "is-array-buffer": "^3.0.5", - "is-callable": "^1.2.7", - "is-data-view": "^1.0.2", - "is-negative-zero": "^2.0.3", - "is-regex": "^1.2.1", - "is-set": "^2.0.3", - "is-shared-array-buffer": "^1.0.4", - "is-string": "^1.1.1", - "is-typed-array": "^1.1.15", - "is-weakref": "^1.1.1", - "math-intrinsics": "^1.1.0", - "object-inspect": "^1.13.4", - "object-keys": "^1.1.1", - "object.assign": "^4.1.7", - "own-keys": "^1.0.1", - "regexp.prototype.flags": "^1.5.4", - "safe-array-concat": "^1.1.3", - "safe-push-apply": "^1.0.0", - "safe-regex-test": "^1.1.0", - "set-proto": "^1.0.0", - "stop-iteration-iterator": "^1.1.0", - "string.prototype.trim": "^1.2.10", - "string.prototype.trimend": "^1.0.9", - "string.prototype.trimstart": "^1.0.8", - "typed-array-buffer": "^1.0.3", - "typed-array-byte-length": "^1.0.3", - "typed-array-byte-offset": "^1.0.4", - "typed-array-length": "^1.0.7", - "unbox-primitive": "^1.1.0", - "which-typed-array": "^1.1.19" - } - }, - "es-abstract-get": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-abstract-get/-/es-abstract-get-1.0.0.tgz", - "integrity": "sha512-6PMWXpdhshVvFp+FoWYs1EvG1Nj0tvk0dZM+XcK0xMEM1czRVcP6ohqPWHy6qPagSpC8j4+p89WXlT+xXJs/fg==", - "dev": true, - "requires": { - "es-errors": "^1.3.0", - "es-object-atoms": "^1.1.2", - "is-callable": "^1.2.7", - "object-inspect": "^1.13.4" - } - }, - "es-define-property": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", - "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", - "dev": true - }, - "es-errors": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", - "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "dev": true - }, - "es-get-iterator": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.3.tgz", - "integrity": "sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.3", - "has-symbols": "^1.0.3", - "is-arguments": "^1.1.1", - "is-map": "^2.0.2", - "is-set": "^2.0.2", - "is-string": "^1.0.7", - "isarray": "^2.0.5", - "stop-iteration-iterator": "^1.0.0" - } - }, - "es-object-atoms": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz", - "integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==", - "dev": true, - "requires": { - "es-errors": "^1.3.0" - } - }, - "es-set-tostringtag": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", - "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", - "dev": true, - "requires": { - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.2" - } - }, - "es-shim-unscopables": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.1.0.tgz", - "integrity": "sha512-d9T8ucsEhh8Bi1woXCf+TIKDIROLG5WCkxg8geBCbvk22kzwC5G2OnXVMO6FUsvQlgUUXQ2itephWDLqDzbeCw==", - "dev": true, - "requires": { - "hasown": "^2.0.2" + "ms": "^2.1.3" } }, - "es-to-primitive": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.3.4.tgz", - "integrity": "sha512-yPDz7wqpg1/mmHLmS3tcfTfbw5f1eryXvyghYBffGdERwe+mV7ZcWzTR8LR17Kvqt3qfPurjlonmnq3MKXIOXw==", - "dev": true, - "requires": { - "es-abstract-get": "^1.0.0", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "is-callable": "^1.2.7", - "is-date-object": "^1.1.0", - "is-symbol": "^1.1.1" - } + "deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, + "detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true + }, + "electron-to-chromium": { + "version": "1.5.286", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.286.tgz", + "integrity": "sha512-9tfDXhJ4RKFNerfjdCcZfufu49vg620741MNs26a9+bhLThdB+plgMeou98CAaHu/WATj2iHOOHTp1hWtABj2A==", + "dev": true + }, + "entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "dev": true + }, + "es-module-lexer": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.3.2.tgz", + "integrity": "sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw==", + "dev": true }, "escalade": { "version": "3.2.0", @@ -9142,10 +8011,10 @@ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true }, - "events-to-array": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/events-to-array/-/events-to-array-2.0.3.tgz", - "integrity": "sha512-f/qE2gImHRa4Cp2y1stEOSgw8wTFyUdVJX7G//bMwbaV9JqISFxg99NbmVQeP7YLnDUZ2un851jlaDrlpmGehQ==", + "expect-type": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.4.0.tgz", + "integrity": "sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==", "dev": true }, "fast-deep-equal": { @@ -9209,21 +8078,6 @@ "integrity": "sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA==", "dev": true }, - "for-each": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", - "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", - "dev": true, - "requires": { - "is-callable": "^1.2.7" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, "fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", @@ -9237,100 +8091,12 @@ "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", "dev": true }, - "function.prototype.name": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.2.0.tgz", - "integrity": "sha512-jObKIik1P2QjPHP5nz5BaOtUlfgS0fWo8IUByNXkM+o+02sJOi94em77GwJKQSJ3gfPHdgzLNrHc1uokV4P/ew==", - "dev": true, - "requires": { - "call-bind": "^1.0.9", - "call-bound": "^1.0.4", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "functions-have-names": "^1.2.3", - "has-property-descriptors": "^1.0.2", - "hasown": "^2.0.4", - "is-callable": "^1.2.7", - "is-document.all": "^1.0.0" - } - }, - "functions-have-names": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", - "dev": true - }, - "generator-function": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/generator-function/-/generator-function-2.0.1.tgz", - "integrity": "sha512-SFdFmIJi+ybC0vjlHN0ZGVGHc3lgE0DxPAT0djjVg+kjOnSqclqmj0KQ7ykTOLP6YxoqOvuAODGdcHJn+43q3g==", - "dev": true - }, "gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", "dev": true }, - "get-intrinsic": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", - "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", - "dev": true, - "requires": { - "call-bind-apply-helpers": "^1.0.2", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.1.1", - "function-bind": "^1.1.2", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "has-symbols": "^1.1.0", - "hasown": "^2.0.2", - "math-intrinsics": "^1.1.0" - } - }, - "get-package-type": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", - "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", - "dev": true - }, - "get-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", - "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", - "dev": true, - "requires": { - "dunder-proto": "^1.0.1", - "es-object-atoms": "^1.0.0" - } - }, - "get-symbol-description": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.1.0.tgz", - "integrity": "sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==", - "dev": true, - "requires": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6" - } - }, - "glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, "glob-parent": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", @@ -9346,78 +8112,12 @@ "integrity": "sha512-Z2I8hM+PbJDXQDq3Icgpzv+mPdwr68iZUU9d5WW4FuXfDUQfkZaZuvjMv42/5crNyw154+9+VWXbYrUgDXbxNw==", "dev": true }, - "globalthis": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", - "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", - "dev": true, - "requires": { - "define-properties": "^1.2.1", - "gopd": "^1.0.1" - } - }, - "gopd": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", - "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", - "dev": true - }, "graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, - "has-bigints": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", - "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", - "dev": true - }, - "has-dynamic-import": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/has-dynamic-import/-/has-dynamic-import-2.1.1.tgz", - "integrity": "sha512-DuTCn6K/RW8S27npDMumGKsjG6HE7MxzedZka5tJP+9dqfxks+UMqKBmeCijHtIhsBEZPlbMg0qMHi2nKYVtKQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "get-intrinsic": "^1.2.6" - } - }, - "has-property-descriptors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", - "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", - "dev": true, - "requires": { - "es-define-property": "^1.0.0" - } - }, - "has-proto": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.2.0.tgz", - "integrity": "sha512-KIL7eQPfHQRC8+XluaIw7BHUwwqL19bQn4hzNgdr+1wXoU0KKj6rufu47lhY7KbJR2C6T6+PfyN0Ea7wkSS+qQ==", - "dev": true, - "requires": { - "dunder-proto": "^1.0.0" - } - }, - "has-symbols": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", - "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", - "dev": true - }, - "has-tostringtag": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", - "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", - "dev": true, - "requires": { - "has-symbols": "^1.0.3" - } - }, "hasown": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz", @@ -9427,12 +8127,6 @@ "function-bind": "^1.1.2" } }, - "hirestime": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/hirestime/-/hirestime-7.0.3.tgz", - "integrity": "sha512-XmjAwwjLJlDjVVljWht/+Pb6vTfs6A0z2ZpaCkVmzEkwiZcO/+lbj1DsxpsDvkVprYHCmNBxTr7tUohdlxG2Hw==", - "dev": true - }, "ignore": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", @@ -9445,92 +8139,6 @@ "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", "dev": true }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "internal-slot": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz", - "integrity": "sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==", - "dev": true, - "requires": { - "es-errors": "^1.3.0", - "hasown": "^2.0.2", - "side-channel": "^1.1.0" - } - }, - "is-arguments": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", - "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - } - }, - "is-array-buffer": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz", - "integrity": "sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A==", - "dev": true, - "requires": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "get-intrinsic": "^1.2.6" - } - }, - "is-async-function": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.1.1.tgz", - "integrity": "sha512-9dgM/cZBnNvjzaMYHVoxxfPj2QXt22Ev7SuuPrs+xav0ukGB0S6d4ydZdEiM48kLx5kDV+QBPrpVnFyefL8kkQ==", - "dev": true, - "requires": { - "async-function": "^1.0.0", - "call-bound": "^1.0.3", - "get-proto": "^1.0.1", - "has-tostringtag": "^1.0.2", - "safe-regex-test": "^1.1.0" - } - }, - "is-bigint": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.1.0.tgz", - "integrity": "sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ==", - "dev": true, - "requires": { - "has-bigints": "^1.0.2" - } - }, - "is-boolean-object": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.2.tgz", - "integrity": "sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A==", - "dev": true, - "requires": { - "call-bound": "^1.0.3", - "has-tostringtag": "^1.0.2" - } - }, - "is-callable": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", - "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", - "dev": true - }, "is-core-module": { "version": "2.16.2", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.2.tgz", @@ -9540,64 +8148,12 @@ "hasown": "^2.0.3" } }, - "is-data-view": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.2.tgz", - "integrity": "sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw==", - "dev": true, - "requires": { - "call-bound": "^1.0.2", - "get-intrinsic": "^1.2.6", - "is-typed-array": "^1.1.13" - } - }, - "is-date-object": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.1.0.tgz", - "integrity": "sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg==", - "dev": true, - "requires": { - "call-bound": "^1.0.2", - "has-tostringtag": "^1.0.2" - } - }, - "is-document.all": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-document.all/-/is-document.all-1.0.0.tgz", - "integrity": "sha512-+XSoyS05OdBbhFuELhgTCpFNHkpBOJqtsZfUFFpe5QTw+9Sjbh8zitxhQkYAo6wV7e1Vb8cAPvpCk9jGam/82g==", - "dev": true, - "requires": { - "call-bound": "^1.0.4" - } - }, "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", "dev": true }, - "is-finalizationregistry": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.1.1.tgz", - "integrity": "sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg==", - "dev": true, - "requires": { - "call-bound": "^1.0.3" - } - }, - "is-generator-function": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.2.tgz", - "integrity": "sha512-upqt1SkGkODW9tsGNG5mtXTXtECizwtS2kA161M+gJPc1xdb/Ax629af6YrTwcOeQHbewrPNlE5Dx7kzvXTizA==", - "dev": true, - "requires": { - "call-bound": "^1.0.4", - "generator-function": "^2.0.0", - "get-proto": "^1.0.1", - "has-tostringtag": "^1.0.2", - "safe-regex-test": "^1.1.0" - } - }, "is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -9607,116 +8163,6 @@ "is-extglob": "^2.1.1" } }, - "is-map": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", - "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==", - "dev": true - }, - "is-negative-zero": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", - "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", - "dev": true - }, - "is-number-object": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.1.tgz", - "integrity": "sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw==", - "dev": true, - "requires": { - "call-bound": "^1.0.3", - "has-tostringtag": "^1.0.2" - } - }, - "is-regex": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", - "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==", - "dev": true, - "requires": { - "call-bound": "^1.0.2", - "gopd": "^1.2.0", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.2" - } - }, - "is-set": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", - "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==", - "dev": true - }, - "is-shared-array-buffer": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.4.tgz", - "integrity": "sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A==", - "dev": true, - "requires": { - "call-bound": "^1.0.3" - } - }, - "is-string": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.1.1.tgz", - "integrity": "sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==", - "dev": true, - "requires": { - "call-bound": "^1.0.3", - "has-tostringtag": "^1.0.2" - } - }, - "is-symbol": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.1.1.tgz", - "integrity": "sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w==", - "dev": true, - "requires": { - "call-bound": "^1.0.2", - "has-symbols": "^1.1.0", - "safe-regex-test": "^1.1.0" - } - }, - "is-typed-array": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", - "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", - "dev": true, - "requires": { - "which-typed-array": "^1.1.16" - } - }, - "is-weakmap": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", - "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==", - "dev": true - }, - "is-weakref": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.1.1.tgz", - "integrity": "sha512-6i9mGWSlqzNMEqpCp93KwRS1uUOodk2OJ6b+sq7ZPDSy2WuI5NFIxp/254TytR8ftefexkWn5xNiHUNpPOfSew==", - "dev": true, - "requires": { - "call-bound": "^1.0.3" - } - }, - "is-weakset": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.3.tgz", - "integrity": "sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.7", - "get-intrinsic": "^1.2.4" - } - }, - "isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true - }, "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -9823,15 +8269,112 @@ "graceful-fs": "^4.1.9" } }, - "levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + } + }, + "lightningcss": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.33.0.tgz", + "integrity": "sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==", + "dev": true, + "requires": { + "detect-libc": "^2.0.3", + "lightningcss-android-arm64": "1.33.0", + "lightningcss-darwin-arm64": "1.33.0", + "lightningcss-darwin-x64": "1.33.0", + "lightningcss-freebsd-x64": "1.33.0", + "lightningcss-linux-arm-gnueabihf": "1.33.0", + "lightningcss-linux-arm64-gnu": "1.33.0", + "lightningcss-linux-arm64-musl": "1.33.0", + "lightningcss-linux-x64-gnu": "1.33.0", + "lightningcss-linux-x64-musl": "1.33.0", + "lightningcss-win32-arm64-msvc": "1.33.0", + "lightningcss-win32-x64-msvc": "1.33.0" + } + }, + "lightningcss-android-arm64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.33.0.tgz", + "integrity": "sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==", + "dev": true, + "optional": true + }, + "lightningcss-darwin-arm64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.33.0.tgz", + "integrity": "sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==", + "dev": true, + "optional": true + }, + "lightningcss-darwin-x64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.33.0.tgz", + "integrity": "sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==", + "dev": true, + "optional": true + }, + "lightningcss-freebsd-x64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.33.0.tgz", + "integrity": "sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==", + "dev": true, + "optional": true + }, + "lightningcss-linux-arm-gnueabihf": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.33.0.tgz", + "integrity": "sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==", + "dev": true, + "optional": true + }, + "lightningcss-linux-arm64-gnu": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.33.0.tgz", + "integrity": "sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==", + "dev": true, + "optional": true + }, + "lightningcss-linux-arm64-musl": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.33.0.tgz", + "integrity": "sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==", + "dev": true, + "optional": true + }, + "lightningcss-linux-x64-gnu": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.33.0.tgz", + "integrity": "sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==", + "dev": true, + "optional": true + }, + "lightningcss-linux-x64-musl": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.33.0.tgz", + "integrity": "sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==", + "dev": true, + "optional": true + }, + "lightningcss-win32-arm64-msvc": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.33.0.tgz", + "integrity": "sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==", + "dev": true, + "optional": true + }, + "lightningcss-win32-x64-msvc": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.33.0.tgz", + "integrity": "sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==", "dev": true, - "requires": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - } + "optional": true }, "linkify-it": { "version": "5.0.2", @@ -9879,6 +8422,15 @@ "dev": true, "peer": true }, + "magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "dev": true, + "requires": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, "markdown-it": { "version": "14.3.0", "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.3.0.tgz", @@ -9906,141 +8458,48 @@ "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==", "dev": true }, - "math-intrinsics": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", - "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", - "dev": true - }, "mdurl": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz", "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==", "dev": true }, - "minimatch": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", - "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true - }, "mkdirp": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", "dev": true }, - "mock-property": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/mock-property/-/mock-property-1.1.0.tgz", - "integrity": "sha512-1/JjbLoGwv87xVsutkX0XJc0M0W4kb40cZl/K41xtTViBOD9JuFPKfyMNTrLJ/ivYAd0aPqu/vduamXO0emTFQ==", - "dev": true, - "requires": { - "define-data-property": "^1.1.4", - "functions-have-names": "^1.2.3", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2", - "hasown": "^2.0.2", - "isarray": "^2.0.5", - "object-inspect": "^1.13.2" - } - }, "ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, + "nanoid": { + "version": "3.3.18", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.18.tgz", + "integrity": "sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w==", + "dev": true + }, "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, - "node-exports-info": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/node-exports-info/-/node-exports-info-1.6.2.tgz", - "integrity": "sha512-kXs9Go0cah0qHVV2v389IXQLdLCeE1xfFtjOAF+iobu0OIoG1pje8At2vMHyaPMiPMnG/LWP50twML21eMcAag==", - "dev": true, - "requires": { - "array.prototype.flatmap": "^1.3.3", - "es-errors": "^1.3.0", - "object.entries": "^1.1.9", - "semver": "^6.3.1" - } - }, "node-releases": { "version": "2.0.27", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.27.tgz", "integrity": "sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA==", "dev": true }, - "object-inspect": { - "version": "1.13.4", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", - "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", - "dev": true - }, - "object-is": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.6.tgz", - "integrity": "sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==", - "dev": true, - "requires": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1" - } - }, - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "obug": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/obug/-/obug-2.1.4.tgz", + "integrity": "sha512-4a+OsYv9UktOJKE+l1A4OufDgdRF9PifWj+tJnHURo/P+WOxpG4GzUFL9qCalmWauao6ogiG+QvnCovwPoyAWA==", "dev": true }, - "object.assign": { - "version": "4.1.7", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.7.tgz", - "integrity": "sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==", - "dev": true, - "requires": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0", - "has-symbols": "^1.1.0", - "object-keys": "^1.1.1" - } - }, - "object.entries": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.9.tgz", - "integrity": "sha512-8u/hfXFRBD1O0hPUjioLhoWFHRmt6tKA4/vZPyckBr18l1KE9uHrFaFaUi8MDRTpi4uak2goyPTSNJLXX2k2Hw==", - "dev": true, - "requires": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.4", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.1.1" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "requires": { - "wrappy": "1" - } - }, "optionator": { "version": "0.9.3", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", @@ -10055,18 +8514,6 @@ "type-check": "^0.4.0" } }, - "own-keys": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/own-keys/-/own-keys-1.0.2.tgz", - "integrity": "sha512-19YVAg7T+WTrxggPukVq7DjTv6+PJ867TmhCvBsYwmbFCsZd344rq2Ld1p0wo8f8Qrrhgp82c6FJRqdXWtSEhg==", - "dev": true, - "requires": { - "call-bound": "^1.0.4", - "get-intrinsic": "^1.3.0", - "object-keys": "^1.1.1", - "safe-push-apply": "^1.0.0" - } - }, "p-locate": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", @@ -10087,18 +8534,6 @@ } } }, - "parse-ms": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-3.0.0.tgz", - "integrity": "sha512-Tpb8Z7r7XbbtBTrM9UhpkzzaMrqA2VXMT3YChzYltwV3P3pM6t8wl7TvpMnSTosz1aQAdVib7kdoys7vYOPerw==", - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true - }, "path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -10111,6 +8546,12 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, + "pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", + "dev": true + }, "picocolors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", @@ -10123,11 +8564,16 @@ "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", "dev": true }, - "possible-typed-array-names": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", - "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==", - "dev": true + "postcss": { + "version": "8.5.26", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.26.tgz", + "integrity": "sha512-u82N74LFzG8ca+dD8puPnplTXoGH4fTPpVGuIbt36G3qvNlkvfD0lEAZSxaly3KX8TS/L1A1gsCEmvKmBcVbkQ==", + "dev": true, + "requires": { + "nanoid": "^3.3.17", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + } }, "prelude-ls": { "version": "1.2.1", @@ -10135,15 +8581,6 @@ "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true }, - "pretty-ms": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-8.0.0.tgz", - "integrity": "sha512-ASJqOugUF1bbzI35STMBUpZqdfYKlJugy6JBziGi2EE+AL5JPJGSzvpeVXojxrr0ViUYoToUjb5kjSEGf7Y83Q==", - "dev": true, - "requires": { - "parse-ms": "^3.0.0" - } - }, "punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", @@ -10156,22 +8593,6 @@ "integrity": "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==", "dev": true }, - "reflect.getprototypeof": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz", - "integrity": "sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==", - "dev": true, - "requires": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.9", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "get-intrinsic": "^1.2.7", - "get-proto": "^1.0.1", - "which-builtin-type": "^1.2.1" - } - }, "regenerate": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", @@ -10187,20 +8608,6 @@ "regenerate": "^1.4.2" } }, - "regexp.prototype.flags": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz", - "integrity": "sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==", - "dev": true, - "requires": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-errors": "^1.3.0", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "set-function-name": "^2.0.2" - } - }, "regexpu-core": { "version": "6.4.0", "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-6.4.0.tgz", @@ -10250,6 +8657,31 @@ "supports-preserve-symlinks-flag": "^1.0.0" } }, + "rolldown": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.5.tgz", + "integrity": "sha512-VD2IE5PUG4Oj8zz2VGykiYd5wbnjdIiSsNQb8Qu5B+noEp+A78mu2iVvpp27g8es14Tk9rofNs5Tku9iQCS4fA==", + "dev": true, + "requires": { + "@oxc-project/types": "=0.146.0", + "@rolldown/binding-android-arm-eabi": "1.2.5", + "@rolldown/binding-android-arm64": "1.2.5", + "@rolldown/binding-darwin-arm64": "1.2.5", + "@rolldown/binding-darwin-x64": "1.2.5", + "@rolldown/binding-freebsd-x64": "1.2.5", + "@rolldown/binding-linux-arm-gnueabihf": "1.2.5", + "@rolldown/binding-linux-arm64-gnu": "1.2.5", + "@rolldown/binding-linux-arm64-musl": "1.2.5", + "@rolldown/binding-linux-ppc64-gnu": "1.2.5", + "@rolldown/binding-linux-s390x-gnu": "1.2.5", + "@rolldown/binding-linux-x64-gnu": "1.2.5", + "@rolldown/binding-linux-x64-musl": "1.2.5", + "@rolldown/binding-openharmony-arm64": "1.2.5", + "@rolldown/binding-win32-arm64-msvc": "1.2.5", + "@rolldown/binding-win32-x64-msvc": "1.2.5", + "@rolldown/pluginutils": "^1.0.0" + } + }, "rollup": { "version": "4.62.5", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.62.5.tgz", @@ -10286,40 +8718,6 @@ "fsevents": "~2.3.2" } }, - "safe-array-concat": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.4.tgz", - "integrity": "sha512-wtZlHyOje6OZTGqAoaDKxFkgRtkF9CnHAVnCHKfuj200wAgL+bSJhdsCD2l0Qx/2ekEXjPWcyKkfGb5CPboslg==", - "dev": true, - "requires": { - "call-bind": "^1.0.9", - "call-bound": "^1.0.4", - "get-intrinsic": "^1.3.0", - "has-symbols": "^1.1.0", - "isarray": "^2.0.5" - } - }, - "safe-push-apply": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/safe-push-apply/-/safe-push-apply-1.0.0.tgz", - "integrity": "sha512-iKE9w/Z7xCzUMIZqdBsp6pEQvwuEebH4vdpjcDWnyzaI6yl6O9FHvVpmGelvEHNsoY6wGblkxR6Zty/h00WiSA==", - "dev": true, - "requires": { - "es-errors": "^1.3.0", - "isarray": "^2.0.5" - } - }, - "safe-regex-test": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz", - "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==", - "dev": true, - "requires": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "is-regex": "^1.2.1" - } - }, "semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", @@ -10332,43 +8730,6 @@ "integrity": "sha512-F4LcB0UqUl1zErq+1nYEEzSHJnIwb3AF2XWB94b+afhrekOUijwooAYqFyRbjYkm2PAKBabx6oYv/xDxNi8IBw==", "dev": true }, - "set-function-length": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", - "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", - "dev": true, - "requires": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2" - } - }, - "set-function-name": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", - "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", - "dev": true, - "requires": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "functions-have-names": "^1.2.3", - "has-property-descriptors": "^1.0.2" - } - }, - "set-proto": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/set-proto/-/set-proto-1.0.0.tgz", - "integrity": "sha512-RJRdvCo6IAnPdsvP/7m6bsQqNnn1FCBX5ZNtFL98MmFF/4xAIJTIg1YbHW5DC2W5SKZanrC6i4HsJqlajw/dZw==", - "dev": true, - "requires": { - "dunder-proto": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0" - } - }, "shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -10384,53 +8745,11 @@ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, - "side-channel": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", - "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", - "dev": true, - "requires": { - "es-errors": "^1.3.0", - "object-inspect": "^1.13.3", - "side-channel-list": "^1.0.0", - "side-channel-map": "^1.0.1", - "side-channel-weakmap": "^1.0.2" - } - }, - "side-channel-list": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", - "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", - "dev": true, - "requires": { - "es-errors": "^1.3.0", - "object-inspect": "^1.13.3" - } - }, - "side-channel-map": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", - "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", - "dev": true, - "requires": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.5", - "object-inspect": "^1.13.3" - } - }, - "side-channel-weakmap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", - "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", - "dev": true, - "requires": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.5", - "object-inspect": "^1.13.3", - "side-channel-map": "^1.0.1" - } + "siginfo": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", + "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", + "dev": true }, "smob": { "version": "1.5.0", @@ -10444,6 +8763,12 @@ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true }, + "source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true + }, "source-map-support": { "version": "0.5.21", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", @@ -10454,54 +8779,17 @@ "source-map": "^0.6.0" } }, - "stop-iteration-iterator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.1.0.tgz", - "integrity": "sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==", - "dev": true, - "requires": { - "es-errors": "^1.3.0", - "internal-slot": "^1.1.0" - } - }, - "string.prototype.trim": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.11.tgz", - "integrity": "sha512-PwvK7BU+CMTJGYQCTZb5RWXIML92lftJLhQz1tBzgKiqGxJaMlBAa48POXaNAC2s4y8jr3EFqrkF9+44neS46w==", - "dev": true, - "requires": { - "call-bind": "^1.0.9", - "call-bound": "^1.0.4", - "define-data-property": "^1.1.4", - "define-properties": "^1.2.1", - "es-abstract": "^1.24.2", - "es-object-atoms": "^1.1.2", - "has-property-descriptors": "^1.0.2", - "safe-regex-test": "^1.1.0" - } - }, - "string.prototype.trimend": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.10.tgz", - "integrity": "sha512-2+3aDAOmPTmuFwjDnmJG2ctEkQKVki7vOSqaxkv42Mowj1V6PnvuwFCRrR5lChUux1TBskPjfkeTOhqczDMxTw==", - "dev": true, - "requires": { - "call-bind": "^1.0.9", - "call-bound": "^1.0.4", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.1.2" - } + "stackback": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", + "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", + "dev": true }, - "string.prototype.trimstart": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", - "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", - "dev": true, - "requires": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - } + "std-env": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-4.2.0.tgz", + "integrity": "sha512-oCUKSupKTHX53EyjDtuZQ64pjLJ6yYCtpmEw0goYxtjG9KpbRe8KAsl2tBUGU9DyMcJ0RwJ8GqJAFzMXcXW1Rw==", + "dev": true }, "strip-json-comments": { "version": "3.1.1", @@ -10515,96 +8803,6 @@ "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", "dev": true }, - "tap-min": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/tap-min/-/tap-min-3.0.0.tgz", - "integrity": "sha512-oEhFyYCUEmRLYwtlIkRgeVkX538yEQfoSg6BcWXMq05TFsnpsi3vtQZJeEBkXzMWlj1h/rKaRMaWPCvCTmIIXg==", - "dev": true, - "requires": { - "chalk": "^5.3.0", - "duplexer3": "^1.0.0", - "hirestime": "^7.0.3", - "pretty-ms": "^8.0.0", - "tap-parser": "^13.0.2-1" - }, - "dependencies": { - "chalk": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", - "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", - "dev": true - } - } - }, - "tap-parser": { - "version": "13.0.2-1", - "resolved": "https://registry.npmjs.org/tap-parser/-/tap-parser-13.0.2-1.tgz", - "integrity": "sha512-A6U6TvfwEUFVivyZFiTth3LVrGw9aa4j4cSU8W6ui3sfrZBRNzE1y5YhBomz0+RIRURdspFJdaJvVgSXI68h0Q==", - "dev": true, - "requires": { - "events-to-array": "^2.0.3", - "tap-yaml": "2.1.1-1" - } - }, - "tap-yaml": { - "version": "2.1.1-1", - "resolved": "https://registry.npmjs.org/tap-yaml/-/tap-yaml-2.1.1-1.tgz", - "integrity": "sha512-acWZWpwstr0YMms30FW2nlFkJ0hSm/o2x32Hq5v10IKqYKwnRXARSx6TKbz/gzcSoODPi9PkFQYGYBgowxKDfA==", - "dev": true, - "requires": { - "yaml": "^2.3.0", - "yaml-types": "^0.3.0" - } - }, - "tape": { - "version": "5.10.2", - "resolved": "https://registry.npmjs.org/tape/-/tape-5.10.2.tgz", - "integrity": "sha512-MfhVVAWa834kfYL4KgrqHblWfwkjaQvfaQhAX/bBTNQsK8oJ4ztpUe7jiemR2Vegw4pYwpnQMy51MhEmRzbbsg==", - "dev": true, - "requires": { - "@ljharb/now": "^1.0.1", - "@ljharb/resumer": "^0.1.3", - "@ljharb/through": "^2.3.14", - "array.prototype.every": "^1.1.7", - "call-bind": "^1.0.9", - "call-bound": "^1.0.4", - "deep-equal": "^2.2.3", - "defined": "^1.0.1", - "dotignore": "^0.1.2", - "es-object-atoms": "^1.1.2", - "for-each": "^0.3.5", - "get-package-type": "^0.1.0", - "glob": "^7.2.3", - "has-dynamic-import": "^2.1.1", - "hasown": "^2.0.4", - "inherits": "^2.0.4", - "is-regex": "^1.2.1", - "minimist": "^1.2.8", - "mock-property": "^1.1.0", - "object-inspect": "^1.13.4", - "object-is": "^1.1.6", - "object-keys": "^1.1.1", - "object.assign": "^4.1.7", - "resolve": "^2.0.0-next.7", - "string.prototype.trim": "^1.2.11" - }, - "dependencies": { - "resolve": { - "version": "2.0.0-next.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.7.tgz", - "integrity": "sha512-tqt+NBWwyaMgw3zDsnygx4CByWjQEJHOPMdslYhppaQSJUtL/D4JO9CcBBlhPoI8lz9oJIDXkwXfhF4aWqP8xQ==", - "dev": true, - "requires": { - "es-errors": "^1.3.0", - "is-core-module": "^2.16.2", - "node-exports-info": "^1.6.0", - "object-keys": "^1.1.1", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - } - } - } - }, "terser": { "version": "5.31.0", "resolved": "https://registry.npmjs.org/terser/-/terser-5.31.0.tgz", @@ -10617,6 +8815,18 @@ "source-map-support": "~0.5.20" } }, + "tinybench": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", + "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", + "dev": true + }, + "tinyexec": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.3.0.tgz", + "integrity": "sha512-QKAl9m8gWWGHV8jZcPeym6j+XULi6tOf1mT83WYJ4Lk2ytW/uwAWkrP0uFsdoYMdueVJ0qs26wZ+23xeB4ibNQ==", + "dev": true + }, "tinyglobby": { "version": "0.2.17", "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", @@ -10642,6 +8852,12 @@ } } }, + "tinyrainbow": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-3.1.1.tgz", + "integrity": "sha512-yau8yJdTt989Mm0Bd/236QnzEiPf2xLLTqUZRUJOo/3CB078LSwzei343DgtJVmfJKJE3TMINY1u42SQsP6mXw==", + "dev": true + }, "ts-api-utils": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.5.0.tgz", @@ -10658,59 +8874,6 @@ "prelude-ls": "^1.2.1" } }, - "typed-array-buffer": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", - "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==", - "dev": true, - "requires": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "is-typed-array": "^1.1.14" - } - }, - "typed-array-byte-length": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.3.tgz", - "integrity": "sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg==", - "dev": true, - "requires": { - "call-bind": "^1.0.8", - "for-each": "^0.3.3", - "gopd": "^1.2.0", - "has-proto": "^1.2.0", - "is-typed-array": "^1.1.14" - } - }, - "typed-array-byte-offset": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.4.tgz", - "integrity": "sha512-bTlAFB/FBYMcuX81gbL4OcpH5PmlFHqlCCpAl8AlEzMz5k53oNDvN8p1PNOWLEmI2x4orp3raOFB51tv9X+MFQ==", - "dev": true, - "requires": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.8", - "for-each": "^0.3.3", - "gopd": "^1.2.0", - "has-proto": "^1.2.0", - "is-typed-array": "^1.1.15", - "reflect.getprototypeof": "^1.0.9" - } - }, - "typed-array-length": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.8.tgz", - "integrity": "sha512-phPGCwqr2+Qo0fwniCE8e4pKnGu/yFb5nD5Y8bf0EEeiI5GklnACYA9GFy/DrAeRrKHXvHn+1SUsOWgJp6RO+g==", - "dev": true, - "requires": { - "call-bind": "^1.0.9", - "for-each": "^0.3.5", - "gopd": "^1.2.0", - "is-typed-array": "^1.1.15", - "possible-typed-array-names": "^1.1.0", - "reflect.getprototypeof": "^1.0.10" - } - }, "typedoc": { "version": "0.28.18", "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.28.18.tgz", @@ -10785,18 +8948,6 @@ "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==", "dev": true }, - "unbox-primitive": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz", - "integrity": "sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==", - "dev": true, - "requires": { - "call-bound": "^1.0.3", - "has-bigints": "^1.0.2", - "has-symbols": "^1.1.0", - "which-boxed-primitive": "^1.1.1" - } - }, "underscore": { "version": "1.13.8", "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.8.tgz", @@ -10856,74 +9007,81 @@ "punycode": "^2.1.0" } }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-boxed-primitive": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz", - "integrity": "sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==", + "vite": { + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/vite/-/vite-8.2.2.tgz", + "integrity": "sha512-cFKLV/PRgAUlIRm5WjMjJ86jrftzpqcgH+Us+DS8mI3CDNiH30Whrz8uHL3+MOLPAgqbMBAqWdAHAphOAM+z/Q==", "dev": true, "requires": { - "is-bigint": "^1.1.0", - "is-boolean-object": "^1.2.1", - "is-number-object": "^1.1.1", - "is-string": "^1.1.1", - "is-symbol": "^1.1.1" + "fsevents": "~2.3.3", + "lightningcss": "^1.33.0", + "picomatch": "^4.0.5", + "postcss": "^8.5.26", + "rolldown": "~1.2.4", + "tinyglobby": "^0.2.17" + }, + "dependencies": { + "picomatch": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", + "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", + "dev": true + } } }, - "which-builtin-type": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.2.1.tgz", - "integrity": "sha512-6iBczoX+kDQ7a3+YJBnh3T+KZRxM/iYNPXicqk66/Qfm1b93iu+yOImkg0zHbj5LNOcNv1TEADiZ0xa34B4q6Q==", - "dev": true, - "requires": { - "call-bound": "^1.0.2", - "function.prototype.name": "^1.1.6", - "has-tostringtag": "^1.0.2", - "is-async-function": "^2.0.0", - "is-date-object": "^1.1.0", - "is-finalizationregistry": "^1.1.0", - "is-generator-function": "^1.0.10", - "is-regex": "^1.2.1", - "is-weakref": "^1.0.2", - "isarray": "^2.0.5", - "which-boxed-primitive": "^1.1.0", - "which-collection": "^1.0.2", - "which-typed-array": "^1.1.16" + "vitest": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.1.11.tgz", + "integrity": "sha512-fhACrNXUidIbGSBr5FlbuBkO7VWC1ZyLl0DO4CU2DrQoAPxX84Ysxs+HeGQpii5lZWV1Q4gBZTTu49mF+A6Edw==", + "dev": true, + "requires": { + "@vitest/expect": "4.1.11", + "@vitest/mocker": "4.1.11", + "@vitest/pretty-format": "4.1.11", + "@vitest/runner": "4.1.11", + "@vitest/snapshot": "4.1.11", + "@vitest/spy": "4.1.11", + "@vitest/utils": "4.1.11", + "es-module-lexer": "^2.0.0", + "expect-type": "^1.3.0", + "magic-string": "^0.30.21", + "obug": "^2.1.1", + "pathe": "^2.0.3", + "picomatch": "^4.0.3", + "std-env": "^4.0.0-rc.1", + "tinybench": "^2.9.0", + "tinyexec": "^1.0.2", + "tinyglobby": "^0.2.15", + "tinyrainbow": "^3.1.0", + "vite": "^6.0.0 || ^7.0.0 || ^8.0.0", + "why-is-node-running": "^2.3.0" + }, + "dependencies": { + "picomatch": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", + "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", + "dev": true + } } }, - "which-collection": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", - "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, "requires": { - "is-map": "^2.0.3", - "is-set": "^2.0.3", - "is-weakmap": "^2.0.2", - "is-weakset": "^2.0.3" + "isexe": "^2.0.0" } }, - "which-typed-array": { - "version": "1.1.20", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.20.tgz", - "integrity": "sha512-LYfpUkmqwl0h9A2HL09Mms427Q1RZWuOHsukfVcKRq9q95iQxdw0ix1JQrqbcDR9PH1QDwf5Qo8OZb5lksZ8Xg==", + "why-is-node-running": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", + "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", "dev": true, "requires": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.8", - "call-bound": "^1.0.4", - "for-each": "^0.3.5", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "has-tostringtag": "^1.0.2" + "siginfo": "^2.0.0", + "stackback": "0.0.2" } }, "workerpool": { @@ -10932,12 +9090,6 @@ "integrity": "sha512-TmPRQYYSAnnDiEB0P/Ytip7bFGvqnSU6I2BcuSw7Hx+JSg/DsUi5ebYfc8GYaSdpuvOcEs6dXxPurOYpe9QFwg==", "dev": true }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, "xmlcreate": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.4.tgz", @@ -10954,14 +9106,8 @@ "version": "2.8.3", "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.3.tgz", "integrity": "sha512-AvbaCLOO2Otw/lW5bmh9d/WEdcDFdQp2Z2ZUH3pX9U2ihyUY0nvLv7J6TrWowklRGPYbB/IuIMfYgxaCPg5Bpg==", - "dev": true - }, - "yaml-types": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/yaml-types/-/yaml-types-0.3.0.tgz", - "integrity": "sha512-i9RxAO/LZBiE0NJUy9pbN5jFz5EasYDImzRkj8Y81kkInTi1laia3P3K/wlMKzOxFQutZip8TejvQP/DwgbU7A==", "dev": true, - "requires": {} + "peer": true }, "yocto-queue": { "version": "0.1.0", diff --git a/package.json b/package.json index 5785622..3b58491 100644 --- a/package.json +++ b/package.json @@ -11,8 +11,8 @@ "check": "npm run test && npm run lint && npm run typecheck", "lint": "eslint lib test", "release": "git diff --exit-code && PACKAGE_VERSION=$(jq -r .version package.json) && echo \"About to tag and push v$PACKAGE_VERSION. Continue? (y/n)\" && read -r REPLY && [ \"$REPLY\" = \"y\" ] && git tag --annotate v$PACKAGE_VERSION --message=v$PACKAGE_VERSION && git push origin v$PACKAGE_VERSION", - "test": "SKIPTABLES=1 tape './{lib,test}/*{.spec,-test}.js'|tap-min", - "test-all": "tape test/*-test.js", + "test": "SKIPTABLES=1 vitest run", + "test-all": "vitest run", "typecheck": "tsc --noEmit" }, "main": "dist/numfmt.js", @@ -58,11 +58,10 @@ "globals": "~17.11.0", "jsdoc": "~4.0.5", "rollup": "~4.62.5", - "tap-min": "~3.0.0", - "tape": "~5.10.2", "typedoc-plugin-markdown": "~4.12.0", "typescript": "~5.9.3", - "typescript-eslint": "~8.68.0" + "typescript-eslint": "~8.68.0", + "vitest": "~4.1.11" }, "allowScripts": { "fsevents@2.3.3": true From ec838b15212a5e3fbc01942561a895359b72f7bf Mon Sep 17 00:00:00 2001 From: Borgar Date: Wed, 26 Aug 2026 11:42:28 +0000 Subject: [PATCH 04/14] Rename files to ts and update imports --- lib/{clamp.js => clamp.ts} | 0 lib/{codeToLocale.js => codeToLocale.ts} | 0 lib/{constants.js => constants.ts} | 0 lib/{dec2frac.js => dec2frac.ts} | 0 lib/{formatInfo.js => formatInfo.ts} | 2 +- lib/{formatNumber.js => formatNumber.ts} | 8 +++---- lib/{general.js => general.ts} | 6 ++--- lib/{index.js => index.ts} | 24 +++++++++---------- lib/{locale.js => locale.ts} | 2 +- lib/{numberProps.js => numberProps.ts} | 0 lib/{numdec.js => numdec.ts} | 2 +- lib/{options.js => options.ts} | 0 lib/{pad.js => pad.ts} | 0 ...FormatSection.js => parseFormatSection.ts} | 4 ++-- lib/{parsePattern.js => parsePattern.ts} | 6 ++--- lib/{parseValue.js => parseValue.ts} | 4 ++-- lib/{round.js => round.ts} | 0 lib/{runPart.js => runPart.ts} | 18 +++++++------- lib/{serialDate.js => serialDate.ts} | 2 +- lib/{toYMD.js => toYMD.ts} | 2 +- lib/{tokenize.js => tokenize.ts} | 2 +- package.json | 4 ++-- test/bigint.spec.ts | 2 +- test/color.spec.ts | 2 +- test/comma.spec.ts | 2 +- test/conditionals.spec.ts | 2 +- test/date-parsing.spec.ts | 2 +- test/datebounds.spec.ts | 2 +- test/error.spec.ts | 2 +- test/expformat.spec.ts | 2 +- test/fragmented-numbers.spec.ts | 2 +- test/info.spec.ts | 2 +- test/leap1900.spec.ts | 2 +- test/locale.spec.ts | 2 +- test/numdec.spec.ts | 2 +- test/numfmt.spec.ts | 2 +- test/options.spec.ts | 2 +- test/parseValue.spec.ts | 4 ++-- test/robust-mode.spec.ts | 2 +- test/serialDate.spec.ts | 2 +- test/ssf-comma.spec.ts | 2 +- test/ssf-exp.spec.ts | 2 +- test/ssf-fraction.spec.ts | 2 +- test/ssf-general.spec.ts | 2 +- test/ssf-oddities.spec.ts | 2 +- test/ssf-valid.spec.ts | 2 +- test/text.spec.ts | 2 +- test/utils.ts | 2 +- 48 files changed, 70 insertions(+), 70 deletions(-) rename lib/{clamp.js => clamp.ts} (100%) rename lib/{codeToLocale.js => codeToLocale.ts} (100%) rename lib/{constants.js => constants.ts} (100%) rename lib/{dec2frac.js => dec2frac.ts} (100%) rename lib/{formatInfo.js => formatInfo.ts} (99%) rename lib/{formatNumber.js => formatNumber.ts} (91%) rename lib/{general.js => general.ts} (93%) rename lib/{index.js => index.ts} (96%) rename lib/{locale.js => locale.ts} (99%) rename lib/{numberProps.js => numberProps.ts} (100%) rename lib/{numdec.js => numdec.ts} (97%) rename lib/{options.js => options.ts} (100%) rename lib/{pad.js => pad.ts} (100%) rename lib/{parseFormatSection.js => parseFormatSection.ts} (99%) rename lib/{parsePattern.js => parsePattern.ts} (97%) rename lib/{parseValue.js => parseValue.ts} (99%) rename lib/{round.js => round.ts} (100%) rename lib/{runPart.js => runPart.ts} (97%) rename lib/{serialDate.js => serialDate.ts} (98%) rename lib/{toYMD.js => toYMD.ts} (97%) rename lib/{tokenize.js => tokenize.ts} (99%) diff --git a/lib/clamp.js b/lib/clamp.ts similarity index 100% rename from lib/clamp.js rename to lib/clamp.ts diff --git a/lib/codeToLocale.js b/lib/codeToLocale.ts similarity index 100% rename from lib/codeToLocale.js rename to lib/codeToLocale.ts diff --git a/lib/constants.js b/lib/constants.ts similarity index 100% rename from lib/constants.js rename to lib/constants.ts diff --git a/lib/dec2frac.js b/lib/dec2frac.ts similarity index 100% rename from lib/dec2frac.js rename to lib/dec2frac.ts diff --git a/lib/formatInfo.js b/lib/formatInfo.ts similarity index 99% rename from lib/formatInfo.js rename to lib/formatInfo.ts index 07a5db6..a127915 100644 --- a/lib/formatInfo.js +++ b/lib/formatInfo.ts @@ -1,4 +1,4 @@ -import { u_YEAR, u_MONTH, u_DAY, u_HOUR, u_MIN, u_SEC, reCurrencySymbols } from './constants.js'; +import { u_YEAR, u_MONTH, u_DAY, u_HOUR, u_MIN, u_SEC, reCurrencySymbols } from './constants.ts'; export function isPercent (partitions) { return !!( diff --git a/lib/formatNumber.js b/lib/formatNumber.ts similarity index 91% rename from lib/formatNumber.js rename to lib/formatNumber.ts index 82bf380..d4eda28 100644 --- a/lib/formatNumber.js +++ b/lib/formatNumber.ts @@ -1,7 +1,7 @@ -import { TOKEN_TEXT, indexColors } from './constants.js'; -import { defaultLocale, getLocale } from './locale.js'; -import { parseFormatSection } from './parseFormatSection.js'; -import { runPart } from './runPart.js'; +import { TOKEN_TEXT, indexColors } from './constants.ts'; +import { defaultLocale, getLocale } from './locale.ts'; +import { parseFormatSection } from './parseFormatSection.ts'; +import { runPart } from './runPart.ts'; const default_text = parseFormatSection([ { type: TOKEN_TEXT, value: '@', raw: '@' } diff --git a/lib/general.js b/lib/general.ts similarity index 93% rename from lib/general.js rename to lib/general.ts index 97ad37c..0c93409 100644 --- a/lib/general.js +++ b/lib/general.ts @@ -1,6 +1,6 @@ -import { getExponent, getSignificand } from './numberProps.js'; -import numdec from './numdec.js'; -import { round } from './round.js'; +import { getExponent, getSignificand } from './numberProps.ts'; +import numdec from './numdec.ts'; +import { round } from './round.ts'; const fixLocale = (s, l10n) => { return s.replace(/\./, l10n.decimal); diff --git a/lib/index.js b/lib/index.ts similarity index 96% rename from lib/index.js rename to lib/index.ts index d266da9..a570ac1 100644 --- a/lib/index.js +++ b/lib/index.ts @@ -5,21 +5,21 @@ import { TOKEN_CONDITION, TOKEN_DBNUM, TOKEN_NATNUM, TOKEN_LOCALE, TOKEN_COLOR, TOKEN_MODIFIER, TOKEN_AMPM, TOKEN_ESCAPED, TOKEN_STRING, TOKEN_SKIP, TOKEN_EXP, TOKEN_FILL, TOKEN_PAREN, TOKEN_CHAR -} from './constants.js'; +} from './constants.ts'; export { getLocale, parseLocale, addLocale -} from './locale.js'; +} from './locale.ts'; -import { defaultOptions } from './options.js'; +import { defaultOptions } from './options.ts'; -export { round } from './round.js'; -export { dec2frac } from './dec2frac.js'; +export { round } from './round.ts'; +export { dec2frac } from './dec2frac.ts'; -import { dateToSerial as handleDates } from './serialDate.js'; -export { dateToSerial, dateFromSerial } from './serialDate.js'; +import { dateToSerial as handleDates } from './serialDate.ts'; +export { dateToSerial, dateFromSerial } from './serialDate.ts'; export { parseNumber, @@ -27,13 +27,13 @@ export { parseTime, parseBool, parseValue -} from './parseValue.js'; +} from './parseValue.ts'; -import { formatColor as fmtColor, formatValue as fmtValue } from './formatNumber.js'; -import { info, dateInfo, isDate, isPercent, isText } from './formatInfo.js'; -import { parsePattern } from './parsePattern.js'; +import { formatColor as fmtColor, formatValue as fmtValue } from './formatNumber.ts'; +import { info, dateInfo, isDate, isPercent, isText } from './formatInfo.ts'; +import { parsePattern } from './parsePattern.ts'; -export { tokenize } from './tokenize.js'; +export { tokenize } from './tokenize.ts'; const _parseDataCache = Object.create({}); function prepareFormatterData (pattern, shouldThrow = false) { diff --git a/lib/locale.js b/lib/locale.ts similarity index 99% rename from lib/locale.js rename to lib/locale.ts index b9708b8..b69bf9f 100644 --- a/lib/locale.js +++ b/lib/locale.ts @@ -1,4 +1,4 @@ -import codeToLocale from './codeToLocale.js'; +import codeToLocale from './codeToLocale.ts'; // Locale: [language[_territory][.codeset][@modifier]] const re_locale = /^([a-z\d]+)(?:[_-]([a-z\d]+))?(?:\.([a-z\d]+))?(?:@([a-z\d]+))?$/i; diff --git a/lib/numberProps.js b/lib/numberProps.ts similarity index 100% rename from lib/numberProps.js rename to lib/numberProps.ts diff --git a/lib/numdec.js b/lib/numdec.ts similarity index 97% rename from lib/numdec.js rename to lib/numdec.ts index fb1389b..b740bc9 100644 --- a/lib/numdec.js +++ b/lib/numdec.ts @@ -1,4 +1,4 @@ -import { round } from './round.js'; +import { round } from './round.ts'; const zero = { total: 1, diff --git a/lib/options.js b/lib/options.ts similarity index 100% rename from lib/options.js rename to lib/options.ts diff --git a/lib/pad.js b/lib/pad.ts similarity index 100% rename from lib/pad.js rename to lib/pad.ts diff --git a/lib/parseFormatSection.js b/lib/parseFormatSection.ts similarity index 99% rename from lib/parseFormatSection.js rename to lib/parseFormatSection.ts index a71fb49..b6aa055 100644 --- a/lib/parseFormatSection.js +++ b/lib/parseFormatSection.ts @@ -1,4 +1,4 @@ -import { resolveLocale } from './locale.js'; +import { resolveLocale } from './locale.ts'; import { u_YEAR, u_MONTH, u_DAY, u_HOUR, u_MIN, u_SEC, u_DSEC, u_CSEC, u_MSEC, EPOCH_1900, EPOCH_1317, @@ -7,7 +7,7 @@ import { TOKEN_FILL, TOKEN_GENERAL, TOKEN_GROUP, TOKEN_HASH, TOKEN_LOCALE, TOKEN_MINUS, TOKEN_NATNUM, TOKEN_PAREN, TOKEN_PERCENT, TOKEN_PLUS, TOKEN_POINT, TOKEN_QMARK, TOKEN_SCALE, TOKEN_SKIP, TOKEN_SLASH, TOKEN_SPACE, TOKEN_STRING, TOKEN_TEXT, TOKEN_ZERO -} from './constants.js'; +} from './constants.ts'; function minMaxPad (str, part, prefix) { part[prefix + '_max'] = str.length; diff --git a/lib/parsePattern.js b/lib/parsePattern.ts similarity index 97% rename from lib/parsePattern.js rename to lib/parsePattern.ts index 484406d..9ec6dc7 100644 --- a/lib/parsePattern.js +++ b/lib/parsePattern.ts @@ -1,6 +1,6 @@ -import { resolveLocale } from './locale.js'; -import { parseFormatSection } from './parseFormatSection.js'; -import { tokenize } from './tokenize.js'; +import { resolveLocale } from './locale.ts'; +import { parseFormatSection } from './parseFormatSection.ts'; +import { tokenize } from './tokenize.ts'; const maybeAddMinus = part => { const [ op, val ] = part.condition ?? []; diff --git a/lib/parseValue.js b/lib/parseValue.ts similarity index 99% rename from lib/parseValue.js rename to lib/parseValue.ts index fdce005..ebbeb41 100644 --- a/lib/parseValue.js +++ b/lib/parseValue.ts @@ -1,5 +1,5 @@ -import { currencySymbols, reCurrencySymbols } from './constants.js'; -import { defaultLocale, getLocale } from './locale.js'; +import { currencySymbols, reCurrencySymbols } from './constants.ts'; +import { defaultLocale, getLocale } from './locale.ts'; /** * @typedef {object} ParseData diff --git a/lib/round.js b/lib/round.ts similarity index 100% rename from lib/round.js rename to lib/round.ts diff --git a/lib/runPart.js b/lib/runPart.ts similarity index 97% rename from lib/runPart.js rename to lib/runPart.ts index 774121e..3eea616 100644 --- a/lib/runPart.js +++ b/lib/runPart.ts @@ -1,17 +1,17 @@ -import { round } from './round.js'; -import { clamp } from './clamp.js'; -import { dec2frac } from './dec2frac.js'; -import { general } from './general.js'; -import { toYMD } from './toYMD.js'; -import { defaultLocale } from './locale.js'; +import { round } from './round.ts'; +import { clamp } from './clamp.ts'; +import { dec2frac } from './dec2frac.ts'; +import { general } from './general.ts'; +import { toYMD } from './toYMD.ts'; +import { defaultLocale } from './locale.ts'; import { u_DSEC, u_CSEC, u_MSEC, EPOCH_1317, MIN_S_DATE, MAX_S_DATE, MIN_L_DATE, MAX_L_DATE -} from './constants.js'; -import { pad } from './pad.js'; -import { getExponent, getSignificand } from './numberProps.js'; +} from './constants.ts'; +import { pad } from './pad.ts'; +import { getExponent, getSignificand } from './numberProps.ts'; const DAYSIZE = 86400; diff --git a/lib/serialDate.js b/lib/serialDate.ts similarity index 98% rename from lib/serialDate.js rename to lib/serialDate.ts index e105c36..2a09406 100644 --- a/lib/serialDate.js +++ b/lib/serialDate.ts @@ -1,4 +1,4 @@ -import { toYMD } from './toYMD.js'; +import { toYMD } from './toYMD.ts'; const floor = Math.floor; const DAYSIZE = 86400; diff --git a/lib/toYMD.js b/lib/toYMD.ts similarity index 97% rename from lib/toYMD.js rename to lib/toYMD.ts index d80b874..80f71b1 100644 --- a/lib/toYMD.js +++ b/lib/toYMD.ts @@ -1,4 +1,4 @@ -import { EPOCH_1317, EPOCH_1904 } from './constants.js'; +import { EPOCH_1317, EPOCH_1904 } from './constants.ts'; const floor = Math.floor; // https://www.codeproject.com/Articles/2750/Excel-Serial-Date-to-Day-Month-Year-and-Vice-Versa diff --git a/lib/tokenize.js b/lib/tokenize.ts similarity index 99% rename from lib/tokenize.js rename to lib/tokenize.ts index ba9573b..89b2eb6 100644 --- a/lib/tokenize.js +++ b/lib/tokenize.ts @@ -5,7 +5,7 @@ import { TOKEN_CONDITION, TOKEN_DBNUM, TOKEN_NATNUM, TOKEN_LOCALE, TOKEN_COLOR, TOKEN_MODIFIER, TOKEN_AMPM, TOKEN_ESCAPED, TOKEN_STRING, TOKEN_SKIP, TOKEN_EXP, TOKEN_FILL, TOKEN_PAREN, TOKEN_CHAR -} from './constants.js'; +} from './constants.ts'; const tokenHandlers = [ [ TOKEN_GENERAL, /^General/i, 0 ], diff --git a/package.json b/package.json index 3b58491..5c16815 100644 --- a/package.json +++ b/package.json @@ -17,12 +17,12 @@ }, "main": "dist/numfmt.js", "types": "dist/numfmt.d.ts", - "module": "lib/index.js", + "module": "lib/index.ts", "exports": { ".": { "require": "./dist/numfmt.js", "types": "./dist/numfmt.d.ts", - "default": "./lib/index.js" + "default": "./lib/index.ts" } }, "preferGlobal": false, diff --git a/test/bigint.spec.ts b/test/bigint.spec.ts index e817e9f..2f2eb96 100644 --- a/test/bigint.spec.ts +++ b/test/bigint.spec.ts @@ -1,5 +1,5 @@ import { expect, test } from 'vitest'; -import { format } from '../lib/index.js'; +import { format } from '../lib/index.ts'; test('bigint', () => { expect(format('0', Number.MAX_SAFE_INTEGER)).toBe(String(Number.MAX_SAFE_INTEGER)); diff --git a/test/color.spec.ts b/test/color.spec.ts index 50320e6..feb1cda 100644 --- a/test/color.spec.ts +++ b/test/color.spec.ts @@ -1,5 +1,5 @@ import { expect, test } from 'vitest'; -import { formatColor } from '../lib/index.js'; +import { formatColor } from '../lib/index.ts'; test('formatColor', () => { // color works the same across number sections, but not text diff --git a/test/comma.spec.ts b/test/comma.spec.ts index 4cc6fa9..1e61704 100644 --- a/test/comma.spec.ts +++ b/test/comma.spec.ts @@ -1,5 +1,5 @@ import { expect, test } from 'vitest'; -import { format } from '../lib/index.js'; +import { format } from '../lib/index.ts'; test('Correct handling of the comma operator', () => { expect(format('0,', 1234567.89)).toBe('1235'); diff --git a/test/conditionals.spec.ts b/test/conditionals.spec.ts index cec19fc..030ea0e 100644 --- a/test/conditionals.spec.ts +++ b/test/conditionals.spec.ts @@ -1,5 +1,5 @@ import { expect, test } from 'vitest'; -import { format } from '../lib/index.js'; +import { format } from '../lib/index.ts'; test('conditional parts', () => { expect(format('[>=100]"A"0;[<=-100]"B"0;"C"0', 6.3)).toBe('C6'); diff --git a/test/date-parsing.spec.ts b/test/date-parsing.spec.ts index f555450..2f925b2 100644 --- a/test/date-parsing.spec.ts +++ b/test/date-parsing.spec.ts @@ -1,5 +1,5 @@ import { expect, test } from 'vitest'; -import { format } from '../lib/index.js'; +import { format } from '../lib/index.ts'; const date = 3290.1278435; // 1909-01-02 03:04:05.678 diff --git a/test/datebounds.spec.ts b/test/datebounds.spec.ts index 41e6d05..f665216 100644 --- a/test/datebounds.spec.ts +++ b/test/datebounds.spec.ts @@ -1,5 +1,5 @@ import { expect, test } from 'vitest'; -import { format } from '../lib/index.js'; +import { format } from '../lib/index.ts'; const ISODATE = 'yyyy-mm-dd'; const ISODATETIME = 'yyyy-mm-dd\\Thh:mm:ss'; diff --git a/test/error.spec.ts b/test/error.spec.ts index ee13306..718c37a 100644 --- a/test/error.spec.ts +++ b/test/error.spec.ts @@ -1,5 +1,5 @@ import { expect, test } from 'vitest'; -import { format, isDateFormat, isPercentFormat, isTextFormat } from '../lib/index.js'; +import { format, isDateFormat, isPercentFormat, isTextFormat } from '../lib/index.ts'; const excelOpts = { dateSpanLarge: false, dateErrorNumber: false }; diff --git a/test/expformat.spec.ts b/test/expformat.spec.ts index cfc7216..5cd2ce8 100644 --- a/test/expformat.spec.ts +++ b/test/expformat.spec.ts @@ -1,5 +1,5 @@ import { expect, test } from 'vitest'; -import { format } from '../lib/index.js'; +import { format } from '../lib/index.ts'; test('Exponent detection', () => { expect(format('0E+00', 95000000)).toBe('1E+08'); diff --git a/test/fragmented-numbers.spec.ts b/test/fragmented-numbers.spec.ts index 8d69df4..9ee2c15 100644 --- a/test/fragmented-numbers.spec.ts +++ b/test/fragmented-numbers.spec.ts @@ -1,5 +1,5 @@ import { expect, test } from 'vitest'; -import { format } from '../lib/index.js'; +import { format } from '../lib/index.ts'; test('Fragmented number parts', () => { // exps with fragments diff --git a/test/info.spec.ts b/test/info.spec.ts index dd821a8..33906f2 100644 --- a/test/info.spec.ts +++ b/test/info.spec.ts @@ -1,5 +1,5 @@ import { expect, test } from 'vitest'; -import { getFormatDateInfo, getFormatInfo } from '../lib/index.js'; +import { getFormatDateInfo, getFormatInfo } from '../lib/index.ts'; const commonProps = { isDate: false, diff --git a/test/leap1900.spec.ts b/test/leap1900.spec.ts index e6ab023..f224d86 100644 --- a/test/leap1900.spec.ts +++ b/test/leap1900.spec.ts @@ -1,5 +1,5 @@ import { expect, test } from 'vitest'; -import { format } from '../lib/index.js'; +import { format } from '../lib/index.ts'; const ISODATE = 'yyyy-mm-dd'; diff --git a/test/locale.spec.ts b/test/locale.spec.ts index 9efa3c9..022265f 100644 --- a/test/locale.spec.ts +++ b/test/locale.spec.ts @@ -1,5 +1,5 @@ import { expect, test } from 'vitest'; -import { addLocale, format } from '../lib/index.js'; +import { addLocale, format } from '../lib/index.ts'; const date = 3290.1278435; // 1909-01-02 03:04:05.678 diff --git a/test/numdec.spec.ts b/test/numdec.spec.ts index ccb8b54..d7a1e17 100644 --- a/test/numdec.spec.ts +++ b/test/numdec.spec.ts @@ -1,7 +1,7 @@ /* eslint-disable no-loss-of-precision */ // tests converted from SSF import { expect, test } from 'vitest'; -import numdec from '../lib/numdec.js'; +import numdec from '../lib/numdec.ts'; function _f (v: number) { return numdec(v).total; diff --git a/test/numfmt.spec.ts b/test/numfmt.spec.ts index b7bcce2..a1c9a27 100644 --- a/test/numfmt.spec.ts +++ b/test/numfmt.spec.ts @@ -2,7 +2,7 @@ /* eslint-disable no-loss-of-precision */ import { expect, test } from 'vitest'; import { getTimeZoneName, getTimeZoneOffset } from './utils.ts'; -import { format as numfmt, isDateFormat, isPercentFormat, isTextFormat } from '../lib/index.js'; +import { format as numfmt, isDateFormat, isPercentFormat, isTextFormat } from '../lib/index.ts'; test('near zero negatives:', () => { expect(numfmt('-0', -1)).toBe('--1'); diff --git a/test/options.spec.ts b/test/options.spec.ts index fa66eef..d6972e9 100644 --- a/test/options.spec.ts +++ b/test/options.spec.ts @@ -1,7 +1,7 @@ /* global process */ import { expect, test } from 'vitest'; import { getTimeZoneName } from './utils.ts'; -import { format } from '../lib/index.js'; +import { format } from '../lib/index.ts'; const excelOpts = { dateSpanLarge: false, dateErrorNumber: false }; diff --git a/test/parseValue.spec.ts b/test/parseValue.spec.ts index 09b8ea7..931029d 100644 --- a/test/parseValue.spec.ts +++ b/test/parseValue.spec.ts @@ -1,7 +1,7 @@ import { expect, test } from 'vitest'; import { getTimeZoneName, isLeapYear } from './utils.ts'; -import { addLocale, dateToSerial, format, parseBool, parseDate, parseNumber, parseTime, parseValue } from '../lib/index.js'; -import { getLocale, listLocales } from '../lib/locale.js'; +import { addLocale, dateToSerial, format, parseBool, parseDate, parseNumber, parseTime, parseValue } from '../lib/index.ts'; +import { getLocale, listLocales } from '../lib/locale.ts'; const currentYear = dateToSerial([ new Date().getUTCFullYear(), 1, 1 ]) || 0; const leapDay = isLeapYear(new Date().getUTCFullYear()) ? 1 : 0; diff --git a/test/robust-mode.spec.ts b/test/robust-mode.spec.ts index 6a8d55c..63b9e59 100644 --- a/test/robust-mode.spec.ts +++ b/test/robust-mode.spec.ts @@ -1,5 +1,5 @@ import { expect, test } from 'vitest'; -import { format, formatColor, isDateFormat } from '../lib/index.js'; +import { format, formatColor, isDateFormat } from '../lib/index.ts'; const excelOpts = { dateSpanLarge: false, dateErrorNumber: false }; diff --git a/test/serialDate.spec.ts b/test/serialDate.spec.ts index a618cf8..2e5d69b 100644 --- a/test/serialDate.spec.ts +++ b/test/serialDate.spec.ts @@ -2,7 +2,7 @@ import { expect, test } from 'vitest'; import { getTimeZoneName } from './utils.ts'; -import { dateToSerial, dateFromSerial } from '../lib/index.js'; +import { dateToSerial, dateFromSerial } from '../lib/index.ts'; function round (n: number): number { return Math.round(n * 1e10) / 1e10; diff --git a/test/ssf-comma.spec.ts b/test/ssf-comma.spec.ts index 608eafd..f0f2c1b 100644 --- a/test/ssf-comma.spec.ts +++ b/test/ssf-comma.spec.ts @@ -1,6 +1,6 @@ // tests converted from SSF import { expect, test } from 'vitest'; -import { format } from '../lib/index.js'; +import { format } from '../lib/index.ts'; test('Exponential: #.0000,,,', () => { expect(format('#.0000,,,', 0.99)).toBe('.0000'); diff --git a/test/ssf-exp.spec.ts b/test/ssf-exp.spec.ts index 37fc6de..8446297 100644 --- a/test/ssf-exp.spec.ts +++ b/test/ssf-exp.spec.ts @@ -1,6 +1,6 @@ // tests converted from SSF import { expect, test } from 'vitest'; -import { format } from '../lib/index.js'; +import { format } from '../lib/index.ts'; test('Exponential: #0.0E+0', () => { expect(format('#0.0E+0', 1.23457E-13)).toBe('12.3E-14'); diff --git a/test/ssf-fraction.spec.ts b/test/ssf-fraction.spec.ts index 3bace79..efafe60 100644 --- a/test/ssf-fraction.spec.ts +++ b/test/ssf-fraction.spec.ts @@ -1,5 +1,5 @@ import { expect, test } from 'vitest'; -import { format } from '../lib/index.js'; +import { format } from '../lib/index.ts'; test('SSF-fractions tests', () => { expect(format('# ?/?', 1, '# ?/?')).toBe('1 '); diff --git a/test/ssf-general.spec.ts b/test/ssf-general.spec.ts index 9d75bae..c11bece 100644 --- a/test/ssf-general.spec.ts +++ b/test/ssf-general.spec.ts @@ -1,6 +1,6 @@ // tests converted from SSF import { expect, test } from 'vitest'; -import { format } from '../lib/index.js'; +import { format } from '../lib/index.ts'; test('General format', () => { expect(format('General', 1.234567e-14)).toBe('1.23457E-14'); diff --git a/test/ssf-oddities.spec.ts b/test/ssf-oddities.spec.ts index f7cd298..20a6ac2 100644 --- a/test/ssf-oddities.spec.ts +++ b/test/ssf-oddities.spec.ts @@ -1,7 +1,7 @@ // Tests originally converted from SSF but have been reviewed // and corrected and conformed to Excel for Mac version 16.35 import { expect, test } from 'vitest'; -import { format } from '../lib/index.js'; +import { format } from '../lib/index.ts'; test('Oddity: "foo";"bar";"baz";"qux"', () => { expect(format('"foo";"bar";"baz";"qux"', 1)).toBe('foo'); diff --git a/test/ssf-valid.spec.ts b/test/ssf-valid.spec.ts index 85afd8b..ac12b7e 100644 --- a/test/ssf-valid.spec.ts +++ b/test/ssf-valid.spec.ts @@ -1,5 +1,5 @@ import { expect, test } from 'vitest'; -import { format } from '../lib/index.js'; +import { format } from '../lib/index.ts'; test('Validity tests', () => { expect(() => format('" Excellent"', 1)).not.toThrow(); diff --git a/test/text.spec.ts b/test/text.spec.ts index 68a69a5..2f7c020 100644 --- a/test/text.spec.ts +++ b/test/text.spec.ts @@ -1,5 +1,5 @@ import { expect, test } from 'vitest'; -import { format } from '../lib/index.js'; +import { format } from '../lib/index.ts'; test('Errors', () => { // no more than a single text section diff --git a/test/utils.ts b/test/utils.ts index 92bb583..2f790f8 100644 --- a/test/utils.ts +++ b/test/utils.ts @@ -2,7 +2,7 @@ import fs from 'node:fs'; import zlib from 'node:zlib'; import { fileURLToPath } from 'node:url'; import { expect, test } from 'vitest'; -import { format } from '../lib/index.js'; +import { format } from '../lib/index.ts'; const VALUE_ERROR = '#VALUE!'; From 516b9acc3144d91292f1bb1161e955bc33af6649 Mon Sep 17 00:00:00 2001 From: Borgar Date: Thu, 27 Aug 2026 15:46:04 +0000 Subject: [PATCH 05/14] Move library to typescript --- lib/clamp.ts | 10 +- lib/codeToLocale.ts | 2 +- lib/constants.ts | 93 ++++++++----- lib/createPartition.ts | 41 ++++++ lib/dec2frac.ts | 20 +-- lib/formatInfo.ts | 109 +++++---------- lib/formatNumber.ts | 44 ++++-- lib/general.ts | 87 ++++++------ lib/index.ts | 275 +++++++++++++++++++----------------- lib/locale.ts | 179 +++++++++++++----------- lib/numberProps.ts | 4 +- lib/numdec.ts | 16 ++- lib/options.ts | 137 +++++++++++++++--- lib/pad.ts | 10 +- lib/parseFormatSection.ts | 285 ++++++++++++++++++-------------------- lib/parsePattern.ts | 63 +++++---- lib/parseValue.ts | 147 ++++++++++++-------- lib/round.ts | 8 +- lib/runPart.ts | 159 +++++++++++++-------- lib/serialDate.ts | 33 +++-- lib/toYMD.ts | 8 +- lib/tokenize.ts | 28 ++-- lib/types.ts | 189 +++++++++++++++++++++++++ test/numfmt.spec.ts | 37 +++++ test/options.spec.ts | 7 +- test/robust-mode.spec.ts | 2 +- test/serialDate.spec.ts | 10 +- test/ssf-fraction.spec.ts | 212 ++++++++++++++-------------- test/ssf-oddities.spec.ts | 6 +- test/ssf-times.spec.ts | 2 +- test/text.spec.ts | 2 +- tsconfig.json | 1 + 32 files changed, 1363 insertions(+), 863 deletions(-) create mode 100644 lib/createPartition.ts create mode 100644 lib/types.ts diff --git a/lib/clamp.ts b/lib/clamp.ts index 6eb99db..61255d2 100644 --- a/lib/clamp.ts +++ b/lib/clamp.ts @@ -1,8 +1,8 @@ -export function clamp (number) { - if (number === 0) { - return number; +export function clamp (num: number): number { + if (num === 0) { + return num; } - const d = Math.ceil(Math.log10(number < 0 ? -number : number)); + const d = Math.ceil(Math.log10(num < 0 ? -num : num)); const mag = 10 ** (16 - Math.floor(d)); - return isFinite(mag) ? Math.round(number * mag) / mag : 0; + return isFinite(mag) ? Math.round(num * mag) / mag : 0; } diff --git a/lib/codeToLocale.ts b/lib/codeToLocale.ts index e1cc190..0742f21 100644 --- a/lib/codeToLocale.ts +++ b/lib/codeToLocale.ts @@ -1,6 +1,6 @@ /* eslint-disable @stylistic/indent */ // https://docs.microsoft.com/en-us/office/vba/api/office.msolanguageid -export default Object.freeze({ +export const codeToLocale: Readonly> = Object.freeze({ 1078: 'af', // Afrikaans 1052: 'sq', // Albanian 1118: 'am', // Amharic diff --git a/lib/constants.ts b/lib/constants.ts index 7136074..23ceb01 100644 --- a/lib/constants.ts +++ b/lib/constants.ts @@ -21,40 +21,65 @@ export const EPOCH_1904 = -1; export const EPOCH_1900 = 1; export const EPOCH_1317 = 6; -export const TOKEN_GENERAL = 'general'; -export const TOKEN_HASH = 'hash'; -export const TOKEN_ZERO = 'zero'; -export const TOKEN_QMARK = 'qmark'; -export const TOKEN_SLASH = 'slash'; -export const TOKEN_GROUP = 'group'; -export const TOKEN_SCALE = 'scale'; -export const TOKEN_COMMA = 'comma'; -export const TOKEN_BREAK = 'break'; -export const TOKEN_TEXT = 'text'; -export const TOKEN_PLUS = 'plus'; -export const TOKEN_MINUS = 'minus'; -export const TOKEN_POINT = 'point'; -export const TOKEN_SPACE = 'space'; -export const TOKEN_PERCENT = 'percent'; -export const TOKEN_DIGIT = 'digit'; -export const TOKEN_CALENDAR = 'calendar'; -export const TOKEN_ERROR = 'error'; -export const TOKEN_DATETIME = 'datetime'; -export const TOKEN_DURATION = 'duration'; -export const TOKEN_CONDITION = 'condition'; -export const TOKEN_DBNUM = 'dbnum'; -export const TOKEN_NATNUM = 'natnum'; -export const TOKEN_LOCALE = 'locale'; -export const TOKEN_COLOR = 'color'; -export const TOKEN_MODIFIER = 'modifier'; -export const TOKEN_AMPM = 'ampm'; -export const TOKEN_ESCAPED = 'escaped'; -export const TOKEN_STRING = 'string'; -export const TOKEN_SKIP = 'skip'; -export const TOKEN_EXP = 'exp'; -export const TOKEN_FILL = 'fill'; -export const TOKEN_PAREN = 'paren'; -export const TOKEN_CHAR = 'char'; +export const TOKEN_GENERAL = 'GENERAL'; +export const TOKEN_HASH = 'HASH'; +export const TOKEN_ZERO = 'ZERO'; +export const TOKEN_QMARK = 'QMARK'; +export const TOKEN_SLASH = 'SLASH'; +export const TOKEN_GROUP = 'GROUP'; +export const TOKEN_SCALE = 'SCALE'; +export const TOKEN_COMMA = 'COMMA'; +export const TOKEN_BREAK = 'BREAK'; +export const TOKEN_TEXT = 'TEXT'; +export const TOKEN_PLUS = 'PLUS'; +export const TOKEN_MINUS = 'MINUS'; +export const TOKEN_POINT = 'POINT'; +export const TOKEN_SPACE = 'SPACE'; +export const TOKEN_PERCENT = 'PERCENT'; +export const TOKEN_DIGIT = 'DIGIT'; +export const TOKEN_CALENDAR = 'CALENDAR'; +export const TOKEN_ERROR = 'ERROR'; +export const TOKEN_DATETIME = 'DATETIME'; +export const TOKEN_DURATION = 'DURATION'; +export const TOKEN_CONDITION = 'CONDITION'; +export const TOKEN_DBNUM = 'DBNUM'; +export const TOKEN_NATNUM = 'NATNUM'; +export const TOKEN_LOCALE = 'LOCALE'; +export const TOKEN_COLOR = 'COLOR'; +export const TOKEN_MODIFIER = 'MODIFIER'; +export const TOKEN_AMPM = 'AMPM'; +export const TOKEN_ESCAPED = 'ESCAPED'; +export const TOKEN_STRING = 'STRING'; +export const TOKEN_SKIP = 'SKIP'; +export const TOKEN_EXP = 'EXP'; +export const TOKEN_FILL = 'FILL'; +export const TOKEN_PAREN = 'PAREN'; +export const TOKEN_CHAR = 'CHAR'; + +export const T_TYPE_INT = 'INT'; +export const T_TYPE_NUM = 'NUM'; +export const T_TYPE_MAN = 'MAN'; +export const T_TYPE_DEN = 'DEN'; +export const T_TYPE_FRAC = 'FRAC'; +export const T_TYPE_DIV = 'DIV'; +export const T_TYPE_YEAR = 'YEAR'; +export const T_TYPE_YEAR_S = 'YEAR-SHORT'; +export const T_TYPE_MON = 'MONTH'; +export const T_TYPE_MNAME_1 = 'MONTHNAME-SINGLE'; +export const T_TYPE_MNAME_S = 'MONTHNAME-SHORT'; +export const T_TYPE_MNAME = 'MONTHNAME'; +export const T_TYPE_WEEKDAY_S = 'WEEKDAY-SHORT'; +export const T_TYPE_WEEKDAY = 'WEEKDAY'; +export const T_TYPE_DAY = 'DAY'; +export const T_TYPE_HOUR = 'HOUR'; +export const T_TYPE_MIN = 'MIN'; +export const T_TYPE_SEC = 'SEC'; +export const T_TYPE_SUBSEC = 'SUBSEC'; +export const T_TYPE_HOUR_E = 'HOUR-ELAP'; +export const T_TYPE_MIN_E = 'MIN-ELAP'; +export const T_TYPE_SEC_E = 'SEC-ELAP'; +export const T_TYPE_B_YEAR = 'B-YEAR'; +export const T_TYPE_B_YEAR_S = 'B-YEAR-SHORT'; export const indexColors = [ '#000000', diff --git a/lib/createPartition.ts b/lib/createPartition.ts new file mode 100644 index 0000000..35ca39d --- /dev/null +++ b/lib/createPartition.ts @@ -0,0 +1,41 @@ +import { EPOCH_1900 } from './constants.ts'; +import type { Partition, RenderToken } from './types.ts'; + +export function createPartition (tokens?: RenderToken[]): Partition { + return { + scale: 1, + percent: false, + text: false, + parens: false, + fractions: false, + grouping: false, + exponential: false, + integer: false, + locale: '', + pattern: '', + int_max: 0, + frac_max: 0, + man_p: '', + num_p: '', + num_min: 0, + den_min: 0, + den_max: 0, + date: 0, + tokensUsed: 0, + date_eval: false, + date_system: EPOCH_1900, + sec_decimals: 0, + general: false, + clock: 24, + int_min: 0, // ?? + int_pattern: [], + frac_pattern: [], + man_pattern: [], + den_pattern: [], + num_pattern: [], + tokens: tokens ?? [], + den_p: '', + int_p: '', + denominator: 0 + }; +} diff --git a/lib/dec2frac.ts b/lib/dec2frac.ts index f6917c4..07ca96f 100644 --- a/lib/dec2frac.ts +++ b/lib/dec2frac.ts @@ -5,13 +5,17 @@ const PRECISION = 1e-13; * Split a fractional number into a numerator and denominator for display as * vulgar fractions. * - * @ignore - * @param {number} number The value to split - * @param {number} [numeratorMaxDigits=2] The maxdigits number - * @param {number} [denominatorMaxDigits=2] The maxdigits de - * @returns {Array} Array of two numbers, numerator and denominator. + * @internal + * @param number The value to split + * @param [numeratorMaxDigits=2] The maxdigits number + * @param [denominatorMaxDigits=2] The maxdigits de + * @returns Tuple of two numbers, numerator and denominator. */ -export function dec2frac (number, numeratorMaxDigits = 2, denominatorMaxDigits = 2) { +export function dec2frac ( + number: number, + numeratorMaxDigits: number = 2, + denominatorMaxDigits: number = 2 +): [ number, number ] { const sign = (number < 0) ? -1 : 1; const maxdigits_n = 10 ** (numeratorMaxDigits || 2); const maxdigits_d = 10 ** (denominatorMaxDigits || 2); @@ -20,8 +24,8 @@ export function dec2frac (number, numeratorMaxDigits = 2, denominatorMaxDigits = let last_n = 0; let curr_n = 0; let curr_d = 1; - let tmp; - let r; + let tmp: number; + let r: [ number, number ]; number = z; if (number % 1 === 0) { // handles exact integers including 0 diff --git a/lib/formatInfo.ts b/lib/formatInfo.ts index a127915..7e1424b 100644 --- a/lib/formatInfo.ts +++ b/lib/formatInfo.ts @@ -1,6 +1,7 @@ -import { u_YEAR, u_MONTH, u_DAY, u_HOUR, u_MIN, u_SEC, reCurrencySymbols } from './constants.ts'; +import { u_YEAR, u_MONTH, u_DAY, u_HOUR, u_MIN, u_SEC, reCurrencySymbols, TOKEN_STRING, T_TYPE_YEAR, T_TYPE_YEAR_S, T_TYPE_B_YEAR, T_TYPE_B_YEAR_S, T_TYPE_MON, T_TYPE_MNAME, T_TYPE_MNAME_S, T_TYPE_MNAME_1, T_TYPE_WEEKDAY, T_TYPE_WEEKDAY_S, T_TYPE_DAY, T_TYPE_HOUR, T_TYPE_MIN, T_TYPE_SEC, TOKEN_AMPM } from './constants.ts'; +import type { FormatDateInfo, FormatInfo, Partition } from './types.ts'; -export function isPercent (partitions) { +export function isPercent (partitions: Partition[]): boolean { return !!( (partitions[0]?.percent) || (partitions[1]?.percent) || @@ -9,7 +10,7 @@ export function isPercent (partitions) { ); } -export function isDate (partitions) { +export function isDate (partitions: Partition[]): boolean { return !!( (partitions[0]?.date) || (partitions[1]?.date) || @@ -18,7 +19,7 @@ export function isDate (partitions) { ); } -export function isText (partitions) { +export function isText (partitions: Partition[]): boolean { const [ part1, part2, part3, part4 ] = partitions; return !!( (!part1 || part1.generated) && @@ -55,50 +56,10 @@ const dateCodes = [ [ 'hm', 9 ] ]; -/** - * @typedef {object} FormatInfo - * An object of information properties based on a format pattern. - * @property {( - * "currency" | "date" | "datetime" | - * "error" | "fraction" | "general" | - * "grouped" | "number" | "percent" | - * "scientific" | "text" | "time" - * )} type - * A string identifier for the type of the number formatter. - * @property {boolean} isDate - * Corresponds to the output from isDateFormat. - * @property {boolean} isText - * Corresponds to the output from isTextFormat. - * @property {boolean} isPercent - * Corresponds to the output from isPercentFormat. - * @property {number} maxDecimals - * The maximum number of decimals this format will emit. - * @property {0|1} color - * 1 if the format uses color on the negative portion of the string, else - * a 0. This replicates Excel's `CELL("color")` functionality. - * @property {0|1} parentheses - * 1 if the positive portion of the number format contains an open - * parenthesis, else a 0. This is replicates Excel's `CELL("parentheses")` - * functionality. - * @property {0|1} grouped - * 1 if the positive portion of the format uses a thousands separator, - * else a 0. - * @property {string} code - * Corresponds to Excel's `CELL("format")` functionality. It should match - * Excel's esoteric behaviour fairly well. - * [See Microsoft's documentation.](https://support.microsoft.com/en-us/office/cell-function-51bd39a5-f338-4dbe-a33f-955d67c2b2cf) - * @property {number} scale - * The multiplier used when formatting the number (100 for percentages). - * @property {number} level - * An arbirarty number that represents the format's specificity if you want - * to compare one to another. Integer comparisons roughly match Excel's - * resolutions when it determines which format wins out. - */ - -export function info (partitions, currencyId = null) { +export function info (partitions: Partition[], currencyId?: string): FormatInfo { const [ partPos, partNeg ] = partitions; const frac_max = partPos.frac_max; - const output = { + const output: FormatInfo = { type: 'general', isDate: isDate(partitions), isText: isText(partitions), @@ -107,13 +68,15 @@ export function info (partitions, currencyId = null) { scale: partPos.scale ?? 1, color: 0, parentheses: 0, - grouped: partPos.grouping ? 1 : 0 + grouped: partPos.grouping ? 1 : 0, + code: '', + level: 0 }; // currency identifier may be passed in, but otherwise we report // if we find any known glyph in the tokens const isCurrency = (!output.isDate && !output.isText && !partPos.error) && partPos.tokens.some(tok => ( - tok.type === 'string' && + tok.type === TOKEN_STRING && (currencyId ? tok.value === currencyId : reCurrencySymbols.test(tok.value)) @@ -150,24 +113,37 @@ export function info (partitions, currencyId = null) { // So: "mmm dd yyyy" matches "mdy" = D4 // But: "mmm dd dd yyyy" matches "md" = D5 partPos.tokens.forEach(tok => { + // XXX: can we not detemine this by token.date && token.size? const type = tok.type; // 'year' || 'year-short' || 'b-year' || 'b-year-short' - if (/^(b-)?year/.test(type)) { + if (type === T_TYPE_YEAR || type === T_TYPE_YEAR_S || type === T_TYPE_B_YEAR || type === T_TYPE_B_YEAR_S) { order += 'Y'; haveDate++; } // 'month' || 'monthname-single' || 'monthname-short' || 'monthname' - else if (type.startsWith('month')) { + else if (type === T_TYPE_MON || type === T_TYPE_MNAME || type === T_TYPE_MNAME_S || type === T_TYPE_MNAME_1) { order += 'M'; haveDate++; } // 'weekday-short' || 'weekday' || 'day' - else if (/^(week)?day/.test(type)) { + else if (type === T_TYPE_WEEKDAY || type === T_TYPE_WEEKDAY_S || type === T_TYPE_DAY) { order += 'D'; haveDate++; } - else if (type === 'hour' || type === 'min' || type === 'sec' || type === 'ampm') { - order += type[0]; + else if (type === T_TYPE_HOUR) { + order += 'h'; + haveTime++; + } + else if (type === T_TYPE_MIN) { + order += 'm'; + haveTime++; + } + else if (type === T_TYPE_SEC) { + order += 's'; + haveTime++; + } + else if (type === TOKEN_AMPM) { + order += 'a'; haveTime++; } }); @@ -178,7 +154,7 @@ export function info (partitions, currencyId = null) { else if (!haveDate && haveTime) { output.type = 'time'; } - const code = dateCodes.find(d => order.startsWith(/** @type {string} */(d[0]))); + const code = dateCodes.find(d => order.startsWith(d[0] as string)); codeType = code ? 'D' : 'G'; codeNum = code ? code[1] : ''; } @@ -222,31 +198,12 @@ export function info (partitions, currencyId = null) { // the "first" one wins out. output.level = level[output.type]; - return Object.freeze(output); + return output; } -/** - * @typedef {object} FormatDateInfo - * An object detailing which date specifiers are used in a format pattern. - * @property {boolean} year - * true if the pattern uses years else false. - * @property {boolean} month - * true if the pattern uses months else false. - * @property {boolean} day - * true if the pattern uses day of the month else false. - * @property {boolean} hours - * true if the pattern uses hours else false. - * @property {boolean} minutes - * true if the pattern uses minutes else false. - * @property {boolean} seconds - * true if the pattern uses seconds else false. - * @property {12|24} clockType - * 12 if the pattern uses AM/PM clock else 24. - */ - -export function dateInfo (partitions) { +export function dateInfo (partitions: Partition[]): FormatDateInfo { const [ partPos ] = partitions; - const r = { + const r: FormatDateInfo = { year: !!(partPos.date & u_YEAR), month: !!(partPos.date & u_MONTH), day: !!(partPos.date & u_DAY), diff --git a/lib/formatNumber.ts b/lib/formatNumber.ts index d4eda28..bea233d 100644 --- a/lib/formatNumber.ts +++ b/lib/formatNumber.ts @@ -1,26 +1,29 @@ import { TOKEN_TEXT, indexColors } from './constants.ts'; import { defaultLocale, getLocale } from './locale.ts'; +import type { FormatOptions } from './options.ts'; import { parseFormatSection } from './parseFormatSection.ts'; import { runPart } from './runPart.ts'; +import type { Partition, PatternParseData } from './types.ts'; const default_text = parseFormatSection([ { type: TOKEN_TEXT, value: '@', raw: '@' } ]); -function getPart (value, parts) { +function getPart (value: string | number | bigint, parts: Partition[]): Partition | undefined { for (let pi = 0; pi < 3; pi++) { const part = parts[pi]; if (part) { - let cond; + let cond = false; if (part.condition) { const operator = part.condition[0]; const operand = part.condition[1]; if (operator === '=') { cond = (value === operand); } + else if (operator === '<>') { cond = (value !== operand); } + else if (typeof value === 'string') { cond = false; } else if (operator === '>') { cond = (value > operand); } else if (operator === '<') { cond = (value < operand); } else if (operator === '>=') { cond = (value >= operand); } else if (operator === '<=') { cond = (value <= operand); } - else if (operator === '<>') { cond = (value !== operand); } } else { cond = true; @@ -33,11 +36,15 @@ function getPart (value, parts) { return undefined; } -export function formatColor (value, parseData, opts) { +export function formatColor ( + value: unknown, + parseData: PatternParseData, + opts: Pick +): string | number | null { const parts = parseData.partitions; - let part = parts[3]; + let part: Partition | undefined = parts[3]; let color = null; - if ((typeof value === 'number' || typeof value === 'bigint') && isFinite(value)) { + if ((typeof value === 'number' || typeof value === 'bigint') && Number.isFinite(value)) { part = getPart(value, parts); } if (part?.color) { @@ -49,29 +56,38 @@ export function formatColor (value, parseData, opts) { return color; } -export function formatValue (value, parseData, opts) { +export function formatValue ( + value: unknown, + parseData: PatternParseData, + opts: FormatOptions +): string { const parts = parseData.partitions; const l10n = getLocale(parseData.locale || opts.locale); - // not a number? const text_part = parts[3] ? parts[3] : default_text; + // booleans get converted to string if (typeof value === 'boolean') { const loc = l10n || defaultLocale; value = loc.bool[value ? 0 : 1]; } + // null | undefined => '' if (value == null) { return ''; } + // anything other than (number | bigint) we'll format as text const n = typeof value === 'bigint'; if (typeof value !== 'number' && !n) { - return runPart(value, text_part, opts, l10n); + return runPart(String(value), text_part, opts, l10n); } // guard against non-finite numbers: - if (!n && !isFinite(value)) { + if (!n && !Number.isFinite(value)) { const loc = l10n || defaultLocale; - if (isNaN(value)) { return loc.nan; } - return (value < 0 ? loc.negative : '') + loc.infinity; + if (Number.isNaN(value)) { + return loc.nan; + } + return ((value as number) < 0 ? loc.negative : '') + loc.infinity; } // find and run the pattern part that applies to this number - const part = getPart(value, parts); - return part ? runPart(value, part, opts, l10n) : opts.overflow; + const v = value as number | string | bigint; + const part = getPart(v, parts); + return part ? runPart(v, part, opts, l10n) : opts.overflow; } diff --git a/lib/general.ts b/lib/general.ts index 0c93409..dff4fea 100644 --- a/lib/general.ts +++ b/lib/general.ts @@ -1,14 +1,15 @@ +import type { LocaleData } from './locale.ts'; import { getExponent, getSignificand } from './numberProps.ts'; import numdec from './numdec.ts'; import { round } from './round.ts'; -const fixLocale = (s, l10n) => { +const fixLocale = (s: string, l10n: LocaleData): string => { return s.replace(/\./, l10n.decimal); }; -const getExp = (n, exp, l10n) => { +const getExp = (n: number, exp: number, l10n: LocaleData): [ string, string, string, string, number ] => { const x = Math.abs(exp); - let m; + let m: number; if (n === 1) { m = n; } @@ -24,59 +25,61 @@ const getExp = (n, exp, l10n) => { ]; }; -export function general (ret, part, value, l10n) { - const int = value | 0; - +export function general (ret: (string | number)[], value: number | string, l10n: LocaleData) { if (typeof value === 'string') { // special case for: [<-25]General;[>25]General;General;General ret.push(value); } - else if (value === int) { - ret.push(Math.abs(int)); - } else { - const v = Math.abs(value); - let exp = getExponent(v); - let n = getSignificand(v, exp); - if (n === 10) { - n = 1; - exp++; + const int = value | 0; + if (value === int) { + ret.push(Math.abs(int)); } + else { + const v = Math.abs(value); + let exp = getExponent(v); + let n = getSignificand(v, exp); + if (n === 10) { + n = 1; + exp++; + } - // The application shall attempt to display the full number - // up to 11 digits (inc. decimal point). - const num_dig = numdec(v); - if (exp >= -4 && exp <= -1) { - const o = v.toPrecision(10 + exp).replace(/\.?0+$/, ''); - ret.push(fixLocale(o, l10n)); - } - else if (exp === 10) { - const o = v.toFixed(10) - .slice(0, 12) - .replace(/\.$/, ''); - ret.push(fixLocale(o, l10n)); - } - else if (Math.abs(exp) <= 9) { - if (num_dig.total <= 11) { - const o = round(v, 9).toFixed(num_dig.frac); + // The application shall attempt to display the full number + // up to 11 digits (inc. decimal point). + const num_dig = numdec(v); + if (exp >= -4 && exp <= -1) { + const o = v.toPrecision(10 + exp).replace(/\.?0+$/, ''); + ret.push(fixLocale(o, l10n)); + } + else if (exp === 10) { + const o = v.toFixed(10) + .slice(0, 12) + .replace(/\.$/, ''); ret.push(fixLocale(o, l10n)); } - else if (exp === 9) { - ret.push(Math.floor(v)); + else if (Math.abs(exp) <= 9) { + if (num_dig.total <= 11) { + const o = round(v, 9).toFixed(num_dig.frac); + ret.push(fixLocale(o, l10n)); + } + else if (exp === 9) { + ret.push(Math.floor(v)); + } + else if (exp >= 0 && exp < 9) { + ret.push(fixLocale(String(round(v, 9 - exp)), l10n)); + } + else { + ret.push(...getExp(n, exp, l10n)); + } } - else if (exp >= 0 && exp < 9) { - ret.push(fixLocale(String(round(v, 9 - exp)), l10n)); + else if (num_dig.total >= 12) { + ret.push(...getExp(n, exp, l10n)); } else { - ret.push(...getExp(n, exp, l10n)); + ret.push(fixLocale(round(v, 9).toFixed(num_dig.frac), l10n)); } } - else if (num_dig.total >= 12) { - ret.push(...getExp(n, exp, l10n)); - } - else { - ret.push(fixLocale(round(v, 9).toFixed(num_dig.frac), l10n)); - } } + return ret; } diff --git a/lib/index.ts b/lib/index.ts index a570ac1..e9b4574 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -13,7 +13,7 @@ export { addLocale } from './locale.ts'; -import { defaultOptions } from './options.ts'; +import { defaultOptions, type FormatOptions } from './options.ts'; export { round } from './round.ts'; export { dec2frac } from './dec2frac.ts'; @@ -32,11 +32,12 @@ export { import { formatColor as fmtColor, formatValue as fmtValue } from './formatNumber.ts'; import { info, dateInfo, isDate, isPercent, isText } from './formatInfo.ts'; import { parsePattern } from './parsePattern.ts'; +import type { FormatDateInfo, FormatInfo, TokenType } from './types.ts'; export { tokenize } from './tokenize.ts'; const _parseDataCache = Object.create({}); -function prepareFormatterData (pattern, shouldThrow = false) { +function prepareFormatterData (pattern: string, shouldThrow = false) { if (!pattern) { pattern = 'General'; } let parseData = _parseDataCache[pattern]; @@ -51,14 +52,15 @@ function prepareFormatterData (pattern, shouldThrow = false) { throw err; } // else we set the parsedata to error + const message = err && typeof err === 'object' && 'message' in err ? err.message : 'Unknown error'; const errPart = { - tokens: [ { type: 'error' } ], - error: err.message + tokens: [ { type: TOKEN_ERROR } ], + error: message }; parseData = { pattern: pattern, partitions: [ errPart, errPart, errPart, errPart ], - error: err.message, + error: message, locale: null }; } @@ -75,55 +77,74 @@ function prepareFormatterData (pattern, shouldThrow = false) { * - Any non number values will be stringified and passed through the text section of the format pattern. * - NaNs and infinites will use the corresponding strings from the active locale. * - * @param {string} pattern - A format pattern in the ECMA-376 number format. - * @param {*} value - The value to format. - * @param {object} [options={}] Options - * @param {string} [options.locale=""] + * @param pattern - A format pattern in the ECMA-376 number format. + * @param value - The value to format. + * @param [options={}] Options + * @param [options.locale=""] * A BCP 47 string tag. Locale default is english with a `\u00a0` * grouping symbol (see [addLocale](#addLocale)) - * @param {string} [options.overflow="######"] + * @param [options.overflow="######"] * The string emitted when a formatter fails to format a date that is out * of bounds. - * @param {string} [options.invalid="######"] + * @param [options.invalid="######"] * The string emitted when no-throw mode fails to parse a pattern. - * @param {boolean} [options.throws=true] + * @param [options.throws=true] * Should the formatter throw an error if a provided pattern is invalid. * If false, a formatter will be constructed which instead outputs an error * string (see _invalid_ in this table). - * @param {boolean} [options.nbsp=false] + * @param [options.nbsp=false] * By default the output will use a regular space, but in many cases you * may desire a non-breaking-space instead. - * @param {boolean} [options.leap1900=true] + * @param [options.leap1900=true] * Simulate the Lotus 1-2-3 [1900 leap year bug](https://docs.microsoft.com/en-us/office/troubleshoot/excel/wrongly-assumes-1900-is-leap-year). * It is a requirement in the Ecma OOXML specification so it is on by default. - * @param {boolean} [options.dateErrorThrows=false] + * @param [options.dateErrorThrows=false] * Should the formatter throw an error when trying to format a date that is * out of bounds? - * @param {boolean} [options.dateErrorNumber=true] + * @param [options.dateErrorNumber=true] * Should the formatter switch to a General number format when trying to * format a date that is out of bounds? - * @param {boolean} [options.bigintErrorNumber=false] + * @param [options.bigintErrorNumber=false] * Should the formatter switch to a plain string number format when trying to * format a bigint that is out of bounds? - * @param {boolean} [options.dateSpanLarge=true] + * @param [options.dateSpanLarge=true] * Extends the allowed range of dates from Excel bounds (1900–9999) to * Google Sheet bounds (0–99999). - * @param {boolean} [options.ignoreTimezone=false] + * @param [options.ignoreTimezone=false] * Normally when date objects are used with the formatter, time zone is taken * into account. This makes the formatter ignore the timezone offset. - * @param {boolean} [options.skipChar=''] + * @param [options.skipChar=''] * When the formatter encounters `_` it normally emits a single space instead * of the `_` and the next character (like Excel TEXT function does). Setting * this to a character will make the formatter emit that followed by the next * one. - * @param {boolean} [options.fillChar=''] + * @param [options.fillChar=''] * When the formatter encounters `*` it normally emits nothing instead of the * `*` and the next character (like Excel TEXT function does). Setting this * to a character will make the formatter emit that followed by the next one. - * @returns {string} A formatted value + * @returns A formatted value */ -export function format (pattern, value, options = {}) { - const opts = Object.assign({}, defaultOptions, options); +export function format ( + pattern: string, + value: any, + options: Partial = {} + // { + // locale?: string; + // overflow?: string; + // invalid?: string; + // throws?: boolean; + // nbsp?: boolean; + // leap1900?: boolean; + // dateErrorThrows?: boolean; + // dateErrorNumber?: boolean; + // bigintErrorNumber?: boolean; + // dateSpanLarge?: boolean; + // ignoreTimezone?: boolean; + // skipChar?: boolean; + // fillChar?: boolean; + // } = {} +): string { + const opts: FormatOptions = Object.assign({}, defaultOptions, options); const data = prepareFormatterData(pattern, opts.throws); const val = handleDates(value, opts) ?? value; return fmtValue(val, data, opts); @@ -142,33 +163,41 @@ export function format (pattern, value, options = {}) { * console.log(color); // null * ``` * - * @param {string} pattern - A format pattern in the ECMA-376 number format. - * @param {*} value - The value to format. - * @param {object} [options={}] Options - * @param {boolean} [options.throws=true] + * @param pattern - A format pattern in the ECMA-376 number format. + * @param value - The value to format. + * @param [options={}] Options + * @param [options.throws=true] * Should the formatter throw an error if a provided pattern is invalid. * If false, a formatter will be constructed which instead outputs an error * string (see _invalid_ in this table). - * @param {boolean} [options.ignoreTimezone=false] + * @param [options.ignoreTimezone=false] * Normally when date objects are used with the formatter, time zone is taken * into account. This makes the formatter ignore the timezone offset. - * @param {boolean} [options.indexColors=true] + * @param [options.indexColors=true] * When indexed color modifiers are used (`[Color 1]`) the formatter will * convert the index into the corresponding hex color of the default palette. * When this option is set to false, the number will instead by emitted * allowing you to index against a custom palette. - * @returns {string|number|null} + * @returns * A string color value as described by the pattern or a number if the * indexColors option has been set to false. */ -export function formatColor (pattern, value, options) { +export function formatColor ( + pattern: string, + value: any, + options?: { + throws?: boolean; + ignoreTimezone?: boolean; + indexColors?: boolean; + } +): string | number | null { const opts = Object.assign({}, defaultOptions, options); const data = prepareFormatterData(pattern, opts.throws); const val = handleDates(value, opts) ?? value; return fmtColor(val, data, opts); } -// FIXME: what is a a section?... +// FIXME: docs what is a a section?... /** * Determine if a given format pattern is a date pattern. * @@ -176,10 +205,10 @@ export function formatColor (pattern, value, options) { * date symbol (such as `Y` or `H`). Each section is restricted to be * _either_ a number or date format. * - * @param {string} pattern - A format pattern in the ECMA-376 number format. - * @returns {boolean} True if the specified pattern is date pattern, False otherwise. + * @param pattern A format pattern in the ECMA-376 number format. + * @returns True if the specified pattern is date pattern, False otherwise. */ -export function isDateFormat (pattern) { +export function isDateFormat (pattern: string): boolean { const data = prepareFormatterData(pattern, false); return isDate(data.partitions); } @@ -190,10 +219,10 @@ export function isDateFormat (pattern) { * The pattern is considered a percentage pattern if any of its sections * contains an unescaped percentage symbol. * - * @param {string} pattern - A format pattern in the ECMA-376 number format. - * @returns {boolean} True if the specified pattern is date pattern, False otherwise. + * @param pattern A format pattern in the ECMA-376 number format. + * @returns True if the specified pattern is date pattern, False otherwise. */ -export function isPercentFormat (pattern) { +export function isPercentFormat (pattern: string): boolean { const data = prepareFormatterData(pattern, false); return isPercent(data.partitions); } @@ -206,10 +235,10 @@ export function isPercentFormat (pattern) { * * For example `@` or `@" USD"` are text patterns but `#;@` is not. * - * @param {string} pattern - A format pattern in the ECMA-376 number format. - * @returns {boolean} True if the specified pattern is date pattern, False otherwise. + * @param pattern A format pattern in the ECMA-376 number format. + * @returns True if the specified pattern is date pattern, False otherwise. */ -export function isTextFormat (pattern) { +export function isTextFormat (pattern: string): boolean { const data = prepareFormatterData(pattern, false); return isText(data.partitions); } @@ -217,10 +246,10 @@ export function isTextFormat (pattern) { /** * Determine if a given format pattern is valid. * - * @param {string} pattern - A format pattern in the ECMA-376 number format. - * @returns {boolean} True if the specified pattern is valid, False otherwise. + * @param pattern A format pattern in the ECMA-376 number format. + * @returns True if the specified pattern is valid, False otherwise. */ -export function isValidFormat (pattern) { +export function isValidFormat (pattern: string): boolean { try { prepareFormatterData(pattern, true); return true; @@ -234,15 +263,15 @@ export function isValidFormat (pattern) { * Returns an object detailing the properties and internals of a format parsed * format pattern. * - * @param {string} pattern - A format pattern in the ECMA-376 number format. - * @param {object} [options={}] Options - * @param {string} [options.currency] + * @param pattern A format pattern in the ECMA-376 number format. + * @param [options={}] Options + * @param [options.currency] * Limit the patterns identified as currency to those that use the give string. * If nothing is provided, patterns will be tagged as currency if one of the * following currency symbols is used: ¤$£¥֏؋৳฿៛₡₦₩₪₫€₭₮₱₲₴₸₹₺₼₽₾₿ - * @returns {FormatInfo} An object of format properties. + * @returns An object of format properties. */ -export function getFormatInfo (pattern, options = {}) { +export function getFormatInfo (pattern: string, options: { currency?: string; } = {}): FormatInfo { const data = prepareFormatterData(pattern, false); if (!data.info) { data.info = info(data.partitions, options?.currency); @@ -253,10 +282,10 @@ export function getFormatInfo (pattern, options = {}) { /** * Gets information about date codes use in a format string. * - * @param {string} pattern - A format pattern in the ECMA-376 number format. - * @returns {FormatDateInfo} An object of format date properties. + * @param pattern A format pattern in the ECMA-376 number format. + * @returns An object of format date properties. */ -export function getFormatDateInfo (pattern) { +export function getFormatDateInfo (pattern: string): FormatDateInfo { const data = prepareFormatterData(pattern, false); if (!data.dateInfo) { data.dateInfo = dateInfo(data.partitions); @@ -267,77 +296,75 @@ export function getFormatDateInfo (pattern) { /** * A dictionary of the types used to identify token variants. * - * @readonly - * @constant {Object} tokenTypes - * @property {string} AMPM - AM/PM operator (`AM/PM`, `A/P`) - * @property {string} BREAK - Semicolon operator indicating a break between format sections (`;`) - * @property {string} CALENDAR - Calendar modifier (`B2`) - * @property {string} CHAR - Single non-operator character (`m`) - * @property {string} COLOR - Color modifier (`[Black]`, `[color 5]`) - * @property {string} COMMA - Plain non-operator comma (`,`) - * @property {string} CONDITION - Condition modifier for a section (`[>=10]`) - * @property {string} DATETIME - Date-time operator (`mmmm`, `YY`) - * @property {string} DBNUM - Number display modifier (`[DBNum23]`) - * @property {string} DIGIT - A digit between 1 and 9 (`3`) - * @property {string} DURATION - Time duration (`[ss]`) - * @property {string} ERROR - Unidentifiable or illegal character (`Ň`) - * @property {string} ESCAPED - Escaped character (`\E`) - * @property {string} EXP - Exponent operator (`E+`) - * @property {string} FILL - Fill with char operator and operand (`*_`) - * @property {string} GENERAL - General format operator (`General`) - * @property {string} GROUP - Number grouping operator (`,`) - * @property {string} HASH - Hash operator (digit if available) (`#`) - * @property {string} LOCALE - Locale modifier (`[$-1E020404]`) - * @property {string} MINUS - Minus sign (`-`) - * @property {string} MODIFIER - An unidentified modifier (`[Schwarz]`) - * @property {string} NATNUM - Number display modifier (`[NatNum3]`) - * @property {string} PAREN - Parenthesis character (`)`) - * @property {string} PERCENT - Percent operator (`%`) - * @property {string} PLUS - Plus sign (`+`) - * @property {string} POINT - Decimal point operator (`.`) - * @property {string} QMARK - Question mark operator (digit or space if not available) (`?`) - * @property {string} SCALE - Scaling operator (`,`) - * @property {string} SKIP - Skip with char operator and operand (`*_`) - * @property {string} SLASH - Slash operator (`/`) - * @property {string} SPACE - Space (` `) - * @property {string} STRING - Quoted string (`"days"`) - * @property {string} TEXT - Text output operator (`@`) - * @property {string} ZERO - Zero operator (digit or zero if not available) (`0`) + * @property AMPM - AM/PM operator (`AM/PM`, `A/P`) + * @property BREAK - Semicolon operator indicating a break between format sections (`;`) + * @property CALENDAR - Calendar modifier (`B2`) + * @property CHAR - Single non-operator character (`m`) + * @property COLOR - Color modifier (`[Black]`, `[color 5]`) + * @property COMMA - Plain non-operator comma (`,`) + * @property CONDITION - Condition modifier for a section (`[>=10]`) + * @property DATETIME - Date-time operator (`mmmm`, `YY`) + * @property DBNUM - Number display modifier (`[DBNum23]`) + * @property DIGIT - A digit between 1 and 9 (`3`) + * @property DURATION - Time duration (`[ss]`) + * @property ERROR - Unidentifiable or illegal character (`Ň`) + * @property ESCAPED - Escaped character (`\E`) + * @property EXP - Exponent operator (`E+`) + * @property FILL - Fill with char operator and operand (`*_`) + * @property GENERAL - General format operator (`General`) + * @property GROUP - Number grouping operator (`,`) + * @property HASH - Hash operator (digit if available) (`#`) + * @property LOCALE - Locale modifier (`[$-1E020404]`) + * @property MINUS - Minus sign (`-`) + * @property MODIFIER - An unidentified modifier (`[Schwarz]`) + * @property NATNUM - Number display modifier (`[NatNum3]`) + * @property PAREN - Parenthesis character (`)`) + * @property PERCENT - Percent operator (`%`) + * @property PLUS - Plus sign (`+`) + * @property POINT - Decimal point operator (`.`) + * @property QMARK - Question mark operator (digit or space if not available) (`?`) + * @property SCALE - Scaling operator (`,`) + * @property SKIP - Skip with char operator and operand (`*_`) + * @property SLASH - Slash operator (`/`) + * @property SPACE - Space (` `) + * @property STRING - Quoted string (`"days"`) + * @property TEXT - Text output operator (`@`) + * @property ZERO - Zero operator (digit or zero if not available) (`0`) * @see tokenize */ -export const tokenTypes = Object.freeze({ - AMPM: TOKEN_AMPM, - BREAK: TOKEN_BREAK, - CALENDAR: TOKEN_CALENDAR, - CHAR: TOKEN_CHAR, - COLOR: TOKEN_COLOR, - COMMA: TOKEN_COMMA, - CONDITION: TOKEN_CONDITION, - DATETIME: TOKEN_DATETIME, - DBNUM: TOKEN_DBNUM, - DIGIT: TOKEN_DIGIT, - DURATION: TOKEN_DURATION, - ERROR: TOKEN_ERROR, - ESCAPED: TOKEN_ESCAPED, - EXP: TOKEN_EXP, - FILL: TOKEN_FILL, - GENERAL: TOKEN_GENERAL, - GROUP: TOKEN_GROUP, - HASH: TOKEN_HASH, - LOCALE: TOKEN_LOCALE, - MINUS: TOKEN_MINUS, - MODIFIER: TOKEN_MODIFIER, - NATNUM: TOKEN_NATNUM, - PAREN: TOKEN_PAREN, - PERCENT: TOKEN_PERCENT, - PLUS: TOKEN_PLUS, - POINT: TOKEN_POINT, - QMARK: TOKEN_QMARK, - SCALE: TOKEN_SCALE, - SKIP: TOKEN_SKIP, - SLASH: TOKEN_SLASH, - SPACE: TOKEN_SPACE, - STRING: TOKEN_STRING, - TEXT: TOKEN_TEXT, - ZERO: TOKEN_ZERO +export const tokenTypes: Readonly> = Object.freeze({ + [TOKEN_AMPM]: TOKEN_AMPM, + [TOKEN_BREAK]: TOKEN_BREAK, + [TOKEN_CALENDAR]: TOKEN_CALENDAR, + [TOKEN_CHAR]: TOKEN_CHAR, + [TOKEN_COLOR]: TOKEN_COLOR, + [TOKEN_COMMA]: TOKEN_COMMA, + [TOKEN_CONDITION]: TOKEN_CONDITION, + [TOKEN_DATETIME]: TOKEN_DATETIME, + [TOKEN_DBNUM]: TOKEN_DBNUM, + [TOKEN_DIGIT]: TOKEN_DIGIT, + [TOKEN_DURATION]: TOKEN_DURATION, + [TOKEN_ERROR]: TOKEN_ERROR, + [TOKEN_ESCAPED]: TOKEN_ESCAPED, + [TOKEN_EXP]: TOKEN_EXP, + [TOKEN_FILL]: TOKEN_FILL, + [TOKEN_GENERAL]: TOKEN_GENERAL, + [TOKEN_GROUP]: TOKEN_GROUP, + [TOKEN_HASH]: TOKEN_HASH, + [TOKEN_LOCALE]: TOKEN_LOCALE, + [TOKEN_MINUS]: TOKEN_MINUS, + [TOKEN_MODIFIER]: TOKEN_MODIFIER, + [TOKEN_NATNUM]: TOKEN_NATNUM, + [TOKEN_PAREN]: TOKEN_PAREN, + [TOKEN_PERCENT]: TOKEN_PERCENT, + [TOKEN_PLUS]: TOKEN_PLUS, + [TOKEN_POINT]: TOKEN_POINT, + [TOKEN_QMARK]: TOKEN_QMARK, + [TOKEN_SCALE]: TOKEN_SCALE, + [TOKEN_SKIP]: TOKEN_SKIP, + [TOKEN_SLASH]: TOKEN_SLASH, + [TOKEN_SPACE]: TOKEN_SPACE, + [TOKEN_STRING]: TOKEN_STRING, + [TOKEN_TEXT]: TOKEN_TEXT, + [TOKEN_ZERO]: TOKEN_ZERO }); diff --git a/lib/locale.ts b/lib/locale.ts index b69bf9f..588939c 100644 --- a/lib/locale.ts +++ b/lib/locale.ts @@ -1,17 +1,65 @@ -import codeToLocale from './codeToLocale.ts'; +import { codeToLocale } from './codeToLocale.ts'; // Locale: [language[_territory][.codeset][@modifier]] const re_locale = /^([a-z\d]+)(?:[_-]([a-z\d]+))?(?:\.([a-z\d]+))?(?:@([a-z\d]+))?$/i; -const locales = {}; +const locales: Record = {}; + +/** An object of properties used by a formatter when printing a number in a certain locale. */ +export type LocaleData = { + /** Symbol used as a grouping separator (`1,000,000` uses `,`) */ + group: string; + /** Symbol used to separate integers from fractions (usually `.`) */ + decimal: string; + /** Symbol used to indicate positive numbers (usually `+`) */ + positive: string; + /** Symbol used to indicate positive numbers (usually `-`) */ + negative: string; + /** Symbol used to indicate a percentage (usually `%`) */ + percent: string; + /** Symbol used to indicate an exponent (usually `E`) */ + exponent: string; + /** Symbol used to indicate NaN values (`NaN`) */ + nan: string; + /** Symbol used to indicate infinite values (`∞`) */ + infinity: string; + /** How AM and PM should be presented */ + ampm: string[]; + /** Long month names for the Islamic calendar (`Rajab`) */ + mmmm6: string[]; + /** Short month names for the Islamic calendar (`Raj.`) */ + mmm6: string[]; + /** Long month names for the Gregorian calendar (`November`) */ + mmmm: string[]; + /** Short month names for the Gregorian calendar (`Nov`) */ + mmm: string[]; + /** Long day names (`Wednesday`) */ + dddd: string[]; + /** Shortened day names (`Wed`) */ + ddd: string[]; + /** How TRUE and FALSE should be presented */ + bool: string[]; + /** Is the prefered date format month first (12/31/2025) or day first (31/12/2025) */ + preferMDY: boolean; +}; + +/** An object of properties for a locale tag. */ +export type LocaleToken = { + /** The basic tag such as `zh_CN` or `fi` */ + lang: string; + /** The language section (`zh` for `zh_CN`) */ + language: string; + /** The territory section (`CN` for `zh_CN`) */ + territory: string; +}; /** * Split a semicolon delimited string and replace instances of characters - * @ignore - * @param {string} str Semicolon delimited string - * @param {string} [tilde=''] String to be inserted on every instance of ~ - * @returns {string[]} Array of strings + * @internal + * @param str Semicolon delimited string + * @param [tilde] String to be inserted on every instance of ~ + * @returns Array of strings */ -const _ = (str, tilde = '') => str.replace(/~/g, tilde).split(';'); +const _ = (str: string, tilde = ''): string[] => str.replace(/~/g, tilde).split(';'); /** * Generate mmm and ddd properties as needed for locales. Many of them @@ -24,13 +72,13 @@ const _ = (str, tilde = '') => str.replace(/~/g, tilde).split(';'); * - 1...9 - shorten to N many characters * - 11...19 - shorten to 1...9 characters and add periods * - * @ignore - * @param {object} o Locale object - * @param {number} [ml=0] Month list rule - * @param {number} [dl=0] Day list rule - * @returns {object} The same input object, but with ddd and mmm filled in. + * @internal + * @param o Locale object + * @param [ml] Month list rule + * @param [dl] Day list rule + * @returns The same input object, but with ddd and mmm filled in. */ -const xm = (o, ml = 0, dl = 0) => { +const xm = (o: Partial & Pick, ml: number = 0, dl: number = 0): Partial => { if (!o.mmm) { o.mmm = ml < 1 ? o.mmmm.concat() @@ -53,33 +101,8 @@ const xm = (o, ml = 0, dl = 0) => { return o; }; -/** - * @typedef {object} LocaleData - * An object of properties used by a formatter when printing a number in a certain locale. - * @property {string} group - Symbol used as a grouping separator (`1,000,000` uses `,`) - * @property {string} decimal - Symbol used to separate integers from fractions (usually `.`) - * @property {string} positive - Symbol used to indicate positive numbers (usually `+`) - * @property {string} negative - Symbol used to indicate positive numbers (usually `-`) - * @property {string} percent - Symbol used to indicate a percentage (usually `%`) - * @property {string} exponent - Symbol used to indicate an exponent (usually `E`) - * @property {string} nan - Symbol used to indicate NaN values (`NaN`) - * @property {string} infinity - Symbol used to indicate infinite values (`∞`) - * @property {Array} ampm - How AM and PM should be presented - * @property {Array} mmmm6 - Long month names for the Islamic calendar (`Rajab`) - * @property {Array} mmm6 - Short month names for the Islamic calendar (`Raj.`) - * @property {Array} mmmm - Long month names for the Gregorian calendar (`November`) - * @property {Array} mmm - Short month names for the Gregorian calendar (`Nov`) - * @property {Array} dddd - Long day names (`Wednesday`) - * @property {Array} ddd - Shortened day names (`Wed`) - * @property {Array} bool - How TRUE and FALSE should be presented - * @property {boolean} preferMDY - Is the prefered date format month first (12/31/2025) or day first (31/12/2025) - */ - -/** - * @ignore - * @type {LocaleData} - */ -const baseLocaleData = { +/** @ignore */ +const baseLocaleData: LocaleData = { group: '\u00A0', decimal: '.', positive: '+', @@ -99,21 +122,14 @@ const baseLocaleData = { preferMDY: false }; -/** - * @typedef {object} LocaleToken - An object of properties for a locale tag. - * @property {string} lang - The basic tag such as `zh_CN` or `fi` - * @property {string} language - The language section (`zh` for `zh_CN`) - * @property {string} territory - The territory section (`CN` for `zh_CN`) - */ - /** * Parse a regular IETF BCP 47 locale tag and emit an object of its parts. * Irregular tags and subtags are not supported. * - * @param {string} locale - A BCP 47 string tag of the locale. - * @returns {LocaleToken} - An object describing the locale. + * @param locale A BCP 47 string tag of the locale. + * @returns An object describing the locale. */ -export function parseLocale (locale) { +export function parseLocale (locale: string): LocaleToken { const lm = re_locale.exec(locale); if (!lm) { throw new SyntaxError(`Malformed locale: ${locale}`); @@ -129,18 +145,18 @@ export function parseLocale (locale) { // aa = numerical style (optional, 00 if absent) // bb = calendar format (optional, 00 if absent) // cc = language code -export function resolveLocale (l4e) { +export function resolveLocale (l4e: number | string): string | undefined { if (typeof l4e === 'number') { - return codeToLocale[l4e & 0xffff] || null; + return codeToLocale[l4e & 0xffff] || undefined; } const wincode = parseInt(l4e, 16); if (isFinite(wincode) && codeToLocale[wincode & 0xffff]) { - return codeToLocale[wincode & 0xffff] || null; + return codeToLocale[wincode & 0xffff] || undefined; } if (re_locale.test(l4e)) { return l4e; } - return null; + return undefined; } /** @@ -149,21 +165,21 @@ export function resolveLocale (l4e) { * So if `en-CA` is not found, the formatter tries to find `en` else it * returns a `null`. * - * @param {string} locale - A BCP 47 string tag of the locale, or an Excel locale code. - * @returns {LocaleData | null} - An object of format date properties. + * @param locale A BCP 47 string tag of the locale, or an Excel locale code. + * @returns An object of format date properties. */ -export function getLocale (locale) { +export function getLocale (locale: string | number): LocaleData | undefined { const tag = resolveLocale(locale); - let obj = null; + let obj; if (tag) { const c = parseLocale(tag); - obj = locales[c.lang] || locales[c.language] || null; + obj = locales[c.lang] || locales[c.language] || undefined; } return obj; } // creates a new locale options object -export function createLocale (data) { +export function createLocale (data: Partial): LocaleData { return Object.assign({}, baseLocaleData, data); } @@ -173,45 +189,45 @@ export function createLocale (data) { * Any partial set of properties may be returned to have the defaults used where properties are missing. * * @see {LocaleData} - * @param {object} localeSettings - A collection of settings for a locale. - * @param {string} [localeSettings.group="\u00a0"] + * @param localeSettings - A collection of settings for a locale. + * @param [localeSettings.group="\u00a0"] * Symbol used as a grouping separator (`1,000,000` uses `,`) - * @param {string} [localeSettings.decimal="."] + * @param [localeSettings.decimal="."] * Symbol used to separate integers from fractions (usually `.`) - * @param {string} [localeSettings.positive="+"] + * @param [localeSettings.positive="+"] * Symbol used to indicate positive numbers (usually `+`) - * @param {string} [localeSettings.negative="-"] + * @param [localeSettings.negative="-"] * Symbol used to indicate positive numbers (usually `-`) - * @param {string} [localeSettings.percent="%"] + * @param [localeSettings.percent="%"] * Symbol used to indicate a percentage (usually `%`) - * @param {string} [localeSettings.exponent="E"] + * @param [localeSettings.exponent="E"] * Symbol used to indicate an exponent (usually `E`) - * @param {string} [localeSettings.nan="NaN"] + * @param [localeSettings.nan="NaN"] * Symbol used to indicate NaN values (`NaN`) - * @param {string} [localeSettings.infinity="∞"] + * @param [localeSettings.infinity="∞"] * Symbol used to indicate infinite values (`∞`) - * @param {Array} [localeSettings.ampm=["AM","PM"]] + * @param [localeSettings.ampm=["AM","PM"]] * How AM and PM should be presented. - * @param {Array} [localeSettings.mmmm6=["Muharram", "Safar", "Rabiʻ I", "Rabiʻ II", "Jumada I", "Jumada II", "Rajab", "Shaʻban", "Ramadan", "Shawwal", "Dhuʻl-Qiʻdah", "Dhuʻl-Hijjah"]] + * @param [localeSettings.mmmm6=["Muharram", "Safar", "Rabiʻ I", "Rabiʻ II", "Jumada I", "Jumada II", "Rajab", "Shaʻban", "Ramadan", "Shawwal", "Dhuʻl-Qiʻdah", "Dhuʻl-Hijjah"]] * Long month names for the Islamic calendar (e.g. `Rajab`) - * @param {Array} [localeSettings.mmm6=["Muh.", "Saf.", "Rab. I", "Rab. II", "Jum. I", "Jum. II", "Raj.", "Sha.", "Ram.", "Shaw.", "Dhuʻl-Q.", "Dhuʻl-H."]] + * @param [localeSettings.mmm6=["Muh.", "Saf.", "Rab. I", "Rab. II", "Jum. I", "Jum. II", "Raj.", "Sha.", "Ram.", "Shaw.", "Dhuʻl-Q.", "Dhuʻl-H."]] * Short month names for the Islamic calendar (e.g. `Raj.`) - * @param {Array} [localeSettings.mmmm=["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]] + * @param [localeSettings.mmmm=["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]] * Long month names for the Gregorian calendar (e.g. `November`) - * @param {Array} [localeSettings.mmm=["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]] + * @param [localeSettings.mmm=["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]] * Short month names for the Gregorian calendar (e.g. `Nov`) - * @param {Array} [localeSettings.dddd=["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]] + * @param [localeSettings.dddd=["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]] * Long day names (e.g. `Wednesday`) - * @param {Array} [localeSettings.ddd=["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]] + * @param [localeSettings.ddd=["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]] * Shortened day names (e.g. `Wed`) - * @param {Array} [localeSettings.bool=["TRUE", "FALSE"]] + * @param [localeSettings.bool=["TRUE", "FALSE"]] * How TRUE and FALSE should be presented. * @param {boolean} [localeSettings.preferMDY=false] * Is the prefered date format month first (12/31/2025) or day first (31/12/2025) - * @param {string} l4e - A string BCP 47 tag of the locale. - * @returns {LocaleData} - A full collection of settings for a locale + * @param l4e - A string BCP 47 tag of the locale. + * @returns A full collection of settings for a locale */ -export function addLocale (localeSettings, l4e) { +export function addLocale (localeSettings: Partial, l4e: string): LocaleData { // parse language tag const c = typeof l4e === 'object' ? l4e : parseLocale(l4e); // add the language @@ -227,7 +243,7 @@ export function listLocales () { return Object.keys(locales); } -export const defaultLocale = createLocale({ group: ',', preferMDY: true }); +export const defaultLocale: LocaleData & { isDefault?: boolean } = createLocale({ group: ',', preferMDY: true }); defaultLocale.isDefault = true; addLocale({ @@ -744,4 +760,3 @@ addLocale({ ddd: _('रवि;सोम;मंगल;बुध;गुरु;शुक्र;शनि'), ampm: _('am;pm') }, 'hi'); - diff --git a/lib/numberProps.ts b/lib/numberProps.ts index 5640a18..13e58f0 100644 --- a/lib/numberProps.ts +++ b/lib/numberProps.ts @@ -1,11 +1,11 @@ -export function getExponent (num, int_max = 0) { +export function getExponent (num: number, int_max = 0): number { const exp = Math.floor(Math.log10(num)); return (int_max > 1) ? Math.floor(exp / int_max) * int_max : exp; } -export function getSignificand (n, exp = 1) { +export function getSignificand (n: number, exp = 1): number { if (exp < -300) { return parseFloat(n.toExponential().split('e')[0]); } diff --git a/lib/numdec.ts b/lib/numdec.ts index b740bc9..16766ff 100644 --- a/lib/numdec.ts +++ b/lib/numdec.ts @@ -1,15 +1,25 @@ import { round } from './round.ts'; -const zero = { +export type NumInfo = { + total: number, + sign: number, + digits: number, + period: number, + int: number, + frac: number +}; + +const zero: NumInfo = { total: 1, sign: 0, + digits: 1, period: 0, int: 1, frac: 0 }; -// returns the count of digits (including - and .) need to represent the number -export default function numdec (value, incl_sign = true) { +// returns the count of digits (including - and .) needed to represent the number +export default function numdec (value: number, incl_sign = true): NumInfo { const v = Math.abs(value); // shortcut zero diff --git a/lib/options.ts b/lib/options.ts index 0bae4f8..98df8fd 100644 --- a/lib/options.ts +++ b/lib/options.ts @@ -1,32 +1,131 @@ -export const defaultOptions = { - // Overflow error string - overflow: '######', // dateErrorThrow needs to be off! [prev in locale] - // Should it throw when there is an overflow error? +/** Options that control the behavior of the formatter. */ +export type FormatOptions = { + /** + * The string emitted when a formatter fails to format a date that is out of bounds. + * Both `dateErrorThrows` and `dateErrorNumber` override this setting. + * @default '######' + */ + overflow: string, + + /** + * Should the formatter throw an error when trying to format a date that is out of bounds? + * @default false + */ + dateErrorThrows: boolean, + + /** + * Should the formatter emit a number when trying to format a date that is out of bounds? + * This is default behaviour by Google Sheets. `dateErrorThrows` overrides this setting. + * @default true + */ + dateErrorNumber: boolean, + + /** + * Should the formatter switch to a plain string number format when trying to + * format a bigint that is out of bounds of regular JS numbers? + * @default false + */ + bigintErrorNumber: boolean, + + /** + * Extends the allowed range of dates from Excel bounds (1900–9999) to Google Sheet bounds (0–99999). + * @default true + */ + dateSpanLarge: boolean, + + /** + * Simulate the Lotus 1-2-3 [1900 leap year bug](https://docs.microsoft.com/en-us/office/troubleshoot/excel/wrongly-assumes-1900-is-leap-year). + * It is a requirement in the Ecma OOXML specification so it is on by default. + * @default true + */ + leap1900: boolean, + + /** + * Emit regular vs. non-breaking spaces. By default the output will use a regular + * space, but in many cases you may desire a non-breaking-space instead. + * @default false + */ + nbsp: boolean, + + /** + * Should the formatter throw an error if a provided pattern is invalid. + * If false, a formatter will be constructed which instead outputs an error + * string (see _invalid_ in this table). + * @default true + */ + throws: boolean, + + /** + * The string emitted when formatter fails to parse a pattern and has been instructed + * not to throw an error. + * @default '######' + */ + invalid: string, + + /** + * A BCP 47 string tag or Excel [MsoLanguageID](https://docs.microsoft.com/en-us/office/vba/api/office.msolanguageid). Locale default is english with a `\u00a0` + * grouping symbol (see [addLocale](#addLocale)) + * @default '' + */ + locale: string | number, + + /** + * Normally when date objects are used with the formatter, time zone is taken + * into account and the date is adjusted into UTC. This option makes the formatter + * ignore the timezone offset. + * @default false + */ + ignoreTimezone: boolean, + + /** + * Integer grouping sizes. You may desire to emit numbers in standards other than the common 3 digits + * per group (e.g. "123,456,789"). The first grouping size is used for the least significant integer + * group, and the second grouping size is used for more significant groups (e.g. `[3, 2]` => "12,34,56,789"). + * @default [ 3 ] + */ + grouping: [ number, number ] | [ number ], + + /** + * Automatically resolve indexed colors to hex when outputting colors (red => #f00); + * When indexed color modifiers are used (`[Color 1]`) the formatter will convert the index + * into the corresponding hex color of the default palette. When this option is set to false, + * the number will instead by emitted allowing you to index against a custom palette. + * @default true + */ + indexColors: boolean, + + /** + * When the formatter encounters `_` it normally emits a single space instead + * of the `_` and the next character (like Excel TEXT function does). Setting + * this to a character will make the formatter emit that followed by the next + * one. + * @default '' + */ + skipChar: string, + + /** + * When the formatter encounters `*` it normally emits nothing instead of the + * `*` and the next character (like Excel TEXT function does). Setting this + * to a character will make the formatter emit that followed by the next one. + * @default '' + */ + fillChar: string, +}; + +export const defaultOptions: FormatOptions = { + overflow: '######', dateErrorThrows: false, - // Should it emit a number when date has an overflow error? (Sheets does this) - dateErrorNumber: true, // dateErrorThrow needs to be off! - // Should it emit a number when bigint has an is an overflow error? + dateErrorNumber: true, bigintErrorNumber: false, - // Sheets mode (see #3) dateSpanLarge: true, - // Simulate the Lotus 1-2-3 leap year bug leap1900: true, - // Emit regular vs. non-breaking spaces nbsp: false, - // Robust/throw mode throws: true, - // What is emitted when robust mode fails to parse (###### currently) invalid: '######', - // Locale locale: '', - // Don't adjust dates to UTC when converting them to serial time ignoreTimezone: false, - // Integer digit grouping grouping: [ 3, 3 ], - // resolve indexed colors to hex indexColors: true, - // Skip-next signifier character skipChar: '', - // Repear-next signifier character - repeatChar: '' + fillChar: '' }; diff --git a/lib/pad.ts b/lib/pad.ts index 45b4640..3af0463 100644 --- a/lib/pad.ts +++ b/lib/pad.ts @@ -1,10 +1,10 @@ /** - * @ignore - * @param {string} c Instruction character (['#', '?', '0']) - * @param {boolean} [nbsp=false] Use nonbreaking space or not? - * @returns {string} Padding character + * @internal + * @param c Instruction character ('#' | '?' | '0') + * @param Use nonbreaking space or not? + * @returns Padding character */ -export function pad (c, nbsp = false) { +export function pad (c: string, nbsp = false): string { if (c === '0') { return '0'; } diff --git a/lib/parseFormatSection.ts b/lib/parseFormatSection.ts index b6aa055..155c1f2 100644 --- a/lib/parseFormatSection.ts +++ b/lib/parseFormatSection.ts @@ -6,58 +6,51 @@ import { TOKEN_DATETIME, TOKEN_DBNUM, TOKEN_DIGIT, TOKEN_DURATION, TOKEN_ERROR, TOKEN_ESCAPED, TOKEN_EXP, TOKEN_FILL, TOKEN_GENERAL, TOKEN_GROUP, TOKEN_HASH, TOKEN_LOCALE, TOKEN_MINUS, TOKEN_NATNUM, TOKEN_PAREN, TOKEN_PERCENT, TOKEN_PLUS, TOKEN_POINT, TOKEN_QMARK, TOKEN_SCALE, TOKEN_SKIP, - TOKEN_SLASH, TOKEN_SPACE, TOKEN_STRING, TOKEN_TEXT, TOKEN_ZERO + TOKEN_SLASH, TOKEN_SPACE, TOKEN_STRING, TOKEN_TEXT, TOKEN_ZERO, TOKEN_MODIFIER, + T_TYPE_INT, T_TYPE_NUM, T_TYPE_DEN, T_TYPE_DIV, T_TYPE_FRAC, T_TYPE_MAN, T_TYPE_SUBSEC, T_TYPE_YEAR_S, + T_TYPE_YEAR, T_TYPE_B_YEAR_S, T_TYPE_B_YEAR, T_TYPE_DAY, T_TYPE_WEEKDAY_S, T_TYPE_WEEKDAY, T_TYPE_HOUR, + T_TYPE_MNAME_S, T_TYPE_MNAME_1, T_TYPE_MNAME, T_TYPE_MIN, T_TYPE_MON, T_TYPE_HOUR_E, T_TYPE_MIN_E, + T_TYPE_SEC_E, T_TYPE_SEC } from './constants.ts'; +import type { DateRenderToken, FormatToken, RenderToken, SectionType } from './types.ts'; +import { createPartition } from './createPartition.ts'; -function minMaxPad (str, part, prefix) { - part[prefix + '_max'] = str.length; - part[prefix + '_min'] = str.replace(/#/g, '').length; - return part; -} - -function add (s, tokens) { +function add (s: string | RenderToken, tokens: RenderToken[]): void { // allow adding string tokens without wrapping if (typeof s === 'string') { - tokens.push({ type: 'string', value: s }); + tokens.push({ type: TOKEN_STRING, value: s }); } else { tokens.push(s); } } -function isNumOp (token, activePattern) { +const countNonHash = (s: string): number => { + let n = 0; + for (let i = 0; i < s.length; i++) { + if (s.charCodeAt(i) !== 35) { + n++; + } + } + return n; +}; + +function isNumOp (token: FormatToken | RenderToken, activePattern: SectionType) { const type = token?.type; return ( (type === TOKEN_HASH || type === TOKEN_ZERO || type === TOKEN_QMARK) || - (type === TOKEN_DIGIT && activePattern === 'den') + (type === TOKEN_DIGIT && activePattern === T_TYPE_DEN) ); } -export function parseFormatSection (inputTokens) { - const outputTokens = []; - - const part = { - scale: 1, - percent: false, - text: false, - date: 0, - date_eval: false, - date_system: EPOCH_1900, - sec_decimals: 0, - general: false, - clock: 24, - int_pattern: [], - frac_pattern: [], - man_pattern: [], - den_pattern: [], - num_pattern: [], - tokens: outputTokens - }; +export function parseFormatSection (inputTokens: FormatToken[]) { + const outputTokens: RenderToken[] = []; + const part = createPartition(outputTokens); - let currentPattern = 'int'; - let lastNumberChunk = null; - const dateChunks = []; - let last; + let currentPattern: SectionType = T_TYPE_INT; // 'num' is unused here? + let lastNumberChunk: RenderToken | undefined; + const dateChunks: DateRenderToken[] = []; + let last: FormatToken | undefined; let haveLocale = false; let index = -1; @@ -65,6 +58,14 @@ export function parseFormatSection (inputTokens) { let patternSource = ''; let haveSlash = false; + const getPattern = (p: SectionType) => { + if (p === T_TYPE_DEN) { return part.den_pattern; } + if (p === T_TYPE_INT) { return part.int_pattern; } + if (p === T_TYPE_FRAC) { return part.frac_pattern; } + if (p === T_TYPE_MAN) { return part.man_pattern; } + return []; + }; + while (++index < inputTokens.length && !partOver) { const token = inputTokens[index]; const type = token.type || TOKEN_ERROR; @@ -72,22 +73,24 @@ export function parseFormatSection (inputTokens) { if (type === TOKEN_GENERAL) { part.general = true; - add(token, outputTokens); + add({ type }, outputTokens); } // new partition else if (isNumOp(token, currentPattern)) { - const pt = part[currentPattern + '_pattern']; - if (isNumOp(last, currentPattern) || last?.type === TOKEN_GROUP) { + const pt = getPattern(currentPattern); + if (last && (isNumOp(last, currentPattern) || last.type === TOKEN_GROUP)) { // append to current pt.push((pt.pop() || '') + token.value); - lastNumberChunk.num += token.value; + if (lastNumberChunk && 'num' in lastNumberChunk) { + lastNumberChunk.num += token.value; + } } else { // new number section pt.push(token.value); lastNumberChunk = { type: currentPattern, num: token.value }; - add(lastNumberChunk, outputTokens); + add(lastNumberChunk!, outputTokens); } } @@ -105,17 +108,19 @@ export function parseFormatSection (inputTokens) { // vulgar fractions else if (type === TOKEN_SLASH) { haveSlash = true; - if (part[currentPattern + '_pattern'].length) { + const pt = getPattern(currentPattern); + if (pt.length) { if (!lastNumberChunk) { // need to have a numerator present throw new SyntaxError('Format pattern is missing a numerator'); } part.fractions = true; // ... we just passed the numerator - correct that item - part.num_pattern.push(part[currentPattern + '_pattern'].pop()); - lastNumberChunk.type = 'num'; + const xx = pt.pop()!; + part.num_pattern.push(xx); + lastNumberChunk.type = T_TYPE_NUM; // next up... the denominator - currentPattern = 'den'; - add({ type: 'div' }, outputTokens); + currentPattern = T_TYPE_DEN; + add({ type: T_TYPE_DIV }, outputTokens); } else { add(token.value, outputTokens); @@ -129,17 +134,17 @@ export function parseFormatSection (inputTokens) { part.scale = 0.001 ** token.raw.length; } else if (type === TOKEN_GROUP) { - if (currentPattern === 'int') { + if (currentPattern === T_TYPE_INT) { part.grouping = true; } - if (currentPattern === 'den') { + if (currentPattern === T_TYPE_DEN) { throw new SyntaxError('Cannot group denominator digits'); } // else we just ignore it! } else if (type === TOKEN_SPACE) { - add(token, outputTokens); + add({ type }, outputTokens); } else if (type === TOKEN_BREAK) { @@ -149,10 +154,10 @@ export function parseFormatSection (inputTokens) { else if (type === TOKEN_TEXT) { // @ part.text = true; - add(token, outputTokens); + add({ type, value: token.value }, outputTokens); } else if (type === TOKEN_PLUS || type === TOKEN_MINUS) { - add(token, outputTokens); + add({ type }, outputTokens); } // [h] [m] [s] @@ -160,18 +165,15 @@ export function parseFormatSection (inputTokens) { else if (type === TOKEN_DURATION) { const tokenValue = token.value.toLowerCase(); // deal with in tokenizer const startsWith = tokenValue[0]; - const bit = { type: '', size: 0, date: 1, pad: tokenValue.length }; + let bit: RenderToken; if (startsWith === 'h') { - bit.size = u_HOUR; - bit.type = 'hour-elap'; + bit = { type: T_TYPE_HOUR_E, size: u_HOUR, pad: tokenValue.length }; } else if (startsWith === 'm') { - bit.size = u_MIN; - bit.type = 'min-elap'; + bit = { type: T_TYPE_MIN_E, size: u_MIN, pad: tokenValue.length }; } else { - bit.size = u_SEC; - bit.type = 'sec-elap'; + bit = { type: T_TYPE_SEC_E, size: u_SEC, pad: tokenValue.length }; } // signal date calc and track smallest needed unit part.date = part.date | bit.size; @@ -201,12 +203,7 @@ export function parseFormatSection (inputTokens) { part.date = part.date | size; part.date_eval = true; part.sec_decimals = Math.max(part.sec_decimals, dec); - add({ - type: 'subsec', - size: size, - decimals: dec, - date: 1 - }, outputTokens); + add({ type: T_TYPE_SUBSEC, size: size, decimals: dec }, outputTokens); } else if (type === TOKEN_CALENDAR) { @@ -232,101 +229,80 @@ export function parseFormatSection (inputTokens) { // date token. Which, if it was s or h, minutes is used. The same is true // if we hit m or s, and last is m. // m and mm are spurious, mmm is always month - const bit = { type: '', size: 0, date: 1 }; + let bit: DateRenderToken | undefined; const value = token.value.toLowerCase(); // deal with in tokenizer? const startsWith = value[0]; if (value === 'y' || value === 'yy') { - bit.size = u_YEAR; - bit.type = 'year-short'; + bit = { type: T_TYPE_YEAR_S, size: u_YEAR }; } else if (startsWith === 'y' || startsWith === 'e') { - bit.size = u_YEAR; - bit.type = 'year'; + bit = { type: T_TYPE_YEAR, size: u_YEAR }; } else if (value === 'b' || value === 'bb') { - bit.size = u_YEAR; - bit.type = 'b-year-short'; + bit = { type: T_TYPE_B_YEAR_S, size: u_YEAR }; } else if (startsWith === 'b') { - bit.size = u_YEAR; - bit.type = 'b-year'; + bit = { type: T_TYPE_B_YEAR, size: u_YEAR }; } else if (value === 'd' || value === 'dd') { - bit.size = u_DAY; - bit.type = 'day'; - bit.pad = /dd/.test(value); + bit = { type: T_TYPE_DAY, size: u_DAY, pad: value === 'dd' }; } else if (value === 'ddd' || value === 'aaa') { - bit.size = u_DAY; - bit.type = 'weekday-short'; + bit = { type: T_TYPE_WEEKDAY_S, size: u_DAY }; } else if (startsWith === 'd' || startsWith === 'a') { - bit.size = u_DAY; - bit.type = 'weekday'; + bit = { type: T_TYPE_WEEKDAY, size: u_DAY }; } else if (startsWith === 'h') { - bit.size = u_HOUR; - bit.type = 'hour'; - bit.pad = /hh/i.test(value); + bit = { type: T_TYPE_HOUR, size: u_HOUR, pad: value.length > 1 }; } else if (startsWith === 'm') { if (value.length === 3) { - bit.size = u_MONTH; - bit.type = 'monthname-short'; + bit = { type: T_TYPE_MNAME_S, size: u_MONTH }; } else if (value.length === 5) { - bit.size = u_MONTH; - bit.type = 'monthname-single'; + bit = { type: T_TYPE_MNAME_1, size: u_MONTH }; } else if (value.length >= 4) { - bit.size = u_MONTH; - bit.type = 'monthname'; + bit = { type: T_TYPE_MNAME, size: u_MONTH }; } // m or mm can be either minute or month based on context const last_date_chunk = dateChunks[dateChunks.length - 1]; - if (!bit.type && last_date_chunk && - !last_date_chunk.used && - (last_date_chunk.size & (u_HOUR | u_SEC))) { + if (!bit && last_date_chunk && !last_date_chunk.used && (last_date_chunk.size & (u_HOUR | u_SEC))) { // if this value follows hour or second, it is a minute last_date_chunk.used = true; - bit.size = u_MIN; - bit.type = 'min'; - bit.pad = /mm/.test(value); + bit = { type: T_TYPE_MIN, size: u_MIN, pad: value.length > 1 }; } - // if we still don't know, we treat as a month - // and defer, a later 'sec' value may switch it - if (!bit.type) { - bit.size = u_MONTH; - bit.type = 'month'; - bit.pad = /mm/.test(value); - bit.indeterminate = true; + // if we still don't know, we treat as a month and defer, a later 'sec' value may switch it + if (!bit) { + bit = { type: T_TYPE_MON, size: u_MONTH, pad: value.length > 1, indeterminate: true }; } } else if (startsWith === 's') { - bit.size = u_SEC; - bit.type = 'sec'; - bit.pad = /ss/.test(value); + bit = { type: T_TYPE_SEC, size: u_SEC, pad: value.length > 1 }; // if last date chunk was m, flag this used const last_date_chunk = dateChunks[dateChunks.length - 1]; if (last_date_chunk && last_date_chunk.size & u_MIN) { bit.used = true; } // if last date chunk is undecided, we know that it is a minute - else if (last_date_chunk?.indeterminate) { + else if (last_date_chunk && 'indeterminate' in last_date_chunk) { delete last_date_chunk.indeterminate; last_date_chunk.size = u_MIN; - last_date_chunk.type = 'min'; + last_date_chunk.type = T_TYPE_MIN; bit.used = true; } } else if (startsWith === 'g') { // TODO: Don't know what this does? (yet!) } - // signal date calc and track smallest needed unit - part.date = part.date | bit.size; - part.date_eval = true; - dateChunks.push(bit); - add(bit, outputTokens); + if (bit) { + // signal date calc and track smallest needed unit + part.date = part.date | bit.size; + part.date_eval = true; + dateChunks.push(bit); + add(bit, outputTokens); + } } // AM/PM @@ -335,9 +311,7 @@ export function parseFormatSection (inputTokens) { part.clock = 12; part.date = part.date | u_HOUR; part.date_eval = true; - // deal with in tokenizer? - token.short = token.value === 'A/P'; - add(token, outputTokens); + add({ type, short: token.value === 'A/P' }, outputTokens); } // escaped character, string @@ -353,7 +327,7 @@ export function parseFormatSection (inputTokens) { ]; } - // locale code -- we allow std. "en-US" style codes + // locale code -- we extend to allow std. "en-US" style codes // https://stackoverflow.com/questions/54134729/what-does-the-130000-in-excel-locale-code-130000-mean/54540455#54540455 else if (type === TOKEN_LOCALE) { const bits = token.value.split('-'); @@ -370,7 +344,9 @@ export function parseFormatSection (inputTokens) { if (isFinite(wincode) && (wincode & 0xff0000)) { const cal = (wincode >> 16) & 0xff; // only Hijri is supported atm. - if (cal === 6) { part.date_system = EPOCH_1317; } + if (cal === 6) { + part.date_system = EPOCH_1317; + } } haveLocale = true; // ignore any B2 & B1 tokens @@ -378,7 +354,7 @@ export function parseFormatSection (inputTokens) { // color else if (type === TOKEN_COLOR) { - let cm; + let cm: RegExpExecArray | null; let v = token.value.toLowerCase(); if ((cm = /^color\s*(\d+)$/i.exec(v))) { v = parseInt(cm[1], 10); @@ -395,10 +371,10 @@ export function parseFormatSection (inputTokens) { // decimal fraction else if (type === TOKEN_POINT) { - add(token, outputTokens); + add({ type, value: token.value }, outputTokens); if (!part.date) { part.dec_fractions = true; - currentPattern = 'frac'; + currentPattern = T_TYPE_FRAC; } } @@ -407,28 +383,41 @@ export function parseFormatSection (inputTokens) { // Exponent pattern requires symbol to directly follow "E" but the // signature symbol, however, prefixes the first digit of the mantissa part.exponential = true; - part.exp_plus = token.value.includes('+'); - currentPattern = 'man'; - add({ type: 'exp', plus: part.exp_plus }, outputTokens); + const plus = token.value.includes('+'); + part.exp_plus = plus; + currentPattern = T_TYPE_MAN; + add({ type: TOKEN_EXP, plus }, outputTokens); } // skip width else if (type === TOKEN_SKIP) { - add(token, outputTokens); + add({ type, value: token.value }, outputTokens); } // fill space with next char else if (type === TOKEN_FILL) { - add(token, outputTokens); + add({ type, value: token.value }, outputTokens); } - else if (type === TOKEN_DBNUM || type === TOKEN_NATNUM) { + else if (type === TOKEN_DBNUM) { // UNSUPPORTED: // - DBNum1 = NatNum4 // - DBNum2 = NatNum5 // - DBNum3 = either NatNum6 or NatNum3? // - DBNum3 = NatNum10 + const n = parseInt(token.value.slice(5)); + if (n < 1 || n > 4) { + throw new SyntaxError('Unknown modifier: ' + token.value); + } + } + + else if (type === TOKEN_NATNUM) { // NatNum: https://www.openoffice.org/api/docs/common/ref/com/sun/star/i18n/NativeNumberMode.html + throw new SyntaxError('Unknown modifier: ' + token.value); + } + + else if (type === TOKEN_MODIFIER) { + throw new SyntaxError('Unknown modifier: ' + token.value); } else if (type === TOKEN_ERROR) { @@ -445,12 +434,6 @@ export function parseFormatSection (inputTokens) { part.tokensUsed = index; part.pattern = patternSource; - // Quickly determine if this pattern is condition only - // if so, then add String(value) but using the condition - if (/^((?:\[[^\]]+\])+)(;|$)/.test(part.pattern) && !/^\[(?:h+|m+|s+)\]/.test(part.pattern)) { - add({ type: 'text' }, outputTokens); - } - // Make sure we don't have an illegal pattern. We could support some of this // but we side with Excel and don't because they make no sense. if ( @@ -467,7 +450,9 @@ export function parseFormatSection (inputTokens) { const intPattern = part.int_pattern.join(''); const manPattern = part.man_pattern.join(''); const fracPattern = part.frac_pattern.join(''); - minMaxPad(intPattern, part, 'int'); + part.int_max = intPattern.length; + part.int_min = countNonHash(intPattern); + let min = 0; for (let i = 0; i < intPattern.length; i++) { const ch = intPattern[intPattern.length - 1 - i]; @@ -476,9 +461,7 @@ export function parseFormatSection (inputTokens) { } } part.int_min = min; - - minMaxPad(fracPattern, part, 'frac'); - minMaxPad(manPattern, part, 'man'); + part.frac_max = fracPattern.length; let num_pat = part.num_pattern.join(''); // let den_pat = part.den_pattern.join(''); @@ -488,13 +471,15 @@ export function parseFormatSection (inputTokens) { if (enforce_padded) { den_pat = den_pat.replace(/\d/g, '?'); den_pat = den_pat.replace(/#$/g, '?'); - minMaxPad(num_pat, part, 'num'); - minMaxPad(den_pat, part, 'den'); + part.num_min = countNonHash(num_pat); + part.den_max = den_pat.length; + part.den_min = countNonHash(den_pat); num_pat = num_pat.replace(/#$/g, '?'); } else { - minMaxPad(num_pat, part, 'num'); - minMaxPad(den_pat, part, 'den'); + part.num_min = countNonHash(num_pat); + part.den_max = den_pat.length; + part.den_min = countNonHash(den_pat); } part.int_p = intPattern; @@ -511,13 +496,20 @@ export function parseFormatSection (inputTokens) { if (!part.integer && !part.exponential && fracPattern.length) { // if no integer has been found, we inject one - const pointIdx = part.tokens.findIndex(d => d.type === 'point'); - part.tokens.splice(pointIdx, 0, { type: 'int', value: '#' }); + const pointIdx = part.tokens.findIndex(d => d.type === TOKEN_POINT); + part.tokens.splice(pointIdx, 0, { type: T_TYPE_INT, num: '#' }); part.integer = true; part.int_pattern = [ '#' ]; part.int_p = '#'; } + // empty token list means that this is likely a directive only pattern (`[black]`) + // in which case we need to inject a general token + if (!part.tokens.length && /^\[(?!\$)/.test(part.pattern)) { + part.general = true; + add({ type: TOKEN_GENERAL }, outputTokens); + } + // extra whitespace rules for vulgar fractions if (part.fractions) { // fragment bits affect surrounding whitespace @@ -525,22 +517,19 @@ export function parseFormatSection (inputTokens) { // the div symbol, is removed if the bit is not shown for (let i = 0; i < outputTokens.length - 1; i++) { const tok = outputTokens[i]; - if (tok.type !== 'string' && tok.type !== 'space') { + if (tok.type !== TOKEN_STRING && tok.type !== TOKEN_SPACE) { continue; } const nextType = outputTokens[i + 1].type; - if (nextType === 'num') { + if (nextType === T_TYPE_NUM) { tok.rule = 'num+int'; } - else if (nextType === 'div') { + else if (nextType === T_TYPE_DIV) { tok.rule = 'num'; } - else if (nextType === 'den') { + else if (nextType === T_TYPE_DEN) { tok.rule = 'den'; } - else { - // tok.rule = '???'; - } } } diff --git a/lib/parsePattern.ts b/lib/parsePattern.ts index 9ec6dc7..67d5b82 100644 --- a/lib/parsePattern.ts +++ b/lib/parsePattern.ts @@ -1,45 +1,46 @@ +import { TOKEN_BREAK, TOKEN_ERROR, TOKEN_MINUS } from './constants.ts'; +import { createPartition } from './createPartition.ts'; import { resolveLocale } from './locale.ts'; import { parseFormatSection } from './parseFormatSection.ts'; import { tokenize } from './tokenize.ts'; +import type { Partition, PatternParseData, RenderToken } from './types.ts'; -const maybeAddMinus = part => { - const [ op, val ] = part.condition ?? []; +const maybeAddMinus = (part: Partition): void => { + const [ op, val ] = part.condition ?? [ '', 0 ]; const exception = ( (val < 0 && (op === '<' || op === '<=' || op === '=')) || (val === 0 && (op === '<')) ); if (!exception) { part.tokens.unshift({ - type: 'minus', + type: TOKEN_MINUS, volatile: true }); } }; -const clonePart = (part, prefixToken = null) => { - const r = {}; +const clonePart = (part: Partition, prefixToken?: RenderToken): Partition => { + const r: Partial = {}; for (const key in part) { - if (Array.isArray(part[key])) { - r[key] = [ ...part[key] ]; - } - else { - r[key] = part[key]; - } + // @ts-ignore + const val = part[key]; + // @ts-ignore + r[key] = Array.isArray(val) ? [ ...val ] : val; } - if (prefixToken) { + if (prefixToken && r.tokens) { r.tokens.unshift(prefixToken); } r.generated = true; - return r; + return r as Partition; }; -export function parsePattern (pattern) { +export function parsePattern (pattern: string): PatternParseData { const partitions = []; let conditional = false; - let l10n_override; + let l10n_override: string | undefined; let text_partition = null; let more = 0; - let part = false; + let part: Partition; let i = 0; let conditions = 0; let tokens = tokenize(pattern); @@ -73,7 +74,7 @@ export function parsePattern (pattern) { } partitions.push(part); - more = tokens[part.tokensUsed]?.type === 'break' ? 1 : 0; + more = tokens[part.tokensUsed]?.type === TOKEN_BREAK ? 1 : 0; tokens = tokens.slice(part.tokensUsed + more); i++; } @@ -125,13 +126,12 @@ export function parsePattern (pattern) { // ...else it *seems* to follow logic based on first condition const cond = part1.condition; if ( - cond[0] === '=' || - (cond[1] >= 0 && (cond[0] === '>' || cond[0] === '>=')) + cond && ( + cond[0] === '=' || + (cond[1] >= 0 && (cond[0] === '>' || cond[0] === '>=')) + ) ) { - part2.tokens.unshift({ - type: 'minus', - volatile: true - }); + part2.tokens.unshift({ type: TOKEN_MINUS, volatile: true }); } } } @@ -159,7 +159,7 @@ export function parsePattern (pattern) { // missing negative if (partitions.length < 2) { // the volatile minus only happens if there is a single pattern - const volMinus = { type: 'minus', volatile: true }; + const volMinus: RenderToken = { type: TOKEN_MINUS, volatile: true }; partitions.push(clonePart(partitions[0], volMinus)); } // missing zero @@ -180,7 +180,7 @@ export function parsePattern (pattern) { partitions[0].condition = [ '>', 0 ]; partitions[1].condition = [ '<', 0 ]; - partitions[2].condition = null; + partitions[2].condition = undefined; } return { @@ -190,20 +190,19 @@ export function parsePattern (pattern) { }; } -export function parseCatch (pattern) { +export function parseCatch (pattern: string): PatternParseData { try { return parsePattern(pattern); } catch (err) { - const errPart = { - tokens: [ { type: 'error' } ], - error: err.message - }; + const message = err && typeof err === 'object' && 'message' in err ? String(err.message) : 'Unkown error'; + const errPart = createPartition([ { type: TOKEN_ERROR } ]); + errPart.error = true; return { pattern: pattern, partitions: [ errPart, errPart, errPart, errPart ], - error: err.message, - locale: null + error: message, + locale: undefined }; } } diff --git a/lib/parseValue.ts b/lib/parseValue.ts index ebbeb41..d9619ba 100644 --- a/lib/parseValue.ts +++ b/lib/parseValue.ts @@ -2,10 +2,32 @@ import { currencySymbols, reCurrencySymbols } from './constants.ts'; import { defaultLocale, getLocale } from './locale.ts'; /** - * @typedef {object} ParseData - * @property {number | boolean} v - the value - * @property {string} [z] - number format pattern + * Output from the value parser. */ +export type ParseDataNum = { + /** A number value */ + v: number; + /** A number format pattern */ + z?: string; +}; + +/** + * Output from the value parser. + */ +export type ParseDataBool = { + /** A boolean value */ + v: boolean; + /** A number format pattern */ + z?: string; +}; + +type LData = { + mon: [string, number, string][], + mp: boolean, + day: [string, number, string][], + dp: boolean, + locale?: string, +}; /* This is a list of the allowed date formats. The test file contains @@ -71,14 +93,15 @@ const okDateFormats = [ ]; // letter to excel -const tx0 = { j: 'd', d: 'd', D: 'ddd', l: 'dddd', n: 'm', m: 'm', M: 'mmm', F: 'mmmm', y: 'yy', Y: 'yyyy' }; -const tx00 = { j: 'dd', d: 'dd', D: 'ddd', l: 'dddd', n: 'mm', m: 'mm', M: 'mmm', F: 'mmmm', y: 'yy', Y: 'yyyy' }; +const tx0: Record = { j: 'd', d: 'd', D: 'ddd', l: 'dddd', n: 'm', m: 'm', M: 'mmm', F: 'mmmm', y: 'yy', Y: 'yyyy' }; +const tx00: Record = { j: 'dd', d: 'dd', D: 'ddd', l: 'dddd', n: 'mm', m: 'mm', M: 'mmm', F: 'mmmm', y: 'yy', Y: 'yyyy' }; // date formats are stored as a token-tree in a trie // for minimal looping and branching while parsing -const dateTrieDM = {}; -const dateTrieMD = {}; -function packDate (f, node, allowType = 1) { +type DateTrieNode = { $?: number } & { [token: string]: DateTrieNode }; +const dateTrieDM: DateTrieNode = {}; +const dateTrieMD: DateTrieNode = {}; +function packDate (f: string, node: DateTrieNode, allowType = 1) { if (f) { const char = f[0]; const next = f.slice(1); @@ -97,7 +120,7 @@ function packDate (f, node, allowType = 1) { node.$ = allowType; } } -function addFormatToTrie (fmt, trie) { +function addFormatToTrie (fmt: string, trie: DateTrieNode) { // add date to token tree packDate(fmt, trie); // add a variant of the date with time suffixed @@ -127,12 +150,12 @@ const NS = ' '; const NN = ' '; const AP = "'"; const AG = '٬'; -const dec2group = { +const dec2group: Record = { '.': [ CM, NS, NN, AP, AG ], ',': [ PT, NS, NN, AP, AG ], '٫': [ PT, NS, NN, AP, AG ] }; -const isDigit = d => d?.length === 1 && d >= '0' && d <= '9'; +const isDigit = (d: string) => d?.length === 1 && d >= '0' && d <= '9'; /** * Parse a numeric string input and return its value and format. If the input @@ -143,14 +166,14 @@ const isDigit = d => d?.length === 1 && d >= '0' && d <= '9'; * * `z`: the number format of the input (if applicable). * * @see parseValue - * @param {string} value The number to parse - * @param {object} [options={}] Options - * @param {string} [options.locale=""] + * @param value The number to parse + * @param [options={}] Options + * @param [options.locale=""] * A BCP 47 string tag. Locale default is english with a `\u00a0` * grouping symbol (see [addLocale](#addLocale)) - * @returns {ParseData | null} An object of the parsed value and a corresponding format string + * @returns An object of the parsed value and a corresponding format string */ -export function parseNumber (value, options = {}) { +export function parseNumber (value: string, options: { locale?: string; } = {}): ParseDataNum | null { const l10n = getLocale(options.locale || '') || defaultLocale; // we base everything on the decimal separator const dec = l10n.decimal; @@ -327,14 +350,15 @@ export function parseNumber (value, options = {}) { : '#,##0'; } // we may want to lower the fidelity of the number: +num.toFixed(13) - const ret = { v: numberValue * sign }; + const ret: ParseDataNum = { v: numberValue * sign }; if (format) { ret.z = format; } return ret; } -export function isValidDate (y, m, d) { +// XXX: move to own file +export function isValidDate (y: number, m: number, d: number) { // day can't be 0 if (d < 1) { return false; @@ -361,8 +385,12 @@ export function isValidDate (y, m, d) { return true; } -// should really match { ’' } and all whitespace -const matchRec = (str, data, skipPeriod = false) => { +// should really match { ’' } and all whitespace +const matchRec = ( + str: string, + data: [ string, number, string ][], + skipPeriod = false +): [ string, [ string, number, string ] | null ] => { for (const item of data) { if (str.startsWith(item[0])) { // if the match is followed by a "." we'll skip it if the abbr. is by @@ -377,11 +405,22 @@ const matchRec = (str, data, skipPeriod = false) => { return [ '', null ]; }; -const nextToken = (str, node, data, lData) => { +type DtData = { + path?: string, + sep?: string, + day?: string, + tf?: string, + _mon?: string, + month?: number, + year?: number, + time?: number, +}; + +const nextToken = (str: string, node: DateTrieNode, data: DtData, lData: LData): DtData | undefined => { const path = data.path || ''; const matchOrder = Object.keys(node); for (const t of matchOrder) { - let r; + let r: DtData | undefined; if (!node[t]) { continue; } @@ -466,15 +505,15 @@ const nextToken = (str, node, data, lData) => { } }; -const normDateStr = s => ( +const normDateStr = (s: string): string => ( s.replace(/\s+/g, ' ').trim() .replace(/’/, "'") .replace(/\.$/, '') .toLowerCase() ); -const getLookups = (arr, sym) => { - const s = arr.map((d, i) => [ normDateStr(d), i + 1, sym ]); +const getLookups = (arr: string[], sym: string) => { + const s: [ string, number, string ][] = arr.map((d, i) => [ normDateStr(d), i + 1, sym ]); s.sort((a, b) => b[0].length - a[0].length); return s; }; @@ -488,16 +527,16 @@ const getLookups = (arr, sym) => { * - `z`: the number format of the input (if applicable). * * @see parseValue - * @param {string} value The date to parse - * @param {object} [options={}] Options - * @param {string} [options.locale=""] + * @param value The date to parse + * @param [options={}] Options + * @param [options.locale=""] * A BCP 47 string tag. Locale default is english with a `\u00a0` * grouping symbol (see [addLocale](#addLocale)) - * @returns {ParseData | null} An object of the parsed value and a corresponding format string + * @returns An object of the parsed value and a corresponding format string */ -export function parseDate (value, options = {}) { +export function parseDate (value: string, options: { locale?: string; } = {}): ParseDataNum | null { const l10n = getLocale(options.locale || '') || defaultLocale; - const lData = { + const lData: LData = { mon: getLookups(l10n.mmmm, 'F').concat(getLookups(l10n.mmm, 'M')), mp: l10n.mmm[0].at(-1) === '.', day: getLookups(l10n.dddd, 'l').concat(getLookups(l10n.ddd, 'D')), @@ -513,32 +552,32 @@ export function parseDate (value, options = {}) { ); if (date) { // disallow matches where two tokens are separated by a period - if (date.sep === '.' && date.path.length === 3) { + if (date.sep === '.' && date.path?.length === 3) { return null; } const year = +(date.year ?? currentYear); if (!date.day) { - date.day = 1; + date.day = '1'; } let epoch = -Infinity; if (year < 1900) { return null; } - else if (year <= 1900 && date.month <= 2) { + else if (year <= 1900 && (date.month ?? 0) <= 2) { epoch = 25568; } else if (year < 10000) { epoch = 25569; } - const dateValue = (Date.UTC(year, date.month - 1, date.day) / 864e5) + epoch + (date.time || 0); + const dateValue = (Date.UTC(year, (date.month ?? 1) - 1, +date.day) / 864e5) + epoch + (date.time || 0); if (dateValue >= 0 && dateValue <= 2958465) { const lead0 = ( // either has a leading zero - (date._mon[0] === '0' || date.day[0] === '0') || + ((date._mon?.startsWith('0')) || date.day?.startsWith('0')) || // both are 2-digits long - (date._mon.length === 2 && date.day.length === 2) + (date._mon?.length === 2 && date.day.length === 2) ); - const format = date.path.replace(/[jdlDnmMFyYx]/g, a => { + const format = (date.path ?? '').replace(/[jdlDnmMFyYx]/g, (a: string) => { if (a === 'x') { return date.tf || ''; } @@ -550,7 +589,7 @@ export function parseDate (value, options = {}) { return null; } -const normAMPMStr = s => ( +const normAMPMStr = (s: string): string => ( s.replace(/\s+/g, '').trim() .replace(/\./g, '') .toLowerCase() @@ -565,14 +604,14 @@ const normAMPMStr = s => ( * - `z`: the number format of the input (if applicable). * * @see parseValue - * @param {string} value The date to parse - * @param {object} [options={}] Options - * @param {string} [options.locale=""] + * @param value The date to parse + * @param [options={}] Options + * @param [options.locale=""] * A BCP 47 string tag. Locale default is english with a `\u00a0` * grouping symbol (see [addLocale](#addLocale)) - * @returns {ParseData | null} An object of the parsed value and a corresponding format string + * @returns An object of the parsed value and a corresponding format string */ -export function parseTime (value, options = {}) { +export function parseTime (value: string, options: { locale?: string; } = {}): ParseDataNum | null { const l10n = getLocale(options.locale || '') || defaultLocale; const parts = /^\s*([10]?\d|2[0-4])(?::([0-5]\d|\d))?(?::([0-5]\d|\d))?(\.\d{1,10})?(?=\s*[^\s\d]|$)/.exec(value); let ampm = ''; @@ -649,14 +688,14 @@ export function parseTime (value, options = {}) { * - `v`: the parsed value. * * @see parseValue - * @param {string} value The supposed boolean to parse - * @param {object} [options={}] Options - * @param {string} [options.locale=""] + * @param value The supposed boolean to parse + * @param [options={}] Options + * @param [options.locale=""] * A BCP 47 string tag. Locale default is english with a `\u00a0` * grouping symbol (see [addLocale](#addLocale)) - * @returns {ParseData | null} An object of the parsed value and a corresponding format string + * @returns An object of the parsed value and a corresponding format string */ -export function parseBool (value, options = {}) { +export function parseBool (value: string, options: { locale?: string; } = {}): ParseDataBool | null { const l10n = getLocale(options.locale || '') || defaultLocale; const v = value.trim().toLowerCase(); const bT = l10n.bool[0].toLowerCase(); @@ -720,14 +759,14 @@ export function parseBool (value, options = {}) { * This may change in the future so be careful what options you pass the * functions. * - * @param {string} value The value to parse - * @param {object} [options={}] Options - * @param {string} [options.locale=""] + * @param value The value to parse + * @param [options={}] Options + * @param [options.locale=""] * A BCP 47 string tag. Locale default is english with a `\u00a0` * grouping symbol (see [addLocale](#addLocale)) - * @returns {ParseData | null} An object of the parsed value and a corresponding format string + * @returns An object of the parsed value and a corresponding format string */ -export function parseValue (value, options) { +export function parseValue (value: string, options?: { locale?: string; }): ParseDataNum | ParseDataBool | null { return ( parseNumber(value, options) ?? parseDate(value, options) ?? diff --git a/lib/round.ts b/lib/round.ts index 619c177..f8cb40c 100644 --- a/lib/round.ts +++ b/lib/round.ts @@ -3,11 +3,11 @@ * rounding function used internally by the formatter (symmetric arithmetic * rounding). * - * @param {number} number - The number to round. - * @param {number} [places=0] - The number of decimals to round to. - * @returns {number} A rounded number. + * @param number - The number to round. + * @param [places=0] - The number of decimals to round to. + * @returns A rounded number. */ -export function round (number, places = 0) { +export function round (number: number, places: number = 0): number { if (typeof number !== 'number') { return number; } diff --git a/lib/runPart.ts b/lib/runPart.ts index 3eea616..392fa22 100644 --- a/lib/runPart.ts +++ b/lib/runPart.ts @@ -3,26 +3,64 @@ import { clamp } from './clamp.ts'; import { dec2frac } from './dec2frac.ts'; import { general } from './general.ts'; import { toYMD } from './toYMD.ts'; -import { defaultLocale } from './locale.ts'; +import { defaultLocale, type LocaleData } from './locale.ts'; import { u_DSEC, u_CSEC, u_MSEC, EPOCH_1317, MIN_S_DATE, MAX_S_DATE, - MIN_L_DATE, MAX_L_DATE + MIN_L_DATE, MAX_L_DATE, + TOKEN_STRING, + TOKEN_SPACE, + TOKEN_POINT, + TOKEN_ERROR, + TOKEN_GENERAL, + TOKEN_EXP, + TOKEN_MINUS, + TOKEN_PLUS, + TOKEN_SKIP, + TOKEN_FILL, + TOKEN_TEXT, + T_TYPE_DIV, + T_TYPE_INT, + T_TYPE_FRAC, + T_TYPE_NUM, + T_TYPE_DEN, + T_TYPE_MAN, + TOKEN_AMPM, + T_TYPE_YEAR, + T_TYPE_YEAR_S, + T_TYPE_MON, + T_TYPE_MNAME_1, + T_TYPE_MNAME_S, + T_TYPE_MNAME, + T_TYPE_WEEKDAY_S, + T_TYPE_WEEKDAY, + T_TYPE_DAY, + T_TYPE_HOUR, + T_TYPE_MIN, + T_TYPE_SEC, + T_TYPE_SUBSEC, + T_TYPE_HOUR_E, + T_TYPE_MIN_E, + T_TYPE_SEC_E, + T_TYPE_B_YEAR, + T_TYPE_B_YEAR_S } from './constants.ts'; import { pad } from './pad.ts'; import { getExponent, getSignificand } from './numberProps.ts'; +import type { Partition } from './types.ts'; +import type { FormatOptions } from './options.ts'; const DAYSIZE = 86400; -const dateOverflows = (inputValue, roundedValue, bigRange) => { +const dateOverflows = (inputValue: number, roundedValue: number, bigRange: boolean) => { if (bigRange) { return (inputValue < MIN_L_DATE || roundedValue >= MAX_L_DATE); } return (inputValue < MIN_S_DATE || roundedValue >= MAX_S_DATE); }; -export function runPart (value, part, opts, l10n_) { +export function runPart (value: number | string | bigint, part: Partition, opts: FormatOptions, l10n_?: LocaleData) { let mantissa = ''; let mantissa_sign = ''; let numerator = ''; @@ -43,7 +81,7 @@ export function runPart (value, part, opts, l10n_) { } date = value; } - else { + else if (typeof value === 'number') { date = Math.trunc(value); } let time = 0; @@ -59,12 +97,12 @@ export function runPart (value, part, opts, l10n_) { const l10n = l10n_ || defaultLocale; // scale number - if (!part.text && isFinite(part.scale) && part.scale !== 1) { + if (!part.text && isFinite(part.scale) && part.scale !== 1 && typeof value === 'number') { value = clamp(value * part.scale); } // calc exponent - if (part.exponential) { + if (part.exponential && typeof value === 'number') { let v = Math.abs(value); if (v) { exp = getExponent(v, part.int_max); @@ -83,7 +121,7 @@ export function runPart (value, part, opts, l10n_) { } // integer to text - if (part.integer) { + if (part.integer && typeof value === 'number') { const i = Math.abs(round(value, part.fractions ? 1 : part.frac_max)); integer += (i < 1) ? '' : Math.floor(i); } @@ -92,7 +130,7 @@ export function runPart (value, part, opts, l10n_) { const group_sec = opts.grouping[1] ?? group_pri; // fraction to text - if (part.dec_fractions) { + if (part.dec_fractions && typeof value === 'number') { fraction = String(round(value, part.frac_max)).split('.')[1] || ''; } @@ -100,7 +138,7 @@ export function runPart (value, part, opts, l10n_) { const fixed_slash = !part.error && (part.num_p.includes('0') || part.den_p.includes('0')); let have_fraction = fixed_slash; - if (part.fractions) { + if (part.fractions && typeof value === 'number') { have_fraction = fixed_slash || !!(value % 1); const _dec = Math.abs(part.integer ? value % 1 : value); if (_dec) { @@ -137,7 +175,7 @@ export function runPart (value, part, opts, l10n_) { } // using date/time - if (part.date) { + if (part.date && typeof value === 'number') { date = Math.trunc(value); const t = DAYSIZE * (value - date); time = Math.floor(t); // in seconds @@ -191,7 +229,7 @@ export function runPart (value, part, opts, l10n_) { } if (opts.dateErrorNumber) { const _ret = value < 0 ? [ l10n.negative ] : []; - return general(_ret, {}, value, l10n).join(''); + return general(_ret, value, l10n).join(''); } return opts.overflow; } @@ -209,7 +247,7 @@ export function runPart (value, part, opts, l10n_) { const ret = []; - const digitsStart = (numstr, pattern, prt, offset) => { + const digitsStart = (numstr: string, pattern: string, prt: string, offset: number) => { const l = (!offset && numstr.length > pattern.length) ? prt.length + numstr.length - pattern.length : prt.length; @@ -227,9 +265,9 @@ export function runPart (value, part, opts, l10n_) { for (let ti = 0, tl = part.tokens.length; ti < tl; ti++) { const tok = part.tokens[ti]; const tokenType = tok.type; - const len = tok.num ? tok.num.length : 0; + const len = 'num' in tok ? tok.num.length : 0; - if (tokenType === 'string') { + if (tokenType === TOKEN_STRING) { // special rules may apply if next or prev is numerator or denominator if (tok.rule) { if (tok.rule === 'num') { @@ -262,7 +300,7 @@ export function runPart (value, part, opts, l10n_) { ret.push(tok.value.replace(/ /g, padQ)); } } - else if (tokenType === 'space') { + else if (tokenType === TOKEN_SPACE) { if (tok.rule === 'num+int') { if ( (have_fraction || part.num_min || part.den_min) && @@ -275,30 +313,30 @@ export function runPart (value, part, opts, l10n_) { ret.push(padQ); } } - else if (tokenType === 'error') { + else if (tokenType === TOKEN_ERROR) { // token used to define invalid pattern ret.push(opts.invalid); } - else if (tokenType === 'point') { + else if (tokenType === TOKEN_POINT) { // Excel always emits a period: TEXT(0, "#.#") => "." ret.push(part.date ? tok.value : l10n.decimal); } - else if (tokenType === 'general') { - general(ret, part, value, l10n); + else if (tokenType === TOKEN_GENERAL) { + general(ret, value, l10n); } - else if (tokenType === 'exp') { + else if (tokenType === TOKEN_EXP) { ret.push(l10n.exponent); } - else if (tokenType === 'minus') { + else if (tokenType === TOKEN_MINUS) { if (tok.volatile && part.date) { // don't emit the prepended minus if this is a date } - else if (tok.volatile && (value >= 0 || typeof value !== 'number')) { + else if (tok.volatile && (typeof value !== 'number' || value >= 0)) { // don't emit volatile minus for positive numbers } else if (tok.volatile && !part.fractions && (part.integer || part.dec_fractions)) { // minus is only shown if there is a non-zero digit present - if (value < 0 && (integer && integer !== '0') || fraction) { + if (typeof value === 'number' && value < 0 && (integer && integer !== '0') || fraction) { ret.push(l10n.negative); } } @@ -306,13 +344,13 @@ export function runPart (value, part, opts, l10n_) { ret.push(l10n.negative); } } - else if (tokenType === 'plus') { + else if (tokenType === TOKEN_PLUS) { ret.push(l10n.positive); } - else if (tokenType === 'text') { + else if (tokenType === TOKEN_TEXT) { ret.push(value); } - else if (tokenType === 'fill') { + else if (tokenType === TOKEN_FILL) { // If user has provided a token to signal that next char is a fill char, // then emit the that plus the fill char. By default this does what the // TEXT function does in this case: Emits nothing. @@ -320,7 +358,7 @@ export function runPart (value, part, opts, l10n_) { ret.push(opts.fillChar, tok.value); } } - else if (tokenType === 'skip') { + else if (tokenType === TOKEN_SKIP) { // If user has provided a token to signal that next char is a fill char, // then emit the that plus the fill char. By default this does what the // TEXT function does in this case: Emits a space. @@ -331,7 +369,7 @@ export function runPart (value, part, opts, l10n_) { ret.push(opts.nbsp ? '\u00a0' : ' '); } } - else if (tokenType === 'div') { + else if (tokenType === T_TYPE_DIV) { if (have_fraction) { ret.push('/'); } @@ -342,7 +380,7 @@ export function runPart (value, part, opts, l10n_) { ret.push(pad('#', opts.nbsp)); } } - else if (tokenType === 'int') { + else if (tokenType === T_TYPE_INT) { // number isn't fragmented if (part.int_pattern.length === 1) { const pt = part.int_p; @@ -368,29 +406,30 @@ export function runPart (value, part, opts, l10n_) { counter.int += digitsStart(integer, part.int_p, tok.num, counter.int); } } - else if (tokenType === 'frac') { + else if (tokenType === T_TYPE_FRAC) { const o = counter.frac; for (let i = 0; i < len; i++) { ret.push(fraction[i + o] || pad(tok.num[i], opts.nbsp)); } counter.frac += len; } - else if (tokenType === 'man') { + else if (tokenType === T_TYPE_MAN) { // mantissa sign is attached to the first digit, not the exponent symbol // "0E+ 0" will print as "1E +12" - if (!counter[tokenType] && !counter.man) { + if (!counter.man) { ret.push(mantissa_sign); } counter.man += digitsStart(mantissa, part.man_p, tok.num, counter.man); } - else if (tokenType === 'num') { + else if (tokenType === T_TYPE_NUM) { counter.num += digitsStart(numerator, part.num_p, tok.num, counter.num); } - else if (tokenType === 'den') { + else if (tokenType === T_TYPE_DEN) { const o = counter.den; for (let i = 0; i < len; i++) { let digit = denominator[i + o]; if (!digit) { + // XXX: use charCodes const ch = tok.num[i]; if ( '123456789'.includes(ch) || @@ -415,18 +454,18 @@ export function runPart (value, part, opts, l10n_) { } counter.den += len; } - else if (tokenType === 'year') { + else if (tokenType === T_TYPE_YEAR) { if (year < 0) { ret.push(l10n.negative); } ret.push(String(Math.abs(year)).padStart(4, '0')); } - else if (tokenType === 'year-short') { + else if (tokenType === T_TYPE_YEAR_S) { const y = year % 100; ret.push(y < 10 ? '0' : '', y); } - else if (tokenType === 'month') { + else if (tokenType === T_TYPE_MON) { ret.push((tok.pad && month < 10 ? '0' : ''), month); } - else if (tokenType === 'monthname-single') { + else if (tokenType === T_TYPE_MNAME_1) { // This is what Excel does. // The Vietnamese list goes: // from ["Tháng 1", "Tháng 2", ... ] to [ "T", "T", ... ] @@ -439,7 +478,7 @@ export function runPart (value, part, opts, l10n_) { ret.push(l10n.mmmm[month - 1].charAt(0)); } } - else if (tokenType === 'monthname-short') { + else if (tokenType === T_TYPE_MNAME_S) { if (part.date_system === EPOCH_1317) { ret.push(l10n.mmm6[month - 1]); } @@ -447,7 +486,7 @@ export function runPart (value, part, opts, l10n_) { ret.push(l10n.mmm[month - 1]); } } - else if (tokenType === 'monthname') { + else if (tokenType === T_TYPE_MNAME) { if (part.date_system === EPOCH_1317) { ret.push(l10n.mmmm6[month - 1]); } @@ -455,33 +494,33 @@ export function runPart (value, part, opts, l10n_) { ret.push(l10n.mmmm[month - 1]); } } - else if (tok.type === 'weekday-short') { + else if (tok.type === T_TYPE_WEEKDAY_S) { ret.push(l10n.ddd[weekday]); } - else if (tokenType === 'weekday') { + else if (tokenType === T_TYPE_WEEKDAY) { ret.push(l10n.dddd[weekday]); } - else if (tokenType === 'day') { + else if (tokenType === T_TYPE_DAY) { ret.push((tok.pad && day < 10 ? '0' : ''), day); } - else if (tokenType === 'hour') { + else if (tokenType === T_TYPE_HOUR) { const h = hour % part.clock || (part.clock < 24 ? part.clock : 0); ret.push((tok.pad && h < 10 ? '0' : ''), h); } - else if (tokenType === 'min') { + else if (tokenType === T_TYPE_MIN) { ret.push((tok.pad && minute < 10 ? '0' : ''), minute); } - else if (tokenType === 'sec') { + else if (tokenType === T_TYPE_SEC) { ret.push((tok.pad && second < 10 ? '0' : ''), second); } - else if (tokenType === 'subsec') { + else if (tokenType === T_TYPE_SUBSEC) { ret.push(l10n.decimal); // decimals is pre-determined by longest subsec token // but the number emitted is per-token const f = subsec.toFixed(part.sec_decimals); ret.push(f.slice(2, 2 + tok.decimals)); } - else if (tokenType === 'ampm') { + else if (tokenType === TOKEN_AMPM) { const idx = hour < 12 ? 0 : 1; if (tok.short && !l10n_) { ret.push('AP'[idx]); @@ -490,25 +529,31 @@ export function runPart (value, part, opts, l10n_) { ret.push(l10n.ampm[idx]); } } - else if (tokenType === 'hour-elap') { - if (value < 0) { ret.push(l10n.negative); } + else if (tokenType === T_TYPE_HOUR_E && typeof value === 'number') { + if (value < 0) { + ret.push(l10n.negative); + } const hh = (date * 24) + Math.floor(Math.abs(time) / (60 * 60)); ret.push(String(Math.abs(hh)).padStart(tok.pad, '0')); } - else if (tokenType === 'min-elap') { - if (value < 0) { ret.push(l10n.negative); } + else if (tokenType === T_TYPE_MIN_E && typeof value === 'number') { + if (value < 0) { + ret.push(l10n.negative); + } const mm = (date * 1440) + Math.floor(Math.abs(time) / 60); ret.push(String(Math.abs(mm)).padStart(tok.pad, '0')); } - else if (tokenType === 'sec-elap') { - if (value < 0) { ret.push(l10n.negative); } + else if (tokenType === T_TYPE_SEC_E && typeof value === 'number') { + if (value < 0) { + ret.push(l10n.negative); + } const ss = (date * DAYSIZE) + Math.abs(time); ret.push(String(Math.abs(ss)).padStart(tok.pad, '0')); } - else if (tokenType === 'b-year') { + else if (tokenType === T_TYPE_B_YEAR) { ret.push(year + 543); } - else if (tokenType === 'b-year-short') { + else if (tokenType === T_TYPE_B_YEAR_S) { const y = (year + 543) % 100; ret.push(y < 10 ? '0' : '', y); } diff --git a/lib/serialDate.ts b/lib/serialDate.ts index 2a09406..f5d3291 100644 --- a/lib/serialDate.ts +++ b/lib/serialDate.ts @@ -1,4 +1,5 @@ import { toYMD } from './toYMD.ts'; + const floor = Math.floor; const DAYSIZE = 86400; @@ -17,14 +18,17 @@ const DAYSIZE = 86400; * dateToSerial("something else"); // null * ```` * - * @param {Date | Array} date The date - * @param {object} [options={}] Options - * @param {boolean} [options.ignoreTimezone=false] + * @param date The date + * @param [options={}] Options + * @param [options.ignoreTimezone] * Normally time zone will be taken into account. This makes the conversion to * serial date ignore the timezone offset. - * @returns {number | null} The date as a spreadsheet serial date, or null. + * @returns The date as a spreadsheet serial date, or null. */ -export function dateToSerial (date, options) { +export function dateToSerial ( + date: Date | number[], + options?: { ignoreTimezone?: boolean; } +): number | null { let ts = null; if (Array.isArray(date)) { const [ y, m, d, hh, mm, ss ] = date; @@ -32,7 +36,7 @@ export function dateToSerial (date, options) { } // dates are changed to serial else if (date instanceof Date) { - ts = date * 1; + ts = date.valueOf(); if (!options?.ignoreTimezone) { // Many timezones are offset in seconds but getTimezoneOffset() returns // time "rounded" to minutes so it is basically usable. 😿 @@ -49,7 +53,7 @@ export function dateToSerial (date, options) { date.getMilliseconds() ); // timestamp - ts = dt * 1; + ts = dt.valueOf(); } } if (ts != null && isFinite(ts)) { @@ -68,13 +72,18 @@ export function dateToSerial (date, options) { * dateFromSerial(28627); // [ 1978, 5, 17, 0, 0, 0 ] * ```` * - * @param {number} serialDate The date - * @param {object} [options={}] The options - * @param {boolean} [options.leap1900=true] + * @param serialDate The date + * @param [options={}] The options + * @param [options.leap1900=true] * Simulate the Lotus 1-2-3 [1900 leap year bug](https://docs.microsoft.com/en-us/office/troubleshoot/excel/wrongly-assumes-1900-is-leap-year). - * @returns {Array} returns an array of date parts + * @returns returns an array of date parts */ -export function dateFromSerial (serialDate, options) { +export function dateFromSerial ( + serialDate: number, + options?: { + leap1900?: boolean; + } +): [ number, number, number, number, number, number ] { let date = (serialDate | 0); const t = DAYSIZE * (serialDate - date); let time = floor(t); // in seconds diff --git a/lib/toYMD.ts b/lib/toYMD.ts index 80f71b1..997a919 100644 --- a/lib/toYMD.ts +++ b/lib/toYMD.ts @@ -2,7 +2,7 @@ import { EPOCH_1317, EPOCH_1904 } from './constants.ts'; const floor = Math.floor; // https://www.codeproject.com/Articles/2750/Excel-Serial-Date-to-Day-Month-Year-and-Vice-Versa -export function toYMD_1900 (ord, leap1900 = true) { +export function toYMD_1900 (ord: number, leap1900 = true) { if (leap1900 && ord >= 0) { if (ord === 0) { return [ 1900, 1, 0 ]; @@ -27,7 +27,7 @@ export function toYMD_1900 (ord, leap1900 = true) { return [ nYear | 0, nMonth | 0, nDay | 0 ]; } -export function toYMD_1904 (ord) { +export function toYMD_1904 (ord: number) { return toYMD_1900(ord + 1462); } @@ -35,7 +35,7 @@ export function toYMD_1904 (ord) { // > [algorithm] is used in many Microsoft products, including all // > operating systems that support Arabic locales, Microsoft Office, // > COM, Visual Basic, VBA, and SQL Server 2000. -export function toYMD_1317 (ord) { +export function toYMD_1317 (ord: number) { if (ord === 60) { throw new Error('#VALUE!'); } @@ -59,7 +59,7 @@ export function toYMD_1317 (ord) { return [ 30 * cyc + j, m, z - floor(29.5001 * m - 29) ]; } -export function toYMD (ord, system = 0, leap1900 = true) { +export function toYMD (ord: number, system = 0, leap1900 = true) { const int = floor(ord); if (system === EPOCH_1317) { return toYMD_1317(int); diff --git a/lib/tokenize.ts b/lib/tokenize.ts index 89b2eb6..fb98d69 100644 --- a/lib/tokenize.ts +++ b/lib/tokenize.ts @@ -6,8 +6,9 @@ import { TOKEN_AMPM, TOKEN_ESCAPED, TOKEN_STRING, TOKEN_SKIP, TOKEN_EXP, TOKEN_FILL, TOKEN_PAREN, TOKEN_CHAR } from './constants.ts'; +import type { FormatToken, TokenType } from './types.ts'; -const tokenHandlers = [ +const tokenHandlers: [ TokenType, RegExp, 0 | 1 | number[] ][] = [ [ TOKEN_GENERAL, /^General/i, 0 ], [ TOKEN_HASH, /^#/, 0 ], [ TOKEN_ZERO, /^0/, 0 ], @@ -53,18 +54,11 @@ const CODE_QMRK = 63; const CODE_HASH = 35; const CODE_ZERO = 48; const CODE_NINE = 57; -const isNumOp = char => { +const isNumOp = (char: string) => { const c = (char || '\0').charCodeAt(0); return (c === CODE_QMRK || c === CODE_HASH || (c >= CODE_ZERO && c <= CODE_NINE)); }; -/** - * @typedef {object} FormatToken - * @property {string} type Token type. - * @property {any} value The value of the token, cleaned of extra characters. - * @property {string} raw Raw token source. - */ - /** * Breaks a format pattern string into a list of tokens. * @@ -82,12 +76,12 @@ const isNumOp = char => { * Token types may be found as an Object as the * [`tokenTypes` export]{@link tokenTypes} of the package. * - * @param {string} pattern The format pattern - * @returns {FormatToken[]} a list of tokens + * @param pattern The format pattern + * @returns a list of tokens */ -export function tokenize (pattern) { +export function tokenize (pattern: string): FormatToken[] { let i = 0; - const tokens = []; + const tokens: FormatToken[] = []; const unresolvedCommas = []; while (i < pattern.length) { const curr = pattern.slice(i); @@ -128,7 +122,7 @@ export function tokenize (pattern) { else if (maybeGROUP && maybeSCALE) { // this token will be set to scale, but switched to group if we hit a // num token later on in the pattern... - const t = { type: TOKEN_SCALE, value: ',', raw }; + const t: FormatToken = { type: TOKEN_SCALE, value: ',', raw }; tokens.push(t); unresolvedCommas.push(t); } @@ -138,7 +132,7 @@ export function tokenize (pattern) { } // all other symbols are matched using else { - let token; + let token: FormatToken | undefined; for (const [ type, expr, group ] of tokenHandlers) { const m = expr.exec(curr); if (m) { @@ -152,11 +146,11 @@ export function tokenize (pattern) { } } // if we just matched a break, then deal with any unresolved commas - if (unresolvedCommas.length && token.raw === ';') { + if (unresolvedCommas.length && token?.raw === ';') { unresolvedCommas.length = 0; } // if we just matched a num operator, then deal with any unresolved commas - if (unresolvedCommas.length && isNumOp(token.raw)) { + if (token && unresolvedCommas.length && isNumOp(token.raw)) { unresolvedCommas.forEach(d => (d.type = TOKEN_GROUP)); unresolvedCommas.length = 0; } diff --git a/lib/types.ts b/lib/types.ts new file mode 100644 index 0000000..e85f0cd --- /dev/null +++ b/lib/types.ts @@ -0,0 +1,189 @@ +import { + EPOCH_1900, EPOCH_1317, + TOKEN_AMPM, TOKEN_ERROR, TOKEN_EXP, TOKEN_FILL, TOKEN_GENERAL, TOKEN_MINUS, TOKEN_PLUS, TOKEN_POINT, TOKEN_SKIP, + TOKEN_SPACE, TOKEN_STRING, TOKEN_TEXT, TOKEN_HASH, TOKEN_QMARK, TOKEN_COMMA, TOKEN_SCALE, TOKEN_ZERO, TOKEN_SLASH, + TOKEN_GROUP, TOKEN_PERCENT, TOKEN_DIGIT, TOKEN_DURATION, TOKEN_BREAK, TOKEN_CALENDAR, TOKEN_CONDITION, TOKEN_COLOR, + TOKEN_PAREN, TOKEN_CHAR, TOKEN_MODIFIER, TOKEN_DBNUM, TOKEN_NATNUM, TOKEN_DATETIME, TOKEN_LOCALE, TOKEN_ESCAPED, + T_TYPE_INT, T_TYPE_NUM, T_TYPE_DEN, T_TYPE_DIV, T_TYPE_FRAC, T_TYPE_MAN, T_TYPE_SUBSEC, T_TYPE_YEAR_S, T_TYPE_YEAR, + T_TYPE_B_YEAR_S, T_TYPE_B_YEAR, T_TYPE_DAY, T_TYPE_WEEKDAY_S, T_TYPE_WEEKDAY, T_TYPE_HOUR, T_TYPE_MNAME_S, + T_TYPE_MNAME_1, T_TYPE_MNAME, T_TYPE_MIN, T_TYPE_MON, T_TYPE_HOUR_E, T_TYPE_MIN_E, T_TYPE_SEC_E, T_TYPE_SEC + +} from './constants.ts'; + +export type TokenType = ( + typeof TOKEN_GENERAL | typeof TOKEN_HASH | typeof TOKEN_ZERO | typeof TOKEN_QMARK | + typeof TOKEN_SLASH | typeof TOKEN_GROUP | typeof TOKEN_SCALE | typeof TOKEN_COMMA | + typeof TOKEN_BREAK | typeof TOKEN_TEXT | typeof TOKEN_PLUS | typeof TOKEN_MINUS | + typeof TOKEN_POINT | typeof TOKEN_SPACE | typeof TOKEN_PERCENT | typeof TOKEN_DIGIT | + typeof TOKEN_CALENDAR | typeof TOKEN_ERROR | typeof TOKEN_DATETIME | typeof TOKEN_DURATION | + typeof TOKEN_CONDITION | typeof TOKEN_DBNUM | typeof TOKEN_NATNUM | typeof TOKEN_LOCALE | + typeof TOKEN_COLOR | typeof TOKEN_MODIFIER | typeof TOKEN_AMPM | typeof TOKEN_ESCAPED | + typeof TOKEN_STRING | typeof TOKEN_SKIP | typeof TOKEN_EXP | typeof TOKEN_FILL | + typeof TOKEN_PAREN | typeof TOKEN_CHAR +); + +export type FormatToken = { + /** Token type. */ + type: TokenType, + /** The value of the token, cleaned of extra characters. */ + value: any, + /** Raw token source. */ + raw: string, +}; + +export type RenderRule = 'num+int' | 'num' | 'den'; + +export type DateRenderToken = + { type: (typeof T_TYPE_HOUR | typeof T_TYPE_DAY | typeof T_TYPE_MIN | typeof T_TYPE_SEC | typeof T_TYPE_MON), + pad?: boolean, + size: number, + indeterminate?: boolean, + used?: boolean } | + { type: (typeof T_TYPE_HOUR_E | typeof T_TYPE_MIN_E | typeof T_TYPE_SEC_E), + pad: number, + size: number, + used?: boolean } | + { type: typeof T_TYPE_SUBSEC, decimals: number, size: number, used?: boolean } | + { type: ( + typeof T_TYPE_YEAR | typeof T_TYPE_YEAR_S | typeof T_TYPE_B_YEAR | typeof T_TYPE_B_YEAR_S | + typeof T_TYPE_WEEKDAY_S | typeof T_TYPE_WEEKDAY | + typeof T_TYPE_MNAME | typeof T_TYPE_MNAME_1 | typeof T_TYPE_MNAME_S + ), + used?: boolean, + size: number }; + +export type RenderToken = + DateRenderToken | + { type: typeof TOKEN_TEXT, value: string } | + { type: typeof TOKEN_POINT, value: string } | + { type: typeof TOKEN_STRING, value: string, rule?: RenderRule } | + { type: typeof TOKEN_SPACE, rule?: RenderRule } | + { type: typeof TOKEN_FILL, value: string } | + { type: typeof TOKEN_SKIP, value: string } | + { type: typeof TOKEN_AMPM, short?: boolean } | + { type: typeof T_TYPE_DIV } | + { type: typeof T_TYPE_FRAC, num: string } | + { type: typeof T_TYPE_INT, num: string } | + { type: typeof T_TYPE_MAN, num: string } | + { type: typeof T_TYPE_NUM, num: string } | + { type: typeof T_TYPE_DEN, num: string } | + { type: typeof TOKEN_EXP, plus: boolean } | + { type: typeof TOKEN_ERROR } | + { type: typeof TOKEN_PLUS } | + { type: typeof TOKEN_MINUS, volatile?: boolean } | + { type: typeof TOKEN_GENERAL }; + +export type SectionType = + typeof T_TYPE_INT | + typeof T_TYPE_DEN | + typeof T_TYPE_FRAC | + typeof T_TYPE_MAN | + typeof T_TYPE_NUM; + +export type Partition = { + generated?: boolean, + clock: 12 | 24, + color?: number, + condition?: [ string, number ], + date: number, + den_min: number, + num_min: number, + int_max: number, + den_max: number, + frac_max: number, + date_eval: boolean, + date_system: typeof EPOCH_1900 | typeof EPOCH_1317, + dec_fractions?: boolean; + den_p: string, + den_pattern: string[], + denominator: number, + exp_plus?: boolean; + error?: boolean; + exponential: boolean; + frac_pattern: string[], + fractions: boolean, + general: boolean, + grouping: boolean, + int_p: string, + int_pattern: string[], + integer: boolean, + locale: string, + man_p: string, + man_pattern: string[], + num_p: string, + num_pattern: string[], + parens: boolean, + pattern: string, + percent: boolean, + scale: number, + int_min: number, + sec_decimals: number, + text: boolean, + tokensUsed: number, + tokens: RenderToken[] +}; + +export type PatternParseData = { + pattern: string, + partitions: Partition[], + locale?: string, + error?: string +}; + +/** An object of information properties based on a format pattern. */ +export type FormatInfo = { + /** A string identifier for the type of the number formatter. */ + type: ('currency' | 'date' | 'datetime' | 'error' | 'fraction' | 'general' | 'grouped' | 'number' | 'percent' | 'scientific' | 'text' | 'time'); + /** Corresponds to the output from isDateFormat. */ + isDate: boolean; + /** Corresponds to the output from isTextFormat. */ + isText: boolean; + /** Corresponds to the output from isPercentFormat. */ + isPercent: boolean; + /** The maximum number of decimals this format will emit. */ + maxDecimals: number; + /** + * 1 if the format uses color on the negative portion of the string, else + * a 0. This replicates Excel's `CELL("color")` functionality. + */ + color: 0 | 1; + /** + * 1 if the positive portion of the number format contains an open + * parenthesis, else a 0. This is replicates Excel's `CELL("parentheses")` + * functionality. + */ + parentheses: 0 | 1; + /** 1 if the positive portion of the format uses a thousands separator, else a 0. */ + grouped: 0 | 1; + /** + * Corresponds to Excel's `CELL("format")` functionality. It should match Excel's esoteric behaviour fairly well. + * [See Microsoft's documentation.](https://support.microsoft.com/en-us/office/cell-function-51bd39a5-f338-4dbe-a33f-955d67c2b2cf) + */ + code: string; + /** The multiplier used when formatting the number (100 for percentages). */ + scale: number; + /** + * An arbirarty number that represents the format's specificity if you want + * to compare one to another. Integer comparisons roughly match Excel's + * resolutions when it determines which format wins out. + */ + level: number; +}; + +/** An object detailing which date specifiers are used in a format pattern. */ +export type FormatDateInfo = { + /** true if the pattern uses years else false. */ + year: boolean; + /** true if the pattern uses months else false. */ + month: boolean; + /** true if the pattern uses day of the month else false. */ + day: boolean; + /** true if the pattern uses hours else false. */ + hours: boolean; + /** true if the pattern uses minutes else false. */ + minutes: boolean; + /** true if the pattern uses seconds else false. */ + seconds: boolean; + /** 12 if the pattern uses AM/PM clock else 24. */ + clockType: 12 | 24; +}; diff --git a/test/numfmt.spec.ts b/test/numfmt.spec.ts index a1c9a27..77a9b5c 100644 --- a/test/numfmt.spec.ts +++ b/test/numfmt.spec.ts @@ -7,6 +7,7 @@ import { format as numfmt, isDateFormat, isPercentFormat, isTextFormat } from '. test('near zero negatives:', () => { expect(numfmt('-0', -1)).toBe('--1'); expect(numfmt('-general', -1)).toBe('--1'); + // @ts-expect-error testing missing value input expect(() => numfmt('0.0 general'), '0.0 general').toThrow(); expect(numfmt('0.0', -1)).toBe('-1.0'); expect(numfmt('0.0', -0.1)).toBe('-0.1'); @@ -278,3 +279,39 @@ test('Issue #64 (very small number):', () => { expect(numfmt('General', 2.33e-321)).toBe('2.33E-321'); expect(numfmt('0.0', 2.33e-321)).toBe('0.0'); }); + +test('Correct output for single bracket patterns', () => { + expect(numfmt('[HH]', 123.456)).toBe('2962'); + expect(numfmt('[H]', 123.456)).toBe('2962'); + expect(numfmt('[SS]', 123.456)).toBe('10666598'); + expect(numfmt('[S]', 123.456)).toBe('10666598'); + expect(numfmt('[MM]', 123.456)).toBe('177776'); + expect(numfmt('[M]', 123.456)).toBe('177776'); + expect(numfmt('[FOO]', 123.456, { throws: false })).toBe('######'); + expect(numfmt('[$-1234]', 123.456)).toBe(''); + expect(numfmt('[$foo]', 123.456)).toBe('foo'); + expect(numfmt('[$-foo]', 123.456)).toBe(''); + expect(numfmt('[DBNum]', 123.456, { throws: false })).toBe('######'); + expect(numfmt('[DBNum0]', 123.456, { throws: false })).toBe('######'); + expect(numfmt('[DBNum1]', 123.456)).toBe('123.456'); + expect(numfmt('[DBNum2]', 123.456)).toBe('123.456'); + expect(numfmt('[DBNum3]', 123.456)).toBe('123.456'); + expect(numfmt('[DBNum4]', 123.456)).toBe('123.456'); + expect(numfmt('[DBNum5]', 123.456, { throws: false })).toBe('######'); + expect(numfmt('[NatNum]', 123.456, { throws: false })).toBe('######'); + expect(numfmt('[NatNum1]', 123.456, { throws: false })).toBe('######'); + expect(numfmt('[NatNum2]', 123.456, { throws: false })).toBe('######'); + expect(numfmt('[$-is-IS]', 123.456)).toBe(''); + expect(numfmt('[$-040F]', 123.456)).toBe(''); + expect(numfmt('[$-01040]', 123.456)).toBe(''); + expect(numfmt('[$-0101040F]', 123.456)).toBe(''); + expect(numfmt('[$$-409]', 123.456)).toBe('$'); + expect(numfmt('[$ISK]', 123.456)).toBe('ISK'); + expect(numfmt('[$ISK-]', 123.456)).toBe('ISK'); + expect(numfmt('[$NZ$-481]', 123.456)).toBe('NZ$'); + expect(numfmt('[$whatever]', 123.456)).toBe('whatever'); + expect(numfmt('[$-060C01]', 123.456)).toBe(''); + expect(numfmt('[black]', 123.456)).toBe('123.456'); + expect(numfmt('[blue]', 123.456)).toBe('123.456'); + expect(numfmt('[orange]', 123.456, { throws: false })).toBe('######'); +}); diff --git a/test/options.spec.ts b/test/options.spec.ts index d6972e9..2b304f9 100644 --- a/test/options.spec.ts +++ b/test/options.spec.ts @@ -27,6 +27,7 @@ test('option: invalid', () => { expect(format('h #', 0, { throws: false })).toBe('######'); expect(format('h #', 0, { invalid: '🦂', throws: false })).toBe('🦂'); expect(format('h #', 0, { invalid: '#VALUE!', throws: false })).toBe('#VALUE!'); + // @ts-expect-error testing invalid input expect(format('h #', 0, { invalid: true, throws: false })).toBe('true'); }); @@ -87,8 +88,8 @@ if (parseInt(process.version.replace(/^v/, ''), 10) >= 14) { const baseDate = new Date(2000, 0, 1); expect(baseDate.toUTCString(), 'Date has a timezone').toBe('Fri, 31 Dec 1999 18:30:00 GMT'); const gmtStr = 'ddd, dd mmm yyyy hh:mm:ss "GMT"'; - expect(format(gmtStr, baseDate, { nbsp: 0 })).toBe('Sat, 01 Jan 2000 00:00:00 GMT'); - expect(format(gmtStr, baseDate, { nbsp: 0, ignoreTimezone: true })).toBe('Fri, 31 Dec 1999 18:30:00 GMT'); - expect(format(gmtStr, baseDate, { nbsp: 0, ignoreTimezone: false })).toBe('Sat, 01 Jan 2000 00:00:00 GMT'); + expect(format(gmtStr, baseDate, { nbsp: false })).toBe('Sat, 01 Jan 2000 00:00:00 GMT'); + expect(format(gmtStr, baseDate, { nbsp: false, ignoreTimezone: true })).toBe('Fri, 31 Dec 1999 18:30:00 GMT'); + expect(format(gmtStr, baseDate, { nbsp: false, ignoreTimezone: false })).toBe('Sat, 01 Jan 2000 00:00:00 GMT'); }); } diff --git a/test/robust-mode.spec.ts b/test/robust-mode.spec.ts index 63b9e59..22199d8 100644 --- a/test/robust-mode.spec.ts +++ b/test/robust-mode.spec.ts @@ -18,5 +18,5 @@ test('Robust mode', () => { expect(format('y 0', 1, opts), 'format does not throw with "dddd, dd. mmmm yyy"').toBe('######'); expect(formatColor('a;b;c;d;', 0, opts), 'formatColor does not throw').toBe(null); - expect(isDateFormat('a;b;c;d;', opts), 'isDateFormat does not throw').toBe(false); + expect(isDateFormat('a;b;c;d;'), 'isDateFormat does not throw').toBe(false); }); diff --git a/test/serialDate.spec.ts b/test/serialDate.spec.ts index 2e5d69b..9dbe70b 100644 --- a/test/serialDate.spec.ts +++ b/test/serialDate.spec.ts @@ -8,13 +8,13 @@ function round (n: number): number { return Math.round(n * 1e10) / 1e10; } -test('dateToSerial (Date):', () => { +test('dateToSerial (Date)', () => { process.env.TZ = 'Asia/Calcutta'; expect(getTimeZoneName(), 'Timezone is IST').toBe('India Standard Time'); const testYMD = (y: number, m: number, d: number, hh: number, mm: number, ss: number, tz = false) => { const dt = new Date(y, m - 1, d, hh, mm, ss); - return round(dateToSerial(dt, { ignoreTimezone: tz })); + return round(dateToSerial(dt, { ignoreTimezone: tz }) ?? 0); }; expect(testYMD(1978, 5, 17, 10, 25, 30, true), '[1978, 5, 17, 10, 25, 30] ignoreTimezone').toBe(28627.2052083333); @@ -33,12 +33,12 @@ test('dateToSerial (Date):', () => { expect(testYMD(2000, 1, 1, 0, 0, 0, true), '[2000, 1, 1, 0, 0, 0] ignoreTimezone').toBe(36525.7708333333); }); -test('dateToSerial (Array):', () => { +test('dateToSerial (Array)', () => { const testYMD = (y: number, m: number, d: number, hh: number, mm: number, ss: number, tz = false) => { return round(dateToSerial( [ y, m, d, hh, mm, ss ], { ignoreTimezone: tz } - )); + ) ?? 0); }; expect(testYMD(1978, 5, 17, 10, 25, 30, false), '[1978, 5, 17, 10, 25, 30]').toBe(28627.434375); expect(testYMD(1978, 5, 17, 10, 25, 30, true), '[1978, 5, 17, 10, 25, 30]').toBe(28627.434375); @@ -52,7 +52,7 @@ test('dateToSerial (Array):', () => { expect(testYMD(2000, 1, 1, 0, 0, 0, true), '[2000, 1, 1, 0, 0, 0]').toBe(36526); }); -test('dateFromSerial:', () => { +test('dateFromSerial', () => { process.env.TZ = 'Europe/Amsterdam'; expect( /^Central European (Standard|Summer) Time$/.test(getTimeZoneName()), diff --git a/test/ssf-fraction.spec.ts b/test/ssf-fraction.spec.ts index efafe60..f396e95 100644 --- a/test/ssf-fraction.spec.ts +++ b/test/ssf-fraction.spec.ts @@ -2,112 +2,112 @@ import { expect, test } from 'vitest'; import { format } from '../lib/index.ts'; test('SSF-fractions tests', () => { - expect(format('# ?/?', 1, '# ?/?')).toBe('1 '); - expect(format('# ?/?', -1.2, '# ?/?')).toBe('-1 1/5'); - expect(format('# ?/?', 12.3, '# ?/?')).toBe('12 1/3'); - expect(format('# ?/?', -12.34, '# ?/?')).toBe('-12 1/3'); - expect(format('# ?/?', 123.45, '# ?/?')).toBe('123 4/9'); - expect(format('# ?/?', -123.456, '# ?/?')).toBe('-123 1/2'); - expect(format('# ?/?', 1234.567, '# ?/?')).toBe('1234 4/7'); - expect(format('# ?/?', -1234.5678, '# ?/?')).toBe('-1234 4/7'); - expect(format('# ?/?', 12345.6789, '# ?/?')).toBe('12345 2/3'); - expect(format('# ?/?', -12345.67891, '# ?/?')).toBe('-12345 2/3'); - expect(format('# ??/??', 1, '# ??/??')).toBe('1 '); - expect(format('# ??/??', -1.2, '# ??/??')).toBe('-1 1/5 '); - expect(format('# ??/??', 12.3, '# ??/??')).toBe('12 3/10'); - expect(format('# ??/??', -12.34, '# ??/??')).toBe('-12 17/50'); - expect(format('# ??/??', 123.45, '# ??/??')).toBe('123 9/20'); - expect(format('# ??/??', -123.456, '# ??/??')).toBe('-123 26/57'); - expect(format('# ??/??', 1234.567, '# ??/??')).toBe('1234 55/97'); - expect(format('# ??/??', -1234.5678, '# ??/??')).toBe('-1234 46/81'); - expect(format('# ??/??', 12345.6789, '# ??/??')).toBe('12345 55/81'); - expect(format('# ??/??', -12345.67891, '# ??/??')).toBe('-12345 55/81'); - expect(format('# ???/???', 1, '# ???/???')).toBe('1 '); - expect(format('# ???/???', -1.2, '# ???/???')).toBe('-1 1/5 '); - expect(format('# ???/???', 12.3, '# ???/???')).toBe('12 3/10 '); - expect(format('# ???/???', -12.34, '# ???/???')).toBe('-12 17/50 '); - expect(format('# ???/???', 123.45, '# ???/???')).toBe('123 9/20 '); - expect(format('# ???/???', -123.456, '# ???/???')).toBe('-123 57/125'); - expect(format('# ???/???', 1234.567, '# ???/???')).toBe('1234 55/97 '); - expect(format('# ???/???', -1234.5678, '# ???/???')).toBe('-1234 67/118'); - expect(format('# ???/???', 12345.6789, '# ???/???')).toBe('12345 74/109'); - expect(format('# ???/???', -12345.67891, '# ???/???')).toBe('-12345 573/844'); - expect(format('# ?/2', 1, '# ?/2')).toBe('1 '); - expect(format('# ?/2', -1.2, '# ?/2')).toBe('-1 '); - expect(format('# ?/2', 12.3, '# ?/2')).toBe('12 1/2'); - expect(format('# ?/2', -12.34, '# ?/2')).toBe('-12 1/2'); - expect(format('# ?/2', 123.45, '# ?/2')).toBe('123 1/2'); - expect(format('# ?/2', -123.456, '# ?/2')).toBe('-123 1/2'); - expect(format('# ?/2', 1234.567, '# ?/2')).toBe('1234 1/2'); - expect(format('# ?/2', -1234.5678, '# ?/2')).toBe('-1234 1/2'); - expect(format('# ?/2', 12345.6789, '# ?/2')).toBe('12345 1/2'); - expect(format('# ?/2', -12345.67891, '# ?/2')).toBe('-12345 1/2'); - expect(format('# ?/4', 1, '# ?/4')).toBe('1 '); - expect(format('# ?/4', -1.2, '# ?/4')).toBe('-1 1/4'); - expect(format('# ?/4', 12.3, '# ?/4')).toBe('12 1/4'); - expect(format('# ?/4', -12.34, '# ?/4')).toBe('-12 1/4'); - expect(format('# ?/4', 123.45, '# ?/4')).toBe('123 2/4'); - expect(format('# ?/4', -123.456, '# ?/4')).toBe('-123 2/4'); - expect(format('# ?/4', 1234.567, '# ?/4')).toBe('1234 2/4'); - expect(format('# ?/4', -1234.5678, '# ?/4')).toBe('-1234 2/4'); - expect(format('# ?/4', 12345.6789, '# ?/4')).toBe('12345 3/4'); - expect(format('# ?/4', -12345.67891, '# ?/4')).toBe('-12345 3/4'); - expect(format('# ?/8', 1, '# ?/8')).toBe('1 '); - expect(format('# ?/8', -1.2, '# ?/8')).toBe('-1 2/8'); - expect(format('# ?/8', 12.3, '# ?/8')).toBe('12 2/8'); - expect(format('# ?/8', -12.34, '# ?/8')).toBe('-12 3/8'); - expect(format('# ?/8', 123.45, '# ?/8')).toBe('123 4/8'); - expect(format('# ?/8', -123.456, '# ?/8')).toBe('-123 4/8'); - expect(format('# ?/8', 1234.567, '# ?/8')).toBe('1234 5/8'); - expect(format('# ?/8', -1234.5678, '# ?/8')).toBe('-1234 5/8'); - expect(format('# ?/8', 12345.6789, '# ?/8')).toBe('12345 5/8'); - expect(format('# ?/8', -12345.67891, '# ?/8')).toBe('-12345 5/8'); - expect(format('# ??/16', 1, '# ??/16')).toBe('1 '); - expect(format('# ??/16', -1.2, '# ??/16')).toBe('-1 3/16'); - expect(format('# ??/16', 12.3, '# ??/16')).toBe('12 5/16'); - expect(format('# ??/16', -12.34, '# ??/16')).toBe('-12 5/16'); - expect(format('# ??/16', 123.45, '# ??/16')).toBe('123 7/16'); - expect(format('# ??/16', -123.456, '# ??/16')).toBe('-123 7/16'); - expect(format('# ??/16', 1234.567, '# ??/16')).toBe('1234 9/16'); - expect(format('# ??/16', -1234.5678, '# ??/16')).toBe('-1234 9/16'); - expect(format('# ??/16', 12345.6789, '# ??/16')).toBe('12345 11/16'); - expect(format('# ??/16', -12345.67891, '# ??/16')).toBe('-12345 11/16'); - expect(format('# ?/10', 1, '# ?/10')).toBe('1 '); - expect(format('# ?/10', -1.2, '# ?/10')).toBe('-1 2/10'); - expect(format('# ?/10', 12.3, '# ?/10')).toBe('12 3/10'); - expect(format('# ?/10', -12.34, '# ?/10')).toBe('-12 3/10'); - expect(format('# ?/10', 123.45, '# ?/10')).toBe('123 5/10'); - expect(format('# ?/10', -123.456, '# ?/10')).toBe('-123 5/10'); - expect(format('# ?/10', 1234.567, '# ?/10')).toBe('1234 6/10'); - expect(format('# ?/10', -1234.5678, '# ?/10')).toBe('-1234 6/10'); - expect(format('# ?/10', 12345.6789, '# ?/10')).toBe('12345 7/10'); - expect(format('# ?/10', -12345.67891, '# ?/10')).toBe('-12345 7/10'); - expect(format('# ??/100', 1, '# ??/100')).toBe('1 '); - expect(format('# ??/100', -1.2, '# ??/100')).toBe('-1 20/100'); - expect(format('# ??/100', 12.3, '# ??/100')).toBe('12 30/100'); - expect(format('# ??/100', -12.34, '# ??/100')).toBe('-12 34/100'); - expect(format('# ??/100', 123.45, '# ??/100')).toBe('123 45/100'); - expect(format('# ??/100', -123.456, '# ??/100')).toBe('-123 46/100'); - expect(format('# ??/100', 1234.567, '# ??/100')).toBe('1234 57/100'); - expect(format('# ??/100', -1234.5678, '# ??/100')).toBe('-1234 57/100'); - expect(format('# ??/100', 12345.6789, '# ??/100')).toBe('12345 68/100'); - expect(format('# ??/100', -12345.67891, '# ??/100')).toBe('-12345 68/100'); - expect(format('??/??', 1, '??/??')).toBe(' 1/1 '); - expect(format('??/??', -1.2, '??/??')).toBe('- 6/5 '); - expect(format('??/??', 12.3, '??/??')).toBe('123/10'); - expect(format('??/??', -12.34, '??/??')).toBe('-617/50'); - expect(format('??/??', 123.45, '??/??')).toBe('2469/20'); - expect(format('??/??', -123.456, '??/??')).toBe('-7037/57'); - expect(format('??/??', 1234.567, '??/??')).toBe('119753/97'); - expect(format('??/??', -1234.5678, '??/??')).toBe('-100000/81'); - expect(format('??/??', 12345.6789, '??/??')).toBe('1000000/81'); - expect(format('??/??', -12345.67891, '??/??')).toBe('-1000000/81'); - expect(format('# ?/?', 0.3, '# ?/?')).toBe(' 2/7'); - expect(format('# ?/?', 1.3, '# ?/?')).toBe('1 1/3'); - expect(format('# ?/?', 2.3, '# ?/?')).toBe('2 2/7'); - expect(format('# ??/?????????', 0.123251512342345, '# ??/?????????')).toBe(' 480894/3901729 '); - expect(format('# ?? / ?????????', 0.123251512342345, '# ?? / ?????????')).toBe(' 480894 / 3901729 '); - expect(format('0', 0, '0')).toBe('0'); + expect(format('# ?/?', 1)).toBe('1 '); + expect(format('# ?/?', -1.2)).toBe('-1 1/5'); + expect(format('# ?/?', 12.3)).toBe('12 1/3'); + expect(format('# ?/?', -12.34)).toBe('-12 1/3'); + expect(format('# ?/?', 123.45)).toBe('123 4/9'); + expect(format('# ?/?', -123.456)).toBe('-123 1/2'); + expect(format('# ?/?', 1234.567)).toBe('1234 4/7'); + expect(format('# ?/?', -1234.5678)).toBe('-1234 4/7'); + expect(format('# ?/?', 12345.6789)).toBe('12345 2/3'); + expect(format('# ?/?', -12345.67891)).toBe('-12345 2/3'); + expect(format('# ??/??', 1)).toBe('1 '); + expect(format('# ??/??', -1.2)).toBe('-1 1/5 '); + expect(format('# ??/??', 12.3)).toBe('12 3/10'); + expect(format('# ??/??', -12.34)).toBe('-12 17/50'); + expect(format('# ??/??', 123.45)).toBe('123 9/20'); + expect(format('# ??/??', -123.456)).toBe('-123 26/57'); + expect(format('# ??/??', 1234.567)).toBe('1234 55/97'); + expect(format('# ??/??', -1234.5678)).toBe('-1234 46/81'); + expect(format('# ??/??', 12345.6789)).toBe('12345 55/81'); + expect(format('# ??/??', -12345.67891)).toBe('-12345 55/81'); + expect(format('# ???/???', 1)).toBe('1 '); + expect(format('# ???/???', -1.2)).toBe('-1 1/5 '); + expect(format('# ???/???', 12.3)).toBe('12 3/10 '); + expect(format('# ???/???', -12.34)).toBe('-12 17/50 '); + expect(format('# ???/???', 123.45)).toBe('123 9/20 '); + expect(format('# ???/???', -123.456)).toBe('-123 57/125'); + expect(format('# ???/???', 1234.567)).toBe('1234 55/97 '); + expect(format('# ???/???', -1234.5678)).toBe('-1234 67/118'); + expect(format('# ???/???', 12345.6789)).toBe('12345 74/109'); + expect(format('# ???/???', -12345.67891)).toBe('-12345 573/844'); + expect(format('# ?/2', 1)).toBe('1 '); + expect(format('# ?/2', -1.2)).toBe('-1 '); + expect(format('# ?/2', 12.3)).toBe('12 1/2'); + expect(format('# ?/2', -12.34)).toBe('-12 1/2'); + expect(format('# ?/2', 123.45)).toBe('123 1/2'); + expect(format('# ?/2', -123.456)).toBe('-123 1/2'); + expect(format('# ?/2', 1234.567)).toBe('1234 1/2'); + expect(format('# ?/2', -1234.5678)).toBe('-1234 1/2'); + expect(format('# ?/2', 12345.6789)).toBe('12345 1/2'); + expect(format('# ?/2', -12345.67891)).toBe('-12345 1/2'); + expect(format('# ?/4', 1)).toBe('1 '); + expect(format('# ?/4', -1.2)).toBe('-1 1/4'); + expect(format('# ?/4', 12.3)).toBe('12 1/4'); + expect(format('# ?/4', -12.34)).toBe('-12 1/4'); + expect(format('# ?/4', 123.45)).toBe('123 2/4'); + expect(format('# ?/4', -123.456)).toBe('-123 2/4'); + expect(format('# ?/4', 1234.567)).toBe('1234 2/4'); + expect(format('# ?/4', -1234.5678)).toBe('-1234 2/4'); + expect(format('# ?/4', 12345.6789)).toBe('12345 3/4'); + expect(format('# ?/4', -12345.67891)).toBe('-12345 3/4'); + expect(format('# ?/8', 1)).toBe('1 '); + expect(format('# ?/8', -1.2)).toBe('-1 2/8'); + expect(format('# ?/8', 12.3)).toBe('12 2/8'); + expect(format('# ?/8', -12.34)).toBe('-12 3/8'); + expect(format('# ?/8', 123.45)).toBe('123 4/8'); + expect(format('# ?/8', -123.456)).toBe('-123 4/8'); + expect(format('# ?/8', 1234.567)).toBe('1234 5/8'); + expect(format('# ?/8', -1234.5678)).toBe('-1234 5/8'); + expect(format('# ?/8', 12345.6789)).toBe('12345 5/8'); + expect(format('# ?/8', -12345.67891)).toBe('-12345 5/8'); + expect(format('# ??/16', 1)).toBe('1 '); + expect(format('# ??/16', -1.2)).toBe('-1 3/16'); + expect(format('# ??/16', 12.3)).toBe('12 5/16'); + expect(format('# ??/16', -12.34)).toBe('-12 5/16'); + expect(format('# ??/16', 123.45)).toBe('123 7/16'); + expect(format('# ??/16', -123.456)).toBe('-123 7/16'); + expect(format('# ??/16', 1234.567)).toBe('1234 9/16'); + expect(format('# ??/16', -1234.5678)).toBe('-1234 9/16'); + expect(format('# ??/16', 12345.6789)).toBe('12345 11/16'); + expect(format('# ??/16', -12345.67891)).toBe('-12345 11/16'); + expect(format('# ?/10', 1)).toBe('1 '); + expect(format('# ?/10', -1.2)).toBe('-1 2/10'); + expect(format('# ?/10', 12.3)).toBe('12 3/10'); + expect(format('# ?/10', -12.34)).toBe('-12 3/10'); + expect(format('# ?/10', 123.45)).toBe('123 5/10'); + expect(format('# ?/10', -123.456)).toBe('-123 5/10'); + expect(format('# ?/10', 1234.567)).toBe('1234 6/10'); + expect(format('# ?/10', -1234.5678)).toBe('-1234 6/10'); + expect(format('# ?/10', 12345.6789)).toBe('12345 7/10'); + expect(format('# ?/10', -12345.67891)).toBe('-12345 7/10'); + expect(format('# ??/100', 1)).toBe('1 '); + expect(format('# ??/100', -1.2)).toBe('-1 20/100'); + expect(format('# ??/100', 12.3)).toBe('12 30/100'); + expect(format('# ??/100', -12.34)).toBe('-12 34/100'); + expect(format('# ??/100', 123.45)).toBe('123 45/100'); + expect(format('# ??/100', -123.456)).toBe('-123 46/100'); + expect(format('# ??/100', 1234.567)).toBe('1234 57/100'); + expect(format('# ??/100', -1234.5678)).toBe('-1234 57/100'); + expect(format('# ??/100', 12345.6789)).toBe('12345 68/100'); + expect(format('# ??/100', -12345.67891)).toBe('-12345 68/100'); + expect(format('??/??', 1)).toBe(' 1/1 '); + expect(format('??/??', -1.2)).toBe('- 6/5 '); + expect(format('??/??', 12.3)).toBe('123/10'); + expect(format('??/??', -12.34)).toBe('-617/50'); + expect(format('??/??', 123.45)).toBe('2469/20'); + expect(format('??/??', -123.456)).toBe('-7037/57'); + expect(format('??/??', 1234.567)).toBe('119753/97'); + expect(format('??/??', -1234.5678)).toBe('-100000/81'); + expect(format('??/??', 12345.6789)).toBe('1000000/81'); + expect(format('??/??', -12345.67891)).toBe('-1000000/81'); + expect(format('# ?/?', 0.3)).toBe(' 2/7'); + expect(format('# ?/?', 1.3)).toBe('1 1/3'); + expect(format('# ?/?', 2.3)).toBe('2 2/7'); + expect(format('# ??/?????????', 0.123251512342345)).toBe(' 480894/3901729 '); + expect(format('# ?? / ?????????', 0.123251512342345)).toBe(' 480894 / 3901729 '); + expect(format('0', 0)).toBe('0'); }); test('More fraction cases', () => { diff --git a/test/ssf-oddities.spec.ts b/test/ssf-oddities.spec.ts index 20a6ac2..b9398a7 100644 --- a/test/ssf-oddities.spec.ts +++ b/test/ssf-oddities.spec.ts @@ -46,7 +46,7 @@ test('Oddity: [Blue]General', () => { }); test('Oddity: [Blue]G3neral', () => { - expect(() => format('[Blue]G3neral', '', 0)).toThrow(); + expect(() => format('[Blue]G3neral', '')).toThrow(); }); test('Oddity: A"TODO"', () => { @@ -240,7 +240,7 @@ test('Oddity: [hhh]', () => { }); test('Oddity: [', () => { - expect(() => format('['), '[').toThrow(); + expect(() => format('[', 0), '[').toThrow(); }); test('Oddity: A/P', () => { @@ -589,5 +589,5 @@ test('Oddity: hh:mm:ss am/p', () => { }); test('Oddity: "foo";"bar";"baz";"qux";"foobar"', () => { - expect(() => format('"foo";"bar";"baz";"qux";"foobar"'), '"foo";"bar";"baz";"qux";"foobar"').toThrow(); + expect(() => format('"foo";"bar";"baz";"qux";"foobar"', 0), '"foo";"bar";"baz";"qux";"foobar"').toThrow(); }); diff --git a/test/ssf-times.spec.ts b/test/ssf-times.spec.ts index 9ae8773..9816bf5 100644 --- a/test/ssf-times.spec.ts +++ b/test/ssf-times.spec.ts @@ -2,7 +2,7 @@ import { describe } from 'vitest'; import { runTable } from './utils.ts'; // -- running the full table takes a while -const FULL = false; +const FULL = true; describe('SSF table: tables/ssf-times.tsv', () => { runTable( diff --git a/test/text.spec.ts b/test/text.spec.ts index 2f7c020..a8ad8dd 100644 --- a/test/text.spec.ts +++ b/test/text.spec.ts @@ -3,7 +3,7 @@ import { format } from '../lib/index.ts'; test('Errors', () => { // no more than a single text section - expect(() => format('@;@'), '@;@').toThrow(); + expect(() => format('@;@', 0), '@;@').toThrow(); }); test('Repeated @ in same pattern', () => { diff --git a/tsconfig.json b/tsconfig.json index f36fa8d..2bee658 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -15,6 +15,7 @@ "forceConsistentCasingInFileNames": true, "verbatimModuleSyntax": true, "erasableSyntaxOnly": true, + "strict": true, "allowJs": true, "checkJs": true, "stripInternal": true, From 0237cc7f00eebd53bd9cabfb2daa6296268e14f7 Mon Sep 17 00:00:00 2001 From: Borgar Date: Fri, 28 Aug 2026 09:59:24 +0000 Subject: [PATCH 06/14] Clean up a few minor things --- lib/formatInfo.ts | 4 ---- lib/isValidDate.ts | 26 ++++++++++++++++++++++ lib/pad.ts | 1 - lib/parseValue.ts | 29 +----------------------- lib/runPart.ts | 55 ++++++++++++++++++---------------------------- 5 files changed, 48 insertions(+), 67 deletions(-) create mode 100644 lib/isValidDate.ts diff --git a/lib/formatInfo.ts b/lib/formatInfo.ts index 7e1424b..7881b6d 100644 --- a/lib/formatInfo.ts +++ b/lib/formatInfo.ts @@ -113,19 +113,15 @@ export function info (partitions: Partition[], currencyId?: string): FormatInfo // So: "mmm dd yyyy" matches "mdy" = D4 // But: "mmm dd dd yyyy" matches "md" = D5 partPos.tokens.forEach(tok => { - // XXX: can we not detemine this by token.date && token.size? const type = tok.type; - // 'year' || 'year-short' || 'b-year' || 'b-year-short' if (type === T_TYPE_YEAR || type === T_TYPE_YEAR_S || type === T_TYPE_B_YEAR || type === T_TYPE_B_YEAR_S) { order += 'Y'; haveDate++; } - // 'month' || 'monthname-single' || 'monthname-short' || 'monthname' else if (type === T_TYPE_MON || type === T_TYPE_MNAME || type === T_TYPE_MNAME_S || type === T_TYPE_MNAME_1) { order += 'M'; haveDate++; } - // 'weekday-short' || 'weekday' || 'day' else if (type === T_TYPE_WEEKDAY || type === T_TYPE_WEEKDAY_S || type === T_TYPE_DAY) { order += 'D'; haveDate++; diff --git a/lib/isValidDate.ts b/lib/isValidDate.ts new file mode 100644 index 0000000..22d603d --- /dev/null +++ b/lib/isValidDate.ts @@ -0,0 +1,26 @@ +export function isValidDate (y: number, m: number, d: number) { + // day can't be 0 + if (d < 1) { + return false; + } + // month must be 1-12 + if (m < 1 || m > 12) { + return false; + } + // february + if (m === 2) { + const isLeapYear = (((y % 4 === 0) && (y % 100 !== 0)) || (y % 400 === 0)); + // 1900 is a leap year in Excel + const febDays = (isLeapYear || y === 1900) ? 29 : 28; + if (d > febDays) { + return false; + } + } + // test any other month + else if ( + ((m === 4 || m === 6 || m === 9 || m === 11) && d > 30) || + ((m === 1 || m === 3 || m === 5 || m === 7 || m === 8 || m === 10 || m === 12) && d > 31)) { + return false; + } + return true; +} diff --git a/lib/pad.ts b/lib/pad.ts index 3af0463..384ba57 100644 --- a/lib/pad.ts +++ b/lib/pad.ts @@ -11,6 +11,5 @@ export function pad (c: string, nbsp = false): string { else if (c === '?') { return nbsp ? '\u00a0' : ' '; } - // if (c === '#') return ''; } diff --git a/lib/parseValue.ts b/lib/parseValue.ts index d9619ba..def7f56 100644 --- a/lib/parseValue.ts +++ b/lib/parseValue.ts @@ -1,4 +1,5 @@ import { currencySymbols, reCurrencySymbols } from './constants.ts'; +import { isValidDate } from './isValidDate.ts'; import { defaultLocale, getLocale } from './locale.ts'; /** @@ -357,34 +358,6 @@ export function parseNumber (value: string, options: { locale?: string; } = {}): return ret; } -// XXX: move to own file -export function isValidDate (y: number, m: number, d: number) { - // day can't be 0 - if (d < 1) { - return false; - } - // month must be 1-12 - if (m < 1 || m > 12) { - return false; - } - // february - if (m === 2) { - const isLeapYear = (((y % 4 === 0) && (y % 100 !== 0)) || (y % 400 === 0)); - // 1900 is a leap year in Excel - const febDays = (isLeapYear || y === 1900) ? 29 : 28; - if (d > febDays) { - return false; - } - } - // test any other month - else if ( - ((m === 4 || m === 6 || m === 9 || m === 11) && d > 30) || - ((m === 1 || m === 3 || m === 5 || m === 7 || m === 8 || m === 10 || m === 12) && d > 31)) { - return false; - } - return true; -} - // should really match { ’' } and all whitespace const matchRec = ( str: string, diff --git a/lib/runPart.ts b/lib/runPart.ts index 392fa22..52283d0 100644 --- a/lib/runPart.ts +++ b/lib/runPart.ts @@ -52,6 +52,8 @@ import type { Partition } from './types.ts'; import type { FormatOptions } from './options.ts'; const DAYSIZE = 86400; +const CHAR_0 = 48; +const CHAR_9 = 57; const dateOverflows = (inputValue: number, roundedValue: number, bigRange: boolean) => { if (bigRange) { @@ -266,38 +268,27 @@ export function runPart (value: number | string | bigint, part: Partition, opts: const tok = part.tokens[ti]; const tokenType = tok.type; const len = 'num' in tok ? tok.num.length : 0; - if (tokenType === TOKEN_STRING) { // special rules may apply if next or prev is numerator or denominator - if (tok.rule) { - if (tok.rule === 'num') { - if (have_fraction) { - ret.push(tok.value.replace(/ /g, padQ)); - } - else if (part.num_min > 0 || part.den_min > 0) { - // FIXME: ret.push(''.repeat(tok.value.length)) - ret.push(tok.value.replace(/./g, padQ)); - } - } - else if (tok.rule === 'num+int') { - if (have_fraction && integer) { - ret.push(tok.value.replace(/ /g, padQ)); - } - else if ((part.den_min > 0) && (integer || part.num_min)) { - ret.push(tok.value.replace(/./g, padQ)); - } + const rule = tok.rule; + if (rule) { + if ( + (rule === 'num' && have_fraction) || + (rule === 'num+int' && have_fraction && integer) || + (rule === 'den' && have_fraction) + ) { + ret.push(tok.value.replaceAll(' ', padQ)); } - else if (tok.rule === 'den') { - if (have_fraction) { - ret.push(tok.value.replace(/ /g, padQ)); - } - else if (part.den_min > 0 || part.den_min > 0) { - ret.push(tok.value.replace(/./g, padQ)); - } + else if ( + (rule === 'num' && part.num_min > 0 || part.den_min > 0) || + (rule === 'num+int' && part.den_min > 0 && (integer || part.num_min)) || + (rule === 'den' && part.den_min > 0 || part.den_min > 0) + ) { + ret.push(padQ.repeat(tok.value.length)); } } else { - ret.push(tok.value.replace(/ /g, padQ)); + ret.push(tok.value.replaceAll(' ', padQ)); } } else if (tokenType === TOKEN_SPACE) { @@ -429,25 +420,21 @@ export function runPart (value: number | string | bigint, part: Partition, opts: for (let i = 0; i < len; i++) { let digit = denominator[i + o]; if (!digit) { - // XXX: use charCodes - const ch = tok.num[i]; - if ( - '123456789'.includes(ch) || - (denominator_fixed && ch === '0') - ) { + const c = tok.num.charCodeAt(i); + if ((c > CHAR_0 && c <= CHAR_9) || (denominator_fixed && c === CHAR_0)) { denominator_fixed = true; digit = opts.nbsp ? '\u00a0' : ' '; } else if ( !denominator_fixed && (i === len - 1) && - ch === '0' && + c === CHAR_0 && !denominator ) { digit = '1'; } else { - digit = pad(ch, opts.nbsp); + digit = pad(tok.num[i], opts.nbsp); } } ret.push(digit); From 01eac2cfc6f1135d1e89874b666874de278496cf Mon Sep 17 00:00:00 2001 From: Borgar Date: Fri, 28 Aug 2026 14:47:10 +0000 Subject: [PATCH 07/14] Use typedoc to generate docs --- package-lock.json | 3501 ++++++++++++++++++++++++++++++++++++++++++--- package.json | 8 +- tsd.json | 12 - typedoc.json | 35 + 4 files changed, 3345 insertions(+), 211 deletions(-) delete mode 100644 tsd.json create mode 100644 typedoc.json diff --git a/package-lock.json b/package-lock.json index 7e86357..59bf559 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,15 +12,16 @@ "@babel/core": "^7.29.7", "@babel/preset-env": "~7.29.7", "@borgar/eslint-config": "~4.1.0", - "@borgar/jsdoc-tsmd": "~0.2.2", "@eslint/js": "~10.0.1", "@rollup/plugin-babel": "~7.1.0", "@rollup/plugin-terser": "~1.0.0", "@types/node": "~26.3.0", + "concat-md": "~0.5.1", "eslint": "~10.9.1", "globals": "~17.11.0", "jsdoc": "~4.0.5", "rollup": "~4.62.5", + "typedoc": "~0.28.20", "typedoc-plugin-markdown": "~4.12.0", "typescript": "~5.9.3", "typescript-eslint": "~8.68.0", @@ -1575,33 +1576,6 @@ "@stylistic/eslint-plugin": "~5.9.0" } }, - "node_modules/@borgar/jsdoc-tsmd": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/@borgar/jsdoc-tsmd/-/jsdoc-tsmd-0.2.2.tgz", - "integrity": "sha512-UVp9dUYruKXxW8MIu4iv3ltbv+BbOMcJOeWPGYH6TyP3+muzRlxmp+zgqvZ0g13asmrQeHuLzmxOIG/2FL6Dqw==", - "dev": true, - "dependencies": { - "jsdoctypeparser": "~9.0.0", - "typescript": "~5.1.3" - }, - "peerDependencies": { - "jsdoc": "~4.0.2" - } - }, - "node_modules/@borgar/jsdoc-tsmd/node_modules/typescript": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz", - "integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, "node_modules/@eslint-community/eslint-utils": { "version": "4.9.1", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz", @@ -1775,7 +1749,6 @@ "integrity": "sha512-bEMORlG0cqdjVyCEuU0cDQbORWX+kYCeo0kV1lbxF5bt4r7SID2l9bqsxJEM0zndaxpOUT7riCyIVEuqq/Ynxg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@shikijs/engine-oniguruma": "^3.23.0", "@shikijs/langs": "^3.23.0", @@ -1926,6 +1899,44 @@ "node": "^22.20 || ^24.12 || >=25" } }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/@oxc-project/types": { "version": "0.146.0", "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.146.0.tgz", @@ -2684,7 +2695,6 @@ "integrity": "sha512-1nWINwKXxKKLqPibT5f4pAFLej9oZzQTsby8942OTlsJzOBZ0MWKiwzMsd+jhzu8YPCHAswGnnN1YtQfirL35g==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@shikijs/types": "3.23.0", "@shikijs/vscode-textmate": "^10.0.2" @@ -2696,7 +2706,6 @@ "integrity": "sha512-2Ep4W3Re5aB1/62RSYQInK9mM3HsLeB91cHqznAJMuylqjzNVAVCMnNWRHFtcNHXsoNRayP9z1qj4Sq3nMqYXg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@shikijs/types": "3.23.0" } @@ -2707,7 +2716,6 @@ "integrity": "sha512-5qySYa1ZgAT18HR/ypENL9cUSGOeI2x+4IvYJu4JgVJdizn6kG4ia5Q1jDEOi7gTbN4RbuYtmHh0W3eccOrjMA==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@shikijs/types": "3.23.0" } @@ -2718,7 +2726,6 @@ "integrity": "sha512-3JZ5HXOZfYjsYSk0yPwBrkupyYSLpAE26Qc0HLghhZNGTZg/SKxXIIgoxOpmmeQP0RRSDJTk1/vPfw9tbw+jSQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4" @@ -2729,8 +2736,7 @@ "resolved": "https://registry.npmjs.org/@shikijs/vscode-textmate/-/vscode-textmate-10.0.2.tgz", "integrity": "sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/@standard-schema/spec": { "version": "1.1.0", @@ -2773,6 +2779,32 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/@textlint/ast-node-types": { + "version": "15.8.0", + "resolved": "https://registry.npmjs.org/@textlint/ast-node-types/-/ast-node-types-15.8.0.tgz", + "integrity": "sha512-5CiH9COYmovWmExQgs7763DzX6Gy9zjkjJ7JxCC95wyTcjwQn/8poNF6fv3qzRlmx8CRRde8DHr9FcgAAiPzgw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@textlint/markdown-to-ast": { + "version": "15.8.0", + "resolved": "https://registry.npmjs.org/@textlint/markdown-to-ast/-/markdown-to-ast-15.8.0.tgz", + "integrity": "sha512-gWOcd2+UCqODMLGIIY5WiPE9zmR9L4aut3FIkxH8gSCiZ6EVkBaU2mgm+8KiGOjJqdtT98xkWocCwDtQ1kypOQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@textlint/ast-node-types": "15.8.0", + "debug": "^4.4.3", + "mdast-util-gfm-autolink-literal": "^0.1.3", + "neotraverse": "^0.6.18", + "remark-footnotes": "^3.0.0", + "remark-frontmatter": "^3.0.0", + "remark-gfm": "^1.0.0", + "remark-parse": "^9.0.0", + "structured-source": "^4.0.0", + "unified": "^9.2.2" + } + }, "node_modules/@types/chai": { "version": "5.2.3", "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz", @@ -2811,7 +2843,6 @@ "integrity": "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@types/unist": "*" } @@ -2839,12 +2870,36 @@ "@types/mdurl": "^2" } }, + "node_modules/@types/mdast": { + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "^2" + } + }, + "node_modules/@types/mdast/node_modules/@types/unist": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", + "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/mdurl": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-2.0.0.tgz", "integrity": "sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg==", "dev": true }, + "node_modules/@types/minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/node": { "version": "26.3.0", "resolved": "https://registry.npmjs.org/@types/node/-/node-26.3.0.tgz", @@ -2855,13 +2910,19 @@ "undici-types": "~8.3.0" } }, + "node_modules/@types/normalize-package-data": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz", + "integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/unist": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "8.68.0", @@ -3321,12 +3382,43 @@ "url": "https://github.com/sponsors/epoberezkin" } }, + "node_modules/anchor-markdown-header": { + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/anchor-markdown-header/-/anchor-markdown-header-0.8.4.tgz", + "integrity": "sha512-20eMBMpts7k5rXAAj67geSqc/tsexHZOZJDWQD214YcDuNtyizDa7Q77sYa5rkao2FwsQP1WKRt2X6mphwmhbg==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "~10.6.0", + "remove-markdown": "^0.6.2" + } + }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/assertion-error": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", @@ -3379,6 +3471,17 @@ "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" } }, + "node_modules/bail": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/bail/-/bail-1.0.5.tgz", + "integrity": "sha512-xFbRxM1tahm08yHBP16MMjVUAvDaBMD38zsM9EMAUN61omwLmKlOpB/Zku5QkjZ8TZ4vn53pj+t518cH0S03RQ==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/baseline-browser-mapping": { "version": "2.9.19", "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.9.19.tgz", @@ -3395,6 +3498,26 @@ "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", "dev": true }, + "node_modules/boundary": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/boundary/-/boundary-2.0.0.tgz", + "integrity": "sha512-rJKn5ooC9u8q13IMCrW0RSp31pxBCHE3y9V/tp3TdWSLf8Em3p6Di4NBpfzbJge9YjjFEsD0RtFEjtvHL5VyEA==", + "dev": true, + "license": "BSD-2-Clause" + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/browserslist": { "version": "4.28.1", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.1.tgz", @@ -3435,6 +3558,34 @@ "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "dev": true }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase-keys": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz", + "integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "camelcase": "^5.3.1", + "map-obj": "^4.0.0", + "quick-lru": "^4.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/caniuse-lite": { "version": "1.0.30001769", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001769.tgz", @@ -3468,6 +3619,17 @@ "node": ">= 10" } }, + "node_modules/ccount": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ccount/-/ccount-1.1.0.tgz", + "integrity": "sha512-vlNK021QdI7PNeiUh/lKkC/mNHHfV0m/Ad5JoI0TYtlBnJAslM/JIkm/tGC88bkLIwO6OQ5uV6ztS6kVAtCDlg==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/chai": { "version": "6.2.2", "resolved": "https://registry.npmjs.org/chai/-/chai-6.2.2.tgz", @@ -3478,12 +3640,66 @@ "node": ">=18" } }, + "node_modules/character-entities": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz", + "integrity": "sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-entities-legacy": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz", + "integrity": "sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-reference-invalid": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz", + "integrity": "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "dev": true }, + "node_modules/concat-md": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/concat-md/-/concat-md-0.5.1.tgz", + "integrity": "sha512-iZr6yxlwPQ5IZup2mvqgm+JI0jnu5yGkND2ra5DinBtcevDQPQiAGpf4RXOnor1UpKBUydqegDLfPY8b+FfI+Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "doctoc": "^2.2.1", + "front-matter": "^4.0.2", + "globby": "^11.1.0", + "lodash.startcase": "^4.4.0", + "meow": "^9.0.0", + "transform-markdown-links": "^2.0.0" + }, + "bin": { + "concat-md": "dist/bin/concat-md.js" + }, + "engines": { + "node": ">=10.8.0" + } + }, "node_modules/convert-source-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", @@ -3536,6 +3752,43 @@ } } }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/decamelize-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.1.tgz", + "integrity": "sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==", + "dev": true, + "license": "MIT", + "dependencies": { + "decamelize": "^1.1.0", + "map-obj": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/decamelize-keys/node_modules/map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", @@ -3552,6 +3805,105 @@ "node": ">=8" } }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/doctoc": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/doctoc/-/doctoc-2.5.0.tgz", + "integrity": "sha512-xWb2P8mQw9x+T9xPYToytRP0/bA68oexdsY0anMG72RdhZGTVPx6oHJfI57gbZe9LsOSfQUNNLwxSspdoTlJIQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@textlint/markdown-to-ast": "^15.6.0", + "anchor-markdown-header": "^0.8.4", + "htmlparser2": "^7.2.0", + "loglevel": "^1.9.2", + "minimist": "^1.2.6" + }, + "bin": { + "doctoc": "doctoc.js" + } + }, + "node_modules/dom-serializer": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz", + "integrity": "sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==", + "dev": true, + "license": "MIT", + "dependencies": { + "domelementtype": "^2.0.1", + "domhandler": "^4.2.0", + "entities": "^2.0.0" + }, + "funding": { + "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" + } + }, + "node_modules/dom-serializer/node_modules/entities": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", + "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", + "dev": true, + "license": "BSD-2-Clause", + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "license": "BSD-2-Clause" + }, + "node_modules/domhandler": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.1.tgz", + "integrity": "sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "domelementtype": "^2.2.0" + }, + "engines": { + "node": ">= 4" + }, + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" + } + }, + "node_modules/domutils": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", + "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "dom-serializer": "^1.0.1", + "domelementtype": "^2.2.0", + "domhandler": "^4.2.0" + }, + "funding": { + "url": "https://github.com/fb55/domutils?sponsor=1" + } + }, "node_modules/electron-to-chromium": { "version": "1.5.286", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.286.tgz", @@ -3559,6 +3911,13 @@ "dev": true, "license": "ISC" }, + "node_modules/emoji-regex": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", + "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", + "dev": true, + "license": "MIT" + }, "node_modules/entities": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", @@ -3571,6 +3930,16 @@ "url": "https://github.com/fb55/entities?sponsor=1" } }, + "node_modules/error-ex": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.4.tgz", + "integrity": "sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, "node_modules/es-module-lexer": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.3.2.tgz", @@ -3588,15 +3957,28 @@ "node": ">=6" } }, - "node_modules/eslint": { - "version": "10.9.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.9.1.tgz", - "integrity": "sha512-9VaAkDURekixUQJy0oJYl2DcN6oKMfxay7XzaGYAWQwsb6qfKf+x76R2k1L8kb1boc+FyCAaTA9GmiKaaiaF+A==", + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, "license": "MIT", - "workspaces": [ - "packages/*" - ], + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.9.1.tgz", + "integrity": "sha512-9VaAkDURekixUQJy0oJYl2DcN6oKMfxay7XzaGYAWQwsb6qfKf+x76R2k1L8kb1boc+FyCAaTA9GmiKaaiaF+A==", + "dev": true, + "license": "MIT", + "workspaces": [ + "packages/*" + ], "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.2", @@ -3702,18 +4084,6 @@ "node": "20 || >=22" } }, - "node_modules/eslint/node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/eslint/node_modules/eslint-visitor-keys": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz", @@ -3779,6 +4149,20 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/esquery": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz", @@ -3840,6 +4224,13 @@ "node": ">=12.0.0" } }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true, + "license": "MIT" + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -3847,6 +4238,36 @@ "dev": true, "license": "MIT" }, + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -3860,6 +4281,30 @@ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true }, + "node_modules/fastq": { + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.20.2.tgz", + "integrity": "sha512-UpGiiODyCGprM8EPP6JodP6jC9Rws6TCuiDOD+nn0CJhR8guI3g/ozo4ugL0vJ+Yz1UtJuuRPqvQuybVOF1VQA==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fault": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/fault/-/fault-1.0.4.tgz", + "integrity": "sha512-CJ0HCB5tL5fYTEA7ToAq5+kTwd++Borf1/bifxd9iT70QcXr4MRrO3Llf8Ifs70q+SJcGHFtnIE/Nw6giCtECA==", + "dev": true, + "license": "MIT", + "dependencies": { + "format": "^0.2.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/file-entry-cache": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", @@ -3873,6 +4318,19 @@ "node": ">=16.0.0" } }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -3889,15 +4347,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/find-up/node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/flat-cache": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", @@ -3919,6 +4368,25 @@ "dev": true, "license": "ISC" }, + "node_modules/format": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/format/-/format-0.2.2.tgz", + "integrity": "sha512-wzsgA6WOq+09wrU1tsJ09udeR/YZRaeArL9e1wPbFg3GG2yDnC2ldKpxs4xunpFF9DgqCqOIra3bc1HWrJ37Ww==", + "dev": true, + "engines": { + "node": ">=0.4.x" + } + }, + "node_modules/front-matter": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/front-matter/-/front-matter-4.0.2.tgz", + "integrity": "sha512-I8ZuJ/qG92NWX8i5x1Y8qyj3vizhXS31OxjKDu3LKP+7/qBgfIKValiZIEwoVoJKUHlhWtYrktkxV1XsX+pPlg==", + "dev": true, + "license": "MIT", + "dependencies": { + "js-yaml": "^3.13.1" + } + }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", @@ -3976,12 +4444,43 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, + "node_modules/hard-rejection": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz", + "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/hasown": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz", @@ -3995,6 +4494,72 @@ "node": ">= 0.4" } }, + "node_modules/hosted-git-info": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", + "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", + "dev": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/hosted-git-info/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/hosted-git-info/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true, + "license": "ISC" + }, + "node_modules/htmlparser2": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-7.2.0.tgz", + "integrity": "sha512-H7MImA4MS6cw7nbyURtLPO1Tms7C5H602LRETv95z1MxO/7CP7rDVROehUYeYBUYEON94NXXDEPmZuq+hX4sog==", + "dev": true, + "funding": [ + "https://github.com/fb55/htmlparser2?sponsor=1", + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "license": "MIT", + "dependencies": { + "domelementtype": "^2.0.1", + "domhandler": "^4.2.2", + "domutils": "^2.8.0", + "entities": "^3.0.1" + } + }, + "node_modules/htmlparser2/node_modules/entities": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-3.0.1.tgz", + "integrity": "sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, "node_modules/ignore": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", @@ -4014,6 +4579,73 @@ "node": ">=0.8.19" } }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-alphabetical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz", + "integrity": "sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-alphanumerical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz", + "integrity": "sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-alphabetical": "^1.0.0", + "is-decimal": "^1.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true, + "license": "MIT" + }, + "node_modules/is-buffer": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", + "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/is-core-module": { "version": "2.16.2", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.2.tgz", @@ -4030,6 +4662,17 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-decimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz", + "integrity": "sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -4051,6 +4694,37 @@ "node": ">=0.10.0" } }, + "node_modules/is-hexadecimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz", + "integrity": "sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -4063,6 +4737,30 @@ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true }, + "node_modules/js-yaml": { + "version": "3.15.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.15.2.tgz", + "integrity": "sha512-6EuL879VkRA+1Cz578mKMiKvjPNEuk6+r1JaFzoSWejZmtf7xWbIyw1e3KkxlkzTIt9Taw6JBhEppG7utc1P+w==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/js-yaml/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, "node_modules/js2xmlparser": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-4.0.2.tgz", @@ -4111,18 +4809,6 @@ "node": ">=8" } }, - "node_modules/jsdoctypeparser": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/jsdoctypeparser/-/jsdoctypeparser-9.0.0.tgz", - "integrity": "sha512-jrTA2jJIL6/DAEILBEh2/w9QxCuwmvNXIry39Ay/HVfhE3o2yVV0U44blYkqdHA/OKloJEqvJy0xU+GSdE2SIw==", - "dev": true, - "bin": { - "jsdoctypeparser": "bin/jsdoctypeparser" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/jsesc": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", @@ -4143,6 +4829,13 @@ "dev": true, "license": "MIT" }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true, + "license": "MIT" + }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -4178,6 +4871,16 @@ "json-buffer": "3.0.1" } }, + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/klaw": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/klaw/-/klaw-3.0.0.tgz", @@ -4473,6 +5176,13 @@ "url": "https://opencollective.com/parcel" } }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true, + "license": "MIT" + }, "node_modules/linkify-it": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.2.tgz", @@ -4522,7 +5232,39 @@ "dev": true, "license": "MIT" }, - "node_modules/lru-cache": { + "node_modules/lodash.startcase": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.startcase/-/lodash.startcase-4.4.0.tgz", + "integrity": "sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==", + "dev": true, + "license": "MIT" + }, + "node_modules/loglevel": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.9.2.tgz", + "integrity": "sha512-HgMmCqIJSAKqo68l0rS2AanEWfkxaZ5wNiEFb5ggm08lDs9Xl2KxBlX3PTcaD2chBM1gXAYf491/M2Rv8Jwayg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6.0" + }, + "funding": { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/loglevel" + } + }, + "node_modules/longest-streak": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-2.0.4.tgz", + "integrity": "sha512-vM6rUVCVUJJt33bnmHiZEvr7wPT78ztX7rojL+LW51bHtLh6HTjx84LA5W4+oa6aKEJA7jJu5LR6vQRBpA5DVg==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", @@ -4537,8 +5279,7 @@ "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/magic-string": { "version": "0.30.21", @@ -4550,6 +5291,19 @@ "@jridgewell/sourcemap-codec": "^1.5.5" } }, + "node_modules/map-obj": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz", + "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/markdown-it": { "version": "14.3.0", "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.3.0.tgz", @@ -4588,6 +5342,20 @@ "markdown-it": "*" } }, + "node_modules/markdown-table": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-2.0.0.tgz", + "integrity": "sha512-Ezda85ToJUBhM6WGaG6veasyym+Tbs3cMAw/ZhOPqXiYsr0jgocBV3j3nx+4lk47plLlIqjwuTm/ywVI+zjJ/A==", + "dev": true, + "license": "MIT", + "dependencies": { + "repeat-string": "^1.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/marked": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", @@ -4600,12 +5368,410 @@ "node": ">= 12" } }, + "node_modules/mdast-util-find-and-replace": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/mdast-util-find-and-replace/-/mdast-util-find-and-replace-1.1.1.tgz", + "integrity": "sha512-9cKl33Y21lyckGzpSmEQnIDjEfeeWelN5s1kUW1LwdB0Fkuq2u+4GdqcGEygYxJE8GVqCl0741bYXHgamfWAZA==", + "dev": true, + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^4.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-footnote": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/mdast-util-footnote/-/mdast-util-footnote-0.1.7.tgz", + "integrity": "sha512-QxNdO8qSxqbO2e3m09KwDKfWiLgqyCurdWTQ198NpbZ2hxntdc+VKS4fDJCmNWbAroUdYnSthu+XbZ8ovh8C3w==", + "dev": true, + "license": "MIT", + "dependencies": { + "mdast-util-to-markdown": "^0.6.0", + "micromark": "~2.11.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-from-markdown": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-0.8.5.tgz", + "integrity": "sha512-2hkTXtYYnr+NubD/g6KGBS/0mFmBcifAsI0yIWRiRo0PjVs6SSOSOdtzbp6kSGnShDN6G5aWZpKQ2lWRy27mWQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/mdast": "^3.0.0", + "mdast-util-to-string": "^2.0.0", + "micromark": "~2.11.0", + "parse-entities": "^2.0.0", + "unist-util-stringify-position": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-frontmatter": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/mdast-util-frontmatter/-/mdast-util-frontmatter-0.2.0.tgz", + "integrity": "sha512-FHKL4w4S5fdt1KjJCwB0178WJ0evnyyQr5kXTM3wrOVpytD0hrkvd+AOOjU9Td8onOejCkmZ+HQRT3CZ3coHHQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "micromark-extension-frontmatter": "^0.2.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/mdast-util-gfm/-/mdast-util-gfm-0.1.2.tgz", + "integrity": "sha512-NNkhDx/qYcuOWB7xHUGWZYVXvjPFFd6afg6/e2g+SV4r9q5XUcCbV4Wfa3DLYIiD+xAEZc6K4MGaE/m0KDcPwQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "mdast-util-gfm-autolink-literal": "^0.1.0", + "mdast-util-gfm-strikethrough": "^0.2.0", + "mdast-util-gfm-table": "^0.1.0", + "mdast-util-gfm-task-list-item": "^0.1.0", + "mdast-util-to-markdown": "^0.6.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm-autolink-literal": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-autolink-literal/-/mdast-util-gfm-autolink-literal-0.1.3.tgz", + "integrity": "sha512-GjmLjWrXg1wqMIO9+ZsRik/s7PLwTaeCHVB7vRxUwLntZc8mzmTsLVr6HW1yLokcnhfURsn5zmSVdi3/xWWu1A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ccount": "^1.0.0", + "mdast-util-find-and-replace": "^1.1.0", + "micromark": "^2.11.3" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm-strikethrough": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-strikethrough/-/mdast-util-gfm-strikethrough-0.2.3.tgz", + "integrity": "sha512-5OQLXpt6qdbttcDG/UxYY7Yjj3e8P7X16LzvpX8pIQPYJ/C2Z1qFGMmcw+1PZMUM3Z8wt8NRfYTvCni93mgsgA==", + "dev": true, + "license": "MIT", + "dependencies": { + "mdast-util-to-markdown": "^0.6.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm-table": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-table/-/mdast-util-gfm-table-0.1.6.tgz", + "integrity": "sha512-j4yDxQ66AJSBwGkbpFEp9uG/LS1tZV3P33fN1gkyRB2LoRL+RR3f76m0HPHaby6F4Z5xr9Fv1URmATlRRUIpRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "markdown-table": "^2.0.0", + "mdast-util-to-markdown": "~0.6.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm-task-list-item": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-task-list-item/-/mdast-util-gfm-task-list-item-0.1.6.tgz", + "integrity": "sha512-/d51FFIfPsSmCIRNp7E6pozM9z1GYPIkSy1urQ8s/o4TC22BZ7DqfHFWiqBD23bc7J3vV1Fc9O4QIHBlfuit8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "mdast-util-to-markdown": "~0.6.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-to-markdown": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-0.6.5.tgz", + "integrity": "sha512-XeV9sDE7ZlOQvs45C9UKMtfTcctcaj/pGwH8YLbMHoMOXNNCn2LsqVQOqrF1+/NU8lKDAqozme9SCXWyo9oAcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "^2.0.0", + "longest-streak": "^2.0.0", + "mdast-util-to-string": "^2.0.0", + "parse-entities": "^2.0.0", + "repeat-string": "^1.0.0", + "zwitch": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-to-markdown/node_modules/@types/unist": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", + "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", + "dev": true, + "license": "MIT" + }, + "node_modules/mdast-util-to-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-2.0.0.tgz", + "integrity": "sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==", + "dev": true, + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/mdurl": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz", "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==", "dev": true }, + "node_modules/meow": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-9.0.0.tgz", + "integrity": "sha512-+obSblOQmRhcyBt62furQqRAQpNyWXo8BuQ5bN7dG8wmwQ+vwHKp/rCFD4CrTP8CsDQD1sjoZ94K417XEUk8IQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/minimist": "^1.2.0", + "camelcase-keys": "^6.2.2", + "decamelize": "^1.2.0", + "decamelize-keys": "^1.1.0", + "hard-rejection": "^2.1.0", + "minimist-options": "4.1.0", + "normalize-package-data": "^3.0.0", + "read-pkg-up": "^7.0.1", + "redent": "^3.0.0", + "trim-newlines": "^3.0.0", + "type-fest": "^0.18.0", + "yargs-parser": "^20.2.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromark": { + "version": "2.11.4", + "resolved": "https://registry.npmjs.org/micromark/-/micromark-2.11.4.tgz", + "integrity": "sha512-+WoovN/ppKolQOFIAajxi7Lu9kInbPxFuTBVEavFcL8eAfVstoc5MocPmqBeAdBOJV00uaVjegzH4+MA0DN/uA==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "debug": "^4.0.0", + "parse-entities": "^2.0.0" + } + }, + "node_modules/micromark-extension-footnote": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/micromark-extension-footnote/-/micromark-extension-footnote-0.3.2.tgz", + "integrity": "sha512-gr/BeIxbIWQoUm02cIfK7mdMZ/fbroRpLsck4kvFtjbzP4yi+OPVbnukTc/zy0i7spC2xYE/dbX1Sur8BEDJsQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "micromark": "~2.11.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-frontmatter": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/micromark-extension-frontmatter/-/micromark-extension-frontmatter-0.2.2.tgz", + "integrity": "sha512-q6nPLFCMTLtfsctAuS0Xh4vaolxSFUWUWR6PZSrXXiRy+SANGllpcqdXFv2z07l0Xz/6Hl40hK0ffNCJPH2n1A==", + "dev": true, + "license": "MIT", + "dependencies": { + "fault": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm/-/micromark-extension-gfm-0.3.3.tgz", + "integrity": "sha512-oVN4zv5/tAIA+l3GbMi7lWeYpJ14oQyJ3uEim20ktYFAcfX1x3LNlFGGlmrZHt7u9YlKExmyJdDGaTt6cMSR/A==", + "dev": true, + "license": "MIT", + "dependencies": { + "micromark": "~2.11.0", + "micromark-extension-gfm-autolink-literal": "~0.5.0", + "micromark-extension-gfm-strikethrough": "~0.6.5", + "micromark-extension-gfm-table": "~0.4.0", + "micromark-extension-gfm-tagfilter": "~0.3.0", + "micromark-extension-gfm-task-list-item": "~0.3.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-autolink-literal": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-autolink-literal/-/micromark-extension-gfm-autolink-literal-0.5.7.tgz", + "integrity": "sha512-ePiDGH0/lhcngCe8FtH4ARFoxKTUelMp4L7Gg2pujYD5CSMb9PbblnyL+AAMud/SNMyusbS2XDSiPIRcQoNFAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "micromark": "~2.11.3" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-strikethrough": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-strikethrough/-/micromark-extension-gfm-strikethrough-0.6.5.tgz", + "integrity": "sha512-PpOKlgokpQRwUesRwWEp+fHjGGkZEejj83k9gU5iXCbDG+XBA92BqnRKYJdfqfkrRcZRgGuPuXb7DaK/DmxOhw==", + "dev": true, + "license": "MIT", + "dependencies": { + "micromark": "~2.11.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-table": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-table/-/micromark-extension-gfm-table-0.4.3.tgz", + "integrity": "sha512-hVGvESPq0fk6ALWtomcwmgLvH8ZSVpcPjzi0AjPclB9FsVRgMtGZkUcpE0zgjOCFAznKepF4z3hX8z6e3HODdA==", + "dev": true, + "license": "MIT", + "dependencies": { + "micromark": "~2.11.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-tagfilter": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-tagfilter/-/micromark-extension-gfm-tagfilter-0.3.0.tgz", + "integrity": "sha512-9GU0xBatryXifL//FJH+tAZ6i240xQuFrSL7mYi8f4oZSbc+NvXjkrHemeYP0+L4ZUT+Ptz3b95zhUZnMtoi/Q==", + "dev": true, + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-task-list-item": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-task-list-item/-/micromark-extension-gfm-task-list-item-0.3.3.tgz", + "integrity": "sha512-0zvM5iSLKrc/NQl84pZSjGo66aTGd57C1idmlWmE87lkMcXrTxg1uXa/nXomxJytoje9trP0NDLvw4bZ/Z/XCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "micromark": "~2.11.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/min-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minimist-options": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz", + "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==", + "dev": true, + "license": "MIT", + "dependencies": { + "arrify": "^1.0.1", + "is-plain-obj": "^1.1.0", + "kind-of": "^6.0.3" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/mkdirp": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", @@ -4650,6 +5816,16 @@ "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, + "node_modules/neotraverse": { + "version": "0.6.18", + "resolved": "https://registry.npmjs.org/neotraverse/-/neotraverse-0.6.18.tgz", + "integrity": "sha512-Z4SmBUweYa09+o6pG+eASabEpP6QkQ70yHj351pQoEXIs8uHbaU2DWVmzBANKgflPa47A50PtB2+NgRpQvr7vA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10" + } + }, "node_modules/node-releases": { "version": "2.0.27", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.27.tgz", @@ -4657,6 +5833,35 @@ "dev": true, "license": "MIT" }, + "node_modules/normalize-package-data": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz", + "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "hosted-git-info": "^4.0.1", + "is-core-module": "^2.5.0", + "semver": "^7.3.4", + "validate-npm-package-license": "^3.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/normalize-package-data/node_modules/semver": { + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/obug": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/obug/-/obug-2.1.4.tgz", @@ -4688,6 +5893,22 @@ "node": ">= 0.8.0" } }, + "node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/p-locate": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", @@ -4709,15 +5930,73 @@ "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "dependencies": { - "yocto-queue": "^0.1.0" + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-entities": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz", + "integrity": "sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "character-entities": "^1.0.0", + "character-entities-legacy": "^1.0.0", + "character-reference-invalid": "^1.0.0", + "is-alphanumerical": "^1.0.0", + "is-decimal": "^1.0.0", + "is-hexadecimal": "^1.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" }, "engines": { - "node": ">=10" + "node": ">=8" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -4733,6 +6012,16 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/pathe": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", @@ -4816,6 +6105,175 @@ "node": ">=6" } }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/quick-lru": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", + "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/read-pkg-up/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg/node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true, + "license": "ISC" + }, + "node_modules/read-pkg/node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/read-pkg/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/read-pkg/node_modules/type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=8" + } + }, + "node_modules/redent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", + "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", + "dev": true, + "license": "MIT", + "dependencies": { + "indent-string": "^4.0.0", + "strip-indent": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/regenerate": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", @@ -4874,6 +6332,82 @@ "regjsparser": "bin/parser" } }, + "node_modules/remark-footnotes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/remark-footnotes/-/remark-footnotes-3.0.0.tgz", + "integrity": "sha512-ZssAvH9FjGYlJ/PBVKdSmfyPc3Cz4rTWgZLI4iE/SX8Nt5l3o3oEjv3wwG5VD7xOjktzdwp5coac+kJV9l4jgg==", + "dev": true, + "license": "MIT", + "dependencies": { + "mdast-util-footnote": "^0.1.0", + "micromark-extension-footnote": "^0.3.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-frontmatter": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/remark-frontmatter/-/remark-frontmatter-3.0.0.tgz", + "integrity": "sha512-mSuDd3svCHs+2PyO29h7iijIZx4plX0fheacJcAoYAASfgzgVIcXGYSq9GFyYocFLftQs8IOmmkgtOovs6d4oA==", + "dev": true, + "license": "MIT", + "dependencies": { + "mdast-util-frontmatter": "^0.2.0", + "micromark-extension-frontmatter": "^0.2.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-gfm": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/remark-gfm/-/remark-gfm-1.0.0.tgz", + "integrity": "sha512-KfexHJCiqvrdBZVbQ6RopMZGwaXz6wFJEfByIuEwGf0arvITHjiKKZ1dpXujjH9KZdm1//XJQwgfnJ3lmXaDPA==", + "dev": true, + "license": "MIT", + "dependencies": { + "mdast-util-gfm": "^0.1.0", + "micromark-extension-gfm": "^0.3.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-parse": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-9.0.0.tgz", + "integrity": "sha512-geKatMwSzEXKHuzBNU1z676sGcDcFoChMK38TgdHJNAYfFtsfHDQG7MoJAjs6sgYMqyLduCYWDIWZIxiPeafEw==", + "dev": true, + "license": "MIT", + "dependencies": { + "mdast-util-from-markdown": "^0.8.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remove-markdown": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/remove-markdown/-/remove-markdown-0.6.4.tgz", + "integrity": "sha512-BompiLClzjfh46irZmzv+1Q61jZYlKN3iq/hzae9EOUwf7ctr/5wpD4qwgn/FWDAYE18RORO7z/yr+HXZJCY8Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10" + } + }, "node_modules/requizzle": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/requizzle/-/requizzle-0.2.4.tgz", @@ -4904,6 +6438,17 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, "node_modules/rolldown": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.5.tgz", @@ -4984,6 +6529,30 @@ "fsevents": "~2.3.2" } }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, "node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", @@ -5031,6 +6600,16 @@ "dev": true, "license": "ISC" }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/smob": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/smob/-/smob-1.5.0.tgz", @@ -5066,6 +6645,49 @@ "source-map": "^0.6.0" } }, + "node_modules/spdx-correct": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", + "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", + "dev": true, + "license": "CC-BY-3.0" + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.23", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.23.tgz", + "integrity": "sha512-CWLcCCH7VLu13TgOH+r8p1O/Znwhqv/dbb6lqWy67G+pT1kHmeD/+V36AVb/vq8QMIQwVShJ6Ssl5FPh0fuSdw==", + "dev": true, + "license": "CC0-1.0" + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true, + "license": "BSD-3-Clause" + }, "node_modules/stackback": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", @@ -5080,6 +6702,19 @@ "dev": true, "license": "MIT" }, + "node_modules/strip-indent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", + "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "min-indent": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -5092,6 +6727,16 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/structured-source": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/structured-source/-/structured-source-4.0.0.tgz", + "integrity": "sha512-qGzRFNJDjFieQkl/sVOI2dUjHKRyL9dAJi2gCPGJLbJHBIkyOHxjuocpIEfbLioX+qSJpvbYdT49/YCdMznKxA==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "boundary": "^2.0.0" + } + }, "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", @@ -5174,27 +6819,71 @@ } } }, - "node_modules/tinyglobby/node_modules/picomatch": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", - "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", + "node_modules/tinyglobby/node_modules/picomatch": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", + "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/tinyrainbow": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-3.1.1.tgz", + "integrity": "sha512-yau8yJdTt989Mm0Bd/236QnzEiPf2xLLTqUZRUJOo/3CB078LSwzei343DgtJVmfJKJE3TMINY1u42SQsP6mXw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/transform-markdown-links": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/transform-markdown-links/-/transform-markdown-links-2.1.0.tgz", + "integrity": "sha512-7HWQwQ9US+tJSMMzi1aP+KA3QwfjDs8sB4H5GBMRHFNBMQVdgoF6VfIFy2nJR/UHRTkYoGFwWh2pe+QIwSvfOA==", "dev": true, "license": "MIT", "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" + "node": ">=4" } }, - "node_modules/tinyrainbow": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-3.1.1.tgz", - "integrity": "sha512-yau8yJdTt989Mm0Bd/236QnzEiPf2xLLTqUZRUJOo/3CB078LSwzei343DgtJVmfJKJE3TMINY1u42SQsP6mXw==", + "node_modules/trim-newlines": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz", + "integrity": "sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==", "dev": true, "license": "MIT", "engines": { - "node": ">=14.0.0" + "node": ">=8" + } + }, + "node_modules/trough": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/trough/-/trough-1.0.5.tgz", + "integrity": "sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" } }, "node_modules/ts-api-utils": { @@ -5222,19 +6911,31 @@ "node": ">= 0.8.0" } }, + "node_modules/type-fest": { + "version": "0.18.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz", + "integrity": "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/typedoc": { - "version": "0.28.18", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.28.18.tgz", - "integrity": "sha512-NTWTUOFRQ9+SGKKTuWKUioUkjxNwtS3JDRPVKZAXGHZy2wCA8bdv2iJiyeePn0xkmK+TCCqZFT0X7+2+FLjngA==", + "version": "0.28.20", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.28.20.tgz", + "integrity": "sha512-uSKqkh8Cr48vllnEy+jdaAgOeR6Y+QCBW7usgUsKj7gJEfR7stw9U/fE49LBnj2tPRKPY0c0EBJSWe9Appmplg==", "dev": true, "license": "Apache-2.0", - "peer": true, "dependencies": { "@gerrit0/mini-shiki": "^3.23.0", "lunr": "^2.3.9", - "markdown-it": "^14.1.1", - "minimatch": "^10.2.4", - "yaml": "^2.8.2" + "markdown-it": "^14.3.0", + "minimatch": "^10.2.5", + "yaml": "^2.9.0" }, "bin": { "typedoc": "bin/typedoc" @@ -5266,7 +6967,6 @@ "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": "18 || 20 || >=22" } @@ -5277,7 +6977,6 @@ "integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "balanced-match": "^4.0.2" }, @@ -5291,7 +6990,6 @@ "integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==", "dev": true, "license": "BlueOak-1.0.0", - "peer": true, "dependencies": { "brace-expansion": "^5.0.5" }, @@ -5405,6 +7103,89 @@ "node": ">=4" } }, + "node_modules/unified": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/unified/-/unified-9.2.2.tgz", + "integrity": "sha512-Sg7j110mtefBD+qunSLO1lqOEKdrwBFBrR6Qd8f4uwkhWNlbkaqwHse6e7QvD3AP/MNoJdEDLaf8OxYyoWgorQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "bail": "^1.0.0", + "extend": "^3.0.0", + "is-buffer": "^2.0.0", + "is-plain-obj": "^2.0.0", + "trough": "^1.0.0", + "vfile": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unified/node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/unist-util-is": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.1.0.tgz", + "integrity": "sha512-ZOQSsnce92GrxSqlnEEseX0gi7GH9zTJZ0p9dtu87WRb/37mMPO2Ilx1s/t9vBHrFhbgweUwb+t7cIn5dxPhZg==", + "dev": true, + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-stringify-position": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz", + "integrity": "sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "^2.0.2" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-stringify-position/node_modules/@types/unist": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", + "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", + "dev": true, + "license": "MIT" + }, + "node_modules/unist-util-visit-parents": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.1.1.tgz", + "integrity": "sha512-1KROIZWo6bcMrZEwiH2UrXDyalAa0uqzWCxCJj6lPOvTve2WkfgCytoDTPaMnodXh1WrXOq0haVYHj99ynJlsg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-visit-parents/node_modules/@types/unist": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", + "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", + "dev": true, + "license": "MIT" + }, "node_modules/update-browserslist-db": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz", @@ -5446,6 +7227,63 @@ "punycode": "^2.1.0" } }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/vfile": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-4.2.1.tgz", + "integrity": "sha512-O6AE4OskCG5S1emQ/4gl8zK586RqA3srz3nfK/Viy0UPToBc5Trp9BVFb1u0CjsKrAWwnpr4ifM/KBXPWwJbCA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "^2.0.0", + "is-buffer": "^2.0.0", + "unist-util-stringify-position": "^2.0.0", + "vfile-message": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-message": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-2.0.4.tgz", + "integrity": "sha512-DjssxRGkMvifUOJre00juHoP9DPWuzjxKuMDrhNbk2TdaYYBNMStsNhEOt3idrtI12VQYM/1+iM0KOzXi4pxwQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-stringify-position": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-message/node_modules/@types/unist": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", + "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", + "dev": true, + "license": "MIT" + }, + "node_modules/vfile/node_modules/@types/unist": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", + "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", + "dev": true, + "license": "MIT" + }, "node_modules/vite": { "version": "8.2.2", "resolved": "https://registry.npmjs.org/vite/-/vite-8.2.2.tgz", @@ -5693,12 +7531,11 @@ "license": "ISC" }, "node_modules/yaml": { - "version": "2.8.3", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.3.tgz", - "integrity": "sha512-AvbaCLOO2Otw/lW5bmh9d/WEdcDFdQp2Z2ZUH3pX9U2ihyUY0nvLv7J6TrWowklRGPYbB/IuIMfYgxaCPg5Bpg==", + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.9.0.tgz", + "integrity": "sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA==", "dev": true, "license": "ISC", - "peer": true, "bin": { "yaml": "bin.mjs" }, @@ -5709,6 +7546,16 @@ "url": "https://github.com/sponsors/eemeli" } }, + "node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", @@ -5720,6 +7567,17 @@ "funding": { "url": "https://github.com/sponsors/sindresorhus" } + }, + "node_modules/zwitch": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-1.0.5.tgz", + "integrity": "sha512-V50KMwwzqJV0NpZIZFwfOD5/lyny3WlSzRiXgA0G7VUnRlqttta1L6UQIHzd6EuBY/cHGfwTIck7w1yH6Q5zUw==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } } }, "dependencies": { @@ -6703,24 +8561,6 @@ "@stylistic/eslint-plugin": "~5.9.0" } }, - "@borgar/jsdoc-tsmd": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/@borgar/jsdoc-tsmd/-/jsdoc-tsmd-0.2.2.tgz", - "integrity": "sha512-UVp9dUYruKXxW8MIu4iv3ltbv+BbOMcJOeWPGYH6TyP3+muzRlxmp+zgqvZ0g13asmrQeHuLzmxOIG/2FL6Dqw==", - "dev": true, - "requires": { - "jsdoctypeparser": "~9.0.0", - "typescript": "~5.1.3" - }, - "dependencies": { - "typescript": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz", - "integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==", - "dev": true - } - } - }, "@eslint-community/eslint-utils": { "version": "4.9.1", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz", @@ -6827,7 +8667,6 @@ "resolved": "https://registry.npmjs.org/@gerrit0/mini-shiki/-/mini-shiki-3.23.0.tgz", "integrity": "sha512-bEMORlG0cqdjVyCEuU0cDQbORWX+kYCeo0kV1lbxF5bt4r7SID2l9bqsxJEM0zndaxpOUT7riCyIVEuqq/Ynxg==", "dev": true, - "peer": true, "requires": { "@shikijs/engine-oniguruma": "^3.23.0", "@shikijs/langs": "^3.23.0", @@ -6932,6 +8771,32 @@ "dev": true, "optional": true }, + "@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + } + }, + "@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true + }, + "@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "requires": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + } + }, "@oxc-project/types": { "version": "0.146.0", "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.146.0.tgz", @@ -7262,7 +9127,6 @@ "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-3.23.0.tgz", "integrity": "sha512-1nWINwKXxKKLqPibT5f4pAFLej9oZzQTsby8942OTlsJzOBZ0MWKiwzMsd+jhzu8YPCHAswGnnN1YtQfirL35g==", "dev": true, - "peer": true, "requires": { "@shikijs/types": "3.23.0", "@shikijs/vscode-textmate": "^10.0.2" @@ -7273,7 +9137,6 @@ "resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-3.23.0.tgz", "integrity": "sha512-2Ep4W3Re5aB1/62RSYQInK9mM3HsLeB91cHqznAJMuylqjzNVAVCMnNWRHFtcNHXsoNRayP9z1qj4Sq3nMqYXg==", "dev": true, - "peer": true, "requires": { "@shikijs/types": "3.23.0" } @@ -7283,7 +9146,6 @@ "resolved": "https://registry.npmjs.org/@shikijs/themes/-/themes-3.23.0.tgz", "integrity": "sha512-5qySYa1ZgAT18HR/ypENL9cUSGOeI2x+4IvYJu4JgVJdizn6kG4ia5Q1jDEOi7gTbN4RbuYtmHh0W3eccOrjMA==", "dev": true, - "peer": true, "requires": { "@shikijs/types": "3.23.0" } @@ -7293,7 +9155,6 @@ "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-3.23.0.tgz", "integrity": "sha512-3JZ5HXOZfYjsYSk0yPwBrkupyYSLpAE26Qc0HLghhZNGTZg/SKxXIIgoxOpmmeQP0RRSDJTk1/vPfw9tbw+jSQ==", "dev": true, - "peer": true, "requires": { "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4" @@ -7303,8 +9164,7 @@ "version": "10.0.2", "resolved": "https://registry.npmjs.org/@shikijs/vscode-textmate/-/vscode-textmate-10.0.2.tgz", "integrity": "sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==", - "dev": true, - "peer": true + "dev": true }, "@standard-schema/spec": { "version": "1.1.0", @@ -7334,6 +9194,30 @@ } } }, + "@textlint/ast-node-types": { + "version": "15.8.0", + "resolved": "https://registry.npmjs.org/@textlint/ast-node-types/-/ast-node-types-15.8.0.tgz", + "integrity": "sha512-5CiH9COYmovWmExQgs7763DzX6Gy9zjkjJ7JxCC95wyTcjwQn/8poNF6fv3qzRlmx8CRRde8DHr9FcgAAiPzgw==", + "dev": true + }, + "@textlint/markdown-to-ast": { + "version": "15.8.0", + "resolved": "https://registry.npmjs.org/@textlint/markdown-to-ast/-/markdown-to-ast-15.8.0.tgz", + "integrity": "sha512-gWOcd2+UCqODMLGIIY5WiPE9zmR9L4aut3FIkxH8gSCiZ6EVkBaU2mgm+8KiGOjJqdtT98xkWocCwDtQ1kypOQ==", + "dev": true, + "requires": { + "@textlint/ast-node-types": "15.8.0", + "debug": "^4.4.3", + "mdast-util-gfm-autolink-literal": "^0.1.3", + "neotraverse": "^0.6.18", + "remark-footnotes": "^3.0.0", + "remark-frontmatter": "^3.0.0", + "remark-gfm": "^1.0.0", + "remark-parse": "^9.0.0", + "structured-source": "^4.0.0", + "unified": "^9.2.2" + } + }, "@types/chai": { "version": "5.2.3", "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz", @@ -7367,7 +9251,6 @@ "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.4.tgz", "integrity": "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==", "dev": true, - "peer": true, "requires": { "@types/unist": "*" } @@ -7394,12 +9277,35 @@ "@types/mdurl": "^2" } }, + "@types/mdast": { + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", + "dev": true, + "requires": { + "@types/unist": "^2" + }, + "dependencies": { + "@types/unist": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", + "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", + "dev": true + } + } + }, "@types/mdurl": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-2.0.0.tgz", "integrity": "sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg==", "dev": true }, + "@types/minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==", + "dev": true + }, "@types/node": { "version": "26.3.0", "resolved": "https://registry.npmjs.org/@types/node/-/node-26.3.0.tgz", @@ -7409,12 +9315,17 @@ "undici-types": "~8.3.0" } }, + "@types/normalize-package-data": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz", + "integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==", + "dev": true + }, "@types/unist": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==", - "dev": true, - "peer": true + "dev": true }, "@typescript-eslint/eslint-plugin": { "version": "8.68.0", @@ -7688,12 +9599,34 @@ "uri-js": "^4.2.2" } }, + "anchor-markdown-header": { + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/anchor-markdown-header/-/anchor-markdown-header-0.8.4.tgz", + "integrity": "sha512-20eMBMpts7k5rXAAj67geSqc/tsexHZOZJDWQD214YcDuNtyizDa7Q77sYa5rkao2FwsQP1WKRt2X6mphwmhbg==", + "dev": true, + "requires": { + "emoji-regex": "~10.6.0", + "remove-markdown": "^0.6.2" + } + }, "argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", + "dev": true + }, "assertion-error": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", @@ -7730,6 +9663,12 @@ "@babel/helper-define-polyfill-provider": "^0.6.6" } }, + "bail": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/bail/-/bail-1.0.5.tgz", + "integrity": "sha512-xFbRxM1tahm08yHBP16MMjVUAvDaBMD38zsM9EMAUN61omwLmKlOpB/Zku5QkjZ8TZ4vn53pj+t518cH0S03RQ==", + "dev": true + }, "baseline-browser-mapping": { "version": "2.9.19", "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.9.19.tgz", @@ -7742,6 +9681,21 @@ "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", "dev": true }, + "boundary": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/boundary/-/boundary-2.0.0.tgz", + "integrity": "sha512-rJKn5ooC9u8q13IMCrW0RSp31pxBCHE3y9V/tp3TdWSLf8Em3p6Di4NBpfzbJge9YjjFEsD0RtFEjtvHL5VyEA==", + "dev": true + }, + "braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "requires": { + "fill-range": "^7.1.1" + } + }, "browserslist": { "version": "4.28.1", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.1.tgz", @@ -7761,6 +9715,23 @@ "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "dev": true }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "camelcase-keys": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz", + "integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==", + "dev": true, + "requires": { + "camelcase": "^5.3.1", + "map-obj": "^4.0.0", + "quick-lru": "^4.0.1" + } + }, "caniuse-lite": { "version": "1.0.30001769", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001769.tgz", @@ -7776,18 +9747,56 @@ "lodash": "^4.17.15" } }, + "ccount": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ccount/-/ccount-1.1.0.tgz", + "integrity": "sha512-vlNK021QdI7PNeiUh/lKkC/mNHHfV0m/Ad5JoI0TYtlBnJAslM/JIkm/tGC88bkLIwO6OQ5uV6ztS6kVAtCDlg==", + "dev": true + }, "chai": { "version": "6.2.2", "resolved": "https://registry.npmjs.org/chai/-/chai-6.2.2.tgz", "integrity": "sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==", "dev": true }, + "character-entities": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz", + "integrity": "sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==", + "dev": true + }, + "character-entities-legacy": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz", + "integrity": "sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==", + "dev": true + }, + "character-reference-invalid": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz", + "integrity": "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==", + "dev": true + }, "commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "dev": true }, + "concat-md": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/concat-md/-/concat-md-0.5.1.tgz", + "integrity": "sha512-iZr6yxlwPQ5IZup2mvqgm+JI0jnu5yGkND2ra5DinBtcevDQPQiAGpf4RXOnor1UpKBUydqegDLfPY8b+FfI+Q==", + "dev": true, + "requires": { + "doctoc": "^2.2.1", + "front-matter": "^4.0.2", + "globby": "^11.1.0", + "lodash.startcase": "^4.4.0", + "meow": "^9.0.0", + "transform-markdown-links": "^2.0.0" + } + }, "convert-source-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", @@ -7823,6 +9832,30 @@ "ms": "^2.1.3" } }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "dev": true + }, + "decamelize-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.1.tgz", + "integrity": "sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==", + "dev": true, + "requires": { + "decamelize": "^1.1.0", + "map-obj": "^1.0.0" + }, + "dependencies": { + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==", + "dev": true + } + } + }, "deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", @@ -7835,18 +9868,100 @@ "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", "dev": true }, + "dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "requires": { + "path-type": "^4.0.0" + } + }, + "doctoc": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/doctoc/-/doctoc-2.5.0.tgz", + "integrity": "sha512-xWb2P8mQw9x+T9xPYToytRP0/bA68oexdsY0anMG72RdhZGTVPx6oHJfI57gbZe9LsOSfQUNNLwxSspdoTlJIQ==", + "dev": true, + "requires": { + "@textlint/markdown-to-ast": "^15.6.0", + "anchor-markdown-header": "^0.8.4", + "htmlparser2": "^7.2.0", + "loglevel": "^1.9.2", + "minimist": "^1.2.6" + } + }, + "dom-serializer": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz", + "integrity": "sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==", + "dev": true, + "requires": { + "domelementtype": "^2.0.1", + "domhandler": "^4.2.0", + "entities": "^2.0.0" + }, + "dependencies": { + "entities": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", + "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", + "dev": true + } + } + }, + "domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", + "dev": true + }, + "domhandler": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.1.tgz", + "integrity": "sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==", + "dev": true, + "requires": { + "domelementtype": "^2.2.0" + } + }, + "domutils": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", + "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", + "dev": true, + "requires": { + "dom-serializer": "^1.0.1", + "domelementtype": "^2.2.0", + "domhandler": "^4.2.0" + } + }, "electron-to-chromium": { "version": "1.5.286", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.286.tgz", "integrity": "sha512-9tfDXhJ4RKFNerfjdCcZfufu49vg620741MNs26a9+bhLThdB+plgMeou98CAaHu/WATj2iHOOHTp1hWtABj2A==", "dev": true }, + "emoji-regex": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", + "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", + "dev": true + }, "entities": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", "dev": true }, + "error-ex": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.4.tgz", + "integrity": "sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, "es-module-lexer": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.3.2.tgz", @@ -7859,6 +9974,12 @@ "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", "dev": true }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true + }, "eslint": { "version": "10.9.1", "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.9.1.tgz", @@ -7912,12 +10033,6 @@ "balanced-match": "^4.0.2" } }, - "escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true - }, "eslint-visitor-keys": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz", @@ -7975,6 +10090,12 @@ "eslint-visitor-keys": "^4.2.1" } }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, "esquery": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz", @@ -8017,12 +10138,42 @@ "integrity": "sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==", "dev": true }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, "fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, + "fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "dependencies": { + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + } + } + }, "fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -8035,6 +10186,24 @@ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true }, + "fastq": { + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.20.2.tgz", + "integrity": "sha512-UpGiiODyCGprM8EPP6JodP6jC9Rws6TCuiDOD+nn0CJhR8guI3g/ozo4ugL0vJ+Yz1UtJuuRPqvQuybVOF1VQA==", + "dev": true, + "requires": { + "reusify": "^1.0.4" + } + }, + "fault": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/fault/-/fault-1.0.4.tgz", + "integrity": "sha512-CJ0HCB5tL5fYTEA7ToAq5+kTwd++Borf1/bifxd9iT70QcXr4MRrO3Llf8Ifs70q+SJcGHFtnIE/Nw6giCtECA==", + "dev": true, + "requires": { + "format": "^0.2.0" + } + }, "file-entry-cache": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", @@ -8044,6 +10213,15 @@ "flat-cache": "^4.0.0" } }, + "fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, "find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -8052,14 +10230,6 @@ "requires": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" - }, - "dependencies": { - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - } } }, "flat-cache": { @@ -8078,6 +10248,21 @@ "integrity": "sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA==", "dev": true }, + "format": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/format/-/format-0.2.2.tgz", + "integrity": "sha512-wzsgA6WOq+09wrU1tsJ09udeR/YZRaeArL9e1wPbFg3GG2yDnC2ldKpxs4xunpFF9DgqCqOIra3bc1HWrJ37Ww==", + "dev": true + }, + "front-matter": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/front-matter/-/front-matter-4.0.2.tgz", + "integrity": "sha512-I8ZuJ/qG92NWX8i5x1Y8qyj3vizhXS31OxjKDu3LKP+7/qBgfIKValiZIEwoVoJKUHlhWtYrktkxV1XsX+pPlg==", + "dev": true, + "requires": { + "js-yaml": "^3.13.1" + } + }, "fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", @@ -8112,12 +10297,32 @@ "integrity": "sha512-Z2I8hM+PbJDXQDq3Icgpzv+mPdwr68iZUU9d5WW4FuXfDUQfkZaZuvjMv42/5crNyw154+9+VWXbYrUgDXbxNw==", "dev": true }, + "globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "requires": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + } + }, "graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, + "hard-rejection": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz", + "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==", + "dev": true + }, "hasown": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz", @@ -8127,6 +10332,52 @@ "function-bind": "^1.1.2" } }, + "hosted-git-info": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", + "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + }, + "dependencies": { + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + } + }, + "htmlparser2": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-7.2.0.tgz", + "integrity": "sha512-H7MImA4MS6cw7nbyURtLPO1Tms7C5H602LRETv95z1MxO/7CP7rDVROehUYeYBUYEON94NXXDEPmZuq+hX4sog==", + "dev": true, + "requires": { + "domelementtype": "^2.0.1", + "domhandler": "^4.2.2", + "domutils": "^2.8.0", + "entities": "^3.0.1" + }, + "dependencies": { + "entities": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-3.0.1.tgz", + "integrity": "sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==", + "dev": true + } + } + }, "ignore": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", @@ -8139,6 +10390,40 @@ "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", "dev": true }, + "indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true + }, + "is-alphabetical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz", + "integrity": "sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==", + "dev": true + }, + "is-alphanumerical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz", + "integrity": "sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==", + "dev": true, + "requires": { + "is-alphabetical": "^1.0.0", + "is-decimal": "^1.0.0" + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true + }, + "is-buffer": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", + "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", + "dev": true + }, "is-core-module": { "version": "2.16.2", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.2.tgz", @@ -8148,6 +10433,12 @@ "hasown": "^2.0.3" } }, + "is-decimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz", + "integrity": "sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==", + "dev": true + }, "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -8163,6 +10454,24 @@ "is-extglob": "^2.1.1" } }, + "is-hexadecimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz", + "integrity": "sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==", + "dev": true + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==", + "dev": true + }, "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -8175,6 +10484,27 @@ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true }, + "js-yaml": { + "version": "3.15.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.15.2.tgz", + "integrity": "sha512-6EuL879VkRA+1Cz578mKMiKvjPNEuk6+r1JaFzoSWejZmtf7xWbIyw1e3KkxlkzTIt9Taw6JBhEppG7utc1P+w==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "dependencies": { + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + } + } + }, "js2xmlparser": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-4.0.2.tgz", @@ -8215,12 +10545,6 @@ } } }, - "jsdoctypeparser": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/jsdoctypeparser/-/jsdoctypeparser-9.0.0.tgz", - "integrity": "sha512-jrTA2jJIL6/DAEILBEh2/w9QxCuwmvNXIry39Ay/HVfhE3o2yVV0U44blYkqdHA/OKloJEqvJy0xU+GSdE2SIw==", - "dev": true - }, "jsesc": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", @@ -8233,6 +10557,12 @@ "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", "dev": true }, + "json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -8260,6 +10590,12 @@ "json-buffer": "3.0.1" } }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + }, "klaw": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/klaw/-/klaw-3.0.0.tgz", @@ -8376,6 +10712,12 @@ "dev": true, "optional": true }, + "lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true + }, "linkify-it": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.2.tgz", @@ -8406,6 +10748,24 @@ "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", "dev": true }, + "lodash.startcase": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.startcase/-/lodash.startcase-4.4.0.tgz", + "integrity": "sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==", + "dev": true + }, + "loglevel": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.9.2.tgz", + "integrity": "sha512-HgMmCqIJSAKqo68l0rS2AanEWfkxaZ5wNiEFb5ggm08lDs9Xl2KxBlX3PTcaD2chBM1gXAYf491/M2Rv8Jwayg==", + "dev": true + }, + "longest-streak": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-2.0.4.tgz", + "integrity": "sha512-vM6rUVCVUJJt33bnmHiZEvr7wPT78ztX7rojL+LW51bHtLh6HTjx84LA5W4+oa6aKEJA7jJu5LR6vQRBpA5DVg==", + "dev": true + }, "lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", @@ -8419,8 +10779,7 @@ "version": "2.3.9", "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", - "dev": true, - "peer": true + "dev": true }, "magic-string": { "version": "0.30.21", @@ -8431,39 +10790,320 @@ "@jridgewell/sourcemap-codec": "^1.5.5" } }, + "map-obj": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz", + "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==", + "dev": true + }, "markdown-it": { "version": "14.3.0", "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.3.0.tgz", "integrity": "sha512-RCEsPjR+sr0x+AuYp601tKTkgFG4YEPLCzHST3cQ/fhlJkqAkz1L2/Qbp1j9qw5SBwQHFBoW8+hoN5xssOF0Tw==", "dev": true, "requires": { - "argparse": "^2.0.1", - "entities": "^4.5.0", - "linkify-it": "^5.0.2", - "mdurl": "^2.0.0", - "punycode.js": "^2.3.1", - "uc.micro": "^2.1.0" + "argparse": "^2.0.1", + "entities": "^4.5.0", + "linkify-it": "^5.0.2", + "mdurl": "^2.0.0", + "punycode.js": "^2.3.1", + "uc.micro": "^2.1.0" + } + }, + "markdown-it-anchor": { + "version": "8.6.7", + "resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-8.6.7.tgz", + "integrity": "sha512-FlCHFwNnutLgVTflOYHPW2pPcl2AACqVzExlkGQNsi4CJgqOHN7YTgDd4LuhgN1BFO3TS0vLAruV1Td6dwWPJA==", + "dev": true, + "requires": {} + }, + "markdown-table": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-2.0.0.tgz", + "integrity": "sha512-Ezda85ToJUBhM6WGaG6veasyym+Tbs3cMAw/ZhOPqXiYsr0jgocBV3j3nx+4lk47plLlIqjwuTm/ywVI+zjJ/A==", + "dev": true, + "requires": { + "repeat-string": "^1.0.0" + } + }, + "marked": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", + "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==", + "dev": true + }, + "mdast-util-find-and-replace": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/mdast-util-find-and-replace/-/mdast-util-find-and-replace-1.1.1.tgz", + "integrity": "sha512-9cKl33Y21lyckGzpSmEQnIDjEfeeWelN5s1kUW1LwdB0Fkuq2u+4GdqcGEygYxJE8GVqCl0741bYXHgamfWAZA==", + "dev": true, + "requires": { + "escape-string-regexp": "^4.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + } + }, + "mdast-util-footnote": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/mdast-util-footnote/-/mdast-util-footnote-0.1.7.tgz", + "integrity": "sha512-QxNdO8qSxqbO2e3m09KwDKfWiLgqyCurdWTQ198NpbZ2hxntdc+VKS4fDJCmNWbAroUdYnSthu+XbZ8ovh8C3w==", + "dev": true, + "requires": { + "mdast-util-to-markdown": "^0.6.0", + "micromark": "~2.11.0" + } + }, + "mdast-util-from-markdown": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-0.8.5.tgz", + "integrity": "sha512-2hkTXtYYnr+NubD/g6KGBS/0mFmBcifAsI0yIWRiRo0PjVs6SSOSOdtzbp6kSGnShDN6G5aWZpKQ2lWRy27mWQ==", + "dev": true, + "requires": { + "@types/mdast": "^3.0.0", + "mdast-util-to-string": "^2.0.0", + "micromark": "~2.11.0", + "parse-entities": "^2.0.0", + "unist-util-stringify-position": "^2.0.0" + } + }, + "mdast-util-frontmatter": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/mdast-util-frontmatter/-/mdast-util-frontmatter-0.2.0.tgz", + "integrity": "sha512-FHKL4w4S5fdt1KjJCwB0178WJ0evnyyQr5kXTM3wrOVpytD0hrkvd+AOOjU9Td8onOejCkmZ+HQRT3CZ3coHHQ==", + "dev": true, + "requires": { + "micromark-extension-frontmatter": "^0.2.0" + } + }, + "mdast-util-gfm": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/mdast-util-gfm/-/mdast-util-gfm-0.1.2.tgz", + "integrity": "sha512-NNkhDx/qYcuOWB7xHUGWZYVXvjPFFd6afg6/e2g+SV4r9q5XUcCbV4Wfa3DLYIiD+xAEZc6K4MGaE/m0KDcPwQ==", + "dev": true, + "requires": { + "mdast-util-gfm-autolink-literal": "^0.1.0", + "mdast-util-gfm-strikethrough": "^0.2.0", + "mdast-util-gfm-table": "^0.1.0", + "mdast-util-gfm-task-list-item": "^0.1.0", + "mdast-util-to-markdown": "^0.6.1" + } + }, + "mdast-util-gfm-autolink-literal": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-autolink-literal/-/mdast-util-gfm-autolink-literal-0.1.3.tgz", + "integrity": "sha512-GjmLjWrXg1wqMIO9+ZsRik/s7PLwTaeCHVB7vRxUwLntZc8mzmTsLVr6HW1yLokcnhfURsn5zmSVdi3/xWWu1A==", + "dev": true, + "requires": { + "ccount": "^1.0.0", + "mdast-util-find-and-replace": "^1.1.0", + "micromark": "^2.11.3" + } + }, + "mdast-util-gfm-strikethrough": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-strikethrough/-/mdast-util-gfm-strikethrough-0.2.3.tgz", + "integrity": "sha512-5OQLXpt6qdbttcDG/UxYY7Yjj3e8P7X16LzvpX8pIQPYJ/C2Z1qFGMmcw+1PZMUM3Z8wt8NRfYTvCni93mgsgA==", + "dev": true, + "requires": { + "mdast-util-to-markdown": "^0.6.0" + } + }, + "mdast-util-gfm-table": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-table/-/mdast-util-gfm-table-0.1.6.tgz", + "integrity": "sha512-j4yDxQ66AJSBwGkbpFEp9uG/LS1tZV3P33fN1gkyRB2LoRL+RR3f76m0HPHaby6F4Z5xr9Fv1URmATlRRUIpRQ==", + "dev": true, + "requires": { + "markdown-table": "^2.0.0", + "mdast-util-to-markdown": "~0.6.0" + } + }, + "mdast-util-gfm-task-list-item": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-task-list-item/-/mdast-util-gfm-task-list-item-0.1.6.tgz", + "integrity": "sha512-/d51FFIfPsSmCIRNp7E6pozM9z1GYPIkSy1urQ8s/o4TC22BZ7DqfHFWiqBD23bc7J3vV1Fc9O4QIHBlfuit8A==", + "dev": true, + "requires": { + "mdast-util-to-markdown": "~0.6.0" + } + }, + "mdast-util-to-markdown": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-0.6.5.tgz", + "integrity": "sha512-XeV9sDE7ZlOQvs45C9UKMtfTcctcaj/pGwH8YLbMHoMOXNNCn2LsqVQOqrF1+/NU8lKDAqozme9SCXWyo9oAcQ==", + "dev": true, + "requires": { + "@types/unist": "^2.0.0", + "longest-streak": "^2.0.0", + "mdast-util-to-string": "^2.0.0", + "parse-entities": "^2.0.0", + "repeat-string": "^1.0.0", + "zwitch": "^1.0.0" + }, + "dependencies": { + "@types/unist": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", + "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", + "dev": true + } + } + }, + "mdast-util-to-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-2.0.0.tgz", + "integrity": "sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==", + "dev": true + }, + "mdurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz", + "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==", + "dev": true + }, + "meow": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-9.0.0.tgz", + "integrity": "sha512-+obSblOQmRhcyBt62furQqRAQpNyWXo8BuQ5bN7dG8wmwQ+vwHKp/rCFD4CrTP8CsDQD1sjoZ94K417XEUk8IQ==", + "dev": true, + "requires": { + "@types/minimist": "^1.2.0", + "camelcase-keys": "^6.2.2", + "decamelize": "^1.2.0", + "decamelize-keys": "^1.1.0", + "hard-rejection": "^2.1.0", + "minimist-options": "4.1.0", + "normalize-package-data": "^3.0.0", + "read-pkg-up": "^7.0.1", + "redent": "^3.0.0", + "trim-newlines": "^3.0.0", + "type-fest": "^0.18.0", + "yargs-parser": "^20.2.3" + } + }, + "merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true + }, + "micromark": { + "version": "2.11.4", + "resolved": "https://registry.npmjs.org/micromark/-/micromark-2.11.4.tgz", + "integrity": "sha512-+WoovN/ppKolQOFIAajxi7Lu9kInbPxFuTBVEavFcL8eAfVstoc5MocPmqBeAdBOJV00uaVjegzH4+MA0DN/uA==", + "dev": true, + "requires": { + "debug": "^4.0.0", + "parse-entities": "^2.0.0" + } + }, + "micromark-extension-footnote": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/micromark-extension-footnote/-/micromark-extension-footnote-0.3.2.tgz", + "integrity": "sha512-gr/BeIxbIWQoUm02cIfK7mdMZ/fbroRpLsck4kvFtjbzP4yi+OPVbnukTc/zy0i7spC2xYE/dbX1Sur8BEDJsQ==", + "dev": true, + "requires": { + "micromark": "~2.11.0" + } + }, + "micromark-extension-frontmatter": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/micromark-extension-frontmatter/-/micromark-extension-frontmatter-0.2.2.tgz", + "integrity": "sha512-q6nPLFCMTLtfsctAuS0Xh4vaolxSFUWUWR6PZSrXXiRy+SANGllpcqdXFv2z07l0Xz/6Hl40hK0ffNCJPH2n1A==", + "dev": true, + "requires": { + "fault": "^1.0.0" + } + }, + "micromark-extension-gfm": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm/-/micromark-extension-gfm-0.3.3.tgz", + "integrity": "sha512-oVN4zv5/tAIA+l3GbMi7lWeYpJ14oQyJ3uEim20ktYFAcfX1x3LNlFGGlmrZHt7u9YlKExmyJdDGaTt6cMSR/A==", + "dev": true, + "requires": { + "micromark": "~2.11.0", + "micromark-extension-gfm-autolink-literal": "~0.5.0", + "micromark-extension-gfm-strikethrough": "~0.6.5", + "micromark-extension-gfm-table": "~0.4.0", + "micromark-extension-gfm-tagfilter": "~0.3.0", + "micromark-extension-gfm-task-list-item": "~0.3.0" + } + }, + "micromark-extension-gfm-autolink-literal": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-autolink-literal/-/micromark-extension-gfm-autolink-literal-0.5.7.tgz", + "integrity": "sha512-ePiDGH0/lhcngCe8FtH4ARFoxKTUelMp4L7Gg2pujYD5CSMb9PbblnyL+AAMud/SNMyusbS2XDSiPIRcQoNFAw==", + "dev": true, + "requires": { + "micromark": "~2.11.3" + } + }, + "micromark-extension-gfm-strikethrough": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-strikethrough/-/micromark-extension-gfm-strikethrough-0.6.5.tgz", + "integrity": "sha512-PpOKlgokpQRwUesRwWEp+fHjGGkZEejj83k9gU5iXCbDG+XBA92BqnRKYJdfqfkrRcZRgGuPuXb7DaK/DmxOhw==", + "dev": true, + "requires": { + "micromark": "~2.11.0" + } + }, + "micromark-extension-gfm-table": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-table/-/micromark-extension-gfm-table-0.4.3.tgz", + "integrity": "sha512-hVGvESPq0fk6ALWtomcwmgLvH8ZSVpcPjzi0AjPclB9FsVRgMtGZkUcpE0zgjOCFAznKepF4z3hX8z6e3HODdA==", + "dev": true, + "requires": { + "micromark": "~2.11.0" + } + }, + "micromark-extension-gfm-tagfilter": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-tagfilter/-/micromark-extension-gfm-tagfilter-0.3.0.tgz", + "integrity": "sha512-9GU0xBatryXifL//FJH+tAZ6i240xQuFrSL7mYi8f4oZSbc+NvXjkrHemeYP0+L4ZUT+Ptz3b95zhUZnMtoi/Q==", + "dev": true + }, + "micromark-extension-gfm-task-list-item": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-task-list-item/-/micromark-extension-gfm-task-list-item-0.3.3.tgz", + "integrity": "sha512-0zvM5iSLKrc/NQl84pZSjGo66aTGd57C1idmlWmE87lkMcXrTxg1uXa/nXomxJytoje9trP0NDLvw4bZ/Z/XCQ==", + "dev": true, + "requires": { + "micromark": "~2.11.0" } }, - "markdown-it-anchor": { - "version": "8.6.7", - "resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-8.6.7.tgz", - "integrity": "sha512-FlCHFwNnutLgVTflOYHPW2pPcl2AACqVzExlkGQNsi4CJgqOHN7YTgDd4LuhgN1BFO3TS0vLAruV1Td6dwWPJA==", + "micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, - "requires": {} + "requires": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + } }, - "marked": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", - "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==", + "min-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", "dev": true }, - "mdurl": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz", - "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==", + "minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", "dev": true }, + "minimist-options": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz", + "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==", + "dev": true, + "requires": { + "arrify": "^1.0.1", + "is-plain-obj": "^1.1.0", + "kind-of": "^6.0.3" + } + }, "mkdirp": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", @@ -8488,12 +11128,38 @@ "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, + "neotraverse": { + "version": "0.6.18", + "resolved": "https://registry.npmjs.org/neotraverse/-/neotraverse-0.6.18.tgz", + "integrity": "sha512-Z4SmBUweYa09+o6pG+eASabEpP6QkQ70yHj351pQoEXIs8uHbaU2DWVmzBANKgflPa47A50PtB2+NgRpQvr7vA==", + "dev": true + }, "node-releases": { "version": "2.0.27", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.27.tgz", "integrity": "sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA==", "dev": true }, + "normalize-package-data": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz", + "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==", + "dev": true, + "requires": { + "hosted-git-info": "^4.0.1", + "is-core-module": "^2.5.0", + "semver": "^7.3.4", + "validate-npm-package-license": "^3.0.1" + }, + "dependencies": { + "semver": { + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", + "dev": true + } + } + }, "obug": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/obug/-/obug-2.1.4.tgz", @@ -8514,6 +11180,15 @@ "type-check": "^0.4.0" } }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, "p-locate": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", @@ -8534,6 +11209,44 @@ } } }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "parse-entities": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz", + "integrity": "sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==", + "dev": true, + "requires": { + "character-entities": "^1.0.0", + "character-entities-legacy": "^1.0.0", + "character-reference-invalid": "^1.0.0", + "is-alphanumerical": "^1.0.0", + "is-decimal": "^1.0.0", + "is-hexadecimal": "^1.0.0" + } + }, + "parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, "path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -8546,6 +11259,12 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, + "path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true + }, "pathe": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", @@ -8593,6 +11312,119 @@ "integrity": "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==", "dev": true }, + "queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true + }, + "quick-lru": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", + "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==", + "dev": true + }, + "read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dev": true, + "requires": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "dependencies": { + "hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true + }, + "type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true + } + } + }, + "read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "dev": true, + "requires": { + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + }, + "dependencies": { + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true + } + } + }, + "redent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", + "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", + "dev": true, + "requires": { + "indent-string": "^4.0.0", + "strip-indent": "^3.0.0" + } + }, "regenerate": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", @@ -8637,6 +11469,57 @@ "jsesc": "~3.1.0" } }, + "remark-footnotes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/remark-footnotes/-/remark-footnotes-3.0.0.tgz", + "integrity": "sha512-ZssAvH9FjGYlJ/PBVKdSmfyPc3Cz4rTWgZLI4iE/SX8Nt5l3o3oEjv3wwG5VD7xOjktzdwp5coac+kJV9l4jgg==", + "dev": true, + "requires": { + "mdast-util-footnote": "^0.1.0", + "micromark-extension-footnote": "^0.3.0" + } + }, + "remark-frontmatter": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/remark-frontmatter/-/remark-frontmatter-3.0.0.tgz", + "integrity": "sha512-mSuDd3svCHs+2PyO29h7iijIZx4plX0fheacJcAoYAASfgzgVIcXGYSq9GFyYocFLftQs8IOmmkgtOovs6d4oA==", + "dev": true, + "requires": { + "mdast-util-frontmatter": "^0.2.0", + "micromark-extension-frontmatter": "^0.2.0" + } + }, + "remark-gfm": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/remark-gfm/-/remark-gfm-1.0.0.tgz", + "integrity": "sha512-KfexHJCiqvrdBZVbQ6RopMZGwaXz6wFJEfByIuEwGf0arvITHjiKKZ1dpXujjH9KZdm1//XJQwgfnJ3lmXaDPA==", + "dev": true, + "requires": { + "mdast-util-gfm": "^0.1.0", + "micromark-extension-gfm": "^0.3.0" + } + }, + "remark-parse": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-9.0.0.tgz", + "integrity": "sha512-geKatMwSzEXKHuzBNU1z676sGcDcFoChMK38TgdHJNAYfFtsfHDQG7MoJAjs6sgYMqyLduCYWDIWZIxiPeafEw==", + "dev": true, + "requires": { + "mdast-util-from-markdown": "^0.8.0" + } + }, + "remove-markdown": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/remove-markdown/-/remove-markdown-0.6.4.tgz", + "integrity": "sha512-BompiLClzjfh46irZmzv+1Q61jZYlKN3iq/hzae9EOUwf7ctr/5wpD4qwgn/FWDAYE18RORO7z/yr+HXZJCY8Q==", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", + "dev": true + }, "requizzle": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/requizzle/-/requizzle-0.2.4.tgz", @@ -8657,6 +11540,12 @@ "supports-preserve-symlinks-flag": "^1.0.0" } }, + "reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "dev": true + }, "rolldown": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.5.tgz", @@ -8718,6 +11607,15 @@ "fsevents": "~2.3.2" } }, + "run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "requires": { + "queue-microtask": "^1.2.2" + } + }, "semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", @@ -8751,6 +11649,12 @@ "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", "dev": true }, + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true + }, "smob": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/smob/-/smob-1.5.0.tgz", @@ -8779,6 +11683,44 @@ "source-map": "^0.6.0" } }, + "spdx-correct": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", + "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.23", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.23.tgz", + "integrity": "sha512-CWLcCCH7VLu13TgOH+r8p1O/Znwhqv/dbb6lqWy67G+pT1kHmeD/+V36AVb/vq8QMIQwVShJ6Ssl5FPh0fuSdw==", + "dev": true + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true + }, "stackback": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", @@ -8791,12 +11733,30 @@ "integrity": "sha512-oCUKSupKTHX53EyjDtuZQ64pjLJ6yYCtpmEw0goYxtjG9KpbRe8KAsl2tBUGU9DyMcJ0RwJ8GqJAFzMXcXW1Rw==", "dev": true }, + "strip-indent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", + "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", + "dev": true, + "requires": { + "min-indent": "^1.0.0" + } + }, "strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true }, + "structured-source": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/structured-source/-/structured-source-4.0.0.tgz", + "integrity": "sha512-qGzRFNJDjFieQkl/sVOI2dUjHKRyL9dAJi2gCPGJLbJHBIkyOHxjuocpIEfbLioX+qSJpvbYdT49/YCdMznKxA==", + "dev": true, + "requires": { + "boundary": "^2.0.0" + } + }, "supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", @@ -8858,6 +11818,33 @@ "integrity": "sha512-yau8yJdTt989Mm0Bd/236QnzEiPf2xLLTqUZRUJOo/3CB078LSwzei343DgtJVmfJKJE3TMINY1u42SQsP6mXw==", "dev": true }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, + "transform-markdown-links": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/transform-markdown-links/-/transform-markdown-links-2.1.0.tgz", + "integrity": "sha512-7HWQwQ9US+tJSMMzi1aP+KA3QwfjDs8sB4H5GBMRHFNBMQVdgoF6VfIFy2nJR/UHRTkYoGFwWh2pe+QIwSvfOA==", + "dev": true + }, + "trim-newlines": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz", + "integrity": "sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==", + "dev": true + }, + "trough": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/trough/-/trough-1.0.5.tgz", + "integrity": "sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA==", + "dev": true + }, "ts-api-utils": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.5.0.tgz", @@ -8874,33 +11861,36 @@ "prelude-ls": "^1.2.1" } }, + "type-fest": { + "version": "0.18.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz", + "integrity": "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==", + "dev": true + }, "typedoc": { - "version": "0.28.18", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.28.18.tgz", - "integrity": "sha512-NTWTUOFRQ9+SGKKTuWKUioUkjxNwtS3JDRPVKZAXGHZy2wCA8bdv2iJiyeePn0xkmK+TCCqZFT0X7+2+FLjngA==", + "version": "0.28.20", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.28.20.tgz", + "integrity": "sha512-uSKqkh8Cr48vllnEy+jdaAgOeR6Y+QCBW7usgUsKj7gJEfR7stw9U/fE49LBnj2tPRKPY0c0EBJSWe9Appmplg==", "dev": true, - "peer": true, "requires": { "@gerrit0/mini-shiki": "^3.23.0", "lunr": "^2.3.9", - "markdown-it": "^14.1.1", - "minimatch": "^10.2.4", - "yaml": "^2.8.2" + "markdown-it": "^14.3.0", + "minimatch": "^10.2.5", + "yaml": "^2.9.0" }, "dependencies": { "balanced-match": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", - "dev": true, - "peer": true + "dev": true }, "brace-expansion": { "version": "5.0.9", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz", "integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==", "dev": true, - "peer": true, "requires": { "balanced-match": "^4.0.2" } @@ -8910,7 +11900,6 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz", "integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==", "dev": true, - "peer": true, "requires": { "brace-expansion": "^5.0.5" } @@ -8988,6 +11977,69 @@ "integrity": "sha512-hpbDzxUY9BFwX+UeBnxv3Sh1q7HFxj48DTmXchNgRa46lO8uj3/1iEn3MiNUYTg1g9ctIqXCCERn8gYZhHC5lQ==", "dev": true }, + "unified": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/unified/-/unified-9.2.2.tgz", + "integrity": "sha512-Sg7j110mtefBD+qunSLO1lqOEKdrwBFBrR6Qd8f4uwkhWNlbkaqwHse6e7QvD3AP/MNoJdEDLaf8OxYyoWgorQ==", + "dev": true, + "requires": { + "bail": "^1.0.0", + "extend": "^3.0.0", + "is-buffer": "^2.0.0", + "is-plain-obj": "^2.0.0", + "trough": "^1.0.0", + "vfile": "^4.0.0" + }, + "dependencies": { + "is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true + } + } + }, + "unist-util-is": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.1.0.tgz", + "integrity": "sha512-ZOQSsnce92GrxSqlnEEseX0gi7GH9zTJZ0p9dtu87WRb/37mMPO2Ilx1s/t9vBHrFhbgweUwb+t7cIn5dxPhZg==", + "dev": true + }, + "unist-util-stringify-position": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz", + "integrity": "sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==", + "dev": true, + "requires": { + "@types/unist": "^2.0.2" + }, + "dependencies": { + "@types/unist": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", + "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", + "dev": true + } + } + }, + "unist-util-visit-parents": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.1.1.tgz", + "integrity": "sha512-1KROIZWo6bcMrZEwiH2UrXDyalAa0uqzWCxCJj6lPOvTve2WkfgCytoDTPaMnodXh1WrXOq0haVYHj99ynJlsg==", + "dev": true, + "requires": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + }, + "dependencies": { + "@types/unist": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", + "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", + "dev": true + } + } + }, "update-browserslist-db": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz", @@ -9007,6 +12059,54 @@ "punycode": "^2.1.0" } }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "vfile": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-4.2.1.tgz", + "integrity": "sha512-O6AE4OskCG5S1emQ/4gl8zK586RqA3srz3nfK/Viy0UPToBc5Trp9BVFb1u0CjsKrAWwnpr4ifM/KBXPWwJbCA==", + "dev": true, + "requires": { + "@types/unist": "^2.0.0", + "is-buffer": "^2.0.0", + "unist-util-stringify-position": "^2.0.0", + "vfile-message": "^2.0.0" + }, + "dependencies": { + "@types/unist": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", + "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", + "dev": true + } + } + }, + "vfile-message": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-2.0.4.tgz", + "integrity": "sha512-DjssxRGkMvifUOJre00juHoP9DPWuzjxKuMDrhNbk2TdaYYBNMStsNhEOt3idrtI12VQYM/1+iM0KOzXi4pxwQ==", + "dev": true, + "requires": { + "@types/unist": "^2.0.0", + "unist-util-stringify-position": "^2.0.0" + }, + "dependencies": { + "@types/unist": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", + "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", + "dev": true + } + } + }, "vite": { "version": "8.2.2", "resolved": "https://registry.npmjs.org/vite/-/vite-8.2.2.tgz", @@ -9103,17 +12203,28 @@ "dev": true }, "yaml": { - "version": "2.8.3", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.3.tgz", - "integrity": "sha512-AvbaCLOO2Otw/lW5bmh9d/WEdcDFdQp2Z2ZUH3pX9U2ihyUY0nvLv7J6TrWowklRGPYbB/IuIMfYgxaCPg5Bpg==", - "dev": true, - "peer": true + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.9.0.tgz", + "integrity": "sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA==", + "dev": true + }, + "yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true }, "yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true + }, + "zwitch": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-1.0.5.tgz", + "integrity": "sha512-V50KMwwzqJV0NpZIZFwfOD5/lyny3WlSzRiXgA0G7VUnRlqttta1L6UQIHzd6EuBY/cHGfwTIck7w1yH6Q5zUw==", + "dev": true } } } diff --git a/package.json b/package.json index 5c16815..a31214b 100644 --- a/package.json +++ b/package.json @@ -5,9 +5,8 @@ "version": "3.2.6", "scripts": { "build": "NODE_ENV=production rollup -c", - "build:all": "npm run build && npm run build:types && npm run build:docs", - "build:docs": "echo '# Numfmt API\n'>API.md; jsdoc -t node_modules/@borgar/jsdoc-tsmd -d console lib>>API.md", - "build:types": "jsdoc -c tsd.json lib>dist/numfmt.d.ts", + "build:all": "npm run build && npm run docs", + "docs": "typedoc && concat-md tempdocs > API.md && rm -rf tempdocs", "check": "npm run test && npm run lint && npm run typecheck", "lint": "eslint lib test", "release": "git diff --exit-code && PACKAGE_VERSION=$(jq -r .version package.json) && echo \"About to tag and push v$PACKAGE_VERSION. Continue? (y/n)\" && read -r REPLY && [ \"$REPLY\" = \"y\" ] && git tag --annotate v$PACKAGE_VERSION --message=v$PACKAGE_VERSION && git push origin v$PACKAGE_VERSION", @@ -49,15 +48,16 @@ "@babel/core": "^7.29.7", "@babel/preset-env": "~7.29.7", "@borgar/eslint-config": "~4.1.0", - "@borgar/jsdoc-tsmd": "~0.2.2", "@eslint/js": "~10.0.1", "@rollup/plugin-babel": "~7.1.0", "@rollup/plugin-terser": "~1.0.0", "@types/node": "~26.3.0", + "concat-md": "~0.5.1", "eslint": "~10.9.1", "globals": "~17.11.0", "jsdoc": "~4.0.5", "rollup": "~4.62.5", + "typedoc": "~0.28.20", "typedoc-plugin-markdown": "~4.12.0", "typescript": "~5.9.3", "typescript-eslint": "~8.68.0", diff --git a/tsd.json b/tsd.json deleted file mode 100644 index ab07f5f..0000000 --- a/tsd.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "source": { - "includePattern": ".+\\.js(doc|x)?$", - "excludePattern": "((^|\\/|\\\\)_|spec\\.js$)" - }, - "opts": { - "template": "node_modules/@borgar/jsdoc-tsmd", - "destination": "console", - "output": "typescript", - "validate": true - } -} diff --git a/typedoc.json b/typedoc.json new file mode 100644 index 0000000..e713761 --- /dev/null +++ b/typedoc.json @@ -0,0 +1,35 @@ +{ + "plugin": ["typedoc-plugin-markdown"], + "out": "./tempdocs", + "entryPoints": ["lib/index.ts"], + "cleanOutputDir": true, + "readme": "none", + "headings": { + "readme": false, + "document": false + }, + "hidePageHeader": true, + "hideBreadcrumbs": true, + "hideGenerator": true, + "useCodeBlocks": true, + "expandObjects": true, + "expandParameters": true, + "propertiesFormat": "table", + "parametersFormat": "table", + "interfacePropertiesFormat": "table", + "typeAliasPropertiesFormat": "table", + "propertyMembersFormat": "table", + "typeDeclarationFormat": "table", + "disableSources": true, + "excludeInternal": true, + "excludePrivate": true, + "excludeProtected": true, + "pageTitleTemplates": { + "member": "{name}" + }, + "validation": { + "invalidLink": false, + "notExported": true, + "notDocumented": true + } +} From b8b200bab73947df0ca4af7123bbcbf67b8ecbc1 Mon Sep 17 00:00:00 2001 From: Borgar Date: Fri, 28 Aug 2026 14:47:45 +0000 Subject: [PATCH 08/14] Clean up API's and ensure docs are nice --- API.md | 1213 ++++++++++++++++++++++++------------- lib/formatNumber.ts | 4 +- lib/index.ts | 266 ++++---- lib/locale.ts | 75 +-- lib/parseFormatSection.ts | 8 +- lib/parseValue.ts | 108 ++-- lib/round.ts | 8 +- lib/serialDate.ts | 27 +- lib/tokenize.ts | 24 +- lib/types.ts | 55 +- test/color.spec.ts | 14 +- test/date-parsing.spec.ts | 1 - test/parseValue.spec.ts | 24 +- test/robust-mode.spec.ts | 2 +- 14 files changed, 1113 insertions(+), 716 deletions(-) diff --git a/API.md b/API.md index 32ecb40..a257c81 100644 --- a/API.md +++ b/API.md @@ -1,109 +1,121 @@ -# Numfmt API - -**Functions** - -- [addLocale( localeSettings, l4e )](#addLocale) -- [dateFromSerial( serialDate, _\[options\]_ )](#dateFromSerial) -- [dateToSerial( date, _\[options\]_ )](#dateToSerial) -- [format( pattern, value, _\[options\]_ )](#format) -- [formatColor( pattern, value, _\[options\]_ )](#formatColor) -- [getFormatDateInfo( pattern )](#getFormatDateInfo) -- [getFormatInfo( pattern, _\[options\]_ )](#getFormatInfo) -- [getLocale( locale )](#getLocale) -- [isDateFormat( pattern )](#isDateFormat) -- [isPercentFormat( pattern )](#isPercentFormat) -- [isTextFormat( pattern )](#isTextFormat) -- [isValidFormat( pattern )](#isValidFormat) -- [parseBool( value, _\[options\]_ )](#parseBool) -- [parseDate( value, _\[options\]_ )](#parseDate) -- [parseLocale( locale )](#parseLocale) -- [parseNumber( value, _\[options\]_ )](#parseNumber) -- [parseTime( value, _\[options\]_ )](#parseTime) -- [parseValue( value, _\[options\]_ )](#parseValue) -- [round( number, _\[places\]_ )](#round) -- [tokenize( pattern )](#tokenize) - -**Constant** - -- [tokenTypes](#tokenTypes) - -**Types** - -- [FormatDateInfo](#FormatDateInfo) -- [FormatInfo](#FormatInfo) -- [FormatToken](#FormatToken) -- [LocaleData](#LocaleData) -- [LocaleToken](#LocaleToken) -- [ParseData](#ParseData) + + + +# numfmt + +The numfmt library formats numbers according to a specifier string as defined in ECMA-376. +The library tries its best to emulate the inns and outs of what the Excel spreadsheet +software does. + +## Type Aliases + +- [FormatDateInfo](#type-aliasesformatdateinfomd) +- [FormatInfo](#type-aliasesformatinfomd) +- [FormatOptions](#type-aliasesformatoptionsmd) +- [LocaleData](#type-aliaseslocaledatamd) +- [LocaleToken](#type-aliaseslocaletokenmd) +- [ParseDataBool](#type-aliasesparsedataboolmd) +- [ParseDataNum](#type-aliasesparsedatanummd) +- [Token](#type-aliasestokenmd) +- [TokenType](#type-aliasestokentypemd) ## Functions -### # addLocale( localeSettings, l4e ) ⇒ [`LocaleData`](#LocaleData) +- [addLocale](#functionsaddlocalemd) +- [dateFromSerial](#functionsdatefromserialmd) +- [dateToSerial](#functionsdatetoserialmd) +- [format](#functionsformatmd) +- [formatColor](#functionsformatcolormd) +- [getFormatDateInfo](#functionsgetformatdateinfomd) +- [getFormatInfo](#functionsgetformatinfomd) +- [getLocale](#functionsgetlocalemd) +- [isDateFormat](#functionsisdateformatmd) +- [isPercentFormat](#functionsispercentformatmd) +- [isTextFormat](#functionsistextformatmd) +- [isValidFormat](#functionsisvalidformatmd) +- [parseBool](#functionsparseboolmd) +- [parseDate](#functionsparsedatemd) +- [parseLocale](#functionsparselocalemd) +- [parseNumber](#functionsparsenumbermd) +- [parseTime](#functionsparsetimemd) +- [parseValue](#functionsparsevaluemd) +- [round](#functionsroundmd) +- [tokenize](#functionstokenizemd) + + + + +# addLocale() + +```ts +function addLocale(localeSettings: Partial, l4e: string): LocaleData; +``` -Register locale data for a language so for use when formatting. +Register locale data for a language to use when formatting. Any partial set of properties may be returned to have the defaults used where properties are missing. -**See also:** {LocaleData}. +## Parameters -##### Parameters +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `localeSettings` | `Partial`\<[`LocaleData`](#type-aliaseslocaledatamd)\> | A collection of settings for a locale. | +| `l4e` | `string` | A string BCP 47 tag of the locale. | -| Name | Type | Default | Description | -| -------------------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | -| localeSettings | `object` | | A collection of settings for a locale. | -| localeSettings.[ampm] | `Array` | `["AM","PM"]` | How AM and PM should be presented. | -| localeSettings.[bool] | `Array` | `["TRUE", "FALSE"]` | How TRUE and FALSE should be presented. | -| localeSettings.[ddd] | `Array` | `["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]` | Shortened day names (e.g. `Wed`) | -| localeSettings.[dddd] | `Array` | `["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]` | Long day names (e.g. `Wednesday`) | -| localeSettings.[decimal] | `string` | `"."` | Symbol used to separate integers from fractions (usually `.`) | -| localeSettings.[exponent] | `string` | `"E"` | Symbol used to indicate an exponent (usually `E`) | -| localeSettings.[group] | `string` | `"\u00a0"` | Symbol used as a grouping separator (`1,000,000` uses `,`) | -| localeSettings.[infinity] | `string` | `"∞"` | Symbol used to indicate infinite values (`∞`) | -| localeSettings.[mmm] | `Array` | `["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]` | Short month names for the Gregorian calendar (e.g. `Nov`) | -| localeSettings.[mmm6] | `Array` | `["Muh.", "Saf.", "Rab. I", "Rab. II", "Jum. I", "Jum. II", "Raj.", "Sha.", "Ram.", "Shaw.", "Dhuʻl-Q.", "Dhuʻl-H."]` | Short month names for the Islamic calendar (e.g. `Raj.`) | -| localeSettings.[mmmm] | `Array` | `["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]` | Long month names for the Gregorian calendar (e.g. `November`) | -| localeSettings.[mmmm6] | `Array` | `["Muharram", "Safar", "Rabiʻ I", "Rabiʻ II", "Jumada I", "Jumada II", "Rajab", "Shaʻban", "Ramadan", "Shawwal", "Dhuʻl-Qiʻdah", "Dhuʻl-Hijjah"]` | Long month names for the Islamic calendar (e.g. `Rajab`) | -| localeSettings.[nan] | `string` | `"NaN"` | Symbol used to indicate NaN values (`NaN`) | -| localeSettings.[negative] | `string` | `"-"` | Symbol used to indicate positive numbers (usually `-`) | -| localeSettings.[percent] | `string` | `"%"` | Symbol used to indicate a percentage (usually `%`) | -| localeSettings.[positive] | `string` | `"+"` | Symbol used to indicate positive numbers (usually `+`) | -| localeSettings.[preferMDY] | `boolean` | `false` | Is the prefered date format month first (12/31/2025) or day first (31/12/2025) | -| l4e | `string` | | A string BCP 47 tag of the locale. | +## Returns -##### Returns +[`LocaleData`](#type-aliaseslocaledatamd) -[`LocaleData`](#LocaleData) – - A full collection of settings for a locale +A full collection of settings for a locale ---- -### # dateFromSerial( serialDate, _[options = `{}`]_ ) ⇒ `Array` + -Convert a spreadsheet serial date to an array of date parts. Accurate to a second. +# dateFromSerial() + +```ts +function dateFromSerial(serialDate: number, options?: { + leap1900?: boolean; +}): [number, number, number, number, number, number]; +``` + +Convert a spreadsheet serial date to an array of date parts. +Accurate to a second. ```js // output as [ Y, M, D, h, m, s ] dateFromSerial(28627); // [ 1978, 5, 17, 0, 0, 0 ] -```` +``` + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `serialDate` | `number` | The date | +| `options?` | \{ `leap1900?`: `boolean`; \} | Options for this method | +| `options.leap1900?` | `boolean` | Simulate the Lotus 1-2-3 [1900 leap year bug](https://docs.microsoft.com/en-us/office/troubleshoot/excel/wrongly-assumes-1900-is-leap-year). True by default. | + +## Returns -##### Parameters +\[`number`, `number`, `number`, `number`, `number`, `number`\] -| Name | Type | Default | Description | -| ------------------ | --------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -| serialDate | `number` | | The date | -| [options] | `object` | `{}` | The options | -| [options].leap1900 | `boolean` | `true` | Simulate the Lotus 1-2-3 [1900 leap year bug](https://docs.microsoft.com/en-us/office/troubleshoot/excel/wrongly-assumes-1900-is-leap-year). | +returns an array of date parts with parts in descending order: [ year, month, day, hour, minute, second ] -##### Returns -`Array` – returns an array of date parts + ---- +# dateToSerial() -### # dateToSerial( date, _[options = `{}`]_ ) ⇒ `number` | `null` +```ts +function dateToSerial(date: number[] | Date, options?: { + ignoreTimezone?: boolean; +}): number | undefined; +``` -Convert a native JavaScript Date, or array to an spreadsheet serial date. +Convert a native JavaScript Date, or an array of date parts to an spreadsheet serial date. -Returns a serial date number if input was a Date object or an array of numbers, a null. +Returns a serial date number if input was a Date object or an array of +numbers, else a null. ```js // input as Date @@ -112,318 +124,458 @@ dateToSerial(new Date(1978, 5, 17)); // 28627 dateToSerial([ 1978, 5, 17 ]); // 28627 // other input dateToSerial("something else"); // null -```` +``` + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `date` | `number`[] \| `Date` | A Date instance or an array of date parts in descending order. | +| `options?` | \{ `ignoreTimezone?`: `boolean`; \} | Options for this method | +| `options.ignoreTimezone?` | `boolean` | Normally time zone will be taken into account. This makes the conversion to serial date ignore the timezone offset. | -##### Parameters +## Returns -| Name | Type | Default | Description | -| ------------------------ | ------------------------- | ------- | --------------------------------------------------------------------------------------------------------------------- | -| date | `Date` \| `Array` | | The date | -| [options] | `object` | `{}` | Options | -| [options].ignoreTimezone | `boolean` | `false` | Normally time zone will be taken into account. This makes the conversion to serial date ignore the timezone offset. | +`number` \| `undefined` -##### Returns +The date as a spreadsheet serial date, or undefined. -`number` | `null` – The date as a spreadsheet serial date, or null. ---- + -### # format( pattern, value, _[options = `{}`]_ ) ⇒ `string` +# format() + +```ts +function format( + pattern: string, + value: any, + options?: Partial): string; +``` Formats a value as a string and returns the result. -- Dates are normalized to spreadsheet style serial dates and then formatted. - Booleans are emitted as uppercase "TRUE" or "FALSE". - Null and Undefined will return an empty string "". - Any non number values will be stringified and passed through the text section of the format pattern. - NaNs and infinites will use the corresponding strings from the active locale. +- Dates are normalized to spreadsheet style serial dates and then formatted. +- Booleans are emitted as uppercase `TRUE` or `FALSE`. +- `null` and `undefined` will return an empty string `""`. +- Any non number values will be stringified and passed through the text section of the format pattern. +- `NaN`s and `Infinite`s will use the corresponding strings from the active locale. + +## Parameters -##### Parameters +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `pattern` | `string` | A format pattern in the ECMA-376 number format. | +| `value` | `any` | The value to format. | +| `options?` | `Partial`\<[`FormatOptions`](#type-aliasesformatoptionsmd)\> | Formatter options | -| Name | Type | Default | Description | -| --------------------------- | --------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| pattern | `string` | | A format pattern in the ECMA-376 number format. | -| value | `any` | | The value to format. | -| [options] | `object` | `{}` | Options | -| [options].bigintErrorNumber | `boolean` | `false` | Should the formatter switch to a plain string number format when trying to format a bigint that is out of bounds? | -| [options].dateErrorNumber | `boolean` | `true` | Should the formatter switch to a General number format when trying to format a date that is out of bounds? | -| [options].dateErrorThrows | `boolean` | `false` | Should the formatter throw an error when trying to format a date that is out of bounds? | -| [options].dateSpanLarge | `boolean` | `true` | Extends the allowed range of dates from Excel bounds (1900–9999) to Google Sheet bounds (0–99999). | -| [options].fillChar | `boolean` | `""` | When the formatter encounters `*` it normally emits nothing instead of the `*` and the next character (like Excel TEXT function does). Setting this to a character will make the formatter emit that followed by the next one. | -| [options].ignoreTimezone | `boolean` | `false` | Normally when date objects are used with the formatter, time zone is taken into account. This makes the formatter ignore the timezone offset. | -| [options].invalid | `string` | `"######"` | The string emitted when no-throw mode fails to parse a pattern. | -| [options].leap1900 | `boolean` | `true` | Simulate the Lotus 1-2-3 [1900 leap year bug](https://docs.microsoft.com/en-us/office/troubleshoot/excel/wrongly-assumes-1900-is-leap-year). It is a requirement in the Ecma OOXML specification so it is on by default. | -| [options].locale | `string` | `""` | A BCP 47 string tag. Locale default is english with a `\u00a0` grouping symbol (see [addLocale](#addLocale)) | -| [options].nbsp | `boolean` | `false` | By default the output will use a regular space, but in many cases you may desire a non-breaking-space instead. | -| [options].overflow | `string` | `"######"` | The string emitted when a formatter fails to format a date that is out of bounds. | -| [options].skipChar | `boolean` | `""` | When the formatter encounters `_` it normally emits a single space instead of the `_` and the next character (like Excel TEXT function does). Setting this to a character will make the formatter emit that followed by the next one. | -| [options].throws | `boolean` | `true` | Should the formatter throw an error if a provided pattern is invalid. If false, a formatter will be constructed which instead outputs an error string (see _invalid_ in this table). | +## Returns -##### Returns +`string` -`string` – A formatted value +A formatted value ---- -### # formatColor( pattern, value, _[options = `{}`]_ ) ⇒ `string` | `number` | `null` + + +# formatColor() + +```ts +function formatColor( + pattern: string, + value: any, + options?: { + ignoreTimezone?: boolean; + indexColors?: boolean; + throws?: boolean; +}): string | number | undefined; +``` Find the color appropriate to a value as dictated by a format pattern. -If the pattern defines colors, this function will emit the color appropriate to the value. If no colors were specified this function returns `undefined`. +If the pattern defines colors, this function will emit the color appropriate +to the value. If no colors were specified this function returns `undefined`. ```js const color = formatColor("[green]#,##0;[red]-#,##0", -10); console.log(color); // "red" const color = formatColor("[green]#,##0;-#,##0", -10); -console.log(color); // null +console.log(color); // undefined ``` -##### Parameters +## Parameters -| Name | Type | Default | Description | -| ------------------------ | --------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| pattern | `string` | | A format pattern in the ECMA-376 number format. | -| value | `any` | | The value to format. | -| [options] | `object` | `{}` | Options | -| [options].ignoreTimezone | `boolean` | `false` | Normally when date objects are used with the formatter, time zone is taken into account. This makes the formatter ignore the timezone offset. | -| [options].indexColors | `boolean` | `true` | When indexed color modifiers are used (`[Color 1]`) the formatter will convert the index into the corresponding hex color of the default palette. When this option is set to false, the number will instead by emitted allowing you to index against a custom palette. | -| [options].throws | `boolean` | `true` | Should the formatter throw an error if a provided pattern is invalid. If false, a formatter will be constructed which instead outputs an error string (see _invalid_ in this table). | +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `pattern` | `string` | A format pattern in the ECMA-376 number format. | +| `value` | `any` | The value to format. | +| `options?` | \{ `ignoreTimezone?`: `boolean`; `indexColors?`: `boolean`; `throws?`: `boolean`; \} | Formatter options | +| `options.ignoreTimezone?` | `boolean` | Normally when date objects are used with the formatter, time zone is taken into account. This makes the formatter ignore the timezone offset. `false` by default. | +| `options.indexColors?` | `boolean` | When indexed color modifiers are used (`[Color 1]`) the formatter will convert the index into the corresponding hex color of the default palette. When this option is set to false, the number will instead by emitted allowing you to index against a custom palette. `true` by default. | +| `options.throws?` | `boolean` | Should the formatter throw an error if a provided pattern is invalid. If false, a formatter will be constructed which instead outputs an error string (see _invalid_ in this table). `true` by default. | -##### Returns +## Returns -`string` | `number` | `null` – A string color value as described by the pattern or a number if the indexColors option has been set to false. +`string` \| `number` \| `undefined` ---- +A string color value as described by the pattern or a number if the + indexColors option has been set to false. -### # getFormatDateInfo( pattern ) ⇒ [`FormatDateInfo`](#FormatDateInfo) -Gets information about date codes use in a format string. + -##### Parameters +# getFormatDateInfo() -| Name | Type | Description | -| ------- | -------- | ----------------------------------------------- | -| pattern | `string` | A format pattern in the ECMA-376 number format. | +```ts +function getFormatDateInfo(pattern: string): FormatDateInfo; +``` + +Gets information about how date codes are used in a format string. -##### Returns +## Parameters -[`FormatDateInfo`](#FormatDateInfo) – An object of format date properties. +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `pattern` | `string` | A format pattern in the ECMA-376 number format. | ---- +## Returns -### # getFormatInfo( pattern, _[options = `{}`]_ ) ⇒ [`FormatInfo`](#FormatInfo) +[`FormatDateInfo`](#type-aliasesformatdateinfomd) -Returns an object detailing the properties and internals of a format parsed format pattern. +An object of format date properties. -##### Parameters -| Name | Type | Default | Description | -| ------------------ | -------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| pattern | `string` | | A format pattern in the ECMA-376 number format. | -| [options] | `object` | `{}` | Options | -| [options].currency | `string` | | Limit the patterns identified as currency to those that use the give string. If nothing is provided, patterns will be tagged as currency if one of the following currency symbols is used: ¤$£¥֏؋৳฿៛₡₦₩₪₫€₭₮₱₲₴₸₹₺₼₽₾₿ | + -##### Returns +# getFormatInfo() -[`FormatInfo`](#FormatInfo) – An object of format properties. +```ts +function getFormatInfo(pattern: string, options?: { + currency?: string; +}): FormatInfo; +``` ---- +Returns an object detailing the properties and internals of a format parsed +format pattern. -### # getLocale( locale ) ⇒ [`LocaleData`](#LocaleData) | `null` +## Parameters -Used by the formatter to pull a locate from its registered locales. If subtag isn't available but the base language is, the base language is used. So if `en-CA` is not found, the formatter tries to find `en` else it returns a `null`. +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `pattern` | `string` | A format pattern in the ECMA-376 number format. | +| `options?` | \{ `currency?`: `string`; \} | Options for the method | +| `options.currency?` | `string` | Limit the patterns identified as currency to those that use the give string. If nothing is provided, patterns will be tagged as currency if one of the following currency symbols is used: `¤$£¥֏؋৳฿៛₡₦₩₪₫€₭₮₱₲₴₸₹₺₼₽₾₿` | -##### Parameters +## Returns -| Name | Type | Description | -| ------ | -------- | ----------------------------------------------------------- | -| locale | `string` | A BCP 47 string tag of the locale, or an Excel locale code. | +[`FormatInfo`](#type-aliasesformatinfomd) -##### Returns +An object of format properties. -[`LocaleData`](#LocaleData) | `null` – - An object of format date properties. ---- + -### # isDateFormat( pattern ) ⇒ `boolean` +# getLocale() + +```ts +function getLocale(locale: string | number): LocaleData | undefined; +``` + +Used by the formatter to pull a locate from its registered locales. If +subtag isn't available but the base language is, the base language is used: +So if `en-CA` is not found, the formatter tries to find `en` else it +returns `undefined`. + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `locale` | `string` \| `number` | A BCP 47 string tag of the locale, or an Excel locale code. | + +## Returns + +[`LocaleData`](#type-aliaseslocaledatamd) \| `undefined` + +An object of format date properties if one was found. + + + + +# isDateFormat() + +```ts +function isDateFormat(pattern: string): boolean; +``` Determine if a given format pattern is a date pattern. -The pattern is considered a date pattern if any of its sections contain a date symbol (such as `Y` or `H`). Each section is restricted to be _either_ a number or date format. +The pattern is considered a date pattern if any of its sections (`"a;b;c;d"`) +contains a date operator (such as `Y` or `H`). Each section is restricted to be +_either_ a number or date format. -##### Parameters +## Parameters -| Name | Type | Description | -| ------- | -------- | ----------------------------------------------- | -| pattern | `string` | A format pattern in the ECMA-376 number format. | +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `pattern` | `string` | A format pattern in the ECMA-376 number format. | -##### Returns +## Returns -`boolean` – True if the specified pattern is date pattern, False otherwise. +`boolean` ---- +True if the specified pattern is date pattern, False otherwise. -### # isPercentFormat( pattern ) ⇒ `boolean` + + + +# isPercentFormat() + +```ts +function isPercentFormat(pattern: string): boolean; +``` Determine if a given format pattern is a percentage pattern. -The pattern is considered a percentage pattern if any of its sections contains an unescaped percentage symbol. +The pattern is considered a percentage pattern if any of its sections (`"a;b;c;d"`) +contains an unescaped percentage symbol. + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `pattern` | `string` | A format pattern in the ECMA-376 number format. | -##### Parameters +## Returns -| Name | Type | Description | -| ------- | -------- | ----------------------------------------------- | -| pattern | `string` | A format pattern in the ECMA-376 number format. | +`boolean` -##### Returns +True if the specified pattern is date pattern, False otherwise. -`boolean` – True if the specified pattern is date pattern, False otherwise. ---- + -### # isTextFormat( pattern ) ⇒ `boolean` +# isTextFormat() + +```ts +function isTextFormat(pattern: string): boolean; +``` Determine if a given format pattern is a text only pattern. -The pattern is considered text only if its definition is composed of a single section that includes that text symbol (`@`). +The pattern is considered text only if its definition is composed of a single +section that includes that text symbol (`@`). For example `@` or `@" USD"` are text patterns but `#;@` is not. -##### Parameters +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `pattern` | `string` | A format pattern in the ECMA-376 number format. | -| Name | Type | Description | -| ------- | -------- | ----------------------------------------------- | -| pattern | `string` | A format pattern in the ECMA-376 number format. | +## Returns -##### Returns +`boolean` -`boolean` – True if the specified pattern is date pattern, False otherwise. +True if the specified pattern is date pattern, False otherwise. ---- -### # isValidFormat( pattern ) ⇒ `boolean` + + +# isValidFormat() + +```ts +function isValidFormat(pattern: string): boolean; +``` Determine if a given format pattern is valid. -##### Parameters +## Parameters -| Name | Type | Description | -| ------- | -------- | ----------------------------------------------- | -| pattern | `string` | A format pattern in the ECMA-376 number format. | +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `pattern` | `string` | A format pattern in the ECMA-376 number format. | -##### Returns +## Returns -`boolean` – True if the specified pattern is valid, False otherwise. +`boolean` ---- +True if the specified pattern is valid, False otherwise. -### # parseBool( value, _[options = `{}`]_ ) ⇒ [`ParseData`](#ParseData) | `null` -Parse a string input and return its boolean value. If the input was not recognized or valid, the function returns a `null`, for valid input it returns an object with one property: + + +# parseBool() + +```ts +function parseBool(value: string, options?: { + locale?: string; +}): ParseDataBool | undefined; +``` + +Parse a string input and return its equivalent boolean value. If the input was not +recognized or valid, the function returns an `undefined`, for valid input it +returns an object with a single property: - `v`: the parsed value. -**See also:** [parseValue](#parseValue). +## Parameters -##### Parameters +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `value` | `string` | The supposed boolean to parse | +| `options?` | \{ `locale?`: `string`; \} | Options for the parser | +| `options.locale?` | `string` | A BCP 47 string tag. Locale default is english with a `\u00a0` grouping symbol (see [addLocale](#addLocale)) | -| Name | Type | Default | Description | -| ---------------- | -------- | ------- | --------------------------------------------------------------------------------------------------------------- | -| value | `string` | | The supposed boolean to parse | -| [options] | `object` | `{}` | Options | -| [options].locale | `string` | `""` | A BCP 47 string tag. Locale default is english with a `\u00a0` grouping symbol (see [addLocale](#addLocale)) | +## Returns -##### Returns +[`ParseDataBool`](#type-aliasesparsedataboolmd) \| `undefined` -[`ParseData`](#ParseData) | `null` – An object of the parsed value and a corresponding format string +An object of the parsed value and a corresponding format string ---- -### # parseDate( value, _[options = `{}`]_ ) ⇒ [`ParseData`](#ParseData) | `null` + -Parse a date or datetime string input and return its value and format. If the input was not recognized or valid, the function returns a `null`, for valid input it returns an object with two properties: +# parseDate() -- `v`: the parsed value. - `z`: the number format of the input (if applicable). +```ts +function parseDate(value: string, options?: { + locale?: string; +}): ParseDataNum | undefined; +``` -**See also:** [parseValue](#parseValue). +Parse a date or datetime string input and return its value and format. If +the input was not recognized or valid, the function returns an `undefined`, for +valid input it returns an object with two properties: -##### Parameters +- `v`: the parsed value. +- `z`: the number format of the input (if applicable). -| Name | Type | Default | Description | -| ---------------- | -------- | ------- | --------------------------------------------------------------------------------------------------------------- | -| value | `string` | | The date to parse | -| [options] | `object` | `{}` | Options | -| [options].locale | `string` | `""` | A BCP 47 string tag. Locale default is english with a `\u00a0` grouping symbol (see [addLocale](#addLocale)) | +## Parameters -##### Returns +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `value` | `string` | The string to parse | +| `options?` | \{ `locale?`: `string`; \} | Options for the parser | +| `options.locale?` | `string` | A BCP 47 string tag. Locale default is english with a `\u00a0` grouping symbol (see [addLocale](#addLocale)) | -[`ParseData`](#ParseData) | `null` – An object of the parsed value and a corresponding format string +## Returns ---- +[`ParseDataNum`](#type-aliasesparsedatanummd) \| `undefined` -### # parseLocale( locale ) ⇒ [`LocaleToken`](#LocaleToken) +An object of the parsed value and a corresponding format string -Parse a regular IETF BCP 47 locale tag and emit an object of its parts. Irregular tags and subtags are not supported. -##### Parameters + -| Name | Type | Description | -| ------ | -------- | ---------------------------------- | -| locale | `string` | A BCP 47 string tag of the locale. | +# parseLocale() -##### Returns +```ts +function parseLocale(locale: string): LocaleToken; +``` -[`LocaleToken`](#LocaleToken) – - An object describing the locale. +Parse a regular IETF BCP 47 locale tag (`en-US`) and emit an object of its parts. +Irregular tags and subtags are not supported. ---- +## Parameters -### # parseNumber( value, _[options = `{}`]_ ) ⇒ [`ParseData`](#ParseData) | `null` +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `locale` | `string` | A BCP 47 string tag of the locale. | -Parse a numeric string input and return its value and format. If the input was not recognized or valid, the function returns a `null`, for valid input it returns an object with two properties: +## Returns -* `v`: the parsed value. * `z`: the number format of the input (if applicable). +[`LocaleToken`](#type-aliaseslocaletokenmd) -**See also:** [parseValue](#parseValue). +An object describing the locale. -##### Parameters -| Name | Type | Default | Description | -| ---------------- | -------- | ------- | --------------------------------------------------------------------------------------------------------------- | -| value | `string` | | The number to parse | -| [options] | `object` | `{}` | Options | -| [options].locale | `string` | `""` | A BCP 47 string tag. Locale default is english with a `\u00a0` grouping symbol (see [addLocale](#addLocale)) | + -##### Returns +# parseNumber() -[`ParseData`](#ParseData) | `null` – An object of the parsed value and a corresponding format string +```ts +function parseNumber(value: string, options?: { + locale?: string; +}): ParseDataNum | undefined; +``` + +Parse a numeric string input and return its value and format. If the input +was not recognized or valid, the function returns a `undefined`, for valid input +it returns an object with two properties: + +* `v`: the parsed value. +* `z`: the number format of the input (if applicable). ---- +## Parameters -### # parseTime( value, _[options = `{}`]_ ) ⇒ [`ParseData`](#ParseData) | `null` +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `value` | `string` | The number to parse | +| `options?` | \{ `locale?`: `string`; \} | Options for the parser | +| `options.locale?` | `string` | A BCP 47 string tag. Locale default is english with a `\u00a0` grouping symbol (see [addLocale](#addLocale)) | -Parse a time string input and return its value and format. If the input was not recognized or valid, the function returns a `null`, for valid input it returns an object with two properties: +## Returns -- `v`: the parsed value. - `z`: the number format of the input (if applicable). +[`ParseDataNum`](#type-aliasesparsedatanummd) \| `undefined` -**See also:** [parseValue](#parseValue). +An object of the parsed value and a corresponding format string -##### Parameters -| Name | Type | Default | Description | -| ---------------- | -------- | ------- | --------------------------------------------------------------------------------------------------------------- | -| value | `string` | | The date to parse | -| [options] | `object` | `{}` | Options | -| [options].locale | `string` | `""` | A BCP 47 string tag. Locale default is english with a `\u00a0` grouping symbol (see [addLocale](#addLocale)) | + -##### Returns +# parseTime() -[`ParseData`](#ParseData) | `null` – An object of the parsed value and a corresponding format string +```ts +function parseTime(value: string, options?: { + locale?: string; +}): ParseDataNum | undefined; +``` + +Parse a time string input and return its value and format. If the input was +not recognized or valid, the function returns a `undefined`, for valid input it +returns an object with two properties: ---- +- `v`: the parsed value. +- `z`: the number format of the input (if applicable). -### # parseValue( value, _[options = `{}`]_ ) ⇒ [`ParseData`](#ParseData) | `null` +## Parameters -Attempt to parse a "spreadsheet input" string input and return its value and format. If the input was not recognized or valid, the function returns a `null`, for valid input it returns an object with two properties: +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `value` | `string` | The date to parse | +| `options?` | \{ `locale?`: `string`; \} | Options for the parser | +| `options.locale?` | `string` | A BCP 47 string tag. Locale default is english with a `\u00a0` grouping symbol (see [addLocale](#addLocale)) | -- `v`: The parsed value. For dates, this will be an Excel style serial date. - `z`: (Optionally) the number format string of the input. This property will not be present if it amounts to the `General` format. +## Returns -`parseValue()` recognizes a wide range of dates and date-times, times, numbers, and booleans. Some examples: +[`ParseDataNum`](#type-aliasesparsedatanummd) \| `undefined` + +An object of the parsed value and a corresponding format string + + + + +# parseValue() + +```ts +function parseValue(value: string, options?: { + locale?: string; +}): + | ParseDataNum + | ParseDataBool + | undefined; +``` + +Attempt to parse a "spreadsheet input" string input and return its value and +format. If the input was not recognized or valid, the function returns an +`undefined`, for valid input it returns an object with two properties: + +- `v`: The parsed value. For dates, this will be an Excel style serial date. +- `z`: (Optionally) the number format string of the input. This property will + not be present if it amounts to the `General` format. + +`parseValue()` recognizes a wide range of dates and date-times, times, +numbers, and booleans. Some examples: ```js // basic number @@ -440,46 +592,73 @@ parseValue("1984-09-10 11:12:13.1234"); // { v: 30935.46681855787, z: "yyyy-mm-d parseValue("false"); // { v: false } ``` -The formatting string outputted may not correspond exactly to the input. Rather, is it composed of certain elements which the input controls. This is comparable to how Microsoft Excel and Google Sheets parse pasted input. Some things you may expect: +The formatting string outputted may not correspond exactly to the input. +Rather, is it composed of certain elements which the input controls. This is +comparable to how Microsoft Excel and Google Sheets parse pasted input. Some +things you may expect: + +- Whitespace is ignored. +- Decimal fractions are always represented by `.00` regardless of how many + digits were shown in the input. +- Negatives denoted by parentheses [`(1,234)`] will not include the + parentheses in the format string (the value will still be negative.) +- All "scientific notation" returns the same format: `0.00E+00`. + +Internally the parser calls, `parseNumber`, `parseDate`, +`parseTime` and `parseBool`. They work in the same way except +with a more limited scope. You may prefer those functions if you are limiting +input to a smaller scope. + +## Parameters -- Whitespace is ignored. - Decimal fractions are always represented by `.00` regardless of how many digits were shown in the input. - Negatives denoted by parentheses [`(1,234)`] will not include the parentheses in the format string (the value will still by negative.) - All "scientific notation" returns the same format: `0.00E+00`. +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `value` | `string` | The value to parse | +| `options?` | \{ `locale?`: `string`; \} | Options for the parser | +| `options.locale?` | `string` | A BCP 47 string tag. Locale default is english with a `\u00a0` grouping symbol (see [addLocale](#functionsaddlocalemd)) | -Internally the parser calls, `parseNumber`, `parseDate`, `parseTime` and `parseBool`. They work in the same way except with a more limited scope. You may want those function if you are limiting input to a smaller scope. +## Returns -Be warned that the parser do not (yet) take locale into account so all input is assumed to be in "en-US". This means that `1,234.5` will parse, but `1.234,5` will not. Similarly, the order of date parts will be US centric. This may change in the future so be careful what options you pass the functions. + \| [`ParseDataNum`](#type-aliasesparsedatanummd) + \| [`ParseDataBool`](#type-aliasesparsedataboolmd) + \| `undefined` -##### Parameters +An object of the parsed value and a corresponding format string -| Name | Type | Default | Description | -| ---------------- | -------- | ------- | --------------------------------------------------------------------------------------------------------------- | -| value | `string` | | The value to parse | -| [options] | `object` | `{}` | Options | -| [options].locale | `string` | `""` | A BCP 47 string tag. Locale default is english with a `\u00a0` grouping symbol (see [addLocale](#addLocale)) | -##### Returns + -[`ParseData`](#ParseData) | `null` – An object of the parsed value and a corresponding format string +# round() ---- +```ts +function round(number: number, places?: number): number; +``` + +Return a number rounded to the specified amount of places. This is the +rounding function used internally by the formatter (symmetric arithmetic +rounding). It rounds the same way Excel does. -### # round( number, _[places]_ ) ⇒ `number` +## Parameters -Return a number rounded to the specified amount of places. This is the rounding function used internally by the formatter (symmetric arithmetic rounding). +| Parameter | Type | Default value | Description | +| ------ | ------ | ------ | ------ | +| `number` | `number` | `undefined` | The number to round. | +| `places?` | `number` | `0` | The number of decimals to round to. | -##### Parameters +## Returns -| Name | Type | Default | Description | -| -------- | -------- | ------- | ----------------------------------- | -| number | `number` | | The number to round. | -| [places] | `number` | `0` | The number of decimals to round to. | +`number` -##### Returns +A rounded number. -`number` – A rounded number. ---- + -### # tokenize( pattern ) ⇒ `Array` +# tokenize() + +```ts +function tokenize(pattern: string): Token[]; +``` Breaks a format pattern string into a list of tokens. @@ -487,181 +666,379 @@ The returned output will be an array of objects representing the tokens: ```js [ - { type: 'zero', value: '0', raw: '0' }, - { type: 'point', value: '.', raw: '.' }, - { type: 'zero', value: '0', raw: '0' }, - { type: 'percent', value: '%', raw: '%' } + { type: TOKEN_ZERO, value: '0', raw: '0' }, + { type: TOKEN_POINT, value: '.', raw: '.' }, + { type: TOKEN_ZERO, value: '0', raw: '0' }, + { type: TOKEN_PERCENT, value: '%', raw: '%' } ] ``` -Token types may be found as an Object as the [`tokenTypes` export](#tokenTypes) of the package. +As well as exported individually, the token type descriptors may be found as +an object collection at the tokenTypes export of the package. -##### Parameters +## Parameters -| Name | Type | Description | -| ------- | -------- | ------------------ | -| pattern | `string` | The format pattern | +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `pattern` | `string` | The format pattern | -##### Returns +## Returns -`Array` – a list of tokens +[`Token`](#type-aliasestokenmd)[] ---- +A list of tokens -## Constant -### # tokenTypes = `Readonly>` + -A dictionary of the types used to identify token variants. +# FormatDateInfo -**See also:** [tokenize](#tokenize). - -##### Properties - -| Name | Type | Description | -| --------- | -------- | ------------------------------------------------------------------- | -| AMPM | `string` | AM/PM operator (`AM/PM`, `A/P`) | -| BREAK | `string` | Semicolon operator indicating a break between format sections (`;`) | -| CALENDAR | `string` | Calendar modifier (`B2`) | -| CHAR | `string` | Single non-operator character (`m`) | -| COLOR | `string` | Color modifier (`[Black]`, `[color 5]`) | -| COMMA | `string` | Plain non-operator comma (`,`) | -| CONDITION | `string` | Condition modifier for a section (`[>=10]`) | -| DATETIME | `string` | Date-time operator (`mmmm`, `YY`) | -| DBNUM | `string` | Number display modifier (`[DBNum23]`) | -| DIGIT | `string` | A digit between 1 and 9 (`3`) | -| DURATION | `string` | Time duration (`[ss]`) | -| ERROR | `string` | Unidentifiable or illegal character (`Ň`) | -| ESCAPED | `string` | Escaped character (`\E`) | -| EXP | `string` | Exponent operator (`E+`) | -| FILL | `string` | Fill with char operator and operand (`*_`) | -| GENERAL | `string` | General format operator (`General`) | -| GROUP | `string` | Number grouping operator (`,`) | -| HASH | `string` | Hash operator (digit if available) (`#`) | -| LOCALE | `string` | Locale modifier (`[$-1E020404]`) | -| MINUS | `string` | Minus sign (`-`) | -| MODIFIER | `string` | An unidentified modifier (`[Schwarz]`) | -| NATNUM | `string` | Number display modifier (`[NatNum3]`) | -| PAREN | `string` | Parenthesis character (`)`) | -| PERCENT | `string` | Percent operator (`%`) | -| PLUS | `string` | Plus sign (`+`) | -| POINT | `string` | Decimal point operator (`.`) | -| QMARK | `string` | Question mark operator (digit or space if not available) (`?`) | -| SCALE | `string` | Scaling operator (`,`) | -| SKIP | `string` | Skip with char operator and operand (`*_`) | -| SLASH | `string` | Slash operator (`/`) | -| SPACE | `string` | Space (` `) | -| STRING | `string` | Quoted string (`"days"`) | -| TEXT | `string` | Text output operator (`@`) | -| ZERO | `string` | Zero operator (digit or zero if not available) (`0`) | +```ts +type FormatDateInfo = { + clockType: 12 | 24; + day: boolean; + hours: boolean; + minutes: boolean; + month: boolean; + seconds: boolean; + year: boolean; +}; +``` ---- +An object detailing which date specifiers are used in a format pattern. +See the [getFormatDateInfo](#functionsgetformatdateinfomd) method. + +## Properties + +| Property | Type | Description | +| ------ | ------ | ------ | +| `clockType` | `12` \| `24` | 12 if the pattern uses AM/PM clock else 24. | +| `day` | `boolean` | true if the pattern uses day of the month else false. | +| `hours` | `boolean` | true if the pattern uses hours else false. | +| `minutes` | `boolean` | true if the pattern uses minutes else false. | +| `month` | `boolean` | true if the pattern uses months else false. | +| `seconds` | `boolean` | true if the pattern uses seconds else false. | +| `year` | `boolean` | true if the pattern uses years else false. | + + + + +# FormatInfo + +```ts +type FormatInfo = { + code: string; + color: 0 | 1; + grouped: 0 | 1; + isDate: boolean; + isPercent: boolean; + isText: boolean; + level: number; + maxDecimals: number; + parentheses: 0 | 1; + scale: number; + type: | "currency" + | "date" + | "datetime" + | "error" + | "fraction" + | "general" + | "grouped" + | "number" + | "percent" + | "scientific" + | "text" + | "time"; +}; +``` -## Types +An object of information properties based on a format pattern. +See the [getFormatInfo](#functionsgetformatinfomd) method. + +## Properties + +| Property | Type | Description | +| ------ | ------ | ------ | +| `code` | `string` | Corresponds to Excel's `CELL("format")` functionality. It should match Excel's esoteric behaviour fairly well. [See Microsoft's documentation.](https://support.microsoft.com/en-us/office/cell-function-51bd39a5-f338-4dbe-a33f-955d67c2b2cf) | +| `color` | `0` \| `1` | 1 if the format uses color on the negative portion of the string, else a 0. This replicates Excel's `CELL("color")` functionality. | +| `grouped` | `0` \| `1` | 1 if the positive portion of the format uses a thousands separator, else a 0. | +| `isDate` | `boolean` | Corresponds to the output from isDateFormat. | +| `isPercent` | `boolean` | Corresponds to the output from isPercentFormat. | +| `isText` | `boolean` | Corresponds to the output from isTextFormat. | +| `level` | `number` | An arbirarty number that represents the format's specificity if you want to compare one to another. Integer comparisons roughly match Excel's resolutions when it determines which format wins out. | +| `maxDecimals` | `number` | The maximum number of decimals this format will emit. | +| `parentheses` | `0` \| `1` | 1 if the positive portion of the number format contains an open parenthesis, else a 0. This is replicates Excel's `CELL("parentheses")` functionality. | +| `scale` | `number` | The multiplier used when formatting the number (100 for percentages). | +| `type` | \| `"currency"` \| `"date"` \| `"datetime"` \| `"error"` \| `"fraction"` \| `"general"` \| `"grouped"` \| `"number"` \| `"percent"` \| `"scientific"` \| `"text"` \| `"time"` | A string identifier for the type of the number formatter. | + + + + +# FormatOptions + +```ts +type FormatOptions = { + bigintErrorNumber: boolean; + dateErrorNumber: boolean; + dateErrorThrows: boolean; + dateSpanLarge: boolean; + fillChar: string; + grouping: [number, number] | [number]; + ignoreTimezone: boolean; + indexColors: boolean; + invalid: string; + leap1900: boolean; + locale: string | number; + nbsp: boolean; + overflow: string; + skipChar: string; + throws: boolean; +}; +``` -### # FormatDateInfo +Options that control the behavior of the formatter. + +## Properties + +| Property | Type | Description | +| ------ | ------ | ------ | +| `bigintErrorNumber` | `boolean` | Should the formatter switch to a plain string number format when trying to format a bigint that is out of bounds of regular JS numbers? **Default** `false` | +| `dateErrorNumber` | `boolean` | Should the formatter emit a number when trying to format a date that is out of bounds? This is default behaviour by Google Sheets. `dateErrorThrows` overrides this setting. **Default** `true` | +| `dateErrorThrows` | `boolean` | Should the formatter throw an error when trying to format a date that is out of bounds? **Default** `false` | +| `dateSpanLarge` | `boolean` | Extends the allowed range of dates from Excel bounds (1900–9999) to Google Sheet bounds (0–99999). **Default** `true` | +| `fillChar` | `string` | When the formatter encounters `*` it normally emits nothing instead of the `*` and the next character (like Excel TEXT function does). Setting this to a character will make the formatter emit that followed by the next one. **Default** `''` | +| `grouping` | \[`number`, `number`\] \| \[`number`\] | Integer grouping sizes. You may desire to emit numbers in standards other than the common 3 digits per group (e.g. "123,456,789"). The first grouping size is used for the least significant integer group, and the second grouping size is used for more significant groups (e.g. `[3, 2]` => "12,34,56,789"). **Default** `[ 3 ]` | +| `ignoreTimezone` | `boolean` | Normally when date objects are used with the formatter, time zone is taken into account and the date is adjusted into UTC. This option makes the formatter ignore the timezone offset. **Default** `false` | +| `indexColors` | `boolean` | Automatically resolve indexed colors to hex when outputting colors (red => #f00); When indexed color modifiers are used (`[Color 1]`) the formatter will convert the index into the corresponding hex color of the default palette. When this option is set to false, the number will instead by emitted allowing you to index against a custom palette. **Default** `true` | +| `invalid` | `string` | The string emitted when formatter fails to parse a pattern and has been instructed not to throw an error. **Default** `'######'` | +| `leap1900` | `boolean` | Simulate the Lotus 1-2-3 [1900 leap year bug](https://docs.microsoft.com/en-us/office/troubleshoot/excel/wrongly-assumes-1900-is-leap-year). It is a requirement in the Ecma OOXML specification so it is on by default. **Default** `true` | +| `locale` | `string` \| `number` | A BCP 47 string tag or Excel [MsoLanguageID](https://docs.microsoft.com/en-us/office/vba/api/office.msolanguageid). Locale default is english with a `\u00a0` grouping symbol (see [addLocale](#addLocale)) **Default** `''` | +| `nbsp` | `boolean` | Emit regular vs. non-breaking spaces. By default the output will use a regular space, but in many cases you may desire a non-breaking-space instead. **Default** `false` | +| `overflow` | `string` | The string emitted when a formatter fails to format a date that is out of bounds. Both `dateErrorThrows` and `dateErrorNumber` override this setting. **Default** `'######'` | +| `skipChar` | `string` | When the formatter encounters `_` it normally emits a single space instead of the `_` and the next character (like Excel TEXT function does). Setting this to a character will make the formatter emit that followed by the next one. **Default** `''` | +| `throws` | `boolean` | Should the formatter throw an error if a provided pattern is invalid. If false, a formatter will be constructed which instead outputs an error string (see _invalid_ in this table). **Default** `true` | + + + + +# LocaleData + +```ts +type LocaleData = { + ampm: string[]; + bool: string[]; + ddd: string[]; + dddd: string[]; + decimal: string; + exponent: string; + group: string; + infinity: string; + mmm: string[]; + mmm6: string[]; + mmmm: string[]; + mmmm6: string[]; + nan: string; + negative: string; + percent: string; + positive: string; + preferMDY: boolean; +}; +``` -An object detailing which date specifiers are used in a format pattern. +An object of properties used by a formatter when printing a number in a certain locale. -##### Properties +## Properties + +| Property | Type | Description | +| ------ | ------ | ------ | +| `ampm` | `string`[] | How AM and PM should be presented | +| `bool` | `string`[] | How TRUE and FALSE should be presented | +| `ddd` | `string`[] | Shortened day names (`Wed`) | +| `dddd` | `string`[] | Long day names (`Wednesday`) | +| `decimal` | `string` | Symbol used to separate integers from fractions (usually `.`) | +| `exponent` | `string` | Symbol used to indicate an exponent (usually `E`) | +| `group` | `string` | Symbol used as a grouping separator (`1,000,000` uses `,`) | +| `infinity` | `string` | Symbol used to indicate infinite values (`∞`) | +| `mmm` | `string`[] | Short month names for the Gregorian calendar (`Nov`) | +| `mmm6` | `string`[] | Short month names for the Islamic calendar (`Raj.`) | +| `mmmm` | `string`[] | Long month names for the Gregorian calendar (`November`) | +| `mmmm6` | `string`[] | Long month names for the Islamic calendar (`Rajab`) | +| `nan` | `string` | Symbol used to indicate NaN values (`NaN`) | +| `negative` | `string` | Symbol used to indicate positive numbers (usually `-`) | +| `percent` | `string` | Symbol used to indicate a percentage (usually `%`) | +| `positive` | `string` | Symbol used to indicate positive numbers (usually `+`) | +| `preferMDY` | `boolean` | Is the prefered date format month first (12/31/2025) or day first (31/12/2025) | + + + + +# LocaleToken + +```ts +type LocaleToken = { + lang: string; + language: string; + territory: string; +}; +``` -| Name | Type | Description | -| --------- | ------------ | ----------------------------------------------------- | -| clockType | `12` \| `24` | 12 if the pattern uses AM/PM clock else 24. | -| day | `boolean` | true if the pattern uses day of the month else false. | -| hours | `boolean` | true if the pattern uses hours else false. | -| minutes | `boolean` | true if the pattern uses minutes else false. | -| month | `boolean` | true if the pattern uses months else false. | -| seconds | `boolean` | true if the pattern uses seconds else false. | -| year | `boolean` | true if the pattern uses years else false. | +An object of properties for a locale tag. ---- +```js +{ lang: 'zh-CN', language: 'zh', territory: 'CN' } +``` -### # FormatInfo +## Properties -An object of information properties based on a format pattern. +| Property | Type | Description | +| ------ | ------ | ------ | +| `lang` | `string` | The basic tag such as `zh-CN` or `fi` | +| `language` | `string` | The language section (`zh` for `zh-CN`) | +| `territory` | `string` | The territory section (`CN` for `zh-CN`) | -##### Properties -| Name | Type | Description | -| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| code | `string` | Corresponds to Excel's `CELL("format")` functionality. It should match Excel's esoteric behaviour fairly well. [See Microsoft's documentation.](https://support.microsoft.com/en-us/office/cell-function-51bd39a5-f338-4dbe-a33f-955d67c2b2cf) | -| color | `0` \| `1` | 1 if the format uses color on the negative portion of the string, else a 0. This replicates Excel's `CELL("color")` functionality. | -| grouped | `0` \| `1` | 1 if the positive portion of the format uses a thousands separator, else a 0. | -| isDate | `boolean` | Corresponds to the output from isDateFormat. | -| isPercent | `boolean` | Corresponds to the output from isPercentFormat. | -| isText | `boolean` | Corresponds to the output from isTextFormat. | -| level | `number` | An arbirarty number that represents the format's specificity if you want to compare one to another. Integer comparisons roughly match Excel's resolutions when it determines which format wins out. | -| maxDecimals | `number` | The maximum number of decimals this format will emit. | -| parentheses | `0` \| `1` | 1 if the positive portion of the number format contains an open parenthesis, else a 0. This is replicates Excel's `CELL("parentheses")` functionality. | -| scale | `number` | The multiplier used when formatting the number (100 for percentages). | -| type | `"currency"` \| `"date"` \| `"datetime"` \| `"error"` \| `"fraction"` \| `"general"` \| `"grouped"` \| `"number"` \| `"percent"` \| `"scientific"` \| `"text"` \| `"time"` | A string identifier for the type of the number formatter. | + ---- +# ParseDataBool -### # FormatToken +```ts +type ParseDataBool = { + v: boolean; + z?: string; +}; +``` -##### Properties +Output from the boolean value parser. -| Name | Type | Description | -| ----- | -------- | ---------------------------------------------------- | -| raw | `string` | Raw token source. | -| type | `string` | Token type. | -| value | `any` | The value of the token, cleaned of extra characters. | +## Properties ---- +| Property | Type | Description | +| ------ | ------ | ------ | +| `v` | `boolean` | A boolean value | +| `z?` | `string` | A number format pattern | -### # LocaleData -An object of properties used by a formatter when printing a number in a certain locale. + -##### Properties - -| Name | Type | Description | -| --------- | --------------- | ------------------------------------------------------------------------------ | -| ampm | `Array` | How AM and PM should be presented | -| bool | `Array` | How TRUE and FALSE should be presented | -| ddd | `Array` | Shortened day names (`Wed`) | -| dddd | `Array` | Long day names (`Wednesday`) | -| decimal | `string` | Symbol used to separate integers from fractions (usually `.`) | -| exponent | `string` | Symbol used to indicate an exponent (usually `E`) | -| group | `string` | Symbol used as a grouping separator (`1,000,000` uses `,`) | -| infinity | `string` | Symbol used to indicate infinite values (`∞`) | -| mmm | `Array` | Short month names for the Gregorian calendar (`Nov`) | -| mmm6 | `Array` | Short month names for the Islamic calendar (`Raj.`) | -| mmmm | `Array` | Long month names for the Gregorian calendar (`November`) | -| mmmm6 | `Array` | Long month names for the Islamic calendar (`Rajab`) | -| nan | `string` | Symbol used to indicate NaN values (`NaN`) | -| negative | `string` | Symbol used to indicate positive numbers (usually `-`) | -| percent | `string` | Symbol used to indicate a percentage (usually `%`) | -| positive | `string` | Symbol used to indicate positive numbers (usually `+`) | -| preferMDY | `boolean` | Is the prefered date format month first (12/31/2025) or day first (31/12/2025) | - ---- - -### # LocaleToken +# ParseDataNum -An object of properties for a locale tag. +```ts +type ParseDataNum = { + v: number; + z?: string; +}; +``` -##### Properties +Output from a number or date value parser. -| Name | Type | Description | -| --------- | -------- | ---------------------------------------- | -| lang | `string` | The basic tag such as `zh_CN` or `fi` | -| language | `string` | The language section (`zh` for `zh_CN`) | -| territory | `string` | The territory section (`CN` for `zh_CN`) | +## Properties ---- +| Property | Type | Description | +| ------ | ------ | ------ | +| `v` | `number` | A number value | +| `z?` | `string` | A number format pattern | -### # ParseData -##### Properties + -| Name | Type | Description | -| ---- | --------------------- | --------------------- | -| v | `number` \| `boolean` | the value | -| [z] | `string` | number format pattern | +# Token ---- +```ts +type Token = { + raw: string; + type: TokenType; + value: any; +}; +``` +A token emitted by the tokenizer. + +## Properties + +| Property | Type | Description | +| ------ | ------ | ------ | +| `raw` | `string` | Raw token source. | +| `type` | [`TokenType`](#type-aliasestokentypemd) | Token type. | +| `value` | `any` | The value of the token, cleaned of extra characters. | + + + + +# TokenType + +```ts +type TokenType = + | typeof TOKEN_GENERAL + | typeof TOKEN_HASH + | typeof TOKEN_ZERO + | typeof TOKEN_QMARK + | typeof TOKEN_SLASH + | typeof TOKEN_GROUP + | typeof TOKEN_SCALE + | typeof TOKEN_COMMA + | typeof TOKEN_BREAK + | typeof TOKEN_TEXT + | typeof TOKEN_PLUS + | typeof TOKEN_MINUS + | typeof TOKEN_POINT + | typeof TOKEN_SPACE + | typeof TOKEN_PERCENT + | typeof TOKEN_DIGIT + | typeof TOKEN_CALENDAR + | typeof TOKEN_ERROR + | typeof TOKEN_DATETIME + | typeof TOKEN_DURATION + | typeof TOKEN_CONDITION + | typeof TOKEN_DBNUM + | typeof TOKEN_NATNUM + | typeof TOKEN_LOCALE + | typeof TOKEN_COLOR + | typeof TOKEN_MODIFIER + | typeof TOKEN_AMPM + | typeof TOKEN_ESCAPED + | typeof TOKEN_STRING + | typeof TOKEN_SKIP + | typeof TOKEN_EXP + | typeof TOKEN_FILL + | typeof TOKEN_PAREN + | typeof TOKEN_CHAR; +``` +A valid token type. + +| Token type | Description +|---------------- |---------------- +| TOKEN_AMPM | AM/PM operator (`AM/PM`, `A/P`) +| TOKEN_BREAK | Semicolon operator indicating a break between format sections (`;`) +| TOKEN_CALENDAR | Calendar modifier (`B2`) +| TOKEN_CHAR | Single non-operator character (`m`) +| TOKEN_COLOR | Color modifier (`[Black]`, `[color 5]`) +| TOKEN_COMMA | Plain non-operator comma (`,`) +| TOKEN_CONDITION | Condition modifier for a section (`[>=10]`) +| TOKEN_DATETIME | Date-time operator (`mmmm`, `YY`) +| TOKEN_DBNUM | Number display modifier (`[DBNum23]`) +| TOKEN_DIGIT | A digit between 1 and 9 (`3`) +| TOKEN_DURATION | Time duration (`[ss]`) +| TOKEN_ERROR | Unidentifiable or illegal character (`Ň`) +| TOKEN_ESCAPED | Escaped character (`\E`) +| TOKEN_EXP | Exponent operator (`E+`) +| TOKEN_FILL | Fill with char operator and operand (`*_`) +| TOKEN_GENERAL | General format operator (`General`) +| TOKEN_GROUP | Number grouping operator (`,`) +| TOKEN_HASH | Hash operator (digit if available) (`#`) +| TOKEN_LOCALE | Locale modifier (`[$-1E020404]`) +| TOKEN_MINUS | Minus sign (`-`) +| TOKEN_MODIFIER | An unidentified modifier (`[Lorem]`) +| TOKEN_NATNUM | Number display modifier (`[NatNum3]`) +| TOKEN_PAREN | Parenthesis character (`)`) +| TOKEN_PERCENT | Percent operator (`%`) +| TOKEN_PLUS | Plus sign (`+`) +| TOKEN_POINT | Decimal point operator (`.`) +| TOKEN_QMARK | Question mark operator (digit or space if not available) (`?`) +| TOKEN_SCALE | Scaling operator (`,`) +| TOKEN_SKIP | Skip with char operator and operand (`*_`) +| TOKEN_SLASH | Slash operator (`/`) +| TOKEN_SPACE | Space (` `) +| TOKEN_STRING | Quoted string (`"days"`) +| TOKEN_TEXT | Text output operator (`@`) +| TOKEN_ZERO | Zero operator (digit or zero if not available) (`0`) * diff --git a/lib/formatNumber.ts b/lib/formatNumber.ts index bea233d..17a8940 100644 --- a/lib/formatNumber.ts +++ b/lib/formatNumber.ts @@ -40,10 +40,10 @@ export function formatColor ( value: unknown, parseData: PatternParseData, opts: Pick -): string | number | null { +): string | number | undefined { const parts = parseData.partitions; let part: Partition | undefined = parts[3]; - let color = null; + let color: string | number | undefined; if ((typeof value === 'number' || typeof value === 'bigint') && Number.isFinite(value)) { part = getPart(value, parts); } diff --git a/lib/index.ts b/lib/index.ts index e9b4574..89b60b5 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -1,3 +1,12 @@ +/** + * The numfmt library formats numbers according to a specifier string as defined in ECMA-376. + * The library tries its best to emulate the inns and outs of what the Excel spreadsheet + * software does. + * + * @packageDocumentation + * @module numfmt + */ + import { TOKEN_GENERAL, TOKEN_HASH, TOKEN_ZERO, TOKEN_QMARK, TOKEN_SLASH, TOKEN_GROUP, TOKEN_SCALE, TOKEN_COMMA, TOKEN_BREAK, TOKEN_TEXT, TOKEN_PLUS, TOKEN_MINUS, TOKEN_POINT, TOKEN_SPACE, @@ -17,10 +26,29 @@ import { defaultOptions, type FormatOptions } from './options.ts'; export { round } from './round.ts'; export { dec2frac } from './dec2frac.ts'; +export type { FormatOptions } from './options.ts'; +export type { ParseDataBool, ParseDataNum } from './parseValue.ts'; +export type { + TokenType, + Token, + FormatDateInfo, + FormatInfo +} from './types.ts'; +/** + * @ignore + */ +export type { + TOKEN_GENERAL, TOKEN_HASH, TOKEN_ZERO, TOKEN_QMARK, TOKEN_SLASH, TOKEN_GROUP, TOKEN_SCALE, TOKEN_COMMA, TOKEN_BREAK, + TOKEN_TEXT, TOKEN_PLUS, TOKEN_MINUS, TOKEN_POINT, TOKEN_SPACE, TOKEN_PERCENT, TOKEN_DIGIT, TOKEN_CALENDAR, + TOKEN_ERROR, TOKEN_DATETIME, TOKEN_DURATION, TOKEN_CONDITION, TOKEN_DBNUM, TOKEN_NATNUM, TOKEN_LOCALE, TOKEN_COLOR, + TOKEN_MODIFIER, TOKEN_AMPM, TOKEN_ESCAPED, TOKEN_STRING, TOKEN_SKIP, TOKEN_EXP, TOKEN_FILL, TOKEN_PAREN, TOKEN_CHAR +} from './constants.ts'; import { dateToSerial as handleDates } from './serialDate.ts'; export { dateToSerial, dateFromSerial } from './serialDate.ts'; +export type { LocaleData, LocaleToken } from './locale.ts'; + export { parseNumber, parseDate, @@ -72,77 +100,21 @@ function prepareFormatterData (pattern: string, shouldThrow = false) { * Formats a value as a string and returns the result. * * - Dates are normalized to spreadsheet style serial dates and then formatted. - * - Booleans are emitted as uppercase "TRUE" or "FALSE". - * - Null and Undefined will return an empty string "". + * - Booleans are emitted as uppercase `TRUE` or `FALSE`. + * - `null` and `undefined` will return an empty string `""`. * - Any non number values will be stringified and passed through the text section of the format pattern. - * - NaNs and infinites will use the corresponding strings from the active locale. + * - `NaN`s and `Infinite`s will use the corresponding strings from the active locale. * * @param pattern - A format pattern in the ECMA-376 number format. * @param value - The value to format. - * @param [options={}] Options - * @param [options.locale=""] - * A BCP 47 string tag. Locale default is english with a `\u00a0` - * grouping symbol (see [addLocale](#addLocale)) - * @param [options.overflow="######"] - * The string emitted when a formatter fails to format a date that is out - * of bounds. - * @param [options.invalid="######"] - * The string emitted when no-throw mode fails to parse a pattern. - * @param [options.throws=true] - * Should the formatter throw an error if a provided pattern is invalid. - * If false, a formatter will be constructed which instead outputs an error - * string (see _invalid_ in this table). - * @param [options.nbsp=false] - * By default the output will use a regular space, but in many cases you - * may desire a non-breaking-space instead. - * @param [options.leap1900=true] - * Simulate the Lotus 1-2-3 [1900 leap year bug](https://docs.microsoft.com/en-us/office/troubleshoot/excel/wrongly-assumes-1900-is-leap-year). - * It is a requirement in the Ecma OOXML specification so it is on by default. - * @param [options.dateErrorThrows=false] - * Should the formatter throw an error when trying to format a date that is - * out of bounds? - * @param [options.dateErrorNumber=true] - * Should the formatter switch to a General number format when trying to - * format a date that is out of bounds? - * @param [options.bigintErrorNumber=false] - * Should the formatter switch to a plain string number format when trying to - * format a bigint that is out of bounds? - * @param [options.dateSpanLarge=true] - * Extends the allowed range of dates from Excel bounds (1900–9999) to - * Google Sheet bounds (0–99999). - * @param [options.ignoreTimezone=false] - * Normally when date objects are used with the formatter, time zone is taken - * into account. This makes the formatter ignore the timezone offset. - * @param [options.skipChar=''] - * When the formatter encounters `_` it normally emits a single space instead - * of the `_` and the next character (like Excel TEXT function does). Setting - * this to a character will make the formatter emit that followed by the next - * one. - * @param [options.fillChar=''] - * When the formatter encounters `*` it normally emits nothing instead of the - * `*` and the next character (like Excel TEXT function does). Setting this - * to a character will make the formatter emit that followed by the next one. + * @param [options={}] Formatter options + * @returns A formatted value */ export function format ( pattern: string, value: any, options: Partial = {} - // { - // locale?: string; - // overflow?: string; - // invalid?: string; - // throws?: boolean; - // nbsp?: boolean; - // leap1900?: boolean; - // dateErrorThrows?: boolean; - // dateErrorNumber?: boolean; - // bigintErrorNumber?: boolean; - // dateSpanLarge?: boolean; - // ignoreTimezone?: boolean; - // skipChar?: boolean; - // fillChar?: boolean; - // } = {} ): string { const opts: FormatOptions = Object.assign({}, defaultOptions, options); const data = prepareFormatterData(pattern, opts.throws); @@ -160,24 +132,27 @@ export function format ( * const color = formatColor("[green]#,##0;[red]-#,##0", -10); * console.log(color); // "red" * const color = formatColor("[green]#,##0;-#,##0", -10); - * console.log(color); // null + * console.log(color); // undefined * ``` * * @param pattern - A format pattern in the ECMA-376 number format. * @param value - The value to format. - * @param [options={}] Options + * @param [options={}] Formatter options * @param [options.throws=true] * Should the formatter throw an error if a provided pattern is invalid. * If false, a formatter will be constructed which instead outputs an error * string (see _invalid_ in this table). + * `true` by default. * @param [options.ignoreTimezone=false] * Normally when date objects are used with the formatter, time zone is taken * into account. This makes the formatter ignore the timezone offset. + * `false` by default. * @param [options.indexColors=true] * When indexed color modifiers are used (`[Color 1]`) the formatter will * convert the index into the corresponding hex color of the default palette. * When this option is set to false, the number will instead by emitted * allowing you to index against a custom palette. + * `true` by default. * @returns * A string color value as described by the pattern or a number if the * indexColors option has been set to false. @@ -190,19 +165,18 @@ export function formatColor ( ignoreTimezone?: boolean; indexColors?: boolean; } -): string | number | null { +): string | number | undefined { const opts = Object.assign({}, defaultOptions, options); const data = prepareFormatterData(pattern, opts.throws); const val = handleDates(value, opts) ?? value; return fmtColor(val, data, opts); } -// FIXME: docs what is a a section?... /** * Determine if a given format pattern is a date pattern. * - * The pattern is considered a date pattern if any of its sections contain a - * date symbol (such as `Y` or `H`). Each section is restricted to be + * The pattern is considered a date pattern if any of its sections (`"a;b;c;d"`) + * contains a date operator (such as `Y` or `H`). Each section is restricted to be * _either_ a number or date format. * * @param pattern A format pattern in the ECMA-376 number format. @@ -216,7 +190,7 @@ export function isDateFormat (pattern: string): boolean { /** * Determine if a given format pattern is a percentage pattern. * - * The pattern is considered a percentage pattern if any of its sections + * The pattern is considered a percentage pattern if any of its sections (`"a;b;c;d"`) * contains an unescaped percentage symbol. * * @param pattern A format pattern in the ECMA-376 number format. @@ -264,11 +238,11 @@ export function isValidFormat (pattern: string): boolean { * format pattern. * * @param pattern A format pattern in the ECMA-376 number format. - * @param [options={}] Options + * @param [options={}] Options for the method * @param [options.currency] * Limit the patterns identified as currency to those that use the give string. * If nothing is provided, patterns will be tagged as currency if one of the - * following currency symbols is used: ¤$£¥֏؋৳฿៛₡₦₩₪₫€₭₮₱₲₴₸₹₺₼₽₾₿ + * following currency symbols is used: `¤$£¥֏؋৳฿៛₡₦₩₪₫€₭₮₱₲₴₸₹₺₼₽₾₿` * @returns An object of format properties. */ export function getFormatInfo (pattern: string, options: { currency?: string; } = {}): FormatInfo { @@ -280,7 +254,7 @@ export function getFormatInfo (pattern: string, options: { currency?: string; } } /** - * Gets information about date codes use in a format string. + * Gets information about how date codes are used in a format string. * * @param pattern A format pattern in the ECMA-376 number format. * @returns An object of format date properties. @@ -293,78 +267,78 @@ export function getFormatDateInfo (pattern: string): FormatDateInfo { return data.dateInfo; } -/** - * A dictionary of the types used to identify token variants. - * - * @property AMPM - AM/PM operator (`AM/PM`, `A/P`) - * @property BREAK - Semicolon operator indicating a break between format sections (`;`) - * @property CALENDAR - Calendar modifier (`B2`) - * @property CHAR - Single non-operator character (`m`) - * @property COLOR - Color modifier (`[Black]`, `[color 5]`) - * @property COMMA - Plain non-operator comma (`,`) - * @property CONDITION - Condition modifier for a section (`[>=10]`) - * @property DATETIME - Date-time operator (`mmmm`, `YY`) - * @property DBNUM - Number display modifier (`[DBNum23]`) - * @property DIGIT - A digit between 1 and 9 (`3`) - * @property DURATION - Time duration (`[ss]`) - * @property ERROR - Unidentifiable or illegal character (`Ň`) - * @property ESCAPED - Escaped character (`\E`) - * @property EXP - Exponent operator (`E+`) - * @property FILL - Fill with char operator and operand (`*_`) - * @property GENERAL - General format operator (`General`) - * @property GROUP - Number grouping operator (`,`) - * @property HASH - Hash operator (digit if available) (`#`) - * @property LOCALE - Locale modifier (`[$-1E020404]`) - * @property MINUS - Minus sign (`-`) - * @property MODIFIER - An unidentified modifier (`[Schwarz]`) - * @property NATNUM - Number display modifier (`[NatNum3]`) - * @property PAREN - Parenthesis character (`)`) - * @property PERCENT - Percent operator (`%`) - * @property PLUS - Plus sign (`+`) - * @property POINT - Decimal point operator (`.`) - * @property QMARK - Question mark operator (digit or space if not available) (`?`) - * @property SCALE - Scaling operator (`,`) - * @property SKIP - Skip with char operator and operand (`*_`) - * @property SLASH - Slash operator (`/`) - * @property SPACE - Space (` `) - * @property STRING - Quoted string (`"days"`) - * @property TEXT - Text output operator (`@`) - * @property ZERO - Zero operator (digit or zero if not available) (`0`) - * @see tokenize - */ -export const tokenTypes: Readonly> = Object.freeze({ - [TOKEN_AMPM]: TOKEN_AMPM, - [TOKEN_BREAK]: TOKEN_BREAK, - [TOKEN_CALENDAR]: TOKEN_CALENDAR, - [TOKEN_CHAR]: TOKEN_CHAR, - [TOKEN_COLOR]: TOKEN_COLOR, - [TOKEN_COMMA]: TOKEN_COMMA, - [TOKEN_CONDITION]: TOKEN_CONDITION, - [TOKEN_DATETIME]: TOKEN_DATETIME, - [TOKEN_DBNUM]: TOKEN_DBNUM, - [TOKEN_DIGIT]: TOKEN_DIGIT, - [TOKEN_DURATION]: TOKEN_DURATION, - [TOKEN_ERROR]: TOKEN_ERROR, - [TOKEN_ESCAPED]: TOKEN_ESCAPED, - [TOKEN_EXP]: TOKEN_EXP, - [TOKEN_FILL]: TOKEN_FILL, - [TOKEN_GENERAL]: TOKEN_GENERAL, - [TOKEN_GROUP]: TOKEN_GROUP, - [TOKEN_HASH]: TOKEN_HASH, - [TOKEN_LOCALE]: TOKEN_LOCALE, - [TOKEN_MINUS]: TOKEN_MINUS, - [TOKEN_MODIFIER]: TOKEN_MODIFIER, - [TOKEN_NATNUM]: TOKEN_NATNUM, - [TOKEN_PAREN]: TOKEN_PAREN, - [TOKEN_PERCENT]: TOKEN_PERCENT, - [TOKEN_PLUS]: TOKEN_PLUS, - [TOKEN_POINT]: TOKEN_POINT, - [TOKEN_QMARK]: TOKEN_QMARK, - [TOKEN_SCALE]: TOKEN_SCALE, - [TOKEN_SKIP]: TOKEN_SKIP, - [TOKEN_SLASH]: TOKEN_SLASH, - [TOKEN_SPACE]: TOKEN_SPACE, - [TOKEN_STRING]: TOKEN_STRING, - [TOKEN_TEXT]: TOKEN_TEXT, - [TOKEN_ZERO]: TOKEN_ZERO -}); +// /** +// * A dictionary of the types used to identify token variants. +// * +// * @property AMPM - AM/PM operator (`AM/PM`, `A/P`) +// * @property BREAK - Semicolon operator indicating a break between format sections (`;`) +// * @property CALENDAR - Calendar modifier (`B2`) +// * @property CHAR - Single non-operator character (`m`) +// * @property COLOR - Color modifier (`[Black]`, `[color 5]`) +// * @property COMMA - Plain non-operator comma (`,`) +// * @property CONDITION - Condition modifier for a section (`[>=10]`) +// * @property DATETIME - Date-time operator (`mmmm`, `YY`) +// * @property DBNUM - Number display modifier (`[DBNum23]`) +// * @property DIGIT - A digit between 1 and 9 (`3`) +// * @property DURATION - Time duration (`[ss]`) +// * @property ERROR - Unidentifiable or illegal character (`Ň`) +// * @property ESCAPED - Escaped character (`\E`) +// * @property EXP - Exponent operator (`E+`) +// * @property FILL - Fill with char operator and operand (`*_`) +// * @property GENERAL - General format operator (`General`) +// * @property GROUP - Number grouping operator (`,`) +// * @property HASH - Hash operator (digit if available) (`#`) +// * @property LOCALE - Locale modifier (`[$-1E020404]`) +// * @property MINUS - Minus sign (`-`) +// * @property MODIFIER - An unidentified modifier (`[Schwarz]`) +// * @property NATNUM - Number display modifier (`[NatNum3]`) +// * @property PAREN - Parenthesis character (`)`) +// * @property PERCENT - Percent operator (`%`) +// * @property PLUS - Plus sign (`+`) +// * @property POINT - Decimal point operator (`.`) +// * @property QMARK - Question mark operator (digit or space if not available) (`?`) +// * @property SCALE - Scaling operator (`,`) +// * @property SKIP - Skip with char operator and operand (`*_`) +// * @property SLASH - Slash operator (`/`) +// * @property SPACE - Space (` `) +// * @property STRING - Quoted string (`"days"`) +// * @property TEXT - Text output operator (`@`) +// * @property ZERO - Zero operator (digit or zero if not available) (`0`) +// * @see tokenize +// */ +// export const tokenTypes: Readonly> = Object.freeze({ +// [TOKEN_AMPM]: TOKEN_AMPM, +// [TOKEN_BREAK]: TOKEN_BREAK, +// [TOKEN_CALENDAR]: TOKEN_CALENDAR, +// [TOKEN_CHAR]: TOKEN_CHAR, +// [TOKEN_COLOR]: TOKEN_COLOR, +// [TOKEN_COMMA]: TOKEN_COMMA, +// [TOKEN_CONDITION]: TOKEN_CONDITION, +// [TOKEN_DATETIME]: TOKEN_DATETIME, +// [TOKEN_DBNUM]: TOKEN_DBNUM, +// [TOKEN_DIGIT]: TOKEN_DIGIT, +// [TOKEN_DURATION]: TOKEN_DURATION, +// [TOKEN_ERROR]: TOKEN_ERROR, +// [TOKEN_ESCAPED]: TOKEN_ESCAPED, +// [TOKEN_EXP]: TOKEN_EXP, +// [TOKEN_FILL]: TOKEN_FILL, +// [TOKEN_GENERAL]: TOKEN_GENERAL, +// [TOKEN_GROUP]: TOKEN_GROUP, +// [TOKEN_HASH]: TOKEN_HASH, +// [TOKEN_LOCALE]: TOKEN_LOCALE, +// [TOKEN_MINUS]: TOKEN_MINUS, +// [TOKEN_MODIFIER]: TOKEN_MODIFIER, +// [TOKEN_NATNUM]: TOKEN_NATNUM, +// [TOKEN_PAREN]: TOKEN_PAREN, +// [TOKEN_PERCENT]: TOKEN_PERCENT, +// [TOKEN_PLUS]: TOKEN_PLUS, +// [TOKEN_POINT]: TOKEN_POINT, +// [TOKEN_QMARK]: TOKEN_QMARK, +// [TOKEN_SCALE]: TOKEN_SCALE, +// [TOKEN_SKIP]: TOKEN_SKIP, +// [TOKEN_SLASH]: TOKEN_SLASH, +// [TOKEN_SPACE]: TOKEN_SPACE, +// [TOKEN_STRING]: TOKEN_STRING, +// [TOKEN_TEXT]: TOKEN_TEXT, +// [TOKEN_ZERO]: TOKEN_ZERO +// }); diff --git a/lib/locale.ts b/lib/locale.ts index 588939c..ede82fc 100644 --- a/lib/locale.ts +++ b/lib/locale.ts @@ -4,7 +4,9 @@ import { codeToLocale } from './codeToLocale.ts'; const re_locale = /^([a-z\d]+)(?:[_-]([a-z\d]+))?(?:\.([a-z\d]+))?(?:@([a-z\d]+))?$/i; const locales: Record = {}; -/** An object of properties used by a formatter when printing a number in a certain locale. */ +/** + * An object of properties used by a formatter when printing a number in a certain locale. + */ export type LocaleData = { /** Symbol used as a grouping separator (`1,000,000` uses `,`) */ group: string; @@ -42,13 +44,19 @@ export type LocaleData = { preferMDY: boolean; }; -/** An object of properties for a locale tag. */ +/** + * An object of properties for a locale tag. + * + * ```js + * { lang: 'zh-CN', language: 'zh', territory: 'CN' } + * ``` + */ export type LocaleToken = { - /** The basic tag such as `zh_CN` or `fi` */ + /** The basic tag such as `zh-CN` or `fi` */ lang: string; - /** The language section (`zh` for `zh_CN`) */ + /** The language section (`zh` for `zh-CN`) */ language: string; - /** The territory section (`CN` for `zh_CN`) */ + /** The territory section (`CN` for `zh-CN`) */ territory: string; }; @@ -123,7 +131,7 @@ const baseLocaleData: LocaleData = { }; /** - * Parse a regular IETF BCP 47 locale tag and emit an object of its parts. + * Parse a regular IETF BCP 47 locale tag (`en-US`) and emit an object of its parts. * Irregular tags and subtags are not supported. * * @param locale A BCP 47 string tag of the locale. @@ -135,7 +143,7 @@ export function parseLocale (locale: string): LocaleToken { throw new SyntaxError(`Malformed locale: ${locale}`); } return { - lang: lm[1] + (lm[2] ? '_' + lm[2] : ''), + lang: lm[1] + (lm[2] ? '-' + lm[2] : ''), language: lm[1], territory: lm[2] || '' }; @@ -161,12 +169,12 @@ export function resolveLocale (l4e: number | string): string | undefined { /** * Used by the formatter to pull a locate from its registered locales. If - * subtag isn't available but the base language is, the base language is used. + * subtag isn't available but the base language is, the base language is used: * So if `en-CA` is not found, the formatter tries to find `en` else it - * returns a `null`. + * returns `undefined`. * * @param locale A BCP 47 string tag of the locale, or an Excel locale code. - * @returns An object of format date properties. + * @returns An object of format date properties if one was found. */ export function getLocale (locale: string | number): LocaleData | undefined { const tag = resolveLocale(locale); @@ -184,11 +192,10 @@ export function createLocale (data: Partial): LocaleData { } /** - * Register locale data for a language so for use when formatting. + * Register locale data for a language to use when formatting. * * Any partial set of properties may be returned to have the defaults used where properties are missing. * - * @see {LocaleData} * @param localeSettings - A collection of settings for a locale. * @param [localeSettings.group="\u00a0"] * Symbol used as a grouping separator (`1,000,000` uses `,`) @@ -253,7 +260,7 @@ addLocale({ mmm: _('1月;2月;3月;4月;5月;6月;7月;8月;9月;10月;11月;12月'), dddd: _('~日;~一;~二;~三;~四;~五;~六', '星期'), ddd: _('周日;周一;周二;周三;周四;周五;周六') -}, 'zh_CN'); +}, 'zh-CN'); const _zh = { group: ',', ampm: _('上午;下午'), @@ -266,11 +273,11 @@ addLocale({ ..._zh, nan: '非數值', dddd: _('~日;~一;~二;~三;~四;~五;~六', '星期') -}, 'zh_TW'); +}, 'zh-TW'); addLocale({ ..._zh, dddd: _('~日;~一;~二;~三;~四;~五;~六', '星期') -}, 'zh_HK'); +}, 'zh-HK'); addLocale({ ..._zh, @@ -325,11 +332,11 @@ addLocale(xm({ }, -1, 2), 'nl'); addLocale({ group: ',', preferMDY: true }, 'en'); -addLocale({ group: ',', preferMDY: true }, 'en_US'); -addLocale({ group: ',' }, 'en_AU'); -addLocale({ group: ',' }, 'en_CA'); -addLocale({ group: ',' }, 'en_GB'); -addLocale({ group: ',', mmm: _('Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sept;Oct;Nov;Dec') }, 'en_IE'); +addLocale({ group: ',', preferMDY: true }, 'en-US'); +addLocale({ group: ',' }, 'en-AU'); +addLocale({ group: ',' }, 'en-CA'); +addLocale({ group: ',' }, 'en-GB'); +addLocale({ group: ',', mmm: _('Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sept;Oct;Nov;Dec') }, 'en-IE'); addLocale(xm({ decimal: ',', @@ -350,8 +357,8 @@ const _fr = xm({ bool: _('VRAI;FAUX') }, -1, 13); addLocale({ ..._fr }, 'fr'); -addLocale({ ..._fr, mmm: _('janv.;févr.;mars;avr.;mai;juin;juill.;août;sept.;oct.;nov.;déc.') }, 'fr_CA'); -addLocale({ group: "'", decimal: '.', ..._fr }, 'fr_CH'); +addLocale({ ..._fr, mmm: _('janv.;févr.;mars;avr.;mai;juin;juill.;août;sept.;oct.;nov.;déc.') }, 'fr-CA'); +addLocale({ group: "'", decimal: '.', ..._fr }, 'fr-CH'); const _de = xm({ mmmm: _('Januar;Februar;März;April;Mai;Juni;Juli;August;September;Oktober;November;Dezember'), @@ -360,7 +367,7 @@ const _de = xm({ bool: _('WAHR;FALSCH') }, -1, 12); addLocale({ group: '.', decimal: ',', ..._de }, 'de'); -addLocale({ group: "'", decimal: '.', ..._de }, 'de_CH'); +addLocale({ group: "'", decimal: '.', ..._de }, 'de-CH'); addLocale(xm({ group: '.', @@ -402,7 +409,7 @@ const _it = xm({ bool: _('VERO;FALSO') }, 3, 3); addLocale({ group: '.', decimal: ',', ..._it }, 'it'); -addLocale({ group: "'", decimal: '.', ..._it }, 'it_CH'); +addLocale({ group: "'", decimal: '.', ..._it }, 'it-CH'); const _no = { decimal: ',', @@ -431,7 +438,7 @@ const _pt = { bool: _('VERDADEIRO;FALSO') }; addLocale(xm(_pt, 13, 13), 'pt'); -addLocale(xm(_pt, 13, 13), 'pt_BR'); +addLocale(xm(_pt, 13, 13), 'pt-BR'); addLocale({ decimal: ',', @@ -464,15 +471,15 @@ const _es = { const _esM3 = _('ene;feb;mar;abr;may;jun;jul;ago;sep;oct;nov;dic'); const _esM13 = _('ene.;feb.;mar.;abr.;may.;jun.;jul.;ago.;sept.;oct.;nov.;dic.'); addLocale({ ..._es }, 'es'); -addLocale({ ..._es }, 'es_AR'); -addLocale({ ..._es }, 'es_BO'); -addLocale({ ..._es }, 'es_CL'); -addLocale({ ..._es }, 'es_CO'); -addLocale({ ..._es }, 'es_EC'); -addLocale({ ..._es, mmm: _esM3, ampm: _('a.m.;p.m.') }, 'es_MX'); -addLocale({ ..._es, mmm: _esM13 }, 'es_PY'); -addLocale({ ..._es, mmm: _esM13 }, 'es_UY'); -addLocale({ ..._es, mmm: _esM13, mmmm: _('enero;febrero;marzo;abril;mayo;junio;julio;agosto;setiembre;octubre;noviembre;diciembre') }, 'es_VE'); +addLocale({ ..._es }, 'es-AR'); +addLocale({ ..._es }, 'es-BO'); +addLocale({ ..._es }, 'es-CL'); +addLocale({ ..._es }, 'es-CO'); +addLocale({ ..._es }, 'es-EC'); +addLocale({ ..._es, mmm: _esM3, ampm: _('a.m.;p.m.') }, 'es-MX'); +addLocale({ ..._es, mmm: _esM13 }, 'es-PY'); +addLocale({ ..._es, mmm: _esM13 }, 'es-UY'); +addLocale({ ..._es, mmm: _esM13, mmmm: _('enero;febrero;marzo;abril;mayo;junio;julio;agosto;setiembre;octubre;noviembre;diciembre') }, 'es-VE'); addLocale({ decimal: ',', diff --git a/lib/parseFormatSection.ts b/lib/parseFormatSection.ts index 155c1f2..c0478e5 100644 --- a/lib/parseFormatSection.ts +++ b/lib/parseFormatSection.ts @@ -12,7 +12,7 @@ import { T_TYPE_MNAME_S, T_TYPE_MNAME_1, T_TYPE_MNAME, T_TYPE_MIN, T_TYPE_MON, T_TYPE_HOUR_E, T_TYPE_MIN_E, T_TYPE_SEC_E, T_TYPE_SEC } from './constants.ts'; -import type { DateRenderToken, FormatToken, RenderToken, SectionType } from './types.ts'; +import type { DateRenderToken, Token, RenderToken, SectionType } from './types.ts'; import { createPartition } from './createPartition.ts'; function add (s: string | RenderToken, tokens: RenderToken[]): void { @@ -35,7 +35,7 @@ const countNonHash = (s: string): number => { return n; }; -function isNumOp (token: FormatToken | RenderToken, activePattern: SectionType) { +function isNumOp (token: Token | RenderToken, activePattern: SectionType) { const type = token?.type; return ( (type === TOKEN_HASH || type === TOKEN_ZERO || type === TOKEN_QMARK) || @@ -43,14 +43,14 @@ function isNumOp (token: FormatToken | RenderToken, activePattern: SectionType) ); } -export function parseFormatSection (inputTokens: FormatToken[]) { +export function parseFormatSection (inputTokens: Token[]) { const outputTokens: RenderToken[] = []; const part = createPartition(outputTokens); let currentPattern: SectionType = T_TYPE_INT; // 'num' is unused here? let lastNumberChunk: RenderToken | undefined; const dateChunks: DateRenderToken[] = []; - let last: FormatToken | undefined; + let last: Token | undefined; let haveLocale = false; let index = -1; diff --git a/lib/parseValue.ts b/lib/parseValue.ts index def7f56..12f798b 100644 --- a/lib/parseValue.ts +++ b/lib/parseValue.ts @@ -3,7 +3,7 @@ import { isValidDate } from './isValidDate.ts'; import { defaultLocale, getLocale } from './locale.ts'; /** - * Output from the value parser. + * Output from a number or date value parser. */ export type ParseDataNum = { /** A number value */ @@ -13,7 +13,7 @@ export type ParseDataNum = { }; /** - * Output from the value parser. + * Output from the boolean value parser. */ export type ParseDataBool = { /** A boolean value */ @@ -160,21 +160,20 @@ const isDigit = (d: string) => d?.length === 1 && d >= '0' && d <= '9'; /** * Parse a numeric string input and return its value and format. If the input - * was not recognized or valid, the function returns a `null`, for valid input + * was not recognized or valid, the function returns a `undefined`, for valid input * it returns an object with two properties: * * * `v`: the parsed value. * * `z`: the number format of the input (if applicable). * - * @see parseValue * @param value The number to parse - * @param [options={}] Options - * @param [options.locale=""] + * @param [options] Options for the parser + * @param [options.locale] * A BCP 47 string tag. Locale default is english with a `\u00a0` * grouping symbol (see [addLocale](#addLocale)) * @returns An object of the parsed value and a corresponding format string */ -export function parseNumber (value: string, options: { locale?: string; } = {}): ParseDataNum | null { +export function parseNumber (value: string, options: { locale?: string; } = {}): ParseDataNum | undefined { const l10n = getLocale(options.locale || '') || defaultLocale; // we base everything on the decimal separator const dec = l10n.decimal; @@ -201,28 +200,28 @@ export function parseNumber (value: string, options: { locale?: string; } = {}): const char = value[i]; if (char === '-') { if (minus || openParen) { - return null; + return undefined; } minus = true; sign = -1; } else if (reCurrencySymbols.test(char)) { if (currency) { - return null; + return undefined; } currency = true; currencySymbol = char; } else if (char === '(') { if (openParen || minus) { - return null; + return undefined; } openParen = true; sign = -1; } else if (char === '%') { if (percent) { - return null; + return undefined; } percent = true; } @@ -274,7 +273,7 @@ export function parseNumber (value: string, options: { locale?: string; } = {}): } if (d === i) { // contains no digits - return null; + return undefined; } } // suffix @@ -284,7 +283,7 @@ export function parseNumber (value: string, options: { locale?: string; } = {}): // only 1 occurance of these is allowed if (reCurrencySymbols.test(char)) { if (currency) { - return null; + return undefined; } currency = true; currencySymbol = char; @@ -292,13 +291,13 @@ export function parseNumber (value: string, options: { locale?: string; } = {}): } else if (char === ')') { if (closeParen || !openParen) { - return null; + return undefined; } closeParen = true; } else if (char === '%') { if (percent) { - return null; + return undefined; } percent = true; } @@ -306,18 +305,18 @@ export function parseNumber (value: string, options: { locale?: string; } = {}): } if (i !== value.length) { - return null; + return undefined; } // is number ok? let numberValue = parseFloat(num + exp); if (!isFinite(numberValue)) { - return null; + return undefined; } if (exp) { if (percent || currency) { - return null; + return undefined; } // allow parens and minus, but not %$ format = '0.00E+00'; @@ -325,7 +324,7 @@ export function parseNumber (value: string, options: { locale?: string; } = {}): else if (percent) { if (currency) { // Sheets allows this: $123% => $1.23 (Excel does not) - return null; + return undefined; } // numpart dictates how "deep" the format is: "0" vs "0.00" format = num.includes('.') @@ -493,21 +492,20 @@ const getLookups = (arr: string[], sym: string) => { /** * Parse a date or datetime string input and return its value and format. If - * the input was not recognized or valid, the function returns a `null`, for + * the input was not recognized or valid, the function returns an `undefined`, for * valid input it returns an object with two properties: * * - `v`: the parsed value. * - `z`: the number format of the input (if applicable). * - * @see parseValue - * @param value The date to parse - * @param [options={}] Options + * @param value The string to parse + * @param [options={}] Options for the parser * @param [options.locale=""] * A BCP 47 string tag. Locale default is english with a `\u00a0` * grouping symbol (see [addLocale](#addLocale)) * @returns An object of the parsed value and a corresponding format string */ -export function parseDate (value: string, options: { locale?: string; } = {}): ParseDataNum | null { +export function parseDate (value: string, options: { locale?: string; } = {}): ParseDataNum | undefined { const l10n = getLocale(options.locale || '') || defaultLocale; const lData: LData = { mon: getLookups(l10n.mmmm, 'F').concat(getLookups(l10n.mmm, 'M')), @@ -526,7 +524,7 @@ export function parseDate (value: string, options: { locale?: string; } = {}): P if (date) { // disallow matches where two tokens are separated by a period if (date.sep === '.' && date.path?.length === 3) { - return null; + return undefined; } const year = +(date.year ?? currentYear); if (!date.day) { @@ -534,7 +532,7 @@ export function parseDate (value: string, options: { locale?: string; } = {}): P } let epoch = -Infinity; if (year < 1900) { - return null; + return undefined; } else if (year <= 1900 && (date.month ?? 0) <= 2) { epoch = 25568; @@ -559,7 +557,7 @@ export function parseDate (value: string, options: { locale?: string; } = {}): P return { v: dateValue, z: format }; } } - return null; + return undefined; } const normAMPMStr = (s: string): string => ( @@ -570,21 +568,20 @@ const normAMPMStr = (s: string): string => ( /** * Parse a time string input and return its value and format. If the input was - * not recognized or valid, the function returns a `null`, for valid input it + * not recognized or valid, the function returns a `undefined`, for valid input it * returns an object with two properties: * * - `v`: the parsed value. * - `z`: the number format of the input (if applicable). * - * @see parseValue * @param value The date to parse - * @param [options={}] Options - * @param [options.locale=""] + * @param [options] Options for the parser + * @param [options.locale] * A BCP 47 string tag. Locale default is english with a `\u00a0` * grouping symbol (see [addLocale](#addLocale)) * @returns An object of the parsed value and a corresponding format string */ -export function parseTime (value: string, options: { locale?: string; } = {}): ParseDataNum | null { +export function parseTime (value: string, options: { locale?: string; } = {}): ParseDataNum | undefined { const l10n = getLocale(options.locale || '') || defaultLocale; const parts = /^\s*([10]?\d|2[0-4])(?::([0-5]\d|\d))?(?::([0-5]\d|\d))?(\.\d{1,10})?(?=\s*[^\s\d]|$)/.exec(value); let ampm = ''; @@ -605,24 +602,24 @@ export function parseTime (value: string, options: { locale?: string; } = {}): P } } else if (tail) { - return null; + return undefined; } } if (parts) { const [ , h, m, s, f ] = parts; // don't allow milliseconds without seconds if (f && !s) { - return null; + return undefined; } // single number must also include AM/PM part if (!ampm && !m && !s) { - return null; + return undefined; } // AM/PM part must align with hours let hrs = +(h || 0) * 1; if (ampm) { if (hrs >= 13) { - return null; + return undefined; } // 00:00 AM - 12:00 AM if (ampm === 'a') { @@ -650,25 +647,24 @@ export function parseTime (value: string, options: { locale?: string; } = {}): P ) }; } - return null; + return undefined; } /** - * Parse a string input and return its boolean value. If the input was not - * recognized or valid, the function returns a `null`, for valid input it - * returns an object with one property: + * Parse a string input and return its equivalent boolean value. If the input was not + * recognized or valid, the function returns an `undefined`, for valid input it + * returns an object with a single property: * * - `v`: the parsed value. * - * @see parseValue * @param value The supposed boolean to parse - * @param [options={}] Options - * @param [options.locale=""] + * @param [options] Options for the parser + * @param [options.locale] * A BCP 47 string tag. Locale default is english with a `\u00a0` * grouping symbol (see [addLocale](#addLocale)) * @returns An object of the parsed value and a corresponding format string */ -export function parseBool (value: string, options: { locale?: string; } = {}): ParseDataBool | null { +export function parseBool (value: string, options: { locale?: string; } = {}): ParseDataBool | undefined { const l10n = getLocale(options.locale || '') || defaultLocale; const v = value.trim().toLowerCase(); const bT = l10n.bool[0].toLowerCase(); @@ -679,13 +675,13 @@ export function parseBool (value: string, options: { locale?: string; } = {}): P if (v === 'false' || v === bF) { return { v: false }; } - return null; + return undefined; } /** * Attempt to parse a "spreadsheet input" string input and return its value and - * format. If the input was not recognized or valid, the function returns a - * `null`, for valid input it returns an object with two properties: + * format. If the input was not recognized or valid, the function returns an + * `undefined`, for valid input it returns an object with two properties: * * - `v`: The parsed value. For dates, this will be an Excel style serial date. * - `z`: (Optionally) the number format string of the input. This property will @@ -718,28 +714,22 @@ export function parseBool (value: string, options: { locale?: string; } = {}): P * - Decimal fractions are always represented by `.00` regardless of how many * digits were shown in the input. * - Negatives denoted by parentheses [`(1,234)`] will not include the - * parentheses in the format string (the value will still by negative.) + * parentheses in the format string (the value will still be negative.) * - All "scientific notation" returns the same format: `0.00E+00`. * * Internally the parser calls, `parseNumber`, `parseDate`, * `parseTime` and `parseBool`. They work in the same way except - * with a more limited scope. You may want those function if you are limiting + * with a more limited scope. You may prefer those functions if you are limiting * input to a smaller scope. * - * Be warned that the parser do not (yet) take locale into account so all input - * is assumed to be in "en-US". This means that `1,234.5` will parse, but - * `1.234,5` will not. Similarly, the order of date parts will be US centric. - * This may change in the future so be careful what options you pass the - * functions. - * * @param value The value to parse - * @param [options={}] Options - * @param [options.locale=""] + * @param [options] Options for the parser + * @param [options.locale] * A BCP 47 string tag. Locale default is english with a `\u00a0` - * grouping symbol (see [addLocale](#addLocale)) + * grouping symbol (see {@link addLocale}) * @returns An object of the parsed value and a corresponding format string */ -export function parseValue (value: string, options?: { locale?: string; }): ParseDataNum | ParseDataBool | null { +export function parseValue (value: string, options?: { locale?: string; }): ParseDataNum | ParseDataBool | undefined { return ( parseNumber(value, options) ?? parseDate(value, options) ?? diff --git a/lib/round.ts b/lib/round.ts index f8cb40c..8d6a2e3 100644 --- a/lib/round.ts +++ b/lib/round.ts @@ -1,15 +1,15 @@ /** * Return a number rounded to the specified amount of places. This is the * rounding function used internally by the formatter (symmetric arithmetic - * rounding). + * rounding). It rounds the same way Excel does. * - * @param number - The number to round. - * @param [places=0] - The number of decimals to round to. + * @param number The number to round. + * @param [places] The number of decimals to round to. * @returns A rounded number. */ export function round (number: number, places: number = 0): number { if (typeof number !== 'number') { - return number; + return NaN; } if (number < 0) { return -round(-number, places); diff --git a/lib/serialDate.ts b/lib/serialDate.ts index f5d3291..7277e5c 100644 --- a/lib/serialDate.ts +++ b/lib/serialDate.ts @@ -4,10 +4,10 @@ const floor = Math.floor; const DAYSIZE = 86400; /** - * Convert a native JavaScript Date, or array to an spreadsheet serial date. + * Convert a native JavaScript Date, or an array of date parts to an spreadsheet serial date. * * Returns a serial date number if input was a Date object or an array of - * numbers, a null. + * numbers, else a null. * * ```js * // input as Date @@ -16,20 +16,20 @@ const DAYSIZE = 86400; * dateToSerial([ 1978, 5, 17 ]); // 28627 * // other input * dateToSerial("something else"); // null - * ```` + * ``` * - * @param date The date - * @param [options={}] Options + * @param date A Date instance or an array of date parts in descending order. + * @param [options={}] Options for this method * @param [options.ignoreTimezone] * Normally time zone will be taken into account. This makes the conversion to * serial date ignore the timezone offset. - * @returns The date as a spreadsheet serial date, or null. + * @returns The date as a spreadsheet serial date, or undefined. */ export function dateToSerial ( date: Date | number[], options?: { ignoreTimezone?: boolean; } -): number | null { - let ts = null; +): number | undefined { + let ts = undefined; if (Array.isArray(date)) { const [ y, m, d, hh, mm, ss ] = date; ts = Date.UTC(y, m == null ? 0 : m - 1, d ?? 1, hh || 0, mm || 0, ss || 0); @@ -60,7 +60,7 @@ export function dateToSerial ( const d = (ts / 864e5); return d - (d <= -25509 ? -25568 : -25569); } - return null; + return; } /** @@ -70,13 +70,14 @@ export function dateToSerial ( * ```js * // output as [ Y, M, D, h, m, s ] * dateFromSerial(28627); // [ 1978, 5, 17, 0, 0, 0 ] - * ```` + * ``` * * @param serialDate The date - * @param [options={}] The options - * @param [options.leap1900=true] + * @param [options] Options for this method + * @param [options.leap1900] * Simulate the Lotus 1-2-3 [1900 leap year bug](https://docs.microsoft.com/en-us/office/troubleshoot/excel/wrongly-assumes-1900-is-leap-year). - * @returns returns an array of date parts + * True by default. + * @returns returns an array of date parts with parts in descending order: [ year, month, day, hour, minute, second ] */ export function dateFromSerial ( serialDate: number, diff --git a/lib/tokenize.ts b/lib/tokenize.ts index fb98d69..442347f 100644 --- a/lib/tokenize.ts +++ b/lib/tokenize.ts @@ -6,7 +6,7 @@ import { TOKEN_AMPM, TOKEN_ESCAPED, TOKEN_STRING, TOKEN_SKIP, TOKEN_EXP, TOKEN_FILL, TOKEN_PAREN, TOKEN_CHAR } from './constants.ts'; -import type { FormatToken, TokenType } from './types.ts'; +import type { Token, TokenType } from './types.ts'; const tokenHandlers: [ TokenType, RegExp, 0 | 1 | number[] ][] = [ [ TOKEN_GENERAL, /^General/i, 0 ], @@ -66,22 +66,22 @@ const isNumOp = (char: string) => { * * ```js * [ - * { type: 'zero', value: '0', raw: '0' }, - * { type: 'point', value: '.', raw: '.' }, - * { type: 'zero', value: '0', raw: '0' }, - * { type: 'percent', value: '%', raw: '%' } + * { type: TOKEN_ZERO, value: '0', raw: '0' }, + * { type: TOKEN_POINT, value: '.', raw: '.' }, + * { type: TOKEN_ZERO, value: '0', raw: '0' }, + * { type: TOKEN_PERCENT, value: '%', raw: '%' } * ] * ``` * - * Token types may be found as an Object as the - * [`tokenTypes` export]{@link tokenTypes} of the package. + * As well as exported individually, the token type descriptors may be found as + * an object collection at the {@link tokenTypes} export of the package. * * @param pattern The format pattern - * @returns a list of tokens + * @returns A list of tokens */ -export function tokenize (pattern: string): FormatToken[] { +export function tokenize (pattern: string): Token[] { let i = 0; - const tokens: FormatToken[] = []; + const tokens: Token[] = []; const unresolvedCommas = []; while (i < pattern.length) { const curr = pattern.slice(i); @@ -122,7 +122,7 @@ export function tokenize (pattern: string): FormatToken[] { else if (maybeGROUP && maybeSCALE) { // this token will be set to scale, but switched to group if we hit a // num token later on in the pattern... - const t: FormatToken = { type: TOKEN_SCALE, value: ',', raw }; + const t: Token = { type: TOKEN_SCALE, value: ',', raw }; tokens.push(t); unresolvedCommas.push(t); } @@ -132,7 +132,7 @@ export function tokenize (pattern: string): FormatToken[] { } // all other symbols are matched using else { - let token: FormatToken | undefined; + let token: Token | undefined; for (const [ type, expr, group ] of tokenHandlers) { const m = expr.exec(curr); if (m) { diff --git a/lib/types.ts b/lib/types.ts index e85f0cd..5ee1c34 100644 --- a/lib/types.ts +++ b/lib/types.ts @@ -10,6 +10,46 @@ import { } from './constants.ts'; +/** + * A valid token type. + * + * | Token type | Description + * |---------------- |---------------- + * | TOKEN_AMPM | AM/PM operator (`AM/PM`, `A/P`) + * | TOKEN_BREAK | Semicolon operator indicating a break between format sections (`;`) + * | TOKEN_CALENDAR | Calendar modifier (`B2`) + * | TOKEN_CHAR | Single non-operator character (`m`) + * | TOKEN_COLOR | Color modifier (`[Black]`, `[color 5]`) + * | TOKEN_COMMA | Plain non-operator comma (`,`) + * | TOKEN_CONDITION | Condition modifier for a section (`[>=10]`) + * | TOKEN_DATETIME | Date-time operator (`mmmm`, `YY`) + * | TOKEN_DBNUM | Number display modifier (`[DBNum23]`) + * | TOKEN_DIGIT | A digit between 1 and 9 (`3`) + * | TOKEN_DURATION | Time duration (`[ss]`) + * | TOKEN_ERROR | Unidentifiable or illegal character (`Ň`) + * | TOKEN_ESCAPED | Escaped character (`\E`) + * | TOKEN_EXP | Exponent operator (`E+`) + * | TOKEN_FILL | Fill with char operator and operand (`*_`) + * | TOKEN_GENERAL | General format operator (`General`) + * | TOKEN_GROUP | Number grouping operator (`,`) + * | TOKEN_HASH | Hash operator (digit if available) (`#`) + * | TOKEN_LOCALE | Locale modifier (`[$-1E020404]`) + * | TOKEN_MINUS | Minus sign (`-`) + * | TOKEN_MODIFIER | An unidentified modifier (`[Lorem]`) + * | TOKEN_NATNUM | Number display modifier (`[NatNum3]`) + * | TOKEN_PAREN | Parenthesis character (`)`) + * | TOKEN_PERCENT | Percent operator (`%`) + * | TOKEN_PLUS | Plus sign (`+`) + * | TOKEN_POINT | Decimal point operator (`.`) + * | TOKEN_QMARK | Question mark operator (digit or space if not available) (`?`) + * | TOKEN_SCALE | Scaling operator (`,`) + * | TOKEN_SKIP | Skip with char operator and operand (`*_`) + * | TOKEN_SLASH | Slash operator (`/`) + * | TOKEN_SPACE | Space (` `) + * | TOKEN_STRING | Quoted string (`"days"`) + * | TOKEN_TEXT | Text output operator (`@`) + * | TOKEN_ZERO | Zero operator (digit or zero if not available) (`0`) * + */ export type TokenType = ( typeof TOKEN_GENERAL | typeof TOKEN_HASH | typeof TOKEN_ZERO | typeof TOKEN_QMARK | typeof TOKEN_SLASH | typeof TOKEN_GROUP | typeof TOKEN_SCALE | typeof TOKEN_COMMA | @@ -22,7 +62,10 @@ export type TokenType = ( typeof TOKEN_PAREN | typeof TOKEN_CHAR ); -export type FormatToken = { +/** + * A token emitted by the tokenizer. + */ +export type Token = { /** Token type. */ type: TokenType, /** The value of the token, cleaned of extra characters. */ @@ -130,7 +173,10 @@ export type PatternParseData = { error?: string }; -/** An object of information properties based on a format pattern. */ +/** + * An object of information properties based on a format pattern. + * See the {@link getFormatInfo} method. + */ export type FormatInfo = { /** A string identifier for the type of the number formatter. */ type: ('currency' | 'date' | 'datetime' | 'error' | 'fraction' | 'general' | 'grouped' | 'number' | 'percent' | 'scientific' | 'text' | 'time'); @@ -170,7 +216,10 @@ export type FormatInfo = { level: number; }; -/** An object detailing which date specifiers are used in a format pattern. */ +/** + * An object detailing which date specifiers are used in a format pattern. + * See the {@link getFormatDateInfo} method. + */ export type FormatDateInfo = { /** true if the pattern uses years else false. */ year: boolean; diff --git a/test/color.spec.ts b/test/color.spec.ts index feb1cda..c18d694 100644 --- a/test/color.spec.ts +++ b/test/color.spec.ts @@ -3,14 +3,14 @@ import { formatColor } from '../lib/index.ts'; test('formatColor', () => { // color works the same across number sections, but not text - expect(formatColor('0', 123)).toBe(null); - expect(formatColor('0', 0)).toBe(null); - expect(formatColor('0', -123)).toBe(null); - expect(formatColor('0', 'foo')).toBe(null); + expect(formatColor('0', 123)).toBe(undefined); + expect(formatColor('0', 0)).toBe(undefined); + expect(formatColor('0', -123)).toBe(undefined); + expect(formatColor('0', 'foo')).toBe(undefined); expect(formatColor('[blue]0', 123)).toBe('blue'); expect(formatColor('[blue]0', 0)).toBe('blue'); expect(formatColor('[blue]0', -123)).toBe('blue'); - expect(formatColor('[blue]0', 'foo')).toBe(null); + expect(formatColor('[blue]0', 'foo')).toBe(undefined); // can define separate colors per section expect(formatColor('[blue]0;[green]-0;[magenta]0;[cyan]@', 1)).toBe('blue'); expect(formatColor('[blue]0;[green]-0;[magenta]0;[cyan]@', -1)).toBe('green'); @@ -30,12 +30,12 @@ test('formatColor', () => { expect(formatColor('[white]0', 0)).toBe('white'); expect(formatColor('[yellow]0', 0)).toBe('yellow'); // 1-based index color resolutions - expect(formatColor('[color 0]0', 0)).toBe(null); + expect(formatColor('[color 0]0', 0)).toBe(undefined); expect(formatColor('[color 1]0', 0)).toBe('#000000'); expect(formatColor('[color 2]0', 0)).toBe('#FFFFFF'); expect(formatColor('[color3]0', 0)).toBe('#FF0000'); // numbers are returned when indexColors is off - expect(formatColor('[color 0]0', 0, { indexColors: false })).toBe(null); + expect(formatColor('[color 0]0', 0, { indexColors: false })).toBe(undefined); expect(formatColor('[color 1]0', 0, { indexColors: false })).toBe(1); expect(formatColor('[color 2]0', 0, { indexColors: false })).toBe(2); expect(formatColor('[color3]0', 0, { indexColors: false })).toBe(3); diff --git a/test/date-parsing.spec.ts b/test/date-parsing.spec.ts index 2f925b2..6b7dfcf 100644 --- a/test/date-parsing.spec.ts +++ b/test/date-parsing.spec.ts @@ -162,4 +162,3 @@ test('Date specifiers: month vs. minute', () => { expect(format('yyyy-mm-dd\\Thh-mm-ss.000', 60)).toBe('1900-02-29T00-00-00.000'); expect(format('yyyy-mm-dd\\Thh-mm-ss.000', 61)).toBe('1900-03-01T00-00-00.000'); }); - diff --git a/test/parseValue.spec.ts b/test/parseValue.spec.ts index 931029d..17b6e14 100644 --- a/test/parseValue.spec.ts +++ b/test/parseValue.spec.ts @@ -553,11 +553,11 @@ test('parseNumber', () => { expect( parseNumber('1999.10.01'), 'parseNumber does not parse invalid numbers' - ).toEqual(null); + ).toEqual(undefined); expect( parseNumber('1999-10-01'), 'parseNumber does not parse non-numbers' - ).toEqual(null); + ).toEqual(undefined); expect( parseDate('1999-10-01 12:00:00'), @@ -566,7 +566,7 @@ test('parseNumber', () => { expect( parseDate('-123'), 'parseDate does not parse non-dates' - ).toEqual(null); + ).toEqual(undefined); expect( parseTime('09:18 PM'), @@ -575,7 +575,7 @@ test('parseNumber', () => { expect( parseTime('-123'), 'parseTime does not parse non-time' - ).toEqual(null); + ).toEqual(undefined); expect( parseBool('False'), @@ -584,7 +584,7 @@ test('parseNumber', () => { expect( parseBool('-123'), 'parseBool does not parse non-booleans' - ).toEqual(null); + ).toEqual(undefined); expect( parseBool('False'), @@ -593,12 +593,12 @@ test('parseNumber', () => { expect( parseBool('-123'), 'parseBool does not parse non-booleans' - ).toEqual(null); + ).toEqual(undefined); expect( parseDate('5.2022'), 'parseDate does not parse "decimals"' - ).toEqual(null); + ).toEqual(undefined); // test value parsing tests.forEach(ts => { @@ -628,12 +628,12 @@ test('parseNumber', () => { test('parseNumber locale support', () => { // can parse numbers in any language expect(parseNumber('1,234,567.89', { locale: 'en' })).toEqual({ v: 1234567.89, z: '#,##0.00' }); - expect(parseNumber('1.234.567,89', { locale: 'en' })).toEqual(null); + expect(parseNumber('1.234.567,89', { locale: 'en' })).toEqual(undefined); - expect(parseNumber('1,234,567.89', { locale: 'de' })).toEqual(null); + expect(parseNumber('1,234,567.89', { locale: 'de' })).toEqual(undefined); expect(parseNumber('1.234.567,89', { locale: 'de' })).toEqual({ v: 1234567.89, z: '#,##0.00' }); - expect(parseNumber('1,234,567.89', { locale: 'de' })).toEqual(null); + expect(parseNumber('1,234,567.89', { locale: 'de' })).toEqual(undefined); expect(parseNumber('1.234.567,89', { locale: 'de' })).toEqual({ v: 1234567.89, z: '#,##0.00' }); addLocale({ @@ -691,12 +691,12 @@ test('parseDate locale support', () => { const MDY = getLocale(l)?.preferMDY; if (MDY) { expect(parseDate('07/05/82', opt), `${l} prefers MDY (07/05/82)`).toEqual({ v: 30137, z: 'mm/dd/yy' }); - expect(parseDate('31/05/82', opt), `${l} prefers MDY (31/05/82)`).toEqual(null); + expect(parseDate('31/05/82', opt), `${l} prefers MDY (31/05/82)`).toEqual(undefined); expect(parseDate('05/31/82', opt), `${l} prefers MDY (05/31/82)`).toEqual({ v: 30102, z: 'mm/dd/yy' }); } else { expect(parseDate('07/05/82', opt), `${l} prefers DMY (07/05/82)`).toEqual({ v: 30078, z: 'dd/mm/yy' }); - expect(parseDate('07/31/82', opt), `${l} prefers DMY (07/31/82)`).toEqual(null); + expect(parseDate('07/31/82', opt), `${l} prefers DMY (07/31/82)`).toEqual(undefined); expect(parseDate('31/05/82', opt), `${l} prefers MDY (31/05/82)`).toEqual({ v: 30102, z: 'dd/mm/yy' }); } } diff --git a/test/robust-mode.spec.ts b/test/robust-mode.spec.ts index 22199d8..91544aa 100644 --- a/test/robust-mode.spec.ts +++ b/test/robust-mode.spec.ts @@ -17,6 +17,6 @@ test('Robust mode', () => { expect(format('dddd, dd. mmmm yyy', -1, opts), 'format does not throw with "dddd, dd. mmmm yyy"').toBe('######'); expect(format('y 0', 1, opts), 'format does not throw with "dddd, dd. mmmm yyy"').toBe('######'); - expect(formatColor('a;b;c;d;', 0, opts), 'formatColor does not throw').toBe(null); + expect(formatColor('a;b;c;d;', 0, opts), 'formatColor does not throw').toBe(undefined); expect(isDateFormat('a;b;c;d;'), 'isDateFormat does not throw').toBe(false); }); From 3e8839c33aa624bf6c5b28d888ea313ba3077292 Mon Sep 17 00:00:00 2001 From: Borgar Date: Fri, 28 Aug 2026 14:48:53 +0000 Subject: [PATCH 09/14] Correct eslint filename --- eslint.config.mjs | 14 +++++++------- tsconfig.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 9aabf37..65ccc73 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -8,15 +8,15 @@ export default tseslint.config( files: [ '**/*.js', '**/*.ts', - '**/*.mjs', + '**/*.mjs' ], ignores: [ - 'dist/*', + 'dist/*' ], languageOptions: { globals: { ...globals.browser }, - parserOptions: { projectService: { allowDefaultProject: [] } }, - }, + parserOptions: { projectService: { allowDefaultProject: [] } } + } }, eslint.configs.recommended, tseslint.configs.recommendedTypeChecked, @@ -25,7 +25,7 @@ export default tseslint.config( borgarLint.config.stylistic({ commaDangle: false, singleBlocks: true, - lineLength: 120, + lineLength: 120 }), { rules: { @@ -34,6 +34,6 @@ export default tseslint.config( '@typescript-eslint/no-unsafe-call': 'off', // rule is currently bugged 'no-useless-assignment': 'off' - }, - }, + } + } ); diff --git a/tsconfig.json b/tsconfig.json index 2bee658..c3ec516 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,7 +2,7 @@ "include": [ "lib/**/*", "test/**/*", - "eslint.config.js" + "eslint.config.mjs" ], "types": [ "node" ], "compilerOptions": { From cb42f47b78bf909db0145f1830db1bbda3cf6e1c Mon Sep 17 00:00:00 2001 From: Borgar Date: Fri, 28 Aug 2026 15:01:07 +0000 Subject: [PATCH 10/14] Stop providing a tokens type collections object, we export the types instead --- API.md | 3 -- lib/index.ts | 88 ++----------------------------------------------- lib/tokenize.ts | 3 -- 3 files changed, 2 insertions(+), 92 deletions(-) diff --git a/API.md b/API.md index a257c81..95e9887 100644 --- a/API.md +++ b/API.md @@ -673,9 +673,6 @@ The returned output will be an array of objects representing the tokens: ] ``` -As well as exported individually, the token type descriptors may be found as -an object collection at the tokenTypes export of the package. - ## Parameters | Parameter | Type | Description | diff --git a/lib/index.ts b/lib/index.ts index 89b60b5..574aa58 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -7,14 +7,7 @@ * @module numfmt */ -import { - TOKEN_GENERAL, TOKEN_HASH, TOKEN_ZERO, TOKEN_QMARK, TOKEN_SLASH, TOKEN_GROUP, TOKEN_SCALE, - TOKEN_COMMA, TOKEN_BREAK, TOKEN_TEXT, TOKEN_PLUS, TOKEN_MINUS, TOKEN_POINT, TOKEN_SPACE, - TOKEN_PERCENT, TOKEN_DIGIT, TOKEN_CALENDAR, TOKEN_ERROR, TOKEN_DATETIME, TOKEN_DURATION, - TOKEN_CONDITION, TOKEN_DBNUM, TOKEN_NATNUM, TOKEN_LOCALE, TOKEN_COLOR, TOKEN_MODIFIER, - TOKEN_AMPM, TOKEN_ESCAPED, TOKEN_STRING, TOKEN_SKIP, TOKEN_EXP, TOKEN_FILL, TOKEN_PAREN, - TOKEN_CHAR -} from './constants.ts'; +import { TOKEN_ERROR } from './constants.ts'; export { getLocale, @@ -25,7 +18,6 @@ export { import { defaultOptions, type FormatOptions } from './options.ts'; export { round } from './round.ts'; -export { dec2frac } from './dec2frac.ts'; export type { FormatOptions } from './options.ts'; export type { ParseDataBool, ParseDataNum } from './parseValue.ts'; export type { @@ -60,7 +52,7 @@ export { import { formatColor as fmtColor, formatValue as fmtValue } from './formatNumber.ts'; import { info, dateInfo, isDate, isPercent, isText } from './formatInfo.ts'; import { parsePattern } from './parsePattern.ts'; -import type { FormatDateInfo, FormatInfo, TokenType } from './types.ts'; +import type { FormatDateInfo, FormatInfo } from './types.ts'; export { tokenize } from './tokenize.ts'; @@ -266,79 +258,3 @@ export function getFormatDateInfo (pattern: string): FormatDateInfo { } return data.dateInfo; } - -// /** -// * A dictionary of the types used to identify token variants. -// * -// * @property AMPM - AM/PM operator (`AM/PM`, `A/P`) -// * @property BREAK - Semicolon operator indicating a break between format sections (`;`) -// * @property CALENDAR - Calendar modifier (`B2`) -// * @property CHAR - Single non-operator character (`m`) -// * @property COLOR - Color modifier (`[Black]`, `[color 5]`) -// * @property COMMA - Plain non-operator comma (`,`) -// * @property CONDITION - Condition modifier for a section (`[>=10]`) -// * @property DATETIME - Date-time operator (`mmmm`, `YY`) -// * @property DBNUM - Number display modifier (`[DBNum23]`) -// * @property DIGIT - A digit between 1 and 9 (`3`) -// * @property DURATION - Time duration (`[ss]`) -// * @property ERROR - Unidentifiable or illegal character (`Ň`) -// * @property ESCAPED - Escaped character (`\E`) -// * @property EXP - Exponent operator (`E+`) -// * @property FILL - Fill with char operator and operand (`*_`) -// * @property GENERAL - General format operator (`General`) -// * @property GROUP - Number grouping operator (`,`) -// * @property HASH - Hash operator (digit if available) (`#`) -// * @property LOCALE - Locale modifier (`[$-1E020404]`) -// * @property MINUS - Minus sign (`-`) -// * @property MODIFIER - An unidentified modifier (`[Schwarz]`) -// * @property NATNUM - Number display modifier (`[NatNum3]`) -// * @property PAREN - Parenthesis character (`)`) -// * @property PERCENT - Percent operator (`%`) -// * @property PLUS - Plus sign (`+`) -// * @property POINT - Decimal point operator (`.`) -// * @property QMARK - Question mark operator (digit or space if not available) (`?`) -// * @property SCALE - Scaling operator (`,`) -// * @property SKIP - Skip with char operator and operand (`*_`) -// * @property SLASH - Slash operator (`/`) -// * @property SPACE - Space (` `) -// * @property STRING - Quoted string (`"days"`) -// * @property TEXT - Text output operator (`@`) -// * @property ZERO - Zero operator (digit or zero if not available) (`0`) -// * @see tokenize -// */ -// export const tokenTypes: Readonly> = Object.freeze({ -// [TOKEN_AMPM]: TOKEN_AMPM, -// [TOKEN_BREAK]: TOKEN_BREAK, -// [TOKEN_CALENDAR]: TOKEN_CALENDAR, -// [TOKEN_CHAR]: TOKEN_CHAR, -// [TOKEN_COLOR]: TOKEN_COLOR, -// [TOKEN_COMMA]: TOKEN_COMMA, -// [TOKEN_CONDITION]: TOKEN_CONDITION, -// [TOKEN_DATETIME]: TOKEN_DATETIME, -// [TOKEN_DBNUM]: TOKEN_DBNUM, -// [TOKEN_DIGIT]: TOKEN_DIGIT, -// [TOKEN_DURATION]: TOKEN_DURATION, -// [TOKEN_ERROR]: TOKEN_ERROR, -// [TOKEN_ESCAPED]: TOKEN_ESCAPED, -// [TOKEN_EXP]: TOKEN_EXP, -// [TOKEN_FILL]: TOKEN_FILL, -// [TOKEN_GENERAL]: TOKEN_GENERAL, -// [TOKEN_GROUP]: TOKEN_GROUP, -// [TOKEN_HASH]: TOKEN_HASH, -// [TOKEN_LOCALE]: TOKEN_LOCALE, -// [TOKEN_MINUS]: TOKEN_MINUS, -// [TOKEN_MODIFIER]: TOKEN_MODIFIER, -// [TOKEN_NATNUM]: TOKEN_NATNUM, -// [TOKEN_PAREN]: TOKEN_PAREN, -// [TOKEN_PERCENT]: TOKEN_PERCENT, -// [TOKEN_PLUS]: TOKEN_PLUS, -// [TOKEN_POINT]: TOKEN_POINT, -// [TOKEN_QMARK]: TOKEN_QMARK, -// [TOKEN_SCALE]: TOKEN_SCALE, -// [TOKEN_SKIP]: TOKEN_SKIP, -// [TOKEN_SLASH]: TOKEN_SLASH, -// [TOKEN_SPACE]: TOKEN_SPACE, -// [TOKEN_STRING]: TOKEN_STRING, -// [TOKEN_TEXT]: TOKEN_TEXT, -// [TOKEN_ZERO]: TOKEN_ZERO -// }); diff --git a/lib/tokenize.ts b/lib/tokenize.ts index 442347f..53cf9f8 100644 --- a/lib/tokenize.ts +++ b/lib/tokenize.ts @@ -73,9 +73,6 @@ const isNumOp = (char: string) => { * ] * ``` * - * As well as exported individually, the token type descriptors may be found as - * an object collection at the {@link tokenTypes} export of the package. - * * @param pattern The format pattern * @returns A list of tokens */ From 411f60c2ee3544d72c1492820334a3648f41a4e1 Mon Sep 17 00:00:00 2001 From: Borgar Date: Fri, 28 Aug 2026 15:02:43 +0000 Subject: [PATCH 11/14] Switch to using tsdown for builds --- dist/index.d.mts | 715 +++ dist/index.d.ts | 715 +++ dist/index.js | 3381 ++++++++++++ dist/index.js.map | 1 + dist/index.mjs | 3361 ++++++++++++ dist/index.mjs.map | 1 + dist/numfmt.d.ts | 721 --- dist/numfmt.js | 2 - package-lock.json | 12112 ++++++++++++++++--------------------------- package.json | 36 +- 10 files changed, 12618 insertions(+), 8427 deletions(-) create mode 100644 dist/index.d.mts create mode 100644 dist/index.d.ts create mode 100644 dist/index.js create mode 100644 dist/index.js.map create mode 100644 dist/index.mjs create mode 100644 dist/index.mjs.map delete mode 100644 dist/numfmt.d.ts delete mode 100644 dist/numfmt.js diff --git a/dist/index.d.mts b/dist/index.d.mts new file mode 100644 index 0000000..ac1b8eb --- /dev/null +++ b/dist/index.d.mts @@ -0,0 +1,715 @@ +//#region lib/locale.d.ts +/** + * An object of properties used by a formatter when printing a number in a certain locale. + */ +type LocaleData = { + /** Symbol used as a grouping separator (`1,000,000` uses `,`) */ + group: string; + /** Symbol used to separate integers from fractions (usually `.`) */ + decimal: string; + /** Symbol used to indicate positive numbers (usually `+`) */ + positive: string; + /** Symbol used to indicate positive numbers (usually `-`) */ + negative: string; + /** Symbol used to indicate a percentage (usually `%`) */ + percent: string; + /** Symbol used to indicate an exponent (usually `E`) */ + exponent: string; + /** Symbol used to indicate NaN values (`NaN`) */ + nan: string; + /** Symbol used to indicate infinite values (`∞`) */ + infinity: string; + /** How AM and PM should be presented */ + ampm: string[]; + /** Long month names for the Islamic calendar (`Rajab`) */ + mmmm6: string[]; + /** Short month names for the Islamic calendar (`Raj.`) */ + mmm6: string[]; + /** Long month names for the Gregorian calendar (`November`) */ + mmmm: string[]; + /** Short month names for the Gregorian calendar (`Nov`) */ + mmm: string[]; + /** Long day names (`Wednesday`) */ + dddd: string[]; + /** Shortened day names (`Wed`) */ + ddd: string[]; + /** How TRUE and FALSE should be presented */ + bool: string[]; + /** Is the prefered date format month first (12/31/2025) or day first (31/12/2025) */ + preferMDY: boolean; +}; +/** + * An object of properties for a locale tag. + * + * ```js + * { lang: 'zh-CN', language: 'zh', territory: 'CN' } + * ``` + */ +type LocaleToken = { + /** The basic tag such as `zh-CN` or `fi` */ + lang: string; + /** The language section (`zh` for `zh-CN`) */ + language: string; + /** The territory section (`CN` for `zh-CN`) */ + territory: string; +}; +/** + * Parse a regular IETF BCP 47 locale tag (`en-US`) and emit an object of its parts. + * Irregular tags and subtags are not supported. + * + * @param locale A BCP 47 string tag of the locale. + * @returns An object describing the locale. + */ +declare function parseLocale(locale: string): LocaleToken; +/** + * Used by the formatter to pull a locate from its registered locales. If + * subtag isn't available but the base language is, the base language is used: + * So if `en-CA` is not found, the formatter tries to find `en` else it + * returns `undefined`. + * + * @param locale A BCP 47 string tag of the locale, or an Excel locale code. + * @returns An object of format date properties if one was found. + */ +declare function getLocale(locale: string | number): LocaleData | undefined; +/** + * Register locale data for a language to use when formatting. + * + * Any partial set of properties may be returned to have the defaults used where properties are missing. + * + * @param localeSettings - A collection of settings for a locale. + * @param [localeSettings.group="\u00a0"] + * Symbol used as a grouping separator (`1,000,000` uses `,`) + * @param [localeSettings.decimal="."] + * Symbol used to separate integers from fractions (usually `.`) + * @param [localeSettings.positive="+"] + * Symbol used to indicate positive numbers (usually `+`) + * @param [localeSettings.negative="-"] + * Symbol used to indicate positive numbers (usually `-`) + * @param [localeSettings.percent="%"] + * Symbol used to indicate a percentage (usually `%`) + * @param [localeSettings.exponent="E"] + * Symbol used to indicate an exponent (usually `E`) + * @param [localeSettings.nan="NaN"] + * Symbol used to indicate NaN values (`NaN`) + * @param [localeSettings.infinity="∞"] + * Symbol used to indicate infinite values (`∞`) + * @param [localeSettings.ampm=["AM","PM"]] + * How AM and PM should be presented. + * @param [localeSettings.mmmm6=["Muharram", "Safar", "Rabiʻ I", "Rabiʻ II", "Jumada I", "Jumada II", "Rajab", "Shaʻban", "Ramadan", "Shawwal", "Dhuʻl-Qiʻdah", "Dhuʻl-Hijjah"]] + * Long month names for the Islamic calendar (e.g. `Rajab`) + * @param [localeSettings.mmm6=["Muh.", "Saf.", "Rab. I", "Rab. II", "Jum. I", "Jum. II", "Raj.", "Sha.", "Ram.", "Shaw.", "Dhuʻl-Q.", "Dhuʻl-H."]] + * Short month names for the Islamic calendar (e.g. `Raj.`) + * @param [localeSettings.mmmm=["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]] + * Long month names for the Gregorian calendar (e.g. `November`) + * @param [localeSettings.mmm=["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]] + * Short month names for the Gregorian calendar (e.g. `Nov`) + * @param [localeSettings.dddd=["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]] + * Long day names (e.g. `Wednesday`) + * @param [localeSettings.ddd=["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]] + * Shortened day names (e.g. `Wed`) + * @param [localeSettings.bool=["TRUE", "FALSE"]] + * How TRUE and FALSE should be presented. + * @param {boolean} [localeSettings.preferMDY=false] + * Is the prefered date format month first (12/31/2025) or day first (31/12/2025) + * @param l4e - A string BCP 47 tag of the locale. + * @returns A full collection of settings for a locale + */ +declare function addLocale(localeSettings: Partial, l4e: string): LocaleData; +//#endregion +//#region lib/options.d.ts +/** Options that control the behavior of the formatter. */ +type FormatOptions = { + /** + * The string emitted when a formatter fails to format a date that is out of bounds. + * Both `dateErrorThrows` and `dateErrorNumber` override this setting. + * @default '######' + */ + overflow: string; + /** + * Should the formatter throw an error when trying to format a date that is out of bounds? + * @default false + */ + dateErrorThrows: boolean; + /** + * Should the formatter emit a number when trying to format a date that is out of bounds? + * This is default behaviour by Google Sheets. `dateErrorThrows` overrides this setting. + * @default true + */ + dateErrorNumber: boolean; + /** + * Should the formatter switch to a plain string number format when trying to + * format a bigint that is out of bounds of regular JS numbers? + * @default false + */ + bigintErrorNumber: boolean; + /** + * Extends the allowed range of dates from Excel bounds (1900–9999) to Google Sheet bounds (0–99999). + * @default true + */ + dateSpanLarge: boolean; + /** + * Simulate the Lotus 1-2-3 [1900 leap year bug](https://docs.microsoft.com/en-us/office/troubleshoot/excel/wrongly-assumes-1900-is-leap-year). + * It is a requirement in the Ecma OOXML specification so it is on by default. + * @default true + */ + leap1900: boolean; + /** + * Emit regular vs. non-breaking spaces. By default the output will use a regular + * space, but in many cases you may desire a non-breaking-space instead. + * @default false + */ + nbsp: boolean; + /** + * Should the formatter throw an error if a provided pattern is invalid. + * If false, a formatter will be constructed which instead outputs an error + * string (see _invalid_ in this table). + * @default true + */ + throws: boolean; + /** + * The string emitted when formatter fails to parse a pattern and has been instructed + * not to throw an error. + * @default '######' + */ + invalid: string; + /** + * A BCP 47 string tag or Excel [MsoLanguageID](https://docs.microsoft.com/en-us/office/vba/api/office.msolanguageid). Locale default is english with a `\u00a0` + * grouping symbol (see [addLocale](#addLocale)) + * @default '' + */ + locale: string | number; + /** + * Normally when date objects are used with the formatter, time zone is taken + * into account and the date is adjusted into UTC. This option makes the formatter + * ignore the timezone offset. + * @default false + */ + ignoreTimezone: boolean; + /** + * Integer grouping sizes. You may desire to emit numbers in standards other than the common 3 digits + * per group (e.g. "123,456,789"). The first grouping size is used for the least significant integer + * group, and the second grouping size is used for more significant groups (e.g. `[3, 2]` => "12,34,56,789"). + * @default [ 3 ] + */ + grouping: [number, number] | [number]; + /** + * Automatically resolve indexed colors to hex when outputting colors (red => #f00); + * When indexed color modifiers are used (`[Color 1]`) the formatter will convert the index + * into the corresponding hex color of the default palette. When this option is set to false, + * the number will instead by emitted allowing you to index against a custom palette. + * @default true + */ + indexColors: boolean; + /** + * When the formatter encounters `_` it normally emits a single space instead + * of the `_` and the next character (like Excel TEXT function does). Setting + * this to a character will make the formatter emit that followed by the next + * one. + * @default '' + */ + skipChar: string; + /** + * When the formatter encounters `*` it normally emits nothing instead of the + * `*` and the next character (like Excel TEXT function does). Setting this + * to a character will make the formatter emit that followed by the next one. + * @default '' + */ + fillChar: string; +}; +//#endregion +//#region lib/round.d.ts +/** + * Return a number rounded to the specified amount of places. This is the + * rounding function used internally by the formatter (symmetric arithmetic + * rounding). It rounds the same way Excel does. + * + * @param number The number to round. + * @param [places] The number of decimals to round to. + * @returns A rounded number. + */ +declare function round(number: number, places?: number): number; +//#endregion +//#region lib/parseValue.d.ts +/** + * Output from a number or date value parser. + */ +type ParseDataNum = { + /** A number value */ + v: number; + /** A number format pattern */ + z?: string; +}; +/** + * Output from the boolean value parser. + */ +type ParseDataBool = { + /** A boolean value */ + v: boolean; + /** A number format pattern */ + z?: string; +}; +/** + * Parse a numeric string input and return its value and format. If the input + * was not recognized or valid, the function returns a `undefined`, for valid input + * it returns an object with two properties: + * + * * `v`: the parsed value. + * * `z`: the number format of the input (if applicable). + * + * @param value The number to parse + * @param [options] Options for the parser + * @param [options.locale] + * A BCP 47 string tag. Locale default is english with a `\u00a0` + * grouping symbol (see [addLocale](#addLocale)) + * @returns An object of the parsed value and a corresponding format string + */ +declare function parseNumber(value: string, options?: { + locale?: string; +}): ParseDataNum | undefined; +/** + * Parse a date or datetime string input and return its value and format. If + * the input was not recognized or valid, the function returns an `undefined`, for + * valid input it returns an object with two properties: + * + * - `v`: the parsed value. + * - `z`: the number format of the input (if applicable). + * + * @param value The string to parse + * @param [options={}] Options for the parser + * @param [options.locale=""] + * A BCP 47 string tag. Locale default is english with a `\u00a0` + * grouping symbol (see [addLocale](#addLocale)) + * @returns An object of the parsed value and a corresponding format string + */ +declare function parseDate(value: string, options?: { + locale?: string; +}): ParseDataNum | undefined; +/** + * Parse a time string input and return its value and format. If the input was + * not recognized or valid, the function returns a `undefined`, for valid input it + * returns an object with two properties: + * + * - `v`: the parsed value. + * - `z`: the number format of the input (if applicable). + * + * @param value The date to parse + * @param [options] Options for the parser + * @param [options.locale] + * A BCP 47 string tag. Locale default is english with a `\u00a0` + * grouping symbol (see [addLocale](#addLocale)) + * @returns An object of the parsed value and a corresponding format string + */ +declare function parseTime(value: string, options?: { + locale?: string; +}): ParseDataNum | undefined; +/** + * Parse a string input and return its equivalent boolean value. If the input was not + * recognized or valid, the function returns an `undefined`, for valid input it + * returns an object with a single property: + * + * - `v`: the parsed value. + * + * @param value The supposed boolean to parse + * @param [options] Options for the parser + * @param [options.locale] + * A BCP 47 string tag. Locale default is english with a `\u00a0` + * grouping symbol (see [addLocale](#addLocale)) + * @returns An object of the parsed value and a corresponding format string + */ +declare function parseBool(value: string, options?: { + locale?: string; +}): ParseDataBool | undefined; +/** + * Attempt to parse a "spreadsheet input" string input and return its value and + * format. If the input was not recognized or valid, the function returns an + * `undefined`, for valid input it returns an object with two properties: + * + * - `v`: The parsed value. For dates, this will be an Excel style serial date. + * - `z`: (Optionally) the number format string of the input. This property will + * not be present if it amounts to the `General` format. + * + * `parseValue()` recognizes a wide range of dates and date-times, times, + * numbers, and booleans. Some examples: + * + * ```js + * // basic number + * parseValue("-123");// { v: -123 } + * // formatted number + * parseValue("$1,234"); // { v: 1234, z: "$#,##0" } + * // a percent + * parseValue("12.3%"); // { v: 0.123, z: "0.00%" } + * // a date + * parseValue("07 October 1984"); // { v: 30962, z: 'dd mmmm yyyy' } + * // an ISO formatted date-time + * parseValue("1984-09-10 11:12:13.1234"); // { v: 30935.46681855787, z: "yyyy-mm-dd hh:mm:ss" } + * // a boolean + * parseValue("false"); // { v: false } + * ``` + * + * The formatting string outputted may not correspond exactly to the input. + * Rather, is it composed of certain elements which the input controls. This is + * comparable to how Microsoft Excel and Google Sheets parse pasted input. Some + * things you may expect: + * + * - Whitespace is ignored. + * - Decimal fractions are always represented by `.00` regardless of how many + * digits were shown in the input. + * - Negatives denoted by parentheses [`(1,234)`] will not include the + * parentheses in the format string (the value will still be negative.) + * - All "scientific notation" returns the same format: `0.00E+00`. + * + * Internally the parser calls, `parseNumber`, `parseDate`, + * `parseTime` and `parseBool`. They work in the same way except + * with a more limited scope. You may prefer those functions if you are limiting + * input to a smaller scope. + * + * @param value The value to parse + * @param [options] Options for the parser + * @param [options.locale] + * A BCP 47 string tag. Locale default is english with a `\u00a0` + * grouping symbol (see {@link addLocale}) + * @returns An object of the parsed value and a corresponding format string + */ +declare function parseValue(value: string, options?: { + locale?: string; +}): ParseDataNum | ParseDataBool | undefined; +//#endregion +//#region lib/constants.d.ts +declare const TOKEN_GENERAL = "GENERAL"; +declare const TOKEN_HASH = "HASH"; +declare const TOKEN_ZERO = "ZERO"; +declare const TOKEN_QMARK = "QMARK"; +declare const TOKEN_SLASH = "SLASH"; +declare const TOKEN_GROUP = "GROUP"; +declare const TOKEN_SCALE = "SCALE"; +declare const TOKEN_COMMA = "COMMA"; +declare const TOKEN_BREAK = "BREAK"; +declare const TOKEN_TEXT = "TEXT"; +declare const TOKEN_PLUS = "PLUS"; +declare const TOKEN_MINUS = "MINUS"; +declare const TOKEN_POINT = "POINT"; +declare const TOKEN_SPACE = "SPACE"; +declare const TOKEN_PERCENT = "PERCENT"; +declare const TOKEN_DIGIT = "DIGIT"; +declare const TOKEN_CALENDAR = "CALENDAR"; +declare const TOKEN_ERROR = "ERROR"; +declare const TOKEN_DATETIME = "DATETIME"; +declare const TOKEN_DURATION = "DURATION"; +declare const TOKEN_CONDITION = "CONDITION"; +declare const TOKEN_DBNUM = "DBNUM"; +declare const TOKEN_NATNUM = "NATNUM"; +declare const TOKEN_LOCALE = "LOCALE"; +declare const TOKEN_COLOR = "COLOR"; +declare const TOKEN_MODIFIER = "MODIFIER"; +declare const TOKEN_AMPM = "AMPM"; +declare const TOKEN_ESCAPED = "ESCAPED"; +declare const TOKEN_STRING = "STRING"; +declare const TOKEN_SKIP = "SKIP"; +declare const TOKEN_EXP = "EXP"; +declare const TOKEN_FILL = "FILL"; +declare const TOKEN_PAREN = "PAREN"; +declare const TOKEN_CHAR = "CHAR"; +//#endregion +//#region lib/types.d.ts +/** + * A valid token type. + * + * | Token type | Description + * |---------------- |---------------- + * | TOKEN_AMPM | AM/PM operator (`AM/PM`, `A/P`) + * | TOKEN_BREAK | Semicolon operator indicating a break between format sections (`;`) + * | TOKEN_CALENDAR | Calendar modifier (`B2`) + * | TOKEN_CHAR | Single non-operator character (`m`) + * | TOKEN_COLOR | Color modifier (`[Black]`, `[color 5]`) + * | TOKEN_COMMA | Plain non-operator comma (`,`) + * | TOKEN_CONDITION | Condition modifier for a section (`[>=10]`) + * | TOKEN_DATETIME | Date-time operator (`mmmm`, `YY`) + * | TOKEN_DBNUM | Number display modifier (`[DBNum23]`) + * | TOKEN_DIGIT | A digit between 1 and 9 (`3`) + * | TOKEN_DURATION | Time duration (`[ss]`) + * | TOKEN_ERROR | Unidentifiable or illegal character (`Ň`) + * | TOKEN_ESCAPED | Escaped character (`\E`) + * | TOKEN_EXP | Exponent operator (`E+`) + * | TOKEN_FILL | Fill with char operator and operand (`*_`) + * | TOKEN_GENERAL | General format operator (`General`) + * | TOKEN_GROUP | Number grouping operator (`,`) + * | TOKEN_HASH | Hash operator (digit if available) (`#`) + * | TOKEN_LOCALE | Locale modifier (`[$-1E020404]`) + * | TOKEN_MINUS | Minus sign (`-`) + * | TOKEN_MODIFIER | An unidentified modifier (`[Lorem]`) + * | TOKEN_NATNUM | Number display modifier (`[NatNum3]`) + * | TOKEN_PAREN | Parenthesis character (`)`) + * | TOKEN_PERCENT | Percent operator (`%`) + * | TOKEN_PLUS | Plus sign (`+`) + * | TOKEN_POINT | Decimal point operator (`.`) + * | TOKEN_QMARK | Question mark operator (digit or space if not available) (`?`) + * | TOKEN_SCALE | Scaling operator (`,`) + * | TOKEN_SKIP | Skip with char operator and operand (`*_`) + * | TOKEN_SLASH | Slash operator (`/`) + * | TOKEN_SPACE | Space (` `) + * | TOKEN_STRING | Quoted string (`"days"`) + * | TOKEN_TEXT | Text output operator (`@`) + * | TOKEN_ZERO | Zero operator (digit or zero if not available) (`0`) * + */ +type TokenType = (typeof TOKEN_GENERAL | typeof TOKEN_HASH | typeof TOKEN_ZERO | typeof TOKEN_QMARK | typeof TOKEN_SLASH | typeof TOKEN_GROUP | typeof TOKEN_SCALE | typeof TOKEN_COMMA | typeof TOKEN_BREAK | typeof TOKEN_TEXT | typeof TOKEN_PLUS | typeof TOKEN_MINUS | typeof TOKEN_POINT | typeof TOKEN_SPACE | typeof TOKEN_PERCENT | typeof TOKEN_DIGIT | typeof TOKEN_CALENDAR | typeof TOKEN_ERROR | typeof TOKEN_DATETIME | typeof TOKEN_DURATION | typeof TOKEN_CONDITION | typeof TOKEN_DBNUM | typeof TOKEN_NATNUM | typeof TOKEN_LOCALE | typeof TOKEN_COLOR | typeof TOKEN_MODIFIER | typeof TOKEN_AMPM | typeof TOKEN_ESCAPED | typeof TOKEN_STRING | typeof TOKEN_SKIP | typeof TOKEN_EXP | typeof TOKEN_FILL | typeof TOKEN_PAREN | typeof TOKEN_CHAR); +/** + * A token emitted by the tokenizer. + */ +type Token = { + /** Token type. */ + type: TokenType; + /** The value of the token, cleaned of extra characters. */ + value: any; + /** Raw token source. */ + raw: string; +}; +/** + * An object of information properties based on a format pattern. + * See the {@link getFormatInfo} method. + */ +type FormatInfo = { + /** A string identifier for the type of the number formatter. */ + type: ('currency' | 'date' | 'datetime' | 'error' | 'fraction' | 'general' | 'grouped' | 'number' | 'percent' | 'scientific' | 'text' | 'time'); + /** Corresponds to the output from isDateFormat. */ + isDate: boolean; + /** Corresponds to the output from isTextFormat. */ + isText: boolean; + /** Corresponds to the output from isPercentFormat. */ + isPercent: boolean; + /** The maximum number of decimals this format will emit. */ + maxDecimals: number; + /** + * 1 if the format uses color on the negative portion of the string, else + * a 0. This replicates Excel's `CELL("color")` functionality. + */ + color: 0 | 1; + /** + * 1 if the positive portion of the number format contains an open + * parenthesis, else a 0. This is replicates Excel's `CELL("parentheses")` + * functionality. + */ + parentheses: 0 | 1; + /** 1 if the positive portion of the format uses a thousands separator, else a 0. */ + grouped: 0 | 1; + /** + * Corresponds to Excel's `CELL("format")` functionality. It should match Excel's esoteric behaviour fairly well. + * [See Microsoft's documentation.](https://support.microsoft.com/en-us/office/cell-function-51bd39a5-f338-4dbe-a33f-955d67c2b2cf) + */ + code: string; + /** The multiplier used when formatting the number (100 for percentages). */ + scale: number; + /** + * An arbirarty number that represents the format's specificity if you want + * to compare one to another. Integer comparisons roughly match Excel's + * resolutions when it determines which format wins out. + */ + level: number; +}; +/** + * An object detailing which date specifiers are used in a format pattern. + * See the {@link getFormatDateInfo} method. + */ +type FormatDateInfo = { + /** true if the pattern uses years else false. */ + year: boolean; + /** true if the pattern uses months else false. */ + month: boolean; + /** true if the pattern uses day of the month else false. */ + day: boolean; + /** true if the pattern uses hours else false. */ + hours: boolean; + /** true if the pattern uses minutes else false. */ + minutes: boolean; + /** true if the pattern uses seconds else false. */ + seconds: boolean; + /** 12 if the pattern uses AM/PM clock else 24. */ + clockType: 12 | 24; +}; +//#endregion +//#region lib/serialDate.d.ts +/** + * Convert a native JavaScript Date, or an array of date parts to an spreadsheet serial date. + * + * Returns a serial date number if input was a Date object or an array of + * numbers, else a null. + * + * ```js + * // input as Date + * dateToSerial(new Date(1978, 5, 17)); // 28627 + * // input as [ Y, M, D, h, m, s ] + * dateToSerial([ 1978, 5, 17 ]); // 28627 + * // other input + * dateToSerial("something else"); // null + * ``` + * + * @param date A Date instance or an array of date parts in descending order. + * @param [options={}] Options for this method + * @param [options.ignoreTimezone] + * Normally time zone will be taken into account. This makes the conversion to + * serial date ignore the timezone offset. + * @returns The date as a spreadsheet serial date, or undefined. + */ +declare function dateToSerial(date: Date | number[], options?: { + ignoreTimezone?: boolean; +}): number | undefined; +/** + * Convert a spreadsheet serial date to an array of date parts. + * Accurate to a second. + * + * ```js + * // output as [ Y, M, D, h, m, s ] + * dateFromSerial(28627); // [ 1978, 5, 17, 0, 0, 0 ] + * ``` + * + * @param serialDate The date + * @param [options] Options for this method + * @param [options.leap1900] + * Simulate the Lotus 1-2-3 [1900 leap year bug](https://docs.microsoft.com/en-us/office/troubleshoot/excel/wrongly-assumes-1900-is-leap-year). + * True by default. + * @returns returns an array of date parts with parts in descending order: [ year, month, day, hour, minute, second ] + */ +declare function dateFromSerial(serialDate: number, options?: { + leap1900?: boolean; +}): [number, number, number, number, number, number]; +//#endregion +//#region lib/tokenize.d.ts +/** + * Breaks a format pattern string into a list of tokens. + * + * The returned output will be an array of objects representing the tokens: + * + * ```js + * [ + * { type: TOKEN_ZERO, value: '0', raw: '0' }, + * { type: TOKEN_POINT, value: '.', raw: '.' }, + * { type: TOKEN_ZERO, value: '0', raw: '0' }, + * { type: TOKEN_PERCENT, value: '%', raw: '%' } + * ] + * ``` + * + * @param pattern The format pattern + * @returns A list of tokens + */ +declare function tokenize(pattern: string): Token[]; +//#endregion +//#region lib/index.d.ts +/** + * Formats a value as a string and returns the result. + * + * - Dates are normalized to spreadsheet style serial dates and then formatted. + * - Booleans are emitted as uppercase `TRUE` or `FALSE`. + * - `null` and `undefined` will return an empty string `""`. + * - Any non number values will be stringified and passed through the text section of the format pattern. + * - `NaN`s and `Infinite`s will use the corresponding strings from the active locale. + * + * @param pattern - A format pattern in the ECMA-376 number format. + * @param value - The value to format. + * @param [options={}] Formatter options + * @returns A formatted value + */ +declare function format(pattern: string, value: any, options?: Partial): string; +/** + * Find the color appropriate to a value as dictated by a format pattern. + * + * If the pattern defines colors, this function will emit the color appropriate + * to the value. If no colors were specified this function returns `undefined`. + * + * ```js + * const color = formatColor("[green]#,##0;[red]-#,##0", -10); + * console.log(color); // "red" + * const color = formatColor("[green]#,##0;-#,##0", -10); + * console.log(color); // undefined + * ``` + * + * @param pattern - A format pattern in the ECMA-376 number format. + * @param value - The value to format. + * @param [options={}] Formatter options + * @param [options.throws=true] + * Should the formatter throw an error if a provided pattern is invalid. + * If false, a formatter will be constructed which instead outputs an error + * string (see _invalid_ in this table). + * `true` by default. + * @param [options.ignoreTimezone=false] + * Normally when date objects are used with the formatter, time zone is taken + * into account. This makes the formatter ignore the timezone offset. + * `false` by default. + * @param [options.indexColors=true] + * When indexed color modifiers are used (`[Color 1]`) the formatter will + * convert the index into the corresponding hex color of the default palette. + * When this option is set to false, the number will instead by emitted + * allowing you to index against a custom palette. + * `true` by default. + * @returns + * A string color value as described by the pattern or a number if the + * indexColors option has been set to false. + */ +declare function formatColor(pattern: string, value: any, options?: { + throws?: boolean; + ignoreTimezone?: boolean; + indexColors?: boolean; +}): string | number | undefined; +/** + * Determine if a given format pattern is a date pattern. + * + * The pattern is considered a date pattern if any of its sections (`"a;b;c;d"`) + * contains a date operator (such as `Y` or `H`). Each section is restricted to be + * _either_ a number or date format. + * + * @param pattern A format pattern in the ECMA-376 number format. + * @returns True if the specified pattern is date pattern, False otherwise. + */ +declare function isDateFormat(pattern: string): boolean; +/** + * Determine if a given format pattern is a percentage pattern. + * + * The pattern is considered a percentage pattern if any of its sections (`"a;b;c;d"`) + * contains an unescaped percentage symbol. + * + * @param pattern A format pattern in the ECMA-376 number format. + * @returns True if the specified pattern is date pattern, False otherwise. + */ +declare function isPercentFormat(pattern: string): boolean; +/** + * Determine if a given format pattern is a text only pattern. + * + * The pattern is considered text only if its definition is composed of a single + * section that includes that text symbol (`@`). + * + * For example `@` or `@" USD"` are text patterns but `#;@` is not. + * + * @param pattern A format pattern in the ECMA-376 number format. + * @returns True if the specified pattern is date pattern, False otherwise. + */ +declare function isTextFormat(pattern: string): boolean; +/** + * Determine if a given format pattern is valid. + * + * @param pattern A format pattern in the ECMA-376 number format. + * @returns True if the specified pattern is valid, False otherwise. + */ +declare function isValidFormat(pattern: string): boolean; +/** + * Returns an object detailing the properties and internals of a format parsed + * format pattern. + * + * @param pattern A format pattern in the ECMA-376 number format. + * @param [options={}] Options for the method + * @param [options.currency] + * Limit the patterns identified as currency to those that use the give string. + * If nothing is provided, patterns will be tagged as currency if one of the + * following currency symbols is used: `¤$£¥֏؋৳฿៛₡₦₩₪₫€₭₮₱₲₴₸₹₺₼₽₾₿` + * @returns An object of format properties. + */ +declare function getFormatInfo(pattern: string, options?: { + currency?: string; +}): FormatInfo; +/** + * Gets information about how date codes are used in a format string. + * + * @param pattern A format pattern in the ECMA-376 number format. + * @returns An object of format date properties. + */ +declare function getFormatDateInfo(pattern: string): FormatDateInfo; +//#endregion +export { type FormatDateInfo, type FormatInfo, type FormatOptions, type LocaleData, type LocaleToken, type ParseDataBool, type ParseDataNum, type TOKEN_AMPM, type TOKEN_BREAK, type TOKEN_CALENDAR, type TOKEN_CHAR, type TOKEN_COLOR, type TOKEN_COMMA, type TOKEN_CONDITION, type TOKEN_DATETIME, type TOKEN_DBNUM, type TOKEN_DIGIT, type TOKEN_DURATION, type TOKEN_ERROR, type TOKEN_ESCAPED, type TOKEN_EXP, type TOKEN_FILL, type TOKEN_GENERAL, type TOKEN_GROUP, type TOKEN_HASH, type TOKEN_LOCALE, type TOKEN_MINUS, type TOKEN_MODIFIER, type TOKEN_NATNUM, type TOKEN_PAREN, type TOKEN_PERCENT, type TOKEN_PLUS, type TOKEN_POINT, type TOKEN_QMARK, type TOKEN_SCALE, type TOKEN_SKIP, type TOKEN_SLASH, type TOKEN_SPACE, type TOKEN_STRING, type TOKEN_TEXT, type TOKEN_ZERO, type Token, type TokenType, addLocale, dateFromSerial, dateToSerial, format, formatColor, getFormatDateInfo, getFormatInfo, getLocale, isDateFormat, isPercentFormat, isTextFormat, isValidFormat, parseBool, parseDate, parseLocale, parseNumber, parseTime, parseValue, round, tokenize }; +//# sourceMappingURL=index.d.mts.map \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts new file mode 100644 index 0000000..c2d2460 --- /dev/null +++ b/dist/index.d.ts @@ -0,0 +1,715 @@ +//#region lib/locale.d.ts +/** + * An object of properties used by a formatter when printing a number in a certain locale. + */ +type LocaleData = { + /** Symbol used as a grouping separator (`1,000,000` uses `,`) */ + group: string; + /** Symbol used to separate integers from fractions (usually `.`) */ + decimal: string; + /** Symbol used to indicate positive numbers (usually `+`) */ + positive: string; + /** Symbol used to indicate positive numbers (usually `-`) */ + negative: string; + /** Symbol used to indicate a percentage (usually `%`) */ + percent: string; + /** Symbol used to indicate an exponent (usually `E`) */ + exponent: string; + /** Symbol used to indicate NaN values (`NaN`) */ + nan: string; + /** Symbol used to indicate infinite values (`∞`) */ + infinity: string; + /** How AM and PM should be presented */ + ampm: string[]; + /** Long month names for the Islamic calendar (`Rajab`) */ + mmmm6: string[]; + /** Short month names for the Islamic calendar (`Raj.`) */ + mmm6: string[]; + /** Long month names for the Gregorian calendar (`November`) */ + mmmm: string[]; + /** Short month names for the Gregorian calendar (`Nov`) */ + mmm: string[]; + /** Long day names (`Wednesday`) */ + dddd: string[]; + /** Shortened day names (`Wed`) */ + ddd: string[]; + /** How TRUE and FALSE should be presented */ + bool: string[]; + /** Is the prefered date format month first (12/31/2025) or day first (31/12/2025) */ + preferMDY: boolean; +}; +/** + * An object of properties for a locale tag. + * + * ```js + * { lang: 'zh-CN', language: 'zh', territory: 'CN' } + * ``` + */ +type LocaleToken = { + /** The basic tag such as `zh-CN` or `fi` */ + lang: string; + /** The language section (`zh` for `zh-CN`) */ + language: string; + /** The territory section (`CN` for `zh-CN`) */ + territory: string; +}; +/** + * Parse a regular IETF BCP 47 locale tag (`en-US`) and emit an object of its parts. + * Irregular tags and subtags are not supported. + * + * @param locale A BCP 47 string tag of the locale. + * @returns An object describing the locale. + */ +declare function parseLocale(locale: string): LocaleToken; +/** + * Used by the formatter to pull a locate from its registered locales. If + * subtag isn't available but the base language is, the base language is used: + * So if `en-CA` is not found, the formatter tries to find `en` else it + * returns `undefined`. + * + * @param locale A BCP 47 string tag of the locale, or an Excel locale code. + * @returns An object of format date properties if one was found. + */ +declare function getLocale(locale: string | number): LocaleData | undefined; +/** + * Register locale data for a language to use when formatting. + * + * Any partial set of properties may be returned to have the defaults used where properties are missing. + * + * @param localeSettings - A collection of settings for a locale. + * @param [localeSettings.group="\u00a0"] + * Symbol used as a grouping separator (`1,000,000` uses `,`) + * @param [localeSettings.decimal="."] + * Symbol used to separate integers from fractions (usually `.`) + * @param [localeSettings.positive="+"] + * Symbol used to indicate positive numbers (usually `+`) + * @param [localeSettings.negative="-"] + * Symbol used to indicate positive numbers (usually `-`) + * @param [localeSettings.percent="%"] + * Symbol used to indicate a percentage (usually `%`) + * @param [localeSettings.exponent="E"] + * Symbol used to indicate an exponent (usually `E`) + * @param [localeSettings.nan="NaN"] + * Symbol used to indicate NaN values (`NaN`) + * @param [localeSettings.infinity="∞"] + * Symbol used to indicate infinite values (`∞`) + * @param [localeSettings.ampm=["AM","PM"]] + * How AM and PM should be presented. + * @param [localeSettings.mmmm6=["Muharram", "Safar", "Rabiʻ I", "Rabiʻ II", "Jumada I", "Jumada II", "Rajab", "Shaʻban", "Ramadan", "Shawwal", "Dhuʻl-Qiʻdah", "Dhuʻl-Hijjah"]] + * Long month names for the Islamic calendar (e.g. `Rajab`) + * @param [localeSettings.mmm6=["Muh.", "Saf.", "Rab. I", "Rab. II", "Jum. I", "Jum. II", "Raj.", "Sha.", "Ram.", "Shaw.", "Dhuʻl-Q.", "Dhuʻl-H."]] + * Short month names for the Islamic calendar (e.g. `Raj.`) + * @param [localeSettings.mmmm=["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]] + * Long month names for the Gregorian calendar (e.g. `November`) + * @param [localeSettings.mmm=["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]] + * Short month names for the Gregorian calendar (e.g. `Nov`) + * @param [localeSettings.dddd=["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]] + * Long day names (e.g. `Wednesday`) + * @param [localeSettings.ddd=["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]] + * Shortened day names (e.g. `Wed`) + * @param [localeSettings.bool=["TRUE", "FALSE"]] + * How TRUE and FALSE should be presented. + * @param {boolean} [localeSettings.preferMDY=false] + * Is the prefered date format month first (12/31/2025) or day first (31/12/2025) + * @param l4e - A string BCP 47 tag of the locale. + * @returns A full collection of settings for a locale + */ +declare function addLocale(localeSettings: Partial, l4e: string): LocaleData; +//#endregion +//#region lib/options.d.ts +/** Options that control the behavior of the formatter. */ +type FormatOptions = { + /** + * The string emitted when a formatter fails to format a date that is out of bounds. + * Both `dateErrorThrows` and `dateErrorNumber` override this setting. + * @default '######' + */ + overflow: string; + /** + * Should the formatter throw an error when trying to format a date that is out of bounds? + * @default false + */ + dateErrorThrows: boolean; + /** + * Should the formatter emit a number when trying to format a date that is out of bounds? + * This is default behaviour by Google Sheets. `dateErrorThrows` overrides this setting. + * @default true + */ + dateErrorNumber: boolean; + /** + * Should the formatter switch to a plain string number format when trying to + * format a bigint that is out of bounds of regular JS numbers? + * @default false + */ + bigintErrorNumber: boolean; + /** + * Extends the allowed range of dates from Excel bounds (1900–9999) to Google Sheet bounds (0–99999). + * @default true + */ + dateSpanLarge: boolean; + /** + * Simulate the Lotus 1-2-3 [1900 leap year bug](https://docs.microsoft.com/en-us/office/troubleshoot/excel/wrongly-assumes-1900-is-leap-year). + * It is a requirement in the Ecma OOXML specification so it is on by default. + * @default true + */ + leap1900: boolean; + /** + * Emit regular vs. non-breaking spaces. By default the output will use a regular + * space, but in many cases you may desire a non-breaking-space instead. + * @default false + */ + nbsp: boolean; + /** + * Should the formatter throw an error if a provided pattern is invalid. + * If false, a formatter will be constructed which instead outputs an error + * string (see _invalid_ in this table). + * @default true + */ + throws: boolean; + /** + * The string emitted when formatter fails to parse a pattern and has been instructed + * not to throw an error. + * @default '######' + */ + invalid: string; + /** + * A BCP 47 string tag or Excel [MsoLanguageID](https://docs.microsoft.com/en-us/office/vba/api/office.msolanguageid). Locale default is english with a `\u00a0` + * grouping symbol (see [addLocale](#addLocale)) + * @default '' + */ + locale: string | number; + /** + * Normally when date objects are used with the formatter, time zone is taken + * into account and the date is adjusted into UTC. This option makes the formatter + * ignore the timezone offset. + * @default false + */ + ignoreTimezone: boolean; + /** + * Integer grouping sizes. You may desire to emit numbers in standards other than the common 3 digits + * per group (e.g. "123,456,789"). The first grouping size is used for the least significant integer + * group, and the second grouping size is used for more significant groups (e.g. `[3, 2]` => "12,34,56,789"). + * @default [ 3 ] + */ + grouping: [number, number] | [number]; + /** + * Automatically resolve indexed colors to hex when outputting colors (red => #f00); + * When indexed color modifiers are used (`[Color 1]`) the formatter will convert the index + * into the corresponding hex color of the default palette. When this option is set to false, + * the number will instead by emitted allowing you to index against a custom palette. + * @default true + */ + indexColors: boolean; + /** + * When the formatter encounters `_` it normally emits a single space instead + * of the `_` and the next character (like Excel TEXT function does). Setting + * this to a character will make the formatter emit that followed by the next + * one. + * @default '' + */ + skipChar: string; + /** + * When the formatter encounters `*` it normally emits nothing instead of the + * `*` and the next character (like Excel TEXT function does). Setting this + * to a character will make the formatter emit that followed by the next one. + * @default '' + */ + fillChar: string; +}; +//#endregion +//#region lib/round.d.ts +/** + * Return a number rounded to the specified amount of places. This is the + * rounding function used internally by the formatter (symmetric arithmetic + * rounding). It rounds the same way Excel does. + * + * @param number The number to round. + * @param [places] The number of decimals to round to. + * @returns A rounded number. + */ +declare function round(number: number, places?: number): number; +//#endregion +//#region lib/parseValue.d.ts +/** + * Output from a number or date value parser. + */ +type ParseDataNum = { + /** A number value */ + v: number; + /** A number format pattern */ + z?: string; +}; +/** + * Output from the boolean value parser. + */ +type ParseDataBool = { + /** A boolean value */ + v: boolean; + /** A number format pattern */ + z?: string; +}; +/** + * Parse a numeric string input and return its value and format. If the input + * was not recognized or valid, the function returns a `undefined`, for valid input + * it returns an object with two properties: + * + * * `v`: the parsed value. + * * `z`: the number format of the input (if applicable). + * + * @param value The number to parse + * @param [options] Options for the parser + * @param [options.locale] + * A BCP 47 string tag. Locale default is english with a `\u00a0` + * grouping symbol (see [addLocale](#addLocale)) + * @returns An object of the parsed value and a corresponding format string + */ +declare function parseNumber(value: string, options?: { + locale?: string; +}): ParseDataNum | undefined; +/** + * Parse a date or datetime string input and return its value and format. If + * the input was not recognized or valid, the function returns an `undefined`, for + * valid input it returns an object with two properties: + * + * - `v`: the parsed value. + * - `z`: the number format of the input (if applicable). + * + * @param value The string to parse + * @param [options={}] Options for the parser + * @param [options.locale=""] + * A BCP 47 string tag. Locale default is english with a `\u00a0` + * grouping symbol (see [addLocale](#addLocale)) + * @returns An object of the parsed value and a corresponding format string + */ +declare function parseDate(value: string, options?: { + locale?: string; +}): ParseDataNum | undefined; +/** + * Parse a time string input and return its value and format. If the input was + * not recognized or valid, the function returns a `undefined`, for valid input it + * returns an object with two properties: + * + * - `v`: the parsed value. + * - `z`: the number format of the input (if applicable). + * + * @param value The date to parse + * @param [options] Options for the parser + * @param [options.locale] + * A BCP 47 string tag. Locale default is english with a `\u00a0` + * grouping symbol (see [addLocale](#addLocale)) + * @returns An object of the parsed value and a corresponding format string + */ +declare function parseTime(value: string, options?: { + locale?: string; +}): ParseDataNum | undefined; +/** + * Parse a string input and return its equivalent boolean value. If the input was not + * recognized or valid, the function returns an `undefined`, for valid input it + * returns an object with a single property: + * + * - `v`: the parsed value. + * + * @param value The supposed boolean to parse + * @param [options] Options for the parser + * @param [options.locale] + * A BCP 47 string tag. Locale default is english with a `\u00a0` + * grouping symbol (see [addLocale](#addLocale)) + * @returns An object of the parsed value and a corresponding format string + */ +declare function parseBool(value: string, options?: { + locale?: string; +}): ParseDataBool | undefined; +/** + * Attempt to parse a "spreadsheet input" string input and return its value and + * format. If the input was not recognized or valid, the function returns an + * `undefined`, for valid input it returns an object with two properties: + * + * - `v`: The parsed value. For dates, this will be an Excel style serial date. + * - `z`: (Optionally) the number format string of the input. This property will + * not be present if it amounts to the `General` format. + * + * `parseValue()` recognizes a wide range of dates and date-times, times, + * numbers, and booleans. Some examples: + * + * ```js + * // basic number + * parseValue("-123");// { v: -123 } + * // formatted number + * parseValue("$1,234"); // { v: 1234, z: "$#,##0" } + * // a percent + * parseValue("12.3%"); // { v: 0.123, z: "0.00%" } + * // a date + * parseValue("07 October 1984"); // { v: 30962, z: 'dd mmmm yyyy' } + * // an ISO formatted date-time + * parseValue("1984-09-10 11:12:13.1234"); // { v: 30935.46681855787, z: "yyyy-mm-dd hh:mm:ss" } + * // a boolean + * parseValue("false"); // { v: false } + * ``` + * + * The formatting string outputted may not correspond exactly to the input. + * Rather, is it composed of certain elements which the input controls. This is + * comparable to how Microsoft Excel and Google Sheets parse pasted input. Some + * things you may expect: + * + * - Whitespace is ignored. + * - Decimal fractions are always represented by `.00` regardless of how many + * digits were shown in the input. + * - Negatives denoted by parentheses [`(1,234)`] will not include the + * parentheses in the format string (the value will still be negative.) + * - All "scientific notation" returns the same format: `0.00E+00`. + * + * Internally the parser calls, `parseNumber`, `parseDate`, + * `parseTime` and `parseBool`. They work in the same way except + * with a more limited scope. You may prefer those functions if you are limiting + * input to a smaller scope. + * + * @param value The value to parse + * @param [options] Options for the parser + * @param [options.locale] + * A BCP 47 string tag. Locale default is english with a `\u00a0` + * grouping symbol (see {@link addLocale}) + * @returns An object of the parsed value and a corresponding format string + */ +declare function parseValue(value: string, options?: { + locale?: string; +}): ParseDataNum | ParseDataBool | undefined; +//#endregion +//#region lib/constants.d.ts +declare const TOKEN_GENERAL = "GENERAL"; +declare const TOKEN_HASH = "HASH"; +declare const TOKEN_ZERO = "ZERO"; +declare const TOKEN_QMARK = "QMARK"; +declare const TOKEN_SLASH = "SLASH"; +declare const TOKEN_GROUP = "GROUP"; +declare const TOKEN_SCALE = "SCALE"; +declare const TOKEN_COMMA = "COMMA"; +declare const TOKEN_BREAK = "BREAK"; +declare const TOKEN_TEXT = "TEXT"; +declare const TOKEN_PLUS = "PLUS"; +declare const TOKEN_MINUS = "MINUS"; +declare const TOKEN_POINT = "POINT"; +declare const TOKEN_SPACE = "SPACE"; +declare const TOKEN_PERCENT = "PERCENT"; +declare const TOKEN_DIGIT = "DIGIT"; +declare const TOKEN_CALENDAR = "CALENDAR"; +declare const TOKEN_ERROR = "ERROR"; +declare const TOKEN_DATETIME = "DATETIME"; +declare const TOKEN_DURATION = "DURATION"; +declare const TOKEN_CONDITION = "CONDITION"; +declare const TOKEN_DBNUM = "DBNUM"; +declare const TOKEN_NATNUM = "NATNUM"; +declare const TOKEN_LOCALE = "LOCALE"; +declare const TOKEN_COLOR = "COLOR"; +declare const TOKEN_MODIFIER = "MODIFIER"; +declare const TOKEN_AMPM = "AMPM"; +declare const TOKEN_ESCAPED = "ESCAPED"; +declare const TOKEN_STRING = "STRING"; +declare const TOKEN_SKIP = "SKIP"; +declare const TOKEN_EXP = "EXP"; +declare const TOKEN_FILL = "FILL"; +declare const TOKEN_PAREN = "PAREN"; +declare const TOKEN_CHAR = "CHAR"; +//#endregion +//#region lib/types.d.ts +/** + * A valid token type. + * + * | Token type | Description + * |---------------- |---------------- + * | TOKEN_AMPM | AM/PM operator (`AM/PM`, `A/P`) + * | TOKEN_BREAK | Semicolon operator indicating a break between format sections (`;`) + * | TOKEN_CALENDAR | Calendar modifier (`B2`) + * | TOKEN_CHAR | Single non-operator character (`m`) + * | TOKEN_COLOR | Color modifier (`[Black]`, `[color 5]`) + * | TOKEN_COMMA | Plain non-operator comma (`,`) + * | TOKEN_CONDITION | Condition modifier for a section (`[>=10]`) + * | TOKEN_DATETIME | Date-time operator (`mmmm`, `YY`) + * | TOKEN_DBNUM | Number display modifier (`[DBNum23]`) + * | TOKEN_DIGIT | A digit between 1 and 9 (`3`) + * | TOKEN_DURATION | Time duration (`[ss]`) + * | TOKEN_ERROR | Unidentifiable or illegal character (`Ň`) + * | TOKEN_ESCAPED | Escaped character (`\E`) + * | TOKEN_EXP | Exponent operator (`E+`) + * | TOKEN_FILL | Fill with char operator and operand (`*_`) + * | TOKEN_GENERAL | General format operator (`General`) + * | TOKEN_GROUP | Number grouping operator (`,`) + * | TOKEN_HASH | Hash operator (digit if available) (`#`) + * | TOKEN_LOCALE | Locale modifier (`[$-1E020404]`) + * | TOKEN_MINUS | Minus sign (`-`) + * | TOKEN_MODIFIER | An unidentified modifier (`[Lorem]`) + * | TOKEN_NATNUM | Number display modifier (`[NatNum3]`) + * | TOKEN_PAREN | Parenthesis character (`)`) + * | TOKEN_PERCENT | Percent operator (`%`) + * | TOKEN_PLUS | Plus sign (`+`) + * | TOKEN_POINT | Decimal point operator (`.`) + * | TOKEN_QMARK | Question mark operator (digit or space if not available) (`?`) + * | TOKEN_SCALE | Scaling operator (`,`) + * | TOKEN_SKIP | Skip with char operator and operand (`*_`) + * | TOKEN_SLASH | Slash operator (`/`) + * | TOKEN_SPACE | Space (` `) + * | TOKEN_STRING | Quoted string (`"days"`) + * | TOKEN_TEXT | Text output operator (`@`) + * | TOKEN_ZERO | Zero operator (digit or zero if not available) (`0`) * + */ +type TokenType = (typeof TOKEN_GENERAL | typeof TOKEN_HASH | typeof TOKEN_ZERO | typeof TOKEN_QMARK | typeof TOKEN_SLASH | typeof TOKEN_GROUP | typeof TOKEN_SCALE | typeof TOKEN_COMMA | typeof TOKEN_BREAK | typeof TOKEN_TEXT | typeof TOKEN_PLUS | typeof TOKEN_MINUS | typeof TOKEN_POINT | typeof TOKEN_SPACE | typeof TOKEN_PERCENT | typeof TOKEN_DIGIT | typeof TOKEN_CALENDAR | typeof TOKEN_ERROR | typeof TOKEN_DATETIME | typeof TOKEN_DURATION | typeof TOKEN_CONDITION | typeof TOKEN_DBNUM | typeof TOKEN_NATNUM | typeof TOKEN_LOCALE | typeof TOKEN_COLOR | typeof TOKEN_MODIFIER | typeof TOKEN_AMPM | typeof TOKEN_ESCAPED | typeof TOKEN_STRING | typeof TOKEN_SKIP | typeof TOKEN_EXP | typeof TOKEN_FILL | typeof TOKEN_PAREN | typeof TOKEN_CHAR); +/** + * A token emitted by the tokenizer. + */ +type Token = { + /** Token type. */ + type: TokenType; + /** The value of the token, cleaned of extra characters. */ + value: any; + /** Raw token source. */ + raw: string; +}; +/** + * An object of information properties based on a format pattern. + * See the {@link getFormatInfo} method. + */ +type FormatInfo = { + /** A string identifier for the type of the number formatter. */ + type: ('currency' | 'date' | 'datetime' | 'error' | 'fraction' | 'general' | 'grouped' | 'number' | 'percent' | 'scientific' | 'text' | 'time'); + /** Corresponds to the output from isDateFormat. */ + isDate: boolean; + /** Corresponds to the output from isTextFormat. */ + isText: boolean; + /** Corresponds to the output from isPercentFormat. */ + isPercent: boolean; + /** The maximum number of decimals this format will emit. */ + maxDecimals: number; + /** + * 1 if the format uses color on the negative portion of the string, else + * a 0. This replicates Excel's `CELL("color")` functionality. + */ + color: 0 | 1; + /** + * 1 if the positive portion of the number format contains an open + * parenthesis, else a 0. This is replicates Excel's `CELL("parentheses")` + * functionality. + */ + parentheses: 0 | 1; + /** 1 if the positive portion of the format uses a thousands separator, else a 0. */ + grouped: 0 | 1; + /** + * Corresponds to Excel's `CELL("format")` functionality. It should match Excel's esoteric behaviour fairly well. + * [See Microsoft's documentation.](https://support.microsoft.com/en-us/office/cell-function-51bd39a5-f338-4dbe-a33f-955d67c2b2cf) + */ + code: string; + /** The multiplier used when formatting the number (100 for percentages). */ + scale: number; + /** + * An arbirarty number that represents the format's specificity if you want + * to compare one to another. Integer comparisons roughly match Excel's + * resolutions when it determines which format wins out. + */ + level: number; +}; +/** + * An object detailing which date specifiers are used in a format pattern. + * See the {@link getFormatDateInfo} method. + */ +type FormatDateInfo = { + /** true if the pattern uses years else false. */ + year: boolean; + /** true if the pattern uses months else false. */ + month: boolean; + /** true if the pattern uses day of the month else false. */ + day: boolean; + /** true if the pattern uses hours else false. */ + hours: boolean; + /** true if the pattern uses minutes else false. */ + minutes: boolean; + /** true if the pattern uses seconds else false. */ + seconds: boolean; + /** 12 if the pattern uses AM/PM clock else 24. */ + clockType: 12 | 24; +}; +//#endregion +//#region lib/serialDate.d.ts +/** + * Convert a native JavaScript Date, or an array of date parts to an spreadsheet serial date. + * + * Returns a serial date number if input was a Date object or an array of + * numbers, else a null. + * + * ```js + * // input as Date + * dateToSerial(new Date(1978, 5, 17)); // 28627 + * // input as [ Y, M, D, h, m, s ] + * dateToSerial([ 1978, 5, 17 ]); // 28627 + * // other input + * dateToSerial("something else"); // null + * ``` + * + * @param date A Date instance or an array of date parts in descending order. + * @param [options={}] Options for this method + * @param [options.ignoreTimezone] + * Normally time zone will be taken into account. This makes the conversion to + * serial date ignore the timezone offset. + * @returns The date as a spreadsheet serial date, or undefined. + */ +declare function dateToSerial(date: Date | number[], options?: { + ignoreTimezone?: boolean; +}): number | undefined; +/** + * Convert a spreadsheet serial date to an array of date parts. + * Accurate to a second. + * + * ```js + * // output as [ Y, M, D, h, m, s ] + * dateFromSerial(28627); // [ 1978, 5, 17, 0, 0, 0 ] + * ``` + * + * @param serialDate The date + * @param [options] Options for this method + * @param [options.leap1900] + * Simulate the Lotus 1-2-3 [1900 leap year bug](https://docs.microsoft.com/en-us/office/troubleshoot/excel/wrongly-assumes-1900-is-leap-year). + * True by default. + * @returns returns an array of date parts with parts in descending order: [ year, month, day, hour, minute, second ] + */ +declare function dateFromSerial(serialDate: number, options?: { + leap1900?: boolean; +}): [number, number, number, number, number, number]; +//#endregion +//#region lib/tokenize.d.ts +/** + * Breaks a format pattern string into a list of tokens. + * + * The returned output will be an array of objects representing the tokens: + * + * ```js + * [ + * { type: TOKEN_ZERO, value: '0', raw: '0' }, + * { type: TOKEN_POINT, value: '.', raw: '.' }, + * { type: TOKEN_ZERO, value: '0', raw: '0' }, + * { type: TOKEN_PERCENT, value: '%', raw: '%' } + * ] + * ``` + * + * @param pattern The format pattern + * @returns A list of tokens + */ +declare function tokenize(pattern: string): Token[]; +//#endregion +//#region lib/index.d.ts +/** + * Formats a value as a string and returns the result. + * + * - Dates are normalized to spreadsheet style serial dates and then formatted. + * - Booleans are emitted as uppercase `TRUE` or `FALSE`. + * - `null` and `undefined` will return an empty string `""`. + * - Any non number values will be stringified and passed through the text section of the format pattern. + * - `NaN`s and `Infinite`s will use the corresponding strings from the active locale. + * + * @param pattern - A format pattern in the ECMA-376 number format. + * @param value - The value to format. + * @param [options={}] Formatter options + * @returns A formatted value + */ +declare function format(pattern: string, value: any, options?: Partial): string; +/** + * Find the color appropriate to a value as dictated by a format pattern. + * + * If the pattern defines colors, this function will emit the color appropriate + * to the value. If no colors were specified this function returns `undefined`. + * + * ```js + * const color = formatColor("[green]#,##0;[red]-#,##0", -10); + * console.log(color); // "red" + * const color = formatColor("[green]#,##0;-#,##0", -10); + * console.log(color); // undefined + * ``` + * + * @param pattern - A format pattern in the ECMA-376 number format. + * @param value - The value to format. + * @param [options={}] Formatter options + * @param [options.throws=true] + * Should the formatter throw an error if a provided pattern is invalid. + * If false, a formatter will be constructed which instead outputs an error + * string (see _invalid_ in this table). + * `true` by default. + * @param [options.ignoreTimezone=false] + * Normally when date objects are used with the formatter, time zone is taken + * into account. This makes the formatter ignore the timezone offset. + * `false` by default. + * @param [options.indexColors=true] + * When indexed color modifiers are used (`[Color 1]`) the formatter will + * convert the index into the corresponding hex color of the default palette. + * When this option is set to false, the number will instead by emitted + * allowing you to index against a custom palette. + * `true` by default. + * @returns + * A string color value as described by the pattern or a number if the + * indexColors option has been set to false. + */ +declare function formatColor(pattern: string, value: any, options?: { + throws?: boolean; + ignoreTimezone?: boolean; + indexColors?: boolean; +}): string | number | undefined; +/** + * Determine if a given format pattern is a date pattern. + * + * The pattern is considered a date pattern if any of its sections (`"a;b;c;d"`) + * contains a date operator (such as `Y` or `H`). Each section is restricted to be + * _either_ a number or date format. + * + * @param pattern A format pattern in the ECMA-376 number format. + * @returns True if the specified pattern is date pattern, False otherwise. + */ +declare function isDateFormat(pattern: string): boolean; +/** + * Determine if a given format pattern is a percentage pattern. + * + * The pattern is considered a percentage pattern if any of its sections (`"a;b;c;d"`) + * contains an unescaped percentage symbol. + * + * @param pattern A format pattern in the ECMA-376 number format. + * @returns True if the specified pattern is date pattern, False otherwise. + */ +declare function isPercentFormat(pattern: string): boolean; +/** + * Determine if a given format pattern is a text only pattern. + * + * The pattern is considered text only if its definition is composed of a single + * section that includes that text symbol (`@`). + * + * For example `@` or `@" USD"` are text patterns but `#;@` is not. + * + * @param pattern A format pattern in the ECMA-376 number format. + * @returns True if the specified pattern is date pattern, False otherwise. + */ +declare function isTextFormat(pattern: string): boolean; +/** + * Determine if a given format pattern is valid. + * + * @param pattern A format pattern in the ECMA-376 number format. + * @returns True if the specified pattern is valid, False otherwise. + */ +declare function isValidFormat(pattern: string): boolean; +/** + * Returns an object detailing the properties and internals of a format parsed + * format pattern. + * + * @param pattern A format pattern in the ECMA-376 number format. + * @param [options={}] Options for the method + * @param [options.currency] + * Limit the patterns identified as currency to those that use the give string. + * If nothing is provided, patterns will be tagged as currency if one of the + * following currency symbols is used: `¤$£¥֏؋৳฿៛₡₦₩₪₫€₭₮₱₲₴₸₹₺₼₽₾₿` + * @returns An object of format properties. + */ +declare function getFormatInfo(pattern: string, options?: { + currency?: string; +}): FormatInfo; +/** + * Gets information about how date codes are used in a format string. + * + * @param pattern A format pattern in the ECMA-376 number format. + * @returns An object of format date properties. + */ +declare function getFormatDateInfo(pattern: string): FormatDateInfo; +//#endregion +export { type FormatDateInfo, type FormatInfo, type FormatOptions, type LocaleData, type LocaleToken, type ParseDataBool, type ParseDataNum, type TOKEN_AMPM, type TOKEN_BREAK, type TOKEN_CALENDAR, type TOKEN_CHAR, type TOKEN_COLOR, type TOKEN_COMMA, type TOKEN_CONDITION, type TOKEN_DATETIME, type TOKEN_DBNUM, type TOKEN_DIGIT, type TOKEN_DURATION, type TOKEN_ERROR, type TOKEN_ESCAPED, type TOKEN_EXP, type TOKEN_FILL, type TOKEN_GENERAL, type TOKEN_GROUP, type TOKEN_HASH, type TOKEN_LOCALE, type TOKEN_MINUS, type TOKEN_MODIFIER, type TOKEN_NATNUM, type TOKEN_PAREN, type TOKEN_PERCENT, type TOKEN_PLUS, type TOKEN_POINT, type TOKEN_QMARK, type TOKEN_SCALE, type TOKEN_SKIP, type TOKEN_SLASH, type TOKEN_SPACE, type TOKEN_STRING, type TOKEN_TEXT, type TOKEN_ZERO, type Token, type TokenType, addLocale, dateFromSerial, dateToSerial, format, formatColor, getFormatDateInfo, getFormatInfo, getLocale, isDateFormat, isPercentFormat, isTextFormat, isValidFormat, parseBool, parseDate, parseLocale, parseNumber, parseTime, parseValue, round, tokenize }; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/dist/index.js b/dist/index.js new file mode 100644 index 0000000..7426e2d --- /dev/null +++ b/dist/index.js @@ -0,0 +1,3381 @@ +Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" }); +const TOKEN_GENERAL = "GENERAL"; +const TOKEN_HASH = "HASH"; +const TOKEN_ZERO = "ZERO"; +const TOKEN_QMARK = "QMARK"; +const TOKEN_SLASH = "SLASH"; +const TOKEN_GROUP = "GROUP"; +const TOKEN_SCALE = "SCALE"; +const TOKEN_COMMA = "COMMA"; +const TOKEN_BREAK = "BREAK"; +const TOKEN_TEXT = "TEXT"; +const TOKEN_PLUS = "PLUS"; +const TOKEN_MINUS = "MINUS"; +const TOKEN_POINT = "POINT"; +const TOKEN_SPACE = "SPACE"; +const TOKEN_PERCENT = "PERCENT"; +const TOKEN_DIGIT = "DIGIT"; +const TOKEN_CALENDAR = "CALENDAR"; +const TOKEN_ERROR = "ERROR"; +const TOKEN_DATETIME = "DATETIME"; +const TOKEN_DURATION = "DURATION"; +const TOKEN_CONDITION = "CONDITION"; +const TOKEN_DBNUM = "DBNUM"; +const TOKEN_NATNUM = "NATNUM"; +const TOKEN_LOCALE = "LOCALE"; +const TOKEN_COLOR = "COLOR"; +const TOKEN_MODIFIER = "MODIFIER"; +const TOKEN_AMPM = "AMPM"; +const TOKEN_ESCAPED = "ESCAPED"; +const TOKEN_STRING = "STRING"; +const TOKEN_SKIP = "SKIP"; +const TOKEN_FILL = "FILL"; +const TOKEN_PAREN = "PAREN"; +const TOKEN_CHAR = "CHAR"; +const T_TYPE_FRAC = "FRAC"; +const T_TYPE_YEAR = "YEAR"; +const T_TYPE_YEAR_S = "YEAR-SHORT"; +const T_TYPE_MON = "MONTH"; +const T_TYPE_MNAME_1 = "MONTHNAME-SINGLE"; +const T_TYPE_MNAME_S = "MONTHNAME-SHORT"; +const T_TYPE_MNAME = "MONTHNAME"; +const T_TYPE_WEEKDAY_S = "WEEKDAY-SHORT"; +const T_TYPE_WEEKDAY = "WEEKDAY"; +const T_TYPE_HOUR = "HOUR"; +const T_TYPE_SUBSEC = "SUBSEC"; +const T_TYPE_HOUR_E = "HOUR-ELAP"; +const T_TYPE_MIN_E = "MIN-ELAP"; +const T_TYPE_SEC_E = "SEC-ELAP"; +const T_TYPE_B_YEAR = "B-YEAR"; +const T_TYPE_B_YEAR_S = "B-YEAR-SHORT"; +const indexColors = [ + "#000000", + "#FFFFFF", + "#FF0000", + "#00FF00", + "#0000FF", + "#FFFF00", + "#FF00FF", + "#00FFFF", + "#800000", + "#008000", + "#000080", + "#808000", + "#800080", + "#008080", + "#C0C0C0", + "#808080", + "#9999FF", + "#993366", + "#FFFFCC", + "#CCFFFF", + "#660066", + "#FF8080", + "#0066CC", + "#CCCCFF", + "#000080", + "#FF00FF", + "#FFFF00", + "#00FFFF", + "#800080", + "#800000", + "#008080", + "#0000FF", + "#00CCFF", + "#CCFFFF", + "#CCFFCC", + "#FFFF99", + "#99CCFF", + "#FF99CC", + "#CC99FF", + "#FFCC99", + "#3366FF", + "#33CCCC", + "#99CC00", + "#FFCC00", + "#FF9900", + "#FF6600", + "#666699", + "#969696", + "#003366", + "#339966", + "#003300", + "#333300", + "#993300", + "#993366", + "#333399", + "#333333" +]; +const currencySymbols = [ + "¤", + "$", + "£", + "¥", + "֏", + "؋", + "৳", + "฿", + "៛", + "₡", + "₦", + "₩", + "₪", + "₫", + "€", + "₭", + "₮", + "₱", + "₲", + "₴", + "₸", + "₹", + "₺", + "₼", + "₽", + "₾", + "₿" +]; +const reCurrencySymbols = new RegExp("[" + currencySymbols.join("") + "]"); +//#endregion +//#region lib/codeToLocale.ts +const codeToLocale = Object.freeze({ + 1078: "af", + 1052: "sq", + 1118: "am", + 5121: "ar_DZ", + 15361: "ar_BH", + 3073: "ar_EG", + 2049: "ar_IQ", + 11265: "ar_JO", + 13313: "ar_KW", + 12289: "ar_LB", + 4097: "ar_LY", + 6145: "ar_MA", + 8193: "ar_OM", + 16385: "ar_QA", + 1025: "ar_SA", + 10241: "ar_SY", + 7169: "ar_TN", + 14337: "ar_AE", + 9217: "ar_YE", + 1067: "hy", + 1101: "as", + 2092: "az_AZ", + 1068: "az_AZ", + 1069: "eu", + 1059: "be", + 2117: "bn", + 1093: "bn_IN", + 5146: "bs", + 1026: "bg", + 1109: "my", + 1027: "ca", + 2052: "zh_CN", + 3076: "zh_HK", + 5124: "zh_MO", + 4100: "zh_SG", + 1028: "zh_TW", + 1050: "hr", + 1029: "cs", + 1030: "da", + 1125: "dv", + 2067: "nl_BE", + 1043: "nl_NL", + 1126: "bin", + 3081: "en_AU", + 10249: "en_BZ", + 4105: "en_CA", + 9225: "en_CB", + 2057: "en_GB", + 16393: "en_IN", + 6153: "en_IE", + 8201: "en_JM", + 5129: "en_NZ", + 13321: "en_PH", + 7177: "en_ZA", + 11273: "en_TT", + 1033: "en_US", + 12297: "en_ZW", + 1061: "et", + 1071: "mk", + 1080: "fo", + 1065: "fa", + 1124: "fil", + 1035: "fi", + 2060: "fr_BE", + 11276: "fr_CM", + 3084: "fr_CA", + 9228: "fr_CG", + 12300: "fr_CI", + 1036: "fr_FR", + 5132: "fr_LU", + 13324: "fr_ML", + 6156: "fr_MC", + 14348: "fr_MA", + 10252: "fr_SN", + 4108: "fr_CH", + 7180: "fr", + 1122: "fy_NL", + 2108: "gd_IE", + 1084: "gd", + 1110: "gl", + 1079: "ka", + 3079: "de_AT", + 1031: "de_DE", + 5127: "de_LI", + 4103: "de_LU", + 2055: "de_CH", + 1032: "el", + 1140: "gn", + 1095: "gu", + 1279: "en", + 1037: "he", + 1081: "hi", + 1038: "hu", + 1039: "is", + 1136: "ig_NG", + 1057: "id", + 1040: "it_IT", + 2064: "it_CH", + 1041: "ja", + 1099: "kn", + 1120: "ks", + 1087: "kk", + 1107: "km", + 1111: "kok", + 1042: "ko", + 1088: "ky", + 1108: "lo", + 1142: "la", + 1062: "lv", + 1063: "lt", + 2110: "ms_BN", + 1086: "ms_MY", + 1100: "ml", + 1082: "mt", + 1112: "mni", + 1153: "mi", + 1102: "mr", + 1104: "mn", + 2128: "mn", + 1121: "ne", + 1044: "no_NO", + 2068: "no_NO", + 1096: "or", + 1045: "pl", + 1046: "pt_BR", + 2070: "pt_PT", + 1094: "pa", + 1047: "rm", + 2072: "ro_MO", + 1048: "ro_RO", + 1049: "ru", + 2073: "ru_MO", + 1083: "se", + 1103: "sa", + 3098: "sr_SP", + 2074: "sr_SP", + 1072: "st", + 1074: "tn", + 1113: "sd", + 1115: "si", + 1051: "sk", + 1060: "sl", + 1143: "so", + 1070: "sb", + 11274: "es_AR", + 16394: "es_BO", + 13322: "es_CL", + 9226: "es_CO", + 5130: "es_CR", + 7178: "es_DO", + 12298: "es_EC", + 17418: "es_SV", + 4106: "es_GT", + 18442: "es_HN", + 2058: "es_MX", + 19466: "es_NI", + 6154: "es_PA", + 15370: "es_PY", + 10250: "es_PE", + 20490: "es_PR", + 1034: "es_ES", + 14346: "es_UY", + 8202: "es_VE", + 1089: "sw", + 2077: "sv_FI", + 1053: "sv_SE", + 1114: "syc", + 1064: "tg", + 1097: "ta", + 1092: "tt", + 1098: "te", + 1054: "th", + 1105: "bo", + 1073: "ts", + 1055: "tr", + 1090: "tk", + 1058: "uk", + 1056: "ur", + 2115: "uz_UZ", + 1091: "uz_UZ", + 1075: "ve", + 1066: "vi", + 1106: "cy", + 1076: "xh", + 1085: "yi", + 1077: "zu" +}); +//#endregion +//#region lib/locale.ts +const re_locale = /^([a-z\d]+)(?:[_-]([a-z\d]+))?(?:\.([a-z\d]+))?(?:@([a-z\d]+))?$/i; +const locales = {}; +/** +* Split a semicolon delimited string and replace instances of characters +* @internal +* @param str Semicolon delimited string +* @param [tilde] String to be inserted on every instance of ~ +* @returns Array of strings +*/ +const _ = (str, tilde = "") => str.replace(/~/g, tilde).split(";"); +/** +* Generate mmm and ddd properties as needed for locales. Many of them +* are straightforward abreviations of mmmm and dddd so we can save some +* bytes by auto-generating them. +* +* Both rule parameters use the same system. If shortform prop is missing: +* +* - 0 - use long form array unchanged +* - 1...9 - shorten to N many characters +* - 11...19 - shorten to 1...9 characters and add periods +* +* @internal +* @param o Locale object +* @param [ml] Month list rule +* @param [dl] Day list rule +* @returns The same input object, but with ddd and mmm filled in. +*/ +const xm = (o, ml = 0, dl = 0) => { + if (!o.mmm) o.mmm = ml < 1 ? o.mmmm.concat() : o.mmmm.map((d) => { + const s = d.slice(0, ml % 10); + return s + (ml < 10 || d === s ? "" : "."); + }); + if (!o.ddd) o.ddd = dl < 1 ? o.dddd.concat() : o.dddd.map((d) => { + const s = d.slice(0, dl % 10); + return s + (dl < 10 || d === s ? "" : "."); + }); + if (!o.mmm6 && o.mmmm6) o.mmm6 = o.mmmm6; + return o; +}; +/** @ignore */ +const baseLocaleData = { + group: "\xA0", + decimal: ".", + positive: "+", + negative: "-", + percent: "%", + exponent: "E", + nan: "NaN", + infinity: "∞", + ampm: _("AM;PM"), + mmmm6: _("Muharram;Safar;Rabiʻ I;Rabiʻ II;Jumada I;Jumada II;Rajab;Shaʻban;Ramadan;Shawwal;Dhuʻl-Qiʻdah;Dhuʻl-Hijjah"), + mmm6: _("Muh.;Saf.;Rab. I;Rab. II;Jum. I;Jum. II;Raj.;Sha.;Ram.;Shaw.;Dhuʻl-Q.;Dhuʻl-H."), + mmmm: _("January;February;March;April;May;June;July;August;September;October;November;December"), + mmm: _("Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec"), + dddd: _("Sunday;Monday;Tuesday;Wednesday;Thursday;Friday;Saturday"), + ddd: _("Sun;Mon;Tue;Wed;Thu;Fri;Sat"), + bool: _("TRUE;FALSE"), + preferMDY: false +}; +/** +* Parse a regular IETF BCP 47 locale tag (`en-US`) and emit an object of its parts. +* Irregular tags and subtags are not supported. +* +* @param locale A BCP 47 string tag of the locale. +* @returns An object describing the locale. +*/ +function parseLocale(locale) { + const lm = re_locale.exec(locale); + if (!lm) throw new SyntaxError(`Malformed locale: ${locale}`); + return { + lang: lm[1] + (lm[2] ? "-" + lm[2] : ""), + language: lm[1], + territory: lm[2] || "" + }; +} +function resolveLocale(l4e) { + if (typeof l4e === "number") return codeToLocale[l4e & 65535] || void 0; + const wincode = parseInt(l4e, 16); + if (isFinite(wincode) && codeToLocale[wincode & 65535]) return codeToLocale[wincode & 65535] || void 0; + if (re_locale.test(l4e)) return l4e; +} +/** +* Used by the formatter to pull a locate from its registered locales. If +* subtag isn't available but the base language is, the base language is used: +* So if `en-CA` is not found, the formatter tries to find `en` else it +* returns `undefined`. +* +* @param locale A BCP 47 string tag of the locale, or an Excel locale code. +* @returns An object of format date properties if one was found. +*/ +function getLocale(locale) { + const tag = resolveLocale(locale); + let obj; + if (tag) { + const c = parseLocale(tag); + obj = locales[c.lang] || locales[c.language] || void 0; + } + return obj; +} +function createLocale(data) { + return Object.assign({}, baseLocaleData, data); +} +/** +* Register locale data for a language to use when formatting. +* +* Any partial set of properties may be returned to have the defaults used where properties are missing. +* +* @param localeSettings - A collection of settings for a locale. +* @param [localeSettings.group="\u00a0"] +* Symbol used as a grouping separator (`1,000,000` uses `,`) +* @param [localeSettings.decimal="."] +* Symbol used to separate integers from fractions (usually `.`) +* @param [localeSettings.positive="+"] +* Symbol used to indicate positive numbers (usually `+`) +* @param [localeSettings.negative="-"] +* Symbol used to indicate positive numbers (usually `-`) +* @param [localeSettings.percent="%"] +* Symbol used to indicate a percentage (usually `%`) +* @param [localeSettings.exponent="E"] +* Symbol used to indicate an exponent (usually `E`) +* @param [localeSettings.nan="NaN"] +* Symbol used to indicate NaN values (`NaN`) +* @param [localeSettings.infinity="∞"] +* Symbol used to indicate infinite values (`∞`) +* @param [localeSettings.ampm=["AM","PM"]] +* How AM and PM should be presented. +* @param [localeSettings.mmmm6=["Muharram", "Safar", "Rabiʻ I", "Rabiʻ II", "Jumada I", "Jumada II", "Rajab", "Shaʻban", "Ramadan", "Shawwal", "Dhuʻl-Qiʻdah", "Dhuʻl-Hijjah"]] +* Long month names for the Islamic calendar (e.g. `Rajab`) +* @param [localeSettings.mmm6=["Muh.", "Saf.", "Rab. I", "Rab. II", "Jum. I", "Jum. II", "Raj.", "Sha.", "Ram.", "Shaw.", "Dhuʻl-Q.", "Dhuʻl-H."]] +* Short month names for the Islamic calendar (e.g. `Raj.`) +* @param [localeSettings.mmmm=["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]] +* Long month names for the Gregorian calendar (e.g. `November`) +* @param [localeSettings.mmm=["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]] +* Short month names for the Gregorian calendar (e.g. `Nov`) +* @param [localeSettings.dddd=["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]] +* Long day names (e.g. `Wednesday`) +* @param [localeSettings.ddd=["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]] +* Shortened day names (e.g. `Wed`) +* @param [localeSettings.bool=["TRUE", "FALSE"]] +* How TRUE and FALSE should be presented. +* @param {boolean} [localeSettings.preferMDY=false] +* Is the prefered date format month first (12/31/2025) or day first (31/12/2025) +* @param l4e - A string BCP 47 tag of the locale. +* @returns A full collection of settings for a locale +*/ +function addLocale(localeSettings, l4e) { + const c = typeof l4e === "object" ? l4e : parseLocale(l4e); + locales[c.lang] = createLocale(localeSettings); + if (c.language !== c.lang && !locales[c.language]) locales[c.language] = createLocale(localeSettings); + return locales[c.lang]; +} +const defaultLocale = createLocale({ + group: ",", + preferMDY: true +}); +defaultLocale.isDefault = true; +addLocale({ + group: ",", + ampm: _("上午;下午"), + mmmm: _("一月;二月;三月;四月;五月;六月;七月;八月;九月;十月;十一月;十二月"), + mmm: _("1月;2月;3月;4月;5月;6月;7月;8月;9月;10月;11月;12月"), + dddd: _("~日;~一;~二;~三;~四;~五;~六", "星期"), + ddd: _("周日;周一;周二;周三;周四;周五;周六") +}, "zh-CN"); +const _zh = { + group: ",", + ampm: _("上午;下午"), + mmmm: _("1月;2月;3月;4月;5月;6月;7月;8月;9月;10月;11月;12月"), + mmm: _("1月;2月;3月;4月;5月;6月;7月;8月;9月;10月;11月;12月"), + dddd: _("~日;~一;~二;~三;~四;~五;~六", "星期"), + ddd: _("周日;周一;周二;周三;周四;周五;周六") +}; +addLocale({ + ..._zh, + nan: "非數值", + dddd: _("~日;~一;~二;~三;~四;~五;~六", "星期") +}, "zh-TW"); +addLocale({ + ..._zh, + dddd: _("~日;~一;~二;~三;~四;~五;~六", "星期") +}, "zh-HK"); +addLocale({ + ..._zh, + ampm: _("午前;午後"), + dddd: _("日~;月~;火~;水~;木~;金~;土~", "曜日"), + ddd: _("日;月;火;水;木;金;土") +}, "ja"); +addLocale({ + group: ",", + ampm: _("오전;오후"), + mmmm: _("1월;2월;3월;4월;5월;6월;7월;8월;9월;10월;11월;12월"), + mmm: _("1월;2월;3월;4월;5월;6월;7월;8월;9월;10월;11월;12월"), + dddd: _("일요일;월요일;화요일;수요일;목요일;금요일;토요일"), + ddd: _("일;월;화;수;목;금;토") +}, "ko"); +addLocale({ + group: ",", + ampm: _("ก่อนเที่ยง;หลังเที่ยง"), + mmmm: _("มกร~;กุมภาพันธ์;มีน~;เมษายน;พฤษภ~;มิถุนายน;กรกฎ~;สิงห~;กันยายน;ตุล~;พฤศจิกายน;ธันว~", "าคม"), + mmm: _("ม.ค.;ก.พ.;มี.ค.;เม.ย.;พ.ค.;มิ.ย.;ก.ค.;ส.ค.;ก.ย.;ต.ค.;พ.ย.;ธ.ค."), + dddd: _("วันอาทิตย์;วันจันทร์;วันอังคาร;วันพุธ;วันพฤหัสบดี;วันศุกร์;วันเสาร์"), + ddd: _("อา.;จ.;อ.;พ.;พฤ.;ศ.;ส.") +}, "th"); +addLocale(xm({ + decimal: ",", + ampm: _("dop.;odp."), + mmmm: _("ledna;února;března;dubna;května;června;července;srpna;září;října;listopadu;prosince"), + mmm: _("I;II;III;IV;V;VI;VII;VIII;IX;X;XI;XII"), + dddd: _("neděle;pondělí;úterý;středa;čtvrtek;pátek;sobota"), + bool: _("PRAVDA;NEPRAVDA") +}, -1, 2), "cs"); +addLocale(xm({ + group: ".", + decimal: ",", + mmmm: _("januar;februar;marts;april;maj;juni;juli;august;september;oktober;november;december"), + dddd: _("søn~;man~;tirs~;ons~;tors~;fre~;lør~", "dag"), + bool: _("SAND;FALSK") +}, 13, 13), "da"); +addLocale(xm({ + group: ".", + decimal: ",", + ampm: _("a.m.;p.m."), + mmmm: _("januari;februari;maart;april;mei;juni;juli;augustus;september;oktober;november;december"), + mmm: _("jan.;feb.;mrt.;apr.;mei;jun.;jul.;aug.;sep.;okt.;nov.;dec."), + dddd: _("zondag;maandag;dinsdag;woensdag;donderdag;vrijdag;zaterdag"), + bool: _("WAAR;ONWAAR") +}, -1, 2), "nl"); +addLocale({ + group: ",", + preferMDY: true +}, "en"); +addLocale({ + group: ",", + preferMDY: true +}, "en-US"); +addLocale({ group: "," }, "en-AU"); +addLocale({ group: "," }, "en-CA"); +addLocale({ group: "," }, "en-GB"); +addLocale({ + group: ",", + mmm: _("Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sept;Oct;Nov;Dec") +}, "en-IE"); +addLocale(xm({ + decimal: ",", + nan: "epäluku", + ampm: _("ap.;ip."), + mmmm: _("tammi~;helmi~;maalis~;huhti~;touko~;kesä~;heinä~;elo~;syys~;loka~;marras~;joulu~", "kuuta"), + mmm: _("tammik.;helmik.;maalisk.;huhtik.;toukok.;kesäk.;heinäk.;elok.;syysk.;lokak.;marrask.;jouluk."), + dddd: _("sunnun~;maanan~;tiis~;keskiviikkona;tors~;perjan~;lauan~", "taina"), + bool: _("TOSI;EPÄTOSI") +}, -1, 2), "fi"); +const _fr = xm({ + group: " ", + decimal: ",", + mmmm: _("janvier;février;mars;avril;mai;juin;juillet;août;septembre;octobre;novembre;décembre"), + mmm: _("janv.;févr.;mars;avr.;mai;juin;juil.;août;sept.;oct.;nov.;déc."), + dddd: _("~manche;lun~;mar~;mercre~;jeu~;vendre~;same~", "di"), + bool: _("VRAI;FAUX") +}, -1, 13); +addLocale({ ..._fr }, "fr"); +addLocale({ + ..._fr, + mmm: _("janv.;févr.;mars;avr.;mai;juin;juill.;août;sept.;oct.;nov.;déc.") +}, "fr-CA"); +addLocale({ + group: "'", + decimal: ".", + ..._fr +}, "fr-CH"); +const _de = xm({ + mmmm: _("Januar;Februar;März;April;Mai;Juni;Juli;August;September;Oktober;November;Dezember"), + mmm: _("Jan.;Feb.;März;Apr.;Mai;Juni;Juli;Aug.;Sept.;Okt.;Nov.;Dez."), + dddd: _("Sonn~;Mon~;Diens~;Mittwoch;Donners~;Frei~;Sams~", "tag"), + bool: _("WAHR;FALSCH") +}, -1, 12); +addLocale({ + group: ".", + decimal: ",", + ..._de +}, "de"); +addLocale({ + group: "'", + decimal: ".", + ..._de +}, "de-CH"); +addLocale(xm({ + group: ".", + decimal: ",", + ampm: _("π.μ.;μ.μ."), + mmmm: _("Ιανουαρ~;Φεβρουαρ~;Μαρτ~;Απριλ~;Μαΐου;Ιουν~;Ιουλ~;Αυγούστου;Σεπτεμβρ~;Οκτωβρ~;Νοεμβρ~;Δεκεμβρ~", "ίου"), + mmm: _("Ιαν;Φεβ;Μαρ;Απρ;Μαΐ;Ιουν;Ιουλ;Αυγ;Σεπ;Οκτ;Νοε;Δεκ"), + dddd: _("Κυριακή;Δευτέρα;Τρίτη;Τετάρτη;Πέμπτη;Παρασκευή;Σάββατο") +}, -1, 3), "el"); +addLocale({ + decimal: ",", + ampm: _("de.;du."), + mmmm: _("január;február;március;április;május;június;július;augusztus;szeptember;október;november;december"), + mmm: _("jan.;febr.;márc.;ápr.;máj.;jún.;júl.;aug.;szept.;okt.;nov.;dec."), + dddd: _("vasárnap;hétfő;kedd;szerda;csütörtök;péntek;szombat"), + ddd: _("V;H;K;Sze;Cs;P;Szo"), + bool: _("IGAZ;HAMIS") +}, "hu"); +addLocale(xm({ + group: ".", + decimal: ",", + ampm: _("f.h.;e.h."), + mmmm: _("janúar;febrúar;mars;apríl;maí;júní;júlí;ágúst;september;október;nóvember;desember"), + dddd: _("sunnu~;mánu~;þriðju~;miðviku~;fimmtu~;föstu~;laugar~", "dagur") +}, 13, 13), "is"); +addLocale(xm({ + group: ".", + decimal: ",", + mmmm: _("Januari;Februari;Maret;April;Mei;Juni;Juli;Agustus;September;Oktober;November;Desember"), + dddd: _("Minggu;Senin;Selasa;Rabu;Kamis;Jumat;Sabtu") +}, 3, 3), "id"); +const _it = xm({ + mmmm: _("gennaio;febbraio;marzo;aprile;maggio;giugno;luglio;agosto;settembre;ottobre;novembre;dicembre"), + dddd: _("domenica;lunedì;martedì;mercoledì;giovedì;venerdì;sabato"), + bool: _("VERO;FALSO") +}, 3, 3); +addLocale({ + group: ".", + decimal: ",", + ..._it +}, "it"); +addLocale({ + group: "'", + decimal: ".", + ..._it +}, "it-CH"); +const _no = { + decimal: ",", + ampm: _("a.m.;p.m."), + mmmm: _("januar;februar;mars;april;mai;juni;juli;august;september;oktober;november;desember"), + mmm: _("jan.;feb.;mar.;apr.;mai;jun.;jul.;aug.;sep.;okt.;nov.;des."), + dddd: _("søn~;man~;tirs~;ons~;tors~;fre~;lør~", "dag"), + bool: _("SANN;USANN") +}; +addLocale(xm({ ..._no }, -1, 13), "nb"); +addLocale(xm({ ..._no }, -1, 13), "no"); +addLocale(xm({ + decimal: ",", + mmmm: _("stycznia;lutego;marca;kwietnia;maja;czerwca;lipca;sierpnia;września;października;listopada;grudnia"), + dddd: _("niedziela;poniedziałek;wtorek;środa;czwartek;piątek;sobota"), + ddd: _("niedz.;pon.;wt.;śr.;czw.;pt.;sob."), + bool: _("PRAWDA;FAŁSZ") +}, 3, -1), "pl"); +const _pt = { + group: ".", + decimal: ",", + mmmm: _("janeiro;fevereiro;março;abril;maio;junho;julho;agosto;setembro;outubro;novembro;dezembro"), + dddd: _("domingo;segunda-feira;terça-feira;quarta-feira;quinta-feira;sexta-feira;sábado"), + bool: _("VERDADEIRO;FALSO") +}; +addLocale(xm(_pt, 13, 13), "pt"); +addLocale(xm(_pt, 13, 13), "pt-BR"); +addLocale({ + decimal: ",", + nan: "не\xA0число", + mmmm: _("января;февраля;марта;апреля;мая;июня;июля;августа;сентября;октября;ноября;декабря"), + mmm: _("янв.;февр.;мар.;апр.;мая;июн.;июл.;авг.;сент.;окт.;нояб.;дек."), + dddd: _("воскресенье;понедельник;вторник;среда;четверг;пятница;суббота"), + ddd: _("вс;пн;вт;ср;чт;пт;сб"), + mmmm6: _("рамадан;шавваль;зуль-каада;зуль-хиджжа;мухаррам;раби-уль-авваль;раби-уль-ахир;джумад-уль-авваль;джумад-уль-ахир;раджаб;шаабан;рамадан"), + mmm6: _("рам.;шав.;зуль-к.;зуль-х.;мух.;раб. I;раб. II;джум. I;джум. II;радж.;шааб.;рам."), + bool: _("ИСТИНА;ЛОЖЬ") +}, "ru"); +addLocale(xm({ + decimal: ",", + mmmm: _("januára;februára;marca;apríla;mája;júna;júla;augusta;septembra;októbra;novembra;decembra"), + dddd: _("nedeľa;pondelok;utorok;streda;štvrtok;piatok;sobota") +}, 3, 2), "sk"); +const _es = { + group: ".", + decimal: ",", + ampm: _("a.\xA0m.;p.\xA0m."), + mmmm: _("enero;febrero;marzo;abril;mayo;junio;julio;agosto;septiem~;octu~;noviem~;diciem~", "bre"), + mmm: _("ene;feb;mar;abr;may;jun;jul;ago;sept;oct;nov;dic"), + dddd: _("domingo;lunes;martes;miércoles;jueves;viernes;sábado"), + ddd: _("dom;lun;mar;mié;jue;vie;sáb"), + bool: _("VERDADERO;FALSO") +}; +const _esM3 = _("ene;feb;mar;abr;may;jun;jul;ago;sep;oct;nov;dic"); +const _esM13 = _("ene.;feb.;mar.;abr.;may.;jun.;jul.;ago.;sept.;oct.;nov.;dic."); +addLocale({ ..._es }, "es"); +addLocale({ ..._es }, "es-AR"); +addLocale({ ..._es }, "es-BO"); +addLocale({ ..._es }, "es-CL"); +addLocale({ ..._es }, "es-CO"); +addLocale({ ..._es }, "es-EC"); +addLocale({ + ..._es, + mmm: _esM3, + ampm: _("a.m.;p.m.") +}, "es-MX"); +addLocale({ + ..._es, + mmm: _esM13 +}, "es-PY"); +addLocale({ + ..._es, + mmm: _esM13 +}, "es-UY"); +addLocale({ + ..._es, + mmm: _esM13, + mmmm: _("enero;febrero;marzo;abril;mayo;junio;julio;agosto;setiembre;octubre;noviembre;diciembre") +}, "es-VE"); +addLocale({ + decimal: ",", + ampm: _("fm;em"), + mmmm: _("januari;februari;mars;april;maj;juni;juli;augusti;september;oktober;november;december"), + mmm: _("jan.;feb.;mars;apr.;maj;juni;juli;aug.;sep.;okt.;nov.;dec."), + dddd: _("sön~;mån~;tis~;ons~;tors~;fre~;lör~", "dag"), + ddd: _("sön;mån;tis;ons;tors;fre;lör") +}, "sv"); +addLocale(xm({ + group: ".", + decimal: ",", + ampm: _("ÖÖ;ÖS"), + mmmm: _("Ocak;Şubat;Mart;Nisan;Mayıs;Haziran;Temmuz;Ağustos;Eylül;Ekim;Kasım;Aralık"), + mmm: _("Oca;Şub;Mar;Nis;May;Haz;Tem;Ağu;Eyl;Eki;Kas;Ara"), + dddd: _("Pazar;Pazartesi;Salı;Çarşamba;Perşembe;Cuma;Cumartesi"), + ddd: _("Paz;Pzt;Sal;Çar;Per;Cum;Cmt"), + bool: _("DOĞRU;YANLIŞ") +}, 3, -1), "tr"); +addLocale({ + group: ",", + ampm: _("yb;yh"), + mmmm: _("Ionawr;Chwefror;Mawrth;Ebrill;Mai;Mehefin;Gorffennaf;Awst;Medi;Hydref;Tachwedd;Rhagfyr"), + mmm: _("Ion;Chwef;Maw;Ebr;Mai;Meh;Gorff;Awst;Medi;Hyd;Tach;Rhag"), + dddd: _("Dydd Sul;Dydd Llun;Dydd Mawrth;Dydd Mercher;Dydd Iau;Dydd Gwener;Dydd Sadwrn"), + ddd: _("Sul;Llun;Maw;Mer;Iau;Gwen;Sad") +}, "cy"); +addLocale({ + group: ".", + decimal: ",", + mmmm: _("yanvar;fevral;mart;aprel;may;iyun;iyul;avqust;sentyabr;oktyabr;noyabr;dekabr"), + mmm: _("yan;fev;mar;apr;may;iyn;iyl;avq;sen;okt;noy;dek"), + dddd: _("bazar;bazar ertəsi;çərşənbə axşamı;çərşənbə;cümə axşamı;cümə;şənbə"), + ddd: _("B.;B.e.;Ç.a.;Ç.;C.a.;C.;Ş.") +}, "az"); +addLocale(xm({ + decimal: ",", + mmmm: _("студзеня;лютага;сакавіка;красавіка;мая;чэрвеня;ліпеня;жніўня;верасня;кастрычніка;лістапада;снежня"), + dddd: _("нядзеля;панядзелак;аўторак;серада;чацвер;пятніца;субота"), + ddd: _("нд;пн;аў;ср;чц;пт;сб") +}, 3, -1), "be"); +addLocale({ + decimal: ",", + ampm: _("пр.об.;сл.об."), + mmmm: _("януари;февруари;март;април;май;юни;юли;август;септември;октомври;ноември;декември"), + mmm: _("яну;фев;март;апр;май;юни;юли;авг;сеп;окт;ное;дек"), + dddd: _("неделя;понеделник;вторник;сряда;четвъртък;петък;събота"), + ddd: _("нд;пн;вт;ср;чт;пт;сб"), + bool: _("ИСТИНА;ЛОЖЬ") +}, "bg"); +addLocale({ + group: ".", + decimal: ",", + mmmm: _("de gener;de febrer;de març;d’abril;de maig;de juny;de juliol;d’agost;de setembre;d’octubre;de novembre;de desembre"), + mmm: _("de gen.;de febr.;de març;d’abr.;de maig;de juny;de jul.;d’ag.;de set.;d’oct.;de nov.;de des."), + dddd: _("diumenge;dilluns;dimarts;dimecres;dijous;divendres;dissabte"), + ddd: _("dg.;dl.;dt.;dc.;dj.;dv.;ds."), + ampm: _("a.\xA0m.;p.\xA0m.") +}, "ca"); +addLocale(xm({ + group: ",", + decimal: ".", + mmmm: _("Enero;Pebrero;Marso;Abril;Mayo;Hunyo;Hulyo;Agosto;Setyembre;Oktubre;Nobyembre;Disyembre"), + dddd: _("Linggo;Lunes;Martes;Miyerkules;Huwebes;Biyernes;Sabado") +}, 3, 3), "fil"); +addLocale({ + group: ",", + decimal: ".", + mmmm: _("જાન્યુઆરી;ફેબ્રુઆરી;માર્ચ;એપ્રિલ;મે;જૂન;જુલાઈ;ઑગસ્ટ;સપ્ટેમ્બર;ઑક્ટોબર;નવેમ્બર;ડિસેમ્બર"), + mmm: _("જાન્યુ;ફેબ્રુ;માર્ચ;એપ્રિલ;મે;જૂન;જુલાઈ;ઑગસ્ટ;સપ્ટે;ઑક્ટો;નવે;ડિસે"), + dddd: _("રવિ~;સોમ~;મંગળ~;બુધ~;ગુરુ~;શુક્ર~;શનિ~", "વાર"), + ddd: _("રવિ;સોમ;મંગળ;બુધ;ગુરુ;શુક્ર;શનિ") +}, "gu"); +addLocale({ + group: ",", + decimal: ".", + ampm: _("לפנה״צ;אחה״צ"), + dddd: _("~ראשון;~שני;~שלישי;~רביעי;~חמישי;~שישי;~שבת", "יום "), + ddd: _("~א׳;~ב׳;~ג׳;~ד׳;~ה׳;~ו׳;שבת", "יום "), + mmmm: _("ינואר;פברואר;מרץ;אפריל;מאי;יוני;יולי;אוגוסט;ספטמבר;אוקטובר;נובמבר;דצמבר"), + mmm: _("ינו׳;פבר׳;מרץ;אפר׳;מאי;יוני;יולי;אוג׳;ספט׳;אוק׳;נוב׳;דצמ׳"), + mmmm6: _("רמדאן;שוואל;ד׳ו אל־קעדה;ד׳ו אל־חיג׳ה;מוחרם;רביע אל־אוול;רביע א־ת׳אני;ג׳ומאדא אל־אולא;ג׳ומאדא א־ת׳אניה;רג׳ב;שעבאן;רמדאן"), + mmm6: _("רמדאן;שוואל;ד׳ו אל־קעדה;ד׳ו אל־חיג׳ה;מוחרם;רביע א׳;רביע ב׳;ג׳ומאדא א׳;ג׳ומאדא ב׳;רג׳ב;שעבאן;רמדאן") +}, "he"); +addLocale(xm({ + group: ".", + decimal: ",", + mmmm: _("siječnja;veljače;ožujka;travnja;svibnja;lipnja;srpnja;kolovoza;rujna;listopada;studenoga;prosinca"), + mmm: _("sij;velj;ožu;tra;svi;lip;srp;kol;ruj;lis;stu;pro"), + dddd: _("nedjelja;ponedjeljak;utorak;srijeda;četvrtak;petak;subota") +}, -1, 3), "hr"); +addLocale({ + decimal: ",", + mmmm: _("հունվարի;փետրվարի;մարտի;ապրիլի;մայիսի;հունիսի;հուլիսի;օգոստոսի;սեպտեմբերի;հոկտեմբերի;նոյեմբերի;դեկտեմբերի"), + mmm: _("հնվ;փտվ;մրտ;ապր;մյս;հնս;հլս;օգս;սեպ;հոկ;նոյ;դեկ"), + dddd: _("կիրակի;երկուշաբթի;երեքշաբթի;չորեքշաբթի;հինգշաբթի;ուրբաթ;շաբաթ"), + ddd: _("կիր;երկ;երք;չրք;հնգ;ուր;շբթ") +}, "hy"); +addLocale(xm({ + decimal: ",", + mmmm: _("იანვარი;თებერვალი;მარტი;აპრილი;მაისი;ივნისი;ივლისი;აგვისტო;სექტემბერი;ოქტომბერი;ნოემბერი;დეკემბერი"), + dddd: _("კვირა;ორშაბათი;სამშაბათი;ოთხშაბათი;ხუთშაბათი;პარასკევი;შაბათი") +}, 3, 3), "ka"); +addLocale(xm({ + decimal: ",", + mmmm: _("қаңтар;ақпан;наурыз;сәуір;мамыр;маусым;шілде;тамыз;қыркүйек;қазан;қараша;желтоқсан"), + dddd: _("жексенбі;дүйсенбі;сейсенбі;сәрсенбі;бейсенбі;жұма;сенбі"), + ddd: _("жс;дс;сс;ср;бс;жм;сб") +}, 13, -1), "kk"); +addLocale({ + group: ",", + mmmm: _("ಜನವರಿ;ಫೆಬ್ರವರಿ;ಮಾರ್ಚ್;ಏಪ್ರಿಲ್;ಮೇ;ಜೂನ್;ಜುಲೈ;ಆಗಸ್ಟ್;ಸೆಪ್ಟೆಂಬರ್;ಅಕ್ಟೋಬರ್;ನವೆಂಬರ್;ಡಿಸೆಂಬರ್"), + mmm: _("ಜನವರಿ;ಫೆಬ್ರವರಿ;ಮಾರ್ಚ್;ಏಪ್ರಿ;ಮೇ;ಜೂನ್;ಜುಲೈ;ಆಗಸ್ಟ್;ಸೆಪ್ಟೆಂ;ಅಕ್ಟೋ;ನವೆಂ;ಡಿಸೆಂ"), + dddd: _("ಭಾನು~;ಸೋಮ~;ಮಂಗಳ~;ಬುಧ~;ಗುರು~;ಶುಕ್ರ~;ಶನಿ~", "ವಾರ"), + ddd: _("ಭಾನು;ಸೋಮ;ಮಂಗಳ;ಬುಧ;ಗುರು;ಶುಕ್ರ;ಶನಿ"), + ampm: _("ಪೂರ್ವಾಹ್ನ;ಅಪರಾಹ್ನ") +}, "kn"); +addLocale({ + decimal: ",", + mmmm: _("sausio;vasario;kovo;balandžio;gegužės;birželio;liepos;rugpjūčio;rugsėjo;spalio;lapkričio;gruodžio"), + mmm: _("saus.;vas.;kov.;bal.;geg.;birž.;liep.;rugp.;rugs.;spal.;lapkr.;gruod."), + dddd: _("sekmadienis;pirmadienis;antradienis;trečiadienis;ketvirtadienis;penktadienis;šeštadienis"), + ddd: _("sk;pr;an;tr;kt;pn;št"), + ampm: _("priešpiet;popiet") +}, "lt"); +addLocale({ + decimal: ",", + mmmm: _("janvāris;februāris;marts;aprīlis;maijs;jūnijs;jūlijs;augusts;septembris;oktobris;novembris;decembris"), + mmm: _("janv.;febr.;marts;apr.;maijs;jūn.;jūl.;aug.;sept.;okt.;nov.;dec."), + dddd: _("svētdiena;pirmdiena;otrdiena;trešdiena;ceturtdiena;piektdiena;sestdiena"), + ddd: _("svētd.;pirmd.;otrd.;trešd.;ceturtd.;piektd.;sestd."), + ampm: _("priekšpusdienā;pēcpusdienā") +}, "lv"); +addLocale({ + group: ",", + decimal: ".", + mmmm: _("ജനുവരി;ഫെബ്രുവരി;മാർച്ച്;ഏപ്രിൽ;മേയ്;ജൂൺ;ജൂലൈ;ഓഗസ്റ്റ്;സെപ്റ്റംബർ;ഒക്‌ടോബർ;നവംബർ;ഡിസംബർ"), + mmm: _("ജനു;ഫെബ്രു;മാർ;ഏപ്രി;മേയ്;ജൂൺ;ജൂലൈ;ഓഗ;സെപ്റ്റം;ഒക്ടോ;നവം;ഡിസം"), + dddd: _("ഞായറാഴ്‌ച;തിങ്കളാഴ്‌ച;ചൊവ്വാഴ്ച;ബുധനാഴ്‌ച;വ്യാഴാഴ്‌ച;വെള്ളിയാഴ്‌ച;ശനിയാഴ്‌ച"), + ddd: _("ഞായർ;തിങ്കൾ;ചൊവ്വ;ബുധൻ;വ്യാഴം;വെള്ളി;ശനി") +}, "ml"); +addLocale({ + group: ",", + decimal: ".", + mmmm: _("нэгдүгээ~;хоёрдугаа~;гуравдугаа~;дөрөвдүгээ~;тавдугаа~;зургаадугаа~;долоодугаа~;наймдугаа~;есдүгээ~;аравдугаа~;арван нэгдүгээ~;арван хоёрдугаа~", "р сар"), + mmm: _("1~;2~;3~;4~;5~;6~;7~;8~;9~;10~;11~;12~", "-р сар"), + dddd: _("ням;даваа;мягмар;лхагва;пүрэв;баасан;бямба"), + ddd: _("Ня;Да;Мя;Лх;Пү;Ба;Бя"), + ampm: _("ү.ө.;ү.х.") +}, "mn"); +addLocale({ + group: ",", + decimal: ".", + mmmm: _("जानेवारी;फेब्रुवारी;मार्च;एप्रिल;मे;जून;जुलै;ऑगस्ट;सप्टेंबर;ऑक्टोबर;नोव्हेंबर;डिसेंबर"), + mmm: _("जाने;फेब्रु;मार्च;एप्रि;मे;जून;जुलै;ऑग;सप्टें;ऑक्टो;नोव्हें;डिसें"), + dddd: _("रविवार;सोमवार;मंगळवार;बुधवार;गुरुवार;शुक्रवार;शनिवार"), + ddd: _("रवि;सोम;मंगळ;बुध;गुरु;शुक्र;शनि") +}, "mr"); +addLocale(xm({ + group: ",", + decimal: ".", + mmmm: _("ဇန်နဝါရီ;ဖေဖော်ဝါရီ;မတ်;ဧပြီ;မေ;ဇွန်;ဇူလိုင်;ဩဂုတ်;စက်တင်ဘာ;အောက်တိုဘာ;နိုဝင်ဘာ;ဒီဇင်ဘာ"), + mmm: _("ဇန်;ဖေ;မတ်;ဧ;မေ;ဇွန်;ဇူ;ဩ;စက်;အောက်;နို;ဒီ"), + dddd: _("တနင်္ဂနွေ;တနင်္လာ;အင်္ဂါ;ဗုဒ္ဓဟူး;ကြာသပတေး;သောကြာ;စနေ"), + ampm: _("နံနက်;ညနေ") +}, -1, 0), "my"); +addLocale({ + group: ",", + decimal: ".", + mmmm: _("ਜਨਵਰੀ;ਫ਼ਰਵਰੀ;ਮਾਰਚ;ਅਪ੍ਰੈਲ;ਮਈ;ਜੂਨ;ਜੁਲਾਈ;ਅਗਸਤ;ਸਤੰਬਰ;ਅਕਤੂਬਰ;ਨਵੰਬਰ;ਦਸੰਬਰ"), + mmm: _("ਜਨ;ਫ਼ਰ;ਮਾਰਚ;ਅਪ੍ਰੈ;ਮਈ;ਜੂਨ;ਜੁਲਾ;ਅਗ;ਸਤੰ;ਅਕਤੂ;ਨਵੰ;ਦਸੰ"), + dddd: _("ਐਤਵਾਰ;ਸੋਮਵਾਰ;ਮੰਗਲਵਾਰ;ਬੁੱਧਵਾਰ;ਵੀਰਵਾਰ;ਸ਼ੁੱਕਰਵਾਰ;ਸ਼ਨਿੱਚਰਵਾਰ"), + ddd: _("ਐਤ;ਸੋਮ;ਮੰਗਲ;ਬੁੱਧ;ਵੀਰ;ਸ਼ੁੱਕਰ;ਸ਼ਨਿੱਚਰ"), + ampm: _("ਪੂ.ਦੁ.;ਬਾ.ਦੁ.") +}, "pa"); +addLocale({ + group: ".", + decimal: ",", + mmmm: _("ianuarie;februarie;martie;aprilie;mai;iunie;iulie;august;septem~;octom~;noiem~;decem~", "brie"), + mmm: _("ian.;feb.;mar.;apr.;mai;iun.;iul.;aug.;sept.;oct.;nov.;dec."), + dddd: _("duminică;luni;marți;miercuri;joi;vineri;sâmbătă"), + ddd: _("dum.;lun.;mar.;mie.;joi;vin.;sâm."), + ampm: _("a.m.;p.m.") +}, "ro"); +addLocale(xm({ + group: ".", + decimal: ",", + mmmm: _("januar;februar;marec;april;maj;junij;julij;avgust;september;oktober;november;december"), + mmm: _("jan.;feb.;mar.;apr.;maj;jun.;jul.;avg.;sep.;okt.;nov.;dec."), + dddd: _("nedelja;ponedeljek;torek;sreda;četrtek;petek;sobota"), + ampm: _("dop.;pop.") +}, -1, 13), "sl"); +addLocale(xm({ + group: ".", + decimal: ",", + mmmm: _("јануар;фебруар;март;април;мај;јун;јул;август;септембар;октобар;новембар;децембар"), + dddd: _("недеља;понедељак;уторак;среда;четвртак;петак;субота") +}, 3, 3), "sr"); +addLocale({ + group: ",", + decimal: ".", + mmmm: _("ஜனவரி;பிப்ரவரி;மார்ச்;ஏப்ரல்;மே;ஜூன்;ஜூலை;ஆகஸ்ட்;செப்டம்பர்;அக்டோபர்;நவம்பர்;டிசம்பர்"), + mmm: _("ஜன.;பிப்.;மார்.;ஏப்.;மே;ஜூன்;ஜூலை;ஆக.;செப்.;அக்.;நவ.;டிச."), + dddd: _("ஞாயிறு;திங்கள்;செவ்வாய்;புதன்;வியாழன்;வெள்ளி;சனி"), + ddd: _("ஞாயி.;திங்.;செவ்.;புத.;வியா.;வெள்.;சனி") +}, "ta"); +addLocale({ + group: ",", + decimal: ".", + mmmm: _("జనవరి;ఫిబ్రవరి;మార్చి;ఏప్రిల్;మే;జూన్;జులై;ఆగస్టు;సెప్టెంబర్;అక్టోబర్;నవంబర్;డిసెంబర్"), + mmm: _("జన;ఫిబ్ర;మార్చి;ఏప్రి;మే;జూన్;జులై;ఆగ;సెప్టెం;అక్టో;నవం;డిసెం"), + dddd: _("ఆదివారం;సోమవారం;మంగళవారం;బుధవారం;గురువారం;శుక్రవారం;శనివారం"), + ddd: _("ఆది;సోమ;మంగళ;బుధ;గురు;శుక్ర;శని") +}, "te"); +addLocale({ + decimal: ",", + mmmm: _("січня;лютого;березня;квітня;травня;червня;липня;серпня;вересня;жовтня;листопада;грудня"), + mmm: _("січ.;лют.;бер.;квіт.;трав.;черв.;лип.;серп.;вер.;жовт.;лист.;груд."), + dddd: _("неділю;понеділок;вівторок;середу;четвер;пʼятницю;суботу"), + ddd: _("нд;пн;вт;ср;чт;пт;сб"), + ampm: _("дп;пп") +}, "uk"); +addLocale({ + group: ".", + decimal: ",", + mmmm: _("~1;~2;~3;~4;~5;~6;~7;~8;~9;~10;~11;~12", "tháng "), + mmm: _("~1;~2;~3;~4;~5;~6;~7;~8;~9;~10;~11;~12", "thg "), + dddd: _("Chủ Nhật;Thứ Hai;Thứ Ba;Thứ Tư;Thứ Năm;Thứ Sáu;Thứ Bảy"), + ddd: _("CN;Th 2;Th 3;Th 4;Th 5;Th 6;Th 7"), + ampm: _("SA;CH") +}, "vi"); +addLocale(xm({ + group: "٬", + decimal: "٫", + ampm: _("ص;م"), + mmmm: _("يناير;فبراير;مارس;أبريل;مايو;يونيو;يوليو;أغسطس;سبتمبر;أكتوبر;نوفمبر;ديسمبر"), + dddd: _("الأحد;الاثنين;الثلاثاء;الأربعاء;الخميس;الجمعة;السبت"), + mmmm6: _("رمضان;شوال;ذو القعدة;ذو الحجة;محرم;ربيع الأول;ربيع الآخرة;جمادى الأولى;جمادى الآخرة;رجب;شعبان;رمضان") +}, 0, 0), "ar"); +addLocale({ + group: ",", + decimal: ".", + mmmm: _("জানুয়ারী;ফেব্রুয়ারী;মার্চ;এপ্রিল;মে;জুন;জুলাই;আগস্ট;সেপ্টেম্বর;অক্টোবর;নভেম্বর;ডিসেম্বর"), + mmm: _("জানু;ফেব;মার্চ;এপ্রি;মে;জুন;জুল;আগ;সেপ্টেঃ;অক্টোঃ;নভেঃ;ডিসেঃ"), + dddd: _("রবিবার;সোমবার;মঙ্গলবার;বুধবার;বৃহস্পতিবার;শুক্রবার;শনিবার"), + ddd: _("রবি;সোম;মঙ্গল;বুধ;বৃহস্পতি;শুক্র;শনি") +}, "bn"); +addLocale({ + group: ",", + decimal: ".", + mmmm: _("जनवरी;फ़रवरी;मार्च;अप्रैल;मई;जून;जुलाई;अगस्त;सितंबर;अक्तूबर;नवंबर;दिसंबर"), + mmm: _("जन॰;फ़र॰;मार्च;अप्रैल;मई;जून;जुल॰;अग॰;सित॰;अक्तू॰;नव॰;दिस॰"), + dddd: _("रविवार;सोमवार;मंगलवार;बुधवार;गुरुवार;शुक्रवार;शनिवार"), + ddd: _("रवि;सोम;मंगल;बुध;गुरु;शुक्र;शनि"), + ampm: _("am;pm") +}, "hi"); +//#endregion +//#region lib/options.ts +const defaultOptions = { + overflow: "######", + dateErrorThrows: false, + dateErrorNumber: true, + bigintErrorNumber: false, + dateSpanLarge: true, + leap1900: true, + nbsp: false, + throws: true, + invalid: "######", + locale: "", + ignoreTimezone: false, + grouping: [3, 3], + indexColors: true, + skipChar: "", + fillChar: "" +}; +//#endregion +//#region lib/round.ts +/** +* Return a number rounded to the specified amount of places. This is the +* rounding function used internally by the formatter (symmetric arithmetic +* rounding). It rounds the same way Excel does. +* +* @param number The number to round. +* @param [places] The number of decimals to round to. +* @returns A rounded number. +*/ +function round(number, places = 0) { + if (typeof number !== "number") return NaN; + if (number < 0) return -round(-number, places); + if (places) { + const p = 10 ** places || 1; + return round(number * p, 0) / p; + } + return Math.round(number); +} +//#endregion +//#region lib/toYMD.ts +const floor$1 = Math.floor; +function toYMD_1900(ord, leap1900 = true) { + if (leap1900 && ord >= 0) { + if (ord === 0) return [ + 1900, + 1, + 0 + ]; + if (ord === 60) return [ + 1900, + 2, + 29 + ]; + if (ord < 60) return [ + 1900, + ord < 32 ? 1 : 2, + (ord - 1) % 31 + 1 + ]; + } + let l = ord + 68569 + 2415019; + const n = floor$1(4 * l / 146097); + l = l - floor$1((146097 * n + 3) / 4); + const i = floor$1(4e3 * (l + 1) / 1461001); + l = l - floor$1(1461 * i / 4) + 31; + const j = floor$1(80 * l / 2447); + const nDay = l - floor$1(2447 * j / 80); + l = floor$1(j / 11); + const nMonth = j + 2 - 12 * l; + return [ + 100 * (n - 49) + i + l | 0, + nMonth | 0, + nDay | 0 + ]; +} +function toYMD_1904(ord) { + return toYMD_1900(ord + 1462); +} +function toYMD_1317(ord) { + if (ord === 60) throw new Error("#VALUE!"); + if (ord <= 1) return [ + 1317, + 8, + 29 + ]; + if (ord < 60) return [ + 1317, + ord < 32 ? 9 : 10, + 1 + (ord - 2) % 30 + ]; + const y = 10631 / 30; + const shift1 = 8.01 / 60; + let z = ord + 466935; + const cyc = floor$1(z / 10631); + z = z - 10631 * cyc; + const j = floor$1((z - shift1) / y); + z = z - floor$1(j * y + shift1); + const m = floor$1((z + 28.5001) / 29.5); + if (m === 13) return [ + 30 * cyc + j, + 12, + 30 + ]; + return [ + 30 * cyc + j, + m, + z - floor$1(29.5001 * m - 29) + ]; +} +function toYMD(ord, system = 0, leap1900 = true) { + const int = floor$1(ord); + if (system === 6) return toYMD_1317(int); + if (system === -1) return toYMD_1904(int); + return toYMD_1900(int, leap1900); +} +//#endregion +//#region lib/serialDate.ts +const floor = Math.floor; +const DAYSIZE$1 = 86400; +/** +* Convert a native JavaScript Date, or an array of date parts to an spreadsheet serial date. +* +* Returns a serial date number if input was a Date object or an array of +* numbers, else a null. +* +* ```js +* // input as Date +* dateToSerial(new Date(1978, 5, 17)); // 28627 +* // input as [ Y, M, D, h, m, s ] +* dateToSerial([ 1978, 5, 17 ]); // 28627 +* // other input +* dateToSerial("something else"); // null +* ``` +* +* @param date A Date instance or an array of date parts in descending order. +* @param [options={}] Options for this method +* @param [options.ignoreTimezone] +* Normally time zone will be taken into account. This makes the conversion to +* serial date ignore the timezone offset. +* @returns The date as a spreadsheet serial date, or undefined. +*/ +function dateToSerial(date, options) { + let ts = void 0; + if (Array.isArray(date)) { + const [y, m, d, hh, mm, ss] = date; + ts = Date.UTC(y, m == null ? 0 : m - 1, d ?? 1, hh || 0, mm || 0, ss || 0); + } else if (date instanceof Date) { + ts = date.valueOf(); + if (!options?.ignoreTimezone) { + const dt = /* @__PURE__ */ new Date(); + dt.setUTCFullYear(date.getFullYear(), date.getMonth(), date.getDate()); + dt.setUTCHours(date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()); + ts = dt.valueOf(); + } + } + if (ts != null && isFinite(ts)) { + const d = ts / 864e5; + return d - (d <= -25509 ? -25568 : -25569); + } +} +/** +* Convert a spreadsheet serial date to an array of date parts. +* Accurate to a second. +* +* ```js +* // output as [ Y, M, D, h, m, s ] +* dateFromSerial(28627); // [ 1978, 5, 17, 0, 0, 0 ] +* ``` +* +* @param serialDate The date +* @param [options] Options for this method +* @param [options.leap1900] +* Simulate the Lotus 1-2-3 [1900 leap year bug](https://docs.microsoft.com/en-us/office/troubleshoot/excel/wrongly-assumes-1900-is-leap-year). +* True by default. +* @returns returns an array of date parts with parts in descending order: [ year, month, day, hour, minute, second ] +*/ +function dateFromSerial(serialDate, options) { + let date = serialDate | 0; + const t = DAYSIZE$1 * (serialDate - date); + let time = floor(t); + if (t - time > .9999) { + time += 1; + if (time === DAYSIZE$1) { + time = 0; + date += 1; + } + } + const x = time < 0 ? DAYSIZE$1 + time : time; + const [y, m, d] = toYMD(serialDate, 0, options?.leap1900); + return [ + y, + m, + d, + floor(x / 60 / 60) % 60, + floor(x / 60) % 60, + floor(x) % 60 + ]; +} +//#endregion +//#region lib/isValidDate.ts +function isValidDate(y, m, d) { + if (d < 1) return false; + if (m < 1 || m > 12) return false; + if (m === 2) { + if (d > (y % 4 === 0 && y % 100 !== 0 || y % 400 === 0 || y === 1900 ? 29 : 28)) return false; + } else if ((m === 4 || m === 6 || m === 9 || m === 11) && d > 30 || (m === 1 || m === 3 || m === 5 || m === 7 || m === 8 || m === 10 || m === 12) && d > 31) return false; + return true; +} +//#endregion +//#region lib/parseValue.ts +const okDateFormats = [ + "!d-m-y", + "!d-m-Y", + "!j-m-y", + "!j-m-Y", + "!d-n-y", + "!d-n-Y", + "!j-n-y", + "!j-n-Y", + "?m-d-y", + "?m-d-Y", + "?m-j-y", + "?m-j-Y", + "?n-d-y", + "?n-d-Y", + "?n-j-y", + "?n-j-Y", + "d-M-y", + "d-M-Y", + "j-M-y", + "j-M-Y", + "M-d-y", + "M-d-Y", + "M-j-y", + "M-j-Y", + "d-F-y", + "d-F-Y", + "F-d-y", + "F-d-Y", + "F-j-y", + "F-j-Y", + "j-F-y", + "j-F-Y", + "y-F-d", + "y-F-j", + "y-M-d", + "y-M-j", + "Y-F-d", + "Y-F-j", + "Y-M-d", + "Y-m-d", + "Y-M-j", + "Y-m-j", + "Y-n-d", + "Y-n-j", + "j-F", + "j-M", + "d-F", + "d-M", + "n-d", + "n-j", + "n-Y", + "m-d", + "m-j", + "m-Y", + "M-Y", + "M-y", + "F-y", + "F-Y", + "Y-M", + "Y-n", + "Y-m", + "Y-F", + "Y-M" +]; +const tx0 = { + j: "d", + d: "d", + D: "ddd", + l: "dddd", + n: "m", + m: "m", + M: "mmm", + F: "mmmm", + y: "yy", + Y: "yyyy" +}; +const tx00 = { + j: "dd", + d: "dd", + D: "ddd", + l: "dddd", + n: "mm", + m: "mm", + M: "mmm", + F: "mmmm", + y: "yy", + Y: "yyyy" +}; +const dateTrieDM = {}; +const dateTrieMD = {}; +function packDate(f, node, allowType = 1) { + if (f) { + const char = f[0]; + const next = f.slice(1); + if (char === "!") packDate(next, node, 4); + else if (char === "?") packDate(next, node, 2); + else { + node[char] = node[char] || {}; + packDate(next, node[char], allowType); + } + } else node.$ = allowType; +} +function addFormatToTrie(fmt, trie) { + packDate(fmt, trie); + packDate(fmt + " x", trie); + packDate(fmt + " l", trie); + packDate(fmt + " l x", trie); + packDate("l " + fmt, trie); + packDate("l " + fmt + " x", trie); + packDate(fmt + " D", trie); + packDate(fmt + " D x", trie); + packDate("D " + fmt, trie); + packDate("D " + fmt + " x", trie); +} +okDateFormats.forEach((fmt) => { + if (!fmt.startsWith("?")) addFormatToTrie(fmt, dateTrieDM); + if (!fmt.startsWith("!")) addFormatToTrie(fmt, dateTrieMD); +}); +const currentYear = (/* @__PURE__ */ new Date()).getUTCFullYear(); +const PT = "."; +const CM = ","; +const SP = " "; +const NS = "\xA0"; +const NN = " "; +const AP = "'"; +const AG = "٬"; +const dec2group = { + ".": [ + CM, + NS, + NN, + AP, + AG + ], + ",": [ + PT, + NS, + NN, + AP, + AG + ], + "٫": [ + PT, + NS, + NN, + AP, + AG + ] +}; +const isDigit = (d) => d?.length === 1 && d >= "0" && d <= "9"; +/** +* Parse a numeric string input and return its value and format. If the input +* was not recognized or valid, the function returns a `undefined`, for valid input +* it returns an object with two properties: +* +* * `v`: the parsed value. +* * `z`: the number format of the input (if applicable). +* +* @param value The number to parse +* @param [options] Options for the parser +* @param [options.locale] +* A BCP 47 string tag. Locale default is english with a `\u00a0` +* grouping symbol (see [addLocale](#addLocale)) +* @returns An object of the parsed value and a corresponding format string +*/ +function parseNumber(value, options = {}) { + const l10n = getLocale(options.locale || "") || defaultLocale; + const dec = l10n.decimal; + const grp = [...dec2group[dec] || [AP, AG]]; + if (!grp.includes(l10n.group) && l10n.group !== SP && l10n.group !== dec) grp.push(l10n.group); + let num = ""; + let exp = ""; + let sign = 1; + let format = ""; + let minus = false; + let openParen = false; + let closeParen = false; + let percent = false; + let currency = false; + let currencySymbol = null; + let currencyTrailing = false; + let i = 0; + const prefixChars = [ + SP, + NS, + NN, + "+", + "%", + "(", + "-" + ].concat(currencySymbols); + while (prefixChars.includes(value[i])) { + const char = value[i]; + if (char === "-") { + if (minus || openParen) return; + minus = true; + sign = -1; + } else if (reCurrencySymbols.test(char)) { + if (currency) return; + currency = true; + currencySymbol = char; + } else if (char === "(") { + if (openParen || minus) return; + openParen = true; + sign = -1; + } else if (char === "%") { + if (percent) return; + percent = true; + } + i++; + } + let haveDecimal = false; + let g; + if (value[i] === dec || isDigit(value[i])) while (i < value.length) { + const ch = value[i]; + if (!g && grp.includes(ch)) g = ch; + else if (g && g === ch) {} else if (ch === dec) { + if (haveDecimal) break; + num += "."; + haveDecimal = true; + } else if (isDigit(ch)) num += ch; + else break; + i++; + } + if (value[i] === "e" || value[i] === "E") { + exp += value[i]; + i++; + if (value[i] === "+" || value[i] === "-") { + exp += value[i]; + i++; + } + const d = i; + while (isDigit(value[i])) { + exp += value[i]; + i++; + } + if (d === i) return; + } + const suffixChars = [ + SP, + NS, + NN, + "%", + "$", + ")" + ].concat(currencySymbols); + while (suffixChars.includes(value[i])) { + const char = value[i]; + if (reCurrencySymbols.test(char)) { + if (currency) return; + currency = true; + currencySymbol = char; + currencyTrailing = true; + } else if (char === ")") { + if (closeParen || !openParen) return; + closeParen = true; + } else if (char === "%") { + if (percent) return; + percent = true; + } + i++; + } + if (i !== value.length) return; + let numberValue = parseFloat(num + exp); + if (!isFinite(numberValue)) return; + if (exp) { + if (percent || currency) return; + format = "0.00E+00"; + } else if (percent) { + if (currency) return; + format = num.includes(".") ? "0.00%" : "0%"; + numberValue *= .01; + } else if (currency) { + const currencyFormat = num.includes(".") ? "#,##0.00" : "#,##0"; + if (currencyTrailing) format = currencyFormat + currencySymbol; + else format = currencySymbol + currencyFormat; + } else if (g) format = num.includes(".") ? "#,##0.00" : "#,##0"; + const ret = { v: numberValue * sign }; + if (format) ret.z = format; + return ret; +} +const matchRec = (str, data, skipPeriod = false) => { + for (const item of data) if (str.startsWith(item[0])) { + let l = item[0].length; + if (skipPeriod && (item[2] === "D" || item[2] === "M") && str[l] === ".") l++; + return [str.slice(0, l), item]; + } + return ["", null]; +}; +const nextToken = (str, node, data, lData) => { + const path = data.path || ""; + const matchOrder = Object.keys(node); + for (const t of matchOrder) { + let r; + if (!node[t]) continue; + if (t === "$" || t === "€") { + if (!str) r = data; + } else if (t === "-") { + const m = /^(\s*([./-]|,\s)\s*|\s+)/.exec(str); + if (m) { + const sep = m[1] === "-" || m[1] === "/" || m[1] === "." ? m[1] : " "; + if (!data.sep || data.sep === sep) { + const s = m[0].replace(/\s+/g, " "); + r = nextToken(str.slice(m[0].length), node[t], { + ...data, + sep, + path: path + s + }, lData); + } + } + } else if (t === " ") { + const m = /^[,.]?\s+/.exec(str); + if (m) { + const s = m[0].replace(/\s+/g, " "); + r = nextToken(str.slice(m[0].length), node[t], { + ...data, + path: path + s + }, lData); + } + } else if (t === "j" || t === "d") { + const m = /^(0?[1-9]|1\d|2\d|3[01])\b/.exec(str); + if (m) r = nextToken(str.slice(m[0].length), node[t], { + ...data, + day: m[0], + path: path + t + }, lData); + } else if (t === "n" || t === "m") { + const m = /^(0?[1-9]|1[012])\b/.exec(str); + if (m) r = nextToken(str.slice(m[0].length), node[t], { + ...data, + month: +m[0], + _mon: m[0], + path: path + t + }, lData); + } else if (t === "F" || t === "M") { + const [m, match] = matchRec(str, lData.mon, lData.mp); + if (match?.[2] === t) r = nextToken(str.slice(m.length), node[t], { + ...data, + month: match[1], + _mon: m, + path: path + t + }, lData); + } else if (t === "l" || t === "D") { + const [m, match] = matchRec(str, lData.day, lData.dp); + if (match?.[2] === t) r = nextToken(str.slice(m.length), node[t], { + ...data, + path: path + t + }, lData); + } else if (t === "y") { + const m = /^\d\d\b/.exec(str); + if (m) { + const y = +m[0] >= 30 ? +m[0] + 1900 : +m[0] + 2e3; + r = nextToken(str.slice(m[0].length), node[t], { + ...data, + year: y, + path: path + t + }, lData); + } + } else if (t === "Y") { + const m = /^\d\d\d\d\b/.exec(str); + if (m) r = nextToken(str.slice(m[0].length), node[t], { + ...data, + year: +m[0], + path: path + t + }, lData); + } else if (t === "x") { + const time = parseTime(str, { locale: lData.locale }); + if (time) r = nextToken("", node[t], { + ...data, + time: time.v, + tf: time.z, + path: path + t + }, lData); + } else throw new Error(`Unknown date token "${t}"`); + if (r) { + if (isValidDate(data.year || 1916, data.month || 1, data.day ? +data.day : 1)) return r; + } + } +}; +const normDateStr = (s) => s.replace(/\s+/g, " ").trim().replace(/’/, "'").replace(/\.$/, "").toLowerCase(); +const getLookups = (arr, sym) => { + const s = arr.map((d, i) => [ + normDateStr(d), + i + 1, + sym + ]); + s.sort((a, b) => b[0].length - a[0].length); + return s; +}; +/** +* Parse a date or datetime string input and return its value and format. If +* the input was not recognized or valid, the function returns an `undefined`, for +* valid input it returns an object with two properties: +* +* - `v`: the parsed value. +* - `z`: the number format of the input (if applicable). +* +* @param value The string to parse +* @param [options={}] Options for the parser +* @param [options.locale=""] +* A BCP 47 string tag. Locale default is english with a `\u00a0` +* grouping symbol (see [addLocale](#addLocale)) +* @returns An object of the parsed value and a corresponding format string +*/ +function parseDate(value, options = {}) { + const l10n = getLocale(options.locale || "") || defaultLocale; + const lData = { + mon: getLookups(l10n.mmmm, "F").concat(getLookups(l10n.mmm, "M")), + mp: l10n.mmm[0].at(-1) === ".", + day: getLookups(l10n.dddd, "l").concat(getLookups(l10n.ddd, "D")), + dp: l10n.ddd[0].at(-1) === ".", + locale: options.locale + }; + const date = nextToken(normDateStr(value), l10n.preferMDY ? dateTrieMD : dateTrieDM, { path: "" }, lData); + if (date) { + if (date.sep === "." && date.path?.length === 3) return; + const year = +(date.year ?? currentYear); + if (!date.day) date.day = "1"; + let epoch = -Infinity; + if (year < 1900) return; + else if (year <= 1900 && (date.month ?? 0) <= 2) epoch = 25568; + else if (year < 1e4) epoch = 25569; + const dateValue = Date.UTC(year, (date.month ?? 1) - 1, +date.day) / 864e5 + epoch + (date.time || 0); + if (dateValue >= 0 && dateValue <= 2958465) { + const lead0 = date._mon?.startsWith("0") || date.day?.startsWith("0") || date._mon?.length === 2 && date.day.length === 2; + return { + v: dateValue, + z: (date.path ?? "").replace(/[jdlDnmMFyYx]/g, (a) => { + if (a === "x") return date.tf || ""; + return (lead0 ? tx00[a] : tx0[a]) || a; + }) + }; + } + } +} +const normAMPMStr = (s) => s.replace(/\s+/g, "").trim().replace(/\./g, "").toLowerCase(); +/** +* Parse a time string input and return its value and format. If the input was +* not recognized or valid, the function returns a `undefined`, for valid input it +* returns an object with two properties: +* +* - `v`: the parsed value. +* - `z`: the number format of the input (if applicable). +* +* @param value The date to parse +* @param [options] Options for the parser +* @param [options.locale] +* A BCP 47 string tag. Locale default is english with a `\u00a0` +* grouping symbol (see [addLocale](#addLocale)) +* @returns An object of the parsed value and a corresponding format string +*/ +function parseTime(value, options = {}) { + const l10n = getLocale(options.locale || "") || defaultLocale; + const parts = /^\s*([10]?\d|2[0-4])(?::([0-5]\d|\d))?(?::([0-5]\d|\d))?(\.\d{1,10})?(?=\s*[^\s\d]|$)/.exec(value); + let ampm = ""; + if (parts) { + const tail = normAMPMStr(value.slice(parts[0].length)); + if (tail === normAMPMStr(l10n.ampm[0]) || tail === "a" || tail === "am") ampm = "a"; + else if (tail === normAMPMStr(l10n.ampm[1]) || tail === "p" || tail === "pm") ampm = "p"; + else if (tail === ":") { + if (!parts[3]) parts[3] = "0"; + if (!parts[2]) parts[2] = "0"; + } else if (tail) return; + } + if (parts) { + const [, h, m, s, f] = parts; + if (f && !s) return; + if (!ampm && !m && !s) return; + let hrs = +(h || 0) * 1; + if (ampm) { + if (hrs >= 13) return; + if (ampm === "a") { + if (hrs === 12) hrs = 0; + } else if (ampm === "p") { + if (hrs !== 12) hrs += 12; + } + } + const min = +(m || 0) * 1; + const sec = +(s || 0) * 1; + const mss = +(f || 0) * 1; + return { + v: (hrs * 60 * 60 + min * 60 + sec + mss) / 86400, + z: (h.length === 2 ? "hh" : "h") + ":mm" + (s ? ":ss" : "") + (ampm ? " AM/PM" : "") + }; + } +} +/** +* Parse a string input and return its equivalent boolean value. If the input was not +* recognized or valid, the function returns an `undefined`, for valid input it +* returns an object with a single property: +* +* - `v`: the parsed value. +* +* @param value The supposed boolean to parse +* @param [options] Options for the parser +* @param [options.locale] +* A BCP 47 string tag. Locale default is english with a `\u00a0` +* grouping symbol (see [addLocale](#addLocale)) +* @returns An object of the parsed value and a corresponding format string +*/ +function parseBool(value, options = {}) { + const l10n = getLocale(options.locale || "") || defaultLocale; + const v = value.trim().toLowerCase(); + const bT = l10n.bool[0].toLowerCase(); + if (v === "true" || v === bT) return { v: true }; + const bF = l10n.bool[1].toLowerCase(); + if (v === "false" || v === bF) return { v: false }; +} +/** +* Attempt to parse a "spreadsheet input" string input and return its value and +* format. If the input was not recognized or valid, the function returns an +* `undefined`, for valid input it returns an object with two properties: +* +* - `v`: The parsed value. For dates, this will be an Excel style serial date. +* - `z`: (Optionally) the number format string of the input. This property will +* not be present if it amounts to the `General` format. +* +* `parseValue()` recognizes a wide range of dates and date-times, times, +* numbers, and booleans. Some examples: +* +* ```js +* // basic number +* parseValue("-123");// { v: -123 } +* // formatted number +* parseValue("$1,234"); // { v: 1234, z: "$#,##0" } +* // a percent +* parseValue("12.3%"); // { v: 0.123, z: "0.00%" } +* // a date +* parseValue("07 October 1984"); // { v: 30962, z: 'dd mmmm yyyy' } +* // an ISO formatted date-time +* parseValue("1984-09-10 11:12:13.1234"); // { v: 30935.46681855787, z: "yyyy-mm-dd hh:mm:ss" } +* // a boolean +* parseValue("false"); // { v: false } +* ``` +* +* The formatting string outputted may not correspond exactly to the input. +* Rather, is it composed of certain elements which the input controls. This is +* comparable to how Microsoft Excel and Google Sheets parse pasted input. Some +* things you may expect: +* +* - Whitespace is ignored. +* - Decimal fractions are always represented by `.00` regardless of how many +* digits were shown in the input. +* - Negatives denoted by parentheses [`(1,234)`] will not include the +* parentheses in the format string (the value will still be negative.) +* - All "scientific notation" returns the same format: `0.00E+00`. +* +* Internally the parser calls, `parseNumber`, `parseDate`, +* `parseTime` and `parseBool`. They work in the same way except +* with a more limited scope. You may prefer those functions if you are limiting +* input to a smaller scope. +* +* @param value The value to parse +* @param [options] Options for the parser +* @param [options.locale] +* A BCP 47 string tag. Locale default is english with a `\u00a0` +* grouping symbol (see {@link addLocale}) +* @returns An object of the parsed value and a corresponding format string +*/ +function parseValue(value, options) { + return parseNumber(value, options) ?? parseDate(value, options) ?? parseTime(value, options) ?? parseBool(value, options); +} +//#endregion +//#region lib/createPartition.ts +function createPartition(tokens) { + return { + scale: 1, + percent: false, + text: false, + parens: false, + fractions: false, + grouping: false, + exponential: false, + integer: false, + locale: "", + pattern: "", + int_max: 0, + frac_max: 0, + man_p: "", + num_p: "", + num_min: 0, + den_min: 0, + den_max: 0, + date: 0, + tokensUsed: 0, + date_eval: false, + date_system: 1, + sec_decimals: 0, + general: false, + clock: 24, + int_min: 0, + int_pattern: [], + frac_pattern: [], + man_pattern: [], + den_pattern: [], + num_pattern: [], + tokens: tokens ?? [], + den_p: "", + int_p: "", + denominator: 0 + }; +} +//#endregion +//#region lib/parseFormatSection.ts +function add(s, tokens) { + if (typeof s === "string") tokens.push({ + type: TOKEN_STRING, + value: s + }); + else tokens.push(s); +} +const countNonHash = (s) => { + let n = 0; + for (let i = 0; i < s.length; i++) if (s.charCodeAt(i) !== 35) n++; + return n; +}; +function isNumOp$1(token, activePattern) { + const type = token?.type; + return type === "HASH" || type === "ZERO" || type === "QMARK" || type === "DIGIT" && activePattern === "DEN"; +} +function parseFormatSection(inputTokens) { + const outputTokens = []; + const part = createPartition(outputTokens); + let currentPattern = "INT"; + let lastNumberChunk; + const dateChunks = []; + let last; + let haveLocale = false; + let index = -1; + let partOver = false; + let patternSource = ""; + let haveSlash = false; + const getPattern = (p) => { + if (p === "DEN") return part.den_pattern; + if (p === "INT") return part.int_pattern; + if (p === "FRAC") return part.frac_pattern; + if (p === "MAN") return part.man_pattern; + return []; + }; + while (++index < inputTokens.length && !partOver) { + const token = inputTokens[index]; + const type = token.type || "ERROR"; + patternSource += token.raw; + if (type === "GENERAL") { + part.general = true; + add({ type }, outputTokens); + } else if (isNumOp$1(token, currentPattern)) { + const pt = getPattern(currentPattern); + if (last && (isNumOp$1(last, currentPattern) || last.type === "GROUP")) { + pt.push((pt.pop() || "") + token.value); + if (lastNumberChunk && "num" in lastNumberChunk) lastNumberChunk.num += token.value; + } else { + pt.push(token.value); + lastNumberChunk = { + type: currentPattern, + num: token.value + }; + add(lastNumberChunk, outputTokens); + } + } else if (type === "PAREN") { + if (token.value === "(") part.parens = true; + add(token.value, outputTokens); + } else if (type === "DIGIT") add(token.value, outputTokens); + else if (type === "SLASH") { + haveSlash = true; + const pt = getPattern(currentPattern); + if (pt.length) { + if (!lastNumberChunk) throw new SyntaxError("Format pattern is missing a numerator"); + part.fractions = true; + const xx = pt.pop(); + part.num_pattern.push(xx); + lastNumberChunk.type = "NUM"; + currentPattern = "DEN"; + add({ type: "DIV" }, outputTokens); + } else add(token.value, outputTokens); + } else if (type === "COMMA") add(",", outputTokens); + else if (type === "SCALE") part.scale = .001 ** token.raw.length; + else if (type === "GROUP") { + if (currentPattern === "INT") part.grouping = true; + if (currentPattern === "DEN") throw new SyntaxError("Cannot group denominator digits"); + } else if (type === "SPACE") add({ type }, outputTokens); + else if (type === "BREAK") { + partOver = true; + break; + } else if (type === "TEXT") { + part.text = true; + add({ + type, + value: token.value + }, outputTokens); + } else if (type === "PLUS" || type === "MINUS") add({ type }, outputTokens); + else if (type === "DURATION") { + const tokenValue = token.value.toLowerCase(); + const startsWith = tokenValue[0]; + let bit; + if (startsWith === "h") bit = { + type: T_TYPE_HOUR_E, + size: 16, + pad: tokenValue.length + }; + else if (startsWith === "m") bit = { + type: T_TYPE_MIN_E, + size: 32, + pad: tokenValue.length + }; + else bit = { + type: T_TYPE_SEC_E, + size: 64, + pad: tokenValue.length + }; + part.date = part.date | bit.size; + dateChunks.push(bit); + add(bit, outputTokens); + } else if (part.date && type === "POINT" && inputTokens[index + 1]?.type === "ZERO") { + let dec = 1; + index++; + let raw = "0"; + if (inputTokens[index + 1]?.type === "ZERO") { + raw += "0"; + dec = 2; + index++; + } + if (inputTokens[index + 1]?.type === "ZERO") { + raw += "0"; + dec = 3; + index++; + } + patternSource += raw; + const size = [ + 64, + 128, + 256, + 512 + ][dec]; + part.date = part.date | size; + part.date_eval = true; + part.sec_decimals = Math.max(part.sec_decimals, dec); + add({ + type: T_TYPE_SUBSEC, + size, + decimals: dec + }, outputTokens); + } else if (type === "CALENDAR") { + if (!haveLocale) { + if (token.value === "B2" || token.value === "b2") part.date_system = 6; + else part.date_system = 1; + } + } else if (type === "DATETIME") { + let bit; + const value = token.value.toLowerCase(); + const startsWith = value[0]; + if (value === "y" || value === "yy") bit = { + type: T_TYPE_YEAR_S, + size: 2 + }; + else if (startsWith === "y" || startsWith === "e") bit = { + type: T_TYPE_YEAR, + size: 2 + }; + else if (value === "b" || value === "bb") bit = { + type: T_TYPE_B_YEAR_S, + size: 2 + }; + else if (startsWith === "b") bit = { + type: T_TYPE_B_YEAR, + size: 2 + }; + else if (value === "d" || value === "dd") bit = { + type: "DAY", + size: 8, + pad: value === "dd" + }; + else if (value === "ddd" || value === "aaa") bit = { + type: T_TYPE_WEEKDAY_S, + size: 8 + }; + else if (startsWith === "d" || startsWith === "a") bit = { + type: T_TYPE_WEEKDAY, + size: 8 + }; + else if (startsWith === "h") bit = { + type: T_TYPE_HOUR, + size: 16, + pad: value.length > 1 + }; + else if (startsWith === "m") { + if (value.length === 3) bit = { + type: T_TYPE_MNAME_S, + size: 4 + }; + else if (value.length === 5) bit = { + type: T_TYPE_MNAME_1, + size: 4 + }; + else if (value.length >= 4) bit = { + type: T_TYPE_MNAME, + size: 4 + }; + const last_date_chunk = dateChunks[dateChunks.length - 1]; + if (!bit && last_date_chunk && !last_date_chunk.used && last_date_chunk.size & 80) { + last_date_chunk.used = true; + bit = { + type: "MIN", + size: 32, + pad: value.length > 1 + }; + } + if (!bit) bit = { + type: T_TYPE_MON, + size: 4, + pad: value.length > 1, + indeterminate: true + }; + } else if (startsWith === "s") { + bit = { + type: "SEC", + size: 64, + pad: value.length > 1 + }; + const last_date_chunk = dateChunks[dateChunks.length - 1]; + if (last_date_chunk && last_date_chunk.size & 32) bit.used = true; + else if (last_date_chunk && "indeterminate" in last_date_chunk) { + delete last_date_chunk.indeterminate; + last_date_chunk.size = 32; + last_date_chunk.type = "MIN"; + bit.used = true; + } + } else if (startsWith === "g") {} + if (bit) { + part.date = part.date | bit.size; + part.date_eval = true; + dateChunks.push(bit); + add(bit, outputTokens); + } + } else if (type === "AMPM") { + part.clock = 12; + part.date = part.date | 16; + part.date_eval = true; + add({ + type, + short: token.value === "A/P" + }, outputTokens); + } else if (type === "STRING" || type === "ESCAPED" || type === "CHAR") add(token.value, outputTokens); + else if (type === "CONDITION") part.condition = [token.value[0], parseFloat(token.value[1])]; + else if (type === "LOCALE") { + const bits = token.value.split("-"); + const code = bits.length < 2 ? "" : bits.slice(1).join("-"); + const currency = bits[0]; + if (currency) add(currency, outputTokens); + const l4e = resolveLocale(code); + if (l4e) part.locale = l4e; + const wincode = parseInt(code, 16); + if (isFinite(wincode) && wincode & 16711680) { + if ((wincode >> 16 & 255) === 6) part.date_system = 6; + } + haveLocale = true; + } else if (type === "COLOR") { + let cm; + let v = token.value.toLowerCase(); + if (cm = /^color\s*(\d+)$/i.exec(v)) v = parseInt(cm[1], 10); + part.color = v; + } else if (type === "PERCENT") { + part.scale = 100; + part.percent = true; + add("%", outputTokens); + } else if (type === "POINT") { + add({ + type, + value: token.value + }, outputTokens); + if (!part.date) { + part.dec_fractions = true; + currentPattern = T_TYPE_FRAC; + } + } else if (type === "EXP") { + part.exponential = true; + const plus = token.value.includes("+"); + part.exp_plus = plus; + currentPattern = "MAN"; + add({ + type: "EXP", + plus + }, outputTokens); + } else if (type === "SKIP") add({ + type, + value: token.value + }, outputTokens); + else if (type === "FILL") add({ + type, + value: token.value + }, outputTokens); + else if (type === "DBNUM") { + const n = parseInt(token.value.slice(5)); + if (n < 1 || n > 4) throw new SyntaxError("Unknown modifier: " + token.value); + } else if (type === "NATNUM") throw new SyntaxError("Unknown modifier: " + token.value); + else if (type === "MODIFIER") throw new SyntaxError("Unknown modifier: " + token.value); + else if (type === "ERROR") throw new SyntaxError(`Illegal character: ${patternSource}`); + else throw new SyntaxError(`Unknown token ${type} in ${patternSource}`); + last = token; + } + part.tokensUsed = index; + part.pattern = patternSource; + if (part.fractions && part.dec_fractions || part.grouping && !part.int_pattern.length || part.fractions && part.exponential || part.fractions && part.den_pattern.length * part.num_pattern.length === 0 || haveSlash && !part.fractions && !part.date || part.exponential && (part.int_pattern.length || part.frac_pattern.length) * part.man_pattern.length === 0) throw new SyntaxError(`Invalid pattern: ${patternSource}`); + const intPattern = part.int_pattern.join(""); + const manPattern = part.man_pattern.join(""); + const fracPattern = part.frac_pattern.join(""); + part.int_max = intPattern.length; + part.int_min = countNonHash(intPattern); + let min = 0; + for (let i = 0; i < intPattern.length; i++) { + const ch = intPattern[intPattern.length - 1 - i]; + if (/^[0-9?]/.test(ch)) min = i + 1; + } + part.int_min = min; + part.frac_max = fracPattern.length; + let num_pat = part.num_pattern.join(""); + let den_pat = part.den_pattern[0] || ""; + if (den_pat.includes("?") || num_pat.includes("?")) { + den_pat = den_pat.replace(/\d/g, "?"); + den_pat = den_pat.replace(/#$/g, "?"); + part.num_min = countNonHash(num_pat); + part.den_max = den_pat.length; + part.den_min = countNonHash(den_pat); + num_pat = num_pat.replace(/#$/g, "?"); + } else { + part.num_min = countNonHash(num_pat); + part.den_max = den_pat.length; + part.den_min = countNonHash(den_pat); + } + part.int_p = intPattern; + part.man_p = manPattern; + part.num_p = num_pat; + part.den_p = den_pat; + if (part.den_pattern.length) part.denominator = parseInt(part.den_pattern.join("").replace(/\D/g, ""), 10); + part.integer = !!intPattern.length; + if (!part.integer && !part.exponential && fracPattern.length) { + const pointIdx = part.tokens.findIndex((d) => d.type === TOKEN_POINT); + part.tokens.splice(pointIdx, 0, { + type: "INT", + num: "#" + }); + part.integer = true; + part.int_pattern = ["#"]; + part.int_p = "#"; + } + if (!part.tokens.length && /^\[(?!\$)/.test(part.pattern)) { + part.general = true; + add({ type: TOKEN_GENERAL }, outputTokens); + } + if (part.fractions) for (let i = 0; i < outputTokens.length - 1; i++) { + const tok = outputTokens[i]; + if (tok.type !== "STRING" && tok.type !== "SPACE") continue; + const nextType = outputTokens[i + 1].type; + if (nextType === "NUM") tok.rule = "num+int"; + else if (nextType === "DIV") tok.rule = "num"; + else if (nextType === "DEN") tok.rule = "den"; + } + if (part.grouping) { + if (part.int_pattern.length > 1) part.grouping = false; + } + return part; +} +//#endregion +//#region lib/clamp.ts +function clamp(num) { + if (num === 0) return num; + const d = Math.ceil(Math.log10(num < 0 ? -num : num)); + const mag = 10 ** (16 - Math.floor(d)); + return isFinite(mag) ? Math.round(num * mag) / mag : 0; +} +//#endregion +//#region lib/dec2frac.ts +const PRECISION = 1e-13; +/** +* Split a fractional number into a numerator and denominator for display as +* vulgar fractions. +* +* @internal +* @param number The value to split +* @param [numeratorMaxDigits=2] The maxdigits number +* @param [denominatorMaxDigits=2] The maxdigits de +* @returns Tuple of two numbers, numerator and denominator. +*/ +function dec2frac(number, numeratorMaxDigits = 2, denominatorMaxDigits = 2) { + const sign = number < 0 ? -1 : 1; + const maxdigits_n = 10 ** (numeratorMaxDigits || 2); + const maxdigits_d = 10 ** (denominatorMaxDigits || 2); + let z = Math.abs(number); + let last_d = 0; + let last_n = 0; + let curr_n = 0; + let curr_d = 1; + let tmp; + let r; + number = z; + if (number % 1 === 0) r = [number * sign, 1]; + else if (number < 1e-19) r = [sign, 0x8ac7230489e80000]; + else if (number > 0x8ac7230489e80000) r = [0x8ac7230489e80000 * sign, 1]; + else { + do { + z = 1 / (z - Math.floor(z)); + tmp = curr_d; + curr_d = curr_d * Math.floor(z) + last_d; + last_d = tmp; + last_n = curr_n; + curr_n = Math.floor(number * curr_d + .5); + if (curr_n >= maxdigits_n || curr_d >= maxdigits_d) return [sign * last_n, last_d]; + } while (Math.abs(number - curr_n / curr_d) >= PRECISION && z !== Math.floor(z)); + r = [sign * curr_n, curr_d]; + } + return r; +} +//#endregion +//#region lib/numberProps.ts +function getExponent(num, int_max = 0) { + const exp = Math.floor(Math.log10(num)); + return int_max > 1 ? Math.floor(exp / int_max) * int_max : exp; +} +function getSignificand(n, exp = 1) { + if (exp < -300) return parseFloat(n.toExponential().split("e")[0]); + return n * 10 ** -exp; +} +//#endregion +//#region lib/numdec.ts +const zero = { + total: 1, + sign: 0, + digits: 1, + period: 0, + int: 1, + frac: 0 +}; +function numdec(value, incl_sign = true) { + const v = Math.abs(value); + if (!v) return zero; + const signSize = incl_sign && value < 0 ? 1 : 0; + const intPart = Math.floor(v); + const intSize = Math.floor(Math.log10(v) + 1); + let periodSize = 0; + let fracSize = 0; + if (intPart !== v) { + periodSize = 1; + const n = String(round(v * 10 ** -intSize, 15)); + let f = n.length; + let z = true; + let i = 0; + while (i <= n.length) { + if (n[i] === ".") { + f--; + break; + } else if (n[i] === "0" && z) f--; + else z = false; + i++; + } + fracSize = f - intSize; + if (fracSize < 0) { + fracSize = 0; + periodSize = 0; + } + } + return { + total: signSize + Math.max(intSize, 1) + periodSize + fracSize, + digits: Math.max(intSize, 0) + fracSize, + sign: signSize, + period: periodSize, + int: Math.max(intSize, 1), + frac: fracSize + }; +} +//#endregion +//#region lib/general.ts +const fixLocale = (s, l10n) => { + return s.replace(/\./, l10n.decimal); +}; +const getExp = (n, exp, l10n) => { + const x = Math.abs(exp); + let m; + if (n === 1) m = n; + else m = round(n, 5); + return [ + fixLocale(m + "", l10n), + l10n.exponent, + exp < 0 ? l10n.negative : l10n.positive, + x < 10 ? "0" : "", + x + ]; +}; +function general(ret, value, l10n) { + if (typeof value === "string") ret.push(value); + else { + const int = value | 0; + if (value === int) ret.push(Math.abs(int)); + else { + const v = Math.abs(value); + let exp = getExponent(v); + let n = getSignificand(v, exp); + if (n === 10) { + n = 1; + exp++; + } + const num_dig = numdec(v); + if (exp >= -4 && exp <= -1) { + const o = v.toPrecision(10 + exp).replace(/\.?0+$/, ""); + ret.push(fixLocale(o, l10n)); + } else if (exp === 10) { + const o = v.toFixed(10).slice(0, 12).replace(/\.$/, ""); + ret.push(fixLocale(o, l10n)); + } else if (Math.abs(exp) <= 9) { + if (num_dig.total <= 11) { + const o = round(v, 9).toFixed(num_dig.frac); + ret.push(fixLocale(o, l10n)); + } else if (exp === 9) ret.push(Math.floor(v)); + else if (exp >= 0 && exp < 9) ret.push(fixLocale(String(round(v, 9 - exp)), l10n)); + else ret.push(...getExp(n, exp, l10n)); + } else if (num_dig.total >= 12) ret.push(...getExp(n, exp, l10n)); + else ret.push(fixLocale(round(v, 9).toFixed(num_dig.frac), l10n)); + } + } + return ret; +} +//#endregion +//#region lib/pad.ts +/** +* @internal +* @param c Instruction character ('#' | '?' | '0') +* @param Use nonbreaking space or not? +* @returns Padding character +*/ +function pad(c, nbsp = false) { + if (c === "0") return "0"; + else if (c === "?") return nbsp ? "\xA0" : " "; + return ""; +} +//#endregion +//#region lib/runPart.ts +const DAYSIZE = 86400; +const CHAR_0 = 48; +const CHAR_9 = 57; +const dateOverflows = (inputValue, roundedValue, bigRange) => { + if (bigRange) return inputValue < -694324 || roundedValue >= 35830291; + return inputValue < 0 || roundedValue >= 2958466; +}; +function runPart(value, part, opts, l10n_) { + let mantissa = ""; + let mantissa_sign = ""; + let numerator = ""; + let denominator = ""; + let fraction = ""; + let integer = ""; + let exp = 0; + let date = 0; + if (typeof value === "bigint") { + if (value <= Number.MAX_SAFE_INTEGER && value >= Number.MIN_SAFE_INTEGER) value = Number(value); + else return opts.bigintErrorNumber ? String(value) : opts.overflow; + date = value; + } else if (typeof value === "number") date = Math.trunc(value); + let time = 0; + let year = 0; + let month = 1; + let day = 0; + let weekday = 0; + let hour = 0; + let minute = 0; + let second = 0; + let subsec = 0; + const l10n = l10n_ || defaultLocale; + if (!part.text && isFinite(part.scale) && part.scale !== 1 && typeof value === "number") value = clamp(value * part.scale); + if (part.exponential && typeof value === "number") { + let v = Math.abs(value); + if (v) exp = getExponent(v, part.int_max); + if (value && !part.integer) exp++; + v = getSignificand(v, exp); + if (part.int_max === 1 && round(v, part.frac_max) === 10) { + v = 1; + exp++; + } + value = value < 0 ? -v : v; + mantissa += Math.abs(exp); + } + if (part.integer && typeof value === "number") { + const i = Math.abs(round(value, part.fractions ? 1 : part.frac_max)); + integer += i < 1 ? "" : Math.floor(i); + } + const group_pri = opts.grouping[0] ?? 3; + const group_sec = opts.grouping[1] ?? group_pri; + if (part.dec_fractions && typeof value === "number") fraction = String(round(value, part.frac_max)).split(".")[1] || ""; + const fixed_slash = !part.error && (part.num_p.includes("0") || part.den_p.includes("0")); + let have_fraction = fixed_slash; + if (part.fractions && typeof value === "number") { + have_fraction = fixed_slash || !!(value % 1); + const _dec = Math.abs(part.integer ? value % 1 : value); + if (_dec) { + have_fraction = true; + if (part.denominator && isFinite(part.denominator)) { + denominator += part.denominator; + numerator += round(_dec * part.denominator); + if (numerator === "0") { + numerator = ""; + denominator = ""; + have_fraction = fixed_slash; + } + } else { + const frt = dec2frac(_dec, Infinity, part.den_max); + numerator += frt[0]; + denominator += frt[1]; + if (part.integer && numerator === "0") { + numerator = ""; + denominator = ""; + have_fraction = fixed_slash; + } + } + } else if (!value && !part.integer) { + have_fraction = true; + numerator = "0"; + denominator = "1"; + } + if (part.integer && !have_fraction && !Math.trunc(value)) integer = "0"; + } + if (part.date && typeof value === "number") { + date = Math.trunc(value); + const t = DAYSIZE * (value - date); + time = Math.floor(t); + subsec = t - time; + if (Math.abs(subsec) < 1e-6) subsec = 0; + else if (subsec > .9999) { + subsec = 0; + time += 1; + if (time === DAYSIZE) { + time = 0; + date += 1; + } + } + if (subsec) { + const minU = part.date & 512 || part.date & 256 || part.date & 128; + if (minU === 512 && subsec > .9995 || minU === 256 && subsec > .995 || minU === 128 && subsec > .95 || !minU && subsec >= .5) { + time++; + subsec = 0; + } + } + if (date || part.date_system) { + const dout = toYMD(value, part.date_system, opts.leap1900); + year = dout[0]; + month = dout[1]; + day = dout[2]; + } + if (time) { + const x = time < 0 ? DAYSIZE + time : time; + second = Math.floor(x) % 60; + minute = Math.floor(x / 60) % 60; + hour = Math.floor(x / 60 / 60) % 60; + } + weekday = (6 + date) % 7; + if (part.date_eval && dateOverflows(value, date + time / DAYSIZE, opts.dateSpanLarge)) { + if (opts.dateErrorThrows) throw new Error("Date out of bounds"); + if (opts.dateErrorNumber) return general(value < 0 ? [l10n.negative] : [], value, l10n).join(""); + return opts.overflow; + } + } + const padQ = pad("?", opts.nbsp); + if (exp < 0) mantissa_sign = "-"; + else if (part.exp_plus) mantissa_sign = "+"; + const ret = []; + const digitsStart = (numstr, pattern, prt, offset) => { + const l = !offset && numstr.length > pattern.length ? prt.length + numstr.length - pattern.length : prt.length; + if (numstr.length < pattern.length) offset += numstr.length - pattern.length; + for (let i = 0; i < l; i++) ret.push(numstr[i + offset] || pad(prt[i], opts.nbsp)); + return l; + }; + let denominator_fixed = false; + const counter = { + int: 0, + frac: 0, + man: 0, + num: 0, + den: 0 + }; + for (let ti = 0, tl = part.tokens.length; ti < tl; ti++) { + const tok = part.tokens[ti]; + const tokenType = tok.type; + const len = "num" in tok ? tok.num.length : 0; + if (tokenType === "STRING") { + const rule = tok.rule; + if (rule) { + if (rule === "num" && have_fraction || rule === "num+int" && have_fraction && integer || rule === "den" && have_fraction) ret.push(tok.value.replaceAll(" ", padQ)); + else if (rule === "num" && part.num_min > 0 || part.den_min > 0 || rule === "num+int" && part.den_min > 0 && (integer || part.num_min) || rule === "den" && part.den_min > 0 || part.den_min > 0) ret.push(padQ.repeat(tok.value.length)); + } else ret.push(tok.value.replaceAll(" ", padQ)); + } else if (tokenType === "SPACE") { + if (tok.rule === "num+int") { + if ((have_fraction || part.num_min || part.den_min) && (integer || part.num_min)) ret.push(padQ); + } else ret.push(padQ); + } else if (tokenType === "ERROR") ret.push(opts.invalid); + else if (tokenType === "POINT") ret.push(part.date ? tok.value : l10n.decimal); + else if (tokenType === "GENERAL") general(ret, value, l10n); + else if (tokenType === "EXP") ret.push(l10n.exponent); + else if (tokenType === "MINUS") { + if (tok.volatile && part.date) {} else if (tok.volatile && (typeof value !== "number" || value >= 0)) {} else if (tok.volatile && !part.fractions && (part.integer || part.dec_fractions)) { + if (typeof value === "number" && value < 0 && integer && integer !== "0" || fraction) ret.push(l10n.negative); + } else ret.push(l10n.negative); + } else if (tokenType === "PLUS") ret.push(l10n.positive); + else if (tokenType === "TEXT") ret.push(value); + else if (tokenType === "FILL") { + if (opts.fillChar) ret.push(opts.fillChar, tok.value); + } else if (tokenType === "SKIP") { + if (opts.skipChar) ret.push(opts.skipChar, tok.value); + else ret.push(opts.nbsp ? "\xA0" : " "); + } else if (tokenType === "DIV") { + if (have_fraction) ret.push("/"); + else if (part.num_min > 0 || part.den_min > 0) ret.push(padQ); + else ret.push(pad("#", opts.nbsp)); + } else if (tokenType === "INT") { + if (part.int_pattern.length === 1) { + const pt = part.int_p; + const l = Math.max(part.int_min, integer.length); + let digits = ""; + for (let i = l; i > 0; i--) { + const d = integer.charAt(integer.length - i); + const p = d ? "" : pt.charAt(pt.length - i) || pt[0]; + let sep = ""; + if (part.grouping) { + const n = i - 1 - group_pri; + if (n >= 0 && !(n % group_sec)) sep = d || p === "0" ? l10n.group : pad("?", opts.nbsp); + } + digits += (d || pad(p, opts.nbsp)) + sep; + } + ret.push(digits); + } else counter.int += digitsStart(integer, part.int_p, tok.num, counter.int); + } else if (tokenType === "FRAC") { + const o = counter.frac; + for (let i = 0; i < len; i++) ret.push(fraction[i + o] || pad(tok.num[i], opts.nbsp)); + counter.frac += len; + } else if (tokenType === "MAN") { + if (!counter.man) ret.push(mantissa_sign); + counter.man += digitsStart(mantissa, part.man_p, tok.num, counter.man); + } else if (tokenType === "NUM") counter.num += digitsStart(numerator, part.num_p, tok.num, counter.num); + else if (tokenType === "DEN") { + const o = counter.den; + for (let i = 0; i < len; i++) { + let digit = denominator[i + o]; + if (!digit) { + const c = tok.num.charCodeAt(i); + if (c > CHAR_0 && c <= CHAR_9 || denominator_fixed && c === CHAR_0) { + denominator_fixed = true; + digit = opts.nbsp ? "\xA0" : " "; + } else if (!denominator_fixed && i === len - 1 && c === CHAR_0 && !denominator) digit = "1"; + else digit = pad(tok.num[i], opts.nbsp); + } + ret.push(digit); + } + counter.den += len; + } else if (tokenType === "YEAR") { + if (year < 0) ret.push(l10n.negative); + ret.push(String(Math.abs(year)).padStart(4, "0")); + } else if (tokenType === "YEAR-SHORT") { + const y = year % 100; + ret.push(y < 10 ? "0" : "", y); + } else if (tokenType === "MONTH") ret.push(tok.pad && month < 10 ? "0" : "", month); + else if (tokenType === "MONTHNAME-SINGLE") { + if (part.date_system === 6) ret.push(l10n.mmmm6[month - 1].charAt(0)); + else ret.push(l10n.mmmm[month - 1].charAt(0)); + } else if (tokenType === "MONTHNAME-SHORT") { + if (part.date_system === 6) ret.push(l10n.mmm6[month - 1]); + else ret.push(l10n.mmm[month - 1]); + } else if (tokenType === "MONTHNAME") { + if (part.date_system === 6) ret.push(l10n.mmmm6[month - 1]); + else ret.push(l10n.mmmm[month - 1]); + } else if (tok.type === "WEEKDAY-SHORT") ret.push(l10n.ddd[weekday]); + else if (tokenType === "WEEKDAY") ret.push(l10n.dddd[weekday]); + else if (tokenType === "DAY") ret.push(tok.pad && day < 10 ? "0" : "", day); + else if (tokenType === "HOUR") { + const h = hour % part.clock || (part.clock < 24 ? part.clock : 0); + ret.push(tok.pad && h < 10 ? "0" : "", h); + } else if (tokenType === "MIN") ret.push(tok.pad && minute < 10 ? "0" : "", minute); + else if (tokenType === "SEC") ret.push(tok.pad && second < 10 ? "0" : "", second); + else if (tokenType === "SUBSEC") { + ret.push(l10n.decimal); + const f = subsec.toFixed(part.sec_decimals); + ret.push(f.slice(2, 2 + tok.decimals)); + } else if (tokenType === "AMPM") { + const idx = hour < 12 ? 0 : 1; + if (tok.short && !l10n_) ret.push("AP"[idx]); + else ret.push(l10n.ampm[idx]); + } else if (tokenType === "HOUR-ELAP" && typeof value === "number") { + if (value < 0) ret.push(l10n.negative); + const hh = date * 24 + Math.floor(Math.abs(time) / 3600); + ret.push(String(Math.abs(hh)).padStart(tok.pad, "0")); + } else if (tokenType === "MIN-ELAP" && typeof value === "number") { + if (value < 0) ret.push(l10n.negative); + const mm = date * 1440 + Math.floor(Math.abs(time) / 60); + ret.push(String(Math.abs(mm)).padStart(tok.pad, "0")); + } else if (tokenType === "SEC-ELAP" && typeof value === "number") { + if (value < 0) ret.push(l10n.negative); + const ss = date * DAYSIZE + Math.abs(time); + ret.push(String(Math.abs(ss)).padStart(tok.pad, "0")); + } else if (tokenType === "B-YEAR") ret.push(year + 543); + else if (tokenType === "B-YEAR-SHORT") { + const y = (year + 543) % 100; + ret.push(y < 10 ? "0" : "", y); + } + } + return ret.join(""); +} +//#endregion +//#region lib/formatNumber.ts +const default_text = parseFormatSection([{ + type: TOKEN_TEXT, + value: "@", + raw: "@" +}]); +function getPart(value, parts) { + for (let pi = 0; pi < 3; pi++) { + const part = parts[pi]; + if (part) { + let cond = false; + if (part.condition) { + const operator = part.condition[0]; + const operand = part.condition[1]; + if (operator === "=") cond = value === operand; + else if (operator === "<>") cond = value !== operand; + else if (typeof value === "string") cond = false; + else if (operator === ">") cond = value > operand; + else if (operator === "<") cond = value < operand; + else if (operator === ">=") cond = value >= operand; + else if (operator === "<=") cond = value <= operand; + } else cond = true; + if (cond) return part; + } + } +} +function formatColor$1(value, parseData, opts) { + const parts = parseData.partitions; + let part = parts[3]; + let color; + if ((typeof value === "number" || typeof value === "bigint") && Number.isFinite(value)) part = getPart(value, parts); + if (part?.color) color = part.color; + if (color && typeof color === "number" && opts.indexColors) color = indexColors[color - 1] || "#000"; + return color; +} +function formatValue(value, parseData, opts) { + const parts = parseData.partitions; + const l10n = getLocale(parseData.locale || opts.locale); + const text_part = parts[3] ? parts[3] : default_text; + if (typeof value === "boolean") value = (l10n || defaultLocale).bool[value ? 0 : 1]; + if (value == null) return ""; + const n = typeof value === "bigint"; + if (typeof value !== "number" && !n) return runPart(String(value), text_part, opts, l10n); + if (!n && !Number.isFinite(value)) { + const loc = l10n || defaultLocale; + if (Number.isNaN(value)) return loc.nan; + return (value < 0 ? loc.negative : "") + loc.infinity; + } + const v = value; + const part = getPart(v, parts); + return part ? runPart(v, part, opts, l10n) : opts.overflow; +} +//#endregion +//#region lib/formatInfo.ts +function isPercent(partitions) { + return !!(partitions[0]?.percent || partitions[1]?.percent || partitions[2]?.percent || partitions[3]?.percent); +} +function isDate(partitions) { + return !!(partitions[0]?.date || partitions[1]?.date || partitions[2]?.date || partitions[3]?.date); +} +function isText(partitions) { + const [part1, part2, part3, part4] = partitions; + return !!((!part1 || part1.generated) && (!part2 || part2.generated) && (!part3 || part3.generated) && part4?.text && !part4.generated); +} +const level = { + text: 15, + datetime: 10.8, + date: 10.8, + time: 10.8, + percent: 10.6, + currency: 10.4, + grouped: 10.2, + scientific: 6, + number: 4, + fraction: 2, + general: 0, + error: 0 +}; +const dateCodes = [ + ["DMY", 1], + ["DM", 2], + ["MY", 3], + ["MDY", 4], + ["MD", 5], + ["hmsa", 6], + ["hma", 7], + ["hms", 8], + ["hm", 9] +]; +function info(partitions, currencyId) { + const [partPos, partNeg] = partitions; + const frac_max = partPos.frac_max; + const output = { + type: "general", + isDate: isDate(partitions), + isText: isText(partitions), + isPercent: isPercent(partitions), + maxDecimals: partPos.general ? 9 : frac_max, + scale: partPos.scale ?? 1, + color: 0, + parentheses: 0, + grouped: partPos.grouping ? 1 : 0, + code: "", + level: 0 + }; + const isCurrency = !output.isDate && !output.isText && !partPos.error && partPos.tokens.some((tok) => tok.type === "STRING" && (currencyId ? tok.value === currencyId : reCurrencySymbols.test(tok.value))); + let codeType = "G"; + let codeNum = frac_max >= 0 ? Math.min(15, frac_max) : ""; + let codeParens = ""; + let codeDash = ""; + if (partNeg?.color) { + codeDash = "-"; + output.color = 1; + } + if (partPos.parens) { + codeParens = "()"; + output.parentheses = 1; + } + if (isCurrency) { + codeType = "C"; + output.type = "currency"; + } else if (partPos.error) { + output.type = "error"; + output.maxDecimals = 0; + } else if (output.isDate) { + let haveTime = 0; + let haveDate = 0; + let order = ""; + partPos.tokens.forEach((tok) => { + const type = tok.type; + if (type === "YEAR" || type === "YEAR-SHORT" || type === "B-YEAR" || type === "B-YEAR-SHORT") { + order += "Y"; + haveDate++; + } else if (type === "MONTH" || type === "MONTHNAME" || type === "MONTHNAME-SHORT" || type === "MONTHNAME-SINGLE") { + order += "M"; + haveDate++; + } else if (type === "WEEKDAY" || type === "WEEKDAY-SHORT" || type === "DAY") { + order += "D"; + haveDate++; + } else if (type === "HOUR") { + order += "h"; + haveTime++; + } else if (type === "MIN") { + order += "m"; + haveTime++; + } else if (type === "SEC") { + order += "s"; + haveTime++; + } else if (type === "AMPM") { + order += "a"; + haveTime++; + } + }); + output.type = "date"; + if (haveDate && haveTime) output.type = "datetime"; + else if (!haveDate && haveTime) output.type = "time"; + const code = dateCodes.find((d) => order.startsWith(d[0])); + codeType = code ? "D" : "G"; + codeNum = code ? code[1] : ""; + } else if (output.isText) { + codeType = "G"; + output.type = "text"; + codeNum = ""; + output.maxDecimals = 0; + } else if (partPos.general) { + codeType = "G"; + output.type = "general"; + codeNum = ""; + } else if (partPos.fractions) { + codeType = "G"; + output.type = "fraction"; + codeNum = ""; + } else if (partPos.exponential) { + codeType = "S"; + output.type = "scientific"; + } else if (output.isPercent) { + codeType = "P"; + output.type = "percent"; + } else if (partPos.grouping) { + codeType = ","; + output.type = "grouped"; + } else if (partPos.int_max || frac_max) { + codeType = "F"; + output.type = "number"; + } + output.code = codeType + codeNum + codeDash + codeParens; + output.level = level[output.type]; + return output; +} +function dateInfo(partitions) { + const [partPos] = partitions; + return { + year: !!(partPos.date & 2), + month: !!(partPos.date & 4), + day: !!(partPos.date & 8), + hours: !!(partPos.date & 16), + minutes: !!(partPos.date & 32), + seconds: !!(partPos.date & 64), + clockType: partPos.clock === 12 ? 12 : 24 + }; +} +//#endregion +//#region lib/tokenize.ts +const tokenHandlers = [ + [ + TOKEN_GENERAL, + /^General/i, + 0 + ], + [ + TOKEN_HASH, + /^#/, + 0 + ], + [ + TOKEN_ZERO, + /^0/, + 0 + ], + [ + TOKEN_QMARK, + /^\?/, + 0 + ], + [ + TOKEN_SLASH, + /^\//, + 0 + ], + [ + TOKEN_BREAK, + /^;/, + 0 + ], + [ + TOKEN_TEXT, + /^@/, + 0 + ], + [ + TOKEN_PLUS, + /^\+/, + 0 + ], + [ + TOKEN_MINUS, + /^-/, + 0 + ], + [ + TOKEN_POINT, + /^\./, + 0 + ], + [ + TOKEN_SPACE, + /^ /, + 0 + ], + [ + TOKEN_PERCENT, + /^%/, + 0 + ], + [ + TOKEN_DIGIT, + /^[1-9]/, + 0 + ], + [ + TOKEN_CALENDAR, + /^(?:B[12])/i, + 0 + ], + [ + TOKEN_ERROR, + /^B$/, + 0 + ], + [ + TOKEN_DATETIME, + /^(?:[hH]+|[mM]+|[sS]+|[yY]+|[bB]+|[dD]+|[gG]+|[aA]{3,}|e+)/, + 0 + ], + [ + TOKEN_DURATION, + /^(?:\[(h+|m+|s+)\])/i, + 1 + ], + [ + TOKEN_CONDITION, + /^\[(<[=>]?|>=?|=)\s*(-?[.\d]+)\]/, + [1, 2] + ], + [ + TOKEN_DBNUM, + /^\[(DBNum[0-4]?\d)\]/i, + 1 + ], + [ + TOKEN_NATNUM, + /^\[(NatNum[0-4]?\d)\]/i, + 1 + ], + [ + TOKEN_LOCALE, + /^\[\$([^\]]+)\]/, + 1 + ], + [ + TOKEN_COLOR, + /^\[(black|blue|cyan|green|magenta|red|white|yellow|color\s*\d+)\]/i, + 1 + ], + [ + TOKEN_MODIFIER, + /^\[([^\]]+)\]/, + 1 + ], + [ + TOKEN_AMPM, + /^(?:AM\/PM|am\/pm|A\/P)/, + 0 + ], + [ + TOKEN_ESCAPED, + /^\\(.)/, + 1 + ], + [ + TOKEN_STRING, + /^"([^"]*?)"/, + 1 + ], + [ + TOKEN_SKIP, + /^_(\\.|.)/, + 1 + ], + [ + "EXP", + /^[Ee]([+-])/, + 1 + ], + [ + TOKEN_FILL, + /^\*(\\.|.)/, + 1 + ], + [ + TOKEN_PAREN, + /^[()]/, + 0 + ], + [ + TOKEN_ERROR, + /^[EÈÉÊËèéêëĒēĔĕĖėĘęĚěȄȅȆȇȨȩNnÑñŃńŅņŇňǸǹ["*/\\_]/, + 0 + ], + [ + TOKEN_CHAR, + /^./, + 0 + ] +]; +const CODE_QMRK = 63; +const CODE_HASH = 35; +const CODE_ZERO = 48; +const CODE_NINE = 57; +const isNumOp = (char) => { + const c = (char || "\0").charCodeAt(0); + return c === CODE_QMRK || c === CODE_HASH || c >= CODE_ZERO && c <= CODE_NINE; +}; +/** +* Breaks a format pattern string into a list of tokens. +* +* The returned output will be an array of objects representing the tokens: +* +* ```js +* [ +* { type: TOKEN_ZERO, value: '0', raw: '0' }, +* { type: TOKEN_POINT, value: '.', raw: '.' }, +* { type: TOKEN_ZERO, value: '0', raw: '0' }, +* { type: TOKEN_PERCENT, value: '%', raw: '%' } +* ] +* ``` +* +* @param pattern The format pattern +* @returns A list of tokens +*/ +function tokenize(pattern) { + let i = 0; + const tokens = []; + const unresolvedCommas = []; + while (i < pattern.length) { + const curr = pattern.slice(i); + let step = 0; + const mComma = /^(,+)(.)?/.exec(curr); + if (mComma) { + const raw = mComma[1]; + step = raw.length; + const lookBehind = pattern[i - 1] || ""; + let maybeGROUP = false; + let maybeSCALE = false; + if (isNumOp(lookBehind)) { + maybeGROUP = true; + maybeSCALE = true; + } else if (lookBehind === ".") maybeSCALE = true; + const lookAhead = mComma[2] || ""; + if (maybeGROUP && (!lookAhead || lookAhead === ";")) maybeGROUP = false; + if (maybeSCALE && isNumOp(lookAhead)) maybeSCALE = false; + if (maybeGROUP && !maybeSCALE) tokens.push({ + type: TOKEN_GROUP, + value: ",", + raw + }); + else if (!maybeGROUP && maybeSCALE) tokens.push({ + type: TOKEN_SCALE, + value: ",", + raw + }); + else if (maybeGROUP && maybeSCALE) { + const t = { + type: TOKEN_SCALE, + value: ",", + raw + }; + tokens.push(t); + unresolvedCommas.push(t); + } else tokens.push({ + type: TOKEN_COMMA, + value: ",", + raw + }); + } else { + let token; + for (const [type, expr, group] of tokenHandlers) { + const m = expr.exec(curr); + if (m) { + token = { + type, + value: Array.isArray(group) ? group.map((d) => m[d]) : m[group || 0], + raw: m[0] + }; + tokens.push(token); + step = m[0].length; + break; + } + } + if (unresolvedCommas.length && token?.raw === ";") unresolvedCommas.length = 0; + if (token && unresolvedCommas.length && isNumOp(token.raw)) { + unresolvedCommas.forEach((d) => d.type = TOKEN_GROUP); + unresolvedCommas.length = 0; + } + } + if (!step) { + const raw = curr[0]; + step = 1; + tokens.push({ + type: TOKEN_CHAR, + value: raw, + raw + }); + } + i += step; + } + return tokens; +} +//#endregion +//#region lib/parsePattern.ts +const maybeAddMinus = (part) => { + const [op, val] = part.condition ?? ["", 0]; + if (!(val < 0 && (op === "<" || op === "<=" || op === "=") || val === 0 && op === "<")) part.tokens.unshift({ + type: TOKEN_MINUS, + volatile: true + }); +}; +const clonePart = (part, prefixToken) => { + const r = {}; + for (const key in part) { + const val = part[key]; + r[key] = Array.isArray(val) ? [...val] : val; + } + if (prefixToken && r.tokens) r.tokens.unshift(prefixToken); + r.generated = true; + return r; +}; +function parsePattern(pattern) { + const partitions = []; + let conditional = false; + let l10n_override; + let text_partition = null; + let more = 0; + let part; + let i = 0; + let conditions = 0; + let tokens = tokenize(pattern); + do { + part = parseFormatSection(tokens); + if ((part.date || part.general) && (part.int_pattern.length || part.frac_pattern.length || part.scale !== 1 || part.text)) throw new Error("Illegal format"); + if (part.condition) { + conditions++; + conditional = true; + } + if (part.text) { + if (text_partition) throw new Error("Unexpected partition"); + text_partition = part; + } + if (part.locale) l10n_override = resolveLocale(part.locale); + partitions.push(part); + more = tokens[part.tokensUsed]?.type === "BREAK" ? 1 : 0; + tokens = tokens.slice(part.tokensUsed + more); + i++; + } while (more && i < 4 && conditions < 3); + if (more) throw new Error("Unexpected partition"); + if (conditions > 2) throw new Error("Unexpected condition"); + const part3 = partitions[3]; + if (part3 && (part3.int_pattern.length || part3.frac_pattern.length || part3.date)) throw new Error("Unexpected partition"); + if (conditional) { + if (!partitions[0].condition) partitions[0].condition = [">", 0]; + const numParts = partitions.length; + if (numParts === 1) { + partitions[1] = parseFormatSection(tokenize("General")); + partitions[1].generated = true; + } + if (numParts <= 2) {} + if (numParts < 3) { + const part1 = partitions[0]; + const part2 = partitions[1]; + maybeAddMinus(part1); + if (part2.condition) maybeAddMinus(part2); + else { + const cond = part1.condition; + if (cond && (cond[0] === "=" || cond[1] >= 0 && (cond[0] === ">" || cond[0] === ">="))) part2.tokens.unshift({ + type: TOKEN_MINUS, + volatile: true + }); + } + } else partitions.forEach(maybeAddMinus); + } else { + if (partitions.length < 4 && text_partition) { + for (let pi = 0, pl = partitions.length; pi < pl; pi++) if (partitions[pi] === text_partition) partitions.splice(pi, 1); + } + if (partitions.length < 1 && text_partition) { + partitions[0] = parseFormatSection(tokenize("General")); + partitions[0].generated = true; + } + if (partitions.length < 2) { + const volMinus = { + type: TOKEN_MINUS, + volatile: true + }; + partitions.push(clonePart(partitions[0], volMinus)); + } + if (partitions.length < 3) partitions.push(clonePart(partitions[0])); + if (partitions.length < 4) { + if (text_partition) partitions.push(text_partition); + else { + const p = parseFormatSection(tokenize("@")); + p.generated = true; + partitions.push(p); + } + } + partitions[0].condition = [">", 0]; + partitions[1].condition = ["<", 0]; + partitions[2].condition = void 0; + } + return { + pattern, + partitions, + locale: l10n_override + }; +} +//#endregion +//#region lib/index.ts +/** +* The numfmt library formats numbers according to a specifier string as defined in ECMA-376. +* The library tries its best to emulate the inns and outs of what the Excel spreadsheet +* software does. +* +* @packageDocumentation +* @module numfmt +*/ +const _parseDataCache = Object.create({}); +function prepareFormatterData(pattern, shouldThrow = false) { + if (!pattern) pattern = "General"; + let parseData = _parseDataCache[pattern]; + if (!parseData) try { + parseData = parsePattern(pattern); + _parseDataCache[pattern] = parseData; + } catch (err) { + if (shouldThrow) throw err; + const message = err && typeof err === "object" && "message" in err ? err.message : "Unknown error"; + const errPart = { + tokens: [{ type: TOKEN_ERROR }], + error: message + }; + parseData = { + pattern, + partitions: [ + errPart, + errPart, + errPart, + errPart + ], + error: message, + locale: null + }; + } + return parseData; +} +/** +* Formats a value as a string and returns the result. +* +* - Dates are normalized to spreadsheet style serial dates and then formatted. +* - Booleans are emitted as uppercase `TRUE` or `FALSE`. +* - `null` and `undefined` will return an empty string `""`. +* - Any non number values will be stringified and passed through the text section of the format pattern. +* - `NaN`s and `Infinite`s will use the corresponding strings from the active locale. +* +* @param pattern - A format pattern in the ECMA-376 number format. +* @param value - The value to format. +* @param [options={}] Formatter options + +* @returns A formatted value +*/ +function format(pattern, value, options = {}) { + const opts = Object.assign({}, defaultOptions, options); + const data = prepareFormatterData(pattern, opts.throws); + return formatValue(dateToSerial(value, opts) ?? value, data, opts); +} +/** +* Find the color appropriate to a value as dictated by a format pattern. +* +* If the pattern defines colors, this function will emit the color appropriate +* to the value. If no colors were specified this function returns `undefined`. +* +* ```js +* const color = formatColor("[green]#,##0;[red]-#,##0", -10); +* console.log(color); // "red" +* const color = formatColor("[green]#,##0;-#,##0", -10); +* console.log(color); // undefined +* ``` +* +* @param pattern - A format pattern in the ECMA-376 number format. +* @param value - The value to format. +* @param [options={}] Formatter options +* @param [options.throws=true] +* Should the formatter throw an error if a provided pattern is invalid. +* If false, a formatter will be constructed which instead outputs an error +* string (see _invalid_ in this table). +* `true` by default. +* @param [options.ignoreTimezone=false] +* Normally when date objects are used with the formatter, time zone is taken +* into account. This makes the formatter ignore the timezone offset. +* `false` by default. +* @param [options.indexColors=true] +* When indexed color modifiers are used (`[Color 1]`) the formatter will +* convert the index into the corresponding hex color of the default palette. +* When this option is set to false, the number will instead by emitted +* allowing you to index against a custom palette. +* `true` by default. +* @returns +* A string color value as described by the pattern or a number if the +* indexColors option has been set to false. +*/ +function formatColor(pattern, value, options) { + const opts = Object.assign({}, defaultOptions, options); + const data = prepareFormatterData(pattern, opts.throws); + return formatColor$1(dateToSerial(value, opts) ?? value, data, opts); +} +/** +* Determine if a given format pattern is a date pattern. +* +* The pattern is considered a date pattern if any of its sections (`"a;b;c;d"`) +* contains a date operator (such as `Y` or `H`). Each section is restricted to be +* _either_ a number or date format. +* +* @param pattern A format pattern in the ECMA-376 number format. +* @returns True if the specified pattern is date pattern, False otherwise. +*/ +function isDateFormat(pattern) { + return isDate(prepareFormatterData(pattern, false).partitions); +} +/** +* Determine if a given format pattern is a percentage pattern. +* +* The pattern is considered a percentage pattern if any of its sections (`"a;b;c;d"`) +* contains an unescaped percentage symbol. +* +* @param pattern A format pattern in the ECMA-376 number format. +* @returns True if the specified pattern is date pattern, False otherwise. +*/ +function isPercentFormat(pattern) { + return isPercent(prepareFormatterData(pattern, false).partitions); +} +/** +* Determine if a given format pattern is a text only pattern. +* +* The pattern is considered text only if its definition is composed of a single +* section that includes that text symbol (`@`). +* +* For example `@` or `@" USD"` are text patterns but `#;@` is not. +* +* @param pattern A format pattern in the ECMA-376 number format. +* @returns True if the specified pattern is date pattern, False otherwise. +*/ +function isTextFormat(pattern) { + return isText(prepareFormatterData(pattern, false).partitions); +} +/** +* Determine if a given format pattern is valid. +* +* @param pattern A format pattern in the ECMA-376 number format. +* @returns True if the specified pattern is valid, False otherwise. +*/ +function isValidFormat(pattern) { + try { + prepareFormatterData(pattern, true); + return true; + } catch (err) { + return false; + } +} +/** +* Returns an object detailing the properties and internals of a format parsed +* format pattern. +* +* @param pattern A format pattern in the ECMA-376 number format. +* @param [options={}] Options for the method +* @param [options.currency] +* Limit the patterns identified as currency to those that use the give string. +* If nothing is provided, patterns will be tagged as currency if one of the +* following currency symbols is used: `¤$£¥֏؋৳฿៛₡₦₩₪₫€₭₮₱₲₴₸₹₺₼₽₾₿` +* @returns An object of format properties. +*/ +function getFormatInfo(pattern, options = {}) { + const data = prepareFormatterData(pattern, false); + if (!data.info) data.info = info(data.partitions, options?.currency); + return data.info; +} +/** +* Gets information about how date codes are used in a format string. +* +* @param pattern A format pattern in the ECMA-376 number format. +* @returns An object of format date properties. +*/ +function getFormatDateInfo(pattern) { + const data = prepareFormatterData(pattern, false); + if (!data.dateInfo) data.dateInfo = dateInfo(data.partitions); + return data.dateInfo; +} +//#endregion +exports.addLocale = addLocale; +exports.dateFromSerial = dateFromSerial; +exports.dateToSerial = dateToSerial; +exports.format = format; +exports.formatColor = formatColor; +exports.getFormatDateInfo = getFormatDateInfo; +exports.getFormatInfo = getFormatInfo; +exports.getLocale = getLocale; +exports.isDateFormat = isDateFormat; +exports.isPercentFormat = isPercentFormat; +exports.isTextFormat = isTextFormat; +exports.isValidFormat = isValidFormat; +exports.parseBool = parseBool; +exports.parseDate = parseDate; +exports.parseLocale = parseLocale; +exports.parseNumber = parseNumber; +exports.parseTime = parseTime; +exports.parseValue = parseValue; +exports.round = round; +exports.tokenize = tokenize; + +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/index.js.map b/dist/index.js.map new file mode 100644 index 0000000..514d511 --- /dev/null +++ b/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","names":["floor","DAYSIZE","isNumOp","formatColor","handleDates","fmtValue","fmtColor"],"sources":["../lib/constants.ts","../lib/codeToLocale.ts","../lib/locale.ts","../lib/options.ts","../lib/round.ts","../lib/toYMD.ts","../lib/serialDate.ts","../lib/isValidDate.ts","../lib/parseValue.ts","../lib/createPartition.ts","../lib/parseFormatSection.ts","../lib/clamp.ts","../lib/dec2frac.ts","../lib/numberProps.ts","../lib/numdec.ts","../lib/general.ts","../lib/pad.ts","../lib/runPart.ts","../lib/formatNumber.ts","../lib/formatInfo.ts","../lib/tokenize.ts","../lib/parsePattern.ts","../lib/index.ts"],"sourcesContent":["export const u_YEAR = 2;\nexport const u_MONTH = 2 ** 2;\nexport const u_DAY = 2 ** 3;\nexport const u_HOUR = 2 ** 4;\nexport const u_MIN = 2 ** 5;\nexport const u_SEC = 2 ** 6;\nexport const u_DSEC = 2 ** 7; // decisecond\nexport const u_CSEC = 2 ** 8; // centisecond\nexport const u_MSEC = 2 ** 9; // millisecond\n\n// Excel date boundaries\nexport const MIN_S_DATE = 0;\nexport const MAX_S_DATE = 2958466;\n// Google date boundaries\nexport const MIN_L_DATE = -694324;\nexport const MAX_L_DATE = 35830291;\n\n// if more calendars are added, they should conform to MS CALID identifiers\n// https://docs.microsoft.com/en-us/windows/win32/intl/calendar-identifiers\nexport const EPOCH_1904 = -1;\nexport const EPOCH_1900 = 1;\nexport const EPOCH_1317 = 6;\n\nexport const TOKEN_GENERAL = 'GENERAL';\nexport const TOKEN_HASH = 'HASH';\nexport const TOKEN_ZERO = 'ZERO';\nexport const TOKEN_QMARK = 'QMARK';\nexport const TOKEN_SLASH = 'SLASH';\nexport const TOKEN_GROUP = 'GROUP';\nexport const TOKEN_SCALE = 'SCALE';\nexport const TOKEN_COMMA = 'COMMA';\nexport const TOKEN_BREAK = 'BREAK';\nexport const TOKEN_TEXT = 'TEXT';\nexport const TOKEN_PLUS = 'PLUS';\nexport const TOKEN_MINUS = 'MINUS';\nexport const TOKEN_POINT = 'POINT';\nexport const TOKEN_SPACE = 'SPACE';\nexport const TOKEN_PERCENT = 'PERCENT';\nexport const TOKEN_DIGIT = 'DIGIT';\nexport const TOKEN_CALENDAR = 'CALENDAR';\nexport const TOKEN_ERROR = 'ERROR';\nexport const TOKEN_DATETIME = 'DATETIME';\nexport const TOKEN_DURATION = 'DURATION';\nexport const TOKEN_CONDITION = 'CONDITION';\nexport const TOKEN_DBNUM = 'DBNUM';\nexport const TOKEN_NATNUM = 'NATNUM';\nexport const TOKEN_LOCALE = 'LOCALE';\nexport const TOKEN_COLOR = 'COLOR';\nexport const TOKEN_MODIFIER = 'MODIFIER';\nexport const TOKEN_AMPM = 'AMPM';\nexport const TOKEN_ESCAPED = 'ESCAPED';\nexport const TOKEN_STRING = 'STRING';\nexport const TOKEN_SKIP = 'SKIP';\nexport const TOKEN_EXP = 'EXP';\nexport const TOKEN_FILL = 'FILL';\nexport const TOKEN_PAREN = 'PAREN';\nexport const TOKEN_CHAR = 'CHAR';\n\nexport const T_TYPE_INT = 'INT';\nexport const T_TYPE_NUM = 'NUM';\nexport const T_TYPE_MAN = 'MAN';\nexport const T_TYPE_DEN = 'DEN';\nexport const T_TYPE_FRAC = 'FRAC';\nexport const T_TYPE_DIV = 'DIV';\nexport const T_TYPE_YEAR = 'YEAR';\nexport const T_TYPE_YEAR_S = 'YEAR-SHORT';\nexport const T_TYPE_MON = 'MONTH';\nexport const T_TYPE_MNAME_1 = 'MONTHNAME-SINGLE';\nexport const T_TYPE_MNAME_S = 'MONTHNAME-SHORT';\nexport const T_TYPE_MNAME = 'MONTHNAME';\nexport const T_TYPE_WEEKDAY_S = 'WEEKDAY-SHORT';\nexport const T_TYPE_WEEKDAY = 'WEEKDAY';\nexport const T_TYPE_DAY = 'DAY';\nexport const T_TYPE_HOUR = 'HOUR';\nexport const T_TYPE_MIN = 'MIN';\nexport const T_TYPE_SEC = 'SEC';\nexport const T_TYPE_SUBSEC = 'SUBSEC';\nexport const T_TYPE_HOUR_E = 'HOUR-ELAP';\nexport const T_TYPE_MIN_E = 'MIN-ELAP';\nexport const T_TYPE_SEC_E = 'SEC-ELAP';\nexport const T_TYPE_B_YEAR = 'B-YEAR';\nexport const T_TYPE_B_YEAR_S = 'B-YEAR-SHORT';\n\nexport const indexColors = [\n '#000000',\n '#FFFFFF',\n '#FF0000',\n '#00FF00',\n '#0000FF',\n '#FFFF00',\n '#FF00FF',\n '#00FFFF',\n '#800000',\n '#008000',\n '#000080',\n '#808000',\n '#800080',\n '#008080',\n '#C0C0C0',\n '#808080',\n '#9999FF',\n '#993366',\n '#FFFFCC',\n '#CCFFFF',\n '#660066',\n '#FF8080',\n '#0066CC',\n '#CCCCFF',\n '#000080',\n '#FF00FF',\n '#FFFF00',\n '#00FFFF',\n '#800080',\n '#800000',\n '#008080',\n '#0000FF',\n '#00CCFF',\n '#CCFFFF',\n '#CCFFCC',\n '#FFFF99',\n '#99CCFF',\n '#FF99CC',\n '#CC99FF',\n '#FFCC99',\n '#3366FF',\n '#33CCCC',\n '#99CC00',\n '#FFCC00',\n '#FF9900',\n '#FF6600',\n '#666699',\n '#969696',\n '#003366',\n '#339966',\n '#003300',\n '#333300',\n '#993300',\n '#993366',\n '#333399',\n '#333333'\n];\n\nexport const currencySymbols = [\n '¤',\n '$',\n '£',\n '¥',\n '֏',\n '؋',\n '৳',\n '฿',\n '៛',\n '₡',\n '₦',\n '₩',\n '₪',\n '₫',\n '€',\n '₭',\n '₮',\n '₱',\n '₲',\n '₴',\n '₸',\n '₹',\n '₺',\n '₼',\n '₽',\n '₾',\n '₿'\n];\n\nexport const reCurrencySymbols = new RegExp('[' + currencySymbols.join('') + ']');\n","/* eslint-disable @stylistic/indent */\n// https://docs.microsoft.com/en-us/office/vba/api/office.msolanguageid\nexport const codeToLocale: Readonly> = Object.freeze({\n 1078: 'af', // Afrikaans\n 1052: 'sq', // Albanian\n 1118: 'am', // Amharic\n 5121: 'ar_DZ', // Arabic - Algeria\n 15361: 'ar_BH', // Arabic - Bahrain\n 3073: 'ar_EG', // Arabic - Egypt\n 2049: 'ar_IQ', // Arabic - Iraq\n 11265: 'ar_JO', // Arabic - Jordan\n 13313: 'ar_KW', // Arabic - Kuwait\n 12289: 'ar_LB', // Arabic - Lebanon\n 4097: 'ar_LY', // Arabic - Libya\n 6145: 'ar_MA', // Arabic - Morocco\n 8193: 'ar_OM', // Arabic - Oman\n 16385: 'ar_QA', // Arabic - Qatar\n 1025: 'ar_SA', // Arabic - Saudi Arabia\n 10241: 'ar_SY', // Arabic - Syria\n 7169: 'ar_TN', // Arabic - Tunisia\n 14337: 'ar_AE', // Arabic - United Arab Emirates\n 9217: 'ar_YE', // Arabic - Yemen\n 1067: 'hy', // Armenian\n 1101: 'as', // Assamese\n 2092: 'az_AZ', // Azeri - Cyrillic\n 1068: 'az_AZ', // Azeri - Latin\n 1069: 'eu', // Basque\n 1059: 'be', // Belarusian\n 2117: 'bn', // Bengali - Bangladesh\n 1093: 'bn_IN', // Bengali - India\n 5146: 'bs', // Bosnian\n 1026: 'bg', // Bulgarian\n 1109: 'my', // Burmese\n 1027: 'ca', // Catalan\n 2052: 'zh_CN', // Chinese - China\n 3076: 'zh_HK', // Chinese - Hong Kong SAR\n 5124: 'zh_MO', // Chinese - Macau SAR\n 4100: 'zh_SG', // Chinese - Singapore\n 1028: 'zh_TW', // Chinese - Taiwan\n 1050: 'hr', // Croatian\n 1029: 'cs', // Czech\n 1030: 'da', // Danish\n 1125: 'dv', // Divehi; Dhivehi; Maldivian\n 2067: 'nl_BE', // Dutch - Belgium\n 1043: 'nl_NL', // Dutch - Netherlands\n 1126: 'bin', // Edo\n 3081: 'en_AU', // English - Australia\n 10249: 'en_BZ', // English - Belize\n 4105: 'en_CA', // English - Canada\n 9225: 'en_CB', // English - Caribbean\n 2057: 'en_GB', // English - Great Britain\n 16393: 'en_IN', // English - India\n 6153: 'en_IE', // English - Ireland\n 8201: 'en_JM', // English - Jamaica\n 5129: 'en_NZ', // English - New Zealand\n 13321: 'en_PH', // English - Phillippines\n 7177: 'en_ZA', // English - Southern Africa\n 11273: 'en_TT', // English - Trinidad\n 1033: 'en_US', // English - United States\n 12297: 'en_ZW', // English - Zimbabwe\n 1061: 'et', // Estonian\n 1071: 'mk', // FYRO Macedonia\n 1080: 'fo', // Faroese\n 1065: 'fa', // Farsi - Persian\n 1124: 'fil', // Filipino\n 1035: 'fi', // Finnish\n 2060: 'fr_BE', // French - Belgium\n 11276: 'fr_CM', // French - Cameroon\n 3084: 'fr_CA', // French - Canada\n 9228: 'fr_CG', // French - Congo\n 12300: 'fr_CI', // French - Cote d'Ivoire\n 1036: 'fr_FR', // French - France\n 5132: 'fr_LU', // French - Luxembourg\n 13324: 'fr_ML', // French - Mali\n 6156: 'fr_MC', // French - Monaco\n 14348: 'fr_MA', // French - Morocco\n 10252: 'fr_SN', // French - Senegal\n 4108: 'fr_CH', // French - Switzerland\n 7180: 'fr', // French - West Indies\n 1122: 'fy_NL', // Frisian - Netherlands\n 2108: 'gd_IE', // Gaelic - Ireland\n 1084: 'gd', // Gaelic - Scotland\n 1110: 'gl', // Galician\n 1079: 'ka', // Georgian\n 3079: 'de_AT', // German - Austria\n 1031: 'de_DE', // German - Germany\n 5127: 'de_LI', // German - Liechtenstein\n 4103: 'de_LU', // German - Luxembourg\n 2055: 'de_CH', // German - Switzerland\n 1032: 'el', // Greek\n 1140: 'gn', // Guarani - Paraguay\n 1095: 'gu', // Gujarati\n 1279: 'en', // HID (Human Interface Device)\n 1037: 'he', // Hebrew\n 1081: 'hi', // Hindi\n 1038: 'hu', // Hungarian\n 1039: 'is', // Icelandic\n 1136: 'ig_NG', // Igbo - Nigeria\n 1057: 'id', // Indonesian\n 1040: 'it_IT', // Italian - Italy\n 2064: 'it_CH', // Italian - Switzerland\n 1041: 'ja', // Japanese\n 1099: 'kn', // Kannada\n 1120: 'ks', // Kashmiri\n 1087: 'kk', // Kazakh\n 1107: 'km', // Khmer\n 1111: 'kok', // Konkani\n 1042: 'ko', // Korean\n 1088: 'ky', // Kyrgyz - Cyrillic\n 1108: 'lo', // Lao\n 1142: 'la', // Latin\n 1062: 'lv', // Latvian\n 1063: 'lt', // Lithuanian\n 2110: 'ms_BN', // Malay - Brunei\n 1086: 'ms_MY', // Malay - Malaysia\n 1100: 'ml', // Malayalam\n 1082: 'mt', // Maltese\n 1112: 'mni', // Manipuri\n 1153: 'mi', // Maori\n 1102: 'mr', // Marathi\n 1104: 'mn', // Mongolian\n 2128: 'mn', // Mongolian\n 1121: 'ne', // Nepali\n 1044: 'no_NO', // Norwegian - Bokml\n 2068: 'no_NO', // Norwegian - Nynorsk\n 1096: 'or', // Oriya\n 1045: 'pl', // Polish\n 1046: 'pt_BR', // Portuguese - Brazil\n 2070: 'pt_PT', // Portuguese - Portugal\n 1094: 'pa', // Punjabi\n 1047: 'rm', // Raeto-Romance\n 2072: 'ro_MO', // Romanian - Moldova\n 1048: 'ro_RO', // Romanian - Romania\n 1049: 'ru', // Russian\n 2073: 'ru_MO', // Russian - Moldova\n 1083: 'se', // Sami Lappish\n 1103: 'sa', // Sanskrit\n 3098: 'sr_SP', // Serbian - Cyrillic\n 2074: 'sr_SP', // Serbian - Latin\n 1072: 'st', // Sesotho (Sutu)\n 1074: 'tn', // Setsuana\n 1113: 'sd', // Sindhi\n 1115: 'si', // Sinhala; Sinhalese\n 1051: 'sk', // Slovak\n 1060: 'sl', // Slovenian\n 1143: 'so', // Somali\n 1070: 'sb', // Sorbian\n 11274: 'es_AR', // Spanish - Argentina\n 16394: 'es_BO', // Spanish - Bolivia\n 13322: 'es_CL', // Spanish - Chile\n 9226: 'es_CO', // Spanish - Colombia\n 5130: 'es_CR', // Spanish - Costa Rica\n 7178: 'es_DO', // Spanish - Dominican Republic\n 12298: 'es_EC', // Spanish - Ecuador\n 17418: 'es_SV', // Spanish - El Salvador\n 4106: 'es_GT', // Spanish - Guatemala\n 18442: 'es_HN', // Spanish - Honduras\n 2058: 'es_MX', // Spanish - Mexico\n 19466: 'es_NI', // Spanish - Nicaragua\n 6154: 'es_PA', // Spanish - Panama\n 15370: 'es_PY', // Spanish - Paraguay\n 10250: 'es_PE', // Spanish - Peru\n 20490: 'es_PR', // Spanish - Puerto Rico\n 1034: 'es_ES', // Spanish - Spain (Traditional)\n 14346: 'es_UY', // Spanish - Uruguay\n 8202: 'es_VE', // Spanish - Venezuela\n 1089: 'sw', // Swahili\n 2077: 'sv_FI', // Swedish - Finland\n 1053: 'sv_SE', // Swedish - Sweden\n 1114: 'syc', // Syriac\n 1064: 'tg', // Tajik\n 1097: 'ta', // Tamil\n 1092: 'tt', // Tatar\n 1098: 'te', // Telugu\n 1054: 'th', // Thai\n 1105: 'bo', // Tibetan\n 1073: 'ts', // Tsonga\n 1055: 'tr', // Turkish\n 1090: 'tk', // Turkmen\n 1058: 'uk', // Ukrainian\n 1056: 'ur', // Urdu\n 2115: 'uz_UZ', // Uzbek - Cyrillic\n 1091: 'uz_UZ', // Uzbek - Latin\n 1075: 've', // Venda\n 1066: 'vi', // Vietnamese\n 1106: 'cy', // Welsh\n 1076: 'xh', // Xhosa\n 1085: 'yi', // Yiddish\n 1077: 'zu' // Zulu\n});\n","import { codeToLocale } from './codeToLocale.ts';\n\n// Locale: [language[_territory][.codeset][@modifier]]\nconst re_locale = /^([a-z\\d]+)(?:[_-]([a-z\\d]+))?(?:\\.([a-z\\d]+))?(?:@([a-z\\d]+))?$/i;\nconst locales: Record = {};\n\n/**\n * An object of properties used by a formatter when printing a number in a certain locale.\n */\nexport type LocaleData = {\n /** Symbol used as a grouping separator (`1,000,000` uses `,`) */\n group: string;\n /** Symbol used to separate integers from fractions (usually `.`) */\n decimal: string;\n /** Symbol used to indicate positive numbers (usually `+`) */\n positive: string;\n /** Symbol used to indicate positive numbers (usually `-`) */\n negative: string;\n /** Symbol used to indicate a percentage (usually `%`) */\n percent: string;\n /** Symbol used to indicate an exponent (usually `E`) */\n exponent: string;\n /** Symbol used to indicate NaN values (`NaN`) */\n nan: string;\n /** Symbol used to indicate infinite values (`∞`) */\n infinity: string;\n /** How AM and PM should be presented */\n ampm: string[];\n /** Long month names for the Islamic calendar (`Rajab`) */\n mmmm6: string[];\n /** Short month names for the Islamic calendar (`Raj.`) */\n mmm6: string[];\n /** Long month names for the Gregorian calendar (`November`) */\n mmmm: string[];\n /** Short month names for the Gregorian calendar (`Nov`) */\n mmm: string[];\n /** Long day names (`Wednesday`) */\n dddd: string[];\n /** Shortened day names (`Wed`) */\n ddd: string[];\n /** How TRUE and FALSE should be presented */\n bool: string[];\n /** Is the prefered date format month first (12/31/2025) or day first (31/12/2025) */\n preferMDY: boolean;\n};\n\n/**\n * An object of properties for a locale tag.\n *\n * ```js\n * { lang: 'zh-CN', language: 'zh', territory: 'CN' }\n * ```\n */\nexport type LocaleToken = {\n /** The basic tag such as `zh-CN` or `fi` */\n lang: string;\n /** The language section (`zh` for `zh-CN`) */\n language: string;\n /** The territory section (`CN` for `zh-CN`) */\n territory: string;\n};\n\n/**\n * Split a semicolon delimited string and replace instances of characters\n * @internal\n * @param str Semicolon delimited string\n * @param [tilde] String to be inserted on every instance of ~\n * @returns Array of strings\n */\nconst _ = (str: string, tilde = ''): string[] => str.replace(/~/g, tilde).split(';');\n\n/**\n * Generate mmm and ddd properties as needed for locales. Many of them\n * are straightforward abreviations of mmmm and dddd so we can save some\n * bytes by auto-generating them.\n *\n * Both rule parameters use the same system. If shortform prop is missing:\n *\n * - 0 - use long form array unchanged\n * - 1...9 - shorten to N many characters\n * - 11...19 - shorten to 1...9 characters and add periods\n *\n * @internal\n * @param o Locale object\n * @param [ml] Month list rule\n * @param [dl] Day list rule\n * @returns The same input object, but with ddd and mmm filled in.\n */\nconst xm = (o: Partial & Pick, ml: number = 0, dl: number = 0): Partial => {\n if (!o.mmm) {\n o.mmm = ml < 1\n ? o.mmmm.concat()\n : o.mmmm.map(d => {\n const s = d.slice(0, ml % 10);\n return s + (ml < 10 || d === s ? '' : '.');\n });\n }\n if (!o.ddd) {\n o.ddd = dl < 1\n ? o.dddd.concat()\n : o.dddd.map(d => {\n const s = d.slice(0, dl % 10);\n return s + (dl < 10 || d === s ? '' : '.');\n });\n }\n if (!o.mmm6 && o.mmmm6) {\n o.mmm6 = o.mmmm6;\n }\n return o;\n};\n\n/** @ignore */\nconst baseLocaleData: LocaleData = {\n group: '\\u00A0',\n decimal: '.',\n positive: '+',\n negative: '-',\n percent: '%',\n exponent: 'E',\n nan: 'NaN',\n infinity: '∞',\n ampm: _('AM;PM'),\n mmmm6: _('Muharram;Safar;Rabiʻ I;Rabiʻ II;Jumada I;Jumada II;Rajab;Shaʻban;Ramadan;Shawwal;Dhuʻl-Qiʻdah;Dhuʻl-Hijjah'),\n mmm6: _('Muh.;Saf.;Rab. I;Rab. II;Jum. I;Jum. II;Raj.;Sha.;Ram.;Shaw.;Dhuʻl-Q.;Dhuʻl-H.'),\n mmmm: _('January;February;March;April;May;June;July;August;September;October;November;December'),\n mmm: _('Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec'),\n dddd: _('Sunday;Monday;Tuesday;Wednesday;Thursday;Friday;Saturday'),\n ddd: _('Sun;Mon;Tue;Wed;Thu;Fri;Sat'),\n bool: _('TRUE;FALSE'),\n preferMDY: false\n};\n\n/**\n * Parse a regular IETF BCP 47 locale tag (`en-US`) and emit an object of its parts.\n * Irregular tags and subtags are not supported.\n *\n * @param locale A BCP 47 string tag of the locale.\n * @returns An object describing the locale.\n */\nexport function parseLocale (locale: string): LocaleToken {\n const lm = re_locale.exec(locale);\n if (!lm) {\n throw new SyntaxError(`Malformed locale: ${locale}`);\n }\n return {\n lang: lm[1] + (lm[2] ? '-' + lm[2] : ''),\n language: lm[1],\n territory: lm[2] || ''\n };\n}\n\n// MS code format is: aabbcccc [$-aabbcccc]\n// aa = numerical style (optional, 00 if absent)\n// bb = calendar format (optional, 00 if absent)\n// cc = language code\nexport function resolveLocale (l4e: number | string): string | undefined {\n if (typeof l4e === 'number') {\n return codeToLocale[l4e & 0xffff] || undefined;\n }\n const wincode = parseInt(l4e, 16);\n if (isFinite(wincode) && codeToLocale[wincode & 0xffff]) {\n return codeToLocale[wincode & 0xffff] || undefined;\n }\n if (re_locale.test(l4e)) {\n return l4e;\n }\n return undefined;\n}\n\n/**\n * Used by the formatter to pull a locate from its registered locales. If\n * subtag isn't available but the base language is, the base language is used:\n * So if `en-CA` is not found, the formatter tries to find `en` else it\n * returns `undefined`.\n *\n * @param locale A BCP 47 string tag of the locale, or an Excel locale code.\n * @returns An object of format date properties if one was found.\n */\nexport function getLocale (locale: string | number): LocaleData | undefined {\n const tag = resolveLocale(locale);\n let obj;\n if (tag) {\n const c = parseLocale(tag);\n obj = locales[c.lang] || locales[c.language] || undefined;\n }\n return obj;\n}\n\n// creates a new locale options object\nexport function createLocale (data: Partial): LocaleData {\n return Object.assign({}, baseLocaleData, data);\n}\n\n/**\n * Register locale data for a language to use when formatting.\n *\n * Any partial set of properties may be returned to have the defaults used where properties are missing.\n *\n * @param localeSettings - A collection of settings for a locale.\n * @param [localeSettings.group=\"\\u00a0\"]\n * Symbol used as a grouping separator (`1,000,000` uses `,`)\n * @param [localeSettings.decimal=\".\"]\n * Symbol used to separate integers from fractions (usually `.`)\n * @param [localeSettings.positive=\"+\"]\n * Symbol used to indicate positive numbers (usually `+`)\n * @param [localeSettings.negative=\"-\"]\n * Symbol used to indicate positive numbers (usually `-`)\n * @param [localeSettings.percent=\"%\"]\n * Symbol used to indicate a percentage (usually `%`)\n * @param [localeSettings.exponent=\"E\"]\n * Symbol used to indicate an exponent (usually `E`)\n * @param [localeSettings.nan=\"NaN\"]\n * Symbol used to indicate NaN values (`NaN`)\n * @param [localeSettings.infinity=\"∞\"]\n * Symbol used to indicate infinite values (`∞`)\n * @param [localeSettings.ampm=[\"AM\",\"PM\"]]\n * How AM and PM should be presented.\n * @param [localeSettings.mmmm6=[\"Muharram\", \"Safar\", \"Rabiʻ I\", \"Rabiʻ II\", \"Jumada I\", \"Jumada II\", \"Rajab\", \"Shaʻban\", \"Ramadan\", \"Shawwal\", \"Dhuʻl-Qiʻdah\", \"Dhuʻl-Hijjah\"]]\n * Long month names for the Islamic calendar (e.g. `Rajab`)\n * @param [localeSettings.mmm6=[\"Muh.\", \"Saf.\", \"Rab. I\", \"Rab. II\", \"Jum. I\", \"Jum. II\", \"Raj.\", \"Sha.\", \"Ram.\", \"Shaw.\", \"Dhuʻl-Q.\", \"Dhuʻl-H.\"]]\n * Short month names for the Islamic calendar (e.g. `Raj.`)\n * @param [localeSettings.mmmm=[\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"]]\n * Long month names for the Gregorian calendar (e.g. `November`)\n * @param [localeSettings.mmm=[\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"]]\n * Short month names for the Gregorian calendar (e.g. `Nov`)\n * @param [localeSettings.dddd=[\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"]]\n * Long day names (e.g. `Wednesday`)\n * @param [localeSettings.ddd=[\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"]]\n * Shortened day names (e.g. `Wed`)\n * @param [localeSettings.bool=[\"TRUE\", \"FALSE\"]]\n * How TRUE and FALSE should be presented.\n * @param {boolean} [localeSettings.preferMDY=false]\n * Is the prefered date format month first (12/31/2025) or day first (31/12/2025)\n * @param l4e - A string BCP 47 tag of the locale.\n * @returns A full collection of settings for a locale\n */\nexport function addLocale (localeSettings: Partial, l4e: string): LocaleData {\n // parse language tag\n const c = typeof l4e === 'object' ? l4e : parseLocale(l4e);\n // add the language\n locales[c.lang] = createLocale(localeSettings);\n // if \"xx_YY\" is added also create \"xx\" if it is missing\n if (c.language !== c.lang && !locales[c.language]) {\n locales[c.language] = createLocale(localeSettings);\n }\n return locales[c.lang];\n}\n\nexport function listLocales () {\n return Object.keys(locales);\n}\n\nexport const defaultLocale: LocaleData & { isDefault?: boolean } = createLocale({ group: ',', preferMDY: true });\ndefaultLocale.isDefault = true;\n\naddLocale({\n group: ',',\n ampm: _('上午;下午'),\n mmmm: _('一月;二月;三月;四月;五月;六月;七月;八月;九月;十月;十一月;十二月'),\n mmm: _('1月;2月;3月;4月;5月;6月;7月;8月;9月;10月;11月;12月'),\n dddd: _('~日;~一;~二;~三;~四;~五;~六', '星期'),\n ddd: _('周日;周一;周二;周三;周四;周五;周六')\n}, 'zh-CN');\nconst _zh = {\n group: ',',\n ampm: _('上午;下午'),\n mmmm: _('1月;2月;3月;4月;5月;6月;7月;8月;9月;10月;11月;12月'),\n mmm: _('1月;2月;3月;4月;5月;6月;7月;8月;9月;10月;11月;12月'),\n dddd: _('~日;~一;~二;~三;~四;~五;~六', '星期'),\n ddd: _('周日;周一;周二;周三;周四;周五;周六')\n};\naddLocale({\n ..._zh,\n nan: '非數值',\n dddd: _('~日;~一;~二;~三;~四;~五;~六', '星期')\n}, 'zh-TW');\naddLocale({\n ..._zh,\n dddd: _('~日;~一;~二;~三;~四;~五;~六', '星期')\n}, 'zh-HK');\n\naddLocale({\n ..._zh,\n ampm: _('午前;午後'),\n dddd: _('日~;月~;火~;水~;木~;金~;土~', '曜日'),\n ddd: _('日;月;火;水;木;金;土')\n}, 'ja');\n\naddLocale({\n group: ',',\n ampm: _('오전;오후'),\n mmmm: _('1월;2월;3월;4월;5월;6월;7월;8월;9월;10월;11월;12월'),\n mmm: _('1월;2월;3월;4월;5월;6월;7월;8월;9월;10월;11월;12월'),\n dddd: _('일요일;월요일;화요일;수요일;목요일;금요일;토요일'),\n ddd: _('일;월;화;수;목;금;토')\n}, 'ko');\n\naddLocale({\n group: ',',\n ampm: _('ก่อนเที่ยง;หลังเที่ยง'),\n mmmm: _('มกร~;กุมภาพันธ์;มีน~;เมษายน;พฤษภ~;มิถุนายน;กรกฎ~;สิงห~;กันยายน;ตุล~;พฤศจิกายน;ธันว~', 'าคม'),\n mmm: _('ม.ค.;ก.พ.;มี.ค.;เม.ย.;พ.ค.;มิ.ย.;ก.ค.;ส.ค.;ก.ย.;ต.ค.;พ.ย.;ธ.ค.'),\n dddd: _('วันอาทิตย์;วันจันทร์;วันอังคาร;วันพุธ;วันพฤหัสบดี;วันศุกร์;วันเสาร์'),\n ddd: _('อา.;จ.;อ.;พ.;พฤ.;ศ.;ส.')\n}, 'th');\n\naddLocale(xm({\n decimal: ',',\n ampm: _('dop.;odp.'),\n mmmm: _('ledna;února;března;dubna;května;června;července;srpna;září;října;listopadu;prosince'),\n mmm: _('I;II;III;IV;V;VI;VII;VIII;IX;X;XI;XII'),\n dddd: _('neděle;pondělí;úterý;středa;čtvrtek;pátek;sobota'),\n bool: _('PRAVDA;NEPRAVDA')\n}, -1, 2), 'cs');\n\naddLocale(xm({\n group: '.',\n decimal: ',',\n mmmm: _('januar;februar;marts;april;maj;juni;juli;august;september;oktober;november;december'),\n dddd: _('søn~;man~;tirs~;ons~;tors~;fre~;lør~', 'dag'),\n bool: _('SAND;FALSK')\n}, 13, 13), 'da');\n\naddLocale(xm({\n group: '.',\n decimal: ',',\n ampm: _('a.m.;p.m.'),\n mmmm: _('januari;februari;maart;april;mei;juni;juli;augustus;september;oktober;november;december'),\n mmm: _('jan.;feb.;mrt.;apr.;mei;jun.;jul.;aug.;sep.;okt.;nov.;dec.'),\n dddd: _('zondag;maandag;dinsdag;woensdag;donderdag;vrijdag;zaterdag'),\n bool: _('WAAR;ONWAAR')\n}, -1, 2), 'nl');\n\naddLocale({ group: ',', preferMDY: true }, 'en');\naddLocale({ group: ',', preferMDY: true }, 'en-US');\naddLocale({ group: ',' }, 'en-AU');\naddLocale({ group: ',' }, 'en-CA');\naddLocale({ group: ',' }, 'en-GB');\naddLocale({ group: ',', mmm: _('Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sept;Oct;Nov;Dec') }, 'en-IE');\n\naddLocale(xm({\n decimal: ',',\n nan: 'epäluku',\n ampm: _('ap.;ip.'),\n mmmm: _('tammi~;helmi~;maalis~;huhti~;touko~;kesä~;heinä~;elo~;syys~;loka~;marras~;joulu~', 'kuuta'),\n mmm: _('tammik.;helmik.;maalisk.;huhtik.;toukok.;kesäk.;heinäk.;elok.;syysk.;lokak.;marrask.;jouluk.'),\n dddd: _('sunnun~;maanan~;tiis~;keskiviikkona;tors~;perjan~;lauan~', 'taina'),\n bool: _('TOSI;EPÄTOSI')\n}, -1, 2), 'fi');\n\nconst _fr = xm({\n group: '\\u202f',\n decimal: ',',\n mmmm: _('janvier;février;mars;avril;mai;juin;juillet;août;septembre;octobre;novembre;décembre'),\n mmm: _('janv.;févr.;mars;avr.;mai;juin;juil.;août;sept.;oct.;nov.;déc.'),\n dddd: _('~manche;lun~;mar~;mercre~;jeu~;vendre~;same~', 'di'),\n bool: _('VRAI;FAUX')\n}, -1, 13);\naddLocale({ ..._fr }, 'fr');\naddLocale({ ..._fr, mmm: _('janv.;févr.;mars;avr.;mai;juin;juill.;août;sept.;oct.;nov.;déc.') }, 'fr-CA');\naddLocale({ group: \"'\", decimal: '.', ..._fr }, 'fr-CH');\n\nconst _de = xm({\n mmmm: _('Januar;Februar;März;April;Mai;Juni;Juli;August;September;Oktober;November;Dezember'),\n mmm: _('Jan.;Feb.;März;Apr.;Mai;Juni;Juli;Aug.;Sept.;Okt.;Nov.;Dez.'),\n dddd: _('Sonn~;Mon~;Diens~;Mittwoch;Donners~;Frei~;Sams~', 'tag'),\n bool: _('WAHR;FALSCH')\n}, -1, 12);\naddLocale({ group: '.', decimal: ',', ..._de }, 'de');\naddLocale({ group: \"'\", decimal: '.', ..._de }, 'de-CH');\n\naddLocale(xm({\n group: '.',\n decimal: ',',\n ampm: _('π.μ.;μ.μ.'),\n mmmm: _('Ιανουαρ~;Φεβρουαρ~;Μαρτ~;Απριλ~;Μαΐου;Ιουν~;Ιουλ~;Αυγούστου;Σεπτεμβρ~;Οκτωβρ~;Νοεμβρ~;Δεκεμβρ~', 'ίου'),\n mmm: _('Ιαν;Φεβ;Μαρ;Απρ;Μαΐ;Ιουν;Ιουλ;Αυγ;Σεπ;Οκτ;Νοε;Δεκ'),\n dddd: _('Κυριακή;Δευτέρα;Τρίτη;Τετάρτη;Πέμπτη;Παρασκευή;Σάββατο')\n}, -1, 3), 'el');\n\naddLocale({\n decimal: ',',\n ampm: _('de.;du.'),\n mmmm: _('január;február;március;április;május;június;július;augusztus;szeptember;október;november;december'),\n mmm: _('jan.;febr.;márc.;ápr.;máj.;jún.;júl.;aug.;szept.;okt.;nov.;dec.'),\n dddd: _('vasárnap;hétfő;kedd;szerda;csütörtök;péntek;szombat'),\n ddd: _('V;H;K;Sze;Cs;P;Szo'),\n bool: _('IGAZ;HAMIS')\n}, 'hu');\n\naddLocale(xm({\n group: '.',\n decimal: ',',\n ampm: _('f.h.;e.h.'),\n mmmm: _('janúar;febrúar;mars;apríl;maí;júní;júlí;ágúst;september;október;nóvember;desember'),\n dddd: _('sunnu~;mánu~;þriðju~;miðviku~;fimmtu~;föstu~;laugar~', 'dagur')\n}, 13, 13), 'is');\n\naddLocale(xm({\n group: '.',\n decimal: ',',\n mmmm: _('Januari;Februari;Maret;April;Mei;Juni;Juli;Agustus;September;Oktober;November;Desember'),\n dddd: _('Minggu;Senin;Selasa;Rabu;Kamis;Jumat;Sabtu')\n}, 3, 3), 'id');\n\nconst _it = xm({\n mmmm: _('gennaio;febbraio;marzo;aprile;maggio;giugno;luglio;agosto;settembre;ottobre;novembre;dicembre'),\n dddd: _('domenica;lunedì;martedì;mercoledì;giovedì;venerdì;sabato'),\n bool: _('VERO;FALSO')\n}, 3, 3);\naddLocale({ group: '.', decimal: ',', ..._it }, 'it');\naddLocale({ group: \"'\", decimal: '.', ..._it }, 'it-CH');\n\nconst _no = {\n decimal: ',',\n ampm: _('a.m.;p.m.'),\n mmmm: _('januar;februar;mars;april;mai;juni;juli;august;september;oktober;november;desember'),\n mmm: _('jan.;feb.;mar.;apr.;mai;jun.;jul.;aug.;sep.;okt.;nov.;des.'),\n dddd: _('søn~;man~;tirs~;ons~;tors~;fre~;lør~', 'dag'),\n bool: _('SANN;USANN')\n};\naddLocale(xm({ ..._no }, -1, 13), 'nb');\naddLocale(xm({ ..._no }, -1, 13), 'no');\n\naddLocale(xm({\n decimal: ',',\n mmmm: _('stycznia;lutego;marca;kwietnia;maja;czerwca;lipca;sierpnia;września;października;listopada;grudnia'),\n dddd: _('niedziela;poniedziałek;wtorek;środa;czwartek;piątek;sobota'),\n ddd: _('niedz.;pon.;wt.;śr.;czw.;pt.;sob.'),\n bool: _('PRAWDA;FAŁSZ')\n}, 3, -1), 'pl');\n\nconst _pt = {\n group: '.',\n decimal: ',',\n mmmm: _('janeiro;fevereiro;março;abril;maio;junho;julho;agosto;setembro;outubro;novembro;dezembro'),\n dddd: _('domingo;segunda-feira;terça-feira;quarta-feira;quinta-feira;sexta-feira;sábado'),\n bool: _('VERDADEIRO;FALSO')\n};\naddLocale(xm(_pt, 13, 13), 'pt');\naddLocale(xm(_pt, 13, 13), 'pt-BR');\n\naddLocale({\n decimal: ',',\n nan: 'не\\u00A0число',\n mmmm: _('января;февраля;марта;апреля;мая;июня;июля;августа;сентября;октября;ноября;декабря'),\n mmm: _('янв.;февр.;мар.;апр.;мая;июн.;июл.;авг.;сент.;окт.;нояб.;дек.'),\n dddd: _('воскресенье;понедельник;вторник;среда;четверг;пятница;суббота'),\n ddd: _('вс;пн;вт;ср;чт;пт;сб'),\n mmmm6: _('рамадан;шавваль;зуль-каада;зуль-хиджжа;мухаррам;раби-уль-авваль;раби-уль-ахир;джумад-уль-авваль;джумад-уль-ахир;раджаб;шаабан;рамадан'),\n mmm6: _('рам.;шав.;зуль-к.;зуль-х.;мух.;раб. I;раб. II;джум. I;джум. II;радж.;шааб.;рам.'),\n bool: _('ИСТИНА;ЛОЖЬ')\n}, 'ru');\n\naddLocale(xm({\n decimal: ',',\n mmmm: _('januára;februára;marca;apríla;mája;júna;júla;augusta;septembra;októbra;novembra;decembra'),\n dddd: _('nedeľa;pondelok;utorok;streda;štvrtok;piatok;sobota')\n}, 3, 2), 'sk');\n\nconst _es = {\n group: '.',\n decimal: ',',\n ampm: _('a.\\u00A0m.;p.\\u00A0m.'),\n mmmm: _('enero;febrero;marzo;abril;mayo;junio;julio;agosto;septiem~;octu~;noviem~;diciem~', 'bre'),\n mmm: _('ene;feb;mar;abr;may;jun;jul;ago;sept;oct;nov;dic'),\n dddd: _('domingo;lunes;martes;miércoles;jueves;viernes;sábado'),\n ddd: _('dom;lun;mar;mié;jue;vie;sáb'),\n bool: _('VERDADERO;FALSO')\n};\nconst _esM3 = _('ene;feb;mar;abr;may;jun;jul;ago;sep;oct;nov;dic');\nconst _esM13 = _('ene.;feb.;mar.;abr.;may.;jun.;jul.;ago.;sept.;oct.;nov.;dic.');\naddLocale({ ..._es }, 'es');\naddLocale({ ..._es }, 'es-AR');\naddLocale({ ..._es }, 'es-BO');\naddLocale({ ..._es }, 'es-CL');\naddLocale({ ..._es }, 'es-CO');\naddLocale({ ..._es }, 'es-EC');\naddLocale({ ..._es, mmm: _esM3, ampm: _('a.m.;p.m.') }, 'es-MX');\naddLocale({ ..._es, mmm: _esM13 }, 'es-PY');\naddLocale({ ..._es, mmm: _esM13 }, 'es-UY');\naddLocale({ ..._es, mmm: _esM13, mmmm: _('enero;febrero;marzo;abril;mayo;junio;julio;agosto;setiembre;octubre;noviembre;diciembre') }, 'es-VE');\n\naddLocale({\n decimal: ',',\n ampm: _('fm;em'),\n mmmm: _('januari;februari;mars;april;maj;juni;juli;augusti;september;oktober;november;december'),\n mmm: _('jan.;feb.;mars;apr.;maj;juni;juli;aug.;sep.;okt.;nov.;dec.'),\n dddd: _('sön~;mån~;tis~;ons~;tors~;fre~;lör~', 'dag'),\n ddd: _('sön;mån;tis;ons;tors;fre;lör')\n}, 'sv');\n\naddLocale(xm({\n group: '.',\n decimal: ',',\n ampm: _('ÖÖ;ÖS'),\n mmmm: _('Ocak;Şubat;Mart;Nisan;Mayıs;Haziran;Temmuz;Ağustos;Eylül;Ekim;Kasım;Aralık'),\n mmm: _('Oca;Şub;Mar;Nis;May;Haz;Tem;Ağu;Eyl;Eki;Kas;Ara'),\n dddd: _('Pazar;Pazartesi;Salı;Çarşamba;Perşembe;Cuma;Cumartesi'),\n ddd: _('Paz;Pzt;Sal;Çar;Per;Cum;Cmt'),\n bool: _('DOĞRU;YANLIŞ')\n}, 3, -1), 'tr');\n\naddLocale({\n group: ',',\n ampm: _('yb;yh'),\n mmmm: _('Ionawr;Chwefror;Mawrth;Ebrill;Mai;Mehefin;Gorffennaf;Awst;Medi;Hydref;Tachwedd;Rhagfyr'),\n mmm: _('Ion;Chwef;Maw;Ebr;Mai;Meh;Gorff;Awst;Medi;Hyd;Tach;Rhag'),\n dddd: _('Dydd Sul;Dydd Llun;Dydd Mawrth;Dydd Mercher;Dydd Iau;Dydd Gwener;Dydd Sadwrn'),\n ddd: _('Sul;Llun;Maw;Mer;Iau;Gwen;Sad')\n}, 'cy');\n\naddLocale({\n group: '.',\n decimal: ',',\n mmmm: _('yanvar;fevral;mart;aprel;may;iyun;iyul;avqust;sentyabr;oktyabr;noyabr;dekabr'),\n mmm: _('yan;fev;mar;apr;may;iyn;iyl;avq;sen;okt;noy;dek'),\n dddd: _('bazar;bazar ertəsi;çərşənbə axşamı;çərşənbə;cümə axşamı;cümə;şənbə'),\n ddd: _('B.;B.e.;Ç.a.;Ç.;C.a.;C.;Ş.')\n}, 'az');\n\naddLocale(xm({\n decimal: ',',\n mmmm: _('студзеня;лютага;сакавіка;красавіка;мая;чэрвеня;ліпеня;жніўня;верасня;кастрычніка;лістапада;снежня'),\n dddd: _('нядзеля;панядзелак;аўторак;серада;чацвер;пятніца;субота'),\n ddd: _('нд;пн;аў;ср;чц;пт;сб')\n}, 3, -1), 'be');\n\naddLocale({\n decimal: ',',\n ampm: _('пр.об.;сл.об.'),\n mmmm: _('януари;февруари;март;април;май;юни;юли;август;септември;октомври;ноември;декември'),\n mmm: _('яну;фев;март;апр;май;юни;юли;авг;сеп;окт;ное;дек'),\n dddd: _('неделя;понеделник;вторник;сряда;четвъртък;петък;събота'),\n ddd: _('нд;пн;вт;ср;чт;пт;сб'),\n bool: _('ИСТИНА;ЛОЖЬ')\n}, 'bg');\n\naddLocale({\n group: '.',\n decimal: ',',\n mmmm: _('de gener;de febrer;de març;d’abril;de maig;de juny;de juliol;d’agost;de setembre;d’octubre;de novembre;de desembre'),\n mmm: _('de gen.;de febr.;de març;d’abr.;de maig;de juny;de jul.;d’ag.;de set.;d’oct.;de nov.;de des.'),\n dddd: _('diumenge;dilluns;dimarts;dimecres;dijous;divendres;dissabte'),\n ddd: _('dg.;dl.;dt.;dc.;dj.;dv.;ds.'),\n ampm: _('a.\\u00a0m.;p.\\u00a0m.')\n}, 'ca');\n\naddLocale(xm({\n group: ',',\n decimal: '.',\n mmmm: _('Enero;Pebrero;Marso;Abril;Mayo;Hunyo;Hulyo;Agosto;Setyembre;Oktubre;Nobyembre;Disyembre'),\n dddd: _('Linggo;Lunes;Martes;Miyerkules;Huwebes;Biyernes;Sabado')\n}, 3, 3), 'fil');\n\naddLocale({\n group: ',',\n decimal: '.',\n mmmm: _('જાન્યુઆરી;ફેબ્રુઆરી;માર્ચ;એપ્રિલ;મે;જૂન;જુલાઈ;ઑગસ્ટ;સપ્ટેમ્બર;ઑક્ટોબર;નવેમ્બર;ડિસેમ્બર'),\n mmm: _('જાન્યુ;ફેબ્રુ;માર્ચ;એપ્રિલ;મે;જૂન;જુલાઈ;ઑગસ્ટ;સપ્ટે;ઑક્ટો;નવે;ડિસે'),\n dddd: _('રવિ~;સોમ~;મંગળ~;બુધ~;ગુરુ~;શુક્ર~;શનિ~', 'વાર'),\n ddd: _('રવિ;સોમ;મંગળ;બુધ;ગુરુ;શુક્ર;શનિ')\n}, 'gu');\n\naddLocale({\n group: ',',\n decimal: '.',\n ampm: _('לפנה״צ;אחה״צ'),\n dddd: _('~ראשון;~שני;~שלישי;~רביעי;~חמישי;~שישי;~שבת', 'יום '),\n ddd: _('~א׳;~ב׳;~ג׳;~ד׳;~ה׳;~ו׳;שבת', 'יום '),\n mmmm: _('ינואר;פברואר;מרץ;אפריל;מאי;יוני;יולי;אוגוסט;ספטמבר;אוקטובר;נובמבר;דצמבר'),\n mmm: _('ינו׳;פבר׳;מרץ;אפר׳;מאי;יוני;יולי;אוג׳;ספט׳;אוק׳;נוב׳;דצמ׳'),\n mmmm6: _('רמדאן;שוואל;ד׳ו אל־קעדה;ד׳ו אל־חיג׳ה;מוחרם;רביע אל־אוול;רביע א־ת׳אני;ג׳ומאדא אל־אולא;ג׳ומאדא א־ת׳אניה;רג׳ב;שעבאן;רמדאן'),\n mmm6: _('רמדאן;שוואל;ד׳ו אל־קעדה;ד׳ו אל־חיג׳ה;מוחרם;רביע א׳;רביע ב׳;ג׳ומאדא א׳;ג׳ומאדא ב׳;רג׳ב;שעבאן;רמדאן')\n}, 'he');\n\naddLocale(xm({\n group: '.',\n decimal: ',',\n mmmm: _('siječnja;veljače;ožujka;travnja;svibnja;lipnja;srpnja;kolovoza;rujna;listopada;studenoga;prosinca'),\n mmm: _('sij;velj;ožu;tra;svi;lip;srp;kol;ruj;lis;stu;pro'),\n dddd: _('nedjelja;ponedjeljak;utorak;srijeda;četvrtak;petak;subota')\n}, -1, 3), 'hr');\n\naddLocale({\n decimal: ',',\n mmmm: _('հունվարի;փետրվարի;մարտի;ապրիլի;մայիսի;հունիսի;հուլիսի;օգոստոսի;սեպտեմբերի;հոկտեմբերի;նոյեմբերի;դեկտեմբերի'),\n mmm: _('հնվ;փտվ;մրտ;ապր;մյս;հնս;հլս;օգս;սեպ;հոկ;նոյ;դեկ'),\n dddd: _('կիրակի;երկուշաբթի;երեքշաբթի;չորեքշաբթի;հինգշաբթի;ուրբաթ;շաբաթ'),\n ddd: _('կիր;երկ;երք;չրք;հնգ;ուր;շբթ')\n}, 'hy');\n\naddLocale(xm({\n decimal: ',',\n mmmm: _('იანვარი;თებერვალი;მარტი;აპრილი;მაისი;ივნისი;ივლისი;აგვისტო;სექტემბერი;ოქტომბერი;ნოემბერი;დეკემბერი'),\n dddd: _('კვირა;ორშაბათი;სამშაბათი;ოთხშაბათი;ხუთშაბათი;პარასკევი;შაბათი')\n}, 3, 3), 'ka');\n\naddLocale(xm({\n decimal: ',',\n mmmm: _('қаңтар;ақпан;наурыз;сәуір;мамыр;маусым;шілде;тамыз;қыркүйек;қазан;қараша;желтоқсан'),\n dddd: _('жексенбі;дүйсенбі;сейсенбі;сәрсенбі;бейсенбі;жұма;сенбі'),\n ddd: _('жс;дс;сс;ср;бс;жм;сб')\n}, 13, -1), 'kk');\n\naddLocale({\n group: ',',\n mmmm: _('ಜನವರಿ;ಫೆಬ್ರವರಿ;ಮಾರ್ಚ್;ಏಪ್ರಿಲ್;ಮೇ;ಜೂನ್;ಜುಲೈ;ಆಗಸ್ಟ್;ಸೆಪ್ಟೆಂಬರ್;ಅಕ್ಟೋಬರ್;ನವೆಂಬರ್;ಡಿಸೆಂಬರ್'),\n mmm: _('ಜನವರಿ;ಫೆಬ್ರವರಿ;ಮಾರ್ಚ್;ಏಪ್ರಿ;ಮೇ;ಜೂನ್;ಜುಲೈ;ಆಗಸ್ಟ್;ಸೆಪ್ಟೆಂ;ಅಕ್ಟೋ;ನವೆಂ;ಡಿಸೆಂ'),\n dddd: _('ಭಾನು~;ಸೋಮ~;ಮಂಗಳ~;ಬುಧ~;ಗುರು~;ಶುಕ್ರ~;ಶನಿ~', 'ವಾರ'),\n ddd: _('ಭಾನು;ಸೋಮ;ಮಂಗಳ;ಬುಧ;ಗುರು;ಶುಕ್ರ;ಶನಿ'),\n ampm: _('ಪೂರ್ವಾಹ್ನ;ಅಪರಾಹ್ನ')\n}, 'kn');\n\naddLocale({\n decimal: ',',\n mmmm: _('sausio;vasario;kovo;balandžio;gegužės;birželio;liepos;rugpjūčio;rugsėjo;spalio;lapkričio;gruodžio'),\n mmm: _('saus.;vas.;kov.;bal.;geg.;birž.;liep.;rugp.;rugs.;spal.;lapkr.;gruod.'),\n dddd: _('sekmadienis;pirmadienis;antradienis;trečiadienis;ketvirtadienis;penktadienis;šeštadienis'),\n ddd: _('sk;pr;an;tr;kt;pn;št'),\n ampm: _('priešpiet;popiet')\n}, 'lt');\n\naddLocale({\n decimal: ',',\n mmmm: _('janvāris;februāris;marts;aprīlis;maijs;jūnijs;jūlijs;augusts;septembris;oktobris;novembris;decembris'),\n mmm: _('janv.;febr.;marts;apr.;maijs;jūn.;jūl.;aug.;sept.;okt.;nov.;dec.'),\n dddd: _('svētdiena;pirmdiena;otrdiena;trešdiena;ceturtdiena;piektdiena;sestdiena'),\n ddd: _('svētd.;pirmd.;otrd.;trešd.;ceturtd.;piektd.;sestd.'),\n ampm: _('priekšpusdienā;pēcpusdienā')\n}, 'lv');\n\naddLocale({\n group: ',',\n decimal: '.',\n mmmm: _('ജനുവരി;ഫെബ്രുവരി;മാർച്ച്;ഏപ്രിൽ;മേയ്;ജൂൺ;ജൂലൈ;ഓഗസ്റ്റ്;സെപ്റ്റംബർ;ഒക്‌ടോബർ;നവംബർ;ഡിസംബർ'),\n mmm: _('ജനു;ഫെബ്രു;മാർ;ഏപ്രി;മേയ്;ജൂൺ;ജൂലൈ;ഓഗ;സെപ്റ്റം;ഒക്ടോ;നവം;ഡിസം'),\n dddd: _('ഞായറാഴ്‌ച;തിങ്കളാഴ്‌ച;ചൊവ്വാഴ്ച;ബുധനാഴ്‌ച;വ്യാഴാഴ്‌ച;വെള്ളിയാഴ്‌ച;ശനിയാഴ്‌ച'),\n ddd: _('ഞായർ;തിങ്കൾ;ചൊവ്വ;ബുധൻ;വ്യാഴം;വെള്ളി;ശനി')\n}, 'ml');\n\naddLocale({\n group: ',',\n decimal: '.',\n mmmm: _('нэгдүгээ~;хоёрдугаа~;гуравдугаа~;дөрөвдүгээ~;тавдугаа~;зургаадугаа~;долоодугаа~;наймдугаа~;есдүгээ~;аравдугаа~;арван нэгдүгээ~;арван хоёрдугаа~', 'р сар'),\n mmm: _('1~;2~;3~;4~;5~;6~;7~;8~;9~;10~;11~;12~', '-р сар'),\n dddd: _('ням;даваа;мягмар;лхагва;пүрэв;баасан;бямба'),\n ddd: _('Ня;Да;Мя;Лх;Пү;Ба;Бя'),\n ampm: _('ү.ө.;ү.х.')\n}, 'mn');\n\naddLocale({\n group: ',',\n decimal: '.',\n mmmm: _('जानेवारी;फेब्रुवारी;मार्च;एप्रिल;मे;जून;जुलै;ऑगस्ट;सप्टेंबर;ऑक्टोबर;नोव्हेंबर;डिसेंबर'),\n mmm: _('जाने;फेब्रु;मार्च;एप्रि;मे;जून;जुलै;ऑग;सप्टें;ऑक्टो;नोव्हें;डिसें'),\n dddd: _('रविवार;सोमवार;मंगळवार;बुधवार;गुरुवार;शुक्रवार;शनिवार'),\n ddd: _('रवि;सोम;मंगळ;बुध;गुरु;शुक्र;शनि')\n}, 'mr');\n\naddLocale(xm({\n group: ',',\n decimal: '.',\n mmmm: _('ဇန်နဝါရီ;ဖေဖော်ဝါရီ;မတ်;ဧပြီ;မေ;ဇွန်;ဇူလိုင်;ဩဂုတ်;စက်တင်ဘာ;အောက်တိုဘာ;နိုဝင်ဘာ;ဒီဇင်ဘာ'),\n mmm: _('ဇန်;ဖေ;မတ်;ဧ;မေ;ဇွန်;ဇူ;ဩ;စက်;အောက်;နို;ဒီ'),\n dddd: _('တနင်္ဂနွေ;တနင်္လာ;အင်္ဂါ;ဗုဒ္ဓဟူး;ကြာသပတေး;သောကြာ;စနေ'),\n ampm: _('နံနက်;ညနေ')\n}, -1, 0), 'my');\n\naddLocale({\n group: ',',\n decimal: '.',\n mmmm: _('ਜਨਵਰੀ;ਫ਼ਰਵਰੀ;ਮਾਰਚ;ਅਪ੍ਰੈਲ;ਮਈ;ਜੂਨ;ਜੁਲਾਈ;ਅਗਸਤ;ਸਤੰਬਰ;ਅਕਤੂਬਰ;ਨਵੰਬਰ;ਦਸੰਬਰ'),\n mmm: _('ਜਨ;ਫ਼ਰ;ਮਾਰਚ;ਅਪ੍ਰੈ;ਮਈ;ਜੂਨ;ਜੁਲਾ;ਅਗ;ਸਤੰ;ਅਕਤੂ;ਨਵੰ;ਦਸੰ'),\n dddd: _('ਐਤਵਾਰ;ਸੋਮਵਾਰ;ਮੰਗਲਵਾਰ;ਬੁੱਧਵਾਰ;ਵੀਰਵਾਰ;ਸ਼ੁੱਕਰਵਾਰ;ਸ਼ਨਿੱਚਰਵਾਰ'),\n ddd: _('ਐਤ;ਸੋਮ;ਮੰਗਲ;ਬੁੱਧ;ਵੀਰ;ਸ਼ੁੱਕਰ;ਸ਼ਨਿੱਚਰ'),\n ampm: _('ਪੂ.ਦੁ.;ਬਾ.ਦੁ.')\n}, 'pa');\n\naddLocale({\n group: '.',\n decimal: ',',\n mmmm: _('ianuarie;februarie;martie;aprilie;mai;iunie;iulie;august;septem~;octom~;noiem~;decem~', 'brie'),\n mmm: _('ian.;feb.;mar.;apr.;mai;iun.;iul.;aug.;sept.;oct.;nov.;dec.'),\n dddd: _('duminică;luni;marți;miercuri;joi;vineri;sâmbătă'),\n ddd: _('dum.;lun.;mar.;mie.;joi;vin.;sâm.'),\n ampm: _('a.m.;p.m.')\n}, 'ro');\n\naddLocale(xm({\n group: '.',\n decimal: ',',\n mmmm: _('januar;februar;marec;april;maj;junij;julij;avgust;september;oktober;november;december'),\n mmm: _('jan.;feb.;mar.;apr.;maj;jun.;jul.;avg.;sep.;okt.;nov.;dec.'),\n dddd: _('nedelja;ponedeljek;torek;sreda;četrtek;petek;sobota'),\n ampm: _('dop.;pop.')\n}, -1, 13), 'sl');\n\naddLocale(xm({\n group: '.',\n decimal: ',',\n mmmm: _('јануар;фебруар;март;април;мај;јун;јул;август;септембар;октобар;новембар;децембар'),\n dddd: _('недеља;понедељак;уторак;среда;четвртак;петак;субота')\n}, 3, 3), 'sr');\n\naddLocale({\n group: ',',\n decimal: '.',\n mmmm: _('ஜனவரி;பிப்ரவரி;மார்ச்;ஏப்ரல்;மே;ஜூன்;ஜூலை;ஆகஸ்ட்;செப்டம்பர்;அக்டோபர்;நவம்பர்;டிசம்பர்'),\n mmm: _('ஜன.;பிப்.;மார்.;ஏப்.;மே;ஜூன்;ஜூலை;ஆக.;செப்.;அக்.;நவ.;டிச.'),\n dddd: _('ஞாயிறு;திங்கள்;செவ்வாய்;புதன்;வியாழன்;வெள்ளி;சனி'),\n ddd: _('ஞாயி.;திங்.;செவ்.;புத.;வியா.;வெள்.;சனி')\n}, 'ta');\n\naddLocale({\n group: ',',\n decimal: '.',\n mmmm: _('జనవరి;ఫిబ్రవరి;మార్చి;ఏప్రిల్;మే;జూన్;జులై;ఆగస్టు;సెప్టెంబర్;అక్టోబర్;నవంబర్;డిసెంబర్'),\n mmm: _('జన;ఫిబ్ర;మార్చి;ఏప్రి;మే;జూన్;జులై;ఆగ;సెప్టెం;అక్టో;నవం;డిసెం'),\n dddd: _('ఆదివారం;సోమవారం;మంగళవారం;బుధవారం;గురువారం;శుక్రవారం;శనివారం'),\n ddd: _('ఆది;సోమ;మంగళ;బుధ;గురు;శుక్ర;శని')\n}, 'te');\n\naddLocale({\n decimal: ',',\n mmmm: _('січня;лютого;березня;квітня;травня;червня;липня;серпня;вересня;жовтня;листопада;грудня'),\n mmm: _('січ.;лют.;бер.;квіт.;трав.;черв.;лип.;серп.;вер.;жовт.;лист.;груд.'),\n dddd: _('неділю;понеділок;вівторок;середу;четвер;пʼятницю;суботу'),\n ddd: _('нд;пн;вт;ср;чт;пт;сб'),\n ampm: _('дп;пп')\n}, 'uk');\n\naddLocale({\n group: '.',\n decimal: ',',\n mmmm: _('~1;~2;~3;~4;~5;~6;~7;~8;~9;~10;~11;~12', 'tháng '),\n mmm: _('~1;~2;~3;~4;~5;~6;~7;~8;~9;~10;~11;~12', 'thg '),\n dddd: _('Chủ Nhật;Thứ Hai;Thứ Ba;Thứ Tư;Thứ Năm;Thứ Sáu;Thứ Bảy'),\n ddd: _('CN;Th 2;Th 3;Th 4;Th 5;Th 6;Th 7'),\n ampm: _('SA;CH')\n}, 'vi');\n\naddLocale(xm({\n group: '٬',\n decimal: '٫',\n ampm: _('ص;م'),\n mmmm: _('يناير;فبراير;مارس;أبريل;مايو;يونيو;يوليو;أغسطس;سبتمبر;أكتوبر;نوفمبر;ديسمبر'),\n dddd: _('الأحد;الاثنين;الثلاثاء;الأربعاء;الخميس;الجمعة;السبت'),\n mmmm6: _('رمضان;شوال;ذو القعدة;ذو الحجة;محرم;ربيع الأول;ربيع الآخرة;جمادى الأولى;جمادى الآخرة;رجب;شعبان;رمضان')\n}, 0, 0), 'ar');\n\naddLocale({\n group: ',',\n decimal: '.',\n mmmm: _('জানুয়ারী;ফেব্রুয়ারী;মার্চ;এপ্রিল;মে;জুন;জুলাই;আগস্ট;সেপ্টেম্বর;অক্টোবর;নভেম্বর;ডিসেম্বর'),\n mmm: _('জানু;ফেব;মার্চ;এপ্রি;মে;জুন;জুল;আগ;সেপ্টেঃ;অক্টোঃ;নভেঃ;ডিসেঃ'),\n dddd: _('রবিবার;সোমবার;মঙ্গলবার;বুধবার;বৃহস্পতিবার;শুক্রবার;শনিবার'),\n ddd: _('রবি;সোম;মঙ্গল;বুধ;বৃহস্পতি;শুক্র;শনি')\n}, 'bn');\n\naddLocale({\n group: ',',\n decimal: '.',\n mmmm: _('जनवरी;फ़रवरी;मार्च;अप्रैल;मई;जून;जुलाई;अगस्त;सितंबर;अक्तूबर;नवंबर;दिसंबर'),\n mmm: _('जन॰;फ़र॰;मार्च;अप्रैल;मई;जून;जुल॰;अग॰;सित॰;अक्तू॰;नव॰;दिस॰'),\n dddd: _('रविवार;सोमवार;मंगलवार;बुधवार;गुरुवार;शुक्रवार;शनिवार'),\n ddd: _('रवि;सोम;मंगल;बुध;गुरु;शुक्र;शनि'),\n ampm: _('am;pm')\n}, 'hi');\n","/** Options that control the behavior of the formatter. */\nexport type FormatOptions = {\n /**\n * The string emitted when a formatter fails to format a date that is out of bounds.\n * Both `dateErrorThrows` and `dateErrorNumber` override this setting.\n * @default '######'\n */\n overflow: string,\n\n /**\n * Should the formatter throw an error when trying to format a date that is out of bounds?\n * @default false\n */\n dateErrorThrows: boolean,\n\n /**\n * Should the formatter emit a number when trying to format a date that is out of bounds?\n * This is default behaviour by Google Sheets. `dateErrorThrows` overrides this setting.\n * @default true\n */\n dateErrorNumber: boolean,\n\n /**\n * Should the formatter switch to a plain string number format when trying to\n * format a bigint that is out of bounds of regular JS numbers?\n * @default false\n */\n bigintErrorNumber: boolean,\n\n /**\n * Extends the allowed range of dates from Excel bounds (1900–9999) to Google Sheet bounds (0–99999).\n * @default true\n */\n dateSpanLarge: boolean,\n\n /**\n * Simulate the Lotus 1-2-3 [1900 leap year bug](https://docs.microsoft.com/en-us/office/troubleshoot/excel/wrongly-assumes-1900-is-leap-year).\n * It is a requirement in the Ecma OOXML specification so it is on by default.\n * @default true\n */\n leap1900: boolean,\n\n /**\n * Emit regular vs. non-breaking spaces. By default the output will use a regular\n * space, but in many cases you may desire a non-breaking-space instead.\n * @default false\n */\n nbsp: boolean,\n\n /**\n * Should the formatter throw an error if a provided pattern is invalid.\n * If false, a formatter will be constructed which instead outputs an error\n * string (see _invalid_ in this table).\n * @default true\n */\n throws: boolean,\n\n /**\n * The string emitted when formatter fails to parse a pattern and has been instructed\n * not to throw an error.\n * @default '######'\n */\n invalid: string,\n\n /**\n * A BCP 47 string tag or Excel [MsoLanguageID](https://docs.microsoft.com/en-us/office/vba/api/office.msolanguageid). Locale default is english with a `\\u00a0`\n * grouping symbol (see [addLocale](#addLocale))\n * @default ''\n */\n locale: string | number,\n\n /**\n * Normally when date objects are used with the formatter, time zone is taken\n * into account and the date is adjusted into UTC. This option makes the formatter\n * ignore the timezone offset.\n * @default false\n */\n ignoreTimezone: boolean,\n\n /**\n * Integer grouping sizes. You may desire to emit numbers in standards other than the common 3 digits\n * per group (e.g. \"123,456,789\"). The first grouping size is used for the least significant integer\n * group, and the second grouping size is used for more significant groups (e.g. `[3, 2]` => \"12,34,56,789\").\n * @default [ 3 ]\n */\n grouping: [ number, number ] | [ number ],\n\n /**\n * Automatically resolve indexed colors to hex when outputting colors (red => #f00);\n * When indexed color modifiers are used (`[Color 1]`) the formatter will convert the index\n * into the corresponding hex color of the default palette. When this option is set to false,\n * the number will instead by emitted allowing you to index against a custom palette.\n * @default true\n */\n indexColors: boolean,\n\n /**\n * When the formatter encounters `_` it normally emits a single space instead\n * of the `_` and the next character (like Excel TEXT function does). Setting\n * this to a character will make the formatter emit that followed by the next\n * one.\n * @default ''\n */\n skipChar: string,\n\n /**\n * When the formatter encounters `*` it normally emits nothing instead of the\n * `*` and the next character (like Excel TEXT function does). Setting this\n * to a character will make the formatter emit that followed by the next one.\n * @default ''\n */\n fillChar: string,\n};\n\nexport const defaultOptions: FormatOptions = {\n overflow: '######',\n dateErrorThrows: false,\n dateErrorNumber: true,\n bigintErrorNumber: false,\n dateSpanLarge: true,\n leap1900: true,\n nbsp: false,\n throws: true,\n invalid: '######',\n locale: '',\n ignoreTimezone: false,\n grouping: [ 3, 3 ],\n indexColors: true,\n skipChar: '',\n fillChar: ''\n};\n","/**\n * Return a number rounded to the specified amount of places. This is the\n * rounding function used internally by the formatter (symmetric arithmetic\n * rounding). It rounds the same way Excel does.\n *\n * @param number The number to round.\n * @param [places] The number of decimals to round to.\n * @returns A rounded number.\n */\nexport function round (number: number, places: number = 0): number {\n if (typeof number !== 'number') {\n return NaN;\n }\n if (number < 0) {\n return -round(-number, places);\n }\n if (places) {\n const p = 10 ** (places) || 1;\n return round(number * p, 0) / p;\n }\n return Math.round(number);\n}\n","import { EPOCH_1317, EPOCH_1904 } from './constants.ts';\nconst floor = Math.floor;\n\n// https://www.codeproject.com/Articles/2750/Excel-Serial-Date-to-Day-Month-Year-and-Vice-Versa\nexport function toYMD_1900 (ord: number, leap1900 = true) {\n if (leap1900 && ord >= 0) {\n if (ord === 0) {\n return [ 1900, 1, 0 ];\n }\n if (ord === 60) {\n return [ 1900, 2, 29 ];\n }\n if (ord < 60) {\n return [ 1900, (ord < 32 ? 1 : 2), ((ord - 1) % 31) + 1 ];\n }\n }\n let l = ord + 68569 + 2415019;\n const n = floor((4 * l) / 146097);\n l = l - floor((146097 * n + 3) / 4);\n const i = floor((4000 * (l + 1)) / 1461001);\n l = l - floor((1461 * i) / 4) + 31;\n const j = floor((80 * l) / 2447);\n const nDay = l - floor((2447 * j) / 80);\n l = floor(j / 11);\n const nMonth = j + 2 - (12 * l);\n const nYear = 100 * (n - 49) + i + l;\n return [ nYear | 0, nMonth | 0, nDay | 0 ];\n}\n\nexport function toYMD_1904 (ord: number) {\n return toYMD_1900(ord + 1462);\n}\n\n// https://web.archive.org/web/20080209173858/https://www.microsoft.com/globaldev/DrIntl/columns/002/default.mspx\n// > [algorithm] is used in many Microsoft products, including all\n// > operating systems that support Arabic locales, Microsoft Office,\n// > COM, Visual Basic, VBA, and SQL Server 2000.\nexport function toYMD_1317 (ord: number) {\n if (ord === 60) {\n throw new Error('#VALUE!');\n }\n if (ord <= 1) {\n return [ 1317, 8, 29 ];\n }\n if (ord < 60) {\n return [ 1317, (ord < 32 ? 9 : 10), 1 + ((ord - 2) % 30) ];\n }\n const y = 10631 / 30;\n const shift1 = 8.01 / 60;\n let z = ord + 466935;\n const cyc = floor(z / 10631);\n z = z - 10631 * cyc;\n const j = floor((z - shift1) / y);\n z = z - floor(j * y + shift1);\n const m = floor((z + 28.5001) / 29.5);\n if (m === 13) {\n return [ 30 * cyc + j, 12, 30 ];\n }\n return [ 30 * cyc + j, m, z - floor(29.5001 * m - 29) ];\n}\n\nexport function toYMD (ord: number, system = 0, leap1900 = true) {\n const int = floor(ord);\n if (system === EPOCH_1317) {\n return toYMD_1317(int);\n }\n if (system === EPOCH_1904) {\n return toYMD_1904(int);\n }\n return toYMD_1900(int, leap1900);\n}\n","import { toYMD } from './toYMD.ts';\n\nconst floor = Math.floor;\nconst DAYSIZE = 86400;\n\n/**\n * Convert a native JavaScript Date, or an array of date parts to an spreadsheet serial date.\n *\n * Returns a serial date number if input was a Date object or an array of\n * numbers, else a null.\n *\n * ```js\n * // input as Date\n * dateToSerial(new Date(1978, 5, 17)); // 28627\n * // input as [ Y, M, D, h, m, s ]\n * dateToSerial([ 1978, 5, 17 ]); // 28627\n * // other input\n * dateToSerial(\"something else\"); // null\n * ```\n *\n * @param date A Date instance or an array of date parts in descending order.\n * @param [options={}] Options for this method\n * @param [options.ignoreTimezone]\n * Normally time zone will be taken into account. This makes the conversion to\n * serial date ignore the timezone offset.\n * @returns The date as a spreadsheet serial date, or undefined.\n */\nexport function dateToSerial (\n date: Date | number[],\n options?: { ignoreTimezone?: boolean; }\n): number | undefined {\n let ts = undefined;\n if (Array.isArray(date)) {\n const [ y, m, d, hh, mm, ss ] = date;\n ts = Date.UTC(y, m == null ? 0 : m - 1, d ?? 1, hh || 0, mm || 0, ss || 0);\n }\n // dates are changed to serial\n else if (date instanceof Date) {\n ts = date.valueOf();\n if (!options?.ignoreTimezone) {\n // Many timezones are offset in seconds but getTimezoneOffset() returns\n // time \"rounded\" to minutes so it is basically usable. 😿\n const dt = new Date();\n dt.setUTCFullYear(\n date.getFullYear(),\n date.getMonth(),\n date.getDate()\n );\n dt.setUTCHours(\n date.getHours(),\n date.getMinutes(),\n date.getSeconds(),\n date.getMilliseconds()\n );\n // timestamp\n ts = dt.valueOf();\n }\n }\n if (ts != null && isFinite(ts)) {\n const d = (ts / 864e5);\n return d - (d <= -25509 ? -25568 : -25569);\n }\n return;\n}\n\n/**\n * Convert a spreadsheet serial date to an array of date parts.\n * Accurate to a second.\n *\n * ```js\n * // output as [ Y, M, D, h, m, s ]\n * dateFromSerial(28627); // [ 1978, 5, 17, 0, 0, 0 ]\n * ```\n *\n * @param serialDate The date\n * @param [options] Options for this method\n * @param [options.leap1900]\n * Simulate the Lotus 1-2-3 [1900 leap year bug](https://docs.microsoft.com/en-us/office/troubleshoot/excel/wrongly-assumes-1900-is-leap-year).\n * True by default.\n * @returns returns an array of date parts with parts in descending order: [ year, month, day, hour, minute, second ]\n */\nexport function dateFromSerial (\n serialDate: number,\n options?: {\n leap1900?: boolean;\n }\n): [ number, number, number, number, number, number ] {\n let date = (serialDate | 0);\n const t = DAYSIZE * (serialDate - date);\n let time = floor(t); // in seconds\n // date \"epsilon\" correction\n if ((t - time) > 0.9999) {\n time += 1;\n if (time === DAYSIZE) {\n time = 0;\n date += 1;\n }\n }\n // serial date/time to gregorian calendar\n const x = (time < 0) ? DAYSIZE + time : time;\n const [ y, m, d ] = toYMD(serialDate, 0, options?.leap1900);\n const hh = floor((x / 60) / 60) % 60;\n const mm = floor(x / 60) % 60;\n const ss = floor(x) % 60;\n // return the parts\n return [ y, m, d, hh, mm, ss ];\n}\n","export function isValidDate (y: number, m: number, d: number) {\n // day can't be 0\n if (d < 1) {\n return false;\n }\n // month must be 1-12\n if (m < 1 || m > 12) {\n return false;\n }\n // february\n if (m === 2) {\n const isLeapYear = (((y % 4 === 0) && (y % 100 !== 0)) || (y % 400 === 0));\n // 1900 is a leap year in Excel\n const febDays = (isLeapYear || y === 1900) ? 29 : 28;\n if (d > febDays) {\n return false;\n }\n }\n // test any other month\n else if (\n ((m === 4 || m === 6 || m === 9 || m === 11) && d > 30) ||\n ((m === 1 || m === 3 || m === 5 || m === 7 || m === 8 || m === 10 || m === 12) && d > 31)) {\n return false;\n }\n return true;\n}\n","import { currencySymbols, reCurrencySymbols } from './constants.ts';\nimport { isValidDate } from './isValidDate.ts';\nimport { defaultLocale, getLocale } from './locale.ts';\n\n/**\n * Output from a number or date value parser.\n */\nexport type ParseDataNum = {\n /** A number value */\n v: number;\n /** A number format pattern */\n z?: string;\n};\n\n/**\n * Output from the boolean value parser.\n */\nexport type ParseDataBool = {\n /** A boolean value */\n v: boolean;\n /** A number format pattern */\n z?: string;\n};\n\ntype LData = {\n mon: [string, number, string][],\n mp: boolean,\n day: [string, number, string][],\n dp: boolean,\n locale?: string,\n};\n\n/*\nThis is a list of the allowed date formats. The test file contains\nthe full list of permuations and the resulting values and formats.\n\nLegend:\n \"-\" - Date separator (any of \"/\" | \"-\" | \" \" | \".\"⁽¹⁾ | \", \"⁽²⁾)\n \" \" - Whitespace\n \"j\" - Day without leading zero (1-31)\n \"d\" - Day with leading zero (00-31)\n \"D\" - Abbreviated day name (\"Sun\"-\"Sat\")\n \"l\" - Full day name (\"Sunday\"-\"Saturday\")\n \"n\" - Month without leading zero (1-12)\n \"m\" - Month with leading zero (01-12)\n \"F\" - Full month name (\"January\"-\"December\")\n \"M\" - Abbreviated month name (\"Jan\"-\"Dec\")\n \"y\" - Year without century (00-99)\n \"Y\" - Year of our lord (1900-9999)\n \"x\" - Time of day (all formats: \"10 PM\", \"10:11:12\", ...)\n \"!\" - Only use in \"date-first\" locales: 4.2.2000 = 4 feb.\n \"?\" - Only use in \"month-first\" locales: 2.4.2000 = 4 feb.\n\n¹ Only considered valid if there are three or more sections to the date.\n² Comma is only allowed if followed by a space.\n\nTime is appended to each of these as they are inserted into the\ncollection of valid dates below.\n*/\nconst okDateFormats = [\n // day-month-year\n '!d-m-y', '!d-m-Y', '!j-m-y', '!j-m-Y',\n '!d-n-y', '!d-n-Y', '!j-n-y', '!j-n-Y',\n // month-day-year\n '?m-d-y', '?m-d-Y', '?m-j-y', '?m-j-Y',\n '?n-d-y', '?n-d-Y', '?n-j-y', '?n-j-Y',\n // unab\n 'd-M-y', 'd-M-Y', 'j-M-y', 'j-M-Y',\n 'M-d-y', 'M-d-Y', 'M-j-y', 'M-j-Y',\n 'd-F-y', 'd-F-Y', 'F-d-y', 'F-d-Y',\n 'F-j-y', 'F-j-Y', 'j-F-y', 'j-F-Y',\n 'y-F-d', 'y-F-j', 'y-M-d', 'y-M-j',\n 'Y-F-d', 'Y-F-j', 'Y-M-d', 'Y-m-d',\n 'Y-M-j', 'Y-m-j', 'Y-n-d', 'Y-n-j',\n 'j-F', // 2-April\n 'j-M', // 2-Apr\n 'd-F', // 02-April\n 'd-M', // 02-Apr\n 'n-d', // 4-02\n 'n-j', // 4-2\n 'n-Y', // 4-1908\n 'm-d', // 04-02\n 'm-j', // 04-2\n 'm-Y', // 04-1908\n 'M-Y', // Apr-1908\n 'M-y', // Apr-08\n 'F-y', // April-08\n 'F-Y', // April-1908\n 'Y-M', // 1908-Apr\n 'Y-n', // 1908-4\n 'Y-m', // 1908-04\n 'Y-F', // 1908-April\n 'Y-M' // 1908-Apr\n];\n\n// letter to excel\nconst tx0: Record = { j: 'd', d: 'd', D: 'ddd', l: 'dddd', n: 'm', m: 'm', M: 'mmm', F: 'mmmm', y: 'yy', Y: 'yyyy' };\nconst tx00: Record = { j: 'dd', d: 'dd', D: 'ddd', l: 'dddd', n: 'mm', m: 'mm', M: 'mmm', F: 'mmmm', y: 'yy', Y: 'yyyy' };\n\n// date formats are stored as a token-tree in a trie\n// for minimal looping and branching while parsing\ntype DateTrieNode = { $?: number } & { [token: string]: DateTrieNode };\nconst dateTrieDM: DateTrieNode = {};\nconst dateTrieMD: DateTrieNode = {};\nfunction packDate (f: string, node: DateTrieNode, allowType = 1) {\n if (f) {\n const char = f[0];\n const next = f.slice(1);\n if (char === '!') {\n packDate(next, node, 4);\n }\n else if (char === '?') {\n packDate(next, node, 2);\n }\n else {\n node[char] = node[char] || {};\n packDate(next, node[char], allowType);\n }\n }\n else {\n node.$ = allowType;\n }\n}\nfunction addFormatToTrie (fmt: string, trie: DateTrieNode) {\n // add date to token tree\n packDate(fmt, trie);\n // add a variant of the date with time suffixed\n // Excel allows time first, but Sheets and GRID do not\n packDate(fmt + ' x', trie);\n // add a variant of the date with weekdays pre-/suffixed\n packDate(fmt + ' l', trie);\n packDate(fmt + ' l x', trie);\n packDate('l ' + fmt, trie);\n packDate('l ' + fmt + ' x', trie);\n packDate(fmt + ' D', trie);\n packDate(fmt + ' D x', trie);\n packDate('D ' + fmt, trie);\n packDate('D ' + fmt + ' x', trie);\n}\nokDateFormats.forEach(fmt => {\n if (!fmt.startsWith('?')) addFormatToTrie(fmt, dateTrieDM);\n if (!fmt.startsWith('!')) addFormatToTrie(fmt, dateTrieMD);\n});\n\nconst currentYear = new Date().getUTCFullYear();\n\nconst PT = '.';\nconst CM = ',';\nconst SP = ' ';\nconst NS = ' ';\nconst NN = ' ';\nconst AP = \"'\";\nconst AG = '٬';\nconst dec2group: Record = {\n '.': [ CM, NS, NN, AP, AG ],\n ',': [ PT, NS, NN, AP, AG ],\n '٫': [ PT, NS, NN, AP, AG ]\n};\nconst isDigit = (d: string) => d?.length === 1 && d >= '0' && d <= '9';\n\n/**\n * Parse a numeric string input and return its value and format. If the input\n * was not recognized or valid, the function returns a `undefined`, for valid input\n * it returns an object with two properties:\n *\n * * `v`: the parsed value.\n * * `z`: the number format of the input (if applicable).\n *\n * @param value The number to parse\n * @param [options] Options for the parser\n * @param [options.locale]\n * A BCP 47 string tag. Locale default is english with a `\\u00a0`\n * grouping symbol (see [addLocale](#addLocale))\n * @returns An object of the parsed value and a corresponding format string\n */\nexport function parseNumber (value: string, options: { locale?: string; } = {}): ParseDataNum | undefined {\n const l10n = getLocale(options.locale || '') || defaultLocale;\n // we base everything on the decimal separator\n const dec = l10n.decimal;\n // base allowed grouping chars on decimal\n const grp = [ ...(dec2group[dec] || [ AP, AG ]) ];\n if (!grp.includes(l10n.group) && l10n.group !== SP && l10n.group !== dec) {\n grp.push(l10n.group);\n }\n let num = '';\n let exp = '';\n let sign = 1;\n let format = '';\n let minus = false;\n let openParen = false;\n let closeParen = false;\n let percent = false;\n let currency = false;\n let currencySymbol = null;\n let currencyTrailing = false;\n let i = 0;\n // prefix\n const prefixChars = [ SP, NS, NN, '+', '%', '(', '-' ].concat(currencySymbols);\n while (prefixChars.includes(value[i])) {\n const char = value[i];\n if (char === '-') {\n if (minus || openParen) {\n return undefined;\n }\n minus = true;\n sign = -1;\n }\n else if (reCurrencySymbols.test(char)) {\n if (currency) {\n return undefined;\n }\n currency = true;\n currencySymbol = char;\n }\n else if (char === '(') {\n if (openParen || minus) {\n return undefined;\n }\n openParen = true;\n sign = -1;\n }\n else if (char === '%') {\n if (percent) {\n return undefined;\n }\n percent = true;\n }\n i++;\n }\n // number\n let haveDecimal = false;\n let g;\n if (value[i] === dec || isDigit(value[i])) {\n while (i < value.length) {\n const ch = value[i];\n // can maybe allow space as the grouping operator if we find that it is\n // immediately followed by a digit or decimal?\n if (!g && grp.includes(ch)) {\n g = ch;\n // skip\n }\n else if (g && g === ch) {\n // skip\n }\n else if (ch === dec) {\n if (haveDecimal) {\n break;\n }\n num += '.';\n haveDecimal = true;\n }\n else if (isDigit(ch)) {\n num += ch;\n }\n else {\n break;\n }\n i++;\n }\n }\n // exponent\n if (value[i] === 'e' || value[i] === 'E') {\n exp += value[i];\n i++;\n if (value[i] === '+' || value[i] === '-') {\n exp += value[i];\n i++;\n }\n const d = i;\n while (isDigit(value[i])) {\n exp += value[i];\n i++;\n }\n if (d === i) {\n // contains no digits\n return undefined;\n }\n }\n // suffix\n const suffixChars = [ SP, NS, NN, '%', '$', ')' ].concat(currencySymbols);\n while (suffixChars.includes(value[i])) {\n const char = value[i];\n // only 1 occurance of these is allowed\n if (reCurrencySymbols.test(char)) {\n if (currency) {\n return undefined;\n }\n currency = true;\n currencySymbol = char;\n currencyTrailing = true;\n }\n else if (char === ')') {\n if (closeParen || !openParen) {\n return undefined;\n }\n closeParen = true;\n }\n else if (char === '%') {\n if (percent) {\n return undefined;\n }\n percent = true;\n }\n i++;\n }\n\n if (i !== value.length) {\n return undefined;\n }\n\n // is number ok?\n let numberValue = parseFloat(num + exp);\n if (!isFinite(numberValue)) {\n return undefined;\n }\n\n if (exp) {\n if (percent || currency) {\n return undefined;\n }\n // allow parens and minus, but not %$\n format = '0.00E+00';\n }\n else if (percent) {\n if (currency) {\n // Sheets allows this: $123% => $1.23 (Excel does not)\n return undefined;\n }\n // numpart dictates how \"deep\" the format is: \"0\" vs \"0.00\"\n format = num.includes('.')\n ? '0.00%'\n : '0%';\n numberValue *= 0.01;\n }\n else if (currency) {\n // numpart dictates how \"deep\" the format is: \"0\" vs \"0.00\"\n const currencyFormat = num.includes('.')\n ? '#,##0.00'\n : '#,##0';\n if (currencyTrailing) {\n format = currencyFormat + currencySymbol;\n }\n else {\n format = currencySymbol + currencyFormat;\n }\n }\n else if (g) {\n format = num.includes('.')\n ? '#,##0.00'\n : '#,##0';\n }\n // we may want to lower the fidelity of the number: +num.toFixed(13)\n const ret: ParseDataNum = { v: numberValue * sign };\n if (format) {\n ret.z = format;\n }\n return ret;\n}\n\n// should really match { ’' } and all whitespace\nconst matchRec = (\n str: string,\n data: [ string, number, string ][],\n skipPeriod = false\n): [ string, [ string, number, string ] | null ] => {\n for (const item of data) {\n if (str.startsWith(item[0])) {\n // if the match is followed by a \".\" we'll skip it if the abbr. is by\n // convention abbreviated in the locale.\n let l = item[0].length;\n if (skipPeriod && (item[2] === 'D' || item[2] === 'M') && str[l] === '.') {\n l++;\n }\n return [ str.slice(0, l), item ];\n }\n }\n return [ '', null ];\n};\n\ntype DtData = {\n path?: string,\n sep?: string,\n day?: string,\n tf?: string,\n _mon?: string,\n month?: number,\n year?: number,\n time?: number,\n};\n\nconst nextToken = (str: string, node: DateTrieNode, data: DtData, lData: LData): DtData | undefined => {\n const path = data.path || '';\n const matchOrder = Object.keys(node);\n for (const t of matchOrder) {\n let r: DtData | undefined;\n if (!node[t]) {\n continue;\n }\n if (t === '$' || t === '€') {\n // if string is done, then we can return\n if (!str) {\n r = data;\n }\n }\n else if (t === '-') {\n const m = /^(\\s*([./-]|,\\s)\\s*|\\s+)/.exec(str);\n if (m) {\n const sep = (m[1] === '-' || m[1] === '/' || m[1] === '.') ? m[1] : ' ';\n // don't allow mixing date separators\n if (!data.sep || data.sep === sep) {\n const s = m[0].replace(/\\s+/g, ' ');\n r = nextToken(str.slice(m[0].length), node[t], { ...data, sep, path: path + s }, lData);\n }\n }\n }\n else if (t === ' ') {\n const m = /^[,.]?\\s+/.exec(str);\n if (m) {\n const s = m[0].replace(/\\s+/g, ' ');\n r = nextToken(str.slice(m[0].length), node[t], { ...data, path: path + s }, lData);\n }\n }\n else if (t === 'j' || t === 'd') {\n const m = /^(0?[1-9]|1\\d|2\\d|3[01])\\b/.exec(str);\n if (m) {\n r = nextToken(str.slice(m[0].length), node[t], { ...data, day: m[0], path: path + t }, lData);\n }\n }\n else if (t === 'n' || t === 'm') {\n const m = /^(0?[1-9]|1[012])\\b/.exec(str);\n if (m) {\n r = nextToken(str.slice(m[0].length), node[t], { ...data, month: +m[0], _mon: m[0], path: path + t }, lData);\n }\n }\n else if (t === 'F' || t === 'M') {\n const [ m, match ] = matchRec(str, lData.mon, lData.mp);\n if (match?.[2] === t) {\n r = nextToken(str.slice(m.length), node[t],\n { ...data, month: match[1], _mon: m, path: path + t }, lData);\n }\n }\n else if (t === 'l' || t === 'D') {\n const [ m, match ] = matchRec(str, lData.day, lData.dp);\n if (match?.[2] === t) {\n // the value is ignored\n r = nextToken(str.slice(m.length), node[t], { ...data, path: path + t }, lData);\n }\n }\n else if (t === 'y') {\n const m = /^\\d\\d\\b/.exec(str);\n if (m) {\n const y = (+m[0] >= 30) ? +m[0] + 1900 : +m[0] + 2000;\n r = nextToken(str.slice(m[0].length), node[t], { ...data, year: y, path: path + t }, lData);\n }\n }\n else if (t === 'Y') {\n const m = /^\\d\\d\\d\\d\\b/.exec(str);\n if (m) {\n r = nextToken(str.slice(m[0].length), node[t], { ...data, year: +m[0], path: path + t }, lData);\n }\n }\n else if (t === 'x') {\n const time = parseTime(str, { locale: lData.locale });\n if (time) {\n r = nextToken('', node[t], { ...data, time: time.v, tf: time.z, path: path + t }, lData);\n }\n }\n else {\n throw new Error(`Unknown date token \"${t}\"`);\n }\n if (r) {\n // reject invalid dates so we continue traversing the tree\n if (isValidDate(data.year || 1916, data.month || 1, data.day ? +data.day : 1)) {\n return r;\n }\n }\n }\n};\n\nconst normDateStr = (s: string): string => (\n s.replace(/\\s+/g, ' ').trim()\n .replace(/’/, \"'\")\n .replace(/\\.$/, '')\n .toLowerCase()\n);\n\nconst getLookups = (arr: string[], sym: string) => {\n const s: [ string, number, string ][] = arr.map((d, i) => [ normDateStr(d), i + 1, sym ]);\n s.sort((a, b) => b[0].length - a[0].length);\n return s;\n};\n\n/**\n * Parse a date or datetime string input and return its value and format. If\n * the input was not recognized or valid, the function returns an `undefined`, for\n * valid input it returns an object with two properties:\n *\n * - `v`: the parsed value.\n * - `z`: the number format of the input (if applicable).\n *\n * @param value The string to parse\n * @param [options={}] Options for the parser\n * @param [options.locale=\"\"]\n * A BCP 47 string tag. Locale default is english with a `\\u00a0`\n * grouping symbol (see [addLocale](#addLocale))\n * @returns An object of the parsed value and a corresponding format string\n */\nexport function parseDate (value: string, options: { locale?: string; } = {}): ParseDataNum | undefined {\n const l10n = getLocale(options.locale || '') || defaultLocale;\n const lData: LData = {\n mon: getLookups(l10n.mmmm, 'F').concat(getLookups(l10n.mmm, 'M')),\n mp: l10n.mmm[0].at(-1) === '.',\n day: getLookups(l10n.dddd, 'l').concat(getLookups(l10n.ddd, 'D')),\n dp: l10n.ddd[0].at(-1) === '.',\n locale: options.locale\n };\n // possible shortcut: quickly dismiss if there isn't a number?\n const date = nextToken(\n normDateStr(value),\n l10n.preferMDY ? dateTrieMD : dateTrieDM,\n { path: '' },\n lData\n );\n if (date) {\n // disallow matches where two tokens are separated by a period\n if (date.sep === '.' && date.path?.length === 3) {\n return undefined;\n }\n const year = +(date.year ?? currentYear);\n if (!date.day) {\n date.day = '1';\n }\n let epoch = -Infinity;\n if (year < 1900) {\n return undefined;\n }\n else if (year <= 1900 && (date.month ?? 0) <= 2) {\n epoch = 25568;\n }\n else if (year < 10000) {\n epoch = 25569;\n }\n const dateValue = (Date.UTC(year, (date.month ?? 1) - 1, +date.day) / 864e5) + epoch + (date.time || 0);\n if (dateValue >= 0 && dateValue <= 2958465) {\n const lead0 = (\n // either has a leading zero\n ((date._mon?.startsWith('0')) || date.day?.startsWith('0')) ||\n // both are 2-digits long\n (date._mon?.length === 2 && date.day.length === 2)\n );\n const format = (date.path ?? '').replace(/[jdlDnmMFyYx]/g, (a: string) => {\n if (a === 'x') {\n return date.tf || '';\n }\n return (lead0 ? tx00[a] : tx0[a]) || a;\n });\n return { v: dateValue, z: format };\n }\n }\n return undefined;\n}\n\nconst normAMPMStr = (s: string): string => (\n s.replace(/\\s+/g, '').trim()\n .replace(/\\./g, '')\n .toLowerCase()\n);\n\n/**\n * Parse a time string input and return its value and format. If the input was\n * not recognized or valid, the function returns a `undefined`, for valid input it\n * returns an object with two properties:\n *\n * - `v`: the parsed value.\n * - `z`: the number format of the input (if applicable).\n *\n * @param value The date to parse\n * @param [options] Options for the parser\n * @param [options.locale]\n * A BCP 47 string tag. Locale default is english with a `\\u00a0`\n * grouping symbol (see [addLocale](#addLocale))\n * @returns An object of the parsed value and a corresponding format string\n */\nexport function parseTime (value: string, options: { locale?: string; } = {}): ParseDataNum | undefined {\n const l10n = getLocale(options.locale || '') || defaultLocale;\n const parts = /^\\s*([10]?\\d|2[0-4])(?::([0-5]\\d|\\d))?(?::([0-5]\\d|\\d))?(\\.\\d{1,10})?(?=\\s*[^\\s\\d]|$)/.exec(value);\n let ampm = '';\n if (parts) {\n const tail = normAMPMStr(value.slice(parts[0].length));\n if (tail === normAMPMStr(l10n.ampm[0]) || tail === 'a' || tail === 'am') {\n ampm = 'a';\n }\n else if (tail === normAMPMStr(l10n.ampm[1]) || tail === 'p' || tail === 'pm') {\n ampm = 'p';\n }\n else if (tail === ':') {\n if (!parts[3]) {\n parts[3] = '0';\n }\n if (!parts[2]) {\n parts[2] = '0';\n }\n }\n else if (tail) {\n return undefined;\n }\n }\n if (parts) {\n const [ , h, m, s, f ] = parts;\n // don't allow milliseconds without seconds\n if (f && !s) {\n return undefined;\n }\n // single number must also include AM/PM part\n if (!ampm && !m && !s) {\n return undefined;\n }\n // AM/PM part must align with hours\n let hrs = +(h || 0) * 1;\n if (ampm) {\n if (hrs >= 13) {\n return undefined;\n }\n // 00:00 AM - 12:00 AM\n if (ampm === 'a') {\n if (hrs === 12) {\n hrs = 0;\n } // midnight\n }\n else if (ampm === 'p') {\n if (hrs !== 12) {\n hrs += 12;\n } // afternoon\n }\n }\n const min = +(m || 0) * 1;\n const sec = +(s || 0) * 1;\n const mss = +(f || 0) * 1;\n\n return {\n v: ((hrs * 60 * 60) + (min * 60) + sec + mss) / (60 * 60 * 24),\n z: (\n (h.length === 2 ? 'hh' : 'h') +\n ':mm' +\n (s ? ':ss' : '') +\n (ampm ? ' AM/PM' : '')\n )\n };\n }\n return undefined;\n}\n\n/**\n * Parse a string input and return its equivalent boolean value. If the input was not\n * recognized or valid, the function returns an `undefined`, for valid input it\n * returns an object with a single property:\n *\n * - `v`: the parsed value.\n *\n * @param value The supposed boolean to parse\n * @param [options] Options for the parser\n * @param [options.locale]\n * A BCP 47 string tag. Locale default is english with a `\\u00a0`\n * grouping symbol (see [addLocale](#addLocale))\n * @returns An object of the parsed value and a corresponding format string\n */\nexport function parseBool (value: string, options: { locale?: string; } = {}): ParseDataBool | undefined {\n const l10n = getLocale(options.locale || '') || defaultLocale;\n const v = value.trim().toLowerCase();\n const bT = l10n.bool[0].toLowerCase();\n if (v === 'true' || v === bT) {\n return { v: true };\n }\n const bF = l10n.bool[1].toLowerCase();\n if (v === 'false' || v === bF) {\n return { v: false };\n }\n return undefined;\n}\n\n/**\n * Attempt to parse a \"spreadsheet input\" string input and return its value and\n * format. If the input was not recognized or valid, the function returns an\n * `undefined`, for valid input it returns an object with two properties:\n *\n * - `v`: The parsed value. For dates, this will be an Excel style serial date.\n * - `z`: (Optionally) the number format string of the input. This property will\n * not be present if it amounts to the `General` format.\n *\n * `parseValue()` recognizes a wide range of dates and date-times, times,\n * numbers, and booleans. Some examples:\n *\n * ```js\n * // basic number\n * parseValue(\"-123\");// { v: -123 }\n * // formatted number\n * parseValue(\"$1,234\"); // { v: 1234, z: \"$#,##0\" }\n * // a percent\n * parseValue(\"12.3%\"); // { v: 0.123, z: \"0.00%\" }\n * // a date\n * parseValue(\"07 October 1984\"); // { v: 30962, z: 'dd mmmm yyyy' }\n * // an ISO formatted date-time\n * parseValue(\"1984-09-10 11:12:13.1234\"); // { v: 30935.46681855787, z: \"yyyy-mm-dd hh:mm:ss\" }\n * // a boolean\n * parseValue(\"false\"); // { v: false }\n * ```\n *\n * The formatting string outputted may not correspond exactly to the input.\n * Rather, is it composed of certain elements which the input controls. This is\n * comparable to how Microsoft Excel and Google Sheets parse pasted input. Some\n * things you may expect:\n *\n * - Whitespace is ignored.\n * - Decimal fractions are always represented by `.00` regardless of how many\n * digits were shown in the input.\n * - Negatives denoted by parentheses [`(1,234)`] will not include the\n * parentheses in the format string (the value will still be negative.)\n * - All \"scientific notation\" returns the same format: `0.00E+00`.\n *\n * Internally the parser calls, `parseNumber`, `parseDate`,\n * `parseTime` and `parseBool`. They work in the same way except\n * with a more limited scope. You may prefer those functions if you are limiting\n * input to a smaller scope.\n *\n * @param value The value to parse\n * @param [options] Options for the parser\n * @param [options.locale]\n * A BCP 47 string tag. Locale default is english with a `\\u00a0`\n * grouping symbol (see {@link addLocale})\n * @returns An object of the parsed value and a corresponding format string\n */\nexport function parseValue (value: string, options?: { locale?: string; }): ParseDataNum | ParseDataBool | undefined {\n return (\n parseNumber(value, options) ??\n parseDate(value, options) ??\n parseTime(value, options) ??\n parseBool(value, options)\n );\n}\n","import { EPOCH_1900 } from './constants.ts';\nimport type { Partition, RenderToken } from './types.ts';\n\nexport function createPartition (tokens?: RenderToken[]): Partition {\n return {\n scale: 1,\n percent: false,\n text: false,\n parens: false,\n fractions: false,\n grouping: false,\n exponential: false,\n integer: false,\n locale: '',\n pattern: '',\n int_max: 0,\n frac_max: 0,\n man_p: '',\n num_p: '',\n num_min: 0,\n den_min: 0,\n den_max: 0,\n date: 0,\n tokensUsed: 0,\n date_eval: false,\n date_system: EPOCH_1900,\n sec_decimals: 0,\n general: false,\n clock: 24,\n int_min: 0, // ??\n int_pattern: [],\n frac_pattern: [],\n man_pattern: [],\n den_pattern: [],\n num_pattern: [],\n tokens: tokens ?? [],\n den_p: '',\n int_p: '',\n denominator: 0\n };\n}\n","import { resolveLocale } from './locale.ts';\nimport {\n u_YEAR, u_MONTH, u_DAY, u_HOUR, u_MIN, u_SEC, u_DSEC, u_CSEC, u_MSEC,\n EPOCH_1900, EPOCH_1317,\n TOKEN_AMPM, TOKEN_BREAK, TOKEN_CALENDAR, TOKEN_CHAR, TOKEN_COLOR, TOKEN_COMMA, TOKEN_CONDITION,\n TOKEN_DATETIME, TOKEN_DBNUM, TOKEN_DIGIT, TOKEN_DURATION, TOKEN_ERROR, TOKEN_ESCAPED, TOKEN_EXP,\n TOKEN_FILL, TOKEN_GENERAL, TOKEN_GROUP, TOKEN_HASH, TOKEN_LOCALE, TOKEN_MINUS, TOKEN_NATNUM,\n TOKEN_PAREN, TOKEN_PERCENT, TOKEN_PLUS, TOKEN_POINT, TOKEN_QMARK, TOKEN_SCALE, TOKEN_SKIP,\n TOKEN_SLASH, TOKEN_SPACE, TOKEN_STRING, TOKEN_TEXT, TOKEN_ZERO, TOKEN_MODIFIER,\n T_TYPE_INT, T_TYPE_NUM, T_TYPE_DEN, T_TYPE_DIV, T_TYPE_FRAC, T_TYPE_MAN, T_TYPE_SUBSEC, T_TYPE_YEAR_S,\n T_TYPE_YEAR, T_TYPE_B_YEAR_S, T_TYPE_B_YEAR, T_TYPE_DAY, T_TYPE_WEEKDAY_S, T_TYPE_WEEKDAY, T_TYPE_HOUR,\n T_TYPE_MNAME_S, T_TYPE_MNAME_1, T_TYPE_MNAME, T_TYPE_MIN, T_TYPE_MON, T_TYPE_HOUR_E, T_TYPE_MIN_E,\n T_TYPE_SEC_E, T_TYPE_SEC\n} from './constants.ts';\nimport type { DateRenderToken, Token, RenderToken, SectionType } from './types.ts';\nimport { createPartition } from './createPartition.ts';\n\nfunction add (s: string | RenderToken, tokens: RenderToken[]): void {\n // allow adding string tokens without wrapping\n if (typeof s === 'string') {\n tokens.push({ type: TOKEN_STRING, value: s });\n }\n else {\n tokens.push(s);\n }\n}\n\nconst countNonHash = (s: string): number => {\n let n = 0;\n for (let i = 0; i < s.length; i++) {\n if (s.charCodeAt(i) !== 35) {\n n++;\n }\n }\n return n;\n};\n\nfunction isNumOp (token: Token | RenderToken, activePattern: SectionType) {\n const type = token?.type;\n return (\n (type === TOKEN_HASH || type === TOKEN_ZERO || type === TOKEN_QMARK) ||\n (type === TOKEN_DIGIT && activePattern === T_TYPE_DEN)\n );\n}\n\nexport function parseFormatSection (inputTokens: Token[]) {\n const outputTokens: RenderToken[] = [];\n const part = createPartition(outputTokens);\n\n let currentPattern: SectionType = T_TYPE_INT; // 'num' is unused here?\n let lastNumberChunk: RenderToken | undefined;\n const dateChunks: DateRenderToken[] = [];\n let last: Token | undefined;\n let haveLocale = false;\n\n let index = -1;\n let partOver = false;\n let patternSource = '';\n let haveSlash = false;\n\n const getPattern = (p: SectionType) => {\n if (p === T_TYPE_DEN) { return part.den_pattern; }\n if (p === T_TYPE_INT) { return part.int_pattern; }\n if (p === T_TYPE_FRAC) { return part.frac_pattern; }\n if (p === T_TYPE_MAN) { return part.man_pattern; }\n return [];\n };\n\n while (++index < inputTokens.length && !partOver) {\n const token = inputTokens[index];\n const type = token.type || TOKEN_ERROR;\n patternSource += token.raw;\n\n if (type === TOKEN_GENERAL) {\n part.general = true;\n add({ type }, outputTokens);\n }\n\n // new partition\n else if (isNumOp(token, currentPattern)) {\n const pt = getPattern(currentPattern);\n if (last && (isNumOp(last, currentPattern) || last.type === TOKEN_GROUP)) {\n // append to current\n pt.push((pt.pop() || '') + token.value);\n if (lastNumberChunk && 'num' in lastNumberChunk) {\n lastNumberChunk.num += token.value;\n }\n }\n else {\n // new number section\n pt.push(token.value);\n lastNumberChunk = { type: currentPattern, num: token.value };\n add(lastNumberChunk!, outputTokens);\n }\n }\n\n else if (type === TOKEN_PAREN) {\n if (token.value === '(') {\n part.parens = true;\n }\n add(token.value, outputTokens);\n }\n else if (type === TOKEN_DIGIT) {\n // just print it\n add(token.value, outputTokens);\n }\n\n // vulgar fractions\n else if (type === TOKEN_SLASH) {\n haveSlash = true;\n const pt = getPattern(currentPattern);\n if (pt.length) {\n if (!lastNumberChunk) { // need to have a numerator present\n throw new SyntaxError('Format pattern is missing a numerator');\n }\n part.fractions = true;\n // ... we just passed the numerator - correct that item\n const xx = pt.pop()!;\n part.num_pattern.push(xx);\n lastNumberChunk.type = T_TYPE_NUM;\n // next up... the denominator\n currentPattern = T_TYPE_DEN;\n add({ type: T_TYPE_DIV }, outputTokens);\n }\n else {\n add(token.value, outputTokens);\n }\n }\n\n else if (type === TOKEN_COMMA) {\n add(',', outputTokens);\n }\n else if (type === TOKEN_SCALE) {\n part.scale = 0.001 ** token.raw.length;\n }\n else if (type === TOKEN_GROUP) {\n if (currentPattern === T_TYPE_INT) {\n part.grouping = true;\n }\n if (currentPattern === T_TYPE_DEN) {\n throw new SyntaxError('Cannot group denominator digits');\n }\n // else we just ignore it!\n }\n\n else if (type === TOKEN_SPACE) {\n add({ type }, outputTokens);\n }\n\n else if (type === TOKEN_BREAK) {\n partOver = true;\n break; // leave the \";\" hanging\n }\n\n else if (type === TOKEN_TEXT) { // @\n part.text = true;\n add({ type, value: token.value }, outputTokens);\n }\n else if (type === TOKEN_PLUS || type === TOKEN_MINUS) {\n add({ type }, outputTokens);\n }\n\n // [h] [m] [s]\n // else if ((m = /^(?:\\[(h+|m+|s+)\\])/i.exec(s))) {\n else if (type === TOKEN_DURATION) {\n const tokenValue = token.value.toLowerCase(); // deal with in tokenizer\n const startsWith = tokenValue[0];\n let bit: RenderToken;\n if (startsWith === 'h') {\n bit = { type: T_TYPE_HOUR_E, size: u_HOUR, pad: tokenValue.length };\n }\n else if (startsWith === 'm') {\n bit = { type: T_TYPE_MIN_E, size: u_MIN, pad: tokenValue.length };\n }\n else {\n bit = { type: T_TYPE_SEC_E, size: u_SEC, pad: tokenValue.length };\n }\n // signal date calc and track smallest needed unit\n part.date = part.date | bit.size;\n dateChunks.push(bit);\n add(bit, outputTokens);\n }\n // Note: In locales where decimal symbol is set to \",\" Excel will expect\n // \",\" rather than a \".\". This must be solved by re-localizing the\n // pattern before using it.\n // .0 .00 .000\n else if (part.date && type === TOKEN_POINT && inputTokens[index + 1]?.type === TOKEN_ZERO) {\n let dec = 1;\n index++;\n let raw = '0';\n if (inputTokens[index + 1]?.type === TOKEN_ZERO) {\n raw += '0';\n dec = 2;\n index++;\n }\n if (inputTokens[index + 1]?.type === TOKEN_ZERO) {\n raw += '0';\n dec = 3;\n index++;\n }\n patternSource += raw;\n const size = [ u_SEC, u_DSEC, u_CSEC, u_MSEC ][dec];\n part.date = part.date | size;\n part.date_eval = true;\n part.sec_decimals = Math.max(part.sec_decimals, dec);\n add({ type: T_TYPE_SUBSEC, size: size, decimals: dec }, outputTokens);\n }\n\n else if (type === TOKEN_CALENDAR) {\n // signal date system (ignored if defined with [$-xxx])\n if (!haveLocale) {\n // Use Hijri calendar system\n if (token.value === 'B2' || token.value === 'b2') {\n // TODO: B2 does more than this\n // it switches locale to [$-060401] (ar) which affects display (RTL)\n part.date_system = EPOCH_1317;\n }\n // Use Gregorian calendar system\n else { // B1 | b1\n // signal date system (ignored if defined with [$-xxx])\n part.date_system = EPOCH_1900;\n }\n }\n }\n\n // hh:mm:ss YYYY-MM-DD\n else if (type === TOKEN_DATETIME) {\n // Excel is \"mostly\" case insensitive here except it checks the last used\n // date token. Which, if it was s or h, minutes is used. The same is true\n // if we hit m or s, and last is m.\n // m and mm are spurious, mmm is always month\n let bit: DateRenderToken | undefined;\n const value = token.value.toLowerCase(); // deal with in tokenizer?\n const startsWith = value[0];\n if (value === 'y' || value === 'yy') {\n bit = { type: T_TYPE_YEAR_S, size: u_YEAR };\n }\n else if (startsWith === 'y' || startsWith === 'e') {\n bit = { type: T_TYPE_YEAR, size: u_YEAR };\n }\n else if (value === 'b' || value === 'bb') {\n bit = { type: T_TYPE_B_YEAR_S, size: u_YEAR };\n }\n else if (startsWith === 'b') {\n bit = { type: T_TYPE_B_YEAR, size: u_YEAR };\n }\n else if (value === 'd' || value === 'dd') {\n bit = { type: T_TYPE_DAY, size: u_DAY, pad: value === 'dd' };\n }\n else if (value === 'ddd' || value === 'aaa') {\n bit = { type: T_TYPE_WEEKDAY_S, size: u_DAY };\n }\n else if (startsWith === 'd' || startsWith === 'a') {\n bit = { type: T_TYPE_WEEKDAY, size: u_DAY };\n }\n else if (startsWith === 'h') {\n bit = { type: T_TYPE_HOUR, size: u_HOUR, pad: value.length > 1 };\n }\n else if (startsWith === 'm') {\n if (value.length === 3) {\n bit = { type: T_TYPE_MNAME_S, size: u_MONTH };\n }\n else if (value.length === 5) {\n bit = { type: T_TYPE_MNAME_1, size: u_MONTH };\n }\n else if (value.length >= 4) {\n bit = { type: T_TYPE_MNAME, size: u_MONTH };\n }\n // m or mm can be either minute or month based on context\n const last_date_chunk = dateChunks[dateChunks.length - 1];\n if (!bit && last_date_chunk && !last_date_chunk.used && (last_date_chunk.size & (u_HOUR | u_SEC))) {\n // if this value follows hour or second, it is a minute\n last_date_chunk.used = true;\n bit = { type: T_TYPE_MIN, size: u_MIN, pad: value.length > 1 };\n }\n // if we still don't know, we treat as a month and defer, a later 'sec' value may switch it\n if (!bit) {\n bit = { type: T_TYPE_MON, size: u_MONTH, pad: value.length > 1, indeterminate: true };\n }\n }\n else if (startsWith === 's') {\n bit = { type: T_TYPE_SEC, size: u_SEC, pad: value.length > 1 };\n // if last date chunk was m, flag this used\n const last_date_chunk = dateChunks[dateChunks.length - 1];\n if (last_date_chunk && last_date_chunk.size & u_MIN) {\n bit.used = true;\n }\n // if last date chunk is undecided, we know that it is a minute\n else if (last_date_chunk && 'indeterminate' in last_date_chunk) {\n delete last_date_chunk.indeterminate;\n last_date_chunk.size = u_MIN;\n last_date_chunk.type = T_TYPE_MIN;\n bit.used = true;\n }\n }\n else if (startsWith === 'g') {\n // TODO: Don't know what this does? (yet!)\n }\n if (bit) {\n // signal date calc and track smallest needed unit\n part.date = part.date | bit.size;\n part.date_eval = true;\n dateChunks.push(bit);\n add(bit, outputTokens);\n }\n }\n\n // AM/PM\n // See: https://github.com/SheetJS/sheetjs/issues/676\n else if (type === TOKEN_AMPM) {\n part.clock = 12;\n part.date = part.date | u_HOUR;\n part.date_eval = true;\n add({ type, short: token.value === 'A/P' }, outputTokens);\n }\n\n // escaped character, string\n else if (type === TOKEN_STRING || type === TOKEN_ESCAPED || type === TOKEN_CHAR) {\n add(token.value, outputTokens);\n }\n\n // condition\n else if (type === TOKEN_CONDITION) {\n part.condition = [\n token.value[0], // operator\n parseFloat(token.value[1]) // operand\n ];\n }\n\n // locale code -- we extend to allow std. \"en-US\" style codes\n // https://stackoverflow.com/questions/54134729/what-does-the-130000-in-excel-locale-code-130000-mean/54540455#54540455\n else if (type === TOKEN_LOCALE) {\n const bits = token.value.split('-');\n const code = bits.length < 2 ? '' : bits.slice(1).join('-');\n\n const currency = bits[0];\n if (currency) {\n add(currency, outputTokens);\n }\n\n const l4e = resolveLocale(code);\n if (l4e) { part.locale = l4e; }\n const wincode = parseInt(code, 16);\n if (isFinite(wincode) && (wincode & 0xff0000)) {\n const cal = (wincode >> 16) & 0xff;\n // only Hijri is supported atm.\n if (cal === 6) {\n part.date_system = EPOCH_1317;\n }\n }\n\n haveLocale = true; // ignore any B2 & B1 tokens\n }\n\n // color\n else if (type === TOKEN_COLOR) {\n let cm: RegExpExecArray | null;\n let v = token.value.toLowerCase();\n if ((cm = /^color\\s*(\\d+)$/i.exec(v))) {\n v = parseInt(cm[1], 10);\n }\n part.color = v;\n }\n\n // percentage\n else if (type === TOKEN_PERCENT) {\n part.scale = 100;\n part.percent = true;\n add('%', outputTokens);\n }\n\n // decimal fraction\n else if (type === TOKEN_POINT) {\n add({ type, value: token.value }, outputTokens);\n if (!part.date) {\n part.dec_fractions = true;\n currentPattern = T_TYPE_FRAC;\n }\n }\n\n // exponent\n else if (type === TOKEN_EXP) {\n // Exponent pattern requires symbol to directly follow \"E\" but the\n // signature symbol, however, prefixes the first digit of the mantissa\n part.exponential = true;\n const plus = token.value.includes('+');\n part.exp_plus = plus;\n currentPattern = T_TYPE_MAN;\n add({ type: TOKEN_EXP, plus }, outputTokens);\n }\n\n // skip width\n else if (type === TOKEN_SKIP) {\n add({ type, value: token.value }, outputTokens);\n }\n\n // fill space with next char\n else if (type === TOKEN_FILL) {\n add({ type, value: token.value }, outputTokens);\n }\n\n else if (type === TOKEN_DBNUM) {\n // UNSUPPORTED:\n // - DBNum1 = NatNum4\n // - DBNum2 = NatNum5\n // - DBNum3 = either NatNum6 or NatNum3?\n // - DBNum3 = NatNum10\n const n = parseInt(token.value.slice(5));\n if (n < 1 || n > 4) {\n throw new SyntaxError('Unknown modifier: ' + token.value);\n }\n }\n\n else if (type === TOKEN_NATNUM) {\n // NatNum: https://www.openoffice.org/api/docs/common/ref/com/sun/star/i18n/NativeNumberMode.html\n throw new SyntaxError('Unknown modifier: ' + token.value);\n }\n\n else if (type === TOKEN_MODIFIER) {\n throw new SyntaxError('Unknown modifier: ' + token.value);\n }\n\n else if (type === TOKEN_ERROR) {\n throw new SyntaxError(`Illegal character: ${patternSource}`);\n }\n\n else {\n throw new SyntaxError(`Unknown token ${type} in ${patternSource}`);\n }\n\n // advance parser\n last = token;\n }\n part.tokensUsed = index;\n part.pattern = patternSource;\n\n // Make sure we don't have an illegal pattern. We could support some of this\n // but we side with Excel and don't because they make no sense.\n if (\n (part.fractions && part.dec_fractions) ||\n (part.grouping && !part.int_pattern.length) ||\n (part.fractions && part.exponential) ||\n (part.fractions && (part.den_pattern.length * part.num_pattern.length) === 0) ||\n (haveSlash && !part.fractions && !part.date) ||\n (part.exponential && ((part.int_pattern.length || part.frac_pattern.length) * part.man_pattern.length) === 0)\n ) {\n throw new SyntaxError(`Invalid pattern: ${patternSource}`);\n }\n\n const intPattern = part.int_pattern.join('');\n const manPattern = part.man_pattern.join('');\n const fracPattern = part.frac_pattern.join('');\n part.int_max = intPattern.length;\n part.int_min = countNonHash(intPattern);\n\n let min = 0;\n for (let i = 0; i < intPattern.length; i++) {\n const ch = intPattern[intPattern.length - 1 - i];\n if (/^[0-9?]/.test(ch)) {\n min = i + 1;\n }\n }\n part.int_min = min;\n part.frac_max = fracPattern.length;\n\n let num_pat = part.num_pattern.join('');\n // let den_pat = part.den_pattern.join('');\n let den_pat = part.den_pattern[0] || '';\n const enforce_padded = den_pat.includes('?') || num_pat.includes('?');\n // numerical denominator padding type is inherited from numerator padding type\n if (enforce_padded) {\n den_pat = den_pat.replace(/\\d/g, '?');\n den_pat = den_pat.replace(/#$/g, '?');\n part.num_min = countNonHash(num_pat);\n part.den_max = den_pat.length;\n part.den_min = countNonHash(den_pat);\n num_pat = num_pat.replace(/#$/g, '?');\n }\n else {\n part.num_min = countNonHash(num_pat);\n part.den_max = den_pat.length;\n part.den_min = countNonHash(den_pat);\n }\n\n part.int_p = intPattern;\n part.man_p = manPattern;\n part.num_p = num_pat;\n part.den_p = den_pat;\n\n if (part.den_pattern.length) {\n // detect and set rounding factor for denominator\n part.denominator = parseInt(part.den_pattern.join('').replace(/\\D/g, ''), 10);\n }\n\n part.integer = !!intPattern.length;\n\n if (!part.integer && !part.exponential && fracPattern.length) {\n // if no integer has been found, we inject one\n const pointIdx = part.tokens.findIndex(d => d.type === TOKEN_POINT);\n part.tokens.splice(pointIdx, 0, { type: T_TYPE_INT, num: '#' });\n part.integer = true;\n part.int_pattern = [ '#' ];\n part.int_p = '#';\n }\n\n // empty token list means that this is likely a directive only pattern (`[black]`)\n // in which case we need to inject a general token\n if (!part.tokens.length && /^\\[(?!\\$)/.test(part.pattern)) {\n part.general = true;\n add({ type: TOKEN_GENERAL }, outputTokens);\n }\n\n // extra whitespace rules for vulgar fractions\n if (part.fractions) {\n // fragment bits affect surrounding whitespace\n // if either bit is \"#\", the whitespace around it, and\n // the div symbol, is removed if the bit is not shown\n for (let i = 0; i < outputTokens.length - 1; i++) {\n const tok = outputTokens[i];\n if (tok.type !== TOKEN_STRING && tok.type !== TOKEN_SPACE) {\n continue;\n }\n const nextType = outputTokens[i + 1].type;\n if (nextType === T_TYPE_NUM) {\n tok.rule = 'num+int';\n }\n else if (nextType === T_TYPE_DIV) {\n tok.rule = 'num';\n }\n else if (nextType === T_TYPE_DEN) {\n tok.rule = 'den';\n }\n }\n }\n\n // if the number is fragmented, grouping should not be applied\n if (part.grouping) {\n if (part.int_pattern.length > 1) {\n part.grouping = false;\n }\n }\n\n return part;\n}\n","export function clamp (num: number): number {\n if (num === 0) {\n return num;\n }\n const d = Math.ceil(Math.log10(num < 0 ? -num : num));\n const mag = 10 ** (16 - Math.floor(d));\n return isFinite(mag) ? Math.round(num * mag) / mag : 0;\n}\n","// https://web.archive.org/web/20110813042636/http://homepage.smc.edu/kennedy_john/DEC2FRAC.PDF\nconst PRECISION = 1e-13;\n\n/**\n * Split a fractional number into a numerator and denominator for display as\n * vulgar fractions.\n *\n * @internal\n * @param number The value to split\n * @param [numeratorMaxDigits=2] The maxdigits number\n * @param [denominatorMaxDigits=2] The maxdigits de\n * @returns Tuple of two numbers, numerator and denominator.\n */\nexport function dec2frac (\n number: number,\n numeratorMaxDigits: number = 2,\n denominatorMaxDigits: number = 2\n): [ number, number ] {\n const sign = (number < 0) ? -1 : 1;\n const maxdigits_n = 10 ** (numeratorMaxDigits || 2);\n const maxdigits_d = 10 ** (denominatorMaxDigits || 2);\n let z = Math.abs(number);\n let last_d = 0;\n let last_n = 0;\n let curr_n = 0;\n let curr_d = 1;\n let tmp: number;\n let r: [ number, number ];\n number = z;\n if (number % 1 === 0) {\n // handles exact integers including 0\n r = [ number * sign, 1 ];\n }\n else if (number < 1e-19) {\n r = [ sign, 1e+19 ];\n }\n else if (number > 1e+19) {\n r = [ 1e+19 * sign, 1 ];\n }\n else {\n do {\n z = 1 / (z - Math.floor(z));\n tmp = curr_d;\n curr_d = (curr_d * Math.floor(z)) + last_d;\n last_d = tmp;\n last_n = curr_n;\n curr_n = Math.floor(number * curr_d + 0.5); // round\n if (curr_n >= maxdigits_n || curr_d >= maxdigits_d) {\n return [ sign * last_n, last_d ];\n }\n }\n while (Math.abs(number - (curr_n / curr_d)) >= PRECISION && z !== Math.floor(z));\n r = [ sign * curr_n, curr_d ];\n }\n return r;\n}\n","export function getExponent (num: number, int_max = 0): number {\n const exp = Math.floor(Math.log10(num));\n return (int_max > 1)\n ? Math.floor(exp / int_max) * int_max\n : exp;\n}\n\nexport function getSignificand (n: number, exp = 1): number {\n if (exp < -300) {\n return parseFloat(n.toExponential().split('e')[0]);\n }\n return n * (10 ** -exp);\n}\n","import { round } from './round.ts';\n\nexport type NumInfo = {\n total: number,\n sign: number,\n digits: number,\n period: number,\n int: number,\n frac: number\n};\n\nconst zero: NumInfo = {\n total: 1,\n sign: 0,\n digits: 1,\n period: 0,\n int: 1,\n frac: 0\n};\n\n// returns the count of digits (including - and .) needed to represent the number\nexport default function numdec (value: number, incl_sign = true): NumInfo {\n const v = Math.abs(value);\n\n // shortcut zero\n if (!v) { return zero; }\n\n const signSize = (incl_sign && value < 0) ? 1 : 0;\n const intPart = Math.floor(v);\n const intSize = Math.floor(Math.log10(v) + 1);\n let periodSize = 0;\n let fracSize = 0;\n\n // is not an integer\n if (intPart !== v) {\n periodSize = 1;\n\n // B: this has turned out to be much faster than all pure math\n // based solutions I was able to come up with ¯\\_(ツ)_/¯\n const n = String(\n round(v * (10 ** -intSize), 15)\n );\n let f = n.length;\n let z = true;\n let i = 0;\n while (i <= n.length) {\n if (n[i] === '.') {\n // discount period\n f--;\n break;\n }\n else if (n[i] === '0' && z) {\n // leading zeros before period are discounted\n f--;\n }\n else {\n // non-zero digit\n z = false;\n }\n i++;\n }\n fracSize = f - intSize;\n\n if (fracSize < 0) {\n // the number is not representable [by Excel]\n // this would be something like 1000.0000000000001\n // it would normally get truncated to 15 significant figures and\n // end up in the same place as the following does:\n fracSize = 0;\n periodSize = 0;\n }\n }\n\n return {\n total: signSize + Math.max(intSize, 1) + periodSize + fracSize,\n digits: Math.max(intSize, 0) + fracSize,\n sign: signSize,\n period: periodSize,\n int: Math.max(intSize, 1),\n frac: fracSize\n };\n}\n","import type { LocaleData } from './locale.ts';\nimport { getExponent, getSignificand } from './numberProps.ts';\nimport numdec from './numdec.ts';\nimport { round } from './round.ts';\n\nconst fixLocale = (s: string, l10n: LocaleData): string => {\n return s.replace(/\\./, l10n.decimal);\n};\n\nconst getExp = (n: number, exp: number, l10n: LocaleData): [ string, string, string, string, number ] => {\n const x = Math.abs(exp);\n let m: number;\n if (n === 1) {\n m = n;\n }\n else {\n m = round(n, 5);\n }\n return [\n fixLocale(m + '', l10n),\n l10n.exponent,\n (exp < 0 ? l10n.negative : l10n.positive),\n x < 10 ? '0' : '',\n x\n ];\n};\n\nexport function general (ret: (string | number)[], value: number | string, l10n: LocaleData) {\n if (typeof value === 'string') {\n // special case for: [<-25]General;[>25]General;General;General\n ret.push(value);\n }\n else {\n const int = value | 0;\n if (value === int) {\n ret.push(Math.abs(int));\n }\n else {\n const v = Math.abs(value);\n let exp = getExponent(v);\n let n = getSignificand(v, exp);\n if (n === 10) {\n n = 1;\n exp++;\n }\n\n // The application shall attempt to display the full number\n // up to 11 digits (inc. decimal point).\n const num_dig = numdec(v);\n if (exp >= -4 && exp <= -1) {\n const o = v.toPrecision(10 + exp).replace(/\\.?0+$/, '');\n ret.push(fixLocale(o, l10n));\n }\n else if (exp === 10) {\n const o = v.toFixed(10)\n .slice(0, 12)\n .replace(/\\.$/, '');\n ret.push(fixLocale(o, l10n));\n }\n else if (Math.abs(exp) <= 9) {\n if (num_dig.total <= 11) {\n const o = round(v, 9).toFixed(num_dig.frac);\n ret.push(fixLocale(o, l10n));\n }\n else if (exp === 9) {\n ret.push(Math.floor(v));\n }\n else if (exp >= 0 && exp < 9) {\n ret.push(fixLocale(String(round(v, 9 - exp)), l10n));\n }\n else {\n ret.push(...getExp(n, exp, l10n));\n }\n }\n else if (num_dig.total >= 12) {\n ret.push(...getExp(n, exp, l10n));\n }\n else {\n ret.push(fixLocale(round(v, 9).toFixed(num_dig.frac), l10n));\n }\n }\n }\n\n return ret;\n}\n","/**\n * @internal\n * @param c Instruction character ('#' | '?' | '0')\n * @param Use nonbreaking space or not?\n * @returns Padding character\n */\nexport function pad (c: string, nbsp = false): string {\n if (c === '0') {\n return '0';\n }\n else if (c === '?') {\n return nbsp ? '\\u00a0' : ' ';\n }\n return '';\n}\n","import { round } from './round.ts';\nimport { clamp } from './clamp.ts';\nimport { dec2frac } from './dec2frac.ts';\nimport { general } from './general.ts';\nimport { toYMD } from './toYMD.ts';\nimport { defaultLocale, type LocaleData } from './locale.ts';\nimport {\n u_DSEC, u_CSEC, u_MSEC,\n EPOCH_1317,\n MIN_S_DATE, MAX_S_DATE,\n MIN_L_DATE, MAX_L_DATE,\n TOKEN_STRING,\n TOKEN_SPACE,\n TOKEN_POINT,\n TOKEN_ERROR,\n TOKEN_GENERAL,\n TOKEN_EXP,\n TOKEN_MINUS,\n TOKEN_PLUS,\n TOKEN_SKIP,\n TOKEN_FILL,\n TOKEN_TEXT,\n T_TYPE_DIV,\n T_TYPE_INT,\n T_TYPE_FRAC,\n T_TYPE_NUM,\n T_TYPE_DEN,\n T_TYPE_MAN,\n TOKEN_AMPM,\n T_TYPE_YEAR,\n T_TYPE_YEAR_S,\n T_TYPE_MON,\n T_TYPE_MNAME_1,\n T_TYPE_MNAME_S,\n T_TYPE_MNAME,\n T_TYPE_WEEKDAY_S,\n T_TYPE_WEEKDAY,\n T_TYPE_DAY,\n T_TYPE_HOUR,\n T_TYPE_MIN,\n T_TYPE_SEC,\n T_TYPE_SUBSEC,\n T_TYPE_HOUR_E,\n T_TYPE_MIN_E,\n T_TYPE_SEC_E,\n T_TYPE_B_YEAR,\n T_TYPE_B_YEAR_S\n} from './constants.ts';\nimport { pad } from './pad.ts';\nimport { getExponent, getSignificand } from './numberProps.ts';\nimport type { Partition } from './types.ts';\nimport type { FormatOptions } from './options.ts';\n\nconst DAYSIZE = 86400;\nconst CHAR_0 = 48;\nconst CHAR_9 = 57;\n\nconst dateOverflows = (inputValue: number, roundedValue: number, bigRange: boolean) => {\n if (bigRange) {\n return (inputValue < MIN_L_DATE || roundedValue >= MAX_L_DATE);\n }\n return (inputValue < MIN_S_DATE || roundedValue >= MAX_S_DATE);\n};\n\nexport function runPart (value: number | string | bigint, part: Partition, opts: FormatOptions, l10n_?: LocaleData) {\n let mantissa = '';\n let mantissa_sign = '';\n let numerator = '';\n let denominator = '';\n let fraction = '';\n let integer = '';\n let exp = 0;\n\n let date = 0;\n if (typeof value === 'bigint') {\n if (value <= Number.MAX_SAFE_INTEGER && value >= Number.MIN_SAFE_INTEGER) {\n value = Number(value);\n }\n else {\n return opts.bigintErrorNumber\n ? String(value)\n : opts.overflow;\n }\n date = value;\n }\n else if (typeof value === 'number') {\n date = Math.trunc(value);\n }\n let time = 0;\n let year = 0;\n let month = 1;\n let day = 0;\n let weekday = 0;\n let hour = 0;\n let minute = 0;\n let second = 0;\n let subsec = 0;\n\n const l10n = l10n_ || defaultLocale;\n\n // scale number\n if (!part.text && isFinite(part.scale) && part.scale !== 1 && typeof value === 'number') {\n value = clamp(value * part.scale);\n }\n\n // calc exponent\n if (part.exponential && typeof value === 'number') {\n let v = Math.abs(value);\n if (v) {\n exp = getExponent(v, part.int_max);\n }\n if (value && !part.integer) {\n // when there isn't an integer part, the exp gets shifted by 1\n exp++;\n }\n v = getSignificand(v, exp);\n if (part.int_max === 1 && round(v, part.frac_max) === 10) {\n v = 1;\n exp++;\n }\n value = (value < 0) ? -v : v;\n mantissa += Math.abs(exp);\n }\n\n // integer to text\n if (part.integer && typeof value === 'number') {\n const i = Math.abs(round(value, part.fractions ? 1 : part.frac_max));\n integer += (i < 1) ? '' : Math.floor(i);\n }\n // integer grouping\n const group_pri = opts.grouping[0] ?? 3;\n const group_sec = opts.grouping[1] ?? group_pri;\n\n // fraction to text\n if (part.dec_fractions && typeof value === 'number') {\n fraction = String(round(value, part.frac_max)).split('.')[1] || '';\n }\n\n // using vulgar fractions\n const fixed_slash = !part.error && (part.num_p.includes('0') || part.den_p.includes('0'));\n\n let have_fraction = fixed_slash;\n if (part.fractions && typeof value === 'number') {\n have_fraction = fixed_slash || !!(value % 1);\n const _dec = Math.abs(part.integer ? value % 1 : value);\n if (_dec) {\n have_fraction = true;\n if (part.denominator && isFinite(part.denominator)) {\n // predefined denominator\n denominator += part.denominator;\n numerator += round(_dec * part.denominator);\n if (numerator === '0') {\n numerator = '';\n denominator = '';\n have_fraction = fixed_slash;\n }\n }\n else {\n const frt = dec2frac(_dec, Infinity, part.den_max);\n numerator += frt[0];\n denominator += frt[1];\n if (part.integer && numerator === '0') {\n numerator = '';\n denominator = '';\n have_fraction = fixed_slash;\n }\n }\n }\n else if (!value && !part.integer) {\n have_fraction = true;\n numerator = '0';\n denominator = '1';\n }\n if (part.integer && !have_fraction && !Math.trunc(value)) {\n integer = '0';\n }\n }\n\n // using date/time\n if (part.date && typeof value === 'number') {\n date = Math.trunc(value);\n const t = DAYSIZE * (value - date);\n time = Math.floor(t); // in seconds\n // \"epsilon\" correction\n subsec = t - time;\n if (Math.abs(subsec) < 1e-6) { // 0.000001\n subsec = 0;\n }\n else if (subsec > 0.9999) {\n subsec = 0;\n time += 1;\n if (time === DAYSIZE) {\n time = 0;\n date += 1;\n }\n }\n if (subsec) {\n // round time based on smallest used unit\n const minU = part.date & u_MSEC || part.date & u_CSEC || part.date & u_DSEC;\n if (\n (minU === u_MSEC && subsec > 0.9995) ||\n (minU === u_CSEC && subsec > 0.995) ||\n (minU === u_DSEC && subsec > 0.95) ||\n (!minU && subsec >= 0.5)\n ) {\n time++;\n subsec = 0;\n }\n }\n // serial date/time to gregorian calendar\n if (date || part.date_system) {\n const dout = toYMD(value, part.date_system, opts.leap1900);\n year = dout[0];\n month = dout[1];\n day = dout[2];\n }\n if (time) {\n const x = (time < 0) ? DAYSIZE + time : time;\n second = Math.floor(x) % 60;\n minute = Math.floor(x / 60) % 60;\n hour = Math.floor((x / 60) / 60) % 60;\n }\n weekday = (6 + date) % 7;\n if (part.date_eval && dateOverflows(value, date + (time / DAYSIZE), opts.dateSpanLarge)) {\n // if value is out of bounds and formatting is date Excel emits a\n // stream of \"######\" that fills the cell width.\n // This doesn't happen, if the only date tokens are \"elapsed time\" tokens.\n // Code instead follows the TEXT function which emits a #VALUE! error.\n if (opts.dateErrorThrows) {\n throw new Error('Date out of bounds');\n }\n if (opts.dateErrorNumber) {\n const _ret = value < 0 ? [ l10n.negative ] : [];\n return general(_ret, value, l10n).join('');\n }\n return opts.overflow;\n }\n }\n\n const padQ = pad('?', opts.nbsp);\n\n // mantissa sign\n if (exp < 0) {\n mantissa_sign = '-';\n }\n else if (part.exp_plus) {\n mantissa_sign = '+';\n }\n\n const ret = [];\n\n const digitsStart = (numstr: string, pattern: string, prt: string, offset: number) => {\n const l = (!offset && numstr.length > pattern.length)\n ? prt.length + numstr.length - pattern.length\n : prt.length;\n if (numstr.length < pattern.length) {\n offset += numstr.length - pattern.length;\n }\n for (let i = 0; i < l; i++) {\n ret.push(numstr[i + offset] || pad(prt[i], opts.nbsp));\n }\n return l;\n };\n\n let denominator_fixed = false;\n const counter = { int: 0, frac: 0, man: 0, num: 0, den: 0 };\n for (let ti = 0, tl = part.tokens.length; ti < tl; ti++) {\n const tok = part.tokens[ti];\n const tokenType = tok.type;\n const len = 'num' in tok ? tok.num.length : 0;\n if (tokenType === TOKEN_STRING) {\n // special rules may apply if next or prev is numerator or denominator\n const rule = tok.rule;\n if (rule) {\n if (\n (rule === 'num' && have_fraction) ||\n (rule === 'num+int' && have_fraction && integer) ||\n (rule === 'den' && have_fraction)\n ) {\n ret.push(tok.value.replaceAll(' ', padQ));\n }\n else if (\n (rule === 'num' && part.num_min > 0 || part.den_min > 0) ||\n (rule === 'num+int' && part.den_min > 0 && (integer || part.num_min)) ||\n (rule === 'den' && part.den_min > 0 || part.den_min > 0)\n ) {\n ret.push(padQ.repeat(tok.value.length));\n }\n }\n else {\n ret.push(tok.value.replaceAll(' ', padQ));\n }\n }\n else if (tokenType === TOKEN_SPACE) {\n if (tok.rule === 'num+int') {\n if (\n (have_fraction || part.num_min || part.den_min) &&\n (integer || part.num_min)\n ) {\n ret.push(padQ);\n }\n }\n else {\n ret.push(padQ);\n }\n }\n else if (tokenType === TOKEN_ERROR) {\n // token used to define invalid pattern\n ret.push(opts.invalid);\n }\n else if (tokenType === TOKEN_POINT) {\n // Excel always emits a period: TEXT(0, \"#.#\") => \".\"\n ret.push(part.date ? tok.value : l10n.decimal);\n }\n else if (tokenType === TOKEN_GENERAL) {\n general(ret, value, l10n);\n }\n else if (tokenType === TOKEN_EXP) {\n ret.push(l10n.exponent);\n }\n else if (tokenType === TOKEN_MINUS) {\n if (tok.volatile && part.date) {\n // don't emit the prepended minus if this is a date\n }\n else if (tok.volatile && (typeof value !== 'number' || value >= 0)) {\n // don't emit volatile minus for positive numbers\n }\n else if (tok.volatile && !part.fractions && (part.integer || part.dec_fractions)) {\n // minus is only shown if there is a non-zero digit present\n if (typeof value === 'number' && value < 0 && (integer && integer !== '0') || fraction) {\n ret.push(l10n.negative);\n }\n }\n else {\n ret.push(l10n.negative);\n }\n }\n else if (tokenType === TOKEN_PLUS) {\n ret.push(l10n.positive);\n }\n else if (tokenType === TOKEN_TEXT) {\n ret.push(value);\n }\n else if (tokenType === TOKEN_FILL) {\n // If user has provided a token to signal that next char is a fill char,\n // then emit the that plus the fill char. By default this does what the\n // TEXT function does in this case: Emits nothing.\n if (opts.fillChar) {\n ret.push(opts.fillChar, tok.value);\n }\n }\n else if (tokenType === TOKEN_SKIP) {\n // If user has provided a token to signal that next char is a fill char,\n // then emit the that plus the fill char. By default this does what the\n // TEXT function does in this case: Emits a space.\n if (opts.skipChar) {\n ret.push(opts.skipChar, tok.value);\n }\n else {\n ret.push(opts.nbsp ? '\\u00a0' : ' ');\n }\n }\n else if (tokenType === T_TYPE_DIV) {\n if (have_fraction) {\n ret.push('/');\n }\n else if (part.num_min > 0 || part.den_min > 0) {\n ret.push(padQ);\n }\n else {\n ret.push(pad('#', opts.nbsp));\n }\n }\n else if (tokenType === T_TYPE_INT) {\n // number isn't fragmented\n if (part.int_pattern.length === 1) {\n const pt = part.int_p;\n const l = Math.max(part.int_min, integer.length);\n let digits = '';\n for (let i = l; i > 0; i--) {\n const d = integer.charAt(integer.length - i);\n const p = d ? '' : pt.charAt(pt.length - i) || pt[0];\n let sep = '';\n if (part.grouping) {\n const n = (i - 1) - group_pri;\n if (n >= 0 && !(n % group_sec)) {\n sep = (d || p === '0')\n ? l10n.group\n : pad('?', opts.nbsp);\n }\n }\n digits += (d || pad(p, opts.nbsp)) + sep;\n }\n ret.push(digits);\n }\n else {\n counter.int += digitsStart(integer, part.int_p, tok.num, counter.int);\n }\n }\n else if (tokenType === T_TYPE_FRAC) {\n const o = counter.frac;\n for (let i = 0; i < len; i++) {\n ret.push(fraction[i + o] || pad(tok.num[i], opts.nbsp));\n }\n counter.frac += len;\n }\n else if (tokenType === T_TYPE_MAN) {\n // mantissa sign is attached to the first digit, not the exponent symbol\n // \"0E+ 0\" will print as \"1E +12\"\n if (!counter.man) {\n ret.push(mantissa_sign);\n }\n counter.man += digitsStart(mantissa, part.man_p, tok.num, counter.man);\n }\n else if (tokenType === T_TYPE_NUM) {\n counter.num += digitsStart(numerator, part.num_p, tok.num, counter.num);\n }\n else if (tokenType === T_TYPE_DEN) {\n const o = counter.den;\n for (let i = 0; i < len; i++) {\n let digit = denominator[i + o];\n if (!digit) {\n const c = tok.num.charCodeAt(i);\n if ((c > CHAR_0 && c <= CHAR_9) || (denominator_fixed && c === CHAR_0)) {\n denominator_fixed = true;\n digit = opts.nbsp ? '\\u00a0' : ' ';\n }\n else if (\n !denominator_fixed &&\n (i === len - 1) &&\n c === CHAR_0 &&\n !denominator\n ) {\n digit = '1';\n }\n else {\n digit = pad(tok.num[i], opts.nbsp);\n }\n }\n ret.push(digit);\n }\n counter.den += len;\n }\n else if (tokenType === T_TYPE_YEAR) {\n if (year < 0) { ret.push(l10n.negative); }\n ret.push(String(Math.abs(year)).padStart(4, '0'));\n }\n else if (tokenType === T_TYPE_YEAR_S) {\n const y = year % 100;\n ret.push(y < 10 ? '0' : '', y);\n }\n else if (tokenType === T_TYPE_MON) {\n ret.push((tok.pad && month < 10 ? '0' : ''), month);\n }\n else if (tokenType === T_TYPE_MNAME_1) {\n // This is what Excel does.\n // The Vietnamese list goes:\n // from [\"Tháng 1\", \"Tháng 2\", ... ] to [ \"T\", \"T\", ... ]\n // Simplified Chinese goes:\n // from [ 1月, ... 9月, 10月, 11月, 12月 ] to [ 1, ... 9, 1, 1, 1 ]\n if (part.date_system === EPOCH_1317) {\n ret.push(l10n.mmmm6[month - 1].charAt(0));\n }\n else {\n ret.push(l10n.mmmm[month - 1].charAt(0));\n }\n }\n else if (tokenType === T_TYPE_MNAME_S) {\n if (part.date_system === EPOCH_1317) {\n ret.push(l10n.mmm6[month - 1]);\n }\n else {\n ret.push(l10n.mmm[month - 1]);\n }\n }\n else if (tokenType === T_TYPE_MNAME) {\n if (part.date_system === EPOCH_1317) {\n ret.push(l10n.mmmm6[month - 1]);\n }\n else {\n ret.push(l10n.mmmm[month - 1]);\n }\n }\n else if (tok.type === T_TYPE_WEEKDAY_S) {\n ret.push(l10n.ddd[weekday]);\n }\n else if (tokenType === T_TYPE_WEEKDAY) {\n ret.push(l10n.dddd[weekday]);\n }\n else if (tokenType === T_TYPE_DAY) {\n ret.push((tok.pad && day < 10 ? '0' : ''), day);\n }\n else if (tokenType === T_TYPE_HOUR) {\n const h = hour % part.clock || (part.clock < 24 ? part.clock : 0);\n ret.push((tok.pad && h < 10 ? '0' : ''), h);\n }\n else if (tokenType === T_TYPE_MIN) {\n ret.push((tok.pad && minute < 10 ? '0' : ''), minute);\n }\n else if (tokenType === T_TYPE_SEC) {\n ret.push((tok.pad && second < 10 ? '0' : ''), second);\n }\n else if (tokenType === T_TYPE_SUBSEC) {\n ret.push(l10n.decimal);\n // decimals is pre-determined by longest subsec token\n // but the number emitted is per-token\n const f = subsec.toFixed(part.sec_decimals);\n ret.push(f.slice(2, 2 + tok.decimals));\n }\n else if (tokenType === TOKEN_AMPM) {\n const idx = hour < 12 ? 0 : 1;\n if (tok.short && !l10n_) {\n ret.push('AP'[idx]);\n }\n else {\n ret.push(l10n.ampm[idx]);\n }\n }\n else if (tokenType === T_TYPE_HOUR_E && typeof value === 'number') {\n if (value < 0) {\n ret.push(l10n.negative);\n }\n const hh = (date * 24) + Math.floor(Math.abs(time) / (60 * 60));\n ret.push(String(Math.abs(hh)).padStart(tok.pad, '0'));\n }\n else if (tokenType === T_TYPE_MIN_E && typeof value === 'number') {\n if (value < 0) {\n ret.push(l10n.negative);\n }\n const mm = (date * 1440) + Math.floor(Math.abs(time) / 60);\n ret.push(String(Math.abs(mm)).padStart(tok.pad, '0'));\n }\n else if (tokenType === T_TYPE_SEC_E && typeof value === 'number') {\n if (value < 0) {\n ret.push(l10n.negative);\n }\n const ss = (date * DAYSIZE) + Math.abs(time);\n ret.push(String(Math.abs(ss)).padStart(tok.pad, '0'));\n }\n else if (tokenType === T_TYPE_B_YEAR) {\n ret.push(year + 543);\n }\n else if (tokenType === T_TYPE_B_YEAR_S) {\n const y = (year + 543) % 100;\n ret.push(y < 10 ? '0' : '', y);\n }\n }\n return ret.join('');\n}\n","import { TOKEN_TEXT, indexColors } from './constants.ts';\nimport { defaultLocale, getLocale } from './locale.ts';\nimport type { FormatOptions } from './options.ts';\nimport { parseFormatSection } from './parseFormatSection.ts';\nimport { runPart } from './runPart.ts';\nimport type { Partition, PatternParseData } from './types.ts';\n\nconst default_text = parseFormatSection([\n { type: TOKEN_TEXT, value: '@', raw: '@' }\n]);\n\nfunction getPart (value: string | number | bigint, parts: Partition[]): Partition | undefined {\n for (let pi = 0; pi < 3; pi++) {\n const part = parts[pi];\n if (part) {\n let cond = false;\n if (part.condition) {\n const operator = part.condition[0];\n const operand = part.condition[1];\n if (operator === '=') { cond = (value === operand); }\n else if (operator === '<>') { cond = (value !== operand); }\n else if (typeof value === 'string') { cond = false; }\n else if (operator === '>') { cond = (value > operand); }\n else if (operator === '<') { cond = (value < operand); }\n else if (operator === '>=') { cond = (value >= operand); }\n else if (operator === '<=') { cond = (value <= operand); }\n }\n else {\n cond = true;\n }\n if (cond) {\n return part;\n }\n }\n }\n return undefined;\n}\n\nexport function formatColor (\n value: unknown,\n parseData: PatternParseData,\n opts: Pick\n): string | number | undefined {\n const parts = parseData.partitions;\n let part: Partition | undefined = parts[3];\n let color: string | number | undefined;\n if ((typeof value === 'number' || typeof value === 'bigint') && Number.isFinite(value)) {\n part = getPart(value, parts);\n }\n if (part?.color) {\n color = part.color;\n }\n if (color && typeof color === 'number' && opts.indexColors) {\n color = indexColors[color - 1] || '#000';\n }\n return color;\n}\n\nexport function formatValue (\n value: unknown,\n parseData: PatternParseData,\n opts: FormatOptions\n): string {\n const parts = parseData.partitions;\n const l10n = getLocale(parseData.locale || opts.locale);\n const text_part = parts[3] ? parts[3] : default_text;\n // booleans get converted to string\n if (typeof value === 'boolean') {\n const loc = l10n || defaultLocale;\n value = loc.bool[value ? 0 : 1];\n }\n // null | undefined => ''\n if (value == null) {\n return '';\n }\n // anything other than (number | bigint) we'll format as text\n const n = typeof value === 'bigint';\n if (typeof value !== 'number' && !n) {\n return runPart(String(value), text_part, opts, l10n);\n }\n // guard against non-finite numbers:\n if (!n && !Number.isFinite(value)) {\n const loc = l10n || defaultLocale;\n if (Number.isNaN(value)) {\n return loc.nan;\n }\n return ((value as number) < 0 ? loc.negative : '') + loc.infinity;\n }\n // find and run the pattern part that applies to this number\n const v = value as number | string | bigint;\n const part = getPart(v, parts);\n return part ? runPart(v, part, opts, l10n) : opts.overflow;\n}\n","import { u_YEAR, u_MONTH, u_DAY, u_HOUR, u_MIN, u_SEC, reCurrencySymbols, TOKEN_STRING, T_TYPE_YEAR, T_TYPE_YEAR_S, T_TYPE_B_YEAR, T_TYPE_B_YEAR_S, T_TYPE_MON, T_TYPE_MNAME, T_TYPE_MNAME_S, T_TYPE_MNAME_1, T_TYPE_WEEKDAY, T_TYPE_WEEKDAY_S, T_TYPE_DAY, T_TYPE_HOUR, T_TYPE_MIN, T_TYPE_SEC, TOKEN_AMPM } from './constants.ts';\nimport type { FormatDateInfo, FormatInfo, Partition } from './types.ts';\n\nexport function isPercent (partitions: Partition[]): boolean {\n return !!(\n (partitions[0]?.percent) ||\n (partitions[1]?.percent) ||\n (partitions[2]?.percent) ||\n (partitions[3]?.percent)\n );\n}\n\nexport function isDate (partitions: Partition[]): boolean {\n return !!(\n (partitions[0]?.date) ||\n (partitions[1]?.date) ||\n (partitions[2]?.date) ||\n (partitions[3]?.date)\n );\n}\n\nexport function isText (partitions: Partition[]): boolean {\n const [ part1, part2, part3, part4 ] = partitions;\n return !!(\n (!part1 || part1.generated) &&\n (!part2 || part2.generated) &&\n (!part3 || part3.generated) &&\n part4?.text && !part4.generated\n );\n}\n\nconst level = {\n text: 15,\n datetime: 10.8,\n date: 10.8,\n time: 10.8,\n percent: 10.6,\n currency: 10.4,\n grouped: 10.2,\n scientific: 6,\n number: 4,\n fraction: 2,\n general: 0,\n error: 0\n};\n\nconst dateCodes = [\n [ 'DMY', 1 ],\n [ 'DM', 2 ],\n [ 'MY', 3 ],\n [ 'MDY', 4 ],\n [ 'MD', 5 ],\n [ 'hmsa', 6 ],\n [ 'hma', 7 ],\n [ 'hms', 8 ],\n [ 'hm', 9 ]\n];\n\nexport function info (partitions: Partition[], currencyId?: string): FormatInfo {\n const [ partPos, partNeg ] = partitions;\n const frac_max = partPos.frac_max;\n const output: FormatInfo = {\n type: 'general',\n isDate: isDate(partitions),\n isText: isText(partitions),\n isPercent: isPercent(partitions),\n maxDecimals: partPos.general ? 9 : frac_max,\n scale: partPos.scale ?? 1,\n color: 0,\n parentheses: 0,\n grouped: partPos.grouping ? 1 : 0,\n code: '',\n level: 0\n };\n\n // currency identifier may be passed in, but otherwise we report\n // if we find any known glyph in the tokens\n const isCurrency = (!output.isDate && !output.isText && !partPos.error) && partPos.tokens.some(tok => (\n tok.type === TOKEN_STRING &&\n (currencyId\n ? tok.value === currencyId\n : reCurrencySymbols.test(tok.value))\n ));\n\n let codeType = 'G';\n let codeNum = (frac_max >= 0) ? Math.min(15, frac_max) : '';\n let codeParens = '';\n let codeDash = '';\n\n if (partNeg?.color) {\n codeDash = '-';\n output.color = 1;\n }\n if (partPos.parens) {\n codeParens = '()';\n output.parentheses = 1;\n }\n\n if (isCurrency) {\n codeType = 'C';\n output.type = 'currency';\n }\n else if (partPos.error) {\n output.type = 'error';\n output.maxDecimals = 0;\n }\n else if (output.isDate) {\n let haveTime = 0;\n let haveDate = 0;\n let order = '';\n // This is equivalent to how Excel does this.\n // It has to get the order right but then ignores any trailing tokens.\n // So: \"mmm dd yyyy\" matches \"mdy\" = D4\n // But: \"mmm dd dd yyyy\" matches \"md\" = D5\n partPos.tokens.forEach(tok => {\n const type = tok.type;\n if (type === T_TYPE_YEAR || type === T_TYPE_YEAR_S || type === T_TYPE_B_YEAR || type === T_TYPE_B_YEAR_S) {\n order += 'Y';\n haveDate++;\n }\n else if (type === T_TYPE_MON || type === T_TYPE_MNAME || type === T_TYPE_MNAME_S || type === T_TYPE_MNAME_1) {\n order += 'M';\n haveDate++;\n }\n else if (type === T_TYPE_WEEKDAY || type === T_TYPE_WEEKDAY_S || type === T_TYPE_DAY) {\n order += 'D';\n haveDate++;\n }\n else if (type === T_TYPE_HOUR) {\n order += 'h';\n haveTime++;\n }\n else if (type === T_TYPE_MIN) {\n order += 'm';\n haveTime++;\n }\n else if (type === T_TYPE_SEC) {\n order += 's';\n haveTime++;\n }\n else if (type === TOKEN_AMPM) {\n order += 'a';\n haveTime++;\n }\n });\n output.type = 'date';\n if (haveDate && haveTime) {\n output.type = 'datetime';\n }\n else if (!haveDate && haveTime) {\n output.type = 'time';\n }\n const code = dateCodes.find(d => order.startsWith(d[0] as string));\n codeType = code ? 'D' : 'G';\n codeNum = code ? code[1] : '';\n }\n else if (output.isText) {\n codeType = 'G';\n output.type = 'text';\n codeNum = '';\n output.maxDecimals = 0;\n }\n else if (partPos.general) {\n codeType = 'G';\n output.type = 'general';\n codeNum = '';\n }\n else if (partPos.fractions) {\n codeType = 'G';\n output.type = 'fraction';\n codeNum = '';\n }\n else if (partPos.exponential) {\n codeType = 'S';\n output.type = 'scientific';\n }\n else if (output.isPercent) {\n codeType = 'P';\n output.type = 'percent';\n }\n else if (partPos.grouping) {\n codeType = ',';\n output.type = 'grouped';\n }\n else if (partPos.int_max || frac_max) {\n codeType = 'F';\n output.type = 'number';\n }\n\n output.code = codeType + codeNum + codeDash + codeParens;\n\n // Excel can combine some codes, but not all.\n // When integer value of two is equal and it can't combine,\n // the \"first\" one wins out.\n output.level = level[output.type];\n\n return output;\n}\n\nexport function dateInfo (partitions: Partition[]): FormatDateInfo {\n const [ partPos ] = partitions;\n const r: FormatDateInfo = {\n year: !!(partPos.date & u_YEAR),\n month: !!(partPos.date & u_MONTH),\n day: !!(partPos.date & u_DAY),\n hours: !!(partPos.date & u_HOUR),\n minutes: !!(partPos.date & u_MIN),\n seconds: !!(partPos.date & u_SEC),\n clockType: partPos.clock === 12 ? 12 : 24\n };\n return r;\n}\n","import {\n TOKEN_GENERAL, TOKEN_HASH, TOKEN_ZERO, TOKEN_QMARK, TOKEN_SLASH, TOKEN_GROUP, TOKEN_SCALE,\n TOKEN_COMMA, TOKEN_BREAK, TOKEN_TEXT, TOKEN_PLUS, TOKEN_MINUS, TOKEN_POINT, TOKEN_SPACE,\n TOKEN_PERCENT, TOKEN_DIGIT, TOKEN_CALENDAR, TOKEN_ERROR, TOKEN_DATETIME, TOKEN_DURATION,\n TOKEN_CONDITION, TOKEN_DBNUM, TOKEN_NATNUM, TOKEN_LOCALE, TOKEN_COLOR, TOKEN_MODIFIER,\n TOKEN_AMPM, TOKEN_ESCAPED, TOKEN_STRING, TOKEN_SKIP, TOKEN_EXP, TOKEN_FILL, TOKEN_PAREN,\n TOKEN_CHAR\n} from './constants.ts';\nimport type { Token, TokenType } from './types.ts';\n\nconst tokenHandlers: [ TokenType, RegExp, 0 | 1 | number[] ][] = [\n [ TOKEN_GENERAL, /^General/i, 0 ],\n [ TOKEN_HASH, /^#/, 0 ],\n [ TOKEN_ZERO, /^0/, 0 ],\n [ TOKEN_QMARK, /^\\?/, 0 ],\n [ TOKEN_SLASH, /^\\//, 0 ],\n // Commas are dealt with as a special case in the tokenizer but will end up\n // as one of these:\n // [ TOKEN_GROUP, /^(,),*/, 1 ],\n // [ TOKEN_SCALE, /^(,),*/, 1 ],\n // [ TOKEN_COMMA, /^(,),*/, 1 ],\n [ TOKEN_BREAK, /^;/, 0 ],\n [ TOKEN_TEXT, /^@/, 0 ],\n [ TOKEN_PLUS, /^\\+/, 0 ],\n [ TOKEN_MINUS, /^-/, 0 ],\n [ TOKEN_POINT, /^\\./, 0 ],\n [ TOKEN_SPACE, /^ /, 0 ],\n [ TOKEN_PERCENT, /^%/, 0 ],\n [ TOKEN_DIGIT, /^[1-9]/, 0 ],\n [ TOKEN_CALENDAR, /^(?:B[12])/i, 0 ],\n [ TOKEN_ERROR, /^B$/, 0 ], // pattern must not end in a \"B\"\n [ TOKEN_DATETIME, /^(?:[hH]+|[mM]+|[sS]+|[yY]+|[bB]+|[dD]+|[gG]+|[aA]{3,}|e+)/, 0 ],\n [ TOKEN_DURATION, /^(?:\\[(h+|m+|s+)\\])/i, 1 ],\n [ TOKEN_CONDITION, /^\\[(<[=>]?|>=?|=)\\s*(-?[.\\d]+)\\]/, [ 1, 2 ] ],\n [ TOKEN_DBNUM, /^\\[(DBNum[0-4]?\\d)\\]/i, 1 ],\n [ TOKEN_NATNUM, /^\\[(NatNum[0-4]?\\d)\\]/i, 1 ],\n [ TOKEN_LOCALE, /^\\[\\$([^\\]]+)\\]/, 1 ],\n [ TOKEN_COLOR, /^\\[(black|blue|cyan|green|magenta|red|white|yellow|color\\s*\\d+)\\]/i, 1 ],\n // conditionally allow these open ended directions?\n [ TOKEN_MODIFIER, /^\\[([^\\]]+)\\]/, 1 ],\n [ TOKEN_AMPM, /^(?:AM\\/PM|am\\/pm|A\\/P)/, 0 ],\n [ TOKEN_ESCAPED, /^\\\\(.)/, 1 ],\n [ TOKEN_STRING, /^\"([^\"]*?)\"/, 1 ],\n [ TOKEN_SKIP, /^_(\\\\.|.)/, 1 ],\n // Google Sheets and Excel diverge on \"e\": Excel only accepts E.\n [ TOKEN_EXP, /^[Ee]([+-])/, 1 ],\n [ TOKEN_FILL, /^\\*(\\\\.|.)/, 1 ],\n [ TOKEN_PAREN, /^[()]/, 0 ],\n [ TOKEN_ERROR, /^[EÈÉÊËèéêëĒēĔĕĖėĘęĚěȄȅȆȇȨȩNnÑñŃńŅņŇňǸǹ[\"*/\\\\_]/, 0 ],\n [ TOKEN_CHAR, /^./, 0 ]\n];\n\nconst CODE_QMRK = 63;\nconst CODE_HASH = 35;\nconst CODE_ZERO = 48;\nconst CODE_NINE = 57;\nconst isNumOp = (char: string) => {\n const c = (char || '\\0').charCodeAt(0);\n return (c === CODE_QMRK || c === CODE_HASH || (c >= CODE_ZERO && c <= CODE_NINE));\n};\n\n/**\n * Breaks a format pattern string into a list of tokens.\n *\n * The returned output will be an array of objects representing the tokens:\n *\n * ```js\n * [\n * { type: TOKEN_ZERO, value: '0', raw: '0' },\n * { type: TOKEN_POINT, value: '.', raw: '.' },\n * { type: TOKEN_ZERO, value: '0', raw: '0' },\n * { type: TOKEN_PERCENT, value: '%', raw: '%' }\n * ]\n * ```\n *\n * @param pattern The format pattern\n * @returns A list of tokens\n */\nexport function tokenize (pattern: string): Token[] {\n let i = 0;\n const tokens: Token[] = [];\n const unresolvedCommas = [];\n while (i < pattern.length) {\n const curr = pattern.slice(i);\n let step = 0;\n // A comma is context sensitive and needs to be handled as a special case.\n // This needs to happen in the tokenizer because to be able to re-localize\n // the pattern we'll need to know what each comma means.\n const mComma = /^(,+)(.)?/.exec(curr);\n if (mComma) {\n // comma depends on what it follows\n const raw = mComma[1];\n step = raw.length;\n const lookBehind = pattern[i - 1] || '';\n let maybeGROUP = false;\n let maybeSCALE = false;\n if (isNumOp(lookBehind)) { // 0-9, '#', or '?': may be GROUP or SCALE\n maybeGROUP = true;\n maybeSCALE = true;\n }\n else if (lookBehind === '.') { // '.': may be SCALE only\n maybeSCALE = true;\n }\n // if at the end of the pattern or section, then this can't be a GROUP op\n const lookAhead = mComma[2] || '';\n if (maybeGROUP && (!lookAhead || lookAhead === ';')) {\n maybeGROUP = false;\n }\n // if next char is a num token, then this cannot be a SCALE op\n if (maybeSCALE && isNumOp(lookAhead)) {\n maybeSCALE = false;\n }\n if (maybeGROUP && !maybeSCALE) {\n tokens.push({ type: TOKEN_GROUP, value: ',', raw });\n }\n else if (!maybeGROUP && maybeSCALE) {\n tokens.push({ type: TOKEN_SCALE, value: ',', raw });\n }\n else if (maybeGROUP && maybeSCALE) {\n // this token will be set to scale, but switched to group if we hit a\n // num token later on in the pattern...\n const t: Token = { type: TOKEN_SCALE, value: ',', raw };\n tokens.push(t);\n unresolvedCommas.push(t);\n }\n else {\n tokens.push({ type: TOKEN_COMMA, value: ',', raw });\n }\n }\n // all other symbols are matched using\n else {\n let token: Token | undefined;\n for (const [ type, expr, group ] of tokenHandlers) {\n const m = expr.exec(curr);\n if (m) {\n const value = Array.isArray(group)\n ? group.map(d => m[d])\n : m[group || 0];\n token = { type, value, raw: m[0] };\n tokens.push(token);\n step = m[0].length;\n break;\n }\n }\n // if we just matched a break, then deal with any unresolved commas\n if (unresolvedCommas.length && token?.raw === ';') {\n unresolvedCommas.length = 0;\n }\n // if we just matched a num operator, then deal with any unresolved commas\n if (token && unresolvedCommas.length && isNumOp(token.raw)) {\n unresolvedCommas.forEach(d => (d.type = TOKEN_GROUP));\n unresolvedCommas.length = 0;\n }\n }\n if (!step) {\n const raw = curr[0];\n step = 1;\n tokens.push({ type: TOKEN_CHAR, value: raw, raw });\n }\n i += step;\n }\n return tokens;\n}\n","import { TOKEN_BREAK, TOKEN_ERROR, TOKEN_MINUS } from './constants.ts';\nimport { createPartition } from './createPartition.ts';\nimport { resolveLocale } from './locale.ts';\nimport { parseFormatSection } from './parseFormatSection.ts';\nimport { tokenize } from './tokenize.ts';\nimport type { Partition, PatternParseData, RenderToken } from './types.ts';\n\nconst maybeAddMinus = (part: Partition): void => {\n const [ op, val ] = part.condition ?? [ '', 0 ];\n const exception = (\n (val < 0 && (op === '<' || op === '<=' || op === '=')) ||\n (val === 0 && (op === '<'))\n );\n if (!exception) {\n part.tokens.unshift({\n type: TOKEN_MINUS,\n volatile: true\n });\n }\n};\n\nconst clonePart = (part: Partition, prefixToken?: RenderToken): Partition => {\n const r: Partial = {};\n for (const key in part) {\n // @ts-ignore\n const val = part[key];\n // @ts-ignore\n r[key] = Array.isArray(val) ? [ ...val ] : val;\n }\n if (prefixToken && r.tokens) {\n r.tokens.unshift(prefixToken);\n }\n r.generated = true;\n return r as Partition;\n};\n\nexport function parsePattern (pattern: string): PatternParseData {\n const partitions = [];\n let conditional = false;\n let l10n_override: string | undefined;\n let text_partition = null;\n let more = 0;\n let part: Partition;\n let i = 0;\n let conditions = 0;\n let tokens = tokenize(pattern);\n do {\n part = parseFormatSection(tokens);\n // Dates cannot blend with non-date tokens\n // General cannot blend with non-date tokens\n // -- This is does not match Excel 100% which\n // seems to allow \",\" as a text token with General\n // -- Excel also does something strange when mixing\n // General with dates (but that can hardly be expected to work)\n if (\n (part.date || part.general) &&\n (part.int_pattern.length || part.frac_pattern.length || part.scale !== 1 || part.text)\n ) {\n throw new Error('Illegal format');\n }\n if (part.condition) {\n conditions++;\n conditional = true;\n }\n if (part.text) {\n // only one text partition is allowed per pattern\n if (text_partition) {\n throw new Error('Unexpected partition');\n }\n text_partition = part;\n }\n if (part.locale) {\n l10n_override = resolveLocale(part.locale);\n }\n partitions.push(part);\n\n more = tokens[part.tokensUsed]?.type === TOKEN_BREAK ? 1 : 0;\n tokens = tokens.slice(part.tokensUsed + more);\n i++;\n }\n while (more && i < 4 && conditions < 3);\n\n // No more than 4 sections are allowed\n if (more) {\n throw new Error('Unexpected partition');\n }\n // Only 2 conditional statements are allowed: \"1;2;else;txt\"\n if (conditions > 2) {\n throw new Error('Unexpected condition');\n }\n // 3rd part must be text of neutral if it is present\n const part3 = partitions[3];\n if (part3 && (part3.int_pattern.length || part3.frac_pattern.length || part3.date)) {\n throw new Error('Unexpected partition');\n }\n\n if (conditional) {\n // When a pattern has a single partition which exists in the second\n // partition, We must also set the first partition to `[>0]`.\n if (!partitions[0].condition) {\n partitions[0].condition = [ '>', 0 ];\n }\n\n // conditional patterns get a volatile minus on the \"else\" partitions\n const numParts = partitions.length;\n if (numParts === 1) {\n // provide a fallback pattern if there isn't one\n partitions[1] = parseFormatSection(tokenize('General'));\n partitions[1].generated = true;\n }\n if (numParts <= 2) {\n // what happens when [<10]0;[>10]0 <=> 3 or -3?\n // => pattern is \"valid\" but won't match anything runtime, so errors\n }\n // 1 and 2 part conditionals\n if (numParts < 3) {\n const part1 = partitions[0];\n const part2 = partitions[1];\n // first part follows standard < <= = rules\n maybeAddMinus(part1);\n // second part uses standard as well *if it has conditions*\n if (part2.condition) {\n maybeAddMinus(part2);\n }\n else {\n // ...else it *seems* to follow logic based on first condition\n const cond = part1.condition;\n if (\n cond && (\n cond[0] === '=' ||\n (cond[1] >= 0 && (cond[0] === '>' || cond[0] === '>='))\n )\n ) {\n part2.tokens.unshift({ type: TOKEN_MINUS, volatile: true });\n }\n }\n }\n else {\n // 3 and 4 part patterns\n partitions.forEach(maybeAddMinus);\n }\n }\n // if this is not a conditional, then we ensure we have all 4 partitions\n else {\n // if we have less than 4 partitions and one of them is .text,\n // we need to use it as the text one\n if (partitions.length < 4 && text_partition) {\n for (let pi = 0, pl = partitions.length; pi < pl; pi++) {\n if (partitions[pi] === text_partition) {\n partitions.splice(pi, 1);\n }\n }\n }\n // missing positive\n if (partitions.length < 1 && text_partition) {\n partitions[0] = parseFormatSection(tokenize('General'));\n partitions[0].generated = true;\n }\n // missing negative\n if (partitions.length < 2) {\n // the volatile minus only happens if there is a single pattern\n const volMinus: RenderToken = { type: TOKEN_MINUS, volatile: true };\n partitions.push(clonePart(partitions[0], volMinus));\n }\n // missing zero\n if (partitions.length < 3) {\n partitions.push(clonePart(partitions[0]));\n }\n // missing text\n if (partitions.length < 4) {\n if (text_partition) {\n partitions.push(text_partition);\n }\n else {\n const p = parseFormatSection(tokenize('@'));\n p.generated = true;\n partitions.push(p);\n }\n }\n\n partitions[0].condition = [ '>', 0 ];\n partitions[1].condition = [ '<', 0 ];\n partitions[2].condition = undefined;\n }\n\n return {\n pattern: pattern,\n partitions: partitions,\n locale: l10n_override\n };\n}\n\nexport function parseCatch (pattern: string): PatternParseData {\n try {\n return parsePattern(pattern);\n }\n catch (err) {\n const message = err && typeof err === 'object' && 'message' in err ? String(err.message) : 'Unkown error';\n const errPart = createPartition([ { type: TOKEN_ERROR } ]);\n errPart.error = true;\n return {\n pattern: pattern,\n partitions: [ errPart, errPart, errPart, errPart ],\n error: message,\n locale: undefined\n };\n }\n}\n","/**\n * The numfmt library formats numbers according to a specifier string as defined in ECMA-376.\n * The library tries its best to emulate the inns and outs of what the Excel spreadsheet\n * software does.\n *\n * @packageDocumentation\n * @module numfmt\n */\n\nimport { TOKEN_ERROR } from './constants.ts';\n\nexport {\n getLocale,\n parseLocale,\n addLocale\n} from './locale.ts';\n\nimport { defaultOptions, type FormatOptions } from './options.ts';\n\nexport { round } from './round.ts';\nexport type { FormatOptions } from './options.ts';\nexport type { ParseDataBool, ParseDataNum } from './parseValue.ts';\nexport type {\n TokenType,\n Token,\n FormatDateInfo,\n FormatInfo\n} from './types.ts';\n/**\n * @ignore\n */\nexport type {\n TOKEN_GENERAL, TOKEN_HASH, TOKEN_ZERO, TOKEN_QMARK, TOKEN_SLASH, TOKEN_GROUP, TOKEN_SCALE, TOKEN_COMMA, TOKEN_BREAK,\n TOKEN_TEXT, TOKEN_PLUS, TOKEN_MINUS, TOKEN_POINT, TOKEN_SPACE, TOKEN_PERCENT, TOKEN_DIGIT, TOKEN_CALENDAR,\n TOKEN_ERROR, TOKEN_DATETIME, TOKEN_DURATION, TOKEN_CONDITION, TOKEN_DBNUM, TOKEN_NATNUM, TOKEN_LOCALE, TOKEN_COLOR,\n TOKEN_MODIFIER, TOKEN_AMPM, TOKEN_ESCAPED, TOKEN_STRING, TOKEN_SKIP, TOKEN_EXP, TOKEN_FILL, TOKEN_PAREN, TOKEN_CHAR\n} from './constants.ts';\n\nimport { dateToSerial as handleDates } from './serialDate.ts';\nexport { dateToSerial, dateFromSerial } from './serialDate.ts';\n\nexport type { LocaleData, LocaleToken } from './locale.ts';\n\nexport {\n parseNumber,\n parseDate,\n parseTime,\n parseBool,\n parseValue\n} from './parseValue.ts';\n\nimport { formatColor as fmtColor, formatValue as fmtValue } from './formatNumber.ts';\nimport { info, dateInfo, isDate, isPercent, isText } from './formatInfo.ts';\nimport { parsePattern } from './parsePattern.ts';\nimport type { FormatDateInfo, FormatInfo } from './types.ts';\n\nexport { tokenize } from './tokenize.ts';\n\nconst _parseDataCache = Object.create({});\nfunction prepareFormatterData (pattern: string, shouldThrow = false) {\n if (!pattern) { pattern = 'General'; }\n\n let parseData = _parseDataCache[pattern];\n if (!parseData) {\n try {\n parseData = parsePattern(pattern);\n _parseDataCache[pattern] = parseData;\n }\n catch (err) {\n // if the options say to throw errors, then do so\n if (shouldThrow) {\n throw err;\n }\n // else we set the parsedata to error\n const message = err && typeof err === 'object' && 'message' in err ? err.message : 'Unknown error';\n const errPart = {\n tokens: [ { type: TOKEN_ERROR } ],\n error: message\n };\n parseData = {\n pattern: pattern,\n partitions: [ errPart, errPart, errPart, errPart ],\n error: message,\n locale: null\n };\n }\n }\n return parseData;\n}\n\n/**\n * Formats a value as a string and returns the result.\n *\n * - Dates are normalized to spreadsheet style serial dates and then formatted.\n * - Booleans are emitted as uppercase `TRUE` or `FALSE`.\n * - `null` and `undefined` will return an empty string `\"\"`.\n * - Any non number values will be stringified and passed through the text section of the format pattern.\n * - `NaN`s and `Infinite`s will use the corresponding strings from the active locale.\n *\n * @param pattern - A format pattern in the ECMA-376 number format.\n * @param value - The value to format.\n * @param [options={}] Formatter options\n\n * @returns A formatted value\n */\nexport function format (\n pattern: string,\n value: any,\n options: Partial = {}\n): string {\n const opts: FormatOptions = Object.assign({}, defaultOptions, options);\n const data = prepareFormatterData(pattern, opts.throws);\n const val = handleDates(value, opts) ?? value;\n return fmtValue(val, data, opts);\n}\n\n/**\n * Find the color appropriate to a value as dictated by a format pattern.\n *\n * If the pattern defines colors, this function will emit the color appropriate\n * to the value. If no colors were specified this function returns `undefined`.\n *\n * ```js\n * const color = formatColor(\"[green]#,##0;[red]-#,##0\", -10);\n * console.log(color); // \"red\"\n * const color = formatColor(\"[green]#,##0;-#,##0\", -10);\n * console.log(color); // undefined\n * ```\n *\n * @param pattern - A format pattern in the ECMA-376 number format.\n * @param value - The value to format.\n * @param [options={}] Formatter options\n * @param [options.throws=true]\n * Should the formatter throw an error if a provided pattern is invalid.\n * If false, a formatter will be constructed which instead outputs an error\n * string (see _invalid_ in this table).\n * `true` by default.\n * @param [options.ignoreTimezone=false]\n * Normally when date objects are used with the formatter, time zone is taken\n * into account. This makes the formatter ignore the timezone offset.\n * `false` by default.\n * @param [options.indexColors=true]\n * When indexed color modifiers are used (`[Color 1]`) the formatter will\n * convert the index into the corresponding hex color of the default palette.\n * When this option is set to false, the number will instead by emitted\n * allowing you to index against a custom palette.\n * `true` by default.\n * @returns\n * A string color value as described by the pattern or a number if the\n * indexColors option has been set to false.\n */\nexport function formatColor (\n pattern: string,\n value: any,\n options?: {\n throws?: boolean;\n ignoreTimezone?: boolean;\n indexColors?: boolean;\n }\n): string | number | undefined {\n const opts = Object.assign({}, defaultOptions, options);\n const data = prepareFormatterData(pattern, opts.throws);\n const val = handleDates(value, opts) ?? value;\n return fmtColor(val, data, opts);\n}\n\n/**\n * Determine if a given format pattern is a date pattern.\n *\n * The pattern is considered a date pattern if any of its sections (`\"a;b;c;d\"`)\n * contains a date operator (such as `Y` or `H`). Each section is restricted to be\n * _either_ a number or date format.\n *\n * @param pattern A format pattern in the ECMA-376 number format.\n * @returns True if the specified pattern is date pattern, False otherwise.\n */\nexport function isDateFormat (pattern: string): boolean {\n const data = prepareFormatterData(pattern, false);\n return isDate(data.partitions);\n}\n\n/**\n * Determine if a given format pattern is a percentage pattern.\n *\n * The pattern is considered a percentage pattern if any of its sections (`\"a;b;c;d\"`)\n * contains an unescaped percentage symbol.\n *\n * @param pattern A format pattern in the ECMA-376 number format.\n * @returns True if the specified pattern is date pattern, False otherwise.\n */\nexport function isPercentFormat (pattern: string): boolean {\n const data = prepareFormatterData(pattern, false);\n return isPercent(data.partitions);\n}\n\n/**\n * Determine if a given format pattern is a text only pattern.\n *\n * The pattern is considered text only if its definition is composed of a single\n * section that includes that text symbol (`@`).\n *\n * For example `@` or `@\" USD\"` are text patterns but `#;@` is not.\n *\n * @param pattern A format pattern in the ECMA-376 number format.\n * @returns True if the specified pattern is date pattern, False otherwise.\n */\nexport function isTextFormat (pattern: string): boolean {\n const data = prepareFormatterData(pattern, false);\n return isText(data.partitions);\n}\n\n/**\n * Determine if a given format pattern is valid.\n *\n * @param pattern A format pattern in the ECMA-376 number format.\n * @returns True if the specified pattern is valid, False otherwise.\n */\nexport function isValidFormat (pattern: string): boolean {\n try {\n prepareFormatterData(pattern, true);\n return true;\n }\n catch (err) {\n return false;\n }\n}\n\n/**\n * Returns an object detailing the properties and internals of a format parsed\n * format pattern.\n *\n * @param pattern A format pattern in the ECMA-376 number format.\n * @param [options={}] Options for the method\n * @param [options.currency]\n * Limit the patterns identified as currency to those that use the give string.\n * If nothing is provided, patterns will be tagged as currency if one of the\n * following currency symbols is used: `¤$£¥֏؋৳฿៛₡₦₩₪₫€₭₮₱₲₴₸₹₺₼₽₾₿`\n * @returns An object of format properties.\n */\nexport function getFormatInfo (pattern: string, options: { currency?: string; } = {}): FormatInfo {\n const data = prepareFormatterData(pattern, false);\n if (!data.info) {\n data.info = info(data.partitions, options?.currency);\n }\n return data.info;\n}\n\n/**\n * Gets information about how date codes are used in a format string.\n *\n * @param pattern A format pattern in the ECMA-376 number format.\n * @returns An object of format date properties.\n */\nexport function getFormatDateInfo (pattern: string): FormatDateInfo {\n const data = prepareFormatterData(pattern, false);\n if (!data.dateInfo) {\n data.dateInfo = dateInfo(data.partitions);\n }\n return data.dateInfo;\n}\n"],"mappings":";AAuBA,MAAa,gBAAgB;AAC7B,MAAa,aAAa;AAC1B,MAAa,aAAa;AAC1B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,aAAa;AAC1B,MAAa,aAAa;AAC1B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,gBAAgB;AAC7B,MAAa,cAAc;AAC3B,MAAa,iBAAiB;AAC9B,MAAa,cAAc;AAC3B,MAAa,iBAAiB;AAC9B,MAAa,iBAAiB;AAC9B,MAAa,kBAAkB;AAC/B,MAAa,cAAc;AAC3B,MAAa,eAAe;AAC5B,MAAa,eAAe;AAC5B,MAAa,cAAc;AAC3B,MAAa,iBAAiB;AAC9B,MAAa,aAAa;AAC1B,MAAa,gBAAgB;AAC7B,MAAa,eAAe;AAC5B,MAAa,aAAa;AAE1B,MAAa,aAAa;AAC1B,MAAa,cAAc;AAC3B,MAAa,aAAa;AAM1B,MAAa,cAAc;AAE3B,MAAa,cAAc;AAC3B,MAAa,gBAAgB;AAC7B,MAAa,aAAa;AAC1B,MAAa,iBAAiB;AAC9B,MAAa,iBAAiB;AAC9B,MAAa,eAAe;AAC5B,MAAa,mBAAmB;AAChC,MAAa,iBAAiB;AAE9B,MAAa,cAAc;AAG3B,MAAa,gBAAgB;AAC7B,MAAa,gBAAgB;AAC7B,MAAa,eAAe;AAC5B,MAAa,eAAe;AAC5B,MAAa,gBAAgB;AAC7B,MAAa,kBAAkB;AAE/B,MAAa,cAAc;CACzB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAa,kBAAkB;CAC7B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAa,oBAAoB,IAAI,OAAO,MAAM,gBAAgB,KAAK,EAAE,IAAI,GAAG;;;AC1KhF,MAAa,eAAkD,OAAO,OAAO;CAC1E,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACP,OAAO;CACN,MAAM;CACN,MAAM;CACP,OAAO;CACP,OAAO;CACP,OAAO;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACP,OAAO;CACN,MAAM;CACP,OAAO;CACN,MAAM;CACP,OAAO;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACP,OAAO;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACP,OAAO;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACP,OAAO;CACN,MAAM;CACP,OAAO;CACN,MAAM;CACP,OAAO;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACP,OAAO;CACN,MAAM;CACN,MAAM;CACP,OAAO;CACN,MAAM;CACN,MAAM;CACP,OAAO;CACN,MAAM;CACP,OAAO;CACP,OAAO;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACP,O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S,IAAI;EAClC,OAAO;CACT,SACO,KAAK;EACV,OAAO;CACT;AACF;;;;;;;;;;;;;AAcA,SAAgB,cAAe,SAAiB,UAAkC,CAAC,GAAe;CAChG,MAAM,OAAO,qBAAqB,SAAS,KAAK;CAChD,IAAI,CAAC,KAAK,MACR,KAAK,OAAO,KAAK,KAAK,YAAY,SAAS,QAAQ;CAErD,OAAO,KAAK;AACd;;;;;;;AAQA,SAAgB,kBAAmB,SAAiC;CAClE,MAAM,OAAO,qBAAqB,SAAS,KAAK;CAChD,IAAI,CAAC,KAAK,UACR,KAAK,WAAW,SAAS,KAAK,UAAU;CAE1C,OAAO,KAAK;AACd"} \ No newline at end of file diff --git a/dist/index.mjs b/dist/index.mjs new file mode 100644 index 0000000..8793da1 --- /dev/null +++ b/dist/index.mjs @@ -0,0 +1,3361 @@ +const TOKEN_GENERAL = "GENERAL"; +const TOKEN_HASH = "HASH"; +const TOKEN_ZERO = "ZERO"; +const TOKEN_QMARK = "QMARK"; +const TOKEN_SLASH = "SLASH"; +const TOKEN_GROUP = "GROUP"; +const TOKEN_SCALE = "SCALE"; +const TOKEN_COMMA = "COMMA"; +const TOKEN_BREAK = "BREAK"; +const TOKEN_TEXT = "TEXT"; +const TOKEN_PLUS = "PLUS"; +const TOKEN_MINUS = "MINUS"; +const TOKEN_POINT = "POINT"; +const TOKEN_SPACE = "SPACE"; +const TOKEN_PERCENT = "PERCENT"; +const TOKEN_DIGIT = "DIGIT"; +const TOKEN_CALENDAR = "CALENDAR"; +const TOKEN_ERROR = "ERROR"; +const TOKEN_DATETIME = "DATETIME"; +const TOKEN_DURATION = "DURATION"; +const TOKEN_CONDITION = "CONDITION"; +const TOKEN_DBNUM = "DBNUM"; +const TOKEN_NATNUM = "NATNUM"; +const TOKEN_LOCALE = "LOCALE"; +const TOKEN_COLOR = "COLOR"; +const TOKEN_MODIFIER = "MODIFIER"; +const TOKEN_AMPM = "AMPM"; +const TOKEN_ESCAPED = "ESCAPED"; +const TOKEN_STRING = "STRING"; +const TOKEN_SKIP = "SKIP"; +const TOKEN_FILL = "FILL"; +const TOKEN_PAREN = "PAREN"; +const TOKEN_CHAR = "CHAR"; +const T_TYPE_FRAC = "FRAC"; +const T_TYPE_YEAR = "YEAR"; +const T_TYPE_YEAR_S = "YEAR-SHORT"; +const T_TYPE_MON = "MONTH"; +const T_TYPE_MNAME_1 = "MONTHNAME-SINGLE"; +const T_TYPE_MNAME_S = "MONTHNAME-SHORT"; +const T_TYPE_MNAME = "MONTHNAME"; +const T_TYPE_WEEKDAY_S = "WEEKDAY-SHORT"; +const T_TYPE_WEEKDAY = "WEEKDAY"; +const T_TYPE_HOUR = "HOUR"; +const T_TYPE_SUBSEC = "SUBSEC"; +const T_TYPE_HOUR_E = "HOUR-ELAP"; +const T_TYPE_MIN_E = "MIN-ELAP"; +const T_TYPE_SEC_E = "SEC-ELAP"; +const T_TYPE_B_YEAR = "B-YEAR"; +const T_TYPE_B_YEAR_S = "B-YEAR-SHORT"; +const indexColors = [ + "#000000", + "#FFFFFF", + "#FF0000", + "#00FF00", + "#0000FF", + "#FFFF00", + "#FF00FF", + "#00FFFF", + "#800000", + "#008000", + "#000080", + "#808000", + "#800080", + "#008080", + "#C0C0C0", + "#808080", + "#9999FF", + "#993366", + "#FFFFCC", + "#CCFFFF", + "#660066", + "#FF8080", + "#0066CC", + "#CCCCFF", + "#000080", + "#FF00FF", + "#FFFF00", + "#00FFFF", + "#800080", + "#800000", + "#008080", + "#0000FF", + "#00CCFF", + "#CCFFFF", + "#CCFFCC", + "#FFFF99", + "#99CCFF", + "#FF99CC", + "#CC99FF", + "#FFCC99", + "#3366FF", + "#33CCCC", + "#99CC00", + "#FFCC00", + "#FF9900", + "#FF6600", + "#666699", + "#969696", + "#003366", + "#339966", + "#003300", + "#333300", + "#993300", + "#993366", + "#333399", + "#333333" +]; +const currencySymbols = [ + "¤", + "$", + "£", + "¥", + "֏", + "؋", + "৳", + "฿", + "៛", + "₡", + "₦", + "₩", + "₪", + "₫", + "€", + "₭", + "₮", + "₱", + "₲", + "₴", + "₸", + "₹", + "₺", + "₼", + "₽", + "₾", + "₿" +]; +const reCurrencySymbols = new RegExp("[" + currencySymbols.join("") + "]"); +//#endregion +//#region lib/codeToLocale.ts +const codeToLocale = Object.freeze({ + 1078: "af", + 1052: "sq", + 1118: "am", + 5121: "ar_DZ", + 15361: "ar_BH", + 3073: "ar_EG", + 2049: "ar_IQ", + 11265: "ar_JO", + 13313: "ar_KW", + 12289: "ar_LB", + 4097: "ar_LY", + 6145: "ar_MA", + 8193: "ar_OM", + 16385: "ar_QA", + 1025: "ar_SA", + 10241: "ar_SY", + 7169: "ar_TN", + 14337: "ar_AE", + 9217: "ar_YE", + 1067: "hy", + 1101: "as", + 2092: "az_AZ", + 1068: "az_AZ", + 1069: "eu", + 1059: "be", + 2117: "bn", + 1093: "bn_IN", + 5146: "bs", + 1026: "bg", + 1109: "my", + 1027: "ca", + 2052: "zh_CN", + 3076: "zh_HK", + 5124: "zh_MO", + 4100: "zh_SG", + 1028: "zh_TW", + 1050: "hr", + 1029: "cs", + 1030: "da", + 1125: "dv", + 2067: "nl_BE", + 1043: "nl_NL", + 1126: "bin", + 3081: "en_AU", + 10249: "en_BZ", + 4105: "en_CA", + 9225: "en_CB", + 2057: "en_GB", + 16393: "en_IN", + 6153: "en_IE", + 8201: "en_JM", + 5129: "en_NZ", + 13321: "en_PH", + 7177: "en_ZA", + 11273: "en_TT", + 1033: "en_US", + 12297: "en_ZW", + 1061: "et", + 1071: "mk", + 1080: "fo", + 1065: "fa", + 1124: "fil", + 1035: "fi", + 2060: "fr_BE", + 11276: "fr_CM", + 3084: "fr_CA", + 9228: "fr_CG", + 12300: "fr_CI", + 1036: "fr_FR", + 5132: "fr_LU", + 13324: "fr_ML", + 6156: "fr_MC", + 14348: "fr_MA", + 10252: "fr_SN", + 4108: "fr_CH", + 7180: "fr", + 1122: "fy_NL", + 2108: "gd_IE", + 1084: "gd", + 1110: "gl", + 1079: "ka", + 3079: "de_AT", + 1031: "de_DE", + 5127: "de_LI", + 4103: "de_LU", + 2055: "de_CH", + 1032: "el", + 1140: "gn", + 1095: "gu", + 1279: "en", + 1037: "he", + 1081: "hi", + 1038: "hu", + 1039: "is", + 1136: "ig_NG", + 1057: "id", + 1040: "it_IT", + 2064: "it_CH", + 1041: "ja", + 1099: "kn", + 1120: "ks", + 1087: "kk", + 1107: "km", + 1111: "kok", + 1042: "ko", + 1088: "ky", + 1108: "lo", + 1142: "la", + 1062: "lv", + 1063: "lt", + 2110: "ms_BN", + 1086: "ms_MY", + 1100: "ml", + 1082: "mt", + 1112: "mni", + 1153: "mi", + 1102: "mr", + 1104: "mn", + 2128: "mn", + 1121: "ne", + 1044: "no_NO", + 2068: "no_NO", + 1096: "or", + 1045: "pl", + 1046: "pt_BR", + 2070: "pt_PT", + 1094: "pa", + 1047: "rm", + 2072: "ro_MO", + 1048: "ro_RO", + 1049: "ru", + 2073: "ru_MO", + 1083: "se", + 1103: "sa", + 3098: "sr_SP", + 2074: "sr_SP", + 1072: "st", + 1074: "tn", + 1113: "sd", + 1115: "si", + 1051: "sk", + 1060: "sl", + 1143: "so", + 1070: "sb", + 11274: "es_AR", + 16394: "es_BO", + 13322: "es_CL", + 9226: "es_CO", + 5130: "es_CR", + 7178: "es_DO", + 12298: "es_EC", + 17418: "es_SV", + 4106: "es_GT", + 18442: "es_HN", + 2058: "es_MX", + 19466: "es_NI", + 6154: "es_PA", + 15370: "es_PY", + 10250: "es_PE", + 20490: "es_PR", + 1034: "es_ES", + 14346: "es_UY", + 8202: "es_VE", + 1089: "sw", + 2077: "sv_FI", + 1053: "sv_SE", + 1114: "syc", + 1064: "tg", + 1097: "ta", + 1092: "tt", + 1098: "te", + 1054: "th", + 1105: "bo", + 1073: "ts", + 1055: "tr", + 1090: "tk", + 1058: "uk", + 1056: "ur", + 2115: "uz_UZ", + 1091: "uz_UZ", + 1075: "ve", + 1066: "vi", + 1106: "cy", + 1076: "xh", + 1085: "yi", + 1077: "zu" +}); +//#endregion +//#region lib/locale.ts +const re_locale = /^([a-z\d]+)(?:[_-]([a-z\d]+))?(?:\.([a-z\d]+))?(?:@([a-z\d]+))?$/i; +const locales = {}; +/** +* Split a semicolon delimited string and replace instances of characters +* @internal +* @param str Semicolon delimited string +* @param [tilde] String to be inserted on every instance of ~ +* @returns Array of strings +*/ +const _ = (str, tilde = "") => str.replace(/~/g, tilde).split(";"); +/** +* Generate mmm and ddd properties as needed for locales. Many of them +* are straightforward abreviations of mmmm and dddd so we can save some +* bytes by auto-generating them. +* +* Both rule parameters use the same system. If shortform prop is missing: +* +* - 0 - use long form array unchanged +* - 1...9 - shorten to N many characters +* - 11...19 - shorten to 1...9 characters and add periods +* +* @internal +* @param o Locale object +* @param [ml] Month list rule +* @param [dl] Day list rule +* @returns The same input object, but with ddd and mmm filled in. +*/ +const xm = (o, ml = 0, dl = 0) => { + if (!o.mmm) o.mmm = ml < 1 ? o.mmmm.concat() : o.mmmm.map((d) => { + const s = d.slice(0, ml % 10); + return s + (ml < 10 || d === s ? "" : "."); + }); + if (!o.ddd) o.ddd = dl < 1 ? o.dddd.concat() : o.dddd.map((d) => { + const s = d.slice(0, dl % 10); + return s + (dl < 10 || d === s ? "" : "."); + }); + if (!o.mmm6 && o.mmmm6) o.mmm6 = o.mmmm6; + return o; +}; +/** @ignore */ +const baseLocaleData = { + group: "\xA0", + decimal: ".", + positive: "+", + negative: "-", + percent: "%", + exponent: "E", + nan: "NaN", + infinity: "∞", + ampm: _("AM;PM"), + mmmm6: _("Muharram;Safar;Rabiʻ I;Rabiʻ II;Jumada I;Jumada II;Rajab;Shaʻban;Ramadan;Shawwal;Dhuʻl-Qiʻdah;Dhuʻl-Hijjah"), + mmm6: _("Muh.;Saf.;Rab. I;Rab. II;Jum. I;Jum. II;Raj.;Sha.;Ram.;Shaw.;Dhuʻl-Q.;Dhuʻl-H."), + mmmm: _("January;February;March;April;May;June;July;August;September;October;November;December"), + mmm: _("Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec"), + dddd: _("Sunday;Monday;Tuesday;Wednesday;Thursday;Friday;Saturday"), + ddd: _("Sun;Mon;Tue;Wed;Thu;Fri;Sat"), + bool: _("TRUE;FALSE"), + preferMDY: false +}; +/** +* Parse a regular IETF BCP 47 locale tag (`en-US`) and emit an object of its parts. +* Irregular tags and subtags are not supported. +* +* @param locale A BCP 47 string tag of the locale. +* @returns An object describing the locale. +*/ +function parseLocale(locale) { + const lm = re_locale.exec(locale); + if (!lm) throw new SyntaxError(`Malformed locale: ${locale}`); + return { + lang: lm[1] + (lm[2] ? "-" + lm[2] : ""), + language: lm[1], + territory: lm[2] || "" + }; +} +function resolveLocale(l4e) { + if (typeof l4e === "number") return codeToLocale[l4e & 65535] || void 0; + const wincode = parseInt(l4e, 16); + if (isFinite(wincode) && codeToLocale[wincode & 65535]) return codeToLocale[wincode & 65535] || void 0; + if (re_locale.test(l4e)) return l4e; +} +/** +* Used by the formatter to pull a locate from its registered locales. If +* subtag isn't available but the base language is, the base language is used: +* So if `en-CA` is not found, the formatter tries to find `en` else it +* returns `undefined`. +* +* @param locale A BCP 47 string tag of the locale, or an Excel locale code. +* @returns An object of format date properties if one was found. +*/ +function getLocale(locale) { + const tag = resolveLocale(locale); + let obj; + if (tag) { + const c = parseLocale(tag); + obj = locales[c.lang] || locales[c.language] || void 0; + } + return obj; +} +function createLocale(data) { + return Object.assign({}, baseLocaleData, data); +} +/** +* Register locale data for a language to use when formatting. +* +* Any partial set of properties may be returned to have the defaults used where properties are missing. +* +* @param localeSettings - A collection of settings for a locale. +* @param [localeSettings.group="\u00a0"] +* Symbol used as a grouping separator (`1,000,000` uses `,`) +* @param [localeSettings.decimal="."] +* Symbol used to separate integers from fractions (usually `.`) +* @param [localeSettings.positive="+"] +* Symbol used to indicate positive numbers (usually `+`) +* @param [localeSettings.negative="-"] +* Symbol used to indicate positive numbers (usually `-`) +* @param [localeSettings.percent="%"] +* Symbol used to indicate a percentage (usually `%`) +* @param [localeSettings.exponent="E"] +* Symbol used to indicate an exponent (usually `E`) +* @param [localeSettings.nan="NaN"] +* Symbol used to indicate NaN values (`NaN`) +* @param [localeSettings.infinity="∞"] +* Symbol used to indicate infinite values (`∞`) +* @param [localeSettings.ampm=["AM","PM"]] +* How AM and PM should be presented. +* @param [localeSettings.mmmm6=["Muharram", "Safar", "Rabiʻ I", "Rabiʻ II", "Jumada I", "Jumada II", "Rajab", "Shaʻban", "Ramadan", "Shawwal", "Dhuʻl-Qiʻdah", "Dhuʻl-Hijjah"]] +* Long month names for the Islamic calendar (e.g. `Rajab`) +* @param [localeSettings.mmm6=["Muh.", "Saf.", "Rab. I", "Rab. II", "Jum. I", "Jum. II", "Raj.", "Sha.", "Ram.", "Shaw.", "Dhuʻl-Q.", "Dhuʻl-H."]] +* Short month names for the Islamic calendar (e.g. `Raj.`) +* @param [localeSettings.mmmm=["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]] +* Long month names for the Gregorian calendar (e.g. `November`) +* @param [localeSettings.mmm=["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]] +* Short month names for the Gregorian calendar (e.g. `Nov`) +* @param [localeSettings.dddd=["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]] +* Long day names (e.g. `Wednesday`) +* @param [localeSettings.ddd=["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]] +* Shortened day names (e.g. `Wed`) +* @param [localeSettings.bool=["TRUE", "FALSE"]] +* How TRUE and FALSE should be presented. +* @param {boolean} [localeSettings.preferMDY=false] +* Is the prefered date format month first (12/31/2025) or day first (31/12/2025) +* @param l4e - A string BCP 47 tag of the locale. +* @returns A full collection of settings for a locale +*/ +function addLocale(localeSettings, l4e) { + const c = typeof l4e === "object" ? l4e : parseLocale(l4e); + locales[c.lang] = createLocale(localeSettings); + if (c.language !== c.lang && !locales[c.language]) locales[c.language] = createLocale(localeSettings); + return locales[c.lang]; +} +const defaultLocale = createLocale({ + group: ",", + preferMDY: true +}); +defaultLocale.isDefault = true; +addLocale({ + group: ",", + ampm: _("上午;下午"), + mmmm: _("一月;二月;三月;四月;五月;六月;七月;八月;九月;十月;十一月;十二月"), + mmm: _("1月;2月;3月;4月;5月;6月;7月;8月;9月;10月;11月;12月"), + dddd: _("~日;~一;~二;~三;~四;~五;~六", "星期"), + ddd: _("周日;周一;周二;周三;周四;周五;周六") +}, "zh-CN"); +const _zh = { + group: ",", + ampm: _("上午;下午"), + mmmm: _("1月;2月;3月;4月;5月;6月;7月;8月;9月;10月;11月;12月"), + mmm: _("1月;2月;3月;4月;5月;6月;7月;8月;9月;10月;11月;12月"), + dddd: _("~日;~一;~二;~三;~四;~五;~六", "星期"), + ddd: _("周日;周一;周二;周三;周四;周五;周六") +}; +addLocale({ + ..._zh, + nan: "非數值", + dddd: _("~日;~一;~二;~三;~四;~五;~六", "星期") +}, "zh-TW"); +addLocale({ + ..._zh, + dddd: _("~日;~一;~二;~三;~四;~五;~六", "星期") +}, "zh-HK"); +addLocale({ + ..._zh, + ampm: _("午前;午後"), + dddd: _("日~;月~;火~;水~;木~;金~;土~", "曜日"), + ddd: _("日;月;火;水;木;金;土") +}, "ja"); +addLocale({ + group: ",", + ampm: _("오전;오후"), + mmmm: _("1월;2월;3월;4월;5월;6월;7월;8월;9월;10월;11월;12월"), + mmm: _("1월;2월;3월;4월;5월;6월;7월;8월;9월;10월;11월;12월"), + dddd: _("일요일;월요일;화요일;수요일;목요일;금요일;토요일"), + ddd: _("일;월;화;수;목;금;토") +}, "ko"); +addLocale({ + group: ",", + ampm: _("ก่อนเที่ยง;หลังเที่ยง"), + mmmm: _("มกร~;กุมภาพันธ์;มีน~;เมษายน;พฤษภ~;มิถุนายน;กรกฎ~;สิงห~;กันยายน;ตุล~;พฤศจิกายน;ธันว~", "าคม"), + mmm: _("ม.ค.;ก.พ.;มี.ค.;เม.ย.;พ.ค.;มิ.ย.;ก.ค.;ส.ค.;ก.ย.;ต.ค.;พ.ย.;ธ.ค."), + dddd: _("วันอาทิตย์;วันจันทร์;วันอังคาร;วันพุธ;วันพฤหัสบดี;วันศุกร์;วันเสาร์"), + ddd: _("อา.;จ.;อ.;พ.;พฤ.;ศ.;ส.") +}, "th"); +addLocale(xm({ + decimal: ",", + ampm: _("dop.;odp."), + mmmm: _("ledna;února;března;dubna;května;června;července;srpna;září;října;listopadu;prosince"), + mmm: _("I;II;III;IV;V;VI;VII;VIII;IX;X;XI;XII"), + dddd: _("neděle;pondělí;úterý;středa;čtvrtek;pátek;sobota"), + bool: _("PRAVDA;NEPRAVDA") +}, -1, 2), "cs"); +addLocale(xm({ + group: ".", + decimal: ",", + mmmm: _("januar;februar;marts;april;maj;juni;juli;august;september;oktober;november;december"), + dddd: _("søn~;man~;tirs~;ons~;tors~;fre~;lør~", "dag"), + bool: _("SAND;FALSK") +}, 13, 13), "da"); +addLocale(xm({ + group: ".", + decimal: ",", + ampm: _("a.m.;p.m."), + mmmm: _("januari;februari;maart;april;mei;juni;juli;augustus;september;oktober;november;december"), + mmm: _("jan.;feb.;mrt.;apr.;mei;jun.;jul.;aug.;sep.;okt.;nov.;dec."), + dddd: _("zondag;maandag;dinsdag;woensdag;donderdag;vrijdag;zaterdag"), + bool: _("WAAR;ONWAAR") +}, -1, 2), "nl"); +addLocale({ + group: ",", + preferMDY: true +}, "en"); +addLocale({ + group: ",", + preferMDY: true +}, "en-US"); +addLocale({ group: "," }, "en-AU"); +addLocale({ group: "," }, "en-CA"); +addLocale({ group: "," }, "en-GB"); +addLocale({ + group: ",", + mmm: _("Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sept;Oct;Nov;Dec") +}, "en-IE"); +addLocale(xm({ + decimal: ",", + nan: "epäluku", + ampm: _("ap.;ip."), + mmmm: _("tammi~;helmi~;maalis~;huhti~;touko~;kesä~;heinä~;elo~;syys~;loka~;marras~;joulu~", "kuuta"), + mmm: _("tammik.;helmik.;maalisk.;huhtik.;toukok.;kesäk.;heinäk.;elok.;syysk.;lokak.;marrask.;jouluk."), + dddd: _("sunnun~;maanan~;tiis~;keskiviikkona;tors~;perjan~;lauan~", "taina"), + bool: _("TOSI;EPÄTOSI") +}, -1, 2), "fi"); +const _fr = xm({ + group: " ", + decimal: ",", + mmmm: _("janvier;février;mars;avril;mai;juin;juillet;août;septembre;octobre;novembre;décembre"), + mmm: _("janv.;févr.;mars;avr.;mai;juin;juil.;août;sept.;oct.;nov.;déc."), + dddd: _("~manche;lun~;mar~;mercre~;jeu~;vendre~;same~", "di"), + bool: _("VRAI;FAUX") +}, -1, 13); +addLocale({ ..._fr }, "fr"); +addLocale({ + ..._fr, + mmm: _("janv.;févr.;mars;avr.;mai;juin;juill.;août;sept.;oct.;nov.;déc.") +}, "fr-CA"); +addLocale({ + group: "'", + decimal: ".", + ..._fr +}, "fr-CH"); +const _de = xm({ + mmmm: _("Januar;Februar;März;April;Mai;Juni;Juli;August;September;Oktober;November;Dezember"), + mmm: _("Jan.;Feb.;März;Apr.;Mai;Juni;Juli;Aug.;Sept.;Okt.;Nov.;Dez."), + dddd: _("Sonn~;Mon~;Diens~;Mittwoch;Donners~;Frei~;Sams~", "tag"), + bool: _("WAHR;FALSCH") +}, -1, 12); +addLocale({ + group: ".", + decimal: ",", + ..._de +}, "de"); +addLocale({ + group: "'", + decimal: ".", + ..._de +}, "de-CH"); +addLocale(xm({ + group: ".", + decimal: ",", + ampm: _("π.μ.;μ.μ."), + mmmm: _("Ιανουαρ~;Φεβρουαρ~;Μαρτ~;Απριλ~;Μαΐου;Ιουν~;Ιουλ~;Αυγούστου;Σεπτεμβρ~;Οκτωβρ~;Νοεμβρ~;Δεκεμβρ~", "ίου"), + mmm: _("Ιαν;Φεβ;Μαρ;Απρ;Μαΐ;Ιουν;Ιουλ;Αυγ;Σεπ;Οκτ;Νοε;Δεκ"), + dddd: _("Κυριακή;Δευτέρα;Τρίτη;Τετάρτη;Πέμπτη;Παρασκευή;Σάββατο") +}, -1, 3), "el"); +addLocale({ + decimal: ",", + ampm: _("de.;du."), + mmmm: _("január;február;március;április;május;június;július;augusztus;szeptember;október;november;december"), + mmm: _("jan.;febr.;márc.;ápr.;máj.;jún.;júl.;aug.;szept.;okt.;nov.;dec."), + dddd: _("vasárnap;hétfő;kedd;szerda;csütörtök;péntek;szombat"), + ddd: _("V;H;K;Sze;Cs;P;Szo"), + bool: _("IGAZ;HAMIS") +}, "hu"); +addLocale(xm({ + group: ".", + decimal: ",", + ampm: _("f.h.;e.h."), + mmmm: _("janúar;febrúar;mars;apríl;maí;júní;júlí;ágúst;september;október;nóvember;desember"), + dddd: _("sunnu~;mánu~;þriðju~;miðviku~;fimmtu~;föstu~;laugar~", "dagur") +}, 13, 13), "is"); +addLocale(xm({ + group: ".", + decimal: ",", + mmmm: _("Januari;Februari;Maret;April;Mei;Juni;Juli;Agustus;September;Oktober;November;Desember"), + dddd: _("Minggu;Senin;Selasa;Rabu;Kamis;Jumat;Sabtu") +}, 3, 3), "id"); +const _it = xm({ + mmmm: _("gennaio;febbraio;marzo;aprile;maggio;giugno;luglio;agosto;settembre;ottobre;novembre;dicembre"), + dddd: _("domenica;lunedì;martedì;mercoledì;giovedì;venerdì;sabato"), + bool: _("VERO;FALSO") +}, 3, 3); +addLocale({ + group: ".", + decimal: ",", + ..._it +}, "it"); +addLocale({ + group: "'", + decimal: ".", + ..._it +}, "it-CH"); +const _no = { + decimal: ",", + ampm: _("a.m.;p.m."), + mmmm: _("januar;februar;mars;april;mai;juni;juli;august;september;oktober;november;desember"), + mmm: _("jan.;feb.;mar.;apr.;mai;jun.;jul.;aug.;sep.;okt.;nov.;des."), + dddd: _("søn~;man~;tirs~;ons~;tors~;fre~;lør~", "dag"), + bool: _("SANN;USANN") +}; +addLocale(xm({ ..._no }, -1, 13), "nb"); +addLocale(xm({ ..._no }, -1, 13), "no"); +addLocale(xm({ + decimal: ",", + mmmm: _("stycznia;lutego;marca;kwietnia;maja;czerwca;lipca;sierpnia;września;października;listopada;grudnia"), + dddd: _("niedziela;poniedziałek;wtorek;środa;czwartek;piątek;sobota"), + ddd: _("niedz.;pon.;wt.;śr.;czw.;pt.;sob."), + bool: _("PRAWDA;FAŁSZ") +}, 3, -1), "pl"); +const _pt = { + group: ".", + decimal: ",", + mmmm: _("janeiro;fevereiro;março;abril;maio;junho;julho;agosto;setembro;outubro;novembro;dezembro"), + dddd: _("domingo;segunda-feira;terça-feira;quarta-feira;quinta-feira;sexta-feira;sábado"), + bool: _("VERDADEIRO;FALSO") +}; +addLocale(xm(_pt, 13, 13), "pt"); +addLocale(xm(_pt, 13, 13), "pt-BR"); +addLocale({ + decimal: ",", + nan: "не\xA0число", + mmmm: _("января;февраля;марта;апреля;мая;июня;июля;августа;сентября;октября;ноября;декабря"), + mmm: _("янв.;февр.;мар.;апр.;мая;июн.;июл.;авг.;сент.;окт.;нояб.;дек."), + dddd: _("воскресенье;понедельник;вторник;среда;четверг;пятница;суббота"), + ddd: _("вс;пн;вт;ср;чт;пт;сб"), + mmmm6: _("рамадан;шавваль;зуль-каада;зуль-хиджжа;мухаррам;раби-уль-авваль;раби-уль-ахир;джумад-уль-авваль;джумад-уль-ахир;раджаб;шаабан;рамадан"), + mmm6: _("рам.;шав.;зуль-к.;зуль-х.;мух.;раб. I;раб. II;джум. I;джум. II;радж.;шааб.;рам."), + bool: _("ИСТИНА;ЛОЖЬ") +}, "ru"); +addLocale(xm({ + decimal: ",", + mmmm: _("januára;februára;marca;apríla;mája;júna;júla;augusta;septembra;októbra;novembra;decembra"), + dddd: _("nedeľa;pondelok;utorok;streda;štvrtok;piatok;sobota") +}, 3, 2), "sk"); +const _es = { + group: ".", + decimal: ",", + ampm: _("a.\xA0m.;p.\xA0m."), + mmmm: _("enero;febrero;marzo;abril;mayo;junio;julio;agosto;septiem~;octu~;noviem~;diciem~", "bre"), + mmm: _("ene;feb;mar;abr;may;jun;jul;ago;sept;oct;nov;dic"), + dddd: _("domingo;lunes;martes;miércoles;jueves;viernes;sábado"), + ddd: _("dom;lun;mar;mié;jue;vie;sáb"), + bool: _("VERDADERO;FALSO") +}; +const _esM3 = _("ene;feb;mar;abr;may;jun;jul;ago;sep;oct;nov;dic"); +const _esM13 = _("ene.;feb.;mar.;abr.;may.;jun.;jul.;ago.;sept.;oct.;nov.;dic."); +addLocale({ ..._es }, "es"); +addLocale({ ..._es }, "es-AR"); +addLocale({ ..._es }, "es-BO"); +addLocale({ ..._es }, "es-CL"); +addLocale({ ..._es }, "es-CO"); +addLocale({ ..._es }, "es-EC"); +addLocale({ + ..._es, + mmm: _esM3, + ampm: _("a.m.;p.m.") +}, "es-MX"); +addLocale({ + ..._es, + mmm: _esM13 +}, "es-PY"); +addLocale({ + ..._es, + mmm: _esM13 +}, "es-UY"); +addLocale({ + ..._es, + mmm: _esM13, + mmmm: _("enero;febrero;marzo;abril;mayo;junio;julio;agosto;setiembre;octubre;noviembre;diciembre") +}, "es-VE"); +addLocale({ + decimal: ",", + ampm: _("fm;em"), + mmmm: _("januari;februari;mars;april;maj;juni;juli;augusti;september;oktober;november;december"), + mmm: _("jan.;feb.;mars;apr.;maj;juni;juli;aug.;sep.;okt.;nov.;dec."), + dddd: _("sön~;mån~;tis~;ons~;tors~;fre~;lör~", "dag"), + ddd: _("sön;mån;tis;ons;tors;fre;lör") +}, "sv"); +addLocale(xm({ + group: ".", + decimal: ",", + ampm: _("ÖÖ;ÖS"), + mmmm: _("Ocak;Şubat;Mart;Nisan;Mayıs;Haziran;Temmuz;Ağustos;Eylül;Ekim;Kasım;Aralık"), + mmm: _("Oca;Şub;Mar;Nis;May;Haz;Tem;Ağu;Eyl;Eki;Kas;Ara"), + dddd: _("Pazar;Pazartesi;Salı;Çarşamba;Perşembe;Cuma;Cumartesi"), + ddd: _("Paz;Pzt;Sal;Çar;Per;Cum;Cmt"), + bool: _("DOĞRU;YANLIŞ") +}, 3, -1), "tr"); +addLocale({ + group: ",", + ampm: _("yb;yh"), + mmmm: _("Ionawr;Chwefror;Mawrth;Ebrill;Mai;Mehefin;Gorffennaf;Awst;Medi;Hydref;Tachwedd;Rhagfyr"), + mmm: _("Ion;Chwef;Maw;Ebr;Mai;Meh;Gorff;Awst;Medi;Hyd;Tach;Rhag"), + dddd: _("Dydd Sul;Dydd Llun;Dydd Mawrth;Dydd Mercher;Dydd Iau;Dydd Gwener;Dydd Sadwrn"), + ddd: _("Sul;Llun;Maw;Mer;Iau;Gwen;Sad") +}, "cy"); +addLocale({ + group: ".", + decimal: ",", + mmmm: _("yanvar;fevral;mart;aprel;may;iyun;iyul;avqust;sentyabr;oktyabr;noyabr;dekabr"), + mmm: _("yan;fev;mar;apr;may;iyn;iyl;avq;sen;okt;noy;dek"), + dddd: _("bazar;bazar ertəsi;çərşənbə axşamı;çərşənbə;cümə axşamı;cümə;şənbə"), + ddd: _("B.;B.e.;Ç.a.;Ç.;C.a.;C.;Ş.") +}, "az"); +addLocale(xm({ + decimal: ",", + mmmm: _("студзеня;лютага;сакавіка;красавіка;мая;чэрвеня;ліпеня;жніўня;верасня;кастрычніка;лістапада;снежня"), + dddd: _("нядзеля;панядзелак;аўторак;серада;чацвер;пятніца;субота"), + ddd: _("нд;пн;аў;ср;чц;пт;сб") +}, 3, -1), "be"); +addLocale({ + decimal: ",", + ampm: _("пр.об.;сл.об."), + mmmm: _("януари;февруари;март;април;май;юни;юли;август;септември;октомври;ноември;декември"), + mmm: _("яну;фев;март;апр;май;юни;юли;авг;сеп;окт;ное;дек"), + dddd: _("неделя;понеделник;вторник;сряда;четвъртък;петък;събота"), + ddd: _("нд;пн;вт;ср;чт;пт;сб"), + bool: _("ИСТИНА;ЛОЖЬ") +}, "bg"); +addLocale({ + group: ".", + decimal: ",", + mmmm: _("de gener;de febrer;de març;d’abril;de maig;de juny;de juliol;d’agost;de setembre;d’octubre;de novembre;de desembre"), + mmm: _("de gen.;de febr.;de març;d’abr.;de maig;de juny;de jul.;d’ag.;de set.;d’oct.;de nov.;de des."), + dddd: _("diumenge;dilluns;dimarts;dimecres;dijous;divendres;dissabte"), + ddd: _("dg.;dl.;dt.;dc.;dj.;dv.;ds."), + ampm: _("a.\xA0m.;p.\xA0m.") +}, "ca"); +addLocale(xm({ + group: ",", + decimal: ".", + mmmm: _("Enero;Pebrero;Marso;Abril;Mayo;Hunyo;Hulyo;Agosto;Setyembre;Oktubre;Nobyembre;Disyembre"), + dddd: _("Linggo;Lunes;Martes;Miyerkules;Huwebes;Biyernes;Sabado") +}, 3, 3), "fil"); +addLocale({ + group: ",", + decimal: ".", + mmmm: _("જાન્યુઆરી;ફેબ્રુઆરી;માર્ચ;એપ્રિલ;મે;જૂન;જુલાઈ;ઑગસ્ટ;સપ્ટેમ્બર;ઑક્ટોબર;નવેમ્બર;ડિસેમ્બર"), + mmm: _("જાન્યુ;ફેબ્રુ;માર્ચ;એપ્રિલ;મે;જૂન;જુલાઈ;ઑગસ્ટ;સપ્ટે;ઑક્ટો;નવે;ડિસે"), + dddd: _("રવિ~;સોમ~;મંગળ~;બુધ~;ગુરુ~;શુક્ર~;શનિ~", "વાર"), + ddd: _("રવિ;સોમ;મંગળ;બુધ;ગુરુ;શુક્ર;શનિ") +}, "gu"); +addLocale({ + group: ",", + decimal: ".", + ampm: _("לפנה״צ;אחה״צ"), + dddd: _("~ראשון;~שני;~שלישי;~רביעי;~חמישי;~שישי;~שבת", "יום "), + ddd: _("~א׳;~ב׳;~ג׳;~ד׳;~ה׳;~ו׳;שבת", "יום "), + mmmm: _("ינואר;פברואר;מרץ;אפריל;מאי;יוני;יולי;אוגוסט;ספטמבר;אוקטובר;נובמבר;דצמבר"), + mmm: _("ינו׳;פבר׳;מרץ;אפר׳;מאי;יוני;יולי;אוג׳;ספט׳;אוק׳;נוב׳;דצמ׳"), + mmmm6: _("רמדאן;שוואל;ד׳ו אל־קעדה;ד׳ו אל־חיג׳ה;מוחרם;רביע אל־אוול;רביע א־ת׳אני;ג׳ומאדא אל־אולא;ג׳ומאדא א־ת׳אניה;רג׳ב;שעבאן;רמדאן"), + mmm6: _("רמדאן;שוואל;ד׳ו אל־קעדה;ד׳ו אל־חיג׳ה;מוחרם;רביע א׳;רביע ב׳;ג׳ומאדא א׳;ג׳ומאדא ב׳;רג׳ב;שעבאן;רמדאן") +}, "he"); +addLocale(xm({ + group: ".", + decimal: ",", + mmmm: _("siječnja;veljače;ožujka;travnja;svibnja;lipnja;srpnja;kolovoza;rujna;listopada;studenoga;prosinca"), + mmm: _("sij;velj;ožu;tra;svi;lip;srp;kol;ruj;lis;stu;pro"), + dddd: _("nedjelja;ponedjeljak;utorak;srijeda;četvrtak;petak;subota") +}, -1, 3), "hr"); +addLocale({ + decimal: ",", + mmmm: _("հունվարի;փետրվարի;մարտի;ապրիլի;մայիսի;հունիսի;հուլիսի;օգոստոսի;սեպտեմբերի;հոկտեմբերի;նոյեմբերի;դեկտեմբերի"), + mmm: _("հնվ;փտվ;մրտ;ապր;մյս;հնս;հլս;օգս;սեպ;հոկ;նոյ;դեկ"), + dddd: _("կիրակի;երկուշաբթի;երեքշաբթի;չորեքշաբթի;հինգշաբթի;ուրբաթ;շաբաթ"), + ddd: _("կիր;երկ;երք;չրք;հնգ;ուր;շբթ") +}, "hy"); +addLocale(xm({ + decimal: ",", + mmmm: _("იანვარი;თებერვალი;მარტი;აპრილი;მაისი;ივნისი;ივლისი;აგვისტო;სექტემბერი;ოქტომბერი;ნოემბერი;დეკემბერი"), + dddd: _("კვირა;ორშაბათი;სამშაბათი;ოთხშაბათი;ხუთშაბათი;პარასკევი;შაბათი") +}, 3, 3), "ka"); +addLocale(xm({ + decimal: ",", + mmmm: _("қаңтар;ақпан;наурыз;сәуір;мамыр;маусым;шілде;тамыз;қыркүйек;қазан;қараша;желтоқсан"), + dddd: _("жексенбі;дүйсенбі;сейсенбі;сәрсенбі;бейсенбі;жұма;сенбі"), + ddd: _("жс;дс;сс;ср;бс;жм;сб") +}, 13, -1), "kk"); +addLocale({ + group: ",", + mmmm: _("ಜನವರಿ;ಫೆಬ್ರವರಿ;ಮಾರ್ಚ್;ಏಪ್ರಿಲ್;ಮೇ;ಜೂನ್;ಜುಲೈ;ಆಗಸ್ಟ್;ಸೆಪ್ಟೆಂಬರ್;ಅಕ್ಟೋಬರ್;ನವೆಂಬರ್;ಡಿಸೆಂಬರ್"), + mmm: _("ಜನವರಿ;ಫೆಬ್ರವರಿ;ಮಾರ್ಚ್;ಏಪ್ರಿ;ಮೇ;ಜೂನ್;ಜುಲೈ;ಆಗಸ್ಟ್;ಸೆಪ್ಟೆಂ;ಅಕ್ಟೋ;ನವೆಂ;ಡಿಸೆಂ"), + dddd: _("ಭಾನು~;ಸೋಮ~;ಮಂಗಳ~;ಬುಧ~;ಗುರು~;ಶುಕ್ರ~;ಶನಿ~", "ವಾರ"), + ddd: _("ಭಾನು;ಸೋಮ;ಮಂಗಳ;ಬುಧ;ಗುರು;ಶುಕ್ರ;ಶನಿ"), + ampm: _("ಪೂರ್ವಾಹ್ನ;ಅಪರಾಹ್ನ") +}, "kn"); +addLocale({ + decimal: ",", + mmmm: _("sausio;vasario;kovo;balandžio;gegužės;birželio;liepos;rugpjūčio;rugsėjo;spalio;lapkričio;gruodžio"), + mmm: _("saus.;vas.;kov.;bal.;geg.;birž.;liep.;rugp.;rugs.;spal.;lapkr.;gruod."), + dddd: _("sekmadienis;pirmadienis;antradienis;trečiadienis;ketvirtadienis;penktadienis;šeštadienis"), + ddd: _("sk;pr;an;tr;kt;pn;št"), + ampm: _("priešpiet;popiet") +}, "lt"); +addLocale({ + decimal: ",", + mmmm: _("janvāris;februāris;marts;aprīlis;maijs;jūnijs;jūlijs;augusts;septembris;oktobris;novembris;decembris"), + mmm: _("janv.;febr.;marts;apr.;maijs;jūn.;jūl.;aug.;sept.;okt.;nov.;dec."), + dddd: _("svētdiena;pirmdiena;otrdiena;trešdiena;ceturtdiena;piektdiena;sestdiena"), + ddd: _("svētd.;pirmd.;otrd.;trešd.;ceturtd.;piektd.;sestd."), + ampm: _("priekšpusdienā;pēcpusdienā") +}, "lv"); +addLocale({ + group: ",", + decimal: ".", + mmmm: _("ജനുവരി;ഫെബ്രുവരി;മാർച്ച്;ഏപ്രിൽ;മേയ്;ജൂൺ;ജൂലൈ;ഓഗസ്റ്റ്;സെപ്റ്റംബർ;ഒക്‌ടോബർ;നവംബർ;ഡിസംബർ"), + mmm: _("ജനു;ഫെബ്രു;മാർ;ഏപ്രി;മേയ്;ജൂൺ;ജൂലൈ;ഓഗ;സെപ്റ്റം;ഒക്ടോ;നവം;ഡിസം"), + dddd: _("ഞായറാഴ്‌ച;തിങ്കളാഴ്‌ച;ചൊവ്വാഴ്ച;ബുധനാഴ്‌ച;വ്യാഴാഴ്‌ച;വെള്ളിയാഴ്‌ച;ശനിയാഴ്‌ച"), + ddd: _("ഞായർ;തിങ്കൾ;ചൊവ്വ;ബുധൻ;വ്യാഴം;വെള്ളി;ശനി") +}, "ml"); +addLocale({ + group: ",", + decimal: ".", + mmmm: _("нэгдүгээ~;хоёрдугаа~;гуравдугаа~;дөрөвдүгээ~;тавдугаа~;зургаадугаа~;долоодугаа~;наймдугаа~;есдүгээ~;аравдугаа~;арван нэгдүгээ~;арван хоёрдугаа~", "р сар"), + mmm: _("1~;2~;3~;4~;5~;6~;7~;8~;9~;10~;11~;12~", "-р сар"), + dddd: _("ням;даваа;мягмар;лхагва;пүрэв;баасан;бямба"), + ddd: _("Ня;Да;Мя;Лх;Пү;Ба;Бя"), + ampm: _("ү.ө.;ү.х.") +}, "mn"); +addLocale({ + group: ",", + decimal: ".", + mmmm: _("जानेवारी;फेब्रुवारी;मार्च;एप्रिल;मे;जून;जुलै;ऑगस्ट;सप्टेंबर;ऑक्टोबर;नोव्हेंबर;डिसेंबर"), + mmm: _("जाने;फेब्रु;मार्च;एप्रि;मे;जून;जुलै;ऑग;सप्टें;ऑक्टो;नोव्हें;डिसें"), + dddd: _("रविवार;सोमवार;मंगळवार;बुधवार;गुरुवार;शुक्रवार;शनिवार"), + ddd: _("रवि;सोम;मंगळ;बुध;गुरु;शुक्र;शनि") +}, "mr"); +addLocale(xm({ + group: ",", + decimal: ".", + mmmm: _("ဇန်နဝါရီ;ဖေဖော်ဝါရီ;မတ်;ဧပြီ;မေ;ဇွန်;ဇူလိုင်;ဩဂုတ်;စက်တင်ဘာ;အောက်တိုဘာ;နိုဝင်ဘာ;ဒီဇင်ဘာ"), + mmm: _("ဇန်;ဖေ;မတ်;ဧ;မေ;ဇွန်;ဇူ;ဩ;စက်;အောက်;နို;ဒီ"), + dddd: _("တနင်္ဂနွေ;တနင်္လာ;အင်္ဂါ;ဗုဒ္ဓဟူး;ကြာသပတေး;သောကြာ;စနေ"), + ampm: _("နံနက်;ညနေ") +}, -1, 0), "my"); +addLocale({ + group: ",", + decimal: ".", + mmmm: _("ਜਨਵਰੀ;ਫ਼ਰਵਰੀ;ਮਾਰਚ;ਅਪ੍ਰੈਲ;ਮਈ;ਜੂਨ;ਜੁਲਾਈ;ਅਗਸਤ;ਸਤੰਬਰ;ਅਕਤੂਬਰ;ਨਵੰਬਰ;ਦਸੰਬਰ"), + mmm: _("ਜਨ;ਫ਼ਰ;ਮਾਰਚ;ਅਪ੍ਰੈ;ਮਈ;ਜੂਨ;ਜੁਲਾ;ਅਗ;ਸਤੰ;ਅਕਤੂ;ਨਵੰ;ਦਸੰ"), + dddd: _("ਐਤਵਾਰ;ਸੋਮਵਾਰ;ਮੰਗਲਵਾਰ;ਬੁੱਧਵਾਰ;ਵੀਰਵਾਰ;ਸ਼ੁੱਕਰਵਾਰ;ਸ਼ਨਿੱਚਰਵਾਰ"), + ddd: _("ਐਤ;ਸੋਮ;ਮੰਗਲ;ਬੁੱਧ;ਵੀਰ;ਸ਼ੁੱਕਰ;ਸ਼ਨਿੱਚਰ"), + ampm: _("ਪੂ.ਦੁ.;ਬਾ.ਦੁ.") +}, "pa"); +addLocale({ + group: ".", + decimal: ",", + mmmm: _("ianuarie;februarie;martie;aprilie;mai;iunie;iulie;august;septem~;octom~;noiem~;decem~", "brie"), + mmm: _("ian.;feb.;mar.;apr.;mai;iun.;iul.;aug.;sept.;oct.;nov.;dec."), + dddd: _("duminică;luni;marți;miercuri;joi;vineri;sâmbătă"), + ddd: _("dum.;lun.;mar.;mie.;joi;vin.;sâm."), + ampm: _("a.m.;p.m.") +}, "ro"); +addLocale(xm({ + group: ".", + decimal: ",", + mmmm: _("januar;februar;marec;april;maj;junij;julij;avgust;september;oktober;november;december"), + mmm: _("jan.;feb.;mar.;apr.;maj;jun.;jul.;avg.;sep.;okt.;nov.;dec."), + dddd: _("nedelja;ponedeljek;torek;sreda;četrtek;petek;sobota"), + ampm: _("dop.;pop.") +}, -1, 13), "sl"); +addLocale(xm({ + group: ".", + decimal: ",", + mmmm: _("јануар;фебруар;март;април;мај;јун;јул;август;септембар;октобар;новембар;децембар"), + dddd: _("недеља;понедељак;уторак;среда;четвртак;петак;субота") +}, 3, 3), "sr"); +addLocale({ + group: ",", + decimal: ".", + mmmm: _("ஜனவரி;பிப்ரவரி;மார்ச்;ஏப்ரல்;மே;ஜூன்;ஜூலை;ஆகஸ்ட்;செப்டம்பர்;அக்டோபர்;நவம்பர்;டிசம்பர்"), + mmm: _("ஜன.;பிப்.;மார்.;ஏப்.;மே;ஜூன்;ஜூலை;ஆக.;செப்.;அக்.;நவ.;டிச."), + dddd: _("ஞாயிறு;திங்கள்;செவ்வாய்;புதன்;வியாழன்;வெள்ளி;சனி"), + ddd: _("ஞாயி.;திங்.;செவ்.;புத.;வியா.;வெள்.;சனி") +}, "ta"); +addLocale({ + group: ",", + decimal: ".", + mmmm: _("జనవరి;ఫిబ్రవరి;మార్చి;ఏప్రిల్;మే;జూన్;జులై;ఆగస్టు;సెప్టెంబర్;అక్టోబర్;నవంబర్;డిసెంబర్"), + mmm: _("జన;ఫిబ్ర;మార్చి;ఏప్రి;మే;జూన్;జులై;ఆగ;సెప్టెం;అక్టో;నవం;డిసెం"), + dddd: _("ఆదివారం;సోమవారం;మంగళవారం;బుధవారం;గురువారం;శుక్రవారం;శనివారం"), + ddd: _("ఆది;సోమ;మంగళ;బుధ;గురు;శుక్ర;శని") +}, "te"); +addLocale({ + decimal: ",", + mmmm: _("січня;лютого;березня;квітня;травня;червня;липня;серпня;вересня;жовтня;листопада;грудня"), + mmm: _("січ.;лют.;бер.;квіт.;трав.;черв.;лип.;серп.;вер.;жовт.;лист.;груд."), + dddd: _("неділю;понеділок;вівторок;середу;четвер;пʼятницю;суботу"), + ddd: _("нд;пн;вт;ср;чт;пт;сб"), + ampm: _("дп;пп") +}, "uk"); +addLocale({ + group: ".", + decimal: ",", + mmmm: _("~1;~2;~3;~4;~5;~6;~7;~8;~9;~10;~11;~12", "tháng "), + mmm: _("~1;~2;~3;~4;~5;~6;~7;~8;~9;~10;~11;~12", "thg "), + dddd: _("Chủ Nhật;Thứ Hai;Thứ Ba;Thứ Tư;Thứ Năm;Thứ Sáu;Thứ Bảy"), + ddd: _("CN;Th 2;Th 3;Th 4;Th 5;Th 6;Th 7"), + ampm: _("SA;CH") +}, "vi"); +addLocale(xm({ + group: "٬", + decimal: "٫", + ampm: _("ص;م"), + mmmm: _("يناير;فبراير;مارس;أبريل;مايو;يونيو;يوليو;أغسطس;سبتمبر;أكتوبر;نوفمبر;ديسمبر"), + dddd: _("الأحد;الاثنين;الثلاثاء;الأربعاء;الخميس;الجمعة;السبت"), + mmmm6: _("رمضان;شوال;ذو القعدة;ذو الحجة;محرم;ربيع الأول;ربيع الآخرة;جمادى الأولى;جمادى الآخرة;رجب;شعبان;رمضان") +}, 0, 0), "ar"); +addLocale({ + group: ",", + decimal: ".", + mmmm: _("জানুয়ারী;ফেব্রুয়ারী;মার্চ;এপ্রিল;মে;জুন;জুলাই;আগস্ট;সেপ্টেম্বর;অক্টোবর;নভেম্বর;ডিসেম্বর"), + mmm: _("জানু;ফেব;মার্চ;এপ্রি;মে;জুন;জুল;আগ;সেপ্টেঃ;অক্টোঃ;নভেঃ;ডিসেঃ"), + dddd: _("রবিবার;সোমবার;মঙ্গলবার;বুধবার;বৃহস্পতিবার;শুক্রবার;শনিবার"), + ddd: _("রবি;সোম;মঙ্গল;বুধ;বৃহস্পতি;শুক্র;শনি") +}, "bn"); +addLocale({ + group: ",", + decimal: ".", + mmmm: _("जनवरी;फ़रवरी;मार्च;अप्रैल;मई;जून;जुलाई;अगस्त;सितंबर;अक्तूबर;नवंबर;दिसंबर"), + mmm: _("जन॰;फ़र॰;मार्च;अप्रैल;मई;जून;जुल॰;अग॰;सित॰;अक्तू॰;नव॰;दिस॰"), + dddd: _("रविवार;सोमवार;मंगलवार;बुधवार;गुरुवार;शुक्रवार;शनिवार"), + ddd: _("रवि;सोम;मंगल;बुध;गुरु;शुक्र;शनि"), + ampm: _("am;pm") +}, "hi"); +//#endregion +//#region lib/options.ts +const defaultOptions = { + overflow: "######", + dateErrorThrows: false, + dateErrorNumber: true, + bigintErrorNumber: false, + dateSpanLarge: true, + leap1900: true, + nbsp: false, + throws: true, + invalid: "######", + locale: "", + ignoreTimezone: false, + grouping: [3, 3], + indexColors: true, + skipChar: "", + fillChar: "" +}; +//#endregion +//#region lib/round.ts +/** +* Return a number rounded to the specified amount of places. This is the +* rounding function used internally by the formatter (symmetric arithmetic +* rounding). It rounds the same way Excel does. +* +* @param number The number to round. +* @param [places] The number of decimals to round to. +* @returns A rounded number. +*/ +function round(number, places = 0) { + if (typeof number !== "number") return NaN; + if (number < 0) return -round(-number, places); + if (places) { + const p = 10 ** places || 1; + return round(number * p, 0) / p; + } + return Math.round(number); +} +//#endregion +//#region lib/toYMD.ts +const floor$1 = Math.floor; +function toYMD_1900(ord, leap1900 = true) { + if (leap1900 && ord >= 0) { + if (ord === 0) return [ + 1900, + 1, + 0 + ]; + if (ord === 60) return [ + 1900, + 2, + 29 + ]; + if (ord < 60) return [ + 1900, + ord < 32 ? 1 : 2, + (ord - 1) % 31 + 1 + ]; + } + let l = ord + 68569 + 2415019; + const n = floor$1(4 * l / 146097); + l = l - floor$1((146097 * n + 3) / 4); + const i = floor$1(4e3 * (l + 1) / 1461001); + l = l - floor$1(1461 * i / 4) + 31; + const j = floor$1(80 * l / 2447); + const nDay = l - floor$1(2447 * j / 80); + l = floor$1(j / 11); + const nMonth = j + 2 - 12 * l; + return [ + 100 * (n - 49) + i + l | 0, + nMonth | 0, + nDay | 0 + ]; +} +function toYMD_1904(ord) { + return toYMD_1900(ord + 1462); +} +function toYMD_1317(ord) { + if (ord === 60) throw new Error("#VALUE!"); + if (ord <= 1) return [ + 1317, + 8, + 29 + ]; + if (ord < 60) return [ + 1317, + ord < 32 ? 9 : 10, + 1 + (ord - 2) % 30 + ]; + const y = 10631 / 30; + const shift1 = 8.01 / 60; + let z = ord + 466935; + const cyc = floor$1(z / 10631); + z = z - 10631 * cyc; + const j = floor$1((z - shift1) / y); + z = z - floor$1(j * y + shift1); + const m = floor$1((z + 28.5001) / 29.5); + if (m === 13) return [ + 30 * cyc + j, + 12, + 30 + ]; + return [ + 30 * cyc + j, + m, + z - floor$1(29.5001 * m - 29) + ]; +} +function toYMD(ord, system = 0, leap1900 = true) { + const int = floor$1(ord); + if (system === 6) return toYMD_1317(int); + if (system === -1) return toYMD_1904(int); + return toYMD_1900(int, leap1900); +} +//#endregion +//#region lib/serialDate.ts +const floor = Math.floor; +const DAYSIZE$1 = 86400; +/** +* Convert a native JavaScript Date, or an array of date parts to an spreadsheet serial date. +* +* Returns a serial date number if input was a Date object or an array of +* numbers, else a null. +* +* ```js +* // input as Date +* dateToSerial(new Date(1978, 5, 17)); // 28627 +* // input as [ Y, M, D, h, m, s ] +* dateToSerial([ 1978, 5, 17 ]); // 28627 +* // other input +* dateToSerial("something else"); // null +* ``` +* +* @param date A Date instance or an array of date parts in descending order. +* @param [options={}] Options for this method +* @param [options.ignoreTimezone] +* Normally time zone will be taken into account. This makes the conversion to +* serial date ignore the timezone offset. +* @returns The date as a spreadsheet serial date, or undefined. +*/ +function dateToSerial(date, options) { + let ts = void 0; + if (Array.isArray(date)) { + const [y, m, d, hh, mm, ss] = date; + ts = Date.UTC(y, m == null ? 0 : m - 1, d ?? 1, hh || 0, mm || 0, ss || 0); + } else if (date instanceof Date) { + ts = date.valueOf(); + if (!options?.ignoreTimezone) { + const dt = /* @__PURE__ */ new Date(); + dt.setUTCFullYear(date.getFullYear(), date.getMonth(), date.getDate()); + dt.setUTCHours(date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()); + ts = dt.valueOf(); + } + } + if (ts != null && isFinite(ts)) { + const d = ts / 864e5; + return d - (d <= -25509 ? -25568 : -25569); + } +} +/** +* Convert a spreadsheet serial date to an array of date parts. +* Accurate to a second. +* +* ```js +* // output as [ Y, M, D, h, m, s ] +* dateFromSerial(28627); // [ 1978, 5, 17, 0, 0, 0 ] +* ``` +* +* @param serialDate The date +* @param [options] Options for this method +* @param [options.leap1900] +* Simulate the Lotus 1-2-3 [1900 leap year bug](https://docs.microsoft.com/en-us/office/troubleshoot/excel/wrongly-assumes-1900-is-leap-year). +* True by default. +* @returns returns an array of date parts with parts in descending order: [ year, month, day, hour, minute, second ] +*/ +function dateFromSerial(serialDate, options) { + let date = serialDate | 0; + const t = DAYSIZE$1 * (serialDate - date); + let time = floor(t); + if (t - time > .9999) { + time += 1; + if (time === DAYSIZE$1) { + time = 0; + date += 1; + } + } + const x = time < 0 ? DAYSIZE$1 + time : time; + const [y, m, d] = toYMD(serialDate, 0, options?.leap1900); + return [ + y, + m, + d, + floor(x / 60 / 60) % 60, + floor(x / 60) % 60, + floor(x) % 60 + ]; +} +//#endregion +//#region lib/isValidDate.ts +function isValidDate(y, m, d) { + if (d < 1) return false; + if (m < 1 || m > 12) return false; + if (m === 2) { + if (d > (y % 4 === 0 && y % 100 !== 0 || y % 400 === 0 || y === 1900 ? 29 : 28)) return false; + } else if ((m === 4 || m === 6 || m === 9 || m === 11) && d > 30 || (m === 1 || m === 3 || m === 5 || m === 7 || m === 8 || m === 10 || m === 12) && d > 31) return false; + return true; +} +//#endregion +//#region lib/parseValue.ts +const okDateFormats = [ + "!d-m-y", + "!d-m-Y", + "!j-m-y", + "!j-m-Y", + "!d-n-y", + "!d-n-Y", + "!j-n-y", + "!j-n-Y", + "?m-d-y", + "?m-d-Y", + "?m-j-y", + "?m-j-Y", + "?n-d-y", + "?n-d-Y", + "?n-j-y", + "?n-j-Y", + "d-M-y", + "d-M-Y", + "j-M-y", + "j-M-Y", + "M-d-y", + "M-d-Y", + "M-j-y", + "M-j-Y", + "d-F-y", + "d-F-Y", + "F-d-y", + "F-d-Y", + "F-j-y", + "F-j-Y", + "j-F-y", + "j-F-Y", + "y-F-d", + "y-F-j", + "y-M-d", + "y-M-j", + "Y-F-d", + "Y-F-j", + "Y-M-d", + "Y-m-d", + "Y-M-j", + "Y-m-j", + "Y-n-d", + "Y-n-j", + "j-F", + "j-M", + "d-F", + "d-M", + "n-d", + "n-j", + "n-Y", + "m-d", + "m-j", + "m-Y", + "M-Y", + "M-y", + "F-y", + "F-Y", + "Y-M", + "Y-n", + "Y-m", + "Y-F", + "Y-M" +]; +const tx0 = { + j: "d", + d: "d", + D: "ddd", + l: "dddd", + n: "m", + m: "m", + M: "mmm", + F: "mmmm", + y: "yy", + Y: "yyyy" +}; +const tx00 = { + j: "dd", + d: "dd", + D: "ddd", + l: "dddd", + n: "mm", + m: "mm", + M: "mmm", + F: "mmmm", + y: "yy", + Y: "yyyy" +}; +const dateTrieDM = {}; +const dateTrieMD = {}; +function packDate(f, node, allowType = 1) { + if (f) { + const char = f[0]; + const next = f.slice(1); + if (char === "!") packDate(next, node, 4); + else if (char === "?") packDate(next, node, 2); + else { + node[char] = node[char] || {}; + packDate(next, node[char], allowType); + } + } else node.$ = allowType; +} +function addFormatToTrie(fmt, trie) { + packDate(fmt, trie); + packDate(fmt + " x", trie); + packDate(fmt + " l", trie); + packDate(fmt + " l x", trie); + packDate("l " + fmt, trie); + packDate("l " + fmt + " x", trie); + packDate(fmt + " D", trie); + packDate(fmt + " D x", trie); + packDate("D " + fmt, trie); + packDate("D " + fmt + " x", trie); +} +okDateFormats.forEach((fmt) => { + if (!fmt.startsWith("?")) addFormatToTrie(fmt, dateTrieDM); + if (!fmt.startsWith("!")) addFormatToTrie(fmt, dateTrieMD); +}); +const currentYear = (/* @__PURE__ */ new Date()).getUTCFullYear(); +const PT = "."; +const CM = ","; +const SP = " "; +const NS = "\xA0"; +const NN = " "; +const AP = "'"; +const AG = "٬"; +const dec2group = { + ".": [ + CM, + NS, + NN, + AP, + AG + ], + ",": [ + PT, + NS, + NN, + AP, + AG + ], + "٫": [ + PT, + NS, + NN, + AP, + AG + ] +}; +const isDigit = (d) => d?.length === 1 && d >= "0" && d <= "9"; +/** +* Parse a numeric string input and return its value and format. If the input +* was not recognized or valid, the function returns a `undefined`, for valid input +* it returns an object with two properties: +* +* * `v`: the parsed value. +* * `z`: the number format of the input (if applicable). +* +* @param value The number to parse +* @param [options] Options for the parser +* @param [options.locale] +* A BCP 47 string tag. Locale default is english with a `\u00a0` +* grouping symbol (see [addLocale](#addLocale)) +* @returns An object of the parsed value and a corresponding format string +*/ +function parseNumber(value, options = {}) { + const l10n = getLocale(options.locale || "") || defaultLocale; + const dec = l10n.decimal; + const grp = [...dec2group[dec] || [AP, AG]]; + if (!grp.includes(l10n.group) && l10n.group !== SP && l10n.group !== dec) grp.push(l10n.group); + let num = ""; + let exp = ""; + let sign = 1; + let format = ""; + let minus = false; + let openParen = false; + let closeParen = false; + let percent = false; + let currency = false; + let currencySymbol = null; + let currencyTrailing = false; + let i = 0; + const prefixChars = [ + SP, + NS, + NN, + "+", + "%", + "(", + "-" + ].concat(currencySymbols); + while (prefixChars.includes(value[i])) { + const char = value[i]; + if (char === "-") { + if (minus || openParen) return; + minus = true; + sign = -1; + } else if (reCurrencySymbols.test(char)) { + if (currency) return; + currency = true; + currencySymbol = char; + } else if (char === "(") { + if (openParen || minus) return; + openParen = true; + sign = -1; + } else if (char === "%") { + if (percent) return; + percent = true; + } + i++; + } + let haveDecimal = false; + let g; + if (value[i] === dec || isDigit(value[i])) while (i < value.length) { + const ch = value[i]; + if (!g && grp.includes(ch)) g = ch; + else if (g && g === ch) {} else if (ch === dec) { + if (haveDecimal) break; + num += "."; + haveDecimal = true; + } else if (isDigit(ch)) num += ch; + else break; + i++; + } + if (value[i] === "e" || value[i] === "E") { + exp += value[i]; + i++; + if (value[i] === "+" || value[i] === "-") { + exp += value[i]; + i++; + } + const d = i; + while (isDigit(value[i])) { + exp += value[i]; + i++; + } + if (d === i) return; + } + const suffixChars = [ + SP, + NS, + NN, + "%", + "$", + ")" + ].concat(currencySymbols); + while (suffixChars.includes(value[i])) { + const char = value[i]; + if (reCurrencySymbols.test(char)) { + if (currency) return; + currency = true; + currencySymbol = char; + currencyTrailing = true; + } else if (char === ")") { + if (closeParen || !openParen) return; + closeParen = true; + } else if (char === "%") { + if (percent) return; + percent = true; + } + i++; + } + if (i !== value.length) return; + let numberValue = parseFloat(num + exp); + if (!isFinite(numberValue)) return; + if (exp) { + if (percent || currency) return; + format = "0.00E+00"; + } else if (percent) { + if (currency) return; + format = num.includes(".") ? "0.00%" : "0%"; + numberValue *= .01; + } else if (currency) { + const currencyFormat = num.includes(".") ? "#,##0.00" : "#,##0"; + if (currencyTrailing) format = currencyFormat + currencySymbol; + else format = currencySymbol + currencyFormat; + } else if (g) format = num.includes(".") ? "#,##0.00" : "#,##0"; + const ret = { v: numberValue * sign }; + if (format) ret.z = format; + return ret; +} +const matchRec = (str, data, skipPeriod = false) => { + for (const item of data) if (str.startsWith(item[0])) { + let l = item[0].length; + if (skipPeriod && (item[2] === "D" || item[2] === "M") && str[l] === ".") l++; + return [str.slice(0, l), item]; + } + return ["", null]; +}; +const nextToken = (str, node, data, lData) => { + const path = data.path || ""; + const matchOrder = Object.keys(node); + for (const t of matchOrder) { + let r; + if (!node[t]) continue; + if (t === "$" || t === "€") { + if (!str) r = data; + } else if (t === "-") { + const m = /^(\s*([./-]|,\s)\s*|\s+)/.exec(str); + if (m) { + const sep = m[1] === "-" || m[1] === "/" || m[1] === "." ? m[1] : " "; + if (!data.sep || data.sep === sep) { + const s = m[0].replace(/\s+/g, " "); + r = nextToken(str.slice(m[0].length), node[t], { + ...data, + sep, + path: path + s + }, lData); + } + } + } else if (t === " ") { + const m = /^[,.]?\s+/.exec(str); + if (m) { + const s = m[0].replace(/\s+/g, " "); + r = nextToken(str.slice(m[0].length), node[t], { + ...data, + path: path + s + }, lData); + } + } else if (t === "j" || t === "d") { + const m = /^(0?[1-9]|1\d|2\d|3[01])\b/.exec(str); + if (m) r = nextToken(str.slice(m[0].length), node[t], { + ...data, + day: m[0], + path: path + t + }, lData); + } else if (t === "n" || t === "m") { + const m = /^(0?[1-9]|1[012])\b/.exec(str); + if (m) r = nextToken(str.slice(m[0].length), node[t], { + ...data, + month: +m[0], + _mon: m[0], + path: path + t + }, lData); + } else if (t === "F" || t === "M") { + const [m, match] = matchRec(str, lData.mon, lData.mp); + if (match?.[2] === t) r = nextToken(str.slice(m.length), node[t], { + ...data, + month: match[1], + _mon: m, + path: path + t + }, lData); + } else if (t === "l" || t === "D") { + const [m, match] = matchRec(str, lData.day, lData.dp); + if (match?.[2] === t) r = nextToken(str.slice(m.length), node[t], { + ...data, + path: path + t + }, lData); + } else if (t === "y") { + const m = /^\d\d\b/.exec(str); + if (m) { + const y = +m[0] >= 30 ? +m[0] + 1900 : +m[0] + 2e3; + r = nextToken(str.slice(m[0].length), node[t], { + ...data, + year: y, + path: path + t + }, lData); + } + } else if (t === "Y") { + const m = /^\d\d\d\d\b/.exec(str); + if (m) r = nextToken(str.slice(m[0].length), node[t], { + ...data, + year: +m[0], + path: path + t + }, lData); + } else if (t === "x") { + const time = parseTime(str, { locale: lData.locale }); + if (time) r = nextToken("", node[t], { + ...data, + time: time.v, + tf: time.z, + path: path + t + }, lData); + } else throw new Error(`Unknown date token "${t}"`); + if (r) { + if (isValidDate(data.year || 1916, data.month || 1, data.day ? +data.day : 1)) return r; + } + } +}; +const normDateStr = (s) => s.replace(/\s+/g, " ").trim().replace(/’/, "'").replace(/\.$/, "").toLowerCase(); +const getLookups = (arr, sym) => { + const s = arr.map((d, i) => [ + normDateStr(d), + i + 1, + sym + ]); + s.sort((a, b) => b[0].length - a[0].length); + return s; +}; +/** +* Parse a date or datetime string input and return its value and format. If +* the input was not recognized or valid, the function returns an `undefined`, for +* valid input it returns an object with two properties: +* +* - `v`: the parsed value. +* - `z`: the number format of the input (if applicable). +* +* @param value The string to parse +* @param [options={}] Options for the parser +* @param [options.locale=""] +* A BCP 47 string tag. Locale default is english with a `\u00a0` +* grouping symbol (see [addLocale](#addLocale)) +* @returns An object of the parsed value and a corresponding format string +*/ +function parseDate(value, options = {}) { + const l10n = getLocale(options.locale || "") || defaultLocale; + const lData = { + mon: getLookups(l10n.mmmm, "F").concat(getLookups(l10n.mmm, "M")), + mp: l10n.mmm[0].at(-1) === ".", + day: getLookups(l10n.dddd, "l").concat(getLookups(l10n.ddd, "D")), + dp: l10n.ddd[0].at(-1) === ".", + locale: options.locale + }; + const date = nextToken(normDateStr(value), l10n.preferMDY ? dateTrieMD : dateTrieDM, { path: "" }, lData); + if (date) { + if (date.sep === "." && date.path?.length === 3) return; + const year = +(date.year ?? currentYear); + if (!date.day) date.day = "1"; + let epoch = -Infinity; + if (year < 1900) return; + else if (year <= 1900 && (date.month ?? 0) <= 2) epoch = 25568; + else if (year < 1e4) epoch = 25569; + const dateValue = Date.UTC(year, (date.month ?? 1) - 1, +date.day) / 864e5 + epoch + (date.time || 0); + if (dateValue >= 0 && dateValue <= 2958465) { + const lead0 = date._mon?.startsWith("0") || date.day?.startsWith("0") || date._mon?.length === 2 && date.day.length === 2; + return { + v: dateValue, + z: (date.path ?? "").replace(/[jdlDnmMFyYx]/g, (a) => { + if (a === "x") return date.tf || ""; + return (lead0 ? tx00[a] : tx0[a]) || a; + }) + }; + } + } +} +const normAMPMStr = (s) => s.replace(/\s+/g, "").trim().replace(/\./g, "").toLowerCase(); +/** +* Parse a time string input and return its value and format. If the input was +* not recognized or valid, the function returns a `undefined`, for valid input it +* returns an object with two properties: +* +* - `v`: the parsed value. +* - `z`: the number format of the input (if applicable). +* +* @param value The date to parse +* @param [options] Options for the parser +* @param [options.locale] +* A BCP 47 string tag. Locale default is english with a `\u00a0` +* grouping symbol (see [addLocale](#addLocale)) +* @returns An object of the parsed value and a corresponding format string +*/ +function parseTime(value, options = {}) { + const l10n = getLocale(options.locale || "") || defaultLocale; + const parts = /^\s*([10]?\d|2[0-4])(?::([0-5]\d|\d))?(?::([0-5]\d|\d))?(\.\d{1,10})?(?=\s*[^\s\d]|$)/.exec(value); + let ampm = ""; + if (parts) { + const tail = normAMPMStr(value.slice(parts[0].length)); + if (tail === normAMPMStr(l10n.ampm[0]) || tail === "a" || tail === "am") ampm = "a"; + else if (tail === normAMPMStr(l10n.ampm[1]) || tail === "p" || tail === "pm") ampm = "p"; + else if (tail === ":") { + if (!parts[3]) parts[3] = "0"; + if (!parts[2]) parts[2] = "0"; + } else if (tail) return; + } + if (parts) { + const [, h, m, s, f] = parts; + if (f && !s) return; + if (!ampm && !m && !s) return; + let hrs = +(h || 0) * 1; + if (ampm) { + if (hrs >= 13) return; + if (ampm === "a") { + if (hrs === 12) hrs = 0; + } else if (ampm === "p") { + if (hrs !== 12) hrs += 12; + } + } + const min = +(m || 0) * 1; + const sec = +(s || 0) * 1; + const mss = +(f || 0) * 1; + return { + v: (hrs * 60 * 60 + min * 60 + sec + mss) / 86400, + z: (h.length === 2 ? "hh" : "h") + ":mm" + (s ? ":ss" : "") + (ampm ? " AM/PM" : "") + }; + } +} +/** +* Parse a string input and return its equivalent boolean value. If the input was not +* recognized or valid, the function returns an `undefined`, for valid input it +* returns an object with a single property: +* +* - `v`: the parsed value. +* +* @param value The supposed boolean to parse +* @param [options] Options for the parser +* @param [options.locale] +* A BCP 47 string tag. Locale default is english with a `\u00a0` +* grouping symbol (see [addLocale](#addLocale)) +* @returns An object of the parsed value and a corresponding format string +*/ +function parseBool(value, options = {}) { + const l10n = getLocale(options.locale || "") || defaultLocale; + const v = value.trim().toLowerCase(); + const bT = l10n.bool[0].toLowerCase(); + if (v === "true" || v === bT) return { v: true }; + const bF = l10n.bool[1].toLowerCase(); + if (v === "false" || v === bF) return { v: false }; +} +/** +* Attempt to parse a "spreadsheet input" string input and return its value and +* format. If the input was not recognized or valid, the function returns an +* `undefined`, for valid input it returns an object with two properties: +* +* - `v`: The parsed value. For dates, this will be an Excel style serial date. +* - `z`: (Optionally) the number format string of the input. This property will +* not be present if it amounts to the `General` format. +* +* `parseValue()` recognizes a wide range of dates and date-times, times, +* numbers, and booleans. Some examples: +* +* ```js +* // basic number +* parseValue("-123");// { v: -123 } +* // formatted number +* parseValue("$1,234"); // { v: 1234, z: "$#,##0" } +* // a percent +* parseValue("12.3%"); // { v: 0.123, z: "0.00%" } +* // a date +* parseValue("07 October 1984"); // { v: 30962, z: 'dd mmmm yyyy' } +* // an ISO formatted date-time +* parseValue("1984-09-10 11:12:13.1234"); // { v: 30935.46681855787, z: "yyyy-mm-dd hh:mm:ss" } +* // a boolean +* parseValue("false"); // { v: false } +* ``` +* +* The formatting string outputted may not correspond exactly to the input. +* Rather, is it composed of certain elements which the input controls. This is +* comparable to how Microsoft Excel and Google Sheets parse pasted input. Some +* things you may expect: +* +* - Whitespace is ignored. +* - Decimal fractions are always represented by `.00` regardless of how many +* digits were shown in the input. +* - Negatives denoted by parentheses [`(1,234)`] will not include the +* parentheses in the format string (the value will still be negative.) +* - All "scientific notation" returns the same format: `0.00E+00`. +* +* Internally the parser calls, `parseNumber`, `parseDate`, +* `parseTime` and `parseBool`. They work in the same way except +* with a more limited scope. You may prefer those functions if you are limiting +* input to a smaller scope. +* +* @param value The value to parse +* @param [options] Options for the parser +* @param [options.locale] +* A BCP 47 string tag. Locale default is english with a `\u00a0` +* grouping symbol (see {@link addLocale}) +* @returns An object of the parsed value and a corresponding format string +*/ +function parseValue(value, options) { + return parseNumber(value, options) ?? parseDate(value, options) ?? parseTime(value, options) ?? parseBool(value, options); +} +//#endregion +//#region lib/createPartition.ts +function createPartition(tokens) { + return { + scale: 1, + percent: false, + text: false, + parens: false, + fractions: false, + grouping: false, + exponential: false, + integer: false, + locale: "", + pattern: "", + int_max: 0, + frac_max: 0, + man_p: "", + num_p: "", + num_min: 0, + den_min: 0, + den_max: 0, + date: 0, + tokensUsed: 0, + date_eval: false, + date_system: 1, + sec_decimals: 0, + general: false, + clock: 24, + int_min: 0, + int_pattern: [], + frac_pattern: [], + man_pattern: [], + den_pattern: [], + num_pattern: [], + tokens: tokens ?? [], + den_p: "", + int_p: "", + denominator: 0 + }; +} +//#endregion +//#region lib/parseFormatSection.ts +function add(s, tokens) { + if (typeof s === "string") tokens.push({ + type: TOKEN_STRING, + value: s + }); + else tokens.push(s); +} +const countNonHash = (s) => { + let n = 0; + for (let i = 0; i < s.length; i++) if (s.charCodeAt(i) !== 35) n++; + return n; +}; +function isNumOp$1(token, activePattern) { + const type = token?.type; + return type === "HASH" || type === "ZERO" || type === "QMARK" || type === "DIGIT" && activePattern === "DEN"; +} +function parseFormatSection(inputTokens) { + const outputTokens = []; + const part = createPartition(outputTokens); + let currentPattern = "INT"; + let lastNumberChunk; + const dateChunks = []; + let last; + let haveLocale = false; + let index = -1; + let partOver = false; + let patternSource = ""; + let haveSlash = false; + const getPattern = (p) => { + if (p === "DEN") return part.den_pattern; + if (p === "INT") return part.int_pattern; + if (p === "FRAC") return part.frac_pattern; + if (p === "MAN") return part.man_pattern; + return []; + }; + while (++index < inputTokens.length && !partOver) { + const token = inputTokens[index]; + const type = token.type || "ERROR"; + patternSource += token.raw; + if (type === "GENERAL") { + part.general = true; + add({ type }, outputTokens); + } else if (isNumOp$1(token, currentPattern)) { + const pt = getPattern(currentPattern); + if (last && (isNumOp$1(last, currentPattern) || last.type === "GROUP")) { + pt.push((pt.pop() || "") + token.value); + if (lastNumberChunk && "num" in lastNumberChunk) lastNumberChunk.num += token.value; + } else { + pt.push(token.value); + lastNumberChunk = { + type: currentPattern, + num: token.value + }; + add(lastNumberChunk, outputTokens); + } + } else if (type === "PAREN") { + if (token.value === "(") part.parens = true; + add(token.value, outputTokens); + } else if (type === "DIGIT") add(token.value, outputTokens); + else if (type === "SLASH") { + haveSlash = true; + const pt = getPattern(currentPattern); + if (pt.length) { + if (!lastNumberChunk) throw new SyntaxError("Format pattern is missing a numerator"); + part.fractions = true; + const xx = pt.pop(); + part.num_pattern.push(xx); + lastNumberChunk.type = "NUM"; + currentPattern = "DEN"; + add({ type: "DIV" }, outputTokens); + } else add(token.value, outputTokens); + } else if (type === "COMMA") add(",", outputTokens); + else if (type === "SCALE") part.scale = .001 ** token.raw.length; + else if (type === "GROUP") { + if (currentPattern === "INT") part.grouping = true; + if (currentPattern === "DEN") throw new SyntaxError("Cannot group denominator digits"); + } else if (type === "SPACE") add({ type }, outputTokens); + else if (type === "BREAK") { + partOver = true; + break; + } else if (type === "TEXT") { + part.text = true; + add({ + type, + value: token.value + }, outputTokens); + } else if (type === "PLUS" || type === "MINUS") add({ type }, outputTokens); + else if (type === "DURATION") { + const tokenValue = token.value.toLowerCase(); + const startsWith = tokenValue[0]; + let bit; + if (startsWith === "h") bit = { + type: T_TYPE_HOUR_E, + size: 16, + pad: tokenValue.length + }; + else if (startsWith === "m") bit = { + type: T_TYPE_MIN_E, + size: 32, + pad: tokenValue.length + }; + else bit = { + type: T_TYPE_SEC_E, + size: 64, + pad: tokenValue.length + }; + part.date = part.date | bit.size; + dateChunks.push(bit); + add(bit, outputTokens); + } else if (part.date && type === "POINT" && inputTokens[index + 1]?.type === "ZERO") { + let dec = 1; + index++; + let raw = "0"; + if (inputTokens[index + 1]?.type === "ZERO") { + raw += "0"; + dec = 2; + index++; + } + if (inputTokens[index + 1]?.type === "ZERO") { + raw += "0"; + dec = 3; + index++; + } + patternSource += raw; + const size = [ + 64, + 128, + 256, + 512 + ][dec]; + part.date = part.date | size; + part.date_eval = true; + part.sec_decimals = Math.max(part.sec_decimals, dec); + add({ + type: T_TYPE_SUBSEC, + size, + decimals: dec + }, outputTokens); + } else if (type === "CALENDAR") { + if (!haveLocale) { + if (token.value === "B2" || token.value === "b2") part.date_system = 6; + else part.date_system = 1; + } + } else if (type === "DATETIME") { + let bit; + const value = token.value.toLowerCase(); + const startsWith = value[0]; + if (value === "y" || value === "yy") bit = { + type: T_TYPE_YEAR_S, + size: 2 + }; + else if (startsWith === "y" || startsWith === "e") bit = { + type: T_TYPE_YEAR, + size: 2 + }; + else if (value === "b" || value === "bb") bit = { + type: T_TYPE_B_YEAR_S, + size: 2 + }; + else if (startsWith === "b") bit = { + type: T_TYPE_B_YEAR, + size: 2 + }; + else if (value === "d" || value === "dd") bit = { + type: "DAY", + size: 8, + pad: value === "dd" + }; + else if (value === "ddd" || value === "aaa") bit = { + type: T_TYPE_WEEKDAY_S, + size: 8 + }; + else if (startsWith === "d" || startsWith === "a") bit = { + type: T_TYPE_WEEKDAY, + size: 8 + }; + else if (startsWith === "h") bit = { + type: T_TYPE_HOUR, + size: 16, + pad: value.length > 1 + }; + else if (startsWith === "m") { + if (value.length === 3) bit = { + type: T_TYPE_MNAME_S, + size: 4 + }; + else if (value.length === 5) bit = { + type: T_TYPE_MNAME_1, + size: 4 + }; + else if (value.length >= 4) bit = { + type: T_TYPE_MNAME, + size: 4 + }; + const last_date_chunk = dateChunks[dateChunks.length - 1]; + if (!bit && last_date_chunk && !last_date_chunk.used && last_date_chunk.size & 80) { + last_date_chunk.used = true; + bit = { + type: "MIN", + size: 32, + pad: value.length > 1 + }; + } + if (!bit) bit = { + type: T_TYPE_MON, + size: 4, + pad: value.length > 1, + indeterminate: true + }; + } else if (startsWith === "s") { + bit = { + type: "SEC", + size: 64, + pad: value.length > 1 + }; + const last_date_chunk = dateChunks[dateChunks.length - 1]; + if (last_date_chunk && last_date_chunk.size & 32) bit.used = true; + else if (last_date_chunk && "indeterminate" in last_date_chunk) { + delete last_date_chunk.indeterminate; + last_date_chunk.size = 32; + last_date_chunk.type = "MIN"; + bit.used = true; + } + } else if (startsWith === "g") {} + if (bit) { + part.date = part.date | bit.size; + part.date_eval = true; + dateChunks.push(bit); + add(bit, outputTokens); + } + } else if (type === "AMPM") { + part.clock = 12; + part.date = part.date | 16; + part.date_eval = true; + add({ + type, + short: token.value === "A/P" + }, outputTokens); + } else if (type === "STRING" || type === "ESCAPED" || type === "CHAR") add(token.value, outputTokens); + else if (type === "CONDITION") part.condition = [token.value[0], parseFloat(token.value[1])]; + else if (type === "LOCALE") { + const bits = token.value.split("-"); + const code = bits.length < 2 ? "" : bits.slice(1).join("-"); + const currency = bits[0]; + if (currency) add(currency, outputTokens); + const l4e = resolveLocale(code); + if (l4e) part.locale = l4e; + const wincode = parseInt(code, 16); + if (isFinite(wincode) && wincode & 16711680) { + if ((wincode >> 16 & 255) === 6) part.date_system = 6; + } + haveLocale = true; + } else if (type === "COLOR") { + let cm; + let v = token.value.toLowerCase(); + if (cm = /^color\s*(\d+)$/i.exec(v)) v = parseInt(cm[1], 10); + part.color = v; + } else if (type === "PERCENT") { + part.scale = 100; + part.percent = true; + add("%", outputTokens); + } else if (type === "POINT") { + add({ + type, + value: token.value + }, outputTokens); + if (!part.date) { + part.dec_fractions = true; + currentPattern = T_TYPE_FRAC; + } + } else if (type === "EXP") { + part.exponential = true; + const plus = token.value.includes("+"); + part.exp_plus = plus; + currentPattern = "MAN"; + add({ + type: "EXP", + plus + }, outputTokens); + } else if (type === "SKIP") add({ + type, + value: token.value + }, outputTokens); + else if (type === "FILL") add({ + type, + value: token.value + }, outputTokens); + else if (type === "DBNUM") { + const n = parseInt(token.value.slice(5)); + if (n < 1 || n > 4) throw new SyntaxError("Unknown modifier: " + token.value); + } else if (type === "NATNUM") throw new SyntaxError("Unknown modifier: " + token.value); + else if (type === "MODIFIER") throw new SyntaxError("Unknown modifier: " + token.value); + else if (type === "ERROR") throw new SyntaxError(`Illegal character: ${patternSource}`); + else throw new SyntaxError(`Unknown token ${type} in ${patternSource}`); + last = token; + } + part.tokensUsed = index; + part.pattern = patternSource; + if (part.fractions && part.dec_fractions || part.grouping && !part.int_pattern.length || part.fractions && part.exponential || part.fractions && part.den_pattern.length * part.num_pattern.length === 0 || haveSlash && !part.fractions && !part.date || part.exponential && (part.int_pattern.length || part.frac_pattern.length) * part.man_pattern.length === 0) throw new SyntaxError(`Invalid pattern: ${patternSource}`); + const intPattern = part.int_pattern.join(""); + const manPattern = part.man_pattern.join(""); + const fracPattern = part.frac_pattern.join(""); + part.int_max = intPattern.length; + part.int_min = countNonHash(intPattern); + let min = 0; + for (let i = 0; i < intPattern.length; i++) { + const ch = intPattern[intPattern.length - 1 - i]; + if (/^[0-9?]/.test(ch)) min = i + 1; + } + part.int_min = min; + part.frac_max = fracPattern.length; + let num_pat = part.num_pattern.join(""); + let den_pat = part.den_pattern[0] || ""; + if (den_pat.includes("?") || num_pat.includes("?")) { + den_pat = den_pat.replace(/\d/g, "?"); + den_pat = den_pat.replace(/#$/g, "?"); + part.num_min = countNonHash(num_pat); + part.den_max = den_pat.length; + part.den_min = countNonHash(den_pat); + num_pat = num_pat.replace(/#$/g, "?"); + } else { + part.num_min = countNonHash(num_pat); + part.den_max = den_pat.length; + part.den_min = countNonHash(den_pat); + } + part.int_p = intPattern; + part.man_p = manPattern; + part.num_p = num_pat; + part.den_p = den_pat; + if (part.den_pattern.length) part.denominator = parseInt(part.den_pattern.join("").replace(/\D/g, ""), 10); + part.integer = !!intPattern.length; + if (!part.integer && !part.exponential && fracPattern.length) { + const pointIdx = part.tokens.findIndex((d) => d.type === TOKEN_POINT); + part.tokens.splice(pointIdx, 0, { + type: "INT", + num: "#" + }); + part.integer = true; + part.int_pattern = ["#"]; + part.int_p = "#"; + } + if (!part.tokens.length && /^\[(?!\$)/.test(part.pattern)) { + part.general = true; + add({ type: TOKEN_GENERAL }, outputTokens); + } + if (part.fractions) for (let i = 0; i < outputTokens.length - 1; i++) { + const tok = outputTokens[i]; + if (tok.type !== "STRING" && tok.type !== "SPACE") continue; + const nextType = outputTokens[i + 1].type; + if (nextType === "NUM") tok.rule = "num+int"; + else if (nextType === "DIV") tok.rule = "num"; + else if (nextType === "DEN") tok.rule = "den"; + } + if (part.grouping) { + if (part.int_pattern.length > 1) part.grouping = false; + } + return part; +} +//#endregion +//#region lib/clamp.ts +function clamp(num) { + if (num === 0) return num; + const d = Math.ceil(Math.log10(num < 0 ? -num : num)); + const mag = 10 ** (16 - Math.floor(d)); + return isFinite(mag) ? Math.round(num * mag) / mag : 0; +} +//#endregion +//#region lib/dec2frac.ts +const PRECISION = 1e-13; +/** +* Split a fractional number into a numerator and denominator for display as +* vulgar fractions. +* +* @internal +* @param number The value to split +* @param [numeratorMaxDigits=2] The maxdigits number +* @param [denominatorMaxDigits=2] The maxdigits de +* @returns Tuple of two numbers, numerator and denominator. +*/ +function dec2frac(number, numeratorMaxDigits = 2, denominatorMaxDigits = 2) { + const sign = number < 0 ? -1 : 1; + const maxdigits_n = 10 ** (numeratorMaxDigits || 2); + const maxdigits_d = 10 ** (denominatorMaxDigits || 2); + let z = Math.abs(number); + let last_d = 0; + let last_n = 0; + let curr_n = 0; + let curr_d = 1; + let tmp; + let r; + number = z; + if (number % 1 === 0) r = [number * sign, 1]; + else if (number < 1e-19) r = [sign, 0x8ac7230489e80000]; + else if (number > 0x8ac7230489e80000) r = [0x8ac7230489e80000 * sign, 1]; + else { + do { + z = 1 / (z - Math.floor(z)); + tmp = curr_d; + curr_d = curr_d * Math.floor(z) + last_d; + last_d = tmp; + last_n = curr_n; + curr_n = Math.floor(number * curr_d + .5); + if (curr_n >= maxdigits_n || curr_d >= maxdigits_d) return [sign * last_n, last_d]; + } while (Math.abs(number - curr_n / curr_d) >= PRECISION && z !== Math.floor(z)); + r = [sign * curr_n, curr_d]; + } + return r; +} +//#endregion +//#region lib/numberProps.ts +function getExponent(num, int_max = 0) { + const exp = Math.floor(Math.log10(num)); + return int_max > 1 ? Math.floor(exp / int_max) * int_max : exp; +} +function getSignificand(n, exp = 1) { + if (exp < -300) return parseFloat(n.toExponential().split("e")[0]); + return n * 10 ** -exp; +} +//#endregion +//#region lib/numdec.ts +const zero = { + total: 1, + sign: 0, + digits: 1, + period: 0, + int: 1, + frac: 0 +}; +function numdec(value, incl_sign = true) { + const v = Math.abs(value); + if (!v) return zero; + const signSize = incl_sign && value < 0 ? 1 : 0; + const intPart = Math.floor(v); + const intSize = Math.floor(Math.log10(v) + 1); + let periodSize = 0; + let fracSize = 0; + if (intPart !== v) { + periodSize = 1; + const n = String(round(v * 10 ** -intSize, 15)); + let f = n.length; + let z = true; + let i = 0; + while (i <= n.length) { + if (n[i] === ".") { + f--; + break; + } else if (n[i] === "0" && z) f--; + else z = false; + i++; + } + fracSize = f - intSize; + if (fracSize < 0) { + fracSize = 0; + periodSize = 0; + } + } + return { + total: signSize + Math.max(intSize, 1) + periodSize + fracSize, + digits: Math.max(intSize, 0) + fracSize, + sign: signSize, + period: periodSize, + int: Math.max(intSize, 1), + frac: fracSize + }; +} +//#endregion +//#region lib/general.ts +const fixLocale = (s, l10n) => { + return s.replace(/\./, l10n.decimal); +}; +const getExp = (n, exp, l10n) => { + const x = Math.abs(exp); + let m; + if (n === 1) m = n; + else m = round(n, 5); + return [ + fixLocale(m + "", l10n), + l10n.exponent, + exp < 0 ? l10n.negative : l10n.positive, + x < 10 ? "0" : "", + x + ]; +}; +function general(ret, value, l10n) { + if (typeof value === "string") ret.push(value); + else { + const int = value | 0; + if (value === int) ret.push(Math.abs(int)); + else { + const v = Math.abs(value); + let exp = getExponent(v); + let n = getSignificand(v, exp); + if (n === 10) { + n = 1; + exp++; + } + const num_dig = numdec(v); + if (exp >= -4 && exp <= -1) { + const o = v.toPrecision(10 + exp).replace(/\.?0+$/, ""); + ret.push(fixLocale(o, l10n)); + } else if (exp === 10) { + const o = v.toFixed(10).slice(0, 12).replace(/\.$/, ""); + ret.push(fixLocale(o, l10n)); + } else if (Math.abs(exp) <= 9) { + if (num_dig.total <= 11) { + const o = round(v, 9).toFixed(num_dig.frac); + ret.push(fixLocale(o, l10n)); + } else if (exp === 9) ret.push(Math.floor(v)); + else if (exp >= 0 && exp < 9) ret.push(fixLocale(String(round(v, 9 - exp)), l10n)); + else ret.push(...getExp(n, exp, l10n)); + } else if (num_dig.total >= 12) ret.push(...getExp(n, exp, l10n)); + else ret.push(fixLocale(round(v, 9).toFixed(num_dig.frac), l10n)); + } + } + return ret; +} +//#endregion +//#region lib/pad.ts +/** +* @internal +* @param c Instruction character ('#' | '?' | '0') +* @param Use nonbreaking space or not? +* @returns Padding character +*/ +function pad(c, nbsp = false) { + if (c === "0") return "0"; + else if (c === "?") return nbsp ? "\xA0" : " "; + return ""; +} +//#endregion +//#region lib/runPart.ts +const DAYSIZE = 86400; +const CHAR_0 = 48; +const CHAR_9 = 57; +const dateOverflows = (inputValue, roundedValue, bigRange) => { + if (bigRange) return inputValue < -694324 || roundedValue >= 35830291; + return inputValue < 0 || roundedValue >= 2958466; +}; +function runPart(value, part, opts, l10n_) { + let mantissa = ""; + let mantissa_sign = ""; + let numerator = ""; + let denominator = ""; + let fraction = ""; + let integer = ""; + let exp = 0; + let date = 0; + if (typeof value === "bigint") { + if (value <= Number.MAX_SAFE_INTEGER && value >= Number.MIN_SAFE_INTEGER) value = Number(value); + else return opts.bigintErrorNumber ? String(value) : opts.overflow; + date = value; + } else if (typeof value === "number") date = Math.trunc(value); + let time = 0; + let year = 0; + let month = 1; + let day = 0; + let weekday = 0; + let hour = 0; + let minute = 0; + let second = 0; + let subsec = 0; + const l10n = l10n_ || defaultLocale; + if (!part.text && isFinite(part.scale) && part.scale !== 1 && typeof value === "number") value = clamp(value * part.scale); + if (part.exponential && typeof value === "number") { + let v = Math.abs(value); + if (v) exp = getExponent(v, part.int_max); + if (value && !part.integer) exp++; + v = getSignificand(v, exp); + if (part.int_max === 1 && round(v, part.frac_max) === 10) { + v = 1; + exp++; + } + value = value < 0 ? -v : v; + mantissa += Math.abs(exp); + } + if (part.integer && typeof value === "number") { + const i = Math.abs(round(value, part.fractions ? 1 : part.frac_max)); + integer += i < 1 ? "" : Math.floor(i); + } + const group_pri = opts.grouping[0] ?? 3; + const group_sec = opts.grouping[1] ?? group_pri; + if (part.dec_fractions && typeof value === "number") fraction = String(round(value, part.frac_max)).split(".")[1] || ""; + const fixed_slash = !part.error && (part.num_p.includes("0") || part.den_p.includes("0")); + let have_fraction = fixed_slash; + if (part.fractions && typeof value === "number") { + have_fraction = fixed_slash || !!(value % 1); + const _dec = Math.abs(part.integer ? value % 1 : value); + if (_dec) { + have_fraction = true; + if (part.denominator && isFinite(part.denominator)) { + denominator += part.denominator; + numerator += round(_dec * part.denominator); + if (numerator === "0") { + numerator = ""; + denominator = ""; + have_fraction = fixed_slash; + } + } else { + const frt = dec2frac(_dec, Infinity, part.den_max); + numerator += frt[0]; + denominator += frt[1]; + if (part.integer && numerator === "0") { + numerator = ""; + denominator = ""; + have_fraction = fixed_slash; + } + } + } else if (!value && !part.integer) { + have_fraction = true; + numerator = "0"; + denominator = "1"; + } + if (part.integer && !have_fraction && !Math.trunc(value)) integer = "0"; + } + if (part.date && typeof value === "number") { + date = Math.trunc(value); + const t = DAYSIZE * (value - date); + time = Math.floor(t); + subsec = t - time; + if (Math.abs(subsec) < 1e-6) subsec = 0; + else if (subsec > .9999) { + subsec = 0; + time += 1; + if (time === DAYSIZE) { + time = 0; + date += 1; + } + } + if (subsec) { + const minU = part.date & 512 || part.date & 256 || part.date & 128; + if (minU === 512 && subsec > .9995 || minU === 256 && subsec > .995 || minU === 128 && subsec > .95 || !minU && subsec >= .5) { + time++; + subsec = 0; + } + } + if (date || part.date_system) { + const dout = toYMD(value, part.date_system, opts.leap1900); + year = dout[0]; + month = dout[1]; + day = dout[2]; + } + if (time) { + const x = time < 0 ? DAYSIZE + time : time; + second = Math.floor(x) % 60; + minute = Math.floor(x / 60) % 60; + hour = Math.floor(x / 60 / 60) % 60; + } + weekday = (6 + date) % 7; + if (part.date_eval && dateOverflows(value, date + time / DAYSIZE, opts.dateSpanLarge)) { + if (opts.dateErrorThrows) throw new Error("Date out of bounds"); + if (opts.dateErrorNumber) return general(value < 0 ? [l10n.negative] : [], value, l10n).join(""); + return opts.overflow; + } + } + const padQ = pad("?", opts.nbsp); + if (exp < 0) mantissa_sign = "-"; + else if (part.exp_plus) mantissa_sign = "+"; + const ret = []; + const digitsStart = (numstr, pattern, prt, offset) => { + const l = !offset && numstr.length > pattern.length ? prt.length + numstr.length - pattern.length : prt.length; + if (numstr.length < pattern.length) offset += numstr.length - pattern.length; + for (let i = 0; i < l; i++) ret.push(numstr[i + offset] || pad(prt[i], opts.nbsp)); + return l; + }; + let denominator_fixed = false; + const counter = { + int: 0, + frac: 0, + man: 0, + num: 0, + den: 0 + }; + for (let ti = 0, tl = part.tokens.length; ti < tl; ti++) { + const tok = part.tokens[ti]; + const tokenType = tok.type; + const len = "num" in tok ? tok.num.length : 0; + if (tokenType === "STRING") { + const rule = tok.rule; + if (rule) { + if (rule === "num" && have_fraction || rule === "num+int" && have_fraction && integer || rule === "den" && have_fraction) ret.push(tok.value.replaceAll(" ", padQ)); + else if (rule === "num" && part.num_min > 0 || part.den_min > 0 || rule === "num+int" && part.den_min > 0 && (integer || part.num_min) || rule === "den" && part.den_min > 0 || part.den_min > 0) ret.push(padQ.repeat(tok.value.length)); + } else ret.push(tok.value.replaceAll(" ", padQ)); + } else if (tokenType === "SPACE") { + if (tok.rule === "num+int") { + if ((have_fraction || part.num_min || part.den_min) && (integer || part.num_min)) ret.push(padQ); + } else ret.push(padQ); + } else if (tokenType === "ERROR") ret.push(opts.invalid); + else if (tokenType === "POINT") ret.push(part.date ? tok.value : l10n.decimal); + else if (tokenType === "GENERAL") general(ret, value, l10n); + else if (tokenType === "EXP") ret.push(l10n.exponent); + else if (tokenType === "MINUS") { + if (tok.volatile && part.date) {} else if (tok.volatile && (typeof value !== "number" || value >= 0)) {} else if (tok.volatile && !part.fractions && (part.integer || part.dec_fractions)) { + if (typeof value === "number" && value < 0 && integer && integer !== "0" || fraction) ret.push(l10n.negative); + } else ret.push(l10n.negative); + } else if (tokenType === "PLUS") ret.push(l10n.positive); + else if (tokenType === "TEXT") ret.push(value); + else if (tokenType === "FILL") { + if (opts.fillChar) ret.push(opts.fillChar, tok.value); + } else if (tokenType === "SKIP") { + if (opts.skipChar) ret.push(opts.skipChar, tok.value); + else ret.push(opts.nbsp ? "\xA0" : " "); + } else if (tokenType === "DIV") { + if (have_fraction) ret.push("/"); + else if (part.num_min > 0 || part.den_min > 0) ret.push(padQ); + else ret.push(pad("#", opts.nbsp)); + } else if (tokenType === "INT") { + if (part.int_pattern.length === 1) { + const pt = part.int_p; + const l = Math.max(part.int_min, integer.length); + let digits = ""; + for (let i = l; i > 0; i--) { + const d = integer.charAt(integer.length - i); + const p = d ? "" : pt.charAt(pt.length - i) || pt[0]; + let sep = ""; + if (part.grouping) { + const n = i - 1 - group_pri; + if (n >= 0 && !(n % group_sec)) sep = d || p === "0" ? l10n.group : pad("?", opts.nbsp); + } + digits += (d || pad(p, opts.nbsp)) + sep; + } + ret.push(digits); + } else counter.int += digitsStart(integer, part.int_p, tok.num, counter.int); + } else if (tokenType === "FRAC") { + const o = counter.frac; + for (let i = 0; i < len; i++) ret.push(fraction[i + o] || pad(tok.num[i], opts.nbsp)); + counter.frac += len; + } else if (tokenType === "MAN") { + if (!counter.man) ret.push(mantissa_sign); + counter.man += digitsStart(mantissa, part.man_p, tok.num, counter.man); + } else if (tokenType === "NUM") counter.num += digitsStart(numerator, part.num_p, tok.num, counter.num); + else if (tokenType === "DEN") { + const o = counter.den; + for (let i = 0; i < len; i++) { + let digit = denominator[i + o]; + if (!digit) { + const c = tok.num.charCodeAt(i); + if (c > CHAR_0 && c <= CHAR_9 || denominator_fixed && c === CHAR_0) { + denominator_fixed = true; + digit = opts.nbsp ? "\xA0" : " "; + } else if (!denominator_fixed && i === len - 1 && c === CHAR_0 && !denominator) digit = "1"; + else digit = pad(tok.num[i], opts.nbsp); + } + ret.push(digit); + } + counter.den += len; + } else if (tokenType === "YEAR") { + if (year < 0) ret.push(l10n.negative); + ret.push(String(Math.abs(year)).padStart(4, "0")); + } else if (tokenType === "YEAR-SHORT") { + const y = year % 100; + ret.push(y < 10 ? "0" : "", y); + } else if (tokenType === "MONTH") ret.push(tok.pad && month < 10 ? "0" : "", month); + else if (tokenType === "MONTHNAME-SINGLE") { + if (part.date_system === 6) ret.push(l10n.mmmm6[month - 1].charAt(0)); + else ret.push(l10n.mmmm[month - 1].charAt(0)); + } else if (tokenType === "MONTHNAME-SHORT") { + if (part.date_system === 6) ret.push(l10n.mmm6[month - 1]); + else ret.push(l10n.mmm[month - 1]); + } else if (tokenType === "MONTHNAME") { + if (part.date_system === 6) ret.push(l10n.mmmm6[month - 1]); + else ret.push(l10n.mmmm[month - 1]); + } else if (tok.type === "WEEKDAY-SHORT") ret.push(l10n.ddd[weekday]); + else if (tokenType === "WEEKDAY") ret.push(l10n.dddd[weekday]); + else if (tokenType === "DAY") ret.push(tok.pad && day < 10 ? "0" : "", day); + else if (tokenType === "HOUR") { + const h = hour % part.clock || (part.clock < 24 ? part.clock : 0); + ret.push(tok.pad && h < 10 ? "0" : "", h); + } else if (tokenType === "MIN") ret.push(tok.pad && minute < 10 ? "0" : "", minute); + else if (tokenType === "SEC") ret.push(tok.pad && second < 10 ? "0" : "", second); + else if (tokenType === "SUBSEC") { + ret.push(l10n.decimal); + const f = subsec.toFixed(part.sec_decimals); + ret.push(f.slice(2, 2 + tok.decimals)); + } else if (tokenType === "AMPM") { + const idx = hour < 12 ? 0 : 1; + if (tok.short && !l10n_) ret.push("AP"[idx]); + else ret.push(l10n.ampm[idx]); + } else if (tokenType === "HOUR-ELAP" && typeof value === "number") { + if (value < 0) ret.push(l10n.negative); + const hh = date * 24 + Math.floor(Math.abs(time) / 3600); + ret.push(String(Math.abs(hh)).padStart(tok.pad, "0")); + } else if (tokenType === "MIN-ELAP" && typeof value === "number") { + if (value < 0) ret.push(l10n.negative); + const mm = date * 1440 + Math.floor(Math.abs(time) / 60); + ret.push(String(Math.abs(mm)).padStart(tok.pad, "0")); + } else if (tokenType === "SEC-ELAP" && typeof value === "number") { + if (value < 0) ret.push(l10n.negative); + const ss = date * DAYSIZE + Math.abs(time); + ret.push(String(Math.abs(ss)).padStart(tok.pad, "0")); + } else if (tokenType === "B-YEAR") ret.push(year + 543); + else if (tokenType === "B-YEAR-SHORT") { + const y = (year + 543) % 100; + ret.push(y < 10 ? "0" : "", y); + } + } + return ret.join(""); +} +//#endregion +//#region lib/formatNumber.ts +const default_text = parseFormatSection([{ + type: TOKEN_TEXT, + value: "@", + raw: "@" +}]); +function getPart(value, parts) { + for (let pi = 0; pi < 3; pi++) { + const part = parts[pi]; + if (part) { + let cond = false; + if (part.condition) { + const operator = part.condition[0]; + const operand = part.condition[1]; + if (operator === "=") cond = value === operand; + else if (operator === "<>") cond = value !== operand; + else if (typeof value === "string") cond = false; + else if (operator === ">") cond = value > operand; + else if (operator === "<") cond = value < operand; + else if (operator === ">=") cond = value >= operand; + else if (operator === "<=") cond = value <= operand; + } else cond = true; + if (cond) return part; + } + } +} +function formatColor$1(value, parseData, opts) { + const parts = parseData.partitions; + let part = parts[3]; + let color; + if ((typeof value === "number" || typeof value === "bigint") && Number.isFinite(value)) part = getPart(value, parts); + if (part?.color) color = part.color; + if (color && typeof color === "number" && opts.indexColors) color = indexColors[color - 1] || "#000"; + return color; +} +function formatValue(value, parseData, opts) { + const parts = parseData.partitions; + const l10n = getLocale(parseData.locale || opts.locale); + const text_part = parts[3] ? parts[3] : default_text; + if (typeof value === "boolean") value = (l10n || defaultLocale).bool[value ? 0 : 1]; + if (value == null) return ""; + const n = typeof value === "bigint"; + if (typeof value !== "number" && !n) return runPart(String(value), text_part, opts, l10n); + if (!n && !Number.isFinite(value)) { + const loc = l10n || defaultLocale; + if (Number.isNaN(value)) return loc.nan; + return (value < 0 ? loc.negative : "") + loc.infinity; + } + const v = value; + const part = getPart(v, parts); + return part ? runPart(v, part, opts, l10n) : opts.overflow; +} +//#endregion +//#region lib/formatInfo.ts +function isPercent(partitions) { + return !!(partitions[0]?.percent || partitions[1]?.percent || partitions[2]?.percent || partitions[3]?.percent); +} +function isDate(partitions) { + return !!(partitions[0]?.date || partitions[1]?.date || partitions[2]?.date || partitions[3]?.date); +} +function isText(partitions) { + const [part1, part2, part3, part4] = partitions; + return !!((!part1 || part1.generated) && (!part2 || part2.generated) && (!part3 || part3.generated) && part4?.text && !part4.generated); +} +const level = { + text: 15, + datetime: 10.8, + date: 10.8, + time: 10.8, + percent: 10.6, + currency: 10.4, + grouped: 10.2, + scientific: 6, + number: 4, + fraction: 2, + general: 0, + error: 0 +}; +const dateCodes = [ + ["DMY", 1], + ["DM", 2], + ["MY", 3], + ["MDY", 4], + ["MD", 5], + ["hmsa", 6], + ["hma", 7], + ["hms", 8], + ["hm", 9] +]; +function info(partitions, currencyId) { + const [partPos, partNeg] = partitions; + const frac_max = partPos.frac_max; + const output = { + type: "general", + isDate: isDate(partitions), + isText: isText(partitions), + isPercent: isPercent(partitions), + maxDecimals: partPos.general ? 9 : frac_max, + scale: partPos.scale ?? 1, + color: 0, + parentheses: 0, + grouped: partPos.grouping ? 1 : 0, + code: "", + level: 0 + }; + const isCurrency = !output.isDate && !output.isText && !partPos.error && partPos.tokens.some((tok) => tok.type === "STRING" && (currencyId ? tok.value === currencyId : reCurrencySymbols.test(tok.value))); + let codeType = "G"; + let codeNum = frac_max >= 0 ? Math.min(15, frac_max) : ""; + let codeParens = ""; + let codeDash = ""; + if (partNeg?.color) { + codeDash = "-"; + output.color = 1; + } + if (partPos.parens) { + codeParens = "()"; + output.parentheses = 1; + } + if (isCurrency) { + codeType = "C"; + output.type = "currency"; + } else if (partPos.error) { + output.type = "error"; + output.maxDecimals = 0; + } else if (output.isDate) { + let haveTime = 0; + let haveDate = 0; + let order = ""; + partPos.tokens.forEach((tok) => { + const type = tok.type; + if (type === "YEAR" || type === "YEAR-SHORT" || type === "B-YEAR" || type === "B-YEAR-SHORT") { + order += "Y"; + haveDate++; + } else if (type === "MONTH" || type === "MONTHNAME" || type === "MONTHNAME-SHORT" || type === "MONTHNAME-SINGLE") { + order += "M"; + haveDate++; + } else if (type === "WEEKDAY" || type === "WEEKDAY-SHORT" || type === "DAY") { + order += "D"; + haveDate++; + } else if (type === "HOUR") { + order += "h"; + haveTime++; + } else if (type === "MIN") { + order += "m"; + haveTime++; + } else if (type === "SEC") { + order += "s"; + haveTime++; + } else if (type === "AMPM") { + order += "a"; + haveTime++; + } + }); + output.type = "date"; + if (haveDate && haveTime) output.type = "datetime"; + else if (!haveDate && haveTime) output.type = "time"; + const code = dateCodes.find((d) => order.startsWith(d[0])); + codeType = code ? "D" : "G"; + codeNum = code ? code[1] : ""; + } else if (output.isText) { + codeType = "G"; + output.type = "text"; + codeNum = ""; + output.maxDecimals = 0; + } else if (partPos.general) { + codeType = "G"; + output.type = "general"; + codeNum = ""; + } else if (partPos.fractions) { + codeType = "G"; + output.type = "fraction"; + codeNum = ""; + } else if (partPos.exponential) { + codeType = "S"; + output.type = "scientific"; + } else if (output.isPercent) { + codeType = "P"; + output.type = "percent"; + } else if (partPos.grouping) { + codeType = ","; + output.type = "grouped"; + } else if (partPos.int_max || frac_max) { + codeType = "F"; + output.type = "number"; + } + output.code = codeType + codeNum + codeDash + codeParens; + output.level = level[output.type]; + return output; +} +function dateInfo(partitions) { + const [partPos] = partitions; + return { + year: !!(partPos.date & 2), + month: !!(partPos.date & 4), + day: !!(partPos.date & 8), + hours: !!(partPos.date & 16), + minutes: !!(partPos.date & 32), + seconds: !!(partPos.date & 64), + clockType: partPos.clock === 12 ? 12 : 24 + }; +} +//#endregion +//#region lib/tokenize.ts +const tokenHandlers = [ + [ + TOKEN_GENERAL, + /^General/i, + 0 + ], + [ + TOKEN_HASH, + /^#/, + 0 + ], + [ + TOKEN_ZERO, + /^0/, + 0 + ], + [ + TOKEN_QMARK, + /^\?/, + 0 + ], + [ + TOKEN_SLASH, + /^\//, + 0 + ], + [ + TOKEN_BREAK, + /^;/, + 0 + ], + [ + TOKEN_TEXT, + /^@/, + 0 + ], + [ + TOKEN_PLUS, + /^\+/, + 0 + ], + [ + TOKEN_MINUS, + /^-/, + 0 + ], + [ + TOKEN_POINT, + /^\./, + 0 + ], + [ + TOKEN_SPACE, + /^ /, + 0 + ], + [ + TOKEN_PERCENT, + /^%/, + 0 + ], + [ + TOKEN_DIGIT, + /^[1-9]/, + 0 + ], + [ + TOKEN_CALENDAR, + /^(?:B[12])/i, + 0 + ], + [ + TOKEN_ERROR, + /^B$/, + 0 + ], + [ + TOKEN_DATETIME, + /^(?:[hH]+|[mM]+|[sS]+|[yY]+|[bB]+|[dD]+|[gG]+|[aA]{3,}|e+)/, + 0 + ], + [ + TOKEN_DURATION, + /^(?:\[(h+|m+|s+)\])/i, + 1 + ], + [ + TOKEN_CONDITION, + /^\[(<[=>]?|>=?|=)\s*(-?[.\d]+)\]/, + [1, 2] + ], + [ + TOKEN_DBNUM, + /^\[(DBNum[0-4]?\d)\]/i, + 1 + ], + [ + TOKEN_NATNUM, + /^\[(NatNum[0-4]?\d)\]/i, + 1 + ], + [ + TOKEN_LOCALE, + /^\[\$([^\]]+)\]/, + 1 + ], + [ + TOKEN_COLOR, + /^\[(black|blue|cyan|green|magenta|red|white|yellow|color\s*\d+)\]/i, + 1 + ], + [ + TOKEN_MODIFIER, + /^\[([^\]]+)\]/, + 1 + ], + [ + TOKEN_AMPM, + /^(?:AM\/PM|am\/pm|A\/P)/, + 0 + ], + [ + TOKEN_ESCAPED, + /^\\(.)/, + 1 + ], + [ + TOKEN_STRING, + /^"([^"]*?)"/, + 1 + ], + [ + TOKEN_SKIP, + /^_(\\.|.)/, + 1 + ], + [ + "EXP", + /^[Ee]([+-])/, + 1 + ], + [ + TOKEN_FILL, + /^\*(\\.|.)/, + 1 + ], + [ + TOKEN_PAREN, + /^[()]/, + 0 + ], + [ + TOKEN_ERROR, + /^[EÈÉÊËèéêëĒēĔĕĖėĘęĚěȄȅȆȇȨȩNnÑñŃńŅņŇňǸǹ["*/\\_]/, + 0 + ], + [ + TOKEN_CHAR, + /^./, + 0 + ] +]; +const CODE_QMRK = 63; +const CODE_HASH = 35; +const CODE_ZERO = 48; +const CODE_NINE = 57; +const isNumOp = (char) => { + const c = (char || "\0").charCodeAt(0); + return c === CODE_QMRK || c === CODE_HASH || c >= CODE_ZERO && c <= CODE_NINE; +}; +/** +* Breaks a format pattern string into a list of tokens. +* +* The returned output will be an array of objects representing the tokens: +* +* ```js +* [ +* { type: TOKEN_ZERO, value: '0', raw: '0' }, +* { type: TOKEN_POINT, value: '.', raw: '.' }, +* { type: TOKEN_ZERO, value: '0', raw: '0' }, +* { type: TOKEN_PERCENT, value: '%', raw: '%' } +* ] +* ``` +* +* @param pattern The format pattern +* @returns A list of tokens +*/ +function tokenize(pattern) { + let i = 0; + const tokens = []; + const unresolvedCommas = []; + while (i < pattern.length) { + const curr = pattern.slice(i); + let step = 0; + const mComma = /^(,+)(.)?/.exec(curr); + if (mComma) { + const raw = mComma[1]; + step = raw.length; + const lookBehind = pattern[i - 1] || ""; + let maybeGROUP = false; + let maybeSCALE = false; + if (isNumOp(lookBehind)) { + maybeGROUP = true; + maybeSCALE = true; + } else if (lookBehind === ".") maybeSCALE = true; + const lookAhead = mComma[2] || ""; + if (maybeGROUP && (!lookAhead || lookAhead === ";")) maybeGROUP = false; + if (maybeSCALE && isNumOp(lookAhead)) maybeSCALE = false; + if (maybeGROUP && !maybeSCALE) tokens.push({ + type: TOKEN_GROUP, + value: ",", + raw + }); + else if (!maybeGROUP && maybeSCALE) tokens.push({ + type: TOKEN_SCALE, + value: ",", + raw + }); + else if (maybeGROUP && maybeSCALE) { + const t = { + type: TOKEN_SCALE, + value: ",", + raw + }; + tokens.push(t); + unresolvedCommas.push(t); + } else tokens.push({ + type: TOKEN_COMMA, + value: ",", + raw + }); + } else { + let token; + for (const [type, expr, group] of tokenHandlers) { + const m = expr.exec(curr); + if (m) { + token = { + type, + value: Array.isArray(group) ? group.map((d) => m[d]) : m[group || 0], + raw: m[0] + }; + tokens.push(token); + step = m[0].length; + break; + } + } + if (unresolvedCommas.length && token?.raw === ";") unresolvedCommas.length = 0; + if (token && unresolvedCommas.length && isNumOp(token.raw)) { + unresolvedCommas.forEach((d) => d.type = TOKEN_GROUP); + unresolvedCommas.length = 0; + } + } + if (!step) { + const raw = curr[0]; + step = 1; + tokens.push({ + type: TOKEN_CHAR, + value: raw, + raw + }); + } + i += step; + } + return tokens; +} +//#endregion +//#region lib/parsePattern.ts +const maybeAddMinus = (part) => { + const [op, val] = part.condition ?? ["", 0]; + if (!(val < 0 && (op === "<" || op === "<=" || op === "=") || val === 0 && op === "<")) part.tokens.unshift({ + type: TOKEN_MINUS, + volatile: true + }); +}; +const clonePart = (part, prefixToken) => { + const r = {}; + for (const key in part) { + const val = part[key]; + r[key] = Array.isArray(val) ? [...val] : val; + } + if (prefixToken && r.tokens) r.tokens.unshift(prefixToken); + r.generated = true; + return r; +}; +function parsePattern(pattern) { + const partitions = []; + let conditional = false; + let l10n_override; + let text_partition = null; + let more = 0; + let part; + let i = 0; + let conditions = 0; + let tokens = tokenize(pattern); + do { + part = parseFormatSection(tokens); + if ((part.date || part.general) && (part.int_pattern.length || part.frac_pattern.length || part.scale !== 1 || part.text)) throw new Error("Illegal format"); + if (part.condition) { + conditions++; + conditional = true; + } + if (part.text) { + if (text_partition) throw new Error("Unexpected partition"); + text_partition = part; + } + if (part.locale) l10n_override = resolveLocale(part.locale); + partitions.push(part); + more = tokens[part.tokensUsed]?.type === "BREAK" ? 1 : 0; + tokens = tokens.slice(part.tokensUsed + more); + i++; + } while (more && i < 4 && conditions < 3); + if (more) throw new Error("Unexpected partition"); + if (conditions > 2) throw new Error("Unexpected condition"); + const part3 = partitions[3]; + if (part3 && (part3.int_pattern.length || part3.frac_pattern.length || part3.date)) throw new Error("Unexpected partition"); + if (conditional) { + if (!partitions[0].condition) partitions[0].condition = [">", 0]; + const numParts = partitions.length; + if (numParts === 1) { + partitions[1] = parseFormatSection(tokenize("General")); + partitions[1].generated = true; + } + if (numParts <= 2) {} + if (numParts < 3) { + const part1 = partitions[0]; + const part2 = partitions[1]; + maybeAddMinus(part1); + if (part2.condition) maybeAddMinus(part2); + else { + const cond = part1.condition; + if (cond && (cond[0] === "=" || cond[1] >= 0 && (cond[0] === ">" || cond[0] === ">="))) part2.tokens.unshift({ + type: TOKEN_MINUS, + volatile: true + }); + } + } else partitions.forEach(maybeAddMinus); + } else { + if (partitions.length < 4 && text_partition) { + for (let pi = 0, pl = partitions.length; pi < pl; pi++) if (partitions[pi] === text_partition) partitions.splice(pi, 1); + } + if (partitions.length < 1 && text_partition) { + partitions[0] = parseFormatSection(tokenize("General")); + partitions[0].generated = true; + } + if (partitions.length < 2) { + const volMinus = { + type: TOKEN_MINUS, + volatile: true + }; + partitions.push(clonePart(partitions[0], volMinus)); + } + if (partitions.length < 3) partitions.push(clonePart(partitions[0])); + if (partitions.length < 4) { + if (text_partition) partitions.push(text_partition); + else { + const p = parseFormatSection(tokenize("@")); + p.generated = true; + partitions.push(p); + } + } + partitions[0].condition = [">", 0]; + partitions[1].condition = ["<", 0]; + partitions[2].condition = void 0; + } + return { + pattern, + partitions, + locale: l10n_override + }; +} +//#endregion +//#region lib/index.ts +/** +* The numfmt library formats numbers according to a specifier string as defined in ECMA-376. +* The library tries its best to emulate the inns and outs of what the Excel spreadsheet +* software does. +* +* @packageDocumentation +* @module numfmt +*/ +const _parseDataCache = Object.create({}); +function prepareFormatterData(pattern, shouldThrow = false) { + if (!pattern) pattern = "General"; + let parseData = _parseDataCache[pattern]; + if (!parseData) try { + parseData = parsePattern(pattern); + _parseDataCache[pattern] = parseData; + } catch (err) { + if (shouldThrow) throw err; + const message = err && typeof err === "object" && "message" in err ? err.message : "Unknown error"; + const errPart = { + tokens: [{ type: TOKEN_ERROR }], + error: message + }; + parseData = { + pattern, + partitions: [ + errPart, + errPart, + errPart, + errPart + ], + error: message, + locale: null + }; + } + return parseData; +} +/** +* Formats a value as a string and returns the result. +* +* - Dates are normalized to spreadsheet style serial dates and then formatted. +* - Booleans are emitted as uppercase `TRUE` or `FALSE`. +* - `null` and `undefined` will return an empty string `""`. +* - Any non number values will be stringified and passed through the text section of the format pattern. +* - `NaN`s and `Infinite`s will use the corresponding strings from the active locale. +* +* @param pattern - A format pattern in the ECMA-376 number format. +* @param value - The value to format. +* @param [options={}] Formatter options + +* @returns A formatted value +*/ +function format(pattern, value, options = {}) { + const opts = Object.assign({}, defaultOptions, options); + const data = prepareFormatterData(pattern, opts.throws); + return formatValue(dateToSerial(value, opts) ?? value, data, opts); +} +/** +* Find the color appropriate to a value as dictated by a format pattern. +* +* If the pattern defines colors, this function will emit the color appropriate +* to the value. If no colors were specified this function returns `undefined`. +* +* ```js +* const color = formatColor("[green]#,##0;[red]-#,##0", -10); +* console.log(color); // "red" +* const color = formatColor("[green]#,##0;-#,##0", -10); +* console.log(color); // undefined +* ``` +* +* @param pattern - A format pattern in the ECMA-376 number format. +* @param value - The value to format. +* @param [options={}] Formatter options +* @param [options.throws=true] +* Should the formatter throw an error if a provided pattern is invalid. +* If false, a formatter will be constructed which instead outputs an error +* string (see _invalid_ in this table). +* `true` by default. +* @param [options.ignoreTimezone=false] +* Normally when date objects are used with the formatter, time zone is taken +* into account. This makes the formatter ignore the timezone offset. +* `false` by default. +* @param [options.indexColors=true] +* When indexed color modifiers are used (`[Color 1]`) the formatter will +* convert the index into the corresponding hex color of the default palette. +* When this option is set to false, the number will instead by emitted +* allowing you to index against a custom palette. +* `true` by default. +* @returns +* A string color value as described by the pattern or a number if the +* indexColors option has been set to false. +*/ +function formatColor(pattern, value, options) { + const opts = Object.assign({}, defaultOptions, options); + const data = prepareFormatterData(pattern, opts.throws); + return formatColor$1(dateToSerial(value, opts) ?? value, data, opts); +} +/** +* Determine if a given format pattern is a date pattern. +* +* The pattern is considered a date pattern if any of its sections (`"a;b;c;d"`) +* contains a date operator (such as `Y` or `H`). Each section is restricted to be +* _either_ a number or date format. +* +* @param pattern A format pattern in the ECMA-376 number format. +* @returns True if the specified pattern is date pattern, False otherwise. +*/ +function isDateFormat(pattern) { + return isDate(prepareFormatterData(pattern, false).partitions); +} +/** +* Determine if a given format pattern is a percentage pattern. +* +* The pattern is considered a percentage pattern if any of its sections (`"a;b;c;d"`) +* contains an unescaped percentage symbol. +* +* @param pattern A format pattern in the ECMA-376 number format. +* @returns True if the specified pattern is date pattern, False otherwise. +*/ +function isPercentFormat(pattern) { + return isPercent(prepareFormatterData(pattern, false).partitions); +} +/** +* Determine if a given format pattern is a text only pattern. +* +* The pattern is considered text only if its definition is composed of a single +* section that includes that text symbol (`@`). +* +* For example `@` or `@" USD"` are text patterns but `#;@` is not. +* +* @param pattern A format pattern in the ECMA-376 number format. +* @returns True if the specified pattern is date pattern, False otherwise. +*/ +function isTextFormat(pattern) { + return isText(prepareFormatterData(pattern, false).partitions); +} +/** +* Determine if a given format pattern is valid. +* +* @param pattern A format pattern in the ECMA-376 number format. +* @returns True if the specified pattern is valid, False otherwise. +*/ +function isValidFormat(pattern) { + try { + prepareFormatterData(pattern, true); + return true; + } catch (err) { + return false; + } +} +/** +* Returns an object detailing the properties and internals of a format parsed +* format pattern. +* +* @param pattern A format pattern in the ECMA-376 number format. +* @param [options={}] Options for the method +* @param [options.currency] +* Limit the patterns identified as currency to those that use the give string. +* If nothing is provided, patterns will be tagged as currency if one of the +* following currency symbols is used: `¤$£¥֏؋৳฿៛₡₦₩₪₫€₭₮₱₲₴₸₹₺₼₽₾₿` +* @returns An object of format properties. +*/ +function getFormatInfo(pattern, options = {}) { + const data = prepareFormatterData(pattern, false); + if (!data.info) data.info = info(data.partitions, options?.currency); + return data.info; +} +/** +* Gets information about how date codes are used in a format string. +* +* @param pattern A format pattern in the ECMA-376 number format. +* @returns An object of format date properties. +*/ +function getFormatDateInfo(pattern) { + const data = prepareFormatterData(pattern, false); + if (!data.dateInfo) data.dateInfo = dateInfo(data.partitions); + return data.dateInfo; +} +//#endregion +export { addLocale, dateFromSerial, dateToSerial, format, formatColor, getFormatDateInfo, getFormatInfo, getLocale, isDateFormat, isPercentFormat, isTextFormat, isValidFormat, parseBool, parseDate, parseLocale, parseNumber, parseTime, parseValue, round, tokenize }; + +//# sourceMappingURL=index.mjs.map \ No newline at end of file diff --git a/dist/index.mjs.map b/dist/index.mjs.map new file mode 100644 index 0000000..53d9fd5 --- /dev/null +++ b/dist/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","names":["floor","DAYSIZE","isNumOp","formatColor","handleDates","fmtValue","fmtColor"],"sources":["../lib/constants.ts","../lib/codeToLocale.ts","../lib/locale.ts","../lib/options.ts","../lib/round.ts","../lib/toYMD.ts","../lib/serialDate.ts","../lib/isValidDate.ts","../lib/parseValue.ts","../lib/createPartition.ts","../lib/parseFormatSection.ts","../lib/clamp.ts","../lib/dec2frac.ts","../lib/numberProps.ts","../lib/numdec.ts","../lib/general.ts","../lib/pad.ts","../lib/runPart.ts","../lib/formatNumber.ts","../lib/formatInfo.ts","../lib/tokenize.ts","../lib/parsePattern.ts","../lib/index.ts"],"sourcesContent":["export const u_YEAR = 2;\nexport const u_MONTH = 2 ** 2;\nexport const u_DAY = 2 ** 3;\nexport const u_HOUR = 2 ** 4;\nexport const u_MIN = 2 ** 5;\nexport const u_SEC = 2 ** 6;\nexport const u_DSEC = 2 ** 7; // decisecond\nexport const u_CSEC = 2 ** 8; // centisecond\nexport const u_MSEC = 2 ** 9; // millisecond\n\n// Excel date boundaries\nexport const MIN_S_DATE = 0;\nexport const MAX_S_DATE = 2958466;\n// Google date boundaries\nexport const MIN_L_DATE = -694324;\nexport const MAX_L_DATE = 35830291;\n\n// if more calendars are added, they should conform to MS CALID identifiers\n// https://docs.microsoft.com/en-us/windows/win32/intl/calendar-identifiers\nexport const EPOCH_1904 = -1;\nexport const EPOCH_1900 = 1;\nexport const EPOCH_1317 = 6;\n\nexport const TOKEN_GENERAL = 'GENERAL';\nexport const TOKEN_HASH = 'HASH';\nexport const TOKEN_ZERO = 'ZERO';\nexport const TOKEN_QMARK = 'QMARK';\nexport const TOKEN_SLASH = 'SLASH';\nexport const TOKEN_GROUP = 'GROUP';\nexport const TOKEN_SCALE = 'SCALE';\nexport const TOKEN_COMMA = 'COMMA';\nexport const TOKEN_BREAK = 'BREAK';\nexport const TOKEN_TEXT = 'TEXT';\nexport const TOKEN_PLUS = 'PLUS';\nexport const TOKEN_MINUS = 'MINUS';\nexport const TOKEN_POINT = 'POINT';\nexport const TOKEN_SPACE = 'SPACE';\nexport const TOKEN_PERCENT = 'PERCENT';\nexport const TOKEN_DIGIT = 'DIGIT';\nexport const TOKEN_CALENDAR = 'CALENDAR';\nexport const TOKEN_ERROR = 'ERROR';\nexport const TOKEN_DATETIME = 'DATETIME';\nexport const TOKEN_DURATION = 'DURATION';\nexport const TOKEN_CONDITION = 'CONDITION';\nexport const TOKEN_DBNUM = 'DBNUM';\nexport const TOKEN_NATNUM = 'NATNUM';\nexport const TOKEN_LOCALE = 'LOCALE';\nexport const TOKEN_COLOR = 'COLOR';\nexport const TOKEN_MODIFIER = 'MODIFIER';\nexport const TOKEN_AMPM = 'AMPM';\nexport const TOKEN_ESCAPED = 'ESCAPED';\nexport const TOKEN_STRING = 'STRING';\nexport const TOKEN_SKIP = 'SKIP';\nexport const TOKEN_EXP = 'EXP';\nexport const TOKEN_FILL = 'FILL';\nexport const TOKEN_PAREN = 'PAREN';\nexport const TOKEN_CHAR = 'CHAR';\n\nexport const T_TYPE_INT = 'INT';\nexport const T_TYPE_NUM = 'NUM';\nexport const T_TYPE_MAN = 'MAN';\nexport const T_TYPE_DEN = 'DEN';\nexport const T_TYPE_FRAC = 'FRAC';\nexport const T_TYPE_DIV = 'DIV';\nexport const T_TYPE_YEAR = 'YEAR';\nexport const T_TYPE_YEAR_S = 'YEAR-SHORT';\nexport const T_TYPE_MON = 'MONTH';\nexport const T_TYPE_MNAME_1 = 'MONTHNAME-SINGLE';\nexport const T_TYPE_MNAME_S = 'MONTHNAME-SHORT';\nexport const T_TYPE_MNAME = 'MONTHNAME';\nexport const T_TYPE_WEEKDAY_S = 'WEEKDAY-SHORT';\nexport const T_TYPE_WEEKDAY = 'WEEKDAY';\nexport const T_TYPE_DAY = 'DAY';\nexport const T_TYPE_HOUR = 'HOUR';\nexport const T_TYPE_MIN = 'MIN';\nexport const T_TYPE_SEC = 'SEC';\nexport const T_TYPE_SUBSEC = 'SUBSEC';\nexport const T_TYPE_HOUR_E = 'HOUR-ELAP';\nexport const T_TYPE_MIN_E = 'MIN-ELAP';\nexport const T_TYPE_SEC_E = 'SEC-ELAP';\nexport const T_TYPE_B_YEAR = 'B-YEAR';\nexport const T_TYPE_B_YEAR_S = 'B-YEAR-SHORT';\n\nexport const indexColors = [\n '#000000',\n '#FFFFFF',\n '#FF0000',\n '#00FF00',\n '#0000FF',\n '#FFFF00',\n '#FF00FF',\n '#00FFFF',\n '#800000',\n '#008000',\n '#000080',\n '#808000',\n '#800080',\n '#008080',\n '#C0C0C0',\n '#808080',\n '#9999FF',\n '#993366',\n '#FFFFCC',\n '#CCFFFF',\n '#660066',\n '#FF8080',\n '#0066CC',\n '#CCCCFF',\n '#000080',\n '#FF00FF',\n '#FFFF00',\n '#00FFFF',\n '#800080',\n '#800000',\n '#008080',\n '#0000FF',\n '#00CCFF',\n '#CCFFFF',\n '#CCFFCC',\n '#FFFF99',\n '#99CCFF',\n '#FF99CC',\n '#CC99FF',\n '#FFCC99',\n '#3366FF',\n '#33CCCC',\n '#99CC00',\n '#FFCC00',\n '#FF9900',\n '#FF6600',\n '#666699',\n '#969696',\n '#003366',\n '#339966',\n '#003300',\n '#333300',\n '#993300',\n '#993366',\n '#333399',\n '#333333'\n];\n\nexport const currencySymbols = [\n '¤',\n '$',\n '£',\n '¥',\n '֏',\n '؋',\n '৳',\n '฿',\n '៛',\n '₡',\n '₦',\n '₩',\n '₪',\n '₫',\n '€',\n '₭',\n '₮',\n '₱',\n '₲',\n '₴',\n '₸',\n '₹',\n '₺',\n '₼',\n '₽',\n '₾',\n '₿'\n];\n\nexport const reCurrencySymbols = new RegExp('[' + currencySymbols.join('') + ']');\n","/* eslint-disable @stylistic/indent */\n// https://docs.microsoft.com/en-us/office/vba/api/office.msolanguageid\nexport const codeToLocale: Readonly> = Object.freeze({\n 1078: 'af', // Afrikaans\n 1052: 'sq', // Albanian\n 1118: 'am', // Amharic\n 5121: 'ar_DZ', // Arabic - Algeria\n 15361: 'ar_BH', // Arabic - Bahrain\n 3073: 'ar_EG', // Arabic - Egypt\n 2049: 'ar_IQ', // Arabic - Iraq\n 11265: 'ar_JO', // Arabic - Jordan\n 13313: 'ar_KW', // Arabic - Kuwait\n 12289: 'ar_LB', // Arabic - Lebanon\n 4097: 'ar_LY', // Arabic - Libya\n 6145: 'ar_MA', // Arabic - Morocco\n 8193: 'ar_OM', // Arabic - Oman\n 16385: 'ar_QA', // Arabic - Qatar\n 1025: 'ar_SA', // Arabic - Saudi Arabia\n 10241: 'ar_SY', // Arabic - Syria\n 7169: 'ar_TN', // Arabic - Tunisia\n 14337: 'ar_AE', // Arabic - United Arab Emirates\n 9217: 'ar_YE', // Arabic - Yemen\n 1067: 'hy', // Armenian\n 1101: 'as', // Assamese\n 2092: 'az_AZ', // Azeri - Cyrillic\n 1068: 'az_AZ', // Azeri - Latin\n 1069: 'eu', // Basque\n 1059: 'be', // Belarusian\n 2117: 'bn', // Bengali - Bangladesh\n 1093: 'bn_IN', // Bengali - India\n 5146: 'bs', // Bosnian\n 1026: 'bg', // Bulgarian\n 1109: 'my', // Burmese\n 1027: 'ca', // Catalan\n 2052: 'zh_CN', // Chinese - China\n 3076: 'zh_HK', // Chinese - Hong Kong SAR\n 5124: 'zh_MO', // Chinese - Macau SAR\n 4100: 'zh_SG', // Chinese - Singapore\n 1028: 'zh_TW', // Chinese - Taiwan\n 1050: 'hr', // Croatian\n 1029: 'cs', // Czech\n 1030: 'da', // Danish\n 1125: 'dv', // Divehi; Dhivehi; Maldivian\n 2067: 'nl_BE', // Dutch - Belgium\n 1043: 'nl_NL', // Dutch - Netherlands\n 1126: 'bin', // Edo\n 3081: 'en_AU', // English - Australia\n 10249: 'en_BZ', // English - Belize\n 4105: 'en_CA', // English - Canada\n 9225: 'en_CB', // English - Caribbean\n 2057: 'en_GB', // English - Great Britain\n 16393: 'en_IN', // English - India\n 6153: 'en_IE', // English - Ireland\n 8201: 'en_JM', // English - Jamaica\n 5129: 'en_NZ', // English - New Zealand\n 13321: 'en_PH', // English - Phillippines\n 7177: 'en_ZA', // English - Southern Africa\n 11273: 'en_TT', // English - Trinidad\n 1033: 'en_US', // English - United States\n 12297: 'en_ZW', // English - Zimbabwe\n 1061: 'et', // Estonian\n 1071: 'mk', // FYRO Macedonia\n 1080: 'fo', // Faroese\n 1065: 'fa', // Farsi - Persian\n 1124: 'fil', // Filipino\n 1035: 'fi', // Finnish\n 2060: 'fr_BE', // French - Belgium\n 11276: 'fr_CM', // French - Cameroon\n 3084: 'fr_CA', // French - Canada\n 9228: 'fr_CG', // French - Congo\n 12300: 'fr_CI', // French - Cote d'Ivoire\n 1036: 'fr_FR', // French - France\n 5132: 'fr_LU', // French - Luxembourg\n 13324: 'fr_ML', // French - Mali\n 6156: 'fr_MC', // French - Monaco\n 14348: 'fr_MA', // French - Morocco\n 10252: 'fr_SN', // French - Senegal\n 4108: 'fr_CH', // French - Switzerland\n 7180: 'fr', // French - West Indies\n 1122: 'fy_NL', // Frisian - Netherlands\n 2108: 'gd_IE', // Gaelic - Ireland\n 1084: 'gd', // Gaelic - Scotland\n 1110: 'gl', // Galician\n 1079: 'ka', // Georgian\n 3079: 'de_AT', // German - Austria\n 1031: 'de_DE', // German - Germany\n 5127: 'de_LI', // German - Liechtenstein\n 4103: 'de_LU', // German - Luxembourg\n 2055: 'de_CH', // German - Switzerland\n 1032: 'el', // Greek\n 1140: 'gn', // Guarani - Paraguay\n 1095: 'gu', // Gujarati\n 1279: 'en', // HID (Human Interface Device)\n 1037: 'he', // Hebrew\n 1081: 'hi', // Hindi\n 1038: 'hu', // Hungarian\n 1039: 'is', // Icelandic\n 1136: 'ig_NG', // Igbo - Nigeria\n 1057: 'id', // Indonesian\n 1040: 'it_IT', // Italian - Italy\n 2064: 'it_CH', // Italian - Switzerland\n 1041: 'ja', // Japanese\n 1099: 'kn', // Kannada\n 1120: 'ks', // Kashmiri\n 1087: 'kk', // Kazakh\n 1107: 'km', // Khmer\n 1111: 'kok', // Konkani\n 1042: 'ko', // Korean\n 1088: 'ky', // Kyrgyz - Cyrillic\n 1108: 'lo', // Lao\n 1142: 'la', // Latin\n 1062: 'lv', // Latvian\n 1063: 'lt', // Lithuanian\n 2110: 'ms_BN', // Malay - Brunei\n 1086: 'ms_MY', // Malay - Malaysia\n 1100: 'ml', // Malayalam\n 1082: 'mt', // Maltese\n 1112: 'mni', // Manipuri\n 1153: 'mi', // Maori\n 1102: 'mr', // Marathi\n 1104: 'mn', // Mongolian\n 2128: 'mn', // Mongolian\n 1121: 'ne', // Nepali\n 1044: 'no_NO', // Norwegian - Bokml\n 2068: 'no_NO', // Norwegian - Nynorsk\n 1096: 'or', // Oriya\n 1045: 'pl', // Polish\n 1046: 'pt_BR', // Portuguese - Brazil\n 2070: 'pt_PT', // Portuguese - Portugal\n 1094: 'pa', // Punjabi\n 1047: 'rm', // Raeto-Romance\n 2072: 'ro_MO', // Romanian - Moldova\n 1048: 'ro_RO', // Romanian - Romania\n 1049: 'ru', // Russian\n 2073: 'ru_MO', // Russian - Moldova\n 1083: 'se', // Sami Lappish\n 1103: 'sa', // Sanskrit\n 3098: 'sr_SP', // Serbian - Cyrillic\n 2074: 'sr_SP', // Serbian - Latin\n 1072: 'st', // Sesotho (Sutu)\n 1074: 'tn', // Setsuana\n 1113: 'sd', // Sindhi\n 1115: 'si', // Sinhala; Sinhalese\n 1051: 'sk', // Slovak\n 1060: 'sl', // Slovenian\n 1143: 'so', // Somali\n 1070: 'sb', // Sorbian\n 11274: 'es_AR', // Spanish - Argentina\n 16394: 'es_BO', // Spanish - Bolivia\n 13322: 'es_CL', // Spanish - Chile\n 9226: 'es_CO', // Spanish - Colombia\n 5130: 'es_CR', // Spanish - Costa Rica\n 7178: 'es_DO', // Spanish - Dominican Republic\n 12298: 'es_EC', // Spanish - Ecuador\n 17418: 'es_SV', // Spanish - El Salvador\n 4106: 'es_GT', // Spanish - Guatemala\n 18442: 'es_HN', // Spanish - Honduras\n 2058: 'es_MX', // Spanish - Mexico\n 19466: 'es_NI', // Spanish - Nicaragua\n 6154: 'es_PA', // Spanish - Panama\n 15370: 'es_PY', // Spanish - Paraguay\n 10250: 'es_PE', // Spanish - Peru\n 20490: 'es_PR', // Spanish - Puerto Rico\n 1034: 'es_ES', // Spanish - Spain (Traditional)\n 14346: 'es_UY', // Spanish - Uruguay\n 8202: 'es_VE', // Spanish - Venezuela\n 1089: 'sw', // Swahili\n 2077: 'sv_FI', // Swedish - Finland\n 1053: 'sv_SE', // Swedish - Sweden\n 1114: 'syc', // Syriac\n 1064: 'tg', // Tajik\n 1097: 'ta', // Tamil\n 1092: 'tt', // Tatar\n 1098: 'te', // Telugu\n 1054: 'th', // Thai\n 1105: 'bo', // Tibetan\n 1073: 'ts', // Tsonga\n 1055: 'tr', // Turkish\n 1090: 'tk', // Turkmen\n 1058: 'uk', // Ukrainian\n 1056: 'ur', // Urdu\n 2115: 'uz_UZ', // Uzbek - Cyrillic\n 1091: 'uz_UZ', // Uzbek - Latin\n 1075: 've', // Venda\n 1066: 'vi', // Vietnamese\n 1106: 'cy', // Welsh\n 1076: 'xh', // Xhosa\n 1085: 'yi', // Yiddish\n 1077: 'zu' // Zulu\n});\n","import { codeToLocale } from './codeToLocale.ts';\n\n// Locale: [language[_territory][.codeset][@modifier]]\nconst re_locale = /^([a-z\\d]+)(?:[_-]([a-z\\d]+))?(?:\\.([a-z\\d]+))?(?:@([a-z\\d]+))?$/i;\nconst locales: Record = {};\n\n/**\n * An object of properties used by a formatter when printing a number in a certain locale.\n */\nexport type LocaleData = {\n /** Symbol used as a grouping separator (`1,000,000` uses `,`) */\n group: string;\n /** Symbol used to separate integers from fractions (usually `.`) */\n decimal: string;\n /** Symbol used to indicate positive numbers (usually `+`) */\n positive: string;\n /** Symbol used to indicate positive numbers (usually `-`) */\n negative: string;\n /** Symbol used to indicate a percentage (usually `%`) */\n percent: string;\n /** Symbol used to indicate an exponent (usually `E`) */\n exponent: string;\n /** Symbol used to indicate NaN values (`NaN`) */\n nan: string;\n /** Symbol used to indicate infinite values (`∞`) */\n infinity: string;\n /** How AM and PM should be presented */\n ampm: string[];\n /** Long month names for the Islamic calendar (`Rajab`) */\n mmmm6: string[];\n /** Short month names for the Islamic calendar (`Raj.`) */\n mmm6: string[];\n /** Long month names for the Gregorian calendar (`November`) */\n mmmm: string[];\n /** Short month names for the Gregorian calendar (`Nov`) */\n mmm: string[];\n /** Long day names (`Wednesday`) */\n dddd: string[];\n /** Shortened day names (`Wed`) */\n ddd: string[];\n /** How TRUE and FALSE should be presented */\n bool: string[];\n /** Is the prefered date format month first (12/31/2025) or day first (31/12/2025) */\n preferMDY: boolean;\n};\n\n/**\n * An object of properties for a locale tag.\n *\n * ```js\n * { lang: 'zh-CN', language: 'zh', territory: 'CN' }\n * ```\n */\nexport type LocaleToken = {\n /** The basic tag such as `zh-CN` or `fi` */\n lang: string;\n /** The language section (`zh` for `zh-CN`) */\n language: string;\n /** The territory section (`CN` for `zh-CN`) */\n territory: string;\n};\n\n/**\n * Split a semicolon delimited string and replace instances of characters\n * @internal\n * @param str Semicolon delimited string\n * @param [tilde] String to be inserted on every instance of ~\n * @returns Array of strings\n */\nconst _ = (str: string, tilde = ''): string[] => str.replace(/~/g, tilde).split(';');\n\n/**\n * Generate mmm and ddd properties as needed for locales. Many of them\n * are straightforward abreviations of mmmm and dddd so we can save some\n * bytes by auto-generating them.\n *\n * Both rule parameters use the same system. If shortform prop is missing:\n *\n * - 0 - use long form array unchanged\n * - 1...9 - shorten to N many characters\n * - 11...19 - shorten to 1...9 characters and add periods\n *\n * @internal\n * @param o Locale object\n * @param [ml] Month list rule\n * @param [dl] Day list rule\n * @returns The same input object, but with ddd and mmm filled in.\n */\nconst xm = (o: Partial & Pick, ml: number = 0, dl: number = 0): Partial => {\n if (!o.mmm) {\n o.mmm = ml < 1\n ? o.mmmm.concat()\n : o.mmmm.map(d => {\n const s = d.slice(0, ml % 10);\n return s + (ml < 10 || d === s ? '' : '.');\n });\n }\n if (!o.ddd) {\n o.ddd = dl < 1\n ? o.dddd.concat()\n : o.dddd.map(d => {\n const s = d.slice(0, dl % 10);\n return s + (dl < 10 || d === s ? '' : '.');\n });\n }\n if (!o.mmm6 && o.mmmm6) {\n o.mmm6 = o.mmmm6;\n }\n return o;\n};\n\n/** @ignore */\nconst baseLocaleData: LocaleData = {\n group: '\\u00A0',\n decimal: '.',\n positive: '+',\n negative: '-',\n percent: '%',\n exponent: 'E',\n nan: 'NaN',\n infinity: '∞',\n ampm: _('AM;PM'),\n mmmm6: _('Muharram;Safar;Rabiʻ I;Rabiʻ II;Jumada I;Jumada II;Rajab;Shaʻban;Ramadan;Shawwal;Dhuʻl-Qiʻdah;Dhuʻl-Hijjah'),\n mmm6: _('Muh.;Saf.;Rab. I;Rab. II;Jum. I;Jum. II;Raj.;Sha.;Ram.;Shaw.;Dhuʻl-Q.;Dhuʻl-H.'),\n mmmm: _('January;February;March;April;May;June;July;August;September;October;November;December'),\n mmm: _('Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec'),\n dddd: _('Sunday;Monday;Tuesday;Wednesday;Thursday;Friday;Saturday'),\n ddd: _('Sun;Mon;Tue;Wed;Thu;Fri;Sat'),\n bool: _('TRUE;FALSE'),\n preferMDY: false\n};\n\n/**\n * Parse a regular IETF BCP 47 locale tag (`en-US`) and emit an object of its parts.\n * Irregular tags and subtags are not supported.\n *\n * @param locale A BCP 47 string tag of the locale.\n * @returns An object describing the locale.\n */\nexport function parseLocale (locale: string): LocaleToken {\n const lm = re_locale.exec(locale);\n if (!lm) {\n throw new SyntaxError(`Malformed locale: ${locale}`);\n }\n return {\n lang: lm[1] + (lm[2] ? '-' + lm[2] : ''),\n language: lm[1],\n territory: lm[2] || ''\n };\n}\n\n// MS code format is: aabbcccc [$-aabbcccc]\n// aa = numerical style (optional, 00 if absent)\n// bb = calendar format (optional, 00 if absent)\n// cc = language code\nexport function resolveLocale (l4e: number | string): string | undefined {\n if (typeof l4e === 'number') {\n return codeToLocale[l4e & 0xffff] || undefined;\n }\n const wincode = parseInt(l4e, 16);\n if (isFinite(wincode) && codeToLocale[wincode & 0xffff]) {\n return codeToLocale[wincode & 0xffff] || undefined;\n }\n if (re_locale.test(l4e)) {\n return l4e;\n }\n return undefined;\n}\n\n/**\n * Used by the formatter to pull a locate from its registered locales. If\n * subtag isn't available but the base language is, the base language is used:\n * So if `en-CA` is not found, the formatter tries to find `en` else it\n * returns `undefined`.\n *\n * @param locale A BCP 47 string tag of the locale, or an Excel locale code.\n * @returns An object of format date properties if one was found.\n */\nexport function getLocale (locale: string | number): LocaleData | undefined {\n const tag = resolveLocale(locale);\n let obj;\n if (tag) {\n const c = parseLocale(tag);\n obj = locales[c.lang] || locales[c.language] || undefined;\n }\n return obj;\n}\n\n// creates a new locale options object\nexport function createLocale (data: Partial): LocaleData {\n return Object.assign({}, baseLocaleData, data);\n}\n\n/**\n * Register locale data for a language to use when formatting.\n *\n * Any partial set of properties may be returned to have the defaults used where properties are missing.\n *\n * @param localeSettings - A collection of settings for a locale.\n * @param [localeSettings.group=\"\\u00a0\"]\n * Symbol used as a grouping separator (`1,000,000` uses `,`)\n * @param [localeSettings.decimal=\".\"]\n * Symbol used to separate integers from fractions (usually `.`)\n * @param [localeSettings.positive=\"+\"]\n * Symbol used to indicate positive numbers (usually `+`)\n * @param [localeSettings.negative=\"-\"]\n * Symbol used to indicate positive numbers (usually `-`)\n * @param [localeSettings.percent=\"%\"]\n * Symbol used to indicate a percentage (usually `%`)\n * @param [localeSettings.exponent=\"E\"]\n * Symbol used to indicate an exponent (usually `E`)\n * @param [localeSettings.nan=\"NaN\"]\n * Symbol used to indicate NaN values (`NaN`)\n * @param [localeSettings.infinity=\"∞\"]\n * Symbol used to indicate infinite values (`∞`)\n * @param [localeSettings.ampm=[\"AM\",\"PM\"]]\n * How AM and PM should be presented.\n * @param [localeSettings.mmmm6=[\"Muharram\", \"Safar\", \"Rabiʻ I\", \"Rabiʻ II\", \"Jumada I\", \"Jumada II\", \"Rajab\", \"Shaʻban\", \"Ramadan\", \"Shawwal\", \"Dhuʻl-Qiʻdah\", \"Dhuʻl-Hijjah\"]]\n * Long month names for the Islamic calendar (e.g. `Rajab`)\n * @param [localeSettings.mmm6=[\"Muh.\", \"Saf.\", \"Rab. I\", \"Rab. II\", \"Jum. I\", \"Jum. II\", \"Raj.\", \"Sha.\", \"Ram.\", \"Shaw.\", \"Dhuʻl-Q.\", \"Dhuʻl-H.\"]]\n * Short month names for the Islamic calendar (e.g. `Raj.`)\n * @param [localeSettings.mmmm=[\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"]]\n * Long month names for the Gregorian calendar (e.g. `November`)\n * @param [localeSettings.mmm=[\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"]]\n * Short month names for the Gregorian calendar (e.g. `Nov`)\n * @param [localeSettings.dddd=[\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"]]\n * Long day names (e.g. `Wednesday`)\n * @param [localeSettings.ddd=[\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"]]\n * Shortened day names (e.g. `Wed`)\n * @param [localeSettings.bool=[\"TRUE\", \"FALSE\"]]\n * How TRUE and FALSE should be presented.\n * @param {boolean} [localeSettings.preferMDY=false]\n * Is the prefered date format month first (12/31/2025) or day first (31/12/2025)\n * @param l4e - A string BCP 47 tag of the locale.\n * @returns A full collection of settings for a locale\n */\nexport function addLocale (localeSettings: Partial, l4e: string): LocaleData {\n // parse language tag\n const c = typeof l4e === 'object' ? l4e : parseLocale(l4e);\n // add the language\n locales[c.lang] = createLocale(localeSettings);\n // if \"xx_YY\" is added also create \"xx\" if it is missing\n if (c.language !== c.lang && !locales[c.language]) {\n locales[c.language] = createLocale(localeSettings);\n }\n return locales[c.lang];\n}\n\nexport function listLocales () {\n return Object.keys(locales);\n}\n\nexport const defaultLocale: LocaleData & { isDefault?: boolean } = createLocale({ group: ',', preferMDY: true });\ndefaultLocale.isDefault = true;\n\naddLocale({\n group: ',',\n ampm: _('上午;下午'),\n mmmm: _('一月;二月;三月;四月;五月;六月;七月;八月;九月;十月;十一月;十二月'),\n mmm: _('1月;2月;3月;4月;5月;6月;7月;8月;9月;10月;11月;12月'),\n dddd: _('~日;~一;~二;~三;~四;~五;~六', '星期'),\n ddd: _('周日;周一;周二;周三;周四;周五;周六')\n}, 'zh-CN');\nconst _zh = {\n group: ',',\n ampm: _('上午;下午'),\n mmmm: _('1月;2月;3月;4月;5月;6月;7月;8月;9月;10月;11月;12月'),\n mmm: _('1月;2月;3月;4月;5月;6月;7月;8月;9月;10月;11月;12月'),\n dddd: _('~日;~一;~二;~三;~四;~五;~六', '星期'),\n ddd: _('周日;周一;周二;周三;周四;周五;周六')\n};\naddLocale({\n ..._zh,\n nan: '非數值',\n dddd: _('~日;~一;~二;~三;~四;~五;~六', '星期')\n}, 'zh-TW');\naddLocale({\n ..._zh,\n dddd: _('~日;~一;~二;~三;~四;~五;~六', '星期')\n}, 'zh-HK');\n\naddLocale({\n ..._zh,\n ampm: _('午前;午後'),\n dddd: _('日~;月~;火~;水~;木~;金~;土~', '曜日'),\n ddd: _('日;月;火;水;木;金;土')\n}, 'ja');\n\naddLocale({\n group: ',',\n ampm: _('오전;오후'),\n mmmm: _('1월;2월;3월;4월;5월;6월;7월;8월;9월;10월;11월;12월'),\n mmm: _('1월;2월;3월;4월;5월;6월;7월;8월;9월;10월;11월;12월'),\n dddd: _('일요일;월요일;화요일;수요일;목요일;금요일;토요일'),\n ddd: _('일;월;화;수;목;금;토')\n}, 'ko');\n\naddLocale({\n group: ',',\n ampm: _('ก่อนเที่ยง;หลังเที่ยง'),\n mmmm: _('มกร~;กุมภาพันธ์;มีน~;เมษายน;พฤษภ~;มิถุนายน;กรกฎ~;สิงห~;กันยายน;ตุล~;พฤศจิกายน;ธันว~', 'าคม'),\n mmm: _('ม.ค.;ก.พ.;มี.ค.;เม.ย.;พ.ค.;มิ.ย.;ก.ค.;ส.ค.;ก.ย.;ต.ค.;พ.ย.;ธ.ค.'),\n dddd: _('วันอาทิตย์;วันจันทร์;วันอังคาร;วันพุธ;วันพฤหัสบดี;วันศุกร์;วันเสาร์'),\n ddd: _('อา.;จ.;อ.;พ.;พฤ.;ศ.;ส.')\n}, 'th');\n\naddLocale(xm({\n decimal: ',',\n ampm: _('dop.;odp.'),\n mmmm: _('ledna;února;března;dubna;května;června;července;srpna;září;října;listopadu;prosince'),\n mmm: _('I;II;III;IV;V;VI;VII;VIII;IX;X;XI;XII'),\n dddd: _('neděle;pondělí;úterý;středa;čtvrtek;pátek;sobota'),\n bool: _('PRAVDA;NEPRAVDA')\n}, -1, 2), 'cs');\n\naddLocale(xm({\n group: '.',\n decimal: ',',\n mmmm: _('januar;februar;marts;april;maj;juni;juli;august;september;oktober;november;december'),\n dddd: _('søn~;man~;tirs~;ons~;tors~;fre~;lør~', 'dag'),\n bool: _('SAND;FALSK')\n}, 13, 13), 'da');\n\naddLocale(xm({\n group: '.',\n decimal: ',',\n ampm: _('a.m.;p.m.'),\n mmmm: _('januari;februari;maart;april;mei;juni;juli;augustus;september;oktober;november;december'),\n mmm: _('jan.;feb.;mrt.;apr.;mei;jun.;jul.;aug.;sep.;okt.;nov.;dec.'),\n dddd: _('zondag;maandag;dinsdag;woensdag;donderdag;vrijdag;zaterdag'),\n bool: _('WAAR;ONWAAR')\n}, -1, 2), 'nl');\n\naddLocale({ group: ',', preferMDY: true }, 'en');\naddLocale({ group: ',', preferMDY: true }, 'en-US');\naddLocale({ group: ',' }, 'en-AU');\naddLocale({ group: ',' }, 'en-CA');\naddLocale({ group: ',' }, 'en-GB');\naddLocale({ group: ',', mmm: _('Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sept;Oct;Nov;Dec') }, 'en-IE');\n\naddLocale(xm({\n decimal: ',',\n nan: 'epäluku',\n ampm: _('ap.;ip.'),\n mmmm: _('tammi~;helmi~;maalis~;huhti~;touko~;kesä~;heinä~;elo~;syys~;loka~;marras~;joulu~', 'kuuta'),\n mmm: _('tammik.;helmik.;maalisk.;huhtik.;toukok.;kesäk.;heinäk.;elok.;syysk.;lokak.;marrask.;jouluk.'),\n dddd: _('sunnun~;maanan~;tiis~;keskiviikkona;tors~;perjan~;lauan~', 'taina'),\n bool: _('TOSI;EPÄTOSI')\n}, -1, 2), 'fi');\n\nconst _fr = xm({\n group: '\\u202f',\n decimal: ',',\n mmmm: _('janvier;février;mars;avril;mai;juin;juillet;août;septembre;octobre;novembre;décembre'),\n mmm: _('janv.;févr.;mars;avr.;mai;juin;juil.;août;sept.;oct.;nov.;déc.'),\n dddd: _('~manche;lun~;mar~;mercre~;jeu~;vendre~;same~', 'di'),\n bool: _('VRAI;FAUX')\n}, -1, 13);\naddLocale({ ..._fr }, 'fr');\naddLocale({ ..._fr, mmm: _('janv.;févr.;mars;avr.;mai;juin;juill.;août;sept.;oct.;nov.;déc.') }, 'fr-CA');\naddLocale({ group: \"'\", decimal: '.', ..._fr }, 'fr-CH');\n\nconst _de = xm({\n mmmm: _('Januar;Februar;März;April;Mai;Juni;Juli;August;September;Oktober;November;Dezember'),\n mmm: _('Jan.;Feb.;März;Apr.;Mai;Juni;Juli;Aug.;Sept.;Okt.;Nov.;Dez.'),\n dddd: _('Sonn~;Mon~;Diens~;Mittwoch;Donners~;Frei~;Sams~', 'tag'),\n bool: _('WAHR;FALSCH')\n}, -1, 12);\naddLocale({ group: '.', decimal: ',', ..._de }, 'de');\naddLocale({ group: \"'\", decimal: '.', ..._de }, 'de-CH');\n\naddLocale(xm({\n group: '.',\n decimal: ',',\n ampm: _('π.μ.;μ.μ.'),\n mmmm: _('Ιανουαρ~;Φεβρουαρ~;Μαρτ~;Απριλ~;Μαΐου;Ιουν~;Ιουλ~;Αυγούστου;Σεπτεμβρ~;Οκτωβρ~;Νοεμβρ~;Δεκεμβρ~', 'ίου'),\n mmm: _('Ιαν;Φεβ;Μαρ;Απρ;Μαΐ;Ιουν;Ιουλ;Αυγ;Σεπ;Οκτ;Νοε;Δεκ'),\n dddd: _('Κυριακή;Δευτέρα;Τρίτη;Τετάρτη;Πέμπτη;Παρασκευή;Σάββατο')\n}, -1, 3), 'el');\n\naddLocale({\n decimal: ',',\n ampm: _('de.;du.'),\n mmmm: _('január;február;március;április;május;június;július;augusztus;szeptember;október;november;december'),\n mmm: _('jan.;febr.;márc.;ápr.;máj.;jún.;júl.;aug.;szept.;okt.;nov.;dec.'),\n dddd: _('vasárnap;hétfő;kedd;szerda;csütörtök;péntek;szombat'),\n ddd: _('V;H;K;Sze;Cs;P;Szo'),\n bool: _('IGAZ;HAMIS')\n}, 'hu');\n\naddLocale(xm({\n group: '.',\n decimal: ',',\n ampm: _('f.h.;e.h.'),\n mmmm: _('janúar;febrúar;mars;apríl;maí;júní;júlí;ágúst;september;október;nóvember;desember'),\n dddd: _('sunnu~;mánu~;þriðju~;miðviku~;fimmtu~;föstu~;laugar~', 'dagur')\n}, 13, 13), 'is');\n\naddLocale(xm({\n group: '.',\n decimal: ',',\n mmmm: _('Januari;Februari;Maret;April;Mei;Juni;Juli;Agustus;September;Oktober;November;Desember'),\n dddd: _('Minggu;Senin;Selasa;Rabu;Kamis;Jumat;Sabtu')\n}, 3, 3), 'id');\n\nconst _it = xm({\n mmmm: _('gennaio;febbraio;marzo;aprile;maggio;giugno;luglio;agosto;settembre;ottobre;novembre;dicembre'),\n dddd: _('domenica;lunedì;martedì;mercoledì;giovedì;venerdì;sabato'),\n bool: _('VERO;FALSO')\n}, 3, 3);\naddLocale({ group: '.', decimal: ',', ..._it }, 'it');\naddLocale({ group: \"'\", decimal: '.', ..._it }, 'it-CH');\n\nconst _no = {\n decimal: ',',\n ampm: _('a.m.;p.m.'),\n mmmm: _('januar;februar;mars;april;mai;juni;juli;august;september;oktober;november;desember'),\n mmm: _('jan.;feb.;mar.;apr.;mai;jun.;jul.;aug.;sep.;okt.;nov.;des.'),\n dddd: _('søn~;man~;tirs~;ons~;tors~;fre~;lør~', 'dag'),\n bool: _('SANN;USANN')\n};\naddLocale(xm({ ..._no }, -1, 13), 'nb');\naddLocale(xm({ ..._no }, -1, 13), 'no');\n\naddLocale(xm({\n decimal: ',',\n mmmm: _('stycznia;lutego;marca;kwietnia;maja;czerwca;lipca;sierpnia;września;października;listopada;grudnia'),\n dddd: _('niedziela;poniedziałek;wtorek;środa;czwartek;piątek;sobota'),\n ddd: _('niedz.;pon.;wt.;śr.;czw.;pt.;sob.'),\n bool: _('PRAWDA;FAŁSZ')\n}, 3, -1), 'pl');\n\nconst _pt = {\n group: '.',\n decimal: ',',\n mmmm: _('janeiro;fevereiro;março;abril;maio;junho;julho;agosto;setembro;outubro;novembro;dezembro'),\n dddd: _('domingo;segunda-feira;terça-feira;quarta-feira;quinta-feira;sexta-feira;sábado'),\n bool: _('VERDADEIRO;FALSO')\n};\naddLocale(xm(_pt, 13, 13), 'pt');\naddLocale(xm(_pt, 13, 13), 'pt-BR');\n\naddLocale({\n decimal: ',',\n nan: 'не\\u00A0число',\n mmmm: _('января;февраля;марта;апреля;мая;июня;июля;августа;сентября;октября;ноября;декабря'),\n mmm: _('янв.;февр.;мар.;апр.;мая;июн.;июл.;авг.;сент.;окт.;нояб.;дек.'),\n dddd: _('воскресенье;понедельник;вторник;среда;четверг;пятница;суббота'),\n ddd: _('вс;пн;вт;ср;чт;пт;сб'),\n mmmm6: _('рамадан;шавваль;зуль-каада;зуль-хиджжа;мухаррам;раби-уль-авваль;раби-уль-ахир;джумад-уль-авваль;джумад-уль-ахир;раджаб;шаабан;рамадан'),\n mmm6: _('рам.;шав.;зуль-к.;зуль-х.;мух.;раб. I;раб. II;джум. I;джум. II;радж.;шааб.;рам.'),\n bool: _('ИСТИНА;ЛОЖЬ')\n}, 'ru');\n\naddLocale(xm({\n decimal: ',',\n mmmm: _('januára;februára;marca;apríla;mája;júna;júla;augusta;septembra;októbra;novembra;decembra'),\n dddd: _('nedeľa;pondelok;utorok;streda;štvrtok;piatok;sobota')\n}, 3, 2), 'sk');\n\nconst _es = {\n group: '.',\n decimal: ',',\n ampm: _('a.\\u00A0m.;p.\\u00A0m.'),\n mmmm: _('enero;febrero;marzo;abril;mayo;junio;julio;agosto;septiem~;octu~;noviem~;diciem~', 'bre'),\n mmm: _('ene;feb;mar;abr;may;jun;jul;ago;sept;oct;nov;dic'),\n dddd: _('domingo;lunes;martes;miércoles;jueves;viernes;sábado'),\n ddd: _('dom;lun;mar;mié;jue;vie;sáb'),\n bool: _('VERDADERO;FALSO')\n};\nconst _esM3 = _('ene;feb;mar;abr;may;jun;jul;ago;sep;oct;nov;dic');\nconst _esM13 = _('ene.;feb.;mar.;abr.;may.;jun.;jul.;ago.;sept.;oct.;nov.;dic.');\naddLocale({ ..._es }, 'es');\naddLocale({ ..._es }, 'es-AR');\naddLocale({ ..._es }, 'es-BO');\naddLocale({ ..._es }, 'es-CL');\naddLocale({ ..._es }, 'es-CO');\naddLocale({ ..._es }, 'es-EC');\naddLocale({ ..._es, mmm: _esM3, ampm: _('a.m.;p.m.') }, 'es-MX');\naddLocale({ ..._es, mmm: _esM13 }, 'es-PY');\naddLocale({ ..._es, mmm: _esM13 }, 'es-UY');\naddLocale({ ..._es, mmm: _esM13, mmmm: _('enero;febrero;marzo;abril;mayo;junio;julio;agosto;setiembre;octubre;noviembre;diciembre') }, 'es-VE');\n\naddLocale({\n decimal: ',',\n ampm: _('fm;em'),\n mmmm: _('januari;februari;mars;april;maj;juni;juli;augusti;september;oktober;november;december'),\n mmm: _('jan.;feb.;mars;apr.;maj;juni;juli;aug.;sep.;okt.;nov.;dec.'),\n dddd: _('sön~;mån~;tis~;ons~;tors~;fre~;lör~', 'dag'),\n ddd: _('sön;mån;tis;ons;tors;fre;lör')\n}, 'sv');\n\naddLocale(xm({\n group: '.',\n decimal: ',',\n ampm: _('ÖÖ;ÖS'),\n mmmm: _('Ocak;Şubat;Mart;Nisan;Mayıs;Haziran;Temmuz;Ağustos;Eylül;Ekim;Kasım;Aralık'),\n mmm: _('Oca;Şub;Mar;Nis;May;Haz;Tem;Ağu;Eyl;Eki;Kas;Ara'),\n dddd: _('Pazar;Pazartesi;Salı;Çarşamba;Perşembe;Cuma;Cumartesi'),\n ddd: _('Paz;Pzt;Sal;Çar;Per;Cum;Cmt'),\n bool: _('DOĞRU;YANLIŞ')\n}, 3, -1), 'tr');\n\naddLocale({\n group: ',',\n ampm: _('yb;yh'),\n mmmm: _('Ionawr;Chwefror;Mawrth;Ebrill;Mai;Mehefin;Gorffennaf;Awst;Medi;Hydref;Tachwedd;Rhagfyr'),\n mmm: _('Ion;Chwef;Maw;Ebr;Mai;Meh;Gorff;Awst;Medi;Hyd;Tach;Rhag'),\n dddd: _('Dydd Sul;Dydd Llun;Dydd Mawrth;Dydd Mercher;Dydd Iau;Dydd Gwener;Dydd Sadwrn'),\n ddd: _('Sul;Llun;Maw;Mer;Iau;Gwen;Sad')\n}, 'cy');\n\naddLocale({\n group: '.',\n decimal: ',',\n mmmm: _('yanvar;fevral;mart;aprel;may;iyun;iyul;avqust;sentyabr;oktyabr;noyabr;dekabr'),\n mmm: _('yan;fev;mar;apr;may;iyn;iyl;avq;sen;okt;noy;dek'),\n dddd: _('bazar;bazar ertəsi;çərşənbə axşamı;çərşənbə;cümə axşamı;cümə;şənbə'),\n ddd: _('B.;B.e.;Ç.a.;Ç.;C.a.;C.;Ş.')\n}, 'az');\n\naddLocale(xm({\n decimal: ',',\n mmmm: _('студзеня;лютага;сакавіка;красавіка;мая;чэрвеня;ліпеня;жніўня;верасня;кастрычніка;лістапада;снежня'),\n dddd: _('нядзеля;панядзелак;аўторак;серада;чацвер;пятніца;субота'),\n ddd: _('нд;пн;аў;ср;чц;пт;сб')\n}, 3, -1), 'be');\n\naddLocale({\n decimal: ',',\n ampm: _('пр.об.;сл.об.'),\n mmmm: _('януари;февруари;март;април;май;юни;юли;август;септември;октомври;ноември;декември'),\n mmm: _('яну;фев;март;апр;май;юни;юли;авг;сеп;окт;ное;дек'),\n dddd: _('неделя;понеделник;вторник;сряда;четвъртък;петък;събота'),\n ddd: _('нд;пн;вт;ср;чт;пт;сб'),\n bool: _('ИСТИНА;ЛОЖЬ')\n}, 'bg');\n\naddLocale({\n group: '.',\n decimal: ',',\n mmmm: _('de gener;de febrer;de març;d’abril;de maig;de juny;de juliol;d’agost;de setembre;d’octubre;de novembre;de desembre'),\n mmm: _('de gen.;de febr.;de març;d’abr.;de maig;de juny;de jul.;d’ag.;de set.;d’oct.;de nov.;de des.'),\n dddd: _('diumenge;dilluns;dimarts;dimecres;dijous;divendres;dissabte'),\n ddd: _('dg.;dl.;dt.;dc.;dj.;dv.;ds.'),\n ampm: _('a.\\u00a0m.;p.\\u00a0m.')\n}, 'ca');\n\naddLocale(xm({\n group: ',',\n decimal: '.',\n mmmm: _('Enero;Pebrero;Marso;Abril;Mayo;Hunyo;Hulyo;Agosto;Setyembre;Oktubre;Nobyembre;Disyembre'),\n dddd: _('Linggo;Lunes;Martes;Miyerkules;Huwebes;Biyernes;Sabado')\n}, 3, 3), 'fil');\n\naddLocale({\n group: ',',\n decimal: '.',\n mmmm: _('જાન્યુઆરી;ફેબ્રુઆરી;માર્ચ;એપ્રિલ;મે;જૂન;જુલાઈ;ઑગસ્ટ;સપ્ટેમ્બર;ઑક્ટોબર;નવેમ્બર;ડિસેમ્બર'),\n mmm: _('જાન્યુ;ફેબ્રુ;માર્ચ;એપ્રિલ;મે;જૂન;જુલાઈ;ઑગસ્ટ;સપ્ટે;ઑક્ટો;નવે;ડિસે'),\n dddd: _('રવિ~;સોમ~;મંગળ~;બુધ~;ગુરુ~;શુક્ર~;શનિ~', 'વાર'),\n ddd: _('રવિ;સોમ;મંગળ;બુધ;ગુરુ;શુક્ર;શનિ')\n}, 'gu');\n\naddLocale({\n group: ',',\n decimal: '.',\n ampm: _('לפנה״צ;אחה״צ'),\n dddd: _('~ראשון;~שני;~שלישי;~רביעי;~חמישי;~שישי;~שבת', 'יום '),\n ddd: _('~א׳;~ב׳;~ג׳;~ד׳;~ה׳;~ו׳;שבת', 'יום '),\n mmmm: _('ינואר;פברואר;מרץ;אפריל;מאי;יוני;יולי;אוגוסט;ספטמבר;אוקטובר;נובמבר;דצמבר'),\n mmm: _('ינו׳;פבר׳;מרץ;אפר׳;מאי;יוני;יולי;אוג׳;ספט׳;אוק׳;נוב׳;דצמ׳'),\n mmmm6: _('רמדאן;שוואל;ד׳ו אל־קעדה;ד׳ו אל־חיג׳ה;מוחרם;רביע אל־אוול;רביע א־ת׳אני;ג׳ומאדא אל־אולא;ג׳ומאדא א־ת׳אניה;רג׳ב;שעבאן;רמדאן'),\n mmm6: _('רמדאן;שוואל;ד׳ו אל־קעדה;ד׳ו אל־חיג׳ה;מוחרם;רביע א׳;רביע ב׳;ג׳ומאדא א׳;ג׳ומאדא ב׳;רג׳ב;שעבאן;רמדאן')\n}, 'he');\n\naddLocale(xm({\n group: '.',\n decimal: ',',\n mmmm: _('siječnja;veljače;ožujka;travnja;svibnja;lipnja;srpnja;kolovoza;rujna;listopada;studenoga;prosinca'),\n mmm: _('sij;velj;ožu;tra;svi;lip;srp;kol;ruj;lis;stu;pro'),\n dddd: _('nedjelja;ponedjeljak;utorak;srijeda;četvrtak;petak;subota')\n}, -1, 3), 'hr');\n\naddLocale({\n decimal: ',',\n mmmm: _('հունվարի;փետրվարի;մարտի;ապրիլի;մայիսի;հունիսի;հուլիսի;օգոստոսի;սեպտեմբերի;հոկտեմբերի;նոյեմբերի;դեկտեմբերի'),\n mmm: _('հնվ;փտվ;մրտ;ապր;մյս;հնս;հլս;օգս;սեպ;հոկ;նոյ;դեկ'),\n dddd: _('կիրակի;երկուշաբթի;երեքշաբթի;չորեքշաբթի;հինգշաբթի;ուրբաթ;շաբաթ'),\n ddd: _('կիր;երկ;երք;չրք;հնգ;ուր;շբթ')\n}, 'hy');\n\naddLocale(xm({\n decimal: ',',\n mmmm: _('იანვარი;თებერვალი;მარტი;აპრილი;მაისი;ივნისი;ივლისი;აგვისტო;სექტემბერი;ოქტომბერი;ნოემბერი;დეკემბერი'),\n dddd: _('კვირა;ორშაბათი;სამშაბათი;ოთხშაბათი;ხუთშაბათი;პარასკევი;შაბათი')\n}, 3, 3), 'ka');\n\naddLocale(xm({\n decimal: ',',\n mmmm: _('қаңтар;ақпан;наурыз;сәуір;мамыр;маусым;шілде;тамыз;қыркүйек;қазан;қараша;желтоқсан'),\n dddd: _('жексенбі;дүйсенбі;сейсенбі;сәрсенбі;бейсенбі;жұма;сенбі'),\n ddd: _('жс;дс;сс;ср;бс;жм;сб')\n}, 13, -1), 'kk');\n\naddLocale({\n group: ',',\n mmmm: _('ಜನವರಿ;ಫೆಬ್ರವರಿ;ಮಾರ್ಚ್;ಏಪ್ರಿಲ್;ಮೇ;ಜೂನ್;ಜುಲೈ;ಆಗಸ್ಟ್;ಸೆಪ್ಟೆಂಬರ್;ಅಕ್ಟೋಬರ್;ನವೆಂಬರ್;ಡಿಸೆಂಬರ್'),\n mmm: _('ಜನವರಿ;ಫೆಬ್ರವರಿ;ಮಾರ್ಚ್;ಏಪ್ರಿ;ಮೇ;ಜೂನ್;ಜುಲೈ;ಆಗಸ್ಟ್;ಸೆಪ್ಟೆಂ;ಅಕ್ಟೋ;ನವೆಂ;ಡಿಸೆಂ'),\n dddd: _('ಭಾನು~;ಸೋಮ~;ಮಂಗಳ~;ಬುಧ~;ಗುರು~;ಶುಕ್ರ~;ಶನಿ~', 'ವಾರ'),\n ddd: _('ಭಾನು;ಸೋಮ;ಮಂಗಳ;ಬುಧ;ಗುರು;ಶುಕ್ರ;ಶನಿ'),\n ampm: _('ಪೂರ್ವಾಹ್ನ;ಅಪರಾಹ್ನ')\n}, 'kn');\n\naddLocale({\n decimal: ',',\n mmmm: _('sausio;vasario;kovo;balandžio;gegužės;birželio;liepos;rugpjūčio;rugsėjo;spalio;lapkričio;gruodžio'),\n mmm: _('saus.;vas.;kov.;bal.;geg.;birž.;liep.;rugp.;rugs.;spal.;lapkr.;gruod.'),\n dddd: _('sekmadienis;pirmadienis;antradienis;trečiadienis;ketvirtadienis;penktadienis;šeštadienis'),\n ddd: _('sk;pr;an;tr;kt;pn;št'),\n ampm: _('priešpiet;popiet')\n}, 'lt');\n\naddLocale({\n decimal: ',',\n mmmm: _('janvāris;februāris;marts;aprīlis;maijs;jūnijs;jūlijs;augusts;septembris;oktobris;novembris;decembris'),\n mmm: _('janv.;febr.;marts;apr.;maijs;jūn.;jūl.;aug.;sept.;okt.;nov.;dec.'),\n dddd: _('svētdiena;pirmdiena;otrdiena;trešdiena;ceturtdiena;piektdiena;sestdiena'),\n ddd: _('svētd.;pirmd.;otrd.;trešd.;ceturtd.;piektd.;sestd.'),\n ampm: _('priekšpusdienā;pēcpusdienā')\n}, 'lv');\n\naddLocale({\n group: ',',\n decimal: '.',\n mmmm: _('ജനുവരി;ഫെബ്രുവരി;മാർച്ച്;ഏപ്രിൽ;മേയ്;ജൂൺ;ജൂലൈ;ഓഗസ്റ്റ്;സെപ്റ്റംബർ;ഒക്‌ടോബർ;നവംബർ;ഡിസംബർ'),\n mmm: _('ജനു;ഫെബ്രു;മാർ;ഏപ്രി;മേയ്;ജൂൺ;ജൂലൈ;ഓഗ;സെപ്റ്റം;ഒക്ടോ;നവം;ഡിസം'),\n dddd: _('ഞായറാഴ്‌ച;തിങ്കളാഴ്‌ച;ചൊവ്വാഴ്ച;ബുധനാഴ്‌ച;വ്യാഴാഴ്‌ച;വെള്ളിയാഴ്‌ച;ശനിയാഴ്‌ച'),\n ddd: _('ഞായർ;തിങ്കൾ;ചൊവ്വ;ബുധൻ;വ്യാഴം;വെള്ളി;ശനി')\n}, 'ml');\n\naddLocale({\n group: ',',\n decimal: '.',\n mmmm: _('нэгдүгээ~;хоёрдугаа~;гуравдугаа~;дөрөвдүгээ~;тавдугаа~;зургаадугаа~;долоодугаа~;наймдугаа~;есдүгээ~;аравдугаа~;арван нэгдүгээ~;арван хоёрдугаа~', 'р сар'),\n mmm: _('1~;2~;3~;4~;5~;6~;7~;8~;9~;10~;11~;12~', '-р сар'),\n dddd: _('ням;даваа;мягмар;лхагва;пүрэв;баасан;бямба'),\n ddd: _('Ня;Да;Мя;Лх;Пү;Ба;Бя'),\n ampm: _('ү.ө.;ү.х.')\n}, 'mn');\n\naddLocale({\n group: ',',\n decimal: '.',\n mmmm: _('जानेवारी;फेब्रुवारी;मार्च;एप्रिल;मे;जून;जुलै;ऑगस्ट;सप्टेंबर;ऑक्टोबर;नोव्हेंबर;डिसेंबर'),\n mmm: _('जाने;फेब्रु;मार्च;एप्रि;मे;जून;जुलै;ऑग;सप्टें;ऑक्टो;नोव्हें;डिसें'),\n dddd: _('रविवार;सोमवार;मंगळवार;बुधवार;गुरुवार;शुक्रवार;शनिवार'),\n ddd: _('रवि;सोम;मंगळ;बुध;गुरु;शुक्र;शनि')\n}, 'mr');\n\naddLocale(xm({\n group: ',',\n decimal: '.',\n mmmm: _('ဇန်နဝါရီ;ဖေဖော်ဝါရီ;မတ်;ဧပြီ;မေ;ဇွန်;ဇူလိုင်;ဩဂုတ်;စက်တင်ဘာ;အောက်တိုဘာ;နိုဝင်ဘာ;ဒီဇင်ဘာ'),\n mmm: _('ဇန်;ဖေ;မတ်;ဧ;မေ;ဇွန်;ဇူ;ဩ;စက်;အောက်;နို;ဒီ'),\n dddd: _('တနင်္ဂနွေ;တနင်္လာ;အင်္ဂါ;ဗုဒ္ဓဟူး;ကြာသပတေး;သောကြာ;စနေ'),\n ampm: _('နံနက်;ညနေ')\n}, -1, 0), 'my');\n\naddLocale({\n group: ',',\n decimal: '.',\n mmmm: _('ਜਨਵਰੀ;ਫ਼ਰਵਰੀ;ਮਾਰਚ;ਅਪ੍ਰੈਲ;ਮਈ;ਜੂਨ;ਜੁਲਾਈ;ਅਗਸਤ;ਸਤੰਬਰ;ਅਕਤੂਬਰ;ਨਵੰਬਰ;ਦਸੰਬਰ'),\n mmm: _('ਜਨ;ਫ਼ਰ;ਮਾਰਚ;ਅਪ੍ਰੈ;ਮਈ;ਜੂਨ;ਜੁਲਾ;ਅਗ;ਸਤੰ;ਅਕਤੂ;ਨਵੰ;ਦਸੰ'),\n dddd: _('ਐਤਵਾਰ;ਸੋਮਵਾਰ;ਮੰਗਲਵਾਰ;ਬੁੱਧਵਾਰ;ਵੀਰਵਾਰ;ਸ਼ੁੱਕਰਵਾਰ;ਸ਼ਨਿੱਚਰਵਾਰ'),\n ddd: _('ਐਤ;ਸੋਮ;ਮੰਗਲ;ਬੁੱਧ;ਵੀਰ;ਸ਼ੁੱਕਰ;ਸ਼ਨਿੱਚਰ'),\n ampm: _('ਪੂ.ਦੁ.;ਬਾ.ਦੁ.')\n}, 'pa');\n\naddLocale({\n group: '.',\n decimal: ',',\n mmmm: _('ianuarie;februarie;martie;aprilie;mai;iunie;iulie;august;septem~;octom~;noiem~;decem~', 'brie'),\n mmm: _('ian.;feb.;mar.;apr.;mai;iun.;iul.;aug.;sept.;oct.;nov.;dec.'),\n dddd: _('duminică;luni;marți;miercuri;joi;vineri;sâmbătă'),\n ddd: _('dum.;lun.;mar.;mie.;joi;vin.;sâm.'),\n ampm: _('a.m.;p.m.')\n}, 'ro');\n\naddLocale(xm({\n group: '.',\n decimal: ',',\n mmmm: _('januar;februar;marec;april;maj;junij;julij;avgust;september;oktober;november;december'),\n mmm: _('jan.;feb.;mar.;apr.;maj;jun.;jul.;avg.;sep.;okt.;nov.;dec.'),\n dddd: _('nedelja;ponedeljek;torek;sreda;četrtek;petek;sobota'),\n ampm: _('dop.;pop.')\n}, -1, 13), 'sl');\n\naddLocale(xm({\n group: '.',\n decimal: ',',\n mmmm: _('јануар;фебруар;март;април;мај;јун;јул;август;септембар;октобар;новембар;децембар'),\n dddd: _('недеља;понедељак;уторак;среда;четвртак;петак;субота')\n}, 3, 3), 'sr');\n\naddLocale({\n group: ',',\n decimal: '.',\n mmmm: _('ஜனவரி;பிப்ரவரி;மார்ச்;ஏப்ரல்;மே;ஜூன்;ஜூலை;ஆகஸ்ட்;செப்டம்பர்;அக்டோபர்;நவம்பர்;டிசம்பர்'),\n mmm: _('ஜன.;பிப்.;மார்.;ஏப்.;மே;ஜூன்;ஜூலை;ஆக.;செப்.;அக்.;நவ.;டிச.'),\n dddd: _('ஞாயிறு;திங்கள்;செவ்வாய்;புதன்;வியாழன்;வெள்ளி;சனி'),\n ddd: _('ஞாயி.;திங்.;செவ்.;புத.;வியா.;வெள்.;சனி')\n}, 'ta');\n\naddLocale({\n group: ',',\n decimal: '.',\n mmmm: _('జనవరి;ఫిబ్రవరి;మార్చి;ఏప్రిల్;మే;జూన్;జులై;ఆగస్టు;సెప్టెంబర్;అక్టోబర్;నవంబర్;డిసెంబర్'),\n mmm: _('జన;ఫిబ్ర;మార్చి;ఏప్రి;మే;జూన్;జులై;ఆగ;సెప్టెం;అక్టో;నవం;డిసెం'),\n dddd: _('ఆదివారం;సోమవారం;మంగళవారం;బుధవారం;గురువారం;శుక్రవారం;శనివారం'),\n ddd: _('ఆది;సోమ;మంగళ;బుధ;గురు;శుక్ర;శని')\n}, 'te');\n\naddLocale({\n decimal: ',',\n mmmm: _('січня;лютого;березня;квітня;травня;червня;липня;серпня;вересня;жовтня;листопада;грудня'),\n mmm: _('січ.;лют.;бер.;квіт.;трав.;черв.;лип.;серп.;вер.;жовт.;лист.;груд.'),\n dddd: _('неділю;понеділок;вівторок;середу;четвер;пʼятницю;суботу'),\n ddd: _('нд;пн;вт;ср;чт;пт;сб'),\n ampm: _('дп;пп')\n}, 'uk');\n\naddLocale({\n group: '.',\n decimal: ',',\n mmmm: _('~1;~2;~3;~4;~5;~6;~7;~8;~9;~10;~11;~12', 'tháng '),\n mmm: _('~1;~2;~3;~4;~5;~6;~7;~8;~9;~10;~11;~12', 'thg '),\n dddd: _('Chủ Nhật;Thứ Hai;Thứ Ba;Thứ Tư;Thứ Năm;Thứ Sáu;Thứ Bảy'),\n ddd: _('CN;Th 2;Th 3;Th 4;Th 5;Th 6;Th 7'),\n ampm: _('SA;CH')\n}, 'vi');\n\naddLocale(xm({\n group: '٬',\n decimal: '٫',\n ampm: _('ص;م'),\n mmmm: _('يناير;فبراير;مارس;أبريل;مايو;يونيو;يوليو;أغسطس;سبتمبر;أكتوبر;نوفمبر;ديسمبر'),\n dddd: _('الأحد;الاثنين;الثلاثاء;الأربعاء;الخميس;الجمعة;السبت'),\n mmmm6: _('رمضان;شوال;ذو القعدة;ذو الحجة;محرم;ربيع الأول;ربيع الآخرة;جمادى الأولى;جمادى الآخرة;رجب;شعبان;رمضان')\n}, 0, 0), 'ar');\n\naddLocale({\n group: ',',\n decimal: '.',\n mmmm: _('জানুয়ারী;ফেব্রুয়ারী;মার্চ;এপ্রিল;মে;জুন;জুলাই;আগস্ট;সেপ্টেম্বর;অক্টোবর;নভেম্বর;ডিসেম্বর'),\n mmm: _('জানু;ফেব;মার্চ;এপ্রি;মে;জুন;জুল;আগ;সেপ্টেঃ;অক্টোঃ;নভেঃ;ডিসেঃ'),\n dddd: _('রবিবার;সোমবার;মঙ্গলবার;বুধবার;বৃহস্পতিবার;শুক্রবার;শনিবার'),\n ddd: _('রবি;সোম;মঙ্গল;বুধ;বৃহস্পতি;শুক্র;শনি')\n}, 'bn');\n\naddLocale({\n group: ',',\n decimal: '.',\n mmmm: _('जनवरी;फ़रवरी;मार्च;अप्रैल;मई;जून;जुलाई;अगस्त;सितंबर;अक्तूबर;नवंबर;दिसंबर'),\n mmm: _('जन॰;फ़र॰;मार्च;अप्रैल;मई;जून;जुल॰;अग॰;सित॰;अक्तू॰;नव॰;दिस॰'),\n dddd: _('रविवार;सोमवार;मंगलवार;बुधवार;गुरुवार;शुक्रवार;शनिवार'),\n ddd: _('रवि;सोम;मंगल;बुध;गुरु;शुक्र;शनि'),\n ampm: _('am;pm')\n}, 'hi');\n","/** Options that control the behavior of the formatter. */\nexport type FormatOptions = {\n /**\n * The string emitted when a formatter fails to format a date that is out of bounds.\n * Both `dateErrorThrows` and `dateErrorNumber` override this setting.\n * @default '######'\n */\n overflow: string,\n\n /**\n * Should the formatter throw an error when trying to format a date that is out of bounds?\n * @default false\n */\n dateErrorThrows: boolean,\n\n /**\n * Should the formatter emit a number when trying to format a date that is out of bounds?\n * This is default behaviour by Google Sheets. `dateErrorThrows` overrides this setting.\n * @default true\n */\n dateErrorNumber: boolean,\n\n /**\n * Should the formatter switch to a plain string number format when trying to\n * format a bigint that is out of bounds of regular JS numbers?\n * @default false\n */\n bigintErrorNumber: boolean,\n\n /**\n * Extends the allowed range of dates from Excel bounds (1900–9999) to Google Sheet bounds (0–99999).\n * @default true\n */\n dateSpanLarge: boolean,\n\n /**\n * Simulate the Lotus 1-2-3 [1900 leap year bug](https://docs.microsoft.com/en-us/office/troubleshoot/excel/wrongly-assumes-1900-is-leap-year).\n * It is a requirement in the Ecma OOXML specification so it is on by default.\n * @default true\n */\n leap1900: boolean,\n\n /**\n * Emit regular vs. non-breaking spaces. By default the output will use a regular\n * space, but in many cases you may desire a non-breaking-space instead.\n * @default false\n */\n nbsp: boolean,\n\n /**\n * Should the formatter throw an error if a provided pattern is invalid.\n * If false, a formatter will be constructed which instead outputs an error\n * string (see _invalid_ in this table).\n * @default true\n */\n throws: boolean,\n\n /**\n * The string emitted when formatter fails to parse a pattern and has been instructed\n * not to throw an error.\n * @default '######'\n */\n invalid: string,\n\n /**\n * A BCP 47 string tag or Excel [MsoLanguageID](https://docs.microsoft.com/en-us/office/vba/api/office.msolanguageid). Locale default is english with a `\\u00a0`\n * grouping symbol (see [addLocale](#addLocale))\n * @default ''\n */\n locale: string | number,\n\n /**\n * Normally when date objects are used with the formatter, time zone is taken\n * into account and the date is adjusted into UTC. This option makes the formatter\n * ignore the timezone offset.\n * @default false\n */\n ignoreTimezone: boolean,\n\n /**\n * Integer grouping sizes. You may desire to emit numbers in standards other than the common 3 digits\n * per group (e.g. \"123,456,789\"). The first grouping size is used for the least significant integer\n * group, and the second grouping size is used for more significant groups (e.g. `[3, 2]` => \"12,34,56,789\").\n * @default [ 3 ]\n */\n grouping: [ number, number ] | [ number ],\n\n /**\n * Automatically resolve indexed colors to hex when outputting colors (red => #f00);\n * When indexed color modifiers are used (`[Color 1]`) the formatter will convert the index\n * into the corresponding hex color of the default palette. When this option is set to false,\n * the number will instead by emitted allowing you to index against a custom palette.\n * @default true\n */\n indexColors: boolean,\n\n /**\n * When the formatter encounters `_` it normally emits a single space instead\n * of the `_` and the next character (like Excel TEXT function does). Setting\n * this to a character will make the formatter emit that followed by the next\n * one.\n * @default ''\n */\n skipChar: string,\n\n /**\n * When the formatter encounters `*` it normally emits nothing instead of the\n * `*` and the next character (like Excel TEXT function does). Setting this\n * to a character will make the formatter emit that followed by the next one.\n * @default ''\n */\n fillChar: string,\n};\n\nexport const defaultOptions: FormatOptions = {\n overflow: '######',\n dateErrorThrows: false,\n dateErrorNumber: true,\n bigintErrorNumber: false,\n dateSpanLarge: true,\n leap1900: true,\n nbsp: false,\n throws: true,\n invalid: '######',\n locale: '',\n ignoreTimezone: false,\n grouping: [ 3, 3 ],\n indexColors: true,\n skipChar: '',\n fillChar: ''\n};\n","/**\n * Return a number rounded to the specified amount of places. This is the\n * rounding function used internally by the formatter (symmetric arithmetic\n * rounding). It rounds the same way Excel does.\n *\n * @param number The number to round.\n * @param [places] The number of decimals to round to.\n * @returns A rounded number.\n */\nexport function round (number: number, places: number = 0): number {\n if (typeof number !== 'number') {\n return NaN;\n }\n if (number < 0) {\n return -round(-number, places);\n }\n if (places) {\n const p = 10 ** (places) || 1;\n return round(number * p, 0) / p;\n }\n return Math.round(number);\n}\n","import { EPOCH_1317, EPOCH_1904 } from './constants.ts';\nconst floor = Math.floor;\n\n// https://www.codeproject.com/Articles/2750/Excel-Serial-Date-to-Day-Month-Year-and-Vice-Versa\nexport function toYMD_1900 (ord: number, leap1900 = true) {\n if (leap1900 && ord >= 0) {\n if (ord === 0) {\n return [ 1900, 1, 0 ];\n }\n if (ord === 60) {\n return [ 1900, 2, 29 ];\n }\n if (ord < 60) {\n return [ 1900, (ord < 32 ? 1 : 2), ((ord - 1) % 31) + 1 ];\n }\n }\n let l = ord + 68569 + 2415019;\n const n = floor((4 * l) / 146097);\n l = l - floor((146097 * n + 3) / 4);\n const i = floor((4000 * (l + 1)) / 1461001);\n l = l - floor((1461 * i) / 4) + 31;\n const j = floor((80 * l) / 2447);\n const nDay = l - floor((2447 * j) / 80);\n l = floor(j / 11);\n const nMonth = j + 2 - (12 * l);\n const nYear = 100 * (n - 49) + i + l;\n return [ nYear | 0, nMonth | 0, nDay | 0 ];\n}\n\nexport function toYMD_1904 (ord: number) {\n return toYMD_1900(ord + 1462);\n}\n\n// https://web.archive.org/web/20080209173858/https://www.microsoft.com/globaldev/DrIntl/columns/002/default.mspx\n// > [algorithm] is used in many Microsoft products, including all\n// > operating systems that support Arabic locales, Microsoft Office,\n// > COM, Visual Basic, VBA, and SQL Server 2000.\nexport function toYMD_1317 (ord: number) {\n if (ord === 60) {\n throw new Error('#VALUE!');\n }\n if (ord <= 1) {\n return [ 1317, 8, 29 ];\n }\n if (ord < 60) {\n return [ 1317, (ord < 32 ? 9 : 10), 1 + ((ord - 2) % 30) ];\n }\n const y = 10631 / 30;\n const shift1 = 8.01 / 60;\n let z = ord + 466935;\n const cyc = floor(z / 10631);\n z = z - 10631 * cyc;\n const j = floor((z - shift1) / y);\n z = z - floor(j * y + shift1);\n const m = floor((z + 28.5001) / 29.5);\n if (m === 13) {\n return [ 30 * cyc + j, 12, 30 ];\n }\n return [ 30 * cyc + j, m, z - floor(29.5001 * m - 29) ];\n}\n\nexport function toYMD (ord: number, system = 0, leap1900 = true) {\n const int = floor(ord);\n if (system === EPOCH_1317) {\n return toYMD_1317(int);\n }\n if (system === EPOCH_1904) {\n return toYMD_1904(int);\n }\n return toYMD_1900(int, leap1900);\n}\n","import { toYMD } from './toYMD.ts';\n\nconst floor = Math.floor;\nconst DAYSIZE = 86400;\n\n/**\n * Convert a native JavaScript Date, or an array of date parts to an spreadsheet serial date.\n *\n * Returns a serial date number if input was a Date object or an array of\n * numbers, else a null.\n *\n * ```js\n * // input as Date\n * dateToSerial(new Date(1978, 5, 17)); // 28627\n * // input as [ Y, M, D, h, m, s ]\n * dateToSerial([ 1978, 5, 17 ]); // 28627\n * // other input\n * dateToSerial(\"something else\"); // null\n * ```\n *\n * @param date A Date instance or an array of date parts in descending order.\n * @param [options={}] Options for this method\n * @param [options.ignoreTimezone]\n * Normally time zone will be taken into account. This makes the conversion to\n * serial date ignore the timezone offset.\n * @returns The date as a spreadsheet serial date, or undefined.\n */\nexport function dateToSerial (\n date: Date | number[],\n options?: { ignoreTimezone?: boolean; }\n): number | undefined {\n let ts = undefined;\n if (Array.isArray(date)) {\n const [ y, m, d, hh, mm, ss ] = date;\n ts = Date.UTC(y, m == null ? 0 : m - 1, d ?? 1, hh || 0, mm || 0, ss || 0);\n }\n // dates are changed to serial\n else if (date instanceof Date) {\n ts = date.valueOf();\n if (!options?.ignoreTimezone) {\n // Many timezones are offset in seconds but getTimezoneOffset() returns\n // time \"rounded\" to minutes so it is basically usable. 😿\n const dt = new Date();\n dt.setUTCFullYear(\n date.getFullYear(),\n date.getMonth(),\n date.getDate()\n );\n dt.setUTCHours(\n date.getHours(),\n date.getMinutes(),\n date.getSeconds(),\n date.getMilliseconds()\n );\n // timestamp\n ts = dt.valueOf();\n }\n }\n if (ts != null && isFinite(ts)) {\n const d = (ts / 864e5);\n return d - (d <= -25509 ? -25568 : -25569);\n }\n return;\n}\n\n/**\n * Convert a spreadsheet serial date to an array of date parts.\n * Accurate to a second.\n *\n * ```js\n * // output as [ Y, M, D, h, m, s ]\n * dateFromSerial(28627); // [ 1978, 5, 17, 0, 0, 0 ]\n * ```\n *\n * @param serialDate The date\n * @param [options] Options for this method\n * @param [options.leap1900]\n * Simulate the Lotus 1-2-3 [1900 leap year bug](https://docs.microsoft.com/en-us/office/troubleshoot/excel/wrongly-assumes-1900-is-leap-year).\n * True by default.\n * @returns returns an array of date parts with parts in descending order: [ year, month, day, hour, minute, second ]\n */\nexport function dateFromSerial (\n serialDate: number,\n options?: {\n leap1900?: boolean;\n }\n): [ number, number, number, number, number, number ] {\n let date = (serialDate | 0);\n const t = DAYSIZE * (serialDate - date);\n let time = floor(t); // in seconds\n // date \"epsilon\" correction\n if ((t - time) > 0.9999) {\n time += 1;\n if (time === DAYSIZE) {\n time = 0;\n date += 1;\n }\n }\n // serial date/time to gregorian calendar\n const x = (time < 0) ? DAYSIZE + time : time;\n const [ y, m, d ] = toYMD(serialDate, 0, options?.leap1900);\n const hh = floor((x / 60) / 60) % 60;\n const mm = floor(x / 60) % 60;\n const ss = floor(x) % 60;\n // return the parts\n return [ y, m, d, hh, mm, ss ];\n}\n","export function isValidDate (y: number, m: number, d: number) {\n // day can't be 0\n if (d < 1) {\n return false;\n }\n // month must be 1-12\n if (m < 1 || m > 12) {\n return false;\n }\n // february\n if (m === 2) {\n const isLeapYear = (((y % 4 === 0) && (y % 100 !== 0)) || (y % 400 === 0));\n // 1900 is a leap year in Excel\n const febDays = (isLeapYear || y === 1900) ? 29 : 28;\n if (d > febDays) {\n return false;\n }\n }\n // test any other month\n else if (\n ((m === 4 || m === 6 || m === 9 || m === 11) && d > 30) ||\n ((m === 1 || m === 3 || m === 5 || m === 7 || m === 8 || m === 10 || m === 12) && d > 31)) {\n return false;\n }\n return true;\n}\n","import { currencySymbols, reCurrencySymbols } from './constants.ts';\nimport { isValidDate } from './isValidDate.ts';\nimport { defaultLocale, getLocale } from './locale.ts';\n\n/**\n * Output from a number or date value parser.\n */\nexport type ParseDataNum = {\n /** A number value */\n v: number;\n /** A number format pattern */\n z?: string;\n};\n\n/**\n * Output from the boolean value parser.\n */\nexport type ParseDataBool = {\n /** A boolean value */\n v: boolean;\n /** A number format pattern */\n z?: string;\n};\n\ntype LData = {\n mon: [string, number, string][],\n mp: boolean,\n day: [string, number, string][],\n dp: boolean,\n locale?: string,\n};\n\n/*\nThis is a list of the allowed date formats. The test file contains\nthe full list of permuations and the resulting values and formats.\n\nLegend:\n \"-\" - Date separator (any of \"/\" | \"-\" | \" \" | \".\"⁽¹⁾ | \", \"⁽²⁾)\n \" \" - Whitespace\n \"j\" - Day without leading zero (1-31)\n \"d\" - Day with leading zero (00-31)\n \"D\" - Abbreviated day name (\"Sun\"-\"Sat\")\n \"l\" - Full day name (\"Sunday\"-\"Saturday\")\n \"n\" - Month without leading zero (1-12)\n \"m\" - Month with leading zero (01-12)\n \"F\" - Full month name (\"January\"-\"December\")\n \"M\" - Abbreviated month name (\"Jan\"-\"Dec\")\n \"y\" - Year without century (00-99)\n \"Y\" - Year of our lord (1900-9999)\n \"x\" - Time of day (all formats: \"10 PM\", \"10:11:12\", ...)\n \"!\" - Only use in \"date-first\" locales: 4.2.2000 = 4 feb.\n \"?\" - Only use in \"month-first\" locales: 2.4.2000 = 4 feb.\n\n¹ Only considered valid if there are three or more sections to the date.\n² Comma is only allowed if followed by a space.\n\nTime is appended to each of these as they are inserted into the\ncollection of valid dates below.\n*/\nconst okDateFormats = [\n // day-month-year\n '!d-m-y', '!d-m-Y', '!j-m-y', '!j-m-Y',\n '!d-n-y', '!d-n-Y', '!j-n-y', '!j-n-Y',\n // month-day-year\n '?m-d-y', '?m-d-Y', '?m-j-y', '?m-j-Y',\n '?n-d-y', '?n-d-Y', '?n-j-y', '?n-j-Y',\n // unab\n 'd-M-y', 'd-M-Y', 'j-M-y', 'j-M-Y',\n 'M-d-y', 'M-d-Y', 'M-j-y', 'M-j-Y',\n 'd-F-y', 'd-F-Y', 'F-d-y', 'F-d-Y',\n 'F-j-y', 'F-j-Y', 'j-F-y', 'j-F-Y',\n 'y-F-d', 'y-F-j', 'y-M-d', 'y-M-j',\n 'Y-F-d', 'Y-F-j', 'Y-M-d', 'Y-m-d',\n 'Y-M-j', 'Y-m-j', 'Y-n-d', 'Y-n-j',\n 'j-F', // 2-April\n 'j-M', // 2-Apr\n 'd-F', // 02-April\n 'd-M', // 02-Apr\n 'n-d', // 4-02\n 'n-j', // 4-2\n 'n-Y', // 4-1908\n 'm-d', // 04-02\n 'm-j', // 04-2\n 'm-Y', // 04-1908\n 'M-Y', // Apr-1908\n 'M-y', // Apr-08\n 'F-y', // April-08\n 'F-Y', // April-1908\n 'Y-M', // 1908-Apr\n 'Y-n', // 1908-4\n 'Y-m', // 1908-04\n 'Y-F', // 1908-April\n 'Y-M' // 1908-Apr\n];\n\n// letter to excel\nconst tx0: Record = { j: 'd', d: 'd', D: 'ddd', l: 'dddd', n: 'm', m: 'm', M: 'mmm', F: 'mmmm', y: 'yy', Y: 'yyyy' };\nconst tx00: Record = { j: 'dd', d: 'dd', D: 'ddd', l: 'dddd', n: 'mm', m: 'mm', M: 'mmm', F: 'mmmm', y: 'yy', Y: 'yyyy' };\n\n// date formats are stored as a token-tree in a trie\n// for minimal looping and branching while parsing\ntype DateTrieNode = { $?: number } & { [token: string]: DateTrieNode };\nconst dateTrieDM: DateTrieNode = {};\nconst dateTrieMD: DateTrieNode = {};\nfunction packDate (f: string, node: DateTrieNode, allowType = 1) {\n if (f) {\n const char = f[0];\n const next = f.slice(1);\n if (char === '!') {\n packDate(next, node, 4);\n }\n else if (char === '?') {\n packDate(next, node, 2);\n }\n else {\n node[char] = node[char] || {};\n packDate(next, node[char], allowType);\n }\n }\n else {\n node.$ = allowType;\n }\n}\nfunction addFormatToTrie (fmt: string, trie: DateTrieNode) {\n // add date to token tree\n packDate(fmt, trie);\n // add a variant of the date with time suffixed\n // Excel allows time first, but Sheets and GRID do not\n packDate(fmt + ' x', trie);\n // add a variant of the date with weekdays pre-/suffixed\n packDate(fmt + ' l', trie);\n packDate(fmt + ' l x', trie);\n packDate('l ' + fmt, trie);\n packDate('l ' + fmt + ' x', trie);\n packDate(fmt + ' D', trie);\n packDate(fmt + ' D x', trie);\n packDate('D ' + fmt, trie);\n packDate('D ' + fmt + ' x', trie);\n}\nokDateFormats.forEach(fmt => {\n if (!fmt.startsWith('?')) addFormatToTrie(fmt, dateTrieDM);\n if (!fmt.startsWith('!')) addFormatToTrie(fmt, dateTrieMD);\n});\n\nconst currentYear = new Date().getUTCFullYear();\n\nconst PT = '.';\nconst CM = ',';\nconst SP = ' ';\nconst NS = ' ';\nconst NN = ' ';\nconst AP = \"'\";\nconst AG = '٬';\nconst dec2group: Record = {\n '.': [ CM, NS, NN, AP, AG ],\n ',': [ PT, NS, NN, AP, AG ],\n '٫': [ PT, NS, NN, AP, AG ]\n};\nconst isDigit = (d: string) => d?.length === 1 && d >= '0' && d <= '9';\n\n/**\n * Parse a numeric string input and return its value and format. If the input\n * was not recognized or valid, the function returns a `undefined`, for valid input\n * it returns an object with two properties:\n *\n * * `v`: the parsed value.\n * * `z`: the number format of the input (if applicable).\n *\n * @param value The number to parse\n * @param [options] Options for the parser\n * @param [options.locale]\n * A BCP 47 string tag. Locale default is english with a `\\u00a0`\n * grouping symbol (see [addLocale](#addLocale))\n * @returns An object of the parsed value and a corresponding format string\n */\nexport function parseNumber (value: string, options: { locale?: string; } = {}): ParseDataNum | undefined {\n const l10n = getLocale(options.locale || '') || defaultLocale;\n // we base everything on the decimal separator\n const dec = l10n.decimal;\n // base allowed grouping chars on decimal\n const grp = [ ...(dec2group[dec] || [ AP, AG ]) ];\n if (!grp.includes(l10n.group) && l10n.group !== SP && l10n.group !== dec) {\n grp.push(l10n.group);\n }\n let num = '';\n let exp = '';\n let sign = 1;\n let format = '';\n let minus = false;\n let openParen = false;\n let closeParen = false;\n let percent = false;\n let currency = false;\n let currencySymbol = null;\n let currencyTrailing = false;\n let i = 0;\n // prefix\n const prefixChars = [ SP, NS, NN, '+', '%', '(', '-' ].concat(currencySymbols);\n while (prefixChars.includes(value[i])) {\n const char = value[i];\n if (char === '-') {\n if (minus || openParen) {\n return undefined;\n }\n minus = true;\n sign = -1;\n }\n else if (reCurrencySymbols.test(char)) {\n if (currency) {\n return undefined;\n }\n currency = true;\n currencySymbol = char;\n }\n else if (char === '(') {\n if (openParen || minus) {\n return undefined;\n }\n openParen = true;\n sign = -1;\n }\n else if (char === '%') {\n if (percent) {\n return undefined;\n }\n percent = true;\n }\n i++;\n }\n // number\n let haveDecimal = false;\n let g;\n if (value[i] === dec || isDigit(value[i])) {\n while (i < value.length) {\n const ch = value[i];\n // can maybe allow space as the grouping operator if we find that it is\n // immediately followed by a digit or decimal?\n if (!g && grp.includes(ch)) {\n g = ch;\n // skip\n }\n else if (g && g === ch) {\n // skip\n }\n else if (ch === dec) {\n if (haveDecimal) {\n break;\n }\n num += '.';\n haveDecimal = true;\n }\n else if (isDigit(ch)) {\n num += ch;\n }\n else {\n break;\n }\n i++;\n }\n }\n // exponent\n if (value[i] === 'e' || value[i] === 'E') {\n exp += value[i];\n i++;\n if (value[i] === '+' || value[i] === '-') {\n exp += value[i];\n i++;\n }\n const d = i;\n while (isDigit(value[i])) {\n exp += value[i];\n i++;\n }\n if (d === i) {\n // contains no digits\n return undefined;\n }\n }\n // suffix\n const suffixChars = [ SP, NS, NN, '%', '$', ')' ].concat(currencySymbols);\n while (suffixChars.includes(value[i])) {\n const char = value[i];\n // only 1 occurance of these is allowed\n if (reCurrencySymbols.test(char)) {\n if (currency) {\n return undefined;\n }\n currency = true;\n currencySymbol = char;\n currencyTrailing = true;\n }\n else if (char === ')') {\n if (closeParen || !openParen) {\n return undefined;\n }\n closeParen = true;\n }\n else if (char === '%') {\n if (percent) {\n return undefined;\n }\n percent = true;\n }\n i++;\n }\n\n if (i !== value.length) {\n return undefined;\n }\n\n // is number ok?\n let numberValue = parseFloat(num + exp);\n if (!isFinite(numberValue)) {\n return undefined;\n }\n\n if (exp) {\n if (percent || currency) {\n return undefined;\n }\n // allow parens and minus, but not %$\n format = '0.00E+00';\n }\n else if (percent) {\n if (currency) {\n // Sheets allows this: $123% => $1.23 (Excel does not)\n return undefined;\n }\n // numpart dictates how \"deep\" the format is: \"0\" vs \"0.00\"\n format = num.includes('.')\n ? '0.00%'\n : '0%';\n numberValue *= 0.01;\n }\n else if (currency) {\n // numpart dictates how \"deep\" the format is: \"0\" vs \"0.00\"\n const currencyFormat = num.includes('.')\n ? '#,##0.00'\n : '#,##0';\n if (currencyTrailing) {\n format = currencyFormat + currencySymbol;\n }\n else {\n format = currencySymbol + currencyFormat;\n }\n }\n else if (g) {\n format = num.includes('.')\n ? '#,##0.00'\n : '#,##0';\n }\n // we may want to lower the fidelity of the number: +num.toFixed(13)\n const ret: ParseDataNum = { v: numberValue * sign };\n if (format) {\n ret.z = format;\n }\n return ret;\n}\n\n// should really match { ’' } and all whitespace\nconst matchRec = (\n str: string,\n data: [ string, number, string ][],\n skipPeriod = false\n): [ string, [ string, number, string ] | null ] => {\n for (const item of data) {\n if (str.startsWith(item[0])) {\n // if the match is followed by a \".\" we'll skip it if the abbr. is by\n // convention abbreviated in the locale.\n let l = item[0].length;\n if (skipPeriod && (item[2] === 'D' || item[2] === 'M') && str[l] === '.') {\n l++;\n }\n return [ str.slice(0, l), item ];\n }\n }\n return [ '', null ];\n};\n\ntype DtData = {\n path?: string,\n sep?: string,\n day?: string,\n tf?: string,\n _mon?: string,\n month?: number,\n year?: number,\n time?: number,\n};\n\nconst nextToken = (str: string, node: DateTrieNode, data: DtData, lData: LData): DtData | undefined => {\n const path = data.path || '';\n const matchOrder = Object.keys(node);\n for (const t of matchOrder) {\n let r: DtData | undefined;\n if (!node[t]) {\n continue;\n }\n if (t === '$' || t === '€') {\n // if string is done, then we can return\n if (!str) {\n r = data;\n }\n }\n else if (t === '-') {\n const m = /^(\\s*([./-]|,\\s)\\s*|\\s+)/.exec(str);\n if (m) {\n const sep = (m[1] === '-' || m[1] === '/' || m[1] === '.') ? m[1] : ' ';\n // don't allow mixing date separators\n if (!data.sep || data.sep === sep) {\n const s = m[0].replace(/\\s+/g, ' ');\n r = nextToken(str.slice(m[0].length), node[t], { ...data, sep, path: path + s }, lData);\n }\n }\n }\n else if (t === ' ') {\n const m = /^[,.]?\\s+/.exec(str);\n if (m) {\n const s = m[0].replace(/\\s+/g, ' ');\n r = nextToken(str.slice(m[0].length), node[t], { ...data, path: path + s }, lData);\n }\n }\n else if (t === 'j' || t === 'd') {\n const m = /^(0?[1-9]|1\\d|2\\d|3[01])\\b/.exec(str);\n if (m) {\n r = nextToken(str.slice(m[0].length), node[t], { ...data, day: m[0], path: path + t }, lData);\n }\n }\n else if (t === 'n' || t === 'm') {\n const m = /^(0?[1-9]|1[012])\\b/.exec(str);\n if (m) {\n r = nextToken(str.slice(m[0].length), node[t], { ...data, month: +m[0], _mon: m[0], path: path + t }, lData);\n }\n }\n else if (t === 'F' || t === 'M') {\n const [ m, match ] = matchRec(str, lData.mon, lData.mp);\n if (match?.[2] === t) {\n r = nextToken(str.slice(m.length), node[t],\n { ...data, month: match[1], _mon: m, path: path + t }, lData);\n }\n }\n else if (t === 'l' || t === 'D') {\n const [ m, match ] = matchRec(str, lData.day, lData.dp);\n if (match?.[2] === t) {\n // the value is ignored\n r = nextToken(str.slice(m.length), node[t], { ...data, path: path + t }, lData);\n }\n }\n else if (t === 'y') {\n const m = /^\\d\\d\\b/.exec(str);\n if (m) {\n const y = (+m[0] >= 30) ? +m[0] + 1900 : +m[0] + 2000;\n r = nextToken(str.slice(m[0].length), node[t], { ...data, year: y, path: path + t }, lData);\n }\n }\n else if (t === 'Y') {\n const m = /^\\d\\d\\d\\d\\b/.exec(str);\n if (m) {\n r = nextToken(str.slice(m[0].length), node[t], { ...data, year: +m[0], path: path + t }, lData);\n }\n }\n else if (t === 'x') {\n const time = parseTime(str, { locale: lData.locale });\n if (time) {\n r = nextToken('', node[t], { ...data, time: time.v, tf: time.z, path: path + t }, lData);\n }\n }\n else {\n throw new Error(`Unknown date token \"${t}\"`);\n }\n if (r) {\n // reject invalid dates so we continue traversing the tree\n if (isValidDate(data.year || 1916, data.month || 1, data.day ? +data.day : 1)) {\n return r;\n }\n }\n }\n};\n\nconst normDateStr = (s: string): string => (\n s.replace(/\\s+/g, ' ').trim()\n .replace(/’/, \"'\")\n .replace(/\\.$/, '')\n .toLowerCase()\n);\n\nconst getLookups = (arr: string[], sym: string) => {\n const s: [ string, number, string ][] = arr.map((d, i) => [ normDateStr(d), i + 1, sym ]);\n s.sort((a, b) => b[0].length - a[0].length);\n return s;\n};\n\n/**\n * Parse a date or datetime string input and return its value and format. If\n * the input was not recognized or valid, the function returns an `undefined`, for\n * valid input it returns an object with two properties:\n *\n * - `v`: the parsed value.\n * - `z`: the number format of the input (if applicable).\n *\n * @param value The string to parse\n * @param [options={}] Options for the parser\n * @param [options.locale=\"\"]\n * A BCP 47 string tag. Locale default is english with a `\\u00a0`\n * grouping symbol (see [addLocale](#addLocale))\n * @returns An object of the parsed value and a corresponding format string\n */\nexport function parseDate (value: string, options: { locale?: string; } = {}): ParseDataNum | undefined {\n const l10n = getLocale(options.locale || '') || defaultLocale;\n const lData: LData = {\n mon: getLookups(l10n.mmmm, 'F').concat(getLookups(l10n.mmm, 'M')),\n mp: l10n.mmm[0].at(-1) === '.',\n day: getLookups(l10n.dddd, 'l').concat(getLookups(l10n.ddd, 'D')),\n dp: l10n.ddd[0].at(-1) === '.',\n locale: options.locale\n };\n // possible shortcut: quickly dismiss if there isn't a number?\n const date = nextToken(\n normDateStr(value),\n l10n.preferMDY ? dateTrieMD : dateTrieDM,\n { path: '' },\n lData\n );\n if (date) {\n // disallow matches where two tokens are separated by a period\n if (date.sep === '.' && date.path?.length === 3) {\n return undefined;\n }\n const year = +(date.year ?? currentYear);\n if (!date.day) {\n date.day = '1';\n }\n let epoch = -Infinity;\n if (year < 1900) {\n return undefined;\n }\n else if (year <= 1900 && (date.month ?? 0) <= 2) {\n epoch = 25568;\n }\n else if (year < 10000) {\n epoch = 25569;\n }\n const dateValue = (Date.UTC(year, (date.month ?? 1) - 1, +date.day) / 864e5) + epoch + (date.time || 0);\n if (dateValue >= 0 && dateValue <= 2958465) {\n const lead0 = (\n // either has a leading zero\n ((date._mon?.startsWith('0')) || date.day?.startsWith('0')) ||\n // both are 2-digits long\n (date._mon?.length === 2 && date.day.length === 2)\n );\n const format = (date.path ?? '').replace(/[jdlDnmMFyYx]/g, (a: string) => {\n if (a === 'x') {\n return date.tf || '';\n }\n return (lead0 ? tx00[a] : tx0[a]) || a;\n });\n return { v: dateValue, z: format };\n }\n }\n return undefined;\n}\n\nconst normAMPMStr = (s: string): string => (\n s.replace(/\\s+/g, '').trim()\n .replace(/\\./g, '')\n .toLowerCase()\n);\n\n/**\n * Parse a time string input and return its value and format. If the input was\n * not recognized or valid, the function returns a `undefined`, for valid input it\n * returns an object with two properties:\n *\n * - `v`: the parsed value.\n * - `z`: the number format of the input (if applicable).\n *\n * @param value The date to parse\n * @param [options] Options for the parser\n * @param [options.locale]\n * A BCP 47 string tag. Locale default is english with a `\\u00a0`\n * grouping symbol (see [addLocale](#addLocale))\n * @returns An object of the parsed value and a corresponding format string\n */\nexport function parseTime (value: string, options: { locale?: string; } = {}): ParseDataNum | undefined {\n const l10n = getLocale(options.locale || '') || defaultLocale;\n const parts = /^\\s*([10]?\\d|2[0-4])(?::([0-5]\\d|\\d))?(?::([0-5]\\d|\\d))?(\\.\\d{1,10})?(?=\\s*[^\\s\\d]|$)/.exec(value);\n let ampm = '';\n if (parts) {\n const tail = normAMPMStr(value.slice(parts[0].length));\n if (tail === normAMPMStr(l10n.ampm[0]) || tail === 'a' || tail === 'am') {\n ampm = 'a';\n }\n else if (tail === normAMPMStr(l10n.ampm[1]) || tail === 'p' || tail === 'pm') {\n ampm = 'p';\n }\n else if (tail === ':') {\n if (!parts[3]) {\n parts[3] = '0';\n }\n if (!parts[2]) {\n parts[2] = '0';\n }\n }\n else if (tail) {\n return undefined;\n }\n }\n if (parts) {\n const [ , h, m, s, f ] = parts;\n // don't allow milliseconds without seconds\n if (f && !s) {\n return undefined;\n }\n // single number must also include AM/PM part\n if (!ampm && !m && !s) {\n return undefined;\n }\n // AM/PM part must align with hours\n let hrs = +(h || 0) * 1;\n if (ampm) {\n if (hrs >= 13) {\n return undefined;\n }\n // 00:00 AM - 12:00 AM\n if (ampm === 'a') {\n if (hrs === 12) {\n hrs = 0;\n } // midnight\n }\n else if (ampm === 'p') {\n if (hrs !== 12) {\n hrs += 12;\n } // afternoon\n }\n }\n const min = +(m || 0) * 1;\n const sec = +(s || 0) * 1;\n const mss = +(f || 0) * 1;\n\n return {\n v: ((hrs * 60 * 60) + (min * 60) + sec + mss) / (60 * 60 * 24),\n z: (\n (h.length === 2 ? 'hh' : 'h') +\n ':mm' +\n (s ? ':ss' : '') +\n (ampm ? ' AM/PM' : '')\n )\n };\n }\n return undefined;\n}\n\n/**\n * Parse a string input and return its equivalent boolean value. If the input was not\n * recognized or valid, the function returns an `undefined`, for valid input it\n * returns an object with a single property:\n *\n * - `v`: the parsed value.\n *\n * @param value The supposed boolean to parse\n * @param [options] Options for the parser\n * @param [options.locale]\n * A BCP 47 string tag. Locale default is english with a `\\u00a0`\n * grouping symbol (see [addLocale](#addLocale))\n * @returns An object of the parsed value and a corresponding format string\n */\nexport function parseBool (value: string, options: { locale?: string; } = {}): ParseDataBool | undefined {\n const l10n = getLocale(options.locale || '') || defaultLocale;\n const v = value.trim().toLowerCase();\n const bT = l10n.bool[0].toLowerCase();\n if (v === 'true' || v === bT) {\n return { v: true };\n }\n const bF = l10n.bool[1].toLowerCase();\n if (v === 'false' || v === bF) {\n return { v: false };\n }\n return undefined;\n}\n\n/**\n * Attempt to parse a \"spreadsheet input\" string input and return its value and\n * format. If the input was not recognized or valid, the function returns an\n * `undefined`, for valid input it returns an object with two properties:\n *\n * - `v`: The parsed value. For dates, this will be an Excel style serial date.\n * - `z`: (Optionally) the number format string of the input. This property will\n * not be present if it amounts to the `General` format.\n *\n * `parseValue()` recognizes a wide range of dates and date-times, times,\n * numbers, and booleans. Some examples:\n *\n * ```js\n * // basic number\n * parseValue(\"-123\");// { v: -123 }\n * // formatted number\n * parseValue(\"$1,234\"); // { v: 1234, z: \"$#,##0\" }\n * // a percent\n * parseValue(\"12.3%\"); // { v: 0.123, z: \"0.00%\" }\n * // a date\n * parseValue(\"07 October 1984\"); // { v: 30962, z: 'dd mmmm yyyy' }\n * // an ISO formatted date-time\n * parseValue(\"1984-09-10 11:12:13.1234\"); // { v: 30935.46681855787, z: \"yyyy-mm-dd hh:mm:ss\" }\n * // a boolean\n * parseValue(\"false\"); // { v: false }\n * ```\n *\n * The formatting string outputted may not correspond exactly to the input.\n * Rather, is it composed of certain elements which the input controls. This is\n * comparable to how Microsoft Excel and Google Sheets parse pasted input. Some\n * things you may expect:\n *\n * - Whitespace is ignored.\n * - Decimal fractions are always represented by `.00` regardless of how many\n * digits were shown in the input.\n * - Negatives denoted by parentheses [`(1,234)`] will not include the\n * parentheses in the format string (the value will still be negative.)\n * - All \"scientific notation\" returns the same format: `0.00E+00`.\n *\n * Internally the parser calls, `parseNumber`, `parseDate`,\n * `parseTime` and `parseBool`. They work in the same way except\n * with a more limited scope. You may prefer those functions if you are limiting\n * input to a smaller scope.\n *\n * @param value The value to parse\n * @param [options] Options for the parser\n * @param [options.locale]\n * A BCP 47 string tag. Locale default is english with a `\\u00a0`\n * grouping symbol (see {@link addLocale})\n * @returns An object of the parsed value and a corresponding format string\n */\nexport function parseValue (value: string, options?: { locale?: string; }): ParseDataNum | ParseDataBool | undefined {\n return (\n parseNumber(value, options) ??\n parseDate(value, options) ??\n parseTime(value, options) ??\n parseBool(value, options)\n );\n}\n","import { EPOCH_1900 } from './constants.ts';\nimport type { Partition, RenderToken } from './types.ts';\n\nexport function createPartition (tokens?: RenderToken[]): Partition {\n return {\n scale: 1,\n percent: false,\n text: false,\n parens: false,\n fractions: false,\n grouping: false,\n exponential: false,\n integer: false,\n locale: '',\n pattern: '',\n int_max: 0,\n frac_max: 0,\n man_p: '',\n num_p: '',\n num_min: 0,\n den_min: 0,\n den_max: 0,\n date: 0,\n tokensUsed: 0,\n date_eval: false,\n date_system: EPOCH_1900,\n sec_decimals: 0,\n general: false,\n clock: 24,\n int_min: 0, // ??\n int_pattern: [],\n frac_pattern: [],\n man_pattern: [],\n den_pattern: [],\n num_pattern: [],\n tokens: tokens ?? [],\n den_p: '',\n int_p: '',\n denominator: 0\n };\n}\n","import { resolveLocale } from './locale.ts';\nimport {\n u_YEAR, u_MONTH, u_DAY, u_HOUR, u_MIN, u_SEC, u_DSEC, u_CSEC, u_MSEC,\n EPOCH_1900, EPOCH_1317,\n TOKEN_AMPM, TOKEN_BREAK, TOKEN_CALENDAR, TOKEN_CHAR, TOKEN_COLOR, TOKEN_COMMA, TOKEN_CONDITION,\n TOKEN_DATETIME, TOKEN_DBNUM, TOKEN_DIGIT, TOKEN_DURATION, TOKEN_ERROR, TOKEN_ESCAPED, TOKEN_EXP,\n TOKEN_FILL, TOKEN_GENERAL, TOKEN_GROUP, TOKEN_HASH, TOKEN_LOCALE, TOKEN_MINUS, TOKEN_NATNUM,\n TOKEN_PAREN, TOKEN_PERCENT, TOKEN_PLUS, TOKEN_POINT, TOKEN_QMARK, TOKEN_SCALE, TOKEN_SKIP,\n TOKEN_SLASH, TOKEN_SPACE, TOKEN_STRING, TOKEN_TEXT, TOKEN_ZERO, TOKEN_MODIFIER,\n T_TYPE_INT, T_TYPE_NUM, T_TYPE_DEN, T_TYPE_DIV, T_TYPE_FRAC, T_TYPE_MAN, T_TYPE_SUBSEC, T_TYPE_YEAR_S,\n T_TYPE_YEAR, T_TYPE_B_YEAR_S, T_TYPE_B_YEAR, T_TYPE_DAY, T_TYPE_WEEKDAY_S, T_TYPE_WEEKDAY, T_TYPE_HOUR,\n T_TYPE_MNAME_S, T_TYPE_MNAME_1, T_TYPE_MNAME, T_TYPE_MIN, T_TYPE_MON, T_TYPE_HOUR_E, T_TYPE_MIN_E,\n T_TYPE_SEC_E, T_TYPE_SEC\n} from './constants.ts';\nimport type { DateRenderToken, Token, RenderToken, SectionType } from './types.ts';\nimport { createPartition } from './createPartition.ts';\n\nfunction add (s: string | RenderToken, tokens: RenderToken[]): void {\n // allow adding string tokens without wrapping\n if (typeof s === 'string') {\n tokens.push({ type: TOKEN_STRING, value: s });\n }\n else {\n tokens.push(s);\n }\n}\n\nconst countNonHash = (s: string): number => {\n let n = 0;\n for (let i = 0; i < s.length; i++) {\n if (s.charCodeAt(i) !== 35) {\n n++;\n }\n }\n return n;\n};\n\nfunction isNumOp (token: Token | RenderToken, activePattern: SectionType) {\n const type = token?.type;\n return (\n (type === TOKEN_HASH || type === TOKEN_ZERO || type === TOKEN_QMARK) ||\n (type === TOKEN_DIGIT && activePattern === T_TYPE_DEN)\n );\n}\n\nexport function parseFormatSection (inputTokens: Token[]) {\n const outputTokens: RenderToken[] = [];\n const part = createPartition(outputTokens);\n\n let currentPattern: SectionType = T_TYPE_INT; // 'num' is unused here?\n let lastNumberChunk: RenderToken | undefined;\n const dateChunks: DateRenderToken[] = [];\n let last: Token | undefined;\n let haveLocale = false;\n\n let index = -1;\n let partOver = false;\n let patternSource = '';\n let haveSlash = false;\n\n const getPattern = (p: SectionType) => {\n if (p === T_TYPE_DEN) { return part.den_pattern; }\n if (p === T_TYPE_INT) { return part.int_pattern; }\n if (p === T_TYPE_FRAC) { return part.frac_pattern; }\n if (p === T_TYPE_MAN) { return part.man_pattern; }\n return [];\n };\n\n while (++index < inputTokens.length && !partOver) {\n const token = inputTokens[index];\n const type = token.type || TOKEN_ERROR;\n patternSource += token.raw;\n\n if (type === TOKEN_GENERAL) {\n part.general = true;\n add({ type }, outputTokens);\n }\n\n // new partition\n else if (isNumOp(token, currentPattern)) {\n const pt = getPattern(currentPattern);\n if (last && (isNumOp(last, currentPattern) || last.type === TOKEN_GROUP)) {\n // append to current\n pt.push((pt.pop() || '') + token.value);\n if (lastNumberChunk && 'num' in lastNumberChunk) {\n lastNumberChunk.num += token.value;\n }\n }\n else {\n // new number section\n pt.push(token.value);\n lastNumberChunk = { type: currentPattern, num: token.value };\n add(lastNumberChunk!, outputTokens);\n }\n }\n\n else if (type === TOKEN_PAREN) {\n if (token.value === '(') {\n part.parens = true;\n }\n add(token.value, outputTokens);\n }\n else if (type === TOKEN_DIGIT) {\n // just print it\n add(token.value, outputTokens);\n }\n\n // vulgar fractions\n else if (type === TOKEN_SLASH) {\n haveSlash = true;\n const pt = getPattern(currentPattern);\n if (pt.length) {\n if (!lastNumberChunk) { // need to have a numerator present\n throw new SyntaxError('Format pattern is missing a numerator');\n }\n part.fractions = true;\n // ... we just passed the numerator - correct that item\n const xx = pt.pop()!;\n part.num_pattern.push(xx);\n lastNumberChunk.type = T_TYPE_NUM;\n // next up... the denominator\n currentPattern = T_TYPE_DEN;\n add({ type: T_TYPE_DIV }, outputTokens);\n }\n else {\n add(token.value, outputTokens);\n }\n }\n\n else if (type === TOKEN_COMMA) {\n add(',', outputTokens);\n }\n else if (type === TOKEN_SCALE) {\n part.scale = 0.001 ** token.raw.length;\n }\n else if (type === TOKEN_GROUP) {\n if (currentPattern === T_TYPE_INT) {\n part.grouping = true;\n }\n if (currentPattern === T_TYPE_DEN) {\n throw new SyntaxError('Cannot group denominator digits');\n }\n // else we just ignore it!\n }\n\n else if (type === TOKEN_SPACE) {\n add({ type }, outputTokens);\n }\n\n else if (type === TOKEN_BREAK) {\n partOver = true;\n break; // leave the \";\" hanging\n }\n\n else if (type === TOKEN_TEXT) { // @\n part.text = true;\n add({ type, value: token.value }, outputTokens);\n }\n else if (type === TOKEN_PLUS || type === TOKEN_MINUS) {\n add({ type }, outputTokens);\n }\n\n // [h] [m] [s]\n // else if ((m = /^(?:\\[(h+|m+|s+)\\])/i.exec(s))) {\n else if (type === TOKEN_DURATION) {\n const tokenValue = token.value.toLowerCase(); // deal with in tokenizer\n const startsWith = tokenValue[0];\n let bit: RenderToken;\n if (startsWith === 'h') {\n bit = { type: T_TYPE_HOUR_E, size: u_HOUR, pad: tokenValue.length };\n }\n else if (startsWith === 'm') {\n bit = { type: T_TYPE_MIN_E, size: u_MIN, pad: tokenValue.length };\n }\n else {\n bit = { type: T_TYPE_SEC_E, size: u_SEC, pad: tokenValue.length };\n }\n // signal date calc and track smallest needed unit\n part.date = part.date | bit.size;\n dateChunks.push(bit);\n add(bit, outputTokens);\n }\n // Note: In locales where decimal symbol is set to \",\" Excel will expect\n // \",\" rather than a \".\". This must be solved by re-localizing the\n // pattern before using it.\n // .0 .00 .000\n else if (part.date && type === TOKEN_POINT && inputTokens[index + 1]?.type === TOKEN_ZERO) {\n let dec = 1;\n index++;\n let raw = '0';\n if (inputTokens[index + 1]?.type === TOKEN_ZERO) {\n raw += '0';\n dec = 2;\n index++;\n }\n if (inputTokens[index + 1]?.type === TOKEN_ZERO) {\n raw += '0';\n dec = 3;\n index++;\n }\n patternSource += raw;\n const size = [ u_SEC, u_DSEC, u_CSEC, u_MSEC ][dec];\n part.date = part.date | size;\n part.date_eval = true;\n part.sec_decimals = Math.max(part.sec_decimals, dec);\n add({ type: T_TYPE_SUBSEC, size: size, decimals: dec }, outputTokens);\n }\n\n else if (type === TOKEN_CALENDAR) {\n // signal date system (ignored if defined with [$-xxx])\n if (!haveLocale) {\n // Use Hijri calendar system\n if (token.value === 'B2' || token.value === 'b2') {\n // TODO: B2 does more than this\n // it switches locale to [$-060401] (ar) which affects display (RTL)\n part.date_system = EPOCH_1317;\n }\n // Use Gregorian calendar system\n else { // B1 | b1\n // signal date system (ignored if defined with [$-xxx])\n part.date_system = EPOCH_1900;\n }\n }\n }\n\n // hh:mm:ss YYYY-MM-DD\n else if (type === TOKEN_DATETIME) {\n // Excel is \"mostly\" case insensitive here except it checks the last used\n // date token. Which, if it was s or h, minutes is used. The same is true\n // if we hit m or s, and last is m.\n // m and mm are spurious, mmm is always month\n let bit: DateRenderToken | undefined;\n const value = token.value.toLowerCase(); // deal with in tokenizer?\n const startsWith = value[0];\n if (value === 'y' || value === 'yy') {\n bit = { type: T_TYPE_YEAR_S, size: u_YEAR };\n }\n else if (startsWith === 'y' || startsWith === 'e') {\n bit = { type: T_TYPE_YEAR, size: u_YEAR };\n }\n else if (value === 'b' || value === 'bb') {\n bit = { type: T_TYPE_B_YEAR_S, size: u_YEAR };\n }\n else if (startsWith === 'b') {\n bit = { type: T_TYPE_B_YEAR, size: u_YEAR };\n }\n else if (value === 'd' || value === 'dd') {\n bit = { type: T_TYPE_DAY, size: u_DAY, pad: value === 'dd' };\n }\n else if (value === 'ddd' || value === 'aaa') {\n bit = { type: T_TYPE_WEEKDAY_S, size: u_DAY };\n }\n else if (startsWith === 'd' || startsWith === 'a') {\n bit = { type: T_TYPE_WEEKDAY, size: u_DAY };\n }\n else if (startsWith === 'h') {\n bit = { type: T_TYPE_HOUR, size: u_HOUR, pad: value.length > 1 };\n }\n else if (startsWith === 'm') {\n if (value.length === 3) {\n bit = { type: T_TYPE_MNAME_S, size: u_MONTH };\n }\n else if (value.length === 5) {\n bit = { type: T_TYPE_MNAME_1, size: u_MONTH };\n }\n else if (value.length >= 4) {\n bit = { type: T_TYPE_MNAME, size: u_MONTH };\n }\n // m or mm can be either minute or month based on context\n const last_date_chunk = dateChunks[dateChunks.length - 1];\n if (!bit && last_date_chunk && !last_date_chunk.used && (last_date_chunk.size & (u_HOUR | u_SEC))) {\n // if this value follows hour or second, it is a minute\n last_date_chunk.used = true;\n bit = { type: T_TYPE_MIN, size: u_MIN, pad: value.length > 1 };\n }\n // if we still don't know, we treat as a month and defer, a later 'sec' value may switch it\n if (!bit) {\n bit = { type: T_TYPE_MON, size: u_MONTH, pad: value.length > 1, indeterminate: true };\n }\n }\n else if (startsWith === 's') {\n bit = { type: T_TYPE_SEC, size: u_SEC, pad: value.length > 1 };\n // if last date chunk was m, flag this used\n const last_date_chunk = dateChunks[dateChunks.length - 1];\n if (last_date_chunk && last_date_chunk.size & u_MIN) {\n bit.used = true;\n }\n // if last date chunk is undecided, we know that it is a minute\n else if (last_date_chunk && 'indeterminate' in last_date_chunk) {\n delete last_date_chunk.indeterminate;\n last_date_chunk.size = u_MIN;\n last_date_chunk.type = T_TYPE_MIN;\n bit.used = true;\n }\n }\n else if (startsWith === 'g') {\n // TODO: Don't know what this does? (yet!)\n }\n if (bit) {\n // signal date calc and track smallest needed unit\n part.date = part.date | bit.size;\n part.date_eval = true;\n dateChunks.push(bit);\n add(bit, outputTokens);\n }\n }\n\n // AM/PM\n // See: https://github.com/SheetJS/sheetjs/issues/676\n else if (type === TOKEN_AMPM) {\n part.clock = 12;\n part.date = part.date | u_HOUR;\n part.date_eval = true;\n add({ type, short: token.value === 'A/P' }, outputTokens);\n }\n\n // escaped character, string\n else if (type === TOKEN_STRING || type === TOKEN_ESCAPED || type === TOKEN_CHAR) {\n add(token.value, outputTokens);\n }\n\n // condition\n else if (type === TOKEN_CONDITION) {\n part.condition = [\n token.value[0], // operator\n parseFloat(token.value[1]) // operand\n ];\n }\n\n // locale code -- we extend to allow std. \"en-US\" style codes\n // https://stackoverflow.com/questions/54134729/what-does-the-130000-in-excel-locale-code-130000-mean/54540455#54540455\n else if (type === TOKEN_LOCALE) {\n const bits = token.value.split('-');\n const code = bits.length < 2 ? '' : bits.slice(1).join('-');\n\n const currency = bits[0];\n if (currency) {\n add(currency, outputTokens);\n }\n\n const l4e = resolveLocale(code);\n if (l4e) { part.locale = l4e; }\n const wincode = parseInt(code, 16);\n if (isFinite(wincode) && (wincode & 0xff0000)) {\n const cal = (wincode >> 16) & 0xff;\n // only Hijri is supported atm.\n if (cal === 6) {\n part.date_system = EPOCH_1317;\n }\n }\n\n haveLocale = true; // ignore any B2 & B1 tokens\n }\n\n // color\n else if (type === TOKEN_COLOR) {\n let cm: RegExpExecArray | null;\n let v = token.value.toLowerCase();\n if ((cm = /^color\\s*(\\d+)$/i.exec(v))) {\n v = parseInt(cm[1], 10);\n }\n part.color = v;\n }\n\n // percentage\n else if (type === TOKEN_PERCENT) {\n part.scale = 100;\n part.percent = true;\n add('%', outputTokens);\n }\n\n // decimal fraction\n else if (type === TOKEN_POINT) {\n add({ type, value: token.value }, outputTokens);\n if (!part.date) {\n part.dec_fractions = true;\n currentPattern = T_TYPE_FRAC;\n }\n }\n\n // exponent\n else if (type === TOKEN_EXP) {\n // Exponent pattern requires symbol to directly follow \"E\" but the\n // signature symbol, however, prefixes the first digit of the mantissa\n part.exponential = true;\n const plus = token.value.includes('+');\n part.exp_plus = plus;\n currentPattern = T_TYPE_MAN;\n add({ type: TOKEN_EXP, plus }, outputTokens);\n }\n\n // skip width\n else if (type === TOKEN_SKIP) {\n add({ type, value: token.value }, outputTokens);\n }\n\n // fill space with next char\n else if (type === TOKEN_FILL) {\n add({ type, value: token.value }, outputTokens);\n }\n\n else if (type === TOKEN_DBNUM) {\n // UNSUPPORTED:\n // - DBNum1 = NatNum4\n // - DBNum2 = NatNum5\n // - DBNum3 = either NatNum6 or NatNum3?\n // - DBNum3 = NatNum10\n const n = parseInt(token.value.slice(5));\n if (n < 1 || n > 4) {\n throw new SyntaxError('Unknown modifier: ' + token.value);\n }\n }\n\n else if (type === TOKEN_NATNUM) {\n // NatNum: https://www.openoffice.org/api/docs/common/ref/com/sun/star/i18n/NativeNumberMode.html\n throw new SyntaxError('Unknown modifier: ' + token.value);\n }\n\n else if (type === TOKEN_MODIFIER) {\n throw new SyntaxError('Unknown modifier: ' + token.value);\n }\n\n else if (type === TOKEN_ERROR) {\n throw new SyntaxError(`Illegal character: ${patternSource}`);\n }\n\n else {\n throw new SyntaxError(`Unknown token ${type} in ${patternSource}`);\n }\n\n // advance parser\n last = token;\n }\n part.tokensUsed = index;\n part.pattern = patternSource;\n\n // Make sure we don't have an illegal pattern. We could support some of this\n // but we side with Excel and don't because they make no sense.\n if (\n (part.fractions && part.dec_fractions) ||\n (part.grouping && !part.int_pattern.length) ||\n (part.fractions && part.exponential) ||\n (part.fractions && (part.den_pattern.length * part.num_pattern.length) === 0) ||\n (haveSlash && !part.fractions && !part.date) ||\n (part.exponential && ((part.int_pattern.length || part.frac_pattern.length) * part.man_pattern.length) === 0)\n ) {\n throw new SyntaxError(`Invalid pattern: ${patternSource}`);\n }\n\n const intPattern = part.int_pattern.join('');\n const manPattern = part.man_pattern.join('');\n const fracPattern = part.frac_pattern.join('');\n part.int_max = intPattern.length;\n part.int_min = countNonHash(intPattern);\n\n let min = 0;\n for (let i = 0; i < intPattern.length; i++) {\n const ch = intPattern[intPattern.length - 1 - i];\n if (/^[0-9?]/.test(ch)) {\n min = i + 1;\n }\n }\n part.int_min = min;\n part.frac_max = fracPattern.length;\n\n let num_pat = part.num_pattern.join('');\n // let den_pat = part.den_pattern.join('');\n let den_pat = part.den_pattern[0] || '';\n const enforce_padded = den_pat.includes('?') || num_pat.includes('?');\n // numerical denominator padding type is inherited from numerator padding type\n if (enforce_padded) {\n den_pat = den_pat.replace(/\\d/g, '?');\n den_pat = den_pat.replace(/#$/g, '?');\n part.num_min = countNonHash(num_pat);\n part.den_max = den_pat.length;\n part.den_min = countNonHash(den_pat);\n num_pat = num_pat.replace(/#$/g, '?');\n }\n else {\n part.num_min = countNonHash(num_pat);\n part.den_max = den_pat.length;\n part.den_min = countNonHash(den_pat);\n }\n\n part.int_p = intPattern;\n part.man_p = manPattern;\n part.num_p = num_pat;\n part.den_p = den_pat;\n\n if (part.den_pattern.length) {\n // detect and set rounding factor for denominator\n part.denominator = parseInt(part.den_pattern.join('').replace(/\\D/g, ''), 10);\n }\n\n part.integer = !!intPattern.length;\n\n if (!part.integer && !part.exponential && fracPattern.length) {\n // if no integer has been found, we inject one\n const pointIdx = part.tokens.findIndex(d => d.type === TOKEN_POINT);\n part.tokens.splice(pointIdx, 0, { type: T_TYPE_INT, num: '#' });\n part.integer = true;\n part.int_pattern = [ '#' ];\n part.int_p = '#';\n }\n\n // empty token list means that this is likely a directive only pattern (`[black]`)\n // in which case we need to inject a general token\n if (!part.tokens.length && /^\\[(?!\\$)/.test(part.pattern)) {\n part.general = true;\n add({ type: TOKEN_GENERAL }, outputTokens);\n }\n\n // extra whitespace rules for vulgar fractions\n if (part.fractions) {\n // fragment bits affect surrounding whitespace\n // if either bit is \"#\", the whitespace around it, and\n // the div symbol, is removed if the bit is not shown\n for (let i = 0; i < outputTokens.length - 1; i++) {\n const tok = outputTokens[i];\n if (tok.type !== TOKEN_STRING && tok.type !== TOKEN_SPACE) {\n continue;\n }\n const nextType = outputTokens[i + 1].type;\n if (nextType === T_TYPE_NUM) {\n tok.rule = 'num+int';\n }\n else if (nextType === T_TYPE_DIV) {\n tok.rule = 'num';\n }\n else if (nextType === T_TYPE_DEN) {\n tok.rule = 'den';\n }\n }\n }\n\n // if the number is fragmented, grouping should not be applied\n if (part.grouping) {\n if (part.int_pattern.length > 1) {\n part.grouping = false;\n }\n }\n\n return part;\n}\n","export function clamp (num: number): number {\n if (num === 0) {\n return num;\n }\n const d = Math.ceil(Math.log10(num < 0 ? -num : num));\n const mag = 10 ** (16 - Math.floor(d));\n return isFinite(mag) ? Math.round(num * mag) / mag : 0;\n}\n","// https://web.archive.org/web/20110813042636/http://homepage.smc.edu/kennedy_john/DEC2FRAC.PDF\nconst PRECISION = 1e-13;\n\n/**\n * Split a fractional number into a numerator and denominator for display as\n * vulgar fractions.\n *\n * @internal\n * @param number The value to split\n * @param [numeratorMaxDigits=2] The maxdigits number\n * @param [denominatorMaxDigits=2] The maxdigits de\n * @returns Tuple of two numbers, numerator and denominator.\n */\nexport function dec2frac (\n number: number,\n numeratorMaxDigits: number = 2,\n denominatorMaxDigits: number = 2\n): [ number, number ] {\n const sign = (number < 0) ? -1 : 1;\n const maxdigits_n = 10 ** (numeratorMaxDigits || 2);\n const maxdigits_d = 10 ** (denominatorMaxDigits || 2);\n let z = Math.abs(number);\n let last_d = 0;\n let last_n = 0;\n let curr_n = 0;\n let curr_d = 1;\n let tmp: number;\n let r: [ number, number ];\n number = z;\n if (number % 1 === 0) {\n // handles exact integers including 0\n r = [ number * sign, 1 ];\n }\n else if (number < 1e-19) {\n r = [ sign, 1e+19 ];\n }\n else if (number > 1e+19) {\n r = [ 1e+19 * sign, 1 ];\n }\n else {\n do {\n z = 1 / (z - Math.floor(z));\n tmp = curr_d;\n curr_d = (curr_d * Math.floor(z)) + last_d;\n last_d = tmp;\n last_n = curr_n;\n curr_n = Math.floor(number * curr_d + 0.5); // round\n if (curr_n >= maxdigits_n || curr_d >= maxdigits_d) {\n return [ sign * last_n, last_d ];\n }\n }\n while (Math.abs(number - (curr_n / curr_d)) >= PRECISION && z !== Math.floor(z));\n r = [ sign * curr_n, curr_d ];\n }\n return r;\n}\n","export function getExponent (num: number, int_max = 0): number {\n const exp = Math.floor(Math.log10(num));\n return (int_max > 1)\n ? Math.floor(exp / int_max) * int_max\n : exp;\n}\n\nexport function getSignificand (n: number, exp = 1): number {\n if (exp < -300) {\n return parseFloat(n.toExponential().split('e')[0]);\n }\n return n * (10 ** -exp);\n}\n","import { round } from './round.ts';\n\nexport type NumInfo = {\n total: number,\n sign: number,\n digits: number,\n period: number,\n int: number,\n frac: number\n};\n\nconst zero: NumInfo = {\n total: 1,\n sign: 0,\n digits: 1,\n period: 0,\n int: 1,\n frac: 0\n};\n\n// returns the count of digits (including - and .) needed to represent the number\nexport default function numdec (value: number, incl_sign = true): NumInfo {\n const v = Math.abs(value);\n\n // shortcut zero\n if (!v) { return zero; }\n\n const signSize = (incl_sign && value < 0) ? 1 : 0;\n const intPart = Math.floor(v);\n const intSize = Math.floor(Math.log10(v) + 1);\n let periodSize = 0;\n let fracSize = 0;\n\n // is not an integer\n if (intPart !== v) {\n periodSize = 1;\n\n // B: this has turned out to be much faster than all pure math\n // based solutions I was able to come up with ¯\\_(ツ)_/¯\n const n = String(\n round(v * (10 ** -intSize), 15)\n );\n let f = n.length;\n let z = true;\n let i = 0;\n while (i <= n.length) {\n if (n[i] === '.') {\n // discount period\n f--;\n break;\n }\n else if (n[i] === '0' && z) {\n // leading zeros before period are discounted\n f--;\n }\n else {\n // non-zero digit\n z = false;\n }\n i++;\n }\n fracSize = f - intSize;\n\n if (fracSize < 0) {\n // the number is not representable [by Excel]\n // this would be something like 1000.0000000000001\n // it would normally get truncated to 15 significant figures and\n // end up in the same place as the following does:\n fracSize = 0;\n periodSize = 0;\n }\n }\n\n return {\n total: signSize + Math.max(intSize, 1) + periodSize + fracSize,\n digits: Math.max(intSize, 0) + fracSize,\n sign: signSize,\n period: periodSize,\n int: Math.max(intSize, 1),\n frac: fracSize\n };\n}\n","import type { LocaleData } from './locale.ts';\nimport { getExponent, getSignificand } from './numberProps.ts';\nimport numdec from './numdec.ts';\nimport { round } from './round.ts';\n\nconst fixLocale = (s: string, l10n: LocaleData): string => {\n return s.replace(/\\./, l10n.decimal);\n};\n\nconst getExp = (n: number, exp: number, l10n: LocaleData): [ string, string, string, string, number ] => {\n const x = Math.abs(exp);\n let m: number;\n if (n === 1) {\n m = n;\n }\n else {\n m = round(n, 5);\n }\n return [\n fixLocale(m + '', l10n),\n l10n.exponent,\n (exp < 0 ? l10n.negative : l10n.positive),\n x < 10 ? '0' : '',\n x\n ];\n};\n\nexport function general (ret: (string | number)[], value: number | string, l10n: LocaleData) {\n if (typeof value === 'string') {\n // special case for: [<-25]General;[>25]General;General;General\n ret.push(value);\n }\n else {\n const int = value | 0;\n if (value === int) {\n ret.push(Math.abs(int));\n }\n else {\n const v = Math.abs(value);\n let exp = getExponent(v);\n let n = getSignificand(v, exp);\n if (n === 10) {\n n = 1;\n exp++;\n }\n\n // The application shall attempt to display the full number\n // up to 11 digits (inc. decimal point).\n const num_dig = numdec(v);\n if (exp >= -4 && exp <= -1) {\n const o = v.toPrecision(10 + exp).replace(/\\.?0+$/, '');\n ret.push(fixLocale(o, l10n));\n }\n else if (exp === 10) {\n const o = v.toFixed(10)\n .slice(0, 12)\n .replace(/\\.$/, '');\n ret.push(fixLocale(o, l10n));\n }\n else if (Math.abs(exp) <= 9) {\n if (num_dig.total <= 11) {\n const o = round(v, 9).toFixed(num_dig.frac);\n ret.push(fixLocale(o, l10n));\n }\n else if (exp === 9) {\n ret.push(Math.floor(v));\n }\n else if (exp >= 0 && exp < 9) {\n ret.push(fixLocale(String(round(v, 9 - exp)), l10n));\n }\n else {\n ret.push(...getExp(n, exp, l10n));\n }\n }\n else if (num_dig.total >= 12) {\n ret.push(...getExp(n, exp, l10n));\n }\n else {\n ret.push(fixLocale(round(v, 9).toFixed(num_dig.frac), l10n));\n }\n }\n }\n\n return ret;\n}\n","/**\n * @internal\n * @param c Instruction character ('#' | '?' | '0')\n * @param Use nonbreaking space or not?\n * @returns Padding character\n */\nexport function pad (c: string, nbsp = false): string {\n if (c === '0') {\n return '0';\n }\n else if (c === '?') {\n return nbsp ? '\\u00a0' : ' ';\n }\n return '';\n}\n","import { round } from './round.ts';\nimport { clamp } from './clamp.ts';\nimport { dec2frac } from './dec2frac.ts';\nimport { general } from './general.ts';\nimport { toYMD } from './toYMD.ts';\nimport { defaultLocale, type LocaleData } from './locale.ts';\nimport {\n u_DSEC, u_CSEC, u_MSEC,\n EPOCH_1317,\n MIN_S_DATE, MAX_S_DATE,\n MIN_L_DATE, MAX_L_DATE,\n TOKEN_STRING,\n TOKEN_SPACE,\n TOKEN_POINT,\n TOKEN_ERROR,\n TOKEN_GENERAL,\n TOKEN_EXP,\n TOKEN_MINUS,\n TOKEN_PLUS,\n TOKEN_SKIP,\n TOKEN_FILL,\n TOKEN_TEXT,\n T_TYPE_DIV,\n T_TYPE_INT,\n T_TYPE_FRAC,\n T_TYPE_NUM,\n T_TYPE_DEN,\n T_TYPE_MAN,\n TOKEN_AMPM,\n T_TYPE_YEAR,\n T_TYPE_YEAR_S,\n T_TYPE_MON,\n T_TYPE_MNAME_1,\n T_TYPE_MNAME_S,\n T_TYPE_MNAME,\n T_TYPE_WEEKDAY_S,\n T_TYPE_WEEKDAY,\n T_TYPE_DAY,\n T_TYPE_HOUR,\n T_TYPE_MIN,\n T_TYPE_SEC,\n T_TYPE_SUBSEC,\n T_TYPE_HOUR_E,\n T_TYPE_MIN_E,\n T_TYPE_SEC_E,\n T_TYPE_B_YEAR,\n T_TYPE_B_YEAR_S\n} from './constants.ts';\nimport { pad } from './pad.ts';\nimport { getExponent, getSignificand } from './numberProps.ts';\nimport type { Partition } from './types.ts';\nimport type { FormatOptions } from './options.ts';\n\nconst DAYSIZE = 86400;\nconst CHAR_0 = 48;\nconst CHAR_9 = 57;\n\nconst dateOverflows = (inputValue: number, roundedValue: number, bigRange: boolean) => {\n if (bigRange) {\n return (inputValue < MIN_L_DATE || roundedValue >= MAX_L_DATE);\n }\n return (inputValue < MIN_S_DATE || roundedValue >= MAX_S_DATE);\n};\n\nexport function runPart (value: number | string | bigint, part: Partition, opts: FormatOptions, l10n_?: LocaleData) {\n let mantissa = '';\n let mantissa_sign = '';\n let numerator = '';\n let denominator = '';\n let fraction = '';\n let integer = '';\n let exp = 0;\n\n let date = 0;\n if (typeof value === 'bigint') {\n if (value <= Number.MAX_SAFE_INTEGER && value >= Number.MIN_SAFE_INTEGER) {\n value = Number(value);\n }\n else {\n return opts.bigintErrorNumber\n ? String(value)\n : opts.overflow;\n }\n date = value;\n }\n else if (typeof value === 'number') {\n date = Math.trunc(value);\n }\n let time = 0;\n let year = 0;\n let month = 1;\n let day = 0;\n let weekday = 0;\n let hour = 0;\n let minute = 0;\n let second = 0;\n let subsec = 0;\n\n const l10n = l10n_ || defaultLocale;\n\n // scale number\n if (!part.text && isFinite(part.scale) && part.scale !== 1 && typeof value === 'number') {\n value = clamp(value * part.scale);\n }\n\n // calc exponent\n if (part.exponential && typeof value === 'number') {\n let v = Math.abs(value);\n if (v) {\n exp = getExponent(v, part.int_max);\n }\n if (value && !part.integer) {\n // when there isn't an integer part, the exp gets shifted by 1\n exp++;\n }\n v = getSignificand(v, exp);\n if (part.int_max === 1 && round(v, part.frac_max) === 10) {\n v = 1;\n exp++;\n }\n value = (value < 0) ? -v : v;\n mantissa += Math.abs(exp);\n }\n\n // integer to text\n if (part.integer && typeof value === 'number') {\n const i = Math.abs(round(value, part.fractions ? 1 : part.frac_max));\n integer += (i < 1) ? '' : Math.floor(i);\n }\n // integer grouping\n const group_pri = opts.grouping[0] ?? 3;\n const group_sec = opts.grouping[1] ?? group_pri;\n\n // fraction to text\n if (part.dec_fractions && typeof value === 'number') {\n fraction = String(round(value, part.frac_max)).split('.')[1] || '';\n }\n\n // using vulgar fractions\n const fixed_slash = !part.error && (part.num_p.includes('0') || part.den_p.includes('0'));\n\n let have_fraction = fixed_slash;\n if (part.fractions && typeof value === 'number') {\n have_fraction = fixed_slash || !!(value % 1);\n const _dec = Math.abs(part.integer ? value % 1 : value);\n if (_dec) {\n have_fraction = true;\n if (part.denominator && isFinite(part.denominator)) {\n // predefined denominator\n denominator += part.denominator;\n numerator += round(_dec * part.denominator);\n if (numerator === '0') {\n numerator = '';\n denominator = '';\n have_fraction = fixed_slash;\n }\n }\n else {\n const frt = dec2frac(_dec, Infinity, part.den_max);\n numerator += frt[0];\n denominator += frt[1];\n if (part.integer && numerator === '0') {\n numerator = '';\n denominator = '';\n have_fraction = fixed_slash;\n }\n }\n }\n else if (!value && !part.integer) {\n have_fraction = true;\n numerator = '0';\n denominator = '1';\n }\n if (part.integer && !have_fraction && !Math.trunc(value)) {\n integer = '0';\n }\n }\n\n // using date/time\n if (part.date && typeof value === 'number') {\n date = Math.trunc(value);\n const t = DAYSIZE * (value - date);\n time = Math.floor(t); // in seconds\n // \"epsilon\" correction\n subsec = t - time;\n if (Math.abs(subsec) < 1e-6) { // 0.000001\n subsec = 0;\n }\n else if (subsec > 0.9999) {\n subsec = 0;\n time += 1;\n if (time === DAYSIZE) {\n time = 0;\n date += 1;\n }\n }\n if (subsec) {\n // round time based on smallest used unit\n const minU = part.date & u_MSEC || part.date & u_CSEC || part.date & u_DSEC;\n if (\n (minU === u_MSEC && subsec > 0.9995) ||\n (minU === u_CSEC && subsec > 0.995) ||\n (minU === u_DSEC && subsec > 0.95) ||\n (!minU && subsec >= 0.5)\n ) {\n time++;\n subsec = 0;\n }\n }\n // serial date/time to gregorian calendar\n if (date || part.date_system) {\n const dout = toYMD(value, part.date_system, opts.leap1900);\n year = dout[0];\n month = dout[1];\n day = dout[2];\n }\n if (time) {\n const x = (time < 0) ? DAYSIZE + time : time;\n second = Math.floor(x) % 60;\n minute = Math.floor(x / 60) % 60;\n hour = Math.floor((x / 60) / 60) % 60;\n }\n weekday = (6 + date) % 7;\n if (part.date_eval && dateOverflows(value, date + (time / DAYSIZE), opts.dateSpanLarge)) {\n // if value is out of bounds and formatting is date Excel emits a\n // stream of \"######\" that fills the cell width.\n // This doesn't happen, if the only date tokens are \"elapsed time\" tokens.\n // Code instead follows the TEXT function which emits a #VALUE! error.\n if (opts.dateErrorThrows) {\n throw new Error('Date out of bounds');\n }\n if (opts.dateErrorNumber) {\n const _ret = value < 0 ? [ l10n.negative ] : [];\n return general(_ret, value, l10n).join('');\n }\n return opts.overflow;\n }\n }\n\n const padQ = pad('?', opts.nbsp);\n\n // mantissa sign\n if (exp < 0) {\n mantissa_sign = '-';\n }\n else if (part.exp_plus) {\n mantissa_sign = '+';\n }\n\n const ret = [];\n\n const digitsStart = (numstr: string, pattern: string, prt: string, offset: number) => {\n const l = (!offset && numstr.length > pattern.length)\n ? prt.length + numstr.length - pattern.length\n : prt.length;\n if (numstr.length < pattern.length) {\n offset += numstr.length - pattern.length;\n }\n for (let i = 0; i < l; i++) {\n ret.push(numstr[i + offset] || pad(prt[i], opts.nbsp));\n }\n return l;\n };\n\n let denominator_fixed = false;\n const counter = { int: 0, frac: 0, man: 0, num: 0, den: 0 };\n for (let ti = 0, tl = part.tokens.length; ti < tl; ti++) {\n const tok = part.tokens[ti];\n const tokenType = tok.type;\n const len = 'num' in tok ? tok.num.length : 0;\n if (tokenType === TOKEN_STRING) {\n // special rules may apply if next or prev is numerator or denominator\n const rule = tok.rule;\n if (rule) {\n if (\n (rule === 'num' && have_fraction) ||\n (rule === 'num+int' && have_fraction && integer) ||\n (rule === 'den' && have_fraction)\n ) {\n ret.push(tok.value.replaceAll(' ', padQ));\n }\n else if (\n (rule === 'num' && part.num_min > 0 || part.den_min > 0) ||\n (rule === 'num+int' && part.den_min > 0 && (integer || part.num_min)) ||\n (rule === 'den' && part.den_min > 0 || part.den_min > 0)\n ) {\n ret.push(padQ.repeat(tok.value.length));\n }\n }\n else {\n ret.push(tok.value.replaceAll(' ', padQ));\n }\n }\n else if (tokenType === TOKEN_SPACE) {\n if (tok.rule === 'num+int') {\n if (\n (have_fraction || part.num_min || part.den_min) &&\n (integer || part.num_min)\n ) {\n ret.push(padQ);\n }\n }\n else {\n ret.push(padQ);\n }\n }\n else if (tokenType === TOKEN_ERROR) {\n // token used to define invalid pattern\n ret.push(opts.invalid);\n }\n else if (tokenType === TOKEN_POINT) {\n // Excel always emits a period: TEXT(0, \"#.#\") => \".\"\n ret.push(part.date ? tok.value : l10n.decimal);\n }\n else if (tokenType === TOKEN_GENERAL) {\n general(ret, value, l10n);\n }\n else if (tokenType === TOKEN_EXP) {\n ret.push(l10n.exponent);\n }\n else if (tokenType === TOKEN_MINUS) {\n if (tok.volatile && part.date) {\n // don't emit the prepended minus if this is a date\n }\n else if (tok.volatile && (typeof value !== 'number' || value >= 0)) {\n // don't emit volatile minus for positive numbers\n }\n else if (tok.volatile && !part.fractions && (part.integer || part.dec_fractions)) {\n // minus is only shown if there is a non-zero digit present\n if (typeof value === 'number' && value < 0 && (integer && integer !== '0') || fraction) {\n ret.push(l10n.negative);\n }\n }\n else {\n ret.push(l10n.negative);\n }\n }\n else if (tokenType === TOKEN_PLUS) {\n ret.push(l10n.positive);\n }\n else if (tokenType === TOKEN_TEXT) {\n ret.push(value);\n }\n else if (tokenType === TOKEN_FILL) {\n // If user has provided a token to signal that next char is a fill char,\n // then emit the that plus the fill char. By default this does what the\n // TEXT function does in this case: Emits nothing.\n if (opts.fillChar) {\n ret.push(opts.fillChar, tok.value);\n }\n }\n else if (tokenType === TOKEN_SKIP) {\n // If user has provided a token to signal that next char is a fill char,\n // then emit the that plus the fill char. By default this does what the\n // TEXT function does in this case: Emits a space.\n if (opts.skipChar) {\n ret.push(opts.skipChar, tok.value);\n }\n else {\n ret.push(opts.nbsp ? '\\u00a0' : ' ');\n }\n }\n else if (tokenType === T_TYPE_DIV) {\n if (have_fraction) {\n ret.push('/');\n }\n else if (part.num_min > 0 || part.den_min > 0) {\n ret.push(padQ);\n }\n else {\n ret.push(pad('#', opts.nbsp));\n }\n }\n else if (tokenType === T_TYPE_INT) {\n // number isn't fragmented\n if (part.int_pattern.length === 1) {\n const pt = part.int_p;\n const l = Math.max(part.int_min, integer.length);\n let digits = '';\n for (let i = l; i > 0; i--) {\n const d = integer.charAt(integer.length - i);\n const p = d ? '' : pt.charAt(pt.length - i) || pt[0];\n let sep = '';\n if (part.grouping) {\n const n = (i - 1) - group_pri;\n if (n >= 0 && !(n % group_sec)) {\n sep = (d || p === '0')\n ? l10n.group\n : pad('?', opts.nbsp);\n }\n }\n digits += (d || pad(p, opts.nbsp)) + sep;\n }\n ret.push(digits);\n }\n else {\n counter.int += digitsStart(integer, part.int_p, tok.num, counter.int);\n }\n }\n else if (tokenType === T_TYPE_FRAC) {\n const o = counter.frac;\n for (let i = 0; i < len; i++) {\n ret.push(fraction[i + o] || pad(tok.num[i], opts.nbsp));\n }\n counter.frac += len;\n }\n else if (tokenType === T_TYPE_MAN) {\n // mantissa sign is attached to the first digit, not the exponent symbol\n // \"0E+ 0\" will print as \"1E +12\"\n if (!counter.man) {\n ret.push(mantissa_sign);\n }\n counter.man += digitsStart(mantissa, part.man_p, tok.num, counter.man);\n }\n else if (tokenType === T_TYPE_NUM) {\n counter.num += digitsStart(numerator, part.num_p, tok.num, counter.num);\n }\n else if (tokenType === T_TYPE_DEN) {\n const o = counter.den;\n for (let i = 0; i < len; i++) {\n let digit = denominator[i + o];\n if (!digit) {\n const c = tok.num.charCodeAt(i);\n if ((c > CHAR_0 && c <= CHAR_9) || (denominator_fixed && c === CHAR_0)) {\n denominator_fixed = true;\n digit = opts.nbsp ? '\\u00a0' : ' ';\n }\n else if (\n !denominator_fixed &&\n (i === len - 1) &&\n c === CHAR_0 &&\n !denominator\n ) {\n digit = '1';\n }\n else {\n digit = pad(tok.num[i], opts.nbsp);\n }\n }\n ret.push(digit);\n }\n counter.den += len;\n }\n else if (tokenType === T_TYPE_YEAR) {\n if (year < 0) { ret.push(l10n.negative); }\n ret.push(String(Math.abs(year)).padStart(4, '0'));\n }\n else if (tokenType === T_TYPE_YEAR_S) {\n const y = year % 100;\n ret.push(y < 10 ? '0' : '', y);\n }\n else if (tokenType === T_TYPE_MON) {\n ret.push((tok.pad && month < 10 ? '0' : ''), month);\n }\n else if (tokenType === T_TYPE_MNAME_1) {\n // This is what Excel does.\n // The Vietnamese list goes:\n // from [\"Tháng 1\", \"Tháng 2\", ... ] to [ \"T\", \"T\", ... ]\n // Simplified Chinese goes:\n // from [ 1月, ... 9月, 10月, 11月, 12月 ] to [ 1, ... 9, 1, 1, 1 ]\n if (part.date_system === EPOCH_1317) {\n ret.push(l10n.mmmm6[month - 1].charAt(0));\n }\n else {\n ret.push(l10n.mmmm[month - 1].charAt(0));\n }\n }\n else if (tokenType === T_TYPE_MNAME_S) {\n if (part.date_system === EPOCH_1317) {\n ret.push(l10n.mmm6[month - 1]);\n }\n else {\n ret.push(l10n.mmm[month - 1]);\n }\n }\n else if (tokenType === T_TYPE_MNAME) {\n if (part.date_system === EPOCH_1317) {\n ret.push(l10n.mmmm6[month - 1]);\n }\n else {\n ret.push(l10n.mmmm[month - 1]);\n }\n }\n else if (tok.type === T_TYPE_WEEKDAY_S) {\n ret.push(l10n.ddd[weekday]);\n }\n else if (tokenType === T_TYPE_WEEKDAY) {\n ret.push(l10n.dddd[weekday]);\n }\n else if (tokenType === T_TYPE_DAY) {\n ret.push((tok.pad && day < 10 ? '0' : ''), day);\n }\n else if (tokenType === T_TYPE_HOUR) {\n const h = hour % part.clock || (part.clock < 24 ? part.clock : 0);\n ret.push((tok.pad && h < 10 ? '0' : ''), h);\n }\n else if (tokenType === T_TYPE_MIN) {\n ret.push((tok.pad && minute < 10 ? '0' : ''), minute);\n }\n else if (tokenType === T_TYPE_SEC) {\n ret.push((tok.pad && second < 10 ? '0' : ''), second);\n }\n else if (tokenType === T_TYPE_SUBSEC) {\n ret.push(l10n.decimal);\n // decimals is pre-determined by longest subsec token\n // but the number emitted is per-token\n const f = subsec.toFixed(part.sec_decimals);\n ret.push(f.slice(2, 2 + tok.decimals));\n }\n else if (tokenType === TOKEN_AMPM) {\n const idx = hour < 12 ? 0 : 1;\n if (tok.short && !l10n_) {\n ret.push('AP'[idx]);\n }\n else {\n ret.push(l10n.ampm[idx]);\n }\n }\n else if (tokenType === T_TYPE_HOUR_E && typeof value === 'number') {\n if (value < 0) {\n ret.push(l10n.negative);\n }\n const hh = (date * 24) + Math.floor(Math.abs(time) / (60 * 60));\n ret.push(String(Math.abs(hh)).padStart(tok.pad, '0'));\n }\n else if (tokenType === T_TYPE_MIN_E && typeof value === 'number') {\n if (value < 0) {\n ret.push(l10n.negative);\n }\n const mm = (date * 1440) + Math.floor(Math.abs(time) / 60);\n ret.push(String(Math.abs(mm)).padStart(tok.pad, '0'));\n }\n else if (tokenType === T_TYPE_SEC_E && typeof value === 'number') {\n if (value < 0) {\n ret.push(l10n.negative);\n }\n const ss = (date * DAYSIZE) + Math.abs(time);\n ret.push(String(Math.abs(ss)).padStart(tok.pad, '0'));\n }\n else if (tokenType === T_TYPE_B_YEAR) {\n ret.push(year + 543);\n }\n else if (tokenType === T_TYPE_B_YEAR_S) {\n const y = (year + 543) % 100;\n ret.push(y < 10 ? '0' : '', y);\n }\n }\n return ret.join('');\n}\n","import { TOKEN_TEXT, indexColors } from './constants.ts';\nimport { defaultLocale, getLocale } from './locale.ts';\nimport type { FormatOptions } from './options.ts';\nimport { parseFormatSection } from './parseFormatSection.ts';\nimport { runPart } from './runPart.ts';\nimport type { Partition, PatternParseData } from './types.ts';\n\nconst default_text = parseFormatSection([\n { type: TOKEN_TEXT, value: '@', raw: '@' }\n]);\n\nfunction getPart (value: string | number | bigint, parts: Partition[]): Partition | undefined {\n for (let pi = 0; pi < 3; pi++) {\n const part = parts[pi];\n if (part) {\n let cond = false;\n if (part.condition) {\n const operator = part.condition[0];\n const operand = part.condition[1];\n if (operator === '=') { cond = (value === operand); }\n else if (operator === '<>') { cond = (value !== operand); }\n else if (typeof value === 'string') { cond = false; }\n else if (operator === '>') { cond = (value > operand); }\n else if (operator === '<') { cond = (value < operand); }\n else if (operator === '>=') { cond = (value >= operand); }\n else if (operator === '<=') { cond = (value <= operand); }\n }\n else {\n cond = true;\n }\n if (cond) {\n return part;\n }\n }\n }\n return undefined;\n}\n\nexport function formatColor (\n value: unknown,\n parseData: PatternParseData,\n opts: Pick\n): string | number | undefined {\n const parts = parseData.partitions;\n let part: Partition | undefined = parts[3];\n let color: string | number | undefined;\n if ((typeof value === 'number' || typeof value === 'bigint') && Number.isFinite(value)) {\n part = getPart(value, parts);\n }\n if (part?.color) {\n color = part.color;\n }\n if (color && typeof color === 'number' && opts.indexColors) {\n color = indexColors[color - 1] || '#000';\n }\n return color;\n}\n\nexport function formatValue (\n value: unknown,\n parseData: PatternParseData,\n opts: FormatOptions\n): string {\n const parts = parseData.partitions;\n const l10n = getLocale(parseData.locale || opts.locale);\n const text_part = parts[3] ? parts[3] : default_text;\n // booleans get converted to string\n if (typeof value === 'boolean') {\n const loc = l10n || defaultLocale;\n value = loc.bool[value ? 0 : 1];\n }\n // null | undefined => ''\n if (value == null) {\n return '';\n }\n // anything other than (number | bigint) we'll format as text\n const n = typeof value === 'bigint';\n if (typeof value !== 'number' && !n) {\n return runPart(String(value), text_part, opts, l10n);\n }\n // guard against non-finite numbers:\n if (!n && !Number.isFinite(value)) {\n const loc = l10n || defaultLocale;\n if (Number.isNaN(value)) {\n return loc.nan;\n }\n return ((value as number) < 0 ? loc.negative : '') + loc.infinity;\n }\n // find and run the pattern part that applies to this number\n const v = value as number | string | bigint;\n const part = getPart(v, parts);\n return part ? runPart(v, part, opts, l10n) : opts.overflow;\n}\n","import { u_YEAR, u_MONTH, u_DAY, u_HOUR, u_MIN, u_SEC, reCurrencySymbols, TOKEN_STRING, T_TYPE_YEAR, T_TYPE_YEAR_S, T_TYPE_B_YEAR, T_TYPE_B_YEAR_S, T_TYPE_MON, T_TYPE_MNAME, T_TYPE_MNAME_S, T_TYPE_MNAME_1, T_TYPE_WEEKDAY, T_TYPE_WEEKDAY_S, T_TYPE_DAY, T_TYPE_HOUR, T_TYPE_MIN, T_TYPE_SEC, TOKEN_AMPM } from './constants.ts';\nimport type { FormatDateInfo, FormatInfo, Partition } from './types.ts';\n\nexport function isPercent (partitions: Partition[]): boolean {\n return !!(\n (partitions[0]?.percent) ||\n (partitions[1]?.percent) ||\n (partitions[2]?.percent) ||\n (partitions[3]?.percent)\n );\n}\n\nexport function isDate (partitions: Partition[]): boolean {\n return !!(\n (partitions[0]?.date) ||\n (partitions[1]?.date) ||\n (partitions[2]?.date) ||\n (partitions[3]?.date)\n );\n}\n\nexport function isText (partitions: Partition[]): boolean {\n const [ part1, part2, part3, part4 ] = partitions;\n return !!(\n (!part1 || part1.generated) &&\n (!part2 || part2.generated) &&\n (!part3 || part3.generated) &&\n part4?.text && !part4.generated\n );\n}\n\nconst level = {\n text: 15,\n datetime: 10.8,\n date: 10.8,\n time: 10.8,\n percent: 10.6,\n currency: 10.4,\n grouped: 10.2,\n scientific: 6,\n number: 4,\n fraction: 2,\n general: 0,\n error: 0\n};\n\nconst dateCodes = [\n [ 'DMY', 1 ],\n [ 'DM', 2 ],\n [ 'MY', 3 ],\n [ 'MDY', 4 ],\n [ 'MD', 5 ],\n [ 'hmsa', 6 ],\n [ 'hma', 7 ],\n [ 'hms', 8 ],\n [ 'hm', 9 ]\n];\n\nexport function info (partitions: Partition[], currencyId?: string): FormatInfo {\n const [ partPos, partNeg ] = partitions;\n const frac_max = partPos.frac_max;\n const output: FormatInfo = {\n type: 'general',\n isDate: isDate(partitions),\n isText: isText(partitions),\n isPercent: isPercent(partitions),\n maxDecimals: partPos.general ? 9 : frac_max,\n scale: partPos.scale ?? 1,\n color: 0,\n parentheses: 0,\n grouped: partPos.grouping ? 1 : 0,\n code: '',\n level: 0\n };\n\n // currency identifier may be passed in, but otherwise we report\n // if we find any known glyph in the tokens\n const isCurrency = (!output.isDate && !output.isText && !partPos.error) && partPos.tokens.some(tok => (\n tok.type === TOKEN_STRING &&\n (currencyId\n ? tok.value === currencyId\n : reCurrencySymbols.test(tok.value))\n ));\n\n let codeType = 'G';\n let codeNum = (frac_max >= 0) ? Math.min(15, frac_max) : '';\n let codeParens = '';\n let codeDash = '';\n\n if (partNeg?.color) {\n codeDash = '-';\n output.color = 1;\n }\n if (partPos.parens) {\n codeParens = '()';\n output.parentheses = 1;\n }\n\n if (isCurrency) {\n codeType = 'C';\n output.type = 'currency';\n }\n else if (partPos.error) {\n output.type = 'error';\n output.maxDecimals = 0;\n }\n else if (output.isDate) {\n let haveTime = 0;\n let haveDate = 0;\n let order = '';\n // This is equivalent to how Excel does this.\n // It has to get the order right but then ignores any trailing tokens.\n // So: \"mmm dd yyyy\" matches \"mdy\" = D4\n // But: \"mmm dd dd yyyy\" matches \"md\" = D5\n partPos.tokens.forEach(tok => {\n const type = tok.type;\n if (type === T_TYPE_YEAR || type === T_TYPE_YEAR_S || type === T_TYPE_B_YEAR || type === T_TYPE_B_YEAR_S) {\n order += 'Y';\n haveDate++;\n }\n else if (type === T_TYPE_MON || type === T_TYPE_MNAME || type === T_TYPE_MNAME_S || type === T_TYPE_MNAME_1) {\n order += 'M';\n haveDate++;\n }\n else if (type === T_TYPE_WEEKDAY || type === T_TYPE_WEEKDAY_S || type === T_TYPE_DAY) {\n order += 'D';\n haveDate++;\n }\n else if (type === T_TYPE_HOUR) {\n order += 'h';\n haveTime++;\n }\n else if (type === T_TYPE_MIN) {\n order += 'm';\n haveTime++;\n }\n else if (type === T_TYPE_SEC) {\n order += 's';\n haveTime++;\n }\n else if (type === TOKEN_AMPM) {\n order += 'a';\n haveTime++;\n }\n });\n output.type = 'date';\n if (haveDate && haveTime) {\n output.type = 'datetime';\n }\n else if (!haveDate && haveTime) {\n output.type = 'time';\n }\n const code = dateCodes.find(d => order.startsWith(d[0] as string));\n codeType = code ? 'D' : 'G';\n codeNum = code ? code[1] : '';\n }\n else if (output.isText) {\n codeType = 'G';\n output.type = 'text';\n codeNum = '';\n output.maxDecimals = 0;\n }\n else if (partPos.general) {\n codeType = 'G';\n output.type = 'general';\n codeNum = '';\n }\n else if (partPos.fractions) {\n codeType = 'G';\n output.type = 'fraction';\n codeNum = '';\n }\n else if (partPos.exponential) {\n codeType = 'S';\n output.type = 'scientific';\n }\n else if (output.isPercent) {\n codeType = 'P';\n output.type = 'percent';\n }\n else if (partPos.grouping) {\n codeType = ',';\n output.type = 'grouped';\n }\n else if (partPos.int_max || frac_max) {\n codeType = 'F';\n output.type = 'number';\n }\n\n output.code = codeType + codeNum + codeDash + codeParens;\n\n // Excel can combine some codes, but not all.\n // When integer value of two is equal and it can't combine,\n // the \"first\" one wins out.\n output.level = level[output.type];\n\n return output;\n}\n\nexport function dateInfo (partitions: Partition[]): FormatDateInfo {\n const [ partPos ] = partitions;\n const r: FormatDateInfo = {\n year: !!(partPos.date & u_YEAR),\n month: !!(partPos.date & u_MONTH),\n day: !!(partPos.date & u_DAY),\n hours: !!(partPos.date & u_HOUR),\n minutes: !!(partPos.date & u_MIN),\n seconds: !!(partPos.date & u_SEC),\n clockType: partPos.clock === 12 ? 12 : 24\n };\n return r;\n}\n","import {\n TOKEN_GENERAL, TOKEN_HASH, TOKEN_ZERO, TOKEN_QMARK, TOKEN_SLASH, TOKEN_GROUP, TOKEN_SCALE,\n TOKEN_COMMA, TOKEN_BREAK, TOKEN_TEXT, TOKEN_PLUS, TOKEN_MINUS, TOKEN_POINT, TOKEN_SPACE,\n TOKEN_PERCENT, TOKEN_DIGIT, TOKEN_CALENDAR, TOKEN_ERROR, TOKEN_DATETIME, TOKEN_DURATION,\n TOKEN_CONDITION, TOKEN_DBNUM, TOKEN_NATNUM, TOKEN_LOCALE, TOKEN_COLOR, TOKEN_MODIFIER,\n TOKEN_AMPM, TOKEN_ESCAPED, TOKEN_STRING, TOKEN_SKIP, TOKEN_EXP, TOKEN_FILL, TOKEN_PAREN,\n TOKEN_CHAR\n} from './constants.ts';\nimport type { Token, TokenType } from './types.ts';\n\nconst tokenHandlers: [ TokenType, RegExp, 0 | 1 | number[] ][] = [\n [ TOKEN_GENERAL, /^General/i, 0 ],\n [ TOKEN_HASH, /^#/, 0 ],\n [ TOKEN_ZERO, /^0/, 0 ],\n [ TOKEN_QMARK, /^\\?/, 0 ],\n [ TOKEN_SLASH, /^\\//, 0 ],\n // Commas are dealt with as a special case in the tokenizer but will end up\n // as one of these:\n // [ TOKEN_GROUP, /^(,),*/, 1 ],\n // [ TOKEN_SCALE, /^(,),*/, 1 ],\n // [ TOKEN_COMMA, /^(,),*/, 1 ],\n [ TOKEN_BREAK, /^;/, 0 ],\n [ TOKEN_TEXT, /^@/, 0 ],\n [ TOKEN_PLUS, /^\\+/, 0 ],\n [ TOKEN_MINUS, /^-/, 0 ],\n [ TOKEN_POINT, /^\\./, 0 ],\n [ TOKEN_SPACE, /^ /, 0 ],\n [ TOKEN_PERCENT, /^%/, 0 ],\n [ TOKEN_DIGIT, /^[1-9]/, 0 ],\n [ TOKEN_CALENDAR, /^(?:B[12])/i, 0 ],\n [ TOKEN_ERROR, /^B$/, 0 ], // pattern must not end in a \"B\"\n [ TOKEN_DATETIME, /^(?:[hH]+|[mM]+|[sS]+|[yY]+|[bB]+|[dD]+|[gG]+|[aA]{3,}|e+)/, 0 ],\n [ TOKEN_DURATION, /^(?:\\[(h+|m+|s+)\\])/i, 1 ],\n [ TOKEN_CONDITION, /^\\[(<[=>]?|>=?|=)\\s*(-?[.\\d]+)\\]/, [ 1, 2 ] ],\n [ TOKEN_DBNUM, /^\\[(DBNum[0-4]?\\d)\\]/i, 1 ],\n [ TOKEN_NATNUM, /^\\[(NatNum[0-4]?\\d)\\]/i, 1 ],\n [ TOKEN_LOCALE, /^\\[\\$([^\\]]+)\\]/, 1 ],\n [ TOKEN_COLOR, /^\\[(black|blue|cyan|green|magenta|red|white|yellow|color\\s*\\d+)\\]/i, 1 ],\n // conditionally allow these open ended directions?\n [ TOKEN_MODIFIER, /^\\[([^\\]]+)\\]/, 1 ],\n [ TOKEN_AMPM, /^(?:AM\\/PM|am\\/pm|A\\/P)/, 0 ],\n [ TOKEN_ESCAPED, /^\\\\(.)/, 1 ],\n [ TOKEN_STRING, /^\"([^\"]*?)\"/, 1 ],\n [ TOKEN_SKIP, /^_(\\\\.|.)/, 1 ],\n // Google Sheets and Excel diverge on \"e\": Excel only accepts E.\n [ TOKEN_EXP, /^[Ee]([+-])/, 1 ],\n [ TOKEN_FILL, /^\\*(\\\\.|.)/, 1 ],\n [ TOKEN_PAREN, /^[()]/, 0 ],\n [ TOKEN_ERROR, /^[EÈÉÊËèéêëĒēĔĕĖėĘęĚěȄȅȆȇȨȩNnÑñŃńŅņŇňǸǹ[\"*/\\\\_]/, 0 ],\n [ TOKEN_CHAR, /^./, 0 ]\n];\n\nconst CODE_QMRK = 63;\nconst CODE_HASH = 35;\nconst CODE_ZERO = 48;\nconst CODE_NINE = 57;\nconst isNumOp = (char: string) => {\n const c = (char || '\\0').charCodeAt(0);\n return (c === CODE_QMRK || c === CODE_HASH || (c >= CODE_ZERO && c <= CODE_NINE));\n};\n\n/**\n * Breaks a format pattern string into a list of tokens.\n *\n * The returned output will be an array of objects representing the tokens:\n *\n * ```js\n * [\n * { type: TOKEN_ZERO, value: '0', raw: '0' },\n * { type: TOKEN_POINT, value: '.', raw: '.' },\n * { type: TOKEN_ZERO, value: '0', raw: '0' },\n * { type: TOKEN_PERCENT, value: '%', raw: '%' }\n * ]\n * ```\n *\n * @param pattern The format pattern\n * @returns A list of tokens\n */\nexport function tokenize (pattern: string): Token[] {\n let i = 0;\n const tokens: Token[] = [];\n const unresolvedCommas = [];\n while (i < pattern.length) {\n const curr = pattern.slice(i);\n let step = 0;\n // A comma is context sensitive and needs to be handled as a special case.\n // This needs to happen in the tokenizer because to be able to re-localize\n // the pattern we'll need to know what each comma means.\n const mComma = /^(,+)(.)?/.exec(curr);\n if (mComma) {\n // comma depends on what it follows\n const raw = mComma[1];\n step = raw.length;\n const lookBehind = pattern[i - 1] || '';\n let maybeGROUP = false;\n let maybeSCALE = false;\n if (isNumOp(lookBehind)) { // 0-9, '#', or '?': may be GROUP or SCALE\n maybeGROUP = true;\n maybeSCALE = true;\n }\n else if (lookBehind === '.') { // '.': may be SCALE only\n maybeSCALE = true;\n }\n // if at the end of the pattern or section, then this can't be a GROUP op\n const lookAhead = mComma[2] || '';\n if (maybeGROUP && (!lookAhead || lookAhead === ';')) {\n maybeGROUP = false;\n }\n // if next char is a num token, then this cannot be a SCALE op\n if (maybeSCALE && isNumOp(lookAhead)) {\n maybeSCALE = false;\n }\n if (maybeGROUP && !maybeSCALE) {\n tokens.push({ type: TOKEN_GROUP, value: ',', raw });\n }\n else if (!maybeGROUP && maybeSCALE) {\n tokens.push({ type: TOKEN_SCALE, value: ',', raw });\n }\n else if (maybeGROUP && maybeSCALE) {\n // this token will be set to scale, but switched to group if we hit a\n // num token later on in the pattern...\n const t: Token = { type: TOKEN_SCALE, value: ',', raw };\n tokens.push(t);\n unresolvedCommas.push(t);\n }\n else {\n tokens.push({ type: TOKEN_COMMA, value: ',', raw });\n }\n }\n // all other symbols are matched using\n else {\n let token: Token | undefined;\n for (const [ type, expr, group ] of tokenHandlers) {\n const m = expr.exec(curr);\n if (m) {\n const value = Array.isArray(group)\n ? group.map(d => m[d])\n : m[group || 0];\n token = { type, value, raw: m[0] };\n tokens.push(token);\n step = m[0].length;\n break;\n }\n }\n // if we just matched a break, then deal with any unresolved commas\n if (unresolvedCommas.length && token?.raw === ';') {\n unresolvedCommas.length = 0;\n }\n // if we just matched a num operator, then deal with any unresolved commas\n if (token && unresolvedCommas.length && isNumOp(token.raw)) {\n unresolvedCommas.forEach(d => (d.type = TOKEN_GROUP));\n unresolvedCommas.length = 0;\n }\n }\n if (!step) {\n const raw = curr[0];\n step = 1;\n tokens.push({ type: TOKEN_CHAR, value: raw, raw });\n }\n i += step;\n }\n return tokens;\n}\n","import { TOKEN_BREAK, TOKEN_ERROR, TOKEN_MINUS } from './constants.ts';\nimport { createPartition } from './createPartition.ts';\nimport { resolveLocale } from './locale.ts';\nimport { parseFormatSection } from './parseFormatSection.ts';\nimport { tokenize } from './tokenize.ts';\nimport type { Partition, PatternParseData, RenderToken } from './types.ts';\n\nconst maybeAddMinus = (part: Partition): void => {\n const [ op, val ] = part.condition ?? [ '', 0 ];\n const exception = (\n (val < 0 && (op === '<' || op === '<=' || op === '=')) ||\n (val === 0 && (op === '<'))\n );\n if (!exception) {\n part.tokens.unshift({\n type: TOKEN_MINUS,\n volatile: true\n });\n }\n};\n\nconst clonePart = (part: Partition, prefixToken?: RenderToken): Partition => {\n const r: Partial = {};\n for (const key in part) {\n // @ts-ignore\n const val = part[key];\n // @ts-ignore\n r[key] = Array.isArray(val) ? [ ...val ] : val;\n }\n if (prefixToken && r.tokens) {\n r.tokens.unshift(prefixToken);\n }\n r.generated = true;\n return r as Partition;\n};\n\nexport function parsePattern (pattern: string): PatternParseData {\n const partitions = [];\n let conditional = false;\n let l10n_override: string | undefined;\n let text_partition = null;\n let more = 0;\n let part: Partition;\n let i = 0;\n let conditions = 0;\n let tokens = tokenize(pattern);\n do {\n part = parseFormatSection(tokens);\n // Dates cannot blend with non-date tokens\n // General cannot blend with non-date tokens\n // -- This is does not match Excel 100% which\n // seems to allow \",\" as a text token with General\n // -- Excel also does something strange when mixing\n // General with dates (but that can hardly be expected to work)\n if (\n (part.date || part.general) &&\n (part.int_pattern.length || part.frac_pattern.length || part.scale !== 1 || part.text)\n ) {\n throw new Error('Illegal format');\n }\n if (part.condition) {\n conditions++;\n conditional = true;\n }\n if (part.text) {\n // only one text partition is allowed per pattern\n if (text_partition) {\n throw new Error('Unexpected partition');\n }\n text_partition = part;\n }\n if (part.locale) {\n l10n_override = resolveLocale(part.locale);\n }\n partitions.push(part);\n\n more = tokens[part.tokensUsed]?.type === TOKEN_BREAK ? 1 : 0;\n tokens = tokens.slice(part.tokensUsed + more);\n i++;\n }\n while (more && i < 4 && conditions < 3);\n\n // No more than 4 sections are allowed\n if (more) {\n throw new Error('Unexpected partition');\n }\n // Only 2 conditional statements are allowed: \"1;2;else;txt\"\n if (conditions > 2) {\n throw new Error('Unexpected condition');\n }\n // 3rd part must be text of neutral if it is present\n const part3 = partitions[3];\n if (part3 && (part3.int_pattern.length || part3.frac_pattern.length || part3.date)) {\n throw new Error('Unexpected partition');\n }\n\n if (conditional) {\n // When a pattern has a single partition which exists in the second\n // partition, We must also set the first partition to `[>0]`.\n if (!partitions[0].condition) {\n partitions[0].condition = [ '>', 0 ];\n }\n\n // conditional patterns get a volatile minus on the \"else\" partitions\n const numParts = partitions.length;\n if (numParts === 1) {\n // provide a fallback pattern if there isn't one\n partitions[1] = parseFormatSection(tokenize('General'));\n partitions[1].generated = true;\n }\n if (numParts <= 2) {\n // what happens when [<10]0;[>10]0 <=> 3 or -3?\n // => pattern is \"valid\" but won't match anything runtime, so errors\n }\n // 1 and 2 part conditionals\n if (numParts < 3) {\n const part1 = partitions[0];\n const part2 = partitions[1];\n // first part follows standard < <= = rules\n maybeAddMinus(part1);\n // second part uses standard as well *if it has conditions*\n if (part2.condition) {\n maybeAddMinus(part2);\n }\n else {\n // ...else it *seems* to follow logic based on first condition\n const cond = part1.condition;\n if (\n cond && (\n cond[0] === '=' ||\n (cond[1] >= 0 && (cond[0] === '>' || cond[0] === '>='))\n )\n ) {\n part2.tokens.unshift({ type: TOKEN_MINUS, volatile: true });\n }\n }\n }\n else {\n // 3 and 4 part patterns\n partitions.forEach(maybeAddMinus);\n }\n }\n // if this is not a conditional, then we ensure we have all 4 partitions\n else {\n // if we have less than 4 partitions and one of them is .text,\n // we need to use it as the text one\n if (partitions.length < 4 && text_partition) {\n for (let pi = 0, pl = partitions.length; pi < pl; pi++) {\n if (partitions[pi] === text_partition) {\n partitions.splice(pi, 1);\n }\n }\n }\n // missing positive\n if (partitions.length < 1 && text_partition) {\n partitions[0] = parseFormatSection(tokenize('General'));\n partitions[0].generated = true;\n }\n // missing negative\n if (partitions.length < 2) {\n // the volatile minus only happens if there is a single pattern\n const volMinus: RenderToken = { type: TOKEN_MINUS, volatile: true };\n partitions.push(clonePart(partitions[0], volMinus));\n }\n // missing zero\n if (partitions.length < 3) {\n partitions.push(clonePart(partitions[0]));\n }\n // missing text\n if (partitions.length < 4) {\n if (text_partition) {\n partitions.push(text_partition);\n }\n else {\n const p = parseFormatSection(tokenize('@'));\n p.generated = true;\n partitions.push(p);\n }\n }\n\n partitions[0].condition = [ '>', 0 ];\n partitions[1].condition = [ '<', 0 ];\n partitions[2].condition = undefined;\n }\n\n return {\n pattern: pattern,\n partitions: partitions,\n locale: l10n_override\n };\n}\n\nexport function parseCatch (pattern: string): PatternParseData {\n try {\n return parsePattern(pattern);\n }\n catch (err) {\n const message = err && typeof err === 'object' && 'message' in err ? String(err.message) : 'Unkown error';\n const errPart = createPartition([ { type: TOKEN_ERROR } ]);\n errPart.error = true;\n return {\n pattern: pattern,\n partitions: [ errPart, errPart, errPart, errPart ],\n error: message,\n locale: undefined\n };\n }\n}\n","/**\n * The numfmt library formats numbers according to a specifier string as defined in ECMA-376.\n * The library tries its best to emulate the inns and outs of what the Excel spreadsheet\n * software does.\n *\n * @packageDocumentation\n * @module numfmt\n */\n\nimport { TOKEN_ERROR } from './constants.ts';\n\nexport {\n getLocale,\n parseLocale,\n addLocale\n} from './locale.ts';\n\nimport { defaultOptions, type FormatOptions } from './options.ts';\n\nexport { round } from './round.ts';\nexport type { FormatOptions } from './options.ts';\nexport type { ParseDataBool, ParseDataNum } from './parseValue.ts';\nexport type {\n TokenType,\n Token,\n FormatDateInfo,\n FormatInfo\n} from './types.ts';\n/**\n * @ignore\n */\nexport type {\n TOKEN_GENERAL, TOKEN_HASH, TOKEN_ZERO, TOKEN_QMARK, TOKEN_SLASH, TOKEN_GROUP, TOKEN_SCALE, TOKEN_COMMA, TOKEN_BREAK,\n TOKEN_TEXT, TOKEN_PLUS, TOKEN_MINUS, TOKEN_POINT, TOKEN_SPACE, TOKEN_PERCENT, TOKEN_DIGIT, TOKEN_CALENDAR,\n TOKEN_ERROR, TOKEN_DATETIME, TOKEN_DURATION, TOKEN_CONDITION, TOKEN_DBNUM, TOKEN_NATNUM, TOKEN_LOCALE, TOKEN_COLOR,\n TOKEN_MODIFIER, TOKEN_AMPM, TOKEN_ESCAPED, TOKEN_STRING, TOKEN_SKIP, TOKEN_EXP, TOKEN_FILL, TOKEN_PAREN, TOKEN_CHAR\n} from './constants.ts';\n\nimport { dateToSerial as handleDates } from './serialDate.ts';\nexport { dateToSerial, dateFromSerial } from './serialDate.ts';\n\nexport type { LocaleData, LocaleToken } from './locale.ts';\n\nexport {\n parseNumber,\n parseDate,\n parseTime,\n parseBool,\n parseValue\n} from './parseValue.ts';\n\nimport { formatColor as fmtColor, formatValue as fmtValue } from './formatNumber.ts';\nimport { info, dateInfo, isDate, isPercent, isText } from './formatInfo.ts';\nimport { parsePattern } from './parsePattern.ts';\nimport type { FormatDateInfo, FormatInfo } from './types.ts';\n\nexport { tokenize } from './tokenize.ts';\n\nconst _parseDataCache = Object.create({});\nfunction prepareFormatterData (pattern: string, shouldThrow = false) {\n if (!pattern) { pattern = 'General'; }\n\n let parseData = _parseDataCache[pattern];\n if (!parseData) {\n try {\n parseData = parsePattern(pattern);\n _parseDataCache[pattern] = parseData;\n }\n catch (err) {\n // if the options say to throw errors, then do so\n if (shouldThrow) {\n throw err;\n }\n // else we set the parsedata to error\n const message = err && typeof err === 'object' && 'message' in err ? err.message : 'Unknown error';\n const errPart = {\n tokens: [ { type: TOKEN_ERROR } ],\n error: message\n };\n parseData = {\n pattern: pattern,\n partitions: [ errPart, errPart, errPart, errPart ],\n error: message,\n locale: null\n };\n }\n }\n return parseData;\n}\n\n/**\n * Formats a value as a string and returns the result.\n *\n * - Dates are normalized to spreadsheet style serial dates and then formatted.\n * - Booleans are emitted as uppercase `TRUE` or `FALSE`.\n * - `null` and `undefined` will return an empty string `\"\"`.\n * - Any non number values will be stringified and passed through the text section of the format pattern.\n * - `NaN`s and `Infinite`s will use the corresponding strings from the active locale.\n *\n * @param pattern - A format pattern in the ECMA-376 number format.\n * @param value - The value to format.\n * @param [options={}] Formatter options\n\n * @returns A formatted value\n */\nexport function format (\n pattern: string,\n value: any,\n options: Partial = {}\n): string {\n const opts: FormatOptions = Object.assign({}, defaultOptions, options);\n const data = prepareFormatterData(pattern, opts.throws);\n const val = handleDates(value, opts) ?? value;\n return fmtValue(val, data, opts);\n}\n\n/**\n * Find the color appropriate to a value as dictated by a format pattern.\n *\n * If the pattern defines colors, this function will emit the color appropriate\n * to the value. If no colors were specified this function returns `undefined`.\n *\n * ```js\n * const color = formatColor(\"[green]#,##0;[red]-#,##0\", -10);\n * console.log(color); // \"red\"\n * const color = formatColor(\"[green]#,##0;-#,##0\", -10);\n * console.log(color); // undefined\n * ```\n *\n * @param pattern - A format pattern in the ECMA-376 number format.\n * @param value - The value to format.\n * @param [options={}] Formatter options\n * @param [options.throws=true]\n * Should the formatter throw an error if a provided pattern is invalid.\n * If false, a formatter will be constructed which instead outputs an error\n * string (see _invalid_ in this table).\n * `true` by default.\n * @param [options.ignoreTimezone=false]\n * Normally when date objects are used with the formatter, time zone is taken\n * into account. This makes the formatter ignore the timezone offset.\n * `false` by default.\n * @param [options.indexColors=true]\n * When indexed color modifiers are used (`[Color 1]`) the formatter will\n * convert the index into the corresponding hex color of the default palette.\n * When this option is set to false, the number will instead by emitted\n * allowing you to index against a custom palette.\n * `true` by default.\n * @returns\n * A string color value as described by the pattern or a number if the\n * indexColors option has been set to false.\n */\nexport function formatColor (\n pattern: string,\n value: any,\n options?: {\n throws?: boolean;\n ignoreTimezone?: boolean;\n indexColors?: boolean;\n }\n): string | number | undefined {\n const opts = Object.assign({}, defaultOptions, options);\n const data = prepareFormatterData(pattern, opts.throws);\n const val = handleDates(value, opts) ?? value;\n return fmtColor(val, data, opts);\n}\n\n/**\n * Determine if a given format pattern is a date pattern.\n *\n * The pattern is considered a date pattern if any of its sections (`\"a;b;c;d\"`)\n * contains a date operator (such as `Y` or `H`). Each section is restricted to be\n * _either_ a number or date format.\n *\n * @param pattern A format pattern in the ECMA-376 number format.\n * @returns True if the specified pattern is date pattern, False otherwise.\n */\nexport function isDateFormat (pattern: string): boolean {\n const data = prepareFormatterData(pattern, false);\n return isDate(data.partitions);\n}\n\n/**\n * Determine if a given format pattern is a percentage pattern.\n *\n * The pattern is considered a percentage pattern if any of its sections (`\"a;b;c;d\"`)\n * contains an unescaped percentage symbol.\n *\n * @param pattern A format pattern in the ECMA-376 number format.\n * @returns True if the specified pattern is date pattern, False otherwise.\n */\nexport function isPercentFormat (pattern: string): boolean {\n const data = prepareFormatterData(pattern, false);\n return isPercent(data.partitions);\n}\n\n/**\n * Determine if a given format pattern is a text only pattern.\n *\n * The pattern is considered text only if its definition is composed of a single\n * section that includes that text symbol (`@`).\n *\n * For example `@` or `@\" USD\"` are text patterns but `#;@` is not.\n *\n * @param pattern A format pattern in the ECMA-376 number format.\n * @returns True if the specified pattern is date pattern, False otherwise.\n */\nexport function isTextFormat (pattern: string): boolean {\n const data = prepareFormatterData(pattern, false);\n return isText(data.partitions);\n}\n\n/**\n * Determine if a given format pattern is valid.\n *\n * @param pattern A format pattern in the ECMA-376 number format.\n * @returns True if the specified pattern is valid, False otherwise.\n */\nexport function isValidFormat (pattern: string): boolean {\n try {\n prepareFormatterData(pattern, true);\n return true;\n }\n catch (err) {\n return false;\n }\n}\n\n/**\n * Returns an object detailing the properties and internals of a format parsed\n * format pattern.\n *\n * @param pattern A format pattern in the ECMA-376 number format.\n * @param [options={}] Options for the method\n * @param [options.currency]\n * Limit the patterns identified as currency to those that use the give string.\n * If nothing is provided, patterns will be tagged as currency if one of the\n * following currency symbols is used: `¤$£¥֏؋৳฿៛₡₦₩₪₫€₭₮₱₲₴₸₹₺₼₽₾₿`\n * @returns An object of format properties.\n */\nexport function getFormatInfo (pattern: string, options: { currency?: string; } = {}): FormatInfo {\n const data = prepareFormatterData(pattern, false);\n if (!data.info) {\n data.info = info(data.partitions, options?.currency);\n }\n return data.info;\n}\n\n/**\n * Gets information about how date codes are used in a format string.\n *\n * @param pattern A format pattern in the ECMA-376 number format.\n * @returns An object of format date properties.\n */\nexport function getFormatDateInfo (pattern: string): FormatDateInfo {\n const data = prepareFormatterData(pattern, false);\n if (!data.dateInfo) {\n data.dateInfo = dateInfo(data.partitions);\n }\n return data.dateInfo;\n}\n"],"mappings":"AAuBA,MAAa,gBAAgB;AAC7B,MAAa,aAAa;AAC1B,MAAa,aAAa;AAC1B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,aAAa;AAC1B,MAAa,aAAa;AAC1B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,gBAAgB;AAC7B,MAAa,cAAc;AAC3B,MAAa,iBAAiB;AAC9B,MAAa,cAAc;AAC3B,MAAa,iBAAiB;AAC9B,MAAa,iBAAiB;AAC9B,MAAa,kBAAkB;AAC/B,MAAa,cAAc;AAC3B,MAAa,eAAe;AAC5B,MAAa,eAAe;AAC5B,MAAa,cAAc;AAC3B,MAAa,iBAAiB;AAC9B,MAAa,aAAa;AAC1B,MAAa,gBAAgB;AAC7B,MAAa,eAAe;AAC5B,MAAa,aAAa;AAE1B,MAAa,aAAa;AAC1B,MAAa,cAAc;AAC3B,MAAa,aAAa;AAM1B,MAAa,cAAc;AAE3B,MAAa,cAAc;AAC3B,MAAa,gBAAgB;AAC7B,MAAa,aAAa;AAC1B,MAAa,iBAAiB;AAC9B,MAAa,iBAAiB;AAC9B,MAAa,eAAe;AAC5B,MAAa,mBAAmB;AAChC,MAAa,iBAAiB;AAE9B,MAAa,cAAc;AAG3B,MAAa,gBAAgB;AAC7B,MAAa,gBAAgB;AAC7B,MAAa,eAAe;AAC5B,MAAa,eAAe;AAC5B,MAAa,gBAAgB;AAC7B,MAAa,kBAAkB;AAE/B,MAAa,cAAc;CACzB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAa,kBAAkB;CAC7B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAa,oBAAoB,IAAI,OAAO,MAAM,gBAAgB,KAAK,EAAE,IAAI,GAAG;;;AC1KhF,MAAa,eAAkD,OAAO,OAAO;CAC1E,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACP,OAAO;CACN,MAAM;CACN,MAAM;CACP,OAAO;CACP,OAAO;CACP,OAAO;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACP,OAAO;CACN,MAAM;CACP,OAAO;CACN,MAAM;CACP,OAAO;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACP,OAAO;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACP,OAAO;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACP,OAAO;CACN,MAAM;CACP,OAAO;CACN,MAAM;CACP,OAAO;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACP,OAAO;CACN,MAAM;CACN,MAAM;CACP,OAAO;CACN,MAAM;CACN,MAAM;CACP,OAAO;CACN,MAAM;CACP,OAAO;CACP,OAAO;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACP,OAAO;CACP,OAAO;CACP,OAAO;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACP,OAAO;CACP,OAAO;CACN,MAAM;CACP,OAAO;CACN,MAAM;CACP,OAAO;CACN,MAAM;CACP,OAAO;CACP,OAAO;CACP,OAAO;CACN,MAAM;CACP,OAAO;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,M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K;AACd"} \ No newline at end of file diff --git a/dist/numfmt.d.ts b/dist/numfmt.d.ts deleted file mode 100644 index ab76611..0000000 --- a/dist/numfmt.d.ts +++ /dev/null @@ -1,721 +0,0 @@ -/** - * Register locale data for a language so for use when formatting. - * Any partial set of properties may be returned to have the defaults used where properties are missing. - * - * @param localeSettings A collection of settings for a locale. - * @param [localeSettings.ampm=["AM","PM"]] How AM and PM should be presented. - * @param [localeSettings.bool=["TRUE", "FALSE"]] How TRUE and FALSE should be presented. - * @param [localeSettings.ddd=["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]] Shortened day names (e.g. `Wed`) - * @param [localeSettings.dddd=["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]] Long day names (e.g. `Wednesday`) - * @param [localeSettings.decimal="."] Symbol used to separate integers from fractions (usually `.`) - * @param [localeSettings.exponent="E"] Symbol used to indicate an exponent (usually `E`) - * @param [localeSettings.group="\u00a0"] Symbol used as a grouping separator (`1,000,000` uses `,`) - * @param [localeSettings.infinity="∞"] Symbol used to indicate infinite values (`∞`) - * @param [localeSettings.mmm=["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]] Short month names for the Gregorian calendar (e.g. `Nov`) - * @param [localeSettings.mmm6=["Muh.", "Saf.", "Rab. I", "Rab. II", "Jum. I", "Jum. II", "Raj.", "Sha.", "Ram.", "Shaw.", "Dhuʻl-Q.", "Dhuʻl-H."]] Short month names for the Islamic calendar (e.g. `Raj.`) - * @param [localeSettings.mmmm=["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]] Long month names for the Gregorian calendar (e.g. `November`) - * @param [localeSettings.mmmm6=["Muharram", "Safar", "Rabiʻ I", "Rabiʻ II", "Jumada I", "Jumada II", "Rajab", "Shaʻban", "Ramadan", "Shawwal", "Dhuʻl-Qiʻdah", "Dhuʻl-Hijjah"]] Long month names for the Islamic calendar (e.g. `Rajab`) - * @param [localeSettings.nan="NaN"] Symbol used to indicate NaN values (`NaN`) - * @param [localeSettings.negative="-"] Symbol used to indicate positive numbers (usually `-`) - * @param [localeSettings.percent="%"] Symbol used to indicate a percentage (usually `%`) - * @param [localeSettings.positive="+"] Symbol used to indicate positive numbers (usually `+`) - * @param [localeSettings.preferMDY=false] Is the prefered date format month first (12/31/2025) or day first (31/12/2025) - * @param l4e A string BCP 47 tag of the locale. - * @returns - A full collection of settings for a locale - */ -export declare function addLocale(localeSettings: { - /** How AM and PM should be presented. */ - ampm?: Array; - /** How TRUE and FALSE should be presented. */ - bool?: Array; - /** Shortened day names (e.g. `Wed`) */ - ddd?: Array; - /** Long day names (e.g. `Wednesday`) */ - dddd?: Array; - /** Symbol used to separate integers from fractions (usually `.`) */ - decimal?: string; - /** Symbol used to indicate an exponent (usually `E`) */ - exponent?: string; - /** Symbol used as a grouping separator (`1,000,000` uses `,`) */ - group?: string; - /** Symbol used to indicate infinite values (`∞`) */ - infinity?: string; - /** Short month names for the Gregorian calendar (e.g. `Nov`) */ - mmm?: Array; - /** Short month names for the Islamic calendar (e.g. `Raj.`) */ - mmm6?: Array; - /** Long month names for the Gregorian calendar (e.g. `November`) */ - mmmm?: Array; - /** Long month names for the Islamic calendar (e.g. `Rajab`) */ - mmmm6?: Array; - /** Symbol used to indicate NaN values (`NaN`) */ - nan?: string; - /** Symbol used to indicate positive numbers (usually `-`) */ - negative?: string; - /** Symbol used to indicate a percentage (usually `%`) */ - percent?: string; - /** Symbol used to indicate positive numbers (usually `+`) */ - positive?: string; - /** Is the prefered date format month first (12/31/2025) or day first (31/12/2025) */ - preferMDY?: boolean; -}, l4e: string): LocaleData; - - -/** - * Convert a spreadsheet serial date to an array of date parts. - * Accurate to a second. - * ```js - * // output as [ Y, M, D, h, m, s ] - * dateFromSerial(28627); // [ 1978, 5, 17, 0, 0, 0 ] - * ```` - * - * @param serialDate The date - * @param [options={}] The options - * @param [options.leap1900=true] Simulate the Lotus 1-2-3 [1900 leap year bug](https://docs.microsoft.com/en-us/office/troubleshoot/excel/wrongly-assumes-1900-is-leap-year). - * @returns returns an array of date parts - */ -export declare function dateFromSerial(serialDate: number, options?: { - /** Simulate the Lotus 1-2-3 [1900 leap year bug](https://docs.microsoft.com/en-us/office/troubleshoot/excel/wrongly-assumes-1900-is-leap-year). */ - leap1900?: boolean; -}): Array; - -/** - * Convert a native JavaScript Date, or array to an spreadsheet serial date. - * Returns a serial date number if input was a Date object or an array of - * numbers, a null. - * ```js - * // input as Date - * dateToSerial(new Date(1978, 5, 17)); // 28627 - * // input as [ Y, M, D, h, m, s ] - * dateToSerial([ 1978, 5, 17 ]); // 28627 - * // other input - * dateToSerial("something else"); // null - * ```` - * - * @param date The date - * @param [options={}] Options - * @param [options.ignoreTimezone=false] Normally time zone will be taken into account. This makes the conversion to - serial date ignore the timezone offset. - * @returns The date as a spreadsheet serial date, or null. - */ -export declare function dateToSerial(date: (Date | Array), options?: { - /** - * Normally time zone will be taken into account. This makes the conversion to - * serial date ignore the timezone offset. - */ - ignoreTimezone?: boolean; -}): (number | null); - -/** - * Formats a value as a string and returns the result. - * - Dates are normalized to spreadsheet style serial dates and then formatted. - * - Booleans are emitted as uppercase "TRUE" or "FALSE". - * - Null and Undefined will return an empty string "". - * - Any non number values will be stringified and passed through the text section of the format pattern. - * - NaNs and infinites will use the corresponding strings from the active locale. - * - * @param pattern A format pattern in the ECMA-376 number format. - * @param value The value to format. - * @param [options={}] Options - * @param [options.bigintErrorNumber=false] Should the formatter switch to a plain string number format when trying to - format a bigint that is out of bounds? - * @param [options.dateErrorNumber=true] Should the formatter switch to a General number format when trying to - format a date that is out of bounds? - * @param [options.dateErrorThrows=false] Should the formatter throw an error when trying to format a date that is - out of bounds? - * @param [options.dateSpanLarge=true] Extends the allowed range of dates from Excel bounds (1900–9999) to - Google Sheet bounds (0–99999). - * @param [options.fillChar=''] When the formatter encounters `*` it normally emits nothing instead of the - `*` and the next character (like Excel TEXT function does). Setting this - to a character will make the formatter emit that followed by the next one. - * @param [options.ignoreTimezone=false] Normally when date objects are used with the formatter, time zone is taken - into account. This makes the formatter ignore the timezone offset. - * @param [options.invalid="######"] The string emitted when no-throw mode fails to parse a pattern. - * @param [options.leap1900=true] Simulate the Lotus 1-2-3 [1900 leap year bug](https://docs.microsoft.com/en-us/office/troubleshoot/excel/wrongly-assumes-1900-is-leap-year). - It is a requirement in the Ecma OOXML specification so it is on by default. - * @param [options.locale=""] A BCP 47 string tag. Locale default is english with a `\u00a0` - grouping symbol (see [addLocale](#addLocale)) - * @param [options.nbsp=false] By default the output will use a regular space, but in many cases you - may desire a non-breaking-space instead. - * @param [options.overflow="######"] The string emitted when a formatter fails to format a date that is out - of bounds. - * @param [options.skipChar=''] When the formatter encounters `_` it normally emits a single space instead - of the `_` and the next character (like Excel TEXT function does). Setting - this to a character will make the formatter emit that followed by the next - one. - * @param [options.throws=true] Should the formatter throw an error if a provided pattern is invalid. - If false, a formatter will be constructed which instead outputs an error - string (see _invalid_ in this table). - * @returns A formatted value - */ -export declare function format(pattern: string, value: any, options?: { - /** - * Should the formatter switch to a plain string number format when trying to - * format a bigint that is out of bounds? - */ - bigintErrorNumber?: boolean; - /** - * Should the formatter switch to a General number format when trying to - * format a date that is out of bounds? - */ - dateErrorNumber?: boolean; - /** - * Should the formatter throw an error when trying to format a date that is - * out of bounds? - */ - dateErrorThrows?: boolean; - /** - * Extends the allowed range of dates from Excel bounds (1900–9999) to - * Google Sheet bounds (0–99999). - */ - dateSpanLarge?: boolean; - /** - * When the formatter encounters `*` it normally emits nothing instead of the - * `*` and the next character (like Excel TEXT function does). Setting this - * to a character will make the formatter emit that followed by the next one. - */ - fillChar?: boolean; - /** - * Normally when date objects are used with the formatter, time zone is taken - * into account. This makes the formatter ignore the timezone offset. - */ - ignoreTimezone?: boolean; - /** The string emitted when no-throw mode fails to parse a pattern. */ - invalid?: string; - /** - * Simulate the Lotus 1-2-3 [1900 leap year bug](https://docs.microsoft.com/en-us/office/troubleshoot/excel/wrongly-assumes-1900-is-leap-year). - * It is a requirement in the Ecma OOXML specification so it is on by default. - */ - leap1900?: boolean; - /** - * A BCP 47 string tag. Locale default is english with a `\u00a0` - * grouping symbol (see [addLocale](#addLocale)) - */ - locale?: string; - /** - * By default the output will use a regular space, but in many cases you - * may desire a non-breaking-space instead. - */ - nbsp?: boolean; - /** - * The string emitted when a formatter fails to format a date that is out - * of bounds. - */ - overflow?: string; - /** - * When the formatter encounters `_` it normally emits a single space instead - * of the `_` and the next character (like Excel TEXT function does). Setting - * this to a character will make the formatter emit that followed by the next - * one. - */ - skipChar?: boolean; - /** - * Should the formatter throw an error if a provided pattern is invalid. - * If false, a formatter will be constructed which instead outputs an error - * string (see _invalid_ in this table). - */ - throws?: boolean; -}): string; - -/** - * Find the color appropriate to a value as dictated by a format pattern. - * If the pattern defines colors, this function will emit the color appropriate - * to the value. If no colors were specified this function returns `undefined`. - * ```js - * const color = formatColor("[green]#,##0;[red]-#,##0", -10); - * console.log(color); // "red" - * const color = formatColor("[green]#,##0;-#,##0", -10); - * console.log(color); // null - * ``` - * - * @param pattern A format pattern in the ECMA-376 number format. - * @param value The value to format. - * @param [options={}] Options - * @param [options.ignoreTimezone=false] Normally when date objects are used with the formatter, time zone is taken - into account. This makes the formatter ignore the timezone offset. - * @param [options.indexColors=true] When indexed color modifiers are used (`[Color 1]`) the formatter will - convert the index into the corresponding hex color of the default palette. - When this option is set to false, the number will instead by emitted - allowing you to index against a custom palette. - * @param [options.throws=true] Should the formatter throw an error if a provided pattern is invalid. - If false, a formatter will be constructed which instead outputs an error - string (see _invalid_ in this table). - * @returns A string color value as described by the pattern or a number if the - indexColors option has been set to false. - */ -export declare function formatColor(pattern: string, value: any, options?: { - /** - * Normally when date objects are used with the formatter, time zone is taken - * into account. This makes the formatter ignore the timezone offset. - */ - ignoreTimezone?: boolean; - /** - * When indexed color modifiers are used (`[Color 1]`) the formatter will - * convert the index into the corresponding hex color of the default palette. - * When this option is set to false, the number will instead by emitted - * allowing you to index against a custom palette. - */ - indexColors?: boolean; - /** - * Should the formatter throw an error if a provided pattern is invalid. - * If false, a formatter will be constructed which instead outputs an error - * string (see _invalid_ in this table). - */ - throws?: boolean; -}): (string | number | null); - -/** - * Gets information about date codes use in a format string. - * - * @param pattern A format pattern in the ECMA-376 number format. - * @returns An object of format date properties. - */ -export declare function getFormatDateInfo(pattern: string): FormatDateInfo; - -/** - * Returns an object detailing the properties and internals of a format parsed - * format pattern. - * - * @param pattern A format pattern in the ECMA-376 number format. - * @param [options={}] Options - * @param [options.currency] Limit the patterns identified as currency to those that use the give string. - If nothing is provided, patterns will be tagged as currency if one of the - following currency symbols is used: ¤$£¥֏؋৳฿៛₡₦₩₪₫€₭₮₱₲₴₸₹₺₼₽₾₿ - * @returns An object of format properties. - */ -export declare function getFormatInfo(pattern: string, options?: { - /** - * Limit the patterns identified as currency to those that use the give string. - * If nothing is provided, patterns will be tagged as currency if one of the - * following currency symbols is used: ¤$£¥֏؋৳฿៛₡₦₩₪₫€₭₮₱₲₴₸₹₺₼₽₾₿ - */ - currency?: string; -}): FormatInfo; - -/** - * Used by the formatter to pull a locate from its registered locales. If - * subtag isn't available but the base language is, the base language is used. - * So if `en-CA` is not found, the formatter tries to find `en` else it - * returns a `null`. - * - * @param locale A BCP 47 string tag of the locale, or an Excel locale code. - * @returns - An object of format date properties. - */ -export declare function getLocale(locale: string): (LocaleData | null); - -/** - * Determine if a given format pattern is a date pattern. - * The pattern is considered a date pattern if any of its sections contain a - * date symbol (such as `Y` or `H`). Each section is restricted to be - * _either_ a number or date format. - * - * @param pattern A format pattern in the ECMA-376 number format. - * @returns True if the specified pattern is date pattern, False otherwise. - */ -export declare function isDateFormat(pattern: string): boolean; - -/** - * Determine if a given format pattern is a percentage pattern. - * The pattern is considered a percentage pattern if any of its sections - * contains an unescaped percentage symbol. - * - * @param pattern A format pattern in the ECMA-376 number format. - * @returns True if the specified pattern is date pattern, False otherwise. - */ -export declare function isPercentFormat(pattern: string): boolean; - -/** - * Determine if a given format pattern is a text only pattern. - * The pattern is considered text only if its definition is composed of a single - * section that includes that text symbol (`@`). - * For example `@` or `@" USD"` are text patterns but `#;@` is not. - * - * @param pattern A format pattern in the ECMA-376 number format. - * @returns True if the specified pattern is date pattern, False otherwise. - */ -export declare function isTextFormat(pattern: string): boolean; - -/** - * Determine if a given format pattern is valid. - * - * @param pattern A format pattern in the ECMA-376 number format. - * @returns True if the specified pattern is valid, False otherwise. - */ -export declare function isValidFormat(pattern: string): boolean; - -/** - * Parse a string input and return its boolean value. If the input was not - * recognized or valid, the function returns a `null`, for valid input it - * returns an object with one property: - * - `v`: the parsed value. - * - * @param value The supposed boolean to parse - * @param [options={}] Options - * @param [options.locale=""] A BCP 47 string tag. Locale default is english with a `\u00a0` - grouping symbol (see [addLocale](#addLocale)) - * @returns An object of the parsed value and a corresponding format string - */ -export declare function parseBool(value: string, options?: { - /** - * A BCP 47 string tag. Locale default is english with a `\u00a0` - * grouping symbol (see [addLocale](#addLocale)) - */ - locale?: string; -}): (ParseData | null); - -/** - * Parse a date or datetime string input and return its value and format. If - * the input was not recognized or valid, the function returns a `null`, for - * valid input it returns an object with two properties: - * - `v`: the parsed value. - * - `z`: the number format of the input (if applicable). - * - * @param value The date to parse - * @param [options={}] Options - * @param [options.locale=""] A BCP 47 string tag. Locale default is english with a `\u00a0` - grouping symbol (see [addLocale](#addLocale)) - * @returns An object of the parsed value and a corresponding format string - */ -export declare function parseDate(value: string, options?: { - /** - * A BCP 47 string tag. Locale default is english with a `\u00a0` - * grouping symbol (see [addLocale](#addLocale)) - */ - locale?: string; -}): (ParseData | null); - -/** - * Parse a regular IETF BCP 47 locale tag and emit an object of its parts. - * Irregular tags and subtags are not supported. - * - * @param locale A BCP 47 string tag of the locale. - * @returns - An object describing the locale. - */ -export declare function parseLocale(locale: string): LocaleToken; - -/** - * Parse a numeric string input and return its value and format. If the input - * was not recognized or valid, the function returns a `null`, for valid input - * it returns an object with two properties: - * * `v`: the parsed value. - * * `z`: the number format of the input (if applicable). - * - * @param value The number to parse - * @param [options={}] Options - * @param [options.locale=""] A BCP 47 string tag. Locale default is english with a `\u00a0` - grouping symbol (see [addLocale](#addLocale)) - * @returns An object of the parsed value and a corresponding format string - */ -export declare function parseNumber(value: string, options?: { - /** - * A BCP 47 string tag. Locale default is english with a `\u00a0` - * grouping symbol (see [addLocale](#addLocale)) - */ - locale?: string; -}): (ParseData | null); - -/** - * Parse a time string input and return its value and format. If the input was - * not recognized or valid, the function returns a `null`, for valid input it - * returns an object with two properties: - * - `v`: the parsed value. - * - `z`: the number format of the input (if applicable). - * - * @param value The date to parse - * @param [options={}] Options - * @param [options.locale=""] A BCP 47 string tag. Locale default is english with a `\u00a0` - grouping symbol (see [addLocale](#addLocale)) - * @returns An object of the parsed value and a corresponding format string - */ -export declare function parseTime(value: string, options?: { - /** - * A BCP 47 string tag. Locale default is english with a `\u00a0` - * grouping symbol (see [addLocale](#addLocale)) - */ - locale?: string; -}): (ParseData | null); - -/** - * Attempt to parse a "spreadsheet input" string input and return its value and - * format. If the input was not recognized or valid, the function returns a - * `null`, for valid input it returns an object with two properties: - * - `v`: The parsed value. For dates, this will be an Excel style serial date. - * - `z`: (Optionally) the number format string of the input. This property will - * not be present if it amounts to the `General` format. - * `parseValue()` recognizes a wide range of dates and date-times, times, - * numbers, and booleans. Some examples: - * ```js - * // basic number - * parseValue("-123");// { v: -123 } - * // formatted number - * parseValue("$1,234"); // { v: 1234, z: "$#,##0" } - * // a percent - * parseValue("12.3%"); // { v: 0.123, z: "0.00%" } - * // a date - * parseValue("07 October 1984"); // { v: 30962, z: 'dd mmmm yyyy' } - * // an ISO formatted date-time - * parseValue("1984-09-10 11:12:13.1234"); // { v: 30935.46681855787, z: "yyyy-mm-dd hh:mm:ss" } - * // a boolean - * parseValue("false"); // { v: false } - * ``` - * The formatting string outputted may not correspond exactly to the input. - * Rather, is it composed of certain elements which the input controls. This is - * comparable to how Microsoft Excel and Google Sheets parse pasted input. Some - * things you may expect: - * - Whitespace is ignored. - * - Decimal fractions are always represented by `.00` regardless of how many - * digits were shown in the input. - * - Negatives denoted by parentheses [`(1,234)`] will not include the - * parentheses in the format string (the value will still by negative.) - * - All "scientific notation" returns the same format: `0.00E+00`. - * Internally the parser calls, `parseNumber`, `parseDate`, - * `parseTime` and `parseBool`. They work in the same way except - * with a more limited scope. You may want those function if you are limiting - * input to a smaller scope. - * Be warned that the parser do not (yet) take locale into account so all input - * is assumed to be in "en-US". This means that `1,234.5` will parse, but - * `1.234,5` will not. Similarly, the order of date parts will be US centric. - * This may change in the future so be careful what options you pass the - * functions. - * - * @param value The value to parse - * @param [options={}] Options - * @param [options.locale=""] A BCP 47 string tag. Locale default is english with a `\u00a0` - grouping symbol (see [addLocale](#addLocale)) - * @returns An object of the parsed value and a corresponding format string - */ -export declare function parseValue(value: string, options?: { - /** - * A BCP 47 string tag. Locale default is english with a `\u00a0` - * grouping symbol (see [addLocale](#addLocale)) - */ - locale?: string; -}): (ParseData | null); - -/** - * Return a number rounded to the specified amount of places. This is the - * rounding function used internally by the formatter (symmetric arithmetic - * rounding). - * - * @param number The number to round. - * @param [places=0] The number of decimals to round to. - * @returns A rounded number. - */ -export declare function round(number: number, places?: number): number; - -/** - * Breaks a format pattern string into a list of tokens. - * The returned output will be an array of objects representing the tokens: - * ```js - * [ - * { type: 'zero', value: '0', raw: '0' }, - * { type: 'point', value: '.', raw: '.' }, - * { type: 'zero', value: '0', raw: '0' }, - * { type: 'percent', value: '%', raw: '%' } - * ] - * ``` - * Token types may be found as an Object as the - * [`tokenTypes` export]{@link tokenTypes} of the package. - * - * @param pattern The format pattern - * @returns a list of tokens - */ -export declare function tokenize(pattern: string): Array; - -/** A dictionary of the types used to identify token variants. */ -export declare const tokenTypes: Readonly<{ - /** AM/PM operator (`AM/PM`, `A/P`) */ - AMPM: string; - /** Semicolon operator indicating a break between format sections (`;`) */ - BREAK: string; - /** Calendar modifier (`B2`) */ - CALENDAR: string; - /** Single non-operator character (`m`) */ - CHAR: string; - /** Color modifier (`[Black]`, `[color 5]`) */ - COLOR: string; - /** Plain non-operator comma (`,`) */ - COMMA: string; - /** Condition modifier for a section (`[>=10]`) */ - CONDITION: string; - /** Date-time operator (`mmmm`, `YY`) */ - DATETIME: string; - /** Number display modifier (`[DBNum23]`) */ - DBNUM: string; - /** A digit between 1 and 9 (`3`) */ - DIGIT: string; - /** Time duration (`[ss]`) */ - DURATION: string; - /** Unidentifiable or illegal character (`Ň`) */ - ERROR: string; - /** Escaped character (`\E`) */ - ESCAPED: string; - /** Exponent operator (`E+`) */ - EXP: string; - /** Fill with char operator and operand (`*_`) */ - FILL: string; - /** General format operator (`General`) */ - GENERAL: string; - /** Number grouping operator (`,`) */ - GROUP: string; - /** Hash operator (digit if available) (`#`) */ - HASH: string; - /** Locale modifier (`[$-1E020404]`) */ - LOCALE: string; - /** Minus sign (`-`) */ - MINUS: string; - /** An unidentified modifier (`[Schwarz]`) */ - MODIFIER: string; - /** Number display modifier (`[NatNum3]`) */ - NATNUM: string; - /** Parenthesis character (`)`) */ - PAREN: string; - /** Percent operator (`%`) */ - PERCENT: string; - /** Plus sign (`+`) */ - PLUS: string; - /** Decimal point operator (`.`) */ - POINT: string; - /** Question mark operator (digit or space if not available) (`?`) */ - QMARK: string; - /** Scaling operator (`,`) */ - SCALE: string; - /** Skip with char operator and operand (`*_`) */ - SKIP: string; - /** Slash operator (`/`) */ - SLASH: string; - /** Space (` `) */ - SPACE: string; - /** Quoted string (`"days"`) */ - STRING: string; - /** Text output operator (`@`) */ - TEXT: string; - /** Zero operator (digit or zero if not available) (`0`) */ - ZERO: string; -}>; - -/** An object detailing which date specifiers are used in a format pattern. */ -export declare type FormatDateInfo = { - /** 12 if the pattern uses AM/PM clock else 24. */ - clockType: (12 | 24); - /** true if the pattern uses day of the month else false. */ - day: boolean; - /** true if the pattern uses hours else false. */ - hours: boolean; - /** true if the pattern uses minutes else false. */ - minutes: boolean; - /** true if the pattern uses months else false. */ - month: boolean; - /** true if the pattern uses seconds else false. */ - seconds: boolean; - /** true if the pattern uses years else false. */ - year: boolean; -}; - -/** An object of information properties based on a format pattern. */ -export declare type FormatInfo = { - /** - * Corresponds to Excel's `CELL("format")` functionality. It should match - * Excel's esoteric behaviour fairly well. - * [See Microsoft's documentation.](https://support.microsoft.com/en-us/office/cell-function-51bd39a5-f338-4dbe-a33f-955d67c2b2cf) - */ - code: string; - /** - * 1 if the format uses color on the negative portion of the string, else - * a 0. This replicates Excel's `CELL("color")` functionality. - */ - color: (0 | 1); - /** - * 1 if the positive portion of the format uses a thousands separator, - * else a 0. - */ - grouped: (0 | 1); - /** Corresponds to the output from isDateFormat. */ - isDate: boolean; - /** Corresponds to the output from isPercentFormat. */ - isPercent: boolean; - /** Corresponds to the output from isTextFormat. */ - isText: boolean; - /** - * An arbirarty number that represents the format's specificity if you want - * to compare one to another. Integer comparisons roughly match Excel's - * resolutions when it determines which format wins out. - */ - level: number; - /** The maximum number of decimals this format will emit. */ - maxDecimals: number; - /** - * 1 if the positive portion of the number format contains an open - * parenthesis, else a 0. This is replicates Excel's `CELL("parentheses")` - * functionality. - */ - parentheses: (0 | 1); - /** The multiplier used when formatting the number (100 for percentages). */ - scale: number; - /** A string identifier for the type of the number formatter. */ - type: ("currency" | "date" | "datetime" | "error" | "fraction" | "general" | "grouped" | "number" | "percent" | "scientific" | "text" | "time"); -}; - -export declare type FormatToken = { - /** Raw token source. */ - raw: string; - /** Token type. */ - type: string; - /** The value of the token, cleaned of extra characters. */ - value: any; -}; - -/** An object of properties used by a formatter when printing a number in a certain locale. */ -export declare type LocaleData = { - /** How AM and PM should be presented */ - ampm: Array; - /** How TRUE and FALSE should be presented */ - bool: Array; - /** Shortened day names (`Wed`) */ - ddd: Array; - /** Long day names (`Wednesday`) */ - dddd: Array; - /** Symbol used to separate integers from fractions (usually `.`) */ - decimal: string; - /** Symbol used to indicate an exponent (usually `E`) */ - exponent: string; - /** Symbol used as a grouping separator (`1,000,000` uses `,`) */ - group: string; - /** Symbol used to indicate infinite values (`∞`) */ - infinity: string; - /** Short month names for the Gregorian calendar (`Nov`) */ - mmm: Array; - /** Short month names for the Islamic calendar (`Raj.`) */ - mmm6: Array; - /** Long month names for the Gregorian calendar (`November`) */ - mmmm: Array; - /** Long month names for the Islamic calendar (`Rajab`) */ - mmmm6: Array; - /** Symbol used to indicate NaN values (`NaN`) */ - nan: string; - /** Symbol used to indicate positive numbers (usually `-`) */ - negative: string; - /** Symbol used to indicate a percentage (usually `%`) */ - percent: string; - /** Symbol used to indicate positive numbers (usually `+`) */ - positive: string; - /** Is the prefered date format month first (12/31/2025) or day first (31/12/2025) */ - preferMDY: boolean; -}; - -/** An object of properties for a locale tag. */ -export declare type LocaleToken = { - /** The basic tag such as `zh_CN` or `fi` */ - lang: string; - /** The language section (`zh` for `zh_CN`) */ - language: string; - /** The territory section (`CN` for `zh_CN`) */ - territory: string; -}; - -export declare type ParseData = { - /** the value */ - v: (number | boolean); - /** number format pattern */ - z?: string; -}; diff --git a/dist/numfmt.js b/dist/numfmt.js deleted file mode 100644 index cdb1e48..0000000 --- a/dist/numfmt.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict";const e=2,t=4,n=8,r=16,a=32,i=64,o=128,s=256,m=512,l=-1,d=1,u=6,c="general",p="hash",f="zero",h="qmark",g="slash",b="group",y="scale",v="comma",_="break",j="text",M="plus",k="minus",F="point",x="space",C="percent",A="digit",w="calendar",S="error",z="datetime",E="duration",I="condition",D="dbnum",O="natnum",N="locale",T="color",Y="modifier",P="ampm",R="escaped",L="string",U="skip",H="exp",G="fill",B="paren",J="char",V=["#000000","#FFFFFF","#FF0000","#00FF00","#0000FF","#FFFF00","#FF00FF","#00FFFF","#800000","#008000","#000080","#808000","#800080","#008080","#C0C0C0","#808080","#9999FF","#993366","#FFFFCC","#CCFFFF","#660066","#FF8080","#0066CC","#CCCCFF","#000080","#FF00FF","#FFFF00","#00FFFF","#800080","#800000","#008080","#0000FF","#00CCFF","#CCFFFF","#CCFFCC","#FFFF99","#99CCFF","#FF99CC","#CC99FF","#FFCC99","#3366FF","#33CCCC","#99CC00","#FFCC00","#FF9900","#FF6600","#666699","#969696","#003366","#339966","#003300","#333300","#993300","#993366","#333399","#333333"],W=["¤","$","£","¥","֏","؋","৳","฿","៛","₡","₦","₩","₪","₫","€","₭","₮","₱","₲","₴","₸","₹","₺","₼","₽","₾","₿"],$=new RegExp("["+W.join("")+"]");function Z(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function K(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function X(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"";return e.replace(/~/g,t).split(";")},ne=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return e.mmm||(e.mmm=t<1?e.mmmm.concat():e.mmmm.map((e=>{const n=e.slice(0,t%10);return n+(t<10||e===n?"":".")}))),e.ddd||(e.ddd=n<1?e.dddd.concat():e.dddd.map((e=>{const t=e.slice(0,n%10);return t+(n<10||e===t?"":".")}))),!e.mmm6&&e.mmmm6&&(e.mmm6=e.mmmm6),e},re={group:" ",decimal:".",positive:"+",negative:"-",percent:"%",exponent:"E",nan:"NaN",infinity:"∞",ampm:te("AM;PM"),mmmm6:te("Muharram;Safar;Rabiʻ I;Rabiʻ II;Jumada I;Jumada II;Rajab;Shaʻban;Ramadan;Shawwal;Dhuʻl-Qiʻdah;Dhuʻl-Hijjah"),mmm6:te("Muh.;Saf.;Rab. I;Rab. II;Jum. I;Jum. II;Raj.;Sha.;Ram.;Shaw.;Dhuʻl-Q.;Dhuʻl-H."),mmmm:te("January;February;March;April;May;June;July;August;September;October;November;December"),mmm:te("Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec"),dddd:te("Sunday;Monday;Tuesday;Wednesday;Thursday;Friday;Saturday"),ddd:te("Sun;Mon;Tue;Wed;Thu;Fri;Sat"),bool:te("TRUE;FALSE"),preferMDY:!1};function ae(e){const t=Q.exec(e);if(!t)throw new SyntaxError("Malformed locale: ".concat(e));return{lang:t[1]+(t[2]?"_"+t[2]:""),language:t[1],territory:t[2]||""}}function ie(e){if("number"==typeof e)return q[65535&e]||null;const t=parseInt(e,16);return isFinite(t)&&q[65535&t]?q[65535&t]||null:Q.test(e)?e:null}function oe(e){const t=ie(e);let n=null;if(t){const e=ae(t);n=ee[e.lang]||ee[e.language]||null}return n}function se(e){return Object.assign({},re,e)}function me(e,t){const n="object"==typeof t?t:ae(t);return ee[n.lang]=se(e),n.language===n.lang||ee[n.language]||(ee[n.language]=se(e)),ee[n.lang]}const le=se({group:",",preferMDY:!0});le.isDefault=!0,me({group:",",ampm:te("上午;下午"),mmmm:te("一月;二月;三月;四月;五月;六月;七月;八月;九月;十月;十一月;十二月"),mmm:te("1月;2月;3月;4月;5月;6月;7月;8月;9月;10月;11月;12月"),dddd:te("~日;~一;~二;~三;~四;~五;~六","星期"),ddd:te("周日;周一;周二;周三;周四;周五;周六")},"zh_CN");const de={group:",",ampm:te("上午;下午"),mmmm:te("1月;2月;3月;4月;5月;6月;7月;8月;9月;10月;11月;12月"),mmm:te("1月;2月;3月;4月;5月;6月;7月;8月;9月;10月;11月;12月"),dddd:te("~日;~一;~二;~三;~四;~五;~六","星期"),ddd:te("周日;周一;周二;周三;周四;周五;周六")};me(X(X({},de),{},{nan:"非數值",dddd:te("~日;~一;~二;~三;~四;~五;~六","星期")}),"zh_TW"),me(X(X({},de),{},{dddd:te("~日;~一;~二;~三;~四;~五;~六","星期")}),"zh_HK"),me(X(X({},de),{},{ampm:te("午前;午後"),dddd:te("日~;月~;火~;水~;木~;金~;土~","曜日"),ddd:te("日;月;火;水;木;金;土")}),"ja"),me({group:",",ampm:te("오전;오후"),mmmm:te("1월;2월;3월;4월;5월;6월;7월;8월;9월;10월;11월;12월"),mmm:te("1월;2월;3월;4월;5월;6월;7월;8월;9월;10월;11월;12월"),dddd:te("일요일;월요일;화요일;수요일;목요일;금요일;토요일"),ddd:te("일;월;화;수;목;금;토")},"ko"),me({group:",",ampm:te("ก่อนเที่ยง;หลังเที่ยง"),mmmm:te("มกร~;กุมภาพันธ์;มีน~;เมษายน;พฤษภ~;มิถุนายน;กรกฎ~;สิงห~;กันยายน;ตุล~;พฤศจิกายน;ธันว~","าคม"),mmm:te("ม.ค.;ก.พ.;มี.ค.;เม.ย.;พ.ค.;มิ.ย.;ก.ค.;ส.ค.;ก.ย.;ต.ค.;พ.ย.;ธ.ค."),dddd:te("วันอาทิตย์;วันจันทร์;วันอังคาร;วันพุธ;วันพฤหัสบดี;วันศุกร์;วันเสาร์"),ddd:te("อา.;จ.;อ.;พ.;พฤ.;ศ.;ส.")},"th"),me(ne({decimal:",",ampm:te("dop.;odp."),mmmm:te("ledna;února;března;dubna;května;června;července;srpna;září;října;listopadu;prosince"),mmm:te("I;II;III;IV;V;VI;VII;VIII;IX;X;XI;XII"),dddd:te("neděle;pondělí;úterý;středa;čtvrtek;pátek;sobota"),bool:te("PRAVDA;NEPRAVDA")},-1,2),"cs"),me(ne({group:".",decimal:",",mmmm:te("januar;februar;marts;april;maj;juni;juli;august;september;oktober;november;december"),dddd:te("søn~;man~;tirs~;ons~;tors~;fre~;lør~","dag"),bool:te("SAND;FALSK")},13,13),"da"),me(ne({group:".",decimal:",",ampm:te("a.m.;p.m."),mmmm:te("januari;februari;maart;april;mei;juni;juli;augustus;september;oktober;november;december"),mmm:te("jan.;feb.;mrt.;apr.;mei;jun.;jul.;aug.;sep.;okt.;nov.;dec."),dddd:te("zondag;maandag;dinsdag;woensdag;donderdag;vrijdag;zaterdag"),bool:te("WAAR;ONWAAR")},-1,2),"nl"),me({group:",",preferMDY:!0},"en"),me({group:",",preferMDY:!0},"en_US"),me({group:","},"en_AU"),me({group:","},"en_CA"),me({group:","},"en_GB"),me({group:",",mmm:te("Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sept;Oct;Nov;Dec")},"en_IE"),me(ne({decimal:",",nan:"epäluku",ampm:te("ap.;ip."),mmmm:te("tammi~;helmi~;maalis~;huhti~;touko~;kesä~;heinä~;elo~;syys~;loka~;marras~;joulu~","kuuta"),mmm:te("tammik.;helmik.;maalisk.;huhtik.;toukok.;kesäk.;heinäk.;elok.;syysk.;lokak.;marrask.;jouluk."),dddd:te("sunnun~;maanan~;tiis~;keskiviikkona;tors~;perjan~;lauan~","taina"),bool:te("TOSI;EPÄTOSI")},-1,2),"fi");const ue=ne({group:" ",decimal:",",mmmm:te("janvier;février;mars;avril;mai;juin;juillet;août;septembre;octobre;novembre;décembre"),mmm:te("janv.;févr.;mars;avr.;mai;juin;juil.;août;sept.;oct.;nov.;déc."),dddd:te("~manche;lun~;mar~;mercre~;jeu~;vendre~;same~","di"),bool:te("VRAI;FAUX")},-1,13);me(X({},ue),"fr"),me(X(X({},ue),{},{mmm:te("janv.;févr.;mars;avr.;mai;juin;juill.;août;sept.;oct.;nov.;déc.")}),"fr_CA"),me(X({group:"'",decimal:"."},ue),"fr_CH");const ce=ne({mmmm:te("Januar;Februar;März;April;Mai;Juni;Juli;August;September;Oktober;November;Dezember"),mmm:te("Jan.;Feb.;März;Apr.;Mai;Juni;Juli;Aug.;Sept.;Okt.;Nov.;Dez."),dddd:te("Sonn~;Mon~;Diens~;Mittwoch;Donners~;Frei~;Sams~","tag"),bool:te("WAHR;FALSCH")},-1,12);me(X({group:".",decimal:","},ce),"de"),me(X({group:"'",decimal:"."},ce),"de_CH"),me(ne({group:".",decimal:",",ampm:te("π.μ.;μ.μ."),mmmm:te("Ιανουαρ~;Φεβρουαρ~;Μαρτ~;Απριλ~;Μαΐου;Ιουν~;Ιουλ~;Αυγούστου;Σεπτεμβρ~;Οκτωβρ~;Νοεμβρ~;Δεκεμβρ~","ίου"),mmm:te("Ιαν;Φεβ;Μαρ;Απρ;Μαΐ;Ιουν;Ιουλ;Αυγ;Σεπ;Οκτ;Νοε;Δεκ"),dddd:te("Κυριακή;Δευτέρα;Τρίτη;Τετάρτη;Πέμπτη;Παρασκευή;Σάββατο")},-1,3),"el"),me({decimal:",",ampm:te("de.;du."),mmmm:te("január;február;március;április;május;június;július;augusztus;szeptember;október;november;december"),mmm:te("jan.;febr.;márc.;ápr.;máj.;jún.;júl.;aug.;szept.;okt.;nov.;dec."),dddd:te("vasárnap;hétfő;kedd;szerda;csütörtök;péntek;szombat"),ddd:te("V;H;K;Sze;Cs;P;Szo"),bool:te("IGAZ;HAMIS")},"hu"),me(ne({group:".",decimal:",",ampm:te("f.h.;e.h."),mmmm:te("janúar;febrúar;mars;apríl;maí;júní;júlí;ágúst;september;október;nóvember;desember"),dddd:te("sunnu~;mánu~;þriðju~;miðviku~;fimmtu~;föstu~;laugar~","dagur")},13,13),"is"),me(ne({group:".",decimal:",",mmmm:te("Januari;Februari;Maret;April;Mei;Juni;Juli;Agustus;September;Oktober;November;Desember"),dddd:te("Minggu;Senin;Selasa;Rabu;Kamis;Jumat;Sabtu")},3,3),"id");const pe=ne({mmmm:te("gennaio;febbraio;marzo;aprile;maggio;giugno;luglio;agosto;settembre;ottobre;novembre;dicembre"),dddd:te("domenica;lunedì;martedì;mercoledì;giovedì;venerdì;sabato"),bool:te("VERO;FALSO")},3,3);me(X({group:".",decimal:","},pe),"it"),me(X({group:"'",decimal:"."},pe),"it_CH");const fe={decimal:",",ampm:te("a.m.;p.m."),mmmm:te("januar;februar;mars;april;mai;juni;juli;august;september;oktober;november;desember"),mmm:te("jan.;feb.;mar.;apr.;mai;jun.;jul.;aug.;sep.;okt.;nov.;des."),dddd:te("søn~;man~;tirs~;ons~;tors~;fre~;lør~","dag"),bool:te("SANN;USANN")};me(ne(X({},fe),-1,13),"nb"),me(ne(X({},fe),-1,13),"no"),me(ne({decimal:",",mmmm:te("stycznia;lutego;marca;kwietnia;maja;czerwca;lipca;sierpnia;września;października;listopada;grudnia"),dddd:te("niedziela;poniedziałek;wtorek;środa;czwartek;piątek;sobota"),ddd:te("niedz.;pon.;wt.;śr.;czw.;pt.;sob."),bool:te("PRAWDA;FAŁSZ")},3,-1),"pl");const he={group:".",decimal:",",mmmm:te("janeiro;fevereiro;março;abril;maio;junho;julho;agosto;setembro;outubro;novembro;dezembro"),dddd:te("domingo;segunda-feira;terça-feira;quarta-feira;quinta-feira;sexta-feira;sábado"),bool:te("VERDADEIRO;FALSO")};me(ne(he,13,13),"pt"),me(ne(he,13,13),"pt_BR"),me({decimal:",",nan:"не число",mmmm:te("января;февраля;марта;апреля;мая;июня;июля;августа;сентября;октября;ноября;декабря"),mmm:te("янв.;февр.;мар.;апр.;мая;июн.;июл.;авг.;сент.;окт.;нояб.;дек."),dddd:te("воскресенье;понедельник;вторник;среда;четверг;пятница;суббота"),ddd:te("вс;пн;вт;ср;чт;пт;сб"),mmmm6:te("рамадан;шавваль;зуль-каада;зуль-хиджжа;мухаррам;раби-уль-авваль;раби-уль-ахир;джумад-уль-авваль;джумад-уль-ахир;раджаб;шаабан;рамадан"),mmm6:te("рам.;шав.;зуль-к.;зуль-х.;мух.;раб. I;раб. II;джум. I;джум. II;радж.;шааб.;рам."),bool:te("ИСТИНА;ЛОЖЬ")},"ru"),me(ne({decimal:",",mmmm:te("januára;februára;marca;apríla;mája;júna;júla;augusta;septembra;októbra;novembra;decembra"),dddd:te("nedeľa;pondelok;utorok;streda;štvrtok;piatok;sobota")},3,2),"sk");const ge={group:".",decimal:",",ampm:te("a. m.;p. m."),mmmm:te("enero;febrero;marzo;abril;mayo;junio;julio;agosto;septiem~;octu~;noviem~;diciem~","bre"),mmm:te("ene;feb;mar;abr;may;jun;jul;ago;sept;oct;nov;dic"),dddd:te("domingo;lunes;martes;miércoles;jueves;viernes;sábado"),ddd:te("dom;lun;mar;mié;jue;vie;sáb"),bool:te("VERDADERO;FALSO")},be=te("ene;feb;mar;abr;may;jun;jul;ago;sep;oct;nov;dic"),ye=te("ene.;feb.;mar.;abr.;may.;jun.;jul.;ago.;sept.;oct.;nov.;dic.");me(X({},ge),"es"),me(X({},ge),"es_AR"),me(X({},ge),"es_BO"),me(X({},ge),"es_CL"),me(X({},ge),"es_CO"),me(X({},ge),"es_EC"),me(X(X({},ge),{},{mmm:be,ampm:te("a.m.;p.m.")}),"es_MX"),me(X(X({},ge),{},{mmm:ye}),"es_PY"),me(X(X({},ge),{},{mmm:ye}),"es_UY"),me(X(X({},ge),{},{mmm:ye,mmmm:te("enero;febrero;marzo;abril;mayo;junio;julio;agosto;setiembre;octubre;noviembre;diciembre")}),"es_VE"),me({decimal:",",ampm:te("fm;em"),mmmm:te("januari;februari;mars;april;maj;juni;juli;augusti;september;oktober;november;december"),mmm:te("jan.;feb.;mars;apr.;maj;juni;juli;aug.;sep.;okt.;nov.;dec."),dddd:te("sön~;mån~;tis~;ons~;tors~;fre~;lör~","dag"),ddd:te("sön;mån;tis;ons;tors;fre;lör")},"sv"),me(ne({group:".",decimal:",",ampm:te("ÖÖ;ÖS"),mmmm:te("Ocak;Şubat;Mart;Nisan;Mayıs;Haziran;Temmuz;Ağustos;Eylül;Ekim;Kasım;Aralık"),mmm:te("Oca;Şub;Mar;Nis;May;Haz;Tem;Ağu;Eyl;Eki;Kas;Ara"),dddd:te("Pazar;Pazartesi;Salı;Çarşamba;Perşembe;Cuma;Cumartesi"),ddd:te("Paz;Pzt;Sal;Çar;Per;Cum;Cmt"),bool:te("DOĞRU;YANLIŞ")},3,-1),"tr"),me({group:",",ampm:te("yb;yh"),mmmm:te("Ionawr;Chwefror;Mawrth;Ebrill;Mai;Mehefin;Gorffennaf;Awst;Medi;Hydref;Tachwedd;Rhagfyr"),mmm:te("Ion;Chwef;Maw;Ebr;Mai;Meh;Gorff;Awst;Medi;Hyd;Tach;Rhag"),dddd:te("Dydd Sul;Dydd Llun;Dydd Mawrth;Dydd Mercher;Dydd Iau;Dydd Gwener;Dydd Sadwrn"),ddd:te("Sul;Llun;Maw;Mer;Iau;Gwen;Sad")},"cy"),me({group:".",decimal:",",mmmm:te("yanvar;fevral;mart;aprel;may;iyun;iyul;avqust;sentyabr;oktyabr;noyabr;dekabr"),mmm:te("yan;fev;mar;apr;may;iyn;iyl;avq;sen;okt;noy;dek"),dddd:te("bazar;bazar ertəsi;çərşənbə axşamı;çərşənbə;cümə axşamı;cümə;şənbə"),ddd:te("B.;B.e.;Ç.a.;Ç.;C.a.;C.;Ş.")},"az"),me(ne({decimal:",",mmmm:te("студзеня;лютага;сакавіка;красавіка;мая;чэрвеня;ліпеня;жніўня;верасня;кастрычніка;лістапада;снежня"),dddd:te("нядзеля;панядзелак;аўторак;серада;чацвер;пятніца;субота"),ddd:te("нд;пн;аў;ср;чц;пт;сб")},3,-1),"be"),me({decimal:",",ampm:te("пр.об.;сл.об."),mmmm:te("януари;февруари;март;април;май;юни;юли;август;септември;октомври;ноември;декември"),mmm:te("яну;фев;март;апр;май;юни;юли;авг;сеп;окт;ное;дек"),dddd:te("неделя;понеделник;вторник;сряда;четвъртък;петък;събота"),ddd:te("нд;пн;вт;ср;чт;пт;сб"),bool:te("ИСТИНА;ЛОЖЬ")},"bg"),me({group:".",decimal:",",mmmm:te("de gener;de febrer;de març;d’abril;de maig;de juny;de juliol;d’agost;de setembre;d’octubre;de novembre;de desembre"),mmm:te("de gen.;de febr.;de març;d’abr.;de maig;de juny;de jul.;d’ag.;de set.;d’oct.;de nov.;de des."),dddd:te("diumenge;dilluns;dimarts;dimecres;dijous;divendres;dissabte"),ddd:te("dg.;dl.;dt.;dc.;dj.;dv.;ds."),ampm:te("a. m.;p. m.")},"ca"),me(ne({group:",",decimal:".",mmmm:te("Enero;Pebrero;Marso;Abril;Mayo;Hunyo;Hulyo;Agosto;Setyembre;Oktubre;Nobyembre;Disyembre"),dddd:te("Linggo;Lunes;Martes;Miyerkules;Huwebes;Biyernes;Sabado")},3,3),"fil"),me({group:",",decimal:".",mmmm:te("જાન્યુઆરી;ફેબ્રુઆરી;માર્ચ;એપ્રિલ;મે;જૂન;જુલાઈ;ઑગસ્ટ;સપ્ટેમ્બર;ઑક્ટોબર;નવેમ્બર;ડિસેમ્બર"),mmm:te("જાન્યુ;ફેબ્રુ;માર્ચ;એપ્રિલ;મે;જૂન;જુલાઈ;ઑગસ્ટ;સપ્ટે;ઑક્ટો;નવે;ડિસે"),dddd:te("રવિ~;સોમ~;મંગળ~;બુધ~;ગુરુ~;શુક્ર~;શનિ~","વાર"),ddd:te("રવિ;સોમ;મંગળ;બુધ;ગુરુ;શુક્ર;શનિ")},"gu"),me({group:",",decimal:".",ampm:te("לפנה״צ;אחה״צ"),dddd:te("~ראשון;~שני;~שלישי;~רביעי;~חמישי;~שישי;~שבת","יום "),ddd:te("~א׳;~ב׳;~ג׳;~ד׳;~ה׳;~ו׳;שבת","יום "),mmmm:te("ינואר;פברואר;מרץ;אפריל;מאי;יוני;יולי;אוגוסט;ספטמבר;אוקטובר;נובמבר;דצמבר"),mmm:te("ינו׳;פבר׳;מרץ;אפר׳;מאי;יוני;יולי;אוג׳;ספט׳;אוק׳;נוב׳;דצמ׳"),mmmm6:te("רמדאן;שוואל;ד׳ו אל־קעדה;ד׳ו אל־חיג׳ה;מוחרם;רביע אל־אוול;רביע א־ת׳אני;ג׳ומאדא אל־אולא;ג׳ומאדא א־ת׳אניה;רג׳ב;שעבאן;רמדאן"),mmm6:te("רמדאן;שוואל;ד׳ו אל־קעדה;ד׳ו אל־חיג׳ה;מוחרם;רביע א׳;רביע ב׳;ג׳ומאדא א׳;ג׳ומאדא ב׳;רג׳ב;שעבאן;רמדאן")},"he"),me(ne({group:".",decimal:",",mmmm:te("siječnja;veljače;ožujka;travnja;svibnja;lipnja;srpnja;kolovoza;rujna;listopada;studenoga;prosinca"),mmm:te("sij;velj;ožu;tra;svi;lip;srp;kol;ruj;lis;stu;pro"),dddd:te("nedjelja;ponedjeljak;utorak;srijeda;četvrtak;petak;subota")},-1,3),"hr"),me({decimal:",",mmmm:te("հունվարի;փետրվարի;մարտի;ապրիլի;մայիսի;հունիսի;հուլիսի;օգոստոսի;սեպտեմբերի;հոկտեմբերի;նոյեմբերի;դեկտեմբերի"),mmm:te("հնվ;փտվ;մրտ;ապր;մյս;հնս;հլս;օգս;սեպ;հոկ;նոյ;դեկ"),dddd:te("կիրակի;երկուշաբթի;երեքշաբթի;չորեքշաբթի;հինգշաբթի;ուրբաթ;շաբաթ"),ddd:te("կիր;երկ;երք;չրք;հնգ;ուր;շբթ")},"hy"),me(ne({decimal:",",mmmm:te("იანვარი;თებერვალი;მარტი;აპრილი;მაისი;ივნისი;ივლისი;აგვისტო;სექტემბერი;ოქტომბერი;ნოემბერი;დეკემბერი"),dddd:te("კვირა;ორშაბათი;სამშაბათი;ოთხშაბათი;ხუთშაბათი;პარასკევი;შაბათი")},3,3),"ka"),me(ne({decimal:",",mmmm:te("қаңтар;ақпан;наурыз;сәуір;мамыр;маусым;шілде;тамыз;қыркүйек;қазан;қараша;желтоқсан"),dddd:te("жексенбі;дүйсенбі;сейсенбі;сәрсенбі;бейсенбі;жұма;сенбі"),ddd:te("жс;дс;сс;ср;бс;жм;сб")},13,-1),"kk"),me({group:",",mmmm:te("ಜನವರಿ;ಫೆಬ್ರವರಿ;ಮಾರ್ಚ್;ಏಪ್ರಿಲ್;ಮೇ;ಜೂನ್;ಜುಲೈ;ಆಗಸ್ಟ್;ಸೆಪ್ಟೆಂಬರ್;ಅಕ್ಟೋಬರ್;ನವೆಂಬರ್;ಡಿಸೆಂಬರ್"),mmm:te("ಜನವರಿ;ಫೆಬ್ರವರಿ;ಮಾರ್ಚ್;ಏಪ್ರಿ;ಮೇ;ಜೂನ್;ಜುಲೈ;ಆಗಸ್ಟ್;ಸೆಪ್ಟೆಂ;ಅಕ್ಟೋ;ನವೆಂ;ಡಿಸೆಂ"),dddd:te("ಭಾನು~;ಸೋಮ~;ಮಂಗಳ~;ಬುಧ~;ಗುರು~;ಶುಕ್ರ~;ಶನಿ~","ವಾರ"),ddd:te("ಭಾನು;ಸೋಮ;ಮಂಗಳ;ಬುಧ;ಗುರು;ಶುಕ್ರ;ಶನಿ"),ampm:te("ಪೂರ್ವಾಹ್ನ;ಅಪರಾಹ್ನ")},"kn"),me({decimal:",",mmmm:te("sausio;vasario;kovo;balandžio;gegužės;birželio;liepos;rugpjūčio;rugsėjo;spalio;lapkričio;gruodžio"),mmm:te("saus.;vas.;kov.;bal.;geg.;birž.;liep.;rugp.;rugs.;spal.;lapkr.;gruod."),dddd:te("sekmadienis;pirmadienis;antradienis;trečiadienis;ketvirtadienis;penktadienis;šeštadienis"),ddd:te("sk;pr;an;tr;kt;pn;št"),ampm:te("priešpiet;popiet")},"lt"),me({decimal:",",mmmm:te("janvāris;februāris;marts;aprīlis;maijs;jūnijs;jūlijs;augusts;septembris;oktobris;novembris;decembris"),mmm:te("janv.;febr.;marts;apr.;maijs;jūn.;jūl.;aug.;sept.;okt.;nov.;dec."),dddd:te("svētdiena;pirmdiena;otrdiena;trešdiena;ceturtdiena;piektdiena;sestdiena"),ddd:te("svētd.;pirmd.;otrd.;trešd.;ceturtd.;piektd.;sestd."),ampm:te("priekšpusdienā;pēcpusdienā")},"lv"),me({group:",",decimal:".",mmmm:te("ജനുവരി;ഫെബ്രുവരി;മാർച്ച്;ഏപ്രിൽ;മേയ്;ജൂൺ;ജൂലൈ;ഓഗസ്റ്റ്;സെപ്റ്റംബർ;ഒക്‌ടോബർ;നവംബർ;ഡിസംബർ"),mmm:te("ജനു;ഫെബ്രു;മാർ;ഏപ്രി;മേയ്;ജൂൺ;ജൂലൈ;ഓഗ;സെപ്റ്റം;ഒക്ടോ;നവം;ഡിസം"),dddd:te("ഞായറാഴ്‌ച;തിങ്കളാഴ്‌ച;ചൊവ്വാഴ്ച;ബുധനാഴ്‌ച;വ്യാഴാഴ്‌ച;വെള്ളിയാഴ്‌ച;ശനിയാഴ്‌ച"),ddd:te("ഞായർ;തിങ്കൾ;ചൊവ്വ;ബുധൻ;വ്യാഴം;വെള്ളി;ശനി")},"ml"),me({group:",",decimal:".",mmmm:te("нэгдүгээ~;хоёрдугаа~;гуравдугаа~;дөрөвдүгээ~;тавдугаа~;зургаадугаа~;долоодугаа~;наймдугаа~;есдүгээ~;аравдугаа~;арван нэгдүгээ~;арван хоёрдугаа~","р сар"),mmm:te("1~;2~;3~;4~;5~;6~;7~;8~;9~;10~;11~;12~","-р сар"),dddd:te("ням;даваа;мягмар;лхагва;пүрэв;баасан;бямба"),ddd:te("Ня;Да;Мя;Лх;Пү;Ба;Бя"),ampm:te("ү.ө.;ү.х.")},"mn"),me({group:",",decimal:".",mmmm:te("जानेवारी;फेब्रुवारी;मार्च;एप्रिल;मे;जून;जुलै;ऑगस्ट;सप्टेंबर;ऑक्टोबर;नोव्हेंबर;डिसेंबर"),mmm:te("जाने;फेब्रु;मार्च;एप्रि;मे;जून;जुलै;ऑग;सप्टें;ऑक्टो;नोव्हें;डिसें"),dddd:te("रविवार;सोमवार;मंगळवार;बुधवार;गुरुवार;शुक्रवार;शनिवार"),ddd:te("रवि;सोम;मंगळ;बुध;गुरु;शुक्र;शनि")},"mr"),me(ne({group:",",decimal:".",mmmm:te("ဇန်နဝါရီ;ဖေဖော်ဝါရီ;မတ်;ဧပြီ;မေ;ဇွန်;ဇူလိုင်;ဩဂုတ်;စက်တင်ဘာ;အောက်တိုဘာ;နိုဝင်ဘာ;ဒီဇင်ဘာ"),mmm:te("ဇန်;ဖေ;မတ်;ဧ;မေ;ဇွန်;ဇူ;ဩ;စက်;အောက်;နို;ဒီ"),dddd:te("တနင်္ဂနွေ;တနင်္လာ;အင်္ဂါ;ဗုဒ္ဓဟူး;ကြာသပတေး;သောကြာ;စနေ"),ampm:te("နံနက်;ညနေ")},-1,0),"my"),me({group:",",decimal:".",mmmm:te("ਜਨਵਰੀ;ਫ਼ਰਵਰੀ;ਮਾਰਚ;ਅਪ੍ਰੈਲ;ਮਈ;ਜੂਨ;ਜੁਲਾਈ;ਅਗਸਤ;ਸਤੰਬਰ;ਅਕਤੂਬਰ;ਨਵੰਬਰ;ਦਸੰਬਰ"),mmm:te("ਜਨ;ਫ਼ਰ;ਮਾਰਚ;ਅਪ੍ਰੈ;ਮਈ;ਜੂਨ;ਜੁਲਾ;ਅਗ;ਸਤੰ;ਅਕਤੂ;ਨਵੰ;ਦਸੰ"),dddd:te("ਐਤਵਾਰ;ਸੋਮਵਾਰ;ਮੰਗਲਵਾਰ;ਬੁੱਧਵਾਰ;ਵੀਰਵਾਰ;ਸ਼ੁੱਕਰਵਾਰ;ਸ਼ਨਿੱਚਰਵਾਰ"),ddd:te("ਐਤ;ਸੋਮ;ਮੰਗਲ;ਬੁੱਧ;ਵੀਰ;ਸ਼ੁੱਕਰ;ਸ਼ਨਿੱਚਰ"),ampm:te("ਪੂ.ਦੁ.;ਬਾ.ਦੁ.")},"pa"),me({group:".",decimal:",",mmmm:te("ianuarie;februarie;martie;aprilie;mai;iunie;iulie;august;septem~;octom~;noiem~;decem~","brie"),mmm:te("ian.;feb.;mar.;apr.;mai;iun.;iul.;aug.;sept.;oct.;nov.;dec."),dddd:te("duminică;luni;marți;miercuri;joi;vineri;sâmbătă"),ddd:te("dum.;lun.;mar.;mie.;joi;vin.;sâm."),ampm:te("a.m.;p.m.")},"ro"),me(ne({group:".",decimal:",",mmmm:te("januar;februar;marec;april;maj;junij;julij;avgust;september;oktober;november;december"),mmm:te("jan.;feb.;mar.;apr.;maj;jun.;jul.;avg.;sep.;okt.;nov.;dec."),dddd:te("nedelja;ponedeljek;torek;sreda;četrtek;petek;sobota"),ampm:te("dop.;pop.")},-1,13),"sl"),me(ne({group:".",decimal:",",mmmm:te("јануар;фебруар;март;април;мај;јун;јул;август;септембар;октобар;новембар;децембар"),dddd:te("недеља;понедељак;уторак;среда;четвртак;петак;субота")},3,3),"sr"),me({group:",",decimal:".",mmmm:te("ஜனவரி;பிப்ரவரி;மார்ச்;ஏப்ரல்;மே;ஜூன்;ஜூலை;ஆகஸ்ட்;செப்டம்பர்;அக்டோபர்;நவம்பர்;டிசம்பர்"),mmm:te("ஜன.;பிப்.;மார்.;ஏப்.;மே;ஜூன்;ஜூலை;ஆக.;செப்.;அக்.;நவ.;டிச."),dddd:te("ஞாயிறு;திங்கள்;செவ்வாய்;புதன்;வியாழன்;வெள்ளி;சனி"),ddd:te("ஞாயி.;திங்.;செவ்.;புத.;வியா.;வெள்.;சனி")},"ta"),me({group:",",decimal:".",mmmm:te("జనవరి;ఫిబ్రవరి;మార్చి;ఏప్రిల్;మే;జూన్;జులై;ఆగస్టు;సెప్టెంబర్;అక్టోబర్;నవంబర్;డిసెంబర్"),mmm:te("జన;ఫిబ్ర;మార్చి;ఏప్రి;మే;జూన్;జులై;ఆగ;సెప్టెం;అక్టో;నవం;డిసెం"),dddd:te("ఆదివారం;సోమవారం;మంగళవారం;బుధవారం;గురువారం;శుక్రవారం;శనివారం"),ddd:te("ఆది;సోమ;మంగళ;బుధ;గురు;శుక్ర;శని")},"te"),me({decimal:",",mmmm:te("січня;лютого;березня;квітня;травня;червня;липня;серпня;вересня;жовтня;листопада;грудня"),mmm:te("січ.;лют.;бер.;квіт.;трав.;черв.;лип.;серп.;вер.;жовт.;лист.;груд."),dddd:te("неділю;понеділок;вівторок;середу;четвер;пʼятницю;суботу"),ddd:te("нд;пн;вт;ср;чт;пт;сб"),ampm:te("дп;пп")},"uk"),me({group:".",decimal:",",mmmm:te("~1;~2;~3;~4;~5;~6;~7;~8;~9;~10;~11;~12","tháng "),mmm:te("~1;~2;~3;~4;~5;~6;~7;~8;~9;~10;~11;~12","thg "),dddd:te("Chủ Nhật;Thứ Hai;Thứ Ba;Thứ Tư;Thứ Năm;Thứ Sáu;Thứ Bảy"),ddd:te("CN;Th 2;Th 3;Th 4;Th 5;Th 6;Th 7"),ampm:te("SA;CH")},"vi"),me(ne({group:"٬",decimal:"٫",ampm:te("ص;م"),mmmm:te("يناير;فبراير;مارس;أبريل;مايو;يونيو;يوليو;أغسطس;سبتمبر;أكتوبر;نوفمبر;ديسمبر"),dddd:te("الأحد;الاثنين;الثلاثاء;الأربعاء;الخميس;الجمعة;السبت"),mmmm6:te("رمضان;شوال;ذو القعدة;ذو الحجة;محرم;ربيع الأول;ربيع الآخرة;جمادى الأولى;جمادى الآخرة;رجب;شعبان;رمضان")},0,0),"ar"),me({group:",",decimal:".",mmmm:te("জানুয়ারী;ফেব্রুয়ারী;মার্চ;এপ্রিল;মে;জুন;জুলাই;আগস্ট;সেপ্টেম্বর;অক্টোবর;নভেম্বর;ডিসেম্বর"),mmm:te("জানু;ফেব;মার্চ;এপ্রি;মে;জুন;জুল;আগ;সেপ্টেঃ;অক্টোঃ;নভেঃ;ডিসেঃ"),dddd:te("রবিবার;সোমবার;মঙ্গলবার;বুধবার;বৃহস্পতিবার;শুক্রবার;শনিবার"),ddd:te("রবি;সোম;মঙ্গল;বুধ;বৃহস্পতি;শুক্র;শনি")},"bn"),me({group:",",decimal:".",mmmm:te("जनवरी;फ़रवरी;मार्च;अप्रैल;मई;जून;जुलाई;अगस्त;सितंबर;अक्तूबर;नवंबर;दिसंबर"),mmm:te("जन॰;फ़र॰;मार्च;अप्रैल;मई;जून;जुल॰;अग॰;सित॰;अक्तू॰;नव॰;दिस॰"),dddd:te("रविवार;सोमवार;मंगलवार;बुधवार;गुरुवार;शुक्रवार;शनिवार"),ddd:te("रवि;सोम;मंगल;बुध;गुरु;शुक्र;शनि"),ampm:te("am;pm")},"hi");const ve={overflow:"######",dateErrorThrows:!1,dateErrorNumber:!0,bigintErrorNumber:!1,dateSpanLarge:!0,leap1900:!0,nbsp:!1,throws:!0,invalid:"######",locale:"",ignoreTimezone:!1,grouping:[3,3],indexColors:!0,skipChar:"",repeatChar:""};function _e(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if("number"!=typeof e)return e;if(e<0)return-_e(-e,t);if(t){const n=10**t||1;return _e(e*n,0)/n}return Math.round(e)}const je=1e-13;function Me(e){const t=e<0?-1:1,n=10**((arguments.length>1&&void 0!==arguments[1]?arguments[1]:2)||2),r=10**((arguments.length>2&&void 0!==arguments[2]?arguments[2]:2)||2);let a,i,o=Math.abs(e),s=0,m=0,l=0,d=1;if((e=o)%1==0)i=[e*t,1];else if(e<1e-19)i=[t,1e19];else if(e>1e19)i=[1e19*t,1];else{do{if(o=1/(o-Math.floor(o)),a=d,d=d*Math.floor(o)+s,s=a,m=l,l=Math.floor(e*d+.5),l>=n||d>=r)return[t*m,s]}while(Math.abs(e-l/d)>=je&&o!==Math.floor(o));i=[t*l,d]}return i}const ke=Math.floor;function Fe(e){if((!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&e>=0){if(0===e)return[1900,1,0];if(60===e)return[1900,2,29];if(e<60)return[1900,e<32?1:2,(e-1)%31+1]}let t=e+68569+2415019;const n=ke(4*t/146097);t-=ke((146097*n+3)/4);const r=ke(4e3*(t+1)/1461001);t=t-ke(1461*r/4)+31;const a=ke(80*t/2447),i=t-ke(2447*a/80);t=ke(a/11);return[0|100*(n-49)+r+t,0|a+2-12*t,0|i]}function xe(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const r=ke(e);return t===u?function(e){if(60===e)throw new Error("#VALUE!");if(e<=1)return[1317,8,29];if(e<60)return[1317,e<32?9:10,1+(e-2)%30];const t=10631/30,n=.1335;let r=e+466935;const a=ke(r/10631);r-=10631*a;const i=ke((r-n)/t);r-=ke(i*t+n);const o=ke((r+28.5001)/29.5);return 13===o?[30*a+i,12,30]:[30*a+i,o,r-ke(29.5001*o-29)]}(r):t===l?function(e){return Fe(e+1462)}(r):Fe(r,n)}const Ce=Math.floor,Ae=86400;function we(e,t){let n=null;if(Array.isArray(e)){const[t,r,a,i,o,s]=e;n=Date.UTC(t,null==r?0:r-1,null!=a?a:1,i||0,o||0,s||0)}else if(e instanceof Date&&(n=1*e,null==t||!t.ignoreTimezone)){const t=new Date;t.setUTCFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t.setUTCHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n=1*t}if(null!=n&&isFinite(n)){const e=n/864e5;return e-(e<=-25509?-25568:-25569)}return null}const Se={j:"d",d:"d",D:"ddd",l:"dddd",n:"m",m:"m",M:"mmm",F:"mmmm",y:"yy",Y:"yyyy"},ze={j:"dd",d:"dd",D:"ddd",l:"dddd",n:"mm",m:"mm",M:"mmm",F:"mmmm",y:"yy",Y:"yyyy"},Ee={},Ie={};function De(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(e){const r=e[0],a=e.slice(1);"!"===r?De(a,t,4):"?"===r?De(a,t,2):(t[r]=t[r]||{},De(a,t[r],n))}else t.$=n}function Oe(e,t){De(e,t),De(e+" x",t),De(e+" l",t),De(e+" l x",t),De("l "+e,t),De("l "+e+" x",t),De(e+" D",t),De(e+" D x",t),De("D "+e,t),De("D "+e+" x",t)}["!d-m-y","!d-m-Y","!j-m-y","!j-m-Y","!d-n-y","!d-n-Y","!j-n-y","!j-n-Y","?m-d-y","?m-d-Y","?m-j-y","?m-j-Y","?n-d-y","?n-d-Y","?n-j-y","?n-j-Y","d-M-y","d-M-Y","j-M-y","j-M-Y","M-d-y","M-d-Y","M-j-y","M-j-Y","d-F-y","d-F-Y","F-d-y","F-d-Y","F-j-y","F-j-Y","j-F-y","j-F-Y","y-F-d","y-F-j","y-M-d","y-M-j","Y-F-d","Y-F-j","Y-M-d","Y-m-d","Y-M-j","Y-m-j","Y-n-d","Y-n-j","j-F","j-M","d-F","d-M","n-d","n-j","n-Y","m-d","m-j","m-Y","M-Y","M-y","F-y","F-Y","Y-M","Y-n","Y-m","Y-F","Y-M"].forEach((e=>{e.startsWith("?")||Oe(e,Ee),e.startsWith("!")||Oe(e,Ie)}));const Ne=(new Date).getUTCFullYear(),Te=" ",Ye=" ",Pe=" ",Re="'",Le="٬",Ue={".":[",",Ye,Pe,Re,Le],",":[".",Ye,Pe,Re,Le],"٫":[".",Ye,Pe,Re,Le]},He=e=>1===(null==e?void 0:e.length)&&e>="0"&&e<="9";function Ge(e){const t=oe((arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).locale||"")||le,n=t.decimal,r=[...Ue[n]||[Re,Le]];r.includes(t.group)||t.group===Te||t.group===n||r.push(t.group);let a="",i="",o=1,s="",m=!1,l=!1,d=!1,u=!1,c=!1,p=null,f=!1,h=0;const g=[Te,Ye,Pe,"+","%","(","-"].concat(W);for(;g.includes(e[h]);){const t=e[h];if("-"===t){if(m||l)return null;m=!0,o=-1}else if($.test(t)){if(c)return null;c=!0,p=t}else if("("===t){if(l||m)return null;l=!0,o=-1}else if("%"===t){if(u)return null;u=!0}h++}let b,y=!1;if(e[h]===n||He(e[h]))for(;h12)return!1;if(2===t){if(n>(e%4==0&&e%100!=0||e%400==0||1900===e?29:28))return!1}else if((4===t||6===t||9===t||11===t)&&n>30||(1===t||3===t||5===t||7===t||8===t||10===t||12===t)&&n>31)return!1;return!0}const Je=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(const r of t)if(e.startsWith(r[0])){let t=r[0].length;return!n||"D"!==r[2]&&"M"!==r[2]||"."!==e[t]||t++,[e.slice(0,t),r]}return["",null]},Ve=(e,t,n,r)=>{const a=n.path||"",i=Object.keys(t);for(const o of i){let i;if(t[o]){if("$"===o||"€"===o)e||(i=n);else if("-"===o){const s=/^(\s*([./-]|,\s)\s*|\s+)/.exec(e);if(s){const m="-"===s[1]||"/"===s[1]||"."===s[1]?s[1]:" ";if(!n.sep||n.sep===m){const l=s[0].replace(/\s+/g," ");i=Ve(e.slice(s[0].length),t[o],X(X({},n),{},{sep:m,path:a+l}),r)}}}else if(" "===o){const s=/^[,.]?\s+/.exec(e);if(s){const m=s[0].replace(/\s+/g," ");i=Ve(e.slice(s[0].length),t[o],X(X({},n),{},{path:a+m}),r)}}else if("j"===o||"d"===o){const s=/^(0?[1-9]|1\d|2\d|3[01])\b/.exec(e);s&&(i=Ve(e.slice(s[0].length),t[o],X(X({},n),{},{day:s[0],path:a+o}),r))}else if("n"===o||"m"===o){const s=/^(0?[1-9]|1[012])\b/.exec(e);s&&(i=Ve(e.slice(s[0].length),t[o],X(X({},n),{},{month:+s[0],_mon:s[0],path:a+o}),r))}else if("F"===o||"M"===o){const[s,m]=Je(e,r.mon,r.mp);(null==m?void 0:m[2])===o&&(i=Ve(e.slice(s.length),t[o],X(X({},n),{},{month:m[1],_mon:s,path:a+o}),r))}else if("l"===o||"D"===o){const[s,m]=Je(e,r.day,r.dp);(null==m?void 0:m[2])===o&&(i=Ve(e.slice(s.length),t[o],X(X({},n),{},{path:a+o}),r))}else if("y"===o){const s=/^\d\d\b/.exec(e);if(s){const m=+s[0]>=30?+s[0]+1900:+s[0]+2e3;i=Ve(e.slice(s[0].length),t[o],X(X({},n),{},{year:m,path:a+o}),r)}}else if("Y"===o){const s=/^\d\d\d\d\b/.exec(e);s&&(i=Ve(e.slice(s[0].length),t[o],X(X({},n),{},{year:+s[0],path:a+o}),r))}else{if("x"!==o)throw new Error('Unknown date token "'.concat(o,'"'));{const s=Xe(e,{locale:r.locale});s&&(i=Ve("",t[o],X(X({},n),{},{time:s.v,tf:s.z,path:a+o}),r))}}if(i&&Be(n.year||1916,n.month||1,n.day?+n.day:1))return i}}},We=e=>e.replace(/\s+/g," ").trim().replace(/’/,"'").replace(/\.$/,"").toLowerCase(),$e=(e,t)=>{const n=e.map(((e,n)=>[We(e),n+1,t]));return n.sort(((e,t)=>t[0].length-e[0].length)),n};function Ze(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=oe(t.locale||"")||le,r={mon:$e(n.mmmm,"F").concat($e(n.mmm,"M")),mp:"."===n.mmm[0].at(-1),day:$e(n.dddd,"l").concat($e(n.ddd,"D")),dp:"."===n.ddd[0].at(-1),locale:t.locale},a=Ve(We(e),n.preferMDY?Ie:Ee,{path:""},r);if(a){var i;if("."===a.sep&&3===a.path.length)return null;const e=+(null!==(i=a.year)&&void 0!==i?i:Ne);a.day||(a.day=1);let t=-1/0;if(e<1900)return null;e<=1900&&a.month<=2?t=25568:e<1e4&&(t=25569);const n=Date.UTC(e,a.month-1,a.day)/864e5+t+(a.time||0);if(n>=0&&n<=2958465){const e="0"===a._mon[0]||"0"===a.day[0]||2===a._mon.length&&2===a.day.length;return{v:n,z:a.path.replace(/[jdlDnmMFyYx]/g,(t=>"x"===t?a.tf||"":(e?ze[t]:Se[t])||t))}}}return null}const Ke=e=>e.replace(/\s+/g,"").trim().replace(/\./g,"").toLowerCase();function Xe(e){const t=oe((arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).locale||"")||le,n=/^\s*([10]?\d|2[0-4])(?::([0-5]\d|\d))?(?::([0-5]\d|\d))?(\.\d{1,10})?(?=\s*[^\s\d]|$)/.exec(e);let r="";if(n){const a=Ke(e.slice(n[0].length));if(a===Ke(t.ampm[0])||"a"===a||"am"===a)r="a";else if(a===Ke(t.ampm[1])||"p"===a||"pm"===a)r="p";else if(":"===a)n[3]||(n[3]="0"),n[2]||(n[2]="0");else if(a)return null}if(n){const[,e,t,a,i]=n;if(i&&!a)return null;if(!r&&!t&&!a)return null;let o=1*+(e||0);if(r){if(o>=13)return null;"a"===r?12===o&&(o=0):"p"===r&&12!==o&&(o+=12)}return{v:(60*o*60+60*(1*+(t||0))+1*+(a||0)+1*+(i||0))/86400,z:(2===e.length?"hh":"h")+":mm"+(a?":ss":"")+(r?" AM/PM":"")}}return null}function qe(e){const t=oe((arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).locale||"")||le,n=e.trim().toLowerCase(),r=t.bool[0].toLowerCase();if("true"===n||n===r)return{v:!0};const a=t.bool[1].toLowerCase();return"false"===n||n===a?{v:!1}:null}function Qe(e,t,n){return t[n+"_max"]=e.length,t[n+"_min"]=e.replace(/#/g,"").length,t}function et(e,t){"string"==typeof e?t.push({type:"string",value:e}):t.push(e)}function tt(e,t){const n=null==e?void 0:e.type;return n===p||n===f||n===h||n===A&&"den"===t}function nt(l){const p=[],h={scale:1,percent:!1,text:!1,date:0,date_eval:!1,date_system:d,sec_decimals:0,general:!1,clock:24,int_pattern:[],frac_pattern:[],man_pattern:[],den_pattern:[],num_pattern:[],tokens:p};let Y="int",V=null;const W=[];let $,Z=!1,K=-1,X=!1,q="",Q=!1;for(;++K=4&&(o.size=t,o.type="monthname");const e=W[W.length-1];!o.type&&e&&!e.used&&e.size&(r|i)&&(e.used=!0,o.size=a,o.type="min",o.pad=/mm/.test(s)),o.type||(o.size=t,o.type="month",o.pad=/mm/.test(s),o.indeterminate=!0)}else if("s"===m){o.size=i,o.type="sec",o.pad=/ss/.test(s);const e=W[W.length-1];e&&e.size&a?o.used=!0:null!=e&&e.indeterminate&&(delete e.indeterminate,e.size=a,e.type="min",o.used=!0)}h.date=h.date|o.size,h.date_eval=!0,W.push(o),et(o,p)}else if(oe===P)h.clock=12,h.date=h.date|r,h.date_eval=!0,ae.short="A/P"===ae.value,et(ae,p);else if(oe===L||oe===R||oe===J)et(ae.value,p);else if(oe===I)h.condition=[ae.value[0],parseFloat(ae.value[1])];else if(oe===N){const e=ae.value.split("-"),t=e.length<2?"":e.slice(1).join("-"),n=e[0];n&&et(n,p);const r=ie(t);r&&(h.locale=r);const a=parseInt(t,16);if(isFinite(a)&&16711680&a){6===(a>>16&255)&&(h.date_system=u)}Z=!0}else if(oe===T){let e,t=ae.value.toLowerCase();(e=/^color\s*(\d+)$/i.exec(t))&&(t=parseInt(e[1],10)),h.color=t}else if(oe===C)h.scale=100,h.percent=!0,et("%",p);else if(oe===F)et(ae,p),h.date||(h.dec_fractions=!0,Y="frac");else if(oe===H)h.exponential=!0,h.exp_plus=ae.value.includes("+"),Y="man",et({type:"exp",plus:h.exp_plus},p);else if(oe===U)et(ae,p);else if(oe===G)et(ae,p);else if(oe!==D&&oe!==O)throw oe===S?new SyntaxError("Illegal character: ".concat(q)):new SyntaxError("Unknown token ".concat(oe," in ").concat(q))}$=ae}if(h.tokensUsed=K,h.pattern=q,/^((?:\[[^\]]+\])+)(;|$)/.test(h.pattern)&&!/^\[(?:h+|m+|s+)\]/.test(h.pattern)&&et({type:"text"},p),h.fractions&&h.dec_fractions||h.grouping&&!h.int_pattern.length||h.fractions&&h.exponential||h.fractions&&h.den_pattern.length*h.num_pattern.length==0||Q&&!h.fractions&&!h.date||h.exponential&&(h.int_pattern.length||h.frac_pattern.length)*h.man_pattern.length==0)throw new SyntaxError("Invalid pattern: ".concat(q));const ae=h.int_pattern.join(""),oe=h.man_pattern.join(""),se=h.frac_pattern.join("");Qe(ae,h,"int");let me=0;for(let e=0;e"point"===e.type));h.tokens.splice(e,0,{type:"int",value:"#"}),h.integer=!0,h.int_pattern=["#"],h.int_p="#"}if(h.fractions)for(let e=0;e1&&(h.grouping=!1),h}function rt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=Math.floor(Math.log10(e));return t>1?Math.floor(n/t)*t:n}function at(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return t<-300?parseFloat(e.toExponential().split("e")[0]):e*10**-t}const it={total:1,sign:0,period:0,int:1,frac:0};const ot=(e,t)=>e.replace(/\./,t.decimal),st=(e,t,n)=>{const r=Math.abs(t);let a;return a=1===e?e:_e(e,5),[ot(a+"",n),n.exponent,t<0?n.negative:n.positive,r<10?"0":"",r]};function mt(e,t,n,r){const a=0|n;if("string"==typeof n)e.push(n);else if(n===a)e.push(Math.abs(a));else{const t=Math.abs(n);let a=rt(t),i=at(t,a);10===i&&(i=1,a++);const o=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=Math.abs(e);if(!n)return it;const r=t&&e<0?1:0,a=Math.floor(n),i=Math.floor(Math.log10(n)+1);let o=0,s=0;if(a!==n){o=1;const e=String(_e(n*10**-i,15));let t=e.length,r=!0,a=0;for(;a<=e.length;){if("."===e[a]){t--;break}"0"===e[a]&&r?t--:r=!1,a++}s=t-i,s<0&&(s=0,o=0)}return{total:r+Math.max(i,1)+o+s,digits:Math.max(i,0)+s,sign:r,period:o,int:Math.max(i,1),frac:s}}(t);if(a>=-4&&a<=-1){const n=t.toPrecision(10+a).replace(/\.?0+$/,"");e.push(ot(n,r))}else if(10===a){const n=t.toFixed(10).slice(0,12).replace(/\.$/,"");e.push(ot(n,r))}else if(Math.abs(a)<=9)if(o.total<=11){const n=_e(t,9).toFixed(o.frac);e.push(ot(n,r))}else 9===a?e.push(Math.floor(t)):a>=0&&a<9?e.push(ot(String(_e(t,9-a)),r)):e.push(...st(i,a,r));else o.total>=12?e.push(...st(i,a,r)):e.push(ot(_e(t,9).toFixed(o.frac),r))}return e}function lt(e){return"0"===e?"0":"?"===e?arguments.length>1&&void 0!==arguments[1]&&arguments[1]?" ":" ":""}const dt=86400,ut=(e,t,n)=>n?e<-694324||t>=35830291:e<0||t>=2958466;function ct(e,t,n,r){var a,i;let l="",d="",c="",p="",f="",h="",g=0,b=0;if("bigint"==typeof e){if(!(e<=Number.MAX_SAFE_INTEGER&&e>=Number.MIN_SAFE_INTEGER))return n.bigintErrorNumber?String(e):n.overflow;b=e=Number(e)}else b=Math.trunc(e);let y=0,v=0,_=1,j=0,M=0,k=0,F=0,x=0,C=0;const A=r||le;if(!t.text&&isFinite(t.scale)&&1!==t.scale&&(e=function(e){if(0===e)return e;const t=Math.ceil(Math.log10(e<0?-e:e)),n=10**(16-Math.floor(t));return isFinite(n)?Math.round(e*n)/n:0}(e*t.scale)),t.exponential){let n=Math.abs(e);n&&(g=rt(n,t.int_max)),e&&!t.integer&&g++,n=at(n,g),1===t.int_max&&10===_e(n,t.frac_max)&&(n=1,g++),e=e<0?-n:n,l+=Math.abs(g)}if(t.integer){const n=Math.abs(_e(e,t.fractions?1:t.frac_max));h+=n<1?"":Math.floor(n)}const w=null!==(a=n.grouping[0])&&void 0!==a?a:3,S=null!==(i=n.grouping[1])&&void 0!==i?i:w;t.dec_fractions&&(f=String(_e(e,t.frac_max)).split(".")[1]||"");const z=!t.error&&(t.num_p.includes("0")||t.den_p.includes("0"));let E=z;if(t.fractions){E=z||!!(e%1);const n=Math.abs(t.integer?e%1:e);if(n)if(E=!0,t.denominator&&isFinite(t.denominator))p+=t.denominator,c+=_e(n*t.denominator),"0"===c&&(c="",p="",E=z);else{const e=Me(n,1/0,t.den_max);c+=e[0],p+=e[1],t.integer&&"0"===c&&(c="",p="",E=z)}else e||t.integer||(E=!0,c="0",p="1");!t.integer||E||Math.trunc(e)||(h="0")}if(t.date){b=Math.trunc(e);const r=dt*(e-b);if(y=Math.floor(r),C=r-y,Math.abs(C)<1e-6?C=0:C>.9999&&(C=0,y+=1,y===dt&&(y=0,b+=1)),C){const e=t.date&m||t.date&s||t.date&o;(e===m&&C>.9995||e===s&&C>.995||e===o&&C>.95||!e&&C>=.5)&&(y++,C=0)}if(b||t.date_system){const r=xe(e,t.date_system,n.leap1900);v=r[0],_=r[1],j=r[2]}if(y){const e=y<0?dt+y:y;x=Math.floor(e)%60,F=Math.floor(e/60)%60,k=Math.floor(e/60/60)%60}if(M=(6+b)%7,t.date_eval&&ut(e,b+y/dt,n.dateSpanLarge)){if(n.dateErrorThrows)throw new Error("Date out of bounds");if(n.dateErrorNumber){return mt(e<0?[A.negative]:[],0,e,A).join("")}return n.overflow}}const I=lt("?",n.nbsp);g<0?d="-":t.exp_plus&&(d="+");const D=[],O=(e,t,r,a)=>{const i=!a&&e.length>t.length?r.length+e.length-t.length:r.length;e.length0||t.den_min>0)&&D.push(i.value.replace(/./g,I)):"num+int"===i.rule?E&&h?D.push(i.value.replace(/ /g,I)):t.den_min>0&&(h||t.num_min)&&D.push(i.value.replace(/./g,I)):"den"===i.rule&&(E?D.push(i.value.replace(/ /g,I)):(t.den_min>0||t.den_min>0)&&D.push(i.value.replace(/./g,I))):D.push(i.value.replace(/ /g,I));else if("space"===o)"num+int"===i.rule?(E||t.num_min||t.den_min)&&(h||t.num_min)&&D.push(I):D.push(I);else if("error"===o)D.push(n.invalid);else if("point"===o)D.push(t.date?i.value:A.decimal);else if("general"===o)mt(D,0,e,A);else if("exp"===o)D.push(A.exponent);else if("minus"===o)i.volatile&&t.date||i.volatile&&(e>=0||"number"!=typeof e)||(i.volatile&&!t.fractions&&(t.integer||t.dec_fractions)?(e<0&&h&&"0"!==h||f)&&D.push(A.negative):D.push(A.negative));else if("plus"===o)D.push(A.positive);else if("text"===o)D.push(e);else if("fill"===o)n.fillChar&&D.push(n.fillChar,i.value);else if("skip"===o)n.skipChar?D.push(n.skipChar,i.value):D.push(n.nbsp?" ":" ");else if("div"===o)E?D.push("/"):t.num_min>0||t.den_min>0?D.push(I):D.push(lt("#",n.nbsp));else if("int"===o)if(1===t.int_pattern.length){const e=t.int_p;let r="";for(let a=Math.max(t.int_min,h.length);a>0;a--){const i=h.charAt(h.length-a),o=i?"":e.charAt(e.length-a)||e[0];let s="";if(t.grouping){const e=a-1-w;e>=0&&!(e%S)&&(s=i||"0"===o?A.group:lt("?",n.nbsp))}r+=(i||lt(o,n.nbsp))+s}D.push(r)}else T.int+=O(h,t.int_p,i.num,T.int);else if("frac"===o){const e=T.frac;for(let t=0;t"===n?t=e>a:"<"===n?t=e="===n?t=e>=a:"<="===n?t=e<=a:"<>"===n&&(t=e!==a)}else t=!0;if(t)return r}}}function ht(e){var t,n,r,a;return!!(null!==(t=e[0])&&void 0!==t&&t.percent||null!==(n=e[1])&&void 0!==n&&n.percent||null!==(r=e[2])&&void 0!==r&&r.percent||null!==(a=e[3])&&void 0!==a&&a.percent)}function gt(e){var t,n,r,a;return!!(null!==(t=e[0])&&void 0!==t&&t.date||null!==(n=e[1])&&void 0!==n&&n.date||null!==(r=e[2])&&void 0!==r&&r.date||null!==(a=e[3])&&void 0!==a&&a.date)}function bt(e){const[t,n,r,a]=e;return!(t&&!t.generated||n&&!n.generated||r&&!r.generated||null==a||!a.text||a.generated)}const yt={text:15,datetime:10.8,date:10.8,time:10.8,percent:10.6,currency:10.4,grouped:10.2,scientific:6,number:4,fraction:2,general:0,error:0},vt=[["DMY",1],["DM",2],["MY",3],["MDY",4],["MD",5],["hmsa",6],["hma",7],["hms",8],["hm",9]];const _t=[[c,/^General/i,0],[p,/^#/,0],[f,/^0/,0],[h,/^\?/,0],[g,/^\//,0],[_,/^;/,0],[j,/^@/,0],[M,/^\+/,0],[k,/^-/,0],[F,/^\./,0],[x,/^ /,0],[C,/^%/,0],[A,/^[1-9]/,0],[w,/^(?:B[12])/i,0],[S,/^B$/,0],[z,/^(?:[hH]+|[mM]+|[sS]+|[yY]+|[bB]+|[dD]+|[gG]+|[aA]{3,}|e+)/,0],[E,/^(?:\[(h+|m+|s+)\])/i,1],[I,/^\[(<[=>]?|>=?|=)\s*(-?[.\d]+)\]/,[1,2]],[D,/^\[(DBNum[0-4]?\d)\]/i,1],[O,/^\[(NatNum[0-4]?\d)\]/i,1],[N,/^\[\$([^\]]+)\]/,1],[T,/^\[(black|blue|cyan|green|magenta|red|white|yellow|color\s*\d+)\]/i,1],[Y,/^\[([^\]]+)\]/,1],[P,/^(?:AM\/PM|am\/pm|A\/P)/,0],[R,/^\\(.)/,1],[L,/^"([^"]*?)"/,1],[U,/^_(\\.|.)/,1],[H,/^[Ee]([+-])/,1],[G,/^\*(\\.|.)/,1],[B,/^[()]/,0],[S,/^[EÈÉÊËèéêëĒēĔĕĖėĘęĚěȄȅȆȇȨȩNnÑñŃńŅņŇňǸǹ["*/\\_]/,0],[J,/^./,0]],jt=e=>{const t=(e||"\0").charCodeAt(0);return 63===t||35===t||t>=48&&t<=57};function Mt(e){let t=0;const n=[],r=[];for(;ts[e])):s[o||0],raw:s[0]},n.push(e),i=s[0].length;break}}r.length&&";"===e.raw&&(r.length=0),r.length&&jt(e.raw)&&(r.forEach((e=>e.type=b)),r.length=0)}if(!i){const e=a[0];i=1,n.push({type:J,value:e,raw:e})}t+=i}return n}const kt=e=>{var t;const[n,r]=null!==(t=e.condition)&&void 0!==t?t:[];r<0&&("<"===n||"<="===n||"="===n)||0===r&&"<"===n||e.tokens.unshift({type:"minus",volatile:!0})},Ft=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n={};for(const t in e)Array.isArray(e[t])?n[t]=[...e[t]]:n[t]=e[t];return t&&n.tokens.unshift(t),n.generated=!0,n};const xt=Object.create({});function Ct(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e||(e="General");let n=xt[e];if(!n)try{n=function(e){const t=[];let n,r=!1,a=null,i=0,o=!1,s=0,m=0,l=Mt(e);do{var d;if(o=nt(l),(o.date||o.general)&&(o.int_pattern.length||o.frac_pattern.length||1!==o.scale||o.text))throw new Error("Illegal format");if(o.condition&&(m++,r=!0),o.text){if(a)throw new Error("Unexpected partition");a=o}o.locale&&(n=ie(o.locale)),t.push(o),i="break"===(null===(d=l[o.tokensUsed])||void 0===d?void 0:d.type)?1:0,l=l.slice(o.tokensUsed+i),s++}while(i&&s<4&&m<3);if(i)throw new Error("Unexpected partition");if(m>2)throw new Error("Unexpected condition");const u=t[3];if(u&&(u.int_pattern.length||u.frac_pattern.length||u.date))throw new Error("Unexpected partition");if(r){t[0].condition||(t[0].condition=[">",0]);const e=t.length;if(1===e&&(t[1]=nt(Mt("General")),t[1].generated=!0),e<3){const e=t[0],n=t[1];if(kt(e),n.condition)kt(n);else{const t=e.condition;("="===t[0]||t[1]>=0&&(">"===t[0]||">="===t[0]))&&n.tokens.unshift({type:"minus",volatile:!0})}}else t.forEach(kt)}else{if(t.length<4&&a)for(let e=0,n=t.length;e",0],t[1].condition=["<",0],t[2].condition=null}return{pattern:e,partitions:t,locale:n}}(e),xt[e]=n}catch(r){if(t)throw r;const a={tokens:[{type:"error"}],error:r.message};n={pattern:e,partitions:[a,a,a,a],error:r.message,locale:null}}return n}const At=Object.freeze({AMPM:P,BREAK:_,CALENDAR:w,CHAR:J,COLOR:T,COMMA:v,CONDITION:I,DATETIME:z,DBNUM:D,DIGIT:A,DURATION:E,ERROR:S,ESCAPED:R,EXP:H,FILL:G,GENERAL:c,GROUP:b,HASH:p,LOCALE:N,MINUS:k,MODIFIER:Y,NATNUM:O,PAREN:B,PERCENT:C,PLUS:M,POINT:F,QMARK:h,SCALE:y,SKIP:U,SLASH:g,SPACE:x,STRING:L,TEXT:j,ZERO:f});exports.addLocale=me,exports.dateFromSerial=function(e,t){let n=0|e;const r=Ae*(e-n);let a=Ce(r);r-a>.9999&&(a+=1,a===Ae&&(a=0,n+=1));const i=a<0?Ae+a:a,[o,s,m]=xe(e,0,null==t?void 0:t.leap1900);return[o,s,m,Ce(i/60/60)%60,Ce(i/60)%60,Ce(i)%60]},exports.dateToSerial=we,exports.dec2frac=Me,exports.format=function(e,t){var n;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const a=Object.assign({},ve,r),i=Ct(e,a.throws);return function(e,t,n){const r=t.partitions,a=oe(t.locale||n.locale),i=r[3]?r[3]:pt;"boolean"==typeof e&&(e=(a||le).bool[e?0:1]);if(null==e)return"";const o="bigint"==typeof e;if("number"!=typeof e&&!o)return ct(e,i,n,a);if(!o&&!isFinite(e)){const t=a||le;return isNaN(e)?t.nan:(e<0?t.negative:"")+t.infinity}const s=ft(e,r);return s?ct(e,s,n,a):n.overflow}(null!==(n=we(t,a))&&void 0!==n?n:t,i,a)},exports.formatColor=function(e,t,n){var r;const a=Object.assign({},ve,n),i=Ct(e,a.throws);return function(e,t,n){var r;const a=t.partitions;let i=a[3],o=null;return"number"!=typeof e&&"bigint"!=typeof e||!isFinite(e)||(i=ft(e,a)),null!==(r=i)&&void 0!==r&&r.color&&(o=i.color),o&&"number"==typeof o&&n.indexColors&&(o=V[o-1]||"#000"),o}(null!==(r=we(t,a))&&void 0!==r?r:t,i,a)},exports.getFormatDateInfo=function(o){const s=Ct(o,!1);return s.dateInfo||(s.dateInfo=function(o){const[s]=o;return{year:!!(s.date&e),month:!!(s.date&t),day:!!(s.date&n),hours:!!(s.date&r),minutes:!!(s.date&a),seconds:!!(s.date&i),clockType:12===s.clock?12:24}}(s.partitions)),s.dateInfo},exports.getFormatInfo=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=Ct(e,!1);return n.info||(n.info=function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const[r,a]=e,i=r.frac_max,o={type:"general",isDate:gt(e),isText:bt(e),isPercent:ht(e),maxDecimals:r.general?9:i,scale:null!==(t=r.scale)&&void 0!==t?t:1,color:0,parentheses:0,grouped:r.grouping?1:0},s=!o.isDate&&!o.isText&&!r.error&&r.tokens.some((e=>"string"===e.type&&(n?e.value===n:$.test(e.value))));let m="G",l=i>=0?Math.min(15,i):"",d="",u="";if(null!=a&&a.color&&(u="-",o.color=1),r.parens&&(d="()",o.parentheses=1),s)m="C",o.type="currency";else if(r.error)o.type="error",o.maxDecimals=0;else if(o.isDate){let e=0,t=0,n="";r.tokens.forEach((r=>{const a=r.type;/^(b-)?year/.test(a)?(n+="Y",t++):a.startsWith("month")?(n+="M",t++):/^(week)?day/.test(a)?(n+="D",t++):"hour"!==a&&"min"!==a&&"sec"!==a&&"ampm"!==a||(n+=a[0],e++)})),o.type="date",t&&e?o.type="datetime":!t&&e&&(o.type="time");const a=vt.find((e=>n.startsWith(e[0])));m=a?"D":"G",l=a?a[1]:""}else o.isText?(m="G",o.type="text",l="",o.maxDecimals=0):r.general?(m="G",o.type="general",l=""):r.fractions?(m="G",o.type="fraction",l=""):r.exponential?(m="S",o.type="scientific"):o.isPercent?(m="P",o.type="percent"):r.grouping?(m=",",o.type="grouped"):(r.int_max||i)&&(m="F",o.type="number");return o.code=m+l+u+d,o.level=yt[o.type],Object.freeze(o)}(n.partitions,null==t?void 0:t.currency)),n.info},exports.getLocale=oe,exports.isDateFormat=function(e){return gt(Ct(e,!1).partitions)},exports.isPercentFormat=function(e){return ht(Ct(e,!1).partitions)},exports.isTextFormat=function(e){return bt(Ct(e,!1).partitions)},exports.isValidFormat=function(e){try{return Ct(e,!0),!0}catch(e){return!1}},exports.parseBool=qe,exports.parseDate=Ze,exports.parseLocale=ae,exports.parseNumber=Ge,exports.parseTime=Xe,exports.parseValue=function(e,t){var n,r,a;return null!==(n=null!==(r=null!==(a=Ge(e,t))&&void 0!==a?a:Ze(e,t))&&void 0!==r?r:Xe(e,t))&&void 0!==n?n:qe(e,t)},exports.round=_e,exports.tokenTypes=At,exports.tokenize=Mt; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnVtZm10LmpzIiwic291cmNlcyI6WyIuLi9saWIvY29uc3RhbnRzLmpzIiwiLi4vbGliL2NvZGVUb0xvY2FsZS5qcyIsIi4uL2xpYi9sb2NhbGUuanMiLCIuLi9saWIvb3B0aW9ucy5qcyIsIi4uL2xpYi9yb3VuZC5qcyIsIi4uL2xpYi9kZWMyZnJhYy5qcyIsIi4uL2xpYi90b1lNRC5qcyIsIi4uL2xpYi9zZXJpYWxEYXRlLmpzIiwiLi4vbGliL3BhcnNlVmFsdWUuanMiLCIuLi9saWIvcGFyc2VGb3JtYXRTZWN0aW9uLmpzIiwiLi4vbGliL251bWJlclByb3BzLmpzIiwiLi4vbGliL251bWRlYy5qcyIsIi4uL2xpYi9nZW5lcmFsLmpzIiwiLi4vbGliL3BhZC5qcyIsIi4uL2xpYi9ydW5QYXJ0LmpzIiwiLi4vbGliL2NsYW1wLmpzIiwiLi4vbGliL2Zvcm1hdE51bWJlci5qcyIsIi4uL2xpYi9mb3JtYXRJbmZvLmpzIiwiLi4vbGliL3Rva2VuaXplLmpzIiwiLi4vbGliL3BhcnNlUGF0dGVybi5qcyIsIi4uL2xpYi9pbmRleC5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgY29uc3QgdV9ZRUFSID0gMjtcbmV4cG9ydCBjb25zdCB1X01PTlRIID0gMiAqKiAyO1xuZXhwb3J0IGNvbnN0IH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vljYjlvownKSxcbiAgZGRkZDogXygn5pelfjvmnIh+O+eBq3475rC0fjvmnKh+O+mHkX475ZyfficsICfmm5zml6UnKSxcbiAgZGRkOiBfKCfml6U75pyIO+eBqzvmsLQ75pyoO+mHkTvlnJ8nKVxufSwgJ2phJyk7XG5cbmFkZExvY2FsZSh7XG4gIGdyb3VwOiAnLCcsXG4gIGFtcG06IF8oJ+yYpOyghDvsmKTtm4QnKSxcbiAgbW1tbTogXygnMeyblDsy7JuUOzPsm5Q7NOyblDs17JuUOzbsm5Q7N+yblDs47JuUOznsm5Q7MTDsm5Q7MTHsm5Q7MTLsm5QnKSxcbiAgbW1tOiBfKCcx7JuUOzLsm5Q7M+yblDs07JuUOzXsm5Q7NuyblDs37JuUOzjsm5Q7OeyblDsxMOyblDsxMeyblDsxMuyblCcpLFxuICBkZGRkOiBfKCfsnbzsmpTsnbw77JuU7JqU7J28O+2ZlOyalOydvDvsiJjsmpTsnbw766qp7JqU7J28O+q4iOyalOydvDvthqDsmpTsnbwnKSxcbiAgZGRkOiBfKCfsnbw77JuUO+2ZlDvsiJg766qpO+q4iDvthqAnKVxufSwgJ2tvJyk7XG5cbmFkZExvY2FsZSh7XG4gIGdyb3VwOiAnLCcsXG4gIGFtcG06IF8oJ+C4geC5iOC4reC4meC5gOC4l+C4teC5iOC4ouC4hzvguKvguKXguLHguIfguYDguJfguLXguYjguKLguIcnKSxcbiAgbW1tbTogXygn4Lih4LiB4LijfjvguIHguLjguKHguKDguLLguJ7guLHguJnguJjguYw74Lih4Li14LiZfjvguYDguKHguKnguLLguKLguJk74Lie4Lik4Lip4LigfjvguKHguLTguJbguLjguJnguLLguKLguJk74LiB4Lij4LiB4LiOfjvguKrguLTguIfguKt+O+C4geC4seC4meC4ouC4suC4ouC4mTvguJXguLjguKV+O+C4nuC4pOC4qOC4iOC4tOC4geC4suC4ouC4mTvguJjguLHguJnguKd+JywgJ+C4suC4hOC4oScpLFxuICBtbW06IF8oJ+C4oS7guIQuO+C4gS7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o15DXqdeV1587ftep16DXmTt+16nXnNeZ16nXmTt+16jXkdeZ16LXmTt+15fXnteZ16nXmTt+16nXmdep15k7ftep15HXqicsICfXmdeV150gJyksXG4gIGRkZDogXygnfteQ17M7fteR17M7fteS17M7fteT17M7fteU17M7fteV17M716nXkdeqJywgJ9eZ15XXnSAnKSxcbiAgbW1tbTogXygn15nXoNeV15DXqDvXpNeR16jXldeQ16g7157XqNelO9eQ16TXqNeZ15w7157XkNeZO9eZ15XXoNeZO9eZ15XXnNeZO9eQ15XXkteV16HXmDvXodek15jXnteR16g715DXlden15jXldeR16g716DXldeR157XkdeoO9eT16bXnteR16gnKSxcbiAgbW1tOiBfKCfXmdeg15XXszvXpNeR16jXszvXnteo16U715DXpNeo17M7157XkNeZO9eZ15XXoNeZO9eZ15XXnNeZO9eQ15XXktezO9eh16TXmNezO9eQ15XXp9ezO9eg15XXkdezO9eT16bXntezJyksXG4gIG1tbW02OiBfKCfXqNee15PXkNefO9ep15XXldeQ15w715PXs9eVINeQ15zWvten16LXk9eUO9eT17PXlSDXkNec1r7Xl9eZ15LXs9eUO9ee15XXl9eo150716jXkdeZ16Ig15DXnNa+15DXldeV15w716jXkdeZ16Ig15DWvteq17PXkNeg15k715LXs9eV157XkNeT15Ag15DXnNa+15DXldec15A715LXs9eV157XkNeT15Ag15DWvteq17PXkNeg15nXlDvXqNeS17PXkTvXqdei15HXkNefO9eo157Xk9eQ158nKSxcbiAgbW1tNjogXygn16jXnteT15DXnzvXqdeV15XXkNecO9eT17PXlSDXkNec1r7Xp9ei15PXlDvXk9ez15Ug15DXnNa+15fXmdeS17PXlDvXnteV15fXqNedO9eo15HXmdeiINeQ17M716jXkdeZ16Ig15HXszvXktez15XXnteQ15PXkCDXkNezO9eS17PXldee15DXk9eQINeR17M716jXktez15E716nXoteR15DXnzvXqNee15PXkNefJylcbn0sICdoZScpO1xuXG5hZGRMb2NhbGUoeG0oe1xuICBncm91cDogICcuJyxcbiAgZGVjaW1hbDogICcsJyxcb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Ygc3RyaW5nIGlzIGRvbmUsIHRoZW4gd2UgY2FuIHJldHVyblxuICAgICAgaWYgKCFzdHIpIHtcbiAgICAgICAgciA9IGRhdGE7XG4gICAgICB9XG4gICAgfVxuICAgIGVsc2UgaWYgKHQgPT09ICctJykge1xuICAgICAgY29uc3QgbSA9IC9eKFxccyooWy4vLV18LFxccylcXHMqfFxccyspLy5leGVjKHN0cik7XG4gICAgICBpZiAobSkge1xuICAgICAgICBjb25zdCBzZXAgPSAobVsxXSA9PT0gJy0nIHx8IG1bMV0gPT09ICcvJyB8fCBtWzFdID09PSAnLicpID8gbVsxXSA6ICcgJztcbiAgICAgICAgLy8gZG9uJ3QgYWxsb3cgbWl4aW5nIGRhdGUgc2VwYXJhdG9yc1xuICAgICAgICBpZiAoIWRhdGEuc2VwIHx8IGRhdGEuc2VwID09PSBzZXApIHtcbiAgICAgICAgICBjb25zdCBzID0gbVswXS5yZXBsYWNlKC9cXHMrL2csICcgJyk7XG4gICAgICAgICAgciA9IG5leHRUb2tlbihzdHIuc2xpY2UobVswXS5sZW5ndGgpLCBub2RlW3RdLCB7IC4uLmRhdGEsIHNlcCwgcGF0aDogcGF0aCArIHMgfSwgbERhdGEpO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuICAgIGVsc2UgaWYgKHQgPT09ICcgJykge1xuICAgICAgY29uc3QgbSA9IC9eWywuXT9cXHMrLy5leGVjKHN0cik7XG4gICAgICBpZiAobSkge1xuICAgICAgICBjb25zdCBzID0gbVswXS5yZXBsYWNlKC9cXHMrL2csICcgJyk7XG4gICAgICAgIHIgPSBuZXh0VG9rZW4oc3RyLnNsaWNlKG1bMF0ubGVuZ3RoKSwgbm9kZVt0XSwgeyAuLi5kYXRhLCBwYXRoOiBwYXRoICsgcyB9LCBsRGF0YSk7XG4gICAgICB9XG4gICAgfVxuICAgIGVsc2UgaWYgKHQgPT09ICdqJyB8fCB0ID09PSAnZCcpIHtcbiAgICAgIGNvbnN0IG0gPSAvXigwP1sxL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MCkgKiAxO1xuICAgIGlmIChhbXBtKSB7XG4gICAgICBpZiAoaHJzID49IDEzKSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgICAgfVxuICAgICAgLy8gMDA6MDAgQU0gLSAxMjowMCBBTVxuICAgICAgaWYgKGFtcG0gPT09ICdhJykge1xuICAgICAgICBpZiAoaHJzID09PSAxMikge1xuICAgICAgICAgIGhycyA9IDA7XG4gICAgICAgIH0gLy8gbWlkbmlnaHRcbiAgICAgIH1cbiAgICAgIGVsc2UgaWYgKGFtcG0gPT09ICdwJykge1xuICAgICAgICBpZiAoaHJzICE9PSAxMikge1xuICAgICAgICAgIGhycyArPSAxMjtcbiAgICAgICAgfSAvLyBhZnRlcm5vb25cbiAgICAgIH1cbiAgICB9XG4gICAgY29uc3QgbWluID0gKyhtIHx8IDApICogMTtcbiAgICBjb25zdCBzZWMgPSArKHMgfHwgMCkgKiAxO1xuICAgIGNvbnN0IG1zcyA9ICsoZiB8fCAwKSAqIDE7XG5cbiAgICByZXR1cm4ge1xuICAgICAgdjogKChocnMgKiA2MCAqIDYwKSArIChtaW4gKiA2MCkgKyBzZWMgKyBtc3MpIC8gKDYwICogNjAgKiAyNCksXG4gICAgICB6OiAoXG4gICAgICAgIChoLmxlbmd0aCA9PT0gMiA/ICdoaCcgOiAnaCcpICtcbiAgICAgICAgJzptbScgK1xuICAgICAgICAocyA/ICc6c3MnIDogJycpICtcbiAgICAgICAgKGFtcG0gPyAnIEFNL1BNJyA6ICcnKVxuICAgICAgKVxuICAgIH07XG4gIH1cbiAgcmV0dXJuIG51bGw7XG59XG5cbi8qKlxuICogUGFyc2UgYSBzdHJpbmcgaW5wdXQgYW5kIHJldHVybiBpdHMgYm9vbGVhbiB2YWx1ZS4gSWYgdGhlIGlucHV0IHdhcyBub3RcbiAqIHJlY29nbml6ZWQgb3IgdmFsaWQsIHRoZSBmdW5jdGlvbiByZXR1cm5zIGEgYG51bGxgLCBmb3IgdmFsaWQgaW5wdXQgaXRcbiA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O1xuICAgICAgICAgIGJpdC50eXBlID0gJ21vbnRobmFtZS1zaG9ydCc7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSBpZiAodmFsdWUubGVuZ3RoID09PSA1KSB7XG4gICAgICAgICAgYml0LnNpemUgPSB1X01PTlRIO1xuICAgICAgICAgIGJpdC50eXBlID0gJ21vbnRobmFtZS1zaW5nbGUnO1xuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYgKHZhbHVlLmxlbmd0aCA+PSA0KSB7XG4gICAgICAgICAgYml0LnNpemUgPSB1X01PTlRIO1xuICAgICAgICAgIGJpdC50eXBlID0gJ21vbnRobmFtZSc7XG4gICAgICAgIH1cbiAgICAgICAgLy8gbSBvciBtbSBjYW4gYmUgZWl0aGVyIG1pbnV0ZSBvciBtb250aCBiYXNlZCBvbiBjb250ZXh0XG4gICAgICAgIGNvbnN0IGxhc3RfZGF0ZV9jaHVuayA9IGRhdGVDaHVua3NbZGF0ZUNodW5rcy5sZW5ndGggLSAxXTtcbiAgICAgICAgaWYgKCFiaXQudHlwZSAmJiBsYXN0X2RhdGVfY2h1bmsgJiZcbiAgICAgICAgICAgICFsYXN0X2RhdGVfY2h1bmsudXNlZCAmJlxuICAgICAgICAgICAgKGxhc3RfZGF0ZV9jaHVuay5zaXplICYgKHVfSE9VUiB8IHVfU0VDKSkpIHtcbiAgICAgICAgICAvLyBpZiB0aGlzIHZhbHVlIGZvbGxvd3MgaG91ciBvciBzZWNvbmQsIGl0IGlzIGEgbWludXRlXG4gICAgICAgICAgbGFzdF9kYXRlX2NodW5rLnVzZWQgPSB0cnVlO1xuICAgICAgICAgIGJpdC5zaXplID0gdV9NSU47XG4gICAgICAgICAgYml0LnR5cGUgPSAnbWluJztcbiAgICAgICAgICBiaXQucGFkID0gL21tLy50ZXN0KHZhbHVlKTtcbiAgICAgICAgfVxuICAgICAgICAvLyBpZiB3ZSBzdGlsbCBkb24ndCBrbm93LCB3ZSB0cmVhdCBhcyBhIG1vbnRoXG4gICA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k7XG4gICAgaWYgKF9kZWMpIHtcbiAgICAgIGhhdmVfZnJhY3Rpb24gPSB0cnVlO1xuICAgICAgaWYgKHBhcnQuZGVub21pbmF0b3IgJiYgaXNGaW5pdGUocGFydC5kZW5vbWluYXRvcikpIHtcbiAgICAgICAgLy8gcHJlZGVmaW5lZCBkZW5vbWluYXRvclxuICAgICAgICBkZW5vbWluYXRvciArPSBwYXJ0LmRlbm9taW5hdG9yO1xuICAgICAgICBudW1lcmF0b3IgKz0gcm91bmQoX2RlYyAqIHBhcnQuZGVub21pbmF0b3IpO1xuICAgICAgICBpZiAobnVtZXJhdG9yID09PSAnMCcpIHtcbiAgICAgICAgICBudW1lcmF0b3IgPSAnJztcbiAgICAgICAgICBkZW5vbWluYXRvciA9ICcnO1xuICAgICAgICAgIGhhdmVfZnJhY3Rpb24gPSBmaXhlZF9zbGFzaDtcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgZWxzZSB7XG4gICAgICAgIGNvbnN0IGZydCA9IGRlYzJmcmFjKF9kZWMsIEluZmluaXR5LCBwYXJ0LmRlbl9tYXgpO1xuICAgICAgICBudW1lcmF0b3IgKz0gZnJ0WzBdO1xuICAgICAgICBkZW5vbWluYXRvciArPSBmcnRbMV07XG4gICAgICAgIGlmIChwYXJ0LmludGVnZXIgJiYgbnVtZXJhdG9yID09PSAnMCcpIHtcbiAgICAgICAgICBudW1lcmF0b3IgPSAnJztcbiAgICAgICAgICBkZW5vbWluYXRvciA9ICcnO1xuICAgICAgICAgIGhhdmVfZnJhY3Rpb24gPSBmaXhlZF9zbGFzaDtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cbiAgICBlbHNlIGlmICghdmFsdWUgJiYgIXBhcnQuaW50ZWdlcikge1xuICAgICAgaGF2ZV9mcmFjdGlvbiA9IHRydWU7XG4gICAgICBudW1lcmF0b3IgPSAnMCc7XG4gICAgICBkZW5vbWluYXRvciA9ICcxJztcbiAgICB9XG4gICAgaWYgKHBhcnQuaW50ZWdlci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ICAgICAgIC8vIEZJWE1FOiByZXQucHVzaCgnJy5yZXBlYXQodG9rLnZhbHVlLmxlbmd0aCkpXG4gICAgICAgICAgICByZXQucHVzaCh0b2sudmFsdWUucmVwbGFjZSgvLi9nLCBwYWRRKSk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYgKHRvay5ydWxlID09PSAnbnVtK2ludCcpIHtcbiAgICAgICAgICBpZiAoaGF2ZV9mcmFjdGlvbiAmJiBpbnRlZ2VyKSB7XG4gICAgICAgICAgICByZXQucHVzaCh0b2sudmFsdWUucmVwbGFjZSgvIC9nLCBwYWRRKSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGVsc2UgaWYgKChwYXJ0LmRlbl9taW4gPiAwKSAmJiAoaW50ZWdlciB8fCBwYXJ0Lm51bV9taW4pKSB7XG4gICAgICAgICAgICByZXQucHVzaCh0b2sudmFsdWUucmVwbGFjZSgvLi9nLCBwYWRRKSk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYgKHRvay5ydWxlID09PSAnZGVuJykge1xuICAgICAgICAgIGlmIChoYXZlX2ZyYWN0aW9uKSB7XG4gICAgICAgICAgICByZXQucHVzaCh0b2sudmFsdWUucmVwbGFjZSgvIC9nLCBwYWRRKSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGVsc2UgaWYgKHBhcnQuZGVuX21pbiA+IDAgfHwgcGFydC5kZW5fbWluID4gMCkge1xuICAgICAgICAgICAgcmV0LnB1c2godG9rLnZhbHVlLnJlcGxhY2UoLy4vZywgcGFkUSkpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgZWxzZSB7XG4gICAgICAgIHJldC5wdXNoKHRvay52YWx1ZS5yZXBsYWNlKC8gL2csIHBhZFEpKTtcbiAgICAgIH1cbiAgICB9XG4gICAgZWxzZSBpZiAodG9rZW5UeXBlID09PSAnc3BhY2UnKSB7XG4gICAgICBpZiAodG9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3ApKTtcbiAgICAgIH1cbiAgICB9XG4gICAgZWxzZSBpZiAodG9rZW5UeXBlID09PSAnaW50Jykge1xuICAgICAgLy8gbnVtYmVyIGlzbid0IGZyYWdtZW50ZWRcbiAgICAgIGlmIChwYXJ0LmludF9wYXR0ZXJuLmxlbmd0aCA9PT0gMSkge1xuICAgICAgICBjb25zdCBwdCA9IHBhcnQuaW50X3A7XG4gICAgICAgIGNvbnN0IGwgPSBNYXRoLm1heChwYXJ0LmludF9taW4sIGludGVnZXIubGVuZ3RoKTtcbiAgICAgICAgbGV0IGRpZ2l0cyA9ICcnO1xuICAgICAgICBmb3IgKGxldCBpID0gbDsgaSA+IDA7IGktLSkge1xuICAgICAgICAgIGNvbnN0IGQgPSBpbnRlZ2VyLmNoYXJBdChpbnRlZ2VyLmxlbmd0aCAtIGkpO1xuICAgICAgICAgIGNvbnN0IHAgPSBkID8gJycgOiBwdC5jaGFyQXQocHQubGVuZ3RoIC0gaSkgfHwgcHRbMF07XG4gICAgICAgICAgbGV0IHNlcCA9ICcnO1xuICAgICAgICAgIGlmIChwYXJ0Lmdyb3VwaW5nKSB7XG4gICAgICAgICAgICBjb25zdCBuID0gKGkgLSAxKSAtIGdyb3VwX3ByaTtcbiAgICAgICAgICAgIGlmIChuID49IDAgJiYgIShuICUgZ3JvdXBfc2VjKSkge1xuICAgICAgICAgICAgICBzZXAgPSAoZCB8fCBwID09PSAnMCcpXG4gICAgICAgICAgICAgICAgPyBsMTBuLmdyb3VwXG4gICAgICAgICAgICAgICAgOiBwYWQoJz8nLCBvcHRzLm5ic3ApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgICBkaWdpdHMgKz0gKGQgfHwgcGFkKHAsIG9wdHMubmJzcCkpICsgc2VwO1xuICAgICAgICB9XG4gICAgICAgIHJldC5wdXNoKGRpZ2l0cyk7XG4gICAgICB9XG4gICAgICBlbHNlIHtcbiAgICAgICAgY291bnRlci5pbnQgKz0gZGlnaXRzU3RhcnQ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pIDwgbGVuOyBpKyspIHtcbiAgICAgICAgbGV0IGRpZ2l0ID0gZGVub21pbmF0b3JbaSArIG9dO1xuICAgICAgICBpZiAoIWRpZ2l0KSB7XG4gICAgICAgICAgY29uc3QgY2ggPSB0b2subnVtW2ldO1xuICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICcxMjM0NTY3ODknLmluY2x1ZGVzKGNoKSB8fFxuICAgICAgICAgICAgKGRlbm9taW5hdG9yX2ZpeGVkICYmIGNoID09PSAnMCcpXG4gICAgICAgICAgKSB7XG4gICAgICAgICAgICBkZW5vbWluYXRvcl9maXhlZCA9IHRydWU7XG4gICAgICAgICAgICBkaWdpdCA9IG9wdHMubmJzcCA/ICdcXHUwMGEwJyA6ICcgJztcbiAgICAgICAgICB9XG4gICAgICAgICAgZWxzZSBpZiAoXG4gICAgICAgICAgICAhZGVub21pbmF0b3JfZml4ZWQgJiZcbiAgICAgICAgICAgIChpID09PSBsZW4gLSAxKSAmJlxuICAgICAgICAgICAgY2ggPT09ICcwJyAmJlxuICAgICAgICAgICAgIWRlbm9taW5hdG9yXG4gICAgICAgICAgKSB7XG4gICAgICAgICAgICBkaWdpdCA9ICcxJztcbiAgICAgICAgICB9XG4gICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICBkaWdpdCA9IHBhZChjaCwgb3B0cy5uYnNwKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0LnB1c2goZGlnaXQpO1xuICAgICAgfVxuICAgICAgY291bnRlci5kZW4gKz0gbGVuO1xuICAgIH1cbiAgICBlbHNlIGlmICh0b2tlblR5cGUgPT09ICd5ZWFyJykge1xuICAgICAgaWYgKHllYXIgPCAwKSB7IHJldC5wdXNoKGwxMG4ubmVnYXRpdmUpOyB9XG4gICAgICByZXQucHVzaChTdHJpbmcoTWF0aC5hYnMoeWVhcikpLnBhZFN0YXJ0KDQsICcwJykpO1xuICAgIH1cbiAgICBlbHNlIGlmICh0b2tlblR5cGUgPT09ICd5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QUFTLElBQ3ZCLENBQ1QsQ0FDQSxNQUFPb0ssR0FDTCxPQUFPLENBQ1QsQ0FDRixrSVptZk8sU0FBcUJ6UyxFQUFPakQsR0FBUyxJQUFBaWEsRUFBQUMsRUFBQUMsRUFDMUMsZUFBQUYsRUFFMkIsUUFGM0JDLEVBQzZCLFFBRDdCQyxFQUNFblgsR0FBWUMsRUFBT2pELFVBQVEsSUFBQW1hLEVBQUFBLEVBQzNCMVQsR0FBVXhELEVBQU9qRCxjQUFRa2EsRUFBQUEsRUFDekJwVSxHQUFVN0MsRUFBT2pELFVBQVEsSUFBQWlhLEVBQUFBLEVBQ3pCNVMsR0FBVXBFLEVBQU9qRCxFQUVyQiJ9 diff --git a/package-lock.json b/package-lock.json index 59bf559..db1f87c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,18 +9,13 @@ "version": "3.2.6", "license": "MIT", "devDependencies": { - "@babel/core": "^7.29.7", - "@babel/preset-env": "~7.29.7", "@borgar/eslint-config": "~4.1.0", "@eslint/js": "~10.0.1", - "@rollup/plugin-babel": "~7.1.0", - "@rollup/plugin-terser": "~1.0.0", "@types/node": "~26.3.0", "concat-md": "~0.5.1", "eslint": "~10.9.1", "globals": "~17.11.0", - "jsdoc": "~4.0.5", - "rollup": "~4.62.5", + "tsdown": "~0.22.14", "typedoc": "~0.28.20", "typedoc-plugin-markdown": "~4.12.0", "typescript": "~5.9.3", @@ -52,5885 +47,2622 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/compat-data": { + "node_modules/@babel/helper-validator-identifier": { "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.7.tgz", - "integrity": "sha512-locTkQyKvwIEgBzVrn8693ebc97F2U8ZHjbXwDXJ5Fn2TCpNwTlKcaKLkdHop5c/icOFE7qt7Q9JC5hnKNa6Gg==", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz", + "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==", "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/core": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.7.tgz", - "integrity": "sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA==", + "node_modules/@borgar/eslint-config": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@borgar/eslint-config/-/eslint-config-4.1.0.tgz", + "integrity": "sha512-dzRD0t2+3TDiEdr62rQT0a+DTwetjMx+uWZQ6ijKQXjJfhklOUoUCH2R4KIGN53bRHwOW5rvnown41nKCR+Ymw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.29.7", - "@babel/generator": "^7.29.7", - "@babel/helper-compilation-targets": "^7.29.7", - "@babel/helper-module-transforms": "^7.29.7", - "@babel/helpers": "^7.29.7", - "@babel/parser": "^7.29.7", - "@babel/template": "^7.29.7", - "@babel/traverse": "^7.29.7", - "@babel/types": "^7.29.7", - "@jridgewell/remapping": "^2.3.5", - "convert-source-map": "^2.0.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.3", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" + "@stylistic/eslint-plugin": "~5.9.0" } }, - "node_modules/@babel/generator": { - "version": "7.29.8", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.8.tgz", - "integrity": "sha512-gZbepsdh3WDtgZKWL+vTPh71LSBrm/Y4/QDZBVCcYfmeTEEuoOYwlSy+G1StfJg+/Zy550u/3TATbm7qDbbMtg==", + "node_modules/@eslint-community/eslint-utils": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz", + "integrity": "sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.29.8", - "@babel/types": "^7.29.8", - "@jridgewell/gen-mapping": "^0.3.12", - "@jridgewell/trace-mapping": "^0.3.28", - "jsesc": "^3.0.2" + "eslint-visitor-keys": "^3.4.3" }, "engines": { - "node": ">=6.9.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, - "node_modules/@babel/helper-annotate-as-pure": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.29.7.tgz", - "integrity": "sha512-OoK6239jHPuSQOoS0kfTVKn0b/rVTk0seKq4Gd2UMLtmOVLjDC0ki3e+c90Trqv2gMfvJFqkiljrr568+qddiw==", + "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.29.7" - }, + "license": "Apache-2.0", "engines": { - "node": ">=6.9.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.29.7.tgz", - "integrity": "sha512-wem6WaBj4NaVYVdNhLPPVacES6ZJ+KBBfSkTMD3YZxbP3rm3Di85tJU5ljaUNhaOynt+Aj0xruhYuzQBt8n71g==", + "node_modules/@eslint-community/regexpp": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", + "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", "dev": true, "license": "MIT", - "dependencies": { - "@babel/compat-data": "^7.29.7", - "@babel/helper-validator-option": "^7.29.7", - "browserslist": "^4.24.0", - "lru-cache": "^5.1.1", - "semver": "^6.3.1" - }, "engines": { - "node": ">=6.9.0" + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, - "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.29.7.tgz", - "integrity": "sha512-IY3ZD9Tmooqr3TUhc3DUWxiuo8xx1DWLhd5M7hQ+ZWJamqM2BbalrBJb2MisSLoYorOj75U03qULCxQTY9r3hg==", + "node_modules/@eslint/config-array": { + "version": "0.23.5", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.23.5.tgz", + "integrity": "sha512-Y3kKLvC1dvTOT+oGlqNQ1XLqK6D1HU2YXPc52NmAlJZbMMWDzGYXMiPRJ8TYD39muD/OTjlZmNJ4ib7dvSrMBA==", "dev": true, - "license": "MIT", + "license": "Apache-2.0", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.29.7", - "@babel/helper-member-expression-to-functions": "^7.29.7", - "@babel/helper-optimise-call-expression": "^7.29.7", - "@babel/helper-replace-supers": "^7.29.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.29.7", - "@babel/traverse": "^7.29.7", - "semver": "^6.3.1" + "@eslint/object-schema": "^3.0.5", + "debug": "^4.3.1", + "minimatch": "^10.2.4" }, "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" + "node": "^20.19.0 || ^22.13.0 || >=24" } }, - "node_modules/@babel/helper-create-regexp-features-plugin": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.29.7.tgz", - "integrity": "sha512-907Uymvqgg1dwUA+7IGwFAOSYzQOuzPXKNJ1yxzwPffzkYFg2q2eHi1fIOs6sXkG9NbIUMunnUlkYsfRFNvomg==", + "node_modules/@eslint/config-array/node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", "dev": true, "license": "MIT", - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.29.7", - "regexpu-core": "^6.3.1", - "semver": "^6.3.1" - }, "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" + "node": "18 || 20 || >=22" } }, - "node_modules/@babel/helper-define-polyfill-provider": { - "version": "0.6.6", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.6.tgz", - "integrity": "sha512-mOAsxeeKkUKayvZR3HeTYD/fICpCPLJrU5ZjelT/PA6WHtNDBOE436YiaEUvHN454bRM3CebhDsIpieCc4texA==", + "node_modules/@eslint/config-array/node_modules/brace-expansion": { + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz", + "integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-compilation-targets": "^7.28.6", - "@babel/helper-plugin-utils": "^7.28.6", - "debug": "^4.4.3", - "lodash.debounce": "^4.0.8", - "resolve": "^1.22.11" + "balanced-match": "^4.0.2" }, - "peerDependencies": { - "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" - } - }, - "node_modules/@babel/helper-globals": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.29.7.tgz", - "integrity": "sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA==", - "dev": true, - "license": "MIT", "engines": { - "node": ">=6.9.0" + "node": "20 || >=22" } }, - "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.29.7.tgz", - "integrity": "sha512-j+7JYmk1JYDtACIGj0QJqqWZjoUpMoEikQGADMaHgCMCSDqd2+P32rfcibUNrGOMWrlzK1WJBdxrB3JJQZwWtg==", + "node_modules/@eslint/config-array/node_modules/minimatch": { + "version": "10.2.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", + "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", "dev": true, - "license": "MIT", + "license": "BlueOak-1.0.0", "dependencies": { - "@babel/traverse": "^7.29.7", - "@babel/types": "^7.29.7" + "brace-expansion": "^5.0.8" }, "engines": { - "node": ">=6.9.0" + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/@babel/helper-module-imports": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.29.7.tgz", - "integrity": "sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g==", + "node_modules/@eslint/config-helpers": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.7.0.tgz", + "integrity": "sha512-DObd/KKUsU+FaFv4PLxSRenpXfQWmPXXP3pPZ6/K1PCrMu2vQpMDMuQe/BqYeoLcz8ro0bVDF1RxOJgfVEdhUw==", "dev": true, - "license": "MIT", + "license": "Apache-2.0", "dependencies": { - "@babel/traverse": "^7.29.7", - "@babel/types": "^7.29.7" + "@eslint/core": "^1.2.1" }, "engines": { - "node": ">=6.9.0" + "node": "^20.19.0 || ^22.13.0 || >=24" } }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.29.7.tgz", - "integrity": "sha512-UPUVSyXbOh627KiCIGQSgwWzGeBKLkaJ9PJEdrngIwMSzxLR4jS4+f1f1jb7VzBbg8nFLaYotvVPFCTqdrmTAg==", + "node_modules/@eslint/core": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-1.2.1.tgz", + "integrity": "sha512-MwcE1P+AZ4C6DWlpin/OmOA54mmIZ/+xZuJiQd4SyB29oAJjN30UW9wkKNptW2ctp4cEsvhlLY/CsQ1uoHDloQ==", "dev": true, - "license": "MIT", + "license": "Apache-2.0", "dependencies": { - "@babel/helper-module-imports": "^7.29.7", - "@babel/helper-validator-identifier": "^7.29.7", - "@babel/traverse": "^7.29.7" + "@types/json-schema": "^7.0.15" }, "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" + "node": "^20.19.0 || ^22.13.0 || >=24" } }, - "node_modules/@babel/helper-optimise-call-expression": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.29.7.tgz", - "integrity": "sha512-+kmGVjcT9RGYzoDwdwEqEvGgKe3BYq+O1iGzjFubaNgZHwYHP6lsF2Yghf4kEuv9BV7tYDZ913aBW9am6YKong==", + "node_modules/@eslint/js": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-10.0.1.tgz", + "integrity": "sha512-zeR9k5pd4gxjZ0abRoIaxdc7I3nDktoXZk2qOv9gCNWx3mVwEn32VRhyLaRsDiJjTs0xq/T8mfPtyuXu7GWBcA==", "dev": true, "license": "MIT", - "dependencies": { - "@babel/types": "^7.29.7" - }, "engines": { - "node": ">=6.9.0" + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "eslint": "^10.0.0" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } } }, - "node_modules/@babel/helper-plugin-utils": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.29.7.tgz", - "integrity": "sha512-G7sHYigPY17oO5SYWnfD/0MTBwVR781S/JI643e/JhUYgVgWE/61SoW3NH9KWUKyKq5LVh3npif99Wkt6j86Jw==", + "node_modules/@eslint/object-schema": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-3.0.5.tgz", + "integrity": "sha512-vqTaUEgxzm+YDSdElad6PiRoX4t8VGDjCtt05zn4nU810UIx/uNEV7/lZJ6KwFThKZOzOxzXy48da+No7HZaMw==", "dev": true, - "license": "MIT", + "license": "Apache-2.0", "engines": { - "node": ">=6.9.0" + "node": "^20.19.0 || ^22.13.0 || >=24" } }, - "node_modules/@babel/helper-remap-async-to-generator": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.29.7.tgz", - "integrity": "sha512-16AMiW26DbXWBbr3B8wNozKM0ydMLB892vaOaJW/fPJdnT8vJk5sdkQcU/isqUxyCE0cEoa8wZOcbgDuC4b6Og==", + "node_modules/@eslint/plugin-kit": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.7.2.tgz", + "integrity": "sha512-+CNAzxglkrpNf/kKywqQfk74QjtceuOE7Qm+AF8miRvPF/wmmK5+OJOgVh3AVTT3RP2mH3+FOaxlE5v72owk0A==", "dev": true, - "license": "MIT", + "license": "Apache-2.0", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.29.7", - "@babel/helper-wrap-function": "^7.29.7", - "@babel/traverse": "^7.29.7" + "@eslint/core": "^1.2.1", + "levn": "^0.4.1" }, "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" + "node": "^20.19.0 || ^22.13.0 || >=24" } }, - "node_modules/@babel/helper-replace-supers": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.29.7.tgz", - "integrity": "sha512-atfGXWSeCiF4DnKZIfmJfQRkSw9b9gNNXR1kqKjbhG4pGYCOnkp8OcTB8E3NXjBu8NpheSnOeNKz8KT7UNFTmQ==", + "node_modules/@gerrit0/mini-shiki": { + "version": "3.23.0", + "resolved": "https://registry.npmjs.org/@gerrit0/mini-shiki/-/mini-shiki-3.23.0.tgz", + "integrity": "sha512-bEMORlG0cqdjVyCEuU0cDQbORWX+kYCeo0kV1lbxF5bt4r7SID2l9bqsxJEM0zndaxpOUT7riCyIVEuqq/Ynxg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-member-expression-to-functions": "^7.29.7", - "@babel/helper-optimise-call-expression": "^7.29.7", - "@babel/traverse": "^7.29.7" - }, + "@shikijs/engine-oniguruma": "^3.23.0", + "@shikijs/langs": "^3.23.0", + "@shikijs/themes": "^3.23.0", + "@shikijs/types": "^3.23.0", + "@shikijs/vscode-textmate": "^10.0.2" + } + }, + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "dev": true, + "license": "Apache-2.0", "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" + "node": ">=18.18.0" } }, - "node_modules/@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.29.7.tgz", - "integrity": "sha512-brcMGQaVzIeUb+6/bs1Av0f8YuNNjKY2JyvfRCsFuFsdKccEQ5Ges2y74D74NZ1Rz8lKJ9ksJkfqwQFJ/iNEyQ==", + "node_modules/@humanfs/node": { + "version": "0.16.7", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.7.tgz", + "integrity": "sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==", "dev": true, - "license": "MIT", + "license": "Apache-2.0", "dependencies": { - "@babel/traverse": "^7.29.7", - "@babel/types": "^7.29.7" + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.4.0" }, "engines": { - "node": ">=6.9.0" + "node": ">=18.18.0" } }, - "node_modules/@babel/helper-string-parser": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.7.tgz", - "integrity": "sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==", + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", "dev": true, - "license": "MIT", "engines": { - "node": ">=6.9.0" + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz", - "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==", + "node_modules/@humanwhocodes/retry": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", "dev": true, - "license": "MIT", + "license": "Apache-2.0", "engines": { - "node": ">=6.9.0" + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/@babel/helper-validator-option": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.29.7.tgz", - "integrity": "sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw==", + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } + "license": "MIT" }, - "node_modules/@babel/helper-wrap-function": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.29.7.tgz", - "integrity": "sha512-iES0Skag9ERIF68aXadpO6dbXa03mNWK3sEqJaMnLNs/eC3l0lkImdfoy6Y09/SfkpawdAB4RjQ7PVA7TcVGdw==", + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, "license": "MIT", "dependencies": { - "@babel/template": "^7.29.7", - "@babel/traverse": "^7.29.7", - "@babel/types": "^7.29.7" + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" }, "engines": { - "node": ">=6.9.0" + "node": ">= 8" } }, - "node_modules/@babel/helpers": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.7.tgz", - "integrity": "sha512-1k2lAGRMfHTcwuNYcCNUmaUffmQv8KWMfh2iJUUeRlwlwH4FdNG7mfPI10NPfLHJFThE4Tyr4mv7kTNZOiPuBg==", + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true, "license": "MIT", - "dependencies": { - "@babel/template": "^7.29.7", - "@babel/types": "^7.29.7" - }, "engines": { - "node": ">=6.9.0" + "node": ">= 8" } }, - "node_modules/@babel/parser": { - "version": "7.29.8", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.8.tgz", - "integrity": "sha512-E8lTAYNB1KW+FH+VGJuZM1ioAx2E6oVlvQFRrf5P8ZZmsiJXYAD9vTFV7yyEURNzgh1dFqMZuO6tUwcARbqFCA==", + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.29.8" - }, - "bin": { - "parser": "bin/babel-parser.js" + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" }, "engines": { - "node": ">=6.0.0" + "node": ">= 8" } }, - "node_modules/@babel/plugin-bugfix-firefox-class-in-computed-class-key": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.29.7.tgz", - "integrity": "sha512-j8SrR0zLZrRsC09DlszEx8FpMiwukKffYXMK0d5LmOglO7vGG6sz/BR/20yHqWH+Lnn31JTt2PE3hIWNgM2J6w==", + "node_modules/@oxc-project/types": { + "version": "0.146.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.146.0.tgz", + "integrity": "sha512-XC0QsnnhVe7sLIWmYmdPw7x5P0h4W8vUU3Nv1ySgWXtvCz8NizoAEpGXA0sOYoJQV2Rl13LgURAHQ5cI5ILCSA==", "dev": true, "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.29.7", - "@babel/traverse": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" + "funding": { + "url": "https://github.com/sponsors/Boshen" } }, - "node_modules/@babel/plugin-bugfix-safari-class-field-initializer-scope": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-class-field-initializer-scope/-/plugin-bugfix-safari-class-field-initializer-scope-7.29.7.tgz", - "integrity": "sha512-r8j8escF+U2FUHo0KOhPUdMzUO+jp9fInva6+ACVAF3Y97Ev+5iNZwiqTghmzNeWwDkOPlYuTcfb1vDaoZKmAQ==", + "node_modules/@quansync/fs": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@quansync/fs/-/fs-1.0.0.tgz", + "integrity": "sha512-4TJ3DFtlf1L5LDMaM6CanJ/0lckGNtJcMjQ1NAV6zDmA0tEHKZtxNKin8EgPaVX1YzljbxckyT2tJrpQKAtngQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" + "quansync": "^1.0.0" }, - "peerDependencies": { - "@babel/core": "^7.0.0" + "funding": { + "url": "https://github.com/sponsors/sxzz" } }, - "node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.29.7.tgz", - "integrity": "sha512-GE1TFSiuFeGsCxmYXZl8HwoPrVlwe4rHPFE8weieGKZqnDORK+Ar3vgWMgW+AOxQ6/2TgLSKx9p6W7O4rC6qgQ==", + "node_modules/@rolldown/binding-android-arm-eabi": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm-eabi/-/binding-android-arm-eabi-1.2.5.tgz", + "integrity": "sha512-DLe/i+l8ynIBY7XEQ191TeZvCoowIGa18R+dIV30GW7DiOtp74i/xX8hs8GUjW5ARV7VZuie3d6AumSmCwbeRA==", + "cpu": [ + "arm" + ], "dev": true, "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.29.7" - }, + "optional": true, + "os": [ + "android" + ], "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@babel/plugin-bugfix-safari-rest-destructuring-rhs-array": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-rest-destructuring-rhs-array/-/plugin-bugfix-safari-rest-destructuring-rhs-array-7.29.7.tgz", - "integrity": "sha512-oBNVCvnO5tND+xSopWvV8WNGfpTfgP4Zr/YXXSj8zfmcPktp5Ku/aZlsIowgSD4fjmgHn6sGmB9APVsU5zOdhA==", + "node_modules/@rolldown/binding-android-arm64": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.2.5.tgz", + "integrity": "sha512-zXcwKlQApYAOELHd8PwKDFkagYF9Wy4e0RJ+0qnzl9Pjnpj75TEG8ufv40p2J7kCEfwZAsNiuzRIyNNMWT38ig==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.29.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.29.7" - }, + "optional": true, + "os": [ + "android" + ], "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.29.7.tgz", - "integrity": "sha512-QQt9qKHZ2sg/kivaLr7lnQr8HVrQDdBNSfCsTjiDxRuX/K5ORyKq+Bu8Xr0cDE3Dfkv0cw28Ve0EKyKMvulkOw==", + "node_modules/@rolldown/binding-darwin-arm64": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.2.5.tgz", + "integrity": "sha512-dK4QakI42nzWgJT5sm4y4y/O//D4OxM75/cH28RLV+nzIN9AY+YsbuUVrUTjlLjXR6vpyxFbSsbmNuJ6BP9sww==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.29.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.29.7", - "@babel/plugin-transform-optional-chaining": "^7.29.7" - }, + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.13.0" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.29.7.tgz", - "integrity": "sha512-pn6QacGLgvCcwc+syUhKE/qSjV2D1IHDB84RNxWYSt1mW3K/SCtjinZ2p0cETJxAWBjPy3K/1lHwG5BjjPxNlw==", + "node_modules/@rolldown/binding-darwin-x64": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.2.5.tgz", + "integrity": "sha512-fqSALaUu1Wjd1nK2uW2kJDWdLCc8lx1IcY+MTY26Aurfdx19anlzhqXOgCFbBFQnlFDTn4TC1/7Nz4Bl2mLP3A==", + "cpu": [ + "x64" + ], "dev": true, "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.29.7", - "@babel/traverse": "^7.29.7" - }, + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@babel/plugin-proposal-private-property-in-object": { - "version": "7.21.0-placeholder-for-preset-env.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz", - "integrity": "sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==", + "node_modules/@rolldown/binding-freebsd-x64": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.2.5.tgz", + "integrity": "sha512-/vCnNxlkxs9tKxNDcyWUePpJ/PgTzxIaVhoM5SmG8UV+GR/IcPam4VYxi7GIMo7PSDuNqlJqvprqii9NqqVCMw==", + "cpu": [ + "x64" + ], "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@babel/plugin-syntax-import-assertions": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.29.7.tgz", - "integrity": "sha512-/An1OCBN93thpBAGyfsK2pcf0jvju1SAtKkL2Ny++B5Sy6sqgzXDQH1cZxWbF96Wuk+bn41MDA9bLd4VVAw6rw==", + "node_modules/@rolldown/binding-linux-arm-gnueabihf": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.2.5.tgz", + "integrity": "sha512-abk0NLA519LxRCszmbE0jYKuQ9YPocOXTiOXOo6Yr+YAT95VH+PtqYAjOJvGKt3viEd/x4qzabAlwd5bHOOARg==", + "cpu": [ + "arm" + ], "dev": true, "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.29.7" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@babel/plugin-syntax-import-attributes": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.29.7.tgz", - "integrity": "sha512-zGYcYfq/WmZ4V+kBIXQon9dSSc8ircGZqw9ZaNhhGj9nZkeBu1jHLBDQqYYi5WA9uawvA2sIMbry2nCFhf5Djg==", + "node_modules/@rolldown/binding-linux-arm64-gnu": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.2.5.tgz", + "integrity": "sha512-Y7eALiJ8lr0M2HH103Js+g7V34wf6snlpZLAsHI90uLhr3PVlNsbFVAXJC9d/V6BnPyKtpSwI+NcB/RLxsQxuA==", + "cpu": [ + "arm64" + ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.29.7" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@babel/plugin-syntax-unicode-sets-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-unicode-sets-regex/-/plugin-syntax-unicode-sets-regex-7.18.6.tgz", - "integrity": "sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg==", + "node_modules/@rolldown/binding-linux-arm64-musl": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.2.5.tgz", + "integrity": "sha512-xMvZgnbZg4YVnR/AX2b3oOPDTFYJvUVaJg5FedA/LuvexAtXibZQej4cnTkw3rjsJ/ggUROB64TdtETiim+FYA==", + "cpu": [ + "arm64" + ], "dev": true, - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - }, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@babel/plugin-transform-arrow-functions": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.29.7.tgz", - "integrity": "sha512-N7zArUXWzAMzm+/N0uPBeVB3Fam5lMxtUwMmDK5f/IBBS7a7p1qeUoxd/6CckXoxUdgsntq1Dh8xNW06maZbDQ==", + "node_modules/@rolldown/binding-linux-ppc64-gnu": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.2.5.tgz", + "integrity": "sha512-GRjeqTUDHTo5GwntsLaAMcBahG3nlpjftXWZLN73HiYQlhwEowvarFgQnRnQZtIp4keXX7quXFbG38uPZBa2EA==", + "cpu": [ + "ppc64" + ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.29.7" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@babel/plugin-transform-async-generator-functions": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.29.7.tgz", - "integrity": "sha512-d98gXZkgswvkyohMBABkhm3GeXhYj8psWfwQ2C7gtfrKGTykQa/iOIi+JJhwMjPlZ6Vm2XN+DCf3Es1EoG4ZLA==", + "node_modules/@rolldown/binding-linux-s390x-gnu": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.2.5.tgz", + "integrity": "sha512-vLNTR45F2Uwc8AufkNXPmB4VliaXs+FvcheEogIzOXzO4l+LzieXF5A/TWxLy5HtqpsRCHUfd0lPVrrdgXdLHQ==", + "cpu": [ + "s390x" + ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.29.7", - "@babel/helper-remap-async-to-generator": "^7.29.7", - "@babel/traverse": "^7.29.7" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@babel/plugin-transform-async-to-generator": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.29.7.tgz", - "integrity": "sha512-pcUb2SS+RMo9TWVBwKGI5ShtoG7R+zBsFmCKDa6fe8c+hPr3XJlZgoE5j6i8W7gDjhyvy+85vmYexanvXh3d1w==", + "node_modules/@rolldown/binding-linux-x64-gnu": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.2.5.tgz", + "integrity": "sha512-Mgj59/HTuYeK9Gz2MA+mBWKnHsAgkBSec15ZMb1st3oIfFbX7gCjOae7GydHhzcyQi9Z/7M1QuN9bR3oFqF0jQ==", + "cpu": [ + "x64" + ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", - "dependencies": { - "@babel/helper-module-imports": "^7.29.7", - "@babel/helper-plugin-utils": "^7.29.7", - "@babel/helper-remap-async-to-generator": "^7.29.7" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@babel/plugin-transform-block-scoped-functions": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.29.7.tgz", - "integrity": "sha512-cUSmjh72N+rN4PrkFlN1dJwNCwjVp5d38/CQrEsFggkD10UiFlBFgdH3tv5dNsLuHY+3S8db2xCHjhZcv5WgvA==", + "node_modules/@rolldown/binding-linux-x64-musl": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.2.5.tgz", + "integrity": "sha512-mY8AP0/ichsbhAxGnLa3d3+MwV0EfgrPND2bplI3Ym8T6R2pJ0N87bvrKVwNXmdy3jnr6eQBecdqx/HMknBmpA==", + "cpu": [ + "x64" + ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.29.7" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@babel/plugin-transform-block-scoping": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.29.7.tgz", - "integrity": "sha512-ONyr4+AZhKh8yKWInVxU9AXA9EbsyeLcL6V0dJy6M2/62vuvpGm29zzuymbTpdc451GEpDIdAyPLP3r+P61yKQ==", + "node_modules/@rolldown/binding-openharmony-arm64": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.2.5.tgz", + "integrity": "sha512-8SLssA2oweAxyRgDp789ACfRb/3P+zNRJpzZxSizxF9m8NUDQ4+3xjo8ttjhVGGw6Qxb70oZiEtIjaKikCO7Yw==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.29.7" - }, + "optional": true, + "os": [ + "openharmony" + ], "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@babel/plugin-transform-class-properties": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.29.7.tgz", - "integrity": "sha512-GtcpjFvanPfzNQi3eTitsCqtRRmmqzpy/A+yhTR1HaZo1Ly3EA8ZXxlPyHdR8/IuRMYc3E4wdGBewB2QKQjAaA==", + "node_modules/@rolldown/binding-win32-arm64-msvc": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.2.5.tgz", + "integrity": "sha512-vGbruD5zquhoc8D9SViXgN2FBJtNdTyQ4DtG+SWiEGlJiAzoKcZ2xp+xuXCffhubVdt0NJlTZqkeRuERy7g8Cw==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", - "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.29.7", - "@babel/helper-plugin-utils": "^7.29.7" - }, + "optional": true, + "os": [ + "win32" + ], "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@babel/plugin-transform-class-static-block": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.29.7.tgz", - "integrity": "sha512-kibJgmEdX2iMwsHY2tSZNDgj8PwIlCQz7FK9KuGKO8zsuoUwSEhoNnNVp/emKWrbY4HeO6kkXfdMqRKKKXBm2A==", + "node_modules/@rolldown/binding-win32-x64-msvc": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.2.5.tgz", + "integrity": "sha512-e/SXpgISz+IoqVcSSI0rx/d/he8zqLex+/rCWpnHpmVfmPIUjag9H6P7zotf0gJHwPUhQxZ/mF8tr6acebT9yw==", + "cpu": [ + "x64" + ], "dev": true, "license": "MIT", - "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.29.7", - "@babel/helper-plugin-utils": "^7.29.7" - }, + "optional": true, + "os": [ + "win32" + ], "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.12.0" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@babel/plugin-transform-classes": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.29.7.tgz", - "integrity": "sha512-qV0OGGBVacduzQHE649JyCneOFI/maT+YKsO+K4Yi3xv2wTPNjM/W2o2gdzMwEAZz7fXNTHAe0NcSg30bIN69g==", + "node_modules/@rolldown/pluginutils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.1.tgz", + "integrity": "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==", "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.29.7", - "@babel/helper-compilation-targets": "^7.29.7", - "@babel/helper-globals": "^7.29.7", - "@babel/helper-plugin-utils": "^7.29.7", - "@babel/helper-replace-supers": "^7.29.7", - "@babel/traverse": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } + "license": "MIT" }, - "node_modules/@babel/plugin-transform-computed-properties": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.29.7.tgz", - "integrity": "sha512-RK7/IyU5phpuCdBAuig5VkzG/EnbDaui5SQGdU9BFrHdV+mV4cUjLMQ9lJDjLNtWHsqtiefpGZUXQP2BiTYMsA==", + "node_modules/@shikijs/engine-oniguruma": { + "version": "3.23.0", + "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-3.23.0.tgz", + "integrity": "sha512-1nWINwKXxKKLqPibT5f4pAFLej9oZzQTsby8942OTlsJzOBZ0MWKiwzMsd+jhzu8YPCHAswGnnN1YtQfirL35g==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.29.7", - "@babel/template": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@shikijs/types": "3.23.0", + "@shikijs/vscode-textmate": "^10.0.2" } }, - "node_modules/@babel/plugin-transform-destructuring": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.29.7.tgz", - "integrity": "sha512-iPX8aD6H9zV5s7ZsqTdNocPN/MGQ5sSMnElKrktxjJRMnB2jN/1p2+R7GkfD6CAYoVFqy5A4XnSIUeGgJzIWpg==", + "node_modules/@shikijs/langs": { + "version": "3.23.0", + "resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-3.23.0.tgz", + "integrity": "sha512-2Ep4W3Re5aB1/62RSYQInK9mM3HsLeB91cHqznAJMuylqjzNVAVCMnNWRHFtcNHXsoNRayP9z1qj4Sq3nMqYXg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.29.7", - "@babel/traverse": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@shikijs/types": "3.23.0" } }, - "node_modules/@babel/plugin-transform-dotall-regex": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.29.7.tgz", - "integrity": "sha512-3qc18hsD2RdZiyJNDNc7HQpv6xbncwh8FYtxNFFzclSyh/trPD9KkVR9BDECUjDLvb7yJVF15GfYUuC+LMkkiQ==", + "node_modules/@shikijs/themes": { + "version": "3.23.0", + "resolved": "https://registry.npmjs.org/@shikijs/themes/-/themes-3.23.0.tgz", + "integrity": "sha512-5qySYa1ZgAT18HR/ypENL9cUSGOeI2x+4IvYJu4JgVJdizn6kG4ia5Q1jDEOi7gTbN4RbuYtmHh0W3eccOrjMA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.29.7", - "@babel/helper-plugin-utils": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@shikijs/types": "3.23.0" } }, - "node_modules/@babel/plugin-transform-duplicate-keys": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.29.7.tgz", - "integrity": "sha512-6IvRRriEMqnBwD6chtxdLpMYCHWEzN+oL5cyQtjykya19UgzbmKhxmhZgKC/LHxS2nYr9Q/qYPZ5Lr6jOL9+yQ==", + "node_modules/@shikijs/types": { + "version": "3.23.0", + "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-3.23.0.tgz", + "integrity": "sha512-3JZ5HXOZfYjsYSk0yPwBrkupyYSLpAE26Qc0HLghhZNGTZg/SKxXIIgoxOpmmeQP0RRSDJTk1/vPfw9tbw+jSQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@shikijs/vscode-textmate": "^10.0.2", + "@types/hast": "^3.0.4" } }, - "node_modules/@babel/plugin-transform-duplicate-named-capturing-groups-regex": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-named-capturing-groups-regex/-/plugin-transform-duplicate-named-capturing-groups-regex-7.29.7.tgz", - "integrity": "sha512-2wiIyo2BjtgU7HufSeDnL9L2O7zr8jmhFKuSr65VpRkUiRKRNpb0mdlk56+XPPKoIrfHqzbMuglDvZun0RISsA==", + "node_modules/@shikijs/vscode-textmate": { + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/@shikijs/vscode-textmate/-/vscode-textmate-10.0.2.tgz", + "integrity": "sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==", "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.29.7", - "@babel/helper-plugin-utils": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } + "license": "MIT" }, - "node_modules/@babel/plugin-transform-dynamic-import": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.29.7.tgz", - "integrity": "sha512-giOlEm/EFjfjr+te9NsdjkUo2v4f8rS/SXPumRVHAtbNcyNlvtREkU1dZzaIDclNpnaVhlCqRdFKhJBjBikzLg==", + "node_modules/@standard-schema/spec": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz", + "integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==", "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } + "license": "MIT" }, - "node_modules/@babel/plugin-transform-explicit-resource-management": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-explicit-resource-management/-/plugin-transform-explicit-resource-management-7.29.7.tgz", - "integrity": "sha512-Rstj7coNz8sE+7Ju7ihpHLI564lsK5pUpNNlvptCIC/16E/S5hbl6n3kESPKdNRmqEWlpn5xpS5Q2dvXBsySLw==", + "node_modules/@stylistic/eslint-plugin": { + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin/-/eslint-plugin-5.9.0.tgz", + "integrity": "sha512-FqqSkvDMYJReydrMhlugc71M76yLLQWNfmGq+SIlLa7N3kHp8Qq8i2PyWrVNAfjOyOIY+xv9XaaYwvVW7vroMA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.29.7", - "@babel/plugin-transform-destructuring": "^7.29.7" + "@eslint-community/eslint-utils": "^4.9.1", + "@typescript-eslint/types": "^8.56.0", + "eslint-visitor-keys": "^4.2.1", + "espree": "^10.4.0", + "estraverse": "^5.3.0", + "picomatch": "^4.0.3" }, "engines": { - "node": ">=6.9.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "peerDependencies": { - "@babel/core": "^7.0.0-0" + "eslint": "^9.0.0 || ^10.0.0" } }, - "node_modules/@babel/plugin-transform-exponentiation-operator": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.29.7.tgz", - "integrity": "sha512-zFpMOTLZBdW5LfObqcSbL6kefg4R4eLdmvS0wbN9M6D5Mym/sKm9toOoWyVOa+xDjvCnuWcHls2YonXwHvH3CQ==", + "node_modules/@stylistic/eslint-plugin/node_modules/picomatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", + "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", "dev": true, "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.29.7" - }, "engines": { - "node": ">=6.9.0" + "node": ">=12" }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/@babel/plugin-transform-export-namespace-from": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.29.7.tgz", - "integrity": "sha512-24B2nOy2TeJSMheqwPD4DDQOV/elLSIlKxjZt4i05H5AgdPdWR3n18HnNrcJ+j76WJd9gbwb9jPjNYUy6RautA==", + "node_modules/@textlint/ast-node-types": { + "version": "15.8.0", + "resolved": "https://registry.npmjs.org/@textlint/ast-node-types/-/ast-node-types-15.8.0.tgz", + "integrity": "sha512-5CiH9COYmovWmExQgs7763DzX6Gy9zjkjJ7JxCC95wyTcjwQn/8poNF6fv3qzRlmx8CRRde8DHr9FcgAAiPzgw==", "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } + "license": "MIT" }, - "node_modules/@babel/plugin-transform-for-of": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.29.7.tgz", - "integrity": "sha512-zeSIHh0+E1Um1WJRXCFlHQYu2ieJNdivLLjlBEp+dIBu3S51n+SZZmIXjxnItw6pz56Cn+KvK68BIBVsxq2JiQ==", + "node_modules/@textlint/markdown-to-ast": { + "version": "15.8.0", + "resolved": "https://registry.npmjs.org/@textlint/markdown-to-ast/-/markdown-to-ast-15.8.0.tgz", + "integrity": "sha512-gWOcd2+UCqODMLGIIY5WiPE9zmR9L4aut3FIkxH8gSCiZ6EVkBaU2mgm+8KiGOjJqdtT98xkWocCwDtQ1kypOQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.29.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@textlint/ast-node-types": "15.8.0", + "debug": "^4.4.3", + "mdast-util-gfm-autolink-literal": "^0.1.3", + "neotraverse": "^0.6.18", + "remark-footnotes": "^3.0.0", + "remark-frontmatter": "^3.0.0", + "remark-gfm": "^1.0.0", + "remark-parse": "^9.0.0", + "structured-source": "^4.0.0", + "unified": "^9.2.2" } }, - "node_modules/@babel/plugin-transform-function-name": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.29.7.tgz", - "integrity": "sha512-otRWaHXE6fbAGkePvaj/kvs3HsqXfPhlnzwSOlnFgbqCPMd975dW+4wZ00WFBt+/YlBGcJwNrARQTOJOb4ZrIg==", + "node_modules/@types/chai": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz", + "integrity": "sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-compilation-targets": "^7.29.7", - "@babel/helper-plugin-utils": "^7.29.7", - "@babel/traverse": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@types/deep-eql": "*", + "assertion-error": "^2.0.1" } }, - "node_modules/@babel/plugin-transform-json-strings": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.29.7.tgz", - "integrity": "sha512-RRnE2+eon1rJAq8MnoF1b5kTpY1vU88twHcvcKMrsqP/jxIRqDVs9iJB5fqPuqyeFAW0wJo4MlUIPpQCq/aRsg==", + "node_modules/@types/deep-eql": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz", + "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==", "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } + "license": "MIT" }, - "node_modules/@babel/plugin-transform-literals": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.29.7.tgz", - "integrity": "sha512-DZ/oLP21ZuWx1vKqnoNv6/tvEK48AQOBRai40CX9dTjGluvT/YZCyY3rryDtyUqCEoyNroy5KKPwX2iQCiRvyw==", + "node_modules/@types/esrecurse": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@types/esrecurse/-/esrecurse-4.3.1.tgz", + "integrity": "sha512-xJBAbDifo5hpffDBuHl0Y8ywswbiAp/Wi7Y/GtAgSlZyIABppyurxVueOPE8LUQOxdlgi6Zqce7uoEpqNTeiUw==", "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } + "license": "MIT" }, - "node_modules/@babel/plugin-transform-logical-assignment-operators": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.29.7.tgz", - "integrity": "sha512-A0H91hh6W8MFRkp5TqJmMr39jzGD1A1E1Ysiv2O06Sfbhkapm+XyIzxWCEh5kqwOZ1/8QZ0dY3SeQ7XBqfJd5Q==", + "node_modules/@types/estree": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", + "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } + "license": "MIT" }, - "node_modules/@babel/plugin-transform-member-expression-literals": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.29.7.tgz", - "integrity": "sha512-hl1kwFZCCiDyfH25Xmco9jTrkPgnS9pmOzSG7W5I4SaGbLeqKv417hcU2RKmaxoPEgsoJh7ZPOrnPGq99bHoUg==", + "node_modules/@types/hast": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.4.tgz", + "integrity": "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@types/unist": "*" } }, - "node_modules/@babel/plugin-transform-modules-amd": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.29.7.tgz", - "integrity": "sha512-fxtQoH3m5ywUSIfaH0FGCzWu4McsYon5bD3K4XnskC7f+OyQMj7rsOMi4NvvmJ83WwBAg4UCe+ov4VZlqEvyew==", + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/mdast": { + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-module-transforms": "^7.29.7", - "@babel/helper-plugin-utils": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@types/unist": "^2" } }, - "node_modules/@babel/plugin-transform-modules-commonjs": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.29.7.tgz", - "integrity": "sha512-j0vCldybPC5b5dwCQOJ21uKtHzt7hxLygJTg9eF1ScfaikEDNfzn94XoW5Fi+seBR0nCyL23xaBFFkq7dTM8XQ==", + "node_modules/@types/mdast/node_modules/@types/unist": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", + "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "26.3.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-26.3.0.tgz", + "integrity": "sha512-L3fgrnchriRC2ExBflb8j4uZZURHZfQsmQeyVzhjcHW4kkwVyo8/0h1B2MVzMTrYUJYu6G7EWs14hW/L9putqw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-module-transforms": "^7.29.7", - "@babel/helper-plugin-utils": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "undici-types": "~8.3.0" } }, - "node_modules/@babel/plugin-transform-modules-systemjs": { - "version": "7.29.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.29.8.tgz", - "integrity": "sha512-6iSnEK0zlkLKU4heofK/AdmRD4e2SHVpJMtrwnTCzhnaM98ria4rTrOXBBi45BTTYnJtO8txnPsX4fChYXkmeA==", + "node_modules/@types/normalize-package-data": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz", + "integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/unist": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", + "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.68.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.68.0.tgz", + "integrity": "sha512-WASHDpCm6qO5jj9g1a+8NiW5+GCkAyLReR56/4VruYmNgfUmqpxOfZ2Yfb8xGfJPWv5Qi6LSD8sXdces3vbp/Q==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-module-transforms": "^7.29.7", - "@babel/helper-plugin-utils": "^7.29.7", - "@babel/helper-validator-identifier": "^7.29.7", - "@babel/traverse": "^7.29.8" + "@eslint-community/regexpp": "^4.12.2", + "@typescript-eslint/scope-manager": "8.68.0", + "@typescript-eslint/type-utils": "8.68.0", + "@typescript-eslint/utils": "8.68.0", + "@typescript-eslint/visitor-keys": "8.68.0", + "ignore": "^7.0.5", + "natural-compare": "^1.4.0", + "ts-api-utils": "^2.5.0" }, "engines": { - "node": ">=6.9.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@typescript-eslint/parser": "^8.68.0", + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" } }, - "node_modules/@babel/plugin-transform-modules-umd": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.29.7.tgz", - "integrity": "sha512-B4UkaTK3QpgCwJnrxKfMPKdo92CN7OKXAlpAAnM3UPu0Q0lCCk57ylA9AJbRy2v8dDKOPAAWcoR6CMyeoHwRCA==", + "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.6.tgz", + "integrity": "sha512-BAg6QkE8W+TuQLrrw0Ugr7HegXduRuuj8/ti2kSOc+jz1dmx8/WNcjr6XGnq5YpDWxFwwaavqD0+jIUOKelTsw==", "dev": true, "license": "MIT", - "dependencies": { - "@babel/helper-module-transforms": "^7.29.7", - "@babel/helper-plugin-utils": "^7.29.7" - }, "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "node": ">= 4" } }, - "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.29.7.tgz", - "integrity": "sha512-vuFoLwr4qnv2xbZ16SQd6uPcH5FNrLHhk/Jzo++0XJFcaDsr4gjJVg6j398oMHiC+83k/GiBzviwF5KBJkPUtQ==", + "node_modules/@typescript-eslint/parser": { + "version": "8.68.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.68.0.tgz", + "integrity": "sha512-fHq2VC1kpyYfvEcbiMjOpySY4WS7voEp89yAThrHRX5sm9j2lzYppCb2umFMEed4fWcyeLjHxrz0mpjNBaBxMQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.29.7", - "@babel/helper-plugin-utils": "^7.29.7" + "@typescript-eslint/scope-manager": "8.68.0", + "@typescript-eslint/types": "8.68.0", + "@typescript-eslint/typescript-estree": "8.68.0", + "@typescript-eslint/visitor-keys": "8.68.0", + "debug": "^4.4.3" }, "engines": { - "node": ">=6.9.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@babel/core": "^7.0.0" + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" } }, - "node_modules/@babel/plugin-transform-new-target": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.29.7.tgz", - "integrity": "sha512-fEo41GmsOUhOBlw8ioo6zvjX5Xc2Lqkzlyfqbpsk3eB6TReV18uhxZ0esfEokVbY2+PVJAQHNKxER6lGrzNd3A==", + "node_modules/@typescript-eslint/project-service": { + "version": "8.68.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.68.0.tgz", + "integrity": "sha512-5GQtWZCXFcFYux955pvoS02WLc49pXNlvIxocKjS0clvwo3in1RdlzVKyiqQH9vE5AKWFLTaUgeQkOrTS+0Qxw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.29.7" + "@typescript-eslint/tsconfig-utils": "^8.68.0", + "@typescript-eslint/types": "^8.68.0", + "debug": "^4.4.3" }, "engines": { - "node": ">=6.9.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@babel/core": "^7.0.0-0" + "typescript": ">=4.8.4 <6.1.0" } }, - "node_modules/@babel/plugin-transform-nullish-coalescing-operator": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.29.7.tgz", - "integrity": "sha512-idmp1dFaekP9GbcMvG24Kvw2BfhFZjHnNJCkV4WuIY4PskJzwI3f1N5OdgYke38T7rftO6ERulFRn2cFeZwRkg==", + "node_modules/@typescript-eslint/scope-manager": { + "version": "8.68.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.68.0.tgz", + "integrity": "sha512-T5eXpcaJNg8bhjHJ8Rjp68Vq/QBteYtTKY8TZqVNPaUbuz0f6jI9t6aDkylwvalpAB9XTTFeFOjrjXAZ3YvmVA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.29.7" + "@typescript-eslint/types": "8.68.0", + "@typescript-eslint/visitor-keys": "8.68.0" }, "engines": { - "node": ">=6.9.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@babel/plugin-transform-numeric-separator": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.29.7.tgz", - "integrity": "sha512-zR7fv/z14OjgHl4AgRtkDBvBMhIzCxqV/qN/2BCRC7LjFwvuzjYe7gDWxC4Wl/SNsLM6SE1IWvRPYMgSJaUvNw==", + "node_modules/@typescript-eslint/tsconfig-utils": { + "version": "8.68.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.68.0.tgz", + "integrity": "sha512-F7zrGQfiJHojPwi8vhxZQC1tWtJzvL74cK/nqri2lk8YUXvYaYwl263xOJ69jDWPUk1hmcdoayFwk9lX09npVw==", "dev": true, "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.29.7" - }, "engines": { - "node": ">=6.9.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@babel/core": "^7.0.0-0" + "typescript": ">=4.8.4 <6.1.0" } }, - "node_modules/@babel/plugin-transform-object-rest-spread": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.29.7.tgz", - "integrity": "sha512-Ld98jn4c0smUywL57m7SgsHq3OpThOa6LqZJif3G6jYOovPleoFhVrBJ1WegRApSFB2wu4+RelAj9AC9G08Z4A==", + "node_modules/@typescript-eslint/type-utils": { + "version": "8.68.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.68.0.tgz", + "integrity": "sha512-X77zqoY1EjeWGs/0JNxeaMfp5C5lIz4Tw8y66F1Ne8Faq6g424sBNYM6xBAqElfGZPLpWS+CZAp0DXyKDzWiHg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-compilation-targets": "^7.29.7", - "@babel/helper-plugin-utils": "^7.29.7", - "@babel/plugin-transform-destructuring": "^7.29.7", - "@babel/plugin-transform-parameters": "^7.29.7", - "@babel/traverse": "^7.29.7" + "@typescript-eslint/types": "8.68.0", + "@typescript-eslint/typescript-estree": "8.68.0", + "@typescript-eslint/utils": "8.68.0", + "debug": "^4.4.3", + "ts-api-utils": "^2.5.0" }, "engines": { - "node": ">=6.9.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@babel/core": "^7.0.0-0" + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" } }, - "node_modules/@babel/plugin-transform-object-super": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.29.7.tgz", - "integrity": "sha512-Ea/diGcw0twB5IlZPO5sgET6fJsLJqPABqTuFWIR+iMPGPZJkATEIWx0wa+aEQ5UY1CBQyP/gkAiLEqn1vBiQA==", + "node_modules/@typescript-eslint/types": { + "version": "8.68.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.68.0.tgz", + "integrity": "sha512-9RnpsGJjrAllCMefGVVsImJM24YurhC0Q1h4UbvivtvOqXmR/vEJge2OoE++z9m6hyg8T1Q8t5SNT6tHSbrxcg==", "dev": true, "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.29.7", - "@babel/helper-replace-supers": "^7.29.7" - }, "engines": { - "node": ">=6.9.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@babel/plugin-transform-optional-catch-binding": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.29.7.tgz", - "integrity": "sha512-sLsyndxK2VwX6yNUOakMb7Sh553ZTe/vVM1XJ+9Z5aW1ytsc8xOIwmyk05NNjN60vkc5/KqoTH6hB4V41LJhng==", + "node_modules/@typescript-eslint/typescript-estree": { + "version": "8.68.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.68.0.tgz", + "integrity": "sha512-OKKsD0tYmoNiU5PW2zehO1yO56jYOm1ShYlxon/Z0SJNidAkdVg86eg9ruRuoXf8xfnuWZGbwDsStkoXbZtIIA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.29.7" + "@typescript-eslint/project-service": "8.68.0", + "@typescript-eslint/tsconfig-utils": "8.68.0", + "@typescript-eslint/types": "8.68.0", + "@typescript-eslint/visitor-keys": "8.68.0", + "debug": "^4.4.3", + "minimatch": "^10.2.2", + "semver": "^7.7.3", + "tinyglobby": "^0.2.15", + "ts-api-utils": "^2.5.0" }, "engines": { - "node": ">=6.9.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@babel/core": "^7.0.0-0" + "typescript": ">=4.8.4 <6.1.0" } }, - "node_modules/@babel/plugin-transform-optional-chaining": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.29.7.tgz", - "integrity": "sha512-6GM1dhvK3gNODkXcEcMCOLEDCLSoZ/sBbro2Ax8HURyasQ4NshagQixkRFdh5niI6E4gmA/jYI/4aT7rRos3ZQ==", + "node_modules/@typescript-eslint/typescript-estree/node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", "dev": true, "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.29.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.29.7" - }, "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "node": "18 || 20 || >=22" } }, - "node_modules/@babel/plugin-transform-parameters": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.29.7.tgz", - "integrity": "sha512-ZDOBqV/qLYJI0YElr8DcENEyARsFQeESqWXH6gZlghYXuPPjvweuDhP4VyEi4BlUBlLRFZVjxoZDMjxhLW766g==", + "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz", + "integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.29.7" + "balanced-match": "^4.0.2" }, "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "node": "20 || >=22" } }, - "node_modules/@babel/plugin-transform-private-methods": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.29.7.tgz", - "integrity": "sha512-/6Rz4DK1ETDEM/bWHsPHcaEe7ZaT1EqSXjtSP/L0DijOYuaUhiRiOKcwpZ8P7zR4xXEHc2ITdiCgBm9Tpyv9ug==", + "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { + "version": "10.2.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", + "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", "dev": true, - "license": "MIT", + "license": "BlueOak-1.0.0", "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.29.7", - "@babel/helper-plugin-utils": "^7.29.7" + "brace-expansion": "^5.0.8" }, "engines": { - "node": ">=6.9.0" + "node": "18 || 20 || >=22" }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/@babel/plugin-transform-private-property-in-object": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.29.7.tgz", - "integrity": "sha512-+BNo06dnrzdNNqCm1X6YUaVv0DKk8Q+JYcoZfOkLhYWNCXzlwTSRq8zGWayT1csjcpNXV9CQTBRRbmTLZac5cA==", + "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.29.7", - "@babel/helper-create-class-features-plugin": "^7.29.7", - "@babel/helper-plugin-utils": "^7.29.7" + "license": "ISC", + "bin": { + "semver": "bin/semver.js" }, "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "node": ">=10" } }, - "node_modules/@babel/plugin-transform-property-literals": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.29.7.tgz", - "integrity": "sha512-bOMRLQuI0A5ZqHq3OWJ89/rXpJ/NJrbVhXiP4zwPGMs6kpcVsuTUNjwoE30K0Qm3mf48a/TnRYYD6vPNqcg6jA==", + "node_modules/@typescript-eslint/utils": { + "version": "8.68.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.68.0.tgz", + "integrity": "sha512-PB5gJMMOg0Q5P1tsgWtEAqQacJXq0qEqRHDX/YJ4FaTMLfZPpHB3gjl2EJuiZyPABxmj4ZQYiY9m1bdAJ5y7tQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.29.7" + "@eslint-community/eslint-utils": "^4.9.1", + "@typescript-eslint/scope-manager": "8.68.0", + "@typescript-eslint/types": "8.68.0", + "@typescript-eslint/typescript-estree": "8.68.0" }, "engines": { - "node": ">=6.9.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@babel/core": "^7.0.0-0" + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" } }, - "node_modules/@babel/plugin-transform-regenerator": { - "version": "7.29.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.29.8.tgz", - "integrity": "sha512-0UpIXPtdDtMXfnV2OJAVMLpj3H/92vmkA6lpSRakmycJvj3VUy6Xs1dM8tXRugupykr5WB+LpiVl0J8LMVg2mg==", + "node_modules/@typescript-eslint/visitor-keys": { + "version": "8.68.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.68.0.tgz", + "integrity": "sha512-YR65gGdGvTUAWLldC3xLOvOzamdGzB4A5/N8rehEaHs3Zvoe39BhgY+u0SPch1OvrVTfLcc55wsSgK2NcnTS/A==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.29.7" + "@typescript-eslint/types": "8.68.0", + "eslint-visitor-keys": "^5.0.0" }, "engines": { - "node": ">=6.9.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@babel/plugin-transform-regexp-modifiers": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regexp-modifiers/-/plugin-transform-regexp-modifiers-7.29.7.tgz", - "integrity": "sha512-mB5Fs0VWrJ42ZCmc8114v60qetdaUVNkj9PmSZRmanCZM3S9hm0CFRLjRmYIsuXav14l2jvZ+4T8iiCGnhj3nQ==", + "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz", + "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==", "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.29.7", - "@babel/helper-plugin-utils": "^7.29.7" - }, + "license": "Apache-2.0", "engines": { - "node": ">=6.9.0" + "node": "^20.19.0 || ^22.13.0 || >=24" }, - "peerDependencies": { - "@babel/core": "^7.0.0" + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/@babel/plugin-transform-reserved-words": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.29.7.tgz", - "integrity": "sha512-5+YhdpVgmfSmwZyLMftfaiffLRMHjzIRHFHHLdibcSyJm2pasMrKHrO3Ptrt2DRshjvpgjEJJ1zVW14WPq/6QA==", + "node_modules/@vitest/expect": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.11.tgz", + "integrity": "sha512-VX2x5vNJXET47KAFzwERI+KRMtTTCSWTfSMKsW7JsUsXV4psq++e3DvZpuTDOpHcxytiDs6p2nhVb2tVDiiUYw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" + "@standard-schema/spec": "^1.1.0", + "@types/chai": "^5.2.2", + "@vitest/spy": "4.1.11", + "@vitest/utils": "4.1.11", + "chai": "^6.2.2", + "tinyrainbow": "^3.1.0" }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "funding": { + "url": "https://opencollective.com/vitest" } }, - "node_modules/@babel/plugin-transform-shorthand-properties": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.29.7.tgz", - "integrity": "sha512-I+WYbGBAiCn7nA6xBrlgPH+MB7HWb4u8pv5S0Pv7OtwNvIFvCCb24YlttKEeUFVurfBCEaOTnuhlqsb7f0Z5Dg==", + "node_modules/@vitest/mocker": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.1.11.tgz", + "integrity": "sha512-2XJVD55d1o5AZous5CCGKS74g/riOj9odEt2bQpCVZeblHyHdnMeFl4jl0XjU21stf4mbjUkew2eXQZt65g5CQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.29.7" + "@vitest/spy": "4.1.11", + "estree-walker": "^3.0.3", + "magic-string": "^0.30.21" }, - "engines": { - "node": ">=6.9.0" + "funding": { + "url": "https://opencollective.com/vitest" }, "peerDependencies": { - "@babel/core": "^7.0.0-0" + "msw": "^2.4.9", + "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "msw": { + "optional": true + }, + "vite": { + "optional": true + } } }, - "node_modules/@babel/plugin-transform-spread": { - "version": "7.29.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.29.8.tgz", - "integrity": "sha512-4S9ksMGVWUshvgK0mKfvZky7leuG5/uoFVwMpAomJ8bMoDJiNHRVmc1EglwW/CmGVSqqWpEbXm9FmbRit22qoA==", + "node_modules/@vitest/mocker/node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.29.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@types/estree": "^1.0.0" } }, - "node_modules/@babel/plugin-transform-sticky-regex": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.29.7.tgz", - "integrity": "sha512-BCHzNYJGe9l7EpwwDBN/ztlL2NYFFq8hp9ddjtUEM9f2O7S7kKV/lL6Fwo7IF7NSkYhPK2vO+86nIGltA90MsA==", + "node_modules/@vitest/pretty-format": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.1.11.tgz", + "integrity": "sha512-yiZzPbGTS9Sr/JpFl8zHrcIkAofNbFV6k21vIgQN/cY/oxZeXhJv5sc/MBJ5jFKWmWs+oJHw0UXLZjmf931+Vw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" + "tinyrainbow": "^3.1.0" }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "funding": { + "url": "https://opencollective.com/vitest" } }, - "node_modules/@babel/plugin-transform-template-literals": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.29.7.tgz", - "integrity": "sha512-NCSEJ4sLFU2gqAub45HYh4fus2yQ36rr6ei6vpU7NdoJqCpxvEG8E6eJpscGyXP3VHD2Ny+fSXr04k1hoUrFqA==", + "node_modules/@vitest/runner": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.1.11.tgz", + "integrity": "sha512-LztvUgdwMNJMIkj3hQnnxiC2Xy1zNxq928W/xhjCLaNCzqTZOudjwbQf6v9IntZGPw132i2Lq2rgTRZHD3JHNw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" + "@vitest/utils": "4.1.11", + "pathe": "^2.0.3" }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "funding": { + "url": "https://opencollective.com/vitest" } }, - "node_modules/@babel/plugin-transform-typeof-symbol": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.29.7.tgz", - "integrity": "sha512-223mNGoTkBiTEWFoK+Q6Go3tueMRclO8vxxxxquNCYuNI4jWOofFKJRRDu6SDrB8Sgo1UEGW9T4GAQ8ZyRso1A==", + "node_modules/@vitest/snapshot": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.1.11.tgz", + "integrity": "sha512-pN7ikn1ON7h8ee4gIAp4AzyK+zBtJPzVbqOgu5LCEh4VaJVbPQcgYQYJIMGQPXVeJJq1fnfazis7a5pFNPahog==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" + "@vitest/pretty-format": "4.1.11", + "@vitest/utils": "4.1.11", + "magic-string": "^0.30.21", + "pathe": "^2.0.3" }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "funding": { + "url": "https://opencollective.com/vitest" } }, - "node_modules/@babel/plugin-transform-unicode-escapes": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.29.7.tgz", - "integrity": "sha512-jCfXxSjf94lf4E0hKE0AByxF6F3/pVFqRdUUNkDJhsY0m1ZKjnN6ZYyMeHNpzflxb/0q5b7t3p+BE+SLF1WOtA==", + "node_modules/@vitest/spy": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.1.11.tgz", + "integrity": "sha512-apNa/prQy2qCeywhnixOHPRCgGNhvg7T4Dapfl1GahLp/R+uhBm5cPyFoNVyqsNd2h1nJxL6BqqdIjiABL60YA==", "dev": true, "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "funding": { + "url": "https://opencollective.com/vitest" } }, - "node_modules/@babel/plugin-transform-unicode-property-regex": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.29.7.tgz", - "integrity": "sha512-OgZ+zoAJgZLUCunsTRQ5LAjOywDv5zzZ2/hQ5aMw1pGXyY2rtE8/chXYUmu3AlVHKpm10KEdG9aMwbI/K76ZGw==", + "node_modules/@vitest/utils": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.11.tgz", + "integrity": "sha512-zTCVGpyFsGWBhllOyKlTw/vnr6D9qxsfSDyfbyZmTyjHw5N/VuvzHpHoQjm2ZJzn4RJgx5w4r7V0er69CmLgPQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.29.7", - "@babel/helper-plugin-utils": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" + "@vitest/pretty-format": "4.1.11", + "convert-source-map": "^2.0.0", + "tinyrainbow": "^3.1.0" }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "funding": { + "url": "https://opencollective.com/vitest" } }, - "node_modules/@babel/plugin-transform-unicode-regex": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.29.7.tgz", - "integrity": "sha512-7D/x/23/d/3VqZ0QA+LGbZMlGwZjztBygSWWWsfTPoQ1oQ6Q1P6Mr3d0kk42XabyUVw+fha3LqdRsFqeKqvCyA==", + "node_modules/@yuku-codegen/binding-android-arm64": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@yuku-codegen/binding-android-arm64/-/binding-android-arm64-0.8.7.tgz", + "integrity": "sha512-C/0zV5IhgVdYhGJTwrY0v8dknxlhiKwtVJkMUaexu9/QvRmzlV4vfU3hZlUSgqc2BxQHntL1mCVbDq8j0FRFDw==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.29.7", - "@babel/helper-plugin-utils": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } + "optional": true, + "os": [ + "android" + ] }, - "node_modules/@babel/plugin-transform-unicode-sets-regex": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.29.7.tgz", - "integrity": "sha512-BLOhLht9DOJwIxlmp91wHvkXv1lguuHS3/FwUO8HL1H0u8s4hR1gASVFyilu9iGtcTRYqjTZmlsFFeQletntEg==", + "node_modules/@yuku-codegen/binding-darwin-arm64": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@yuku-codegen/binding-darwin-arm64/-/binding-darwin-arm64-0.8.7.tgz", + "integrity": "sha512-/u+REDMI4a0/lsJXTM4c53/w31OGZLOReZIyg62uhgLs0kc8NHsj/nOcxTdlQjq5gi0zhdkccD9LaLTXcdzPvw==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.29.7", - "@babel/helper-plugin-utils": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/preset-env": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.29.7.tgz", - "integrity": "sha512-GYzX36n1nsciIb0uyH0GHwxwtNwPQIcpxSeiVLDtG/B7jB5xXgchnmL1f/jCX5o+pwnaDBtO60ONSJhEBJfxYA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/compat-data": "^7.29.7", - "@babel/helper-compilation-targets": "^7.29.7", - "@babel/helper-plugin-utils": "^7.29.7", - "@babel/helper-validator-option": "^7.29.7", - "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "^7.29.7", - "@babel/plugin-bugfix-safari-class-field-initializer-scope": "^7.29.7", - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.29.7", - "@babel/plugin-bugfix-safari-rest-destructuring-rhs-array": "^7.29.7", - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.29.7", - "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.29.7", - "@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2", - "@babel/plugin-syntax-import-assertions": "^7.29.7", - "@babel/plugin-syntax-import-attributes": "^7.29.7", - "@babel/plugin-syntax-unicode-sets-regex": "^7.18.6", - "@babel/plugin-transform-arrow-functions": "^7.29.7", - "@babel/plugin-transform-async-generator-functions": "^7.29.7", - "@babel/plugin-transform-async-to-generator": "^7.29.7", - "@babel/plugin-transform-block-scoped-functions": "^7.29.7", - "@babel/plugin-transform-block-scoping": "^7.29.7", - "@babel/plugin-transform-class-properties": "^7.29.7", - "@babel/plugin-transform-class-static-block": "^7.29.7", - "@babel/plugin-transform-classes": "^7.29.7", - "@babel/plugin-transform-computed-properties": "^7.29.7", - "@babel/plugin-transform-destructuring": "^7.29.7", - "@babel/plugin-transform-dotall-regex": "^7.29.7", - "@babel/plugin-transform-duplicate-keys": "^7.29.7", - "@babel/plugin-transform-duplicate-named-capturing-groups-regex": "^7.29.7", - "@babel/plugin-transform-dynamic-import": "^7.29.7", - "@babel/plugin-transform-explicit-resource-management": "^7.29.7", - "@babel/plugin-transform-exponentiation-operator": "^7.29.7", - "@babel/plugin-transform-export-namespace-from": "^7.29.7", - "@babel/plugin-transform-for-of": "^7.29.7", - "@babel/plugin-transform-function-name": "^7.29.7", - "@babel/plugin-transform-json-strings": "^7.29.7", - "@babel/plugin-transform-literals": "^7.29.7", - "@babel/plugin-transform-logical-assignment-operators": "^7.29.7", - "@babel/plugin-transform-member-expression-literals": "^7.29.7", - "@babel/plugin-transform-modules-amd": "^7.29.7", - "@babel/plugin-transform-modules-commonjs": "^7.29.7", - "@babel/plugin-transform-modules-systemjs": "^7.29.7", - "@babel/plugin-transform-modules-umd": "^7.29.7", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.29.7", - "@babel/plugin-transform-new-target": "^7.29.7", - "@babel/plugin-transform-nullish-coalescing-operator": "^7.29.7", - "@babel/plugin-transform-numeric-separator": "^7.29.7", - "@babel/plugin-transform-object-rest-spread": "^7.29.7", - "@babel/plugin-transform-object-super": "^7.29.7", - "@babel/plugin-transform-optional-catch-binding": "^7.29.7", - "@babel/plugin-transform-optional-chaining": "^7.29.7", - "@babel/plugin-transform-parameters": "^7.29.7", - "@babel/plugin-transform-private-methods": "^7.29.7", - "@babel/plugin-transform-private-property-in-object": "^7.29.7", - "@babel/plugin-transform-property-literals": "^7.29.7", - "@babel/plugin-transform-regenerator": "^7.29.7", - "@babel/plugin-transform-regexp-modifiers": "^7.29.7", - "@babel/plugin-transform-reserved-words": "^7.29.7", - "@babel/plugin-transform-shorthand-properties": "^7.29.7", - "@babel/plugin-transform-spread": "^7.29.7", - "@babel/plugin-transform-sticky-regex": "^7.29.7", - "@babel/plugin-transform-template-literals": "^7.29.7", - "@babel/plugin-transform-typeof-symbol": "^7.29.7", - "@babel/plugin-transform-unicode-escapes": "^7.29.7", - "@babel/plugin-transform-unicode-property-regex": "^7.29.7", - "@babel/plugin-transform-unicode-regex": "^7.29.7", - "@babel/plugin-transform-unicode-sets-regex": "^7.29.7", - "@babel/preset-modules": "0.1.6-no-external-plugins", - "babel-plugin-polyfill-corejs2": "^0.4.15", - "babel-plugin-polyfill-corejs3": "^0.14.0", - "babel-plugin-polyfill-regenerator": "^0.6.6", - "core-js-compat": "^3.48.0", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } + "optional": true, + "os": [ + "darwin" + ] }, - "node_modules/@babel/preset-modules": { - "version": "0.1.6-no-external-plugins", - "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.6-no-external-plugins.tgz", - "integrity": "sha512-HrcgcIESLm9aIR842yhJ5RWan/gebQUJ6E/E5+rf0y9o6oj7w0Br+sWuL6kEQ/o/AdfvR1Je9jG18/gnpwjEyA==", + "node_modules/@yuku-codegen/binding-darwin-x64": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@yuku-codegen/binding-darwin-x64/-/binding-darwin-x64-0.8.7.tgz", + "integrity": "sha512-sMMzFOwCo4WXR+/6zIBThOocSC50iIIZZdfiIDbaLvj0Ax/rWt/iavyfEAqajyvzydLyCqR/ZItdLWSRlu1umw==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/types": "^7.4.4", - "esutils": "^2.0.2" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0 || ^8.0.0-0 <8.0.0" - } + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] }, - "node_modules/@babel/template": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.29.7.tgz", - "integrity": "sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==", + "node_modules/@yuku-codegen/binding-freebsd-x64": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@yuku-codegen/binding-freebsd-x64/-/binding-freebsd-x64-0.8.7.tgz", + "integrity": "sha512-MpdpKXix9P+Y1rKgjvcNeNtGjXeL1CmttNhYINrWls8kRpm4xM/oBGTmn6w7to8lAlwj5jm8q03dQPl5mRv4Qw==", + "cpu": [ + "x64" + ], "dev": true, "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.29.7", - "@babel/parser": "^7.29.7", - "@babel/types": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" - } + "optional": true, + "os": [ + "freebsd" + ] }, - "node_modules/@babel/traverse": { - "version": "7.29.8", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.8.tgz", - "integrity": "sha512-I5z7H3bf/41ktsNVLtpN0wAa336HkqIHQ5BuPLEhTkt1jVSyZpeNKIzTgEWmlxjdg81R0IgUCcaE+Ok3NvrfZg==", + "node_modules/@yuku-codegen/binding-linux-arm-gnu": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@yuku-codegen/binding-linux-arm-gnu/-/binding-linux-arm-gnu-0.8.7.tgz", + "integrity": "sha512-rr1srFLlPAmC1vtxfc9C1YLDe3iH09YjfSeeIidBqKhzx1MATjOAq4mjlRUOnhr/L27MotWIYOFKwVsd5JZFOg==", + "cpu": [ + "arm" + ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.29.7", - "@babel/generator": "^7.29.8", - "@babel/helper-globals": "^7.29.7", - "@babel/parser": "^7.29.8", - "@babel/template": "^7.29.7", - "@babel/types": "^7.29.8", - "debug": "^4.3.1" - }, - "engines": { - "node": ">=6.9.0" - } + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/@babel/types": { - "version": "7.29.8", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.8.tgz", - "integrity": "sha512-Vj1jF3cPfxg7OAfoI7QnVKLoILlm2JF9pnVHrX8qx7AHMiYWT+NDAA7jChlNgRS4WTLc/fD1lXLmPixluj+3Gg==", + "node_modules/@yuku-codegen/binding-linux-arm-musl": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@yuku-codegen/binding-linux-arm-musl/-/binding-linux-arm-musl-0.8.7.tgz", + "integrity": "sha512-eAufXh8qBRpiSO6ueaMDL+yyoXIGLhpUce72YbcACtZU2qhExwBIJyEtQf5kH2Ki0X2aqkSjSfog4OPtKXan3Q==", + "cpu": [ + "arm" + ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.29.7", - "@babel/helper-validator-identifier": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" - } + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/@borgar/eslint-config": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@borgar/eslint-config/-/eslint-config-4.1.0.tgz", - "integrity": "sha512-dzRD0t2+3TDiEdr62rQT0a+DTwetjMx+uWZQ6ijKQXjJfhklOUoUCH2R4KIGN53bRHwOW5rvnown41nKCR+Ymw==", + "node_modules/@yuku-codegen/binding-linux-arm64-gnu": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@yuku-codegen/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-0.8.7.tgz", + "integrity": "sha512-gw4w6wPoHObBrdIC4duVWLmJOvpdE25j5D7yrM5mACNlK4klRz/lv8hK+ssQk9EJHBgZjSaqZIJVFgqNYbfv7A==", + "cpu": [ + "arm64" + ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", - "dependencies": { - "@stylistic/eslint-plugin": "~5.9.0" - } + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz", - "integrity": "sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==", + "node_modules/@yuku-codegen/binding-linux-arm64-musl": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@yuku-codegen/binding-linux-arm64-musl/-/binding-linux-arm64-musl-0.8.7.tgz", + "integrity": "sha512-L68N6Y4XkqcIaKo3Ra88JEvBEH4AHff44A4INcrxeVWZ8CZtu2tCpfVxe3hR8qQQMcvBSQlDn24KpkCKEhVvfA==", + "cpu": [ + "arm64" + ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^3.4.3" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "node_modules/@yuku-codegen/binding-linux-x64-gnu": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@yuku-codegen/binding-linux-x64-gnu/-/binding-linux-x64-gnu-0.8.7.tgz", + "integrity": "sha512-dzyAbltJmf3Cqlb8HcFuYIf5Yn0fl1vTr3XJ9HiVNNvOlhqPSArOqtw9vI1p6/VTXTjrMLXlU+s+/kNHiIy/Cw==", + "cpu": [ + "x64" + ], "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/@eslint-community/regexpp": { - "version": "4.12.2", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", - "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", + "node_modules/@yuku-codegen/binding-linux-x64-musl": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@yuku-codegen/binding-linux-x64-musl/-/binding-linux-x64-musl-0.8.7.tgz", + "integrity": "sha512-Otw4MH3404q0Bbvl+YTdW9aoUV5vXmUw8260bWvt1XlaoIX/ceSgI4ygheRDMfBPoHt6FDayQaO9OLVUZAgkFA==", + "cpu": [ + "x64" + ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/@eslint/config-array": { - "version": "0.23.5", - "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.23.5.tgz", - "integrity": "sha512-Y3kKLvC1dvTOT+oGlqNQ1XLqK6D1HU2YXPc52NmAlJZbMMWDzGYXMiPRJ8TYD39muD/OTjlZmNJ4ib7dvSrMBA==", + "node_modules/@yuku-codegen/binding-win32-arm64": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@yuku-codegen/binding-win32-arm64/-/binding-win32-arm64-0.8.7.tgz", + "integrity": "sha512-qo/jyrzryiBuKEsFiuWaBCBe3tRMynQ0qFWFgOEjcCMQeZfBm+wKiVEUEFXXLc7bh8YezguAWp0Mtnhq4ARNyA==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@eslint/object-schema": "^3.0.5", - "debug": "^4.3.1", - "minimatch": "^10.2.4" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - } + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] }, - "node_modules/@eslint/config-array/node_modules/balanced-match": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", - "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "node_modules/@yuku-codegen/binding-win32-x64": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@yuku-codegen/binding-win32-x64/-/binding-win32-x64-0.8.7.tgz", + "integrity": "sha512-D5lDsVDx6m00E6bWySlWdH72Ca4TPSaphDqB6QjU6MpuNLIJqoGoatYyq2rOmBE8Zv/kunot/o58KGL03P3eiA==", + "cpu": [ + "x64" + ], "dev": true, "license": "MIT", - "engines": { - "node": "18 || 20 || >=22" - } + "optional": true, + "os": [ + "win32" + ] }, - "node_modules/@eslint/config-array/node_modules/brace-expansion": { - "version": "5.0.9", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz", - "integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==", + "node_modules/@yuku-parser/binding-android-arm64": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@yuku-parser/binding-android-arm64/-/binding-android-arm64-0.8.7.tgz", + "integrity": "sha512-eGKYiUDX7Y0V7tDTmg+JTVnXnjMqfXXsorZ+EDf5kxwchQ3Or1HS14MzI2fw+jFhHR85fCWt+mtX33Yao73hIQ==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", - "dependencies": { - "balanced-match": "^4.0.2" - }, - "engines": { - "node": "20 || >=22" - } + "optional": true, + "os": [ + "android" + ] }, - "node_modules/@eslint/config-array/node_modules/minimatch": { - "version": "10.2.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", - "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", + "node_modules/@yuku-parser/binding-darwin-arm64": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@yuku-parser/binding-darwin-arm64/-/binding-darwin-arm64-0.8.7.tgz", + "integrity": "sha512-Re0RHelKLnjEURulY2/KxW+Ngb8zuNA4BRZuMwgGQNzVumT6u4U2N2hc01oeYVNVof0i7GrXE4UCNBgbpRRnjQ==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "brace-expansion": "^5.0.8" - }, - "engines": { - "node": "18 || 20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] }, - "node_modules/@eslint/config-helpers": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.7.0.tgz", - "integrity": "sha512-DObd/KKUsU+FaFv4PLxSRenpXfQWmPXXP3pPZ6/K1PCrMu2vQpMDMuQe/BqYeoLcz8ro0bVDF1RxOJgfVEdhUw==", + "node_modules/@yuku-parser/binding-darwin-x64": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@yuku-parser/binding-darwin-x64/-/binding-darwin-x64-0.8.7.tgz", + "integrity": "sha512-Hn8DROtQkjlA1ACbPgj4a7eP9IuVOI504oiTwpkWPbpaDWD9KdmnVYCqW+1LfenNK/g7O9NhWGpXEdaCNX7lIA==", + "cpu": [ + "x64" + ], "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@eslint/core": "^1.2.1" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - } + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] }, - "node_modules/@eslint/core": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-1.2.1.tgz", - "integrity": "sha512-MwcE1P+AZ4C6DWlpin/OmOA54mmIZ/+xZuJiQd4SyB29oAJjN30UW9wkKNptW2ctp4cEsvhlLY/CsQ1uoHDloQ==", + "node_modules/@yuku-parser/binding-freebsd-x64": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@yuku-parser/binding-freebsd-x64/-/binding-freebsd-x64-0.8.7.tgz", + "integrity": "sha512-bAP2OV8wRuzplX/jYxv9+vvqQT8JxyNphI8fLfXGL054Xs+4/J5u33cIm3y4rxY8rdoLmmdiJs2Tq7r7lrDRfA==", + "cpu": [ + "x64" + ], "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@types/json-schema": "^7.0.15" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - } + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] }, - "node_modules/@eslint/js": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-10.0.1.tgz", - "integrity": "sha512-zeR9k5pd4gxjZ0abRoIaxdc7I3nDktoXZk2qOv9gCNWx3mVwEn32VRhyLaRsDiJjTs0xq/T8mfPtyuXu7GWBcA==", + "node_modules/@yuku-parser/binding-linux-arm-gnu": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@yuku-parser/binding-linux-arm-gnu/-/binding-linux-arm-gnu-0.8.7.tgz", + "integrity": "sha512-kTYwJQQgmZeAWdDIWabiReIZMpmfLueIj1tCmjStUtFGhR1Z0qwxonKVfUC4N7h/VhGGzLZ//7O1kgt1QKqgCg==", + "cpu": [ + "arm" + ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - }, - "funding": { - "url": "https://eslint.org/donate" - }, - "peerDependencies": { - "eslint": "^10.0.0" - }, - "peerDependenciesMeta": { - "eslint": { - "optional": true - } - } + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/@eslint/object-schema": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-3.0.5.tgz", - "integrity": "sha512-vqTaUEgxzm+YDSdElad6PiRoX4t8VGDjCtt05zn4nU810UIx/uNEV7/lZJ6KwFThKZOzOxzXy48da+No7HZaMw==", + "node_modules/@yuku-parser/binding-linux-arm-musl": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@yuku-parser/binding-linux-arm-musl/-/binding-linux-arm-musl-0.8.7.tgz", + "integrity": "sha512-uL4jE8HPT2BLlxAXyD10LqgPuXa9eDa0BKpCdSANmzIJghq/2eZo3/gQNtaxPZMupWoxjYzSad9IXrwu7aYPXQ==", + "cpu": [ + "arm" + ], "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - } + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/@eslint/plugin-kit": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.7.2.tgz", - "integrity": "sha512-+CNAzxglkrpNf/kKywqQfk74QjtceuOE7Qm+AF8miRvPF/wmmK5+OJOgVh3AVTT3RP2mH3+FOaxlE5v72owk0A==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@eslint/core": "^1.2.1", - "levn": "^0.4.1" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - } + "node_modules/@yuku-parser/binding-linux-arm64-gnu": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@yuku-parser/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-0.8.7.tgz", + "integrity": "sha512-3gVN4pWSKZmXiNX7cU164dR9MPvesCHnlH6nPfpK+yQsCuYphjKKplcb4SnZBrhiqmXbgb2HR0c2TS0IZUPhgA==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/@gerrit0/mini-shiki": { - "version": "3.23.0", - "resolved": "https://registry.npmjs.org/@gerrit0/mini-shiki/-/mini-shiki-3.23.0.tgz", - "integrity": "sha512-bEMORlG0cqdjVyCEuU0cDQbORWX+kYCeo0kV1lbxF5bt4r7SID2l9bqsxJEM0zndaxpOUT7riCyIVEuqq/Ynxg==", + "node_modules/@yuku-parser/binding-linux-arm64-musl": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@yuku-parser/binding-linux-arm64-musl/-/binding-linux-arm64-musl-0.8.7.tgz", + "integrity": "sha512-S0mwfEjoLpxzXeZw802Wa4RaELsQiPtWqG6INcy8j4GtvNFtl4LCX3eGO1XLn9pyLAISLzTRyU3zUCBUPin8lg==", + "cpu": [ + "arm64" + ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", - "dependencies": { - "@shikijs/engine-oniguruma": "^3.23.0", - "@shikijs/langs": "^3.23.0", - "@shikijs/themes": "^3.23.0", - "@shikijs/types": "^3.23.0", - "@shikijs/vscode-textmate": "^10.0.2" - } + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/@humanfs/core": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", - "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "node_modules/@yuku-parser/binding-linux-x64-gnu": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@yuku-parser/binding-linux-x64-gnu/-/binding-linux-x64-gnu-0.8.7.tgz", + "integrity": "sha512-lnbWdPmerE5D1uH1G4IEZKnPzCrWCStRGrtgpSIe1RibAo5bZIjDbbbPYXmMHCEh4F+x/JaJpElh26a3r+BPbg==", + "cpu": [ + "x64" + ], "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=18.18.0" - } + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/@humanfs/node": { - "version": "0.16.7", - "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.7.tgz", - "integrity": "sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==", + "node_modules/@yuku-parser/binding-linux-x64-musl": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@yuku-parser/binding-linux-x64-musl/-/binding-linux-x64-musl-0.8.7.tgz", + "integrity": "sha512-769uwndMvMzUvATWbAcEvyLHKA+DzhHSCl/obBUrRdYfRo26yxui6S8y3z7uJ+Naup7UKrDxrpK7OnQkxkl9KQ==", + "cpu": [ + "x64" + ], "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@humanfs/core": "^0.19.1", - "@humanwhocodes/retry": "^0.4.0" - }, - "engines": { - "node": ">=18.18.0" - } + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "node_modules/@yuku-parser/binding-win32-arm64": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@yuku-parser/binding-win32-arm64/-/binding-win32-arm64-0.8.7.tgz", + "integrity": "sha512-mEB/9PlaAkisJ6KWGz0zvywXoU6+80dTlR2LwS7s/jcXXoU6fm2+sitBZXtqu3+Q4DcDgPxM45uWMCzPs0TSRw==", + "cpu": [ + "arm64" + ], "dev": true, - "engines": { - "node": ">=12.22" + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@yuku-parser/binding-win32-x64": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@yuku-parser/binding-win32-x64/-/binding-win32-x64-0.8.7.tgz", + "integrity": "sha512-8vNB2DP0ou61nGb8tc/qfi41gfyDXz1MHr2zqL3nR+cJ6CEbiuWV/l/a/vv151gCgiZLLAyGkQGENpozdg716w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@yuku-toolchain/types": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@yuku-toolchain/types/-/types-0.8.7.tgz", + "integrity": "sha512-2Z53dNxAJL6UvFoIrDZvYf3zlO8s4VJK4O2hhaB4mXVwwpX/7ajtss3cmfqKvamlNLWyt9FSWs4eoYdlbxpnHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/acorn": { + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz", + "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" + "engines": { + "node": ">=0.4.0" } }, - "node_modules/@humanwhocodes/retry": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", - "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=18.18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.13", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", - "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "node_modules/ajv": { + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.15.0.tgz", + "integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==", "dev": true, "license": "MIT", "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.0", - "@jridgewell/trace-mapping": "^0.3.24" + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/@jridgewell/remapping": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", - "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", + "node_modules/anchor-markdown-header": { + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/anchor-markdown-header/-/anchor-markdown-header-0.8.4.tgz", + "integrity": "sha512-20eMBMpts7k5rXAAj67geSqc/tsexHZOZJDWQD214YcDuNtyizDa7Q77sYa5rkao2FwsQP1WKRt2X6mphwmhbg==", "dev": true, "license": "MIT", "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.24" + "emoji-regex": "~10.6.0", + "remove-markdown": "^0.6.2" } }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "node_modules/ansis": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ansis/-/ansis-4.3.1.tgz", + "integrity": "sha512-BJ8/l4R5LRE7hW9WdSuGYrLSHi2ynxeFpDFbH0K/CgNeY/tyhk+vO6TYxXC5r5CpUhNVX310xzPsN/H9lCdfOA==", "dev": true, + "license": "ISC", "engines": { - "node": ">=6.0.0" + "node": ">=14" } }, - "node_modules/@jridgewell/source-map": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", - "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", - "dev": true, - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25" - } + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.5", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", - "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true, - "license": "MIT" + "license": "MIT", + "engines": { + "node": ">=8" + } }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.31", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", - "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "node_modules/arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", "dev": true, "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/@jsdoc/salty": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/@jsdoc/salty/-/salty-0.2.5.tgz", - "integrity": "sha512-TfRP53RqunNe2HBobVBJ0VLhK1HbfvBYeTC1ahnN64PWvyYyGebmMiPkuwvD9fpw2ZbkoPb8Q7mwy0aR8Z9rvw==", + "node_modules/assertion-error": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", + "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", "dev": true, - "dependencies": { - "lodash": "^4.17.21" - }, + "license": "MIT", "engines": { - "node": ">=v12.0.0" + "node": ">=12" } }, - "node_modules/@napi-rs/lzma-linux-x64-gnu": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-x64-gnu/-/lzma-linux-x64-gnu-1.5.1.tgz", - "integrity": "sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ==", - "cpu": [ - "x64" - ], + "node_modules/bail": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/bail/-/bail-1.0.5.tgz", + "integrity": "sha512-xFbRxM1tahm08yHBP16MMjVUAvDaBMD38zsM9EMAUN61omwLmKlOpB/Zku5QkjZ8TZ4vn53pj+t518cH0S03RQ==", "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^22.20 || ^24.12 || >=25" + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "node_modules/boundary": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/boundary/-/boundary-2.0.0.tgz", + "integrity": "sha512-rJKn5ooC9u8q13IMCrW0RSp31pxBCHE3y9V/tp3TdWSLf8Em3p6Di4NBpfzbJge9YjjFEsD0RtFEjtvHL5VyEA==", + "dev": true, + "license": "BSD-2-Clause" + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "license": "MIT", "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" + "fill-range": "^7.1.1" }, "engines": { - "node": ">= 8" + "node": ">=8" } }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "node_modules/cac": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/cac/-/cac-7.0.0.tgz", + "integrity": "sha512-tixWYgm5ZoOD+3g6UTea91eow5z6AAHaho3g0V9CNSNb45gM8SmflpAc+GRd1InC4AqN/07Unrgp56Y94N9hJQ==", "dev": true, "license": "MIT", "engines": { - "node": ">= 8" + "node": ">=20.19.0" } }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true, "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, "engines": { - "node": ">= 8" + "node": ">=6" } }, - "node_modules/@oxc-project/types": { - "version": "0.146.0", - "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.146.0.tgz", - "integrity": "sha512-XC0QsnnhVe7sLIWmYmdPw7x5P0h4W8vUU3Nv1ySgWXtvCz8NizoAEpGXA0sOYoJQV2Rl13LgURAHQ5cI5ILCSA==", + "node_modules/camelcase-keys": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz", + "integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==", "dev": true, "license": "MIT", + "dependencies": { + "camelcase": "^5.3.1", + "map-obj": "^4.0.0", + "quick-lru": "^4.0.1" + }, + "engines": { + "node": ">=8" + }, "funding": { - "url": "https://github.com/sponsors/Boshen" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@rolldown/binding-android-arm-eabi": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm-eabi/-/binding-android-arm-eabi-1.2.5.tgz", - "integrity": "sha512-DLe/i+l8ynIBY7XEQ191TeZvCoowIGa18R+dIV30GW7DiOtp74i/xX8hs8GUjW5ARV7VZuie3d6AumSmCwbeRA==", - "cpu": [ - "arm" - ], + "node_modules/ccount": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ccount/-/ccount-1.1.0.tgz", + "integrity": "sha512-vlNK021QdI7PNeiUh/lKkC/mNHHfV0m/Ad5JoI0TYtlBnJAslM/JIkm/tGC88bkLIwO6OQ5uV6ztS6kVAtCDlg==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/@rolldown/binding-android-arm64": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.2.5.tgz", - "integrity": "sha512-zXcwKlQApYAOELHd8PwKDFkagYF9Wy4e0RJ+0qnzl9Pjnpj75TEG8ufv40p2J7kCEfwZAsNiuzRIyNNMWT38ig==", - "cpu": [ - "arm64" - ], + "node_modules/chai": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/chai/-/chai-6.2.2.tgz", + "integrity": "sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "android" - ], "engines": { - "node": "^20.19.0 || >=22.12.0" + "node": ">=18" } }, - "node_modules/@rolldown/binding-darwin-arm64": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.2.5.tgz", - "integrity": "sha512-dK4QakI42nzWgJT5sm4y4y/O//D4OxM75/cH28RLV+nzIN9AY+YsbuUVrUTjlLjXR6vpyxFbSsbmNuJ6BP9sww==", - "cpu": [ - "arm64" - ], + "node_modules/character-entities": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz", + "integrity": "sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/@rolldown/binding-darwin-x64": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.2.5.tgz", - "integrity": "sha512-fqSALaUu1Wjd1nK2uW2kJDWdLCc8lx1IcY+MTY26Aurfdx19anlzhqXOgCFbBFQnlFDTn4TC1/7Nz4Bl2mLP3A==", - "cpu": [ - "x64" - ], + "node_modules/character-entities-legacy": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz", + "integrity": "sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/@rolldown/binding-freebsd-x64": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.2.5.tgz", - "integrity": "sha512-/vCnNxlkxs9tKxNDcyWUePpJ/PgTzxIaVhoM5SmG8UV+GR/IcPam4VYxi7GIMo7PSDuNqlJqvprqii9NqqVCMw==", - "cpu": [ - "x64" - ], + "node_modules/character-reference-invalid": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz", + "integrity": "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/@rolldown/binding-linux-arm-gnueabihf": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.2.5.tgz", - "integrity": "sha512-abk0NLA519LxRCszmbE0jYKuQ9YPocOXTiOXOo6Yr+YAT95VH+PtqYAjOJvGKt3viEd/x4qzabAlwd5bHOOARg==", - "cpu": [ - "arm" - ], + "node_modules/concat-md": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/concat-md/-/concat-md-0.5.1.tgz", + "integrity": "sha512-iZr6yxlwPQ5IZup2mvqgm+JI0jnu5yGkND2ra5DinBtcevDQPQiAGpf4RXOnor1UpKBUydqegDLfPY8b+FfI+Q==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "linux" - ], + "dependencies": { + "doctoc": "^2.2.1", + "front-matter": "^4.0.2", + "globby": "^11.1.0", + "lodash.startcase": "^4.4.0", + "meow": "^9.0.0", + "transform-markdown-links": "^2.0.0" + }, + "bin": { + "concat-md": "dist/bin/concat-md.js" + }, "engines": { - "node": "^20.19.0 || >=22.12.0" + "node": ">=10.8.0" } }, - "node_modules/@rolldown/binding-linux-arm64-gnu": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.2.5.tgz", - "integrity": "sha512-Y7eALiJ8lr0M2HH103Js+g7V34wf6snlpZLAsHI90uLhr3PVlNsbFVAXJC9d/V6BnPyKtpSwI+NcB/RLxsQxuA==", - "cpu": [ - "arm64" - ], + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, "engines": { - "node": "^20.19.0 || >=22.12.0" + "node": ">= 8" } }, - "node_modules/@rolldown/binding-linux-arm64-musl": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.2.5.tgz", - "integrity": "sha512-xMvZgnbZg4YVnR/AX2b3oOPDTFYJvUVaJg5FedA/LuvexAtXibZQej4cnTkw3rjsJ/ggUROB64TdtETiim+FYA==", - "cpu": [ - "arm64" - ], + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", "dev": true, - "libc": [ - "musl" - ], "license": "MIT", - "optional": true, - "os": [ - "linux" - ], + "dependencies": { + "ms": "^2.1.3" + }, "engines": { - "node": "^20.19.0 || >=22.12.0" + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "node_modules/@rolldown/binding-linux-ppc64-gnu": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.2.5.tgz", - "integrity": "sha512-GRjeqTUDHTo5GwntsLaAMcBahG3nlpjftXWZLN73HiYQlhwEowvarFgQnRnQZtIp4keXX7quXFbG38uPZBa2EA==", - "cpu": [ - "ppc64" - ], + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", - "optional": true, - "os": [ - "linux" - ], "engines": { - "node": "^20.19.0 || >=22.12.0" + "node": ">=0.10.0" } }, - "node_modules/@rolldown/binding-linux-s390x-gnu": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.2.5.tgz", - "integrity": "sha512-vLNTR45F2Uwc8AufkNXPmB4VliaXs+FvcheEogIzOXzO4l+LzieXF5A/TWxLy5HtqpsRCHUfd0lPVrrdgXdLHQ==", - "cpu": [ - "s390x" - ], + "node_modules/decamelize-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.1.tgz", + "integrity": "sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==", "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", - "optional": true, - "os": [ - "linux" - ], + "dependencies": { + "decamelize": "^1.1.0", + "map-obj": "^1.0.0" + }, "engines": { - "node": "^20.19.0 || >=22.12.0" + "node": ">=0.10.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@rolldown/binding-linux-x64-gnu": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.2.5.tgz", - "integrity": "sha512-Mgj59/HTuYeK9Gz2MA+mBWKnHsAgkBSec15ZMb1st3oIfFbX7gCjOae7GydHhzcyQi9Z/7M1QuN9bR3oFqF0jQ==", - "cpu": [ - "x64" - ], + "node_modules/decamelize-keys/node_modules/map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==", "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", - "optional": true, - "os": [ - "linux" - ], "engines": { - "node": "^20.19.0 || >=22.12.0" + "node": ">=0.10.0" } }, - "node_modules/@rolldown/binding-linux-x64-musl": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.2.5.tgz", - "integrity": "sha512-mY8AP0/ichsbhAxGnLa3d3+MwV0EfgrPND2bplI3Ym8T6R2pJ0N87bvrKVwNXmdy3jnr6eQBecdqx/HMknBmpA==", - "cpu": [ - "x64" - ], + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, + "node_modules/defu": { + "version": "6.1.7", + "resolved": "https://registry.npmjs.org/defu/-/defu-6.1.7.tgz", + "integrity": "sha512-7z22QmUWiQ/2d0KkdYmANbRUVABpZ9SNYyH5vx6PZ+nE5bcC0l7uFvEfHlyld/HcGBFTL536ClDt3DEcSlEJAQ==", "dev": true, - "libc": [ - "musl" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], + "license": "MIT" + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", "engines": { - "node": "^20.19.0 || >=22.12.0" + "node": ">=8" } }, - "node_modules/@rolldown/binding-openharmony-arm64": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.2.5.tgz", - "integrity": "sha512-8SLssA2oweAxyRgDp789ACfRb/3P+zNRJpzZxSizxF9m8NUDQ4+3xjo8ttjhVGGw6Qxb70oZiEtIjaKikCO7Yw==", - "cpu": [ - "arm64" - ], + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "openharmony" - ], + "dependencies": { + "path-type": "^4.0.0" + }, "engines": { - "node": "^20.19.0 || >=22.12.0" + "node": ">=8" } }, - "node_modules/@rolldown/binding-win32-arm64-msvc": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.2.5.tgz", - "integrity": "sha512-vGbruD5zquhoc8D9SViXgN2FBJtNdTyQ4DtG+SWiEGlJiAzoKcZ2xp+xuXCffhubVdt0NJlTZqkeRuERy7g8Cw==", - "cpu": [ - "arm64" - ], + "node_modules/doctoc": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/doctoc/-/doctoc-2.5.0.tgz", + "integrity": "sha512-xWb2P8mQw9x+T9xPYToytRP0/bA68oexdsY0anMG72RdhZGTVPx6oHJfI57gbZe9LsOSfQUNNLwxSspdoTlJIQ==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" + "dependencies": { + "@textlint/markdown-to-ast": "^15.6.0", + "anchor-markdown-header": "^0.8.4", + "htmlparser2": "^7.2.0", + "loglevel": "^1.9.2", + "minimist": "^1.2.6" + }, + "bin": { + "doctoc": "doctoc.js" } }, - "node_modules/@rolldown/binding-win32-x64-msvc": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.2.5.tgz", - "integrity": "sha512-e/SXpgISz+IoqVcSSI0rx/d/he8zqLex+/rCWpnHpmVfmPIUjag9H6P7zotf0gJHwPUhQxZ/mF8tr6acebT9yw==", - "cpu": [ - "x64" - ], + "node_modules/dom-serializer": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz", + "integrity": "sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" + "dependencies": { + "domelementtype": "^2.0.1", + "domhandler": "^4.2.0", + "entities": "^2.0.0" + }, + "funding": { + "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" } }, - "node_modules/@rolldown/pluginutils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.1.tgz", - "integrity": "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==", + "node_modules/dom-serializer/node_modules/entities": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", + "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", "dev": true, - "license": "MIT" + "license": "BSD-2-Clause", + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } }, - "node_modules/@rollup/plugin-babel": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-7.1.0.tgz", - "integrity": "sha512-h9Y+xYha6p4wKO+FwdiPIkE+eIYCm8MzZPpX1iARIoFBnmKP9CnpT1p9dDf/DTFm6fyN8PmuLyRI5qZgchnitw==", + "node_modules/domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-module-imports": "^7.18.6", - "@rollup/pluginutils": "^5.0.1", - "workerpool": "^9.0.0" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0", - "@types/babel__core": "^7.1.9", - "rollup": "^2.0.0||^3.0.0||^4.0.0" - }, - "peerDependenciesMeta": { - "@types/babel__core": { - "optional": true - }, - "rollup": { - "optional": true + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" } - } + ], + "license": "BSD-2-Clause" }, - "node_modules/@rollup/plugin-terser": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-terser/-/plugin-terser-1.0.0.tgz", - "integrity": "sha512-FnCxhTBx6bMOYQrar6C8h3scPt8/JwIzw3+AJ2K++6guogH5fYaIFia+zZuhqv0eo1RN7W1Pz630SyvLbDjhtQ==", + "node_modules/domhandler": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.1.tgz", + "integrity": "sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==", "dev": true, - "license": "MIT", + "license": "BSD-2-Clause", "dependencies": { - "serialize-javascript": "^7.0.3", - "smob": "^1.0.0", - "terser": "^5.17.4" + "domelementtype": "^2.2.0" }, "engines": { - "node": ">=20.0.0" - }, - "peerDependencies": { - "rollup": "^2.0.0||^3.0.0||^4.0.0" + "node": ">= 4" }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - } + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" } }, - "node_modules/@rollup/pluginutils": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.0.tgz", - "integrity": "sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==", + "node_modules/domutils": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", + "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { - "@types/estree": "^1.0.0", - "estree-walker": "^2.0.2", - "picomatch": "^2.3.1" + "dom-serializer": "^1.0.1", + "domelementtype": "^2.2.0", + "domhandler": "^4.2.0" }, + "funding": { + "url": "https://github.com/fb55/domutils?sponsor=1" + } + }, + "node_modules/dts-resolver": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/dts-resolver/-/dts-resolver-3.0.0.tgz", + "integrity": "sha512-1T1f+z+4tl9XD+m+0HBgWoL/nm0bOIffyWaUuUSBlFg/86IWvfx+wjNaO/ybU0AJzG9/Mi5hBUgGV6zCmWEN7Q==", + "dev": true, + "license": "MIT", "engines": { - "node": ">=14.0.0" + "node": "^22.18.0 || >=24.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sxzz" }, "peerDependencies": { - "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + "oxc-resolver": ">=11.0.0" }, "peerDependenciesMeta": { - "rollup": { + "oxc-resolver": { "optional": true } } }, - "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.62.5.tgz", - "integrity": "sha512-jfkGfTwhQpsiSckPF8r9bU3pn3vyd72NlWaO+TgEO6WPSDnUhXzrNYCHBMOYj0ACaUgjm6eERLF+XV9a6RstoA==", - "cpu": [ - "arm" - ], + "node_modules/emoji-regex": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", + "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ] + "license": "MIT" }, - "node_modules/@rollup/rollup-android-arm64": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.62.5.tgz", - "integrity": "sha512-oGVqyQlxnrz9/ty89oHpU857VUHEl5/Xu4R2lS+aivCTrNnSsbiENzTnNaBsjxH0CNWGPhzHArOLFwo+oKXveA==", - "cpu": [ - "arm64" - ], + "node_modules/empathic": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/empathic/-/empathic-2.0.1.tgz", + "integrity": "sha512-YGRs8knHhKHVShLkFET/rWAU8kmHbOV5LwN938RHI0pljAJ1Gf6SzXsSmRaEzcXTtOOmVqJ5+WtQPL5uigY50Q==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "android" - ] + "engines": { + "node": ">=14" + } }, - "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.62.5.tgz", - "integrity": "sha512-bW7B8xMEq8n99Q3ieEcPRGuphurdZAaFzQc9Efyyw3FL6DZO6pMy9xhdN+kBoD7Sy05xNXSr4OyPPnpkYriS/A==", - "cpu": [ - "arm64" - ], + "node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } }, - "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.62.5.tgz", - "integrity": "sha512-YSwBS86QeHOGlrxJ1PSOIZSkzRL/JmKeunhc+lV6M1a6En8QuVCD/T/qIA0J4Gd2Y86RIOBYrLcOUtqGh9+/1w==", - "cpu": [ - "x64" - ], + "node_modules/error-ex": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.4.tgz", + "integrity": "sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] + "dependencies": { + "is-arrayish": "^0.2.1" + } }, - "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.62.5.tgz", - "integrity": "sha512-2fST8lILgl7cKbme/1KDdPCmbXbG+gqoV3bHp19L0ypX/3akYMBVdOunPleRCwonoLnXOZ/0F+Mt/v8POFmfcQ==", - "cpu": [ - "arm64" - ], + "node_modules/es-module-lexer": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.3.2.tgz", + "integrity": "sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw==", "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ] + "license": "MIT" }, - "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.62.5.tgz", - "integrity": "sha512-cpIxQCP9J+EVad0a6LO1kY3ZGODlk80VlI+2I96B8xMcdHZ4pLVhfQ49JFpYqjPF91FFkQWftf57YlDcTiw9yQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ] - }, - "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.62.5.tgz", - "integrity": "sha512-r9fGh3eFs3e/udWh5ZjXQtxiYK/xoFxQaYR/cELxac/Udkl5Th+IsFm0CX3Kl9hmUH/we7EoMpjJgeQNnE0+IA==", - "cpu": [ - "arm" - ], - "dev": true, - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.62.5.tgz", - "integrity": "sha512-xdvFdp7OM6KLJviJT2g/YuRSUjnZgGHk4RNgwIbN7X6cPugOucV60DdHXWzsBVCUdrGb6qSXnJQrrAKMmQuj3Q==", - "cpu": [ - "arm" - ], - "dev": true, - "libc": [ - "musl" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.62.5.tgz", - "integrity": "sha512-rRqILAndyzHzP7T9NFQrq+4HFWNhqkqkKur7eiBpfLmz01PO0JKx5Vchu3YllE4YXI/Ftgq/szrDWg5GJ0mI8g==", - "cpu": [ - "arm64" - ], - "dev": true, - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.62.5.tgz", - "integrity": "sha512-Gf4X3qVMucayUvux6aXXPgXovocSFUC0rrffDuPI/S2nHhNMhjcZxsrAFYCOF350PRreW1XwzFj3CT/3bKsWCw==", - "cpu": [ - "arm64" - ], - "dev": true, - "libc": [ - "musl" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-loong64-gnu": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.62.5.tgz", - "integrity": "sha512-+s5qA0TNM0qm8PK/a5gt/1Hpx+NV08uSuCncvhziIlQzT6AEV2fnUQo7eBtFTFO0nA9scauvoR2HusfXmQnO4w==", - "cpu": [ - "loong64" - ], - "dev": true, - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-loong64-musl": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.62.5.tgz", - "integrity": "sha512-ybb6QvWwWJCbBWqERpc8K3pYVGIrXlG8MEQ8IIuJY6Y9KdHQxoFoNyfkAOtKn1VHu3KuLidXvwrvGR1mEjeWCw==", - "cpu": [ - "loong64" - ], - "dev": true, - "libc": [ - "musl" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-ppc64-gnu": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.62.5.tgz", - "integrity": "sha512-nZb1DtnOyhCmYvsC8A2CwOkopVg+IS1+fPUa7rMOAXtNw5+lLCLLPqd6XAiNrGtoQKsbvIBOwsHnBH/3wnb4HQ==", - "cpu": [ - "ppc64" - ], - "dev": true, - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-ppc64-musl": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.62.5.tgz", - "integrity": "sha512-yMbj63Sp89ryrXLWyz+sy+fYD2HpOnMCLGbe4Oa1smclFSUukdtD/BgdiHaAetJNb74URD8U4hM+qG5KVzMEkg==", - "cpu": [ - "ppc64" - ], - "dev": true, - "libc": [ - "musl" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.62.5.tgz", - "integrity": "sha512-mhoan3OJw2kYV/e1jtIdmvUZgyBFeA6zGWsOswmR0Tg19TQbowZuR+JMLID6spbbBN7Zee2ejrgmy3+FxGrIdA==", - "cpu": [ - "riscv64" - ], - "dev": true, - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.62.5.tgz", - "integrity": "sha512-5ZTLmjWbb1VZdjuyhe83K/8QO0/h11midQCBP+X5OYn32ra7eOBoM0ZqtaY4nkgNsYgmdVhMYPoyVPTjUpHf3w==", - "cpu": [ - "riscv64" - ], - "dev": true, - "libc": [ - "musl" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.62.5.tgz", - "integrity": "sha512-m53kG+br6PGxOTmgBEM2DHSDs9RVjsyEbUwjJPJGTFm1grWOG8EKJggDCTb60unD4Tjby8fi7/m9XfkEWasVWg==", - "cpu": [ - "s390x" - ], - "dev": true, - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.62.5.tgz", - "integrity": "sha512-6RHPJR1g/uvdYU8uXBnfq3nlqyZCP82Fr6NHgfGoaIeSh0YEqnX/x6uA9MmJJbnSH7swqX4F+CkGdUF+6doiQA==", - "cpu": [ - "x64" - ], - "dev": true, - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.62.5.tgz", - "integrity": "sha512-xs+OXQtEXgpXT0DmA5+U3qnRZHdCST/5HRQxS8wSPZTUZN/EMWeHuSIod32LQklTBZBV9DyfncKBQ8n5V3eFdw==", - "cpu": [ - "x64" - ], - "dev": true, - "libc": [ - "musl" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-openbsd-x64": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.62.5.tgz", - "integrity": "sha512-e7hD+sl3s+mcLQDZ8pbudBVsdG6r5yN4w3LqG2TJ8sQHDpblWj5lrJs/3m01Cvlxbt4x13zu5thLjgypgtkYzw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ] - }, - "node_modules/@rollup/rollup-openharmony-arm64": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.62.5.tgz", - "integrity": "sha512-GiyJaCf+WpMub/17aPcKk27QMl5W6f+KhdPTjlFOn5akH5Wa/DCM9Stdx5cDfmasyKB08MqpVQ1uJE2RkkpbXg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openharmony" - ] - }, - "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.62.5.tgz", - "integrity": "sha512-+OQ8U2DdoEfXl8T4Fb18AjmEwbXMerKDKCL8yCPAYhKCEEKoul7rkbeGCBFCbAlaGaa7pmtRTpkAJM2LE/i5FA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.62.5.tgz", - "integrity": "sha512-KanvAZrPKbDBFwrgiU9yEVpQoox9QPV1WZOXX7HudJQY+eSlu82CtWxDU8WtuRRvtN5EGkLczkd6Y6DTcvm9wA==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-x64-gnu": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.62.5.tgz", - "integrity": "sha512-1aC3UEWTtRl3RK3VpDJ/Tqk1XI4SLTmXIthAq6wRWo8XiSXJNd+VprJM4/1P4+i6HIaFEFlVi9sTTziniD2tOQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.62.5.tgz", - "integrity": "sha512-/gDJaRs4gl0NPIwqCz+6PkpmhhjRAD2j6P4rSNHBzUkO3naEx2mIU0pRle1vUNRQ7mE/+8OOeXLTv/J56FKiQg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@shikijs/engine-oniguruma": { - "version": "3.23.0", - "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-3.23.0.tgz", - "integrity": "sha512-1nWINwKXxKKLqPibT5f4pAFLej9oZzQTsby8942OTlsJzOBZ0MWKiwzMsd+jhzu8YPCHAswGnnN1YtQfirL35g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@shikijs/types": "3.23.0", - "@shikijs/vscode-textmate": "^10.0.2" - } - }, - "node_modules/@shikijs/langs": { - "version": "3.23.0", - "resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-3.23.0.tgz", - "integrity": "sha512-2Ep4W3Re5aB1/62RSYQInK9mM3HsLeB91cHqznAJMuylqjzNVAVCMnNWRHFtcNHXsoNRayP9z1qj4Sq3nMqYXg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@shikijs/types": "3.23.0" - } - }, - "node_modules/@shikijs/themes": { - "version": "3.23.0", - "resolved": "https://registry.npmjs.org/@shikijs/themes/-/themes-3.23.0.tgz", - "integrity": "sha512-5qySYa1ZgAT18HR/ypENL9cUSGOeI2x+4IvYJu4JgVJdizn6kG4ia5Q1jDEOi7gTbN4RbuYtmHh0W3eccOrjMA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@shikijs/types": "3.23.0" - } - }, - "node_modules/@shikijs/types": { - "version": "3.23.0", - "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-3.23.0.tgz", - "integrity": "sha512-3JZ5HXOZfYjsYSk0yPwBrkupyYSLpAE26Qc0HLghhZNGTZg/SKxXIIgoxOpmmeQP0RRSDJTk1/vPfw9tbw+jSQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@shikijs/vscode-textmate": "^10.0.2", - "@types/hast": "^3.0.4" - } - }, - "node_modules/@shikijs/vscode-textmate": { - "version": "10.0.2", - "resolved": "https://registry.npmjs.org/@shikijs/vscode-textmate/-/vscode-textmate-10.0.2.tgz", - "integrity": "sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==", - "dev": true, - "license": "MIT" - }, - "node_modules/@standard-schema/spec": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz", - "integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==", - "dev": true, - "license": "MIT" - }, - "node_modules/@stylistic/eslint-plugin": { - "version": "5.9.0", - "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin/-/eslint-plugin-5.9.0.tgz", - "integrity": "sha512-FqqSkvDMYJReydrMhlugc71M76yLLQWNfmGq+SIlLa7N3kHp8Qq8i2PyWrVNAfjOyOIY+xv9XaaYwvVW7vroMA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.9.1", - "@typescript-eslint/types": "^8.56.0", - "eslint-visitor-keys": "^4.2.1", - "espree": "^10.4.0", - "estraverse": "^5.3.0", - "picomatch": "^4.0.3" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "peerDependencies": { - "eslint": "^9.0.0 || ^10.0.0" - } - }, - "node_modules/@stylistic/eslint-plugin/node_modules/picomatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", - "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/@textlint/ast-node-types": { - "version": "15.8.0", - "resolved": "https://registry.npmjs.org/@textlint/ast-node-types/-/ast-node-types-15.8.0.tgz", - "integrity": "sha512-5CiH9COYmovWmExQgs7763DzX6Gy9zjkjJ7JxCC95wyTcjwQn/8poNF6fv3qzRlmx8CRRde8DHr9FcgAAiPzgw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@textlint/markdown-to-ast": { - "version": "15.8.0", - "resolved": "https://registry.npmjs.org/@textlint/markdown-to-ast/-/markdown-to-ast-15.8.0.tgz", - "integrity": "sha512-gWOcd2+UCqODMLGIIY5WiPE9zmR9L4aut3FIkxH8gSCiZ6EVkBaU2mgm+8KiGOjJqdtT98xkWocCwDtQ1kypOQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@textlint/ast-node-types": "15.8.0", - "debug": "^4.4.3", - "mdast-util-gfm-autolink-literal": "^0.1.3", - "neotraverse": "^0.6.18", - "remark-footnotes": "^3.0.0", - "remark-frontmatter": "^3.0.0", - "remark-gfm": "^1.0.0", - "remark-parse": "^9.0.0", - "structured-source": "^4.0.0", - "unified": "^9.2.2" - } - }, - "node_modules/@types/chai": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz", - "integrity": "sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/deep-eql": "*", - "assertion-error": "^2.0.1" - } - }, - "node_modules/@types/deep-eql": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz", - "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/esrecurse": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@types/esrecurse/-/esrecurse-4.3.1.tgz", - "integrity": "sha512-xJBAbDifo5hpffDBuHl0Y8ywswbiAp/Wi7Y/GtAgSlZyIABppyurxVueOPE8LUQOxdlgi6Zqce7uoEpqNTeiUw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/estree": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", - "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/hast": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.4.tgz", - "integrity": "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/unist": "*" - } - }, - "node_modules/@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/linkify-it": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-5.0.0.tgz", - "integrity": "sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q==", - "dev": true - }, - "node_modules/@types/markdown-it": { - "version": "14.1.1", - "resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-14.1.1.tgz", - "integrity": "sha512-4NpsnpYl2Gt1ljyBGrKMxFYAYvpqbnnkgP/i/g+NLpjEUa3obn1XJCur9YbEXKDAkaXqsR1LbDnGEJ0MmKFxfg==", - "dev": true, - "dependencies": { - "@types/linkify-it": "^5", - "@types/mdurl": "^2" - } - }, - "node_modules/@types/mdast": { - "version": "3.0.15", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", - "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/unist": "^2" - } - }, - "node_modules/@types/mdast/node_modules/@types/unist": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", - "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/mdurl": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-2.0.0.tgz", - "integrity": "sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg==", - "dev": true - }, - "node_modules/@types/minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/node": { - "version": "26.3.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-26.3.0.tgz", - "integrity": "sha512-L3fgrnchriRC2ExBflb8j4uZZURHZfQsmQeyVzhjcHW4kkwVyo8/0h1B2MVzMTrYUJYu6G7EWs14hW/L9putqw==", - "dev": true, - "license": "MIT", - "dependencies": { - "undici-types": "~8.3.0" - } - }, - "node_modules/@types/normalize-package-data": { - "version": "2.4.4", - "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz", - "integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/unist": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", - "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.68.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.68.0.tgz", - "integrity": "sha512-WASHDpCm6qO5jj9g1a+8NiW5+GCkAyLReR56/4VruYmNgfUmqpxOfZ2Yfb8xGfJPWv5Qi6LSD8sXdces3vbp/Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/regexpp": "^4.12.2", - "@typescript-eslint/scope-manager": "8.68.0", - "@typescript-eslint/type-utils": "8.68.0", - "@typescript-eslint/utils": "8.68.0", - "@typescript-eslint/visitor-keys": "8.68.0", - "ignore": "^7.0.5", - "natural-compare": "^1.4.0", - "ts-api-utils": "^2.5.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^8.68.0", - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.6.tgz", - "integrity": "sha512-BAg6QkE8W+TuQLrrw0Ugr7HegXduRuuj8/ti2kSOc+jz1dmx8/WNcjr6XGnq5YpDWxFwwaavqD0+jIUOKelTsw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/@typescript-eslint/parser": { - "version": "8.68.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.68.0.tgz", - "integrity": "sha512-fHq2VC1kpyYfvEcbiMjOpySY4WS7voEp89yAThrHRX5sm9j2lzYppCb2umFMEed4fWcyeLjHxrz0mpjNBaBxMQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/scope-manager": "8.68.0", - "@typescript-eslint/types": "8.68.0", - "@typescript-eslint/typescript-estree": "8.68.0", - "@typescript-eslint/visitor-keys": "8.68.0", - "debug": "^4.4.3" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/project-service": { - "version": "8.68.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.68.0.tgz", - "integrity": "sha512-5GQtWZCXFcFYux955pvoS02WLc49pXNlvIxocKjS0clvwo3in1RdlzVKyiqQH9vE5AKWFLTaUgeQkOrTS+0Qxw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.68.0", - "@typescript-eslint/types": "^8.68.0", - "debug": "^4.4.3" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "8.68.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.68.0.tgz", - "integrity": "sha512-T5eXpcaJNg8bhjHJ8Rjp68Vq/QBteYtTKY8TZqVNPaUbuz0f6jI9t6aDkylwvalpAB9XTTFeFOjrjXAZ3YvmVA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.68.0", - "@typescript-eslint/visitor-keys": "8.68.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.68.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.68.0.tgz", - "integrity": "sha512-F7zrGQfiJHojPwi8vhxZQC1tWtJzvL74cK/nqri2lk8YUXvYaYwl263xOJ69jDWPUk1hmcdoayFwk9lX09npVw==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/type-utils": { - "version": "8.68.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.68.0.tgz", - "integrity": "sha512-X77zqoY1EjeWGs/0JNxeaMfp5C5lIz4Tw8y66F1Ne8Faq6g424sBNYM6xBAqElfGZPLpWS+CZAp0DXyKDzWiHg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.68.0", - "@typescript-eslint/typescript-estree": "8.68.0", - "@typescript-eslint/utils": "8.68.0", - "debug": "^4.4.3", - "ts-api-utils": "^2.5.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/types": { - "version": "8.68.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.68.0.tgz", - "integrity": "sha512-9RnpsGJjrAllCMefGVVsImJM24YurhC0Q1h4UbvivtvOqXmR/vEJge2OoE++z9m6hyg8T1Q8t5SNT6tHSbrxcg==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.68.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.68.0.tgz", - "integrity": "sha512-OKKsD0tYmoNiU5PW2zehO1yO56jYOm1ShYlxon/Z0SJNidAkdVg86eg9ruRuoXf8xfnuWZGbwDsStkoXbZtIIA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/project-service": "8.68.0", - "@typescript-eslint/tsconfig-utils": "8.68.0", - "@typescript-eslint/types": "8.68.0", - "@typescript-eslint/visitor-keys": "8.68.0", - "debug": "^4.4.3", - "minimatch": "^10.2.2", - "semver": "^7.7.3", - "tinyglobby": "^0.2.15", - "ts-api-utils": "^2.5.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/balanced-match": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", - "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { - "version": "5.0.9", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz", - "integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^4.0.2" - }, - "engines": { - "node": "20 || >=22" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { - "version": "10.2.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", - "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "brace-expansion": "^5.0.8" - }, - "engines": { - "node": "18 || 20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { - "version": "7.8.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", - "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@typescript-eslint/utils": { - "version": "8.68.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.68.0.tgz", - "integrity": "sha512-PB5gJMMOg0Q5P1tsgWtEAqQacJXq0qEqRHDX/YJ4FaTMLfZPpHB3gjl2EJuiZyPABxmj4ZQYiY9m1bdAJ5y7tQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.9.1", - "@typescript-eslint/scope-manager": "8.68.0", - "@typescript-eslint/types": "8.68.0", - "@typescript-eslint/typescript-estree": "8.68.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.68.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.68.0.tgz", - "integrity": "sha512-YR65gGdGvTUAWLldC3xLOvOzamdGzB4A5/N8rehEaHs3Zvoe39BhgY+u0SPch1OvrVTfLcc55wsSgK2NcnTS/A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.68.0", - "eslint-visitor-keys": "^5.0.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz", - "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@vitest/expect": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.11.tgz", - "integrity": "sha512-VX2x5vNJXET47KAFzwERI+KRMtTTCSWTfSMKsW7JsUsXV4psq++e3DvZpuTDOpHcxytiDs6p2nhVb2tVDiiUYw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@standard-schema/spec": "^1.1.0", - "@types/chai": "^5.2.2", - "@vitest/spy": "4.1.11", - "@vitest/utils": "4.1.11", - "chai": "^6.2.2", - "tinyrainbow": "^3.1.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/mocker": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.1.11.tgz", - "integrity": "sha512-2XJVD55d1o5AZous5CCGKS74g/riOj9odEt2bQpCVZeblHyHdnMeFl4jl0XjU21stf4mbjUkew2eXQZt65g5CQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/spy": "4.1.11", - "estree-walker": "^3.0.3", - "magic-string": "^0.30.21" - }, - "funding": { - "url": "https://opencollective.com/vitest" - }, - "peerDependencies": { - "msw": "^2.4.9", - "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "msw": { - "optional": true - }, - "vite": { - "optional": true - } - } - }, - "node_modules/@vitest/mocker/node_modules/estree-walker": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", - "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "^1.0.0" - } - }, - "node_modules/@vitest/pretty-format": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.1.11.tgz", - "integrity": "sha512-yiZzPbGTS9Sr/JpFl8zHrcIkAofNbFV6k21vIgQN/cY/oxZeXhJv5sc/MBJ5jFKWmWs+oJHw0UXLZjmf931+Vw==", - "dev": true, - "license": "MIT", - "dependencies": { - "tinyrainbow": "^3.1.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/runner": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.1.11.tgz", - "integrity": "sha512-LztvUgdwMNJMIkj3hQnnxiC2Xy1zNxq928W/xhjCLaNCzqTZOudjwbQf6v9IntZGPw132i2Lq2rgTRZHD3JHNw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/utils": "4.1.11", - "pathe": "^2.0.3" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/snapshot": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.1.11.tgz", - "integrity": "sha512-pN7ikn1ON7h8ee4gIAp4AzyK+zBtJPzVbqOgu5LCEh4VaJVbPQcgYQYJIMGQPXVeJJq1fnfazis7a5pFNPahog==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/pretty-format": "4.1.11", - "@vitest/utils": "4.1.11", - "magic-string": "^0.30.21", - "pathe": "^2.0.3" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/spy": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.1.11.tgz", - "integrity": "sha512-apNa/prQy2qCeywhnixOHPRCgGNhvg7T4Dapfl1GahLp/R+uhBm5cPyFoNVyqsNd2h1nJxL6BqqdIjiABL60YA==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/utils": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.11.tgz", - "integrity": "sha512-zTCVGpyFsGWBhllOyKlTw/vnr6D9qxsfSDyfbyZmTyjHw5N/VuvzHpHoQjm2ZJzn4RJgx5w4r7V0er69CmLgPQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/pretty-format": "4.1.11", - "convert-source-map": "^2.0.0", - "tinyrainbow": "^3.1.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/acorn": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz", - "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/ajv": { - "version": "6.15.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.15.0.tgz", - "integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/anchor-markdown-header": { - "version": "0.8.4", - "resolved": "https://registry.npmjs.org/anchor-markdown-header/-/anchor-markdown-header-0.8.4.tgz", - "integrity": "sha512-20eMBMpts7k5rXAAj67geSqc/tsexHZOZJDWQD214YcDuNtyizDa7Q77sYa5rkao2FwsQP1WKRt2X6mphwmhbg==", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "~10.6.0", - "remove-markdown": "^0.6.2" - } - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/assertion-error": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", - "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - } - }, - "node_modules/babel-plugin-polyfill-corejs2": { - "version": "0.4.15", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.15.tgz", - "integrity": "sha512-hR3GwrRwHUfYwGfrisXPIDP3JcYfBrW7wKE7+Au6wDYl7fm/ka1NEII6kORzxNU556JjfidZeBsO10kYvtV1aw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/compat-data": "^7.28.6", - "@babel/helper-define-polyfill-provider": "^0.6.6", - "semver": "^6.3.1" - }, - "peerDependencies": { - "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" - } - }, - "node_modules/babel-plugin-polyfill-corejs3": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.14.0.tgz", - "integrity": "sha512-AvDcMxJ34W4Wgy4KBIIePQTAOP1Ie2WFwkQp3dB7FQ/f0lI5+nM96zUnYEOE1P9sEg0es5VCP0HxiWu5fUHZAQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.6.6", - "core-js-compat": "^3.48.0" - }, - "peerDependencies": { - "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" - } - }, - "node_modules/babel-plugin-polyfill-regenerator": { - "version": "0.6.6", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.6.6.tgz", - "integrity": "sha512-hYm+XLYRMvupxiQzrvXUj7YyvFFVfv5gI0R71AJzudg1g2AI2vyCPPIFEBjk162/wFzti3inBHo7isWFuEVS/A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.6.6" - }, - "peerDependencies": { - "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" - } - }, - "node_modules/bail": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/bail/-/bail-1.0.5.tgz", - "integrity": "sha512-xFbRxM1tahm08yHBP16MMjVUAvDaBMD38zsM9EMAUN61omwLmKlOpB/Zku5QkjZ8TZ4vn53pj+t518cH0S03RQ==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/baseline-browser-mapping": { - "version": "2.9.19", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.9.19.tgz", - "integrity": "sha512-ipDqC8FrAl/76p2SSWKSI+H9tFwm7vYqXQrItCuiVPt26Km0jS+NzSsBWAaBusvSbQcfJG+JitdMm+wZAgTYqg==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "baseline-browser-mapping": "dist/cli.js" - } - }, - "node_modules/bluebird": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", - "dev": true - }, - "node_modules/boundary": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/boundary/-/boundary-2.0.0.tgz", - "integrity": "sha512-rJKn5ooC9u8q13IMCrW0RSp31pxBCHE3y9V/tp3TdWSLf8Em3p6Di4NBpfzbJge9YjjFEsD0RtFEjtvHL5VyEA==", - "dev": true, - "license": "BSD-2-Clause" - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/browserslist": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.1.tgz", - "integrity": "sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "baseline-browser-mapping": "^2.9.0", - "caniuse-lite": "^1.0.30001759", - "electron-to-chromium": "^1.5.263", - "node-releases": "^2.0.27", - "update-browserslist-db": "^1.2.0" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true - }, - "node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/camelcase-keys": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz", - "integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==", - "dev": true, - "license": "MIT", - "dependencies": { - "camelcase": "^5.3.1", - "map-obj": "^4.0.0", - "quick-lru": "^4.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001769", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001769.tgz", - "integrity": "sha512-BCfFL1sHijQlBGWBMuJyhZUhzo7wer5sVj9hqekB/7xn0Ypy+pER/edCYQm4exbXj4WiySGp40P8UuTh6w1srg==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "CC-BY-4.0" - }, - "node_modules/catharsis": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.9.0.tgz", - "integrity": "sha512-prMTQVpcns/tzFgFVkVp6ak6RykZyWb3gu8ckUpd6YkTlacOd3DXGJjIpD4Q6zJirizvaiAjSSHlOsA+6sNh2A==", - "dev": true, - "dependencies": { - "lodash": "^4.17.15" - }, - "engines": { - "node": ">= 10" - } - }, - "node_modules/ccount": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/ccount/-/ccount-1.1.0.tgz", - "integrity": "sha512-vlNK021QdI7PNeiUh/lKkC/mNHHfV0m/Ad5JoI0TYtlBnJAslM/JIkm/tGC88bkLIwO6OQ5uV6ztS6kVAtCDlg==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/chai": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/chai/-/chai-6.2.2.tgz", - "integrity": "sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - } - }, - "node_modules/character-entities": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz", - "integrity": "sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/character-entities-legacy": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz", - "integrity": "sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/character-reference-invalid": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz", - "integrity": "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - }, - "node_modules/concat-md": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/concat-md/-/concat-md-0.5.1.tgz", - "integrity": "sha512-iZr6yxlwPQ5IZup2mvqgm+JI0jnu5yGkND2ra5DinBtcevDQPQiAGpf4RXOnor1UpKBUydqegDLfPY8b+FfI+Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "doctoc": "^2.2.1", - "front-matter": "^4.0.2", - "globby": "^11.1.0", - "lodash.startcase": "^4.4.0", - "meow": "^9.0.0", - "transform-markdown-links": "^2.0.0" - }, - "bin": { - "concat-md": "dist/bin/concat-md.js" - }, - "engines": { - "node": ">=10.8.0" - } - }, - "node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true - }, - "node_modules/core-js-compat": { - "version": "3.48.0", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.48.0.tgz", - "integrity": "sha512-OM4cAF3D6VtH/WkLtWvyNC56EZVXsZdU3iqaMG2B4WvYrlqU831pc4UtG5yp0sE9z8Y02wVN7PjW5Zf9Gt0f1Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "browserslist": "^4.28.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/core-js" - } - }, - "node_modules/cross-spawn": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", - "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", - "dev": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/debug": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", - "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/decamelize-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.1.tgz", - "integrity": "sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==", - "dev": true, - "license": "MIT", - "dependencies": { - "decamelize": "^1.1.0", - "map-obj": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/decamelize-keys/node_modules/map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true - }, - "node_modules/detect-libc": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", - "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=8" - } - }, - "node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/doctoc": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/doctoc/-/doctoc-2.5.0.tgz", - "integrity": "sha512-xWb2P8mQw9x+T9xPYToytRP0/bA68oexdsY0anMG72RdhZGTVPx6oHJfI57gbZe9LsOSfQUNNLwxSspdoTlJIQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@textlint/markdown-to-ast": "^15.6.0", - "anchor-markdown-header": "^0.8.4", - "htmlparser2": "^7.2.0", - "loglevel": "^1.9.2", - "minimist": "^1.2.6" - }, - "bin": { - "doctoc": "doctoc.js" - } - }, - "node_modules/dom-serializer": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz", - "integrity": "sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==", - "dev": true, - "license": "MIT", - "dependencies": { - "domelementtype": "^2.0.1", - "domhandler": "^4.2.0", - "entities": "^2.0.0" - }, - "funding": { - "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" - } - }, - "node_modules/dom-serializer/node_modules/entities": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", - "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", - "dev": true, - "license": "BSD-2-Clause", - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/domelementtype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", - "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ], - "license": "BSD-2-Clause" - }, - "node_modules/domhandler": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.1.tgz", - "integrity": "sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "domelementtype": "^2.2.0" - }, - "engines": { - "node": ">= 4" - }, - "funding": { - "url": "https://github.com/fb55/domhandler?sponsor=1" - } - }, - "node_modules/domutils": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", - "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "dom-serializer": "^1.0.1", - "domelementtype": "^2.2.0", - "domhandler": "^4.2.0" - }, - "funding": { - "url": "https://github.com/fb55/domutils?sponsor=1" - } - }, - "node_modules/electron-to-chromium": { - "version": "1.5.286", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.286.tgz", - "integrity": "sha512-9tfDXhJ4RKFNerfjdCcZfufu49vg620741MNs26a9+bhLThdB+plgMeou98CAaHu/WATj2iHOOHTp1hWtABj2A==", - "dev": true, - "license": "ISC" - }, - "node_modules/emoji-regex": { - "version": "10.6.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", - "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", - "dev": true, - "license": "MIT" - }, - "node_modules/entities": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", - "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", - "dev": true, - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/error-ex": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.4.tgz", - "integrity": "sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-arrayish": "^0.2.1" - } - }, - "node_modules/es-module-lexer": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.3.2.tgz", - "integrity": "sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw==", - "dev": true, - "license": "MIT" - }, - "node_modules/escalade": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", - "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint": { - "version": "10.9.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.9.1.tgz", - "integrity": "sha512-9VaAkDURekixUQJy0oJYl2DcN6oKMfxay7XzaGYAWQwsb6qfKf+x76R2k1L8kb1boc+FyCAaTA9GmiKaaiaF+A==", - "dev": true, - "license": "MIT", - "workspaces": [ - "packages/*" - ], - "dependencies": { - "@eslint-community/eslint-utils": "^4.8.0", - "@eslint-community/regexpp": "^4.12.2", - "@eslint/config-array": "^0.23.5", - "@eslint/config-helpers": "^0.7.0", - "@eslint/core": "^1.2.1", - "@eslint/plugin-kit": "^0.7.2", - "@humanfs/node": "^0.16.6", - "@humanwhocodes/module-importer": "^1.0.1", - "@humanwhocodes/retry": "^0.4.2", - "@types/estree": "^1.0.6", - "ajv": "^6.14.0", - "cross-spawn": "^7.0.6", - "debug": "^4.3.2", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^9.1.2", - "eslint-visitor-keys": "^5.0.1", - "espree": "^11.2.0", - "esquery": "^1.7.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^8.0.0", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "minimatch": "^10.2.5", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - }, - "funding": { - "url": "https://eslint.org/donate" - }, - "peerDependencies": { - "jiti": "*" - }, - "peerDependenciesMeta": { - "jiti": { - "optional": true - } - } - }, - "node_modules/eslint-scope": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-9.1.2.tgz", - "integrity": "sha512-xS90H51cKw0jltxmvmHy2Iai1LIqrfbw57b79w/J7MfvDfkIkFZ+kj6zC3BjtUwh150HsSSdxXZcsuv72miDFQ==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@types/esrecurse": "^4.3.1", - "@types/estree": "^1.0.8", - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", - "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/balanced-match": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", - "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/eslint/node_modules/brace-expansion": { - "version": "5.0.9", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz", - "integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^4.0.2" - }, - "engines": { - "node": "20 || >=22" - } - }, - "node_modules/eslint/node_modules/eslint-visitor-keys": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz", - "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/espree": { - "version": "11.2.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-11.2.0.tgz", - "integrity": "sha512-7p3DrVEIopW1B1avAGLuCSh1jubc01H2JHc8B4qqGblmg5gI9yumBgACjWo4JlIc04ufug4xJ3SQI8HkS/Rgzw==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^8.16.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^5.0.1" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/minimatch": { - "version": "10.2.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", - "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "brace-expansion": "^5.0.8" - }, - "engines": { - "node": "18 || 20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/espree": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", - "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^8.15.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^4.2.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true, - "license": "BSD-2-Clause", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/esquery": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz", - "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estree-walker": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", - "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", - "dev": true - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expect-type": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.4.0.tgz", - "integrity": "sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-glob": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", - "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.8" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true - }, - "node_modules/fastq": { - "version": "1.20.2", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.20.2.tgz", - "integrity": "sha512-UpGiiODyCGprM8EPP6JodP6jC9Rws6TCuiDOD+nn0CJhR8guI3g/ozo4ugL0vJ+Yz1UtJuuRPqvQuybVOF1VQA==", - "dev": true, - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/fault": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/fault/-/fault-1.0.4.tgz", - "integrity": "sha512-CJ0HCB5tL5fYTEA7ToAq5+kTwd++Borf1/bifxd9iT70QcXr4MRrO3Llf8Ifs70q+SJcGHFtnIE/Nw6giCtECA==", - "dev": true, - "license": "MIT", - "dependencies": { - "format": "^0.2.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/file-entry-cache": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", - "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "flat-cache": "^4.0.0" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/flat-cache": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", - "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", - "dev": true, - "license": "MIT", - "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.4" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/flatted": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.2.tgz", - "integrity": "sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA==", - "dev": true, - "license": "ISC" - }, - "node_modules/format": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/format/-/format-0.2.2.tgz", - "integrity": "sha512-wzsgA6WOq+09wrU1tsJ09udeR/YZRaeArL9e1wPbFg3GG2yDnC2ldKpxs4xunpFF9DgqCqOIra3bc1HWrJ37Ww==", - "dev": true, - "engines": { - "node": ">=0.4.x" - } - }, - "node_modules/front-matter": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/front-matter/-/front-matter-4.0.2.tgz", - "integrity": "sha512-I8ZuJ/qG92NWX8i5x1Y8qyj3vizhXS31OxjKDu3LKP+7/qBgfIKValiZIEwoVoJKUHlhWtYrktkxV1XsX+pPlg==", - "dev": true, - "license": "MIT", - "dependencies": { - "js-yaml": "^3.13.1" - } - }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/globals": { - "version": "17.11.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-17.11.0.tgz", - "integrity": "sha512-Z2I8hM+PbJDXQDq3Icgpzv+mPdwr68iZUU9d5WW4FuXfDUQfkZaZuvjMv42/5crNyw154+9+VWXbYrUgDXbxNw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "license": "MIT", - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true - }, - "node_modules/hard-rejection": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz", - "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/hasown": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz", - "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==", - "dev": true, - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/hosted-git-info": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", - "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/hosted-git-info/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/hosted-git-info/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true, - "license": "ISC" - }, - "node_modules/htmlparser2": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-7.2.0.tgz", - "integrity": "sha512-H7MImA4MS6cw7nbyURtLPO1Tms7C5H602LRETv95z1MxO/7CP7rDVROehUYeYBUYEON94NXXDEPmZuq+hX4sog==", - "dev": true, - "funding": [ - "https://github.com/fb55/htmlparser2?sponsor=1", - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ], - "license": "MIT", - "dependencies": { - "domelementtype": "^2.0.1", - "domhandler": "^4.2.2", - "domutils": "^2.8.0", - "entities": "^3.0.1" - } - }, - "node_modules/htmlparser2/node_modules/entities": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/entities/-/entities-3.0.1.tgz", - "integrity": "sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/ignore": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", - "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "dev": true, - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-alphabetical": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz", - "integrity": "sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/is-alphanumerical": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz", - "integrity": "sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-alphabetical": "^1.0.0", - "is-decimal": "^1.0.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", - "dev": true, - "license": "MIT" - }, - "node_modules/is-buffer": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", - "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/is-core-module": { - "version": "2.16.2", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.2.tgz", - "integrity": "sha512-evOr8xfXKxE6qSR0hSXL2r3sd7ALj8+7jQEUvPYcm5sgZFdJ+AYzT6yNmJenvIYQBgIGwfwz08sL8zoL7yq2BA==", - "dev": true, - "license": "MIT", - "dependencies": { - "hasown": "^2.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-decimal": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz", - "integrity": "sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-hexadecimal": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz", - "integrity": "sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "node_modules/js-yaml": { - "version": "3.15.2", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.15.2.tgz", - "integrity": "sha512-6EuL879VkRA+1Cz578mKMiKvjPNEuk6+r1JaFzoSWejZmtf7xWbIyw1e3KkxlkzTIt9Taw6JBhEppG7utc1P+w==", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/js-yaml/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "license": "MIT", - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/js2xmlparser": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-4.0.2.tgz", - "integrity": "sha512-6n4D8gLlLf1n5mNLQPRfViYzu9RATblzPEtm1SthMX1Pjao0r9YI9nw7ZIfRxQMERS87mcswrg+r/OYrPRX6jA==", - "dev": true, - "dependencies": { - "xmlcreate": "^2.0.4" - } - }, - "node_modules/jsdoc": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-4.0.5.tgz", - "integrity": "sha512-P4C6MWP9yIlMiK8nwoZvxN84vb6MsnXcHuy7XzVOvQoCizWX5JFCBsWIIWKXBltpoRZXddUOVQmCTOZt9yDj9g==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@babel/parser": "^7.20.15", - "@jsdoc/salty": "^0.2.1", - "@types/markdown-it": "^14.1.1", - "bluebird": "^3.7.2", - "catharsis": "^0.9.0", - "escape-string-regexp": "^2.0.0", - "js2xmlparser": "^4.0.2", - "klaw": "^3.0.0", - "markdown-it": "^14.1.0", - "markdown-it-anchor": "^8.6.7", - "marked": "^4.0.10", - "mkdirp": "^1.0.4", - "requizzle": "^0.2.3", - "strip-json-comments": "^3.1.0", - "underscore": "~1.13.2" - }, - "bin": { - "jsdoc": "jsdoc.js" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/jsdoc/node_modules/escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/jsesc": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", - "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", - "dev": true, - "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true, - "license": "MIT" - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true, - "license": "MIT" - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", - "dev": true - }, - "node_modules/json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true, - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/keyv": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", - "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", - "dev": true, - "license": "MIT", - "dependencies": { - "json-buffer": "3.0.1" - } - }, - "node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/klaw": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/klaw/-/klaw-3.0.0.tgz", - "integrity": "sha512-0Fo5oir+O9jnXu5EefYbVK+mHMBeEVEy2cmctR1O1NECcCkPRreJKrS6Qt/j3KC2C148Dfo9i3pCmCMsdqGr0g==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.9" - } - }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/lightningcss": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.33.0.tgz", - "integrity": "sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==", - "dev": true, - "license": "MPL-2.0", - "dependencies": { - "detect-libc": "^2.0.3" - }, - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - }, - "optionalDependencies": { - "lightningcss-android-arm64": "1.33.0", - "lightningcss-darwin-arm64": "1.33.0", - "lightningcss-darwin-x64": "1.33.0", - "lightningcss-freebsd-x64": "1.33.0", - "lightningcss-linux-arm-gnueabihf": "1.33.0", - "lightningcss-linux-arm64-gnu": "1.33.0", - "lightningcss-linux-arm64-musl": "1.33.0", - "lightningcss-linux-x64-gnu": "1.33.0", - "lightningcss-linux-x64-musl": "1.33.0", - "lightningcss-win32-arm64-msvc": "1.33.0", - "lightningcss-win32-x64-msvc": "1.33.0" - } - }, - "node_modules/lightningcss-android-arm64": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.33.0.tgz", - "integrity": "sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-darwin-arm64": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.33.0.tgz", - "integrity": "sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-darwin-x64": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.33.0.tgz", - "integrity": "sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-freebsd-x64": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.33.0.tgz", - "integrity": "sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-arm-gnueabihf": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.33.0.tgz", - "integrity": "sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-arm64-gnu": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.33.0.tgz", - "integrity": "sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==", - "cpu": [ - "arm64" - ], - "dev": true, - "libc": [ - "glibc" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-arm64-musl": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.33.0.tgz", - "integrity": "sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "libc": [ - "musl" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-x64-gnu": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.33.0.tgz", - "integrity": "sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==", - "cpu": [ - "x64" - ], - "dev": true, - "libc": [ - "glibc" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-x64-musl": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.33.0.tgz", - "integrity": "sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==", - "cpu": [ - "x64" - ], - "dev": true, - "libc": [ - "musl" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-win32-arm64-msvc": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.33.0.tgz", - "integrity": "sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-win32-x64-msvc": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.33.0.tgz", - "integrity": "sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lines-and-columns": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true, - "license": "MIT" - }, - "node_modules/linkify-it": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.2.tgz", - "integrity": "sha512-ONTm2jCMAVZjgQa/Fy1kScXsuOoF5NPTsoFBdE1KVIZ2vAh/r9+Bqo+0jINCBYnavTPQZz38QzFTme79ENoN3Q==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/puzrin" - }, - { - "type": "github", - "url": "https://github.com/sponsors/markdown-it" - } - ], - "license": "MIT", - "dependencies": { - "uc.micro": "^2.0.0" - } - }, - "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lodash": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.18.1.tgz", - "integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/lodash.debounce": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", - "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", - "dev": true, - "license": "MIT" - }, - "node_modules/lodash.startcase": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.startcase/-/lodash.startcase-4.4.0.tgz", - "integrity": "sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==", - "dev": true, - "license": "MIT" - }, - "node_modules/loglevel": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.9.2.tgz", - "integrity": "sha512-HgMmCqIJSAKqo68l0rS2AanEWfkxaZ5wNiEFb5ggm08lDs9Xl2KxBlX3PTcaD2chBM1gXAYf491/M2Rv8Jwayg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6.0" - }, - "funding": { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/loglevel" - } - }, - "node_modules/longest-streak": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-2.0.4.tgz", - "integrity": "sha512-vM6rUVCVUJJt33bnmHiZEvr7wPT78ztX7rojL+LW51bHtLh6HTjx84LA5W4+oa6aKEJA7jJu5LR6vQRBpA5DVg==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^3.0.2" - } - }, - "node_modules/lunr": { - "version": "2.3.9", - "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", - "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", - "dev": true, - "license": "MIT" - }, - "node_modules/magic-string": { - "version": "0.30.21", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", - "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.5" - } - }, - "node_modules/map-obj": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz", - "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==", + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, "license": "MIT", "engines": { - "node": ">=8" + "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/markdown-it": { - "version": "14.3.0", - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.3.0.tgz", - "integrity": "sha512-RCEsPjR+sr0x+AuYp601tKTkgFG4YEPLCzHST3cQ/fhlJkqAkz1L2/Qbp1j9qw5SBwQHFBoW8+hoN5xssOF0Tw==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/puzrin" - }, - { - "type": "github", - "url": "https://github.com/sponsors/markdown-it" - } - ], - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1", - "entities": "^4.5.0", - "linkify-it": "^5.0.2", - "mdurl": "^2.0.0", - "punycode.js": "^2.3.1", - "uc.micro": "^2.1.0" - }, - "bin": { - "markdown-it": "bin/markdown-it.mjs" - } - }, - "node_modules/markdown-it-anchor": { - "version": "8.6.7", - "resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-8.6.7.tgz", - "integrity": "sha512-FlCHFwNnutLgVTflOYHPW2pPcl2AACqVzExlkGQNsi4CJgqOHN7YTgDd4LuhgN1BFO3TS0vLAruV1Td6dwWPJA==", - "dev": true, - "peerDependencies": { - "@types/markdown-it": "*", - "markdown-it": "*" - } - }, - "node_modules/markdown-table": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-2.0.0.tgz", - "integrity": "sha512-Ezda85ToJUBhM6WGaG6veasyym+Tbs3cMAw/ZhOPqXiYsr0jgocBV3j3nx+4lk47plLlIqjwuTm/ywVI+zjJ/A==", + "node_modules/eslint": { + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.9.1.tgz", + "integrity": "sha512-9VaAkDURekixUQJy0oJYl2DcN6oKMfxay7XzaGYAWQwsb6qfKf+x76R2k1L8kb1boc+FyCAaTA9GmiKaaiaF+A==", "dev": true, "license": "MIT", + "workspaces": [ + "packages/*" + ], "dependencies": { - "repeat-string": "^1.0.0" + "@eslint-community/eslint-utils": "^4.8.0", + "@eslint-community/regexpp": "^4.12.2", + "@eslint/config-array": "^0.23.5", + "@eslint/config-helpers": "^0.7.0", + "@eslint/core": "^1.2.1", + "@eslint/plugin-kit": "^0.7.2", + "@humanfs/node": "^0.16.6", + "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.4.2", + "@types/estree": "^1.0.6", + "ajv": "^6.14.0", + "cross-spawn": "^7.0.6", + "debug": "^4.3.2", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^9.1.2", + "eslint-visitor-keys": "^5.0.1", + "espree": "^11.2.0", + "esquery": "^1.7.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^8.0.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "minimatch": "^10.2.5", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3" }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/marked": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", - "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==", - "dev": true, "bin": { - "marked": "bin/marked.js" + "eslint": "bin/eslint.js" }, "engines": { - "node": ">= 12" - } - }, - "node_modules/mdast-util-find-and-replace": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/mdast-util-find-and-replace/-/mdast-util-find-and-replace-1.1.1.tgz", - "integrity": "sha512-9cKl33Y21lyckGzpSmEQnIDjEfeeWelN5s1kUW1LwdB0Fkuq2u+4GdqcGEygYxJE8GVqCl0741bYXHgamfWAZA==", - "dev": true, - "license": "MIT", - "dependencies": { - "escape-string-regexp": "^4.0.0", - "unist-util-is": "^4.0.0", - "unist-util-visit-parents": "^3.0.0" + "node": "^20.19.0 || ^22.13.0 || >=24" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/mdast-util-footnote": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/mdast-util-footnote/-/mdast-util-footnote-0.1.7.tgz", - "integrity": "sha512-QxNdO8qSxqbO2e3m09KwDKfWiLgqyCurdWTQ198NpbZ2hxntdc+VKS4fDJCmNWbAroUdYnSthu+XbZ8ovh8C3w==", - "dev": true, - "license": "MIT", - "dependencies": { - "mdast-util-to-markdown": "^0.6.0", - "micromark": "~2.11.0" + "url": "https://eslint.org/donate" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/mdast-util-from-markdown": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-0.8.5.tgz", - "integrity": "sha512-2hkTXtYYnr+NubD/g6KGBS/0mFmBcifAsI0yIWRiRo0PjVs6SSOSOdtzbp6kSGnShDN6G5aWZpKQ2lWRy27mWQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/mdast": "^3.0.0", - "mdast-util-to-string": "^2.0.0", - "micromark": "~2.11.0", - "parse-entities": "^2.0.0", - "unist-util-stringify-position": "^2.0.0" + "peerDependencies": { + "jiti": "*" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" + "peerDependenciesMeta": { + "jiti": { + "optional": true + } } }, - "node_modules/mdast-util-frontmatter": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/mdast-util-frontmatter/-/mdast-util-frontmatter-0.2.0.tgz", - "integrity": "sha512-FHKL4w4S5fdt1KjJCwB0178WJ0evnyyQr5kXTM3wrOVpytD0hrkvd+AOOjU9Td8onOejCkmZ+HQRT3CZ3coHHQ==", + "node_modules/eslint-scope": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-9.1.2.tgz", + "integrity": "sha512-xS90H51cKw0jltxmvmHy2Iai1LIqrfbw57b79w/J7MfvDfkIkFZ+kj6zC3BjtUwh150HsSSdxXZcsuv72miDFQ==", "dev": true, - "license": "MIT", + "license": "BSD-2-Clause", "dependencies": { - "micromark-extension-frontmatter": "^0.2.0" + "@types/esrecurse": "^4.3.1", + "@types/estree": "^1.0.8", + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/mdast-util-gfm": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/mdast-util-gfm/-/mdast-util-gfm-0.1.2.tgz", - "integrity": "sha512-NNkhDx/qYcuOWB7xHUGWZYVXvjPFFd6afg6/e2g+SV4r9q5XUcCbV4Wfa3DLYIiD+xAEZc6K4MGaE/m0KDcPwQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "mdast-util-gfm-autolink-literal": "^0.1.0", - "mdast-util-gfm-strikethrough": "^0.2.0", - "mdast-util-gfm-table": "^0.1.0", - "mdast-util-gfm-task-list-item": "^0.1.0", - "mdast-util-to-markdown": "^0.6.1" + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" + "url": "https://opencollective.com/eslint" } }, - "node_modules/mdast-util-gfm-autolink-literal": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/mdast-util-gfm-autolink-literal/-/mdast-util-gfm-autolink-literal-0.1.3.tgz", - "integrity": "sha512-GjmLjWrXg1wqMIO9+ZsRik/s7PLwTaeCHVB7vRxUwLntZc8mzmTsLVr6HW1yLokcnhfURsn5zmSVdi3/xWWu1A==", + "node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", "dev": true, - "license": "MIT", - "dependencies": { - "ccount": "^1.0.0", - "mdast-util-find-and-replace": "^1.1.0", - "micromark": "^2.11.3" + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" + "url": "https://opencollective.com/eslint" } }, - "node_modules/mdast-util-gfm-strikethrough": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/mdast-util-gfm-strikethrough/-/mdast-util-gfm-strikethrough-0.2.3.tgz", - "integrity": "sha512-5OQLXpt6qdbttcDG/UxYY7Yjj3e8P7X16LzvpX8pIQPYJ/C2Z1qFGMmcw+1PZMUM3Z8wt8NRfYTvCni93mgsgA==", - "dev": true, - "license": "MIT", - "dependencies": { - "mdast-util-to-markdown": "^0.6.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" + "node_modules/eslint/node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" } }, - "node_modules/mdast-util-gfm-table": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/mdast-util-gfm-table/-/mdast-util-gfm-table-0.1.6.tgz", - "integrity": "sha512-j4yDxQ66AJSBwGkbpFEp9uG/LS1tZV3P33fN1gkyRB2LoRL+RR3f76m0HPHaby6F4Z5xr9Fv1URmATlRRUIpRQ==", + "node_modules/eslint/node_modules/brace-expansion": { + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz", + "integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==", "dev": true, "license": "MIT", "dependencies": { - "markdown-table": "^2.0.0", - "mdast-util-to-markdown": "~0.6.0" + "balanced-match": "^4.0.2" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" + "engines": { + "node": "20 || >=22" } }, - "node_modules/mdast-util-gfm-task-list-item": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/mdast-util-gfm-task-list-item/-/mdast-util-gfm-task-list-item-0.1.6.tgz", - "integrity": "sha512-/d51FFIfPsSmCIRNp7E6pozM9z1GYPIkSy1urQ8s/o4TC22BZ7DqfHFWiqBD23bc7J3vV1Fc9O4QIHBlfuit8A==", + "node_modules/eslint/node_modules/eslint-visitor-keys": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz", + "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==", "dev": true, - "license": "MIT", - "dependencies": { - "mdast-util-to-markdown": "~0.6.0" + "license": "Apache-2.0", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" + "url": "https://opencollective.com/eslint" } }, - "node_modules/mdast-util-to-markdown": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-0.6.5.tgz", - "integrity": "sha512-XeV9sDE7ZlOQvs45C9UKMtfTcctcaj/pGwH8YLbMHoMOXNNCn2LsqVQOqrF1+/NU8lKDAqozme9SCXWyo9oAcQ==", + "node_modules/eslint/node_modules/espree": { + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-11.2.0.tgz", + "integrity": "sha512-7p3DrVEIopW1B1avAGLuCSh1jubc01H2JHc8B4qqGblmg5gI9yumBgACjWo4JlIc04ufug4xJ3SQI8HkS/Rgzw==", "dev": true, - "license": "MIT", + "license": "BSD-2-Clause", "dependencies": { - "@types/unist": "^2.0.0", - "longest-streak": "^2.0.0", - "mdast-util-to-string": "^2.0.0", - "parse-entities": "^2.0.0", - "repeat-string": "^1.0.0", - "zwitch": "^1.0.0" + "acorn": "^8.16.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^5.0.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" + "url": "https://opencollective.com/eslint" } }, - "node_modules/mdast-util-to-markdown/node_modules/@types/unist": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", - "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", - "dev": true, - "license": "MIT" - }, - "node_modules/mdast-util-to-string": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-2.0.0.tgz", - "integrity": "sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==", + "node_modules/eslint/node_modules/minimatch": { + "version": "10.2.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", + "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", "dev": true, - "license": "MIT", + "license": "BlueOak-1.0.0", + "dependencies": { + "brace-expansion": "^5.0.8" + }, + "engines": { + "node": "18 || 20 || >=22" + }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/mdurl": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz", - "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==", - "dev": true - }, - "node_modules/meow": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-9.0.0.tgz", - "integrity": "sha512-+obSblOQmRhcyBt62furQqRAQpNyWXo8BuQ5bN7dG8wmwQ+vwHKp/rCFD4CrTP8CsDQD1sjoZ94K417XEUk8IQ==", + "node_modules/espree": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", + "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", "dev": true, - "license": "MIT", + "license": "BSD-2-Clause", "dependencies": { - "@types/minimist": "^1.2.0", - "camelcase-keys": "^6.2.2", - "decamelize": "^1.2.0", - "decamelize-keys": "^1.1.0", - "hard-rejection": "^2.1.0", - "minimist-options": "4.1.0", - "normalize-package-data": "^3.0.0", - "read-pkg-up": "^7.0.1", - "redent": "^3.0.0", - "trim-newlines": "^3.0.0", - "type-fest": "^0.18.0", - "yargs-parser": "^20.2.3" + "acorn": "^8.15.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^4.2.1" }, "engines": { - "node": ">=10" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://opencollective.com/eslint" } }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true, - "license": "MIT", + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, "engines": { - "node": ">= 8" + "node": ">=4" } }, - "node_modules/micromark": { - "version": "2.11.4", - "resolved": "https://registry.npmjs.org/micromark/-/micromark-2.11.4.tgz", - "integrity": "sha512-+WoovN/ppKolQOFIAajxi7Lu9kInbPxFuTBVEavFcL8eAfVstoc5MocPmqBeAdBOJV00uaVjegzH4+MA0DN/uA==", + "node_modules/esquery": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz", + "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==", "dev": true, - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", + "license": "BSD-3-Clause", "dependencies": { - "debug": "^4.0.0", - "parse-entities": "^2.0.0" + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" } }, - "node_modules/micromark-extension-footnote": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/micromark-extension-footnote/-/micromark-extension-footnote-0.3.2.tgz", - "integrity": "sha512-gr/BeIxbIWQoUm02cIfK7mdMZ/fbroRpLsck4kvFtjbzP4yi+OPVbnukTc/zy0i7spC2xYE/dbX1Sur8BEDJsQ==", + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, - "license": "MIT", + "license": "BSD-2-Clause", "dependencies": { - "micromark": "~2.11.0" + "estraverse": "^5.2.0" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" + "engines": { + "node": ">=4.0" } }, - "node_modules/micromark-extension-frontmatter": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/micromark-extension-frontmatter/-/micromark-extension-frontmatter-0.2.2.tgz", - "integrity": "sha512-q6nPLFCMTLtfsctAuS0Xh4vaolxSFUWUWR6PZSrXXiRy+SANGllpcqdXFv2z07l0Xz/6Hl40hK0ffNCJPH2n1A==", + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, - "license": "MIT", - "dependencies": { - "fault": "^1.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" } }, - "node_modules/micromark-extension-gfm": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/micromark-extension-gfm/-/micromark-extension-gfm-0.3.3.tgz", - "integrity": "sha512-oVN4zv5/tAIA+l3GbMi7lWeYpJ14oQyJ3uEim20ktYFAcfX1x3LNlFGGlmrZHt7u9YlKExmyJdDGaTt6cMSR/A==", + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true, - "license": "MIT", - "dependencies": { - "micromark": "~2.11.0", - "micromark-extension-gfm-autolink-literal": "~0.5.0", - "micromark-extension-gfm-strikethrough": "~0.6.5", - "micromark-extension-gfm-table": "~0.4.0", - "micromark-extension-gfm-tagfilter": "~0.3.0", - "micromark-extension-gfm-task-list-item": "~0.3.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/micromark-extension-gfm-autolink-literal": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/micromark-extension-gfm-autolink-literal/-/micromark-extension-gfm-autolink-literal-0.5.7.tgz", - "integrity": "sha512-ePiDGH0/lhcngCe8FtH4ARFoxKTUelMp4L7Gg2pujYD5CSMb9PbblnyL+AAMud/SNMyusbS2XDSiPIRcQoNFAw==", + "node_modules/expect-type": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.4.0.tgz", + "integrity": "sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==", "dev": true, - "license": "MIT", - "dependencies": { - "micromark": "~2.11.3" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" + "license": "Apache-2.0", + "engines": { + "node": ">=12.0.0" } }, - "node_modules/micromark-extension-gfm-strikethrough": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/micromark-extension-gfm-strikethrough/-/micromark-extension-gfm-strikethrough-0.6.5.tgz", - "integrity": "sha512-PpOKlgokpQRwUesRwWEp+fHjGGkZEejj83k9gU5iXCbDG+XBA92BqnRKYJdfqfkrRcZRgGuPuXb7DaK/DmxOhw==", + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", "dev": true, "license": "MIT", "dependencies": { - "micromark": "~2.11.0" + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" + "engines": { + "node": ">=8.6.0" } }, - "node_modules/micromark-extension-gfm-table": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/micromark-extension-gfm-table/-/micromark-extension-gfm-table-0.4.3.tgz", - "integrity": "sha512-hVGvESPq0fk6ALWtomcwmgLvH8ZSVpcPjzi0AjPclB9FsVRgMtGZkUcpE0zgjOCFAznKepF4z3hX8z6e3HODdA==", + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "micromark": "~2.11.0" + "is-glob": "^4.0.1" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" + "engines": { + "node": ">= 6" } }, - "node_modules/micromark-extension-gfm-tagfilter": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/micromark-extension-gfm-tagfilter/-/micromark-extension-gfm-tagfilter-0.3.0.tgz", - "integrity": "sha512-9GU0xBatryXifL//FJH+tAZ6i240xQuFrSL7mYi8f4oZSbc+NvXjkrHemeYP0+L4ZUT+Ptz3b95zhUZnMtoi/Q==", + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", "dev": true, - "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } + "license": "MIT" }, - "node_modules/micromark-extension-gfm-task-list-item": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/micromark-extension-gfm-task-list-item/-/micromark-extension-gfm-task-list-item-0.3.3.tgz", - "integrity": "sha512-0zvM5iSLKrc/NQl84pZSjGo66aTGd57C1idmlWmE87lkMcXrTxg1uXa/nXomxJytoje9trP0NDLvw4bZ/Z/XCQ==", + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true + }, + "node_modules/fastq": { + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.20.2.tgz", + "integrity": "sha512-UpGiiODyCGprM8EPP6JodP6jC9Rws6TCuiDOD+nn0CJhR8guI3g/ozo4ugL0vJ+Yz1UtJuuRPqvQuybVOF1VQA==", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "micromark": "~2.11.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" + "reusify": "^1.0.4" } }, - "node_modules/micromatch": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", - "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "node_modules/fault": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/fault/-/fault-1.0.4.tgz", + "integrity": "sha512-CJ0HCB5tL5fYTEA7ToAq5+kTwd++Borf1/bifxd9iT70QcXr4MRrO3Llf8Ifs70q+SJcGHFtnIE/Nw6giCtECA==", "dev": true, "license": "MIT", "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" + "format": "^0.2.0" }, - "engines": { - "node": ">=8.6" + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/min-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", - "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", + "node_modules/file-entry-cache": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", "dev": true, "license": "MIT", + "dependencies": { + "flat-cache": "^4.0.0" + }, "engines": { - "node": ">=4" - } - }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=16.0.0" } }, - "node_modules/minimist-options": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz", - "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==", + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "license": "MIT", "dependencies": { - "arrify": "^1.0.1", - "is-plain-obj": "^1.1.0", - "kind-of": "^6.0.3" + "to-regex-range": "^5.0.1" }, "engines": { - "node": ">= 6" + "node": ">=8" } }, - "node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, - "bin": { - "mkdirp": "bin/cmd.js" + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" }, "engines": { "node": ">=10" - } - }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true, - "license": "MIT" - }, - "node_modules/nanoid": { - "version": "3.3.18", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.18.tgz", - "integrity": "sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "bin": { - "nanoid": "bin/nanoid.cjs" }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", - "dev": true - }, - "node_modules/neotraverse": { - "version": "0.6.18", - "resolved": "https://registry.npmjs.org/neotraverse/-/neotraverse-0.6.18.tgz", - "integrity": "sha512-Z4SmBUweYa09+o6pG+eASabEpP6QkQ70yHj351pQoEXIs8uHbaU2DWVmzBANKgflPa47A50PtB2+NgRpQvr7vA==", + "node_modules/flat-cache": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", "dev": true, "license": "MIT", + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.4" + }, "engines": { - "node": ">= 10" + "node": ">=16" } }, - "node_modules/node-releases": { - "version": "2.0.27", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.27.tgz", - "integrity": "sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA==", + "node_modules/flatted": { + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.2.tgz", + "integrity": "sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA==", "dev": true, - "license": "MIT" + "license": "ISC" }, - "node_modules/normalize-package-data": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz", - "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==", + "node_modules/format": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/format/-/format-0.2.2.tgz", + "integrity": "sha512-wzsgA6WOq+09wrU1tsJ09udeR/YZRaeArL9e1wPbFg3GG2yDnC2ldKpxs4xunpFF9DgqCqOIra3bc1HWrJ37Ww==", "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "hosted-git-info": "^4.0.1", - "is-core-module": "^2.5.0", - "semver": "^7.3.4", - "validate-npm-package-license": "^3.0.1" - }, "engines": { - "node": ">=10" + "node": ">=0.4.x" } }, - "node_modules/normalize-package-data/node_modules/semver": { - "version": "7.8.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", - "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", + "node_modules/front-matter": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/front-matter/-/front-matter-4.0.2.tgz", + "integrity": "sha512-I8ZuJ/qG92NWX8i5x1Y8qyj3vizhXS31OxjKDu3LKP+7/qBgfIKValiZIEwoVoJKUHlhWtYrktkxV1XsX+pPlg==", "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" + "license": "MIT", + "dependencies": { + "js-yaml": "^3.13.1" } }, - "node_modules/obug": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/obug/-/obug-2.1.4.tgz", - "integrity": "sha512-4a+OsYv9UktOJKE+l1A4OufDgdRF9PifWj+tJnHURo/P+WOxpG4GzUFL9qCalmWauao6ogiG+QvnCovwPoyAWA==", + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, - "funding": [ - "https://github.com/sponsors/sxzz", - "https://opencollective.com/debug" + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" ], - "license": "MIT", "engines": { - "node": ">=12.20.0" + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, - "node_modules/optionator": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", - "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", "dev": true, - "dependencies": { - "@aashutoshrathi/word-wrap": "^1.2.3", - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0" - }, - "engines": { - "node": ">= 0.8.0" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "node_modules/get-tsconfig": { + "version": "5.0.0-beta.5", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-5.0.0-beta.5.tgz", + "integrity": "sha512-/6gFNr0N04nob252sTQxyFLi3eKFRqIg1I87YcqAMT1i6SQrSF6KujUEQrtrjMV0H/eejTCltLdDSTEMzHbnsQ==", "dev": true, "license": "MIT", "dependencies": { - "p-try": "^2.0.0" + "resolve-pkg-maps": "^1.0.0" }, "engines": { - "node": ">=6" + "node": ">=20.20.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" } }, - "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, "dependencies": { - "p-limit": "^3.0.2" + "is-glob": "^4.0.3" }, "engines": { - "node": ">=10" + "node": ">=10.13.0" + } + }, + "node_modules/globals": { + "version": "17.11.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-17.11.0.tgz", + "integrity": "sha512-Z2I8hM+PbJDXQDq3Icgpzv+mPdwr68iZUU9d5WW4FuXfDUQfkZaZuvjMv42/5crNyw154+9+VWXbYrUgDXbxNw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/p-locate/node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", "dev": true, + "license": "MIT", "dependencies": { - "yocto-queue": "^0.1.0" + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" }, "engines": { "node": ">=10" @@ -5939,176 +2671,181 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "node_modules/hard-rejection": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz", + "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==", "dev": true, "license": "MIT", "engines": { "node": ">=6" } }, - "node_modules/parse-entities": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz", - "integrity": "sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==", + "node_modules/hasown": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz", + "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==", "dev": true, "license": "MIT", "dependencies": { - "character-entities": "^1.0.0", - "character-entities-legacy": "^1.0.0", - "character-reference-invalid": "^1.0.0", - "is-alphanumerical": "^1.0.0", - "is-decimal": "^1.0.0", - "is-hexadecimal": "^1.0.0" + "function-bind": "^1.1.2" }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" + "engines": { + "node": ">= 0.4" } }, - "node_modules/parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "node_modules/hookable": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/hookable/-/hookable-6.1.1.tgz", + "integrity": "sha512-U9LYDy1CwhMCnprUfeAZWZGByVbhd54hwepegYTK7Pi5NvqEj63ifz5z+xukznehT7i6NIZRu89Ay1AZmRsLEQ==", "dev": true, - "license": "MIT", + "license": "MIT" + }, + "node_modules/hosted-git-info": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", + "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", + "dev": true, + "license": "ISC", "dependencies": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" + "lru-cache": "^6.0.0" }, "engines": { - "node": ">=8" + "node": ">=10" + } + }, + "node_modules/hosted-git-info/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "engines": { + "node": ">=10" } }, - "node_modules/path-exists": { + "node_modules/hosted-git-info/node_modules/yallist": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true, + "license": "ISC" + }, + "node_modules/htmlparser2": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-7.2.0.tgz", + "integrity": "sha512-H7MImA4MS6cw7nbyURtLPO1Tms7C5H602LRETv95z1MxO/7CP7rDVROehUYeYBUYEON94NXXDEPmZuq+hX4sog==", "dev": true, + "funding": [ + "https://github.com/fb55/htmlparser2?sponsor=1", + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], "license": "MIT", - "engines": { - "node": ">=8" + "dependencies": { + "domelementtype": "^2.0.1", + "domhandler": "^4.2.2", + "domutils": "^2.8.0", + "entities": "^3.0.1" } }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "node_modules/htmlparser2/node_modules/entities": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-3.0.1.tgz", + "integrity": "sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==", "dev": true, + "license": "BSD-2-Clause", "engines": { - "node": ">=8" + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" } }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true, "license": "MIT", "engines": { - "node": ">=8" + "node": ">= 4" } }, - "node_modules/pathe": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", - "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", - "dev": true, - "license": "MIT" - }, - "node_modules/picocolors": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", - "dev": true - }, - "node_modules/picomatch": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", - "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "node_modules/import-without-cache": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/import-without-cache/-/import-without-cache-0.4.0.tgz", + "integrity": "sha512-NkJQA7oZ4YHQhd2+H3BoRFKF3d/XNsiKpHZCQEMH9pDX27hQQLsTyOocyRgaIVtf8gHX3Nt3LPkR4e5EdtPAGQ==", "dev": true, "license": "MIT", "engines": { - "node": ">=8.6" + "node": "^22.18.0 || >=24.0.0" }, "funding": { - "url": "https://github.com/sponsors/jonschlinkert" + "url": "https://github.com/sponsors/sxzz" } }, - "node_modules/postcss": { - "version": "8.5.26", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.26.tgz", - "integrity": "sha512-u82N74LFzG8ca+dD8puPnplTXoGH4fTPpVGuIbt36G3qvNlkvfD0lEAZSxaly3KX8TS/L1A1gsCEmvKmBcVbkQ==", + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "nanoid": "^3.3.17", - "picocolors": "^1.1.1", - "source-map-js": "^1.2.1" - }, "engines": { - "node": "^10 || ^12 || >=14" + "node": ">=0.8.19" } }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", "dev": true, + "license": "MIT", "engines": { - "node": ">= 0.8.0" + "node": ">=8" } }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "node_modules/is-alphabetical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz", + "integrity": "sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==", "dev": true, "license": "MIT", - "engines": { - "node": ">=6" + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/punycode.js": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode.js/-/punycode.js-2.3.1.tgz", - "integrity": "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==", + "node_modules/is-alphanumerical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz", + "integrity": "sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==", "dev": true, - "engines": { - "node": ">=6" + "license": "MIT", + "dependencies": { + "is-alphabetical": "^1.0.0", + "is-decimal": "^1.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true, + "license": "MIT" + }, + "node_modules/is-buffer": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", + "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", "dev": true, "funding": [ { @@ -6124,2434 +2861,2784 @@ "url": "https://feross.org/support" } ], - "license": "MIT" - }, - "node_modules/quick-lru": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", - "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==", - "dev": true, "license": "MIT", "engines": { - "node": ">=8" + "node": ">=4" } }, - "node_modules/read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "node_modules/is-core-module": { + "version": "2.16.2", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.2.tgz", + "integrity": "sha512-evOr8xfXKxE6qSR0hSXL2r3sd7ALj8+7jQEUvPYcm5sgZFdJ+AYzT6yNmJenvIYQBgIGwfwz08sL8zoL7yq2BA==", "dev": true, "license": "MIT", "dependencies": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" + "hasown": "^2.0.3" }, "engines": { - "node": ">=8" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/read-pkg-up": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", - "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "node_modules/is-decimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz", + "integrity": "sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==", "dev": true, "license": "MIT", - "dependencies": { - "find-up": "^4.1.0", - "read-pkg": "^5.2.0", - "type-fest": "^0.8.1" - }, - "engines": { - "node": ">=8" - }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "type": "github", + "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/read-pkg-up/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, - "node_modules/read-pkg-up/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, - "license": "MIT", "dependencies": { - "p-locate": "^4.1.0" + "is-extglob": "^2.1.1" }, "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, - "node_modules/read-pkg-up/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "node_modules/is-hexadecimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz", + "integrity": "sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==", "dev": true, "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/read-pkg-up/node_modules/type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, - "license": "(MIT OR CC0-1.0)", + "license": "MIT", "engines": { - "node": ">=8" + "node": ">=0.12.0" } }, - "node_modules/read-pkg/node_modules/hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "node_modules/is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==", "dev": true, - "license": "ISC" + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } }, - "node_modules/read-pkg/node_modules/normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "node_modules/js-yaml": { + "version": "3.15.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.15.2.tgz", + "integrity": "sha512-6EuL879VkRA+1Cz578mKMiKvjPNEuk6+r1JaFzoSWejZmtf7xWbIyw1e3KkxlkzTIt9Taw6JBhEppG7utc1P+w==", "dev": true, - "license": "BSD-2-Clause", + "license": "MIT", "dependencies": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" } }, - "node_modules/read-pkg/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "node_modules/js-yaml/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver" + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" } }, - "node_modules/read-pkg/node_modules/type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=8" - } + "license": "MIT" }, - "node_modules/redent": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", - "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", "dev": true, "license": "MIT", "dependencies": { - "indent-string": "^4.0.0", - "strip-indent": "^3.0.0" - }, - "engines": { - "node": ">=8" + "json-buffer": "3.0.1" } }, - "node_modules/regenerate": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", - "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true, - "license": "MIT" + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } }, - "node_modules/regenerate-unicode-properties": { - "version": "10.2.2", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.2.2.tgz", - "integrity": "sha512-m03P+zhBeQd1RGnYxrGyDAPpWX/epKirLrp8e3qevZdVkKtnCrjjWczIbYc8+xd6vcTStVlqfycTx1KR4LOr0g==", + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, - "license": "MIT", "dependencies": { - "regenerate": "^1.4.2" + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" }, "engines": { - "node": ">=4" + "node": ">= 0.8.0" } }, - "node_modules/regexpu-core": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-6.4.0.tgz", - "integrity": "sha512-0ghuzq67LI9bLXpOX/ISfve/Mq33a4aFRzoQYhnnok1JOFpmE/A2TBGkNVenOGEeSBCjIiWcc6MVOG5HEQv0sA==", + "node_modules/lightningcss": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.33.0.tgz", + "integrity": "sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==", "dev": true, - "license": "MIT", + "license": "MPL-2.0", "dependencies": { - "regenerate": "^1.4.2", - "regenerate-unicode-properties": "^10.2.2", - "regjsgen": "^0.8.0", - "regjsparser": "^0.13.0", - "unicode-match-property-ecmascript": "^2.0.0", - "unicode-match-property-value-ecmascript": "^2.2.1" + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" }, - "engines": { - "node": ">=4" + "optionalDependencies": { + "lightningcss-android-arm64": "1.33.0", + "lightningcss-darwin-arm64": "1.33.0", + "lightningcss-darwin-x64": "1.33.0", + "lightningcss-freebsd-x64": "1.33.0", + "lightningcss-linux-arm-gnueabihf": "1.33.0", + "lightningcss-linux-arm64-gnu": "1.33.0", + "lightningcss-linux-arm64-musl": "1.33.0", + "lightningcss-linux-x64-gnu": "1.33.0", + "lightningcss-linux-x64-musl": "1.33.0", + "lightningcss-win32-arm64-msvc": "1.33.0", + "lightningcss-win32-x64-msvc": "1.33.0" } }, - "node_modules/regjsgen": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.8.0.tgz", - "integrity": "sha512-RvwtGe3d7LvWiDQXeQw8p5asZUmfU1G/l6WbUXeHta7Y2PEIvBTwH6E2EfmYUK8pxcxEdEmaomqyp0vZZ7C+3Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/regjsparser": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.13.0.tgz", - "integrity": "sha512-NZQZdC5wOE/H3UT28fVGL+ikOZcEzfMGk/c3iN9UGxzWHMa1op7274oyiUVrAG4B2EuFhus8SvkaYnhvW92p9Q==", + "node_modules/lightningcss-android-arm64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.33.0.tgz", + "integrity": "sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "jsesc": "~3.1.0" + "license": "MPL-2.0", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 12.0.0" }, - "bin": { - "regjsparser": "bin/parser" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/remark-footnotes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/remark-footnotes/-/remark-footnotes-3.0.0.tgz", - "integrity": "sha512-ZssAvH9FjGYlJ/PBVKdSmfyPc3Cz4rTWgZLI4iE/SX8Nt5l3o3oEjv3wwG5VD7xOjktzdwp5coac+kJV9l4jgg==", + "node_modules/lightningcss-darwin-arm64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.33.0.tgz", + "integrity": "sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "mdast-util-footnote": "^0.1.0", - "micromark-extension-footnote": "^0.3.0" + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" }, "funding": { "type": "opencollective", - "url": "https://opencollective.com/unified" + "url": "https://opencollective.com/parcel" } }, - "node_modules/remark-frontmatter": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/remark-frontmatter/-/remark-frontmatter-3.0.0.tgz", - "integrity": "sha512-mSuDd3svCHs+2PyO29h7iijIZx4plX0fheacJcAoYAASfgzgVIcXGYSq9GFyYocFLftQs8IOmmkgtOovs6d4oA==", + "node_modules/lightningcss-darwin-x64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.33.0.tgz", + "integrity": "sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "mdast-util-frontmatter": "^0.2.0", - "micromark-extension-frontmatter": "^0.2.0" + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" }, "funding": { "type": "opencollective", - "url": "https://opencollective.com/unified" + "url": "https://opencollective.com/parcel" } }, - "node_modules/remark-gfm": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/remark-gfm/-/remark-gfm-1.0.0.tgz", - "integrity": "sha512-KfexHJCiqvrdBZVbQ6RopMZGwaXz6wFJEfByIuEwGf0arvITHjiKKZ1dpXujjH9KZdm1//XJQwgfnJ3lmXaDPA==", + "node_modules/lightningcss-freebsd-x64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.33.0.tgz", + "integrity": "sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "mdast-util-gfm": "^0.1.0", - "micromark-extension-gfm": "^0.3.0" + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 12.0.0" }, "funding": { "type": "opencollective", - "url": "https://opencollective.com/unified" + "url": "https://opencollective.com/parcel" } }, - "node_modules/remark-parse": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-9.0.0.tgz", - "integrity": "sha512-geKatMwSzEXKHuzBNU1z676sGcDcFoChMK38TgdHJNAYfFtsfHDQG7MoJAjs6sgYMqyLduCYWDIWZIxiPeafEw==", + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.33.0.tgz", + "integrity": "sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==", + "cpu": [ + "arm" + ], "dev": true, - "license": "MIT", - "dependencies": { - "mdast-util-from-markdown": "^0.8.0" + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" }, "funding": { "type": "opencollective", - "url": "https://opencollective.com/unified" + "url": "https://opencollective.com/parcel" } }, - "node_modules/remove-markdown": { - "version": "0.6.4", - "resolved": "https://registry.npmjs.org/remove-markdown/-/remove-markdown-0.6.4.tgz", - "integrity": "sha512-BompiLClzjfh46irZmzv+1Q61jZYlKN3iq/hzae9EOUwf7ctr/5wpD4qwgn/FWDAYE18RORO7z/yr+HXZJCY8Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.33.0.tgz", + "integrity": "sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "MIT", + "libc": [ + "glibc" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=0.10" + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/requizzle": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/requizzle/-/requizzle-0.2.4.tgz", - "integrity": "sha512-JRrFk1D4OQ4SqovXOgdav+K8EAhSB/LJZqCz8tbX0KObcdeM15Ss59ozWMBWmmINMagCwmqn4ZNryUGpBsl6Jw==", + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.33.0.tgz", + "integrity": "sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==", + "cpu": [ + "arm64" + ], "dev": true, - "dependencies": { - "lodash": "^4.17.21" + "libc": [ + "musl" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/resolve": { - "version": "1.22.11", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.11.tgz", - "integrity": "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==", + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.33.0.tgz", + "integrity": "sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "is-core-module": "^2.16.1", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, + "libc": [ + "glibc" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">= 0.4" + "node": ">= 12.0.0" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/reusify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", - "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.33.0.tgz", + "integrity": "sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT", + "libc": [ + "musl" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/rolldown": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.5.tgz", - "integrity": "sha512-VD2IE5PUG4Oj8zz2VGykiYd5wbnjdIiSsNQb8Qu5B+noEp+A78mu2iVvpp27g8es14Tk9rofNs5Tku9iQCS4fA==", + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.33.0.tgz", + "integrity": "sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "@oxc-project/types": "=0.146.0", - "@rolldown/pluginutils": "^1.0.0" - }, - "bin": { - "rolldown": "bin/cli.mjs" - }, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], "engines": { - "node": "^20.19.0 || >=22.12.0" + "node": ">= 12.0.0" }, - "optionalDependencies": { - "@rolldown/binding-android-arm-eabi": "1.2.5", - "@rolldown/binding-android-arm64": "1.2.5", - "@rolldown/binding-darwin-arm64": "1.2.5", - "@rolldown/binding-darwin-x64": "1.2.5", - "@rolldown/binding-freebsd-x64": "1.2.5", - "@rolldown/binding-linux-arm-gnueabihf": "1.2.5", - "@rolldown/binding-linux-arm64-gnu": "1.2.5", - "@rolldown/binding-linux-arm64-musl": "1.2.5", - "@rolldown/binding-linux-ppc64-gnu": "1.2.5", - "@rolldown/binding-linux-s390x-gnu": "1.2.5", - "@rolldown/binding-linux-x64-gnu": "1.2.5", - "@rolldown/binding-linux-x64-musl": "1.2.5", - "@rolldown/binding-openharmony-arm64": "1.2.5", - "@rolldown/binding-win32-arm64-msvc": "1.2.5", - "@rolldown/binding-win32-x64-msvc": "1.2.5" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/rollup": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.62.5.tgz", - "integrity": "sha512-/tqMfgP7GPA3PHhCmuiS4vIjrSVhHLgY++i+dhbG462euyAj7FpM4D9uq1X3BgjlqRdpcOrYhcQtfiQLNc8tqw==", + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.33.0.tgz", + "integrity": "sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "1.0.9" - }, - "bin": { - "rollup": "dist/bin/rollup" - }, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], "engines": { - "node": ">=18.0.0", - "npm": ">=8.0.0" + "node": ">= 12.0.0" }, - "optionalDependencies": { - "@napi-rs/lzma-linux-x64-gnu": "1.5.1", - "@rollup/rollup-android-arm-eabi": "4.62.5", - "@rollup/rollup-android-arm64": "4.62.5", - "@rollup/rollup-darwin-arm64": "4.62.5", - "@rollup/rollup-darwin-x64": "4.62.5", - "@rollup/rollup-freebsd-arm64": "4.62.5", - "@rollup/rollup-freebsd-x64": "4.62.5", - "@rollup/rollup-linux-arm-gnueabihf": "4.62.5", - "@rollup/rollup-linux-arm-musleabihf": "4.62.5", - "@rollup/rollup-linux-arm64-gnu": "4.62.5", - "@rollup/rollup-linux-arm64-musl": "4.62.5", - "@rollup/rollup-linux-loong64-gnu": "4.62.5", - "@rollup/rollup-linux-loong64-musl": "4.62.5", - "@rollup/rollup-linux-ppc64-gnu": "4.62.5", - "@rollup/rollup-linux-ppc64-musl": "4.62.5", - "@rollup/rollup-linux-riscv64-gnu": "4.62.5", - "@rollup/rollup-linux-riscv64-musl": "4.62.5", - "@rollup/rollup-linux-s390x-gnu": "4.62.5", - "@rollup/rollup-linux-x64-gnu": "4.62.5", - "@rollup/rollup-linux-x64-musl": "4.62.5", - "@rollup/rollup-openbsd-x64": "4.62.5", - "@rollup/rollup-openharmony-arm64": "4.62.5", - "@rollup/rollup-win32-arm64-msvc": "4.62.5", - "@rollup/rollup-win32-ia32-msvc": "4.62.5", - "@rollup/rollup-win32-x64-gnu": "4.62.5", - "@rollup/rollup-win32-x64-msvc": "4.62.5", - "fsevents": "~2.3.2" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true, + "license": "MIT" + }, + "node_modules/linkify-it": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.2.tgz", + "integrity": "sha512-ONTm2jCMAVZjgQa/Fy1kScXsuOoF5NPTsoFBdE1KVIZ2vAh/r9+Bqo+0jINCBYnavTPQZz38QzFTme79ENoN3Q==", "dev": true, "funding": [ { "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" + "url": "https://github.com/sponsors/puzrin" }, { - "type": "consulting", - "url": "https://feross.org/support" + "type": "github", + "url": "https://github.com/sponsors/markdown-it" } ], "license": "MIT", "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/serialize-javascript": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-7.0.5.tgz", - "integrity": "sha512-F4LcB0UqUl1zErq+1nYEEzSHJnIwb3AF2XWB94b+afhrekOUijwooAYqFyRbjYkm2PAKBabx6oYv/xDxNi8IBw==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=20.0.0" + "uc.micro": "^2.0.0" } }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, "dependencies": { - "shebang-regex": "^3.0.0" + "p-locate": "^5.0.0" }, "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/siginfo": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", - "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", + "node_modules/lodash.startcase": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.startcase/-/lodash.startcase-4.4.0.tgz", + "integrity": "sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==", "dev": true, - "license": "ISC" + "license": "MIT" }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "node_modules/loglevel": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.9.2.tgz", + "integrity": "sha512-HgMmCqIJSAKqo68l0rS2AanEWfkxaZ5wNiEFb5ggm08lDs9Xl2KxBlX3PTcaD2chBM1gXAYf491/M2Rv8Jwayg==", "dev": true, "license": "MIT", "engines": { - "node": ">=8" + "node": ">= 0.6.0" + }, + "funding": { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/loglevel" } }, - "node_modules/smob": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/smob/-/smob-1.5.0.tgz", - "integrity": "sha512-g6T+p7QO8npa+/hNx9ohv1E5pVCmWrVCUzUXJyLdMmftX6ER0oiWY/w9knEonLpnOp6b6FenKnMfR8gqwWdwig==", - "dev": true - }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "node_modules/longest-streak": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-2.0.4.tgz", + "integrity": "sha512-vM6rUVCVUJJt33bnmHiZEvr7wPT78ztX7rojL+LW51bHtLh6HTjx84LA5W4+oa6aKEJA7jJu5LR6vQRBpA5DVg==", "dev": true, - "engines": { - "node": ">=0.10.0" + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/source-map-js": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", - "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "node_modules/lunr": { + "version": "2.3.9", + "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", + "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } + "license": "MIT" }, - "node_modules/source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", "dev": true, + "license": "MIT", "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" + "@jridgewell/sourcemap-codec": "^1.5.5" } }, - "node_modules/spdx-correct": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", - "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", + "node_modules/map-obj": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz", + "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==", "dev": true, - "license": "Apache-2.0", - "dependencies": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/spdx-exceptions": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", - "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", - "dev": true, - "license": "CC-BY-3.0" - }, - "node_modules/spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "node_modules/markdown-it": { + "version": "14.3.0", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.3.0.tgz", + "integrity": "sha512-RCEsPjR+sr0x+AuYp601tKTkgFG4YEPLCzHST3cQ/fhlJkqAkz1L2/Qbp1j9qw5SBwQHFBoW8+hoN5xssOF0Tw==", "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/puzrin" + }, + { + "type": "github", + "url": "https://github.com/sponsors/markdown-it" + } + ], "license": "MIT", "dependencies": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" + "argparse": "^2.0.1", + "entities": "^4.5.0", + "linkify-it": "^5.0.2", + "mdurl": "^2.0.0", + "punycode.js": "^2.3.1", + "uc.micro": "^2.1.0" + }, + "bin": { + "markdown-it": "bin/markdown-it.mjs" } }, - "node_modules/spdx-license-ids": { - "version": "3.0.23", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.23.tgz", - "integrity": "sha512-CWLcCCH7VLu13TgOH+r8p1O/Znwhqv/dbb6lqWy67G+pT1kHmeD/+V36AVb/vq8QMIQwVShJ6Ssl5FPh0fuSdw==", - "dev": true, - "license": "CC0-1.0" - }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/stackback": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", - "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", - "dev": true, - "license": "MIT" - }, - "node_modules/std-env": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/std-env/-/std-env-4.2.0.tgz", - "integrity": "sha512-oCUKSupKTHX53EyjDtuZQ64pjLJ6yYCtpmEw0goYxtjG9KpbRe8KAsl2tBUGU9DyMcJ0RwJ8GqJAFzMXcXW1Rw==", + "node_modules/markdown-table": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-2.0.0.tgz", + "integrity": "sha512-Ezda85ToJUBhM6WGaG6veasyym+Tbs3cMAw/ZhOPqXiYsr0jgocBV3j3nx+4lk47plLlIqjwuTm/ywVI+zjJ/A==", "dev": true, - "license": "MIT" + "license": "MIT", + "dependencies": { + "repeat-string": "^1.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } }, - "node_modules/strip-indent": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", - "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", + "node_modules/mdast-util-find-and-replace": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/mdast-util-find-and-replace/-/mdast-util-find-and-replace-1.1.1.tgz", + "integrity": "sha512-9cKl33Y21lyckGzpSmEQnIDjEfeeWelN5s1kUW1LwdB0Fkuq2u+4GdqcGEygYxJE8GVqCl0741bYXHgamfWAZA==", "dev": true, "license": "MIT", "dependencies": { - "min-indent": "^1.0.0" + "escape-string-regexp": "^4.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" }, - "engines": { - "node": ">=8" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "node_modules/mdast-util-footnote": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/mdast-util-footnote/-/mdast-util-footnote-0.1.7.tgz", + "integrity": "sha512-QxNdO8qSxqbO2e3m09KwDKfWiLgqyCurdWTQ198NpbZ2hxntdc+VKS4fDJCmNWbAroUdYnSthu+XbZ8ovh8C3w==", "dev": true, - "engines": { - "node": ">=8" + "license": "MIT", + "dependencies": { + "mdast-util-to-markdown": "^0.6.0", + "micromark": "~2.11.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/structured-source": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/structured-source/-/structured-source-4.0.0.tgz", - "integrity": "sha512-qGzRFNJDjFieQkl/sVOI2dUjHKRyL9dAJi2gCPGJLbJHBIkyOHxjuocpIEfbLioX+qSJpvbYdT49/YCdMznKxA==", + "node_modules/mdast-util-from-markdown": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-0.8.5.tgz", + "integrity": "sha512-2hkTXtYYnr+NubD/g6KGBS/0mFmBcifAsI0yIWRiRo0PjVs6SSOSOdtzbp6kSGnShDN6G5aWZpKQ2lWRy27mWQ==", "dev": true, - "license": "BSD-2-Clause", + "license": "MIT", "dependencies": { - "boundary": "^2.0.0" + "@types/mdast": "^3.0.0", + "mdast-util-to-string": "^2.0.0", + "micromark": "~2.11.0", + "parse-entities": "^2.0.0", + "unist-util-stringify-position": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "node_modules/mdast-util-frontmatter": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/mdast-util-frontmatter/-/mdast-util-frontmatter-0.2.0.tgz", + "integrity": "sha512-FHKL4w4S5fdt1KjJCwB0178WJ0evnyyQr5kXTM3wrOVpytD0hrkvd+AOOjU9Td8onOejCkmZ+HQRT3CZ3coHHQ==", "dev": true, - "engines": { - "node": ">= 0.4" + "license": "MIT", + "dependencies": { + "micromark-extension-frontmatter": "^0.2.0" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/terser": { - "version": "5.31.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.31.0.tgz", - "integrity": "sha512-Q1JFAoUKE5IMfI4Z/lkE/E6+SwgzO+x4tq4v1AyBLRj8VSYvRO6A/rQrPg1yud4g0En9EKI1TvFRF2tQFcoUkg==", + "node_modules/mdast-util-gfm": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/mdast-util-gfm/-/mdast-util-gfm-0.1.2.tgz", + "integrity": "sha512-NNkhDx/qYcuOWB7xHUGWZYVXvjPFFd6afg6/e2g+SV4r9q5XUcCbV4Wfa3DLYIiD+xAEZc6K4MGaE/m0KDcPwQ==", "dev": true, + "license": "MIT", "dependencies": { - "@jridgewell/source-map": "^0.3.3", - "acorn": "^8.8.2", - "commander": "^2.20.0", - "source-map-support": "~0.5.20" - }, - "bin": { - "terser": "bin/terser" + "mdast-util-gfm-autolink-literal": "^0.1.0", + "mdast-util-gfm-strikethrough": "^0.2.0", + "mdast-util-gfm-table": "^0.1.0", + "mdast-util-gfm-task-list-item": "^0.1.0", + "mdast-util-to-markdown": "^0.6.1" }, - "engines": { - "node": ">=10" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/tinybench": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", - "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", + "node_modules/mdast-util-gfm-autolink-literal": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-autolink-literal/-/mdast-util-gfm-autolink-literal-0.1.3.tgz", + "integrity": "sha512-GjmLjWrXg1wqMIO9+ZsRik/s7PLwTaeCHVB7vRxUwLntZc8mzmTsLVr6HW1yLokcnhfURsn5zmSVdi3/xWWu1A==", "dev": true, - "license": "MIT" + "license": "MIT", + "dependencies": { + "ccount": "^1.0.0", + "mdast-util-find-and-replace": "^1.1.0", + "micromark": "^2.11.3" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } }, - "node_modules/tinyexec": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.3.0.tgz", - "integrity": "sha512-QKAl9m8gWWGHV8jZcPeym6j+XULi6tOf1mT83WYJ4Lk2ytW/uwAWkrP0uFsdoYMdueVJ0qs26wZ+23xeB4ibNQ==", + "node_modules/mdast-util-gfm-strikethrough": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-strikethrough/-/mdast-util-gfm-strikethrough-0.2.3.tgz", + "integrity": "sha512-5OQLXpt6qdbttcDG/UxYY7Yjj3e8P7X16LzvpX8pIQPYJ/C2Z1qFGMmcw+1PZMUM3Z8wt8NRfYTvCni93mgsgA==", "dev": true, "license": "MIT", - "engines": { - "node": ">=18" + "dependencies": { + "mdast-util-to-markdown": "^0.6.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/tinyglobby": { - "version": "0.2.17", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", - "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", + "node_modules/mdast-util-gfm-table": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-table/-/mdast-util-gfm-table-0.1.6.tgz", + "integrity": "sha512-j4yDxQ66AJSBwGkbpFEp9uG/LS1tZV3P33fN1gkyRB2LoRL+RR3f76m0HPHaby6F4Z5xr9Fv1URmATlRRUIpRQ==", "dev": true, "license": "MIT", "dependencies": { - "fdir": "^6.5.0", - "picomatch": "^4.0.4" - }, - "engines": { - "node": ">=12.0.0" + "markdown-table": "^2.0.0", + "mdast-util-to-markdown": "~0.6.0" }, "funding": { - "url": "https://github.com/sponsors/SuperchupuDev" + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/tinyglobby/node_modules/fdir": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", - "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "node_modules/mdast-util-gfm-task-list-item": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-task-list-item/-/mdast-util-gfm-task-list-item-0.1.6.tgz", + "integrity": "sha512-/d51FFIfPsSmCIRNp7E6pozM9z1GYPIkSy1urQ8s/o4TC22BZ7DqfHFWiqBD23bc7J3vV1Fc9O4QIHBlfuit8A==", "dev": true, "license": "MIT", - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "picomatch": "^3 || ^4" + "dependencies": { + "mdast-util-to-markdown": "~0.6.0" }, - "peerDependenciesMeta": { - "picomatch": { - "optional": true - } + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/tinyglobby/node_modules/picomatch": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", - "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", + "node_modules/mdast-util-to-markdown": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-0.6.5.tgz", + "integrity": "sha512-XeV9sDE7ZlOQvs45C9UKMtfTcctcaj/pGwH8YLbMHoMOXNNCn2LsqVQOqrF1+/NU8lKDAqozme9SCXWyo9oAcQ==", "dev": true, "license": "MIT", - "engines": { - "node": ">=12" + "dependencies": { + "@types/unist": "^2.0.0", + "longest-streak": "^2.0.0", + "mdast-util-to-string": "^2.0.0", + "parse-entities": "^2.0.0", + "repeat-string": "^1.0.0", + "zwitch": "^1.0.0" }, "funding": { - "url": "https://github.com/sponsors/jonschlinkert" + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/tinyrainbow": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-3.1.1.tgz", - "integrity": "sha512-yau8yJdTt989Mm0Bd/236QnzEiPf2xLLTqUZRUJOo/3CB078LSwzei343DgtJVmfJKJE3TMINY1u42SQsP6mXw==", + "node_modules/mdast-util-to-markdown/node_modules/@types/unist": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", + "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", + "dev": true, + "license": "MIT" + }, + "node_modules/mdast-util-to-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-2.0.0.tgz", + "integrity": "sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==", "dev": true, "license": "MIT", - "engines": { - "node": ">=14.0.0" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "node_modules/mdurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz", + "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==", + "dev": true + }, + "node_modules/meow": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-9.0.0.tgz", + "integrity": "sha512-+obSblOQmRhcyBt62furQqRAQpNyWXo8BuQ5bN7dG8wmwQ+vwHKp/rCFD4CrTP8CsDQD1sjoZ94K417XEUk8IQ==", "dev": true, "license": "MIT", "dependencies": { - "is-number": "^7.0.0" + "@types/minimist": "^1.2.0", + "camelcase-keys": "^6.2.2", + "decamelize": "^1.2.0", + "decamelize-keys": "^1.1.0", + "hard-rejection": "^2.1.0", + "minimist-options": "4.1.0", + "normalize-package-data": "^3.0.0", + "read-pkg-up": "^7.0.1", + "redent": "^3.0.0", + "trim-newlines": "^3.0.0", + "type-fest": "^0.18.0", + "yargs-parser": "^20.2.3" }, "engines": { - "node": ">=8.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/transform-markdown-links": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/transform-markdown-links/-/transform-markdown-links-2.1.0.tgz", - "integrity": "sha512-7HWQwQ9US+tJSMMzi1aP+KA3QwfjDs8sB4H5GBMRHFNBMQVdgoF6VfIFy2nJR/UHRTkYoGFwWh2pe+QIwSvfOA==", + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", "dev": true, "license": "MIT", "engines": { - "node": ">=4" - } - }, - "node_modules/trim-newlines": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz", - "integrity": "sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==", + "node": ">= 8" + } + }, + "node_modules/micromark": { + "version": "2.11.4", + "resolved": "https://registry.npmjs.org/micromark/-/micromark-2.11.4.tgz", + "integrity": "sha512-+WoovN/ppKolQOFIAajxi7Lu9kInbPxFuTBVEavFcL8eAfVstoc5MocPmqBeAdBOJV00uaVjegzH4+MA0DN/uA==", "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], "license": "MIT", - "engines": { - "node": ">=8" + "dependencies": { + "debug": "^4.0.0", + "parse-entities": "^2.0.0" } }, - "node_modules/trough": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/trough/-/trough-1.0.5.tgz", - "integrity": "sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA==", + "node_modules/micromark-extension-footnote": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/micromark-extension-footnote/-/micromark-extension-footnote-0.3.2.tgz", + "integrity": "sha512-gr/BeIxbIWQoUm02cIfK7mdMZ/fbroRpLsck4kvFtjbzP4yi+OPVbnukTc/zy0i7spC2xYE/dbX1Sur8BEDJsQ==", "dev": true, "license": "MIT", + "dependencies": { + "micromark": "~2.11.0" + }, "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/ts-api-utils": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.5.0.tgz", - "integrity": "sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==", + "node_modules/micromark-extension-frontmatter": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/micromark-extension-frontmatter/-/micromark-extension-frontmatter-0.2.2.tgz", + "integrity": "sha512-q6nPLFCMTLtfsctAuS0Xh4vaolxSFUWUWR6PZSrXXiRy+SANGllpcqdXFv2z07l0Xz/6Hl40hK0ffNCJPH2n1A==", "dev": true, "license": "MIT", - "engines": { - "node": ">=18.12" + "dependencies": { + "fault": "^1.0.0" }, - "peerDependencies": { - "typescript": ">=4.8.4" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "node_modules/micromark-extension-gfm": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm/-/micromark-extension-gfm-0.3.3.tgz", + "integrity": "sha512-oVN4zv5/tAIA+l3GbMi7lWeYpJ14oQyJ3uEim20ktYFAcfX1x3LNlFGGlmrZHt7u9YlKExmyJdDGaTt6cMSR/A==", "dev": true, + "license": "MIT", "dependencies": { - "prelude-ls": "^1.2.1" + "micromark": "~2.11.0", + "micromark-extension-gfm-autolink-literal": "~0.5.0", + "micromark-extension-gfm-strikethrough": "~0.6.5", + "micromark-extension-gfm-table": "~0.4.0", + "micromark-extension-gfm-tagfilter": "~0.3.0", + "micromark-extension-gfm-task-list-item": "~0.3.0" }, - "engines": { - "node": ">= 0.8.0" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/type-fest": { - "version": "0.18.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz", - "integrity": "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==", + "node_modules/micromark-extension-gfm-autolink-literal": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-autolink-literal/-/micromark-extension-gfm-autolink-literal-0.5.7.tgz", + "integrity": "sha512-ePiDGH0/lhcngCe8FtH4ARFoxKTUelMp4L7Gg2pujYD5CSMb9PbblnyL+AAMud/SNMyusbS2XDSiPIRcQoNFAw==", "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" + "license": "MIT", + "dependencies": { + "micromark": "~2.11.3" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/typedoc": { - "version": "0.28.20", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.28.20.tgz", - "integrity": "sha512-uSKqkh8Cr48vllnEy+jdaAgOeR6Y+QCBW7usgUsKj7gJEfR7stw9U/fE49LBnj2tPRKPY0c0EBJSWe9Appmplg==", + "node_modules/micromark-extension-gfm-strikethrough": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-strikethrough/-/micromark-extension-gfm-strikethrough-0.6.5.tgz", + "integrity": "sha512-PpOKlgokpQRwUesRwWEp+fHjGGkZEejj83k9gU5iXCbDG+XBA92BqnRKYJdfqfkrRcZRgGuPuXb7DaK/DmxOhw==", "dev": true, - "license": "Apache-2.0", + "license": "MIT", "dependencies": { - "@gerrit0/mini-shiki": "^3.23.0", - "lunr": "^2.3.9", - "markdown-it": "^14.3.0", - "minimatch": "^10.2.5", - "yaml": "^2.9.0" - }, - "bin": { - "typedoc": "bin/typedoc" - }, - "engines": { - "node": ">= 18", - "pnpm": ">= 10" + "micromark": "~2.11.0" }, - "peerDependencies": { - "typescript": "5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x || 5.9.x || 6.0.x" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/typedoc-plugin-markdown": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/typedoc-plugin-markdown/-/typedoc-plugin-markdown-4.12.0.tgz", - "integrity": "sha512-eJDEMAfxCmede22c/Jw7d0FA13ggAQv+KkwQYKYCdqI02cin6Rc9QRwbG/7XvvHWinuFejySnZVUWDtvGk3Vbg==", + "node_modules/micromark-extension-gfm-table": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-table/-/micromark-extension-gfm-table-0.4.3.tgz", + "integrity": "sha512-hVGvESPq0fk6ALWtomcwmgLvH8ZSVpcPjzi0AjPclB9FsVRgMtGZkUcpE0zgjOCFAznKepF4z3hX8z6e3HODdA==", "dev": true, "license": "MIT", - "engines": { - "node": ">= 18" + "dependencies": { + "micromark": "~2.11.0" }, - "peerDependencies": { - "typedoc": "0.28.x" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/typedoc/node_modules/balanced-match": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", - "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "node_modules/micromark-extension-gfm-tagfilter": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-tagfilter/-/micromark-extension-gfm-tagfilter-0.3.0.tgz", + "integrity": "sha512-9GU0xBatryXifL//FJH+tAZ6i240xQuFrSL7mYi8f4oZSbc+NvXjkrHemeYP0+L4ZUT+Ptz3b95zhUZnMtoi/Q==", "dev": true, "license": "MIT", - "engines": { - "node": "18 || 20 || >=22" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/typedoc/node_modules/brace-expansion": { - "version": "5.0.9", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz", - "integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==", + "node_modules/micromark-extension-gfm-task-list-item": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-task-list-item/-/micromark-extension-gfm-task-list-item-0.3.3.tgz", + "integrity": "sha512-0zvM5iSLKrc/NQl84pZSjGo66aTGd57C1idmlWmE87lkMcXrTxg1uXa/nXomxJytoje9trP0NDLvw4bZ/Z/XCQ==", "dev": true, "license": "MIT", "dependencies": { - "balanced-match": "^4.0.2" + "micromark": "~2.11.0" }, - "engines": { - "node": "20 || >=22" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/typedoc/node_modules/minimatch": { - "version": "10.2.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz", - "integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==", + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, - "license": "BlueOak-1.0.0", + "license": "MIT", "dependencies": { - "brace-expansion": "^5.0.5" + "braces": "^3.0.3", + "picomatch": "^2.3.1" }, "engines": { - "node": "18 || 20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "node": ">=8.6" } }, - "node_modules/typescript": { - "version": "5.9.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", - "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "node_modules/min-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, + "license": "MIT", "engines": { - "node": ">=14.17" + "node": ">=4" } }, - "node_modules/typescript-eslint": { - "version": "8.68.0", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.68.0.tgz", - "integrity": "sha512-MHy0Y0ynqeEbx/S45+i/bBssdy3X6KNBfmJAP35GrgtNxu2TQ5K5xsFDhAnmsq1jvpdoZOPG1LGtJo0HWqYCrQ==", + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minimist-options": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz", + "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/eslint-plugin": "8.68.0", - "@typescript-eslint/parser": "8.68.0", - "@typescript-eslint/typescript-estree": "8.68.0", - "@typescript-eslint/utils": "8.68.0" + "arrify": "^1.0.1", + "is-plain-obj": "^1.1.0", + "kind-of": "^6.0.3" }, "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.1.0" + "node": ">= 6" } }, - "node_modules/uc.micro": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz", - "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==", + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true, "license": "MIT" }, - "node_modules/underscore": { - "version": "1.13.8", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.8.tgz", - "integrity": "sha512-DXtD3ZtEQzc7M8m4cXotyHR+FAS18C64asBYY5vqZexfYryNNnDc02W4hKg3rdQuqOYas1jkseX0+nZXjTXnvQ==", + "node_modules/nanoid": { + "version": "3.3.18", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.18.tgz", + "integrity": "sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w==", "dev": true, - "license": "MIT" + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } }, - "node_modules/undici-types": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.3.0.tgz", - "integrity": "sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ==", - "dev": true, - "license": "MIT" + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true }, - "node_modules/unicode-canonical-property-names-ecmascript": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.1.tgz", - "integrity": "sha512-dA8WbNeb2a6oQzAQ55YlT5vQAWGV9WXOsi3SskE3bcCdM0P4SDd+24zS/OCacdRq5BkdsRj9q3Pg6YyQoxIGqg==", + "node_modules/neotraverse": { + "version": "0.6.18", + "resolved": "https://registry.npmjs.org/neotraverse/-/neotraverse-0.6.18.tgz", + "integrity": "sha512-Z4SmBUweYa09+o6pG+eASabEpP6QkQ70yHj351pQoEXIs8uHbaU2DWVmzBANKgflPa47A50PtB2+NgRpQvr7vA==", "dev": true, "license": "MIT", "engines": { - "node": ">=4" + "node": ">= 10" } }, - "node_modules/unicode-match-property-ecmascript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", - "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", + "node_modules/normalize-package-data": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz", + "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==", "dev": true, - "license": "MIT", + "license": "BSD-2-Clause", "dependencies": { - "unicode-canonical-property-names-ecmascript": "^2.0.0", - "unicode-property-aliases-ecmascript": "^2.0.0" + "hosted-git-info": "^4.0.1", + "is-core-module": "^2.5.0", + "semver": "^7.3.4", + "validate-npm-package-license": "^3.0.1" }, "engines": { - "node": ">=4" + "node": ">=10" } }, - "node_modules/unicode-match-property-value-ecmascript": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.2.1.tgz", - "integrity": "sha512-JQ84qTuMg4nVkx8ga4A16a1epI9H6uTXAknqxkGF/aFfRLw1xC/Bp24HNLaZhHSkWd3+84t8iXnp1J0kYcZHhg==", + "node_modules/normalize-package-data/node_modules/semver": { + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", "dev": true, - "license": "MIT", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, "engines": { - "node": ">=4" + "node": ">=10" } }, - "node_modules/unicode-property-aliases-ecmascript": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.2.0.tgz", - "integrity": "sha512-hpbDzxUY9BFwX+UeBnxv3Sh1q7HFxj48DTmXchNgRa46lO8uj3/1iEn3MiNUYTg1g9ctIqXCCERn8gYZhHC5lQ==", + "node_modules/obug": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/obug/-/obug-2.1.4.tgz", + "integrity": "sha512-4a+OsYv9UktOJKE+l1A4OufDgdRF9PifWj+tJnHURo/P+WOxpG4GzUFL9qCalmWauao6ogiG+QvnCovwPoyAWA==", "dev": true, + "funding": [ + "https://github.com/sponsors/sxzz", + "https://opencollective.com/debug" + ], "license": "MIT", "engines": { - "node": ">=4" + "node": ">=12.20.0" } }, - "node_modules/unified": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/unified/-/unified-9.2.2.tgz", - "integrity": "sha512-Sg7j110mtefBD+qunSLO1lqOEKdrwBFBrR6Qd8f4uwkhWNlbkaqwHse6e7QvD3AP/MNoJdEDLaf8OxYyoWgorQ==", + "node_modules/optionator": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", "dev": true, - "license": "MIT", "dependencies": { - "bail": "^1.0.0", - "extend": "^3.0.0", - "is-buffer": "^2.0.0", - "is-plain-obj": "^2.0.0", - "trough": "^1.0.0", - "vfile": "^4.0.0" + "@aashutoshrathi/word-wrap": "^1.2.3", + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" + "engines": { + "node": ">= 0.8.0" } }, - "node_modules/unified/node_modules/is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, "engines": { - "node": ">=8" + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/unist-util-is": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.1.0.tgz", - "integrity": "sha512-ZOQSsnce92GrxSqlnEEseX0gi7GH9zTJZ0p9dtu87WRb/37mMPO2Ilx1s/t9vBHrFhbgweUwb+t7cIn5dxPhZg==", + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, - "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/unist-util-stringify-position": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz", - "integrity": "sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==", + "node_modules/p-locate/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, - "license": "MIT", "dependencies": { - "@types/unist": "^2.0.2" + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/unist-util-stringify-position/node_modules/@types/unist": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", - "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true, - "license": "MIT" + "license": "MIT", + "engines": { + "node": ">=6" + } }, - "node_modules/unist-util-visit-parents": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.1.1.tgz", - "integrity": "sha512-1KROIZWo6bcMrZEwiH2UrXDyalAa0uqzWCxCJj6lPOvTve2WkfgCytoDTPaMnodXh1WrXOq0haVYHj99ynJlsg==", + "node_modules/parse-entities": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz", + "integrity": "sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==", "dev": true, "license": "MIT", "dependencies": { - "@types/unist": "^2.0.0", - "unist-util-is": "^4.0.0" + "character-entities": "^1.0.0", + "character-entities-legacy": "^1.0.0", + "character-reference-invalid": "^1.0.0", + "is-alphanumerical": "^1.0.0", + "is-decimal": "^1.0.0", + "is-hexadecimal": "^1.0.0" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" + "type": "github", + "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/unist-util-visit-parents/node_modules/@types/unist": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", - "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", - "dev": true, - "license": "MIT" - }, - "node_modules/update-browserslist-db": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz", - "integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==", + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], "license": "MIT", "dependencies": { - "escalade": "^3.2.0", - "picocolors": "^1.1.1" + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" }, - "bin": { - "update-browserslist-db": "cli.js" + "engines": { + "node": ">=8" }, - "peerDependencies": { - "browserslist": ">= 4.21.0" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" + "license": "MIT", + "engines": { + "node": ">=8" } }, - "node_modules/validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, - "license": "Apache-2.0", - "dependencies": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" + "engines": { + "node": ">=8" } }, - "node_modules/vfile": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/vfile/-/vfile-4.2.1.tgz", - "integrity": "sha512-O6AE4OskCG5S1emQ/4gl8zK586RqA3srz3nfK/Viy0UPToBc5Trp9BVFb1u0CjsKrAWwnpr4ifM/KBXPWwJbCA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/unist": "^2.0.0", - "is-buffer": "^2.0.0", - "unist-util-stringify-position": "^2.0.0", - "vfile-message": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true }, - "node_modules/vfile-message": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-2.0.4.tgz", - "integrity": "sha512-DjssxRGkMvifUOJre00juHoP9DPWuzjxKuMDrhNbk2TdaYYBNMStsNhEOt3idrtI12VQYM/1+iM0KOzXi4pxwQ==", + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", "dev": true, "license": "MIT", - "dependencies": { - "@types/unist": "^2.0.0", - "unist-util-stringify-position": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" + "engines": { + "node": ">=8" } }, - "node_modules/vfile-message/node_modules/@types/unist": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", - "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", + "node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", "dev": true, "license": "MIT" }, - "node_modules/vfile/node_modules/@types/unist": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", - "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", - "dev": true, - "license": "MIT" + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true }, - "node_modules/vite": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/vite/-/vite-8.2.2.tgz", - "integrity": "sha512-cFKLV/PRgAUlIRm5WjMjJ86jrftzpqcgH+Us+DS8mI3CDNiH30Whrz8uHL3+MOLPAgqbMBAqWdAHAphOAM+z/Q==", + "node_modules/picomatch": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", "dev": true, "license": "MIT", - "dependencies": { - "lightningcss": "^1.33.0", - "picomatch": "^4.0.5", - "postcss": "^8.5.26", - "rolldown": "~1.2.4", - "tinyglobby": "^0.2.17" - }, - "bin": { - "vite": "bin/vite.js" - }, "engines": { - "node": "^20.19.0 || >=22.12.0" + "node": ">=8.6" }, "funding": { - "url": "https://github.com/vitejs/vite?sponsor=1" - }, - "optionalDependencies": { - "fsevents": "~2.3.3" - }, - "peerDependencies": { - "@types/node": "^20.19.0 || >=22.12.0", - "@vitejs/devtools": "^0.4.0 || ^0.5.0", - "esbuild": "^0.27.0 || ^0.28.0", - "jiti": ">=1.21.0", - "less": "^4.0.0", - "sass": "^1.70.0", - "sass-embedded": "^1.70.0", - "stylus": ">=0.54.8", - "sugarss": "^5.0.0", - "terser": "^5.16.0", - "tsx": "^4.8.1", - "yaml": "^2.4.2" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "@vitejs/devtools": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "jiti": { - "optional": true - }, - "less": { - "optional": true - }, - "sass": { - "optional": true - }, - "sass-embedded": { - "optional": true - }, - "stylus": { - "optional": true - }, - "sugarss": { - "optional": true - }, - "terser": { - "optional": true + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postcss": { + "version": "8.5.26", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.26.tgz", + "integrity": "sha512-u82N74LFzG8ca+dD8puPnplTXoGH4fTPpVGuIbt36G3qvNlkvfD0lEAZSxaly3KX8TS/L1A1gsCEmvKmBcVbkQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" }, - "tsx": { - "optional": true + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" }, - "yaml": { - "optional": true + { + "type": "github", + "url": "https://github.com/sponsors/ai" } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.17", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" } }, - "node_modules/vite/node_modules/picomatch": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", - "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true, - "license": "MIT", "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" + "node": ">= 0.8.0" } }, - "node_modules/vitest": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.1.11.tgz", - "integrity": "sha512-fhACrNXUidIbGSBr5FlbuBkO7VWC1ZyLl0DO4CU2DrQoAPxX84Ysxs+HeGQpii5lZWV1Q4gBZTTu49mF+A6Edw==", + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true, "license": "MIT", - "dependencies": { - "@vitest/expect": "4.1.11", - "@vitest/mocker": "4.1.11", - "@vitest/pretty-format": "4.1.11", - "@vitest/runner": "4.1.11", - "@vitest/snapshot": "4.1.11", - "@vitest/spy": "4.1.11", - "@vitest/utils": "4.1.11", - "es-module-lexer": "^2.0.0", - "expect-type": "^1.3.0", - "magic-string": "^0.30.21", - "obug": "^2.1.1", - "pathe": "^2.0.3", - "picomatch": "^4.0.3", - "std-env": "^4.0.0-rc.1", - "tinybench": "^2.9.0", - "tinyexec": "^1.0.2", - "tinyglobby": "^0.2.15", - "tinyrainbow": "^3.1.0", - "vite": "^6.0.0 || ^7.0.0 || ^8.0.0", - "why-is-node-running": "^2.3.0" - }, - "bin": { - "vitest": "vitest.mjs" - }, "engines": { - "node": "^20.0.0 || ^22.0.0 || >=24.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - }, - "peerDependencies": { - "@edge-runtime/vm": "*", - "@opentelemetry/api": "^1.9.0", - "@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0", - "@vitest/browser-playwright": "4.1.11", - "@vitest/browser-preview": "4.1.11", - "@vitest/browser-webdriverio": "4.1.11", - "@vitest/coverage-istanbul": "4.1.11", - "@vitest/coverage-v8": "4.1.11", - "@vitest/ui": "4.1.11", - "happy-dom": "*", - "jsdom": "*", - "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "@edge-runtime/vm": { - "optional": true - }, - "@opentelemetry/api": { - "optional": true - }, - "@types/node": { - "optional": true - }, - "@vitest/browser-playwright": { - "optional": true - }, - "@vitest/browser-preview": { - "optional": true - }, - "@vitest/browser-webdriverio": { - "optional": true - }, - "@vitest/coverage-istanbul": { - "optional": true - }, - "@vitest/coverage-v8": { - "optional": true - }, - "@vitest/ui": { - "optional": true + "node": ">=6" + } + }, + "node_modules/punycode.js": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode.js/-/punycode.js-2.3.1.tgz", + "integrity": "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/quansync": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/quansync/-/quansync-1.0.0.tgz", + "integrity": "sha512-5xZacEEufv3HSTPQuchrvV6soaiACMFnq1H8wkVioctoH3TRha9Sz66lOxRwPK/qZj7HPiSveih9yAyh98gvqA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/antfu" }, - "happy-dom": { - "optional": true + { + "type": "individual", + "url": "https://github.com/sponsors/sxzz" + } + ], + "license": "MIT" + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" }, - "jsdom": { - "optional": true + { + "type": "patreon", + "url": "https://www.patreon.com/feross" }, - "vite": { - "optional": false + { + "type": "consulting", + "url": "https://feross.org/support" } + ], + "license": "MIT" + }, + "node_modules/quick-lru": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", + "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" } }, - "node_modules/vitest/node_modules/picomatch": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", - "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", + "node_modules/read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", "dev": true, "license": "MIT", + "dependencies": { + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + }, "engines": { - "node": ">=12" + "node": ">=8" }, "funding": { - "url": "https://github.com/sponsors/jonschlinkert" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "node_modules/read-pkg-up/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, + "license": "MIT", "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" }, "engines": { - "node": ">= 8" + "node": ">=8" } }, - "node_modules/why-is-node-running": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", - "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", + "node_modules/read-pkg-up/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, "license": "MIT", "dependencies": { - "siginfo": "^2.0.0", - "stackback": "0.0.2" - }, - "bin": { - "why-is-node-running": "cli.js" + "p-locate": "^4.1.0" }, "engines": { "node": ">=8" } }, - "node_modules/workerpool": { - "version": "9.3.4", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-9.3.4.tgz", - "integrity": "sha512-TmPRQYYSAnnDiEB0P/Ytip7bFGvqnSU6I2BcuSw7Hx+JSg/DsUi5ebYfc8GYaSdpuvOcEs6dXxPurOYpe9QFwg==", + "node_modules/read-pkg-up/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, - "license": "Apache-2.0" + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } }, - "node_modules/xmlcreate": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.4.tgz", - "integrity": "sha512-nquOebG4sngPmGPICTS5EnxqhKbCmz5Ox5hsszI2T6U5qdrJizBc+0ilYSEjTSzU0yZcmvppztXe/5Al5fUwdg==", - "dev": true + "node_modules/read-pkg-up/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=8" + } }, - "node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "node_modules/read-pkg/node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", "dev": true, "license": "ISC" }, - "node_modules/yaml": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.9.0.tgz", - "integrity": "sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA==", + "node_modules/read-pkg/node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", "dev": true, - "license": "ISC", - "bin": { - "yaml": "bin.mjs" - }, - "engines": { - "node": ">= 14.6" - }, - "funding": { - "url": "https://github.com/sponsors/eemeli" + "license": "BSD-2-Clause", + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" } }, - "node_modules/yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "node_modules/read-pkg/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, "license": "ISC", - "engines": { - "node": ">=10" + "bin": { + "semver": "bin/semver" } }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "node_modules/read-pkg/node_modules/type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", "dev": true, + "license": "(MIT OR CC0-1.0)", "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=8" } }, - "node_modules/zwitch": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-1.0.5.tgz", - "integrity": "sha512-V50KMwwzqJV0NpZIZFwfOD5/lyny3WlSzRiXgA0G7VUnRlqttta1L6UQIHzd6EuBY/cHGfwTIck7w1yH6Q5zUw==", + "node_modules/redent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", + "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", "dev": true, "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" + "dependencies": { + "indent-string": "^4.0.0", + "strip-indent": "^3.0.0" + }, + "engines": { + "node": ">=8" } - } - }, - "dependencies": { - "@aashutoshrathi/word-wrap": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", - "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", - "dev": true }, - "@babel/code-frame": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.7.tgz", - "integrity": "sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==", + "node_modules/remark-footnotes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/remark-footnotes/-/remark-footnotes-3.0.0.tgz", + "integrity": "sha512-ZssAvH9FjGYlJ/PBVKdSmfyPc3Cz4rTWgZLI4iE/SX8Nt5l3o3oEjv3wwG5VD7xOjktzdwp5coac+kJV9l4jgg==", "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.29.7", - "js-tokens": "^4.0.0", - "picocolors": "^1.1.1" - } - }, - "@babel/compat-data": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.7.tgz", - "integrity": "sha512-locTkQyKvwIEgBzVrn8693ebc97F2U8ZHjbXwDXJ5Fn2TCpNwTlKcaKLkdHop5c/icOFE7qt7Q9JC5hnKNa6Gg==", - "dev": true - }, - "@babel/core": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.7.tgz", - "integrity": "sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.29.7", - "@babel/generator": "^7.29.7", - "@babel/helper-compilation-targets": "^7.29.7", - "@babel/helper-module-transforms": "^7.29.7", - "@babel/helpers": "^7.29.7", - "@babel/parser": "^7.29.7", - "@babel/template": "^7.29.7", - "@babel/traverse": "^7.29.7", - "@babel/types": "^7.29.7", - "@jridgewell/remapping": "^2.3.5", - "convert-source-map": "^2.0.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.3", - "semver": "^6.3.1" + "license": "MIT", + "dependencies": { + "mdast-util-footnote": "^0.1.0", + "micromark-extension-footnote": "^0.3.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "@babel/generator": { - "version": "7.29.8", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.8.tgz", - "integrity": "sha512-gZbepsdh3WDtgZKWL+vTPh71LSBrm/Y4/QDZBVCcYfmeTEEuoOYwlSy+G1StfJg+/Zy550u/3TATbm7qDbbMtg==", + "node_modules/remark-frontmatter": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/remark-frontmatter/-/remark-frontmatter-3.0.0.tgz", + "integrity": "sha512-mSuDd3svCHs+2PyO29h7iijIZx4plX0fheacJcAoYAASfgzgVIcXGYSq9GFyYocFLftQs8IOmmkgtOovs6d4oA==", "dev": true, - "requires": { - "@babel/parser": "^7.29.8", - "@babel/types": "^7.29.8", - "@jridgewell/gen-mapping": "^0.3.12", - "@jridgewell/trace-mapping": "^0.3.28", - "jsesc": "^3.0.2" + "license": "MIT", + "dependencies": { + "mdast-util-frontmatter": "^0.2.0", + "micromark-extension-frontmatter": "^0.2.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "@babel/helper-annotate-as-pure": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.29.7.tgz", - "integrity": "sha512-OoK6239jHPuSQOoS0kfTVKn0b/rVTk0seKq4Gd2UMLtmOVLjDC0ki3e+c90Trqv2gMfvJFqkiljrr568+qddiw==", + "node_modules/remark-gfm": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/remark-gfm/-/remark-gfm-1.0.0.tgz", + "integrity": "sha512-KfexHJCiqvrdBZVbQ6RopMZGwaXz6wFJEfByIuEwGf0arvITHjiKKZ1dpXujjH9KZdm1//XJQwgfnJ3lmXaDPA==", "dev": true, - "requires": { - "@babel/types": "^7.29.7" + "license": "MIT", + "dependencies": { + "mdast-util-gfm": "^0.1.0", + "micromark-extension-gfm": "^0.3.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "@babel/helper-compilation-targets": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.29.7.tgz", - "integrity": "sha512-wem6WaBj4NaVYVdNhLPPVacES6ZJ+KBBfSkTMD3YZxbP3rm3Di85tJU5ljaUNhaOynt+Aj0xruhYuzQBt8n71g==", + "node_modules/remark-parse": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-9.0.0.tgz", + "integrity": "sha512-geKatMwSzEXKHuzBNU1z676sGcDcFoChMK38TgdHJNAYfFtsfHDQG7MoJAjs6sgYMqyLduCYWDIWZIxiPeafEw==", "dev": true, - "requires": { - "@babel/compat-data": "^7.29.7", - "@babel/helper-validator-option": "^7.29.7", - "browserslist": "^4.24.0", - "lru-cache": "^5.1.1", - "semver": "^6.3.1" + "license": "MIT", + "dependencies": { + "mdast-util-from-markdown": "^0.8.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "@babel/helper-create-class-features-plugin": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.29.7.tgz", - "integrity": "sha512-IY3ZD9Tmooqr3TUhc3DUWxiuo8xx1DWLhd5M7hQ+ZWJamqM2BbalrBJb2MisSLoYorOj75U03qULCxQTY9r3hg==", + "node_modules/remove-markdown": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/remove-markdown/-/remove-markdown-0.6.4.tgz", + "integrity": "sha512-BompiLClzjfh46irZmzv+1Q61jZYlKN3iq/hzae9EOUwf7ctr/5wpD4qwgn/FWDAYE18RORO7z/yr+HXZJCY8Q==", "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.29.7", - "@babel/helper-member-expression-to-functions": "^7.29.7", - "@babel/helper-optimise-call-expression": "^7.29.7", - "@babel/helper-replace-supers": "^7.29.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.29.7", - "@babel/traverse": "^7.29.7", - "semver": "^6.3.1" - } + "license": "MIT" }, - "@babel/helper-create-regexp-features-plugin": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.29.7.tgz", - "integrity": "sha512-907Uymvqgg1dwUA+7IGwFAOSYzQOuzPXKNJ1yxzwPffzkYFg2q2eHi1fIOs6sXkG9NbIUMunnUlkYsfRFNvomg==", + "node_modules/repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.29.7", - "regexpu-core": "^6.3.1", - "semver": "^6.3.1" + "license": "MIT", + "engines": { + "node": ">=0.10" } }, - "@babel/helper-define-polyfill-provider": { - "version": "0.6.6", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.6.tgz", - "integrity": "sha512-mOAsxeeKkUKayvZR3HeTYD/fICpCPLJrU5ZjelT/PA6WHtNDBOE436YiaEUvHN454bRM3CebhDsIpieCc4texA==", + "node_modules/resolve": { + "version": "1.22.11", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.11.tgz", + "integrity": "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==", "dev": true, - "requires": { - "@babel/helper-compilation-targets": "^7.28.6", - "@babel/helper-plugin-utils": "^7.28.6", - "debug": "^4.4.3", - "lodash.debounce": "^4.0.8", - "resolve": "^1.22.11" + "license": "MIT", + "dependencies": { + "is-core-module": "^2.16.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "@babel/helper-globals": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.29.7.tgz", - "integrity": "sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA==", - "dev": true - }, - "@babel/helper-member-expression-to-functions": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.29.7.tgz", - "integrity": "sha512-j+7JYmk1JYDtACIGj0QJqqWZjoUpMoEikQGADMaHgCMCSDqd2+P32rfcibUNrGOMWrlzK1WJBdxrB3JJQZwWtg==", + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", "dev": true, - "requires": { - "@babel/traverse": "^7.29.7", - "@babel/types": "^7.29.7" + "license": "MIT", + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" } }, - "@babel/helper-module-imports": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.29.7.tgz", - "integrity": "sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g==", + "node_modules/reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", "dev": true, - "requires": { - "@babel/traverse": "^7.29.7", - "@babel/types": "^7.29.7" + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" } }, - "@babel/helper-module-transforms": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.29.7.tgz", - "integrity": "sha512-UPUVSyXbOh627KiCIGQSgwWzGeBKLkaJ9PJEdrngIwMSzxLR4jS4+f1f1jb7VzBbg8nFLaYotvVPFCTqdrmTAg==", + "node_modules/rolldown": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.5.tgz", + "integrity": "sha512-VD2IE5PUG4Oj8zz2VGykiYd5wbnjdIiSsNQb8Qu5B+noEp+A78mu2iVvpp27g8es14Tk9rofNs5Tku9iQCS4fA==", "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.29.7", - "@babel/helper-validator-identifier": "^7.29.7", - "@babel/traverse": "^7.29.7" + "license": "MIT", + "dependencies": { + "@oxc-project/types": "=0.146.0", + "@rolldown/pluginutils": "^1.0.0" + }, + "bin": { + "rolldown": "bin/cli.mjs" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "optionalDependencies": { + "@rolldown/binding-android-arm-eabi": "1.2.5", + "@rolldown/binding-android-arm64": "1.2.5", + "@rolldown/binding-darwin-arm64": "1.2.5", + "@rolldown/binding-darwin-x64": "1.2.5", + "@rolldown/binding-freebsd-x64": "1.2.5", + "@rolldown/binding-linux-arm-gnueabihf": "1.2.5", + "@rolldown/binding-linux-arm64-gnu": "1.2.5", + "@rolldown/binding-linux-arm64-musl": "1.2.5", + "@rolldown/binding-linux-ppc64-gnu": "1.2.5", + "@rolldown/binding-linux-s390x-gnu": "1.2.5", + "@rolldown/binding-linux-x64-gnu": "1.2.5", + "@rolldown/binding-linux-x64-musl": "1.2.5", + "@rolldown/binding-openharmony-arm64": "1.2.5", + "@rolldown/binding-win32-arm64-msvc": "1.2.5", + "@rolldown/binding-win32-x64-msvc": "1.2.5" } }, - "@babel/helper-optimise-call-expression": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.29.7.tgz", - "integrity": "sha512-+kmGVjcT9RGYzoDwdwEqEvGgKe3BYq+O1iGzjFubaNgZHwYHP6lsF2Yghf4kEuv9BV7tYDZ913aBW9am6YKong==", + "node_modules/rolldown-plugin-dts": { + "version": "0.27.14", + "resolved": "https://registry.npmjs.org/rolldown-plugin-dts/-/rolldown-plugin-dts-0.27.14.tgz", + "integrity": "sha512-ZvuDDwoIpRK9RPxDXratCpklFO9QZZWndf/sd0VBFb4LEj0jj07UcHK9OCh7V4XiFz2Z89ziyBC2K6tJiDjrbw==", "dev": true, - "requires": { - "@babel/types": "^7.29.7" + "license": "MIT", + "dependencies": { + "dts-resolver": "^3.0.0", + "get-tsconfig": "5.0.0-beta.5", + "obug": "^2.1.4", + "yuku-ast": "^0.8.0", + "yuku-codegen": "^0.8.0", + "yuku-parser": "^0.8.0" + }, + "engines": { + "node": "^22.18.0 || >=24.11.0" + }, + "funding": { + "url": "https://github.com/sponsors/sxzz" + }, + "peerDependencies": { + "@typescript/native-preview": "*", + "@volar/typescript": "~2.4.0", + "rolldown": "^1.0.0", + "typescript": "^5.0.0 || ^6.0.0 || ~7.0.0", + "vue-tsc": "~3.2.0 || ~3.3.0" + }, + "peerDependenciesMeta": { + "@typescript/native-preview": { + "optional": true + }, + "@volar/typescript": { + "optional": true + }, + "typescript": { + "optional": true + }, + "vue-tsc": { + "optional": true + } } }, - "@babel/helper-plugin-utils": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.29.7.tgz", - "integrity": "sha512-G7sHYigPY17oO5SYWnfD/0MTBwVR781S/JI643e/JhUYgVgWE/61SoW3NH9KWUKyKq5LVh3npif99Wkt6j86Jw==", - "dev": true - }, - "@babel/helper-remap-async-to-generator": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.29.7.tgz", - "integrity": "sha512-16AMiW26DbXWBbr3B8wNozKM0ydMLB892vaOaJW/fPJdnT8vJk5sdkQcU/isqUxyCE0cEoa8wZOcbgDuC4b6Og==", + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.29.7", - "@babel/helper-wrap-function": "^7.29.7", - "@babel/traverse": "^7.29.7" + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" } }, - "@babel/helper-replace-supers": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.29.7.tgz", - "integrity": "sha512-atfGXWSeCiF4DnKZIfmJfQRkSw9b9gNNXR1kqKjbhG4pGYCOnkp8OcTB8E3NXjBu8NpheSnOeNKz8KT7UNFTmQ==", + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, - "requires": { - "@babel/helper-member-expression-to-functions": "^7.29.7", - "@babel/helper-optimise-call-expression": "^7.29.7", - "@babel/traverse": "^7.29.7" + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" } }, - "@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.29.7.tgz", - "integrity": "sha512-brcMGQaVzIeUb+6/bs1Av0f8YuNNjKY2JyvfRCsFuFsdKccEQ5Ges2y74D74NZ1Rz8lKJ9ksJkfqwQFJ/iNEyQ==", + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, - "requires": { - "@babel/traverse": "^7.29.7", - "@babel/types": "^7.29.7" + "engines": { + "node": ">=8" } }, - "@babel/helper-string-parser": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.7.tgz", - "integrity": "sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==", - "dev": true - }, - "@babel/helper-validator-identifier": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz", - "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==", - "dev": true - }, - "@babel/helper-validator-option": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.29.7.tgz", - "integrity": "sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw==", - "dev": true - }, - "@babel/helper-wrap-function": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.29.7.tgz", - "integrity": "sha512-iES0Skag9ERIF68aXadpO6dbXa03mNWK3sEqJaMnLNs/eC3l0lkImdfoy6Y09/SfkpawdAB4RjQ7PVA7TcVGdw==", + "node_modules/siginfo": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", + "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", "dev": true, - "requires": { - "@babel/template": "^7.29.7", - "@babel/traverse": "^7.29.7", - "@babel/types": "^7.29.7" - } + "license": "ISC" }, - "@babel/helpers": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.7.tgz", - "integrity": "sha512-1k2lAGRMfHTcwuNYcCNUmaUffmQv8KWMfh2iJUUeRlwlwH4FdNG7mfPI10NPfLHJFThE4Tyr4mv7kTNZOiPuBg==", + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true, - "requires": { - "@babel/template": "^7.29.7", - "@babel/types": "^7.29.7" + "license": "MIT", + "engines": { + "node": ">=8" } }, - "@babel/parser": { - "version": "7.29.8", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.8.tgz", - "integrity": "sha512-E8lTAYNB1KW+FH+VGJuZM1ioAx2E6oVlvQFRrf5P8ZZmsiJXYAD9vTFV7yyEURNzgh1dFqMZuO6tUwcARbqFCA==", + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", "dev": true, - "requires": { - "@babel/types": "^7.29.8" + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" } }, - "@babel/plugin-bugfix-firefox-class-in-computed-class-key": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.29.7.tgz", - "integrity": "sha512-j8SrR0zLZrRsC09DlszEx8FpMiwukKffYXMK0d5LmOglO7vGG6sz/BR/20yHqWH+Lnn31JTt2PE3hIWNgM2J6w==", + "node_modules/spdx-correct": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.29.7", - "@babel/traverse": "^7.29.7" + "license": "Apache-2.0", + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" } }, - "@babel/plugin-bugfix-safari-class-field-initializer-scope": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-class-field-initializer-scope/-/plugin-bugfix-safari-class-field-initializer-scope-7.29.7.tgz", - "integrity": "sha512-r8j8escF+U2FUHo0KOhPUdMzUO+jp9fInva6+ACVAF3Y97Ev+5iNZwiqTghmzNeWwDkOPlYuTcfb1vDaoZKmAQ==", + "node_modules/spdx-exceptions": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", + "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.29.7" - } + "license": "CC-BY-3.0" }, - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.29.7.tgz", - "integrity": "sha512-GE1TFSiuFeGsCxmYXZl8HwoPrVlwe4rHPFE8weieGKZqnDORK+Ar3vgWMgW+AOxQ6/2TgLSKx9p6W7O4rC6qgQ==", + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.29.7" + "license": "MIT", + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" } }, - "@babel/plugin-bugfix-safari-rest-destructuring-rhs-array": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-rest-destructuring-rhs-array/-/plugin-bugfix-safari-rest-destructuring-rhs-array-7.29.7.tgz", - "integrity": "sha512-oBNVCvnO5tND+xSopWvV8WNGfpTfgP4Zr/YXXSj8zfmcPktp5Ku/aZlsIowgSD4fjmgHn6sGmB9APVsU5zOdhA==", + "node_modules/spdx-license-ids": { + "version": "3.0.23", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.23.tgz", + "integrity": "sha512-CWLcCCH7VLu13TgOH+r8p1O/Znwhqv/dbb6lqWy67G+pT1kHmeD/+V36AVb/vq8QMIQwVShJ6Ssl5FPh0fuSdw==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.29.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.29.7" - } + "license": "CC0-1.0" }, - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.29.7.tgz", - "integrity": "sha512-QQt9qKHZ2sg/kivaLr7lnQr8HVrQDdBNSfCsTjiDxRuX/K5ORyKq+Bu8Xr0cDE3Dfkv0cw28Ve0EKyKMvulkOw==", + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.29.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.29.7", - "@babel/plugin-transform-optional-chaining": "^7.29.7" - } + "license": "BSD-3-Clause" }, - "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.29.7.tgz", - "integrity": "sha512-pn6QacGLgvCcwc+syUhKE/qSjV2D1IHDB84RNxWYSt1mW3K/SCtjinZ2p0cETJxAWBjPy3K/1lHwG5BjjPxNlw==", + "node_modules/stackback": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", + "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.29.7", - "@babel/traverse": "^7.29.7" - } + "license": "MIT" }, - "@babel/plugin-proposal-private-property-in-object": { - "version": "7.21.0-placeholder-for-preset-env.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz", - "integrity": "sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==", + "node_modules/std-env": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-4.2.0.tgz", + "integrity": "sha512-oCUKSupKTHX53EyjDtuZQ64pjLJ6yYCtpmEw0goYxtjG9KpbRe8KAsl2tBUGU9DyMcJ0RwJ8GqJAFzMXcXW1Rw==", "dev": true, - "requires": {} + "license": "MIT" }, - "@babel/plugin-syntax-import-assertions": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.29.7.tgz", - "integrity": "sha512-/An1OCBN93thpBAGyfsK2pcf0jvju1SAtKkL2Ny++B5Sy6sqgzXDQH1cZxWbF96Wuk+bn41MDA9bLd4VVAw6rw==", + "node_modules/strip-indent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", + "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.29.7" + "license": "MIT", + "dependencies": { + "min-indent": "^1.0.0" + }, + "engines": { + "node": ">=8" } }, - "@babel/plugin-syntax-import-attributes": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.29.7.tgz", - "integrity": "sha512-zGYcYfq/WmZ4V+kBIXQon9dSSc8ircGZqw9ZaNhhGj9nZkeBu1jHLBDQqYYi5WA9uawvA2sIMbry2nCFhf5Djg==", + "node_modules/structured-source": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/structured-source/-/structured-source-4.0.0.tgz", + "integrity": "sha512-qGzRFNJDjFieQkl/sVOI2dUjHKRyL9dAJi2gCPGJLbJHBIkyOHxjuocpIEfbLioX+qSJpvbYdT49/YCdMznKxA==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.29.7" + "license": "BSD-2-Clause", + "dependencies": { + "boundary": "^2.0.0" } }, - "@babel/plugin-syntax-unicode-sets-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-unicode-sets-regex/-/plugin-syntax-unicode-sets-regex-7.18.6.tgz", - "integrity": "sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg==", + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", "dev": true, - "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "@babel/plugin-transform-arrow-functions": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.29.7.tgz", - "integrity": "sha512-N7zArUXWzAMzm+/N0uPBeVB3Fam5lMxtUwMmDK5f/IBBS7a7p1qeUoxd/6CckXoxUdgsntq1Dh8xNW06maZbDQ==", + "node_modules/tinybench": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", + "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.29.7" - } + "license": "MIT" }, - "@babel/plugin-transform-async-generator-functions": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.29.7.tgz", - "integrity": "sha512-d98gXZkgswvkyohMBABkhm3GeXhYj8psWfwQ2C7gtfrKGTykQa/iOIi+JJhwMjPlZ6Vm2XN+DCf3Es1EoG4ZLA==", + "node_modules/tinyexec": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.3.0.tgz", + "integrity": "sha512-QKAl9m8gWWGHV8jZcPeym6j+XULi6tOf1mT83WYJ4Lk2ytW/uwAWkrP0uFsdoYMdueVJ0qs26wZ+23xeB4ibNQ==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.29.7", - "@babel/helper-remap-async-to-generator": "^7.29.7", - "@babel/traverse": "^7.29.7" + "license": "MIT", + "engines": { + "node": ">=18" } }, - "@babel/plugin-transform-async-to-generator": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.29.7.tgz", - "integrity": "sha512-pcUb2SS+RMo9TWVBwKGI5ShtoG7R+zBsFmCKDa6fe8c+hPr3XJlZgoE5j6i8W7gDjhyvy+85vmYexanvXh3d1w==", + "node_modules/tinyglobby": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", + "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.29.7", - "@babel/helper-plugin-utils": "^7.29.7", - "@babel/helper-remap-async-to-generator": "^7.29.7" + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" } }, - "@babel/plugin-transform-block-scoped-functions": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.29.7.tgz", - "integrity": "sha512-cUSmjh72N+rN4PrkFlN1dJwNCwjVp5d38/CQrEsFggkD10UiFlBFgdH3tv5dNsLuHY+3S8db2xCHjhZcv5WgvA==", + "node_modules/tinyglobby/node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.29.7" + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } } }, - "@babel/plugin-transform-block-scoping": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.29.7.tgz", - "integrity": "sha512-ONyr4+AZhKh8yKWInVxU9AXA9EbsyeLcL6V0dJy6M2/62vuvpGm29zzuymbTpdc451GEpDIdAyPLP3r+P61yKQ==", + "node_modules/tinyglobby/node_modules/picomatch": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", + "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.29.7" + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" } }, - "@babel/plugin-transform-class-properties": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.29.7.tgz", - "integrity": "sha512-GtcpjFvanPfzNQi3eTitsCqtRRmmqzpy/A+yhTR1HaZo1Ly3EA8ZXxlPyHdR8/IuRMYc3E4wdGBewB2QKQjAaA==", + "node_modules/tinyrainbow": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-3.1.1.tgz", + "integrity": "sha512-yau8yJdTt989Mm0Bd/236QnzEiPf2xLLTqUZRUJOo/3CB078LSwzei343DgtJVmfJKJE3TMINY1u42SQsP6mXw==", "dev": true, - "requires": { - "@babel/helper-create-class-features-plugin": "^7.29.7", - "@babel/helper-plugin-utils": "^7.29.7" + "license": "MIT", + "engines": { + "node": ">=14.0.0" } }, - "@babel/plugin-transform-class-static-block": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.29.7.tgz", - "integrity": "sha512-kibJgmEdX2iMwsHY2tSZNDgj8PwIlCQz7FK9KuGKO8zsuoUwSEhoNnNVp/emKWrbY4HeO6kkXfdMqRKKKXBm2A==", + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, - "requires": { - "@babel/helper-create-class-features-plugin": "^7.29.7", - "@babel/helper-plugin-utils": "^7.29.7" + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" } }, - "@babel/plugin-transform-classes": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.29.7.tgz", - "integrity": "sha512-qV0OGGBVacduzQHE649JyCneOFI/maT+YKsO+K4Yi3xv2wTPNjM/W2o2gdzMwEAZz7fXNTHAe0NcSg30bIN69g==", + "node_modules/transform-markdown-links": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/transform-markdown-links/-/transform-markdown-links-2.1.0.tgz", + "integrity": "sha512-7HWQwQ9US+tJSMMzi1aP+KA3QwfjDs8sB4H5GBMRHFNBMQVdgoF6VfIFy2nJR/UHRTkYoGFwWh2pe+QIwSvfOA==", "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.29.7", - "@babel/helper-compilation-targets": "^7.29.7", - "@babel/helper-globals": "^7.29.7", - "@babel/helper-plugin-utils": "^7.29.7", - "@babel/helper-replace-supers": "^7.29.7", - "@babel/traverse": "^7.29.7" + "license": "MIT", + "engines": { + "node": ">=4" } }, - "@babel/plugin-transform-computed-properties": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.29.7.tgz", - "integrity": "sha512-RK7/IyU5phpuCdBAuig5VkzG/EnbDaui5SQGdU9BFrHdV+mV4cUjLMQ9lJDjLNtWHsqtiefpGZUXQP2BiTYMsA==", + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.29.7", - "@babel/template": "^7.29.7" + "license": "MIT", + "bin": { + "tree-kill": "cli.js" } }, - "@babel/plugin-transform-destructuring": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.29.7.tgz", - "integrity": "sha512-iPX8aD6H9zV5s7ZsqTdNocPN/MGQ5sSMnElKrktxjJRMnB2jN/1p2+R7GkfD6CAYoVFqy5A4XnSIUeGgJzIWpg==", + "node_modules/trim-newlines": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz", + "integrity": "sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.29.7", - "@babel/traverse": "^7.29.7" + "license": "MIT", + "engines": { + "node": ">=8" } }, - "@babel/plugin-transform-dotall-regex": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.29.7.tgz", - "integrity": "sha512-3qc18hsD2RdZiyJNDNc7HQpv6xbncwh8FYtxNFFzclSyh/trPD9KkVR9BDECUjDLvb7yJVF15GfYUuC+LMkkiQ==", + "node_modules/trough": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/trough/-/trough-1.0.5.tgz", + "integrity": "sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA==", "dev": true, - "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.29.7", - "@babel/helper-plugin-utils": "^7.29.7" + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" } }, - "@babel/plugin-transform-duplicate-keys": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.29.7.tgz", - "integrity": "sha512-6IvRRriEMqnBwD6chtxdLpMYCHWEzN+oL5cyQtjykya19UgzbmKhxmhZgKC/LHxS2nYr9Q/qYPZ5Lr6jOL9+yQ==", + "node_modules/ts-api-utils": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.5.0.tgz", + "integrity": "sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.29.7" + "license": "MIT", + "engines": { + "node": ">=18.12" + }, + "peerDependencies": { + "typescript": ">=4.8.4" } }, - "@babel/plugin-transform-duplicate-named-capturing-groups-regex": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-named-capturing-groups-regex/-/plugin-transform-duplicate-named-capturing-groups-regex-7.29.7.tgz", - "integrity": "sha512-2wiIyo2BjtgU7HufSeDnL9L2O7zr8jmhFKuSr65VpRkUiRKRNpb0mdlk56+XPPKoIrfHqzbMuglDvZun0RISsA==", + "node_modules/tsdown": { + "version": "0.22.14", + "resolved": "https://registry.npmjs.org/tsdown/-/tsdown-0.22.14.tgz", + "integrity": "sha512-ule7Y+fsAN2iZbLDoo7C4KYljFJNJJ+fLshyn+9gozeTspVersWHxwdGB+Dm2hzA38s6muFnUTl0jK3vJm9ifQ==", "dev": true, - "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.29.7", - "@babel/helper-plugin-utils": "^7.29.7" + "license": "MIT", + "dependencies": { + "ansis": "^4.3.1", + "cac": "^7.0.0", + "defu": "^6.1.7", + "empathic": "^2.0.1", + "hookable": "^6.1.1", + "import-without-cache": "^0.4.0", + "obug": "^2.1.4", + "picomatch": "^4.0.5", + "rolldown": "~1.2.0", + "rolldown-plugin-dts": "^0.27.13", + "tinyexec": "^1.2.4", + "tinyglobby": "^0.2.17", + "tree-kill": "^1.2.2", + "unconfig-core": "^7.5.0", + "verkit": "^0.3.0" + }, + "bin": { + "tsdown": "dist/run.mjs" + }, + "engines": { + "node": "^22.18.0 || >=24.11.0" + }, + "funding": { + "url": "https://github.com/sponsors/sxzz" + }, + "peerDependencies": { + "@arethetypeswrong/core": "^0.18.1", + "@tsdown/css": "0.22.14", + "@tsdown/exe": "0.22.14", + "@vitejs/devtools": "*", + "publint": "^0.3.8", + "tsx": "*", + "typescript": "^5.0.0 || ^6.0.0 || ^7.0.0", + "unplugin-unused": "^0.5.0", + "unrun": "*" + }, + "peerDependenciesMeta": { + "@arethetypeswrong/core": { + "optional": true + }, + "@tsdown/css": { + "optional": true + }, + "@tsdown/exe": { + "optional": true + }, + "@vitejs/devtools": { + "optional": true + }, + "publint": { + "optional": true + }, + "tsx": { + "optional": true + }, + "typescript": { + "optional": true + }, + "unplugin-unused": { + "optional": true + }, + "unrun": { + "optional": true + } } }, - "@babel/plugin-transform-dynamic-import": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.29.7.tgz", - "integrity": "sha512-giOlEm/EFjfjr+te9NsdjkUo2v4f8rS/SXPumRVHAtbNcyNlvtREkU1dZzaIDclNpnaVhlCqRdFKhJBjBikzLg==", + "node_modules/tsdown/node_modules/picomatch": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", + "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.29.7" + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" } }, - "@babel/plugin-transform-explicit-resource-management": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-explicit-resource-management/-/plugin-transform-explicit-resource-management-7.29.7.tgz", - "integrity": "sha512-Rstj7coNz8sE+7Ju7ihpHLI564lsK5pUpNNlvptCIC/16E/S5hbl6n3kESPKdNRmqEWlpn5xpS5Q2dvXBsySLw==", + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.29.7", - "@babel/plugin-transform-destructuring": "^7.29.7" + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" } }, - "@babel/plugin-transform-exponentiation-operator": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.29.7.tgz", - "integrity": "sha512-zFpMOTLZBdW5LfObqcSbL6kefg4R4eLdmvS0wbN9M6D5Mym/sKm9toOoWyVOa+xDjvCnuWcHls2YonXwHvH3CQ==", + "node_modules/type-fest": { + "version": "0.18.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz", + "integrity": "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.29.7" + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "@babel/plugin-transform-export-namespace-from": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.29.7.tgz", - "integrity": "sha512-24B2nOy2TeJSMheqwPD4DDQOV/elLSIlKxjZt4i05H5AgdPdWR3n18HnNrcJ+j76WJd9gbwb9jPjNYUy6RautA==", + "node_modules/typedoc": { + "version": "0.28.20", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.28.20.tgz", + "integrity": "sha512-uSKqkh8Cr48vllnEy+jdaAgOeR6Y+QCBW7usgUsKj7gJEfR7stw9U/fE49LBnj2tPRKPY0c0EBJSWe9Appmplg==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.29.7" + "license": "Apache-2.0", + "dependencies": { + "@gerrit0/mini-shiki": "^3.23.0", + "lunr": "^2.3.9", + "markdown-it": "^14.3.0", + "minimatch": "^10.2.5", + "yaml": "^2.9.0" + }, + "bin": { + "typedoc": "bin/typedoc" + }, + "engines": { + "node": ">= 18", + "pnpm": ">= 10" + }, + "peerDependencies": { + "typescript": "5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x || 5.9.x || 6.0.x" } }, - "@babel/plugin-transform-for-of": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.29.7.tgz", - "integrity": "sha512-zeSIHh0+E1Um1WJRXCFlHQYu2ieJNdivLLjlBEp+dIBu3S51n+SZZmIXjxnItw6pz56Cn+KvK68BIBVsxq2JiQ==", + "node_modules/typedoc-plugin-markdown": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/typedoc-plugin-markdown/-/typedoc-plugin-markdown-4.12.0.tgz", + "integrity": "sha512-eJDEMAfxCmede22c/Jw7d0FA13ggAQv+KkwQYKYCdqI02cin6Rc9QRwbG/7XvvHWinuFejySnZVUWDtvGk3Vbg==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.29.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.29.7" + "license": "MIT", + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "typedoc": "0.28.x" } }, - "@babel/plugin-transform-function-name": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.29.7.tgz", - "integrity": "sha512-otRWaHXE6fbAGkePvaj/kvs3HsqXfPhlnzwSOlnFgbqCPMd975dW+4wZ00WFBt+/YlBGcJwNrARQTOJOb4ZrIg==", + "node_modules/typedoc/node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", "dev": true, - "requires": { - "@babel/helper-compilation-targets": "^7.29.7", - "@babel/helper-plugin-utils": "^7.29.7", - "@babel/traverse": "^7.29.7" + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" } }, - "@babel/plugin-transform-json-strings": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.29.7.tgz", - "integrity": "sha512-RRnE2+eon1rJAq8MnoF1b5kTpY1vU88twHcvcKMrsqP/jxIRqDVs9iJB5fqPuqyeFAW0wJo4MlUIPpQCq/aRsg==", + "node_modules/typedoc/node_modules/brace-expansion": { + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz", + "integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.29.7" + "license": "MIT", + "dependencies": { + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "20 || >=22" } }, - "@babel/plugin-transform-literals": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.29.7.tgz", - "integrity": "sha512-DZ/oLP21ZuWx1vKqnoNv6/tvEK48AQOBRai40CX9dTjGluvT/YZCyY3rryDtyUqCEoyNroy5KKPwX2iQCiRvyw==", + "node_modules/typedoc/node_modules/minimatch": { + "version": "10.2.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz", + "integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.29.7" + "license": "BlueOak-1.0.0", + "dependencies": { + "brace-expansion": "^5.0.5" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "@babel/plugin-transform-logical-assignment-operators": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.29.7.tgz", - "integrity": "sha512-A0H91hh6W8MFRkp5TqJmMr39jzGD1A1E1Ysiv2O06Sfbhkapm+XyIzxWCEh5kqwOZ1/8QZ0dY3SeQ7XBqfJd5Q==", + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.29.7" + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" } }, - "@babel/plugin-transform-member-expression-literals": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.29.7.tgz", - "integrity": "sha512-hl1kwFZCCiDyfH25Xmco9jTrkPgnS9pmOzSG7W5I4SaGbLeqKv417hcU2RKmaxoPEgsoJh7ZPOrnPGq99bHoUg==", + "node_modules/typescript-eslint": { + "version": "8.68.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.68.0.tgz", + "integrity": "sha512-MHy0Y0ynqeEbx/S45+i/bBssdy3X6KNBfmJAP35GrgtNxu2TQ5K5xsFDhAnmsq1jvpdoZOPG1LGtJo0HWqYCrQ==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.29.7" + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.68.0", + "@typescript-eslint/parser": "8.68.0", + "@typescript-eslint/typescript-estree": "8.68.0", + "@typescript-eslint/utils": "8.68.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" } }, - "@babel/plugin-transform-modules-amd": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.29.7.tgz", - "integrity": "sha512-fxtQoH3m5ywUSIfaH0FGCzWu4McsYon5bD3K4XnskC7f+OyQMj7rsOMi4NvvmJ83WwBAg4UCe+ov4VZlqEvyew==", + "node_modules/uc.micro": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz", + "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==", "dev": true, - "requires": { - "@babel/helper-module-transforms": "^7.29.7", - "@babel/helper-plugin-utils": "^7.29.7" - } + "license": "MIT" }, - "@babel/plugin-transform-modules-commonjs": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.29.7.tgz", - "integrity": "sha512-j0vCldybPC5b5dwCQOJ21uKtHzt7hxLygJTg9eF1ScfaikEDNfzn94XoW5Fi+seBR0nCyL23xaBFFkq7dTM8XQ==", + "node_modules/unconfig-core": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/unconfig-core/-/unconfig-core-7.5.0.tgz", + "integrity": "sha512-Su3FauozOGP44ZmKdHy2oE6LPjk51M/TRRjHv2HNCWiDvfvCoxC2lno6jevMA91MYAdCdwP05QnWdWpSbncX/w==", "dev": true, - "requires": { - "@babel/helper-module-transforms": "^7.29.7", - "@babel/helper-plugin-utils": "^7.29.7" + "license": "MIT", + "dependencies": { + "@quansync/fs": "^1.0.0", + "quansync": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" } }, - "@babel/plugin-transform-modules-systemjs": { - "version": "7.29.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.29.8.tgz", - "integrity": "sha512-6iSnEK0zlkLKU4heofK/AdmRD4e2SHVpJMtrwnTCzhnaM98ria4rTrOXBBi45BTTYnJtO8txnPsX4fChYXkmeA==", + "node_modules/undici-types": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.3.0.tgz", + "integrity": "sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ==", "dev": true, - "requires": { - "@babel/helper-module-transforms": "^7.29.7", - "@babel/helper-plugin-utils": "^7.29.7", - "@babel/helper-validator-identifier": "^7.29.7", - "@babel/traverse": "^7.29.8" - } + "license": "MIT" }, - "@babel/plugin-transform-modules-umd": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.29.7.tgz", - "integrity": "sha512-B4UkaTK3QpgCwJnrxKfMPKdo92CN7OKXAlpAAnM3UPu0Q0lCCk57ylA9AJbRy2v8dDKOPAAWcoR6CMyeoHwRCA==", + "node_modules/unified": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/unified/-/unified-9.2.2.tgz", + "integrity": "sha512-Sg7j110mtefBD+qunSLO1lqOEKdrwBFBrR6Qd8f4uwkhWNlbkaqwHse6e7QvD3AP/MNoJdEDLaf8OxYyoWgorQ==", "dev": true, - "requires": { - "@babel/helper-module-transforms": "^7.29.7", - "@babel/helper-plugin-utils": "^7.29.7" + "license": "MIT", + "dependencies": { + "bail": "^1.0.0", + "extend": "^3.0.0", + "is-buffer": "^2.0.0", + "is-plain-obj": "^2.0.0", + "trough": "^1.0.0", + "vfile": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.29.7.tgz", - "integrity": "sha512-vuFoLwr4qnv2xbZ16SQd6uPcH5FNrLHhk/Jzo++0XJFcaDsr4gjJVg6j398oMHiC+83k/GiBzviwF5KBJkPUtQ==", + "node_modules/unified/node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", "dev": true, - "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.29.7", - "@babel/helper-plugin-utils": "^7.29.7" + "license": "MIT", + "engines": { + "node": ">=8" } }, - "@babel/plugin-transform-new-target": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.29.7.tgz", - "integrity": "sha512-fEo41GmsOUhOBlw8ioo6zvjX5Xc2Lqkzlyfqbpsk3eB6TReV18uhxZ0esfEokVbY2+PVJAQHNKxER6lGrzNd3A==", + "node_modules/unist-util-is": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.1.0.tgz", + "integrity": "sha512-ZOQSsnce92GrxSqlnEEseX0gi7GH9zTJZ0p9dtu87WRb/37mMPO2Ilx1s/t9vBHrFhbgweUwb+t7cIn5dxPhZg==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.29.7" + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "@babel/plugin-transform-nullish-coalescing-operator": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.29.7.tgz", - "integrity": "sha512-idmp1dFaekP9GbcMvG24Kvw2BfhFZjHnNJCkV4WuIY4PskJzwI3f1N5OdgYke38T7rftO6ERulFRn2cFeZwRkg==", + "node_modules/unist-util-stringify-position": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz", + "integrity": "sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.29.7" + "license": "MIT", + "dependencies": { + "@types/unist": "^2.0.2" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "@babel/plugin-transform-numeric-separator": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.29.7.tgz", - "integrity": "sha512-zR7fv/z14OjgHl4AgRtkDBvBMhIzCxqV/qN/2BCRC7LjFwvuzjYe7gDWxC4Wl/SNsLM6SE1IWvRPYMgSJaUvNw==", + "node_modules/unist-util-stringify-position/node_modules/@types/unist": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", + "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.29.7" - } + "license": "MIT" }, - "@babel/plugin-transform-object-rest-spread": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.29.7.tgz", - "integrity": "sha512-Ld98jn4c0smUywL57m7SgsHq3OpThOa6LqZJif3G6jYOovPleoFhVrBJ1WegRApSFB2wu4+RelAj9AC9G08Z4A==", + "node_modules/unist-util-visit-parents": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.1.1.tgz", + "integrity": "sha512-1KROIZWo6bcMrZEwiH2UrXDyalAa0uqzWCxCJj6lPOvTve2WkfgCytoDTPaMnodXh1WrXOq0haVYHj99ynJlsg==", "dev": true, - "requires": { - "@babel/helper-compilation-targets": "^7.29.7", - "@babel/helper-plugin-utils": "^7.29.7", - "@babel/plugin-transform-destructuring": "^7.29.7", - "@babel/plugin-transform-parameters": "^7.29.7", - "@babel/traverse": "^7.29.7" + "license": "MIT", + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "@babel/plugin-transform-object-super": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.29.7.tgz", - "integrity": "sha512-Ea/diGcw0twB5IlZPO5sgET6fJsLJqPABqTuFWIR+iMPGPZJkATEIWx0wa+aEQ5UY1CBQyP/gkAiLEqn1vBiQA==", + "node_modules/unist-util-visit-parents/node_modules/@types/unist": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", + "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.29.7", - "@babel/helper-replace-supers": "^7.29.7" - } + "license": "MIT" }, - "@babel/plugin-transform-optional-catch-binding": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.29.7.tgz", - "integrity": "sha512-sLsyndxK2VwX6yNUOakMb7Sh553ZTe/vVM1XJ+9Z5aW1ytsc8xOIwmyk05NNjN60vkc5/KqoTH6hB4V41LJhng==", + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.29.7" + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" } }, - "@babel/plugin-transform-optional-chaining": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.29.7.tgz", - "integrity": "sha512-6GM1dhvK3gNODkXcEcMCOLEDCLSoZ/sBbro2Ax8HURyasQ4NshagQixkRFdh5niI6E4gmA/jYI/4aT7rRos3ZQ==", + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.29.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.29.7" + "license": "Apache-2.0", + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" } }, - "@babel/plugin-transform-parameters": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.29.7.tgz", - "integrity": "sha512-ZDOBqV/qLYJI0YElr8DcENEyARsFQeESqWXH6gZlghYXuPPjvweuDhP4VyEi4BlUBlLRFZVjxoZDMjxhLW766g==", + "node_modules/verkit": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/verkit/-/verkit-0.3.2.tgz", + "integrity": "sha512-zj/ob3UsvJGN0whEAKFp53REA5X66hvffVqoCtVQAakJKnKlH+/PcOfMoFwIG/o4rElqLv/ycAFlx8ZlXUorCg==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.29.7" + "license": "MIT", + "engines": { + "node": ">=18.12.0" + }, + "funding": { + "url": "https://github.com/sponsors/sxzz" } }, - "@babel/plugin-transform-private-methods": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.29.7.tgz", - "integrity": "sha512-/6Rz4DK1ETDEM/bWHsPHcaEe7ZaT1EqSXjtSP/L0DijOYuaUhiRiOKcwpZ8P7zR4xXEHc2ITdiCgBm9Tpyv9ug==", + "node_modules/vfile": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-4.2.1.tgz", + "integrity": "sha512-O6AE4OskCG5S1emQ/4gl8zK586RqA3srz3nfK/Viy0UPToBc5Trp9BVFb1u0CjsKrAWwnpr4ifM/KBXPWwJbCA==", "dev": true, - "requires": { - "@babel/helper-create-class-features-plugin": "^7.29.7", - "@babel/helper-plugin-utils": "^7.29.7" + "license": "MIT", + "dependencies": { + "@types/unist": "^2.0.0", + "is-buffer": "^2.0.0", + "unist-util-stringify-position": "^2.0.0", + "vfile-message": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "@babel/plugin-transform-private-property-in-object": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.29.7.tgz", - "integrity": "sha512-+BNo06dnrzdNNqCm1X6YUaVv0DKk8Q+JYcoZfOkLhYWNCXzlwTSRq8zGWayT1csjcpNXV9CQTBRRbmTLZac5cA==", + "node_modules/vfile-message": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-2.0.4.tgz", + "integrity": "sha512-DjssxRGkMvifUOJre00juHoP9DPWuzjxKuMDrhNbk2TdaYYBNMStsNhEOt3idrtI12VQYM/1+iM0KOzXi4pxwQ==", "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.29.7", - "@babel/helper-create-class-features-plugin": "^7.29.7", - "@babel/helper-plugin-utils": "^7.29.7" + "license": "MIT", + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-stringify-position": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "@babel/plugin-transform-property-literals": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.29.7.tgz", - "integrity": "sha512-bOMRLQuI0A5ZqHq3OWJ89/rXpJ/NJrbVhXiP4zwPGMs6kpcVsuTUNjwoE30K0Qm3mf48a/TnRYYD6vPNqcg6jA==", + "node_modules/vfile-message/node_modules/@types/unist": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", + "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.29.7" - } + "license": "MIT" }, - "@babel/plugin-transform-regenerator": { - "version": "7.29.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.29.8.tgz", - "integrity": "sha512-0UpIXPtdDtMXfnV2OJAVMLpj3H/92vmkA6lpSRakmycJvj3VUy6Xs1dM8tXRugupykr5WB+LpiVl0J8LMVg2mg==", + "node_modules/vfile/node_modules/@types/unist": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", + "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.29.7" - } + "license": "MIT" }, - "@babel/plugin-transform-regexp-modifiers": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regexp-modifiers/-/plugin-transform-regexp-modifiers-7.29.7.tgz", - "integrity": "sha512-mB5Fs0VWrJ42ZCmc8114v60qetdaUVNkj9PmSZRmanCZM3S9hm0CFRLjRmYIsuXav14l2jvZ+4T8iiCGnhj3nQ==", + "node_modules/vite": { + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/vite/-/vite-8.2.2.tgz", + "integrity": "sha512-cFKLV/PRgAUlIRm5WjMjJ86jrftzpqcgH+Us+DS8mI3CDNiH30Whrz8uHL3+MOLPAgqbMBAqWdAHAphOAM+z/Q==", "dev": true, - "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.29.7", - "@babel/helper-plugin-utils": "^7.29.7" + "license": "MIT", + "dependencies": { + "lightningcss": "^1.33.0", + "picomatch": "^4.0.5", + "postcss": "^8.5.26", + "rolldown": "~1.2.4", + "tinyglobby": "^0.2.17" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^20.19.0 || >=22.12.0", + "@vitejs/devtools": "^0.4.0 || ^0.5.0", + "esbuild": "^0.27.0 || ^0.28.0", + "jiti": ">=1.21.0", + "less": "^4.0.0", + "sass": "^1.70.0", + "sass-embedded": "^1.70.0", + "stylus": ">=0.54.8", + "sugarss": "^5.0.0", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "@vitejs/devtools": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } } }, - "@babel/plugin-transform-reserved-words": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.29.7.tgz", - "integrity": "sha512-5+YhdpVgmfSmwZyLMftfaiffLRMHjzIRHFHHLdibcSyJm2pasMrKHrO3Ptrt2DRshjvpgjEJJ1zVW14WPq/6QA==", + "node_modules/vite/node_modules/picomatch": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", + "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.29.7" + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" } }, - "@babel/plugin-transform-shorthand-properties": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.29.7.tgz", - "integrity": "sha512-I+WYbGBAiCn7nA6xBrlgPH+MB7HWb4u8pv5S0Pv7OtwNvIFvCCb24YlttKEeUFVurfBCEaOTnuhlqsb7f0Z5Dg==", + "node_modules/vitest": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.1.11.tgz", + "integrity": "sha512-fhACrNXUidIbGSBr5FlbuBkO7VWC1ZyLl0DO4CU2DrQoAPxX84Ysxs+HeGQpii5lZWV1Q4gBZTTu49mF+A6Edw==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.29.7" + "license": "MIT", + "dependencies": { + "@vitest/expect": "4.1.11", + "@vitest/mocker": "4.1.11", + "@vitest/pretty-format": "4.1.11", + "@vitest/runner": "4.1.11", + "@vitest/snapshot": "4.1.11", + "@vitest/spy": "4.1.11", + "@vitest/utils": "4.1.11", + "es-module-lexer": "^2.0.0", + "expect-type": "^1.3.0", + "magic-string": "^0.30.21", + "obug": "^2.1.1", + "pathe": "^2.0.3", + "picomatch": "^4.0.3", + "std-env": "^4.0.0-rc.1", + "tinybench": "^2.9.0", + "tinyexec": "^1.0.2", + "tinyglobby": "^0.2.15", + "tinyrainbow": "^3.1.0", + "vite": "^6.0.0 || ^7.0.0 || ^8.0.0", + "why-is-node-running": "^2.3.0" + }, + "bin": { + "vitest": "vitest.mjs" + }, + "engines": { + "node": "^20.0.0 || ^22.0.0 || >=24.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@edge-runtime/vm": "*", + "@opentelemetry/api": "^1.9.0", + "@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0", + "@vitest/browser-playwright": "4.1.11", + "@vitest/browser-preview": "4.1.11", + "@vitest/browser-webdriverio": "4.1.11", + "@vitest/coverage-istanbul": "4.1.11", + "@vitest/coverage-v8": "4.1.11", + "@vitest/ui": "4.1.11", + "happy-dom": "*", + "jsdom": "*", + "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "@edge-runtime/vm": { + "optional": true + }, + "@opentelemetry/api": { + "optional": true + }, + "@types/node": { + "optional": true + }, + "@vitest/browser-playwright": { + "optional": true + }, + "@vitest/browser-preview": { + "optional": true + }, + "@vitest/browser-webdriverio": { + "optional": true + }, + "@vitest/coverage-istanbul": { + "optional": true + }, + "@vitest/coverage-v8": { + "optional": true + }, + "@vitest/ui": { + "optional": true + }, + "happy-dom": { + "optional": true + }, + "jsdom": { + "optional": true + }, + "vite": { + "optional": false + } } }, - "@babel/plugin-transform-spread": { - "version": "7.29.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.29.8.tgz", - "integrity": "sha512-4S9ksMGVWUshvgK0mKfvZky7leuG5/uoFVwMpAomJ8bMoDJiNHRVmc1EglwW/CmGVSqqWpEbXm9FmbRit22qoA==", + "node_modules/vitest/node_modules/picomatch": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", + "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.29.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.29.7" + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" } }, - "@babel/plugin-transform-sticky-regex": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.29.7.tgz", - "integrity": "sha512-BCHzNYJGe9l7EpwwDBN/ztlL2NYFFq8hp9ddjtUEM9f2O7S7kKV/lL6Fwo7IF7NSkYhPK2vO+86nIGltA90MsA==", + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.29.7" + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" } }, - "@babel/plugin-transform-template-literals": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.29.7.tgz", - "integrity": "sha512-NCSEJ4sLFU2gqAub45HYh4fus2yQ36rr6ei6vpU7NdoJqCpxvEG8E6eJpscGyXP3VHD2Ny+fSXr04k1hoUrFqA==", + "node_modules/why-is-node-running": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", + "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.29.7" + "license": "MIT", + "dependencies": { + "siginfo": "^2.0.0", + "stackback": "0.0.2" + }, + "bin": { + "why-is-node-running": "cli.js" + }, + "engines": { + "node": ">=8" } }, - "@babel/plugin-transform-typeof-symbol": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.29.7.tgz", - "integrity": "sha512-223mNGoTkBiTEWFoK+Q6Go3tueMRclO8vxxxxquNCYuNI4jWOofFKJRRDu6SDrB8Sgo1UEGW9T4GAQ8ZyRso1A==", + "node_modules/yaml": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.9.0.tgz", + "integrity": "sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.29.7" + "license": "ISC", + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14.6" + }, + "funding": { + "url": "https://github.com/sponsors/eemeli" } }, - "@babel/plugin-transform-unicode-escapes": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.29.7.tgz", - "integrity": "sha512-jCfXxSjf94lf4E0hKE0AByxF6F3/pVFqRdUUNkDJhsY0m1ZKjnN6ZYyMeHNpzflxb/0q5b7t3p+BE+SLF1WOtA==", + "node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.29.7" + "license": "ISC", + "engines": { + "node": ">=10" } }, - "@babel/plugin-transform-unicode-property-regex": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.29.7.tgz", - "integrity": "sha512-OgZ+zoAJgZLUCunsTRQ5LAjOywDv5zzZ2/hQ5aMw1pGXyY2rtE8/chXYUmu3AlVHKpm10KEdG9aMwbI/K76ZGw==", + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true, - "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.29.7", - "@babel/helper-plugin-utils": "^7.29.7" + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "@babel/plugin-transform-unicode-regex": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.29.7.tgz", - "integrity": "sha512-7D/x/23/d/3VqZ0QA+LGbZMlGwZjztBygSWWWsfTPoQ1oQ6Q1P6Mr3d0kk42XabyUVw+fha3LqdRsFqeKqvCyA==", + "node_modules/yuku-ast": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/yuku-ast/-/yuku-ast-0.8.7.tgz", + "integrity": "sha512-h6+4bDfyootiMB9vckk5uKo5r5j0GHrkr17FQTDNfEsFT3DWlN9uu1HJwQwc64pgmLCI945fWM3lbTIqxjT3GQ==", "dev": true, - "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.29.7", - "@babel/helper-plugin-utils": "^7.29.7" + "license": "MIT", + "dependencies": { + "@yuku-toolchain/types": "^0.8.7" } }, - "@babel/plugin-transform-unicode-sets-regex": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.29.7.tgz", - "integrity": "sha512-BLOhLht9DOJwIxlmp91wHvkXv1lguuHS3/FwUO8HL1H0u8s4hR1gASVFyilu9iGtcTRYqjTZmlsFFeQletntEg==", + "node_modules/yuku-codegen": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/yuku-codegen/-/yuku-codegen-0.8.7.tgz", + "integrity": "sha512-adwDZSh8oVDzhE6Du9PwVWxcOxeV0e2EVhUuMKWfhSY4wkrDq9eqixlxFF3l/XGUV1E7UFzhpz9393MUumkyNw==", "dev": true, - "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.29.7", - "@babel/helper-plugin-utils": "^7.29.7" + "license": "MIT", + "dependencies": { + "@yuku-toolchain/types": "^0.8.7" + }, + "optionalDependencies": { + "@yuku-codegen/binding-android-arm64": "0.8.7", + "@yuku-codegen/binding-darwin-arm64": "0.8.7", + "@yuku-codegen/binding-darwin-x64": "0.8.7", + "@yuku-codegen/binding-freebsd-x64": "0.8.7", + "@yuku-codegen/binding-linux-arm-gnu": "0.8.7", + "@yuku-codegen/binding-linux-arm-musl": "0.8.7", + "@yuku-codegen/binding-linux-arm64-gnu": "0.8.7", + "@yuku-codegen/binding-linux-arm64-musl": "0.8.7", + "@yuku-codegen/binding-linux-x64-gnu": "0.8.7", + "@yuku-codegen/binding-linux-x64-musl": "0.8.7", + "@yuku-codegen/binding-win32-arm64": "0.8.7", + "@yuku-codegen/binding-win32-x64": "0.8.7" } }, - "@babel/preset-env": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.29.7.tgz", - "integrity": "sha512-GYzX36n1nsciIb0uyH0GHwxwtNwPQIcpxSeiVLDtG/B7jB5xXgchnmL1f/jCX5o+pwnaDBtO60ONSJhEBJfxYA==", - "dev": true, - "requires": { - "@babel/compat-data": "^7.29.7", - "@babel/helper-compilation-targets": "^7.29.7", - "@babel/helper-plugin-utils": "^7.29.7", - "@babel/helper-validator-option": "^7.29.7", - "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "^7.29.7", - "@babel/plugin-bugfix-safari-class-field-initializer-scope": "^7.29.7", - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.29.7", - "@babel/plugin-bugfix-safari-rest-destructuring-rhs-array": "^7.29.7", - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.29.7", - "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.29.7", - "@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2", - "@babel/plugin-syntax-import-assertions": "^7.29.7", - "@babel/plugin-syntax-import-attributes": "^7.29.7", - "@babel/plugin-syntax-unicode-sets-regex": "^7.18.6", - "@babel/plugin-transform-arrow-functions": "^7.29.7", - "@babel/plugin-transform-async-generator-functions": "^7.29.7", - "@babel/plugin-transform-async-to-generator": "^7.29.7", - "@babel/plugin-transform-block-scoped-functions": "^7.29.7", - "@babel/plugin-transform-block-scoping": "^7.29.7", - "@babel/plugin-transform-class-properties": "^7.29.7", - "@babel/plugin-transform-class-static-block": "^7.29.7", - "@babel/plugin-transform-classes": "^7.29.7", - "@babel/plugin-transform-computed-properties": "^7.29.7", - "@babel/plugin-transform-destructuring": "^7.29.7", - "@babel/plugin-transform-dotall-regex": "^7.29.7", - "@babel/plugin-transform-duplicate-keys": "^7.29.7", - "@babel/plugin-transform-duplicate-named-capturing-groups-regex": "^7.29.7", - "@babel/plugin-transform-dynamic-import": "^7.29.7", - "@babel/plugin-transform-explicit-resource-management": "^7.29.7", - "@babel/plugin-transform-exponentiation-operator": "^7.29.7", - "@babel/plugin-transform-export-namespace-from": "^7.29.7", - "@babel/plugin-transform-for-of": "^7.29.7", - "@babel/plugin-transform-function-name": "^7.29.7", - "@babel/plugin-transform-json-strings": "^7.29.7", - "@babel/plugin-transform-literals": "^7.29.7", - "@babel/plugin-transform-logical-assignment-operators": "^7.29.7", - "@babel/plugin-transform-member-expression-literals": "^7.29.7", - "@babel/plugin-transform-modules-amd": "^7.29.7", - "@babel/plugin-transform-modules-commonjs": "^7.29.7", - "@babel/plugin-transform-modules-systemjs": "^7.29.7", - "@babel/plugin-transform-modules-umd": "^7.29.7", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.29.7", - "@babel/plugin-transform-new-target": "^7.29.7", - "@babel/plugin-transform-nullish-coalescing-operator": "^7.29.7", - "@babel/plugin-transform-numeric-separator": "^7.29.7", - "@babel/plugin-transform-object-rest-spread": "^7.29.7", - "@babel/plugin-transform-object-super": "^7.29.7", - "@babel/plugin-transform-optional-catch-binding": "^7.29.7", - "@babel/plugin-transform-optional-chaining": "^7.29.7", - "@babel/plugin-transform-parameters": "^7.29.7", - "@babel/plugin-transform-private-methods": "^7.29.7", - "@babel/plugin-transform-private-property-in-object": "^7.29.7", - "@babel/plugin-transform-property-literals": "^7.29.7", - "@babel/plugin-transform-regenerator": "^7.29.7", - "@babel/plugin-transform-regexp-modifiers": "^7.29.7", - "@babel/plugin-transform-reserved-words": "^7.29.7", - "@babel/plugin-transform-shorthand-properties": "^7.29.7", - "@babel/plugin-transform-spread": "^7.29.7", - "@babel/plugin-transform-sticky-regex": "^7.29.7", - "@babel/plugin-transform-template-literals": "^7.29.7", - "@babel/plugin-transform-typeof-symbol": "^7.29.7", - "@babel/plugin-transform-unicode-escapes": "^7.29.7", - "@babel/plugin-transform-unicode-property-regex": "^7.29.7", - "@babel/plugin-transform-unicode-regex": "^7.29.7", - "@babel/plugin-transform-unicode-sets-regex": "^7.29.7", - "@babel/preset-modules": "0.1.6-no-external-plugins", - "babel-plugin-polyfill-corejs2": "^0.4.15", - "babel-plugin-polyfill-corejs3": "^0.14.0", - "babel-plugin-polyfill-regenerator": "^0.6.6", - "core-js-compat": "^3.48.0", - "semver": "^6.3.1" - } - }, - "@babel/preset-modules": { - "version": "0.1.6-no-external-plugins", - "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.6-no-external-plugins.tgz", - "integrity": "sha512-HrcgcIESLm9aIR842yhJ5RWan/gebQUJ6E/E5+rf0y9o6oj7w0Br+sWuL6kEQ/o/AdfvR1Je9jG18/gnpwjEyA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/types": "^7.4.4", - "esutils": "^2.0.2" - } - }, - "@babel/template": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.29.7.tgz", - "integrity": "sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==", + "node_modules/yuku-parser": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/yuku-parser/-/yuku-parser-0.8.7.tgz", + "integrity": "sha512-vRD9nwt4L3aYpxNqeSC4WqLv58xrXef0Ong1Mc45CTXTIpvLafx7JO05sczmQZwdLEZvywrLOGdNC5+Rp5N1BQ==", "dev": true, - "requires": { - "@babel/code-frame": "^7.29.7", - "@babel/parser": "^7.29.7", - "@babel/types": "^7.29.7" + "license": "MIT", + "dependencies": { + "@yuku-toolchain/types": "^0.8.7", + "yuku-ast": "^0.8.7" + }, + "optionalDependencies": { + "@yuku-parser/binding-android-arm64": "0.8.7", + "@yuku-parser/binding-darwin-arm64": "0.8.7", + "@yuku-parser/binding-darwin-x64": "0.8.7", + "@yuku-parser/binding-freebsd-x64": "0.8.7", + "@yuku-parser/binding-linux-arm-gnu": "0.8.7", + "@yuku-parser/binding-linux-arm-musl": "0.8.7", + "@yuku-parser/binding-linux-arm64-gnu": "0.8.7", + "@yuku-parser/binding-linux-arm64-musl": "0.8.7", + "@yuku-parser/binding-linux-x64-gnu": "0.8.7", + "@yuku-parser/binding-linux-x64-musl": "0.8.7", + "@yuku-parser/binding-win32-arm64": "0.8.7", + "@yuku-parser/binding-win32-x64": "0.8.7" } }, - "@babel/traverse": { - "version": "7.29.8", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.8.tgz", - "integrity": "sha512-I5z7H3bf/41ktsNVLtpN0wAa336HkqIHQ5BuPLEhTkt1jVSyZpeNKIzTgEWmlxjdg81R0IgUCcaE+Ok3NvrfZg==", + "node_modules/zwitch": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-1.0.5.tgz", + "integrity": "sha512-V50KMwwzqJV0NpZIZFwfOD5/lyny3WlSzRiXgA0G7VUnRlqttta1L6UQIHzd6EuBY/cHGfwTIck7w1yH6Q5zUw==", "dev": true, - "requires": { - "@babel/code-frame": "^7.29.7", - "@babel/generator": "^7.29.8", - "@babel/helper-globals": "^7.29.7", - "@babel/parser": "^7.29.8", - "@babel/template": "^7.29.7", - "@babel/types": "^7.29.8", - "debug": "^4.3.1" + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" } + } + }, + "dependencies": { + "@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", + "dev": true }, - "@babel/types": { - "version": "7.29.8", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.8.tgz", - "integrity": "sha512-Vj1jF3cPfxg7OAfoI7QnVKLoILlm2JF9pnVHrX8qx7AHMiYWT+NDAA7jChlNgRS4WTLc/fD1lXLmPixluj+3Gg==", + "@babel/code-frame": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.7.tgz", + "integrity": "sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==", "dev": true, "requires": { - "@babel/helper-string-parser": "^7.29.7", - "@babel/helper-validator-identifier": "^7.29.7" + "@babel/helper-validator-identifier": "^7.29.7", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" } }, + "@babel/helper-validator-identifier": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz", + "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==", + "dev": true + }, "@borgar/eslint-config": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/@borgar/eslint-config/-/eslint-config-4.1.0.tgz", @@ -8703,74 +5790,12 @@ "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", "dev": true }, - "@jridgewell/gen-mapping": { - "version": "0.3.13", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", - "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", - "dev": true, - "requires": { - "@jridgewell/sourcemap-codec": "^1.5.0", - "@jridgewell/trace-mapping": "^0.3.24" - } - }, - "@jridgewell/remapping": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", - "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", - "dev": true, - "requires": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.24" - } - }, - "@jridgewell/resolve-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", - "dev": true - }, - "@jridgewell/source-map": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", - "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", - "dev": true, - "requires": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25" - } - }, "@jridgewell/sourcemap-codec": { "version": "1.5.5", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", "dev": true }, - "@jridgewell/trace-mapping": { - "version": "0.3.31", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", - "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", - "dev": true, - "requires": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "@jsdoc/salty": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/@jsdoc/salty/-/salty-0.2.5.tgz", - "integrity": "sha512-TfRP53RqunNe2HBobVBJ0VLhK1HbfvBYeTC1ahnN64PWvyYyGebmMiPkuwvD9fpw2ZbkoPb8Q7mwy0aR8Z9rvw==", - "dev": true, - "requires": { - "lodash": "^4.17.21" - } - }, - "@napi-rs/lzma-linux-x64-gnu": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-x64-gnu/-/lzma-linux-x64-gnu-1.5.1.tgz", - "integrity": "sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ==", - "dev": true, - "optional": true - }, "@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -8803,6 +5828,15 @@ "integrity": "sha512-XC0QsnnhVe7sLIWmYmdPw7x5P0h4W8vUU3Nv1ySgWXtvCz8NizoAEpGXA0sOYoJQV2Rl13LgURAHQ5cI5ILCSA==", "dev": true }, + "@quansync/fs": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@quansync/fs/-/fs-1.0.0.tgz", + "integrity": "sha512-4TJ3DFtlf1L5LDMaM6CanJ/0lckGNtJcMjQ1NAV6zDmA0tEHKZtxNKin8EgPaVX1YzljbxckyT2tJrpQKAtngQ==", + "dev": true, + "requires": { + "quansync": "^1.0.0" + } + }, "@rolldown/binding-android-arm-eabi": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm-eabi/-/binding-android-arm-eabi-1.2.5.tgz", @@ -8914,214 +5948,6 @@ "integrity": "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==", "dev": true }, - "@rollup/plugin-babel": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-7.1.0.tgz", - "integrity": "sha512-h9Y+xYha6p4wKO+FwdiPIkE+eIYCm8MzZPpX1iARIoFBnmKP9CnpT1p9dDf/DTFm6fyN8PmuLyRI5qZgchnitw==", - "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.18.6", - "@rollup/pluginutils": "^5.0.1", - "workerpool": "^9.0.0" - } - }, - "@rollup/plugin-terser": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-terser/-/plugin-terser-1.0.0.tgz", - "integrity": "sha512-FnCxhTBx6bMOYQrar6C8h3scPt8/JwIzw3+AJ2K++6guogH5fYaIFia+zZuhqv0eo1RN7W1Pz630SyvLbDjhtQ==", - "dev": true, - "requires": { - "serialize-javascript": "^7.0.3", - "smob": "^1.0.0", - "terser": "^5.17.4" - } - }, - "@rollup/pluginutils": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.0.tgz", - "integrity": "sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==", - "dev": true, - "requires": { - "@types/estree": "^1.0.0", - "estree-walker": "^2.0.2", - "picomatch": "^2.3.1" - } - }, - "@rollup/rollup-android-arm-eabi": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.62.5.tgz", - "integrity": "sha512-jfkGfTwhQpsiSckPF8r9bU3pn3vyd72NlWaO+TgEO6WPSDnUhXzrNYCHBMOYj0ACaUgjm6eERLF+XV9a6RstoA==", - "dev": true, - "optional": true - }, - "@rollup/rollup-android-arm64": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.62.5.tgz", - "integrity": "sha512-oGVqyQlxnrz9/ty89oHpU857VUHEl5/Xu4R2lS+aivCTrNnSsbiENzTnNaBsjxH0CNWGPhzHArOLFwo+oKXveA==", - "dev": true, - "optional": true - }, - "@rollup/rollup-darwin-arm64": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.62.5.tgz", - "integrity": "sha512-bW7B8xMEq8n99Q3ieEcPRGuphurdZAaFzQc9Efyyw3FL6DZO6pMy9xhdN+kBoD7Sy05xNXSr4OyPPnpkYriS/A==", - "dev": true, - "optional": true - }, - "@rollup/rollup-darwin-x64": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.62.5.tgz", - "integrity": "sha512-YSwBS86QeHOGlrxJ1PSOIZSkzRL/JmKeunhc+lV6M1a6En8QuVCD/T/qIA0J4Gd2Y86RIOBYrLcOUtqGh9+/1w==", - "dev": true, - "optional": true - }, - "@rollup/rollup-freebsd-arm64": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.62.5.tgz", - "integrity": "sha512-2fST8lILgl7cKbme/1KDdPCmbXbG+gqoV3bHp19L0ypX/3akYMBVdOunPleRCwonoLnXOZ/0F+Mt/v8POFmfcQ==", - "dev": true, - "optional": true - }, - "@rollup/rollup-freebsd-x64": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.62.5.tgz", - "integrity": "sha512-cpIxQCP9J+EVad0a6LO1kY3ZGODlk80VlI+2I96B8xMcdHZ4pLVhfQ49JFpYqjPF91FFkQWftf57YlDcTiw9yQ==", - "dev": true, - "optional": true - }, - "@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.62.5.tgz", - "integrity": "sha512-r9fGh3eFs3e/udWh5ZjXQtxiYK/xoFxQaYR/cELxac/Udkl5Th+IsFm0CX3Kl9hmUH/we7EoMpjJgeQNnE0+IA==", - "dev": true, - "optional": true - }, - "@rollup/rollup-linux-arm-musleabihf": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.62.5.tgz", - "integrity": "sha512-xdvFdp7OM6KLJviJT2g/YuRSUjnZgGHk4RNgwIbN7X6cPugOucV60DdHXWzsBVCUdrGb6qSXnJQrrAKMmQuj3Q==", - "dev": true, - "optional": true - }, - "@rollup/rollup-linux-arm64-gnu": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.62.5.tgz", - "integrity": "sha512-rRqILAndyzHzP7T9NFQrq+4HFWNhqkqkKur7eiBpfLmz01PO0JKx5Vchu3YllE4YXI/Ftgq/szrDWg5GJ0mI8g==", - "dev": true, - "optional": true - }, - "@rollup/rollup-linux-arm64-musl": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.62.5.tgz", - "integrity": "sha512-Gf4X3qVMucayUvux6aXXPgXovocSFUC0rrffDuPI/S2nHhNMhjcZxsrAFYCOF350PRreW1XwzFj3CT/3bKsWCw==", - "dev": true, - "optional": true - }, - "@rollup/rollup-linux-loong64-gnu": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.62.5.tgz", - "integrity": "sha512-+s5qA0TNM0qm8PK/a5gt/1Hpx+NV08uSuCncvhziIlQzT6AEV2fnUQo7eBtFTFO0nA9scauvoR2HusfXmQnO4w==", - "dev": true, - "optional": true - }, - "@rollup/rollup-linux-loong64-musl": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.62.5.tgz", - "integrity": "sha512-ybb6QvWwWJCbBWqERpc8K3pYVGIrXlG8MEQ8IIuJY6Y9KdHQxoFoNyfkAOtKn1VHu3KuLidXvwrvGR1mEjeWCw==", - "dev": true, - "optional": true - }, - "@rollup/rollup-linux-ppc64-gnu": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.62.5.tgz", - "integrity": "sha512-nZb1DtnOyhCmYvsC8A2CwOkopVg+IS1+fPUa7rMOAXtNw5+lLCLLPqd6XAiNrGtoQKsbvIBOwsHnBH/3wnb4HQ==", - "dev": true, - "optional": true - }, - "@rollup/rollup-linux-ppc64-musl": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.62.5.tgz", - "integrity": "sha512-yMbj63Sp89ryrXLWyz+sy+fYD2HpOnMCLGbe4Oa1smclFSUukdtD/BgdiHaAetJNb74URD8U4hM+qG5KVzMEkg==", - "dev": true, - "optional": true - }, - "@rollup/rollup-linux-riscv64-gnu": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.62.5.tgz", - "integrity": "sha512-mhoan3OJw2kYV/e1jtIdmvUZgyBFeA6zGWsOswmR0Tg19TQbowZuR+JMLID6spbbBN7Zee2ejrgmy3+FxGrIdA==", - "dev": true, - "optional": true - }, - "@rollup/rollup-linux-riscv64-musl": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.62.5.tgz", - "integrity": "sha512-5ZTLmjWbb1VZdjuyhe83K/8QO0/h11midQCBP+X5OYn32ra7eOBoM0ZqtaY4nkgNsYgmdVhMYPoyVPTjUpHf3w==", - "dev": true, - "optional": true - }, - "@rollup/rollup-linux-s390x-gnu": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.62.5.tgz", - "integrity": "sha512-m53kG+br6PGxOTmgBEM2DHSDs9RVjsyEbUwjJPJGTFm1grWOG8EKJggDCTb60unD4Tjby8fi7/m9XfkEWasVWg==", - "dev": true, - "optional": true - }, - "@rollup/rollup-linux-x64-gnu": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.62.5.tgz", - "integrity": "sha512-6RHPJR1g/uvdYU8uXBnfq3nlqyZCP82Fr6NHgfGoaIeSh0YEqnX/x6uA9MmJJbnSH7swqX4F+CkGdUF+6doiQA==", - "dev": true, - "optional": true - }, - "@rollup/rollup-linux-x64-musl": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.62.5.tgz", - "integrity": "sha512-xs+OXQtEXgpXT0DmA5+U3qnRZHdCST/5HRQxS8wSPZTUZN/EMWeHuSIod32LQklTBZBV9DyfncKBQ8n5V3eFdw==", - "dev": true, - "optional": true - }, - "@rollup/rollup-openbsd-x64": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.62.5.tgz", - "integrity": "sha512-e7hD+sl3s+mcLQDZ8pbudBVsdG6r5yN4w3LqG2TJ8sQHDpblWj5lrJs/3m01Cvlxbt4x13zu5thLjgypgtkYzw==", - "dev": true, - "optional": true - }, - "@rollup/rollup-openharmony-arm64": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.62.5.tgz", - "integrity": "sha512-GiyJaCf+WpMub/17aPcKk27QMl5W6f+KhdPTjlFOn5akH5Wa/DCM9Stdx5cDfmasyKB08MqpVQ1uJE2RkkpbXg==", - "dev": true, - "optional": true - }, - "@rollup/rollup-win32-arm64-msvc": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.62.5.tgz", - "integrity": "sha512-+OQ8U2DdoEfXl8T4Fb18AjmEwbXMerKDKCL8yCPAYhKCEEKoul7rkbeGCBFCbAlaGaa7pmtRTpkAJM2LE/i5FA==", - "dev": true, - "optional": true - }, - "@rollup/rollup-win32-ia32-msvc": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.62.5.tgz", - "integrity": "sha512-KanvAZrPKbDBFwrgiU9yEVpQoox9QPV1WZOXX7HudJQY+eSlu82CtWxDU8WtuRRvtN5EGkLczkd6Y6DTcvm9wA==", - "dev": true, - "optional": true - }, - "@rollup/rollup-win32-x64-gnu": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.62.5.tgz", - "integrity": "sha512-1aC3UEWTtRl3RK3VpDJ/Tqk1XI4SLTmXIthAq6wRWo8XiSXJNd+VprJM4/1P4+i6HIaFEFlVi9sTTziniD2tOQ==", - "dev": true, - "optional": true - }, - "@rollup/rollup-win32-x64-msvc": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.62.5.tgz", - "integrity": "sha512-/gDJaRs4gl0NPIwqCz+6PkpmhhjRAD2j6P4rSNHBzUkO3naEx2mIU0pRle1vUNRQ7mE/+8OOeXLTv/J56FKiQg==", - "dev": true, - "optional": true - }, "@shikijs/engine-oniguruma": { "version": "3.23.0", "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-3.23.0.tgz", @@ -9261,22 +6087,6 @@ "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", "dev": true }, - "@types/linkify-it": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-5.0.0.tgz", - "integrity": "sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q==", - "dev": true - }, - "@types/markdown-it": { - "version": "14.1.1", - "resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-14.1.1.tgz", - "integrity": "sha512-4NpsnpYl2Gt1ljyBGrKMxFYAYvpqbnnkgP/i/g+NLpjEUa3obn1XJCur9YbEXKDAkaXqsR1LbDnGEJ0MmKFxfg==", - "dev": true, - "requires": { - "@types/linkify-it": "^5", - "@types/mdurl": "^2" - } - }, "@types/mdast": { "version": "3.0.15", "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", @@ -9294,12 +6104,6 @@ } } }, - "@types/mdurl": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-2.0.0.tgz", - "integrity": "sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg==", - "dev": true - }, "@types/minimist": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.5.tgz", @@ -9535,44 +6339,218 @@ "tinyrainbow": "^3.1.0" } }, - "@vitest/runner": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.1.11.tgz", - "integrity": "sha512-LztvUgdwMNJMIkj3hQnnxiC2Xy1zNxq928W/xhjCLaNCzqTZOudjwbQf6v9IntZGPw132i2Lq2rgTRZHD3JHNw==", + "@vitest/runner": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.1.11.tgz", + "integrity": "sha512-LztvUgdwMNJMIkj3hQnnxiC2Xy1zNxq928W/xhjCLaNCzqTZOudjwbQf6v9IntZGPw132i2Lq2rgTRZHD3JHNw==", + "dev": true, + "requires": { + "@vitest/utils": "4.1.11", + "pathe": "^2.0.3" + } + }, + "@vitest/snapshot": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.1.11.tgz", + "integrity": "sha512-pN7ikn1ON7h8ee4gIAp4AzyK+zBtJPzVbqOgu5LCEh4VaJVbPQcgYQYJIMGQPXVeJJq1fnfazis7a5pFNPahog==", + "dev": true, + "requires": { + "@vitest/pretty-format": "4.1.11", + "@vitest/utils": "4.1.11", + "magic-string": "^0.30.21", + "pathe": "^2.0.3" + } + }, + "@vitest/spy": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.1.11.tgz", + "integrity": "sha512-apNa/prQy2qCeywhnixOHPRCgGNhvg7T4Dapfl1GahLp/R+uhBm5cPyFoNVyqsNd2h1nJxL6BqqdIjiABL60YA==", + "dev": true + }, + "@vitest/utils": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.11.tgz", + "integrity": "sha512-zTCVGpyFsGWBhllOyKlTw/vnr6D9qxsfSDyfbyZmTyjHw5N/VuvzHpHoQjm2ZJzn4RJgx5w4r7V0er69CmLgPQ==", + "dev": true, + "requires": { + "@vitest/pretty-format": "4.1.11", + "convert-source-map": "^2.0.0", + "tinyrainbow": "^3.1.0" + } + }, + "@yuku-codegen/binding-android-arm64": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@yuku-codegen/binding-android-arm64/-/binding-android-arm64-0.8.7.tgz", + "integrity": "sha512-C/0zV5IhgVdYhGJTwrY0v8dknxlhiKwtVJkMUaexu9/QvRmzlV4vfU3hZlUSgqc2BxQHntL1mCVbDq8j0FRFDw==", + "dev": true, + "optional": true + }, + "@yuku-codegen/binding-darwin-arm64": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@yuku-codegen/binding-darwin-arm64/-/binding-darwin-arm64-0.8.7.tgz", + "integrity": "sha512-/u+REDMI4a0/lsJXTM4c53/w31OGZLOReZIyg62uhgLs0kc8NHsj/nOcxTdlQjq5gi0zhdkccD9LaLTXcdzPvw==", + "dev": true, + "optional": true + }, + "@yuku-codegen/binding-darwin-x64": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@yuku-codegen/binding-darwin-x64/-/binding-darwin-x64-0.8.7.tgz", + "integrity": "sha512-sMMzFOwCo4WXR+/6zIBThOocSC50iIIZZdfiIDbaLvj0Ax/rWt/iavyfEAqajyvzydLyCqR/ZItdLWSRlu1umw==", + "dev": true, + "optional": true + }, + "@yuku-codegen/binding-freebsd-x64": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@yuku-codegen/binding-freebsd-x64/-/binding-freebsd-x64-0.8.7.tgz", + "integrity": "sha512-MpdpKXix9P+Y1rKgjvcNeNtGjXeL1CmttNhYINrWls8kRpm4xM/oBGTmn6w7to8lAlwj5jm8q03dQPl5mRv4Qw==", + "dev": true, + "optional": true + }, + "@yuku-codegen/binding-linux-arm-gnu": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@yuku-codegen/binding-linux-arm-gnu/-/binding-linux-arm-gnu-0.8.7.tgz", + "integrity": "sha512-rr1srFLlPAmC1vtxfc9C1YLDe3iH09YjfSeeIidBqKhzx1MATjOAq4mjlRUOnhr/L27MotWIYOFKwVsd5JZFOg==", + "dev": true, + "optional": true + }, + "@yuku-codegen/binding-linux-arm-musl": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@yuku-codegen/binding-linux-arm-musl/-/binding-linux-arm-musl-0.8.7.tgz", + "integrity": "sha512-eAufXh8qBRpiSO6ueaMDL+yyoXIGLhpUce72YbcACtZU2qhExwBIJyEtQf5kH2Ki0X2aqkSjSfog4OPtKXan3Q==", + "dev": true, + "optional": true + }, + "@yuku-codegen/binding-linux-arm64-gnu": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@yuku-codegen/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-0.8.7.tgz", + "integrity": "sha512-gw4w6wPoHObBrdIC4duVWLmJOvpdE25j5D7yrM5mACNlK4klRz/lv8hK+ssQk9EJHBgZjSaqZIJVFgqNYbfv7A==", + "dev": true, + "optional": true + }, + "@yuku-codegen/binding-linux-arm64-musl": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@yuku-codegen/binding-linux-arm64-musl/-/binding-linux-arm64-musl-0.8.7.tgz", + "integrity": "sha512-L68N6Y4XkqcIaKo3Ra88JEvBEH4AHff44A4INcrxeVWZ8CZtu2tCpfVxe3hR8qQQMcvBSQlDn24KpkCKEhVvfA==", + "dev": true, + "optional": true + }, + "@yuku-codegen/binding-linux-x64-gnu": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@yuku-codegen/binding-linux-x64-gnu/-/binding-linux-x64-gnu-0.8.7.tgz", + "integrity": "sha512-dzyAbltJmf3Cqlb8HcFuYIf5Yn0fl1vTr3XJ9HiVNNvOlhqPSArOqtw9vI1p6/VTXTjrMLXlU+s+/kNHiIy/Cw==", + "dev": true, + "optional": true + }, + "@yuku-codegen/binding-linux-x64-musl": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@yuku-codegen/binding-linux-x64-musl/-/binding-linux-x64-musl-0.8.7.tgz", + "integrity": "sha512-Otw4MH3404q0Bbvl+YTdW9aoUV5vXmUw8260bWvt1XlaoIX/ceSgI4ygheRDMfBPoHt6FDayQaO9OLVUZAgkFA==", + "dev": true, + "optional": true + }, + "@yuku-codegen/binding-win32-arm64": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@yuku-codegen/binding-win32-arm64/-/binding-win32-arm64-0.8.7.tgz", + "integrity": "sha512-qo/jyrzryiBuKEsFiuWaBCBe3tRMynQ0qFWFgOEjcCMQeZfBm+wKiVEUEFXXLc7bh8YezguAWp0Mtnhq4ARNyA==", + "dev": true, + "optional": true + }, + "@yuku-codegen/binding-win32-x64": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@yuku-codegen/binding-win32-x64/-/binding-win32-x64-0.8.7.tgz", + "integrity": "sha512-D5lDsVDx6m00E6bWySlWdH72Ca4TPSaphDqB6QjU6MpuNLIJqoGoatYyq2rOmBE8Zv/kunot/o58KGL03P3eiA==", + "dev": true, + "optional": true + }, + "@yuku-parser/binding-android-arm64": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@yuku-parser/binding-android-arm64/-/binding-android-arm64-0.8.7.tgz", + "integrity": "sha512-eGKYiUDX7Y0V7tDTmg+JTVnXnjMqfXXsorZ+EDf5kxwchQ3Or1HS14MzI2fw+jFhHR85fCWt+mtX33Yao73hIQ==", + "dev": true, + "optional": true + }, + "@yuku-parser/binding-darwin-arm64": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@yuku-parser/binding-darwin-arm64/-/binding-darwin-arm64-0.8.7.tgz", + "integrity": "sha512-Re0RHelKLnjEURulY2/KxW+Ngb8zuNA4BRZuMwgGQNzVumT6u4U2N2hc01oeYVNVof0i7GrXE4UCNBgbpRRnjQ==", + "dev": true, + "optional": true + }, + "@yuku-parser/binding-darwin-x64": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@yuku-parser/binding-darwin-x64/-/binding-darwin-x64-0.8.7.tgz", + "integrity": "sha512-Hn8DROtQkjlA1ACbPgj4a7eP9IuVOI504oiTwpkWPbpaDWD9KdmnVYCqW+1LfenNK/g7O9NhWGpXEdaCNX7lIA==", + "dev": true, + "optional": true + }, + "@yuku-parser/binding-freebsd-x64": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@yuku-parser/binding-freebsd-x64/-/binding-freebsd-x64-0.8.7.tgz", + "integrity": "sha512-bAP2OV8wRuzplX/jYxv9+vvqQT8JxyNphI8fLfXGL054Xs+4/J5u33cIm3y4rxY8rdoLmmdiJs2Tq7r7lrDRfA==", + "dev": true, + "optional": true + }, + "@yuku-parser/binding-linux-arm-gnu": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@yuku-parser/binding-linux-arm-gnu/-/binding-linux-arm-gnu-0.8.7.tgz", + "integrity": "sha512-kTYwJQQgmZeAWdDIWabiReIZMpmfLueIj1tCmjStUtFGhR1Z0qwxonKVfUC4N7h/VhGGzLZ//7O1kgt1QKqgCg==", + "dev": true, + "optional": true + }, + "@yuku-parser/binding-linux-arm-musl": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@yuku-parser/binding-linux-arm-musl/-/binding-linux-arm-musl-0.8.7.tgz", + "integrity": "sha512-uL4jE8HPT2BLlxAXyD10LqgPuXa9eDa0BKpCdSANmzIJghq/2eZo3/gQNtaxPZMupWoxjYzSad9IXrwu7aYPXQ==", + "dev": true, + "optional": true + }, + "@yuku-parser/binding-linux-arm64-gnu": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@yuku-parser/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-0.8.7.tgz", + "integrity": "sha512-3gVN4pWSKZmXiNX7cU164dR9MPvesCHnlH6nPfpK+yQsCuYphjKKplcb4SnZBrhiqmXbgb2HR0c2TS0IZUPhgA==", + "dev": true, + "optional": true + }, + "@yuku-parser/binding-linux-arm64-musl": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@yuku-parser/binding-linux-arm64-musl/-/binding-linux-arm64-musl-0.8.7.tgz", + "integrity": "sha512-S0mwfEjoLpxzXeZw802Wa4RaELsQiPtWqG6INcy8j4GtvNFtl4LCX3eGO1XLn9pyLAISLzTRyU3zUCBUPin8lg==", "dev": true, - "requires": { - "@vitest/utils": "4.1.11", - "pathe": "^2.0.3" - } + "optional": true }, - "@vitest/snapshot": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.1.11.tgz", - "integrity": "sha512-pN7ikn1ON7h8ee4gIAp4AzyK+zBtJPzVbqOgu5LCEh4VaJVbPQcgYQYJIMGQPXVeJJq1fnfazis7a5pFNPahog==", + "@yuku-parser/binding-linux-x64-gnu": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@yuku-parser/binding-linux-x64-gnu/-/binding-linux-x64-gnu-0.8.7.tgz", + "integrity": "sha512-lnbWdPmerE5D1uH1G4IEZKnPzCrWCStRGrtgpSIe1RibAo5bZIjDbbbPYXmMHCEh4F+x/JaJpElh26a3r+BPbg==", "dev": true, - "requires": { - "@vitest/pretty-format": "4.1.11", - "@vitest/utils": "4.1.11", - "magic-string": "^0.30.21", - "pathe": "^2.0.3" - } + "optional": true }, - "@vitest/spy": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.1.11.tgz", - "integrity": "sha512-apNa/prQy2qCeywhnixOHPRCgGNhvg7T4Dapfl1GahLp/R+uhBm5cPyFoNVyqsNd2h1nJxL6BqqdIjiABL60YA==", - "dev": true + "@yuku-parser/binding-linux-x64-musl": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@yuku-parser/binding-linux-x64-musl/-/binding-linux-x64-musl-0.8.7.tgz", + "integrity": "sha512-769uwndMvMzUvATWbAcEvyLHKA+DzhHSCl/obBUrRdYfRo26yxui6S8y3z7uJ+Naup7UKrDxrpK7OnQkxkl9KQ==", + "dev": true, + "optional": true }, - "@vitest/utils": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.11.tgz", - "integrity": "sha512-zTCVGpyFsGWBhllOyKlTw/vnr6D9qxsfSDyfbyZmTyjHw5N/VuvzHpHoQjm2ZJzn4RJgx5w4r7V0er69CmLgPQ==", + "@yuku-parser/binding-win32-arm64": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@yuku-parser/binding-win32-arm64/-/binding-win32-arm64-0.8.7.tgz", + "integrity": "sha512-mEB/9PlaAkisJ6KWGz0zvywXoU6+80dTlR2LwS7s/jcXXoU6fm2+sitBZXtqu3+Q4DcDgPxM45uWMCzPs0TSRw==", "dev": true, - "requires": { - "@vitest/pretty-format": "4.1.11", - "convert-source-map": "^2.0.0", - "tinyrainbow": "^3.1.0" - } + "optional": true + }, + "@yuku-parser/binding-win32-x64": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@yuku-parser/binding-win32-x64/-/binding-win32-x64-0.8.7.tgz", + "integrity": "sha512-8vNB2DP0ou61nGb8tc/qfi41gfyDXz1MHr2zqL3nR+cJ6CEbiuWV/l/a/vv151gCgiZLLAyGkQGENpozdg716w==", + "dev": true, + "optional": true + }, + "@yuku-toolchain/types": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@yuku-toolchain/types/-/types-0.8.7.tgz", + "integrity": "sha512-2Z53dNxAJL6UvFoIrDZvYf3zlO8s4VJK4O2hhaB4mXVwwpX/7ajtss3cmfqKvamlNLWyt9FSWs4eoYdlbxpnHA==", + "dev": true }, "acorn": { "version": "8.16.0", @@ -9609,6 +6587,12 @@ "remove-markdown": "^0.6.2" } }, + "ansis": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ansis/-/ansis-4.3.1.tgz", + "integrity": "sha512-BJ8/l4R5LRE7hW9WdSuGYrLSHi2ynxeFpDFbH0K/CgNeY/tyhk+vO6TYxXC5r5CpUhNVX310xzPsN/H9lCdfOA==", + "dev": true + }, "argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -9633,54 +6617,12 @@ "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", "dev": true }, - "babel-plugin-polyfill-corejs2": { - "version": "0.4.15", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.15.tgz", - "integrity": "sha512-hR3GwrRwHUfYwGfrisXPIDP3JcYfBrW7wKE7+Au6wDYl7fm/ka1NEII6kORzxNU556JjfidZeBsO10kYvtV1aw==", - "dev": true, - "requires": { - "@babel/compat-data": "^7.28.6", - "@babel/helper-define-polyfill-provider": "^0.6.6", - "semver": "^6.3.1" - } - }, - "babel-plugin-polyfill-corejs3": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.14.0.tgz", - "integrity": "sha512-AvDcMxJ34W4Wgy4KBIIePQTAOP1Ie2WFwkQp3dB7FQ/f0lI5+nM96zUnYEOE1P9sEg0es5VCP0HxiWu5fUHZAQ==", - "dev": true, - "requires": { - "@babel/helper-define-polyfill-provider": "^0.6.6", - "core-js-compat": "^3.48.0" - } - }, - "babel-plugin-polyfill-regenerator": { - "version": "0.6.6", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.6.6.tgz", - "integrity": "sha512-hYm+XLYRMvupxiQzrvXUj7YyvFFVfv5gI0R71AJzudg1g2AI2vyCPPIFEBjk162/wFzti3inBHo7isWFuEVS/A==", - "dev": true, - "requires": { - "@babel/helper-define-polyfill-provider": "^0.6.6" - } - }, "bail": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/bail/-/bail-1.0.5.tgz", "integrity": "sha512-xFbRxM1tahm08yHBP16MMjVUAvDaBMD38zsM9EMAUN61omwLmKlOpB/Zku5QkjZ8TZ4vn53pj+t518cH0S03RQ==", "dev": true }, - "baseline-browser-mapping": { - "version": "2.9.19", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.9.19.tgz", - "integrity": "sha512-ipDqC8FrAl/76p2SSWKSI+H9tFwm7vYqXQrItCuiVPt26Km0jS+NzSsBWAaBusvSbQcfJG+JitdMm+wZAgTYqg==", - "dev": true - }, - "bluebird": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", - "dev": true - }, "boundary": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/boundary/-/boundary-2.0.0.tgz", @@ -9696,23 +6638,10 @@ "fill-range": "^7.1.1" } }, - "browserslist": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.1.tgz", - "integrity": "sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA==", - "dev": true, - "requires": { - "baseline-browser-mapping": "^2.9.0", - "caniuse-lite": "^1.0.30001759", - "electron-to-chromium": "^1.5.263", - "node-releases": "^2.0.27", - "update-browserslist-db": "^1.2.0" - } - }, - "buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "cac": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/cac/-/cac-7.0.0.tgz", + "integrity": "sha512-tixWYgm5ZoOD+3g6UTea91eow5z6AAHaho3g0V9CNSNb45gM8SmflpAc+GRd1InC4AqN/07Unrgp56Y94N9hJQ==", "dev": true }, "camelcase": { @@ -9732,21 +6661,6 @@ "quick-lru": "^4.0.1" } }, - "caniuse-lite": { - "version": "1.0.30001769", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001769.tgz", - "integrity": "sha512-BCfFL1sHijQlBGWBMuJyhZUhzo7wer5sVj9hqekB/7xn0Ypy+pER/edCYQm4exbXj4WiySGp40P8UuTh6w1srg==", - "dev": true - }, - "catharsis": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.9.0.tgz", - "integrity": "sha512-prMTQVpcns/tzFgFVkVp6ak6RykZyWb3gu8ckUpd6YkTlacOd3DXGJjIpD4Q6zJirizvaiAjSSHlOsA+6sNh2A==", - "dev": true, - "requires": { - "lodash": "^4.17.15" - } - }, "ccount": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/ccount/-/ccount-1.1.0.tgz", @@ -9777,12 +6691,6 @@ "integrity": "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==", "dev": true }, - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - }, "concat-md": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/concat-md/-/concat-md-0.5.1.tgz", @@ -9803,15 +6711,6 @@ "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", "dev": true }, - "core-js-compat": { - "version": "3.48.0", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.48.0.tgz", - "integrity": "sha512-OM4cAF3D6VtH/WkLtWvyNC56EZVXsZdU3iqaMG2B4WvYrlqU831pc4UtG5yp0sE9z8Y02wVN7PjW5Zf9Gt0f1Q==", - "dev": true, - "requires": { - "browserslist": "^4.28.1" - } - }, "cross-spawn": { "version": "7.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", @@ -9862,6 +6761,12 @@ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, + "defu": { + "version": "6.1.7", + "resolved": "https://registry.npmjs.org/defu/-/defu-6.1.7.tgz", + "integrity": "sha512-7z22QmUWiQ/2d0KkdYmANbRUVABpZ9SNYyH5vx6PZ+nE5bcC0l7uFvEfHlyld/HcGBFTL536ClDt3DEcSlEJAQ==", + "dev": true + }, "detect-libc": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", @@ -9935,11 +6840,12 @@ "domhandler": "^4.2.0" } }, - "electron-to-chromium": { - "version": "1.5.286", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.286.tgz", - "integrity": "sha512-9tfDXhJ4RKFNerfjdCcZfufu49vg620741MNs26a9+bhLThdB+plgMeou98CAaHu/WATj2iHOOHTp1hWtABj2A==", - "dev": true + "dts-resolver": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/dts-resolver/-/dts-resolver-3.0.0.tgz", + "integrity": "sha512-1T1f+z+4tl9XD+m+0HBgWoL/nm0bOIffyWaUuUSBlFg/86IWvfx+wjNaO/ybU0AJzG9/Mi5hBUgGV6zCmWEN7Q==", + "dev": true, + "requires": {} }, "emoji-regex": { "version": "10.6.0", @@ -9947,6 +6853,12 @@ "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", "dev": true }, + "empathic": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/empathic/-/empathic-2.0.1.tgz", + "integrity": "sha512-YGRs8knHhKHVShLkFET/rWAU8kmHbOV5LwN938RHI0pljAJ1Gf6SzXsSmRaEzcXTtOOmVqJ5+WtQPL5uigY50Q==", + "dev": true + }, "entities": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", @@ -9968,12 +6880,6 @@ "integrity": "sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw==", "dev": true }, - "escalade": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", - "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "dev": true - }, "escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", @@ -10120,12 +7026,6 @@ "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true }, - "estree-walker": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", - "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", - "dev": true - }, "esutils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", @@ -10276,11 +7176,14 @@ "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", "dev": true }, - "gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true + "get-tsconfig": { + "version": "5.0.0-beta.5", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-5.0.0-beta.5.tgz", + "integrity": "sha512-/6gFNr0N04nob252sTQxyFLi3eKFRqIg1I87YcqAMT1i6SQrSF6KujUEQrtrjMV0H/eejTCltLdDSTEMzHbnsQ==", + "dev": true, + "requires": { + "resolve-pkg-maps": "^1.0.0" + } }, "glob-parent": { "version": "6.0.2", @@ -10311,12 +7214,6 @@ "slash": "^3.0.0" } }, - "graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true - }, "hard-rejection": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz", @@ -10332,6 +7229,12 @@ "function-bind": "^1.1.2" } }, + "hookable": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/hookable/-/hookable-6.1.1.tgz", + "integrity": "sha512-U9LYDy1CwhMCnprUfeAZWZGByVbhd54hwepegYTK7Pi5NvqEj63ifz5z+xukznehT7i6NIZRu89Ay1AZmRsLEQ==", + "dev": true + }, "hosted-git-info": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", @@ -10384,6 +7287,12 @@ "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true }, + "import-without-cache": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/import-without-cache/-/import-without-cache-0.4.0.tgz", + "integrity": "sha512-NkJQA7oZ4YHQhd2+H3BoRFKF3d/XNsiKpHZCQEMH9pDX27hQQLsTyOocyRgaIVtf8gHX3Nt3LPkR4e5EdtPAGQ==", + "dev": true + }, "imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -10505,52 +7414,6 @@ } } }, - "js2xmlparser": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-4.0.2.tgz", - "integrity": "sha512-6n4D8gLlLf1n5mNLQPRfViYzu9RATblzPEtm1SthMX1Pjao0r9YI9nw7ZIfRxQMERS87mcswrg+r/OYrPRX6jA==", - "dev": true, - "requires": { - "xmlcreate": "^2.0.4" - } - }, - "jsdoc": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-4.0.5.tgz", - "integrity": "sha512-P4C6MWP9yIlMiK8nwoZvxN84vb6MsnXcHuy7XzVOvQoCizWX5JFCBsWIIWKXBltpoRZXddUOVQmCTOZt9yDj9g==", - "dev": true, - "requires": { - "@babel/parser": "^7.20.15", - "@jsdoc/salty": "^0.2.1", - "@types/markdown-it": "^14.1.1", - "bluebird": "^3.7.2", - "catharsis": "^0.9.0", - "escape-string-regexp": "^2.0.0", - "js2xmlparser": "^4.0.2", - "klaw": "^3.0.0", - "markdown-it": "^14.1.0", - "markdown-it-anchor": "^8.6.7", - "marked": "^4.0.10", - "mkdirp": "^1.0.4", - "requizzle": "^0.2.3", - "strip-json-comments": "^3.1.0", - "underscore": "~1.13.2" - }, - "dependencies": { - "escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", - "dev": true - } - } - }, - "jsesc": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", - "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", - "dev": true - }, "json-buffer": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", @@ -10575,12 +7438,6 @@ "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", "dev": true }, - "json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true - }, "keyv": { "version": "4.5.4", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", @@ -10596,15 +7453,6 @@ "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true }, - "klaw": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/klaw/-/klaw-3.0.0.tgz", - "integrity": "sha512-0Fo5oir+O9jnXu5EefYbVK+mHMBeEVEy2cmctR1O1NECcCkPRreJKrS6Qt/j3KC2C148Dfo9i3pCmCMsdqGr0g==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.9" - } - }, "levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", @@ -10736,18 +7584,6 @@ "p-locate": "^5.0.0" } }, - "lodash": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.18.1.tgz", - "integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==", - "dev": true - }, - "lodash.debounce": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", - "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", - "dev": true - }, "lodash.startcase": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.startcase/-/lodash.startcase-4.4.0.tgz", @@ -10766,15 +7602,6 @@ "integrity": "sha512-vM6rUVCVUJJt33bnmHiZEvr7wPT78ztX7rojL+LW51bHtLh6HTjx84LA5W4+oa6aKEJA7jJu5LR6vQRBpA5DVg==", "dev": true }, - "lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "requires": { - "yallist": "^3.0.2" - } - }, "lunr": { "version": "2.3.9", "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", @@ -10810,13 +7637,6 @@ "uc.micro": "^2.1.0" } }, - "markdown-it-anchor": { - "version": "8.6.7", - "resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-8.6.7.tgz", - "integrity": "sha512-FlCHFwNnutLgVTflOYHPW2pPcl2AACqVzExlkGQNsi4CJgqOHN7YTgDd4LuhgN1BFO3TS0vLAruV1Td6dwWPJA==", - "dev": true, - "requires": {} - }, "markdown-table": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-2.0.0.tgz", @@ -10826,12 +7646,6 @@ "repeat-string": "^1.0.0" } }, - "marked": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", - "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==", - "dev": true - }, "mdast-util-find-and-replace": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/mdast-util-find-and-replace/-/mdast-util-find-and-replace-1.1.1.tgz", @@ -11104,12 +7918,6 @@ "kind-of": "^6.0.3" } }, - "mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true - }, "ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -11134,12 +7942,6 @@ "integrity": "sha512-Z4SmBUweYa09+o6pG+eASabEpP6QkQ70yHj351pQoEXIs8uHbaU2DWVmzBANKgflPa47A50PtB2+NgRpQvr7vA==", "dev": true }, - "node-releases": { - "version": "2.0.27", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.27.tgz", - "integrity": "sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA==", - "dev": true - }, "normalize-package-data": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz", @@ -11312,6 +8114,12 @@ "integrity": "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==", "dev": true }, + "quansync": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/quansync/-/quansync-1.0.0.tgz", + "integrity": "sha512-5xZacEEufv3HSTPQuchrvV6soaiACMFnq1H8wkVioctoH3TRha9Sz66lOxRwPK/qZj7HPiSveih9yAyh98gvqA==", + "dev": true + }, "queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -11425,50 +8233,6 @@ "strip-indent": "^3.0.0" } }, - "regenerate": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", - "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", - "dev": true - }, - "regenerate-unicode-properties": { - "version": "10.2.2", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.2.2.tgz", - "integrity": "sha512-m03P+zhBeQd1RGnYxrGyDAPpWX/epKirLrp8e3qevZdVkKtnCrjjWczIbYc8+xd6vcTStVlqfycTx1KR4LOr0g==", - "dev": true, - "requires": { - "regenerate": "^1.4.2" - } - }, - "regexpu-core": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-6.4.0.tgz", - "integrity": "sha512-0ghuzq67LI9bLXpOX/ISfve/Mq33a4aFRzoQYhnnok1JOFpmE/A2TBGkNVenOGEeSBCjIiWcc6MVOG5HEQv0sA==", - "dev": true, - "requires": { - "regenerate": "^1.4.2", - "regenerate-unicode-properties": "^10.2.2", - "regjsgen": "^0.8.0", - "regjsparser": "^0.13.0", - "unicode-match-property-ecmascript": "^2.0.0", - "unicode-match-property-value-ecmascript": "^2.2.1" - } - }, - "regjsgen": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.8.0.tgz", - "integrity": "sha512-RvwtGe3d7LvWiDQXeQw8p5asZUmfU1G/l6WbUXeHta7Y2PEIvBTwH6E2EfmYUK8pxcxEdEmaomqyp0vZZ7C+3Q==", - "dev": true - }, - "regjsparser": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.13.0.tgz", - "integrity": "sha512-NZQZdC5wOE/H3UT28fVGL+ikOZcEzfMGk/c3iN9UGxzWHMa1op7274oyiUVrAG4B2EuFhus8SvkaYnhvW92p9Q==", - "dev": true, - "requires": { - "jsesc": "~3.1.0" - } - }, "remark-footnotes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/remark-footnotes/-/remark-footnotes-3.0.0.tgz", @@ -11520,15 +8284,6 @@ "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", "dev": true }, - "requizzle": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/requizzle/-/requizzle-0.2.4.tgz", - "integrity": "sha512-JRrFk1D4OQ4SqovXOgdav+K8EAhSB/LJZqCz8tbX0KObcdeM15Ss59ozWMBWmmINMagCwmqn4ZNryUGpBsl6Jw==", - "dev": true, - "requires": { - "lodash": "^4.17.21" - } - }, "resolve": { "version": "1.22.11", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.11.tgz", @@ -11540,6 +8295,12 @@ "supports-preserve-symlinks-flag": "^1.0.0" } }, + "resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true + }, "reusify": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", @@ -11571,40 +8332,18 @@ "@rolldown/pluginutils": "^1.0.0" } }, - "rollup": { - "version": "4.62.5", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.62.5.tgz", - "integrity": "sha512-/tqMfgP7GPA3PHhCmuiS4vIjrSVhHLgY++i+dhbG462euyAj7FpM4D9uq1X3BgjlqRdpcOrYhcQtfiQLNc8tqw==", - "dev": true, - "requires": { - "@napi-rs/lzma-linux-x64-gnu": "1.5.1", - "@rollup/rollup-android-arm-eabi": "4.62.5", - "@rollup/rollup-android-arm64": "4.62.5", - "@rollup/rollup-darwin-arm64": "4.62.5", - "@rollup/rollup-darwin-x64": "4.62.5", - "@rollup/rollup-freebsd-arm64": "4.62.5", - "@rollup/rollup-freebsd-x64": "4.62.5", - "@rollup/rollup-linux-arm-gnueabihf": "4.62.5", - "@rollup/rollup-linux-arm-musleabihf": "4.62.5", - "@rollup/rollup-linux-arm64-gnu": "4.62.5", - "@rollup/rollup-linux-arm64-musl": "4.62.5", - "@rollup/rollup-linux-loong64-gnu": "4.62.5", - "@rollup/rollup-linux-loong64-musl": "4.62.5", - "@rollup/rollup-linux-ppc64-gnu": "4.62.5", - "@rollup/rollup-linux-ppc64-musl": "4.62.5", - "@rollup/rollup-linux-riscv64-gnu": "4.62.5", - "@rollup/rollup-linux-riscv64-musl": "4.62.5", - "@rollup/rollup-linux-s390x-gnu": "4.62.5", - "@rollup/rollup-linux-x64-gnu": "4.62.5", - "@rollup/rollup-linux-x64-musl": "4.62.5", - "@rollup/rollup-openbsd-x64": "4.62.5", - "@rollup/rollup-openharmony-arm64": "4.62.5", - "@rollup/rollup-win32-arm64-msvc": "4.62.5", - "@rollup/rollup-win32-ia32-msvc": "4.62.5", - "@rollup/rollup-win32-x64-gnu": "4.62.5", - "@rollup/rollup-win32-x64-msvc": "4.62.5", - "@types/estree": "1.0.9", - "fsevents": "~2.3.2" + "rolldown-plugin-dts": { + "version": "0.27.14", + "resolved": "https://registry.npmjs.org/rolldown-plugin-dts/-/rolldown-plugin-dts-0.27.14.tgz", + "integrity": "sha512-ZvuDDwoIpRK9RPxDXratCpklFO9QZZWndf/sd0VBFb4LEj0jj07UcHK9OCh7V4XiFz2Z89ziyBC2K6tJiDjrbw==", + "dev": true, + "requires": { + "dts-resolver": "^3.0.0", + "get-tsconfig": "5.0.0-beta.5", + "obug": "^2.1.4", + "yuku-ast": "^0.8.0", + "yuku-codegen": "^0.8.0", + "yuku-parser": "^0.8.0" } }, "run-parallel": { @@ -11616,18 +8355,6 @@ "queue-microtask": "^1.2.2" } }, - "semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true - }, - "serialize-javascript": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-7.0.5.tgz", - "integrity": "sha512-F4LcB0UqUl1zErq+1nYEEzSHJnIwb3AF2XWB94b+afhrekOUijwooAYqFyRbjYkm2PAKBabx6oYv/xDxNi8IBw==", - "dev": true - }, "shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -11655,34 +8382,12 @@ "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true }, - "smob": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/smob/-/smob-1.5.0.tgz", - "integrity": "sha512-g6T+p7QO8npa+/hNx9ohv1E5pVCmWrVCUzUXJyLdMmftX6ER0oiWY/w9knEonLpnOp6b6FenKnMfR8gqwWdwig==", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, "source-map-js": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", "dev": true }, - "source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, "spdx-correct": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", @@ -11742,12 +8447,6 @@ "min-indent": "^1.0.0" } }, - "strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true - }, "structured-source": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/structured-source/-/structured-source-4.0.0.tgz", @@ -11763,18 +8462,6 @@ "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", "dev": true }, - "terser": { - "version": "5.31.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.31.0.tgz", - "integrity": "sha512-Q1JFAoUKE5IMfI4Z/lkE/E6+SwgzO+x4tq4v1AyBLRj8VSYvRO6A/rQrPg1yud4g0En9EKI1TvFRF2tQFcoUkg==", - "dev": true, - "requires": { - "@jridgewell/source-map": "^0.3.3", - "acorn": "^8.8.2", - "commander": "^2.20.0", - "source-map-support": "~0.5.20" - } - }, "tinybench": { "version": "2.9.0", "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", @@ -11833,6 +8520,12 @@ "integrity": "sha512-7HWQwQ9US+tJSMMzi1aP+KA3QwfjDs8sB4H5GBMRHFNBMQVdgoF6VfIFy2nJR/UHRTkYoGFwWh2pe+QIwSvfOA==", "dev": true }, + "tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true + }, "trim-newlines": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz", @@ -11852,6 +8545,37 @@ "dev": true, "requires": {} }, + "tsdown": { + "version": "0.22.14", + "resolved": "https://registry.npmjs.org/tsdown/-/tsdown-0.22.14.tgz", + "integrity": "sha512-ule7Y+fsAN2iZbLDoo7C4KYljFJNJJ+fLshyn+9gozeTspVersWHxwdGB+Dm2hzA38s6muFnUTl0jK3vJm9ifQ==", + "dev": true, + "requires": { + "ansis": "^4.3.1", + "cac": "^7.0.0", + "defu": "^6.1.7", + "empathic": "^2.0.1", + "hookable": "^6.1.1", + "import-without-cache": "^0.4.0", + "obug": "^2.1.4", + "picomatch": "^4.0.5", + "rolldown": "~1.2.0", + "rolldown-plugin-dts": "^0.27.13", + "tinyexec": "^1.2.4", + "tinyglobby": "^0.2.17", + "tree-kill": "^1.2.2", + "unconfig-core": "^7.5.0", + "verkit": "^0.3.0" + }, + "dependencies": { + "picomatch": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", + "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", + "dev": true + } + } + }, "type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -11937,11 +8661,15 @@ "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==", "dev": true }, - "underscore": { - "version": "1.13.8", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.8.tgz", - "integrity": "sha512-DXtD3ZtEQzc7M8m4cXotyHR+FAS18C64asBYY5vqZexfYryNNnDc02W4hKg3rdQuqOYas1jkseX0+nZXjTXnvQ==", - "dev": true + "unconfig-core": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/unconfig-core/-/unconfig-core-7.5.0.tgz", + "integrity": "sha512-Su3FauozOGP44ZmKdHy2oE6LPjk51M/TRRjHv2HNCWiDvfvCoxC2lno6jevMA91MYAdCdwP05QnWdWpSbncX/w==", + "dev": true, + "requires": { + "@quansync/fs": "^1.0.0", + "quansync": "^1.0.0" + } }, "undici-types": { "version": "8.3.0", @@ -11949,34 +8677,6 @@ "integrity": "sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ==", "dev": true }, - "unicode-canonical-property-names-ecmascript": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.1.tgz", - "integrity": "sha512-dA8WbNeb2a6oQzAQ55YlT5vQAWGV9WXOsi3SskE3bcCdM0P4SDd+24zS/OCacdRq5BkdsRj9q3Pg6YyQoxIGqg==", - "dev": true - }, - "unicode-match-property-ecmascript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", - "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", - "dev": true, - "requires": { - "unicode-canonical-property-names-ecmascript": "^2.0.0", - "unicode-property-aliases-ecmascript": "^2.0.0" - } - }, - "unicode-match-property-value-ecmascript": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.2.1.tgz", - "integrity": "sha512-JQ84qTuMg4nVkx8ga4A16a1epI9H6uTXAknqxkGF/aFfRLw1xC/Bp24HNLaZhHSkWd3+84t8iXnp1J0kYcZHhg==", - "dev": true - }, - "unicode-property-aliases-ecmascript": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.2.0.tgz", - "integrity": "sha512-hpbDzxUY9BFwX+UeBnxv3Sh1q7HFxj48DTmXchNgRa46lO8uj3/1iEn3MiNUYTg1g9ctIqXCCERn8gYZhHC5lQ==", - "dev": true - }, "unified": { "version": "9.2.2", "resolved": "https://registry.npmjs.org/unified/-/unified-9.2.2.tgz", @@ -12040,16 +8740,6 @@ } } }, - "update-browserslist-db": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz", - "integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==", - "dev": true, - "requires": { - "escalade": "^3.2.0", - "picocolors": "^1.1.1" - } - }, "uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -12069,6 +8759,12 @@ "spdx-expression-parse": "^3.0.0" } }, + "verkit": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/verkit/-/verkit-0.3.2.tgz", + "integrity": "sha512-zj/ob3UsvJGN0whEAKFp53REA5X66hvffVqoCtVQAakJKnKlH+/PcOfMoFwIG/o4rElqLv/ycAFlx8ZlXUorCg==", + "dev": true + }, "vfile": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/vfile/-/vfile-4.2.1.tgz", @@ -12184,24 +8880,6 @@ "stackback": "0.0.2" } }, - "workerpool": { - "version": "9.3.4", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-9.3.4.tgz", - "integrity": "sha512-TmPRQYYSAnnDiEB0P/Ytip7bFGvqnSU6I2BcuSw7Hx+JSg/DsUi5ebYfc8GYaSdpuvOcEs6dXxPurOYpe9QFwg==", - "dev": true - }, - "xmlcreate": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.4.tgz", - "integrity": "sha512-nquOebG4sngPmGPICTS5EnxqhKbCmz5Ox5hsszI2T6U5qdrJizBc+0ilYSEjTSzU0yZcmvppztXe/5Al5fUwdg==", - "dev": true - }, - "yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true - }, "yaml": { "version": "2.9.0", "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.9.0.tgz", @@ -12220,6 +8898,58 @@ "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true }, + "yuku-ast": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/yuku-ast/-/yuku-ast-0.8.7.tgz", + "integrity": "sha512-h6+4bDfyootiMB9vckk5uKo5r5j0GHrkr17FQTDNfEsFT3DWlN9uu1HJwQwc64pgmLCI945fWM3lbTIqxjT3GQ==", + "dev": true, + "requires": { + "@yuku-toolchain/types": "^0.8.7" + } + }, + "yuku-codegen": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/yuku-codegen/-/yuku-codegen-0.8.7.tgz", + "integrity": "sha512-adwDZSh8oVDzhE6Du9PwVWxcOxeV0e2EVhUuMKWfhSY4wkrDq9eqixlxFF3l/XGUV1E7UFzhpz9393MUumkyNw==", + "dev": true, + "requires": { + "@yuku-codegen/binding-android-arm64": "0.8.7", + "@yuku-codegen/binding-darwin-arm64": "0.8.7", + "@yuku-codegen/binding-darwin-x64": "0.8.7", + "@yuku-codegen/binding-freebsd-x64": "0.8.7", + "@yuku-codegen/binding-linux-arm-gnu": "0.8.7", + "@yuku-codegen/binding-linux-arm-musl": "0.8.7", + "@yuku-codegen/binding-linux-arm64-gnu": "0.8.7", + "@yuku-codegen/binding-linux-arm64-musl": "0.8.7", + "@yuku-codegen/binding-linux-x64-gnu": "0.8.7", + "@yuku-codegen/binding-linux-x64-musl": "0.8.7", + "@yuku-codegen/binding-win32-arm64": "0.8.7", + "@yuku-codegen/binding-win32-x64": "0.8.7", + "@yuku-toolchain/types": "^0.8.7" + } + }, + "yuku-parser": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/yuku-parser/-/yuku-parser-0.8.7.tgz", + "integrity": "sha512-vRD9nwt4L3aYpxNqeSC4WqLv58xrXef0Ong1Mc45CTXTIpvLafx7JO05sczmQZwdLEZvywrLOGdNC5+Rp5N1BQ==", + "dev": true, + "requires": { + "@yuku-parser/binding-android-arm64": "0.8.7", + "@yuku-parser/binding-darwin-arm64": "0.8.7", + "@yuku-parser/binding-darwin-x64": "0.8.7", + "@yuku-parser/binding-freebsd-x64": "0.8.7", + "@yuku-parser/binding-linux-arm-gnu": "0.8.7", + "@yuku-parser/binding-linux-arm-musl": "0.8.7", + "@yuku-parser/binding-linux-arm64-gnu": "0.8.7", + "@yuku-parser/binding-linux-arm64-musl": "0.8.7", + "@yuku-parser/binding-linux-x64-gnu": "0.8.7", + "@yuku-parser/binding-linux-x64-musl": "0.8.7", + "@yuku-parser/binding-win32-arm64": "0.8.7", + "@yuku-parser/binding-win32-x64": "0.8.7", + "@yuku-toolchain/types": "^0.8.7", + "yuku-ast": "^0.8.7" + } + }, "zwitch": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-1.0.5.tgz", diff --git a/package.json b/package.json index a31214b..3bbd94b 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "author": "Borgar Þorsteinsson ", "version": "3.2.6", "scripts": { - "build": "NODE_ENV=production rollup -c", + "build": "NODE_ENV=production tsdown", "build:all": "npm run build && npm run docs", "docs": "typedoc && concat-md tempdocs > API.md && rm -rf tempdocs", "check": "npm run test && npm run lint && npm run typecheck", @@ -14,16 +14,30 @@ "test-all": "vitest run", "typecheck": "tsc --noEmit" }, - "main": "dist/numfmt.js", - "types": "dist/numfmt.d.ts", - "module": "lib/index.ts", + "main": "dist/index.cjs", + "types": "dist/index.d.cts", + "module": "dist/index.js", "exports": { ".": { - "require": "./dist/numfmt.js", - "types": "./dist/numfmt.d.ts", - "default": "./lib/index.ts" + "require": "./dist/index.cjs", + "types": "./dist/index.d.cts", + "default": "./dist/index.js" } }, + "files": [ + "dist", + "API.md", + "LICENSE", + "README.md" + ], + "tsdown": [ + { + "entry": [ "lib/index.ts" ], + "platform": "neutral", + "format": [ "esm", "cjs" ], + "sourcemap": true + } + ], "preferGlobal": false, "repository": { "type": "git", @@ -39,25 +53,21 @@ "xls", "xlsx", "number", + "numberformat", "date", "format", "formatter" ], "license": "MIT", "devDependencies": { - "@babel/core": "^7.29.7", - "@babel/preset-env": "~7.29.7", "@borgar/eslint-config": "~4.1.0", "@eslint/js": "~10.0.1", - "@rollup/plugin-babel": "~7.1.0", - "@rollup/plugin-terser": "~1.0.0", "@types/node": "~26.3.0", "concat-md": "~0.5.1", "eslint": "~10.9.1", "globals": "~17.11.0", - "jsdoc": "~4.0.5", - "rollup": "~4.62.5", "typedoc": "~0.28.20", + "tsdown": "~0.22.14", "typedoc-plugin-markdown": "~4.12.0", "typescript": "~5.9.3", "typescript-eslint": "~8.68.0", From d9ce2d14a56b4f7fa4a8849eee92a6e373b71baf Mon Sep 17 00:00:00 2001 From: Borgar Date: Fri, 28 Aug 2026 21:25:47 +0000 Subject: [PATCH 12/14] A heap of minor fixes to docs and interface --- API.md | 173 +++++++++---- lib/dec2frac.ts | 5 +- lib/formatInfo.ts | 13 +- lib/index.ts | 48 ++-- lib/locale.ts | 630 ++++++++++++++++++++++++++-------------------- lib/options.ts | 4 +- lib/parseValue.ts | 8 +- lib/serialDate.ts | 6 +- test/info.spec.ts | 2 +- 9 files changed, 527 insertions(+), 362 deletions(-) diff --git a/API.md b/API.md index 95e9887..ab46c0f 100644 --- a/API.md +++ b/API.md @@ -9,11 +9,13 @@ software does. ## Type Aliases +- [DayNames](#type-aliasesdaynamesmd) - [FormatDateInfo](#type-aliasesformatdateinfomd) - [FormatInfo](#type-aliasesformatinfomd) - [FormatOptions](#type-aliasesformatoptionsmd) - [LocaleData](#type-aliaseslocaledatamd) - [LocaleToken](#type-aliaseslocaletokenmd) +- [MonthNames](#type-aliasesmonthnamesmd) - [ParseDataBool](#type-aliasesparsedataboolmd) - [ParseDataNum](#type-aliasesparsedatanummd) - [Token](#type-aliasestokenmd) @@ -24,6 +26,7 @@ software does. - [addLocale](#functionsaddlocalemd) - [dateFromSerial](#functionsdatefromserialmd) - [dateToSerial](#functionsdatetoserialmd) +- [dec2frac](#functionsdec2fracmd) - [format](#functionsformatmd) - [formatColor](#functionsformatcolormd) - [getFormatDateInfo](#functionsgetformatdateinfomd) @@ -33,6 +36,7 @@ software does. - [isPercentFormat](#functionsispercentformatmd) - [isTextFormat](#functionsistextformatmd) - [isValidFormat](#functionsisvalidformatmd) +- [listLocales](#functionslistlocalesmd) - [parseBool](#functionsparseboolmd) - [parseDate](#functionsparsedatemd) - [parseLocale](#functionsparselocalemd) @@ -48,19 +52,19 @@ software does. # addLocale() ```ts -function addLocale(localeSettings: Partial, l4e: string): LocaleData; +function addLocale(localeSettings: Partial, l4e: string | LocaleToken): LocaleData; ``` Register locale data for a language to use when formatting. -Any partial set of properties may be returned to have the defaults used where properties are missing. +Any partial set of properties may be provided to have the defaults used where properties are missing. ## Parameters | Parameter | Type | Description | | ------ | ------ | ------ | | `localeSettings` | `Partial`\<[`LocaleData`](#type-aliaseslocaledatamd)\> | A collection of settings for a locale. | -| `l4e` | `string` | A string BCP 47 tag of the locale. | +| `l4e` | `string` \| [`LocaleToken`](#type-aliaseslocaletokenmd) | A string BCP 47 tag of the locale. | ## Returns @@ -99,7 +103,7 @@ dateFromSerial(28627); // [ 1978, 5, 17, 0, 0, 0 ] \[`number`, `number`, `number`, `number`, `number`, `number`\] -returns an array of date parts with parts in descending order: [ year, month, day, hour, minute, second ] +An array of date parts with parts in descending order: [ year, month, day, hour, minute, second ] @@ -115,7 +119,7 @@ function dateToSerial(date: number[] | Date, options?: { Convert a native JavaScript Date, or an array of date parts to an spreadsheet serial date. Returns a serial date number if input was a Date object or an array of -numbers, else a null. +numbers, else an undefined. ```js // input as Date @@ -123,7 +127,7 @@ dateToSerial(new Date(1978, 5, 17)); // 28627 // input as [ Y, M, D, h, m, s ] dateToSerial([ 1978, 5, 17 ]); // 28627 // other input -dateToSerial("something else"); // null +dateToSerial("something else"); // undefined ``` ## Parameters @@ -141,6 +145,35 @@ dateToSerial("something else"); // null The date as a spreadsheet serial date, or undefined. + + +# dec2frac() + +```ts +function dec2frac( + number: number, + numeratorMaxDigits?: number, + denominatorMaxDigits?: number): [number, number]; +``` + +Split a fractional number into a numerator and denominator for display as +vulgar fractions. + +## Parameters + +| Parameter | Type | Default value | Description | +| ------ | ------ | ------ | ------ | +| `number` | `number` | `undefined` | The value to split | +| `numeratorMaxDigits?` | `number` | `2` | Maximum digits the numerator may have. | +| `denominatorMaxDigits?` | `number` | `2` | Maximum digits the denominator may have. | + +## Returns + +\[`number`, `number`\] + +Tuple of two numbers, numerator and denominator. + + # format() @@ -155,7 +188,8 @@ function format( Formats a value as a string and returns the result. - Dates are normalized to spreadsheet style serial dates and then formatted. -- Booleans are emitted as uppercase `TRUE` or `FALSE`. +- Booleans are emitted as uppercase `TRUE` or `FALSE` by default, but will + be subject to locale (see [LocaleData](#type-aliaseslocaledatamd)). - `null` and `undefined` will return an empty string `""`. - Any non number values will be stringified and passed through the text section of the format pattern. - `NaN`s and `Infinite`s will use the corresponding strings from the active locale. @@ -211,7 +245,7 @@ console.log(color); // undefined | `options?` | \{ `ignoreTimezone?`: `boolean`; `indexColors?`: `boolean`; `throws?`: `boolean`; \} | Formatter options | | `options.ignoreTimezone?` | `boolean` | Normally when date objects are used with the formatter, time zone is taken into account. This makes the formatter ignore the timezone offset. `false` by default. | | `options.indexColors?` | `boolean` | When indexed color modifiers are used (`[Color 1]`) the formatter will convert the index into the corresponding hex color of the default palette. When this option is set to false, the number will instead by emitted allowing you to index against a custom palette. `true` by default. | -| `options.throws?` | `boolean` | Should the formatter throw an error if a provided pattern is invalid. If false, a formatter will be constructed which instead outputs an error string (see _invalid_ in this table). `true` by default. | +| `options.throws?` | `boolean` | Should the formatter throw an error if a provided pattern is invalid. If false, a formatter will be constructed which instead outputs an error string (see _invalid_ in [FormatOptions](#type-aliasesformatoptionsmd)). `true` by default. | ## Returns @@ -231,6 +265,9 @@ function getFormatDateInfo(pattern: string): FormatDateInfo; Gets information about how date codes are used in a format string. +Note that output will always be a format info, even in the case where the +format pattern is invalid and would cause the formatter to throw. + ## Parameters | Parameter | Type | Description | @@ -257,6 +294,9 @@ function getFormatInfo(pattern: string, options?: { Returns an object detailing the properties and internals of a format parsed format pattern. +Note that output will always be a format info, even in the case where the +format pattern is invalid and would cause the formatter to throw. + ## Parameters | Parameter | Type | Description | @@ -295,7 +335,11 @@ returns `undefined`. [`LocaleData`](#type-aliaseslocaledatamd) \| `undefined` -An object of format date properties if one was found. +An object of locale properties if one was found. + +## Throws + +If the locale tag is invalid. @@ -322,7 +366,7 @@ _either_ a number or date format. `boolean` -True if the specified pattern is date pattern, False otherwise. +True if the specified pattern is a date pattern, False otherwise. @@ -348,7 +392,7 @@ contains an unescaped percentage symbol. `boolean` -True if the specified pattern is date pattern, False otherwise. +True if the specified pattern is a percent pattern, False otherwise. @@ -376,7 +420,7 @@ For example `@` or `@" USD"` are text patterns but `#;@` is not. `boolean` -True if the specified pattern is date pattern, False otherwise. +True if the specified pattern is a text pattern, False otherwise. @@ -402,6 +446,23 @@ Determine if a given format pattern is valid. True if the specified pattern is valid, False otherwise. + + +# listLocales() + +```ts +function listLocales(): string[]; +``` + +Get a list of locales that are registered with the formatter. + +## Returns + +`string`[] + +A list of locale tags + + # parseBool() @@ -430,7 +491,7 @@ returns an object with a single property: [`ParseDataBool`](#type-aliasesparsedataboolmd) \| `undefined` -An object of the parsed value and a corresponding format string +An object of the parsed value @@ -488,6 +549,10 @@ Irregular tags and subtags are not supported. An object describing the locale. +## Throws + +If the locale tag is invalid. + @@ -500,7 +565,7 @@ function parseNumber(value: string, options?: { ``` Parse a numeric string input and return its value and format. If the input -was not recognized or valid, the function returns a `undefined`, for valid input +was not recognized or valid, the function returns an `undefined`, for valid input it returns an object with two properties: * `v`: the parsed value. @@ -532,7 +597,7 @@ function parseTime(value: string, options?: { ``` Parse a time string input and return its value and format. If the input was -not recognized or valid, the function returns a `undefined`, for valid input it +not recognized or valid, the function returns an `undefined`, for valid input it returns an object with two properties: - `v`: the parsed value. @@ -542,7 +607,7 @@ returns an object with two properties: | Parameter | Type | Description | | ------ | ------ | ------ | -| `value` | `string` | The date to parse | +| `value` | `string` | The string to parse | | `options?` | \{ `locale?`: `string`; \} | Options for the parser | | `options.locale?` | `string` | A BCP 47 string tag. Locale default is english with a `\u00a0` grouping symbol (see [addLocale](#addLocale)) | @@ -686,6 +751,17 @@ The returned output will be an array of objects representing the tokens: A list of tokens + + +# DayNames + +```ts +type DayNames = [string, string, string, string, string, string, string]; +``` + +A list of the names of the days of the week, starting with Sunday. + + # FormatDateInfo @@ -804,7 +880,7 @@ Options that control the behavior of the formatter. | `dateErrorThrows` | `boolean` | Should the formatter throw an error when trying to format a date that is out of bounds? **Default** `false` | | `dateSpanLarge` | `boolean` | Extends the allowed range of dates from Excel bounds (1900–9999) to Google Sheet bounds (0–99999). **Default** `true` | | `fillChar` | `string` | When the formatter encounters `*` it normally emits nothing instead of the `*` and the next character (like Excel TEXT function does). Setting this to a character will make the formatter emit that followed by the next one. **Default** `''` | -| `grouping` | \[`number`, `number`\] \| \[`number`\] | Integer grouping sizes. You may desire to emit numbers in standards other than the common 3 digits per group (e.g. "123,456,789"). The first grouping size is used for the least significant integer group, and the second grouping size is used for more significant groups (e.g. `[3, 2]` => "12,34,56,789"). **Default** `[ 3 ]` | +| `grouping` | \[`number`, `number`\] \| \[`number`\] | Integer grouping sizes. You may desire to emit numbers in standards other than the common 3 digits per group (e.g. "123,456,789"). The first grouping size is used for the least significant integer group, and the second grouping size is used for more significant groups (e.g. `[3, 2]` => "12,34,56,789"). **Default** `[ 3, 3 ]` | | `ignoreTimezone` | `boolean` | Normally when date objects are used with the formatter, time zone is taken into account and the date is adjusted into UTC. This option makes the formatter ignore the timezone offset. **Default** `false` | | `indexColors` | `boolean` | Automatically resolve indexed colors to hex when outputting colors (red => #f00); When indexed color modifiers are used (`[Color 1]`) the formatter will convert the index into the corresponding hex color of the default palette. When this option is set to false, the number will instead by emitted allowing you to index against a custom palette. **Default** `true` | | `invalid` | `string` | The string emitted when formatter fails to parse a pattern and has been instructed not to throw an error. **Default** `'######'` | @@ -813,7 +889,7 @@ Options that control the behavior of the formatter. | `nbsp` | `boolean` | Emit regular vs. non-breaking spaces. By default the output will use a regular space, but in many cases you may desire a non-breaking-space instead. **Default** `false` | | `overflow` | `string` | The string emitted when a formatter fails to format a date that is out of bounds. Both `dateErrorThrows` and `dateErrorNumber` override this setting. **Default** `'######'` | | `skipChar` | `string` | When the formatter encounters `_` it normally emits a single space instead of the `_` and the next character (like Excel TEXT function does). Setting this to a character will make the formatter emit that followed by the next one. **Default** `''` | -| `throws` | `boolean` | Should the formatter throw an error if a provided pattern is invalid. If false, a formatter will be constructed which instead outputs an error string (see _invalid_ in this table). **Default** `true` | +| `throws` | `boolean` | Should the formatter throw an error if a provided pattern is invalid. If false, a formatter will be constructed which instead outputs an error string (see _invalid_ in this type). **Default** `true` | @@ -822,18 +898,18 @@ Options that control the behavior of the formatter. ```ts type LocaleData = { - ampm: string[]; - bool: string[]; - ddd: string[]; - dddd: string[]; + ampm: [string, string]; + bool: [string, string]; + ddd: DayNames; + dddd: DayNames; decimal: string; exponent: string; group: string; infinity: string; - mmm: string[]; - mmm6: string[]; - mmmm: string[]; - mmmm6: string[]; + mmm: MonthNames; + mmm6: MonthNames; + mmmm: MonthNames; + mmmm6: MonthNames; nan: string; negative: string; percent: string; @@ -848,23 +924,23 @@ An object of properties used by a formatter when printing a number in a certain | Property | Type | Description | | ------ | ------ | ------ | -| `ampm` | `string`[] | How AM and PM should be presented | -| `bool` | `string`[] | How TRUE and FALSE should be presented | -| `ddd` | `string`[] | Shortened day names (`Wed`) | -| `dddd` | `string`[] | Long day names (`Wednesday`) | -| `decimal` | `string` | Symbol used to separate integers from fractions (usually `.`) | -| `exponent` | `string` | Symbol used to indicate an exponent (usually `E`) | -| `group` | `string` | Symbol used as a grouping separator (`1,000,000` uses `,`) | -| `infinity` | `string` | Symbol used to indicate infinite values (`∞`) | -| `mmm` | `string`[] | Short month names for the Gregorian calendar (`Nov`) | -| `mmm6` | `string`[] | Short month names for the Islamic calendar (`Raj.`) | -| `mmmm` | `string`[] | Long month names for the Gregorian calendar (`November`) | -| `mmmm6` | `string`[] | Long month names for the Islamic calendar (`Rajab`) | -| `nan` | `string` | Symbol used to indicate NaN values (`NaN`) | -| `negative` | `string` | Symbol used to indicate positive numbers (usually `-`) | -| `percent` | `string` | Symbol used to indicate a percentage (usually `%`) | -| `positive` | `string` | Symbol used to indicate positive numbers (usually `+`) | -| `preferMDY` | `boolean` | Is the prefered date format month first (12/31/2025) or day first (31/12/2025) | +| `ampm` | \[`string`, `string`\] | How AM and PM should be presented. **Default** `["AM", "PM"]` | +| `bool` | \[`string`, `string`\] | How TRUE and FALSE should be presented. **Default** `["TRUE", "FALSE"]` | +| `ddd` | [`DayNames`](#type-aliasesdaynamesmd) | Shortened day names (`Wed`). **Default** `["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]` | +| `dddd` | [`DayNames`](#type-aliasesdaynamesmd) | Long day names (`Wednesday`). **Default** `["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]` | +| `decimal` | `string` | Symbol used to separate integers from fractions (usually `.`). **Default** `"."` | +| `exponent` | `string` | Symbol used to indicate an exponent (usually `E`). **Default** `"E"` | +| `group` | `string` | Symbol used as a grouping separator (`1,000,000` uses `,`). **Default** `"\u00a0"` | +| `infinity` | `string` | Symbol used to indicate infinite values (`∞`). **Default** `"∞"` | +| `mmm` | [`MonthNames`](#type-aliasesmonthnamesmd) | Short month names for the Gregorian calendar (`Nov`). **Default** `["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]` | +| `mmm6` | [`MonthNames`](#type-aliasesmonthnamesmd) | Short month names for the Islamic calendar (`Raj.`). **Default** `["Muh.", "Saf.", "Rab. I", "Rab. II", "Jum. I", "Jum. II", "Raj.", "Sha.", "Ram.", "Shaw.", "Dhuʻl-Q.", "Dhuʻl-H."]` | +| `mmmm` | [`MonthNames`](#type-aliasesmonthnamesmd) | Long month names for the Gregorian calendar (`November`). **Default** `["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]` | +| `mmmm6` | [`MonthNames`](#type-aliasesmonthnamesmd) | Long month names for the Islamic calendar (`Rajab`). **Default** `["Muharram", "Safar", "Rabiʻ I", "Rabiʻ II", "Jumada I", "Jumada II", "Rajab", "Shaʻban", "Ramadan", "Shawwal", "Dhuʻl-Qiʻdah", "Dhuʻl-Hijjah"]` | +| `nan` | `string` | Symbol used to indicate NaN values (`NaN`). **Default** `"NaN"` | +| `negative` | `string` | Symbol used to indicate positive numbers (usually `-`). **Default** `"-"` | +| `percent` | `string` | Symbol used to indicate a percentage (usually `%`). **Default** `"%"` | +| `positive` | `string` | Symbol used to indicate positive numbers (usually `+`). **Default** `"+"` | +| `preferMDY` | `boolean` | Is the prefered date format month first (12/31/2025) or day first (31/12/2025). **Default** `false` | @@ -894,6 +970,17 @@ An object of properties for a locale tag. | `territory` | `string` | The territory section (`CN` for `zh-CN`) | + + +# MonthNames + +```ts +type MonthNames = [string, string, string, string, string, string, string, string, string, string, string, string]; +``` + +A list of the names of the months of the year. + + # ParseDataBool diff --git a/lib/dec2frac.ts b/lib/dec2frac.ts index 07ca96f..90f51ae 100644 --- a/lib/dec2frac.ts +++ b/lib/dec2frac.ts @@ -5,10 +5,9 @@ const PRECISION = 1e-13; * Split a fractional number into a numerator and denominator for display as * vulgar fractions. * - * @internal * @param number The value to split - * @param [numeratorMaxDigits=2] The maxdigits number - * @param [denominatorMaxDigits=2] The maxdigits de + * @param [numeratorMaxDigits=2] Maximum digits the numerator may have. + * @param [denominatorMaxDigits=2] Maximum digits the denominator may have. * @returns Tuple of two numbers, numerator and denominator. */ export function dec2frac ( diff --git a/lib/formatInfo.ts b/lib/formatInfo.ts index 7881b6d..bad0d37 100644 --- a/lib/formatInfo.ts +++ b/lib/formatInfo.ts @@ -44,7 +44,7 @@ const level = { error: 0 }; -const dateCodes = [ +const dateCodes: [ string, number ][] = [ [ 'DMY', 1 ], [ 'DM', 2 ], [ 'MY', 3 ], @@ -83,7 +83,7 @@ export function info (partitions: Partition[], currencyId?: string): FormatInfo )); let codeType = 'G'; - let codeNum = (frac_max >= 0) ? Math.min(15, frac_max) : ''; + let codeNum = (frac_max >= 0) ? Math.min(15, frac_max) : 0; let codeParens = ''; let codeDash = ''; @@ -150,25 +150,22 @@ export function info (partitions: Partition[], currencyId?: string): FormatInfo else if (!haveDate && haveTime) { output.type = 'time'; } - const code = dateCodes.find(d => order.startsWith(d[0] as string)); + const code = dateCodes.find(d => order.startsWith(d[0])); codeType = code ? 'D' : 'G'; - codeNum = code ? code[1] : ''; + codeNum = code ? code[1] : 0; } else if (output.isText) { codeType = 'G'; output.type = 'text'; - codeNum = ''; output.maxDecimals = 0; } else if (partPos.general) { codeType = 'G'; output.type = 'general'; - codeNum = ''; } else if (partPos.fractions) { codeType = 'G'; output.type = 'fraction'; - codeNum = ''; } else if (partPos.exponential) { codeType = 'S'; @@ -187,7 +184,7 @@ export function info (partitions: Partition[], currencyId?: string): FormatInfo output.type = 'number'; } - output.code = codeType + codeNum + codeDash + codeParens; + output.code = codeType + (codeType === 'G' ? '' : codeNum) + codeDash + codeParens; // Excel can combine some codes, but not all. // When integer value of two is equal and it can't combine, diff --git a/lib/index.ts b/lib/index.ts index 574aa58..f8f7927 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -12,12 +12,14 @@ import { TOKEN_ERROR } from './constants.ts'; export { getLocale, parseLocale, - addLocale + addLocale, + listLocales } from './locale.ts'; import { defaultOptions, type FormatOptions } from './options.ts'; export { round } from './round.ts'; +export { dec2frac } from './dec2frac.ts'; export type { FormatOptions } from './options.ts'; export type { ParseDataBool, ParseDataNum } from './parseValue.ts'; export type { @@ -29,7 +31,7 @@ export type { /** * @ignore */ -export type { +export { TOKEN_GENERAL, TOKEN_HASH, TOKEN_ZERO, TOKEN_QMARK, TOKEN_SLASH, TOKEN_GROUP, TOKEN_SCALE, TOKEN_COMMA, TOKEN_BREAK, TOKEN_TEXT, TOKEN_PLUS, TOKEN_MINUS, TOKEN_POINT, TOKEN_SPACE, TOKEN_PERCENT, TOKEN_DIGIT, TOKEN_CALENDAR, TOKEN_ERROR, TOKEN_DATETIME, TOKEN_DURATION, TOKEN_CONDITION, TOKEN_DBNUM, TOKEN_NATNUM, TOKEN_LOCALE, TOKEN_COLOR, @@ -39,7 +41,7 @@ export type { import { dateToSerial as handleDates } from './serialDate.ts'; export { dateToSerial, dateFromSerial } from './serialDate.ts'; -export type { LocaleData, LocaleToken } from './locale.ts'; +export type { LocaleData, LocaleToken, MonthNames, DayNames } from './locale.ts'; export { parseNumber, @@ -52,19 +54,21 @@ export { import { formatColor as fmtColor, formatValue as fmtValue } from './formatNumber.ts'; import { info, dateInfo, isDate, isPercent, isText } from './formatInfo.ts'; import { parsePattern } from './parsePattern.ts'; -import type { FormatDateInfo, FormatInfo } from './types.ts'; +import type { FormatDateInfo, FormatInfo, PatternParseData } from './types.ts'; +import { createPartition } from './createPartition.ts'; export { tokenize } from './tokenize.ts'; -const _parseDataCache = Object.create({}); -function prepareFormatterData (pattern: string, shouldThrow = false) { +type CacheData = PatternParseData & { dateInfo?: FormatDateInfo, info?: FormatInfo }; +const _parseDataCache = new Map(); +function prepareFormatterData (pattern: string, shouldThrow = false): CacheData { if (!pattern) { pattern = 'General'; } - let parseData = _parseDataCache[pattern]; + let parseData = _parseDataCache.get(pattern); if (!parseData) { try { parseData = parsePattern(pattern); - _parseDataCache[pattern] = parseData; + _parseDataCache.set(pattern, parseData); } catch (err) { // if the options say to throw errors, then do so @@ -72,16 +76,14 @@ function prepareFormatterData (pattern: string, shouldThrow = false) { throw err; } // else we set the parsedata to error - const message = err && typeof err === 'object' && 'message' in err ? err.message : 'Unknown error'; - const errPart = { - tokens: [ { type: TOKEN_ERROR } ], - error: message - }; + const message = err && typeof err === 'object' && 'message' in err ? String(err.message) : 'Unknown error'; + const errPart = createPartition([ { type: TOKEN_ERROR } ]); + errPart.error = true; parseData = { pattern: pattern, partitions: [ errPart, errPart, errPart, errPart ], error: message, - locale: null + locale: undefined }; } } @@ -92,7 +94,8 @@ function prepareFormatterData (pattern: string, shouldThrow = false) { * Formats a value as a string and returns the result. * * - Dates are normalized to spreadsheet style serial dates and then formatted. - * - Booleans are emitted as uppercase `TRUE` or `FALSE`. + * - Booleans are emitted as uppercase `TRUE` or `FALSE` by default, but will + * be subject to locale (see {@link LocaleData}). * - `null` and `undefined` will return an empty string `""`. * - Any non number values will be stringified and passed through the text section of the format pattern. * - `NaN`s and `Infinite`s will use the corresponding strings from the active locale. @@ -133,7 +136,7 @@ export function format ( * @param [options.throws=true] * Should the formatter throw an error if a provided pattern is invalid. * If false, a formatter will be constructed which instead outputs an error - * string (see _invalid_ in this table). + * string (see _invalid_ in {@link FormatOptions}). * `true` by default. * @param [options.ignoreTimezone=false] * Normally when date objects are used with the formatter, time zone is taken @@ -152,6 +155,7 @@ export function format ( export function formatColor ( pattern: string, value: any, + // XXX: use Pick ? options?: { throws?: boolean; ignoreTimezone?: boolean; @@ -172,7 +176,7 @@ export function formatColor ( * _either_ a number or date format. * * @param pattern A format pattern in the ECMA-376 number format. - * @returns True if the specified pattern is date pattern, False otherwise. + * @returns True if the specified pattern is a date pattern, False otherwise. */ export function isDateFormat (pattern: string): boolean { const data = prepareFormatterData(pattern, false); @@ -186,7 +190,7 @@ export function isDateFormat (pattern: string): boolean { * contains an unescaped percentage symbol. * * @param pattern A format pattern in the ECMA-376 number format. - * @returns True if the specified pattern is date pattern, False otherwise. + * @returns True if the specified pattern is a percent pattern, False otherwise. */ export function isPercentFormat (pattern: string): boolean { const data = prepareFormatterData(pattern, false); @@ -202,7 +206,7 @@ export function isPercentFormat (pattern: string): boolean { * For example `@` or `@" USD"` are text patterns but `#;@` is not. * * @param pattern A format pattern in the ECMA-376 number format. - * @returns True if the specified pattern is date pattern, False otherwise. + * @returns True if the specified pattern is a text pattern, False otherwise. */ export function isTextFormat (pattern: string): boolean { const data = prepareFormatterData(pattern, false); @@ -229,6 +233,9 @@ export function isValidFormat (pattern: string): boolean { * Returns an object detailing the properties and internals of a format parsed * format pattern. * + * Note that output will always be a format info, even in the case where the + * format pattern is invalid and would cause the formatter to throw. + * * @param pattern A format pattern in the ECMA-376 number format. * @param [options={}] Options for the method * @param [options.currency] @@ -248,6 +255,9 @@ export function getFormatInfo (pattern: string, options: { currency?: string; } /** * Gets information about how date codes are used in a format string. * + * Note that output will always be a format info, even in the case where the + * format pattern is invalid and would cause the formatter to throw. + * * @param pattern A format pattern in the ECMA-376 number format. * @returns An object of format date properties. */ diff --git a/lib/locale.ts b/lib/locale.ts index ede82fc..8139ad9 100644 --- a/lib/locale.ts +++ b/lib/locale.ts @@ -4,43 +4,105 @@ import { codeToLocale } from './codeToLocale.ts'; const re_locale = /^([a-z\d]+)(?:[_-]([a-z\d]+))?(?:\.([a-z\d]+))?(?:@([a-z\d]+))?$/i; const locales: Record = {}; +/** + * A list of the names of the months of the year. + */ +export type MonthNames = [ + string, string, string, string, string, string, string, string, string, string, string, string +]; +/** + * A list of the names of the days of the week, starting with Sunday. + */ +export type DayNames = [ string, string, string, string, string, string, string ]; + /** * An object of properties used by a formatter when printing a number in a certain locale. */ export type LocaleData = { - /** Symbol used as a grouping separator (`1,000,000` uses `,`) */ + /** + * Symbol used as a grouping separator (`1,000,000` uses `,`). + * @default "\u00a0" + */ group: string; - /** Symbol used to separate integers from fractions (usually `.`) */ + /** + * Symbol used to separate integers from fractions (usually `.`). + * @default "." + */ decimal: string; - /** Symbol used to indicate positive numbers (usually `+`) */ + /** + * Symbol used to indicate positive numbers (usually `+`). + * @default "+" + */ positive: string; - /** Symbol used to indicate positive numbers (usually `-`) */ + /** + * Symbol used to indicate positive numbers (usually `-`). + * @default "-" + */ negative: string; - /** Symbol used to indicate a percentage (usually `%`) */ + /** + * Symbol used to indicate a percentage (usually `%`). + * @default "%" + */ percent: string; - /** Symbol used to indicate an exponent (usually `E`) */ + /** + * Symbol used to indicate an exponent (usually `E`). + * @default "E" + */ exponent: string; - /** Symbol used to indicate NaN values (`NaN`) */ + /** + * Symbol used to indicate NaN values (`NaN`). + * @default "NaN" + */ nan: string; - /** Symbol used to indicate infinite values (`∞`) */ + /** + * Symbol used to indicate infinite values (`∞`). + * @default "∞" + */ infinity: string; - /** How AM and PM should be presented */ - ampm: string[]; - /** Long month names for the Islamic calendar (`Rajab`) */ - mmmm6: string[]; - /** Short month names for the Islamic calendar (`Raj.`) */ - mmm6: string[]; - /** Long month names for the Gregorian calendar (`November`) */ - mmmm: string[]; - /** Short month names for the Gregorian calendar (`Nov`) */ - mmm: string[]; - /** Long day names (`Wednesday`) */ - dddd: string[]; - /** Shortened day names (`Wed`) */ - ddd: string[]; - /** How TRUE and FALSE should be presented */ - bool: string[]; - /** Is the prefered date format month first (12/31/2025) or day first (31/12/2025) */ + /** + * How AM and PM should be presented. + * @default ["AM", "PM"] + */ + ampm: [ string, string ]; + /** + * Long month names for the Islamic calendar (`Rajab`). + * @default ["Muharram", "Safar", "Rabiʻ I", "Rabiʻ II", "Jumada I", "Jumada II", "Rajab", "Shaʻban", "Ramadan", "Shawwal", "Dhuʻl-Qiʻdah", "Dhuʻl-Hijjah"] + */ + mmmm6: MonthNames; + /** + * Short month names for the Islamic calendar (`Raj.`). + * @default ["Muh.", "Saf.", "Rab. I", "Rab. II", "Jum. I", "Jum. II", "Raj.", "Sha.", "Ram.", "Shaw.", "Dhuʻl-Q.", "Dhuʻl-H."] + */ + mmm6: MonthNames; + /** + * Long month names for the Gregorian calendar (`November`). + * @default ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"] + */ + mmmm: MonthNames; + /** + * Short month names for the Gregorian calendar (`Nov`). + * @default ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"] + */ + mmm: MonthNames; + /** + * Long day names (`Wednesday`). + * @default ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"] + */ + dddd: DayNames; + /** + * Shortened day names (`Wed`). + * @default ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"] + */ + ddd: DayNames; + /** + * How TRUE and FALSE should be presented. + * @default ["TRUE", "FALSE"] + */ + bool: [ string, string ]; + /** + * Is the prefered date format month first (12/31/2025) or day first (31/12/2025). + * @default false + */ preferMDY: boolean; }; @@ -67,7 +129,9 @@ export type LocaleToken = { * @param [tilde] String to be inserted on every instance of ~ * @returns Array of strings */ -const _ = (str: string, tilde = ''): string[] => str.replace(/~/g, tilde).split(';'); +const _B = (str: string, tilde = '') => str.replaceAll('~', tilde).split(';') as [ string, string ]; +const _W = (str: string, tilde = '') => _B(str, tilde) as unknown as DayNames; +const _M = (str: string, tilde = '') => _B(str, tilde) as unknown as MonthNames; /** * Generate mmm and ddd properties as needed for locales. Many of them @@ -88,6 +152,7 @@ const _ = (str: string, tilde = ''): string[] => str.replace(/~/g, tilde).split( */ const xm = (o: Partial & Pick, ml: number = 0, dl: number = 0): Partial => { if (!o.mmm) { + // @ts-ignore o.mmm = ml < 1 ? o.mmmm.concat() : o.mmmm.map(d => { @@ -96,6 +161,7 @@ const xm = (o: Partial & Pick, ml: numb }); } if (!o.ddd) { + // @ts-ignore o.ddd = dl < 1 ? o.dddd.concat() : o.dddd.map(d => { @@ -119,14 +185,14 @@ const baseLocaleData: LocaleData = { exponent: 'E', nan: 'NaN', infinity: '∞', - ampm: _('AM;PM'), - mmmm6: _('Muharram;Safar;Rabiʻ I;Rabiʻ II;Jumada I;Jumada II;Rajab;Shaʻban;Ramadan;Shawwal;Dhuʻl-Qiʻdah;Dhuʻl-Hijjah'), - mmm6: _('Muh.;Saf.;Rab. I;Rab. II;Jum. I;Jum. II;Raj.;Sha.;Ram.;Shaw.;Dhuʻl-Q.;Dhuʻl-H.'), - mmmm: _('January;February;March;April;May;June;July;August;September;October;November;December'), - mmm: _('Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec'), - dddd: _('Sunday;Monday;Tuesday;Wednesday;Thursday;Friday;Saturday'), - ddd: _('Sun;Mon;Tue;Wed;Thu;Fri;Sat'), - bool: _('TRUE;FALSE'), + ampm: _B('AM;PM'), + mmmm6: _M('Muharram;Safar;Rabiʻ I;Rabiʻ II;Jumada I;Jumada II;Rajab;Shaʻban;Ramadan;Shawwal;Dhuʻl-Qiʻdah;Dhuʻl-Hijjah'), + mmm6: _M('Muh.;Saf.;Rab. I;Rab. II;Jum. I;Jum. II;Raj.;Sha.;Ram.;Shaw.;Dhuʻl-Q.;Dhuʻl-H.'), + mmmm: _M('January;February;March;April;May;June;July;August;September;October;November;December'), + mmm: _M('Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec'), + dddd: _W('Sunday;Monday;Tuesday;Wednesday;Thursday;Friday;Saturday'), + ddd: _W('Sun;Mon;Tue;Wed;Thu;Fri;Sat'), + bool: _B('TRUE;FALSE'), preferMDY: false }; @@ -136,11 +202,12 @@ const baseLocaleData: LocaleData = { * * @param locale A BCP 47 string tag of the locale. * @returns An object describing the locale. + * @throws If the locale tag is invalid. */ export function parseLocale (locale: string): LocaleToken { const lm = re_locale.exec(locale); if (!lm) { - throw new SyntaxError(`Malformed locale: ${locale}`); + throw new SyntaxError(`Invalid locale: ${locale}`); } return { lang: lm[1] + (lm[2] ? '-' + lm[2] : ''), @@ -174,7 +241,8 @@ export function resolveLocale (l4e: number | string): string | undefined { * returns `undefined`. * * @param locale A BCP 47 string tag of the locale, or an Excel locale code. - * @returns An object of format date properties if one was found. + * @returns An object of locale properties if one was found. + * @throws If the locale tag is invalid. */ export function getLocale (locale: string | number): LocaleData | undefined { const tag = resolveLocale(locale); @@ -194,7 +262,7 @@ export function createLocale (data: Partial): LocaleData { /** * Register locale data for a language to use when formatting. * - * Any partial set of properties may be returned to have the defaults used where properties are missing. + * Any partial set of properties may be provided to have the defaults used where properties are missing. * * @param localeSettings - A collection of settings for a locale. * @param [localeSettings.group="\u00a0"] @@ -229,12 +297,12 @@ export function createLocale (data: Partial): LocaleData { * Shortened day names (e.g. `Wed`) * @param [localeSettings.bool=["TRUE", "FALSE"]] * How TRUE and FALSE should be presented. - * @param {boolean} [localeSettings.preferMDY=false] + * @param [localeSettings.preferMDY=false] * Is the prefered date format month first (12/31/2025) or day first (31/12/2025) * @param l4e - A string BCP 47 tag of the locale. * @returns A full collection of settings for a locale */ -export function addLocale (localeSettings: Partial, l4e: string): LocaleData { +export function addLocale (localeSettings: Partial, l4e: string | LocaleToken): LocaleData { // parse language tag const c = typeof l4e === 'object' ? l4e : parseLocale(l4e); // add the language @@ -246,6 +314,10 @@ export function addLocale (localeSettings: Partial, l4e: string): Lo return locales[c.lang]; } +/** + * Get a list of locales that are registered with the formatter. + * @returns A list of locale tags + */ export function listLocales () { return Object.keys(locales); } @@ -255,80 +327,80 @@ defaultLocale.isDefault = true; addLocale({ group: ',', - ampm: _('上午;下午'), - mmmm: _('一月;二月;三月;四月;五月;六月;七月;八月;九月;十月;十一月;十二月'), - mmm: _('1月;2月;3月;4月;5月;6月;7月;8月;9月;10月;11月;12月'), - dddd: _('~日;~一;~二;~三;~四;~五;~六', '星期'), - ddd: _('周日;周一;周二;周三;周四;周五;周六') + ampm: _B('上午;下午'), + mmmm: _M('一月;二月;三月;四月;五月;六月;七月;八月;九月;十月;十一月;十二月'), + mmm: _M('1月;2月;3月;4月;5月;6月;7月;8月;9月;10月;11月;12月'), + dddd: _W('~日;~一;~二;~三;~四;~五;~六', '星期'), + ddd: _W('周日;周一;周二;周三;周四;周五;周六') }, 'zh-CN'); const _zh = { group: ',', - ampm: _('上午;下午'), - mmmm: _('1月;2月;3月;4月;5月;6月;7月;8月;9月;10月;11月;12月'), - mmm: _('1月;2月;3月;4月;5月;6月;7月;8月;9月;10月;11月;12月'), - dddd: _('~日;~一;~二;~三;~四;~五;~六', '星期'), - ddd: _('周日;周一;周二;周三;周四;周五;周六') + ampm: _B('上午;下午'), + mmmm: _M('1月;2月;3月;4月;5月;6月;7月;8月;9月;10月;11月;12月'), + mmm: _M('1月;2月;3月;4月;5月;6月;7月;8月;9月;10月;11月;12月'), + dddd: _W('~日;~一;~二;~三;~四;~五;~六', '星期'), + ddd: _W('周日;周一;周二;周三;周四;周五;周六') }; addLocale({ ..._zh, nan: '非數值', - dddd: _('~日;~一;~二;~三;~四;~五;~六', '星期') + dddd: _W('~日;~一;~二;~三;~四;~五;~六', '星期') }, 'zh-TW'); addLocale({ ..._zh, - dddd: _('~日;~一;~二;~三;~四;~五;~六', '星期') + dddd: _W('~日;~一;~二;~三;~四;~五;~六', '星期') }, 'zh-HK'); addLocale({ ..._zh, - ampm: _('午前;午後'), - dddd: _('日~;月~;火~;水~;木~;金~;土~', '曜日'), - ddd: _('日;月;火;水;木;金;土') + ampm: _B('午前;午後'), + dddd: _W('日~;月~;火~;水~;木~;金~;土~', '曜日'), + ddd: _W('日;月;火;水;木;金;土') }, 'ja'); addLocale({ group: ',', - ampm: _('오전;오후'), - mmmm: _('1월;2월;3월;4월;5월;6월;7월;8월;9월;10월;11월;12월'), - mmm: _('1월;2월;3월;4월;5월;6월;7월;8월;9월;10월;11월;12월'), - dddd: _('일요일;월요일;화요일;수요일;목요일;금요일;토요일'), - ddd: _('일;월;화;수;목;금;토') + ampm: _B('오전;오후'), + mmmm: _M('1월;2월;3월;4월;5월;6월;7월;8월;9월;10월;11월;12월'), + mmm: _M('1월;2월;3월;4월;5월;6월;7월;8월;9월;10월;11월;12월'), + dddd: _W('일요일;월요일;화요일;수요일;목요일;금요일;토요일'), + ddd: _W('일;월;화;수;목;금;토') }, 'ko'); addLocale({ group: ',', - ampm: _('ก่อนเที่ยง;หลังเที่ยง'), - mmmm: _('มกร~;กุมภาพันธ์;มีน~;เมษายน;พฤษภ~;มิถุนายน;กรกฎ~;สิงห~;กันยายน;ตุล~;พฤศจิกายน;ธันว~', 'าคม'), - mmm: _('ม.ค.;ก.พ.;มี.ค.;เม.ย.;พ.ค.;มิ.ย.;ก.ค.;ส.ค.;ก.ย.;ต.ค.;พ.ย.;ธ.ค.'), - dddd: _('วันอาทิตย์;วันจันทร์;วันอังคาร;วันพุธ;วันพฤหัสบดี;วันศุกร์;วันเสาร์'), - ddd: _('อา.;จ.;อ.;พ.;พฤ.;ศ.;ส.') + ampm: _B('ก่อนเที่ยง;หลังเที่ยง'), + mmmm: _M('มกร~;กุมภาพันธ์;มีน~;เมษายน;พฤษภ~;มิถุนายน;กรกฎ~;สิงห~;กันยายน;ตุล~;พฤศจิกายน;ธันว~', 'าคม'), + mmm: _M('ม.ค.;ก.พ.;มี.ค.;เม.ย.;พ.ค.;มิ.ย.;ก.ค.;ส.ค.;ก.ย.;ต.ค.;พ.ย.;ธ.ค.'), + dddd: _W('วันอาทิตย์;วันจันทร์;วันอังคาร;วันพุธ;วันพฤหัสบดี;วันศุกร์;วันเสาร์'), + ddd: _W('อา.;จ.;อ.;พ.;พฤ.;ศ.;ส.') }, 'th'); addLocale(xm({ decimal: ',', - ampm: _('dop.;odp.'), - mmmm: _('ledna;února;března;dubna;května;června;července;srpna;září;října;listopadu;prosince'), - mmm: _('I;II;III;IV;V;VI;VII;VIII;IX;X;XI;XII'), - dddd: _('neděle;pondělí;úterý;středa;čtvrtek;pátek;sobota'), - bool: _('PRAVDA;NEPRAVDA') + ampm: _B('dop.;odp.'), + mmmm: _M('ledna;února;března;dubna;května;června;července;srpna;září;října;listopadu;prosince'), + mmm: _M('I;II;III;IV;V;VI;VII;VIII;IX;X;XI;XII'), + dddd: _W('neděle;pondělí;úterý;středa;čtvrtek;pátek;sobota'), + bool: _B('PRAVDA;NEPRAVDA') }, -1, 2), 'cs'); addLocale(xm({ group: '.', decimal: ',', - mmmm: _('januar;februar;marts;april;maj;juni;juli;august;september;oktober;november;december'), - dddd: _('søn~;man~;tirs~;ons~;tors~;fre~;lør~', 'dag'), - bool: _('SAND;FALSK') + mmmm: _M('januar;februar;marts;april;maj;juni;juli;august;september;oktober;november;december'), + dddd: _W('søn~;man~;tirs~;ons~;tors~;fre~;lør~', 'dag'), + bool: _B('SAND;FALSK') }, 13, 13), 'da'); addLocale(xm({ group: '.', decimal: ',', - ampm: _('a.m.;p.m.'), - mmmm: _('januari;februari;maart;april;mei;juni;juli;augustus;september;oktober;november;december'), - mmm: _('jan.;feb.;mrt.;apr.;mei;jun.;jul.;aug.;sep.;okt.;nov.;dec.'), - dddd: _('zondag;maandag;dinsdag;woensdag;donderdag;vrijdag;zaterdag'), - bool: _('WAAR;ONWAAR') + ampm: _B('a.m.;p.m.'), + mmmm: _M('januari;februari;maart;april;mei;juni;juli;augustus;september;oktober;november;december'), + mmm: _M('jan.;feb.;mrt.;apr.;mei;jun.;jul.;aug.;sep.;okt.;nov.;dec.'), + dddd: _W('zondag;maandag;dinsdag;woensdag;donderdag;vrijdag;zaterdag'), + bool: _B('WAAR;ONWAAR') }, -1, 2), 'nl'); addLocale({ group: ',', preferMDY: true }, 'en'); @@ -336,35 +408,35 @@ addLocale({ group: ',', preferMDY: true }, 'en-US'); addLocale({ group: ',' }, 'en-AU'); addLocale({ group: ',' }, 'en-CA'); addLocale({ group: ',' }, 'en-GB'); -addLocale({ group: ',', mmm: _('Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sept;Oct;Nov;Dec') }, 'en-IE'); +addLocale({ group: ',', mmm: _M('Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sept;Oct;Nov;Dec') }, 'en-IE'); addLocale(xm({ decimal: ',', nan: 'epäluku', - ampm: _('ap.;ip.'), - mmmm: _('tammi~;helmi~;maalis~;huhti~;touko~;kesä~;heinä~;elo~;syys~;loka~;marras~;joulu~', 'kuuta'), - mmm: _('tammik.;helmik.;maalisk.;huhtik.;toukok.;kesäk.;heinäk.;elok.;syysk.;lokak.;marrask.;jouluk.'), - dddd: _('sunnun~;maanan~;tiis~;keskiviikkona;tors~;perjan~;lauan~', 'taina'), - bool: _('TOSI;EPÄTOSI') + ampm: _B('ap.;ip.'), + mmmm: _M('tammi~;helmi~;maalis~;huhti~;touko~;kesä~;heinä~;elo~;syys~;loka~;marras~;joulu~', 'kuuta'), + mmm: _M('tammik.;helmik.;maalisk.;huhtik.;toukok.;kesäk.;heinäk.;elok.;syysk.;lokak.;marrask.;jouluk.'), + dddd: _W('sunnun~;maanan~;tiis~;keskiviikkona;tors~;perjan~;lauan~', 'taina'), + bool: _B('TOSI;EPÄTOSI') }, -1, 2), 'fi'); const _fr = xm({ group: '\u202f', decimal: ',', - mmmm: _('janvier;février;mars;avril;mai;juin;juillet;août;septembre;octobre;novembre;décembre'), - mmm: _('janv.;févr.;mars;avr.;mai;juin;juil.;août;sept.;oct.;nov.;déc.'), - dddd: _('~manche;lun~;mar~;mercre~;jeu~;vendre~;same~', 'di'), - bool: _('VRAI;FAUX') + mmmm: _M('janvier;février;mars;avril;mai;juin;juillet;août;septembre;octobre;novembre;décembre'), + mmm: _M('janv.;févr.;mars;avr.;mai;juin;juil.;août;sept.;oct.;nov.;déc.'), + dddd: _W('~manche;lun~;mar~;mercre~;jeu~;vendre~;same~', 'di'), + bool: _B('VRAI;FAUX') }, -1, 13); addLocale({ ..._fr }, 'fr'); -addLocale({ ..._fr, mmm: _('janv.;févr.;mars;avr.;mai;juin;juill.;août;sept.;oct.;nov.;déc.') }, 'fr-CA'); +addLocale({ ..._fr, mmm: _M('janv.;févr.;mars;avr.;mai;juin;juill.;août;sept.;oct.;nov.;déc.') }, 'fr-CA'); addLocale({ group: "'", decimal: '.', ..._fr }, 'fr-CH'); const _de = xm({ - mmmm: _('Januar;Februar;März;April;Mai;Juni;Juli;August;September;Oktober;November;Dezember'), - mmm: _('Jan.;Feb.;März;Apr.;Mai;Juni;Juli;Aug.;Sept.;Okt.;Nov.;Dez.'), - dddd: _('Sonn~;Mon~;Diens~;Mittwoch;Donners~;Frei~;Sams~', 'tag'), - bool: _('WAHR;FALSCH') + mmmm: _M('Januar;Februar;März;April;Mai;Juni;Juli;August;September;Oktober;November;Dezember'), + mmm: _M('Jan.;Feb.;März;Apr.;Mai;Juni;Juli;Aug.;Sept.;Okt.;Nov.;Dez.'), + dddd: _W('Sonn~;Mon~;Diens~;Mittwoch;Donners~;Frei~;Sams~', 'tag'), + bool: _B('WAHR;FALSCH') }, -1, 12); addLocale({ group: '.', decimal: ',', ..._de }, 'de'); addLocale({ group: "'", decimal: '.', ..._de }, 'de-CH'); @@ -372,70 +444,70 @@ addLocale({ group: "'", decimal: '.', ..._de }, 'de-CH'); addLocale(xm({ group: '.', decimal: ',', - ampm: _('π.μ.;μ.μ.'), - mmmm: _('Ιανουαρ~;Φεβρουαρ~;Μαρτ~;Απριλ~;Μαΐου;Ιουν~;Ιουλ~;Αυγούστου;Σεπτεμβρ~;Οκτωβρ~;Νοεμβρ~;Δεκεμβρ~', 'ίου'), - mmm: _('Ιαν;Φεβ;Μαρ;Απρ;Μαΐ;Ιουν;Ιουλ;Αυγ;Σεπ;Οκτ;Νοε;Δεκ'), - dddd: _('Κυριακή;Δευτέρα;Τρίτη;Τετάρτη;Πέμπτη;Παρασκευή;Σάββατο') + ampm: _B('π.μ.;μ.μ.'), + mmmm: _M('Ιανουαρ~;Φεβρουαρ~;Μαρτ~;Απριλ~;Μαΐου;Ιουν~;Ιουλ~;Αυγούστου;Σεπτεμβρ~;Οκτωβρ~;Νοεμβρ~;Δεκεμβρ~', 'ίου'), + mmm: _M('Ιαν;Φεβ;Μαρ;Απρ;Μαΐ;Ιουν;Ιουλ;Αυγ;Σεπ;Οκτ;Νοε;Δεκ'), + dddd: _W('Κυριακή;Δευτέρα;Τρίτη;Τετάρτη;Πέμπτη;Παρασκευή;Σάββατο') }, -1, 3), 'el'); addLocale({ decimal: ',', - ampm: _('de.;du.'), - mmmm: _('január;február;március;április;május;június;július;augusztus;szeptember;október;november;december'), - mmm: _('jan.;febr.;márc.;ápr.;máj.;jún.;júl.;aug.;szept.;okt.;nov.;dec.'), - dddd: _('vasárnap;hétfő;kedd;szerda;csütörtök;péntek;szombat'), - ddd: _('V;H;K;Sze;Cs;P;Szo'), - bool: _('IGAZ;HAMIS') + ampm: _B('de.;du.'), + mmmm: _M('január;február;március;április;május;június;július;augusztus;szeptember;október;november;december'), + mmm: _M('jan.;febr.;márc.;ápr.;máj.;jún.;júl.;aug.;szept.;okt.;nov.;dec.'), + dddd: _W('vasárnap;hétfő;kedd;szerda;csütörtök;péntek;szombat'), + ddd: _W('V;H;K;Sze;Cs;P;Szo'), + bool: _B('IGAZ;HAMIS') }, 'hu'); addLocale(xm({ group: '.', decimal: ',', - ampm: _('f.h.;e.h.'), - mmmm: _('janúar;febrúar;mars;apríl;maí;júní;júlí;ágúst;september;október;nóvember;desember'), - dddd: _('sunnu~;mánu~;þriðju~;miðviku~;fimmtu~;föstu~;laugar~', 'dagur') + ampm: _B('f.h.;e.h.'), + mmmm: _M('janúar;febrúar;mars;apríl;maí;júní;júlí;ágúst;september;október;nóvember;desember'), + dddd: _W('sunnu~;mánu~;þriðju~;miðviku~;fimmtu~;föstu~;laugar~', 'dagur') }, 13, 13), 'is'); addLocale(xm({ group: '.', decimal: ',', - mmmm: _('Januari;Februari;Maret;April;Mei;Juni;Juli;Agustus;September;Oktober;November;Desember'), - dddd: _('Minggu;Senin;Selasa;Rabu;Kamis;Jumat;Sabtu') + mmmm: _M('Januari;Februari;Maret;April;Mei;Juni;Juli;Agustus;September;Oktober;November;Desember'), + dddd: _W('Minggu;Senin;Selasa;Rabu;Kamis;Jumat;Sabtu') }, 3, 3), 'id'); const _it = xm({ - mmmm: _('gennaio;febbraio;marzo;aprile;maggio;giugno;luglio;agosto;settembre;ottobre;novembre;dicembre'), - dddd: _('domenica;lunedì;martedì;mercoledì;giovedì;venerdì;sabato'), - bool: _('VERO;FALSO') + mmmm: _M('gennaio;febbraio;marzo;aprile;maggio;giugno;luglio;agosto;settembre;ottobre;novembre;dicembre'), + dddd: _W('domenica;lunedì;martedì;mercoledì;giovedì;venerdì;sabato'), + bool: _B('VERO;FALSO') }, 3, 3); addLocale({ group: '.', decimal: ',', ..._it }, 'it'); addLocale({ group: "'", decimal: '.', ..._it }, 'it-CH'); const _no = { decimal: ',', - ampm: _('a.m.;p.m.'), - mmmm: _('januar;februar;mars;april;mai;juni;juli;august;september;oktober;november;desember'), - mmm: _('jan.;feb.;mar.;apr.;mai;jun.;jul.;aug.;sep.;okt.;nov.;des.'), - dddd: _('søn~;man~;tirs~;ons~;tors~;fre~;lør~', 'dag'), - bool: _('SANN;USANN') + ampm: _B('a.m.;p.m.'), + mmmm: _M('januar;februar;mars;april;mai;juni;juli;august;september;oktober;november;desember'), + mmm: _M('jan.;feb.;mar.;apr.;mai;jun.;jul.;aug.;sep.;okt.;nov.;des.'), + dddd: _W('søn~;man~;tirs~;ons~;tors~;fre~;lør~', 'dag'), + bool: _B('SANN;USANN') }; addLocale(xm({ ..._no }, -1, 13), 'nb'); addLocale(xm({ ..._no }, -1, 13), 'no'); addLocale(xm({ decimal: ',', - mmmm: _('stycznia;lutego;marca;kwietnia;maja;czerwca;lipca;sierpnia;września;października;listopada;grudnia'), - dddd: _('niedziela;poniedziałek;wtorek;środa;czwartek;piątek;sobota'), - ddd: _('niedz.;pon.;wt.;śr.;czw.;pt.;sob.'), - bool: _('PRAWDA;FAŁSZ') + mmmm: _M('stycznia;lutego;marca;kwietnia;maja;czerwca;lipca;sierpnia;września;października;listopada;grudnia'), + dddd: _W('niedziela;poniedziałek;wtorek;środa;czwartek;piątek;sobota'), + ddd: _W('niedz.;pon.;wt.;śr.;czw.;pt.;sob.'), + bool: _B('PRAWDA;FAŁSZ') }, 3, -1), 'pl'); const _pt = { group: '.', decimal: ',', - mmmm: _('janeiro;fevereiro;março;abril;maio;junho;julho;agosto;setembro;outubro;novembro;dezembro'), - dddd: _('domingo;segunda-feira;terça-feira;quarta-feira;quinta-feira;sexta-feira;sábado'), - bool: _('VERDADEIRO;FALSO') + mmmm: _M('janeiro;fevereiro;março;abril;maio;junho;julho;agosto;setembro;outubro;novembro;dezembro'), + dddd: _W('domingo;segunda-feira;terça-feira;quarta-feira;quinta-feira;sexta-feira;sábado'), + bool: _B('VERDADEIRO;FALSO') }; addLocale(xm(_pt, 13, 13), 'pt'); addLocale(xm(_pt, 13, 13), 'pt-BR'); @@ -443,327 +515,327 @@ addLocale(xm(_pt, 13, 13), 'pt-BR'); addLocale({ decimal: ',', nan: 'не\u00A0число', - mmmm: _('января;февраля;марта;апреля;мая;июня;июля;августа;сентября;октября;ноября;декабря'), - mmm: _('янв.;февр.;мар.;апр.;мая;июн.;июл.;авг.;сент.;окт.;нояб.;дек.'), - dddd: _('воскресенье;понедельник;вторник;среда;четверг;пятница;суббота'), - ddd: _('вс;пн;вт;ср;чт;пт;сб'), - mmmm6: _('рамадан;шавваль;зуль-каада;зуль-хиджжа;мухаррам;раби-уль-авваль;раби-уль-ахир;джумад-уль-авваль;джумад-уль-ахир;раджаб;шаабан;рамадан'), - mmm6: _('рам.;шав.;зуль-к.;зуль-х.;мух.;раб. I;раб. II;джум. I;джум. II;радж.;шааб.;рам.'), - bool: _('ИСТИНА;ЛОЖЬ') + mmmm: _M('января;февраля;марта;апреля;мая;июня;июля;августа;сентября;октября;ноября;декабря'), + mmm: _M('янв.;февр.;мар.;апр.;мая;июн.;июл.;авг.;сент.;окт.;нояб.;дек.'), + dddd: _W('воскресенье;понедельник;вторник;среда;четверг;пятница;суббота'), + ddd: _W('вс;пн;вт;ср;чт;пт;сб'), + mmmm6: _M('рамадан;шавваль;зуль-каада;зуль-хиджжа;мухаррам;раби-уль-авваль;раби-уль-ахир;джумад-уль-авваль;джумад-уль-ахир;раджаб;шаабан;рамадан'), + mmm6: _M('рам.;шав.;зуль-к.;зуль-х.;мух.;раб. I;раб. II;джум. I;джум. II;радж.;шааб.;рам.'), + bool: _B('ИСТИНА;ЛОЖЬ') }, 'ru'); addLocale(xm({ decimal: ',', - mmmm: _('januára;februára;marca;apríla;mája;júna;júla;augusta;septembra;októbra;novembra;decembra'), - dddd: _('nedeľa;pondelok;utorok;streda;štvrtok;piatok;sobota') + mmmm: _M('januára;februára;marca;apríla;mája;júna;júla;augusta;septembra;októbra;novembra;decembra'), + dddd: _W('nedeľa;pondelok;utorok;streda;štvrtok;piatok;sobota') }, 3, 2), 'sk'); const _es = { group: '.', decimal: ',', - ampm: _('a.\u00A0m.;p.\u00A0m.'), - mmmm: _('enero;febrero;marzo;abril;mayo;junio;julio;agosto;septiem~;octu~;noviem~;diciem~', 'bre'), - mmm: _('ene;feb;mar;abr;may;jun;jul;ago;sept;oct;nov;dic'), - dddd: _('domingo;lunes;martes;miércoles;jueves;viernes;sábado'), - ddd: _('dom;lun;mar;mié;jue;vie;sáb'), - bool: _('VERDADERO;FALSO') + ampm: _B('a.\u00A0m.;p.\u00A0m.'), + mmmm: _M('enero;febrero;marzo;abril;mayo;junio;julio;agosto;septiem~;octu~;noviem~;diciem~', 'bre'), + mmm: _M('ene;feb;mar;abr;may;jun;jul;ago;sept;oct;nov;dic'), + dddd: _W('domingo;lunes;martes;miércoles;jueves;viernes;sábado'), + ddd: _W('dom;lun;mar;mié;jue;vie;sáb'), + bool: _B('VERDADERO;FALSO') }; -const _esM3 = _('ene;feb;mar;abr;may;jun;jul;ago;sep;oct;nov;dic'); -const _esM13 = _('ene.;feb.;mar.;abr.;may.;jun.;jul.;ago.;sept.;oct.;nov.;dic.'); +const _esM3 = _M('ene;feb;mar;abr;may;jun;jul;ago;sep;oct;nov;dic'); +const _esM13 = _M('ene.;feb.;mar.;abr.;may.;jun.;jul.;ago.;sept.;oct.;nov.;dic.'); addLocale({ ..._es }, 'es'); addLocale({ ..._es }, 'es-AR'); addLocale({ ..._es }, 'es-BO'); addLocale({ ..._es }, 'es-CL'); addLocale({ ..._es }, 'es-CO'); addLocale({ ..._es }, 'es-EC'); -addLocale({ ..._es, mmm: _esM3, ampm: _('a.m.;p.m.') }, 'es-MX'); +addLocale({ ..._es, mmm: _esM3, ampm: _B('a.m.;p.m.') }, 'es-MX'); addLocale({ ..._es, mmm: _esM13 }, 'es-PY'); addLocale({ ..._es, mmm: _esM13 }, 'es-UY'); -addLocale({ ..._es, mmm: _esM13, mmmm: _('enero;febrero;marzo;abril;mayo;junio;julio;agosto;setiembre;octubre;noviembre;diciembre') }, 'es-VE'); +addLocale({ ..._es, mmm: _esM13, mmmm: _M('enero;febrero;marzo;abril;mayo;junio;julio;agosto;setiembre;octubre;noviembre;diciembre') }, 'es-VE'); addLocale({ decimal: ',', - ampm: _('fm;em'), - mmmm: _('januari;februari;mars;april;maj;juni;juli;augusti;september;oktober;november;december'), - mmm: _('jan.;feb.;mars;apr.;maj;juni;juli;aug.;sep.;okt.;nov.;dec.'), - dddd: _('sön~;mån~;tis~;ons~;tors~;fre~;lör~', 'dag'), - ddd: _('sön;mån;tis;ons;tors;fre;lör') + ampm: _B('fm;em'), + mmmm: _M('januari;februari;mars;april;maj;juni;juli;augusti;september;oktober;november;december'), + mmm: _M('jan.;feb.;mars;apr.;maj;juni;juli;aug.;sep.;okt.;nov.;dec.'), + dddd: _W('sön~;mån~;tis~;ons~;tors~;fre~;lör~', 'dag'), + ddd: _W('sön;mån;tis;ons;tors;fre;lör') }, 'sv'); addLocale(xm({ group: '.', decimal: ',', - ampm: _('ÖÖ;ÖS'), - mmmm: _('Ocak;Şubat;Mart;Nisan;Mayıs;Haziran;Temmuz;Ağustos;Eylül;Ekim;Kasım;Aralık'), - mmm: _('Oca;Şub;Mar;Nis;May;Haz;Tem;Ağu;Eyl;Eki;Kas;Ara'), - dddd: _('Pazar;Pazartesi;Salı;Çarşamba;Perşembe;Cuma;Cumartesi'), - ddd: _('Paz;Pzt;Sal;Çar;Per;Cum;Cmt'), - bool: _('DOĞRU;YANLIŞ') + ampm: _B('ÖÖ;ÖS'), + mmmm: _M('Ocak;Şubat;Mart;Nisan;Mayıs;Haziran;Temmuz;Ağustos;Eylül;Ekim;Kasım;Aralık'), + mmm: _M('Oca;Şub;Mar;Nis;May;Haz;Tem;Ağu;Eyl;Eki;Kas;Ara'), + dddd: _W('Pazar;Pazartesi;Salı;Çarşamba;Perşembe;Cuma;Cumartesi'), + ddd: _W('Paz;Pzt;Sal;Çar;Per;Cum;Cmt'), + bool: _B('DOĞRU;YANLIŞ') }, 3, -1), 'tr'); addLocale({ group: ',', - ampm: _('yb;yh'), - mmmm: _('Ionawr;Chwefror;Mawrth;Ebrill;Mai;Mehefin;Gorffennaf;Awst;Medi;Hydref;Tachwedd;Rhagfyr'), - mmm: _('Ion;Chwef;Maw;Ebr;Mai;Meh;Gorff;Awst;Medi;Hyd;Tach;Rhag'), - dddd: _('Dydd Sul;Dydd Llun;Dydd Mawrth;Dydd Mercher;Dydd Iau;Dydd Gwener;Dydd Sadwrn'), - ddd: _('Sul;Llun;Maw;Mer;Iau;Gwen;Sad') + ampm: _B('yb;yh'), + mmmm: _M('Ionawr;Chwefror;Mawrth;Ebrill;Mai;Mehefin;Gorffennaf;Awst;Medi;Hydref;Tachwedd;Rhagfyr'), + mmm: _M('Ion;Chwef;Maw;Ebr;Mai;Meh;Gorff;Awst;Medi;Hyd;Tach;Rhag'), + dddd: _W('Dydd Sul;Dydd Llun;Dydd Mawrth;Dydd Mercher;Dydd Iau;Dydd Gwener;Dydd Sadwrn'), + ddd: _W('Sul;Llun;Maw;Mer;Iau;Gwen;Sad') }, 'cy'); addLocale({ group: '.', decimal: ',', - mmmm: _('yanvar;fevral;mart;aprel;may;iyun;iyul;avqust;sentyabr;oktyabr;noyabr;dekabr'), - mmm: _('yan;fev;mar;apr;may;iyn;iyl;avq;sen;okt;noy;dek'), - dddd: _('bazar;bazar ertəsi;çərşənbə axşamı;çərşənbə;cümə axşamı;cümə;şənbə'), - ddd: _('B.;B.e.;Ç.a.;Ç.;C.a.;C.;Ş.') + mmmm: _M('yanvar;fevral;mart;aprel;may;iyun;iyul;avqust;sentyabr;oktyabr;noyabr;dekabr'), + mmm: _M('yan;fev;mar;apr;may;iyn;iyl;avq;sen;okt;noy;dek'), + dddd: _W('bazar;bazar ertəsi;çərşənbə axşamı;çərşənbə;cümə axşamı;cümə;şənbə'), + ddd: _W('B.;B.e.;Ç.a.;Ç.;C.a.;C.;Ş.') }, 'az'); addLocale(xm({ decimal: ',', - mmmm: _('студзеня;лютага;сакавіка;красавіка;мая;чэрвеня;ліпеня;жніўня;верасня;кастрычніка;лістапада;снежня'), - dddd: _('нядзеля;панядзелак;аўторак;серада;чацвер;пятніца;субота'), - ddd: _('нд;пн;аў;ср;чц;пт;сб') + mmmm: _M('студзеня;лютага;сакавіка;красавіка;мая;чэрвеня;ліпеня;жніўня;верасня;кастрычніка;лістапада;снежня'), + dddd: _W('нядзеля;панядзелак;аўторак;серада;чацвер;пятніца;субота'), + ddd: _W('нд;пн;аў;ср;чц;пт;сб') }, 3, -1), 'be'); addLocale({ decimal: ',', - ampm: _('пр.об.;сл.об.'), - mmmm: _('януари;февруари;март;април;май;юни;юли;август;септември;октомври;ноември;декември'), - mmm: _('яну;фев;март;апр;май;юни;юли;авг;сеп;окт;ное;дек'), - dddd: _('неделя;понеделник;вторник;сряда;четвъртък;петък;събота'), - ddd: _('нд;пн;вт;ср;чт;пт;сб'), - bool: _('ИСТИНА;ЛОЖЬ') + ampm: _B('пр.об.;сл.об.'), + mmmm: _M('януари;февруари;март;април;май;юни;юли;август;септември;октомври;ноември;декември'), + mmm: _M('яну;фев;март;апр;май;юни;юли;авг;сеп;окт;ное;дек'), + dddd: _W('неделя;понеделник;вторник;сряда;четвъртък;петък;събота'), + ddd: _W('нд;пн;вт;ср;чт;пт;сб'), + bool: _B('ИСТИНА;ЛОЖЬ') }, 'bg'); addLocale({ group: '.', decimal: ',', - mmmm: _('de gener;de febrer;de març;d’abril;de maig;de juny;de juliol;d’agost;de setembre;d’octubre;de novembre;de desembre'), - mmm: _('de gen.;de febr.;de març;d’abr.;de maig;de juny;de jul.;d’ag.;de set.;d’oct.;de nov.;de des.'), - dddd: _('diumenge;dilluns;dimarts;dimecres;dijous;divendres;dissabte'), - ddd: _('dg.;dl.;dt.;dc.;dj.;dv.;ds.'), - ampm: _('a.\u00a0m.;p.\u00a0m.') + mmmm: _M('de gener;de febrer;de març;d’abril;de maig;de juny;de juliol;d’agost;de setembre;d’octubre;de novembre;de desembre'), + mmm: _M('de gen.;de febr.;de març;d’abr.;de maig;de juny;de jul.;d’ag.;de set.;d’oct.;de nov.;de des.'), + dddd: _W('diumenge;dilluns;dimarts;dimecres;dijous;divendres;dissabte'), + ddd: _W('dg.;dl.;dt.;dc.;dj.;dv.;ds.'), + ampm: _B('a.\u00a0m.;p.\u00a0m.') }, 'ca'); addLocale(xm({ group: ',', decimal: '.', - mmmm: _('Enero;Pebrero;Marso;Abril;Mayo;Hunyo;Hulyo;Agosto;Setyembre;Oktubre;Nobyembre;Disyembre'), - dddd: _('Linggo;Lunes;Martes;Miyerkules;Huwebes;Biyernes;Sabado') + mmmm: _M('Enero;Pebrero;Marso;Abril;Mayo;Hunyo;Hulyo;Agosto;Setyembre;Oktubre;Nobyembre;Disyembre'), + dddd: _W('Linggo;Lunes;Martes;Miyerkules;Huwebes;Biyernes;Sabado') }, 3, 3), 'fil'); addLocale({ group: ',', decimal: '.', - mmmm: _('જાન્યુઆરી;ફેબ્રુઆરી;માર્ચ;એપ્રિલ;મે;જૂન;જુલાઈ;ઑગસ્ટ;સપ્ટેમ્બર;ઑક્ટોબર;નવેમ્બર;ડિસેમ્બર'), - mmm: _('જાન્યુ;ફેબ્રુ;માર્ચ;એપ્રિલ;મે;જૂન;જુલાઈ;ઑગસ્ટ;સપ્ટે;ઑક્ટો;નવે;ડિસે'), - dddd: _('રવિ~;સોમ~;મંગળ~;બુધ~;ગુરુ~;શુક્ર~;શનિ~', 'વાર'), - ddd: _('રવિ;સોમ;મંગળ;બુધ;ગુરુ;શુક્ર;શનિ') + mmmm: _M('જાન્યુઆરી;ફેબ્રુઆરી;માર્ચ;એપ્રિલ;મે;જૂન;જુલાઈ;ઑગસ્ટ;સપ્ટેમ્બર;ઑક્ટોબર;નવેમ્બર;ડિસેમ્બર'), + mmm: _M('જાન્યુ;ફેબ્રુ;માર્ચ;એપ્રિલ;મે;જૂન;જુલાઈ;ઑગસ્ટ;સપ્ટે;ઑક્ટો;નવે;ડિસે'), + dddd: _W('રવિ~;સોમ~;મંગળ~;બુધ~;ગુરુ~;શુક્ર~;શનિ~', 'વાર'), + ddd: _W('રવિ;સોમ;મંગળ;બુધ;ગુરુ;શુક્ર;શનિ') }, 'gu'); addLocale({ group: ',', decimal: '.', - ampm: _('לפנה״צ;אחה״צ'), - dddd: _('~ראשון;~שני;~שלישי;~רביעי;~חמישי;~שישי;~שבת', 'יום '), - ddd: _('~א׳;~ב׳;~ג׳;~ד׳;~ה׳;~ו׳;שבת', 'יום '), - mmmm: _('ינואר;פברואר;מרץ;אפריל;מאי;יוני;יולי;אוגוסט;ספטמבר;אוקטובר;נובמבר;דצמבר'), - mmm: _('ינו׳;פבר׳;מרץ;אפר׳;מאי;יוני;יולי;אוג׳;ספט׳;אוק׳;נוב׳;דצמ׳'), - mmmm6: _('רמדאן;שוואל;ד׳ו אל־קעדה;ד׳ו אל־חיג׳ה;מוחרם;רביע אל־אוול;רביע א־ת׳אני;ג׳ומאדא אל־אולא;ג׳ומאדא א־ת׳אניה;רג׳ב;שעבאן;רמדאן'), - mmm6: _('רמדאן;שוואל;ד׳ו אל־קעדה;ד׳ו אל־חיג׳ה;מוחרם;רביע א׳;רביע ב׳;ג׳ומאדא א׳;ג׳ומאדא ב׳;רג׳ב;שעבאן;רמדאן') + ampm: _B('לפנה״צ;אחה״צ'), + dddd: _W('~ראשון;~שני;~שלישי;~רביעי;~חמישי;~שישי;~שבת', 'יום '), + ddd: _W('~א׳;~ב׳;~ג׳;~ד׳;~ה׳;~ו׳;שבת', 'יום '), + mmmm: _M('ינואר;פברואר;מרץ;אפריל;מאי;יוני;יולי;אוגוסט;ספטמבר;אוקטובר;נובמבר;דצמבר'), + mmm: _M('ינו׳;פבר׳;מרץ;אפר׳;מאי;יוני;יולי;אוג׳;ספט׳;אוק׳;נוב׳;דצמ׳'), + mmmm6: _M('רמדאן;שוואל;ד׳ו אל־קעדה;ד׳ו אל־חיג׳ה;מוחרם;רביע אל־אוול;רביע א־ת׳אני;ג׳ומאדא אל־אולא;ג׳ומאדא א־ת׳אניה;רג׳ב;שעבאן;רמדאן'), + mmm6: _M('רמדאן;שוואל;ד׳ו אל־קעדה;ד׳ו אל־חיג׳ה;מוחרם;רביע א׳;רביע ב׳;ג׳ומאדא א׳;ג׳ומאדא ב׳;רג׳ב;שעבאן;רמדאן') }, 'he'); addLocale(xm({ group: '.', decimal: ',', - mmmm: _('siječnja;veljače;ožujka;travnja;svibnja;lipnja;srpnja;kolovoza;rujna;listopada;studenoga;prosinca'), - mmm: _('sij;velj;ožu;tra;svi;lip;srp;kol;ruj;lis;stu;pro'), - dddd: _('nedjelja;ponedjeljak;utorak;srijeda;četvrtak;petak;subota') + mmmm: _M('siječnja;veljače;ožujka;travnja;svibnja;lipnja;srpnja;kolovoza;rujna;listopada;studenoga;prosinca'), + mmm: _M('sij;velj;ožu;tra;svi;lip;srp;kol;ruj;lis;stu;pro'), + dddd: _W('nedjelja;ponedjeljak;utorak;srijeda;četvrtak;petak;subota') }, -1, 3), 'hr'); addLocale({ decimal: ',', - mmmm: _('հունվարի;փետրվարի;մարտի;ապրիլի;մայիսի;հունիսի;հուլիսի;օգոստոսի;սեպտեմբերի;հոկտեմբերի;նոյեմբերի;դեկտեմբերի'), - mmm: _('հնվ;փտվ;մրտ;ապր;մյս;հնս;հլս;օգս;սեպ;հոկ;նոյ;դեկ'), - dddd: _('կիրակի;երկուշաբթի;երեքշաբթի;չորեքշաբթի;հինգշաբթի;ուրբաթ;շաբաթ'), - ddd: _('կիր;երկ;երք;չրք;հնգ;ուր;շբթ') + mmmm: _M('հունվարի;փետրվարի;մարտի;ապրիլի;մայիսի;հունիսի;հուլիսի;օգոստոսի;սեպտեմբերի;հոկտեմբերի;նոյեմբերի;դեկտեմբերի'), + mmm: _M('հնվ;փտվ;մրտ;ապր;մյս;հնս;հլս;օգս;սեպ;հոկ;նոյ;դեկ'), + dddd: _W('կիրակի;երկուշաբթի;երեքշաբթի;չորեքշաբթի;հինգշաբթի;ուրբաթ;շաբաթ'), + ddd: _W('կիր;երկ;երք;չրք;հնգ;ուր;շբթ') }, 'hy'); addLocale(xm({ decimal: ',', - mmmm: _('იანვარი;თებერვალი;მარტი;აპრილი;მაისი;ივნისი;ივლისი;აგვისტო;სექტემბერი;ოქტომბერი;ნოემბერი;დეკემბერი'), - dddd: _('კვირა;ორშაბათი;სამშაბათი;ოთხშაბათი;ხუთშაბათი;პარასკევი;შაბათი') + mmmm: _M('იანვარი;თებერვალი;მარტი;აპრილი;მაისი;ივნისი;ივლისი;აგვისტო;სექტემბერი;ოქტომბერი;ნოემბერი;დეკემბერი'), + dddd: _W('კვირა;ორშაბათი;სამშაბათი;ოთხშაბათი;ხუთშაბათი;პარასკევი;შაბათი') }, 3, 3), 'ka'); addLocale(xm({ decimal: ',', - mmmm: _('қаңтар;ақпан;наурыз;сәуір;мамыр;маусым;шілде;тамыз;қыркүйек;қазан;қараша;желтоқсан'), - dddd: _('жексенбі;дүйсенбі;сейсенбі;сәрсенбі;бейсенбі;жұма;сенбі'), - ddd: _('жс;дс;сс;ср;бс;жм;сб') + mmmm: _M('қаңтар;ақпан;наурыз;сәуір;мамыр;маусым;шілде;тамыз;қыркүйек;қазан;қараша;желтоқсан'), + dddd: _W('жексенбі;дүйсенбі;сейсенбі;сәрсенбі;бейсенбі;жұма;сенбі'), + ddd: _W('жс;дс;сс;ср;бс;жм;сб') }, 13, -1), 'kk'); addLocale({ group: ',', - mmmm: _('ಜನವರಿ;ಫೆಬ್ರವರಿ;ಮಾರ್ಚ್;ಏಪ್ರಿಲ್;ಮೇ;ಜೂನ್;ಜುಲೈ;ಆಗಸ್ಟ್;ಸೆಪ್ಟೆಂಬರ್;ಅಕ್ಟೋಬರ್;ನವೆಂಬರ್;ಡಿಸೆಂಬರ್'), - mmm: _('ಜನವರಿ;ಫೆಬ್ರವರಿ;ಮಾರ್ಚ್;ಏಪ್ರಿ;ಮೇ;ಜೂನ್;ಜುಲೈ;ಆಗಸ್ಟ್;ಸೆಪ್ಟೆಂ;ಅಕ್ಟೋ;ನವೆಂ;ಡಿಸೆಂ'), - dddd: _('ಭಾನು~;ಸೋಮ~;ಮಂಗಳ~;ಬುಧ~;ಗುರು~;ಶುಕ್ರ~;ಶನಿ~', 'ವಾರ'), - ddd: _('ಭಾನು;ಸೋಮ;ಮಂಗಳ;ಬುಧ;ಗುರು;ಶುಕ್ರ;ಶನಿ'), - ampm: _('ಪೂರ್ವಾಹ್ನ;ಅಪರಾಹ್ನ') + mmmm: _M('ಜನವರಿ;ಫೆಬ್ರವರಿ;ಮಾರ್ಚ್;ಏಪ್ರಿಲ್;ಮೇ;ಜೂನ್;ಜುಲೈ;ಆಗಸ್ಟ್;ಸೆಪ್ಟೆಂಬರ್;ಅಕ್ಟೋಬರ್;ನವೆಂಬರ್;ಡಿಸೆಂಬರ್'), + mmm: _M('ಜನವರಿ;ಫೆಬ್ರವರಿ;ಮಾರ್ಚ್;ಏಪ್ರಿ;ಮೇ;ಜೂನ್;ಜುಲೈ;ಆಗಸ್ಟ್;ಸೆಪ್ಟೆಂ;ಅಕ್ಟೋ;ನವೆಂ;ಡಿಸೆಂ'), + dddd: _W('ಭಾನು~;ಸೋಮ~;ಮಂಗಳ~;ಬುಧ~;ಗುರು~;ಶುಕ್ರ~;ಶನಿ~', 'ವಾರ'), + ddd: _W('ಭಾನು;ಸೋಮ;ಮಂಗಳ;ಬುಧ;ಗುರು;ಶುಕ್ರ;ಶನಿ'), + ampm: _B('ಪೂರ್ವಾಹ್ನ;ಅಪರಾಹ್ನ') }, 'kn'); addLocale({ decimal: ',', - mmmm: _('sausio;vasario;kovo;balandžio;gegužės;birželio;liepos;rugpjūčio;rugsėjo;spalio;lapkričio;gruodžio'), - mmm: _('saus.;vas.;kov.;bal.;geg.;birž.;liep.;rugp.;rugs.;spal.;lapkr.;gruod.'), - dddd: _('sekmadienis;pirmadienis;antradienis;trečiadienis;ketvirtadienis;penktadienis;šeštadienis'), - ddd: _('sk;pr;an;tr;kt;pn;št'), - ampm: _('priešpiet;popiet') + mmmm: _M('sausio;vasario;kovo;balandžio;gegužės;birželio;liepos;rugpjūčio;rugsėjo;spalio;lapkričio;gruodžio'), + mmm: _M('saus.;vas.;kov.;bal.;geg.;birž.;liep.;rugp.;rugs.;spal.;lapkr.;gruod.'), + dddd: _W('sekmadienis;pirmadienis;antradienis;trečiadienis;ketvirtadienis;penktadienis;šeštadienis'), + ddd: _W('sk;pr;an;tr;kt;pn;št'), + ampm: _B('priešpiet;popiet') }, 'lt'); addLocale({ decimal: ',', - mmmm: _('janvāris;februāris;marts;aprīlis;maijs;jūnijs;jūlijs;augusts;septembris;oktobris;novembris;decembris'), - mmm: _('janv.;febr.;marts;apr.;maijs;jūn.;jūl.;aug.;sept.;okt.;nov.;dec.'), - dddd: _('svētdiena;pirmdiena;otrdiena;trešdiena;ceturtdiena;piektdiena;sestdiena'), - ddd: _('svētd.;pirmd.;otrd.;trešd.;ceturtd.;piektd.;sestd.'), - ampm: _('priekšpusdienā;pēcpusdienā') + mmmm: _M('janvāris;februāris;marts;aprīlis;maijs;jūnijs;jūlijs;augusts;septembris;oktobris;novembris;decembris'), + mmm: _M('janv.;febr.;marts;apr.;maijs;jūn.;jūl.;aug.;sept.;okt.;nov.;dec.'), + dddd: _W('svētdiena;pirmdiena;otrdiena;trešdiena;ceturtdiena;piektdiena;sestdiena'), + ddd: _W('svētd.;pirmd.;otrd.;trešd.;ceturtd.;piektd.;sestd.'), + ampm: _B('priekšpusdienā;pēcpusdienā') }, 'lv'); addLocale({ group: ',', decimal: '.', - mmmm: _('ജനുവരി;ഫെബ്രുവരി;മാർച്ച്;ഏപ്രിൽ;മേയ്;ജൂൺ;ജൂലൈ;ഓഗസ്റ്റ്;സെപ്റ്റംബർ;ഒക്‌ടോബർ;നവംബർ;ഡിസംബർ'), - mmm: _('ജനു;ഫെബ്രു;മാർ;ഏപ്രി;മേയ്;ജൂൺ;ജൂലൈ;ഓഗ;സെപ്റ്റം;ഒക്ടോ;നവം;ഡിസം'), - dddd: _('ഞായറാഴ്‌ച;തിങ്കളാഴ്‌ച;ചൊവ്വാഴ്ച;ബുധനാഴ്‌ച;വ്യാഴാഴ്‌ച;വെള്ളിയാഴ്‌ച;ശനിയാഴ്‌ച'), - ddd: _('ഞായർ;തിങ്കൾ;ചൊവ്വ;ബുധൻ;വ്യാഴം;വെള്ളി;ശനി') + mmmm: _M('ജനുവരി;ഫെബ്രുവരി;മാർച്ച്;ഏപ്രിൽ;മേയ്;ജൂൺ;ജൂലൈ;ഓഗസ്റ്റ്;സെപ്റ്റംബർ;ഒക്‌ടോബർ;നവംബർ;ഡിസംബർ'), + mmm: _M('ജനു;ഫെബ്രു;മാർ;ഏപ്രി;മേയ്;ജൂൺ;ജൂലൈ;ഓഗ;സെപ്റ്റം;ഒക്ടോ;നവം;ഡിസം'), + dddd: _W('ഞായറാഴ്‌ച;തിങ്കളാഴ്‌ച;ചൊവ്വാഴ്ച;ബുധനാഴ്‌ച;വ്യാഴാഴ്‌ച;വെള്ളിയാഴ്‌ച;ശനിയാഴ്‌ച'), + ddd: _W('ഞായർ;തിങ്കൾ;ചൊവ്വ;ബുധൻ;വ്യാഴം;വെള്ളി;ശനി') }, 'ml'); addLocale({ group: ',', decimal: '.', - mmmm: _('нэгдүгээ~;хоёрдугаа~;гуравдугаа~;дөрөвдүгээ~;тавдугаа~;зургаадугаа~;долоодугаа~;наймдугаа~;есдүгээ~;аравдугаа~;арван нэгдүгээ~;арван хоёрдугаа~', 'р сар'), - mmm: _('1~;2~;3~;4~;5~;6~;7~;8~;9~;10~;11~;12~', '-р сар'), - dddd: _('ням;даваа;мягмар;лхагва;пүрэв;баасан;бямба'), - ddd: _('Ня;Да;Мя;Лх;Пү;Ба;Бя'), - ampm: _('ү.ө.;ү.х.') + mmmm: _M('нэгдүгээ~;хоёрдугаа~;гуравдугаа~;дөрөвдүгээ~;тавдугаа~;зургаадугаа~;долоодугаа~;наймдугаа~;есдүгээ~;аравдугаа~;арван нэгдүгээ~;арван хоёрдугаа~', 'р сар'), + mmm: _M('1~;2~;3~;4~;5~;6~;7~;8~;9~;10~;11~;12~', '-р сар'), + dddd: _W('ням;даваа;мягмар;лхагва;пүрэв;баасан;бямба'), + ddd: _W('Ня;Да;Мя;Лх;Пү;Ба;Бя'), + ampm: _B('ү.ө.;ү.х.') }, 'mn'); addLocale({ group: ',', decimal: '.', - mmmm: _('जानेवारी;फेब्रुवारी;मार्च;एप्रिल;मे;जून;जुलै;ऑगस्ट;सप्टेंबर;ऑक्टोबर;नोव्हेंबर;डिसेंबर'), - mmm: _('जाने;फेब्रु;मार्च;एप्रि;मे;जून;जुलै;ऑग;सप्टें;ऑक्टो;नोव्हें;डिसें'), - dddd: _('रविवार;सोमवार;मंगळवार;बुधवार;गुरुवार;शुक्रवार;शनिवार'), - ddd: _('रवि;सोम;मंगळ;बुध;गुरु;शुक्र;शनि') + mmmm: _M('जानेवारी;फेब्रुवारी;मार्च;एप्रिल;मे;जून;जुलै;ऑगस्ट;सप्टेंबर;ऑक्टोबर;नोव्हेंबर;डिसेंबर'), + mmm: _M('जाने;फेब्रु;मार्च;एप्रि;मे;जून;जुलै;ऑग;सप्टें;ऑक्टो;नोव्हें;डिसें'), + dddd: _W('रविवार;सोमवार;मंगळवार;बुधवार;गुरुवार;शुक्रवार;शनिवार'), + ddd: _W('रवि;सोम;मंगळ;बुध;गुरु;शुक्र;शनि') }, 'mr'); addLocale(xm({ group: ',', decimal: '.', - mmmm: _('ဇန်နဝါရီ;ဖေဖော်ဝါရီ;မတ်;ဧပြီ;မေ;ဇွန်;ဇူလိုင်;ဩဂုတ်;စက်တင်ဘာ;အောက်တိုဘာ;နိုဝင်ဘာ;ဒီဇင်ဘာ'), - mmm: _('ဇန်;ဖေ;မတ်;ဧ;မေ;ဇွန်;ဇူ;ဩ;စက်;အောက်;နို;ဒီ'), - dddd: _('တနင်္ဂနွေ;တနင်္လာ;အင်္ဂါ;ဗုဒ္ဓဟူး;ကြာသပတေး;သောကြာ;စနေ'), - ampm: _('နံနက်;ညနေ') + mmmm: _M('ဇန်နဝါရီ;ဖေဖော်ဝါရီ;မတ်;ဧပြီ;မေ;ဇွန်;ဇူလိုင်;ဩဂုတ်;စက်တင်ဘာ;အောက်တိုဘာ;နိုဝင်ဘာ;ဒီဇင်ဘာ'), + mmm: _M('ဇန်;ဖေ;မတ်;ဧ;မေ;ဇွန်;ဇူ;ဩ;စက်;အောက်;နို;ဒီ'), + dddd: _W('တနင်္ဂနွေ;တနင်္လာ;အင်္ဂါ;ဗုဒ္ဓဟူး;ကြာသပတေး;သောကြာ;စနေ'), + ampm: _B('နံနက်;ညနေ') }, -1, 0), 'my'); addLocale({ group: ',', decimal: '.', - mmmm: _('ਜਨਵਰੀ;ਫ਼ਰਵਰੀ;ਮਾਰਚ;ਅਪ੍ਰੈਲ;ਮਈ;ਜੂਨ;ਜੁਲਾਈ;ਅਗਸਤ;ਸਤੰਬਰ;ਅਕਤੂਬਰ;ਨਵੰਬਰ;ਦਸੰਬਰ'), - mmm: _('ਜਨ;ਫ਼ਰ;ਮਾਰਚ;ਅਪ੍ਰੈ;ਮਈ;ਜੂਨ;ਜੁਲਾ;ਅਗ;ਸਤੰ;ਅਕਤੂ;ਨਵੰ;ਦਸੰ'), - dddd: _('ਐਤਵਾਰ;ਸੋਮਵਾਰ;ਮੰਗਲਵਾਰ;ਬੁੱਧਵਾਰ;ਵੀਰਵਾਰ;ਸ਼ੁੱਕਰਵਾਰ;ਸ਼ਨਿੱਚਰਵਾਰ'), - ddd: _('ਐਤ;ਸੋਮ;ਮੰਗਲ;ਬੁੱਧ;ਵੀਰ;ਸ਼ੁੱਕਰ;ਸ਼ਨਿੱਚਰ'), - ampm: _('ਪੂ.ਦੁ.;ਬਾ.ਦੁ.') + mmmm: _M('ਜਨਵਰੀ;ਫ਼ਰਵਰੀ;ਮਾਰਚ;ਅਪ੍ਰੈਲ;ਮਈ;ਜੂਨ;ਜੁਲਾਈ;ਅਗਸਤ;ਸਤੰਬਰ;ਅਕਤੂਬਰ;ਨਵੰਬਰ;ਦਸੰਬਰ'), + mmm: _M('ਜਨ;ਫ਼ਰ;ਮਾਰਚ;ਅਪ੍ਰੈ;ਮਈ;ਜੂਨ;ਜੁਲਾ;ਅਗ;ਸਤੰ;ਅਕਤੂ;ਨਵੰ;ਦਸੰ'), + dddd: _W('ਐਤਵਾਰ;ਸੋਮਵਾਰ;ਮੰਗਲਵਾਰ;ਬੁੱਧਵਾਰ;ਵੀਰਵਾਰ;ਸ਼ੁੱਕਰਵਾਰ;ਸ਼ਨਿੱਚਰਵਾਰ'), + ddd: _W('ਐਤ;ਸੋਮ;ਮੰਗਲ;ਬੁੱਧ;ਵੀਰ;ਸ਼ੁੱਕਰ;ਸ਼ਨਿੱਚਰ'), + ampm: _B('ਪੂ.ਦੁ.;ਬਾ.ਦੁ.') }, 'pa'); addLocale({ group: '.', decimal: ',', - mmmm: _('ianuarie;februarie;martie;aprilie;mai;iunie;iulie;august;septem~;octom~;noiem~;decem~', 'brie'), - mmm: _('ian.;feb.;mar.;apr.;mai;iun.;iul.;aug.;sept.;oct.;nov.;dec.'), - dddd: _('duminică;luni;marți;miercuri;joi;vineri;sâmbătă'), - ddd: _('dum.;lun.;mar.;mie.;joi;vin.;sâm.'), - ampm: _('a.m.;p.m.') + mmmm: _M('ianuarie;februarie;martie;aprilie;mai;iunie;iulie;august;septem~;octom~;noiem~;decem~', 'brie'), + mmm: _M('ian.;feb.;mar.;apr.;mai;iun.;iul.;aug.;sept.;oct.;nov.;dec.'), + dddd: _W('duminică;luni;marți;miercuri;joi;vineri;sâmbătă'), + ddd: _W('dum.;lun.;mar.;mie.;joi;vin.;sâm.'), + ampm: _B('a.m.;p.m.') }, 'ro'); addLocale(xm({ group: '.', decimal: ',', - mmmm: _('januar;februar;marec;april;maj;junij;julij;avgust;september;oktober;november;december'), - mmm: _('jan.;feb.;mar.;apr.;maj;jun.;jul.;avg.;sep.;okt.;nov.;dec.'), - dddd: _('nedelja;ponedeljek;torek;sreda;četrtek;petek;sobota'), - ampm: _('dop.;pop.') + mmmm: _M('januar;februar;marec;april;maj;junij;julij;avgust;september;oktober;november;december'), + mmm: _M('jan.;feb.;mar.;apr.;maj;jun.;jul.;avg.;sep.;okt.;nov.;dec.'), + dddd: _W('nedelja;ponedeljek;torek;sreda;četrtek;petek;sobota'), + ampm: _B('dop.;pop.') }, -1, 13), 'sl'); addLocale(xm({ group: '.', decimal: ',', - mmmm: _('јануар;фебруар;март;април;мај;јун;јул;август;септембар;октобар;новембар;децембар'), - dddd: _('недеља;понедељак;уторак;среда;четвртак;петак;субота') + mmmm: _M('јануар;фебруар;март;април;мај;јун;јул;август;септембар;октобар;новембар;децембар'), + dddd: _W('недеља;понедељак;уторак;среда;четвртак;петак;субота') }, 3, 3), 'sr'); addLocale({ group: ',', decimal: '.', - mmmm: _('ஜனவரி;பிப்ரவரி;மார்ச்;ஏப்ரல்;மே;ஜூன்;ஜூலை;ஆகஸ்ட்;செப்டம்பர்;அக்டோபர்;நவம்பர்;டிசம்பர்'), - mmm: _('ஜன.;பிப்.;மார்.;ஏப்.;மே;ஜூன்;ஜூலை;ஆக.;செப்.;அக்.;நவ.;டிச.'), - dddd: _('ஞாயிறு;திங்கள்;செவ்வாய்;புதன்;வியாழன்;வெள்ளி;சனி'), - ddd: _('ஞாயி.;திங்.;செவ்.;புத.;வியா.;வெள்.;சனி') + mmmm: _M('ஜனவரி;பிப்ரவரி;மார்ச்;ஏப்ரல்;மே;ஜூன்;ஜூலை;ஆகஸ்ட்;செப்டம்பர்;அக்டோபர்;நவம்பர்;டிசம்பர்'), + mmm: _M('ஜன.;பிப்.;மார்.;ஏப்.;மே;ஜூன்;ஜூலை;ஆக.;செப்.;அக்.;நவ.;டிச.'), + dddd: _W('ஞாயிறு;திங்கள்;செவ்வாய்;புதன்;வியாழன்;வெள்ளி;சனி'), + ddd: _W('ஞாயி.;திங்.;செவ்.;புத.;வியா.;வெள்.;சனி') }, 'ta'); addLocale({ group: ',', decimal: '.', - mmmm: _('జనవరి;ఫిబ్రవరి;మార్చి;ఏప్రిల్;మే;జూన్;జులై;ఆగస్టు;సెప్టెంబర్;అక్టోబర్;నవంబర్;డిసెంబర్'), - mmm: _('జన;ఫిబ్ర;మార్చి;ఏప్రి;మే;జూన్;జులై;ఆగ;సెప్టెం;అక్టో;నవం;డిసెం'), - dddd: _('ఆదివారం;సోమవారం;మంగళవారం;బుధవారం;గురువారం;శుక్రవారం;శనివారం'), - ddd: _('ఆది;సోమ;మంగళ;బుధ;గురు;శుక్ర;శని') + mmmm: _M('జనవరి;ఫిబ్రవరి;మార్చి;ఏప్రిల్;మే;జూన్;జులై;ఆగస్టు;సెప్టెంబర్;అక్టోబర్;నవంబర్;డిసెంబర్'), + mmm: _M('జన;ఫిబ్ర;మార్చి;ఏప్రి;మే;జూన్;జులై;ఆగ;సెప్టెం;అక్టో;నవం;డిసెం'), + dddd: _W('ఆదివారం;సోమవారం;మంగళవారం;బుధవారం;గురువారం;శుక్రవారం;శనివారం'), + ddd: _W('ఆది;సోమ;మంగళ;బుధ;గురు;శుక్ర;శని') }, 'te'); addLocale({ decimal: ',', - mmmm: _('січня;лютого;березня;квітня;травня;червня;липня;серпня;вересня;жовтня;листопада;грудня'), - mmm: _('січ.;лют.;бер.;квіт.;трав.;черв.;лип.;серп.;вер.;жовт.;лист.;груд.'), - dddd: _('неділю;понеділок;вівторок;середу;четвер;пʼятницю;суботу'), - ddd: _('нд;пн;вт;ср;чт;пт;сб'), - ampm: _('дп;пп') + mmmm: _M('січня;лютого;березня;квітня;травня;червня;липня;серпня;вересня;жовтня;листопада;грудня'), + mmm: _M('січ.;лют.;бер.;квіт.;трав.;черв.;лип.;серп.;вер.;жовт.;лист.;груд.'), + dddd: _W('неділю;понеділок;вівторок;середу;четвер;пʼятницю;суботу'), + ddd: _W('нд;пн;вт;ср;чт;пт;сб'), + ampm: _B('дп;пп') }, 'uk'); addLocale({ group: '.', decimal: ',', - mmmm: _('~1;~2;~3;~4;~5;~6;~7;~8;~9;~10;~11;~12', 'tháng '), - mmm: _('~1;~2;~3;~4;~5;~6;~7;~8;~9;~10;~11;~12', 'thg '), - dddd: _('Chủ Nhật;Thứ Hai;Thứ Ba;Thứ Tư;Thứ Năm;Thứ Sáu;Thứ Bảy'), - ddd: _('CN;Th 2;Th 3;Th 4;Th 5;Th 6;Th 7'), - ampm: _('SA;CH') + mmmm: _M('~1;~2;~3;~4;~5;~6;~7;~8;~9;~10;~11;~12', 'tháng '), + mmm: _M('~1;~2;~3;~4;~5;~6;~7;~8;~9;~10;~11;~12', 'thg '), + dddd: _W('Chủ Nhật;Thứ Hai;Thứ Ba;Thứ Tư;Thứ Năm;Thứ Sáu;Thứ Bảy'), + ddd: _W('CN;Th 2;Th 3;Th 4;Th 5;Th 6;Th 7'), + ampm: _B('SA;CH') }, 'vi'); addLocale(xm({ group: '٬', decimal: '٫', - ampm: _('ص;م'), - mmmm: _('يناير;فبراير;مارس;أبريل;مايو;يونيو;يوليو;أغسطس;سبتمبر;أكتوبر;نوفمبر;ديسمبر'), - dddd: _('الأحد;الاثنين;الثلاثاء;الأربعاء;الخميس;الجمعة;السبت'), - mmmm6: _('رمضان;شوال;ذو القعدة;ذو الحجة;محرم;ربيع الأول;ربيع الآخرة;جمادى الأولى;جمادى الآخرة;رجب;شعبان;رمضان') + ampm: _B('ص;م'), + mmmm: _M('يناير;فبراير;مارس;أبريل;مايو;يونيو;يوليو;أغسطس;سبتمبر;أكتوبر;نوفمبر;ديسمبر'), + dddd: _W('الأحد;الاثنين;الثلاثاء;الأربعاء;الخميس;الجمعة;السبت'), + mmmm6: _M('رمضان;شوال;ذو القعدة;ذو الحجة;محرم;ربيع الأول;ربيع الآخرة;جمادى الأولى;جمادى الآخرة;رجب;شعبان;رمضان') }, 0, 0), 'ar'); addLocale({ group: ',', decimal: '.', - mmmm: _('জানুয়ারী;ফেব্রুয়ারী;মার্চ;এপ্রিল;মে;জুন;জুলাই;আগস্ট;সেপ্টেম্বর;অক্টোবর;নভেম্বর;ডিসেম্বর'), - mmm: _('জানু;ফেব;মার্চ;এপ্রি;মে;জুন;জুল;আগ;সেপ্টেঃ;অক্টোঃ;নভেঃ;ডিসেঃ'), - dddd: _('রবিবার;সোমবার;মঙ্গলবার;বুধবার;বৃহস্পতিবার;শুক্রবার;শনিবার'), - ddd: _('রবি;সোম;মঙ্গল;বুধ;বৃহস্পতি;শুক্র;শনি') + mmmm: _M('জানুয়ারী;ফেব্রুয়ারী;মার্চ;এপ্রিল;মে;জুন;জুলাই;আগস্ট;সেপ্টেম্বর;অক্টোবর;নভেম্বর;ডিসেম্বর'), + mmm: _M('জানু;ফেব;মার্চ;এপ্রি;মে;জুন;জুল;আগ;সেপ্টেঃ;অক্টোঃ;নভেঃ;ডিসেঃ'), + dddd: _W('রবিবার;সোমবার;মঙ্গলবার;বুধবার;বৃহস্পতিবার;শুক্রবার;শনিবার'), + ddd: _W('রবি;সোম;মঙ্গল;বুধ;বৃহস্পতি;শুক্র;শনি') }, 'bn'); addLocale({ group: ',', decimal: '.', - mmmm: _('जनवरी;फ़रवरी;मार्च;अप्रैल;मई;जून;जुलाई;अगस्त;सितंबर;अक्तूबर;नवंबर;दिसंबर'), - mmm: _('जन॰;फ़र॰;मार्च;अप्रैल;मई;जून;जुल॰;अग॰;सित॰;अक्तू॰;नव॰;दिस॰'), - dddd: _('रविवार;सोमवार;मंगलवार;बुधवार;गुरुवार;शुक्रवार;शनिवार'), - ddd: _('रवि;सोम;मंगल;बुध;गुरु;शुक्र;शनि'), - ampm: _('am;pm') + mmmm: _M('जनवरी;फ़रवरी;मार्च;अप्रैल;मई;जून;जुलाई;अगस्त;सितंबर;अक्तूबर;नवंबर;दिसंबर'), + mmm: _M('जन॰;फ़र॰;मार्च;अप्रैल;मई;जून;जुल॰;अग॰;सित॰;अक्तू॰;नव॰;दिस॰'), + dddd: _W('रविवार;सोमवार;मंगलवार;बुधवार;गुरुवार;शुक्रवार;शनिवार'), + ddd: _W('रवि;सोम;मंगल;बुध;गुरु;शुक्र;शनि'), + ampm: _B('am;pm') }, 'hi'); diff --git a/lib/options.ts b/lib/options.ts index 98df8fd..9f82dd5 100644 --- a/lib/options.ts +++ b/lib/options.ts @@ -50,7 +50,7 @@ export type FormatOptions = { /** * Should the formatter throw an error if a provided pattern is invalid. * If false, a formatter will be constructed which instead outputs an error - * string (see _invalid_ in this table). + * string (see _invalid_ in this type). * @default true */ throws: boolean, @@ -81,7 +81,7 @@ export type FormatOptions = { * Integer grouping sizes. You may desire to emit numbers in standards other than the common 3 digits * per group (e.g. "123,456,789"). The first grouping size is used for the least significant integer * group, and the second grouping size is used for more significant groups (e.g. `[3, 2]` => "12,34,56,789"). - * @default [ 3 ] + * @default [ 3, 3 ] */ grouping: [ number, number ] | [ number ], diff --git a/lib/parseValue.ts b/lib/parseValue.ts index 12f798b..9d6d0c3 100644 --- a/lib/parseValue.ts +++ b/lib/parseValue.ts @@ -160,7 +160,7 @@ const isDigit = (d: string) => d?.length === 1 && d >= '0' && d <= '9'; /** * Parse a numeric string input and return its value and format. If the input - * was not recognized or valid, the function returns a `undefined`, for valid input + * was not recognized or valid, the function returns an `undefined`, for valid input * it returns an object with two properties: * * * `v`: the parsed value. @@ -568,13 +568,13 @@ const normAMPMStr = (s: string): string => ( /** * Parse a time string input and return its value and format. If the input was - * not recognized or valid, the function returns a `undefined`, for valid input it + * not recognized or valid, the function returns an `undefined`, for valid input it * returns an object with two properties: * * - `v`: the parsed value. * - `z`: the number format of the input (if applicable). * - * @param value The date to parse + * @param value The string to parse * @param [options] Options for the parser * @param [options.locale] * A BCP 47 string tag. Locale default is english with a `\u00a0` @@ -662,7 +662,7 @@ export function parseTime (value: string, options: { locale?: string; } = {}): P * @param [options.locale] * A BCP 47 string tag. Locale default is english with a `\u00a0` * grouping symbol (see [addLocale](#addLocale)) - * @returns An object of the parsed value and a corresponding format string + * @returns An object of the parsed value */ export function parseBool (value: string, options: { locale?: string; } = {}): ParseDataBool | undefined { const l10n = getLocale(options.locale || '') || defaultLocale; diff --git a/lib/serialDate.ts b/lib/serialDate.ts index 7277e5c..b84ef73 100644 --- a/lib/serialDate.ts +++ b/lib/serialDate.ts @@ -7,7 +7,7 @@ const DAYSIZE = 86400; * Convert a native JavaScript Date, or an array of date parts to an spreadsheet serial date. * * Returns a serial date number if input was a Date object or an array of - * numbers, else a null. + * numbers, else an undefined. * * ```js * // input as Date @@ -15,7 +15,7 @@ const DAYSIZE = 86400; * // input as [ Y, M, D, h, m, s ] * dateToSerial([ 1978, 5, 17 ]); // 28627 * // other input - * dateToSerial("something else"); // null + * dateToSerial("something else"); // undefined * ``` * * @param date A Date instance or an array of date parts in descending order. @@ -77,7 +77,7 @@ export function dateToSerial ( * @param [options.leap1900] * Simulate the Lotus 1-2-3 [1900 leap year bug](https://docs.microsoft.com/en-us/office/troubleshoot/excel/wrongly-assumes-1900-is-leap-year). * True by default. - * @returns returns an array of date parts with parts in descending order: [ year, month, day, hour, minute, second ] + * @returns An array of date parts with parts in descending order: [ year, month, day, hour, minute, second ] */ export function dateFromSerial ( serialDate: number, diff --git a/test/info.spec.ts b/test/info.spec.ts index 33906f2..09709e7 100644 --- a/test/info.spec.ts +++ b/test/info.spec.ts @@ -33,7 +33,7 @@ function assertDateInfo (fmtString: string, expectProps: object) { .toEqual({ ...commonDateProps, ...expectProps }); } -test('numfmt.info', () => { +test('getFormatInfo', () => { const i1 = { ...getFormatInfo('0') }; expect(typeof i1, 'getFormatInfo emits object').toBe('object'); expect(i1, 'numfmt.info object is what we expect').toEqual({ From a028b54a4234cc3de31d038f5fc40c7f858d506c Mon Sep 17 00:00:00 2001 From: Borgar Date: Fri, 28 Aug 2026 21:39:59 +0000 Subject: [PATCH 13/14] Clean up token.value type --- API.md | 4 ++-- lib/parseFormatSection.ts | 22 +++++++++++++++------- lib/tokenize.ts | 9 +++------ lib/types.ts | 4 ++-- 4 files changed, 22 insertions(+), 17 deletions(-) diff --git a/API.md b/API.md index ab46c0f..b8a8ea5 100644 --- a/API.md +++ b/API.md @@ -1031,7 +1031,7 @@ Output from a number or date value parser. type Token = { raw: string; type: TokenType; - value: any; + value: string; }; ``` @@ -1043,7 +1043,7 @@ A token emitted by the tokenizer. | ------ | ------ | ------ | | `raw` | `string` | Raw token source. | | `type` | [`TokenType`](#type-aliasestokentypemd) | Token type. | -| `value` | `any` | The value of the token, cleaned of extra characters. | +| `value` | `string` | The value of the token, cleaned of extra characters. | diff --git a/lib/parseFormatSection.ts b/lib/parseFormatSection.ts index c0478e5..407f506 100644 --- a/lib/parseFormatSection.ts +++ b/lib/parseFormatSection.ts @@ -321,10 +321,16 @@ export function parseFormatSection (inputTokens: Token[]) { // condition else if (type === TOKEN_CONDITION) { - part.condition = [ - token.value[0], // operator - parseFloat(token.value[1]) // operand - ]; + const parts = /^(<[=>]?|>=?|=)\s*(-?[.\d]+)$/.exec(token.value); + if (parts) { + part.condition = [ + parts[1], // operator + parseFloat(parts[2]) // operand + ]; + } + else { + throw new Error('Invalid condition: ' + token.value); + } } // locale code -- we extend to allow std. "en-US" style codes @@ -355,11 +361,13 @@ export function parseFormatSection (inputTokens: Token[]) { // color else if (type === TOKEN_COLOR) { let cm: RegExpExecArray | null; - let v = token.value.toLowerCase(); + const v = token.value.toLowerCase(); if ((cm = /^color\s*(\d+)$/i.exec(v))) { - v = parseInt(cm[1], 10); + part.color = parseInt(cm[1], 10); + } + else { + part.color = v; } - part.color = v; } // percentage diff --git a/lib/tokenize.ts b/lib/tokenize.ts index 53cf9f8..8a70ed0 100644 --- a/lib/tokenize.ts +++ b/lib/tokenize.ts @@ -8,7 +8,7 @@ import { } from './constants.ts'; import type { Token, TokenType } from './types.ts'; -const tokenHandlers: [ TokenType, RegExp, 0 | 1 | number[] ][] = [ +const tokenHandlers: [ TokenType, RegExp, number ][] = [ [ TOKEN_GENERAL, /^General/i, 0 ], [ TOKEN_HASH, /^#/, 0 ], [ TOKEN_ZERO, /^0/, 0 ], @@ -31,7 +31,7 @@ const tokenHandlers: [ TokenType, RegExp, 0 | 1 | number[] ][] = [ [ TOKEN_ERROR, /^B$/, 0 ], // pattern must not end in a "B" [ TOKEN_DATETIME, /^(?:[hH]+|[mM]+|[sS]+|[yY]+|[bB]+|[dD]+|[gG]+|[aA]{3,}|e+)/, 0 ], [ TOKEN_DURATION, /^(?:\[(h+|m+|s+)\])/i, 1 ], - [ TOKEN_CONDITION, /^\[(<[=>]?|>=?|=)\s*(-?[.\d]+)\]/, [ 1, 2 ] ], + [ TOKEN_CONDITION, /^\[((?:<[=>]?|>=?|=)\s*(?:-?[.\d]+))\]/, 1 ], [ TOKEN_DBNUM, /^\[(DBNum[0-4]?\d)\]/i, 1 ], [ TOKEN_NATNUM, /^\[(NatNum[0-4]?\d)\]/i, 1 ], [ TOKEN_LOCALE, /^\[\$([^\]]+)\]/, 1 ], @@ -133,10 +133,7 @@ export function tokenize (pattern: string): Token[] { for (const [ type, expr, group ] of tokenHandlers) { const m = expr.exec(curr); if (m) { - const value = Array.isArray(group) - ? group.map(d => m[d]) - : m[group || 0]; - token = { type, value, raw: m[0] }; + token = { type, value: m[group || 0], raw: m[0] }; tokens.push(token); step = m[0].length; break; diff --git a/lib/types.ts b/lib/types.ts index 5ee1c34..5b0bd26 100644 --- a/lib/types.ts +++ b/lib/types.ts @@ -69,7 +69,7 @@ export type Token = { /** Token type. */ type: TokenType, /** The value of the token, cleaned of extra characters. */ - value: any, + value: string, /** Raw token source. */ raw: string, }; @@ -126,7 +126,7 @@ export type SectionType = export type Partition = { generated?: boolean, clock: 12 | 24, - color?: number, + color?: number | string, condition?: [ string, number ], date: number, den_min: number, From 0c270e07eccd1d7533ad37e3a9ea88f05ad28510 Mon Sep 17 00:00:00 2001 From: Borgar Date: Fri, 28 Aug 2026 21:47:59 +0000 Subject: [PATCH 14/14] Use never for ParseDataBool.v. This keeps the union access working (`parseValue(...).z` still types as `string | undefined`) but encodes the fact that booleans never carry a format. --- API.md | 4 ++-- lib/parseValue.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/API.md b/API.md index b8a8ea5..cc1fdb7 100644 --- a/API.md +++ b/API.md @@ -988,7 +988,7 @@ A list of the names of the months of the year. ```ts type ParseDataBool = { v: boolean; - z?: string; + z?: never; }; ``` @@ -999,7 +999,7 @@ Output from the boolean value parser. | Property | Type | Description | | ------ | ------ | ------ | | `v` | `boolean` | A boolean value | -| `z?` | `string` | A number format pattern | +| `z?` | `never` | A number format pattern | diff --git a/lib/parseValue.ts b/lib/parseValue.ts index 9d6d0c3..3995693 100644 --- a/lib/parseValue.ts +++ b/lib/parseValue.ts @@ -19,7 +19,7 @@ export type ParseDataBool = { /** A boolean value */ v: boolean; /** A number format pattern */ - z?: string; + z?: never; }; type LData = {