@nsshunt/stsfhirclient 1.0.29 → 1.0.31

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.
@@ -13,34 +13,32 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
13
13
  var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
14
14
 
15
15
  var _options, _DUMMY_USER, _invokeMethods, _maxRetries, _sleepDuration, _NoRetryStatusCodes, _stsfhirapiroot, _LogDebugMessage, _LogErrorMessage, _HandleError, _InvokeResourceAPI, _TestMode, ___InvokeResourceAPI;
16
- var byteToHex = [];
17
- for (var i = 0; i < 256; ++i) {
16
+ const byteToHex = [];
17
+ for (let i = 0; i < 256; ++i) {
18
18
  byteToHex.push((i + 256).toString(16).slice(1));
19
19
  }
20
20
  function unsafeStringify(arr, offset = 0) {
21
21
  return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
22
22
  }
23
- var getRandomValues;
24
- var rnds8 = new Uint8Array(16);
23
+ let getRandomValues;
24
+ const rnds8 = new Uint8Array(16);
25
25
  function rng() {
26
26
  if (!getRandomValues) {
27
- getRandomValues = typeof crypto !== "undefined" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
28
- if (!getRandomValues) {
27
+ if (typeof crypto === "undefined" || !crypto.getRandomValues) {
29
28
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
30
29
  }
30
+ getRandomValues = crypto.getRandomValues.bind(crypto);
31
31
  }
32
32
  return getRandomValues(rnds8);
33
33
  }
34
- var randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
35
- const native = {
36
- randomUUID
37
- };
34
+ const randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
35
+ const native = { randomUUID };
38
36
  function v4(options, buf, offset) {
39
37
  if (native.randomUUID && !buf && !options) {
40
38
  return native.randomUUID();
41
39
  }
42
40
  options = options || {};
43
- var rnds = options.random || (options.rng || rng)();
41
+ const rnds = options.random || (options.rng || rng)();
44
42
  rnds[6] = rnds[6] & 15 | 64;
45
43
  rnds[8] = rnds[8] & 63 | 128;
46
44
  return unsafeStringify(rnds);
@@ -49,7 +47,7 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
49
47
  function getDefaultExportFromCjs(x) {
50
48
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
51
49
  }
52
- var ansiStyles$1 = { exports: {} };
50
+ var ansiStyles = { exports: {} };
53
51
  var colorName;
54
52
  var hasRequiredColorName;
55
53
  function requireColorName() {
@@ -412,8 +410,8 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
412
410
  }
413
411
  const t1 = 2 * l - t2;
414
412
  const rgb = [0, 0, 0];
415
- for (let i2 = 0; i2 < 3; i2++) {
416
- t3 = h + 1 / 3 * -(i2 - 1);
413
+ for (let i = 0; i < 3; i++) {
414
+ t3 = h + 1 / 3 * -(i - 1);
417
415
  if (t3 < 0) {
418
416
  t3++;
419
417
  }
@@ -429,7 +427,7 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
429
427
  } else {
430
428
  val = t1;
431
429
  }
432
- rgb[i2] = val * 255;
430
+ rgb[i] = val * 255;
433
431
  }
434
432
  return rgb;
435
433
  };
@@ -496,17 +494,17 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
496
494
  wh /= ratio;
497
495
  bl /= ratio;
498
496
  }
499
- const i2 = Math.floor(6 * h);
497
+ const i = Math.floor(6 * h);
500
498
  const v = 1 - bl;
501
- f = 6 * h - i2;
502
- if ((i2 & 1) !== 0) {
499
+ f = 6 * h - i;
500
+ if ((i & 1) !== 0) {
503
501
  f = 1 - f;
504
502
  }
505
503
  const n = wh + f * (v - wh);
506
504
  let r;
507
505
  let g;
508
506
  let b;
509
- switch (i2) {
507
+ switch (i) {
510
508
  default:
511
509
  case 6:
512
510
  case 0:
@@ -888,8 +886,8 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
888
886
  function buildGraph() {
889
887
  const graph = {};
890
888
  const models = Object.keys(conversions2);
891
- for (let len = models.length, i2 = 0; i2 < len; i2++) {
892
- graph[models[i2]] = {
889
+ for (let len = models.length, i = 0; i < len; i++) {
890
+ graph[models[i]] = {
893
891
  // http://jsperf.com/1-vs-infinity
894
892
  // micro-opt, but this is simple.
895
893
  distance: -1,
@@ -905,8 +903,8 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
905
903
  while (queue.length) {
906
904
  const current = queue.pop();
907
905
  const adjacents = Object.keys(conversions2[current]);
908
- for (let len = adjacents.length, i2 = 0; i2 < len; i2++) {
909
- const adjacent = adjacents[i2];
906
+ for (let len = adjacents.length, i = 0; i < len; i++) {
907
+ const adjacent = adjacents[i];
910
908
  const node = graph[adjacent];
911
909
  if (node.distance === -1) {
912
910
  node.distance = graph[current].distance + 1;
@@ -938,8 +936,8 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
938
936
  const graph = deriveBFS(fromModel);
939
937
  const conversion = {};
940
938
  const models = Object.keys(graph);
941
- for (let len = models.length, i2 = 0; i2 < len; i2++) {
942
- const toModel = models[i2];
939
+ for (let len = models.length, i = 0; i < len; i++) {
940
+ const toModel = models[i];
943
941
  const node = graph[toModel];
944
942
  if (node.parent === null) {
945
943
  continue;
@@ -986,8 +984,8 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
986
984
  }
987
985
  const result = fn(args);
988
986
  if (typeof result === "object") {
989
- for (let len = result.length, i2 = 0; i2 < len; i2++) {
990
- result[i2] = Math.round(result[i2]);
987
+ for (let len = result.length, i = 0; i < len; i++) {
988
+ result[i] = Math.round(result[i]);
991
989
  }
992
990
  }
993
991
  return result;
@@ -1012,181 +1010,200 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
1012
1010
  colorConvert = convert;
1013
1011
  return colorConvert;
1014
1012
  }
1015
- ansiStyles$1.exports;
1016
- (function(module2) {
1017
- const wrapAnsi16 = (fn, offset) => (...args) => {
1018
- const code = fn(...args);
1019
- return `\x1B[${code + offset}m`;
1020
- };
1021
- const wrapAnsi256 = (fn, offset) => (...args) => {
1022
- const code = fn(...args);
1023
- return `\x1B[${38 + offset};5;${code}m`;
1024
- };
1025
- const wrapAnsi16m = (fn, offset) => (...args) => {
1026
- const rgb = fn(...args);
1027
- return `\x1B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
1028
- };
1029
- const ansi2ansi = (n) => n;
1030
- const rgb2rgb = (r, g, b) => [r, g, b];
1031
- const setLazyProperty = (object, property, get) => {
1032
- Object.defineProperty(object, property, {
1033
- get: () => {
1034
- const value = get();
1035
- Object.defineProperty(object, property, {
1036
- value,
1037
- enumerable: true,
1038
- configurable: true
1039
- });
1040
- return value;
1041
- },
1042
- enumerable: true,
1043
- configurable: true
1044
- });
1045
- };
1046
- let colorConvert2;
1047
- const makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => {
1048
- if (colorConvert2 === void 0) {
1049
- colorConvert2 = requireColorConvert();
1050
- }
1051
- const offset = isBackground ? 10 : 0;
1052
- const styles2 = {};
1053
- for (const [sourceSpace, suite] of Object.entries(colorConvert2)) {
1054
- const name = sourceSpace === "ansi16" ? "ansi" : sourceSpace;
1055
- if (sourceSpace === targetSpace) {
1056
- styles2[name] = wrap(identity, offset);
1057
- } else if (typeof suite === "object") {
1058
- styles2[name] = wrap(suite[targetSpace], offset);
1013
+ ansiStyles.exports;
1014
+ var hasRequiredAnsiStyles;
1015
+ function requireAnsiStyles() {
1016
+ if (hasRequiredAnsiStyles) return ansiStyles.exports;
1017
+ hasRequiredAnsiStyles = 1;
1018
+ (function(module2) {
1019
+ const wrapAnsi16 = (fn, offset) => (...args) => {
1020
+ const code = fn(...args);
1021
+ return `\x1B[${code + offset}m`;
1022
+ };
1023
+ const wrapAnsi256 = (fn, offset) => (...args) => {
1024
+ const code = fn(...args);
1025
+ return `\x1B[${38 + offset};5;${code}m`;
1026
+ };
1027
+ const wrapAnsi16m = (fn, offset) => (...args) => {
1028
+ const rgb = fn(...args);
1029
+ return `\x1B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
1030
+ };
1031
+ const ansi2ansi = (n) => n;
1032
+ const rgb2rgb = (r, g, b) => [r, g, b];
1033
+ const setLazyProperty = (object, property, get) => {
1034
+ Object.defineProperty(object, property, {
1035
+ get: () => {
1036
+ const value = get();
1037
+ Object.defineProperty(object, property, {
1038
+ value,
1039
+ enumerable: true,
1040
+ configurable: true
1041
+ });
1042
+ return value;
1043
+ },
1044
+ enumerable: true,
1045
+ configurable: true
1046
+ });
1047
+ };
1048
+ let colorConvert2;
1049
+ const makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => {
1050
+ if (colorConvert2 === void 0) {
1051
+ colorConvert2 = requireColorConvert();
1059
1052
  }
1060
- }
1061
- return styles2;
1062
- };
1063
- function assembleStyles() {
1064
- const codes = /* @__PURE__ */ new Map();
1065
- const styles2 = {
1066
- modifier: {
1067
- reset: [0, 0],
1068
- // 21 isn't widely supported and 22 does the same thing
1069
- bold: [1, 22],
1070
- dim: [2, 22],
1071
- italic: [3, 23],
1072
- underline: [4, 24],
1073
- inverse: [7, 27],
1074
- hidden: [8, 28],
1075
- strikethrough: [9, 29]
1076
- },
1077
- color: {
1078
- black: [30, 39],
1079
- red: [31, 39],
1080
- green: [32, 39],
1081
- yellow: [33, 39],
1082
- blue: [34, 39],
1083
- magenta: [35, 39],
1084
- cyan: [36, 39],
1085
- white: [37, 39],
1086
- // Bright color
1087
- blackBright: [90, 39],
1088
- redBright: [91, 39],
1089
- greenBright: [92, 39],
1090
- yellowBright: [93, 39],
1091
- blueBright: [94, 39],
1092
- magentaBright: [95, 39],
1093
- cyanBright: [96, 39],
1094
- whiteBright: [97, 39]
1095
- },
1096
- bgColor: {
1097
- bgBlack: [40, 49],
1098
- bgRed: [41, 49],
1099
- bgGreen: [42, 49],
1100
- bgYellow: [43, 49],
1101
- bgBlue: [44, 49],
1102
- bgMagenta: [45, 49],
1103
- bgCyan: [46, 49],
1104
- bgWhite: [47, 49],
1105
- // Bright color
1106
- bgBlackBright: [100, 49],
1107
- bgRedBright: [101, 49],
1108
- bgGreenBright: [102, 49],
1109
- bgYellowBright: [103, 49],
1110
- bgBlueBright: [104, 49],
1111
- bgMagentaBright: [105, 49],
1112
- bgCyanBright: [106, 49],
1113
- bgWhiteBright: [107, 49]
1053
+ const offset = isBackground ? 10 : 0;
1054
+ const styles = {};
1055
+ for (const [sourceSpace, suite] of Object.entries(colorConvert2)) {
1056
+ const name = sourceSpace === "ansi16" ? "ansi" : sourceSpace;
1057
+ if (sourceSpace === targetSpace) {
1058
+ styles[name] = wrap(identity, offset);
1059
+ } else if (typeof suite === "object") {
1060
+ styles[name] = wrap(suite[targetSpace], offset);
1061
+ }
1114
1062
  }
1063
+ return styles;
1115
1064
  };
1116
- styles2.color.gray = styles2.color.blackBright;
1117
- styles2.bgColor.bgGray = styles2.bgColor.bgBlackBright;
1118
- styles2.color.grey = styles2.color.blackBright;
1119
- styles2.bgColor.bgGrey = styles2.bgColor.bgBlackBright;
1120
- for (const [groupName, group] of Object.entries(styles2)) {
1121
- for (const [styleName, style] of Object.entries(group)) {
1122
- styles2[styleName] = {
1123
- open: `\x1B[${style[0]}m`,
1124
- close: `\x1B[${style[1]}m`
1125
- };
1126
- group[styleName] = styles2[styleName];
1127
- codes.set(style[0], style[1]);
1065
+ function assembleStyles() {
1066
+ const codes = /* @__PURE__ */ new Map();
1067
+ const styles = {
1068
+ modifier: {
1069
+ reset: [0, 0],
1070
+ // 21 isn't widely supported and 22 does the same thing
1071
+ bold: [1, 22],
1072
+ dim: [2, 22],
1073
+ italic: [3, 23],
1074
+ underline: [4, 24],
1075
+ inverse: [7, 27],
1076
+ hidden: [8, 28],
1077
+ strikethrough: [9, 29]
1078
+ },
1079
+ color: {
1080
+ black: [30, 39],
1081
+ red: [31, 39],
1082
+ green: [32, 39],
1083
+ yellow: [33, 39],
1084
+ blue: [34, 39],
1085
+ magenta: [35, 39],
1086
+ cyan: [36, 39],
1087
+ white: [37, 39],
1088
+ // Bright color
1089
+ blackBright: [90, 39],
1090
+ redBright: [91, 39],
1091
+ greenBright: [92, 39],
1092
+ yellowBright: [93, 39],
1093
+ blueBright: [94, 39],
1094
+ magentaBright: [95, 39],
1095
+ cyanBright: [96, 39],
1096
+ whiteBright: [97, 39]
1097
+ },
1098
+ bgColor: {
1099
+ bgBlack: [40, 49],
1100
+ bgRed: [41, 49],
1101
+ bgGreen: [42, 49],
1102
+ bgYellow: [43, 49],
1103
+ bgBlue: [44, 49],
1104
+ bgMagenta: [45, 49],
1105
+ bgCyan: [46, 49],
1106
+ bgWhite: [47, 49],
1107
+ // Bright color
1108
+ bgBlackBright: [100, 49],
1109
+ bgRedBright: [101, 49],
1110
+ bgGreenBright: [102, 49],
1111
+ bgYellowBright: [103, 49],
1112
+ bgBlueBright: [104, 49],
1113
+ bgMagentaBright: [105, 49],
1114
+ bgCyanBright: [106, 49],
1115
+ bgWhiteBright: [107, 49]
1116
+ }
1117
+ };
1118
+ styles.color.gray = styles.color.blackBright;
1119
+ styles.bgColor.bgGray = styles.bgColor.bgBlackBright;
1120
+ styles.color.grey = styles.color.blackBright;
1121
+ styles.bgColor.bgGrey = styles.bgColor.bgBlackBright;
1122
+ for (const [groupName, group] of Object.entries(styles)) {
1123
+ for (const [styleName, style] of Object.entries(group)) {
1124
+ styles[styleName] = {
1125
+ open: `\x1B[${style[0]}m`,
1126
+ close: `\x1B[${style[1]}m`
1127
+ };
1128
+ group[styleName] = styles[styleName];
1129
+ codes.set(style[0], style[1]);
1130
+ }
1131
+ Object.defineProperty(styles, groupName, {
1132
+ value: group,
1133
+ enumerable: false
1134
+ });
1128
1135
  }
1129
- Object.defineProperty(styles2, groupName, {
1130
- value: group,
1136
+ Object.defineProperty(styles, "codes", {
1137
+ value: codes,
1131
1138
  enumerable: false
1132
1139
  });
1140
+ styles.color.close = "\x1B[39m";
1141
+ styles.bgColor.close = "\x1B[49m";
1142
+ setLazyProperty(styles.color, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, false));
1143
+ setLazyProperty(styles.color, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, false));
1144
+ setLazyProperty(styles.color, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, false));
1145
+ setLazyProperty(styles.bgColor, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, true));
1146
+ setLazyProperty(styles.bgColor, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, true));
1147
+ setLazyProperty(styles.bgColor, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, true));
1148
+ return styles;
1133
1149
  }
1134
- Object.defineProperty(styles2, "codes", {
1135
- value: codes,
1136
- enumerable: false
1150
+ Object.defineProperty(module2, "exports", {
1151
+ enumerable: true,
1152
+ get: assembleStyles
1137
1153
  });
1138
- styles2.color.close = "\x1B[39m";
1139
- styles2.bgColor.close = "\x1B[49m";
1140
- setLazyProperty(styles2.color, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, false));
1141
- setLazyProperty(styles2.color, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, false));
1142
- setLazyProperty(styles2.color, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, false));
1143
- setLazyProperty(styles2.bgColor, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, true));
1144
- setLazyProperty(styles2.bgColor, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, true));
1145
- setLazyProperty(styles2.bgColor, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, true));
1146
- return styles2;
1147
- }
1148
- Object.defineProperty(module2, "exports", {
1149
- enumerable: true,
1150
- get: assembleStyles
1151
- });
1152
- })(ansiStyles$1);
1153
- var ansiStylesExports = ansiStyles$1.exports;
1154
- var browser = {
1155
- stdout: false,
1156
- stderr: false
1157
- };
1158
- const stringReplaceAll$1 = (string, substring, replacer) => {
1159
- let index = string.indexOf(substring);
1160
- if (index === -1) {
1161
- return string;
1162
- }
1163
- const substringLength = substring.length;
1164
- let endIndex = 0;
1165
- let returnValue = "";
1166
- do {
1167
- returnValue += string.substr(endIndex, index - endIndex) + substring + replacer;
1168
- endIndex = index + substringLength;
1169
- index = string.indexOf(substring, endIndex);
1170
- } while (index !== -1);
1171
- returnValue += string.substr(endIndex);
1172
- return returnValue;
1173
- };
1174
- const stringEncaseCRLFWithFirstIndex$1 = (string, prefix, postfix, index) => {
1175
- let endIndex = 0;
1176
- let returnValue = "";
1177
- do {
1178
- const gotCR = string[index - 1] === "\r";
1179
- returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
1180
- endIndex = index + 1;
1181
- index = string.indexOf("\n", endIndex);
1182
- } while (index !== -1);
1183
- returnValue += string.substr(endIndex);
1184
- return returnValue;
1185
- };
1186
- var util = {
1187
- stringReplaceAll: stringReplaceAll$1,
1188
- stringEncaseCRLFWithFirstIndex: stringEncaseCRLFWithFirstIndex$1
1189
- };
1154
+ })(ansiStyles);
1155
+ return ansiStyles.exports;
1156
+ }
1157
+ var browser;
1158
+ var hasRequiredBrowser;
1159
+ function requireBrowser() {
1160
+ if (hasRequiredBrowser) return browser;
1161
+ hasRequiredBrowser = 1;
1162
+ browser = {
1163
+ stdout: false,
1164
+ stderr: false
1165
+ };
1166
+ return browser;
1167
+ }
1168
+ var util;
1169
+ var hasRequiredUtil;
1170
+ function requireUtil() {
1171
+ if (hasRequiredUtil) return util;
1172
+ hasRequiredUtil = 1;
1173
+ const stringReplaceAll = (string, substring, replacer) => {
1174
+ let index = string.indexOf(substring);
1175
+ if (index === -1) {
1176
+ return string;
1177
+ }
1178
+ const substringLength = substring.length;
1179
+ let endIndex = 0;
1180
+ let returnValue = "";
1181
+ do {
1182
+ returnValue += string.substr(endIndex, index - endIndex) + substring + replacer;
1183
+ endIndex = index + substringLength;
1184
+ index = string.indexOf(substring, endIndex);
1185
+ } while (index !== -1);
1186
+ returnValue += string.substr(endIndex);
1187
+ return returnValue;
1188
+ };
1189
+ const stringEncaseCRLFWithFirstIndex = (string, prefix, postfix, index) => {
1190
+ let endIndex = 0;
1191
+ let returnValue = "";
1192
+ do {
1193
+ const gotCR = string[index - 1] === "\r";
1194
+ returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
1195
+ endIndex = index + 1;
1196
+ index = string.indexOf("\n", endIndex);
1197
+ } while (index !== -1);
1198
+ returnValue += string.substr(endIndex);
1199
+ return returnValue;
1200
+ };
1201
+ util = {
1202
+ stringReplaceAll,
1203
+ stringEncaseCRLFWithFirstIndex
1204
+ };
1205
+ return util;
1206
+ }
1190
1207
  var templates;
1191
1208
  var hasRequiredTemplates;
1192
1209
  function requireTemplates() {
@@ -1250,27 +1267,27 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
1250
1267
  }
1251
1268
  return results;
1252
1269
  }
1253
- function buildStyle(chalk2, styles2) {
1270
+ function buildStyle(chalk2, styles) {
1254
1271
  const enabled = {};
1255
- for (const layer of styles2) {
1272
+ for (const layer of styles) {
1256
1273
  for (const style of layer.styles) {
1257
1274
  enabled[style[0]] = layer.inverse ? null : style.slice(1);
1258
1275
  }
1259
1276
  }
1260
1277
  let current = chalk2;
1261
- for (const [styleName, styles3] of Object.entries(enabled)) {
1262
- if (!Array.isArray(styles3)) {
1278
+ for (const [styleName, styles2] of Object.entries(enabled)) {
1279
+ if (!Array.isArray(styles2)) {
1263
1280
  continue;
1264
1281
  }
1265
1282
  if (!(styleName in current)) {
1266
1283
  throw new Error(`Unknown Chalk style: ${styleName}`);
1267
1284
  }
1268
- current = styles3.length > 0 ? current[styleName](...styles3) : current[styleName];
1285
+ current = styles2.length > 0 ? current[styleName](...styles2) : current[styleName];
1269
1286
  }
1270
1287
  return current;
1271
1288
  }
1272
1289
  templates = (chalk2, temporary) => {
1273
- const styles2 = [];
1290
+ const styles = [];
1274
1291
  const chunks = [];
1275
1292
  let chunk = [];
1276
1293
  temporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => {
@@ -1279,200 +1296,208 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
1279
1296
  } else if (style) {
1280
1297
  const string = chunk.join("");
1281
1298
  chunk = [];
1282
- chunks.push(styles2.length === 0 ? string : buildStyle(chalk2, styles2)(string));
1283
- styles2.push({ inverse, styles: parseStyle(style) });
1299
+ chunks.push(styles.length === 0 ? string : buildStyle(chalk2, styles)(string));
1300
+ styles.push({ inverse, styles: parseStyle(style) });
1284
1301
  } else if (close) {
1285
- if (styles2.length === 0) {
1302
+ if (styles.length === 0) {
1286
1303
  throw new Error("Found extraneous } in Chalk template literal");
1287
1304
  }
1288
- chunks.push(buildStyle(chalk2, styles2)(chunk.join("")));
1305
+ chunks.push(buildStyle(chalk2, styles)(chunk.join("")));
1289
1306
  chunk = [];
1290
- styles2.pop();
1307
+ styles.pop();
1291
1308
  } else {
1292
1309
  chunk.push(character);
1293
1310
  }
1294
1311
  });
1295
1312
  chunks.push(chunk.join(""));
1296
- if (styles2.length > 0) {
1297
- const errMessage = `Chalk template literal is missing ${styles2.length} closing bracket${styles2.length === 1 ? "" : "s"} (\`}\`)`;
1313
+ if (styles.length > 0) {
1314
+ const errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? "" : "s"} (\`}\`)`;
1298
1315
  throw new Error(errMessage);
1299
1316
  }
1300
1317
  return chunks.join("");
1301
1318
  };
1302
1319
  return templates;
1303
1320
  }
1304
- const ansiStyles = ansiStylesExports;
1305
- const { stdout: stdoutColor, stderr: stderrColor } = browser;
1306
- const {
1307
- stringReplaceAll,
1308
- stringEncaseCRLFWithFirstIndex
1309
- } = util;
1310
- const { isArray } = Array;
1311
- const levelMapping = [
1312
- "ansi",
1313
- "ansi",
1314
- "ansi256",
1315
- "ansi16m"
1316
- ];
1317
- const styles = /* @__PURE__ */ Object.create(null);
1318
- const applyOptions = (object, options = {}) => {
1319
- if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
1320
- throw new Error("The `level` option should be an integer from 0 to 3");
1321
+ var source;
1322
+ var hasRequiredSource;
1323
+ function requireSource() {
1324
+ if (hasRequiredSource) return source;
1325
+ hasRequiredSource = 1;
1326
+ const ansiStyles2 = requireAnsiStyles();
1327
+ const { stdout: stdoutColor, stderr: stderrColor } = requireBrowser();
1328
+ const {
1329
+ stringReplaceAll,
1330
+ stringEncaseCRLFWithFirstIndex
1331
+ } = requireUtil();
1332
+ const { isArray } = Array;
1333
+ const levelMapping = [
1334
+ "ansi",
1335
+ "ansi",
1336
+ "ansi256",
1337
+ "ansi16m"
1338
+ ];
1339
+ const styles = /* @__PURE__ */ Object.create(null);
1340
+ const applyOptions = (object, options = {}) => {
1341
+ if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
1342
+ throw new Error("The `level` option should be an integer from 0 to 3");
1343
+ }
1344
+ const colorLevel = stdoutColor ? stdoutColor.level : 0;
1345
+ object.level = options.level === void 0 ? colorLevel : options.level;
1346
+ };
1347
+ class ChalkClass {
1348
+ constructor(options) {
1349
+ return chalkFactory(options);
1350
+ }
1321
1351
  }
1322
- const colorLevel = stdoutColor ? stdoutColor.level : 0;
1323
- object.level = options.level === void 0 ? colorLevel : options.level;
1324
- };
1325
- class ChalkClass {
1326
- constructor(options) {
1352
+ const chalkFactory = (options) => {
1353
+ const chalk3 = {};
1354
+ applyOptions(chalk3, options);
1355
+ chalk3.template = (...arguments_) => chalkTag(chalk3.template, ...arguments_);
1356
+ Object.setPrototypeOf(chalk3, Chalk.prototype);
1357
+ Object.setPrototypeOf(chalk3.template, chalk3);
1358
+ chalk3.template.constructor = () => {
1359
+ throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
1360
+ };
1361
+ chalk3.template.Instance = ChalkClass;
1362
+ return chalk3.template;
1363
+ };
1364
+ function Chalk(options) {
1327
1365
  return chalkFactory(options);
1328
1366
  }
1329
- }
1330
- const chalkFactory = (options) => {
1331
- const chalk2 = {};
1332
- applyOptions(chalk2, options);
1333
- chalk2.template = (...arguments_) => chalkTag(chalk2.template, ...arguments_);
1334
- Object.setPrototypeOf(chalk2, Chalk.prototype);
1335
- Object.setPrototypeOf(chalk2.template, chalk2);
1336
- chalk2.template.constructor = () => {
1337
- throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
1338
- };
1339
- chalk2.template.Instance = ChalkClass;
1340
- return chalk2.template;
1341
- };
1342
- function Chalk(options) {
1343
- return chalkFactory(options);
1344
- }
1345
- for (const [styleName, style] of Object.entries(ansiStyles)) {
1346
- styles[styleName] = {
1367
+ for (const [styleName, style] of Object.entries(ansiStyles2)) {
1368
+ styles[styleName] = {
1369
+ get() {
1370
+ const builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty);
1371
+ Object.defineProperty(this, styleName, { value: builder });
1372
+ return builder;
1373
+ }
1374
+ };
1375
+ }
1376
+ styles.visible = {
1347
1377
  get() {
1348
- const builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty);
1349
- Object.defineProperty(this, styleName, { value: builder });
1378
+ const builder = createBuilder(this, this._styler, true);
1379
+ Object.defineProperty(this, "visible", { value: builder });
1350
1380
  return builder;
1351
1381
  }
1352
1382
  };
1353
- }
1354
- styles.visible = {
1355
- get() {
1356
- const builder = createBuilder(this, this._styler, true);
1357
- Object.defineProperty(this, "visible", { value: builder });
1358
- return builder;
1383
+ const usedModels = ["rgb", "hex", "keyword", "hsl", "hsv", "hwb", "ansi", "ansi256"];
1384
+ for (const model of usedModels) {
1385
+ styles[model] = {
1386
+ get() {
1387
+ const { level } = this;
1388
+ return function(...arguments_) {
1389
+ const styler = createStyler(ansiStyles2.color[levelMapping[level]][model](...arguments_), ansiStyles2.color.close, this._styler);
1390
+ return createBuilder(this, styler, this._isEmpty);
1391
+ };
1392
+ }
1393
+ };
1359
1394
  }
1360
- };
1361
- const usedModels = ["rgb", "hex", "keyword", "hsl", "hsv", "hwb", "ansi", "ansi256"];
1362
- for (const model of usedModels) {
1363
- styles[model] = {
1364
- get() {
1365
- const { level } = this;
1366
- return function(...arguments_) {
1367
- const styler = createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_), ansiStyles.color.close, this._styler);
1368
- return createBuilder(this, styler, this._isEmpty);
1369
- };
1395
+ for (const model of usedModels) {
1396
+ const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
1397
+ styles[bgModel] = {
1398
+ get() {
1399
+ const { level } = this;
1400
+ return function(...arguments_) {
1401
+ const styler = createStyler(ansiStyles2.bgColor[levelMapping[level]][model](...arguments_), ansiStyles2.bgColor.close, this._styler);
1402
+ return createBuilder(this, styler, this._isEmpty);
1403
+ };
1404
+ }
1405
+ };
1406
+ }
1407
+ const proto = Object.defineProperties(() => {
1408
+ }, {
1409
+ ...styles,
1410
+ level: {
1411
+ enumerable: true,
1412
+ get() {
1413
+ return this._generator.level;
1414
+ },
1415
+ set(level) {
1416
+ this._generator.level = level;
1417
+ }
1370
1418
  }
1371
- };
1372
- }
1373
- for (const model of usedModels) {
1374
- const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
1375
- styles[bgModel] = {
1376
- get() {
1377
- const { level } = this;
1378
- return function(...arguments_) {
1379
- const styler = createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_), ansiStyles.bgColor.close, this._styler);
1380
- return createBuilder(this, styler, this._isEmpty);
1381
- };
1419
+ });
1420
+ const createStyler = (open, close, parent) => {
1421
+ let openAll;
1422
+ let closeAll;
1423
+ if (parent === void 0) {
1424
+ openAll = open;
1425
+ closeAll = close;
1426
+ } else {
1427
+ openAll = parent.openAll + open;
1428
+ closeAll = close + parent.closeAll;
1382
1429
  }
1430
+ return {
1431
+ open,
1432
+ close,
1433
+ openAll,
1434
+ closeAll,
1435
+ parent
1436
+ };
1383
1437
  };
1384
- }
1385
- const proto = Object.defineProperties(() => {
1386
- }, {
1387
- ...styles,
1388
- level: {
1389
- enumerable: true,
1390
- get() {
1391
- return this._generator.level;
1392
- },
1393
- set(level) {
1394
- this._generator.level = level;
1395
- }
1396
- }
1397
- });
1398
- const createStyler = (open, close, parent) => {
1399
- let openAll;
1400
- let closeAll;
1401
- if (parent === void 0) {
1402
- openAll = open;
1403
- closeAll = close;
1404
- } else {
1405
- openAll = parent.openAll + open;
1406
- closeAll = close + parent.closeAll;
1407
- }
1408
- return {
1409
- open,
1410
- close,
1411
- openAll,
1412
- closeAll,
1413
- parent
1438
+ const createBuilder = (self2, _styler, _isEmpty) => {
1439
+ const builder = (...arguments_) => {
1440
+ if (isArray(arguments_[0]) && isArray(arguments_[0].raw)) {
1441
+ return applyStyle(builder, chalkTag(builder, ...arguments_));
1442
+ }
1443
+ return applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
1444
+ };
1445
+ Object.setPrototypeOf(builder, proto);
1446
+ builder._generator = self2;
1447
+ builder._styler = _styler;
1448
+ builder._isEmpty = _isEmpty;
1449
+ return builder;
1414
1450
  };
1415
- };
1416
- const createBuilder = (self2, _styler, _isEmpty) => {
1417
- const builder = (...arguments_) => {
1418
- if (isArray(arguments_[0]) && isArray(arguments_[0].raw)) {
1419
- return applyStyle(builder, chalkTag(builder, ...arguments_));
1451
+ const applyStyle = (self2, string) => {
1452
+ if (self2.level <= 0 || !string) {
1453
+ return self2._isEmpty ? "" : string;
1454
+ }
1455
+ let styler = self2._styler;
1456
+ if (styler === void 0) {
1457
+ return string;
1458
+ }
1459
+ const { openAll, closeAll } = styler;
1460
+ if (string.indexOf("\x1B") !== -1) {
1461
+ while (styler !== void 0) {
1462
+ string = stringReplaceAll(string, styler.close, styler.open);
1463
+ styler = styler.parent;
1464
+ }
1465
+ }
1466
+ const lfIndex = string.indexOf("\n");
1467
+ if (lfIndex !== -1) {
1468
+ string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
1420
1469
  }
1421
- return applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
1470
+ return openAll + string + closeAll;
1422
1471
  };
1423
- Object.setPrototypeOf(builder, proto);
1424
- builder._generator = self2;
1425
- builder._styler = _styler;
1426
- builder._isEmpty = _isEmpty;
1427
- return builder;
1428
- };
1429
- const applyStyle = (self2, string) => {
1430
- if (self2.level <= 0 || !string) {
1431
- return self2._isEmpty ? "" : string;
1432
- }
1433
- let styler = self2._styler;
1434
- if (styler === void 0) {
1435
- return string;
1436
- }
1437
- const { openAll, closeAll } = styler;
1438
- if (string.indexOf("\x1B") !== -1) {
1439
- while (styler !== void 0) {
1440
- string = stringReplaceAll(string, styler.close, styler.open);
1441
- styler = styler.parent;
1472
+ let template;
1473
+ const chalkTag = (chalk3, ...strings) => {
1474
+ const [firstString] = strings;
1475
+ if (!isArray(firstString) || !isArray(firstString.raw)) {
1476
+ return strings.join(" ");
1442
1477
  }
1443
- }
1444
- const lfIndex = string.indexOf("\n");
1445
- if (lfIndex !== -1) {
1446
- string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
1447
- }
1448
- return openAll + string + closeAll;
1449
- };
1450
- let template;
1451
- const chalkTag = (chalk2, ...strings) => {
1452
- const [firstString] = strings;
1453
- if (!isArray(firstString) || !isArray(firstString.raw)) {
1454
- return strings.join(" ");
1455
- }
1456
- const arguments_ = strings.slice(1);
1457
- const parts = [firstString.raw[0]];
1458
- for (let i2 = 1; i2 < firstString.length; i2++) {
1459
- parts.push(
1460
- String(arguments_[i2 - 1]).replace(/[{}\\]/g, "\\$&"),
1461
- String(firstString.raw[i2])
1462
- );
1463
- }
1464
- if (template === void 0) {
1465
- template = requireTemplates();
1466
- }
1467
- return template(chalk2, parts.join(""));
1468
- };
1469
- Object.defineProperties(Chalk.prototype, styles);
1470
- const chalk = Chalk();
1471
- chalk.supportsColor = stdoutColor;
1472
- chalk.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
1473
- chalk.stderr.supportsColor = stderrColor;
1474
- var source = chalk;
1475
- const chalk$1 = /* @__PURE__ */ getDefaultExportFromCjs(source);
1478
+ const arguments_ = strings.slice(1);
1479
+ const parts = [firstString.raw[0]];
1480
+ for (let i = 1; i < firstString.length; i++) {
1481
+ parts.push(
1482
+ String(arguments_[i - 1]).replace(/[{}\\]/g, "\\$&"),
1483
+ String(firstString.raw[i])
1484
+ );
1485
+ }
1486
+ if (template === void 0) {
1487
+ template = requireTemplates();
1488
+ }
1489
+ return template(chalk3, parts.join(""));
1490
+ };
1491
+ Object.defineProperties(Chalk.prototype, styles);
1492
+ const chalk2 = Chalk();
1493
+ chalk2.supportsColor = stdoutColor;
1494
+ chalk2.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
1495
+ chalk2.stderr.supportsColor = stderrColor;
1496
+ source = chalk2;
1497
+ return source;
1498
+ }
1499
+ var sourceExports = requireSource();
1500
+ const chalk = /* @__PURE__ */ getDefaultExportFromCjs(sourceExports);
1476
1501
  var StatusCodes;
1477
1502
  (function(StatusCodes2) {
1478
1503
  StatusCodes2[StatusCodes2["CONTINUE"] = 100] = "CONTINUE";
@@ -1558,28 +1583,28 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
1558
1583
  });
1559
1584
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1560
1585
  __privateAdd(this, _HandleError, (error) => {
1561
- __privateGet(this, _LogDebugMessage).call(this, chalk$1.red(`HandleError(): Error: [${error}]`));
1586
+ __privateGet(this, _LogDebugMessage).call(this, chalk.red(`HandleError(): Error: [${error}]`));
1562
1587
  let responseCode = 500;
1563
1588
  if (axios.isAxiosError(error)) {
1564
1589
  const axiosError = error;
1565
1590
  if (axiosError.response) {
1566
1591
  responseCode = axiosError.response.status;
1567
- __privateGet(this, _LogDebugMessage).call(this, chalk$1.red(`AXIOS Error Response.Status = [${axiosError.response.status}]`));
1592
+ __privateGet(this, _LogDebugMessage).call(this, chalk.red(`AXIOS Error Response.Status = [${axiosError.response.status}]`));
1568
1593
  if (axiosError.response.headers) {
1569
- __privateGet(this, _LogErrorMessage).call(this, chalk$1.red(` headers: [${JSON.stringify(axiosError.response.headers)}]`));
1594
+ __privateGet(this, _LogErrorMessage).call(this, chalk.red(` headers: [${JSON.stringify(axiosError.response.headers)}]`));
1570
1595
  }
1571
1596
  if (axiosError.response.data) {
1572
- __privateGet(this, _LogErrorMessage).call(this, chalk$1.red(` data: [${JSON.stringify(axiosError.response.data)}]`));
1597
+ __privateGet(this, _LogErrorMessage).call(this, chalk.red(` data: [${JSON.stringify(axiosError.response.data)}]`));
1573
1598
  }
1574
1599
  try {
1575
1600
  if (axiosError.response.config) {
1576
- __privateGet(this, _LogErrorMessage).call(this, chalk$1.red(` config: [${JSON.stringify(axiosError.response.config)}]`));
1601
+ __privateGet(this, _LogErrorMessage).call(this, chalk.red(` config: [${JSON.stringify(axiosError.response.config)}]`));
1577
1602
  }
1578
1603
  } catch (innererror) {
1579
- __privateGet(this, _LogErrorMessage).call(this, chalk$1.red(` could not get response config, error: [${innererror}]`));
1604
+ __privateGet(this, _LogErrorMessage).call(this, chalk.red(` could not get response config, error: [${innererror}]`));
1580
1605
  }
1581
1606
  } else {
1582
- __privateGet(this, _LogDebugMessage).call(this, chalk$1.red(`AXIOS Error = [${axiosError}]`));
1607
+ __privateGet(this, _LogDebugMessage).call(this, chalk.red(`AXIOS Error = [${axiosError}]`));
1583
1608
  }
1584
1609
  }
1585
1610
  return responseCode;
@@ -1600,18 +1625,18 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
1600
1625
  const metadataRecord = __privateGet(this, _invokeMethods)[id2];
1601
1626
  let performRetry = false;
1602
1627
  const returnData = await __privateGet(this, ___InvokeResourceAPI).call(this, metadataRecord, (statusCode, error) => {
1603
- console.error(chalk$1.red(`#InvokeResourceAPI(): Error: [${error}], Attempt: [${metadataRecord.retries + 1}]`));
1628
+ console.error(chalk.red(`#InvokeResourceAPI(): Error: [${error}], Attempt: [${metadataRecord.retries + 1}]`));
1604
1629
  const noRetryIndex = __privateGet(this, _NoRetryStatusCodes).indexOf(statusCode);
1605
1630
  if (noRetryIndex === -1) {
1606
1631
  if (statusCode === StatusCodes.UNAUTHORIZED) {
1607
- console.error(chalk$1.red(`#InvokeResourceAPI(): Authentication error, resetting access_token (to null).`));
1632
+ console.error(chalk.red(`#InvokeResourceAPI(): Authentication error, resetting access_token (to null).`));
1608
1633
  __privateGet(this, _options).ResetAccessToken();
1609
1634
  if (__privateGet(this, _options).clientTelemetryEvents) {
1610
1635
  __privateGet(this, _options).clientTelemetryEvents.AuthenticationErrorInc();
1611
1636
  }
1612
1637
  }
1613
1638
  if (isNode && __privateGet(this, _options).agentManager) {
1614
- console.error(chalk$1.red(`#InvokeResourceAPI(): Resetting https agent (to null).`));
1639
+ console.error(chalk.red(`#InvokeResourceAPI(): Resetting https agent (to null).`));
1615
1640
  __privateGet(this, _options).agentManager.ResetAgent();
1616
1641
  }
1617
1642
  performRetry = true;