@digipair/skill-dsp 0.136.3 → 0.136.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +800 -1206
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/lib/skill-dsp.d.ts +8 -0
- package/dist/src/lib/skill-dsp.d.ts.map +1 -0
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _mergeNamespaces
|
|
1
|
+
function _mergeNamespaces(n, m) {
|
|
2
2
|
m.forEach(function(e) {
|
|
3
3
|
e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function(k) {
|
|
4
4
|
if (k !== 'default' && !(k in n)) {
|
|
@@ -18,7 +18,7 @@ var commonjsGlobal$1 = typeof globalThis !== 'undefined' ? globalThis : typeof w
|
|
|
18
18
|
function getDefaultExportFromCjs$1(x) {
|
|
19
19
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
20
20
|
}
|
|
21
|
-
var handlebars_min = {
|
|
21
|
+
var handlebars_min$1 = {
|
|
22
22
|
exports: {}
|
|
23
23
|
};
|
|
24
24
|
/**!
|
|
@@ -46,7 +46,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
46
46
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
47
47
|
THE SOFTWARE.
|
|
48
48
|
|
|
49
|
-
*/ handlebars_min.exports;
|
|
49
|
+
*/ handlebars_min$1.exports;
|
|
50
50
|
(function(module1, exports1) {
|
|
51
51
|
function _instanceof(left, right) {
|
|
52
52
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
@@ -8127,12 +8127,12 @@ THE SOFTWARE.
|
|
|
8127
8127
|
}
|
|
8128
8128
|
]);
|
|
8129
8129
|
});
|
|
8130
|
-
})(handlebars_min, handlebars_min.exports);
|
|
8131
|
-
var handlebars_minExports = handlebars_min.exports;
|
|
8132
|
-
var
|
|
8133
|
-
var HandlebarsNamespace = /*#__PURE__*/ _mergeNamespaces
|
|
8130
|
+
})(handlebars_min$1, handlebars_min$1.exports);
|
|
8131
|
+
var handlebars_minExports = handlebars_min$1.exports;
|
|
8132
|
+
var handlebars_min = /*@__PURE__*/ getDefaultExportFromCjs$1(handlebars_minExports);
|
|
8133
|
+
var HandlebarsNamespace = /*#__PURE__*/ _mergeNamespaces({
|
|
8134
8134
|
__proto__: null,
|
|
8135
|
-
default:
|
|
8135
|
+
default: handlebars_min
|
|
8136
8136
|
}, [
|
|
8137
8137
|
handlebars_minExports
|
|
8138
8138
|
]);
|
|
@@ -17295,7 +17295,6 @@ class represent prop names.
|
|
|
17295
17295
|
this.deserialize = config.deserialize || function() {
|
|
17296
17296
|
throw new Error("This node type doesn't define a deserialize function");
|
|
17297
17297
|
};
|
|
17298
|
-
this.combine = config.combine || null;
|
|
17299
17298
|
}
|
|
17300
17299
|
_create_class$u(NodeProp, [
|
|
17301
17300
|
{
|
|
@@ -17408,16 +17407,10 @@ represented by another tree.
|
|
|
17408
17407
|
*/ overlay, /**
|
|
17409
17408
|
The parser used to create this subtree.
|
|
17410
17409
|
*/ parser) {
|
|
17411
|
-
var /**
|
|
17412
|
-
[Indicates](#common.IterMode.EnterBracketed) that the nested
|
|
17413
|
-
content is delineated with some kind
|
|
17414
|
-
of bracket token.
|
|
17415
|
-
*/ bracketed = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false;
|
|
17416
17410
|
_class_call_check$z(this, MountedTree);
|
|
17417
17411
|
this.tree = tree;
|
|
17418
17412
|
this.overlay = overlay;
|
|
17419
17413
|
this.parser = parser;
|
|
17420
|
-
this.bracketed = bracketed;
|
|
17421
17414
|
}
|
|
17422
17415
|
_create_class$u(MountedTree, null, [
|
|
17423
17416
|
{
|
|
@@ -17633,9 +17626,7 @@ types in it, so that the ids fit into 16-bit typed array slots.
|
|
|
17633
17626
|
var add = source(type);
|
|
17634
17627
|
if (add) {
|
|
17635
17628
|
if (!newProps) newProps = Object.assign({}, type.props);
|
|
17636
|
-
|
|
17637
|
-
if (prop.combine && prop.id in newProps) value = prop.combine(newProps[prop.id], value);
|
|
17638
|
-
newProps[prop.id] = value;
|
|
17629
|
+
newProps[add[0].id] = add[1];
|
|
17639
17630
|
}
|
|
17640
17631
|
}
|
|
17641
17632
|
} catch (err) {
|
|
@@ -17701,12 +17692,6 @@ operator to enable multiple ones.
|
|
|
17701
17692
|
library to not enter mounted overlays if one covers the given
|
|
17702
17693
|
position.
|
|
17703
17694
|
*/ IterMode[IterMode["IgnoreOverlays"] = 8] = "IgnoreOverlays";
|
|
17704
|
-
/**
|
|
17705
|
-
When set, positions on the boundary of a mounted overlay tree
|
|
17706
|
-
that has its [`bracketed`](#common.NestedParse.bracketed) flag
|
|
17707
|
-
set will enter that tree regardless of side. Only supported in
|
|
17708
|
-
[`enter`](#common.SyntaxNode.enter), not in cursors.
|
|
17709
|
-
*/ IterMode[IterMode["EnterBracketed"] = 16] = "EnterBracketed";
|
|
17710
17695
|
})(IterMode || (IterMode = {}));
|
|
17711
17696
|
/**
|
|
17712
17697
|
A piece of syntax tree. There are two ways to approach these
|
|
@@ -18265,17 +18250,17 @@ var TreeNode = /*#__PURE__*/ function(BaseNode) {
|
|
|
18265
18250
|
var mode = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 0;
|
|
18266
18251
|
for(var parent = this;;){
|
|
18267
18252
|
for(var _parent__tree = parent._tree, children = _parent__tree.children, positions = _parent__tree.positions, e = dir > 0 ? children.length : -1; i != e; i += dir){
|
|
18268
|
-
var next = children[i], start = positions[i] + parent.from
|
|
18269
|
-
if (!
|
|
18253
|
+
var next = children[i], start = positions[i] + parent.from;
|
|
18254
|
+
if (!checkSide(side, pos, start, start + next.length)) continue;
|
|
18270
18255
|
if (_instanceof$i(next, TreeBuffer)) {
|
|
18271
18256
|
if (mode & IterMode.ExcludeBuffers) continue;
|
|
18272
18257
|
var index = next.findChild(0, next.buffer.length, dir, pos - start, side);
|
|
18273
18258
|
if (index > -1) return new BufferNode(new BufferContext(parent, next, i, start), null, index);
|
|
18274
18259
|
} else if (mode & IterMode.IncludeAnonymous || !next.type.isAnonymous || hasChild(next)) {
|
|
18275
|
-
var
|
|
18276
|
-
if (!(mode & IterMode.IgnoreMounts) && (
|
|
18260
|
+
var mounted = void 0;
|
|
18261
|
+
if (!(mode & IterMode.IgnoreMounts) && (mounted = MountedTree.get(next)) && !mounted.overlay) return new TreeNode(mounted.tree, start, i, parent);
|
|
18277
18262
|
var inner = new TreeNode(next, start, i, parent);
|
|
18278
|
-
return mode & IterMode.IncludeAnonymous || !inner.type.isAnonymous ? inner : inner.nextChild(dir < 0 ? next.children.length - 1 : 0, dir, pos, side
|
|
18263
|
+
return mode & IterMode.IncludeAnonymous || !inner.type.isAnonymous ? inner : inner.nextChild(dir < 0 ? next.children.length - 1 : 0, dir, pos, side);
|
|
18279
18264
|
}
|
|
18280
18265
|
}
|
|
18281
18266
|
if (mode & IterMode.IncludeAnonymous || !parent.type.isAnonymous) return null;
|
|
@@ -18310,24 +18295,18 @@ var TreeNode = /*#__PURE__*/ function(BaseNode) {
|
|
|
18310
18295
|
return this.nextChild(this._tree.children.length - 1, -1, pos, -2 /* Side.Before */ );
|
|
18311
18296
|
}
|
|
18312
18297
|
},
|
|
18313
|
-
{
|
|
18314
|
-
key: "prop",
|
|
18315
|
-
value: function prop(prop) {
|
|
18316
|
-
return this._tree.prop(prop);
|
|
18317
|
-
}
|
|
18318
|
-
},
|
|
18319
18298
|
{
|
|
18320
18299
|
key: "enter",
|
|
18321
18300
|
value: function enter(pos, side) {
|
|
18322
18301
|
var mode = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0;
|
|
18323
18302
|
var mounted;
|
|
18324
18303
|
if (!(mode & IterMode.IgnoreOverlays) && (mounted = MountedTree.get(this._tree)) && mounted.overlay) {
|
|
18325
|
-
var rPos = pos - this.from
|
|
18304
|
+
var rPos = pos - this.from;
|
|
18326
18305
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
18327
18306
|
try {
|
|
18328
18307
|
for(var _iterator = mounted.overlay[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
18329
18308
|
var _step_value = _step.value, from = _step_value.from, to = _step_value.to;
|
|
18330
|
-
if ((side > 0
|
|
18309
|
+
if ((side > 0 ? from <= rPos : from < rPos) && (side < 0 ? to >= rPos : to > rPos)) return new TreeNode(mounted.tree, mounted.overlay[0].from + this.from, -1, this);
|
|
18331
18310
|
}
|
|
18332
18311
|
} catch (err) {
|
|
18333
18312
|
_didIteratorError = true;
|
|
@@ -18491,12 +18470,6 @@ var BufferNode = /*#__PURE__*/ function(BaseNode) {
|
|
|
18491
18470
|
return this.child(-1, pos, -2 /* Side.Before */ );
|
|
18492
18471
|
}
|
|
18493
18472
|
},
|
|
18494
|
-
{
|
|
18495
|
-
key: "prop",
|
|
18496
|
-
value: function prop(prop) {
|
|
18497
|
-
return this.type.prop(prop);
|
|
18498
|
-
}
|
|
18499
|
-
},
|
|
18500
18473
|
{
|
|
18501
18474
|
key: "enter",
|
|
18502
18475
|
value: function enter(pos, side) {
|
|
@@ -18627,8 +18600,11 @@ A tree cursor object focuses on a given node in a syntax tree, and
|
|
|
18627
18600
|
allows you to move to adjacent nodes.
|
|
18628
18601
|
*/ var TreeCursor = /*#__PURE__*/ function() {
|
|
18629
18602
|
function TreeCursor(node) {
|
|
18630
|
-
var
|
|
18603
|
+
var /**
|
|
18604
|
+
@internal
|
|
18605
|
+
*/ mode = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
|
|
18631
18606
|
_class_call_check$z(this, TreeCursor);
|
|
18607
|
+
this.mode = mode;
|
|
18632
18608
|
/**
|
|
18633
18609
|
@internal
|
|
18634
18610
|
*/ this.buffer = null;
|
|
@@ -18637,7 +18613,6 @@ allows you to move to adjacent nodes.
|
|
|
18637
18613
|
@internal
|
|
18638
18614
|
*/ this.index = 0;
|
|
18639
18615
|
this.bufferNode = null;
|
|
18640
|
-
this.mode = mode & ~IterMode.EnterBracketed;
|
|
18641
18616
|
if (_instanceof$i(node, TreeNode)) {
|
|
18642
18617
|
this.yieldNode(node);
|
|
18643
18618
|
} else {
|
|
@@ -18981,7 +18956,7 @@ function buildTree(data) {
|
|
|
18981
18956
|
function takeNode(parentStart, minPos, children, positions, inRepeat, depth) {
|
|
18982
18957
|
var id = cursor.id, start = cursor.start, end = cursor.end, size = cursor.size;
|
|
18983
18958
|
var lookAheadAtStart = lookAhead, contextAtStart = contextHash;
|
|
18984
|
-
|
|
18959
|
+
while(size < 0){
|
|
18985
18960
|
cursor.next();
|
|
18986
18961
|
if (size == -1 /* SpecialRecord.Reuse */ ) {
|
|
18987
18962
|
var node = reused[id];
|
|
@@ -19148,7 +19123,7 @@ function buildTree(data) {
|
|
|
19148
19123
|
fork.next();
|
|
19149
19124
|
while(fork.pos > startPos){
|
|
19150
19125
|
if (fork.size < 0) {
|
|
19151
|
-
if (fork.size == -3 /* SpecialRecord.ContextChange */
|
|
19126
|
+
if (fork.size == -3 /* SpecialRecord.ContextChange */ ) localSkipped += 4;
|
|
19152
19127
|
else break scan;
|
|
19153
19128
|
} else if (fork.id >= minRepeatType) {
|
|
19154
19129
|
localSkipped += 4;
|
|
@@ -19587,11 +19562,11 @@ about the parse state.
|
|
|
19587
19562
|
var _a;
|
|
19588
19563
|
var depth = action >> 19 /* Action.ReduceDepthShift */ , type = action & 65535 /* Action.ValueMask */ ;
|
|
19589
19564
|
var parser = this.p.parser;
|
|
19590
|
-
var lookaheadRecord = this.reducePos < this.pos - 25 /* Lookahead.Margin */
|
|
19565
|
+
var lookaheadRecord = this.reducePos < this.pos - 25 /* Lookahead.Margin */ ;
|
|
19566
|
+
if (lookaheadRecord) this.setLookAhead(this.pos);
|
|
19591
19567
|
var dPrec = parser.dynamicPrecedence(type);
|
|
19592
19568
|
if (dPrec) this.score += dPrec;
|
|
19593
19569
|
if (depth == 0) {
|
|
19594
|
-
if (type < parser.minRepeatTerm && this.reducePos < this.pos) this.reducePos = this.pos;
|
|
19595
19570
|
this.pushState(parser.getGoto(this.state, type, true), this.reducePos);
|
|
19596
19571
|
// Zero-depth reductions are a special case—they add stuff to
|
|
19597
19572
|
// the stack without popping anything off.
|
|
@@ -19605,9 +19580,7 @@ about the parse state.
|
|
|
19605
19580
|
// expression and the state that we'll be staying in, which should
|
|
19606
19581
|
// be moved to `this.state`).
|
|
19607
19582
|
var base = this.stack.length - (depth - 1) * 3 - (action & 262144 /* Action.StayFlag */ ? 6 : 0);
|
|
19608
|
-
var start = base ? this.stack[base - 2] : this.p.ranges[0].from;
|
|
19609
|
-
if (type < parser.minRepeatTerm && start == this.reducePos && this.reducePos < this.pos) this.reducePos = this.pos;
|
|
19610
|
-
var size = this.reducePos - start;
|
|
19583
|
+
var start = base ? this.stack[base - 2] : this.p.ranges[0].from, size = this.reducePos - start;
|
|
19611
19584
|
// This is a kludge to try and detect overly deep left-associative
|
|
19612
19585
|
// trees, which will not increase the parse stack depth and thus
|
|
19613
19586
|
// won't be caught by the regular stack-depth limit check.
|
|
@@ -19646,11 +19619,15 @@ about the parse state.
|
|
|
19646
19619
|
var size = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 4, mustSink = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : false;
|
|
19647
19620
|
if (term == 0 /* Term.Err */ && (!this.stack.length || this.stack[this.stack.length - 1] < this.buffer.length + this.bufferBase)) {
|
|
19648
19621
|
// Try to omit/merge adjacent error nodes
|
|
19649
|
-
var top = this.buffer.length;
|
|
19650
|
-
if (top
|
|
19622
|
+
var cur = this, top = this.buffer.length;
|
|
19623
|
+
if (top == 0 && cur.parent) {
|
|
19624
|
+
top = cur.bufferBase - cur.parent.bufferBase;
|
|
19625
|
+
cur = cur.parent;
|
|
19626
|
+
}
|
|
19627
|
+
if (top > 0 && cur.buffer[top - 4] == 0 /* Term.Err */ && cur.buffer[top - 1] > -1) {
|
|
19651
19628
|
if (start == end) return;
|
|
19652
|
-
if (
|
|
19653
|
-
|
|
19629
|
+
if (cur.buffer[top - 2] >= start) {
|
|
19630
|
+
cur.buffer[top - 2] = end;
|
|
19654
19631
|
return;
|
|
19655
19632
|
}
|
|
19656
19633
|
}
|
|
@@ -19659,7 +19636,7 @@ about the parse state.
|
|
|
19659
19636
|
this.buffer.push(term, start, end, size);
|
|
19660
19637
|
} else {
|
|
19661
19638
|
var index = this.buffer.length;
|
|
19662
|
-
if (index > 0 &&
|
|
19639
|
+
if (index > 0 && this.buffer[index - 4] != 0 /* Term.Err */ ) {
|
|
19663
19640
|
var mustMove = false;
|
|
19664
19641
|
for(var scan = index; scan > 0 && this.buffer[scan - 2] > end; scan -= 4){
|
|
19665
19642
|
if (this.buffer[scan - 1] >= 0) {
|
|
@@ -19694,11 +19671,11 @@ about the parse state.
|
|
|
19694
19671
|
this.pushState(action & 65535 /* Action.ValueMask */ , this.pos);
|
|
19695
19672
|
} else if ((action & 262144 /* Action.StayFlag */ ) == 0) {
|
|
19696
19673
|
var nextState = action, parser = this.p.parser;
|
|
19697
|
-
this.pos
|
|
19698
|
-
|
|
19699
|
-
|
|
19700
|
-
|
|
19701
|
-
this.pushState(nextState,
|
|
19674
|
+
if (end > this.pos || type <= parser.maxNode) {
|
|
19675
|
+
this.pos = end;
|
|
19676
|
+
if (!parser.stateFlag(nextState, 1 /* StateFlag.Skipped */ )) this.reducePos = end;
|
|
19677
|
+
}
|
|
19678
|
+
this.pushState(nextState, start);
|
|
19702
19679
|
this.shiftContext(type, start);
|
|
19703
19680
|
if (type <= parser.maxNode) this.buffer.push(type, start, end, 4);
|
|
19704
19681
|
} else {
|
|
@@ -19746,9 +19723,6 @@ about the parse state.
|
|
|
19746
19723
|
value: function split() {
|
|
19747
19724
|
var parent = this;
|
|
19748
19725
|
var off = parent.buffer.length;
|
|
19749
|
-
// Leave off top error node, if there, because that might be
|
|
19750
|
-
// merged with other nodes.
|
|
19751
|
-
if (off && parent.buffer[off - 4] == 0 /* Term.Err */ ) off -= 4;
|
|
19752
19726
|
// Because the top of the buffer (after this.pos) may be mutated
|
|
19753
19727
|
// to reorder reductions and skipped tokens, and shared buffers
|
|
19754
19728
|
// should be immutable, this copies any outstanding skipped tokens
|
|
@@ -19992,10 +19966,10 @@ about the parse state.
|
|
|
19992
19966
|
@internal
|
|
19993
19967
|
*/ key: "setLookAhead",
|
|
19994
19968
|
value: function setLookAhead(lookAhead) {
|
|
19995
|
-
if (lookAhead
|
|
19996
|
-
|
|
19997
|
-
|
|
19998
|
-
|
|
19969
|
+
if (lookAhead > this.lookAhead) {
|
|
19970
|
+
this.emitLookAhead();
|
|
19971
|
+
this.lookAhead = lookAhead;
|
|
19972
|
+
}
|
|
19999
19973
|
}
|
|
20000
19974
|
},
|
|
20001
19975
|
{
|
|
@@ -20888,12 +20862,7 @@ var Parse = /*#__PURE__*/ function() {
|
|
|
20888
20862
|
}
|
|
20889
20863
|
}
|
|
20890
20864
|
}
|
|
20891
|
-
if (newStacks.length > 12 /* Rec.MaxStackCount */ )
|
|
20892
|
-
newStacks.sort(function(a, b) {
|
|
20893
|
-
return b.score - a.score;
|
|
20894
|
-
});
|
|
20895
|
-
newStacks.splice(12 /* Rec.MaxStackCount */ , newStacks.length - 12 /* Rec.MaxStackCount */ );
|
|
20896
|
-
}
|
|
20865
|
+
if (newStacks.length > 12 /* Rec.MaxStackCount */ ) newStacks.splice(12 /* Rec.MaxStackCount */ , newStacks.length - 12 /* Rec.MaxStackCount */ );
|
|
20897
20866
|
}
|
|
20898
20867
|
this.minStackPos = newStacks[0].pos;
|
|
20899
20868
|
for(var i2 = 1; i2 < newStacks.length; i2++)if (newStacks[i2].pos < this.minStackPos) this.minStackPos = newStacks[i2].pos;
|
|
@@ -20988,7 +20957,7 @@ var Parse = /*#__PURE__*/ function() {
|
|
|
20988
20957
|
if (done) continue;
|
|
20989
20958
|
}
|
|
20990
20959
|
var force = stack.split(), forceBase = base;
|
|
20991
|
-
for(var j = 0; j < 10 /* Rec.ForceReduceLimit */
|
|
20960
|
+
for(var j = 0; force.forceReduce() && j < 10 /* Rec.ForceReduceLimit */ ; j++){
|
|
20992
20961
|
if (verbose) console.log(forceBase + this.stackID(force) + " (via force-reduce)");
|
|
20993
20962
|
var done1 = this.advanceFully(force, newStacks);
|
|
20994
20963
|
if (done1) break;
|
|
@@ -21023,8 +20992,8 @@ var Parse = /*#__PURE__*/ function() {
|
|
|
21023
20992
|
stack.recoverByDelete(token, tokenEnd);
|
|
21024
20993
|
if (verbose) console.log(base + this.stackID(stack) + " (via recover-delete ".concat(this.parser.getName(token), ")"));
|
|
21025
20994
|
pushStackDedup(stack, newStacks);
|
|
21026
|
-
} else if (!finished || finished.score <
|
|
21027
|
-
finished =
|
|
20995
|
+
} else if (!finished || finished.score < stack.score) {
|
|
20996
|
+
finished = stack;
|
|
21028
20997
|
}
|
|
21029
20998
|
}
|
|
21030
20999
|
return finished;
|
|
@@ -21873,7 +21842,7 @@ must be quoted as JSON strings.
|
|
|
21873
21842
|
For example:
|
|
21874
21843
|
|
|
21875
21844
|
```javascript
|
|
21876
|
-
parser.
|
|
21845
|
+
parser.withProps(
|
|
21877
21846
|
styleTags({
|
|
21878
21847
|
// Style Number and BigNumber nodes
|
|
21879
21848
|
"Number BigNumber": tags.number,
|
|
@@ -21888,7 +21857,7 @@ parser.configure({props: [
|
|
|
21888
21857
|
// Style the node named "/" as punctuation
|
|
21889
21858
|
'"/"': tags.punctuation
|
|
21890
21859
|
})
|
|
21891
|
-
|
|
21860
|
+
)
|
|
21892
21861
|
```
|
|
21893
21862
|
*/ function styleTags(spec) {
|
|
21894
21863
|
var byName = Object.create(null);
|
|
@@ -21944,26 +21913,7 @@ parser.configure({props: [
|
|
|
21944
21913
|
}
|
|
21945
21914
|
return ruleNodeProp.add(byName);
|
|
21946
21915
|
}
|
|
21947
|
-
var ruleNodeProp = new NodeProp(
|
|
21948
|
-
combine: function combine(a, b) {
|
|
21949
|
-
var cur, root, take;
|
|
21950
|
-
while(a || b){
|
|
21951
|
-
if (!a || b && a.depth >= b.depth) {
|
|
21952
|
-
take = b;
|
|
21953
|
-
b = b.next;
|
|
21954
|
-
} else {
|
|
21955
|
-
take = a;
|
|
21956
|
-
a = a.next;
|
|
21957
|
-
}
|
|
21958
|
-
if (cur && cur.mode == take.mode && !take.context && !cur.context) continue;
|
|
21959
|
-
var copy = new Rule$1(take.tags, take.mode, take.context);
|
|
21960
|
-
if (cur) cur.next = copy;
|
|
21961
|
-
else root = copy;
|
|
21962
|
-
cur = copy;
|
|
21963
|
-
}
|
|
21964
|
-
return root;
|
|
21965
|
-
}
|
|
21966
|
-
});
|
|
21916
|
+
var ruleNodeProp = new NodeProp();
|
|
21967
21917
|
var Rule$1 = /*#__PURE__*/ function() {
|
|
21968
21918
|
function Rule(tags, mode, context, next) {
|
|
21969
21919
|
_class_call_check$x(this, Rule);
|
|
@@ -22584,7 +22534,7 @@ In addition, these mappings are provided:
|
|
|
22584
22534
|
class: "tok-punctuation"
|
|
22585
22535
|
}
|
|
22586
22536
|
]);
|
|
22587
|
-
function _array_like_to_array$4
|
|
22537
|
+
function _array_like_to_array$4(arr, len) {
|
|
22588
22538
|
if (len == null || len > arr.length) len = arr.length;
|
|
22589
22539
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
22590
22540
|
return arr2;
|
|
@@ -22592,8 +22542,8 @@ function _array_like_to_array$4$1(arr, len) {
|
|
|
22592
22542
|
function _array_with_holes$2(arr) {
|
|
22593
22543
|
if (Array.isArray(arr)) return arr;
|
|
22594
22544
|
}
|
|
22595
|
-
function _array_without_holes$4
|
|
22596
|
-
if (Array.isArray(arr)) return _array_like_to_array$4
|
|
22545
|
+
function _array_without_holes$4(arr) {
|
|
22546
|
+
if (Array.isArray(arr)) return _array_like_to_array$4(arr);
|
|
22597
22547
|
}
|
|
22598
22548
|
function _class_call_check$w(instance, Constructor) {
|
|
22599
22549
|
if (!(instance instanceof Constructor)) {
|
|
@@ -22634,7 +22584,7 @@ function _instanceof$f(left, right) {
|
|
|
22634
22584
|
return left instanceof right;
|
|
22635
22585
|
}
|
|
22636
22586
|
}
|
|
22637
|
-
function _iterable_to_array$4
|
|
22587
|
+
function _iterable_to_array$4(iter) {
|
|
22638
22588
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
22639
22589
|
}
|
|
22640
22590
|
function _iterable_to_array_limit$2(arr, i) {
|
|
@@ -22664,7 +22614,7 @@ function _iterable_to_array_limit$2(arr, i) {
|
|
|
22664
22614
|
function _non_iterable_rest$2() {
|
|
22665
22615
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
22666
22616
|
}
|
|
22667
|
-
function _non_iterable_spread$4
|
|
22617
|
+
function _non_iterable_spread$4() {
|
|
22668
22618
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
22669
22619
|
}
|
|
22670
22620
|
function _object_spread$2(target) {
|
|
@@ -22702,25 +22652,25 @@ function _object_spread_props$1(target, source) {
|
|
|
22702
22652
|
return target;
|
|
22703
22653
|
}
|
|
22704
22654
|
function _sliced_to_array$2(arr, i) {
|
|
22705
|
-
return _array_with_holes$2(arr) || _iterable_to_array_limit$2(arr, i) || _unsupported_iterable_to_array$4
|
|
22655
|
+
return _array_with_holes$2(arr) || _iterable_to_array_limit$2(arr, i) || _unsupported_iterable_to_array$4(arr, i) || _non_iterable_rest$2();
|
|
22706
22656
|
}
|
|
22707
22657
|
function _to_array$1(arr) {
|
|
22708
|
-
return _array_with_holes$2(arr) || _iterable_to_array$4
|
|
22658
|
+
return _array_with_holes$2(arr) || _iterable_to_array$4(arr) || _unsupported_iterable_to_array$4(arr) || _non_iterable_rest$2();
|
|
22709
22659
|
}
|
|
22710
|
-
function _to_consumable_array$4
|
|
22711
|
-
return _array_without_holes$4
|
|
22660
|
+
function _to_consumable_array$4(arr) {
|
|
22661
|
+
return _array_without_holes$4(arr) || _iterable_to_array$4(arr) || _unsupported_iterable_to_array$4(arr) || _non_iterable_spread$4();
|
|
22712
22662
|
}
|
|
22713
22663
|
function _type_of$z(obj) {
|
|
22714
22664
|
"@swc/helpers - typeof";
|
|
22715
22665
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
22716
22666
|
}
|
|
22717
|
-
function _unsupported_iterable_to_array$4
|
|
22667
|
+
function _unsupported_iterable_to_array$4(o, minLen) {
|
|
22718
22668
|
if (!o) return;
|
|
22719
|
-
if (typeof o === "string") return _array_like_to_array$4
|
|
22669
|
+
if (typeof o === "string") return _array_like_to_array$4(o, minLen);
|
|
22720
22670
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
22721
22671
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
22722
22672
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
22723
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$4
|
|
22673
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$4(o, minLen);
|
|
22724
22674
|
}
|
|
22725
22675
|
// This file was generated by lezer-generator. You probably shouldn't edit it.
|
|
22726
22676
|
var propertyIdentifier = 121, identifier = 122, nameIdentifier = 123, insertSemi = 124, expression0 = 128, ForExpression = 4, forExpressionStart = 131, ForInExpression = 7, Name = 8, Identifier$1 = 9, AdditionalIdentifier = 10, forExpressionBodyStart = 139, IfExpression = 19, ifExpressionStart = 140, QuantifiedExpression = 23, quantifiedExpressionStart = 141, QuantifiedInExpression = 27, PositiveUnaryTest = 37, ArithmeticExpression = 41, arithmeticPlusStart = 145, arithmeticTimesStart = 146, arithmeticExpStart = 147, arithmeticUnaryStart = 148, VariableName = 47, PathExpression = 68, pathExpressionStart = 154, FilterExpression = 70, filterExpressionStart = 155, FunctionInvocation = 72, functionInvocationStart = 156, ParameterName = 76, nil = 161, NumericLiteral = 79, StringLiteral$1 = 80, BooleanLiteral$1 = 81, listStart = 168, List = 89, FunctionDefinition = 90, functionDefinitionStart = 170, Context = 97, contextStart = 172, ContextEntry = 98, PropertyName = 100, PropertyIdentifier = 101;
|
|
@@ -22843,7 +22793,7 @@ function indent(str, spaces) {
|
|
|
22843
22793
|
if (_$chars.length) {
|
|
22844
22794
|
var _String;
|
|
22845
22795
|
return {
|
|
22846
|
-
token: (_String = String).fromCharCode.apply(_String, _to_consumable_array$4
|
|
22796
|
+
token: (_String = String).fromCharCode.apply(_String, _to_consumable_array$4(_$chars)),
|
|
22847
22797
|
offset: i
|
|
22848
22798
|
};
|
|
22849
22799
|
}
|
|
@@ -22888,19 +22838,19 @@ function indent(str, spaces) {
|
|
|
22888
22838
|
var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
|
|
22889
22839
|
// match is required
|
|
22890
22840
|
if (!match) {
|
|
22891
|
-
return
|
|
22841
|
+
return tokens = tokens1, i = i1, nextMatch = nextMatch1, {
|
|
22892
22842
|
v: nextMatch1
|
|
22893
22843
|
};
|
|
22894
22844
|
}
|
|
22895
22845
|
var token = match.token, offset = match.offset;
|
|
22896
22846
|
i1 += offset;
|
|
22897
22847
|
if (token === ' ') {
|
|
22898
|
-
return
|
|
22848
|
+
return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
|
|
22899
22849
|
}
|
|
22900
|
-
tokens1 = _to_consumable_array$4
|
|
22850
|
+
tokens1 = _to_consumable_array$4(tokens1).concat([
|
|
22901
22851
|
token
|
|
22902
22852
|
]);
|
|
22903
|
-
var name = _to_consumable_array$4
|
|
22853
|
+
var name = _to_consumable_array$4(start).concat(_to_consumable_array$4(tokens1)).join(' ');
|
|
22904
22854
|
if (contextKeys.some(function(el) {
|
|
22905
22855
|
return el === name;
|
|
22906
22856
|
})) {
|
|
@@ -22914,7 +22864,7 @@ function indent(str, spaces) {
|
|
|
22914
22864
|
if (contextKeys.some(function(el) {
|
|
22915
22865
|
return el.startsWith(name);
|
|
22916
22866
|
})) {
|
|
22917
|
-
return
|
|
22867
|
+
return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
|
|
22918
22868
|
}
|
|
22919
22869
|
if (dateTimeIdentifiers.some(function(el) {
|
|
22920
22870
|
return el === name;
|
|
@@ -22933,9 +22883,9 @@ function indent(str, spaces) {
|
|
|
22933
22883
|
if (dateTimeIdentifiers.some(function(el) {
|
|
22934
22884
|
return el.startsWith(name);
|
|
22935
22885
|
})) {
|
|
22936
|
-
return
|
|
22886
|
+
return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
|
|
22937
22887
|
}
|
|
22938
|
-
return
|
|
22888
|
+
return tokens = tokens1, i = i1, nextMatch = nextMatch1, {
|
|
22939
22889
|
v: nextMatch1
|
|
22940
22890
|
};
|
|
22941
22891
|
};
|
|
@@ -23223,7 +23173,7 @@ var Variables = /*#__PURE__*/ function() {
|
|
|
23223
23173
|
value: function token(part) {
|
|
23224
23174
|
LOG_VARS && console.log('[%s] token <%s> + <%s>', this.path, this.tokens.join(' '), part);
|
|
23225
23175
|
return this.assign({
|
|
23226
|
-
tokens: _to_consumable_array$4
|
|
23176
|
+
tokens: _to_consumable_array$4(this.tokens).concat([
|
|
23227
23177
|
part
|
|
23228
23178
|
])
|
|
23229
23179
|
});
|
|
@@ -23320,7 +23270,7 @@ var Variables = /*#__PURE__*/ function() {
|
|
|
23320
23270
|
return this;
|
|
23321
23271
|
}
|
|
23322
23272
|
var parent = this.assign({
|
|
23323
|
-
children: _to_consumable_array$4
|
|
23273
|
+
children: _to_consumable_array$4(this.children).concat([
|
|
23324
23274
|
child
|
|
23325
23275
|
])
|
|
23326
23276
|
});
|
|
@@ -23435,8 +23385,8 @@ var Variables = /*#__PURE__*/ function() {
|
|
|
23435
23385
|
}
|
|
23436
23386
|
return new Variables({
|
|
23437
23387
|
name: name,
|
|
23438
|
-
tokens: _to_consumable_array$4
|
|
23439
|
-
children: _to_consumable_array$4
|
|
23388
|
+
tokens: _to_consumable_array$4(tokens),
|
|
23389
|
+
children: _to_consumable_array$4(children),
|
|
23440
23390
|
context: context,
|
|
23441
23391
|
parent: parent,
|
|
23442
23392
|
value: value,
|
|
@@ -23498,7 +23448,7 @@ var Variables = /*#__PURE__*/ function() {
|
|
|
23498
23448
|
if (term === List) {
|
|
23499
23449
|
var _Context;
|
|
23500
23450
|
variables = variables.assign({
|
|
23501
|
-
value: (_Context = Context).of.apply(_Context, _to_consumable_array$4
|
|
23451
|
+
value: (_Context = Context).of.apply(_Context, _to_consumable_array$4(variables.children.map(function(c) {
|
|
23502
23452
|
return c === null || c === void 0 ? void 0 : c.computedValue();
|
|
23503
23453
|
})))
|
|
23504
23454
|
});
|
|
@@ -23841,7 +23791,7 @@ var parser = LRParser.deserialize({
|
|
|
23841
23791
|
],
|
|
23842
23792
|
tokenPrec: 2571
|
|
23843
23793
|
});
|
|
23844
|
-
function _array_like_to_array$3
|
|
23794
|
+
function _array_like_to_array$3(arr, len) {
|
|
23845
23795
|
if (len == null || len > arr.length) len = arr.length;
|
|
23846
23796
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
23847
23797
|
return arr2;
|
|
@@ -23849,8 +23799,8 @@ function _array_like_to_array$3$1(arr, len) {
|
|
|
23849
23799
|
function _array_with_holes$1(arr) {
|
|
23850
23800
|
if (Array.isArray(arr)) return arr;
|
|
23851
23801
|
}
|
|
23852
|
-
function _array_without_holes$3
|
|
23853
|
-
if (Array.isArray(arr)) return _array_like_to_array$3
|
|
23802
|
+
function _array_without_holes$3(arr) {
|
|
23803
|
+
if (Array.isArray(arr)) return _array_like_to_array$3(arr);
|
|
23854
23804
|
}
|
|
23855
23805
|
function _assert_this_initialized$h(self1) {
|
|
23856
23806
|
if (self1 === void 0) {
|
|
@@ -23935,7 +23885,7 @@ function _instanceof$e(left, right) {
|
|
|
23935
23885
|
function _is_native_function$5(fn) {
|
|
23936
23886
|
return Function.toString.call(fn).indexOf("[native code]") !== -1;
|
|
23937
23887
|
}
|
|
23938
|
-
function _iterable_to_array$3
|
|
23888
|
+
function _iterable_to_array$3(iter) {
|
|
23939
23889
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
23940
23890
|
}
|
|
23941
23891
|
function _iterable_to_array_limit$1(arr, i) {
|
|
@@ -23965,7 +23915,7 @@ function _iterable_to_array_limit$1(arr, i) {
|
|
|
23965
23915
|
function _non_iterable_rest$1() {
|
|
23966
23916
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
23967
23917
|
}
|
|
23968
|
-
function _non_iterable_spread$3
|
|
23918
|
+
function _non_iterable_spread$3() {
|
|
23969
23919
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
23970
23920
|
}
|
|
23971
23921
|
function _possible_constructor_return$h(self1, call) {
|
|
@@ -23982,25 +23932,25 @@ function _set_prototype_of$h(o, p) {
|
|
|
23982
23932
|
return _set_prototype_of$h(o, p);
|
|
23983
23933
|
}
|
|
23984
23934
|
function _sliced_to_array$1(arr, i) {
|
|
23985
|
-
return _array_with_holes$1(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$3
|
|
23935
|
+
return _array_with_holes$1(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$3(arr, i) || _non_iterable_rest$1();
|
|
23986
23936
|
}
|
|
23987
23937
|
function _to_array(arr) {
|
|
23988
|
-
return _array_with_holes$1(arr) || _iterable_to_array$3
|
|
23938
|
+
return _array_with_holes$1(arr) || _iterable_to_array$3(arr) || _unsupported_iterable_to_array$3(arr) || _non_iterable_rest$1();
|
|
23989
23939
|
}
|
|
23990
|
-
function _to_consumable_array$3
|
|
23991
|
-
return _array_without_holes$3
|
|
23940
|
+
function _to_consumable_array$3(arr) {
|
|
23941
|
+
return _array_without_holes$3(arr) || _iterable_to_array$3(arr) || _unsupported_iterable_to_array$3(arr) || _non_iterable_spread$3();
|
|
23992
23942
|
}
|
|
23993
23943
|
function _type_of$y(obj) {
|
|
23994
23944
|
"@swc/helpers - typeof";
|
|
23995
23945
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
23996
23946
|
}
|
|
23997
|
-
function _unsupported_iterable_to_array$3
|
|
23947
|
+
function _unsupported_iterable_to_array$3(o, minLen) {
|
|
23998
23948
|
if (!o) return;
|
|
23999
|
-
if (typeof o === "string") return _array_like_to_array$3
|
|
23949
|
+
if (typeof o === "string") return _array_like_to_array$3(o, minLen);
|
|
24000
23950
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
24001
23951
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
24002
23952
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
24003
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$3
|
|
23953
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$3(o, minLen);
|
|
24004
23954
|
}
|
|
24005
23955
|
function _wrap_native_super$5(Class) {
|
|
24006
23956
|
var _cache = typeof Map === "function" ? new Map() : undefined;
|
|
@@ -24276,19 +24226,19 @@ var FunctionWrapper = /*#__PURE__*/ function() {
|
|
|
24276
24226
|
} else {
|
|
24277
24227
|
// ensure that single arg provided for var args named
|
|
24278
24228
|
// parameter is wrapped in a list
|
|
24279
|
-
return _to_consumable_array$3
|
|
24229
|
+
return _to_consumable_array$3(params).concat(_to_consumable_array$3(isArray$2(value) ? value : [
|
|
24280
24230
|
value
|
|
24281
24231
|
]));
|
|
24282
24232
|
}
|
|
24283
24233
|
}
|
|
24284
|
-
return _to_consumable_array$3
|
|
24234
|
+
return _to_consumable_array$3(params).concat([
|
|
24285
24235
|
contextOrArgs[name]
|
|
24286
24236
|
]);
|
|
24287
24237
|
}, []);
|
|
24288
24238
|
}
|
|
24289
24239
|
return (_this_fn = this.fn).call.apply(_this_fn, [
|
|
24290
24240
|
null
|
|
24291
|
-
].concat(_to_consumable_array$3
|
|
24241
|
+
].concat(_to_consumable_array$3(params)));
|
|
24292
24242
|
}
|
|
24293
24243
|
}
|
|
24294
24244
|
]);
|
|
@@ -25214,7 +25164,7 @@ var builtins = {
|
|
|
25214
25164
|
var _Object;
|
|
25215
25165
|
return (_Object = Object).assign.apply(_Object, [
|
|
25216
25166
|
{}
|
|
25217
|
-
].concat(_to_consumable_array$3
|
|
25167
|
+
].concat(_to_consumable_array$3(contexts)));
|
|
25218
25168
|
}, 'context'),
|
|
25219
25169
|
'context put': fn$1(function(context, keys, value, key) {
|
|
25220
25170
|
if (typeof keys === 'undefined' && typeof key === 'undefined') {
|
|
@@ -25333,7 +25283,7 @@ function createArgsValidator(argDefinitions) {
|
|
|
25333
25283
|
})) {
|
|
25334
25284
|
return null;
|
|
25335
25285
|
}
|
|
25336
|
-
return fnDefinition.apply(void 0, _to_consumable_array$3
|
|
25286
|
+
return fnDefinition.apply(void 0, _to_consumable_array$3(args));
|
|
25337
25287
|
};
|
|
25338
25288
|
wrappedFn.$args = parameterNames || parseParameterNames(fnDefinition);
|
|
25339
25289
|
return wrappedFn;
|
|
@@ -25356,7 +25306,7 @@ function createArgsValidator(argDefinitions) {
|
|
|
25356
25306
|
if (!convertedArgs) {
|
|
25357
25307
|
return null;
|
|
25358
25308
|
}
|
|
25359
|
-
return fnDefinition.apply(void 0, _to_consumable_array$3
|
|
25309
|
+
return fnDefinition.apply(void 0, _to_consumable_array$3(convertedArgs));
|
|
25360
25310
|
};
|
|
25361
25311
|
wrappedFn.$args = parameterNames;
|
|
25362
25312
|
return wrappedFn;
|
|
@@ -25395,9 +25345,9 @@ function sum(list) {
|
|
|
25395
25345
|
}
|
|
25396
25346
|
function flatten$1(param) {
|
|
25397
25347
|
var _param = _to_array(param), x = _param[0], xs = _param.slice(1);
|
|
25398
|
-
return x !== undefined ? _to_consumable_array$3
|
|
25348
|
+
return x !== undefined ? _to_consumable_array$3(Array.isArray(x) ? flatten$1(x) : [
|
|
25399
25349
|
x
|
|
25400
|
-
]).concat(_to_consumable_array$3
|
|
25350
|
+
]).concat(_to_consumable_array$3(flatten$1(xs))) : [];
|
|
25401
25351
|
}
|
|
25402
25352
|
function toKeyString(key) {
|
|
25403
25353
|
if (typeof key === 'string' && /\W/.test(key)) {
|
|
@@ -25507,9 +25457,9 @@ function stddev(array) {
|
|
|
25507
25457
|
}
|
|
25508
25458
|
function listReplace(list, matcher, newItem) {
|
|
25509
25459
|
if (isNumber(matcher)) {
|
|
25510
|
-
return _to_consumable_array$3
|
|
25460
|
+
return _to_consumable_array$3(list.slice(0, matcher - 1)).concat([
|
|
25511
25461
|
newItem
|
|
25512
|
-
], _to_consumable_array$3
|
|
25462
|
+
], _to_consumable_array$3(list.slice(matcher)));
|
|
25513
25463
|
}
|
|
25514
25464
|
return list.map(function(item, _idx) {
|
|
25515
25465
|
if (matcher.invoke([
|
|
@@ -26073,7 +26023,7 @@ function evalNode(node, input, args) {
|
|
|
26073
26023
|
};
|
|
26074
26024
|
var join = function(aContexts, bContextProducer) {
|
|
26075
26025
|
var _instance;
|
|
26076
|
-
return (_instance = []).concat.apply(_instance, _to_consumable_array$3
|
|
26026
|
+
return (_instance = []).concat.apply(_instance, _to_consumable_array$3(aContexts.map(function(aContext) {
|
|
26077
26027
|
var bContexts = bContextProducer(Object.assign(Object.assign({}, context), aContext));
|
|
26078
26028
|
if (!isValidContexts(bContexts)) {
|
|
26079
26029
|
return null;
|
|
@@ -26095,14 +26045,14 @@ function evalNode(node, input, args) {
|
|
|
26095
26045
|
}
|
|
26096
26046
|
return cartesian.apply(void 0, [
|
|
26097
26047
|
join(aContexts, bContextProducer)
|
|
26098
|
-
].concat(_to_consumable_array$3
|
|
26048
|
+
].concat(_to_consumable_array$3(otherContextProducers)));
|
|
26099
26049
|
};
|
|
26100
26050
|
var cartesianProduct = function(contextProducers) {
|
|
26101
26051
|
var _contextProducers = _to_array(contextProducers), aContextProducer = _contextProducers[0], otherContextProducers = _contextProducers.slice(1);
|
|
26102
26052
|
var aContexts = aContextProducer(context);
|
|
26103
26053
|
return cartesian.apply(void 0, [
|
|
26104
26054
|
aContexts
|
|
26105
|
-
].concat(_to_consumable_array$3
|
|
26055
|
+
].concat(_to_consumable_array$3(otherContextProducers)));
|
|
26106
26056
|
};
|
|
26107
26057
|
var product = cartesianProduct(args);
|
|
26108
26058
|
return product && product.map(function(p) {
|
|
@@ -26829,7 +26779,7 @@ function parseString(str) {
|
|
|
26829
26779
|
while((charCodeMatch = escapePattern.exec(substring)) !== null){
|
|
26830
26780
|
chars.push(parseInt(charCodeMatch[1], 16));
|
|
26831
26781
|
}
|
|
26832
|
-
return (_String = String).fromCharCode.apply(_String, _to_consumable_array$3
|
|
26782
|
+
return (_String = String).fromCharCode.apply(_String, _to_consumable_array$3(chars));
|
|
26833
26783
|
}
|
|
26834
26784
|
throw new Error('illegal match');
|
|
26835
26785
|
});
|
|
@@ -38852,13 +38802,13 @@ var AT_LEAST_ONE_SEP_IDX = 6 << BITS_FOR_OCCURRENCE_IDX;
|
|
|
38852
38802
|
function getKeyForAutomaticLookahead(ruleIdx, dslMethodIdx, occurrence) {
|
|
38853
38803
|
return occurrence | dslMethodIdx | ruleIdx;
|
|
38854
38804
|
}
|
|
38855
|
-
function _array_like_to_array$2
|
|
38805
|
+
function _array_like_to_array$2(arr, len) {
|
|
38856
38806
|
if (len == null || len > arr.length) len = arr.length;
|
|
38857
38807
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
38858
38808
|
return arr2;
|
|
38859
38809
|
}
|
|
38860
|
-
function _array_without_holes$2
|
|
38861
|
-
if (Array.isArray(arr)) return _array_like_to_array$2
|
|
38810
|
+
function _array_without_holes$2(arr) {
|
|
38811
|
+
if (Array.isArray(arr)) return _array_like_to_array$2(arr);
|
|
38862
38812
|
}
|
|
38863
38813
|
function _class_call_check$d(instance, Constructor) {
|
|
38864
38814
|
if (!(instance instanceof Constructor)) {
|
|
@@ -38878,22 +38828,22 @@ function _create_class$b(Constructor, protoProps, staticProps) {
|
|
|
38878
38828
|
if (protoProps) _defineProperties$b(Constructor.prototype, protoProps);
|
|
38879
38829
|
return Constructor;
|
|
38880
38830
|
}
|
|
38881
|
-
function _iterable_to_array$2
|
|
38831
|
+
function _iterable_to_array$2(iter) {
|
|
38882
38832
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
38883
38833
|
}
|
|
38884
|
-
function _non_iterable_spread$2
|
|
38834
|
+
function _non_iterable_spread$2() {
|
|
38885
38835
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
38886
38836
|
}
|
|
38887
|
-
function _to_consumable_array$2
|
|
38888
|
-
return _array_without_holes$2
|
|
38837
|
+
function _to_consumable_array$2(arr) {
|
|
38838
|
+
return _array_without_holes$2(arr) || _iterable_to_array$2(arr) || _unsupported_iterable_to_array$2(arr) || _non_iterable_spread$2();
|
|
38889
38839
|
}
|
|
38890
|
-
function _unsupported_iterable_to_array$2
|
|
38840
|
+
function _unsupported_iterable_to_array$2(o, minLen) {
|
|
38891
38841
|
if (!o) return;
|
|
38892
|
-
if (typeof o === "string") return _array_like_to_array$2
|
|
38842
|
+
if (typeof o === "string") return _array_like_to_array$2(o, minLen);
|
|
38893
38843
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
38894
38844
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
38895
38845
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
38896
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2
|
|
38846
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
|
|
38897
38847
|
}
|
|
38898
38848
|
var LLkLookaheadStrategy = /*#__PURE__*/ function() {
|
|
38899
38849
|
function LLkLookaheadStrategy(options) {
|
|
@@ -38910,7 +38860,7 @@ var LLkLookaheadStrategy = /*#__PURE__*/ function() {
|
|
|
38910
38860
|
var emptyAltErrors = this.validateEmptyOrAlternatives(options.rules);
|
|
38911
38861
|
var ambiguousAltsErrors = this.validateAmbiguousAlternationAlternatives(options.rules, this.maxLookahead);
|
|
38912
38862
|
var emptyRepetitionErrors = this.validateSomeNonEmptyLookaheadPath(options.rules, this.maxLookahead);
|
|
38913
|
-
var allErrors = _to_consumable_array$2
|
|
38863
|
+
var allErrors = _to_consumable_array$2(leftRecursionErrors).concat(_to_consumable_array$2(emptyAltErrors), _to_consumable_array$2(ambiguousAltsErrors), _to_consumable_array$2(emptyRepetitionErrors));
|
|
38914
38864
|
return allErrors;
|
|
38915
38865
|
}
|
|
38916
38866
|
return leftRecursionErrors;
|
|
@@ -38972,7 +38922,7 @@ function _class_call_check$c(instance, Constructor) {
|
|
|
38972
38922
|
throw new TypeError("Cannot call a class as a function");
|
|
38973
38923
|
}
|
|
38974
38924
|
}
|
|
38975
|
-
function _defineProperties$a
|
|
38925
|
+
function _defineProperties$a(target, props) {
|
|
38976
38926
|
for(var i = 0; i < props.length; i++){
|
|
38977
38927
|
var descriptor = props[i];
|
|
38978
38928
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -38981,8 +38931,8 @@ function _defineProperties$a$1(target, props) {
|
|
|
38981
38931
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
38982
38932
|
}
|
|
38983
38933
|
}
|
|
38984
|
-
function _create_class$a
|
|
38985
|
-
if (protoProps) _defineProperties$a
|
|
38934
|
+
function _create_class$a(Constructor, protoProps, staticProps) {
|
|
38935
|
+
if (protoProps) _defineProperties$a(Constructor.prototype, protoProps);
|
|
38986
38936
|
return Constructor;
|
|
38987
38937
|
}
|
|
38988
38938
|
function _get_prototype_of$4(o) {
|
|
@@ -39051,7 +39001,7 @@ function _create_super$4(Derived) {
|
|
|
39051
39001
|
function LooksAhead() {
|
|
39052
39002
|
_class_call_check$c(this, LooksAhead);
|
|
39053
39003
|
}
|
|
39054
|
-
_create_class$a
|
|
39004
|
+
_create_class$a(LooksAhead, [
|
|
39055
39005
|
{
|
|
39056
39006
|
key: "initLooksAhead",
|
|
39057
39007
|
value: function initLooksAhead(config) {
|
|
@@ -39165,7 +39115,7 @@ var DslMethodsCollectorVisitor = /*#__PURE__*/ function(GAstVisitor) {
|
|
|
39165
39115
|
};
|
|
39166
39116
|
return _this;
|
|
39167
39117
|
}
|
|
39168
|
-
_create_class$a
|
|
39118
|
+
_create_class$a(DslMethodsCollectorVisitor, [
|
|
39169
39119
|
{
|
|
39170
39120
|
key: "reset",
|
|
39171
39121
|
value: function reset() {
|
|
@@ -39384,12 +39334,12 @@ function validateMissingCstMethods(visitorInstance, ruleNames) {
|
|
|
39384
39334
|
});
|
|
39385
39335
|
return compact(errors);
|
|
39386
39336
|
}
|
|
39387
|
-
function _class_call_check$b
|
|
39337
|
+
function _class_call_check$b(instance, Constructor) {
|
|
39388
39338
|
if (!(instance instanceof Constructor)) {
|
|
39389
39339
|
throw new TypeError("Cannot call a class as a function");
|
|
39390
39340
|
}
|
|
39391
39341
|
}
|
|
39392
|
-
function _defineProperties$9
|
|
39342
|
+
function _defineProperties$9(target, props) {
|
|
39393
39343
|
for(var i = 0; i < props.length; i++){
|
|
39394
39344
|
var descriptor = props[i];
|
|
39395
39345
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -39398,17 +39348,17 @@ function _defineProperties$9$1(target, props) {
|
|
|
39398
39348
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
39399
39349
|
}
|
|
39400
39350
|
}
|
|
39401
|
-
function _create_class$9
|
|
39402
|
-
if (protoProps) _defineProperties$9
|
|
39351
|
+
function _create_class$9(Constructor, protoProps, staticProps) {
|
|
39352
|
+
if (protoProps) _defineProperties$9(Constructor.prototype, protoProps);
|
|
39403
39353
|
return Constructor;
|
|
39404
39354
|
}
|
|
39405
39355
|
/**
|
|
39406
39356
|
* This trait is responsible for the CST building logic.
|
|
39407
39357
|
*/ var TreeBuilder = /*#__PURE__*/ function() {
|
|
39408
39358
|
function TreeBuilder() {
|
|
39409
|
-
_class_call_check$b
|
|
39359
|
+
_class_call_check$b(this, TreeBuilder);
|
|
39410
39360
|
}
|
|
39411
|
-
_create_class$9
|
|
39361
|
+
_create_class$9(TreeBuilder, [
|
|
39412
39362
|
{
|
|
39413
39363
|
key: "initTreeBuilder",
|
|
39414
39364
|
value: function initTreeBuilder(config) {
|
|
@@ -39627,12 +39577,12 @@ function _create_class$9$1(Constructor, protoProps, staticProps) {
|
|
|
39627
39577
|
]);
|
|
39628
39578
|
return TreeBuilder;
|
|
39629
39579
|
}();
|
|
39630
|
-
function _class_call_check$a
|
|
39580
|
+
function _class_call_check$a(instance, Constructor) {
|
|
39631
39581
|
if (!(instance instanceof Constructor)) {
|
|
39632
39582
|
throw new TypeError("Cannot call a class as a function");
|
|
39633
39583
|
}
|
|
39634
39584
|
}
|
|
39635
|
-
function _defineProperties$8
|
|
39585
|
+
function _defineProperties$8(target, props) {
|
|
39636
39586
|
for(var i = 0; i < props.length; i++){
|
|
39637
39587
|
var descriptor = props[i];
|
|
39638
39588
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -39641,8 +39591,8 @@ function _defineProperties$8$1(target, props) {
|
|
|
39641
39591
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
39642
39592
|
}
|
|
39643
39593
|
}
|
|
39644
|
-
function _create_class$8
|
|
39645
|
-
if (protoProps) _defineProperties$8
|
|
39594
|
+
function _create_class$8(Constructor, protoProps, staticProps) {
|
|
39595
|
+
if (protoProps) _defineProperties$8(Constructor.prototype, protoProps);
|
|
39646
39596
|
return Constructor;
|
|
39647
39597
|
}
|
|
39648
39598
|
/**
|
|
@@ -39653,9 +39603,9 @@ function _create_class$8$1(Constructor, protoProps, staticProps) {
|
|
|
39653
39603
|
* - Streaming Lexer.
|
|
39654
39604
|
*/ var LexerAdapter = /*#__PURE__*/ function() {
|
|
39655
39605
|
function LexerAdapter() {
|
|
39656
|
-
_class_call_check$a
|
|
39606
|
+
_class_call_check$a(this, LexerAdapter);
|
|
39657
39607
|
}
|
|
39658
|
-
_create_class$8
|
|
39608
|
+
_create_class$8(LexerAdapter, [
|
|
39659
39609
|
{
|
|
39660
39610
|
key: "initLexerAdapter",
|
|
39661
39611
|
value: function initLexerAdapter() {
|
|
@@ -39746,12 +39696,12 @@ function _create_class$8$1(Constructor, protoProps, staticProps) {
|
|
|
39746
39696
|
]);
|
|
39747
39697
|
return LexerAdapter;
|
|
39748
39698
|
}();
|
|
39749
|
-
function _class_call_check$9
|
|
39699
|
+
function _class_call_check$9(instance, Constructor) {
|
|
39750
39700
|
if (!(instance instanceof Constructor)) {
|
|
39751
39701
|
throw new TypeError("Cannot call a class as a function");
|
|
39752
39702
|
}
|
|
39753
39703
|
}
|
|
39754
|
-
function _defineProperties$7
|
|
39704
|
+
function _defineProperties$7(target, props) {
|
|
39755
39705
|
for(var i = 0; i < props.length; i++){
|
|
39756
39706
|
var descriptor = props[i];
|
|
39757
39707
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -39760,8 +39710,8 @@ function _defineProperties$7$1(target, props) {
|
|
|
39760
39710
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
39761
39711
|
}
|
|
39762
39712
|
}
|
|
39763
|
-
function _create_class$7
|
|
39764
|
-
if (protoProps) _defineProperties$7
|
|
39713
|
+
function _create_class$7(Constructor, protoProps, staticProps) {
|
|
39714
|
+
if (protoProps) _defineProperties$7(Constructor.prototype, protoProps);
|
|
39765
39715
|
return Constructor;
|
|
39766
39716
|
}
|
|
39767
39717
|
/**
|
|
@@ -39773,9 +39723,9 @@ function _create_class$7$1(Constructor, protoProps, staticProps) {
|
|
|
39773
39723
|
* - ...
|
|
39774
39724
|
*/ var RecognizerApi = /*#__PURE__*/ function() {
|
|
39775
39725
|
function RecognizerApi() {
|
|
39776
|
-
_class_call_check$9
|
|
39726
|
+
_class_call_check$9(this, RecognizerApi);
|
|
39777
39727
|
}
|
|
39778
|
-
_create_class$7
|
|
39728
|
+
_create_class$7(RecognizerApi, [
|
|
39779
39729
|
{
|
|
39780
39730
|
key: "ACTION",
|
|
39781
39731
|
value: function ACTION(impl) {
|
|
@@ -40371,12 +40321,12 @@ function _create_class$7$1(Constructor, protoProps, staticProps) {
|
|
|
40371
40321
|
]);
|
|
40372
40322
|
return RecognizerApi;
|
|
40373
40323
|
}();
|
|
40374
|
-
function _class_call_check$8
|
|
40324
|
+
function _class_call_check$8(instance, Constructor) {
|
|
40375
40325
|
if (!(instance instanceof Constructor)) {
|
|
40376
40326
|
throw new TypeError("Cannot call a class as a function");
|
|
40377
40327
|
}
|
|
40378
40328
|
}
|
|
40379
|
-
function _defineProperties$6
|
|
40329
|
+
function _defineProperties$6(target, props) {
|
|
40380
40330
|
for(var i = 0; i < props.length; i++){
|
|
40381
40331
|
var descriptor = props[i];
|
|
40382
40332
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -40385,8 +40335,8 @@ function _defineProperties$6$1(target, props) {
|
|
|
40385
40335
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
40386
40336
|
}
|
|
40387
40337
|
}
|
|
40388
|
-
function _create_class$6
|
|
40389
|
-
if (protoProps) _defineProperties$6
|
|
40338
|
+
function _create_class$6(Constructor, protoProps, staticProps) {
|
|
40339
|
+
if (protoProps) _defineProperties$6(Constructor.prototype, protoProps);
|
|
40390
40340
|
return Constructor;
|
|
40391
40341
|
}
|
|
40392
40342
|
/**
|
|
@@ -40394,9 +40344,9 @@ function _create_class$6$1(Constructor, protoProps, staticProps) {
|
|
|
40394
40344
|
* Used by the official API (recognizer_api.ts)
|
|
40395
40345
|
*/ var RecognizerEngine = /*#__PURE__*/ function() {
|
|
40396
40346
|
function RecognizerEngine() {
|
|
40397
|
-
_class_call_check$8
|
|
40347
|
+
_class_call_check$8(this, RecognizerEngine);
|
|
40398
40348
|
}
|
|
40399
|
-
_create_class$6
|
|
40349
|
+
_create_class$6(RecognizerEngine, [
|
|
40400
40350
|
{
|
|
40401
40351
|
key: "initRecognizerEngine",
|
|
40402
40352
|
value: function initRecognizerEngine(tokenVocabulary, config) {
|
|
@@ -40986,12 +40936,12 @@ function _create_class$6$1(Constructor, protoProps, staticProps) {
|
|
|
40986
40936
|
]);
|
|
40987
40937
|
return RecognizerEngine;
|
|
40988
40938
|
}();
|
|
40989
|
-
function _class_call_check$7
|
|
40939
|
+
function _class_call_check$7(instance, Constructor) {
|
|
40990
40940
|
if (!(instance instanceof Constructor)) {
|
|
40991
40941
|
throw new TypeError("Cannot call a class as a function");
|
|
40992
40942
|
}
|
|
40993
40943
|
}
|
|
40994
|
-
function _defineProperties$5
|
|
40944
|
+
function _defineProperties$5(target, props) {
|
|
40995
40945
|
for(var i = 0; i < props.length; i++){
|
|
40996
40946
|
var descriptor = props[i];
|
|
40997
40947
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -41000,17 +40950,17 @@ function _defineProperties$5$1(target, props) {
|
|
|
41000
40950
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
41001
40951
|
}
|
|
41002
40952
|
}
|
|
41003
|
-
function _create_class$5
|
|
41004
|
-
if (protoProps) _defineProperties$5
|
|
40953
|
+
function _create_class$5(Constructor, protoProps, staticProps) {
|
|
40954
|
+
if (protoProps) _defineProperties$5(Constructor.prototype, protoProps);
|
|
41005
40955
|
return Constructor;
|
|
41006
40956
|
}
|
|
41007
40957
|
/**
|
|
41008
40958
|
* Trait responsible for runtime parsing errors.
|
|
41009
40959
|
*/ var ErrorHandler = /*#__PURE__*/ function() {
|
|
41010
40960
|
function ErrorHandler() {
|
|
41011
|
-
_class_call_check$7
|
|
40961
|
+
_class_call_check$7(this, ErrorHandler);
|
|
41012
40962
|
}
|
|
41013
|
-
_create_class$5
|
|
40963
|
+
_create_class$5(ErrorHandler, [
|
|
41014
40964
|
{
|
|
41015
40965
|
key: "initErrorHandler",
|
|
41016
40966
|
value: function initErrorHandler(config) {
|
|
@@ -41091,12 +41041,12 @@ function _create_class$5$1(Constructor, protoProps, staticProps) {
|
|
|
41091
41041
|
]);
|
|
41092
41042
|
return ErrorHandler;
|
|
41093
41043
|
}();
|
|
41094
|
-
function _class_call_check$6
|
|
41044
|
+
function _class_call_check$6(instance, Constructor) {
|
|
41095
41045
|
if (!(instance instanceof Constructor)) {
|
|
41096
41046
|
throw new TypeError("Cannot call a class as a function");
|
|
41097
41047
|
}
|
|
41098
41048
|
}
|
|
41099
|
-
function _defineProperties$4
|
|
41049
|
+
function _defineProperties$4(target, props) {
|
|
41100
41050
|
for(var i = 0; i < props.length; i++){
|
|
41101
41051
|
var descriptor = props[i];
|
|
41102
41052
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -41105,15 +41055,15 @@ function _defineProperties$4$1(target, props) {
|
|
|
41105
41055
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
41106
41056
|
}
|
|
41107
41057
|
}
|
|
41108
|
-
function _create_class$4
|
|
41109
|
-
if (protoProps) _defineProperties$4
|
|
41058
|
+
function _create_class$4(Constructor, protoProps, staticProps) {
|
|
41059
|
+
if (protoProps) _defineProperties$4(Constructor.prototype, protoProps);
|
|
41110
41060
|
return Constructor;
|
|
41111
41061
|
}
|
|
41112
41062
|
var ContentAssist = /*#__PURE__*/ function() {
|
|
41113
41063
|
function ContentAssist() {
|
|
41114
|
-
_class_call_check$6
|
|
41064
|
+
_class_call_check$6(this, ContentAssist);
|
|
41115
41065
|
}
|
|
41116
|
-
_create_class$4
|
|
41066
|
+
_create_class$4(ContentAssist, [
|
|
41117
41067
|
{
|
|
41118
41068
|
key: "initContentAssist",
|
|
41119
41069
|
value: function initContentAssist() {}
|
|
@@ -41145,12 +41095,12 @@ var ContentAssist = /*#__PURE__*/ function() {
|
|
|
41145
41095
|
]);
|
|
41146
41096
|
return ContentAssist;
|
|
41147
41097
|
}();
|
|
41148
|
-
function _class_call_check$5
|
|
41098
|
+
function _class_call_check$5(instance, Constructor) {
|
|
41149
41099
|
if (!(instance instanceof Constructor)) {
|
|
41150
41100
|
throw new TypeError("Cannot call a class as a function");
|
|
41151
41101
|
}
|
|
41152
41102
|
}
|
|
41153
|
-
function _defineProperties$3
|
|
41103
|
+
function _defineProperties$3(target, props) {
|
|
41154
41104
|
for(var i = 0; i < props.length; i++){
|
|
41155
41105
|
var descriptor = props[i];
|
|
41156
41106
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -41159,8 +41109,8 @@ function _defineProperties$3$1(target, props) {
|
|
|
41159
41109
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
41160
41110
|
}
|
|
41161
41111
|
}
|
|
41162
|
-
function _create_class$3
|
|
41163
|
-
if (protoProps) _defineProperties$3
|
|
41112
|
+
function _create_class$3(Constructor, protoProps, staticProps) {
|
|
41113
|
+
if (protoProps) _defineProperties$3(Constructor.prototype, protoProps);
|
|
41164
41114
|
return Constructor;
|
|
41165
41115
|
}
|
|
41166
41116
|
var RECORDING_NULL_OBJECT = {
|
|
@@ -41187,9 +41137,9 @@ var RECORDING_PHASE_CSTNODE = {
|
|
|
41187
41137
|
* This trait handles the creation of the GAST structure for Chevrotain Grammars
|
|
41188
41138
|
*/ var GastRecorder = /*#__PURE__*/ function() {
|
|
41189
41139
|
function GastRecorder() {
|
|
41190
|
-
_class_call_check$5
|
|
41140
|
+
_class_call_check$5(this, GastRecorder);
|
|
41191
41141
|
}
|
|
41192
|
-
_create_class$3
|
|
41142
|
+
_create_class$3(GastRecorder, [
|
|
41193
41143
|
{
|
|
41194
41144
|
key: "initGastRecorder",
|
|
41195
41145
|
value: function initGastRecorder(config) {
|
|
@@ -41500,12 +41450,12 @@ function assertMethodIdxIsValid(idx) {
|
|
|
41500
41450
|
throw error;
|
|
41501
41451
|
}
|
|
41502
41452
|
}
|
|
41503
|
-
function _class_call_check$4
|
|
41453
|
+
function _class_call_check$4(instance, Constructor) {
|
|
41504
41454
|
if (!(instance instanceof Constructor)) {
|
|
41505
41455
|
throw new TypeError("Cannot call a class as a function");
|
|
41506
41456
|
}
|
|
41507
41457
|
}
|
|
41508
|
-
function _defineProperties$2
|
|
41458
|
+
function _defineProperties$2(target, props) {
|
|
41509
41459
|
for(var i = 0; i < props.length; i++){
|
|
41510
41460
|
var descriptor = props[i];
|
|
41511
41461
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -41514,17 +41464,17 @@ function _defineProperties$2$1(target, props) {
|
|
|
41514
41464
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
41515
41465
|
}
|
|
41516
41466
|
}
|
|
41517
|
-
function _create_class$2
|
|
41518
|
-
if (protoProps) _defineProperties$2
|
|
41467
|
+
function _create_class$2(Constructor, protoProps, staticProps) {
|
|
41468
|
+
if (protoProps) _defineProperties$2(Constructor.prototype, protoProps);
|
|
41519
41469
|
return Constructor;
|
|
41520
41470
|
}
|
|
41521
41471
|
/**
|
|
41522
41472
|
* Trait responsible for runtime parsing errors.
|
|
41523
41473
|
*/ var PerformanceTracer = /*#__PURE__*/ function() {
|
|
41524
41474
|
function PerformanceTracer() {
|
|
41525
|
-
_class_call_check$4
|
|
41475
|
+
_class_call_check$4(this, PerformanceTracer);
|
|
41526
41476
|
}
|
|
41527
|
-
_create_class$2
|
|
41477
|
+
_create_class$2(PerformanceTracer, [
|
|
41528
41478
|
{
|
|
41529
41479
|
key: "initPerformanceTracer",
|
|
41530
41480
|
value: function initPerformanceTracer(config) {
|
|
@@ -41589,12 +41539,12 @@ function _assert_this_initialized$3(self1) {
|
|
|
41589
41539
|
}
|
|
41590
41540
|
return self1;
|
|
41591
41541
|
}
|
|
41592
|
-
function _class_call_check$3
|
|
41542
|
+
function _class_call_check$3(instance, Constructor) {
|
|
41593
41543
|
if (!(instance instanceof Constructor)) {
|
|
41594
41544
|
throw new TypeError("Cannot call a class as a function");
|
|
41595
41545
|
}
|
|
41596
41546
|
}
|
|
41597
|
-
function _defineProperties$1
|
|
41547
|
+
function _defineProperties$1(target, props) {
|
|
41598
41548
|
for(var i = 0; i < props.length; i++){
|
|
41599
41549
|
var descriptor = props[i];
|
|
41600
41550
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -41603,9 +41553,9 @@ function _defineProperties$1$1(target, props) {
|
|
|
41603
41553
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
41604
41554
|
}
|
|
41605
41555
|
}
|
|
41606
|
-
function _create_class$1
|
|
41607
|
-
if (protoProps) _defineProperties$1
|
|
41608
|
-
if (staticProps) _defineProperties$1
|
|
41556
|
+
function _create_class$1(Constructor, protoProps, staticProps) {
|
|
41557
|
+
if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);
|
|
41558
|
+
if (staticProps) _defineProperties$1(Constructor, staticProps);
|
|
41609
41559
|
return Constructor;
|
|
41610
41560
|
}
|
|
41611
41561
|
function _get_prototype_of$3(o) {
|
|
@@ -41705,7 +41655,7 @@ var ParserDefinitionErrorType;
|
|
|
41705
41655
|
})(ParserDefinitionErrorType || (ParserDefinitionErrorType = {}));
|
|
41706
41656
|
var Parser = /*#__PURE__*/ function() {
|
|
41707
41657
|
function Parser(tokenVocabulary, config) {
|
|
41708
|
-
_class_call_check$3
|
|
41658
|
+
_class_call_check$3(this, Parser);
|
|
41709
41659
|
this.definitionErrors = [];
|
|
41710
41660
|
this.selfAnalysisDone = false;
|
|
41711
41661
|
var that = this;
|
|
@@ -41724,7 +41674,7 @@ var Parser = /*#__PURE__*/ function() {
|
|
|
41724
41674
|
this.skipValidations = has$1(config, "skipValidations") ? config.skipValidations // casting assumes the end user passing the correct type
|
|
41725
41675
|
: DEFAULT_PARSER_CONFIG.skipValidations;
|
|
41726
41676
|
}
|
|
41727
|
-
_create_class$1
|
|
41677
|
+
_create_class$1(Parser, [
|
|
41728
41678
|
{
|
|
41729
41679
|
key: "performSelfAnalysis",
|
|
41730
41680
|
value: function performSelfAnalysis() {
|
|
@@ -41844,7 +41794,7 @@ var CstParser = /*#__PURE__*/ function(Parser) {
|
|
|
41844
41794
|
var _super = _create_super$3(CstParser);
|
|
41845
41795
|
function CstParser(tokenVocabulary) {
|
|
41846
41796
|
var config = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : DEFAULT_PARSER_CONFIG;
|
|
41847
|
-
_class_call_check$3
|
|
41797
|
+
_class_call_check$3(this, CstParser);
|
|
41848
41798
|
var configClone = clone(config);
|
|
41849
41799
|
configClone.outputCst = true;
|
|
41850
41800
|
return _super.call(this, tokenVocabulary, configClone);
|
|
@@ -42461,34 +42411,34 @@ function _equals(a, b, stackA, stackB) {
|
|
|
42461
42411
|
*/ var equals = /*#__PURE__*/ _curry2(function equals(a, b) {
|
|
42462
42412
|
return _equals(a, b, [], []);
|
|
42463
42413
|
});
|
|
42464
|
-
function _array_like_to_array$1
|
|
42414
|
+
function _array_like_to_array$1(arr, len) {
|
|
42465
42415
|
if (len == null || len > arr.length) len = arr.length;
|
|
42466
42416
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
42467
42417
|
return arr2;
|
|
42468
42418
|
}
|
|
42469
|
-
function _array_without_holes$1
|
|
42470
|
-
if (Array.isArray(arr)) return _array_like_to_array$1
|
|
42419
|
+
function _array_without_holes$1(arr) {
|
|
42420
|
+
if (Array.isArray(arr)) return _array_like_to_array$1(arr);
|
|
42471
42421
|
}
|
|
42472
|
-
function _iterable_to_array$1
|
|
42422
|
+
function _iterable_to_array$1(iter) {
|
|
42473
42423
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
42474
42424
|
}
|
|
42475
|
-
function _non_iterable_spread$1
|
|
42425
|
+
function _non_iterable_spread$1() {
|
|
42476
42426
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
42477
42427
|
}
|
|
42478
|
-
function _to_consumable_array$1
|
|
42479
|
-
return _array_without_holes$1
|
|
42428
|
+
function _to_consumable_array$1(arr) {
|
|
42429
|
+
return _array_without_holes$1(arr) || _iterable_to_array$1(arr) || _unsupported_iterable_to_array$1(arr) || _non_iterable_spread$1();
|
|
42480
42430
|
}
|
|
42481
42431
|
function _type_of$3(obj) {
|
|
42482
42432
|
"@swc/helpers - typeof";
|
|
42483
42433
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
42484
42434
|
}
|
|
42485
|
-
function _unsupported_iterable_to_array$1
|
|
42435
|
+
function _unsupported_iterable_to_array$1(o, minLen) {
|
|
42486
42436
|
if (!o) return;
|
|
42487
|
-
if (typeof o === "string") return _array_like_to_array$1
|
|
42437
|
+
if (typeof o === "string") return _array_like_to_array$1(o, minLen);
|
|
42488
42438
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
42489
42439
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
42490
42440
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
42491
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$1
|
|
42441
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$1(o, minLen);
|
|
42492
42442
|
}
|
|
42493
42443
|
var CelType;
|
|
42494
42444
|
(function(CelType) {
|
|
@@ -42586,7 +42536,7 @@ var additionOperation = function(left, right) {
|
|
|
42586
42536
|
if (left.length !== 0 && right.length !== 0 && _type_of$3(left[0]) !== _type_of$3(right[0])) {
|
|
42587
42537
|
throw new CelTypeError(Operations.addition, left[0], right[0]);
|
|
42588
42538
|
}
|
|
42589
|
-
return _to_consumable_array$1
|
|
42539
|
+
return _to_consumable_array$1(left).concat(_to_consumable_array$1(right));
|
|
42590
42540
|
}
|
|
42591
42541
|
throw new CelTypeError(Operations.addition, left, right);
|
|
42592
42542
|
};
|
|
@@ -42793,7 +42743,7 @@ function _assert_this_initialized$2(self1) {
|
|
|
42793
42743
|
}
|
|
42794
42744
|
return self1;
|
|
42795
42745
|
}
|
|
42796
|
-
function _class_call_check$2
|
|
42746
|
+
function _class_call_check$2(instance, Constructor) {
|
|
42797
42747
|
if (!(instance instanceof Constructor)) {
|
|
42798
42748
|
throw new TypeError("Cannot call a class as a function");
|
|
42799
42749
|
}
|
|
@@ -42908,7 +42858,7 @@ var CelTypeError = /*#__PURE__*/ function(Error1) {
|
|
|
42908
42858
|
_inherits$2(CelTypeError, Error1);
|
|
42909
42859
|
var _super = _create_super$2(CelTypeError);
|
|
42910
42860
|
function CelTypeError(operation, left, right) {
|
|
42911
|
-
_class_call_check$2
|
|
42861
|
+
_class_call_check$2(this, CelTypeError);
|
|
42912
42862
|
var _this;
|
|
42913
42863
|
var leftType = getCelType(left);
|
|
42914
42864
|
var rightType = getCelType(right);
|
|
@@ -42936,7 +42886,7 @@ function _assert_this_initialized$1(self1) {
|
|
|
42936
42886
|
}
|
|
42937
42887
|
return self1;
|
|
42938
42888
|
}
|
|
42939
|
-
function _class_call_check$1
|
|
42889
|
+
function _class_call_check$1(instance, Constructor) {
|
|
42940
42890
|
if (!(instance instanceof Constructor)) {
|
|
42941
42891
|
throw new TypeError("Cannot call a class as a function");
|
|
42942
42892
|
}
|
|
@@ -43018,7 +42968,7 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
43018
42968
|
_inherits$1(CelParser, CstParser);
|
|
43019
42969
|
var _super = _create_super$1(CelParser);
|
|
43020
42970
|
function CelParser() {
|
|
43021
|
-
_class_call_check$1
|
|
42971
|
+
_class_call_check$1(this, CelParser);
|
|
43022
42972
|
var _this;
|
|
43023
42973
|
_this = _super.call(this, allTokens);
|
|
43024
42974
|
_define_property$2(_assert_this_initialized$1(_this), "expr", _this.RULE('expr', function() {
|
|
@@ -44439,7 +44389,7 @@ function _object_spread_props$3(target, source) {
|
|
|
44439
44389
|
prefix: '_'
|
|
44440
44390
|
})).join('').toLowerCase();
|
|
44441
44391
|
}
|
|
44442
|
-
const Handlebars =
|
|
44392
|
+
const Handlebars = handlebars_min || HandlebarsNamespace;
|
|
44443
44393
|
Handlebars.registerHelper('JSONstringify', function(value) {
|
|
44444
44394
|
return JSON.stringify(value);
|
|
44445
44395
|
});
|
|
@@ -44622,9 +44572,41 @@ const preparePinsSettings = (settings, context)=>{
|
|
|
44622
44572
|
|
|
44623
44573
|
/*
|
|
44624
44574
|
* Copyright The OpenTelemetry Authors
|
|
44625
|
-
*
|
|
44575
|
+
*
|
|
44576
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
44577
|
+
* you may not use this file except in compliance with the License.
|
|
44578
|
+
* You may obtain a copy of the License at
|
|
44579
|
+
*
|
|
44580
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
44581
|
+
*
|
|
44582
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
44583
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
44584
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
44585
|
+
* See the License for the specific language governing permissions and
|
|
44586
|
+
* limitations under the License.
|
|
44587
|
+
*/ /** only globals that common to node and browsers are allowed */ // eslint-disable-next-line node/no-unsupported-features/es-builtins
|
|
44588
|
+
function _type_of$2(obj) {
|
|
44589
|
+
"@swc/helpers - typeof";
|
|
44590
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
44591
|
+
}
|
|
44592
|
+
var _globalThis = (typeof globalThis === "undefined" ? "undefined" : _type_of$2(globalThis)) === 'object' ? globalThis : global;
|
|
44593
|
+
|
|
44594
|
+
/*
|
|
44595
|
+
* Copyright The OpenTelemetry Authors
|
|
44596
|
+
*
|
|
44597
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
44598
|
+
* you may not use this file except in compliance with the License.
|
|
44599
|
+
* You may obtain a copy of the License at
|
|
44600
|
+
*
|
|
44601
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
44602
|
+
*
|
|
44603
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
44604
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
44605
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
44606
|
+
* See the License for the specific language governing permissions and
|
|
44607
|
+
* limitations under the License.
|
|
44626
44608
|
*/ // this is autogenerated file, see scripts/version-update.js
|
|
44627
|
-
var VERSION = '1.9.
|
|
44609
|
+
var VERSION = '1.9.0';
|
|
44628
44610
|
|
|
44629
44611
|
var re$1 = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;
|
|
44630
44612
|
/**
|
|
@@ -44729,36 +44711,31 @@ var re$1 = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;
|
|
|
44729
44711
|
* @param version version of the API requesting an instance of the global API
|
|
44730
44712
|
*/ var isCompatible = _makeCompatibilityCheck(VERSION);
|
|
44731
44713
|
|
|
44732
|
-
/*
|
|
44733
|
-
* Copyright The OpenTelemetry Authors
|
|
44734
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
44735
|
-
*/ function _type_of$2(obj) {
|
|
44736
|
-
"@swc/helpers - typeof";
|
|
44737
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
44738
|
-
}
|
|
44739
44714
|
var major = VERSION.split('.')[0];
|
|
44740
|
-
var GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for("opentelemetry.js.api."
|
|
44741
|
-
var _global =
|
|
44742
|
-
function registerGlobal(type, instance, diag) {
|
|
44743
|
-
var allowOverride = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false;
|
|
44715
|
+
var GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for("opentelemetry.js.api." + major);
|
|
44716
|
+
var _global = _globalThis;
|
|
44717
|
+
function registerGlobal(type, instance, diag, allowOverride) {
|
|
44744
44718
|
var _a;
|
|
44719
|
+
if (allowOverride === void 0) {
|
|
44720
|
+
allowOverride = false;
|
|
44721
|
+
}
|
|
44745
44722
|
var api = _global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a !== void 0 ? _a : {
|
|
44746
44723
|
version: VERSION
|
|
44747
44724
|
};
|
|
44748
44725
|
if (!allowOverride && api[type]) {
|
|
44749
44726
|
// already registered an API of this type
|
|
44750
|
-
var err = new Error("@opentelemetry/api: Attempted duplicate registration of API: "
|
|
44727
|
+
var err = new Error("@opentelemetry/api: Attempted duplicate registration of API: " + type);
|
|
44751
44728
|
diag.error(err.stack || err.message);
|
|
44752
44729
|
return false;
|
|
44753
44730
|
}
|
|
44754
44731
|
if (api.version !== VERSION) {
|
|
44755
44732
|
// All registered APIs must be of the same version exactly
|
|
44756
|
-
var
|
|
44757
|
-
diag.error(
|
|
44733
|
+
var err = new Error("@opentelemetry/api: Registration of version v" + api.version + " for " + type + " does not match previously registered API v" + VERSION);
|
|
44734
|
+
diag.error(err.stack || err.message);
|
|
44758
44735
|
return false;
|
|
44759
44736
|
}
|
|
44760
44737
|
api[type] = instance;
|
|
44761
|
-
diag.debug("@opentelemetry/api: Registered a global for "
|
|
44738
|
+
diag.debug("@opentelemetry/api: Registered a global for " + type + " v" + VERSION + ".");
|
|
44762
44739
|
return true;
|
|
44763
44740
|
}
|
|
44764
44741
|
function getGlobal(type) {
|
|
@@ -44770,7 +44747,7 @@ function getGlobal(type) {
|
|
|
44770
44747
|
return (_b = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _b === void 0 ? void 0 : _b[type];
|
|
44771
44748
|
}
|
|
44772
44749
|
function unregisterGlobal(type, diag) {
|
|
44773
|
-
diag.debug("@opentelemetry/api: Unregistering a global for "
|
|
44750
|
+
diag.debug("@opentelemetry/api: Unregistering a global for " + type + " v" + VERSION + ".");
|
|
44774
44751
|
var api = _global[GLOBAL_OPENTELEMETRY_API_KEY];
|
|
44775
44752
|
if (api) {
|
|
44776
44753
|
delete api[type];
|
|
@@ -44779,50 +44756,46 @@ function unregisterGlobal(type, diag) {
|
|
|
44779
44756
|
|
|
44780
44757
|
/*
|
|
44781
44758
|
* Copyright The OpenTelemetry Authors
|
|
44782
|
-
*
|
|
44783
|
-
|
|
44784
|
-
|
|
44785
|
-
|
|
44786
|
-
|
|
44787
|
-
|
|
44788
|
-
|
|
44789
|
-
|
|
44790
|
-
|
|
44791
|
-
|
|
44792
|
-
|
|
44793
|
-
|
|
44759
|
+
*
|
|
44760
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
44761
|
+
* you may not use this file except in compliance with the License.
|
|
44762
|
+
* You may obtain a copy of the License at
|
|
44763
|
+
*
|
|
44764
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
44765
|
+
*
|
|
44766
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
44767
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
44768
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
44769
|
+
* See the License for the specific language governing permissions and
|
|
44770
|
+
* limitations under the License.
|
|
44771
|
+
*/ var __read$3 = undefined && undefined.__read || function(o, n) {
|
|
44772
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
44773
|
+
if (!m) return o;
|
|
44774
|
+
var i = m.call(o), r, ar = [], e;
|
|
44775
|
+
try {
|
|
44776
|
+
while((n === void 0 || n-- > 0) && !(r = i.next()).done)ar.push(r.value);
|
|
44777
|
+
} catch (error) {
|
|
44778
|
+
e = {
|
|
44779
|
+
error: error
|
|
44780
|
+
};
|
|
44781
|
+
} finally{
|
|
44782
|
+
try {
|
|
44783
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
44784
|
+
} finally{
|
|
44785
|
+
if (e) throw e.error;
|
|
44786
|
+
}
|
|
44794
44787
|
}
|
|
44795
|
-
|
|
44796
|
-
|
|
44797
|
-
|
|
44798
|
-
|
|
44799
|
-
|
|
44800
|
-
|
|
44801
|
-
|
|
44802
|
-
|
|
44788
|
+
return ar;
|
|
44789
|
+
};
|
|
44790
|
+
var __spreadArray$3 = undefined && undefined.__spreadArray || function(to, from, pack) {
|
|
44791
|
+
if (pack || arguments.length === 2) for(var i = 0, l = from.length, ar; i < l; i++){
|
|
44792
|
+
if (ar || !(i in from)) {
|
|
44793
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
44794
|
+
ar[i] = from[i];
|
|
44795
|
+
}
|
|
44803
44796
|
}
|
|
44804
|
-
|
|
44805
|
-
|
|
44806
|
-
if (protoProps) _defineProperties$a(Constructor.prototype, protoProps);
|
|
44807
|
-
return Constructor;
|
|
44808
|
-
}
|
|
44809
|
-
function _iterable_to_array$4(iter) {
|
|
44810
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
44811
|
-
}
|
|
44812
|
-
function _non_iterable_spread$4() {
|
|
44813
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
44814
|
-
}
|
|
44815
|
-
function _to_consumable_array$4(arr) {
|
|
44816
|
-
return _array_without_holes$4(arr) || _iterable_to_array$4(arr) || _unsupported_iterable_to_array$4(arr) || _non_iterable_spread$4();
|
|
44817
|
-
}
|
|
44818
|
-
function _unsupported_iterable_to_array$4(o, minLen) {
|
|
44819
|
-
if (!o) return;
|
|
44820
|
-
if (typeof o === "string") return _array_like_to_array$4(o, minLen);
|
|
44821
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
44822
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
44823
|
-
if (n === "Map" || n === "Set") return Array.from(n);
|
|
44824
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$4(o, minLen);
|
|
44825
|
-
}
|
|
44797
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
44798
|
+
};
|
|
44826
44799
|
/**
|
|
44827
44800
|
* Component Logger which is meant to be used as part of any component which
|
|
44828
44801
|
* will add automatically additional namespace in front of the log message.
|
|
@@ -44831,75 +44804,71 @@ function _unsupported_iterable_to_array$4(o, minLen) {
|
|
|
44831
44804
|
* const cLogger = diag.createComponentLogger({ namespace: '@opentelemetry/instrumentation-http' });
|
|
44832
44805
|
* cLogger.debug('test');
|
|
44833
44806
|
* // @opentelemetry/instrumentation-http test
|
|
44834
|
-
*/ var DiagComponentLogger =
|
|
44807
|
+
*/ var DiagComponentLogger = /** @class */ function() {
|
|
44835
44808
|
function DiagComponentLogger(props) {
|
|
44836
|
-
_class_call_check$b(this, DiagComponentLogger);
|
|
44837
44809
|
this._namespace = props.namespace || 'DiagComponentLogger';
|
|
44838
44810
|
}
|
|
44839
|
-
|
|
44840
|
-
|
|
44841
|
-
|
|
44842
|
-
|
|
44843
|
-
for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
|
|
44844
|
-
args[_key] = arguments[_key];
|
|
44845
|
-
}
|
|
44846
|
-
return logProxy('debug', this._namespace, args);
|
|
44847
|
-
}
|
|
44848
|
-
},
|
|
44849
|
-
{
|
|
44850
|
-
key: "error",
|
|
44851
|
-
value: function error() {
|
|
44852
|
-
for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
|
|
44853
|
-
args[_key] = arguments[_key];
|
|
44854
|
-
}
|
|
44855
|
-
return logProxy('error', this._namespace, args);
|
|
44856
|
-
}
|
|
44857
|
-
},
|
|
44858
|
-
{
|
|
44859
|
-
key: "info",
|
|
44860
|
-
value: function info() {
|
|
44861
|
-
for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
|
|
44862
|
-
args[_key] = arguments[_key];
|
|
44863
|
-
}
|
|
44864
|
-
return logProxy('info', this._namespace, args);
|
|
44865
|
-
}
|
|
44866
|
-
},
|
|
44867
|
-
{
|
|
44868
|
-
key: "warn",
|
|
44869
|
-
value: function warn() {
|
|
44870
|
-
for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
|
|
44871
|
-
args[_key] = arguments[_key];
|
|
44872
|
-
}
|
|
44873
|
-
return logProxy('warn', this._namespace, args);
|
|
44874
|
-
}
|
|
44875
|
-
},
|
|
44876
|
-
{
|
|
44877
|
-
key: "verbose",
|
|
44878
|
-
value: function verbose() {
|
|
44879
|
-
for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
|
|
44880
|
-
args[_key] = arguments[_key];
|
|
44881
|
-
}
|
|
44882
|
-
return logProxy('verbose', this._namespace, args);
|
|
44883
|
-
}
|
|
44811
|
+
DiagComponentLogger.prototype.debug = function() {
|
|
44812
|
+
var args = [];
|
|
44813
|
+
for(var _i = 0; _i < arguments.length; _i++){
|
|
44814
|
+
args[_i] = arguments[_i];
|
|
44884
44815
|
}
|
|
44885
|
-
|
|
44816
|
+
return logProxy('debug', this._namespace, args);
|
|
44817
|
+
};
|
|
44818
|
+
DiagComponentLogger.prototype.error = function() {
|
|
44819
|
+
var args = [];
|
|
44820
|
+
for(var _i = 0; _i < arguments.length; _i++){
|
|
44821
|
+
args[_i] = arguments[_i];
|
|
44822
|
+
}
|
|
44823
|
+
return logProxy('error', this._namespace, args);
|
|
44824
|
+
};
|
|
44825
|
+
DiagComponentLogger.prototype.info = function() {
|
|
44826
|
+
var args = [];
|
|
44827
|
+
for(var _i = 0; _i < arguments.length; _i++){
|
|
44828
|
+
args[_i] = arguments[_i];
|
|
44829
|
+
}
|
|
44830
|
+
return logProxy('info', this._namespace, args);
|
|
44831
|
+
};
|
|
44832
|
+
DiagComponentLogger.prototype.warn = function() {
|
|
44833
|
+
var args = [];
|
|
44834
|
+
for(var _i = 0; _i < arguments.length; _i++){
|
|
44835
|
+
args[_i] = arguments[_i];
|
|
44836
|
+
}
|
|
44837
|
+
return logProxy('warn', this._namespace, args);
|
|
44838
|
+
};
|
|
44839
|
+
DiagComponentLogger.prototype.verbose = function() {
|
|
44840
|
+
var args = [];
|
|
44841
|
+
for(var _i = 0; _i < arguments.length; _i++){
|
|
44842
|
+
args[_i] = arguments[_i];
|
|
44843
|
+
}
|
|
44844
|
+
return logProxy('verbose', this._namespace, args);
|
|
44845
|
+
};
|
|
44886
44846
|
return DiagComponentLogger;
|
|
44887
44847
|
}();
|
|
44888
44848
|
function logProxy(funcName, namespace, args) {
|
|
44889
|
-
var _logger;
|
|
44890
44849
|
var logger = getGlobal('diag');
|
|
44891
44850
|
// shortcut if logger not set
|
|
44892
44851
|
if (!logger) {
|
|
44893
44852
|
return;
|
|
44894
44853
|
}
|
|
44895
|
-
|
|
44896
|
-
|
|
44897
|
-
].concat(_to_consumable_array$4(args)));
|
|
44854
|
+
args.unshift(namespace);
|
|
44855
|
+
return logger[funcName].apply(logger, __spreadArray$3([], __read$3(args), false));
|
|
44898
44856
|
}
|
|
44899
44857
|
|
|
44900
44858
|
/*
|
|
44901
44859
|
* Copyright The OpenTelemetry Authors
|
|
44902
|
-
*
|
|
44860
|
+
*
|
|
44861
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
44862
|
+
* you may not use this file except in compliance with the License.
|
|
44863
|
+
* You may obtain a copy of the License at
|
|
44864
|
+
*
|
|
44865
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
44866
|
+
*
|
|
44867
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
44868
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
44869
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
44870
|
+
* See the License for the specific language governing permissions and
|
|
44871
|
+
* limitations under the License.
|
|
44903
44872
|
*/ /**
|
|
44904
44873
|
* Defines the available internal logging levels for the diagnostic logger, the numeric values
|
|
44905
44874
|
* of the levels are defined to match the original values from the initial LogLevel to avoid
|
|
@@ -44944,79 +44913,77 @@ function createLogLevelDiagLogger(maxLevel, logger) {
|
|
|
44944
44913
|
|
|
44945
44914
|
/*
|
|
44946
44915
|
* Copyright The OpenTelemetry Authors
|
|
44947
|
-
*
|
|
44948
|
-
|
|
44949
|
-
|
|
44950
|
-
|
|
44951
|
-
|
|
44952
|
-
|
|
44953
|
-
|
|
44954
|
-
|
|
44955
|
-
|
|
44956
|
-
|
|
44957
|
-
|
|
44958
|
-
|
|
44916
|
+
*
|
|
44917
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
44918
|
+
* you may not use this file except in compliance with the License.
|
|
44919
|
+
* You may obtain a copy of the License at
|
|
44920
|
+
*
|
|
44921
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
44922
|
+
*
|
|
44923
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
44924
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
44925
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
44926
|
+
* See the License for the specific language governing permissions and
|
|
44927
|
+
* limitations under the License.
|
|
44928
|
+
*/ var __read$2 = undefined && undefined.__read || function(o, n) {
|
|
44929
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
44930
|
+
if (!m) return o;
|
|
44931
|
+
var i = m.call(o), r, ar = [], e;
|
|
44932
|
+
try {
|
|
44933
|
+
while((n === void 0 || n-- > 0) && !(r = i.next()).done)ar.push(r.value);
|
|
44934
|
+
} catch (error) {
|
|
44935
|
+
e = {
|
|
44936
|
+
error: error
|
|
44937
|
+
};
|
|
44938
|
+
} finally{
|
|
44939
|
+
try {
|
|
44940
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
44941
|
+
} finally{
|
|
44942
|
+
if (e) throw e.error;
|
|
44943
|
+
}
|
|
44959
44944
|
}
|
|
44960
|
-
|
|
44961
|
-
|
|
44962
|
-
|
|
44963
|
-
|
|
44964
|
-
|
|
44965
|
-
|
|
44966
|
-
|
|
44967
|
-
|
|
44945
|
+
return ar;
|
|
44946
|
+
};
|
|
44947
|
+
var __spreadArray$2 = undefined && undefined.__spreadArray || function(to, from, pack) {
|
|
44948
|
+
if (pack || arguments.length === 2) for(var i = 0, l = from.length, ar; i < l; i++){
|
|
44949
|
+
if (ar || !(i in from)) {
|
|
44950
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
44951
|
+
ar[i] = from[i];
|
|
44952
|
+
}
|
|
44968
44953
|
}
|
|
44969
|
-
|
|
44970
|
-
|
|
44971
|
-
if (staticProps) _defineProperties$9(Constructor, staticProps);
|
|
44972
|
-
return Constructor;
|
|
44973
|
-
}
|
|
44974
|
-
function _iterable_to_array$3(iter) {
|
|
44975
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
44976
|
-
}
|
|
44977
|
-
function _non_iterable_spread$3() {
|
|
44978
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
44979
|
-
}
|
|
44980
|
-
function _to_consumable_array$3(arr) {
|
|
44981
|
-
return _array_without_holes$3(arr) || _iterable_to_array$3(arr) || _unsupported_iterable_to_array$3(arr) || _non_iterable_spread$3();
|
|
44982
|
-
}
|
|
44983
|
-
function _unsupported_iterable_to_array$3(o, minLen) {
|
|
44984
|
-
if (!o) return;
|
|
44985
|
-
if (typeof o === "string") return _array_like_to_array$3(o, minLen);
|
|
44986
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
44987
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
44988
|
-
if (n === "Map" || n === "Set") return Array.from(n);
|
|
44989
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$3(o, minLen);
|
|
44990
|
-
}
|
|
44954
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
44955
|
+
};
|
|
44991
44956
|
var API_NAME$2 = 'diag';
|
|
44992
44957
|
/**
|
|
44993
44958
|
* Singleton object which represents the entry point to the OpenTelemetry internal
|
|
44994
44959
|
* diagnostic API
|
|
44995
|
-
|
|
44996
|
-
|
|
44997
|
-
|
|
44998
|
-
|
|
44999
|
-
|
|
45000
|
-
|
|
44960
|
+
*/ var DiagAPI = /** @class */ function() {
|
|
44961
|
+
/**
|
|
44962
|
+
* Private internal constructor
|
|
44963
|
+
* @private
|
|
44964
|
+
*/ function DiagAPI() {
|
|
44965
|
+
function _logProxy(funcName) {
|
|
45001
44966
|
return function() {
|
|
45002
|
-
|
|
45003
|
-
|
|
44967
|
+
var args = [];
|
|
44968
|
+
for(var _i = 0; _i < arguments.length; _i++){
|
|
44969
|
+
args[_i] = arguments[_i];
|
|
45004
44970
|
}
|
|
45005
|
-
var _logger;
|
|
45006
44971
|
var logger = getGlobal('diag');
|
|
45007
44972
|
// shortcut if logger not set
|
|
45008
44973
|
if (!logger) return;
|
|
45009
|
-
return
|
|
44974
|
+
return logger[funcName].apply(logger, __spreadArray$2([], __read$2(args), false));
|
|
45010
44975
|
};
|
|
45011
|
-
}
|
|
44976
|
+
}
|
|
45012
44977
|
// Using self local variable for minification purposes as 'this' cannot be minified
|
|
45013
44978
|
var self = this;
|
|
45014
44979
|
// DiagAPI specific functions
|
|
45015
|
-
var setLogger = function(logger) {
|
|
45016
|
-
var optionsOrLogLevel = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
45017
|
-
logLevel: DiagLogLevel.INFO
|
|
45018
|
-
};
|
|
44980
|
+
var setLogger = function setLogger(logger, optionsOrLogLevel) {
|
|
45019
44981
|
var _a, _b, _c;
|
|
44982
|
+
if (optionsOrLogLevel === void 0) {
|
|
44983
|
+
optionsOrLogLevel = {
|
|
44984
|
+
logLevel: DiagLogLevel.INFO
|
|
44985
|
+
};
|
|
44986
|
+
}
|
|
45020
44987
|
if (logger === self) {
|
|
45021
44988
|
// There isn't much we can do here.
|
|
45022
44989
|
// Logging to the console might break the user application.
|
|
@@ -45035,8 +45002,8 @@ var API_NAME$2 = 'diag';
|
|
|
45035
45002
|
// There already is an logger registered. We'll let it know before overwriting it.
|
|
45036
45003
|
if (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) {
|
|
45037
45004
|
var stack = (_c = new Error().stack) !== null && _c !== void 0 ? _c : '<failed to generate stacktrace>';
|
|
45038
|
-
oldLogger.warn("Current logger will be overwritten from "
|
|
45039
|
-
newLogger.warn("Current logger will overwrite one already registered from "
|
|
45005
|
+
oldLogger.warn("Current logger will be overwritten from " + stack);
|
|
45006
|
+
newLogger.warn("Current logger will overwrite one already registered from " + stack);
|
|
45040
45007
|
}
|
|
45041
45008
|
return registerGlobal('diag', newLogger, self, true);
|
|
45042
45009
|
};
|
|
@@ -45053,34 +45020,30 @@ var API_NAME$2 = 'diag';
|
|
|
45053
45020
|
self.warn = _logProxy('warn');
|
|
45054
45021
|
self.error = _logProxy('error');
|
|
45055
45022
|
}
|
|
45056
|
-
|
|
45057
|
-
{
|
|
45058
|
-
|
|
45059
|
-
value: /** Get the singleton instance of the DiagAPI API */ function instance() {
|
|
45060
|
-
if (!this._instance) {
|
|
45061
|
-
this._instance = new DiagAPI();
|
|
45062
|
-
}
|
|
45063
|
-
return this._instance;
|
|
45064
|
-
}
|
|
45023
|
+
/** Get the singleton instance of the DiagAPI API */ DiagAPI.instance = function() {
|
|
45024
|
+
if (!this._instance) {
|
|
45025
|
+
this._instance = new DiagAPI();
|
|
45065
45026
|
}
|
|
45066
|
-
|
|
45027
|
+
return this._instance;
|
|
45028
|
+
};
|
|
45067
45029
|
return DiagAPI;
|
|
45068
|
-
}
|
|
45069
|
-
();
|
|
45030
|
+
}();
|
|
45070
45031
|
|
|
45071
45032
|
/*
|
|
45072
45033
|
* Copyright The OpenTelemetry Authors
|
|
45073
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
45074
|
-
*/ /**
|
|
45075
|
-
* Get a key to uniquely identify a context value
|
|
45076
45034
|
*
|
|
45077
|
-
*
|
|
45078
|
-
|
|
45079
|
-
|
|
45080
|
-
|
|
45081
|
-
|
|
45082
|
-
|
|
45083
|
-
|
|
45035
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
45036
|
+
* you may not use this file except in compliance with the License.
|
|
45037
|
+
* You may obtain a copy of the License at
|
|
45038
|
+
*
|
|
45039
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
45040
|
+
*
|
|
45041
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
45042
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
45043
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
45044
|
+
* See the License for the specific language governing permissions and
|
|
45045
|
+
* limitations under the License.
|
|
45046
|
+
*/ /** Get a key to uniquely identify a context value */ function createContextKey(description) {
|
|
45084
45047
|
// The specification states that for the same input, multiple calls should
|
|
45085
45048
|
// return different keys. Due to the nature of the JS dependency management
|
|
45086
45049
|
// system, this creates problems where multiple versions of some package
|
|
@@ -45089,391 +45052,283 @@ function createContextKey(description) {
|
|
|
45089
45052
|
// Therefore, we use Symbol.for which returns the same key for the same input.
|
|
45090
45053
|
return Symbol.for(description);
|
|
45091
45054
|
}
|
|
45092
|
-
var BaseContext = function
|
|
45093
|
-
|
|
45094
|
-
|
|
45095
|
-
|
|
45096
|
-
|
|
45097
|
-
|
|
45098
|
-
|
|
45099
|
-
|
|
45100
|
-
|
|
45101
|
-
|
|
45102
|
-
|
|
45103
|
-
|
|
45104
|
-
|
|
45105
|
-
|
|
45106
|
-
|
|
45107
|
-
|
|
45108
|
-
|
|
45109
|
-
|
|
45110
|
-
|
|
45111
|
-
|
|
45112
|
-
|
|
45113
|
-
|
|
45114
|
-
|
|
45115
|
-
|
|
45055
|
+
var BaseContext = /** @class */ function() {
|
|
45056
|
+
/**
|
|
45057
|
+
* Construct a new context which inherits values from an optional parent context.
|
|
45058
|
+
*
|
|
45059
|
+
* @param parentContext a context from which to inherit values
|
|
45060
|
+
*/ function BaseContext(parentContext) {
|
|
45061
|
+
// for minification
|
|
45062
|
+
var self = this;
|
|
45063
|
+
self._currentContext = parentContext ? new Map(parentContext) : new Map();
|
|
45064
|
+
self.getValue = function(key) {
|
|
45065
|
+
return self._currentContext.get(key);
|
|
45066
|
+
};
|
|
45067
|
+
self.setValue = function(key, value) {
|
|
45068
|
+
var context = new BaseContext(self._currentContext);
|
|
45069
|
+
context._currentContext.set(key, value);
|
|
45070
|
+
return context;
|
|
45071
|
+
};
|
|
45072
|
+
self.deleteValue = function(key) {
|
|
45073
|
+
var context = new BaseContext(self._currentContext);
|
|
45074
|
+
context._currentContext.delete(key);
|
|
45075
|
+
return context;
|
|
45076
|
+
};
|
|
45077
|
+
}
|
|
45078
|
+
return BaseContext;
|
|
45079
|
+
}();
|
|
45080
|
+
/** The root context is used as the default parent context when there is no active context */ var ROOT_CONTEXT = new BaseContext();
|
|
45116
45081
|
|
|
45117
45082
|
/*
|
|
45118
45083
|
* Copyright The OpenTelemetry Authors
|
|
45119
|
-
*
|
|
45120
|
-
|
|
45121
|
-
|
|
45122
|
-
|
|
45123
|
-
|
|
45124
|
-
|
|
45125
|
-
|
|
45126
|
-
|
|
45127
|
-
|
|
45128
|
-
|
|
45129
|
-
|
|
45130
|
-
|
|
45131
|
-
|
|
45132
|
-
|
|
45133
|
-
|
|
45134
|
-
|
|
45135
|
-
|
|
45136
|
-
|
|
45137
|
-
|
|
45138
|
-
|
|
45139
|
-
|
|
45140
|
-
|
|
45141
|
-
}
|
|
45142
|
-
|
|
45143
|
-
|
|
45144
|
-
|
|
45145
|
-
|
|
45146
|
-
|
|
45147
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
45148
|
-
}
|
|
45149
|
-
function _non_iterable_spread$2() {
|
|
45150
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
45151
|
-
}
|
|
45152
|
-
function _to_consumable_array$2(arr) {
|
|
45153
|
-
return _array_without_holes$2(arr) || _iterable_to_array$2(arr) || _unsupported_iterable_to_array$2(arr) || _non_iterable_spread$2();
|
|
45154
|
-
}
|
|
45155
|
-
function _unsupported_iterable_to_array$2(o, minLen) {
|
|
45156
|
-
if (!o) return;
|
|
45157
|
-
if (typeof o === "string") return _array_like_to_array$2(o, minLen);
|
|
45158
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
45159
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
45160
|
-
if (n === "Map" || n === "Set") return Array.from(n);
|
|
45161
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
|
|
45162
|
-
}
|
|
45163
|
-
var NoopContextManager = /*#__PURE__*/ function() {
|
|
45164
|
-
function NoopContextManager() {
|
|
45165
|
-
_class_call_check$8(this, NoopContextManager);
|
|
45084
|
+
*
|
|
45085
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
45086
|
+
* you may not use this file except in compliance with the License.
|
|
45087
|
+
* You may obtain a copy of the License at
|
|
45088
|
+
*
|
|
45089
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
45090
|
+
*
|
|
45091
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
45092
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
45093
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
45094
|
+
* See the License for the specific language governing permissions and
|
|
45095
|
+
* limitations under the License.
|
|
45096
|
+
*/ var __read$1 = undefined && undefined.__read || function(o, n) {
|
|
45097
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
45098
|
+
if (!m) return o;
|
|
45099
|
+
var i = m.call(o), r, ar = [], e;
|
|
45100
|
+
try {
|
|
45101
|
+
while((n === void 0 || n-- > 0) && !(r = i.next()).done)ar.push(r.value);
|
|
45102
|
+
} catch (error) {
|
|
45103
|
+
e = {
|
|
45104
|
+
error: error
|
|
45105
|
+
};
|
|
45106
|
+
} finally{
|
|
45107
|
+
try {
|
|
45108
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
45109
|
+
} finally{
|
|
45110
|
+
if (e) throw e.error;
|
|
45111
|
+
}
|
|
45166
45112
|
}
|
|
45167
|
-
|
|
45168
|
-
|
|
45169
|
-
|
|
45170
|
-
|
|
45171
|
-
|
|
45172
|
-
|
|
45173
|
-
|
|
45174
|
-
{
|
|
45175
|
-
key: "with",
|
|
45176
|
-
value: function _with(_context, fn, thisArg) {
|
|
45177
|
-
for(var _len = arguments.length, args = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++){
|
|
45178
|
-
args[_key - 3] = arguments[_key];
|
|
45179
|
-
}
|
|
45180
|
-
var _fn;
|
|
45181
|
-
return (_fn = fn).call.apply(_fn, [
|
|
45182
|
-
thisArg
|
|
45183
|
-
].concat(_to_consumable_array$2(args)));
|
|
45184
|
-
}
|
|
45185
|
-
},
|
|
45186
|
-
{
|
|
45187
|
-
key: "bind",
|
|
45188
|
-
value: function bind(_context, target) {
|
|
45189
|
-
return target;
|
|
45190
|
-
}
|
|
45191
|
-
},
|
|
45192
|
-
{
|
|
45193
|
-
key: "enable",
|
|
45194
|
-
value: function enable() {
|
|
45195
|
-
return this;
|
|
45196
|
-
}
|
|
45197
|
-
},
|
|
45198
|
-
{
|
|
45199
|
-
key: "disable",
|
|
45200
|
-
value: function disable() {
|
|
45201
|
-
return this;
|
|
45202
|
-
}
|
|
45113
|
+
return ar;
|
|
45114
|
+
};
|
|
45115
|
+
var __spreadArray$1 = undefined && undefined.__spreadArray || function(to, from, pack) {
|
|
45116
|
+
if (pack || arguments.length === 2) for(var i = 0, l = from.length, ar; i < l; i++){
|
|
45117
|
+
if (ar || !(i in from)) {
|
|
45118
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
45119
|
+
ar[i] = from[i];
|
|
45203
45120
|
}
|
|
45204
|
-
|
|
45121
|
+
}
|
|
45122
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
45123
|
+
};
|
|
45124
|
+
var NoopContextManager = /** @class */ function() {
|
|
45125
|
+
function NoopContextManager() {}
|
|
45126
|
+
NoopContextManager.prototype.active = function() {
|
|
45127
|
+
return ROOT_CONTEXT;
|
|
45128
|
+
};
|
|
45129
|
+
NoopContextManager.prototype.with = function(_context, fn, thisArg) {
|
|
45130
|
+
var args = [];
|
|
45131
|
+
for(var _i = 3; _i < arguments.length; _i++){
|
|
45132
|
+
args[_i - 3] = arguments[_i];
|
|
45133
|
+
}
|
|
45134
|
+
return fn.call.apply(fn, __spreadArray$1([
|
|
45135
|
+
thisArg
|
|
45136
|
+
], __read$1(args), false));
|
|
45137
|
+
};
|
|
45138
|
+
NoopContextManager.prototype.bind = function(_context, target) {
|
|
45139
|
+
return target;
|
|
45140
|
+
};
|
|
45141
|
+
NoopContextManager.prototype.enable = function() {
|
|
45142
|
+
return this;
|
|
45143
|
+
};
|
|
45144
|
+
NoopContextManager.prototype.disable = function() {
|
|
45145
|
+
return this;
|
|
45146
|
+
};
|
|
45205
45147
|
return NoopContextManager;
|
|
45206
|
-
}
|
|
45207
|
-
();
|
|
45148
|
+
}();
|
|
45208
45149
|
|
|
45209
45150
|
/*
|
|
45210
45151
|
* Copyright The OpenTelemetry Authors
|
|
45211
|
-
*
|
|
45212
|
-
|
|
45213
|
-
|
|
45214
|
-
|
|
45215
|
-
|
|
45216
|
-
|
|
45217
|
-
|
|
45218
|
-
|
|
45219
|
-
|
|
45220
|
-
|
|
45221
|
-
|
|
45222
|
-
|
|
45152
|
+
*
|
|
45153
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
45154
|
+
* you may not use this file except in compliance with the License.
|
|
45155
|
+
* You may obtain a copy of the License at
|
|
45156
|
+
*
|
|
45157
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
45158
|
+
*
|
|
45159
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
45160
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
45161
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
45162
|
+
* See the License for the specific language governing permissions and
|
|
45163
|
+
* limitations under the License.
|
|
45164
|
+
*/ var __read = undefined && undefined.__read || function(o, n) {
|
|
45165
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
45166
|
+
if (!m) return o;
|
|
45167
|
+
var i = m.call(o), r, ar = [], e;
|
|
45168
|
+
try {
|
|
45169
|
+
while((n === void 0 || n-- > 0) && !(r = i.next()).done)ar.push(r.value);
|
|
45170
|
+
} catch (error) {
|
|
45171
|
+
e = {
|
|
45172
|
+
error: error
|
|
45173
|
+
};
|
|
45174
|
+
} finally{
|
|
45175
|
+
try {
|
|
45176
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
45177
|
+
} finally{
|
|
45178
|
+
if (e) throw e.error;
|
|
45179
|
+
}
|
|
45223
45180
|
}
|
|
45224
|
-
|
|
45225
|
-
|
|
45226
|
-
|
|
45227
|
-
|
|
45228
|
-
|
|
45229
|
-
|
|
45230
|
-
|
|
45231
|
-
|
|
45181
|
+
return ar;
|
|
45182
|
+
};
|
|
45183
|
+
var __spreadArray = undefined && undefined.__spreadArray || function(to, from, pack) {
|
|
45184
|
+
if (pack || arguments.length === 2) for(var i = 0, l = from.length, ar; i < l; i++){
|
|
45185
|
+
if (ar || !(i in from)) {
|
|
45186
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
45187
|
+
ar[i] = from[i];
|
|
45188
|
+
}
|
|
45232
45189
|
}
|
|
45233
|
-
|
|
45234
|
-
|
|
45235
|
-
if (protoProps) _defineProperties$7(Constructor.prototype, protoProps);
|
|
45236
|
-
if (staticProps) _defineProperties$7(Constructor, staticProps);
|
|
45237
|
-
return Constructor;
|
|
45238
|
-
}
|
|
45239
|
-
function _iterable_to_array$1(iter) {
|
|
45240
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
45241
|
-
}
|
|
45242
|
-
function _non_iterable_spread$1() {
|
|
45243
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
45244
|
-
}
|
|
45245
|
-
function _to_consumable_array$1(arr) {
|
|
45246
|
-
return _array_without_holes$1(arr) || _iterable_to_array$1(arr) || _unsupported_iterable_to_array$1(arr) || _non_iterable_spread$1();
|
|
45247
|
-
}
|
|
45248
|
-
function _unsupported_iterable_to_array$1(o, minLen) {
|
|
45249
|
-
if (!o) return;
|
|
45250
|
-
if (typeof o === "string") return _array_like_to_array$1(o, minLen);
|
|
45251
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
45252
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
45253
|
-
if (n === "Map" || n === "Set") return Array.from(n);
|
|
45254
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$1(o, minLen);
|
|
45255
|
-
}
|
|
45190
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
45191
|
+
};
|
|
45256
45192
|
var API_NAME$1 = 'context';
|
|
45257
45193
|
var NOOP_CONTEXT_MANAGER = new NoopContextManager();
|
|
45258
45194
|
/**
|
|
45259
45195
|
* Singleton object which represents the entry point to the OpenTelemetry Context API
|
|
45260
|
-
|
|
45261
|
-
|
|
45262
|
-
*/
|
|
45263
|
-
|
|
45264
|
-
|
|
45265
|
-
|
|
45266
|
-
|
|
45267
|
-
|
|
45268
|
-
|
|
45196
|
+
*/ var ContextAPI = /** @class */ function() {
|
|
45197
|
+
/** Empty private constructor prevents end users from constructing a new instance of the API */ function ContextAPI() {}
|
|
45198
|
+
/** Get the singleton instance of the Context API */ ContextAPI.getInstance = function() {
|
|
45199
|
+
if (!this._instance) {
|
|
45200
|
+
this._instance = new ContextAPI();
|
|
45201
|
+
}
|
|
45202
|
+
return this._instance;
|
|
45203
|
+
};
|
|
45204
|
+
/**
|
|
45269
45205
|
* Set the current context manager.
|
|
45270
45206
|
*
|
|
45271
45207
|
* @returns true if the context manager was successfully registered, else false
|
|
45272
|
-
*/
|
|
45273
|
-
|
|
45274
|
-
|
|
45275
|
-
|
|
45276
|
-
},
|
|
45277
|
-
{
|
|
45278
|
-
/**
|
|
45208
|
+
*/ ContextAPI.prototype.setGlobalContextManager = function(contextManager) {
|
|
45209
|
+
return registerGlobal(API_NAME$1, contextManager, DiagAPI.instance());
|
|
45210
|
+
};
|
|
45211
|
+
/**
|
|
45279
45212
|
* Get the currently active context
|
|
45280
|
-
*/
|
|
45281
|
-
|
|
45282
|
-
|
|
45283
|
-
|
|
45284
|
-
},
|
|
45285
|
-
{
|
|
45286
|
-
/**
|
|
45213
|
+
*/ ContextAPI.prototype.active = function() {
|
|
45214
|
+
return this._getContextManager().active();
|
|
45215
|
+
};
|
|
45216
|
+
/**
|
|
45287
45217
|
* Execute a function with an active context
|
|
45288
45218
|
*
|
|
45289
45219
|
* @param context context to be active during function execution
|
|
45290
45220
|
* @param fn function to execute in a context
|
|
45291
45221
|
* @param thisArg optional receiver to be used for calling fn
|
|
45292
45222
|
* @param args optional arguments forwarded to fn
|
|
45293
|
-
*/
|
|
45294
|
-
|
|
45295
|
-
|
|
45296
|
-
|
|
45297
|
-
|
|
45298
|
-
|
|
45299
|
-
|
|
45300
|
-
|
|
45301
|
-
|
|
45302
|
-
|
|
45303
|
-
|
|
45304
|
-
|
|
45305
|
-
|
|
45306
|
-
{
|
|
45307
|
-
/**
|
|
45223
|
+
*/ ContextAPI.prototype.with = function(context, fn, thisArg) {
|
|
45224
|
+
var _a;
|
|
45225
|
+
var args = [];
|
|
45226
|
+
for(var _i = 3; _i < arguments.length; _i++){
|
|
45227
|
+
args[_i - 3] = arguments[_i];
|
|
45228
|
+
}
|
|
45229
|
+
return (_a = this._getContextManager()).with.apply(_a, __spreadArray([
|
|
45230
|
+
context,
|
|
45231
|
+
fn,
|
|
45232
|
+
thisArg
|
|
45233
|
+
], __read(args), false));
|
|
45234
|
+
};
|
|
45235
|
+
/**
|
|
45308
45236
|
* Bind a context to a target function or event emitter
|
|
45309
45237
|
*
|
|
45310
45238
|
* @param context context to bind to the event emitter or function. Defaults to the currently active context
|
|
45311
45239
|
* @param target function or event emitter to bind
|
|
45312
|
-
*/
|
|
45313
|
-
|
|
45314
|
-
|
|
45315
|
-
|
|
45316
|
-
|
|
45317
|
-
|
|
45318
|
-
|
|
45319
|
-
|
|
45320
|
-
|
|
45321
|
-
|
|
45322
|
-
},
|
|
45323
|
-
{
|
|
45324
|
-
/** Disable and remove the global context manager */ key: "disable",
|
|
45325
|
-
value: function disable() {
|
|
45326
|
-
this._getContextManager().disable();
|
|
45327
|
-
unregisterGlobal(API_NAME$1, DiagAPI.instance());
|
|
45328
|
-
}
|
|
45329
|
-
}
|
|
45330
|
-
], [
|
|
45331
|
-
{
|
|
45332
|
-
key: "getInstance",
|
|
45333
|
-
value: /** Get the singleton instance of the Context API */ function getInstance() {
|
|
45334
|
-
if (!this._instance) {
|
|
45335
|
-
this._instance = new ContextAPI();
|
|
45336
|
-
}
|
|
45337
|
-
return this._instance;
|
|
45338
|
-
}
|
|
45339
|
-
}
|
|
45340
|
-
]);
|
|
45240
|
+
*/ ContextAPI.prototype.bind = function(context, target) {
|
|
45241
|
+
return this._getContextManager().bind(context, target);
|
|
45242
|
+
};
|
|
45243
|
+
ContextAPI.prototype._getContextManager = function() {
|
|
45244
|
+
return getGlobal(API_NAME$1) || NOOP_CONTEXT_MANAGER;
|
|
45245
|
+
};
|
|
45246
|
+
/** Disable and remove the global context manager */ ContextAPI.prototype.disable = function() {
|
|
45247
|
+
this._getContextManager().disable();
|
|
45248
|
+
unregisterGlobal(API_NAME$1, DiagAPI.instance());
|
|
45249
|
+
};
|
|
45341
45250
|
return ContextAPI;
|
|
45342
|
-
}
|
|
45343
|
-
();
|
|
45251
|
+
}();
|
|
45344
45252
|
|
|
45345
45253
|
/*
|
|
45346
45254
|
* Copyright The OpenTelemetry Authors
|
|
45347
|
-
*
|
|
45348
|
-
|
|
45349
|
-
*
|
|
45255
|
+
*
|
|
45256
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
45257
|
+
* you may not use this file except in compliance with the License.
|
|
45258
|
+
* You may obtain a copy of the License at
|
|
45259
|
+
*
|
|
45260
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
45261
|
+
*
|
|
45262
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
45263
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
45264
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
45265
|
+
* See the License for the specific language governing permissions and
|
|
45266
|
+
* limitations under the License.
|
|
45350
45267
|
*/ var TraceFlags;
|
|
45351
45268
|
(function(TraceFlags) {
|
|
45352
45269
|
/** Represents no flag set. */ TraceFlags[TraceFlags["NONE"] = 0] = "NONE";
|
|
45353
45270
|
/** Bit to represent whether trace is sampled in trace flags. */ TraceFlags[TraceFlags["SAMPLED"] = 1] = "SAMPLED";
|
|
45354
45271
|
})(TraceFlags || (TraceFlags = {}));
|
|
45355
45272
|
|
|
45356
|
-
|
|
45357
|
-
|
|
45358
|
-
|
|
45359
|
-
/**
|
|
45360
|
-
* @since 1.0.0
|
|
45361
|
-
*/ var INVALID_TRACEID = '00000000000000000000000000000000';
|
|
45362
|
-
/**
|
|
45363
|
-
* @since 1.0.0
|
|
45364
|
-
*/ var INVALID_SPAN_CONTEXT = {
|
|
45273
|
+
var INVALID_SPANID = '0000000000000000';
|
|
45274
|
+
var INVALID_TRACEID = '00000000000000000000000000000000';
|
|
45275
|
+
var INVALID_SPAN_CONTEXT = {
|
|
45365
45276
|
traceId: INVALID_TRACEID,
|
|
45366
45277
|
spanId: INVALID_SPANID,
|
|
45367
45278
|
traceFlags: TraceFlags.NONE
|
|
45368
45279
|
};
|
|
45369
45280
|
|
|
45370
|
-
/*
|
|
45371
|
-
* Copyright The OpenTelemetry Authors
|
|
45372
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
45373
|
-
*/ function _class_call_check$6(instance, Constructor) {
|
|
45374
|
-
if (!(instance instanceof Constructor)) {
|
|
45375
|
-
throw new TypeError("Cannot call a class as a function");
|
|
45376
|
-
}
|
|
45377
|
-
}
|
|
45378
|
-
function _defineProperties$6(target, props) {
|
|
45379
|
-
for(var i = 0; i < props.length; i++){
|
|
45380
|
-
var descriptor = props[i];
|
|
45381
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
45382
|
-
descriptor.configurable = true;
|
|
45383
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
45384
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
45385
|
-
}
|
|
45386
|
-
}
|
|
45387
|
-
function _create_class$6(Constructor, protoProps, staticProps) {
|
|
45388
|
-
if (protoProps) _defineProperties$6(Constructor.prototype, protoProps);
|
|
45389
|
-
return Constructor;
|
|
45390
|
-
}
|
|
45391
45281
|
/**
|
|
45392
45282
|
* The NonRecordingSpan is the default {@link Span} that is used when no Span
|
|
45393
45283
|
* implementation is available. All operations are no-op including context
|
|
45394
45284
|
* propagation.
|
|
45395
|
-
*/ var NonRecordingSpan =
|
|
45396
|
-
function NonRecordingSpan() {
|
|
45397
|
-
|
|
45398
|
-
|
|
45399
|
-
this._spanContext = spanContext;
|
|
45400
|
-
}
|
|
45401
|
-
_create_class$6(NonRecordingSpan, [
|
|
45402
|
-
{
|
|
45403
|
-
// Returns a SpanContext.
|
|
45404
|
-
key: "spanContext",
|
|
45405
|
-
value: function spanContext() {
|
|
45406
|
-
return this._spanContext;
|
|
45407
|
-
}
|
|
45408
|
-
},
|
|
45409
|
-
{
|
|
45410
|
-
// By default does nothing
|
|
45411
|
-
key: "setAttribute",
|
|
45412
|
-
value: function setAttribute(_key, _value) {
|
|
45413
|
-
return this;
|
|
45414
|
-
}
|
|
45415
|
-
},
|
|
45416
|
-
{
|
|
45417
|
-
// By default does nothing
|
|
45418
|
-
key: "setAttributes",
|
|
45419
|
-
value: function setAttributes(_attributes) {
|
|
45420
|
-
return this;
|
|
45421
|
-
}
|
|
45422
|
-
},
|
|
45423
|
-
{
|
|
45424
|
-
// By default does nothing
|
|
45425
|
-
key: "addEvent",
|
|
45426
|
-
value: function addEvent(_name, _attributes) {
|
|
45427
|
-
return this;
|
|
45428
|
-
}
|
|
45429
|
-
},
|
|
45430
|
-
{
|
|
45431
|
-
key: "addLink",
|
|
45432
|
-
value: function addLink(_link) {
|
|
45433
|
-
return this;
|
|
45434
|
-
}
|
|
45435
|
-
},
|
|
45436
|
-
{
|
|
45437
|
-
key: "addLinks",
|
|
45438
|
-
value: function addLinks(_links) {
|
|
45439
|
-
return this;
|
|
45440
|
-
}
|
|
45441
|
-
},
|
|
45442
|
-
{
|
|
45443
|
-
// By default does nothing
|
|
45444
|
-
key: "setStatus",
|
|
45445
|
-
value: function setStatus(_status) {
|
|
45446
|
-
return this;
|
|
45447
|
-
}
|
|
45448
|
-
},
|
|
45449
|
-
{
|
|
45450
|
-
// By default does nothing
|
|
45451
|
-
key: "updateName",
|
|
45452
|
-
value: function updateName(_name) {
|
|
45453
|
-
return this;
|
|
45454
|
-
}
|
|
45455
|
-
},
|
|
45456
|
-
{
|
|
45457
|
-
// By default does nothing
|
|
45458
|
-
key: "end",
|
|
45459
|
-
value: function end(_endTime) {}
|
|
45460
|
-
},
|
|
45461
|
-
{
|
|
45462
|
-
// isRecording always returns false for NonRecordingSpan.
|
|
45463
|
-
key: "isRecording",
|
|
45464
|
-
value: function isRecording() {
|
|
45465
|
-
return false;
|
|
45466
|
-
}
|
|
45467
|
-
},
|
|
45468
|
-
{
|
|
45469
|
-
// By default does nothing
|
|
45470
|
-
key: "recordException",
|
|
45471
|
-
value: function recordException(_exception, _time) {}
|
|
45285
|
+
*/ var NonRecordingSpan = /** @class */ function() {
|
|
45286
|
+
function NonRecordingSpan(_spanContext) {
|
|
45287
|
+
if (_spanContext === void 0) {
|
|
45288
|
+
_spanContext = INVALID_SPAN_CONTEXT;
|
|
45472
45289
|
}
|
|
45473
|
-
|
|
45290
|
+
this._spanContext = _spanContext;
|
|
45291
|
+
}
|
|
45292
|
+
// Returns a SpanContext.
|
|
45293
|
+
NonRecordingSpan.prototype.spanContext = function() {
|
|
45294
|
+
return this._spanContext;
|
|
45295
|
+
};
|
|
45296
|
+
// By default does nothing
|
|
45297
|
+
NonRecordingSpan.prototype.setAttribute = function(_key, _value) {
|
|
45298
|
+
return this;
|
|
45299
|
+
};
|
|
45300
|
+
// By default does nothing
|
|
45301
|
+
NonRecordingSpan.prototype.setAttributes = function(_attributes) {
|
|
45302
|
+
return this;
|
|
45303
|
+
};
|
|
45304
|
+
// By default does nothing
|
|
45305
|
+
NonRecordingSpan.prototype.addEvent = function(_name, _attributes) {
|
|
45306
|
+
return this;
|
|
45307
|
+
};
|
|
45308
|
+
NonRecordingSpan.prototype.addLink = function(_link) {
|
|
45309
|
+
return this;
|
|
45310
|
+
};
|
|
45311
|
+
NonRecordingSpan.prototype.addLinks = function(_links) {
|
|
45312
|
+
return this;
|
|
45313
|
+
};
|
|
45314
|
+
// By default does nothing
|
|
45315
|
+
NonRecordingSpan.prototype.setStatus = function(_status) {
|
|
45316
|
+
return this;
|
|
45317
|
+
};
|
|
45318
|
+
// By default does nothing
|
|
45319
|
+
NonRecordingSpan.prototype.updateName = function(_name) {
|
|
45320
|
+
return this;
|
|
45321
|
+
};
|
|
45322
|
+
// By default does nothing
|
|
45323
|
+
NonRecordingSpan.prototype.end = function(_endTime) {};
|
|
45324
|
+
// isRecording always returns false for NonRecordingSpan.
|
|
45325
|
+
NonRecordingSpan.prototype.isRecording = function() {
|
|
45326
|
+
return false;
|
|
45327
|
+
};
|
|
45328
|
+
// By default does nothing
|
|
45329
|
+
NonRecordingSpan.prototype.recordException = function(_exception, _time) {};
|
|
45474
45330
|
return NonRecordingSpan;
|
|
45475
|
-
}
|
|
45476
|
-
();
|
|
45331
|
+
}();
|
|
45477
45332
|
|
|
45478
45333
|
/**
|
|
45479
45334
|
* span key
|
|
@@ -45523,137 +45378,17 @@ function _create_class$6(Constructor, protoProps, staticProps) {
|
|
|
45523
45378
|
return (_a = getSpan(context)) === null || _a === void 0 ? void 0 : _a.spanContext();
|
|
45524
45379
|
}
|
|
45525
45380
|
|
|
45526
|
-
|
|
45527
|
-
var
|
|
45528
|
-
|
|
45529
|
-
|
|
45530
|
-
0,
|
|
45531
|
-
0,
|
|
45532
|
-
0,
|
|
45533
|
-
0,
|
|
45534
|
-
0,
|
|
45535
|
-
0,
|
|
45536
|
-
0,
|
|
45537
|
-
0,
|
|
45538
|
-
0,
|
|
45539
|
-
0,
|
|
45540
|
-
0,
|
|
45541
|
-
0,
|
|
45542
|
-
0,
|
|
45543
|
-
0,
|
|
45544
|
-
0,
|
|
45545
|
-
0,
|
|
45546
|
-
0,
|
|
45547
|
-
0,
|
|
45548
|
-
0,
|
|
45549
|
-
0,
|
|
45550
|
-
0,
|
|
45551
|
-
0,
|
|
45552
|
-
0,
|
|
45553
|
-
0,
|
|
45554
|
-
0,
|
|
45555
|
-
0,
|
|
45556
|
-
0,
|
|
45557
|
-
0,
|
|
45558
|
-
0,
|
|
45559
|
-
0,
|
|
45560
|
-
0,
|
|
45561
|
-
0,
|
|
45562
|
-
0,
|
|
45563
|
-
0,
|
|
45564
|
-
0,
|
|
45565
|
-
0,
|
|
45566
|
-
0,
|
|
45567
|
-
0,
|
|
45568
|
-
0,
|
|
45569
|
-
0,
|
|
45570
|
-
0,
|
|
45571
|
-
0,
|
|
45572
|
-
0,
|
|
45573
|
-
0,
|
|
45574
|
-
0,
|
|
45575
|
-
0,
|
|
45576
|
-
1,
|
|
45577
|
-
1,
|
|
45578
|
-
1,
|
|
45579
|
-
1,
|
|
45580
|
-
1,
|
|
45581
|
-
1,
|
|
45582
|
-
1,
|
|
45583
|
-
1,
|
|
45584
|
-
1,
|
|
45585
|
-
1,
|
|
45586
|
-
0,
|
|
45587
|
-
0,
|
|
45588
|
-
0,
|
|
45589
|
-
0,
|
|
45590
|
-
0,
|
|
45591
|
-
0,
|
|
45592
|
-
0,
|
|
45593
|
-
1,
|
|
45594
|
-
1,
|
|
45595
|
-
1,
|
|
45596
|
-
1,
|
|
45597
|
-
1,
|
|
45598
|
-
1,
|
|
45599
|
-
0,
|
|
45600
|
-
0,
|
|
45601
|
-
0,
|
|
45602
|
-
0,
|
|
45603
|
-
0,
|
|
45604
|
-
0,
|
|
45605
|
-
0,
|
|
45606
|
-
0,
|
|
45607
|
-
0,
|
|
45608
|
-
0,
|
|
45609
|
-
0,
|
|
45610
|
-
0,
|
|
45611
|
-
0,
|
|
45612
|
-
0,
|
|
45613
|
-
0,
|
|
45614
|
-
0,
|
|
45615
|
-
0,
|
|
45616
|
-
0,
|
|
45617
|
-
0,
|
|
45618
|
-
0,
|
|
45619
|
-
0,
|
|
45620
|
-
0,
|
|
45621
|
-
0,
|
|
45622
|
-
0,
|
|
45623
|
-
0,
|
|
45624
|
-
0,
|
|
45625
|
-
1,
|
|
45626
|
-
1,
|
|
45627
|
-
1,
|
|
45628
|
-
1,
|
|
45629
|
-
1,
|
|
45630
|
-
1
|
|
45631
|
-
]);
|
|
45632
|
-
function isValidHex(id, length) {
|
|
45633
|
-
// As of 1.9.0 the id was allowed to be a non-string value,
|
|
45634
|
-
// even though it was not possible in the types.
|
|
45635
|
-
if (typeof id !== 'string' || id.length !== length) return false;
|
|
45636
|
-
var r = 0;
|
|
45637
|
-
for(var i = 0; i < id.length; i += 4){
|
|
45638
|
-
r += (isHex[id.charCodeAt(i)] | 0) + (isHex[id.charCodeAt(i + 1)] | 0) + (isHex[id.charCodeAt(i + 2)] | 0) + (isHex[id.charCodeAt(i + 3)] | 0);
|
|
45639
|
-
}
|
|
45640
|
-
return r === length;
|
|
45641
|
-
}
|
|
45642
|
-
/**
|
|
45643
|
-
* @since 1.0.0
|
|
45644
|
-
*/ function isValidTraceId(traceId) {
|
|
45645
|
-
return isValidHex(traceId, 32) && traceId !== INVALID_TRACEID;
|
|
45381
|
+
var VALID_TRACEID_REGEX = /^([0-9a-f]{32})$/i;
|
|
45382
|
+
var VALID_SPANID_REGEX = /^[0-9a-f]{16}$/i;
|
|
45383
|
+
function isValidTraceId(traceId) {
|
|
45384
|
+
return VALID_TRACEID_REGEX.test(traceId) && traceId !== INVALID_TRACEID;
|
|
45646
45385
|
}
|
|
45647
|
-
|
|
45648
|
-
|
|
45649
|
-
*/ function isValidSpanId(spanId) {
|
|
45650
|
-
return isValidHex(spanId, 16) && spanId !== INVALID_SPANID;
|
|
45386
|
+
function isValidSpanId(spanId) {
|
|
45387
|
+
return VALID_SPANID_REGEX.test(spanId) && spanId !== INVALID_SPANID;
|
|
45651
45388
|
}
|
|
45652
45389
|
/**
|
|
45653
45390
|
* Returns true if this {@link SpanContext} is valid.
|
|
45654
45391
|
* @return true if this {@link SpanContext} is valid.
|
|
45655
|
-
*
|
|
45656
|
-
* @since 1.0.0
|
|
45657
45392
|
*/ function isSpanContextValid(spanContext) {
|
|
45658
45393
|
return isValidTraceId(spanContext.traceId) && isValidSpanId(spanContext.spanId);
|
|
45659
45394
|
}
|
|
@@ -45668,218 +45403,117 @@ function isValidHex(id, length) {
|
|
|
45668
45403
|
|
|
45669
45404
|
/*
|
|
45670
45405
|
* Copyright The OpenTelemetry Authors
|
|
45671
|
-
*
|
|
45672
|
-
|
|
45673
|
-
|
|
45674
|
-
|
|
45675
|
-
|
|
45676
|
-
|
|
45677
|
-
|
|
45678
|
-
|
|
45679
|
-
|
|
45680
|
-
|
|
45681
|
-
|
|
45682
|
-
|
|
45683
|
-
|
|
45684
|
-
}
|
|
45685
|
-
}
|
|
45686
|
-
function _create_class$5(Constructor, protoProps, staticProps) {
|
|
45687
|
-
if (protoProps) _defineProperties$5(Constructor.prototype, protoProps);
|
|
45688
|
-
return Constructor;
|
|
45689
|
-
}
|
|
45690
|
-
function _type_of$1(obj) {
|
|
45406
|
+
*
|
|
45407
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
45408
|
+
* you may not use this file except in compliance with the License.
|
|
45409
|
+
* You may obtain a copy of the License at
|
|
45410
|
+
*
|
|
45411
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
45412
|
+
*
|
|
45413
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
45414
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
45415
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
45416
|
+
* See the License for the specific language governing permissions and
|
|
45417
|
+
* limitations under the License.
|
|
45418
|
+
*/ function _type_of$1(obj) {
|
|
45691
45419
|
"@swc/helpers - typeof";
|
|
45692
45420
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
45693
45421
|
}
|
|
45694
45422
|
var contextApi = ContextAPI.getInstance();
|
|
45695
45423
|
/**
|
|
45696
45424
|
* No-op implementations of {@link Tracer}.
|
|
45697
|
-
*/ var NoopTracer =
|
|
45698
|
-
function NoopTracer() {
|
|
45699
|
-
|
|
45700
|
-
|
|
45701
|
-
|
|
45702
|
-
|
|
45703
|
-
|
|
45704
|
-
|
|
45705
|
-
|
|
45706
|
-
|
|
45707
|
-
|
|
45708
|
-
|
|
45709
|
-
|
|
45710
|
-
|
|
45711
|
-
|
|
45712
|
-
|
|
45713
|
-
return new NonRecordingSpan(parentFromContext);
|
|
45714
|
-
} else {
|
|
45715
|
-
return new NonRecordingSpan();
|
|
45716
|
-
}
|
|
45717
|
-
}
|
|
45718
|
-
},
|
|
45719
|
-
{
|
|
45720
|
-
key: "startActiveSpan",
|
|
45721
|
-
value: function startActiveSpan(name, arg2, arg3, arg4) {
|
|
45722
|
-
var opts;
|
|
45723
|
-
var ctx;
|
|
45724
|
-
var fn;
|
|
45725
|
-
if (arguments.length < 2) {
|
|
45726
|
-
return;
|
|
45727
|
-
} else if (arguments.length === 2) {
|
|
45728
|
-
fn = arg2;
|
|
45729
|
-
} else if (arguments.length === 3) {
|
|
45730
|
-
opts = arg2;
|
|
45731
|
-
fn = arg3;
|
|
45732
|
-
} else {
|
|
45733
|
-
opts = arg2;
|
|
45734
|
-
ctx = arg3;
|
|
45735
|
-
fn = arg4;
|
|
45736
|
-
}
|
|
45737
|
-
var parentContext = ctx !== null && ctx !== void 0 ? ctx : contextApi.active();
|
|
45738
|
-
var span = this.startSpan(name, opts, parentContext);
|
|
45739
|
-
var contextWithSpanSet = setSpan(parentContext, span);
|
|
45740
|
-
return contextApi.with(contextWithSpanSet, fn, undefined, span);
|
|
45741
|
-
}
|
|
45425
|
+
*/ var NoopTracer = /** @class */ function() {
|
|
45426
|
+
function NoopTracer() {}
|
|
45427
|
+
// startSpan starts a noop span.
|
|
45428
|
+
NoopTracer.prototype.startSpan = function(name, options, context) {
|
|
45429
|
+
if (context === void 0) {
|
|
45430
|
+
context = contextApi.active();
|
|
45431
|
+
}
|
|
45432
|
+
var root = Boolean(options === null || options === void 0 ? void 0 : options.root);
|
|
45433
|
+
if (root) {
|
|
45434
|
+
return new NonRecordingSpan();
|
|
45435
|
+
}
|
|
45436
|
+
var parentFromContext = context && getSpanContext(context);
|
|
45437
|
+
if (isSpanContext(parentFromContext) && isSpanContextValid(parentFromContext)) {
|
|
45438
|
+
return new NonRecordingSpan(parentFromContext);
|
|
45439
|
+
} else {
|
|
45440
|
+
return new NonRecordingSpan();
|
|
45742
45441
|
}
|
|
45743
|
-
|
|
45442
|
+
};
|
|
45443
|
+
NoopTracer.prototype.startActiveSpan = function(name, arg2, arg3, arg4) {
|
|
45444
|
+
var opts;
|
|
45445
|
+
var ctx;
|
|
45446
|
+
var fn;
|
|
45447
|
+
if (arguments.length < 2) {
|
|
45448
|
+
return;
|
|
45449
|
+
} else if (arguments.length === 2) {
|
|
45450
|
+
fn = arg2;
|
|
45451
|
+
} else if (arguments.length === 3) {
|
|
45452
|
+
opts = arg2;
|
|
45453
|
+
fn = arg3;
|
|
45454
|
+
} else {
|
|
45455
|
+
opts = arg2;
|
|
45456
|
+
ctx = arg3;
|
|
45457
|
+
fn = arg4;
|
|
45458
|
+
}
|
|
45459
|
+
var parentContext = ctx !== null && ctx !== void 0 ? ctx : contextApi.active();
|
|
45460
|
+
var span = this.startSpan(name, opts, parentContext);
|
|
45461
|
+
var contextWithSpanSet = setSpan(parentContext, span);
|
|
45462
|
+
return contextApi.with(contextWithSpanSet, fn, undefined, span);
|
|
45463
|
+
};
|
|
45744
45464
|
return NoopTracer;
|
|
45745
45465
|
}();
|
|
45746
45466
|
function isSpanContext(spanContext) {
|
|
45747
|
-
return
|
|
45467
|
+
return (typeof spanContext === "undefined" ? "undefined" : _type_of$1(spanContext)) === 'object' && typeof spanContext['spanId'] === 'string' && typeof spanContext['traceId'] === 'string' && typeof spanContext['traceFlags'] === 'number';
|
|
45748
45468
|
}
|
|
45749
45469
|
|
|
45750
|
-
/*
|
|
45751
|
-
* Copyright The OpenTelemetry Authors
|
|
45752
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
45753
|
-
*/ function _class_call_check$4(instance, Constructor) {
|
|
45754
|
-
if (!(instance instanceof Constructor)) {
|
|
45755
|
-
throw new TypeError("Cannot call a class as a function");
|
|
45756
|
-
}
|
|
45757
|
-
}
|
|
45758
|
-
function _defineProperties$4(target, props) {
|
|
45759
|
-
for(var i = 0; i < props.length; i++){
|
|
45760
|
-
var descriptor = props[i];
|
|
45761
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
45762
|
-
descriptor.configurable = true;
|
|
45763
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
45764
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
45765
|
-
}
|
|
45766
|
-
}
|
|
45767
|
-
function _create_class$4(Constructor, protoProps, staticProps) {
|
|
45768
|
-
if (protoProps) _defineProperties$4(Constructor.prototype, protoProps);
|
|
45769
|
-
return Constructor;
|
|
45770
|
-
}
|
|
45771
45470
|
var NOOP_TRACER = new NoopTracer();
|
|
45772
45471
|
/**
|
|
45773
45472
|
* Proxy tracer provided by the proxy tracer provider
|
|
45774
|
-
|
|
45775
|
-
|
|
45776
|
-
|
|
45777
|
-
function ProxyTracer(provider, name, version, options) {
|
|
45778
|
-
_class_call_check$4(this, ProxyTracer);
|
|
45779
|
-
this._provider = provider;
|
|
45473
|
+
*/ var ProxyTracer = /** @class */ function() {
|
|
45474
|
+
function ProxyTracer(_provider, name, version, options) {
|
|
45475
|
+
this._provider = _provider;
|
|
45780
45476
|
this.name = name;
|
|
45781
45477
|
this.version = version;
|
|
45782
45478
|
this.options = options;
|
|
45783
45479
|
}
|
|
45784
|
-
|
|
45785
|
-
|
|
45786
|
-
|
|
45787
|
-
|
|
45788
|
-
|
|
45789
|
-
|
|
45790
|
-
|
|
45791
|
-
|
|
45792
|
-
key: "startActiveSpan",
|
|
45793
|
-
value: function startActiveSpan(_name, _options, _context, _fn) {
|
|
45794
|
-
var tracer = this._getTracer();
|
|
45795
|
-
return Reflect.apply(tracer.startActiveSpan, tracer, arguments);
|
|
45796
|
-
}
|
|
45797
|
-
},
|
|
45798
|
-
{
|
|
45799
|
-
/**
|
|
45480
|
+
ProxyTracer.prototype.startSpan = function(name, options, context) {
|
|
45481
|
+
return this._getTracer().startSpan(name, options, context);
|
|
45482
|
+
};
|
|
45483
|
+
ProxyTracer.prototype.startActiveSpan = function(_name, _options, _context, _fn) {
|
|
45484
|
+
var tracer = this._getTracer();
|
|
45485
|
+
return Reflect.apply(tracer.startActiveSpan, tracer, arguments);
|
|
45486
|
+
};
|
|
45487
|
+
/**
|
|
45800
45488
|
* Try to get a tracer from the proxy tracer provider.
|
|
45801
45489
|
* If the proxy tracer provider has no delegate, return a noop tracer.
|
|
45802
|
-
*/
|
|
45803
|
-
|
|
45804
|
-
|
|
45805
|
-
return this._delegate;
|
|
45806
|
-
}
|
|
45807
|
-
var tracer = this._provider.getDelegateTracer(this.name, this.version, this.options);
|
|
45808
|
-
if (!tracer) {
|
|
45809
|
-
return NOOP_TRACER;
|
|
45810
|
-
}
|
|
45811
|
-
this._delegate = tracer;
|
|
45812
|
-
return this._delegate;
|
|
45813
|
-
}
|
|
45490
|
+
*/ ProxyTracer.prototype._getTracer = function() {
|
|
45491
|
+
if (this._delegate) {
|
|
45492
|
+
return this._delegate;
|
|
45814
45493
|
}
|
|
45815
|
-
|
|
45494
|
+
var tracer = this._provider.getDelegateTracer(this.name, this.version, this.options);
|
|
45495
|
+
if (!tracer) {
|
|
45496
|
+
return NOOP_TRACER;
|
|
45497
|
+
}
|
|
45498
|
+
this._delegate = tracer;
|
|
45499
|
+
return this._delegate;
|
|
45500
|
+
};
|
|
45816
45501
|
return ProxyTracer;
|
|
45817
|
-
}
|
|
45818
|
-
();
|
|
45502
|
+
}();
|
|
45819
45503
|
|
|
45820
|
-
/*
|
|
45821
|
-
* Copyright The OpenTelemetry Authors
|
|
45822
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
45823
|
-
*/ function _class_call_check$3(instance, Constructor) {
|
|
45824
|
-
if (!(instance instanceof Constructor)) {
|
|
45825
|
-
throw new TypeError("Cannot call a class as a function");
|
|
45826
|
-
}
|
|
45827
|
-
}
|
|
45828
|
-
function _defineProperties$3(target, props) {
|
|
45829
|
-
for(var i = 0; i < props.length; i++){
|
|
45830
|
-
var descriptor = props[i];
|
|
45831
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
45832
|
-
descriptor.configurable = true;
|
|
45833
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
45834
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
45835
|
-
}
|
|
45836
|
-
}
|
|
45837
|
-
function _create_class$3(Constructor, protoProps, staticProps) {
|
|
45838
|
-
if (protoProps) _defineProperties$3(Constructor.prototype, protoProps);
|
|
45839
|
-
return Constructor;
|
|
45840
|
-
}
|
|
45841
45504
|
/**
|
|
45842
45505
|
* An implementation of the {@link TracerProvider} which returns an impotent
|
|
45843
45506
|
* Tracer for all calls to `getTracer`.
|
|
45844
45507
|
*
|
|
45845
45508
|
* All operations are no-op.
|
|
45846
|
-
*/ var NoopTracerProvider =
|
|
45847
|
-
function NoopTracerProvider() {
|
|
45848
|
-
|
|
45849
|
-
|
|
45850
|
-
|
|
45851
|
-
{
|
|
45852
|
-
key: "getTracer",
|
|
45853
|
-
value: function getTracer(_name, _version, _options) {
|
|
45854
|
-
return new NoopTracer();
|
|
45855
|
-
}
|
|
45856
|
-
}
|
|
45857
|
-
]);
|
|
45509
|
+
*/ var NoopTracerProvider = /** @class */ function() {
|
|
45510
|
+
function NoopTracerProvider() {}
|
|
45511
|
+
NoopTracerProvider.prototype.getTracer = function(_name, _version, _options) {
|
|
45512
|
+
return new NoopTracer();
|
|
45513
|
+
};
|
|
45858
45514
|
return NoopTracerProvider;
|
|
45859
|
-
}
|
|
45860
|
-
();
|
|
45515
|
+
}();
|
|
45861
45516
|
|
|
45862
|
-
/*
|
|
45863
|
-
* Copyright The OpenTelemetry Authors
|
|
45864
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
45865
|
-
*/ function _class_call_check$2(instance, Constructor) {
|
|
45866
|
-
if (!(instance instanceof Constructor)) {
|
|
45867
|
-
throw new TypeError("Cannot call a class as a function");
|
|
45868
|
-
}
|
|
45869
|
-
}
|
|
45870
|
-
function _defineProperties$2(target, props) {
|
|
45871
|
-
for(var i = 0; i < props.length; i++){
|
|
45872
|
-
var descriptor = props[i];
|
|
45873
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
45874
|
-
descriptor.configurable = true;
|
|
45875
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
45876
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
45877
|
-
}
|
|
45878
|
-
}
|
|
45879
|
-
function _create_class$2(Constructor, protoProps, staticProps) {
|
|
45880
|
-
if (protoProps) _defineProperties$2(Constructor.prototype, protoProps);
|
|
45881
|
-
return Constructor;
|
|
45882
|
-
}
|
|
45883
45517
|
var NOOP_TRACER_PROVIDER = new NoopTracerProvider();
|
|
45884
45518
|
/**
|
|
45885
45519
|
* Tracer provider which provides {@link ProxyTracer}s.
|
|
@@ -45888,55 +45522,44 @@ var NOOP_TRACER_PROVIDER = new NoopTracerProvider();
|
|
|
45888
45522
|
* When a delegate is set, traces are provided from the delegate.
|
|
45889
45523
|
* When a delegate is set after tracers have already been provided,
|
|
45890
45524
|
* all tracers already provided will use the provided delegate implementation.
|
|
45891
|
-
|
|
45892
|
-
|
|
45893
|
-
|
|
45894
|
-
*/ var ProxyTracerProvider = /*#__PURE__*/ function() {
|
|
45895
|
-
function ProxyTracerProvider() {
|
|
45896
|
-
_class_call_check$2(this, ProxyTracerProvider);
|
|
45897
|
-
}
|
|
45898
|
-
_create_class$2(ProxyTracerProvider, [
|
|
45899
|
-
{
|
|
45900
|
-
/**
|
|
45525
|
+
*/ var ProxyTracerProvider = /** @class */ function() {
|
|
45526
|
+
function ProxyTracerProvider() {}
|
|
45527
|
+
/**
|
|
45901
45528
|
* Get a {@link ProxyTracer}
|
|
45902
|
-
*/
|
|
45903
|
-
|
|
45904
|
-
|
|
45905
|
-
|
|
45906
|
-
|
|
45907
|
-
|
|
45908
|
-
|
|
45909
|
-
|
|
45910
|
-
|
|
45911
|
-
var _a;
|
|
45912
|
-
return (_a = this._delegate) !== null && _a !== void 0 ? _a : NOOP_TRACER_PROVIDER;
|
|
45913
|
-
}
|
|
45914
|
-
},
|
|
45915
|
-
{
|
|
45916
|
-
/**
|
|
45529
|
+
*/ ProxyTracerProvider.prototype.getTracer = function(name, version, options) {
|
|
45530
|
+
var _a;
|
|
45531
|
+
return (_a = this.getDelegateTracer(name, version, options)) !== null && _a !== void 0 ? _a : new ProxyTracer(this, name, version, options);
|
|
45532
|
+
};
|
|
45533
|
+
ProxyTracerProvider.prototype.getDelegate = function() {
|
|
45534
|
+
var _a;
|
|
45535
|
+
return (_a = this._delegate) !== null && _a !== void 0 ? _a : NOOP_TRACER_PROVIDER;
|
|
45536
|
+
};
|
|
45537
|
+
/**
|
|
45917
45538
|
* Set the delegate tracer provider
|
|
45918
|
-
*/
|
|
45919
|
-
|
|
45920
|
-
|
|
45921
|
-
|
|
45922
|
-
|
|
45923
|
-
|
|
45924
|
-
|
|
45925
|
-
value: function getDelegateTracer(name, version, options) {
|
|
45926
|
-
var _a;
|
|
45927
|
-
return (_a = this._delegate) === null || _a === void 0 ? void 0 : _a.getTracer(name, version, options);
|
|
45928
|
-
}
|
|
45929
|
-
}
|
|
45930
|
-
]);
|
|
45539
|
+
*/ ProxyTracerProvider.prototype.setDelegate = function(delegate) {
|
|
45540
|
+
this._delegate = delegate;
|
|
45541
|
+
};
|
|
45542
|
+
ProxyTracerProvider.prototype.getDelegateTracer = function(name, version, options) {
|
|
45543
|
+
var _a;
|
|
45544
|
+
return (_a = this._delegate) === null || _a === void 0 ? void 0 : _a.getTracer(name, version, options);
|
|
45545
|
+
};
|
|
45931
45546
|
return ProxyTracerProvider;
|
|
45932
|
-
}
|
|
45933
|
-
();
|
|
45547
|
+
}();
|
|
45934
45548
|
|
|
45935
45549
|
/*
|
|
45936
45550
|
* Copyright The OpenTelemetry Authors
|
|
45937
|
-
*
|
|
45938
|
-
|
|
45939
|
-
*
|
|
45551
|
+
*
|
|
45552
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
45553
|
+
* you may not use this file except in compliance with the License.
|
|
45554
|
+
* You may obtain a copy of the License at
|
|
45555
|
+
*
|
|
45556
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
45557
|
+
*
|
|
45558
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
45559
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
45560
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
45561
|
+
* See the License for the specific language governing permissions and
|
|
45562
|
+
* limitations under the License.
|
|
45940
45563
|
*/ var SpanKind;
|
|
45941
45564
|
(function(SpanKind) {
|
|
45942
45565
|
/** Default value. Indicates that the span is used internally. */ SpanKind[SpanKind["INTERNAL"] = 0] = "INTERNAL";
|
|
@@ -45962,44 +45585,27 @@ var NOOP_TRACER_PROVIDER = new NoopTracerProvider();
|
|
|
45962
45585
|
|
|
45963
45586
|
/*
|
|
45964
45587
|
* Copyright The OpenTelemetry Authors
|
|
45965
|
-
*
|
|
45588
|
+
*
|
|
45589
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
45590
|
+
* you may not use this file except in compliance with the License.
|
|
45591
|
+
* You may obtain a copy of the License at
|
|
45592
|
+
*
|
|
45593
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
45594
|
+
*
|
|
45595
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
45596
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
45597
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
45598
|
+
* See the License for the specific language governing permissions and
|
|
45599
|
+
* limitations under the License.
|
|
45966
45600
|
*/ // Split module-level variable definition into separate files to allow
|
|
45967
45601
|
// tree-shaking on each api instance.
|
|
45968
|
-
/**
|
|
45969
|
-
* Entrypoint for context API
|
|
45970
|
-
* @since 1.0.0
|
|
45971
|
-
*/ var context = ContextAPI.getInstance();
|
|
45602
|
+
/** Entrypoint for context API */ var context = ContextAPI.getInstance();
|
|
45972
45603
|
|
|
45973
|
-
/*
|
|
45974
|
-
* Copyright The OpenTelemetry Authors
|
|
45975
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
45976
|
-
*/ function _class_call_check$1(instance, Constructor) {
|
|
45977
|
-
if (!(instance instanceof Constructor)) {
|
|
45978
|
-
throw new TypeError("Cannot call a class as a function");
|
|
45979
|
-
}
|
|
45980
|
-
}
|
|
45981
|
-
function _defineProperties$1(target, props) {
|
|
45982
|
-
for(var i = 0; i < props.length; i++){
|
|
45983
|
-
var descriptor = props[i];
|
|
45984
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
45985
|
-
descriptor.configurable = true;
|
|
45986
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
45987
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
45988
|
-
}
|
|
45989
|
-
}
|
|
45990
|
-
function _create_class$1(Constructor, protoProps, staticProps) {
|
|
45991
|
-
if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);
|
|
45992
|
-
if (staticProps) _defineProperties$1(Constructor, staticProps);
|
|
45993
|
-
return Constructor;
|
|
45994
|
-
}
|
|
45995
45604
|
var API_NAME = 'trace';
|
|
45996
45605
|
/**
|
|
45997
45606
|
* Singleton object which represents the entry point to the OpenTelemetry Tracing API
|
|
45998
|
-
|
|
45999
|
-
|
|
46000
|
-
*/ var TraceAPI = /*#__PURE__*/ function() {
|
|
46001
|
-
function TraceAPI() {
|
|
46002
|
-
_class_call_check$1(this, TraceAPI);
|
|
45607
|
+
*/ var TraceAPI = /** @class */ function() {
|
|
45608
|
+
/** Empty private constructor prevents end users from constructing a new instance of the API */ function TraceAPI() {
|
|
46003
45609
|
this._proxyTracerProvider = new ProxyTracerProvider();
|
|
46004
45610
|
this.wrapSpanContext = wrapSpanContext;
|
|
46005
45611
|
this.isSpanContextValid = isSpanContextValid;
|
|
@@ -46010,69 +45616,57 @@ var API_NAME = 'trace';
|
|
|
46010
45616
|
this.setSpan = setSpan;
|
|
46011
45617
|
this.setSpanContext = setSpanContext;
|
|
46012
45618
|
}
|
|
46013
|
-
|
|
46014
|
-
{
|
|
46015
|
-
|
|
45619
|
+
/** Get the singleton instance of the Trace API */ TraceAPI.getInstance = function() {
|
|
45620
|
+
if (!this._instance) {
|
|
45621
|
+
this._instance = new TraceAPI();
|
|
45622
|
+
}
|
|
45623
|
+
return this._instance;
|
|
45624
|
+
};
|
|
45625
|
+
/**
|
|
46016
45626
|
* Set the current global tracer.
|
|
46017
45627
|
*
|
|
46018
45628
|
* @returns true if the tracer provider was successfully registered, else false
|
|
46019
|
-
*/
|
|
46020
|
-
|
|
46021
|
-
|
|
46022
|
-
|
|
46023
|
-
|
|
46024
|
-
|
|
46025
|
-
|
|
46026
|
-
|
|
46027
|
-
},
|
|
46028
|
-
{
|
|
46029
|
-
/**
|
|
45629
|
+
*/ TraceAPI.prototype.setGlobalTracerProvider = function(provider) {
|
|
45630
|
+
var success = registerGlobal(API_NAME, this._proxyTracerProvider, DiagAPI.instance());
|
|
45631
|
+
if (success) {
|
|
45632
|
+
this._proxyTracerProvider.setDelegate(provider);
|
|
45633
|
+
}
|
|
45634
|
+
return success;
|
|
45635
|
+
};
|
|
45636
|
+
/**
|
|
46030
45637
|
* Returns the global tracer provider.
|
|
46031
|
-
*/
|
|
46032
|
-
|
|
46033
|
-
|
|
46034
|
-
|
|
46035
|
-
},
|
|
46036
|
-
{
|
|
46037
|
-
/**
|
|
45638
|
+
*/ TraceAPI.prototype.getTracerProvider = function() {
|
|
45639
|
+
return getGlobal(API_NAME) || this._proxyTracerProvider;
|
|
45640
|
+
};
|
|
45641
|
+
/**
|
|
46038
45642
|
* Returns a tracer from the global tracer provider.
|
|
46039
|
-
*/
|
|
46040
|
-
|
|
46041
|
-
|
|
46042
|
-
|
|
46043
|
-
|
|
46044
|
-
|
|
46045
|
-
|
|
46046
|
-
value: function disable() {
|
|
46047
|
-
unregisterGlobal(API_NAME, DiagAPI.instance());
|
|
46048
|
-
this._proxyTracerProvider = new ProxyTracerProvider();
|
|
46049
|
-
}
|
|
46050
|
-
}
|
|
46051
|
-
], [
|
|
46052
|
-
{
|
|
46053
|
-
key: "getInstance",
|
|
46054
|
-
value: /** Get the singleton instance of the Trace API */ function getInstance() {
|
|
46055
|
-
if (!this._instance) {
|
|
46056
|
-
this._instance = new TraceAPI();
|
|
46057
|
-
}
|
|
46058
|
-
return this._instance;
|
|
46059
|
-
}
|
|
46060
|
-
}
|
|
46061
|
-
]);
|
|
45643
|
+
*/ TraceAPI.prototype.getTracer = function(name, version) {
|
|
45644
|
+
return this.getTracerProvider().getTracer(name, version);
|
|
45645
|
+
};
|
|
45646
|
+
/** Remove the global tracer provider */ TraceAPI.prototype.disable = function() {
|
|
45647
|
+
unregisterGlobal(API_NAME, DiagAPI.instance());
|
|
45648
|
+
this._proxyTracerProvider = new ProxyTracerProvider();
|
|
45649
|
+
};
|
|
46062
45650
|
return TraceAPI;
|
|
46063
|
-
}
|
|
46064
|
-
();
|
|
45651
|
+
}();
|
|
46065
45652
|
|
|
46066
45653
|
/*
|
|
46067
45654
|
* Copyright The OpenTelemetry Authors
|
|
46068
|
-
*
|
|
45655
|
+
*
|
|
45656
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
45657
|
+
* you may not use this file except in compliance with the License.
|
|
45658
|
+
* You may obtain a copy of the License at
|
|
45659
|
+
*
|
|
45660
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
45661
|
+
*
|
|
45662
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
45663
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
45664
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
45665
|
+
* See the License for the specific language governing permissions and
|
|
45666
|
+
* limitations under the License.
|
|
46069
45667
|
*/ // Split module-level variable definition into separate files to allow
|
|
46070
45668
|
// tree-shaking on each api instance.
|
|
46071
|
-
/**
|
|
46072
|
-
* Entrypoint for trace API
|
|
46073
|
-
*
|
|
46074
|
-
* @since 1.0.0
|
|
46075
|
-
*/ var trace = TraceAPI.getInstance();
|
|
45669
|
+
/** Entrypoint for trace API */ var trace = TraceAPI.getInstance();
|
|
46076
45670
|
|
|
46077
45671
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
46078
45672
|
function getDefaultExportFromCjs(x) {
|
|
@@ -46098,7 +45692,7 @@ var dayjs_min = {
|
|
|
46098
45692
|
!function(t, e) {
|
|
46099
45693
|
"object" == (_type_of(exports)) && "undefined" != 'object' ? module.exports = e() : (t = "undefined" != typeof globalThis ? globalThis : t || self).dayjs = e();
|
|
46100
45694
|
}(commonjsGlobal, function() {
|
|
46101
|
-
var t = 1e3, e = 6e4, n = 36e5, r = "millisecond", i = "second", s = "minute", u = "hour", a = "day", o = "week", c = "month", f = "quarter", h = "year", d = "date", l = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|
|
|
45695
|
+
var t = 1e3, e = 6e4, n = 36e5, r = "millisecond", i = "second", s = "minute", u = "hour", a = "day", o = "week", c = "month", f = "quarter", h = "year", d = "date", l = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = {
|
|
46102
45696
|
name: "en",
|
|
46103
45697
|
weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
|
|
46104
45698
|
months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"),
|
|
@@ -46400,8 +45994,8 @@ var dayjs_min = {
|
|
|
46400
45994
|
}, m.toString = function() {
|
|
46401
45995
|
return this.$d.toUTCString();
|
|
46402
45996
|
}, M;
|
|
46403
|
-
}(),
|
|
46404
|
-
return O.prototype =
|
|
45997
|
+
}(), k = _.prototype;
|
|
45998
|
+
return O.prototype = k, [
|
|
46405
45999
|
[
|
|
46406
46000
|
"$ms",
|
|
46407
46001
|
r
|
|
@@ -46435,7 +46029,7 @@ var dayjs_min = {
|
|
|
46435
46029
|
d
|
|
46436
46030
|
]
|
|
46437
46031
|
].forEach(function(t) {
|
|
46438
|
-
|
|
46032
|
+
k[t[1]] = function(e) {
|
|
46439
46033
|
return this.$g(e, t[0], t[1]);
|
|
46440
46034
|
};
|
|
46441
46035
|
}), O.extend = function(t, e) {
|