js.documents 14.4.46 → 14.4.47

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/dist/convert/composition.cjs +9 -4
  2. package/dist/convert/composition.js +9 -4
  3. package/dist/convert/variant-bridges.cjs +2 -1
  4. package/dist/convert/variant-bridges.js +2 -1
  5. package/dist/csv/records.cjs +2 -1
  6. package/dist/csv/records.js +2 -1
  7. package/dist/edit/geometry.cjs +2 -1
  8. package/dist/edit/geometry.js +2 -1
  9. package/dist/edit/odg/svg-path.cjs +2 -1
  10. package/dist/edit/odg/svg-path.js +2 -1
  11. package/dist/edit/ods/cell.cjs +2 -1
  12. package/dist/edit/ods/cell.js +2 -1
  13. package/dist/edit/pdf/util.cjs +2 -1
  14. package/dist/edit/pdf/util.js +2 -1
  15. package/dist/firebird/data.cjs +2 -1
  16. package/dist/firebird/data.js +2 -1
  17. package/dist/firebird/date.cjs +40 -21
  18. package/dist/firebird/date.js +40 -21
  19. package/dist/firebird/reader.cjs +30 -19
  20. package/dist/firebird/reader.js +30 -19
  21. package/dist/hsqldb/binary-script.cjs +5 -4
  22. package/dist/hsqldb/binary-script.js +5 -4
  23. package/dist/hsqldb/cache.cjs +4 -2
  24. package/dist/hsqldb/cache.js +4 -2
  25. package/dist/hsqldb/rowformat.cjs +93 -57
  26. package/dist/hsqldb/rowformat.js +93 -57
  27. package/dist/hsqldb/script.cjs +2 -1
  28. package/dist/hsqldb/script.js +2 -1
  29. package/dist/latex/lower.cjs +2 -1
  30. package/dist/latex/lower.js +2 -1
  31. package/dist/latex/rational.cjs +6 -3
  32. package/dist/latex/rational.js +6 -3
  33. package/dist/layout/cell-typing.cjs +7 -3
  34. package/dist/layout/cell-typing.js +7 -3
  35. package/dist/layout/reconstruct.cjs +17 -15
  36. package/dist/layout/reconstruct.js +17 -15
  37. package/dist/layout/shared.cjs +2 -1
  38. package/dist/layout/shared.js +2 -1
  39. package/dist/layout/sheets.cjs +2 -1
  40. package/dist/layout/sheets.js +2 -1
  41. package/dist/mathml/layout.cjs +11 -5
  42. package/dist/mathml/layout.js +11 -5
  43. package/dist/mathml/length.cjs +12 -10
  44. package/dist/mathml/length.js +12 -10
  45. package/dist/mathml/operators.cjs +7 -3
  46. package/dist/mathml/operators.js +7 -3
  47. package/dist/mathml/variant.cjs +116 -1142
  48. package/dist/mathml/variant.js +116 -1142
  49. package/dist/model/bytes.cjs +9 -16
  50. package/dist/model/bytes.js +9 -16
  51. package/dist/model/geometry.cjs +2 -1
  52. package/dist/model/geometry.js +2 -1
  53. package/dist/odb/read.cjs +10 -2
  54. package/dist/odb/read.js +10 -2
  55. package/dist/svg/paint.cjs +177 -749
  56. package/dist/svg/paint.js +177 -749
  57. package/dist/svg/path.cjs +11 -6
  58. package/dist/svg/path.js +11 -6
  59. package/dist/svg/read.cjs +7 -3
  60. package/dist/svg/read.js +8 -4
  61. package/dist/svg/transform.cjs +11 -7
  62. package/dist/svg/transform.js +11 -7
  63. package/dist/svg/units.cjs +9 -5
  64. package/dist/svg/units.d.cts +2 -1
  65. package/dist/svg/units.d.ts +2 -1
  66. package/dist/svg/units.js +9 -6
  67. package/package.json +2 -2
@@ -1,1084 +1,101 @@
1
1
  //#region src/mathml/variant.ts
2
+ const LATIN_CASE_LETTER_COUNT = 26;
3
+ const GREEK_LETTER_COUNT = 24;
4
+ const GREEK_SIGMA_GAP_INDEX = 17;
5
+ const GREEK_SYMBOL_VARIANT_COUNT = 6;
6
+ const DIGIT_COUNT = 10;
7
+ function consecutiveCodepoints(base, count) {
8
+ return Array.from({ length: count }, (_, index) => base + index);
9
+ }
10
+ function withHoles(codepoints, holes) {
11
+ const result = [...codepoints];
12
+ for (const [index, replacement] of Object.entries(holes)) result[Number(index)] = replacement;
13
+ return result;
14
+ }
15
+ function greekAlphabetRun(base, count) {
16
+ const result = [];
17
+ let codePoint = base;
18
+ for (let index = 0; index < count; index++) {
19
+ if (index === GREEK_SIGMA_GAP_INDEX) codePoint += 1;
20
+ result.push(codePoint);
21
+ codePoint += 1;
22
+ }
23
+ return result;
24
+ }
25
+ function latinPair(upperBase, upperHoles, lowerHoles) {
26
+ const lowerBase = upperBase + LATIN_CASE_LETTER_COUNT;
27
+ const upper = consecutiveCodepoints(upperBase, LATIN_CASE_LETTER_COUNT);
28
+ const lower = consecutiveCodepoints(lowerBase, LATIN_CASE_LETTER_COUNT);
29
+ return [upperHoles === void 0 ? upper : withHoles(upper, upperHoles), lowerHoles === void 0 ? lower : withHoles(lower, lowerHoles)];
30
+ }
2
31
  const LATIN_VARIANTS = {
3
- bold: [[
4
- 119808,
5
- 119809,
6
- 119810,
7
- 119811,
8
- 119812,
9
- 119813,
10
- 119814,
11
- 119815,
12
- 119816,
13
- 119817,
14
- 119818,
15
- 119819,
16
- 119820,
17
- 119821,
18
- 119822,
19
- 119823,
20
- 119824,
21
- 119825,
22
- 119826,
23
- 119827,
24
- 119828,
25
- 119829,
26
- 119830,
27
- 119831,
28
- 119832,
29
- 119833
30
- ], [
31
- 119834,
32
- 119835,
33
- 119836,
34
- 119837,
35
- 119838,
36
- 119839,
37
- 119840,
38
- 119841,
39
- 119842,
40
- 119843,
41
- 119844,
42
- 119845,
43
- 119846,
44
- 119847,
45
- 119848,
46
- 119849,
47
- 119850,
48
- 119851,
49
- 119852,
50
- 119853,
51
- 119854,
52
- 119855,
53
- 119856,
54
- 119857,
55
- 119858,
56
- 119859
57
- ]],
58
- italic: [[
59
- 119860,
60
- 119861,
61
- 119862,
62
- 119863,
63
- 119864,
64
- 119865,
65
- 119866,
66
- 119867,
67
- 119868,
68
- 119869,
69
- 119870,
70
- 119871,
71
- 119872,
72
- 119873,
73
- 119874,
74
- 119875,
75
- 119876,
76
- 119877,
77
- 119878,
78
- 119879,
79
- 119880,
80
- 119881,
81
- 119882,
82
- 119883,
83
- 119884,
84
- 119885
85
- ], [
86
- 119886,
87
- 119887,
88
- 119888,
89
- 119889,
90
- 119890,
91
- 119891,
92
- 119892,
93
- 8462,
94
- 119894,
95
- 119895,
96
- 119896,
97
- 119897,
98
- 119898,
99
- 119899,
100
- 119900,
101
- 119901,
102
- 119902,
103
- 119903,
104
- 119904,
105
- 119905,
106
- 119906,
107
- 119907,
108
- 119908,
109
- 119909,
110
- 119910,
111
- 119911
112
- ]],
113
- "bold-italic": [[
114
- 119912,
115
- 119913,
116
- 119914,
117
- 119915,
118
- 119916,
119
- 119917,
120
- 119918,
121
- 119919,
122
- 119920,
123
- 119921,
124
- 119922,
125
- 119923,
126
- 119924,
127
- 119925,
128
- 119926,
129
- 119927,
130
- 119928,
131
- 119929,
132
- 119930,
133
- 119931,
134
- 119932,
135
- 119933,
136
- 119934,
137
- 119935,
138
- 119936,
139
- 119937
140
- ], [
141
- 119938,
142
- 119939,
143
- 119940,
144
- 119941,
145
- 119942,
146
- 119943,
147
- 119944,
148
- 119945,
149
- 119946,
150
- 119947,
151
- 119948,
152
- 119949,
153
- 119950,
154
- 119951,
155
- 119952,
156
- 119953,
157
- 119954,
158
- 119955,
159
- 119956,
160
- 119957,
161
- 119958,
162
- 119959,
163
- 119960,
164
- 119961,
165
- 119962,
166
- 119963
167
- ]],
168
- script: [[
169
- 119964,
170
- 8492,
171
- 119966,
172
- 119967,
173
- 8496,
174
- 8497,
175
- 119970,
176
- 8459,
177
- 8464,
178
- 119973,
179
- 119974,
180
- 8466,
181
- 8499,
182
- 119977,
183
- 119978,
184
- 119979,
185
- 119980,
186
- 8475,
187
- 119982,
188
- 119983,
189
- 119984,
190
- 119985,
191
- 119986,
192
- 119987,
193
- 119988,
194
- 119989
195
- ], [
196
- 119990,
197
- 119991,
198
- 119992,
199
- 119993,
200
- 8495,
201
- 119995,
202
- 8458,
203
- 119997,
204
- 119998,
205
- 119999,
206
- 12e4,
207
- 120001,
208
- 120002,
209
- 120003,
210
- 8500,
211
- 120005,
212
- 120006,
213
- 120007,
214
- 120008,
215
- 120009,
216
- 120010,
217
- 120011,
218
- 120012,
219
- 120013,
220
- 120014,
221
- 120015
222
- ]],
223
- "bold-script": [[
224
- 120016,
225
- 120017,
226
- 120018,
227
- 120019,
228
- 120020,
229
- 120021,
230
- 120022,
231
- 120023,
232
- 120024,
233
- 120025,
234
- 120026,
235
- 120027,
236
- 120028,
237
- 120029,
238
- 120030,
239
- 120031,
240
- 120032,
241
- 120033,
242
- 120034,
243
- 120035,
244
- 120036,
245
- 120037,
246
- 120038,
247
- 120039,
248
- 120040,
249
- 120041
250
- ], [
251
- 120042,
252
- 120043,
253
- 120044,
254
- 120045,
255
- 120046,
256
- 120047,
257
- 120048,
258
- 120049,
259
- 120050,
260
- 120051,
261
- 120052,
262
- 120053,
263
- 120054,
264
- 120055,
265
- 120056,
266
- 120057,
267
- 120058,
268
- 120059,
269
- 120060,
270
- 120061,
271
- 120062,
272
- 120063,
273
- 120064,
274
- 120065,
275
- 120066,
276
- 120067
277
- ]],
278
- fraktur: [[
279
- 120068,
280
- 120069,
281
- 8493,
282
- 120071,
283
- 120072,
284
- 120073,
285
- 120074,
286
- 8460,
287
- 8465,
288
- 120077,
289
- 120078,
290
- 120079,
291
- 120080,
292
- 120081,
293
- 120082,
294
- 120083,
295
- 120084,
296
- 8476,
297
- 120086,
298
- 120087,
299
- 120088,
300
- 120089,
301
- 120090,
302
- 120091,
303
- 120092,
304
- 8488
305
- ], [
306
- 120094,
307
- 120095,
308
- 120096,
309
- 120097,
310
- 120098,
311
- 120099,
312
- 120100,
313
- 120101,
314
- 120102,
315
- 120103,
316
- 120104,
317
- 120105,
318
- 120106,
319
- 120107,
320
- 120108,
321
- 120109,
322
- 120110,
323
- 120111,
324
- 120112,
325
- 120113,
326
- 120114,
327
- 120115,
328
- 120116,
329
- 120117,
330
- 120118,
331
- 120119
332
- ]],
333
- "double-struck": [[
334
- 120120,
335
- 120121,
336
- 8450,
337
- 120123,
338
- 120124,
339
- 120125,
340
- 120126,
341
- 8461,
342
- 120128,
343
- 120129,
344
- 120130,
345
- 120131,
346
- 120132,
347
- 8469,
348
- 120134,
349
- 8473,
350
- 8474,
351
- 8477,
352
- 120138,
353
- 120139,
354
- 120140,
355
- 120141,
356
- 120142,
357
- 120143,
358
- 120144,
359
- 8484
360
- ], [
361
- 120146,
362
- 120147,
363
- 120148,
364
- 120149,
365
- 120150,
366
- 120151,
367
- 120152,
368
- 120153,
369
- 120154,
370
- 120155,
371
- 120156,
372
- 120157,
373
- 120158,
374
- 120159,
375
- 120160,
376
- 120161,
377
- 120162,
378
- 120163,
379
- 120164,
380
- 120165,
381
- 120166,
382
- 120167,
383
- 120168,
384
- 120169,
385
- 120170,
386
- 120171
387
- ]],
388
- "bold-fraktur": [[
389
- 120172,
390
- 120173,
391
- 120174,
392
- 120175,
393
- 120176,
394
- 120177,
395
- 120178,
396
- 120179,
397
- 120180,
398
- 120181,
399
- 120182,
400
- 120183,
401
- 120184,
402
- 120185,
403
- 120186,
404
- 120187,
405
- 120188,
406
- 120189,
407
- 120190,
408
- 120191,
409
- 120192,
410
- 120193,
411
- 120194,
412
- 120195,
413
- 120196,
414
- 120197
415
- ], [
416
- 120198,
417
- 120199,
418
- 120200,
419
- 120201,
420
- 120202,
421
- 120203,
422
- 120204,
423
- 120205,
424
- 120206,
425
- 120207,
426
- 120208,
427
- 120209,
428
- 120210,
429
- 120211,
430
- 120212,
431
- 120213,
432
- 120214,
433
- 120215,
434
- 120216,
435
- 120217,
436
- 120218,
437
- 120219,
438
- 120220,
439
- 120221,
440
- 120222,
441
- 120223
442
- ]],
443
- "sans-serif": [[
444
- 120224,
445
- 120225,
446
- 120226,
447
- 120227,
448
- 120228,
449
- 120229,
450
- 120230,
451
- 120231,
452
- 120232,
453
- 120233,
454
- 120234,
455
- 120235,
456
- 120236,
457
- 120237,
458
- 120238,
459
- 120239,
460
- 120240,
461
- 120241,
462
- 120242,
463
- 120243,
464
- 120244,
465
- 120245,
466
- 120246,
467
- 120247,
468
- 120248,
469
- 120249
470
- ], [
471
- 120250,
472
- 120251,
473
- 120252,
474
- 120253,
475
- 120254,
476
- 120255,
477
- 120256,
478
- 120257,
479
- 120258,
480
- 120259,
481
- 120260,
482
- 120261,
483
- 120262,
484
- 120263,
485
- 120264,
486
- 120265,
487
- 120266,
488
- 120267,
489
- 120268,
490
- 120269,
491
- 120270,
492
- 120271,
493
- 120272,
494
- 120273,
495
- 120274,
496
- 120275
497
- ]],
498
- "bold-sans-serif": [[
499
- 120276,
500
- 120277,
501
- 120278,
502
- 120279,
503
- 120280,
504
- 120281,
505
- 120282,
506
- 120283,
507
- 120284,
508
- 120285,
509
- 120286,
510
- 120287,
511
- 120288,
512
- 120289,
513
- 120290,
514
- 120291,
515
- 120292,
516
- 120293,
517
- 120294,
518
- 120295,
519
- 120296,
520
- 120297,
521
- 120298,
522
- 120299,
523
- 120300,
524
- 120301
525
- ], [
526
- 120302,
527
- 120303,
528
- 120304,
529
- 120305,
530
- 120306,
531
- 120307,
532
- 120308,
533
- 120309,
534
- 120310,
535
- 120311,
536
- 120312,
537
- 120313,
538
- 120314,
539
- 120315,
540
- 120316,
541
- 120317,
542
- 120318,
543
- 120319,
544
- 120320,
545
- 120321,
546
- 120322,
547
- 120323,
548
- 120324,
549
- 120325,
550
- 120326,
551
- 120327
552
- ]],
553
- "sans-serif-italic": [[
554
- 120328,
555
- 120329,
556
- 120330,
557
- 120331,
558
- 120332,
559
- 120333,
560
- 120334,
561
- 120335,
562
- 120336,
563
- 120337,
564
- 120338,
565
- 120339,
566
- 120340,
567
- 120341,
568
- 120342,
569
- 120343,
570
- 120344,
571
- 120345,
572
- 120346,
573
- 120347,
574
- 120348,
575
- 120349,
576
- 120350,
577
- 120351,
578
- 120352,
579
- 120353
580
- ], [
581
- 120354,
582
- 120355,
583
- 120356,
584
- 120357,
585
- 120358,
586
- 120359,
587
- 120360,
588
- 120361,
589
- 120362,
590
- 120363,
591
- 120364,
592
- 120365,
593
- 120366,
594
- 120367,
595
- 120368,
596
- 120369,
597
- 120370,
598
- 120371,
599
- 120372,
600
- 120373,
601
- 120374,
602
- 120375,
603
- 120376,
604
- 120377,
605
- 120378,
606
- 120379
607
- ]],
608
- "sans-serif-bold-italic": [[
609
- 120380,
610
- 120381,
611
- 120382,
612
- 120383,
613
- 120384,
614
- 120385,
615
- 120386,
616
- 120387,
617
- 120388,
618
- 120389,
619
- 120390,
620
- 120391,
621
- 120392,
622
- 120393,
623
- 120394,
624
- 120395,
625
- 120396,
626
- 120397,
627
- 120398,
628
- 120399,
629
- 120400,
630
- 120401,
631
- 120402,
632
- 120403,
633
- 120404,
634
- 120405
635
- ], [
636
- 120406,
637
- 120407,
638
- 120408,
639
- 120409,
640
- 120410,
641
- 120411,
642
- 120412,
643
- 120413,
644
- 120414,
645
- 120415,
646
- 120416,
647
- 120417,
648
- 120418,
649
- 120419,
650
- 120420,
651
- 120421,
652
- 120422,
653
- 120423,
654
- 120424,
655
- 120425,
656
- 120426,
657
- 120427,
658
- 120428,
659
- 120429,
660
- 120430,
661
- 120431
662
- ]],
663
- monospace: [[
664
- 120432,
665
- 120433,
666
- 120434,
667
- 120435,
668
- 120436,
669
- 120437,
670
- 120438,
671
- 120439,
672
- 120440,
673
- 120441,
674
- 120442,
675
- 120443,
676
- 120444,
677
- 120445,
678
- 120446,
679
- 120447,
680
- 120448,
681
- 120449,
682
- 120450,
683
- 120451,
684
- 120452,
685
- 120453,
686
- 120454,
687
- 120455,
688
- 120456,
689
- 120457
690
- ], [
691
- 120458,
692
- 120459,
693
- 120460,
694
- 120461,
695
- 120462,
696
- 120463,
697
- 120464,
698
- 120465,
699
- 120466,
700
- 120467,
701
- 120468,
702
- 120469,
703
- 120470,
704
- 120471,
705
- 120472,
706
- 120473,
707
- 120474,
708
- 120475,
709
- 120476,
710
- 120477,
711
- 120478,
712
- 120479,
713
- 120480,
714
- 120481,
715
- 120482,
716
- 120483
717
- ]]
32
+ bold: latinPair(119808),
33
+ italic: latinPair(119860, void 0, { 7: 8462 }),
34
+ "bold-italic": latinPair(119912),
35
+ script: latinPair(119964, {
36
+ 1: 8492,
37
+ 4: 8496,
38
+ 5: 8497,
39
+ 7: 8459,
40
+ 8: 8464,
41
+ 11: 8466,
42
+ 12: 8499,
43
+ 17: 8475
44
+ }, {
45
+ 4: 8495,
46
+ 6: 8458,
47
+ 14: 8500
48
+ }),
49
+ "bold-script": latinPair(120016),
50
+ fraktur: latinPair(120068, {
51
+ 2: 8493,
52
+ 7: 8460,
53
+ 8: 8465,
54
+ 17: 8476,
55
+ 25: 8488
56
+ }),
57
+ "double-struck": latinPair(120120, {
58
+ 2: 8450,
59
+ 7: 8461,
60
+ 13: 8469,
61
+ 15: 8473,
62
+ 16: 8474,
63
+ 17: 8477,
64
+ 25: 8484
65
+ }),
66
+ "bold-fraktur": latinPair(120172),
67
+ "sans-serif": latinPair(120224),
68
+ "bold-sans-serif": latinPair(120276),
69
+ "sans-serif-italic": latinPair(120328),
70
+ "sans-serif-bold-italic": latinPair(120380),
71
+ monospace: latinPair(120432)
718
72
  };
719
- const GREEK_UPPER_BASE = [
720
- 913,
721
- 914,
722
- 915,
723
- 916,
724
- 917,
725
- 918,
726
- 919,
727
- 920,
728
- 921,
729
- 922,
730
- 923,
731
- 924,
732
- 925,
733
- 926,
734
- 927,
735
- 928,
736
- 929,
737
- 931,
738
- 932,
739
- 933,
740
- 934,
741
- 935,
742
- 936,
743
- 937
744
- ];
745
- const GREEK_LOWER_BASE = [
746
- 945,
747
- 946,
748
- 947,
749
- 948,
750
- 949,
751
- 950,
752
- 951,
753
- 952,
754
- 953,
755
- 954,
756
- 955,
757
- 956,
758
- 957,
759
- 958,
760
- 959,
761
- 960,
762
- 961,
763
- 963,
764
- 964,
765
- 965,
766
- 966,
767
- 967,
768
- 968,
769
- 969
770
- ];
73
+ function greekVariantEntry(upperBase) {
74
+ const upper = greekAlphabetRun(upperBase, GREEK_LETTER_COUNT);
75
+ const nabla = upperBase + GREEK_LETTER_COUNT + 1;
76
+ const lowerBase = upperBase + LATIN_CASE_LETTER_COUNT;
77
+ const lower = greekAlphabetRun(lowerBase, GREEK_LETTER_COUNT);
78
+ const partial = lowerBase + GREEK_LETTER_COUNT + 1;
79
+ const [epsilon, theta, kappa, phi, rho, pi] = consecutiveCodepoints(partial + 1, GREEK_SYMBOL_VARIANT_COUNT);
80
+ return {
81
+ upper,
82
+ lower,
83
+ nabla,
84
+ partial,
85
+ epsilon,
86
+ theta,
87
+ kappa,
88
+ phi,
89
+ rho,
90
+ pi
91
+ };
92
+ }
771
93
  const GREEK_VARIANTS = {
772
- bold: {
773
- upper: [
774
- 120488,
775
- 120489,
776
- 120490,
777
- 120491,
778
- 120492,
779
- 120493,
780
- 120494,
781
- 120495,
782
- 120496,
783
- 120497,
784
- 120498,
785
- 120499,
786
- 120500,
787
- 120501,
788
- 120502,
789
- 120503,
790
- 120504,
791
- 120506,
792
- 120507,
793
- 120508,
794
- 120509,
795
- 120510,
796
- 120511,
797
- 120512
798
- ],
799
- lower: [
800
- 120514,
801
- 120515,
802
- 120516,
803
- 120517,
804
- 120518,
805
- 120519,
806
- 120520,
807
- 120521,
808
- 120522,
809
- 120523,
810
- 120524,
811
- 120525,
812
- 120526,
813
- 120527,
814
- 120528,
815
- 120529,
816
- 120530,
817
- 120532,
818
- 120533,
819
- 120534,
820
- 120535,
821
- 120536,
822
- 120537,
823
- 120538
824
- ],
825
- nabla: 120513,
826
- partial: 120539,
827
- epsilon: 120540,
828
- theta: 120541,
829
- kappa: 120542,
830
- phi: 120543,
831
- rho: 120544,
832
- pi: 120545
833
- },
834
- italic: {
835
- upper: [
836
- 120546,
837
- 120547,
838
- 120548,
839
- 120549,
840
- 120550,
841
- 120551,
842
- 120552,
843
- 120553,
844
- 120554,
845
- 120555,
846
- 120556,
847
- 120557,
848
- 120558,
849
- 120559,
850
- 120560,
851
- 120561,
852
- 120562,
853
- 120564,
854
- 120565,
855
- 120566,
856
- 120567,
857
- 120568,
858
- 120569,
859
- 120570
860
- ],
861
- lower: [
862
- 120572,
863
- 120573,
864
- 120574,
865
- 120575,
866
- 120576,
867
- 120577,
868
- 120578,
869
- 120579,
870
- 120580,
871
- 120581,
872
- 120582,
873
- 120583,
874
- 120584,
875
- 120585,
876
- 120586,
877
- 120587,
878
- 120588,
879
- 120590,
880
- 120591,
881
- 120592,
882
- 120593,
883
- 120594,
884
- 120595,
885
- 120596
886
- ],
887
- nabla: 120571,
888
- partial: 120597,
889
- epsilon: 120598,
890
- theta: 120599,
891
- kappa: 120600,
892
- phi: 120601,
893
- rho: 120602,
894
- pi: 120603
895
- },
896
- "bold-italic": {
897
- upper: [
898
- 120604,
899
- 120605,
900
- 120606,
901
- 120607,
902
- 120608,
903
- 120609,
904
- 120610,
905
- 120611,
906
- 120612,
907
- 120613,
908
- 120614,
909
- 120615,
910
- 120616,
911
- 120617,
912
- 120618,
913
- 120619,
914
- 120620,
915
- 120622,
916
- 120623,
917
- 120624,
918
- 120625,
919
- 120626,
920
- 120627,
921
- 120628
922
- ],
923
- lower: [
924
- 120630,
925
- 120631,
926
- 120632,
927
- 120633,
928
- 120634,
929
- 120635,
930
- 120636,
931
- 120637,
932
- 120638,
933
- 120639,
934
- 120640,
935
- 120641,
936
- 120642,
937
- 120643,
938
- 120644,
939
- 120645,
940
- 120646,
941
- 120648,
942
- 120649,
943
- 120650,
944
- 120651,
945
- 120652,
946
- 120653,
947
- 120654
948
- ],
949
- nabla: 120629,
950
- partial: 120655,
951
- epsilon: 120656,
952
- theta: 120657,
953
- kappa: 120658,
954
- phi: 120659,
955
- rho: 120660,
956
- pi: 120661
957
- },
958
- "bold-sans-serif": {
959
- upper: [
960
- 120662,
961
- 120663,
962
- 120664,
963
- 120665,
964
- 120666,
965
- 120667,
966
- 120668,
967
- 120669,
968
- 120670,
969
- 120671,
970
- 120672,
971
- 120673,
972
- 120674,
973
- 120675,
974
- 120676,
975
- 120677,
976
- 120678,
977
- 120680,
978
- 120681,
979
- 120682,
980
- 120683,
981
- 120684,
982
- 120685,
983
- 120686
984
- ],
985
- lower: [
986
- 120688,
987
- 120689,
988
- 120690,
989
- 120691,
990
- 120692,
991
- 120693,
992
- 120694,
993
- 120695,
994
- 120696,
995
- 120697,
996
- 120698,
997
- 120699,
998
- 120700,
999
- 120701,
1000
- 120702,
1001
- 120703,
1002
- 120704,
1003
- 120706,
1004
- 120707,
1005
- 120708,
1006
- 120709,
1007
- 120710,
1008
- 120711,
1009
- 120712
1010
- ],
1011
- nabla: 120687,
1012
- partial: 120713,
1013
- epsilon: 120714,
1014
- theta: 120715,
1015
- kappa: 120716,
1016
- phi: 120717,
1017
- rho: 120718,
1018
- pi: 120719
1019
- },
1020
- "sans-serif-bold-italic": {
1021
- upper: [
1022
- 120720,
1023
- 120721,
1024
- 120722,
1025
- 120723,
1026
- 120724,
1027
- 120725,
1028
- 120726,
1029
- 120727,
1030
- 120728,
1031
- 120729,
1032
- 120730,
1033
- 120731,
1034
- 120732,
1035
- 120733,
1036
- 120734,
1037
- 120735,
1038
- 120736,
1039
- 120738,
1040
- 120739,
1041
- 120740,
1042
- 120741,
1043
- 120742,
1044
- 120743,
1045
- 120744
1046
- ],
1047
- lower: [
1048
- 120746,
1049
- 120747,
1050
- 120748,
1051
- 120749,
1052
- 120750,
1053
- 120751,
1054
- 120752,
1055
- 120753,
1056
- 120754,
1057
- 120755,
1058
- 120756,
1059
- 120757,
1060
- 120758,
1061
- 120759,
1062
- 120760,
1063
- 120761,
1064
- 120762,
1065
- 120764,
1066
- 120765,
1067
- 120766,
1068
- 120767,
1069
- 120768,
1070
- 120769,
1071
- 120770
1072
- ],
1073
- nabla: 120745,
1074
- partial: 120771,
1075
- epsilon: 120772,
1076
- theta: 120773,
1077
- kappa: 120774,
1078
- phi: 120775,
1079
- rho: 120776,
1080
- pi: 120777
1081
- }
94
+ bold: greekVariantEntry(120488),
95
+ italic: greekVariantEntry(120546),
96
+ "bold-italic": greekVariantEntry(120604),
97
+ "bold-sans-serif": greekVariantEntry(120662),
98
+ "sans-serif-bold-italic": greekVariantEntry(120720)
1082
99
  };
1083
100
  const GREEK_SYMBOL_BASES = /* @__PURE__ */ new Map([
1084
101
  [1013, "epsilon"],
@@ -1088,79 +105,36 @@ const GREEK_SYMBOL_BASES = /* @__PURE__ */ new Map([
1088
105
  [1009, "rho"],
1089
106
  [982, "pi"]
1090
107
  ]);
108
+ const GREEK_CAPITAL_ALPHA = 913;
109
+ const GREEK_SMALL_ALPHA = 945;
110
+ const GREEK_UPPER_BASE = greekAlphabetRun(GREEK_CAPITAL_ALPHA, GREEK_LETTER_COUNT);
111
+ const GREEK_LOWER_BASE = greekAlphabetRun(GREEK_SMALL_ALPHA, GREEK_LETTER_COUNT);
1091
112
  const DIGIT_VARIANTS = {
1092
- bold: [
1093
- 120782,
1094
- 120783,
1095
- 120784,
1096
- 120785,
1097
- 120786,
1098
- 120787,
1099
- 120788,
1100
- 120789,
1101
- 120790,
1102
- 120791
1103
- ],
1104
- "double-struck": [
1105
- 120792,
1106
- 120793,
1107
- 120794,
1108
- 120795,
1109
- 120796,
1110
- 120797,
1111
- 120798,
1112
- 120799,
1113
- 120800,
1114
- 120801
1115
- ],
1116
- "sans-serif": [
1117
- 120802,
1118
- 120803,
1119
- 120804,
1120
- 120805,
1121
- 120806,
1122
- 120807,
1123
- 120808,
1124
- 120809,
1125
- 120810,
1126
- 120811
1127
- ],
1128
- "bold-sans-serif": [
1129
- 120812,
1130
- 120813,
1131
- 120814,
1132
- 120815,
1133
- 120816,
1134
- 120817,
1135
- 120818,
1136
- 120819,
1137
- 120820,
1138
- 120821
1139
- ],
1140
- monospace: [
1141
- 120822,
1142
- 120823,
1143
- 120824,
1144
- 120825,
1145
- 120826,
1146
- 120827,
1147
- 120828,
1148
- 120829,
1149
- 120830,
1150
- 120831
1151
- ]
113
+ bold: consecutiveCodepoints(120782, DIGIT_COUNT),
114
+ "double-struck": consecutiveCodepoints(120792, DIGIT_COUNT),
115
+ "sans-serif": consecutiveCodepoints(120802, DIGIT_COUNT),
116
+ "bold-sans-serif": consecutiveCodepoints(120812, DIGIT_COUNT),
117
+ monospace: consecutiveCodepoints(120822, DIGIT_COUNT)
1152
118
  };
119
+ const LATIN_UPPER_A = 65;
120
+ const LATIN_UPPER_Z = 90;
121
+ const LATIN_LOWER_A = 97;
122
+ const LATIN_LOWER_Z = 122;
123
+ const DIGIT_ZERO = 48;
124
+ const DIGIT_NINE = 57;
125
+ const NABLA = 8711;
126
+ const PARTIAL_DIFFERENTIAL = 8706;
1153
127
  function mapMathVariant(codePoint, variant) {
1154
128
  if (variant === "normal") return codePoint;
1155
- if (codePoint >= 65 && codePoint <= 90) return LATIN_VARIANTS[variant]?.[0][codePoint - 65] ?? codePoint;
1156
- if (codePoint >= 97 && codePoint <= 122) return LATIN_VARIANTS[variant]?.[1][codePoint - 97] ?? codePoint;
1157
- if (codePoint >= 48 && codePoint <= 57) return DIGIT_VARIANTS[variant]?.[codePoint - 48] ?? codePoint;
129
+ if (codePoint >= LATIN_UPPER_A && codePoint <= LATIN_UPPER_Z) return LATIN_VARIANTS[variant]?.[0][codePoint - LATIN_UPPER_A] ?? codePoint;
130
+ if (codePoint >= LATIN_LOWER_A && codePoint <= LATIN_LOWER_Z) return LATIN_VARIANTS[variant]?.[1][codePoint - LATIN_LOWER_A] ?? codePoint;
131
+ if (codePoint >= DIGIT_ZERO && codePoint <= DIGIT_NINE) return DIGIT_VARIANTS[variant]?.[codePoint - DIGIT_ZERO] ?? codePoint;
1158
132
  const greekUpperIndex = GREEK_UPPER_BASE.indexOf(codePoint);
1159
133
  if (greekUpperIndex !== -1) return GREEK_VARIANTS[variant]?.upper[greekUpperIndex] ?? codePoint;
1160
134
  const greekLowerIndex = GREEK_LOWER_BASE.indexOf(codePoint);
1161
135
  if (greekLowerIndex !== -1) return GREEK_VARIANTS[variant]?.lower[greekLowerIndex] ?? codePoint;
1162
- if (codePoint === 8711) return GREEK_VARIANTS[variant]?.nabla ?? codePoint;
1163
- if (codePoint === 8706) return GREEK_VARIANTS[variant]?.partial ?? codePoint;
136
+ if (codePoint === NABLA) return GREEK_VARIANTS[variant]?.nabla ?? codePoint;
137
+ if (codePoint === PARTIAL_DIFFERENTIAL) return GREEK_VARIANTS[variant]?.partial ?? codePoint;
1164
138
  const symbolField = GREEK_SYMBOL_BASES.get(codePoint);
1165
139
  if (symbolField !== void 0) {
1166
140
  const entry = GREEK_VARIANTS[variant];