a3js 0.0.54 → 0.0.55

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/a3js.es.js CHANGED
@@ -145,8 +145,8 @@ class Pe {
145
145
  }
146
146
  mul(e, t, n, r) {
147
147
  const s = this.x, o = this.y, c = this.z, A = this.w;
148
- let a, h, u, m;
149
- return typeof e == "number" ? (a = e, h = t, u = n, m = r) : (a = e.x, h = e.y, u = e.z, m = e.w), this.x = A * a + s * m + o * u - c * h, this.y = A * h - s * u + o * m + c * a, this.z = A * u + s * h - o * a + c * m, this.w = A * m - s * a - o * h - c * u, this;
148
+ let a, h, u, E;
149
+ return typeof e == "number" ? (a = e, h = t, u = n, E = r) : (a = e.x, h = e.y, u = e.z, E = e.w), this.x = A * a + s * E + o * u - c * h, this.y = A * h - s * u + o * E + c * a, this.z = A * u + s * h - o * a + c * E, this.w = A * E - s * a - o * h - c * u, this;
150
150
  }
151
151
  /**
152
152
  * 2つのクォータニオン `q1` と `q2` を線形補間し、結果をこのクォータニオンに設定します。
@@ -188,21 +188,21 @@ class Pe {
188
188
  const tt = new Pe();
189
189
  function mt(i, e, t, n) {
190
190
  t.normalize();
191
- const r = i.clone().sub(e).normalize(), s = new Ae().cross(r, t).normalize(), o = new Ae().cross(s, r), c = s.x, A = o.x, a = -r.x, h = s.y, u = o.y, m = -r.y, p = s.z, E = o.z, g = -r.z;
191
+ const r = i.clone().sub(e).normalize(), s = new Ae().cross(r, t).normalize(), o = new Ae().cross(s, r), c = s.x, A = o.x, a = -r.x, h = s.y, u = o.y, E = -r.y, p = s.z, m = o.z, g = -r.z;
192
192
  let l, d, f, b;
193
193
  const I = c + u + g;
194
194
  if (I > 0) {
195
195
  const v = Math.sqrt(I + 1) * 2;
196
- l = (E - m) / v, d = (a - p) / v, f = (h - A) / v, b = 0.25 * v;
196
+ l = (m - E) / v, d = (a - p) / v, f = (h - A) / v, b = 0.25 * v;
197
197
  } else if (c > u && c > g) {
198
198
  const v = Math.sqrt(1 + c - u - g) * 2;
199
- l = 0.25 * v, d = (A + h) / v, f = (a + p) / v, b = (E - m) / v;
199
+ l = 0.25 * v, d = (A + h) / v, f = (a + p) / v, b = (m - E) / v;
200
200
  } else if (u > g) {
201
201
  const v = Math.sqrt(1 + u - c - g) * 2;
202
- l = (A + h) / v, d = 0.25 * v, f = (m + E) / v, b = (a - p) / v;
202
+ l = (A + h) / v, d = 0.25 * v, f = (E + m) / v, b = (a - p) / v;
203
203
  } else {
204
204
  const v = Math.sqrt(1 + g - c - u) * 2;
205
- l = (a + p) / v, d = (m + E) / v, f = 0.25 * v, b = (h - A) / v;
205
+ l = (a + p) / v, d = (E + m) / v, f = 0.25 * v, b = (h - A) / v;
206
206
  }
207
207
  const C = n ?? new Pe();
208
208
  return C.set(l, d, f, b), C;
@@ -224,8 +224,8 @@ function Qt(i, e = "ZXY", t) {
224
224
  return n;
225
225
  }
226
226
  function oo(i) {
227
- const e = [[], [], []], t = i.x + i.x, n = i.y + i.y, r = i.z + i.z, s = i.x * t, o = i.x * n, c = i.x * r, A = i.y * n, a = i.y * r, h = i.z * r, u = i.w * t, m = i.w * n, p = i.w * r;
228
- return e[0][0] = 1 - (A + h), e[0][1] = o - p, e[0][2] = c + m, e[1][0] = o + p, e[1][1] = 1 - (s + h), e[1][2] = a - u, e[2][0] = c - m, e[2][1] = a + u, e[2][2] = 1 - (s + A), e;
227
+ const e = [[], [], []], t = i.x + i.x, n = i.y + i.y, r = i.z + i.z, s = i.x * t, o = i.x * n, c = i.x * r, A = i.y * n, a = i.y * r, h = i.z * r, u = i.w * t, E = i.w * n, p = i.w * r;
228
+ return e[0][0] = 1 - (A + h), e[0][1] = o - p, e[0][2] = c + E, e[1][0] = o + p, e[1][1] = 1 - (s + h), e[1][2] = a - u, e[2][0] = c - E, e[2][1] = a + u, e[2][2] = 1 - (s + A), e;
229
229
  }
230
230
  const xt = (i) => Math.max(-1, Math.min(1, i));
231
231
  function fi(i, e = "ZXY", t) {
@@ -870,8 +870,8 @@ function pi(i) {
870
870
  if (t) {
871
871
  const A = t.array;
872
872
  for (let a = 0; a < A.length; a += 3) {
873
- const h = A[a] * 3, u = A[a + 1] * 3, m = A[a + 2] * 3;
874
- s.set(n[h], n[h + 1], n[h + 2]), o.set(n[u], n[u + 1], n[u + 2]), c.set(n[m], n[m + 1], n[m + 2]), r += s.dot(o.clone().cross(c));
873
+ const h = A[a] * 3, u = A[a + 1] * 3, E = A[a + 2] * 3;
874
+ s.set(n[h], n[h + 1], n[h + 2]), o.set(n[u], n[u + 1], n[u + 2]), c.set(n[E], n[E + 1], n[E + 2]), r += s.dot(o.clone().cross(c));
875
875
  }
876
876
  } else
877
877
  for (let A = 0; A < n.length; A += 9)
@@ -2112,18 +2112,18 @@ var ve = (i, e) => () => (e || (e = { exports: {} }, i(e.exports, e)), e.exports
2112
2112
  else throw Error("non exhaustive match");
2113
2113
  }
2114
2114
  i.forEach = u;
2115
- function m(F) {
2115
+ function E(F) {
2116
2116
  return typeof F == "string";
2117
2117
  }
2118
- i.isString = m;
2118
+ i.isString = E;
2119
2119
  function p(F) {
2120
2120
  return F === void 0;
2121
2121
  }
2122
2122
  i.isUndefined = p;
2123
- function E(F) {
2123
+ function m(F) {
2124
2124
  return F instanceof Function;
2125
2125
  }
2126
- i.isFunction = E;
2126
+ i.isFunction = m;
2127
2127
  function g(F, Y) {
2128
2128
  return Y === void 0 && (Y = 1), F.slice(Y, F.length);
2129
2129
  }
@@ -2515,16 +2515,16 @@ var ve = (i, e) => () => (e || (e = { exports: {} }, i(e.exports, e)), e.exports
2515
2515
  var l, d = !1;
2516
2516
  switch (this.popChar()) {
2517
2517
  case "d":
2518
- l = m;
2518
+ l = E;
2519
2519
  break;
2520
2520
  case "D":
2521
- l = m, d = !0;
2521
+ l = E, d = !0;
2522
2522
  break;
2523
2523
  case "s":
2524
- l = E;
2524
+ l = m;
2525
2525
  break;
2526
2526
  case "S":
2527
- l = E, d = !0;
2527
+ l = m, d = !0;
2528
2528
  break;
2529
2529
  case "w":
2530
2530
  l = p;
@@ -2809,12 +2809,12 @@ var ve = (i, e) => () => (e || (e = { exports: {} }, i(e.exports, e)), e.exports
2809
2809
  function h() {
2810
2810
  throw Error("Internal Error - Should never get here!");
2811
2811
  }
2812
- var u, m = [];
2813
- for (u = o("0"); u <= o("9"); u++) m.push(u);
2814
- var p = [o("_")].concat(m);
2812
+ var u, E = [];
2813
+ for (u = o("0"); u <= o("9"); u++) E.push(u);
2814
+ var p = [o("_")].concat(E);
2815
2815
  for (u = o("a"); u <= o("z"); u++) p.push(u);
2816
2816
  for (u = o("A"); u <= o("Z"); u++) p.push(u);
2817
- var E = [o(" "), o("\f"), o(`
2817
+ var m = [o(" "), o("\f"), o(`
2818
2818
  `), o("\r"), o(" "), o("\v"), o(" "), o(" "), o(" "), o(" "), o(" "), o(" "), o(" "), o(" "), o(" "), o(" "), o(" "), o(" "), o(" "), o(" "), o("\u2028"), o("\u2029"), o(" "), o(" "), o(" "), o("\uFEFF")];
2819
2819
  function g() {
2820
2820
  }
@@ -2994,7 +2994,7 @@ var ve = (i, e) => () => (e || (e = { exports: {} }, i(e.exports, e)), e.exports
2994
2994
  throw Error("Non Exhaustive Match");
2995
2995
  }
2996
2996
  var v = C.quantifier !== void 0 && C.quantifier.atLeast === 0;
2997
- if (C.type === "Group" && m(C) === !1 || C.type !== "Group" && v === !1) break;
2997
+ if (C.type === "Group" && E(C) === !1 || C.type !== "Group" && v === !1) break;
2998
2998
  }
2999
2999
  break;
3000
3000
  default:
@@ -3029,8 +3029,8 @@ var ve = (i, e) => () => (e || (e = { exports: {} }, i(e.exports, e)), e.exports
3029
3029
  }) !== void 0;
3030
3030
  });
3031
3031
  }
3032
- function m(g) {
3033
- return g.quantifier && g.quantifier.atLeast === 0 ? !0 : g.value ? n.isArray(g.value) ? n.every(g.value, m) : m(g.value) : !1;
3032
+ function E(g) {
3033
+ return g.quantifier && g.quantifier.atLeast === 0 ? !0 : g.value ? n.isArray(g.value) ? n.every(g.value, E) : E(g.value) : !1;
3034
3034
  }
3035
3035
  var p = (function(g) {
3036
3036
  e(l, g);
@@ -3056,7 +3056,7 @@ var ve = (i, e) => () => (e || (e = { exports: {} }, i(e.exports, e)), e.exports
3056
3056
  d.complement ? u(d, this.targetCharCodes) === void 0 && (this.found = !0) : u(d, this.targetCharCodes) !== void 0 && (this.found = !0);
3057
3057
  }, l;
3058
3058
  })(t.BaseRegExpVisitor);
3059
- function E(g, l) {
3059
+ function m(g, l) {
3060
3060
  if (l instanceof RegExp) {
3061
3061
  var d = r.getRegExpAst(l), f = new p(g);
3062
3062
  return f.visit(d), f.found;
@@ -3064,7 +3064,7 @@ var ve = (i, e) => () => (e || (e = { exports: {} }, i(e.exports, e)), e.exports
3064
3064
  return n.contains(g, b.charCodeAt(0));
3065
3065
  }) !== void 0;
3066
3066
  }
3067
- i.canMatchCharCode = E;
3067
+ i.canMatchCharCode = m;
3068
3068
  }), lr = ve((i) => {
3069
3069
  var e = i && i.__extends || /* @__PURE__ */ (function() {
3070
3070
  var P = function(U, W) {
@@ -3204,11 +3204,11 @@ var ve = (i, e) => () => (e || (e = { exports: {} }, i(e.exports, e)), e.exports
3204
3204
  function u(P, U) {
3205
3205
  var W = [], q = p(P);
3206
3206
  W = W.concat(q.errors);
3207
- var ee = E(q.valid), re = ee.valid;
3208
- return W = W.concat(ee.errors), W = W.concat(m(re)), W = W.concat(v(re)), W = W.concat(x(re, U)), W = W.concat(j(re)), W;
3207
+ var ee = m(q.valid), re = ee.valid;
3208
+ return W = W.concat(ee.errors), W = W.concat(E(re)), W = W.concat(v(re)), W = W.concat(x(re, U)), W = W.concat(j(re)), W;
3209
3209
  }
3210
3210
  i.validatePatterns = u;
3211
- function m(P) {
3211
+ function E(P) {
3212
3212
  var U = [], W = r.filter(P, function(q) {
3213
3213
  return r.isRegExp(q[c]);
3214
3214
  });
@@ -3223,7 +3223,7 @@ var ve = (i, e) => () => (e || (e = { exports: {} }, i(e.exports, e)), e.exports
3223
3223
  return { errors: W, valid: q };
3224
3224
  }
3225
3225
  i.findMissingPatterns = p;
3226
- function E(P) {
3226
+ function m(P) {
3227
3227
  var U = r.filter(P, function(ee) {
3228
3228
  var re = ee[c];
3229
3229
  return !r.isRegExp(re) && !r.isFunction(re) && !r.has(re, "exec") && !r.isString(re);
@@ -3232,7 +3232,7 @@ var ve = (i, e) => () => (e || (e = { exports: {} }, i(e.exports, e)), e.exports
3232
3232
  }), q = r.difference(P, U);
3233
3233
  return { errors: W, valid: q };
3234
3234
  }
3235
- i.findInvalidPatterns = E;
3235
+ i.findInvalidPatterns = m;
3236
3236
  var g = /[^\\][\$]/;
3237
3237
  function l(P) {
3238
3238
  var U = (function(ee) {
@@ -3530,7 +3530,7 @@ See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;
3530
3530
  i.expandCategories = s;
3531
3531
  function o(g) {
3532
3532
  e.forEach(g, function(l) {
3533
- h(l) || (i.tokenIdxToClass[i.tokenShortNameIdx] = l, l.tokenTypeIdx = i.tokenShortNameIdx++), u(l) && !e.isArray(l.CATEGORIES) && (l.CATEGORIES = [l.CATEGORIES]), u(l) || (l.CATEGORIES = []), m(l) || (l.categoryMatches = []), p(l) || (l.categoryMatchesMap = {});
3533
+ h(l) || (i.tokenIdxToClass[i.tokenShortNameIdx] = l, l.tokenTypeIdx = i.tokenShortNameIdx++), u(l) && !e.isArray(l.CATEGORIES) && (l.CATEGORIES = [l.CATEGORIES]), u(l) || (l.CATEGORIES = []), E(l) || (l.categoryMatches = []), p(l) || (l.categoryMatchesMap = {});
3534
3534
  });
3535
3535
  }
3536
3536
  i.assignTokenDefaultProps = o;
@@ -3565,18 +3565,18 @@ See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;
3565
3565
  return e.has(g, "CATEGORIES");
3566
3566
  }
3567
3567
  i.hasCategoriesProperty = u;
3568
- function m(g) {
3568
+ function E(g) {
3569
3569
  return e.has(g, "categoryMatches");
3570
3570
  }
3571
- i.hasExtendingTokensTypesProperty = m;
3571
+ i.hasExtendingTokensTypesProperty = E;
3572
3572
  function p(g) {
3573
3573
  return e.has(g, "categoryMatchesMap");
3574
3574
  }
3575
3575
  i.hasExtendingTokensTypesMapProperty = p;
3576
- function E(g) {
3576
+ function m(g) {
3577
3577
  return e.has(g, "tokenTypeIdx");
3578
3578
  }
3579
- i.isTokenType = E;
3579
+ i.isTokenType = m;
3580
3580
  }), ur = ve((i) => {
3581
3581
  Object.defineProperty(i, "__esModule", { value: !0 }), i.defaultLexerErrorProvider = void 0, i.defaultLexerErrorProvider = { buildUnableToPopLexerModeMessage: function(e) {
3582
3582
  return "Unable to pop Lexer Mode after encountering Token ->" + e.image + "<- The Mode Stack is empty";
@@ -3598,15 +3598,15 @@ See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;
3598
3598
  if (h === void 0 && (h = o), this.lexerDefinition = a, this.lexerDefinitionErrors = [], this.lexerDefinitionWarning = [], this.patternIdxToConfig = {}, this.charCodeToPatternIdxToConfig = {}, this.modes = [], this.emptyGroups = {}, this.config = void 0, this.trackStartLines = !0, this.trackEndLines = !0, this.hasCustom = !1, this.canModeBeOptimized = {}, typeof h == "boolean") throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object.
3599
3599
  a boolean 2nd argument is no longer supported`);
3600
3600
  this.config = t.merge(o, h);
3601
- var m = this.config.traceInitPerf;
3602
- m === !0 ? (this.traceInitMaxIdent = 1 / 0, this.traceInitPerf = !0) : typeof m == "number" && (this.traceInitMaxIdent = m, this.traceInitPerf = !0), this.traceInitIndent = -1, this.TRACE_INIT("Lexer Constructor", function() {
3603
- var p, E = !0;
3601
+ var E = this.config.traceInitPerf;
3602
+ E === !0 ? (this.traceInitMaxIdent = 1 / 0, this.traceInitPerf = !0) : typeof E == "number" && (this.traceInitMaxIdent = E, this.traceInitPerf = !0), this.traceInitIndent = -1, this.TRACE_INIT("Lexer Constructor", function() {
3603
+ var p, m = !0;
3604
3604
  u.TRACE_INIT("Lexer Config handling", function() {
3605
3605
  if (u.config.lineTerminatorsPattern === o.lineTerminatorsPattern) u.config.lineTerminatorsPattern = e.LineTerminatorOptimizedTester;
3606
3606
  else if (u.config.lineTerminatorCharacters === o.lineTerminatorCharacters) throw Error(`Error: Missing <lineTerminatorCharacters> property on the Lexer config.
3607
3607
  For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);
3608
3608
  if (h.safeMode && h.ensureOptimizations) throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');
3609
- u.trackStartLines = /full|onlyStart/i.test(u.config.positionTracking), u.trackEndLines = /full/i.test(u.config.positionTracking), t.isArray(a) ? (p = { modes: {} }, p.modes[e.DEFAULT_MODE] = t.cloneArr(a), p[e.DEFAULT_MODE] = e.DEFAULT_MODE) : (E = !1, p = t.cloneObj(a));
3609
+ u.trackStartLines = /full|onlyStart/i.test(u.config.positionTracking), u.trackEndLines = /full/i.test(u.config.positionTracking), t.isArray(a) ? (p = { modes: {} }, p.modes[e.DEFAULT_MODE] = t.cloneArr(a), p[e.DEFAULT_MODE] = e.DEFAULT_MODE) : (m = !1, p = t.cloneObj(a));
3610
3610
  }), u.config.skipValidations === !1 && (u.TRACE_INIT("performRuntimeChecks", function() {
3611
3611
  u.lexerDefinitionErrors = u.lexerDefinitionErrors.concat(e.performRuntimeChecks(p, u.trackStartLines, u.config.lineTerminatorCharacters));
3612
3612
  }), u.TRACE_INIT("performWarningRuntimeChecks", function() {
@@ -3640,7 +3640,7 @@ a boolean 2nd argument is no longer supported`);
3640
3640
  t.forEach(u.lexerDefinitionWarning, function(f) {
3641
3641
  t.PRINT_WARNING(f.message);
3642
3642
  }), u.TRACE_INIT("Choosing sub-methods implementations", function() {
3643
- if (e.SUPPORT_STICKY ? (u.chopInput = t.IDENTITY, u.match = u.matchWithTest) : (u.updateLastIndex = t.NOOP, u.match = u.matchWithExec), E && (u.handleModes = t.NOOP), u.trackStartLines === !1 && (u.computeNewColumn = t.IDENTITY), u.trackEndLines === !1 && (u.updateTokenEndLineColumnLocation = t.NOOP), /full/i.test(u.config.positionTracking)) u.createTokenInstance = u.createFullToken;
3643
+ if (e.SUPPORT_STICKY ? (u.chopInput = t.IDENTITY, u.match = u.matchWithTest) : (u.updateLastIndex = t.NOOP, u.match = u.matchWithExec), m && (u.handleModes = t.NOOP), u.trackStartLines === !1 && (u.computeNewColumn = t.IDENTITY), u.trackEndLines === !1 && (u.updateTokenEndLineColumnLocation = t.NOOP), /full/i.test(u.config.positionTracking)) u.createTokenInstance = u.createFullToken;
3644
3644
  else if (/onlyStart/i.test(u.config.positionTracking)) u.createTokenInstance = u.createStartOnlyToken;
3645
3645
  else if (/onlyOffset/i.test(u.config.positionTracking)) u.createTokenInstance = u.createOffsetOnlyToken;
3646
3646
  else throw Error('Invalid <positionTracking> config option: "' + u.config.positionTracking + '"');
@@ -3661,17 +3661,17 @@ a boolean 2nd argument is no longer supported`);
3661
3661
  }
3662
3662
  return A.prototype.tokenize = function(a, h) {
3663
3663
  if (h === void 0 && (h = this.defaultMode), !t.isEmpty(this.lexerDefinitionErrors)) {
3664
- var u = t.map(this.lexerDefinitionErrors, function(E) {
3665
- return E.message;
3666
- }), m = u.join(`-----------------------
3664
+ var u = t.map(this.lexerDefinitionErrors, function(m) {
3665
+ return m.message;
3666
+ }), E = u.join(`-----------------------
3667
3667
  `);
3668
3668
  throw new Error(`Unable to Tokenize because Errors detected in definition of Lexer:
3669
- ` + m);
3669
+ ` + E);
3670
3670
  }
3671
3671
  var p = this.tokenizeInternal(a, h);
3672
3672
  return p;
3673
3673
  }, A.prototype.tokenizeInternal = function(a, h) {
3674
- var u = this, m, p, E, g, l, d, f, b, I, C, v, x, j, R, M = a, _ = M.length, T = 0, N = 0, L = this.hasCustom ? 0 : Math.floor(a.length / 10), J = new Array(L), X = [], z = this.trackStartLines ? 1 : void 0, Z = this.trackStartLines ? 1 : void 0, ne = e.cloneEmptyGroups(this.emptyGroups), le = this.trackStartLines, oe = this.config.lineTerminatorsPattern, se = 0, $ = [], he = [], P = [], U = [];
3674
+ var u = this, E, p, m, g, l, d, f, b, I, C, v, x, j, R, M = a, _ = M.length, T = 0, N = 0, L = this.hasCustom ? 0 : Math.floor(a.length / 10), J = new Array(L), X = [], z = this.trackStartLines ? 1 : void 0, Z = this.trackStartLines ? 1 : void 0, ne = e.cloneEmptyGroups(this.emptyGroups), le = this.trackStartLines, oe = this.config.lineTerminatorsPattern, se = 0, $ = [], he = [], P = [], U = [];
3675
3675
  Object.freeze(U);
3676
3676
  var W = void 0;
3677
3677
  function q() {
@@ -3702,15 +3702,15 @@ a boolean 2nd argument is no longer supported`);
3702
3702
  for (var Be; T < _; ) {
3703
3703
  l = null;
3704
3704
  var Ne = M.charCodeAt(T), ze = W(Ne), et = ze.length;
3705
- for (m = 0; m < et; m++) {
3706
- Be = ze[m];
3705
+ for (E = 0; E < et; E++) {
3706
+ Be = ze[E];
3707
3707
  var Ke = Be.pattern;
3708
3708
  d = null;
3709
3709
  var F = Be.short;
3710
3710
  if (F !== !1 ? Ne === F && (l = Ke) : Be.isCustom === !0 ? (R = Ke.exec(M, T, J, ne), R !== null ? (l = R[0], R.payload !== void 0 && (d = R.payload)) : l = null) : (this.updateLastIndex(Ke, T), l = this.match(Ke, a, T)), l !== null) {
3711
3711
  if (g = Be.longerAlt, g !== void 0) {
3712
3712
  var Y = $[g], H = Y.pattern;
3713
- f = null, Y.isCustom === !0 ? (R = H.exec(M, T, J, ne), R !== null ? (E = R[0], R.payload !== void 0 && (f = R.payload)) : E = null) : (this.updateLastIndex(H, T), E = this.match(H, a, T)), E && E.length > l.length && (l = E, d = f, Be = Y);
3713
+ f = null, Y.isCustom === !0 ? (R = H.exec(M, T, J, ne), R !== null ? (m = R[0], R.payload !== void 0 && (f = R.payload)) : m = null) : (this.updateLastIndex(H, T), m = this.match(H, a, T)), m && m.length > l.length && (l = m, d = f, Be = Y);
3714
3714
  }
3715
3715
  break;
3716
3716
  }
@@ -3734,29 +3734,29 @@ a boolean 2nd argument is no longer supported`);
3734
3734
  }
3735
3735
  }
3736
3736
  return this.hasCustom || (J.length = N), { tokens: J, groups: ne, errors: X };
3737
- }, A.prototype.handleModes = function(a, h, u, m) {
3737
+ }, A.prototype.handleModes = function(a, h, u, E) {
3738
3738
  if (a.pop === !0) {
3739
3739
  var p = a.push;
3740
- h(m), p !== void 0 && u.call(this, p);
3740
+ h(E), p !== void 0 && u.call(this, p);
3741
3741
  } else a.push !== void 0 && u.call(this, a.push);
3742
3742
  }, A.prototype.chopInput = function(a, h) {
3743
3743
  return a.substring(h);
3744
3744
  }, A.prototype.updateLastIndex = function(a, h) {
3745
3745
  a.lastIndex = h;
3746
- }, A.prototype.updateTokenEndLineColumnLocation = function(a, h, u, m, p, E, g) {
3746
+ }, A.prototype.updateTokenEndLineColumnLocation = function(a, h, u, E, p, m, g) {
3747
3747
  var l, d;
3748
- h !== void 0 && (l = u === g - 1, d = l ? -1 : 0, m === 1 && l === !0 || (a.endLine = p + d, a.endColumn = E - 1 + -d));
3748
+ h !== void 0 && (l = u === g - 1, d = l ? -1 : 0, E === 1 && l === !0 || (a.endLine = p + d, a.endColumn = m - 1 + -d));
3749
3749
  }, A.prototype.computeNewColumn = function(a, h) {
3750
3750
  return a + h;
3751
3751
  }, A.prototype.createTokenInstance = function() {
3752
3752
  for (var a = [], h = 0; h < arguments.length; h++) a[h] = arguments[h];
3753
3753
  return null;
3754
- }, A.prototype.createOffsetOnlyToken = function(a, h, u, m) {
3755
- return { image: a, startOffset: h, tokenTypeIdx: u, tokenType: m };
3756
- }, A.prototype.createStartOnlyToken = function(a, h, u, m, p, E) {
3757
- return { image: a, startOffset: h, startLine: p, startColumn: E, tokenTypeIdx: u, tokenType: m };
3758
- }, A.prototype.createFullToken = function(a, h, u, m, p, E, g) {
3759
- return { image: a, startOffset: h, endOffset: h + g - 1, startLine: p, endLine: p, startColumn: E, endColumn: E + g - 1, tokenTypeIdx: u, tokenType: m };
3754
+ }, A.prototype.createOffsetOnlyToken = function(a, h, u, E) {
3755
+ return { image: a, startOffset: h, tokenTypeIdx: u, tokenType: E };
3756
+ }, A.prototype.createStartOnlyToken = function(a, h, u, E, p, m) {
3757
+ return { image: a, startOffset: h, startLine: p, startColumn: m, tokenTypeIdx: u, tokenType: E };
3758
+ }, A.prototype.createFullToken = function(a, h, u, E, p, m, g) {
3759
+ return { image: a, startOffset: h, endOffset: h + g - 1, startLine: p, endLine: p, startColumn: m, endColumn: m + g - 1, tokenTypeIdx: u, tokenType: E };
3760
3760
  }, A.prototype.addToken = function(a, h, u) {
3761
3761
  return 666;
3762
3762
  }, A.prototype.addTokenUsingPush = function(a, h, u) {
@@ -3770,8 +3770,8 @@ a boolean 2nd argument is no longer supported`);
3770
3770
  }, A.prototype.match = function(a, h, u) {
3771
3771
  return null;
3772
3772
  }, A.prototype.matchWithTest = function(a, h, u) {
3773
- var m = a.test(h);
3774
- return m === !0 ? h.substring(u, a.lastIndex) : null;
3773
+ var E = a.test(h);
3774
+ return E === !0 ? h.substring(u, a.lastIndex) : null;
3775
3775
  }, A.prototype.matchWithExec = function(a, h) {
3776
3776
  var u = a.exec(h);
3777
3777
  return u !== null ? u[0] : u;
@@ -3780,8 +3780,8 @@ a boolean 2nd argument is no longer supported`);
3780
3780
  this.traceInitIndent++;
3781
3781
  var u = new Array(this.traceInitIndent + 1).join(" ");
3782
3782
  this.traceInitIndent < this.traceInitMaxIdent && console.log(u + "--> <" + a + ">");
3783
- var m = t.timer(h), p = m.time, E = m.value, g = p > 10 ? console.warn : console.log;
3784
- return this.traceInitIndent < this.traceInitMaxIdent && g(u + "<-- <" + a + "> time: " + p + "ms"), this.traceInitIndent--, E;
3783
+ var E = t.timer(h), p = E.time, m = E.value, g = p > 10 ? console.warn : console.log;
3784
+ return this.traceInitIndent < this.traceInitMaxIdent && g(u + "<-- <" + a + "> time: " + p + "ms"), this.traceInitIndent--, m;
3785
3785
  } else return h();
3786
3786
  }, A.SKIPPED = "This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.", A.NA = /NOT_APPLICABLE/, A;
3787
3787
  })();
@@ -3801,7 +3801,7 @@ a boolean 2nd argument is no longer supported`);
3801
3801
  return e.isString(I.LABEL) && I.LABEL !== "";
3802
3802
  }
3803
3803
  i.hasTokenLabel = o;
3804
- var c = "parent", A = "categories", a = "label", h = "group", u = "push_mode", m = "pop_mode", p = "longer_alt", E = "line_breaks", g = "start_chars_hint";
3804
+ var c = "parent", A = "categories", a = "label", h = "group", u = "push_mode", E = "pop_mode", p = "longer_alt", m = "line_breaks", g = "start_chars_hint";
3805
3805
  function l(I) {
3806
3806
  return d(I);
3807
3807
  }
@@ -3810,7 +3810,7 @@ a boolean 2nd argument is no longer supported`);
3810
3810
  var C = I.pattern, v = {};
3811
3811
  if (v.name = I.name, e.isUndefined(C) || (v.PATTERN = C), e.has(I, c)) throw `The parent property is no longer supported.
3812
3812
  See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;
3813
- return e.has(I, A) && (v.CATEGORIES = I[A]), n.augmentTokenTypes([v]), e.has(I, a) && (v.LABEL = I[a]), e.has(I, h) && (v.GROUP = I[h]), e.has(I, m) && (v.POP_MODE = I[m]), e.has(I, u) && (v.PUSH_MODE = I[u]), e.has(I, p) && (v.LONGER_ALT = I[p]), e.has(I, E) && (v.LINE_BREAKS = I[E]), e.has(I, g) && (v.START_CHARS_HINT = I[g]), v;
3813
+ return e.has(I, A) && (v.CATEGORIES = I[A]), n.augmentTokenTypes([v]), e.has(I, a) && (v.LABEL = I[a]), e.has(I, h) && (v.GROUP = I[h]), e.has(I, E) && (v.POP_MODE = I[E]), e.has(I, u) && (v.PUSH_MODE = I[u]), e.has(I, p) && (v.LONGER_ALT = I[p]), e.has(I, m) && (v.LINE_BREAKS = I[m]), e.has(I, g) && (v.START_CHARS_HINT = I[g]), v;
3814
3814
  }
3815
3815
  i.EOF = l({ name: "EOF", pattern: t.Lexer.NA }), n.augmentTokenTypes([i.EOF]);
3816
3816
  function f(I, C, v, x, j, R, M, _) {
@@ -3937,7 +3937,7 @@ See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346
3937
3937
  return f;
3938
3938
  })(r);
3939
3939
  i.Repetition = u;
3940
- var m = (function(d) {
3940
+ var E = (function(d) {
3941
3941
  e(f, d);
3942
3942
  function f(b) {
3943
3943
  var I = d.call(this, b.definition) || this;
@@ -3947,7 +3947,7 @@ See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346
3947
3947
  }
3948
3948
  return f;
3949
3949
  })(r);
3950
- i.RepetitionWithSeparator = m;
3950
+ i.RepetitionWithSeparator = E;
3951
3951
  var p = (function(d) {
3952
3952
  e(f, d);
3953
3953
  function f(b) {
@@ -3963,7 +3963,7 @@ See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346
3963
3963
  }, enumerable: !1, configurable: !0 }), f;
3964
3964
  })(r);
3965
3965
  i.Alternation = p;
3966
- var E = (function() {
3966
+ var m = (function() {
3967
3967
  function d(f) {
3968
3968
  this.idx = 1, t.assign(this, t.pick(f, function(b) {
3969
3969
  return b !== void 0;
@@ -3973,7 +3973,7 @@ See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346
3973
3973
  f.visit(this);
3974
3974
  }, d;
3975
3975
  })();
3976
- i.Terminal = E;
3976
+ i.Terminal = m;
3977
3977
  function g(d) {
3978
3978
  return t.map(d, l);
3979
3979
  }
@@ -3986,11 +3986,11 @@ See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346
3986
3986
  if (d instanceof c) return { type: "Alternative", definition: f(d.definition) };
3987
3987
  if (d instanceof A) return { type: "Option", idx: d.idx, definition: f(d.definition) };
3988
3988
  if (d instanceof a) return { type: "RepetitionMandatory", idx: d.idx, definition: f(d.definition) };
3989
- if (d instanceof h) return { type: "RepetitionMandatoryWithSeparator", idx: d.idx, separator: l(new E({ terminalType: d.separator })), definition: f(d.definition) };
3990
- if (d instanceof m) return { type: "RepetitionWithSeparator", idx: d.idx, separator: l(new E({ terminalType: d.separator })), definition: f(d.definition) };
3989
+ if (d instanceof h) return { type: "RepetitionMandatoryWithSeparator", idx: d.idx, separator: l(new m({ terminalType: d.separator })), definition: f(d.definition) };
3990
+ if (d instanceof E) return { type: "RepetitionWithSeparator", idx: d.idx, separator: l(new m({ terminalType: d.separator })), definition: f(d.definition) };
3991
3991
  if (d instanceof u) return { type: "Repetition", idx: d.idx, definition: f(d.definition) };
3992
3992
  if (d instanceof p) return { type: "Alternation", idx: d.idx, definition: f(d.definition) };
3993
- if (d instanceof E) {
3993
+ if (d instanceof m) {
3994
3994
  var b = { type: "Terminal", name: d.terminalType.name, label: n.tokenLabel(d.terminalType), idx: d.idx }, I = d.terminalType.PATTERN;
3995
3995
  return d.terminalType.PATTERN && (b.pattern = t.isRegExp(I) ? I.source : I), b;
3996
3996
  } else {
@@ -4042,8 +4042,8 @@ See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346
4042
4042
  }, s.prototype.walkOr = function(o, c, A) {
4043
4043
  var a = this, h = c.concat(A);
4044
4044
  e.forEach(o.definition, function(u) {
4045
- var m = new t.Alternative({ definition: [u] });
4046
- a.walk(m, h);
4045
+ var E = new t.Alternative({ definition: [u] });
4046
+ a.walk(E, h);
4047
4047
  });
4048
4048
  }, s;
4049
4049
  })();
@@ -4098,86 +4098,86 @@ See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346
4098
4098
  i.GAstVisitor = t;
4099
4099
  }), pn = ve((i) => {
4100
4100
  var e = i && i.__extends || /* @__PURE__ */ (function() {
4101
- var m = function(p, E) {
4102
- return m = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(g, l) {
4101
+ var E = function(p, m) {
4102
+ return E = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(g, l) {
4103
4103
  g.__proto__ = l;
4104
4104
  } || function(g, l) {
4105
4105
  for (var d in l) Object.prototype.hasOwnProperty.call(l, d) && (g[d] = l[d]);
4106
- }, m(p, E);
4106
+ }, E(p, m);
4107
4107
  };
4108
- return function(p, E) {
4109
- if (typeof E != "function" && E !== null) throw new TypeError("Class extends value " + String(E) + " is not a constructor or null");
4110
- m(p, E);
4108
+ return function(p, m) {
4109
+ if (typeof m != "function" && m !== null) throw new TypeError("Class extends value " + String(m) + " is not a constructor or null");
4110
+ E(p, m);
4111
4111
  function g() {
4112
4112
  this.constructor = p;
4113
4113
  }
4114
- p.prototype = E === null ? Object.create(E) : (g.prototype = E.prototype, new g());
4114
+ p.prototype = m === null ? Object.create(m) : (g.prototype = m.prototype, new g());
4115
4115
  };
4116
4116
  })();
4117
4117
  Object.defineProperty(i, "__esModule", { value: !0 }), i.collectMethods = i.DslMethodsCollectorVisitor = i.getProductionDslName = i.isBranchingProd = i.isOptionalProd = i.isSequenceProd = void 0;
4118
4118
  var t = Fe(), n = nt(), r = en();
4119
- function s(m) {
4120
- return m instanceof n.Alternative || m instanceof n.Option || m instanceof n.Repetition || m instanceof n.RepetitionMandatory || m instanceof n.RepetitionMandatoryWithSeparator || m instanceof n.RepetitionWithSeparator || m instanceof n.Terminal || m instanceof n.Rule;
4119
+ function s(E) {
4120
+ return E instanceof n.Alternative || E instanceof n.Option || E instanceof n.Repetition || E instanceof n.RepetitionMandatory || E instanceof n.RepetitionMandatoryWithSeparator || E instanceof n.RepetitionWithSeparator || E instanceof n.Terminal || E instanceof n.Rule;
4121
4121
  }
4122
4122
  i.isSequenceProd = s;
4123
- function o(m, p) {
4123
+ function o(E, p) {
4124
4124
  p === void 0 && (p = []);
4125
- var E = m instanceof n.Option || m instanceof n.Repetition || m instanceof n.RepetitionWithSeparator;
4126
- return E ? !0 : m instanceof n.Alternation ? t.some(m.definition, function(g) {
4125
+ var m = E instanceof n.Option || E instanceof n.Repetition || E instanceof n.RepetitionWithSeparator;
4126
+ return m ? !0 : E instanceof n.Alternation ? t.some(E.definition, function(g) {
4127
4127
  return o(g, p);
4128
- }) : m instanceof n.NonTerminal && t.contains(p, m) ? !1 : m instanceof n.AbstractProduction ? (m instanceof n.NonTerminal && p.push(m), t.every(m.definition, function(g) {
4128
+ }) : E instanceof n.NonTerminal && t.contains(p, E) ? !1 : E instanceof n.AbstractProduction ? (E instanceof n.NonTerminal && p.push(E), t.every(E.definition, function(g) {
4129
4129
  return o(g, p);
4130
4130
  })) : !1;
4131
4131
  }
4132
4132
  i.isOptionalProd = o;
4133
- function c(m) {
4134
- return m instanceof n.Alternation;
4133
+ function c(E) {
4134
+ return E instanceof n.Alternation;
4135
4135
  }
4136
4136
  i.isBranchingProd = c;
4137
- function A(m) {
4138
- if (m instanceof n.NonTerminal) return "SUBRULE";
4139
- if (m instanceof n.Option) return "OPTION";
4140
- if (m instanceof n.Alternation) return "OR";
4141
- if (m instanceof n.RepetitionMandatory) return "AT_LEAST_ONE";
4142
- if (m instanceof n.RepetitionMandatoryWithSeparator) return "AT_LEAST_ONE_SEP";
4143
- if (m instanceof n.RepetitionWithSeparator) return "MANY_SEP";
4144
- if (m instanceof n.Repetition) return "MANY";
4145
- if (m instanceof n.Terminal) return "CONSUME";
4137
+ function A(E) {
4138
+ if (E instanceof n.NonTerminal) return "SUBRULE";
4139
+ if (E instanceof n.Option) return "OPTION";
4140
+ if (E instanceof n.Alternation) return "OR";
4141
+ if (E instanceof n.RepetitionMandatory) return "AT_LEAST_ONE";
4142
+ if (E instanceof n.RepetitionMandatoryWithSeparator) return "AT_LEAST_ONE_SEP";
4143
+ if (E instanceof n.RepetitionWithSeparator) return "MANY_SEP";
4144
+ if (E instanceof n.Repetition) return "MANY";
4145
+ if (E instanceof n.Terminal) return "CONSUME";
4146
4146
  throw Error("non exhaustive match");
4147
4147
  }
4148
4148
  i.getProductionDslName = A;
4149
- var a = (function(m) {
4150
- e(p, m);
4149
+ var a = (function(E) {
4150
+ e(p, E);
4151
4151
  function p() {
4152
- var E = m !== null && m.apply(this, arguments) || this;
4153
- return E.separator = "-", E.dslMethods = { option: [], alternation: [], repetition: [], repetitionWithSeparator: [], repetitionMandatory: [], repetitionMandatoryWithSeparator: [] }, E;
4152
+ var m = E !== null && E.apply(this, arguments) || this;
4153
+ return m.separator = "-", m.dslMethods = { option: [], alternation: [], repetition: [], repetitionWithSeparator: [], repetitionMandatory: [], repetitionMandatoryWithSeparator: [] }, m;
4154
4154
  }
4155
4155
  return p.prototype.reset = function() {
4156
4156
  this.dslMethods = { option: [], alternation: [], repetition: [], repetitionWithSeparator: [], repetitionMandatory: [], repetitionMandatoryWithSeparator: [] };
4157
- }, p.prototype.visitTerminal = function(E) {
4158
- var g = E.terminalType.name + this.separator + "Terminal";
4159
- t.has(this.dslMethods, g) || (this.dslMethods[g] = []), this.dslMethods[g].push(E);
4160
- }, p.prototype.visitNonTerminal = function(E) {
4161
- var g = E.nonTerminalName + this.separator + "Terminal";
4162
- t.has(this.dslMethods, g) || (this.dslMethods[g] = []), this.dslMethods[g].push(E);
4163
- }, p.prototype.visitOption = function(E) {
4164
- this.dslMethods.option.push(E);
4165
- }, p.prototype.visitRepetitionWithSeparator = function(E) {
4166
- this.dslMethods.repetitionWithSeparator.push(E);
4167
- }, p.prototype.visitRepetitionMandatory = function(E) {
4168
- this.dslMethods.repetitionMandatory.push(E);
4169
- }, p.prototype.visitRepetitionMandatoryWithSeparator = function(E) {
4170
- this.dslMethods.repetitionMandatoryWithSeparator.push(E);
4171
- }, p.prototype.visitRepetition = function(E) {
4172
- this.dslMethods.repetition.push(E);
4173
- }, p.prototype.visitAlternation = function(E) {
4174
- this.dslMethods.alternation.push(E);
4157
+ }, p.prototype.visitTerminal = function(m) {
4158
+ var g = m.terminalType.name + this.separator + "Terminal";
4159
+ t.has(this.dslMethods, g) || (this.dslMethods[g] = []), this.dslMethods[g].push(m);
4160
+ }, p.prototype.visitNonTerminal = function(m) {
4161
+ var g = m.nonTerminalName + this.separator + "Terminal";
4162
+ t.has(this.dslMethods, g) || (this.dslMethods[g] = []), this.dslMethods[g].push(m);
4163
+ }, p.prototype.visitOption = function(m) {
4164
+ this.dslMethods.option.push(m);
4165
+ }, p.prototype.visitRepetitionWithSeparator = function(m) {
4166
+ this.dslMethods.repetitionWithSeparator.push(m);
4167
+ }, p.prototype.visitRepetitionMandatory = function(m) {
4168
+ this.dslMethods.repetitionMandatory.push(m);
4169
+ }, p.prototype.visitRepetitionMandatoryWithSeparator = function(m) {
4170
+ this.dslMethods.repetitionMandatoryWithSeparator.push(m);
4171
+ }, p.prototype.visitRepetition = function(m) {
4172
+ this.dslMethods.repetition.push(m);
4173
+ }, p.prototype.visitAlternation = function(m) {
4174
+ this.dslMethods.alternation.push(m);
4175
4175
  }, p;
4176
4176
  })(r.GAstVisitor);
4177
4177
  i.DslMethodsCollectorVisitor = a;
4178
4178
  var h = new a();
4179
- function u(m) {
4180
- h.reset(), m.accept(h);
4179
+ function u(E) {
4180
+ h.reset(), E.accept(h);
4181
4181
  var p = h.dslMethods;
4182
4182
  return h.reset(), p;
4183
4183
  }
@@ -4194,7 +4194,7 @@ See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346
4194
4194
  }
4195
4195
  i.first = r;
4196
4196
  function s(A) {
4197
- for (var a = [], h = A.definition, u = 0, m = h.length > u, p, E = !0; m && E; ) p = h[u], E = n.isOptionalProd(p), a = a.concat(r(p)), u = u + 1, m = h.length > u;
4197
+ for (var a = [], h = A.definition, u = 0, E = h.length > u, p, m = !0; E && m; ) p = h[u], m = n.isOptionalProd(p), a = a.concat(r(p)), u = u + 1, E = h.length > u;
4198
4198
  return e.uniq(a);
4199
4199
  }
4200
4200
  i.firstForSequence = s;
@@ -4213,53 +4213,53 @@ See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346
4213
4213
  Object.defineProperty(i, "__esModule", { value: !0 }), i.IN = void 0, i.IN = "_~IN~_";
4214
4214
  }), jo = ve((i) => {
4215
4215
  var e = i && i.__extends || /* @__PURE__ */ (function() {
4216
- var u = function(m, p) {
4217
- return u = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(E, g) {
4218
- E.__proto__ = g;
4219
- } || function(E, g) {
4220
- for (var l in g) Object.prototype.hasOwnProperty.call(g, l) && (E[l] = g[l]);
4221
- }, u(m, p);
4216
+ var u = function(E, p) {
4217
+ return u = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(m, g) {
4218
+ m.__proto__ = g;
4219
+ } || function(m, g) {
4220
+ for (var l in g) Object.prototype.hasOwnProperty.call(g, l) && (m[l] = g[l]);
4221
+ }, u(E, p);
4222
4222
  };
4223
- return function(m, p) {
4223
+ return function(E, p) {
4224
4224
  if (typeof p != "function" && p !== null) throw new TypeError("Class extends value " + String(p) + " is not a constructor or null");
4225
- u(m, p);
4226
- function E() {
4227
- this.constructor = m;
4225
+ u(E, p);
4226
+ function m() {
4227
+ this.constructor = E;
4228
4228
  }
4229
- m.prototype = p === null ? Object.create(p) : (E.prototype = p.prototype, new E());
4229
+ E.prototype = p === null ? Object.create(p) : (m.prototype = p.prototype, new m());
4230
4230
  };
4231
4231
  })();
4232
4232
  Object.defineProperty(i, "__esModule", { value: !0 }), i.buildInProdFollowPrefix = i.buildBetweenProdsFollowPrefix = i.computeAllProdsFollows = i.ResyncFollowsWalker = void 0;
4233
4233
  var t = ii(), n = hr(), r = Fe(), s = dr(), o = nt(), c = (function(u) {
4234
- e(m, u);
4235
- function m(p) {
4236
- var E = u.call(this) || this;
4237
- return E.topProd = p, E.follows = {}, E;
4234
+ e(E, u);
4235
+ function E(p) {
4236
+ var m = u.call(this) || this;
4237
+ return m.topProd = p, m.follows = {}, m;
4238
4238
  }
4239
- return m.prototype.startWalking = function() {
4239
+ return E.prototype.startWalking = function() {
4240
4240
  return this.walk(this.topProd), this.follows;
4241
- }, m.prototype.walkTerminal = function(p, E, g) {
4242
- }, m.prototype.walkProdRef = function(p, E, g) {
4243
- var l = a(p.referencedRule, p.idx) + this.topProd.name, d = E.concat(g), f = new o.Alternative({ definition: d }), b = n.first(f);
4241
+ }, E.prototype.walkTerminal = function(p, m, g) {
4242
+ }, E.prototype.walkProdRef = function(p, m, g) {
4243
+ var l = a(p.referencedRule, p.idx) + this.topProd.name, d = m.concat(g), f = new o.Alternative({ definition: d }), b = n.first(f);
4244
4244
  this.follows[l] = b;
4245
- }, m;
4245
+ }, E;
4246
4246
  })(t.RestWalker);
4247
4247
  i.ResyncFollowsWalker = c;
4248
4248
  function A(u) {
4249
- var m = {};
4249
+ var E = {};
4250
4250
  return r.forEach(u, function(p) {
4251
- var E = new c(p).startWalking();
4252
- r.assign(m, E);
4253
- }), m;
4251
+ var m = new c(p).startWalking();
4252
+ r.assign(E, m);
4253
+ }), E;
4254
4254
  }
4255
4255
  i.computeAllProdsFollows = A;
4256
- function a(u, m) {
4257
- return u.name + m + s.IN;
4256
+ function a(u, E) {
4257
+ return u.name + E + s.IN;
4258
4258
  }
4259
4259
  i.buildBetweenProdsFollowPrefix = a;
4260
4260
  function h(u) {
4261
- var m = u.terminalType.name;
4262
- return m + u.idx + s.IN;
4261
+ var E = u.terminalType.name;
4262
+ return E + u.idx + s.IN;
4263
4263
  }
4264
4264
  i.buildInProdFollowPrefix = h;
4265
4265
  }), gn = ve((i) => {
@@ -4278,34 +4278,34 @@ See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346
4278
4278
  o.previous;
4279
4279
  var a = o.customUserDescription;
4280
4280
  o.ruleName;
4281
- var h = "Expecting: ", u = n.first(A).image, m = `
4281
+ var h = "Expecting: ", u = n.first(A).image, E = `
4282
4282
  but found: '` + u + "'";
4283
- if (a) return h + a + m;
4283
+ if (a) return h + a + E;
4284
4284
  var p = n.reduce(c, function(d, f) {
4285
4285
  return d.concat(f);
4286
- }, []), E = n.map(p, function(d) {
4286
+ }, []), m = n.map(p, function(d) {
4287
4287
  return "[" + n.map(d, function(f) {
4288
4288
  return e.tokenLabel(f);
4289
4289
  }).join(", ") + "]";
4290
- }), g = n.map(E, function(d, f) {
4290
+ }), g = n.map(m, function(d, f) {
4291
4291
  return " " + (f + 1) + ". " + d;
4292
4292
  }), l = `one of these possible Token sequences:
4293
4293
  ` + g.join(`
4294
4294
  `);
4295
- return h + l + m;
4295
+ return h + l + E;
4296
4296
  }, buildEarlyExitMessage: function(o) {
4297
4297
  var c = o.expectedIterationPaths, A = o.actual, a = o.customUserDescription;
4298
4298
  o.ruleName;
4299
- var h = "Expecting: ", u = n.first(A).image, m = `
4299
+ var h = "Expecting: ", u = n.first(A).image, E = `
4300
4300
  but found: '` + u + "'";
4301
- if (a) return h + a + m;
4301
+ if (a) return h + a + E;
4302
4302
  var p = n.map(c, function(g) {
4303
4303
  return "[" + n.map(g, function(l) {
4304
4304
  return e.tokenLabel(l);
4305
4305
  }).join(",") + "]";
4306
- }), E = `expecting at least one iteration which starts with one of these possible Token sequences::
4306
+ }), m = `expecting at least one iteration which starts with one of these possible Token sequences::
4307
4307
  ` + ("<" + p.join(" ,") + ">");
4308
- return h + E + m;
4308
+ return h + m + E;
4309
4309
  } }, Object.freeze(i.defaultParserErrorProvider), i.defaultGrammarResolverErrorProvider = { buildRuleNotFoundError: function(o, c) {
4310
4310
  var A = "Invalid grammar, reference to a rule which is not defined: ->" + c.nonTerminalName + `<-
4311
4311
  inside top level rule: ->` + o.name + "<-";
@@ -4314,7 +4314,7 @@ inside top level rule: ->` + o.name + "<-";
4314
4314
  function A(l) {
4315
4315
  return l instanceof r.Terminal ? l.terminalType.name : l instanceof r.NonTerminal ? l.nonTerminalName : "";
4316
4316
  }
4317
- var a = o.name, h = n.first(c), u = h.idx, m = s.getProductionDslName(h), p = A(h), E = u > 0, g = "->" + m + (E ? u : "") + "<- " + (p ? "with argument: ->" + p + "<-" : "") + `
4317
+ var a = o.name, h = n.first(c), u = h.idx, E = s.getProductionDslName(h), p = A(h), m = u > 0, g = "->" + E + (m ? u : "") + "<- " + (p ? "with argument: ->" + p + "<-" : "") + `
4318
4318
  appears more than once (` + c.length + " times) in the top level rule: ->" + a + `<-.
4319
4319
  For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES
4320
4320
  `;
@@ -4385,7 +4385,7 @@ see: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring.`;
4385
4385
  return c = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(h, u) {
4386
4386
  h.__proto__ = u;
4387
4387
  } || function(h, u) {
4388
- for (var m in u) Object.prototype.hasOwnProperty.call(u, m) && (h[m] = u[m]);
4388
+ for (var E in u) Object.prototype.hasOwnProperty.call(u, E) && (h[E] = u[E]);
4389
4389
  }, c(A, a);
4390
4390
  };
4391
4391
  return function(A, a) {
@@ -4529,7 +4529,7 @@ see: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring.`;
4529
4529
  }, d;
4530
4530
  })(A);
4531
4531
  i.NextTerminalAfterAtLeastOneWalker = u;
4532
- var m = (function(l) {
4532
+ var E = (function(l) {
4533
4533
  e(d, l);
4534
4534
  function d() {
4535
4535
  return l !== null && l.apply(this, arguments) || this;
@@ -4541,7 +4541,7 @@ see: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring.`;
4541
4541
  } else l.prototype.walkAtLeastOneSep.call(this, f, b, I);
4542
4542
  }, d;
4543
4543
  })(A);
4544
- i.NextTerminalAfterAtLeastOneSepWalker = m;
4544
+ i.NextTerminalAfterAtLeastOneSepWalker = E;
4545
4545
  function p(l, d, f) {
4546
4546
  f === void 0 && (f = []), f = n.cloneArr(f);
4547
4547
  var b = [], I = 0;
@@ -4580,7 +4580,7 @@ see: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring.`;
4580
4580
  return b.push({ partialPath: f, suffixDef: n.drop(l, I) }), b;
4581
4581
  }
4582
4582
  i.possiblePathsFrom = p;
4583
- function E(l, d, f, b) {
4583
+ function m(l, d, f, b) {
4584
4584
  var I = "EXIT_NONE_TERMINAL", C = [I], v = "EXIT_ALTERNATIVE", x = !1, j = d.length, R = j - b - 1, M = [], _ = [];
4585
4585
  for (_.push({ idx: -1, def: l, ruleStack: [], occurrenceStack: [] }); !n.isEmpty(_); ) {
4586
4586
  var T = _.pop();
@@ -4641,7 +4641,7 @@ see: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring.`;
4641
4641
  }
4642
4642
  return M;
4643
4643
  }
4644
- i.nextPossibleTokensAfter = E;
4644
+ i.nextPossibleTokensAfter = m;
4645
4645
  function g(l, d, f, b) {
4646
4646
  var I = n.cloneArr(f);
4647
4647
  I.push(l.name);
@@ -4691,7 +4691,7 @@ see: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring.`;
4691
4691
  return L(J[0], X, T);
4692
4692
  }
4693
4693
  i.buildLookaheadFuncForOptionalProd = u;
4694
- function m(R, M, _, T) {
4694
+ function E(R, M, _, T) {
4695
4695
  var N = R.length, L = t.every(R, function(z) {
4696
4696
  return t.every(z, function(Z) {
4697
4697
  return Z.length === 1;
@@ -4739,7 +4739,7 @@ see: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring.`;
4739
4739
  }
4740
4740
  };
4741
4741
  }
4742
- i.buildAlternativesLookAheadFunc = m;
4742
+ i.buildAlternativesLookAheadFunc = E;
4743
4743
  function p(R, M, _) {
4744
4744
  var T = t.every(R, function(Z) {
4745
4745
  return Z.length === 1;
@@ -4774,7 +4774,7 @@ see: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring.`;
4774
4774
  };
4775
4775
  }
4776
4776
  i.buildSingleAlternativeLookaheadFunction = p;
4777
- var E = (function(R) {
4777
+ var m = (function(R) {
4778
4778
  e(M, R);
4779
4779
  function M(_, T, N) {
4780
4780
  var L = R.call(this) || this;
@@ -4891,7 +4891,7 @@ see: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring.`;
4891
4891
  function C(R, M, _, T) {
4892
4892
  var N = new g(R, _);
4893
4893
  M.accept(N);
4894
- var L = N.result, J = new E(M, R, _), X = J.startWalking(), z = new o.Alternative({ definition: L }), Z = new o.Alternative({ definition: X });
4894
+ var L = N.result, J = new m(M, R, _), X = J.startWalking(), z = new o.Alternative({ definition: L }), Z = new o.Alternative({ definition: X });
4895
4895
  return b([z, Z], T);
4896
4896
  }
4897
4897
  i.getLookaheadPathsForOptionalProd = C;
@@ -4966,9 +4966,9 @@ see: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring.`;
4966
4966
  }
4967
4967
  i.validateGrammar = h;
4968
4968
  function u(T, N) {
4969
- var L = new E();
4969
+ var L = new m();
4970
4970
  T.accept(L);
4971
- var J = L.allProductions, X = t.groupBy(J, m), z = t.pick(X, function(ne) {
4971
+ var J = L.allProductions, X = t.groupBy(J, E), z = t.pick(X, function(ne) {
4972
4972
  return ne.length > 1;
4973
4973
  }), Z = t.map(t.values(z), function(ne) {
4974
4974
  var le = t.first(ne), oe = N.buildDuplicateFoundError(T, ne), se = s.getProductionDslName(le), $ = { message: oe, type: r.ParserDefinitionErrorType.DUPLICATE_PRODUCTIONS, ruleName: T.name, dslName: se, occurrence: le.idx }, he = p(le);
@@ -4976,14 +4976,14 @@ see: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring.`;
4976
4976
  });
4977
4977
  return Z;
4978
4978
  }
4979
- function m(T) {
4979
+ function E(T) {
4980
4980
  return s.getProductionDslName(T) + "_#_" + T.idx + "_#_" + p(T);
4981
4981
  }
4982
- i.identifyProductionForDuplicates = m;
4982
+ i.identifyProductionForDuplicates = E;
4983
4983
  function p(T) {
4984
4984
  return T instanceof A.Terminal ? T.terminalType.name : T instanceof A.NonTerminal ? T.nonTerminalName : "";
4985
4985
  }
4986
- var E = (function(T) {
4986
+ var m = (function(T) {
4987
4987
  e(N, T);
4988
4988
  function N() {
4989
4989
  var L = T !== null && T.apply(this, arguments) || this;
@@ -5007,7 +5007,7 @@ see: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring.`;
5007
5007
  this.allProductions.push(L);
5008
5008
  }, N;
5009
5009
  })(a.GAstVisitor);
5010
- i.OccurrenceValidationCollector = E;
5010
+ i.OccurrenceValidationCollector = m;
5011
5011
  function g(T, N, L, J) {
5012
5012
  var X = [], z = n.reduce(N, function(ne, le) {
5013
5013
  return le.name === T.name ? ne + 1 : ne;
@@ -5199,16 +5199,16 @@ see: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring.`;
5199
5199
  i.validateGrammar = o;
5200
5200
  }), tn = ve((i) => {
5201
5201
  var e = i && i.__extends || /* @__PURE__ */ (function() {
5202
- var E = function(g, l) {
5203
- return E = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, f) {
5202
+ var m = function(g, l) {
5203
+ return m = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, f) {
5204
5204
  d.__proto__ = f;
5205
5205
  } || function(d, f) {
5206
5206
  for (var b in f) Object.prototype.hasOwnProperty.call(f, b) && (d[b] = f[b]);
5207
- }, E(g, l);
5207
+ }, m(g, l);
5208
5208
  };
5209
5209
  return function(g, l) {
5210
5210
  if (typeof l != "function" && l !== null) throw new TypeError("Class extends value " + String(l) + " is not a constructor or null");
5211
- E(g, l);
5211
+ m(g, l);
5212
5212
  function d() {
5213
5213
  this.constructor = g;
5214
5214
  }
@@ -5218,48 +5218,48 @@ see: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring.`;
5218
5218
  Object.defineProperty(i, "__esModule", { value: !0 }), i.EarlyExitException = i.NotAllInputParsedException = i.NoViableAltException = i.MismatchedTokenException = i.isRecognitionException = void 0;
5219
5219
  var t = Fe(), n = "MismatchedTokenException", r = "NoViableAltException", s = "EarlyExitException", o = "NotAllInputParsedException", c = [n, r, s, o];
5220
5220
  Object.freeze(c);
5221
- function A(E) {
5222
- return t.contains(c, E.name);
5221
+ function A(m) {
5222
+ return t.contains(c, m.name);
5223
5223
  }
5224
5224
  i.isRecognitionException = A;
5225
- var a = (function(E) {
5226
- e(g, E);
5225
+ var a = (function(m) {
5226
+ e(g, m);
5227
5227
  function g(l, d) {
5228
- var f = this.constructor, b = E.call(this, l) || this;
5228
+ var f = this.constructor, b = m.call(this, l) || this;
5229
5229
  return b.token = d, b.resyncedTokens = [], Object.setPrototypeOf(b, f.prototype), Error.captureStackTrace && Error.captureStackTrace(b, b.constructor), b;
5230
5230
  }
5231
5231
  return g;
5232
- })(Error), h = (function(E) {
5233
- e(g, E);
5232
+ })(Error), h = (function(m) {
5233
+ e(g, m);
5234
5234
  function g(l, d, f) {
5235
- var b = E.call(this, l, d) || this;
5235
+ var b = m.call(this, l, d) || this;
5236
5236
  return b.previousToken = f, b.name = n, b;
5237
5237
  }
5238
5238
  return g;
5239
5239
  })(a);
5240
5240
  i.MismatchedTokenException = h;
5241
- var u = (function(E) {
5242
- e(g, E);
5241
+ var u = (function(m) {
5242
+ e(g, m);
5243
5243
  function g(l, d, f) {
5244
- var b = E.call(this, l, d) || this;
5244
+ var b = m.call(this, l, d) || this;
5245
5245
  return b.previousToken = f, b.name = r, b;
5246
5246
  }
5247
5247
  return g;
5248
5248
  })(a);
5249
5249
  i.NoViableAltException = u;
5250
- var m = (function(E) {
5251
- e(g, E);
5250
+ var E = (function(m) {
5251
+ e(g, m);
5252
5252
  function g(l, d) {
5253
- var f = E.call(this, l, d) || this;
5253
+ var f = m.call(this, l, d) || this;
5254
5254
  return f.name = o, f;
5255
5255
  }
5256
5256
  return g;
5257
5257
  })(a);
5258
- i.NotAllInputParsedException = m;
5259
- var p = (function(E) {
5260
- e(g, E);
5258
+ i.NotAllInputParsedException = E;
5259
+ var p = (function(m) {
5260
+ e(g, m);
5261
5261
  function g(l, d, f) {
5262
- var b = E.call(this, l, d) || this;
5262
+ var b = m.call(this, l, d) || this;
5263
5263
  return b.previousToken = f, b.name = s, b;
5264
5264
  }
5265
5265
  return g;
@@ -5283,27 +5283,27 @@ see: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring.`;
5283
5283
  return u.isInsertedInRecovery = !0, u;
5284
5284
  }, a.prototype.canTokenTypeBeInsertedInRecovery = function(h) {
5285
5285
  return !0;
5286
- }, a.prototype.tryInRepetitionRecovery = function(h, u, m, p) {
5287
- for (var E = this, g = this.findReSyncTokenType(), l = this.exportLexerState(), d = [], f = !1, b = this.LA(1), I = this.LA(1), C = function() {
5288
- var v = E.LA(0), x = E.errorMessageProvider.buildMismatchTokenMessage({ expected: p, actual: b, previous: v, ruleName: E.getCurrRuleFullName() }), j = new n.MismatchedTokenException(x, b, E.LA(0));
5289
- j.resyncedTokens = t.dropRight(d), E.SAVE_ERROR(j);
5286
+ }, a.prototype.tryInRepetitionRecovery = function(h, u, E, p) {
5287
+ for (var m = this, g = this.findReSyncTokenType(), l = this.exportLexerState(), d = [], f = !1, b = this.LA(1), I = this.LA(1), C = function() {
5288
+ var v = m.LA(0), x = m.errorMessageProvider.buildMismatchTokenMessage({ expected: p, actual: b, previous: v, ruleName: m.getCurrRuleFullName() }), j = new n.MismatchedTokenException(x, b, m.LA(0));
5289
+ j.resyncedTokens = t.dropRight(d), m.SAVE_ERROR(j);
5290
5290
  }; !f; ) if (this.tokenMatcher(I, p)) {
5291
5291
  C();
5292
5292
  return;
5293
- } else if (m.call(this)) {
5293
+ } else if (E.call(this)) {
5294
5294
  C(), h.apply(this, u);
5295
5295
  return;
5296
5296
  } else this.tokenMatcher(I, g) ? f = !0 : (I = this.SKIP_TOKEN(), this.addToResyncTokens(I, d));
5297
5297
  this.importLexerState(l);
5298
- }, a.prototype.shouldInRepetitionRecoveryBeTried = function(h, u, m) {
5299
- return !(m === !1 || h === void 0 || u === void 0 || this.tokenMatcher(this.LA(1), h) || this.isBackTracking() || this.canPerformInRuleRecovery(h, this.getFollowsForInRuleRecovery(h, u)));
5298
+ }, a.prototype.shouldInRepetitionRecoveryBeTried = function(h, u, E) {
5299
+ return !(E === !1 || h === void 0 || u === void 0 || this.tokenMatcher(this.LA(1), h) || this.isBackTracking() || this.canPerformInRuleRecovery(h, this.getFollowsForInRuleRecovery(h, u)));
5300
5300
  }, a.prototype.getFollowsForInRuleRecovery = function(h, u) {
5301
- var m = this.getCurrentGrammarPath(h, u), p = this.getNextPossibleTokenTypes(m);
5301
+ var E = this.getCurrentGrammarPath(h, u), p = this.getNextPossibleTokenTypes(E);
5302
5302
  return p;
5303
5303
  }, a.prototype.tryInRuleRecovery = function(h, u) {
5304
5304
  if (this.canRecoverWithSingleTokenInsertion(h, u)) {
5305
- var m = this.getTokenToInsert(h);
5306
- return m;
5305
+ var E = this.getTokenToInsert(h);
5306
+ return E;
5307
5307
  }
5308
5308
  if (this.canRecoverWithSingleTokenDeletion(h)) {
5309
5309
  var p = this.SKIP_TOKEN();
@@ -5313,36 +5313,36 @@ see: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring.`;
5313
5313
  }, a.prototype.canPerformInRuleRecovery = function(h, u) {
5314
5314
  return this.canRecoverWithSingleTokenInsertion(h, u) || this.canRecoverWithSingleTokenDeletion(h);
5315
5315
  }, a.prototype.canRecoverWithSingleTokenInsertion = function(h, u) {
5316
- var m = this;
5316
+ var E = this;
5317
5317
  if (!this.canTokenTypeBeInsertedInRecovery(h) || t.isEmpty(u)) return !1;
5318
- var p = this.LA(1), E = t.find(u, function(g) {
5319
- return m.tokenMatcher(p, g);
5318
+ var p = this.LA(1), m = t.find(u, function(g) {
5319
+ return E.tokenMatcher(p, g);
5320
5320
  }) !== void 0;
5321
- return E;
5321
+ return m;
5322
5322
  }, a.prototype.canRecoverWithSingleTokenDeletion = function(h) {
5323
5323
  var u = this.tokenMatcher(this.LA(2), h);
5324
5324
  return u;
5325
5325
  }, a.prototype.isInCurrentRuleReSyncSet = function(h) {
5326
- var u = this.getCurrFollowKey(), m = this.getFollowSetFromFollowKey(u);
5327
- return t.contains(m, h);
5326
+ var u = this.getCurrFollowKey(), E = this.getFollowSetFromFollowKey(u);
5327
+ return t.contains(E, h);
5328
5328
  }, a.prototype.findReSyncTokenType = function() {
5329
- for (var h = this.flattenFollowSet(), u = this.LA(1), m = 2; ; ) {
5329
+ for (var h = this.flattenFollowSet(), u = this.LA(1), E = 2; ; ) {
5330
5330
  var p = u.tokenType;
5331
5331
  if (t.contains(h, p)) return p;
5332
- u = this.LA(m), m++;
5332
+ u = this.LA(E), E++;
5333
5333
  }
5334
5334
  }, a.prototype.getCurrFollowKey = function() {
5335
5335
  if (this.RULE_STACK.length === 1) return i.EOF_FOLLOW_KEY;
5336
- var h = this.getLastExplicitRuleShortName(), u = this.getLastExplicitRuleOccurrenceIndex(), m = this.getPreviousExplicitRuleShortName();
5337
- return { ruleName: this.shortRuleNameToFullName(h), idxInCallingRule: u, inRule: this.shortRuleNameToFullName(m) };
5336
+ var h = this.getLastExplicitRuleShortName(), u = this.getLastExplicitRuleOccurrenceIndex(), E = this.getPreviousExplicitRuleShortName();
5337
+ return { ruleName: this.shortRuleNameToFullName(h), idxInCallingRule: u, inRule: this.shortRuleNameToFullName(E) };
5338
5338
  }, a.prototype.buildFullFollowKeyStack = function() {
5339
- var h = this, u = this.RULE_STACK, m = this.RULE_OCCURRENCE_STACK;
5340
- return t.map(u, function(p, E) {
5341
- return E === 0 ? i.EOF_FOLLOW_KEY : { ruleName: h.shortRuleNameToFullName(p), idxInCallingRule: m[E], inRule: h.shortRuleNameToFullName(u[E - 1]) };
5339
+ var h = this, u = this.RULE_STACK, E = this.RULE_OCCURRENCE_STACK;
5340
+ return t.map(u, function(p, m) {
5341
+ return m === 0 ? i.EOF_FOLLOW_KEY : { ruleName: h.shortRuleNameToFullName(p), idxInCallingRule: E[m], inRule: h.shortRuleNameToFullName(u[m - 1]) };
5342
5342
  });
5343
5343
  }, a.prototype.flattenFollowSet = function() {
5344
- var h = this, u = t.map(this.buildFullFollowKeyStack(), function(m) {
5345
- return h.getFollowSetFromFollowKey(m);
5344
+ var h = this, u = t.map(this.buildFullFollowKeyStack(), function(E) {
5345
+ return h.getFollowSetFromFollowKey(E);
5346
5346
  });
5347
5347
  return t.flatten(u);
5348
5348
  }, a.prototype.getFollowSetFromFollowKey = function(h) {
@@ -5352,12 +5352,12 @@ see: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring.`;
5352
5352
  }, a.prototype.addToResyncTokens = function(h, u) {
5353
5353
  return this.tokenMatcher(h, e.EOF) || u.push(h), u;
5354
5354
  }, a.prototype.reSyncTo = function(h) {
5355
- for (var u = [], m = this.LA(1); this.tokenMatcher(m, h) === !1; ) m = this.SKIP_TOKEN(), this.addToResyncTokens(m, u);
5355
+ for (var u = [], E = this.LA(1); this.tokenMatcher(E, h) === !1; ) E = this.SKIP_TOKEN(), this.addToResyncTokens(E, u);
5356
5356
  return t.dropRight(u);
5357
- }, a.prototype.attemptInRepetitionRecovery = function(h, u, m, p, E, g, l) {
5357
+ }, a.prototype.attemptInRepetitionRecovery = function(h, u, E, p, m, g, l) {
5358
5358
  }, a.prototype.getCurrentGrammarPath = function(h, u) {
5359
- var m = this.getHumanReadableRuleStack(), p = t.cloneArr(this.RULE_OCCURRENCE_STACK), E = { ruleStack: m, occurrenceStack: p, lastTok: h, lastTokOccurrence: u };
5360
- return E;
5359
+ var E = this.getHumanReadableRuleStack(), p = t.cloneArr(this.RULE_OCCURRENCE_STACK), m = { ruleStack: E, occurrenceStack: p, lastTok: h, lastTokOccurrence: u };
5360
+ return m;
5361
5361
  }, a.prototype.getHumanReadableRuleStack = function() {
5362
5362
  var h = this;
5363
5363
  return t.map(this.RULE_STACK, function(u) {
@@ -5366,10 +5366,10 @@ see: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring.`;
5366
5366
  }, a;
5367
5367
  })();
5368
5368
  i.Recoverable = c;
5369
- function A(a, h, u, m, p, E, g) {
5370
- var l = this.getKeyForAutomaticLookahead(m, p), d = this.firstAfterRepMap[l];
5369
+ function A(a, h, u, E, p, m, g) {
5370
+ var l = this.getKeyForAutomaticLookahead(E, p), d = this.firstAfterRepMap[l];
5371
5371
  if (d === void 0) {
5372
- var f = this.getCurrRuleFullName(), b = this.getGAstProductions()[f], I = new E(b, p);
5372
+ var f = this.getCurrRuleFullName(), b = this.getGAstProductions()[f], I = new m(b, p);
5373
5373
  d = I.startWalking(), this.firstAfterRepMap[l] = d;
5374
5374
  }
5375
5375
  var C = d.token, v = d.occurrence, x = d.isEndOfRule;
@@ -5393,8 +5393,8 @@ see: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring.`;
5393
5393
  var a = this;
5394
5394
  t.forEach(A, function(h) {
5395
5395
  a.TRACE_INIT(h.name + " Rule Lookahead", function() {
5396
- var u = s.collectMethods(h), m = u.alternation, p = u.repetition, E = u.option, g = u.repetitionMandatory, l = u.repetitionMandatoryWithSeparator, d = u.repetitionWithSeparator;
5397
- t.forEach(m, function(f) {
5396
+ var u = s.collectMethods(h), E = u.alternation, p = u.repetition, m = u.option, g = u.repetitionMandatory, l = u.repetitionMandatoryWithSeparator, d = u.repetitionWithSeparator;
5397
+ t.forEach(E, function(f) {
5398
5398
  var b = f.idx === 0 ? "" : f.idx;
5399
5399
  a.TRACE_INIT("" + s.getProductionDslName(f) + b, function() {
5400
5400
  var I = e.buildLookaheadFuncForOr(f.idx, h, f.maxLookahead || a.maxLookahead, f.hasPredicates, a.dynamicTokensEnabled, a.lookAheadBuilderForAlternatives), C = r.getKeyForAutomaticLookahead(a.fullRuleNameToShort[h.name], r.OR_IDX, f.idx);
@@ -5402,7 +5402,7 @@ see: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring.`;
5402
5402
  });
5403
5403
  }), t.forEach(p, function(f) {
5404
5404
  a.computeLookaheadFunc(h, f.idx, r.MANY_IDX, e.PROD_TYPE.REPETITION, f.maxLookahead, s.getProductionDslName(f));
5405
- }), t.forEach(E, function(f) {
5405
+ }), t.forEach(m, function(f) {
5406
5406
  a.computeLookaheadFunc(h, f.idx, r.OPTION_IDX, e.PROD_TYPE.OPTION, f.maxLookahead, s.getProductionDslName(f));
5407
5407
  }), t.forEach(g, function(f) {
5408
5408
  a.computeLookaheadFunc(h, f.idx, r.AT_LEAST_ONE_IDX, e.PROD_TYPE.REPETITION_MANDATORY, f.maxLookahead, s.getProductionDslName(f));
@@ -5413,11 +5413,11 @@ see: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring.`;
5413
5413
  });
5414
5414
  });
5415
5415
  });
5416
- }, c.prototype.computeLookaheadFunc = function(A, a, h, u, m, p) {
5417
- var E = this;
5416
+ }, c.prototype.computeLookaheadFunc = function(A, a, h, u, E, p) {
5417
+ var m = this;
5418
5418
  this.TRACE_INIT("" + p + (a === 0 ? "" : a), function() {
5419
- var g = e.buildLookaheadFuncForOptionalProd(a, A, m || E.maxLookahead, E.dynamicTokensEnabled, u, E.lookAheadBuilderForOptional), l = r.getKeyForAutomaticLookahead(E.fullRuleNameToShort[A.name], h, a);
5420
- E.setLaFuncCache(l, g);
5419
+ var g = e.buildLookaheadFuncForOptionalProd(a, A, E || m.maxLookahead, m.dynamicTokensEnabled, u, m.lookAheadBuilderForOptional), l = r.getKeyForAutomaticLookahead(m.fullRuleNameToShort[A.name], h, a);
5420
+ m.setLaFuncCache(l, g);
5421
5421
  });
5422
5422
  }, c.prototype.lookAheadBuilderForOptional = function(A, a, h) {
5423
5423
  return e.buildSingleAlternativeLookaheadFunction(A, a, h);
@@ -5478,21 +5478,21 @@ see: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring.`;
5478
5478
  }), Vo = ve((i) => {
5479
5479
  Object.defineProperty(i, "__esModule", { value: !0 }), i.validateRedundantMethods = i.validateMissingCstMethods = i.validateVisitor = i.CstVisitorDefinitionError = i.createBaseVisitorConstructorWithDefaults = i.createBaseSemanticVisitorConstructor = i.defaultVisit = void 0;
5480
5480
  var e = Fe(), t = gr();
5481
- function n(u, m) {
5482
- for (var p = e.keys(u), E = p.length, g = 0; g < E; g++) for (var l = p[g], d = u[l], f = d.length, b = 0; b < f; b++) {
5481
+ function n(u, E) {
5482
+ for (var p = e.keys(u), m = p.length, g = 0; g < m; g++) for (var l = p[g], d = u[l], f = d.length, b = 0; b < f; b++) {
5483
5483
  var I = d[b];
5484
- I.tokenTypeIdx === void 0 && this[I.name](I.children, m);
5484
+ I.tokenTypeIdx === void 0 && this[I.name](I.children, E);
5485
5485
  }
5486
5486
  }
5487
5487
  i.defaultVisit = n;
5488
- function r(u, m) {
5488
+ function r(u, E) {
5489
5489
  var p = function() {
5490
5490
  };
5491
5491
  t.defineNameProp(p, u + "BaseSemantics");
5492
- var E = { visit: function(g, l) {
5492
+ var m = { visit: function(g, l) {
5493
5493
  if (e.isArray(g) && (g = g[0]), !e.isUndefined(g)) return this[g.name](g.children, l);
5494
5494
  }, validateVisitor: function() {
5495
- var g = c(this, m);
5495
+ var g = c(this, E);
5496
5496
  if (!e.isEmpty(g)) {
5497
5497
  var l = e.map(g, function(d) {
5498
5498
  return d.msg;
@@ -5504,41 +5504,41 @@ see: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring.`;
5504
5504
  `)));
5505
5505
  }
5506
5506
  } };
5507
- return p.prototype = E, p.prototype.constructor = p, p._RULE_NAMES = m, p;
5507
+ return p.prototype = m, p.prototype.constructor = p, p._RULE_NAMES = E, p;
5508
5508
  }
5509
5509
  i.createBaseSemanticVisitorConstructor = r;
5510
- function s(u, m, p) {
5511
- var E = function() {
5510
+ function s(u, E, p) {
5511
+ var m = function() {
5512
5512
  };
5513
- t.defineNameProp(E, u + "BaseSemanticsWithDefaults");
5513
+ t.defineNameProp(m, u + "BaseSemanticsWithDefaults");
5514
5514
  var g = Object.create(p.prototype);
5515
- return e.forEach(m, function(l) {
5515
+ return e.forEach(E, function(l) {
5516
5516
  g[l] = n;
5517
- }), E.prototype = g, E.prototype.constructor = E, E;
5517
+ }), m.prototype = g, m.prototype.constructor = m, m;
5518
5518
  }
5519
5519
  i.createBaseVisitorConstructorWithDefaults = s;
5520
5520
  var o;
5521
5521
  (function(u) {
5522
5522
  u[u.REDUNDANT_METHOD = 0] = "REDUNDANT_METHOD", u[u.MISSING_METHOD = 1] = "MISSING_METHOD";
5523
5523
  })(o = i.CstVisitorDefinitionError || (i.CstVisitorDefinitionError = {}));
5524
- function c(u, m) {
5525
- var p = A(u, m), E = h(u, m);
5526
- return p.concat(E);
5524
+ function c(u, E) {
5525
+ var p = A(u, E), m = h(u, E);
5526
+ return p.concat(m);
5527
5527
  }
5528
5528
  i.validateVisitor = c;
5529
- function A(u, m) {
5530
- var p = e.map(m, function(E) {
5531
- if (!e.isFunction(u[E])) return { msg: "Missing visitor method: <" + E + "> on " + t.functionName(u.constructor) + " CST Visitor.", type: o.MISSING_METHOD, methodName: E };
5529
+ function A(u, E) {
5530
+ var p = e.map(E, function(m) {
5531
+ if (!e.isFunction(u[m])) return { msg: "Missing visitor method: <" + m + "> on " + t.functionName(u.constructor) + " CST Visitor.", type: o.MISSING_METHOD, methodName: m };
5532
5532
  });
5533
5533
  return e.compact(p);
5534
5534
  }
5535
5535
  i.validateMissingCstMethods = A;
5536
5536
  var a = ["constructor", "visit", "validateVisitor"];
5537
- function h(u, m) {
5537
+ function h(u, E) {
5538
5538
  var p = [];
5539
- for (var E in u) e.isFunction(u[E]) && !e.contains(a, E) && !e.contains(m, E) && p.push({ msg: "Redundant visitor method: <" + E + "> on " + t.functionName(u.constructor) + ` CST Visitor
5539
+ for (var m in u) e.isFunction(u[m]) && !e.contains(a, m) && !e.contains(E, m) && p.push({ msg: "Redundant visitor method: <" + m + "> on " + t.functionName(u.constructor) + ` CST Visitor
5540
5540
  There is no Grammar Rule corresponding to this method's name.
5541
- `, type: o.REDUNDANT_METHOD, methodName: E });
5541
+ `, type: o.REDUNDANT_METHOD, methodName: m });
5542
5542
  return p;
5543
5543
  }
5544
5544
  i.validateRedundantMethods = h;
@@ -5816,16 +5816,16 @@ There is no Grammar Rule corresponding to this method's name.
5816
5816
  this.atLeastOneSepFirstInternal(9, a);
5817
5817
  }, A.prototype.RULE = function(a, h, u) {
5818
5818
  if (u === void 0 && (u = n.DEFAULT_RULE_CONFIG), e.contains(this.definedRulesNames, a)) {
5819
- var m = r.defaultGrammarValidatorErrorProvider.buildDuplicateRuleNameError({ topLevelRule: a, grammarName: this.className }), p = { message: m, type: n.ParserDefinitionErrorType.DUPLICATE_RULE_NAME, ruleName: a };
5819
+ var E = r.defaultGrammarValidatorErrorProvider.buildDuplicateRuleNameError({ topLevelRule: a, grammarName: this.className }), p = { message: E, type: n.ParserDefinitionErrorType.DUPLICATE_RULE_NAME, ruleName: a };
5820
5820
  this.definitionErrors.push(p);
5821
5821
  }
5822
5822
  this.definedRulesNames.push(a);
5823
- var E = this.defineRule(a, h, u);
5824
- return this[a] = E, E;
5823
+ var m = this.defineRule(a, h, u);
5824
+ return this[a] = m, m;
5825
5825
  }, A.prototype.OVERRIDE_RULE = function(a, h, u) {
5826
5826
  u === void 0 && (u = n.DEFAULT_RULE_CONFIG);
5827
- var m = [];
5828
- m = m.concat(s.validateRuleIsOverridden(a, this.definedRulesNames, this.className)), this.definitionErrors = this.definitionErrors.concat(m);
5827
+ var E = [];
5828
+ E = E.concat(s.validateRuleIsOverridden(a, this.definedRulesNames, this.className)), this.definitionErrors = this.definitionErrors.concat(E);
5829
5829
  var p = this.defineRule(a, h, u);
5830
5830
  return this[a] = p, p;
5831
5831
  }, A.prototype.BACKTRACK = function(a, h) {
@@ -5834,9 +5834,9 @@ There is no Grammar Rule corresponding to this method's name.
5834
5834
  var u = this.saveRecogState();
5835
5835
  try {
5836
5836
  return a.apply(this, h), !0;
5837
- } catch (m) {
5838
- if (t.isRecognitionException(m)) return !1;
5839
- throw m;
5837
+ } catch (E) {
5838
+ if (t.isRecognitionException(E)) return !1;
5839
+ throw E;
5840
5840
  } finally {
5841
5841
  this.reloadRecogState(u), this.isBackTrackingStack.pop();
5842
5842
  }
@@ -5851,10 +5851,10 @@ There is no Grammar Rule corresponding to this method's name.
5851
5851
  }), Xo = ve((i) => {
5852
5852
  Object.defineProperty(i, "__esModule", { value: !0 }), i.RecognizerEngine = void 0;
5853
5853
  var e = Fe(), t = ri(), n = tn(), r = En(), s = mn(), o = st(), c = pr(), A = St(), a = $t(), h = gr(), u = (function() {
5854
- function m() {
5854
+ function E() {
5855
5855
  }
5856
- return m.prototype.initRecognizerEngine = function(p, E) {
5857
- if (this.className = h.classNameFromInstance(this), this.shortRuleNameToFull = {}, this.fullRuleNameToShort = {}, this.ruleShortNameIdx = 256, this.tokenMatcher = a.tokenStructuredMatcherNoCategories, this.definedRulesNames = [], this.tokensMap = {}, this.isBackTrackingStack = [], this.RULE_STACK = [], this.RULE_OCCURRENCE_STACK = [], this.gastProductionsCache = {}, e.has(E, "serializedGrammar")) throw Error(`The Parser's configuration can no longer contain a <serializedGrammar> property.
5856
+ return E.prototype.initRecognizerEngine = function(p, m) {
5857
+ if (this.className = h.classNameFromInstance(this), this.shortRuleNameToFull = {}, this.fullRuleNameToShort = {}, this.ruleShortNameIdx = 256, this.tokenMatcher = a.tokenStructuredMatcherNoCategories, this.definedRulesNames = [], this.tokensMap = {}, this.isBackTrackingStack = [], this.RULE_STACK = [], this.RULE_OCCURRENCE_STACK = [], this.gastProductionsCache = {}, e.has(m, "serializedGrammar")) throw Error(`The Parser's configuration can no longer contain a <serializedGrammar> property.
5858
5858
  See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0
5859
5859
  For Further details.`);
5860
5860
  if (e.isArray(p)) {
@@ -5880,7 +5880,7 @@ There is no Grammar Rule corresponding to this method's name.
5880
5880
  return e.isEmpty(f.categoryMatches);
5881
5881
  });
5882
5882
  this.tokenMatcher = d ? a.tokenStructuredMatcherNoCategories : a.tokenStructuredMatcher, a.augmentTokenTypes(e.values(this.tokensMap));
5883
- }, m.prototype.defineRule = function(p, E, g) {
5883
+ }, E.prototype.defineRule = function(p, m, g) {
5884
5884
  if (this.selfAnalysisDone) throw Error("Grammar rule <" + p + `> may not be defined after the 'performSelfAnalysis' method has been called'
5885
5885
  Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);
5886
5886
  var l = e.has(g, "resyncEnabled") ? g.resyncEnabled : o.DEFAULT_RULE_CONFIG.resyncEnabled, d = e.has(g, "recoveryValueFunc") ? g.recoveryValueFunc : o.DEFAULT_RULE_CONFIG.recoveryValueFunc, f = this.ruleShortNameIdx << t.BITS_FOR_METHOD_TYPE + t.BITS_FOR_OCCURRENCE_IDX;
@@ -5888,10 +5888,10 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
5888
5888
  function b(v) {
5889
5889
  try {
5890
5890
  if (this.outputCst === !0) {
5891
- E.apply(this, v);
5891
+ m.apply(this, v);
5892
5892
  var x = this.CST_STACK[this.CST_STACK.length - 1];
5893
5893
  return this.cstPostRule(x), x;
5894
- } else return E.apply(this, v);
5894
+ } else return m.apply(this, v);
5895
5895
  } catch (j) {
5896
5896
  return this.invokeRuleCatch(j, l, d);
5897
5897
  } finally {
@@ -5901,9 +5901,9 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
5901
5901
  var I = function(v, x) {
5902
5902
  return v === void 0 && (v = 0), this.ruleInvocationStateUpdate(f, p, v), b.call(this, x);
5903
5903
  }, C = "ruleName";
5904
- return I[C] = p, I.originalGrammarAction = E, I;
5905
- }, m.prototype.invokeRuleCatch = function(p, E, g) {
5906
- var l = this.RULE_STACK.length === 1, d = E && !this.isBackTracking() && this.recoveryEnabled;
5904
+ return I[C] = p, I.originalGrammarAction = m, I;
5905
+ }, E.prototype.invokeRuleCatch = function(p, m, g) {
5906
+ var l = this.RULE_STACK.length === 1, d = m && !this.isBackTracking() && this.recoveryEnabled;
5907
5907
  if (n.isRecognitionException(p)) {
5908
5908
  var f = p;
5909
5909
  if (d) {
@@ -5924,10 +5924,10 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
5924
5924
  throw f;
5925
5925
  }
5926
5926
  } else throw p;
5927
- }, m.prototype.optionInternal = function(p, E) {
5928
- var g = this.getKeyForAutomaticLookahead(t.OPTION_IDX, E);
5929
- return this.optionInternalLogic(p, E, g);
5930
- }, m.prototype.optionInternalLogic = function(p, E, g) {
5927
+ }, E.prototype.optionInternal = function(p, m) {
5928
+ var g = this.getKeyForAutomaticLookahead(t.OPTION_IDX, m);
5929
+ return this.optionInternalLogic(p, m, g);
5930
+ }, E.prototype.optionInternalLogic = function(p, m, g) {
5931
5931
  var l = this, d = this.getLaFuncFromCache(g), f, b;
5932
5932
  if (p.DEF !== void 0) {
5933
5933
  if (f = p.DEF, b = p.GATE, b !== void 0) {
@@ -5938,54 +5938,54 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
5938
5938
  }
5939
5939
  } else f = p;
5940
5940
  if (d.call(this) === !0) return f.call(this);
5941
- }, m.prototype.atLeastOneInternal = function(p, E) {
5941
+ }, E.prototype.atLeastOneInternal = function(p, m) {
5942
5942
  var g = this.getKeyForAutomaticLookahead(t.AT_LEAST_ONE_IDX, p);
5943
- return this.atLeastOneInternalLogic(p, E, g);
5944
- }, m.prototype.atLeastOneInternalLogic = function(p, E, g) {
5943
+ return this.atLeastOneInternalLogic(p, m, g);
5944
+ }, E.prototype.atLeastOneInternalLogic = function(p, m, g) {
5945
5945
  var l = this, d = this.getLaFuncFromCache(g), f, b;
5946
- if (E.DEF !== void 0) {
5947
- if (f = E.DEF, b = E.GATE, b !== void 0) {
5946
+ if (m.DEF !== void 0) {
5947
+ if (f = m.DEF, b = m.GATE, b !== void 0) {
5948
5948
  var I = d;
5949
5949
  d = function() {
5950
5950
  return b.call(l) && I.call(l);
5951
5951
  };
5952
5952
  }
5953
- } else f = E;
5953
+ } else f = m;
5954
5954
  if (d.call(this) === !0) for (var C = this.doSingleRepetition(f); d.call(this) === !0 && C === !0; ) C = this.doSingleRepetition(f);
5955
- else throw this.raiseEarlyExitException(p, r.PROD_TYPE.REPETITION_MANDATORY, E.ERR_MSG);
5956
- this.attemptInRepetitionRecovery(this.atLeastOneInternal, [p, E], d, t.AT_LEAST_ONE_IDX, p, s.NextTerminalAfterAtLeastOneWalker);
5957
- }, m.prototype.atLeastOneSepFirstInternal = function(p, E) {
5955
+ else throw this.raiseEarlyExitException(p, r.PROD_TYPE.REPETITION_MANDATORY, m.ERR_MSG);
5956
+ this.attemptInRepetitionRecovery(this.atLeastOneInternal, [p, m], d, t.AT_LEAST_ONE_IDX, p, s.NextTerminalAfterAtLeastOneWalker);
5957
+ }, E.prototype.atLeastOneSepFirstInternal = function(p, m) {
5958
5958
  var g = this.getKeyForAutomaticLookahead(t.AT_LEAST_ONE_SEP_IDX, p);
5959
- this.atLeastOneSepFirstInternalLogic(p, E, g);
5960
- }, m.prototype.atLeastOneSepFirstInternalLogic = function(p, E, g) {
5961
- var l = this, d = E.DEF, f = E.SEP, b = this.getLaFuncFromCache(g);
5959
+ this.atLeastOneSepFirstInternalLogic(p, m, g);
5960
+ }, E.prototype.atLeastOneSepFirstInternalLogic = function(p, m, g) {
5961
+ var l = this, d = m.DEF, f = m.SEP, b = this.getLaFuncFromCache(g);
5962
5962
  if (b.call(this) === !0) {
5963
5963
  d.call(this);
5964
5964
  for (var I = function() {
5965
5965
  return l.tokenMatcher(l.LA(1), f);
5966
5966
  }; this.tokenMatcher(this.LA(1), f) === !0; ) this.CONSUME(f), d.call(this);
5967
5967
  this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal, [p, f, I, d, s.NextTerminalAfterAtLeastOneSepWalker], I, t.AT_LEAST_ONE_SEP_IDX, p, s.NextTerminalAfterAtLeastOneSepWalker);
5968
- } else throw this.raiseEarlyExitException(p, r.PROD_TYPE.REPETITION_MANDATORY_WITH_SEPARATOR, E.ERR_MSG);
5969
- }, m.prototype.manyInternal = function(p, E) {
5968
+ } else throw this.raiseEarlyExitException(p, r.PROD_TYPE.REPETITION_MANDATORY_WITH_SEPARATOR, m.ERR_MSG);
5969
+ }, E.prototype.manyInternal = function(p, m) {
5970
5970
  var g = this.getKeyForAutomaticLookahead(t.MANY_IDX, p);
5971
- return this.manyInternalLogic(p, E, g);
5972
- }, m.prototype.manyInternalLogic = function(p, E, g) {
5971
+ return this.manyInternalLogic(p, m, g);
5972
+ }, E.prototype.manyInternalLogic = function(p, m, g) {
5973
5973
  var l = this, d = this.getLaFuncFromCache(g), f, b;
5974
- if (E.DEF !== void 0) {
5975
- if (f = E.DEF, b = E.GATE, b !== void 0) {
5974
+ if (m.DEF !== void 0) {
5975
+ if (f = m.DEF, b = m.GATE, b !== void 0) {
5976
5976
  var I = d;
5977
5977
  d = function() {
5978
5978
  return b.call(l) && I.call(l);
5979
5979
  };
5980
5980
  }
5981
- } else f = E;
5981
+ } else f = m;
5982
5982
  for (var C = !0; d.call(this) === !0 && C === !0; ) C = this.doSingleRepetition(f);
5983
- this.attemptInRepetitionRecovery(this.manyInternal, [p, E], d, t.MANY_IDX, p, s.NextTerminalAfterManyWalker, C);
5984
- }, m.prototype.manySepFirstInternal = function(p, E) {
5983
+ this.attemptInRepetitionRecovery(this.manyInternal, [p, m], d, t.MANY_IDX, p, s.NextTerminalAfterManyWalker, C);
5984
+ }, E.prototype.manySepFirstInternal = function(p, m) {
5985
5985
  var g = this.getKeyForAutomaticLookahead(t.MANY_SEP_IDX, p);
5986
- this.manySepFirstInternalLogic(p, E, g);
5987
- }, m.prototype.manySepFirstInternalLogic = function(p, E, g) {
5988
- var l = this, d = E.DEF, f = E.SEP, b = this.getLaFuncFromCache(g);
5986
+ this.manySepFirstInternalLogic(p, m, g);
5987
+ }, E.prototype.manySepFirstInternalLogic = function(p, m, g) {
5988
+ var l = this, d = m.DEF, f = m.SEP, b = this.getLaFuncFromCache(g);
5989
5989
  if (b.call(this) === !0) {
5990
5990
  d.call(this);
5991
5991
  for (var I = function() {
@@ -5993,76 +5993,76 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
5993
5993
  }; this.tokenMatcher(this.LA(1), f) === !0; ) this.CONSUME(f), d.call(this);
5994
5994
  this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal, [p, f, I, d, s.NextTerminalAfterManySepWalker], I, t.MANY_SEP_IDX, p, s.NextTerminalAfterManySepWalker);
5995
5995
  }
5996
- }, m.prototype.repetitionSepSecondInternal = function(p, E, g, l, d) {
5997
- for (; g(); ) this.CONSUME(E), l.call(this);
5998
- this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal, [p, E, g, l, d], g, t.AT_LEAST_ONE_SEP_IDX, p, d);
5999
- }, m.prototype.doSingleRepetition = function(p) {
6000
- var E = this.getLexerPosition();
5996
+ }, E.prototype.repetitionSepSecondInternal = function(p, m, g, l, d) {
5997
+ for (; g(); ) this.CONSUME(m), l.call(this);
5998
+ this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal, [p, m, g, l, d], g, t.AT_LEAST_ONE_SEP_IDX, p, d);
5999
+ }, E.prototype.doSingleRepetition = function(p) {
6000
+ var m = this.getLexerPosition();
6001
6001
  p.call(this);
6002
6002
  var g = this.getLexerPosition();
6003
- return g > E;
6004
- }, m.prototype.orInternal = function(p, E) {
6005
- var g = this.getKeyForAutomaticLookahead(t.OR_IDX, E), l = e.isArray(p) ? p : p.DEF, d = this.getLaFuncFromCache(g), f = d.call(this, l);
6003
+ return g > m;
6004
+ }, E.prototype.orInternal = function(p, m) {
6005
+ var g = this.getKeyForAutomaticLookahead(t.OR_IDX, m), l = e.isArray(p) ? p : p.DEF, d = this.getLaFuncFromCache(g), f = d.call(this, l);
6006
6006
  if (f !== void 0) {
6007
6007
  var b = l[f];
6008
6008
  return b.ALT.call(this);
6009
6009
  }
6010
- this.raiseNoAltException(E, p.ERR_MSG);
6011
- }, m.prototype.ruleFinallyStateUpdate = function() {
6010
+ this.raiseNoAltException(m, p.ERR_MSG);
6011
+ }, E.prototype.ruleFinallyStateUpdate = function() {
6012
6012
  if (this.RULE_STACK.pop(), this.RULE_OCCURRENCE_STACK.pop(), this.cstFinallyStateUpdate(), this.RULE_STACK.length === 0 && this.isAtEndOfInput() === !1) {
6013
- var p = this.LA(1), E = this.errorMessageProvider.buildNotAllInputParsedMessage({ firstRedundant: p, ruleName: this.getCurrRuleFullName() });
6014
- this.SAVE_ERROR(new n.NotAllInputParsedException(E, p));
6013
+ var p = this.LA(1), m = this.errorMessageProvider.buildNotAllInputParsedMessage({ firstRedundant: p, ruleName: this.getCurrRuleFullName() });
6014
+ this.SAVE_ERROR(new n.NotAllInputParsedException(m, p));
6015
6015
  }
6016
- }, m.prototype.subruleInternal = function(p, E, g) {
6016
+ }, E.prototype.subruleInternal = function(p, m, g) {
6017
6017
  var l;
6018
6018
  try {
6019
6019
  var d = g !== void 0 ? g.ARGS : void 0;
6020
- return l = p.call(this, E, d), this.cstPostNonTerminal(l, g !== void 0 && g.LABEL !== void 0 ? g.LABEL : p.ruleName), l;
6020
+ return l = p.call(this, m, d), this.cstPostNonTerminal(l, g !== void 0 && g.LABEL !== void 0 ? g.LABEL : p.ruleName), l;
6021
6021
  } catch (f) {
6022
6022
  this.subruleInternalError(f, g, p.ruleName);
6023
6023
  }
6024
- }, m.prototype.subruleInternalError = function(p, E, g) {
6025
- throw n.isRecognitionException(p) && p.partialCstResult !== void 0 && (this.cstPostNonTerminal(p.partialCstResult, E !== void 0 && E.LABEL !== void 0 ? E.LABEL : g), delete p.partialCstResult), p;
6026
- }, m.prototype.consumeInternal = function(p, E, g) {
6024
+ }, E.prototype.subruleInternalError = function(p, m, g) {
6025
+ throw n.isRecognitionException(p) && p.partialCstResult !== void 0 && (this.cstPostNonTerminal(p.partialCstResult, m !== void 0 && m.LABEL !== void 0 ? m.LABEL : g), delete p.partialCstResult), p;
6026
+ }, E.prototype.consumeInternal = function(p, m, g) {
6027
6027
  var l;
6028
6028
  try {
6029
6029
  var d = this.LA(1);
6030
6030
  this.tokenMatcher(d, p) === !0 ? (this.consumeToken(), l = d) : this.consumeInternalError(p, d, g);
6031
6031
  } catch (f) {
6032
- l = this.consumeInternalRecovery(p, E, f);
6032
+ l = this.consumeInternalRecovery(p, m, f);
6033
6033
  }
6034
6034
  return this.cstPostTerminal(g !== void 0 && g.LABEL !== void 0 ? g.LABEL : p.name, l), l;
6035
- }, m.prototype.consumeInternalError = function(p, E, g) {
6035
+ }, E.prototype.consumeInternalError = function(p, m, g) {
6036
6036
  var l, d = this.LA(0);
6037
- throw g !== void 0 && g.ERR_MSG ? l = g.ERR_MSG : l = this.errorMessageProvider.buildMismatchTokenMessage({ expected: p, actual: E, previous: d, ruleName: this.getCurrRuleFullName() }), this.SAVE_ERROR(new n.MismatchedTokenException(l, E, d));
6038
- }, m.prototype.consumeInternalRecovery = function(p, E, g) {
6037
+ throw g !== void 0 && g.ERR_MSG ? l = g.ERR_MSG : l = this.errorMessageProvider.buildMismatchTokenMessage({ expected: p, actual: m, previous: d, ruleName: this.getCurrRuleFullName() }), this.SAVE_ERROR(new n.MismatchedTokenException(l, m, d));
6038
+ }, E.prototype.consumeInternalRecovery = function(p, m, g) {
6039
6039
  if (this.recoveryEnabled && g.name === "MismatchedTokenException" && !this.isBackTracking()) {
6040
- var l = this.getFollowsForInRuleRecovery(p, E);
6040
+ var l = this.getFollowsForInRuleRecovery(p, m);
6041
6041
  try {
6042
6042
  return this.tryInRuleRecovery(p, l);
6043
6043
  } catch (d) {
6044
6044
  throw d.name === c.IN_RULE_RECOVERY_EXCEPTION ? g : d;
6045
6045
  }
6046
6046
  } else throw g;
6047
- }, m.prototype.saveRecogState = function() {
6048
- var p = this.errors, E = e.cloneArr(this.RULE_STACK);
6049
- return { errors: p, lexerState: this.exportLexerState(), RULE_STACK: E, CST_STACK: this.CST_STACK };
6050
- }, m.prototype.reloadRecogState = function(p) {
6047
+ }, E.prototype.saveRecogState = function() {
6048
+ var p = this.errors, m = e.cloneArr(this.RULE_STACK);
6049
+ return { errors: p, lexerState: this.exportLexerState(), RULE_STACK: m, CST_STACK: this.CST_STACK };
6050
+ }, E.prototype.reloadRecogState = function(p) {
6051
6051
  this.errors = p.errors, this.importLexerState(p.lexerState), this.RULE_STACK = p.RULE_STACK;
6052
- }, m.prototype.ruleInvocationStateUpdate = function(p, E, g) {
6053
- this.RULE_OCCURRENCE_STACK.push(g), this.RULE_STACK.push(p), this.cstInvocationStateUpdate(E, p);
6054
- }, m.prototype.isBackTracking = function() {
6052
+ }, E.prototype.ruleInvocationStateUpdate = function(p, m, g) {
6053
+ this.RULE_OCCURRENCE_STACK.push(g), this.RULE_STACK.push(p), this.cstInvocationStateUpdate(m, p);
6054
+ }, E.prototype.isBackTracking = function() {
6055
6055
  return this.isBackTrackingStack.length !== 0;
6056
- }, m.prototype.getCurrRuleFullName = function() {
6056
+ }, E.prototype.getCurrRuleFullName = function() {
6057
6057
  var p = this.getLastExplicitRuleShortName();
6058
6058
  return this.shortRuleNameToFull[p];
6059
- }, m.prototype.shortRuleNameToFullName = function(p) {
6059
+ }, E.prototype.shortRuleNameToFullName = function(p) {
6060
6060
  return this.shortRuleNameToFull[p];
6061
- }, m.prototype.isAtEndOfInput = function() {
6061
+ }, E.prototype.isAtEndOfInput = function() {
6062
6062
  return this.tokenMatcher(this.LA(1), A.EOF);
6063
- }, m.prototype.reset = function() {
6063
+ }, E.prototype.reset = function() {
6064
6064
  this.resetLexerState(), this.isBackTrackingStack = [], this.errors = [], this.RULE_STACK = [], this.CST_STACK = [], this.RULE_OCCURRENCE_STACK = [];
6065
- }, m;
6065
+ }, E;
6066
6066
  })();
6067
6067
  i.RecognizerEngine = u;
6068
6068
  }), Zo = ve((i) => {
@@ -6080,13 +6080,13 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
6080
6080
  }, set: function(c) {
6081
6081
  this._errors = c;
6082
6082
  }, enumerable: !1, configurable: !0 }), o.prototype.raiseEarlyExitException = function(c, A, a) {
6083
- for (var h = this.getCurrRuleFullName(), u = this.getGAstProductions()[h], m = n.getLookaheadPathsForOptionalProd(c, u, A, this.maxLookahead), p = m[0], E = [], g = 1; g <= this.maxLookahead; g++) E.push(this.LA(g));
6084
- var l = this.errorMessageProvider.buildEarlyExitMessage({ expectedIterationPaths: p, actual: E, previous: this.LA(0), customUserDescription: a, ruleName: h });
6083
+ for (var h = this.getCurrRuleFullName(), u = this.getGAstProductions()[h], E = n.getLookaheadPathsForOptionalProd(c, u, A, this.maxLookahead), p = E[0], m = [], g = 1; g <= this.maxLookahead; g++) m.push(this.LA(g));
6084
+ var l = this.errorMessageProvider.buildEarlyExitMessage({ expectedIterationPaths: p, actual: m, previous: this.LA(0), customUserDescription: a, ruleName: h });
6085
6085
  throw this.SAVE_ERROR(new e.EarlyExitException(l, this.LA(1), this.LA(0)));
6086
6086
  }, o.prototype.raiseNoAltException = function(c, A) {
6087
- for (var a = this.getCurrRuleFullName(), h = this.getGAstProductions()[a], u = n.getLookaheadPathsForOr(c, h, this.maxLookahead), m = [], p = 1; p <= this.maxLookahead; p++) m.push(this.LA(p));
6088
- var E = this.LA(0), g = this.errorMessageProvider.buildNoViableAltMessage({ expectedPathsPerAlt: u, actual: m, previous: E, customUserDescription: A, ruleName: this.getCurrRuleFullName() });
6089
- throw this.SAVE_ERROR(new e.NoViableAltException(g, this.LA(1), E));
6087
+ for (var a = this.getCurrRuleFullName(), h = this.getGAstProductions()[a], u = n.getLookaheadPathsForOr(c, h, this.maxLookahead), E = [], p = 1; p <= this.maxLookahead; p++) E.push(this.LA(p));
6088
+ var m = this.LA(0), g = this.errorMessageProvider.buildNoViableAltMessage({ expectedPathsPerAlt: u, actual: E, previous: m, customUserDescription: A, ruleName: this.getCurrRuleFullName() });
6089
+ throw this.SAVE_ERROR(new e.NoViableAltException(g, this.LA(1), m));
6090
6090
  }, o;
6091
6091
  })();
6092
6092
  i.ErrorHandler = s;
@@ -6112,11 +6112,11 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
6112
6112
  Object.freeze(A);
6113
6113
  var a = !0, h = Math.pow(2, c.BITS_FOR_OCCURRENCE_IDX) - 1, u = s.createToken({ name: "RECORDING_PHASE_TOKEN", pattern: n.Lexer.NA });
6114
6114
  r.augmentTokenTypes([u]);
6115
- var m = s.createTokenInstance(u, `This IToken indicates the Parser is in Recording Phase
6115
+ var E = s.createTokenInstance(u, `This IToken indicates the Parser is in Recording Phase
6116
6116
  See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`, -1, -1, -1, -1, -1, -1);
6117
- Object.freeze(m);
6117
+ Object.freeze(E);
6118
6118
  var p = { name: `This CSTNode indicates the Parser is in Recording Phase
6119
- See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`, children: {} }, E = (function() {
6119
+ See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`, children: {} }, m = (function() {
6120
6120
  function b() {
6121
6121
  }
6122
6122
  return b.prototype.initGastRecorder = function(I) {
@@ -6215,10 +6215,10 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
6215
6215
  throw x.KNOWN_RECORDER_ERROR = !0, x;
6216
6216
  }
6217
6217
  var j = e.peek(this.recordingProdStack), R = new t.Terminal({ idx: C, terminalType: I });
6218
- return j.definition.push(R), m;
6218
+ return j.definition.push(R), E;
6219
6219
  }, b;
6220
6220
  })();
6221
- i.GastRecorder = E;
6221
+ i.GastRecorder = m;
6222
6222
  function g(b, I, C, v) {
6223
6223
  v === void 0 && (v = !1), f(C);
6224
6224
  var x = e.peek(this.recordingProdStack), j = e.isFunction(I) ? I : I.DEF, R = new b({ definition: [], idx: C });
@@ -6302,7 +6302,7 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
6302
6302
  };
6303
6303
  })();
6304
6304
  Object.defineProperty(i, "__esModule", { value: !0 }), i.EmbeddedActionsParser = i.CstParser = i.Parser = i.EMPTY_ALT = i.ParserDefinitionErrorType = i.DEFAULT_RULE_CONFIG = i.DEFAULT_PARSER_CONFIG = i.END_OF_FILE = void 0;
6305
- var t = Fe(), n = jo(), r = St(), s = gn(), o = qo(), c = pr(), A = zo(), a = Wo(), h = Yo(), u = Jo(), m = Xo(), p = Zo(), E = $o(), g = ea(), l = ta(), d = na();
6305
+ var t = Fe(), n = jo(), r = St(), s = gn(), o = qo(), c = pr(), A = zo(), a = Wo(), h = Yo(), u = Jo(), E = Xo(), p = Zo(), m = $o(), g = ea(), l = ta(), d = na();
6306
6306
  i.END_OF_FILE = r.createTokenInstance(r.EOF, "", NaN, NaN, NaN, NaN, NaN, NaN), Object.freeze(i.END_OF_FILE), i.DEFAULT_PARSER_CONFIG = Object.freeze({ recoveryEnabled: !1, maxLookahead: 3, dynamicTokensEnabled: !1, outputCst: !0, errorMessageProvider: s.defaultParserErrorProvider, nodeLocationTracking: "none", traceInitPerf: !1, skipValidations: !1 }), i.DEFAULT_RULE_CONFIG = Object.freeze({ recoveryValueFunc: function() {
6307
6307
  }, resyncEnabled: !0 }), (function(v) {
6308
6308
  v[v.INVALID_RULE_NAME = 0] = "INVALID_RULE_NAME", v[v.DUPLICATE_RULE_NAME = 1] = "DUPLICATE_RULE_NAME", v[v.INVALID_RULE_OVERRIDE = 2] = "INVALID_RULE_OVERRIDE", v[v.DUPLICATE_PRODUCTIONS = 3] = "DUPLICATE_PRODUCTIONS", v[v.UNRESOLVED_SUBRULE_REF = 4] = "UNRESOLVED_SUBRULE_REF", v[v.LEFT_RECURSION = 5] = "LEFT_RECURSION", v[v.NONE_LAST_EMPTY_ALT = 6] = "NONE_LAST_EMPTY_ALT", v[v.AMBIGUOUS_ALTS = 7] = "AMBIGUOUS_ALTS", v[v.CONFLICT_TOKENS_RULES_NAMESPACE = 8] = "CONFLICT_TOKENS_RULES_NAMESPACE", v[v.INVALID_TOKEN_NAME = 9] = "INVALID_TOKEN_NAME", v[v.NO_NON_EMPTY_LOOKAHEAD = 10] = "NO_NON_EMPTY_LOOKAHEAD", v[v.AMBIGUOUS_PREFIX_ALTS = 11] = "AMBIGUOUS_PREFIX_ALTS", v[v.TOO_MANY_ALTS = 12] = "TOO_MANY_ALTS";
@@ -6367,7 +6367,7 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
6367
6367
  });
6368
6368
  }, v.DEFER_DEFINITION_ERRORS_HANDLING = !1, v;
6369
6369
  })();
6370
- i.Parser = b, d.applyMixins(b, [c.Recoverable, A.LooksAhead, a.TreeBuilder, h.LexerAdapter, m.RecognizerEngine, u.RecognizerApi, p.ErrorHandler, E.ContentAssist, g.GastRecorder, l.PerformanceTracer]);
6370
+ i.Parser = b, d.applyMixins(b, [c.Recoverable, A.LooksAhead, a.TreeBuilder, h.LexerAdapter, E.RecognizerEngine, u.RecognizerApi, p.ErrorHandler, m.ContentAssist, g.GastRecorder, l.PerformanceTracer]);
6371
6371
  var I = (function(v) {
6372
6372
  e(x, v);
6373
6373
  function x(j, R) {
@@ -6404,14 +6404,14 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
6404
6404
 
6405
6405
  `, u = `
6406
6406
  <link rel='stylesheet' href='` + a + `'>
6407
- `, m = `
6407
+ `, E = `
6408
6408
  <script src='` + c + `vendor/railroad-diagrams.js'><\/script>
6409
6409
  <script src='` + c + `src/diagrams_builder.js'><\/script>
6410
6410
  <script src='` + c + `src/diagrams_behavior.js'><\/script>
6411
6411
  <script src='` + c + `src/main.js'><\/script>
6412
6412
  `, p = `
6413
6413
  <div id="diagrams" align="center"></div>
6414
- `, E = `
6414
+ `, m = `
6415
6415
  <script>
6416
6416
  window.serializedGrammar = ` + JSON.stringify(n, null, " ") + `;
6417
6417
  <\/script>
@@ -6421,7 +6421,7 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
6421
6421
  main.drawDiagramsFromSerializedGrammar(serializedGrammar, diagramsDiv);
6422
6422
  <\/script>
6423
6423
  `;
6424
- return h + u + m + p + E + g;
6424
+ return h + u + E + p + m + g;
6425
6425
  }
6426
6426
  i.createSyntaxDiagramsCode = t;
6427
6427
  }), ra = ve((i) => {
@@ -6518,16 +6518,16 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
6518
6518
  Please avoid using it as it will be completely removed in the future`);
6519
6519
  }
6520
6520
  i.clearCache = u;
6521
- var m = ia();
6521
+ var E = ia();
6522
6522
  Object.defineProperty(i, "createSyntaxDiagramsCode", { enumerable: !0, get: function() {
6523
- return m.createSyntaxDiagramsCode;
6523
+ return E.createSyntaxDiagramsCode;
6524
6524
  } });
6525
6525
  var p = /* @__PURE__ */ (function() {
6526
- function E() {
6526
+ function m() {
6527
6527
  throw new Error(`The Parser class has been deprecated, use CstParser or EmbeddedActionsParser instead.
6528
6528
  See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_7-0-0`);
6529
6529
  }
6530
- return E;
6530
+ return m;
6531
6531
  })();
6532
6532
  i.Parser = p;
6533
6533
  });
@@ -6882,7 +6882,7 @@ class sa extends dt {
6882
6882
  y = p(Q);
6883
6883
  break;
6884
6884
  case "Shape":
6885
- y = E(Q);
6885
+ y = m(Q);
6886
6886
  break;
6887
6887
  case "Appearance":
6888
6888
  y = g(Q);
@@ -7022,7 +7022,7 @@ class sa extends dt {
7022
7022
  }
7023
7023
  return w;
7024
7024
  }
7025
- const m = this;
7025
+ const E = this;
7026
7026
  function p(Q) {
7027
7027
  const w = new zt();
7028
7028
  let y, k, B, D, O, G, V, te, ae, ge;
@@ -7066,8 +7066,8 @@ class sa extends dt {
7066
7066
  }
7067
7067
  }
7068
7068
  if (O && G && V && te && ae && ge) {
7069
- const Qe = new ds(m.manager);
7070
- m.backgroundTexture = Qe.load([
7069
+ const Qe = new ds(E.manager);
7070
+ E.backgroundTexture = Qe.load([
7071
7071
  ae[0],
7072
7072
  te[0],
7073
7073
  ge[0],
@@ -7099,7 +7099,7 @@ class sa extends dt {
7099
7099
  }
7100
7100
  return w;
7101
7101
  }
7102
- function E(Q) {
7102
+ function m(Q) {
7103
7103
  const w = Q.fields;
7104
7104
  let y = new Tt({
7105
7105
  name: dt.DEFAULT_MATERIAL_NAME,
@@ -7520,10 +7520,10 @@ class sa extends dt {
7520
7520
  }
7521
7521
  }
7522
7522
  if (y === "LINEAR")
7523
- m.fog = new ps(w, 0, k);
7523
+ E.fog = new ps(w, 0, k);
7524
7524
  else if (y === "EXPONENTIAL") {
7525
7525
  let D = 0.02;
7526
- k !== 0 && (D = 2.146 / k), m.fog = new gs(w, D);
7526
+ k !== 0 && (D = 2.146 / k), E.fog = new gs(w, D);
7527
7527
  } else
7528
7528
  console.warn("ThreeMFLoader.VRMLLoader2: Unknown fogType:", y);
7529
7529
  return new ut();
@@ -8087,7 +8087,7 @@ const aa = Yt.CstParser;
8087
8087
  class Aa extends aa {
8088
8088
  constructor(e) {
8089
8089
  super(e);
8090
- const t = this, n = e.Version, r = e.LCurly, s = e.RCurly, o = e.LSquare, c = e.RSquare, A = e.Identifier, a = e.RouteIdentifier, h = e.StringLiteral, u = e.HexLiteral, m = e.NumberLiteral, p = e.TrueLiteral, E = e.FalseLiteral, g = e.NullLiteral, l = e.DEF, d = e.USE, f = e.ROUTE, b = e.TO, I = e.NodeName;
8090
+ const t = this, n = e.Version, r = e.LCurly, s = e.RCurly, o = e.LSquare, c = e.RSquare, A = e.Identifier, a = e.RouteIdentifier, h = e.StringLiteral, u = e.HexLiteral, E = e.NumberLiteral, p = e.TrueLiteral, m = e.FalseLiteral, g = e.NullLiteral, l = e.DEF, d = e.USE, f = e.ROUTE, b = e.TO, I = e.NodeName;
8091
8091
  t.RULE("vrml", function() {
8092
8092
  t.SUBRULE(t.version), t.AT_LEAST_ONE(function() {
8093
8093
  t.SUBRULE(t.node);
@@ -8145,13 +8145,13 @@ class Aa extends aa {
8145
8145
  t.CONSUME(u);
8146
8146
  } },
8147
8147
  { ALT: function() {
8148
- t.CONSUME(m);
8148
+ t.CONSUME(E);
8149
8149
  } },
8150
8150
  { ALT: function() {
8151
8151
  t.CONSUME(p);
8152
8152
  } },
8153
8153
  { ALT: function() {
8154
- t.CONSUME(E);
8154
+ t.CONSUME(m);
8155
8155
  } },
8156
8156
  { ALT: function() {
8157
8157
  t.CONSUME(g);
@@ -8174,7 +8174,7 @@ class Aa extends aa {
8174
8174
  t.CONSUME(u);
8175
8175
  } },
8176
8176
  { ALT: function() {
8177
- t.CONSUME(m);
8177
+ t.CONSUME(E);
8178
8178
  } },
8179
8179
  { ALT: function() {
8180
8180
  t.CONSUME(g);
@@ -8342,7 +8342,7 @@ class la {
8342
8342
  for (let o = 0; o < e; o++) {
8343
8343
  const A = 1 - 2 * ((o + 0.5) / e);
8344
8344
  for (let a = 0; a < e; a++) {
8345
- const u = 2 * ((a + 0.5) / e) - 1, m = 1, p = Math.sqrt(u * u + A * A + m * m), E = Math.acos(Math.max(-1, Math.min(1, A / p))), [g, l, d] = this._colorAtPitch(E), f = (o * e + a) * 4;
8345
+ const u = 2 * ((a + 0.5) / e) - 1, E = 1, p = Math.sqrt(u * u + A * A + E * E), m = Math.acos(Math.max(-1, Math.min(1, A / p))), [g, l, d] = this._colorAtPitch(m), f = (o * e + a) * 4;
8346
8346
  s[f] = Math.round(g * 255), s[f + 1] = Math.round(l * 255), s[f + 2] = Math.round(d * 255), s[f + 3] = 255;
8347
8347
  }
8348
8348
  }
@@ -8364,8 +8364,8 @@ class la {
8364
8364
  for (let o = 0; o < e; o++) {
8365
8365
  const c = 2 * (o + 0.5) / e - 1;
8366
8366
  for (let A = 0; A < e; A++) {
8367
- const a = 2 * (A + 0.5) / e - 1, h = 1, u = Math.sqrt(a * a + h * h + c * c), m = Math.acos(Math.max(-1, Math.min(1, h / u))), [p, E, g] = this._colorAtPitch(m), l = (o * e + A) * 4;
8368
- s[l] = Math.round(p * 255), s[l + 1] = Math.round(E * 255), s[l + 2] = Math.round(g * 255), s[l + 3] = 255;
8367
+ const a = 2 * (A + 0.5) / e - 1, h = 1, u = Math.sqrt(a * a + h * h + c * c), E = Math.acos(Math.max(-1, Math.min(1, h / u))), [p, m, g] = this._colorAtPitch(E), l = (o * e + A) * 4;
8368
+ s[l] = Math.round(p * 255), s[l + 1] = Math.round(m * 255), s[l + 2] = Math.round(g * 255), s[l + 3] = 255;
8369
8369
  }
8370
8370
  }
8371
8371
  return n.putImageData(r, 0, 0), t;
@@ -8386,8 +8386,8 @@ class la {
8386
8386
  for (let o = 0; o < e; o++) {
8387
8387
  const c = 2 * (o + 0.5) / e - 1;
8388
8388
  for (let A = 0; A < e; A++) {
8389
- const a = 2 * (A + 0.5) / e - 1, h = -1, u = Math.sqrt(a * a + h * h + c * c), m = Math.acos(Math.max(-1, Math.min(1, h / u))), [p, E, g] = this._colorAtPitch(m), l = (o * e + A) * 4;
8390
- s[l] = Math.round(p * 255), s[l + 1] = Math.round(E * 255), s[l + 2] = Math.round(g * 255), s[l + 3] = 255;
8389
+ const a = 2 * (A + 0.5) / e - 1, h = -1, u = Math.sqrt(a * a + h * h + c * c), E = Math.acos(Math.max(-1, Math.min(1, h / u))), [p, m, g] = this._colorAtPitch(E), l = (o * e + A) * 4;
8390
+ s[l] = Math.round(p * 255), s[l + 1] = Math.round(m * 255), s[l + 2] = Math.round(g * 255), s[l + 3] = 255;
8391
8391
  }
8392
8392
  }
8393
8393
  return n.putImageData(r, 0, 0), t;
@@ -8451,7 +8451,7 @@ class ha extends dt {
8451
8451
  parse(e) {
8452
8452
  function t(p) {
8453
8453
  c(p) !== "HIERARCHY" && console.error("THREE.BVHLoader2: HIERARCHY expected.");
8454
- const E = [], g = r(p, c(p), E);
8454
+ const m = [], g = r(p, c(p), m);
8455
8455
  c(p) !== "MOTION" && console.error("THREE.BVHLoader2: MOTION expected.");
8456
8456
  let l = c(p).split(/[\s]+/);
8457
8457
  const d = parseInt(l[1]);
@@ -8460,12 +8460,12 @@ class ha extends dt {
8460
8460
  isNaN(f) && console.error("THREE.BVHLoader2: Failed to read frame time.");
8461
8461
  for (let b = 0; b < d; b++)
8462
8462
  l = c(p).split(/[\s]+/), n(l, b * f, g);
8463
- return E;
8463
+ return m;
8464
8464
  }
8465
- function n(p, E, g) {
8465
+ function n(p, m, g) {
8466
8466
  if (g.type === "ENDSITE") return;
8467
8467
  const l = {
8468
- time: E,
8468
+ time: m,
8469
8469
  position: new _e(),
8470
8470
  rotation: new Jt(),
8471
8471
  scale: new _e(1, 1, 1)
@@ -8505,12 +8505,12 @@ class ha extends dt {
8505
8505
  console.warn("THREE.BVHLoader2: Invalid channel type.");
8506
8506
  }
8507
8507
  for (let C = 0; C < g.children.length; C++)
8508
- n(p, E, g.children[C]);
8508
+ n(p, m, g.children[C]);
8509
8509
  }
8510
- function r(p, E, g) {
8510
+ function r(p, m, g) {
8511
8511
  const l = { name: "", type: "", frames: [] };
8512
8512
  g.push(l);
8513
- let d = E.split(/[\s]+/);
8513
+ let d = m.split(/[\s]+/);
8514
8514
  d[0].toUpperCase() === "END" && d[1].toUpperCase() === "SITE" ? (l.type = "ENDSITE", l.name = "ENDSITE") : (l.name = d[1], l.type = d[0].toUpperCase()), c(p) !== "{" && console.error("THREE.BVHLoader2: Expected opening { after type & name"), d = c(p).split(/[\s]+/), d[0] !== "OFFSET" && console.error("THREE.BVHLoader2: Expected OFFSET but got: " + d[0]), d.length !== 4 && console.error("THREE.BVHLoader2: Invalid number of values for OFFSET.");
8515
8515
  const f = new _e(
8516
8516
  parseFloat(d[1]),
@@ -8529,15 +8529,15 @@ class ha extends dt {
8529
8529
  l.children.push(r(p, b, g));
8530
8530
  }
8531
8531
  }
8532
- function s(p, E) {
8532
+ function s(p, m) {
8533
8533
  const g = new Ki();
8534
- if (E.push(g), g.position.add(p.offset), g.name = p.name, p.type !== "ENDSITE")
8534
+ if (m.push(g), g.position.add(p.offset), g.name = p.name, p.type !== "ENDSITE")
8535
8535
  for (let l = 0; l < p.children.length; l++)
8536
- g.add(s(p.children[l], E));
8536
+ g.add(s(p.children[l], m));
8537
8537
  return g;
8538
8538
  }
8539
8539
  function o(p) {
8540
- const E = [];
8540
+ const m = [];
8541
8541
  for (let g = 0; g < p.length; g++) {
8542
8542
  const l = p[g];
8543
8543
  if (l.type === "ENDSITE")
@@ -8547,22 +8547,22 @@ class ha extends dt {
8547
8547
  const v = l.frames[C];
8548
8548
  d.push(v.time), f.push(v.position.x + l.offset.x), f.push(v.position.y + l.offset.y), f.push(v.position.z + l.offset.z), b.push(v.rotation.x), b.push(v.rotation.y), b.push(v.rotation.z), b.push(v.rotation.w), I.push(v.scale.x), I.push(v.scale.y), I.push(v.scale.z);
8549
8549
  }
8550
- A.animateBonePositions && E.push(new an(l.name + ".position", d, f)), A.animateBoneRotations && E.push(new Pn(l.name + ".quaternion", d, b)), A.animateBoneScales && E.push(new an(l.name + ".scale", d, I));
8550
+ A.animateBonePositions && m.push(new an(l.name + ".position", d, f)), A.animateBoneRotations && m.push(new Pn(l.name + ".quaternion", d, b)), A.animateBoneScales && m.push(new an(l.name + ".scale", d, I));
8551
8551
  }
8552
- return new Vi("animation", -1, E);
8552
+ return new Vi("animation", -1, m);
8553
8553
  }
8554
8554
  function c(p) {
8555
- let E;
8556
- for (; (E = p.shift().trim()).length === 0; )
8555
+ let m;
8556
+ for (; (m = p.shift().trim()).length === 0; )
8557
8557
  ;
8558
- return E;
8558
+ return m;
8559
8559
  }
8560
8560
  const A = this, a = e.split(/[\r\n]+/g), h = t(a), u = [];
8561
8561
  s(h[0], u);
8562
- const m = o(h);
8562
+ const E = o(h);
8563
8563
  return {
8564
8564
  skeleton: new zi(u),
8565
- clip: m
8565
+ clip: E
8566
8566
  };
8567
8567
  }
8568
8568
  }
@@ -8823,19 +8823,19 @@ class ma extends Wt {
8823
8823
  this.thumbnails.push(I);
8824
8824
  }
8825
8825
  });
8826
- const m = s.getElementsByTagNameNS("http://www.w3.org/1999/02/22-rdf-syntax-ns#", "RDF");
8827
- m[0] && (this.rdf = m[0]);
8826
+ const E = s.getElementsByTagNameNS("http://www.w3.org/1999/02/22-rdf-syntax-ns#", "RDF");
8827
+ E[0] && (this.rdf = E[0]);
8828
8828
  const p = s.getElementsByTagNameNS(o, "htmlfile");
8829
8829
  if (p[0]) {
8830
8830
  const f = p[0].getAttribute("src");
8831
8831
  f && (this.htmlfile = un(t, f));
8832
8832
  }
8833
- const E = [], g = s.getElementsByTagNameNS(o, "a"), l = {};
8833
+ const m = [], g = s.getElementsByTagNameNS(o, "a"), l = {};
8834
8834
  let d;
8835
8835
  for (const f of Array.from(g)) {
8836
8836
  const b = f.getAttribute("an");
8837
8837
  if (b) {
8838
- E.push(b), d || (d = b);
8838
+ m.push(b), d || (d = b);
8839
8839
  let I;
8840
8840
  const C = f.getAttribute("bvh");
8841
8841
  if (C && C !== "none") {
@@ -8939,7 +8939,7 @@ class ma extends Wt {
8939
8939
  );
8940
8940
  }
8941
8941
  }
8942
- return c[0] && (c[0].getAttribute("haltActionNo") !== null && (this.haltActionName = E[Number(c[0].getAttribute("haltActionNo"))]), c[0].getAttribute("walkActionNo") !== null && (this.walkActionName = E[Number(c[0].getAttribute("walkActionNo"))]), c[0].getAttribute("runActionNo") !== null && (this.runActionName = E[Number(c[0].getAttribute("runActionNo"))]), c[0].getAttribute("minWalkSpeed") !== null && (this.minWalkSpeed = Number(c[0].getAttribute("minWalkSpeed"))), c[0].getAttribute("minRunSpeed") !== null && (this.minRunSpeed = Number(c[0].getAttribute("minRunSpeed")))), d && this.syncInit(d, l), this;
8942
+ return c[0] && (c[0].getAttribute("haltActionNo") !== null && (this.haltActionName = m[Number(c[0].getAttribute("haltActionNo"))]), c[0].getAttribute("walkActionNo") !== null && (this.walkActionName = m[Number(c[0].getAttribute("walkActionNo"))]), c[0].getAttribute("runActionNo") !== null && (this.runActionName = m[Number(c[0].getAttribute("runActionNo"))]), c[0].getAttribute("minWalkSpeed") !== null && (this.minWalkSpeed = Number(c[0].getAttribute("minWalkSpeed"))), c[0].getAttribute("minRunSpeed") !== null && (this.minRunSpeed = Number(c[0].getAttribute("minRunSpeed")))), d && this.syncInit(d, l), this;
8943
8943
  }
8944
8944
  }
8945
8945
  function Er(i, e) {
@@ -9133,10 +9133,10 @@ class Ia extends si {
9133
9133
  if (!this.view) return;
9134
9134
  const t = this.view.camera.getPosition(), n = this.view.camera.getQuat();
9135
9135
  if (this.isLeftDown && !this.ctrlKey) {
9136
- const s = Math.sin(-this.dx * 0.01), o = Math.cos(-this.dx * 0.01), c = Math.sin(-this.dy * 0.01), A = Math.cos(-this.dy * 0.01), a = new Ae(1, 0, 0).apply(n), h = new Ae(0, 1, 0).apply(n), u = new Pe(a.x * c, a.y * c, a.z * c, A), m = new Pe(h.x * s, h.y * s, h.z * s, o), p = new Ae(t);
9137
- p.sub(this.target), p.apply(u), p.apply(m), p.add(this.target), t.set(p);
9138
- const E = mt(t, this.target, new Ae(0, 1, 0));
9139
- E.mul(new Pe(0, 1, 0, 0)), n.set(E);
9136
+ const s = Math.sin(-this.dx * 0.01), o = Math.cos(-this.dx * 0.01), c = Math.sin(-this.dy * 0.01), A = Math.cos(-this.dy * 0.01), a = new Ae(1, 0, 0).apply(n), h = new Ae(0, 1, 0).apply(n), u = new Pe(a.x * c, a.y * c, a.z * c, A), E = new Pe(h.x * s, h.y * s, h.z * s, o), p = new Ae(t);
9137
+ p.sub(this.target), p.apply(u), p.apply(E), p.add(this.target), t.set(p);
9138
+ const m = mt(t, this.target, new Ae(0, 1, 0));
9139
+ m.mul(new Pe(0, 1, 0, 0)), n.set(m);
9140
9140
  } else if (this.isLeftDown) {
9141
9141
  S.v0.set(this.target), S.v0.sub(t);
9142
9142
  const s = 5e-3 * S.v0.length(), o = new Ae(1, 0, 0).apply(n).scale(-this.dx * s), c = new Ae(0, 1, 0).apply(n).scale(this.dy * s);
@@ -9387,44 +9387,44 @@ class Cr {
9387
9387
  width: n,
9388
9388
  height: r
9389
9389
  };
9390
- }, this.render = function(E, g) {
9391
- E.matrixWorldAutoUpdate === !0 && E.updateMatrixWorld(), g.parent === null && g.matrixWorldAutoUpdate === !0 && g.updateMatrixWorld(), Ei.copy(g.matrixWorldInverse), Ii.multiplyMatrices(g.projectionMatrix, Ei), h(E, E, g), this.sortObjects && p(E);
9392
- }, this.setSize = function(E, g) {
9393
- n = E, r = g, s = n / 2, o = r / 2, A.style.width = E + "px", A.style.height = g + "px";
9390
+ }, this.render = function(m, g) {
9391
+ m.matrixWorldAutoUpdate === !0 && m.updateMatrixWorld(), g.parent === null && g.matrixWorldAutoUpdate === !0 && g.updateMatrixWorld(), Ei.copy(g.matrixWorldInverse), Ii.multiplyMatrices(g.projectionMatrix, Ei), h(m, m, g), this.sortObjects && p(m);
9392
+ }, this.setSize = function(m, g) {
9393
+ n = m, r = g, s = n / 2, o = r / 2, A.style.width = m + "px", A.style.height = g + "px";
9394
9394
  };
9395
- function a(E) {
9396
- E.isCSS2DObject && (E.element.style.display = "none");
9397
- for (let g = 0, l = E.children.length; g < l; g++)
9398
- a(E.children[g]);
9399
- }
9400
- function h(E, g, l) {
9401
- if (E.visible === !1) {
9402
- a(E);
9395
+ function a(m) {
9396
+ m.isCSS2DObject && (m.element.style.display = "none");
9397
+ for (let g = 0, l = m.children.length; g < l; g++)
9398
+ a(m.children[g]);
9399
+ }
9400
+ function h(m, g, l) {
9401
+ if (m.visible === !1) {
9402
+ a(m);
9403
9403
  return;
9404
9404
  }
9405
- if (E.isCSS2DObject) {
9406
- _t.setFromMatrixPosition(E.matrixWorld), _t.applyMatrix4(Ii);
9407
- const d = _t.z >= -1 && _t.z <= 1 && E.layers.test(l.layers) === !0, f = E.element;
9408
- f.style.display = d === !0 ? "" : "none", d === !0 && (E.onBeforeRender(t, g, l), f.style.transform = "translate(" + -100 * E.center.x + "%," + -100 * E.center.y + "%)translate(" + (_t.x * s + s) + "px," + (-_t.y * o + o) + "px)", f.parentNode !== A && A.appendChild(f), E.onAfterRender(t, g, l));
9405
+ if (m.isCSS2DObject) {
9406
+ _t.setFromMatrixPosition(m.matrixWorld), _t.applyMatrix4(Ii);
9407
+ const d = _t.z >= -1 && _t.z <= 1 && m.layers.test(l.layers) === !0, f = m.element;
9408
+ f.style.display = d === !0 ? "" : "none", d === !0 && (m.onBeforeRender(t, g, l), f.style.transform = "translate(" + -100 * m.center.x + "%," + -100 * m.center.y + "%)translate(" + (_t.x * s + s) + "px," + (-_t.y * o + o) + "px)", f.parentNode !== A && A.appendChild(f), m.onAfterRender(t, g, l));
9409
9409
  const b = {
9410
- distanceToCameraSquared: u(l, E)
9410
+ distanceToCameraSquared: u(l, m)
9411
9411
  };
9412
- c.objects.set(E, b);
9412
+ c.objects.set(m, b);
9413
9413
  }
9414
- for (let d = 0, f = E.children.length; d < f; d++)
9415
- h(E.children[d], g, l);
9414
+ for (let d = 0, f = m.children.length; d < f; d++)
9415
+ h(m.children[d], g, l);
9416
9416
  }
9417
- function u(E, g) {
9418
- return bi.setFromMatrixPosition(E.matrixWorld), Ci.setFromMatrixPosition(g.matrixWorld), bi.distanceToSquared(Ci);
9417
+ function u(m, g) {
9418
+ return bi.setFromMatrixPosition(m.matrixWorld), Ci.setFromMatrixPosition(g.matrixWorld), bi.distanceToSquared(Ci);
9419
9419
  }
9420
- function m(E) {
9420
+ function E(m) {
9421
9421
  const g = [];
9422
- return E.traverseVisible(function(l) {
9422
+ return m.traverseVisible(function(l) {
9423
9423
  l.isCSS2DObject && g.push(l);
9424
9424
  }), g;
9425
9425
  }
9426
- function p(E) {
9427
- const g = m(E).sort(function(d, f) {
9426
+ function p(m) {
9427
+ const g = E(m).sort(function(d, f) {
9428
9428
  if (d.renderOrder !== f.renderOrder)
9429
9429
  return f.renderOrder - d.renderOrder;
9430
9430
  const b = c.objects.get(d).distanceToCameraSquared, I = c.objects.get(f).distanceToCameraSquared;
@@ -9633,7 +9633,7 @@ class yr extends dt {
9633
9633
  }
9634
9634
  if (s.extensionsUsed)
9635
9635
  for (let h = 0; h < s.extensionsUsed.length; ++h) {
9636
- const u = s.extensionsUsed[h], m = s.extensionsRequired || [];
9636
+ const u = s.extensionsUsed[h], E = s.extensionsRequired || [];
9637
9637
  switch (u) {
9638
9638
  case ke.KHR_MATERIALS_UNLIT:
9639
9639
  o[u] = new wa();
@@ -9648,7 +9648,7 @@ class yr extends dt {
9648
9648
  o[u] = new qa();
9649
9649
  break;
9650
9650
  default:
9651
- m.indexOf(u) >= 0 && c[u] === void 0 && console.warn('THREE.GLTFLoader: Unknown extension "' + u + '".');
9651
+ E.indexOf(u) >= 0 && c[u] === void 0 && console.warn('THREE.GLTFLoader: Unknown extension "' + u + '".');
9652
9652
  }
9653
9653
  }
9654
9654
  a.setExtensions(o), a.setPlugins(c), a.parse(n, r);
@@ -10027,12 +10027,12 @@ class Pa {
10027
10027
  return null;
10028
10028
  }
10029
10029
  return s.then(function(c) {
10030
- const A = r.byteOffset || 0, a = r.byteLength || 0, h = r.count, u = r.byteStride, m = new Uint8Array(c, A, a);
10031
- return o.decodeGltfBufferAsync ? o.decodeGltfBufferAsync(h, u, m, r.mode, r.filter).then(function(p) {
10030
+ const A = r.byteOffset || 0, a = r.byteLength || 0, h = r.count, u = r.byteStride, E = new Uint8Array(c, A, a);
10031
+ return o.decodeGltfBufferAsync ? o.decodeGltfBufferAsync(h, u, E, r.mode, r.filter).then(function(p) {
10032
10032
  return p.buffer;
10033
10033
  }) : o.ready.then(function() {
10034
10034
  const p = new ArrayBuffer(h * u);
10035
- return o.decodeGltfBuffer(new Uint8Array(p), h, u, m, r.mode, r.filter), p;
10035
+ return o.decodeGltfBuffer(new Uint8Array(p), h, u, E, r.mode, r.filter), p;
10036
10036
  });
10037
10037
  });
10038
10038
  } else
@@ -10055,17 +10055,17 @@ class Ga {
10055
10055
  for (const a in o)
10056
10056
  c.push(this.parser.getDependency("accessor", o[a]).then((h) => (A[a] = h, A[a])));
10057
10057
  return c.length < 1 ? null : (c.push(this.parser.createNodeMesh(e)), Promise.all(c).then((a) => {
10058
- const h = a.pop(), u = h.isGroup ? h.children : [h], m = a[0].count, p = [];
10059
- for (const E of u) {
10060
- const g = new Mt(), l = new _e(), d = new Jt(), f = new _e(1, 1, 1), b = new ws(E.geometry, E.material, m);
10061
- for (let I = 0; I < m; I++)
10058
+ const h = a.pop(), u = h.isGroup ? h.children : [h], E = a[0].count, p = [];
10059
+ for (const m of u) {
10060
+ const g = new Mt(), l = new _e(), d = new Jt(), f = new _e(1, 1, 1), b = new ws(m.geometry, m.material, E);
10061
+ for (let I = 0; I < E; I++)
10062
10062
  A.TRANSLATION && l.fromBufferAttribute(A.TRANSLATION, I), A.ROTATION && d.fromBufferAttribute(A.ROTATION, I), A.SCALE && f.fromBufferAttribute(A.SCALE, I), b.setMatrixAt(I, g.compose(l, d, f));
10063
10063
  for (const I in A)
10064
10064
  if (I === "_COLOR_0") {
10065
10065
  const C = A[I];
10066
10066
  b.instanceColor = new vs(C.array, C.itemSize, C.normalized);
10067
- } else I !== "TRANSLATION" && I !== "ROTATION" && I !== "SCALE" && E.geometry.setAttribute(I, A[I]);
10068
- ut.prototype.copy.call(b, E), this.parser.assignFinalMaterial(b), p.push(b);
10067
+ } else I !== "TRANSLATION" && I !== "ROTATION" && I !== "SCALE" && m.geometry.setAttribute(I, A[I]);
10068
+ ut.prototype.copy.call(b, m), this.parser.assignFinalMaterial(b), p.push(b);
10069
10069
  }
10070
10070
  return h.isGroup ? (h.clear(), h.add(...p), h) : p[0];
10071
10071
  }));
@@ -10118,19 +10118,19 @@ class ja {
10118
10118
  for (const h in e.attributes) {
10119
10119
  const u = Wn[h] || h.toLowerCase();
10120
10120
  if (o[h] !== void 0) {
10121
- const m = n.accessors[e.attributes[h]], p = Ot[m.componentType];
10122
- a[u] = p.name, A[u] = m.normalized === !0;
10121
+ const E = n.accessors[e.attributes[h]], p = Ot[E.componentType];
10122
+ a[u] = p.name, A[u] = E.normalized === !0;
10123
10123
  }
10124
10124
  }
10125
10125
  return t.getDependency("bufferView", s).then(function(h) {
10126
- return new Promise(function(u, m) {
10126
+ return new Promise(function(u, E) {
10127
10127
  r.decodeDracoFile(h, function(p) {
10128
- for (const E in p.attributes) {
10129
- const g = p.attributes[E], l = A[E];
10128
+ for (const m in p.attributes) {
10129
+ const g = p.attributes[m], l = A[m];
10130
10130
  l !== void 0 && (g.normalized = l);
10131
10131
  }
10132
10132
  u(p);
10133
- }, c, a, At, m);
10133
+ }, c, a, At, E);
10134
10134
  });
10135
10135
  });
10136
10136
  }
@@ -10159,9 +10159,9 @@ class wr extends Ms {
10159
10159
  return t;
10160
10160
  }
10161
10161
  interpolate_(e, t, n, r) {
10162
- const s = this.resultBuffer, o = this.sampleValues, c = this.valueSize, A = c * 2, a = c * 3, h = r - t, u = (n - t) / h, m = u * u, p = m * u, E = e * a, g = E - a, l = -2 * p + 3 * m, d = p - m, f = 1 - l, b = d - m + u;
10162
+ const s = this.resultBuffer, o = this.sampleValues, c = this.valueSize, A = c * 2, a = c * 3, h = r - t, u = (n - t) / h, E = u * u, p = E * u, m = e * a, g = m - a, l = -2 * p + 3 * E, d = p - E, f = 1 - l, b = d - E + u;
10163
10163
  for (let I = 0; I !== c; I++) {
10164
- const C = o[g + I + c], v = o[g + I + A] * h, x = o[E + I + c], j = o[E + I] * h;
10164
+ const C = o[g + I + c], v = o[g + I + A] * h, x = o[m + I + c], j = o[m + I] * h;
10165
10165
  s[I] = f * C + b * v + l * x + d * j;
10166
10166
  }
10167
10167
  return s;
@@ -10264,16 +10264,16 @@ function Ya(i, e, t) {
10264
10264
  for (let a = 0, h = e.length; a < h; a++) {
10265
10265
  const u = e[a];
10266
10266
  if (n) {
10267
- const m = u.POSITION !== void 0 ? t.getDependency("accessor", u.POSITION) : i.attributes.position;
10268
- o.push(m);
10267
+ const E = u.POSITION !== void 0 ? t.getDependency("accessor", u.POSITION) : i.attributes.position;
10268
+ o.push(E);
10269
10269
  }
10270
10270
  if (r) {
10271
- const m = u.NORMAL !== void 0 ? t.getDependency("accessor", u.NORMAL) : i.attributes.normal;
10272
- c.push(m);
10271
+ const E = u.NORMAL !== void 0 ? t.getDependency("accessor", u.NORMAL) : i.attributes.normal;
10272
+ c.push(E);
10273
10273
  }
10274
10274
  if (s) {
10275
- const m = u.COLOR_0 !== void 0 ? t.getDependency("accessor", u.COLOR_0) : i.attributes.color;
10276
- A.push(m);
10275
+ const E = u.COLOR_0 !== void 0 ? t.getDependency("accessor", u.COLOR_0) : i.attributes.color;
10276
+ A.push(E);
10277
10277
  }
10278
10278
  }
10279
10279
  return Promise.all([
@@ -10281,8 +10281,8 @@ function Ya(i, e, t) {
10281
10281
  Promise.all(c),
10282
10282
  Promise.all(A)
10283
10283
  ]).then(function(a) {
10284
- const h = a[0], u = a[1], m = a[2];
10285
- return n && (i.morphAttributes.position = h), r && (i.morphAttributes.normal = u), s && (i.morphAttributes.color = m), i.morphTargetsRelative = !0, i;
10284
+ const h = a[0], u = a[1], E = a[2];
10285
+ return n && (i.morphAttributes.position = h), r && (i.morphAttributes.normal = u), s && (i.morphAttributes.color = E), i.morphTargetsRelative = !0, i;
10286
10286
  });
10287
10287
  }
10288
10288
  function Ja(i, e) {
@@ -10587,14 +10587,14 @@ class eA {
10587
10587
  }
10588
10588
  const s = [];
10589
10589
  return r.bufferView !== void 0 ? s.push(this.getDependency("bufferView", r.bufferView)) : s.push(null), r.sparse !== void 0 && (s.push(this.getDependency("bufferView", r.sparse.indices.bufferView)), s.push(this.getDependency("bufferView", r.sparse.values.bufferView))), Promise.all(s).then(function(o) {
10590
- const c = o[0], A = Rn[r.type], a = Ot[r.componentType], h = a.BYTES_PER_ELEMENT, u = h * A, m = r.byteOffset || 0, p = r.bufferView !== void 0 ? n.bufferViews[r.bufferView].byteStride : void 0, E = r.normalized === !0;
10590
+ const c = o[0], A = Rn[r.type], a = Ot[r.componentType], h = a.BYTES_PER_ELEMENT, u = h * A, E = r.byteOffset || 0, p = r.bufferView !== void 0 ? n.bufferViews[r.bufferView].byteStride : void 0, m = r.normalized === !0;
10591
10591
  let g, l;
10592
10592
  if (p && p !== u) {
10593
- const d = Math.floor(m / p), f = "InterleavedBuffer:" + r.bufferView + ":" + r.componentType + ":" + d + ":" + r.count;
10593
+ const d = Math.floor(E / p), f = "InterleavedBuffer:" + r.bufferView + ":" + r.componentType + ":" + d + ":" + r.count;
10594
10594
  let b = t.cache.get(f);
10595
- b || (g = new a(c, d * p, r.count * p / h), b = new Yi(g, p / h), t.cache.add(f, b)), l = new Ji(b, A, m % p / h, E);
10595
+ b || (g = new a(c, d * p, r.count * p / h), b = new Yi(g, p / h), t.cache.add(f, b)), l = new Ji(b, A, E % p / h, m);
10596
10596
  } else
10597
- c === null ? g = new a(r.count * A) : g = new a(c, m, r.count * A), l = new Kt(g, A, E);
10597
+ c === null ? g = new a(r.count * A) : g = new a(c, E, r.count * A), l = new Kt(g, A, m);
10598
10598
  if (r.sparse !== void 0) {
10599
10599
  const d = Rn.SCALAR, f = Ot[r.sparse.indices.componentType], b = r.sparse.indices.byteOffset || 0, I = r.sparse.values.byteOffset || 0, C = new f(o[1], b, r.sparse.count * d), v = new a(o[2], I, r.sparse.count * A);
10600
10600
  c !== null && (l = new Kt(l.array.slice(), l.itemSize, l.normalized)), l.normalized = !1;
@@ -10602,7 +10602,7 @@ class eA {
10602
10602
  const R = C[x];
10603
10603
  if (l.setX(R, v[x * A]), A >= 2 && l.setY(R, v[x * A + 1]), A >= 3 && l.setZ(R, v[x * A + 2]), A >= 4 && l.setW(R, v[x * A + 3]), A >= 5) throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
10604
10604
  }
10605
- l.normalized = E;
10605
+ l.normalized = m;
10606
10606
  }
10607
10607
  return l;
10608
10608
  });
@@ -10629,8 +10629,8 @@ class eA {
10629
10629
  return this.textureCache[A];
10630
10630
  const a = this.loadImageSource(t, n).then(function(h) {
10631
10631
  h.flipY = !1, h.name = o.name || c.name || "", h.name === "" && typeof c.uri == "string" && c.uri.startsWith("data:image/") === !1 && (h.name = c.uri);
10632
- const m = (s.samplers || {})[o.sampler] || {};
10633
- return h.magFilter = wi[m.magFilter] || Bt, h.minFilter = wi[m.minFilter] || Zt, h.wrapS = vi[m.wrapS] || Rt, h.wrapT = vi[m.wrapT] || Rt, h.generateMipmaps = !h.isCompressedTexture && h.minFilter !== An && h.minFilter !== Bt, r.associations.set(h, { textures: e }), h;
10632
+ const E = (s.samplers || {})[o.sampler] || {};
10633
+ return h.magFilter = wi[E.magFilter] || Bt, h.minFilter = wi[E.minFilter] || Zt, h.wrapS = vi[E.wrapS] || Rt, h.wrapT = vi[E.wrapT] || Rt, h.generateMipmaps = !h.isCompressedTexture && h.minFilter !== An && h.minFilter !== Bt, r.associations.set(h, { textures: e }), h;
10634
10634
  }).catch(function() {
10635
10635
  return null;
10636
10636
  });
@@ -10645,18 +10645,18 @@ class eA {
10645
10645
  if (o.bufferView !== void 0)
10646
10646
  A = n.getDependency("bufferView", o.bufferView).then(function(u) {
10647
10647
  a = !0;
10648
- const m = new Blob([u], { type: o.mimeType });
10649
- return A = c.createObjectURL(m), A;
10648
+ const E = new Blob([u], { type: o.mimeType });
10649
+ return A = c.createObjectURL(E), A;
10650
10650
  });
10651
10651
  else if (o.uri === void 0)
10652
10652
  throw new Error("THREE.GLTFLoader: Image " + e + " is missing URI and bufferView");
10653
10653
  const h = Promise.resolve(A).then(function(u) {
10654
- return new Promise(function(m, p) {
10655
- let E = m;
10656
- t.isImageBitmapLoader === !0 && (E = function(g) {
10654
+ return new Promise(function(E, p) {
10655
+ let m = E;
10656
+ t.isImageBitmapLoader === !0 && (m = function(g) {
10657
10657
  const l = new Ai(g);
10658
- l.needsUpdate = !0, m(l);
10659
- }), t.load(Ft.resolveURL(u, s.path), E, void 0, p);
10658
+ l.needsUpdate = !0, E(l);
10659
+ }), t.load(Ft.resolveURL(u, s.path), m, void 0, p);
10660
10660
  });
10661
10661
  }).then(function(u) {
10662
10662
  return a === !0 && c.revokeObjectURL(A), ct(u, o), u.userData.mimeType = o.mimeType || Za(o.uri), u;
@@ -10740,13 +10740,13 @@ class eA {
10740
10740
  } else {
10741
10741
  const u = s.pbrMetallicRoughness || {};
10742
10742
  if (c.color = new Xe(1, 1, 1), c.opacity = 1, Array.isArray(u.baseColorFactor)) {
10743
- const m = u.baseColorFactor;
10744
- c.color.setRGB(m[0], m[1], m[2], At), c.opacity = m[3];
10743
+ const E = u.baseColorFactor;
10744
+ c.color.setRGB(E[0], E[1], E[2], At), c.opacity = E[3];
10745
10745
  }
10746
- u.baseColorTexture !== void 0 && a.push(t.assignTexture(c, "map", u.baseColorTexture, Ze)), c.metalness = u.metallicFactor !== void 0 ? u.metallicFactor : 1, c.roughness = u.roughnessFactor !== void 0 ? u.roughnessFactor : 1, u.metallicRoughnessTexture !== void 0 && (a.push(t.assignTexture(c, "metalnessMap", u.metallicRoughnessTexture)), a.push(t.assignTexture(c, "roughnessMap", u.metallicRoughnessTexture))), o = this._invokeOne(function(m) {
10747
- return m.getMaterialType && m.getMaterialType(e);
10748
- }), a.push(Promise.all(this._invokeAll(function(m) {
10749
- return m.extendMaterialParams && m.extendMaterialParams(e, c);
10746
+ u.baseColorTexture !== void 0 && a.push(t.assignTexture(c, "map", u.baseColorTexture, Ze)), c.metalness = u.metallicFactor !== void 0 ? u.metallicFactor : 1, c.roughness = u.roughnessFactor !== void 0 ? u.roughnessFactor : 1, u.metallicRoughnessTexture !== void 0 && (a.push(t.assignTexture(c, "metalnessMap", u.metallicRoughnessTexture)), a.push(t.assignTexture(c, "roughnessMap", u.metallicRoughnessTexture))), o = this._invokeOne(function(E) {
10747
+ return E.getMaterialType && E.getMaterialType(e);
10748
+ }), a.push(Promise.all(this._invokeAll(function(E) {
10749
+ return E.extendMaterialParams && E.extendMaterialParams(e, c);
10750
10750
  })));
10751
10751
  }
10752
10752
  s.doubleSided === !0 && (c.side = Pi);
@@ -10797,8 +10797,8 @@ class eA {
10797
10797
  if (u)
10798
10798
  o.push(u.promise);
10799
10799
  else {
10800
- let m;
10801
- a.extensions && a.extensions[ke.KHR_DRACO_MESH_COMPRESSION] ? m = s(a) : m = Ti(new Ct(), a, t), r[h] = { primitive: a, promise: m }, o.push(m);
10800
+ let E;
10801
+ a.extensions && a.extensions[ke.KHR_DRACO_MESH_COMPRESSION] ? E = s(a) : E = Ti(new Ct(), a, t), r[h] = { primitive: a, promise: E }, o.push(E);
10802
10802
  }
10803
10803
  }
10804
10804
  return Promise.all(o);
@@ -10818,7 +10818,7 @@ class eA {
10818
10818
  }
10819
10819
  return c.push(t.loadGeometries(o)), Promise.all(c).then(function(A) {
10820
10820
  const a = A.slice(0, A.length - 1), h = A[A.length - 1], u = [];
10821
- for (let p = 0, E = h.length; p < E; p++) {
10821
+ for (let p = 0, m = h.length; p < m; p++) {
10822
10822
  const g = h[p], l = o[p];
10823
10823
  let d;
10824
10824
  const f = a[p];
@@ -10836,18 +10836,18 @@ class eA {
10836
10836
  throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " + l.mode);
10837
10837
  Object.keys(d.geometry.morphAttributes).length > 0 && Ja(d, s), d.name = t.createUniqueName(s.name || "mesh_" + e), ct(d, s), l.extensions && wt(r, d, l), t.assignFinalMaterial(d), u.push(d);
10838
10838
  }
10839
- for (let p = 0, E = u.length; p < E; p++)
10839
+ for (let p = 0, m = u.length; p < m; p++)
10840
10840
  t.associations.set(u[p], {
10841
10841
  meshes: e,
10842
10842
  primitives: p
10843
10843
  });
10844
10844
  if (u.length === 1)
10845
10845
  return s.extensions && wt(r, u[0], s), u[0];
10846
- const m = new zt();
10847
- s.extensions && wt(r, m, s), t.associations.set(m, { meshes: e });
10848
- for (let p = 0, E = u.length; p < E; p++)
10849
- m.add(u[p]);
10850
- return m;
10846
+ const E = new zt();
10847
+ s.extensions && wt(r, E, s), t.associations.set(E, { meshes: e });
10848
+ for (let p = 0, m = u.length; p < m; p++)
10849
+ E.add(u[p]);
10850
+ return E;
10851
10851
  });
10852
10852
  }
10853
10853
  /**
@@ -10883,8 +10883,8 @@ class eA {
10883
10883
  const u = o[a];
10884
10884
  if (u) {
10885
10885
  c.push(u);
10886
- const m = new Mt();
10887
- s !== null && m.fromArray(s.array, a * 16), A.push(m);
10886
+ const E = new Mt();
10887
+ s !== null && E.fromArray(s.array, a * 16), A.push(E);
10888
10888
  } else
10889
10889
  console.warn('THREE.GLTFLoader: Joint "%s" could not be found.', t.joints[a]);
10890
10890
  }
@@ -10900,9 +10900,9 @@ class eA {
10900
10900
  */
10901
10901
  loadAnimation(e) {
10902
10902
  const t = this.json, n = this, r = t.animations[e], s = r.name ? r.name : "animation_" + e, o = [], c = [], A = [], a = [], h = [];
10903
- for (let u = 0, m = r.channels.length; u < m; u++) {
10904
- const p = r.channels[u], E = r.samplers[p.sampler], g = p.target, l = g.node, d = r.parameters !== void 0 ? r.parameters[E.input] : E.input, f = r.parameters !== void 0 ? r.parameters[E.output] : E.output;
10905
- g.node !== void 0 && (o.push(this.getDependency("node", l)), c.push(this.getDependency("accessor", d)), A.push(this.getDependency("accessor", f)), a.push(E), h.push(g));
10903
+ for (let u = 0, E = r.channels.length; u < E; u++) {
10904
+ const p = r.channels[u], m = r.samplers[p.sampler], g = p.target, l = g.node, d = r.parameters !== void 0 ? r.parameters[m.input] : m.input, f = r.parameters !== void 0 ? r.parameters[m.output] : m.output;
10905
+ g.node !== void 0 && (o.push(this.getDependency("node", l)), c.push(this.getDependency("accessor", d)), A.push(this.getDependency("accessor", f)), a.push(m), h.push(g));
10906
10906
  }
10907
10907
  return Promise.all([
10908
10908
  Promise.all(o),
@@ -10911,9 +10911,9 @@ class eA {
10911
10911
  Promise.all(a),
10912
10912
  Promise.all(h)
10913
10913
  ]).then(function(u) {
10914
- const m = u[0], p = u[1], E = u[2], g = u[3], l = u[4], d = [];
10915
- for (let b = 0, I = m.length; b < I; b++) {
10916
- const C = m[b], v = p[b], x = E[b], j = g[b], R = l[b];
10914
+ const E = u[0], p = u[1], m = u[2], g = u[3], l = u[4], d = [];
10915
+ for (let b = 0, I = E.length; b < I; b++) {
10916
+ const C = E[b], v = p[b], x = m[b], j = g[b], R = l[b];
10917
10917
  if (C === void 0) continue;
10918
10918
  C.updateMatrix && C.updateMatrix();
10919
10919
  const M = n._createAnimationTracks(C, v, x, j, R);
@@ -10953,11 +10953,11 @@ class eA {
10953
10953
  Promise.all(o),
10954
10954
  A
10955
10955
  ]).then(function(a) {
10956
- const h = a[0], u = a[1], m = a[2];
10957
- m !== null && h.traverse(function(p) {
10958
- p.isSkinnedMesh && p.bind(m, $a);
10956
+ const h = a[0], u = a[1], E = a[2];
10957
+ E !== null && h.traverse(function(p) {
10958
+ p.isSkinnedMesh && p.bind(E, $a);
10959
10959
  });
10960
- for (let p = 0, E = u.length; p < E; p++)
10960
+ for (let p = 0, m = u.length; p < m; p++)
10961
10961
  h.add(u[p]);
10962
10962
  return h;
10963
10963
  });
@@ -10980,7 +10980,7 @@ class eA {
10980
10980
  }), this.nodeCache[e] = Promise.all(c).then(function(a) {
10981
10981
  let h;
10982
10982
  if (s.isBone === !0 ? h = new Ki() : a.length > 1 ? h = new zt() : a.length === 1 ? h = a[0] : h = new ut(), h !== a[0])
10983
- for (let u = 0, m = a.length; u < m; u++)
10983
+ for (let u = 0, E = a.length; u < E; u++)
10984
10984
  h.add(a[u]);
10985
10985
  if (s.name && (h.userData.name = s.name, h.name = o), ct(h, s), s.extensions && wt(n, h, s), s.matrix !== void 0) {
10986
10986
  const u = new Mt();
@@ -11014,11 +11014,11 @@ class eA {
11014
11014
  s.add(A[h]);
11015
11015
  const a = (h) => {
11016
11016
  const u = /* @__PURE__ */ new Map();
11017
- for (const [m, p] of r.associations)
11018
- (m instanceof Bn || m instanceof Ai) && u.set(m, p);
11019
- return h.traverse((m) => {
11020
- const p = r.associations.get(m);
11021
- p != null && u.set(m, p);
11017
+ for (const [E, p] of r.associations)
11018
+ (E instanceof Bn || E instanceof Ai) && u.set(E, p);
11019
+ return h.traverse((E) => {
11020
+ const p = r.associations.get(E);
11021
+ p != null && u.set(E, p);
11022
11022
  }), u;
11023
11023
  };
11024
11024
  return r.associations = a(s), s;
@@ -11026,8 +11026,8 @@ class eA {
11026
11026
  }
11027
11027
  _createAnimationTracks(e, t, n, r, s) {
11028
11028
  const o = [], c = e.name ? e.name : e.uuid, A = [];
11029
- bt[s.path] === bt.weights ? e.traverse(function(m) {
11030
- m.morphTargetInfluences && A.push(m.name ? m.name : m.uuid);
11029
+ bt[s.path] === bt.weights ? e.traverse(function(E) {
11030
+ E.morphTargetInfluences && A.push(E.name ? E.name : E.uuid);
11031
11031
  }) : A.push(c);
11032
11032
  let a;
11033
11033
  switch (bt[s.path]) {
@@ -11046,14 +11046,14 @@ class eA {
11046
11046
  break;
11047
11047
  }
11048
11048
  const h = r.interpolation !== void 0 ? Va[r.interpolation] : $i, u = this._getArrayFromAccessor(n);
11049
- for (let m = 0, p = A.length; m < p; m++) {
11050
- const E = new a(
11051
- A[m] + "." + bt[s.path],
11049
+ for (let E = 0, p = A.length; E < p; E++) {
11050
+ const m = new a(
11051
+ A[E] + "." + bt[s.path],
11052
11052
  t.array,
11053
11053
  u,
11054
11054
  h
11055
11055
  );
11056
- r.interpolation === "CUBICSPLINE" && this._createCubicSplineTrackInterpolant(E), o.push(E);
11056
+ r.interpolation === "CUBICSPLINE" && this._createCubicSplineTrackInterpolant(m), o.push(m);
11057
11057
  }
11058
11058
  return o;
11059
11059
  }
@@ -11098,10 +11098,10 @@ function tA(i, e, t) {
11098
11098
  for (let a = 0, h = s.length; a < h; a++) {
11099
11099
  const u = s[a];
11100
11100
  if (u.POSITION !== void 0) {
11101
- const m = t.json.accessors[u.POSITION], p = m.min, E = m.max;
11102
- if (p !== void 0 && E !== void 0) {
11103
- if (A.setX(Math.max(Math.abs(p[0]), Math.abs(E[0]))), A.setY(Math.max(Math.abs(p[1]), Math.abs(E[1]))), A.setZ(Math.max(Math.abs(p[2]), Math.abs(E[2]))), m.normalized) {
11104
- const g = Yn(Ot[m.componentType]);
11101
+ const E = t.json.accessors[u.POSITION], p = E.min, m = E.max;
11102
+ if (p !== void 0 && m !== void 0) {
11103
+ if (A.setX(Math.max(Math.abs(p[0]), Math.abs(m[0]))), A.setY(Math.max(Math.abs(p[1]), Math.abs(m[1]))), A.setZ(Math.max(Math.abs(p[2]), Math.abs(m[2]))), E.normalized) {
11104
+ const g = Yn(Ot[E.componentType]);
11105
11105
  A.multiplyScalar(g);
11106
11106
  }
11107
11107
  c.max(A);
@@ -11343,14 +11343,14 @@ function iA() {
11343
11343
  case "decode":
11344
11344
  const A = c.buffer, a = c.taskConfig;
11345
11345
  e.then((h) => {
11346
- const u = h.draco, m = new u.Decoder();
11346
+ const u = h.draco, E = new u.Decoder();
11347
11347
  try {
11348
- const p = t(u, m, new Int8Array(A), a), E = p.attributes.map((g) => g.array.buffer);
11349
- p.index && E.push(p.index.array.buffer), self.postMessage({ type: "decode", id: c.id, geometry: p }, E);
11348
+ const p = t(u, E, new Int8Array(A), a), m = p.attributes.map((g) => g.array.buffer);
11349
+ p.index && m.push(p.index.array.buffer), self.postMessage({ type: "decode", id: c.id, geometry: p }, m);
11350
11350
  } catch (p) {
11351
11351
  console.error(p), self.postMessage({ type: "error", id: c.id, error: p.message });
11352
11352
  } finally {
11353
- u.destroy(m);
11353
+ u.destroy(E);
11354
11354
  }
11355
11355
  });
11356
11356
  break;
@@ -11358,40 +11358,40 @@ function iA() {
11358
11358
  };
11359
11359
  function t(o, c, A, a) {
11360
11360
  const h = a.attributeIDs, u = a.attributeTypes;
11361
- let m, p;
11362
- const E = c.GetEncodedGeometryType(A);
11363
- if (E === o.TRIANGULAR_MESH)
11364
- m = new o.Mesh(), p = c.DecodeArrayToMesh(A, A.byteLength, m);
11365
- else if (E === o.POINT_CLOUD)
11366
- m = new o.PointCloud(), p = c.DecodeArrayToPointCloud(A, A.byteLength, m);
11361
+ let E, p;
11362
+ const m = c.GetEncodedGeometryType(A);
11363
+ if (m === o.TRIANGULAR_MESH)
11364
+ E = new o.Mesh(), p = c.DecodeArrayToMesh(A, A.byteLength, E);
11365
+ else if (m === o.POINT_CLOUD)
11366
+ E = new o.PointCloud(), p = c.DecodeArrayToPointCloud(A, A.byteLength, E);
11367
11367
  else
11368
11368
  throw new Error("THREE.DRACOLoader: Unexpected geometry type.");
11369
- if (!p.ok() || m.ptr === 0)
11369
+ if (!p.ok() || E.ptr === 0)
11370
11370
  throw new Error("THREE.DRACOLoader: Decoding failed: " + p.error_msg());
11371
11371
  const g = { index: null, attributes: [] };
11372
11372
  for (const l in h) {
11373
11373
  const d = self[u[l]];
11374
11374
  let f, b;
11375
11375
  if (a.useUniqueIDs)
11376
- b = h[l], f = c.GetAttributeByUniqueId(m, b);
11376
+ b = h[l], f = c.GetAttributeByUniqueId(E, b);
11377
11377
  else {
11378
- if (b = c.GetAttributeId(m, o[h[l]]), b === -1) continue;
11379
- f = c.GetAttribute(m, b);
11378
+ if (b = c.GetAttributeId(E, o[h[l]]), b === -1) continue;
11379
+ f = c.GetAttribute(E, b);
11380
11380
  }
11381
- const I = r(o, c, m, l, d, f);
11381
+ const I = r(o, c, E, l, d, f);
11382
11382
  l === "color" && (I.vertexColorSpace = a.vertexColorSpace), g.attributes.push(I);
11383
11383
  }
11384
- return E === o.TRIANGULAR_MESH && (g.index = n(o, c, m)), o.destroy(m), g;
11384
+ return m === o.TRIANGULAR_MESH && (g.index = n(o, c, E)), o.destroy(E), g;
11385
11385
  }
11386
11386
  function n(o, c, A) {
11387
- const h = A.num_faces() * 3, u = h * 4, m = o._malloc(u);
11388
- c.GetTrianglesUInt32Array(A, u, m);
11389
- const p = new Uint32Array(o.HEAPF32.buffer, m, h).slice();
11390
- return o._free(m), { array: p, itemSize: 1 };
11387
+ const h = A.num_faces() * 3, u = h * 4, E = o._malloc(u);
11388
+ c.GetTrianglesUInt32Array(A, u, E);
11389
+ const p = new Uint32Array(o.HEAPF32.buffer, E, h).slice();
11390
+ return o._free(E), { array: p, itemSize: 1 };
11391
11391
  }
11392
11392
  function r(o, c, A, a, h, u) {
11393
- const m = A.num_points(), p = u.num_components(), E = s(o, h), g = p * h.BYTES_PER_ELEMENT, l = Math.ceil(g / 4) * 4, d = l / h.BYTES_PER_ELEMENT, f = m * g, b = m * l, I = o._malloc(f);
11394
- c.GetAttributeDataArrayForAllPoints(A, u, E, f, I);
11393
+ const E = A.num_points(), p = u.num_components(), m = s(o, h), g = p * h.BYTES_PER_ELEMENT, l = Math.ceil(g / 4) * 4, d = l / h.BYTES_PER_ELEMENT, f = E * g, b = E * l, I = o._malloc(f);
11394
+ c.GetAttributeDataArrayForAllPoints(A, u, m, f, I);
11395
11395
  const C = new h(o.HEAPF32.buffer, I, f / h.BYTES_PER_ELEMENT);
11396
11396
  let v;
11397
11397
  if (g === l)
@@ -11407,7 +11407,7 @@ function iA() {
11407
11407
  }
11408
11408
  return o._free(I), {
11409
11409
  name: a,
11410
- count: m,
11410
+ count: E,
11411
11411
  itemSize: p,
11412
11412
  array: v,
11413
11413
  stride: d
@@ -11546,11 +11546,11 @@ function dA(i) {
11546
11546
  if (e[0] !== $e[0] || e[1] !== $e[1] || e[2] !== $e[2] || e[3] !== $e[3] || e[4] !== $e[4] || e[5] !== $e[5] || e[6] !== $e[6] || e[7] !== $e[7] || e[8] !== $e[8] || e[9] !== $e[9] || e[10] !== $e[10] || e[11] !== $e[11]) throw new Error("Missing KTX 2.0 identifier.");
11547
11547
  const t = { vkFormat: 0, typeSize: 1, pixelWidth: 0, pixelHeight: 0, pixelDepth: 0, layerCount: 0, faceCount: 1, levelCount: 0, supercompressionScheme: 0, levels: [], dataFormatDescriptor: [{ vendorId: 0, descriptorType: 0, versionNumber: 2, colorModel: 0, colorPrimaries: 1, transferFunction: 2, flags: 0, texelBlockDimension: [0, 0, 0, 0], bytesPlane: [0, 0, 0, 0, 0, 0, 0, 0], samples: [] }], keyValue: {}, globalData: null }, n = 17 * Uint32Array.BYTES_PER_ELEMENT, r = new Ut(i, $e.length, n, !0);
11548
11548
  t.vkFormat = r._nextUint32(), t.typeSize = r._nextUint32(), t.pixelWidth = r._nextUint32(), t.pixelHeight = r._nextUint32(), t.pixelDepth = r._nextUint32(), t.layerCount = r._nextUint32(), t.faceCount = r._nextUint32(), t.levelCount = r._nextUint32(), t.supercompressionScheme = r._nextUint32();
11549
- const s = r._nextUint32(), o = r._nextUint32(), c = r._nextUint32(), A = r._nextUint32(), a = r._nextUint64(), h = r._nextUint64(), u = 3 * Math.max(t.levelCount, 1) * 8, m = new Ut(i, $e.length + n, u, !0);
11550
- for (let oe = 0, se = Math.max(t.levelCount, 1); oe < se; oe++) t.levels.push({ levelData: new Uint8Array(i.buffer, i.byteOffset + m._nextUint64(), m._nextUint64()), uncompressedByteLength: m._nextUint64() });
11549
+ const s = r._nextUint32(), o = r._nextUint32(), c = r._nextUint32(), A = r._nextUint32(), a = r._nextUint64(), h = r._nextUint64(), u = 3 * Math.max(t.levelCount, 1) * 8, E = new Ut(i, $e.length + n, u, !0);
11550
+ for (let oe = 0, se = Math.max(t.levelCount, 1); oe < se; oe++) t.levels.push({ levelData: new Uint8Array(i.buffer, i.byteOffset + E._nextUint64(), E._nextUint64()), uncompressedByteLength: E._nextUint64() });
11551
11551
  const p = new Ut(i, s, o, !0);
11552
11552
  p._skip(4);
11553
- const E = p._nextUint16(), g = p._nextUint16(), l = p._nextUint16(), d = p._nextUint16(), f = { vendorId: E, descriptorType: g, versionNumber: l, colorModel: p._nextUint8(), colorPrimaries: p._nextUint8(), transferFunction: p._nextUint8(), flags: p._nextUint8(), texelBlockDimension: [p._nextUint8(), p._nextUint8(), p._nextUint8(), p._nextUint8()], bytesPlane: [p._nextUint8(), p._nextUint8(), p._nextUint8(), p._nextUint8(), p._nextUint8(), p._nextUint8(), p._nextUint8(), p._nextUint8()], samples: [] }, b = (d / 4 - 6) / 4;
11553
+ const m = p._nextUint16(), g = p._nextUint16(), l = p._nextUint16(), d = p._nextUint16(), f = { vendorId: m, descriptorType: g, versionNumber: l, colorModel: p._nextUint8(), colorPrimaries: p._nextUint8(), transferFunction: p._nextUint8(), flags: p._nextUint8(), texelBlockDimension: [p._nextUint8(), p._nextUint8(), p._nextUint8(), p._nextUint8()], bytesPlane: [p._nextUint8(), p._nextUint8(), p._nextUint8(), p._nextUint8(), p._nextUint8(), p._nextUint8(), p._nextUint8(), p._nextUint8()], samples: [] }, b = (d / 4 - 6) / 4;
11554
11554
  for (let oe = 0; oe < b; oe++) {
11555
11555
  const se = { bitOffset: p._nextUint16(), bitLength: p._nextUint8(), channelType: p._nextUint8(), samplePosition: [p._nextUint8(), p._nextUint8(), p._nextUint8(), p._nextUint8()], sampleLower: Number.NEGATIVE_INFINITY, sampleUpper: Number.POSITIVE_INFINITY };
11556
11556
  64 & se.channelType ? (se.sampleLower = p._nextInt32(), se.sampleUpper = p._nextInt32()) : (se.sampleLower = p._nextUint32(), se.sampleUpper = p._nextUint32()), f.samples[oe] = se;
@@ -11735,8 +11735,8 @@ class rt extends dt {
11735
11735
  if (t.faceCount === 6)
11736
11736
  u = new Us(s, A, a);
11737
11737
  else {
11738
- const m = s[0].mipmaps;
11739
- u = t.layerCount > 1 ? new js(m, o, c, t.layerCount, A, a) : new er(m, o, c, A, a);
11738
+ const E = s[0].mipmaps;
11739
+ u = t.layerCount > 1 ? new js(E, o, c, t.layerCount, A, a) : new er(E, o, c, A, a);
11740
11740
  }
11741
11741
  return u.minFilter = s[0].mipmaps.length === 1 ? Bt : Zt, u.magFilter = Bt, u.generateMipmaps = !1, u.needsUpdate = !0, u.colorSpace = As(t), u.premultiplyAlpha = !!(h & oA), u;
11742
11742
  }
@@ -11809,8 +11809,8 @@ rt.EngineType = {
11809
11809
  rt.BasisWorker = function() {
11810
11810
  let i, e, t;
11811
11811
  const n = _EngineFormat, r = _EngineType, s = _TranscoderFormat, o = _BasisFormat;
11812
- self.addEventListener("message", function(E) {
11813
- const g = E.data;
11812
+ self.addEventListener("message", function(m) {
11813
+ const g = m.data;
11814
11814
  switch (g.type) {
11815
11815
  case "init":
11816
11816
  i = g.config, c(g.transcoderBinary);
@@ -11827,15 +11827,15 @@ rt.BasisWorker = function() {
11827
11827
  break;
11828
11828
  }
11829
11829
  });
11830
- function c(E) {
11830
+ function c(m) {
11831
11831
  e = new Promise((g) => {
11832
- t = { wasmBinary: E, onRuntimeInitialized: g }, BASIS(t);
11832
+ t = { wasmBinary: m, onRuntimeInitialized: g }, BASIS(t);
11833
11833
  }).then(() => {
11834
11834
  t.initializeBasis(), t.KTX2File === void 0 && console.warn("THREE.KTX2Loader: Please update Basis Universal transcoder.");
11835
11835
  });
11836
11836
  }
11837
- function A(E) {
11838
- const g = new t.KTX2File(new Uint8Array(E));
11837
+ function A(m) {
11838
+ const g = new t.KTX2File(new Uint8Array(m));
11839
11839
  function l() {
11840
11840
  g.close(), g.delete();
11841
11841
  }
@@ -11966,34 +11966,34 @@ rt.BasisWorker = function() {
11966
11966
  needsPowerOfTwo: !1
11967
11967
  }
11968
11968
  ], h = {
11969
- [o.ETC1S]: a.filter((E) => E.basisFormat.includes(o.ETC1S)).sort((E, g) => E.priorityETC1S - g.priorityETC1S),
11970
- [o.UASTC]: a.filter((E) => E.basisFormat.includes(o.UASTC)).sort((E, g) => E.priorityUASTC - g.priorityUASTC),
11971
- [o.UASTC_HDR]: a.filter((E) => E.basisFormat.includes(o.UASTC_HDR)).sort((E, g) => E.priorityHDR - g.priorityHDR)
11969
+ [o.ETC1S]: a.filter((m) => m.basisFormat.includes(o.ETC1S)).sort((m, g) => m.priorityETC1S - g.priorityETC1S),
11970
+ [o.UASTC]: a.filter((m) => m.basisFormat.includes(o.UASTC)).sort((m, g) => m.priorityUASTC - g.priorityUASTC),
11971
+ [o.UASTC_HDR]: a.filter((m) => m.basisFormat.includes(o.UASTC_HDR)).sort((m, g) => m.priorityHDR - g.priorityHDR)
11972
11972
  };
11973
- function u(E, g, l, d) {
11974
- const f = h[E];
11973
+ function u(m, g, l, d) {
11974
+ const f = h[m];
11975
11975
  for (let b = 0; b < f.length; b++) {
11976
11976
  const I = f[b];
11977
- if (I.if && !i[I.if] || !I.basisFormat.includes(E) || d && I.transcoderFormat.length < 2 || I.needsPowerOfTwo && !(m(g) && m(l))) continue;
11977
+ if (I.if && !i[I.if] || !I.basisFormat.includes(m) || d && I.transcoderFormat.length < 2 || I.needsPowerOfTwo && !(E(g) && E(l))) continue;
11978
11978
  const C = I.transcoderFormat[d ? 1 : 0], v = I.engineFormat[d ? 1 : 0], x = I.engineType[0];
11979
11979
  return { transcoderFormat: C, engineFormat: v, engineType: x };
11980
11980
  }
11981
11981
  throw new Error("THREE.KTX2Loader: Failed to identify transcoding target.");
11982
11982
  }
11983
- function m(E) {
11984
- return E <= 2 ? !0 : (E & E - 1) === 0 && E !== 0;
11983
+ function E(m) {
11984
+ return m <= 2 ? !0 : (m & m - 1) === 0 && m !== 0;
11985
11985
  }
11986
- function p(E) {
11987
- if (E.length === 1) return E[0];
11986
+ function p(m) {
11987
+ if (m.length === 1) return m[0];
11988
11988
  let g = 0;
11989
- for (let f = 0; f < E.length; f++) {
11990
- const b = E[f];
11989
+ for (let f = 0; f < m.length; f++) {
11990
+ const b = m[f];
11991
11991
  g += b.byteLength;
11992
11992
  }
11993
11993
  const l = new Uint8Array(g);
11994
11994
  let d = 0;
11995
- for (let f = 0; f < E.length; f++) {
11996
- const b = E[f];
11995
+ for (let f = 0; f < m.length; f++) {
11996
+ const b = m[f];
11997
11997
  l.set(b, d), d += b.byteLength;
11998
11998
  }
11999
11999
  return l;
@@ -12106,21 +12106,21 @@ async function EA(i) {
12106
12106
  u = t.decode(h.levelData, h.uncompressedByteLength);
12107
12107
  else
12108
12108
  throw new Error("THREE.KTX2Loader: Unsupported supercompressionScheme.");
12109
- let m;
12110
- Dt[e] === Vt ? m = new Float32Array(
12109
+ let E;
12110
+ Dt[e] === Vt ? E = new Float32Array(
12111
12111
  u.buffer,
12112
12112
  u.byteOffset,
12113
12113
  u.byteLength / Float32Array.BYTES_PER_ELEMENT
12114
- ) : Dt[e] === vt ? m = new Uint16Array(
12114
+ ) : Dt[e] === vt ? E = new Uint16Array(
12115
12115
  u.buffer,
12116
12116
  u.byteOffset,
12117
12117
  u.byteLength / Uint16Array.BYTES_PER_ELEMENT
12118
- ) : Dt[e] === rr || Dt[e] === ir ? m = new Uint32Array(
12118
+ ) : Dt[e] === rr || Dt[e] === ir ? E = new Uint32Array(
12119
12119
  u.buffer,
12120
12120
  u.byteOffset,
12121
12121
  u.byteLength / Uint32Array.BYTES_PER_ELEMENT
12122
- ) : m = u, n.push({
12123
- data: m,
12122
+ ) : E = u, n.push({
12123
+ data: E,
12124
12124
  width: c,
12125
12125
  height: A,
12126
12126
  depth: a
@@ -12287,7 +12287,7 @@ var cs = (function() {
12287
12287
  ATTRIBUTES: "meshopt_decodeVertexBuffer",
12288
12288
  TRIANGLES: "meshopt_decodeIndexBuffer",
12289
12289
  INDICES: "meshopt_decodeIndexSequence"
12290
- }, u = [], m = 0;
12290
+ }, u = [], E = 0;
12291
12291
  function p(d) {
12292
12292
  var f = {
12293
12293
  object: new Worker(d),
@@ -12299,7 +12299,7 @@ var cs = (function() {
12299
12299
  f.pending -= I.count, f.requests[I.id][I.action](I.value), delete f.requests[I.id];
12300
12300
  }, f;
12301
12301
  }
12302
- function E(d) {
12302
+ function m(d) {
12303
12303
  for (var f = "self.ready = WebAssembly.instantiate(new Uint8Array([" + new Uint8Array(r) + "]), {}).then(function(result) { result.instance.exports.__wasm_call_ctors(); return result.instance; });self.onmessage = " + l.name + ";" + A.toString() + l.toString(), b = new Blob([f], { type: "text/javascript" }), I = URL.createObjectURL(b), C = u.length; C < d; ++C)
12304
12304
  u[C] = p(I);
12305
12305
  for (var C = d; C < u.length; ++C)
@@ -12310,7 +12310,7 @@ var cs = (function() {
12310
12310
  for (var v = u[0], x = 1; x < u.length; ++x)
12311
12311
  u[x].pending < v.pending && (v = u[x]);
12312
12312
  return new Promise(function(j, R) {
12313
- var M = new Uint8Array(b), _ = ++m;
12313
+ var M = new Uint8Array(b), _ = ++E;
12314
12314
  v.pending += d, v.requests[_] = { resolve: j, reject: R }, v.object.postMessage({ id: _, count: d, size: f, source: M, mode: I, filter: C }, [M.buffer]);
12315
12315
  });
12316
12316
  }
@@ -12331,7 +12331,7 @@ var cs = (function() {
12331
12331
  ready: o,
12332
12332
  supported: !0,
12333
12333
  useWorkers: function(d) {
12334
- E(d);
12334
+ m(d);
12335
12335
  },
12336
12336
  decodeVertexBuffer: function(d, f, b, I, C) {
12337
12337
  A(s, s.exports.meshopt_decodeVertexBuffer, d, f, b, I, s.exports[a[C]]);
@@ -13061,8 +13061,8 @@ function xA(i, e, t, n) {
13061
13061
  `)
13062
13062
  A = 0, a -= o;
13063
13063
  else {
13064
- const m = LA(u, s, A, a, t);
13065
- n == "tb" ? (A = 0, a += t.ascender * s) : A += m.offsetX, c.push(m.path);
13064
+ const E = LA(u, s, A, a, t);
13065
+ n == "tb" ? (A = 0, a += t.ascender * s) : A += E.offsetX, c.push(E.path);
13066
13066
  }
13067
13067
  }
13068
13068
  return c;
@@ -13074,7 +13074,7 @@ function LA(i, e, t, n, r) {
13074
13074
  return;
13075
13075
  }
13076
13076
  const o = new no();
13077
- let c, A, a, h, u, m, p, E;
13077
+ let c, A, a, h, u, E, p, m;
13078
13078
  if (s.o) {
13079
13079
  const g = s._cachedOutline || (s._cachedOutline = s.o.split(" "));
13080
13080
  for (let l = 0, d = g.length; l < d; )
@@ -13086,10 +13086,10 @@ function LA(i, e, t, n, r) {
13086
13086
  c = g[l++] * e + t, A = g[l++] * e + n, o.lineTo(c, A);
13087
13087
  break;
13088
13088
  case "q":
13089
- a = g[l++] * e + t, h = g[l++] * e + n, u = g[l++] * e + t, m = g[l++] * e + n, o.quadraticCurveTo(u, m, a, h);
13089
+ a = g[l++] * e + t, h = g[l++] * e + n, u = g[l++] * e + t, E = g[l++] * e + n, o.quadraticCurveTo(u, E, a, h);
13090
13090
  break;
13091
13091
  case "b":
13092
- a = g[l++] * e + t, h = g[l++] * e + n, u = g[l++] * e + t, m = g[l++] * e + n, p = g[l++] * e + t, E = g[l++] * e + n, o.bezierCurveTo(u, m, p, E, a, h);
13092
+ a = g[l++] * e + t, h = g[l++] * e + n, u = g[l++] * e + t, E = g[l++] * e + n, p = g[l++] * e + t, m = g[l++] * e + n, o.bezierCurveTo(u, E, p, m, a, h);
13093
13093
  break;
13094
13094
  }
13095
13095
  }
@@ -13272,6 +13272,7 @@ class MA extends HTMLElement {
13272
13272
  * `x`・`y` ともに -1 〜 1 の範囲で、中央が `0`、最大傾きが `±1` です。
13273
13273
  */
13274
13274
  leftJoystick;
13275
+ _leftPointerId = null;
13275
13276
  _rightActive;
13276
13277
  _rightCenter;
13277
13278
  /**
@@ -13279,6 +13280,7 @@ class MA extends HTMLElement {
13279
13280
  * `x`・`y` ともに -1 〜 1 の範囲で、中央が `0`、最大傾きが `±1` です。
13280
13281
  */
13281
13282
  rightJoystick;
13283
+ _rightPointerId = null;
13282
13284
  /** 左ボタンが押されているとき `true`(PC では Space キーに対応)。 */
13283
13285
  leftButton;
13284
13286
  /** 右ボタンが押されているとき `true`(PC では Enter キーに対応)。 */
@@ -13375,59 +13377,65 @@ class MA extends HTMLElement {
13375
13377
  <button class="btn left">L</button>
13376
13378
  <button class="btn right">R</button>
13377
13379
  </div>
13378
- `, this.canvas = this.shadowRoot.querySelector("canvas-a3"), this.scene = this.canvas.scene, this.camera = this.canvas.camera, this.controller = this.canvas.controller, this._maxDistance = 40, this._leftActive = !1, this._leftCenter = { x: 0, y: 0 }, this.leftJoystick = { x: 0, y: 0 }, this._rightActive = !1, this._rightCenter = { x: 0, y: 0 }, this.rightJoystick = { x: 0, y: 0 }, this.leftButton = !1, this.rightButton = !1, this.keys = /* @__PURE__ */ new Set(), this._leftButtonCount = 0, this._rightButtonCount = 0;
13380
+ `, this.style.touchAction = "none", this.canvas = this.shadowRoot.querySelector("canvas-a3"), this.scene = this.canvas.scene, this.camera = this.canvas.camera, this.controller = this.canvas.controller, this._maxDistance = 40, this._leftActive = !1, this._leftCenter = { x: 0, y: 0 }, this.leftJoystick = { x: 0, y: 0 }, this._leftPointerId, this._rightActive = !1, this._rightCenter = { x: 0, y: 0 }, this.rightJoystick = { x: 0, y: 0 }, this.leftButton = !1, this.rightButton = !1, this.keys = /* @__PURE__ */ new Set(), this._leftButtonCount = 0, this._rightButtonCount = 0;
13379
13381
  const t = this.shadowRoot.querySelector(".joystick.left .stick");
13380
13382
  if (!t) return;
13381
- t.addEventListener("pointerdown", (o) => {
13382
- this._leftActive = !0;
13383
- const c = t.getBoundingClientRect();
13384
- this._leftCenter.x = c.left + c.width / 2, this._leftCenter.y = c.top + c.height / 2, t.setPointerCapture(o.pointerId);
13385
- }), t.addEventListener("pointermove", (o) => {
13386
- if (!this._leftActive) return;
13387
- const c = o.clientX - this._leftCenter.x, A = o.clientY - this._leftCenter.y, a = Math.sqrt(c * c + A * A);
13388
- let h = c, u = A;
13389
- if (a > 40) {
13390
- const m = Math.atan2(A, c);
13391
- h = Math.cos(m) * this._maxDistance, u = Math.sin(m) * this._maxDistance;
13392
- }
13393
- t.style.transform = `translate(calc(-50% + ${h}px), calc(-50% + ${u}px))`, this.leftJoystick.x = h / this._maxDistance, this.leftJoystick.y = -(u / this._maxDistance);
13394
- }), t.addEventListener("pointerup", () => {
13395
- this._leftActive = !1, t.style.transform = "translate(-50%, -50%)", this.leftJoystick.x = 0, this.leftJoystick.y = 0;
13383
+ t.addEventListener("pointerdown", (A) => {
13384
+ if (this._leftPointerId !== null) return;
13385
+ this._leftPointerId = A.pointerId, this._leftActive = !0, t.setPointerCapture(A.pointerId);
13386
+ const a = t.getBoundingClientRect();
13387
+ this._leftCenter.x = a.left + a.width / 2, this._leftCenter.y = a.top + a.height / 2;
13388
+ }), t.addEventListener("pointermove", (A) => {
13389
+ if (!this._leftActive || A.pointerId !== this._leftPointerId) return;
13390
+ const a = A.clientX - this._leftCenter.x, h = A.clientY - this._leftCenter.y, u = Math.sqrt(a * a + h * h);
13391
+ let E = a, p = h;
13392
+ if (u > this._maxDistance) {
13393
+ const m = Math.atan2(h, a);
13394
+ E = Math.cos(m) * this._maxDistance, p = Math.sin(m) * this._maxDistance;
13395
+ }
13396
+ t.style.transform = `translate(calc(-50% + ${E}px), calc(-50% + ${p}px))`, this.leftJoystick.x = E / this._maxDistance, this.leftJoystick.y = -(p / this._maxDistance);
13396
13397
  });
13397
- const n = this.shadowRoot.querySelector(".joystick.right .stick");
13398
- if (!n) return;
13399
- n.addEventListener("pointerdown", (o) => {
13400
- this._rightActive = !0;
13401
- const c = n.getBoundingClientRect();
13402
- this._rightCenter.x = c.left + c.width / 2, this._rightCenter.y = c.top + c.height / 2, n.setPointerCapture(o.pointerId);
13403
- }), n.addEventListener("pointermove", (o) => {
13404
- if (!this._rightActive) return;
13405
- const c = o.clientX - this._rightCenter.x, A = o.clientY - this._rightCenter.y, a = Math.sqrt(c * c + A * A);
13406
- let h = c, u = A;
13407
- if (a > 40) {
13408
- const m = Math.atan2(A, c);
13409
- h = Math.cos(m) * this._maxDistance, u = Math.sin(m) * this._maxDistance;
13410
- }
13411
- n.style.transform = `translate(calc(-50% + ${h}px), calc(-50% + ${u}px))`, this.rightJoystick.x = h / this._maxDistance, this.rightJoystick.y = -(u / this._maxDistance);
13412
- }), n.addEventListener("pointerup", () => {
13413
- this._rightActive = !1, n.style.transform = "translate(-50%, -50%)", this.rightJoystick.x = 0, this.rightJoystick.y = 0;
13414
- });
13415
- const r = this.shadowRoot.querySelector(".btn.left");
13398
+ const n = (A) => {
13399
+ A.pointerId === this._leftPointerId && (this._leftPointerId = null, this._leftActive = !1, t.style.transform = "translate(-50%, -50%)", this.leftJoystick.x = 0, this.leftJoystick.y = 0);
13400
+ };
13401
+ t.addEventListener("pointerup", n), t.addEventListener("pointercancel", n);
13402
+ const r = this.shadowRoot.querySelector(".joystick.right .stick");
13416
13403
  if (!r) return;
13417
- r.addEventListener("pointerdown", () => {
13404
+ r.addEventListener("pointerdown", (A) => {
13405
+ if (this._rightPointerId !== null) return;
13406
+ this._rightPointerId = A.pointerId, this._rightActive = !0;
13407
+ const a = r.getBoundingClientRect();
13408
+ this._rightCenter.x = a.left + a.width / 2, this._rightCenter.y = a.top + a.height / 2, r.setPointerCapture(A.pointerId);
13409
+ }), r.addEventListener("pointermove", (A) => {
13410
+ if (!this._rightActive || A.pointerId !== this._rightPointerId) return;
13411
+ const a = A.clientX - this._rightCenter.x, h = A.clientY - this._rightCenter.y, u = Math.sqrt(a * a + h * h);
13412
+ let E = a, p = h;
13413
+ if (u > this._maxDistance) {
13414
+ const m = Math.atan2(h, a);
13415
+ E = Math.cos(m) * this._maxDistance, p = Math.sin(m) * this._maxDistance;
13416
+ }
13417
+ r.style.transform = `translate(calc(-50% + ${E}px), calc(-50% + ${p}px))`, this.rightJoystick.x = E / this._maxDistance, this.rightJoystick.y = -(p / this._maxDistance);
13418
+ });
13419
+ const s = (A) => {
13420
+ A.pointerId === this._rightPointerId && (this._rightPointerId = null, this._rightActive = !1, r.style.transform = "translate(-50%, -50%)", this.rightJoystick.x = 0, this.rightJoystick.y = 0);
13421
+ };
13422
+ r.addEventListener("pointerup", s), r.addEventListener("pointercancel", s);
13423
+ const o = this.shadowRoot.querySelector(".btn.left");
13424
+ if (!o) return;
13425
+ o.addEventListener("pointerdown", () => {
13418
13426
  this.leftButton = !0, this._leftButtonCount++;
13419
- }), r.addEventListener("pointerup", () => {
13427
+ }), o.addEventListener("pointerup", () => {
13420
13428
  this.leftButton = !1;
13421
13429
  });
13422
- const s = this.shadowRoot.querySelector(".btn.right");
13423
- s && (s.addEventListener("pointerdown", () => {
13430
+ const c = this.shadowRoot.querySelector(".btn.right");
13431
+ c && (c.addEventListener("pointerdown", () => {
13424
13432
  this.rightButton = !0, this._rightButtonCount++;
13425
- }), s.addEventListener("pointerup", () => {
13433
+ }), c.addEventListener("pointerup", () => {
13426
13434
  this.rightButton = !1;
13427
- }), window.addEventListener("keydown", this.keyDownListener), window.addEventListener("keyup", this.keyUpListener), this.options.touchDevice || (this.shadowRoot.querySelectorAll(".joystick").forEach((o) => {
13428
- o.style.display = "none";
13429
- }), this.shadowRoot.querySelectorAll(".btn").forEach((o) => {
13430
- o.style.display = "none";
13435
+ }), window.addEventListener("keydown", this.keyDownListener), window.addEventListener("keyup", this.keyUpListener), this.options.touchDevice || (this.shadowRoot.querySelectorAll(".joystick").forEach((A) => {
13436
+ A.style.display = "none";
13437
+ }), this.shadowRoot.querySelectorAll(".btn").forEach((A) => {
13438
+ A.style.display = "none";
13431
13439
  })));
13432
13440
  }
13433
13441
  keyDownListener = (e) => {
@@ -13744,20 +13752,20 @@ class UA {
13744
13752
  Math.cos(b / 2)
13745
13753
  ), u.mul(c);
13746
13754
  }
13747
- const m = new Ae(), p = new Pe();
13755
+ const E = new Ae(), p = new Pe();
13748
13756
  {
13749
13757
  const l = this.cm.opt.wheelRearAxle, d = this.cm.trans.controller.wheelSuspensionLength(2) || 0, f = this.cm.trans.controller.wheelSteering(2) || 0, b = this.cm.trans.controller.wheelRotation(2) || 0;
13750
- m.set(-this.cm.opt.wheelRearAxleLength / 2, this.cm.opt.wheelRearYPosition, this.cm.opt.wheelRearZPosition), m.sub(0, d, 0), p.set(0, Math.sin(f / 2), 0, Math.cos(f / 2)), c.set(
13758
+ E.set(-this.cm.opt.wheelRearAxleLength / 2, this.cm.opt.wheelRearYPosition, this.cm.opt.wheelRearZPosition), E.sub(0, d, 0), p.set(0, Math.sin(f / 2), 0, Math.cos(f / 2)), c.set(
13751
13759
  l.x * Math.sin(b / 2),
13752
13760
  l.y * Math.sin(b / 2),
13753
13761
  l.z * Math.sin(b / 2),
13754
13762
  Math.cos(b / 2)
13755
13763
  ), p.mul(c);
13756
13764
  }
13757
- const E = new Ae(), g = new Pe();
13765
+ const m = new Ae(), g = new Pe();
13758
13766
  {
13759
13767
  const l = this.cm.opt.wheelRearAxle, d = this.cm.trans.controller.wheelSuspensionLength(3) || 0, f = this.cm.trans.controller.wheelSteering(3) || 0, b = this.cm.trans.controller.wheelRotation(3) || 0;
13760
- E.set(this.cm.opt.wheelRearAxleLength / 2, this.cm.opt.wheelRearYPosition, this.cm.opt.wheelRearZPosition), E.sub(0, d, 0), g.set(0, Math.sin(f / 2), 0, Math.cos(f / 2)), c.set(
13768
+ m.set(this.cm.opt.wheelRearAxleLength / 2, this.cm.opt.wheelRearYPosition, this.cm.opt.wheelRearZPosition), m.sub(0, d, 0), g.set(0, Math.sin(f / 2), 0, Math.cos(f / 2)), c.set(
13761
13769
  l.x * Math.sin(b / 2),
13762
13770
  l.y * Math.sin(b / 2),
13763
13771
  l.z * Math.sin(b / 2),
@@ -13768,8 +13776,8 @@ class UA {
13768
13776
  chassis: { loc: s, quat: o },
13769
13777
  frontRight: { loc: h, quat: u },
13770
13778
  frontLeft: { loc: A, quat: a },
13771
- rearRight: { loc: E, quat: g },
13772
- rearLeft: { loc: m, quat: p }
13779
+ rearRight: { loc: m, quat: g },
13780
+ rearLeft: { loc: E, quat: p }
13773
13781
  };
13774
13782
  }
13775
13783
  }