@digipair/skill-dsp 0.15.3 → 0.15.4

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/index.esm.js CHANGED
@@ -1,13 +1,12 @@
1
1
  import path from 'path';
2
2
  import { TransformStream, TextDecoderStream, ReadableStream } from 'stream/web';
3
- import * as _crypto from 'crypto';
4
3
  import { createHash } from 'crypto';
5
- import * as _http from 'http';
6
- import * as _https from 'https';
7
- import * as _fs from 'node:fs';
8
- import * as _os from 'os';
9
- import * as _process from 'process';
10
- import { runInNewContext } from 'vm';
4
+ import 'http';
5
+ import 'https';
6
+ import 'node:fs';
7
+ import 'os';
8
+ import 'process';
9
+ import 'vm';
11
10
 
12
11
  function _extends() {
13
12
  _extends = Object.assign || function assign(target) {
@@ -8144,7 +8143,7 @@ function _type_of(obj) {
8144
8143
  }
8145
8144
  return self;
8146
8145
  }
8147
- function _class_call_check$M(instance, Constructor) {
8146
+ function _class_call_check$L(instance, Constructor) {
8148
8147
  if (!(instance instanceof Constructor)) {
8149
8148
  throw new TypeError("Cannot call a class as a function");
8150
8149
  }
@@ -8259,7 +8258,7 @@ var LuxonError = /*#__PURE__*/ function(Error1) {
8259
8258
  _inherits$p(LuxonError, Error1);
8260
8259
  var _super = _create_super$p(LuxonError);
8261
8260
  function LuxonError() {
8262
- _class_call_check$M(this, LuxonError);
8261
+ _class_call_check$L(this, LuxonError);
8263
8262
  return _super.apply(this, arguments);
8264
8263
  }
8265
8264
  return LuxonError;
@@ -8270,7 +8269,7 @@ var LuxonError = /*#__PURE__*/ function(Error1) {
8270
8269
  _inherits$p(InvalidDateTimeError, LuxonError);
8271
8270
  var _super = _create_super$p(InvalidDateTimeError);
8272
8271
  function InvalidDateTimeError(reason) {
8273
- _class_call_check$M(this, InvalidDateTimeError);
8272
+ _class_call_check$L(this, InvalidDateTimeError);
8274
8273
  return _super.call(this, "Invalid DateTime: ".concat(reason.toMessage()));
8275
8274
  }
8276
8275
  return InvalidDateTimeError;
@@ -8281,7 +8280,7 @@ var LuxonError = /*#__PURE__*/ function(Error1) {
8281
8280
  _inherits$p(InvalidIntervalError, LuxonError);
8282
8281
  var _super = _create_super$p(InvalidIntervalError);
8283
8282
  function InvalidIntervalError(reason) {
8284
- _class_call_check$M(this, InvalidIntervalError);
8283
+ _class_call_check$L(this, InvalidIntervalError);
8285
8284
  return _super.call(this, "Invalid Interval: ".concat(reason.toMessage()));
8286
8285
  }
8287
8286
  return InvalidIntervalError;
@@ -8292,7 +8291,7 @@ var LuxonError = /*#__PURE__*/ function(Error1) {
8292
8291
  _inherits$p(InvalidDurationError, LuxonError);
8293
8292
  var _super = _create_super$p(InvalidDurationError);
8294
8293
  function InvalidDurationError(reason) {
8295
- _class_call_check$M(this, InvalidDurationError);
8294
+ _class_call_check$L(this, InvalidDurationError);
8296
8295
  return _super.call(this, "Invalid Duration: ".concat(reason.toMessage()));
8297
8296
  }
8298
8297
  return InvalidDurationError;
@@ -8303,7 +8302,7 @@ var LuxonError = /*#__PURE__*/ function(Error1) {
8303
8302
  _inherits$p(ConflictingSpecificationError, LuxonError);
8304
8303
  var _super = _create_super$p(ConflictingSpecificationError);
8305
8304
  function ConflictingSpecificationError() {
8306
- _class_call_check$M(this, ConflictingSpecificationError);
8305
+ _class_call_check$L(this, ConflictingSpecificationError);
8307
8306
  return _super.apply(this, arguments);
8308
8307
  }
8309
8308
  return ConflictingSpecificationError;
@@ -8314,7 +8313,7 @@ var LuxonError = /*#__PURE__*/ function(Error1) {
8314
8313
  _inherits$p(InvalidUnitError, LuxonError);
8315
8314
  var _super = _create_super$p(InvalidUnitError);
8316
8315
  function InvalidUnitError(unit) {
8317
- _class_call_check$M(this, InvalidUnitError);
8316
+ _class_call_check$L(this, InvalidUnitError);
8318
8317
  return _super.call(this, "Invalid unit ".concat(unit));
8319
8318
  }
8320
8319
  return InvalidUnitError;
@@ -8325,7 +8324,7 @@ var LuxonError = /*#__PURE__*/ function(Error1) {
8325
8324
  _inherits$p(InvalidArgumentError, LuxonError);
8326
8325
  var _super = _create_super$p(InvalidArgumentError);
8327
8326
  function InvalidArgumentError() {
8328
- _class_call_check$M(this, InvalidArgumentError);
8327
+ _class_call_check$L(this, InvalidArgumentError);
8329
8328
  return _super.apply(this, arguments);
8330
8329
  }
8331
8330
  return InvalidArgumentError;
@@ -8336,7 +8335,7 @@ var LuxonError = /*#__PURE__*/ function(Error1) {
8336
8335
  _inherits$p(ZoneIsAbstractError, LuxonError);
8337
8336
  var _super = _create_super$p(ZoneIsAbstractError);
8338
8337
  function ZoneIsAbstractError() {
8339
- _class_call_check$M(this, ZoneIsAbstractError);
8338
+ _class_call_check$L(this, ZoneIsAbstractError);
8340
8339
  return _super.call(this, "Zone is an abstract class");
8341
8340
  }
8342
8341
  return ZoneIsAbstractError;
@@ -8493,12 +8492,12 @@ var DATETIME_HUGE_WITH_SECONDS = {
8493
8492
  timeZoneName: l
8494
8493
  };
8495
8494
 
8496
- function _class_call_check$L(instance, Constructor) {
8495
+ function _class_call_check$K(instance, Constructor) {
8497
8496
  if (!(instance instanceof Constructor)) {
8498
8497
  throw new TypeError("Cannot call a class as a function");
8499
8498
  }
8500
8499
  }
8501
- function _defineProperties$y(target, props) {
8500
+ function _defineProperties$x(target, props) {
8502
8501
  for(var i = 0; i < props.length; i++){
8503
8502
  var descriptor = props[i];
8504
8503
  descriptor.enumerable = descriptor.enumerable || false;
@@ -8507,16 +8506,16 @@ function _defineProperties$y(target, props) {
8507
8506
  Object.defineProperty(target, descriptor.key, descriptor);
8508
8507
  }
8509
8508
  }
8510
- function _create_class$y(Constructor, protoProps, staticProps) {
8511
- if (protoProps) _defineProperties$y(Constructor.prototype, protoProps);
8512
- if (staticProps) _defineProperties$y(Constructor, staticProps);
8509
+ function _create_class$x(Constructor, protoProps, staticProps) {
8510
+ if (protoProps) _defineProperties$x(Constructor.prototype, protoProps);
8511
+ if (staticProps) _defineProperties$x(Constructor, staticProps);
8513
8512
  return Constructor;
8514
8513
  }
8515
8514
  var Zone = /*#__PURE__*/ function() {
8516
8515
  function Zone() {
8517
- _class_call_check$L(this, Zone);
8516
+ _class_call_check$K(this, Zone);
8518
8517
  }
8519
- _create_class$y(Zone, [
8518
+ _create_class$x(Zone, [
8520
8519
  {
8521
8520
  key: "type",
8522
8521
  get: /**
@@ -8622,12 +8621,12 @@ function _assert_this_initialized$o(self) {
8622
8621
  }
8623
8622
  return self;
8624
8623
  }
8625
- function _class_call_check$K(instance, Constructor) {
8624
+ function _class_call_check$J(instance, Constructor) {
8626
8625
  if (!(instance instanceof Constructor)) {
8627
8626
  throw new TypeError("Cannot call a class as a function");
8628
8627
  }
8629
8628
  }
8630
- function _defineProperties$x(target, props) {
8629
+ function _defineProperties$w(target, props) {
8631
8630
  for(var i = 0; i < props.length; i++){
8632
8631
  var descriptor = props[i];
8633
8632
  descriptor.enumerable = descriptor.enumerable || false;
@@ -8636,9 +8635,9 @@ function _defineProperties$x(target, props) {
8636
8635
  Object.defineProperty(target, descriptor.key, descriptor);
8637
8636
  }
8638
8637
  }
8639
- function _create_class$x(Constructor, protoProps, staticProps) {
8640
- if (protoProps) _defineProperties$x(Constructor.prototype, protoProps);
8641
- if (staticProps) _defineProperties$x(Constructor, staticProps);
8638
+ function _create_class$w(Constructor, protoProps, staticProps) {
8639
+ if (protoProps) _defineProperties$w(Constructor.prototype, protoProps);
8640
+ if (staticProps) _defineProperties$w(Constructor, staticProps);
8642
8641
  return Constructor;
8643
8642
  }
8644
8643
  function _get_prototype_of$o(o) {
@@ -8706,10 +8705,10 @@ var SystemZone = /*#__PURE__*/ function(Zone) {
8706
8705
  _inherits$o(SystemZone, Zone);
8707
8706
  var _super = _create_super$o(SystemZone);
8708
8707
  function SystemZone() {
8709
- _class_call_check$K(this, SystemZone);
8708
+ _class_call_check$J(this, SystemZone);
8710
8709
  return _super.apply(this, arguments);
8711
8710
  }
8712
- _create_class$x(SystemZone, [
8711
+ _create_class$w(SystemZone, [
8713
8712
  {
8714
8713
  key: "type",
8715
8714
  get: /** @override **/ function get() {
@@ -8790,12 +8789,12 @@ function _assert_this_initialized$n(self) {
8790
8789
  }
8791
8790
  return self;
8792
8791
  }
8793
- function _class_call_check$J(instance, Constructor) {
8792
+ function _class_call_check$I(instance, Constructor) {
8794
8793
  if (!(instance instanceof Constructor)) {
8795
8794
  throw new TypeError("Cannot call a class as a function");
8796
8795
  }
8797
8796
  }
8798
- function _defineProperties$w(target, props) {
8797
+ function _defineProperties$v(target, props) {
8799
8798
  for(var i = 0; i < props.length; i++){
8800
8799
  var descriptor = props[i];
8801
8800
  descriptor.enumerable = descriptor.enumerable || false;
@@ -8804,9 +8803,9 @@ function _defineProperties$w(target, props) {
8804
8803
  Object.defineProperty(target, descriptor.key, descriptor);
8805
8804
  }
8806
8805
  }
8807
- function _create_class$w(Constructor, protoProps, staticProps) {
8808
- if (protoProps) _defineProperties$w(Constructor.prototype, protoProps);
8809
- if (staticProps) _defineProperties$w(Constructor, staticProps);
8806
+ function _create_class$v(Constructor, protoProps, staticProps) {
8807
+ if (protoProps) _defineProperties$v(Constructor.prototype, protoProps);
8808
+ if (staticProps) _defineProperties$v(Constructor, staticProps);
8810
8809
  return Constructor;
8811
8810
  }
8812
8811
  function _get_prototype_of$n(o) {
@@ -8964,14 +8963,14 @@ var IANAZone = /*#__PURE__*/ function(Zone) {
8964
8963
  _inherits$n(IANAZone, Zone);
8965
8964
  var _super = _create_super$n(IANAZone);
8966
8965
  function IANAZone(name) {
8967
- _class_call_check$J(this, IANAZone);
8966
+ _class_call_check$I(this, IANAZone);
8968
8967
  var _this;
8969
8968
  _this = _super.call(this);
8970
8969
  /** @private **/ _this.zoneName = name;
8971
8970
  /** @private **/ _this.valid = IANAZone.isValidZone(name);
8972
8971
  return _this;
8973
8972
  }
8974
- _create_class$w(IANAZone, [
8973
+ _create_class$v(IANAZone, [
8975
8974
  {
8976
8975
  key: "type",
8977
8976
  get: /** @override **/ function get() {
@@ -9113,12 +9112,12 @@ function _array_like_to_array$m(arr, len) {
9113
9112
  function _array_with_holes$f(arr) {
9114
9113
  if (Array.isArray(arr)) return arr;
9115
9114
  }
9116
- function _class_call_check$I(instance, Constructor) {
9115
+ function _class_call_check$H(instance, Constructor) {
9117
9116
  if (!(instance instanceof Constructor)) {
9118
9117
  throw new TypeError("Cannot call a class as a function");
9119
9118
  }
9120
9119
  }
9121
- function _defineProperties$v(target, props) {
9120
+ function _defineProperties$u(target, props) {
9122
9121
  for(var i = 0; i < props.length; i++){
9123
9122
  var descriptor = props[i];
9124
9123
  descriptor.enumerable = descriptor.enumerable || false;
@@ -9127,12 +9126,12 @@ function _defineProperties$v(target, props) {
9127
9126
  Object.defineProperty(target, descriptor.key, descriptor);
9128
9127
  }
9129
9128
  }
9130
- function _create_class$v(Constructor, protoProps, staticProps) {
9131
- if (protoProps) _defineProperties$v(Constructor.prototype, protoProps);
9132
- if (staticProps) _defineProperties$v(Constructor, staticProps);
9129
+ function _create_class$u(Constructor, protoProps, staticProps) {
9130
+ if (protoProps) _defineProperties$u(Constructor.prototype, protoProps);
9131
+ if (staticProps) _defineProperties$u(Constructor, staticProps);
9133
9132
  return Constructor;
9134
9133
  }
9135
- function _define_property$E(obj, key, value) {
9134
+ function _define_property$D(obj, key, value) {
9136
9135
  if (key in obj) {
9137
9136
  Object.defineProperty(obj, key, {
9138
9137
  value: value,
@@ -9182,7 +9181,7 @@ function _object_spread$q(target) {
9182
9181
  }));
9183
9182
  }
9184
9183
  ownKeys.forEach(function(key) {
9185
- _define_property$E(target, key, source[key]);
9184
+ _define_property$D(target, key, source[key]);
9186
9185
  });
9187
9186
  }
9188
9187
  return target;
@@ -9420,7 +9419,7 @@ function supportsFastNumbers(loc) {
9420
9419
  * @private
9421
9420
  */ var PolyNumberFormatter = /*#__PURE__*/ function() {
9422
9421
  function PolyNumberFormatter(intl, forceSimple, opts) {
9423
- _class_call_check$I(this, PolyNumberFormatter);
9422
+ _class_call_check$H(this, PolyNumberFormatter);
9424
9423
  this.padTo = opts.padTo || 0;
9425
9424
  this.floor = opts.floor || false;
9426
9425
  opts.padTo; opts.floor; var otherOpts = _object_without_properties(opts, [
@@ -9435,7 +9434,7 @@ function supportsFastNumbers(loc) {
9435
9434
  this.inf = getCachedINF(intl, intlOpts);
9436
9435
  }
9437
9436
  }
9438
- _create_class$v(PolyNumberFormatter, [
9437
+ _create_class$u(PolyNumberFormatter, [
9439
9438
  {
9440
9439
  key: "format",
9441
9440
  value: function format(i) {
@@ -9456,7 +9455,7 @@ function supportsFastNumbers(loc) {
9456
9455
  * @private
9457
9456
  */ var PolyDateFormatter = /*#__PURE__*/ function() {
9458
9457
  function PolyDateFormatter(dt, intl, opts) {
9459
- _class_call_check$I(this, PolyDateFormatter);
9458
+ _class_call_check$H(this, PolyDateFormatter);
9460
9459
  this.opts = opts;
9461
9460
  this.originalZone = undefined;
9462
9461
  var z = undefined;
@@ -9502,7 +9501,7 @@ function supportsFastNumbers(loc) {
9502
9501
  intlOpts.timeZone = intlOpts.timeZone || z;
9503
9502
  this.dtf = getCachedDTF(intl, intlOpts);
9504
9503
  }
9505
- _create_class$v(PolyDateFormatter, [
9504
+ _create_class$u(PolyDateFormatter, [
9506
9505
  {
9507
9506
  key: "format",
9508
9507
  value: function format() {
@@ -9553,7 +9552,7 @@ function supportsFastNumbers(loc) {
9553
9552
  * @private
9554
9553
  */ var PolyRelFormatter = /*#__PURE__*/ function() {
9555
9554
  function PolyRelFormatter(intl, isEnglish, opts) {
9556
- _class_call_check$I(this, PolyRelFormatter);
9555
+ _class_call_check$H(this, PolyRelFormatter);
9557
9556
  this.opts = _object_spread$q({
9558
9557
  style: "long"
9559
9558
  }, opts);
@@ -9561,7 +9560,7 @@ function supportsFastNumbers(loc) {
9561
9560
  this.rtf = getCachedRTF(intl, opts);
9562
9561
  }
9563
9562
  }
9564
- _create_class$v(PolyRelFormatter, [
9563
+ _create_class$u(PolyRelFormatter, [
9565
9564
  {
9566
9565
  key: "format",
9567
9566
  value: function format(count, unit) {
@@ -9595,7 +9594,7 @@ var fallbackWeekSettings = {
9595
9594
  };
9596
9595
  var Locale = /*#__PURE__*/ function() {
9597
9596
  function Locale(locale, numbering, outputCalendar, weekSettings, specifiedLocale) {
9598
- _class_call_check$I(this, Locale);
9597
+ _class_call_check$H(this, Locale);
9599
9598
  var _parseLocaleString = _sliced_to_array$f(parseLocaleString(locale), 3), parsedLocale = _parseLocaleString[0], parsedNumberingSystem = _parseLocaleString[1], parsedOutputCalendar = _parseLocaleString[2];
9600
9599
  this.locale = parsedLocale;
9601
9600
  this.numberingSystem = numbering || parsedNumberingSystem || null;
@@ -9615,7 +9614,7 @@ var Locale = /*#__PURE__*/ function() {
9615
9614
  this.specifiedLocale = specifiedLocale;
9616
9615
  this.fastNumbersCached = null;
9617
9616
  }
9618
- _create_class$v(Locale, [
9617
+ _create_class$u(Locale, [
9619
9618
  {
9620
9619
  key: "fastNumbers",
9621
9620
  get: function get() {
@@ -9879,12 +9878,12 @@ function _assert_this_initialized$m(self) {
9879
9878
  }
9880
9879
  return self;
9881
9880
  }
9882
- function _class_call_check$H(instance, Constructor) {
9881
+ function _class_call_check$G(instance, Constructor) {
9883
9882
  if (!(instance instanceof Constructor)) {
9884
9883
  throw new TypeError("Cannot call a class as a function");
9885
9884
  }
9886
9885
  }
9887
- function _defineProperties$u(target, props) {
9886
+ function _defineProperties$t(target, props) {
9888
9887
  for(var i = 0; i < props.length; i++){
9889
9888
  var descriptor = props[i];
9890
9889
  descriptor.enumerable = descriptor.enumerable || false;
@@ -9893,9 +9892,9 @@ function _defineProperties$u(target, props) {
9893
9892
  Object.defineProperty(target, descriptor.key, descriptor);
9894
9893
  }
9895
9894
  }
9896
- function _create_class$u(Constructor, protoProps, staticProps) {
9897
- if (protoProps) _defineProperties$u(Constructor.prototype, protoProps);
9898
- if (staticProps) _defineProperties$u(Constructor, staticProps);
9895
+ function _create_class$t(Constructor, protoProps, staticProps) {
9896
+ if (protoProps) _defineProperties$t(Constructor.prototype, protoProps);
9897
+ if (staticProps) _defineProperties$t(Constructor, staticProps);
9899
9898
  return Constructor;
9900
9899
  }
9901
9900
  function _get_prototype_of$m(o) {
@@ -9963,13 +9962,13 @@ var FixedOffsetZone = /*#__PURE__*/ function(Zone) {
9963
9962
  _inherits$m(FixedOffsetZone, Zone);
9964
9963
  var _super = _create_super$m(FixedOffsetZone);
9965
9964
  function FixedOffsetZone(offset) {
9966
- _class_call_check$H(this, FixedOffsetZone);
9965
+ _class_call_check$G(this, FixedOffsetZone);
9967
9966
  var _this;
9968
9967
  _this = _super.call(this);
9969
9968
  /** @private **/ _this.fixed = offset;
9970
9969
  return _this;
9971
9970
  }
9972
- _create_class$u(FixedOffsetZone, [
9971
+ _create_class$t(FixedOffsetZone, [
9973
9972
  {
9974
9973
  key: "type",
9975
9974
  get: /** @override **/ function get() {
@@ -10080,12 +10079,12 @@ function _assert_this_initialized$l(self) {
10080
10079
  }
10081
10080
  return self;
10082
10081
  }
10083
- function _class_call_check$G(instance, Constructor) {
10082
+ function _class_call_check$F(instance, Constructor) {
10084
10083
  if (!(instance instanceof Constructor)) {
10085
10084
  throw new TypeError("Cannot call a class as a function");
10086
10085
  }
10087
10086
  }
10088
- function _defineProperties$t(target, props) {
10087
+ function _defineProperties$s(target, props) {
10089
10088
  for(var i = 0; i < props.length; i++){
10090
10089
  var descriptor = props[i];
10091
10090
  descriptor.enumerable = descriptor.enumerable || false;
@@ -10094,9 +10093,9 @@ function _defineProperties$t(target, props) {
10094
10093
  Object.defineProperty(target, descriptor.key, descriptor);
10095
10094
  }
10096
10095
  }
10097
- function _create_class$t(Constructor, protoProps, staticProps) {
10098
- if (protoProps) _defineProperties$t(Constructor.prototype, protoProps);
10099
- if (staticProps) _defineProperties$t(Constructor, staticProps);
10096
+ function _create_class$s(Constructor, protoProps, staticProps) {
10097
+ if (protoProps) _defineProperties$s(Constructor.prototype, protoProps);
10098
+ if (staticProps) _defineProperties$s(Constructor, staticProps);
10100
10099
  return Constructor;
10101
10100
  }
10102
10101
  function _get_prototype_of$l(o) {
@@ -10163,13 +10162,13 @@ var InvalidZone = /*#__PURE__*/ function(Zone) {
10163
10162
  _inherits$l(InvalidZone, Zone);
10164
10163
  var _super = _create_super$l(InvalidZone);
10165
10164
  function InvalidZone(zoneName) {
10166
- _class_call_check$G(this, InvalidZone);
10165
+ _class_call_check$F(this, InvalidZone);
10167
10166
  var _this;
10168
10167
  _this = _super.call(this);
10169
10168
  /** @private */ _this.zoneName = zoneName;
10170
10169
  return _this;
10171
10170
  }
10172
- _create_class$t(InvalidZone, [
10171
+ _create_class$s(InvalidZone, [
10173
10172
  {
10174
10173
  key: "type",
10175
10174
  get: /** @override **/ function get() {
@@ -10253,12 +10252,12 @@ function normalizeZone(input, defaultZone) {
10253
10252
  }
10254
10253
  }
10255
10254
 
10256
- function _class_call_check$F(instance, Constructor) {
10255
+ function _class_call_check$E(instance, Constructor) {
10257
10256
  if (!(instance instanceof Constructor)) {
10258
10257
  throw new TypeError("Cannot call a class as a function");
10259
10258
  }
10260
10259
  }
10261
- function _defineProperties$s(target, props) {
10260
+ function _defineProperties$r(target, props) {
10262
10261
  for(var i = 0; i < props.length; i++){
10263
10262
  var descriptor = props[i];
10264
10263
  descriptor.enumerable = descriptor.enumerable || false;
@@ -10267,9 +10266,9 @@ function _defineProperties$s(target, props) {
10267
10266
  Object.defineProperty(target, descriptor.key, descriptor);
10268
10267
  }
10269
10268
  }
10270
- function _create_class$s(Constructor, protoProps, staticProps) {
10271
- if (protoProps) _defineProperties$s(Constructor.prototype, protoProps);
10272
- if (staticProps) _defineProperties$s(Constructor, staticProps);
10269
+ function _create_class$r(Constructor, protoProps, staticProps) {
10270
+ if (protoProps) _defineProperties$r(Constructor.prototype, protoProps);
10271
+ if (staticProps) _defineProperties$r(Constructor, staticProps);
10273
10272
  return Constructor;
10274
10273
  }
10275
10274
  var now = function() {
@@ -10277,9 +10276,9 @@ var now = function() {
10277
10276
  }, defaultZone = "system", defaultLocale = null, defaultNumberingSystem = null, defaultOutputCalendar = null, twoDigitCutoffYear = 60, throwOnInvalid, defaultWeekSettings = null;
10278
10277
  var Settings = /*#__PURE__*/ function() {
10279
10278
  function Settings() {
10280
- _class_call_check$F(this, Settings);
10279
+ _class_call_check$E(this, Settings);
10281
10280
  }
10282
- _create_class$s(Settings, null, [
10281
+ _create_class$r(Settings, null, [
10283
10282
  {
10284
10283
  key: "now",
10285
10284
  get: /**
@@ -10430,12 +10429,12 @@ var Settings = /*#__PURE__*/ function() {
10430
10429
  return Settings;
10431
10430
  }();
10432
10431
 
10433
- function _class_call_check$E(instance, Constructor) {
10432
+ function _class_call_check$D(instance, Constructor) {
10434
10433
  if (!(instance instanceof Constructor)) {
10435
10434
  throw new TypeError("Cannot call a class as a function");
10436
10435
  }
10437
10436
  }
10438
- function _defineProperties$r(target, props) {
10437
+ function _defineProperties$q(target, props) {
10439
10438
  for(var i = 0; i < props.length; i++){
10440
10439
  var descriptor = props[i];
10441
10440
  descriptor.enumerable = descriptor.enumerable || false;
@@ -10444,18 +10443,18 @@ function _defineProperties$r(target, props) {
10444
10443
  Object.defineProperty(target, descriptor.key, descriptor);
10445
10444
  }
10446
10445
  }
10447
- function _create_class$r(Constructor, protoProps, staticProps) {
10448
- if (protoProps) _defineProperties$r(Constructor.prototype, protoProps);
10449
- if (staticProps) _defineProperties$r(Constructor, staticProps);
10446
+ function _create_class$q(Constructor, protoProps, staticProps) {
10447
+ if (protoProps) _defineProperties$q(Constructor.prototype, protoProps);
10448
+ if (staticProps) _defineProperties$q(Constructor, staticProps);
10450
10449
  return Constructor;
10451
10450
  }
10452
10451
  var Invalid = /*#__PURE__*/ function() {
10453
10452
  function Invalid(reason, explanation) {
10454
- _class_call_check$E(this, Invalid);
10453
+ _class_call_check$D(this, Invalid);
10455
10454
  this.reason = reason;
10456
10455
  this.explanation = explanation;
10457
10456
  }
10458
- _create_class$r(Invalid, [
10457
+ _create_class$q(Invalid, [
10459
10458
  {
10460
10459
  key: "toMessage",
10461
10460
  value: function toMessage() {
@@ -10470,7 +10469,7 @@ var Invalid = /*#__PURE__*/ function() {
10470
10469
  return Invalid;
10471
10470
  }();
10472
10471
 
10473
- function _define_property$D(obj, key, value) {
10472
+ function _define_property$C(obj, key, value) {
10474
10473
  if (key in obj) {
10475
10474
  Object.defineProperty(obj, key, {
10476
10475
  value: value,
@@ -10493,7 +10492,7 @@ function _object_spread$p(target) {
10493
10492
  }));
10494
10493
  }
10495
10494
  ownKeys.forEach(function(key) {
10496
- _define_property$D(target, key, source[key]);
10495
+ _define_property$C(target, key, source[key]);
10497
10496
  });
10498
10497
  }
10499
10498
  return target;
@@ -10689,7 +10688,7 @@ function hasInvalidTimeData(obj) {
10689
10688
  This is just a junk drawer, containing anything used across multiple classes.
10690
10689
  Because Luxon is small(ish), this should stay small and we won't worry about splitting
10691
10690
  it up into, say, parsingUtil.js and basicUtil.js and so on. But they are divided up by feature area.
10692
- */ function _define_property$C(obj, key, value) {
10691
+ */ function _define_property$B(obj, key, value) {
10693
10692
  if (key in obj) {
10694
10693
  Object.defineProperty(obj, key, {
10695
10694
  value: value,
@@ -10712,7 +10711,7 @@ function _object_spread$o(target) {
10712
10711
  }));
10713
10712
  }
10714
10713
  ownKeys.forEach(function(key) {
10715
- _define_property$C(target, key, source[key]);
10714
+ _define_property$B(target, key, source[key]);
10716
10715
  });
10717
10716
  }
10718
10717
  return target;
@@ -11241,12 +11240,12 @@ function _array_like_to_array$k(arr, len) {
11241
11240
  function _array_without_holes$b(arr) {
11242
11241
  if (Array.isArray(arr)) return _array_like_to_array$k(arr);
11243
11242
  }
11244
- function _class_call_check$D(instance, Constructor) {
11243
+ function _class_call_check$C(instance, Constructor) {
11245
11244
  if (!(instance instanceof Constructor)) {
11246
11245
  throw new TypeError("Cannot call a class as a function");
11247
11246
  }
11248
11247
  }
11249
- function _defineProperties$q(target, props) {
11248
+ function _defineProperties$p(target, props) {
11250
11249
  for(var i = 0; i < props.length; i++){
11251
11250
  var descriptor = props[i];
11252
11251
  descriptor.enumerable = descriptor.enumerable || false;
@@ -11255,12 +11254,12 @@ function _defineProperties$q(target, props) {
11255
11254
  Object.defineProperty(target, descriptor.key, descriptor);
11256
11255
  }
11257
11256
  }
11258
- function _create_class$q(Constructor, protoProps, staticProps) {
11259
- if (protoProps) _defineProperties$q(Constructor.prototype, protoProps);
11260
- if (staticProps) _defineProperties$q(Constructor, staticProps);
11257
+ function _create_class$p(Constructor, protoProps, staticProps) {
11258
+ if (protoProps) _defineProperties$p(Constructor.prototype, protoProps);
11259
+ if (staticProps) _defineProperties$p(Constructor, staticProps);
11261
11260
  return Constructor;
11262
11261
  }
11263
- function _define_property$B(obj, key, value) {
11262
+ function _define_property$A(obj, key, value) {
11264
11263
  if (key in obj) {
11265
11264
  Object.defineProperty(obj, key, {
11266
11265
  value: value,
@@ -11289,7 +11288,7 @@ function _object_spread$n(target) {
11289
11288
  }));
11290
11289
  }
11291
11290
  ownKeys.forEach(function(key) {
11292
- _define_property$B(target, key, source[key]);
11291
+ _define_property$A(target, key, source[key]);
11293
11292
  });
11294
11293
  }
11295
11294
  return target;
@@ -11357,12 +11356,12 @@ var macroTokenToFormatOpts = {
11357
11356
  };
11358
11357
  var Formatter = /*#__PURE__*/ function() {
11359
11358
  function Formatter(locale, formatOpts) {
11360
- _class_call_check$D(this, Formatter);
11359
+ _class_call_check$C(this, Formatter);
11361
11360
  this.opts = formatOpts;
11362
11361
  this.loc = locale;
11363
11362
  this.systemLoc = null;
11364
11363
  }
11365
- _create_class$q(Formatter, [
11364
+ _create_class$p(Formatter, [
11366
11365
  {
11367
11366
  key: "formatWithSystemDefault",
11368
11367
  value: function formatWithSystemDefault(dt, opts) {
@@ -11791,7 +11790,7 @@ function _array_like_to_array$j(arr, len) {
11791
11790
  function _array_with_holes$e(arr) {
11792
11791
  if (Array.isArray(arr)) return arr;
11793
11792
  }
11794
- function _define_property$A(obj, key, value) {
11793
+ function _define_property$z(obj, key, value) {
11795
11794
  if (key in obj) {
11796
11795
  Object.defineProperty(obj, key, {
11797
11796
  value: value,
@@ -11841,7 +11840,7 @@ function _object_spread$m(target) {
11841
11840
  }));
11842
11841
  }
11843
11842
  ownKeys.forEach(function(key) {
11844
- _define_property$A(target, key, source[key]);
11843
+ _define_property$z(target, key, source[key]);
11845
11844
  });
11846
11845
  }
11847
11846
  return target;
@@ -12176,12 +12175,12 @@ function _array_like_to_array$i(arr, len) {
12176
12175
  function _array_with_holes$d(arr) {
12177
12176
  if (Array.isArray(arr)) return arr;
12178
12177
  }
12179
- function _class_call_check$C(instance, Constructor) {
12178
+ function _class_call_check$B(instance, Constructor) {
12180
12179
  if (!(instance instanceof Constructor)) {
12181
12180
  throw new TypeError("Cannot call a class as a function");
12182
12181
  }
12183
12182
  }
12184
- function _defineProperties$p(target, props) {
12183
+ function _defineProperties$o(target, props) {
12185
12184
  for(var i = 0; i < props.length; i++){
12186
12185
  var descriptor = props[i];
12187
12186
  descriptor.enumerable = descriptor.enumerable || false;
@@ -12190,12 +12189,12 @@ function _defineProperties$p(target, props) {
12190
12189
  Object.defineProperty(target, descriptor.key, descriptor);
12191
12190
  }
12192
12191
  }
12193
- function _create_class$p(Constructor, protoProps, staticProps) {
12194
- if (protoProps) _defineProperties$p(Constructor.prototype, protoProps);
12195
- if (staticProps) _defineProperties$p(Constructor, staticProps);
12192
+ function _create_class$o(Constructor, protoProps, staticProps) {
12193
+ if (protoProps) _defineProperties$o(Constructor.prototype, protoProps);
12194
+ if (staticProps) _defineProperties$o(Constructor, staticProps);
12196
12195
  return Constructor;
12197
12196
  }
12198
- function _define_property$z(obj, key, value) {
12197
+ function _define_property$y(obj, key, value) {
12199
12198
  if (key in obj) {
12200
12199
  Object.defineProperty(obj, key, {
12201
12200
  value: value,
@@ -12252,7 +12251,7 @@ function _object_spread$l(target) {
12252
12251
  }));
12253
12252
  }
12254
12253
  ownKeys.forEach(function(key) {
12255
- _define_property$z(target, key, source[key]);
12254
+ _define_property$y(target, key, source[key]);
12256
12255
  });
12257
12256
  }
12258
12257
  return target;
@@ -12511,7 +12510,7 @@ function removeZeroes(vals) {
12511
12510
  }
12512
12511
  var Duration = /*#__PURE__*/ function() {
12513
12512
  function Duration(config) {
12514
- _class_call_check$C(this, Duration);
12513
+ _class_call_check$B(this, Duration);
12515
12514
  var accurate = config.conversionAccuracy === "longterm" || false;
12516
12515
  var matrix = accurate ? accurateMatrix : casualMatrix;
12517
12516
  if (config.matrix) {
@@ -12536,7 +12535,7 @@ var Duration = /*#__PURE__*/ function() {
12536
12535
  * @access private
12537
12536
  */ this.isLuxonDuration = true;
12538
12537
  }
12539
- _create_class$p(Duration, [
12538
+ _create_class$o(Duration, [
12540
12539
  {
12541
12540
  key: "locale",
12542
12541
  get: /**
@@ -13408,12 +13407,12 @@ function _array_with_holes$c(arr) {
13408
13407
  function _array_without_holes$a(arr) {
13409
13408
  if (Array.isArray(arr)) return _array_like_to_array$h(arr);
13410
13409
  }
13411
- function _class_call_check$B(instance, Constructor) {
13410
+ function _class_call_check$A(instance, Constructor) {
13412
13411
  if (!(instance instanceof Constructor)) {
13413
13412
  throw new TypeError("Cannot call a class as a function");
13414
13413
  }
13415
13414
  }
13416
- function _defineProperties$o(target, props) {
13415
+ function _defineProperties$n(target, props) {
13417
13416
  for(var i = 0; i < props.length; i++){
13418
13417
  var descriptor = props[i];
13419
13418
  descriptor.enumerable = descriptor.enumerable || false;
@@ -13422,9 +13421,9 @@ function _defineProperties$o(target, props) {
13422
13421
  Object.defineProperty(target, descriptor.key, descriptor);
13423
13422
  }
13424
13423
  }
13425
- function _create_class$o(Constructor, protoProps, staticProps) {
13426
- if (protoProps) _defineProperties$o(Constructor.prototype, protoProps);
13427
- if (staticProps) _defineProperties$o(Constructor, staticProps);
13424
+ function _create_class$n(Constructor, protoProps, staticProps) {
13425
+ if (protoProps) _defineProperties$n(Constructor.prototype, protoProps);
13426
+ if (staticProps) _defineProperties$n(Constructor, staticProps);
13428
13427
  return Constructor;
13429
13428
  }
13430
13429
  function _instanceof$9(left, right) {
@@ -13496,7 +13495,7 @@ function validateStartEnd(start, end) {
13496
13495
  }
13497
13496
  var Interval = /*#__PURE__*/ function() {
13498
13497
  function Interval(config) {
13499
- _class_call_check$B(this, Interval);
13498
+ _class_call_check$A(this, Interval);
13500
13499
  /**
13501
13500
  * @access private
13502
13501
  */ this.s = config.start;
@@ -13510,7 +13509,7 @@ var Interval = /*#__PURE__*/ function() {
13510
13509
  * @access private
13511
13510
  */ this.isLuxonInterval = true;
13512
13511
  }
13513
- _create_class$o(Interval, [
13512
+ _create_class$n(Interval, [
13514
13513
  {
13515
13514
  key: "start",
13516
13515
  get: /**
@@ -14185,12 +14184,12 @@ var Interval = /*#__PURE__*/ function() {
14185
14184
  return Interval;
14186
14185
  }();
14187
14186
 
14188
- function _class_call_check$A(instance, Constructor) {
14187
+ function _class_call_check$z(instance, Constructor) {
14189
14188
  if (!(instance instanceof Constructor)) {
14190
14189
  throw new TypeError("Cannot call a class as a function");
14191
14190
  }
14192
14191
  }
14193
- function _defineProperties$n(target, props) {
14192
+ function _defineProperties$m(target, props) {
14194
14193
  for(var i = 0; i < props.length; i++){
14195
14194
  var descriptor = props[i];
14196
14195
  descriptor.enumerable = descriptor.enumerable || false;
@@ -14199,16 +14198,16 @@ function _defineProperties$n(target, props) {
14199
14198
  Object.defineProperty(target, descriptor.key, descriptor);
14200
14199
  }
14201
14200
  }
14202
- function _create_class$n(Constructor, protoProps, staticProps) {
14203
- if (protoProps) _defineProperties$n(Constructor.prototype, protoProps);
14204
- if (staticProps) _defineProperties$n(Constructor, staticProps);
14201
+ function _create_class$m(Constructor, protoProps, staticProps) {
14202
+ if (protoProps) _defineProperties$m(Constructor.prototype, protoProps);
14203
+ if (staticProps) _defineProperties$m(Constructor, staticProps);
14205
14204
  return Constructor;
14206
14205
  }
14207
14206
  var Info = /*#__PURE__*/ function() {
14208
14207
  function Info() {
14209
- _class_call_check$A(this, Info);
14208
+ _class_call_check$z(this, Info);
14210
14209
  }
14211
- _create_class$n(Info, null, [
14210
+ _create_class$m(Info, null, [
14212
14211
  {
14213
14212
  key: "hasDST",
14214
14213
  value: /**
@@ -14437,7 +14436,7 @@ function _array_with_holes$b(arr) {
14437
14436
  function _array_without_holes$9(arr) {
14438
14437
  if (Array.isArray(arr)) return _array_like_to_array$g(arr);
14439
14438
  }
14440
- function _define_property$y(obj, key, value) {
14439
+ function _define_property$x(obj, key, value) {
14441
14440
  if (key in obj) {
14442
14441
  Object.defineProperty(obj, key, {
14443
14442
  value: value,
@@ -14608,7 +14607,7 @@ function diff(earlier, later, units, opts) {
14608
14607
  });
14609
14608
  if (lowerOrderUnits.length === 0) {
14610
14609
  if (highWater < later) {
14611
- highWater = cursor.plus(_define_property$y({}, lowestOrder, 1));
14610
+ highWater = cursor.plus(_define_property$x({}, lowestOrder, 1));
14612
14611
  }
14613
14612
  if (highWater !== cursor) {
14614
14613
  results[lowestOrder] = (results[lowestOrder] || 0) + remainingMillis / (highWater - cursor);
@@ -15342,12 +15341,12 @@ function _array_like_to_array$d(arr, len) {
15342
15341
  function _array_with_holes$8(arr) {
15343
15342
  if (Array.isArray(arr)) return arr;
15344
15343
  }
15345
- function _class_call_check$z(instance, Constructor) {
15344
+ function _class_call_check$y(instance, Constructor) {
15346
15345
  if (!(instance instanceof Constructor)) {
15347
15346
  throw new TypeError("Cannot call a class as a function");
15348
15347
  }
15349
15348
  }
15350
- function _defineProperties$m(target, props) {
15349
+ function _defineProperties$l(target, props) {
15351
15350
  for(var i = 0; i < props.length; i++){
15352
15351
  var descriptor = props[i];
15353
15352
  descriptor.enumerable = descriptor.enumerable || false;
@@ -15356,12 +15355,12 @@ function _defineProperties$m(target, props) {
15356
15355
  Object.defineProperty(target, descriptor.key, descriptor);
15357
15356
  }
15358
15357
  }
15359
- function _create_class$m(Constructor, protoProps, staticProps) {
15360
- if (protoProps) _defineProperties$m(Constructor.prototype, protoProps);
15361
- if (staticProps) _defineProperties$m(Constructor, staticProps);
15358
+ function _create_class$l(Constructor, protoProps, staticProps) {
15359
+ if (protoProps) _defineProperties$l(Constructor.prototype, protoProps);
15360
+ if (staticProps) _defineProperties$l(Constructor, staticProps);
15362
15361
  return Constructor;
15363
15362
  }
15364
- function _define_property$x(obj, key, value) {
15363
+ function _define_property$w(obj, key, value) {
15365
15364
  if (key in obj) {
15366
15365
  Object.defineProperty(obj, key, {
15367
15366
  value: value,
@@ -15418,7 +15417,7 @@ function _object_spread$k(target) {
15418
15417
  }));
15419
15418
  }
15420
15419
  ownKeys.forEach(function(key) {
15421
- _define_property$x(target, key, source[key]);
15420
+ _define_property$w(target, key, source[key]);
15422
15421
  });
15423
15422
  }
15424
15423
  return target;
@@ -15849,7 +15848,7 @@ function lastOpts(argList) {
15849
15848
  }
15850
15849
  var DateTime = /*#__PURE__*/ function() {
15851
15850
  function DateTime(config) {
15852
- _class_call_check$z(this, DateTime);
15851
+ _class_call_check$y(this, DateTime);
15853
15852
  var zone = config.zone || Settings.defaultZone;
15854
15853
  var invalid = config.invalid || (Number.isNaN(config.ts) ? new Invalid("invalid input") : null) || (!zone.isValid ? unsupportedZone(zone) : null);
15855
15854
  /**
@@ -15897,7 +15896,7 @@ var DateTime = /*#__PURE__*/ function() {
15897
15896
  * @access private
15898
15897
  */ this.isLuxonDateTime = true;
15899
15898
  }
15900
- _create_class$m(DateTime, [
15899
+ _create_class$l(DateTime, [
15901
15900
  {
15902
15901
  // INFO
15903
15902
  /**
@@ -16635,7 +16634,7 @@ var DateTime = /*#__PURE__*/ function() {
16635
16634
  * @return {DateTime}
16636
16635
  */ key: "endOf",
16637
16636
  value: function endOf(unit, opts) {
16638
- return this.isValid ? this.plus(_define_property$x({}, unit, 1)).startOf(unit, opts).minus(1) : this;
16637
+ return this.isValid ? this.plus(_define_property$w({}, unit, 1)).startOf(unit, opts).minus(1) : this;
16639
16638
  }
16640
16639
  },
16641
16640
  {
@@ -17908,12 +17907,12 @@ function _assert_this_initialized$k(self) {
17908
17907
  }
17909
17908
  return self;
17910
17909
  }
17911
- function _class_call_check$y(instance, Constructor) {
17910
+ function _class_call_check$x(instance, Constructor) {
17912
17911
  if (!(instance instanceof Constructor)) {
17913
17912
  throw new TypeError("Cannot call a class as a function");
17914
17913
  }
17915
17914
  }
17916
- function _defineProperties$l(target, props) {
17915
+ function _defineProperties$k(target, props) {
17917
17916
  for(var i = 0; i < props.length; i++){
17918
17917
  var descriptor = props[i];
17919
17918
  descriptor.enumerable = descriptor.enumerable || false;
@@ -17922,9 +17921,9 @@ function _defineProperties$l(target, props) {
17922
17921
  Object.defineProperty(target, descriptor.key, descriptor);
17923
17922
  }
17924
17923
  }
17925
- function _create_class$l(Constructor, protoProps, staticProps) {
17926
- if (protoProps) _defineProperties$l(Constructor.prototype, protoProps);
17927
- if (staticProps) _defineProperties$l(Constructor, staticProps);
17924
+ function _create_class$k(Constructor, protoProps, staticProps) {
17925
+ if (protoProps) _defineProperties$k(Constructor.prototype, protoProps);
17926
+ if (staticProps) _defineProperties$k(Constructor, staticProps);
17928
17927
  return Constructor;
17929
17928
  }
17930
17929
  function _get_prototype_of$k(o) {
@@ -18035,7 +18034,7 @@ function _create_super$k(Derived) {
18035
18034
  var DefaultBufferLength = 1024;
18036
18035
  var nextPropID = 0;
18037
18036
  var Range$1 = function Range(from, to) {
18038
- _class_call_check$y(this, Range);
18037
+ _class_call_check$x(this, Range);
18039
18038
  this.from = from;
18040
18039
  this.to = to;
18041
18040
  };
@@ -18046,14 +18045,14 @@ class represent prop names.
18046
18045
  */ var NodeProp = /*#__PURE__*/ function() {
18047
18046
  function NodeProp() {
18048
18047
  var config = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
18049
- _class_call_check$y(this, NodeProp);
18048
+ _class_call_check$x(this, NodeProp);
18050
18049
  this.id = nextPropID++;
18051
18050
  this.perNode = !!config.perNode;
18052
18051
  this.deserialize = config.deserialize || function() {
18053
18052
  throw new Error("This node type doesn't define a deserialize function");
18054
18053
  };
18055
18054
  }
18056
- _create_class$l(NodeProp, [
18055
+ _create_class$k(NodeProp, [
18057
18056
  {
18058
18057
  /**
18059
18058
  This is meant to be used with
@@ -18164,12 +18163,12 @@ represented by another tree.
18164
18163
  */ overlay, /**
18165
18164
  The parser used to create this subtree.
18166
18165
  */ parser) {
18167
- _class_call_check$y(this, MountedTree);
18166
+ _class_call_check$x(this, MountedTree);
18168
18167
  this.tree = tree;
18169
18168
  this.overlay = overlay;
18170
18169
  this.parser = parser;
18171
18170
  }
18172
- _create_class$l(MountedTree, null, [
18171
+ _create_class$k(MountedTree, null, [
18173
18172
  {
18174
18173
  key: "get",
18175
18174
  value: /**
@@ -18199,13 +18198,13 @@ Each node in a syntax tree has a node type associated with it.
18199
18198
  var /**
18200
18199
  @internal
18201
18200
  */ flags = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0;
18202
- _class_call_check$y(this, NodeType);
18201
+ _class_call_check$x(this, NodeType);
18203
18202
  this.name = name;
18204
18203
  this.props = props;
18205
18204
  this.id = id;
18206
18205
  this.flags = flags;
18207
18206
  }
18208
- _create_class$l(NodeType, [
18207
+ _create_class$k(NodeType, [
18209
18208
  {
18210
18209
  /**
18211
18210
  Retrieves a node prop for this type. Will return `undefined` if
@@ -18355,11 +18354,11 @@ types in it, so that the ids fit into 16-bit typed array slots.
18355
18354
  function NodeSet(/**
18356
18355
  The node types in this set, by id.
18357
18356
  */ types) {
18358
- _class_call_check$y(this, NodeSet);
18357
+ _class_call_check$x(this, NodeSet);
18359
18358
  this.types = types;
18360
18359
  for(var i = 0; i < types.length; i++)if (types[i].id != i) throw new RangeError("Node type ids should correspond to array positions when creating a node set");
18361
18360
  }
18362
- _create_class$l(NodeSet, [
18361
+ _create_class$k(NodeSet, [
18363
18362
  {
18364
18363
  /**
18365
18364
  Create a copy of this set with some node properties added. The
@@ -18478,7 +18477,7 @@ move around to adjacent nodes.
18478
18477
  */ length, /**
18479
18478
  Per-node [node props](#common.NodeProp) to associate with this node.
18480
18479
  */ props) {
18481
- _class_call_check$y(this, Tree);
18480
+ _class_call_check$x(this, Tree);
18482
18481
  this.type = type;
18483
18482
  this.children = children;
18484
18483
  this.positions = positions;
@@ -18510,7 +18509,7 @@ move around to adjacent nodes.
18510
18509
  }
18511
18510
  }
18512
18511
  }
18513
- _create_class$l(Tree, [
18512
+ _create_class$k(Tree, [
18514
18513
  {
18515
18514
  /**
18516
18515
  @internal
@@ -18712,11 +18711,11 @@ The empty tree
18712
18711
  */ Tree.empty = new Tree(NodeType.none, [], [], 0);
18713
18712
  var FlatBufferCursor = /*#__PURE__*/ function() {
18714
18713
  function FlatBufferCursor(buffer, index) {
18715
- _class_call_check$y(this, FlatBufferCursor);
18714
+ _class_call_check$x(this, FlatBufferCursor);
18716
18715
  this.buffer = buffer;
18717
18716
  this.index = index;
18718
18717
  }
18719
- _create_class$l(FlatBufferCursor, [
18718
+ _create_class$k(FlatBufferCursor, [
18720
18719
  {
18721
18720
  key: "id",
18722
18721
  get: function get() {
@@ -18775,12 +18774,12 @@ children belong to it).
18775
18774
  */ length, /**
18776
18775
  The node set used in this buffer.
18777
18776
  */ set) {
18778
- _class_call_check$y(this, TreeBuffer);
18777
+ _class_call_check$x(this, TreeBuffer);
18779
18778
  this.buffer = buffer;
18780
18779
  this.length = length;
18781
18780
  this.set = set;
18782
18781
  }
18783
- _create_class$l(TreeBuffer, [
18782
+ _create_class$k(TreeBuffer, [
18784
18783
  {
18785
18784
  key: "type",
18786
18785
  get: /**
@@ -18892,9 +18891,9 @@ function resolveNode(node, pos, side, overlays) {
18892
18891
  }
18893
18892
  var BaseNode = /*#__PURE__*/ function() {
18894
18893
  function BaseNode() {
18895
- _class_call_check$y(this, BaseNode);
18894
+ _class_call_check$x(this, BaseNode);
18896
18895
  }
18897
- _create_class$l(BaseNode, [
18896
+ _create_class$k(BaseNode, [
18898
18897
  {
18899
18898
  key: "cursor",
18900
18899
  value: function cursor() {
@@ -18974,7 +18973,7 @@ var TreeNode = /*#__PURE__*/ function(BaseNode) {
18974
18973
  var _super = _create_super$k(TreeNode);
18975
18974
  function TreeNode(_tree, from, // Index in parent node, set to -1 if the node is not a direct child of _parent.node (overlay)
18976
18975
  index, _parent) {
18977
- _class_call_check$y(this, TreeNode);
18976
+ _class_call_check$x(this, TreeNode);
18978
18977
  var _this;
18979
18978
  _this = _super.call(this);
18980
18979
  _this._tree = _tree;
@@ -18983,7 +18982,7 @@ var TreeNode = /*#__PURE__*/ function(BaseNode) {
18983
18982
  _this._parent = _parent;
18984
18983
  return _this;
18985
18984
  }
18986
- _create_class$l(TreeNode, [
18985
+ _create_class$k(TreeNode, [
18987
18986
  {
18988
18987
  key: "type",
18989
18988
  get: function get() {
@@ -19158,7 +19157,7 @@ function matchNodeContext(node, context) {
19158
19157
  return true;
19159
19158
  }
19160
19159
  var BufferContext = function BufferContext(parent, buffer, index, start) {
19161
- _class_call_check$y(this, BufferContext);
19160
+ _class_call_check$x(this, BufferContext);
19162
19161
  this.parent = parent;
19163
19162
  this.buffer = buffer;
19164
19163
  this.index = index;
@@ -19168,7 +19167,7 @@ var BufferNode = /*#__PURE__*/ function(BaseNode) {
19168
19167
  _inherits$k(BufferNode, BaseNode);
19169
19168
  var _super = _create_super$k(BufferNode);
19170
19169
  function BufferNode(context, _parent, index) {
19171
- _class_call_check$y(this, BufferNode);
19170
+ _class_call_check$x(this, BufferNode);
19172
19171
  var _this;
19173
19172
  _this = _super.call(this);
19174
19173
  _this.context = context;
@@ -19177,7 +19176,7 @@ var BufferNode = /*#__PURE__*/ function(BaseNode) {
19177
19176
  _this.type = context.buffer.set.types[context.buffer.buffer[index]];
19178
19177
  return _this;
19179
19178
  }
19180
- _create_class$l(BufferNode, [
19179
+ _create_class$k(BufferNode, [
19181
19180
  {
19182
19181
  key: "name",
19183
19182
  get: function get() {
@@ -19317,11 +19316,11 @@ function iterStack(heads) {
19317
19316
  }
19318
19317
  var StackIterator = /*#__PURE__*/ function() {
19319
19318
  function StackIterator(heads, node) {
19320
- _class_call_check$y(this, StackIterator);
19319
+ _class_call_check$x(this, StackIterator);
19321
19320
  this.heads = heads;
19322
19321
  this.node = node;
19323
19322
  }
19324
- _create_class$l(StackIterator, [
19323
+ _create_class$k(StackIterator, [
19325
19324
  {
19326
19325
  key: "next",
19327
19326
  get: function get() {
@@ -19361,7 +19360,7 @@ allows you to move to adjacent nodes.
19361
19360
  var /**
19362
19361
  @internal
19363
19362
  */ mode = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
19364
- _class_call_check$y(this, TreeCursor);
19363
+ _class_call_check$x(this, TreeCursor);
19365
19364
  this.mode = mode;
19366
19365
  /**
19367
19366
  @internal
@@ -19381,7 +19380,7 @@ allows you to move to adjacent nodes.
19381
19380
  this.yieldBuf(node.index);
19382
19381
  }
19383
19382
  }
19384
- _create_class$l(TreeCursor, [
19383
+ _create_class$k(TreeCursor, [
19385
19384
  {
19386
19385
  key: "name",
19387
19386
  get: /**
@@ -20001,9 +20000,9 @@ mkTree) {
20001
20000
  A superclass that parsers should extend.
20002
20001
  */ var Parser = /*#__PURE__*/ function() {
20003
20002
  function Parser() {
20004
- _class_call_check$y(this, Parser);
20003
+ _class_call_check$x(this, Parser);
20005
20004
  }
20006
- _create_class$l(Parser, [
20005
+ _create_class$k(Parser, [
20007
20006
  {
20008
20007
  /**
20009
20008
  Start a parse, returning a [partial parse](#common.PartialParse)
@@ -20044,10 +20043,10 @@ A superclass that parsers should extend.
20044
20043
  }();
20045
20044
  var StringInput = /*#__PURE__*/ function() {
20046
20045
  function StringInput(string) {
20047
- _class_call_check$y(this, StringInput);
20046
+ _class_call_check$x(this, StringInput);
20048
20047
  this.string = string;
20049
20048
  }
20050
- _create_class$l(StringInput, [
20049
+ _create_class$k(StringInput, [
20051
20050
  {
20052
20051
  key: "length",
20053
20052
  get: function get() {
@@ -20096,12 +20095,12 @@ function _assert_this_initialized$j(self) {
20096
20095
  }
20097
20096
  return self;
20098
20097
  }
20099
- function _class_call_check$x(instance, Constructor) {
20098
+ function _class_call_check$w(instance, Constructor) {
20100
20099
  if (!(instance instanceof Constructor)) {
20101
20100
  throw new TypeError("Cannot call a class as a function");
20102
20101
  }
20103
20102
  }
20104
- function _defineProperties$k(target, props) {
20103
+ function _defineProperties$j(target, props) {
20105
20104
  for(var i = 0; i < props.length; i++){
20106
20105
  var descriptor = props[i];
20107
20106
  descriptor.enumerable = descriptor.enumerable || false;
@@ -20110,9 +20109,9 @@ function _defineProperties$k(target, props) {
20110
20109
  Object.defineProperty(target, descriptor.key, descriptor);
20111
20110
  }
20112
20111
  }
20113
- function _create_class$k(Constructor, protoProps, staticProps) {
20114
- if (protoProps) _defineProperties$k(Constructor.prototype, protoProps);
20115
- if (staticProps) _defineProperties$k(Constructor, staticProps);
20112
+ function _create_class$j(Constructor, protoProps, staticProps) {
20113
+ if (protoProps) _defineProperties$j(Constructor.prototype, protoProps);
20114
+ if (staticProps) _defineProperties$j(Constructor, staticProps);
20116
20115
  return Constructor;
20117
20116
  }
20118
20117
  function _get_prototype_of$j(o) {
@@ -20278,7 +20277,7 @@ about the parse state.
20278
20277
  /**
20279
20278
  @internal
20280
20279
  */ parent = arguments.length > 10 ? arguments[10] : void 0;
20281
- _class_call_check$x(this, Stack);
20280
+ _class_call_check$w(this, Stack);
20282
20281
  this.p = p;
20283
20282
  this.stack = stack;
20284
20283
  this.state = state;
@@ -20291,7 +20290,7 @@ about the parse state.
20291
20290
  this.lookAhead = lookAhead;
20292
20291
  this.parent = parent;
20293
20292
  }
20294
- _create_class$k(Stack, [
20293
+ _create_class$j(Stack, [
20295
20294
  {
20296
20295
  /**
20297
20296
  @internal
@@ -20757,7 +20756,7 @@ about the parse state.
20757
20756
  return Stack;
20758
20757
  }();
20759
20758
  var StackContext = function StackContext(tracker, context) {
20760
- _class_call_check$x(this, StackContext);
20759
+ _class_call_check$w(this, StackContext);
20761
20760
  this.tracker = tracker;
20762
20761
  this.context = context;
20763
20762
  this.hash = tracker.strict ? tracker.hash(context) : 0;
@@ -20766,13 +20765,13 @@ var StackContext = function StackContext(tracker, context) {
20766
20765
  // an entire stack
20767
20766
  var SimulatedStack = /*#__PURE__*/ function() {
20768
20767
  function SimulatedStack(start) {
20769
- _class_call_check$x(this, SimulatedStack);
20768
+ _class_call_check$w(this, SimulatedStack);
20770
20769
  this.start = start;
20771
20770
  this.state = start.state;
20772
20771
  this.stack = start.stack;
20773
20772
  this.base = this.stack.length;
20774
20773
  }
20775
- _create_class$k(SimulatedStack, [
20774
+ _create_class$j(SimulatedStack, [
20776
20775
  {
20777
20776
  key: "reduce",
20778
20777
  value: function reduce(action) {
@@ -20795,14 +20794,14 @@ var SimulatedStack = /*#__PURE__*/ function() {
20795
20794
  // the parent-stack-walking necessary to read the nodes.
20796
20795
  var StackBufferCursor = /*#__PURE__*/ function() {
20797
20796
  function StackBufferCursor(stack, pos, index) {
20798
- _class_call_check$x(this, StackBufferCursor);
20797
+ _class_call_check$w(this, StackBufferCursor);
20799
20798
  this.stack = stack;
20800
20799
  this.pos = pos;
20801
20800
  this.index = index;
20802
20801
  this.buffer = stack.buffer;
20803
20802
  if (this.index == 0) this.maybeNext();
20804
20803
  }
20805
- _create_class$k(StackBufferCursor, [
20804
+ _create_class$j(StackBufferCursor, [
20806
20805
  {
20807
20806
  key: "maybeNext",
20808
20807
  value: function maybeNext() {
@@ -20894,7 +20893,7 @@ function decodeArray(input) {
20894
20893
  return array;
20895
20894
  }
20896
20895
  var CachedToken = function CachedToken() {
20897
- _class_call_check$x(this, CachedToken);
20896
+ _class_call_check$w(this, CachedToken);
20898
20897
  this.start = -1;
20899
20898
  this.value = -1;
20900
20899
  this.end = -1;
@@ -20915,7 +20914,7 @@ characters, tracking lookahead and hiding the complexity of
20915
20914
  */ input, /**
20916
20915
  @internal
20917
20916
  */ ranges) {
20918
- _class_call_check$x(this, InputStream);
20917
+ _class_call_check$w(this, InputStream);
20919
20918
  this.input = input;
20920
20919
  this.ranges = ranges;
20921
20920
  /**
@@ -20941,7 +20940,7 @@ characters, tracking lookahead and hiding the complexity of
20941
20940
  this.end = ranges[ranges.length - 1].to;
20942
20941
  this.readNext();
20943
20942
  }
20944
- _create_class$k(InputStream, [
20943
+ _create_class$j(InputStream, [
20945
20944
  {
20946
20945
  /**
20947
20946
  @internal
@@ -21182,11 +21181,11 @@ characters, tracking lookahead and hiding the complexity of
21182
21181
  @internal
21183
21182
  */ var TokenGroup = /*#__PURE__*/ function() {
21184
21183
  function TokenGroup(data, id) {
21185
- _class_call_check$x(this, TokenGroup);
21184
+ _class_call_check$w(this, TokenGroup);
21186
21185
  this.data = data;
21187
21186
  this.id = id;
21188
21187
  }
21189
- _create_class$k(TokenGroup, [
21188
+ _create_class$j(TokenGroup, [
21190
21189
  {
21191
21190
  key: "token",
21192
21191
  value: function token(input, stack) {
@@ -21206,7 +21205,7 @@ an instance of this class.
21206
21205
  @internal
21207
21206
  */ token) {
21208
21207
  var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
21209
- _class_call_check$x(this, ExternalTokenizer);
21208
+ _class_call_check$w(this, ExternalTokenizer);
21210
21209
  this.token = token;
21211
21210
  this.contextual = !!options.contextual;
21212
21211
  this.fallback = !!options.fallback;
@@ -21293,7 +21292,7 @@ function cutAt(tree, pos, side) {
21293
21292
  }
21294
21293
  var FragmentCursor = /*#__PURE__*/ function() {
21295
21294
  function FragmentCursor(fragments, nodeSet) {
21296
- _class_call_check$x(this, FragmentCursor);
21295
+ _class_call_check$w(this, FragmentCursor);
21297
21296
  this.fragments = fragments;
21298
21297
  this.nodeSet = nodeSet;
21299
21298
  this.i = 0;
@@ -21305,7 +21304,7 @@ var FragmentCursor = /*#__PURE__*/ function() {
21305
21304
  this.index = [];
21306
21305
  this.nextFragment();
21307
21306
  }
21308
- _create_class$k(FragmentCursor, [
21307
+ _create_class$j(FragmentCursor, [
21309
21308
  {
21310
21309
  key: "nextFragment",
21311
21310
  value: function nextFragment() {
@@ -21380,7 +21379,7 @@ var FragmentCursor = /*#__PURE__*/ function() {
21380
21379
  }();
21381
21380
  var TokenCache = /*#__PURE__*/ function() {
21382
21381
  function TokenCache(parser, stream) {
21383
- _class_call_check$x(this, TokenCache);
21382
+ _class_call_check$w(this, TokenCache);
21384
21383
  this.stream = stream;
21385
21384
  this.tokens = [];
21386
21385
  this.mainToken = null;
@@ -21389,7 +21388,7 @@ var TokenCache = /*#__PURE__*/ function() {
21389
21388
  return new CachedToken;
21390
21389
  });
21391
21390
  }
21392
- _create_class$k(TokenCache, [
21391
+ _create_class$j(TokenCache, [
21393
21392
  {
21394
21393
  key: "getActions",
21395
21394
  value: function getActions(stack) {
@@ -21499,7 +21498,7 @@ var TokenCache = /*#__PURE__*/ function() {
21499
21498
  }();
21500
21499
  var Parse = /*#__PURE__*/ function() {
21501
21500
  function Parse(parser, input, fragments, ranges) {
21502
- _class_call_check$x(this, Parse);
21501
+ _class_call_check$w(this, Parse);
21503
21502
  this.parser = parser;
21504
21503
  this.input = input;
21505
21504
  this.ranges = ranges;
@@ -21520,7 +21519,7 @@ var Parse = /*#__PURE__*/ function() {
21520
21519
  ];
21521
21520
  this.fragments = fragments.length && this.stream.end - from > parser.bufferLength * 4 ? new FragmentCursor(fragments, parser.nodeSet) : null;
21522
21521
  }
21523
- _create_class$k(Parse, [
21522
+ _create_class$j(Parse, [
21524
21523
  {
21525
21524
  key: "parsedPos",
21526
21525
  get: function get() {
@@ -21800,12 +21799,12 @@ function pushStackDedup(stack, newStacks) {
21800
21799
  }
21801
21800
  var Dialect = /*#__PURE__*/ function() {
21802
21801
  function Dialect(source, flags, disabled) {
21803
- _class_call_check$x(this, Dialect);
21802
+ _class_call_check$w(this, Dialect);
21804
21803
  this.source = source;
21805
21804
  this.flags = flags;
21806
21805
  this.disabled = disabled;
21807
21806
  }
21808
- _create_class$k(Dialect, [
21807
+ _create_class$j(Dialect, [
21809
21808
  {
21810
21809
  key: "allows",
21811
21810
  value: function allows(term) {
@@ -21830,7 +21829,7 @@ on shift or reduce actions.
21830
21829
  The export used in a `@context` declaration should be of this
21831
21830
  type.
21832
21831
  */ var ContextTracker = function ContextTracker(spec) {
21833
- _class_call_check$x(this, ContextTracker);
21832
+ _class_call_check$w(this, ContextTracker);
21834
21833
  this.start = spec.start;
21835
21834
  this.shift = spec.shift || id;
21836
21835
  this.reduce = spec.reduce || id;
@@ -21849,7 +21848,7 @@ content with.
21849
21848
  var _super = _create_super$j(LRParser);
21850
21849
  function LRParser(spec) {
21851
21850
  var _this_nodeSet;
21852
- _class_call_check$x(this, LRParser);
21851
+ _class_call_check$w(this, LRParser);
21853
21852
  var _this;
21854
21853
  var setProp = function setProp(nodeID, prop, value) {
21855
21854
  nodeProps[nodeID].push([
@@ -21937,7 +21936,7 @@ content with.
21937
21936
  _this.top = _this.topRules[Object.keys(_this.topRules)[0]];
21938
21937
  return _this;
21939
21938
  }
21940
- _create_class$k(LRParser, [
21939
+ _create_class$j(LRParser, [
21941
21940
  {
21942
21941
  key: "createParse",
21943
21942
  value: function createParse(input, fragments, ranges) {
@@ -22249,12 +22248,12 @@ function getSpecializer(spec) {
22249
22248
  return spec.get;
22250
22249
  }
22251
22250
 
22252
- function _class_call_check$w(instance, Constructor) {
22251
+ function _class_call_check$v(instance, Constructor) {
22253
22252
  if (!(instance instanceof Constructor)) {
22254
22253
  throw new TypeError("Cannot call a class as a function");
22255
22254
  }
22256
22255
  }
22257
- function _defineProperties$j(target, props) {
22256
+ function _defineProperties$i(target, props) {
22258
22257
  for(var i = 0; i < props.length; i++){
22259
22258
  var descriptor = props[i];
22260
22259
  descriptor.enumerable = descriptor.enumerable || false;
@@ -22263,9 +22262,9 @@ function _defineProperties$j(target, props) {
22263
22262
  Object.defineProperty(target, descriptor.key, descriptor);
22264
22263
  }
22265
22264
  }
22266
- function _create_class$j(Constructor, protoProps, staticProps) {
22267
- if (protoProps) _defineProperties$j(Constructor.prototype, protoProps);
22268
- if (staticProps) _defineProperties$j(Constructor, staticProps);
22265
+ function _create_class$i(Constructor, protoProps, staticProps) {
22266
+ if (protoProps) _defineProperties$i(Constructor.prototype, protoProps);
22267
+ if (staticProps) _defineProperties$i(Constructor, staticProps);
22269
22268
  return Constructor;
22270
22269
  }
22271
22270
  var nextTagID = 0;
@@ -22297,7 +22296,7 @@ from standard tags to allow highlighters to fall back to those).
22297
22296
  */ base, /**
22298
22297
  The modifiers applied to this.base @internal
22299
22298
  */ modified) {
22300
- _class_call_check$w(this, Tag);
22299
+ _class_call_check$v(this, Tag);
22301
22300
  this.set = set;
22302
22301
  this.base = base;
22303
22302
  this.modified = modified;
@@ -22305,7 +22304,7 @@ from standard tags to allow highlighters to fall back to those).
22305
22304
  @internal
22306
22305
  */ this.id = nextTagID++;
22307
22306
  }
22308
- _create_class$j(Tag, null, [
22307
+ _create_class$i(Tag, null, [
22309
22308
  {
22310
22309
  key: "define",
22311
22310
  value: /**
@@ -22370,11 +22369,11 @@ from standard tags to allow highlighters to fall back to those).
22370
22369
  var nextModifierID = 0;
22371
22370
  var Modifier = /*#__PURE__*/ function() {
22372
22371
  function Modifier() {
22373
- _class_call_check$w(this, Modifier);
22372
+ _class_call_check$v(this, Modifier);
22374
22373
  this.instances = [];
22375
22374
  this.id = nextModifierID++;
22376
22375
  }
22377
- _create_class$j(Modifier, null, [
22376
+ _create_class$i(Modifier, null, [
22378
22377
  {
22379
22378
  key: "get",
22380
22379
  value: function get(base, mods) {
@@ -22574,13 +22573,13 @@ parser.withProps(
22574
22573
  var ruleNodeProp = new NodeProp();
22575
22574
  var Rule = /*#__PURE__*/ function() {
22576
22575
  function Rule(tags, mode, context, next) {
22577
- _class_call_check$w(this, Rule);
22576
+ _class_call_check$v(this, Rule);
22578
22577
  this.tags = tags;
22579
22578
  this.mode = mode;
22580
22579
  this.context = context;
22581
22580
  this.next = next;
22582
22581
  }
22583
- _create_class$j(Rule, [
22582
+ _create_class$i(Rule, [
22584
22583
  {
22585
22584
  key: "opaque",
22586
22585
  get: function get() {
@@ -23200,12 +23199,12 @@ function _array_with_holes$5(arr) {
23200
23199
  function _array_without_holes$6(arr) {
23201
23200
  if (Array.isArray(arr)) return _array_like_to_array$a(arr);
23202
23201
  }
23203
- function _class_call_check$v(instance, Constructor) {
23202
+ function _class_call_check$u(instance, Constructor) {
23204
23203
  if (!(instance instanceof Constructor)) {
23205
23204
  throw new TypeError("Cannot call a class as a function");
23206
23205
  }
23207
23206
  }
23208
- function _defineProperties$i(target, props) {
23207
+ function _defineProperties$h(target, props) {
23209
23208
  for(var i = 0; i < props.length; i++){
23210
23209
  var descriptor = props[i];
23211
23210
  descriptor.enumerable = descriptor.enumerable || false;
@@ -23214,12 +23213,12 @@ function _defineProperties$i(target, props) {
23214
23213
  Object.defineProperty(target, descriptor.key, descriptor);
23215
23214
  }
23216
23215
  }
23217
- function _create_class$i(Constructor, protoProps, staticProps) {
23218
- if (protoProps) _defineProperties$i(Constructor.prototype, protoProps);
23219
- if (staticProps) _defineProperties$i(Constructor, staticProps);
23216
+ function _create_class$h(Constructor, protoProps, staticProps) {
23217
+ if (protoProps) _defineProperties$h(Constructor.prototype, protoProps);
23218
+ if (staticProps) _defineProperties$h(Constructor, staticProps);
23220
23219
  return Constructor;
23221
23220
  }
23222
- function _define_property$w(obj, key, value) {
23221
+ function _define_property$v(obj, key, value) {
23223
23222
  if (key in obj) {
23224
23223
  Object.defineProperty(obj, key, {
23225
23224
  value: value,
@@ -23282,7 +23281,7 @@ function _object_spread$j(target) {
23282
23281
  }));
23283
23282
  }
23284
23283
  ownKeys.forEach(function(key) {
23285
- _define_property$w(target, key, source[key]);
23284
+ _define_property$v(target, key, source[key]);
23286
23285
  });
23287
23286
  }
23288
23287
  return target;
@@ -23499,14 +23498,14 @@ function indent(str, spaces) {
23499
23498
  var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
23500
23499
  // match is required
23501
23500
  if (!match) {
23502
- return nextMatch = nextMatch1, i = i1, tokens = tokens1, {
23501
+ return tokens = tokens1, i = i1, nextMatch = nextMatch1, {
23503
23502
  v: nextMatch1
23504
23503
  };
23505
23504
  }
23506
23505
  var token = match.token, offset = match.offset;
23507
23506
  i1 += offset;
23508
23507
  if (token === " ") {
23509
- return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
23508
+ return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
23510
23509
  }
23511
23510
  tokens1 = _to_consumable_array$6(tokens1).concat([
23512
23511
  token
@@ -23525,7 +23524,7 @@ function indent(str, spaces) {
23525
23524
  if (contextKeys.some(function(el) {
23526
23525
  return el.startsWith(name);
23527
23526
  })) {
23528
- return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
23527
+ return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
23529
23528
  }
23530
23529
  if (dateTimeIdentifiers.some(function(el) {
23531
23530
  return el === name;
@@ -23544,9 +23543,9 @@ function indent(str, spaces) {
23544
23543
  if (dateTimeIdentifiers.some(function(el) {
23545
23544
  return el.startsWith(name);
23546
23545
  })) {
23547
- return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
23546
+ return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
23548
23547
  }
23549
- return nextMatch = nextMatch1, i = i1, tokens = tokens1, {
23548
+ return tokens = tokens1, i = i1, nextMatch = nextMatch1, {
23550
23549
  v: nextMatch1
23551
23550
  };
23552
23551
  };
@@ -23558,7 +23557,7 @@ function indent(str, spaces) {
23558
23557
  }
23559
23558
  }
23560
23559
  var _obj;
23561
- var identifiersMap = (_obj = {}, _define_property$w(_obj, identifier, "identifier"), _define_property$w(_obj, nameIdentifier, "nameIdentifier"), _obj);
23560
+ var identifiersMap = (_obj = {}, _define_property$v(_obj, identifier, "identifier"), _define_property$v(_obj, nameIdentifier, "nameIdentifier"), _obj);
23562
23561
  var identifiers = new ExternalTokenizer(function(input, stack) {
23563
23562
  LOG_PARSE_DEBUG && console.log("%s: T <identifier | nameIdentifier>", input.pos);
23564
23563
  var nameMatch = parseName(input, stack.context);
@@ -23607,17 +23606,17 @@ var insertSemicolon = new ExternalTokenizer(function(input, stack) {
23607
23606
  }
23608
23607
  });
23609
23608
  var _obj1;
23610
- var prefixedContextStarts = (_obj1 = {}, _define_property$w(_obj1, functionInvocationStart, "FunctionInvocation"), _define_property$w(_obj1, filterExpressionStart, "FilterExpression"), _define_property$w(_obj1, pathExpressionStart, "PathExpression"), _obj1);
23609
+ var prefixedContextStarts = (_obj1 = {}, _define_property$v(_obj1, functionInvocationStart, "FunctionInvocation"), _define_property$v(_obj1, filterExpressionStart, "FilterExpression"), _define_property$v(_obj1, pathExpressionStart, "PathExpression"), _obj1);
23611
23610
  var _obj2;
23612
- var contextStarts = (_obj2 = {}, _define_property$w(_obj2, contextStart, "Context"), _define_property$w(_obj2, functionDefinitionStart, "FunctionDefinition"), _define_property$w(_obj2, forExpressionStart, "ForExpression"), _define_property$w(_obj2, listStart, "List"), _define_property$w(_obj2, ifExpressionStart, "IfExpression"), _define_property$w(_obj2, quantifiedExpressionStart, "QuantifiedExpression"), _obj2);
23611
+ var contextStarts = (_obj2 = {}, _define_property$v(_obj2, contextStart, "Context"), _define_property$v(_obj2, functionDefinitionStart, "FunctionDefinition"), _define_property$v(_obj2, forExpressionStart, "ForExpression"), _define_property$v(_obj2, listStart, "List"), _define_property$v(_obj2, ifExpressionStart, "IfExpression"), _define_property$v(_obj2, quantifiedExpressionStart, "QuantifiedExpression"), _obj2);
23613
23612
  var _obj3;
23614
- var contextEnds = (_obj3 = {}, _define_property$w(_obj3, Context, "Context"), _define_property$w(_obj3, FunctionDefinition, "FunctionDefinition"), _define_property$w(_obj3, ForExpression, "ForExpression"), _define_property$w(_obj3, List, "List"), _define_property$w(_obj3, IfExpression, "IfExpression"), _define_property$w(_obj3, QuantifiedExpression, "QuantifiedExpression"), _define_property$w(_obj3, PathExpression, "PathExpression"), _define_property$w(_obj3, FunctionInvocation, "FunctionInvocation"), _define_property$w(_obj3, FilterExpression, "FilterExpression"), _define_property$w(_obj3, ArithmeticExpression, "ArithmeticExpression"), _obj3);
23613
+ var contextEnds = (_obj3 = {}, _define_property$v(_obj3, Context, "Context"), _define_property$v(_obj3, FunctionDefinition, "FunctionDefinition"), _define_property$v(_obj3, ForExpression, "ForExpression"), _define_property$v(_obj3, List, "List"), _define_property$v(_obj3, IfExpression, "IfExpression"), _define_property$v(_obj3, QuantifiedExpression, "QuantifiedExpression"), _define_property$v(_obj3, PathExpression, "PathExpression"), _define_property$v(_obj3, FunctionInvocation, "FunctionInvocation"), _define_property$v(_obj3, FilterExpression, "FilterExpression"), _define_property$v(_obj3, ArithmeticExpression, "ArithmeticExpression"), _obj3);
23615
23614
  var ValueProducer = /*#__PURE__*/ function() {
23616
23615
  function ValueProducer(fn) {
23617
- _class_call_check$v(this, ValueProducer);
23616
+ _class_call_check$u(this, ValueProducer);
23618
23617
  this.fn = fn;
23619
23618
  }
23620
- _create_class$i(ValueProducer, [
23619
+ _create_class$h(ValueProducer, [
23621
23620
  {
23622
23621
  key: "get",
23623
23622
  value: function get(variables) {
@@ -23650,12 +23649,12 @@ var dateTimeIdentifiers = Object.keys(dateTimeLiterals);
23650
23649
  */ var VariableContext = /*#__PURE__*/ function() {
23651
23650
  function VariableContext() {
23652
23651
  var value = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
23653
- _class_call_check$v(this, VariableContext);
23652
+ _class_call_check$u(this, VariableContext);
23654
23653
  /**
23655
23654
  * @protected
23656
23655
  */ this.value = value;
23657
23656
  }
23658
- _create_class$i(VariableContext, [
23657
+ _create_class$h(VariableContext, [
23659
23658
  {
23660
23659
  /**
23661
23660
  * Return all defined keys of the context.
@@ -23696,7 +23695,7 @@ var dateTimeIdentifiers = Object.keys(dateTimeLiterals);
23696
23695
  */ key: "set",
23697
23696
  value: function set(key, value) {
23698
23697
  var constructor = /** @type { typeof VariableContext } */ this.constructor;
23699
- return constructor.of(_object_spread_props$9(_object_spread$j({}, this.value), _define_property$w({}, key, value)));
23698
+ return constructor.of(_object_spread_props$9(_object_spread$j({}, this.value), _define_property$v({}, key, value)));
23700
23699
  }
23701
23700
  }
23702
23701
  ], [
@@ -23745,7 +23744,7 @@ var dateTimeIdentifiers = Object.keys(dateTimeLiterals);
23745
23744
  var Variables = /*#__PURE__*/ function() {
23746
23745
  function Variables() {
23747
23746
  var _ref = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, _ref_name = _ref.name, name = _ref_name === void 0 ? "Expressions" : _ref_name, _ref_tokens = _ref.tokens, tokens = _ref_tokens === void 0 ? [] : _ref_tokens, _ref_children = _ref.children, children = _ref_children === void 0 ? [] : _ref_children, _ref_parent = _ref.parent, parent = _ref_parent === void 0 ? null : _ref_parent, _ref_context = _ref.context, context = _ref_context === void 0 ? null : _ref_context, _ref_value = _ref.value, value = _ref_value === void 0 ? null : _ref_value, _ref_raw = _ref.raw, raw = _ref_raw === void 0 ? null : _ref_raw;
23748
- _class_call_check$v(this, Variables);
23747
+ _class_call_check$u(this, Variables);
23749
23748
  this.name = name;
23750
23749
  this.tokens = tokens;
23751
23750
  this.children = children;
@@ -23754,7 +23753,7 @@ var Variables = /*#__PURE__*/ function() {
23754
23753
  this.value = value;
23755
23754
  this.raw = raw;
23756
23755
  }
23757
- _create_class$i(Variables, [
23756
+ _create_class$h(Variables, [
23758
23757
  {
23759
23758
  key: "enterScope",
23760
23759
  value: function enterScope(name) {
@@ -24380,7 +24379,7 @@ function _assert_this_initialized$i(self) {
24380
24379
  }
24381
24380
  return self;
24382
24381
  }
24383
- function _class_call_check$u(instance, Constructor) {
24382
+ function _class_call_check$t(instance, Constructor) {
24384
24383
  if (!(instance instanceof Constructor)) {
24385
24384
  throw new TypeError("Cannot call a class as a function");
24386
24385
  }
@@ -24402,7 +24401,7 @@ function _construct$2(Parent, args, Class) {
24402
24401
  }
24403
24402
  return _construct$2.apply(null, arguments);
24404
24403
  }
24405
- function _defineProperties$h(target, props) {
24404
+ function _defineProperties$g(target, props) {
24406
24405
  for(var i = 0; i < props.length; i++){
24407
24406
  var descriptor = props[i];
24408
24407
  descriptor.enumerable = descriptor.enumerable || false;
@@ -24411,12 +24410,12 @@ function _defineProperties$h(target, props) {
24411
24410
  Object.defineProperty(target, descriptor.key, descriptor);
24412
24411
  }
24413
24412
  }
24414
- function _create_class$h(Constructor, protoProps, staticProps) {
24415
- if (protoProps) _defineProperties$h(Constructor.prototype, protoProps);
24416
- if (staticProps) _defineProperties$h(Constructor, staticProps);
24413
+ function _create_class$g(Constructor, protoProps, staticProps) {
24414
+ if (protoProps) _defineProperties$g(Constructor.prototype, protoProps);
24415
+ if (staticProps) _defineProperties$g(Constructor, staticProps);
24417
24416
  return Constructor;
24418
24417
  }
24419
- function _define_property$v(obj, key, value) {
24418
+ function _define_property$u(obj, key, value) {
24420
24419
  if (key in obj) {
24421
24420
  Object.defineProperty(obj, key, {
24422
24421
  value: value,
@@ -24654,7 +24653,7 @@ function typeCast(obj, type) {
24654
24653
  return null;
24655
24654
  }
24656
24655
  var Range = function Range(props) {
24657
- _class_call_check$u(this, Range);
24656
+ _class_call_check$t(this, Range);
24658
24657
  Object.assign(this, props);
24659
24658
  };
24660
24659
  function isNumber(obj) {
@@ -24760,11 +24759,11 @@ function equals(a, b) {
24760
24759
  }
24761
24760
  var FunctionWrapper = /*#__PURE__*/ function() {
24762
24761
  function FunctionWrapper(fn, parameterNames) {
24763
- _class_call_check$u(this, FunctionWrapper);
24762
+ _class_call_check$t(this, FunctionWrapper);
24764
24763
  this.fn = fn;
24765
24764
  this.parameterNames = parameterNames;
24766
24765
  }
24767
- _create_class$h(FunctionWrapper, [
24766
+ _create_class$g(FunctionWrapper, [
24768
24767
  {
24769
24768
  key: "invoke",
24770
24769
  value: function invoke(contextOrArgs) {
@@ -25709,7 +25708,7 @@ var builtins = {
25709
25708
  if (key in context) {
25710
25709
  return FALSE;
25711
25710
  }
25712
- return Object.assign(Object.assign({}, context), _define_property$v({}, entry.key, entry.value));
25711
+ return Object.assign(Object.assign({}, context), _define_property$u({}, entry.key, entry.value));
25713
25712
  }, {});
25714
25713
  if (context === FALSE) {
25715
25714
  return null;
@@ -25762,7 +25761,7 @@ var builtins = {
25762
25761
  return null;
25763
25762
  }
25764
25763
  }
25765
- return Object.assign(Object.assign({}, context), _define_property$v({}, key, value));
25764
+ return Object.assign(Object.assign({}, context), _define_property$u({}, key, value));
25766
25765
  }
25767
25766
  function matches(a, b) {
25768
25767
  return a === b;
@@ -26098,7 +26097,7 @@ var SyntaxError$1 = /*#__PURE__*/ function(Error1) {
26098
26097
  _inherits$i(SyntaxError, Error1);
26099
26098
  var _super = _create_super$i(SyntaxError);
26100
26099
  function SyntaxError(message, details) {
26101
- _class_call_check$u(this, SyntaxError);
26100
+ _class_call_check$t(this, SyntaxError);
26102
26101
  var _this;
26103
26102
  _this = _super.call(this, message);
26104
26103
  Object.assign(_assert_this_initialized$i(_this), details);
@@ -26108,9 +26107,9 @@ var SyntaxError$1 = /*#__PURE__*/ function(Error1) {
26108
26107
  }(_wrap_native_super$2(Error));
26109
26108
  var Interpreter = /*#__PURE__*/ function() {
26110
26109
  function Interpreter() {
26111
- _class_call_check$u(this, Interpreter);
26110
+ _class_call_check$t(this, Interpreter);
26112
26111
  }
26113
- _create_class$h(Interpreter, [
26112
+ _create_class$g(Interpreter, [
26114
26113
  {
26115
26114
  key: "_buildExecutionTree",
26116
26115
  value: function _buildExecutionTree(tree, input) {
@@ -26450,7 +26449,7 @@ function evalNode(node, input, args) {
26450
26449
  return function(context) {
26451
26450
  return args.slice(1, -1).reduce(function(obj, arg) {
26452
26451
  var _arg = _sliced_to_array$4(arg(Object.assign(Object.assign({}, context), obj)), 2), key = _arg[0], value = _arg[1];
26453
- return Object.assign(Object.assign({}, obj), _define_property$v({}, key, value));
26452
+ return Object.assign(Object.assign({}, obj), _define_property$u({}, key, value));
26454
26453
  }, {});
26455
26454
  };
26456
26455
  case "FunctionBody":
@@ -26915,7 +26914,7 @@ function extractValue(context, prop, _target) {
26915
26914
  "range"
26916
26915
  ].includes(getType(target))) {
26917
26916
  return target.map(function(t) {
26918
- return _define_property$v({}, prop, t);
26917
+ return _define_property$u({}, prop, t);
26919
26918
  });
26920
26919
  }
26921
26920
  return null;
@@ -27521,12 +27520,12 @@ function _assert_this_initialized$h(self) {
27521
27520
  }
27522
27521
  return self;
27523
27522
  }
27524
- function _class_call_check$t(instance, Constructor) {
27523
+ function _class_call_check$s(instance, Constructor) {
27525
27524
  if (!(instance instanceof Constructor)) {
27526
27525
  throw new TypeError("Cannot call a class as a function");
27527
27526
  }
27528
27527
  }
27529
- function _defineProperties$g(target, props) {
27528
+ function _defineProperties$f(target, props) {
27530
27529
  for(var i = 0; i < props.length; i++){
27531
27530
  var descriptor = props[i];
27532
27531
  descriptor.enumerable = descriptor.enumerable || false;
@@ -27535,12 +27534,12 @@ function _defineProperties$g(target, props) {
27535
27534
  Object.defineProperty(target, descriptor.key, descriptor);
27536
27535
  }
27537
27536
  }
27538
- function _create_class$g(Constructor, protoProps, staticProps) {
27539
- if (protoProps) _defineProperties$g(Constructor.prototype, protoProps);
27540
- if (staticProps) _defineProperties$g(Constructor, staticProps);
27537
+ function _create_class$f(Constructor, protoProps, staticProps) {
27538
+ if (protoProps) _defineProperties$f(Constructor.prototype, protoProps);
27539
+ if (staticProps) _defineProperties$f(Constructor, staticProps);
27541
27540
  return Constructor;
27542
27541
  }
27543
- function _define_property$u(obj, key, value) {
27542
+ function _define_property$t(obj, key, value) {
27544
27543
  if (key in obj) {
27545
27544
  Object.defineProperty(obj, key, {
27546
27545
  value: value,
@@ -27622,11 +27621,11 @@ function _create_super$h(Derived) {
27622
27621
  }
27623
27622
  var TextDecodeTransformer = /*#__PURE__*/ function() {
27624
27623
  function TextDecodeTransformer() {
27625
- _class_call_check$t(this, TextDecodeTransformer);
27626
- _define_property$u(this, "decoder", void 0);
27624
+ _class_call_check$s(this, TextDecodeTransformer);
27625
+ _define_property$t(this, "decoder", void 0);
27627
27626
  this.decoder = new TextDecoder();
27628
27627
  }
27629
- _create_class$g(TextDecodeTransformer, [
27628
+ _create_class$f(TextDecodeTransformer, [
27630
27629
  {
27631
27630
  key: "transform",
27632
27631
  value: function transform(chunk, controller) {
@@ -27658,7 +27657,7 @@ var TextDecoderStreamPolyfill = /*#__PURE__*/ function(TransformStream) {
27658
27657
  _inherits$h(TextDecoderStreamPolyfill, TransformStream);
27659
27658
  var _super = _create_super$h(TextDecoderStreamPolyfill);
27660
27659
  function TextDecoderStreamPolyfill() {
27661
- _class_call_check$t(this, TextDecoderStreamPolyfill);
27660
+ _class_call_check$s(this, TextDecoderStreamPolyfill);
27662
27661
  return _super.call(this, new TextDecodeTransformer());
27663
27662
  }
27664
27663
  return TextDecoderStreamPolyfill;
@@ -27700,12 +27699,12 @@ function _async_to_generator$9(fn) {
27700
27699
  });
27701
27700
  };
27702
27701
  }
27703
- function _class_call_check$s(instance, Constructor) {
27702
+ function _class_call_check$r(instance, Constructor) {
27704
27703
  if (!(instance instanceof Constructor)) {
27705
27704
  throw new TypeError("Cannot call a class as a function");
27706
27705
  }
27707
27706
  }
27708
- function _defineProperties$f(target, props) {
27707
+ function _defineProperties$e(target, props) {
27709
27708
  for(var i = 0; i < props.length; i++){
27710
27709
  var descriptor = props[i];
27711
27710
  descriptor.enumerable = descriptor.enumerable || false;
@@ -27714,12 +27713,12 @@ function _defineProperties$f(target, props) {
27714
27713
  Object.defineProperty(target, descriptor.key, descriptor);
27715
27714
  }
27716
27715
  }
27717
- function _create_class$f(Constructor, protoProps, staticProps) {
27718
- if (protoProps) _defineProperties$f(Constructor.prototype, protoProps);
27719
- if (staticProps) _defineProperties$f(Constructor, staticProps);
27716
+ function _create_class$e(Constructor, protoProps, staticProps) {
27717
+ if (protoProps) _defineProperties$e(Constructor.prototype, protoProps);
27718
+ if (staticProps) _defineProperties$e(Constructor, staticProps);
27720
27719
  return Constructor;
27721
27720
  }
27722
- function _define_property$t(obj, key, value) {
27721
+ function _define_property$s(obj, key, value) {
27723
27722
  if (key in obj) {
27724
27723
  Object.defineProperty(obj, key, {
27725
27724
  value: value,
@@ -27889,9 +27888,9 @@ function _ts_generator$a(thisArg, body) {
27889
27888
  }
27890
27889
  var JSONTransformer = /*#__PURE__*/ function() {
27891
27890
  function JSONTransformer() {
27892
- _class_call_check$s(this, JSONTransformer);
27891
+ _class_call_check$r(this, JSONTransformer);
27893
27892
  }
27894
- _create_class$f(JSONTransformer, [
27893
+ _create_class$e(JSONTransformer, [
27895
27894
  {
27896
27895
  key: "transform",
27897
27896
  value: function transform(obj, controller) {
@@ -27924,22 +27923,22 @@ var JSONStringifyStream = /*#__PURE__*/ function(TransformStream) {
27924
27923
  _inherits$g(JSONStringifyStream, TransformStream);
27925
27924
  var _super = _create_super$g(JSONStringifyStream);
27926
27925
  function JSONStringifyStream() {
27927
- _class_call_check$s(this, JSONStringifyStream);
27926
+ _class_call_check$r(this, JSONStringifyStream);
27928
27927
  return _super.call(this, new JSONTransformer());
27929
27928
  }
27930
27929
  return JSONStringifyStream;
27931
27930
  }(TransformStream);
27932
27931
  var TypeTransformer = /*#__PURE__*/ function() {
27933
27932
  function TypeTransformer(transformFn, doneCallback) {
27934
- _class_call_check$s(this, TypeTransformer);
27935
- _define_property$t(this, "buffer", void 0);
27936
- _define_property$t(this, "doneCallback", void 0);
27937
- _define_property$t(this, "transformFn", void 0);
27933
+ _class_call_check$r(this, TypeTransformer);
27934
+ _define_property$s(this, "buffer", void 0);
27935
+ _define_property$s(this, "doneCallback", void 0);
27936
+ _define_property$s(this, "transformFn", void 0);
27938
27937
  this.transformFn = transformFn;
27939
27938
  this.doneCallback = doneCallback;
27940
27939
  this.buffer = doneCallback ? [] : undefined;
27941
27940
  }
27942
- _create_class$f(TypeTransformer, [
27941
+ _create_class$e(TypeTransformer, [
27943
27942
  {
27944
27943
  key: "transform",
27945
27944
  value: function transform(obj, controller) {
@@ -27991,7 +27990,7 @@ var RespTransformStream = /*#__PURE__*/ function(TransformStream) {
27991
27990
  _inherits$g(RespTransformStream, TransformStream);
27992
27991
  var _super = _create_super$g(RespTransformStream);
27993
27992
  function RespTransformStream(transformFn, doneCallback) {
27994
- _class_call_check$s(this, RespTransformStream);
27993
+ _class_call_check$r(this, RespTransformStream);
27995
27994
  return _super.call(this, new TypeTransformer(transformFn, doneCallback));
27996
27995
  }
27997
27996
  return RespTransformStream;
@@ -28034,7 +28033,7 @@ function _async_to_generator$8(fn) {
28034
28033
  });
28035
28034
  };
28036
28035
  }
28037
- function _define_property$s(obj, key, value) {
28036
+ function _define_property$r(obj, key, value) {
28038
28037
  if (key in obj) {
28039
28038
  Object.defineProperty(obj, key, {
28040
28039
  value: value,
@@ -28057,7 +28056,7 @@ function _object_spread$i(target) {
28057
28056
  }));
28058
28057
  }
28059
28058
  ownKeys.forEach(function(key) {
28060
- _define_property$s(target, key, source[key]);
28059
+ _define_property$r(target, key, source[key]);
28061
28060
  });
28062
28061
  }
28063
28062
  return target;
@@ -28253,12 +28252,12 @@ var apiCall = function() {
28253
28252
  }();
28254
28253
 
28255
28254
  // eslint-disable-next-line @typescript-eslint/naming-convention
28256
- function _class_call_check$r(instance, Constructor) {
28255
+ function _class_call_check$q(instance, Constructor) {
28257
28256
  if (!(instance instanceof Constructor)) {
28258
28257
  throw new TypeError("Cannot call a class as a function");
28259
28258
  }
28260
28259
  }
28261
- function _defineProperties$e(target, props) {
28260
+ function _defineProperties$d(target, props) {
28262
28261
  for(var i = 0; i < props.length; i++){
28263
28262
  var descriptor = props[i];
28264
28263
  descriptor.enumerable = descriptor.enumerable || false;
@@ -28267,12 +28266,12 @@ function _defineProperties$e(target, props) {
28267
28266
  Object.defineProperty(target, descriptor.key, descriptor);
28268
28267
  }
28269
28268
  }
28270
- function _create_class$e(Constructor, protoProps, staticProps) {
28271
- if (protoProps) _defineProperties$e(Constructor.prototype, protoProps);
28272
- if (staticProps) _defineProperties$e(Constructor, staticProps);
28269
+ function _create_class$d(Constructor, protoProps, staticProps) {
28270
+ if (protoProps) _defineProperties$d(Constructor.prototype, protoProps);
28271
+ if (staticProps) _defineProperties$d(Constructor, staticProps);
28273
28272
  return Constructor;
28274
28273
  }
28275
- function _define_property$r(obj, key, value) {
28274
+ function _define_property$q(obj, key, value) {
28276
28275
  if (key in obj) {
28277
28276
  Object.defineProperty(obj, key, {
28278
28277
  value: value,
@@ -28287,16 +28286,16 @@ function _define_property$r(obj, key, value) {
28287
28286
  }
28288
28287
  var ColorLog = /*#__PURE__*/ function() {
28289
28288
  function ColorLog() {
28290
- _class_call_check$r(this, ColorLog);
28289
+ _class_call_check$q(this, ColorLog);
28291
28290
  // ANSI escape codes for different colors
28292
- _define_property$r(this, "ANSI_WHITE_BRIGHT", "\x1b[97m");
28293
- _define_property$r(this, "ANSI_GREEN_BRIGHT", "\x1b[92m");
28294
- _define_property$r(this, "ANSI_BLUE_BRIGHT", "\x1b[94m");
28295
- _define_property$r(this, "ANSI_YELLOW", "\x1b[93m");
28296
- _define_property$r(this, "ANSI_RED", "\x1b[91m");
28297
- _define_property$r(this, "ANSI_RESET", "\x1b[0m");
28291
+ _define_property$q(this, "ANSI_WHITE_BRIGHT", "\x1b[97m");
28292
+ _define_property$q(this, "ANSI_GREEN_BRIGHT", "\x1b[92m");
28293
+ _define_property$q(this, "ANSI_BLUE_BRIGHT", "\x1b[94m");
28294
+ _define_property$q(this, "ANSI_YELLOW", "\x1b[93m");
28295
+ _define_property$q(this, "ANSI_RED", "\x1b[91m");
28296
+ _define_property$q(this, "ANSI_RESET", "\x1b[0m");
28298
28297
  }
28299
- _create_class$e(ColorLog, [
28298
+ _create_class$d(ColorLog, [
28300
28299
  {
28301
28300
  // Method to wrap text with the specified ANSI color code
28302
28301
  key: "colorize",
@@ -28377,12 +28376,12 @@ function _async_to_generator$7(fn) {
28377
28376
  });
28378
28377
  };
28379
28378
  }
28380
- function _class_call_check$q(instance, Constructor) {
28379
+ function _class_call_check$p(instance, Constructor) {
28381
28380
  if (!(instance instanceof Constructor)) {
28382
28381
  throw new TypeError("Cannot call a class as a function");
28383
28382
  }
28384
28383
  }
28385
- function _defineProperties$d(target, props) {
28384
+ function _defineProperties$c(target, props) {
28386
28385
  for(var i = 0; i < props.length; i++){
28387
28386
  var descriptor = props[i];
28388
28387
  descriptor.enumerable = descriptor.enumerable || false;
@@ -28391,12 +28390,12 @@ function _defineProperties$d(target, props) {
28391
28390
  Object.defineProperty(target, descriptor.key, descriptor);
28392
28391
  }
28393
28392
  }
28394
- function _create_class$d(Constructor, protoProps, staticProps) {
28395
- if (protoProps) _defineProperties$d(Constructor.prototype, protoProps);
28396
- if (staticProps) _defineProperties$d(Constructor, staticProps);
28393
+ function _create_class$c(Constructor, protoProps, staticProps) {
28394
+ if (protoProps) _defineProperties$c(Constructor.prototype, protoProps);
28395
+ if (staticProps) _defineProperties$c(Constructor, staticProps);
28397
28396
  return Constructor;
28398
28397
  }
28399
- function _define_property$q(obj, key, value) {
28398
+ function _define_property$p(obj, key, value) {
28400
28399
  if (key in obj) {
28401
28400
  Object.defineProperty(obj, key, {
28402
28401
  value: value,
@@ -28446,7 +28445,7 @@ function _object_spread$h(target) {
28446
28445
  }));
28447
28446
  }
28448
28447
  ownKeys.forEach(function(key) {
28449
- _define_property$q(target, key, source[key]);
28448
+ _define_property$p(target, key, source[key]);
28450
28449
  });
28451
28450
  }
28452
28451
  return target;
@@ -28593,26 +28592,26 @@ var axBaseAIDefaultConfig = function() {
28593
28592
  var AxBaseAI = /*#__PURE__*/ function() {
28594
28593
  function AxBaseAI(param) {
28595
28594
  var name = param.name, apiURL = param.apiURL, headers = param.headers, modelInfo = param.modelInfo, models = param.models, _param_options = param.options, options = _param_options === void 0 ? {} : _param_options, supportFor = param.supportFor;
28596
- _class_call_check$q(this, AxBaseAI);
28597
- _define_property$q(this, "generateChatReq", void 0);
28598
- _define_property$q(this, "generateEmbedReq", void 0);
28599
- _define_property$q(this, "generateChatResp", void 0);
28600
- _define_property$q(this, "generateChatStreamResp", void 0);
28601
- _define_property$q(this, "generateEmbedResp", void 0);
28602
- _define_property$q(this, "debug", false);
28603
- _define_property$q(this, "rt", void 0);
28604
- _define_property$q(this, "fetch", void 0);
28605
- _define_property$q(this, "tracer", void 0);
28606
- _define_property$q(this, "modelMap", void 0);
28607
- _define_property$q(this, "embedModelMap", void 0);
28608
- _define_property$q(this, "modelUsage", void 0);
28609
- _define_property$q(this, "embedModelUsage", void 0);
28610
- _define_property$q(this, "apiURL", void 0);
28611
- _define_property$q(this, "name", void 0);
28612
- _define_property$q(this, "headers", void 0);
28613
- _define_property$q(this, "modelInfo", void 0);
28614
- _define_property$q(this, "embedModelInfo", void 0);
28615
- _define_property$q(this, "supportFor", void 0);
28595
+ _class_call_check$p(this, AxBaseAI);
28596
+ _define_property$p(this, "generateChatReq", void 0);
28597
+ _define_property$p(this, "generateEmbedReq", void 0);
28598
+ _define_property$p(this, "generateChatResp", void 0);
28599
+ _define_property$p(this, "generateChatStreamResp", void 0);
28600
+ _define_property$p(this, "generateEmbedResp", void 0);
28601
+ _define_property$p(this, "debug", false);
28602
+ _define_property$p(this, "rt", void 0);
28603
+ _define_property$p(this, "fetch", void 0);
28604
+ _define_property$p(this, "tracer", void 0);
28605
+ _define_property$p(this, "modelMap", void 0);
28606
+ _define_property$p(this, "embedModelMap", void 0);
28607
+ _define_property$p(this, "modelUsage", void 0);
28608
+ _define_property$p(this, "embedModelUsage", void 0);
28609
+ _define_property$p(this, "apiURL", void 0);
28610
+ _define_property$p(this, "name", void 0);
28611
+ _define_property$p(this, "headers", void 0);
28612
+ _define_property$p(this, "modelInfo", void 0);
28613
+ _define_property$p(this, "embedModelInfo", void 0);
28614
+ _define_property$p(this, "supportFor", void 0);
28616
28615
  this.name = name;
28617
28616
  this.apiURL = apiURL;
28618
28617
  this.headers = headers;
@@ -28648,7 +28647,7 @@ var AxBaseAI = /*#__PURE__*/ function() {
28648
28647
  }
28649
28648
  this.setOptions(options);
28650
28649
  }
28651
- _create_class$d(AxBaseAI, [
28650
+ _create_class$c(AxBaseAI, [
28652
28651
  {
28653
28652
  key: "setName",
28654
28653
  value: function setName(name) {
@@ -28748,7 +28747,7 @@ var AxBaseAI = /*#__PURE__*/ function() {
28748
28747
  4,
28749
28748
  (_this_tracer = _this.tracer) === null || _this_tracer === void 0 ? void 0 : _this_tracer.startActiveSpan("Chat Request", {
28750
28749
  kind: AxSpanKind.SERVER,
28751
- attributes: (_obj = {}, _define_property$q(_obj, axSpanAttributes.LLM_SYSTEM, _this.name), _define_property$q(_obj, axSpanAttributes.LLM_REQUEST_MODEL, _this.modelInfo.name), _define_property$q(_obj, axSpanAttributes.LLM_REQUEST_MAX_TOKENS, mc.maxTokens), _define_property$q(_obj, axSpanAttributes.LLM_REQUEST_TEMPERATURE, mc.temperature), _define_property$q(_obj, axSpanAttributes.LLM_REQUEST_TOP_P, mc.topP), _define_property$q(_obj, axSpanAttributes.LLM_REQUEST_TOP_K, mc.topK), _define_property$q(_obj, axSpanAttributes.LLM_REQUEST_FREQUENCY_PENALTY, mc.frequencyPenalty), _define_property$q(_obj, axSpanAttributes.LLM_REQUEST_PRESENCE_PENALTY, mc.presencePenalty), _define_property$q(_obj, axSpanAttributes.LLM_REQUEST_STOP_SEQUENCES, (_mc_stopSequences = mc.stopSequences) === null || _mc_stopSequences === void 0 ? void 0 : _mc_stopSequences.join(", ")), _define_property$q(_obj, axSpanAttributes.LLM_REQUEST_LLM_IS_STREAMING, mc.stream), _obj)
28750
+ attributes: (_obj = {}, _define_property$p(_obj, axSpanAttributes.LLM_SYSTEM, _this.name), _define_property$p(_obj, axSpanAttributes.LLM_REQUEST_MODEL, _this.modelInfo.name), _define_property$p(_obj, axSpanAttributes.LLM_REQUEST_MAX_TOKENS, mc.maxTokens), _define_property$p(_obj, axSpanAttributes.LLM_REQUEST_TEMPERATURE, mc.temperature), _define_property$p(_obj, axSpanAttributes.LLM_REQUEST_TOP_P, mc.topP), _define_property$p(_obj, axSpanAttributes.LLM_REQUEST_TOP_K, mc.topK), _define_property$p(_obj, axSpanAttributes.LLM_REQUEST_FREQUENCY_PENALTY, mc.frequencyPenalty), _define_property$p(_obj, axSpanAttributes.LLM_REQUEST_PRESENCE_PENALTY, mc.presencePenalty), _define_property$p(_obj, axSpanAttributes.LLM_REQUEST_STOP_SEQUENCES, (_mc_stopSequences = mc.stopSequences) === null || _mc_stopSequences === void 0 ? void 0 : _mc_stopSequences.join(", ")), _define_property$p(_obj, axSpanAttributes.LLM_REQUEST_LLM_IS_STREAMING, mc.stream), _obj)
28752
28751
  }, function() {
28753
28752
  var _ref = _async_to_generator$7(function(span) {
28754
28753
  var res;
@@ -28960,7 +28959,7 @@ var AxBaseAI = /*#__PURE__*/ function() {
28960
28959
  4,
28961
28960
  (_this_tracer = _this.tracer) === null || _this_tracer === void 0 ? void 0 : _this_tracer.startActiveSpan("Embed Request", {
28962
28961
  kind: AxSpanKind.SERVER,
28963
- attributes: (_obj = {}, _define_property$q(_obj, axSpanAttributes.LLM_SYSTEM, _this.name), _define_property$q(_obj, axSpanAttributes.LLM_REQUEST_MODEL, _this.modelInfo.name), _obj)
28962
+ attributes: (_obj = {}, _define_property$p(_obj, axSpanAttributes.LLM_SYSTEM, _this.name), _define_property$p(_obj, axSpanAttributes.LLM_REQUEST_MODEL, _this.modelInfo.name), _obj)
28964
28963
  }, function() {
28965
28964
  var _ref = _async_to_generator$7(function(span) {
28966
28965
  var res;
@@ -29078,7 +29077,7 @@ var AxBaseAI = /*#__PURE__*/ function() {
29078
29077
  if (span === null || span === void 0 ? void 0 : span.isRecording()) {
29079
29078
  if (res.modelUsage) {
29080
29079
  _this.embedModelUsage = res.modelUsage;
29081
- span.setAttributes((_obj = {}, _define_property$q(_obj, axSpanAttributes.LLM_USAGE_COMPLETION_TOKENS, (_res_modelUsage_completionTokens = res.modelUsage.completionTokens) !== null && _res_modelUsage_completionTokens !== void 0 ? _res_modelUsage_completionTokens : 0), _define_property$q(_obj, axSpanAttributes.LLM_USAGE_PROMPT_TOKENS, res.modelUsage.promptTokens), _obj));
29080
+ span.setAttributes((_obj = {}, _define_property$p(_obj, axSpanAttributes.LLM_USAGE_COMPLETION_TOKENS, (_res_modelUsage_completionTokens = res.modelUsage.completionTokens) !== null && _res_modelUsage_completionTokens !== void 0 ? _res_modelUsage_completionTokens : 0), _define_property$p(_obj, axSpanAttributes.LLM_USAGE_PROMPT_TOKENS, res.modelUsage.promptTokens), _obj));
29082
29081
  }
29083
29082
  }
29084
29083
  span === null || span === void 0 ? void 0 : span.end();
@@ -29268,7 +29267,7 @@ var setResponseAttr = function(res, span) {
29268
29267
  if (res.modelUsage) {
29269
29268
  var _res_modelUsage_completionTokens;
29270
29269
  var _obj;
29271
- span.setAttributes((_obj = {}, _define_property$q(_obj, axSpanAttributes.LLM_USAGE_COMPLETION_TOKENS, (_res_modelUsage_completionTokens = res.modelUsage.completionTokens) !== null && _res_modelUsage_completionTokens !== void 0 ? _res_modelUsage_completionTokens : 0), _define_property$q(_obj, axSpanAttributes.LLM_USAGE_PROMPT_TOKENS, res.modelUsage.promptTokens), _obj));
29270
+ span.setAttributes((_obj = {}, _define_property$p(_obj, axSpanAttributes.LLM_USAGE_COMPLETION_TOKENS, (_res_modelUsage_completionTokens = res.modelUsage.completionTokens) !== null && _res_modelUsage_completionTokens !== void 0 ? _res_modelUsage_completionTokens : 0), _define_property$p(_obj, axSpanAttributes.LLM_USAGE_PROMPT_TOKENS, res.modelUsage.promptTokens), _obj));
29272
29271
  }
29273
29272
  };
29274
29273
 
@@ -29344,12 +29343,12 @@ function _assert_this_initialized$f(self) {
29344
29343
  }
29345
29344
  return self;
29346
29345
  }
29347
- function _class_call_check$p(instance, Constructor) {
29346
+ function _class_call_check$o(instance, Constructor) {
29348
29347
  if (!(instance instanceof Constructor)) {
29349
29348
  throw new TypeError("Cannot call a class as a function");
29350
29349
  }
29351
29350
  }
29352
- function _defineProperties$c(target, props) {
29351
+ function _defineProperties$b(target, props) {
29353
29352
  for(var i = 0; i < props.length; i++){
29354
29353
  var descriptor = props[i];
29355
29354
  descriptor.enumerable = descriptor.enumerable || false;
@@ -29358,12 +29357,12 @@ function _defineProperties$c(target, props) {
29358
29357
  Object.defineProperty(target, descriptor.key, descriptor);
29359
29358
  }
29360
29359
  }
29361
- function _create_class$c(Constructor, protoProps, staticProps) {
29362
- if (protoProps) _defineProperties$c(Constructor.prototype, protoProps);
29363
- if (staticProps) _defineProperties$c(Constructor, staticProps);
29360
+ function _create_class$b(Constructor, protoProps, staticProps) {
29361
+ if (protoProps) _defineProperties$b(Constructor.prototype, protoProps);
29362
+ if (staticProps) _defineProperties$b(Constructor, staticProps);
29364
29363
  return Constructor;
29365
29364
  }
29366
- function _define_property$p(obj, key, value) {
29365
+ function _define_property$o(obj, key, value) {
29367
29366
  if (key in obj) {
29368
29367
  Object.defineProperty(obj, key, {
29369
29368
  value: value,
@@ -29405,7 +29404,7 @@ function _object_spread$g(target) {
29405
29404
  }));
29406
29405
  }
29407
29406
  ownKeys.forEach(function(key) {
29408
- _define_property$p(target, key, source[key]);
29407
+ _define_property$o(target, key, source[key]);
29409
29408
  });
29410
29409
  }
29411
29410
  return target;
@@ -29462,7 +29461,7 @@ var AxAIOpenAI = /*#__PURE__*/ function(AxBaseAI) {
29462
29461
  var _super = _create_super$f(AxAIOpenAI);
29463
29462
  function AxAIOpenAI(param) {
29464
29463
  var apiKey = param.apiKey, config = param.config, options = param.options, apiURL = param.apiURL, _param_modelInfo = param.modelInfo, modelInfo = _param_modelInfo === void 0 ? axModelInfoOpenAI : _param_modelInfo;
29465
- _class_call_check$p(this, AxAIOpenAI);
29464
+ _class_call_check$o(this, AxAIOpenAI);
29466
29465
  var _this;
29467
29466
  if (!apiKey || apiKey === "") {
29468
29467
  throw new Error("OpenAI API key not set");
@@ -29485,9 +29484,9 @@ var AxAIOpenAI = /*#__PURE__*/ function(AxBaseAI) {
29485
29484
  streaming: true
29486
29485
  }
29487
29486
  });
29488
- _define_property$p(_assert_this_initialized$f(_this), "config", void 0);
29489
- _define_property$p(_assert_this_initialized$f(_this), "streamingUsage", void 0);
29490
- _define_property$p(_assert_this_initialized$f(_this), "generateChatReq", function(req, // eslint-disable-next-line @typescript-eslint/no-unused-vars
29487
+ _define_property$o(_assert_this_initialized$f(_this), "config", void 0);
29488
+ _define_property$o(_assert_this_initialized$f(_this), "streamingUsage", void 0);
29489
+ _define_property$o(_assert_this_initialized$f(_this), "generateChatReq", function(req, // eslint-disable-next-line @typescript-eslint/no-unused-vars
29491
29490
  _config) {
29492
29491
  var _req_functions, _req_modelConfig, _req_modelConfig1, _this_config, _this_config1, _req_modelConfig2, _req_modelConfig3, _req_modelConfig4, _req_modelConfig5, _req_modelConfig6, _req_modelConfig7;
29493
29492
  var model = _this.config.model;
@@ -29542,7 +29541,7 @@ var AxAIOpenAI = /*#__PURE__*/ function(AxBaseAI) {
29542
29541
  reqValue
29543
29542
  ];
29544
29543
  });
29545
- _define_property$p(_assert_this_initialized$f(_this), "generateEmbedReq", function(req) {
29544
+ _define_property$o(_assert_this_initialized$f(_this), "generateEmbedReq", function(req) {
29546
29545
  var model = _this.config.embedModel;
29547
29546
  if (!model) {
29548
29547
  throw new Error("Embed model not set");
@@ -29562,7 +29561,7 @@ var AxAIOpenAI = /*#__PURE__*/ function(AxBaseAI) {
29562
29561
  reqValue
29563
29562
  ];
29564
29563
  });
29565
- _define_property$p(_assert_this_initialized$f(_this), "generateChatResp", function(resp) {
29564
+ _define_property$o(_assert_this_initialized$f(_this), "generateChatResp", function(resp) {
29566
29565
  var id = resp.id, usage = resp.usage, choices = resp.choices, error = resp.error;
29567
29566
  if (error) {
29568
29567
  throw error;
@@ -29599,7 +29598,7 @@ var AxAIOpenAI = /*#__PURE__*/ function(AxBaseAI) {
29599
29598
  remoteId: id
29600
29599
  };
29601
29600
  });
29602
- _define_property$p(_assert_this_initialized$f(_this), "generateChatStreamResp", function(resp, state) {
29601
+ _define_property$o(_assert_this_initialized$f(_this), "generateChatStreamResp", function(resp, state) {
29603
29602
  var id = resp.id, usage = resp.usage, choices = resp.choices;
29604
29603
  var modelUsage = usage ? {
29605
29604
  promptTokens: usage.prompt_tokens,
@@ -29647,7 +29646,7 @@ var AxAIOpenAI = /*#__PURE__*/ function(AxBaseAI) {
29647
29646
  modelUsage: modelUsage
29648
29647
  };
29649
29648
  });
29650
- _define_property$p(_assert_this_initialized$f(_this), "generateEmbedResp", function(resp) {
29649
+ _define_property$o(_assert_this_initialized$f(_this), "generateEmbedResp", function(resp) {
29651
29650
  var data = resp.data, usage = resp.usage;
29652
29651
  var modelUsage = usage ? {
29653
29652
  promptTokens: usage.prompt_tokens,
@@ -29666,7 +29665,7 @@ var AxAIOpenAI = /*#__PURE__*/ function(AxBaseAI) {
29666
29665
  _this.streamingUsage = (_options_streamingUsage = options === null || options === void 0 ? void 0 : options.streamingUsage) !== null && _options_streamingUsage !== void 0 ? _options_streamingUsage : true;
29667
29666
  return _this;
29668
29667
  }
29669
- _create_class$c(AxAIOpenAI, [
29668
+ _create_class$b(AxAIOpenAI, [
29670
29669
  {
29671
29670
  key: "getModelConfig",
29672
29671
  value: function getModelConfig() {
@@ -29776,12 +29775,12 @@ function _assert_this_initialized$e(self) {
29776
29775
  }
29777
29776
  return self;
29778
29777
  }
29779
- function _class_call_check$o(instance, Constructor) {
29778
+ function _class_call_check$n(instance, Constructor) {
29780
29779
  if (!(instance instanceof Constructor)) {
29781
29780
  throw new TypeError("Cannot call a class as a function");
29782
29781
  }
29783
29782
  }
29784
- function _define_property$o(obj, key, value) {
29783
+ function _define_property$n(obj, key, value) {
29785
29784
  if (key in obj) {
29786
29785
  Object.defineProperty(obj, key, {
29787
29786
  value: value,
@@ -29839,7 +29838,7 @@ function _object_spread$f(target) {
29839
29838
  }));
29840
29839
  }
29841
29840
  ownKeys.forEach(function(key) {
29842
- _define_property$o(target, key, source[key]);
29841
+ _define_property$n(target, key, source[key]);
29843
29842
  });
29844
29843
  }
29845
29844
  return target;
@@ -29898,7 +29897,7 @@ var AxAIAzureOpenAI = /*#__PURE__*/ function(AxAIOpenAI) {
29898
29897
  var _super = _create_super$e(AxAIAzureOpenAI);
29899
29898
  function AxAIAzureOpenAI(param) {
29900
29899
  var apiKey = param.apiKey, resourceName = param.resourceName, deploymentName = param.deploymentName, _param_version = param.version, version = _param_version === void 0 ? "api-version=2024-02-15-preview" : _param_version, config = param.config, options = param.options;
29901
- _class_call_check$o(this, AxAIAzureOpenAI);
29900
+ _class_call_check$n(this, AxAIAzureOpenAI);
29902
29901
  if (!apiKey || apiKey === "") {
29903
29902
  throw new Error("Azure OpenAPI API key not set");
29904
29903
  }
@@ -29942,12 +29941,12 @@ function _assert_this_initialized$d(self) {
29942
29941
  }
29943
29942
  return self;
29944
29943
  }
29945
- function _class_call_check$n(instance, Constructor) {
29944
+ function _class_call_check$m(instance, Constructor) {
29946
29945
  if (!(instance instanceof Constructor)) {
29947
29946
  throw new TypeError("Cannot call a class as a function");
29948
29947
  }
29949
29948
  }
29950
- function _defineProperties$b(target, props) {
29949
+ function _defineProperties$a(target, props) {
29951
29950
  for(var i = 0; i < props.length; i++){
29952
29951
  var descriptor = props[i];
29953
29952
  descriptor.enumerable = descriptor.enumerable || false;
@@ -29956,12 +29955,12 @@ function _defineProperties$b(target, props) {
29956
29955
  Object.defineProperty(target, descriptor.key, descriptor);
29957
29956
  }
29958
29957
  }
29959
- function _create_class$b(Constructor, protoProps, staticProps) {
29960
- if (protoProps) _defineProperties$b(Constructor.prototype, protoProps);
29961
- if (staticProps) _defineProperties$b(Constructor, staticProps);
29958
+ function _create_class$a(Constructor, protoProps, staticProps) {
29959
+ if (protoProps) _defineProperties$a(Constructor.prototype, protoProps);
29960
+ if (staticProps) _defineProperties$a(Constructor, staticProps);
29962
29961
  return Constructor;
29963
29962
  }
29964
- function _define_property$n(obj, key, value) {
29963
+ function _define_property$m(obj, key, value) {
29965
29964
  if (key in obj) {
29966
29965
  Object.defineProperty(obj, key, {
29967
29966
  value: value,
@@ -30003,7 +30002,7 @@ function _object_spread$e(target) {
30003
30002
  }));
30004
30003
  }
30005
30004
  ownKeys.forEach(function(key) {
30006
- _define_property$n(target, key, source[key]);
30005
+ _define_property$m(target, key, source[key]);
30007
30006
  });
30008
30007
  }
30009
30008
  return target;
@@ -30059,7 +30058,7 @@ var AxAIHuggingFace = /*#__PURE__*/ function(AxBaseAI) {
30059
30058
  var _super = _create_super$d(AxAIHuggingFace);
30060
30059
  function AxAIHuggingFace(param) {
30061
30060
  var apiKey = param.apiKey, config = param.config, options = param.options;
30062
- _class_call_check$n(this, AxAIHuggingFace);
30061
+ _class_call_check$m(this, AxAIHuggingFace);
30063
30062
  var _this;
30064
30063
  if (!apiKey || apiKey === "") {
30065
30064
  throw new Error("HuggingFace API key not set");
@@ -30081,8 +30080,8 @@ var AxAIHuggingFace = /*#__PURE__*/ function(AxBaseAI) {
30081
30080
  streaming: false
30082
30081
  }
30083
30082
  });
30084
- _define_property$n(_assert_this_initialized$d(_this), "config", void 0);
30085
- _define_property$n(_assert_this_initialized$d(_this), "generateChatReq", function(req, // eslint-disable-next-line @typescript-eslint/no-unused-vars
30083
+ _define_property$m(_assert_this_initialized$d(_this), "config", void 0);
30084
+ _define_property$m(_assert_this_initialized$d(_this), "generateChatReq", function(req, // eslint-disable-next-line @typescript-eslint/no-unused-vars
30086
30085
  _config) {
30087
30086
  var _req_chatPrompt, _req_modelConfig, _req_modelConfig1, _req_modelConfig2, _req_modelConfig3, _req_modelConfig4;
30088
30087
  var model = _this.config.model;
@@ -30141,7 +30140,7 @@ var AxAIHuggingFace = /*#__PURE__*/ function(AxBaseAI) {
30141
30140
  reqValue
30142
30141
  ];
30143
30142
  });
30144
- _define_property$n(_assert_this_initialized$d(_this), "generateChatResp", function(resp) {
30143
+ _define_property$m(_assert_this_initialized$d(_this), "generateChatResp", function(resp) {
30145
30144
  return {
30146
30145
  results: [
30147
30146
  {
@@ -30153,7 +30152,7 @@ var AxAIHuggingFace = /*#__PURE__*/ function(AxBaseAI) {
30153
30152
  _this.config = _config;
30154
30153
  return _this;
30155
30154
  }
30156
- _create_class$b(AxAIHuggingFace, [
30155
+ _create_class$a(AxAIHuggingFace, [
30157
30156
  {
30158
30157
  key: "getModelConfig",
30159
30158
  value: function getModelConfig() {
@@ -30181,12 +30180,12 @@ function _assert_this_initialized$c(self) {
30181
30180
  }
30182
30181
  return self;
30183
30182
  }
30184
- function _class_call_check$m(instance, Constructor) {
30183
+ function _class_call_check$l(instance, Constructor) {
30185
30184
  if (!(instance instanceof Constructor)) {
30186
30185
  throw new TypeError("Cannot call a class as a function");
30187
30186
  }
30188
30187
  }
30189
- function _define_property$m(obj, key, value) {
30188
+ function _define_property$l(obj, key, value) {
30190
30189
  if (key in obj) {
30191
30190
  Object.defineProperty(obj, key, {
30192
30191
  value: value,
@@ -30244,7 +30243,7 @@ function _object_spread$d(target) {
30244
30243
  }));
30245
30244
  }
30246
30245
  ownKeys.forEach(function(key) {
30247
- _define_property$m(target, key, source[key]);
30246
+ _define_property$l(target, key, source[key]);
30248
30247
  });
30249
30248
  }
30250
30249
  return target;
@@ -30308,7 +30307,7 @@ var AxAITogether = /*#__PURE__*/ function(AxAIOpenAI) {
30308
30307
  var _super = _create_super$c(AxAITogether);
30309
30308
  function AxAITogether(param) {
30310
30309
  var apiKey = param.apiKey, config = param.config, options = param.options;
30311
- _class_call_check$m(this, AxAITogether);
30310
+ _class_call_check$l(this, AxAITogether);
30312
30311
  if (!apiKey || apiKey === "") {
30313
30312
  throw new Error("Together API key not set");
30314
30313
  }
@@ -30413,12 +30412,12 @@ function _assert_this_initialized$b(self) {
30413
30412
  }
30414
30413
  return self;
30415
30414
  }
30416
- function _class_call_check$l(instance, Constructor) {
30415
+ function _class_call_check$k(instance, Constructor) {
30417
30416
  if (!(instance instanceof Constructor)) {
30418
30417
  throw new TypeError("Cannot call a class as a function");
30419
30418
  }
30420
30419
  }
30421
- function _defineProperties$a(target, props) {
30420
+ function _defineProperties$9(target, props) {
30422
30421
  for(var i = 0; i < props.length; i++){
30423
30422
  var descriptor = props[i];
30424
30423
  descriptor.enumerable = descriptor.enumerable || false;
@@ -30427,12 +30426,12 @@ function _defineProperties$a(target, props) {
30427
30426
  Object.defineProperty(target, descriptor.key, descriptor);
30428
30427
  }
30429
30428
  }
30430
- function _create_class$a(Constructor, protoProps, staticProps) {
30431
- if (protoProps) _defineProperties$a(Constructor.prototype, protoProps);
30432
- if (staticProps) _defineProperties$a(Constructor, staticProps);
30429
+ function _create_class$9(Constructor, protoProps, staticProps) {
30430
+ if (protoProps) _defineProperties$9(Constructor.prototype, protoProps);
30431
+ if (staticProps) _defineProperties$9(Constructor, staticProps);
30433
30432
  return Constructor;
30434
30433
  }
30435
- function _define_property$l(obj, key, value) {
30434
+ function _define_property$k(obj, key, value) {
30436
30435
  if (key in obj) {
30437
30436
  Object.defineProperty(obj, key, {
30438
30437
  value: value,
@@ -30501,7 +30500,7 @@ function _object_spread$c(target) {
30501
30500
  }));
30502
30501
  }
30503
30502
  ownKeys.forEach(function(key) {
30504
- _define_property$l(target, key, source[key]);
30503
+ _define_property$k(target, key, source[key]);
30505
30504
  });
30506
30505
  }
30507
30506
  return target;
@@ -30593,7 +30592,7 @@ var AxAICohere = /*#__PURE__*/ function(AxBaseAI) {
30593
30592
  var _super = _create_super$b(AxAICohere);
30594
30593
  function AxAICohere(param) {
30595
30594
  var apiKey = param.apiKey, config = param.config, options = param.options;
30596
- _class_call_check$l(this, AxAICohere);
30595
+ _class_call_check$k(this, AxAICohere);
30597
30596
  var _this;
30598
30597
  if (!apiKey || apiKey === "") {
30599
30598
  throw new Error("Cohere API key not set");
@@ -30615,8 +30614,8 @@ var AxAICohere = /*#__PURE__*/ function(AxBaseAI) {
30615
30614
  },
30616
30615
  options: options
30617
30616
  });
30618
- _define_property$l(_assert_this_initialized$b(_this), "config", void 0);
30619
- _define_property$l(_assert_this_initialized$b(_this), "generateChatReq", function(req, // eslint-disable-next-line @typescript-eslint/no-unused-vars
30617
+ _define_property$k(_assert_this_initialized$b(_this), "config", void 0);
30618
+ _define_property$k(_assert_this_initialized$b(_this), "generateChatReq", function(req, // eslint-disable-next-line @typescript-eslint/no-unused-vars
30620
30619
  _config) {
30621
30620
  var _req_functions, _req_modelConfig, _req_modelConfig1, _req_modelConfig2, _req_modelConfig3, _req_modelConfig4, _req_modelConfig5, _req_modelConfig6;
30622
30621
  var model = _this.config.model;
@@ -30713,7 +30712,7 @@ var AxAICohere = /*#__PURE__*/ function(AxBaseAI) {
30713
30712
  reqValue
30714
30713
  ];
30715
30714
  });
30716
- _define_property$l(_assert_this_initialized$b(_this), "generateEmbedReq", function(req) {
30715
+ _define_property$k(_assert_this_initialized$b(_this), "generateEmbedReq", function(req) {
30717
30716
  var model = _this.config.embedModel;
30718
30717
  if (!model) {
30719
30718
  throw new Error("Embed model not set");
@@ -30736,7 +30735,7 @@ var AxAICohere = /*#__PURE__*/ function(AxBaseAI) {
30736
30735
  reqValue
30737
30736
  ];
30738
30737
  });
30739
- _define_property$l(_assert_this_initialized$b(_this), "generateChatResp", function(resp) {
30738
+ _define_property$k(_assert_this_initialized$b(_this), "generateChatResp", function(resp) {
30740
30739
  var modelUsage = resp.meta.billed_units ? {
30741
30740
  promptTokens: resp.meta.billed_units.input_tokens,
30742
30741
  completionTokens: resp.meta.billed_units.output_tokens,
@@ -30788,7 +30787,7 @@ var AxAICohere = /*#__PURE__*/ function(AxBaseAI) {
30788
30787
  remoteId: resp.response_id
30789
30788
  };
30790
30789
  });
30791
- _define_property$l(_assert_this_initialized$b(_this), "generateChatStreamResp", function(resp, state) {
30790
+ _define_property$k(_assert_this_initialized$b(_this), "generateChatStreamResp", function(resp, state) {
30792
30791
  var ss = state;
30793
30792
  if (resp.event_type === "stream-start") {
30794
30793
  ss.generation_id = resp.generation_id;
@@ -30804,7 +30803,7 @@ var AxAICohere = /*#__PURE__*/ function(AxBaseAI) {
30804
30803
  results: results
30805
30804
  };
30806
30805
  });
30807
- _define_property$l(_assert_this_initialized$b(_this), "generateEmbedResp", function(resp) {
30806
+ _define_property$k(_assert_this_initialized$b(_this), "generateEmbedResp", function(resp) {
30808
30807
  return {
30809
30808
  remoteId: resp.id,
30810
30809
  embeddings: resp.embeddings
@@ -30813,7 +30812,7 @@ var AxAICohere = /*#__PURE__*/ function(AxBaseAI) {
30813
30812
  _this.config = _config;
30814
30813
  return _this;
30815
30814
  }
30816
- _create_class$a(AxAICohere, [
30815
+ _create_class$9(AxAICohere, [
30817
30816
  {
30818
30817
  key: "getModelConfig",
30819
30818
  value: function getModelConfig() {
@@ -30971,12 +30970,12 @@ function _assert_this_initialized$a(self) {
30971
30970
  }
30972
30971
  return self;
30973
30972
  }
30974
- function _class_call_check$k(instance, Constructor) {
30973
+ function _class_call_check$j(instance, Constructor) {
30975
30974
  if (!(instance instanceof Constructor)) {
30976
30975
  throw new TypeError("Cannot call a class as a function");
30977
30976
  }
30978
30977
  }
30979
- function _defineProperties$9(target, props) {
30978
+ function _defineProperties$8(target, props) {
30980
30979
  for(var i = 0; i < props.length; i++){
30981
30980
  var descriptor = props[i];
30982
30981
  descriptor.enumerable = descriptor.enumerable || false;
@@ -30985,12 +30984,12 @@ function _defineProperties$9(target, props) {
30985
30984
  Object.defineProperty(target, descriptor.key, descriptor);
30986
30985
  }
30987
30986
  }
30988
- function _create_class$9(Constructor, protoProps, staticProps) {
30989
- if (protoProps) _defineProperties$9(Constructor.prototype, protoProps);
30990
- if (staticProps) _defineProperties$9(Constructor, staticProps);
30987
+ function _create_class$8(Constructor, protoProps, staticProps) {
30988
+ if (protoProps) _defineProperties$8(Constructor.prototype, protoProps);
30989
+ if (staticProps) _defineProperties$8(Constructor, staticProps);
30991
30990
  return Constructor;
30992
30991
  }
30993
- function _define_property$k(obj, key, value) {
30992
+ function _define_property$j(obj, key, value) {
30994
30993
  if (key in obj) {
30995
30994
  Object.defineProperty(obj, key, {
30996
30995
  value: value,
@@ -31032,7 +31031,7 @@ function _object_spread$b(target) {
31032
31031
  }));
31033
31032
  }
31034
31033
  ownKeys.forEach(function(key) {
31035
- _define_property$k(target, key, source[key]);
31034
+ _define_property$j(target, key, source[key]);
31036
31035
  });
31037
31036
  }
31038
31037
  return target;
@@ -31114,7 +31113,7 @@ var safetySettings = [
31114
31113
  var _super = _create_super$a(AxAIGoogleGemini);
31115
31114
  function AxAIGoogleGemini(param) {
31116
31115
  var apiKey = param.apiKey, projectId = param.projectId, region = param.region, config = param.config, options = param.options;
31117
- _class_call_check$k(this, AxAIGoogleGemini);
31116
+ _class_call_check$j(this, AxAIGoogleGemini);
31118
31117
  var _this;
31119
31118
  if (!apiKey || apiKey === "") {
31120
31119
  throw new Error("GoogleGemini AI API key not set");
@@ -31139,10 +31138,10 @@ var safetySettings = [
31139
31138
  streaming: true
31140
31139
  }
31141
31140
  });
31142
- _define_property$k(_assert_this_initialized$a(_this), "options", void 0);
31143
- _define_property$k(_assert_this_initialized$a(_this), "config", void 0);
31144
- _define_property$k(_assert_this_initialized$a(_this), "apiKey", void 0);
31145
- _define_property$k(_assert_this_initialized$a(_this), "generateChatReq", function(req) {
31141
+ _define_property$j(_assert_this_initialized$a(_this), "options", void 0);
31142
+ _define_property$j(_assert_this_initialized$a(_this), "config", void 0);
31143
+ _define_property$j(_assert_this_initialized$a(_this), "apiKey", void 0);
31144
+ _define_property$j(_assert_this_initialized$a(_this), "generateChatReq", function(req) {
31146
31145
  var _req_modelConfig, _this_options, _req_modelConfig1, _req_modelConfig2, _req_modelConfig3, _req_modelConfig4, _req_modelConfig5;
31147
31146
  var model = _this.config.model;
31148
31147
  var _req_modelConfig_stream;
@@ -31323,7 +31322,7 @@ var safetySettings = [
31323
31322
  reqValue
31324
31323
  ];
31325
31324
  });
31326
- _define_property$k(_assert_this_initialized$a(_this), "generateEmbedReq", function(req) {
31325
+ _define_property$j(_assert_this_initialized$a(_this), "generateEmbedReq", function(req) {
31327
31326
  var model = _this.config.embedModel;
31328
31327
  if (!model) {
31329
31328
  throw new Error("Embed model not set");
@@ -31347,7 +31346,7 @@ var safetySettings = [
31347
31346
  reqValue
31348
31347
  ];
31349
31348
  });
31350
- _define_property$k(_assert_this_initialized$a(_this), "generateChatResp", function(resp) {
31349
+ _define_property$j(_assert_this_initialized$a(_this), "generateChatResp", function(resp) {
31351
31350
  var _resp_candidates;
31352
31351
  var results = (_resp_candidates = resp.candidates) === null || _resp_candidates === void 0 ? void 0 : _resp_candidates.map(function(candidate) {
31353
31352
  var result = {};
@@ -31413,10 +31412,10 @@ var safetySettings = [
31413
31412
  modelUsage: modelUsage
31414
31413
  };
31415
31414
  });
31416
- _define_property$k(_assert_this_initialized$a(_this), "generateChatStreamResp", function(resp) {
31415
+ _define_property$j(_assert_this_initialized$a(_this), "generateChatStreamResp", function(resp) {
31417
31416
  return _this.generateChatResp(resp);
31418
31417
  });
31419
- _define_property$k(_assert_this_initialized$a(_this), "generateEmbedResp", function(resp) {
31418
+ _define_property$j(_assert_this_initialized$a(_this), "generateEmbedResp", function(resp) {
31420
31419
  var embeddings = resp.embeddings.map(function(embedding) {
31421
31420
  return embedding.value;
31422
31421
  });
@@ -31429,7 +31428,7 @@ var safetySettings = [
31429
31428
  _this.apiKey = apiKey;
31430
31429
  return _this;
31431
31430
  }
31432
- _create_class$9(AxAIGoogleGemini, [
31431
+ _create_class$8(AxAIGoogleGemini, [
31433
31432
  {
31434
31433
  key: "getModelConfig",
31435
31434
  value: function getModelConfig() {
@@ -31510,12 +31509,12 @@ function _assert_this_initialized$9(self) {
31510
31509
  }
31511
31510
  return self;
31512
31511
  }
31513
- function _class_call_check$j(instance, Constructor) {
31512
+ function _class_call_check$i(instance, Constructor) {
31514
31513
  if (!(instance instanceof Constructor)) {
31515
31514
  throw new TypeError("Cannot call a class as a function");
31516
31515
  }
31517
31516
  }
31518
- function _defineProperties$8(target, props) {
31517
+ function _defineProperties$7(target, props) {
31519
31518
  for(var i = 0; i < props.length; i++){
31520
31519
  var descriptor = props[i];
31521
31520
  descriptor.enumerable = descriptor.enumerable || false;
@@ -31524,12 +31523,12 @@ function _defineProperties$8(target, props) {
31524
31523
  Object.defineProperty(target, descriptor.key, descriptor);
31525
31524
  }
31526
31525
  }
31527
- function _create_class$8(Constructor, protoProps, staticProps) {
31528
- if (protoProps) _defineProperties$8(Constructor.prototype, protoProps);
31529
- if (staticProps) _defineProperties$8(Constructor, staticProps);
31526
+ function _create_class$7(Constructor, protoProps, staticProps) {
31527
+ if (protoProps) _defineProperties$7(Constructor.prototype, protoProps);
31528
+ if (staticProps) _defineProperties$7(Constructor, staticProps);
31530
31529
  return Constructor;
31531
31530
  }
31532
- function _define_property$j(obj, key, value) {
31531
+ function _define_property$i(obj, key, value) {
31533
31532
  if (key in obj) {
31534
31533
  Object.defineProperty(obj, key, {
31535
31534
  value: value,
@@ -31598,7 +31597,7 @@ function _object_spread$a(target) {
31598
31597
  }));
31599
31598
  }
31600
31599
  ownKeys.forEach(function(key) {
31601
- _define_property$j(target, key, source[key]);
31600
+ _define_property$i(target, key, source[key]);
31602
31601
  });
31603
31602
  }
31604
31603
  return target;
@@ -31689,7 +31688,7 @@ var AxAIAnthropic = /*#__PURE__*/ function(AxBaseAI) {
31689
31688
  var _super = _create_super$9(AxAIAnthropic);
31690
31689
  function AxAIAnthropic(param) {
31691
31690
  var apiKey = param.apiKey, config = param.config, options = param.options;
31692
- _class_call_check$j(this, AxAIAnthropic);
31691
+ _class_call_check$i(this, AxAIAnthropic);
31693
31692
  var _this;
31694
31693
  if (!apiKey || apiKey === "") {
31695
31694
  throw new Error("Anthropic API key not set");
@@ -31712,8 +31711,8 @@ var AxAIAnthropic = /*#__PURE__*/ function(AxBaseAI) {
31712
31711
  streaming: true
31713
31712
  }
31714
31713
  });
31715
- _define_property$j(_assert_this_initialized$9(_this), "config", void 0);
31716
- _define_property$j(_assert_this_initialized$9(_this), "generateChatReq", function(req) {
31714
+ _define_property$i(_assert_this_initialized$9(_this), "config", void 0);
31715
+ _define_property$i(_assert_this_initialized$9(_this), "generateChatReq", function(req) {
31717
31716
  var _req_functions, _req_modelConfig, _req_modelConfig1, _req_modelConfig2, _req_modelConfig3, _req_modelConfig4, _req_modelConfig5;
31718
31717
  var model = _this.config.model;
31719
31718
  var apiConfig = {
@@ -31752,7 +31751,7 @@ var AxAIAnthropic = /*#__PURE__*/ function(AxBaseAI) {
31752
31751
  reqValue
31753
31752
  ];
31754
31753
  });
31755
- _define_property$j(_assert_this_initialized$9(_this), "generateChatResp", function(resp) {
31754
+ _define_property$i(_assert_this_initialized$9(_this), "generateChatResp", function(resp) {
31756
31755
  if (resp.type === "error") {
31757
31756
  throw new Error("Anthropic Chat API Error: ".concat(resp.error.message));
31758
31757
  }
@@ -31791,7 +31790,7 @@ var AxAIAnthropic = /*#__PURE__*/ function(AxBaseAI) {
31791
31790
  remoteId: resp.id
31792
31791
  };
31793
31792
  });
31794
- _define_property$j(_assert_this_initialized$9(_this), "generateChatStreamResp", function(resp, state) {
31793
+ _define_property$i(_assert_this_initialized$9(_this), "generateChatStreamResp", function(resp, state) {
31795
31794
  if (!("type" in resp)) {
31796
31795
  throw new Error("Invalid Anthropic streaming event");
31797
31796
  }
@@ -31919,7 +31918,7 @@ var AxAIAnthropic = /*#__PURE__*/ function(AxBaseAI) {
31919
31918
  _this.config = _config;
31920
31919
  return _this;
31921
31920
  }
31922
- _create_class$8(AxAIAnthropic, [
31921
+ _create_class$7(AxAIAnthropic, [
31923
31922
  {
31924
31923
  key: "getModelConfig",
31925
31924
  value: function getModelConfig() {
@@ -32100,12 +32099,12 @@ function _async_to_generator$6(fn) {
32100
32099
  });
32101
32100
  };
32102
32101
  }
32103
- function _class_call_check$i(instance, Constructor) {
32102
+ function _class_call_check$h(instance, Constructor) {
32104
32103
  if (!(instance instanceof Constructor)) {
32105
32104
  throw new TypeError("Cannot call a class as a function");
32106
32105
  }
32107
32106
  }
32108
- function _defineProperties$7(target, props) {
32107
+ function _defineProperties$6(target, props) {
32109
32108
  for(var i = 0; i < props.length; i++){
32110
32109
  var descriptor = props[i];
32111
32110
  descriptor.enumerable = descriptor.enumerable || false;
@@ -32114,12 +32113,12 @@ function _defineProperties$7(target, props) {
32114
32113
  Object.defineProperty(target, descriptor.key, descriptor);
32115
32114
  }
32116
32115
  }
32117
- function _create_class$7(Constructor, protoProps, staticProps) {
32118
- if (protoProps) _defineProperties$7(Constructor.prototype, protoProps);
32119
- if (staticProps) _defineProperties$7(Constructor, staticProps);
32116
+ function _create_class$6(Constructor, protoProps, staticProps) {
32117
+ if (protoProps) _defineProperties$6(Constructor.prototype, protoProps);
32118
+ if (staticProps) _defineProperties$6(Constructor, staticProps);
32120
32119
  return Constructor;
32121
32120
  }
32122
- function _define_property$i(obj, key, value) {
32121
+ function _define_property$h(obj, key, value) {
32123
32122
  if (key in obj) {
32124
32123
  Object.defineProperty(obj, key, {
32125
32124
  value: value,
@@ -32230,19 +32229,19 @@ function _ts_generator$7(thisArg, body) {
32230
32229
  var colorLog = new ColorLog();
32231
32230
  var AxRateLimiterTokenUsage = /*#__PURE__*/ function() {
32232
32231
  function AxRateLimiterTokenUsage(maxTokens, refillRate, options) {
32233
- _class_call_check$i(this, AxRateLimiterTokenUsage);
32234
- _define_property$i(this, "options", void 0);
32235
- _define_property$i(this, "maxTokens", void 0);
32236
- _define_property$i(this, "refillRate", void 0);
32237
- _define_property$i(this, "currentTokens", void 0);
32238
- _define_property$i(this, "lastRefillTime", void 0);
32232
+ _class_call_check$h(this, AxRateLimiterTokenUsage);
32233
+ _define_property$h(this, "options", void 0);
32234
+ _define_property$h(this, "maxTokens", void 0);
32235
+ _define_property$h(this, "refillRate", void 0);
32236
+ _define_property$h(this, "currentTokens", void 0);
32237
+ _define_property$h(this, "lastRefillTime", void 0);
32239
32238
  this.maxTokens = maxTokens;
32240
32239
  this.refillRate = refillRate;
32241
32240
  this.currentTokens = maxTokens;
32242
32241
  this.lastRefillTime = Date.now();
32243
32242
  this.options = options;
32244
32243
  }
32245
- _create_class$7(AxRateLimiterTokenUsage, [
32244
+ _create_class$6(AxRateLimiterTokenUsage, [
32246
32245
  {
32247
32246
  key: "refillTokens",
32248
32247
  value: function refillTokens() {
@@ -32368,12 +32367,12 @@ function _async_to_generator$5(fn) {
32368
32367
  });
32369
32368
  };
32370
32369
  }
32371
- function _class_call_check$h(instance, Constructor) {
32370
+ function _class_call_check$g(instance, Constructor) {
32372
32371
  if (!(instance instanceof Constructor)) {
32373
32372
  throw new TypeError("Cannot call a class as a function");
32374
32373
  }
32375
32374
  }
32376
- function _define_property$h(obj, key, value) {
32375
+ function _define_property$g(obj, key, value) {
32377
32376
  if (key in obj) {
32378
32377
  Object.defineProperty(obj, key, {
32379
32378
  value: value,
@@ -32431,7 +32430,7 @@ function _object_spread$9(target) {
32431
32430
  }));
32432
32431
  }
32433
32432
  ownKeys.forEach(function(key) {
32434
- _define_property$h(target, key, source[key]);
32433
+ _define_property$g(target, key, source[key]);
32435
32434
  });
32436
32435
  }
32437
32436
  return target;
@@ -32613,7 +32612,7 @@ var AxAIGroq = /*#__PURE__*/ function(AxAIOpenAI) {
32613
32612
  var _super = _create_super$8(AxAIGroq);
32614
32613
  function AxAIGroq(param) {
32615
32614
  var apiKey = param.apiKey, config = param.config, options = param.options;
32616
- _class_call_check$h(this, AxAIGroq);
32615
+ _class_call_check$g(this, AxAIGroq);
32617
32616
  var _this;
32618
32617
  if (!apiKey || apiKey === "") {
32619
32618
  throw new Error("Groq API key not set");
@@ -32629,13 +32628,13 @@ var AxAIGroq = /*#__PURE__*/ function(AxAIOpenAI) {
32629
32628
  apiURL: "https://api.groq.com/openai/v1",
32630
32629
  modelInfo: []
32631
32630
  });
32632
- _define_property$h(_assert_this_initialized$8(_this), "setOptions", function(options) {
32631
+ _define_property$g(_assert_this_initialized$8(_this), "setOptions", function(options) {
32633
32632
  var rateLimiter = _this.newRateLimiter(options);
32634
32633
  _get$3((_assert_this_initialized$8(_this), _get_prototype_of$8(AxAIGroq.prototype)), "setOptions", _this).call(_this, _object_spread_props$5(_object_spread$9({}, options), {
32635
32634
  rateLimiter: rateLimiter
32636
32635
  }));
32637
32636
  });
32638
- _define_property$h(_assert_this_initialized$8(_this), "newRateLimiter", function(options) {
32637
+ _define_property$g(_assert_this_initialized$8(_this), "newRateLimiter", function(options) {
32639
32638
  if (options === null || options === void 0 ? void 0 : options.rateLimiter) {
32640
32639
  return options.rateLimiter;
32641
32640
  }
@@ -32735,12 +32734,12 @@ function _assert_this_initialized$7(self) {
32735
32734
  }
32736
32735
  return self;
32737
32736
  }
32738
- function _class_call_check$g(instance, Constructor) {
32737
+ function _class_call_check$f(instance, Constructor) {
32739
32738
  if (!(instance instanceof Constructor)) {
32740
32739
  throw new TypeError("Cannot call a class as a function");
32741
32740
  }
32742
32741
  }
32743
- function _define_property$g(obj, key, value) {
32742
+ function _define_property$f(obj, key, value) {
32744
32743
  if (key in obj) {
32745
32744
  Object.defineProperty(obj, key, {
32746
32745
  value: value,
@@ -32798,7 +32797,7 @@ function _object_spread$8(target) {
32798
32797
  }));
32799
32798
  }
32800
32799
  ownKeys.forEach(function(key) {
32801
- _define_property$g(target, key, source[key]);
32800
+ _define_property$f(target, key, source[key]);
32802
32801
  });
32803
32802
  }
32804
32803
  return target;
@@ -32861,7 +32860,7 @@ var AxAIMistral = /*#__PURE__*/ function(AxAIOpenAI) {
32861
32860
  var _super = _create_super$7(AxAIMistral);
32862
32861
  function AxAIMistral(param) {
32863
32862
  var apiKey = param.apiKey, config = param.config, options = param.options;
32864
- _class_call_check$g(this, AxAIMistral);
32863
+ _class_call_check$f(this, AxAIMistral);
32865
32864
  if (!apiKey || apiKey === "") {
32866
32865
  throw new Error("Mistral API key not set");
32867
32866
  }
@@ -32910,12 +32909,12 @@ function _assert_this_initialized$6(self) {
32910
32909
  }
32911
32910
  return self;
32912
32911
  }
32913
- function _class_call_check$f(instance, Constructor) {
32912
+ function _class_call_check$e(instance, Constructor) {
32914
32913
  if (!(instance instanceof Constructor)) {
32915
32914
  throw new TypeError("Cannot call a class as a function");
32916
32915
  }
32917
32916
  }
32918
- function _define_property$f(obj, key, value) {
32917
+ function _define_property$e(obj, key, value) {
32919
32918
  if (key in obj) {
32920
32919
  Object.defineProperty(obj, key, {
32921
32920
  value: value,
@@ -32973,7 +32972,7 @@ function _object_spread$7(target) {
32973
32972
  }));
32974
32973
  }
32975
32974
  ownKeys.forEach(function(key) {
32976
- _define_property$f(target, key, source[key]);
32975
+ _define_property$e(target, key, source[key]);
32977
32976
  });
32978
32977
  }
32979
32978
  return target;
@@ -33036,7 +33035,7 @@ var AxAIDeepSeek = /*#__PURE__*/ function(AxAIOpenAI) {
33036
33035
  var _super = _create_super$6(AxAIDeepSeek);
33037
33036
  function AxAIDeepSeek(param) {
33038
33037
  var apiKey = param.apiKey, config = param.config, options = param.options;
33039
- _class_call_check$f(this, AxAIDeepSeek);
33038
+ _class_call_check$e(this, AxAIDeepSeek);
33040
33039
  if (!apiKey || apiKey === "") {
33041
33040
  throw new Error("DeepSeek API key not set");
33042
33041
  }
@@ -33061,12 +33060,12 @@ function _assert_this_initialized$5(self) {
33061
33060
  }
33062
33061
  return self;
33063
33062
  }
33064
- function _class_call_check$e(instance, Constructor) {
33063
+ function _class_call_check$d(instance, Constructor) {
33065
33064
  if (!(instance instanceof Constructor)) {
33066
33065
  throw new TypeError("Cannot call a class as a function");
33067
33066
  }
33068
33067
  }
33069
- function _define_property$e(obj, key, value) {
33068
+ function _define_property$d(obj, key, value) {
33070
33069
  if (key in obj) {
33071
33070
  Object.defineProperty(obj, key, {
33072
33071
  value: value,
@@ -33124,7 +33123,7 @@ function _object_spread$6(target) {
33124
33123
  }));
33125
33124
  }
33126
33125
  ownKeys.forEach(function(key) {
33127
- _define_property$e(target, key, source[key]);
33126
+ _define_property$d(target, key, source[key]);
33128
33127
  });
33129
33128
  }
33130
33129
  return target;
@@ -33215,7 +33214,7 @@ var axAIOllamaDefaultConfig = function() {
33215
33214
  var _super = _create_super$5(AxAIOllama);
33216
33215
  function AxAIOllama(param) {
33217
33216
  var _param_apiKey = param.apiKey, apiKey = _param_apiKey === void 0 ? "not-set" : _param_apiKey, _param_url = param.url, url = _param_url === void 0 ? "http://localhost:11434" : _param_url, config = param.config, options = param.options;
33218
- _class_call_check$e(this, AxAIOllama);
33217
+ _class_call_check$d(this, AxAIOllama);
33219
33218
  var _config = _object_spread$6({}, axAIOllamaDefaultConfig(), config);
33220
33219
  var _this = _super.call(this, {
33221
33220
  apiKey: apiKey,
@@ -33259,12 +33258,12 @@ function _async_to_generator$4(fn) {
33259
33258
  });
33260
33259
  };
33261
33260
  }
33262
- function _class_call_check$d(instance, Constructor) {
33261
+ function _class_call_check$c(instance, Constructor) {
33263
33262
  if (!(instance instanceof Constructor)) {
33264
33263
  throw new TypeError("Cannot call a class as a function");
33265
33264
  }
33266
33265
  }
33267
- function _defineProperties$6(target, props) {
33266
+ function _defineProperties$5(target, props) {
33268
33267
  for(var i = 0; i < props.length; i++){
33269
33268
  var descriptor = props[i];
33270
33269
  descriptor.enumerable = descriptor.enumerable || false;
@@ -33273,12 +33272,12 @@ function _defineProperties$6(target, props) {
33273
33272
  Object.defineProperty(target, descriptor.key, descriptor);
33274
33273
  }
33275
33274
  }
33276
- function _create_class$6(Constructor, protoProps, staticProps) {
33277
- if (protoProps) _defineProperties$6(Constructor.prototype, protoProps);
33278
- if (staticProps) _defineProperties$6(Constructor, staticProps);
33275
+ function _create_class$5(Constructor, protoProps, staticProps) {
33276
+ if (protoProps) _defineProperties$5(Constructor.prototype, protoProps);
33277
+ if (staticProps) _defineProperties$5(Constructor, staticProps);
33279
33278
  return Constructor;
33280
33279
  }
33281
- function _define_property$d(obj, key, value) {
33280
+ function _define_property$c(obj, key, value) {
33282
33281
  if (key in obj) {
33283
33282
  Object.defineProperty(obj, key, {
33284
33283
  value: value,
@@ -33388,8 +33387,8 @@ function _ts_generator$5(thisArg, body) {
33388
33387
  }
33389
33388
  var AxAI = /*#__PURE__*/ function() {
33390
33389
  function AxAI(options) {
33391
- _class_call_check$d(this, AxAI);
33392
- _define_property$d(this, "ai", void 0);
33390
+ _class_call_check$c(this, AxAI);
33391
+ _define_property$c(this, "ai", void 0);
33393
33392
  switch(options.name){
33394
33393
  case "openai":
33395
33394
  this.ai = new AxAIOpenAI(options);
@@ -33428,7 +33427,7 @@ var AxAI = /*#__PURE__*/ function() {
33428
33427
  throw new Error("Unknown AI");
33429
33428
  }
33430
33429
  }
33431
- _create_class$6(AxAI, [
33430
+ _create_class$5(AxAI, [
33432
33431
  {
33433
33432
  key: "setModelMap",
33434
33433
  value: function setModelMap(modelMap) {
@@ -33534,12 +33533,12 @@ function _array_like_to_array$5(arr, len) {
33534
33533
  function _array_without_holes$4(arr) {
33535
33534
  if (Array.isArray(arr)) return _array_like_to_array$5(arr);
33536
33535
  }
33537
- function _class_call_check$c(instance, Constructor) {
33536
+ function _class_call_check$b(instance, Constructor) {
33538
33537
  if (!(instance instanceof Constructor)) {
33539
33538
  throw new TypeError("Cannot call a class as a function");
33540
33539
  }
33541
33540
  }
33542
- function _defineProperties$5(target, props) {
33541
+ function _defineProperties$4(target, props) {
33543
33542
  for(var i = 0; i < props.length; i++){
33544
33543
  var descriptor = props[i];
33545
33544
  descriptor.enumerable = descriptor.enumerable || false;
@@ -33548,12 +33547,12 @@ function _defineProperties$5(target, props) {
33548
33547
  Object.defineProperty(target, descriptor.key, descriptor);
33549
33548
  }
33550
33549
  }
33551
- function _create_class$5(Constructor, protoProps, staticProps) {
33552
- if (protoProps) _defineProperties$5(Constructor.prototype, protoProps);
33553
- if (staticProps) _defineProperties$5(Constructor, staticProps);
33550
+ function _create_class$4(Constructor, protoProps, staticProps) {
33551
+ if (protoProps) _defineProperties$4(Constructor.prototype, protoProps);
33552
+ if (staticProps) _defineProperties$4(Constructor, staticProps);
33554
33553
  return Constructor;
33555
33554
  }
33556
- function _define_property$c(obj, key, value) {
33555
+ function _define_property$b(obj, key, value) {
33557
33556
  if (key in obj) {
33558
33557
  Object.defineProperty(obj, key, {
33559
33558
  value: value,
@@ -33582,7 +33581,7 @@ function _object_spread$5(target) {
33582
33581
  }));
33583
33582
  }
33584
33583
  ownKeys.forEach(function(key) {
33585
- _define_property$c(target, key, source[key]);
33584
+ _define_property$b(target, key, source[key]);
33586
33585
  });
33587
33586
  }
33588
33587
  return target;
@@ -33601,16 +33600,16 @@ function _unsupported_iterable_to_array$5(o, minLen) {
33601
33600
  var AxMemory = /*#__PURE__*/ function() {
33602
33601
  function AxMemory() {
33603
33602
  var limit = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 50;
33604
- _class_call_check$c(this, AxMemory);
33605
- _define_property$c(this, "data", []);
33606
- _define_property$c(this, "sdata", new Map());
33607
- _define_property$c(this, "limit", void 0);
33603
+ _class_call_check$b(this, AxMemory);
33604
+ _define_property$b(this, "data", []);
33605
+ _define_property$b(this, "sdata", new Map());
33606
+ _define_property$b(this, "limit", void 0);
33608
33607
  if (limit <= 0) {
33609
33608
  throw Error("argument 'last' must be greater than 0");
33610
33609
  }
33611
33610
  this.limit = limit;
33612
33611
  }
33613
- _create_class$5(AxMemory, [
33612
+ _create_class$4(AxMemory, [
33614
33613
  {
33615
33614
  key: "add",
33616
33615
  value: function add(value, sessionId) {
@@ -33759,7 +33758,7 @@ function _assert_this_initialized$4(self) {
33759
33758
  }
33760
33759
  return self;
33761
33760
  }
33762
- function _class_call_check$b(instance, Constructor) {
33761
+ function _class_call_check$a(instance, Constructor) {
33763
33762
  if (!(instance instanceof Constructor)) {
33764
33763
  throw new TypeError("Cannot call a class as a function");
33765
33764
  }
@@ -33781,7 +33780,7 @@ function _construct$1(Parent, args, Class) {
33781
33780
  }
33782
33781
  return _construct$1.apply(null, arguments);
33783
33782
  }
33784
- function _define_property$b(obj, key, value) {
33783
+ function _define_property$a(obj, key, value) {
33785
33784
  if (key in obj) {
33786
33785
  Object.defineProperty(obj, key, {
33787
33786
  value: value,
@@ -33888,19 +33887,19 @@ var AxAssertionError = /*#__PURE__*/ function(Error1) {
33888
33887
  var _super = _create_super$4(AxAssertionError);
33889
33888
  function AxAssertionError(param) {
33890
33889
  var message = param.message, values = param.values, optional = param.optional;
33891
- _class_call_check$b(this, AxAssertionError);
33890
+ _class_call_check$a(this, AxAssertionError);
33892
33891
  var _this;
33893
33892
  _this = _super.call(this, message);
33894
- _define_property$b(_assert_this_initialized$4(_this), "values", void 0);
33895
- _define_property$b(_assert_this_initialized$4(_this), "optional", void 0);
33896
- _define_property$b(_assert_this_initialized$4(_this), "getValue", function() {
33893
+ _define_property$a(_assert_this_initialized$4(_this), "values", void 0);
33894
+ _define_property$a(_assert_this_initialized$4(_this), "optional", void 0);
33895
+ _define_property$a(_assert_this_initialized$4(_this), "getValue", function() {
33897
33896
  return _this.values;
33898
33897
  });
33899
- _define_property$b(_assert_this_initialized$4(_this), "getOptional", function() {
33898
+ _define_property$a(_assert_this_initialized$4(_this), "getOptional", function() {
33900
33899
  return _this.optional;
33901
33900
  });
33902
33901
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
33903
- _define_property$b(_assert_this_initialized$4(_this), "getFixingInstructions", function(_sig) {
33902
+ _define_property$a(_assert_this_initialized$4(_this), "getFixingInstructions", function(_sig) {
33904
33903
  var extraFields = [];
33905
33904
  // for (const f of sig.getOutputFields()) {
33906
33905
  // extraFields.push({
@@ -35250,7 +35249,7 @@ var lib = JSON5;
35250
35249
  }
35251
35250
  return self;
35252
35251
  }
35253
- function _class_call_check$a(instance, Constructor) {
35252
+ function _class_call_check$9(instance, Constructor) {
35254
35253
  if (!(instance instanceof Constructor)) {
35255
35254
  throw new TypeError("Cannot call a class as a function");
35256
35255
  }
@@ -35272,7 +35271,7 @@ function _construct(Parent, args, Class) {
35272
35271
  }
35273
35272
  return _construct.apply(null, arguments);
35274
35273
  }
35275
- function _define_property$a(obj, key, value) {
35274
+ function _define_property$9(obj, key, value) {
35276
35275
  if (key in obj) {
35277
35276
  Object.defineProperty(obj, key, {
35278
35277
  value: value,
@@ -35527,18 +35526,18 @@ var ValidationError = /*#__PURE__*/ function(Error1) {
35527
35526
  var _super = _create_super$3(ValidationError);
35528
35527
  function ValidationError(param) {
35529
35528
  var message = param.message, field = param.field, value = param.value;
35530
- _class_call_check$a(this, ValidationError);
35529
+ _class_call_check$9(this, ValidationError);
35531
35530
  var _this;
35532
35531
  _this = _super.call(this, message);
35533
- _define_property$a(_assert_this_initialized$3(_this), "field", void 0);
35534
- _define_property$a(_assert_this_initialized$3(_this), "value", void 0);
35535
- _define_property$a(_assert_this_initialized$3(_this), "getField", function() {
35532
+ _define_property$9(_assert_this_initialized$3(_this), "field", void 0);
35533
+ _define_property$9(_assert_this_initialized$3(_this), "value", void 0);
35534
+ _define_property$9(_assert_this_initialized$3(_this), "getField", function() {
35536
35535
  return _this.field;
35537
35536
  });
35538
- _define_property$a(_assert_this_initialized$3(_this), "getValue", function() {
35537
+ _define_property$9(_assert_this_initialized$3(_this), "getValue", function() {
35539
35538
  return _this.value;
35540
35539
  });
35541
- _define_property$a(_assert_this_initialized$3(_this), "getFixingInstructions", function() {
35540
+ _define_property$9(_assert_this_initialized$3(_this), "getFixingInstructions", function() {
35542
35541
  var f = _this.field;
35543
35542
  var extraFields = [
35544
35543
  {
@@ -35700,12 +35699,12 @@ function _async_to_generator$3(fn) {
35700
35699
  });
35701
35700
  };
35702
35701
  }
35703
- function _class_call_check$9(instance, Constructor) {
35702
+ function _class_call_check$8(instance, Constructor) {
35704
35703
  if (!(instance instanceof Constructor)) {
35705
35704
  throw new TypeError("Cannot call a class as a function");
35706
35705
  }
35707
35706
  }
35708
- function _define_property$9(obj, key, value) {
35707
+ function _define_property$8(obj, key, value) {
35709
35708
  if (key in obj) {
35710
35709
  Object.defineProperty(obj, key, {
35711
35710
  value: value,
@@ -35814,9 +35813,9 @@ function _ts_generator$4(thisArg, body) {
35814
35813
  }
35815
35814
  }
35816
35815
  var AxFunctionProcessor = function AxFunctionProcessor(funcList) {
35817
- _class_call_check$9(this, AxFunctionProcessor);
35818
- _define_property$9(this, "funcList", void 0);
35819
- _define_property$9(this, "executeFunction", function() {
35816
+ _class_call_check$8(this, AxFunctionProcessor);
35817
+ _define_property$8(this, "funcList", void 0);
35818
+ _define_property$8(this, "executeFunction", function() {
35820
35819
  var _ref = _async_to_generator$3(function(fnSpec, func, options) {
35821
35820
  var args, opt, res, _tmp, res1, _tmp1;
35822
35821
  return _ts_generator$4(this, function(_state) {
@@ -35909,7 +35908,7 @@ var AxFunctionProcessor = function AxFunctionProcessor(funcList) {
35909
35908
  };
35910
35909
  }());
35911
35910
  var _this = this;
35912
- _define_property$9(this, "execute", function() {
35911
+ _define_property$8(this, "execute", function() {
35913
35912
  var _ref = _async_to_generator$3(function(func, options) {
35914
35913
  var fnSpec;
35915
35914
  return _ts_generator$4(this, function(_state) {
@@ -35950,12 +35949,12 @@ var AxFunctionProcessor = function AxFunctionProcessor(funcList) {
35950
35949
  }
35951
35950
  ;
35952
35951
 
35953
- function _class_call_check$8(instance, Constructor) {
35952
+ function _class_call_check$7(instance, Constructor) {
35954
35953
  if (!(instance instanceof Constructor)) {
35955
35954
  throw new TypeError("Cannot call a class as a function");
35956
35955
  }
35957
35956
  }
35958
- function _defineProperties$4(target, props) {
35957
+ function _defineProperties$3(target, props) {
35959
35958
  for(var i = 0; i < props.length; i++){
35960
35959
  var descriptor = props[i];
35961
35960
  descriptor.enumerable = descriptor.enumerable || false;
@@ -35964,12 +35963,12 @@ function _defineProperties$4(target, props) {
35964
35963
  Object.defineProperty(target, descriptor.key, descriptor);
35965
35964
  }
35966
35965
  }
35967
- function _create_class$4(Constructor, protoProps, staticProps) {
35968
- if (protoProps) _defineProperties$4(Constructor.prototype, protoProps);
35969
- if (staticProps) _defineProperties$4(Constructor, staticProps);
35966
+ function _create_class$3(Constructor, protoProps, staticProps) {
35967
+ if (protoProps) _defineProperties$3(Constructor.prototype, protoProps);
35968
+ if (staticProps) _defineProperties$3(Constructor, staticProps);
35970
35969
  return Constructor;
35971
35970
  }
35972
- function _define_property$8(obj, key, value) {
35971
+ function _define_property$7(obj, key, value) {
35973
35972
  if (key in obj) {
35974
35973
  Object.defineProperty(obj, key, {
35975
35974
  value: value,
@@ -36080,12 +36079,12 @@ function _ts_generator$3(thisArg, body) {
36080
36079
  var _Symbol_iterator = Symbol.iterator;
36081
36080
  var AxInstanceRegistry = /*#__PURE__*/ function() {
36082
36081
  function AxInstanceRegistry() {
36083
- _class_call_check$8(this, AxInstanceRegistry);
36084
- _define_property$8(this, "reg", void 0 // To track keys for iteration
36082
+ _class_call_check$7(this, AxInstanceRegistry);
36083
+ _define_property$7(this, "reg", void 0 // To track keys for iteration
36085
36084
  );
36086
36085
  this.reg = new Set();
36087
36086
  }
36088
- _create_class$4(AxInstanceRegistry, [
36087
+ _create_class$3(AxInstanceRegistry, [
36089
36088
  {
36090
36089
  key: "register",
36091
36090
  value: function register(instance) {
@@ -37626,12 +37625,12 @@ function _array_like_to_array$4(arr, len) {
37626
37625
  function _array_with_holes(arr) {
37627
37626
  if (Array.isArray(arr)) return arr;
37628
37627
  }
37629
- function _class_call_check$7(instance, Constructor) {
37628
+ function _class_call_check$6(instance, Constructor) {
37630
37629
  if (!(instance instanceof Constructor)) {
37631
37630
  throw new TypeError("Cannot call a class as a function");
37632
37631
  }
37633
37632
  }
37634
- function _define_property$7(obj, key, value) {
37633
+ function _define_property$6(obj, key, value) {
37635
37634
  if (key in obj) {
37636
37635
  Object.defineProperty(obj, key, {
37637
37636
  value: value,
@@ -37688,7 +37687,7 @@ function _object_spread$4(target) {
37688
37687
  }));
37689
37688
  }
37690
37689
  ownKeys.forEach(function(key) {
37691
- _define_property$7(target, key, source[key]);
37690
+ _define_property$6(target, key, source[key]);
37692
37691
  });
37693
37692
  }
37694
37693
  return target;
@@ -37730,13 +37729,13 @@ function _unsupported_iterable_to_array$4(o, minLen) {
37730
37729
  }
37731
37730
  var AxSignature = function AxSignature(signature) {
37732
37731
  var _this = this;
37733
- _class_call_check$7(this, AxSignature);
37734
- _define_property$7(this, "description", void 0);
37735
- _define_property$7(this, "inputFields", void 0);
37736
- _define_property$7(this, "outputFields", void 0);
37737
- _define_property$7(this, "sigHash", void 0);
37738
- _define_property$7(this, "sigString", void 0);
37739
- _define_property$7(this, "parseParsedField", function(field) {
37732
+ _class_call_check$6(this, AxSignature);
37733
+ _define_property$6(this, "description", void 0);
37734
+ _define_property$6(this, "inputFields", void 0);
37735
+ _define_property$6(this, "outputFields", void 0);
37736
+ _define_property$6(this, "sigHash", void 0);
37737
+ _define_property$6(this, "sigString", void 0);
37738
+ _define_property$6(this, "parseParsedField", function(field) {
37740
37739
  if (!field.name || field.name.length === 0) {
37741
37740
  throw new Error("Field name is required.");
37742
37741
  }
@@ -37753,7 +37752,7 @@ var AxSignature = function AxSignature(signature) {
37753
37752
  }
37754
37753
  };
37755
37754
  });
37756
- _define_property$7(this, "parseField", function(field) {
37755
+ _define_property$6(this, "parseField", function(field) {
37757
37756
  var title = !field.title || field.title.length === 0 ? _this.toTitle(field.name) : field.title;
37758
37757
  if (field.type && (!field.type.name || field.type.name.length === 0)) {
37759
37758
  throw new Error("Field type name is required: " + field.name);
@@ -37762,45 +37761,45 @@ var AxSignature = function AxSignature(signature) {
37762
37761
  title: title
37763
37762
  });
37764
37763
  });
37765
- _define_property$7(this, "setDescription", function(desc) {
37764
+ _define_property$6(this, "setDescription", function(desc) {
37766
37765
  _this.description = desc;
37767
37766
  _this.updateHash();
37768
37767
  });
37769
- _define_property$7(this, "addInputField", function(field) {
37768
+ _define_property$6(this, "addInputField", function(field) {
37770
37769
  _this.inputFields.push(_this.parseField(field));
37771
37770
  _this.updateHash();
37772
37771
  });
37773
- _define_property$7(this, "addOutputField", function(field) {
37772
+ _define_property$6(this, "addOutputField", function(field) {
37774
37773
  _this.outputFields.push(_this.parseField(field));
37775
37774
  _this.updateHash();
37776
37775
  });
37777
- _define_property$7(this, "setInputFields", function(fields) {
37776
+ _define_property$6(this, "setInputFields", function(fields) {
37778
37777
  _this.inputFields = fields.map(function(v) {
37779
37778
  return _this.parseField(v);
37780
37779
  });
37781
37780
  _this.updateHash();
37782
37781
  });
37783
- _define_property$7(this, "setOutputFields", function(fields) {
37782
+ _define_property$6(this, "setOutputFields", function(fields) {
37784
37783
  _this.outputFields = fields.map(function(v) {
37785
37784
  return _this.parseField(v);
37786
37785
  });
37787
37786
  _this.updateHash();
37788
37787
  });
37789
- _define_property$7(this, "getInputFields", function() {
37788
+ _define_property$6(this, "getInputFields", function() {
37790
37789
  return _this.inputFields;
37791
37790
  });
37792
- _define_property$7(this, "getOutputFields", function() {
37791
+ _define_property$6(this, "getOutputFields", function() {
37793
37792
  return _this.outputFields;
37794
37793
  });
37795
- _define_property$7(this, "getDescription", function() {
37794
+ _define_property$6(this, "getDescription", function() {
37796
37795
  return _this.description;
37797
37796
  });
37798
- _define_property$7(this, "toTitle", function(name) {
37797
+ _define_property$6(this, "toTitle", function(name) {
37799
37798
  var result = name.replaceAll("_", " ");
37800
37799
  result = result.replace(/([A-Z]|[0-9]+)/g, " $1").trim();
37801
37800
  return result.charAt(0).toUpperCase() + result.slice(1);
37802
37801
  });
37803
- _define_property$7(this, "toJSONSchema", function() {
37802
+ _define_property$6(this, "toJSONSchema", function() {
37804
37803
  var properties = {};
37805
37804
  var required = [];
37806
37805
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
@@ -37849,7 +37848,7 @@ var AxSignature = function AxSignature(signature) {
37849
37848
  };
37850
37849
  return schema;
37851
37850
  });
37852
- _define_property$7(this, "updateHash", function() {
37851
+ _define_property$6(this, "updateHash", function() {
37853
37852
  _this.getInputFields().forEach(function(field) {
37854
37853
  validateField(field);
37855
37854
  });
@@ -37868,10 +37867,10 @@ var AxSignature = function AxSignature(signature) {
37868
37867
  _this.sigString
37869
37868
  ];
37870
37869
  });
37871
- _define_property$7(this, "hash", function() {
37870
+ _define_property$6(this, "hash", function() {
37872
37871
  return _this.sigHash;
37873
37872
  });
37874
- _define_property$7(this, "toString", function() {
37873
+ _define_property$6(this, "toString", function() {
37875
37874
  return _this.sigString;
37876
37875
  });
37877
37876
  if (typeof signature === "string") {
@@ -37956,7 +37955,7 @@ function validateField(field) {
37956
37955
  }
37957
37956
  }
37958
37957
 
37959
- /* eslint-disable @typescript-eslint/naming-convention */ function _define_property$6(obj, key, value) {
37958
+ /* eslint-disable @typescript-eslint/naming-convention */ function _define_property$5(obj, key, value) {
37960
37959
  if (key in obj) {
37961
37960
  Object.defineProperty(obj, key, {
37962
37961
  value: value,
@@ -37979,7 +37978,7 @@ function _object_spread$3(target) {
37979
37978
  }));
37980
37979
  }
37981
37980
  ownKeys.forEach(function(key) {
37982
- _define_property$6(target, key, source[key]);
37981
+ _define_property$5(target, key, source[key]);
37983
37982
  });
37984
37983
  }
37985
37984
  return target;
@@ -38102,12 +38101,12 @@ function _async_to_generator$2(fn) {
38102
38101
  });
38103
38102
  };
38104
38103
  }
38105
- function _class_call_check$6(instance, Constructor) {
38104
+ function _class_call_check$5(instance, Constructor) {
38106
38105
  if (!(instance instanceof Constructor)) {
38107
38106
  throw new TypeError("Cannot call a class as a function");
38108
38107
  }
38109
38108
  }
38110
- function _defineProperties$3(target, props) {
38109
+ function _defineProperties$2(target, props) {
38111
38110
  for(var i = 0; i < props.length; i++){
38112
38111
  var descriptor = props[i];
38113
38112
  descriptor.enumerable = descriptor.enumerable || false;
@@ -38116,12 +38115,12 @@ function _defineProperties$3(target, props) {
38116
38115
  Object.defineProperty(target, descriptor.key, descriptor);
38117
38116
  }
38118
38117
  }
38119
- function _create_class$3(Constructor, protoProps, staticProps) {
38120
- if (protoProps) _defineProperties$3(Constructor.prototype, protoProps);
38121
- if (staticProps) _defineProperties$3(Constructor, staticProps);
38118
+ function _create_class$2(Constructor, protoProps, staticProps) {
38119
+ if (protoProps) _defineProperties$2(Constructor.prototype, protoProps);
38120
+ if (staticProps) _defineProperties$2(Constructor, staticProps);
38122
38121
  return Constructor;
38123
38122
  }
38124
- function _define_property$5(obj, key, value) {
38123
+ function _define_property$4(obj, key, value) {
38125
38124
  if (key in obj) {
38126
38125
  Object.defineProperty(obj, key, {
38127
38126
  value: value,
@@ -38248,16 +38247,16 @@ function _ts_generator$2(thisArg, body) {
38248
38247
  }
38249
38248
  var AxProgramWithSignature = /*#__PURE__*/ function() {
38250
38249
  function AxProgramWithSignature(signature) {
38251
- _class_call_check$6(this, AxProgramWithSignature);
38250
+ _class_call_check$5(this, AxProgramWithSignature);
38252
38251
  var _this_signature;
38253
- _define_property$5(this, "signature", void 0);
38254
- _define_property$5(this, "sigHash", void 0);
38255
- _define_property$5(this, "examples", void 0);
38256
- _define_property$5(this, "demos", void 0);
38257
- _define_property$5(this, "trace", void 0);
38258
- _define_property$5(this, "usage", []);
38259
- _define_property$5(this, "key", void 0);
38260
- _define_property$5(this, "children", void 0);
38252
+ _define_property$4(this, "signature", void 0);
38253
+ _define_property$4(this, "sigHash", void 0);
38254
+ _define_property$4(this, "examples", void 0);
38255
+ _define_property$4(this, "demos", void 0);
38256
+ _define_property$4(this, "trace", void 0);
38257
+ _define_property$4(this, "usage", []);
38258
+ _define_property$4(this, "key", void 0);
38259
+ _define_property$4(this, "children", void 0);
38261
38260
  this.signature = new AxSignature(signature);
38262
38261
  this.sigHash = (_this_signature = this.signature) === null || _this_signature === void 0 ? void 0 : _this_signature.hash();
38263
38262
  this.children = new AxInstanceRegistry();
@@ -38265,7 +38264,7 @@ var AxProgramWithSignature = /*#__PURE__*/ function() {
38265
38264
  id: this.constructor.name
38266
38265
  };
38267
38266
  }
38268
- _create_class$3(AxProgramWithSignature, [
38267
+ _create_class$2(AxProgramWithSignature, [
38269
38268
  {
38270
38269
  key: "getSignature",
38271
38270
  value: function getSignature() {
@@ -38538,12 +38537,12 @@ function _array_like_to_array$2(arr, len) {
38538
38537
  function _array_without_holes$2(arr) {
38539
38538
  if (Array.isArray(arr)) return _array_like_to_array$2(arr);
38540
38539
  }
38541
- function _class_call_check$5(instance, Constructor) {
38540
+ function _class_call_check$4(instance, Constructor) {
38542
38541
  if (!(instance instanceof Constructor)) {
38543
38542
  throw new TypeError("Cannot call a class as a function");
38544
38543
  }
38545
38544
  }
38546
- function _define_property$4(obj, key, value) {
38545
+ function _define_property$3(obj, key, value) {
38547
38546
  if (key in obj) {
38548
38547
  Object.defineProperty(obj, key, {
38549
38548
  value: value,
@@ -38575,12 +38574,12 @@ function _unsupported_iterable_to_array$2(o, minLen) {
38575
38574
  }
38576
38575
  var AxPromptTemplate = function AxPromptTemplate(sig, fieldTemplates) {
38577
38576
  var _this = this;
38578
- _class_call_check$5(this, AxPromptTemplate);
38579
- _define_property$4(this, "sig", void 0);
38580
- _define_property$4(this, "fieldTemplates", void 0);
38581
- _define_property$4(this, "task", void 0);
38582
- _define_property$4(this, "outputFormat", void 0);
38583
- _define_property$4(this, "render", function(values, param) {
38577
+ _class_call_check$4(this, AxPromptTemplate);
38578
+ _define_property$3(this, "sig", void 0);
38579
+ _define_property$3(this, "fieldTemplates", void 0);
38580
+ _define_property$3(this, "task", void 0);
38581
+ _define_property$3(this, "outputFormat", void 0);
38582
+ _define_property$3(this, "render", function(values, param) {
38584
38583
  var examples = param.examples, demos = param.demos;
38585
38584
  var renderedExamples = examples ? [
38586
38585
  {
@@ -38607,7 +38606,7 @@ var AxPromptTemplate = function AxPromptTemplate(sig, fieldTemplates) {
38607
38606
  }
38608
38607
  return prompt.reduce(combineConsecutiveStrings("\n"), []);
38609
38608
  });
38610
- _define_property$4(this, "renderExtraFields", function(extraFields) {
38609
+ _define_property$3(this, "renderExtraFields", function(extraFields) {
38611
38610
  var prompt = [];
38612
38611
  if (extraFields && extraFields.length > 0) {
38613
38612
  extraFields.forEach(function(field) {
@@ -38630,7 +38629,7 @@ var AxPromptTemplate = function AxPromptTemplate(sig, fieldTemplates) {
38630
38629
  }
38631
38630
  return prompt.reduce(combineConsecutiveStrings("\n"), []);
38632
38631
  });
38633
- _define_property$4(this, "renderExamples", function(data) {
38632
+ _define_property$3(this, "renderExamples", function(data) {
38634
38633
  var list = [];
38635
38634
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
38636
38635
  try {
@@ -38683,7 +38682,7 @@ var AxPromptTemplate = function AxPromptTemplate(sig, fieldTemplates) {
38683
38682
  }
38684
38683
  return list;
38685
38684
  });
38686
- _define_property$4(this, "renderDemos", function(data) {
38685
+ _define_property$3(this, "renderDemos", function(data) {
38687
38686
  var list = [];
38688
38687
  var fields = _to_consumable_array$2(_this.sig.getInputFields()).concat(_to_consumable_array$2(_this.sig.getOutputFields()));
38689
38688
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
@@ -38728,7 +38727,7 @@ var AxPromptTemplate = function AxPromptTemplate(sig, fieldTemplates) {
38728
38727
  }
38729
38728
  return list;
38730
38729
  });
38731
- _define_property$4(this, "renderInputFields", function(values) {
38730
+ _define_property$3(this, "renderInputFields", function(values) {
38732
38731
  var renderedItems = _this.sig.getInputFields().map(function(field) {
38733
38732
  return _this.renderInField(field, values);
38734
38733
  }).filter(function(v) {
@@ -38741,7 +38740,7 @@ var AxPromptTemplate = function AxPromptTemplate(sig, fieldTemplates) {
38741
38740
  });
38742
38741
  return renderedItems;
38743
38742
  });
38744
- _define_property$4(this, "renderInField", function(field, values, skipMissing) {
38743
+ _define_property$3(this, "renderInField", function(field, values, skipMissing) {
38745
38744
  var _this_fieldTemplates;
38746
38745
  var _this_fieldTemplates_field_name;
38747
38746
  var textFieldFn = (_this_fieldTemplates_field_name = (_this_fieldTemplates = _this.fieldTemplates) === null || _this_fieldTemplates === void 0 ? void 0 : _this_fieldTemplates[field.name]) !== null && _this_fieldTemplates_field_name !== void 0 ? _this_fieldTemplates_field_name : _this.defaultRenderInField;
@@ -38761,7 +38760,7 @@ var AxPromptTemplate = function AxPromptTemplate(sig, fieldTemplates) {
38761
38760
  var processedValue = processValue(field, value);
38762
38761
  return textFieldFn(field, processedValue);
38763
38762
  });
38764
- _define_property$4(this, "defaultRenderInField", function(field, value) {
38763
+ _define_property$3(this, "defaultRenderInField", function(field, value) {
38765
38764
  var _field_type;
38766
38765
  if (((_field_type = field.type) === null || _field_type === void 0 ? void 0 : _field_type.name) === "image") {
38767
38766
  if (typeof value !== "object") {
@@ -38801,14 +38800,14 @@ var AxPromptTemplate = function AxPromptTemplate(sig, fieldTemplates) {
38801
38800
  }
38802
38801
  ];
38803
38802
  });
38804
- _define_property$4(this, "renderDescFields", function(list) {
38803
+ _define_property$3(this, "renderDescFields", function(list) {
38805
38804
  return list.map(function(v) {
38806
38805
  return "`".concat(v.title, "`");
38807
38806
  }).join(", ");
38808
38807
  });
38809
38808
  // private renderInFields = (list: readonly Field[]) =>
38810
38809
  // list.map((v) => v.title + ': ' + (v.description ?? toVar(v.name)));
38811
- _define_property$4(this, "renderOutFields", function(list) {
38810
+ _define_property$3(this, "renderOutFields", function(list) {
38812
38811
  return list.map(function(v) {
38813
38812
  var _v_description;
38814
38813
  return [
@@ -38980,12 +38979,12 @@ function _async_to_generator$1(fn) {
38980
38979
  });
38981
38980
  };
38982
38981
  }
38983
- function _class_call_check$4(instance, Constructor) {
38982
+ function _class_call_check$3(instance, Constructor) {
38984
38983
  if (!(instance instanceof Constructor)) {
38985
38984
  throw new TypeError("Cannot call a class as a function");
38986
38985
  }
38987
38986
  }
38988
- function _defineProperties$2(target, props) {
38987
+ function _defineProperties$1(target, props) {
38989
38988
  for(var i = 0; i < props.length; i++){
38990
38989
  var descriptor = props[i];
38991
38990
  descriptor.enumerable = descriptor.enumerable || false;
@@ -38994,12 +38993,12 @@ function _defineProperties$2(target, props) {
38994
38993
  Object.defineProperty(target, descriptor.key, descriptor);
38995
38994
  }
38996
38995
  }
38997
- function _create_class$2(Constructor, protoProps, staticProps) {
38998
- if (protoProps) _defineProperties$2(Constructor.prototype, protoProps);
38999
- if (staticProps) _defineProperties$2(Constructor, staticProps);
38996
+ function _create_class$1(Constructor, protoProps, staticProps) {
38997
+ if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);
38998
+ if (staticProps) _defineProperties$1(Constructor, staticProps);
39000
38999
  return Constructor;
39001
39000
  }
39002
- function _define_property$3(obj, key, value) {
39001
+ function _define_property$2(obj, key, value) {
39003
39002
  if (key in obj) {
39004
39003
  Object.defineProperty(obj, key, {
39005
39004
  value: value,
@@ -39048,7 +39047,7 @@ function _object_spread$2(target) {
39048
39047
  }));
39049
39048
  }
39050
39049
  ownKeys.forEach(function(key) {
39051
- _define_property$3(target, key, source[key]);
39050
+ _define_property$2(target, key, source[key]);
39052
39051
  });
39053
39052
  }
39054
39053
  return target;
@@ -39217,19 +39216,19 @@ var AxGenerate = /*#__PURE__*/ function(AxProgramWithSignature) {
39217
39216
  _inherits$2(AxGenerate, AxProgramWithSignature);
39218
39217
  var _super = _create_super$2(AxGenerate);
39219
39218
  function AxGenerate(ai, signature, options) {
39220
- _class_call_check$4(this, AxGenerate);
39219
+ _class_call_check$3(this, AxGenerate);
39221
39220
  var _this;
39222
39221
  var _options_functions, _this_options, _this_options1, _this_functions;
39223
39222
  _this = _super.call(this, signature);
39224
- _define_property$3(_assert_this_initialized$2(_this), "ai", void 0);
39225
- _define_property$3(_assert_this_initialized$2(_this), "pt", void 0);
39226
- _define_property$3(_assert_this_initialized$2(_this), "asserts", void 0);
39227
- _define_property$3(_assert_this_initialized$2(_this), "streamingAsserts", void 0);
39228
- _define_property$3(_assert_this_initialized$2(_this), "options", void 0);
39229
- _define_property$3(_assert_this_initialized$2(_this), "functions", void 0);
39230
- _define_property$3(_assert_this_initialized$2(_this), "funcProc", void 0);
39231
- _define_property$3(_assert_this_initialized$2(_this), "functionList", void 0);
39232
- _define_property$3(_assert_this_initialized$2(_this), "updateSigForFunctions", function() {
39223
+ _define_property$2(_assert_this_initialized$2(_this), "ai", void 0);
39224
+ _define_property$2(_assert_this_initialized$2(_this), "pt", void 0);
39225
+ _define_property$2(_assert_this_initialized$2(_this), "asserts", void 0);
39226
+ _define_property$2(_assert_this_initialized$2(_this), "streamingAsserts", void 0);
39227
+ _define_property$2(_assert_this_initialized$2(_this), "options", void 0);
39228
+ _define_property$2(_assert_this_initialized$2(_this), "functions", void 0);
39229
+ _define_property$2(_assert_this_initialized$2(_this), "funcProc", void 0);
39230
+ _define_property$2(_assert_this_initialized$2(_this), "functionList", void 0);
39231
+ _define_property$2(_assert_this_initialized$2(_this), "updateSigForFunctions", function() {
39233
39232
  // AI supports function calling natively so
39234
39233
  // no need to add fields for function call
39235
39234
  if (_this.ai.getFeatures().functions) {
@@ -39247,14 +39246,14 @@ var AxGenerate = /*#__PURE__*/ function(AxProgramWithSignature) {
39247
39246
  isOptional: true
39248
39247
  });
39249
39248
  });
39250
- _define_property$3(_assert_this_initialized$2(_this), "addAssert", function(fn, message, optional) {
39249
+ _define_property$2(_assert_this_initialized$2(_this), "addAssert", function(fn, message, optional) {
39251
39250
  _this.asserts.push({
39252
39251
  fn: fn,
39253
39252
  message: message,
39254
39253
  optional: optional
39255
39254
  });
39256
39255
  });
39257
- _define_property$3(_assert_this_initialized$2(_this), "addStreamingAssert", function(fieldName, fn, message, optional) {
39256
+ _define_property$2(_assert_this_initialized$2(_this), "addStreamingAssert", function(fieldName, fn, message, optional) {
39258
39257
  _this.streamingAsserts.push({
39259
39258
  fieldName: fieldName,
39260
39259
  fn: fn,
@@ -39263,7 +39262,7 @@ var AxGenerate = /*#__PURE__*/ function(AxProgramWithSignature) {
39263
39262
  });
39264
39263
  });
39265
39264
  var _this1 = _assert_this_initialized$2(_this);
39266
- _define_property$3(_assert_this_initialized$2(_this), "processFunctions", function() {
39265
+ _define_property$2(_assert_this_initialized$2(_this), "processFunctions", function() {
39267
39266
  var _ref = _async_to_generator$1(function(functionCalls, mem, sessionId, traceId) {
39268
39267
  var promises, results;
39269
39268
  return _ts_generator$1(this, function(_state) {
@@ -39332,7 +39331,7 @@ var AxGenerate = /*#__PURE__*/ function(AxProgramWithSignature) {
39332
39331
  }
39333
39332
  return _this;
39334
39333
  }
39335
- _create_class$2(AxGenerate, [
39334
+ _create_class$1(AxGenerate, [
39336
39335
  {
39337
39336
  key: "forwardSendRequest",
39338
39337
  value: function forwardSendRequest(param) {
@@ -39871,7 +39870,7 @@ var AxGenerate = /*#__PURE__*/ function(AxProgramWithSignature) {
39871
39870
  _state.sent()
39872
39871
  ];
39873
39872
  case 2:
39874
- attributes = (_obj = {}, _define_property$3(_obj, "generate.signature", _this.signature.toString()), _define_property$3(_obj, "generate.functions", (_this_functionList = _this.functionList) !== null && _this_functionList !== void 0 ? _this_functionList : "none"), _obj);
39873
+ attributes = (_obj = {}, _define_property$2(_obj, "generate.signature", _this.signature.toString()), _define_property$2(_obj, "generate.functions", (_this_functionList = _this.functionList) !== null && _this_functionList !== void 0 ? _this_functionList : "none"), _obj);
39875
39874
  return [
39876
39875
  4,
39877
39876
  tracer.startActiveSpan("Generate", {
@@ -39952,7 +39951,7 @@ function _assert_this_initialized$1(self) {
39952
39951
  }
39953
39952
  return self;
39954
39953
  }
39955
- function _class_call_check$3(instance, Constructor) {
39954
+ function _class_call_check$2(instance, Constructor) {
39956
39955
  if (!(instance instanceof Constructor)) {
39957
39956
  throw new TypeError("Cannot call a class as a function");
39958
39957
  }
@@ -40038,7 +40037,7 @@ var AxChainOfThought = /*#__PURE__*/ function(AxGenerate) {
40038
40037
  _inherits$1(AxChainOfThought, AxGenerate);
40039
40038
  var _super = _create_super$1(AxChainOfThought);
40040
40039
  function AxChainOfThought(ai, signature, options) {
40041
- _class_call_check$3(this, AxChainOfThought);
40040
+ _class_call_check$2(this, AxChainOfThought);
40042
40041
  var sig = new AxSignature(signature);
40043
40042
  var description = "Let's work this out in a step by step way in order to ensure we have the right answer.";
40044
40043
  sig.setOutputFields([
@@ -40059,12 +40058,12 @@ function _assert_this_initialized(self) {
40059
40058
  }
40060
40059
  return self;
40061
40060
  }
40062
- function _class_call_check$2(instance, Constructor) {
40061
+ function _class_call_check$1(instance, Constructor) {
40063
40062
  if (!(instance instanceof Constructor)) {
40064
40063
  throw new TypeError("Cannot call a class as a function");
40065
40064
  }
40066
40065
  }
40067
- function _define_property$2(obj, key, value) {
40066
+ function _define_property$1(obj, key, value) {
40068
40067
  if (key in obj) {
40069
40068
  Object.defineProperty(obj, key, {
40070
40069
  value: value,
@@ -40106,7 +40105,7 @@ function _object_spread$1(target) {
40106
40105
  }));
40107
40106
  }
40108
40107
  ownKeys.forEach(function(key) {
40109
- _define_property$2(target, key, source[key]);
40108
+ _define_property$1(target, key, source[key]);
40110
40109
  });
40111
40110
  }
40112
40111
  return target;
@@ -40180,7 +40179,7 @@ var AxReAct = /*#__PURE__*/ function(AxChainOfThought) {
40180
40179
  _inherits(AxReAct, AxChainOfThought);
40181
40180
  var _super = _create_super(AxReAct);
40182
40181
  function AxReAct(ai, signature, options) {
40183
- _class_call_check$2(this, AxReAct);
40182
+ _class_call_check$1(this, AxReAct);
40184
40183
  if (!(options === null || options === void 0 ? void 0 : options.functions) || options.functions.length === 0) {
40185
40184
  throw new Error("No functions provided");
40186
40185
  }
@@ -40251,12 +40250,12 @@ function _async_to_generator(fn) {
40251
40250
  });
40252
40251
  };
40253
40252
  }
40254
- function _class_call_check$1(instance, Constructor) {
40253
+ function _class_call_check(instance, Constructor) {
40255
40254
  if (!(instance instanceof Constructor)) {
40256
40255
  throw new TypeError("Cannot call a class as a function");
40257
40256
  }
40258
40257
  }
40259
- function _defineProperties$1(target, props) {
40258
+ function _defineProperties(target, props) {
40260
40259
  for(var i = 0; i < props.length; i++){
40261
40260
  var descriptor = props[i];
40262
40261
  descriptor.enumerable = descriptor.enumerable || false;
@@ -40265,12 +40264,12 @@ function _defineProperties$1(target, props) {
40265
40264
  Object.defineProperty(target, descriptor.key, descriptor);
40266
40265
  }
40267
40266
  }
40268
- function _create_class$1(Constructor, protoProps, staticProps) {
40269
- if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);
40270
- if (staticProps) _defineProperties$1(Constructor, staticProps);
40267
+ function _create_class(Constructor, protoProps, staticProps) {
40268
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
40269
+ if (staticProps) _defineProperties(Constructor, staticProps);
40271
40270
  return Constructor;
40272
40271
  }
40273
- function _define_property$1(obj, key, value) {
40272
+ function _define_property(obj, key, value) {
40274
40273
  if (key in obj) {
40275
40274
  Object.defineProperty(obj, key, {
40276
40275
  value: value,
@@ -40299,7 +40298,7 @@ function _object_spread(target) {
40299
40298
  }));
40300
40299
  }
40301
40300
  ownKeys.forEach(function(key) {
40302
- _define_property$1(target, key, source[key]);
40301
+ _define_property(target, key, source[key]);
40303
40302
  });
40304
40303
  }
40305
40304
  return target;
@@ -40438,13 +40437,13 @@ var AxAgent = /*#__PURE__*/ function() {
40438
40437
  function AxAgent(ai, param, options) {
40439
40438
  var _this = this;
40440
40439
  var name = param.name, description = param.description, signature = param.signature, agents = param.agents, functions = param.functions;
40441
- _class_call_check$1(this, AxAgent);
40442
- _define_property$1(this, "signature", void 0);
40443
- _define_property$1(this, "program", void 0);
40444
- _define_property$1(this, "name", void 0);
40445
- _define_property$1(this, "description", void 0);
40446
- _define_property$1(this, "subAgentList", void 0);
40447
- _define_property$1(this, "func", void 0);
40440
+ _class_call_check(this, AxAgent);
40441
+ _define_property(this, "signature", void 0);
40442
+ _define_property(this, "program", void 0);
40443
+ _define_property(this, "name", void 0);
40444
+ _define_property(this, "description", void 0);
40445
+ _define_property(this, "subAgentList", void 0);
40446
+ _define_property(this, "func", void 0);
40448
40447
  this.signature = new AxSignature(signature);
40449
40448
  var _agents_map;
40450
40449
  var funcs = _to_consumable_array(functions !== null && functions !== void 0 ? functions : []).concat(_to_consumable_array((_agents_map = agents === null || agents === void 0 ? void 0 : agents.map(function(a) {
@@ -40494,7 +40493,7 @@ var AxAgent = /*#__PURE__*/ function() {
40494
40493
  }
40495
40494
  }
40496
40495
  }
40497
- _create_class$1(AxAgent, [
40496
+ _create_class(AxAgent, [
40498
40497
  {
40499
40498
  key: "setExamples",
40500
40499
  value: function setExamples(examples) {
@@ -40566,7 +40565,7 @@ var AxAgent = /*#__PURE__*/ function() {
40566
40565
  _state.sent()
40567
40566
  ];
40568
40567
  case 2:
40569
- attributes = (_obj = {}, _define_property$1(_obj, "agent.name", _this.name), _define_property$1(_obj, "agent.description", _this.description), _define_property$1(_obj, "agent.subAgents", (_this_subAgentList = _this.subAgentList) !== null && _this_subAgentList !== void 0 ? _this_subAgentList : "none"), _obj);
40568
+ attributes = (_obj = {}, _define_property(_obj, "agent.name", _this.name), _define_property(_obj, "agent.description", _this.description), _define_property(_obj, "agent.subAgents", (_this_subAgentList = _this.subAgentList) !== null && _this_subAgentList !== void 0 ? _this_subAgentList : "none"), _obj);
40570
40569
  return [
40571
40570
  4,
40572
40571
  options === null || options === void 0 ? void 0 : options.tracer.startActiveSpan("Agent", {
@@ -40626,38 +40625,6 @@ function toCamelCase(inputString) {
40626
40625
  return camelCaseString;
40627
40626
  }
40628
40627
 
40629
- function _class_call_check(instance, Constructor) {
40630
- if (!(instance instanceof Constructor)) {
40631
- throw new TypeError("Cannot call a class as a function");
40632
- }
40633
- }
40634
- function _defineProperties(target, props) {
40635
- for(var i = 0; i < props.length; i++){
40636
- var descriptor = props[i];
40637
- descriptor.enumerable = descriptor.enumerable || false;
40638
- descriptor.configurable = true;
40639
- if ("value" in descriptor) descriptor.writable = true;
40640
- Object.defineProperty(target, descriptor.key, descriptor);
40641
- }
40642
- }
40643
- function _create_class(Constructor, protoProps, staticProps) {
40644
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
40645
- if (staticProps) _defineProperties(Constructor, staticProps);
40646
- return Constructor;
40647
- }
40648
- function _define_property(obj, key, value) {
40649
- if (key in obj) {
40650
- Object.defineProperty(obj, key, {
40651
- value: value,
40652
- enumerable: true,
40653
- configurable: true,
40654
- writable: true
40655
- });
40656
- } else {
40657
- obj[key] = value;
40658
- }
40659
- return obj;
40660
- }
40661
40628
  var AxJSInterpreterPermission;
40662
40629
  (function(AxJSInterpreterPermission) {
40663
40630
  AxJSInterpreterPermission["FS"] = "node:fs";
@@ -40666,69 +40633,6 @@ var AxJSInterpreterPermission;
40666
40633
  AxJSInterpreterPermission["CRYPTO"] = "crypto";
40667
40634
  AxJSInterpreterPermission["PROCESS"] = "process";
40668
40635
  })(AxJSInterpreterPermission || (AxJSInterpreterPermission = {}));
40669
- var AxJSInterpreter = /*#__PURE__*/ function() {
40670
- function AxJSInterpreter() {
40671
- var _ref = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, _ref_permissions = _ref.permissions, permissions = _ref_permissions === void 0 ? [] : _ref_permissions;
40672
- _class_call_check(this, AxJSInterpreter);
40673
- _define_property(this, "permissions", void 0);
40674
- this.permissions = permissions !== null && permissions !== void 0 ? permissions : [];
40675
- }
40676
- _create_class(AxJSInterpreter, [
40677
- {
40678
- key: "codeInterpreterJavascript",
40679
- value: function codeInterpreterJavascript(code) {
40680
- var context = {
40681
- console: console
40682
- };
40683
- if (this.permissions.includes(AxJSInterpreterPermission.FS)) {
40684
- context.fs = _fs;
40685
- }
40686
- if (this.permissions.includes(AxJSInterpreterPermission.NET)) {
40687
- context.http = _http;
40688
- context.https = _https;
40689
- }
40690
- if (this.permissions.includes(AxJSInterpreterPermission.OS)) {
40691
- context.os = _os;
40692
- }
40693
- if (this.permissions.includes(AxJSInterpreterPermission.CRYPTO)) {
40694
- context.crypto = _crypto;
40695
- }
40696
- if (this.permissions.includes(AxJSInterpreterPermission.PROCESS)) {
40697
- context.process = _process;
40698
- }
40699
- return runInNewContext("(function() { ".concat(code, " })()"), context);
40700
- }
40701
- },
40702
- {
40703
- key: "toFunction",
40704
- value: function toFunction() {
40705
- var _this = this;
40706
- return {
40707
- name: "javascriptInterpreter",
40708
- description: "Use this function to run Javascript code and get any expected return value.",
40709
- parameters: {
40710
- type: "object",
40711
- properties: {
40712
- code: {
40713
- type: "string",
40714
- description: "JS code with a return value in the end."
40715
- }
40716
- },
40717
- required: [
40718
- "code"
40719
- ]
40720
- },
40721
- func: function(param) {
40722
- var code = param.code;
40723
- return _this.codeInterpreterJavascript(code);
40724
- }
40725
- };
40726
- }
40727
- }
40728
- ]);
40729
- return AxJSInterpreter;
40730
- }
40731
- ();
40732
40636
 
40733
40637
  let DspService = class DspService {
40734
40638
  async prepareFunctions(functions, context) {
@@ -40744,7 +40648,6 @@ let DspService = class DspService {
40744
40648
  }));
40745
40649
  }
40746
40650
  async model(params, _pinsSettingsList, _context) {
40747
- // const { AxAI } = await eval(`import('@ax-llm/ax')`);
40748
40651
  const { name, options } = params;
40749
40652
  const modelInstance = new AxAI(_extends({
40750
40653
  name
@@ -40753,7 +40656,6 @@ let DspService = class DspService {
40753
40656
  }
40754
40657
  async modelOpenAI(params, _pinsSettingsList, context) {
40755
40658
  var _context_privates_OPENAI_API_KEY, _context_privates_OPENAI_SERVER;
40756
- // const { AxAIOpenAI } = await eval(`import('@ax-llm/ax')`);
40757
40659
  const { apiKey = (_context_privates_OPENAI_API_KEY = context.privates.OPENAI_API_KEY) != null ? _context_privates_OPENAI_API_KEY : process.env['OPENAI_API_KEY'], apiURL = (_context_privates_OPENAI_SERVER = context.privates.OPENAI_SERVER) != null ? _context_privates_OPENAI_SERVER : process.env['OPENAI_SERVER'], config, options } = params;
40758
40660
  const modelInstance = new AxAIOpenAI({
40759
40661
  apiKey,
@@ -40765,7 +40667,6 @@ let DspService = class DspService {
40765
40667
  }
40766
40668
  async modelAzureOpenAi(params, _pinsSettingsList, context) {
40767
40669
  var _context_privates_AZURE_OPENAI_API_KEY, _context_privates_AZURE_OPENAI_API_INSTANCE_NAME, _context_privates_AZURE_OPENAI_API_DEPLOYMENT_NAME, _context_privates_AZURE_OPENAI_API_VERSION;
40768
- // const { AxAIAzureOpenAI } = await eval(`import('@ax-llm/ax')`);
40769
40670
  const { apiKey = (_context_privates_AZURE_OPENAI_API_KEY = context.privates.AZURE_OPENAI_API_KEY) != null ? _context_privates_AZURE_OPENAI_API_KEY : process.env['AZURE_OPENAI_API_KEY'], resourceName = (_context_privates_AZURE_OPENAI_API_INSTANCE_NAME = context.privates.AZURE_OPENAI_API_INSTANCE_NAME) != null ? _context_privates_AZURE_OPENAI_API_INSTANCE_NAME : process.env['AZURE_OPENAI_API_INSTANCE_NAME'], deploymentName = (_context_privates_AZURE_OPENAI_API_DEPLOYMENT_NAME = context.privates.AZURE_OPENAI_API_DEPLOYMENT_NAME) != null ? _context_privates_AZURE_OPENAI_API_DEPLOYMENT_NAME : process.env['AZURE_OPENAI_API_DEPLOYMENT_NAME'], version = (_context_privates_AZURE_OPENAI_API_VERSION = context.privates.AZURE_OPENAI_API_VERSION) != null ? _context_privates_AZURE_OPENAI_API_VERSION : process.env['AZURE_OPENAI_API_VERSION'], config, options } = params;
40770
40671
  const modelInstance = new AxAIAzureOpenAI({
40771
40672
  apiKey,
@@ -40778,7 +40679,6 @@ let DspService = class DspService {
40778
40679
  return modelInstance;
40779
40680
  }
40780
40681
  async modelOllama(params, _pinsSettingsList, context) {
40781
- // const { AxAIOllama } = await eval(`import('@ax-llm/ax')`);
40782
40682
  const { model, url = context.privates.OLLAMA_SERVER ? context.privates.OLLAMA_SERVER + '/v1' : process.env['OLLAMA_SERVER'] ? process.env['OLLAMA_SERVER'] + '/v1' : 'http://localhost:11434/v1', apiKey, config, options } = params;
40783
40683
  const modelInstance = new AxAIOllama({
40784
40684
  model,
@@ -40790,7 +40690,6 @@ let DspService = class DspService {
40790
40690
  return modelInstance;
40791
40691
  }
40792
40692
  async generate(params, _pinsSettingsList, context) {
40793
- // const { AxGenerate } = await eval(`import('@ax-llm/ax')`);
40794
40693
  const { model = context.privates.MODEL_DSP, functions = [], signature, input } = params;
40795
40694
  const modelInstance = await executePinsList(model, context);
40796
40695
  const gen = new AxGenerate(modelInstance, signature, {
@@ -40800,7 +40699,6 @@ let DspService = class DspService {
40800
40699
  return result;
40801
40700
  }
40802
40701
  async chainOfThought(params, _pinsSettingsList, context) {
40803
- // const { AxChainOfThought } = await eval(`import('@ax-llm/ax')`);
40804
40702
  const { model = context.privates.MODEL_DSP, functions = [], signature, input } = params;
40805
40703
  const modelInstance = await executePinsList(model, context);
40806
40704
  const gen = new AxChainOfThought(modelInstance, signature, {
@@ -40810,7 +40708,6 @@ let DspService = class DspService {
40810
40708
  return result;
40811
40709
  }
40812
40710
  async react(params, _pinsSettingsList, context) {
40813
- // const { AxChainOfThought } = await eval(`import('@ax-llm/ax')`);
40814
40711
  const { model = context.privates.MODEL_DSP, functions = [], signature, input } = params;
40815
40712
  const modelInstance = await executePinsList(model, context);
40816
40713
  const gen = new AxReAct(modelInstance, signature, {
@@ -40820,8 +40717,7 @@ let DspService = class DspService {
40820
40717
  return result;
40821
40718
  }
40822
40719
  async agent(params, _pinsSettingsList, context) {
40823
- // const { AxAgent } = await eval(`import('@ax-llm/ax')`);
40824
- const { model = context.privates.MODEL_DSP, functions = [], agents = [], name, description, signature } = params;
40720
+ const { model = context.privates.MODEL_DSP, functions = [], agents = [], forward = true, name, description, signature, input } = params;
40825
40721
  const modelInstance = await executePinsList(model, context);
40826
40722
  const agent = new AxAgent(modelInstance, {
40827
40723
  name,
@@ -40829,19 +40725,19 @@ let DspService = class DspService {
40829
40725
  signature,
40830
40726
  functions: await this.prepareFunctions(functions, context),
40831
40727
  agents: await Promise.all(agents.map(async (execute)=>await executePinsList([
40832
- execute
40728
+ _extends({}, execute, {
40729
+ properties: _extends({}, execute.properties, {
40730
+ forward: false
40731
+ })
40732
+ })
40833
40733
  ], context)))
40834
40734
  });
40835
- return agent;
40836
- }
40837
- async forward(params, _pinsSettingsList, _context) {
40838
- const { agent, input } = params;
40735
+ if (!forward) {
40736
+ return agent;
40737
+ }
40839
40738
  const result = await agent.forward(input);
40840
40739
  return result;
40841
40740
  }
40842
- async jsInterpreter(_params, _pinsSettingsList, _context) {
40843
- return new AxJSInterpreter();
40844
- }
40845
40741
  };
40846
40742
  const model = (params, pinsSettingsList, context)=>new DspService().model(params, pinsSettingsList, context);
40847
40743
  const modelOpenAI = (params, pinsSettingsList, context)=>new DspService().modelOpenAI(params, pinsSettingsList, context);
@@ -40851,7 +40747,5 @@ const generate = (params, pinsSettingsList, context)=>new DspService().generate(
40851
40747
  const chainOfThought = (params, pinsSettingsList, context)=>new DspService().chainOfThought(params, pinsSettingsList, context);
40852
40748
  const react = (params, pinsSettingsList, context)=>new DspService().react(params, pinsSettingsList, context);
40853
40749
  const agent = (params, pinsSettingsList, context)=>new DspService().agent(params, pinsSettingsList, context);
40854
- const forward = (params, pinsSettingsList, context)=>new DspService().forward(params, pinsSettingsList, context);
40855
- const jsInterpreter = (params, pinsSettingsList, context)=>new DspService().jsInterpreter(params, pinsSettingsList, context);
40856
40750
 
40857
- export { agent, chainOfThought, forward, generate, jsInterpreter, model, modelAzureOpenAi, modelOllama, modelOpenAI, react };
40751
+ export { agent, chainOfThought, generate, model, modelAzureOpenAi, modelOllama, modelOpenAI, react };