@genai-fi/nanogpt 0.5.6 → 0.6.1

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 (116) hide show
  1. package/dist/Generator.js +10 -9
  2. package/dist/NanoGPTModel.js +70 -121
  3. package/dist/RealDiv-7xu-pkZN.js +540 -0
  4. package/dist/Reshape-BYC1oUku.js +127 -0
  5. package/dist/TeachableLLM.d.ts +2 -0
  6. package/dist/TeachableLLM.js +42 -34
  7. package/dist/{TiedEmbedding-8S8xn8e6.js → TiedEmbedding-C1HBot-5.js} +12 -13
  8. package/dist/{axis_util-BczFISHz.js → axis_util-CCNL7jea.js} +14 -12
  9. package/dist/{broadcast_to-B7NGsBSh.js → broadcast_to-CddAF879.js} +2 -2
  10. package/dist/{concat-DdKPyAtw.js → concat-XOK9ANZu.js} +7 -7
  11. package/dist/{dataset-iqT4Otvb.js → dataset-BFFipD1c.js} +5 -5
  12. package/dist/{dropout-B09InSJS.js → dropout-xlKRoJyU.js} +9 -9
  13. package/dist/{gather-D6MsdXqc.js → gather-DKtUaTtA.js} +1 -1
  14. package/dist/gpgpu_math-B_ycgZ4W.js +3115 -0
  15. package/dist/{index-Du-bmOP8.js → index-CamYe_M8.js} +844 -647
  16. package/dist/{kernel_funcs_utils-DShm7-0k.js → kernel_funcs_utils-D5MS0JFg.js} +232 -136
  17. package/dist/layers/BaseLayer.js +2 -2
  18. package/dist/layers/CausalSelfAttention.js +6 -6
  19. package/dist/layers/MLP.js +5 -5
  20. package/dist/layers/RMSNorm.js +3 -3
  21. package/dist/layers/RoPECache.js +13 -33
  22. package/dist/layers/TiedEmbedding.js +6 -7
  23. package/dist/layers/TransformerBlock.js +1 -1
  24. package/dist/{log_sum_exp-CxfBtUaG.js → log_sum_exp-CV_5-TTu.js} +15 -15
  25. package/dist/main.js +24 -20
  26. package/dist/{mat_mul-CbiqIe2d.js → mat_mul-CAbRFWUj.js} +4 -4
  27. package/dist/{max-0Xnlpv8k.js → max-JBBv7aUf.js} +3 -3
  28. package/dist/mulmat_packed_gpu-DW4doKL_.js +71 -0
  29. package/dist/{norm-01kY9I2B.js → norm-B9dQTFYn.js} +12 -12
  30. package/dist/{ones-CrutWGas.js → ones-CMHNqMr6.js} +2 -2
  31. package/dist/ops/appendCache.js +3 -3
  32. package/dist/ops/attentionMask.js +1 -1
  33. package/dist/ops/cpu/appendCache.js +2 -2
  34. package/dist/ops/cpu/attentionMask.js +5 -5
  35. package/dist/ops/cpu/fusedSoftmax.js +2 -2
  36. package/dist/ops/cpu/gatherSub.js +5 -5
  37. package/dist/ops/cpu/gelu.js +1 -1
  38. package/dist/ops/cpu/matMulGelu.js +1 -1
  39. package/dist/ops/cpu/matMulMul.js +1 -1
  40. package/dist/ops/cpu/mulDropout.js +1 -1
  41. package/dist/ops/cpu/normRMS.js +1 -1
  42. package/dist/ops/cpu/qkv.js +3 -3
  43. package/dist/ops/cpu/rope.js +5 -5
  44. package/dist/ops/cpu/scatterSub.js +18 -49
  45. package/dist/ops/fusedSoftmax.js +1 -1
  46. package/dist/ops/gatherSub.js +1 -1
  47. package/dist/ops/gelu.js +1 -1
  48. package/dist/ops/grads/attentionMask.js +15 -11
  49. package/dist/ops/grads/fusedSoftmax.js +12 -10
  50. package/dist/ops/grads/gelu.js +1 -1
  51. package/dist/ops/grads/matMulGelu.js +1 -1
  52. package/dist/ops/grads/normRMS.js +1 -1
  53. package/dist/ops/grads/qkv.js +1 -1
  54. package/dist/ops/grads/rope.js +1 -1
  55. package/dist/ops/log.d.ts +0 -0
  56. package/dist/ops/log.js +1 -0
  57. package/dist/ops/matMulGelu.js +1 -1
  58. package/dist/ops/matMulMul.js +1 -1
  59. package/dist/ops/mulDrop.js +1 -1
  60. package/dist/ops/node/sparseCrossEntropy.js +1 -1
  61. package/dist/ops/normRMS.js +1 -1
  62. package/dist/ops/qkv.js +1 -1
  63. package/dist/ops/rope.js +8 -4
  64. package/dist/ops/scatterSub.js +1 -1
  65. package/dist/ops/webgl/appendCache.js +1 -1
  66. package/dist/ops/webgl/attentionMask.js +1 -1
  67. package/dist/ops/webgl/fusedSoftmax.js +31 -3379
  68. package/dist/ops/webgl/gatherSub.js +1 -1
  69. package/dist/ops/webgl/gelu.js +2 -2
  70. package/dist/{gpgpu_math-BFbOyvk4.js → ops/webgl/log.d.ts} +2 -8
  71. package/dist/ops/webgl/log.js +39 -0
  72. package/dist/ops/webgl/matMulGelu.js +48 -115
  73. package/dist/ops/webgl/matMulMul.js +1 -1
  74. package/dist/ops/webgl/mulDropout.js +1 -1
  75. package/dist/ops/webgl/normRMS.js +2 -2
  76. package/dist/ops/webgl/qkv.js +1 -1
  77. package/dist/ops/webgl/rope.js +1 -1
  78. package/dist/ops/webgl/scatterSub.js +1 -1
  79. package/dist/{ops-CJNniCAV.js → ops-DqtYemmV.js} +143 -135
  80. package/dist/{random_width-C-v-35bY.js → random_width-CLMQG5Jn.js} +6925 -6291
  81. package/dist/{range-Bvs1hidm.js → range-DqYjKnuG.js} +1 -1
  82. package/dist/reciprocal-z49filta.js +25 -0
  83. package/dist/register_all_kernels-COt6wLD0.js +21397 -0
  84. package/dist/{reshape-BH7eBpwq.js → reshape-C45vIIRU.js} +1 -1
  85. package/dist/scatter_nd_util-qgtnviTE.js +46 -0
  86. package/dist/selu_util-4QV_GXTB.js +740 -0
  87. package/dist/shared-ByfrGA97.js +3199 -0
  88. package/dist/{sin-CPAZXNjH.js → sin-9JBrfVaB.js} +1 -1
  89. package/dist/{softmax-DhWoBa7r.js → softmax-DvMvui-_.js} +1 -1
  90. package/dist/{split-BCUhuU7B.js → split-DxrHrPFK.js} +4 -4
  91. package/dist/{stack-BV1v7l3S.js → stack-DgaoDmnF.js} +1 -1
  92. package/dist/{sum-Cvq06317.js → sum-BpcpxNEh.js} +3 -3
  93. package/dist/{tensor-DgTOPY6h.js → tensor-CDz5x1mP.js} +1 -1
  94. package/dist/{tensor2d-CRWjDyUe.js → tensor2d-jO8JY5Jd.js} +1 -1
  95. package/dist/training/AdamExt.js +1 -1
  96. package/dist/training/DatasetBuilder.js +2 -2
  97. package/dist/training/FullTrainer.js +1 -1
  98. package/dist/training/Trainer.js +3 -3
  99. package/dist/training/sparseCrossEntropy.js +4 -4
  100. package/dist/utilities/dummy.d.ts +6 -0
  101. package/dist/utilities/dummy.js +31 -10
  102. package/dist/utilities/generate.js +3 -3
  103. package/dist/utilities/load.d.ts +25 -0
  104. package/dist/utilities/load.js +89 -37
  105. package/dist/utilities/profile.d.ts +5 -0
  106. package/dist/utilities/profile.js +12 -9
  107. package/dist/utilities/safetensors.d.ts +3 -0
  108. package/dist/utilities/safetensors.js +83 -0
  109. package/dist/utilities/save.js +47 -29
  110. package/dist/utilities/weights.js +2 -2
  111. package/dist/{variable-DZ3fF0R2.js → variable-CLVXjN7F.js} +1 -1
  112. package/dist/{zeros-BaHhQTWf.js → zeros-DUkkVccu.js} +8 -8
  113. package/package.json +3 -9
  114. package/dist/Reshape-Biok_3X1.js +0 -212
  115. package/dist/slice_util-DskXqRZa.js +0 -49
  116. package/dist/tfjs_backend-D9Ytje0G.js +0 -1010
@@ -1,16 +1,16 @@
1
- import { o as h, j as l, E as f, az as hn, l as p, aA as fn, Q as w, aB as dn, aC as bn, aD as gn, L as $n, ak as xn, u as j, aE as kn, aF as yn, aG as In, aH as _n, aI as En, aJ as Mn, aK as Nn, D, aL as An, aM as Tn, aN as Sn, aO as wn, I as zn, J as Bn, K as qn, aP as Kn, t as Gn, aQ as J, aR as Rn, aS as Dn, aT as Pn, aU as Vn, aV as vn, aW as jn, f as Fn, aX as Wn, aY as On, b as k, a8 as Z, al as G, g as Yn, s as S, aZ as Cn, y as L, a as Jn } from "./index-Du-bmOP8.js";
2
- import { r as _ } from "./reshape-BH7eBpwq.js";
3
- import { s as un } from "./split-BCUhuU7B.js";
4
- import { s as q } from "./sum-Cvq06317.js";
5
- import { b as X } from "./broadcast_to-B7NGsBSh.js";
6
- import { r as O } from "./range-Bvs1hidm.js";
7
- import { t as Ln } from "./tensor-DgTOPY6h.js";
8
- import { s as Y } from "./stack-BV1v7l3S.js";
9
- import { c as Xn, z as Qn } from "./zeros-BaHhQTWf.js";
10
- import { n as ln } from "./norm-01kY9I2B.js";
11
- import { c as Q } from "./concat-DdKPyAtw.js";
12
- import { m as T } from "./mat_mul-CbiqIe2d.js";
13
- import { t as H } from "./tensor2d-CRWjDyUe.js";
1
+ import { q as h, w as l, E as f, aO as hn, k as p, aP as fn, j as w, aQ as bn, aR as dn, aS as gn, J as $n, ah as xn, C as j, aT as kn, aU as yn, aV as In, aW as _n, aX as En, aY as Nn, aZ as Mn, N as V, a_ as An, a$ as Tn, b0 as Sn, aK as wn, V as zn, Q as qn, U as Bn, b1 as Kn, t as Rn, b2 as J, b3 as Gn, b4 as Vn, b5 as Dn, b6 as Pn, b7 as vn, b8 as jn, f as Fn, b9 as Wn, ba as On, b as k, a7 as Z, aj as R, g as Yn, s as S, bb as Cn, I as L, a as Jn } from "./index-CamYe_M8.js";
2
+ import { r as _ } from "./reshape-C45vIIRU.js";
3
+ import { s as un } from "./split-DxrHrPFK.js";
4
+ import { s as B } from "./sum-BpcpxNEh.js";
5
+ import { b as X } from "./broadcast_to-CddAF879.js";
6
+ import { r as O } from "./range-DqYjKnuG.js";
7
+ import { t as Ln } from "./tensor-CDz5x1mP.js";
8
+ import { s as Y } from "./stack-DgaoDmnF.js";
9
+ import { c as Xn, z as Qn } from "./zeros-DUkkVccu.js";
10
+ import { n as ln } from "./norm-B9dQTFYn.js";
11
+ import { c as Q } from "./concat-XOK9ANZu.js";
12
+ import { m as T } from "./mat_mul-CAbRFWUj.js";
13
+ import { t as U } from "./tensor2d-jO8JY5Jd.js";
14
14
  /**
15
15
  * @license
16
16
  * Copyright 2018 Google LLC. All Rights Reserved.
@@ -27,14 +27,14 @@ import { t as H } from "./tensor2d-CRWjDyUe.js";
27
27
  * limitations under the License.
28
28
  * =============================================================================
29
29
  */
30
- function Hn(r, t, n) {
30
+ function Un(r, t, n) {
31
31
  const e = l(r, "x", "slice", "string_or_numeric");
32
32
  if (e.rank === 0)
33
33
  throw new Error("Slicing scalar is not possible");
34
34
  const s = { x: e }, a = { begin: t, size: n };
35
35
  return f.runKernel(hn, s, a);
36
36
  }
37
- const M = /* @__PURE__ */ h({ slice_: Hn });
37
+ const N = /* @__PURE__ */ h({ slice_: Un });
38
38
  /**
39
39
  * @license
40
40
  * Copyright 2020 Google LLC. All Rights Reserved.
@@ -57,7 +57,7 @@ function Zn(r, t, n) {
57
57
  const a = { x: e, weights: s }, o = { size: n };
58
58
  return f.runKernel(fn, a, o);
59
59
  }
60
- const Un = /* @__PURE__ */ h({ bincount_: Zn });
60
+ const Hn = /* @__PURE__ */ h({ bincount_: Zn });
61
61
  /**
62
62
  * @license
63
63
  * Copyright 2020 Google LLC. All Rights Reserved.
@@ -75,14 +75,14 @@ const Un = /* @__PURE__ */ h({ bincount_: Zn });
75
75
  * =============================================================================
76
76
  */
77
77
  function ne(r, t, n) {
78
- const e = l(t, "a", "where"), s = l(n, "b", "where"), a = l(r, "condition", "where", "bool"), o = w(w(a.shape, e.shape), s.shape), i = X(a, o), u = X(e, o), c = X(s, o), d = {
78
+ const e = l(t, "a", "where"), s = l(n, "b", "where"), a = l(r, "condition", "where", "bool"), o = w(w(a.shape, e.shape), s.shape), i = X(a, o), u = X(e, o), c = X(s, o), b = {
79
79
  condition: i,
80
80
  t: u,
81
81
  e: c
82
82
  };
83
- return f.runKernel(dn, d);
83
+ return f.runKernel(bn, b);
84
84
  }
85
- const R = /* @__PURE__ */ h({ where_: ne });
85
+ const G = /* @__PURE__ */ h({ where_: ne });
86
86
  /**
87
87
  * @license
88
88
  * Copyright 2021 Google LLC. All Rights Reserved.
@@ -101,7 +101,7 @@ const R = /* @__PURE__ */ h({ where_: ne });
101
101
  */
102
102
  function ee(r, ...t) {
103
103
  const n = t.map((s, a) => l(s, `tensors${a}`, "einsum")), e = { equation: r };
104
- return f.runKernel(bn, n, e);
104
+ return f.runKernel(dn, n, e);
105
105
  }
106
106
  const v = /* @__PURE__ */ h({ einsum_: ee });
107
107
  /**
@@ -211,7 +211,7 @@ function oe(r, t) {
211
211
  const s = { a: n, b: e };
212
212
  return f.runKernel(kn, s);
213
213
  }
214
- const U = /* @__PURE__ */ h({ greater_: oe });
214
+ const H = /* @__PURE__ */ h({ greater_: oe });
215
215
  /**
216
216
  * @license
217
217
  * Copyright 2020 Google LLC. All Rights Reserved.
@@ -320,7 +320,7 @@ const pn = /* @__PURE__ */ h({ lessEqual_: me });
320
320
  */
321
321
  function he(r) {
322
322
  const n = { x: l(r, "x", "neg") };
323
- return f.runKernel(Mn, n);
323
+ return f.runKernel(Nn, n);
324
324
  }
325
325
  const nn = /* @__PURE__ */ h({ neg_: he });
326
326
  /**
@@ -343,9 +343,9 @@ function fe(r, t) {
343
343
  const n = l(r, "a", "logicalAnd", "bool"), e = l(t, "b", "logicalAnd", "bool");
344
344
  w(n.shape, e.shape);
345
345
  const s = { a: n, b: e };
346
- return f.runKernel(Nn, s);
346
+ return f.runKernel(Mn, s);
347
347
  }
348
- const de = /* @__PURE__ */ h({ logicalAnd_: fe });
348
+ const be = /* @__PURE__ */ h({ logicalAnd_: fe });
349
349
  /**
350
350
  * @license
351
351
  * Copyright 2020 Google LLC. All Rights Reserved.
@@ -362,13 +362,13 @@ const de = /* @__PURE__ */ h({ logicalAnd_: fe });
362
362
  * limitations under the License.
363
363
  * =============================================================================
364
364
  */
365
- function be(r, t) {
365
+ function de(r, t) {
366
366
  let n = l(r, "a", "minimum"), e = l(t, "b", "minimum");
367
- [n, e] = j(n, e), n.dtype === "bool" && (n = D(n, "int32"), e = D(e, "int32")), w(n.shape, e.shape);
367
+ [n, e] = j(n, e), n.dtype === "bool" && (n = V(n, "int32"), e = V(e, "int32")), w(n.shape, e.shape);
368
368
  const s = { a: n, b: e };
369
369
  return f.runKernel(An, s);
370
370
  }
371
- const rn = /* @__PURE__ */ h({ minimum_: be });
371
+ const rn = /* @__PURE__ */ h({ minimum_: de });
372
372
  /**
373
373
  * @license
374
374
  * Copyright 2020 Google LLC. All Rights Reserved.
@@ -448,12 +448,12 @@ const Ie = /* @__PURE__ */ h({ squeeze_: ye });
448
448
  * limitations under the License.
449
449
  * =============================================================================
450
450
  */
451
- function N(r, t) {
451
+ function M(r, t) {
452
452
  zn(r);
453
- const n = Bn(r, t);
453
+ const n = qn(r, t);
454
454
  if (n.length !== 1)
455
455
  throw new Error("tensor1d() requires values to be a flat/TypedArray");
456
- return qn(r, null, n, t);
456
+ return Bn(r, null, n, t);
457
457
  }
458
458
  /**
459
459
  * @license
@@ -501,7 +501,7 @@ function Ee(r, t, n) {
501
501
  }), e.rank <= 1)
502
502
  return e.clone();
503
503
  const s = { x: e }, a = { perm: t };
504
- return e.dtype === "complex64" ? Gn(() => {
504
+ return e.dtype === "complex64" ? Rn(() => {
505
505
  let o = $e(e), i = le(e);
506
506
  return o = f.runKernel(J, { x: o }, a), i = f.runKernel(J, { x: i }, a), n && (i = nn(i)), Xn(o, i);
507
507
  }) : f.runKernel(J, s, a);
@@ -523,13 +523,13 @@ const an = /* @__PURE__ */ h({ transpose_: Ee });
523
523
  * limitations under the License.
524
524
  * =============================================================================
525
525
  */
526
- function Me(r, t, n, e, s = "bilinear", a = 0) {
526
+ function Ne(r, t, n, e, s = "bilinear", a = 0) {
527
527
  const o = l(r, "image", "cropAndResize"), i = l(t, "boxes", "cropAndResize", "float32"), u = l(n, "boxInd", "cropAndResize", "int32"), c = i.shape[0];
528
528
  p(o.rank === 4, () => `Error in cropAndResize: image must be rank 4,but got rank ${o.rank}.`), p(i.rank === 2 && i.shape[1] === 4, () => `Error in cropAndResize: boxes must be have size [${c},4] but had shape ${i.shape}.`), p(u.rank === 1 && u.shape[0] === c, () => `Error in cropAndResize: boxInd must be have size [${c}] but had shape ${i.shape}.`), p(e.length === 2, () => `Error in cropAndResize: cropSize must be of length 2, but got length ${e.length}.`), p(e[0] >= 1 && e[1] >= 1, () => `cropSize must be atleast [1,1], but was ${e}`), p(s === "bilinear" || s === "nearest", () => `method must be bilinear or nearest, but was ${s}`);
529
- const d = { image: o, boxes: i, boxInd: u }, m = { method: s, extrapolationValue: a, cropSize: e };
530
- return f.runKernel(Rn, d, m);
529
+ const b = { image: o, boxes: i, boxInd: u }, m = { method: s, extrapolationValue: a, cropSize: e };
530
+ return f.runKernel(Gn, b, m);
531
531
  }
532
- const Ne = /* @__PURE__ */ h({ cropAndResize_: Me });
532
+ const Me = /* @__PURE__ */ h({ cropAndResize_: Ne });
533
533
  /**
534
534
  * @license
535
535
  * Copyright 2020 Google LLC. All Rights Reserved.
@@ -550,7 +550,7 @@ function Ae(r) {
550
550
  const t = l(r, "image", "flipLeftRight", "float32");
551
551
  p(t.rank === 4, () => `Error in flipLeftRight: image must be rank 4,but got rank ${t.rank}.`);
552
552
  const n = { image: t };
553
- return f.runKernel(Dn, n, {});
553
+ return f.runKernel(Vn, n, {});
554
554
  }
555
555
  const Te = /* @__PURE__ */ h({ flipLeftRight_: Ae });
556
556
  /**
@@ -595,7 +595,7 @@ const we = /* @__PURE__ */ h({ grayscaleToRGB_: Se });
595
595
  function ze(r) {
596
596
  const t = l(r, "image", "RGBToGrayscale"), n = t.rank - 1, e = t.shape[n];
597
597
  p(t.rank >= 2, () => `Error in RGBToGrayscale: images must be at least rank 2, but got rank ${t.rank}.`), p(e === 3, () => `Error in RGBToGrayscale: last dimension of an RGB image should be size 3, but got size ${e}.`);
598
- const s = t.dtype, a = D(t, "float32"), o = N([0.2989, 0.587, 0.114]);
598
+ const s = t.dtype, a = V(t, "float32"), o = M([0.2989, 0.587, 0.114]);
599
599
  let i;
600
600
  switch (t.rank) {
601
601
  case 2:
@@ -616,9 +616,9 @@ function ze(r) {
616
616
  default:
617
617
  throw new Error("Not a valid tensor rank.");
618
618
  }
619
- return i = K(i, -1), D(i, s);
619
+ return i = K(i, -1), V(i, s);
620
620
  }
621
- const Be = /* @__PURE__ */ h({ rgbToGrayscale_: ze });
621
+ const qe = /* @__PURE__ */ h({ rgbToGrayscale_: ze });
622
622
  /**
623
623
  * @license
624
624
  * Copyright 2020 Google LLC. All Rights Reserved.
@@ -635,13 +635,13 @@ const Be = /* @__PURE__ */ h({ rgbToGrayscale_: ze });
635
635
  * limitations under the License.
636
636
  * =============================================================================
637
637
  */
638
- function qe(r, t, n = 0, e = 0.5) {
638
+ function Be(r, t, n = 0, e = 0.5) {
639
639
  const s = l(r, "image", "rotateWithOffset", "float32");
640
640
  p(s.rank === 4, () => `Error in rotateWithOffset: image must be rank 4,but got rank ${s.rank}.`);
641
641
  const a = { image: s }, o = { radians: t, fillValue: n, center: e };
642
- return f.runKernel(Pn, a, o);
642
+ return f.runKernel(Dn, a, o);
643
643
  }
644
- const Ke = /* @__PURE__ */ h({ rotateWithOffset_: qe });
644
+ const Ke = /* @__PURE__ */ h({ rotateWithOffset_: Be });
645
645
  /**
646
646
  * @license
647
647
  * Copyright 2020 Google LLC. All Rights Reserved.
@@ -658,7 +658,7 @@ const Ke = /* @__PURE__ */ h({ rotateWithOffset_: qe });
658
658
  * limitations under the License.
659
659
  * =============================================================================
660
660
  */
661
- function P(r, t, n, e, s, a) {
661
+ function D(r, t, n, e, s, a) {
662
662
  e == null && (e = 0.5), s == null && (s = Number.NEGATIVE_INFINITY), a == null && (a = 0);
663
663
  const o = r.shape[0];
664
664
  return n = Math.min(n, o), p(0 <= e && e <= 1, () => `iouThreshold must be in [0, 1], but was '${e}'`), p(r.rank === 2, () => `boxes must be a 2D tensor, but was of rank '${r.rank}'`), p(r.shape[1] === 4, () => `boxes must have 4 columns, but 2nd dimension was ${r.shape[1]}`), p(t.rank === 1, () => "scores must be a 1D tensor"), p(t.shape[0] === o, () => `scores has incompatible shape with boxes. Expected ${o}, but was ${t.shape[0]}`), p(0 <= a && a <= 1, () => `softNmsSigma must be in [0, 1], but was '${a}'`), { maxOutputSize: n, iouThreshold: e, scoreThreshold: s, softNmsSigma: a };
@@ -679,13 +679,13 @@ function P(r, t, n, e, s, a) {
679
679
  * limitations under the License.
680
680
  * =============================================================================
681
681
  */
682
- function Ge(r, t, n, e = 0.5, s = Number.NEGATIVE_INFINITY) {
683
- const a = l(r, "boxes", "nonMaxSuppression", "float32"), o = l(t, "scores", "nonMaxSuppression", "float32"), i = P(a, o, n, e, s);
682
+ function Re(r, t, n, e = 0.5, s = Number.NEGATIVE_INFINITY) {
683
+ const a = l(r, "boxes", "nonMaxSuppression", "float32"), o = l(t, "scores", "nonMaxSuppression", "float32"), i = D(a, o, n, e, s);
684
684
  n = i.maxOutputSize, e = i.iouThreshold, s = i.scoreThreshold;
685
685
  const u = { maxOutputSize: n, iouThreshold: e, scoreThreshold: s };
686
- return f.runKernel(Vn, { boxes: a, scores: o }, u);
686
+ return f.runKernel(Pn, { boxes: a, scores: o }, u);
687
687
  }
688
- const Re = /* @__PURE__ */ h({ nonMaxSuppression_: Ge });
688
+ const Ge = /* @__PURE__ */ h({ nonMaxSuppression_: Re });
689
689
  /**
690
690
  * @license
691
691
  * Copyright 2019 Google LLC. All Rights Reserved.
@@ -702,14 +702,14 @@ const Re = /* @__PURE__ */ h({ nonMaxSuppression_: Ge });
702
702
  * limitations under the License.
703
703
  * =============================================================================
704
704
  */
705
- function De(r, t, n) {
706
- const e = Pe(r, t, n), s = e < 0 ? -(e + 1) : e;
705
+ function Ve(r, t, n) {
706
+ const e = De(r, t, n), s = e < 0 ? -(e + 1) : e;
707
707
  r.splice(s, 0, t);
708
708
  }
709
- function Pe(r, t, n) {
710
- return ve(r, t, n || Ve);
709
+ function De(r, t, n) {
710
+ return ve(r, t, n || Pe);
711
711
  }
712
- function Ve(r, t) {
712
+ function Pe(r, t) {
713
713
  return r > t ? 1 : r < t ? -1 : 0;
714
714
  }
715
715
  function ve(r, t, n) {
@@ -776,25 +776,25 @@ function We(r, t, n, e, s, a) {
776
776
  }
777
777
  function en(r, t, n, e, s, a, o = !1, i = !1, u = !1) {
778
778
  const c = [];
779
- for (let b = 0; b < t.length; b++)
780
- t[b] > s && c.push({ score: t[b], boxIndex: b, suppressBeginIndex: 0 });
779
+ for (let d = 0; d < t.length; d++)
780
+ t[d] > s && c.push({ score: t[d], boxIndex: d, suppressBeginIndex: 0 });
781
781
  c.sort(on);
782
- const d = a > 0 ? -0.5 / a : 0, m = [], $ = [];
782
+ const b = a > 0 ? -0.5 / a : 0, m = [], $ = [];
783
783
  for (; m.length < n && c.length > 0; ) {
784
- const b = c.pop(), { score: E, boxIndex: I, suppressBeginIndex: A } = b;
784
+ const d = c.pop(), { score: E, boxIndex: I, suppressBeginIndex: A } = d;
785
785
  if (E < s)
786
786
  break;
787
787
  let z = !1;
788
- for (let B = m.length - 1; B >= A; --B) {
789
- const V = Oe(r, I, m[B]);
790
- if (V >= e) {
788
+ for (let q = m.length - 1; q >= A; --q) {
789
+ const P = Oe(r, I, m[q]);
790
+ if (P >= e) {
791
791
  z = !0;
792
792
  break;
793
793
  }
794
- if (b.score = b.score * Ye(e, d, V), b.score <= s)
794
+ if (d.score = d.score * Ye(e, b, P), d.score <= s)
795
795
  break;
796
796
  }
797
- b.suppressBeginIndex = m.length, z || (b.score === E ? (m.push(I), $.push(b.score)) : b.score > s && De(c, b, on));
797
+ d.suppressBeginIndex = m.length, z || (d.score === E ? (m.push(I), $.push(d.score)) : d.score > s && Ve(c, d, on));
798
798
  }
799
799
  const g = m.length, x = n - g;
800
800
  i && x > 0 && (m.push(...new Array(x).fill(0)), $.push(...new Array(x).fill(0)));
@@ -802,10 +802,10 @@ function en(r, t, n, e, s, a, o = !1, i = !1, u = !1) {
802
802
  return o && (y.selectedScores = $), u && (y.validOutputs = g), y;
803
803
  }
804
804
  function Oe(r, t, n) {
805
- const e = r.subarray(t * 4, t * 4 + 4), s = r.subarray(n * 4, n * 4 + 4), a = Math.min(e[0], e[2]), o = Math.min(e[1], e[3]), i = Math.max(e[0], e[2]), u = Math.max(e[1], e[3]), c = Math.min(s[0], s[2]), d = Math.min(s[1], s[3]), m = Math.max(s[0], s[2]), $ = Math.max(s[1], s[3]), g = (i - a) * (u - o), x = (m - c) * ($ - d);
805
+ const e = r.subarray(t * 4, t * 4 + 4), s = r.subarray(n * 4, n * 4 + 4), a = Math.min(e[0], e[2]), o = Math.min(e[1], e[3]), i = Math.max(e[0], e[2]), u = Math.max(e[1], e[3]), c = Math.min(s[0], s[2]), b = Math.min(s[1], s[3]), m = Math.max(s[0], s[2]), $ = Math.max(s[1], s[3]), g = (i - a) * (u - o), x = (m - c) * ($ - b);
806
806
  if (g <= 0 || x <= 0)
807
807
  return 0;
808
- const y = Math.max(a, c), b = Math.max(o, d), E = Math.min(i, m), I = Math.min(u, $), A = Math.max(E - y, 0) * Math.max(I - b, 0);
808
+ const y = Math.max(a, c), d = Math.max(o, b), E = Math.min(i, m), I = Math.min(u, $), A = Math.max(E - y, 0) * Math.max(I - d, 0);
809
809
  return A / (g + x - A);
810
810
  }
811
811
  function Ye(r, t, n) {
@@ -832,10 +832,10 @@ function on(r, t) {
832
832
  * =============================================================================
833
833
  */
834
834
  async function Ce(r, t, n, e = 0.5, s = Number.NEGATIVE_INFINITY) {
835
- const a = l(r, "boxes", "nonMaxSuppressionAsync"), o = l(t, "scores", "nonMaxSuppressionAsync"), i = P(a, o, n, e, s);
835
+ const a = l(r, "boxes", "nonMaxSuppressionAsync"), o = l(t, "scores", "nonMaxSuppressionAsync"), i = D(a, o, n, e, s);
836
836
  n = i.maxOutputSize, e = i.iouThreshold, s = i.scoreThreshold;
837
- const u = await Promise.all([a.data(), o.data()]), c = u[0], d = u[1], { selectedIndices: m } = je(c, d, n, e, s);
838
- return a !== r && a.dispose(), o !== t && o.dispose(), N(m, "int32");
837
+ const u = await Promise.all([a.data(), o.data()]), c = u[0], b = u[1], { selectedIndices: m } = je(c, b, n, e, s);
838
+ return a !== r && a.dispose(), o !== t && o.dispose(), M(m, "int32");
839
839
  }
840
840
  const Je = Ce;
841
841
  /**
@@ -855,9 +855,9 @@ const Je = Ce;
855
855
  * =============================================================================
856
856
  */
857
857
  function Le(r, t, n, e = 0.5, s = Number.NEGATIVE_INFINITY, a = 0) {
858
- const o = l(r, "boxes", "nonMaxSuppression"), i = l(t, "scores", "nonMaxSuppression"), u = P(o, i, n, e, s, a);
858
+ const o = l(r, "boxes", "nonMaxSuppression"), i = l(t, "scores", "nonMaxSuppression"), u = D(o, i, n, e, s, a);
859
859
  n = u.maxOutputSize, e = u.iouThreshold, s = u.scoreThreshold, a = u.softNmsSigma;
860
- const c = { boxes: o, scores: i }, d = { maxOutputSize: n, iouThreshold: e, scoreThreshold: s, softNmsSigma: a }, m = f.runKernel(vn, c, d);
860
+ const c = { boxes: o, scores: i }, b = { maxOutputSize: n, iouThreshold: e, scoreThreshold: s, softNmsSigma: a }, m = f.runKernel(vn, c, b);
861
861
  return { selectedIndices: m[0], selectedScores: m[1] };
862
862
  }
863
863
  const Xe = /* @__PURE__ */ h({ nonMaxSuppressionWithScore_: Le });
@@ -878,15 +878,15 @@ const Xe = /* @__PURE__ */ h({ nonMaxSuppressionWithScore_: Le });
878
878
  * =============================================================================
879
879
  */
880
880
  async function Qe(r, t, n, e = 0.5, s = Number.NEGATIVE_INFINITY, a = 0) {
881
- const o = l(r, "boxes", "nonMaxSuppressionAsync"), i = l(t, "scores", "nonMaxSuppressionAsync"), u = P(o, i, n, e, s, a);
881
+ const o = l(r, "boxes", "nonMaxSuppressionAsync"), i = l(t, "scores", "nonMaxSuppressionAsync"), u = D(o, i, n, e, s, a);
882
882
  n = u.maxOutputSize, e = u.iouThreshold, s = u.scoreThreshold, a = u.softNmsSigma;
883
- const c = await Promise.all([o.data(), i.data()]), d = c[0], m = c[1], { selectedIndices: $, selectedScores: g } = We(d, m, n, e, s, a);
883
+ const c = await Promise.all([o.data(), i.data()]), b = c[0], m = c[1], { selectedIndices: $, selectedScores: g } = We(b, m, n, e, s, a);
884
884
  return o !== r && o.dispose(), i !== t && i.dispose(), {
885
- selectedIndices: N($, "int32"),
886
- selectedScores: N(g)
885
+ selectedIndices: M($, "int32"),
886
+ selectedScores: M(g)
887
887
  };
888
888
  }
889
- const He = Qe;
889
+ const Ue = Qe;
890
890
  /**
891
891
  * @license
892
892
  * Copyright 2020 Google LLC. All Rights Reserved.
@@ -904,7 +904,7 @@ const He = Qe;
904
904
  * =============================================================================
905
905
  */
906
906
  function Ze(r, t, n, e = 0.5, s = Number.NEGATIVE_INFINITY, a = !1) {
907
- const o = l(r, "boxes", "nonMaxSuppression"), i = l(t, "scores", "nonMaxSuppression"), u = P(
907
+ const o = l(r, "boxes", "nonMaxSuppression"), i = l(t, "scores", "nonMaxSuppression"), u = D(
908
908
  o,
909
909
  i,
910
910
  n,
@@ -912,15 +912,15 @@ function Ze(r, t, n, e = 0.5, s = Number.NEGATIVE_INFINITY, a = !1) {
912
912
  s,
913
913
  null
914
914
  /* softNmsSigma */
915
- ), c = u.maxOutputSize, d = u.iouThreshold, m = u.scoreThreshold, $ = { boxes: o, scores: i }, g = {
915
+ ), c = u.maxOutputSize, b = u.iouThreshold, m = u.scoreThreshold, $ = { boxes: o, scores: i }, g = {
916
916
  maxOutputSize: c,
917
- iouThreshold: d,
917
+ iouThreshold: b,
918
918
  scoreThreshold: m,
919
919
  padToMaxOutputSize: a
920
920
  }, x = f.runKernel(jn, $, g);
921
921
  return { selectedIndices: x[0], validOutputs: x[1] };
922
922
  }
923
- const Ue = /* @__PURE__ */ h({ nonMaxSuppressionPadded_: Ze });
923
+ const He = /* @__PURE__ */ h({ nonMaxSuppressionPadded_: Ze });
924
924
  /**
925
925
  * @license
926
926
  * Copyright 2020 Google LLC. All Rights Reserved.
@@ -938,7 +938,7 @@ const Ue = /* @__PURE__ */ h({ nonMaxSuppressionPadded_: Ze });
938
938
  * =============================================================================
939
939
  */
940
940
  async function ns(r, t, n, e = 0.5, s = Number.NEGATIVE_INFINITY, a = !1) {
941
- const o = l(r, "boxes", "nonMaxSuppressionAsync"), i = l(t, "scores", "nonMaxSuppressionAsync"), u = P(
941
+ const o = l(r, "boxes", "nonMaxSuppressionAsync"), i = l(t, "scores", "nonMaxSuppressionAsync"), u = D(
942
942
  o,
943
943
  i,
944
944
  n,
@@ -946,9 +946,9 @@ async function ns(r, t, n, e = 0.5, s = Number.NEGATIVE_INFINITY, a = !1) {
946
946
  s,
947
947
  null
948
948
  /* softNmsSigma */
949
- ), c = u.maxOutputSize, d = u.iouThreshold, m = u.scoreThreshold, [$, g] = await Promise.all([o.data(), i.data()]), { selectedIndices: x, validOutputs: y } = Fe($, g, c, d, m, a);
949
+ ), c = u.maxOutputSize, b = u.iouThreshold, m = u.scoreThreshold, [$, g] = await Promise.all([o.data(), i.data()]), { selectedIndices: x, validOutputs: y } = Fe($, g, c, b, m, a);
950
950
  return o !== r && o.dispose(), i !== t && i.dispose(), {
951
- selectedIndices: N(x, "int32"),
951
+ selectedIndices: M(x, "int32"),
952
952
  validOutputs: Fn(y, "int32")
953
953
  };
954
954
  }
@@ -1021,32 +1021,32 @@ const as = /* @__PURE__ */ h({ resizeNearestNeighbor_: rs });
1021
1021
  */
1022
1022
  function os(r, t = "binary", n = !1, e = 0.5) {
1023
1023
  const s = l(r, "image", "threshold"), a = 0.2989, o = 0.587, i = 0.114, u = s.shape[0] * s.shape[1];
1024
- let c = k(N([e]), 255), d, m, $, g;
1024
+ let c = k(M([e]), 255), b, m, $, g;
1025
1025
  if (p(s.rank === 3, () => `Error in threshold: image must be rank 3,but got rank ${s.rank}.`), p(s.shape[2] === 3 || s.shape[2] === 1, () => `Error in threshold: image color channel must be equal to 3 or 1but got ${s.shape[2]}.`), p(s.dtype === "int32" || s.dtype === "float32", () => `Error in dtype: image dtype must be int32 or float32,but got dtype ${s.dtype}.`), p(t === "otsu" || t === "binary", () => `Method must be binary or otsu, but was ${t}`), s.shape[2] === 3) {
1026
- [d, m, $] = un(s, [1, 1, 1], -1);
1027
- const b = k(d, a), E = k(m, o), I = k($, i);
1028
- g = Z(Z(b, E), I);
1026
+ [b, m, $] = un(s, [1, 1, 1], -1);
1027
+ const d = k(b, a), E = k(m, o), I = k($, i);
1028
+ g = Z(Z(d, E), I);
1029
1029
  } else
1030
1030
  g = r;
1031
1031
  if (t === "otsu") {
1032
- const b = Un(D(ke(g), "int32"), Ln([]), 256);
1033
- c = is(b, u);
1032
+ const d = Hn(V(ke(g), "int32"), Ln([]), 256);
1033
+ c = is(d, u);
1034
1034
  }
1035
- const x = n ? pn(g, c) : U(g, c);
1036
- return D(k(x, 255), "int32");
1035
+ const x = n ? pn(g, c) : H(g, c);
1036
+ return V(k(x, 255), "int32");
1037
1037
  }
1038
1038
  function is(r, t) {
1039
- let n = N([-1]), e = N([0]), s = N([0]), a, o, i, u, c, d;
1039
+ let n = M([-1]), e = M([0]), s = M([0]), a, o, i, u, c, b;
1040
1040
  for (let m = 0; m < r.size - 1; m++) {
1041
- a = M(r, 0, m + 1), o = M(r, m + 1), c = G(q(a), t), d = G(q(o), t);
1042
- const $ = q(k(a, O(0, a.size)));
1043
- i = G($, q(a));
1041
+ a = N(r, 0, m + 1), o = N(r, m + 1), c = R(B(a), t), b = R(B(o), t);
1042
+ const $ = B(k(a, O(0, a.size)));
1043
+ i = R($, B(a));
1044
1044
  const g = Yn(o.shape, a.size), x = Z(O(0, o.size), g), y = k(o, x);
1045
- u = G(q(y), q(o));
1046
- const b = S(i, u), E = S(i, u), I = k(c, d);
1047
- s = k(k(I, b), E);
1048
- const A = U(s, e);
1049
- e = R(A, s, e), n = R(A, N([m]), n);
1045
+ u = R(B(y), B(o));
1046
+ const d = S(i, u), E = S(i, u), I = k(c, b);
1047
+ s = k(k(I, d), E);
1048
+ const A = H(s, e);
1049
+ e = G(A, s, e), n = G(A, M([m]), n);
1050
1050
  }
1051
1051
  return n;
1052
1052
  }
@@ -1095,9 +1095,9 @@ function ps(r, t, n) {
1095
1095
  p(e.rank >= 2, () => `bandPart(): Rank must be at least 2, got ${e.rank}.`);
1096
1096
  const s = e.shape, [a, o] = e.shape.slice(-2);
1097
1097
  let i, u;
1098
- typeof t == "number" ? (p(t % 1 === 0, () => `bandPart(): numLower must be an integer, got ${t}.`), p(t <= a, () => `bandPart(): numLower (${t}) must not be greater than the number of rows (${a}).`), i = l(t < 0 ? a : t, "numLower", "bandPart")) : (p(t.dtype === "int32", () => "bandPart(): numLower's dtype must be an int32."), i = R(tn(t, 0), a, rn(t, a))), typeof n == "number" ? (p(n % 1 === 0, () => `bandPart(): numUpper must be an integer, got ${n}.`), p(n <= o, () => `bandPart(): numUpper (${n}) must not be greater than the number of columns (${o}).`), u = l(n < 0 ? o : n, "numUpper", "bandPart")) : (p(n.dtype === "int32", () => "bandPart(): numUpper's dtype must be an int32."), u = R(tn(n, 0), o, rn(n, o)));
1099
- const c = _(O(0, a, 1, "int32"), [-1, 1]), d = O(0, o, 1, "int32"), m = S(c, d), $ = de(pn(m, i), ce(m, nn(u))), g = Qn([a, o], e.dtype);
1100
- return _(Y(mn(_(e, [-1, a, o])).map((x) => R($, x, g))), s);
1098
+ typeof t == "number" ? (p(t % 1 === 0, () => `bandPart(): numLower must be an integer, got ${t}.`), p(t <= a, () => `bandPart(): numLower (${t}) must not be greater than the number of rows (${a}).`), i = l(t < 0 ? a : t, "numLower", "bandPart")) : (p(t.dtype === "int32", () => "bandPart(): numLower's dtype must be an int32."), i = G(tn(t, 0), a, rn(t, a))), typeof n == "number" ? (p(n % 1 === 0, () => `bandPart(): numUpper must be an integer, got ${n}.`), p(n <= o, () => `bandPart(): numUpper (${n}) must not be greater than the number of columns (${o}).`), u = l(n < 0 ? o : n, "numUpper", "bandPart")) : (p(n.dtype === "int32", () => "bandPart(): numUpper's dtype must be an int32."), u = G(tn(n, 0), o, rn(n, o)));
1099
+ const c = _(O(0, a, 1, "int32"), [-1, 1]), b = O(0, o, 1, "int32"), m = S(c, b), $ = be(pn(m, i), ce(m, nn(u))), g = Qn([a, o], e.dtype);
1100
+ return _(Y(mn(_(e, [-1, a, o])).map((x) => G($, x, g))), s);
1101
1101
  }
1102
1102
  const ms = /* @__PURE__ */ h({ bandPart_: ps });
1103
1103
  /**
@@ -1132,10 +1132,10 @@ function hs(r) {
1132
1132
  let a = e[s];
1133
1133
  if (s > 0)
1134
1134
  for (let o = 0; o < s; ++o) {
1135
- const i = k(q(k(n[o], a)), n[o]);
1135
+ const i = k(B(k(n[o], a)), n[o]);
1136
1136
  a = S(a, i);
1137
1137
  }
1138
- return G(a, ln(a, "euclidean"));
1138
+ return R(a, ln(a, "euclidean"));
1139
1139
  }));
1140
1140
  return t ? Y(n, 0) : n;
1141
1141
  }
@@ -1156,7 +1156,7 @@ const fs = /* @__PURE__ */ h({ gramSchmidt_: hs });
1156
1156
  * limitations under the License.
1157
1157
  * =============================================================================
1158
1158
  */
1159
- function ds(r, t = !1) {
1159
+ function bs(r, t = !1) {
1160
1160
  if (p(r.rank >= 2, () => `qr() requires input tensor to have a rank >= 2, but got rank ${r.rank}`), r.rank === 2)
1161
1161
  return cn(r, t);
1162
1162
  {
@@ -1166,8 +1166,8 @@ function ds(r, t = !1) {
1166
1166
  r.shape[r.shape.length - 1]
1167
1167
  ]), 0), s = [], a = [];
1168
1168
  e.forEach((u) => {
1169
- const [c, d] = cn(u, t);
1170
- s.push(c), a.push(d);
1169
+ const [c, b] = cn(u, t);
1170
+ s.push(c), a.push(b);
1171
1171
  });
1172
1172
  const o = _(Y(s, 0), r.shape), i = _(Y(a, 0), r.shape);
1173
1173
  return [o, i];
@@ -1178,38 +1178,38 @@ function cn(r, t = !1) {
1178
1178
  p(r.shape.length === 2, () => `qr2d() requires a 2D Tensor, but got a ${r.shape.length}D Tensor.`);
1179
1179
  const n = r.shape[0], e = r.shape[1];
1180
1180
  let s = ae(n), a = L(r);
1181
- const o = H([[1]], [1, 1]);
1181
+ const o = U([[1]], [1, 1]);
1182
1182
  let i = L(o);
1183
1183
  const u = n >= e ? e : n;
1184
1184
  for (let c = 0; c < u; ++c) {
1185
- const d = a, m = i, $ = s;
1185
+ const b = a, m = i, $ = s;
1186
1186
  [i, a, s] = f.tidy(() => {
1187
- const g = M(a, [c, c], [n - c, 1]), x = ln(g), y = M(a, [c, c], [1, 1]), b = R(U(y, 0), H([[-1]]), H([[1]])), E = S(y, k(b, x)), I = G(g, E);
1187
+ const g = N(a, [c, c], [n - c, 1]), x = ln(g), y = N(a, [c, c], [1, 1]), d = G(H(y, 0), U([[-1]]), U([[1]])), E = S(y, k(d, x)), I = R(g, E);
1188
1188
  I.shape[0] === 1 ? i = L(o) : i = Q([
1189
1189
  o,
1190
- M(I, [1, 0], [I.shape[0] - 1, I.shape[1]])
1190
+ N(I, [1, 0], [I.shape[0] - 1, I.shape[1]])
1191
1191
  ], 0);
1192
- const A = nn(G(T(b, E), x)), z = M(a, [c, 0], [n - c, e]), B = k(A, i), V = an(i);
1192
+ const A = nn(R(T(d, E), x)), z = N(a, [c, 0], [n - c, e]), q = k(A, i), P = an(i);
1193
1193
  if (c === 0)
1194
- a = S(z, T(B, T(V, z)));
1194
+ a = S(z, T(q, T(P, z)));
1195
1195
  else {
1196
- const C = S(z, T(B, T(V, z)));
1197
- a = Q([M(a, [0, 0], [c, e]), C], 0);
1196
+ const C = S(z, T(q, T(P, z)));
1197
+ a = Q([N(a, [0, 0], [c, e]), C], 0);
1198
1198
  }
1199
- const sn = an(B), F = M(s, [0, c], [n, s.shape[1] - c]);
1199
+ const sn = an(q), F = N(s, [0, c], [n, s.shape[1] - c]);
1200
1200
  if (c === 0)
1201
1201
  s = S(F, T(T(F, i), sn));
1202
1202
  else {
1203
1203
  const C = S(F, T(T(F, i), sn));
1204
- s = Q([M(s, [0, 0], [n, c]), C], 1);
1204
+ s = Q([N(s, [0, 0], [n, c]), C], 1);
1205
1205
  }
1206
1206
  return [i, a, s];
1207
- }), Jn([d, m, $]);
1207
+ }), Jn([b, m, $]);
1208
1208
  }
1209
- return !t && n > e && (s = M(s, [0, 0], [n, e]), a = M(a, [0, 0], [e, e])), [s, a];
1209
+ return !t && n > e && (s = N(s, [0, 0], [n, e]), a = N(a, [0, 0], [e, e])), [s, a];
1210
1210
  });
1211
1211
  }
1212
- const bs = /* @__PURE__ */ h({ qr_: ds });
1212
+ const ds = /* @__PURE__ */ h({ qr_: bs });
1213
1213
  /**
1214
1214
  * @license
1215
1215
  * Copyright 2020 Google LLC. All Rights Reserved.
@@ -1231,39 +1231,47 @@ const ws = {
1231
1231
  grayscaleToRGB: we,
1232
1232
  resizeNearestNeighbor: as,
1233
1233
  resizeBilinear: ts,
1234
- rgbToGrayscale: Be,
1234
+ rgbToGrayscale: qe,
1235
1235
  rotateWithOffset: Ke,
1236
- cropAndResize: Ne,
1237
- nonMaxSuppression: Re,
1236
+ cropAndResize: Me,
1237
+ nonMaxSuppression: Ge,
1238
1238
  nonMaxSuppressionAsync: Je,
1239
1239
  nonMaxSuppressionWithScore: Xe,
1240
- nonMaxSuppressionWithScoreAsync: He,
1241
- nonMaxSuppressionPadded: Ue,
1240
+ nonMaxSuppressionWithScoreAsync: Ue,
1241
+ nonMaxSuppressionPadded: He,
1242
1242
  nonMaxSuppressionPaddedAsync: es,
1243
1243
  threshold: cs,
1244
1244
  transform: ls
1245
1245
  }, zs = {
1246
1246
  bandPart: ms,
1247
1247
  gramSchmidt: fs,
1248
- qr: bs
1248
+ qr: ds
1249
1249
  };
1250
1250
  export {
1251
- W as a,
1252
- an as b,
1253
- de as c,
1254
- pn as d,
1255
- ae as e,
1256
- U as f,
1251
+ be as a,
1252
+ pn as b,
1253
+ an as c,
1254
+ W as d,
1255
+ H as e,
1256
+ tn as f,
1257
1257
  ce as g,
1258
- tn as h,
1259
- K as i,
1258
+ K as h,
1259
+ ae as i,
1260
1260
  Ie as j,
1261
1261
  ws as k,
1262
1262
  zs as l,
1263
1263
  rn as m,
1264
1264
  nn as n,
1265
- M as s,
1266
- N as t,
1265
+ le as o,
1266
+ ts as p,
1267
+ as as q,
1268
+ $e as r,
1269
+ N as s,
1270
+ M as t,
1267
1271
  mn as u,
1268
- R as w
1272
+ ke as v,
1273
+ G as w,
1274
+ je as x,
1275
+ Fe as y,
1276
+ We as z
1269
1277
  };