@medplum/agent 5.0.12 → 5.0.13

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 (2) hide show
  1. package/dist/cjs/index.cjs +687 -645
  2. package/package.json +5 -5
@@ -535,7 +535,7 @@ var require_utf32 = __commonJS({
535
535
  return this.decoder.end();
536
536
  };
537
537
  function detectEncoding(bufs, defaultEncoding) {
538
- var b2 = [];
538
+ var b3 = [];
539
539
  var charsProcessed = 0;
540
540
  var invalidLE = 0;
541
541
  var invalidBE = 0;
@@ -545,21 +545,21 @@ var require_utf32 = __commonJS({
545
545
  for (var i = 0; i < bufs.length; i++) {
546
546
  var buf = bufs[i];
547
547
  for (var j2 = 0; j2 < buf.length; j2++) {
548
- b2.push(buf[j2]);
549
- if (b2.length === 4) {
548
+ b3.push(buf[j2]);
549
+ if (b3.length === 4) {
550
550
  if (charsProcessed === 0) {
551
- if (b2[0] === 255 && b2[1] === 254 && b2[2] === 0 && b2[3] === 0) {
551
+ if (b3[0] === 255 && b3[1] === 254 && b3[2] === 0 && b3[3] === 0) {
552
552
  return "utf-32le";
553
553
  }
554
- if (b2[0] === 0 && b2[1] === 0 && b2[2] === 254 && b2[3] === 255) {
554
+ if (b3[0] === 0 && b3[1] === 0 && b3[2] === 254 && b3[3] === 255) {
555
555
  return "utf-32be";
556
556
  }
557
557
  }
558
- if (b2[0] !== 0 || b2[1] > 16) invalidBE++;
559
- if (b2[3] !== 0 || b2[2] > 16) invalidLE++;
560
- if (b2[0] === 0 && b2[1] === 0 && (b2[2] !== 0 || b2[3] !== 0)) bmpCharsBE++;
561
- if ((b2[0] !== 0 || b2[1] !== 0) && b2[2] === 0 && b2[3] === 0) bmpCharsLE++;
562
- b2.length = 0;
558
+ if (b3[0] !== 0 || b3[1] > 16) invalidBE++;
559
+ if (b3[3] !== 0 || b3[2] > 16) invalidLE++;
560
+ if (b3[0] === 0 && b3[1] === 0 && (b3[2] !== 0 || b3[3] !== 0)) bmpCharsBE++;
561
+ if ((b3[0] !== 0 || b3[1] !== 0) && b3[2] === 0 && b3[3] === 0) bmpCharsLE++;
562
+ b3.length = 0;
563
563
  charsProcessed++;
564
564
  if (charsProcessed >= 100) {
565
565
  break outerLoop;
@@ -686,7 +686,7 @@ var require_utf16 = __commonJS({
686
686
  return this.decoder.end();
687
687
  };
688
688
  function detectEncoding(bufs, defaultEncoding) {
689
- var b2 = [];
689
+ var b3 = [];
690
690
  var charsProcessed = 0;
691
691
  var asciiCharsLE = 0;
692
692
  var asciiCharsBE = 0;
@@ -694,15 +694,15 @@ var require_utf16 = __commonJS({
694
694
  for (var i = 0; i < bufs.length; i++) {
695
695
  var buf = bufs[i];
696
696
  for (var j2 = 0; j2 < buf.length; j2++) {
697
- b2.push(buf[j2]);
698
- if (b2.length === 2) {
697
+ b3.push(buf[j2]);
698
+ if (b3.length === 2) {
699
699
  if (charsProcessed === 0) {
700
- if (b2[0] === 255 && b2[1] === 254) return "utf-16le";
701
- if (b2[0] === 254 && b2[1] === 255) return "utf-16be";
700
+ if (b3[0] === 255 && b3[1] === 254) return "utf-16le";
701
+ if (b3[0] === 254 && b3[1] === 255) return "utf-16be";
702
702
  }
703
- if (b2[0] === 0 && b2[1] !== 0) asciiCharsBE++;
704
- if (b2[0] !== 0 && b2[1] === 0) asciiCharsLE++;
705
- b2.length = 0;
703
+ if (b3[0] === 0 && b3[1] !== 0) asciiCharsBE++;
704
+ if (b3[0] !== 0 && b3[1] === 0) asciiCharsLE++;
705
+ b3.length = 0;
706
706
  charsProcessed++;
707
707
  if (charsProcessed >= 100) {
708
708
  break outerLoop;
@@ -3872,7 +3872,7 @@ var require_re = __commonJS({
3872
3872
  var src = exports2.src = [];
3873
3873
  var safeSrc = exports2.safeSrc = [];
3874
3874
  var t = exports2.t = {};
3875
- var R2 = 0;
3875
+ var R3 = 0;
3876
3876
  var LETTERDASHNUMBER = "[a-zA-Z0-9-]";
3877
3877
  var safeRegexReplacements = [
3878
3878
  ["\\s", 1],
@@ -3887,7 +3887,7 @@ var require_re = __commonJS({
3887
3887
  };
3888
3888
  var createToken = (name, value, isGlobal) => {
3889
3889
  const safe = makeSafeRegex(value);
3890
- const index = R2++;
3890
+ const index = R3++;
3891
3891
  debug(name, index, value);
3892
3892
  t[name] = index;
3893
3893
  src[index] = value;
@@ -3968,19 +3968,19 @@ var require_identifiers = __commonJS({
3968
3968
  "node_modules/semver/internal/identifiers.js"(exports2, module2) {
3969
3969
  "use strict";
3970
3970
  var numeric = /^[0-9]+$/;
3971
- var compareIdentifiers = (a, b2) => {
3972
- if (typeof a === "number" && typeof b2 === "number") {
3973
- return a === b2 ? 0 : a < b2 ? -1 : 1;
3971
+ var compareIdentifiers = (a, b3) => {
3972
+ if (typeof a === "number" && typeof b3 === "number") {
3973
+ return a === b3 ? 0 : a < b3 ? -1 : 1;
3974
3974
  }
3975
3975
  const anum = numeric.test(a);
3976
- const bnum = numeric.test(b2);
3976
+ const bnum = numeric.test(b3);
3977
3977
  if (anum && bnum) {
3978
3978
  a = +a;
3979
- b2 = +b2;
3979
+ b3 = +b3;
3980
3980
  }
3981
- return a === b2 ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b2 ? -1 : 1;
3981
+ return a === b3 ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b3 ? -1 : 1;
3982
3982
  };
3983
- var rcompareIdentifiers = (a, b2) => compareIdentifiers(b2, a);
3983
+ var rcompareIdentifiers = (a, b3) => compareIdentifiers(b3, a);
3984
3984
  module2.exports = {
3985
3985
  compareIdentifiers,
3986
3986
  rcompareIdentifiers
@@ -4112,18 +4112,18 @@ var require_semver = __commonJS({
4112
4112
  let i = 0;
4113
4113
  do {
4114
4114
  const a = this.prerelease[i];
4115
- const b2 = other.prerelease[i];
4116
- debug("prerelease compare", i, a, b2);
4117
- if (a === void 0 && b2 === void 0) {
4115
+ const b3 = other.prerelease[i];
4116
+ debug("prerelease compare", i, a, b3);
4117
+ if (a === void 0 && b3 === void 0) {
4118
4118
  return 0;
4119
- } else if (b2 === void 0) {
4119
+ } else if (b3 === void 0) {
4120
4120
  return 1;
4121
4121
  } else if (a === void 0) {
4122
4122
  return -1;
4123
- } else if (a === b2) {
4123
+ } else if (a === b3) {
4124
4124
  continue;
4125
4125
  } else {
4126
- return compareIdentifiers(a, b2);
4126
+ return compareIdentifiers(a, b3);
4127
4127
  }
4128
4128
  } while (++i);
4129
4129
  }
@@ -4134,18 +4134,18 @@ var require_semver = __commonJS({
4134
4134
  let i = 0;
4135
4135
  do {
4136
4136
  const a = this.build[i];
4137
- const b2 = other.build[i];
4138
- debug("build compare", i, a, b2);
4139
- if (a === void 0 && b2 === void 0) {
4137
+ const b3 = other.build[i];
4138
+ debug("build compare", i, a, b3);
4139
+ if (a === void 0 && b3 === void 0) {
4140
4140
  return 0;
4141
- } else if (b2 === void 0) {
4141
+ } else if (b3 === void 0) {
4142
4142
  return 1;
4143
4143
  } else if (a === void 0) {
4144
4144
  return -1;
4145
- } else if (a === b2) {
4145
+ } else if (a === b3) {
4146
4146
  continue;
4147
4147
  } else {
4148
- return compareIdentifiers(a, b2);
4148
+ return compareIdentifiers(a, b3);
4149
4149
  }
4150
4150
  } while (++i);
4151
4151
  }
@@ -4431,7 +4431,7 @@ var require_compare = __commonJS({
4431
4431
  "node_modules/semver/functions/compare.js"(exports2, module2) {
4432
4432
  "use strict";
4433
4433
  var SemVer = require_semver();
4434
- var compare = (a, b2, loose) => new SemVer(a, loose).compare(new SemVer(b2, loose));
4434
+ var compare = (a, b3, loose) => new SemVer(a, loose).compare(new SemVer(b3, loose));
4435
4435
  module2.exports = compare;
4436
4436
  }
4437
4437
  });
@@ -4441,7 +4441,7 @@ var require_rcompare = __commonJS({
4441
4441
  "node_modules/semver/functions/rcompare.js"(exports2, module2) {
4442
4442
  "use strict";
4443
4443
  var compare = require_compare();
4444
- var rcompare = (a, b2, loose) => compare(b2, a, loose);
4444
+ var rcompare = (a, b3, loose) => compare(b3, a, loose);
4445
4445
  module2.exports = rcompare;
4446
4446
  }
4447
4447
  });
@@ -4451,7 +4451,7 @@ var require_compare_loose = __commonJS({
4451
4451
  "node_modules/semver/functions/compare-loose.js"(exports2, module2) {
4452
4452
  "use strict";
4453
4453
  var compare = require_compare();
4454
- var compareLoose = (a, b2) => compare(a, b2, true);
4454
+ var compareLoose = (a, b3) => compare(a, b3, true);
4455
4455
  module2.exports = compareLoose;
4456
4456
  }
4457
4457
  });
@@ -4461,9 +4461,9 @@ var require_compare_build = __commonJS({
4461
4461
  "node_modules/semver/functions/compare-build.js"(exports2, module2) {
4462
4462
  "use strict";
4463
4463
  var SemVer = require_semver();
4464
- var compareBuild = (a, b2, loose) => {
4464
+ var compareBuild = (a, b3, loose) => {
4465
4465
  const versionA = new SemVer(a, loose);
4466
- const versionB = new SemVer(b2, loose);
4466
+ const versionB = new SemVer(b3, loose);
4467
4467
  return versionA.compare(versionB) || versionA.compareBuild(versionB);
4468
4468
  };
4469
4469
  module2.exports = compareBuild;
@@ -4475,7 +4475,7 @@ var require_sort = __commonJS({
4475
4475
  "node_modules/semver/functions/sort.js"(exports2, module2) {
4476
4476
  "use strict";
4477
4477
  var compareBuild = require_compare_build();
4478
- var sort = (list, loose) => list.sort((a, b2) => compareBuild(a, b2, loose));
4478
+ var sort = (list, loose) => list.sort((a, b3) => compareBuild(a, b3, loose));
4479
4479
  module2.exports = sort;
4480
4480
  }
4481
4481
  });
@@ -4485,7 +4485,7 @@ var require_rsort = __commonJS({
4485
4485
  "node_modules/semver/functions/rsort.js"(exports2, module2) {
4486
4486
  "use strict";
4487
4487
  var compareBuild = require_compare_build();
4488
- var rsort = (list, loose) => list.sort((a, b2) => compareBuild(b2, a, loose));
4488
+ var rsort = (list, loose) => list.sort((a, b3) => compareBuild(b3, a, loose));
4489
4489
  module2.exports = rsort;
4490
4490
  }
4491
4491
  });
@@ -4495,7 +4495,7 @@ var require_gt = __commonJS({
4495
4495
  "node_modules/semver/functions/gt.js"(exports2, module2) {
4496
4496
  "use strict";
4497
4497
  var compare = require_compare();
4498
- var gt = (a, b2, loose) => compare(a, b2, loose) > 0;
4498
+ var gt = (a, b3, loose) => compare(a, b3, loose) > 0;
4499
4499
  module2.exports = gt;
4500
4500
  }
4501
4501
  });
@@ -4505,7 +4505,7 @@ var require_lt = __commonJS({
4505
4505
  "node_modules/semver/functions/lt.js"(exports2, module2) {
4506
4506
  "use strict";
4507
4507
  var compare = require_compare();
4508
- var lt4 = (a, b2, loose) => compare(a, b2, loose) < 0;
4508
+ var lt4 = (a, b3, loose) => compare(a, b3, loose) < 0;
4509
4509
  module2.exports = lt4;
4510
4510
  }
4511
4511
  });
@@ -4515,7 +4515,7 @@ var require_eq = __commonJS({
4515
4515
  "node_modules/semver/functions/eq.js"(exports2, module2) {
4516
4516
  "use strict";
4517
4517
  var compare = require_compare();
4518
- var eq = (a, b2, loose) => compare(a, b2, loose) === 0;
4518
+ var eq = (a, b3, loose) => compare(a, b3, loose) === 0;
4519
4519
  module2.exports = eq;
4520
4520
  }
4521
4521
  });
@@ -4525,7 +4525,7 @@ var require_neq = __commonJS({
4525
4525
  "node_modules/semver/functions/neq.js"(exports2, module2) {
4526
4526
  "use strict";
4527
4527
  var compare = require_compare();
4528
- var neq = (a, b2, loose) => compare(a, b2, loose) !== 0;
4528
+ var neq = (a, b3, loose) => compare(a, b3, loose) !== 0;
4529
4529
  module2.exports = neq;
4530
4530
  }
4531
4531
  });
@@ -4535,7 +4535,7 @@ var require_gte = __commonJS({
4535
4535
  "node_modules/semver/functions/gte.js"(exports2, module2) {
4536
4536
  "use strict";
4537
4537
  var compare = require_compare();
4538
- var gte = (a, b2, loose) => compare(a, b2, loose) >= 0;
4538
+ var gte = (a, b3, loose) => compare(a, b3, loose) >= 0;
4539
4539
  module2.exports = gte;
4540
4540
  }
4541
4541
  });
@@ -4545,7 +4545,7 @@ var require_lte = __commonJS({
4545
4545
  "node_modules/semver/functions/lte.js"(exports2, module2) {
4546
4546
  "use strict";
4547
4547
  var compare = require_compare();
4548
- var lte = (a, b2, loose) => compare(a, b2, loose) <= 0;
4548
+ var lte = (a, b3, loose) => compare(a, b3, loose) <= 0;
4549
4549
  module2.exports = lte;
4550
4550
  }
4551
4551
  });
@@ -4560,38 +4560,38 @@ var require_cmp = __commonJS({
4560
4560
  var gte = require_gte();
4561
4561
  var lt4 = require_lt();
4562
4562
  var lte = require_lte();
4563
- var cmp = (a, op, b2, loose) => {
4563
+ var cmp = (a, op, b3, loose) => {
4564
4564
  switch (op) {
4565
4565
  case "===":
4566
4566
  if (typeof a === "object") {
4567
4567
  a = a.version;
4568
4568
  }
4569
- if (typeof b2 === "object") {
4570
- b2 = b2.version;
4569
+ if (typeof b3 === "object") {
4570
+ b3 = b3.version;
4571
4571
  }
4572
- return a === b2;
4572
+ return a === b3;
4573
4573
  case "!==":
4574
4574
  if (typeof a === "object") {
4575
4575
  a = a.version;
4576
4576
  }
4577
- if (typeof b2 === "object") {
4578
- b2 = b2.version;
4577
+ if (typeof b3 === "object") {
4578
+ b3 = b3.version;
4579
4579
  }
4580
- return a !== b2;
4580
+ return a !== b3;
4581
4581
  case "":
4582
4582
  case "=":
4583
4583
  case "==":
4584
- return eq(a, b2, loose);
4584
+ return eq(a, b3, loose);
4585
4585
  case "!=":
4586
- return neq(a, b2, loose);
4586
+ return neq(a, b3, loose);
4587
4587
  case ">":
4588
- return gt(a, b2, loose);
4588
+ return gt(a, b3, loose);
4589
4589
  case ">=":
4590
- return gte(a, b2, loose);
4590
+ return gte(a, b3, loose);
4591
4591
  case "<":
4592
- return lt4(a, b2, loose);
4592
+ return lt4(a, b3, loose);
4593
4593
  case "<=":
4594
- return lte(a, b2, loose);
4594
+ return lte(a, b3, loose);
4595
4595
  default:
4596
4596
  throw new TypeError(`Invalid operator: ${op}`);
4597
4597
  }
@@ -5447,7 +5447,7 @@ var require_simplify = __commonJS({
5447
5447
  const set = [];
5448
5448
  let first = null;
5449
5449
  let prev = null;
5450
- const v3 = versions.sort((a, b2) => compare(a, b2, options));
5450
+ const v3 = versions.sort((a, b3) => compare(a, b3, options));
5451
5451
  for (const version of v3) {
5452
5452
  const included = satisfies(version, range, options);
5453
5453
  if (included) {
@@ -5631,19 +5631,19 @@ var require_subset = __commonJS({
5631
5631
  }
5632
5632
  return true;
5633
5633
  };
5634
- var higherGT = (a, b2, options) => {
5634
+ var higherGT = (a, b3, options) => {
5635
5635
  if (!a) {
5636
- return b2;
5636
+ return b3;
5637
5637
  }
5638
- const comp = compare(a.semver, b2.semver, options);
5639
- return comp > 0 ? a : comp < 0 ? b2 : b2.operator === ">" && a.operator === ">=" ? b2 : a;
5638
+ const comp = compare(a.semver, b3.semver, options);
5639
+ return comp > 0 ? a : comp < 0 ? b3 : b3.operator === ">" && a.operator === ">=" ? b3 : a;
5640
5640
  };
5641
- var lowerLT = (a, b2, options) => {
5641
+ var lowerLT = (a, b3, options) => {
5642
5642
  if (!a) {
5643
- return b2;
5643
+ return b3;
5644
5644
  }
5645
- const comp = compare(a.semver, b2.semver, options);
5646
- return comp < 0 ? a : comp > 0 ? b2 : b2.operator === "<" && a.operator === "<=" ? b2 : a;
5645
+ const comp = compare(a.semver, b3.semver, options);
5646
+ return comp < 0 ? a : comp > 0 ? b3 : b3.operator === "<" && a.operator === "<=" ? b3 : a;
5647
5647
  };
5648
5648
  module2.exports = subset;
5649
5649
  }
@@ -8845,7 +8845,7 @@ var require_stream = __commonJS({
8845
8845
  this.emit("error", err);
8846
8846
  }
8847
8847
  }
8848
- function createWebSocketStream2(ws, options) {
8848
+ function createWebSocketStream2(ws2, options) {
8849
8849
  let terminateOnDestroy = true;
8850
8850
  const duplex = new Duplex({
8851
8851
  ...options,
@@ -8854,65 +8854,65 @@ var require_stream = __commonJS({
8854
8854
  objectMode: false,
8855
8855
  writableObjectMode: false
8856
8856
  });
8857
- ws.on("message", function message(msg, isBinary) {
8857
+ ws2.on("message", function message(msg, isBinary) {
8858
8858
  const data2 = !isBinary && duplex._readableState.objectMode ? msg.toString() : msg;
8859
- if (!duplex.push(data2)) ws.pause();
8859
+ if (!duplex.push(data2)) ws2.pause();
8860
8860
  });
8861
- ws.once("error", function error(err) {
8861
+ ws2.once("error", function error(err) {
8862
8862
  if (duplex.destroyed) return;
8863
8863
  terminateOnDestroy = false;
8864
8864
  duplex.destroy(err);
8865
8865
  });
8866
- ws.once("close", function close() {
8866
+ ws2.once("close", function close() {
8867
8867
  if (duplex.destroyed) return;
8868
8868
  duplex.push(null);
8869
8869
  });
8870
8870
  duplex._destroy = function(err, callback) {
8871
- if (ws.readyState === ws.CLOSED) {
8871
+ if (ws2.readyState === ws2.CLOSED) {
8872
8872
  callback(err);
8873
8873
  process.nextTick(emitClose, duplex);
8874
8874
  return;
8875
8875
  }
8876
8876
  let called = false;
8877
- ws.once("error", function error(err2) {
8877
+ ws2.once("error", function error(err2) {
8878
8878
  called = true;
8879
8879
  callback(err2);
8880
8880
  });
8881
- ws.once("close", function close() {
8881
+ ws2.once("close", function close() {
8882
8882
  if (!called) callback(err);
8883
8883
  process.nextTick(emitClose, duplex);
8884
8884
  });
8885
- if (terminateOnDestroy) ws.terminate();
8885
+ if (terminateOnDestroy) ws2.terminate();
8886
8886
  };
8887
8887
  duplex._final = function(callback) {
8888
- if (ws.readyState === ws.CONNECTING) {
8889
- ws.once("open", function open() {
8888
+ if (ws2.readyState === ws2.CONNECTING) {
8889
+ ws2.once("open", function open() {
8890
8890
  duplex._final(callback);
8891
8891
  });
8892
8892
  return;
8893
8893
  }
8894
- if (ws._socket === null) return;
8895
- if (ws._socket._writableState.finished) {
8894
+ if (ws2._socket === null) return;
8895
+ if (ws2._socket._writableState.finished) {
8896
8896
  callback();
8897
8897
  if (duplex._readableState.endEmitted) duplex.destroy();
8898
8898
  } else {
8899
- ws._socket.once("finish", function finish() {
8899
+ ws2._socket.once("finish", function finish() {
8900
8900
  callback();
8901
8901
  });
8902
- ws.close();
8902
+ ws2.close();
8903
8903
  }
8904
8904
  };
8905
8905
  duplex._read = function() {
8906
- if (ws.isPaused) ws.resume();
8906
+ if (ws2.isPaused) ws2.resume();
8907
8907
  };
8908
8908
  duplex._write = function(chunk, encoding, callback) {
8909
- if (ws.readyState === ws.CONNECTING) {
8910
- ws.once("open", function open() {
8909
+ if (ws2.readyState === ws2.CONNECTING) {
8910
+ ws2.once("open", function open() {
8911
8911
  duplex._write(chunk, encoding, callback);
8912
8912
  });
8913
8913
  return;
8914
8914
  }
8915
- ws.send(chunk, callback);
8915
+ ws2.send(chunk, callback);
8916
8916
  };
8917
8917
  duplex.on("end", duplexOnEnd);
8918
8918
  duplex.on("error", duplexOnError);
@@ -9282,12 +9282,12 @@ var require_websocket_server = __commonJS({
9282
9282
  "Connection: Upgrade",
9283
9283
  `Sec-WebSocket-Accept: ${digest}`
9284
9284
  ];
9285
- const ws = new this.options.WebSocket(null, void 0, this.options);
9285
+ const ws2 = new this.options.WebSocket(null, void 0, this.options);
9286
9286
  if (protocols.size) {
9287
9287
  const protocol = this.options.handleProtocols ? this.options.handleProtocols(protocols, req) : protocols.values().next().value;
9288
9288
  if (protocol) {
9289
9289
  headers.push(`Sec-WebSocket-Protocol: ${protocol}`);
9290
- ws._protocol = protocol;
9290
+ ws2._protocol = protocol;
9291
9291
  }
9292
9292
  }
9293
9293
  if (extensions[PerMessageDeflate.extensionName]) {
@@ -9296,26 +9296,26 @@ var require_websocket_server = __commonJS({
9296
9296
  [PerMessageDeflate.extensionName]: [params]
9297
9297
  });
9298
9298
  headers.push(`Sec-WebSocket-Extensions: ${value}`);
9299
- ws._extensions = extensions;
9299
+ ws2._extensions = extensions;
9300
9300
  }
9301
9301
  this.emit("headers", headers, req);
9302
9302
  socket.write(headers.concat("\r\n").join("\r\n"));
9303
9303
  socket.removeListener("error", socketOnError);
9304
- ws.setSocket(socket, head, {
9304
+ ws2.setSocket(socket, head, {
9305
9305
  allowSynchronousEvents: this.options.allowSynchronousEvents,
9306
9306
  maxPayload: this.options.maxPayload,
9307
9307
  skipUTF8Validation: this.options.skipUTF8Validation
9308
9308
  });
9309
9309
  if (this.clients) {
9310
- this.clients.add(ws);
9311
- ws.on("close", () => {
9312
- this.clients.delete(ws);
9310
+ this.clients.add(ws2);
9311
+ ws2.on("close", () => {
9312
+ this.clients.delete(ws2);
9313
9313
  if (this._shouldEmitClose && !this.clients.size) {
9314
9314
  process.nextTick(emitClose, this);
9315
9315
  }
9316
9316
  });
9317
9317
  }
9318
- cb(ws, req);
9318
+ cb(ws2, req);
9319
9319
  }
9320
9320
  };
9321
9321
  module2.exports = WebSocketServer2;
@@ -10801,12 +10801,12 @@ var require_dcmjs = __commonJS({
10801
10801
  s.block_start = s.strstart;
10802
10802
  flush_pending(s.strm);
10803
10803
  };
10804
- const put_byte = (s, b2) => {
10805
- s.pending_buf[s.pending++] = b2;
10804
+ const put_byte = (s, b3) => {
10805
+ s.pending_buf[s.pending++] = b3;
10806
10806
  };
10807
- const putShortMSB = (s, b2) => {
10808
- s.pending_buf[s.pending++] = b2 >>> 8 & 255;
10809
- s.pending_buf[s.pending++] = b2 & 255;
10807
+ const putShortMSB = (s, b3) => {
10808
+ s.pending_buf[s.pending++] = b3 >>> 8 & 255;
10809
+ s.pending_buf[s.pending++] = b3 & 255;
10810
10810
  };
10811
10811
  const read_buf = (strm, buf, start, size) => {
10812
10812
  let len2 = strm.avail_in;
@@ -18115,10 +18115,10 @@ var require_dcmjs = __commonJS({
18115
18115
  }, {
18116
18116
  key: "rgb2XYZ",
18117
18117
  value: function rgb2XYZ(rgb) {
18118
- var R2 = Colors2.invGammaCorrection(rgb[0]);
18118
+ var R3 = Colors2.invGammaCorrection(rgb[0]);
18119
18119
  var G2 = Colors2.invGammaCorrection(rgb[1]);
18120
- var B3 = Colors2.invGammaCorrection(rgb[2]);
18121
- return [0.41239558896741424 * R2 + 0.3575834307637148 * G2 + 0.18049264738170157 * B3, 0.21258623078559555 * R2 + 0.7151703037034108 * G2 + 0.07220049864333623 * B3, 0.019297215491746945 * R2 + 0.11918386458084854 * G2 + 0.9504971251315798 * B3];
18120
+ var B2 = Colors2.invGammaCorrection(rgb[2]);
18121
+ return [0.41239558896741424 * R3 + 0.3575834307637148 * G2 + 0.18049264738170157 * B2, 0.21258623078559555 * R3 + 0.7151703037034108 * G2 + 0.07220049864333623 * B2, 0.019297215491746945 * R3 + 0.11918386458084854 * G2 + 0.9504971251315798 * B2];
18122
18122
  }
18123
18123
  }, {
18124
18124
  key: "xyz2LAB",
@@ -18142,9 +18142,9 @@ var require_dcmjs = __commonJS({
18142
18142
  value: function lab2XYZ(lab) {
18143
18143
  var L2 = (lab[0] + 16) / 116;
18144
18144
  var a = L2 + lab[1] / 500;
18145
- var b2 = L2 - lab[2] / 200;
18145
+ var b3 = L2 - lab[2] / 200;
18146
18146
  var whitePoint = Colors2.d65WhitePointXYZ();
18147
- return [whitePoint[0] * Colors2.labfInv(a), whitePoint[1] * Colors2.labfInv(L2), whitePoint[2] * Colors2.labfInv(b2)];
18147
+ return [whitePoint[0] * Colors2.labfInv(a), whitePoint[1] * Colors2.labfInv(L2), whitePoint[2] * Colors2.labfInv(b3)];
18148
18148
  }
18149
18149
  }, {
18150
18150
  key: "xyz2RGB",
@@ -18470,8 +18470,8 @@ var require_dcmjs = __commonJS({
18470
18470
  var distance2 = ImageNormalizer2.vec3Dot(positionVector, scanAxis);
18471
18471
  distanceDatasetPairs.push([distance2, dataset]);
18472
18472
  });
18473
- distanceDatasetPairs.sort(function(a, b2) {
18474
- return b2[0] - a[0];
18473
+ distanceDatasetPairs.sort(function(a, b3) {
18474
+ return b3[0] - a[0];
18475
18475
  });
18476
18476
  if (ds2.BitsAllocated !== 16) {
18477
18477
  log2.error("Only works with 16 bit data, not " + String(this.dataset.BitsAllocated));
@@ -18659,8 +18659,8 @@ var require_dcmjs = __commonJS({
18659
18659
  }
18660
18660
  }], [{
18661
18661
  key: "vec3CrossProduct",
18662
- value: function vec3CrossProduct(a, b2) {
18663
- var ax = a[0], ay = a[1], az = a[2], bx = b2[0], by = b2[1], bz = b2[2];
18662
+ value: function vec3CrossProduct(a, b3) {
18663
+ var ax = a[0], ay = a[1], az = a[2], bx = b3[0], by = b3[1], bz = b3[2];
18664
18664
  var out = [];
18665
18665
  out[0] = ay * bz - az * by;
18666
18666
  out[1] = az * bx - ax * bz;
@@ -18669,17 +18669,17 @@ var require_dcmjs = __commonJS({
18669
18669
  }
18670
18670
  }, {
18671
18671
  key: "vec3Subtract",
18672
- value: function vec3Subtract(a, b2) {
18672
+ value: function vec3Subtract(a, b3) {
18673
18673
  var out = [];
18674
- out[0] = a[0] - b2[0];
18675
- out[1] = a[1] - b2[1];
18676
- out[2] = a[2] - b2[2];
18674
+ out[0] = a[0] - b3[0];
18675
+ out[1] = a[1] - b3[1];
18676
+ out[2] = a[2] - b3[2];
18677
18677
  return out;
18678
18678
  }
18679
18679
  }, {
18680
18680
  key: "vec3Dot",
18681
- value: function vec3Dot(a, b2) {
18682
- return a[0] * b2[0] + a[1] * b2[1] + a[2] * b2[2];
18681
+ value: function vec3Dot(a, b3) {
18682
+ return a[0] * b3[0] + a[1] * b3[1] + a[2] * b3[2];
18683
18683
  }
18684
18684
  }]);
18685
18685
  return ImageNormalizer2;
@@ -20768,8 +20768,8 @@ var require_dcmjs = __commonJS({
20768
20768
  var iota = iota_1;
20769
20769
  var isBuffer = isBuffer_1;
20770
20770
  var hasTypedArrays = typeof Float64Array !== "undefined";
20771
- function compare1st(a, b2) {
20772
- return a[0] - b2[0];
20771
+ function compare1st(a, b3) {
20772
+ return a[0] - b3[0];
20773
20773
  }
20774
20774
  function order() {
20775
20775
  var stride = this.stride;
@@ -21014,8 +21014,8 @@ var require_dcmjs = __commonJS({
21014
21014
  }
21015
21015
  var ndarray = wrappedNDArrayCtor;
21016
21016
  var ndarray$1 = /* @__PURE__ */ getDefaultExportFromCjs(ndarray);
21017
- function crossProduct3D(a, b2) {
21018
- return [a[1] * b2[2] - a[2] * b2[1], a[2] * b2[0] - a[0] * b2[2], a[0] * b2[1] - a[1] * b2[0]];
21017
+ function crossProduct3D(a, b3) {
21018
+ return [a[1] * b3[2] - a[2] * b3[1], a[2] * b3[0] - a[0] * b3[2], a[0] * b3[1] - a[1] * b3[0]];
21019
21019
  }
21020
21020
  var flipImageOrientationPatient = {
21021
21021
  /**
@@ -21099,13 +21099,13 @@ var require_dcmjs = __commonJS({
21099
21099
  }
21100
21100
  return result;
21101
21101
  }
21102
- function nearlyEqual(a, b2, epsilon) {
21102
+ function nearlyEqual(a, b3, epsilon) {
21103
21103
  var absA = Math.abs(a);
21104
- var absB = Math.abs(b2);
21105
- var diff = Math.abs(a - b2);
21106
- if (a === b2) {
21104
+ var absB = Math.abs(b3);
21105
+ var diff = Math.abs(a - b3);
21106
+ if (a === b3) {
21107
21107
  return true;
21108
- } else if (a === 0 || b2 === 0 || absA + absB < epsilon * epsilon) {
21108
+ } else if (a === 0 || b3 === 0 || absA + absB < epsilon * epsilon) {
21109
21109
  return diff < epsilon;
21110
21110
  } else {
21111
21111
  return diff / Math.min(absA + absB, Number.MAX_VALUE) < epsilon;
@@ -23577,28 +23577,28 @@ var require_dcmjs = __commonJS({
23577
23577
  out[2] = z;
23578
23578
  return out;
23579
23579
  }
23580
- function add(out, a, b2) {
23581
- out[0] = a[0] + b2[0];
23582
- out[1] = a[1] + b2[1];
23583
- out[2] = a[2] + b2[2];
23580
+ function add(out, a, b3) {
23581
+ out[0] = a[0] + b3[0];
23582
+ out[1] = a[1] + b3[1];
23583
+ out[2] = a[2] + b3[2];
23584
23584
  return out;
23585
23585
  }
23586
- function subtract$1(out, a, b2) {
23587
- out[0] = a[0] - b2[0];
23588
- out[1] = a[1] - b2[1];
23589
- out[2] = a[2] - b2[2];
23586
+ function subtract$1(out, a, b3) {
23587
+ out[0] = a[0] - b3[0];
23588
+ out[1] = a[1] - b3[1];
23589
+ out[2] = a[2] - b3[2];
23590
23590
  return out;
23591
23591
  }
23592
- function multiply(out, a, b2) {
23593
- out[0] = a[0] * b2[0];
23594
- out[1] = a[1] * b2[1];
23595
- out[2] = a[2] * b2[2];
23592
+ function multiply(out, a, b3) {
23593
+ out[0] = a[0] * b3[0];
23594
+ out[1] = a[1] * b3[1];
23595
+ out[2] = a[2] * b3[2];
23596
23596
  return out;
23597
23597
  }
23598
- function divide(out, a, b2) {
23599
- out[0] = a[0] / b2[0];
23600
- out[1] = a[1] / b2[1];
23601
- out[2] = a[2] / b2[2];
23598
+ function divide(out, a, b3) {
23599
+ out[0] = a[0] / b3[0];
23600
+ out[1] = a[1] / b3[1];
23601
+ out[2] = a[2] / b3[2];
23602
23602
  return out;
23603
23603
  }
23604
23604
  function ceil(out, a) {
@@ -23613,16 +23613,16 @@ var require_dcmjs = __commonJS({
23613
23613
  out[2] = Math.floor(a[2]);
23614
23614
  return out;
23615
23615
  }
23616
- function min(out, a, b2) {
23617
- out[0] = Math.min(a[0], b2[0]);
23618
- out[1] = Math.min(a[1], b2[1]);
23619
- out[2] = Math.min(a[2], b2[2]);
23616
+ function min(out, a, b3) {
23617
+ out[0] = Math.min(a[0], b3[0]);
23618
+ out[1] = Math.min(a[1], b3[1]);
23619
+ out[2] = Math.min(a[2], b3[2]);
23620
23620
  return out;
23621
23621
  }
23622
- function max(out, a, b2) {
23623
- out[0] = Math.max(a[0], b2[0]);
23624
- out[1] = Math.max(a[1], b2[1]);
23625
- out[2] = Math.max(a[2], b2[2]);
23622
+ function max(out, a, b3) {
23623
+ out[0] = Math.max(a[0], b3[0]);
23624
+ out[1] = Math.max(a[1], b3[1]);
23625
+ out[2] = Math.max(a[2], b3[2]);
23626
23626
  return out;
23627
23627
  }
23628
23628
  function round(out, a) {
@@ -23631,28 +23631,28 @@ var require_dcmjs = __commonJS({
23631
23631
  out[2] = Math.round(a[2]);
23632
23632
  return out;
23633
23633
  }
23634
- function scale(out, a, b2) {
23635
- out[0] = a[0] * b2;
23636
- out[1] = a[1] * b2;
23637
- out[2] = a[2] * b2;
23634
+ function scale(out, a, b3) {
23635
+ out[0] = a[0] * b3;
23636
+ out[1] = a[1] * b3;
23637
+ out[2] = a[2] * b3;
23638
23638
  return out;
23639
23639
  }
23640
- function scaleAndAdd(out, a, b2, scale2) {
23641
- out[0] = a[0] + b2[0] * scale2;
23642
- out[1] = a[1] + b2[1] * scale2;
23643
- out[2] = a[2] + b2[2] * scale2;
23640
+ function scaleAndAdd(out, a, b3, scale2) {
23641
+ out[0] = a[0] + b3[0] * scale2;
23642
+ out[1] = a[1] + b3[1] * scale2;
23643
+ out[2] = a[2] + b3[2] * scale2;
23644
23644
  return out;
23645
23645
  }
23646
- function distance(a, b2) {
23647
- var x3 = b2[0] - a[0];
23648
- var y2 = b2[1] - a[1];
23649
- var z = b2[2] - a[2];
23646
+ function distance(a, b3) {
23647
+ var x3 = b3[0] - a[0];
23648
+ var y2 = b3[1] - a[1];
23649
+ var z = b3[2] - a[2];
23650
23650
  return Math.hypot(x3, y2, z);
23651
23651
  }
23652
- function squaredDistance(a, b2) {
23653
- var x3 = b2[0] - a[0];
23654
- var y2 = b2[1] - a[1];
23655
- var z = b2[2] - a[2];
23652
+ function squaredDistance(a, b3) {
23653
+ var x3 = b3[0] - a[0];
23654
+ var y2 = b3[1] - a[1];
23655
+ var z = b3[2] - a[2];
23656
23656
  return x3 * x3 + y2 * y2 + z * z;
23657
23657
  }
23658
23658
  function squaredLength(a) {
@@ -23686,38 +23686,38 @@ var require_dcmjs = __commonJS({
23686
23686
  out[2] = a[2] * len2;
23687
23687
  return out;
23688
23688
  }
23689
- function dot(a, b2) {
23690
- return a[0] * b2[0] + a[1] * b2[1] + a[2] * b2[2];
23689
+ function dot(a, b3) {
23690
+ return a[0] * b3[0] + a[1] * b3[1] + a[2] * b3[2];
23691
23691
  }
23692
- function cross$1(out, a, b2) {
23692
+ function cross$1(out, a, b3) {
23693
23693
  var ax = a[0], ay = a[1], az = a[2];
23694
- var bx = b2[0], by = b2[1], bz = b2[2];
23694
+ var bx = b3[0], by = b3[1], bz = b3[2];
23695
23695
  out[0] = ay * bz - az * by;
23696
23696
  out[1] = az * bx - ax * bz;
23697
23697
  out[2] = ax * by - ay * bx;
23698
23698
  return out;
23699
23699
  }
23700
- function lerp(out, a, b2, t) {
23700
+ function lerp(out, a, b3, t) {
23701
23701
  var ax = a[0];
23702
23702
  var ay = a[1];
23703
23703
  var az = a[2];
23704
- out[0] = ax + t * (b2[0] - ax);
23705
- out[1] = ay + t * (b2[1] - ay);
23706
- out[2] = az + t * (b2[2] - az);
23704
+ out[0] = ax + t * (b3[0] - ax);
23705
+ out[1] = ay + t * (b3[1] - ay);
23706
+ out[2] = az + t * (b3[2] - az);
23707
23707
  return out;
23708
23708
  }
23709
- function hermite(out, a, b2, c2, d2, t) {
23709
+ function hermite(out, a, b3, c2, d2, t) {
23710
23710
  var factorTimes2 = t * t;
23711
23711
  var factor1 = factorTimes2 * (2 * t - 3) + 1;
23712
23712
  var factor2 = factorTimes2 * (t - 2) + t;
23713
23713
  var factor3 = factorTimes2 * (t - 1);
23714
23714
  var factor4 = factorTimes2 * (3 - 2 * t);
23715
- out[0] = a[0] * factor1 + b2[0] * factor2 + c2[0] * factor3 + d2[0] * factor4;
23716
- out[1] = a[1] * factor1 + b2[1] * factor2 + c2[1] * factor3 + d2[1] * factor4;
23717
- out[2] = a[2] * factor1 + b2[2] * factor2 + c2[2] * factor3 + d2[2] * factor4;
23715
+ out[0] = a[0] * factor1 + b3[0] * factor2 + c2[0] * factor3 + d2[0] * factor4;
23716
+ out[1] = a[1] * factor1 + b3[1] * factor2 + c2[1] * factor3 + d2[1] * factor4;
23717
+ out[2] = a[2] * factor1 + b3[2] * factor2 + c2[2] * factor3 + d2[2] * factor4;
23718
23718
  return out;
23719
23719
  }
23720
- function bezier(out, a, b2, c2, d2, t) {
23720
+ function bezier(out, a, b3, c2, d2, t) {
23721
23721
  var inverseFactor = 1 - t;
23722
23722
  var inverseFactorTimesTwo = inverseFactor * inverseFactor;
23723
23723
  var factorTimes2 = t * t;
@@ -23725,9 +23725,9 @@ var require_dcmjs = __commonJS({
23725
23725
  var factor2 = 3 * t * inverseFactorTimesTwo;
23726
23726
  var factor3 = 3 * factorTimes2 * inverseFactor;
23727
23727
  var factor4 = factorTimes2 * t;
23728
- out[0] = a[0] * factor1 + b2[0] * factor2 + c2[0] * factor3 + d2[0] * factor4;
23729
- out[1] = a[1] * factor1 + b2[1] * factor2 + c2[1] * factor3 + d2[1] * factor4;
23730
- out[2] = a[2] * factor1 + b2[2] * factor2 + c2[2] * factor3 + d2[2] * factor4;
23728
+ out[0] = a[0] * factor1 + b3[0] * factor2 + c2[0] * factor3 + d2[0] * factor4;
23729
+ out[1] = a[1] * factor1 + b3[1] * factor2 + c2[1] * factor3 + d2[1] * factor4;
23730
+ out[2] = a[2] * factor1 + b3[2] * factor2 + c2[2] * factor3 + d2[2] * factor4;
23731
23731
  return out;
23732
23732
  }
23733
23733
  function random(out, scale2) {
@@ -23773,47 +23773,47 @@ var require_dcmjs = __commonJS({
23773
23773
  out[2] = z + uvz + uuvz;
23774
23774
  return out;
23775
23775
  }
23776
- function rotateX(out, a, b2, rad) {
23776
+ function rotateX(out, a, b3, rad) {
23777
23777
  var p = [], r6 = [];
23778
- p[0] = a[0] - b2[0];
23779
- p[1] = a[1] - b2[1];
23780
- p[2] = a[2] - b2[2];
23778
+ p[0] = a[0] - b3[0];
23779
+ p[1] = a[1] - b3[1];
23780
+ p[2] = a[2] - b3[2];
23781
23781
  r6[0] = p[0];
23782
23782
  r6[1] = p[1] * Math.cos(rad) - p[2] * Math.sin(rad);
23783
23783
  r6[2] = p[1] * Math.sin(rad) + p[2] * Math.cos(rad);
23784
- out[0] = r6[0] + b2[0];
23785
- out[1] = r6[1] + b2[1];
23786
- out[2] = r6[2] + b2[2];
23784
+ out[0] = r6[0] + b3[0];
23785
+ out[1] = r6[1] + b3[1];
23786
+ out[2] = r6[2] + b3[2];
23787
23787
  return out;
23788
23788
  }
23789
- function rotateY(out, a, b2, rad) {
23789
+ function rotateY(out, a, b3, rad) {
23790
23790
  var p = [], r6 = [];
23791
- p[0] = a[0] - b2[0];
23792
- p[1] = a[1] - b2[1];
23793
- p[2] = a[2] - b2[2];
23791
+ p[0] = a[0] - b3[0];
23792
+ p[1] = a[1] - b3[1];
23793
+ p[2] = a[2] - b3[2];
23794
23794
  r6[0] = p[2] * Math.sin(rad) + p[0] * Math.cos(rad);
23795
23795
  r6[1] = p[1];
23796
23796
  r6[2] = p[2] * Math.cos(rad) - p[0] * Math.sin(rad);
23797
- out[0] = r6[0] + b2[0];
23798
- out[1] = r6[1] + b2[1];
23799
- out[2] = r6[2] + b2[2];
23797
+ out[0] = r6[0] + b3[0];
23798
+ out[1] = r6[1] + b3[1];
23799
+ out[2] = r6[2] + b3[2];
23800
23800
  return out;
23801
23801
  }
23802
- function rotateZ(out, a, b2, rad) {
23802
+ function rotateZ(out, a, b3, rad) {
23803
23803
  var p = [], r6 = [];
23804
- p[0] = a[0] - b2[0];
23805
- p[1] = a[1] - b2[1];
23806
- p[2] = a[2] - b2[2];
23804
+ p[0] = a[0] - b3[0];
23805
+ p[1] = a[1] - b3[1];
23806
+ p[2] = a[2] - b3[2];
23807
23807
  r6[0] = p[0] * Math.cos(rad) - p[1] * Math.sin(rad);
23808
23808
  r6[1] = p[0] * Math.sin(rad) + p[1] * Math.cos(rad);
23809
23809
  r6[2] = p[2];
23810
- out[0] = r6[0] + b2[0];
23811
- out[1] = r6[1] + b2[1];
23812
- out[2] = r6[2] + b2[2];
23810
+ out[0] = r6[0] + b3[0];
23811
+ out[1] = r6[1] + b3[1];
23812
+ out[2] = r6[2] + b3[2];
23813
23813
  return out;
23814
23814
  }
23815
- function angle(a, b2) {
23816
- var ax = a[0], ay = a[1], az = a[2], bx = b2[0], by = b2[1], bz = b2[2], mag1 = Math.sqrt(ax * ax + ay * ay + az * az), mag2 = Math.sqrt(bx * bx + by * by + bz * bz), mag = mag1 * mag2, cosine = mag && dot(a, b2) / mag;
23815
+ function angle(a, b3) {
23816
+ var ax = a[0], ay = a[1], az = a[2], bx = b3[0], by = b3[1], bz = b3[2], mag1 = Math.sqrt(ax * ax + ay * ay + az * az), mag2 = Math.sqrt(bx * bx + by * by + bz * bz), mag = mag1 * mag2, cosine = mag && dot(a, b3) / mag;
23817
23817
  return Math.acos(Math.min(Math.max(cosine, -1), 1));
23818
23818
  }
23819
23819
  function zero(out) {
@@ -23825,12 +23825,12 @@ var require_dcmjs = __commonJS({
23825
23825
  function str(a) {
23826
23826
  return "vec3(" + a[0] + ", " + a[1] + ", " + a[2] + ")";
23827
23827
  }
23828
- function exactEquals(a, b2) {
23829
- return a[0] === b2[0] && a[1] === b2[1] && a[2] === b2[2];
23828
+ function exactEquals(a, b3) {
23829
+ return a[0] === b3[0] && a[1] === b3[1] && a[2] === b3[2];
23830
23830
  }
23831
- function equals(a, b2) {
23831
+ function equals(a, b3) {
23832
23832
  var a0 = a[0], a1 = a[1], a2 = a[2];
23833
- var b0 = b2[0], b1 = b2[1], b22 = b2[2];
23833
+ var b0 = b3[0], b1 = b3[1], b22 = b3[2];
23834
23834
  return Math.abs(a0 - b0) <= EPSILON$1 * Math.max(1, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= EPSILON$1 * Math.max(1, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b22) <= EPSILON$1 * Math.max(1, Math.abs(a2), Math.abs(b22));
23835
23835
  }
23836
23836
  var sub = subtract$1;
@@ -24367,10 +24367,10 @@ var require_dcmjs = __commonJS({
24367
24367
  }
24368
24368
  return den;
24369
24369
  }
24370
- function subtract(a, b2, out) {
24371
- out[0] = a[0] - b2[0];
24372
- out[1] = a[1] - b2[1];
24373
- out[2] = a[2] - b2[2];
24370
+ function subtract(a, b3, out) {
24371
+ out[0] = a[0] - b3[0];
24372
+ out[1] = a[1] - b3[1];
24373
+ out[2] = a[2] - b3[2];
24374
24374
  }
24375
24375
  function geometryFromFunctionalGroups(dataset, PerFrameFunctionalGroups) {
24376
24376
  var geometry = {};
@@ -26956,8 +26956,8 @@ var require_dcmjs = __commonJS({
26956
26956
  }]);
26957
26957
  var groupItem = _this20[0];
26958
26958
  var wereReferencesProvided = [options.referencedRegions !== void 0, options.referencedVolume !== void 0, options.referencedSegmentation !== void 0];
26959
- var numReferences = wereReferencesProvided.reduce(function(a, b2) {
26960
- return a + b2;
26959
+ var numReferences = wereReferencesProvided.reduce(function(a, b3) {
26960
+ return a + b3;
26961
26961
  });
26962
26962
  if (numReferences === 0) {
26963
26963
  throw new Error("One of the following options must be provided: 'referencedRegions', 'referencedVolume', or 'referencedSegmentation'.");
@@ -26998,8 +26998,8 @@ var require_dcmjs = __commonJS({
26998
26998
  function PlanarROIMeasurementsAndQualitativeEvaluations2(options) {
26999
26999
  _classCallCheck(this, PlanarROIMeasurementsAndQualitativeEvaluations2);
27000
27000
  var wereReferencesProvided = [options.referencedRegion !== void 0, options.referencedSegmentation !== void 0];
27001
- var numReferences = wereReferencesProvided.reduce(function(a, b2) {
27002
- return a + b2;
27001
+ var numReferences = wereReferencesProvided.reduce(function(a, b3) {
27002
+ return a + b3;
27003
27003
  });
27004
27004
  if (numReferences === 0) {
27005
27005
  throw new Error("One of the following options must be provided: 'referencedRegion', 'referencedSegmentation'.");
@@ -27192,8 +27192,8 @@ var require_dcmjs = __commonJS({
27192
27192
  var imageLibraryItem = new ImageLibrary();
27193
27193
  (_item$ContentSequence3 = item.ContentSequence).push.apply(_item$ContentSequence3, _toConsumableArray(imageLibraryItem));
27194
27194
  var wereOptionsProvided = [options.imagingMeasurements !== void 0, options.derivedImagingMeasurements !== void 0, options.qualitativeEvaluations !== void 0];
27195
- var numOptionsProvided = wereOptionsProvided.reduce(function(a, b2) {
27196
- return a + b2;
27195
+ var numOptionsProvided = wereOptionsProvided.reduce(function(a, b3) {
27196
+ return a + b3;
27197
27197
  });
27198
27198
  if (numOptionsProvided > 1) {
27199
27199
  throw new Error("Only one of the following options should be provided: 'imagingMeasurements', 'derivedImagingMeasurement', 'qualitativeEvaluations'.");
@@ -30839,12 +30839,12 @@ var require_dcmjs2 = __commonJS({
30839
30839
  s.block_start = s.strstart;
30840
30840
  flush_pending(s.strm);
30841
30841
  };
30842
- const put_byte = (s, b2) => {
30843
- s.pending_buf[s.pending++] = b2;
30842
+ const put_byte = (s, b3) => {
30843
+ s.pending_buf[s.pending++] = b3;
30844
30844
  };
30845
- const putShortMSB = (s, b2) => {
30846
- s.pending_buf[s.pending++] = b2 >>> 8 & 255;
30847
- s.pending_buf[s.pending++] = b2 & 255;
30845
+ const putShortMSB = (s, b3) => {
30846
+ s.pending_buf[s.pending++] = b3 >>> 8 & 255;
30847
+ s.pending_buf[s.pending++] = b3 & 255;
30848
30848
  };
30849
30849
  const read_buf = (strm, buf, start, size) => {
30850
30850
  let len2 = strm.avail_in;
@@ -37294,10 +37294,10 @@ var require_dcmjs2 = __commonJS({
37294
37294
  }, {
37295
37295
  key: "rgb2XYZ",
37296
37296
  value: function rgb2XYZ(rgb) {
37297
- var R2 = Colors2.invGammaCorrection(rgb[0]);
37297
+ var R3 = Colors2.invGammaCorrection(rgb[0]);
37298
37298
  var G2 = Colors2.invGammaCorrection(rgb[1]);
37299
- var B3 = Colors2.invGammaCorrection(rgb[2]);
37300
- return [0.41239558896741424 * R2 + 0.3575834307637148 * G2 + 0.18049264738170157 * B3, 0.21258623078559555 * R2 + 0.7151703037034108 * G2 + 0.07220049864333623 * B3, 0.019297215491746945 * R2 + 0.11918386458084854 * G2 + 0.9504971251315798 * B3];
37299
+ var B2 = Colors2.invGammaCorrection(rgb[2]);
37300
+ return [0.41239558896741424 * R3 + 0.3575834307637148 * G2 + 0.18049264738170157 * B2, 0.21258623078559555 * R3 + 0.7151703037034108 * G2 + 0.07220049864333623 * B2, 0.019297215491746945 * R3 + 0.11918386458084854 * G2 + 0.9504971251315798 * B2];
37301
37301
  }
37302
37302
  }, {
37303
37303
  key: "xyz2LAB",
@@ -37321,9 +37321,9 @@ var require_dcmjs2 = __commonJS({
37321
37321
  value: function lab2XYZ(lab) {
37322
37322
  var L2 = (lab[0] + 16) / 116;
37323
37323
  var a = L2 + lab[1] / 500;
37324
- var b2 = L2 - lab[2] / 200;
37324
+ var b3 = L2 - lab[2] / 200;
37325
37325
  var whitePoint = Colors2.d65WhitePointXYZ();
37326
- return [whitePoint[0] * Colors2.labfInv(a), whitePoint[1] * Colors2.labfInv(L2), whitePoint[2] * Colors2.labfInv(b2)];
37326
+ return [whitePoint[0] * Colors2.labfInv(a), whitePoint[1] * Colors2.labfInv(L2), whitePoint[2] * Colors2.labfInv(b3)];
37327
37327
  }
37328
37328
  }, {
37329
37329
  key: "xyz2RGB",
@@ -37634,8 +37634,8 @@ var require_dcmjs2 = __commonJS({
37634
37634
  var distance2 = ImageNormalizer2.vec3Dot(positionVector, scanAxis);
37635
37635
  distanceDatasetPairs.push([distance2, dataset]);
37636
37636
  });
37637
- distanceDatasetPairs.sort(function(a, b2) {
37638
- return b2[0] - a[0];
37637
+ distanceDatasetPairs.sort(function(a, b3) {
37638
+ return b3[0] - a[0];
37639
37639
  });
37640
37640
  if (ds2.BitsAllocated !== 16) {
37641
37641
  log2.error("Only works with 16 bit data, not " + String(this.dataset.BitsAllocated));
@@ -37823,8 +37823,8 @@ var require_dcmjs2 = __commonJS({
37823
37823
  }
37824
37824
  }], [{
37825
37825
  key: "vec3CrossProduct",
37826
- value: function vec3CrossProduct(a, b2) {
37827
- var ax = a[0], ay = a[1], az = a[2], bx = b2[0], by = b2[1], bz = b2[2];
37826
+ value: function vec3CrossProduct(a, b3) {
37827
+ var ax = a[0], ay = a[1], az = a[2], bx = b3[0], by = b3[1], bz = b3[2];
37828
37828
  var out = [];
37829
37829
  out[0] = ay * bz - az * by;
37830
37830
  out[1] = az * bx - ax * bz;
@@ -37833,17 +37833,17 @@ var require_dcmjs2 = __commonJS({
37833
37833
  }
37834
37834
  }, {
37835
37835
  key: "vec3Subtract",
37836
- value: function vec3Subtract(a, b2) {
37836
+ value: function vec3Subtract(a, b3) {
37837
37837
  var out = [];
37838
- out[0] = a[0] - b2[0];
37839
- out[1] = a[1] - b2[1];
37840
- out[2] = a[2] - b2[2];
37838
+ out[0] = a[0] - b3[0];
37839
+ out[1] = a[1] - b3[1];
37840
+ out[2] = a[2] - b3[2];
37841
37841
  return out;
37842
37842
  }
37843
37843
  }, {
37844
37844
  key: "vec3Dot",
37845
- value: function vec3Dot(a, b2) {
37846
- return a[0] * b2[0] + a[1] * b2[1] + a[2] * b2[2];
37845
+ value: function vec3Dot(a, b3) {
37846
+ return a[0] * b3[0] + a[1] * b3[1] + a[2] * b3[2];
37847
37847
  }
37848
37848
  }]);
37849
37849
  return ImageNormalizer2;
@@ -39932,8 +39932,8 @@ var require_dcmjs2 = __commonJS({
39932
39932
  var iota = iota_1;
39933
39933
  var isBuffer = isBuffer_1;
39934
39934
  var hasTypedArrays = typeof Float64Array !== "undefined";
39935
- function compare1st(a, b2) {
39936
- return a[0] - b2[0];
39935
+ function compare1st(a, b3) {
39936
+ return a[0] - b3[0];
39937
39937
  }
39938
39938
  function order() {
39939
39939
  var stride = this.stride;
@@ -40178,8 +40178,8 @@ var require_dcmjs2 = __commonJS({
40178
40178
  }
40179
40179
  var ndarray = wrappedNDArrayCtor;
40180
40180
  var ndarray$1 = /* @__PURE__ */ getDefaultExportFromCjs(ndarray);
40181
- function crossProduct3D(a, b2) {
40182
- return [a[1] * b2[2] - a[2] * b2[1], a[2] * b2[0] - a[0] * b2[2], a[0] * b2[1] - a[1] * b2[0]];
40181
+ function crossProduct3D(a, b3) {
40182
+ return [a[1] * b3[2] - a[2] * b3[1], a[2] * b3[0] - a[0] * b3[2], a[0] * b3[1] - a[1] * b3[0]];
40183
40183
  }
40184
40184
  var flipImageOrientationPatient = {
40185
40185
  /**
@@ -40263,13 +40263,13 @@ var require_dcmjs2 = __commonJS({
40263
40263
  }
40264
40264
  return result;
40265
40265
  }
40266
- function nearlyEqual(a, b2, epsilon) {
40266
+ function nearlyEqual(a, b3, epsilon) {
40267
40267
  var absA = Math.abs(a);
40268
- var absB = Math.abs(b2);
40269
- var diff = Math.abs(a - b2);
40270
- if (a === b2) {
40268
+ var absB = Math.abs(b3);
40269
+ var diff = Math.abs(a - b3);
40270
+ if (a === b3) {
40271
40271
  return true;
40272
- } else if (a === 0 || b2 === 0 || absA + absB < epsilon * epsilon) {
40272
+ } else if (a === 0 || b3 === 0 || absA + absB < epsilon * epsilon) {
40273
40273
  return diff < epsilon;
40274
40274
  } else {
40275
40275
  return diff / Math.min(absA + absB, Number.MAX_VALUE) < epsilon;
@@ -42741,28 +42741,28 @@ var require_dcmjs2 = __commonJS({
42741
42741
  out[2] = z;
42742
42742
  return out;
42743
42743
  }
42744
- function add(out, a, b2) {
42745
- out[0] = a[0] + b2[0];
42746
- out[1] = a[1] + b2[1];
42747
- out[2] = a[2] + b2[2];
42744
+ function add(out, a, b3) {
42745
+ out[0] = a[0] + b3[0];
42746
+ out[1] = a[1] + b3[1];
42747
+ out[2] = a[2] + b3[2];
42748
42748
  return out;
42749
42749
  }
42750
- function subtract$1(out, a, b2) {
42751
- out[0] = a[0] - b2[0];
42752
- out[1] = a[1] - b2[1];
42753
- out[2] = a[2] - b2[2];
42750
+ function subtract$1(out, a, b3) {
42751
+ out[0] = a[0] - b3[0];
42752
+ out[1] = a[1] - b3[1];
42753
+ out[2] = a[2] - b3[2];
42754
42754
  return out;
42755
42755
  }
42756
- function multiply(out, a, b2) {
42757
- out[0] = a[0] * b2[0];
42758
- out[1] = a[1] * b2[1];
42759
- out[2] = a[2] * b2[2];
42756
+ function multiply(out, a, b3) {
42757
+ out[0] = a[0] * b3[0];
42758
+ out[1] = a[1] * b3[1];
42759
+ out[2] = a[2] * b3[2];
42760
42760
  return out;
42761
42761
  }
42762
- function divide(out, a, b2) {
42763
- out[0] = a[0] / b2[0];
42764
- out[1] = a[1] / b2[1];
42765
- out[2] = a[2] / b2[2];
42762
+ function divide(out, a, b3) {
42763
+ out[0] = a[0] / b3[0];
42764
+ out[1] = a[1] / b3[1];
42765
+ out[2] = a[2] / b3[2];
42766
42766
  return out;
42767
42767
  }
42768
42768
  function ceil(out, a) {
@@ -42777,16 +42777,16 @@ var require_dcmjs2 = __commonJS({
42777
42777
  out[2] = Math.floor(a[2]);
42778
42778
  return out;
42779
42779
  }
42780
- function min(out, a, b2) {
42781
- out[0] = Math.min(a[0], b2[0]);
42782
- out[1] = Math.min(a[1], b2[1]);
42783
- out[2] = Math.min(a[2], b2[2]);
42780
+ function min(out, a, b3) {
42781
+ out[0] = Math.min(a[0], b3[0]);
42782
+ out[1] = Math.min(a[1], b3[1]);
42783
+ out[2] = Math.min(a[2], b3[2]);
42784
42784
  return out;
42785
42785
  }
42786
- function max(out, a, b2) {
42787
- out[0] = Math.max(a[0], b2[0]);
42788
- out[1] = Math.max(a[1], b2[1]);
42789
- out[2] = Math.max(a[2], b2[2]);
42786
+ function max(out, a, b3) {
42787
+ out[0] = Math.max(a[0], b3[0]);
42788
+ out[1] = Math.max(a[1], b3[1]);
42789
+ out[2] = Math.max(a[2], b3[2]);
42790
42790
  return out;
42791
42791
  }
42792
42792
  function round(out, a) {
@@ -42795,28 +42795,28 @@ var require_dcmjs2 = __commonJS({
42795
42795
  out[2] = Math.round(a[2]);
42796
42796
  return out;
42797
42797
  }
42798
- function scale(out, a, b2) {
42799
- out[0] = a[0] * b2;
42800
- out[1] = a[1] * b2;
42801
- out[2] = a[2] * b2;
42798
+ function scale(out, a, b3) {
42799
+ out[0] = a[0] * b3;
42800
+ out[1] = a[1] * b3;
42801
+ out[2] = a[2] * b3;
42802
42802
  return out;
42803
42803
  }
42804
- function scaleAndAdd(out, a, b2, scale2) {
42805
- out[0] = a[0] + b2[0] * scale2;
42806
- out[1] = a[1] + b2[1] * scale2;
42807
- out[2] = a[2] + b2[2] * scale2;
42804
+ function scaleAndAdd(out, a, b3, scale2) {
42805
+ out[0] = a[0] + b3[0] * scale2;
42806
+ out[1] = a[1] + b3[1] * scale2;
42807
+ out[2] = a[2] + b3[2] * scale2;
42808
42808
  return out;
42809
42809
  }
42810
- function distance(a, b2) {
42811
- var x3 = b2[0] - a[0];
42812
- var y2 = b2[1] - a[1];
42813
- var z = b2[2] - a[2];
42810
+ function distance(a, b3) {
42811
+ var x3 = b3[0] - a[0];
42812
+ var y2 = b3[1] - a[1];
42813
+ var z = b3[2] - a[2];
42814
42814
  return Math.hypot(x3, y2, z);
42815
42815
  }
42816
- function squaredDistance(a, b2) {
42817
- var x3 = b2[0] - a[0];
42818
- var y2 = b2[1] - a[1];
42819
- var z = b2[2] - a[2];
42816
+ function squaredDistance(a, b3) {
42817
+ var x3 = b3[0] - a[0];
42818
+ var y2 = b3[1] - a[1];
42819
+ var z = b3[2] - a[2];
42820
42820
  return x3 * x3 + y2 * y2 + z * z;
42821
42821
  }
42822
42822
  function squaredLength(a) {
@@ -42850,38 +42850,38 @@ var require_dcmjs2 = __commonJS({
42850
42850
  out[2] = a[2] * len2;
42851
42851
  return out;
42852
42852
  }
42853
- function dot(a, b2) {
42854
- return a[0] * b2[0] + a[1] * b2[1] + a[2] * b2[2];
42853
+ function dot(a, b3) {
42854
+ return a[0] * b3[0] + a[1] * b3[1] + a[2] * b3[2];
42855
42855
  }
42856
- function cross$1(out, a, b2) {
42856
+ function cross$1(out, a, b3) {
42857
42857
  var ax = a[0], ay = a[1], az = a[2];
42858
- var bx = b2[0], by = b2[1], bz = b2[2];
42858
+ var bx = b3[0], by = b3[1], bz = b3[2];
42859
42859
  out[0] = ay * bz - az * by;
42860
42860
  out[1] = az * bx - ax * bz;
42861
42861
  out[2] = ax * by - ay * bx;
42862
42862
  return out;
42863
42863
  }
42864
- function lerp(out, a, b2, t) {
42864
+ function lerp(out, a, b3, t) {
42865
42865
  var ax = a[0];
42866
42866
  var ay = a[1];
42867
42867
  var az = a[2];
42868
- out[0] = ax + t * (b2[0] - ax);
42869
- out[1] = ay + t * (b2[1] - ay);
42870
- out[2] = az + t * (b2[2] - az);
42868
+ out[0] = ax + t * (b3[0] - ax);
42869
+ out[1] = ay + t * (b3[1] - ay);
42870
+ out[2] = az + t * (b3[2] - az);
42871
42871
  return out;
42872
42872
  }
42873
- function hermite(out, a, b2, c2, d2, t) {
42873
+ function hermite(out, a, b3, c2, d2, t) {
42874
42874
  var factorTimes2 = t * t;
42875
42875
  var factor1 = factorTimes2 * (2 * t - 3) + 1;
42876
42876
  var factor2 = factorTimes2 * (t - 2) + t;
42877
42877
  var factor3 = factorTimes2 * (t - 1);
42878
42878
  var factor4 = factorTimes2 * (3 - 2 * t);
42879
- out[0] = a[0] * factor1 + b2[0] * factor2 + c2[0] * factor3 + d2[0] * factor4;
42880
- out[1] = a[1] * factor1 + b2[1] * factor2 + c2[1] * factor3 + d2[1] * factor4;
42881
- out[2] = a[2] * factor1 + b2[2] * factor2 + c2[2] * factor3 + d2[2] * factor4;
42879
+ out[0] = a[0] * factor1 + b3[0] * factor2 + c2[0] * factor3 + d2[0] * factor4;
42880
+ out[1] = a[1] * factor1 + b3[1] * factor2 + c2[1] * factor3 + d2[1] * factor4;
42881
+ out[2] = a[2] * factor1 + b3[2] * factor2 + c2[2] * factor3 + d2[2] * factor4;
42882
42882
  return out;
42883
42883
  }
42884
- function bezier(out, a, b2, c2, d2, t) {
42884
+ function bezier(out, a, b3, c2, d2, t) {
42885
42885
  var inverseFactor = 1 - t;
42886
42886
  var inverseFactorTimesTwo = inverseFactor * inverseFactor;
42887
42887
  var factorTimes2 = t * t;
@@ -42889,9 +42889,9 @@ var require_dcmjs2 = __commonJS({
42889
42889
  var factor2 = 3 * t * inverseFactorTimesTwo;
42890
42890
  var factor3 = 3 * factorTimes2 * inverseFactor;
42891
42891
  var factor4 = factorTimes2 * t;
42892
- out[0] = a[0] * factor1 + b2[0] * factor2 + c2[0] * factor3 + d2[0] * factor4;
42893
- out[1] = a[1] * factor1 + b2[1] * factor2 + c2[1] * factor3 + d2[1] * factor4;
42894
- out[2] = a[2] * factor1 + b2[2] * factor2 + c2[2] * factor3 + d2[2] * factor4;
42892
+ out[0] = a[0] * factor1 + b3[0] * factor2 + c2[0] * factor3 + d2[0] * factor4;
42893
+ out[1] = a[1] * factor1 + b3[1] * factor2 + c2[1] * factor3 + d2[1] * factor4;
42894
+ out[2] = a[2] * factor1 + b3[2] * factor2 + c2[2] * factor3 + d2[2] * factor4;
42895
42895
  return out;
42896
42896
  }
42897
42897
  function random(out, scale2) {
@@ -42937,47 +42937,47 @@ var require_dcmjs2 = __commonJS({
42937
42937
  out[2] = z + uvz + uuvz;
42938
42938
  return out;
42939
42939
  }
42940
- function rotateX(out, a, b2, rad) {
42940
+ function rotateX(out, a, b3, rad) {
42941
42941
  var p = [], r6 = [];
42942
- p[0] = a[0] - b2[0];
42943
- p[1] = a[1] - b2[1];
42944
- p[2] = a[2] - b2[2];
42942
+ p[0] = a[0] - b3[0];
42943
+ p[1] = a[1] - b3[1];
42944
+ p[2] = a[2] - b3[2];
42945
42945
  r6[0] = p[0];
42946
42946
  r6[1] = p[1] * Math.cos(rad) - p[2] * Math.sin(rad);
42947
42947
  r6[2] = p[1] * Math.sin(rad) + p[2] * Math.cos(rad);
42948
- out[0] = r6[0] + b2[0];
42949
- out[1] = r6[1] + b2[1];
42950
- out[2] = r6[2] + b2[2];
42948
+ out[0] = r6[0] + b3[0];
42949
+ out[1] = r6[1] + b3[1];
42950
+ out[2] = r6[2] + b3[2];
42951
42951
  return out;
42952
42952
  }
42953
- function rotateY(out, a, b2, rad) {
42953
+ function rotateY(out, a, b3, rad) {
42954
42954
  var p = [], r6 = [];
42955
- p[0] = a[0] - b2[0];
42956
- p[1] = a[1] - b2[1];
42957
- p[2] = a[2] - b2[2];
42955
+ p[0] = a[0] - b3[0];
42956
+ p[1] = a[1] - b3[1];
42957
+ p[2] = a[2] - b3[2];
42958
42958
  r6[0] = p[2] * Math.sin(rad) + p[0] * Math.cos(rad);
42959
42959
  r6[1] = p[1];
42960
42960
  r6[2] = p[2] * Math.cos(rad) - p[0] * Math.sin(rad);
42961
- out[0] = r6[0] + b2[0];
42962
- out[1] = r6[1] + b2[1];
42963
- out[2] = r6[2] + b2[2];
42961
+ out[0] = r6[0] + b3[0];
42962
+ out[1] = r6[1] + b3[1];
42963
+ out[2] = r6[2] + b3[2];
42964
42964
  return out;
42965
42965
  }
42966
- function rotateZ(out, a, b2, rad) {
42966
+ function rotateZ(out, a, b3, rad) {
42967
42967
  var p = [], r6 = [];
42968
- p[0] = a[0] - b2[0];
42969
- p[1] = a[1] - b2[1];
42970
- p[2] = a[2] - b2[2];
42968
+ p[0] = a[0] - b3[0];
42969
+ p[1] = a[1] - b3[1];
42970
+ p[2] = a[2] - b3[2];
42971
42971
  r6[0] = p[0] * Math.cos(rad) - p[1] * Math.sin(rad);
42972
42972
  r6[1] = p[0] * Math.sin(rad) + p[1] * Math.cos(rad);
42973
42973
  r6[2] = p[2];
42974
- out[0] = r6[0] + b2[0];
42975
- out[1] = r6[1] + b2[1];
42976
- out[2] = r6[2] + b2[2];
42974
+ out[0] = r6[0] + b3[0];
42975
+ out[1] = r6[1] + b3[1];
42976
+ out[2] = r6[2] + b3[2];
42977
42977
  return out;
42978
42978
  }
42979
- function angle(a, b2) {
42980
- var ax = a[0], ay = a[1], az = a[2], bx = b2[0], by = b2[1], bz = b2[2], mag1 = Math.sqrt(ax * ax + ay * ay + az * az), mag2 = Math.sqrt(bx * bx + by * by + bz * bz), mag = mag1 * mag2, cosine = mag && dot(a, b2) / mag;
42979
+ function angle(a, b3) {
42980
+ var ax = a[0], ay = a[1], az = a[2], bx = b3[0], by = b3[1], bz = b3[2], mag1 = Math.sqrt(ax * ax + ay * ay + az * az), mag2 = Math.sqrt(bx * bx + by * by + bz * bz), mag = mag1 * mag2, cosine = mag && dot(a, b3) / mag;
42981
42981
  return Math.acos(Math.min(Math.max(cosine, -1), 1));
42982
42982
  }
42983
42983
  function zero(out) {
@@ -42989,12 +42989,12 @@ var require_dcmjs2 = __commonJS({
42989
42989
  function str(a) {
42990
42990
  return "vec3(" + a[0] + ", " + a[1] + ", " + a[2] + ")";
42991
42991
  }
42992
- function exactEquals(a, b2) {
42993
- return a[0] === b2[0] && a[1] === b2[1] && a[2] === b2[2];
42992
+ function exactEquals(a, b3) {
42993
+ return a[0] === b3[0] && a[1] === b3[1] && a[2] === b3[2];
42994
42994
  }
42995
- function equals(a, b2) {
42995
+ function equals(a, b3) {
42996
42996
  var a0 = a[0], a1 = a[1], a2 = a[2];
42997
- var b0 = b2[0], b1 = b2[1], b22 = b2[2];
42997
+ var b0 = b3[0], b1 = b3[1], b22 = b3[2];
42998
42998
  return Math.abs(a0 - b0) <= EPSILON$1 * Math.max(1, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= EPSILON$1 * Math.max(1, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b22) <= EPSILON$1 * Math.max(1, Math.abs(a2), Math.abs(b22));
42999
42999
  }
43000
43000
  var sub = subtract$1;
@@ -43531,10 +43531,10 @@ var require_dcmjs2 = __commonJS({
43531
43531
  }
43532
43532
  return den;
43533
43533
  }
43534
- function subtract(a, b2, out) {
43535
- out[0] = a[0] - b2[0];
43536
- out[1] = a[1] - b2[1];
43537
- out[2] = a[2] - b2[2];
43534
+ function subtract(a, b3, out) {
43535
+ out[0] = a[0] - b3[0];
43536
+ out[1] = a[1] - b3[1];
43537
+ out[2] = a[2] - b3[2];
43538
43538
  }
43539
43539
  function geometryFromFunctionalGroups(dataset, PerFrameFunctionalGroups) {
43540
43540
  var geometry = {};
@@ -46120,8 +46120,8 @@ var require_dcmjs2 = __commonJS({
46120
46120
  }]);
46121
46121
  var groupItem = _this22[0];
46122
46122
  var wereReferencesProvided = [options.referencedRegions !== void 0, options.referencedVolume !== void 0, options.referencedSegmentation !== void 0];
46123
- var numReferences = wereReferencesProvided.reduce(function(a, b2) {
46124
- return a + b2;
46123
+ var numReferences = wereReferencesProvided.reduce(function(a, b3) {
46124
+ return a + b3;
46125
46125
  });
46126
46126
  if (numReferences === 0) {
46127
46127
  throw new Error("One of the following options must be provided: 'referencedRegions', 'referencedVolume', or 'referencedSegmentation'.");
@@ -46162,8 +46162,8 @@ var require_dcmjs2 = __commonJS({
46162
46162
  function PlanarROIMeasurementsAndQualitativeEvaluations2(options) {
46163
46163
  _classCallCheck(this, PlanarROIMeasurementsAndQualitativeEvaluations2);
46164
46164
  var wereReferencesProvided = [options.referencedRegion !== void 0, options.referencedSegmentation !== void 0];
46165
- var numReferences = wereReferencesProvided.reduce(function(a, b2) {
46166
- return a + b2;
46165
+ var numReferences = wereReferencesProvided.reduce(function(a, b3) {
46166
+ return a + b3;
46167
46167
  });
46168
46168
  if (numReferences === 0) {
46169
46169
  throw new Error("One of the following options must be provided: 'referencedRegion', 'referencedSegmentation'.");
@@ -46356,8 +46356,8 @@ var require_dcmjs2 = __commonJS({
46356
46356
  var imageLibraryItem = new ImageLibrary();
46357
46357
  (_item$ContentSequence3 = item.ContentSequence).push.apply(_item$ContentSequence3, _toConsumableArray(imageLibraryItem));
46358
46358
  var wereOptionsProvided = [options.imagingMeasurements !== void 0, options.derivedImagingMeasurements !== void 0, options.qualitativeEvaluations !== void 0];
46359
- var numOptionsProvided = wereOptionsProvided.reduce(function(a, b2) {
46360
- return a + b2;
46359
+ var numOptionsProvided = wereOptionsProvided.reduce(function(a, b3) {
46360
+ return a + b3;
46361
46361
  });
46362
46362
  if (numOptionsProvided > 1) {
46363
46363
  throw new Error("Only one of the following options should be provided: 'imagingMeasurements', 'derivedImagingMeasurement', 'qualitativeEvaluations'.");
@@ -47749,8 +47749,8 @@ var require_dcmjs_codecs_min = __commonJS({
47749
47749
  }
47750
47750
  e.exports = o2;
47751
47751
  }, 237: (e, t, r6) => {
47752
- const { Codec: s, ExplicitVRBigEndianCodec: o2, ExplicitVRLittleEndianCodec: i, HtJpeg2000LosslessCodec: n, HtJpeg2000LosslessRpclCodec: a, HtJpeg2000LossyCodec: l2, ImplicitVRLittleEndianCodec: c2, Jpeg2000LosslessCodec: d2, Jpeg2000LossyCodec: p, JpegBaselineProcess1Codec: h2, JpegLosslessProcess14V1Codec: m3, JpegLsLosslessCodec: u2, JpegLsLossyCodec: g3, RleLosslessCodec: f2 } = r6(258), { Jpeg2000ProgressionOrder: w3, JpegSampleFactor: P, PhotometricInterpretation: y2, PixelRepresentation: x3, PlanarConfiguration: C2, TransferSyntax: b2 } = r6(492), _2 = r6(234), I3 = r6(25), A3 = r6(190), S3 = { codecs: { Codec: s, ExplicitVRBigEndianCodec: o2, ExplicitVRLittleEndianCodec: i, HtJpeg2000LosslessCodec: n, HtJpeg2000LosslessRpclCodec: a, HtJpeg2000LossyCodec: l2, ImplicitVRLittleEndianCodec: c2, Jpeg2000LosslessCodec: d2, Jpeg2000LossyCodec: p, JpegBaselineProcess1Codec: h2, JpegLosslessProcess14V1Codec: m3, JpegLsLosslessCodec: u2, JpegLsLossyCodec: g3, RleLosslessCodec: f2 }, constants: { Jpeg2000ProgressionOrder: w3, JpegSampleFactor: P, PhotometricInterpretation: y2, PixelRepresentation: x3, PlanarConfiguration: C2, TransferSyntax: b2 }, Context: _2, log: r6(547), NativeCodecs: I3, Transcoder: A3, version: r6(837) };
47753
- e.exports = S3;
47752
+ const { Codec: s, ExplicitVRBigEndianCodec: o2, ExplicitVRLittleEndianCodec: i, HtJpeg2000LosslessCodec: n, HtJpeg2000LosslessRpclCodec: a, HtJpeg2000LossyCodec: l2, ImplicitVRLittleEndianCodec: c2, Jpeg2000LosslessCodec: d2, Jpeg2000LossyCodec: p, JpegBaselineProcess1Codec: h2, JpegLosslessProcess14V1Codec: m3, JpegLsLosslessCodec: u2, JpegLsLossyCodec: g3, RleLosslessCodec: f2 } = r6(258), { Jpeg2000ProgressionOrder: w3, JpegSampleFactor: P, PhotometricInterpretation: y2, PixelRepresentation: x3, PlanarConfiguration: C2, TransferSyntax: b3 } = r6(492), _2 = r6(234), I3 = r6(25), A3 = r6(190), S2 = { codecs: { Codec: s, ExplicitVRBigEndianCodec: o2, ExplicitVRLittleEndianCodec: i, HtJpeg2000LosslessCodec: n, HtJpeg2000LosslessRpclCodec: a, HtJpeg2000LossyCodec: l2, ImplicitVRLittleEndianCodec: c2, Jpeg2000LosslessCodec: d2, Jpeg2000LossyCodec: p, JpegBaselineProcess1Codec: h2, JpegLosslessProcess14V1Codec: m3, JpegLsLosslessCodec: u2, JpegLsLossyCodec: g3, RleLosslessCodec: f2 }, constants: { Jpeg2000ProgressionOrder: w3, JpegSampleFactor: P, PhotometricInterpretation: y2, PixelRepresentation: x3, PlanarConfiguration: C2, TransferSyntax: b3 }, Context: _2, log: r6(547), NativeCodecs: I3, Transcoder: A3, version: r6(837) };
47753
+ e.exports = S2;
47754
47754
  }, 258: (e, t, r6) => {
47755
47755
  const { Jpeg2000ProgressionOrder: s, JpegSampleFactor: o2, PhotometricInterpretation: i, PlanarConfiguration: n, TransferSyntax: a } = r6(492), { FrameConverter: l2, Frames: c2 } = r6(859), d2 = r6(234), p = r6(25), h2 = r6(984);
47756
47756
  class m3 {
@@ -47761,7 +47761,7 @@ var require_dcmjs_codecs_min = __commonJS({
47761
47761
  throw new Error("decode should be implemented");
47762
47762
  }
47763
47763
  static getCodec(e2) {
47764
- const t2 = { [a.ImplicitVRLittleEndian]: u2, [a.ExplicitVRLittleEndian]: g3, [a.ExplicitVRBigEndian]: f2, [a.RleLossless]: w3, [a.JpegBaselineProcess1]: y2, [a.JpegLosslessProcess14V1]: x3, [a.JpegLsLossless]: b2, [a.JpegLsLossy]: _2, [a.Jpeg2000Lossless]: A3, [a.Jpeg2000Lossy]: S3, [a.HtJpeg2000Lossless]: E3, [a.HtJpeg2000LosslessRpcl]: v3, [a.HtJpeg2000Lossy]: B3 }[e2];
47764
+ const t2 = { [a.ImplicitVRLittleEndian]: u2, [a.ExplicitVRLittleEndian]: g3, [a.ExplicitVRBigEndian]: f2, [a.RleLossless]: w3, [a.JpegBaselineProcess1]: y2, [a.JpegLosslessProcess14V1]: x3, [a.JpegLsLossless]: b3, [a.JpegLsLossy]: _2, [a.Jpeg2000Lossless]: A3, [a.Jpeg2000Lossy]: S2, [a.HtJpeg2000Lossless]: E3, [a.HtJpeg2000LosslessRpcl]: v3, [a.HtJpeg2000Lossy]: B2 }[e2];
47765
47765
  if (!t2) throw new Error(`Codec for transfer syntax UID ${e2} is not implemented`);
47766
47766
  return new t2();
47767
47767
  }
@@ -47897,7 +47897,7 @@ var require_dcmjs_codecs_min = __commonJS({
47897
47897
  return super._baseDecodeImpl(e2, t2, "decodeJpegLs", s2);
47898
47898
  }
47899
47899
  }
47900
- class b2 extends C2 {
47900
+ class b3 extends C2 {
47901
47901
  encode(e2, t2, r7 = {}) {
47902
47902
  return r7.lossy = false, super.encode(e2, t2, r7);
47903
47903
  }
@@ -47945,7 +47945,7 @@ var require_dcmjs_codecs_min = __commonJS({
47945
47945
  return super.decode(e2, t2, "decodeJpeg2000", r7);
47946
47946
  }
47947
47947
  }
47948
- class S3 extends I3 {
47948
+ class S2 extends I3 {
47949
47949
  encode(e2, t2, r7 = {}) {
47950
47950
  return r7.lossy = true, super.encode(e2, t2, "encodeJpeg2000", r7);
47951
47951
  }
@@ -47969,7 +47969,7 @@ var require_dcmjs_codecs_min = __commonJS({
47969
47969
  return super.decode(e2, t2, "decodeHtJpeg2000", r7);
47970
47970
  }
47971
47971
  }
47972
- class B3 extends I3 {
47972
+ class B2 extends I3 {
47973
47973
  encode(e2, t2, r7 = {}) {
47974
47974
  return r7.lossy = true, super.encode(e2, t2, "encodeHtJpeg2000", r7);
47975
47975
  }
@@ -47977,7 +47977,7 @@ var require_dcmjs_codecs_min = __commonJS({
47977
47977
  return super.decode(e2, t2, "decodeHtJpeg2000", r7);
47978
47978
  }
47979
47979
  }
47980
- e.exports = { Codec: m3, ExplicitVRBigEndianCodec: f2, ExplicitVRLittleEndianCodec: g3, HtJpeg2000LosslessCodec: E3, HtJpeg2000LosslessRpclCodec: v3, HtJpeg2000LossyCodec: B3, ImplicitVRLittleEndianCodec: u2, Jpeg2000LosslessCodec: A3, Jpeg2000LossyCodec: S3, JpegBaselineProcess1Codec: y2, JpegLosslessProcess14V1Codec: x3, JpegLsLosslessCodec: b2, JpegLsLossyCodec: _2, RleLosslessCodec: w3 };
47980
+ e.exports = { Codec: m3, ExplicitVRBigEndianCodec: f2, ExplicitVRLittleEndianCodec: g3, HtJpeg2000LosslessCodec: E3, HtJpeg2000LosslessRpclCodec: v3, HtJpeg2000LossyCodec: B2, ImplicitVRLittleEndianCodec: u2, Jpeg2000LosslessCodec: A3, Jpeg2000LossyCodec: S2, JpegBaselineProcess1Codec: y2, JpegLosslessProcess14V1Codec: x3, JpegLsLosslessCodec: b3, JpegLsLossyCodec: _2, RleLosslessCodec: w3 };
47981
47981
  }, 492: (e) => {
47982
47982
  const t = { ImplicitVRLittleEndian: "1.2.840.10008.1.2", ExplicitVRLittleEndian: "1.2.840.10008.1.2.1", ExplicitVRBigEndian: "1.2.840.10008.1.2.2", RleLossless: "1.2.840.10008.1.2.5", JpegBaselineProcess1: "1.2.840.10008.1.2.4.50", JpegLosslessProcess14V1: "1.2.840.10008.1.2.4.70", JpegLsLossless: "1.2.840.10008.1.2.4.80", JpegLsLossy: "1.2.840.10008.1.2.4.81", Jpeg2000Lossless: "1.2.840.10008.1.2.4.90", Jpeg2000Lossy: "1.2.840.10008.1.2.4.91", JpegXlLossless: "1.2.840.10008.1.2.4.110", JpegXlRecompression: "1.2.840.10008.1.2.4.111", JpegXl: "1.2.840.10008.1.2.4.112", HtJpeg2000Lossless: "1.2.840.10008.1.2.4.201", HtJpeg2000LosslessRpcl: "1.2.840.10008.1.2.4.202", HtJpeg2000Lossy: "1.2.840.10008.1.2.4.203" };
47983
47983
  Object.freeze(t);
@@ -49624,8 +49624,8 @@ var require_dcmjs_dimse_min = __commonJS({
49624
49624
  "use strict";
49625
49625
  e2.exports = s;
49626
49626
  }, 237: (e2, t2, s2) => {
49627
- const { Association: n2, PresentationContext: i2 } = s2(570), { Scp: r7, Server: o3 } = s2(538), { CCancelRequest: a2, CEchoRequest: c3, CEchoResponse: d3, CFindRequest: u2, CFindResponse: h2, CGetRequest: m3, CGetResponse: g3, CMoveRequest: l2, CMoveResponse: p, CStoreRequest: R2, CStoreResponse: S3, NActionRequest: y2, NActionResponse: f2, NCreateRequest: I3, NCreateResponse: C2, NDeleteRequest: P, NDeleteResponse: v3, NEventReportRequest: x3, NEventReportResponse: A3, NGetRequest: U2, NGetResponse: w3, NSetRequest: D3, NSetResponse: q2 } = s2(940), { AbortReason: E3, AbortSource: T, CommandFieldType: b2, PresentationContextResult: O2, Priority: N, RawPduType: B3, RejectReason: M3, RejectResult: L2, RejectSource: F2, SopClass: k2, Status: $, StorageClass: j2, TransferSyntax: V2, Uid: _2, UserIdentityType: G2 } = s2(492), z = s2(422), Q2 = s2(825), W2 = s2(139), J2 = s2(906), X2 = s2(73), H3 = { association: { Association: n2, PresentationContext: i2 }, Client: z, constants: { AbortReason: E3, AbortSource: T, CommandFieldType: b2, PresentationContextResult: O2, Priority: N, RawPduType: B3, RejectReason: M3, RejectResult: L2, RejectSource: F2, SopClass: k2, Status: $, StorageClass: j2, TransferSyntax: V2, Uid: _2, UserIdentityType: G2 }, Dataset: Q2, Implementation: W2, log: s2(547), requests: { CCancelRequest: a2, CEchoRequest: c3, CFindRequest: u2, CGetRequest: m3, CMoveRequest: l2, CStoreRequest: R2, NActionRequest: y2, NCreateRequest: I3, NDeleteRequest: P, NEventReportRequest: x3, NGetRequest: U2, NSetRequest: D3 }, responses: { CEchoResponse: d3, CFindResponse: h2, CGetResponse: g3, CMoveResponse: p, CStoreResponse: S3, NActionResponse: f2, NCreateResponse: C2, NDeleteResponse: v3, NEventReportResponse: A3, NGetResponse: w3, NSetResponse: q2 }, Scp: r7, Server: o3, Statistics: J2, Transcoding: X2, version: s2(837) };
49628
- e2.exports = H3;
49627
+ const { Association: n2, PresentationContext: i2 } = s2(570), { Scp: r7, Server: o3 } = s2(538), { CCancelRequest: a2, CEchoRequest: c3, CEchoResponse: d3, CFindRequest: u2, CFindResponse: h2, CGetRequest: m3, CGetResponse: g3, CMoveRequest: l2, CMoveResponse: p, CStoreRequest: R3, CStoreResponse: S2, NActionRequest: y2, NActionResponse: f2, NCreateRequest: I3, NCreateResponse: C2, NDeleteRequest: P, NDeleteResponse: v3, NEventReportRequest: x3, NEventReportResponse: A3, NGetRequest: U2, NGetResponse: w3, NSetRequest: D3, NSetResponse: q2 } = s2(940), { AbortReason: E3, AbortSource: T, CommandFieldType: b3, PresentationContextResult: O2, Priority: N, RawPduType: B2, RejectReason: M3, RejectResult: L2, RejectSource: F2, SopClass: k2, Status: $, StorageClass: j2, TransferSyntax: V2, Uid: _2, UserIdentityType: G2 } = s2(492), z = s2(422), Q2 = s2(825), W2 = s2(139), J2 = s2(906), X2 = s2(73), H2 = { association: { Association: n2, PresentationContext: i2 }, Client: z, constants: { AbortReason: E3, AbortSource: T, CommandFieldType: b3, PresentationContextResult: O2, Priority: N, RawPduType: B2, RejectReason: M3, RejectResult: L2, RejectSource: F2, SopClass: k2, Status: $, StorageClass: j2, TransferSyntax: V2, Uid: _2, UserIdentityType: G2 }, Dataset: Q2, Implementation: W2, log: s2(547), requests: { CCancelRequest: a2, CEchoRequest: c3, CFindRequest: u2, CGetRequest: m3, CMoveRequest: l2, CStoreRequest: R3, NActionRequest: y2, NCreateRequest: I3, NDeleteRequest: P, NEventReportRequest: x3, NGetRequest: U2, NSetRequest: D3 }, responses: { CEchoResponse: d3, CFindResponse: h2, CGetResponse: g3, CMoveResponse: p, CStoreResponse: S2, NActionResponse: f2, NCreateResponse: C2, NDeleteResponse: v3, NEventReportResponse: A3, NGetResponse: w3, NSetResponse: q2 }, Scp: r7, Server: o3, Statistics: J2, Transcoding: X2, version: s2(837) };
49628
+ e2.exports = H2;
49629
49629
  }, 278: (e2) => {
49630
49630
  "use strict";
49631
49631
  e2.exports = require("net");
@@ -49633,8 +49633,8 @@ var require_dcmjs_dimse_min = __commonJS({
49633
49633
  "use strict";
49634
49634
  e2.exports = n;
49635
49635
  }, 371: (e2, t2, s2) => {
49636
- const { Association: n2 } = s2(570), { AAbort: i2, AAssociateAC: r7, AAssociateRJ: o3, AAssociateRQ: a2, AReleaseRP: c3, AReleaseRQ: d3, PDataTF: u2, Pdv: h2, RawPdu: m3 } = s2(942), { CommandFieldType: g3, RawPduType: l2, Status: p } = s2(492), { CCancelRequest: R2, CEchoRequest: S3, CEchoResponse: y2, CFindRequest: f2, CFindResponse: I3, CGetRequest: C2, CGetResponse: P, CMoveRequest: v3, CMoveResponse: x3, Command: A3, CStoreRequest: U2, CStoreResponse: w3, NActionRequest: D3, NActionResponse: q2, NCreateRequest: E3, NCreateResponse: T, NDeleteRequest: b2, NDeleteResponse: O2, NEventReportRequest: N, NEventReportResponse: B3, NGetRequest: M3, NGetResponse: L2, NSetRequest: F2, NSetResponse: k2, Response: $ } = s2(940), j2 = s2(825), V2 = s2(139), _2 = s2(906), G2 = s2(73), z = s2(547), { SmartBuffer: Q2 } = s2(766), { EOL: W2 } = s2(857), J2 = s2(0), X2 = s2(235);
49637
- class H3 extends J2 {
49636
+ const { Association: n2 } = s2(570), { AAbort: i2, AAssociateAC: r7, AAssociateRJ: o3, AAssociateRQ: a2, AReleaseRP: c3, AReleaseRQ: d3, PDataTF: u2, Pdv: h2, RawPdu: m3 } = s2(942), { CommandFieldType: g3, RawPduType: l2, Status: p } = s2(492), { CCancelRequest: R3, CEchoRequest: S2, CEchoResponse: y2, CFindRequest: f2, CFindResponse: I3, CGetRequest: C2, CGetResponse: P, CMoveRequest: v3, CMoveResponse: x3, Command: A3, CStoreRequest: U2, CStoreResponse: w3, NActionRequest: D3, NActionResponse: q2, NCreateRequest: E3, NCreateResponse: T, NDeleteRequest: b3, NDeleteResponse: O2, NEventReportRequest: N, NEventReportResponse: B2, NGetRequest: M3, NGetResponse: L2, NSetRequest: F2, NSetResponse: k2, Response: $ } = s2(940), j2 = s2(825), V2 = s2(139), _2 = s2(906), G2 = s2(73), z = s2(547), { SmartBuffer: Q2 } = s2(766), { EOL: W2 } = s2(857), J2 = s2(0), X2 = s2(235);
49637
+ class H2 extends J2 {
49638
49638
  constructor() {
49639
49639
  super();
49640
49640
  }
@@ -49705,7 +49705,7 @@ var require_dcmjs_dimse_min = __commonJS({
49705
49705
  }
49706
49706
  sendCancel(e3) {
49707
49707
  if (!this.association) return void z.error(`There is no association in which to cancel request ${e3.toString()}. Skipping...`);
49708
- const t3 = R2.fromRequest(e3), s3 = this.association.getAcceptedPresentationContextFromRequest(t3);
49708
+ const t3 = R3.fromRequest(e3), s3 = this.association.getAcceptedPresentationContextFromRequest(t3);
49709
49709
  if (!s3) return void z.error(`Could not find an accepted presentation context to cancel request ${e3.toString()}. Skipping...`);
49710
49710
  const n3 = { context: s3, command: t3 };
49711
49711
  this._sendDimse(n3);
@@ -49836,7 +49836,7 @@ var require_dcmjs_dimse_min = __commonJS({
49836
49836
  const e5 = new A3(new j2(this.dimseStream.toBuffer()));
49837
49837
  switch (e5.getCommandFieldType()) {
49838
49838
  case g3.CEchoRequest:
49839
- this.dimse = Object.assign(new S3(), e5);
49839
+ this.dimse = Object.assign(new S2(), e5);
49840
49840
  break;
49841
49841
  case g3.CEchoResponse:
49842
49842
  this.dimse = Object.assign(new y2(), e5);
@@ -49878,7 +49878,7 @@ var require_dcmjs_dimse_min = __commonJS({
49878
49878
  this.dimse = Object.assign(new q2(), e5);
49879
49879
  break;
49880
49880
  case g3.NDeleteRequest:
49881
- this.dimse = Object.assign(new b2(), e5);
49881
+ this.dimse = Object.assign(new b3(), e5);
49882
49882
  break;
49883
49883
  case g3.NDeleteResponse:
49884
49884
  this.dimse = Object.assign(new O2(), e5);
@@ -49887,7 +49887,7 @@ var require_dcmjs_dimse_min = __commonJS({
49887
49887
  this.dimse = Object.assign(new N(), e5);
49888
49888
  break;
49889
49889
  case g3.NEventReportResponse:
49890
- this.dimse = Object.assign(new B3(), e5);
49890
+ this.dimse = Object.assign(new B2(), e5);
49891
49891
  break;
49892
49892
  case g3.NGetRequest:
49893
49893
  this.dimse = Object.assign(new M3(), e5);
@@ -49902,7 +49902,7 @@ var require_dcmjs_dimse_min = __commonJS({
49902
49902
  this.dimse = Object.assign(new k2(), e5);
49903
49903
  break;
49904
49904
  case g3.CCancelRequest:
49905
- this.dimse = Object.assign(new R2(), e5);
49905
+ this.dimse = Object.assign(new R3(), e5);
49906
49906
  break;
49907
49907
  default:
49908
49908
  this.dimse = e5;
@@ -49961,7 +49961,7 @@ var require_dcmjs_dimse_min = __commonJS({
49961
49961
  this.socket.setTimeout(this.connectTimeout), this.socket.on("connect", () => {
49962
49962
  this.connected = true, this.connectedTime = Date.now(), this.emit("connect");
49963
49963
  });
49964
- const e3 = new H3();
49964
+ const e3 = new H2();
49965
49965
  e3.on("pdu", async (e4) => {
49966
49966
  this.lastPduTime = Date.now(), await this._processPdu(e4);
49967
49967
  }), e3.on("error", (e4) => {
@@ -50087,12 +50087,12 @@ var require_dcmjs_dimse_min = __commonJS({
50087
50087
  Object.freeze(l2);
50088
50088
  const p = { ImplicitVRLittleEndian: "1.2.840.10008.1.2", ExplicitVRLittleEndian: "1.2.840.10008.1.2.1", DeflatedExplicitVRLittleEndian: "1.2.840.10008.1.2.1.99", ExplicitVRBigEndian: "1.2.840.10008.1.2.2", RleLossless: "1.2.840.10008.1.2.5", JpegBaseline: "1.2.840.10008.1.2.4.50", JpegLossless: "1.2.840.10008.1.2.4.70", JpegLsLossless: "1.2.840.10008.1.2.4.80", JpegLsLossy: "1.2.840.10008.1.2.4.81", Jpeg2000Lossless: "1.2.840.10008.1.2.4.90", Jpeg2000Lossy: "1.2.840.10008.1.2.4.91", JpegXlLossless: "1.2.840.10008.1.2.4.110", JpegXlRecompression: "1.2.840.10008.1.2.4.111", JpegXl: "1.2.840.10008.1.2.4.112", HtJpeg2000Lossless: "1.2.840.10008.1.2.4.201", HtJpeg2000LosslessRpcl: "1.2.840.10008.1.2.4.202", HtJpeg2000Lossy: "1.2.840.10008.1.2.4.203" };
50089
50089
  Object.freeze(p);
50090
- const R2 = [p.ImplicitVRLittleEndian, p.ExplicitVRLittleEndian, p.ExplicitVRBigEndian, p.RleLossless, p.JpegBaseline, p.JpegLossless, p.JpegLsLossless, p.JpegLsLossy, p.Jpeg2000Lossless, p.Jpeg2000Lossy, p.HtJpeg2000Lossless, p.HtJpeg2000LosslessRpcl, p.HtJpeg2000Lossy];
50091
- Object.freeze(R2);
50092
- const S3 = { ImplementationClassUid: "1.2.826.0.1.3680043.10.854", ImplementationVersion: "DCMJS-DIMSE-V0.2", MaxPduLength: 262144 };
50093
- Object.freeze(S3), e2.exports = { AbortReason: o3, AbortSource: r7, CommandFieldType: s2, DefaultImplementation: S3, PresentationContextResult: n2, Priority: u2, RawPduType: t2, RejectReason: d3, RejectResult: a2, RejectSource: c3, SopClass: l2, Status: h2, StorageClass: g3, TranscodableTransferSyntaxes: R2, TransferSyntax: p, Uid: m3, UserIdentityType: i2 };
50090
+ const R3 = [p.ImplicitVRLittleEndian, p.ExplicitVRLittleEndian, p.ExplicitVRBigEndian, p.RleLossless, p.JpegBaseline, p.JpegLossless, p.JpegLsLossless, p.JpegLsLossy, p.Jpeg2000Lossless, p.Jpeg2000Lossy, p.HtJpeg2000Lossless, p.HtJpeg2000LosslessRpcl, p.HtJpeg2000Lossy];
50091
+ Object.freeze(R3);
50092
+ const S2 = { ImplementationClassUid: "1.2.826.0.1.3680043.10.854", ImplementationVersion: "DCMJS-DIMSE-V0.2", MaxPduLength: 262144 };
50093
+ Object.freeze(S2), e2.exports = { AbortReason: o3, AbortSource: r7, CommandFieldType: s2, DefaultImplementation: S2, PresentationContextResult: n2, Priority: u2, RawPduType: t2, RejectReason: d3, RejectResult: a2, RejectSource: c3, SopClass: l2, Status: h2, StorageClass: g3, TranscodableTransferSyntaxes: R3, TransferSyntax: p, Uid: m3, UserIdentityType: i2 };
50094
50094
  }, 538: (e2, t2, s2) => {
50095
- const { CEchoResponse: n2, CFindResponse: i2, CGetResponse: r7, CMoveResponse: o3, CStoreResponse: a2, NActionResponse: c3, NCreateResponse: d3, NDeleteResponse: u2, NEventReportResponse: h2, NGetResponse: m3, NSetResponse: g3 } = s2(940), l2 = s2(371), p = s2(906), R2 = s2(547), S3 = s2(0), y2 = s2(278), f2 = s2(756);
50095
+ const { CEchoResponse: n2, CFindResponse: i2, CGetResponse: r7, CMoveResponse: o3, CStoreResponse: a2, NActionResponse: c3, NCreateResponse: d3, NDeleteResponse: u2, NEventReportResponse: h2, NGetResponse: m3, NSetResponse: g3 } = s2(940), l2 = s2(371), p = s2(906), R3 = s2(547), S2 = s2(0), y2 = s2(278), f2 = s2(756);
50096
50096
  e2.exports = { Scp: class extends l2 {
50097
50097
  constructor(e3, t3) {
50098
50098
  super(e3, t3), this.on("associationRequested", (e4) => {
@@ -50134,51 +50134,51 @@ var require_dcmjs_dimse_min = __commonJS({
50134
50134
  return super.createDatasetFromStoreWritableStream(e3, t3, s3);
50135
50135
  }
50136
50136
  associationRequested(e3) {
50137
- R2.error("associationRequested method must be implemented"), this.sendAssociationReject();
50137
+ R3.error("associationRequested method must be implemented"), this.sendAssociationReject();
50138
50138
  }
50139
50139
  associationReleaseRequested() {
50140
- R2.error("associationReleaseRequested method must be implemented"), this.sendAssociationReleaseResponse();
50140
+ R3.error("associationReleaseRequested method must be implemented"), this.sendAssociationReleaseResponse();
50141
50141
  }
50142
50142
  cEchoRequest(e3, t3) {
50143
- R2.error("cEchoRequest method must be implemented"), t3(n2.fromRequest(e3));
50143
+ R3.error("cEchoRequest method must be implemented"), t3(n2.fromRequest(e3));
50144
50144
  }
50145
50145
  cFindRequest(e3, t3) {
50146
- R2.error("cFindRequest method must be implemented"), t3(i2.fromRequest(e3));
50146
+ R3.error("cFindRequest method must be implemented"), t3(i2.fromRequest(e3));
50147
50147
  }
50148
50148
  cStoreRequest(e3, t3) {
50149
- R2.error("cStoreRequest method must be implemented"), t3(a2.fromRequest(e3));
50149
+ R3.error("cStoreRequest method must be implemented"), t3(a2.fromRequest(e3));
50150
50150
  }
50151
50151
  cMoveRequest(e3, t3) {
50152
- R2.error("cMoveRequest method must be implemented"), t3(o3.fromRequest(e3));
50152
+ R3.error("cMoveRequest method must be implemented"), t3(o3.fromRequest(e3));
50153
50153
  }
50154
50154
  cGetRequest(e3, t3) {
50155
- R2.error("cGetRequest method must be implemented"), t3(r7.fromRequest(e3));
50155
+ R3.error("cGetRequest method must be implemented"), t3(r7.fromRequest(e3));
50156
50156
  }
50157
50157
  nCreateRequest(e3, t3) {
50158
- R2.error("nCreateRequest method must be implemented"), t3(d3.fromRequest(e3));
50158
+ R3.error("nCreateRequest method must be implemented"), t3(d3.fromRequest(e3));
50159
50159
  }
50160
50160
  nActionRequest(e3, t3) {
50161
- R2.error("nActionRequest method must be implemented"), t3(c3.fromRequest(e3));
50161
+ R3.error("nActionRequest method must be implemented"), t3(c3.fromRequest(e3));
50162
50162
  }
50163
50163
  nDeleteRequest(e3, t3) {
50164
- R2.error("nDeleteRequest method must be implemented"), t3(u2.fromRequest(e3));
50164
+ R3.error("nDeleteRequest method must be implemented"), t3(u2.fromRequest(e3));
50165
50165
  }
50166
50166
  nEventReportRequest(e3, t3) {
50167
- R2.error("nEventReportRequest method must be implemented"), t3(h2.fromRequest(e3));
50167
+ R3.error("nEventReportRequest method must be implemented"), t3(h2.fromRequest(e3));
50168
50168
  }
50169
50169
  nGetRequest(e3, t3) {
50170
- R2.error("nGetRequest method must be implemented"), t3(m3.fromRequest(e3));
50170
+ R3.error("nGetRequest method must be implemented"), t3(m3.fromRequest(e3));
50171
50171
  }
50172
50172
  nSetRequest(e3, t3) {
50173
- R2.error("nSetRequest method must be implemented"), t3(g3.fromRequest(e3));
50173
+ R3.error("nSetRequest method must be implemented"), t3(g3.fromRequest(e3));
50174
50174
  }
50175
50175
  cCancelRequest(e3) {
50176
- R2.error("cCancelRequest method must be implemented");
50176
+ R3.error("cCancelRequest method must be implemented");
50177
50177
  }
50178
50178
  abort(e3, t3) {
50179
- R2.error("abort method must be implemented");
50179
+ R3.error("abort method must be implemented");
50180
50180
  }
50181
- }, Server: class extends S3 {
50181
+ }, Server: class extends S2 {
50182
50182
  constructor(e3) {
50183
50183
  super(), this.scp = { class: e3 }, this.server = void 0, this.clients = [], this.statistics = new p();
50184
50184
  }
@@ -50187,7 +50187,7 @@ var require_dcmjs_dimse_min = __commonJS({
50187
50187
  (t3 = t3 || {}).securityOptions && (s3 = { key: t3.securityOptions.key, cert: t3.securityOptions.cert, ca: t3.securityOptions.ca, requestCert: t3.securityOptions.requestCert, rejectUnauthorized: t3.securityOptions.rejectUnauthorized, minVersion: t3.securityOptions.minVersion, maxVersion: t3.securityOptions.maxVersion, ciphers: t3.securityOptions.ciphers, SNICallback: t3.securityOptions.SNICallback });
50188
50188
  const n3 = t3.securityOptions ? f2 : y2;
50189
50189
  this.server = n3.createServer(s3, (e4) => {
50190
- R2.info(`Client connecting from ${e4.remoteAddress}:${e4.remotePort} ${t3.securityOptions ? e4.authorized ? "(Authorized)" : "(Unauthorized)" : ""}`);
50190
+ R3.info(`Client connecting from ${e4.remoteAddress}:${e4.remotePort} ${t3.securityOptions ? e4.authorized ? "(Authorized)" : "(Unauthorized)" : ""}`);
50191
50191
  const s4 = new this.scp.class(e4, t3);
50192
50192
  s4.connected = true, s4.on("close", () => {
50193
50193
  this.statistics.addFromOtherStatistics(s4.getStatistics());
@@ -50195,10 +50195,10 @@ var require_dcmjs_dimse_min = __commonJS({
50195
50195
  e4.end(), this.emit("networkError", t4);
50196
50196
  }), this.clients.push(s4), this.clients = this.clients.filter((e5) => e5.connected);
50197
50197
  }), this.server.on("listening", () => {
50198
- R2.info(`DICOM server listening on port ${e3} ${t3.securityOptions ? "(TLS)" : ""}`), this.emit("listening");
50198
+ R3.info(`DICOM server listening on port ${e3} ${t3.securityOptions ? "(TLS)" : ""}`), this.emit("listening");
50199
50199
  }), this.server.on("error", (e4) => {
50200
50200
  const t4 = `Server error: ${e4.message}`;
50201
- R2.error(t4), this.emit("networkError", e4);
50201
+ R3.error(t4), this.emit("networkError", e4);
50202
50202
  }), this.server.listen(e3);
50203
50203
  }
50204
50204
  getStatistics() {
@@ -50520,10 +50520,10 @@ var require_dcmjs_dimse_min = __commonJS({
50520
50520
  "use strict";
50521
50521
  e2.exports = a;
50522
50522
  }, 825: (e2, t2, s2) => {
50523
- const { StorageClass: n2, TransferSyntax: i2 } = s2(492), r7 = s2(139), { readFile: o3, readFileSync: a2, writeFile: c3, writeFileSync: d3 } = s2(896), { EOL: u2 } = s2(857), h2 = s2(111), { DicomDict: m3, DicomMessage: g3, DicomMetaDictionary: l2, ReadBufferStream: p, WriteBufferStream: R2 } = h2.data, S3 = h2.log;
50523
+ const { StorageClass: n2, TransferSyntax: i2 } = s2(492), r7 = s2(139), { readFile: o3, readFileSync: a2, writeFile: c3, writeFileSync: d3 } = s2(896), { EOL: u2 } = s2(857), h2 = s2(111), { DicomDict: m3, DicomMessage: g3, DicomMetaDictionary: l2, ReadBufferStream: p, WriteBufferStream: R3 } = h2.data, S2 = h2.log;
50524
50524
  class y2 {
50525
50525
  constructor(e3, t3, s3) {
50526
- s3 = s3 || {}, s3 = { ignoreErrors: true, ...s3 }, S3.level = "error", this.transferSyntaxUid = t3 || i2.ImplicitVRLittleEndian, Buffer.isBuffer(e3) ? this.elements = this._fromElementsBuffer(e3, this.transferSyntaxUid, s3) : this.elements = e3 || {};
50526
+ s3 = s3 || {}, s3 = { ignoreErrors: true, ...s3 }, S2.level = "error", this.transferSyntaxUid = t3 || i2.ImplicitVRLittleEndian, Buffer.isBuffer(e3) ? this.elements = this._fromElementsBuffer(e3, this.transferSyntaxUid, s3) : this.elements = e3 || {};
50527
50527
  }
50528
50528
  getElement(e3) {
50529
50529
  return this.elements[e3];
@@ -50541,11 +50541,11 @@ var require_dcmjs_dimse_min = __commonJS({
50541
50541
  this.transferSyntaxUid = e3;
50542
50542
  }
50543
50543
  getDenaturalizedDataset(e3, t3) {
50544
- const s3 = t3 ? l2.denaturalizeDataset(this.getElements(), { ...l2.nameMap, ...t3 }) : l2.denaturalizeDataset(this.getElements()), n3 = new R2();
50544
+ const s3 = t3 ? l2.denaturalizeDataset(this.getElements(), { ...l2.nameMap, ...t3 }) : l2.denaturalizeDataset(this.getElements()), n3 = new R3();
50545
50545
  return g3.write(s3, n3, this.transferSyntaxUid, e3), Buffer.from(n3.getBuffer());
50546
50546
  }
50547
50547
  getDenaturalizedCommandDataset(e3) {
50548
- const t3 = l2.denaturalizeDataset(this.getElements()), s3 = new R2(), n3 = new R2();
50548
+ const t3 = l2.denaturalizeDataset(this.getElements()), s3 = new R3(), n3 = new R3();
50549
50549
  return g3.write(t3, n3, i2.ImplicitVRLittleEndian, e3), g3.writeTagObject(s3, "00000000", "UL", n3.size, i2.ImplicitVRLittleEndian, e3), s3.concat(n3), Buffer.from(s3.getBuffer());
50550
50550
  }
50551
50551
  static fromFile(e3, t3, s3) {
@@ -50874,18 +50874,18 @@ var require_dcmjs_dimse_min = __commonJS({
50874
50874
  }
50875
50875
  }
50876
50876
  }
50877
- class R2 extends l2 {
50877
+ class R3 extends l2 {
50878
50878
  constructor() {
50879
50879
  super(n2.CEchoRequest, r7.Verification, false);
50880
50880
  }
50881
50881
  }
50882
- class S3 extends p {
50882
+ class S2 extends p {
50883
50883
  constructor(e3, t3) {
50884
50884
  super(n2.CEchoResponse, r7.Verification, false, e3, t3);
50885
50885
  }
50886
50886
  static fromRequest(e3) {
50887
- if (!(e3 instanceof R2)) throw new Error("Request should be an instance of CEchoRequest");
50888
- const t3 = new S3(o3.ProcessingFailure);
50887
+ if (!(e3 instanceof R3)) throw new Error("Request should be an instance of CEchoRequest");
50888
+ const t3 = new S2(o3.ProcessingFailure);
50889
50889
  return t3.setMessageIdBeingRespondedTo(e3.getMessageId()), t3;
50890
50890
  }
50891
50891
  }
@@ -51152,7 +51152,7 @@ var require_dcmjs_dimse_min = __commonJS({
51152
51152
  return t3.setMessageIdBeingRespondedTo(e3.getMessageId()), t3;
51153
51153
  }
51154
51154
  }
51155
- class b2 extends l2 {
51155
+ class b3 extends l2 {
51156
51156
  constructor(e3, t3, s3, i3) {
51157
51157
  super(n2.NEventReportRequest, e3, false), this.setAffectedSopInstanceUid(t3), this.setEventTypeId(s3), this.setMetaSopClassUid(i3);
51158
51158
  }
@@ -51174,7 +51174,7 @@ var require_dcmjs_dimse_min = __commonJS({
51174
51174
  this.getCommandDataset().setElement("EventTypeID", e3);
51175
51175
  }
51176
51176
  static fromRequest(e3) {
51177
- if (!(e3 instanceof b2)) throw new Error("Request should be an instance of NEventReportRequest");
51177
+ if (!(e3 instanceof b3)) throw new Error("Request should be an instance of NEventReportRequest");
51178
51178
  const t3 = new O2(e3.getAffectedSopClassUid(), e3.getAffectedSopInstanceUid(), e3.getEventTypeId(), o3.ProcessingFailure);
51179
51179
  return t3.setMessageIdBeingRespondedTo(e3.getMessageId()), t3;
51180
51180
  }
@@ -51205,13 +51205,13 @@ var require_dcmjs_dimse_min = __commonJS({
51205
51205
  return "0".repeat(t3 - s3.length) + s3;
51206
51206
  }
51207
51207
  }
51208
- class B3 extends p {
51208
+ class B2 extends p {
51209
51209
  constructor(e3, t3, s3, i3) {
51210
51210
  super(n2.NGetResponse, e3, false, s3, i3), this.setAffectedSopInstanceUid(t3);
51211
51211
  }
51212
51212
  static fromRequest(e3) {
51213
51213
  if (!(e3 instanceof N)) throw new Error("Request should be an instance of NGetRequest");
51214
- const t3 = new B3(e3.getRequestedSopClassUid(), e3.getRequestedSopInstanceUid(), o3.ProcessingFailure);
51214
+ const t3 = new B2(e3.getRequestedSopClassUid(), e3.getRequestedSopInstanceUid(), o3.ProcessingFailure);
51215
51215
  return t3.setMessageIdBeingRespondedTo(e3.getMessageId()), t3;
51216
51216
  }
51217
51217
  }
@@ -51245,7 +51245,7 @@ var require_dcmjs_dimse_min = __commonJS({
51245
51245
  return new F2(e3.getAffectedSopClassUid(), e3.getMessageId());
51246
51246
  }
51247
51247
  }
51248
- e2.exports = { CCancelRequest: F2, CEchoRequest: R2, CEchoResponse: S3, CFindRequest: y2, CFindResponse: f2, CGetRequest: x3, CGetResponse: A3, CMoveRequest: P, CMoveResponse: v3, Command: g3, CStoreRequest: I3, CStoreResponse: C2, NActionRequest: D3, NActionResponse: q2, NCreateRequest: U2, NCreateResponse: w3, NDeleteRequest: E3, NDeleteResponse: T, NEventReportRequest: b2, NEventReportResponse: O2, NGetRequest: N, NGetResponse: B3, NSetRequest: M3, NSetResponse: L2, Request: l2, Response: p };
51248
+ e2.exports = { CCancelRequest: F2, CEchoRequest: R3, CEchoResponse: S2, CFindRequest: y2, CFindResponse: f2, CGetRequest: x3, CGetResponse: A3, CMoveRequest: P, CMoveResponse: v3, Command: g3, CStoreRequest: I3, CStoreResponse: C2, NActionRequest: D3, NActionResponse: q2, NCreateRequest: U2, NCreateResponse: w3, NDeleteRequest: E3, NDeleteResponse: T, NEventReportRequest: b3, NEventReportResponse: O2, NGetRequest: N, NGetResponse: B2, NSetRequest: M3, NSetResponse: L2, Request: l2, Response: p };
51249
51249
  }, 942: (e2, t2, s2) => {
51250
51250
  const { AbortReason: n2, AbortSource: i2, RawPduType: r7, RejectReason: o3, RejectResult: a2, RejectSource: c3, TransferSyntax: d3 } = s2(492), { SmartBuffer: u2 } = s2(766), { EOL: h2 } = s2(857);
51251
51251
  class m3 {
@@ -58371,9 +58371,9 @@ var require_index_cjs = __commonJS({
58371
58371
  const alpha = Number.parseFloat(match[4]);
58372
58372
  const h2 = (Number.parseFloat(match[1]) % 360 + 360) % 360;
58373
58373
  const w3 = clamp(Number.parseFloat(match[2]), 0, 100);
58374
- const b2 = clamp(Number.parseFloat(match[3]), 0, 100);
58374
+ const b3 = clamp(Number.parseFloat(match[3]), 0, 100);
58375
58375
  const a = clamp(Number.isNaN(alpha) ? 1 : alpha, 0, 1);
58376
- return [h2, w3, b2, a];
58376
+ return [h2, w3, b3, a];
58377
58377
  }
58378
58378
  return null;
58379
58379
  };
@@ -58386,8 +58386,8 @@ var require_index_cjs = __commonJS({
58386
58386
  cs.to.rgb.percent = function(...rgba) {
58387
58387
  const r6 = Math.round(rgba[0] / 255 * 100);
58388
58388
  const g3 = Math.round(rgba[1] / 255 * 100);
58389
- const b2 = Math.round(rgba[2] / 255 * 100);
58390
- return rgba.length < 4 || rgba[3] === 1 ? "rgb(" + r6 + "%, " + g3 + "%, " + b2 + "%)" : "rgba(" + r6 + "%, " + g3 + "%, " + b2 + "%, " + rgba[3] + ")";
58389
+ const b3 = Math.round(rgba[2] / 255 * 100);
58390
+ return rgba.length < 4 || rgba[3] === 1 ? "rgb(" + r6 + "%, " + g3 + "%, " + b3 + "%)" : "rgba(" + r6 + "%, " + g3 + "%, " + b3 + "%, " + rgba[3] + ")";
58391
58391
  };
58392
58392
  cs.to.hsl = function(...hsla) {
58393
58393
  return hsla.length < 4 || hsla[3] === 1 ? "hsl(" + hsla[0] + ", " + hsla[1] + "%, " + hsla[2] + "%)" : "hsla(" + hsla[0] + ", " + hsla[1] + "%, " + hsla[2] + "%, " + hsla[3] + ")";
@@ -58459,9 +58459,9 @@ var require_index_cjs = __commonJS({
58459
58459
  convert$1.rgb.hsl = function(rgb) {
58460
58460
  const r6 = rgb[0] / 255;
58461
58461
  const g3 = rgb[1] / 255;
58462
- const b2 = rgb[2] / 255;
58463
- const min = Math.min(r6, g3, b2);
58464
- const max = Math.max(r6, g3, b2);
58462
+ const b3 = rgb[2] / 255;
58463
+ const min = Math.min(r6, g3, b3);
58464
+ const max = Math.max(r6, g3, b3);
58465
58465
  const delta = max - min;
58466
58466
  let h2;
58467
58467
  let s;
@@ -58471,14 +58471,14 @@ var require_index_cjs = __commonJS({
58471
58471
  break;
58472
58472
  }
58473
58473
  case r6: {
58474
- h2 = (g3 - b2) / delta;
58474
+ h2 = (g3 - b3) / delta;
58475
58475
  break;
58476
58476
  }
58477
58477
  case g3: {
58478
- h2 = 2 + (b2 - r6) / delta;
58478
+ h2 = 2 + (b3 - r6) / delta;
58479
58479
  break;
58480
58480
  }
58481
- case b2: {
58481
+ case b3: {
58482
58482
  h2 = 4 + (r6 - g3) / delta;
58483
58483
  break;
58484
58484
  }
@@ -58505,9 +58505,9 @@ var require_index_cjs = __commonJS({
58505
58505
  let s;
58506
58506
  const r6 = rgb[0] / 255;
58507
58507
  const g3 = rgb[1] / 255;
58508
- const b2 = rgb[2] / 255;
58509
- const v3 = Math.max(r6, g3, b2);
58510
- const diff = v3 - Math.min(r6, g3, b2);
58508
+ const b3 = rgb[2] / 255;
58509
+ const v3 = Math.max(r6, g3, b3);
58510
+ const diff = v3 - Math.min(r6, g3, b3);
58511
58511
  const diffc = function(c2) {
58512
58512
  return (v3 - c2) / 6 / diff + 1 / 2;
58513
58513
  };
@@ -58518,7 +58518,7 @@ var require_index_cjs = __commonJS({
58518
58518
  s = diff / v3;
58519
58519
  rdif = diffc(r6);
58520
58520
  gdif = diffc(g3);
58521
- bdif = diffc(b2);
58521
+ bdif = diffc(b3);
58522
58522
  switch (v3) {
58523
58523
  case r6: {
58524
58524
  h2 = bdif - gdif;
@@ -58528,7 +58528,7 @@ var require_index_cjs = __commonJS({
58528
58528
  h2 = 1 / 3 + rdif - bdif;
58529
58529
  break;
58530
58530
  }
58531
- case b2: {
58531
+ case b3: {
58532
58532
  h2 = 2 / 3 + gdif - rdif;
58533
58533
  break;
58534
58534
  }
@@ -58548,19 +58548,19 @@ var require_index_cjs = __commonJS({
58548
58548
  convert$1.rgb.hwb = function(rgb) {
58549
58549
  const r6 = rgb[0];
58550
58550
  const g3 = rgb[1];
58551
- let b2 = rgb[2];
58551
+ let b3 = rgb[2];
58552
58552
  const h2 = convert$1.rgb.hsl(rgb)[0];
58553
- const w3 = 1 / 255 * Math.min(r6, Math.min(g3, b2));
58554
- b2 = 1 - 1 / 255 * Math.max(r6, Math.max(g3, b2));
58555
- return [h2, w3 * 100, b2 * 100];
58553
+ const w3 = 1 / 255 * Math.min(r6, Math.min(g3, b3));
58554
+ b3 = 1 - 1 / 255 * Math.max(r6, Math.max(g3, b3));
58555
+ return [h2, w3 * 100, b3 * 100];
58556
58556
  };
58557
58557
  convert$1.rgb.oklab = function(rgb) {
58558
58558
  const r6 = srgbNonlinearTransformInv(rgb[0] / 255);
58559
58559
  const g3 = srgbNonlinearTransformInv(rgb[1] / 255);
58560
- const b2 = srgbNonlinearTransformInv(rgb[2] / 255);
58561
- const lp = Math.cbrt(0.4122214708 * r6 + 0.5363325363 * g3 + 0.0514459929 * b2);
58562
- const mp = Math.cbrt(0.2119034982 * r6 + 0.6806995451 * g3 + 0.1073969566 * b2);
58563
- const sp = Math.cbrt(0.0883024619 * r6 + 0.2817188376 * g3 + 0.6299787005 * b2);
58560
+ const b3 = srgbNonlinearTransformInv(rgb[2] / 255);
58561
+ const lp = Math.cbrt(0.4122214708 * r6 + 0.5363325363 * g3 + 0.0514459929 * b3);
58562
+ const mp = Math.cbrt(0.2119034982 * r6 + 0.6806995451 * g3 + 0.1073969566 * b3);
58563
+ const sp = Math.cbrt(0.0883024619 * r6 + 0.2817188376 * g3 + 0.6299787005 * b3);
58564
58564
  const l2 = 0.2104542553 * lp + 0.793617785 * mp - 0.0040720468 * sp;
58565
58565
  const aa = 1.9779984951 * lp - 2.428592205 * mp + 0.4505937099 * sp;
58566
58566
  const bb = 0.0259040371 * lp + 0.7827717662 * mp - 0.808675766 * sp;
@@ -58569,11 +58569,11 @@ var require_index_cjs = __commonJS({
58569
58569
  convert$1.rgb.cmyk = function(rgb) {
58570
58570
  const r6 = rgb[0] / 255;
58571
58571
  const g3 = rgb[1] / 255;
58572
- const b2 = rgb[2] / 255;
58573
- const k2 = Math.min(1 - r6, 1 - g3, 1 - b2);
58572
+ const b3 = rgb[2] / 255;
58573
+ const k2 = Math.min(1 - r6, 1 - g3, 1 - b3);
58574
58574
  const c2 = (1 - r6 - k2) / (1 - k2) || 0;
58575
58575
  const m3 = (1 - g3 - k2) / (1 - k2) || 0;
58576
- const y2 = (1 - b2 - k2) / (1 - k2) || 0;
58576
+ const y2 = (1 - b3 - k2) / (1 - k2) || 0;
58577
58577
  return [c2 * 100, m3 * 100, y2 * 100, k2 * 100];
58578
58578
  };
58579
58579
  function comparativeDistance(x3, y2) {
@@ -58602,10 +58602,10 @@ var require_index_cjs = __commonJS({
58602
58602
  convert$1.rgb.xyz = function(rgb) {
58603
58603
  const r6 = srgbNonlinearTransformInv(rgb[0] / 255);
58604
58604
  const g3 = srgbNonlinearTransformInv(rgb[1] / 255);
58605
- const b2 = srgbNonlinearTransformInv(rgb[2] / 255);
58606
- const x3 = r6 * 0.4124564 + g3 * 0.3575761 + b2 * 0.1804375;
58607
- const y2 = r6 * 0.2126729 + g3 * 0.7151522 + b2 * 0.072175;
58608
- const z = r6 * 0.0193339 + g3 * 0.119192 + b2 * 0.9503041;
58605
+ const b3 = srgbNonlinearTransformInv(rgb[2] / 255);
58606
+ const x3 = r6 * 0.4124564 + g3 * 0.3575761 + b3 * 0.1804375;
58607
+ const y2 = r6 * 0.2126729 + g3 * 0.7151522 + b3 * 0.072175;
58608
+ const z = r6 * 0.0193339 + g3 * 0.119192 + b3 * 0.9503041;
58609
58609
  return [x3 * 100, y2 * 100, z * 100];
58610
58610
  };
58611
58611
  convert$1.rgb.lab = function(rgb) {
@@ -58621,8 +58621,8 @@ var require_index_cjs = __commonJS({
58621
58621
  z = z > LAB_FT ? z ** (1 / 3) : 7.787 * z + 16 / 116;
58622
58622
  const l2 = 116 * y2 - 16;
58623
58623
  const a = 500 * (x3 - y2);
58624
- const b2 = 200 * (y2 - z);
58625
- return [l2, a, b2];
58624
+ const b3 = 200 * (y2 - z);
58625
+ return [l2, a, b3];
58626
58626
  };
58627
58627
  convert$1.hsl.rgb = function(hsl) {
58628
58628
  const h2 = hsl[0] / 360;
@@ -58736,48 +58736,48 @@ var require_index_cjs = __commonJS({
58736
58736
  const n = wh + f2 * (v3 - wh);
58737
58737
  let r6;
58738
58738
  let g3;
58739
- let b2;
58739
+ let b3;
58740
58740
  switch (i) {
58741
58741
  default:
58742
58742
  case 6:
58743
58743
  case 0: {
58744
58744
  r6 = v3;
58745
58745
  g3 = n;
58746
- b2 = wh;
58746
+ b3 = wh;
58747
58747
  break;
58748
58748
  }
58749
58749
  case 1: {
58750
58750
  r6 = n;
58751
58751
  g3 = v3;
58752
- b2 = wh;
58752
+ b3 = wh;
58753
58753
  break;
58754
58754
  }
58755
58755
  case 2: {
58756
58756
  r6 = wh;
58757
58757
  g3 = v3;
58758
- b2 = n;
58758
+ b3 = n;
58759
58759
  break;
58760
58760
  }
58761
58761
  case 3: {
58762
58762
  r6 = wh;
58763
58763
  g3 = n;
58764
- b2 = v3;
58764
+ b3 = v3;
58765
58765
  break;
58766
58766
  }
58767
58767
  case 4: {
58768
58768
  r6 = n;
58769
58769
  g3 = wh;
58770
- b2 = v3;
58770
+ b3 = v3;
58771
58771
  break;
58772
58772
  }
58773
58773
  case 5: {
58774
58774
  r6 = v3;
58775
58775
  g3 = wh;
58776
- b2 = n;
58776
+ b3 = n;
58777
58777
  break;
58778
58778
  }
58779
58779
  }
58780
- return [r6 * 255, g3 * 255, b2 * 255];
58780
+ return [r6 * 255, g3 * 255, b3 * 255];
58781
58781
  };
58782
58782
  convert$1.cmyk.rgb = function(cmyk) {
58783
58783
  const c2 = cmyk[0] / 100;
@@ -58786,8 +58786,8 @@ var require_index_cjs = __commonJS({
58786
58786
  const k2 = cmyk[3] / 100;
58787
58787
  const r6 = 1 - Math.min(1, c2 * (1 - k2) + k2);
58788
58788
  const g3 = 1 - Math.min(1, m3 * (1 - k2) + k2);
58789
- const b2 = 1 - Math.min(1, y2 * (1 - k2) + k2);
58790
- return [r6 * 255, g3 * 255, b2 * 255];
58789
+ const b3 = 1 - Math.min(1, y2 * (1 - k2) + k2);
58790
+ return [r6 * 255, g3 * 255, b3 * 255];
58791
58791
  };
58792
58792
  convert$1.xyz.rgb = function(xyz) {
58793
58793
  const x3 = xyz[0] / 100;
@@ -58795,14 +58795,14 @@ var require_index_cjs = __commonJS({
58795
58795
  const z = xyz[2] / 100;
58796
58796
  let r6;
58797
58797
  let g3;
58798
- let b2;
58798
+ let b3;
58799
58799
  r6 = x3 * 3.2404542 + y2 * -1.5371385 + z * -0.4985314;
58800
58800
  g3 = x3 * -0.969266 + y2 * 1.8760108 + z * 0.041556;
58801
- b2 = x3 * 0.0556434 + y2 * -0.2040259 + z * 1.0572252;
58801
+ b3 = x3 * 0.0556434 + y2 * -0.2040259 + z * 1.0572252;
58802
58802
  r6 = srgbNonlinearTransform(r6);
58803
58803
  g3 = srgbNonlinearTransform(g3);
58804
- b2 = srgbNonlinearTransform(b2);
58805
- return [r6 * 255, g3 * 255, b2 * 255];
58804
+ b3 = srgbNonlinearTransform(b3);
58805
+ return [r6 * 255, g3 * 255, b3 * 255];
58806
58806
  };
58807
58807
  convert$1.xyz.lab = function(xyz) {
58808
58808
  let x3 = xyz[0];
@@ -58816,8 +58816,8 @@ var require_index_cjs = __commonJS({
58816
58816
  z = z > LAB_FT ? z ** (1 / 3) : 7.787 * z + 16 / 116;
58817
58817
  const l2 = 116 * y2 - 16;
58818
58818
  const a = 500 * (x3 - y2);
58819
- const b2 = 200 * (y2 - z);
58820
- return [l2, a, b2];
58819
+ const b3 = 200 * (y2 - z);
58820
+ return [l2, a, b3];
58821
58821
  };
58822
58822
  convert$1.xyz.oklab = function(xyz) {
58823
58823
  const x3 = xyz[0] / 100;
@@ -58828,8 +58828,8 @@ var require_index_cjs = __commonJS({
58828
58828
  const sp = Math.cbrt(0.0482003018 * x3 + 0.2643662691 * y2 + 0.633851707 * z);
58829
58829
  const l2 = 0.2104542553 * lp + 0.793617785 * mp - 0.0040720468 * sp;
58830
58830
  const a = 1.9779984951 * lp - 2.428592205 * mp + 0.4505937099 * sp;
58831
- const b2 = 0.0259040371 * lp + 0.7827717662 * mp - 0.808675766 * sp;
58832
- return [l2 * 100, a * 100, b2 * 100];
58831
+ const b3 = 0.0259040371 * lp + 0.7827717662 * mp - 0.808675766 * sp;
58832
+ return [l2 * 100, a * 100, b3 * 100];
58833
58833
  };
58834
58834
  convert$1.oklab.oklch = function(oklab) {
58835
58835
  return convert$1.lab.lch(oklab);
@@ -58837,10 +58837,10 @@ var require_index_cjs = __commonJS({
58837
58837
  convert$1.oklab.xyz = function(oklab) {
58838
58838
  const ll = oklab[0] / 100;
58839
58839
  const a = oklab[1] / 100;
58840
- const b2 = oklab[2] / 100;
58841
- const l2 = (0.999999998 * ll + 0.396337792 * a + 0.215803758 * b2) ** 3;
58842
- const m3 = (1.000000008 * ll - 0.105561342 * a - 0.063854175 * b2) ** 3;
58843
- const s = (1.000000055 * ll - 0.089484182 * a - 1.291485538 * b2) ** 3;
58840
+ const b3 = oklab[2] / 100;
58841
+ const l2 = (0.999999998 * ll + 0.396337792 * a + 0.215803758 * b3) ** 3;
58842
+ const m3 = (1.000000008 * ll - 0.105561342 * a - 0.063854175 * b3) ** 3;
58843
+ const s = (1.000000055 * ll - 0.089484182 * a - 1.291485538 * b3) ** 3;
58844
58844
  const x3 = 1.227013851 * l2 - 0.55779998 * m3 + 0.281256149 * s;
58845
58845
  const y2 = -0.040580178 * l2 + 1.11225687 * m3 - 0.071676679 * s;
58846
58846
  const z = -0.076381285 * l2 - 0.421481978 * m3 + 1.58616322 * s;
@@ -58855,8 +58855,8 @@ var require_index_cjs = __commonJS({
58855
58855
  const s = (ll - 0.0894841775 * aa - 1.291485548 * bb) ** 3;
58856
58856
  const r6 = srgbNonlinearTransform(4.0767416621 * l2 - 3.3077115913 * m3 + 0.2309699292 * s);
58857
58857
  const g3 = srgbNonlinearTransform(-1.2684380046 * l2 + 2.6097574011 * m3 - 0.3413193965 * s);
58858
- const b2 = srgbNonlinearTransform(-0.0041960863 * l2 - 0.7034186147 * m3 + 1.707614701 * s);
58859
- return [r6 * 255, g3 * 255, b2 * 255];
58858
+ const b3 = srgbNonlinearTransform(-0.0041960863 * l2 - 0.7034186147 * m3 + 1.707614701 * s);
58859
+ return [r6 * 255, g3 * 255, b3 * 255];
58860
58860
  };
58861
58861
  convert$1.oklch.oklab = function(oklch) {
58862
58862
  return convert$1.lch.lab(oklch);
@@ -58864,13 +58864,13 @@ var require_index_cjs = __commonJS({
58864
58864
  convert$1.lab.xyz = function(lab) {
58865
58865
  const l2 = lab[0];
58866
58866
  const a = lab[1];
58867
- const b2 = lab[2];
58867
+ const b3 = lab[2];
58868
58868
  let x3;
58869
58869
  let y2;
58870
58870
  let z;
58871
58871
  y2 = (l2 + 16) / 116;
58872
58872
  x3 = a / 500 + y2;
58873
- z = y2 - b2 / 200;
58873
+ z = y2 - b3 / 200;
58874
58874
  const y22 = y2 ** 3;
58875
58875
  const x22 = x3 ** 3;
58876
58876
  const z2 = z ** 3;
@@ -58885,14 +58885,14 @@ var require_index_cjs = __commonJS({
58885
58885
  convert$1.lab.lch = function(lab) {
58886
58886
  const l2 = lab[0];
58887
58887
  const a = lab[1];
58888
- const b2 = lab[2];
58888
+ const b3 = lab[2];
58889
58889
  let h2;
58890
- const hr = Math.atan2(b2, a);
58890
+ const hr = Math.atan2(b3, a);
58891
58891
  h2 = hr * 360 / 2 / Math.PI;
58892
58892
  if (h2 < 0) {
58893
58893
  h2 += 360;
58894
58894
  }
58895
- const c2 = Math.sqrt(a * a + b2 * b2);
58895
+ const c2 = Math.sqrt(a * a + b3 * b3);
58896
58896
  return [l2, c2, h2];
58897
58897
  };
58898
58898
  convert$1.lch.lab = function(lch) {
@@ -58901,17 +58901,17 @@ var require_index_cjs = __commonJS({
58901
58901
  const h2 = lch[2];
58902
58902
  const hr = h2 / 360 * 2 * Math.PI;
58903
58903
  const a = c2 * Math.cos(hr);
58904
- const b2 = c2 * Math.sin(hr);
58905
- return [l2, a, b2];
58904
+ const b3 = c2 * Math.sin(hr);
58905
+ return [l2, a, b3];
58906
58906
  };
58907
58907
  convert$1.rgb.ansi16 = function(args, saturation = null) {
58908
- const [r6, g3, b2] = args;
58908
+ const [r6, g3, b3] = args;
58909
58909
  let value = saturation === null ? convert$1.rgb.hsv(args)[2] : saturation;
58910
58910
  value = Math.round(value / 50);
58911
58911
  if (value === 0) {
58912
58912
  return 30;
58913
58913
  }
58914
- let ansi = 30 + (Math.round(b2 / 255) << 2 | Math.round(g3 / 255) << 1 | Math.round(r6 / 255));
58914
+ let ansi = 30 + (Math.round(b3 / 255) << 2 | Math.round(g3 / 255) << 1 | Math.round(r6 / 255));
58915
58915
  if (value === 2) {
58916
58916
  ansi += 60;
58917
58917
  }
@@ -58923,8 +58923,8 @@ var require_index_cjs = __commonJS({
58923
58923
  convert$1.rgb.ansi256 = function(args) {
58924
58924
  const r6 = args[0];
58925
58925
  const g3 = args[1];
58926
- const b2 = args[2];
58927
- if (r6 >> 4 === g3 >> 4 && g3 >> 4 === b2 >> 4) {
58926
+ const b3 = args[2];
58927
+ if (r6 >> 4 === g3 >> 4 && g3 >> 4 === b3 >> 4) {
58928
58928
  if (r6 < 8) {
58929
58929
  return 16;
58930
58930
  }
@@ -58933,7 +58933,7 @@ var require_index_cjs = __commonJS({
58933
58933
  }
58934
58934
  return Math.round((r6 - 8) / 247 * 24) + 232;
58935
58935
  }
58936
- const ansi = 16 + 36 * Math.round(r6 / 255 * 5) + 6 * Math.round(g3 / 255 * 5) + Math.round(b2 / 255 * 5);
58936
+ const ansi = 16 + 36 * Math.round(r6 / 255 * 5) + 6 * Math.round(g3 / 255 * 5) + Math.round(b3 / 255 * 5);
58937
58937
  return ansi;
58938
58938
  };
58939
58939
  convert$1.ansi16.rgb = function(args) {
@@ -58949,8 +58949,8 @@ var require_index_cjs = __commonJS({
58949
58949
  const mult = (Math.trunc(args > 50) + 1) * 0.5;
58950
58950
  const r6 = (color & 1) * mult * 255;
58951
58951
  const g3 = (color >> 1 & 1) * mult * 255;
58952
- const b2 = (color >> 2 & 1) * mult * 255;
58953
- return [r6, g3, b2];
58952
+ const b3 = (color >> 2 & 1) * mult * 255;
58953
+ return [r6, g3, b3];
58954
58954
  };
58955
58955
  convert$1.ansi256.rgb = function(args) {
58956
58956
  args = args[0];
@@ -58962,8 +58962,8 @@ var require_index_cjs = __commonJS({
58962
58962
  let rem;
58963
58963
  const r6 = Math.floor(args / 36) / 5 * 255;
58964
58964
  const g3 = Math.floor((rem = args % 36) / 6) / 5 * 255;
58965
- const b2 = rem % 6 / 5 * 255;
58966
- return [r6, g3, b2];
58965
+ const b3 = rem % 6 / 5 * 255;
58966
+ return [r6, g3, b3];
58967
58967
  };
58968
58968
  convert$1.rgb.hex = function(args) {
58969
58969
  const integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255);
@@ -58982,24 +58982,24 @@ var require_index_cjs = __commonJS({
58982
58982
  const integer = Number.parseInt(colorString, 16);
58983
58983
  const r6 = integer >> 16 & 255;
58984
58984
  const g3 = integer >> 8 & 255;
58985
- const b2 = integer & 255;
58986
- return [r6, g3, b2];
58985
+ const b3 = integer & 255;
58986
+ return [r6, g3, b3];
58987
58987
  };
58988
58988
  convert$1.rgb.hcg = function(rgb) {
58989
58989
  const r6 = rgb[0] / 255;
58990
58990
  const g3 = rgb[1] / 255;
58991
- const b2 = rgb[2] / 255;
58992
- const max = Math.max(Math.max(r6, g3), b2);
58993
- const min = Math.min(Math.min(r6, g3), b2);
58991
+ const b3 = rgb[2] / 255;
58992
+ const max = Math.max(Math.max(r6, g3), b3);
58993
+ const min = Math.min(Math.min(r6, g3), b3);
58994
58994
  const chroma = max - min;
58995
58995
  let hue;
58996
58996
  const grayscale = chroma < 1 ? min / (1 - chroma) : 0;
58997
58997
  if (chroma <= 0) {
58998
58998
  hue = 0;
58999
58999
  } else if (max === r6) {
59000
- hue = (g3 - b2) / chroma % 6;
59000
+ hue = (g3 - b3) / chroma % 6;
59001
59001
  } else if (max === g3) {
59002
- hue = 2 + (b2 - r6) / chroma;
59002
+ hue = 2 + (b3 - r6) / chroma;
59003
59003
  } else {
59004
59004
  hue = 4 + (r6 - g3) / chroma;
59005
59005
  }
@@ -59113,8 +59113,8 @@ var require_index_cjs = __commonJS({
59113
59113
  };
59114
59114
  convert$1.hwb.hcg = function(hwb) {
59115
59115
  const w3 = hwb[1] / 100;
59116
- const b2 = hwb[2] / 100;
59117
- const v3 = 1 - b2;
59116
+ const b3 = hwb[2] / 100;
59117
+ const v3 = 1 - b3;
59118
59118
  const c2 = v3 - w3;
59119
59119
  let g3 = 0;
59120
59120
  if (c2 < 1) {
@@ -59695,15 +59695,15 @@ var require_kuler = __commonJS({
59695
59695
  color[1] = color[0];
59696
59696
  color = color.join("");
59697
59697
  }
59698
- var r6 = color.substring(0, 2), g3 = color.substring(2, 4), b2 = color.substring(4, 6);
59699
- return [parseInt(r6, 16), parseInt(g3, 16), parseInt(b2, 16)];
59698
+ var r6 = color.substring(0, 2), g3 = color.substring(2, 4), b3 = color.substring(4, 6);
59699
+ return [parseInt(r6, 16), parseInt(g3, 16), parseInt(b3, 16)];
59700
59700
  };
59701
- Kuler.prototype.rgb = function rgb(r6, g3, b2) {
59702
- var red = r6 / 255 * 5, green = g3 / 255 * 5, blue = b2 / 255 * 5;
59701
+ Kuler.prototype.rgb = function rgb(r6, g3, b3) {
59702
+ var red = r6 / 255 * 5, green = g3 / 255 * 5, blue = b3 / 255 * 5;
59703
59703
  return this.ansi(red, green, blue);
59704
59704
  };
59705
- Kuler.prototype.ansi = function ansi(r6, g3, b2) {
59706
- var red = Math.round(r6), green = Math.round(g3), blue = Math.round(b2);
59705
+ Kuler.prototype.ansi = function ansi(r6, g3, b3) {
59706
+ var red = Math.round(r6), green = Math.round(g3), blue = Math.round(b3);
59707
59707
  return 16 + red * 36 + green * 6 + blue;
59708
59708
  };
59709
59709
  Kuler.prototype.reset = function reset() {
@@ -62801,11 +62801,11 @@ var require_object_hash = __commonJS({
62801
62801
  function PassThrough() {
62802
62802
  return {
62803
62803
  buf: "",
62804
- write: function(b2) {
62805
- this.buf += b2;
62804
+ write: function(b3) {
62805
+ this.buf += b3;
62806
62806
  },
62807
- end: function(b2) {
62808
- this.buf += b2;
62807
+ end: function(b3) {
62808
+ this.buf += b3;
62809
62809
  },
62810
62810
  read: function() {
62811
62811
  return this.buf;
@@ -62836,8 +62836,8 @@ var require_moment = __commonJS({
62836
62836
  function isObject(input) {
62837
62837
  return input != null && Object.prototype.toString.call(input) === "[object Object]";
62838
62838
  }
62839
- function hasOwnProp(a, b2) {
62840
- return Object.prototype.hasOwnProperty.call(a, b2);
62839
+ function hasOwnProp(a, b3) {
62840
+ return Object.prototype.hasOwnProperty.call(a, b3);
62841
62841
  }
62842
62842
  function isObjectEmpty(obj) {
62843
62843
  if (Object.getOwnPropertyNames) {
@@ -62868,17 +62868,17 @@ var require_moment = __commonJS({
62868
62868
  }
62869
62869
  return res;
62870
62870
  }
62871
- function extend(a, b2) {
62872
- for (var i in b2) {
62873
- if (hasOwnProp(b2, i)) {
62874
- a[i] = b2[i];
62871
+ function extend(a, b3) {
62872
+ for (var i in b3) {
62873
+ if (hasOwnProp(b3, i)) {
62874
+ a[i] = b3[i];
62875
62875
  }
62876
62876
  }
62877
- if (hasOwnProp(b2, "toString")) {
62878
- a.toString = b2.toString;
62877
+ if (hasOwnProp(b3, "toString")) {
62878
+ a.toString = b3.toString;
62879
62879
  }
62880
- if (hasOwnProp(b2, "valueOf")) {
62881
- a.valueOf = b2.valueOf;
62880
+ if (hasOwnProp(b3, "valueOf")) {
62881
+ a.valueOf = b3.valueOf;
62882
62882
  }
62883
62883
  return a;
62884
62884
  }
@@ -63354,8 +63354,8 @@ var require_moment = __commonJS({
63354
63354
  units.push({ unit: u2, priority: priorities[u2] });
63355
63355
  }
63356
63356
  }
63357
- units.sort(function(a, b2) {
63358
- return a.priority - b2.priority;
63357
+ units.sort(function(a, b3) {
63358
+ return a.priority - b3.priority;
63359
63359
  });
63360
63360
  return units;
63361
63361
  }
@@ -63768,8 +63768,8 @@ var require_moment = __commonJS({
63768
63768
  }
63769
63769
  }
63770
63770
  function computeMonthsParse() {
63771
- function cmpLenRev(a, b2) {
63772
- return b2.length - a.length;
63771
+ function cmpLenRev(a, b3) {
63772
+ return b3.length - a.length;
63773
63773
  }
63774
63774
  var shortPieces = [], longPieces = [], mixedPieces = [], i, mom, shortP, longP;
63775
63775
  for (i = 0; i < 12; i++) {
@@ -63952,8 +63952,8 @@ var require_moment = __commonJS({
63952
63952
  }
63953
63953
  return isNaN(input) ? null : input;
63954
63954
  }
63955
- function shiftWeekdays(ws, n) {
63956
- return ws.slice(n, 7).concat(ws.slice(0, n));
63955
+ function shiftWeekdays(ws2, n) {
63956
+ return ws2.slice(n, 7).concat(ws2.slice(0, n));
63957
63957
  }
63958
63958
  var defaultLocaleWeekdays = "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), defaultLocaleWeekdaysShort = "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"), defaultLocaleWeekdaysMin = "Su_Mo_Tu_We_Th_Fr_Sa".split("_"), defaultWeekdaysRegex = matchWord, defaultWeekdaysShortRegex = matchWord, defaultWeekdaysMinRegex = matchWord;
63959
63959
  function localeWeekdays(m3, format2) {
@@ -64157,8 +64157,8 @@ var require_moment = __commonJS({
64157
64157
  }
64158
64158
  }
64159
64159
  function computeWeekdaysParse() {
64160
- function cmpLenRev(a, b2) {
64161
- return b2.length - a.length;
64160
+ function cmpLenRev(a, b3) {
64161
+ return b3.length - a.length;
64162
64162
  }
64163
64163
  var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [], i, mom, minp, shortp, longp;
64164
64164
  for (i = 0; i < 7; i++) {
@@ -64670,12 +64670,12 @@ var require_moment = __commonJS({
64670
64670
  config._d = /* @__PURE__ */ new Date(config._i + (config._useUTC ? " UTC" : ""));
64671
64671
  }
64672
64672
  );
64673
- function defaults(a, b2, c2) {
64673
+ function defaults(a, b3, c2) {
64674
64674
  if (a != null) {
64675
64675
  return a;
64676
64676
  }
64677
- if (b2 != null) {
64678
- return b2;
64677
+ if (b3 != null) {
64678
+ return b3;
64679
64679
  }
64680
64680
  return c2;
64681
64681
  }
@@ -65575,17 +65575,17 @@ var require_moment = __commonJS({
65575
65575
  }
65576
65576
  return asFloat ? output : absFloor(output);
65577
65577
  }
65578
- function monthDiff(a, b2) {
65579
- if (a.date() < b2.date()) {
65580
- return -monthDiff(b2, a);
65578
+ function monthDiff(a, b3) {
65579
+ if (a.date() < b3.date()) {
65580
+ return -monthDiff(b3, a);
65581
65581
  }
65582
- var wholeMonthDiff = (b2.year() - a.year()) * 12 + (b2.month() - a.month()), anchor = a.clone().add(wholeMonthDiff, "months"), anchor2, adjust;
65583
- if (b2 - anchor < 0) {
65582
+ var wholeMonthDiff = (b3.year() - a.year()) * 12 + (b3.month() - a.month()), anchor = a.clone().add(wholeMonthDiff, "months"), anchor2, adjust;
65583
+ if (b3 - anchor < 0) {
65584
65584
  anchor2 = a.clone().add(wholeMonthDiff - 1, "months");
65585
- adjust = (b2 - anchor) / (anchor - anchor2);
65585
+ adjust = (b3 - anchor) / (anchor - anchor2);
65586
65586
  } else {
65587
65587
  anchor2 = a.clone().add(wholeMonthDiff + 1, "months");
65588
- adjust = (b2 - anchor) / (anchor2 - anchor);
65588
+ adjust = (b3 - anchor) / (anchor2 - anchor);
65589
65589
  }
65590
65590
  return -(wholeMonthDiff + adjust) || 0;
65591
65591
  }
@@ -66474,7 +66474,7 @@ var require_moment = __commonJS({
66474
66474
  ],
66475
66475
  dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
66476
66476
  ordinal: function(number) {
66477
- var b2 = number % 10, output = toInt(number % 100 / 10) === 1 ? "th" : b2 === 1 ? "st" : b2 === 2 ? "nd" : b2 === 3 ? "rd" : "th";
66477
+ var b3 = number % 10, output = toInt(number % 100 / 10) === 1 ? "th" : b3 === 1 ? "st" : b3 === 2 ? "nd" : b3 === 3 ? "rd" : "th";
66478
66478
  return number + output;
66479
66479
  }
66480
66480
  });
@@ -67523,9 +67523,9 @@ var require_daily_rotate_file = __commonJS({
67523
67523
  if (logFiles.length) {
67524
67524
  processLogFile(logFiles.shift());
67525
67525
  } else if (callback) {
67526
- results.sort((a, b2) => {
67526
+ results.sort((a, b3) => {
67527
67527
  const d1 = new Date(a.timestamp).getTime();
67528
- const d2 = new Date(b2.timestamp).getTime();
67528
+ const d2 = new Date(b3.timestamp).getTime();
67529
67529
  return d1 > d2 ? 1 : d1 < d2 ? -1 : 0;
67530
67530
  });
67531
67531
  if (options.order === "desc") {
@@ -67764,37 +67764,37 @@ function Co(r6) {
67764
67764
  let e;
67765
67765
  return r6.details?.text ? r6.diagnostics ? e = `${r6.details.text} (${r6.diagnostics})` : e = r6.details.text : r6.diagnostics ? e = r6.diagnostics : e = "Unknown error", r6.expression?.length && (e += ` (${r6.expression.join(", ")})`), e;
67766
67766
  }
67767
- function wo(r6, e) {
67767
+ function Ao(r6, e) {
67768
67768
  let t = e.max && e.max === Number.MAX_SAFE_INTEGER ? Number.POSITIVE_INFINITY : e.max;
67769
67769
  return { path: r6, description: "", type: e.type ?? [], min: e.min ?? 0, max: t ?? 1, isArray: !!t && t > 1, constraints: [] };
67770
67770
  }
67771
67771
  function _n(r6) {
67772
67772
  let e = /* @__PURE__ */ Object.create(null);
67773
- for (let [t, n] of Object.entries(r6)) e[t] = { name: t, type: t, path: t, elements: Object.fromEntries(Object.entries(n.elements).map(([i, o2]) => [i, wo(i, o2)])), constraints: [], innerTypes: [] };
67773
+ for (let [t, n] of Object.entries(r6)) e[t] = { name: t, type: t, path: t, elements: Object.fromEntries(Object.entries(n.elements).map(([i, o2]) => [i, Ao(i, o2)])), constraints: [], innerTypes: [] };
67774
67774
  return e;
67775
67775
  }
67776
67776
  var Ln = { Element: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] } } }, BackboneElement: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, modifierExtension: { max: 9007199254740991, type: [{ code: "Extension" }] } } }, Address: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, use: { type: [{ code: "code" }] }, type: { type: [{ code: "code" }] }, text: { type: [{ code: "string" }] }, line: { max: 9007199254740991, type: [{ code: "string" }] }, city: { type: [{ code: "string" }] }, district: { type: [{ code: "string" }] }, state: { type: [{ code: "string" }] }, postalCode: { type: [{ code: "string" }] }, country: { type: [{ code: "string" }] }, period: { type: [{ code: "Period" }] } } }, Age: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, comparator: { type: [{ code: "code" }] }, unit: { type: [{ code: "string" }] }, system: { type: [{ code: "uri" }] }, code: { type: [{ code: "code" }] } } }, Annotation: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, "author[x]": { type: [{ code: "Reference", targetProfile: ["http://hl7.org/fhir/StructureDefinition/Practitioner", "http://hl7.org/fhir/StructureDefinition/Patient", "http://hl7.org/fhir/StructureDefinition/RelatedPerson", "http://hl7.org/fhir/StructureDefinition/Organization"] }, { code: "string" }] }, time: { type: [{ code: "dateTime" }] }, text: { min: 1, type: [{ code: "markdown" }] } } }, Attachment: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, contentType: { type: [{ code: "code" }] }, language: { type: [{ code: "code" }] }, data: { type: [{ code: "base64Binary" }] }, url: { type: [{ code: "url" }] }, size: { type: [{ code: "unsignedInt" }] }, hash: { type: [{ code: "base64Binary" }] }, title: { type: [{ code: "string" }] }, creation: { type: [{ code: "dateTime" }] } } }, CodeableConcept: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, coding: { max: 9007199254740991, type: [{ code: "Coding" }] }, text: { type: [{ code: "string" }] } } }, Coding: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, system: { type: [{ code: "uri" }] }, version: { type: [{ code: "string" }] }, code: { type: [{ code: "code" }] }, display: { type: [{ code: "string" }] }, userSelected: { type: [{ code: "boolean" }] } } }, ContactDetail: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, name: { type: [{ code: "string" }] }, telecom: { max: 9007199254740991, type: [{ code: "ContactPoint" }] } } }, ContactPoint: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, system: { type: [{ code: "code" }] }, value: { type: [{ code: "string" }] }, use: { type: [{ code: "code" }] }, rank: { type: [{ code: "positiveInt" }] }, period: { type: [{ code: "Period" }] } } }, Contributor: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, type: { min: 1, type: [{ code: "code" }] }, name: { min: 1, type: [{ code: "string" }] }, contact: { max: 9007199254740991, type: [{ code: "ContactDetail" }] } } }, Count: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, comparator: { type: [{ code: "code" }] }, unit: { type: [{ code: "string" }] }, system: { type: [{ code: "uri" }] }, code: { type: [{ code: "code" }] } } }, DataRequirement: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, type: { min: 1, type: [{ code: "code" }] }, profile: { max: 9007199254740991, type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/StructureDefinition"] }] }, "subject[x]": { type: [{ code: "CodeableConcept" }, { code: "Reference", targetProfile: ["http://hl7.org/fhir/StructureDefinition/Group"] }] }, mustSupport: { max: 9007199254740991, type: [{ code: "string" }] }, codeFilter: { max: 9007199254740991, type: [{ code: "DataRequirementCodeFilter" }] }, dateFilter: { max: 9007199254740991, type: [{ code: "DataRequirementDateFilter" }] }, limit: { type: [{ code: "positiveInt" }] }, sort: { max: 9007199254740991, type: [{ code: "DataRequirementSort" }] } } }, DataRequirementCodeFilter: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, path: { type: [{ code: "string" }] }, searchParam: { type: [{ code: "string" }] }, valueSet: { type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/ValueSet"] }] }, code: { max: 9007199254740991, type: [{ code: "Coding" }] } } }, DataRequirementDateFilter: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, path: { type: [{ code: "string" }] }, searchParam: { type: [{ code: "string" }] }, "value[x]": { type: [{ code: "dateTime" }, { code: "Period" }, { code: "Duration" }] } } }, DataRequirementSort: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, path: { min: 1, type: [{ code: "string" }] }, direction: { min: 1, type: [{ code: "code" }] } } }, Distance: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, comparator: { type: [{ code: "code" }] }, unit: { type: [{ code: "string" }] }, system: { type: [{ code: "uri" }] }, code: { type: [{ code: "code" }] } } }, Dosage: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, modifierExtension: { max: 9007199254740991, type: [{ code: "Extension" }] }, sequence: { type: [{ code: "integer" }] }, text: { type: [{ code: "string" }] }, additionalInstruction: { max: 9007199254740991, type: [{ code: "CodeableConcept" }] }, patientInstruction: { type: [{ code: "string" }] }, timing: { type: [{ code: "Timing" }] }, "asNeeded[x]": { type: [{ code: "boolean" }, { code: "CodeableConcept" }] }, site: { type: [{ code: "CodeableConcept" }] }, route: { type: [{ code: "CodeableConcept" }] }, method: { type: [{ code: "CodeableConcept" }] }, doseAndRate: { max: 9007199254740991, type: [{ code: "DosageDoseAndRate" }] }, maxDosePerPeriod: { type: [{ code: "Ratio" }] }, maxDosePerAdministration: { type: [{ code: "Quantity", profile: ["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"] }] }, maxDosePerLifetime: { type: [{ code: "Quantity", profile: ["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"] }] } } }, DosageDoseAndRate: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, type: { type: [{ code: "CodeableConcept" }] }, "dose[x]": { type: [{ code: "Range" }, { code: "Quantity", profile: ["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"] }] }, "rate[x]": { type: [{ code: "Ratio" }, { code: "Range" }, { code: "Quantity", profile: ["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"] }] } } }, Duration: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, comparator: { type: [{ code: "code" }] }, unit: { type: [{ code: "string" }] }, system: { type: [{ code: "uri" }] }, code: { type: [{ code: "code" }] } } }, ElementDefinition: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, modifierExtension: { max: 9007199254740991, type: [{ code: "Extension" }] }, path: { min: 1, type: [{ code: "string" }] }, representation: { max: 9007199254740991, type: [{ code: "code" }] }, sliceName: { type: [{ code: "string" }] }, sliceIsConstraining: { type: [{ code: "boolean" }] }, label: { type: [{ code: "string" }] }, code: { max: 9007199254740991, type: [{ code: "Coding" }] }, slicing: { type: [{ code: "ElementDefinitionSlicing" }] }, short: { type: [{ code: "string" }] }, definition: { type: [{ code: "markdown" }] }, comment: { type: [{ code: "markdown" }] }, requirements: { type: [{ code: "markdown" }] }, alias: { max: 9007199254740991, type: [{ code: "string" }] }, min: { type: [{ code: "unsignedInt" }] }, max: { type: [{ code: "string" }] }, base: { type: [{ code: "ElementDefinitionBase" }] }, contentReference: { type: [{ code: "uri" }] }, type: { max: 9007199254740991, type: [{ code: "ElementDefinitionType" }] }, "defaultValue[x]": { type: [{ code: "base64Binary" }, { code: "boolean" }, { code: "canonical" }, { code: "code" }, { code: "date" }, { code: "dateTime" }, { code: "decimal" }, { code: "id" }, { code: "instant" }, { code: "integer" }, { code: "markdown" }, { code: "oid" }, { code: "positiveInt" }, { code: "string" }, { code: "time" }, { code: "unsignedInt" }, { code: "uri" }, { code: "url" }, { code: "uuid" }, { code: "Address" }, { code: "Age" }, { code: "Annotation" }, { code: "Attachment" }, { code: "CodeableConcept" }, { code: "Coding" }, { code: "ContactPoint" }, { code: "Count" }, { code: "Distance" }, { code: "Duration" }, { code: "HumanName" }, { code: "Identifier" }, { code: "Money" }, { code: "Period" }, { code: "Quantity" }, { code: "Range" }, { code: "Ratio" }, { code: "Reference" }, { code: "SampledData" }, { code: "Signature" }, { code: "Timing" }, { code: "ContactDetail" }, { code: "Contributor" }, { code: "DataRequirement" }, { code: "Expression" }, { code: "ParameterDefinition" }, { code: "RelatedArtifact" }, { code: "TriggerDefinition" }, { code: "UsageContext" }, { code: "Dosage" }, { code: "Meta" }] }, meaningWhenMissing: { type: [{ code: "markdown" }] }, orderMeaning: { type: [{ code: "string" }] }, "fixed[x]": { type: [{ code: "base64Binary" }, { code: "boolean" }, { code: "canonical" }, { code: "code" }, { code: "date" }, { code: "dateTime" }, { code: "decimal" }, { code: "id" }, { code: "instant" }, { code: "integer" }, { code: "markdown" }, { code: "oid" }, { code: "positiveInt" }, { code: "string" }, { code: "time" }, { code: "unsignedInt" }, { code: "uri" }, { code: "url" }, { code: "uuid" }, { code: "Address" }, { code: "Age" }, { code: "Annotation" }, { code: "Attachment" }, { code: "CodeableConcept" }, { code: "Coding" }, { code: "ContactPoint" }, { code: "Count" }, { code: "Distance" }, { code: "Duration" }, { code: "HumanName" }, { code: "Identifier" }, { code: "Money" }, { code: "Period" }, { code: "Quantity" }, { code: "Range" }, { code: "Ratio" }, { code: "Reference" }, { code: "SampledData" }, { code: "Signature" }, { code: "Timing" }, { code: "ContactDetail" }, { code: "Contributor" }, { code: "DataRequirement" }, { code: "Expression" }, { code: "ParameterDefinition" }, { code: "RelatedArtifact" }, { code: "TriggerDefinition" }, { code: "UsageContext" }, { code: "Dosage" }, { code: "Meta" }] }, "pattern[x]": { type: [{ code: "base64Binary" }, { code: "boolean" }, { code: "canonical" }, { code: "code" }, { code: "date" }, { code: "dateTime" }, { code: "decimal" }, { code: "id" }, { code: "instant" }, { code: "integer" }, { code: "markdown" }, { code: "oid" }, { code: "positiveInt" }, { code: "string" }, { code: "time" }, { code: "unsignedInt" }, { code: "uri" }, { code: "url" }, { code: "uuid" }, { code: "Address" }, { code: "Age" }, { code: "Annotation" }, { code: "Attachment" }, { code: "CodeableConcept" }, { code: "Coding" }, { code: "ContactPoint" }, { code: "Count" }, { code: "Distance" }, { code: "Duration" }, { code: "HumanName" }, { code: "Identifier" }, { code: "Money" }, { code: "Period" }, { code: "Quantity" }, { code: "Range" }, { code: "Ratio" }, { code: "Reference" }, { code: "SampledData" }, { code: "Signature" }, { code: "Timing" }, { code: "ContactDetail" }, { code: "Contributor" }, { code: "DataRequirement" }, { code: "Expression" }, { code: "ParameterDefinition" }, { code: "RelatedArtifact" }, { code: "TriggerDefinition" }, { code: "UsageContext" }, { code: "Dosage" }, { code: "Meta" }] }, example: { max: 9007199254740991, type: [{ code: "ElementDefinitionExample" }] }, "minValue[x]": { type: [{ code: "date" }, { code: "dateTime" }, { code: "instant" }, { code: "time" }, { code: "decimal" }, { code: "integer" }, { code: "positiveInt" }, { code: "unsignedInt" }, { code: "Quantity" }] }, "maxValue[x]": { type: [{ code: "date" }, { code: "dateTime" }, { code: "instant" }, { code: "time" }, { code: "decimal" }, { code: "integer" }, { code: "positiveInt" }, { code: "unsignedInt" }, { code: "Quantity" }] }, maxLength: { type: [{ code: "integer" }] }, condition: { max: 9007199254740991, type: [{ code: "id" }] }, constraint: { max: 9007199254740991, type: [{ code: "ElementDefinitionConstraint" }] }, mustSupport: { type: [{ code: "boolean" }] }, isModifier: { type: [{ code: "boolean" }] }, isModifierReason: { type: [{ code: "string" }] }, isSummary: { type: [{ code: "boolean" }] }, binding: { type: [{ code: "ElementDefinitionBinding" }] }, mapping: { max: 9007199254740991, type: [{ code: "ElementDefinitionMapping" }] } } }, ElementDefinitionSlicingDiscriminator: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, type: { min: 1, type: [{ code: "code" }] }, path: { min: 1, type: [{ code: "string" }] } } }, ElementDefinitionSlicing: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, discriminator: { max: 9007199254740991, type: [{ code: "ElementDefinitionSlicingDiscriminator" }] }, description: { type: [{ code: "string" }] }, ordered: { type: [{ code: "boolean" }] }, rules: { min: 1, type: [{ code: "code" }] } } }, ElementDefinitionBase: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, path: { min: 1, type: [{ code: "string" }] }, min: { min: 1, type: [{ code: "unsignedInt" }] }, max: { min: 1, type: [{ code: "string" }] } } }, ElementDefinitionType: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, code: { min: 1, type: [{ code: "uri" }] }, profile: { max: 9007199254740991, type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/StructureDefinition", "http://hl7.org/fhir/StructureDefinition/ImplementationGuide"] }] }, targetProfile: { max: 9007199254740991, type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/StructureDefinition", "http://hl7.org/fhir/StructureDefinition/ImplementationGuide"] }] }, aggregation: { max: 9007199254740991, type: [{ code: "code" }] }, versioning: { type: [{ code: "code" }] } } }, ElementDefinitionExample: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, label: { min: 1, type: [{ code: "string" }] }, "value[x]": { min: 1, type: [{ code: "base64Binary" }, { code: "boolean" }, { code: "canonical" }, { code: "code" }, { code: "date" }, { code: "dateTime" }, { code: "decimal" }, { code: "id" }, { code: "instant" }, { code: "integer" }, { code: "markdown" }, { code: "oid" }, { code: "positiveInt" }, { code: "string" }, { code: "time" }, { code: "unsignedInt" }, { code: "uri" }, { code: "url" }, { code: "uuid" }, { code: "Address" }, { code: "Age" }, { code: "Annotation" }, { code: "Attachment" }, { code: "CodeableConcept" }, { code: "Coding" }, { code: "ContactPoint" }, { code: "Count" }, { code: "Distance" }, { code: "Duration" }, { code: "HumanName" }, { code: "Identifier" }, { code: "Money" }, { code: "Period" }, { code: "Quantity" }, { code: "Range" }, { code: "Ratio" }, { code: "Reference" }, { code: "SampledData" }, { code: "Signature" }, { code: "Timing" }, { code: "ContactDetail" }, { code: "Contributor" }, { code: "DataRequirement" }, { code: "Expression" }, { code: "ParameterDefinition" }, { code: "RelatedArtifact" }, { code: "TriggerDefinition" }, { code: "UsageContext" }, { code: "Dosage" }, { code: "Meta" }] } } }, ElementDefinitionConstraint: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, key: { min: 1, type: [{ code: "id" }] }, requirements: { type: [{ code: "string" }] }, severity: { min: 1, type: [{ code: "code" }] }, human: { min: 1, type: [{ code: "string" }] }, expression: { type: [{ code: "string" }] }, xpath: { type: [{ code: "string" }] }, source: { type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/StructureDefinition"] }] } } }, ElementDefinitionBinding: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, strength: { min: 1, type: [{ code: "code" }] }, description: { type: [{ code: "string" }] }, valueSet: { type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/ValueSet"] }] } } }, ElementDefinitionMapping: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, identity: { min: 1, type: [{ code: "id" }] }, language: { type: [{ code: "code" }] }, map: { min: 1, type: [{ code: "string" }] }, comment: { type: [{ code: "string" }] } } }, Expression: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, description: { type: [{ code: "string" }] }, name: { type: [{ code: "id" }] }, language: { min: 1, type: [{ code: "code" }] }, expression: { type: [{ code: "string" }] }, reference: { type: [{ code: "uri" }] } } }, Extension: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, url: { min: 1, type: [{ code: "uri" }] }, "value[x]": { type: [{ code: "base64Binary" }, { code: "boolean" }, { code: "canonical" }, { code: "code" }, { code: "date" }, { code: "dateTime" }, { code: "decimal" }, { code: "id" }, { code: "instant" }, { code: "integer" }, { code: "markdown" }, { code: "oid" }, { code: "positiveInt" }, { code: "string" }, { code: "time" }, { code: "unsignedInt" }, { code: "uri" }, { code: "url" }, { code: "uuid" }, { code: "Address" }, { code: "Age" }, { code: "Annotation" }, { code: "Attachment" }, { code: "CodeableConcept" }, { code: "Coding" }, { code: "ContactPoint" }, { code: "Count" }, { code: "Distance" }, { code: "Duration" }, { code: "HumanName" }, { code: "Identifier" }, { code: "Money" }, { code: "Period" }, { code: "Quantity" }, { code: "Range" }, { code: "Ratio" }, { code: "Reference" }, { code: "SampledData" }, { code: "Signature" }, { code: "Timing" }, { code: "ContactDetail" }, { code: "Contributor" }, { code: "DataRequirement" }, { code: "Expression" }, { code: "ParameterDefinition" }, { code: "RelatedArtifact" }, { code: "TriggerDefinition" }, { code: "UsageContext" }, { code: "Dosage" }, { code: "Meta" }] } } }, HumanName: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, use: { type: [{ code: "code" }] }, text: { type: [{ code: "string" }] }, family: { type: [{ code: "string" }] }, given: { max: 9007199254740991, type: [{ code: "string" }] }, prefix: { max: 9007199254740991, type: [{ code: "string" }] }, suffix: { max: 9007199254740991, type: [{ code: "string" }] }, period: { type: [{ code: "Period" }] } } }, Identifier: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, use: { type: [{ code: "code" }] }, type: { type: [{ code: "CodeableConcept" }] }, system: { type: [{ code: "uri" }] }, value: { type: [{ code: "string" }] }, period: { type: [{ code: "Period" }] }, assigner: { type: [{ code: "Reference", targetProfile: ["http://hl7.org/fhir/StructureDefinition/Organization"] }] } } }, MarketingStatus: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, modifierExtension: { max: 9007199254740991, type: [{ code: "Extension" }] }, country: { min: 1, type: [{ code: "CodeableConcept" }] }, jurisdiction: { type: [{ code: "CodeableConcept" }] }, status: { min: 1, type: [{ code: "CodeableConcept" }] }, dateRange: { min: 1, type: [{ code: "Period" }] }, restoreDate: { type: [{ code: "dateTime" }] } } }, Meta: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, versionId: { type: [{ code: "id" }] }, lastUpdated: { type: [{ code: "instant" }] }, source: { type: [{ code: "uri" }] }, profile: { max: 9007199254740991, type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/StructureDefinition"] }] }, security: { max: 9007199254740991, type: [{ code: "Coding" }] }, tag: { max: 9007199254740991, type: [{ code: "Coding" }] }, project: { type: [{ code: "uri" }] }, author: { type: [{ code: "Reference" }] }, onBehalfOf: { type: [{ code: "Reference" }] }, account: { type: [{ code: "Reference" }] }, accounts: { max: 9007199254740991, type: [{ code: "Reference" }] }, compartment: { max: 9007199254740991, type: [{ code: "Reference" }] } } }, Money: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, currency: { type: [{ code: "code" }] } } }, Narrative: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, status: { min: 1, type: [{ code: "code" }] }, div: { min: 1, type: [{ code: "xhtml" }] } } }, ParameterDefinition: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, name: { type: [{ code: "code" }] }, use: { min: 1, type: [{ code: "code" }] }, min: { type: [{ code: "integer" }] }, max: { type: [{ code: "string" }] }, documentation: { type: [{ code: "string" }] }, type: { min: 1, type: [{ code: "code" }] }, profile: { type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/StructureDefinition"] }] } } }, Period: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, start: { type: [{ code: "dateTime" }] }, end: { type: [{ code: "dateTime" }] } } }, Population: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, modifierExtension: { max: 9007199254740991, type: [{ code: "Extension" }] }, "age[x]": { type: [{ code: "Range" }, { code: "CodeableConcept" }] }, gender: { type: [{ code: "CodeableConcept" }] }, race: { type: [{ code: "CodeableConcept" }] }, physiologicalCondition: { type: [{ code: "CodeableConcept" }] } } }, ProdCharacteristic: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, modifierExtension: { max: 9007199254740991, type: [{ code: "Extension" }] }, height: { type: [{ code: "Quantity" }] }, width: { type: [{ code: "Quantity" }] }, depth: { type: [{ code: "Quantity" }] }, weight: { type: [{ code: "Quantity" }] }, nominalVolume: { type: [{ code: "Quantity" }] }, externalDiameter: { type: [{ code: "Quantity" }] }, shape: { type: [{ code: "string" }] }, color: { max: 9007199254740991, type: [{ code: "string" }] }, imprint: { max: 9007199254740991, type: [{ code: "string" }] }, image: { max: 9007199254740991, type: [{ code: "Attachment" }] }, scoring: { type: [{ code: "CodeableConcept" }] } } }, ProductShelfLife: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, modifierExtension: { max: 9007199254740991, type: [{ code: "Extension" }] }, identifier: { type: [{ code: "Identifier" }] }, type: { min: 1, type: [{ code: "CodeableConcept" }] }, period: { min: 1, type: [{ code: "Quantity" }] }, specialPrecautionsForStorage: { max: 9007199254740991, type: [{ code: "CodeableConcept" }] } } }, Quantity: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, comparator: { type: [{ code: "code" }] }, unit: { type: [{ code: "string" }] }, system: { type: [{ code: "uri" }] }, code: { type: [{ code: "code" }] } } }, Range: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, low: { type: [{ code: "Quantity", profile: ["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"] }] }, high: { type: [{ code: "Quantity", profile: ["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"] }] } } }, Ratio: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, numerator: { type: [{ code: "Quantity" }] }, denominator: { type: [{ code: "Quantity" }] } } }, Reference: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, reference: { type: [{ code: "string" }] }, type: { type: [{ code: "uri" }] }, identifier: { type: [{ code: "Identifier" }] }, display: { type: [{ code: "string" }] } } }, RelatedArtifact: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, type: { min: 1, type: [{ code: "code" }] }, label: { type: [{ code: "string" }] }, display: { type: [{ code: "string" }] }, citation: { type: [{ code: "markdown" }] }, url: { type: [{ code: "url" }] }, document: { type: [{ code: "Attachment" }] }, resource: { type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/Resource"] }] } } }, SampledData: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, origin: { min: 1, type: [{ code: "Quantity", profile: ["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"] }] }, period: { min: 1, type: [{ code: "decimal" }] }, factor: { type: [{ code: "decimal" }] }, lowerLimit: { type: [{ code: "decimal" }] }, upperLimit: { type: [{ code: "decimal" }] }, dimensions: { min: 1, type: [{ code: "positiveInt" }] }, data: { type: [{ code: "string" }] } } }, Signature: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, type: { min: 1, max: 9007199254740991, type: [{ code: "Coding" }] }, when: { min: 1, type: [{ code: "instant" }] }, who: { min: 1, type: [{ code: "Reference", targetProfile: ["http://hl7.org/fhir/StructureDefinition/Practitioner", "http://hl7.org/fhir/StructureDefinition/PractitionerRole", "http://hl7.org/fhir/StructureDefinition/RelatedPerson", "http://hl7.org/fhir/StructureDefinition/Patient", "http://hl7.org/fhir/StructureDefinition/Device", "http://hl7.org/fhir/StructureDefinition/Organization"] }] }, onBehalfOf: { type: [{ code: "Reference", targetProfile: ["http://hl7.org/fhir/StructureDefinition/Practitioner", "http://hl7.org/fhir/StructureDefinition/PractitionerRole", "http://hl7.org/fhir/StructureDefinition/RelatedPerson", "http://hl7.org/fhir/StructureDefinition/Patient", "http://hl7.org/fhir/StructureDefinition/Device", "http://hl7.org/fhir/StructureDefinition/Organization"] }] }, targetFormat: { type: [{ code: "code" }] }, sigFormat: { type: [{ code: "code" }] }, data: { type: [{ code: "base64Binary" }] } } }, SubstanceAmount: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, modifierExtension: { max: 9007199254740991, type: [{ code: "Extension" }] }, "amount[x]": { type: [{ code: "Quantity" }, { code: "Range" }, { code: "string" }] }, amountType: { type: [{ code: "CodeableConcept" }] }, amountText: { type: [{ code: "string" }] }, referenceRange: { type: [{ code: "SubstanceAmountReferenceRange" }] } } }, SubstanceAmountReferenceRange: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, lowLimit: { type: [{ code: "Quantity" }] }, highLimit: { type: [{ code: "Quantity" }] } } }, Timing: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, modifierExtension: { max: 9007199254740991, type: [{ code: "Extension" }] }, event: { max: 9007199254740991, type: [{ code: "dateTime" }] }, repeat: { type: [{ code: "TimingRepeat" }] }, code: { type: [{ code: "CodeableConcept" }] } } }, TimingRepeat: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, "bounds[x]": { type: [{ code: "Duration" }, { code: "Range" }, { code: "Period" }] }, count: { type: [{ code: "positiveInt" }] }, countMax: { type: [{ code: "positiveInt" }] }, duration: { type: [{ code: "decimal" }] }, durationMax: { type: [{ code: "decimal" }] }, durationUnit: { type: [{ code: "code" }] }, frequency: { type: [{ code: "positiveInt" }] }, frequencyMax: { type: [{ code: "positiveInt" }] }, period: { type: [{ code: "decimal" }] }, periodMax: { type: [{ code: "decimal" }] }, periodUnit: { type: [{ code: "code" }] }, dayOfWeek: { max: 9007199254740991, type: [{ code: "code" }] }, timeOfDay: { max: 9007199254740991, type: [{ code: "time" }] }, when: { max: 9007199254740991, type: [{ code: "code" }] }, offset: { type: [{ code: "unsignedInt" }] } } }, TriggerDefinition: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, type: { min: 1, type: [{ code: "code" }] }, name: { type: [{ code: "string" }] }, "timing[x]": { type: [{ code: "Timing" }, { code: "Reference", targetProfile: ["http://hl7.org/fhir/StructureDefinition/Schedule"] }, { code: "date" }, { code: "dateTime" }] }, data: { max: 9007199254740991, type: [{ code: "DataRequirement" }] }, condition: { type: [{ code: "Expression" }] } } }, UsageContext: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, code: { min: 1, type: [{ code: "Coding" }] }, "value[x]": { min: 1, type: [{ code: "CodeableConcept" }, { code: "Quantity" }, { code: "Range" }, { code: "Reference", targetProfile: ["http://hl7.org/fhir/StructureDefinition/PlanDefinition", "http://hl7.org/fhir/StructureDefinition/ResearchStudy", "http://hl7.org/fhir/StructureDefinition/InsurancePlan", "http://hl7.org/fhir/StructureDefinition/HealthcareService", "http://hl7.org/fhir/StructureDefinition/Group", "http://hl7.org/fhir/StructureDefinition/Location", "http://hl7.org/fhir/StructureDefinition/Organization"] }] } } }, MoneyQuantity: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, comparator: { type: [{ code: "code" }] }, unit: { type: [{ code: "string" }] }, system: { type: [{ code: "uri" }] }, code: { type: [{ code: "code" }] } } }, SimpleQuantity: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, comparator: { max: 0, type: [{ code: "code" }] }, unit: { type: [{ code: "string" }] }, system: { type: [{ code: "uri" }] }, code: { type: [{ code: "code" }] } } }, IdentityProvider: { elements: { authorizeUrl: { min: 1, type: [{ code: "string" }] }, tokenUrl: { min: 1, type: [{ code: "string" }] }, tokenAuthMethod: { type: [{ code: "code" }] }, userInfoUrl: { min: 1, type: [{ code: "string" }] }, clientId: { min: 1, type: [{ code: "string" }] }, clientSecret: { min: 1, type: [{ code: "string" }] }, usePkce: { type: [{ code: "boolean" }] }, useSubject: { type: [{ code: "boolean" }] } } } };
67777
67777
  function Rr(r6) {
67778
- return new br(r6).parse();
67778
+ return new Sr(r6).parse();
67779
67779
  }
67780
67780
  var Te = _n(Ln);
67781
67781
  var Cr = /* @__PURE__ */ Object.create(null);
67782
67782
  var Fn = /* @__PURE__ */ Object.create(null);
67783
67783
  var Oo = { "http://hl7.org/fhir/StructureDefinition/MoneyQuantity": "MoneyQuantity", "http://hl7.org/fhir/StructureDefinition/SimpleQuantity": "SimpleQuantity", "http://hl7.org/fhir/uv/sql-on-fhir/StructureDefinition/ViewDefinition": "ViewDefinition" };
67784
- function Wn(r6) {
67784
+ function qn(r6) {
67785
67785
  let e;
67786
67786
  return e = Fn[r6], e || (e = Fn[r6] = /* @__PURE__ */ Object.create(null)), e;
67787
67787
  }
67788
67788
  function Pr(r6) {
67789
67789
  let t = (Array.isArray(r6) ? r6 : r6.entry?.map((n) => n.resource) ?? []).filter((n) => n?.resourceType === "StructureDefinition");
67790
67790
  Gn(t);
67791
- for (let n of t) wr(n);
67791
+ for (let n of t) Ar(n);
67792
67792
  }
67793
- function wr(r6) {
67793
+ function Ar(r6) {
67794
67794
  if (!r6?.name) throw new Error("Failed loading StructureDefinition from bundle");
67795
67795
  if (r6.resourceType !== "StructureDefinition") return;
67796
67796
  let e = Rr(r6), t = Oo[r6.url], n, i;
67797
- t ? (n = Te, i = t) : r6.url === `http://hl7.org/fhir/StructureDefinition/${r6.type}` || r6.url === `https://medplum.com/fhir/StructureDefinition/${r6.type}` || r6.type?.startsWith("http://") || r6.type?.startsWith("https://") ? (n = Te, i = r6.type) : (n = Wn(r6.url), i = r6.type), n[i] = e;
67797
+ t ? (n = Te, i = t) : r6.url === `http://hl7.org/fhir/StructureDefinition/${r6.type}` || r6.url === `https://medplum.com/fhir/StructureDefinition/${r6.type}` || r6.type?.startsWith("http://") || r6.type?.startsWith("https://") ? (n = Te, i = r6.type) : (n = qn(r6.url), i = r6.type), n[i] = e;
67798
67798
  for (let o2 of e.innerTypes) o2.parentType = e, n[o2.name] = o2;
67799
67799
  Cr[r6.url] = e;
67800
67800
  }
@@ -67803,7 +67803,7 @@ function jn(r6) {
67803
67803
  }
67804
67804
  function Qe(r6, e) {
67805
67805
  if (e) {
67806
- let t = Wn(e)[r6];
67806
+ let t = qn(e)[r6];
67807
67807
  if (t) return t;
67808
67808
  }
67809
67809
  return Te[r6];
@@ -67811,7 +67811,7 @@ function Qe(r6, e) {
67811
67811
  function $n(r6) {
67812
67812
  return !!Cr[r6];
67813
67813
  }
67814
- var br = class {
67814
+ var Sr = class {
67815
67815
  constructor(e) {
67816
67816
  c(this, "root");
67817
67817
  c(this, "elements");
@@ -67830,7 +67830,7 @@ var br = class {
67830
67830
  if (e.sliceName) this.parseSliceStart(e);
67831
67831
  else if (e.id?.includes(":")) {
67832
67832
  if (this.slicingContext?.current) {
67833
- let t = Sr(e, this.slicingContext.path);
67833
+ let t = br(e, this.slicingContext.path);
67834
67834
  this.slicingContext.current.elements[t] = this.parseElementDefinition(e);
67835
67835
  }
67836
67836
  } else {
@@ -67839,13 +67839,13 @@ var br = class {
67839
67839
  let n = this.backboneContext;
67840
67840
  for (; n; ) {
67841
67841
  if (e.path?.startsWith(n.path + ".")) {
67842
- n.type.elements[Sr(e, n.path)] = t;
67842
+ n.type.elements[br(e, n.path)] = t;
67843
67843
  break;
67844
67844
  }
67845
67845
  n = n.parent;
67846
67846
  }
67847
67847
  if (!n) {
67848
- let i = Sr(e, this.root.path);
67848
+ let i = br(e, this.root.path);
67849
67849
  e.isSummary && this.resourceSchema.summaryProperties?.add(i.replace("[x]", "")), t.min > 0 && this.resourceSchema.mandatoryProperties?.add(i.replace("[x]", "")), this.resourceSchema.elements[i] = t;
67850
67850
  }
67851
67851
  this.checkFieldExit(e);
@@ -67910,7 +67910,7 @@ var br = class {
67910
67910
  function Un(r6) {
67911
67911
  return r6 === "*" ? Number.POSITIVE_INFINITY : Number.parseInt(r6, 10);
67912
67912
  }
67913
- function Sr(r6, e = "") {
67913
+ function br(r6, e = "") {
67914
67914
  return ko(r6.path, e);
67915
67915
  }
67916
67916
  function ko(r6, e) {
@@ -67943,8 +67943,8 @@ var ze = { base64Binary: /^([A-Za-z\d+/]{4})*([A-Za-z\d+/]{2}==|[A-Za-z\d+/]{3}=
67943
67943
  function m(r6) {
67944
67944
  return [{ type: d.boolean, value: r6 }];
67945
67945
  }
67946
- function S(r6) {
67947
- return r6 == null ? { type: "undefined", value: void 0 } : Number.isSafeInteger(r6) ? { type: d.integer, value: r6 } : typeof r6 == "number" ? { type: d.decimal, value: r6 } : typeof r6 == "boolean" ? { type: d.boolean, value: r6 } : typeof r6 == "string" ? { type: d.string, value: r6 } : O(r6) ? { type: d.Quantity, value: r6 } : I(r6) ? { type: r6.resourceType, value: r6 } : Wr(r6) ? { type: d.CodeableConcept, value: r6 } : Br(r6) ? { type: d.Coding, value: r6 } : { type: d.BackboneElement, value: r6 };
67946
+ function b(r6) {
67947
+ return r6 == null ? { type: "undefined", value: void 0 } : Number.isSafeInteger(r6) ? { type: d.integer, value: r6 } : typeof r6 == "number" ? { type: d.decimal, value: r6 } : typeof r6 == "boolean" ? { type: d.boolean, value: r6 } : typeof r6 == "string" ? { type: d.string, value: r6 } : O(r6) ? { type: d.Quantity, value: r6 } : I(r6) ? { type: r6.resourceType, value: r6 } : qr(r6) ? { type: d.CodeableConcept, value: r6 } : Br(r6) ? { type: d.Coding, value: r6 } : { type: d.BackboneElement, value: r6 };
67948
67948
  }
67949
67949
  function U(r6) {
67950
67950
  return r6.length === 0 ? false : !!r6[0].value;
@@ -67957,7 +67957,7 @@ function J(r6, e) {
67957
67957
  }
67958
67958
  function V(r6, e, t) {
67959
67959
  if (!r6.value) return;
67960
- let n = bt(r6.type, e, t?.profileUrl);
67960
+ let n = St(r6.type, e, t?.profileUrl);
67961
67961
  return n ? $o(r6, e, n) : Ho(r6, e);
67962
67962
  }
67963
67963
  function $o(r6, e, t) {
@@ -67989,7 +67989,7 @@ function Ho(r6, e) {
67989
67989
  let n;
67990
67990
  if (e in t) {
67991
67991
  let i = t[e];
67992
- Array.isArray(i) ? n = i.map(S) : n = S(i);
67992
+ Array.isArray(i) ? n = i.map(b) : n = b(i);
67993
67993
  } else {
67994
67994
  let i = e.endsWith("[x]") ? e.substring(0, e.length - 3) : e;
67995
67995
  for (let o2 of Object.values(d)) {
@@ -68108,7 +68108,7 @@ function Qo(r6, e) {
68108
68108
  function Xe(r6, e) {
68109
68109
  return I(r6, e) && "id" in r6 && typeof r6.id == "string";
68110
68110
  }
68111
- function Se(r6) {
68111
+ function be(r6) {
68112
68112
  let e = M(r6) ?? "undefined/undefined", t = Jo(r6);
68113
68113
  return t === e ? { reference: e } : { reference: e, display: t };
68114
68114
  }
@@ -68116,7 +68116,7 @@ function M(r6) {
68116
68116
  if (H(r6)) return r6.reference;
68117
68117
  if (Xe(r6)) return `${r6.resourceType}/${r6.id}`;
68118
68118
  }
68119
- function be(r6) {
68119
+ function Se(r6) {
68120
68120
  if (r6) return H(r6) ? r6.reference.split("/")[1] : r6.id;
68121
68121
  }
68122
68122
  function zo(r6) {
@@ -68137,7 +68137,7 @@ function Jo(r6) {
68137
68137
  if ("name" in r6 && r6.name && typeof r6.name == "string") return r6.name;
68138
68138
  if ("code" in r6 && r6.code) {
68139
68139
  let e = r6.code;
68140
- if (Array.isArray(e) && (e = e[0]), Wr(e)) return Ye(e);
68140
+ if (Array.isArray(e) && (e = e[0]), qr(e)) return Ye(e);
68141
68141
  if (os(e)) return e.text;
68142
68142
  }
68143
68143
  return M(r6) ?? "";
@@ -68233,7 +68233,7 @@ function Be(r6) {
68233
68233
  function Br(r6) {
68234
68234
  return E(r6) && "code" in r6 && typeof r6.code == "string";
68235
68235
  }
68236
- function Wr(r6) {
68236
+ function qr(r6) {
68237
68237
  return E(r6) && "coding" in r6 && Array.isArray(r6.coding) && r6.coding.every(Br);
68238
68238
  }
68239
68239
  function os(r6) {
@@ -68343,11 +68343,11 @@ function Er(r6) {
68343
68343
  function Rs(r6) {
68344
68344
  return r6.length === 1 ? r6[0] : r6.map(D).join("");
68345
68345
  }
68346
- function bt(r6, e, t) {
68346
+ function St(r6, e, t) {
68347
68347
  let n = Qe(r6, t);
68348
- if (n) return As(n.elements, e);
68348
+ if (n) return ws(n.elements, e);
68349
68349
  }
68350
- function As(r6, e) {
68350
+ function ws(r6, e) {
68351
68351
  let t = r6[e] ?? r6[e + "[x]"];
68352
68352
  if (t) return t;
68353
68353
  for (let n = 0; n < e.length; n++) {
@@ -68365,7 +68365,7 @@ function H(r6, e) {
68365
68365
  return r6 && typeof r6 == "object" && "reference" in r6 && typeof r6.reference == "string" ? e ? r6.reference.match(new RegExp(`^${e}(/|\\?)`)) !== null : true : false;
68366
68366
  }
68367
68367
  var B = { types: {} };
68368
- function We(r6) {
68368
+ function qe(r6) {
68369
68369
  if (r6.startsWith("T")) return r6 + "T00:00:00.000Z".substring(r6.length);
68370
68370
  if (r6.length <= 10) return r6;
68371
68371
  try {
@@ -68427,7 +68427,7 @@ var k = { empty: (r6, e) => m(e.every((t) => C(t.value))), hasValue: (r6, e) =>
68427
68427
  if (!t) return e;
68428
68428
  let n = t.eval(r6, Ce(r6));
68429
68429
  return [...e, ...n];
68430
- }, htmlChecks: (r6, e, t) => [S(true)], iif: (r6, e, t, n, i) => {
68430
+ }, htmlChecks: (r6, e, t) => [b(true)], iif: (r6, e, t, n, i) => {
68431
68431
  let o2 = t.eval(r6, e);
68432
68432
  if (o2.length > 1 || o2.length === 1 && typeof o2[0].value != "boolean") throw new Error("Expected criterion to evaluate to a Boolean");
68433
68433
  return U(o2) ? n.eval(r6, e) : i ? i.eval(r6, e) : [];
@@ -68449,11 +68449,11 @@ var k = { empty: (r6, e) => m(e.every((t) => C(t.value))), hasValue: (r6, e) =>
68449
68449
  }, convertsToInteger: (r6, e) => e.length === 0 ? [] : m(k.toInteger(r6, e).length === 1), toDate: (r6, e) => {
68450
68450
  if (e.length === 0) return [];
68451
68451
  let [{ value: t }] = X(e, 1);
68452
- return typeof t == "string" && /^\d{4}(-\d{2}(-\d{2})?)?/.exec(t) ? [{ type: d.date, value: We(t) }] : [];
68452
+ return typeof t == "string" && /^\d{4}(-\d{2}(-\d{2})?)?/.exec(t) ? [{ type: d.date, value: qe(t) }] : [];
68453
68453
  }, convertsToDate: (r6, e) => e.length === 0 ? [] : m(k.toDate(r6, e).length === 1), toDateTime: (r6, e) => {
68454
68454
  if (e.length === 0) return [];
68455
68455
  let [{ value: t }] = X(e, 1);
68456
- return typeof t == "string" && /^\d{4}(-\d{2}(-\d{2})?)?/.exec(t) ? [{ type: d.dateTime, value: We(t) }] : [];
68456
+ return typeof t == "string" && /^\d{4}(-\d{2}(-\d{2})?)?/.exec(t) ? [{ type: d.dateTime, value: qe(t) }] : [];
68457
68457
  }, convertsToDateTime: (r6, e) => e.length === 0 ? [] : m(k.toDateTime(r6, e).length === 1), toDecimal: (r6, e) => {
68458
68458
  if (e.length === 0) return [];
68459
68459
  let [{ value: t }] = X(e, 1);
@@ -68471,13 +68471,13 @@ var k = { empty: (r6, e) => m(e.every((t) => C(t.value))), hasValue: (r6, e) =>
68471
68471
  let [{ value: t }] = X(e, 1);
68472
68472
  if (typeof t == "string") {
68473
68473
  let n = /^T?(\d{2}(:\d{2}(:\d{2})?)?)/.exec(t);
68474
- if (n) return [{ type: d.time, value: We("T" + n[1]) }];
68474
+ if (n) return [{ type: d.time, value: qe("T" + n[1]) }];
68475
68475
  }
68476
68476
  return [];
68477
- }, convertsToTime: (r6, e) => e.length === 0 ? [] : m(k.toTime(r6, e).length === 1), indexOf: (r6, e, t) => W((n, i) => n.indexOf(i), r6, e, t), substring: (r6, e, t, n) => W((i, o2, s) => {
68477
+ }, convertsToTime: (r6, e) => e.length === 0 ? [] : m(k.toTime(r6, e).length === 1), indexOf: (r6, e, t) => q((n, i) => n.indexOf(i), r6, e, t), substring: (r6, e, t, n) => q((i, o2, s) => {
68478
68478
  let a = o2, u2 = s ? a + s : i.length;
68479
68479
  return a < 0 || a >= i.length ? void 0 : i.substring(a, u2);
68480
- }, r6, e, t, n), startsWith: (r6, e, t) => W((n, i) => n.startsWith(i), r6, e, t), endsWith: (r6, e, t) => W((n, i) => n.endsWith(i), r6, e, t), contains: (r6, e, t) => W((n, i) => n.includes(i), r6, e, t), upper: (r6, e) => W((t) => t.toUpperCase(), r6, e), lower: (r6, e) => W((t) => t.toLowerCase(), r6, e), replace: (r6, e, t, n) => W((i, o2, s) => i.replaceAll(o2, s), r6, e, t, n), matches: (r6, e, t) => W((n, i) => !!new RegExp(i).exec(n), r6, e, t), replaceMatches: (r6, e, t, n) => W((i, o2, s) => i.replaceAll(new RegExp(o2, "g"), s.replaceAll(/\$\{(\w+)\}/g, "$<$1>")), r6, e, t, n), length: (r6, e) => W((t) => t.length, r6, e), toChars: (r6, e) => W((t) => t ? t.split("") : void 0, r6, e), encode: ne, decode: ne, escape: ne, unescape: ne, trim: ne, split: ne, join: (r6, e, t) => {
68480
+ }, r6, e, t, n), startsWith: (r6, e, t) => q((n, i) => n.startsWith(i), r6, e, t), endsWith: (r6, e, t) => q((n, i) => n.endsWith(i), r6, e, t), contains: (r6, e, t) => q((n, i) => n.includes(i), r6, e, t), upper: (r6, e) => q((t) => t.toUpperCase(), r6, e), lower: (r6, e) => q((t) => t.toLowerCase(), r6, e), replace: (r6, e, t, n) => q((i, o2, s) => i.replaceAll(o2, s), r6, e, t, n), matches: (r6, e, t) => q((n, i) => !!new RegExp(i).exec(n), r6, e, t), replaceMatches: (r6, e, t, n) => q((i, o2, s) => i.replaceAll(new RegExp(o2, "g"), s.replaceAll(/\$\{(\w+)\}/g, "$<$1>")), r6, e, t, n), length: (r6, e) => q((t) => t.length, r6, e), toChars: (r6, e) => q((t) => t ? t.split("") : void 0, r6, e), encode: ne, decode: ne, escape: ne, unescape: ne, trim: ne, split: ne, join: (r6, e, t) => {
68481
68481
  let n = t?.eval(r6, Ce(r6))[0]?.value ?? "";
68482
68482
  if (typeof n != "string") throw new TypeError("Separator must be a string.");
68483
68483
  return [{ type: d.string, value: e.map((i) => i.value?.toString() ?? "").join(n) }];
@@ -68502,7 +68502,7 @@ var k = { empty: (r6, e) => m(e.every((t) => C(t.value))), hasValue: (r6, e) =>
68502
68502
  if (typeof n == "string") i = n;
68503
68503
  else if (typeof n == "object") {
68504
68504
  let o2 = n;
68505
- if (o2.resource) return S(o2.resource);
68505
+ if (o2.resource) return b(o2.resource);
68506
68506
  o2.reference ? i = o2.reference : o2.type && o2.identifier && (i = `${o2.type}?identifier=${o2.identifier.system}|${o2.identifier.value}`);
68507
68507
  }
68508
68508
  if (i?.includes("?")) {
@@ -68526,7 +68526,7 @@ var k = { empty: (r6, e) => m(e.every((t) => C(t.value))), hasValue: (r6, e) =>
68526
68526
  let n = e[0].value;
68527
68527
  if (!n?.reference) return [];
68528
68528
  let i = "";
68529
- return t instanceof L && (i = t.name), i && !n.reference.startsWith(i + "/") ? [] : [{ type: d.id, value: be(n) }];
68529
+ return t instanceof L && (i = t.name), i && !n.reference.startsWith(i + "/") ? [] : [{ type: d.id, value: Se(n) }];
68530
68530
  }, extension: (r6, e, t) => {
68531
68531
  let n = t.eval(r6, e)[0].value, i = e?.[0]?.value;
68532
68532
  if (i) {
@@ -68535,12 +68535,12 @@ var k = { empty: (r6, e) => m(e.every((t) => C(t.value))), hasValue: (r6, e) =>
68535
68535
  }
68536
68536
  return [];
68537
68537
  } };
68538
- function W(r6, e, t, ...n) {
68538
+ function q(r6, e, t, ...n) {
68539
68539
  if (t.length === 0) return [];
68540
68540
  let [{ value: i }] = X(t, 1);
68541
68541
  if (typeof i != "string") throw new TypeError("String function cannot be called with non-string");
68542
68542
  let o2 = n.map((a) => a?.eval(e, t)[0]?.value), s = r6(i, ...o2);
68543
- return s === void 0 ? [] : Array.isArray(s) ? s.map(S) : [S(s)];
68543
+ return s === void 0 ? [] : Array.isArray(s) ? s.map(b) : [b(s)];
68544
68544
  }
68545
68545
  function Y(r6, e, t, ...n) {
68546
68546
  if (t.length === 0) return [];
@@ -68559,7 +68559,7 @@ function Ce(r6) {
68559
68559
  for (; e.parent?.variables.$this; ) e = e.parent;
68560
68560
  return [e.variables.$this];
68561
68561
  }
68562
- var q = class {
68562
+ var W = class {
68563
68563
  constructor(e) {
68564
68564
  c(this, "value");
68565
68565
  this.value = e;
@@ -68597,7 +68597,7 @@ var L = class {
68597
68597
  return this.name;
68598
68598
  }
68599
68599
  };
68600
- var wt = class {
68600
+ var At = class {
68601
68601
  eval() {
68602
68602
  return [];
68603
68603
  }
@@ -68605,7 +68605,7 @@ var wt = class {
68605
68605
  return "{}";
68606
68606
  }
68607
68607
  };
68608
- var At = class extends pt {
68608
+ var wt = class extends pt {
68609
68609
  constructor(t, n, i) {
68610
68610
  super(t, n);
68611
68611
  c(this, "impl");
@@ -68626,9 +68626,9 @@ var me = class extends ce {
68626
68626
  return k.ofType(e, this.left.eval(e, t), this.right);
68627
68627
  }
68628
68628
  };
68629
- var w = class extends ce {
68629
+ var A = class extends ce {
68630
68630
  };
68631
- var _ = class extends w {
68631
+ var _ = class extends A {
68632
68632
  constructor(t, n, i, o2) {
68633
68633
  super(t, n, i);
68634
68634
  c(this, "impl");
@@ -68640,7 +68640,7 @@ var _ = class extends w {
68640
68640
  let o2 = this.right.eval(t, n);
68641
68641
  if (o2.length !== 1) return [];
68642
68642
  let s = i[0].value, a = o2[0].value, u2 = O(s) ? s.value : s, l2 = O(a) ? a.value : a, p = this.impl(u2, l2);
68643
- return typeof p == "boolean" ? m(p) : O(s) ? [{ type: d.Quantity, value: { ...s, value: p } }] : [S(p)];
68643
+ return typeof p == "boolean" ? m(p) : O(s) ? [{ type: d.Quantity, value: { ...s, value: p } }] : [b(p)];
68644
68644
  }
68645
68645
  };
68646
68646
  var Ot = class extends ce {
@@ -68652,7 +68652,7 @@ var Ot = class extends ce {
68652
68652
  return o2.length > 0 && o2.every((s) => typeof s.value == "string") ? [{ type: d.string, value: o2.map((s) => s.value).join("") }] : o2;
68653
68653
  }
68654
68654
  };
68655
- var It = class extends w {
68655
+ var It = class extends A {
68656
68656
  constructor(e, t) {
68657
68657
  super("contains", e, t);
68658
68658
  }
@@ -68661,7 +68661,7 @@ var It = class extends w {
68661
68661
  return m(n.some((o2) => o2.value === i[0].value));
68662
68662
  }
68663
68663
  };
68664
- var kt = class extends w {
68664
+ var kt = class extends A {
68665
68665
  constructor(e, t) {
68666
68666
  super("in", e, t);
68667
68667
  }
@@ -68690,7 +68690,7 @@ var Pe = class extends ce {
68690
68690
  return vt([...n, ...i]);
68691
68691
  }
68692
68692
  };
68693
- var Vt = class extends w {
68693
+ var Vt = class extends A {
68694
68694
  constructor(e, t) {
68695
68695
  super("=", e, t);
68696
68696
  }
@@ -68699,7 +68699,7 @@ var Vt = class extends w {
68699
68699
  return Yn(n, i);
68700
68700
  }
68701
68701
  };
68702
- var Dt = class extends w {
68702
+ var Dt = class extends A {
68703
68703
  constructor(e, t) {
68704
68704
  super("!=", e, t);
68705
68705
  }
@@ -68708,7 +68708,7 @@ var Dt = class extends w {
68708
68708
  return Xn(n, i);
68709
68709
  }
68710
68710
  };
68711
- var Mt = class extends w {
68711
+ var Mt = class extends A {
68712
68712
  constructor(e, t) {
68713
68713
  super("~", e, t);
68714
68714
  }
@@ -68717,7 +68717,7 @@ var Mt = class extends w {
68717
68717
  return Nr(n, i);
68718
68718
  }
68719
68719
  };
68720
- var _t = class extends w {
68720
+ var _t = class extends A {
68721
68721
  constructor(e, t) {
68722
68722
  super("!~", e, t);
68723
68723
  }
@@ -68726,7 +68726,7 @@ var _t = class extends w {
68726
68726
  return Kn(Nr(n, i));
68727
68727
  }
68728
68728
  };
68729
- var we = class extends w {
68729
+ var Ae = class extends A {
68730
68730
  constructor(e, t) {
68731
68731
  super("is", e, t);
68732
68732
  }
@@ -68737,7 +68737,7 @@ var we = class extends w {
68737
68737
  return m(Tt(n[0], i));
68738
68738
  }
68739
68739
  };
68740
- var Lt = class extends w {
68740
+ var Lt = class extends A {
68741
68741
  constructor(e, t) {
68742
68742
  super("and", e, t);
68743
68743
  }
@@ -68746,7 +68746,7 @@ var Lt = class extends w {
68746
68746
  return n?.value === true && i?.value === true ? m(true) : n?.value === false || i?.value === false ? m(false) : [];
68747
68747
  }
68748
68748
  };
68749
- var Ft = class extends w {
68749
+ var Ft = class extends A {
68750
68750
  constructor(e, t) {
68751
68751
  super("or", e, t);
68752
68752
  }
@@ -68755,7 +68755,7 @@ var Ft = class extends w {
68755
68755
  return n?.value === false && i?.value === false ? m(false) : n?.value || i?.value ? m(true) : [];
68756
68756
  }
68757
68757
  };
68758
- var Nt = class extends w {
68758
+ var Nt = class extends A {
68759
68759
  constructor(e, t) {
68760
68760
  super("xor", e, t);
68761
68761
  }
@@ -68764,7 +68764,7 @@ var Nt = class extends w {
68764
68764
  return !n || !i ? [] : m(n.value !== i.value);
68765
68765
  }
68766
68766
  };
68767
- var Ut = class extends w {
68767
+ var Ut = class extends A {
68768
68768
  constructor(e, t) {
68769
68769
  super("implies", e, t);
68770
68770
  }
@@ -68788,7 +68788,7 @@ var ie = class {
68788
68788
  return `${this.name}(${this.args.map((e) => e.toString()).join(", ")})`;
68789
68789
  }
68790
68790
  };
68791
- var Ae = class {
68791
+ var we = class {
68792
68792
  constructor(e, t) {
68793
68793
  c(this, "left");
68794
68794
  c(this, "expr");
@@ -68816,7 +68816,7 @@ var Vs = { parse(r6) {
68816
68816
  var Ds = { parse(r6, e) {
68817
68817
  let t = r6.consumeAndParse();
68818
68818
  if (!r6.match("]")) throw new Error("Parse error: expected `]`");
68819
- return new Ae(e, t);
68819
+ return new we(e, t);
68820
68820
  }, precedence: v.Indexer };
68821
68821
  var Ms = { parse(r6, e) {
68822
68822
  if (!(e instanceof L)) throw new Error("Unexpected parentheses");
@@ -68829,7 +68829,7 @@ function _s(r6) {
68829
68829
  return n?.startsWith("'") && n.endsWith("'") ? n = n.substring(1, n.length - 1) : n = "{" + n + "}", { value: t, unit: n };
68830
68830
  }
68831
68831
  function nt() {
68832
- return new dt().registerPrefix("String", { parse: (r6, e) => new q({ type: d.string, value: e.value }) }).registerPrefix("DateTime", { parse: (r6, e) => new q({ type: d.dateTime, value: We(e.value) }) }).registerPrefix("Quantity", { parse: (r6, e) => new q({ type: d.Quantity, value: _s(e.value) }) }).registerPrefix("Number", { parse: (r6, e) => new q({ type: e.value.includes(".") ? d.decimal : d.integer, value: Number.parseFloat(e.value) }) }).registerPrefix("true", { parse: () => new q({ type: d.boolean, value: true }) }).registerPrefix("false", { parse: () => new q({ type: d.boolean, value: false }) }).registerPrefix("Symbol", { parse: (r6, e) => new L(e.value) }).registerPrefix("{}", { parse: () => new wt() }).registerPrefix("(", Vs).registerInfix("[", Ds).registerInfix("(", Ms).prefix("+", v.UnaryAdd, (r6, e) => new At("+", e, (t) => t)).prefix("-", v.UnarySubtract, (r6, e) => new _("-", e, e, (t, n) => -n)).infixLeft(".", v.Dot, (r6, e, t) => new Z(r6, t)).infixLeft("/", v.Divide, (r6, e, t) => new _("/", r6, t, (n, i) => n / i)).infixLeft("*", v.Multiply, (r6, e, t) => new _("*", r6, t, (n, i) => n * i)).infixLeft("+", v.Add, (r6, e, t) => new _("+", r6, t, (n, i) => n + i)).infixLeft("-", v.Subtract, (r6, e, t) => new _("-", r6, t, (n, i) => n - i)).infixLeft("|", v.Union, (r6, e, t) => new Pe(r6, t)).infixLeft("=", v.Equals, (r6, e, t) => new Vt(r6, t)).infixLeft("!=", v.NotEquals, (r6, e, t) => new Dt(r6, t)).infixLeft("~", v.Equivalent, (r6, e, t) => new Mt(r6, t)).infixLeft("!~", v.NotEquivalent, (r6, e, t) => new _t(r6, t)).infixLeft("<", v.LessThan, (r6, e, t) => new _("<", r6, t, (n, i) => n < i)).infixLeft("<=", v.LessThanOrEquals, (r6, e, t) => new _("<=", r6, t, (n, i) => n <= i)).infixLeft(">", v.GreaterThan, (r6, e, t) => new _(">", r6, t, (n, i) => n > i)).infixLeft(">=", v.GreaterThanOrEquals, (r6, e, t) => new _(">=", r6, t, (n, i) => n >= i)).infixLeft("&", v.Ampersand, (r6, e, t) => new Ot(r6, t)).infixLeft("and", v.And, (r6, e, t) => new Lt(r6, t)).infixLeft("as", v.As, (r6, e, t) => new me(r6, t)).infixLeft("contains", v.Contains, (r6, e, t) => new It(r6, t)).infixLeft("div", v.Divide, (r6, e, t) => new _("div", r6, t, (n, i) => Math.trunc(n / i))).infixLeft("in", v.In, (r6, e, t) => new kt(r6, t)).infixLeft("is", v.Is, (r6, e, t) => new we(r6, t)).infixLeft("mod", v.Modulo, (r6, e, t) => new _("mod", r6, t, (n, i) => n % i)).infixLeft("or", v.Or, (r6, e, t) => new Ft(r6, t)).infixLeft("xor", v.Xor, (r6, e, t) => new Nt(r6, t)).infixLeft("implies", v.Implies, (r6, e, t) => new Ut(r6, t));
68832
+ return new dt().registerPrefix("String", { parse: (r6, e) => new W({ type: d.string, value: e.value }) }).registerPrefix("DateTime", { parse: (r6, e) => new W({ type: d.dateTime, value: qe(e.value) }) }).registerPrefix("Quantity", { parse: (r6, e) => new W({ type: d.Quantity, value: _s(e.value) }) }).registerPrefix("Number", { parse: (r6, e) => new W({ type: e.value.includes(".") ? d.decimal : d.integer, value: Number.parseFloat(e.value) }) }).registerPrefix("true", { parse: () => new W({ type: d.boolean, value: true }) }).registerPrefix("false", { parse: () => new W({ type: d.boolean, value: false }) }).registerPrefix("Symbol", { parse: (r6, e) => new L(e.value) }).registerPrefix("{}", { parse: () => new At() }).registerPrefix("(", Vs).registerInfix("[", Ds).registerInfix("(", Ms).prefix("+", v.UnaryAdd, (r6, e) => new wt("+", e, (t) => t)).prefix("-", v.UnarySubtract, (r6, e) => new _("-", e, e, (t, n) => -n)).infixLeft(".", v.Dot, (r6, e, t) => new Z(r6, t)).infixLeft("/", v.Divide, (r6, e, t) => new _("/", r6, t, (n, i) => n / i)).infixLeft("*", v.Multiply, (r6, e, t) => new _("*", r6, t, (n, i) => n * i)).infixLeft("+", v.Add, (r6, e, t) => new _("+", r6, t, (n, i) => n + i)).infixLeft("-", v.Subtract, (r6, e, t) => new _("-", r6, t, (n, i) => n - i)).infixLeft("|", v.Union, (r6, e, t) => new Pe(r6, t)).infixLeft("=", v.Equals, (r6, e, t) => new Vt(r6, t)).infixLeft("!=", v.NotEquals, (r6, e, t) => new Dt(r6, t)).infixLeft("~", v.Equivalent, (r6, e, t) => new Mt(r6, t)).infixLeft("!~", v.NotEquivalent, (r6, e, t) => new _t(r6, t)).infixLeft("<", v.LessThan, (r6, e, t) => new _("<", r6, t, (n, i) => n < i)).infixLeft("<=", v.LessThanOrEquals, (r6, e, t) => new _("<=", r6, t, (n, i) => n <= i)).infixLeft(">", v.GreaterThan, (r6, e, t) => new _(">", r6, t, (n, i) => n > i)).infixLeft(">=", v.GreaterThanOrEquals, (r6, e, t) => new _(">=", r6, t, (n, i) => n >= i)).infixLeft("&", v.Ampersand, (r6, e, t) => new Ot(r6, t)).infixLeft("and", v.And, (r6, e, t) => new Lt(r6, t)).infixLeft("as", v.As, (r6, e, t) => new me(r6, t)).infixLeft("contains", v.Contains, (r6, e, t) => new It(r6, t)).infixLeft("div", v.Divide, (r6, e, t) => new _("div", r6, t, (n, i) => Math.trunc(n / i))).infixLeft("in", v.In, (r6, e, t) => new kt(r6, t)).infixLeft("is", v.Is, (r6, e, t) => new Ae(r6, t)).infixLeft("mod", v.Modulo, (r6, e, t) => new _("mod", r6, t, (n, i) => n % i)).infixLeft("or", v.Or, (r6, e, t) => new Ft(r6, t)).infixLeft("xor", v.Xor, (r6, e, t) => new Nt(r6, t)).infixLeft("implies", v.Implies, (r6, e, t) => new Ut(r6, t));
68833
68833
  }
68834
68834
  var Ls = nt();
68835
68835
  var h = { EQUALS: "eq", NOT_EQUALS: "ne", GREATER_THAN: "gt", LESS_THAN: "lt", GREATER_THAN_OR_EQUALS: "ge", LESS_THAN_OR_EQUALS: "le", STARTS_AFTER: "sa", ENDS_BEFORE: "eb", APPROXIMATELY: "ap", CONTAINS: "contains", STARTS_WITH: "sw", EXACT: "exact", TEXT: "text", NOT: "not", ABOVE: "above", BELOW: "below", IN: "in", NOT_IN: "not-in", OF_TYPE: "of-type", MISSING: "missing", PRESENT: "present", IDENTIFIER: "identifier", ITERATE: "iterate" };
@@ -68838,6 +68838,7 @@ var Yr = { eq: h.EQUALS, ne: h.NOT_EQUALS, lt: h.LESS_THAN, le: h.LESS_THAN_OR_E
68838
68838
  var $s = [h.MISSING, h.PRESENT];
68839
68839
  var Ie = { READ: "read", VREAD: "vread", UPDATE: "update", DELETE: "delete", HISTORY: "history", CREATE: "create", SEARCH: "search" };
68840
68840
  var pa = [Ie.READ, Ie.VREAD, Ie.HISTORY, Ie.SEARCH];
68841
+ var Ed = { FIRST: "first", APPLICATION: "application" };
68841
68842
  function j() {
68842
68843
  return typeof window < "u";
68843
68844
  }
@@ -68893,7 +68894,7 @@ function se() {
68893
68894
  return (r6 === "x" ? e : e & 3 | 8).toString(16);
68894
68895
  });
68895
68896
  }
68896
- var A = { CSS: "text/css", DICOM: "application/dicom", FAVICON: "image/vnd.microsoft.icon", FHIR_JSON: "application/fhir+json", FORM_URL_ENCODED: "application/x-www-form-urlencoded", HL7_V2: "x-application/hl7-v2+er7", HTML: "text/html", JAVASCRIPT: "text/javascript", JSON: "application/json", JSON_PATCH: "application/json-patch+json", JWT: "application/jwt", MULTIPART_FORM_DATA: "multipart/form-data", PNG: "image/png", SCIM_JSON: "application/scim+json", SVG: "image/svg+xml", TEXT: "text/plain", TYPESCRIPT: "text/typescript", PING: "x-application/ping", XML: "text/xml", CDA_XML: "application/cda+xml", OCTET_STREAM: "application/octet-stream" };
68897
+ var w = { CSS: "text/css", DICOM: "application/dicom", FAVICON: "image/vnd.microsoft.icon", FHIR_JSON: "application/fhir+json", FORM_URL_ENCODED: "application/x-www-form-urlencoded", HL7_V2: "x-application/hl7-v2+er7", HTML: "text/html", JAVASCRIPT: "text/javascript", JSON: "application/json", JSON_PATCH: "application/json-patch+json", JWT: "application/jwt", MULTIPART_FORM_DATA: "multipart/form-data", PNG: "image/png", SCIM_JSON: "application/scim+json", SVG: "image/svg+xml", TEXT: "text/plain", TYPESCRIPT: "text/typescript", PING: "x-application/ping", XML: "text/xml", CDA_XML: "application/cda+xml", OCTET_STREAM: "application/octet-stream" };
68897
68898
  var en = class {
68898
68899
  constructor() {
68899
68900
  c(this, "listeners");
@@ -68953,7 +68954,7 @@ function Li(r6) {
68953
68954
  if (rn.includes(r6)) throw new f(x(`'context.version' is required for '${r6}'.`));
68954
68955
  }
68955
68956
  var Pa = { "Patient-open": { patient: { resourceType: "Patient" }, encounter: { resourceType: "Encounter", optional: true } }, "Patient-close": { patient: { resourceType: "Patient" }, encounter: { resourceType: "Encounter", optional: true } }, "ImagingStudy-open": { study: { resourceType: "ImagingStudy" }, encounter: { resourceType: "Encounter", optional: true }, patient: { resourceType: "Patient", optional: true } }, "ImagingStudy-close": { study: { resourceType: "ImagingStudy" }, encounter: { resourceType: "Encounter", optional: true }, patient: { resourceType: "Patient", optional: true } }, "Encounter-open": { encounter: { resourceType: "Encounter" }, patient: { resourceType: "Patient" } }, "Encounter-close": { encounter: { resourceType: "Encounter" }, patient: { resourceType: "Patient" } }, "DiagnosticReport-open": { report: { resourceType: "DiagnosticReport" }, encounter: { resourceType: "Encounter", optional: true }, study: { resourceType: "ImagingStudy", optional: true, manyAllowed: true }, patient: { resourceType: "Patient" } }, "DiagnosticReport-close": { report: { resourceType: "DiagnosticReport" }, encounter: { resourceType: "Encounter", optional: true }, study: { resourceType: "ImagingStudy", optional: true, manyAllowed: true }, patient: { resourceType: "Patient" } }, "DiagnosticReport-select": { report: { resourceType: "DiagnosticReport", reference: true }, patient: { resourceType: "Patient", optional: true, reference: true }, select: { resourceType: "*", reference: true, manyAllowed: true } }, "DiagnosticReport-update": { report: { resourceType: "DiagnosticReport", reference: true }, patient: { resourceType: "Patient", optional: true, reference: true }, updates: { resourceType: "Bundle" } }, syncerror: { operationoutcome: { resourceType: "OperationOutcome" } } };
68956
- function wa(r6) {
68957
+ function Aa(r6) {
68957
68958
  return Ca.includes(r6);
68958
68959
  }
68959
68960
  function Fi(r6) {
@@ -68971,20 +68972,20 @@ function Ht(r6) {
68971
68972
  for (let o2 of i) if (!tn[o2]) return false;
68972
68973
  return !(Fi(r6) && !(typeof r6.endpoint == "string" && r6.endpoint.startsWith("ws")));
68973
68974
  }
68974
- function Aa(r6, e, t, n) {
68975
+ function wa(r6, e, t, n) {
68975
68976
  if (typeof e != "object") throw new f(x(`context[${t}] is invalid. Context must contain a single valid FHIR resource! Resource is not an object.`));
68976
68977
  if (!(e.id && typeof e.id == "string")) throw new f(x(`context[${t}] is invalid. Resource must contain a valid string ID.`));
68977
68978
  if (!e.resourceType) throw new f(x(`context[${t}] is invalid. Resource must contain a resource type. No resource type found.`));
68978
68979
  let i = n.resourceType;
68979
68980
  if (i !== "*") {
68980
- if (!wa(e.resourceType)) throw new f(x(`context[${t}] is invalid. Resource must contain a valid FHIRcast resource type. Resource type is not a known resource type.`));
68981
+ if (!Aa(e.resourceType)) throw new f(x(`context[${t}] is invalid. Resource must contain a valid FHIRcast resource type. Resource type is not a known resource type.`));
68981
68982
  if (i && e.resourceType !== i) throw new f(x(`context[${t}] is invalid. context[${t}] for the '${r6}' event should contain resource of type ${i}.`));
68982
68983
  }
68983
68984
  }
68984
68985
  function Oa(r6, e, t, n, i) {
68985
68986
  if (i.set(e.key, (i.get(e.key) ?? 0) + 1), n.reference) {
68986
68987
  if (!H(e.reference)) throw new f(x(`context[${t}] is invalid. Expected key '${e.key}' to be a reference.`));
68987
- } else Aa(r6, e.resource, t, n);
68988
+ } else wa(r6, e.resource, t, n);
68988
68989
  }
68989
68990
  function Ia(r6, e) {
68990
68991
  let t = /* @__PURE__ */ new Map(), n = Pa[r6];
@@ -69063,17 +69064,17 @@ var Qt = class {
69063
69064
  return this.medplum.get(`keyvalue/v1/${e}`);
69064
69065
  }
69065
69066
  async set(e, t) {
69066
- await this.medplum.put(`keyvalue/v1/${e}`, t, A.TEXT);
69067
+ await this.medplum.put(`keyvalue/v1/${e}`, t, w.TEXT);
69067
69068
  }
69068
69069
  async delete(e) {
69069
69070
  await this.medplum.delete(`keyvalue/v1/${e}`);
69070
69071
  }
69071
69072
  };
69072
- var Wi;
69073
- Wi = Symbol.toStringTag;
69073
+ var qi;
69074
+ qi = Symbol.toStringTag;
69074
69075
  var F = class {
69075
69076
  constructor(e) {
69076
- c(this, Wi, "ReadablePromise");
69077
+ c(this, qi, "ReadablePromise");
69077
69078
  c(this, "suspender");
69078
69079
  c(this, "status", "pending");
69079
69080
  c(this, "response");
@@ -69424,7 +69425,7 @@ var Kt = class {
69424
69425
  return;
69425
69426
  }
69426
69427
  if (o2.type === "handshake") {
69427
- let a = be(o2.subscription), u2 = { type: "connect", payload: { subscriptionId: a } };
69428
+ let a = Se(o2.subscription), u2 = { type: "connect", payload: { subscriptionId: a } };
69428
69429
  this.masterSubEmitter?.dispatchEvent(u2);
69429
69430
  let l2 = this.criteriaEntriesBySubscriptionId.get(a);
69430
69431
  if (!l2) {
@@ -69435,7 +69436,7 @@ var Kt = class {
69435
69436
  return;
69436
69437
  }
69437
69438
  this.masterSubEmitter?.dispatchEvent({ type: "message", payload: i });
69438
- let s = this.criteriaEntriesBySubscriptionId.get(be(o2.subscription));
69439
+ let s = this.criteriaEntriesBySubscriptionId.get(Se(o2.subscription));
69439
69440
  if (!s) {
69440
69441
  console.warn("Received notification for criteria the SubscriptionManager is not listening for");
69441
69442
  return;
@@ -69565,13 +69566,13 @@ var Kt = class {
69565
69566
  return this.masterSubEmitter || (this.masterSubEmitter = new at(...Array.from(this.criteriaEntries.keys()))), this.masterSubEmitter;
69566
69567
  }
69567
69568
  };
69568
- var cn = "5.0.12-7648234";
69569
- var Fa = A.FHIR_JSON + ", */*; q=0.1";
69569
+ var cn = "5.0.13-53ddc3d";
69570
+ var Fa = w.FHIR_JSON + ", */*; q=0.1";
69570
69571
  var Na = "https://api.medplum.com/";
69571
69572
  var Ua = 1e3;
69572
69573
  var Ba = 6e4;
69573
- var Wa = 0;
69574
- var qa = 3e5;
69574
+ var qa = 0;
69575
+ var Wa = 3e5;
69575
69576
  var ja = "Binary/";
69576
69577
  var Hi = { resourceType: "Device", id: "system", deviceName: [{ type: "model-name", name: "System" }] };
69577
69578
  var $e = { ClientCredentials: "client_credentials", AuthorizationCode: "authorization_code", RefreshToken: "refresh_token", JwtBearer: "urn:ietf:params:oauth:grant-type:jwt-bearer", TokenExchange: "urn:ietf:params:oauth:grant-type:token-exchange" };
@@ -69616,7 +69617,7 @@ var Yt = class extends ee {
69616
69617
  c(this, "keyValueClient");
69617
69618
  c(this, "logLevel");
69618
69619
  if (t?.baseUrl && !t.baseUrl.startsWith("http")) throw new Error("Base URL must start with http or https");
69619
- this.options = t ?? {}, this.fetch = t?.fetch ?? Ga(), this.storage = t?.storage ?? new st(void 0, t?.storagePrefix), this.createPdfImpl = t?.createPdf, this.baseUrl = Qr(t?.baseUrl ?? Na), this.fhirBaseUrl = G(this.baseUrl, t?.fhirUrlPath ?? "fhir/R4"), this.authorizeUrl = G(this.baseUrl, t?.authorizeUrl ?? "oauth2/authorize"), this.tokenUrl = G(this.baseUrl, t?.tokenUrl ?? "oauth2/token"), this.logoutUrl = G(this.baseUrl, t?.logoutUrl ?? "oauth2/logout"), this.fhircastHubUrl = G(this.baseUrl, t?.fhircastHubUrl ?? "fhircast/STU3"), this.clientId = t?.clientId ?? "", this.clientSecret = t?.clientSecret ?? "", this.credentialsInHeader = t?.authCredentialsMethod === "header", this.defaultHeaders = t?.defaultHeaders ?? {}, this.onUnauthenticated = t?.onUnauthenticated, this.refreshGracePeriod = t?.refreshGracePeriod ?? qa, this.logLevel = this.initializeLogLevel(t), this.cacheTime = t?.cacheTime ?? (j() ? Ba : Wa), this.cacheTime > 0 ? this.requestCache = new De(t?.resourceCacheSize ?? Ua) : this.requestCache = void 0, t?.autoBatchTime ? (this.autoBatchTime = t.autoBatchTime, this.autoBatchQueue = []) : (this.autoBatchTime = 0, this.autoBatchQueue = void 0), t?.accessToken && this.setAccessToken(t.accessToken), this.storage.getInitPromise === void 0 ? (t?.accessToken || this.attemptResumeActiveLogin().catch(console.error), this.initPromise = Promise.resolve(), this.dispatchEvent({ type: "storageInitialized" })) : (this.initComplete = false, this.initPromise = this.storage.getInitPromise(), this.initPromise.then(() => {
69620
+ this.options = t ?? {}, this.fetch = t?.fetch ?? Ga(), this.storage = t?.storage ?? new st(void 0, t?.storagePrefix), this.createPdfImpl = t?.createPdf, this.baseUrl = Qr(t?.baseUrl ?? Na), this.fhirBaseUrl = G(this.baseUrl, t?.fhirUrlPath ?? "fhir/R4"), this.authorizeUrl = G(this.baseUrl, t?.authorizeUrl ?? "oauth2/authorize"), this.tokenUrl = G(this.baseUrl, t?.tokenUrl ?? "oauth2/token"), this.logoutUrl = G(this.baseUrl, t?.logoutUrl ?? "oauth2/logout"), this.fhircastHubUrl = G(this.baseUrl, t?.fhircastHubUrl ?? "fhircast/STU3"), this.clientId = t?.clientId ?? "", this.clientSecret = t?.clientSecret ?? "", this.credentialsInHeader = t?.authCredentialsMethod === "header", this.defaultHeaders = t?.defaultHeaders ?? {}, this.onUnauthenticated = t?.onUnauthenticated, this.refreshGracePeriod = t?.refreshGracePeriod ?? Wa, this.logLevel = this.initializeLogLevel(t), this.cacheTime = t?.cacheTime ?? (j() ? Ba : qa), this.cacheTime > 0 ? this.requestCache = new De(t?.resourceCacheSize ?? Ua) : this.requestCache = void 0, t?.autoBatchTime ? (this.autoBatchTime = t.autoBatchTime, this.autoBatchQueue = []) : (this.autoBatchTime = 0, this.autoBatchQueue = void 0), t?.accessToken && this.setAccessToken(t.accessToken), this.storage.getInitPromise === void 0 ? (t?.accessToken || this.attemptResumeActiveLogin().catch(console.error), this.initPromise = Promise.resolve(), this.dispatchEvent({ type: "storageInitialized" })) : (this.initComplete = false, this.initPromise = this.storage.getInitPromise(), this.initPromise.then(() => {
69620
69621
  t?.accessToken || this.attemptResumeActiveLogin().catch(console.error), this.initComplete = true, this.dispatchEvent({ type: "storageInitialized" });
69621
69622
  }).catch((n) => {
69622
69623
  console.error(n), this.initComplete = true, this.dispatchEvent({ type: "storageInitFailed", payload: { error: n } });
@@ -69687,7 +69688,7 @@ var Yt = class extends ee {
69687
69688
  return t = t.toString(), this.setRequestBody(o2, n), i && this.setRequestContentType(o2, i), this.invalidateUrl(t), this.request("PUT", t, o2);
69688
69689
  }
69689
69690
  patch(t, n, i = {}) {
69690
- return t = t.toString(), this.setRequestBody(i, n), this.setRequestContentType(i, A.JSON_PATCH), this.invalidateUrl(t), this.request("PATCH", t, i);
69691
+ return t = t.toString(), this.setRequestBody(i, n), this.setRequestContentType(i, w.JSON_PATCH), this.invalidateUrl(t), this.request("PATCH", t, i);
69691
69692
  }
69692
69693
  delete(t, n) {
69693
69694
  return t = t.toString(), this.invalidateUrl(t), this.request("DELETE", t, n);
@@ -69876,7 +69877,7 @@ var Yt = class extends ee {
69876
69877
  console.warn(`No StructureDefinition found for ${t}!`);
69877
69878
  return;
69878
69879
  }
69879
- wr(a);
69880
+ Ar(a);
69880
69881
  }
69881
69882
  })());
69882
69883
  return this.setCacheEntry(i, s, n), s;
@@ -69910,7 +69911,7 @@ var Yt = class extends ee {
69910
69911
  }
69911
69912
  async createAttachment(t, n, i, o2, s) {
69912
69913
  let a = zi(t, n, i, o2);
69913
- if (a.contentType === A.XML) {
69914
+ if (a.contentType === w.XML) {
69914
69915
  let p = a.data, y2;
69915
69916
  p instanceof Blob ? y2 = await new Promise((T, $) => {
69916
69917
  let Q2 = new FileReader();
@@ -69921,7 +69922,7 @@ var Yt = class extends ee {
69921
69922
  }
69922
69923
  T(Q2.result);
69923
69924
  }, Q2.readAsText(p, "utf-8");
69924
- }) : ArrayBuffer.isView(p) ? y2 = new TextDecoder().decode(p) : y2 = p, y2.includes("<ClinicalDocument") && y2.includes("urn:hl7-org:v3") && (a = { ...a, contentType: A.CDA_XML });
69925
+ }) : ArrayBuffer.isView(p) ? y2 = new TextDecoder().decode(p) : y2 = p, y2.includes("<ClinicalDocument") && y2.includes("urn:hl7-org:v3") && (a = { ...a, contentType: w.CDA_XML });
69925
69926
  }
69926
69927
  let u2 = s ?? (typeof n == "object" ? n : {}), l2 = await this.createBinary(a, u2);
69927
69928
  return { contentType: a.contentType, url: l2.url, title: a.filename };
@@ -69953,7 +69954,7 @@ var Yt = class extends ee {
69953
69954
  }
69954
69955
  createComment(t, n, i) {
69955
69956
  let o2 = this.getProfile(), s, a;
69956
- return t.resourceType === "Encounter" && (s = Se(t), a = t.subject), t.resourceType === "ServiceRequest" && (s = t.encounter, a = t.subject), t.resourceType === "Patient" && (a = Se(t)), this.createResource({ resourceType: "Communication", status: "completed", basedOn: [Se(t)], encounter: s, subject: a, sender: o2 ? Se(o2) : void 0, sent: (/* @__PURE__ */ new Date()).toISOString(), payload: [{ contentString: n }] }, i);
69957
+ return t.resourceType === "Encounter" && (s = be(t), a = t.subject), t.resourceType === "ServiceRequest" && (s = t.encounter, a = t.subject), t.resourceType === "Patient" && (a = be(t)), this.createResource({ resourceType: "Communication", status: "completed", basedOn: [be(t)], encounter: s, subject: a, sender: o2 ? be(o2) : void 0, sent: (/* @__PURE__ */ new Date()).toISOString(), payload: [{ contentString: n }] }, i);
69957
69958
  }
69958
69959
  async updateResource(t, n) {
69959
69960
  if (!t.resourceType) throw new Error("Missing resourceType");
@@ -69986,23 +69987,23 @@ var Yt = class extends ee {
69986
69987
  return this.post(this.fhirBaseUrl, t, void 0, n);
69987
69988
  }
69988
69989
  sendEmail(t, n) {
69989
- return this.post("email/v1/send", t, A.JSON, n);
69990
+ return this.post("email/v1/send", t, w.JSON, n);
69990
69991
  }
69991
69992
  graphql(t, n, i, o2) {
69992
- return this.post(this.fhirUrl("$graphql"), { query: t, operationName: n, variables: i }, A.JSON, o2);
69993
+ return this.post(this.fhirUrl("$graphql"), { query: t, operationName: n, variables: i }, w.JSON, o2);
69993
69994
  }
69994
69995
  readResourceGraph(t, n, i, o2) {
69995
69996
  return this.get(`${this.fhirUrl(t, n)}/$graph?graph=${i}`, o2);
69996
69997
  }
69997
69998
  pushToAgent(t, n, i, o2, s, a) {
69998
- let { waitTimeout: u2, ...l2 } = a ?? {};
69999
- return this.post(this.fhirUrl("Agent", be(t), "$push"), { destination: typeof n == "string" ? n : M(n), body: i, contentType: o2, waitForResponse: s, ...u2 !== void 0 ? { waitTimeout: u2 } : void 0 }, A.FHIR_JSON, l2);
69999
+ let { waitTimeout: u2, returnAck: l2, ...p } = a ?? {};
70000
+ return this.post(this.fhirUrl("Agent", Se(t), "$push"), { destination: typeof n == "string" ? n : M(n), body: i, contentType: o2, waitForResponse: s, ...u2 !== void 0 ? { waitTimeout: u2 } : void 0, ...l2 !== void 0 ? { returnAck: l2 } : void 0 }, w.FHIR_JSON, p);
70000
70001
  }
70001
70002
  getCdsServices(t) {
70002
70003
  return this.get("/cds-services", t);
70003
70004
  }
70004
70005
  callCdsService(t, n, i) {
70005
- return this.post(`/cds-services/${t}`, n, A.JSON, i);
70006
+ return this.post(`/cds-services/${t}`, n, w.JSON, i);
70006
70007
  }
70007
70008
  getActiveLogin() {
70008
70009
  return this.storage.getObject("activeLogin");
@@ -70071,7 +70072,7 @@ var Yt = class extends ee {
70071
70072
  }
70072
70073
  async createMedia(t, n) {
70073
70074
  let { additionalFields: i, ...o2 } = t, s = await this.createResource({ resourceType: "Media", status: "preparation", content: { contentType: t.contentType }, ...i });
70074
- o2.securityContext || (o2.securityContext = Se(s));
70075
+ o2.securityContext || (o2.securityContext = be(s));
70075
70076
  let a = await this.createAttachment(o2, n);
70076
70077
  return this.updateResource({ ...s, status: "completed", content: a });
70077
70078
  }
@@ -70080,7 +70081,7 @@ var Yt = class extends ee {
70080
70081
  }
70081
70082
  async createDocumentReference(t, n) {
70082
70083
  let { additionalFields: i, ...o2 } = t, s = await this.createResource({ resourceType: "DocumentReference", status: "current", content: [{ attachment: { contentType: t.contentType } }], ...i });
70083
- o2.securityContext || (o2.securityContext = Se(s));
70084
+ o2.securityContext || (o2.securityContext = be(s));
70084
70085
  let a = await this.createAttachment(o2, n);
70085
70086
  return this.updateResource({ ...s, content: [{ attachment: a }] });
70086
70087
  }
@@ -70226,7 +70227,7 @@ var Yt = class extends ee {
70226
70227
  addFetchOptionsDefaults(t) {
70227
70228
  Object.entries(this.defaultHeaders).forEach(([n, i]) => {
70228
70229
  this.setRequestHeader(t, n, i);
70229
- }), this.setRequestHeader(t, "Accept", Fa, true), this.options.extendedMode !== false && this.setRequestHeader(t, "X-Medplum", "extended"), t.body && this.setRequestHeader(t, "Content-Type", A.FHIR_JSON, true), this.accessToken ? this.setRequestHeader(t, "Authorization", "Bearer " + this.accessToken) : this.basicAuth && this.setRequestHeader(t, "Authorization", "Basic " + this.basicAuth), t.cache || (t.cache = "no-cache"), t.credentials || (t.credentials = "include");
70230
+ }), this.setRequestHeader(t, "Accept", Fa, true), this.options.extendedMode !== false && this.setRequestHeader(t, "X-Medplum", "extended"), t.body && this.setRequestHeader(t, "Content-Type", w.FHIR_JSON, true), this.accessToken ? this.setRequestHeader(t, "Authorization", "Bearer " + this.accessToken) : this.basicAuth && this.setRequestHeader(t, "Authorization", "Basic " + this.basicAuth), t.cache || (t.cache = "no-cache"), t.credentials || (t.credentials = "include");
70230
70231
  }
70231
70232
  setRequestContentType(t, n) {
70232
70233
  this.setRequestHeader(t, "Content-Type", n);
@@ -70309,20 +70310,20 @@ var Yt = class extends ee {
70309
70310
  async fhircastSubscribe(t, n) {
70310
70311
  if (!(typeof t == "string" && t !== "")) throw new f(x("Invalid topic provided. Topic must be a valid string."));
70311
70312
  if (!(typeof n == "object" && Array.isArray(n) && n.length > 0)) throw new f(x("Invalid events provided. Events must be an array of event names containing at least one event."));
70312
- let i = { channelType: "websocket", mode: "subscribe", topic: t, events: n }, s = (await this.post(this.fhircastHubUrl, nn(i), A.FORM_URL_ENCODED))["hub.channel.endpoint"];
70313
+ let i = { channelType: "websocket", mode: "subscribe", topic: t, events: n }, s = (await this.post(this.fhircastHubUrl, nn(i), w.FORM_URL_ENCODED))["hub.channel.endpoint"];
70313
70314
  if (!s) throw new Error("Invalid response!");
70314
70315
  return i.endpoint = s, i;
70315
70316
  }
70316
70317
  async fhircastUnsubscribe(t) {
70317
70318
  if (!Ht(t)) throw new f(x("Invalid topic or subscriptionRequest. SubscriptionRequest must be an object."));
70318
70319
  if (!(t.endpoint && typeof t.endpoint == "string" && t.endpoint.startsWith("ws"))) throw new f(x("Provided subscription request must have an endpoint in order to unsubscribe."));
70319
- t.mode = "unsubscribe", await this.post(this.fhircastHubUrl, nn(t), A.FORM_URL_ENCODED);
70320
+ t.mode = "unsubscribe", await this.post(this.fhircastHubUrl, nn(t), w.FORM_URL_ENCODED);
70320
70321
  }
70321
70322
  fhircastConnect(t) {
70322
70323
  return new $t(t);
70323
70324
  }
70324
70325
  async fhircastPublish(t, n, i, o2) {
70325
- return _i(n) ? this.post(this.fhircastHubUrl, on(t, n, i, o2), A.JSON) : (Li(n), this.post(this.fhircastHubUrl, on(t, n, i), A.JSON));
70326
+ return _i(n) ? this.post(this.fhircastHubUrl, on(t, n, i, o2), w.JSON) : (Li(n), this.post(this.fhircastHubUrl, on(t, n, i), w.JSON));
70326
70327
  }
70327
70328
  async fhircastGetContext(t) {
70328
70329
  return this.get(`${this.fhircastHubUrl}/${t}`, { cache: "no-cache" });
@@ -70339,7 +70340,7 @@ var Yt = class extends ee {
70339
70340
  }
70340
70341
  }
70341
70342
  async fetchTokens(t) {
70342
- let n = new URLSearchParams(t), i = { ...this.defaultHeaders, "Content-Type": A.FORM_URL_ENCODED };
70343
+ let n = new URLSearchParams(t), i = { ...this.defaultHeaders, "Content-Type": w.FORM_URL_ENCODED };
70343
70344
  this.basicAuth && (i.Authorization = `Basic ${this.basicAuth}`), this.credentialsInHeader && (n.delete("client_id"), n.delete("client_secret"), !this.basicAuth && t.client_id && t.client_secret && (i.Authorization = `Basic ${jt(t.client_id + ":" + t.client_secret)}`));
70344
70345
  let o2 = { method: "POST", headers: i, body: n.toString(), credentials: "include" }, s;
70345
70346
  try {
@@ -70616,7 +70617,7 @@ var yo = class r5 {
70616
70617
  this.write(JSON.stringify({ level: Nc[e], timestamp: (/* @__PURE__ */ new Date()).toISOString(), msg: this.prefix ? `${this.prefix}${t}` : t, ...i, ...this.metadata }));
70617
70618
  }
70618
70619
  };
70619
- function om(r6) {
70620
+ function cm(r6) {
70620
70621
  let e = He[r6.toUpperCase()];
70621
70622
  if (e === void 0) throw new Error(`Invalid log level: ${r6}`);
70622
70623
  return e;
@@ -70669,7 +70670,7 @@ async function vn(r6, e, t) {
70669
70670
  function Xc(r6) {
70670
70671
  return /^\d+\.\d+\.\d+(-[0-9a-z]{7})?$/.test(r6);
70671
70672
  }
70672
- async function Dm(r6, e) {
70673
+ async function Lm(r6, e) {
70673
70674
  if (!Xc(e)) return false;
70674
70675
  try {
70675
70676
  await vn(r6, e);
@@ -70678,7 +70679,7 @@ async function Dm(r6, e) {
70678
70679
  }
70679
70680
  return true;
70680
70681
  }
70681
- async function Mm(r6) {
70682
+ async function Fm(r6) {
70682
70683
  let e = await vn(r6);
70683
70684
  if (!e.tag_name.startsWith("v")) throw new Error(`Invalid release name found. Release tag '${e.tag_name}' did not start with 'v'`);
70684
70685
  return e.tag_name.slice(1);
@@ -70698,8 +70699,8 @@ var import_node_net = require("node:net");
70698
70699
  var import_iconv_lite = __toESM(require_lib(), 1);
70699
70700
  var import_node_net2 = __toESM(require("node:net"), 1);
70700
70701
  var x2 = Object.defineProperty;
70701
- var b = (d2, i, e) => i in d2 ? x2(d2, i, { enumerable: true, configurable: true, writable: true, value: e }) : d2[i] = e;
70702
- var o = (d2, i, e) => b(d2, typeof i != "symbol" ? i + "" : i, e);
70702
+ var b2 = (d2, i, e) => i in d2 ? x2(d2, i, { enumerable: true, configurable: true, writable: true, value: e }) : d2[i] = e;
70703
+ var o = (d2, i, e) => b2(d2, typeof i != "symbol" ? i + "" : i, e);
70703
70704
  var m2 = class extends EventTarget {
70704
70705
  addEventListener(i, e, t) {
70705
70706
  super.addEventListener(i, e, t);
@@ -70736,11 +70737,10 @@ var u = class extends Event {
70736
70737
  super("close");
70737
70738
  }
70738
70739
  };
70739
- var y = { FIRST: "first", APPLICATION: "application" };
70740
- var w2 = "utf-8";
70740
+ var y = "utf-8";
70741
70741
  var D2 = 60 * 1e3;
70742
70742
  var g2 = class extends m2 {
70743
- constructor(e, t = w2, s, n = {}) {
70743
+ constructor(e, t = y, s, n = {}) {
70744
70744
  super();
70745
70745
  o(this, "socket");
70746
70746
  o(this, "encoding");
@@ -70777,7 +70777,7 @@ var g2 = class extends m2 {
70777
70777
  return;
70778
70778
  }
70779
70779
  let p = c2.message.getSegment("MSA")?.getField(1)?.toString()?.toUpperCase();
70780
- p && (h2.returnAck === y.APPLICATION && p === "CA" || (h2.resolve(c2.message), this.pendingMessages.delete(a)));
70780
+ p && (h2.returnAck === Ed.APPLICATION && p === "CA" || (h2.resolve(c2.message), this.pendingMessages.delete(a)));
70781
70781
  });
70782
70782
  }
70783
70783
  isClosed() {
@@ -70830,7 +70830,7 @@ var g2 = class extends m2 {
70830
70830
  let r6;
70831
70831
  t?.timeoutMs && (r6 = setTimeout(() => {
70832
70832
  this.pendingMessages.delete(c2), n(new f({ resourceType: "OperationOutcome", issue: [{ severity: "error", code: "timeout", details: { text: "Client timeout" }, diagnostics: `Request timed out after waiting ${t.timeoutMs} milliseconds for response` }] }));
70833
- }, t.timeoutMs)), this.pendingMessages.set(c2, { message: e, resolve: s, reject: n, returnAck: t?.returnAck ?? y.APPLICATION, timer: r6 }), this.sendImpl(e);
70833
+ }, t.timeoutMs)), this.pendingMessages.set(c2, { message: e, resolve: s, reject: n, returnAck: t?.returnAck ?? Ed.APPLICATION, timer: r6 }), this.sendImpl(e);
70834
70834
  });
70835
70835
  }
70836
70836
  async close() {
@@ -70851,7 +70851,7 @@ var g2 = class extends m2 {
70851
70851
  this.chunks = [];
70852
70852
  }
70853
70853
  setEncoding(e) {
70854
- this.encoding = e ?? w2;
70854
+ this.encoding = e ?? y;
70855
70855
  }
70856
70856
  getEncoding() {
70857
70857
  return this.encoding;
@@ -70872,7 +70872,7 @@ var g2 = class extends m2 {
70872
70872
  return this.pendingMessages.size;
70873
70873
  }
70874
70874
  };
70875
- var A2 = class extends m2 {
70875
+ var S = class extends m2 {
70876
70876
  constructor(e) {
70877
70877
  super();
70878
70878
  o(this, "options");
@@ -70960,7 +70960,7 @@ var A2 = class extends m2 {
70960
70960
  }
70961
70961
  };
70962
70962
  var Q = 1e4;
70963
- var S2 = class {
70963
+ var A2 = class {
70964
70964
  constructor(i) {
70965
70965
  o(this, "handler");
70966
70966
  o(this, "server");
@@ -71235,7 +71235,7 @@ var ByteStreamChannelConnection = class {
71235
71235
  accessToken: "placeholder",
71236
71236
  channel: this.channel.getDefinition().name,
71237
71237
  remote: this.remote,
71238
- contentType: A.OCTET_STREAM,
71238
+ contentType: w.OCTET_STREAM,
71239
71239
  body: messageBuffer.toString("hex"),
71240
71240
  callback: `Agent/${this.channel.app.agentId}-${(0, import_node_crypto.randomUUID)()}`
71241
71241
  });
@@ -71364,14 +71364,14 @@ var AgentDicomChannel = class extends BaseChannel {
71364
71364
  calledAeTitle: this.association?.getCalledAeTitle()
71365
71365
  },
71366
71366
  dataset: dicomJson,
71367
- binary: binary ? Se(binary) : void 0
71367
+ binary: binary ? be(binary) : void 0
71368
71368
  };
71369
71369
  App.instance.addToWebSocketQueue({
71370
71370
  type: "agent:transmit:request",
71371
71371
  accessToken: "placeholder",
71372
71372
  channel: _DcmjsDimseScp.channel.getDefinition().name,
71373
71373
  remote: this.association?.getCallingAeTitle(),
71374
- contentType: A.JSON,
71374
+ contentType: w.JSON,
71375
71375
  body: JSON.stringify(payload),
71376
71376
  callback: `Agent/${App.instance.agentId}-${(0, import_node_crypto2.randomUUID)()}`
71377
71377
  });
@@ -71590,7 +71590,7 @@ function calculatePercentile(rttSamples, percentile) {
71590
71590
  if (rttSamples.length === 0) {
71591
71591
  return -1;
71592
71592
  }
71593
- const sorted = [...rttSamples].sort((a, b2) => a - b2);
71593
+ const sorted = [...rttSamples].sort((a, b3) => a - b3);
71594
71594
  const index = Math.ceil(percentile / 100 * sorted.length) - 1;
71595
71595
  return sorted[Math.max(0, index)];
71596
71596
  }
@@ -71653,7 +71653,7 @@ var AgentHl7Channel = class extends BaseChannel {
71653
71653
  // Default app level ack mode is AL (Always)
71654
71654
  __publicField(this, "assignSeqNo", false);
71655
71655
  __publicField(this, "lastSeqNo", -1);
71656
- this.server = new S2((connection) => this.handleNewConnection(connection));
71656
+ this.server = new A2((connection) => this.handleNewConnection(connection));
71657
71657
  this.prefix = `[HL7:${definition.name}] `;
71658
71658
  this.log = app.log.clone({ options: { prefix: this.prefix } });
71659
71659
  this.channelLog = app.channelLog.clone({ options: { prefix: this.prefix } });
@@ -71818,7 +71818,7 @@ var AgentHl7ChannelConnection = class {
71818
71818
  accessToken: "placeholder",
71819
71819
  channel: this.channel.getDefinition().name,
71820
71820
  remote: this.remote,
71821
- contentType: A.HL7_V2,
71821
+ contentType: w.HL7_V2,
71822
71822
  body: event.message.toString(),
71823
71823
  callback: `Agent/${this.channel.app.agentId}-${(0, import_node_crypto3.randomUUID)()}`
71824
71824
  });
@@ -71903,7 +71903,7 @@ function shouldSendAppLevelAck(options) {
71903
71903
  }
71904
71904
 
71905
71905
  // src/enhanced-hl7-client.ts
71906
- var EnhancedHl7Client = class extends A2 {
71906
+ var EnhancedHl7Client = class extends S {
71907
71907
  constructor(options) {
71908
71908
  super(options);
71909
71909
  __publicField(this, "stats");
@@ -71917,12 +71917,12 @@ var EnhancedHl7Client = class extends A2 {
71917
71917
  }
71918
71918
  return super.send(msg);
71919
71919
  }
71920
- async sendAndWait(msg) {
71920
+ async sendAndWait(msg, options) {
71921
71921
  const msgControlId = msg.getSegment("MSH")?.getField(10)?.toString();
71922
71922
  if (this.stats && msgControlId) {
71923
71923
  this.stats.recordMessageSent(msgControlId);
71924
71924
  }
71925
- const response2 = await super.sendAndWait(msg);
71925
+ const response2 = await super.sendAndWait(msg, options);
71926
71926
  if (this.stats && msgControlId) {
71927
71927
  this.stats.recordAckReceived(msgControlId);
71928
71928
  }
@@ -71981,7 +71981,7 @@ var Hl7ClientPool = class {
71981
71981
  }
71982
71982
  closeAndRemoveClient(client) {
71983
71983
  this.log.info(
71984
- `Closing client for remote 'mllp://${client.host}:${client.port}?encoding=${client.encoding ?? w2}' and removing it from the pool...`
71984
+ `Closing client for remote 'mllp://${client.host}:${client.port}?encoding=${client.encoding ?? y}' and removing it from the pool...`
71985
71985
  );
71986
71986
  this.removeClient(client);
71987
71987
  client.close().catch((err) => {
@@ -72261,7 +72261,7 @@ function parseLoggerConfigFromArgs(args) {
72261
72261
  let configValue;
72262
72262
  if (settingName === "logLevel") {
72263
72263
  try {
72264
- configValue = om(propVal);
72264
+ configValue = cm(propVal);
72265
72265
  } catch (err) {
72266
72266
  warnings.push(`Error while parsing ${propName}: ${_e(err)}`);
72267
72267
  }
@@ -72828,7 +72828,7 @@ var _App = class _App {
72828
72828
  case "agent:transmit:request":
72829
72829
  if (this.config?.status !== "active") {
72830
72830
  this.sendAgentDisabledError(command);
72831
- } else if (command.contentType === A.PING) {
72831
+ } else if (command.contentType === w.PING) {
72832
72832
  await this.tryPingHost(command);
72833
72833
  } else {
72834
72834
  this.pushMessage(command);
@@ -72938,7 +72938,7 @@ var _App = class _App {
72938
72938
  const pools = Array.from(this.hl7Clients.values());
72939
72939
  const clientStats = Object.fromEntries(
72940
72940
  pools.map((pool) => [
72941
- `mllp://${pool.host}:${pool.port}?encoding=${pool.encoding ?? w2}`,
72941
+ `mllp://${pool.host}:${pool.port}?encoding=${pool.encoding ?? y}`,
72942
72942
  pool.getPoolStats()
72943
72943
  ])
72944
72944
  );
@@ -73220,7 +73220,7 @@ ${result}`);
73220
73220
  this.addToWebSocketQueue({
73221
73221
  type: "agent:transmit:response",
73222
73222
  channel: message.channel,
73223
- contentType: A.PING,
73223
+ contentType: w.PING,
73224
73224
  remote: message.remote,
73225
73225
  callback: message.callback,
73226
73226
  statusCode: 200,
@@ -73231,7 +73231,7 @@ ${result}`);
73231
73231
  this.addToWebSocketQueue({
73232
73232
  type: "agent:transmit:response",
73233
73233
  channel: message.channel,
73234
- contentType: A.TEXT,
73234
+ contentType: w.TEXT,
73235
73235
  remote: message.remote,
73236
73236
  callback: message.callback,
73237
73237
  statusCode: 400,
@@ -73263,7 +73263,7 @@ ${result}`);
73263
73263
  return;
73264
73264
  }
73265
73265
  let child;
73266
- if (message.version && !await Dm("agent-upgrader", message.version)) {
73266
+ if (message.version && !await Lm("agent-upgrader", message.version)) {
73267
73267
  const versionTag = message.version ? `v${message.version}` : "latest";
73268
73268
  const errMsg = `Error during upgrading to version '${versionTag}'. '${message.version}' is not a valid version`;
73269
73269
  this.log.error(errMsg);
@@ -73274,7 +73274,7 @@ ${result}`);
73274
73274
  });
73275
73275
  return;
73276
73276
  }
73277
- const targetVersion = message.version ?? await Mm("agent-upgrader");
73277
+ const targetVersion = message.version ?? await Fm("agent-upgrader");
73278
73278
  if (cn.startsWith(targetVersion)) {
73279
73279
  if (!message?.force) {
73280
73280
  this.log.info(`Attempted to upgrade to version ${targetVersion}, but agent is already on that version`);
@@ -73418,6 +73418,29 @@ ${result}`);
73418
73418
  }
73419
73419
  const address = new URL(message.remote);
73420
73420
  const encoding = address.searchParams.get("encoding") ?? void 0;
73421
+ let msgReturnAck;
73422
+ try {
73423
+ msgReturnAck = this.parseReturnAck(message.returnAck);
73424
+ } catch (err) {
73425
+ this.log.error(_e(err));
73426
+ this.addToWebSocketQueue({
73427
+ type: "agent:transmit:response",
73428
+ channel: message.channel,
73429
+ remote: message.remote,
73430
+ callback: message.callback,
73431
+ contentType: w.TEXT,
73432
+ statusCode: 400,
73433
+ body: _e(err)
73434
+ });
73435
+ return;
73436
+ }
73437
+ let defaultReturnAck;
73438
+ try {
73439
+ defaultReturnAck = this.parseReturnAck(address.searchParams.get("defaultReturnAck"));
73440
+ } catch (err) {
73441
+ this.log.warn(`${_e(err)} - falling back to default return ACK behavior of 'first'.`);
73442
+ }
73443
+ const returnAck = msgReturnAck ?? defaultReturnAck ?? Ed.FIRST;
73421
73444
  let pool;
73422
73445
  if (this.hl7Clients.has(message.remote)) {
73423
73446
  pool = this.hl7Clients.get(message.remote);
@@ -73461,20 +73484,20 @@ ${result}`);
73461
73484
  channel: message.channel,
73462
73485
  remote: message.remote,
73463
73486
  callback: message.callback,
73464
- contentType: A.TEXT,
73487
+ contentType: w.TEXT,
73465
73488
  statusCode: 400,
73466
73489
  body: _e(err)
73467
73490
  });
73468
73491
  return;
73469
73492
  }
73470
- client.sendAndWait(requestMsg).then((response2) => {
73493
+ client.sendAndWait(requestMsg, { returnAck }).then((response2) => {
73471
73494
  this.log.info(`[Response -- ID: ${msh10}]: ${response2.toString().replaceAll("\r", "\n")}`);
73472
73495
  this.addToWebSocketQueue({
73473
73496
  type: "agent:transmit:response",
73474
73497
  channel: message.channel,
73475
73498
  remote: message.remote,
73476
73499
  callback: message.callback,
73477
- contentType: A.HL7_V2,
73500
+ contentType: w.HL7_V2,
73478
73501
  statusCode: 200,
73479
73502
  body: response2.toString()
73480
73503
  });
@@ -73485,7 +73508,7 @@ ${result}`);
73485
73508
  channel: message.channel,
73486
73509
  remote: message.remote,
73487
73510
  callback: message.callback,
73488
- contentType: A.TEXT,
73511
+ contentType: w.TEXT,
73489
73512
  statusCode: 400,
73490
73513
  body: _e(err)
73491
73514
  });
@@ -73503,6 +73526,25 @@ ${result}`);
73503
73526
  }
73504
73527
  return false;
73505
73528
  }
73529
+ /**
73530
+ * Parses and normalizes the `returnAck` mode parameter from the Device URL.
73531
+ *
73532
+ * @param rawValue - The raw query parameter value retrieved from the Device URL (e.g., 'application', 'first', or undefined).
73533
+ * @returns The parsed `ReturnAckCategory` enum value.
73534
+ */
73535
+ parseReturnAck(rawValue) {
73536
+ if (!rawValue) {
73537
+ return void 0;
73538
+ }
73539
+ const normalizedValue = rawValue.toLowerCase();
73540
+ if (normalizedValue === "application") {
73541
+ return Ed.APPLICATION;
73542
+ }
73543
+ if (normalizedValue === "first") {
73544
+ return Ed.FIRST;
73545
+ }
73546
+ throw new Error(`Invalid value for returnAck; expected: 'first' or 'application', received: ${rawValue}`);
73547
+ }
73506
73548
  };
73507
73549
  __publicField(_App, "instance");
73508
73550
  var App = _App;
@@ -73562,7 +73604,7 @@ async function agentMain(argv) {
73562
73604
  for (const warning of warnings) {
73563
73605
  mainLogger.warn(warning);
73564
73606
  }
73565
- const app = new App(medplum, agentId, args.logLevel ? om(args.logLevel) : void 0, {
73607
+ const app = new App(medplum, agentId, args.logLevel ? cm(args.logLevel) : void 0, {
73566
73608
  mainLogger,
73567
73609
  channelLogger
73568
73610
  });
@@ -73607,7 +73649,7 @@ async function upgraderMain(argv) {
73607
73649
  if (argv[3] && !Xc(argv[3])) {
73608
73650
  throw new Error("Invalid version specified");
73609
73651
  }
73610
- const version = argv[3] ?? await Mm("agent-upgrader");
73652
+ const version = argv[3] ?? await Fm("agent-upgrader");
73611
73653
  const binPath = getReleaseBinPath(version);
73612
73654
  if (!(0, import_node_fs6.existsSync)(binPath)) {
73613
73655
  globalLogger.info(`Could not find binary at "${binPath}". Downloading release from GitHub...`);