@xiping/react-components 1.0.16 → 1.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/dist/cjs/_virtual/_commonjsHelpers.js +1 -0
  2. package/dist/cjs/_virtual/alignment-pattern.js +1 -0
  3. package/dist/cjs/_virtual/browser.js +1 -0
  4. package/dist/cjs/_virtual/browser2.js +1 -0
  5. package/dist/cjs/_virtual/canvas.js +1 -0
  6. package/dist/cjs/_virtual/dijkstra.js +1 -0
  7. package/dist/cjs/_virtual/error-correction-code.js +1 -0
  8. package/dist/cjs/_virtual/error-correction-level.js +1 -0
  9. package/dist/cjs/_virtual/finder-pattern.js +1 -0
  10. package/dist/cjs/_virtual/format-info.js +1 -0
  11. package/dist/cjs/_virtual/galois-field.js +1 -0
  12. package/dist/cjs/_virtual/mask-pattern.js +1 -0
  13. package/dist/cjs/_virtual/mode.js +1 -0
  14. package/dist/cjs/_virtual/polynomial.js +1 -0
  15. package/dist/cjs/_virtual/qrcode.js +1 -0
  16. package/dist/cjs/_virtual/regex.js +1 -0
  17. package/dist/cjs/_virtual/segments.js +1 -0
  18. package/dist/cjs/_virtual/svg-tag.js +1 -0
  19. package/dist/cjs/_virtual/utils.js +1 -0
  20. package/dist/cjs/_virtual/utils2.js +1 -0
  21. package/dist/cjs/_virtual/version-check.js +1 -0
  22. package/dist/cjs/_virtual/version.js +1 -0
  23. package/dist/cjs/components/qr-code/index.js +1 -0
  24. package/dist/cjs/components/react-force-graph-3d/index.d.ts +2 -0
  25. package/dist/cjs/index.d.ts +2 -0
  26. package/dist/cjs/index.js +1 -1
  27. package/dist/cjs/node_modules/.pnpm/dijkstrajs@1.0.3/node_modules/dijkstrajs/dijkstra.js +1 -0
  28. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/browser.js +1 -0
  29. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/can-promise.js +1 -0
  30. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/alignment-pattern.js +1 -0
  31. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/alphanumeric-data.js +1 -0
  32. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/bit-buffer.js +1 -0
  33. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/bit-matrix.js +1 -0
  34. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/byte-data.js +1 -0
  35. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-code.js +1 -0
  36. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-level.js +1 -0
  37. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/finder-pattern.js +1 -0
  38. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/format-info.js +1 -0
  39. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/galois-field.js +1 -0
  40. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/kanji-data.js +2 -0
  41. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mask-pattern.js +1 -0
  42. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mode.js +1 -0
  43. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/numeric-data.js +1 -0
  44. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/polynomial.js +1 -0
  45. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/qrcode.js +4 -0
  46. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/reed-solomon-encoder.js +1 -0
  47. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/regex.js +2 -0
  48. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/segments.js +2 -0
  49. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js +1 -0
  50. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version-check.js +1 -0
  51. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version.js +1 -0
  52. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/canvas.js +1 -0
  53. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/svg-tag.js +2 -0
  54. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js +1 -0
  55. package/dist/es/_virtual/_commonjsHelpers.js +6 -0
  56. package/dist/es/_virtual/alignment-pattern.js +4 -0
  57. package/dist/es/_virtual/browser.js +7 -0
  58. package/dist/es/_virtual/browser2.js +4 -0
  59. package/dist/es/_virtual/canvas.js +4 -0
  60. package/dist/es/_virtual/dijkstra.js +4 -0
  61. package/dist/es/_virtual/error-correction-code.js +4 -0
  62. package/dist/es/_virtual/error-correction-level.js +4 -0
  63. package/dist/es/_virtual/finder-pattern.js +4 -0
  64. package/dist/es/_virtual/format-info.js +4 -0
  65. package/dist/es/_virtual/galois-field.js +4 -0
  66. package/dist/es/_virtual/mask-pattern.js +4 -0
  67. package/dist/es/_virtual/mode.js +4 -0
  68. package/dist/es/_virtual/polynomial.js +4 -0
  69. package/dist/es/_virtual/qrcode.js +4 -0
  70. package/dist/es/_virtual/regex.js +4 -0
  71. package/dist/es/_virtual/segments.js +4 -0
  72. package/dist/es/_virtual/svg-tag.js +4 -0
  73. package/dist/es/_virtual/utils.js +4 -0
  74. package/dist/es/_virtual/utils2.js +4 -0
  75. package/dist/es/_virtual/version-check.js +4 -0
  76. package/dist/es/_virtual/version.js +4 -0
  77. package/dist/es/components/qr-code/index.js +49 -0
  78. package/dist/es/components/react-force-graph-3d/index.d.ts +2 -0
  79. package/dist/es/index.d.ts +2 -0
  80. package/dist/es/index.js +22 -20
  81. package/dist/es/node_modules/.pnpm/dijkstrajs@1.0.3/node_modules/dijkstrajs/dijkstra.js +72 -0
  82. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/browser.js +44 -0
  83. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/can-promise.js +9 -0
  84. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/alignment-pattern.js +26 -0
  85. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/alphanumeric-data.js +73 -0
  86. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/bit-buffer.js +28 -0
  87. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/bit-matrix.js +23 -0
  88. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/byte-data.js +23 -0
  89. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-code.js +362 -0
  90. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-level.js +41 -0
  91. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/finder-pattern.js +22 -0
  92. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/format-info.js +18 -0
  93. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/galois-field.js +24 -0
  94. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/kanji-data.js +36 -0
  95. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mask-pattern.js +102 -0
  96. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mode.js +68 -0
  97. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/numeric-data.js +26 -0
  98. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/polynomial.js +34 -0
  99. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/qrcode.js +154 -0
  100. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/reed-solomon-encoder.js +27 -0
  101. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/regex.js +23 -0
  102. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/segments.js +146 -0
  103. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js +74 -0
  104. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version-check.js +10 -0
  105. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version.js +75 -0
  106. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/canvas.js +32 -0
  107. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/svg-tag.js +32 -0
  108. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js +58 -0
  109. package/package.json +5 -4
@@ -0,0 +1,36 @@
1
+ import { __require as u } from "./mode.js";
2
+ import { __require as h } from "./utils.js";
3
+ var a, n;
4
+ function c() {
5
+ if (n) return a;
6
+ n = 1;
7
+ const o = u(), s = h();
8
+ function r(i) {
9
+ this.mode = o.KANJI, this.data = i;
10
+ }
11
+ return r.getBitsLength = function(e) {
12
+ return e * 13;
13
+ }, r.prototype.getLength = function() {
14
+ return this.data.length;
15
+ }, r.prototype.getBitsLength = function() {
16
+ return r.getBitsLength(this.data.length);
17
+ }, r.prototype.write = function(i) {
18
+ let e;
19
+ for (e = 0; e < this.data.length; e++) {
20
+ let t = s.toSJIS(this.data[e]);
21
+ if (t >= 33088 && t <= 40956)
22
+ t -= 33088;
23
+ else if (t >= 57408 && t <= 60351)
24
+ t -= 49472;
25
+ else
26
+ throw new Error(
27
+ "Invalid SJIS character: " + this.data[e] + `
28
+ Make sure your charset is UTF-8`
29
+ );
30
+ t = (t >>> 8 & 255) * 192 + (t & 255), i.put(t, 13);
31
+ }
32
+ }, a = r, a;
33
+ }
34
+ export {
35
+ c as __require
36
+ };
@@ -0,0 +1,102 @@
1
+ import { __exports as c } from "../../../../../../../_virtual/mask-pattern.js";
2
+ var T;
3
+ function R() {
4
+ return T ? c : (T = 1, function(r) {
5
+ r.Patterns = {
6
+ PATTERN000: 0,
7
+ PATTERN001: 1,
8
+ PATTERN010: 2,
9
+ PATTERN011: 3,
10
+ PATTERN100: 4,
11
+ PATTERN101: 5,
12
+ PATTERN110: 6,
13
+ PATTERN111: 7
14
+ };
15
+ const u = {
16
+ N1: 3,
17
+ N2: 3,
18
+ N3: 40,
19
+ N4: 10
20
+ };
21
+ r.isValid = function(t) {
22
+ return t != null && t !== "" && !isNaN(t) && t >= 0 && t <= 7;
23
+ }, r.from = function(t) {
24
+ return r.isValid(t) ? parseInt(t, 10) : void 0;
25
+ }, r.getPenaltyN1 = function(t) {
26
+ const l = t.size;
27
+ let s = 0, n = 0, e = 0, i = null, o = null;
28
+ for (let f = 0; f < l; f++) {
29
+ n = e = 0, i = o = null;
30
+ for (let N = 0; N < l; N++) {
31
+ let a = t.get(f, N);
32
+ a === i ? n++ : (n >= 5 && (s += u.N1 + (n - 5)), i = a, n = 1), a = t.get(N, f), a === o ? e++ : (e >= 5 && (s += u.N1 + (e - 5)), o = a, e = 1);
33
+ }
34
+ n >= 5 && (s += u.N1 + (n - 5)), e >= 5 && (s += u.N1 + (e - 5));
35
+ }
36
+ return s;
37
+ }, r.getPenaltyN2 = function(t) {
38
+ const l = t.size;
39
+ let s = 0;
40
+ for (let n = 0; n < l - 1; n++)
41
+ for (let e = 0; e < l - 1; e++) {
42
+ const i = t.get(n, e) + t.get(n, e + 1) + t.get(n + 1, e) + t.get(n + 1, e + 1);
43
+ (i === 4 || i === 0) && s++;
44
+ }
45
+ return s * u.N2;
46
+ }, r.getPenaltyN3 = function(t) {
47
+ const l = t.size;
48
+ let s = 0, n = 0, e = 0;
49
+ for (let i = 0; i < l; i++) {
50
+ n = e = 0;
51
+ for (let o = 0; o < l; o++)
52
+ n = n << 1 & 2047 | t.get(i, o), o >= 10 && (n === 1488 || n === 93) && s++, e = e << 1 & 2047 | t.get(o, i), o >= 10 && (e === 1488 || e === 93) && s++;
53
+ }
54
+ return s * u.N3;
55
+ }, r.getPenaltyN4 = function(t) {
56
+ let l = 0;
57
+ const s = t.data.length;
58
+ for (let e = 0; e < s; e++) l += t.data[e];
59
+ return Math.abs(Math.ceil(l * 100 / s / 5) - 10) * u.N4;
60
+ };
61
+ function g(P, t, l) {
62
+ switch (P) {
63
+ case r.Patterns.PATTERN000:
64
+ return (t + l) % 2 === 0;
65
+ case r.Patterns.PATTERN001:
66
+ return t % 2 === 0;
67
+ case r.Patterns.PATTERN010:
68
+ return l % 3 === 0;
69
+ case r.Patterns.PATTERN011:
70
+ return (t + l) % 3 === 0;
71
+ case r.Patterns.PATTERN100:
72
+ return (Math.floor(t / 2) + Math.floor(l / 3)) % 2 === 0;
73
+ case r.Patterns.PATTERN101:
74
+ return t * l % 2 + t * l % 3 === 0;
75
+ case r.Patterns.PATTERN110:
76
+ return (t * l % 2 + t * l % 3) % 2 === 0;
77
+ case r.Patterns.PATTERN111:
78
+ return (t * l % 3 + (t + l) % 2) % 2 === 0;
79
+ default:
80
+ throw new Error("bad maskPattern:" + P);
81
+ }
82
+ }
83
+ r.applyMask = function(t, l) {
84
+ const s = l.size;
85
+ for (let n = 0; n < s; n++)
86
+ for (let e = 0; e < s; e++)
87
+ l.isReserved(e, n) || l.xor(e, n, g(t, e, n));
88
+ }, r.getBestMask = function(t, l) {
89
+ const s = Object.keys(r.Patterns).length;
90
+ let n = 0, e = 1 / 0;
91
+ for (let i = 0; i < s; i++) {
92
+ l(i), r.applyMask(i, t);
93
+ const o = r.getPenaltyN1(t) + r.getPenaltyN2(t) + r.getPenaltyN3(t) + r.getPenaltyN4(t);
94
+ r.applyMask(i, t), o < e && (e = o, n = i);
95
+ }
96
+ return n;
97
+ };
98
+ }(c), c);
99
+ }
100
+ export {
101
+ R as __require
102
+ };
@@ -0,0 +1,68 @@
1
+ import { __exports as c } from "../../../../../../../_virtual/mode.js";
2
+ import { __require as o } from "./version-check.js";
3
+ import { __require as s } from "./regex.js";
4
+ var u;
5
+ function E() {
6
+ return u ? c : (u = 1, function(i) {
7
+ const a = o(), e = s();
8
+ i.NUMERIC = {
9
+ id: "Numeric",
10
+ bit: 1,
11
+ ccBits: [10, 12, 14]
12
+ }, i.ALPHANUMERIC = {
13
+ id: "Alphanumeric",
14
+ bit: 2,
15
+ ccBits: [9, 11, 13]
16
+ }, i.BYTE = {
17
+ id: "Byte",
18
+ bit: 4,
19
+ ccBits: [8, 16, 16]
20
+ }, i.KANJI = {
21
+ id: "Kanji",
22
+ bit: 8,
23
+ ccBits: [8, 10, 12]
24
+ }, i.MIXED = {
25
+ bit: -1
26
+ }, i.getCharCountIndicator = function(r, n) {
27
+ if (!r.ccBits) throw new Error("Invalid mode: " + r);
28
+ if (!a.isValid(n))
29
+ throw new Error("Invalid version: " + n);
30
+ return n >= 1 && n < 10 ? r.ccBits[0] : n < 27 ? r.ccBits[1] : r.ccBits[2];
31
+ }, i.getBestModeForData = function(r) {
32
+ return e.testNumeric(r) ? i.NUMERIC : e.testAlphanumeric(r) ? i.ALPHANUMERIC : e.testKanji(r) ? i.KANJI : i.BYTE;
33
+ }, i.toString = function(r) {
34
+ if (r && r.id) return r.id;
35
+ throw new Error("Invalid mode");
36
+ }, i.isValid = function(r) {
37
+ return r && r.bit && r.ccBits;
38
+ };
39
+ function f(t) {
40
+ if (typeof t != "string")
41
+ throw new Error("Param is not a string");
42
+ switch (t.toLowerCase()) {
43
+ case "numeric":
44
+ return i.NUMERIC;
45
+ case "alphanumeric":
46
+ return i.ALPHANUMERIC;
47
+ case "kanji":
48
+ return i.KANJI;
49
+ case "byte":
50
+ return i.BYTE;
51
+ default:
52
+ throw new Error("Unknown mode: " + t);
53
+ }
54
+ }
55
+ i.from = function(r, n) {
56
+ if (i.isValid(r))
57
+ return r;
58
+ try {
59
+ return f(r);
60
+ } catch {
61
+ return n;
62
+ }
63
+ };
64
+ }(c), c);
65
+ }
66
+ export {
67
+ E as __require
68
+ };
@@ -0,0 +1,26 @@
1
+ import { __require as h } from "./mode.js";
2
+ var u, s;
3
+ function c() {
4
+ if (s) return u;
5
+ s = 1;
6
+ const g = h();
7
+ function t(i) {
8
+ this.mode = g.NUMERIC, this.data = i.toString();
9
+ }
10
+ return t.getBitsLength = function(e) {
11
+ return 10 * Math.floor(e / 3) + (e % 3 ? e % 3 * 3 + 1 : 0);
12
+ }, t.prototype.getLength = function() {
13
+ return this.data.length;
14
+ }, t.prototype.getBitsLength = function() {
15
+ return t.getBitsLength(this.data.length);
16
+ }, t.prototype.write = function(e) {
17
+ let r, n, a;
18
+ for (r = 0; r + 3 <= this.data.length; r += 3)
19
+ n = this.data.substr(r, 3), a = parseInt(n, 10), e.put(a, 10);
20
+ const o = this.data.length - r;
21
+ o > 0 && (n = this.data.substr(r), a = parseInt(n, 10), e.put(a, o * 3 + 1));
22
+ }, u = t, u;
23
+ }
24
+ export {
25
+ c as __require
26
+ };
@@ -0,0 +1,34 @@
1
+ import { __exports as f } from "../../../../../../../_virtual/polynomial.js";
2
+ import { __require as c } from "./galois-field.js";
3
+ var m;
4
+ function y() {
5
+ return m ? f : (m = 1, function(o) {
6
+ const u = c();
7
+ o.mul = function(t, n) {
8
+ const e = new Uint8Array(t.length + n.length - 1);
9
+ for (let r = 0; r < t.length; r++)
10
+ for (let l = 0; l < n.length; l++)
11
+ e[r + l] ^= u.mul(t[r], n[l]);
12
+ return e;
13
+ }, o.mod = function(t, n) {
14
+ let e = new Uint8Array(t);
15
+ for (; e.length - n.length >= 0; ) {
16
+ const r = e[0];
17
+ for (let i = 0; i < n.length; i++)
18
+ e[i] ^= u.mul(n[i], r);
19
+ let l = 0;
20
+ for (; l < e.length && e[l] === 0; ) l++;
21
+ e = e.slice(l);
22
+ }
23
+ return e;
24
+ }, o.generateECPolynomial = function(t) {
25
+ let n = new Uint8Array([1]);
26
+ for (let e = 0; e < t; e++)
27
+ n = o.mul(n, new Uint8Array([1, u.exp(e)]));
28
+ return n;
29
+ };
30
+ }(f), f);
31
+ }
32
+ export {
33
+ y as __require
34
+ };
@@ -0,0 +1,154 @@
1
+ import { __exports as M } from "../../../../../../../_virtual/qrcode.js";
2
+ import { __require as Y } from "./utils.js";
3
+ import { __require as Z } from "./error-correction-level.js";
4
+ import { __require as $ } from "./bit-buffer.js";
5
+ import { __require as x } from "./bit-matrix.js";
6
+ import { __require as v } from "./alignment-pattern.js";
7
+ import { __require as ee } from "./finder-pattern.js";
8
+ import { __require as te } from "./mask-pattern.js";
9
+ import { __require as oe } from "./error-correction-code.js";
10
+ import { __require as re } from "./reed-solomon-encoder.js";
11
+ import { __require as ne } from "./version.js";
12
+ import { __require as se } from "./format-info.js";
13
+ import { __require as ie } from "./mode.js";
14
+ import { __require as ue } from "./segments.js";
15
+ var F;
16
+ function Be() {
17
+ if (F) return M;
18
+ F = 1;
19
+ const g = Y(), q = Z(), A = $(), k = x(), P = v(), D = ee(), _ = te(), h = oe(), V = re(), w = ne(), R = se(), G = ie(), C = ue();
20
+ function Q(r, u) {
21
+ const n = r.size, e = D.getPositions(u);
22
+ for (let c = 0; c < e.length; c++) {
23
+ const t = e[c][0], o = e[c][1];
24
+ for (let i = -1; i <= 7; i++)
25
+ if (!(t + i <= -1 || n <= t + i))
26
+ for (let s = -1; s <= 7; s++)
27
+ o + s <= -1 || n <= o + s || (i >= 0 && i <= 6 && (s === 0 || s === 6) || s >= 0 && s <= 6 && (i === 0 || i === 6) || i >= 2 && i <= 4 && s >= 2 && s <= 4 ? r.set(t + i, o + s, !0, !0) : r.set(t + i, o + s, !1, !0));
28
+ }
29
+ }
30
+ function U(r) {
31
+ const u = r.size;
32
+ for (let n = 8; n < u - 8; n++) {
33
+ const e = n % 2 === 0;
34
+ r.set(n, 6, e, !0), r.set(6, n, e, !0);
35
+ }
36
+ }
37
+ function J(r, u) {
38
+ const n = P.getPositions(u);
39
+ for (let e = 0; e < n.length; e++) {
40
+ const c = n[e][0], t = n[e][1];
41
+ for (let o = -2; o <= 2; o++)
42
+ for (let i = -2; i <= 2; i++)
43
+ o === -2 || o === 2 || i === -2 || i === 2 || o === 0 && i === 0 ? r.set(c + o, t + i, !0, !0) : r.set(c + o, t + i, !1, !0);
44
+ }
45
+ }
46
+ function N(r, u) {
47
+ const n = r.size, e = w.getEncodedBits(u);
48
+ let c, t, o;
49
+ for (let i = 0; i < 18; i++)
50
+ c = Math.floor(i / 3), t = i % 3 + n - 8 - 3, o = (e >> i & 1) === 1, r.set(c, t, o, !0), r.set(t, c, o, !0);
51
+ }
52
+ function b(r, u, n) {
53
+ const e = r.size, c = R.getEncodedBits(u, n);
54
+ let t, o;
55
+ for (t = 0; t < 15; t++)
56
+ o = (c >> t & 1) === 1, t < 6 ? r.set(t, 8, o, !0) : t < 8 ? r.set(t + 1, 8, o, !0) : r.set(e - 15 + t, 8, o, !0), t < 8 ? r.set(8, e - t - 1, o, !0) : t < 9 ? r.set(8, 15 - t - 1 + 1, o, !0) : r.set(8, 15 - t - 1, o, !0);
57
+ r.set(e - 8, 8, 1, !0);
58
+ }
59
+ function L(r, u) {
60
+ const n = r.size;
61
+ let e = -1, c = n - 1, t = 7, o = 0;
62
+ for (let i = n - 1; i > 0; i -= 2)
63
+ for (i === 6 && i--; ; ) {
64
+ for (let s = 0; s < 2; s++)
65
+ if (!r.isReserved(c, i - s)) {
66
+ let a = !1;
67
+ o < u.length && (a = (u[o] >>> t & 1) === 1), r.set(c, i - s, a), t--, t === -1 && (o++, t = 7);
68
+ }
69
+ if (c += e, c < 0 || n <= c) {
70
+ c -= e, e = -e;
71
+ break;
72
+ }
73
+ }
74
+ }
75
+ function j(r, u, n) {
76
+ const e = new A();
77
+ n.forEach(function(s) {
78
+ e.put(s.mode.bit, 4), e.put(s.getLength(), G.getCharCountIndicator(s.mode, r)), s.write(e);
79
+ });
80
+ const c = g.getSymbolTotalCodewords(r), t = h.getTotalCodewordsCount(r, u), o = (c - t) * 8;
81
+ for (e.getLengthInBits() + 4 <= o && e.put(0, 4); e.getLengthInBits() % 8 !== 0; )
82
+ e.putBit(0);
83
+ const i = (o - e.getLengthInBits()) / 8;
84
+ for (let s = 0; s < i; s++)
85
+ e.put(s % 2 ? 17 : 236, 8);
86
+ return H(e, r, u);
87
+ }
88
+ function H(r, u, n) {
89
+ const e = g.getSymbolTotalCodewords(u), c = h.getTotalCodewordsCount(u, n), t = e - c, o = h.getBlocksCount(u, n), i = e % o, s = o - i, a = Math.floor(e / o), m = Math.floor(t / o), O = m + 1, E = a - m, W = new V(E);
90
+ let B = 0;
91
+ const p = new Array(o), z = new Array(o);
92
+ let S = 0;
93
+ const X = new Uint8Array(r.buffer);
94
+ for (let d = 0; d < o; d++) {
95
+ const y = d < s ? m : O;
96
+ p[d] = X.slice(B, B + y), z[d] = W.encode(p[d]), B += y, S = Math.max(S, y);
97
+ }
98
+ const I = new Uint8Array(e);
99
+ let T = 0, f, l;
100
+ for (f = 0; f < S; f++)
101
+ for (l = 0; l < o; l++)
102
+ f < p[l].length && (I[T++] = p[l][f]);
103
+ for (f = 0; f < E; f++)
104
+ for (l = 0; l < o; l++)
105
+ I[T++] = z[l][f];
106
+ return I;
107
+ }
108
+ function K(r, u, n, e) {
109
+ let c;
110
+ if (Array.isArray(r))
111
+ c = C.fromArray(r);
112
+ else if (typeof r == "string") {
113
+ let a = u;
114
+ if (!a) {
115
+ const m = C.rawSplit(r);
116
+ a = w.getBestVersionForData(m, n);
117
+ }
118
+ c = C.fromString(r, a || 40);
119
+ } else
120
+ throw new Error("Invalid data");
121
+ const t = w.getBestVersionForData(c, n);
122
+ if (!t)
123
+ throw new Error("The amount of data is too big to be stored in a QR Code");
124
+ if (!u)
125
+ u = t;
126
+ else if (u < t)
127
+ throw new Error(
128
+ `
129
+ The chosen QR Code version cannot contain this amount of data.
130
+ Minimum version required to store current data is: ` + t + `.
131
+ `
132
+ );
133
+ const o = j(u, n, c), i = g.getSymbolSize(u), s = new k(i);
134
+ return Q(s, u), U(s), J(s, u), b(s, n, 0), u >= 7 && N(s, u), L(s, o), isNaN(e) && (e = _.getBestMask(
135
+ s,
136
+ b.bind(null, s, n)
137
+ )), _.applyMask(e, s), b(s, n, e), {
138
+ modules: s,
139
+ version: u,
140
+ errorCorrectionLevel: n,
141
+ maskPattern: e,
142
+ segments: c
143
+ };
144
+ }
145
+ return M.create = function(u, n) {
146
+ if (typeof u > "u" || u === "")
147
+ throw new Error("No input text");
148
+ let e = q.M, c, t;
149
+ return typeof n < "u" && (e = q.from(n.errorCorrectionLevel, q.M), c = w.from(n.version), t = _.from(n.maskPattern), n.toSJISFunc && g.setToSJISFunction(n.toSJISFunc)), K(u, c, e, t);
150
+ }, M;
151
+ }
152
+ export {
153
+ Be as __require
154
+ };
@@ -0,0 +1,27 @@
1
+ import { __require as h } from "./polynomial.js";
2
+ var o, a;
3
+ function g() {
4
+ if (a) return o;
5
+ a = 1;
6
+ const t = h();
7
+ function n(i) {
8
+ this.genPoly = void 0, this.degree = i, this.degree && this.initialize(this.degree);
9
+ }
10
+ return n.prototype.initialize = function(e) {
11
+ this.degree = e, this.genPoly = t.generateECPolynomial(this.degree);
12
+ }, n.prototype.encode = function(e) {
13
+ if (!this.genPoly)
14
+ throw new Error("Encoder not initialized");
15
+ const d = new Uint8Array(e.length + this.degree);
16
+ d.set(e);
17
+ const r = t.mod(d, this.genPoly), s = this.degree - r.length;
18
+ if (s > 0) {
19
+ const l = new Uint8Array(this.degree);
20
+ return l.set(r, s), l;
21
+ }
22
+ return r;
23
+ }, o = n, o;
24
+ }
25
+ export {
26
+ g as __require
27
+ };
@@ -0,0 +1,23 @@
1
+ import { __exports as e } from "../../../../../../../_virtual/regex.js";
2
+ var s;
3
+ function R() {
4
+ if (s) return e;
5
+ s = 1;
6
+ const n = "[0-9]+", E = "[A-Z $%*+\\-./:]+";
7
+ let u = "(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";
8
+ u = u.replace(/u/g, "\\u");
9
+ const i = "(?:(?![A-Z0-9 $%*+\\-./:]|" + u + `)(?:.|[\r
10
+ ]))+`;
11
+ e.KANJI = new RegExp(u, "g"), e.BYTE_KANJI = new RegExp("[^A-Z0-9 $%*+\\-./:]+", "g"), e.BYTE = new RegExp(i, "g"), e.NUMERIC = new RegExp(n, "g"), e.ALPHANUMERIC = new RegExp(E, "g");
12
+ const c = new RegExp("^" + u + "$"), g = new RegExp("^" + n + "$"), A = new RegExp("^[A-Z0-9 $%*+\\-./:]+$");
13
+ return e.testKanji = function(t) {
14
+ return c.test(t);
15
+ }, e.testNumeric = function(t) {
16
+ return g.test(t);
17
+ }, e.testAlphanumeric = function(t) {
18
+ return A.test(t);
19
+ }, e;
20
+ }
21
+ export {
22
+ R as __require
23
+ };
@@ -0,0 +1,146 @@
1
+ import { __exports as N } from "../../../../../../../_virtual/segments.js";
2
+ import { __require as T } from "./mode.js";
3
+ import { __require as Y } from "./numeric-data.js";
4
+ import { __require as L } from "./alphanumeric-data.js";
5
+ import { __require as y } from "./byte-data.js";
6
+ import { __require as D } from "./kanji-data.js";
7
+ import { __require as j } from "./regex.js";
8
+ import { __require as k } from "./utils.js";
9
+ import { __require as J } from "../../../../../dijkstrajs@1.0.3/node_modules/dijkstrajs/dijkstra.js";
10
+ var b;
11
+ function V() {
12
+ return b ? N : (b = 1, function(m) {
13
+ const r = T(), I = Y(), B = L(), _ = y(), q = D(), c = j(), p = k(), R = J();
14
+ function C(n) {
15
+ return unescape(encodeURIComponent(n)).length;
16
+ }
17
+ function h(n, o, t) {
18
+ const e = [];
19
+ let s;
20
+ for (; (s = n.exec(t)) !== null; )
21
+ e.push({
22
+ data: s[0],
23
+ index: s.index,
24
+ mode: o,
25
+ length: s[0].length
26
+ });
27
+ return e;
28
+ }
29
+ function M(n) {
30
+ const o = h(c.NUMERIC, r.NUMERIC, n), t = h(c.ALPHANUMERIC, r.ALPHANUMERIC, n);
31
+ let e, s;
32
+ return p.isKanjiModeEnabled() ? (e = h(c.BYTE, r.BYTE, n), s = h(c.KANJI, r.KANJI, n)) : (e = h(c.BYTE_KANJI, r.BYTE, n), s = []), o.concat(t, e, s).sort(function(a, l) {
33
+ return a.index - l.index;
34
+ }).map(function(a) {
35
+ return {
36
+ data: a.data,
37
+ mode: a.mode,
38
+ length: a.length
39
+ };
40
+ });
41
+ }
42
+ function E(n, o) {
43
+ switch (o) {
44
+ case r.NUMERIC:
45
+ return I.getBitsLength(n);
46
+ case r.ALPHANUMERIC:
47
+ return B.getBitsLength(n);
48
+ case r.KANJI:
49
+ return q.getBitsLength(n);
50
+ case r.BYTE:
51
+ return _.getBitsLength(n);
52
+ }
53
+ }
54
+ function U(n) {
55
+ return n.reduce(function(o, t) {
56
+ const e = o.length - 1 >= 0 ? o[o.length - 1] : null;
57
+ return e && e.mode === t.mode ? (o[o.length - 1].data += t.data, o) : (o.push(t), o);
58
+ }, []);
59
+ }
60
+ function w(n) {
61
+ const o = [];
62
+ for (let t = 0; t < n.length; t++) {
63
+ const e = n[t];
64
+ switch (e.mode) {
65
+ case r.NUMERIC:
66
+ o.push([
67
+ e,
68
+ { data: e.data, mode: r.ALPHANUMERIC, length: e.length },
69
+ { data: e.data, mode: r.BYTE, length: e.length }
70
+ ]);
71
+ break;
72
+ case r.ALPHANUMERIC:
73
+ o.push([
74
+ e,
75
+ { data: e.data, mode: r.BYTE, length: e.length }
76
+ ]);
77
+ break;
78
+ case r.KANJI:
79
+ o.push([
80
+ e,
81
+ { data: e.data, mode: r.BYTE, length: C(e.data) }
82
+ ]);
83
+ break;
84
+ case r.BYTE:
85
+ o.push([
86
+ { data: e.data, mode: r.BYTE, length: C(e.data) }
87
+ ]);
88
+ }
89
+ }
90
+ return o;
91
+ }
92
+ function K(n, o) {
93
+ const t = {}, e = { start: {} };
94
+ let s = ["start"];
95
+ for (let i = 0; i < n.length; i++) {
96
+ const a = n[i], l = [];
97
+ for (let g = 0; g < a.length; g++) {
98
+ const u = a[g], f = "" + i + g;
99
+ l.push(f), t[f] = { node: u, lastCount: 0 }, e[f] = {};
100
+ for (let A = 0; A < s.length; A++) {
101
+ const d = s[A];
102
+ t[d] && t[d].node.mode === u.mode ? (e[d][f] = E(t[d].lastCount + u.length, u.mode) - E(t[d].lastCount, u.mode), t[d].lastCount += u.length) : (t[d] && (t[d].lastCount = u.length), e[d][f] = E(u.length, u.mode) + 4 + r.getCharCountIndicator(u.mode, o));
103
+ }
104
+ }
105
+ s = l;
106
+ }
107
+ for (let i = 0; i < s.length; i++)
108
+ e[s[i]].end = 0;
109
+ return { map: e, table: t };
110
+ }
111
+ function S(n, o) {
112
+ let t;
113
+ const e = r.getBestModeForData(n);
114
+ if (t = r.from(o, e), t !== r.BYTE && t.bit < e.bit)
115
+ throw new Error('"' + n + '" cannot be encoded with mode ' + r.toString(t) + `.
116
+ Suggested mode is: ` + r.toString(e));
117
+ switch (t === r.KANJI && !p.isKanjiModeEnabled() && (t = r.BYTE), t) {
118
+ case r.NUMERIC:
119
+ return new I(n);
120
+ case r.ALPHANUMERIC:
121
+ return new B(n);
122
+ case r.KANJI:
123
+ return new q(n);
124
+ case r.BYTE:
125
+ return new _(n);
126
+ }
127
+ }
128
+ m.fromArray = function(o) {
129
+ return o.reduce(function(t, e) {
130
+ return typeof e == "string" ? t.push(S(e, null)) : e.data && t.push(S(e.data, e.mode)), t;
131
+ }, []);
132
+ }, m.fromString = function(o, t) {
133
+ const e = M(o, p.isKanjiModeEnabled()), s = w(e), i = K(s, t), a = R.find_path(i.map, "start", "end"), l = [];
134
+ for (let g = 1; g < a.length - 1; g++)
135
+ l.push(i.table[a[g]].node);
136
+ return m.fromArray(U(l));
137
+ }, m.rawSplit = function(o) {
138
+ return m.fromArray(
139
+ M(o, p.isKanjiModeEnabled())
140
+ );
141
+ };
142
+ }(N), N);
143
+ }
144
+ export {
145
+ V as __require
146
+ };
@@ -0,0 +1,74 @@
1
+ import { __exports as n } from "../../../../../../../_virtual/utils.js";
2
+ var r;
3
+ function S() {
4
+ if (r) return n;
5
+ r = 1;
6
+ let e;
7
+ const i = [
8
+ 0,
9
+ // Not used
10
+ 26,
11
+ 44,
12
+ 70,
13
+ 100,
14
+ 134,
15
+ 172,
16
+ 196,
17
+ 242,
18
+ 292,
19
+ 346,
20
+ 404,
21
+ 466,
22
+ 532,
23
+ 581,
24
+ 655,
25
+ 733,
26
+ 815,
27
+ 901,
28
+ 991,
29
+ 1085,
30
+ 1156,
31
+ 1258,
32
+ 1364,
33
+ 1474,
34
+ 1588,
35
+ 1706,
36
+ 1828,
37
+ 1921,
38
+ 2051,
39
+ 2185,
40
+ 2323,
41
+ 2465,
42
+ 2611,
43
+ 2761,
44
+ 2876,
45
+ 3034,
46
+ 3196,
47
+ 3362,
48
+ 3532,
49
+ 3706
50
+ ];
51
+ return n.getSymbolSize = function(t) {
52
+ if (!t) throw new Error('"version" cannot be null or undefined');
53
+ if (t < 1 || t > 40) throw new Error('"version" should be in range from 1 to 40');
54
+ return t * 4 + 17;
55
+ }, n.getSymbolTotalCodewords = function(t) {
56
+ return i[t];
57
+ }, n.getBCHDigit = function(o) {
58
+ let t = 0;
59
+ for (; o !== 0; )
60
+ t++, o >>>= 1;
61
+ return t;
62
+ }, n.setToSJISFunction = function(t) {
63
+ if (typeof t != "function")
64
+ throw new Error('"toSJISFunc" is not a valid function.');
65
+ e = t;
66
+ }, n.isKanjiModeEnabled = function() {
67
+ return typeof e < "u";
68
+ }, n.toSJIS = function(t) {
69
+ return e(t);
70
+ }, n;
71
+ }
72
+ export {
73
+ S as __require
74
+ };