@medplum/agent 3.0.8 → 3.0.9
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.
- package/dist/cjs/index.cjs +311 -310
- package/package.json +5 -5
package/dist/cjs/index.cjs
CHANGED
|
@@ -9713,8 +9713,8 @@ var require_dcmjs = __commonJS({
|
|
|
9713
9713
|
if (undef) {
|
|
9714
9714
|
var stack = 0;
|
|
9715
9715
|
while (1) {
|
|
9716
|
-
var
|
|
9717
|
-
if (
|
|
9716
|
+
var g2 = stream.readUint16();
|
|
9717
|
+
if (g2 == 65534) {
|
|
9718
9718
|
var ge = stream.readUint16();
|
|
9719
9719
|
var itemLength = stream.readUint32();
|
|
9720
9720
|
stream.increment(-4);
|
|
@@ -14154,11 +14154,11 @@ var require_dcmjs = __commonJS({
|
|
|
14154
14154
|
var RANDOM = Math.random;
|
|
14155
14155
|
if (!Math.hypot)
|
|
14156
14156
|
Math.hypot = function() {
|
|
14157
|
-
var
|
|
14157
|
+
var y2 = 0, i2 = arguments.length;
|
|
14158
14158
|
while (i2--) {
|
|
14159
|
-
|
|
14159
|
+
y2 += arguments[i2] * arguments[i2];
|
|
14160
14160
|
}
|
|
14161
|
-
return Math.sqrt(
|
|
14161
|
+
return Math.sqrt(y2);
|
|
14162
14162
|
};
|
|
14163
14163
|
function create() {
|
|
14164
14164
|
var out = new ARRAY_TYPE(3);
|
|
@@ -14178,14 +14178,14 @@ var require_dcmjs = __commonJS({
|
|
|
14178
14178
|
}
|
|
14179
14179
|
function length(a) {
|
|
14180
14180
|
var x = a[0];
|
|
14181
|
-
var
|
|
14181
|
+
var y2 = a[1];
|
|
14182
14182
|
var z = a[2];
|
|
14183
|
-
return Math.hypot(x,
|
|
14183
|
+
return Math.hypot(x, y2, z);
|
|
14184
14184
|
}
|
|
14185
|
-
function fromValues(x,
|
|
14185
|
+
function fromValues(x, y2, z) {
|
|
14186
14186
|
var out = new ARRAY_TYPE(3);
|
|
14187
14187
|
out[0] = x;
|
|
14188
|
-
out[1] =
|
|
14188
|
+
out[1] = y2;
|
|
14189
14189
|
out[2] = z;
|
|
14190
14190
|
return out;
|
|
14191
14191
|
}
|
|
@@ -14195,9 +14195,9 @@ var require_dcmjs = __commonJS({
|
|
|
14195
14195
|
out[2] = a[2];
|
|
14196
14196
|
return out;
|
|
14197
14197
|
}
|
|
14198
|
-
function set(out, x,
|
|
14198
|
+
function set(out, x, y2, z) {
|
|
14199
14199
|
out[0] = x;
|
|
14200
|
-
out[1] =
|
|
14200
|
+
out[1] = y2;
|
|
14201
14201
|
out[2] = z;
|
|
14202
14202
|
return out;
|
|
14203
14203
|
}
|
|
@@ -14269,21 +14269,21 @@ var require_dcmjs = __commonJS({
|
|
|
14269
14269
|
}
|
|
14270
14270
|
function distance(a, b2) {
|
|
14271
14271
|
var x = b2[0] - a[0];
|
|
14272
|
-
var
|
|
14272
|
+
var y2 = b2[1] - a[1];
|
|
14273
14273
|
var z = b2[2] - a[2];
|
|
14274
|
-
return Math.hypot(x,
|
|
14274
|
+
return Math.hypot(x, y2, z);
|
|
14275
14275
|
}
|
|
14276
14276
|
function squaredDistance(a, b2) {
|
|
14277
14277
|
var x = b2[0] - a[0];
|
|
14278
|
-
var
|
|
14278
|
+
var y2 = b2[1] - a[1];
|
|
14279
14279
|
var z = b2[2] - a[2];
|
|
14280
|
-
return x * x +
|
|
14280
|
+
return x * x + y2 * y2 + z * z;
|
|
14281
14281
|
}
|
|
14282
14282
|
function squaredLength(a) {
|
|
14283
14283
|
var x = a[0];
|
|
14284
|
-
var
|
|
14284
|
+
var y2 = a[1];
|
|
14285
14285
|
var z = a[2];
|
|
14286
|
-
return x * x +
|
|
14286
|
+
return x * x + y2 * y2 + z * z;
|
|
14287
14287
|
}
|
|
14288
14288
|
function negate(out, a) {
|
|
14289
14289
|
out[0] = -a[0];
|
|
@@ -14299,9 +14299,9 @@ var require_dcmjs = __commonJS({
|
|
|
14299
14299
|
}
|
|
14300
14300
|
function normalize$1(out, a) {
|
|
14301
14301
|
var x = a[0];
|
|
14302
|
-
var
|
|
14302
|
+
var y2 = a[1];
|
|
14303
14303
|
var z = a[2];
|
|
14304
|
-
var len2 = x * x +
|
|
14304
|
+
var len2 = x * x + y2 * y2 + z * z;
|
|
14305
14305
|
if (len2 > 0) {
|
|
14306
14306
|
len2 = 1 / Math.sqrt(len2);
|
|
14307
14307
|
}
|
|
@@ -14365,25 +14365,25 @@ var require_dcmjs = __commonJS({
|
|
|
14365
14365
|
return out;
|
|
14366
14366
|
}
|
|
14367
14367
|
function transformMat4(out, a, m3) {
|
|
14368
|
-
var x = a[0],
|
|
14369
|
-
var w2 = m3[3] * x + m3[7] *
|
|
14368
|
+
var x = a[0], y2 = a[1], z = a[2];
|
|
14369
|
+
var w2 = m3[3] * x + m3[7] * y2 + m3[11] * z + m3[15];
|
|
14370
14370
|
w2 = w2 || 1;
|
|
14371
|
-
out[0] = (m3[0] * x + m3[4] *
|
|
14372
|
-
out[1] = (m3[1] * x + m3[5] *
|
|
14373
|
-
out[2] = (m3[2] * x + m3[6] *
|
|
14371
|
+
out[0] = (m3[0] * x + m3[4] * y2 + m3[8] * z + m3[12]) / w2;
|
|
14372
|
+
out[1] = (m3[1] * x + m3[5] * y2 + m3[9] * z + m3[13]) / w2;
|
|
14373
|
+
out[2] = (m3[2] * x + m3[6] * y2 + m3[10] * z + m3[14]) / w2;
|
|
14374
14374
|
return out;
|
|
14375
14375
|
}
|
|
14376
14376
|
function transformMat3(out, a, m3) {
|
|
14377
|
-
var x = a[0],
|
|
14378
|
-
out[0] = x * m3[0] +
|
|
14379
|
-
out[1] = x * m3[1] +
|
|
14380
|
-
out[2] = x * m3[2] +
|
|
14377
|
+
var x = a[0], y2 = a[1], z = a[2];
|
|
14378
|
+
out[0] = x * m3[0] + y2 * m3[3] + z * m3[6];
|
|
14379
|
+
out[1] = x * m3[1] + y2 * m3[4] + z * m3[7];
|
|
14380
|
+
out[2] = x * m3[2] + y2 * m3[5] + z * m3[8];
|
|
14381
14381
|
return out;
|
|
14382
14382
|
}
|
|
14383
14383
|
function transformQuat(out, a, q2) {
|
|
14384
14384
|
var qx = q2[0], qy = q2[1], qz = q2[2], qw = q2[3];
|
|
14385
|
-
var x = a[0],
|
|
14386
|
-
var uvx = qy * z - qz *
|
|
14385
|
+
var x = a[0], y2 = a[1], z = a[2];
|
|
14386
|
+
var uvx = qy * z - qz * y2, uvy = qz * x - qx * z, uvz = qx * y2 - qy * x;
|
|
14387
14387
|
var uuvx = qy * uvz - qz * uvy, uuvy = qz * uvx - qx * uvz, uuvz = qx * uvy - qy * uvx;
|
|
14388
14388
|
var w2 = qw * 2;
|
|
14389
14389
|
uvx *= w2;
|
|
@@ -14393,7 +14393,7 @@ var require_dcmjs = __commonJS({
|
|
|
14393
14393
|
uuvy *= 2;
|
|
14394
14394
|
uuvz *= 2;
|
|
14395
14395
|
out[0] = x + uvx + uuvx;
|
|
14396
|
-
out[1] =
|
|
14396
|
+
out[1] = y2 + uvy + uuvy;
|
|
14397
14397
|
out[2] = z + uvz + uuvz;
|
|
14398
14398
|
return out;
|
|
14399
14399
|
}
|
|
@@ -17061,10 +17061,10 @@ var require_dcmjs = __commonJS({
|
|
|
17061
17061
|
rgba.push(255);
|
|
17062
17062
|
return rgba;
|
|
17063
17063
|
}
|
|
17064
|
-
function cross(x,
|
|
17065
|
-
var Zx = x[1] *
|
|
17066
|
-
var Zy = x[2] *
|
|
17067
|
-
var Zz = x[0] *
|
|
17064
|
+
function cross(x, y2, out) {
|
|
17065
|
+
var Zx = x[1] * y2[2] - x[2] * y2[1];
|
|
17066
|
+
var Zy = x[2] * y2[0] - x[0] * y2[2];
|
|
17067
|
+
var Zz = x[0] * y2[1] - x[1] * y2[0];
|
|
17068
17068
|
out[0] = Zx;
|
|
17069
17069
|
out[1] = Zy;
|
|
17070
17070
|
out[2] = Zz;
|
|
@@ -21843,23 +21843,23 @@ var require_AsyncEventEmitter = __commonJS({
|
|
|
21843
21843
|
return self2;
|
|
21844
21844
|
};
|
|
21845
21845
|
AsyncEventEmitter.prototype.once = function(type, listener) {
|
|
21846
|
-
var self2 = this,
|
|
21846
|
+
var self2 = this, g2;
|
|
21847
21847
|
if (typeof listener !== "function") {
|
|
21848
21848
|
throw new TypeError("listener must be a function");
|
|
21849
21849
|
}
|
|
21850
21850
|
if (listener.length >= 2) {
|
|
21851
|
-
|
|
21852
|
-
self2.removeListener(type,
|
|
21851
|
+
g2 = function(e, next) {
|
|
21852
|
+
self2.removeListener(type, g2);
|
|
21853
21853
|
listener(e, next);
|
|
21854
21854
|
};
|
|
21855
21855
|
} else {
|
|
21856
|
-
|
|
21857
|
-
self2.removeListener(type,
|
|
21856
|
+
g2 = function(e) {
|
|
21857
|
+
self2.removeListener(type, g2);
|
|
21858
21858
|
listener(e);
|
|
21859
21859
|
};
|
|
21860
21860
|
}
|
|
21861
|
-
|
|
21862
|
-
self2.on(type,
|
|
21861
|
+
g2.listener = listener;
|
|
21862
|
+
self2.on(type, g2);
|
|
21863
21863
|
return self2;
|
|
21864
21864
|
};
|
|
21865
21865
|
AsyncEventEmitter.prototype.first = function(event, listener) {
|
|
@@ -25352,7 +25352,7 @@ var require_ms = __commonJS({
|
|
|
25352
25352
|
var h3 = m3 * 60;
|
|
25353
25353
|
var d3 = h3 * 24;
|
|
25354
25354
|
var w2 = d3 * 7;
|
|
25355
|
-
var
|
|
25355
|
+
var y2 = d3 * 365.25;
|
|
25356
25356
|
module2.exports = function(val, options) {
|
|
25357
25357
|
options = options || {};
|
|
25358
25358
|
var type = typeof val;
|
|
@@ -25384,7 +25384,7 @@ var require_ms = __commonJS({
|
|
|
25384
25384
|
case "yrs":
|
|
25385
25385
|
case "yr":
|
|
25386
25386
|
case "y":
|
|
25387
|
-
return n *
|
|
25387
|
+
return n * y2;
|
|
25388
25388
|
case "weeks":
|
|
25389
25389
|
case "week":
|
|
25390
25390
|
case "w":
|
|
@@ -30487,9 +30487,9 @@ var require_color_string = __commonJS({
|
|
|
30487
30487
|
cs2.to.rgb.percent = function() {
|
|
30488
30488
|
var rgba = swizzle(arguments);
|
|
30489
30489
|
var r4 = Math.round(rgba[0] / 255 * 100);
|
|
30490
|
-
var
|
|
30490
|
+
var g2 = Math.round(rgba[1] / 255 * 100);
|
|
30491
30491
|
var b2 = Math.round(rgba[2] / 255 * 100);
|
|
30492
|
-
return rgba.length < 4 || rgba[3] === 1 ? "rgb(" + r4 + "%, " +
|
|
30492
|
+
return rgba.length < 4 || rgba[3] === 1 ? "rgb(" + r4 + "%, " + g2 + "%, " + b2 + "%)" : "rgba(" + r4 + "%, " + g2 + "%, " + b2 + "%, " + rgba[3] + ")";
|
|
30493
30493
|
};
|
|
30494
30494
|
cs2.to.hsl = function() {
|
|
30495
30495
|
var hsla = swizzle(arguments);
|
|
@@ -30726,10 +30726,10 @@ var require_conversions = __commonJS({
|
|
|
30726
30726
|
var model;
|
|
30727
30727
|
convert.rgb.hsl = function(rgb) {
|
|
30728
30728
|
var r4 = rgb[0] / 255;
|
|
30729
|
-
var
|
|
30729
|
+
var g2 = rgb[1] / 255;
|
|
30730
30730
|
var b2 = rgb[2] / 255;
|
|
30731
|
-
var min = Math.min(r4,
|
|
30732
|
-
var max = Math.max(r4,
|
|
30731
|
+
var min = Math.min(r4, g2, b2);
|
|
30732
|
+
var max = Math.max(r4, g2, b2);
|
|
30733
30733
|
var delta = max - min;
|
|
30734
30734
|
var h3;
|
|
30735
30735
|
var s;
|
|
@@ -30737,11 +30737,11 @@ var require_conversions = __commonJS({
|
|
|
30737
30737
|
if (max === min) {
|
|
30738
30738
|
h3 = 0;
|
|
30739
30739
|
} else if (r4 === max) {
|
|
30740
|
-
h3 = (
|
|
30741
|
-
} else if (
|
|
30740
|
+
h3 = (g2 - b2) / delta;
|
|
30741
|
+
} else if (g2 === max) {
|
|
30742
30742
|
h3 = 2 + (b2 - r4) / delta;
|
|
30743
30743
|
} else if (b2 === max) {
|
|
30744
|
-
h3 = 4 + (r4 -
|
|
30744
|
+
h3 = 4 + (r4 - g2) / delta;
|
|
30745
30745
|
}
|
|
30746
30746
|
h3 = Math.min(h3 * 60, 360);
|
|
30747
30747
|
if (h3 < 0) {
|
|
@@ -30764,10 +30764,10 @@ var require_conversions = __commonJS({
|
|
|
30764
30764
|
var h3;
|
|
30765
30765
|
var s;
|
|
30766
30766
|
var r4 = rgb[0] / 255;
|
|
30767
|
-
var
|
|
30767
|
+
var g2 = rgb[1] / 255;
|
|
30768
30768
|
var b2 = rgb[2] / 255;
|
|
30769
|
-
var v2 = Math.max(r4,
|
|
30770
|
-
var diff = v2 - Math.min(r4,
|
|
30769
|
+
var v2 = Math.max(r4, g2, b2);
|
|
30770
|
+
var diff = v2 - Math.min(r4, g2, b2);
|
|
30771
30771
|
var diffc = function(c2) {
|
|
30772
30772
|
return (v2 - c2) / 6 / diff + 1 / 2;
|
|
30773
30773
|
};
|
|
@@ -30776,11 +30776,11 @@ var require_conversions = __commonJS({
|
|
|
30776
30776
|
} else {
|
|
30777
30777
|
s = diff / v2;
|
|
30778
30778
|
rdif = diffc(r4);
|
|
30779
|
-
gdif = diffc(
|
|
30779
|
+
gdif = diffc(g2);
|
|
30780
30780
|
bdif = diffc(b2);
|
|
30781
30781
|
if (r4 === v2) {
|
|
30782
30782
|
h3 = bdif - gdif;
|
|
30783
|
-
} else if (
|
|
30783
|
+
} else if (g2 === v2) {
|
|
30784
30784
|
h3 = 1 / 3 + rdif - bdif;
|
|
30785
30785
|
} else if (b2 === v2) {
|
|
30786
30786
|
h3 = 2 / 3 + gdif - rdif;
|
|
@@ -30799,29 +30799,29 @@ var require_conversions = __commonJS({
|
|
|
30799
30799
|
};
|
|
30800
30800
|
convert.rgb.hwb = function(rgb) {
|
|
30801
30801
|
var r4 = rgb[0];
|
|
30802
|
-
var
|
|
30802
|
+
var g2 = rgb[1];
|
|
30803
30803
|
var b2 = rgb[2];
|
|
30804
30804
|
var h3 = convert.rgb.hsl(rgb)[0];
|
|
30805
|
-
var w2 = 1 / 255 * Math.min(r4, Math.min(
|
|
30806
|
-
b2 = 1 - 1 / 255 * Math.max(r4, Math.max(
|
|
30805
|
+
var w2 = 1 / 255 * Math.min(r4, Math.min(g2, b2));
|
|
30806
|
+
b2 = 1 - 1 / 255 * Math.max(r4, Math.max(g2, b2));
|
|
30807
30807
|
return [h3, w2 * 100, b2 * 100];
|
|
30808
30808
|
};
|
|
30809
30809
|
convert.rgb.cmyk = function(rgb) {
|
|
30810
30810
|
var r4 = rgb[0] / 255;
|
|
30811
|
-
var
|
|
30811
|
+
var g2 = rgb[1] / 255;
|
|
30812
30812
|
var b2 = rgb[2] / 255;
|
|
30813
30813
|
var c2;
|
|
30814
30814
|
var m3;
|
|
30815
|
-
var
|
|
30815
|
+
var y2;
|
|
30816
30816
|
var k2;
|
|
30817
|
-
k2 = Math.min(1 - r4, 1 -
|
|
30817
|
+
k2 = Math.min(1 - r4, 1 - g2, 1 - b2);
|
|
30818
30818
|
c2 = (1 - r4 - k2) / (1 - k2) || 0;
|
|
30819
|
-
m3 = (1 -
|
|
30820
|
-
|
|
30821
|
-
return [c2 * 100, m3 * 100,
|
|
30819
|
+
m3 = (1 - g2 - k2) / (1 - k2) || 0;
|
|
30820
|
+
y2 = (1 - b2 - k2) / (1 - k2) || 0;
|
|
30821
|
+
return [c2 * 100, m3 * 100, y2 * 100, k2 * 100];
|
|
30822
30822
|
};
|
|
30823
|
-
function comparativeDistance(x,
|
|
30824
|
-
return Math.pow(x[0] -
|
|
30823
|
+
function comparativeDistance(x, y2) {
|
|
30824
|
+
return Math.pow(x[0] - y2[0], 2) + Math.pow(x[1] - y2[1], 2) + Math.pow(x[2] - y2[2], 2);
|
|
30825
30825
|
}
|
|
30826
30826
|
convert.rgb.keyword = function(rgb) {
|
|
30827
30827
|
var reversed = reverseKeywords[rgb];
|
|
@@ -30847,33 +30847,33 @@ var require_conversions = __commonJS({
|
|
|
30847
30847
|
};
|
|
30848
30848
|
convert.rgb.xyz = function(rgb) {
|
|
30849
30849
|
var r4 = rgb[0] / 255;
|
|
30850
|
-
var
|
|
30850
|
+
var g2 = rgb[1] / 255;
|
|
30851
30851
|
var b2 = rgb[2] / 255;
|
|
30852
30852
|
r4 = r4 > 0.04045 ? Math.pow((r4 + 0.055) / 1.055, 2.4) : r4 / 12.92;
|
|
30853
|
-
|
|
30853
|
+
g2 = g2 > 0.04045 ? Math.pow((g2 + 0.055) / 1.055, 2.4) : g2 / 12.92;
|
|
30854
30854
|
b2 = b2 > 0.04045 ? Math.pow((b2 + 0.055) / 1.055, 2.4) : b2 / 12.92;
|
|
30855
|
-
var x = r4 * 0.4124 +
|
|
30856
|
-
var
|
|
30857
|
-
var z = r4 * 0.0193 +
|
|
30858
|
-
return [x * 100,
|
|
30855
|
+
var x = r4 * 0.4124 + g2 * 0.3576 + b2 * 0.1805;
|
|
30856
|
+
var y2 = r4 * 0.2126 + g2 * 0.7152 + b2 * 0.0722;
|
|
30857
|
+
var z = r4 * 0.0193 + g2 * 0.1192 + b2 * 0.9505;
|
|
30858
|
+
return [x * 100, y2 * 100, z * 100];
|
|
30859
30859
|
};
|
|
30860
30860
|
convert.rgb.lab = function(rgb) {
|
|
30861
30861
|
var xyz = convert.rgb.xyz(rgb);
|
|
30862
30862
|
var x = xyz[0];
|
|
30863
|
-
var
|
|
30863
|
+
var y2 = xyz[1];
|
|
30864
30864
|
var z = xyz[2];
|
|
30865
30865
|
var l3;
|
|
30866
30866
|
var a;
|
|
30867
30867
|
var b2;
|
|
30868
30868
|
x /= 95.047;
|
|
30869
|
-
|
|
30869
|
+
y2 /= 100;
|
|
30870
30870
|
z /= 108.883;
|
|
30871
30871
|
x = x > 8856e-6 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116;
|
|
30872
|
-
|
|
30872
|
+
y2 = y2 > 8856e-6 ? Math.pow(y2, 1 / 3) : 7.787 * y2 + 16 / 116;
|
|
30873
30873
|
z = z > 8856e-6 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116;
|
|
30874
|
-
l3 = 116 *
|
|
30875
|
-
a = 500 * (x -
|
|
30876
|
-
b2 = 200 * (
|
|
30874
|
+
l3 = 116 * y2 - 16;
|
|
30875
|
+
a = 500 * (x - y2);
|
|
30876
|
+
b2 = 200 * (y2 - z);
|
|
30877
30877
|
return [l3, a, b2];
|
|
30878
30878
|
};
|
|
30879
30879
|
convert.hsl.rgb = function(hsl) {
|
|
@@ -30994,91 +30994,91 @@ var require_conversions = __commonJS({
|
|
|
30994
30994
|
}
|
|
30995
30995
|
n = wh + f2 * (v2 - wh);
|
|
30996
30996
|
var r4;
|
|
30997
|
-
var
|
|
30997
|
+
var g2;
|
|
30998
30998
|
var b2;
|
|
30999
30999
|
switch (i2) {
|
|
31000
31000
|
default:
|
|
31001
31001
|
case 6:
|
|
31002
31002
|
case 0:
|
|
31003
31003
|
r4 = v2;
|
|
31004
|
-
|
|
31004
|
+
g2 = n;
|
|
31005
31005
|
b2 = wh;
|
|
31006
31006
|
break;
|
|
31007
31007
|
case 1:
|
|
31008
31008
|
r4 = n;
|
|
31009
|
-
|
|
31009
|
+
g2 = v2;
|
|
31010
31010
|
b2 = wh;
|
|
31011
31011
|
break;
|
|
31012
31012
|
case 2:
|
|
31013
31013
|
r4 = wh;
|
|
31014
|
-
|
|
31014
|
+
g2 = v2;
|
|
31015
31015
|
b2 = n;
|
|
31016
31016
|
break;
|
|
31017
31017
|
case 3:
|
|
31018
31018
|
r4 = wh;
|
|
31019
|
-
|
|
31019
|
+
g2 = n;
|
|
31020
31020
|
b2 = v2;
|
|
31021
31021
|
break;
|
|
31022
31022
|
case 4:
|
|
31023
31023
|
r4 = n;
|
|
31024
|
-
|
|
31024
|
+
g2 = wh;
|
|
31025
31025
|
b2 = v2;
|
|
31026
31026
|
break;
|
|
31027
31027
|
case 5:
|
|
31028
31028
|
r4 = v2;
|
|
31029
|
-
|
|
31029
|
+
g2 = wh;
|
|
31030
31030
|
b2 = n;
|
|
31031
31031
|
break;
|
|
31032
31032
|
}
|
|
31033
|
-
return [r4 * 255,
|
|
31033
|
+
return [r4 * 255, g2 * 255, b2 * 255];
|
|
31034
31034
|
};
|
|
31035
31035
|
convert.cmyk.rgb = function(cmyk) {
|
|
31036
31036
|
var c2 = cmyk[0] / 100;
|
|
31037
31037
|
var m3 = cmyk[1] / 100;
|
|
31038
|
-
var
|
|
31038
|
+
var y2 = cmyk[2] / 100;
|
|
31039
31039
|
var k2 = cmyk[3] / 100;
|
|
31040
31040
|
var r4;
|
|
31041
|
-
var
|
|
31041
|
+
var g2;
|
|
31042
31042
|
var b2;
|
|
31043
31043
|
r4 = 1 - Math.min(1, c2 * (1 - k2) + k2);
|
|
31044
|
-
|
|
31045
|
-
b2 = 1 - Math.min(1,
|
|
31046
|
-
return [r4 * 255,
|
|
31044
|
+
g2 = 1 - Math.min(1, m3 * (1 - k2) + k2);
|
|
31045
|
+
b2 = 1 - Math.min(1, y2 * (1 - k2) + k2);
|
|
31046
|
+
return [r4 * 255, g2 * 255, b2 * 255];
|
|
31047
31047
|
};
|
|
31048
31048
|
convert.xyz.rgb = function(xyz) {
|
|
31049
31049
|
var x = xyz[0] / 100;
|
|
31050
|
-
var
|
|
31050
|
+
var y2 = xyz[1] / 100;
|
|
31051
31051
|
var z = xyz[2] / 100;
|
|
31052
31052
|
var r4;
|
|
31053
|
-
var
|
|
31053
|
+
var g2;
|
|
31054
31054
|
var b2;
|
|
31055
|
-
r4 = x * 3.2406 +
|
|
31056
|
-
|
|
31057
|
-
b2 = x * 0.0557 +
|
|
31055
|
+
r4 = x * 3.2406 + y2 * -1.5372 + z * -0.4986;
|
|
31056
|
+
g2 = x * -0.9689 + y2 * 1.8758 + z * 0.0415;
|
|
31057
|
+
b2 = x * 0.0557 + y2 * -0.204 + z * 1.057;
|
|
31058
31058
|
r4 = r4 > 31308e-7 ? 1.055 * Math.pow(r4, 1 / 2.4) - 0.055 : r4 * 12.92;
|
|
31059
|
-
|
|
31059
|
+
g2 = g2 > 31308e-7 ? 1.055 * Math.pow(g2, 1 / 2.4) - 0.055 : g2 * 12.92;
|
|
31060
31060
|
b2 = b2 > 31308e-7 ? 1.055 * Math.pow(b2, 1 / 2.4) - 0.055 : b2 * 12.92;
|
|
31061
31061
|
r4 = Math.min(Math.max(0, r4), 1);
|
|
31062
|
-
|
|
31062
|
+
g2 = Math.min(Math.max(0, g2), 1);
|
|
31063
31063
|
b2 = Math.min(Math.max(0, b2), 1);
|
|
31064
|
-
return [r4 * 255,
|
|
31064
|
+
return [r4 * 255, g2 * 255, b2 * 255];
|
|
31065
31065
|
};
|
|
31066
31066
|
convert.xyz.lab = function(xyz) {
|
|
31067
31067
|
var x = xyz[0];
|
|
31068
|
-
var
|
|
31068
|
+
var y2 = xyz[1];
|
|
31069
31069
|
var z = xyz[2];
|
|
31070
31070
|
var l3;
|
|
31071
31071
|
var a;
|
|
31072
31072
|
var b2;
|
|
31073
31073
|
x /= 95.047;
|
|
31074
|
-
|
|
31074
|
+
y2 /= 100;
|
|
31075
31075
|
z /= 108.883;
|
|
31076
31076
|
x = x > 8856e-6 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116;
|
|
31077
|
-
|
|
31077
|
+
y2 = y2 > 8856e-6 ? Math.pow(y2, 1 / 3) : 7.787 * y2 + 16 / 116;
|
|
31078
31078
|
z = z > 8856e-6 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116;
|
|
31079
|
-
l3 = 116 *
|
|
31080
|
-
a = 500 * (x -
|
|
31081
|
-
b2 = 200 * (
|
|
31079
|
+
l3 = 116 * y2 - 16;
|
|
31080
|
+
a = 500 * (x - y2);
|
|
31081
|
+
b2 = 200 * (y2 - z);
|
|
31082
31082
|
return [l3, a, b2];
|
|
31083
31083
|
};
|
|
31084
31084
|
convert.lab.xyz = function(lab) {
|
|
@@ -31086,21 +31086,21 @@ var require_conversions = __commonJS({
|
|
|
31086
31086
|
var a = lab[1];
|
|
31087
31087
|
var b2 = lab[2];
|
|
31088
31088
|
var x;
|
|
31089
|
-
var
|
|
31089
|
+
var y2;
|
|
31090
31090
|
var z;
|
|
31091
|
-
|
|
31092
|
-
x = a / 500 +
|
|
31093
|
-
z =
|
|
31094
|
-
var
|
|
31091
|
+
y2 = (l3 + 16) / 116;
|
|
31092
|
+
x = a / 500 + y2;
|
|
31093
|
+
z = y2 - b2 / 200;
|
|
31094
|
+
var y22 = Math.pow(y2, 3);
|
|
31095
31095
|
var x2 = Math.pow(x, 3);
|
|
31096
31096
|
var z2 = Math.pow(z, 3);
|
|
31097
|
-
|
|
31097
|
+
y2 = y22 > 8856e-6 ? y22 : (y2 - 16 / 116) / 7.787;
|
|
31098
31098
|
x = x2 > 8856e-6 ? x2 : (x - 16 / 116) / 7.787;
|
|
31099
31099
|
z = z2 > 8856e-6 ? z2 : (z - 16 / 116) / 7.787;
|
|
31100
31100
|
x *= 95.047;
|
|
31101
|
-
|
|
31101
|
+
y2 *= 100;
|
|
31102
31102
|
z *= 108.883;
|
|
31103
|
-
return [x,
|
|
31103
|
+
return [x, y2, z];
|
|
31104
31104
|
};
|
|
31105
31105
|
convert.lab.lch = function(lab) {
|
|
31106
31106
|
var l3 = lab[0];
|
|
@@ -31131,14 +31131,14 @@ var require_conversions = __commonJS({
|
|
|
31131
31131
|
};
|
|
31132
31132
|
convert.rgb.ansi16 = function(args) {
|
|
31133
31133
|
var r4 = args[0];
|
|
31134
|
-
var
|
|
31134
|
+
var g2 = args[1];
|
|
31135
31135
|
var b2 = args[2];
|
|
31136
31136
|
var value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2];
|
|
31137
31137
|
value = Math.round(value / 50);
|
|
31138
31138
|
if (value === 0) {
|
|
31139
31139
|
return 30;
|
|
31140
31140
|
}
|
|
31141
|
-
var ansi = 30 + (Math.round(b2 / 255) << 2 | Math.round(
|
|
31141
|
+
var ansi = 30 + (Math.round(b2 / 255) << 2 | Math.round(g2 / 255) << 1 | Math.round(r4 / 255));
|
|
31142
31142
|
if (value === 2) {
|
|
31143
31143
|
ansi += 60;
|
|
31144
31144
|
}
|
|
@@ -31149,9 +31149,9 @@ var require_conversions = __commonJS({
|
|
|
31149
31149
|
};
|
|
31150
31150
|
convert.rgb.ansi256 = function(args) {
|
|
31151
31151
|
var r4 = args[0];
|
|
31152
|
-
var
|
|
31152
|
+
var g2 = args[1];
|
|
31153
31153
|
var b2 = args[2];
|
|
31154
|
-
if (r4 ===
|
|
31154
|
+
if (r4 === g2 && g2 === b2) {
|
|
31155
31155
|
if (r4 < 8) {
|
|
31156
31156
|
return 16;
|
|
31157
31157
|
}
|
|
@@ -31160,7 +31160,7 @@ var require_conversions = __commonJS({
|
|
|
31160
31160
|
}
|
|
31161
31161
|
return Math.round((r4 - 8) / 247 * 24) + 232;
|
|
31162
31162
|
}
|
|
31163
|
-
var ansi = 16 + 36 * Math.round(r4 / 255 * 5) + 6 * Math.round(
|
|
31163
|
+
var ansi = 16 + 36 * Math.round(r4 / 255 * 5) + 6 * Math.round(g2 / 255 * 5) + Math.round(b2 / 255 * 5);
|
|
31164
31164
|
return ansi;
|
|
31165
31165
|
};
|
|
31166
31166
|
convert.ansi16.rgb = function(args) {
|
|
@@ -31174,9 +31174,9 @@ var require_conversions = __commonJS({
|
|
|
31174
31174
|
}
|
|
31175
31175
|
var mult = (~~(args > 50) + 1) * 0.5;
|
|
31176
31176
|
var r4 = (color & 1) * mult * 255;
|
|
31177
|
-
var
|
|
31177
|
+
var g2 = (color >> 1 & 1) * mult * 255;
|
|
31178
31178
|
var b2 = (color >> 2 & 1) * mult * 255;
|
|
31179
|
-
return [r4,
|
|
31179
|
+
return [r4, g2, b2];
|
|
31180
31180
|
};
|
|
31181
31181
|
convert.ansi256.rgb = function(args) {
|
|
31182
31182
|
if (args >= 232) {
|
|
@@ -31186,9 +31186,9 @@ var require_conversions = __commonJS({
|
|
|
31186
31186
|
args -= 16;
|
|
31187
31187
|
var rem;
|
|
31188
31188
|
var r4 = Math.floor(args / 36) / 5 * 255;
|
|
31189
|
-
var
|
|
31189
|
+
var g2 = Math.floor((rem = args % 36) / 6) / 5 * 255;
|
|
31190
31190
|
var b2 = rem % 6 / 5 * 255;
|
|
31191
|
-
return [r4,
|
|
31191
|
+
return [r4, g2, b2];
|
|
31192
31192
|
};
|
|
31193
31193
|
convert.rgb.hex = function(args) {
|
|
31194
31194
|
var integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255);
|
|
@@ -31208,16 +31208,16 @@ var require_conversions = __commonJS({
|
|
|
31208
31208
|
}
|
|
31209
31209
|
var integer = parseInt(colorString, 16);
|
|
31210
31210
|
var r4 = integer >> 16 & 255;
|
|
31211
|
-
var
|
|
31211
|
+
var g2 = integer >> 8 & 255;
|
|
31212
31212
|
var b2 = integer & 255;
|
|
31213
|
-
return [r4,
|
|
31213
|
+
return [r4, g2, b2];
|
|
31214
31214
|
};
|
|
31215
31215
|
convert.rgb.hcg = function(rgb) {
|
|
31216
31216
|
var r4 = rgb[0] / 255;
|
|
31217
|
-
var
|
|
31217
|
+
var g2 = rgb[1] / 255;
|
|
31218
31218
|
var b2 = rgb[2] / 255;
|
|
31219
|
-
var max = Math.max(Math.max(r4,
|
|
31220
|
-
var min = Math.min(Math.min(r4,
|
|
31219
|
+
var max = Math.max(Math.max(r4, g2), b2);
|
|
31220
|
+
var min = Math.min(Math.min(r4, g2), b2);
|
|
31221
31221
|
var chroma = max - min;
|
|
31222
31222
|
var grayscale;
|
|
31223
31223
|
var hue;
|
|
@@ -31229,11 +31229,11 @@ var require_conversions = __commonJS({
|
|
|
31229
31229
|
if (chroma <= 0) {
|
|
31230
31230
|
hue = 0;
|
|
31231
31231
|
} else if (max === r4) {
|
|
31232
|
-
hue = (
|
|
31233
|
-
} else if (max ===
|
|
31232
|
+
hue = (g2 - b2) / chroma % 6;
|
|
31233
|
+
} else if (max === g2) {
|
|
31234
31234
|
hue = 2 + (b2 - r4) / chroma;
|
|
31235
31235
|
} else {
|
|
31236
|
-
hue = 4 + (r4 -
|
|
31236
|
+
hue = 4 + (r4 - g2) / chroma + 4;
|
|
31237
31237
|
}
|
|
31238
31238
|
hue /= 6;
|
|
31239
31239
|
hue %= 1;
|
|
@@ -31267,9 +31267,9 @@ var require_conversions = __commonJS({
|
|
|
31267
31267
|
convert.hcg.rgb = function(hcg) {
|
|
31268
31268
|
var h3 = hcg[0] / 360;
|
|
31269
31269
|
var c2 = hcg[1] / 100;
|
|
31270
|
-
var
|
|
31270
|
+
var g2 = hcg[2] / 100;
|
|
31271
31271
|
if (c2 === 0) {
|
|
31272
|
-
return [
|
|
31272
|
+
return [g2 * 255, g2 * 255, g2 * 255];
|
|
31273
31273
|
}
|
|
31274
31274
|
var pure = [0, 0, 0];
|
|
31275
31275
|
var hi2 = h3 % 1 * 6;
|
|
@@ -31307,7 +31307,7 @@ var require_conversions = __commonJS({
|
|
|
31307
31307
|
pure[1] = 0;
|
|
31308
31308
|
pure[2] = w2;
|
|
31309
31309
|
}
|
|
31310
|
-
mg = (1 - c2) *
|
|
31310
|
+
mg = (1 - c2) * g2;
|
|
31311
31311
|
return [
|
|
31312
31312
|
(c2 * pure[0] + mg) * 255,
|
|
31313
31313
|
(c2 * pure[1] + mg) * 255,
|
|
@@ -31316,8 +31316,8 @@ var require_conversions = __commonJS({
|
|
|
31316
31316
|
};
|
|
31317
31317
|
convert.hcg.hsv = function(hcg) {
|
|
31318
31318
|
var c2 = hcg[1] / 100;
|
|
31319
|
-
var
|
|
31320
|
-
var v2 = c2 +
|
|
31319
|
+
var g2 = hcg[2] / 100;
|
|
31320
|
+
var v2 = c2 + g2 * (1 - c2);
|
|
31321
31321
|
var f2 = 0;
|
|
31322
31322
|
if (v2 > 0) {
|
|
31323
31323
|
f2 = c2 / v2;
|
|
@@ -31326,8 +31326,8 @@ var require_conversions = __commonJS({
|
|
|
31326
31326
|
};
|
|
31327
31327
|
convert.hcg.hsl = function(hcg) {
|
|
31328
31328
|
var c2 = hcg[1] / 100;
|
|
31329
|
-
var
|
|
31330
|
-
var l3 =
|
|
31329
|
+
var g2 = hcg[2] / 100;
|
|
31330
|
+
var l3 = g2 * (1 - c2) + 0.5 * c2;
|
|
31331
31331
|
var s = 0;
|
|
31332
31332
|
if (l3 > 0 && l3 < 0.5) {
|
|
31333
31333
|
s = c2 / (2 * l3);
|
|
@@ -31338,8 +31338,8 @@ var require_conversions = __commonJS({
|
|
|
31338
31338
|
};
|
|
31339
31339
|
convert.hcg.hwb = function(hcg) {
|
|
31340
31340
|
var c2 = hcg[1] / 100;
|
|
31341
|
-
var
|
|
31342
|
-
var v2 = c2 +
|
|
31341
|
+
var g2 = hcg[2] / 100;
|
|
31342
|
+
var v2 = c2 + g2 * (1 - c2);
|
|
31343
31343
|
return [hcg[0], (v2 - c2) * 100, (1 - v2) * 100];
|
|
31344
31344
|
};
|
|
31345
31345
|
convert.hwb.hcg = function(hwb) {
|
|
@@ -31347,11 +31347,11 @@ var require_conversions = __commonJS({
|
|
|
31347
31347
|
var b2 = hwb[2] / 100;
|
|
31348
31348
|
var v2 = 1 - b2;
|
|
31349
31349
|
var c2 = v2 - w2;
|
|
31350
|
-
var
|
|
31350
|
+
var g2 = 0;
|
|
31351
31351
|
if (c2 < 1) {
|
|
31352
|
-
|
|
31352
|
+
g2 = (v2 - c2) / (1 - c2);
|
|
31353
31353
|
}
|
|
31354
|
-
return [hwb[0], c2 * 100,
|
|
31354
|
+
return [hwb[0], c2 * 100, g2 * 100];
|
|
31355
31355
|
};
|
|
31356
31356
|
convert.apple.rgb = function(apple) {
|
|
31357
31357
|
return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];
|
|
@@ -31960,15 +31960,15 @@ var require_kuler = __commonJS({
|
|
|
31960
31960
|
color[1] = color[0];
|
|
31961
31961
|
color = color.join("");
|
|
31962
31962
|
}
|
|
31963
|
-
var r4 = color.substring(0, 2),
|
|
31964
|
-
return [parseInt(r4, 16), parseInt(
|
|
31963
|
+
var r4 = color.substring(0, 2), g2 = color.substring(2, 4), b2 = color.substring(4, 6);
|
|
31964
|
+
return [parseInt(r4, 16), parseInt(g2, 16), parseInt(b2, 16)];
|
|
31965
31965
|
};
|
|
31966
|
-
Kuler.prototype.rgb = function rgb(r4,
|
|
31967
|
-
var red = r4 / 255 * 5, green =
|
|
31966
|
+
Kuler.prototype.rgb = function rgb(r4, g2, b2) {
|
|
31967
|
+
var red = r4 / 255 * 5, green = g2 / 255 * 5, blue = b2 / 255 * 5;
|
|
31968
31968
|
return this.ansi(red, green, blue);
|
|
31969
31969
|
};
|
|
31970
|
-
Kuler.prototype.ansi = function ansi(r4,
|
|
31971
|
-
var red = Math.round(r4), green = Math.round(
|
|
31970
|
+
Kuler.prototype.ansi = function ansi(r4, g2, b2) {
|
|
31971
|
+
var red = Math.round(r4), green = Math.round(g2), blue = Math.round(b2);
|
|
31972
31972
|
return 16 + red * 36 + green * 6 + blue;
|
|
31973
31973
|
};
|
|
31974
31974
|
Kuler.prototype.reset = function reset() {
|
|
@@ -34680,7 +34680,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
34680
34680
|
"object" == typeof exports2 && "object" == typeof module2 ? module2.exports = t(require_async_eventemitter(), require_dcmjs(), require_smartbuffer(), require_cjs(), require_winston()) : "function" == typeof define && define.amd ? define("dcmjs-dimse", ["async-eventemitter", "dcmjs", "smart-buffer", "ts-mixer", "winston"], t) : "object" == typeof exports2 ? exports2["dcmjs-dimse"] = t(require_async_eventemitter(), require_dcmjs(), require_smartbuffer(), require_cjs(), require_winston()) : e["dcmjs-dimse"] = t(e["async-eventemitter"], e.dcmjs, e["smart-buffer"], e["ts-mixer"], e.winston);
|
|
34681
34681
|
}(global, (e, t, s, n, i2) => {
|
|
34682
34682
|
return r4 = { 570: (e2, t2, s2) => {
|
|
34683
|
-
const { CGetRequest: n2, CStoreRequest: i3 } = s2(940), { CommandFieldType: r5, PresentationContextResult: o2, SopClass: a, StorageClass: c2, TransferSyntax: d3, Uid: u2, UserIdentityType: h3 } = s2(492), m3 = s2(139), { EOL:
|
|
34683
|
+
const { CGetRequest: n2, CStoreRequest: i3 } = s2(940), { CommandFieldType: r5, PresentationContextResult: o2, SopClass: a, StorageClass: c2, TransferSyntax: d3, Uid: u2, UserIdentityType: h3 } = s2(492), m3 = s2(139), { EOL: g2 } = s2(857);
|
|
34684
34684
|
class l3 {
|
|
34685
34685
|
constructor(e3, t3, s3, n3) {
|
|
34686
34686
|
this.pcId = e3, this.abstractSyntaxUid = t3, this.transferSyntaxes = [], s3 && this.transferSyntaxes.push(s3), this.result = n3 || o2.Proposed;
|
|
@@ -34739,7 +34739,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
34739
34739
|
const e3 = [];
|
|
34740
34740
|
return e3.push(`Presentation Context: ${this.getPresentationContextId()} [${this.getResultDescription()}]`), e3.push(` Abstract: ${this.getAbstractSyntaxUid()}`), this.getTransferSyntaxUids().forEach((t3) => {
|
|
34741
34741
|
e3.push(` Transfer: ${t3}`);
|
|
34742
|
-
}), e3.join(
|
|
34742
|
+
}), e3.join(g2);
|
|
34743
34743
|
}
|
|
34744
34744
|
}
|
|
34745
34745
|
e2.exports = { Association: class {
|
|
@@ -34920,7 +34920,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
34920
34920
|
e3.push(` Presentation Context: ${t3.id} [${s3.getResultDescription()}]`), e3.push(` Abstract: ${this._uidNameFromValue([a, c2], s3.getAbstractSyntaxUid()) || s3.getAbstractSyntaxUid()}`), s3.getTransferSyntaxUids().forEach((t4) => {
|
|
34921
34921
|
e3.push(` Transfer: ${this._uidNameFromValue(d3, t4) || t4}`);
|
|
34922
34922
|
});
|
|
34923
|
-
}), e3.push(""), e3.join(
|
|
34923
|
+
}), e3.push(""), e3.join(g2);
|
|
34924
34924
|
}
|
|
34925
34925
|
_uidNameFromValue(e3, t3) {
|
|
34926
34926
|
const s3 = Array.isArray(e3) ? Object.assign({}, ...e3) : e3;
|
|
@@ -34962,7 +34962,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
34962
34962
|
}
|
|
34963
34963
|
}, PresentationContext: l3 };
|
|
34964
34964
|
}, 422: (e2, t2, s2) => {
|
|
34965
|
-
const { Association: n2, PresentationContext: i3 } = s2(570), { TransferSyntax: r5, UserIdentityType: o2 } = s2(492), { Request: a } = s2(940), c2 = s2(371), d3 = s2(906), u2 = s2(547), h3 = s2(733), m3 = s2(278),
|
|
34965
|
+
const { Association: n2, PresentationContext: i3 } = s2(570), { TransferSyntax: r5, UserIdentityType: o2 } = s2(492), { Request: a } = s2(940), c2 = s2(371), d3 = s2(906), u2 = s2(547), h3 = s2(733), m3 = s2(278), g2 = s2(756);
|
|
34966
34966
|
e2.exports = class extends h3 {
|
|
34967
34967
|
constructor() {
|
|
34968
34968
|
super(), this.requests = [], this.additionalPresentationContexts = [], this.network = void 0, this.statistics = new d3();
|
|
@@ -34994,7 +34994,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
34994
34994
|
});
|
|
34995
34995
|
let h4 = {};
|
|
34996
34996
|
a2.securityOptions && (h4 = { key: a2.securityOptions.key, cert: a2.securityOptions.cert, ca: a2.securityOptions.ca, requestCert: a2.securityOptions.requestCert, rejectUnauthorized: a2.securityOptions.rejectUnauthorized, minVersion: a2.securityOptions.minVersion, maxVersion: a2.securityOptions.maxVersion, ciphers: a2.securityOptions.ciphers }), u2.info(`Connecting to ${e3}:${t3} ${a2.securityOptions ? "(TLS)" : ""}`);
|
|
34997
|
-
const l3 = (a2.securityOptions ?
|
|
34997
|
+
const l3 = (a2.securityOptions ? g2 : m3).connect({ host: e3, port: t3, ...h4 }), p2 = new c2(l3, a2);
|
|
34998
34998
|
p2.on("connect", () => {
|
|
34999
34999
|
this.emit("connected"), p2.sendAssociationRequest(d4);
|
|
35000
35000
|
}), p2.on("associationAccepted", (e4) => {
|
|
@@ -35031,7 +35031,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
35031
35031
|
};
|
|
35032
35032
|
}, 940: (e2, t2, s2) => {
|
|
35033
35033
|
const { CommandFieldType: n2, Priority: i3, SopClass: r5, Status: o2 } = s2(492), a = s2(825), { Mixin: c2 } = s2(429), { EOL: d3 } = s2(857), u2 = s2(733), h3 = s2(111), { DicomMetaDictionary: m3 } = h3.data;
|
|
35034
|
-
class
|
|
35034
|
+
class g2 {
|
|
35035
35035
|
constructor(e3, t3) {
|
|
35036
35036
|
this.commandDataset = e3 || new a(), this.dataset = t3;
|
|
35037
35037
|
}
|
|
@@ -35110,7 +35110,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
35110
35110
|
}
|
|
35111
35111
|
}
|
|
35112
35112
|
}
|
|
35113
|
-
class l3 extends c2(
|
|
35113
|
+
class l3 extends c2(g2, u2) {
|
|
35114
35114
|
constructor(e3, t3, s3) {
|
|
35115
35115
|
switch (super(new a({ CommandField: e3, CommandDataSetType: s3 ? 514 : 257 })), e3) {
|
|
35116
35116
|
case n2.NGetRequest:
|
|
@@ -35166,7 +35166,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
35166
35166
|
return `${super.toString(e3)} [id: ${this.getMessageId() || ""}]`;
|
|
35167
35167
|
}
|
|
35168
35168
|
}
|
|
35169
|
-
class p2 extends
|
|
35169
|
+
class p2 extends g2 {
|
|
35170
35170
|
constructor(e3, t3, s3, i4, r6) {
|
|
35171
35171
|
switch (super(new a({ CommandField: e3, CommandDataSetType: s3 ? 514 : 257, Status: i4, ErrorComment: r6 })), e3) {
|
|
35172
35172
|
case n2.NGetRequest:
|
|
@@ -35289,7 +35289,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
35289
35289
|
return t3.setMessageIdBeingRespondedTo(e3.getMessageId()), t3;
|
|
35290
35290
|
}
|
|
35291
35291
|
}
|
|
35292
|
-
class
|
|
35292
|
+
class y2 extends l3 {
|
|
35293
35293
|
constructor(e3) {
|
|
35294
35294
|
super(n2.CFindRequest, r5.StudyRootQueryRetrieveInformationModelFind, false), this.setPriority(e3 || i3.Medium);
|
|
35295
35295
|
}
|
|
@@ -35302,40 +35302,40 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
35302
35302
|
static createStudyFindRequest(e3, t3) {
|
|
35303
35303
|
const s3 = { PatientID: "", PatientName: "", IssuerOfPatientID: "", PatientSex: "", PatientBirthDate: "", StudyInstanceUID: "", ModalitiesInStudy: "", StudyID: "", AccessionNumber: "", StudyDate: "", StudyTime: "", StudyDescription: "", NumberOfStudyRelatedSeries: "", NumberOfStudyRelatedInstances: "", ...e3 };
|
|
35304
35304
|
s3.QueryRetrieveLevel = "STUDY";
|
|
35305
|
-
const n3 = new
|
|
35305
|
+
const n3 = new y2(t3);
|
|
35306
35306
|
return n3.setDataset(new a(s3)), n3;
|
|
35307
35307
|
}
|
|
35308
35308
|
static createSeriesFindRequest(e3, t3) {
|
|
35309
35309
|
const s3 = { StudyInstanceUID: "", SeriesInstanceUID: "", SeriesNumber: "", SeriesDescription: "", Modality: "", SeriesDate: "", SeriesTime: "", NumberOfSeriesRelatedInstances: "", ...e3 };
|
|
35310
35310
|
s3.QueryRetrieveLevel = "SERIES";
|
|
35311
|
-
const n3 = new
|
|
35311
|
+
const n3 = new y2(t3);
|
|
35312
35312
|
return n3.setDataset(new a(s3)), n3;
|
|
35313
35313
|
}
|
|
35314
35314
|
static createImageFindRequest(e3, t3) {
|
|
35315
35315
|
const s3 = { StudyInstanceUID: "", SeriesInstanceUID: "", SOPInstanceUID: "", InstanceNumber: "", Modality: "", ...e3 };
|
|
35316
35316
|
s3.QueryRetrieveLevel = "IMAGE";
|
|
35317
|
-
const n3 = new
|
|
35317
|
+
const n3 = new y2(t3);
|
|
35318
35318
|
return n3.setDataset(new a(s3)), n3;
|
|
35319
35319
|
}
|
|
35320
35320
|
static createWorklistFindRequest(e3, t3) {
|
|
35321
35321
|
const s3 = { PatientID: "", PatientName: "", IssuerOfPatientID: "", PatientSex: "", PatientWeight: "", PatientBirthDate: "", MedicalAlerts: "", PregnancyStatus: "", Allergies: "", PatientComments: "", SpecialNeeds: "", PatientState: "", CurrentPatientLocation: "", InstitutionName: "", AdmissionID: "", AccessionNumber: "", ReferringPhysicianName: "", AdmittingDiagnosesDescription: "", RequestingPhysician: "", StudyInstanceUID: "", StudyDescription: "", StudyID: "", ReasonForTheRequestedProcedure: "", StudyDate: "", StudyTime: "", RequestedProcedureID: "", RequestedProcedureDescription: "", RequestedProcedurePriority: "", RequestedProcedureCodeSequence: [], ReferencedStudySequence: [], ProcedureCodeSequence: [], ScheduledProcedureStepSequence: [{ ScheduledStationAETitle: "", ScheduledStationName: "", ScheduledProcedureStepStartDate: "", ScheduledProcedureStepStartTime: "", Modality: "", ScheduledPerformingPhysicianName: "", ScheduledProcedureStepDescription: "", ScheduledProtocolCodeSequence: [], ScheduledProcedureStepLocation: "", ScheduledProcedureStepID: "", RequestedContrastAgent: "", PreMedication: "", AnatomicalOrientationType: "" }], ...e3 };
|
|
35322
35322
|
s3.QueryRetrieveLevel = "";
|
|
35323
|
-
const n3 = new
|
|
35323
|
+
const n3 = new y2(t3);
|
|
35324
35324
|
return n3.setAffectedSopClassUid(r5.ModalityWorklistInformationModelFind), n3.setDataset(new a(s3)), n3;
|
|
35325
35325
|
}
|
|
35326
35326
|
}
|
|
35327
|
-
class
|
|
35327
|
+
class S2 extends p2 {
|
|
35328
35328
|
constructor(e3, t3) {
|
|
35329
35329
|
super(n2.CFindResponse, r5.StudyRootQueryRetrieveInformationModelFind, false, e3, t3);
|
|
35330
35330
|
}
|
|
35331
35331
|
static fromRequest(e3) {
|
|
35332
|
-
if (!(e3 instanceof
|
|
35332
|
+
if (!(e3 instanceof y2))
|
|
35333
35333
|
throw new Error("Request should be an instance of CFindRequest");
|
|
35334
|
-
const t3 = new
|
|
35334
|
+
const t3 = new S2(o2.ProcessingFailure);
|
|
35335
35335
|
return t3.setMessageIdBeingRespondedTo(e3.getMessageId()), t3;
|
|
35336
35336
|
}
|
|
35337
35337
|
}
|
|
35338
|
-
class
|
|
35338
|
+
class I2 extends l3 {
|
|
35339
35339
|
constructor(e3, t3) {
|
|
35340
35340
|
if (super(n2.CStoreRequest, "", false), this.setPriority(t3 || i3.Medium), e3 instanceof a)
|
|
35341
35341
|
return this.setAffectedSopClassUid(e3.getElement("SOPClassUID")), this.setAffectedSopInstanceUid(e3.getElement("SOPInstanceUID")), void this.setDataset(e3);
|
|
@@ -35359,7 +35359,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
35359
35359
|
super(n2.CStoreResponse, "", false, e3, t3);
|
|
35360
35360
|
}
|
|
35361
35361
|
static fromRequest(e3) {
|
|
35362
|
-
if (!(e3 instanceof
|
|
35362
|
+
if (!(e3 instanceof I2))
|
|
35363
35363
|
throw new Error("Request should be an instance of CStoreRequest");
|
|
35364
35364
|
const t3 = new C2(o2.ProcessingFailure);
|
|
35365
35365
|
return t3.setMessageIdBeingRespondedTo(e3.getMessageId()), t3.setAffectedSopClassUid(e3.getAffectedSopClassUid()), t3.setAffectedSopInstanceUid(e3.getAffectedSopInstanceUid()), t3;
|
|
@@ -35507,19 +35507,19 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
35507
35507
|
return t3.setMessageIdBeingRespondedTo(e3.getMessageId()), t3;
|
|
35508
35508
|
}
|
|
35509
35509
|
}
|
|
35510
|
-
class
|
|
35510
|
+
class E2 extends l3 {
|
|
35511
35511
|
constructor(e3, t3) {
|
|
35512
35512
|
super(n2.NDeleteRequest, e3, false), this.setRequestedSopInstanceUid(t3);
|
|
35513
35513
|
}
|
|
35514
35514
|
}
|
|
35515
|
-
class
|
|
35515
|
+
class T extends p2 {
|
|
35516
35516
|
constructor(e3, t3, s3, i4) {
|
|
35517
35517
|
super(n2.NDeleteResponse, e3, false, s3, i4), this.setAffectedSopInstanceUid(t3);
|
|
35518
35518
|
}
|
|
35519
35519
|
static fromRequest(e3) {
|
|
35520
|
-
if (!(e3 instanceof
|
|
35520
|
+
if (!(e3 instanceof E2))
|
|
35521
35521
|
throw new Error("Request should be an instance of NDeleteRequest");
|
|
35522
|
-
const t3 = new
|
|
35522
|
+
const t3 = new T(e3.getRequestedSopClassUid(), e3.getRequestedSopInstanceUid(), o2.ProcessingFailure);
|
|
35523
35523
|
return t3.setMessageIdBeingRespondedTo(e3.getMessageId()), t3;
|
|
35524
35524
|
}
|
|
35525
35525
|
}
|
|
@@ -35615,12 +35615,12 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
35615
35615
|
this.getCommandDataset().setElement("MessageIDBeingRespondedTo", e3);
|
|
35616
35616
|
}
|
|
35617
35617
|
static fromRequest(e3) {
|
|
35618
|
-
if (!(e3 instanceof
|
|
35618
|
+
if (!(e3 instanceof y2 || e3 instanceof P2 || e3 instanceof x))
|
|
35619
35619
|
throw new Error("Request should be an instance of CFindRequest, CMoveRequest or CGetRequest");
|
|
35620
35620
|
return new F2(e3.getAffectedSopClassUid(), e3.getMessageId());
|
|
35621
35621
|
}
|
|
35622
35622
|
}
|
|
35623
|
-
e2.exports = { CCancelRequest: F2, CEchoRequest: R2, CEchoResponse: f2, CFindRequest:
|
|
35623
|
+
e2.exports = { CCancelRequest: F2, CEchoRequest: R2, CEchoResponse: f2, CFindRequest: y2, CFindResponse: S2, CGetRequest: x, CGetResponse: w2, CMoveRequest: P2, CMoveResponse: v2, Command: g2, CStoreRequest: I2, CStoreResponse: C2, NActionRequest: q2, NActionResponse: D2, NCreateRequest: A2, NCreateResponse: U2, NDeleteRequest: E2, NDeleteResponse: T, NEventReportRequest: O, NEventReportResponse: b2, NGetRequest: N2, NGetResponse: B2, NSetRequest: M2, NSetResponse: L, Request: l3, Response: p2 };
|
|
35624
35624
|
}, 492: (e2) => {
|
|
35625
35625
|
const t2 = { CStoreRequest: 1, CStoreResponse: 32769, CGetRequest: 16, CGetResponse: 32784, CFindRequest: 32, CFindResponse: 32800, CMoveRequest: 33, CMoveResponse: 32801, CEchoRequest: 48, CEchoResponse: 32816, NEventReportRequest: 256, NEventReportResponse: 33024, NGetRequest: 272, NGetResponse: 33040, NSetRequest: 288, NSetResponse: 33056, NActionRequest: 304, NActionResponse: 33072, NCreateRequest: 320, NCreateResponse: 33088, NDeleteRequest: 336, NDeleteResponse: 33104, CCancelRequest: 4095 };
|
|
35626
35626
|
Object.freeze(t2);
|
|
@@ -35646,17 +35646,17 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
35646
35646
|
Object.freeze(h3);
|
|
35647
35647
|
const m3 = { BasicTextSrStorage: "1.2.840.10008.5.1.4.1.1.88.11", BreastProjectionXRayImageStorageForPresentation: "1.2.840.10008.5.1.4.1.1.13.1.4", BreastProjectionXRayImageStorageForProcessing: "1.2.840.10008.5.1.4.1.1.13.1.5", BreastTomosynthesisImageStorage: "1.2.840.10008.5.1.4.1.1.13.1.3", ChestCadSrStorage: "1.2.840.10008.5.1.4.1.1.88.65", ComprehensiveSrStorage: "1.2.840.10008.5.1.4.1.1.88.33", ComputedRadiographyImageStorage: "1.2.840.10008.5.1.4.1.1.1", CtImageStorage: "1.2.840.10008.5.1.4.1.1.2", DigitalIntraOralXRayImageStorageForPresentation: "1.2.840.10008.5.1.4.1.1.1.3", DigitalIntraOralXRayImageStorageForProcessing: "1.2.840.10008.5.1.4.1.1.1.3.1", DigitalMammographyXRayImageStorageForPresentation: "1.2.840.10008.5.1.4.1.1.1.2", DigitalMammographyXRayImageStorageForProcessing: "1.2.840.10008.5.1.4.1.1.1.2.1", DigitalXRayImageStorageForPresentation: "1.2.840.10008.5.1.4.1.1.1.1", DigitalXRayImageStorageForProcessing: "1.2.840.10008.5.1.4.1.1.1.1.1", EncapsulatedCdaStorage: "1.2.840.10008.5.1.4.1.1.104.2", EncapsulatedPdfStorage: "1.2.840.10008.5.1.4.1.1.104.1", EnhancedCtImageStorage: "1.2.840.10008.5.1.4.1.1.2.1", EnhancedMrColorImageStorage: "1.2.840.10008.5.1.4.1.1.4.3", EnhancedMrImageStorage: "1.2.840.10008.5.1.4.1.1.4.1", EnhancedPetImageStorage: "1.2.840.10008.5.1.4.1.1.130", EnhancedSrStorage: "1.2.840.10008.5.1.4.1.1.88.22", EnhancedXaImageStorage: "1.2.840.10008.5.1.4.1.1.12.1.1", EnhancedXrfImageStorage: "1.2.840.10008.5.1.4.1.1.12.2.1", IntravascularOpticalCoherenceTomographyImageStorageForPresentation: "1.2.840.10008.5.1.4.1.1.14.1", IntravascularOpticalCoherenceTomographyImageStorageForProcessing: "1.2.840.10008.5.1.4.1.1.14.2", LegacyConvertedEnhancedCTImageStorage: "1.2.840.10008.5.1.4.1.1.2.2", LegacyConvertedEnhancedMRImageStorage: "1.2.840.10008.5.1.4.1.1.4.4", LegacyConvertedEnhancedPETImageStorage: "1.2.840.10008.5.1.4.1.1.128.1", MammographyCadSrStorage: "1.2.840.10008.5.1.4.1.1.88.50", MrImageStorage: "1.2.840.10008.5.1.4.1.1.4", MultiframeGrayscaleByteSecondaryCaptureImageStorage: "1.2.840.10008.5.1.4.1.1.7.2", MultiframeGrayscaleWordSecondaryCaptureImageStorage: "1.2.840.10008.5.1.4.1.1.7.3", MultiframeSingleBitSecondaryCaptureImageStorage: "1.2.840.10008.5.1.4.1.1.7.1", MultiframeTrueColorSecondaryCaptureImageStorage: "1.2.840.10008.5.1.4.1.1.7.4", NuclearMedicineImageStorage: "1.2.840.10008.5.1.4.1.1.20", OphthalmicOpticalCoherenceTomographyEnFaceImageStorage: "1.2.840.10008.5.1.4.1.1.77.1.5.7", OphthalmicPhotography16BitImageStorage: "1.2.840.10008.5.1.4.1.1.77.1.5.2", OphthalmicPhotography8BitImageStorage: "1.2.840.10008.5.1.4.1.1.77.1.5.1", OphthalmicTomographyImageStorage: "1.2.840.10008.5.1.4.1.1.77.1.5.4", PositronEmissionTomographyImageStorage: "1.2.840.10008.5.1.4.1.1.128", RtImageStorage: "1.2.840.10008.5.1.4.1.1.481.1", SecondaryCaptureImageStorage: "1.2.840.10008.5.1.4.1.1.7", UltrasoundImageStorage: "1.2.840.10008.5.1.4.1.1.6.1", UltrasoundMultiframeImageStorage: "1.2.840.10008.5.1.4.1.1.3.1", VideoEndoscopicImageStorage: "1.2.840.10008.5.1.4.1.1.77.1.1.1", VideoMicroscopicImageStorage: "1.2.840.10008.5.1.4.1.1.77.1.2.1", VideoPhotographicImageStorage: "1.2.840.10008.5.1.4.1.1.77.1.4.1", VlEndoscopicImageStorage: "1.2.840.10008.5.1.4.1.1.77.1.1", VlMicroscopicImageStorage: "1.2.840.10008.5.1.4.1.1.77.1.2", VlPhotographicImageStorage: "1.2.840.10008.5.1.4.1.1.77.1.4", VlSlideCoordinatesMicroscopicImageStorage: "1.2.840.10008.5.1.4.1.1.77.1.3", VlWholeSlideMicroscopyImageStorage: "1.2.840.10008.5.1.4.1.1.77.1.6", WideFieldOphthalmicPhotography3dCoordinatesImageStorage: "1.2.840.10008.5.1.4.1.1.77.1.5.6", WideFieldOphthalmicPhotographyStereographicProjectionImageStorage: "1.2.840.10008.5.1.4.1.1.77.1.5.5", XRay3dAngiographicImageStorage: "1.2.840.10008.5.1.4.1.1.13.1.1", XRay3dCraniofacialImageStorage: "1.2.840.10008.5.1.4.1.1.13.1.2", XRayAngiographicImageStorage: "1.2.840.10008.5.1.4.1.1.12.1", XRayRadiationDoseSRStorage: "1.2.840.10008.5.1.4.1.1.88.67", XRayRadiofluoroscopicImageStorage: "1.2.840.10008.5.1.4.1.1.12.2" };
|
|
35648
35648
|
Object.freeze(m3);
|
|
35649
|
-
const
|
|
35650
|
-
Object.freeze(
|
|
35649
|
+
const g2 = { Verification: "1.2.840.10008.1.1", StudyRootQueryRetrieveInformationModelFind: "1.2.840.10008.5.1.4.1.2.2.1", ModalityWorklistInformationModelFind: "1.2.840.10008.5.1.4.31", ModalityPerformedProcedureStep: "1.2.840.10008.3.1.2.3.3", StudyRootQueryRetrieveInformationModelMove: "1.2.840.10008.5.1.4.1.2.2.2", StudyRootQueryRetrieveInformationModelGet: "1.2.840.10008.5.1.4.1.2.2.3", StorageCommitmentPushModel: "1.2.840.10008.1.20.1", BasicFilmSession: "1.2.840.10008.5.1.1.1", PrintJob: "1.2.840.10008.5.1.1.14", BasicAnnotationBox: "1.2.840.10008.5.1.1.15", Printer: "1.2.840.10008.5.1.1.16", PrinterConfigurationRetrieval: "1.2.840.10008.5.1.1.16.376", BasicGrayscalePrintManagementMeta: "1.2.840.10008.5.1.1.9", BasicColorPrintManagementMeta: "1.2.840.10008.5.1.1.18", BasicFilmBox: "1.2.840.10008.5.1.1.2", PresentationLut: "1.2.840.10008.5.1.1.23", BasicGrayscaleImageBox: "1.2.840.10008.5.1.1.4", BasicColorImageBox: "1.2.840.10008.5.1.1.4.1", InstanceAvailabilityNotification: "1.2.840.10008.5.1.4.33" };
|
|
35650
|
+
Object.freeze(g2);
|
|
35651
35651
|
const l3 = { 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" };
|
|
35652
35652
|
Object.freeze(l3);
|
|
35653
35653
|
const p2 = [l3.ImplicitVRLittleEndian, l3.ExplicitVRLittleEndian];
|
|
35654
35654
|
Object.freeze(p2);
|
|
35655
35655
|
const R2 = { ImplementationClassUid: "1.2.826.0.1.3680043.10.854", ImplementationVersion: "DCMJS-DIMSE-V0.1", MaxPduLength: 262144 };
|
|
35656
|
-
Object.freeze(R2), e2.exports = { AbortReason: r5, AbortSource: i3, CommandFieldType: t2, DefaultImplementation: R2, PresentationContextResult: s2, Priority: d3, RejectReason: c2, RejectResult: o2, RejectSource: a, SopClass:
|
|
35656
|
+
Object.freeze(R2), e2.exports = { AbortReason: r5, AbortSource: i3, CommandFieldType: t2, DefaultImplementation: R2, PresentationContextResult: s2, Priority: d3, RejectReason: c2, RejectResult: o2, RejectSource: a, SopClass: g2, Status: u2, StorageClass: m3, TranscodableTransferSyntaxes: p2, TransferSyntax: l3, Uid: h3, UserIdentityType: n2 };
|
|
35657
35657
|
}, 825: (e2, t2, s2) => {
|
|
35658
|
-
const { StorageClass: n2, TransferSyntax: i3 } = s2(492), r5 = s2(139), { readFile: o2, readFileSync: a, writeFile: c2, writeFileSync: d3 } = s2(896), { EOL: u2 } = s2(857), h3 = s2(111), { DicomDict: m3, DicomMessage:
|
|
35659
|
-
class
|
|
35658
|
+
const { StorageClass: n2, TransferSyntax: i3 } = s2(492), r5 = s2(139), { readFile: o2, readFileSync: a, writeFile: c2, writeFileSync: d3 } = s2(896), { EOL: u2 } = s2(857), h3 = s2(111), { DicomDict: m3, DicomMessage: g2, DicomMetaDictionary: l3, ReadBufferStream: p2, WriteBufferStream: R2 } = h3.data, f2 = h3.log;
|
|
35659
|
+
class y2 {
|
|
35660
35660
|
constructor(e3, t3, s3) {
|
|
35661
35661
|
s3 = s3 || {}, s3 = { ignoreErrors: true, ...s3 }, f2.level = "error", this.transferSyntaxUid = t3 || i3.ImplicitVRLittleEndian, Buffer.isBuffer(e3) ? this.elements = this._fromElementsBuffer(e3, this.transferSyntaxUid, s3) : this.elements = e3 || {};
|
|
35662
35662
|
}
|
|
@@ -35677,11 +35677,11 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
35677
35677
|
}
|
|
35678
35678
|
getDenaturalizedDataset(e3, t3) {
|
|
35679
35679
|
const s3 = t3 ? l3.denaturalizeDataset(this.getElements(), { ...l3.nameMap, ...t3 }) : l3.denaturalizeDataset(this.getElements()), n3 = new R2();
|
|
35680
|
-
return
|
|
35680
|
+
return g2.write(s3, n3, this.transferSyntaxUid, e3), Buffer.from(n3.getBuffer());
|
|
35681
35681
|
}
|
|
35682
35682
|
getDenaturalizedCommandDataset() {
|
|
35683
35683
|
const e3 = l3.denaturalizeDataset(this.getElements()), t3 = new R2(), s3 = new R2();
|
|
35684
|
-
return
|
|
35684
|
+
return g2.write(e3, s3, i3.ImplicitVRLittleEndian, {}), g2.writeTagObject(t3, "00000000", "UL", s3.size, i3.ImplicitVRLittleEndian, {}), t3.concat(s3), Buffer.from(t3.getBuffer());
|
|
35685
35685
|
}
|
|
35686
35686
|
static fromFile(e3, t3, s3) {
|
|
35687
35687
|
if (!(void 0 !== t3 && t3 instanceof Function))
|
|
@@ -35698,7 +35698,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
35698
35698
|
});
|
|
35699
35699
|
}
|
|
35700
35700
|
toFile(e3, t3, s3, i4) {
|
|
35701
|
-
const o3 = { _meta: { FileMetaInformationVersion: new Uint8Array([0, 1]).buffer, MediaStorageSOPClassUID: this.getElement("SOPClassUID") || n2.SecondaryCaptureImageStorage, MediaStorageSOPInstanceUID: this.getElement("SOPInstanceUID") ||
|
|
35701
|
+
const o3 = { _meta: { FileMetaInformationVersion: new Uint8Array([0, 1]).buffer, MediaStorageSOPClassUID: this.getElement("SOPClassUID") || n2.SecondaryCaptureImageStorage, MediaStorageSOPInstanceUID: this.getElement("SOPInstanceUID") || y2.generateDerivedUid(), TransferSyntaxUID: this.getTransferSyntaxUid(), ImplementationClassUID: r5.getImplementationClassUid(), ImplementationVersionName: r5.getImplementationVersion() }, ...this.getElements() }, a2 = l3.denaturalizeDataset(o3._meta), u3 = new m3(a2);
|
|
35702
35702
|
u3.dict = s3 ? l3.denaturalizeDataset(o3, { ...l3.nameMap, ...s3 }) : l3.denaturalizeDataset(o3), t3 instanceof Function ? c2(e3, Buffer.from(u3.write(i4)), (e4) => {
|
|
35703
35703
|
t3(e4 || void 0);
|
|
35704
35704
|
}) : d3(e3, Buffer.from(u3.write(i4)));
|
|
@@ -35712,15 +35712,15 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
35712
35712
|
}
|
|
35713
35713
|
static _fromP10Buffer(e3, t3) {
|
|
35714
35714
|
t3 = t3 || {}, t3 = { ignoreErrors: true, ...t3 };
|
|
35715
|
-
const s3 =
|
|
35716
|
-
return new
|
|
35715
|
+
const s3 = g2.readFile(e3.buffer.slice(e3.byteOffset, e3.byteOffset + e3.byteLength), t3), n3 = l3.naturalizeDataset(s3.meta).TransferSyntaxUID, i4 = l3.naturalizeDataset(s3.dict);
|
|
35716
|
+
return new y2(i4, n3);
|
|
35717
35717
|
}
|
|
35718
35718
|
_fromElementsBuffer(e3, t3, s3) {
|
|
35719
|
-
const n3 = new p2(e3.buffer.slice(e3.byteOffset, e3.byteOffset + e3.byteLength)), r6 = t3 === i3.ImplicitVRLittleEndian ? i3.ImplicitVRLittleEndian : t3 === i3.ExplicitVRBigEndian ? i3.ExplicitVRBigEndian : i3.ExplicitVRLittleEndian, o3 =
|
|
35719
|
+
const n3 = new p2(e3.buffer.slice(e3.byteOffset, e3.byteOffset + e3.byteLength)), r6 = t3 === i3.ImplicitVRLittleEndian ? i3.ImplicitVRLittleEndian : t3 === i3.ExplicitVRBigEndian ? i3.ExplicitVRBigEndian : i3.ExplicitVRLittleEndian, o3 = g2._read(n3, r6, s3);
|
|
35720
35720
|
return l3.naturalizeDataset(o3);
|
|
35721
35721
|
}
|
|
35722
35722
|
}
|
|
35723
|
-
e2.exports =
|
|
35723
|
+
e2.exports = y2;
|
|
35724
35724
|
}, 139: (e2, t2, s2) => {
|
|
35725
35725
|
const { DefaultImplementation: n2 } = s2(492);
|
|
35726
35726
|
e2.exports = class {
|
|
@@ -35744,7 +35744,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
35744
35744
|
}
|
|
35745
35745
|
};
|
|
35746
35746
|
}, 371: (e2, t2, s2) => {
|
|
35747
|
-
const { Association: n2 } = s2(570), { AAbort: i3, AAssociateAC: r5, AAssociateRJ: o2, AAssociateRQ: a, AReleaseRP: c2, AReleaseRQ: d3, PDataTF: u2, Pdv: h3, RawPdu: m3 } = s2(942), { CommandFieldType:
|
|
35747
|
+
const { Association: n2 } = s2(570), { AAbort: i3, AAssociateAC: r5, AAssociateRJ: o2, AAssociateRQ: a, AReleaseRP: c2, AReleaseRQ: d3, PDataTF: u2, Pdv: h3, RawPdu: m3 } = s2(942), { CommandFieldType: g2, Status: l3, TranscodableTransferSyntaxes: p2 } = s2(492), { CCancelRequest: R2, CEchoRequest: f2, CEchoResponse: y2, CFindRequest: S2, CFindResponse: I2, CGetRequest: C2, CGetResponse: P2, CMoveRequest: v2, CMoveResponse: x, Command: w2, CStoreRequest: A2, CStoreResponse: U2, NActionRequest: q2, NActionResponse: D2, NCreateRequest: E2, NCreateResponse: T, NDeleteRequest: O, NDeleteResponse: b2, NEventReportRequest: N2, NEventReportResponse: B2, NGetRequest: M2, NGetResponse: L, NSetRequest: F2, NSetResponse: k2, Response: $ } = s2(940), j2 = s2(825), V2 = s2(139), G2 = s2(906), _2 = s2(547), { SmartBuffer: z } = s2(766), { EOL: Q2 } = s2(857), W2 = s2(733);
|
|
35748
35748
|
class J2 extends W2 {
|
|
35749
35749
|
constructor() {
|
|
35750
35750
|
super();
|
|
@@ -35943,73 +35943,73 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
35943
35943
|
if (e4.isCommand()) {
|
|
35944
35944
|
const s3 = new w2(new j2(this.dimseBuffer.toBuffer()));
|
|
35945
35945
|
switch (s3.getCommandFieldType()) {
|
|
35946
|
-
case
|
|
35946
|
+
case g2.CEchoRequest:
|
|
35947
35947
|
this.dimse = Object.assign(new f2(), s3);
|
|
35948
35948
|
break;
|
|
35949
|
-
case
|
|
35950
|
-
this.dimse = Object.assign(new
|
|
35949
|
+
case g2.CEchoResponse:
|
|
35950
|
+
this.dimse = Object.assign(new y2(), s3);
|
|
35951
35951
|
break;
|
|
35952
|
-
case
|
|
35953
|
-
this.dimse = Object.assign(new
|
|
35952
|
+
case g2.CFindRequest:
|
|
35953
|
+
this.dimse = Object.assign(new S2(), s3);
|
|
35954
35954
|
break;
|
|
35955
|
-
case
|
|
35956
|
-
this.dimse = Object.assign(new
|
|
35955
|
+
case g2.CFindResponse:
|
|
35956
|
+
this.dimse = Object.assign(new I2(), s3);
|
|
35957
35957
|
break;
|
|
35958
|
-
case
|
|
35958
|
+
case g2.CStoreRequest:
|
|
35959
35959
|
this.dimse = Object.assign(new A2(), s3);
|
|
35960
35960
|
break;
|
|
35961
|
-
case
|
|
35961
|
+
case g2.CStoreResponse:
|
|
35962
35962
|
this.dimse = Object.assign(new U2(), s3);
|
|
35963
35963
|
break;
|
|
35964
|
-
case
|
|
35964
|
+
case g2.CMoveRequest:
|
|
35965
35965
|
this.dimse = Object.assign(new v2(), s3);
|
|
35966
35966
|
break;
|
|
35967
|
-
case
|
|
35967
|
+
case g2.CMoveResponse:
|
|
35968
35968
|
this.dimse = Object.assign(new x(), s3);
|
|
35969
35969
|
break;
|
|
35970
|
-
case
|
|
35970
|
+
case g2.CGetRequest:
|
|
35971
35971
|
this.dimse = Object.assign(new C2(), s3);
|
|
35972
35972
|
break;
|
|
35973
|
-
case
|
|
35973
|
+
case g2.CGetResponse:
|
|
35974
35974
|
this.dimse = Object.assign(new P2(), s3);
|
|
35975
35975
|
break;
|
|
35976
|
-
case
|
|
35977
|
-
this.dimse = Object.assign(new
|
|
35976
|
+
case g2.NCreateRequest:
|
|
35977
|
+
this.dimse = Object.assign(new E2(), s3);
|
|
35978
35978
|
break;
|
|
35979
|
-
case
|
|
35980
|
-
this.dimse = Object.assign(new
|
|
35979
|
+
case g2.NCreateResponse:
|
|
35980
|
+
this.dimse = Object.assign(new T(), s3);
|
|
35981
35981
|
break;
|
|
35982
|
-
case
|
|
35982
|
+
case g2.NActionRequest:
|
|
35983
35983
|
this.dimse = Object.assign(new q2(), s3);
|
|
35984
35984
|
break;
|
|
35985
|
-
case
|
|
35985
|
+
case g2.NActionResponse:
|
|
35986
35986
|
this.dimse = Object.assign(new D2(), s3);
|
|
35987
35987
|
break;
|
|
35988
|
-
case
|
|
35988
|
+
case g2.NDeleteRequest:
|
|
35989
35989
|
this.dimse = Object.assign(new O(), s3);
|
|
35990
35990
|
break;
|
|
35991
|
-
case
|
|
35991
|
+
case g2.NDeleteResponse:
|
|
35992
35992
|
this.dimse = Object.assign(new b2(), s3);
|
|
35993
35993
|
break;
|
|
35994
|
-
case
|
|
35994
|
+
case g2.NEventReportRequest:
|
|
35995
35995
|
this.dimse = Object.assign(new N2(), s3);
|
|
35996
35996
|
break;
|
|
35997
|
-
case
|
|
35997
|
+
case g2.NEventReportResponse:
|
|
35998
35998
|
this.dimse = Object.assign(new B2(), s3);
|
|
35999
35999
|
break;
|
|
36000
|
-
case
|
|
36000
|
+
case g2.NGetRequest:
|
|
36001
36001
|
this.dimse = Object.assign(new M2(), s3);
|
|
36002
36002
|
break;
|
|
36003
|
-
case
|
|
36003
|
+
case g2.NGetResponse:
|
|
36004
36004
|
this.dimse = Object.assign(new L(), s3);
|
|
36005
36005
|
break;
|
|
36006
|
-
case
|
|
36006
|
+
case g2.NSetRequest:
|
|
36007
36007
|
this.dimse = Object.assign(new F2(), s3);
|
|
36008
36008
|
break;
|
|
36009
|
-
case
|
|
36009
|
+
case g2.NSetResponse:
|
|
36010
36010
|
this.dimse = Object.assign(new k2(), s3);
|
|
36011
36011
|
break;
|
|
36012
|
-
case
|
|
36012
|
+
case g2.CCancelRequest:
|
|
36013
36013
|
this.dimse = Object.assign(new R2(), s3);
|
|
36014
36014
|
break;
|
|
36015
36015
|
default:
|
|
@@ -36032,35 +36032,35 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
36032
36032
|
const e4 = Object.assign(Object.create(Object.getPrototypeOf(t3)), t3), s3 = this.pending.find((e5) => e5.getMessageId() === t3.getMessageIdBeingRespondedTo());
|
|
36033
36033
|
s3 && (s3.raiseResponseEvent(e4), e4.getStatus() !== l3.Pending && s3.raiseDoneEvent());
|
|
36034
36034
|
} else
|
|
36035
|
-
t3.getCommandFieldType() ===
|
|
36035
|
+
t3.getCommandFieldType() === g2.CEchoRequest ? this.emit("cEchoRequest", t3, (t4) => {
|
|
36036
36036
|
this._sendDimse({ context: e3, command: t4 });
|
|
36037
|
-
}) : t3.getCommandFieldType() ===
|
|
36037
|
+
}) : t3.getCommandFieldType() === g2.CFindRequest ? this.emit("cFindRequest", t3, (t4) => {
|
|
36038
36038
|
(Array.isArray(t4) ? t4 : [t4]).forEach((t5) => {
|
|
36039
36039
|
this._sendDimse({ context: e3, command: t5 });
|
|
36040
36040
|
});
|
|
36041
|
-
}) : t3.getCommandFieldType() ===
|
|
36041
|
+
}) : t3.getCommandFieldType() === g2.CStoreRequest ? this.emit("cStoreRequest", t3, (t4) => {
|
|
36042
36042
|
this._sendDimse({ context: e3, command: t4 });
|
|
36043
|
-
}) : t3.getCommandFieldType() ===
|
|
36043
|
+
}) : t3.getCommandFieldType() === g2.CMoveRequest ? this.emit("cMoveRequest", t3, (t4) => {
|
|
36044
36044
|
(Array.isArray(t4) ? t4 : [t4]).forEach((t5) => {
|
|
36045
36045
|
this._sendDimse({ context: e3, command: t5 });
|
|
36046
36046
|
});
|
|
36047
|
-
}) : t3.getCommandFieldType() ===
|
|
36047
|
+
}) : t3.getCommandFieldType() === g2.CGetRequest ? this.emit("cGetRequest", t3, (t4) => {
|
|
36048
36048
|
(Array.isArray(t4) ? t4 : [t4]).forEach((t5) => {
|
|
36049
36049
|
this._sendDimse({ context: e3, command: t5 });
|
|
36050
36050
|
});
|
|
36051
|
-
}) : t3.getCommandFieldType() ===
|
|
36051
|
+
}) : t3.getCommandFieldType() === g2.NCreateRequest ? this.emit("nCreateRequest", t3, (t4) => {
|
|
36052
36052
|
this._sendDimse({ context: e3, command: t4 });
|
|
36053
|
-
}) : t3.getCommandFieldType() ===
|
|
36053
|
+
}) : t3.getCommandFieldType() === g2.NActionRequest ? this.emit("nActionRequest", t3, (t4) => {
|
|
36054
36054
|
this._sendDimse({ context: e3, command: t4 });
|
|
36055
|
-
}) : t3.getCommandFieldType() ===
|
|
36055
|
+
}) : t3.getCommandFieldType() === g2.NDeleteRequest ? this.emit("nDeleteRequest", t3, (t4) => {
|
|
36056
36056
|
this._sendDimse({ context: e3, command: t4 });
|
|
36057
|
-
}) : t3.getCommandFieldType() ===
|
|
36057
|
+
}) : t3.getCommandFieldType() === g2.NEventReportRequest ? this.emit("nEventReportRequest", t3, (t4) => {
|
|
36058
36058
|
this._sendDimse({ context: e3, command: t4 });
|
|
36059
|
-
}) : t3.getCommandFieldType() ===
|
|
36059
|
+
}) : t3.getCommandFieldType() === g2.NGetRequest ? this.emit("nGetRequest", t3, (t4) => {
|
|
36060
36060
|
this._sendDimse({ context: e3, command: t4 });
|
|
36061
|
-
}) : t3.getCommandFieldType() ===
|
|
36061
|
+
}) : t3.getCommandFieldType() === g2.NSetRequest ? this.emit("nSetRequest", t3, (t4) => {
|
|
36062
36062
|
this._sendDimse({ context: e3, command: t4 });
|
|
36063
|
-
}) : t3.getCommandFieldType() ===
|
|
36063
|
+
}) : t3.getCommandFieldType() === g2.CCancelRequest && this.emit("cCancelRequest", t3);
|
|
36064
36064
|
}
|
|
36065
36065
|
_wrapSocket() {
|
|
36066
36066
|
this.socket.setTimeout(this.connectTimeout), this.socket.on("connect", () => {
|
|
@@ -36543,7 +36543,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
36543
36543
|
}
|
|
36544
36544
|
}, Pdv: m3, RawPdu: h3 };
|
|
36545
36545
|
}, 538: (e2, t2, s2) => {
|
|
36546
|
-
const { CEchoResponse: n2, CFindResponse: i3, CGetResponse: r5, CMoveResponse: o2, CStoreResponse: a, NActionResponse: c2, NCreateResponse: d3, NDeleteResponse: u2, NEventReportResponse: h3, NGetResponse: m3, NSetResponse:
|
|
36546
|
+
const { CEchoResponse: n2, CFindResponse: i3, CGetResponse: r5, CMoveResponse: o2, CStoreResponse: a, NActionResponse: c2, NCreateResponse: d3, NDeleteResponse: u2, NEventReportResponse: h3, NGetResponse: m3, NSetResponse: g2 } = s2(940), l3 = s2(371), p2 = s2(906), R2 = s2(547), f2 = s2(733), y2 = s2(278), S2 = s2(756);
|
|
36547
36547
|
e2.exports = { Scp: class extends l3 {
|
|
36548
36548
|
constructor(e3, t3) {
|
|
36549
36549
|
super(e3, t3), this.on("associationRequested", (e4) => {
|
|
@@ -36615,7 +36615,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
36615
36615
|
R2.error("nGetRequest method must be implemented"), t3(m3.fromRequest(e3));
|
|
36616
36616
|
}
|
|
36617
36617
|
nSetRequest(e3, t3) {
|
|
36618
|
-
R2.error("nSetRequest method must be implemented"), t3(
|
|
36618
|
+
R2.error("nSetRequest method must be implemented"), t3(g2.fromRequest(e3));
|
|
36619
36619
|
}
|
|
36620
36620
|
cCancelRequest(e3) {
|
|
36621
36621
|
R2.error("cCancelRequest method must be implemented");
|
|
@@ -36630,7 +36630,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
36630
36630
|
listen(e3, t3) {
|
|
36631
36631
|
let s3 = {};
|
|
36632
36632
|
(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 });
|
|
36633
|
-
const n3 = t3.securityOptions ?
|
|
36633
|
+
const n3 = t3.securityOptions ? S2 : y2;
|
|
36634
36634
|
this.server = n3.createServer(s3, (e4) => {
|
|
36635
36635
|
R2.info(`Client connecting from ${e4.remoteAddress}:${e4.remotePort} ${t3.securityOptions ? e4.authorized ? "(Authorized)" : "(Unauthorized)" : ""}`);
|
|
36636
36636
|
const s4 = new this.scp.class(e4, t3);
|
|
@@ -36685,7 +36685,7 @@ var require_dcmjs_dimse_min = __commonJS({
|
|
|
36685
36685
|
}
|
|
36686
36686
|
};
|
|
36687
36687
|
}, 237: (e2, t2, s2) => {
|
|
36688
|
-
const { Association: n2, PresentationContext: i3 } = s2(570), { Scp: r5, Server: o2 } = s2(538), { CCancelRequest: a, CEchoRequest: c2, CEchoResponse: d3, CFindRequest: u2, CFindResponse: h3, CGetRequest: m3, CGetResponse:
|
|
36688
|
+
const { Association: n2, PresentationContext: i3 } = s2(570), { Scp: r5, Server: o2 } = s2(538), { CCancelRequest: a, CEchoRequest: c2, CEchoResponse: d3, CFindRequest: u2, CFindResponse: h3, CGetRequest: m3, CGetResponse: g2, CMoveRequest: l3, CMoveResponse: p2, CStoreRequest: R2, CStoreResponse: f2, NActionRequest: y2, NActionResponse: S2, NCreateRequest: I2, NCreateResponse: C2, NDeleteRequest: P2, NDeleteResponse: v2, NEventReportRequest: x, NEventReportResponse: w2, NGetRequest: A2, NGetResponse: U2, NSetRequest: q2, NSetResponse: D2 } = s2(940), { AbortReason: E2, AbortSource: T, CommandFieldType: O, PresentationContextResult: b2, Priority: N2, RejectReason: B2, RejectResult: M2, RejectSource: L, SopClass: F2, Status: k2, StorageClass: $, TransferSyntax: j2, Uid: V2, UserIdentityType: G2 } = s2(492), _2 = s2(422), z = s2(825), Q2 = s2(139), W2 = s2(906), J2 = { association: { Association: n2, PresentationContext: i3 }, Client: _2, constants: { AbortReason: E2, AbortSource: T, CommandFieldType: O, PresentationContextResult: b2, Priority: N2, RejectReason: B2, RejectResult: M2, RejectSource: L, SopClass: F2, Status: k2, StorageClass: $, TransferSyntax: j2, Uid: V2, UserIdentityType: G2 }, Dataset: z, Implementation: Q2, log: s2(547), requests: { CCancelRequest: a, CEchoRequest: c2, CFindRequest: u2, CGetRequest: m3, CMoveRequest: l3, CStoreRequest: R2, NActionRequest: y2, NCreateRequest: I2, NDeleteRequest: P2, NEventReportRequest: x, NGetRequest: A2, NSetRequest: q2 }, responses: { CEchoResponse: d3, CFindResponse: h3, CGetResponse: g2, CMoveResponse: p2, CStoreResponse: f2, NActionResponse: S2, NCreateResponse: C2, NDeleteResponse: v2, NEventReportResponse: w2, NGetResponse: U2, NSetResponse: D2 }, Scp: r5, Server: o2, Statistics: W2, version: s2(837) };
|
|
36689
36689
|
e2.exports = J2;
|
|
36690
36690
|
}, 547: (e2, t2, s2) => {
|
|
36691
36691
|
const { createLogger: n2, format: i3, transports: r5 } = s2(688), { combine: o2, printf: a, timestamp: c2 } = i3, d3 = n2({ format: o2(c2(), a(({ level: e3, message: t3, timestamp: s3 }) => `${s3} -- ${e3.toUpperCase()} -- ${t3}`)), transports: [new r5.Console()] });
|
|
@@ -36842,7 +36842,7 @@ var Vt = "not-modified";
|
|
|
36842
36842
|
var Dt = "not-found";
|
|
36843
36843
|
var Le = "accepted";
|
|
36844
36844
|
var Dr = { resourceType: "OperationOutcome", id: Dt, issue: [{ severity: "error", code: "not-found", details: { text: "Not found" } }] };
|
|
36845
|
-
function
|
|
36845
|
+
function b(r4, e) {
|
|
36846
36846
|
return { resourceType: "OperationOutcome", issue: [{ severity: "error", code: "invalid", details: { text: r4 }, expression: e ? [e] : void 0 }] };
|
|
36847
36847
|
}
|
|
36848
36848
|
function m(r4) {
|
|
@@ -36863,7 +36863,7 @@ var d = class extends Error {
|
|
|
36863
36863
|
}
|
|
36864
36864
|
};
|
|
36865
36865
|
function Be(r4) {
|
|
36866
|
-
return r4 instanceof d ? r4.outcome : ce(r4) ? r4 :
|
|
36866
|
+
return r4 instanceof d ? r4.outcome : ce(r4) ? r4 : b(di(r4));
|
|
36867
36867
|
}
|
|
36868
36868
|
function di(r4) {
|
|
36869
36869
|
return r4 ? typeof r4 == "string" ? r4 : r4 instanceof Error ? r4.message : ce(r4) ? Nr(r4) : typeof r4 == "object" && "code" in r4 && typeof r4.code == "string" ? r4.code : JSON.stringify(r4) : "Unknown error";
|
|
@@ -37016,7 +37016,7 @@ var _t = class {
|
|
|
37016
37016
|
}
|
|
37017
37017
|
parseElementDefinition(e) {
|
|
37018
37018
|
let t = jr(e.max), n = e.base?.max ? jr(e.base.max) : t, i2 = { type: "ElementDefinition", value: e };
|
|
37019
|
-
return { description: e.definition || "", path: e.path || e.base?.path || "", min: e.min ?? 0, max: t, isArray: n > 1, constraints: (e.constraint ?? []).map((o) => ({ key: o.key ?? "", severity: o.severity ?? "error", expression: o.expression ?? "", description: o.human ?? "" })), type: this.parseElementDefinitionType(e), fixed: $r(
|
|
37019
|
+
return { description: e.definition || "", path: e.path || e.base?.path || "", min: e.min ?? 0, max: t, isArray: n > 1, constraints: (e.constraint ?? []).map((o) => ({ key: o.key ?? "", severity: o.severity ?? "error", expression: o.expression ?? "", description: o.human ?? "" })), type: this.parseElementDefinitionType(e), fixed: $r(P(i2, "fixed[x]")), pattern: $r(P(i2, "pattern[x]")), binding: e.binding };
|
|
37020
37020
|
}
|
|
37021
37021
|
};
|
|
37022
37022
|
function jr(r4) {
|
|
@@ -37032,7 +37032,7 @@ function le(r4, e) {
|
|
|
37032
37032
|
return !r4 || !e ? false : e.startsWith(r4 + ".") || e === r4;
|
|
37033
37033
|
}
|
|
37034
37034
|
function $r(r4) {
|
|
37035
|
-
return Array.isArray(r4) && r4.length > 0 ? r4[0] :
|
|
37035
|
+
return Array.isArray(r4) && r4.length > 0 ? r4[0] : S(r4) ? void 0 : r4;
|
|
37036
37036
|
}
|
|
37037
37037
|
function vi(r4) {
|
|
37038
37038
|
let e = r4.slicing?.discriminator;
|
|
@@ -37046,8 +37046,8 @@ var $e = { base64Binary: /^([A-Za-z\d+/]{4})*([A-Za-z\d+/]{2}==|[A-Za-z\d+/]{3}=
|
|
|
37046
37046
|
function f(r4) {
|
|
37047
37047
|
return [{ type: l.boolean, value: r4 }];
|
|
37048
37048
|
}
|
|
37049
|
-
function
|
|
37050
|
-
return r4 == null ? { type: "undefined", value: void 0 } : Number.isSafeInteger(r4) ? { type: l.integer, value: r4 } : typeof r4 == "number" ? { type: l.decimal, value: r4 } : typeof r4 == "boolean" ? { type: l.boolean, value: r4 } : typeof r4 == "string" ? { type: l.string, value: r4 } :
|
|
37049
|
+
function y(r4) {
|
|
37050
|
+
return r4 == null ? { type: "undefined", value: void 0 } : Number.isSafeInteger(r4) ? { type: l.integer, value: r4 } : typeof r4 == "number" ? { type: l.decimal, value: r4 } : typeof r4 == "boolean" ? { type: l.boolean, value: r4 } : typeof r4 == "string" ? { type: l.string, value: r4 } : A(r4) ? { type: l.Quantity, value: r4 } : _(r4) ? { type: r4.resourceType, value: r4 } : { type: l.BackboneElement, value: r4 };
|
|
37051
37051
|
}
|
|
37052
37052
|
function N(r4) {
|
|
37053
37053
|
return r4.length === 0 ? false : !!r4[0].value;
|
|
@@ -37059,7 +37059,7 @@ function U(r4, e) {
|
|
|
37059
37059
|
throw new Error(`Expected singleton of type ${e}, but found ${JSON.stringify(r4)}`);
|
|
37060
37060
|
}
|
|
37061
37061
|
}
|
|
37062
|
-
function
|
|
37062
|
+
function P(r4, e, t) {
|
|
37063
37063
|
if (!r4.value)
|
|
37064
37064
|
return;
|
|
37065
37065
|
let n = ze(r4.type, e, t?.profileUrl);
|
|
@@ -37073,7 +37073,7 @@ function Pi(r4, e, t) {
|
|
|
37073
37073
|
if (t.path.endsWith("[x]")) {
|
|
37074
37074
|
let c2 = t.path.split(".").pop().replace("[x]", "");
|
|
37075
37075
|
for (let u2 of i2) {
|
|
37076
|
-
let p2 = c2 +
|
|
37076
|
+
let p2 = c2 + C(u2.code);
|
|
37077
37077
|
if (o = n[p2], a = n["_" + p2], o !== void 0 || a !== void 0) {
|
|
37078
37078
|
s = u2.code;
|
|
37079
37079
|
break;
|
|
@@ -37087,7 +37087,7 @@ function Pi(r4, e, t) {
|
|
|
37087
37087
|
o[c2] = tn(o[c2], a[c2]);
|
|
37088
37088
|
else
|
|
37089
37089
|
o = tn(o, a);
|
|
37090
|
-
if (!
|
|
37090
|
+
if (!S(o))
|
|
37091
37091
|
return (s === "Element" || s === "BackboneElement") && (s = t.type[0].code), Array.isArray(o) ? o.map((c2) => Yr(c2, s)) : Yr(o, s);
|
|
37092
37092
|
}
|
|
37093
37093
|
function Yr(r4, e) {
|
|
@@ -37102,14 +37102,14 @@ function wi(r4, e) {
|
|
|
37102
37102
|
n = t[e];
|
|
37103
37103
|
else
|
|
37104
37104
|
for (let i2 in l) {
|
|
37105
|
-
let o = e +
|
|
37105
|
+
let o = e + C(i2);
|
|
37106
37106
|
if (o in t) {
|
|
37107
37107
|
n = t[o];
|
|
37108
37108
|
break;
|
|
37109
37109
|
}
|
|
37110
37110
|
}
|
|
37111
|
-
if (!
|
|
37112
|
-
return Array.isArray(n) ? n.map(
|
|
37111
|
+
if (!S(n))
|
|
37112
|
+
return Array.isArray(n) ? n.map(y) : y(n);
|
|
37113
37113
|
}
|
|
37114
37114
|
function We(r4) {
|
|
37115
37115
|
let e = [];
|
|
@@ -37132,14 +37132,14 @@ function Yt(r4, e) {
|
|
|
37132
37132
|
}
|
|
37133
37133
|
function rn(r4, e) {
|
|
37134
37134
|
let t = r4.value?.valueOf(), n = e.value?.valueOf();
|
|
37135
|
-
return typeof t == "number" && typeof n == "number" ? f(Math.abs(t - n) < 1e-8) :
|
|
37135
|
+
return typeof t == "number" && typeof n == "number" ? f(Math.abs(t - n) < 1e-8) : A(t) && A(n) ? f(sn(t, n)) : f(typeof t == "object" && typeof n == "object" ? Xt(r4, e) : t === n);
|
|
37136
37136
|
}
|
|
37137
37137
|
function Zt(r4, e) {
|
|
37138
37138
|
return r4.length === 0 && e.length === 0 ? f(true) : r4.length !== e.length ? f(false) : (r4.sort(Zr), e.sort(Zr), f(r4.every((t, n) => N(Ai(t, e[n])))));
|
|
37139
37139
|
}
|
|
37140
37140
|
function Ai(r4, e) {
|
|
37141
37141
|
let { type: t, value: n } = r4, { type: i2, value: o } = e, s = n?.valueOf(), a = o?.valueOf();
|
|
37142
|
-
return typeof s == "number" && typeof a == "number" ? f(Math.abs(s - a) < 0.01) :
|
|
37142
|
+
return typeof s == "number" && typeof a == "number" ? f(Math.abs(s - a) < 0.01) : A(s) && A(a) ? f(sn(s, a)) : f(t === "Coding" && i2 === "Coding" ? typeof s != "object" || typeof a != "object" ? false : s.code === a.code && s.system === a.system : typeof s == "object" && typeof a == "object" ? Xt({ ...s, id: void 0 }, { ...a, id: void 0 }) : typeof s == "string" && typeof a == "string" ? s.toLowerCase() === a.toLowerCase() : s === a);
|
|
37143
37143
|
}
|
|
37144
37144
|
function Zr(r4, e) {
|
|
37145
37145
|
let t = r4.value?.valueOf(), n = e.value?.valueOf();
|
|
@@ -37164,7 +37164,7 @@ function Ke(r4, e) {
|
|
|
37164
37164
|
case "Period":
|
|
37165
37165
|
return on(t);
|
|
37166
37166
|
case "Quantity":
|
|
37167
|
-
return
|
|
37167
|
+
return A(t);
|
|
37168
37168
|
default:
|
|
37169
37169
|
return typeof t == "object" && t?.resourceType === e;
|
|
37170
37170
|
}
|
|
@@ -37178,7 +37178,7 @@ function He(r4) {
|
|
|
37178
37178
|
function on(r4) {
|
|
37179
37179
|
return !!(r4 && typeof r4 == "object" && ("start" in r4 && He(r4.start) || "end" in r4 && He(r4.end)));
|
|
37180
37180
|
}
|
|
37181
|
-
function
|
|
37181
|
+
function A(r4) {
|
|
37182
37182
|
return !!(r4 && typeof r4 == "object" && "value" in r4 && typeof r4.value == "number");
|
|
37183
37183
|
}
|
|
37184
37184
|
function sn(r4, e) {
|
|
@@ -37256,10 +37256,10 @@ function Ye(r4, e) {
|
|
|
37256
37256
|
n.setUTCHours(0, 0, 0, 0);
|
|
37257
37257
|
let i2 = t.getUTCFullYear(), o = t.getUTCMonth(), s = t.getUTCDate(), a = n.getUTCFullYear(), c2 = n.getUTCMonth(), u2 = n.getUTCDate(), p2 = a - i2;
|
|
37258
37258
|
(c2 < o || c2 === o && u2 < s) && p2--;
|
|
37259
|
-
let
|
|
37260
|
-
u2 < s &&
|
|
37261
|
-
let
|
|
37262
|
-
return { years: p2, months:
|
|
37259
|
+
let x = a * 12 + c2 - (i2 * 12 + o);
|
|
37260
|
+
u2 < s && x--;
|
|
37261
|
+
let v2 = Math.floor((n.getTime() - t.getTime()) / (1e3 * 60 * 60 * 24));
|
|
37262
|
+
return { years: p2, months: x, days: v2 };
|
|
37263
37263
|
}
|
|
37264
37264
|
function $t(r4, ...e) {
|
|
37265
37265
|
let t = r4;
|
|
@@ -37271,12 +37271,12 @@ function ln(r4, e) {
|
|
|
37271
37271
|
return JSON.stringify(r4, Mi, e ? 2 : void 0);
|
|
37272
37272
|
}
|
|
37273
37273
|
function Mi(r4, e) {
|
|
37274
|
-
return !Ni(r4) &&
|
|
37274
|
+
return !Ni(r4) && S(e) ? void 0 : e;
|
|
37275
37275
|
}
|
|
37276
37276
|
function Ni(r4) {
|
|
37277
37277
|
return !!/\d+$/.exec(r4);
|
|
37278
37278
|
}
|
|
37279
|
-
function
|
|
37279
|
+
function S(r4) {
|
|
37280
37280
|
if (r4 == null)
|
|
37281
37281
|
return true;
|
|
37282
37282
|
let e = typeof r4;
|
|
@@ -37306,7 +37306,7 @@ function mn(r4) {
|
|
|
37306
37306
|
t[n] = String.fromCharCode(e[n]);
|
|
37307
37307
|
return window.btoa(t.join(""));
|
|
37308
37308
|
}
|
|
37309
|
-
function
|
|
37309
|
+
function C(r4) {
|
|
37310
37310
|
return r4 ? r4.charAt(0).toUpperCase() + r4.substring(1) : "";
|
|
37311
37311
|
}
|
|
37312
37312
|
var rr = (r4) => new Promise((e) => {
|
|
@@ -37339,7 +37339,7 @@ function Ut(r4) {
|
|
|
37339
37339
|
return e === "BackboneElement" || e === "Element" ? to((r4.base?.path ?? r4.path)?.split(".")) : e;
|
|
37340
37340
|
}
|
|
37341
37341
|
function to(r4) {
|
|
37342
|
-
return r4.length === 1 ? r4[0] : r4.map(
|
|
37342
|
+
return r4.length === 1 ? r4[0] : r4.map(C).join("");
|
|
37343
37343
|
}
|
|
37344
37344
|
function ze(r4, e, t) {
|
|
37345
37345
|
let n = be(r4, t);
|
|
@@ -37378,7 +37378,7 @@ function he(r4) {
|
|
|
37378
37378
|
}
|
|
37379
37379
|
}
|
|
37380
37380
|
var Ce = () => [];
|
|
37381
|
-
var
|
|
37381
|
+
var w = { empty: (r4, e) => f(e.length === 0 || e.every((t) => S(t.value))), hasValue: (r4, e) => f(e.length !== 0), exists: (r4, e, t) => t ? f(e.filter((n) => N(t.eval(r4, [n]))).length > 0) : f(e.length > 0 && e.every((n) => !S(n.value))), all: (r4, e, t) => f(e.every((n) => N(t.eval(r4, [n])))), allTrue: (r4, e) => {
|
|
37382
37382
|
for (let t of e)
|
|
37383
37383
|
if (!t.value)
|
|
37384
37384
|
return f(false);
|
|
@@ -37403,7 +37403,7 @@ var P = { empty: (r4, e) => f(e.length === 0 || e.every((t) => T(t.value))), has
|
|
|
37403
37403
|
for (let n of e)
|
|
37404
37404
|
t.some((i2) => i2.value === n.value) || t.push(n);
|
|
37405
37405
|
return t;
|
|
37406
|
-
}, isDistinct: (r4, e) => f(e.length ===
|
|
37406
|
+
}, isDistinct: (r4, e) => f(e.length === w.distinct(r4, e).length), where: (r4, e, t) => e.filter((n) => N(t.eval(r4, [n]))), select: (r4, e, t) => e.map((n) => t.eval(r4, [n])).flat(), repeat: Ce, ofType: (r4, e, t) => e.filter((n) => n.type === t.name), single: (r4, e) => {
|
|
37407
37407
|
if (e.length > 1)
|
|
37408
37408
|
throw new Error("Expected input length one for single()");
|
|
37409
37409
|
return e.length === 0 ? [] : e.slice(0, 1);
|
|
@@ -37441,7 +37441,7 @@ var P = { empty: (r4, e) => f(e.length === 0 || e.every((t) => T(t.value))), has
|
|
|
37441
37441
|
return e;
|
|
37442
37442
|
let n = t.eval(r4, e);
|
|
37443
37443
|
return [...e, ...n];
|
|
37444
|
-
}, htmlChecks: (r4, e, t) => [
|
|
37444
|
+
}, htmlChecks: (r4, e, t) => [y(true)], iif: (r4, e, t, n, i2) => {
|
|
37445
37445
|
let o = t.eval(r4, e);
|
|
37446
37446
|
if (o.length > 1 || o.length === 1 && typeof o[0].value != "boolean")
|
|
37447
37447
|
throw new Error("Expected criterion to evaluate to a Boolean");
|
|
@@ -37462,37 +37462,37 @@ var P = { empty: (r4, e) => f(e.length === 0 || e.every((t) => T(t.value))), has
|
|
|
37462
37462
|
return f(false);
|
|
37463
37463
|
}
|
|
37464
37464
|
return [];
|
|
37465
|
-
}, convertsToBoolean: (r4, e) => e.length === 0 ? [] : f(
|
|
37465
|
+
}, convertsToBoolean: (r4, e) => e.length === 0 ? [] : f(w.toBoolean(r4, e).length === 1), toInteger: (r4, e) => {
|
|
37466
37466
|
if (e.length === 0)
|
|
37467
37467
|
return [];
|
|
37468
37468
|
let [{ value: t }] = q(e, 1);
|
|
37469
37469
|
return typeof t == "number" ? [{ type: l.integer, value: t }] : typeof t == "string" && /^[+-]?\d+$/.exec(t) ? [{ type: l.integer, value: parseInt(t, 10) }] : typeof t == "boolean" ? [{ type: l.integer, value: t ? 1 : 0 }] : [];
|
|
37470
|
-
}, convertsToInteger: (r4, e) => e.length === 0 ? [] : f(
|
|
37470
|
+
}, convertsToInteger: (r4, e) => e.length === 0 ? [] : f(w.toInteger(r4, e).length === 1), toDate: (r4, e) => {
|
|
37471
37471
|
if (e.length === 0)
|
|
37472
37472
|
return [];
|
|
37473
37473
|
let [{ value: t }] = q(e, 1);
|
|
37474
37474
|
return typeof t == "string" && /^\d{4}(-\d{2}(-\d{2})?)?/.exec(t) ? [{ type: l.date, value: he(t) }] : [];
|
|
37475
|
-
}, convertsToDate: (r4, e) => e.length === 0 ? [] : f(
|
|
37475
|
+
}, convertsToDate: (r4, e) => e.length === 0 ? [] : f(w.toDate(r4, e).length === 1), toDateTime: (r4, e) => {
|
|
37476
37476
|
if (e.length === 0)
|
|
37477
37477
|
return [];
|
|
37478
37478
|
let [{ value: t }] = q(e, 1);
|
|
37479
37479
|
return typeof t == "string" && /^\d{4}(-\d{2}(-\d{2})?)?/.exec(t) ? [{ type: l.dateTime, value: he(t) }] : [];
|
|
37480
|
-
}, convertsToDateTime: (r4, e) => e.length === 0 ? [] : f(
|
|
37480
|
+
}, convertsToDateTime: (r4, e) => e.length === 0 ? [] : f(w.toDateTime(r4, e).length === 1), toDecimal: (r4, e) => {
|
|
37481
37481
|
if (e.length === 0)
|
|
37482
37482
|
return [];
|
|
37483
37483
|
let [{ value: t }] = q(e, 1);
|
|
37484
37484
|
return typeof t == "number" ? [{ type: l.decimal, value: t }] : typeof t == "string" && /^-?\d{1,9}(\.\d{1,9})?$/.exec(t) ? [{ type: l.decimal, value: parseFloat(t) }] : typeof t == "boolean" ? [{ type: l.decimal, value: t ? 1 : 0 }] : [];
|
|
37485
|
-
}, convertsToDecimal: (r4, e) => e.length === 0 ? [] : f(
|
|
37485
|
+
}, convertsToDecimal: (r4, e) => e.length === 0 ? [] : f(w.toDecimal(r4, e).length === 1), toQuantity: (r4, e) => {
|
|
37486
37486
|
if (e.length === 0)
|
|
37487
37487
|
return [];
|
|
37488
37488
|
let [{ value: t }] = q(e, 1);
|
|
37489
|
-
return
|
|
37490
|
-
}, convertsToQuantity: (r4, e) => e.length === 0 ? [] : f(
|
|
37489
|
+
return A(t) ? [{ type: l.Quantity, value: t }] : typeof t == "number" ? [{ type: l.Quantity, value: { value: t, unit: "1" } }] : typeof t == "string" && /^-?\d{1,9}(\.\d{1,9})?/.exec(t) ? [{ type: l.Quantity, value: { value: parseFloat(t), unit: "1" } }] : typeof t == "boolean" ? [{ type: l.Quantity, value: { value: t ? 1 : 0, unit: "1" } }] : [];
|
|
37490
|
+
}, convertsToQuantity: (r4, e) => e.length === 0 ? [] : f(w.toQuantity(r4, e).length === 1), toString: (r4, e) => {
|
|
37491
37491
|
if (e.length === 0)
|
|
37492
37492
|
return [];
|
|
37493
37493
|
let [{ value: t }] = q(e, 1);
|
|
37494
|
-
return t == null ? [] :
|
|
37495
|
-
}, convertsToString: (r4, e) => e.length === 0 ? [] : f(
|
|
37494
|
+
return t == null ? [] : A(t) ? [{ type: l.string, value: `${t.value} '${t.unit}'` }] : [{ type: l.string, value: t.toString() }];
|
|
37495
|
+
}, convertsToString: (r4, e) => e.length === 0 ? [] : f(w.toString(r4, e).length === 1), toTime: (r4, e) => {
|
|
37496
37496
|
if (e.length === 0)
|
|
37497
37497
|
return [];
|
|
37498
37498
|
let [{ value: t }] = q(e, 1);
|
|
@@ -37502,14 +37502,14 @@ var P = { empty: (r4, e) => f(e.length === 0 || e.every((t) => T(t.value))), has
|
|
|
37502
37502
|
return [{ type: l.time, value: he("T" + n[1]) }];
|
|
37503
37503
|
}
|
|
37504
37504
|
return [];
|
|
37505
|
-
}, convertsToTime: (r4, e) => e.length === 0 ? [] : f(
|
|
37505
|
+
}, convertsToTime: (r4, e) => e.length === 0 ? [] : f(w.toTime(r4, e).length === 1), indexOf: (r4, e, t) => V((n, i2) => n.indexOf(i2), r4, e, t), substring: (r4, e, t, n) => V((i2, o, s) => {
|
|
37506
37506
|
let a = o, c2 = s ? a + s : i2.length;
|
|
37507
37507
|
return a < 0 || a >= i2.length ? void 0 : i2.substring(a, c2);
|
|
37508
37508
|
}, r4, e, t, n), startsWith: (r4, e, t) => V((n, i2) => n.startsWith(i2), r4, e, t), endsWith: (r4, e, t) => V((n, i2) => n.endsWith(i2), r4, e, t), contains: (r4, e, t) => V((n, i2) => n.includes(i2), r4, e, t), upper: (r4, e) => V((t) => t.toUpperCase(), r4, e), lower: (r4, e) => V((t) => t.toLowerCase(), r4, e), replace: (r4, e, t, n) => V((i2, o, s) => i2.replaceAll(o, s), r4, e, t, n), matches: (r4, e, t) => V((n, i2) => !!new RegExp(i2).exec(n), r4, e, t), replaceMatches: (r4, e, t, n) => V((i2, o, s) => i2.replaceAll(o, s), r4, e, t, n), length: (r4, e) => V((t) => t.length, r4, e), toChars: (r4, e) => V((t) => t ? t.split("") : void 0, r4, e), abs: (r4, e) => B(Math.abs, r4, e), ceiling: (r4, e) => B(Math.ceil, r4, e), exp: (r4, e) => B(Math.exp, r4, e), floor: (r4, e) => B(Math.floor, r4, e), ln: (r4, e) => B(Math.log, r4, e), log: (r4, e, t) => B((n, i2) => Math.log(n) / Math.log(i2), r4, e, t), power: (r4, e, t) => B(Math.pow, r4, e, t), round: (r4, e) => B(Math.round, r4, e), sqrt: (r4, e) => B(Math.sqrt, r4, e), truncate: (r4, e) => B((t) => t | 0, r4, e), children: Ce, descendants: Ce, trace: (r4, e, t) => e, now: () => [{ type: l.dateTime, value: (/* @__PURE__ */ new Date()).toISOString() }], timeOfDay: () => [{ type: l.time, value: (/* @__PURE__ */ new Date()).toISOString().substring(11) }], today: () => [{ type: l.date, value: (/* @__PURE__ */ new Date()).toISOString().substring(0, 10) }], between: (r4, e, t, n, i2) => {
|
|
37509
|
-
let o =
|
|
37509
|
+
let o = w.toDateTime(r4, t.eval(r4, e));
|
|
37510
37510
|
if (o.length === 0)
|
|
37511
37511
|
throw new Error("Invalid start date");
|
|
37512
|
-
let s =
|
|
37512
|
+
let s = w.toDateTime(r4, n.eval(r4, e));
|
|
37513
37513
|
if (s.length === 0)
|
|
37514
37514
|
throw new Error("Invalid end date");
|
|
37515
37515
|
let a = i2.eval(r4, e)[0]?.value;
|
|
@@ -37520,14 +37520,14 @@ var P = { empty: (r4, e) => f(e.length === 0 || e.every((t) => T(t.value))), has
|
|
|
37520
37520
|
}, is: (r4, e, t) => {
|
|
37521
37521
|
let n = "";
|
|
37522
37522
|
return t instanceof j ? n = t.name : t instanceof W && (n = t.left.name + "." + t.right.name), n ? e.map((i2) => ({ type: l.boolean, value: Ke(i2, n) })) : [];
|
|
37523
|
-
}, not: (r4, e) =>
|
|
37523
|
+
}, not: (r4, e) => w.toBoolean(r4, e).map((t) => ({ type: l.boolean, value: !t.value })), resolve: (r4, e) => e.map((t) => {
|
|
37524
37524
|
let n = t.value, i2;
|
|
37525
37525
|
if (typeof n == "string")
|
|
37526
37526
|
i2 = n;
|
|
37527
37527
|
else if (typeof n == "object") {
|
|
37528
37528
|
let o = n;
|
|
37529
37529
|
if (o.resource)
|
|
37530
|
-
return
|
|
37530
|
+
return y(o.resource);
|
|
37531
37531
|
o.reference ? i2 = o.reference : o.type && o.identifier && (i2 = `${o.type}?identifier=${o.identifier.system}|${o.identifier.value}`);
|
|
37532
37532
|
}
|
|
37533
37533
|
if (i2?.includes("?")) {
|
|
@@ -37553,12 +37553,12 @@ function V(r4, e, t, ...n) {
|
|
|
37553
37553
|
if (typeof i2 != "string")
|
|
37554
37554
|
throw new Error("String function cannot be called with non-string");
|
|
37555
37555
|
let o = r4(i2, ...n.map((s) => s?.eval(e, t)[0]?.value));
|
|
37556
|
-
return o === void 0 ? [] : Array.isArray(o) ? o.map(
|
|
37556
|
+
return o === void 0 ? [] : Array.isArray(o) ? o.map(y) : [y(o)];
|
|
37557
37557
|
}
|
|
37558
37558
|
function B(r4, e, t, ...n) {
|
|
37559
37559
|
if (t.length === 0)
|
|
37560
37560
|
return [];
|
|
37561
|
-
let [{ value: i2 }] = q(t, 1), o =
|
|
37561
|
+
let [{ value: i2 }] = q(t, 1), o = A(i2), s = o ? i2.value : i2;
|
|
37562
37562
|
if (typeof s != "number")
|
|
37563
37563
|
throw new Error("Math function cannot be called with non-number");
|
|
37564
37564
|
let a = r4(s, ...n.map((p2) => p2.eval(e, t)[0]?.value)), c2 = o ? l.Quantity : t[0].type, u2 = o ? { ...i2, value: a } : a;
|
|
@@ -37601,7 +37601,7 @@ var j = class {
|
|
|
37601
37601
|
evalValue(e) {
|
|
37602
37602
|
let t = e.value;
|
|
37603
37603
|
if (!(!t || typeof t != "object"))
|
|
37604
|
-
return _(t) && t.resourceType === this.name ? e :
|
|
37604
|
+
return _(t) && t.resourceType === this.name ? e : P(e, this.name);
|
|
37605
37605
|
}
|
|
37606
37606
|
toString() {
|
|
37607
37607
|
return this.name;
|
|
@@ -37632,12 +37632,12 @@ var re = class extends H {
|
|
|
37632
37632
|
super("as", e, t);
|
|
37633
37633
|
}
|
|
37634
37634
|
eval(e, t) {
|
|
37635
|
-
return
|
|
37635
|
+
return w.ofType(e, this.left.eval(e, t), this.right);
|
|
37636
37636
|
}
|
|
37637
37637
|
};
|
|
37638
|
-
var
|
|
37638
|
+
var R = class extends H {
|
|
37639
37639
|
};
|
|
37640
|
-
var
|
|
37640
|
+
var I = class extends R {
|
|
37641
37641
|
constructor(t, n, i2, o) {
|
|
37642
37642
|
super(t, n, i2);
|
|
37643
37643
|
this.impl = o;
|
|
@@ -37649,8 +37649,8 @@ var A = class extends b {
|
|
|
37649
37649
|
let o = this.right.eval(t, n);
|
|
37650
37650
|
if (o.length !== 1)
|
|
37651
37651
|
return [];
|
|
37652
|
-
let s = i2[0].value, a = o[0].value, c2 =
|
|
37653
|
-
return typeof p2 == "boolean" ? f(p2) :
|
|
37652
|
+
let s = i2[0].value, a = o[0].value, c2 = A(s) ? s.value : s, u2 = A(a) ? a.value : a, p2 = this.impl(c2, u2);
|
|
37653
|
+
return typeof p2 == "boolean" ? f(p2) : A(s) ? [{ type: l.Quantity, value: { ...s, value: p2 } }] : [y(p2)];
|
|
37654
37654
|
}
|
|
37655
37655
|
};
|
|
37656
37656
|
var rt = class extends H {
|
|
@@ -37662,7 +37662,7 @@ var rt = class extends H {
|
|
|
37662
37662
|
return o.length > 0 && o.every((s) => typeof s.value == "string") ? [{ type: l.string, value: o.map((s) => s.value).join("") }] : o;
|
|
37663
37663
|
}
|
|
37664
37664
|
};
|
|
37665
|
-
var nt = class extends
|
|
37665
|
+
var nt = class extends R {
|
|
37666
37666
|
constructor(e, t) {
|
|
37667
37667
|
super("contains", e, t);
|
|
37668
37668
|
}
|
|
@@ -37671,7 +37671,7 @@ var nt = class extends b {
|
|
|
37671
37671
|
return f(n.some((o) => o.value === i2[0].value));
|
|
37672
37672
|
}
|
|
37673
37673
|
};
|
|
37674
|
-
var it = class extends
|
|
37674
|
+
var it = class extends R {
|
|
37675
37675
|
constructor(e, t) {
|
|
37676
37676
|
super("in", e, t);
|
|
37677
37677
|
}
|
|
@@ -37700,7 +37700,7 @@ var ye = class extends H {
|
|
|
37700
37700
|
return We([...n, ...i2]);
|
|
37701
37701
|
}
|
|
37702
37702
|
};
|
|
37703
|
-
var ot = class extends
|
|
37703
|
+
var ot = class extends R {
|
|
37704
37704
|
constructor(e, t) {
|
|
37705
37705
|
super("=", e, t);
|
|
37706
37706
|
}
|
|
@@ -37709,7 +37709,7 @@ var ot = class extends b {
|
|
|
37709
37709
|
return Yt(n, i2);
|
|
37710
37710
|
}
|
|
37711
37711
|
};
|
|
37712
|
-
var st = class extends
|
|
37712
|
+
var st = class extends R {
|
|
37713
37713
|
constructor(e, t) {
|
|
37714
37714
|
super("!=", e, t);
|
|
37715
37715
|
}
|
|
@@ -37718,7 +37718,7 @@ var st = class extends b {
|
|
|
37718
37718
|
return Jt(Yt(n, i2));
|
|
37719
37719
|
}
|
|
37720
37720
|
};
|
|
37721
|
-
var at = class extends
|
|
37721
|
+
var at = class extends R {
|
|
37722
37722
|
constructor(e, t) {
|
|
37723
37723
|
super("~", e, t);
|
|
37724
37724
|
}
|
|
@@ -37727,7 +37727,7 @@ var at = class extends b {
|
|
|
37727
37727
|
return Zt(n, i2);
|
|
37728
37728
|
}
|
|
37729
37729
|
};
|
|
37730
|
-
var ct = class extends
|
|
37730
|
+
var ct = class extends R {
|
|
37731
37731
|
constructor(e, t) {
|
|
37732
37732
|
super("!~", e, t);
|
|
37733
37733
|
}
|
|
@@ -37736,7 +37736,7 @@ var ct = class extends b {
|
|
|
37736
37736
|
return Jt(Zt(n, i2));
|
|
37737
37737
|
}
|
|
37738
37738
|
};
|
|
37739
|
-
var ne = class extends
|
|
37739
|
+
var ne = class extends R {
|
|
37740
37740
|
constructor(e, t) {
|
|
37741
37741
|
super("is", e, t);
|
|
37742
37742
|
}
|
|
@@ -37748,7 +37748,7 @@ var ne = class extends b {
|
|
|
37748
37748
|
return f(Ke(n[0], i2));
|
|
37749
37749
|
}
|
|
37750
37750
|
};
|
|
37751
|
-
var ut = class extends
|
|
37751
|
+
var ut = class extends R {
|
|
37752
37752
|
constructor(e, t) {
|
|
37753
37753
|
super("and", e, t);
|
|
37754
37754
|
}
|
|
@@ -37757,7 +37757,7 @@ var ut = class extends b {
|
|
|
37757
37757
|
return n?.value === true && i2?.value === true ? f(true) : n?.value === false || i2?.value === false ? f(false) : [];
|
|
37758
37758
|
}
|
|
37759
37759
|
};
|
|
37760
|
-
var lt = class extends
|
|
37760
|
+
var lt = class extends R {
|
|
37761
37761
|
constructor(e, t) {
|
|
37762
37762
|
super("or", e, t);
|
|
37763
37763
|
}
|
|
@@ -37766,7 +37766,7 @@ var lt = class extends b {
|
|
|
37766
37766
|
return n?.value === false && i2?.value === false ? f(false) : n?.value || i2?.value ? f(true) : [];
|
|
37767
37767
|
}
|
|
37768
37768
|
};
|
|
37769
|
-
var pt = class extends
|
|
37769
|
+
var pt = class extends R {
|
|
37770
37770
|
constructor(e, t) {
|
|
37771
37771
|
super("xor", e, t);
|
|
37772
37772
|
}
|
|
@@ -37775,7 +37775,7 @@ var pt = class extends b {
|
|
|
37775
37775
|
return !n || !i2 ? [] : f(n.value !== i2.value);
|
|
37776
37776
|
}
|
|
37777
37777
|
};
|
|
37778
|
-
var dt = class extends
|
|
37778
|
+
var dt = class extends R {
|
|
37779
37779
|
constructor(e, t) {
|
|
37780
37780
|
super("implies", e, t);
|
|
37781
37781
|
}
|
|
@@ -37790,7 +37790,7 @@ var Q = class {
|
|
|
37790
37790
|
this.args = t;
|
|
37791
37791
|
}
|
|
37792
37792
|
eval(e, t) {
|
|
37793
|
-
let n =
|
|
37793
|
+
let n = w[this.name];
|
|
37794
37794
|
if (!n)
|
|
37795
37795
|
throw new Error("Unrecognized function: " + this.name);
|
|
37796
37796
|
return n(e, t, ...this.args);
|
|
@@ -37845,12 +37845,12 @@ function po(r4) {
|
|
|
37845
37845
|
return n?.startsWith("'") && n.endsWith("'") ? n = n.substring(1, n.length - 1) : n = "{" + n + "}", { value: t, unit: n };
|
|
37846
37846
|
}
|
|
37847
37847
|
function Ae() {
|
|
37848
|
-
return new _e().registerPrefix("String", { parse: (r4, e) => new D({ type: l.string, value: e.value }) }).registerPrefix("DateTime", { parse: (r4, e) => new D({ type: l.dateTime, value: he(e.value) }) }).registerPrefix("Quantity", { parse: (r4, e) => new D({ type: l.Quantity, value: po(e.value) }) }).registerPrefix("Number", { parse: (r4, e) => new D({ type: e.value.includes(".") ? l.decimal : l.integer, value: parseFloat(e.value) }) }).registerPrefix("true", { parse: () => new D({ type: l.boolean, value: true }) }).registerPrefix("false", { parse: () => new D({ type: l.boolean, value: false }) }).registerPrefix("Symbol", { parse: (r4, e) => new j(e.value) }).registerPrefix("{}", { parse: () => new et() }).registerPrefix("(", co).registerInfix("[", uo).registerInfix("(", lo).prefix("+", h.UnaryAdd, (r4, e) => new tt("+", e, (t) => t)).prefix("-", h.UnarySubtract, (r4, e) => new
|
|
37848
|
+
return new _e().registerPrefix("String", { parse: (r4, e) => new D({ type: l.string, value: e.value }) }).registerPrefix("DateTime", { parse: (r4, e) => new D({ type: l.dateTime, value: he(e.value) }) }).registerPrefix("Quantity", { parse: (r4, e) => new D({ type: l.Quantity, value: po(e.value) }) }).registerPrefix("Number", { parse: (r4, e) => new D({ type: e.value.includes(".") ? l.decimal : l.integer, value: parseFloat(e.value) }) }).registerPrefix("true", { parse: () => new D({ type: l.boolean, value: true }) }).registerPrefix("false", { parse: () => new D({ type: l.boolean, value: false }) }).registerPrefix("Symbol", { parse: (r4, e) => new j(e.value) }).registerPrefix("{}", { parse: () => new et() }).registerPrefix("(", co).registerInfix("[", uo).registerInfix("(", lo).prefix("+", h.UnaryAdd, (r4, e) => new tt("+", e, (t) => t)).prefix("-", h.UnarySubtract, (r4, e) => new I("-", e, e, (t, n) => -n)).infixLeft(".", h.Dot, (r4, e, t) => new W(r4, t)).infixLeft("/", h.Divide, (r4, e, t) => new I("/", r4, t, (n, i2) => n / i2)).infixLeft("*", h.Multiply, (r4, e, t) => new I("*", r4, t, (n, i2) => n * i2)).infixLeft("+", h.Add, (r4, e, t) => new I("+", r4, t, (n, i2) => n + i2)).infixLeft("-", h.Subtract, (r4, e, t) => new I("-", r4, t, (n, i2) => n - i2)).infixLeft("|", h.Union, (r4, e, t) => new ye(r4, t)).infixLeft("=", h.Equals, (r4, e, t) => new ot(r4, t)).infixLeft("!=", h.NotEquals, (r4, e, t) => new st(r4, t)).infixLeft("~", h.Equivalent, (r4, e, t) => new at(r4, t)).infixLeft("!~", h.NotEquivalent, (r4, e, t) => new ct(r4, t)).infixLeft("<", h.LessThan, (r4, e, t) => new I("<", r4, t, (n, i2) => n < i2)).infixLeft("<=", h.LessThanOrEquals, (r4, e, t) => new I("<=", r4, t, (n, i2) => n <= i2)).infixLeft(">", h.GreaterThan, (r4, e, t) => new I(">", r4, t, (n, i2) => n > i2)).infixLeft(">=", h.GreaterThanOrEquals, (r4, e, t) => new I(">=", r4, t, (n, i2) => n >= i2)).infixLeft("&", h.Ampersand, (r4, e, t) => new rt(r4, t)).infixLeft("and", h.And, (r4, e, t) => new ut(r4, t)).infixLeft("as", h.As, (r4, e, t) => new re(r4, t)).infixLeft("contains", h.Contains, (r4, e, t) => new nt(r4, t)).infixLeft("div", h.Divide, (r4, e, t) => new I("div", r4, t, (n, i2) => n / i2 | 0)).infixLeft("in", h.In, (r4, e, t) => new it(r4, t)).infixLeft("is", h.Is, (r4, e, t) => new ne(r4, t)).infixLeft("mod", h.Modulo, (r4, e, t) => new I("mod", r4, t, (n, i2) => n % i2)).infixLeft("or", h.Or, (r4, e, t) => new lt(r4, t)).infixLeft("xor", h.Xor, (r4, e, t) => new pt(r4, t)).infixLeft("implies", h.Implies, (r4, e, t) => new dt(r4, t));
|
|
37849
37849
|
}
|
|
37850
37850
|
var fo = Ae();
|
|
37851
37851
|
var En = ((p2) => (p2.BOOLEAN = "BOOLEAN", p2.NUMBER = "NUMBER", p2.QUANTITY = "QUANTITY", p2.TEXT = "TEXT", p2.REFERENCE = "REFERENCE", p2.CANONICAL = "CANONICAL", p2.DATE = "DATE", p2.DATETIME = "DATETIME", p2.PERIOD = "PERIOD", p2.UUID = "UUID", p2))(En || {});
|
|
37852
|
-
var To = ((
|
|
37853
|
-
var jo = ((
|
|
37852
|
+
var To = ((T) => (T.EQUALS = "eq", T.NOT_EQUALS = "ne", T.GREATER_THAN = "gt", T.LESS_THAN = "lt", T.GREATER_THAN_OR_EQUALS = "ge", T.LESS_THAN_OR_EQUALS = "le", T.STARTS_AFTER = "sa", T.ENDS_BEFORE = "eb", T.APPROXIMATELY = "ap", T.CONTAINS = "contains", T.EXACT = "exact", T.TEXT = "text", T.NOT = "not", T.ABOVE = "above", T.BELOW = "below", T.IN = "in", T.NOT_IN = "not-in", T.OF_TYPE = "of-type", T.MISSING = "missing", T.IDENTIFIER = "identifier", T.ITERATE = "iterate", T))(To || {});
|
|
37853
|
+
var jo = ((E2) => (E2.READ = "read", E2.VREAD = "vread", E2.UPDATE = "update", E2.PATCH = "patch", E2.DELETE = "delete", E2.HISTORY = "history", E2.HISTORY_INSTANCE = "history-instance", E2.HISTORY_TYPE = "history-type", E2.HISTORY_SYSTEM = "history-system", E2.CREATE = "create", E2.SEARCH = "search", E2.SEARCH_TYPE = "search-type", E2.SEARCH_SYSTEM = "search-system", E2.SEARCH_COMPARTMENT = "search-compartment", E2.CAPABILITIES = "capabilities", E2.TRANSACTION = "transaction", E2.BATCH = "batch", E2.OPERATION = "operation", E2))(jo || {});
|
|
37854
37854
|
function Vn(r4) {
|
|
37855
37855
|
if (typeof window < "u")
|
|
37856
37856
|
return window.atob(r4);
|
|
@@ -38663,11 +38663,11 @@ var vt = class extends ke {
|
|
|
38663
38663
|
return new Promise((a, c2) => {
|
|
38664
38664
|
let u2 = new XMLHttpRequest(), p2 = () => u2.abort();
|
|
38665
38665
|
s?.signal?.addEventListener("abort", p2);
|
|
38666
|
-
let
|
|
38667
|
-
s?.signal?.removeEventListener("abort", p2),
|
|
38666
|
+
let x = (v2) => {
|
|
38667
|
+
s?.signal?.removeEventListener("abort", p2), v2 instanceof Error ? c2(v2) : a(v2);
|
|
38668
38668
|
};
|
|
38669
|
-
u2.responseType = "json", u2.onabort = () =>
|
|
38670
|
-
u2.status >= 200 && u2.status < 300 ?
|
|
38669
|
+
u2.responseType = "json", u2.onabort = () => x(new Error("Request aborted")), u2.onerror = () => x(new Error("Request error")), o && (u2.upload.onprogress = (v2) => o(v2), u2.upload.onload = (v2) => o(v2)), u2.onload = () => {
|
|
38670
|
+
u2.status >= 200 && u2.status < 300 ? x(u2.response) : x(new d(Be(u2.response || u2.statusText)));
|
|
38671
38671
|
}, u2.open("POST", t), u2.withCredentials = true, u2.setRequestHeader("Authorization", "Bearer " + this.accessToken), u2.setRequestHeader("Cache-Control", "no-cache, no-store, max-age=0"), u2.setRequestHeader("Content-Type", i2), u2.setRequestHeader("X-Medplum", "extended"), u2.send(n);
|
|
38672
38672
|
});
|
|
38673
38673
|
}
|
|
@@ -38828,12 +38828,12 @@ var vt = class extends ke {
|
|
|
38828
38828
|
throw new d(Dr);
|
|
38829
38829
|
let u2 = await this.parseBody(s, c2), p2 = i2.redirect ?? this.options.redirect;
|
|
38830
38830
|
if ((s.status === 200 || s.status === 201) && p2 === "follow") {
|
|
38831
|
-
let
|
|
38832
|
-
if (
|
|
38833
|
-
return this.request("GET",
|
|
38831
|
+
let v2 = await Kn(s, u2);
|
|
38832
|
+
if (v2)
|
|
38833
|
+
return this.request("GET", v2, { ...i2, body: void 0 });
|
|
38834
38834
|
}
|
|
38835
|
-
let
|
|
38836
|
-
if (s.status === 202 &&
|
|
38835
|
+
let x = i2.headers?.Prefer;
|
|
38836
|
+
if (s.status === 202 && x === "respond-async") {
|
|
38837
38837
|
let Cr = await Kn(s, u2) ?? o.statusUrl;
|
|
38838
38838
|
if (Cr)
|
|
38839
38839
|
return this.pollStatus(Cr, i2, o);
|
|
@@ -39005,9 +39005,9 @@ var vt = class extends ke {
|
|
|
39005
39005
|
this.clearActiveLogin();
|
|
39006
39006
|
try {
|
|
39007
39007
|
let a = await o.json();
|
|
39008
|
-
throw new d(
|
|
39008
|
+
throw new d(b(a.error_description));
|
|
39009
39009
|
} catch (a) {
|
|
39010
|
-
throw new d(
|
|
39010
|
+
throw new d(b("Failed to fetch tokens"), a);
|
|
39011
39011
|
}
|
|
39012
39012
|
}
|
|
39013
39013
|
let s = await o.json();
|
|
@@ -39306,7 +39306,7 @@ var h2 = class extends i {
|
|
|
39306
39306
|
this.connection && (this.connection.close(), delete this.connection);
|
|
39307
39307
|
}
|
|
39308
39308
|
};
|
|
39309
|
-
var
|
|
39309
|
+
var E = class {
|
|
39310
39310
|
constructor(e) {
|
|
39311
39311
|
this.handler = e;
|
|
39312
39312
|
}
|
|
@@ -39460,7 +39460,7 @@ var AgentHl7Channel = class {
|
|
|
39460
39460
|
this.definition = definition;
|
|
39461
39461
|
this.endpoint = endpoint;
|
|
39462
39462
|
this.connections = /* @__PURE__ */ new Map();
|
|
39463
|
-
this.server = new
|
|
39463
|
+
this.server = new E((connection) => this.handleNewConnection(connection));
|
|
39464
39464
|
}
|
|
39465
39465
|
start() {
|
|
39466
39466
|
const address = new URL(this.endpoint.address);
|
|
@@ -39734,16 +39734,17 @@ IPv6 is currently unsupported.`;
|
|
|
39734
39734
|
|
|
39735
39735
|
${stderr}`);
|
|
39736
39736
|
}
|
|
39737
|
+
const result = stdout.trim();
|
|
39737
39738
|
this.log.info(`Ping result for ${message.remote}:
|
|
39738
39739
|
|
|
39739
|
-
${
|
|
39740
|
+
${result}`);
|
|
39740
39741
|
this.addToWebSocketQueue({
|
|
39741
39742
|
type: "agent:transmit:response",
|
|
39742
39743
|
channel: message.channel,
|
|
39743
39744
|
contentType: M.PING,
|
|
39744
39745
|
remote: message.remote,
|
|
39745
39746
|
callback: message.callback,
|
|
39746
|
-
body:
|
|
39747
|
+
body: result
|
|
39747
39748
|
});
|
|
39748
39749
|
} catch (err) {
|
|
39749
39750
|
this.log.error(`Error during ping attempt to ${message.remote ?? "NO_IP_GIVEN"}: ${di(err)}`);
|