@learncard/vpqr-plugin 1.0.11 → 1.0.13

Sign up to get free protection for your applications and to get access to all the features.
@@ -16,7 +16,10 @@ var __copyProps = (to, from, except, desc) => {
16
16
  }
17
17
  return to;
18
18
  };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
+ mod
22
+ ));
20
23
 
21
24
  // ../../../node_modules/.pnpm/base32-decode@1.0.0/node_modules/base32-decode/index.js
22
25
  var require_base32_decode = __commonJS({
@@ -69,7 +72,7 @@ var require_base32_decode = __commonJS({
69
72
  }
70
73
  });
71
74
 
72
- // ../../../node_modules/.pnpm/cborg@1.10.2/node_modules/cborg/esm/lib/is.js
75
+ // ../../../node_modules/.pnpm/cborg@4.2.4/node_modules/cborg/lib/is.js
73
76
  var typeofs = [
74
77
  "string",
75
78
  "number",
@@ -155,7 +158,7 @@ function getObjectType(value) {
155
158
  }
156
159
  __name(getObjectType, "getObjectType");
157
160
 
158
- // ../../../node_modules/.pnpm/cborg@1.10.2/node_modules/cborg/esm/lib/token.js
161
+ // ../../../node_modules/.pnpm/cborg@4.2.4/node_modules/cborg/lib/token.js
159
162
  var Type = class {
160
163
  constructor(major, name, terminal) {
161
164
  this.major = major;
@@ -198,7 +201,7 @@ var Token = class {
198
201
  };
199
202
  __name(Token, "Token");
200
203
 
201
- // ../../../node_modules/.pnpm/cborg@1.10.2/node_modules/cborg/esm/lib/byte-utils.js
204
+ // ../../../node_modules/.pnpm/cborg@4.2.4/node_modules/cborg/lib/byte-utils.js
202
205
  var useBuffer = globalThis.process && !globalThis.process.browser && globalThis.Buffer && typeof globalThis.Buffer.isBuffer === "function";
203
206
  var textDecoder = new TextDecoder();
204
207
  var textEncoder = new TextEncoder();
@@ -267,60 +270,29 @@ function compare(b1, b2) {
267
270
  return 0;
268
271
  }
269
272
  __name(compare, "compare");
270
- function utf8ToBytes(string, units = Infinity) {
271
- let codePoint;
272
- const length = string.length;
273
- let leadSurrogate = null;
274
- const bytes = [];
275
- for (let i = 0; i < length; ++i) {
276
- codePoint = string.charCodeAt(i);
277
- if (codePoint > 55295 && codePoint < 57344) {
278
- if (!leadSurrogate) {
279
- if (codePoint > 56319) {
280
- if ((units -= 3) > -1)
281
- bytes.push(239, 191, 189);
282
- continue;
283
- } else if (i + 1 === length) {
284
- if ((units -= 3) > -1)
285
- bytes.push(239, 191, 189);
286
- continue;
287
- }
288
- leadSurrogate = codePoint;
289
- continue;
290
- }
291
- if (codePoint < 56320) {
292
- if ((units -= 3) > -1)
293
- bytes.push(239, 191, 189);
294
- leadSurrogate = codePoint;
295
- continue;
296
- }
297
- codePoint = (leadSurrogate - 55296 << 10 | codePoint - 56320) + 65536;
298
- } else if (leadSurrogate) {
299
- if ((units -= 3) > -1)
300
- bytes.push(239, 191, 189);
301
- }
302
- leadSurrogate = null;
303
- if (codePoint < 128) {
304
- if ((units -= 1) < 0)
305
- break;
306
- bytes.push(codePoint);
307
- } else if (codePoint < 2048) {
308
- if ((units -= 2) < 0)
309
- break;
310
- bytes.push(codePoint >> 6 | 192, codePoint & 63 | 128);
311
- } else if (codePoint < 65536) {
312
- if ((units -= 3) < 0)
313
- break;
314
- bytes.push(codePoint >> 12 | 224, codePoint >> 6 & 63 | 128, codePoint & 63 | 128);
315
- } else if (codePoint < 1114112) {
316
- if ((units -= 4) < 0)
317
- break;
318
- bytes.push(codePoint >> 18 | 240, codePoint >> 12 & 63 | 128, codePoint >> 6 & 63 | 128, codePoint & 63 | 128);
273
+ function utf8ToBytes(str) {
274
+ const out = [];
275
+ let p = 0;
276
+ for (let i = 0; i < str.length; i++) {
277
+ let c = str.charCodeAt(i);
278
+ if (c < 128) {
279
+ out[p++] = c;
280
+ } else if (c < 2048) {
281
+ out[p++] = c >> 6 | 192;
282
+ out[p++] = c & 63 | 128;
283
+ } else if ((c & 64512) === 55296 && i + 1 < str.length && (str.charCodeAt(i + 1) & 64512) === 56320) {
284
+ c = 65536 + ((c & 1023) << 10) + (str.charCodeAt(++i) & 1023);
285
+ out[p++] = c >> 18 | 240;
286
+ out[p++] = c >> 12 & 63 | 128;
287
+ out[p++] = c >> 6 & 63 | 128;
288
+ out[p++] = c & 63 | 128;
319
289
  } else {
320
- throw new Error("Invalid code point");
290
+ out[p++] = c >> 12 | 224;
291
+ out[p++] = c >> 6 & 63 | 128;
292
+ out[p++] = c & 63 | 128;
321
293
  }
322
294
  }
323
- return bytes;
295
+ return out;
324
296
  }
325
297
  __name(utf8ToBytes, "utf8ToBytes");
326
298
  function utf8Slice(buf2, offset, end) {
@@ -391,13 +363,16 @@ function decodeCodePointsArray(codePoints) {
391
363
  let res = "";
392
364
  let i = 0;
393
365
  while (i < len) {
394
- res += String.fromCharCode.apply(String, codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH));
366
+ res += String.fromCharCode.apply(
367
+ String,
368
+ codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)
369
+ );
395
370
  }
396
371
  return res;
397
372
  }
398
373
  __name(decodeCodePointsArray, "decodeCodePointsArray");
399
374
 
400
- // ../../../node_modules/.pnpm/cborg@1.10.2/node_modules/cborg/esm/lib/bl.js
375
+ // ../../../node_modules/.pnpm/cborg@4.2.4/node_modules/cborg/lib/bl.js
401
376
  var defaultChunkSize = 256;
402
377
  var Bl = class {
403
378
  constructor(chunkSize = defaultChunkSize) {
@@ -469,7 +444,7 @@ var Bl = class {
469
444
  };
470
445
  __name(Bl, "Bl");
471
446
 
472
- // ../../../node_modules/.pnpm/cborg@1.10.2/node_modules/cborg/esm/lib/common.js
447
+ // ../../../node_modules/.pnpm/cborg@4.2.4/node_modules/cborg/lib/common.js
473
448
  var decodeErrPrefix = "CBOR decode error:";
474
449
  var encodeErrPrefix = "CBOR encode error:";
475
450
  var uintMinorPrefixBytes = [];
@@ -485,14 +460,8 @@ function assertEnoughData(data, pos, need) {
485
460
  }
486
461
  __name(assertEnoughData, "assertEnoughData");
487
462
 
488
- // ../../../node_modules/.pnpm/cborg@1.10.2/node_modules/cborg/esm/lib/0uint.js
489
- var uintBoundaries = [
490
- 24,
491
- 256,
492
- 65536,
493
- 4294967296,
494
- BigInt("18446744073709551616")
495
- ];
463
+ // ../../../node_modules/.pnpm/cborg@4.2.4/node_modules/cborg/lib/0uint.js
464
+ var uintBoundaries = [24, 256, 65536, 4294967296, BigInt("18446744073709551616")];
496
465
  function readUint8(data, offset, options) {
497
466
  assertEnoughData(data, offset, 1);
498
467
  const value = data[offset];
@@ -563,39 +532,17 @@ function encodeUintValue(buf2, major, uint) {
563
532
  buf2.push([major | nuint]);
564
533
  } else if (uint < uintBoundaries[1]) {
565
534
  const nuint = Number(uint);
566
- buf2.push([
567
- major | 24,
568
- nuint
569
- ]);
535
+ buf2.push([major | 24, nuint]);
570
536
  } else if (uint < uintBoundaries[2]) {
571
537
  const nuint = Number(uint);
572
- buf2.push([
573
- major | 25,
574
- nuint >>> 8,
575
- nuint & 255
576
- ]);
538
+ buf2.push([major | 25, nuint >>> 8, nuint & 255]);
577
539
  } else if (uint < uintBoundaries[3]) {
578
540
  const nuint = Number(uint);
579
- buf2.push([
580
- major | 26,
581
- nuint >>> 24 & 255,
582
- nuint >>> 16 & 255,
583
- nuint >>> 8 & 255,
584
- nuint & 255
585
- ]);
541
+ buf2.push([major | 26, nuint >>> 24 & 255, nuint >>> 16 & 255, nuint >>> 8 & 255, nuint & 255]);
586
542
  } else {
587
543
  const buint = BigInt(uint);
588
544
  if (buint < uintBoundaries[4]) {
589
- const set = [
590
- major | 27,
591
- 0,
592
- 0,
593
- 0,
594
- 0,
595
- 0,
596
- 0,
597
- 0
598
- ];
545
+ const set = [major | 27, 0, 0, 0, 0, 0, 0, 0];
599
546
  let lo = Number(buint & BigInt(4294967295));
600
547
  let hi = Number(buint >> BigInt(32) & BigInt(4294967295));
601
548
  set[8] = lo & 255;
@@ -641,7 +588,7 @@ encodeUint.compareTokens = /* @__PURE__ */ __name(function compareTokens(tok1, t
641
588
  return tok1.value < tok2.value ? -1 : tok1.value > tok2.value ? 1 : 0;
642
589
  }, "compareTokens");
643
590
 
644
- // ../../../node_modules/.pnpm/cborg@1.10.2/node_modules/cborg/esm/lib/1negint.js
591
+ // ../../../node_modules/.pnpm/cborg@4.2.4/node_modules/cborg/lib/1negint.js
645
592
  function decodeNegint8(data, pos, _minor, options) {
646
593
  return new Token(Type.negint, -1 - readUint8(data, pos + 1, options), 2);
647
594
  }
@@ -697,7 +644,7 @@ encodeNegint.compareTokens = /* @__PURE__ */ __name(function compareTokens2(tok1
697
644
  return tok1.value < tok2.value ? 1 : tok1.value > tok2.value ? -1 : 0;
698
645
  }, "compareTokens");
699
646
 
700
- // ../../../node_modules/.pnpm/cborg@1.10.2/node_modules/cborg/esm/lib/2bytes.js
647
+ // ../../../node_modules/.pnpm/cborg@4.2.4/node_modules/cborg/lib/2bytes.js
701
648
  function toToken(data, pos, prefix, length) {
702
649
  assertEnoughData(data, pos, prefix + length);
703
650
  const buf2 = slice(data, pos + prefix, pos + prefix + length);
@@ -753,7 +700,7 @@ function compareBytes(b1, b2) {
753
700
  }
754
701
  __name(compareBytes, "compareBytes");
755
702
 
756
- // ../../../node_modules/.pnpm/cborg@1.10.2/node_modules/cborg/esm/lib/3string.js
703
+ // ../../../node_modules/.pnpm/cborg@4.2.4/node_modules/cborg/lib/3string.js
757
704
  function toToken2(data, pos, prefix, length, options) {
758
705
  const totLength = prefix + length;
759
706
  assertEnoughData(data, pos, totLength);
@@ -790,7 +737,7 @@ function decodeString64(data, pos, _minor, options) {
790
737
  __name(decodeString64, "decodeString64");
791
738
  var encodeString = encodeBytes;
792
739
 
793
- // ../../../node_modules/.pnpm/cborg@1.10.2/node_modules/cborg/esm/lib/4array.js
740
+ // ../../../node_modules/.pnpm/cborg@4.2.4/node_modules/cborg/lib/4array.js
794
741
  function toToken3(_data, _pos, prefix, length) {
795
742
  return new Token(Type.array, length, prefix);
796
743
  }
@@ -835,7 +782,7 @@ encodeArray.encodedSize = /* @__PURE__ */ __name(function encodedSize5(token) {
835
782
  return encodeUintValue.encodedSize(token.value);
836
783
  }, "encodedSize");
837
784
 
838
- // ../../../node_modules/.pnpm/cborg@1.10.2/node_modules/cborg/esm/lib/5map.js
785
+ // ../../../node_modules/.pnpm/cborg@4.2.4/node_modules/cborg/lib/5map.js
839
786
  function toToken4(_data, _pos, prefix, length) {
840
787
  return new Token(Type.map, length, prefix);
841
788
  }
@@ -880,7 +827,7 @@ encodeMap.encodedSize = /* @__PURE__ */ __name(function encodedSize6(token) {
880
827
  return encodeUintValue.encodedSize(token.value);
881
828
  }, "encodedSize");
882
829
 
883
- // ../../../node_modules/.pnpm/cborg@1.10.2/node_modules/cborg/esm/lib/6tag.js
830
+ // ../../../node_modules/.pnpm/cborg@4.2.4/node_modules/cborg/lib/6tag.js
884
831
  function decodeTagCompact(_data, _pos, minor, _options) {
885
832
  return new Token(Type.tag, minor, 1);
886
833
  }
@@ -910,7 +857,7 @@ encodeTag.encodedSize = /* @__PURE__ */ __name(function encodedSize7(token) {
910
857
  return encodeUintValue.encodedSize(token.value);
911
858
  }, "encodedSize");
912
859
 
913
- // ../../../node_modules/.pnpm/cborg@1.10.2/node_modules/cborg/esm/lib/7float.js
860
+ // ../../../node_modules/.pnpm/cborg@4.2.4/node_modules/cborg/lib/7float.js
914
861
  var MINOR_FALSE = 20;
915
862
  var MINOR_TRUE = 21;
916
863
  var MINOR_NULL = 22;
@@ -1098,7 +1045,7 @@ function readFloat64(ui8a2, pos) {
1098
1045
  __name(readFloat64, "readFloat64");
1099
1046
  encodeFloat.compareTokens = encodeUint.compareTokens;
1100
1047
 
1101
- // ../../../node_modules/.pnpm/cborg@1.10.2/node_modules/cborg/esm/lib/jump.js
1048
+ // ../../../node_modules/.pnpm/cborg@4.2.4/node_modules/cborg/lib/jump.js
1102
1049
  function invalidMinor(data, pos, minor) {
1103
1050
  throw new Error(`${decodeErrPrefix} encountered invalid minor (${minor}) for major ${data[pos] >>> 5}`);
1104
1051
  }
@@ -1257,7 +1204,7 @@ function quickEncodeToken(token) {
1257
1204
  }
1258
1205
  __name(quickEncodeToken, "quickEncodeToken");
1259
1206
 
1260
- // ../../../node_modules/.pnpm/cborg@1.10.2/node_modules/cborg/esm/lib/encode.js
1207
+ // ../../../node_modules/.pnpm/cborg@4.2.4/node_modules/cborg/lib/encode.js
1261
1208
  var defaultEncodeOptions = {
1262
1209
  float64: false,
1263
1210
  mapSorter,
@@ -1349,10 +1296,7 @@ var typeEncoders = {
1349
1296
  Array(obj, _typ, options, refStack) {
1350
1297
  if (!obj.length) {
1351
1298
  if (options.addBreakTokens === true) {
1352
- return [
1353
- simpleTokens.emptyArray,
1354
- new Token(Type.break)
1355
- ];
1299
+ return [simpleTokens.emptyArray, new Token(Type.break)];
1356
1300
  }
1357
1301
  return simpleTokens.emptyArray;
1358
1302
  }
@@ -1363,16 +1307,9 @@ var typeEncoders = {
1363
1307
  entries[i++] = objectToTokens(e, options, refStack);
1364
1308
  }
1365
1309
  if (options.addBreakTokens) {
1366
- return [
1367
- new Token(Type.array, obj.length),
1368
- entries,
1369
- new Token(Type.break)
1370
- ];
1310
+ return [new Token(Type.array, obj.length), entries, new Token(Type.break)];
1371
1311
  }
1372
- return [
1373
- new Token(Type.array, obj.length),
1374
- entries
1375
- ];
1312
+ return [new Token(Type.array, obj.length), entries];
1376
1313
  },
1377
1314
  Object(obj, typ, options, refStack) {
1378
1315
  const isMap = typ !== "Object";
@@ -1380,10 +1317,7 @@ var typeEncoders = {
1380
1317
  const length = isMap ? obj.size : keys.length;
1381
1318
  if (!length) {
1382
1319
  if (options.addBreakTokens === true) {
1383
- return [
1384
- simpleTokens.emptyMap,
1385
- new Token(Type.break)
1386
- ];
1320
+ return [simpleTokens.emptyMap, new Token(Type.break)];
1387
1321
  }
1388
1322
  return simpleTokens.emptyMap;
1389
1323
  }
@@ -1398,16 +1332,9 @@ var typeEncoders = {
1398
1332
  }
1399
1333
  sortMapEntries(entries, options);
1400
1334
  if (options.addBreakTokens) {
1401
- return [
1402
- new Token(Type.map, length),
1403
- entries,
1404
- new Token(Type.break)
1405
- ];
1335
+ return [new Token(Type.map, length), entries, new Token(Type.break)];
1406
1336
  }
1407
- return [
1408
- new Token(Type.map, length),
1409
- entries
1410
- ];
1337
+ return [new Token(Type.map, length), entries];
1411
1338
  }
1412
1339
  };
1413
1340
  typeEncoders.Map = typeEncoders.Object;
@@ -1490,7 +1417,7 @@ function encode(data, options) {
1490
1417
  }
1491
1418
  __name(encode, "encode");
1492
1419
 
1493
- // ../../../node_modules/.pnpm/cborg@1.10.2/node_modules/cborg/esm/lib/decode.js
1420
+ // ../../../node_modules/.pnpm/cborg@4.2.4/node_modules/cborg/lib/decode.js
1494
1421
  var defaultDecodeOptions = {
1495
1422
  strict: false,
1496
1423
  allowIndefinite: true,
@@ -1499,15 +1426,18 @@ var defaultDecodeOptions = {
1499
1426
  };
1500
1427
  var Tokeniser = class {
1501
1428
  constructor(data, options = {}) {
1502
- this.pos = 0;
1429
+ this._pos = 0;
1503
1430
  this.data = data;
1504
1431
  this.options = options;
1505
1432
  }
1433
+ pos() {
1434
+ return this._pos;
1435
+ }
1506
1436
  done() {
1507
- return this.pos >= this.data.length;
1437
+ return this._pos >= this.data.length;
1508
1438
  }
1509
1439
  next() {
1510
- const byt = this.data[this.pos];
1440
+ const byt = this.data[this._pos];
1511
1441
  let token = quick[byt];
1512
1442
  if (token === void 0) {
1513
1443
  const decoder = jump[byt];
@@ -1515,9 +1445,9 @@ var Tokeniser = class {
1515
1445
  throw new Error(`${decodeErrPrefix} no decoder for major type ${byt >>> 5} (byte 0x${byt.toString(16).padStart(2, "0")})`);
1516
1446
  }
1517
1447
  const minor = byt & 31;
1518
- token = decoder(this.data, this.pos, minor, this.options);
1448
+ token = decoder(this.data, this._pos, minor, this.options);
1519
1449
  }
1520
- this.pos += token.encodedLength;
1450
+ this._pos += token.encodedLength;
1521
1451
  return token;
1522
1452
  }
1523
1453
  };
@@ -1605,7 +1535,7 @@ function tokensToObject(tokeniser, options) {
1605
1535
  throw new Error("unsupported");
1606
1536
  }
1607
1537
  __name(tokensToObject, "tokensToObject");
1608
- function decode(data, options) {
1538
+ function decodeFirst(data, options) {
1609
1539
  if (!(data instanceof Uint8Array)) {
1610
1540
  throw new Error(`${decodeErrPrefix} data to decode must be a Uint8Array`);
1611
1541
  }
@@ -1618,14 +1548,19 @@ function decode(data, options) {
1618
1548
  if (decoded === BREAK) {
1619
1549
  throw new Error(`${decodeErrPrefix} got unexpected break`);
1620
1550
  }
1621
- if (!tokeniser.done()) {
1551
+ return [decoded, data.subarray(tokeniser.pos())];
1552
+ }
1553
+ __name(decodeFirst, "decodeFirst");
1554
+ function decode(data, options) {
1555
+ const [decoded, remainder] = decodeFirst(data, options);
1556
+ if (remainder.length > 0) {
1622
1557
  throw new Error(`${decodeErrPrefix} too many terminals, data makes no sense`);
1623
1558
  }
1624
1559
  return decoded;
1625
1560
  }
1626
1561
  __name(decode, "decode");
1627
1562
 
1628
- // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.0.0/node_modules/@digitalbazaar/cborld/lib/CborldError.js
1563
+ // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.2.0/node_modules/@digitalbazaar/cborld/lib/CborldError.js
1629
1564
  var CborldError = class extends Error {
1630
1565
  constructor(value, message) {
1631
1566
  super();
@@ -1637,7 +1572,39 @@ var CborldError = class extends Error {
1637
1572
  };
1638
1573
  __name(CborldError, "CborldError");
1639
1574
 
1640
- // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.0.0/node_modules/@digitalbazaar/cborld/lib/codecs/CborldDecoder.js
1575
+ // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.2.0/node_modules/@digitalbazaar/cborld/lib/keywords.js
1576
+ var KEYWORDS = /* @__PURE__ */ new Map([
1577
+ ["@context", 0],
1578
+ ["@type", 2],
1579
+ ["@id", 4],
1580
+ ["@value", 6],
1581
+ ["@direction", 8],
1582
+ ["@graph", 10],
1583
+ ["@included", 12],
1584
+ ["@index", 14],
1585
+ ["@json", 16],
1586
+ ["@language", 18],
1587
+ ["@list", 20],
1588
+ ["@nest", 22],
1589
+ ["@reverse", 24],
1590
+ ["@base", 26],
1591
+ ["@container", 28],
1592
+ ["@default", 30],
1593
+ ["@embed", 32],
1594
+ ["@explicit", 34],
1595
+ ["@none", 36],
1596
+ ["@omitDefault", 38],
1597
+ ["@prefix", 40],
1598
+ ["@preserve", 42],
1599
+ ["@protected", 44],
1600
+ ["@requireAll", 46],
1601
+ ["@set", 48],
1602
+ ["@version", 50],
1603
+ ["@vocab", 52]
1604
+ ]);
1605
+ var FIRST_CUSTOM_TERM_ID = 100;
1606
+
1607
+ // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.2.0/node_modules/@digitalbazaar/cborld/lib/codecs/CborldDecoder.js
1641
1608
  var CborldDecoder = class {
1642
1609
  decode({ value } = {}) {
1643
1610
  throw new Error("Must be implemented by derived class.");
@@ -1648,7 +1615,7 @@ var CborldDecoder = class {
1648
1615
  };
1649
1616
  __name(CborldDecoder, "CborldDecoder");
1650
1617
 
1651
- // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.0.0/node_modules/@digitalbazaar/cborld/lib/codecs/registeredContexts.js
1618
+ // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.2.0/node_modules/@digitalbazaar/cborld/lib/codecs/registeredContexts.js
1652
1619
  var ID_TO_URL = /* @__PURE__ */ new Map();
1653
1620
  var URL_TO_ID = /* @__PURE__ */ new Map();
1654
1621
  _addRegistration(16, "https://www.w3.org/ns/activitystreams");
@@ -1666,15 +1633,19 @@ _addRegistration(27, "https://w3id.org/security/suites/hmac-2019/v1");
1666
1633
  _addRegistration(28, "https://w3id.org/security/suites/aes-2019/v1");
1667
1634
  _addRegistration(29, "https://w3id.org/vaccination/v1");
1668
1635
  _addRegistration(30, "https://w3id.org/vc-revocation-list-2020/v1");
1669
- _addRegistration(31, "https://w3id.org/dcc/v1c");
1636
+ _addRegistration(31, "https://w3id.org/dcc/v1");
1670
1637
  _addRegistration(32, "https://w3id.org/vc/status-list/v1");
1638
+ _addRegistration(48, "https://w3id.org/security/data-integrity/v1");
1639
+ _addRegistration(49, "https://w3id.org/security/multikey/v1");
1640
+ _addRegistration(50, "https://purl.imsglobal.org/spec/ob/v3p0/context.json");
1641
+ _addRegistration(51, "https://w3id.org/security/data-integrity/v2");
1671
1642
  function _addRegistration(id, url) {
1672
1643
  URL_TO_ID.set(url, id);
1673
1644
  ID_TO_URL.set(id, url);
1674
1645
  }
1675
1646
  __name(_addRegistration, "_addRegistration");
1676
1647
 
1677
- // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.0.0/node_modules/@digitalbazaar/cborld/lib/codecs/ContextDecoder.js
1648
+ // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.2.0/node_modules/@digitalbazaar/cborld/lib/codecs/ContextDecoder.js
1678
1649
  var ContextDecoder = class extends CborldDecoder {
1679
1650
  constructor({ reverseAppContextMap } = {}) {
1680
1651
  super();
@@ -1686,7 +1657,10 @@ var ContextDecoder = class extends CborldDecoder {
1686
1657
  }
1687
1658
  const url = ID_TO_URL.get(value) || this.reverseAppContextMap.get(value);
1688
1659
  if (url === void 0) {
1689
- throw new CborldError("ERR_UNDEFINED_COMPRESSED_CONTEXT", `Undefined compressed context "${value}".`);
1660
+ throw new CborldError(
1661
+ "ERR_UNDEFINED_COMPRESSED_CONTEXT",
1662
+ `Undefined compressed context "${value}".`
1663
+ );
1690
1664
  }
1691
1665
  return url;
1692
1666
  }
@@ -1711,11 +1685,15 @@ function _mapToObject(map) {
1711
1685
  }
1712
1686
  __name(_mapToObject, "_mapToObject");
1713
1687
 
1714
- // ../../../node_modules/.pnpm/js-base64@3.7.5/node_modules/js-base64/base64.mjs
1715
- var version = "3.7.5";
1688
+ // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.2.0/node_modules/@digitalbazaar/cborld/lib/util-browser.js
1689
+ function inspect(data, options) {
1690
+ return JSON.stringify(data, null, 2);
1691
+ }
1692
+ __name(inspect, "inspect");
1693
+
1694
+ // ../../../node_modules/.pnpm/js-base64@3.7.7/node_modules/js-base64/base64.mjs
1695
+ var version = "3.7.7";
1716
1696
  var VERSION = version;
1717
- var _hasatob = typeof atob === "function";
1718
- var _hasbtoa = typeof btoa === "function";
1719
1697
  var _hasBuffer = typeof Buffer === "function";
1720
1698
  var _TD = typeof TextDecoder === "function" ? new TextDecoder() : void 0;
1721
1699
  var _TE = typeof TextEncoder === "function" ? new TextEncoder() : void 0;
@@ -1742,7 +1720,7 @@ var btoaPolyfill = /* @__PURE__ */ __name((bin) => {
1742
1720
  }
1743
1721
  return pad ? asc.slice(0, pad - 3) + "===".substring(pad) : asc;
1744
1722
  }, "btoaPolyfill");
1745
- var _btoa = _hasbtoa ? (bin) => btoa(bin) : _hasBuffer ? (bin) => Buffer.from(bin, "binary").toString("base64") : btoaPolyfill;
1723
+ var _btoa = typeof btoa === "function" ? (bin) => btoa(bin) : _hasBuffer ? (bin) => Buffer.from(bin, "binary").toString("base64") : btoaPolyfill;
1746
1724
  var _fromUint8Array = _hasBuffer ? (u8a) => Buffer.from(u8a).toString("base64") : (u8a) => {
1747
1725
  const maxargs = 4096;
1748
1726
  let strs = [];
@@ -1791,7 +1769,7 @@ var atobPolyfill = /* @__PURE__ */ __name((asc) => {
1791
1769
  }
1792
1770
  return bin;
1793
1771
  }, "atobPolyfill");
1794
- var _atob = _hasatob ? (asc) => atob(_tidyB64(asc)) : _hasBuffer ? (asc) => Buffer.from(asc, "base64").toString("binary") : atobPolyfill;
1772
+ var _atob = typeof atob === "function" ? (asc) => atob(_tidyB64(asc)) : _hasBuffer ? (asc) => Buffer.from(asc, "base64").toString("binary") : atobPolyfill;
1795
1773
  var _toUint8Array = _hasBuffer ? (a) => _U8Afrom(Buffer.from(a, "base64")) : (a) => _U8Afrom(_atob(a).split("").map((c) => c.charCodeAt(0)));
1796
1774
  var toUint8Array = /* @__PURE__ */ __name((a) => _toUint8Array(_unURI(a)), "toUint8Array");
1797
1775
  var _decode = _hasBuffer ? (a) => Buffer.from(a, "base64").toString("utf8") : _TD ? (a) => _TD.decode(_toUint8Array(a)) : (a) => btou(_atob(a));
@@ -1968,7 +1946,7 @@ function decode4(input) {
1968
1946
  }
1969
1947
  __name(decode4, "decode");
1970
1948
 
1971
- // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.0.0/node_modules/@digitalbazaar/cborld/lib/codecs/MultibaseDecoder.js
1949
+ // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.2.0/node_modules/@digitalbazaar/cborld/lib/codecs/MultibaseDecoder.js
1972
1950
  var MultibaseDecoder = class extends CborldDecoder {
1973
1951
  decode({ value } = {}) {
1974
1952
  const { buffer: buffer2, byteOffset, length } = value;
@@ -1992,39 +1970,7 @@ var MultibaseDecoder = class extends CborldDecoder {
1992
1970
  };
1993
1971
  __name(MultibaseDecoder, "MultibaseDecoder");
1994
1972
 
1995
- // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.0.0/node_modules/@digitalbazaar/cborld/lib/keywords.js
1996
- var KEYWORDS = /* @__PURE__ */ new Map([
1997
- ["@context", 0],
1998
- ["@type", 2],
1999
- ["@id", 4],
2000
- ["@value", 6],
2001
- ["@direction", 8],
2002
- ["@graph", 10],
2003
- ["@included", 12],
2004
- ["@index", 14],
2005
- ["@json", 16],
2006
- ["@language", 18],
2007
- ["@list", 20],
2008
- ["@nest", 22],
2009
- ["@reverse", 24],
2010
- ["@base", 26],
2011
- ["@container", 28],
2012
- ["@default", 30],
2013
- ["@embed", 32],
2014
- ["@explicit", 34],
2015
- ["@none", 36],
2016
- ["@omitDefault", 38],
2017
- ["@prefix", 40],
2018
- ["@preserve", 42],
2019
- ["@protected", 44],
2020
- ["@requireAll", 46],
2021
- ["@set", 48],
2022
- ["@version", 50],
2023
- ["@vocab", 52]
2024
- ]);
2025
- var FIRST_CUSTOM_TERM_ID = 100;
2026
-
2027
- // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.0.0/node_modules/@digitalbazaar/cborld/lib/Transformer.js
1973
+ // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.2.0/node_modules/@digitalbazaar/cborld/lib/Transformer.js
2028
1974
  var Transformer = class {
2029
1975
  constructor({ appContextMap, documentLoader } = {}) {
2030
1976
  this.appContextMap = appContextMap;
@@ -2044,7 +1990,9 @@ var Transformer = class {
2044
1990
  this._beforeTypeScopedContexts({ activeCtx, obj, transformMap });
2045
1991
  activeCtx = await this._applyTypeScopedContexts({ obj, contextStack });
2046
1992
  const { aliases, scopedContextMap, termMap } = activeCtx;
2047
- const termEntries = this._getEntries({ obj, transformMap, transformer: this, termMap });
1993
+ const termEntries = this._getEntries(
1994
+ { obj, transformMap, transformer: this, termMap }
1995
+ );
2048
1996
  for (const [termInfo, value] of termEntries) {
2049
1997
  const { term } = termInfo;
2050
1998
  if (term === "@id" || aliases.id.has(term)) {
@@ -2066,7 +2014,9 @@ var Transformer = class {
2066
2014
  propertyContextStack = contextStack.slice();
2067
2015
  }
2068
2016
  const { plural, def } = termInfo;
2069
- const termType = this._getTermType({ activeCtx: newActiveCtx || activeCtx, def });
2017
+ const termType = this._getTermType(
2018
+ { activeCtx: newActiveCtx || activeCtx, def }
2019
+ );
2070
2020
  const values = plural ? value : [value];
2071
2021
  const entries = [];
2072
2022
  for (const value2 of values) {
@@ -2082,7 +2032,9 @@ var Transformer = class {
2082
2032
  continue;
2083
2033
  }
2084
2034
  if (Array.isArray(value2)) {
2085
- await this._transformArray({ entries, contextStack: propertyContextStack, value: value2 });
2035
+ await this._transformArray(
2036
+ { entries, contextStack: propertyContextStack, value: value2 }
2037
+ );
2086
2038
  continue;
2087
2039
  }
2088
2040
  await this._transformObject({
@@ -2223,8 +2175,12 @@ var Transformer = class {
2223
2175
  if (importUrl) {
2224
2176
  let importEntry = contextMap.get(importUrl);
2225
2177
  if (!importEntry) {
2226
- const { "@context": importCtx } = await this._getDocument({ url: importUrl });
2227
- importEntry = await this._addContext({ context: importCtx, contextUrl: importUrl });
2178
+ const { "@context": importCtx } = await this._getDocument(
2179
+ { url: importUrl }
2180
+ );
2181
+ importEntry = await this._addContext(
2182
+ { context: importCtx, contextUrl: importUrl }
2183
+ );
2228
2184
  }
2229
2185
  context = { ...importEntry.context, ...context };
2230
2186
  }
@@ -2288,14 +2244,20 @@ var Transformer = class {
2288
2244
  return prefixDef + suffix.join(":");
2289
2245
  }
2290
2246
  if (!(typeof prefixDef === "object" && typeof prefixDef["@id"] === "string")) {
2291
- throw new CborldError("ERR_INVALID_TERM_DEFINITION", 'JSON-LD term definitions must be strings or objects with "@id".');
2247
+ throw new CborldError(
2248
+ "ERR_INVALID_TERM_DEFINITION",
2249
+ 'JSON-LD term definitions must be strings or objects with "@id".'
2250
+ );
2292
2251
  }
2293
2252
  return prefixDef["@id"] + suffix.join(":");
2294
2253
  }
2295
2254
  _getIdForTerm({ term, plural }) {
2296
2255
  const id = this.termToId.get(term);
2297
2256
  if (id === void 0) {
2298
- throw new CborldError("ERR_UNDEFINED_TERM", "CBOR-LD compression requires all terms to be defined in a JSON-LD context.");
2257
+ throw new CborldError(
2258
+ "ERR_UNDEFINED_TERM",
2259
+ "CBOR-LD compression requires all terms to be defined in a JSON-LD context."
2260
+ );
2299
2261
  }
2300
2262
  return plural ? id + 1 : id;
2301
2263
  }
@@ -2307,7 +2269,7 @@ var Transformer = class {
2307
2269
  };
2308
2270
  __name(Transformer, "Transformer");
2309
2271
 
2310
- // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.0.0/node_modules/@digitalbazaar/cborld/lib/codecs/Base58DidUrlDecoder.js
2272
+ // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.2.0/node_modules/@digitalbazaar/cborld/lib/codecs/Base58DidUrlDecoder.js
2311
2273
  var ID_TO_SCHEME = /* @__PURE__ */ new Map([
2312
2274
  [1024, "did:v1:nym:"],
2313
2275
  [1025, "did:key:"]
@@ -2341,7 +2303,7 @@ var Base58DidUrlDecoder = class extends CborldDecoder {
2341
2303
  };
2342
2304
  __name(Base58DidUrlDecoder, "Base58DidUrlDecoder");
2343
2305
 
2344
- // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.0.0/node_modules/@digitalbazaar/cborld/lib/codecs/HttpUrlDecoder.js
2306
+ // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.2.0/node_modules/@digitalbazaar/cborld/lib/codecs/HttpUrlDecoder.js
2345
2307
  var HttpUrlDecoder = class extends CborldDecoder {
2346
2308
  constructor({ secure } = {}) {
2347
2309
  super();
@@ -2360,25 +2322,27 @@ var HttpUrlDecoder = class extends CborldDecoder {
2360
2322
  };
2361
2323
  __name(HttpUrlDecoder, "HttpUrlDecoder");
2362
2324
 
2363
- // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/regex.js
2325
+ // ../../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-browser/regex.js
2364
2326
  var regex_default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
2365
2327
 
2366
- // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/validate.js
2328
+ // ../../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-browser/validate.js
2367
2329
  function validate(uuid) {
2368
2330
  return typeof uuid === "string" && regex_default.test(uuid);
2369
2331
  }
2370
2332
  __name(validate, "validate");
2371
2333
  var validate_default = validate;
2372
2334
 
2373
- // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/stringify.js
2335
+ // ../../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-browser/stringify.js
2374
2336
  var byteToHex = [];
2375
- for (i = 0; i < 256; ++i) {
2376
- byteToHex.push((i + 256).toString(16).substr(1));
2337
+ for (let i = 0; i < 256; ++i) {
2338
+ byteToHex.push((i + 256).toString(16).slice(1));
2377
2339
  }
2378
- var i;
2379
- function stringify(arr) {
2380
- var offset = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
2381
- var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
2340
+ function unsafeStringify(arr, offset = 0) {
2341
+ return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
2342
+ }
2343
+ __name(unsafeStringify, "unsafeStringify");
2344
+ function stringify(arr, offset = 0) {
2345
+ const uuid = unsafeStringify(arr, offset);
2382
2346
  if (!validate_default(uuid)) {
2383
2347
  throw TypeError("Stringified UUID is invalid");
2384
2348
  }
@@ -2387,13 +2351,13 @@ function stringify(arr) {
2387
2351
  __name(stringify, "stringify");
2388
2352
  var stringify_default = stringify;
2389
2353
 
2390
- // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/parse.js
2354
+ // ../../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-browser/parse.js
2391
2355
  function parse(uuid) {
2392
2356
  if (!validate_default(uuid)) {
2393
2357
  throw TypeError("Invalid UUID");
2394
2358
  }
2395
- var v;
2396
- var arr = new Uint8Array(16);
2359
+ let v;
2360
+ const arr = new Uint8Array(16);
2397
2361
  arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;
2398
2362
  arr[1] = v >>> 16 & 255;
2399
2363
  arr[2] = v >>> 8 & 255;
@@ -2415,7 +2379,7 @@ function parse(uuid) {
2415
2379
  __name(parse, "parse");
2416
2380
  var parse_default = parse;
2417
2381
 
2418
- // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.0.0/node_modules/@digitalbazaar/cborld/lib/codecs/UuidUrnDecoder.js
2382
+ // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.2.0/node_modules/@digitalbazaar/cborld/lib/codecs/UuidUrnDecoder.js
2419
2383
  var UuidUrnDecoder = class extends CborldDecoder {
2420
2384
  decode({ value } = {}) {
2421
2385
  const uuid = typeof value[1] === "string" ? value[1] : stringify_default(value[1]);
@@ -2429,7 +2393,7 @@ var UuidUrnDecoder = class extends CborldDecoder {
2429
2393
  };
2430
2394
  __name(UuidUrnDecoder, "UuidUrnDecoder");
2431
2395
 
2432
- // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.0.0/node_modules/@digitalbazaar/cborld/lib/codecs/UriDecoder.js
2396
+ // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.2.0/node_modules/@digitalbazaar/cborld/lib/codecs/UriDecoder.js
2433
2397
  var SCHEME_ID_TO_DECODER = /* @__PURE__ */ new Map([
2434
2398
  [1, HttpUrlDecoder],
2435
2399
  [2, HttpUrlDecoder],
@@ -2448,7 +2412,7 @@ var UriDecoder = class extends CborldDecoder {
2448
2412
  };
2449
2413
  __name(UriDecoder, "UriDecoder");
2450
2414
 
2451
- // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.0.0/node_modules/@digitalbazaar/cborld/lib/codecs/VocabTermDecoder.js
2415
+ // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.2.0/node_modules/@digitalbazaar/cborld/lib/codecs/VocabTermDecoder.js
2452
2416
  var VocabTermDecoder = class extends CborldDecoder {
2453
2417
  constructor({ term } = {}) {
2454
2418
  super();
@@ -2469,7 +2433,7 @@ var VocabTermDecoder = class extends CborldDecoder {
2469
2433
  };
2470
2434
  __name(VocabTermDecoder, "VocabTermDecoder");
2471
2435
 
2472
- // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.0.0/node_modules/@digitalbazaar/cborld/lib/codecs/XsdDateDecoder.js
2436
+ // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.2.0/node_modules/@digitalbazaar/cborld/lib/codecs/XsdDateDecoder.js
2473
2437
  var XsdDateDecoder = class extends CborldDecoder {
2474
2438
  decode({ value } = {}) {
2475
2439
  const dateString = new Date(value * 1e3).toISOString();
@@ -2483,7 +2447,7 @@ var XsdDateDecoder = class extends CborldDecoder {
2483
2447
  };
2484
2448
  __name(XsdDateDecoder, "XsdDateDecoder");
2485
2449
 
2486
- // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.0.0/node_modules/@digitalbazaar/cborld/lib/codecs/XsdDateTimeDecoder.js
2450
+ // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.2.0/node_modules/@digitalbazaar/cborld/lib/codecs/XsdDateTimeDecoder.js
2487
2451
  var XsdDateTimeDecoder = class extends CborldDecoder {
2488
2452
  constructor({ value } = {}) {
2489
2453
  super();
@@ -2506,13 +2470,7 @@ var XsdDateTimeDecoder = class extends CborldDecoder {
2506
2470
  };
2507
2471
  __name(XsdDateTimeDecoder, "XsdDateTimeDecoder");
2508
2472
 
2509
- // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.0.0/node_modules/@digitalbazaar/cborld/lib/util-browser.js
2510
- function inspect(data, options) {
2511
- return JSON.stringify(data, null, 2);
2512
- }
2513
- __name(inspect, "inspect");
2514
-
2515
- // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.0.0/node_modules/@digitalbazaar/cborld/lib/Decompressor.js
2473
+ // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.2.0/node_modules/@digitalbazaar/cborld/lib/Decompressor.js
2516
2474
  var TYPE_DECODERS = /* @__PURE__ */ new Map([
2517
2475
  ["@id", UriDecoder],
2518
2476
  ["@vocab", VocabTermDecoder],
@@ -2558,20 +2516,30 @@ var Decompressor = class extends Transformer {
2558
2516
  _beforeObjectContexts({ obj, transformMap }) {
2559
2517
  const encodedContext = transformMap.get(CONTEXT_TERM_ID);
2560
2518
  if (encodedContext) {
2561
- const decoder = ContextDecoder.createDecoder({ value: encodedContext, transformer: this });
2519
+ const decoder = ContextDecoder.createDecoder(
2520
+ { value: encodedContext, transformer: this }
2521
+ );
2562
2522
  obj["@context"] = decoder ? decoder.decode({ value: encodedContext }) : encodedContext;
2563
2523
  }
2564
2524
  const encodedContexts = transformMap.get(CONTEXT_TERM_ID_PLURAL);
2565
2525
  if (encodedContexts) {
2566
2526
  if (encodedContext) {
2567
- throw new CborldError("ERR_INVALID_ENCODED_CONTEXT", "Both singular and plural context IDs were found in the CBOR-LD input.");
2527
+ throw new CborldError(
2528
+ "ERR_INVALID_ENCODED_CONTEXT",
2529
+ "Both singular and plural context IDs were found in the CBOR-LD input."
2530
+ );
2568
2531
  }
2569
2532
  if (!Array.isArray(encodedContexts)) {
2570
- throw new CborldError("ERR_INVALID_ENCODED_CONTEXT", "Encoded plural context value must be an array.");
2533
+ throw new CborldError(
2534
+ "ERR_INVALID_ENCODED_CONTEXT",
2535
+ "Encoded plural context value must be an array."
2536
+ );
2571
2537
  }
2572
2538
  const entries = [];
2573
2539
  for (const value of encodedContexts) {
2574
- const decoder = ContextDecoder.createDecoder({ value, transformer: this });
2540
+ const decoder = ContextDecoder.createDecoder(
2541
+ { value, transformer: this }
2542
+ );
2575
2543
  entries.push(decoder ? decoder.decode({ value }) : value);
2576
2544
  }
2577
2545
  obj["@context"] = entries;
@@ -2589,11 +2557,15 @@ var Decompressor = class extends Transformer {
2589
2557
  if (value !== void 0) {
2590
2558
  if (Array.isArray(value)) {
2591
2559
  obj[term] = value.map((value2) => {
2592
- const decoder = VocabTermDecoder.createDecoder({ value: value2, transformer: this });
2560
+ const decoder = VocabTermDecoder.createDecoder(
2561
+ { value: value2, transformer: this }
2562
+ );
2593
2563
  return decoder ? decoder.decode({ value: value2 }) : value2;
2594
2564
  });
2595
2565
  } else {
2596
- const decoder = VocabTermDecoder.createDecoder({ value, transformer: this });
2566
+ const decoder = VocabTermDecoder.createDecoder(
2567
+ { value, transformer: this }
2568
+ );
2597
2569
  obj[term] = decoder ? decoder.decode({ value }) : value;
2598
2570
  }
2599
2571
  }
@@ -2607,11 +2579,17 @@ var Decompressor = class extends Transformer {
2607
2579
  }
2608
2580
  const { term, plural } = this._getTermForId({ id: key });
2609
2581
  if (term === void 0) {
2610
- throw new CborldError("ERR_UNKNOWN_CBORLD_TERM_ID", `Unknown term ID '${key}' was detected in the CBOR-LD input.`);
2582
+ throw new CborldError(
2583
+ "ERR_UNKNOWN_CBORLD_TERM_ID",
2584
+ `Unknown term ID '${key}' was detected in the CBOR-LD input.`
2585
+ );
2611
2586
  }
2612
2587
  const def = termMap.get(term);
2613
2588
  if (def === void 0 && !(term.startsWith("@") && KEYWORDS.has(term))) {
2614
- throw new CborldError("ERR_UNKNOWN_CBORLD_TERM", `Unknown term "${term}" was detected in the CBOR-LD input.`);
2589
+ throw new CborldError(
2590
+ "ERR_UNKNOWN_CBORLD_TERM",
2591
+ `Unknown term "${term}" was detected in the CBOR-LD input.`
2592
+ );
2615
2593
  }
2616
2594
  entries.push([{ term, termId: key, plural, def }, value]);
2617
2595
  }
@@ -2620,11 +2598,17 @@ var Decompressor = class extends Transformer {
2620
2598
  _getTermInfo({ termMap, key }) {
2621
2599
  const { term, plural } = this._getTermForId({ id: key });
2622
2600
  if (term === void 0) {
2623
- throw new CborldError("ERR_UNKNOWN_CBORLD_TERM_ID", `Unknown term ID '${key}' was detected in the CBOR-LD input.`);
2601
+ throw new CborldError(
2602
+ "ERR_UNKNOWN_CBORLD_TERM_ID",
2603
+ `Unknown term ID '${key}' was detected in the CBOR-LD input.`
2604
+ );
2624
2605
  }
2625
2606
  const def = termMap.get(term);
2626
2607
  if (def === void 0 && !(term.startsWith("@") && KEYWORDS.has(term))) {
2627
- throw new CborldError("ERR_UNKNOWN_CBORLD_TERM", `Unknown term "${term}" was detected in the CBOR-LD input.`);
2608
+ throw new CborldError(
2609
+ "ERR_UNKNOWN_CBORLD_TERM",
2610
+ `Unknown term "${term}" was detected in the CBOR-LD input.`
2611
+ );
2628
2612
  }
2629
2613
  return { term, termId: key, plural, def };
2630
2614
  }
@@ -2637,14 +2621,18 @@ var Decompressor = class extends Transformer {
2637
2621
  const values = plural ? value : [value];
2638
2622
  const entries = [];
2639
2623
  for (const value2 of values) {
2640
- const decoder = VocabTermDecoder.createDecoder({ value: value2, transformer: this });
2624
+ const decoder = VocabTermDecoder.createDecoder(
2625
+ { value: value2, transformer: this }
2626
+ );
2641
2627
  entries.push(decoder ? decoder.decode({ value: value2 }) : value2);
2642
2628
  }
2643
2629
  obj[term] = plural ? entries : entries[0];
2644
2630
  }
2645
2631
  _transformTypedValue({ entries, termType, value }) {
2646
2632
  const DecoderClass = TYPE_DECODERS.get(termType);
2647
- const decoder = DecoderClass && DecoderClass.createDecoder({ value, transformer: this });
2633
+ const decoder = DecoderClass && DecoderClass.createDecoder(
2634
+ { value, transformer: this }
2635
+ );
2648
2636
  if (decoder) {
2649
2637
  entries.push(decoder.decode({ value }));
2650
2638
  return true;
@@ -2675,7 +2663,7 @@ function _sortEntriesByTerm([{ term: t1 }], [{ term: t2 }]) {
2675
2663
  }
2676
2664
  __name(_sortEntriesByTerm, "_sortEntriesByTerm");
2677
2665
 
2678
- // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.0.0/node_modules/@digitalbazaar/cborld/lib/decode.js
2666
+ // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.2.0/node_modules/@digitalbazaar/cborld/lib/decode.js
2679
2667
  async function decode5({
2680
2668
  cborldBytes,
2681
2669
  documentLoader,
@@ -2687,17 +2675,29 @@ async function decode5({
2687
2675
  }
2688
2676
  let index = 0;
2689
2677
  if (cborldBytes[index++] !== 217) {
2690
- throw new CborldError("ERR_NOT_CBORLD", 'CBOR-LD must start with a CBOR major type "Tag" header of `0xd9`.');
2678
+ throw new CborldError(
2679
+ "ERR_NOT_CBORLD",
2680
+ 'CBOR-LD must start with a CBOR major type "Tag" header of `0xd9`.'
2681
+ );
2691
2682
  }
2692
2683
  if (cborldBytes[index++] !== 5) {
2693
- throw new CborldError("ERR_NOT_CBORLD", "CBOR-LD 16-bit tag must start with `0x05`.");
2684
+ throw new CborldError(
2685
+ "ERR_NOT_CBORLD",
2686
+ "CBOR-LD 16-bit tag must start with `0x05`."
2687
+ );
2694
2688
  }
2695
2689
  const compressionMode = cborldBytes[index];
2696
2690
  if (compressionMode === void 0) {
2697
- throw new CborldError("ERR_NOT_CBORLD", "Truncated CBOR-LD 16-bit tag.");
2691
+ throw new CborldError(
2692
+ "ERR_NOT_CBORLD",
2693
+ "Truncated CBOR-LD 16-bit tag."
2694
+ );
2698
2695
  }
2699
2696
  if (!(compressionMode === 0 || compressionMode === 1)) {
2700
- throw new CborldError("ERR_NOT_CBORLD", `Unsupported CBOR-LD compression mode "${compressionMode}".`);
2697
+ throw new CborldError(
2698
+ "ERR_NOT_CBORLD",
2699
+ `Unsupported CBOR-LD compression mode "${compressionMode}".`
2700
+ );
2701
2701
  }
2702
2702
  index++;
2703
2703
  const { buffer: buffer2, byteOffset, length } = cborldBytes;
@@ -2706,7 +2706,9 @@ async function decode5({
2706
2706
  return decode(suffix, { useMaps: false });
2707
2707
  }
2708
2708
  const decompressor = new Decompressor({ documentLoader, appContextMap });
2709
- const result = await decompressor.decompress({ compressedBytes: suffix, diagnose });
2709
+ const result = await decompressor.decompress(
2710
+ { compressedBytes: suffix, diagnose }
2711
+ );
2710
2712
  if (diagnose) {
2711
2713
  diagnose("Diagnostic JSON-LD result:");
2712
2714
  diagnose(inspect(result, { depth: null, colors: true }));
@@ -2715,7 +2717,7 @@ async function decode5({
2715
2717
  }
2716
2718
  __name(decode5, "decode");
2717
2719
 
2718
- // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.0.0/node_modules/@digitalbazaar/cborld/lib/codecs/CborldEncoder.js
2720
+ // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.2.0/node_modules/@digitalbazaar/cborld/lib/codecs/CborldEncoder.js
2719
2721
  var CborldEncoder = class {
2720
2722
  encode() {
2721
2723
  throw new Error("Must be implemented by derived class.");
@@ -2726,7 +2728,7 @@ var CborldEncoder = class {
2726
2728
  };
2727
2729
  __name(CborldEncoder, "CborldEncoder");
2728
2730
 
2729
- // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.0.0/node_modules/@digitalbazaar/cborld/lib/codecs/ContextEncoder.js
2731
+ // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.2.0/node_modules/@digitalbazaar/cborld/lib/codecs/ContextEncoder.js
2730
2732
  var ContextEncoder = class extends CborldEncoder {
2731
2733
  constructor({ context, appContextMap } = {}) {
2732
2734
  super();
@@ -2751,7 +2753,7 @@ var ContextEncoder = class extends CborldEncoder {
2751
2753
  };
2752
2754
  __name(ContextEncoder, "ContextEncoder");
2753
2755
 
2754
- // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.0.0/node_modules/@digitalbazaar/cborld/lib/codecs/MultibaseEncoder.js
2756
+ // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.2.0/node_modules/@digitalbazaar/cborld/lib/codecs/MultibaseEncoder.js
2755
2757
  var MultibaseEncoder = class extends CborldEncoder {
2756
2758
  constructor({ value } = {}) {
2757
2759
  super();
@@ -2784,7 +2786,7 @@ var MultibaseEncoder = class extends CborldEncoder {
2784
2786
  };
2785
2787
  __name(MultibaseEncoder, "MultibaseEncoder");
2786
2788
 
2787
- // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.0.0/node_modules/@digitalbazaar/cborld/lib/codecs/Base58DidUrlEncoder.js
2789
+ // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.2.0/node_modules/@digitalbazaar/cborld/lib/codecs/Base58DidUrlEncoder.js
2788
2790
  var SCHEME_TO_ID = /* @__PURE__ */ new Map([
2789
2791
  ["did:v1:nym:", 1024],
2790
2792
  ["did:key:", 1025]
@@ -2829,7 +2831,7 @@ function _multibase58ToToken(str) {
2829
2831
  }
2830
2832
  __name(_multibase58ToToken, "_multibase58ToToken");
2831
2833
 
2832
- // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.0.0/node_modules/@digitalbazaar/cborld/lib/codecs/HttpUrlEncoder.js
2834
+ // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.2.0/node_modules/@digitalbazaar/cborld/lib/codecs/HttpUrlEncoder.js
2833
2835
  var HttpUrlEncoder = class extends CborldEncoder {
2834
2836
  constructor({ value, secure } = {}) {
2835
2837
  super();
@@ -2856,7 +2858,7 @@ var HttpUrlEncoder = class extends CborldEncoder {
2856
2858
  };
2857
2859
  __name(HttpUrlEncoder, "HttpUrlEncoder");
2858
2860
 
2859
- // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.0.0/node_modules/@digitalbazaar/cborld/lib/codecs/UuidUrnEncoder.js
2861
+ // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.2.0/node_modules/@digitalbazaar/cborld/lib/codecs/UuidUrnEncoder.js
2860
2862
  var UuidUrnEncoder = class extends CborldEncoder {
2861
2863
  constructor({ value } = {}) {
2862
2864
  super();
@@ -2882,7 +2884,7 @@ var UuidUrnEncoder = class extends CborldEncoder {
2882
2884
  };
2883
2885
  __name(UuidUrnEncoder, "UuidUrnEncoder");
2884
2886
 
2885
- // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.0.0/node_modules/@digitalbazaar/cborld/lib/codecs/UriEncoder.js
2887
+ // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.2.0/node_modules/@digitalbazaar/cborld/lib/codecs/UriEncoder.js
2886
2888
  var SCHEME_TO_ENCODER = /* @__PURE__ */ new Map([
2887
2889
  ["http", HttpUrlEncoder],
2888
2890
  ["https", HttpUrlEncoder],
@@ -2914,7 +2916,7 @@ var UriEncoder = class extends CborldEncoder {
2914
2916
  };
2915
2917
  __name(UriEncoder, "UriEncoder");
2916
2918
 
2917
- // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.0.0/node_modules/@digitalbazaar/cborld/lib/codecs/VocabTermEncoder.js
2919
+ // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.2.0/node_modules/@digitalbazaar/cborld/lib/codecs/VocabTermEncoder.js
2918
2920
  var VocabTermEncoder = class extends CborldEncoder {
2919
2921
  constructor({ termId } = {}) {
2920
2922
  super();
@@ -2934,7 +2936,7 @@ var VocabTermEncoder = class extends CborldEncoder {
2934
2936
  };
2935
2937
  __name(VocabTermEncoder, "VocabTermEncoder");
2936
2938
 
2937
- // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.0.0/node_modules/@digitalbazaar/cborld/lib/codecs/XsdDateEncoder.js
2939
+ // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.2.0/node_modules/@digitalbazaar/cborld/lib/codecs/XsdDateEncoder.js
2938
2940
  var XsdDateEncoder = class extends CborldEncoder {
2939
2941
  constructor({ value, parsed } = {}) {
2940
2942
  super();
@@ -2964,7 +2966,7 @@ var XsdDateEncoder = class extends CborldEncoder {
2964
2966
  };
2965
2967
  __name(XsdDateEncoder, "XsdDateEncoder");
2966
2968
 
2967
- // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.0.0/node_modules/@digitalbazaar/cborld/lib/codecs/XsdDateTimeEncoder.js
2969
+ // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.2.0/node_modules/@digitalbazaar/cborld/lib/codecs/XsdDateTimeEncoder.js
2968
2970
  var XsdDateTimeEncoder = class extends CborldEncoder {
2969
2971
  constructor({ value, parsed } = {}) {
2970
2972
  super();
@@ -2977,14 +2979,18 @@ var XsdDateTimeEncoder = class extends CborldEncoder {
2977
2979
  const secondsToken = new Token(Type.uint, secondsSinceEpoch);
2978
2980
  const millisecondIndex = value.indexOf(".");
2979
2981
  if (millisecondIndex === -1) {
2980
- const expectedDate2 = new Date(secondsSinceEpoch * 1e3).toISOString().replace(".000Z", "Z");
2982
+ const expectedDate2 = new Date(
2983
+ secondsSinceEpoch * 1e3
2984
+ ).toISOString().replace(".000Z", "Z");
2981
2985
  if (value !== expectedDate2) {
2982
2986
  return new Token(Type.string, value);
2983
2987
  }
2984
2988
  return secondsToken;
2985
2989
  }
2986
2990
  const milliseconds = parseInt(value.substr(millisecondIndex + 1), 10);
2987
- const expectedDate = new Date(secondsSinceEpoch * 1e3 + milliseconds).toISOString();
2991
+ const expectedDate = new Date(
2992
+ secondsSinceEpoch * 1e3 + milliseconds
2993
+ ).toISOString();
2988
2994
  if (value !== expectedDate) {
2989
2995
  return new Token(Type.string, value);
2990
2996
  }
@@ -3007,7 +3013,7 @@ var XsdDateTimeEncoder = class extends CborldEncoder {
3007
3013
  };
3008
3014
  __name(XsdDateTimeEncoder, "XsdDateTimeEncoder");
3009
3015
 
3010
- // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.0.0/node_modules/@digitalbazaar/cborld/lib/Compressor.js
3016
+ // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.2.0/node_modules/@digitalbazaar/cborld/lib/Compressor.js
3011
3017
  var TYPE_ENCODERS = /* @__PURE__ */ new Map([
3012
3018
  ["@id", UriEncoder],
3013
3019
  ["@vocab", VocabTermEncoder],
@@ -3059,7 +3065,9 @@ var Compressor = class extends Transformer {
3059
3065
  const isArray = Array.isArray(context);
3060
3066
  const contexts = isArray ? context : [context];
3061
3067
  for (const value of contexts) {
3062
- const encoder = ContextEncoder.createEncoder({ value, transformer: this });
3068
+ const encoder = ContextEncoder.createEncoder(
3069
+ { value, transformer: this }
3070
+ );
3063
3071
  entries.push(encoder || value);
3064
3072
  }
3065
3073
  const id = isArray ? CONTEXT_TERM_ID_PLURAL2 : CONTEXT_TERM_ID2;
@@ -3074,7 +3082,10 @@ var Compressor = class extends Transformer {
3074
3082
  }
3075
3083
  const def = termMap.get(key);
3076
3084
  if (def === void 0 && !(key.startsWith("@") && KEYWORDS.has(key))) {
3077
- throw new CborldError("ERR_UNKNOWN_CBORLD_TERM", `Unknown term '${key}' was detected in the JSON-LD input.`);
3085
+ throw new CborldError(
3086
+ "ERR_UNKNOWN_CBORLD_TERM",
3087
+ `Unknown term '${key}' was detected in the JSON-LD input.`
3088
+ );
3078
3089
  }
3079
3090
  const value = obj[key];
3080
3091
  const plural = Array.isArray(value);
@@ -3085,7 +3096,9 @@ var Compressor = class extends Transformer {
3085
3096
  }
3086
3097
  _transformObjectId({ transformMap, termInfo, value }) {
3087
3098
  const { termId } = termInfo;
3088
- const encoder = UriEncoder.createEncoder({ value, transformer: this, termInfo });
3099
+ const encoder = UriEncoder.createEncoder(
3100
+ { value, transformer: this, termInfo }
3101
+ );
3089
3102
  transformMap.set(termId, encoder || value);
3090
3103
  }
3091
3104
  _transformObjectType({ transformMap, termInfo, value }) {
@@ -3093,14 +3106,18 @@ var Compressor = class extends Transformer {
3093
3106
  const values = plural ? value : [value];
3094
3107
  const entries = [];
3095
3108
  for (const value2 of values) {
3096
- const encoder = VocabTermEncoder.createEncoder({ value: value2, transformer: this, termInfo });
3109
+ const encoder = VocabTermEncoder.createEncoder(
3110
+ { value: value2, transformer: this, termInfo }
3111
+ );
3097
3112
  entries.push(encoder || value2);
3098
3113
  }
3099
3114
  transformMap.set(termId, plural ? entries : entries[0]);
3100
3115
  }
3101
3116
  _transformTypedValue({ entries, termType, value, termInfo }) {
3102
3117
  const EncoderClass = TYPE_ENCODERS.get(termType);
3103
- const encoder = EncoderClass && EncoderClass.createEncoder({ value, transformer: this, termInfo });
3118
+ const encoder = EncoderClass && EncoderClass.createEncoder(
3119
+ { value, transformer: this, termInfo }
3120
+ );
3104
3121
  if (encoder) {
3105
3122
  entries.push(encoder);
3106
3123
  return true;
@@ -3127,7 +3144,7 @@ var Compressor = class extends Transformer {
3127
3144
  };
3128
3145
  __name(Compressor, "Compressor");
3129
3146
 
3130
- // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.0.0/node_modules/@digitalbazaar/cborld/lib/encode.js
3147
+ // ../../../node_modules/.pnpm/@digitalbazaar+cborld@5.2.0/node_modules/@digitalbazaar/cborld/lib/encode.js
3131
3148
  async function encode5({
3132
3149
  jsonldDocument,
3133
3150
  documentLoader,
@@ -3136,7 +3153,9 @@ async function encode5({
3136
3153
  diagnose
3137
3154
  } = {}) {
3138
3155
  if (!(compressionMode === 0 || compressionMode === 1)) {
3139
- throw new TypeError('"compressionMode" must be "0" (no compression) or "1" for compression mode version 1.');
3156
+ throw new TypeError(
3157
+ '"compressionMode" must be "0" (no compression) or "1" for compression mode version 1.'
3158
+ );
3140
3159
  }
3141
3160
  const prefix = new Uint8Array([217, 5, compressionMode]);
3142
3161
  let suffix;
@@ -3222,7 +3241,7 @@ __name(base32Encode, "base32Encode");
3222
3241
  // ../../../node_modules/.pnpm/@digitalbazaar+vpqr@3.0.0/node_modules/@digitalbazaar/vpqr/lib/vpqr.js
3223
3242
  var import_base32_decode = __toESM(require_base32_decode(), 1);
3224
3243
 
3225
- // ../../../node_modules/.pnpm/@nuintun+qrcode@3.3.5/node_modules/@nuintun/qrcode/esm/qrcode/common/Mode.js
3244
+ // ../../../node_modules/.pnpm/@nuintun+qrcode@3.4.0/node_modules/@nuintun/qrcode/esm/qrcode/common/Mode.js
3226
3245
  var Mode;
3227
3246
  (function(Mode2) {
3228
3247
  Mode2[Mode2["Terminator"] = 0] = "Terminator";
@@ -3234,43 +3253,19 @@ var Mode;
3234
3253
  Mode2[Mode2["ECI"] = 7] = "ECI";
3235
3254
  })(Mode || (Mode = {}));
3236
3255
 
3237
- // ../../../node_modules/.pnpm/tslib@2.5.3/node_modules/tslib/tslib.es6.mjs
3238
- var extendStatics = /* @__PURE__ */ __name(function(d, b) {
3239
- extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
3240
- d2.__proto__ = b2;
3241
- } || function(d2, b2) {
3242
- for (var p in b2)
3243
- if (Object.prototype.hasOwnProperty.call(b2, p))
3244
- d2[p] = b2[p];
3245
- };
3246
- return extendStatics(d, b);
3247
- }, "extendStatics");
3248
- function __extends(d, b) {
3249
- if (typeof b !== "function" && b !== null)
3250
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
3251
- extendStatics(d, b);
3252
- function __() {
3253
- this.constructor = d;
3254
- }
3255
- __name(__, "__");
3256
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
3257
- }
3258
- __name(__extends, "__extends");
3259
-
3260
- // ../../../node_modules/.pnpm/@nuintun+qrcode@3.3.5/node_modules/@nuintun/qrcode/esm/qrcode/encoder/QRData.js
3261
- var QRData = /* @__PURE__ */ function() {
3262
- function QRData2(mode, data) {
3256
+ // ../../../node_modules/.pnpm/@nuintun+qrcode@3.4.0/node_modules/@nuintun/qrcode/esm/qrcode/encoder/QRData.js
3257
+ var QRData = class {
3258
+ constructor(mode, data) {
3263
3259
  this.bytes = [];
3264
3260
  this.mode = mode;
3265
3261
  this.data = data;
3266
3262
  }
3267
- __name(QRData2, "QRData");
3268
- QRData2.prototype.getLength = function() {
3263
+ getLength() {
3269
3264
  return this.bytes.length;
3270
- };
3271
- QRData2.prototype.getLengthInBits = function(version2) {
3272
- var mode = this.mode;
3273
- var error = new Error("illegal mode: ".concat(mode));
3265
+ }
3266
+ getLengthInBits(version2) {
3267
+ const mode = this.mode;
3268
+ const error = new Error(`illegal mode: ${mode}`);
3274
3269
  if (1 <= version2 && version2 < 10) {
3275
3270
  switch (mode) {
3276
3271
  case Mode.Numeric:
@@ -3311,19 +3306,19 @@ var QRData = /* @__PURE__ */ function() {
3311
3306
  throw error;
3312
3307
  }
3313
3308
  } else {
3314
- throw new Error("illegal version: ".concat(version2));
3309
+ throw new Error(`illegal version: ${version2}`);
3315
3310
  }
3316
- };
3317
- return QRData2;
3318
- }();
3311
+ }
3312
+ };
3313
+ __name(QRData, "QRData");
3319
3314
 
3320
- // ../../../node_modules/.pnpm/@nuintun+qrcode@3.3.5/node_modules/@nuintun/qrcode/esm/encoding/UTF8.js
3315
+ // ../../../node_modules/.pnpm/@nuintun+qrcode@3.4.0/node_modules/@nuintun/qrcode/esm/encoding/UTF8.js
3321
3316
  function encode6(text) {
3322
- var pos = 0;
3323
- var length = text.length;
3324
- var bytes = [];
3325
- for (var i = 0; i < length; i++) {
3326
- var code = text.charCodeAt(i);
3317
+ let pos = 0;
3318
+ const { length } = text;
3319
+ const bytes = [];
3320
+ for (let i = 0; i < length; i++) {
3321
+ let code = text.charCodeAt(i);
3327
3322
  if (code < 128) {
3328
3323
  bytes[pos++] = code;
3329
3324
  } else if (code < 2048) {
@@ -3345,48 +3340,42 @@ function encode6(text) {
3345
3340
  }
3346
3341
  __name(encode6, "encode");
3347
3342
 
3348
- // ../../../node_modules/.pnpm/@nuintun+qrcode@3.3.5/node_modules/@nuintun/qrcode/esm/qrcode/encoder/QRByte.js
3349
- var QRByte = /* @__PURE__ */ function(_super) {
3350
- __extends(QRByte2, _super);
3351
- function QRByte2(data, encode$1) {
3352
- var _this = _super.call(this, Mode.Byte, data) || this;
3353
- _this.encoding = -1;
3343
+ // ../../../node_modules/.pnpm/@nuintun+qrcode@3.4.0/node_modules/@nuintun/qrcode/esm/qrcode/encoder/QRByte.js
3344
+ var QRByte = class extends QRData {
3345
+ constructor(data, encode$1) {
3346
+ super(Mode.Byte, data);
3347
+ this.encoding = -1;
3354
3348
  if (typeof encode$1 === "function") {
3355
- var _a = encode$1(data), encoding = _a.encoding, bytes = _a.bytes;
3356
- _this.bytes = bytes;
3357
- _this.encoding = encoding;
3349
+ const { encoding, bytes } = encode$1(data);
3350
+ this.bytes = bytes;
3351
+ this.encoding = encoding;
3358
3352
  } else {
3359
- _this.bytes = encode6(data);
3360
- _this.encoding = 26;
3353
+ this.bytes = encode6(data);
3354
+ this.encoding = 26;
3361
3355
  }
3362
- return _this;
3363
3356
  }
3364
- __name(QRByte2, "QRByte");
3365
- QRByte2.prototype.writeTo = function(buffer2) {
3366
- var bytes = this.bytes;
3367
- for (var _i = 0, bytes_1 = bytes; _i < bytes_1.length; _i++) {
3368
- var byte = bytes_1[_i];
3357
+ writeTo(buffer2) {
3358
+ const { bytes } = this;
3359
+ for (const byte of bytes) {
3369
3360
  buffer2.put(byte, 8);
3370
3361
  }
3371
- };
3372
- return QRByte2;
3373
- }(QRData);
3362
+ }
3363
+ };
3364
+ __name(QRByte, "QRByte");
3374
3365
 
3375
- // ../../../node_modules/.pnpm/@nuintun+qrcode@3.3.5/node_modules/@nuintun/qrcode/esm/qrcode/encoder/QRMath.js
3366
+ // ../../../node_modules/.pnpm/@nuintun+qrcode@3.4.0/node_modules/@nuintun/qrcode/esm/qrcode/encoder/QRMath.js
3376
3367
  var EXP_TABLE = [];
3377
3368
  var LOG_TABLE = [];
3378
- for (i = 0; i < 256; i++) {
3369
+ for (let i = 0; i < 256; i++) {
3379
3370
  LOG_TABLE[i] = 0;
3380
3371
  EXP_TABLE[i] = i < 8 ? 1 << i : EXP_TABLE[i - 4] ^ EXP_TABLE[i - 5] ^ EXP_TABLE[i - 6] ^ EXP_TABLE[i - 8];
3381
3372
  }
3382
- var i;
3383
- for (i = 0; i < 255; i++) {
3373
+ for (let i = 0; i < 255; i++) {
3384
3374
  LOG_TABLE[EXP_TABLE[i]] = i;
3385
3375
  }
3386
- var i;
3387
3376
  function glog(n) {
3388
3377
  if (n < 1) {
3389
- throw new Error("illegal log: ".concat(n));
3378
+ throw new Error(`illegal log: ${n}`);
3390
3379
  }
3391
3380
  return LOG_TABLE[n];
3392
3381
  }
@@ -3402,69 +3391,65 @@ function gexp(n) {
3402
3391
  }
3403
3392
  __name(gexp, "gexp");
3404
3393
 
3405
- // ../../../node_modules/.pnpm/@nuintun+qrcode@3.3.5/node_modules/@nuintun/qrcode/esm/qrcode/encoder/Polynomial.js
3406
- var Polynomial = /* @__PURE__ */ function() {
3407
- function Polynomial2(num, shift) {
3408
- if (shift === void 0) {
3409
- shift = 0;
3410
- }
3411
- var offset = 0;
3412
- var length = num.length;
3394
+ // ../../../node_modules/.pnpm/@nuintun+qrcode@3.4.0/node_modules/@nuintun/qrcode/esm/qrcode/encoder/Polynomial.js
3395
+ var Polynomial = class {
3396
+ constructor(num, shift = 0) {
3397
+ let offset = 0;
3398
+ let { length } = num;
3413
3399
  while (offset < length && num[offset] === 0) {
3414
3400
  offset++;
3415
3401
  }
3416
3402
  length -= offset;
3417
- var numbers = [];
3418
- for (var i = 0; i < length; i++) {
3403
+ const numbers = [];
3404
+ for (let i = 0; i < length; i++) {
3419
3405
  numbers.push(num[offset + i]);
3420
3406
  }
3421
- for (var i = 0; i < shift; i++) {
3407
+ for (let i = 0; i < shift; i++) {
3422
3408
  numbers.push(0);
3423
3409
  }
3424
3410
  this.num = numbers;
3425
3411
  }
3426
- __name(Polynomial2, "Polynomial");
3427
- Polynomial2.prototype.getAt = function(index) {
3412
+ getAt(index) {
3428
3413
  return this.num[index];
3429
- };
3430
- Polynomial2.prototype.getLength = function() {
3414
+ }
3415
+ getLength() {
3431
3416
  return this.num.length;
3432
- };
3433
- Polynomial2.prototype.multiply = function(e) {
3434
- var num = [];
3435
- var eLength = e.getLength();
3436
- var tLength = this.getLength();
3437
- var dLength = tLength + eLength - 1;
3438
- for (var i = 0; i < dLength; i++) {
3417
+ }
3418
+ multiply(e) {
3419
+ const num = [];
3420
+ const eLength = e.getLength();
3421
+ const tLength = this.getLength();
3422
+ const dLength = tLength + eLength - 1;
3423
+ for (let i = 0; i < dLength; i++) {
3439
3424
  num.push(0);
3440
3425
  }
3441
- for (var i = 0; i < tLength; i++) {
3442
- for (var j = 0; j < eLength; j++) {
3426
+ for (let i = 0; i < tLength; i++) {
3427
+ for (let j = 0; j < eLength; j++) {
3443
3428
  num[i + j] ^= gexp(glog(this.getAt(i)) + glog(e.getAt(j)));
3444
3429
  }
3445
3430
  }
3446
- return new Polynomial2(num);
3447
- };
3448
- Polynomial2.prototype.mod = function(e) {
3449
- var eLength = e.getLength();
3450
- var tLength = this.getLength();
3431
+ return new Polynomial(num);
3432
+ }
3433
+ mod(e) {
3434
+ const eLength = e.getLength();
3435
+ const tLength = this.getLength();
3451
3436
  if (tLength - eLength < 0) {
3452
3437
  return this;
3453
3438
  }
3454
- var ratio = glog(this.getAt(0)) - glog(e.getAt(0));
3455
- var num = [];
3456
- for (var i = 0; i < tLength; i++) {
3439
+ const ratio = glog(this.getAt(0)) - glog(e.getAt(0));
3440
+ const num = [];
3441
+ for (let i = 0; i < tLength; i++) {
3457
3442
  num.push(this.getAt(i));
3458
3443
  }
3459
- for (var i = 0; i < eLength; i++) {
3444
+ for (let i = 0; i < eLength; i++) {
3460
3445
  num[i] ^= gexp(glog(e.getAt(i)) + ratio);
3461
3446
  }
3462
- return new Polynomial2(num).mod(e);
3463
- };
3464
- return Polynomial2;
3465
- }();
3447
+ return new Polynomial(num).mod(e);
3448
+ }
3449
+ };
3450
+ __name(Polynomial, "Polynomial");
3466
3451
 
3467
- // ../../../node_modules/.pnpm/@nuintun+qrcode@3.3.5/node_modules/@nuintun/qrcode/esm/qrcode/encoder/QRUtil.js
3452
+ // ../../../node_modules/.pnpm/@nuintun+qrcode@3.4.0/node_modules/@nuintun/qrcode/esm/qrcode/encoder/QRUtil.js
3468
3453
  var N1 = 3;
3469
3454
  var N2 = 3;
3470
3455
  var N3 = 40;
@@ -3519,15 +3504,15 @@ function getAlignmentPattern(version2) {
3519
3504
  }
3520
3505
  __name(getAlignmentPattern, "getAlignmentPattern");
3521
3506
  function getErrorCorrectionPolynomial(errorCorrectionLength) {
3522
- var e = new Polynomial([1]);
3523
- for (var i = 0; i < errorCorrectionLength; i++) {
3507
+ let e = new Polynomial([1]);
3508
+ for (let i = 0; i < errorCorrectionLength; i++) {
3524
3509
  e = e.multiply(new Polynomial([1, gexp(i)]));
3525
3510
  }
3526
3511
  return e;
3527
3512
  }
3528
3513
  __name(getErrorCorrectionPolynomial, "getErrorCorrectionPolynomial");
3529
3514
  function getBCHDigit(data) {
3530
- var digit = 0;
3515
+ let digit = 0;
3531
3516
  while (data !== 0) {
3532
3517
  digit++;
3533
3518
  data >>>= 1;
@@ -3537,7 +3522,7 @@ function getBCHDigit(data) {
3537
3522
  __name(getBCHDigit, "getBCHDigit");
3538
3523
  var G18_BCH = getBCHDigit(G18);
3539
3524
  function getBCHVersion(data) {
3540
- var offset = data << 12;
3525
+ let offset = data << 12;
3541
3526
  while (getBCHDigit(offset) - G18_BCH >= 0) {
3542
3527
  offset ^= G18 << getBCHDigit(offset) - G18_BCH;
3543
3528
  }
@@ -3546,7 +3531,7 @@ function getBCHVersion(data) {
3546
3531
  __name(getBCHVersion, "getBCHVersion");
3547
3532
  var G15_BCH = getBCHDigit(G15);
3548
3533
  function getBCHVersionInfo(data) {
3549
- var offset = data << 10;
3534
+ let offset = data << 10;
3550
3535
  while (getBCHDigit(offset) - G15_BCH >= 0) {
3551
3536
  offset ^= G15 << getBCHDigit(offset) - G15_BCH;
3552
3537
  }
@@ -3554,13 +3539,13 @@ function getBCHVersionInfo(data) {
3554
3539
  }
3555
3540
  __name(getBCHVersionInfo, "getBCHVersionInfo");
3556
3541
  function applyMaskPenaltyRule1Internal(qrcode, isHorizontal) {
3557
- var matrixSize = qrcode.getMatrixSize();
3558
- var penalty = 0;
3559
- for (var i = 0; i < matrixSize; i++) {
3560
- var prevBit = false;
3561
- var numSameBitCells = 0;
3562
- for (var j = 0; j < matrixSize; j++) {
3563
- var bit = isHorizontal ? qrcode.isDark(i, j) : qrcode.isDark(j, i);
3542
+ const matrixSize = qrcode.getMatrixSize();
3543
+ let penalty = 0;
3544
+ for (let i = 0; i < matrixSize; i++) {
3545
+ let prevBit = false;
3546
+ let numSameBitCells = 0;
3547
+ for (let j = 0; j < matrixSize; j++) {
3548
+ const bit = isHorizontal ? qrcode.isDark(i, j) : qrcode.isDark(j, i);
3564
3549
  if (bit === prevBit) {
3565
3550
  numSameBitCells++;
3566
3551
  if (numSameBitCells === 5) {
@@ -3582,11 +3567,11 @@ function applyMaskPenaltyRule1(qrcode) {
3582
3567
  }
3583
3568
  __name(applyMaskPenaltyRule1, "applyMaskPenaltyRule1");
3584
3569
  function applyMaskPenaltyRule2(qrcode) {
3585
- var matrixSize = qrcode.getMatrixSize();
3586
- var penalty = 0;
3587
- for (var y = 0; y < matrixSize - 1; y++) {
3588
- for (var x = 0; x < matrixSize - 1; x++) {
3589
- var value = qrcode.isDark(y, x);
3570
+ const matrixSize = qrcode.getMatrixSize();
3571
+ let penalty = 0;
3572
+ for (let y = 0; y < matrixSize - 1; y++) {
3573
+ for (let x = 0; x < matrixSize - 1; x++) {
3574
+ const value = qrcode.isDark(y, x);
3590
3575
  if (value === qrcode.isDark(y, x + 1) && value === qrcode.isDark(y + 1, x) && value === qrcode.isDark(y + 1, x + 1)) {
3591
3576
  penalty += N2;
3592
3577
  }
@@ -3598,8 +3583,8 @@ __name(applyMaskPenaltyRule2, "applyMaskPenaltyRule2");
3598
3583
  function isFourWhite(qrcode, rangeIndex, from, to, isHorizontal) {
3599
3584
  from = Math.max(from, 0);
3600
3585
  to = Math.min(to, qrcode.getMatrixSize());
3601
- for (var i = from; i < to; i++) {
3602
- var value = isHorizontal ? qrcode.isDark(rangeIndex, i) : qrcode.isDark(i, rangeIndex);
3586
+ for (let i = from; i < to; i++) {
3587
+ const value = isHorizontal ? qrcode.isDark(rangeIndex, i) : qrcode.isDark(i, rangeIndex);
3603
3588
  if (value) {
3604
3589
  return false;
3605
3590
  }
@@ -3608,10 +3593,10 @@ function isFourWhite(qrcode, rangeIndex, from, to, isHorizontal) {
3608
3593
  }
3609
3594
  __name(isFourWhite, "isFourWhite");
3610
3595
  function applyMaskPenaltyRule3(qrcode) {
3611
- var matrixSize = qrcode.getMatrixSize();
3612
- var penalty = 0;
3613
- for (var y = 0; y < matrixSize; y++) {
3614
- for (var x = 0; x < matrixSize; x++) {
3596
+ const matrixSize = qrcode.getMatrixSize();
3597
+ let penalty = 0;
3598
+ for (let y = 0; y < matrixSize; y++) {
3599
+ for (let x = 0; x < matrixSize; x++) {
3615
3600
  if (x + 6 < matrixSize && qrcode.isDark(y, x) && !qrcode.isDark(y, x + 1) && qrcode.isDark(y, x + 2) && qrcode.isDark(y, x + 3) && qrcode.isDark(y, x + 4) && !qrcode.isDark(y, x + 5) && qrcode.isDark(y, x + 6) && (isFourWhite(qrcode, y, x - 4, x, true) || isFourWhite(qrcode, y, x + 7, x + 11, true))) {
3616
3601
  penalty += N3;
3617
3602
  }
@@ -3624,17 +3609,17 @@ function applyMaskPenaltyRule3(qrcode) {
3624
3609
  }
3625
3610
  __name(applyMaskPenaltyRule3, "applyMaskPenaltyRule3");
3626
3611
  function applyMaskPenaltyRule4(qrcode) {
3627
- var matrixSize = qrcode.getMatrixSize();
3628
- var numDarkCells = 0;
3629
- for (var y = 0; y < matrixSize; y++) {
3630
- for (var x = 0; x < matrixSize; x++) {
3612
+ const matrixSize = qrcode.getMatrixSize();
3613
+ let numDarkCells = 0;
3614
+ for (let y = 0; y < matrixSize; y++) {
3615
+ for (let x = 0; x < matrixSize; x++) {
3631
3616
  if (qrcode.isDark(y, x)) {
3632
3617
  numDarkCells++;
3633
3618
  }
3634
3619
  }
3635
3620
  }
3636
- var numTotalCells = matrixSize * matrixSize;
3637
- var fivePercentVariances = Math.floor(Math.abs(numDarkCells * 20 - numTotalCells * 10) / numTotalCells);
3621
+ const numTotalCells = matrixSize * matrixSize;
3622
+ const fivePercentVariances = Math.floor(Math.abs(numDarkCells * 20 - numTotalCells * 10) / numTotalCells);
3638
3623
  return fivePercentVariances * N4;
3639
3624
  }
3640
3625
  __name(applyMaskPenaltyRule4, "applyMaskPenaltyRule4");
@@ -3643,7 +3628,7 @@ function calculateMaskPenalty(qrcode) {
3643
3628
  }
3644
3629
  __name(calculateMaskPenalty, "calculateMaskPenalty");
3645
3630
 
3646
- // ../../../node_modules/.pnpm/@nuintun+qrcode@3.3.5/node_modules/@nuintun/qrcode/esm/qrcode/common/ErrorCorrectionLevel.js
3631
+ // ../../../node_modules/.pnpm/@nuintun+qrcode@3.4.0/node_modules/@nuintun/qrcode/esm/qrcode/common/ErrorCorrectionLevel.js
3647
3632
  var ErrorCorrectionLevel;
3648
3633
  (function(ErrorCorrectionLevel2) {
3649
3634
  ErrorCorrectionLevel2[ErrorCorrectionLevel2["L"] = 1] = "L";
@@ -3652,235 +3637,233 @@ var ErrorCorrectionLevel;
3652
3637
  ErrorCorrectionLevel2[ErrorCorrectionLevel2["H"] = 2] = "H";
3653
3638
  })(ErrorCorrectionLevel || (ErrorCorrectionLevel = {}));
3654
3639
 
3655
- // ../../../node_modules/.pnpm/@nuintun+qrcode@3.3.5/node_modules/@nuintun/qrcode/esm/qrcode/encoder/RSBlock.js
3656
- var RSBlock = /* @__PURE__ */ function() {
3657
- function RSBlock2(totalCount, dataCount) {
3640
+ // ../../../node_modules/.pnpm/@nuintun+qrcode@3.4.0/node_modules/@nuintun/qrcode/esm/qrcode/encoder/RSBlock.js
3641
+ var RSBlock = class {
3642
+ constructor(totalCount, dataCount) {
3658
3643
  this.dataCount = dataCount;
3659
3644
  this.totalCount = totalCount;
3660
3645
  }
3661
- __name(RSBlock2, "RSBlock");
3662
- RSBlock2.prototype.getDataCount = function() {
3646
+ getDataCount() {
3663
3647
  return this.dataCount;
3664
- };
3665
- RSBlock2.prototype.getTotalCount = function() {
3648
+ }
3649
+ getTotalCount() {
3666
3650
  return this.totalCount;
3667
- };
3668
- RSBlock2.getRSBlocks = function(version2, errorCorrectionLevel) {
3669
- var rsBlocks = [];
3670
- var rsBlock = RSBlock2.getRSBlockTable(version2, errorCorrectionLevel);
3671
- var length = rsBlock.length / 3;
3672
- for (var i = 0; i < length; i++) {
3673
- var count = rsBlock[i * 3 + 0];
3674
- var totalCount = rsBlock[i * 3 + 1];
3675
- var dataCount = rsBlock[i * 3 + 2];
3676
- for (var j = 0; j < count; j++) {
3677
- rsBlocks.push(new RSBlock2(totalCount, dataCount));
3651
+ }
3652
+ static getRSBlocks(version2, errorCorrectionLevel) {
3653
+ const rsBlocks = [];
3654
+ const rsBlock = RSBlock.getRSBlockTable(version2, errorCorrectionLevel);
3655
+ const length = rsBlock.length / 3;
3656
+ for (let i = 0; i < length; i++) {
3657
+ const count = rsBlock[i * 3 + 0];
3658
+ const totalCount = rsBlock[i * 3 + 1];
3659
+ const dataCount = rsBlock[i * 3 + 2];
3660
+ for (let j = 0; j < count; j++) {
3661
+ rsBlocks.push(new RSBlock(totalCount, dataCount));
3678
3662
  }
3679
3663
  }
3680
3664
  return rsBlocks;
3681
- };
3682
- RSBlock2.getRSBlockTable = function(version2, errorCorrectionLevel) {
3665
+ }
3666
+ static getRSBlockTable(version2, errorCorrectionLevel) {
3683
3667
  switch (errorCorrectionLevel) {
3684
3668
  case ErrorCorrectionLevel.L:
3685
- return RSBlock2.RS_BLOCK_TABLE[(version2 - 1) * 4 + 0];
3669
+ return RSBlock.RS_BLOCK_TABLE[(version2 - 1) * 4 + 0];
3686
3670
  case ErrorCorrectionLevel.M:
3687
- return RSBlock2.RS_BLOCK_TABLE[(version2 - 1) * 4 + 1];
3671
+ return RSBlock.RS_BLOCK_TABLE[(version2 - 1) * 4 + 1];
3688
3672
  case ErrorCorrectionLevel.Q:
3689
- return RSBlock2.RS_BLOCK_TABLE[(version2 - 1) * 4 + 2];
3673
+ return RSBlock.RS_BLOCK_TABLE[(version2 - 1) * 4 + 2];
3690
3674
  case ErrorCorrectionLevel.H:
3691
- return RSBlock2.RS_BLOCK_TABLE[(version2 - 1) * 4 + 3];
3675
+ return RSBlock.RS_BLOCK_TABLE[(version2 - 1) * 4 + 3];
3692
3676
  default:
3693
- throw new Error("illegal error correction level: ".concat(errorCorrectionLevel));
3677
+ throw new Error(`illegal error correction level: ${errorCorrectionLevel}`);
3694
3678
  }
3695
- };
3696
- RSBlock2.RS_BLOCK_TABLE = [
3697
- [1, 26, 19],
3698
- [1, 26, 16],
3699
- [1, 26, 13],
3700
- [1, 26, 9],
3701
- [1, 44, 34],
3702
- [1, 44, 28],
3703
- [1, 44, 22],
3704
- [1, 44, 16],
3705
- [1, 70, 55],
3706
- [1, 70, 44],
3707
- [2, 35, 17],
3708
- [2, 35, 13],
3709
- [1, 100, 80],
3710
- [2, 50, 32],
3711
- [2, 50, 24],
3712
- [4, 25, 9],
3713
- [1, 134, 108],
3714
- [2, 67, 43],
3715
- [2, 33, 15, 2, 34, 16],
3716
- [2, 33, 11, 2, 34, 12],
3717
- [2, 86, 68],
3718
- [4, 43, 27],
3719
- [4, 43, 19],
3720
- [4, 43, 15],
3721
- [2, 98, 78],
3722
- [4, 49, 31],
3723
- [2, 32, 14, 4, 33, 15],
3724
- [4, 39, 13, 1, 40, 14],
3725
- [2, 121, 97],
3726
- [2, 60, 38, 2, 61, 39],
3727
- [4, 40, 18, 2, 41, 19],
3728
- [4, 40, 14, 2, 41, 15],
3729
- [2, 146, 116],
3730
- [3, 58, 36, 2, 59, 37],
3731
- [4, 36, 16, 4, 37, 17],
3732
- [4, 36, 12, 4, 37, 13],
3733
- [2, 86, 68, 2, 87, 69],
3734
- [4, 69, 43, 1, 70, 44],
3735
- [6, 43, 19, 2, 44, 20],
3736
- [6, 43, 15, 2, 44, 16],
3737
- [4, 101, 81],
3738
- [1, 80, 50, 4, 81, 51],
3739
- [4, 50, 22, 4, 51, 23],
3740
- [3, 36, 12, 8, 37, 13],
3741
- [2, 116, 92, 2, 117, 93],
3742
- [6, 58, 36, 2, 59, 37],
3743
- [4, 46, 20, 6, 47, 21],
3744
- [7, 42, 14, 4, 43, 15],
3745
- [4, 133, 107],
3746
- [8, 59, 37, 1, 60, 38],
3747
- [8, 44, 20, 4, 45, 21],
3748
- [12, 33, 11, 4, 34, 12],
3749
- [3, 145, 115, 1, 146, 116],
3750
- [4, 64, 40, 5, 65, 41],
3751
- [11, 36, 16, 5, 37, 17],
3752
- [11, 36, 12, 5, 37, 13],
3753
- [5, 109, 87, 1, 110, 88],
3754
- [5, 65, 41, 5, 66, 42],
3755
- [5, 54, 24, 7, 55, 25],
3756
- [11, 36, 12, 7, 37, 13],
3757
- [5, 122, 98, 1, 123, 99],
3758
- [7, 73, 45, 3, 74, 46],
3759
- [15, 43, 19, 2, 44, 20],
3760
- [3, 45, 15, 13, 46, 16],
3761
- [1, 135, 107, 5, 136, 108],
3762
- [10, 74, 46, 1, 75, 47],
3763
- [1, 50, 22, 15, 51, 23],
3764
- [2, 42, 14, 17, 43, 15],
3765
- [5, 150, 120, 1, 151, 121],
3766
- [9, 69, 43, 4, 70, 44],
3767
- [17, 50, 22, 1, 51, 23],
3768
- [2, 42, 14, 19, 43, 15],
3769
- [3, 141, 113, 4, 142, 114],
3770
- [3, 70, 44, 11, 71, 45],
3771
- [17, 47, 21, 4, 48, 22],
3772
- [9, 39, 13, 16, 40, 14],
3773
- [3, 135, 107, 5, 136, 108],
3774
- [3, 67, 41, 13, 68, 42],
3775
- [15, 54, 24, 5, 55, 25],
3776
- [15, 43, 15, 10, 44, 16],
3777
- [4, 144, 116, 4, 145, 117],
3778
- [17, 68, 42],
3779
- [17, 50, 22, 6, 51, 23],
3780
- [19, 46, 16, 6, 47, 17],
3781
- [2, 139, 111, 7, 140, 112],
3782
- [17, 74, 46],
3783
- [7, 54, 24, 16, 55, 25],
3784
- [34, 37, 13],
3785
- [4, 151, 121, 5, 152, 122],
3786
- [4, 75, 47, 14, 76, 48],
3787
- [11, 54, 24, 14, 55, 25],
3788
- [16, 45, 15, 14, 46, 16],
3789
- [6, 147, 117, 4, 148, 118],
3790
- [6, 73, 45, 14, 74, 46],
3791
- [11, 54, 24, 16, 55, 25],
3792
- [30, 46, 16, 2, 47, 17],
3793
- [8, 132, 106, 4, 133, 107],
3794
- [8, 75, 47, 13, 76, 48],
3795
- [7, 54, 24, 22, 55, 25],
3796
- [22, 45, 15, 13, 46, 16],
3797
- [10, 142, 114, 2, 143, 115],
3798
- [19, 74, 46, 4, 75, 47],
3799
- [28, 50, 22, 6, 51, 23],
3800
- [33, 46, 16, 4, 47, 17],
3801
- [8, 152, 122, 4, 153, 123],
3802
- [22, 73, 45, 3, 74, 46],
3803
- [8, 53, 23, 26, 54, 24],
3804
- [12, 45, 15, 28, 46, 16],
3805
- [3, 147, 117, 10, 148, 118],
3806
- [3, 73, 45, 23, 74, 46],
3807
- [4, 54, 24, 31, 55, 25],
3808
- [11, 45, 15, 31, 46, 16],
3809
- [7, 146, 116, 7, 147, 117],
3810
- [21, 73, 45, 7, 74, 46],
3811
- [1, 53, 23, 37, 54, 24],
3812
- [19, 45, 15, 26, 46, 16],
3813
- [5, 145, 115, 10, 146, 116],
3814
- [19, 75, 47, 10, 76, 48],
3815
- [15, 54, 24, 25, 55, 25],
3816
- [23, 45, 15, 25, 46, 16],
3817
- [13, 145, 115, 3, 146, 116],
3818
- [2, 74, 46, 29, 75, 47],
3819
- [42, 54, 24, 1, 55, 25],
3820
- [23, 45, 15, 28, 46, 16],
3821
- [17, 145, 115],
3822
- [10, 74, 46, 23, 75, 47],
3823
- [10, 54, 24, 35, 55, 25],
3824
- [19, 45, 15, 35, 46, 16],
3825
- [17, 145, 115, 1, 146, 116],
3826
- [14, 74, 46, 21, 75, 47],
3827
- [29, 54, 24, 19, 55, 25],
3828
- [11, 45, 15, 46, 46, 16],
3829
- [13, 145, 115, 6, 146, 116],
3830
- [14, 74, 46, 23, 75, 47],
3831
- [44, 54, 24, 7, 55, 25],
3832
- [59, 46, 16, 1, 47, 17],
3833
- [12, 151, 121, 7, 152, 122],
3834
- [12, 75, 47, 26, 76, 48],
3835
- [39, 54, 24, 14, 55, 25],
3836
- [22, 45, 15, 41, 46, 16],
3837
- [6, 151, 121, 14, 152, 122],
3838
- [6, 75, 47, 34, 76, 48],
3839
- [46, 54, 24, 10, 55, 25],
3840
- [2, 45, 15, 64, 46, 16],
3841
- [17, 152, 122, 4, 153, 123],
3842
- [29, 74, 46, 14, 75, 47],
3843
- [49, 54, 24, 10, 55, 25],
3844
- [24, 45, 15, 46, 46, 16],
3845
- [4, 152, 122, 18, 153, 123],
3846
- [13, 74, 46, 32, 75, 47],
3847
- [48, 54, 24, 14, 55, 25],
3848
- [42, 45, 15, 32, 46, 16],
3849
- [20, 147, 117, 4, 148, 118],
3850
- [40, 75, 47, 7, 76, 48],
3851
- [43, 54, 24, 22, 55, 25],
3852
- [10, 45, 15, 67, 46, 16],
3853
- [19, 148, 118, 6, 149, 119],
3854
- [18, 75, 47, 31, 76, 48],
3855
- [34, 54, 24, 34, 55, 25],
3856
- [20, 45, 15, 61, 46, 16]
3857
- ];
3858
- return RSBlock2;
3859
- }();
3679
+ }
3680
+ };
3681
+ __name(RSBlock, "RSBlock");
3682
+ RSBlock.RS_BLOCK_TABLE = [
3683
+ [1, 26, 19],
3684
+ [1, 26, 16],
3685
+ [1, 26, 13],
3686
+ [1, 26, 9],
3687
+ [1, 44, 34],
3688
+ [1, 44, 28],
3689
+ [1, 44, 22],
3690
+ [1, 44, 16],
3691
+ [1, 70, 55],
3692
+ [1, 70, 44],
3693
+ [2, 35, 17],
3694
+ [2, 35, 13],
3695
+ [1, 100, 80],
3696
+ [2, 50, 32],
3697
+ [2, 50, 24],
3698
+ [4, 25, 9],
3699
+ [1, 134, 108],
3700
+ [2, 67, 43],
3701
+ [2, 33, 15, 2, 34, 16],
3702
+ [2, 33, 11, 2, 34, 12],
3703
+ [2, 86, 68],
3704
+ [4, 43, 27],
3705
+ [4, 43, 19],
3706
+ [4, 43, 15],
3707
+ [2, 98, 78],
3708
+ [4, 49, 31],
3709
+ [2, 32, 14, 4, 33, 15],
3710
+ [4, 39, 13, 1, 40, 14],
3711
+ [2, 121, 97],
3712
+ [2, 60, 38, 2, 61, 39],
3713
+ [4, 40, 18, 2, 41, 19],
3714
+ [4, 40, 14, 2, 41, 15],
3715
+ [2, 146, 116],
3716
+ [3, 58, 36, 2, 59, 37],
3717
+ [4, 36, 16, 4, 37, 17],
3718
+ [4, 36, 12, 4, 37, 13],
3719
+ [2, 86, 68, 2, 87, 69],
3720
+ [4, 69, 43, 1, 70, 44],
3721
+ [6, 43, 19, 2, 44, 20],
3722
+ [6, 43, 15, 2, 44, 16],
3723
+ [4, 101, 81],
3724
+ [1, 80, 50, 4, 81, 51],
3725
+ [4, 50, 22, 4, 51, 23],
3726
+ [3, 36, 12, 8, 37, 13],
3727
+ [2, 116, 92, 2, 117, 93],
3728
+ [6, 58, 36, 2, 59, 37],
3729
+ [4, 46, 20, 6, 47, 21],
3730
+ [7, 42, 14, 4, 43, 15],
3731
+ [4, 133, 107],
3732
+ [8, 59, 37, 1, 60, 38],
3733
+ [8, 44, 20, 4, 45, 21],
3734
+ [12, 33, 11, 4, 34, 12],
3735
+ [3, 145, 115, 1, 146, 116],
3736
+ [4, 64, 40, 5, 65, 41],
3737
+ [11, 36, 16, 5, 37, 17],
3738
+ [11, 36, 12, 5, 37, 13],
3739
+ [5, 109, 87, 1, 110, 88],
3740
+ [5, 65, 41, 5, 66, 42],
3741
+ [5, 54, 24, 7, 55, 25],
3742
+ [11, 36, 12, 7, 37, 13],
3743
+ [5, 122, 98, 1, 123, 99],
3744
+ [7, 73, 45, 3, 74, 46],
3745
+ [15, 43, 19, 2, 44, 20],
3746
+ [3, 45, 15, 13, 46, 16],
3747
+ [1, 135, 107, 5, 136, 108],
3748
+ [10, 74, 46, 1, 75, 47],
3749
+ [1, 50, 22, 15, 51, 23],
3750
+ [2, 42, 14, 17, 43, 15],
3751
+ [5, 150, 120, 1, 151, 121],
3752
+ [9, 69, 43, 4, 70, 44],
3753
+ [17, 50, 22, 1, 51, 23],
3754
+ [2, 42, 14, 19, 43, 15],
3755
+ [3, 141, 113, 4, 142, 114],
3756
+ [3, 70, 44, 11, 71, 45],
3757
+ [17, 47, 21, 4, 48, 22],
3758
+ [9, 39, 13, 16, 40, 14],
3759
+ [3, 135, 107, 5, 136, 108],
3760
+ [3, 67, 41, 13, 68, 42],
3761
+ [15, 54, 24, 5, 55, 25],
3762
+ [15, 43, 15, 10, 44, 16],
3763
+ [4, 144, 116, 4, 145, 117],
3764
+ [17, 68, 42],
3765
+ [17, 50, 22, 6, 51, 23],
3766
+ [19, 46, 16, 6, 47, 17],
3767
+ [2, 139, 111, 7, 140, 112],
3768
+ [17, 74, 46],
3769
+ [7, 54, 24, 16, 55, 25],
3770
+ [34, 37, 13],
3771
+ [4, 151, 121, 5, 152, 122],
3772
+ [4, 75, 47, 14, 76, 48],
3773
+ [11, 54, 24, 14, 55, 25],
3774
+ [16, 45, 15, 14, 46, 16],
3775
+ [6, 147, 117, 4, 148, 118],
3776
+ [6, 73, 45, 14, 74, 46],
3777
+ [11, 54, 24, 16, 55, 25],
3778
+ [30, 46, 16, 2, 47, 17],
3779
+ [8, 132, 106, 4, 133, 107],
3780
+ [8, 75, 47, 13, 76, 48],
3781
+ [7, 54, 24, 22, 55, 25],
3782
+ [22, 45, 15, 13, 46, 16],
3783
+ [10, 142, 114, 2, 143, 115],
3784
+ [19, 74, 46, 4, 75, 47],
3785
+ [28, 50, 22, 6, 51, 23],
3786
+ [33, 46, 16, 4, 47, 17],
3787
+ [8, 152, 122, 4, 153, 123],
3788
+ [22, 73, 45, 3, 74, 46],
3789
+ [8, 53, 23, 26, 54, 24],
3790
+ [12, 45, 15, 28, 46, 16],
3791
+ [3, 147, 117, 10, 148, 118],
3792
+ [3, 73, 45, 23, 74, 46],
3793
+ [4, 54, 24, 31, 55, 25],
3794
+ [11, 45, 15, 31, 46, 16],
3795
+ [7, 146, 116, 7, 147, 117],
3796
+ [21, 73, 45, 7, 74, 46],
3797
+ [1, 53, 23, 37, 54, 24],
3798
+ [19, 45, 15, 26, 46, 16],
3799
+ [5, 145, 115, 10, 146, 116],
3800
+ [19, 75, 47, 10, 76, 48],
3801
+ [15, 54, 24, 25, 55, 25],
3802
+ [23, 45, 15, 25, 46, 16],
3803
+ [13, 145, 115, 3, 146, 116],
3804
+ [2, 74, 46, 29, 75, 47],
3805
+ [42, 54, 24, 1, 55, 25],
3806
+ [23, 45, 15, 28, 46, 16],
3807
+ [17, 145, 115],
3808
+ [10, 74, 46, 23, 75, 47],
3809
+ [10, 54, 24, 35, 55, 25],
3810
+ [19, 45, 15, 35, 46, 16],
3811
+ [17, 145, 115, 1, 146, 116],
3812
+ [14, 74, 46, 21, 75, 47],
3813
+ [29, 54, 24, 19, 55, 25],
3814
+ [11, 45, 15, 46, 46, 16],
3815
+ [13, 145, 115, 6, 146, 116],
3816
+ [14, 74, 46, 23, 75, 47],
3817
+ [44, 54, 24, 7, 55, 25],
3818
+ [59, 46, 16, 1, 47, 17],
3819
+ [12, 151, 121, 7, 152, 122],
3820
+ [12, 75, 47, 26, 76, 48],
3821
+ [39, 54, 24, 14, 55, 25],
3822
+ [22, 45, 15, 41, 46, 16],
3823
+ [6, 151, 121, 14, 152, 122],
3824
+ [6, 75, 47, 34, 76, 48],
3825
+ [46, 54, 24, 10, 55, 25],
3826
+ [2, 45, 15, 64, 46, 16],
3827
+ [17, 152, 122, 4, 153, 123],
3828
+ [29, 74, 46, 14, 75, 47],
3829
+ [49, 54, 24, 10, 55, 25],
3830
+ [24, 45, 15, 46, 46, 16],
3831
+ [4, 152, 122, 18, 153, 123],
3832
+ [13, 74, 46, 32, 75, 47],
3833
+ [48, 54, 24, 14, 55, 25],
3834
+ [42, 45, 15, 32, 46, 16],
3835
+ [20, 147, 117, 4, 148, 118],
3836
+ [40, 75, 47, 7, 76, 48],
3837
+ [43, 54, 24, 22, 55, 25],
3838
+ [10, 45, 15, 67, 46, 16],
3839
+ [19, 148, 118, 6, 149, 119],
3840
+ [18, 75, 47, 31, 76, 48],
3841
+ [34, 54, 24, 34, 55, 25],
3842
+ [20, 45, 15, 61, 46, 16]
3843
+ ];
3860
3844
 
3861
- // ../../../node_modules/.pnpm/@nuintun+qrcode@3.3.5/node_modules/@nuintun/qrcode/esm/qrcode/encoder/BitBuffer.js
3862
- var BitBuffer = /* @__PURE__ */ function() {
3863
- function BitBuffer2() {
3845
+ // ../../../node_modules/.pnpm/@nuintun+qrcode@3.4.0/node_modules/@nuintun/qrcode/esm/qrcode/encoder/BitBuffer.js
3846
+ var BitBuffer = class {
3847
+ constructor() {
3864
3848
  this.length = 0;
3865
3849
  this.buffer = [];
3866
3850
  }
3867
- __name(BitBuffer2, "BitBuffer");
3868
- BitBuffer2.prototype.getBuffer = function() {
3851
+ getBuffer() {
3869
3852
  return this.buffer;
3870
- };
3871
- BitBuffer2.prototype.getLengthInBits = function() {
3853
+ }
3854
+ getLengthInBits() {
3872
3855
  return this.length;
3873
- };
3874
- BitBuffer2.prototype.getBit = function(index) {
3856
+ }
3857
+ getBit(index) {
3875
3858
  return (this.buffer[index / 8 >> 0] >>> 7 - index % 8 & 1) === 1;
3876
- };
3877
- BitBuffer2.prototype.put = function(num, length) {
3878
- for (var i = 0; i < length; i++) {
3859
+ }
3860
+ put(num, length) {
3861
+ for (let i = 0; i < length; i++) {
3879
3862
  this.putBit((num >>> length - i - 1 & 1) === 1);
3880
3863
  }
3881
- };
3882
- BitBuffer2.prototype.putBit = function(bit) {
3883
- var buffer2 = this.buffer;
3864
+ }
3865
+ putBit(bit) {
3866
+ const { buffer: buffer2 } = this;
3884
3867
  if (this.length === buffer2.length * 8) {
3885
3868
  buffer2.push(0);
3886
3869
  }
@@ -3888,351 +3871,279 @@ var BitBuffer = /* @__PURE__ */ function() {
3888
3871
  buffer2[this.length / 8 >> 0] |= 128 >>> this.length % 8;
3889
3872
  }
3890
3873
  this.length++;
3891
- };
3892
- return BitBuffer2;
3893
- }();
3874
+ }
3875
+ };
3876
+ __name(BitBuffer, "BitBuffer");
3894
3877
 
3895
- // ../../../node_modules/.pnpm/@nuintun+qrcode@3.3.5/node_modules/@nuintun/qrcode/esm/io/OutputStream.js
3896
- var OutputStream = /* @__PURE__ */ function() {
3897
- function OutputStream2() {
3878
+ // ../../../node_modules/.pnpm/@nuintun+qrcode@3.4.0/node_modules/@nuintun/qrcode/esm/image/lzw/Dict.js
3879
+ var MAX_CODE = (1 << 12) - 1;
3880
+ var Dict = class {
3881
+ constructor(depth) {
3882
+ const bof = 1 << depth;
3883
+ const eof = bof + 1;
3884
+ this.bof = bof;
3885
+ this.eof = eof;
3886
+ this.depth = depth;
3887
+ this.reset();
3898
3888
  }
3899
- __name(OutputStream2, "OutputStream");
3900
- OutputStream2.prototype.writeBytes = function(bytes, offset, length) {
3901
- if (offset === void 0) {
3902
- offset = 0;
3889
+ reset() {
3890
+ const bits = this.depth + 1;
3891
+ this.bits = bits;
3892
+ this.size = 1 << bits;
3893
+ this.codes = /* @__PURE__ */ new Map();
3894
+ this.unused = this.eof + 1;
3895
+ }
3896
+ add(code, index) {
3897
+ let { unused } = this;
3898
+ if (unused > MAX_CODE) {
3899
+ return false;
3903
3900
  }
3904
- if (length === void 0) {
3905
- length = bytes.length;
3901
+ this.codes.set(code << 8 | index, unused++);
3902
+ let { bits, size } = this;
3903
+ if (unused > size) {
3904
+ size = 1 << ++bits;
3906
3905
  }
3907
- for (var i = 0; i < length; i++) {
3908
- this.writeByte(bytes[i + offset]);
3906
+ this.bits = bits;
3907
+ this.size = size;
3908
+ this.unused = unused;
3909
+ return true;
3910
+ }
3911
+ get(code, index) {
3912
+ return this.codes.get(code << 8 | index);
3913
+ }
3914
+ };
3915
+ __name(Dict, "Dict");
3916
+
3917
+ // ../../../node_modules/.pnpm/@nuintun+qrcode@3.4.0/node_modules/@nuintun/qrcode/esm/image/lzw/DictStream.js
3918
+ var DictStream = class {
3919
+ constructor(dict) {
3920
+ this.bits = 0;
3921
+ this.buffer = 0;
3922
+ this.bytes = [];
3923
+ this.dict = dict;
3924
+ }
3925
+ write(code) {
3926
+ let { bits } = this;
3927
+ let buffer2 = this.buffer | code << bits;
3928
+ bits += this.dict.bits;
3929
+ const { bytes } = this;
3930
+ while (bits >= 8) {
3931
+ bytes.push(buffer2 & 255);
3932
+ buffer2 >>= 8;
3933
+ bits -= 8;
3934
+ }
3935
+ this.bits = bits;
3936
+ this.buffer = buffer2;
3937
+ }
3938
+ pipe(stream) {
3939
+ const { bytes } = this;
3940
+ if (this.bits > 0) {
3941
+ bytes.push(this.buffer);
3942
+ }
3943
+ stream.writeByte(this.dict.depth);
3944
+ const { length } = bytes;
3945
+ for (let i = 0; i < length; ) {
3946
+ const remain = length - i;
3947
+ if (remain >= 255) {
3948
+ stream.writeByte(255);
3949
+ stream.writeBytes(bytes, i, 255);
3950
+ i += 255;
3951
+ } else {
3952
+ stream.writeByte(remain);
3953
+ stream.writeBytes(bytes, i, remain);
3954
+ i = length;
3955
+ }
3909
3956
  }
3910
- };
3911
- OutputStream2.prototype.flush = function() {
3912
- };
3913
- OutputStream2.prototype.close = function() {
3914
- this.flush();
3915
- };
3916
- return OutputStream2;
3917
- }();
3957
+ stream.writeByte(0);
3958
+ }
3959
+ };
3960
+ __name(DictStream, "DictStream");
3918
3961
 
3919
- // ../../../node_modules/.pnpm/@nuintun+qrcode@3.3.5/node_modules/@nuintun/qrcode/esm/io/ByteArrayOutputStream.js
3920
- var ByteArrayOutputStream = /* @__PURE__ */ function(_super) {
3921
- __extends(ByteArrayOutputStream2, _super);
3922
- function ByteArrayOutputStream2() {
3923
- var _this = _super !== null && _super.apply(this, arguments) || this;
3924
- _this.bytes = [];
3925
- return _this;
3926
- }
3927
- __name(ByteArrayOutputStream2, "ByteArrayOutputStream");
3928
- ByteArrayOutputStream2.prototype.writeByte = function(byte) {
3929
- this.bytes.push(byte);
3930
- };
3931
- ByteArrayOutputStream2.prototype.writeInt16 = function(byte) {
3932
- this.bytes.push(byte, byte >>> 8);
3933
- };
3934
- ByteArrayOutputStream2.prototype.toByteArray = function() {
3935
- return this.bytes;
3936
- };
3937
- return ByteArrayOutputStream2;
3938
- }(OutputStream);
3962
+ // ../../../node_modules/.pnpm/@nuintun+qrcode@3.4.0/node_modules/@nuintun/qrcode/esm/image/lzw/index.js
3963
+ function compress(pixels, depth, stream) {
3964
+ const dict = new Dict(depth);
3965
+ const buffer2 = new DictStream(dict);
3966
+ buffer2.write(dict.bof);
3967
+ if (pixels.length > 0) {
3968
+ let code = pixels[0];
3969
+ const { length } = pixels;
3970
+ for (let i = 1; i < length; i++) {
3971
+ const pixelIndex = pixels[i];
3972
+ const nextCode = dict.get(code, pixelIndex);
3973
+ if (nextCode != null) {
3974
+ code = nextCode;
3975
+ } else {
3976
+ buffer2.write(code);
3977
+ if (!dict.add(code, pixelIndex)) {
3978
+ buffer2.write(dict.bof);
3979
+ dict.reset();
3980
+ }
3981
+ code = pixelIndex;
3982
+ }
3983
+ }
3984
+ buffer2.write(code);
3985
+ }
3986
+ buffer2.write(dict.eof);
3987
+ buffer2.pipe(stream);
3988
+ }
3989
+ __name(compress, "compress");
3990
+
3991
+ // ../../../node_modules/.pnpm/@nuintun+qrcode@3.4.0/node_modules/@nuintun/qrcode/esm/image/ByteStream.js
3992
+ var ByteStream = class {
3993
+ constructor() {
3994
+ this.bytes = [];
3995
+ }
3996
+ writeByte(value) {
3997
+ this.bytes.push(value & 255);
3998
+ }
3999
+ writeInt16(value) {
4000
+ this.bytes.push(value & 255, value >> 8 & 255);
4001
+ }
4002
+ writeBytes(bytes, offset = 0, length = bytes.length) {
4003
+ const buffer2 = this.bytes;
4004
+ for (let i = 0; i < length; i++) {
4005
+ buffer2.push(bytes[offset + i] & 255);
4006
+ }
4007
+ }
4008
+ };
4009
+ __name(ByteStream, "ByteStream");
3939
4010
 
3940
- // ../../../node_modules/.pnpm/@nuintun+qrcode@3.3.5/node_modules/@nuintun/qrcode/esm/io/Base64EncodeOutputStream.js
3941
- function encode7(ch) {
3942
- if (ch >= 0) {
3943
- if (ch < 26) {
3944
- return 65 + ch;
3945
- } else if (ch < 52) {
3946
- return 97 + (ch - 26);
3947
- } else if (ch < 62) {
3948
- return 48 + (ch - 52);
3949
- } else if (ch === 62) {
4011
+ // ../../../node_modules/.pnpm/@nuintun+qrcode@3.4.0/node_modules/@nuintun/qrcode/esm/image/Base64Stream.js
4012
+ var { fromCharCode } = String;
4013
+ function encode7(byte) {
4014
+ byte &= 63;
4015
+ if (byte >= 0) {
4016
+ if (byte < 26) {
4017
+ return 65 + byte;
4018
+ } else if (byte < 52) {
4019
+ return 97 + (byte - 26);
4020
+ } else if (byte < 62) {
4021
+ return 48 + (byte - 52);
4022
+ } else if (byte === 62) {
3950
4023
  return 43;
3951
- } else if (ch === 63) {
4024
+ } else if (byte === 63) {
3952
4025
  return 47;
3953
4026
  }
3954
4027
  }
3955
- throw new Error("illegal char: ".concat(String.fromCharCode(ch)));
4028
+ throw new Error(`illegal char: ${fromCharCode(byte)}`);
3956
4029
  }
3957
4030
  __name(encode7, "encode");
3958
- var Base64EncodeOutputStream = /* @__PURE__ */ function(_super) {
3959
- __extends(Base64EncodeOutputStream2, _super);
3960
- function Base64EncodeOutputStream2(stream) {
3961
- var _this = _super.call(this) || this;
3962
- _this.buffer = 0;
3963
- _this.length = 0;
3964
- _this.bufLength = 0;
3965
- _this.stream = stream;
3966
- return _this;
3967
- }
3968
- __name(Base64EncodeOutputStream2, "Base64EncodeOutputStream");
3969
- Base64EncodeOutputStream2.prototype.writeByte = function(byte) {
3970
- this.buffer = this.buffer << 8 | byte & 255;
3971
- this.bufLength += 8;
3972
- this.length++;
3973
- while (this.bufLength >= 6) {
3974
- this.writeEncoded(this.buffer >>> this.bufLength - 6);
3975
- this.bufLength -= 6;
4031
+ var Base64Stream = class {
4032
+ constructor() {
4033
+ this.bits = 0;
4034
+ this.buffer = 0;
4035
+ this.length = 0;
4036
+ this.stream = new ByteStream();
4037
+ }
4038
+ get bytes() {
4039
+ return this.stream.bytes;
4040
+ }
4041
+ write(byte) {
4042
+ let bits = this.bits + 8;
4043
+ const { stream } = this;
4044
+ const buffer2 = this.buffer << 8 | byte & 255;
4045
+ while (bits >= 6) {
4046
+ stream.writeByte(encode7(buffer2 >>> bits - 6));
4047
+ bits -= 6;
3976
4048
  }
3977
- };
3978
- Base64EncodeOutputStream2.prototype.flush = function() {
3979
- if (this.bufLength > 0) {
3980
- this.writeEncoded(this.buffer << 6 - this.bufLength);
4049
+ this.length++;
4050
+ this.bits = bits;
4051
+ this.buffer = buffer2;
4052
+ }
4053
+ close() {
4054
+ const { bits, stream, length } = this;
4055
+ if (bits > 0) {
4056
+ stream.writeByte(encode7(this.buffer << 6 - bits));
4057
+ this.bits = 0;
3981
4058
  this.buffer = 0;
3982
- this.bufLength = 0;
3983
4059
  }
3984
- var stream = this.stream;
3985
- if (this.length % 3 != 0) {
3986
- var pad = 3 - this.length % 3;
3987
- for (var i = 0; i < pad; i++) {
4060
+ if (length % 3 != 0) {
4061
+ const pad = 3 - length % 3;
4062
+ for (let i = 0; i < pad; i++) {
3988
4063
  stream.writeByte(61);
3989
4064
  }
3990
4065
  }
3991
- };
3992
- Base64EncodeOutputStream2.prototype.writeEncoded = function(byte) {
3993
- this.stream.writeByte(encode7(byte & 63));
3994
- };
3995
- return Base64EncodeOutputStream2;
3996
- }(OutputStream);
4066
+ }
4067
+ };
4068
+ __name(Base64Stream, "Base64Stream");
3997
4069
 
3998
- // ../../../node_modules/.pnpm/@nuintun+qrcode@3.3.5/node_modules/@nuintun/qrcode/esm/image/GIFImage.js
3999
- function encodeToBase64(data) {
4000
- var output = new ByteArrayOutputStream();
4001
- var stream = new Base64EncodeOutputStream(output);
4002
- stream.writeBytes(data);
4003
- stream.close();
4004
- output.close();
4005
- return output.toByteArray();
4006
- }
4007
- __name(encodeToBase64, "encodeToBase64");
4008
- var LZWTable = /* @__PURE__ */ function() {
4009
- function LZWTable2() {
4010
- this.size = 0;
4011
- this.map = {};
4012
- }
4013
- __name(LZWTable2, "LZWTable");
4014
- LZWTable2.prototype.add = function(key) {
4015
- if (!this.contains(key)) {
4016
- this.map[key] = this.size++;
4017
- }
4018
- };
4019
- LZWTable2.prototype.getSize = function() {
4020
- return this.size;
4021
- };
4022
- LZWTable2.prototype.indexOf = function(key) {
4023
- return this.map[key];
4024
- };
4025
- LZWTable2.prototype.contains = function(key) {
4026
- return this.map[key] >= 0;
4027
- };
4028
- return LZWTable2;
4029
- }();
4030
- var BitOutputStream = /* @__PURE__ */ function() {
4031
- function BitOutputStream2(output) {
4032
- this.output = output;
4033
- this.bitLength = 0;
4034
- this.bitBuffer = 0;
4035
- }
4036
- __name(BitOutputStream2, "BitOutputStream");
4037
- BitOutputStream2.prototype.write = function(data, length) {
4038
- if (data >>> length !== 0) {
4039
- throw new Error("length overflow");
4040
- }
4041
- var output = this.output;
4042
- while (this.bitLength + length >= 8) {
4043
- output.writeByte(255 & (data << this.bitLength | this.bitBuffer));
4044
- length -= 8 - this.bitLength;
4045
- data >>>= 8 - this.bitLength;
4046
- this.bitBuffer = 0;
4047
- this.bitLength = 0;
4048
- }
4049
- this.bitBuffer = data << this.bitLength | this.bitBuffer;
4050
- this.bitLength = this.bitLength + length;
4051
- };
4052
- BitOutputStream2.prototype.flush = function() {
4053
- var output = this.output;
4054
- if (this.bitLength > 0) {
4055
- output.writeByte(this.bitBuffer);
4056
- }
4057
- output.flush();
4058
- };
4059
- BitOutputStream2.prototype.close = function() {
4060
- this.flush();
4061
- this.output.close();
4062
- };
4063
- return BitOutputStream2;
4064
- }();
4065
- var GIFImage = /* @__PURE__ */ function() {
4066
- function GIFImage2(width, height) {
4067
- this.data = [];
4070
+ // ../../../node_modules/.pnpm/@nuintun+qrcode@3.4.0/node_modules/@nuintun/qrcode/esm/image/GIFImage.js
4071
+ var GIFImage = class {
4072
+ constructor(width, height, { foreground = [0, 0, 0], background = [255, 255, 255] } = {}) {
4073
+ this.pixels = [];
4068
4074
  this.width = width;
4069
4075
  this.height = height;
4070
- var size = width * height;
4071
- for (var i = 0; i < size; i++) {
4072
- this.data[i] = 0;
4073
- }
4074
- }
4075
- __name(GIFImage2, "GIFImage");
4076
- GIFImage2.prototype.getLZWRaster = function(lzwMinCodeSize) {
4077
- var table = new LZWTable();
4078
- var fromCharCode = String.fromCharCode;
4079
- var clearCode = 1 << lzwMinCodeSize;
4080
- var endCode = (1 << lzwMinCodeSize) + 1;
4081
- for (var i = 0; i < clearCode; i++) {
4082
- table.add(fromCharCode(i));
4083
- }
4084
- table.add(fromCharCode(clearCode));
4085
- table.add(fromCharCode(endCode));
4086
- var bitLength = lzwMinCodeSize + 1;
4087
- var byteOutput = new ByteArrayOutputStream();
4088
- var bitOutput = new BitOutputStream(byteOutput);
4089
- try {
4090
- var data = this.data;
4091
- var length_1 = data.length;
4092
- var fromCharCode_1 = String.fromCharCode;
4093
- bitOutput.write(clearCode, bitLength);
4094
- var dataIndex = 0;
4095
- var words = fromCharCode_1(data[dataIndex++]);
4096
- while (dataIndex < length_1) {
4097
- var char = fromCharCode_1(data[dataIndex++]);
4098
- if (table.contains(words + char)) {
4099
- words += char;
4100
- } else {
4101
- bitOutput.write(table.indexOf(words), bitLength);
4102
- if (table.getSize() < 4095) {
4103
- if (table.getSize() === 1 << bitLength) {
4104
- bitLength++;
4105
- }
4106
- table.add(words + char);
4107
- }
4108
- words = char;
4109
- }
4110
- }
4111
- bitOutput.write(table.indexOf(words), bitLength);
4112
- bitOutput.write(endCode, bitLength);
4113
- } finally {
4114
- bitOutput.close();
4115
- }
4116
- return byteOutput.toByteArray();
4117
- };
4118
- GIFImage2.prototype.setPixel = function(x, y, pixel) {
4119
- var _a = this, width = _a.width, height = _a.height;
4120
- if (x < 0 || width <= x)
4121
- throw new Error("illegal x axis: ".concat(x));
4122
- if (y < 0 || height <= y)
4123
- throw new Error("illegal y axis: ".concat(y));
4124
- this.data[y * width + x] = pixel;
4125
- };
4126
- GIFImage2.prototype.getPixel = function(x, y) {
4127
- var _a = this, width = _a.width, height = _a.height;
4128
- if (x < 0 || width <= x)
4129
- throw new Error("illegal x axis: ".concat(x));
4130
- if (y < 0 || height <= y)
4131
- throw new Error("illegal y axis: ".concat(y));
4132
- return this.data[y * width + x];
4133
- };
4134
- GIFImage2.prototype.write = function(output) {
4135
- var _a = this, width = _a.width, height = _a.height;
4136
- output.writeByte(71);
4137
- output.writeByte(73);
4138
- output.writeByte(70);
4139
- output.writeByte(56);
4140
- output.writeByte(55);
4141
- output.writeByte(97);
4142
- output.writeInt16(width);
4143
- output.writeInt16(height);
4144
- output.writeByte(128);
4145
- output.writeByte(0);
4146
- output.writeByte(0);
4147
- output.writeByte(0);
4148
- output.writeByte(0);
4149
- output.writeByte(0);
4150
- output.writeByte(255);
4151
- output.writeByte(255);
4152
- output.writeByte(255);
4153
- output.writeByte(44);
4154
- output.writeInt16(0);
4155
- output.writeInt16(0);
4156
- output.writeInt16(width);
4157
- output.writeInt16(height);
4158
- output.writeByte(0);
4159
- var lzwMinCodeSize = 2;
4160
- var raster = this.getLZWRaster(lzwMinCodeSize);
4161
- var raLength = raster.length;
4162
- output.writeByte(lzwMinCodeSize);
4163
- var offset = 0;
4164
- while (raLength - offset > 255) {
4165
- output.writeByte(255);
4166
- output.writeBytes(raster, offset, 255);
4167
- offset += 255;
4168
- }
4169
- var length = raLength - offset;
4170
- output.writeByte(length);
4171
- output.writeBytes(raster, offset, length);
4172
- output.writeByte(0);
4173
- output.writeByte(59);
4174
- };
4175
- GIFImage2.prototype.toDataURL = function() {
4176
- var output = new ByteArrayOutputStream();
4177
- this.write(output);
4178
- var bytes = encodeToBase64(output.toByteArray());
4179
- output.close();
4180
- var length = bytes.length;
4181
- var fromCharCode = String.fromCharCode;
4182
- var url = "data:image/gif;base64,";
4183
- for (var i = 0; i < length; i++) {
4184
- url += fromCharCode(bytes[i]);
4076
+ this.foreground = foreground;
4077
+ this.background = background;
4078
+ }
4079
+ encodeImpl() {
4080
+ const stream = new ByteStream();
4081
+ const { width, height, background, foreground } = this;
4082
+ stream.writeBytes([71, 73, 70, 56, 57, 97]);
4083
+ stream.writeInt16(width);
4084
+ stream.writeInt16(height);
4085
+ stream.writeBytes([128, 0, 0]);
4086
+ stream.writeBytes([background[0], background[1], background[2]]);
4087
+ stream.writeBytes([foreground[0], foreground[1], foreground[2]]);
4088
+ stream.writeByte(44);
4089
+ stream.writeInt16(0);
4090
+ stream.writeInt16(0);
4091
+ stream.writeInt16(width);
4092
+ stream.writeInt16(height);
4093
+ stream.writeByte(0);
4094
+ compress(this.pixels, 2, stream);
4095
+ stream.writeByte(59);
4096
+ return stream.bytes;
4097
+ }
4098
+ set(x, y, color) {
4099
+ this.pixels[y * this.width + x] = color;
4100
+ }
4101
+ toDataURL() {
4102
+ const bytes = this.encodeImpl();
4103
+ const stream = new Base64Stream();
4104
+ for (const byte of bytes) {
4105
+ stream.write(byte);
4106
+ }
4107
+ stream.close();
4108
+ const base64 = stream.bytes;
4109
+ let url = "data:image/gif;base64,";
4110
+ for (const byte of base64) {
4111
+ url += fromCharCode(byte);
4185
4112
  }
4186
4113
  return url;
4187
- };
4188
- return GIFImage2;
4189
- }();
4114
+ }
4115
+ };
4116
+ __name(GIFImage, "GIFImage");
4190
4117
 
4191
- // ../../../node_modules/.pnpm/@nuintun+qrcode@3.3.5/node_modules/@nuintun/qrcode/esm/qrcode/common/MaskPattern.js
4118
+ // ../../../node_modules/.pnpm/@nuintun+qrcode@3.4.0/node_modules/@nuintun/qrcode/esm/qrcode/common/MaskPattern.js
4192
4119
  function getMaskFunc(maskPattern) {
4193
4120
  switch (maskPattern) {
4194
4121
  case 0:
4195
- return function(x, y) {
4196
- return (x + y & 1) === 0;
4197
- };
4122
+ return (x, y) => (x + y & 1) === 0;
4198
4123
  case 1:
4199
- return function(_x, y) {
4200
- return (y & 1) === 0;
4201
- };
4124
+ return (_x, y) => (y & 1) === 0;
4202
4125
  case 2:
4203
- return function(x, _y) {
4204
- return x % 3 === 0;
4205
- };
4126
+ return (x, _y) => x % 3 === 0;
4206
4127
  case 3:
4207
- return function(x, y) {
4208
- return (x + y) % 3 === 0;
4209
- };
4128
+ return (x, y) => (x + y) % 3 === 0;
4210
4129
  case 4:
4211
- return function(x, y) {
4212
- return ((x / 3 >> 0) + (y / 2 >> 0) & 1) === 0;
4213
- };
4130
+ return (x, y) => ((x / 3 >> 0) + (y / 2 >> 0) & 1) === 0;
4214
4131
  case 5:
4215
- return function(x, y) {
4216
- return (x * y & 1) + x * y % 3 === 0;
4217
- };
4132
+ return (x, y) => (x * y & 1) + x * y % 3 === 0;
4218
4133
  case 6:
4219
- return function(x, y) {
4220
- return ((x * y & 1) + x * y % 3 & 1) === 0;
4221
- };
4134
+ return (x, y) => ((x * y & 1) + x * y % 3 & 1) === 0;
4222
4135
  case 7:
4223
- return function(x, y) {
4224
- return (x * y % 3 + (x + y & 1) & 1) === 0;
4225
- };
4136
+ return (x, y) => (x * y % 3 + (x + y & 1) & 1) === 0;
4226
4137
  default:
4227
- throw new Error("illegal mask: ".concat(maskPattern));
4138
+ throw new Error(`illegal mask: ${maskPattern}`);
4228
4139
  }
4229
4140
  }
4230
4141
  __name(getMaskFunc, "getMaskFunc");
4231
4142
 
4232
- // ../../../node_modules/.pnpm/@nuintun+qrcode@3.3.5/node_modules/@nuintun/qrcode/esm/qrcode/encoder/Writer.js
4143
+ // ../../../node_modules/.pnpm/@nuintun+qrcode@3.4.0/node_modules/@nuintun/qrcode/esm/qrcode/encoder/Writer.js
4233
4144
  var PAD0 = 236;
4234
4145
  var PAD1 = 17;
4235
- var toString2 = Object.prototype.toString;
4146
+ var { toString: toString2 } = Object.prototype;
4236
4147
  function appendECI(encoding, buffer2) {
4237
4148
  if (encoding < 0 || encoding >= 1e6) {
4238
4149
  throw new Error("byte mode encoding hint out of range");
@@ -4250,11 +4161,10 @@ function appendECI(encoding, buffer2) {
4250
4161
  }
4251
4162
  __name(appendECI, "appendECI");
4252
4163
  function prepareData(version2, errorCorrectionLevel, encodingHint, chunks) {
4253
- var buffer2 = new BitBuffer();
4254
- var rsBlocks = RSBlock.getRSBlocks(version2, errorCorrectionLevel);
4255
- for (var _i = 0, chunks_1 = chunks; _i < chunks_1.length; _i++) {
4256
- var data = chunks_1[_i];
4257
- var mode = data.mode;
4164
+ const buffer2 = new BitBuffer();
4165
+ const rsBlocks = RSBlock.getRSBlocks(version2, errorCorrectionLevel);
4166
+ for (const data of chunks) {
4167
+ const mode = data.mode;
4258
4168
  if (encodingHint && mode === Mode.Byte) {
4259
4169
  appendECI(data.encoding, buffer2);
4260
4170
  }
@@ -4262,9 +4172,8 @@ function prepareData(version2, errorCorrectionLevel, encodingHint, chunks) {
4262
4172
  buffer2.put(data.getLength(), data.getLengthInBits(version2));
4263
4173
  data.writeTo(buffer2);
4264
4174
  }
4265
- var maxDataCount = 0;
4266
- for (var _a = 0, rsBlocks_1 = rsBlocks; _a < rsBlocks_1.length; _a++) {
4267
- var rsBlock = rsBlocks_1[_a];
4175
+ let maxDataCount = 0;
4176
+ for (const rsBlock of rsBlocks) {
4268
4177
  maxDataCount += rsBlock.getDataCount();
4269
4178
  }
4270
4179
  maxDataCount *= 8;
@@ -4272,45 +4181,45 @@ function prepareData(version2, errorCorrectionLevel, encodingHint, chunks) {
4272
4181
  }
4273
4182
  __name(prepareData, "prepareData");
4274
4183
  function createBytes(buffer2, rsBlocks) {
4275
- var offset = 0;
4276
- var maxDcCount = 0;
4277
- var maxEcCount = 0;
4278
- var dcData = [];
4279
- var ecData = [];
4280
- var rsLength = rsBlocks.length;
4281
- var bufferData = buffer2.getBuffer();
4282
- for (var r = 0; r < rsLength; r++) {
4283
- var rsBlock = rsBlocks[r];
4284
- var dcCount = rsBlock.getDataCount();
4285
- var ecCount = rsBlock.getTotalCount() - dcCount;
4184
+ let offset = 0;
4185
+ let maxDcCount = 0;
4186
+ let maxEcCount = 0;
4187
+ const dcData = [];
4188
+ const ecData = [];
4189
+ const rsLength = rsBlocks.length;
4190
+ const bufferData = buffer2.getBuffer();
4191
+ for (let r = 0; r < rsLength; r++) {
4192
+ const rsBlock = rsBlocks[r];
4193
+ const dcCount = rsBlock.getDataCount();
4194
+ const ecCount = rsBlock.getTotalCount() - dcCount;
4286
4195
  maxDcCount = Math.max(maxDcCount, dcCount);
4287
4196
  maxEcCount = Math.max(maxEcCount, ecCount);
4288
4197
  dcData[r] = [];
4289
- for (var i = 0; i < dcCount; i++) {
4198
+ for (let i = 0; i < dcCount; i++) {
4290
4199
  dcData[r][i] = 255 & bufferData[i + offset];
4291
4200
  }
4292
4201
  offset += dcCount;
4293
- var rsPoly = getErrorCorrectionPolynomial(ecCount);
4294
- var ecLength = rsPoly.getLength() - 1;
4295
- var rawPoly = new Polynomial(dcData[r], ecLength);
4296
- var modPoly = rawPoly.mod(rsPoly);
4297
- var mpLength = modPoly.getLength();
4202
+ const rsPoly = getErrorCorrectionPolynomial(ecCount);
4203
+ const ecLength = rsPoly.getLength() - 1;
4204
+ const rawPoly = new Polynomial(dcData[r], ecLength);
4205
+ const modPoly = rawPoly.mod(rsPoly);
4206
+ const mpLength = modPoly.getLength();
4298
4207
  ecData[r] = [];
4299
- for (var i = 0; i < ecLength; i++) {
4300
- var modIndex = i + mpLength - ecLength;
4208
+ for (let i = 0; i < ecLength; i++) {
4209
+ const modIndex = i + mpLength - ecLength;
4301
4210
  ecData[r][i] = modIndex >= 0 ? modPoly.getAt(modIndex) : 0;
4302
4211
  }
4303
4212
  }
4304
4213
  buffer2 = new BitBuffer();
4305
- for (var i = 0; i < maxDcCount; i++) {
4306
- for (var r = 0; r < rsLength; r++) {
4214
+ for (let i = 0; i < maxDcCount; i++) {
4215
+ for (let r = 0; r < rsLength; r++) {
4307
4216
  if (i < dcData[r].length) {
4308
4217
  buffer2.put(dcData[r][i], 8);
4309
4218
  }
4310
4219
  }
4311
4220
  }
4312
- for (var i = 0; i < maxEcCount; i++) {
4313
- for (var r = 0; r < rsLength; r++) {
4221
+ for (let i = 0; i < maxEcCount; i++) {
4222
+ for (let r = 0; r < rsLength; r++) {
4314
4223
  if (i < ecData[r].length) {
4315
4224
  buffer2.put(ecData[r][i], 8);
4316
4225
  }
@@ -4339,38 +4248,34 @@ function createData(buffer2, rsBlocks, maxDataCount) {
4339
4248
  return createBytes(buffer2, rsBlocks);
4340
4249
  }
4341
4250
  __name(createData, "createData");
4342
- var Encoder = /* @__PURE__ */ function() {
4343
- function Encoder2(options) {
4344
- if (options === void 0) {
4345
- options = {};
4346
- }
4251
+ var Encoder = class {
4252
+ constructor(options = {}) {
4347
4253
  this.matrixSize = 0;
4348
4254
  this.chunks = [];
4349
4255
  this.matrix = [];
4350
- var _a = options.version, version2 = _a === void 0 ? 0 : _a, _b = options.encodingHint, encodingHint = _b === void 0 ? false : _b, _c = options.errorCorrectionLevel, errorCorrectionLevel = _c === void 0 ? ErrorCorrectionLevel.L : _c;
4256
+ const { version: version2 = 0, encodingHint = false, errorCorrectionLevel = ErrorCorrectionLevel.L } = options;
4351
4257
  this.setVersion(version2);
4352
4258
  this.setEncodingHint(encodingHint);
4353
4259
  this.setErrorCorrectionLevel(errorCorrectionLevel);
4354
4260
  }
4355
- __name(Encoder2, "Encoder");
4356
- Encoder2.prototype.getMatrix = function() {
4261
+ getMatrix() {
4357
4262
  return this.matrix;
4358
- };
4359
- Encoder2.prototype.getMatrixSize = function() {
4263
+ }
4264
+ getMatrixSize() {
4360
4265
  return this.matrixSize;
4361
- };
4362
- Encoder2.prototype.getVersion = function() {
4266
+ }
4267
+ getVersion() {
4363
4268
  return this.version;
4364
- };
4365
- Encoder2.prototype.setVersion = function(version2) {
4269
+ }
4270
+ setVersion(version2) {
4366
4271
  this.version = Math.min(40, Math.max(0, version2 >> 0));
4367
4272
  this.auto = this.version === 0;
4368
4273
  return this;
4369
- };
4370
- Encoder2.prototype.getErrorCorrectionLevel = function() {
4274
+ }
4275
+ getErrorCorrectionLevel() {
4371
4276
  return this.errorCorrectionLevel;
4372
- };
4373
- Encoder2.prototype.setErrorCorrectionLevel = function(errorCorrectionLevel) {
4277
+ }
4278
+ setErrorCorrectionLevel(errorCorrectionLevel) {
4374
4279
  switch (errorCorrectionLevel) {
4375
4280
  case ErrorCorrectionLevel.L:
4376
4281
  case ErrorCorrectionLevel.M:
@@ -4379,36 +4284,36 @@ var Encoder = /* @__PURE__ */ function() {
4379
4284
  this.errorCorrectionLevel = errorCorrectionLevel;
4380
4285
  }
4381
4286
  return this;
4382
- };
4383
- Encoder2.prototype.getEncodingHint = function() {
4287
+ }
4288
+ getEncodingHint() {
4384
4289
  return this.encodingHint;
4385
- };
4386
- Encoder2.prototype.setEncodingHint = function(encodingHint) {
4290
+ }
4291
+ setEncodingHint(encodingHint) {
4387
4292
  this.encodingHint = encodingHint;
4388
4293
  return this;
4389
- };
4390
- Encoder2.prototype.write = function(data) {
4391
- var chunks = this.chunks;
4294
+ }
4295
+ write(data) {
4296
+ const { chunks } = this;
4392
4297
  if (data instanceof QRData) {
4393
4298
  chunks.push(data);
4394
4299
  } else {
4395
- var type = toString2.call(data);
4300
+ const type = toString2.call(data);
4396
4301
  if (type === "[object String]") {
4397
4302
  chunks.push(new QRByte(data));
4398
4303
  } else {
4399
- throw new Error("illegal data: ".concat(data));
4304
+ throw new Error(`illegal data: ${data}`);
4400
4305
  }
4401
4306
  }
4402
4307
  return this;
4403
- };
4404
- Encoder2.prototype.isDark = function(row, col) {
4308
+ }
4309
+ isDark(row, col) {
4405
4310
  return this.matrix[row][col] === true;
4406
- };
4407
- Encoder2.prototype.setupFinderPattern = function(row, col) {
4408
- var matrix = this.matrix;
4409
- var matrixSize = this.matrixSize;
4410
- for (var r = -1; r <= 7; r++) {
4411
- for (var c = -1; c <= 7; c++) {
4311
+ }
4312
+ setupFinderPattern(row, col) {
4313
+ const { matrix } = this;
4314
+ const matrixSize = this.matrixSize;
4315
+ for (let r = -1; r <= 7; r++) {
4316
+ for (let c = -1; c <= 7; c++) {
4412
4317
  if (row + r <= -1 || matrixSize <= row + r || col + c <= -1 || matrixSize <= col + c) {
4413
4318
  continue;
4414
4319
  }
@@ -4419,20 +4324,20 @@ var Encoder = /* @__PURE__ */ function() {
4419
4324
  }
4420
4325
  }
4421
4326
  }
4422
- };
4423
- Encoder2.prototype.setupAlignmentPattern = function() {
4424
- var matrix = this.matrix;
4425
- var pos = getAlignmentPattern(this.version);
4426
- var length = pos.length;
4427
- for (var i = 0; i < length; i++) {
4428
- for (var j = 0; j < length; j++) {
4429
- var row = pos[i];
4430
- var col = pos[j];
4327
+ }
4328
+ setupAlignmentPattern() {
4329
+ const { matrix } = this;
4330
+ const pos = getAlignmentPattern(this.version);
4331
+ const { length } = pos;
4332
+ for (let i = 0; i < length; i++) {
4333
+ for (let j = 0; j < length; j++) {
4334
+ const row = pos[i];
4335
+ const col = pos[j];
4431
4336
  if (matrix[row][col] !== null) {
4432
4337
  continue;
4433
4338
  }
4434
- for (var r = -2; r <= 2; r++) {
4435
- for (var c = -2; c <= 2; c++) {
4339
+ for (let r = -2; r <= 2; r++) {
4340
+ for (let c = -2; c <= 2; c++) {
4436
4341
  if (r === -2 || r === 2 || c === -2 || c === 2 || r === 0 && c === 0) {
4437
4342
  matrix[row + r][col + c] = true;
4438
4343
  } else {
@@ -4442,12 +4347,12 @@ var Encoder = /* @__PURE__ */ function() {
4442
4347
  }
4443
4348
  }
4444
4349
  }
4445
- };
4446
- Encoder2.prototype.setupTimingPattern = function() {
4447
- var matrix = this.matrix;
4448
- var count = this.matrixSize - 8;
4449
- for (var i = 8; i < count; i++) {
4450
- var bit = i % 2 === 0;
4350
+ }
4351
+ setupTimingPattern() {
4352
+ const { matrix } = this;
4353
+ const count = this.matrixSize - 8;
4354
+ for (let i = 8; i < count; i++) {
4355
+ const bit = i % 2 === 0;
4451
4356
  if (matrix[i][6] === null) {
4452
4357
  matrix[i][6] = bit;
4453
4358
  }
@@ -4455,14 +4360,14 @@ var Encoder = /* @__PURE__ */ function() {
4455
4360
  matrix[6][i] = bit;
4456
4361
  }
4457
4362
  }
4458
- };
4459
- Encoder2.prototype.setupFormatInfo = function(maskPattern) {
4460
- var matrix = this.matrix;
4461
- var data = this.errorCorrectionLevel << 3 | maskPattern;
4462
- var bits = getBCHVersionInfo(data);
4463
- var matrixSize = this.matrixSize;
4464
- for (var i = 0; i < 15; i++) {
4465
- var bit = (bits >> i & 1) === 1;
4363
+ }
4364
+ setupFormatInfo(maskPattern) {
4365
+ const { matrix } = this;
4366
+ const data = this.errorCorrectionLevel << 3 | maskPattern;
4367
+ const bits = getBCHVersionInfo(data);
4368
+ const matrixSize = this.matrixSize;
4369
+ for (let i = 0; i < 15; i++) {
4370
+ const bit = (bits >> i & 1) === 1;
4466
4371
  if (i < 6) {
4467
4372
  matrix[i][8] = bit;
4468
4373
  } else if (i < 8) {
@@ -4479,42 +4384,42 @@ var Encoder = /* @__PURE__ */ function() {
4479
4384
  }
4480
4385
  }
4481
4386
  matrix[matrixSize - 8][8] = true;
4482
- };
4483
- Encoder2.prototype.setupVersionInfo = function() {
4387
+ }
4388
+ setupVersionInfo() {
4484
4389
  if (this.version >= 7) {
4485
- var matrix = this.matrix;
4486
- var matrixSize = this.matrixSize;
4487
- var bits = getBCHVersion(this.version);
4488
- for (var i = 0; i < 18; i++) {
4489
- var bit = (bits >> i & 1) === 1;
4390
+ const { matrix } = this;
4391
+ const matrixSize = this.matrixSize;
4392
+ const bits = getBCHVersion(this.version);
4393
+ for (let i = 0; i < 18; i++) {
4394
+ const bit = (bits >> i & 1) === 1;
4490
4395
  matrix[i / 3 >> 0][i % 3 + matrixSize - 8 - 3] = bit;
4491
4396
  matrix[i % 3 + matrixSize - 8 - 3][i / 3 >> 0] = bit;
4492
4397
  }
4493
4398
  }
4494
- };
4495
- Encoder2.prototype.setupCodewords = function(data, maskPattern) {
4496
- var matrix = this.matrix;
4497
- var matrixSize = this.matrixSize;
4498
- var bitLength = data.getLengthInBits();
4499
- var maskFunc = getMaskFunc(maskPattern);
4500
- var bitIndex = 0;
4501
- for (var right = matrixSize - 1; right >= 1; right -= 2) {
4399
+ }
4400
+ setupCodewords(data, maskPattern) {
4401
+ const { matrix } = this;
4402
+ const matrixSize = this.matrixSize;
4403
+ const bitLength = data.getLengthInBits();
4404
+ const maskFunc = getMaskFunc(maskPattern);
4405
+ let bitIndex = 0;
4406
+ for (let right = matrixSize - 1; right >= 1; right -= 2) {
4502
4407
  if (right === 6) {
4503
4408
  right = 5;
4504
4409
  }
4505
- for (var vert = 0; vert < matrixSize; vert++) {
4506
- for (var j = 0; j < 2; j++) {
4507
- var x = right - j;
4508
- var upward = (right + 1 & 2) === 0;
4509
- var y = upward ? matrixSize - 1 - vert : vert;
4410
+ for (let vert = 0; vert < matrixSize; vert++) {
4411
+ for (let j = 0; j < 2; j++) {
4412
+ const x = right - j;
4413
+ const upward = (right + 1 & 2) === 0;
4414
+ const y = upward ? matrixSize - 1 - vert : vert;
4510
4415
  if (matrix[y][x] !== null) {
4511
4416
  continue;
4512
4417
  }
4513
- var bit = false;
4418
+ let bit = false;
4514
4419
  if (bitIndex < bitLength) {
4515
4420
  bit = data.getBit(bitIndex++);
4516
4421
  }
4517
- var invert = maskFunc(x, y);
4422
+ const invert = maskFunc(x, y);
4518
4423
  if (invert) {
4519
4424
  bit = !bit;
4520
4425
  }
@@ -4522,13 +4427,13 @@ var Encoder = /* @__PURE__ */ function() {
4522
4427
  }
4523
4428
  }
4524
4429
  }
4525
- };
4526
- Encoder2.prototype.buildMatrix = function(data, maskPattern) {
4527
- var matrix = [];
4528
- var matrixSize = this.matrixSize;
4529
- for (var row = 0; row < matrixSize; row++) {
4430
+ }
4431
+ buildMatrix(data, maskPattern) {
4432
+ const matrix = [];
4433
+ const matrixSize = this.matrixSize;
4434
+ for (let row = 0; row < matrixSize; row++) {
4530
4435
  matrix[row] = [];
4531
- for (var col = 0; col < matrixSize; col++) {
4436
+ for (let col = 0; col < matrixSize; col++) {
4532
4437
  matrix[row][col] = null;
4533
4438
  }
4534
4439
  }
@@ -4541,37 +4446,36 @@ var Encoder = /* @__PURE__ */ function() {
4541
4446
  this.setupFormatInfo(maskPattern);
4542
4447
  this.setupVersionInfo();
4543
4448
  this.setupCodewords(data, maskPattern);
4544
- };
4545
- Encoder2.prototype.make = function() {
4546
- var _a, _b;
4547
- var buffer2;
4548
- var rsBlocks;
4549
- var maxDataCount;
4550
- var _c = this, chunks = _c.chunks, errorCorrectionLevel = _c.errorCorrectionLevel;
4449
+ }
4450
+ make() {
4451
+ let buffer2;
4452
+ let rsBlocks;
4453
+ let maxDataCount;
4454
+ const { chunks, errorCorrectionLevel } = this;
4551
4455
  if (this.auto) {
4552
- var version2 = 1;
4456
+ let version2 = 1;
4553
4457
  for (; version2 <= 40; version2++) {
4554
- _a = prepareData(version2, errorCorrectionLevel, this.encodingHint, chunks), buffer2 = _a[0], rsBlocks = _a[1], maxDataCount = _a[2];
4458
+ [buffer2, rsBlocks, maxDataCount] = prepareData(version2, errorCorrectionLevel, this.encodingHint, chunks);
4555
4459
  if (buffer2.getLengthInBits() <= maxDataCount)
4556
4460
  break;
4557
4461
  }
4558
- var dataLengthInBits = buffer2.getLengthInBits();
4462
+ const dataLengthInBits = buffer2.getLengthInBits();
4559
4463
  if (dataLengthInBits > maxDataCount) {
4560
- throw new Error("data overflow: ".concat(dataLengthInBits, " > ").concat(maxDataCount));
4464
+ throw new Error(`data overflow: ${dataLengthInBits} > ${maxDataCount}`);
4561
4465
  }
4562
4466
  this.version = version2;
4563
4467
  } else {
4564
- _b = prepareData(this.version, errorCorrectionLevel, this.encodingHint, chunks), buffer2 = _b[0], rsBlocks = _b[1], maxDataCount = _b[2];
4468
+ [buffer2, rsBlocks, maxDataCount] = prepareData(this.version, errorCorrectionLevel, this.encodingHint, chunks);
4565
4469
  }
4566
4470
  this.matrixSize = this.version * 4 + 17;
4567
- var matrices = [];
4568
- var data = createData(buffer2, rsBlocks, maxDataCount);
4569
- var bestMaskPattern = -1;
4570
- var minPenalty = Number.MAX_VALUE;
4571
- for (var maskPattern = 0; maskPattern < 8; maskPattern++) {
4471
+ const matrices = [];
4472
+ const data = createData(buffer2, rsBlocks, maxDataCount);
4473
+ let bestMaskPattern = -1;
4474
+ let minPenalty = Number.MAX_VALUE;
4475
+ for (let maskPattern = 0; maskPattern < 8; maskPattern++) {
4572
4476
  this.buildMatrix(data, maskPattern);
4573
4477
  matrices.push(this.matrix);
4574
- var penalty = calculateMaskPenalty(this);
4478
+ const penalty = calculateMaskPenalty(this);
4575
4479
  if (penalty < minPenalty) {
4576
4480
  minPenalty = penalty;
4577
4481
  bestMaskPattern = maskPattern;
@@ -4579,52 +4483,46 @@ var Encoder = /* @__PURE__ */ function() {
4579
4483
  }
4580
4484
  this.matrix = matrices[bestMaskPattern];
4581
4485
  return this;
4582
- };
4583
- Encoder2.prototype.toDataURL = function(moduleSize, margin) {
4584
- if (moduleSize === void 0) {
4585
- moduleSize = 2;
4586
- }
4587
- if (margin === void 0) {
4588
- margin = moduleSize * 4;
4589
- }
4486
+ }
4487
+ toDataURL(moduleSize = 2, margin = moduleSize * 4, colors) {
4590
4488
  moduleSize = Math.max(1, moduleSize >> 0);
4591
4489
  margin = Math.max(0, margin >> 0);
4592
- var matrixSize = this.matrixSize;
4593
- var size = moduleSize * matrixSize + margin * 2;
4594
- var min = margin;
4595
- var max = size - margin;
4596
- var gif = new GIFImage(size, size);
4597
- for (var y = 0; y < size; y++) {
4598
- for (var x = 0; x < size; x++) {
4490
+ const matrixSize = this.matrixSize;
4491
+ const size = moduleSize * matrixSize + margin * 2;
4492
+ const min = margin;
4493
+ const max = size - margin;
4494
+ const gif = new GIFImage(size, size, colors);
4495
+ for (let y = 0; y < size; y++) {
4496
+ for (let x = 0; x < size; x++) {
4599
4497
  if (min <= x && x < max && min <= y && y < max) {
4600
- var row = (y - min) / moduleSize >> 0;
4601
- var col = (x - min) / moduleSize >> 0;
4602
- gif.setPixel(x, y, this.isDark(row, col) ? 0 : 1);
4498
+ const row = (y - min) / moduleSize >> 0;
4499
+ const col = (x - min) / moduleSize >> 0;
4500
+ gif.set(x, y, this.isDark(row, col) ? 1 : 0);
4603
4501
  } else {
4604
- gif.setPixel(x, y, 1);
4502
+ gif.set(x, y, 0);
4605
4503
  }
4606
4504
  }
4607
4505
  }
4608
4506
  return gif.toDataURL();
4609
- };
4610
- Encoder2.prototype.clear = function() {
4507
+ }
4508
+ clear() {
4611
4509
  this.chunks = [];
4612
- };
4613
- return Encoder2;
4614
- }();
4510
+ }
4511
+ };
4512
+ __name(Encoder, "Encoder");
4615
4513
 
4616
- // ../../../node_modules/.pnpm/@nuintun+qrcode@3.3.5/node_modules/@nuintun/qrcode/esm/encoding/UTF16.js
4514
+ // ../../../node_modules/.pnpm/@nuintun+qrcode@3.4.0/node_modules/@nuintun/qrcode/esm/encoding/UTF16.js
4617
4515
  function encode8(text) {
4618
- var length = text.length;
4619
- var bytes = [];
4620
- for (var i = 0; i < length; i++) {
4516
+ const { length } = text;
4517
+ const bytes = [];
4518
+ for (let i = 0; i < length; i++) {
4621
4519
  bytes.push(text.charCodeAt(i));
4622
4520
  }
4623
4521
  return bytes;
4624
4522
  }
4625
4523
  __name(encode8, "encode");
4626
4524
 
4627
- // ../../../node_modules/.pnpm/@nuintun+qrcode@3.3.5/node_modules/@nuintun/qrcode/esm/qrcode/encoder/QRAlphanumeric.js
4525
+ // ../../../node_modules/.pnpm/@nuintun+qrcode@3.4.0/node_modules/@nuintun/qrcode/esm/qrcode/encoder/QRAlphanumeric.js
4628
4526
  function getByte(byte) {
4629
4527
  if (48 <= byte && byte <= 57) {
4630
4528
  return byte - 48;
@@ -4651,23 +4549,20 @@ function getByte(byte) {
4651
4549
  case 58:
4652
4550
  return 44;
4653
4551
  default:
4654
- throw new Error("illegal char: ".concat(String.fromCharCode(byte)));
4552
+ throw new Error(`illegal char: ${String.fromCharCode(byte)}`);
4655
4553
  }
4656
4554
  }
4657
4555
  }
4658
4556
  __name(getByte, "getByte");
4659
- var QRAlphanumeric = /* @__PURE__ */ function(_super) {
4660
- __extends(QRAlphanumeric2, _super);
4661
- function QRAlphanumeric2(data) {
4662
- var _this = _super.call(this, Mode.Alphanumeric, data) || this;
4663
- _this.bytes = encode8(data);
4664
- return _this;
4665
- }
4666
- __name(QRAlphanumeric2, "QRAlphanumeric");
4667
- QRAlphanumeric2.prototype.writeTo = function(buffer2) {
4668
- var i = 0;
4669
- var bytes = this.bytes;
4670
- var length = bytes.length;
4557
+ var QRAlphanumeric = class extends QRData {
4558
+ constructor(data) {
4559
+ super(Mode.Alphanumeric, data);
4560
+ this.bytes = encode8(data);
4561
+ }
4562
+ writeTo(buffer2) {
4563
+ let i = 0;
4564
+ const { bytes } = this;
4565
+ const { length } = bytes;
4671
4566
  while (i + 1 < length) {
4672
4567
  buffer2.put(getByte(bytes[i]) * 45 + getByte(bytes[i + 1]), 11);
4673
4568
  i += 2;
@@ -4675,9 +4570,9 @@ var QRAlphanumeric = /* @__PURE__ */ function(_super) {
4675
4570
  if (i < length) {
4676
4571
  buffer2.put(getByte(bytes[i]), 6);
4677
4572
  }
4678
- };
4679
- return QRAlphanumeric2;
4680
- }(QRData);
4573
+ }
4574
+ };
4575
+ __name(QRAlphanumeric, "QRAlphanumeric");
4681
4576
 
4682
4577
  // ../../../node_modules/.pnpm/@digitalbazaar+vpqr@3.0.0/node_modules/@digitalbazaar/vpqr/lib/vpqr.js
4683
4578
  var VP_QR_VERSION = "VP1";
@@ -4788,14 +4683,20 @@ export {
4788
4683
  /*!
4789
4684
  * Copyright (c) 2020-2021 Digital Bazaar, Inc. All rights reserved.
4790
4685
  */
4686
+ /*!
4687
+ * Copyright (c) 2020-2023 Digital Bazaar, Inc. All rights reserved.
4688
+ */
4791
4689
  /*!
4792
4690
  * Copyright (c) 2021 Digital Bazaar, Inc. All rights reserved.
4793
4691
  */
4692
+ /*!
4693
+ * Copyright (c) 2021-2023 Digital Bazaar, Inc. All rights reserved.
4694
+ */
4794
4695
  /**
4795
4696
  * @module QRCode
4796
4697
  * @package @nuintun/qrcode
4797
4698
  * @license MIT
4798
- * @version 3.3.5
4699
+ * @version 3.4.0
4799
4700
  * @author nuintun <nuintun@qq.com>
4800
4701
  * @description A pure JavaScript QRCode encode and decode library.
4801
4702
  * @see https://github.com/nuintun/qrcode#readme