@nsshunt/stsvueutils 2.0.38 → 2.0.40

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.
@@ -29,57 +29,64 @@ function getDefaultExportFromCjs(x) {
29
29
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
30
30
  }
31
31
  var tinyEmitter = { exports: {} };
32
- function E() {
33
- }
34
- E.prototype = {
35
- on: function(name, callback, ctx) {
36
- var e = this.e || (this.e = {});
37
- (e[name] || (e[name] = [])).push({
38
- fn: callback,
39
- ctx
40
- });
41
- return this;
42
- },
43
- once: function(name, callback, ctx) {
44
- var self = this;
45
- function listener() {
46
- self.off(name, listener);
47
- callback.apply(ctx, arguments);
48
- }
49
- listener._ = callback;
50
- return this.on(name, listener, ctx);
51
- },
52
- emit: function(name) {
53
- var data = [].slice.call(arguments, 1);
54
- var evtArr = ((this.e || (this.e = {}))[name] || []).slice();
55
- var i = 0;
56
- var len = evtArr.length;
57
- for (i; i < len; i++) {
58
- evtArr[i].fn.apply(evtArr[i].ctx, data);
59
- }
60
- return this;
61
- },
62
- off: function(name, callback) {
63
- var e = this.e || (this.e = {});
64
- var evts = e[name];
65
- var liveEvents = [];
66
- if (evts && callback) {
67
- for (var i = 0, len = evts.length; i < len; i++) {
68
- if (evts[i].fn !== callback && evts[i].fn._ !== callback)
69
- liveEvents.push(evts[i]);
32
+ var hasRequiredTinyEmitter;
33
+ function requireTinyEmitter() {
34
+ if (hasRequiredTinyEmitter) return tinyEmitter.exports;
35
+ hasRequiredTinyEmitter = 1;
36
+ function E() {
37
+ }
38
+ E.prototype = {
39
+ on: function(name, callback, ctx) {
40
+ var e = this.e || (this.e = {});
41
+ (e[name] || (e[name] = [])).push({
42
+ fn: callback,
43
+ ctx
44
+ });
45
+ return this;
46
+ },
47
+ once: function(name, callback, ctx) {
48
+ var self = this;
49
+ function listener() {
50
+ self.off(name, listener);
51
+ callback.apply(ctx, arguments);
70
52
  }
53
+ listener._ = callback;
54
+ return this.on(name, listener, ctx);
55
+ },
56
+ emit: function(name) {
57
+ var data = [].slice.call(arguments, 1);
58
+ var evtArr = ((this.e || (this.e = {}))[name] || []).slice();
59
+ var i = 0;
60
+ var len = evtArr.length;
61
+ for (i; i < len; i++) {
62
+ evtArr[i].fn.apply(evtArr[i].ctx, data);
63
+ }
64
+ return this;
65
+ },
66
+ off: function(name, callback) {
67
+ var e = this.e || (this.e = {});
68
+ var evts = e[name];
69
+ var liveEvents = [];
70
+ if (evts && callback) {
71
+ for (var i = 0, len = evts.length; i < len; i++) {
72
+ if (evts[i].fn !== callback && evts[i].fn._ !== callback)
73
+ liveEvents.push(evts[i]);
74
+ }
75
+ }
76
+ liveEvents.length ? e[name] = liveEvents : delete e[name];
77
+ return this;
71
78
  }
72
- liveEvents.length ? e[name] = liveEvents : delete e[name];
73
- return this;
74
- }
75
- };
76
- tinyEmitter.exports = E;
77
- var TinyEmitter = tinyEmitter.exports.TinyEmitter = E;
79
+ };
80
+ tinyEmitter.exports = E;
81
+ tinyEmitter.exports.TinyEmitter = E;
82
+ return tinyEmitter.exports;
83
+ }
84
+ var tinyEmitterExports = requireTinyEmitter();
78
85
  const useSTSEmitterPlugin = () => inject(STSEmitterPluginKey);
79
86
  const STSEmitterPlugin = {
80
87
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
81
88
  install: (app) => {
82
- const tinyEmitter2 = new TinyEmitter();
89
+ const tinyEmitter2 = new tinyEmitterExports.TinyEmitter();
83
90
  if (!app.config.globalProperties.$sts) {
84
91
  app.config.globalProperties.$sts = {};
85
92
  }
@@ -418,7 +425,7 @@ var IWorkerState = /* @__PURE__ */ ((IWorkerState2) => {
418
425
  IWorkerState2["stopped"] = "stopped";
419
426
  return IWorkerState2;
420
427
  })(IWorkerState || {});
421
- var ansiStyles$1 = { exports: {} };
428
+ var ansiStyles = { exports: {} };
422
429
  var colorName;
423
430
  var hasRequiredColorName;
424
431
  function requireColorName() {
@@ -1381,181 +1388,200 @@ function requireColorConvert() {
1381
1388
  colorConvert = convert;
1382
1389
  return colorConvert;
1383
1390
  }
1384
- ansiStyles$1.exports;
1385
- (function(module) {
1386
- const wrapAnsi16 = (fn, offset) => (...args) => {
1387
- const code = fn(...args);
1388
- return `\x1B[${code + offset}m`;
1389
- };
1390
- const wrapAnsi256 = (fn, offset) => (...args) => {
1391
- const code = fn(...args);
1392
- return `\x1B[${38 + offset};5;${code}m`;
1393
- };
1394
- const wrapAnsi16m = (fn, offset) => (...args) => {
1395
- const rgb = fn(...args);
1396
- return `\x1B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
1397
- };
1398
- const ansi2ansi = (n) => n;
1399
- const rgb2rgb = (r, g, b) => [r, g, b];
1400
- const setLazyProperty = (object, property, get) => {
1401
- Object.defineProperty(object, property, {
1402
- get: () => {
1403
- const value = get();
1404
- Object.defineProperty(object, property, {
1405
- value,
1406
- enumerable: true,
1407
- configurable: true
1408
- });
1409
- return value;
1410
- },
1411
- enumerable: true,
1412
- configurable: true
1413
- });
1414
- };
1415
- let colorConvert2;
1416
- const makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => {
1417
- if (colorConvert2 === void 0) {
1418
- colorConvert2 = requireColorConvert();
1419
- }
1420
- const offset = isBackground ? 10 : 0;
1421
- const styles2 = {};
1422
- for (const [sourceSpace, suite] of Object.entries(colorConvert2)) {
1423
- const name = sourceSpace === "ansi16" ? "ansi" : sourceSpace;
1424
- if (sourceSpace === targetSpace) {
1425
- styles2[name] = wrap(identity, offset);
1426
- } else if (typeof suite === "object") {
1427
- styles2[name] = wrap(suite[targetSpace], offset);
1391
+ ansiStyles.exports;
1392
+ var hasRequiredAnsiStyles;
1393
+ function requireAnsiStyles() {
1394
+ if (hasRequiredAnsiStyles) return ansiStyles.exports;
1395
+ hasRequiredAnsiStyles = 1;
1396
+ (function(module) {
1397
+ const wrapAnsi16 = (fn, offset) => (...args) => {
1398
+ const code = fn(...args);
1399
+ return `\x1B[${code + offset}m`;
1400
+ };
1401
+ const wrapAnsi256 = (fn, offset) => (...args) => {
1402
+ const code = fn(...args);
1403
+ return `\x1B[${38 + offset};5;${code}m`;
1404
+ };
1405
+ const wrapAnsi16m = (fn, offset) => (...args) => {
1406
+ const rgb = fn(...args);
1407
+ return `\x1B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
1408
+ };
1409
+ const ansi2ansi = (n) => n;
1410
+ const rgb2rgb = (r, g, b) => [r, g, b];
1411
+ const setLazyProperty = (object, property, get) => {
1412
+ Object.defineProperty(object, property, {
1413
+ get: () => {
1414
+ const value = get();
1415
+ Object.defineProperty(object, property, {
1416
+ value,
1417
+ enumerable: true,
1418
+ configurable: true
1419
+ });
1420
+ return value;
1421
+ },
1422
+ enumerable: true,
1423
+ configurable: true
1424
+ });
1425
+ };
1426
+ let colorConvert2;
1427
+ const makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => {
1428
+ if (colorConvert2 === void 0) {
1429
+ colorConvert2 = requireColorConvert();
1428
1430
  }
1429
- }
1430
- return styles2;
1431
- };
1432
- function assembleStyles() {
1433
- const codes = /* @__PURE__ */ new Map();
1434
- const styles2 = {
1435
- modifier: {
1436
- reset: [0, 0],
1437
- // 21 isn't widely supported and 22 does the same thing
1438
- bold: [1, 22],
1439
- dim: [2, 22],
1440
- italic: [3, 23],
1441
- underline: [4, 24],
1442
- inverse: [7, 27],
1443
- hidden: [8, 28],
1444
- strikethrough: [9, 29]
1445
- },
1446
- color: {
1447
- black: [30, 39],
1448
- red: [31, 39],
1449
- green: [32, 39],
1450
- yellow: [33, 39],
1451
- blue: [34, 39],
1452
- magenta: [35, 39],
1453
- cyan: [36, 39],
1454
- white: [37, 39],
1455
- // Bright color
1456
- blackBright: [90, 39],
1457
- redBright: [91, 39],
1458
- greenBright: [92, 39],
1459
- yellowBright: [93, 39],
1460
- blueBright: [94, 39],
1461
- magentaBright: [95, 39],
1462
- cyanBright: [96, 39],
1463
- whiteBright: [97, 39]
1464
- },
1465
- bgColor: {
1466
- bgBlack: [40, 49],
1467
- bgRed: [41, 49],
1468
- bgGreen: [42, 49],
1469
- bgYellow: [43, 49],
1470
- bgBlue: [44, 49],
1471
- bgMagenta: [45, 49],
1472
- bgCyan: [46, 49],
1473
- bgWhite: [47, 49],
1474
- // Bright color
1475
- bgBlackBright: [100, 49],
1476
- bgRedBright: [101, 49],
1477
- bgGreenBright: [102, 49],
1478
- bgYellowBright: [103, 49],
1479
- bgBlueBright: [104, 49],
1480
- bgMagentaBright: [105, 49],
1481
- bgCyanBright: [106, 49],
1482
- bgWhiteBright: [107, 49]
1431
+ const offset = isBackground ? 10 : 0;
1432
+ const styles = {};
1433
+ for (const [sourceSpace, suite] of Object.entries(colorConvert2)) {
1434
+ const name = sourceSpace === "ansi16" ? "ansi" : sourceSpace;
1435
+ if (sourceSpace === targetSpace) {
1436
+ styles[name] = wrap(identity, offset);
1437
+ } else if (typeof suite === "object") {
1438
+ styles[name] = wrap(suite[targetSpace], offset);
1439
+ }
1483
1440
  }
1441
+ return styles;
1484
1442
  };
1485
- styles2.color.gray = styles2.color.blackBright;
1486
- styles2.bgColor.bgGray = styles2.bgColor.bgBlackBright;
1487
- styles2.color.grey = styles2.color.blackBright;
1488
- styles2.bgColor.bgGrey = styles2.bgColor.bgBlackBright;
1489
- for (const [groupName, group] of Object.entries(styles2)) {
1490
- for (const [styleName, style] of Object.entries(group)) {
1491
- styles2[styleName] = {
1492
- open: `\x1B[${style[0]}m`,
1493
- close: `\x1B[${style[1]}m`
1494
- };
1495
- group[styleName] = styles2[styleName];
1496
- codes.set(style[0], style[1]);
1443
+ function assembleStyles() {
1444
+ const codes = /* @__PURE__ */ new Map();
1445
+ const styles = {
1446
+ modifier: {
1447
+ reset: [0, 0],
1448
+ // 21 isn't widely supported and 22 does the same thing
1449
+ bold: [1, 22],
1450
+ dim: [2, 22],
1451
+ italic: [3, 23],
1452
+ underline: [4, 24],
1453
+ inverse: [7, 27],
1454
+ hidden: [8, 28],
1455
+ strikethrough: [9, 29]
1456
+ },
1457
+ color: {
1458
+ black: [30, 39],
1459
+ red: [31, 39],
1460
+ green: [32, 39],
1461
+ yellow: [33, 39],
1462
+ blue: [34, 39],
1463
+ magenta: [35, 39],
1464
+ cyan: [36, 39],
1465
+ white: [37, 39],
1466
+ // Bright color
1467
+ blackBright: [90, 39],
1468
+ redBright: [91, 39],
1469
+ greenBright: [92, 39],
1470
+ yellowBright: [93, 39],
1471
+ blueBright: [94, 39],
1472
+ magentaBright: [95, 39],
1473
+ cyanBright: [96, 39],
1474
+ whiteBright: [97, 39]
1475
+ },
1476
+ bgColor: {
1477
+ bgBlack: [40, 49],
1478
+ bgRed: [41, 49],
1479
+ bgGreen: [42, 49],
1480
+ bgYellow: [43, 49],
1481
+ bgBlue: [44, 49],
1482
+ bgMagenta: [45, 49],
1483
+ bgCyan: [46, 49],
1484
+ bgWhite: [47, 49],
1485
+ // Bright color
1486
+ bgBlackBright: [100, 49],
1487
+ bgRedBright: [101, 49],
1488
+ bgGreenBright: [102, 49],
1489
+ bgYellowBright: [103, 49],
1490
+ bgBlueBright: [104, 49],
1491
+ bgMagentaBright: [105, 49],
1492
+ bgCyanBright: [106, 49],
1493
+ bgWhiteBright: [107, 49]
1494
+ }
1495
+ };
1496
+ styles.color.gray = styles.color.blackBright;
1497
+ styles.bgColor.bgGray = styles.bgColor.bgBlackBright;
1498
+ styles.color.grey = styles.color.blackBright;
1499
+ styles.bgColor.bgGrey = styles.bgColor.bgBlackBright;
1500
+ for (const [groupName, group] of Object.entries(styles)) {
1501
+ for (const [styleName, style] of Object.entries(group)) {
1502
+ styles[styleName] = {
1503
+ open: `\x1B[${style[0]}m`,
1504
+ close: `\x1B[${style[1]}m`
1505
+ };
1506
+ group[styleName] = styles[styleName];
1507
+ codes.set(style[0], style[1]);
1508
+ }
1509
+ Object.defineProperty(styles, groupName, {
1510
+ value: group,
1511
+ enumerable: false
1512
+ });
1497
1513
  }
1498
- Object.defineProperty(styles2, groupName, {
1499
- value: group,
1514
+ Object.defineProperty(styles, "codes", {
1515
+ value: codes,
1500
1516
  enumerable: false
1501
1517
  });
1502
- }
1503
- Object.defineProperty(styles2, "codes", {
1504
- value: codes,
1505
- enumerable: false
1518
+ styles.color.close = "\x1B[39m";
1519
+ styles.bgColor.close = "\x1B[49m";
1520
+ setLazyProperty(styles.color, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, false));
1521
+ setLazyProperty(styles.color, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, false));
1522
+ setLazyProperty(styles.color, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, false));
1523
+ setLazyProperty(styles.bgColor, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, true));
1524
+ setLazyProperty(styles.bgColor, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, true));
1525
+ setLazyProperty(styles.bgColor, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, true));
1526
+ return styles;
1527
+ }
1528
+ Object.defineProperty(module, "exports", {
1529
+ enumerable: true,
1530
+ get: assembleStyles
1506
1531
  });
1507
- styles2.color.close = "\x1B[39m";
1508
- styles2.bgColor.close = "\x1B[49m";
1509
- setLazyProperty(styles2.color, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, false));
1510
- setLazyProperty(styles2.color, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, false));
1511
- setLazyProperty(styles2.color, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, false));
1512
- setLazyProperty(styles2.bgColor, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, true));
1513
- setLazyProperty(styles2.bgColor, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, true));
1514
- setLazyProperty(styles2.bgColor, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, true));
1515
- return styles2;
1516
- }
1517
- Object.defineProperty(module, "exports", {
1518
- enumerable: true,
1519
- get: assembleStyles
1520
- });
1521
- })(ansiStyles$1);
1522
- var ansiStylesExports = ansiStyles$1.exports;
1523
- var browser = {
1524
- stdout: false,
1525
- stderr: false
1526
- };
1527
- const stringReplaceAll$1 = (string, substring, replacer) => {
1528
- let index = string.indexOf(substring);
1529
- if (index === -1) {
1530
- return string;
1531
- }
1532
- const substringLength = substring.length;
1533
- let endIndex = 0;
1534
- let returnValue = "";
1535
- do {
1536
- returnValue += string.substr(endIndex, index - endIndex) + substring + replacer;
1537
- endIndex = index + substringLength;
1538
- index = string.indexOf(substring, endIndex);
1539
- } while (index !== -1);
1540
- returnValue += string.substr(endIndex);
1541
- return returnValue;
1542
- };
1543
- const stringEncaseCRLFWithFirstIndex$1 = (string, prefix, postfix, index) => {
1544
- let endIndex = 0;
1545
- let returnValue = "";
1546
- do {
1547
- const gotCR = string[index - 1] === "\r";
1548
- returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
1549
- endIndex = index + 1;
1550
- index = string.indexOf("\n", endIndex);
1551
- } while (index !== -1);
1552
- returnValue += string.substr(endIndex);
1553
- return returnValue;
1554
- };
1555
- var util = {
1556
- stringReplaceAll: stringReplaceAll$1,
1557
- stringEncaseCRLFWithFirstIndex: stringEncaseCRLFWithFirstIndex$1
1558
- };
1532
+ })(ansiStyles);
1533
+ return ansiStyles.exports;
1534
+ }
1535
+ var browser;
1536
+ var hasRequiredBrowser;
1537
+ function requireBrowser() {
1538
+ if (hasRequiredBrowser) return browser;
1539
+ hasRequiredBrowser = 1;
1540
+ browser = {
1541
+ stdout: false,
1542
+ stderr: false
1543
+ };
1544
+ return browser;
1545
+ }
1546
+ var util;
1547
+ var hasRequiredUtil;
1548
+ function requireUtil() {
1549
+ if (hasRequiredUtil) return util;
1550
+ hasRequiredUtil = 1;
1551
+ const stringReplaceAll = (string, substring, replacer) => {
1552
+ let index = string.indexOf(substring);
1553
+ if (index === -1) {
1554
+ return string;
1555
+ }
1556
+ const substringLength = substring.length;
1557
+ let endIndex = 0;
1558
+ let returnValue = "";
1559
+ do {
1560
+ returnValue += string.substr(endIndex, index - endIndex) + substring + replacer;
1561
+ endIndex = index + substringLength;
1562
+ index = string.indexOf(substring, endIndex);
1563
+ } while (index !== -1);
1564
+ returnValue += string.substr(endIndex);
1565
+ return returnValue;
1566
+ };
1567
+ const stringEncaseCRLFWithFirstIndex = (string, prefix, postfix, index) => {
1568
+ let endIndex = 0;
1569
+ let returnValue = "";
1570
+ do {
1571
+ const gotCR = string[index - 1] === "\r";
1572
+ returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
1573
+ endIndex = index + 1;
1574
+ index = string.indexOf("\n", endIndex);
1575
+ } while (index !== -1);
1576
+ returnValue += string.substr(endIndex);
1577
+ return returnValue;
1578
+ };
1579
+ util = {
1580
+ stringReplaceAll,
1581
+ stringEncaseCRLFWithFirstIndex
1582
+ };
1583
+ return util;
1584
+ }
1559
1585
  var templates;
1560
1586
  var hasRequiredTemplates;
1561
1587
  function requireTemplates() {
@@ -1619,27 +1645,27 @@ function requireTemplates() {
1619
1645
  }
1620
1646
  return results;
1621
1647
  }
1622
- function buildStyle(chalk2, styles2) {
1648
+ function buildStyle(chalk2, styles) {
1623
1649
  const enabled = {};
1624
- for (const layer of styles2) {
1650
+ for (const layer of styles) {
1625
1651
  for (const style of layer.styles) {
1626
1652
  enabled[style[0]] = layer.inverse ? null : style.slice(1);
1627
1653
  }
1628
1654
  }
1629
1655
  let current = chalk2;
1630
- for (const [styleName, styles3] of Object.entries(enabled)) {
1631
- if (!Array.isArray(styles3)) {
1656
+ for (const [styleName, styles2] of Object.entries(enabled)) {
1657
+ if (!Array.isArray(styles2)) {
1632
1658
  continue;
1633
1659
  }
1634
1660
  if (!(styleName in current)) {
1635
1661
  throw new Error(`Unknown Chalk style: ${styleName}`);
1636
1662
  }
1637
- current = styles3.length > 0 ? current[styleName](...styles3) : current[styleName];
1663
+ current = styles2.length > 0 ? current[styleName](...styles2) : current[styleName];
1638
1664
  }
1639
1665
  return current;
1640
1666
  }
1641
1667
  templates = (chalk2, temporary) => {
1642
- const styles2 = [];
1668
+ const styles = [];
1643
1669
  const chunks = [];
1644
1670
  let chunk = [];
1645
1671
  temporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => {
@@ -1648,201 +1674,209 @@ function requireTemplates() {
1648
1674
  } else if (style) {
1649
1675
  const string = chunk.join("");
1650
1676
  chunk = [];
1651
- chunks.push(styles2.length === 0 ? string : buildStyle(chalk2, styles2)(string));
1652
- styles2.push({ inverse, styles: parseStyle(style) });
1677
+ chunks.push(styles.length === 0 ? string : buildStyle(chalk2, styles)(string));
1678
+ styles.push({ inverse, styles: parseStyle(style) });
1653
1679
  } else if (close) {
1654
- if (styles2.length === 0) {
1680
+ if (styles.length === 0) {
1655
1681
  throw new Error("Found extraneous } in Chalk template literal");
1656
1682
  }
1657
- chunks.push(buildStyle(chalk2, styles2)(chunk.join("")));
1683
+ chunks.push(buildStyle(chalk2, styles)(chunk.join("")));
1658
1684
  chunk = [];
1659
- styles2.pop();
1685
+ styles.pop();
1660
1686
  } else {
1661
1687
  chunk.push(character);
1662
1688
  }
1663
1689
  });
1664
1690
  chunks.push(chunk.join(""));
1665
- if (styles2.length > 0) {
1666
- const errMessage = `Chalk template literal is missing ${styles2.length} closing bracket${styles2.length === 1 ? "" : "s"} (\`}\`)`;
1691
+ if (styles.length > 0) {
1692
+ const errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? "" : "s"} (\`}\`)`;
1667
1693
  throw new Error(errMessage);
1668
1694
  }
1669
1695
  return chunks.join("");
1670
1696
  };
1671
1697
  return templates;
1672
1698
  }
1673
- const ansiStyles = ansiStylesExports;
1674
- const { stdout: stdoutColor, stderr: stderrColor } = browser;
1675
- const {
1676
- stringReplaceAll,
1677
- stringEncaseCRLFWithFirstIndex
1678
- } = util;
1679
- const { isArray } = Array;
1680
- const levelMapping = [
1681
- "ansi",
1682
- "ansi",
1683
- "ansi256",
1684
- "ansi16m"
1685
- ];
1686
- const styles = /* @__PURE__ */ Object.create(null);
1687
- const applyOptions = (object, options = {}) => {
1688
- if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
1689
- throw new Error("The `level` option should be an integer from 0 to 3");
1699
+ var source;
1700
+ var hasRequiredSource;
1701
+ function requireSource() {
1702
+ if (hasRequiredSource) return source;
1703
+ hasRequiredSource = 1;
1704
+ const ansiStyles2 = requireAnsiStyles();
1705
+ const { stdout: stdoutColor, stderr: stderrColor } = requireBrowser();
1706
+ const {
1707
+ stringReplaceAll,
1708
+ stringEncaseCRLFWithFirstIndex
1709
+ } = requireUtil();
1710
+ const { isArray } = Array;
1711
+ const levelMapping = [
1712
+ "ansi",
1713
+ "ansi",
1714
+ "ansi256",
1715
+ "ansi16m"
1716
+ ];
1717
+ const styles = /* @__PURE__ */ Object.create(null);
1718
+ const applyOptions = (object, options = {}) => {
1719
+ if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
1720
+ throw new Error("The `level` option should be an integer from 0 to 3");
1721
+ }
1722
+ const colorLevel = stdoutColor ? stdoutColor.level : 0;
1723
+ object.level = options.level === void 0 ? colorLevel : options.level;
1724
+ };
1725
+ class ChalkClass {
1726
+ constructor(options) {
1727
+ return chalkFactory(options);
1728
+ }
1690
1729
  }
1691
- const colorLevel = stdoutColor ? stdoutColor.level : 0;
1692
- object.level = options.level === void 0 ? colorLevel : options.level;
1693
- };
1694
- class ChalkClass {
1695
- constructor(options) {
1730
+ const chalkFactory = (options) => {
1731
+ const chalk3 = {};
1732
+ applyOptions(chalk3, options);
1733
+ chalk3.template = (...arguments_) => chalkTag(chalk3.template, ...arguments_);
1734
+ Object.setPrototypeOf(chalk3, Chalk.prototype);
1735
+ Object.setPrototypeOf(chalk3.template, chalk3);
1736
+ chalk3.template.constructor = () => {
1737
+ throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
1738
+ };
1739
+ chalk3.template.Instance = ChalkClass;
1740
+ return chalk3.template;
1741
+ };
1742
+ function Chalk(options) {
1696
1743
  return chalkFactory(options);
1697
1744
  }
1698
- }
1699
- const chalkFactory = (options) => {
1700
- const chalk2 = {};
1701
- applyOptions(chalk2, options);
1702
- chalk2.template = (...arguments_) => chalkTag(chalk2.template, ...arguments_);
1703
- Object.setPrototypeOf(chalk2, Chalk.prototype);
1704
- Object.setPrototypeOf(chalk2.template, chalk2);
1705
- chalk2.template.constructor = () => {
1706
- throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
1707
- };
1708
- chalk2.template.Instance = ChalkClass;
1709
- return chalk2.template;
1710
- };
1711
- function Chalk(options) {
1712
- return chalkFactory(options);
1713
- }
1714
- for (const [styleName, style] of Object.entries(ansiStyles)) {
1715
- styles[styleName] = {
1745
+ for (const [styleName, style] of Object.entries(ansiStyles2)) {
1746
+ styles[styleName] = {
1747
+ get() {
1748
+ const builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty);
1749
+ Object.defineProperty(this, styleName, { value: builder });
1750
+ return builder;
1751
+ }
1752
+ };
1753
+ }
1754
+ styles.visible = {
1716
1755
  get() {
1717
- const builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty);
1718
- Object.defineProperty(this, styleName, { value: builder });
1756
+ const builder = createBuilder(this, this._styler, true);
1757
+ Object.defineProperty(this, "visible", { value: builder });
1719
1758
  return builder;
1720
1759
  }
1721
1760
  };
1722
- }
1723
- styles.visible = {
1724
- get() {
1725
- const builder = createBuilder(this, this._styler, true);
1726
- Object.defineProperty(this, "visible", { value: builder });
1727
- return builder;
1761
+ const usedModels = ["rgb", "hex", "keyword", "hsl", "hsv", "hwb", "ansi", "ansi256"];
1762
+ for (const model of usedModels) {
1763
+ styles[model] = {
1764
+ get() {
1765
+ const { level } = this;
1766
+ return function(...arguments_) {
1767
+ const styler = createStyler(ansiStyles2.color[levelMapping[level]][model](...arguments_), ansiStyles2.color.close, this._styler);
1768
+ return createBuilder(this, styler, this._isEmpty);
1769
+ };
1770
+ }
1771
+ };
1728
1772
  }
1729
- };
1730
- const usedModels = ["rgb", "hex", "keyword", "hsl", "hsv", "hwb", "ansi", "ansi256"];
1731
- for (const model of usedModels) {
1732
- styles[model] = {
1733
- get() {
1734
- const { level } = this;
1735
- return function(...arguments_) {
1736
- const styler = createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_), ansiStyles.color.close, this._styler);
1737
- return createBuilder(this, styler, this._isEmpty);
1738
- };
1773
+ for (const model of usedModels) {
1774
+ const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
1775
+ styles[bgModel] = {
1776
+ get() {
1777
+ const { level } = this;
1778
+ return function(...arguments_) {
1779
+ const styler = createStyler(ansiStyles2.bgColor[levelMapping[level]][model](...arguments_), ansiStyles2.bgColor.close, this._styler);
1780
+ return createBuilder(this, styler, this._isEmpty);
1781
+ };
1782
+ }
1783
+ };
1784
+ }
1785
+ const proto = Object.defineProperties(() => {
1786
+ }, {
1787
+ ...styles,
1788
+ level: {
1789
+ enumerable: true,
1790
+ get() {
1791
+ return this._generator.level;
1792
+ },
1793
+ set(level) {
1794
+ this._generator.level = level;
1795
+ }
1739
1796
  }
1740
- };
1741
- }
1742
- for (const model of usedModels) {
1743
- const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
1744
- styles[bgModel] = {
1745
- get() {
1746
- const { level } = this;
1747
- return function(...arguments_) {
1748
- const styler = createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_), ansiStyles.bgColor.close, this._styler);
1749
- return createBuilder(this, styler, this._isEmpty);
1750
- };
1797
+ });
1798
+ const createStyler = (open, close, parent) => {
1799
+ let openAll;
1800
+ let closeAll;
1801
+ if (parent === void 0) {
1802
+ openAll = open;
1803
+ closeAll = close;
1804
+ } else {
1805
+ openAll = parent.openAll + open;
1806
+ closeAll = close + parent.closeAll;
1751
1807
  }
1808
+ return {
1809
+ open,
1810
+ close,
1811
+ openAll,
1812
+ closeAll,
1813
+ parent
1814
+ };
1752
1815
  };
1753
- }
1754
- const proto = Object.defineProperties(() => {
1755
- }, {
1756
- ...styles,
1757
- level: {
1758
- enumerable: true,
1759
- get() {
1760
- return this._generator.level;
1761
- },
1762
- set(level) {
1763
- this._generator.level = level;
1764
- }
1765
- }
1766
- });
1767
- const createStyler = (open, close, parent) => {
1768
- let openAll;
1769
- let closeAll;
1770
- if (parent === void 0) {
1771
- openAll = open;
1772
- closeAll = close;
1773
- } else {
1774
- openAll = parent.openAll + open;
1775
- closeAll = close + parent.closeAll;
1776
- }
1777
- return {
1778
- open,
1779
- close,
1780
- openAll,
1781
- closeAll,
1782
- parent
1816
+ const createBuilder = (self, _styler, _isEmpty) => {
1817
+ const builder = (...arguments_) => {
1818
+ if (isArray(arguments_[0]) && isArray(arguments_[0].raw)) {
1819
+ return applyStyle(builder, chalkTag(builder, ...arguments_));
1820
+ }
1821
+ return applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
1822
+ };
1823
+ Object.setPrototypeOf(builder, proto);
1824
+ builder._generator = self;
1825
+ builder._styler = _styler;
1826
+ builder._isEmpty = _isEmpty;
1827
+ return builder;
1783
1828
  };
1784
- };
1785
- const createBuilder = (self, _styler, _isEmpty) => {
1786
- const builder = (...arguments_) => {
1787
- if (isArray(arguments_[0]) && isArray(arguments_[0].raw)) {
1788
- return applyStyle(builder, chalkTag(builder, ...arguments_));
1829
+ const applyStyle = (self, string) => {
1830
+ if (self.level <= 0 || !string) {
1831
+ return self._isEmpty ? "" : string;
1832
+ }
1833
+ let styler = self._styler;
1834
+ if (styler === void 0) {
1835
+ return string;
1836
+ }
1837
+ const { openAll, closeAll } = styler;
1838
+ if (string.indexOf("\x1B") !== -1) {
1839
+ while (styler !== void 0) {
1840
+ string = stringReplaceAll(string, styler.close, styler.open);
1841
+ styler = styler.parent;
1842
+ }
1789
1843
  }
1790
- return applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
1791
- };
1792
- Object.setPrototypeOf(builder, proto);
1793
- builder._generator = self;
1794
- builder._styler = _styler;
1795
- builder._isEmpty = _isEmpty;
1796
- return builder;
1797
- };
1798
- const applyStyle = (self, string) => {
1799
- if (self.level <= 0 || !string) {
1800
- return self._isEmpty ? "" : string;
1801
- }
1802
- let styler = self._styler;
1803
- if (styler === void 0) {
1804
- return string;
1805
- }
1806
- const { openAll, closeAll } = styler;
1807
- if (string.indexOf("\x1B") !== -1) {
1808
- while (styler !== void 0) {
1809
- string = stringReplaceAll(string, styler.close, styler.open);
1810
- styler = styler.parent;
1844
+ const lfIndex = string.indexOf("\n");
1845
+ if (lfIndex !== -1) {
1846
+ string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
1811
1847
  }
1812
- }
1813
- const lfIndex = string.indexOf("\n");
1814
- if (lfIndex !== -1) {
1815
- string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
1816
- }
1817
- return openAll + string + closeAll;
1818
- };
1819
- let template;
1820
- const chalkTag = (chalk2, ...strings) => {
1821
- const [firstString] = strings;
1822
- if (!isArray(firstString) || !isArray(firstString.raw)) {
1823
- return strings.join(" ");
1824
- }
1825
- const arguments_ = strings.slice(1);
1826
- const parts = [firstString.raw[0]];
1827
- for (let i = 1; i < firstString.length; i++) {
1828
- parts.push(
1829
- String(arguments_[i - 1]).replace(/[{}\\]/g, "\\$&"),
1830
- String(firstString.raw[i])
1831
- );
1832
- }
1833
- if (template === void 0) {
1834
- template = requireTemplates();
1835
- }
1836
- return template(chalk2, parts.join(""));
1837
- };
1838
- Object.defineProperties(Chalk.prototype, styles);
1839
- const chalk = Chalk();
1840
- chalk.supportsColor = stdoutColor;
1841
- chalk.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
1842
- chalk.stderr.supportsColor = stderrColor;
1843
- var source = chalk;
1844
- const chalk$1 = /* @__PURE__ */ getDefaultExportFromCjs(source);
1845
- chalk$1.level = 3;
1848
+ return openAll + string + closeAll;
1849
+ };
1850
+ let template;
1851
+ const chalkTag = (chalk3, ...strings) => {
1852
+ const [firstString] = strings;
1853
+ if (!isArray(firstString) || !isArray(firstString.raw)) {
1854
+ return strings.join(" ");
1855
+ }
1856
+ const arguments_ = strings.slice(1);
1857
+ const parts = [firstString.raw[0]];
1858
+ for (let i = 1; i < firstString.length; i++) {
1859
+ parts.push(
1860
+ String(arguments_[i - 1]).replace(/[{}\\]/g, "\\$&"),
1861
+ String(firstString.raw[i])
1862
+ );
1863
+ }
1864
+ if (template === void 0) {
1865
+ template = requireTemplates();
1866
+ }
1867
+ return template(chalk3, parts.join(""));
1868
+ };
1869
+ Object.defineProperties(Chalk.prototype, styles);
1870
+ const chalk2 = Chalk();
1871
+ chalk2.supportsColor = stdoutColor;
1872
+ chalk2.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
1873
+ chalk2.stderr.supportsColor = stderrColor;
1874
+ source = chalk2;
1875
+ return source;
1876
+ }
1877
+ var sourceExports = requireSource();
1878
+ const chalk = /* @__PURE__ */ getDefaultExportFromCjs(sourceExports);
1879
+ chalk.level = 3;
1846
1880
  class STSWorkerManager {
1847
1881
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1848
1882
  constructor(app, options) {
@@ -1876,7 +1910,7 @@ class STSWorkerManager {
1876
1910
  StopRunner: (runner) => __privateGet(this, _StopRunner).call(this, stsWorkerEx, runner),
1877
1911
  Stop: async () => __privateGet(this, _StopWorker).call(this, stsWorkerEx)
1878
1912
  };
1879
- (_a = __privateGet(this, _STSInstrumentController)) == null ? void 0 : _a.LogEx(chalk$1.yellow(`Creating new worker: [${stsWorkerEx.id}]`));
1913
+ (_a = __privateGet(this, _STSInstrumentController)) == null ? void 0 : _a.LogEx(chalk.yellow(`Creating new worker: [${stsWorkerEx.id}]`));
1880
1914
  console.log(`Adding worker: [${stsWorkerEx.id}]`);
1881
1915
  stsWorkerEx.worker.onmessage = function(data) {
1882
1916
  console.log(data.data);
@@ -1918,7 +1952,7 @@ class STSWorkerManager {
1918
1952
  const runnerEx = __privateGet(this, _CreateAsyncRunner).call(this, stsWorkerEx, runnerOptions);
1919
1953
  stsWorkerEx.runnersEx[runnerEx.id] = runnerEx;
1920
1954
  __privateGet(this, _SetRunnerIntoWorker).call(this, stsWorkerEx, runnerEx);
1921
- runnerEx.publishInstrumentController.LogEx(chalk$1.green(`Added runner: [${runnerEx.id}] into worker: [${stsWorkerEx.id}]`));
1955
+ runnerEx.publishInstrumentController.LogEx(chalk.green(`Added runner: [${runnerEx.id}] into worker: [${stsWorkerEx.id}]`));
1922
1956
  return runnerEx;
1923
1957
  });
1924
1958
  __privateAdd(this, _SetRunnerIntoWorker, (workerEx, runnerEx) => {
@@ -2049,7 +2083,7 @@ class STSWorkerManager {
2049
2083
  __privateAdd(this, _CreateAsyncRunner, (workerEx, runnerOptions) => {
2050
2084
  var _a;
2051
2085
  __privateWrapper(this, _runner)._++;
2052
- (_a = __privateGet(this, _STSInstrumentController)) == null ? void 0 : _a.LogEx(chalk$1.yellow(`Creating new async runner: [${__privateGet(this, _runner)}]`));
2086
+ (_a = __privateGet(this, _STSInstrumentController)) == null ? void 0 : _a.LogEx(chalk.yellow(`Creating new async runner: [${__privateGet(this, _runner)}]`));
2053
2087
  const asyncRunnerContext = {
2054
2088
  nid: `${workerEx.workerThreadWorkerOptions.hostName}${ModelDelimeter.COMPONENT_SEPERATOR}${workerEx.workerThreadWorkerOptions.agentId}-${workerEx.workerThreadWorkerOptions.userAgent}${ModelDelimeter.NID_SEPERATOR}worker${workerEx.id}${ModelDelimeter.SEPERATOR}${__privateGet(this, _runner)}`,
2055
2089
  id: __privateGet(this, _runner).toString(),
@@ -2191,15 +2225,15 @@ class STSWorkerManager {
2191
2225
  } else {
2192
2226
  __privateSet(this, _options, {});
2193
2227
  }
2194
- console.log(chalk$1.yellow(`CompareSTSInstrumentControllerPluginKeyWMEx(): [${CompareSTSInstrumentControllerPluginKeyWMEx()}]`));
2195
- console.log(chalk$1.yellow(`Attempting to get STSInstrumentControllerPlugin using symbol: [${String(STSInstrumentControllerPluginKey)}]`));
2228
+ console.log(chalk.yellow(`CompareSTSInstrumentControllerPluginKeyWMEx(): [${CompareSTSInstrumentControllerPluginKeyWMEx()}]`));
2229
+ console.log(chalk.yellow(`Attempting to get STSInstrumentControllerPlugin using symbol: [${String(STSInstrumentControllerPluginKey)}]`));
2196
2230
  __privateSet(this, _STSInstrumentController, GetSTSInstrumentController(app));
2197
- console.log(chalk$1.yellow("keys within app.config.globalProperties.$sts"));
2231
+ console.log(chalk.yellow("keys within app.config.globalProperties.$sts"));
2198
2232
  for (const [key] of Object.entries(app.config.globalProperties.$sts)) {
2199
- console.log(chalk$1.yellow(`${key}`));
2233
+ console.log(chalk.yellow(`${key}`));
2200
2234
  }
2201
2235
  if (!__privateGet(this, _STSInstrumentController)) {
2202
- console.log(chalk$1.yellow(`Failed to get STSInstrumentControllerPlugin using symbol: [${String(STSInstrumentControllerPluginKey)}]`));
2236
+ console.log(chalk.yellow(`Failed to get STSInstrumentControllerPlugin using symbol: [${String(STSInstrumentControllerPluginKey)}]`));
2203
2237
  }
2204
2238
  }
2205
2239
  get WorkersEx() {