@medplum/agent 3.2.1 → 3.2.3
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 +455 -453
- package/package.json +6 -6
package/dist/cjs/index.cjs
CHANGED
|
@@ -3686,7 +3686,7 @@ var require_stream = __commonJS({
|
|
|
3686
3686
|
this.emit("error", err);
|
|
3687
3687
|
}
|
|
3688
3688
|
}
|
|
3689
|
-
function createWebSocketStream2(
|
|
3689
|
+
function createWebSocketStream2(ws, options) {
|
|
3690
3690
|
let terminateOnDestroy = true;
|
|
3691
3691
|
const duplex = new Duplex({
|
|
3692
3692
|
...options,
|
|
@@ -3695,65 +3695,65 @@ var require_stream = __commonJS({
|
|
|
3695
3695
|
objectMode: false,
|
|
3696
3696
|
writableObjectMode: false
|
|
3697
3697
|
});
|
|
3698
|
-
|
|
3698
|
+
ws.on("message", function message(msg, isBinary) {
|
|
3699
3699
|
const data2 = !isBinary && duplex._readableState.objectMode ? msg.toString() : msg;
|
|
3700
|
-
if (!duplex.push(data2))
|
|
3700
|
+
if (!duplex.push(data2)) ws.pause();
|
|
3701
3701
|
});
|
|
3702
|
-
|
|
3702
|
+
ws.once("error", function error(err) {
|
|
3703
3703
|
if (duplex.destroyed) return;
|
|
3704
3704
|
terminateOnDestroy = false;
|
|
3705
3705
|
duplex.destroy(err);
|
|
3706
3706
|
});
|
|
3707
|
-
|
|
3707
|
+
ws.once("close", function close() {
|
|
3708
3708
|
if (duplex.destroyed) return;
|
|
3709
3709
|
duplex.push(null);
|
|
3710
3710
|
});
|
|
3711
3711
|
duplex._destroy = function(err, callback) {
|
|
3712
|
-
if (
|
|
3712
|
+
if (ws.readyState === ws.CLOSED) {
|
|
3713
3713
|
callback(err);
|
|
3714
3714
|
process.nextTick(emitClose, duplex);
|
|
3715
3715
|
return;
|
|
3716
3716
|
}
|
|
3717
3717
|
let called = false;
|
|
3718
|
-
|
|
3718
|
+
ws.once("error", function error(err2) {
|
|
3719
3719
|
called = true;
|
|
3720
3720
|
callback(err2);
|
|
3721
3721
|
});
|
|
3722
|
-
|
|
3722
|
+
ws.once("close", function close() {
|
|
3723
3723
|
if (!called) callback(err);
|
|
3724
3724
|
process.nextTick(emitClose, duplex);
|
|
3725
3725
|
});
|
|
3726
|
-
if (terminateOnDestroy)
|
|
3726
|
+
if (terminateOnDestroy) ws.terminate();
|
|
3727
3727
|
};
|
|
3728
3728
|
duplex._final = function(callback) {
|
|
3729
|
-
if (
|
|
3730
|
-
|
|
3729
|
+
if (ws.readyState === ws.CONNECTING) {
|
|
3730
|
+
ws.once("open", function open() {
|
|
3731
3731
|
duplex._final(callback);
|
|
3732
3732
|
});
|
|
3733
3733
|
return;
|
|
3734
3734
|
}
|
|
3735
|
-
if (
|
|
3736
|
-
if (
|
|
3735
|
+
if (ws._socket === null) return;
|
|
3736
|
+
if (ws._socket._writableState.finished) {
|
|
3737
3737
|
callback();
|
|
3738
3738
|
if (duplex._readableState.endEmitted) duplex.destroy();
|
|
3739
3739
|
} else {
|
|
3740
|
-
|
|
3740
|
+
ws._socket.once("finish", function finish() {
|
|
3741
3741
|
callback();
|
|
3742
3742
|
});
|
|
3743
|
-
|
|
3743
|
+
ws.close();
|
|
3744
3744
|
}
|
|
3745
3745
|
};
|
|
3746
3746
|
duplex._read = function() {
|
|
3747
|
-
if (
|
|
3747
|
+
if (ws.isPaused) ws.resume();
|
|
3748
3748
|
};
|
|
3749
3749
|
duplex._write = function(chunk, encoding, callback) {
|
|
3750
|
-
if (
|
|
3751
|
-
|
|
3750
|
+
if (ws.readyState === ws.CONNECTING) {
|
|
3751
|
+
ws.once("open", function open() {
|
|
3752
3752
|
duplex._write(chunk, encoding, callback);
|
|
3753
3753
|
});
|
|
3754
3754
|
return;
|
|
3755
3755
|
}
|
|
3756
|
-
|
|
3756
|
+
ws.send(chunk, callback);
|
|
3757
3757
|
};
|
|
3758
3758
|
duplex.on("end", duplexOnEnd);
|
|
3759
3759
|
duplex.on("error", duplexOnError);
|
|
@@ -7189,12 +7189,12 @@ var require_websocket_server = __commonJS({
|
|
|
7189
7189
|
"Connection: Upgrade",
|
|
7190
7190
|
`Sec-WebSocket-Accept: ${digest}`
|
|
7191
7191
|
];
|
|
7192
|
-
const
|
|
7192
|
+
const ws = new this.options.WebSocket(null, void 0, this.options);
|
|
7193
7193
|
if (protocols.size) {
|
|
7194
7194
|
const protocol = this.options.handleProtocols ? this.options.handleProtocols(protocols, req) : protocols.values().next().value;
|
|
7195
7195
|
if (protocol) {
|
|
7196
7196
|
headers.push(`Sec-WebSocket-Protocol: ${protocol}`);
|
|
7197
|
-
|
|
7197
|
+
ws._protocol = protocol;
|
|
7198
7198
|
}
|
|
7199
7199
|
}
|
|
7200
7200
|
if (extensions[PerMessageDeflate.extensionName]) {
|
|
@@ -7203,26 +7203,26 @@ var require_websocket_server = __commonJS({
|
|
|
7203
7203
|
[PerMessageDeflate.extensionName]: [params]
|
|
7204
7204
|
});
|
|
7205
7205
|
headers.push(`Sec-WebSocket-Extensions: ${value}`);
|
|
7206
|
-
|
|
7206
|
+
ws._extensions = extensions;
|
|
7207
7207
|
}
|
|
7208
7208
|
this.emit("headers", headers, req);
|
|
7209
7209
|
socket.write(headers.concat("\r\n").join("\r\n"));
|
|
7210
7210
|
socket.removeListener("error", socketOnError);
|
|
7211
|
-
|
|
7211
|
+
ws.setSocket(socket, head, {
|
|
7212
7212
|
allowSynchronousEvents: this.options.allowSynchronousEvents,
|
|
7213
7213
|
maxPayload: this.options.maxPayload,
|
|
7214
7214
|
skipUTF8Validation: this.options.skipUTF8Validation
|
|
7215
7215
|
});
|
|
7216
7216
|
if (this.clients) {
|
|
7217
|
-
this.clients.add(
|
|
7218
|
-
|
|
7219
|
-
this.clients.delete(
|
|
7217
|
+
this.clients.add(ws);
|
|
7218
|
+
ws.on("close", () => {
|
|
7219
|
+
this.clients.delete(ws);
|
|
7220
7220
|
if (this._shouldEmitClose && !this.clients.size) {
|
|
7221
7221
|
process.nextTick(emitClose, this);
|
|
7222
7222
|
}
|
|
7223
7223
|
});
|
|
7224
7224
|
}
|
|
7225
|
-
cb(
|
|
7225
|
+
cb(ws, req);
|
|
7226
7226
|
}
|
|
7227
7227
|
};
|
|
7228
7228
|
module2.exports = WebSocketServer2;
|
|
@@ -7387,9 +7387,9 @@ var require_dcmjs = __commonJS({
|
|
|
7387
7387
|
}
|
|
7388
7388
|
interpolate(level) {
|
|
7389
7389
|
return this.options.template.replace(/{{([^{}]*)}}/g, (stache, prop) => {
|
|
7390
|
-
const
|
|
7391
|
-
if (
|
|
7392
|
-
return
|
|
7390
|
+
const fn = this.options[prop];
|
|
7391
|
+
if (fn) {
|
|
7392
|
+
return fn({ level, logger: this.logger });
|
|
7393
7393
|
}
|
|
7394
7394
|
return stache;
|
|
7395
7395
|
});
|
|
@@ -7667,8 +7667,8 @@ var require_dcmjs = __commonJS({
|
|
|
7667
7667
|
}
|
|
7668
7668
|
return _construct.apply(null, arguments);
|
|
7669
7669
|
}
|
|
7670
|
-
function _isNativeFunction(
|
|
7671
|
-
return Function.toString.call(
|
|
7670
|
+
function _isNativeFunction(fn) {
|
|
7671
|
+
return Function.toString.call(fn).indexOf("[native code]") !== -1;
|
|
7672
7672
|
}
|
|
7673
7673
|
function _wrapNativeSuper(Class) {
|
|
7674
7674
|
var _cache = typeof Map === "function" ? /* @__PURE__ */ new Map() : void 0;
|
|
@@ -7762,14 +7762,14 @@ var require_dcmjs = __commonJS({
|
|
|
7762
7762
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
7763
7763
|
}
|
|
7764
7764
|
function _iterableToArrayLimit(arr, i) {
|
|
7765
|
-
var
|
|
7766
|
-
if (
|
|
7765
|
+
var _i2 = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
7766
|
+
if (_i2 == null) return;
|
|
7767
7767
|
var _arr = [];
|
|
7768
|
-
var
|
|
7768
|
+
var _n = true;
|
|
7769
7769
|
var _d = false;
|
|
7770
7770
|
var _s2, _e2;
|
|
7771
7771
|
try {
|
|
7772
|
-
for (
|
|
7772
|
+
for (_i2 = _i2.call(arr); !(_n = (_s2 = _i2.next()).done); _n = true) {
|
|
7773
7773
|
_arr.push(_s2.value);
|
|
7774
7774
|
if (i && _arr.length === i) break;
|
|
7775
7775
|
}
|
|
@@ -7778,7 +7778,7 @@ var require_dcmjs = __commonJS({
|
|
|
7778
7778
|
_e2 = err2;
|
|
7779
7779
|
} finally {
|
|
7780
7780
|
try {
|
|
7781
|
-
if (!
|
|
7781
|
+
if (!_n && _i2["return"] != null) _i2["return"]();
|
|
7782
7782
|
} finally {
|
|
7783
7783
|
if (_d) throw _e2;
|
|
7784
7784
|
}
|
|
@@ -17738,9 +17738,9 @@ var require_dcmjs = __commonJS({
|
|
|
17738
17738
|
NumberOfFrames += referencedFramesPerSegment[i].length;
|
|
17739
17739
|
}
|
|
17740
17740
|
seg.setNumberOfFrames(NumberOfFrames);
|
|
17741
|
-
for (var
|
|
17742
|
-
var segmentIndex = segmentIndicies[
|
|
17743
|
-
var referencedFrameIndicies = referencedFramesPerSegment[
|
|
17741
|
+
for (var _i2 = 0; _i2 < segmentIndicies.length; _i2++) {
|
|
17742
|
+
var segmentIndex = segmentIndicies[_i2];
|
|
17743
|
+
var referencedFrameIndicies = referencedFramesPerSegment[_i2];
|
|
17744
17744
|
var referencedFrameNumbers = referencedFrameIndicies.map(function(element) {
|
|
17745
17745
|
return element + 1;
|
|
17746
17746
|
});
|
|
@@ -18305,7 +18305,7 @@ var require_dcmjs = __commonJS({
|
|
|
18305
18305
|
var sqrLen = squaredLength;
|
|
18306
18306
|
var forEach = function() {
|
|
18307
18307
|
var vec = create();
|
|
18308
|
-
return function(a2, stride, offset, count,
|
|
18308
|
+
return function(a2, stride, offset, count, fn, arg) {
|
|
18309
18309
|
var i, l3;
|
|
18310
18310
|
if (!stride) {
|
|
18311
18311
|
stride = 3;
|
|
@@ -18322,7 +18322,7 @@ var require_dcmjs = __commonJS({
|
|
|
18322
18322
|
vec[0] = a2[i];
|
|
18323
18323
|
vec[1] = a2[i + 1];
|
|
18324
18324
|
vec[2] = a2[i + 2];
|
|
18325
|
-
|
|
18325
|
+
fn(vec, vec, arg);
|
|
18326
18326
|
a2[i] = vec[0];
|
|
18327
18327
|
a2[i + 1] = vec[1];
|
|
18328
18328
|
a2[i + 2] = vec[2];
|
|
@@ -18420,11 +18420,11 @@ var require_dcmjs = __commonJS({
|
|
|
18420
18420
|
var bodyLength = rleArray.length % 2 === 0 ? rleArray.length : rleArray.length + 1;
|
|
18421
18421
|
var encodedFrameBuffer = new ArrayBuffer(headerLength + bodyLength);
|
|
18422
18422
|
var headerView = new Uint32Array(encodedFrameBuffer, 0, 16);
|
|
18423
|
-
for (var _i = 0; _i < headerView.length; _i++) {
|
|
18424
|
-
headerView[_i] = header[_i];
|
|
18425
|
-
}
|
|
18426
18423
|
for (var _i2 = 0; _i2 < headerView.length; _i2++) {
|
|
18427
|
-
|
|
18424
|
+
headerView[_i2] = header[_i2];
|
|
18425
|
+
}
|
|
18426
|
+
for (var _i22 = 0; _i22 < headerView.length; _i22++) {
|
|
18427
|
+
rleArray.push(headerView[_i22]);
|
|
18428
18428
|
}
|
|
18429
18429
|
var bodyView = new Uint8Array(encodedFrameBuffer, 64);
|
|
18430
18430
|
for (var _i3 = 0; _i3 < rleArray.length; _i3++) {
|
|
@@ -19125,20 +19125,20 @@ var require_dcmjs = __commonJS({
|
|
|
19125
19125
|
referencedFramesPerSegment2[i] = [];
|
|
19126
19126
|
}
|
|
19127
19127
|
}
|
|
19128
|
-
var _loop22 = function _loop23(
|
|
19129
|
-
var labelmap2D = labelmaps2D[
|
|
19130
|
-
if (labelmaps2D[
|
|
19128
|
+
var _loop22 = function _loop23(_i3) {
|
|
19129
|
+
var labelmap2D = labelmaps2D[_i3];
|
|
19130
|
+
if (labelmaps2D[_i3]) {
|
|
19131
19131
|
var segmentsOnLabelmap = labelmap2D.segmentsOnLabelmap;
|
|
19132
19132
|
segmentsOnLabelmap.forEach(function(segmentIndex2) {
|
|
19133
19133
|
if (segmentIndex2 !== 0) {
|
|
19134
|
-
referencedFramesPerSegment2[segmentIndex2].push(
|
|
19134
|
+
referencedFramesPerSegment2[segmentIndex2].push(_i3);
|
|
19135
19135
|
numberOfFrames++;
|
|
19136
19136
|
}
|
|
19137
19137
|
});
|
|
19138
19138
|
}
|
|
19139
19139
|
};
|
|
19140
|
-
for (var
|
|
19141
|
-
_loop22(
|
|
19140
|
+
for (var _i2 = 0; _i2 < labelmaps2D.length; _i2++) {
|
|
19141
|
+
_loop22(_i2);
|
|
19142
19142
|
}
|
|
19143
19143
|
referencedFramesPerLabelmap[labelmapIndex2] = referencedFramesPerSegment2;
|
|
19144
19144
|
};
|
|
@@ -24793,11 +24793,11 @@ var require_once = __commonJS({
|
|
|
24793
24793
|
value: true
|
|
24794
24794
|
});
|
|
24795
24795
|
exports2.default = once;
|
|
24796
|
-
function once(
|
|
24796
|
+
function once(fn) {
|
|
24797
24797
|
return function() {
|
|
24798
|
-
if (
|
|
24799
|
-
var callFn =
|
|
24800
|
-
|
|
24798
|
+
if (fn === null) return;
|
|
24799
|
+
var callFn = fn;
|
|
24800
|
+
fn = null;
|
|
24801
24801
|
callFn.apply(this, arguments);
|
|
24802
24802
|
};
|
|
24803
24803
|
}
|
|
@@ -25337,11 +25337,11 @@ var require_onlyOnce = __commonJS({
|
|
|
25337
25337
|
value: true
|
|
25338
25338
|
});
|
|
25339
25339
|
exports2.default = onlyOnce;
|
|
25340
|
-
function onlyOnce(
|
|
25340
|
+
function onlyOnce(fn) {
|
|
25341
25341
|
return function() {
|
|
25342
|
-
if (
|
|
25343
|
-
var callFn =
|
|
25344
|
-
|
|
25342
|
+
if (fn === null) throw new Error("Callback was already called.");
|
|
25343
|
+
var callFn = fn;
|
|
25344
|
+
fn = null;
|
|
25345
25345
|
callFn.apply(this, arguments);
|
|
25346
25346
|
};
|
|
25347
25347
|
}
|
|
@@ -25472,11 +25472,11 @@ var require_initialParams = __commonJS({
|
|
|
25472
25472
|
Object.defineProperty(exports2, "__esModule", {
|
|
25473
25473
|
value: true
|
|
25474
25474
|
});
|
|
25475
|
-
exports2.default = function(
|
|
25475
|
+
exports2.default = function(fn) {
|
|
25476
25476
|
return function() {
|
|
25477
25477
|
var args = (0, _slice2.default)(arguments);
|
|
25478
25478
|
var callback = args.pop();
|
|
25479
|
-
|
|
25479
|
+
fn.call(this, args, callback);
|
|
25480
25480
|
};
|
|
25481
25481
|
};
|
|
25482
25482
|
var _slice = require_slice();
|
|
@@ -25505,14 +25505,14 @@ var require_setImmediate = __commonJS({
|
|
|
25505
25505
|
}
|
|
25506
25506
|
var hasSetImmediate = exports2.hasSetImmediate = typeof setImmediate === "function" && setImmediate;
|
|
25507
25507
|
var hasNextTick = exports2.hasNextTick = typeof process === "object" && typeof process.nextTick === "function";
|
|
25508
|
-
function fallback(
|
|
25509
|
-
setTimeout(
|
|
25508
|
+
function fallback(fn) {
|
|
25509
|
+
setTimeout(fn, 0);
|
|
25510
25510
|
}
|
|
25511
25511
|
function wrap(defer) {
|
|
25512
|
-
return function(
|
|
25512
|
+
return function(fn) {
|
|
25513
25513
|
var args = (0, _slice2.default)(arguments, 1);
|
|
25514
25514
|
defer(function() {
|
|
25515
|
-
|
|
25515
|
+
fn.apply(null, args);
|
|
25516
25516
|
});
|
|
25517
25517
|
};
|
|
25518
25518
|
}
|
|
@@ -25592,8 +25592,8 @@ var require_wrapAsync = __commonJS({
|
|
|
25592
25592
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
25593
25593
|
}
|
|
25594
25594
|
var supportsSymbol = typeof Symbol === "function";
|
|
25595
|
-
function isAsync(
|
|
25596
|
-
return supportsSymbol &&
|
|
25595
|
+
function isAsync(fn) {
|
|
25596
|
+
return supportsSymbol && fn[Symbol.toStringTag] === "AsyncFunction";
|
|
25597
25597
|
}
|
|
25598
25598
|
function wrapAsync(asyncFn) {
|
|
25599
25599
|
return isAsync(asyncFn) ? (0, _asyncify2.default)(asyncFn) : asyncFn;
|
|
@@ -25635,9 +25635,9 @@ var require_doLimit = __commonJS({
|
|
|
25635
25635
|
value: true
|
|
25636
25636
|
});
|
|
25637
25637
|
exports2.default = doLimit;
|
|
25638
|
-
function doLimit(
|
|
25638
|
+
function doLimit(fn, limit) {
|
|
25639
25639
|
return function(iterable, iteratee, callback) {
|
|
25640
|
-
return
|
|
25640
|
+
return fn(iterable, limit, iteratee, callback);
|
|
25641
25641
|
};
|
|
25642
25642
|
}
|
|
25643
25643
|
module2.exports = exports2["default"];
|
|
@@ -25689,17 +25689,17 @@ var require_AsyncEventEmitter = __commonJS({
|
|
|
25689
25689
|
callback = void 0;
|
|
25690
25690
|
}
|
|
25691
25691
|
listeners = Array.isArray(listeners) ? listeners : [listeners];
|
|
25692
|
-
eachSeries(listeners.slice(), function(
|
|
25692
|
+
eachSeries(listeners.slice(), function(fn, next) {
|
|
25693
25693
|
var err;
|
|
25694
|
-
if (
|
|
25694
|
+
if (fn.length < 2) {
|
|
25695
25695
|
try {
|
|
25696
|
-
|
|
25696
|
+
fn.call(self2, data2);
|
|
25697
25697
|
} catch (e) {
|
|
25698
25698
|
err = e;
|
|
25699
25699
|
}
|
|
25700
25700
|
return next(err);
|
|
25701
25701
|
}
|
|
25702
|
-
|
|
25702
|
+
fn.call(self2, data2, next);
|
|
25703
25703
|
}, callback);
|
|
25704
25704
|
return self2;
|
|
25705
25705
|
};
|
|
@@ -29501,8 +29501,8 @@ var require_fecha_umd = __commonJS({
|
|
|
29501
29501
|
};
|
|
29502
29502
|
function assign(origObj) {
|
|
29503
29503
|
var args = [];
|
|
29504
|
-
for (var
|
|
29505
|
-
args[
|
|
29504
|
+
for (var _i2 = 1; _i2 < arguments.length; _i2++) {
|
|
29505
|
+
args[_i2 - 1] = arguments[_i2];
|
|
29506
29506
|
}
|
|
29507
29507
|
for (var _a = 0, args_1 = args; _a < args_1.length; _a++) {
|
|
29508
29508
|
var obj = args_1[_a];
|
|
@@ -30034,7 +30034,7 @@ var require_package = __commonJS({
|
|
|
30034
30034
|
module2.exports = {
|
|
30035
30035
|
name: "winston",
|
|
30036
30036
|
description: "A logger for just about everything.",
|
|
30037
|
-
version: "3.13.
|
|
30037
|
+
version: "3.13.1",
|
|
30038
30038
|
author: "Charlie Robbins <charlie.robbins@gmail.com>",
|
|
30039
30039
|
maintainers: [
|
|
30040
30040
|
"David Hyde <dabh@alumni.stanford.edu>"
|
|
@@ -30061,7 +30061,7 @@ var require_package = __commonJS({
|
|
|
30061
30061
|
"@colors/colors": "^1.6.0",
|
|
30062
30062
|
async: "^3.2.3",
|
|
30063
30063
|
"is-stream": "^2.0.0",
|
|
30064
|
-
logform: "^2.
|
|
30064
|
+
logform: "^2.6.0",
|
|
30065
30065
|
"one-time": "^1.0.0",
|
|
30066
30066
|
"readable-stream": "^3.4.0",
|
|
30067
30067
|
"safe-stable-stringify": "^2.3.1",
|
|
@@ -30073,7 +30073,7 @@ var require_package = __commonJS({
|
|
|
30073
30073
|
"@babel/cli": "^7.23.9",
|
|
30074
30074
|
"@babel/core": "^7.24.0",
|
|
30075
30075
|
"@babel/preset-env": "^7.24.0",
|
|
30076
|
-
"@dabh/eslint-config-populist": "^
|
|
30076
|
+
"@dabh/eslint-config-populist": "^4.4.0",
|
|
30077
30077
|
"@types/node": "^20.11.24",
|
|
30078
30078
|
"abstract-winston-transport": "^0.5.1",
|
|
30079
30079
|
assume: "^2.2.0",
|
|
@@ -30082,7 +30082,7 @@ var require_package = __commonJS({
|
|
|
30082
30082
|
hock: "^1.4.1",
|
|
30083
30083
|
mocha: "^10.3.0",
|
|
30084
30084
|
nyc: "^15.1.0",
|
|
30085
|
-
rimraf: "
|
|
30085
|
+
rimraf: "5.0.1",
|
|
30086
30086
|
split2: "^4.1.0",
|
|
30087
30087
|
"std-mocks": "^2.0.0",
|
|
30088
30088
|
through2: "^4.0.2",
|
|
@@ -31214,11 +31214,11 @@ var require_from = __commonJS({
|
|
|
31214
31214
|
Promise.resolve(value).then(_next, _throw);
|
|
31215
31215
|
}
|
|
31216
31216
|
}
|
|
31217
|
-
function _asyncToGenerator(
|
|
31217
|
+
function _asyncToGenerator(fn) {
|
|
31218
31218
|
return function() {
|
|
31219
31219
|
var self2 = this, args = arguments;
|
|
31220
31220
|
return new Promise(function(resolve2, reject) {
|
|
31221
|
-
var gen =
|
|
31221
|
+
var gen = fn.apply(self2, args);
|
|
31222
31222
|
function _next(value) {
|
|
31223
31223
|
asyncGeneratorStep(gen, resolve2, reject, _next, _throw, "next", value);
|
|
31224
31224
|
}
|
|
@@ -31361,11 +31361,11 @@ var require_stream_readable = __commonJS({
|
|
|
31361
31361
|
require_inherits()(Readable2, Stream);
|
|
31362
31362
|
var errorOrDestroy = destroyImpl.errorOrDestroy;
|
|
31363
31363
|
var kProxyEvents = ["error", "close", "destroy", "pause", "resume"];
|
|
31364
|
-
function prependListener(emitter, event,
|
|
31365
|
-
if (typeof emitter.prependListener === "function") return emitter.prependListener(event,
|
|
31366
|
-
if (!emitter._events || !emitter._events[event]) emitter.on(event,
|
|
31367
|
-
else if (Array.isArray(emitter._events[event])) emitter._events[event].unshift(
|
|
31368
|
-
else emitter._events[event] = [
|
|
31364
|
+
function prependListener(emitter, event, fn) {
|
|
31365
|
+
if (typeof emitter.prependListener === "function") return emitter.prependListener(event, fn);
|
|
31366
|
+
if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);
|
|
31367
|
+
else if (Array.isArray(emitter._events[event])) emitter._events[event].unshift(fn);
|
|
31368
|
+
else emitter._events[event] = [fn, emitter._events[event]];
|
|
31369
31369
|
}
|
|
31370
31370
|
function ReadableState(options, stream, isDuplex) {
|
|
31371
31371
|
Duplex = Duplex || require_stream_duplex();
|
|
@@ -31813,8 +31813,8 @@ var require_stream_readable = __commonJS({
|
|
|
31813
31813
|
dest.emit("unpipe", this, unpipeInfo);
|
|
31814
31814
|
return this;
|
|
31815
31815
|
};
|
|
31816
|
-
Readable2.prototype.on = function(ev,
|
|
31817
|
-
var res = Stream.prototype.on.call(this, ev,
|
|
31816
|
+
Readable2.prototype.on = function(ev, fn) {
|
|
31817
|
+
var res = Stream.prototype.on.call(this, ev, fn);
|
|
31818
31818
|
var state = this._readableState;
|
|
31819
31819
|
if (ev === "data") {
|
|
31820
31820
|
state.readableListening = this.listenerCount("readable") > 0;
|
|
@@ -31835,8 +31835,8 @@ var require_stream_readable = __commonJS({
|
|
|
31835
31835
|
return res;
|
|
31836
31836
|
};
|
|
31837
31837
|
Readable2.prototype.addListener = Readable2.prototype.on;
|
|
31838
|
-
Readable2.prototype.removeListener = function(ev,
|
|
31839
|
-
var res = Stream.prototype.removeListener.call(this, ev,
|
|
31838
|
+
Readable2.prototype.removeListener = function(ev, fn) {
|
|
31839
|
+
var res = Stream.prototype.removeListener.call(this, ev, fn);
|
|
31840
31840
|
if (ev === "readable") {
|
|
31841
31841
|
process.nextTick(updateReadableListening, this);
|
|
31842
31842
|
}
|
|
@@ -32041,9 +32041,9 @@ var require_stream_readable = __commonJS({
|
|
|
32041
32041
|
return from(Readable2, iterable, opts);
|
|
32042
32042
|
};
|
|
32043
32043
|
}
|
|
32044
|
-
function indexOf(
|
|
32045
|
-
for (var i = 0, l3 =
|
|
32046
|
-
if (
|
|
32044
|
+
function indexOf(xs, x3) {
|
|
32045
|
+
for (var i = 0, l3 = xs.length; i < l3; i++) {
|
|
32046
|
+
if (xs[i] === x3) return i;
|
|
32047
32047
|
}
|
|
32048
32048
|
return -1;
|
|
32049
32049
|
}
|
|
@@ -32909,10 +32909,10 @@ var require_initialParams2 = __commonJS({
|
|
|
32909
32909
|
Object.defineProperty(exports2, "__esModule", {
|
|
32910
32910
|
value: true
|
|
32911
32911
|
});
|
|
32912
|
-
exports2.default = function(
|
|
32912
|
+
exports2.default = function(fn) {
|
|
32913
32913
|
return function(...args) {
|
|
32914
32914
|
var callback = args.pop();
|
|
32915
|
-
return
|
|
32915
|
+
return fn.call(this, args, callback);
|
|
32916
32916
|
};
|
|
32917
32917
|
};
|
|
32918
32918
|
module2.exports = exports2.default;
|
|
@@ -32931,11 +32931,11 @@ var require_setImmediate2 = __commonJS({
|
|
|
32931
32931
|
var hasQueueMicrotask = exports2.hasQueueMicrotask = typeof queueMicrotask === "function" && queueMicrotask;
|
|
32932
32932
|
var hasSetImmediate = exports2.hasSetImmediate = typeof setImmediate === "function" && setImmediate;
|
|
32933
32933
|
var hasNextTick = exports2.hasNextTick = typeof process === "object" && typeof process.nextTick === "function";
|
|
32934
|
-
function fallback(
|
|
32935
|
-
setTimeout(
|
|
32934
|
+
function fallback(fn) {
|
|
32935
|
+
setTimeout(fn, 0);
|
|
32936
32936
|
}
|
|
32937
32937
|
function wrap(defer) {
|
|
32938
|
-
return (
|
|
32938
|
+
return (fn, ...args) => defer(() => fn(...args));
|
|
32939
32939
|
}
|
|
32940
32940
|
var _defer;
|
|
32941
32941
|
if (hasQueueMicrotask) {
|
|
@@ -33022,11 +33022,11 @@ var require_wrapAsync2 = __commonJS({
|
|
|
33022
33022
|
function _interopRequireDefault(obj) {
|
|
33023
33023
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
33024
33024
|
}
|
|
33025
|
-
function isAsync(
|
|
33026
|
-
return
|
|
33025
|
+
function isAsync(fn) {
|
|
33026
|
+
return fn[Symbol.toStringTag] === "AsyncFunction";
|
|
33027
33027
|
}
|
|
33028
|
-
function isAsyncGenerator(
|
|
33029
|
-
return
|
|
33028
|
+
function isAsyncGenerator(fn) {
|
|
33029
|
+
return fn[Symbol.toStringTag] === "AsyncGenerator";
|
|
33030
33030
|
}
|
|
33031
33031
|
function isAsyncIterable(obj) {
|
|
33032
33032
|
return typeof obj[Symbol.asyncIterator] === "function";
|
|
@@ -33111,14 +33111,14 @@ var require_once2 = __commonJS({
|
|
|
33111
33111
|
value: true
|
|
33112
33112
|
});
|
|
33113
33113
|
exports2.default = once;
|
|
33114
|
-
function once(
|
|
33114
|
+
function once(fn) {
|
|
33115
33115
|
function wrapper(...args) {
|
|
33116
|
-
if (
|
|
33117
|
-
var callFn =
|
|
33118
|
-
|
|
33116
|
+
if (fn === null) return;
|
|
33117
|
+
var callFn = fn;
|
|
33118
|
+
fn = null;
|
|
33119
33119
|
callFn.apply(this, args);
|
|
33120
33120
|
}
|
|
33121
|
-
Object.assign(wrapper,
|
|
33121
|
+
Object.assign(wrapper, fn);
|
|
33122
33122
|
return wrapper;
|
|
33123
33123
|
}
|
|
33124
33124
|
module2.exports = exports2.default;
|
|
@@ -33201,11 +33201,11 @@ var require_onlyOnce2 = __commonJS({
|
|
|
33201
33201
|
value: true
|
|
33202
33202
|
});
|
|
33203
33203
|
exports2.default = onlyOnce;
|
|
33204
|
-
function onlyOnce(
|
|
33204
|
+
function onlyOnce(fn) {
|
|
33205
33205
|
return function(...args) {
|
|
33206
|
-
if (
|
|
33207
|
-
var callFn =
|
|
33208
|
-
|
|
33206
|
+
if (fn === null) throw new Error("Callback was already called.");
|
|
33207
|
+
var callFn = fn;
|
|
33208
|
+
fn = null;
|
|
33209
33209
|
callFn.apply(this, args);
|
|
33210
33210
|
};
|
|
33211
33211
|
}
|
|
@@ -34757,11 +34757,11 @@ var require_from2 = __commonJS({
|
|
|
34757
34757
|
Promise.resolve(value).then(_next, _throw);
|
|
34758
34758
|
}
|
|
34759
34759
|
}
|
|
34760
|
-
function _asyncToGenerator(
|
|
34760
|
+
function _asyncToGenerator(fn) {
|
|
34761
34761
|
return function() {
|
|
34762
34762
|
var self2 = this, args = arguments;
|
|
34763
34763
|
return new Promise(function(resolve2, reject) {
|
|
34764
|
-
var gen =
|
|
34764
|
+
var gen = fn.apply(self2, args);
|
|
34765
34765
|
function _next(value) {
|
|
34766
34766
|
asyncGeneratorStep(gen, resolve2, reject, _next, _throw, "next", value);
|
|
34767
34767
|
}
|
|
@@ -34904,11 +34904,11 @@ var require_stream_readable2 = __commonJS({
|
|
|
34904
34904
|
require_inherits()(Readable2, Stream);
|
|
34905
34905
|
var errorOrDestroy = destroyImpl.errorOrDestroy;
|
|
34906
34906
|
var kProxyEvents = ["error", "close", "destroy", "pause", "resume"];
|
|
34907
|
-
function prependListener(emitter, event,
|
|
34908
|
-
if (typeof emitter.prependListener === "function") return emitter.prependListener(event,
|
|
34909
|
-
if (!emitter._events || !emitter._events[event]) emitter.on(event,
|
|
34910
|
-
else if (Array.isArray(emitter._events[event])) emitter._events[event].unshift(
|
|
34911
|
-
else emitter._events[event] = [
|
|
34907
|
+
function prependListener(emitter, event, fn) {
|
|
34908
|
+
if (typeof emitter.prependListener === "function") return emitter.prependListener(event, fn);
|
|
34909
|
+
if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);
|
|
34910
|
+
else if (Array.isArray(emitter._events[event])) emitter._events[event].unshift(fn);
|
|
34911
|
+
else emitter._events[event] = [fn, emitter._events[event]];
|
|
34912
34912
|
}
|
|
34913
34913
|
function ReadableState(options, stream, isDuplex) {
|
|
34914
34914
|
Duplex = Duplex || require_stream_duplex2();
|
|
@@ -35356,8 +35356,8 @@ var require_stream_readable2 = __commonJS({
|
|
|
35356
35356
|
dest.emit("unpipe", this, unpipeInfo);
|
|
35357
35357
|
return this;
|
|
35358
35358
|
};
|
|
35359
|
-
Readable2.prototype.on = function(ev,
|
|
35360
|
-
var res = Stream.prototype.on.call(this, ev,
|
|
35359
|
+
Readable2.prototype.on = function(ev, fn) {
|
|
35360
|
+
var res = Stream.prototype.on.call(this, ev, fn);
|
|
35361
35361
|
var state = this._readableState;
|
|
35362
35362
|
if (ev === "data") {
|
|
35363
35363
|
state.readableListening = this.listenerCount("readable") > 0;
|
|
@@ -35378,8 +35378,8 @@ var require_stream_readable2 = __commonJS({
|
|
|
35378
35378
|
return res;
|
|
35379
35379
|
};
|
|
35380
35380
|
Readable2.prototype.addListener = Readable2.prototype.on;
|
|
35381
|
-
Readable2.prototype.removeListener = function(ev,
|
|
35382
|
-
var res = Stream.prototype.removeListener.call(this, ev,
|
|
35381
|
+
Readable2.prototype.removeListener = function(ev, fn) {
|
|
35382
|
+
var res = Stream.prototype.removeListener.call(this, ev, fn);
|
|
35383
35383
|
if (ev === "readable") {
|
|
35384
35384
|
process.nextTick(updateReadableListening, this);
|
|
35385
35385
|
}
|
|
@@ -35584,9 +35584,9 @@ var require_stream_readable2 = __commonJS({
|
|
|
35584
35584
|
return from(Readable2, iterable, opts);
|
|
35585
35585
|
};
|
|
35586
35586
|
}
|
|
35587
|
-
function indexOf(
|
|
35588
|
-
for (var i = 0, l3 =
|
|
35589
|
-
if (
|
|
35587
|
+
function indexOf(xs, x3) {
|
|
35588
|
+
for (var i = 0, l3 = xs.length; i < l3; i++) {
|
|
35589
|
+
if (xs[i] === x3) return i;
|
|
35590
35590
|
}
|
|
35591
35591
|
return -1;
|
|
35592
35592
|
}
|
|
@@ -35758,8 +35758,8 @@ var require_pipeline = __commonJS({
|
|
|
35758
35758
|
callback(err || new ERR_STREAM_DESTROYED("pipe"));
|
|
35759
35759
|
};
|
|
35760
35760
|
}
|
|
35761
|
-
function call(
|
|
35762
|
-
|
|
35761
|
+
function call(fn) {
|
|
35762
|
+
fn();
|
|
35763
35763
|
}
|
|
35764
35764
|
function pipe(from, to2) {
|
|
35765
35765
|
return from.pipe(to2);
|
|
@@ -35847,17 +35847,17 @@ var require_diagnostics = __commonJS({
|
|
|
35847
35847
|
if (!async.length) return false;
|
|
35848
35848
|
return new Promise(function pinky(resolve2) {
|
|
35849
35849
|
Promise.all(
|
|
35850
|
-
async.map(function prebind(
|
|
35851
|
-
return
|
|
35850
|
+
async.map(function prebind(fn) {
|
|
35851
|
+
return fn(namespace);
|
|
35852
35852
|
})
|
|
35853
35853
|
).then(function resolved(values) {
|
|
35854
35854
|
resolve2(values.some(Boolean));
|
|
35855
35855
|
});
|
|
35856
35856
|
});
|
|
35857
35857
|
}
|
|
35858
|
-
function modify(
|
|
35859
|
-
if (~modifiers.indexOf(
|
|
35860
|
-
modifiers.push(
|
|
35858
|
+
function modify(fn) {
|
|
35859
|
+
if (~modifiers.indexOf(fn)) return false;
|
|
35860
|
+
modifiers.push(fn);
|
|
35861
35861
|
return true;
|
|
35862
35862
|
}
|
|
35863
35863
|
function write() {
|
|
@@ -35869,14 +35869,14 @@ var require_diagnostics = __commonJS({
|
|
|
35869
35869
|
}
|
|
35870
35870
|
return message;
|
|
35871
35871
|
}
|
|
35872
|
-
function introduce(
|
|
35872
|
+
function introduce(fn, options) {
|
|
35873
35873
|
var has = Object.prototype.hasOwnProperty;
|
|
35874
35874
|
for (var key in options) {
|
|
35875
35875
|
if (has.call(options, key)) {
|
|
35876
|
-
|
|
35876
|
+
fn[key] = options[key];
|
|
35877
35877
|
}
|
|
35878
35878
|
}
|
|
35879
|
-
return
|
|
35879
|
+
return fn;
|
|
35880
35880
|
}
|
|
35881
35881
|
function nope(options) {
|
|
35882
35882
|
options.enabled = false;
|
|
@@ -36120,9 +36120,9 @@ var require_simple_swizzle = __commonJS({
|
|
|
36120
36120
|
}
|
|
36121
36121
|
return results;
|
|
36122
36122
|
};
|
|
36123
|
-
swizzle.wrap = function(
|
|
36123
|
+
swizzle.wrap = function(fn) {
|
|
36124
36124
|
return function() {
|
|
36125
|
-
return
|
|
36125
|
+
return fn(swizzle(arguments));
|
|
36126
36126
|
};
|
|
36127
36127
|
};
|
|
36128
36128
|
}
|
|
@@ -36904,11 +36904,11 @@ var require_conversions = __commonJS({
|
|
|
36904
36904
|
var l3 = lab[0];
|
|
36905
36905
|
var a2 = lab[1];
|
|
36906
36906
|
var b3 = lab[2];
|
|
36907
|
-
var
|
|
36907
|
+
var hr2;
|
|
36908
36908
|
var h2;
|
|
36909
36909
|
var c;
|
|
36910
|
-
|
|
36911
|
-
h2 =
|
|
36910
|
+
hr2 = Math.atan2(b3, a2);
|
|
36911
|
+
h2 = hr2 * 360 / 2 / Math.PI;
|
|
36912
36912
|
if (h2 < 0) {
|
|
36913
36913
|
h2 += 360;
|
|
36914
36914
|
}
|
|
@@ -36921,10 +36921,10 @@ var require_conversions = __commonJS({
|
|
|
36921
36921
|
var h2 = lch[2];
|
|
36922
36922
|
var a2;
|
|
36923
36923
|
var b3;
|
|
36924
|
-
var
|
|
36925
|
-
|
|
36926
|
-
a2 = c * Math.cos(
|
|
36927
|
-
b3 = c * Math.sin(
|
|
36924
|
+
var hr2;
|
|
36925
|
+
hr2 = h2 / 360 * 2 * Math.PI;
|
|
36926
|
+
a2 = c * Math.cos(hr2);
|
|
36927
|
+
b3 = c * Math.sin(hr2);
|
|
36928
36928
|
return [l3, a2, b3];
|
|
36929
36929
|
};
|
|
36930
36930
|
convert.rgb.ansi16 = function(args) {
|
|
@@ -37229,15 +37229,15 @@ var require_route = __commonJS({
|
|
|
37229
37229
|
}
|
|
37230
37230
|
function wrapConversion(toModel, graph) {
|
|
37231
37231
|
var path = [graph[toModel].parent, toModel];
|
|
37232
|
-
var
|
|
37232
|
+
var fn = conversions[graph[toModel].parent][toModel];
|
|
37233
37233
|
var cur = graph[toModel].parent;
|
|
37234
37234
|
while (graph[cur].parent) {
|
|
37235
37235
|
path.unshift(graph[cur].parent);
|
|
37236
|
-
|
|
37236
|
+
fn = link(conversions[graph[cur].parent][cur], fn);
|
|
37237
37237
|
cur = graph[cur].parent;
|
|
37238
37238
|
}
|
|
37239
|
-
|
|
37240
|
-
return
|
|
37239
|
+
fn.conversion = path;
|
|
37240
|
+
return fn;
|
|
37241
37241
|
}
|
|
37242
37242
|
module2.exports = function(fromModel) {
|
|
37243
37243
|
var graph = deriveBFS(fromModel);
|
|
@@ -37264,7 +37264,7 @@ var require_color_convert = __commonJS({
|
|
|
37264
37264
|
var route = require_route();
|
|
37265
37265
|
var convert = {};
|
|
37266
37266
|
var models = Object.keys(conversions);
|
|
37267
|
-
function wrapRaw(
|
|
37267
|
+
function wrapRaw(fn) {
|
|
37268
37268
|
var wrappedFn = function(args) {
|
|
37269
37269
|
if (args === void 0 || args === null) {
|
|
37270
37270
|
return args;
|
|
@@ -37272,14 +37272,14 @@ var require_color_convert = __commonJS({
|
|
|
37272
37272
|
if (arguments.length > 1) {
|
|
37273
37273
|
args = Array.prototype.slice.call(arguments);
|
|
37274
37274
|
}
|
|
37275
|
-
return
|
|
37275
|
+
return fn(args);
|
|
37276
37276
|
};
|
|
37277
|
-
if ("conversion" in
|
|
37278
|
-
wrappedFn.conversion =
|
|
37277
|
+
if ("conversion" in fn) {
|
|
37278
|
+
wrappedFn.conversion = fn.conversion;
|
|
37279
37279
|
}
|
|
37280
37280
|
return wrappedFn;
|
|
37281
37281
|
}
|
|
37282
|
-
function wrapRounded(
|
|
37282
|
+
function wrapRounded(fn) {
|
|
37283
37283
|
var wrappedFn = function(args) {
|
|
37284
37284
|
if (args === void 0 || args === null) {
|
|
37285
37285
|
return args;
|
|
@@ -37287,7 +37287,7 @@ var require_color_convert = __commonJS({
|
|
|
37287
37287
|
if (arguments.length > 1) {
|
|
37288
37288
|
args = Array.prototype.slice.call(arguments);
|
|
37289
37289
|
}
|
|
37290
|
-
var result =
|
|
37290
|
+
var result = fn(args);
|
|
37291
37291
|
if (typeof result === "object") {
|
|
37292
37292
|
for (var len = result.length, i = 0; i < len; i++) {
|
|
37293
37293
|
result[i] = Math.round(result[i]);
|
|
@@ -37295,8 +37295,8 @@ var require_color_convert = __commonJS({
|
|
|
37295
37295
|
}
|
|
37296
37296
|
return result;
|
|
37297
37297
|
};
|
|
37298
|
-
if ("conversion" in
|
|
37299
|
-
wrappedFn.conversion =
|
|
37298
|
+
if ("conversion" in fn) {
|
|
37299
|
+
wrappedFn.conversion = fn.conversion;
|
|
37300
37300
|
}
|
|
37301
37301
|
return wrappedFn;
|
|
37302
37302
|
}
|
|
@@ -37307,9 +37307,9 @@ var require_color_convert = __commonJS({
|
|
|
37307
37307
|
var routes = route(fromModel);
|
|
37308
37308
|
var routeModels = Object.keys(routes);
|
|
37309
37309
|
routeModels.forEach(function(toModel) {
|
|
37310
|
-
var
|
|
37311
|
-
convert[fromModel][toModel] = wrapRounded(
|
|
37312
|
-
convert[fromModel][toModel].raw = wrapRaw(
|
|
37310
|
+
var fn = routes[toModel];
|
|
37311
|
+
convert[fromModel][toModel] = wrapRounded(fn);
|
|
37312
|
+
convert[fromModel][toModel].raw = wrapRaw(fn);
|
|
37313
37313
|
});
|
|
37314
37314
|
});
|
|
37315
37315
|
module2.exports = convert;
|
|
@@ -37819,10 +37819,10 @@ var require_adapters = __commonJS({
|
|
|
37819
37819
|
"../../node_modules/@dabh/diagnostics/adapters/index.js"(exports2, module2) {
|
|
37820
37820
|
"use strict";
|
|
37821
37821
|
var enabled = require_enabled();
|
|
37822
|
-
module2.exports = function create(
|
|
37822
|
+
module2.exports = function create(fn) {
|
|
37823
37823
|
return function adapter(namespace) {
|
|
37824
37824
|
try {
|
|
37825
|
-
return enabled(namespace,
|
|
37825
|
+
return enabled(namespace, fn());
|
|
37826
37826
|
} catch (e) {
|
|
37827
37827
|
}
|
|
37828
37828
|
return false;
|
|
@@ -37916,7 +37916,7 @@ var require_tail_file = __commonJS({
|
|
|
37916
37916
|
stream.emit("end");
|
|
37917
37917
|
stream.emit("close");
|
|
37918
37918
|
};
|
|
37919
|
-
fs.open(options.file, "a+", "0644", (err,
|
|
37919
|
+
fs.open(options.file, "a+", "0644", (err, fd2) => {
|
|
37920
37920
|
if (err) {
|
|
37921
37921
|
if (!iter) {
|
|
37922
37922
|
stream.emit("error", err);
|
|
@@ -37928,10 +37928,10 @@ var require_tail_file = __commonJS({
|
|
|
37928
37928
|
}
|
|
37929
37929
|
(function read() {
|
|
37930
37930
|
if (stream.destroyed) {
|
|
37931
|
-
fs.close(
|
|
37931
|
+
fs.close(fd2, noop);
|
|
37932
37932
|
return;
|
|
37933
37933
|
}
|
|
37934
|
-
return fs.read(
|
|
37934
|
+
return fs.read(fd2, buffer, 0, buffer.length, pos, (error, bytes) => {
|
|
37935
37935
|
if (error) {
|
|
37936
37936
|
if (!iter) {
|
|
37937
37937
|
stream.emit("error", error);
|
|
@@ -39013,14 +39013,14 @@ var require_fn = __commonJS({
|
|
|
39013
39013
|
"../../node_modules/fn.name/index.js"(exports2, module2) {
|
|
39014
39014
|
"use strict";
|
|
39015
39015
|
var toString = Object.prototype.toString;
|
|
39016
|
-
module2.exports = function name(
|
|
39017
|
-
if ("string" === typeof
|
|
39018
|
-
return
|
|
39019
|
-
} else if ("string" === typeof
|
|
39020
|
-
return
|
|
39021
|
-
}
|
|
39022
|
-
if ("object" === typeof
|
|
39023
|
-
var named =
|
|
39016
|
+
module2.exports = function name(fn) {
|
|
39017
|
+
if ("string" === typeof fn.displayName && fn.constructor.name) {
|
|
39018
|
+
return fn.displayName;
|
|
39019
|
+
} else if ("string" === typeof fn.name && fn.name) {
|
|
39020
|
+
return fn.name;
|
|
39021
|
+
}
|
|
39022
|
+
if ("object" === typeof fn && fn.constructor && "string" === typeof fn.constructor.name) return fn.constructor.name;
|
|
39023
|
+
var named = fn.toString(), type = toString.call(fn).slice(8, -1);
|
|
39024
39024
|
if ("Function" === type) {
|
|
39025
39025
|
named = named.substring(named.indexOf("(") + 1, named.indexOf(")"));
|
|
39026
39026
|
} else {
|
|
@@ -39036,16 +39036,16 @@ var require_one_time = __commonJS({
|
|
|
39036
39036
|
"../../node_modules/one-time/index.js"(exports2, module2) {
|
|
39037
39037
|
"use strict";
|
|
39038
39038
|
var name = require_fn();
|
|
39039
|
-
module2.exports = function one(
|
|
39039
|
+
module2.exports = function one(fn) {
|
|
39040
39040
|
var called = 0, value;
|
|
39041
39041
|
function onetime() {
|
|
39042
39042
|
if (called) return value;
|
|
39043
39043
|
called = 1;
|
|
39044
|
-
value =
|
|
39045
|
-
|
|
39044
|
+
value = fn.apply(this, arguments);
|
|
39045
|
+
fn = null;
|
|
39046
39046
|
return value;
|
|
39047
39047
|
}
|
|
39048
|
-
onetime.displayName = name(
|
|
39048
|
+
onetime.displayName = name(fn);
|
|
39049
39049
|
return onetime;
|
|
39050
39050
|
};
|
|
39051
39051
|
}
|
|
@@ -42558,14 +42558,14 @@ var Qe = "created";
|
|
|
42558
42558
|
var jt = "not-modified";
|
|
42559
42559
|
var $t = "not-found";
|
|
42560
42560
|
var Ke = "accepted";
|
|
42561
|
-
var
|
|
42561
|
+
var Qr = { resourceType: "OperationOutcome", id: $t, issue: [{ severity: "error", code: "not-found", details: { text: "Not found" } }] };
|
|
42562
42562
|
function R(r6, e) {
|
|
42563
42563
|
return { resourceType: "OperationOutcome", issue: [{ severity: "error", code: "invalid", details: { text: r6 }, ...e ? { expression: [e] } : void 0 }] };
|
|
42564
42564
|
}
|
|
42565
42565
|
function h(r6) {
|
|
42566
42566
|
return { resourceType: "OperationOutcome", issue: [{ severity: "error", code: "structure", details: { text: r6 } }] };
|
|
42567
42567
|
}
|
|
42568
|
-
function
|
|
42568
|
+
function Kr(r6) {
|
|
42569
42569
|
return { resourceType: "OperationOutcome", issue: [{ severity: "error", code: "exception", details: { text: "Internal server error" }, diagnostics: r6.toString() }] };
|
|
42570
42570
|
}
|
|
42571
42571
|
function xe(r6) {
|
|
@@ -42576,42 +42576,42 @@ function Wt(r6) {
|
|
|
42576
42576
|
}
|
|
42577
42577
|
var f = class extends Error {
|
|
42578
42578
|
constructor(e, t) {
|
|
42579
|
-
super(
|
|
42579
|
+
super(zr(e)), this.outcome = e, this.cause = t;
|
|
42580
42580
|
}
|
|
42581
42581
|
};
|
|
42582
42582
|
function ze(r6) {
|
|
42583
|
-
return r6 instanceof f ? r6.outcome : xe(r6) ? r6 : R(
|
|
42583
|
+
return r6 instanceof f ? r6.outcome : xe(r6) ? r6 : R(Ii(r6));
|
|
42584
42584
|
}
|
|
42585
|
-
function
|
|
42586
|
-
return r6 ? typeof r6 == "string" ? r6 : r6 instanceof Error ? r6.message : xe(r6) ?
|
|
42585
|
+
function Ii(r6) {
|
|
42586
|
+
return r6 ? typeof r6 == "string" ? r6 : r6 instanceof Error ? r6.message : xe(r6) ? zr(r6) : typeof r6 == "object" && "code" in r6 && typeof r6.code == "string" ? r6.code : JSON.stringify(r6) : "Unknown error";
|
|
42587
42587
|
}
|
|
42588
|
-
function
|
|
42589
|
-
let e = r6.issue?.map(
|
|
42588
|
+
function zr(r6) {
|
|
42589
|
+
let e = r6.issue?.map(ki) ?? [];
|
|
42590
42590
|
return e.length > 0 ? e.join("; ") : "Unknown error";
|
|
42591
42591
|
}
|
|
42592
|
-
function
|
|
42592
|
+
function ki(r6) {
|
|
42593
42593
|
let e;
|
|
42594
42594
|
return r6.details?.text ? r6.diagnostics ? e = `${r6.details.text} (${r6.diagnostics})` : e = r6.details.text : r6.diagnostics ? e = r6.diagnostics : e = "Unknown error", r6.expression?.length && (e += ` (${r6.expression.join(", ")})`), e;
|
|
42595
42595
|
}
|
|
42596
|
-
function
|
|
42596
|
+
function Di(r6, e) {
|
|
42597
42597
|
let t = e.max && e.max === Number.MAX_SAFE_INTEGER ? Number.POSITIVE_INFINITY : e.max;
|
|
42598
42598
|
return { path: r6, description: "", type: e.type ?? [], min: e.min ?? 0, max: t ?? 1, isArray: !!t && t > 1, constraints: [] };
|
|
42599
42599
|
}
|
|
42600
|
-
function
|
|
42600
|
+
function Zr(r6) {
|
|
42601
42601
|
let e = /* @__PURE__ */ Object.create(null);
|
|
42602
|
-
for (let [t, n] of Object.entries(r6)) e[t] = { name: t, elements: Object.fromEntries(Object.entries(n.elements).map(([i, o]) => [i,
|
|
42602
|
+
for (let [t, n] of Object.entries(r6)) e[t] = { name: t, elements: Object.fromEntries(Object.entries(n.elements).map(([i, o]) => [i, Di(i, o)])), constraints: [], innerTypes: [] };
|
|
42603
42603
|
return e;
|
|
42604
42604
|
}
|
|
42605
|
-
var en = { Element: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] } } }, BackboneElement: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, modifierExtension: { max: 9007199254740991, type: [{ code: "Extension" }] } } }, Address: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, use: { type: [{ code: "code" }] }, type: { type: [{ code: "code" }] }, text: { type: [{ code: "string" }] }, line: { max: 9007199254740991, type: [{ code: "string" }] }, city: { type: [{ code: "string" }] }, district: { type: [{ code: "string" }] }, state: { type: [{ code: "string" }] }, postalCode: { type: [{ code: "string" }] }, country: { type: [{ code: "string" }] }, period: { type: [{ code: "Period" }] } } }, Age: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, comparator: { type: [{ code: "code" }] }, unit: { type: [{ code: "string" }] }, system: { type: [{ code: "uri" }] }, code: { type: [{ code: "code" }] } } }, Annotation: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, "author[x]": { type: [{ code: "Reference", targetProfile: ["http://hl7.org/fhir/StructureDefinition/Practitioner", "http://hl7.org/fhir/StructureDefinition/Patient", "http://hl7.org/fhir/StructureDefinition/RelatedPerson", "http://hl7.org/fhir/StructureDefinition/Organization"] }, { code: "string" }] }, time: { type: [{ code: "dateTime" }] }, text: { min: 1, type: [{ code: "markdown" }] } } }, Attachment: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, contentType: { type: [{ code: "code" }] }, language: { type: [{ code: "code" }] }, data: { type: [{ code: "base64Binary" }] }, url: { type: [{ code: "url" }] }, size: { type: [{ code: "unsignedInt" }] }, hash: { type: [{ code: "base64Binary" }] }, title: { type: [{ code: "string" }] }, creation: { type: [{ code: "dateTime" }] } } }, CodeableConcept: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, coding: { max: 9007199254740991, type: [{ code: "Coding" }] }, text: { type: [{ code: "string" }] } } }, Coding: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, system: { type: [{ code: "uri" }] }, version: { type: [{ code: "string" }] }, code: { type: [{ code: "code" }] }, display: { type: [{ code: "string" }] }, userSelected: { type: [{ code: "boolean" }] } } }, ContactDetail: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, name: { type: [{ code: "string" }] }, telecom: { max: 9007199254740991, type: [{ code: "ContactPoint" }] } } }, ContactPoint: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, system: { type: [{ code: "code" }] }, value: { type: [{ code: "string" }] }, use: { type: [{ code: "code" }] }, rank: { type: [{ code: "positiveInt" }] }, period: { type: [{ code: "Period" }] } } }, Contributor: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, type: { min: 1, type: [{ code: "code" }] }, name: { min: 1, type: [{ code: "string" }] }, contact: { max: 9007199254740991, type: [{ code: "ContactDetail" }] } } }, Count: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, comparator: { type: [{ code: "code" }] }, unit: { type: [{ code: "string" }] }, system: { type: [{ code: "uri" }] }, code: { type: [{ code: "code" }] } } }, DataRequirement: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, type: { min: 1, type: [{ code: "code" }] }, profile: { max: 9007199254740991, type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/StructureDefinition"] }] }, "subject[x]": { type: [{ code: "CodeableConcept" }, { code: "Reference", targetProfile: ["http://hl7.org/fhir/StructureDefinition/Group"] }] }, mustSupport: { max: 9007199254740991, type: [{ code: "string" }] }, codeFilter: { max: 9007199254740991, type: [{ code: "DataRequirementCodeFilter" }] }, dateFilter: { max: 9007199254740991, type: [{ code: "DataRequirementDateFilter" }] }, limit: { type: [{ code: "positiveInt" }] }, sort: { max: 9007199254740991, type: [{ code: "DataRequirementSort" }] } } }, Distance: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, comparator: { type: [{ code: "code" }] }, unit: { type: [{ code: "string" }] }, system: { type: [{ code: "uri" }] }, code: { type: [{ code: "code" }] } } }, Dosage: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, modifierExtension: { max: 9007199254740991, type: [{ code: "Extension" }] }, sequence: { type: [{ code: "integer" }] }, text: { type: [{ code: "string" }] }, additionalInstruction: { max: 9007199254740991, type: [{ code: "CodeableConcept" }] }, patientInstruction: { type: [{ code: "string" }] }, timing: { type: [{ code: "Timing" }] }, "asNeeded[x]": { type: [{ code: "boolean" }, { code: "CodeableConcept" }] }, site: { type: [{ code: "CodeableConcept" }] }, route: { type: [{ code: "CodeableConcept" }] }, method: { type: [{ code: "CodeableConcept" }] }, doseAndRate: { max: 9007199254740991, type: [{ code: "DosageDoseAndRate" }] }, maxDosePerPeriod: { type: [{ code: "Ratio" }] }, maxDosePerAdministration: { type: [{ code: "Quantity", profile: ["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"] }] }, maxDosePerLifetime: { type: [{ code: "Quantity", profile: ["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"] }] } } }, Duration: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, comparator: { type: [{ code: "code" }] }, unit: { type: [{ code: "string" }] }, system: { type: [{ code: "uri" }] }, code: { type: [{ code: "code" }] } } }, ElementDefinition: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, modifierExtension: { max: 9007199254740991, type: [{ code: "Extension" }] }, path: { min: 1, type: [{ code: "string" }] }, representation: { max: 9007199254740991, type: [{ code: "code" }] }, sliceName: { type: [{ code: "string" }] }, sliceIsConstraining: { type: [{ code: "boolean" }] }, label: { type: [{ code: "string" }] }, code: { max: 9007199254740991, type: [{ code: "Coding" }] }, slicing: { type: [{ code: "ElementDefinitionSlicing" }] }, short: { type: [{ code: "string" }] }, definition: { type: [{ code: "markdown" }] }, comment: { type: [{ code: "markdown" }] }, requirements: { type: [{ code: "markdown" }] }, alias: { max: 9007199254740991, type: [{ code: "string" }] }, min: { type: [{ code: "unsignedInt" }] }, max: { type: [{ code: "string" }] }, base: { type: [{ code: "ElementDefinitionBase" }] }, contentReference: { type: [{ code: "uri" }] }, type: { max: 9007199254740991, type: [{ code: "ElementDefinitionType" }] }, "defaultValue[x]": { type: [{ code: "base64Binary" }, { code: "boolean" }, { code: "canonical" }, { code: "code" }, { code: "date" }, { code: "dateTime" }, { code: "decimal" }, { code: "id" }, { code: "instant" }, { code: "integer" }, { code: "markdown" }, { code: "oid" }, { code: "positiveInt" }, { code: "string" }, { code: "time" }, { code: "unsignedInt" }, { code: "uri" }, { code: "url" }, { code: "uuid" }, { code: "Address" }, { code: "Age" }, { code: "Annotation" }, { code: "Attachment" }, { code: "CodeableConcept" }, { code: "Coding" }, { code: "ContactPoint" }, { code: "Count" }, { code: "Distance" }, { code: "Duration" }, { code: "HumanName" }, { code: "Identifier" }, { code: "Money" }, { code: "Period" }, { code: "Quantity" }, { code: "Range" }, { code: "Ratio" }, { code: "Reference" }, { code: "SampledData" }, { code: "Signature" }, { code: "Timing" }, { code: "ContactDetail" }, { code: "Contributor" }, { code: "DataRequirement" }, { code: "Expression" }, { code: "ParameterDefinition" }, { code: "RelatedArtifact" }, { code: "TriggerDefinition" }, { code: "UsageContext" }, { code: "Dosage" }, { code: "Meta" }] }, meaningWhenMissing: { type: [{ code: "markdown" }] }, orderMeaning: { type: [{ code: "string" }] }, "fixed[x]": { type: [{ code: "base64Binary" }, { code: "boolean" }, { code: "canonical" }, { code: "code" }, { code: "date" }, { code: "dateTime" }, { code: "decimal" }, { code: "id" }, { code: "instant" }, { code: "integer" }, { code: "markdown" }, { code: "oid" }, { code: "positiveInt" }, { code: "string" }, { code: "time" }, { code: "unsignedInt" }, { code: "uri" }, { code: "url" }, { code: "uuid" }, { code: "Address" }, { code: "Age" }, { code: "Annotation" }, { code: "Attachment" }, { code: "CodeableConcept" }, { code: "Coding" }, { code: "ContactPoint" }, { code: "Count" }, { code: "Distance" }, { code: "Duration" }, { code: "HumanName" }, { code: "Identifier" }, { code: "Money" }, { code: "Period" }, { code: "Quantity" }, { code: "Range" }, { code: "Ratio" }, { code: "Reference" }, { code: "SampledData" }, { code: "Signature" }, { code: "Timing" }, { code: "ContactDetail" }, { code: "Contributor" }, { code: "DataRequirement" }, { code: "Expression" }, { code: "ParameterDefinition" }, { code: "RelatedArtifact" }, { code: "TriggerDefinition" }, { code: "UsageContext" }, { code: "Dosage" }, { code: "Meta" }] }, "pattern[x]": { type: [{ code: "base64Binary" }, { code: "boolean" }, { code: "canonical" }, { code: "code" }, { code: "date" }, { code: "dateTime" }, { code: "decimal" }, { code: "id" }, { code: "instant" }, { code: "integer" }, { code: "markdown" }, { code: "oid" }, { code: "positiveInt" }, { code: "string" }, { code: "time" }, { code: "unsignedInt" }, { code: "uri" }, { code: "url" }, { code: "uuid" }, { code: "Address" }, { code: "Age" }, { code: "Annotation" }, { code: "Attachment" }, { code: "CodeableConcept" }, { code: "Coding" }, { code: "ContactPoint" }, { code: "Count" }, { code: "Distance" }, { code: "Duration" }, { code: "HumanName" }, { code: "Identifier" }, { code: "Money" }, { code: "Period" }, { code: "Quantity" }, { code: "Range" }, { code: "Ratio" }, { code: "Reference" }, { code: "SampledData" }, { code: "Signature" }, { code: "Timing" }, { code: "ContactDetail" }, { code: "Contributor" }, { code: "DataRequirement" }, { code: "Expression" }, { code: "ParameterDefinition" }, { code: "RelatedArtifact" }, { code: "TriggerDefinition" }, { code: "UsageContext" }, { code: "Dosage" }, { code: "Meta" }] }, example: { max: 9007199254740991, type: [{ code: "ElementDefinitionExample" }] }, "minValue[x]": { type: [{ code: "date" }, { code: "dateTime" }, { code: "instant" }, { code: "time" }, { code: "decimal" }, { code: "integer" }, { code: "positiveInt" }, { code: "unsignedInt" }, { code: "Quantity" }] }, "maxValue[x]": { type: [{ code: "date" }, { code: "dateTime" }, { code: "instant" }, { code: "time" }, { code: "decimal" }, { code: "integer" }, { code: "positiveInt" }, { code: "unsignedInt" }, { code: "Quantity" }] }, maxLength: { type: [{ code: "integer" }] }, condition: { max: 9007199254740991, type: [{ code: "id" }] }, constraint: { max: 9007199254740991, type: [{ code: "ElementDefinitionConstraint" }] }, mustSupport: { type: [{ code: "boolean" }] }, isModifier: { type: [{ code: "boolean" }] }, isModifierReason: { type: [{ code: "string" }] }, isSummary: { type: [{ code: "boolean" }] }, binding: { type: [{ code: "ElementDefinitionBinding" }] }, mapping: { max: 9007199254740991, type: [{ code: "ElementDefinitionMapping" }] } } }, Expression: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, description: { type: [{ code: "string" }] }, name: { type: [{ code: "id" }] }, language: { min: 1, type: [{ code: "code" }] }, expression: { type: [{ code: "string" }] }, reference: { type: [{ code: "uri" }] } } }, Extension: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, url: { min: 1, type: [{ code: "uri" }] }, "value[x]": { type: [{ code: "base64Binary" }, { code: "boolean" }, { code: "canonical" }, { code: "code" }, { code: "date" }, { code: "dateTime" }, { code: "decimal" }, { code: "id" }, { code: "instant" }, { code: "integer" }, { code: "markdown" }, { code: "oid" }, { code: "positiveInt" }, { code: "string" }, { code: "time" }, { code: "unsignedInt" }, { code: "uri" }, { code: "url" }, { code: "uuid" }, { code: "Address" }, { code: "Age" }, { code: "Annotation" }, { code: "Attachment" }, { code: "CodeableConcept" }, { code: "Coding" }, { code: "ContactPoint" }, { code: "Count" }, { code: "Distance" }, { code: "Duration" }, { code: "HumanName" }, { code: "Identifier" }, { code: "Money" }, { code: "Period" }, { code: "Quantity" }, { code: "Range" }, { code: "Ratio" }, { code: "Reference" }, { code: "SampledData" }, { code: "Signature" }, { code: "Timing" }, { code: "ContactDetail" }, { code: "Contributor" }, { code: "DataRequirement" }, { code: "Expression" }, { code: "ParameterDefinition" }, { code: "RelatedArtifact" }, { code: "TriggerDefinition" }, { code: "UsageContext" }, { code: "Dosage" }, { code: "Meta" }] } } }, HumanName: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, use: { type: [{ code: "code" }] }, text: { type: [{ code: "string" }] }, family: { type: [{ code: "string" }] }, given: { max: 9007199254740991, type: [{ code: "string" }] }, prefix: { max: 9007199254740991, type: [{ code: "string" }] }, suffix: { max: 9007199254740991, type: [{ code: "string" }] }, period: { type: [{ code: "Period" }] } } }, Identifier: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, use: { type: [{ code: "code" }] }, type: { type: [{ code: "CodeableConcept" }] }, system: { type: [{ code: "uri" }] }, value: { type: [{ code: "string" }] }, period: { type: [{ code: "Period" }] }, assigner: { type: [{ code: "Reference", targetProfile: ["http://hl7.org/fhir/StructureDefinition/Organization"] }] } } }, MarketingStatus: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, modifierExtension: { max: 9007199254740991, type: [{ code: "Extension" }] }, country: { min: 1, type: [{ code: "CodeableConcept" }] }, jurisdiction: { type: [{ code: "CodeableConcept" }] }, status: { min: 1, type: [{ code: "CodeableConcept" }] }, dateRange: { min: 1, type: [{ code: "Period" }] }, restoreDate: { type: [{ code: "dateTime" }] } } }, Meta: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, versionId: { type: [{ code: "id" }] }, lastUpdated: { type: [{ code: "instant" }] }, source: { type: [{ code: "uri" }] }, profile: { max: 9007199254740991, type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/StructureDefinition"] }] }, security: { max: 9007199254740991, type: [{ code: "Coding" }] }, tag: { max: 9007199254740991, type: [{ code: "Coding" }] }, project: { type: [{ code: "uri" }] }, author: { type: [{ code: "Reference" }] }, onBehalfOf: { type: [{ code: "Reference" }] }, account: { type: [{ code: "Reference" }] }, compartment: { max: 9007199254740991, type: [{ code: "Reference" }] } } }, Money: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, currency: { type: [{ code: "code" }] } } }, Narrative: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, status: { min: 1, type: [{ code: "code" }] }, div: { min: 1, type: [{ code: "xhtml" }] } } }, ParameterDefinition: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, name: { type: [{ code: "code" }] }, use: { min: 1, type: [{ code: "code" }] }, min: { type: [{ code: "integer" }] }, max: { type: [{ code: "string" }] }, documentation: { type: [{ code: "string" }] }, type: { min: 1, type: [{ code: "code" }] }, profile: { type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/StructureDefinition"] }] } } }, Period: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, start: { type: [{ code: "dateTime" }] }, end: { type: [{ code: "dateTime" }] } } }, Population: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, modifierExtension: { max: 9007199254740991, type: [{ code: "Extension" }] }, "age[x]": { type: [{ code: "Range" }, { code: "CodeableConcept" }] }, gender: { type: [{ code: "CodeableConcept" }] }, race: { type: [{ code: "CodeableConcept" }] }, physiologicalCondition: { type: [{ code: "CodeableConcept" }] } } }, ProdCharacteristic: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, modifierExtension: { max: 9007199254740991, type: [{ code: "Extension" }] }, height: { type: [{ code: "Quantity" }] }, width: { type: [{ code: "Quantity" }] }, depth: { type: [{ code: "Quantity" }] }, weight: { type: [{ code: "Quantity" }] }, nominalVolume: { type: [{ code: "Quantity" }] }, externalDiameter: { type: [{ code: "Quantity" }] }, shape: { type: [{ code: "string" }] }, color: { max: 9007199254740991, type: [{ code: "string" }] }, imprint: { max: 9007199254740991, type: [{ code: "string" }] }, image: { max: 9007199254740991, type: [{ code: "Attachment" }] }, scoring: { type: [{ code: "CodeableConcept" }] } } }, ProductShelfLife: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, modifierExtension: { max: 9007199254740991, type: [{ code: "Extension" }] }, identifier: { type: [{ code: "Identifier" }] }, type: { min: 1, type: [{ code: "CodeableConcept" }] }, period: { min: 1, type: [{ code: "Quantity" }] }, specialPrecautionsForStorage: { max: 9007199254740991, type: [{ code: "CodeableConcept" }] } } }, Quantity: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, comparator: { type: [{ code: "code" }] }, unit: { type: [{ code: "string" }] }, system: { type: [{ code: "uri" }] }, code: { type: [{ code: "code" }] } } }, Range: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, low: { type: [{ code: "Quantity", profile: ["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"] }] }, high: { type: [{ code: "Quantity", profile: ["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"] }] } } }, Ratio: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, numerator: { type: [{ code: "Quantity" }] }, denominator: { type: [{ code: "Quantity" }] } } }, Reference: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, reference: { type: [{ code: "string" }] }, type: { type: [{ code: "uri" }] }, identifier: { type: [{ code: "Identifier" }] }, display: { type: [{ code: "string" }] } } }, RelatedArtifact: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, type: { min: 1, type: [{ code: "code" }] }, label: { type: [{ code: "string" }] }, display: { type: [{ code: "string" }] }, citation: { type: [{ code: "markdown" }] }, url: { type: [{ code: "url" }] }, document: { type: [{ code: "Attachment" }] }, resource: { type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/Resource"] }] } } }, SampledData: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, origin: { min: 1, type: [{ code: "Quantity", profile: ["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"] }] }, period: { min: 1, type: [{ code: "decimal" }] }, factor: { type: [{ code: "decimal" }] }, lowerLimit: { type: [{ code: "decimal" }] }, upperLimit: { type: [{ code: "decimal" }] }, dimensions: { min: 1, type: [{ code: "positiveInt" }] }, data: { type: [{ code: "string" }] } } }, Signature: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, type: { min: 1, max: 9007199254740991, type: [{ code: "Coding" }] }, when: { min: 1, type: [{ code: "instant" }] }, who: { min: 1, type: [{ code: "Reference", targetProfile: ["http://hl7.org/fhir/StructureDefinition/Practitioner", "http://hl7.org/fhir/StructureDefinition/PractitionerRole", "http://hl7.org/fhir/StructureDefinition/RelatedPerson", "http://hl7.org/fhir/StructureDefinition/Patient", "http://hl7.org/fhir/StructureDefinition/Device", "http://hl7.org/fhir/StructureDefinition/Organization"] }] }, onBehalfOf: { type: [{ code: "Reference", targetProfile: ["http://hl7.org/fhir/StructureDefinition/Practitioner", "http://hl7.org/fhir/StructureDefinition/PractitionerRole", "http://hl7.org/fhir/StructureDefinition/RelatedPerson", "http://hl7.org/fhir/StructureDefinition/Patient", "http://hl7.org/fhir/StructureDefinition/Device", "http://hl7.org/fhir/StructureDefinition/Organization"] }] }, targetFormat: { type: [{ code: "code" }] }, sigFormat: { type: [{ code: "code" }] }, data: { type: [{ code: "base64Binary" }] } } }, SubstanceAmount: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, modifierExtension: { max: 9007199254740991, type: [{ code: "Extension" }] }, "amount[x]": { type: [{ code: "Quantity" }, { code: "Range" }, { code: "string" }] }, amountType: { type: [{ code: "CodeableConcept" }] }, amountText: { type: [{ code: "string" }] }, referenceRange: { type: [{ code: "SubstanceAmountReferenceRange" }] } } }, Timing: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, modifierExtension: { max: 9007199254740991, type: [{ code: "Extension" }] }, event: { max: 9007199254740991, type: [{ code: "dateTime" }] }, repeat: { type: [{ code: "TimingRepeat" }] }, code: { type: [{ code: "CodeableConcept" }] } } }, TriggerDefinition: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, type: { min: 1, type: [{ code: "code" }] }, name: { type: [{ code: "string" }] }, "timing[x]": { type: [{ code: "Timing" }, { code: "Reference", targetProfile: ["http://hl7.org/fhir/StructureDefinition/Schedule"] }, { code: "date" }, { code: "dateTime" }] }, data: { max: 9007199254740991, type: [{ code: "DataRequirement" }] }, condition: { type: [{ code: "Expression" }] } } }, UsageContext: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, code: { min: 1, type: [{ code: "Coding" }] }, "value[x]": { min: 1, type: [{ code: "CodeableConcept" }, { code: "Quantity" }, { code: "Range" }, { code: "Reference", targetProfile: ["http://hl7.org/fhir/StructureDefinition/PlanDefinition", "http://hl7.org/fhir/StructureDefinition/ResearchStudy", "http://hl7.org/fhir/StructureDefinition/InsurancePlan", "http://hl7.org/fhir/StructureDefinition/HealthcareService", "http://hl7.org/fhir/StructureDefinition/Group", "http://hl7.org/fhir/StructureDefinition/Location", "http://hl7.org/fhir/StructureDefinition/Organization"] }] } } }, MoneyQuantity: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, comparator: { type: [{ code: "code" }] }, unit: { type: [{ code: "string" }] }, system: { type: [{ code: "uri" }] }, code: { type: [{ code: "code" }] } } }, SimpleQuantity: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, comparator: { max: 0, type: [{ code: "code" }] }, unit: { type: [{ code: "string" }] }, system: { type: [{ code: "uri" }] }, code: { type: [{ code: "code" }] } } }, IdentityProvider: { elements: { authorizeUrl: { min: 1, type: [{ code: "string" }] }, tokenUrl: { min: 1, type: [{ code: "string" }] }, tokenAuthMethod: { type: [{ code: "code" }] }, userInfoUrl: { min: 1, type: [{ code: "string" }] }, clientId: { min: 1, type: [{ code: "string" }] }, clientSecret: { min: 1, type: [{ code: "string" }] }, usePkce: { type: [{ code: "boolean" }] }, useSubject: { type: [{ code: "boolean" }] } } } };
|
|
42605
|
+
var Xr = { Element: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] } } }, BackboneElement: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, modifierExtension: { max: 9007199254740991, type: [{ code: "Extension" }] } } }, Address: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, use: { type: [{ code: "code" }] }, type: { type: [{ code: "code" }] }, text: { type: [{ code: "string" }] }, line: { max: 9007199254740991, type: [{ code: "string" }] }, city: { type: [{ code: "string" }] }, district: { type: [{ code: "string" }] }, state: { type: [{ code: "string" }] }, postalCode: { type: [{ code: "string" }] }, country: { type: [{ code: "string" }] }, period: { type: [{ code: "Period" }] } } }, Age: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, comparator: { type: [{ code: "code" }] }, unit: { type: [{ code: "string" }] }, system: { type: [{ code: "uri" }] }, code: { type: [{ code: "code" }] } } }, Annotation: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, "author[x]": { type: [{ code: "Reference", targetProfile: ["http://hl7.org/fhir/StructureDefinition/Practitioner", "http://hl7.org/fhir/StructureDefinition/Patient", "http://hl7.org/fhir/StructureDefinition/RelatedPerson", "http://hl7.org/fhir/StructureDefinition/Organization"] }, { code: "string" }] }, time: { type: [{ code: "dateTime" }] }, text: { min: 1, type: [{ code: "markdown" }] } } }, Attachment: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, contentType: { type: [{ code: "code" }] }, language: { type: [{ code: "code" }] }, data: { type: [{ code: "base64Binary" }] }, url: { type: [{ code: "url" }] }, size: { type: [{ code: "unsignedInt" }] }, hash: { type: [{ code: "base64Binary" }] }, title: { type: [{ code: "string" }] }, creation: { type: [{ code: "dateTime" }] } } }, CodeableConcept: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, coding: { max: 9007199254740991, type: [{ code: "Coding" }] }, text: { type: [{ code: "string" }] } } }, Coding: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, system: { type: [{ code: "uri" }] }, version: { type: [{ code: "string" }] }, code: { type: [{ code: "code" }] }, display: { type: [{ code: "string" }] }, userSelected: { type: [{ code: "boolean" }] } } }, ContactDetail: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, name: { type: [{ code: "string" }] }, telecom: { max: 9007199254740991, type: [{ code: "ContactPoint" }] } } }, ContactPoint: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, system: { type: [{ code: "code" }] }, value: { type: [{ code: "string" }] }, use: { type: [{ code: "code" }] }, rank: { type: [{ code: "positiveInt" }] }, period: { type: [{ code: "Period" }] } } }, Contributor: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, type: { min: 1, type: [{ code: "code" }] }, name: { min: 1, type: [{ code: "string" }] }, contact: { max: 9007199254740991, type: [{ code: "ContactDetail" }] } } }, Count: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, comparator: { type: [{ code: "code" }] }, unit: { type: [{ code: "string" }] }, system: { type: [{ code: "uri" }] }, code: { type: [{ code: "code" }] } } }, DataRequirement: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, type: { min: 1, type: [{ code: "code" }] }, profile: { max: 9007199254740991, type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/StructureDefinition"] }] }, "subject[x]": { type: [{ code: "CodeableConcept" }, { code: "Reference", targetProfile: ["http://hl7.org/fhir/StructureDefinition/Group"] }] }, mustSupport: { max: 9007199254740991, type: [{ code: "string" }] }, codeFilter: { max: 9007199254740991, type: [{ code: "DataRequirementCodeFilter" }] }, dateFilter: { max: 9007199254740991, type: [{ code: "DataRequirementDateFilter" }] }, limit: { type: [{ code: "positiveInt" }] }, sort: { max: 9007199254740991, type: [{ code: "DataRequirementSort" }] } } }, Distance: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, comparator: { type: [{ code: "code" }] }, unit: { type: [{ code: "string" }] }, system: { type: [{ code: "uri" }] }, code: { type: [{ code: "code" }] } } }, Dosage: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, modifierExtension: { max: 9007199254740991, type: [{ code: "Extension" }] }, sequence: { type: [{ code: "integer" }] }, text: { type: [{ code: "string" }] }, additionalInstruction: { max: 9007199254740991, type: [{ code: "CodeableConcept" }] }, patientInstruction: { type: [{ code: "string" }] }, timing: { type: [{ code: "Timing" }] }, "asNeeded[x]": { type: [{ code: "boolean" }, { code: "CodeableConcept" }] }, site: { type: [{ code: "CodeableConcept" }] }, route: { type: [{ code: "CodeableConcept" }] }, method: { type: [{ code: "CodeableConcept" }] }, doseAndRate: { max: 9007199254740991, type: [{ code: "DosageDoseAndRate" }] }, maxDosePerPeriod: { type: [{ code: "Ratio" }] }, maxDosePerAdministration: { type: [{ code: "Quantity", profile: ["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"] }] }, maxDosePerLifetime: { type: [{ code: "Quantity", profile: ["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"] }] } } }, Duration: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, comparator: { type: [{ code: "code" }] }, unit: { type: [{ code: "string" }] }, system: { type: [{ code: "uri" }] }, code: { type: [{ code: "code" }] } } }, ElementDefinition: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, modifierExtension: { max: 9007199254740991, type: [{ code: "Extension" }] }, path: { min: 1, type: [{ code: "string" }] }, representation: { max: 9007199254740991, type: [{ code: "code" }] }, sliceName: { type: [{ code: "string" }] }, sliceIsConstraining: { type: [{ code: "boolean" }] }, label: { type: [{ code: "string" }] }, code: { max: 9007199254740991, type: [{ code: "Coding" }] }, slicing: { type: [{ code: "ElementDefinitionSlicing" }] }, short: { type: [{ code: "string" }] }, definition: { type: [{ code: "markdown" }] }, comment: { type: [{ code: "markdown" }] }, requirements: { type: [{ code: "markdown" }] }, alias: { max: 9007199254740991, type: [{ code: "string" }] }, min: { type: [{ code: "unsignedInt" }] }, max: { type: [{ code: "string" }] }, base: { type: [{ code: "ElementDefinitionBase" }] }, contentReference: { type: [{ code: "uri" }] }, type: { max: 9007199254740991, type: [{ code: "ElementDefinitionType" }] }, "defaultValue[x]": { type: [{ code: "base64Binary" }, { code: "boolean" }, { code: "canonical" }, { code: "code" }, { code: "date" }, { code: "dateTime" }, { code: "decimal" }, { code: "id" }, { code: "instant" }, { code: "integer" }, { code: "markdown" }, { code: "oid" }, { code: "positiveInt" }, { code: "string" }, { code: "time" }, { code: "unsignedInt" }, { code: "uri" }, { code: "url" }, { code: "uuid" }, { code: "Address" }, { code: "Age" }, { code: "Annotation" }, { code: "Attachment" }, { code: "CodeableConcept" }, { code: "Coding" }, { code: "ContactPoint" }, { code: "Count" }, { code: "Distance" }, { code: "Duration" }, { code: "HumanName" }, { code: "Identifier" }, { code: "Money" }, { code: "Period" }, { code: "Quantity" }, { code: "Range" }, { code: "Ratio" }, { code: "Reference" }, { code: "SampledData" }, { code: "Signature" }, { code: "Timing" }, { code: "ContactDetail" }, { code: "Contributor" }, { code: "DataRequirement" }, { code: "Expression" }, { code: "ParameterDefinition" }, { code: "RelatedArtifact" }, { code: "TriggerDefinition" }, { code: "UsageContext" }, { code: "Dosage" }, { code: "Meta" }] }, meaningWhenMissing: { type: [{ code: "markdown" }] }, orderMeaning: { type: [{ code: "string" }] }, "fixed[x]": { type: [{ code: "base64Binary" }, { code: "boolean" }, { code: "canonical" }, { code: "code" }, { code: "date" }, { code: "dateTime" }, { code: "decimal" }, { code: "id" }, { code: "instant" }, { code: "integer" }, { code: "markdown" }, { code: "oid" }, { code: "positiveInt" }, { code: "string" }, { code: "time" }, { code: "unsignedInt" }, { code: "uri" }, { code: "url" }, { code: "uuid" }, { code: "Address" }, { code: "Age" }, { code: "Annotation" }, { code: "Attachment" }, { code: "CodeableConcept" }, { code: "Coding" }, { code: "ContactPoint" }, { code: "Count" }, { code: "Distance" }, { code: "Duration" }, { code: "HumanName" }, { code: "Identifier" }, { code: "Money" }, { code: "Period" }, { code: "Quantity" }, { code: "Range" }, { code: "Ratio" }, { code: "Reference" }, { code: "SampledData" }, { code: "Signature" }, { code: "Timing" }, { code: "ContactDetail" }, { code: "Contributor" }, { code: "DataRequirement" }, { code: "Expression" }, { code: "ParameterDefinition" }, { code: "RelatedArtifact" }, { code: "TriggerDefinition" }, { code: "UsageContext" }, { code: "Dosage" }, { code: "Meta" }] }, "pattern[x]": { type: [{ code: "base64Binary" }, { code: "boolean" }, { code: "canonical" }, { code: "code" }, { code: "date" }, { code: "dateTime" }, { code: "decimal" }, { code: "id" }, { code: "instant" }, { code: "integer" }, { code: "markdown" }, { code: "oid" }, { code: "positiveInt" }, { code: "string" }, { code: "time" }, { code: "unsignedInt" }, { code: "uri" }, { code: "url" }, { code: "uuid" }, { code: "Address" }, { code: "Age" }, { code: "Annotation" }, { code: "Attachment" }, { code: "CodeableConcept" }, { code: "Coding" }, { code: "ContactPoint" }, { code: "Count" }, { code: "Distance" }, { code: "Duration" }, { code: "HumanName" }, { code: "Identifier" }, { code: "Money" }, { code: "Period" }, { code: "Quantity" }, { code: "Range" }, { code: "Ratio" }, { code: "Reference" }, { code: "SampledData" }, { code: "Signature" }, { code: "Timing" }, { code: "ContactDetail" }, { code: "Contributor" }, { code: "DataRequirement" }, { code: "Expression" }, { code: "ParameterDefinition" }, { code: "RelatedArtifact" }, { code: "TriggerDefinition" }, { code: "UsageContext" }, { code: "Dosage" }, { code: "Meta" }] }, example: { max: 9007199254740991, type: [{ code: "ElementDefinitionExample" }] }, "minValue[x]": { type: [{ code: "date" }, { code: "dateTime" }, { code: "instant" }, { code: "time" }, { code: "decimal" }, { code: "integer" }, { code: "positiveInt" }, { code: "unsignedInt" }, { code: "Quantity" }] }, "maxValue[x]": { type: [{ code: "date" }, { code: "dateTime" }, { code: "instant" }, { code: "time" }, { code: "decimal" }, { code: "integer" }, { code: "positiveInt" }, { code: "unsignedInt" }, { code: "Quantity" }] }, maxLength: { type: [{ code: "integer" }] }, condition: { max: 9007199254740991, type: [{ code: "id" }] }, constraint: { max: 9007199254740991, type: [{ code: "ElementDefinitionConstraint" }] }, mustSupport: { type: [{ code: "boolean" }] }, isModifier: { type: [{ code: "boolean" }] }, isModifierReason: { type: [{ code: "string" }] }, isSummary: { type: [{ code: "boolean" }] }, binding: { type: [{ code: "ElementDefinitionBinding" }] }, mapping: { max: 9007199254740991, type: [{ code: "ElementDefinitionMapping" }] } } }, Expression: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, description: { type: [{ code: "string" }] }, name: { type: [{ code: "id" }] }, language: { min: 1, type: [{ code: "code" }] }, expression: { type: [{ code: "string" }] }, reference: { type: [{ code: "uri" }] } } }, Extension: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, url: { min: 1, type: [{ code: "uri" }] }, "value[x]": { type: [{ code: "base64Binary" }, { code: "boolean" }, { code: "canonical" }, { code: "code" }, { code: "date" }, { code: "dateTime" }, { code: "decimal" }, { code: "id" }, { code: "instant" }, { code: "integer" }, { code: "markdown" }, { code: "oid" }, { code: "positiveInt" }, { code: "string" }, { code: "time" }, { code: "unsignedInt" }, { code: "uri" }, { code: "url" }, { code: "uuid" }, { code: "Address" }, { code: "Age" }, { code: "Annotation" }, { code: "Attachment" }, { code: "CodeableConcept" }, { code: "Coding" }, { code: "ContactPoint" }, { code: "Count" }, { code: "Distance" }, { code: "Duration" }, { code: "HumanName" }, { code: "Identifier" }, { code: "Money" }, { code: "Period" }, { code: "Quantity" }, { code: "Range" }, { code: "Ratio" }, { code: "Reference" }, { code: "SampledData" }, { code: "Signature" }, { code: "Timing" }, { code: "ContactDetail" }, { code: "Contributor" }, { code: "DataRequirement" }, { code: "Expression" }, { code: "ParameterDefinition" }, { code: "RelatedArtifact" }, { code: "TriggerDefinition" }, { code: "UsageContext" }, { code: "Dosage" }, { code: "Meta" }] } } }, HumanName: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, use: { type: [{ code: "code" }] }, text: { type: [{ code: "string" }] }, family: { type: [{ code: "string" }] }, given: { max: 9007199254740991, type: [{ code: "string" }] }, prefix: { max: 9007199254740991, type: [{ code: "string" }] }, suffix: { max: 9007199254740991, type: [{ code: "string" }] }, period: { type: [{ code: "Period" }] } } }, Identifier: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, use: { type: [{ code: "code" }] }, type: { type: [{ code: "CodeableConcept" }] }, system: { type: [{ code: "uri" }] }, value: { type: [{ code: "string" }] }, period: { type: [{ code: "Period" }] }, assigner: { type: [{ code: "Reference", targetProfile: ["http://hl7.org/fhir/StructureDefinition/Organization"] }] } } }, MarketingStatus: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, modifierExtension: { max: 9007199254740991, type: [{ code: "Extension" }] }, country: { min: 1, type: [{ code: "CodeableConcept" }] }, jurisdiction: { type: [{ code: "CodeableConcept" }] }, status: { min: 1, type: [{ code: "CodeableConcept" }] }, dateRange: { min: 1, type: [{ code: "Period" }] }, restoreDate: { type: [{ code: "dateTime" }] } } }, Meta: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, versionId: { type: [{ code: "id" }] }, lastUpdated: { type: [{ code: "instant" }] }, source: { type: [{ code: "uri" }] }, profile: { max: 9007199254740991, type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/StructureDefinition"] }] }, security: { max: 9007199254740991, type: [{ code: "Coding" }] }, tag: { max: 9007199254740991, type: [{ code: "Coding" }] }, project: { type: [{ code: "uri" }] }, author: { type: [{ code: "Reference" }] }, onBehalfOf: { type: [{ code: "Reference" }] }, account: { type: [{ code: "Reference" }] }, compartment: { max: 9007199254740991, type: [{ code: "Reference" }] } } }, Money: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, currency: { type: [{ code: "code" }] } } }, Narrative: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, status: { min: 1, type: [{ code: "code" }] }, div: { min: 1, type: [{ code: "xhtml" }] } } }, ParameterDefinition: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, name: { type: [{ code: "code" }] }, use: { min: 1, type: [{ code: "code" }] }, min: { type: [{ code: "integer" }] }, max: { type: [{ code: "string" }] }, documentation: { type: [{ code: "string" }] }, type: { min: 1, type: [{ code: "code" }] }, profile: { type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/StructureDefinition"] }] } } }, Period: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, start: { type: [{ code: "dateTime" }] }, end: { type: [{ code: "dateTime" }] } } }, Population: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, modifierExtension: { max: 9007199254740991, type: [{ code: "Extension" }] }, "age[x]": { type: [{ code: "Range" }, { code: "CodeableConcept" }] }, gender: { type: [{ code: "CodeableConcept" }] }, race: { type: [{ code: "CodeableConcept" }] }, physiologicalCondition: { type: [{ code: "CodeableConcept" }] } } }, ProdCharacteristic: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, modifierExtension: { max: 9007199254740991, type: [{ code: "Extension" }] }, height: { type: [{ code: "Quantity" }] }, width: { type: [{ code: "Quantity" }] }, depth: { type: [{ code: "Quantity" }] }, weight: { type: [{ code: "Quantity" }] }, nominalVolume: { type: [{ code: "Quantity" }] }, externalDiameter: { type: [{ code: "Quantity" }] }, shape: { type: [{ code: "string" }] }, color: { max: 9007199254740991, type: [{ code: "string" }] }, imprint: { max: 9007199254740991, type: [{ code: "string" }] }, image: { max: 9007199254740991, type: [{ code: "Attachment" }] }, scoring: { type: [{ code: "CodeableConcept" }] } } }, ProductShelfLife: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, modifierExtension: { max: 9007199254740991, type: [{ code: "Extension" }] }, identifier: { type: [{ code: "Identifier" }] }, type: { min: 1, type: [{ code: "CodeableConcept" }] }, period: { min: 1, type: [{ code: "Quantity" }] }, specialPrecautionsForStorage: { max: 9007199254740991, type: [{ code: "CodeableConcept" }] } } }, Quantity: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, comparator: { type: [{ code: "code" }] }, unit: { type: [{ code: "string" }] }, system: { type: [{ code: "uri" }] }, code: { type: [{ code: "code" }] } } }, Range: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, low: { type: [{ code: "Quantity", profile: ["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"] }] }, high: { type: [{ code: "Quantity", profile: ["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"] }] } } }, Ratio: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, numerator: { type: [{ code: "Quantity" }] }, denominator: { type: [{ code: "Quantity" }] } } }, Reference: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, reference: { type: [{ code: "string" }] }, type: { type: [{ code: "uri" }] }, identifier: { type: [{ code: "Identifier" }] }, display: { type: [{ code: "string" }] } } }, RelatedArtifact: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, type: { min: 1, type: [{ code: "code" }] }, label: { type: [{ code: "string" }] }, display: { type: [{ code: "string" }] }, citation: { type: [{ code: "markdown" }] }, url: { type: [{ code: "url" }] }, document: { type: [{ code: "Attachment" }] }, resource: { type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/Resource"] }] } } }, SampledData: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, origin: { min: 1, type: [{ code: "Quantity", profile: ["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"] }] }, period: { min: 1, type: [{ code: "decimal" }] }, factor: { type: [{ code: "decimal" }] }, lowerLimit: { type: [{ code: "decimal" }] }, upperLimit: { type: [{ code: "decimal" }] }, dimensions: { min: 1, type: [{ code: "positiveInt" }] }, data: { type: [{ code: "string" }] } } }, Signature: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, type: { min: 1, max: 9007199254740991, type: [{ code: "Coding" }] }, when: { min: 1, type: [{ code: "instant" }] }, who: { min: 1, type: [{ code: "Reference", targetProfile: ["http://hl7.org/fhir/StructureDefinition/Practitioner", "http://hl7.org/fhir/StructureDefinition/PractitionerRole", "http://hl7.org/fhir/StructureDefinition/RelatedPerson", "http://hl7.org/fhir/StructureDefinition/Patient", "http://hl7.org/fhir/StructureDefinition/Device", "http://hl7.org/fhir/StructureDefinition/Organization"] }] }, onBehalfOf: { type: [{ code: "Reference", targetProfile: ["http://hl7.org/fhir/StructureDefinition/Practitioner", "http://hl7.org/fhir/StructureDefinition/PractitionerRole", "http://hl7.org/fhir/StructureDefinition/RelatedPerson", "http://hl7.org/fhir/StructureDefinition/Patient", "http://hl7.org/fhir/StructureDefinition/Device", "http://hl7.org/fhir/StructureDefinition/Organization"] }] }, targetFormat: { type: [{ code: "code" }] }, sigFormat: { type: [{ code: "code" }] }, data: { type: [{ code: "base64Binary" }] } } }, SubstanceAmount: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, modifierExtension: { max: 9007199254740991, type: [{ code: "Extension" }] }, "amount[x]": { type: [{ code: "Quantity" }, { code: "Range" }, { code: "string" }] }, amountType: { type: [{ code: "CodeableConcept" }] }, amountText: { type: [{ code: "string" }] }, referenceRange: { type: [{ code: "SubstanceAmountReferenceRange" }] } } }, Timing: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, modifierExtension: { max: 9007199254740991, type: [{ code: "Extension" }] }, event: { max: 9007199254740991, type: [{ code: "dateTime" }] }, repeat: { type: [{ code: "TimingRepeat" }] }, code: { type: [{ code: "CodeableConcept" }] } } }, TriggerDefinition: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, type: { min: 1, type: [{ code: "code" }] }, name: { type: [{ code: "string" }] }, "timing[x]": { type: [{ code: "Timing" }, { code: "Reference", targetProfile: ["http://hl7.org/fhir/StructureDefinition/Schedule"] }, { code: "date" }, { code: "dateTime" }] }, data: { max: 9007199254740991, type: [{ code: "DataRequirement" }] }, condition: { type: [{ code: "Expression" }] } } }, UsageContext: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, code: { min: 1, type: [{ code: "Coding" }] }, "value[x]": { min: 1, type: [{ code: "CodeableConcept" }, { code: "Quantity" }, { code: "Range" }, { code: "Reference", targetProfile: ["http://hl7.org/fhir/StructureDefinition/PlanDefinition", "http://hl7.org/fhir/StructureDefinition/ResearchStudy", "http://hl7.org/fhir/StructureDefinition/InsurancePlan", "http://hl7.org/fhir/StructureDefinition/HealthcareService", "http://hl7.org/fhir/StructureDefinition/Group", "http://hl7.org/fhir/StructureDefinition/Location", "http://hl7.org/fhir/StructureDefinition/Organization"] }] } } }, MoneyQuantity: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, comparator: { type: [{ code: "code" }] }, unit: { type: [{ code: "string" }] }, system: { type: [{ code: "uri" }] }, code: { type: [{ code: "code" }] } } }, SimpleQuantity: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, comparator: { max: 0, type: [{ code: "code" }] }, unit: { type: [{ code: "string" }] }, system: { type: [{ code: "uri" }] }, code: { type: [{ code: "code" }] } } }, IdentityProvider: { elements: { authorizeUrl: { min: 1, type: [{ code: "string" }] }, tokenUrl: { min: 1, type: [{ code: "string" }] }, tokenAuthMethod: { type: [{ code: "code" }] }, userInfoUrl: { min: 1, type: [{ code: "string" }] }, clientId: { min: 1, type: [{ code: "string" }] }, clientSecret: { min: 1, type: [{ code: "string" }] }, usePkce: { type: [{ code: "boolean" }] }, useSubject: { type: [{ code: "boolean" }] } } } };
|
|
42606
42606
|
function zt(r6) {
|
|
42607
42607
|
return new Qt(r6).parse();
|
|
42608
42608
|
}
|
|
42609
|
-
var ke = Xr
|
|
42609
|
+
var ke = Zr(Xr);
|
|
42610
42610
|
var Jt = /* @__PURE__ */ Object.create(null);
|
|
42611
|
-
var
|
|
42611
|
+
var en = /* @__PURE__ */ Object.create(null);
|
|
42612
42612
|
function Ht(r6) {
|
|
42613
42613
|
let e;
|
|
42614
|
-
return r6 ? (e =
|
|
42614
|
+
return r6 ? (e = en[r6], e || (e = en[r6] = /* @__PURE__ */ Object.create(null))) : e = ke, e;
|
|
42615
42615
|
}
|
|
42616
42616
|
function Yt(r6, e) {
|
|
42617
42617
|
let t = Array.isArray(r6) ? r6 : r6.entry?.map((n) => n.resource) ?? [];
|
|
@@ -42624,14 +42624,14 @@ function Zt(r6, e) {
|
|
|
42624
42624
|
n[r6.name] = t, e && r6.url === e && (Jt[e] = t);
|
|
42625
42625
|
for (let i of t.innerTypes) i.parentType = t, n[i.name] = i;
|
|
42626
42626
|
}
|
|
42627
|
-
function
|
|
42627
|
+
function sn(r6) {
|
|
42628
42628
|
return !!ke[r6];
|
|
42629
42629
|
}
|
|
42630
42630
|
function Ve(r6, e) {
|
|
42631
42631
|
let t = Ht(e)[r6];
|
|
42632
42632
|
return !t && e && (t = Ht()[r6]), t;
|
|
42633
42633
|
}
|
|
42634
|
-
function
|
|
42634
|
+
function cn(r6) {
|
|
42635
42635
|
return !!Jt[r6];
|
|
42636
42636
|
}
|
|
42637
42637
|
var Qt = class {
|
|
@@ -42677,7 +42677,7 @@ var Qt = class {
|
|
|
42677
42677
|
this.backboneContext = { type: { name: Kt(e), title: e.label, description: e.definition, elements: {}, constraints: this.parseElementDefinition(e).constraints, innerTypes: [] }, path: e.path ?? "", parent: ve(this.backboneContext?.path, e.path) ? this.backboneContext : this.backboneContext?.parent };
|
|
42678
42678
|
}
|
|
42679
42679
|
enterSlice(e, t) {
|
|
42680
|
-
|
|
42680
|
+
_i(e) && !this.peek()?.sliceName || (t.slicing = { discriminator: (e.slicing?.discriminator ?? []).map((n) => {
|
|
42681
42681
|
if (n.type !== "value" && n.type !== "pattern" && n.type !== "type") throw new Error(`Unsupported slicing discriminator type: ${n.type}`);
|
|
42682
42682
|
return { path: n.path, type: n.type };
|
|
42683
42683
|
}), slices: [], ordered: e.slicing?.ordered ?? false, rule: e.slicing?.rules }, this.slicingContext = { field: t.slicing, path: e.path ?? "" });
|
|
@@ -42718,26 +42718,26 @@ var Qt = class {
|
|
|
42718
42718
|
});
|
|
42719
42719
|
}
|
|
42720
42720
|
parseElementDefinition(e) {
|
|
42721
|
-
let t =
|
|
42722
|
-
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:
|
|
42721
|
+
let t = rn(e.max), n = e.base?.max ? rn(e.base.max) : t, i = { type: "ElementDefinition", value: e };
|
|
42722
|
+
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: nn(C(i, "fixed[x]")), pattern: nn(C(i, "pattern[x]")), binding: e.binding };
|
|
42723
42723
|
}
|
|
42724
42724
|
};
|
|
42725
|
-
function
|
|
42725
|
+
function rn(r6) {
|
|
42726
42726
|
return r6 === "*" ? Number.POSITIVE_INFINITY : Number.parseInt(r6, 10);
|
|
42727
42727
|
}
|
|
42728
42728
|
function Gt(r6, e = "") {
|
|
42729
|
-
return
|
|
42729
|
+
return Fi(r6.path, e);
|
|
42730
42730
|
}
|
|
42731
|
-
function
|
|
42731
|
+
function Fi(r6, e) {
|
|
42732
42732
|
return r6 ? e && r6.startsWith(e) ? r6.substring(e.length + 1) : r6 : "";
|
|
42733
42733
|
}
|
|
42734
42734
|
function ve(r6, e) {
|
|
42735
42735
|
return !r6 || !e ? false : e.startsWith(r6 + ".") || e === r6;
|
|
42736
42736
|
}
|
|
42737
|
-
function
|
|
42737
|
+
function nn(r6) {
|
|
42738
42738
|
return Array.isArray(r6) && r6.length > 0 ? r6[0] : S(r6) ? void 0 : r6;
|
|
42739
42739
|
}
|
|
42740
|
-
function
|
|
42740
|
+
function _i(r6) {
|
|
42741
42741
|
let e = r6.slicing?.discriminator;
|
|
42742
42742
|
return !!(r6.type?.some((t) => t.code === "Extension") && e?.length === 1 && e[0].type === "value" && e[0].path === "url");
|
|
42743
42743
|
}
|
|
@@ -42752,7 +42752,7 @@ function d(r6) {
|
|
|
42752
42752
|
function x(r6) {
|
|
42753
42753
|
return r6 == null ? { type: "undefined", value: void 0 } : Number.isSafeInteger(r6) ? { type: l.integer, value: r6 } : typeof r6 == "number" ? { type: l.decimal, value: r6 } : typeof r6 == "boolean" ? { type: l.boolean, value: r6 } : typeof r6 == "string" ? { type: l.string, value: r6 } : k(r6) ? { type: l.Quantity, value: r6 } : I(r6) ? { type: r6.resourceType, value: r6 } : { type: l.BackboneElement, value: r6 };
|
|
42754
42754
|
}
|
|
42755
|
-
function
|
|
42755
|
+
function N(r6) {
|
|
42756
42756
|
return r6.length === 0 ? false : !!r6[0].value;
|
|
42757
42757
|
}
|
|
42758
42758
|
function B(r6, e) {
|
|
@@ -42764,9 +42764,9 @@ function B(r6, e) {
|
|
|
42764
42764
|
function C(r6, e, t) {
|
|
42765
42765
|
if (!r6.value) return;
|
|
42766
42766
|
let n = tt(r6.type, e, t?.profileUrl);
|
|
42767
|
-
return n ?
|
|
42767
|
+
return n ? zi(r6, e, n) : Ji(r6, e);
|
|
42768
42768
|
}
|
|
42769
|
-
function
|
|
42769
|
+
function zi(r6, e, t) {
|
|
42770
42770
|
let n = r6.value, i = t.type;
|
|
42771
42771
|
if (!i || i.length === 0) return;
|
|
42772
42772
|
let o, s = "undefined", a2;
|
|
@@ -42782,14 +42782,14 @@ function Ki(r6, e, t) {
|
|
|
42782
42782
|
} else console.assert(i.length === 1, "Expected single type", t.path), o = n[e], s = i[0].code, a2 = n["_" + e];
|
|
42783
42783
|
if (a2) if (Array.isArray(o)) {
|
|
42784
42784
|
o = o.slice();
|
|
42785
|
-
for (let c = 0; c < Math.max(o.length, a2.length); c++) o[c] =
|
|
42786
|
-
} else o =
|
|
42787
|
-
if (!S(o)) return (s === "Element" || s === "BackboneElement") && (s = t.type[0].code), Array.isArray(o) ? o.map((c) =>
|
|
42785
|
+
for (let c = 0; c < Math.max(o.length, a2.length); c++) o[c] = hn(o[c], a2[c]);
|
|
42786
|
+
} else o = hn(o, a2);
|
|
42787
|
+
if (!S(o)) return (s === "Element" || s === "BackboneElement") && (s = t.type[0].code), Array.isArray(o) ? o.map((c) => pn(c, s)) : pn(o, s);
|
|
42788
42788
|
}
|
|
42789
|
-
function
|
|
42789
|
+
function pn(r6, e) {
|
|
42790
42790
|
return e === "Resource" && I(r6) && (e = r6.resourceType), { type: e, value: r6 };
|
|
42791
42791
|
}
|
|
42792
|
-
function
|
|
42792
|
+
function Ji(r6, e) {
|
|
42793
42793
|
let t = r6.value;
|
|
42794
42794
|
if (!t || typeof t != "object") return;
|
|
42795
42795
|
let n;
|
|
@@ -42807,7 +42807,7 @@ function Xe(r6) {
|
|
|
42807
42807
|
let e = [];
|
|
42808
42808
|
for (let t of r6) {
|
|
42809
42809
|
let n = false;
|
|
42810
|
-
for (let i of e) if (
|
|
42810
|
+
for (let i of e) if (N(or(t, i))) {
|
|
42811
42811
|
n = true;
|
|
42812
42812
|
break;
|
|
42813
42813
|
}
|
|
@@ -42815,24 +42815,27 @@ function Xe(r6) {
|
|
|
42815
42815
|
}
|
|
42816
42816
|
return e;
|
|
42817
42817
|
}
|
|
42818
|
-
function
|
|
42819
|
-
return d(!
|
|
42820
|
-
}
|
|
42821
|
-
function sr(r6, e) {
|
|
42822
|
-
return r6.length === 0 || e.length === 0 ? [] : r6.length !== e.length ? d(false) : d(r6.every((t, n) => _(gn(t, e[n]))));
|
|
42818
|
+
function yn(r6) {
|
|
42819
|
+
return d(!N(r6));
|
|
42823
42820
|
}
|
|
42824
42821
|
function gn(r6, e) {
|
|
42822
|
+
return r6.length === 0 || e.length === 0 ? [] : r6.length !== e.length ? d(false) : d(r6.every((t, n) => N(or(t, e[n]))));
|
|
42823
|
+
}
|
|
42824
|
+
function xn(r6, e) {
|
|
42825
|
+
return r6.length === 0 || e.length === 0 ? [] : r6.length !== e.length ? d(true) : d(r6.some((t, n) => !N(or(t, e[n]))));
|
|
42826
|
+
}
|
|
42827
|
+
function or(r6, e) {
|
|
42825
42828
|
let t = r6.value?.valueOf(), n = e.value?.valueOf();
|
|
42826
|
-
return typeof t == "number" && typeof n == "number" ? d(Math.abs(t - n) < 1e-8) : k(t) && k(n) ? d(
|
|
42829
|
+
return typeof t == "number" && typeof n == "number" ? d(Math.abs(t - n) < 1e-8) : k(t) && k(n) ? d(Sn(t, n)) : d(typeof t == "object" && typeof n == "object" ? ar(r6, e) : t === n);
|
|
42827
42830
|
}
|
|
42828
|
-
function
|
|
42829
|
-
return r6.length === 0 && e.length === 0 ? d(true) : r6.length !== e.length ? d(false) : (r6.sort(
|
|
42831
|
+
function sr(r6, e) {
|
|
42832
|
+
return r6.length === 0 && e.length === 0 ? d(true) : r6.length !== e.length ? d(false) : (r6.sort(dn), e.sort(dn), d(r6.every((t, n) => N(Yi(t, e[n])))));
|
|
42830
42833
|
}
|
|
42831
|
-
function
|
|
42834
|
+
function Yi(r6, e) {
|
|
42832
42835
|
let { type: t, value: n } = r6, { type: i, value: o } = e, s = n?.valueOf(), a2 = o?.valueOf();
|
|
42833
|
-
return typeof s == "number" && typeof a2 == "number" ? d(Math.abs(s - a2) < 0.01) : k(s) && k(a2) ? d(
|
|
42836
|
+
return typeof s == "number" && typeof a2 == "number" ? d(Math.abs(s - a2) < 0.01) : k(s) && k(a2) ? d(Sn(s, a2)) : d(t === "Coding" && i === "Coding" ? typeof s != "object" || typeof a2 != "object" ? false : s.code === a2.code && s.system === a2.system : typeof s == "object" && typeof a2 == "object" ? ar({ ...s, id: void 0 }, { ...a2, id: void 0 }) : typeof s == "string" && typeof a2 == "string" ? s.toLowerCase() === a2.toLowerCase() : s === a2);
|
|
42834
42837
|
}
|
|
42835
|
-
function
|
|
42838
|
+
function dn(r6, e) {
|
|
42836
42839
|
let t = r6.value?.valueOf(), n = e.value?.valueOf();
|
|
42837
42840
|
return typeof t == "number" && typeof n == "number" ? t - n : typeof t == "string" && typeof n == "string" ? t.localeCompare(n) : 0;
|
|
42838
42841
|
}
|
|
@@ -42846,60 +42849,60 @@ function et(r6, e) {
|
|
|
42846
42849
|
case "Integer":
|
|
42847
42850
|
return typeof t == "number";
|
|
42848
42851
|
case "Date":
|
|
42849
|
-
return
|
|
42852
|
+
return vn(t);
|
|
42850
42853
|
case "DateTime":
|
|
42851
42854
|
return Ze(t);
|
|
42852
42855
|
case "Time":
|
|
42853
42856
|
return typeof t == "string" && !!/^T\d/.exec(t);
|
|
42854
42857
|
case "Period":
|
|
42855
|
-
return
|
|
42858
|
+
return Tn(t);
|
|
42856
42859
|
case "Quantity":
|
|
42857
42860
|
return k(t);
|
|
42858
42861
|
default:
|
|
42859
42862
|
return typeof t == "object" && t?.resourceType === e;
|
|
42860
42863
|
}
|
|
42861
42864
|
}
|
|
42862
|
-
function
|
|
42865
|
+
function vn(r6) {
|
|
42863
42866
|
return typeof r6 == "string" && !!Ye.date.exec(r6);
|
|
42864
42867
|
}
|
|
42865
42868
|
function Ze(r6) {
|
|
42866
42869
|
return typeof r6 == "string" && !!Ye.dateTime.exec(r6);
|
|
42867
42870
|
}
|
|
42868
|
-
function
|
|
42871
|
+
function Tn(r6) {
|
|
42869
42872
|
return !!(r6 && typeof r6 == "object" && ("start" in r6 && Ze(r6.start) || "end" in r6 && Ze(r6.end)));
|
|
42870
42873
|
}
|
|
42871
42874
|
function k(r6) {
|
|
42872
42875
|
return !!(r6 && typeof r6 == "object" && "value" in r6 && typeof r6.value == "number");
|
|
42873
42876
|
}
|
|
42874
|
-
function
|
|
42877
|
+
function Sn(r6, e) {
|
|
42875
42878
|
return Math.abs(r6.value - e.value) < 0.01 && (r6.unit === e.unit || r6.code === e.code || r6.unit === e.code || r6.code === e.unit);
|
|
42876
42879
|
}
|
|
42877
|
-
function
|
|
42880
|
+
function ar(r6, e) {
|
|
42878
42881
|
let t = Object.keys(r6), n = Object.keys(e);
|
|
42879
42882
|
if (t.length !== n.length) return false;
|
|
42880
42883
|
for (let i of t) {
|
|
42881
42884
|
let o = r6[i], s = e[i];
|
|
42882
|
-
if (
|
|
42883
|
-
if (!
|
|
42885
|
+
if (mn(o) && mn(s)) {
|
|
42886
|
+
if (!ar(o, s)) return false;
|
|
42884
42887
|
} else if (o !== s) return false;
|
|
42885
42888
|
}
|
|
42886
42889
|
return true;
|
|
42887
42890
|
}
|
|
42888
|
-
function
|
|
42891
|
+
function mn(r6) {
|
|
42889
42892
|
return r6 !== null && typeof r6 == "object";
|
|
42890
42893
|
}
|
|
42891
|
-
function
|
|
42894
|
+
function hn(r6, e) {
|
|
42892
42895
|
if (e) {
|
|
42893
42896
|
if (typeof e != "object") throw new Error("Primitive extension must be an object");
|
|
42894
|
-
return
|
|
42897
|
+
return Zi(r6 ?? {}, e);
|
|
42895
42898
|
}
|
|
42896
42899
|
return r6;
|
|
42897
42900
|
}
|
|
42898
|
-
function
|
|
42901
|
+
function Zi(r6, e) {
|
|
42899
42902
|
return delete e.__proto__, delete e.constructor, Object.assign(r6, e);
|
|
42900
42903
|
}
|
|
42901
42904
|
function te(r6) {
|
|
42902
|
-
let e = ue(r6), t =
|
|
42905
|
+
let e = ue(r6), t = eo(r6);
|
|
42903
42906
|
return t === e ? { reference: e } : { reference: e, display: t };
|
|
42904
42907
|
}
|
|
42905
42908
|
function ue(r6) {
|
|
@@ -42908,36 +42911,34 @@ function ue(r6) {
|
|
|
42908
42911
|
function Se(r6) {
|
|
42909
42912
|
if (r6) return ce(r6) ? r6.reference.split("/")[1] : r6.id;
|
|
42910
42913
|
}
|
|
42911
|
-
function
|
|
42914
|
+
function Xi(r6) {
|
|
42912
42915
|
return r6.resourceType === "Patient" || r6.resourceType === "Practitioner" || r6.resourceType === "RelatedPerson";
|
|
42913
42916
|
}
|
|
42914
|
-
function
|
|
42915
|
-
if (
|
|
42916
|
-
let e =
|
|
42917
|
+
function eo(r6) {
|
|
42918
|
+
if (Xi(r6)) {
|
|
42919
|
+
let e = to(r6);
|
|
42917
42920
|
if (e) return e;
|
|
42918
42921
|
}
|
|
42919
42922
|
if (r6.resourceType === "Device") {
|
|
42920
|
-
let e =
|
|
42923
|
+
let e = ro(r6);
|
|
42921
42924
|
if (e) return e;
|
|
42922
42925
|
}
|
|
42923
|
-
if (r6.resourceType === "MedicationRequest")
|
|
42924
|
-
|
|
42925
|
-
if (e) return rt(e);
|
|
42926
|
-
}
|
|
42926
|
+
if (r6.resourceType === "MedicationRequest" && r6.medicationCodeableConcept) return rt(r6.medicationCodeableConcept);
|
|
42927
|
+
if (r6.resourceType === "Subscription" && r6.criteria) return r6.criteria;
|
|
42927
42928
|
if (r6.resourceType === "User" && r6.email) return r6.email;
|
|
42928
42929
|
if ("name" in r6 && r6.name && typeof r6.name == "string") return r6.name;
|
|
42929
42930
|
if ("code" in r6 && r6.code) {
|
|
42930
42931
|
let e = r6.code;
|
|
42931
|
-
if (Array.isArray(e) && (e = e[0]),
|
|
42932
|
-
if (
|
|
42932
|
+
if (Array.isArray(e) && (e = e[0]), fo(e)) return rt(e);
|
|
42933
|
+
if (mo(e)) return e.text;
|
|
42933
42934
|
}
|
|
42934
42935
|
return ue(r6);
|
|
42935
42936
|
}
|
|
42936
|
-
function
|
|
42937
|
+
function to(r6) {
|
|
42937
42938
|
let e = r6.name;
|
|
42938
42939
|
if (e && e.length > 0) return ot(e[0]);
|
|
42939
42940
|
}
|
|
42940
|
-
function
|
|
42941
|
+
function ro(r6) {
|
|
42941
42942
|
let e = r6.deviceName;
|
|
42942
42943
|
if (e && e.length > 0) return e[0].name;
|
|
42943
42944
|
}
|
|
@@ -42958,13 +42959,13 @@ function X(r6, ...e) {
|
|
|
42958
42959
|
for (let n = 0; n < e.length && t; n++) t = t?.extension?.find((i) => i.url === e[n]);
|
|
42959
42960
|
return t;
|
|
42960
42961
|
}
|
|
42961
|
-
function
|
|
42962
|
-
return JSON.stringify(r6,
|
|
42962
|
+
function Pn(r6, e) {
|
|
42963
|
+
return JSON.stringify(r6, io, e ? 2 : void 0);
|
|
42963
42964
|
}
|
|
42964
|
-
function
|
|
42965
|
-
return !
|
|
42965
|
+
function io(r6, e) {
|
|
42966
|
+
return !oo(r6) && S(e) ? void 0 : e;
|
|
42966
42967
|
}
|
|
42967
|
-
function
|
|
42968
|
+
function oo(r6) {
|
|
42968
42969
|
return !!/\d+$/.exec(r6);
|
|
42969
42970
|
}
|
|
42970
42971
|
function S(r6) {
|
|
@@ -42978,14 +42979,14 @@ function H(r6) {
|
|
|
42978
42979
|
return e === "string" && r6 !== "" || e === "object" && ("length" in r6 && r6.length > 0 || Object.keys(r6).length > 0);
|
|
42979
42980
|
}
|
|
42980
42981
|
function ee(r6, e, t) {
|
|
42981
|
-
return r6 === e || S(r6) && S(e) ? true : S(r6) || S(e) ? false : Array.isArray(r6) && Array.isArray(e) ?
|
|
42982
|
+
return r6 === e || S(r6) && S(e) ? true : S(r6) || S(e) ? false : Array.isArray(r6) && Array.isArray(e) ? so(r6, e) : Array.isArray(r6) || Array.isArray(e) ? false : b(r6) && b(e) ? ao(r6, e, t) : (b(r6) || b(e), false);
|
|
42982
42983
|
}
|
|
42983
|
-
function
|
|
42984
|
+
function so(r6, e) {
|
|
42984
42985
|
if (r6.length !== e.length) return false;
|
|
42985
42986
|
for (let t = 0; t < r6.length; t++) if (!ee(r6[t], e[t])) return false;
|
|
42986
42987
|
return true;
|
|
42987
42988
|
}
|
|
42988
|
-
function
|
|
42989
|
+
function ao(r6, e, t) {
|
|
42989
42990
|
let n = /* @__PURE__ */ new Set();
|
|
42990
42991
|
Object.keys(r6).forEach((i) => n.add(i)), Object.keys(e).forEach((i) => n.add(i)), t === "meta" && (n.delete("versionId"), n.delete("lastUpdated"), n.delete("author"));
|
|
42991
42992
|
for (let i of n) {
|
|
@@ -42997,29 +42998,29 @@ function so(r6, e, t) {
|
|
|
42997
42998
|
function b(r6) {
|
|
42998
42999
|
return r6 !== null && typeof r6 == "object";
|
|
42999
43000
|
}
|
|
43000
|
-
function
|
|
43001
|
-
return r6.every(
|
|
43002
|
-
}
|
|
43003
|
-
function uo(r6) {
|
|
43004
|
-
return typeof r6 == "string";
|
|
43001
|
+
function Cn(r6) {
|
|
43002
|
+
return r6.every(lo);
|
|
43005
43003
|
}
|
|
43006
43004
|
function lo(r6) {
|
|
43007
|
-
return
|
|
43005
|
+
return typeof r6 == "string";
|
|
43008
43006
|
}
|
|
43009
43007
|
function po(r6) {
|
|
43010
|
-
return b(r6) && "
|
|
43008
|
+
return b(r6) && "code" in r6 && typeof r6.code == "string";
|
|
43011
43009
|
}
|
|
43012
43010
|
function fo(r6) {
|
|
43011
|
+
return b(r6) && "coding" in r6 && Array.isArray(r6.coding) && r6.coding.every(po);
|
|
43012
|
+
}
|
|
43013
|
+
function mo(r6) {
|
|
43013
43014
|
return b(r6) && "text" in r6 && typeof r6.text == "string";
|
|
43014
43015
|
}
|
|
43015
|
-
var
|
|
43016
|
-
for (let r6 = 0; r6 < 256; r6++)
|
|
43017
|
-
function
|
|
43016
|
+
var wn = [];
|
|
43017
|
+
for (let r6 = 0; r6 < 256; r6++) wn.push(r6.toString(16).padStart(2, "0"));
|
|
43018
|
+
function An(r6) {
|
|
43018
43019
|
let e = new Uint8Array(r6), t = new Array(e.length);
|
|
43019
|
-
for (let n = 0; n < e.length; n++) t[n] =
|
|
43020
|
+
for (let n = 0; n < e.length; n++) t[n] = wn[e[n]];
|
|
43020
43021
|
return t.join("");
|
|
43021
43022
|
}
|
|
43022
|
-
function
|
|
43023
|
+
function On(r6) {
|
|
43023
43024
|
let e = new Uint8Array(r6), t = [];
|
|
43024
43025
|
for (let n = 0; n < e.length; n++) t[n] = String.fromCharCode(e[n]);
|
|
43025
43026
|
return window.btoa(t.join(""));
|
|
@@ -43027,30 +43028,30 @@ function An(r6) {
|
|
|
43027
43028
|
function w(r6) {
|
|
43028
43029
|
return r6 ? r6.charAt(0).toUpperCase() + r6.substring(1) : "";
|
|
43029
43030
|
}
|
|
43030
|
-
var
|
|
43031
|
+
var lr = (r6) => new Promise((e) => {
|
|
43031
43032
|
setTimeout(e, r6);
|
|
43032
43033
|
});
|
|
43033
43034
|
function it(r6) {
|
|
43034
43035
|
return r6.sort((e, t) => e.localeCompare(t));
|
|
43035
43036
|
}
|
|
43036
|
-
function
|
|
43037
|
+
function dr(r6) {
|
|
43037
43038
|
return r6.endsWith("/") ? r6 : r6 + "/";
|
|
43038
43039
|
}
|
|
43039
|
-
function
|
|
43040
|
+
function To(r6) {
|
|
43040
43041
|
return r6.startsWith("/") ? r6.slice(1) : r6;
|
|
43041
43042
|
}
|
|
43042
43043
|
function j(r6, e) {
|
|
43043
|
-
return new URL(
|
|
43044
|
+
return new URL(To(e), dr(r6.toString())).toString();
|
|
43044
43045
|
}
|
|
43045
|
-
function
|
|
43046
|
+
function Dn(r6, e) {
|
|
43046
43047
|
return j(r6, e).toString().replace("http://", "ws://").replace("https://", "wss://");
|
|
43047
43048
|
}
|
|
43048
|
-
function
|
|
43049
|
+
function Mn(r6) {
|
|
43049
43050
|
return typeof r6 == "object" && !Array.isArray(r6) && !(r6 instanceof URLSearchParams) && (r6 = Object.fromEntries(Object.entries(r6).filter((e) => e[1] !== void 0))), new URLSearchParams(r6).toString();
|
|
43050
43051
|
}
|
|
43051
|
-
var
|
|
43052
|
-
function
|
|
43053
|
-
return
|
|
43052
|
+
var So = /^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-_]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-_]*[A-Za-z0-9])$/;
|
|
43053
|
+
function Ru(r6) {
|
|
43054
|
+
return So.test(r6);
|
|
43054
43055
|
}
|
|
43055
43056
|
function ot(r6, e) {
|
|
43056
43057
|
let t = [];
|
|
@@ -43063,33 +43064,33 @@ function ot(r6, e) {
|
|
|
43063
43064
|
function rt(r6) {
|
|
43064
43065
|
if (!r6) return "";
|
|
43065
43066
|
let e = Re(r6.text);
|
|
43066
|
-
return e || (r6.coding ? r6.coding.map((t) =>
|
|
43067
|
+
return e || (r6.coding ? r6.coding.map((t) => wo(t)).join(", ") : "");
|
|
43067
43068
|
}
|
|
43068
|
-
function
|
|
43069
|
+
function wo(r6) {
|
|
43069
43070
|
return Re(r6?.display) ?? Re(r6?.code) ?? "";
|
|
43070
43071
|
}
|
|
43071
43072
|
function Re(r6) {
|
|
43072
43073
|
return typeof r6 == "string" ? r6 : void 0;
|
|
43073
43074
|
}
|
|
43074
43075
|
var l = { Address: "Address", Age: "Age", Annotation: "Annotation", Attachment: "Attachment", BackboneElement: "BackboneElement", CodeableConcept: "CodeableConcept", Coding: "Coding", ContactDetail: "ContactDetail", ContactPoint: "ContactPoint", Contributor: "Contributor", Count: "Count", DataRequirement: "DataRequirement", Distance: "Distance", Dosage: "Dosage", Duration: "Duration", Expression: "Expression", Extension: "Extension", HumanName: "HumanName", Identifier: "Identifier", MarketingStatus: "MarketingStatus", Meta: "Meta", Money: "Money", Narrative: "Narrative", ParameterDefinition: "ParameterDefinition", Period: "Period", Population: "Population", ProdCharacteristic: "ProdCharacteristic", ProductShelfLife: "ProductShelfLife", Quantity: "Quantity", Range: "Range", Ratio: "Ratio", Reference: "Reference", RelatedArtifact: "RelatedArtifact", SampledData: "SampledData", Signature: "Signature", SubstanceAmount: "SubstanceAmount", SystemString: "http://hl7.org/fhirpath/System.String", Timing: "Timing", TriggerDefinition: "TriggerDefinition", UsageContext: "UsageContext", base64Binary: "base64Binary", boolean: "boolean", canonical: "canonical", code: "code", date: "date", dateTime: "dateTime", decimal: "decimal", id: "id", instant: "instant", integer: "integer", markdown: "markdown", oid: "oid", positiveInt: "positiveInt", string: "string", time: "time", unsignedInt: "unsignedInt", uri: "uri", url: "url", uuid: "uuid" };
|
|
43075
|
-
function
|
|
43076
|
+
function hr(r6) {
|
|
43076
43077
|
for (let e of r6.base ?? []) {
|
|
43077
|
-
let t =
|
|
43078
|
-
t || (t = { searchParamsDetails: {} },
|
|
43078
|
+
let t = F.types[e];
|
|
43079
|
+
t || (t = { searchParamsDetails: {} }, F.types[e] = t), t.searchParams || (t.searchParams = { _id: { base: [e], code: "_id", type: "token", expression: e + ".id" }, _lastUpdated: { base: [e], code: "_lastUpdated", type: "date", expression: e + ".meta.lastUpdated" }, _compartment: { base: [e], code: "_compartment", type: "reference", expression: e + ".meta.compartment" }, _profile: { base: [e], code: "_profile", type: "uri", expression: e + ".meta.profile" }, _security: { base: [e], code: "_security", type: "token", expression: e + ".meta.security" }, _source: { base: [e], code: "_source", type: "uri", expression: e + ".meta.source" }, _tag: { base: [e], code: "_tag", type: "token", expression: e + ".meta.tag" } }), t.searchParams[r6.code] = r6;
|
|
43079
43080
|
}
|
|
43080
43081
|
}
|
|
43081
43082
|
function Kt(r6) {
|
|
43082
43083
|
let e = r6.type?.[0]?.code;
|
|
43083
|
-
return e === "BackboneElement" || e === "Element" ?
|
|
43084
|
+
return e === "BackboneElement" || e === "Element" ? ko((r6.base?.path ?? r6.path)?.split(".")) : e;
|
|
43084
43085
|
}
|
|
43085
|
-
function
|
|
43086
|
+
function ko(r6) {
|
|
43086
43087
|
return r6.length === 1 ? r6[0] : r6.map(w).join("");
|
|
43087
43088
|
}
|
|
43088
43089
|
function tt(r6, e, t) {
|
|
43089
43090
|
let n = Ve(r6, t);
|
|
43090
|
-
if (n) return
|
|
43091
|
+
if (n) return No(n.elements, e);
|
|
43091
43092
|
}
|
|
43092
|
-
function
|
|
43093
|
+
function No(r6, e) {
|
|
43093
43094
|
let t = r6[e] ?? r6[e + "[x]"];
|
|
43094
43095
|
if (t) return t;
|
|
43095
43096
|
for (let n = 0; n < e.length; n++) {
|
|
@@ -43106,7 +43107,7 @@ function I(r6) {
|
|
|
43106
43107
|
function ce(r6) {
|
|
43107
43108
|
return !!(r6 && typeof r6 == "object" && "reference" in r6 && typeof r6.reference == "string");
|
|
43108
43109
|
}
|
|
43109
|
-
var
|
|
43110
|
+
var F = { types: {} };
|
|
43110
43111
|
function Pe(r6) {
|
|
43111
43112
|
if (r6.startsWith("T")) return r6 + "T00:00:00.000Z".substring(r6.length);
|
|
43112
43113
|
if (r6.length <= 10) return r6;
|
|
@@ -43117,7 +43118,7 @@ function Pe(r6) {
|
|
|
43117
43118
|
}
|
|
43118
43119
|
}
|
|
43119
43120
|
var Q = () => [];
|
|
43120
|
-
var O = { empty: (r6, e) => d(e.length === 0 || e.every((t) => S(t.value))), hasValue: (r6, e) => d(e.length !== 0), exists: (r6, e, t) => t ? d(e.filter((n) =>
|
|
43121
|
+
var O = { empty: (r6, e) => d(e.length === 0 || e.every((t) => S(t.value))), hasValue: (r6, e) => d(e.length !== 0), exists: (r6, e, t) => t ? d(e.filter((n) => N(t.eval(r6, [n]))).length > 0) : d(e.length > 0 && e.every((n) => !S(n.value))), all: (r6, e, t) => d(e.every((n) => N(t.eval(r6, [n])))), allTrue: (r6, e) => {
|
|
43121
43122
|
for (let t of e) if (!t.value) return d(false);
|
|
43122
43123
|
return d(true);
|
|
43123
43124
|
}, anyTrue: (r6, e) => {
|
|
@@ -43140,7 +43141,7 @@ var O = { empty: (r6, e) => d(e.length === 0 || e.every((t) => S(t.value))), has
|
|
|
43140
43141
|
let t = [];
|
|
43141
43142
|
for (let n of e) t.some((i) => i.value === n.value) || t.push(n);
|
|
43142
43143
|
return t;
|
|
43143
|
-
}, isDistinct: (r6, e) => d(e.length === O.distinct(r6, e).length), where: (r6, e, t) => e.filter((n) =>
|
|
43144
|
+
}, isDistinct: (r6, e) => d(e.length === O.distinct(r6, e).length), where: (r6, e, t) => e.filter((n) => N(t.eval(r6, [n]))), select: (r6, e, t) => e.map((n) => t.eval(r6, [n])).flat(), repeat: Q, ofType: (r6, e, t) => e.filter((n) => n.type === t.name), single: (r6, e) => {
|
|
43144
43145
|
if (e.length > 1) throw new Error("Expected input length one for single()");
|
|
43145
43146
|
return e.length === 0 ? [] : e.slice(0, 1);
|
|
43146
43147
|
}, first: (r6, e) => e.length === 0 ? [] : e.slice(0, 1), last: (r6, e) => e.length === 0 ? [] : e.slice(e.length - 1, e.length), tail: (r6, e) => e.length === 0 ? [] : e.slice(1, e.length), skip: (r6, e, t) => {
|
|
@@ -43172,7 +43173,7 @@ var O = { empty: (r6, e) => d(e.length === 0 || e.every((t) => S(t.value))), has
|
|
|
43172
43173
|
}, htmlChecks: (r6, e, t) => [x(true)], iif: (r6, e, t, n, i) => {
|
|
43173
43174
|
let o = t.eval(r6, e);
|
|
43174
43175
|
if (o.length > 1 || o.length === 1 && typeof o[0].value != "boolean") throw new Error("Expected criterion to evaluate to a Boolean");
|
|
43175
|
-
return
|
|
43176
|
+
return N(o) ? n.eval(r6, e) : i ? i.eval(r6, e) : [];
|
|
43176
43177
|
}, toBoolean: (r6, e) => {
|
|
43177
43178
|
if (e.length === 0) return [];
|
|
43178
43179
|
let [{ value: t }] = W(e, 1);
|
|
@@ -43216,10 +43217,10 @@ var O = { empty: (r6, e) => d(e.length === 0 || e.every((t) => S(t.value))), has
|
|
|
43216
43217
|
if (n) return [{ type: l.time, value: Pe("T" + n[1]) }];
|
|
43217
43218
|
}
|
|
43218
43219
|
return [];
|
|
43219
|
-
}, convertsToTime: (r6, e) => e.length === 0 ? [] : d(O.toTime(r6, e).length === 1), indexOf: (r6, e, t) =>
|
|
43220
|
+
}, convertsToTime: (r6, e) => e.length === 0 ? [] : d(O.toTime(r6, e).length === 1), indexOf: (r6, e, t) => _((n, i) => n.indexOf(i), r6, e, t), substring: (r6, e, t, n) => _((i, o, s) => {
|
|
43220
43221
|
let a2 = o, c = s ? a2 + s : i.length;
|
|
43221
43222
|
return a2 < 0 || a2 >= i.length ? void 0 : i.substring(a2, c);
|
|
43222
|
-
}, r6, e, t, n), startsWith: (r6, e, t) =>
|
|
43223
|
+
}, r6, e, t, n), startsWith: (r6, e, t) => _((n, i) => n.startsWith(i), r6, e, t), endsWith: (r6, e, t) => _((n, i) => n.endsWith(i), r6, e, t), contains: (r6, e, t) => _((n, i) => n.includes(i), r6, e, t), upper: (r6, e) => _((t) => t.toUpperCase(), r6, e), lower: (r6, e) => _((t) => t.toLowerCase(), r6, e), replace: (r6, e, t, n) => _((i, o, s) => i.replaceAll(o, s), r6, e, t, n), matches: (r6, e, t) => _((n, i) => !!new RegExp(i).exec(n), r6, e, t), replaceMatches: (r6, e, t, n) => _((i, o, s) => i.replaceAll(o, s), r6, e, t, n), length: (r6, e) => _((t) => t.length, r6, e), toChars: (r6, e) => _((t) => t ? t.split("") : void 0, r6, e), encode: Q, decode: Q, escape: Q, unescape: Q, trim: Q, split: Q, join: (r6, e, t) => {
|
|
43223
43224
|
let n = t?.eval(r6, de(r6))[0]?.value ?? "";
|
|
43224
43225
|
if (typeof n != "string") throw new Error("Separator must be a string.");
|
|
43225
43226
|
return [{ type: l.string, value: e.map((i) => i.value?.toString() ?? "").join(n) }];
|
|
@@ -43273,7 +43274,7 @@ var O = { empty: (r6, e) => d(e.length === 0 || e.every((t) => S(t.value))), has
|
|
|
43273
43274
|
}
|
|
43274
43275
|
return [];
|
|
43275
43276
|
} };
|
|
43276
|
-
function
|
|
43277
|
+
function _(r6, e, t, ...n) {
|
|
43277
43278
|
if (t.length === 0) return [];
|
|
43278
43279
|
let [{ value: i }] = W(t, 1);
|
|
43279
43280
|
if (typeof i != "string") throw new Error("String function cannot be called with non-string");
|
|
@@ -43430,7 +43431,7 @@ var dt = class extends P {
|
|
|
43430
43431
|
}
|
|
43431
43432
|
eval(e, t) {
|
|
43432
43433
|
let n = this.left.eval(e, t), i = this.right.eval(e, t);
|
|
43433
|
-
return
|
|
43434
|
+
return gn(n, i);
|
|
43434
43435
|
}
|
|
43435
43436
|
};
|
|
43436
43437
|
var ft = class extends P {
|
|
@@ -43439,7 +43440,7 @@ var ft = class extends P {
|
|
|
43439
43440
|
}
|
|
43440
43441
|
eval(e, t) {
|
|
43441
43442
|
let n = this.left.eval(e, t), i = this.right.eval(e, t);
|
|
43442
|
-
return
|
|
43443
|
+
return xn(n, i);
|
|
43443
43444
|
}
|
|
43444
43445
|
};
|
|
43445
43446
|
var mt = class extends P {
|
|
@@ -43448,7 +43449,7 @@ var mt = class extends P {
|
|
|
43448
43449
|
}
|
|
43449
43450
|
eval(e, t) {
|
|
43450
43451
|
let n = this.left.eval(e, t), i = this.right.eval(e, t);
|
|
43451
|
-
return
|
|
43452
|
+
return sr(n, i);
|
|
43452
43453
|
}
|
|
43453
43454
|
};
|
|
43454
43455
|
var ht = class extends P {
|
|
@@ -43457,7 +43458,7 @@ var ht = class extends P {
|
|
|
43457
43458
|
}
|
|
43458
43459
|
eval(e, t) {
|
|
43459
43460
|
let n = this.left.eval(e, t), i = this.right.eval(e, t);
|
|
43460
|
-
return
|
|
43461
|
+
return yn(sr(n, i));
|
|
43461
43462
|
}
|
|
43462
43463
|
};
|
|
43463
43464
|
var me = class extends P {
|
|
@@ -43538,50 +43539,50 @@ var he = class {
|
|
|
43538
43539
|
return `${this.left.toString()}[${this.expr.toString()}]`;
|
|
43539
43540
|
}
|
|
43540
43541
|
};
|
|
43541
|
-
var
|
|
43542
|
+
var _e = ["!=", "!~", "<=", ">=", "{}", "->"];
|
|
43542
43543
|
var y = { FunctionCall: 0, Dot: 1, Indexer: 2, UnaryAdd: 3, UnarySubtract: 3, Multiply: 4, Divide: 4, IntegerDivide: 4, Modulo: 4, Add: 5, Subtract: 5, Ampersand: 5, Is: 6, As: 6, Union: 7, GreaterThan: 8, GreaterThanOrEquals: 8, LessThan: 8, LessThanOrEquals: 8, Equals: 9, Equivalent: 9, NotEquals: 9, NotEquivalent: 9, In: 10, Contains: 10, And: 11, Xor: 12, Or: 12, Implies: 13, Arrow: 100, Semicolon: 200 };
|
|
43543
43544
|
var Lo = { parse(r6) {
|
|
43544
43545
|
let e = r6.consumeAndParse();
|
|
43545
43546
|
if (!r6.match(")")) throw new Error("Parse error: expected `)` got `" + r6.peek()?.value + "`");
|
|
43546
43547
|
return e;
|
|
43547
43548
|
} };
|
|
43548
|
-
var
|
|
43549
|
+
var Uo = { parse(r6, e) {
|
|
43549
43550
|
let t = r6.consumeAndParse();
|
|
43550
43551
|
if (!r6.match("]")) throw new Error("Parse error: expected `]`");
|
|
43551
43552
|
return new he(e, t);
|
|
43552
43553
|
}, precedence: y.Indexer };
|
|
43553
|
-
var
|
|
43554
|
+
var Bo = { parse(r6, e) {
|
|
43554
43555
|
if (!(e instanceof U)) throw new Error("Unexpected parentheses");
|
|
43555
43556
|
let t = [];
|
|
43556
43557
|
for (; !r6.match(")"); ) t.push(r6.consumeAndParse()), r6.match(",");
|
|
43557
43558
|
return new K(e.name, t);
|
|
43558
43559
|
}, precedence: y.FunctionCall };
|
|
43559
|
-
function
|
|
43560
|
+
function qo(r6) {
|
|
43560
43561
|
let e = r6.split(" "), t = parseFloat(e[0]), n = e[1];
|
|
43561
43562
|
return n?.startsWith("'") && n.endsWith("'") ? n = n.substring(1, n.length - 1) : n = "{" + n + "}", { value: t, unit: n };
|
|
43562
43563
|
}
|
|
43563
|
-
function
|
|
43564
|
-
return new He().registerPrefix("String", { parse: (r6, e) => new L({ type: l.string, value: e.value }) }).registerPrefix("DateTime", { parse: (r6, e) => new L({ type: l.dateTime, value: Pe(e.value) }) }).registerPrefix("Quantity", { parse: (r6, e) => new L({ type: l.Quantity, value:
|
|
43564
|
+
function Le() {
|
|
43565
|
+
return new He().registerPrefix("String", { parse: (r6, e) => new L({ type: l.string, value: e.value }) }).registerPrefix("DateTime", { parse: (r6, e) => new L({ type: l.dateTime, value: Pe(e.value) }) }).registerPrefix("Quantity", { parse: (r6, e) => new L({ type: l.Quantity, value: qo(e.value) }) }).registerPrefix("Number", { parse: (r6, e) => new L({ type: e.value.includes(".") ? l.decimal : l.integer, value: parseFloat(e.value) }) }).registerPrefix("true", { parse: () => new L({ type: l.boolean, value: true }) }).registerPrefix("false", { parse: () => new L({ type: l.boolean, value: false }) }).registerPrefix("Symbol", { parse: (r6, e) => new U(e.value) }).registerPrefix("{}", { parse: () => new at() }).registerPrefix("(", Lo).registerInfix("[", Uo).registerInfix("(", Bo).prefix("+", y.UnaryAdd, (r6, e) => new ct("+", e, (t) => t)).prefix("-", y.UnarySubtract, (r6, e) => new V("-", e, e, (t, n) => -n)).infixLeft(".", y.Dot, (r6, e, t) => new re(r6, t)).infixLeft("/", y.Divide, (r6, e, t) => new V("/", r6, t, (n, i) => n / i)).infixLeft("*", y.Multiply, (r6, e, t) => new V("*", r6, t, (n, i) => n * i)).infixLeft("+", y.Add, (r6, e, t) => new V("+", r6, t, (n, i) => n + i)).infixLeft("-", y.Subtract, (r6, e, t) => new V("-", r6, t, (n, i) => n - i)).infixLeft("|", y.Union, (r6, e, t) => new Ce(r6, t)).infixLeft("=", y.Equals, (r6, e, t) => new dt(r6, t)).infixLeft("!=", y.NotEquals, (r6, e, t) => new ft(r6, t)).infixLeft("~", y.Equivalent, (r6, e, t) => new mt(r6, t)).infixLeft("!~", y.NotEquivalent, (r6, e, t) => new ht(r6, t)).infixLeft("<", y.LessThan, (r6, e, t) => new V("<", r6, t, (n, i) => n < i)).infixLeft("<=", y.LessThanOrEquals, (r6, e, t) => new V("<=", r6, t, (n, i) => n <= i)).infixLeft(">", y.GreaterThan, (r6, e, t) => new V(">", r6, t, (n, i) => n > i)).infixLeft(">=", y.GreaterThanOrEquals, (r6, e, t) => new V(">=", r6, t, (n, i) => n >= i)).infixLeft("&", y.Ampersand, (r6, e, t) => new ut(r6, t)).infixLeft("and", y.And, (r6, e, t) => new yt(r6, t)).infixLeft("as", y.As, (r6, e, t) => new fe(r6, t)).infixLeft("contains", y.Contains, (r6, e, t) => new lt(r6, t)).infixLeft("div", y.Divide, (r6, e, t) => new V("div", r6, t, (n, i) => n / i | 0)).infixLeft("in", y.In, (r6, e, t) => new pt(r6, t)).infixLeft("is", y.Is, (r6, e, t) => new me(r6, t)).infixLeft("mod", y.Modulo, (r6, e, t) => new V("mod", r6, t, (n, i) => n % i)).infixLeft("or", y.Or, (r6, e, t) => new gt(r6, t)).infixLeft("xor", y.Xor, (r6, e, t) => new xt(r6, t)).infixLeft("implies", y.Implies, (r6, e, t) => new vt(r6, t));
|
|
43565
43566
|
}
|
|
43566
|
-
var
|
|
43567
|
-
var
|
|
43568
|
-
var
|
|
43569
|
-
var
|
|
43570
|
-
function
|
|
43567
|
+
var jo = Le();
|
|
43568
|
+
var Un = ((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))(Un || {});
|
|
43569
|
+
var Wn = ((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.PRESENT = "present", T.IDENTIFIER = "identifier", T.ITERATE = "iterate", T))(Wn || {});
|
|
43570
|
+
var vs = ((E) => (E.READ = "read", E.VREAD = "vread", E.UPDATE = "update", E.PATCH = "patch", E.DELETE = "delete", E.HISTORY = "history", E.HISTORY_INSTANCE = "history-instance", E.HISTORY_TYPE = "history-type", E.HISTORY_SYSTEM = "history-system", E.CREATE = "create", E.SEARCH = "search", E.SEARCH_TYPE = "search-type", E.SEARCH_SYSTEM = "search-system", E.SEARCH_COMPARTMENT = "search-compartment", E.CAPABILITIES = "capabilities", E.TRANSACTION = "transaction", E.BATCH = "batch", E.OPERATION = "operation", E))(vs || {});
|
|
43571
|
+
function Kn(r6) {
|
|
43571
43572
|
if (typeof window < "u") return window.atob(r6);
|
|
43572
43573
|
if (typeof Buffer < "u") return Buffer.from(r6, "base64").toString("binary");
|
|
43573
43574
|
throw new Error("Unable to decode base64");
|
|
43574
43575
|
}
|
|
43575
|
-
function
|
|
43576
|
+
function zn(r6) {
|
|
43576
43577
|
if (typeof window < "u") return window.btoa(r6);
|
|
43577
43578
|
if (typeof Buffer < "u") return Buffer.from(r6, "binary").toString("base64");
|
|
43578
43579
|
throw new Error("Unable to encode base64");
|
|
43579
43580
|
}
|
|
43580
|
-
function
|
|
43581
|
+
function Er() {
|
|
43581
43582
|
let r6 = new Uint32Array(28);
|
|
43582
|
-
return crypto.getRandomValues(r6),
|
|
43583
|
+
return crypto.getRandomValues(r6), An(r6.buffer);
|
|
43583
43584
|
}
|
|
43584
|
-
async function
|
|
43585
|
+
async function Jn(r6) {
|
|
43585
43586
|
return crypto.subtle.digest("SHA-256", new TextEncoder().encode(r6));
|
|
43586
43587
|
}
|
|
43587
43588
|
function ye() {
|
|
@@ -43615,7 +43616,7 @@ var bt = class {
|
|
|
43615
43616
|
}
|
|
43616
43617
|
};
|
|
43617
43618
|
var D = { CSS: "text/css", DICOM: "application/dicom", FAVICON: "image/vnd.microsoft.icon", FHIR_JSON: "application/fhir+json", FORM_URL_ENCODED: "application/x-www-form-urlencoded", HL7_V2: "x-application/hl7-v2+er7", HTML: "text/html", JAVASCRIPT: "text/javascript", JSON: "application/json", JSON_PATCH: "application/json-patch+json", PNG: "image/png", SCIM_JSON: "application/scim+json", SVG: "image/svg+xml", TEXT: "text/plain", TYPESCRIPT: "text/typescript", PING: "x-application/ping" };
|
|
43618
|
-
var
|
|
43619
|
+
var br = class {
|
|
43619
43620
|
constructor() {
|
|
43620
43621
|
this.listeners = {};
|
|
43621
43622
|
}
|
|
@@ -43642,7 +43643,7 @@ var Rr = class {
|
|
|
43642
43643
|
};
|
|
43643
43644
|
var z = class {
|
|
43644
43645
|
constructor() {
|
|
43645
|
-
this.emitter = new
|
|
43646
|
+
this.emitter = new br();
|
|
43646
43647
|
}
|
|
43647
43648
|
dispatchEvent(e) {
|
|
43648
43649
|
this.emitter.dispatchEvent(e);
|
|
@@ -43657,71 +43658,71 @@ var z = class {
|
|
|
43657
43658
|
this.emitter.removeAllListeners();
|
|
43658
43659
|
}
|
|
43659
43660
|
};
|
|
43660
|
-
var
|
|
43661
|
-
var
|
|
43662
|
-
var
|
|
43663
|
-
function Zn(r6) {
|
|
43664
|
-
return Cr.includes(r6);
|
|
43665
|
-
}
|
|
43661
|
+
var Rr = { "Patient-open": "Patient-open", "Patient-close": "Patient-close", "ImagingStudy-open": "ImagingStudy-open", "ImagingStudy-close": "ImagingStudy-close", "Encounter-open": "Encounter-open", "Encounter-close": "Encounter-close", "DiagnosticReport-open": "DiagnosticReport-open", "DiagnosticReport-close": "DiagnosticReport-close", "DiagnosticReport-select": "DiagnosticReport-select", "DiagnosticReport-update": "DiagnosticReport-update", syncerror: "syncerror" };
|
|
43662
|
+
var As = ["Patient", "Encounter", "ImagingStudy", "DiagnosticReport", "OperationOutcome", "Bundle"];
|
|
43663
|
+
var Pr = ["DiagnosticReport-update"];
|
|
43666
43664
|
function Xn(r6) {
|
|
43667
|
-
|
|
43668
|
-
}
|
|
43669
|
-
var As = { "Patient-open": { patient: { resourceType: "Patient" }, encounter: { resourceType: "Encounter", optional: true } }, "Patient-close": { patient: { resourceType: "Patient" }, encounter: { resourceType: "Encounter", optional: true } }, "ImagingStudy-open": { study: { resourceType: "ImagingStudy" }, encounter: { resourceType: "Encounter", optional: true }, patient: { resourceType: "Patient", optional: true } }, "ImagingStudy-close": { study: { resourceType: "ImagingStudy" }, encounter: { resourceType: "Encounter", optional: true }, patient: { resourceType: "Patient", optional: true } }, "Encounter-open": { encounter: { resourceType: "Encounter" }, patient: { resourceType: "Patient" } }, "Encounter-close": { encounter: { resourceType: "Encounter" }, patient: { resourceType: "Patient" } }, "DiagnosticReport-open": { report: { resourceType: "DiagnosticReport" }, encounter: { resourceType: "Encounter", optional: true }, study: { resourceType: "ImagingStudy", optional: true, manyAllowed: true }, patient: { resourceType: "Patient" } }, "DiagnosticReport-close": { report: { resourceType: "DiagnosticReport" }, encounter: { resourceType: "Encounter", optional: true }, study: { resourceType: "ImagingStudy", optional: true, manyAllowed: true }, patient: { resourceType: "Patient" } }, "DiagnosticReport-select": { report: { resourceType: "DiagnosticReport" }, select: { resourceType: "*", isArray: true } }, "DiagnosticReport-update": { report: { resourceType: "DiagnosticReport" }, patient: { resourceType: "Patient", optional: true }, study: { resourceType: "ImagingStudy", optional: true }, updates: { resourceType: "Bundle" } }, syncerror: { operationoutcome: { resourceType: "OperationOutcome" } } };
|
|
43670
|
-
function Os(r6) {
|
|
43671
|
-
return ws.includes(r6);
|
|
43665
|
+
return Pr.includes(r6);
|
|
43672
43666
|
}
|
|
43673
43667
|
function ei(r6) {
|
|
43668
|
+
if (Pr.includes(r6)) throw new f(h(`'context.version' is required for '${r6}'.`));
|
|
43669
|
+
}
|
|
43670
|
+
var Os = { "Patient-open": { patient: { resourceType: "Patient" }, encounter: { resourceType: "Encounter", optional: true } }, "Patient-close": { patient: { resourceType: "Patient" }, encounter: { resourceType: "Encounter", optional: true } }, "ImagingStudy-open": { study: { resourceType: "ImagingStudy" }, encounter: { resourceType: "Encounter", optional: true }, patient: { resourceType: "Patient", optional: true } }, "ImagingStudy-close": { study: { resourceType: "ImagingStudy" }, encounter: { resourceType: "Encounter", optional: true }, patient: { resourceType: "Patient", optional: true } }, "Encounter-open": { encounter: { resourceType: "Encounter" }, patient: { resourceType: "Patient" } }, "Encounter-close": { encounter: { resourceType: "Encounter" }, patient: { resourceType: "Patient" } }, "DiagnosticReport-open": { report: { resourceType: "DiagnosticReport" }, encounter: { resourceType: "Encounter", optional: true }, study: { resourceType: "ImagingStudy", optional: true, manyAllowed: true }, patient: { resourceType: "Patient" } }, "DiagnosticReport-close": { report: { resourceType: "DiagnosticReport" }, encounter: { resourceType: "Encounter", optional: true }, study: { resourceType: "ImagingStudy", optional: true, manyAllowed: true }, patient: { resourceType: "Patient" } }, "DiagnosticReport-select": { report: { resourceType: "DiagnosticReport" }, select: { resourceType: "*", isArray: true } }, "DiagnosticReport-update": { report: { resourceType: "DiagnosticReport" }, patient: { resourceType: "Patient", optional: true }, study: { resourceType: "ImagingStudy", optional: true }, updates: { resourceType: "Bundle" } }, syncerror: { operationoutcome: { resourceType: "OperationOutcome" } } };
|
|
43671
|
+
function Is(r6) {
|
|
43672
|
+
return As.includes(r6);
|
|
43673
|
+
}
|
|
43674
|
+
function ti(r6) {
|
|
43674
43675
|
return !!r6.endpoint;
|
|
43675
43676
|
}
|
|
43676
|
-
function
|
|
43677
|
+
function Cr(r6) {
|
|
43677
43678
|
if (!Pt(r6)) throw new f(h("subscriptionRequest must be an object conforming to SubscriptionRequest type."));
|
|
43678
43679
|
let { channelType: e, mode: t, topic: n, events: i } = r6, o = { "hub.channel.type": e, "hub.mode": t, "hub.topic": n, "hub.events": i.join(",") };
|
|
43679
|
-
return
|
|
43680
|
+
return ti(r6) && (o.endpoint = r6.endpoint), new URLSearchParams(o).toString();
|
|
43680
43681
|
}
|
|
43681
43682
|
function Pt(r6) {
|
|
43682
43683
|
if (typeof r6 != "object") return false;
|
|
43683
43684
|
let { channelType: e, mode: t, topic: n, events: i } = r6;
|
|
43684
43685
|
if (!(e && t && n && i) || typeof n != "string" || typeof i != "object" || !Array.isArray(i) || i.length < 1 || e !== "websocket" || t !== "subscribe" && t !== "unsubscribe") return false;
|
|
43685
|
-
for (let o of i) if (!
|
|
43686
|
-
return !(
|
|
43686
|
+
for (let o of i) if (!Rr[o]) return false;
|
|
43687
|
+
return !(ti(r6) && !(typeof r6.endpoint == "string" && r6.endpoint.startsWith("ws")));
|
|
43687
43688
|
}
|
|
43688
|
-
function
|
|
43689
|
+
function Zn(r6, e, t, n) {
|
|
43689
43690
|
if (typeof e != "object") throw new f(h(`context[${t}] is invalid. Context must contain a single valid FHIR resource! Resource is not an object.`));
|
|
43690
43691
|
if (!(e.id && typeof e.id == "string")) throw new f(h(`context[${t}] is invalid. Resource must contain a valid string ID.`));
|
|
43691
43692
|
if (!e.resourceType) throw new f(h(`context[${t}] is invalid. Resource must contain a resource type. No resource type found.`));
|
|
43692
43693
|
let i = n.resourceType;
|
|
43693
43694
|
if (i !== "*") {
|
|
43694
|
-
if (!
|
|
43695
|
+
if (!Is(e.resourceType)) throw new f(h(`context[${t}] is invalid. Resource must contain a valid FHIRcast resource type. Resource type is not a known resource type.`));
|
|
43695
43696
|
if (i && e.resourceType !== i) throw new f(h(`context[${t}] is invalid. context[${t}] for the '${r6}' event should contain resource of type ${i}.`));
|
|
43696
43697
|
}
|
|
43697
43698
|
}
|
|
43698
|
-
function
|
|
43699
|
-
if (i.set(e.key, (i.get(e.key) ?? 0) + 1), !n.isArray)
|
|
43699
|
+
function ks(r6, e, t, n, i) {
|
|
43700
|
+
if (i.set(e.key, (i.get(e.key) ?? 0) + 1), !n.isArray) Zn(r6, e.resource, t, n);
|
|
43700
43701
|
else {
|
|
43701
43702
|
let { resources: o } = e;
|
|
43702
43703
|
if (!o) throw new f(h(`context[${t}] is invalid. context[${t}] for the '${r6}' with key '${String(e.key)}' should contain an array of resources on the key 'resources'.`));
|
|
43703
|
-
for (let s of o)
|
|
43704
|
+
for (let s of o) Zn(r6, s, t, n);
|
|
43704
43705
|
}
|
|
43705
43706
|
}
|
|
43706
|
-
function
|
|
43707
|
-
let t = /* @__PURE__ */ new Map(), n =
|
|
43707
|
+
function Vs(r6, e) {
|
|
43708
|
+
let t = /* @__PURE__ */ new Map(), n = Os[r6];
|
|
43708
43709
|
for (let i = 0; i < e.length; i++) {
|
|
43709
43710
|
let o = e[i].key;
|
|
43710
43711
|
if (!n[o]) throw new f(h(`Key '${o}' not found for event '${r6}'. Make sure to add only valid keys.`));
|
|
43711
|
-
|
|
43712
|
+
ks(r6, e[i], i, n[o], t);
|
|
43712
43713
|
}
|
|
43713
43714
|
for (let [i, o] of Object.entries(n)) {
|
|
43714
43715
|
if (!(o.optional || t.has(i))) throw new f(h(`Missing required key '${i}' on context for '${r6}' event.`));
|
|
43715
43716
|
if (!o.manyAllowed && (t.get(i) || 0) > 1) throw new f(h(`${t.get(i)} context entries with key '${i}' found for the '${r6}' event when schema only allows for 1.`));
|
|
43716
43717
|
}
|
|
43717
43718
|
}
|
|
43718
|
-
function
|
|
43719
|
+
function wr(r6, e, t, n) {
|
|
43719
43720
|
if (!(r6 && typeof r6 == "string")) throw new f(h("Must provide a topic."));
|
|
43720
|
-
if (!
|
|
43721
|
+
if (!Rr[e]) throw new f(h(`Must provide a valid FHIRcast event name. Supported events: ${Object.keys(Rr).join(", ")}`));
|
|
43721
43722
|
if (typeof t != "object") throw new f(h("context must be a context object or array of context objects."));
|
|
43722
|
-
if (
|
|
43723
|
+
if (Pr.includes(e) && !n) throw new f(h(`The '${e}' event must contain a 'context.versionId'.`));
|
|
43723
43724
|
let i = Array.isArray(t) ? t : [t];
|
|
43724
|
-
return
|
|
43725
|
+
return Vs(e, i), { timestamp: (/* @__PURE__ */ new Date()).toISOString(), id: ye(), event: { "hub.topic": r6, "hub.event": e, context: i, ...n ? { "context.versionId": n } : {} } };
|
|
43725
43726
|
}
|
|
43726
43727
|
var Rt = class extends z {
|
|
43727
43728
|
constructor(e) {
|
|
@@ -43743,28 +43744,28 @@ var Rt = class extends z {
|
|
|
43743
43744
|
this.websocket.close();
|
|
43744
43745
|
}
|
|
43745
43746
|
};
|
|
43746
|
-
function
|
|
43747
|
-
let e = r6.replace(/-/g, "+").replace(/_/g, "/"), t =
|
|
43747
|
+
function Ds(r6) {
|
|
43748
|
+
let e = r6.replace(/-/g, "+").replace(/_/g, "/"), t = Kn(e), n = Array.from(t).reduce((o, s) => {
|
|
43748
43749
|
let a2 = ("00" + s.charCodeAt(0).toString(16)).slice(-2);
|
|
43749
43750
|
return `${o}%${a2}`;
|
|
43750
43751
|
}, ""), i = decodeURIComponent(n);
|
|
43751
43752
|
return JSON.parse(i);
|
|
43752
43753
|
}
|
|
43753
|
-
function
|
|
43754
|
+
function ri(r6) {
|
|
43754
43755
|
return r6.split(".").length === 3;
|
|
43755
43756
|
}
|
|
43756
43757
|
function Ct(r6) {
|
|
43757
43758
|
let [e, t, n] = r6.split(".");
|
|
43758
|
-
return
|
|
43759
|
+
return Ds(t);
|
|
43759
43760
|
}
|
|
43760
|
-
function
|
|
43761
|
+
function ni(r6) {
|
|
43761
43762
|
try {
|
|
43762
43763
|
return typeof Ct(r6).login_id == "string";
|
|
43763
43764
|
} catch {
|
|
43764
43765
|
return false;
|
|
43765
43766
|
}
|
|
43766
43767
|
}
|
|
43767
|
-
function
|
|
43768
|
+
function ii(r6) {
|
|
43768
43769
|
try {
|
|
43769
43770
|
let t = Ct(r6).exp;
|
|
43770
43771
|
return typeof t == "number" ? t * 1e3 : void 0;
|
|
@@ -43786,11 +43787,11 @@ var wt = class {
|
|
|
43786
43787
|
await this.medplum.delete(`keyvalue/v1/${e}`);
|
|
43787
43788
|
}
|
|
43788
43789
|
};
|
|
43789
|
-
var
|
|
43790
|
-
|
|
43790
|
+
var oi;
|
|
43791
|
+
oi = Symbol.toStringTag;
|
|
43791
43792
|
var M = class {
|
|
43792
43793
|
constructor(e) {
|
|
43793
|
-
this[
|
|
43794
|
+
this[oi] = "ReadablePromise";
|
|
43794
43795
|
this.status = "pending";
|
|
43795
43796
|
this.suspender = e.then((t) => (this.status = "success", this.response = t, t), (t) => {
|
|
43796
43797
|
throw this.status = "error", this.error = t, t;
|
|
@@ -43824,7 +43825,7 @@ var M = class {
|
|
|
43824
43825
|
};
|
|
43825
43826
|
var Be = class {
|
|
43826
43827
|
constructor(e) {
|
|
43827
|
-
this.storage = e ?? (typeof localStorage < "u" ? localStorage : new
|
|
43828
|
+
this.storage = e ?? (typeof localStorage < "u" ? localStorage : new Ar());
|
|
43828
43829
|
}
|
|
43829
43830
|
clear() {
|
|
43830
43831
|
this.storage.clear();
|
|
@@ -43840,10 +43841,10 @@ var Be = class {
|
|
|
43840
43841
|
return t ? JSON.parse(t) : void 0;
|
|
43841
43842
|
}
|
|
43842
43843
|
setObject(e, t) {
|
|
43843
|
-
this.setString(e, t ?
|
|
43844
|
+
this.setString(e, t ? Pn(t) : void 0);
|
|
43844
43845
|
}
|
|
43845
43846
|
};
|
|
43846
|
-
var
|
|
43847
|
+
var Ar = class {
|
|
43847
43848
|
constructor() {
|
|
43848
43849
|
this.data = /* @__PURE__ */ new Map();
|
|
43849
43850
|
}
|
|
@@ -43866,7 +43867,7 @@ var Or = class {
|
|
|
43866
43867
|
return Array.from(this.data.keys())[e];
|
|
43867
43868
|
}
|
|
43868
43869
|
};
|
|
43869
|
-
var
|
|
43870
|
+
var Or = class extends z {
|
|
43870
43871
|
constructor(t) {
|
|
43871
43872
|
super();
|
|
43872
43873
|
this.bufferedAmount = -1 / 0;
|
|
@@ -43919,7 +43920,7 @@ var qe = class extends z {
|
|
|
43919
43920
|
this.criteria.delete(e);
|
|
43920
43921
|
}
|
|
43921
43922
|
};
|
|
43922
|
-
var
|
|
43923
|
+
var Ir = class {
|
|
43923
43924
|
constructor(e, t) {
|
|
43924
43925
|
this.criteria = e, this.emitter = new qe(e), this.refCount = 1, this.subscriptionProps = t ? { ...t } : void 0;
|
|
43925
43926
|
}
|
|
@@ -43933,7 +43934,7 @@ var At = class {
|
|
|
43933
43934
|
} catch {
|
|
43934
43935
|
throw new f(h("Not a valid URL"));
|
|
43935
43936
|
}
|
|
43936
|
-
let o = n?.RobustWebSocket ? new n.RobustWebSocket(i) : new
|
|
43937
|
+
let o = n?.RobustWebSocket ? new n.RobustWebSocket(i) : new Or(i);
|
|
43937
43938
|
this.medplum = e, this.ws = o, this.masterSubEmitter = new qe(), this.criteriaEntries = /* @__PURE__ */ new Map(), this.criteriaEntriesBySubscriptionId = /* @__PURE__ */ new Map(), this.wsClosed = false, this.setupWebSocketListeners();
|
|
43938
43939
|
}
|
|
43939
43940
|
setupWebSocketListeners() {
|
|
@@ -43959,7 +43960,7 @@ var At = class {
|
|
|
43959
43960
|
for (let o of this.getAllCriteriaEmitters()) o.dispatchEvent(i);
|
|
43960
43961
|
}
|
|
43961
43962
|
}), e.addEventListener("error", () => {
|
|
43962
|
-
let t = { type: "error", payload: new f(
|
|
43963
|
+
let t = { type: "error", payload: new f(Kr(new Error("WebSocket error"))) };
|
|
43963
43964
|
this.masterSubEmitter?.dispatchEvent(t);
|
|
43964
43965
|
for (let n of this.getAllCriteriaEmitters()) n.dispatchEvent(t);
|
|
43965
43966
|
}), e.addEventListener("close", () => {
|
|
@@ -44024,7 +44025,7 @@ var At = class {
|
|
|
44024
44025
|
this.masterSubEmitter && this.masterSubEmitter._addCriteria(e);
|
|
44025
44026
|
let n = this.maybeGetCriteriaEntry(e, t);
|
|
44026
44027
|
if (n) return n.refCount += 1, n.emitter;
|
|
44027
|
-
let i = new
|
|
44028
|
+
let i = new Ir(e, t);
|
|
44028
44029
|
return this.addCriteriaEntry(i), this.getTokenForCriteria(i).then(([o, s]) => {
|
|
44029
44030
|
i.subscriptionId = o, i.token = s, this.criteriaEntriesBySubscriptionId.set(o, i), this.emitConnect(i), this.ws.send(JSON.stringify({ type: "bind-with-token", payload: { token: s } }));
|
|
44030
44031
|
}).catch((o) => {
|
|
@@ -44049,24 +44050,24 @@ var At = class {
|
|
|
44049
44050
|
return this.masterSubEmitter || (this.masterSubEmitter = new qe(...Array.from(this.criteriaEntries.keys()))), this.masterSubEmitter;
|
|
44050
44051
|
}
|
|
44051
44052
|
};
|
|
44052
|
-
var
|
|
44053
|
-
var
|
|
44054
|
-
var
|
|
44053
|
+
var fd = "3.2.3-3f9cbed69";
|
|
44054
|
+
var Fs = D.FHIR_JSON + ", */*; q=0.1";
|
|
44055
|
+
var _s = "https://api.medplum.com/";
|
|
44055
44056
|
var Ls = 1e3;
|
|
44056
|
-
var
|
|
44057
|
-
var
|
|
44058
|
-
var
|
|
44059
|
-
var
|
|
44060
|
-
var
|
|
44061
|
-
var
|
|
44062
|
-
var
|
|
44063
|
-
var
|
|
44057
|
+
var Us = 6e4;
|
|
44058
|
+
var Bs = 0;
|
|
44059
|
+
var qs = "Binary/";
|
|
44060
|
+
var ai = { resourceType: "Device", id: "system", deviceName: [{ type: "model-name", name: "System" }] };
|
|
44061
|
+
var js = ((o) => (o.ClientCredentials = "client_credentials", o.AuthorizationCode = "authorization_code", o.RefreshToken = "refresh_token", o.JwtBearer = "urn:ietf:params:oauth:grant-type:jwt-bearer", o.TokenExchange = "urn:ietf:params:oauth:grant-type:token-exchange", o))(js || {});
|
|
44062
|
+
var $s = ((o) => (o.AccessToken = "urn:ietf:params:oauth:token-type:access_token", o.RefreshToken = "urn:ietf:params:oauth:token-type:refresh_token", o.IdToken = "urn:ietf:params:oauth:token-type:id_token", o.Saml1Token = "urn:ietf:params:oauth:token-type:saml1", o.Saml2Token = "urn:ietf:params:oauth:token-type:saml2", o))($s || {});
|
|
44063
|
+
var Ws = ((o) => (o.ClientSecretBasic = "client_secret_basic", o.ClientSecretPost = "client_secret_post", o.ClientSecretJwt = "client_secret_jwt", o.PrivateKeyJwt = "private_key_jwt", o.None = "none", o))(Ws || {});
|
|
44064
|
+
var Gs = ((e) => (e.JwtBearer = "urn:ietf:params:oauth:client-assertion-type:jwt-bearer", e))(Gs || {});
|
|
44064
44065
|
var Ot = class extends z {
|
|
44065
44066
|
constructor(t) {
|
|
44066
44067
|
super();
|
|
44067
44068
|
this.initComplete = true;
|
|
44068
44069
|
if (t?.baseUrl && !t.baseUrl.startsWith("http")) throw new Error("Base URL must start with http or https");
|
|
44069
|
-
this.options = t ?? {}, this.fetch = t?.fetch ??
|
|
44070
|
+
this.options = t ?? {}, this.fetch = t?.fetch ?? Hs(), this.storage = t?.storage ?? new Be(), this.createPdfImpl = t?.createPdf, this.baseUrl = dr(t?.baseUrl ?? _s), this.fhirBaseUrl = j(this.baseUrl, t?.fhirUrlPath ?? "fhir/R4"), this.authorizeUrl = j(this.baseUrl, t?.authorizeUrl ?? "oauth2/authorize"), this.tokenUrl = j(this.baseUrl, t?.tokenUrl ?? "oauth2/token"), this.logoutUrl = j(this.baseUrl, t?.logoutUrl ?? "oauth2/logout"), this.clientId = t?.clientId ?? "", this.clientSecret = t?.clientSecret ?? "", this.onUnauthenticated = t?.onUnauthenticated, this.cacheTime = t?.cacheTime ?? (typeof window > "u" ? Bs : Us), this.cacheTime > 0 ? this.requestCache = new bt(t?.resourceCacheSize ?? Ls) : this.requestCache = void 0, t?.autoBatchTime ? (this.autoBatchTime = t.autoBatchTime, this.autoBatchQueue = []) : (this.autoBatchTime = 0, this.autoBatchQueue = void 0), t?.accessToken && this.setAccessToken(t.accessToken), this.storage.getInitPromise === void 0 ? (t?.accessToken || this.attemptResumeActiveLogin().catch(console.error), this.initPromise = Promise.resolve(), this.dispatchEvent({ type: "storageInitialized" })) : (this.initComplete = false, this.initPromise = this.storage.getInitPromise(), this.initPromise.then(() => {
|
|
44070
44071
|
t?.accessToken || this.attemptResumeActiveLogin().catch(console.error), this.initComplete = true, this.dispatchEvent({ type: "storageInitialized" });
|
|
44071
44072
|
}).catch((n) => {
|
|
44072
44073
|
console.error(n), this.initComplete = true, this.dispatchEvent({ type: "storageInitFailed", payload: { error: n } });
|
|
@@ -44190,7 +44191,7 @@ var Ot = class extends z {
|
|
|
44190
44191
|
}
|
|
44191
44192
|
fhirSearchUrl(t, n) {
|
|
44192
44193
|
let i = this.fhirUrl(t);
|
|
44193
|
-
return n && (i.search =
|
|
44194
|
+
return n && (i.search = Mn(n)), i;
|
|
44194
44195
|
}
|
|
44195
44196
|
search(t, n, i) {
|
|
44196
44197
|
let o = this.fhirSearchUrl(t, n), s = "search-" + o.toString(), a2 = this.getCacheEntry(s, i);
|
|
@@ -44213,7 +44214,7 @@ var Ot = class extends z {
|
|
|
44213
44214
|
searchResources(t, n, i) {
|
|
44214
44215
|
let s = "searchResources-" + this.fhirSearchUrl(t, n).toString(), a2 = this.getCacheEntry(s, i);
|
|
44215
44216
|
if (a2) return a2.value;
|
|
44216
|
-
let c = new M(this.search(t, n, i).then(
|
|
44217
|
+
let c = new M(this.search(t, n, i).then(kr));
|
|
44217
44218
|
return this.setCacheEntry(s, c), c;
|
|
44218
44219
|
}
|
|
44219
44220
|
async *searchResourcePages(t, n, i) {
|
|
@@ -44221,7 +44222,7 @@ var Ot = class extends z {
|
|
|
44221
44222
|
for (; o; ) {
|
|
44222
44223
|
let s = new URL(o).searchParams, a2 = await this.search(t, s, i), c = a2.link?.find((u2) => u2.relation === "next");
|
|
44223
44224
|
if (!a2.entry?.length && !c) break;
|
|
44224
|
-
yield
|
|
44225
|
+
yield kr(a2), o = c?.url ? new URL(c.url) : void 0;
|
|
44225
44226
|
}
|
|
44226
44227
|
}
|
|
44227
44228
|
searchValueSet(t, n, i) {
|
|
@@ -44238,7 +44239,7 @@ var Ot = class extends z {
|
|
|
44238
44239
|
getCachedReference(t) {
|
|
44239
44240
|
let n = t.reference;
|
|
44240
44241
|
if (!n) return;
|
|
44241
|
-
if (n === "system") return
|
|
44242
|
+
if (n === "system") return ai;
|
|
44242
44243
|
let [i, o] = n.split("/");
|
|
44243
44244
|
if (!(!i || !o)) return this.getCached(i, o);
|
|
44244
44245
|
}
|
|
@@ -44248,12 +44249,12 @@ var Ot = class extends z {
|
|
|
44248
44249
|
readReference(t, n) {
|
|
44249
44250
|
let i = t.reference;
|
|
44250
44251
|
if (!i) return new M(Promise.reject(new Error("Missing reference")));
|
|
44251
|
-
if (i === "system") return new M(Promise.resolve(
|
|
44252
|
+
if (i === "system") return new M(Promise.resolve(ai));
|
|
44252
44253
|
let [o, s] = i.split("/");
|
|
44253
44254
|
return !o || !s ? new M(Promise.reject(new Error("Invalid reference"))) : this.readResource(o, s, n);
|
|
44254
44255
|
}
|
|
44255
44256
|
requestSchema(t) {
|
|
44256
|
-
if (
|
|
44257
|
+
if (sn(t)) return Promise.resolve();
|
|
44257
44258
|
let n = t + "-requestSchema", i = this.getCacheEntry(n, void 0);
|
|
44258
44259
|
if (i) return i.value;
|
|
44259
44260
|
let o = new M((async () => {
|
|
@@ -44298,12 +44299,12 @@ var Ot = class extends z {
|
|
|
44298
44299
|
}
|
|
44299
44300
|
}`.replace(/\s+/g, " "), a2 = await this.graphql(s);
|
|
44300
44301
|
Yt(a2.data.StructureDefinitionList);
|
|
44301
|
-
for (let c of a2.data.SearchParameterList)
|
|
44302
|
+
for (let c of a2.data.SearchParameterList) hr(c);
|
|
44302
44303
|
})());
|
|
44303
44304
|
return this.setCacheEntry(n, o), o;
|
|
44304
44305
|
}
|
|
44305
44306
|
requestProfileSchema(t, n) {
|
|
44306
|
-
if (!n?.expandProfile &&
|
|
44307
|
+
if (!n?.expandProfile && cn(t)) return Promise.resolve([t]);
|
|
44307
44308
|
let i = t + "-requestSchema" + (n?.expandProfile ? "-nested" : ""), o = this.getCacheEntry(i, void 0);
|
|
44308
44309
|
if (o) return o.value;
|
|
44309
44310
|
let s = new M((async () => {
|
|
@@ -44311,7 +44312,7 @@ var Ot = class extends z {
|
|
|
44311
44312
|
let a2 = this.fhirUrl("StructureDefinition", "$expand-profile");
|
|
44312
44313
|
a2.search = new URLSearchParams({ url: t }).toString();
|
|
44313
44314
|
let c = await this.post(a2.toString(), {});
|
|
44314
|
-
return
|
|
44315
|
+
return kr(c).map((u2) => (Zt(u2, u2.url), u2.url));
|
|
44315
44316
|
} else {
|
|
44316
44317
|
let a2 = await this.searchOne("StructureDefinition", { url: t, _sort: "-_lastUpdated" });
|
|
44317
44318
|
return a2 ? (Yt([a2], t), [t]) : (console.warn(`No StructureDefinition found for ${t}!`), []);
|
|
@@ -44340,11 +44341,11 @@ var Ot = class extends z {
|
|
|
44340
44341
|
return s || (s = t), this.cacheResource(s), this.invalidateUrl(this.fhirUrl(t.resourceType, t.id, "_history")), this.invalidateSearches(t.resourceType), s;
|
|
44341
44342
|
}
|
|
44342
44343
|
async createAttachment(t, n, i, o, s) {
|
|
44343
|
-
let a2 =
|
|
44344
|
+
let a2 = li(t, n, i, o), c = s ?? (typeof n == "object" ? n : {}), u2 = await this.createBinary(a2, c);
|
|
44344
44345
|
return { contentType: a2.contentType, url: u2.url, title: a2.filename };
|
|
44345
44346
|
}
|
|
44346
44347
|
createBinary(t, n, i, o, s) {
|
|
44347
|
-
let a2 =
|
|
44348
|
+
let a2 = li(t, n, i, o), c = s ?? (typeof n == "object" ? n : {}), { data: u2, contentType: p2, filename: m2, securityContext: g, onProgress: G } = a2, Ie = this.fhirUrl("Binary");
|
|
44348
44349
|
return m2 && Ie.searchParams.set("_filename", m2), g?.reference && this.setRequestHeader(c, "X-Security-Context", g.reference), G ? this.uploadwithProgress(Ie, u2, p2, G, c) : this.post(Ie, u2, p2, c);
|
|
44349
44350
|
}
|
|
44350
44351
|
uploadwithProgress(t, n, i, o, s) {
|
|
@@ -44365,7 +44366,7 @@ var Ot = class extends z {
|
|
|
44365
44366
|
}
|
|
44366
44367
|
async createPdf(t, n, i, o) {
|
|
44367
44368
|
if (!this.createPdfImpl) throw new Error("PDF creation not enabled");
|
|
44368
|
-
let s =
|
|
44369
|
+
let s = zs(t, n, i, o), a2 = typeof n == "object" ? n : {}, { docDefinition: c, tableLayouts: u2, fonts: p2, ...m2 } = s, g = await this.createPdfImpl(c, u2, p2), G = { ...m2, data: g, contentType: "application/pdf" };
|
|
44369
44370
|
return this.createBinary(G, a2);
|
|
44370
44371
|
}
|
|
44371
44372
|
createComment(t, n, i) {
|
|
@@ -44378,8 +44379,9 @@ var Ot = class extends z {
|
|
|
44378
44379
|
let i = await this.put(this.fhirUrl(t.resourceType, t.id), t, void 0, n);
|
|
44379
44380
|
return i || (i = t), this.cacheResource(i), this.invalidateUrl(this.fhirUrl(t.resourceType, t.id, "_history")), this.invalidateSearches(t.resourceType), i;
|
|
44380
44381
|
}
|
|
44381
|
-
patchResource(t, n, i, o) {
|
|
44382
|
-
|
|
44382
|
+
async patchResource(t, n, i, o) {
|
|
44383
|
+
let s = await this.patch(this.fhirUrl(t, n), i, o);
|
|
44384
|
+
return this.cacheResource(s), this.invalidateUrl(this.fhirUrl(t, n, "_history")), this.invalidateSearches(t), s;
|
|
44383
44385
|
}
|
|
44384
44386
|
deleteResource(t, n, i) {
|
|
44385
44387
|
return this.deleteCacheEntry(this.fhirUrl(t, n).toString()), this.invalidateSearches(t), this.delete(this.fhirUrl(t, n), i);
|
|
@@ -44423,7 +44425,7 @@ var Ot = class extends z {
|
|
|
44423
44425
|
return this.accessToken;
|
|
44424
44426
|
}
|
|
44425
44427
|
setAccessToken(t, n) {
|
|
44426
|
-
this.accessToken = t, this.refreshToken = n, this.sessionDetails = void 0, this.accessTokenExpires =
|
|
44428
|
+
this.accessToken = t, this.refreshToken = n, this.sessionDetails = void 0, this.accessTokenExpires = ii(t), this.medplumServer = ni(t);
|
|
44427
44429
|
}
|
|
44428
44430
|
getLogins() {
|
|
44429
44431
|
return this.storage.getObject("logins") ?? [];
|
|
@@ -44471,7 +44473,7 @@ var Ot = class extends z {
|
|
|
44471
44473
|
async download(t, n = {}) {
|
|
44472
44474
|
this.refreshPromise && await this.refreshPromise;
|
|
44473
44475
|
let i = t.toString();
|
|
44474
|
-
i.startsWith(
|
|
44476
|
+
i.startsWith(qs) && (t = this.fhirUrl(i));
|
|
44475
44477
|
let o = n.headers;
|
|
44476
44478
|
return o || (o = {}, n.headers = o), o.Accept || (o.Accept = "*/*"), this.addFetchOptionsDefaults(n), (await this.fetchWithRetry(t.toString(), n)).blob();
|
|
44477
44479
|
}
|
|
@@ -44516,14 +44518,14 @@ var Ot = class extends z {
|
|
|
44516
44518
|
if (s.status === 401) return this.handleUnauthenticated(t, n, i);
|
|
44517
44519
|
if (s.status === 204 || s.status === 304) return;
|
|
44518
44520
|
let c = s.headers.get("content-type")?.includes("json");
|
|
44519
|
-
if (s.status === 404 && !c) throw new f(
|
|
44521
|
+
if (s.status === 404 && !c) throw new f(Qr);
|
|
44520
44522
|
let u2 = await this.parseBody(s, c);
|
|
44521
44523
|
if (s.status === 200 && i.followRedirectOnOk || s.status === 201 && i.followRedirectOnCreated) {
|
|
44522
|
-
let p2 = await
|
|
44524
|
+
let p2 = await ui(s, u2);
|
|
44523
44525
|
if (p2) return this.request("GET", p2, { ...i, body: void 0 });
|
|
44524
44526
|
}
|
|
44525
44527
|
if (s.status === 202 && i.pollStatusOnAccepted) {
|
|
44526
|
-
let m2 = await
|
|
44528
|
+
let m2 = await ui(s, u2) ?? o.statusUrl;
|
|
44527
44529
|
if (m2) return this.pollStatus(m2, i, o);
|
|
44528
44530
|
}
|
|
44529
44531
|
if (s.status >= 400) throw new f(ze(u2));
|
|
@@ -44550,7 +44552,7 @@ var Ot = class extends z {
|
|
|
44550
44552
|
} catch (a2) {
|
|
44551
44553
|
if (a2.message === "Failed to fetch" && s === 0 && this.dispatchEvent({ type: "offline" }), a2.name === "AbortError" || s === i) throw a2;
|
|
44552
44554
|
}
|
|
44553
|
-
await
|
|
44555
|
+
await lr(o);
|
|
44554
44556
|
}
|
|
44555
44557
|
throw new Error("Unreachable");
|
|
44556
44558
|
}
|
|
@@ -44568,7 +44570,7 @@ var Ot = class extends z {
|
|
|
44568
44570
|
if (i.pollCount === void 0) n.headers && typeof n.headers == "object" && "Prefer" in n.headers && (o.headers = { ...n.headers }, delete o.headers.Prefer), i.statusUrl = t, i.pollCount = 1;
|
|
44569
44571
|
else {
|
|
44570
44572
|
let s = n.pollStatusPeriod ?? 1e3;
|
|
44571
|
-
await
|
|
44573
|
+
await lr(s), i.pollCount++;
|
|
44572
44574
|
}
|
|
44573
44575
|
return this.request("GET", t, o, i);
|
|
44574
44576
|
}
|
|
@@ -44590,7 +44592,7 @@ var Ot = class extends z {
|
|
|
44590
44592
|
}
|
|
44591
44593
|
}
|
|
44592
44594
|
addFetchOptionsDefaults(t) {
|
|
44593
|
-
this.setRequestHeader(t, "X-Medplum", "extended"), this.setRequestHeader(t, "Accept",
|
|
44595
|
+
this.setRequestHeader(t, "X-Medplum", "extended"), this.setRequestHeader(t, "Accept", Fs, true), t.body && this.setRequestHeader(t, "Content-Type", D.FHIR_JSON, true), this.accessToken ? this.setRequestHeader(t, "Authorization", "Bearer " + this.accessToken) : this.basicAuth && this.setRequestHeader(t, "Authorization", "Basic " + this.basicAuth), t.cache || (t.cache = "no-cache"), t.credentials || (t.credentials = "include");
|
|
44594
44596
|
}
|
|
44595
44597
|
setRequestContentType(t, n) {
|
|
44596
44598
|
this.setRequestHeader(t, "Content-Type", n);
|
|
@@ -44607,20 +44609,20 @@ var Ot = class extends z {
|
|
|
44607
44609
|
return this.refresh() ? this.request(t, n, i) : (this.clear(), this.onUnauthenticated && this.onUnauthenticated(), Promise.reject(new Error("Unauthenticated")));
|
|
44608
44610
|
}
|
|
44609
44611
|
async startPkce() {
|
|
44610
|
-
let t =
|
|
44612
|
+
let t = Er();
|
|
44611
44613
|
sessionStorage.setItem("pkceState", t);
|
|
44612
|
-
let n =
|
|
44614
|
+
let n = Er();
|
|
44613
44615
|
sessionStorage.setItem("codeVerifier", n);
|
|
44614
|
-
let i = await
|
|
44616
|
+
let i = await Jn(n), o = On(i).replaceAll("+", "-").replaceAll("/", "_").replaceAll("=", "");
|
|
44615
44617
|
return sessionStorage.setItem("codeChallenge", o), { codeChallengeMethod: "S256", codeChallenge: o };
|
|
44616
44618
|
}
|
|
44617
44619
|
async requestAuthorization(t) {
|
|
44618
44620
|
let n = await this.ensureCodeChallenge(t ?? {}), i = new URL(this.authorizeUrl);
|
|
44619
|
-
i.searchParams.set("response_type", "code"), i.searchParams.set("state", sessionStorage.getItem("pkceState")), i.searchParams.set("client_id", n.clientId ?? this.clientId), i.searchParams.set("redirect_uri", n.redirectUri ??
|
|
44621
|
+
i.searchParams.set("response_type", "code"), i.searchParams.set("state", sessionStorage.getItem("pkceState")), i.searchParams.set("client_id", n.clientId ?? this.clientId), i.searchParams.set("redirect_uri", n.redirectUri ?? ci()), i.searchParams.set("code_challenge_method", n.codeChallengeMethod), i.searchParams.set("code_challenge", n.codeChallenge), i.searchParams.set("scope", n.scope ?? "openid profile"), window.location.assign(i.toString());
|
|
44620
44622
|
}
|
|
44621
44623
|
processCode(t, n) {
|
|
44622
44624
|
let i = new URLSearchParams();
|
|
44623
|
-
if (i.set("grant_type", "authorization_code"), i.set("code", t), i.set("client_id", n?.clientId ?? this.clientId), i.set("redirect_uri", n?.redirectUri ??
|
|
44625
|
+
if (i.set("grant_type", "authorization_code"), i.set("code", t), i.set("client_id", n?.clientId ?? this.clientId), i.set("redirect_uri", n?.redirectUri ?? ci()), typeof sessionStorage < "u") {
|
|
44624
44626
|
let o = sessionStorage.getItem("codeVerifier");
|
|
44625
44627
|
o && i.set("code_verifier", o);
|
|
44626
44628
|
}
|
|
@@ -44652,25 +44654,25 @@ var Ot = class extends z {
|
|
|
44652
44654
|
return n.append("grant_type", "client_credentials"), n.append("client_assertion_type", "urn:ietf:params:oauth:client-assertion-type:jwt-bearer"), n.append("client_assertion", t), this.fetchTokens(n);
|
|
44653
44655
|
}
|
|
44654
44656
|
setBasicAuth(t, n) {
|
|
44655
|
-
this.clientId = t, this.clientSecret = n, this.basicAuth =
|
|
44657
|
+
this.clientId = t, this.clientSecret = n, this.basicAuth = zn(t + ":" + n);
|
|
44656
44658
|
}
|
|
44657
44659
|
async fhircastSubscribe(t, n) {
|
|
44658
44660
|
if (!(typeof t == "string" && t !== "")) throw new f(h("Invalid topic provided. Topic must be a valid string."));
|
|
44659
44661
|
if (!(typeof n == "object" && Array.isArray(n) && n.length > 0)) throw new f(h("Invalid events provided. Events must be an array of event names containing at least one event."));
|
|
44660
|
-
let i = { channelType: "websocket", mode: "subscribe", topic: t, events: n }, s = (await this.post("/fhircast/STU3",
|
|
44662
|
+
let i = { channelType: "websocket", mode: "subscribe", topic: t, events: n }, s = (await this.post("/fhircast/STU3", Cr(i), D.FORM_URL_ENCODED))["hub.channel.endpoint"];
|
|
44661
44663
|
if (!s) throw new Error("Invalid response!");
|
|
44662
44664
|
return i.endpoint = s, i;
|
|
44663
44665
|
}
|
|
44664
44666
|
async fhircastUnsubscribe(t) {
|
|
44665
44667
|
if (!Pt(t)) throw new f(h("Invalid topic or subscriptionRequest. SubscriptionRequest must be an object."));
|
|
44666
44668
|
if (!(t.endpoint && typeof t.endpoint == "string" && t.endpoint.startsWith("ws"))) throw new f(h("Provided subscription request must have an endpoint in order to unsubscribe."));
|
|
44667
|
-
t.mode = "unsubscribe", await this.post("/fhircast/STU3",
|
|
44669
|
+
t.mode = "unsubscribe", await this.post("/fhircast/STU3", Cr(t), D.FORM_URL_ENCODED);
|
|
44668
44670
|
}
|
|
44669
44671
|
fhircastConnect(t) {
|
|
44670
44672
|
return new Rt(t);
|
|
44671
44673
|
}
|
|
44672
44674
|
async fhircastPublish(t, n, i, o) {
|
|
44673
|
-
return
|
|
44675
|
+
return Xn(n) ? this.post(`/fhircast/STU3/${t}`, wr(t, n, i, o), D.JSON) : (ei(n), this.post(`/fhircast/STU3/${t}`, wr(t, n, i), D.JSON));
|
|
44674
44676
|
}
|
|
44675
44677
|
async fhircastGetContext(t) {
|
|
44676
44678
|
return this.get(`/fhircast/STU3/${t}`);
|
|
@@ -44701,7 +44703,7 @@ var Ot = class extends z {
|
|
|
44701
44703
|
}
|
|
44702
44704
|
async verifyTokens(t) {
|
|
44703
44705
|
let n = t.access_token;
|
|
44704
|
-
if (
|
|
44706
|
+
if (ri(n)) {
|
|
44705
44707
|
let i = Ct(n);
|
|
44706
44708
|
if (Date.now() >= i.exp * 1e3) throw this.clearActiveLogin(), new Error("Token expired");
|
|
44707
44709
|
if (i.cid) {
|
|
@@ -44719,7 +44721,7 @@ var Ot = class extends z {
|
|
|
44719
44721
|
}
|
|
44720
44722
|
}
|
|
44721
44723
|
getSubscriptionManager() {
|
|
44722
|
-
return this.subscriptionManager || (this.subscriptionManager = new At(this,
|
|
44724
|
+
return this.subscriptionManager || (this.subscriptionManager = new At(this, Dn(this.baseUrl, "/ws/subscriptions-r4"))), this.subscriptionManager;
|
|
44723
44725
|
}
|
|
44724
44726
|
subscribeToCriteria(t, n) {
|
|
44725
44727
|
return this.getSubscriptionManager().addCriteria(t, n);
|
|
@@ -44731,40 +44733,40 @@ var Ot = class extends z {
|
|
|
44731
44733
|
return this.getSubscriptionManager().getMasterEmitter();
|
|
44732
44734
|
}
|
|
44733
44735
|
};
|
|
44734
|
-
function
|
|
44736
|
+
function Hs() {
|
|
44735
44737
|
if (!globalThis.fetch) throw new Error("Fetch not available in this environment");
|
|
44736
44738
|
return globalThis.fetch.bind(globalThis);
|
|
44737
44739
|
}
|
|
44738
|
-
function
|
|
44740
|
+
function ci() {
|
|
44739
44741
|
return typeof window > "u" ? "" : window.location.protocol + "//" + window.location.host + "/";
|
|
44740
44742
|
}
|
|
44741
|
-
async function
|
|
44743
|
+
async function ui(r6, e) {
|
|
44742
44744
|
let t = r6.headers.get("content-location");
|
|
44743
44745
|
if (t) return t;
|
|
44744
44746
|
let n = r6.headers.get("location");
|
|
44745
44747
|
if (n) return n;
|
|
44746
44748
|
if (xe(e) && e.issue?.[0]?.diagnostics) return e.issue[0].diagnostics;
|
|
44747
44749
|
}
|
|
44748
|
-
function
|
|
44750
|
+
function kr(r6) {
|
|
44749
44751
|
let e = r6.entry?.map((t) => t.resource) ?? [];
|
|
44750
44752
|
return Object.assign(e, { bundle: r6 });
|
|
44751
44753
|
}
|
|
44752
|
-
function
|
|
44754
|
+
function Qs(r6) {
|
|
44753
44755
|
return b(r6) && "data" in r6 && "contentType" in r6;
|
|
44754
44756
|
}
|
|
44755
|
-
function
|
|
44756
|
-
return
|
|
44757
|
+
function li(r6, e, t, n) {
|
|
44758
|
+
return Qs(r6) ? r6 : { data: r6, filename: e, contentType: t, onProgress: n };
|
|
44757
44759
|
}
|
|
44758
|
-
function
|
|
44760
|
+
function Ks(r6) {
|
|
44759
44761
|
return b(r6) && "docDefinition" in r6;
|
|
44760
44762
|
}
|
|
44761
|
-
function
|
|
44762
|
-
return
|
|
44763
|
+
function zs(r6, e, t, n) {
|
|
44764
|
+
return Ks(r6) ? r6 : { docDefinition: r6, filename: e, tableLayouts: t, fonts: n };
|
|
44763
44765
|
}
|
|
44764
|
-
var
|
|
44765
|
-
var
|
|
44766
|
-
var
|
|
44767
|
-
var
|
|
44766
|
+
var aa = [..._e, "->", "<<", ">>", "=="];
|
|
44767
|
+
var la = Le().registerInfix("->", { precedence: y.Arrow }).registerInfix(";", { precedence: y.Semicolon });
|
|
44768
|
+
var Ca = [..._e, "eq", "ne", "co"];
|
|
44769
|
+
var Oa = Le();
|
|
44768
44770
|
var se = class {
|
|
44769
44771
|
constructor(e = "\r", t = "|", n = "^", i = "~", o = "\\", s = "&") {
|
|
44770
44772
|
this.segmentSeparator = e;
|
|
@@ -44781,7 +44783,7 @@ var se = class {
|
|
|
44781
44783
|
return this.componentSeparator + this.repetitionSeparator + this.escapeCharacter + this.subcomponentSeparator;
|
|
44782
44784
|
}
|
|
44783
44785
|
};
|
|
44784
|
-
var
|
|
44786
|
+
var wi = class r {
|
|
44785
44787
|
constructor(e, t = new se()) {
|
|
44786
44788
|
this.context = t, this.segments = e;
|
|
44787
44789
|
}
|
|
@@ -44805,7 +44807,7 @@ var Ci = class r {
|
|
|
44805
44807
|
}
|
|
44806
44808
|
buildAck() {
|
|
44807
44809
|
let e = /* @__PURE__ */ new Date(), t = this.getSegment("MSH"), n = t?.getField(3)?.toString() ?? "", i = t?.getField(4)?.toString() ?? "", o = t?.getField(5)?.toString() ?? "", s = t?.getField(6)?.toString() ?? "", a2 = t?.getField(10)?.toString() ?? "", c = t?.getField(12)?.toString() ?? "2.5.1";
|
|
44808
|
-
return new r([new We(["MSH", this.context.getMsh2(), o, s, n, i,
|
|
44810
|
+
return new r([new We(["MSH", this.context.getMsh2(), o, s, n, i, ka(e), "", this.buildAckMessageType(t), e.getTime().toString(), "P", c], this.context), new We(["MSA", "AA", a2, "OK"], this.context)]);
|
|
44809
44811
|
}
|
|
44810
44812
|
buildAckMessageType(e) {
|
|
44811
44813
|
let t = e?.getField(9), n = t?.getComponent(2), i = t?.getComponent(3), o = "ACK";
|
|
@@ -44822,7 +44824,7 @@ var Ci = class r {
|
|
|
44822
44824
|
};
|
|
44823
44825
|
var We = class r2 {
|
|
44824
44826
|
constructor(e, t = new se()) {
|
|
44825
|
-
this.context = t,
|
|
44827
|
+
this.context = t, Cn(e) ? this.fields = e.map((n) => Oe.parse(n, t)) : this.fields = e, this.name = this.fields[0].components[0][0];
|
|
44826
44828
|
}
|
|
44827
44829
|
get(e) {
|
|
44828
44830
|
return this.fields[e];
|
|
@@ -44863,12 +44865,12 @@ var Oe = class r3 {
|
|
|
44863
44865
|
return new r3(e.split(t.repetitionSeparator).map((n) => n.split(t.componentSeparator)), t);
|
|
44864
44866
|
}
|
|
44865
44867
|
};
|
|
44866
|
-
function
|
|
44868
|
+
function ka(r6) {
|
|
44867
44869
|
let e = r6 instanceof Date ? r6 : new Date(r6), n = e.toISOString().replace(/[-:T]/g, "").replace(/(\.\d+)?Z$/, ""), i = e.getUTCMilliseconds();
|
|
44868
44870
|
return i > 0 && (n += "." + i.toString()), n;
|
|
44869
44871
|
}
|
|
44870
44872
|
var _r = ((o) => (o[o.NONE = 0] = "NONE", o[o.ERROR = 1] = "ERROR", o[o.WARN = 2] = "WARN", o[o.INFO = 3] = "INFO", o[o.DEBUG = 4] = "DEBUG", o))(_r || {});
|
|
44871
|
-
var
|
|
44873
|
+
var Ai = class r4 {
|
|
44872
44874
|
constructor(e, t = {}, n = 3, i) {
|
|
44873
44875
|
this.write = e;
|
|
44874
44876
|
this.metadata = t;
|
|
@@ -44901,7 +44903,7 @@ var wi = class r4 {
|
|
|
44901
44903
|
`) }), this.write(JSON.stringify({ level: _r[e], timestamp: (/* @__PURE__ */ new Date()).toISOString(), msg: this.prefix ? `${this.prefix}${t}` : t, ...n, ...this.metadata })));
|
|
44902
44904
|
}
|
|
44903
44905
|
};
|
|
44904
|
-
function
|
|
44906
|
+
function Cf(r6) {
|
|
44905
44907
|
let e = _r[r6.toUpperCase()];
|
|
44906
44908
|
if (e === void 0) throw new Error(`Invalid log level: ${r6}`);
|
|
44907
44909
|
return e;
|
|
@@ -44950,7 +44952,7 @@ var p = class extends a {
|
|
|
44950
44952
|
e.on("data", (s) => {
|
|
44951
44953
|
try {
|
|
44952
44954
|
if (this.appendData(s), s.at(-2) === 28 && s.at(-1) === 13) {
|
|
44953
|
-
let o = Buffer.concat(this.chunks), i = o.subarray(1, o.length - 2), f2 = (0, import_iconv_lite.decode)(i, this.encoding), g =
|
|
44955
|
+
let o = Buffer.concat(this.chunks), i = o.subarray(1, o.length - 2), f2 = (0, import_iconv_lite.decode)(i, this.encoding), g = wi.parse(f2);
|
|
44954
44956
|
this.dispatchEvent(new d2(this, g)), this.resetBuffer();
|
|
44955
44957
|
}
|
|
44956
44958
|
} catch (o) {
|
|
@@ -45202,7 +45204,7 @@ var AgentDicomChannel = class extends BaseChannel {
|
|
|
45202
45204
|
});
|
|
45203
45205
|
response.setStatus(dimse.constants.Status.Success);
|
|
45204
45206
|
} catch (err) {
|
|
45205
|
-
DcmjsDimseScp.channel.log.error(`DICOM error: ${
|
|
45207
|
+
DcmjsDimseScp.channel.log.error(`DICOM error: ${Ii(err)}`);
|
|
45206
45208
|
response.setStatus(dimse.constants.Status.ProcessingFailure);
|
|
45207
45209
|
}
|
|
45208
45210
|
return response;
|
|
@@ -45277,7 +45279,7 @@ var AgentHl7Channel = class extends BaseChannel {
|
|
|
45277
45279
|
sendToRemote(msg) {
|
|
45278
45280
|
const connection = this.connections.get(msg.remote);
|
|
45279
45281
|
if (connection) {
|
|
45280
|
-
connection.hl7Connection.send(
|
|
45282
|
+
connection.hl7Connection.send(wi.parse(msg.body));
|
|
45281
45283
|
}
|
|
45282
45284
|
}
|
|
45283
45285
|
handleNewConnection(connection) {
|
|
@@ -45305,7 +45307,7 @@ var AgentHl7ChannelConnection = class {
|
|
|
45305
45307
|
body: event.message.toString()
|
|
45306
45308
|
});
|
|
45307
45309
|
} catch (err) {
|
|
45308
|
-
this.channel.log.error(`HL7 error: ${
|
|
45310
|
+
this.channel.log.error(`HL7 error: ${Ii(err)}`);
|
|
45309
45311
|
}
|
|
45310
45312
|
}
|
|
45311
45313
|
close() {
|
|
@@ -45388,7 +45390,7 @@ async function fetchVersionManifest(version) {
|
|
|
45388
45390
|
try {
|
|
45389
45391
|
message = (await res.json()).message;
|
|
45390
45392
|
} catch (err) {
|
|
45391
|
-
console.error(`Failed to parse message from body: ${
|
|
45393
|
+
console.error(`Failed to parse message from body: ${Ii(err)}`);
|
|
45392
45394
|
}
|
|
45393
45395
|
throw new Error(
|
|
45394
45396
|
`Received status code ${res.status} while fetching manifest for version '${version ?? "latest"}'. Message: ${message}`
|
|
@@ -45466,7 +45468,7 @@ var App = class _App {
|
|
|
45466
45468
|
this.shutdown = false;
|
|
45467
45469
|
this.keepAlive = false;
|
|
45468
45470
|
_App.instance = this;
|
|
45469
|
-
this.log = new
|
|
45471
|
+
this.log = new Ai((msg) => console.log(msg), void 0, logLevel);
|
|
45470
45472
|
}
|
|
45471
45473
|
async start() {
|
|
45472
45474
|
this.log.info("Medplum service starting...");
|
|
@@ -45486,7 +45488,7 @@ var App = class _App {
|
|
|
45486
45488
|
if ((0, import_node_fs3.existsSync)(UPGRADE_MANIFEST_PATH)) {
|
|
45487
45489
|
const upgradeFile = (0, import_node_fs3.readFileSync)(UPGRADE_MANIFEST_PATH, { encoding: "utf-8" });
|
|
45488
45490
|
const upgradeDetails = JSON.parse(upgradeFile);
|
|
45489
|
-
if (upgradeDetails.targetVersion ===
|
|
45491
|
+
if (upgradeDetails.targetVersion === fd.split("-")[0]) {
|
|
45490
45492
|
await this.sendToWebSocket({
|
|
45491
45493
|
type: "agent:upgrade:response",
|
|
45492
45494
|
statusCode: 200,
|
|
@@ -45494,7 +45496,7 @@ var App = class _App {
|
|
|
45494
45496
|
});
|
|
45495
45497
|
this.log.info(`Successfully upgraded to version ${upgradeDetails.targetVersion}`);
|
|
45496
45498
|
} else {
|
|
45497
|
-
const errMsg = `Failed to upgrade to version ${upgradeDetails.targetVersion}. Agent still running with version ${
|
|
45499
|
+
const errMsg = `Failed to upgrade to version ${upgradeDetails.targetVersion}. Agent still running with version ${fd}`;
|
|
45498
45500
|
await this.sendToWebSocket({
|
|
45499
45501
|
type: "agent:error",
|
|
45500
45502
|
body: errMsg,
|
|
@@ -45532,7 +45534,7 @@ var App = class _App {
|
|
|
45532
45534
|
this.webSocket.binaryType = "nodebuffer";
|
|
45533
45535
|
this.webSocket.addEventListener("error", (err) => {
|
|
45534
45536
|
if (!this.shutdown) {
|
|
45535
|
-
this.log.error(`WebSocket closed due to an error: ${
|
|
45537
|
+
this.log.error(`WebSocket closed due to an error: ${Ii(err)}`);
|
|
45536
45538
|
}
|
|
45537
45539
|
});
|
|
45538
45540
|
this.webSocket.addEventListener("open", async () => {
|
|
@@ -45563,7 +45565,7 @@ var App = class _App {
|
|
|
45563
45565
|
this.startWebSocketWorker();
|
|
45564
45566
|
break;
|
|
45565
45567
|
case "agent:heartbeat:request":
|
|
45566
|
-
await this.sendToWebSocket({ type: "agent:heartbeat:response", version:
|
|
45568
|
+
await this.sendToWebSocket({ type: "agent:heartbeat:response", version: fd });
|
|
45567
45569
|
break;
|
|
45568
45570
|
case "agent:heartbeat:response":
|
|
45569
45571
|
break;
|
|
@@ -45597,7 +45599,7 @@ var App = class _App {
|
|
|
45597
45599
|
} catch (err) {
|
|
45598
45600
|
await this.sendToWebSocket({
|
|
45599
45601
|
type: "agent:error",
|
|
45600
|
-
body:
|
|
45602
|
+
body: Ii(err),
|
|
45601
45603
|
callback: command.callback
|
|
45602
45604
|
});
|
|
45603
45605
|
}
|
|
@@ -45612,7 +45614,7 @@ var App = class _App {
|
|
|
45612
45614
|
this.log.error(`Unknown message type: ${command.type}`);
|
|
45613
45615
|
}
|
|
45614
45616
|
} catch (err) {
|
|
45615
|
-
this.log.error(`WebSocket error on incoming message: ${
|
|
45617
|
+
this.log.error(`WebSocket error on incoming message: ${Ii(err)}`);
|
|
45616
45618
|
}
|
|
45617
45619
|
});
|
|
45618
45620
|
return new Promise((resolve2, reject) => {
|
|
@@ -45687,7 +45689,7 @@ var App = class _App {
|
|
|
45687
45689
|
try {
|
|
45688
45690
|
await this.startOrReloadChannel(definition, endpoint);
|
|
45689
45691
|
} catch (err) {
|
|
45690
|
-
this.log.error(
|
|
45692
|
+
this.log.error(Ii(err));
|
|
45691
45693
|
}
|
|
45692
45694
|
}
|
|
45693
45695
|
}
|
|
@@ -45713,7 +45715,7 @@ var App = class _App {
|
|
|
45713
45715
|
parsedEndpoint = new URL(endpoint.address);
|
|
45714
45716
|
} catch (err) {
|
|
45715
45717
|
throw new Error(
|
|
45716
|
-
`Error while validating endpoint address for channel '${channel.name}': ${
|
|
45718
|
+
`Error while validating endpoint address for channel '${channel.name}': ${Ii(err)}`
|
|
45717
45719
|
);
|
|
45718
45720
|
}
|
|
45719
45721
|
if (seenPorts.has(parsedEndpoint.port)) {
|
|
@@ -45796,7 +45798,7 @@ var App = class _App {
|
|
|
45796
45798
|
try {
|
|
45797
45799
|
await this.sendToWebSocket(msg);
|
|
45798
45800
|
} catch (err) {
|
|
45799
|
-
this.log.error(`WebSocket error while attempting to send message: ${
|
|
45801
|
+
this.log.error(`WebSocket error while attempting to send message: ${Ii(err)}`);
|
|
45800
45802
|
this.webSocketQueue.unshift(msg);
|
|
45801
45803
|
throw err;
|
|
45802
45804
|
}
|
|
@@ -45833,7 +45835,7 @@ IPv6 is currently unsupported.`;
|
|
|
45833
45835
|
this.log.error(errMsg);
|
|
45834
45836
|
throw new Error(errMsg);
|
|
45835
45837
|
}
|
|
45836
|
-
if (!((0, import_node_net.isIPv4)(message.remote) ||
|
|
45838
|
+
if (!((0, import_node_net.isIPv4)(message.remote) || Ru(message.remote))) {
|
|
45837
45839
|
const errMsg = `Attempted to ping an invalid host.
|
|
45838
45840
|
|
|
45839
45841
|
"${message.remote}" is not a valid IPv4 address or a resolvable hostname.`;
|
|
@@ -45872,7 +45874,7 @@ ${result}`);
|
|
|
45872
45874
|
body: result
|
|
45873
45875
|
});
|
|
45874
45876
|
} catch (err) {
|
|
45875
|
-
this.log.error(`Error during ping attempt to ${message.remote ?? "NO_HOST_GIVEN"}: ${
|
|
45877
|
+
this.log.error(`Error during ping attempt to ${message.remote ?? "NO_HOST_GIVEN"}: ${Ii(err)}`);
|
|
45876
45878
|
this.addToWebSocketQueue({
|
|
45877
45879
|
type: "agent:transmit:response",
|
|
45878
45880
|
channel: message.channel,
|
|
@@ -45880,7 +45882,7 @@ ${result}`);
|
|
|
45880
45882
|
remote: message.remote,
|
|
45881
45883
|
callback: message.callback,
|
|
45882
45884
|
statusCode: 400,
|
|
45883
|
-
body:
|
|
45885
|
+
body: Ii(err)
|
|
45884
45886
|
});
|
|
45885
45887
|
}
|
|
45886
45888
|
}
|
|
@@ -45927,11 +45929,11 @@ ${result}`);
|
|
|
45927
45929
|
});
|
|
45928
45930
|
});
|
|
45929
45931
|
child.on("error", (err) => {
|
|
45930
|
-
this.log.error(
|
|
45932
|
+
this.log.error(Ii(err));
|
|
45931
45933
|
});
|
|
45932
45934
|
} catch (err) {
|
|
45933
45935
|
const versionTag = message.version ? `v${message.version}` : "latest";
|
|
45934
|
-
const errMsg = `Error during upgrading to version '${versionTag}': ${
|
|
45936
|
+
const errMsg = `Error during upgrading to version '${versionTag}': ${Ii(err)}`;
|
|
45935
45937
|
this.log.error(errMsg);
|
|
45936
45938
|
await this.sendToWebSocket({
|
|
45937
45939
|
type: "agent:error",
|
|
@@ -45944,11 +45946,11 @@ ${result}`);
|
|
|
45944
45946
|
await this.stop();
|
|
45945
45947
|
this.log.info("Successfully stopped agent network services");
|
|
45946
45948
|
const targetVersion = message.version ?? await fetchLatestVersionString();
|
|
45947
|
-
this.log.info("Writing upgrade manifest...", { previousVersion:
|
|
45949
|
+
this.log.info("Writing upgrade manifest...", { previousVersion: fd, targetVersion });
|
|
45948
45950
|
(0, import_node_fs3.writeFileSync)(
|
|
45949
45951
|
UPGRADE_MANIFEST_PATH,
|
|
45950
45952
|
JSON.stringify({
|
|
45951
|
-
previousVersion:
|
|
45953
|
+
previousVersion: fd,
|
|
45952
45954
|
targetVersion,
|
|
45953
45955
|
callback: message.callback ?? null
|
|
45954
45956
|
}),
|
|
@@ -45958,7 +45960,7 @@ ${result}`);
|
|
|
45958
45960
|
child.disconnect();
|
|
45959
45961
|
} catch (err) {
|
|
45960
45962
|
this.log.error(
|
|
45961
|
-
`Error while stopping agent or messaging child process as part of upgrade: ${
|
|
45963
|
+
`Error while stopping agent or messaging child process as part of upgrade: ${Ii(err)}`
|
|
45962
45964
|
);
|
|
45963
45965
|
import_node_process.default.exit(1);
|
|
45964
45966
|
}
|
|
@@ -46016,7 +46018,7 @@ ${result}`);
|
|
|
46016
46018
|
});
|
|
46017
46019
|
}
|
|
46018
46020
|
}
|
|
46019
|
-
client.sendAndWait(
|
|
46021
|
+
client.sendAndWait(wi.parse(message.body)).then((response) => {
|
|
46020
46022
|
this.log.info(`Response: ${response.toString().replaceAll("\r", "\n")}`);
|
|
46021
46023
|
this.addToWebSocketQueue({
|
|
46022
46024
|
type: "agent:transmit:response",
|
|
@@ -46028,7 +46030,7 @@ ${result}`);
|
|
|
46028
46030
|
body: response.toString()
|
|
46029
46031
|
});
|
|
46030
46032
|
}).catch((err) => {
|
|
46031
|
-
this.log.error(`HL7 error: ${
|
|
46033
|
+
this.log.error(`HL7 error: ${Ii(err)}`);
|
|
46032
46034
|
this.addToWebSocketQueue({
|
|
46033
46035
|
type: "agent:transmit:response",
|
|
46034
46036
|
channel: message.channel,
|
|
@@ -46036,7 +46038,7 @@ ${result}`);
|
|
|
46036
46038
|
callback: message.callback,
|
|
46037
46039
|
contentType: D.TEXT,
|
|
46038
46040
|
statusCode: 400,
|
|
46039
|
-
body:
|
|
46041
|
+
body: Ii(err)
|
|
46040
46042
|
});
|
|
46041
46043
|
if (client.keepAlive) {
|
|
46042
46044
|
this.hl7Clients.delete(message.remote);
|
|
@@ -46085,7 +46087,7 @@ async function agentMain(argv) {
|
|
|
46085
46087
|
const { baseUrl, clientId, clientSecret, agentId } = args;
|
|
46086
46088
|
const medplum = new Ot({ baseUrl, clientId });
|
|
46087
46089
|
await medplum.startClientLogin(clientId, clientSecret);
|
|
46088
|
-
const app = new App(medplum, agentId,
|
|
46090
|
+
const app = new App(medplum, agentId, Cf(args.logLevel ?? "INFO"));
|
|
46089
46091
|
await app.start();
|
|
46090
46092
|
process.on("SIGINT", async () => {
|
|
46091
46093
|
console.log("Gracefully shutting down from SIGINT (Ctrl-C)");
|
|
@@ -46113,7 +46115,7 @@ async function upgraderMain(argv) {
|
|
|
46113
46115
|
if ((0, import_node_os4.platform)() !== "win32") {
|
|
46114
46116
|
throw new Error(`Unsupported platform: ${(0, import_node_os4.platform)()}. Agent upgrader currently only supports Windows`);
|
|
46115
46117
|
}
|
|
46116
|
-
const globalLogger = new
|
|
46118
|
+
const globalLogger = new Ai((msg) => console.log(msg));
|
|
46117
46119
|
if (!import_node_process2.default.send) {
|
|
46118
46120
|
globalLogger.error("Upgrader not started as a child process with Node IPC enabled. Aborting...");
|
|
46119
46121
|
import_node_process2.default.exit(1);
|
|
@@ -46152,7 +46154,7 @@ async function upgraderMain(argv) {
|
|
|
46152
46154
|
(0, import_node_child_process2.spawnSync)(binPath, ["/S"]);
|
|
46153
46155
|
globalLogger.info(`Agent version ${version} successfully installed`);
|
|
46154
46156
|
} catch (err) {
|
|
46155
|
-
globalLogger.error(`Error while attempting to run installer: ${
|
|
46157
|
+
globalLogger.error(`Error while attempting to run installer: ${Ii(err)}`);
|
|
46156
46158
|
globalLogger.error("Failed to run installer, attempting to restart agent service...");
|
|
46157
46159
|
try {
|
|
46158
46160
|
(0, import_node_child_process2.execSync)('net start "Medplum Agent"');
|