@mlightcad/data-model 1.3.11 → 1.3.12

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.
@@ -821,7 +821,7 @@ var Go = { exports: {} };
821
821
  function f(z) {
822
822
  return z === "debug" && (z = "log"), typeof console === e ? !1 : z === "trace" && s ? x : console[z] !== void 0 ? g(console, z) : console.log !== void 0 ? g(console, "log") : t;
823
823
  }
824
- function A() {
824
+ function w() {
825
825
  for (var z = this.getLevel(), D = 0; D < o.length; D++) {
826
826
  var B = o[D];
827
827
  this[B] = D < z ? t : this.methodFactory(B, z, this.name);
@@ -831,7 +831,7 @@ var Go = { exports: {} };
831
831
  }
832
832
  function b(z) {
833
833
  return function() {
834
- typeof console !== e && (A.call(this), this[z].apply(this, arguments));
834
+ typeof console !== e && (w.call(this), this[z].apply(this, arguments));
835
835
  };
836
836
  }
837
837
  function E(z, D, B) {
@@ -900,24 +900,24 @@ var Go = { exports: {} };
900
900
  }, B.methodFactory = D || E, B.getLevel = function() {
901
901
  return ot ?? vt ?? dt;
902
902
  }, B.setLevel = function(bt, Ot) {
903
- return ot = qt(bt), Ot !== !1 && ut(ot), A.call(B);
903
+ return ot = qt(bt), Ot !== !1 && ut(ot), w.call(B);
904
904
  }, B.setDefaultLevel = function(bt) {
905
905
  vt = qt(bt), st() || B.setLevel(bt, !1);
906
906
  }, B.resetLevel = function() {
907
- ot = null, Vt(), A.call(B);
907
+ ot = null, Vt(), w.call(B);
908
908
  }, B.enableAll = function(bt) {
909
909
  B.setLevel(B.levels.TRACE, bt);
910
910
  }, B.disableAll = function(bt) {
911
911
  B.setLevel(B.levels.SILENT, bt);
912
912
  }, B.rebuild = function() {
913
- if (c !== B && (dt = qt(c.getLevel())), A.call(B), c === B)
913
+ if (c !== B && (dt = qt(c.getLevel())), w.call(B), c === B)
914
914
  for (var bt in h)
915
915
  h[bt].rebuild();
916
916
  }, dt = qt(
917
917
  c ? c.getLevel() : "WARN"
918
918
  );
919
919
  var Wt = st();
920
- Wt != null && (ot = qt(Wt)), A.call(B);
920
+ Wt != null && (ot = qt(Wt)), w.call(B);
921
921
  }
922
922
  c = new M(), c.getLogger = function(z) {
923
923
  if (typeof z != "symbol" && typeof z != "string" || z === "")
@@ -928,9 +928,9 @@ var Go = { exports: {} };
928
928
  c.methodFactory
929
929
  )), D;
930
930
  };
931
- var O = typeof window !== e ? window.log : void 0;
931
+ var L = typeof window !== e ? window.log : void 0;
932
932
  return c.noConflict = function() {
933
- return typeof window !== e && window.log === c && (window.log = O), c;
933
+ return typeof window !== e && window.log === c && (window.log = L), c;
934
934
  }, c.getLoggers = function() {
935
935
  return h;
936
936
  }, c.default = c, c;
@@ -965,7 +965,7 @@ function Jh(i, t) {
965
965
  function tu(i) {
966
966
  return i == null ? !0 : Array.isArray(i) || typeof i == "string" ? i.length === 0 : i instanceof Map || i instanceof Set ? i.size === 0 : typeof i == "object" ? Object.keys(i).length === 0 : !1;
967
967
  }
968
- function Is(i, t) {
968
+ function Ps(i, t) {
969
969
  if (i === t)
970
970
  return !0;
971
971
  if (i == null || t == null)
@@ -980,7 +980,7 @@ function Is(i, t) {
980
980
  if (i.length !== t.length)
981
981
  return !1;
982
982
  for (let o = 0; o < i.length; o++)
983
- if (!Is(i[o], t[o]))
983
+ if (!Ps(i[o], t[o]))
984
984
  return !1;
985
985
  return !0;
986
986
  }
@@ -991,7 +991,7 @@ function Is(i, t) {
991
991
  if (!Object.prototype.hasOwnProperty.call(
992
992
  t,
993
993
  o
994
- ) || !Is(
994
+ ) || !Ps(
995
995
  i[o],
996
996
  t[o]
997
997
  ))
@@ -1048,9 +1048,9 @@ let eu = class Wo {
1048
1048
  typeof t == "object" ? (o = t, s = e) : (o = {}, o[t] = e), s || (s = {});
1049
1049
  const h = s.unset, c = s.silent, g = [], x = this._changing;
1050
1050
  this._changing = !0, x || (this._previousAttributes = Os(this.attributes), this.changed = {});
1051
- const f = this.attributes, A = this.changed, b = this._previousAttributes;
1051
+ const f = this.attributes, w = this.changed, b = this._previousAttributes;
1052
1052
  for (const E in o)
1053
- e = o[E], Is(f[E], e) || g.push(E), Is(b[E], e) ? delete A[E] : A[E] = e, h ? delete f[E] : f[E] = e;
1053
+ e = o[E], Ps(f[E], e) || g.push(E), Ps(b[E], e) ? delete w[E] : w[E] = e, h ? delete f[E] : f[E] = e;
1054
1054
  if (!c) {
1055
1055
  g.length && (this._pending = s);
1056
1056
  for (let E = 0; E < g.length; E++)
@@ -1092,7 +1092,7 @@ let eu = class Wo {
1092
1092
  const e = this._changing ? this._previousAttributes : this.attributes, s = {};
1093
1093
  for (const o in t) {
1094
1094
  const h = t[o];
1095
- Is(e[o], h) || (s[o] = h);
1095
+ Ps(e[o], h) || (s[o] = h);
1096
1096
  }
1097
1097
  return s;
1098
1098
  }
@@ -1728,19 +1728,26 @@ class on {
1728
1728
  * ```
1729
1729
  */
1730
1730
  draw(t, e, s, o = !0, h, c) {
1731
+ var x;
1731
1732
  const g = [];
1732
1733
  if (e != null) {
1733
- const x = this.createKey(e.name, s);
1734
- let f;
1735
- if (this.has(x))
1736
- f = this.get(x);
1734
+ const f = this.createKey(e.name, s);
1735
+ let w;
1736
+ if (this.has(f))
1737
+ w = this.get(f);
1737
1738
  else {
1738
- const A = e.newIterator();
1739
- for (const b of A)
1740
- b.color.isByBlock && s ? (yo.copy(b.color), b.color.color = s, this.addEntity(b, g, t), b.color.copy(yo)) : this.addEntity(b, g, t);
1741
- f = t.group(g), f && o && this.set(x, f);
1739
+ const b = (x = t.basePoint) == null ? void 0 : x.clone();
1740
+ t.basePoint = void 0;
1741
+ const E = e.newIterator();
1742
+ let M = !0;
1743
+ for (const L of E)
1744
+ if (L.color.isByBlock && s ? (yo.copy(L.color), L.color.color = s, this.addEntity(L, g, t), L.color.copy(yo)) : this.addEntity(L, g, t), M) {
1745
+ const z = g[0];
1746
+ t.basePoint = z.basePoint, M = !1;
1747
+ }
1748
+ w = t.group(g), w && o && this.set(f, w), t.basePoint = b;
1742
1749
  }
1743
- return f && h && (f.applyMatrix(h), c && (c.x != 0 || c.y != 0 || c.z != 1) && (h.setFromExtrusionDirection(c), f.applyMatrix(h))), f;
1750
+ return w && h && (w.applyMatrix(h), c && (c.x != 0 || c.y != 0 || c.z != 1) && (h.setFromExtrusionDirection(c), w.applyMatrix(h))), w;
1744
1751
  } else
1745
1752
  return t.group(g);
1746
1753
  }
@@ -1912,7 +1919,7 @@ class ua {
1912
1919
  }
1913
1920
  }
1914
1921
  const $o = "Load Database";
1915
- class Ie extends ru {
1922
+ class Pe extends ru {
1916
1923
  constructor(t, e) {
1917
1924
  super(t.stage), this.data = t, this.progress = e;
1918
1925
  }
@@ -1975,8 +1982,8 @@ class Zo {
1975
1982
  data: { total: 0 },
1976
1983
  format() {
1977
1984
  let f = "";
1978
- return Object.keys(this.data).forEach((A) => {
1979
- A !== "total" && (f += `- ${A}: ${this.data[A]} ms
1985
+ return Object.keys(this.data).forEach((w) => {
1986
+ w !== "total" && (f += `- ${w}: ${this.data[w]} ms
1980
1987
  `);
1981
1988
  }), f += `- total: ${this.data.total} ms`, f;
1982
1989
  }
@@ -1984,7 +1991,7 @@ class Zo {
1984
1991
  Ho.getInstance().collect(h), this.progress = o;
1985
1992
  const c = { value: 0 }, g = new nu();
1986
1993
  g.setCompleteCallback(() => this.onFinished()), g.setErrorCallback((f) => this.onError(f)), g.addTask(
1987
- new Ie(
1994
+ new Pe(
1988
1995
  {
1989
1996
  stage: "START",
1990
1997
  step: 1,
@@ -1994,7 +2001,7 @@ class Zo {
1994
2001
  o
1995
2002
  )
1996
2003
  ), g.addTask(
1997
- new Ie(
2004
+ new Pe(
1998
2005
  {
1999
2006
  stage: "PARSE",
2000
2007
  step: 5,
@@ -2004,20 +2011,20 @@ class Zo {
2004
2011
  o
2005
2012
  )
2006
2013
  ), g.addTask(
2007
- new Ie(
2014
+ new Pe(
2008
2015
  {
2009
2016
  stage: "FONT",
2010
2017
  step: 5,
2011
2018
  progress: c,
2012
2019
  task: async (f) => {
2013
- const A = this.getFonts(f.model);
2014
- return { model: f.model, data: A };
2020
+ const w = this.getFonts(f.model);
2021
+ return { model: f.model, data: w };
2015
2022
  }
2016
2023
  },
2017
2024
  o
2018
2025
  )
2019
2026
  ), g.addTask(
2020
- new Ie(
2027
+ new Pe(
2021
2028
  {
2022
2029
  stage: "LTYPE",
2023
2030
  step: 1,
@@ -2027,7 +2034,7 @@ class Zo {
2027
2034
  o
2028
2035
  )
2029
2036
  ), g.addTask(
2030
- new Ie(
2037
+ new Pe(
2031
2038
  {
2032
2039
  stage: "STYLE",
2033
2040
  step: 1,
@@ -2037,7 +2044,7 @@ class Zo {
2037
2044
  o
2038
2045
  )
2039
2046
  ), g.addTask(
2040
- new Ie(
2047
+ new Pe(
2041
2048
  {
2042
2049
  stage: "DIMSTYLE",
2043
2050
  step: 1,
@@ -2047,7 +2054,7 @@ class Zo {
2047
2054
  o
2048
2055
  )
2049
2056
  ), g.addTask(
2050
- new Ie(
2057
+ new Pe(
2051
2058
  {
2052
2059
  stage: "LAYER",
2053
2060
  step: 1,
@@ -2057,7 +2064,7 @@ class Zo {
2057
2064
  o
2058
2065
  )
2059
2066
  ), g.addTask(
2060
- new Ie(
2067
+ new Pe(
2061
2068
  {
2062
2069
  stage: "VPORT",
2063
2070
  step: 1,
@@ -2067,7 +2074,7 @@ class Zo {
2067
2074
  o
2068
2075
  )
2069
2076
  ), g.addTask(
2070
- new Ie(
2077
+ new Pe(
2071
2078
  {
2072
2079
  stage: "HEADER",
2073
2080
  step: 1,
@@ -2077,7 +2084,7 @@ class Zo {
2077
2084
  o
2078
2085
  )
2079
2086
  ), g.addTask(
2080
- new Ie(
2087
+ new Pe(
2081
2088
  {
2082
2089
  stage: "BLOCK_RECORD",
2083
2090
  step: 5,
@@ -2087,7 +2094,7 @@ class Zo {
2087
2094
  o
2088
2095
  )
2089
2096
  ), g.addTask(
2090
- new Ie(
2097
+ new Pe(
2091
2098
  {
2092
2099
  stage: "OBJECT",
2093
2100
  step: 5,
@@ -2097,7 +2104,7 @@ class Zo {
2097
2104
  o
2098
2105
  )
2099
2106
  ), g.addTask(
2100
- new Ie(
2107
+ new Pe(
2101
2108
  {
2102
2109
  stage: "BLOCK",
2103
2110
  step: 5,
@@ -2107,7 +2114,7 @@ class Zo {
2107
2114
  o
2108
2115
  )
2109
2116
  ), g.addTask(
2110
- new Ie(
2117
+ new Pe(
2111
2118
  {
2112
2119
  stage: "ENTITY",
2113
2120
  step: 100,
@@ -2123,7 +2130,7 @@ class Zo {
2123
2130
  o
2124
2131
  )
2125
2132
  ), g.addTask(
2126
- new Ie(
2133
+ new Pe(
2127
2134
  {
2128
2135
  stage: "END",
2129
2136
  step: 0,
@@ -2192,7 +2199,7 @@ class Zo {
2192
2199
  throw new Error("Not impelemented yet!");
2193
2200
  }
2194
2201
  }
2195
- var le, os, Qt, ne, ls, tr, ve, pr, er, $r, hs, us, Zr, Qr, cs, ds, ms, Oe, gr, Yt, Jr, ps, _t, ye, gs, xe, fs, fr, _r, rr, _s, tn, ze, vr, en, _i, vi, yr, xr, vs, ys, br, xs, yi, xi, he, wr, ue, Re, bi, wi, Ai, Si, Ar, Fe, rn, bs, nn, Be, Sr, De, Ir;
2202
+ var le, os, Qt, ne, ls, tr, ve, pr, er, $r, hs, us, Zr, Qr, cs, ds, ms, Oe, gr, Yt, Jr, ps, _t, ye, gs, xe, fs, fr, _r, rr, _s, tn, ze, vr, en, _i, vi, yr, xr, vs, ys, br, xs, yi, xi, he, wr, ue, Re, bi, wi, Ai, Si, Ar, Fe, rn, bs, nn, Be, Sr, De, Pr;
2196
2203
  (le = {})[le.None = 0] = "None", le[le.Anonymous = 1] = "Anonymous", le[le.NonConstant = 2] = "NonConstant", le[le.Xref = 4] = "Xref", le[le.XrefOverlay = 8] = "XrefOverlay", le[le.ExternallyDependent = 16] = "ExternallyDependent", le[le.ResolvedOrDependent = 32] = "ResolvedOrDependent", le[le.ReferencedXref = 64] = "ReferencedXref";
2197
2204
  (os = {})[os.BYBLOCK = 0] = "BYBLOCK", os[os.BYLAYER = 256] = "BYLAYER";
2198
2205
  (Qt = {})[Qt.Rotated = 0] = "Rotated", Qt[Qt.Aligned = 1] = "Aligned", Qt[Qt.Angular = 2] = "Angular", Qt[Qt.Diameter = 3] = "Diameter", Qt[Qt.Radius = 4] = "Radius", Qt[Qt.Angular3Point = 5] = "Angular3Point", Qt[Qt.Ordinate = 6] = "Ordinate", Qt[Qt.ReferenceIsExclusive = 32] = "ReferenceIsExclusive", Qt[Qt.IsOrdinateXTypeFlag = 64] = "IsOrdinateXTypeFlag", Qt[Qt.IsCustomTextPositionFlag = 128] = "IsCustomTextPositionFlag";
@@ -2230,14 +2237,14 @@ let ca = Symbol();
2230
2237
  function xt(i, t) {
2231
2238
  return (e, s, o) => {
2232
2239
  let h = function(x, f = !1) {
2233
- return x.reduce((A, b) => {
2234
- b.pushContext && A.push({});
2235
- let E = A[A.length - 1];
2240
+ return x.reduce((w, b) => {
2241
+ b.pushContext && w.push({});
2242
+ let E = w[w.length - 1];
2236
2243
  for (let M of typeof b.code == "number" ? [b.code] : b.code) {
2237
- let O = E[M] ?? (E[M] = []);
2238
- b.isMultiple && O.length && f && console.warn(`Snippet ${O[O.length - 1].name} for code(${M}) is shadowed by ${b.name}`), O.push(b);
2244
+ let L = E[M] ?? (E[M] = []);
2245
+ b.isMultiple && L.length && f && console.warn(`Snippet ${L[L.length - 1].name} for code(${M}) is shadowed by ${b.name}`), L.push(b);
2239
2246
  }
2240
- return A;
2247
+ return w;
2241
2248
  }, [{}]);
2242
2249
  }(i, s.debug), c = !1, g = h.length - 1;
2243
2250
  for (; !At(e, 0, "EOF"); ) {
@@ -2246,13 +2253,13 @@ function xt(i, t) {
2246
2253
  var W;
2247
2254
  return ot >= dt && ((W = vt[B]) == null ? void 0 : W.length);
2248
2255
  });
2249
- }(h, e.code, g), f = x == null ? void 0 : x[e.code], A = f == null ? void 0 : f[f.length - 1];
2250
- if (!x || !A) {
2256
+ }(h, e.code, g), f = x == null ? void 0 : x[e.code], w = f == null ? void 0 : f[f.length - 1];
2257
+ if (!x || !w) {
2251
2258
  s.rewind();
2252
2259
  break;
2253
2260
  }
2254
- A.isMultiple || x[e.code].pop();
2255
- let { name: b, parser: E, isMultiple: M, isReducible: O } = A, z = E == null ? void 0 : E(e, s, o);
2261
+ w.isMultiple || x[e.code].pop();
2262
+ let { name: b, parser: E, isMultiple: M, isReducible: L } = w, z = E == null ? void 0 : E(e, s, o);
2256
2263
  if (z === ca) {
2257
2264
  s.rewind();
2258
2265
  break;
@@ -2263,19 +2270,19 @@ function xt(i, t) {
2263
2270
  if (!ot.length) throw Error("[parserGenerator::getObjectByPath] Invalid empty path");
2264
2271
  let W = dt;
2265
2272
  for (let ut = 0; ut < ot.length - 1; ++ut) {
2266
- let st = Ii(ot[ut]), Vt = Ii(ot[ut + 1]);
2273
+ let st = Pi(ot[ut]), Vt = Pi(ot[ut + 1]);
2267
2274
  Object.prototype.hasOwnProperty.call(W, st) || (typeof Vt == "number" ? W[st] = [] : W[st] = {}), W = W[st];
2268
2275
  }
2269
- return [W, Ii(ot[ot.length - 1])];
2276
+ return [W, Pi(ot[ot.length - 1])];
2270
2277
  }(o, b);
2271
- M && !O ? (Object.prototype.hasOwnProperty.call(D, B) || (D[B] = []), D[B].push(z)) : D[B] = z;
2278
+ M && !L ? (Object.prototype.hasOwnProperty.call(D, B) || (D[B] = []), D[B].push(z)) : D[B] = z;
2272
2279
  }
2273
- A.pushContext && (g -= 1), c = !0, e = s.next();
2280
+ w.pushContext && (g -= 1), c = !0, e = s.next();
2274
2281
  }
2275
2282
  return t && Object.setPrototypeOf(o, t), c;
2276
2283
  };
2277
2284
  }
2278
- function Ii(i) {
2285
+ function Pi(i) {
2279
2286
  let t = Number.parseInt(i);
2280
2287
  return Number.isNaN(t) ? i : t;
2281
2288
  }
@@ -2306,37 +2313,37 @@ function Qo(i, t) {
2306
2313
  case 1040:
2307
2314
  case 1070:
2308
2315
  case 1071:
2309
- h.push({ type: Pr(i.code), value: i.value });
2316
+ h.push({ type: Ir(i.code), value: i.value });
2310
2317
  break;
2311
2318
  case 1003:
2312
- h.push({ name: "layer", type: Pr(i.code), value: i.value });
2319
+ h.push({ name: "layer", type: Ir(i.code), value: i.value });
2313
2320
  break;
2314
2321
  case 1005:
2315
- h.push({ name: "handle", type: Pr(i.code), value: i.value });
2322
+ h.push({ name: "handle", type: Ir(i.code), value: i.value });
2316
2323
  break;
2317
2324
  case 1010:
2318
- h.push({ type: Pr(i.code), value: Rt(t) });
2325
+ h.push({ type: Ir(i.code), value: Rt(t) });
2319
2326
  break;
2320
2327
  case 1011:
2321
- h.push({ name: "worldSpacePosition", type: Pr(i.code), value: Rt(t) });
2328
+ h.push({ name: "worldSpacePosition", type: Ir(i.code), value: Rt(t) });
2322
2329
  break;
2323
2330
  case 1012:
2324
- h.push({ name: "worldSpaceDisplacement", type: Pr(i.code), value: Rt(t) });
2331
+ h.push({ name: "worldSpaceDisplacement", type: Ir(i.code), value: Rt(t) });
2325
2332
  break;
2326
2333
  case 1013:
2327
- h.push({ name: "worldSpaceDirection", type: Pr(i.code), value: Rt(t) });
2334
+ h.push({ name: "worldSpaceDirection", type: Ir(i.code), value: Rt(t) });
2328
2335
  break;
2329
2336
  case 1041:
2330
- h.push({ name: "distance", type: Pr(i.code), value: i.value });
2337
+ h.push({ name: "distance", type: Ir(i.code), value: i.value });
2331
2338
  break;
2332
2339
  case 1042:
2333
- h.push({ name: "scale", type: Pr(i.code), value: i.value });
2340
+ h.push({ name: "scale", type: Ir(i.code), value: i.value });
2334
2341
  }
2335
2342
  i = t.next();
2336
2343
  }
2337
2344
  return t.rewind(), e;
2338
2345
  }
2339
- function Pr(i) {
2346
+ function Ir(i) {
2340
2347
  switch (i) {
2341
2348
  case 1e3:
2342
2349
  case 1003:
@@ -2523,7 +2530,7 @@ function da(i, t, e) {
2523
2530
  function hl(i, t, e) {
2524
2531
  return t in i ? Object.defineProperty(i, t, { value: e, enumerable: !0, configurable: !0, writable: !0 }) : i[t] = e, i;
2525
2532
  }
2526
- let Iu = { textStyle: "STANDARD", extrusionDirection: { x: 0, y: 0, z: 1 }, rotation: 0 }, js = [{ code: 46, name: "annotationHeight", parser: y }, { code: 101, parser(i, t) {
2533
+ let Pu = { textStyle: "STANDARD", extrusionDirection: { x: 0, y: 0, z: 1 }, rotation: 0 }, js = [{ code: 46, name: "annotationHeight", parser: y }, { code: 101, parser(i, t) {
2527
2534
  (function(e) {
2528
2535
  e.rewind();
2529
2536
  let s = e.next();
@@ -2540,14 +2547,14 @@ class ul {
2540
2547
  return this.parser(e, t, s), s;
2541
2548
  }
2542
2549
  constructor() {
2543
- hl(this, "parser", xt(js, Iu));
2550
+ hl(this, "parser", xt(js, Pu));
2544
2551
  }
2545
2552
  }
2546
2553
  function cl(i, t, e) {
2547
2554
  return t in i ? Object.defineProperty(i, t, { value: e, enumerable: !0, configurable: !0, writable: !0 }) : i[t] = e, i;
2548
2555
  }
2549
2556
  hl(ul, "ForEntityName", "MTEXT");
2550
- let Pu = { thickness: 0, rotation: 0, scale: 1, obliqueAngle: 0, textStyle: "STANDARD", textGenerationFlag: 0, horizontalJustification: 0, verticalJustification: 0, extrusionDirection: { x: 0, y: 0, z: 1 } }, Eu = [...js.slice(js.findIndex(({ name: i }) => i === "columnType"), js.findIndex(({ name: i }) => i === "subclassMarker") + 1), { code: 100 }, { code: 0, parser(i) {
2557
+ let Iu = { thickness: 0, rotation: 0, scale: 1, obliqueAngle: 0, textStyle: "STANDARD", textGenerationFlag: 0, horizontalJustification: 0, verticalJustification: 0, extrusionDirection: { x: 0, y: 0, z: 1 } }, Eu = [...js.slice(js.findIndex(({ name: i }) => i === "columnType"), js.findIndex(({ name: i }) => i === "subclassMarker") + 1), { code: 100 }, { code: 0, parser(i) {
2551
2558
  if (!At(i, 0, "MTEXT")) return ca;
2552
2559
  } }, { code: 2, name: "definitionTag", parser: y }, { code: 40, name: "annotationScale", parser: y }, { code: 10, name: "alignmentPoint", parser: j }, { code: 340, name: "secondaryAttributesHardId", parser: y }, { code: 70, name: "numberOfSecondaryAttributes", parser: y }, { code: 70, name: "isReallyLocked", parser: Bt }, { code: 70, name: "mtextFlag", parser: y }, { code: 280, name: "isDuplicatedEntriesKeep", parser: Bt }, { code: 100 }, { code: 280, name: "lockPositionFlag", parser: Bt }, { code: 210, name: "extrusionDirection", parser: j }, { code: 11, name: "alignmentPoint", parser: j }, { code: 74, name: "verticalJustification", parser: y }, { code: 72, name: "horizontalJustification", parser: y }, { code: 71, name: "textGenerationFlag", parser: y }, { code: 7, name: "textStyle", parser: y }, { code: 51, name: "obliqueAngle", parser: y }, { code: 41, name: "scale", parser: y }, { code: 50, name: "rotation", parser: y }, { code: 73 }, { code: 70, name: "attributeFlag", parser: y }, { code: 2, name: "tag", parser: y }, { code: 280 }, { code: 100, name: "subclassMarker", parser: y }, { code: 1, name: "text", parser: y }, { code: 40, name: "textHeight", parser: y }, { code: 10, name: "startPoint", parser: j }, { code: 39, name: "thickness", parser: y }, { code: 100 }, ...Ut];
2553
2560
  class dl {
@@ -2556,7 +2563,7 @@ class dl {
2556
2563
  return this.parser(e, t, s), s;
2557
2564
  }
2558
2565
  constructor() {
2559
- cl(this, "parser", xt(Eu, Pu));
2566
+ cl(this, "parser", xt(Eu, Iu));
2560
2567
  }
2561
2568
  }
2562
2569
  function ml(i, t, e) {
@@ -2747,7 +2754,7 @@ function Sl(i, t, e) {
2747
2754
  return t in i ? Object.defineProperty(i, t, { value: e, enumerable: !0, configurable: !0, writable: !0 }) : i[t] = e, i;
2748
2755
  }
2749
2756
  let Wu = { brightness: 50, contrast: 50, fade: 0, clippingBoundaryPath: [] }, Hu = [{ code: 290, name: "clipMode", parser: y }, { code: 14, name: "clippingBoundaryPath", isMultiple: !0, parser: j }, { code: 91, name: "countBoundaryPoints", parser: y }, { code: 71, name: "clippingBoundaryType", parser: y }, { code: 360, name: "imageDefReactorHandle", parser: y }, { code: 283, name: "fade", parser: y }, { code: 282, name: "contrast", parser: y }, { code: 281, name: "brightness", parser: y }, { code: 280, name: "isClipped", parser: Bt }, { code: 70, name: "flags", parser: y }, { code: 340, name: "imageDefHandle", parser: y }, { code: 13, name: "imageSize", parser: j }, { code: 12, name: "vPixel", parser: j }, { code: 11, name: "uPixel", parser: j }, { code: 10, name: "position", parser: j }, { code: 90, name: "version", parser: y }, { code: 100, name: "subclassMarker", parser: y }, ...Ut];
2750
- class Il {
2757
+ class Pl {
2751
2758
  parseEntity(t, e) {
2752
2759
  let s = {};
2753
2760
  return this.parser(e, t, s), s;
@@ -2756,10 +2763,10 @@ class Il {
2756
2763
  Sl(this, "parser", xt(Hu, Wu));
2757
2764
  }
2758
2765
  }
2759
- function Pl(i, t, e) {
2766
+ function Il(i, t, e) {
2760
2767
  return t in i ? Object.defineProperty(i, t, { value: e, enumerable: !0, configurable: !0, writable: !0 }) : i[t] = e, i;
2761
2768
  }
2762
- Sl(Il, "ForEntityName", "IMAGE");
2769
+ Sl(Pl, "ForEntityName", "IMAGE");
2763
2770
  let Yu = { xScale: 1, yScale: 1, zScale: 1, rotation: 0, columnCount: 0, rowCount: 0, columnSpacing: 0, rowSpacing: 0, extrusionDirection: { x: 0, y: 0, z: 1 } }, qu = [{ code: 210, name: "extrusionDirection", parser: j }, { code: 45, name: "rowSpacing", parser: y }, { code: 44, name: "columnSpacing", parser: y }, { code: 71, name: "rowCount", parser: y }, { code: 70, name: "columnCount", parser: y }, { code: 50, name: "rotation", parser: y }, { code: 43, name: "zScale", parser: y }, { code: 42, name: "yScale", parser: y }, { code: 41, name: "xScale", parser: y }, { code: 10, name: "insertionPoint", parser: j }, { code: 2, name: "name", parser: y }, { code: 66, name: "isVariableAttributes", parser: Bt }, { code: 100, name: "subclassMarker", parser: y }, ...Ut];
2764
2771
  class El {
2765
2772
  parseEntity(t, e) {
@@ -2767,13 +2774,13 @@ class El {
2767
2774
  return this.parser(e, t, s), s;
2768
2775
  }
2769
2776
  constructor() {
2770
- Pl(this, "parser", xt(qu, Yu));
2777
+ Il(this, "parser", xt(qu, Yu));
2771
2778
  }
2772
2779
  }
2773
2780
  function kl(i, t, e) {
2774
2781
  return t in i ? Object.defineProperty(i, t, { value: e, enumerable: !0, configurable: !0, writable: !0 }) : i[t] = e, i;
2775
2782
  }
2776
- Pl(El, "ForEntityName", "INSERT");
2783
+ Il(El, "ForEntityName", "INSERT");
2777
2784
  let Xu = { isArrowheadEnabled: !0 }, Ku = [{ code: 213, name: "offsetFromAnnotation", parser: j }, { code: 212, name: "offsetFromBlock", parser: j }, { code: 211, name: "horizontalDirection", parser: j }, { code: 210, name: "normal", parser: j }, { code: 340, name: "associatedAnnotation", parser: y }, { code: 77, name: "byBlockColor", parser: y }, { code: 10, name: "vertices", parser: j, isMultiple: !0 }, { code: 76, name: "numberOfVertices", parser: y }, { code: 41, name: "textWidth", parser: y }, { code: 40, name: "textHeight", parser: y }, { code: 75, name: "isHooklineExists", parser: Bt }, { code: 74, name: "isHooklineSameDirection", parser: Bt }, { code: 73, name: "leaderCreationFlag", parser: y }, { code: 72, name: "isSpline", parser: Bt }, { code: 71, name: "isArrowheadEnabled", parser: Bt }, { code: 3, name: "styleName", parser: y }, { code: 100, name: "subclassMarker", parser: y }, ...Ut], Ml = class {
2778
2785
  parseEntity(t, e) {
2779
2786
  let s = {};
@@ -3113,25 +3120,25 @@ class Ys {
3113
3120
  x.topBorderVisibility = !!(h.value ?? !0), h = o.next();
3114
3121
  break;
3115
3122
  case 301:
3116
- (function(f, A, b) {
3123
+ (function(f, w, b) {
3117
3124
  for (; b.code !== 304; ) switch (b.code) {
3118
3125
  case 301:
3119
3126
  case 93:
3120
3127
  case 90:
3121
3128
  case 94:
3122
- b = A.next();
3129
+ b = w.next();
3123
3130
  break;
3124
3131
  case 1:
3125
- f.text = b.value, b = A.next();
3132
+ f.text = b.value, b = w.next();
3126
3133
  break;
3127
3134
  case 300:
3128
- f.attrText = b.value, b = A.next();
3135
+ f.attrText = b.value, b = w.next();
3129
3136
  break;
3130
3137
  case 302:
3131
- f.text = b.value ? b.value : f.text, b = A.next();
3138
+ f.text = b.value ? b.value : f.text, b = w.next();
3132
3139
  break;
3133
3140
  default:
3134
- console.log(`Ignore code: ${b.code}, value: ${b.value}`), b = A.next();
3141
+ console.log(`Ignore code: ${b.code}, value: ${b.value}`), b = w.next();
3135
3142
  }
3136
3143
  })(x, o, h), h = o.next();
3137
3144
  break;
@@ -3386,7 +3393,7 @@ class sh {
3386
3393
  }
3387
3394
  }
3388
3395
  nh(sh, "ForEntityName", "MULTILEADER");
3389
- let Ic = Object.fromEntries([rl, ll, dl, pl, fl, Ws, vl, xl, Il, El, Ml, Nl, Hs, Ll, ul, sh, zl, Bl, Ul, Gl, Wl, Yl, Xl, $l, Ys, al, Ql, Al, ma, qs, th, rh].map((i) => [i.ForEntityName, new i()]));
3396
+ let Pc = Object.fromEntries([rl, ll, dl, pl, fl, Ws, vl, xl, Pl, El, Ml, Nl, Hs, Ll, ul, sh, zl, Bl, Ul, Gl, Wl, Yl, Xl, $l, Ys, al, Ql, Al, ma, qs, th, rh].map((i) => [i.ForEntityName, new i()]));
3390
3397
  function ih(i, t) {
3391
3398
  let e = [];
3392
3399
  for (; !At(i, 0, "EOF"); ) {
@@ -3395,7 +3402,7 @@ function ih(i, t) {
3395
3402
  t.rewind();
3396
3403
  break;
3397
3404
  }
3398
- let s = Ic[i.value];
3405
+ let s = Pc[i.value];
3399
3406
  if (s) {
3400
3407
  let o = i.value;
3401
3408
  i = t.next();
@@ -3407,7 +3414,7 @@ function ih(i, t) {
3407
3414
  }
3408
3415
  return e;
3409
3416
  }
3410
- function Pc(i, t) {
3417
+ function Ic(i, t) {
3411
3418
  let e = {};
3412
3419
  for (; !At(i, 0, "EOF") && !At(i, 0, "ENDSEC"); ) {
3413
3420
  if (At(i, 0, "BLOCK")) {
@@ -3506,7 +3513,7 @@ function Oc(i, t) {
3506
3513
  let zn = [{ code: 100, name: "subclassMarker", parser: y }, { code: 330, name: "ownerObjectId", parser: y }, { code: 102, parser(i, t) {
3507
3514
  for (; !At(i, 0, "EOF") && !At(i, 102, "}"); ) i = t.next();
3508
3515
  } }, { code: 5, name: "handle", parser: y }], zc = xt([{ code: 310, name: "bmpPreview", parser: y }, { code: 281, name: "scalability", parser: y }, { code: 280, name: "explodability", parser: y }, { code: 70, name: "insertionUnits", parser: y }, { code: 340, name: "layoutObjects", parser: y }, { code: 2, name: "name", parser: y }, { code: 100, name: "subclassMarker", parser: y }, ...zn]), Rc = [{ name: "DIMPOST", code: 3 }, { name: "DIMAPOST", code: 4 }, { name: "DIMBLK_OBSOLETE", code: 5 }, { name: "DIMBLK1_OBSOLETE", code: 6 }, { name: "DIMBLK2_OBSOLETE", code: 7 }, { name: "DIMSCALE", code: 40, defaultValue: 1 }, { name: "DIMASZ", code: 41, defaultValue: 0.25 }, { name: "DIMEXO", code: 42, defaultValue: 0.625, defaultValueImperial: 0.0625 }, { name: "DIMDLI", code: 43, defaultValue: 3.75, defaultValueImperial: 0.38 }, { name: "DIMEXE", code: 44, defaultValue: 2.25, defaultValueImperial: 0.28 }, { name: "DIMRND", code: 45, defaultValue: 0 }, { name: "DIMDLE", code: 46, defaultValue: 0 }, { name: "DIMTP", code: 47, defaultValue: 0 }, { name: "DIMTM", code: 48, defaultValue: 0 }, { name: "DIMTXT", code: 140, defaultValue: 2.5, defaultValueImperial: 0.28 }, { name: "DIMCEN", code: 141, defaultValue: 2.5, defaultValueImperial: 0.09 }, { name: "DIMTSZ", code: 142, defaultValue: 0 }, { name: "DIMALTF", code: 143, defaultValue: 25.4 }, { name: "DIMLFAC", code: 144, defaultValue: 1 }, { name: "DIMTVP", code: 145, defaultValue: 0 }, { name: "DIMTFAC", code: 146, defaultValue: 1 }, { name: "DIMGAP", code: 147, defaultValue: 0.625, defaultValueImperial: 0.09 }, { name: "DIMALTRND", code: 148, defaultValue: 0 }, { name: "DIMTOL", code: 71, defaultValue: 0, defaultValueImperial: 1 }, { name: "DIMLIM", code: 72, defaultValue: 0 }, { name: "DIMTIH", code: 73, defaultValue: 0, defaultValueImperial: 1 }, { name: "DIMTOH", code: 74, defaultValue: 0, defaultValueImperial: 1 }, { name: "DIMSE1", code: 75, defaultValue: 0 }, { name: "DIMSE2", code: 76, defaultValue: 0 }, { name: "DIMTAD", code: 77, defaultValue: xo.Above, defaultValueImperial: xo.Center }, { name: "DIMZIN", code: 78, defaultValue: kn.Trailing, defaultValueImperial: kn.Feet }, { name: "DIMAZIN", code: 79, defaultValue: uu.None }, { name: "DIMALT", code: 170, defaultValue: 0 }, { name: "DIMALTD", code: 171, defaultValue: 3, defaultValueImperial: 2 }, { name: "DIMTOFL", code: 172, defaultValue: 1, defaultValueImperial: 0 }, { name: "DIMSAH", code: 173, defaultValue: 0 }, { name: "DIMTIX", code: 174, defaultValue: 0 }, { name: "DIMSOXD", code: 175, defaultValue: 0 }, { name: "DIMCLRD", code: 176, defaultValue: 0 }, { name: "DIMCLRE", code: 177, defaultValue: 0 }, { name: "DIMCLRT", code: 178, defaultValue: 0 }, { name: "DIMADEC", code: 179 }, { name: "DIMUNIT", code: 270 }, { name: "DIMDEC", code: 271, defaultValue: 2, defaultValueImperial: 4 }, { name: "DIMTDEC", code: 272, defaultValue: 2, defaultValueImperial: 4 }, { name: "DIMALTU", code: 273, defaultValue: 2 }, { name: "DIMALTTD", code: 274, defaultValue: 2, defaultValueImperial: 4 }, { name: "DIMAUNIT", code: 275, defaultValue: 0 }, { name: "DIMFRAC", code: 276, defaultValue: 0 }, { name: "DIMLUNIT", code: 277, defaultValue: 2 }, { name: "DIMDSEP", code: 278, defaultValue: ",", defaultValueImperial: "." }, { name: "DIMJUST", code: 280, defaultValue: cu.Center }, { name: "DIMSD1", code: 281, defaultValue: 0 }, { name: "DIMSD2", code: 282, defaultValue: 0 }, { name: "DIMTOLJ", code: 283, defaultValue: du.Center }, { name: "DIMTZIN", code: 284, defaultValue: kn.Trailing, defaultValueImperial: kn.Feet }, { name: "DIMALTZ", code: 285, defaultValue: kn.Trailing }, { name: "DIMALTTZ", code: 286, defaultValue: kn.Trailing }, { name: "DIMFIT", code: 287 }, { name: "DIMUPT", code: 288, defaultValue: 0 }, { name: "DIMATFIT", code: 289, defaultValue: 3 }, { name: "DIMTXSTY", code: 340 }, { name: "DIMLDRBLK", code: 341 }, { name: "DIMBLK", code: 342 }, { name: "DIMBLK1", code: 343 }, { name: "DIMBLK2", code: 344 }, { name: "DIMLWD", code: 371, defaultValue: -2 }, { name: "DIMLWD", code: 372, defaultValue: -2 }], Fc = xt([...Rc.map((i) => ({ ...i, parser: y })), { code: 70, name: "standardFlag", parser: y }, { code: 2, name: "name", parser: y }, { code: 100, name: "subclassMarker", parser: y }, { code: 105, name: "handle", parser: y }, ...zn.filter((i) => i.code !== 5)]), Bc = xt([{ code: 347, name: "materialObjectId", parser: y }, { code: 390, name: "plotStyleNameObjectId", parser: y }, { code: 370, name: "lineweight", parser: y }, { code: 290, name: "isPlotting", parser: Bt }, { code: 6, name: "lineType", parser: y }, { code: 62, name: "colorIndex", parser: y }, { code: 70, name: "standardFlag", parser: y }, { code: 2, name: "name", parser: y }, { code: 100, name: "subclassMarker", parser: y }, ...zn]);
3509
- (Ir = {})[Ir.NONE = 0] = "NONE", Ir[Ir.AbsoluteRotation = 1] = "AbsoluteRotation", Ir[Ir.TextEmbedded = 2] = "TextEmbedded", Ir[Ir.ShapeEmbedded = 4] = "ShapeEmbedded";
3516
+ (Pr = {})[Pr.NONE = 0] = "NONE", Pr[Pr.AbsoluteRotation = 1] = "AbsoluteRotation", Pr[Pr.TextEmbedded = 2] = "TextEmbedded", Pr[Pr.ShapeEmbedded = 4] = "ShapeEmbedded";
3510
3517
  let Dc = xt([{ code: 9, name: "text", parser: y }, { code: 45, name: "offsetY", parser: y }, { code: 44, name: "offsetX", parser: y }, { code: 50, name: "rotation", parser: y }, { code: 46, name: "scale", parser: y }, { code: 340, name: "styleObjectId", parser: y }, { code: 75, name: "shapeNumber", parser: y }, { code: 74, name: "elementTypeFlag", parser: y }, { code: 49, name: "elementLength", parser: y }], { elementTypeFlag: 0, elementLength: 0 }), Uc = xt([{ code: 49, name: "pattern", parser(i, t) {
3511
3518
  let e = {};
3512
3519
  return Dc(i, t, e), e;
@@ -3618,14 +3625,14 @@ class qc extends EventTarget {
3618
3625
  }
3619
3626
  parseAll(t) {
3620
3627
  let e = { header: {}, blocks: {}, entities: [], tables: {}, objects: { byName: {}, byTree: void 0 } }, s = t.next();
3621
- for (; !At(s, 0, "EOF"); ) At(s, 0, "SECTION") && (At(s = t.next(), 2, "HEADER") ? (s = t.next(), e.header = kc(s, t)) : At(s, 2, "BLOCKS") ? (s = t.next(), e.blocks = Pc(s, t)) : At(s, 2, "ENTITIES") ? (s = t.next(), e.entities = ih(s, t)) : At(s, 2, "TABLES") ? (s = t.next(), e.tables = Hc(s, t)) : At(s, 2, "OBJECTS") && (s = t.next(), e.objects = Oc(s, t))), s = t.next();
3628
+ for (; !At(s, 0, "EOF"); ) At(s, 0, "SECTION") && (At(s = t.next(), 2, "HEADER") ? (s = t.next(), e.header = kc(s, t)) : At(s, 2, "BLOCKS") ? (s = t.next(), e.blocks = Ic(s, t)) : At(s, 2, "ENTITIES") ? (s = t.next(), e.entities = ih(s, t)) : At(s, 2, "TABLES") ? (s = t.next(), e.tables = Hc(s, t)) : At(s, 2, "OBJECTS") && (s = t.next(), e.objects = Oc(s, t))), s = t.next();
3622
3629
  return e;
3623
3630
  }
3624
3631
  constructor(t = new Yc()) {
3625
3632
  super(), Ci(this, "_decoder", void 0), this._decoder = new TextDecoder(t.encoding, { fatal: t.encodingFailureFatal });
3626
3633
  }
3627
3634
  }
3628
- const Io = [
3635
+ const Po = [
3629
3636
  { name: "AC1.2", value: 1 },
3630
3637
  { name: "AC1.40", value: 2 },
3631
3638
  { name: "AC1.50", value: 3 },
@@ -3718,14 +3725,14 @@ class Li {
3718
3725
  */
3719
3726
  constructor(t) {
3720
3727
  if (typeof t == "string") {
3721
- const e = Io.find((s) => s.name === t);
3728
+ const e = Po.find((s) => s.name === t);
3722
3729
  if (!e)
3723
3730
  throw new Error(`Unknown DWG version name: ${t}`);
3724
3731
  this.name = e.name, this.value = e.value;
3725
3732
  return;
3726
3733
  }
3727
3734
  if (typeof t == "number") {
3728
- const e = Io.find((s) => s.value === t);
3735
+ const e = Po.find((s) => s.value === t);
3729
3736
  if (!e)
3730
3737
  throw new Error(`Unknown DWG version value: ${t}`);
3731
3738
  this.name = e.name, this.value = e.value;
@@ -3745,7 +3752,7 @@ class Xc {
3745
3752
  * @param buffer The ArrayBuffer containing DXF file content.
3746
3753
  */
3747
3754
  getDxfInfoFromBuffer(t) {
3748
- var f, A, b;
3755
+ var f, w, b;
3749
3756
  const s = new TextDecoder("utf-8");
3750
3757
  let o = 0, h = "", c = null, g = null, x = !1;
3751
3758
  for (; o < t.byteLength; ) {
@@ -3760,7 +3767,7 @@ class Xc {
3760
3767
  else if (B === "ENDSEC" && x)
3761
3768
  return { version: c, encoding: g };
3762
3769
  if (x && B === "$ACADVER") {
3763
- const dt = (A = z[D + 2]) == null ? void 0 : A.trim();
3770
+ const dt = (w = z[D + 2]) == null ? void 0 : w.trim();
3764
3771
  dt && (c = new Li(dt));
3765
3772
  } else if (x && B === "$DWGCODEPAGE") {
3766
3773
  const dt = (b = z[D + 2]) == null ? void 0 : b.trim();
@@ -4034,7 +4041,7 @@ const fe = [
4034
4041
  "fe",
4035
4042
  "ff"
4036
4043
  ];
4037
- let Po = 1234567;
4044
+ let Io = 1234567;
4038
4045
  const oh = Math.PI / 180, lh = 180 / Math.PI;
4039
4046
  function Kc() {
4040
4047
  const i = Math.random() * 4294967295 | 0, t = Math.random() * 4294967295 | 0, e = Math.random() * 4294967295 | 0, s = Math.random() * 4294967295 | 0;
@@ -4077,8 +4084,8 @@ function sd(i) {
4077
4084
  return i * (0.5 - Math.random());
4078
4085
  }
4079
4086
  function id(i) {
4080
- i !== void 0 && (Po = i);
4081
- let t = Po += 1831565813;
4087
+ i !== void 0 && (Io = i);
4088
+ let t = Io += 1831565813;
4082
4089
  return t = Math.imul(t ^ t >>> 15, t | 1), t ^= t + Math.imul(t ^ t >>> 7, t | 61), ((t ^ t >>> 14) >>> 0) / 4294967296;
4083
4090
  }
4084
4091
  function ad(i) {
@@ -4670,8 +4677,8 @@ const zi = class mh {
4670
4677
  * @returns Return this matrix
4671
4678
  */
4672
4679
  set(t, e, s, o, h, c, g, x, f) {
4673
- const A = this.elements;
4674
- return A[0] = t, A[1] = o, A[2] = g, A[3] = e, A[4] = h, A[5] = x, A[6] = s, A[7] = c, A[8] = f, this;
4680
+ const w = this.elements;
4681
+ return w[0] = t, w[1] = o, w[2] = g, w[3] = e, w[4] = h, w[5] = x, w[6] = s, w[7] = c, w[8] = f, this;
4675
4682
  }
4676
4683
  /**
4677
4684
  * Reset this matrix to the 3x3 identity matrix:
@@ -4731,8 +4738,8 @@ const zi = class mh {
4731
4738
  * @returns Return this matrix
4732
4739
  */
4733
4740
  multiplyMatrices(t, e) {
4734
- const s = t.elements, o = e.elements, h = this.elements, c = s[0], g = s[3], x = s[6], f = s[1], A = s[4], b = s[7], E = s[2], M = s[5], O = s[8], z = o[0], D = o[3], B = o[6], dt = o[1], vt = o[4], ot = o[7], W = o[2], ut = o[5], st = o[8];
4735
- return h[0] = c * z + g * dt + x * W, h[3] = c * D + g * vt + x * ut, h[6] = c * B + g * ot + x * st, h[1] = f * z + A * dt + b * W, h[4] = f * D + A * vt + b * ut, h[7] = f * B + A * ot + b * st, h[2] = E * z + M * dt + O * W, h[5] = E * D + M * vt + O * ut, h[8] = E * B + M * ot + O * st, this;
4741
+ const s = t.elements, o = e.elements, h = this.elements, c = s[0], g = s[3], x = s[6], f = s[1], w = s[4], b = s[7], E = s[2], M = s[5], L = s[8], z = o[0], D = o[3], B = o[6], dt = o[1], vt = o[4], ot = o[7], W = o[2], ut = o[5], st = o[8];
4742
+ return h[0] = c * z + g * dt + x * W, h[3] = c * D + g * vt + x * ut, h[6] = c * B + g * ot + x * st, h[1] = f * z + w * dt + b * W, h[4] = f * D + w * vt + b * ut, h[7] = f * B + w * ot + b * st, h[2] = E * z + M * dt + L * W, h[5] = E * D + M * vt + L * ut, h[8] = E * B + M * ot + L * st, this;
4736
4743
  }
4737
4744
  /**
4738
4745
  * Multiply every component of the matrix by the scalar value s.
@@ -4748,8 +4755,8 @@ const zi = class mh {
4748
4755
  * @returns Return the determinant of this matrix
4749
4756
  */
4750
4757
  determinant() {
4751
- const t = this.elements, e = t[0], s = t[1], o = t[2], h = t[3], c = t[4], g = t[5], x = t[6], f = t[7], A = t[8];
4752
- return e * c * A - e * g * f - s * h * A + s * g * x + o * h * f - o * c * x;
4758
+ const t = this.elements, e = t[0], s = t[1], o = t[2], h = t[3], c = t[4], g = t[5], x = t[6], f = t[7], w = t[8];
4759
+ return e * c * w - e * g * f - s * h * w + s * g * x + o * h * f - o * c * x;
4753
4760
  }
4754
4761
  /**
4755
4762
  * Invert this matrix, using the analytic method. You can not invert with a determinant of zero.
@@ -4757,10 +4764,10 @@ const zi = class mh {
4757
4764
  * @returns Return this matrix
4758
4765
  */
4759
4766
  invert() {
4760
- const t = this.elements, e = t[0], s = t[1], o = t[2], h = t[3], c = t[4], g = t[5], x = t[6], f = t[7], A = t[8], b = A * c - g * f, E = g * x - A * h, M = f * h - c * x, O = e * b + s * E + o * M;
4761
- if (O === 0) return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0);
4762
- const z = 1 / O;
4763
- return t[0] = b * z, t[1] = (o * f - A * s) * z, t[2] = (g * s - o * c) * z, t[3] = E * z, t[4] = (A * e - o * x) * z, t[5] = (o * h - g * e) * z, t[6] = M * z, t[7] = (s * x - f * e) * z, t[8] = (c * e - s * h) * z, this;
4767
+ const t = this.elements, e = t[0], s = t[1], o = t[2], h = t[3], c = t[4], g = t[5], x = t[6], f = t[7], w = t[8], b = w * c - g * f, E = g * x - w * h, M = f * h - c * x, L = e * b + s * E + o * M;
4768
+ if (L === 0) return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0);
4769
+ const z = 1 / L;
4770
+ return t[0] = b * z, t[1] = (o * f - w * s) * z, t[2] = (g * s - o * c) * z, t[3] = E * z, t[4] = (w * e - o * x) * z, t[5] = (o * h - g * e) * z, t[6] = M * z, t[7] = (s * x - f * e) * z, t[8] = (c * e - s * h) * z, this;
4764
4771
  }
4765
4772
  /**
4766
4773
  * Transpose this matrix in place.
@@ -4822,7 +4829,7 @@ const zi = class mh {
4822
4829
  * @returns Return this matrix
4823
4830
  */
4824
4831
  scale(t, e) {
4825
- return this.premultiply(Pi.makeScale(t, e)), this;
4832
+ return this.premultiply(Ii.makeScale(t, e)), this;
4826
4833
  }
4827
4834
  /**
4828
4835
  * Rotate this matrix by the given angle (in radians).
@@ -4830,7 +4837,7 @@ const zi = class mh {
4830
4837
  * @returns Return this matrix
4831
4838
  */
4832
4839
  rotate(t) {
4833
- return this.premultiply(Pi.makeRotation(-t)), this;
4840
+ return this.premultiply(Ii.makeRotation(-t)), this;
4834
4841
  }
4835
4842
  /**
4836
4843
  * Translate this matrix by the given scalar values.
@@ -4839,7 +4846,7 @@ const zi = class mh {
4839
4846
  * @returns Return this matrix
4840
4847
  */
4841
4848
  translate(t, e) {
4842
- return this.premultiply(Pi.makeTranslation(t, e)), this;
4849
+ return this.premultiply(Ii.makeTranslation(t, e)), this;
4843
4850
  }
4844
4851
  /**
4845
4852
  * Set this matrix as a 2D translation transform:
@@ -4910,7 +4917,7 @@ const zi = class mh {
4910
4917
  };
4911
4918
  zi.IDENTITY = Object.freeze(new zi());
4912
4919
  let ga = zi;
4913
- const Pi = /* @__PURE__ */ new ga(), Mn = 1e-6, se = 2 * Math.PI, S0 = {
4920
+ const Ii = /* @__PURE__ */ new ga(), Mn = 1e-6, se = 2 * Math.PI, S0 = {
4914
4921
  x: 0,
4915
4922
  y: 0
4916
4923
  }, ph = {
@@ -4993,9 +5000,9 @@ function _h(i, t, e = !1) {
4993
5000
  let h = !1;
4994
5001
  const c = t.length;
4995
5002
  for (let g = 0, x = c - 1; g < c; x = g++) {
4996
- const f = t[g].x, A = t[g].y, b = t[x].x, E = t[x].y;
4997
- let M = A > o != E > o;
4998
- e && (M = A >= o != E >= o), M && s < (b - f) * (o - A) / (E - A) + f && (h = !h);
5003
+ const f = t[g].x, w = t[g].y, b = t[x].x, E = t[x].y;
5004
+ let M = w > o != E > o;
5005
+ e && (M = w >= o != E >= o), M && s < (b - f) * (o - w) / (E - w) + f && (h = !h);
4999
5006
  }
5000
5007
  return h;
5001
5008
  }
@@ -5030,7 +5037,7 @@ function _d(i, t) {
5030
5037
  const e = t.length - 1, s = i, o = [0];
5031
5038
  let h = 0;
5032
5039
  for (let g = 1; g <= e; g++) {
5033
- const x = t[g][0] - t[g - 1][0], f = t[g][1] - t[g - 1][1], A = t[g][2] - t[g - 1][2], b = Math.sqrt(x * x + f * f + A * A);
5040
+ const x = t[g][0] - t[g - 1][0], f = t[g][1] - t[g - 1][1], w = t[g][2] - t[g - 1][2], b = Math.sqrt(x * x + f * f + w * w);
5034
5041
  h += b, o.push(h);
5035
5042
  }
5036
5043
  const c = [];
@@ -5048,7 +5055,7 @@ function vd(i, t) {
5048
5055
  const e = t.length - 1, s = i, o = [0];
5049
5056
  let h = 0;
5050
5057
  for (let g = 1; g <= e; g++) {
5051
- const x = t[g][0] - t[g - 1][0], f = t[g][1] - t[g - 1][1], A = t[g][2] - t[g - 1][2], b = Math.sqrt(x * x + f * f + A * A), E = Math.sqrt(b);
5058
+ const x = t[g][0] - t[g - 1][0], f = t[g][1] - t[g - 1][1], w = t[g][2] - t[g - 1][2], b = Math.sqrt(x * x + f * f + w * w), E = Math.sqrt(b);
5052
5059
  h += E, o.push(h);
5053
5060
  }
5054
5061
  const c = [];
@@ -5077,7 +5084,7 @@ function Ks(i, t, e, s, o) {
5077
5084
  const g = [0, 0, 0];
5078
5085
  let x = 0;
5079
5086
  for (let f = 0; f <= h; f++) {
5080
- const A = Ri(f, c, i, e), b = o[f] * A;
5087
+ const w = Ri(f, c, i, e), b = o[f] * w;
5081
5088
  g[0] += s[f][0] * b, g[1] += s[f][1] * b, g[2] += s[f][2] * b, x += b;
5082
5089
  }
5083
5090
  if (x < 1e-10) {
@@ -5093,7 +5100,7 @@ function yd(i, t, e, s) {
5093
5100
  const o = i, h = t[o], c = t[t.length - o - 1];
5094
5101
  let g = 0;
5095
5102
  const x = 1e3, f = (c - h) / x;
5096
- let A = Ks(
5103
+ let w = Ks(
5097
5104
  h,
5098
5105
  i,
5099
5106
  t,
@@ -5101,8 +5108,8 @@ function yd(i, t, e, s) {
5101
5108
  s
5102
5109
  );
5103
5110
  for (let z = 1; z <= x; z++) {
5104
- const D = h + z * f, B = Ks(D, i, t, e, s), dt = B[0] - A[0], vt = B[1] - A[1], ot = B[2] - A[2];
5105
- g += Math.sqrt(dt * dt + vt * vt + ot * ot), A = B;
5111
+ const D = h + z * f, B = Ks(D, i, t, e, s), dt = B[0] - w[0], vt = B[1] - w[1], ot = B[2] - w[2];
5112
+ g += Math.sqrt(dt * dt + vt * vt + ot * ot), w = B;
5106
5113
  }
5107
5114
  const b = Ks(
5108
5115
  c,
@@ -5110,10 +5117,10 @@ function yd(i, t, e, s) {
5110
5117
  t,
5111
5118
  e,
5112
5119
  s
5113
- ), E = b[0] - A[0], M = b[1] - A[1], O = b[2] - A[2];
5114
- return g += Math.sqrt(E * E + M * M + O * O), g;
5120
+ ), E = b[0] - w[0], M = b[1] - w[1], L = b[2] - w[2];
5121
+ return g += Math.sqrt(E * E + M * M + L * L), g;
5115
5122
  }
5116
- function I0(i) {
5123
+ function P0(i) {
5117
5124
  return i.map((t) => [...t]);
5118
5125
  }
5119
5126
  class un {
@@ -5138,30 +5145,30 @@ class un {
5138
5145
  * @param t Input normalized interpolation factor (between 0 and 1).
5139
5146
  */
5140
5147
  static slerpFlat(t, e, s, o, h, c, g) {
5141
- let x = s[o + 0], f = s[o + 1], A = s[o + 2], b = s[o + 3];
5142
- const E = h[c + 0], M = h[c + 1], O = h[c + 2], z = h[c + 3];
5148
+ let x = s[o + 0], f = s[o + 1], w = s[o + 2], b = s[o + 3];
5149
+ const E = h[c + 0], M = h[c + 1], L = h[c + 2], z = h[c + 3];
5143
5150
  if (g === 0) {
5144
- t[e + 0] = x, t[e + 1] = f, t[e + 2] = A, t[e + 3] = b;
5151
+ t[e + 0] = x, t[e + 1] = f, t[e + 2] = w, t[e + 3] = b;
5145
5152
  return;
5146
5153
  }
5147
5154
  if (g === 1) {
5148
- t[e + 0] = E, t[e + 1] = M, t[e + 2] = O, t[e + 3] = z;
5155
+ t[e + 0] = E, t[e + 1] = M, t[e + 2] = L, t[e + 3] = z;
5149
5156
  return;
5150
5157
  }
5151
- if (b !== z || x !== E || f !== M || A !== O) {
5158
+ if (b !== z || x !== E || f !== M || w !== L) {
5152
5159
  let D = 1 - g;
5153
- const B = x * E + f * M + A * O + b * z, dt = B >= 0 ? 1 : -1, vt = 1 - B * B;
5160
+ const B = x * E + f * M + w * L + b * z, dt = B >= 0 ? 1 : -1, vt = 1 - B * B;
5154
5161
  if (vt > Number.EPSILON) {
5155
5162
  const W = Math.sqrt(vt), ut = Math.atan2(W, B * dt);
5156
5163
  D = Math.sin(D * ut) / W, g = Math.sin(g * ut) / W;
5157
5164
  }
5158
5165
  const ot = g * dt;
5159
- if (x = x * D + E * ot, f = f * D + M * ot, A = A * D + O * ot, b = b * D + z * ot, D === 1 - g) {
5160
- const W = 1 / Math.sqrt(x * x + f * f + A * A + b * b);
5161
- x *= W, f *= W, A *= W, b *= W;
5166
+ if (x = x * D + E * ot, f = f * D + M * ot, w = w * D + L * ot, b = b * D + z * ot, D === 1 - g) {
5167
+ const W = 1 / Math.sqrt(x * x + f * f + w * w + b * b);
5168
+ x *= W, f *= W, w *= W, b *= W;
5162
5169
  }
5163
5170
  }
5164
- t[e] = x, t[e + 1] = f, t[e + 2] = A, t[e + 3] = b;
5171
+ t[e] = x, t[e + 1] = f, t[e + 2] = w, t[e + 3] = b;
5165
5172
  }
5166
5173
  /**
5167
5174
  * This multiplication implementation assumes the quaternion data are managed in flat arrays.
@@ -5174,8 +5181,8 @@ class un {
5174
5181
  * @returns Return an array
5175
5182
  */
5176
5183
  static multiplyQuaternionsFlat(t, e, s, o, h, c) {
5177
- const g = s[o], x = s[o + 1], f = s[o + 2], A = s[o + 3], b = h[c], E = h[c + 1], M = h[c + 2], O = h[c + 3];
5178
- return t[e] = g * O + A * b + x * M - f * E, t[e + 1] = x * O + A * E + f * b - g * M, t[e + 2] = f * O + A * M + g * E - x * b, t[e + 3] = A * O - g * b - x * E - f * M, t;
5184
+ const g = s[o], x = s[o + 1], f = s[o + 2], w = s[o + 3], b = h[c], E = h[c + 1], M = h[c + 2], L = h[c + 3];
5185
+ return t[e] = g * L + w * b + x * M - f * E, t[e + 1] = x * L + w * E + f * b - g * M, t[e + 2] = f * L + w * M + g * E - x * b, t[e + 3] = w * L - g * b - x * E - f * M, t;
5179
5186
  }
5180
5187
  /**
5181
5188
  * X cooridinate
@@ -5246,25 +5253,25 @@ class un {
5246
5253
  * @returns Return this quaternion
5247
5254
  */
5248
5255
  setFromEuler(t, e = !0) {
5249
- const s = t.x, o = t.y, h = t.z, c = t.order, g = Math.cos, x = Math.sin, f = g(s / 2), A = g(o / 2), b = g(h / 2), E = x(s / 2), M = x(o / 2), O = x(h / 2);
5256
+ const s = t.x, o = t.y, h = t.z, c = t.order, g = Math.cos, x = Math.sin, f = g(s / 2), w = g(o / 2), b = g(h / 2), E = x(s / 2), M = x(o / 2), L = x(h / 2);
5250
5257
  switch (c) {
5251
5258
  case "XYZ":
5252
- this._x = E * A * b + f * M * O, this._y = f * M * b - E * A * O, this._z = f * A * O + E * M * b, this._w = f * A * b - E * M * O;
5259
+ this._x = E * w * b + f * M * L, this._y = f * M * b - E * w * L, this._z = f * w * L + E * M * b, this._w = f * w * b - E * M * L;
5253
5260
  break;
5254
5261
  case "YXZ":
5255
- this._x = E * A * b + f * M * O, this._y = f * M * b - E * A * O, this._z = f * A * O - E * M * b, this._w = f * A * b + E * M * O;
5262
+ this._x = E * w * b + f * M * L, this._y = f * M * b - E * w * L, this._z = f * w * L - E * M * b, this._w = f * w * b + E * M * L;
5256
5263
  break;
5257
5264
  case "ZXY":
5258
- this._x = E * A * b - f * M * O, this._y = f * M * b + E * A * O, this._z = f * A * O + E * M * b, this._w = f * A * b - E * M * O;
5265
+ this._x = E * w * b - f * M * L, this._y = f * M * b + E * w * L, this._z = f * w * L + E * M * b, this._w = f * w * b - E * M * L;
5259
5266
  break;
5260
5267
  case "ZYX":
5261
- this._x = E * A * b - f * M * O, this._y = f * M * b + E * A * O, this._z = f * A * O - E * M * b, this._w = f * A * b + E * M * O;
5268
+ this._x = E * w * b - f * M * L, this._y = f * M * b + E * w * L, this._z = f * w * L - E * M * b, this._w = f * w * b + E * M * L;
5262
5269
  break;
5263
5270
  case "YZX":
5264
- this._x = E * A * b + f * M * O, this._y = f * M * b + E * A * O, this._z = f * A * O - E * M * b, this._w = f * A * b - E * M * O;
5271
+ this._x = E * w * b + f * M * L, this._y = f * M * b + E * w * L, this._z = f * w * L - E * M * b, this._w = f * w * b - E * M * L;
5265
5272
  break;
5266
5273
  case "XZY":
5267
- this._x = E * A * b - f * M * O, this._y = f * M * b - E * A * O, this._z = f * A * O + E * M * b, this._w = f * A * b + E * M * O;
5274
+ this._x = E * w * b - f * M * L, this._y = f * M * b - E * w * L, this._z = f * w * L + E * M * b, this._w = f * w * b + E * M * L;
5268
5275
  break;
5269
5276
  default:
5270
5277
  console.warn(
@@ -5290,19 +5297,19 @@ class un {
5290
5297
  * @returns Return this quaternion
5291
5298
  */
5292
5299
  setFromRotationMatrix(t) {
5293
- const e = t.elements, s = e[0], o = e[4], h = e[8], c = e[1], g = e[5], x = e[9], f = e[2], A = e[6], b = e[10], E = s + g + b;
5300
+ const e = t.elements, s = e[0], o = e[4], h = e[8], c = e[1], g = e[5], x = e[9], f = e[2], w = e[6], b = e[10], E = s + g + b;
5294
5301
  if (E > 0) {
5295
5302
  const M = 0.5 / Math.sqrt(E + 1);
5296
- this._w = 0.25 / M, this._x = (A - x) * M, this._y = (h - f) * M, this._z = (c - o) * M;
5303
+ this._w = 0.25 / M, this._x = (w - x) * M, this._y = (h - f) * M, this._z = (c - o) * M;
5297
5304
  } else if (s > g && s > b) {
5298
5305
  const M = 2 * Math.sqrt(1 + s - g - b);
5299
- this._w = (A - x) / M, this._x = 0.25 * M, this._y = (o + c) / M, this._z = (h + f) / M;
5306
+ this._w = (w - x) / M, this._x = 0.25 * M, this._y = (o + c) / M, this._z = (h + f) / M;
5300
5307
  } else if (g > b) {
5301
5308
  const M = 2 * Math.sqrt(1 + g - s - b);
5302
- this._w = (h - f) / M, this._x = (o + c) / M, this._y = 0.25 * M, this._z = (x + A) / M;
5309
+ this._w = (h - f) / M, this._x = (o + c) / M, this._y = 0.25 * M, this._z = (x + w) / M;
5303
5310
  } else {
5304
5311
  const M = 2 * Math.sqrt(1 + b - s - g);
5305
- this._w = (c - o) / M, this._x = (h + f) / M, this._y = (x + A) / M, this._z = 0.25 * M;
5312
+ this._w = (c - o) / M, this._x = (h + f) / M, this._y = (x + w) / M, this._z = 0.25 * M;
5306
5313
  }
5307
5314
  return this._onChangeCallback(), this;
5308
5315
  }
@@ -5419,8 +5426,8 @@ class un {
5419
5426
  * @returns Return this quaternion
5420
5427
  */
5421
5428
  multiplyQuaternions(t, e) {
5422
- const s = t._x, o = t._y, h = t._z, c = t._w, g = e._x, x = e._y, f = e._z, A = e._w;
5423
- return this._x = s * A + c * g + o * f - h * x, this._y = o * A + c * x + h * g - s * f, this._z = h * A + c * f + s * x - o * g, this._w = c * A - s * g - o * x - h * f, this._onChangeCallback(), this;
5429
+ const s = t._x, o = t._y, h = t._z, c = t._w, g = e._x, x = e._y, f = e._z, w = e._w;
5430
+ return this._x = s * w + c * g + o * f - h * x, this._y = o * w + c * x + h * g - s * f, this._z = h * w + c * f + s * x - o * g, this._w = c * w - s * g - o * x - h * f, this._onChangeCallback(), this;
5424
5431
  }
5425
5432
  /**
5426
5433
  * Handles the spherical linear interpolation between quaternions. t represents the amount of rotation
@@ -5441,7 +5448,7 @@ class un {
5441
5448
  const M = 1 - e;
5442
5449
  return this._w = M * c + e * this._w, this._x = M * s + e * this._x, this._y = M * o + e * this._y, this._z = M * h + e * this._z, this.normalize(), this;
5443
5450
  }
5444
- const f = Math.sqrt(x), A = Math.atan2(f, g), b = Math.sin((1 - e) * A) / f, E = Math.sin(e * A) / f;
5451
+ const f = Math.sqrt(x), w = Math.atan2(f, g), b = Math.sin((1 - e) * w) / f, E = Math.sin(e * w) / f;
5445
5452
  return this._w = c * b + this._w * E, this._x = s * b + this._x * E, this._y = o * b + this._y * E, this._z = h * b + this._z * E, this._onChangeCallback(), this;
5446
5453
  }
5447
5454
  /**
@@ -5767,8 +5774,8 @@ const Ve = class vh {
5767
5774
  * @returns Return this vector
5768
5775
  */
5769
5776
  applyQuaternion(t) {
5770
- const e = this.x, s = this.y, o = this.z, h = t.x, c = t.y, g = t.z, x = t.w, f = 2 * (c * o - g * s), A = 2 * (g * e - h * o), b = 2 * (h * s - c * e);
5771
- return this.x = e + x * f + c * b - g * A, this.y = s + x * A + g * f - h * b, this.z = o + x * b + h * A - c * f, this;
5777
+ const e = this.x, s = this.y, o = this.z, h = t.x, c = t.y, g = t.z, x = t.w, f = 2 * (c * o - g * s), w = 2 * (g * e - h * o), b = 2 * (h * s - c * e);
5778
+ return this.x = e + x * f + c * b - g * w, this.y = s + x * w + g * f - h * b, this.z = o + x * b + h * w - c * f, this;
5772
5779
  }
5773
5780
  /**
5774
5781
  * Transforms the direction of this vector by a matrix (the upper left 3 x 3 subset of a m) and
@@ -6173,8 +6180,8 @@ const Ei = /* @__PURE__ */ new Z(), Eo = /* @__PURE__ */ new un(), Fi = class yh
6173
6180
  * @param n43 Input element in the forth row and the third column
6174
6181
  * @param n44 Input element in the forth row and the forth column
6175
6182
  */
6176
- constructor(t, e, s, o, h, c, g, x, f, A, b, E, M, O, z, D) {
6177
- this.elements = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1], t != null && e != null && s != null && o != null && h != null && c != null && g != null && x != null && f != null && A != null && b != null && E != null && M != null && O != null && z != null && D != null && this.set(
6183
+ constructor(t, e, s, o, h, c, g, x, f, w, b, E, M, L, z, D) {
6184
+ this.elements = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1], t != null && e != null && s != null && o != null && h != null && c != null && g != null && x != null && f != null && w != null && b != null && E != null && M != null && L != null && z != null && D != null && this.set(
6178
6185
  t,
6179
6186
  e,
6180
6187
  s,
@@ -6184,11 +6191,11 @@ const Ei = /* @__PURE__ */ new Z(), Eo = /* @__PURE__ */ new un(), Fi = class yh
6184
6191
  g,
6185
6192
  x,
6186
6193
  f,
6187
- A,
6194
+ w,
6188
6195
  b,
6189
6196
  E,
6190
6197
  M,
6191
- O,
6198
+ L,
6192
6199
  z,
6193
6200
  D
6194
6201
  );
@@ -6214,9 +6221,9 @@ const Ei = /* @__PURE__ */ new Z(), Eo = /* @__PURE__ */ new un(), Fi = class yh
6214
6221
  * @param n44 Input element in the forth row and the forth column
6215
6222
  * @returns Return this matrix
6216
6223
  */
6217
- set(t, e, s, o, h, c, g, x, f, A, b, E, M, O, z, D) {
6224
+ set(t, e, s, o, h, c, g, x, f, w, b, E, M, L, z, D) {
6218
6225
  const B = this.elements;
6219
- return B[0] = t, B[4] = e, B[8] = s, B[12] = o, B[1] = h, B[5] = c, B[9] = g, B[13] = x, B[2] = f, B[6] = A, B[10] = b, B[14] = E, B[3] = M, B[7] = O, B[11] = z, B[15] = D, this;
6226
+ return B[0] = t, B[4] = e, B[8] = s, B[12] = o, B[1] = h, B[5] = c, B[9] = g, B[13] = x, B[2] = f, B[6] = w, B[10] = b, B[14] = E, B[3] = M, B[7] = L, B[11] = z, B[15] = D, this;
6220
6227
  }
6221
6228
  /**
6222
6229
  * Reset this matrix to the identity matrix.
@@ -6500,8 +6507,8 @@ const Ei = /* @__PURE__ */ new Z(), Eo = /* @__PURE__ */ new un(), Fi = class yh
6500
6507
  * @returns Return this matrix
6501
6508
  */
6502
6509
  multiplyMatrices(t, e) {
6503
- const s = t.elements, o = e.elements, h = this.elements, c = s[0], g = s[4], x = s[8], f = s[12], A = s[1], b = s[5], E = s[9], M = s[13], O = s[2], z = s[6], D = s[10], B = s[14], dt = s[3], vt = s[7], ot = s[11], W = s[15], ut = o[0], st = o[4], Vt = o[8], qt = o[12], Wt = o[1], bt = o[5], Ot = o[9], de = o[13], me = o[2], Me = o[6], Jt = o[10], ie = o[14], Q = o[3], Mt = o[7], ae = o[11], hr = o[15];
6504
- return h[0] = c * ut + g * Wt + x * me + f * Q, h[4] = c * st + g * bt + x * Me + f * Mt, h[8] = c * Vt + g * Ot + x * Jt + f * ae, h[12] = c * qt + g * de + x * ie + f * hr, h[1] = A * ut + b * Wt + E * me + M * Q, h[5] = A * st + b * bt + E * Me + M * Mt, h[9] = A * Vt + b * Ot + E * Jt + M * ae, h[13] = A * qt + b * de + E * ie + M * hr, h[2] = O * ut + z * Wt + D * me + B * Q, h[6] = O * st + z * bt + D * Me + B * Mt, h[10] = O * Vt + z * Ot + D * Jt + B * ae, h[14] = O * qt + z * de + D * ie + B * hr, h[3] = dt * ut + vt * Wt + ot * me + W * Q, h[7] = dt * st + vt * bt + ot * Me + W * Mt, h[11] = dt * Vt + vt * Ot + ot * Jt + W * ae, h[15] = dt * qt + vt * de + ot * ie + W * hr, this;
6510
+ const s = t.elements, o = e.elements, h = this.elements, c = s[0], g = s[4], x = s[8], f = s[12], w = s[1], b = s[5], E = s[9], M = s[13], L = s[2], z = s[6], D = s[10], B = s[14], dt = s[3], vt = s[7], ot = s[11], W = s[15], ut = o[0], st = o[4], Vt = o[8], qt = o[12], Wt = o[1], bt = o[5], Ot = o[9], de = o[13], me = o[2], Me = o[6], Jt = o[10], ie = o[14], Q = o[3], Mt = o[7], ae = o[11], hr = o[15];
6511
+ return h[0] = c * ut + g * Wt + x * me + f * Q, h[4] = c * st + g * bt + x * Me + f * Mt, h[8] = c * Vt + g * Ot + x * Jt + f * ae, h[12] = c * qt + g * de + x * ie + f * hr, h[1] = w * ut + b * Wt + E * me + M * Q, h[5] = w * st + b * bt + E * Me + M * Mt, h[9] = w * Vt + b * Ot + E * Jt + M * ae, h[13] = w * qt + b * de + E * ie + M * hr, h[2] = L * ut + z * Wt + D * me + B * Q, h[6] = L * st + z * bt + D * Me + B * Mt, h[10] = L * Vt + z * Ot + D * Jt + B * ae, h[14] = L * qt + z * de + D * ie + B * hr, h[3] = dt * ut + vt * Wt + ot * me + W * Q, h[7] = dt * st + vt * bt + ot * Me + W * Mt, h[11] = dt * Vt + vt * Ot + ot * Jt + W * ae, h[15] = dt * qt + vt * de + ot * ie + W * hr, this;
6505
6512
  }
6506
6513
  /**
6507
6514
  * Multiply every component of the matrix by a scalar value s.
@@ -6517,8 +6524,8 @@ const Ei = /* @__PURE__ */ new Z(), Eo = /* @__PURE__ */ new un(), Fi = class yh
6517
6524
  * @returns Return the determinant of this matrix.
6518
6525
  */
6519
6526
  determinant() {
6520
- const t = this.elements, e = t[0], s = t[4], o = t[8], h = t[12], c = t[1], g = t[5], x = t[9], f = t[13], A = t[2], b = t[6], E = t[10], M = t[14], O = t[3], z = t[7], D = t[11], B = t[15];
6521
- return O * (+h * x * b - o * f * b - h * g * E + s * f * E + o * g * M - s * x * M) + z * (+e * x * M - e * f * E + h * c * E - o * c * M + o * f * A - h * x * A) + D * (+e * f * b - e * g * M - h * c * b + s * c * M + h * g * A - s * f * A) + B * (-o * g * A - e * x * b + e * g * E + o * c * b - s * c * E + s * x * A);
6527
+ const t = this.elements, e = t[0], s = t[4], o = t[8], h = t[12], c = t[1], g = t[5], x = t[9], f = t[13], w = t[2], b = t[6], E = t[10], M = t[14], L = t[3], z = t[7], D = t[11], B = t[15];
6528
+ return L * (+h * x * b - o * f * b - h * g * E + s * f * E + o * g * M - s * x * M) + z * (+e * x * M - e * f * E + h * c * E - o * c * M + o * f * w - h * x * w) + D * (+e * f * b - e * g * M - h * c * b + s * c * M + h * g * w - s * f * w) + B * (-o * g * w - e * x * b + e * g * E + o * c * b - s * c * E + s * x * w);
6522
6529
  }
6523
6530
  /**
6524
6531
  * Transposes this matrix.
@@ -6546,11 +6553,11 @@ const Ei = /* @__PURE__ */ new Z(), Eo = /* @__PURE__ */ new un(), Fi = class yh
6546
6553
  * @returns Return this matrix
6547
6554
  */
6548
6555
  invert() {
6549
- const t = this.elements, e = t[0], s = t[1], o = t[2], h = t[3], c = t[4], g = t[5], x = t[6], f = t[7], A = t[8], b = t[9], E = t[10], M = t[11], O = t[12], z = t[13], D = t[14], B = t[15], dt = b * D * f - z * E * f + z * x * M - g * D * M - b * x * B + g * E * B, vt = O * E * f - A * D * f - O * x * M + c * D * M + A * x * B - c * E * B, ot = A * z * f - O * b * f + O * g * M - c * z * M - A * g * B + c * b * B, W = O * b * x - A * z * x - O * g * E + c * z * E + A * g * D - c * b * D, ut = e * dt + s * vt + o * ot + h * W;
6556
+ const t = this.elements, e = t[0], s = t[1], o = t[2], h = t[3], c = t[4], g = t[5], x = t[6], f = t[7], w = t[8], b = t[9], E = t[10], M = t[11], L = t[12], z = t[13], D = t[14], B = t[15], dt = b * D * f - z * E * f + z * x * M - g * D * M - b * x * B + g * E * B, vt = L * E * f - w * D * f - L * x * M + c * D * M + w * x * B - c * E * B, ot = w * z * f - L * b * f + L * g * M - c * z * M - w * g * B + c * b * B, W = L * b * x - w * z * x - L * g * E + c * z * E + w * g * D - c * b * D, ut = e * dt + s * vt + o * ot + h * W;
6550
6557
  if (ut === 0)
6551
6558
  return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
6552
6559
  const st = 1 / ut;
6553
- return t[0] = dt * st, t[1] = (z * E * h - b * D * h - z * o * M + s * D * M + b * o * B - s * E * B) * st, t[2] = (g * D * h - z * x * h + z * o * f - s * D * f - g * o * B + s * x * B) * st, t[3] = (b * x * h - g * E * h - b * o * f + s * E * f + g * o * M - s * x * M) * st, t[4] = vt * st, t[5] = (A * D * h - O * E * h + O * o * M - e * D * M - A * o * B + e * E * B) * st, t[6] = (O * x * h - c * D * h - O * o * f + e * D * f + c * o * B - e * x * B) * st, t[7] = (c * E * h - A * x * h + A * o * f - e * E * f - c * o * M + e * x * M) * st, t[8] = ot * st, t[9] = (O * b * h - A * z * h - O * s * M + e * z * M + A * s * B - e * b * B) * st, t[10] = (c * z * h - O * g * h + O * s * f - e * z * f - c * s * B + e * g * B) * st, t[11] = (A * g * h - c * b * h - A * s * f + e * b * f + c * s * M - e * g * M) * st, t[12] = W * st, t[13] = (A * z * o - O * b * o + O * s * E - e * z * E - A * s * D + e * b * D) * st, t[14] = (O * g * o - c * z * o - O * s * x + e * z * x + c * s * D - e * g * D) * st, t[15] = (c * b * o - A * g * o + A * s * x - e * b * x - c * s * E + e * g * E) * st, this;
6560
+ return t[0] = dt * st, t[1] = (z * E * h - b * D * h - z * o * M + s * D * M + b * o * B - s * E * B) * st, t[2] = (g * D * h - z * x * h + z * o * f - s * D * f - g * o * B + s * x * B) * st, t[3] = (b * x * h - g * E * h - b * o * f + s * E * f + g * o * M - s * x * M) * st, t[4] = vt * st, t[5] = (w * D * h - L * E * h + L * o * M - e * D * M - w * o * B + e * E * B) * st, t[6] = (L * x * h - c * D * h - L * o * f + e * D * f + c * o * B - e * x * B) * st, t[7] = (c * E * h - w * x * h + w * o * f - e * E * f - c * o * M + e * x * M) * st, t[8] = ot * st, t[9] = (L * b * h - w * z * h - L * s * M + e * z * M + w * s * B - e * b * B) * st, t[10] = (c * z * h - L * g * h + L * s * f - e * z * f - c * s * B + e * g * B) * st, t[11] = (w * g * h - c * b * h - w * s * f + e * b * f + c * s * M - e * g * M) * st, t[12] = W * st, t[13] = (w * z * o - L * b * o + L * s * E - e * z * E - w * s * D + e * b * D) * st, t[14] = (L * g * o - c * z * o - L * s * x + e * z * x + c * s * D - e * g * D) * st, t[15] = (c * b * o - w * g * o + w * s * x - e * b * x - c * s * E + e * g * E) * st, this;
6554
6561
  }
6555
6562
  /**
6556
6563
  * Multiply the columns of this matrix by vector v.
@@ -6613,18 +6620,18 @@ const Ei = /* @__PURE__ */ new Z(), Eo = /* @__PURE__ */ new un(), Fi = class yh
6613
6620
  * @returns Return this matrix
6614
6621
  */
6615
6622
  makeRotationAxis(t, e) {
6616
- const s = Math.cos(e), o = Math.sin(e), h = 1 - s, c = t.x, g = t.y, x = t.z, f = h * c, A = h * g;
6623
+ const s = Math.cos(e), o = Math.sin(e), h = 1 - s, c = t.x, g = t.y, x = t.z, f = h * c, w = h * g;
6617
6624
  return this.set(
6618
6625
  f * c + s,
6619
6626
  f * g - o * x,
6620
6627
  f * x + o * g,
6621
6628
  0,
6622
6629
  f * g + o * x,
6623
- A * g + s,
6624
- A * x - o * c,
6630
+ w * g + s,
6631
+ w * x - o * c,
6625
6632
  0,
6626
6633
  f * x - o * g,
6627
- A * x + o * c,
6634
+ w * x + o * c,
6628
6635
  h * x * x + s,
6629
6636
  0,
6630
6637
  0,
@@ -6664,8 +6671,8 @@ const Ei = /* @__PURE__ */ new Z(), Eo = /* @__PURE__ */ new un(), Fi = class yh
6664
6671
  * @returns Return this matrix
6665
6672
  */
6666
6673
  compose(t, e, s) {
6667
- const o = this.elements, h = e.x, c = e.y, g = e.z, x = e.w, f = h + h, A = c + c, b = g + g, E = h * f, M = h * A, O = h * b, z = c * A, D = c * b, B = g * b, dt = x * f, vt = x * A, ot = x * b, W = s.x, ut = s.y, st = s.z;
6668
- return o[0] = (1 - (z + B)) * W, o[1] = (M + ot) * W, o[2] = (O - vt) * W, o[3] = 0, o[4] = (M - ot) * ut, o[5] = (1 - (E + B)) * ut, o[6] = (D + dt) * ut, o[7] = 0, o[8] = (O + vt) * st, o[9] = (D - dt) * st, o[10] = (1 - (E + z)) * st, o[11] = 0, o[12] = t.x, o[13] = t.y, o[14] = t.z, o[15] = 1, this;
6674
+ const o = this.elements, h = e.x, c = e.y, g = e.z, x = e.w, f = h + h, w = c + c, b = g + g, E = h * f, M = h * w, L = h * b, z = c * w, D = c * b, B = g * b, dt = x * f, vt = x * w, ot = x * b, W = s.x, ut = s.y, st = s.z;
6675
+ return o[0] = (1 - (z + B)) * W, o[1] = (M + ot) * W, o[2] = (L - vt) * W, o[3] = 0, o[4] = (M - ot) * ut, o[5] = (1 - (E + B)) * ut, o[6] = (D + dt) * ut, o[7] = 0, o[8] = (L + vt) * st, o[9] = (D - dt) * st, o[10] = (1 - (E + z)) * st, o[11] = 0, o[12] = t.x, o[13] = t.y, o[14] = t.z, o[15] = 1, this;
6669
6676
  }
6670
6677
  /**
6671
6678
  * Decompose this matrix into its position, quaternion and scale components.
@@ -6683,8 +6690,8 @@ const Ei = /* @__PURE__ */ new Z(), Eo = /* @__PURE__ */ new un(), Fi = class yh
6683
6690
  let h = Tn.set(o[0], o[1], o[2]).length();
6684
6691
  const c = Tn.set(o[4], o[5], o[6]).length(), g = Tn.set(o[8], o[9], o[10]).length();
6685
6692
  this.determinant() < 0 && (h = -h), t.x = o[12], t.y = o[13], t.z = o[14], nr.copy(this);
6686
- const x = 1 / h, f = 1 / c, A = 1 / g;
6687
- return nr.elements[0] *= x, nr.elements[1] *= x, nr.elements[2] *= x, nr.elements[4] *= f, nr.elements[5] *= f, nr.elements[6] *= f, nr.elements[8] *= A, nr.elements[9] *= A, nr.elements[10] *= A, e.setFromRotationMatrix(nr), s.x = h, s.y = c, s.z = g, this;
6693
+ const x = 1 / h, f = 1 / c, w = 1 / g;
6694
+ return nr.elements[0] *= x, nr.elements[1] *= x, nr.elements[2] *= x, nr.elements[4] *= f, nr.elements[5] *= f, nr.elements[6] *= f, nr.elements[8] *= w, nr.elements[9] *= w, nr.elements[10] *= w, e.setFromRotationMatrix(nr), s.x = h, s.y = c, s.z = g, this;
6688
6695
  }
6689
6696
  // makePerspective(
6690
6697
  // left,
@@ -7586,13 +7593,13 @@ const To = /* @__PURE__ */ new cn(), No = /* @__PURE__ */ new un(), xh = class B
7586
7593
  * @returns Return this euler
7587
7594
  */
7588
7595
  setFromRotationMatrix(t, e = this._order, s = !0) {
7589
- const o = t.elements, h = o[0], c = o[4], g = o[8], x = o[1], f = o[5], A = o[9], b = o[2], E = o[6], M = o[10];
7596
+ const o = t.elements, h = o[0], c = o[4], g = o[8], x = o[1], f = o[5], w = o[9], b = o[2], E = o[6], M = o[10];
7590
7597
  switch (e) {
7591
7598
  case "XYZ":
7592
- this._y = Math.asin(Vr(g, -1, 1)), Math.abs(g) < 0.9999999 ? (this._x = Math.atan2(-A, M), this._z = Math.atan2(-c, h)) : (this._x = Math.atan2(E, f), this._z = 0);
7599
+ this._y = Math.asin(Vr(g, -1, 1)), Math.abs(g) < 0.9999999 ? (this._x = Math.atan2(-w, M), this._z = Math.atan2(-c, h)) : (this._x = Math.atan2(E, f), this._z = 0);
7593
7600
  break;
7594
7601
  case "YXZ":
7595
- this._x = Math.asin(-Vr(A, -1, 1)), Math.abs(A) < 0.9999999 ? (this._y = Math.atan2(g, M), this._z = Math.atan2(x, f)) : (this._y = Math.atan2(-b, h), this._z = 0);
7602
+ this._x = Math.asin(-Vr(w, -1, 1)), Math.abs(w) < 0.9999999 ? (this._y = Math.atan2(g, M), this._z = Math.atan2(x, f)) : (this._y = Math.atan2(-b, h), this._z = 0);
7596
7603
  break;
7597
7604
  case "ZXY":
7598
7605
  this._x = Math.asin(Vr(E, -1, 1)), Math.abs(E) < 0.9999999 ? (this._y = Math.atan2(-b, M), this._z = Math.atan2(-c, f)) : (this._y = 0, this._z = Math.atan2(x, h));
@@ -7601,10 +7608,10 @@ const To = /* @__PURE__ */ new cn(), No = /* @__PURE__ */ new un(), xh = class B
7601
7608
  this._y = Math.asin(-Vr(b, -1, 1)), Math.abs(b) < 0.9999999 ? (this._x = Math.atan2(E, M), this._z = Math.atan2(x, h)) : (this._x = 0, this._z = Math.atan2(-c, f));
7602
7609
  break;
7603
7610
  case "YZX":
7604
- this._z = Math.asin(Vr(x, -1, 1)), Math.abs(x) < 0.9999999 ? (this._x = Math.atan2(-A, f), this._y = Math.atan2(-b, h)) : (this._x = 0, this._y = Math.atan2(g, M));
7611
+ this._z = Math.asin(Vr(x, -1, 1)), Math.abs(x) < 0.9999999 ? (this._x = Math.atan2(-w, f), this._y = Math.atan2(-b, h)) : (this._x = 0, this._y = Math.atan2(g, M));
7605
7612
  break;
7606
7613
  case "XZY":
7607
- this._z = Math.asin(-Vr(c, -1, 1)), Math.abs(c) < 0.9999999 ? (this._x = Math.atan2(E, f), this._y = Math.atan2(g, h)) : (this._x = Math.atan2(-A, M), this._y = 0);
7614
+ this._z = Math.asin(-Vr(c, -1, 1)), Math.abs(c) < 0.9999999 ? (this._x = Math.atan2(E, f), this._y = Math.atan2(g, h)) : (this._x = Math.atan2(-w, M), this._y = 0);
7608
7615
  break;
7609
7616
  default:
7610
7617
  console.warn(
@@ -7780,13 +7787,13 @@ class fa extends wh {
7780
7787
  });
7781
7788
  const g = { index: -1, children: [] };
7782
7789
  for (let x = 0; x < c; x++) {
7783
- const f = o[x], A = e[f], b = s[f];
7790
+ const f = o[x], w = e[f], b = s[f];
7784
7791
  let E = x + 1;
7785
7792
  for (; E < c; E++) {
7786
- const M = o[E], O = e[M];
7793
+ const M = o[E], L = e[M];
7787
7794
  if (s[M].containsBox(b) && gd.isPointInPolygon(
7788
- A[kt.randInt(0, A.length - 1)],
7789
- O
7795
+ w[kt.randInt(0, w.length - 1)],
7796
+ L
7790
7797
  )) {
7791
7798
  (t = h.get(M)) == null || t.children.push(h.get(f));
7792
7799
  break;
@@ -7933,7 +7940,7 @@ class Ms extends wh {
7933
7940
  }
7934
7941
  if (o = x, s[o] === c)
7935
7942
  return o / (h - 1);
7936
- const A = s[o], b = s[o + 1] - A, E = (c - A) / b;
7943
+ const w = s[o], b = s[o + 1] - w, E = (c - w) / b;
7937
7944
  return (o + E) / (h - 1);
7938
7945
  }
7939
7946
  /**
@@ -7961,7 +7968,7 @@ class Ms extends wh {
7961
7968
  return this.getTangent(e);
7962
7969
  }
7963
7970
  }
7964
- class Ps extends Ms {
7971
+ class Is extends Ms {
7965
7972
  constructor(t, e, s, o, h) {
7966
7973
  super();
7967
7974
  const c = +(t !== void 0) + +(e !== void 0) + +(s !== void 0) + +(o !== void 0) + +(h !== void 0);
@@ -7991,10 +7998,10 @@ class Ps extends Ms {
7991
7998
  const o = (st, Vt) => ({
7992
7999
  x: (st.x + Vt.x) / 2,
7993
8000
  y: (st.y + Vt.y) / 2
7994
- }), h = (st, Vt) => (Vt.y - st.y) / (Vt.x - st.x), c = (st) => -1 / st, g = o(t, e), x = o(e, s), f = h(t, e), A = h(e, s), b = c(f), E = c(A), M = (st, Vt, qt, Wt) => {
8001
+ }), h = (st, Vt) => (Vt.y - st.y) / (Vt.x - st.x), c = (st) => -1 / st, g = o(t, e), x = o(e, s), f = h(t, e), w = h(e, s), b = c(f), E = c(w), M = (st, Vt, qt, Wt) => {
7995
8002
  const bt = (Wt - Vt) / (st - qt), Ot = st * bt + Vt;
7996
8003
  return { x: bt, y: Ot };
7997
- }, O = g.y - b * g.x, z = x.y - E * x.x, D = M(b, O, E, z), B = Math.sqrt(
8004
+ }, L = g.y - b * g.x, z = x.y - E * x.x, D = M(b, L, E, z), B = Math.sqrt(
7998
8005
  Math.pow(t.x - D.x, 2) + Math.pow(t.y - D.y, 2)
7999
8006
  ), dt = (st, Vt) => Math.atan2(st.y - Vt.y, st.x - Vt.x), vt = dt(t, D), ot = dt(e, D), W = dt(s, D), ut = W > vt && W < ot || vt > W && vt < ot || ot > W && ot < vt;
8000
8007
  this.center = D, this.radius = B, this._clockwise = !ut, this._startAngle = vt, this._endAngle = W;
@@ -8013,20 +8020,20 @@ class Ps extends Ms {
8013
8020
  createByStartEndPointsAndBulge(t, e, s) {
8014
8021
  let o, h, c;
8015
8022
  s < 0 ? (o = Math.atan(-s) * 4, h = new Zt(t), c = new Zt(e)) : (o = Math.atan(s) * 4, h = new Zt(e), c = new Zt(t));
8016
- const g = new Zt().subVectors(c, h), x = g.length(), f = new Zt().addVectors(h, g.multiplyScalar(0.5)), A = Math.abs(x / 2 / Math.tan(o / 2)), b = g.normalize();
8023
+ const g = new Zt().subVectors(c, h), x = g.length(), f = new Zt().addVectors(h, g.multiplyScalar(0.5)), w = Math.abs(x / 2 / Math.tan(o / 2)), b = g.normalize();
8017
8024
  let E;
8018
8025
  if (o < Math.PI) {
8019
8026
  const M = new Zt(
8020
8027
  b.x * Math.cos(Math.PI / 2) - b.y * Math.sin(Math.PI / 2),
8021
8028
  b.y * Math.cos(Math.PI / 2) + b.x * Math.sin(Math.PI / 2)
8022
8029
  );
8023
- E = f.add(M.multiplyScalar(-A));
8030
+ E = f.add(M.multiplyScalar(-w));
8024
8031
  } else {
8025
8032
  const M = new Zt(
8026
8033
  b.x * Math.cos(Math.PI / 2) - b.y * Math.sin(Math.PI / 2),
8027
8034
  b.y * Math.cos(Math.PI / 2) + b.x * Math.sin(Math.PI / 2)
8028
8035
  );
8029
- E = f.add(M.multiplyScalar(A));
8036
+ E = f.add(M.multiplyScalar(w));
8030
8037
  }
8031
8038
  s < 0 ? (this._startAngle = Math.atan2(h.y - E.y, h.x - E.x), this._endAngle = Math.atan2(c.y - E.y, c.x - E.x)) : (this._startAngle = Math.atan2(c.y - E.y, c.x - E.x), this._endAngle = Math.atan2(h.y - E.y, h.x - E.x)), this._clockwise = s < 0, this.center = E, this.radius = c.sub(E).length();
8032
8039
  }
@@ -8167,7 +8174,7 @@ class Ps extends Ms {
8167
8174
  * @inheritdoc
8168
8175
  */
8169
8176
  clone() {
8170
- return new Ps(
8177
+ return new Is(
8171
8178
  this.center.clone(),
8172
8179
  this.radius,
8173
8180
  this._startAngle,
@@ -8205,7 +8212,7 @@ class Ps extends Ms {
8205
8212
  return e;
8206
8213
  }
8207
8214
  }
8208
- class Id extends bh {
8215
+ class Pd extends bh {
8209
8216
  /**
8210
8217
  * Return new shape translated by given vector.
8211
8218
  * Translation vector may be also defined by a pair of numbers.
@@ -8222,7 +8229,7 @@ class Id extends bh {
8222
8229
  return (this._box == null || this._boundingBoxNeedsUpdate) && (this._box = this.calculateBoundingBox(), this._boundingBoxNeedsUpdate = !1), this._box;
8223
8230
  }
8224
8231
  }
8225
- class Ts extends Id {
8232
+ class Ts extends Pd {
8226
8233
  }
8227
8234
  class dn extends Ts {
8228
8235
  /**
@@ -8446,8 +8453,8 @@ class Ln extends Ts {
8446
8453
  const o = new Z().addVectors(t, e).multiplyScalar(0.5), h = new Z().addVectors(t, s).multiplyScalar(0.5), c = new Z().subVectors(e, t), g = new Z().subVectors(s, t), x = new Z().crossVectors(c, g).normalize();
8447
8454
  if (x.lengthSq() === 0)
8448
8455
  return console.error("Points are collinear and cannot form a valid arc."), null;
8449
- const f = new Z().crossVectors(c, x).normalize(), A = new Z().crossVectors(g, x).normalize(), b = f.clone().multiplyScalar(Number.MAX_SAFE_INTEGER), E = A.clone().multiplyScalar(Number.MAX_SAFE_INTEGER), M = new dn(o, o.clone().add(b)), O = new dn(h, h.clone().add(E)), z = new Z();
8450
- return M.closestPointToPoint(O.startPoint, !0, z) ? z : (console.error("Cannot find a valid center for the arc."), null);
8456
+ const f = new Z().crossVectors(c, x).normalize(), w = new Z().crossVectors(g, x).normalize(), b = f.clone().multiplyScalar(Number.MAX_SAFE_INTEGER), E = w.clone().multiplyScalar(Number.MAX_SAFE_INTEGER), M = new dn(o, o.clone().add(b)), L = new dn(h, h.clone().add(E)), z = new Z();
8457
+ return M.closestPointToPoint(L.startPoint, !0, z) ? z : (console.error("Cannot find a valid center for the arc."), null);
8451
8458
  }
8452
8459
  /**
8453
8460
  * Create arc by three points
@@ -8803,8 +8810,8 @@ class _a extends Ms {
8803
8810
  const h = this.startAngle + t * s;
8804
8811
  let c = this.center.x + this.majorAxisRadius * Math.cos(h), g = this.center.y + this.minorAxisRadius * Math.sin(h);
8805
8812
  if (this.rotation !== 0) {
8806
- const x = Math.cos(this.rotation), f = Math.sin(this.rotation), A = c - this.center.x, b = g - this.center.y;
8807
- c = A * x - b * f + this.center.x, g = A * f + b * x + this.center.y;
8813
+ const x = Math.cos(this.rotation), f = Math.sin(this.rotation), w = c - this.center.x, b = g - this.center.y;
8814
+ c = w * x - b * f + this.center.x, g = w * f + b * x + this.center.y;
8808
8815
  }
8809
8816
  return new Nt(c, g);
8810
8817
  }
@@ -8972,8 +8979,8 @@ class va extends Ts {
8972
8979
  const t = 1e3, e = this.deltaAngle / t;
8973
8980
  let s = 0, o = this.getPointAtAngle(this.startAngle);
8974
8981
  for (let h = 1; h <= t; h++) {
8975
- const c = this.startAngle + h * e, g = this.getPointAtAngle(c), x = g.x - o.x, f = g.y - o.y, A = g.z - o.z;
8976
- s += Math.sqrt(x * x + f * f + A * A), o = g;
8982
+ const c = this.startAngle + h * e, g = this.getPointAtAngle(c), x = g.x - o.x, f = g.y - o.y, w = g.z - o.z;
8983
+ s += Math.sqrt(x * x + f * f + w * w), o = g;
8977
8984
  }
8978
8985
  return s;
8979
8986
  }
@@ -9132,7 +9139,7 @@ class Rn extends Ms {
9132
9139
  let h = null;
9133
9140
  if (s < e - 1 ? h = this._vertices[s + 1] : s == e - 1 && this.closed && (h = this._vertices[0]), h)
9134
9141
  if (o.bulge) {
9135
- const c = new Ps(o, h, o.bulge);
9142
+ const c = new Is(o, h, o.bulge);
9136
9143
  t += c.length;
9137
9144
  } else
9138
9145
  t += new Nt(o.x, o.y).distanceTo(h);
@@ -9205,10 +9212,10 @@ class Rn extends Ms {
9205
9212
  if (h.bulge) {
9206
9213
  let c = null;
9207
9214
  if (o < s - 1 ? c = this._vertices[o + 1] : o == s - 1 && this.closed && (c = this._vertices[0]), c) {
9208
- const g = new Ps(h, c, h.bulge).getPoints(t), x = g.length;
9215
+ const g = new Is(h, c, h.bulge).getPoints(t), x = g.length;
9209
9216
  for (let f = 0; f < x; ++f) {
9210
- const A = g[f];
9211
- e.push(new Nt(A.x, A.y));
9217
+ const w = g[f];
9218
+ e.push(new Nt(w.x, w.y));
9212
9219
  }
9213
9220
  }
9214
9221
  } else
@@ -9296,7 +9303,7 @@ class ya extends Ms {
9296
9303
  return new ya(this._start.clone(), this._end.clone());
9297
9304
  }
9298
9305
  }
9299
- class Pd extends Ms {
9306
+ class Id extends Ms {
9300
9307
  /**
9301
9308
  * Create one loop by connected curves
9302
9309
  * @param curves Input one array of connected curves
@@ -9393,10 +9400,10 @@ var Ah = { exports: {} };
9393
9400
  var c = s;
9394
9401
  if (h()) {
9395
9402
  var g = function(x, f) {
9396
- var A = s;
9403
+ var w = s;
9397
9404
  return x.split(".").forEach(function(b) {
9398
- A && (A = A[b]);
9399
- }), A ? A[f] : null;
9405
+ w && (w = w[b]);
9406
+ }), w ? w[f] : null;
9400
9407
  };
9401
9408
  onmessage = function(x) {
9402
9409
  if (!(!x.data.className || !x.data.methodName)) {
@@ -9408,7 +9415,7 @@ var Ah = { exports: {} };
9408
9415
  };
9409
9416
  }
9410
9417
  }
9411
- return function(x, f, A) {
9418
+ return function(x, f, w) {
9412
9419
  f.geom = f.geom || {}, f.exe = f.exe || {}, f.eval = f.eval || {}, f.core = f.core || {}, f.promhx = f.promhx || {};
9413
9420
  var b = {}, E = function() {
9414
9421
  return Mt.__string_rec(this, "");
@@ -9421,9 +9428,9 @@ var Ah = { exports: {} };
9421
9428
  for (var u in n) l[u] = n[u];
9422
9429
  return n.toString !== Object.prototype.toString && (l.toString = n.toString), l;
9423
9430
  }
9424
- var O = function() {
9431
+ var L = function() {
9425
9432
  };
9426
- b.HxOverrides = O, O.__name__ = ["HxOverrides"], O.strDate = function(r) {
9433
+ b.HxOverrides = L, L.__name__ = ["HxOverrides"], L.strDate = function(r) {
9427
9434
  var n = r.length;
9428
9435
  switch (n) {
9429
9436
  case 8:
@@ -9438,13 +9445,13 @@ var Ah = { exports: {} };
9438
9445
  default:
9439
9446
  throw new Q("Invalid date format : " + r);
9440
9447
  }
9441
- }, O.cca = function(r, n) {
9448
+ }, L.cca = function(r, n) {
9442
9449
  var a = r.charCodeAt(n);
9443
9450
  if (a == a)
9444
9451
  return a;
9445
- }, O.substr = function(r, n, a) {
9452
+ }, L.substr = function(r, n, a) {
9446
9453
  return n != null && n != 0 && a != null && a < 0 ? "" : (a == null && (a = r.length), n < 0 ? (n = r.length + n, n < 0 && (n = 0)) : a < 0 && (a = r.length + a - n), r.substr(n, a));
9447
- }, O.iter = function(r) {
9454
+ }, L.iter = function(r) {
9448
9455
  return {
9449
9456
  cur: 0,
9450
9457
  arr: r,
@@ -9668,9 +9675,9 @@ var Ah = { exports: {} };
9668
9675
  break;
9669
9676
  case D:
9670
9677
  this.buf.b += "l";
9671
- for (var w = r, I = w.h, S = null; I != null; ) {
9672
- var P;
9673
- S = I[0], I = I[1], P = S, this.serialize(P);
9678
+ for (var A = r, P = A.h, S = null; P != null; ) {
9679
+ var I;
9680
+ S = P[0], P = P[1], I = S, this.serialize(I);
9674
9681
  }
9675
9682
  this.buf.b += "h";
9676
9683
  break;
@@ -9680,8 +9687,8 @@ var Ah = { exports: {} };
9680
9687
  break;
9681
9688
  case me:
9682
9689
  this.buf.b += "b";
9683
- for (var T = r, L = T.keys(); L.hasNext(); ) {
9684
- var C = L.next();
9690
+ for (var T = r, O = T.keys(); O.hasNext(); ) {
9691
+ var C = O.next();
9685
9692
  this.serializeString(C), this.serialize(hi[C] != null ? T.getReserved(C) : T.h[C]);
9686
9693
  }
9687
9694
  this.buf.b += "h";
@@ -9723,8 +9730,8 @@ var Ah = { exports: {} };
9723
9730
  break;
9724
9731
  case 4:
9725
9732
  if (Mt.__instanceof(r, so)) {
9726
- var It = ut.getClassName(r);
9727
- this.buf.b += "A", this.serializeString(It);
9733
+ var Pt = ut.getClassName(r);
9734
+ this.buf.b += "A", this.serializeString(Pt);
9728
9735
  } else if (Mt.__instanceof(r, io))
9729
9736
  this.buf.b += "B", this.serializeString(ut.getEnumName(r));
9730
9737
  else {
@@ -9801,7 +9808,7 @@ var Ah = { exports: {} };
9801
9808
  if (n >= 43 && n < 58 || n == 101 || n == 69) this.pos++;
9802
9809
  else break;
9803
9810
  }
9804
- return dt.parseFloat(O.substr(this.buf, r, this.pos - r));
9811
+ return dt.parseFloat(L.substr(this.buf, r, this.pos - r));
9805
9812
  },
9806
9813
  unserializeObject: function(r) {
9807
9814
  for (; ; ) {
@@ -9839,7 +9846,7 @@ var Ah = { exports: {} };
9839
9846
  case 121:
9840
9847
  var n = this.readDigits();
9841
9848
  if (this.get(this.pos++) != 58 || this.length - this.pos < n) throw new Q("Invalid string length");
9842
- var a = O.substr(this.buf, this.pos, n);
9849
+ var a = L.substr(this.buf, this.pos, n);
9843
9850
  return this.pos += n, a = decodeURIComponent(a.split("+").join(" ")), this.scache.push(a), a;
9844
9851
  case 107:
9845
9852
  return NaN;
@@ -9877,21 +9884,21 @@ var Ah = { exports: {} };
9877
9884
  case 120:
9878
9885
  throw new Q(this.unserialize());
9879
9886
  case 99:
9880
- var w = this.unserialize(), I = this.resolver.resolveClass(w);
9881
- if (I == null) throw new Q("Class not found " + w);
9882
- var S = ut.createEmptyInstance(I);
9887
+ var A = this.unserialize(), P = this.resolver.resolveClass(A);
9888
+ if (P == null) throw new Q("Class not found " + A);
9889
+ var S = ut.createEmptyInstance(P);
9883
9890
  return this.cache.push(S), this.unserializeObject(S), S;
9884
9891
  case 119:
9885
- var P = this.unserialize(), k = this.resolver.resolveEnum(P);
9886
- if (k == null) throw new Q("Enum not found " + P);
9892
+ var I = this.unserialize(), k = this.resolver.resolveEnum(I);
9893
+ if (k == null) throw new Q("Enum not found " + I);
9887
9894
  var T = this.unserializeEnum(k, this.unserialize());
9888
9895
  return this.cache.push(T), T;
9889
9896
  case 106:
9890
- var L = this.unserialize(), C = this.resolver.resolveEnum(L);
9891
- if (C == null) throw new Q("Enum not found " + L);
9897
+ var O = this.unserialize(), C = this.resolver.resolveEnum(O);
9898
+ if (C == null) throw new Q("Enum not found " + O);
9892
9899
  this.pos++;
9893
9900
  var F = this.readDigits(), R = ut.getEnumConstructs(C)[F];
9894
- if (R == null) throw new Q("Unknown enum index " + L + "@" + F);
9901
+ if (R == null) throw new Q("Unknown enum index " + O + "@" + F);
9895
9902
  var U = this.unserializeEnum(C, R);
9896
9903
  return this.cache.push(U), U;
9897
9904
  case 108:
@@ -9924,8 +9931,8 @@ var Ah = { exports: {} };
9924
9931
  case 118:
9925
9932
  var it;
9926
9933
  if (this.buf.charCodeAt(this.pos) >= 48 && this.buf.charCodeAt(this.pos) <= 57 && this.buf.charCodeAt(this.pos + 1) >= 48 && this.buf.charCodeAt(this.pos + 1) <= 57 && this.buf.charCodeAt(this.pos + 2) >= 48 && this.buf.charCodeAt(this.pos + 2) <= 57 && this.buf.charCodeAt(this.pos + 3) >= 48 && this.buf.charCodeAt(this.pos + 3) <= 57 && this.buf.charCodeAt(this.pos + 4) == 45) {
9927
- var ht = O.substr(this.buf, this.pos, 19);
9928
- it = O.strDate(ht), this.pos += 19;
9934
+ var ht = L.substr(this.buf, this.pos, 19);
9935
+ it = L.strDate(ht), this.pos += 19;
9929
9936
  } else {
9930
9937
  var at = this.readFloat(), ct = /* @__PURE__ */ new Date();
9931
9938
  ct.setTime(at), it = ct;
@@ -9936,9 +9943,9 @@ var Ah = { exports: {} };
9936
9943
  if (this.get(this.pos++) != 58 || this.length - this.pos < nt) throw new Q("Invalid bytes length");
9937
9944
  var X = Wt.CODES;
9938
9945
  X == null && (X = Wt.initCodes(), Wt.CODES = X);
9939
- var gt = this.pos, It = nt & 3, jt;
9940
- jt = (nt >> 2) * 3 + (It >= 2 ? It - 1 : 0);
9941
- for (var Xt = gt + (nt - It), Dt = Me.alloc(jt), Kt = 0; gt < Xt; ) {
9946
+ var gt = this.pos, Pt = nt & 3, jt;
9947
+ jt = (nt >> 2) * 3 + (Pt >= 2 ? Pt - 1 : 0);
9948
+ for (var Xt = gt + (nt - Pt), Dt = Me.alloc(jt), Kt = 0; gt < Xt; ) {
9942
9949
  var Ae = X[ot.fastCodeAt(mt, gt++)], We = X[ot.fastCodeAt(mt, gt++)];
9943
9950
  Dt.set(Kt++, Ae << 2 | We >> 4);
9944
9951
  var _e = X[ot.fastCodeAt(mt, gt++)];
@@ -9946,9 +9953,9 @@ var Ah = { exports: {} };
9946
9953
  var ge = X[ot.fastCodeAt(mt, gt++)];
9947
9954
  Dt.set(Kt++, _e << 6 | ge);
9948
9955
  }
9949
- if (It >= 2) {
9956
+ if (Pt >= 2) {
9950
9957
  var Se = X[ot.fastCodeAt(mt, gt++)], Le = X[ot.fastCodeAt(mt, gt++)];
9951
- if (Dt.set(Kt++, Se << 2 | Le >> 4), It == 3) {
9958
+ if (Dt.set(Kt++, Se << 2 | Le >> 4), Pt == 3) {
9952
9959
  var $e = X[ot.fastCodeAt(mt, gt++)];
9953
9960
  Dt.set(Kt++, Le << 4 | $e >> 2);
9954
9961
  }
@@ -9965,8 +9972,8 @@ var Ah = { exports: {} };
9965
9972
  if (dr == null) throw new Q("Class not found " + Je);
9966
9973
  return dr;
9967
9974
  case 66:
9968
- var Pn = this.unserialize(), qr = this.resolver.resolveEnum(Pn);
9969
- if (qr == null) throw new Q("Enum not found " + Pn);
9975
+ var In = this.unserialize(), qr = this.resolver.resolveEnum(In);
9976
+ if (qr == null) throw new Q("Enum not found " + In);
9970
9977
  return qr;
9971
9978
  }
9972
9979
  throw this.pos--, new Q("Invalid char " + this.buf.charAt(this.pos) + " at position " + this.pos);
@@ -9987,7 +9994,7 @@ var Ah = { exports: {} };
9987
9994
  var r = [];
9988
9995
  for (var n in this.h)
9989
9996
  this.h.hasOwnProperty(n) && r.push(n | 0);
9990
- return O.iter(r);
9997
+ return L.iter(r);
9991
9998
  },
9992
9999
  __class__: bt
9993
10000
  };
@@ -10003,7 +10010,7 @@ var Ah = { exports: {} };
10003
10010
  var r = [];
10004
10011
  for (var n in this.h.__keys__)
10005
10012
  this.h.hasOwnProperty(n) && r.push(this.h.__keys__[n]);
10006
- return O.iter(r);
10013
+ return L.iter(r);
10007
10014
  },
10008
10015
  __class__: Ot
10009
10016
  };
@@ -10030,7 +10037,7 @@ var Ah = { exports: {} };
10030
10037
  },
10031
10038
  keys: function() {
10032
10039
  var r = this.arrayKeys();
10033
- return O.iter(r);
10040
+ return L.iter(r);
10034
10041
  },
10035
10042
  arrayKeys: function() {
10036
10043
  var r = [];
@@ -10125,9 +10132,9 @@ var Ah = { exports: {} };
10125
10132
  }
10126
10133
  var _ = r.length, v = "[";
10127
10134
  n += " ";
10128
- for (var w = 0; w < _; ) {
10129
- var I = w++;
10130
- v += (I > 0 ? "," : "") + Mt.__string_rec(r[I], n);
10135
+ for (var A = 0; A < _; ) {
10136
+ var P = A++;
10137
+ v += (P > 0 ? "," : "") + Mt.__string_rec(r[P], n);
10131
10138
  }
10132
10139
  return v += "]", v;
10133
10140
  }
@@ -10138,15 +10145,15 @@ var Ah = { exports: {} };
10138
10145
  return C instanceof Q && (C = C.val), "???";
10139
10146
  }
10140
10147
  if (S != null && S != Object.toString && typeof S == "function") {
10141
- var P = r.toString();
10142
- if (P != "[object Object]") return P;
10148
+ var I = r.toString();
10149
+ if (I != "[object Object]") return I;
10143
10150
  }
10144
10151
  var k = null, T = `{
10145
10152
  `;
10146
10153
  n += " ";
10147
- var L = r.hasOwnProperty != null;
10154
+ var O = r.hasOwnProperty != null;
10148
10155
  for (var k in r)
10149
- L && !r.hasOwnProperty(k) || k == "prototype" || k == "__class__" || k == "__super__" || k == "__interfaces__" || k == "__properties__" || (T.length != 2 && (T += `,
10156
+ O && !r.hasOwnProperty(k) || k == "prototype" || k == "__class__" || k == "__super__" || k == "__interfaces__" || k == "__properties__" || (T.length != 2 && (T += `,
10150
10157
  `), T += n + k + " : " + Mt.__string_rec(r[k], n));
10151
10158
  return n = n.substring(1), T += `
10152
10159
  ` + n + "}", T;
@@ -10197,7 +10204,7 @@ var Ah = { exports: {} };
10197
10204
  }, Mt.__isNativeObj = function(r) {
10198
10205
  return Mt.__nativeClassName(r) != null;
10199
10206
  }, Mt.__resolveNativeClass = function(r) {
10200
- return A[r];
10207
+ return w[r];
10201
10208
  };
10202
10209
  var ae = function(r) {
10203
10210
  if (r instanceof Array && r.__enum__ == null)
@@ -10313,9 +10320,9 @@ var Ah = { exports: {} };
10313
10320
  } else if (r instanceof Array && r.__enum__ == null) {
10314
10321
  var _ = r;
10315
10322
  if (_.length + n > a.byteLength) throw new Q("set() outside of range");
10316
- for (var v = 0, w = _.length; v < w; ) {
10317
- var I = v++;
10318
- a[I + n] = _[I];
10323
+ for (var v = 0, A = _.length; v < A; ) {
10324
+ var P = v++;
10325
+ a[P + n] = _[P];
10319
10326
  }
10320
10327
  } else throw new Q("TODO");
10321
10328
  }, sr._subarray = function(r, n) {
@@ -10343,11 +10350,11 @@ var Ah = { exports: {} };
10343
10350
  }, Et.linkAll = function(r, n) {
10344
10351
  for (var a = function(d, p, _) {
10345
10352
  if (d.length == 0 || Et.allFulfilled(d)) {
10346
- for (var v, w = [], I = Ke(r)(); I.hasNext(); ) {
10347
- var S = I.next();
10348
- w.push(S == p ? _ : S._val);
10353
+ for (var v, A = [], P = Ke(r)(); P.hasNext(); ) {
10354
+ var S = P.next();
10355
+ A.push(S == p ? _ : S._val);
10349
10356
  }
10350
- v = w, n.handleResolve(v);
10357
+ v = A, n.handleResolve(v);
10351
10358
  }
10352
10359
  }, l = Ke(r)(); l.hasNext(); ) {
10353
10360
  var u = l.next();
@@ -10359,8 +10366,8 @@ var Ah = { exports: {} };
10359
10366
  };
10360
10367
  }(a, function(d) {
10361
10368
  for (var p, _ = [], v = Ke(r)(); v.hasNext(); ) {
10362
- var w = v.next();
10363
- w != u && _.push(w);
10369
+ var A = v.next();
10370
+ A != u && _.push(A);
10364
10371
  }
10365
10372
  return p = _, p;
10366
10373
  }(), u)
@@ -10368,8 +10375,8 @@ var Ah = { exports: {} };
10368
10375
  }
10369
10376
  Et.allFulfilled(r) && n.handleResolve(function(d) {
10370
10377
  for (var p, _ = [], v = Ke(r)(); v.hasNext(); ) {
10371
- var w = v.next();
10372
- _.push(w._val);
10378
+ var A = v.next();
10379
+ _.push(A._val);
10373
10380
  }
10374
10381
  return p = _, p;
10375
10382
  }());
@@ -10460,8 +10467,8 @@ var Ah = { exports: {} };
10460
10467
  }
10461
10468
  else if (n._update.length > 0)
10462
10469
  for (var _ = 0, v = n._update; _ < v.length; ) {
10463
- var w = v[_];
10464
- ++_, w.async.handleError(l);
10470
+ var A = v[_];
10471
+ ++_, A.async.handleError(l);
10465
10472
  }
10466
10473
  else throw new Q(l);
10467
10474
  n._errorPending = !1;
@@ -10825,8 +10832,8 @@ var Ah = { exports: {} };
10825
10832
  u == null && (u = -1);
10826
10833
  var d;
10827
10834
  u < -0.5 ? d = rt.TOLERANCE : d = u;
10828
- var p = Math.min(r, n) - d, _ = Math.max(r, n) + d, v = Math.min(a, l) - d, w = Math.max(a, l) + d;
10829
- return p >= v && p <= w || _ >= v && _ <= w || v >= p && v <= _ || w >= p && w <= _;
10835
+ var p = Math.min(r, n) - d, _ = Math.max(r, n) + d, v = Math.min(a, l) - d, A = Math.max(a, l) + d;
10836
+ return p >= v && p <= A || _ >= v && _ <= A || v >= p && v <= _ || A >= p && A <= _;
10830
10837
  }, Te.prototype = {
10831
10838
  fromPoint: function(r) {
10832
10839
  return new Te([r]);
@@ -10875,9 +10882,9 @@ var Ah = { exports: {} };
10875
10882
  if (!this.initialized) return null;
10876
10883
  var a = this.min, l = this.max, u = r.min, d = r.max;
10877
10884
  if (!this.intersects(r, n)) return null;
10878
- for (var p = [], _ = [], v = 0, w = this.dim; v < w; ) {
10879
- var I = v++;
10880
- p.push(Math.min(l[I], d[I])), _.push(Math.max(a[I], u[I]));
10885
+ for (var p = [], _ = [], v = 0, A = this.dim; v < A; ) {
10886
+ var P = v++;
10887
+ p.push(Math.min(l[P], d[P])), _.push(Math.max(a[P], u[P]));
10881
10888
  }
10882
10889
  return new Te([_, p]);
10883
10890
  },
@@ -11023,27 +11030,27 @@ var Ah = { exports: {} };
11023
11030
  return -S.item1;
11024
11031
  }), d, p = null;
11025
11032
  p = function(S) {
11026
- for (var P, k = S.dimension, T = l.distanceFunction(r, S.kdPoint.point), L, C = [], F = 0, R = l.dim; F < R; )
11033
+ for (var I, k = S.dimension, T = l.distanceFunction(r, S.kdPoint.point), O, C = [], F = 0, R = l.dim; F < R; )
11027
11034
  F++, C.push(0);
11028
- L = C;
11035
+ O = C;
11029
11036
  for (var U, V, q = function(K, tt) {
11030
11037
  u.push(new ee(K, tt)), u.size() > n && u.pop();
11031
11038
  }, J = 0, H = l.dim; J < H; ) {
11032
11039
  var G = J++;
11033
- G == S.dimension ? L[G] = r[G] : L[G] = S.kdPoint.point[G];
11040
+ G == S.dimension ? O[G] = r[G] : O[G] = S.kdPoint.point[G];
11034
11041
  }
11035
- if (U = l.distanceFunction(L, S.kdPoint.point), S.right == null && S.left == null) {
11042
+ if (U = l.distanceFunction(O, S.kdPoint.point), S.right == null && S.left == null) {
11036
11043
  (u.size() < n || T < u.peek().item1) && q(S, T);
11037
11044
  return;
11038
11045
  }
11039
- S.right == null ? P = S.left : S.left == null ? P = S.right : r[k] < S.kdPoint.point[k] ? P = S.left : P = S.right, p(P), (u.size() < n || T < u.peek().item1) && q(S, T), (u.size() < n || Math.abs(U) < u.peek().item1) && (P == S.left ? V = S.right : V = S.left, V != null && p(V));
11046
+ S.right == null ? I = S.left : S.left == null ? I = S.right : r[k] < S.kdPoint.point[k] ? I = S.left : I = S.right, p(I), (u.size() < n || T < u.peek().item1) && q(S, T), (u.size() < n || Math.abs(U) < u.peek().item1) && (I == S.left ? V = S.right : V = S.left, V != null && p(V));
11040
11047
  }, d = p;
11041
11048
  for (var _ = 0; _ < n; )
11042
11049
  _++, u.push(new ee(null, a));
11043
11050
  d(this.root);
11044
- for (var v = [], w = 0; w < n; ) {
11045
- var I = w++;
11046
- u.content[I].item0 != null && v.push(new ee(u.content[I].item0.kdPoint, u.content[I].item1));
11051
+ for (var v = [], A = 0; A < n; ) {
11052
+ var P = A++;
11053
+ u.content[P].item0 != null && v.push(new ee(u.content[P].item0.kdPoint, u.content[P].item1));
11047
11054
  }
11048
11055
  return v;
11049
11056
  },
@@ -11093,8 +11100,8 @@ var Ah = { exports: {} };
11093
11100
  _ = this.scoreFunction(v), _ < l && (p = d);
11094
11101
  }
11095
11102
  if (u < n) {
11096
- var w = this.content[u], I = this.scoreFunction(w);
11097
- I < (p == -1 ? l : _) && (p = u);
11103
+ var A = this.content[u], P = this.scoreFunction(A);
11104
+ P < (p == -1 ? l : _) && (p = u);
11098
11105
  }
11099
11106
  if (p != -1)
11100
11107
  this.content[r] = this.content[p], this.content[p] = a, r = p;
@@ -11233,15 +11240,15 @@ var Ah = { exports: {} };
11233
11240
  }
11234
11241
  return a;
11235
11242
  }, Lt.mult = function(r, n) {
11236
- var a, l, u, d, p, _, v, w;
11243
+ var a, l, u, d, p, _, v, A;
11237
11244
  a = r.length, l = n.length, u = n[0].length, d = [];
11238
- for (var I = a - 1, S = 0, P = 0; I >= 0; ) {
11239
- for (p = [], _ = r[I], P = u - 1; P >= 0; ) {
11240
- for (v = _[l - 1] * n[l - 1][P], S = l - 2; S >= 1; )
11241
- w = S - 1, v += _[S] * n[S][P] + _[w] * n[w][P], S -= 2;
11242
- S == 0 && (v += _[0] * n[0][P]), p[P] = v, P--;
11245
+ for (var P = a - 1, S = 0, I = 0; P >= 0; ) {
11246
+ for (p = [], _ = r[P], I = u - 1; I >= 0; ) {
11247
+ for (v = _[l - 1] * n[l - 1][I], S = l - 2; S >= 1; )
11248
+ A = S - 1, v += _[S] * n[S][I] + _[A] * n[A][I], S -= 2;
11249
+ S == 0 && (v += _[0] * n[0][I]), p[I] = v, I--;
11243
11250
  }
11244
- d[I] = p, I--;
11251
+ d[P] = p, P--;
11245
11252
  }
11246
11253
  return d;
11247
11254
  }, Lt.add = function(r, n) {
@@ -11279,9 +11286,9 @@ var Ah = { exports: {} };
11279
11286
  for (var n = [], a = 0, l = r[0].length; a < l; ) {
11280
11287
  var u = a++;
11281
11288
  n.push(function(d) {
11282
- for (var p, _ = [], v = 0, w = r.length; v < w; ) {
11283
- var I = v++;
11284
- _.push(r[I][u]);
11289
+ for (var p, _ = [], v = 0, A = r.length; v < A; ) {
11290
+ var P = v++;
11291
+ _.push(r[P][u]);
11285
11292
  }
11286
11293
  return p = _, p;
11287
11294
  }());
@@ -11290,36 +11297,36 @@ var Ah = { exports: {} };
11290
11297
  }, Lt.solve = function(r, n) {
11291
11298
  return Lt.LUsolve(Lt.LU(r), n);
11292
11299
  }, Lt.LUsolve = function(r, n) {
11293
- var a, l, u = r.LU, d = u.length, p = n.slice(), _ = r.P, v, w, I;
11300
+ var a, l, u = r.LU, d = u.length, p = n.slice(), _ = r.P, v, A, P;
11294
11301
  for (a = d - 1; a != -1; )
11295
11302
  p[a] = n[a], --a;
11296
11303
  for (a = 0; a < d; ) {
11297
- for (v = _[a], _[a] != a && (I = p[a], p[a] = p[v], p[v] = I), w = u[a], l = 0; l < a; )
11298
- p[a] -= p[l] * w[l], ++l;
11304
+ for (v = _[a], _[a] != a && (P = p[a], p[a] = p[v], p[v] = P), A = u[a], l = 0; l < a; )
11305
+ p[a] -= p[l] * A[l], ++l;
11299
11306
  ++a;
11300
11307
  }
11301
11308
  for (a = d - 1; a >= 0; ) {
11302
- for (w = u[a], l = a + 1; l < d; )
11303
- p[a] -= p[l] * w[l], ++l;
11304
- p[a] /= w[a], --a;
11309
+ for (A = u[a], l = a + 1; l < d; )
11310
+ p[a] -= p[l] * A[l], ++l;
11311
+ p[a] /= A[a], --a;
11305
11312
  }
11306
11313
  return p;
11307
11314
  }, Lt.LU = function(r) {
11308
- for (var n, a, l, u, d, p, _, v, w, I = [], S = 0, P = r.length; S < P; ) {
11315
+ for (var n, a, l, u, d, p, _, v, A, P = [], S = 0, I = r.length; S < I; ) {
11309
11316
  var k = S++;
11310
- I.push(r[k].slice());
11317
+ P.push(r[k].slice());
11311
11318
  }
11312
- r = I;
11313
- var T = r.length, L = T - 1, C = [];
11319
+ r = P;
11320
+ var T = r.length, O = T - 1, C = [];
11314
11321
  for (l = 0; l < T; ) {
11315
- for (_ = l, p = r[l], w = Math.abs(p[l]), a = l + 1; a < T; )
11316
- u = Math.abs(r[a][l]), w < u && (w = u, _ = a), ++a;
11322
+ for (_ = l, p = r[l], A = Math.abs(p[l]), a = l + 1; a < T; )
11323
+ u = Math.abs(r[a][l]), A < u && (A = u, _ = a), ++a;
11317
11324
  for (C[l] = _, _ != l && (r[l] = r[_], r[_] = p, p = r[l]), d = p[l], n = l + 1; n < T; )
11318
11325
  r[n][l] /= d, ++n;
11319
11326
  for (n = l + 1; n < T; ) {
11320
- for (v = r[n], a = l + 1; a < L; )
11327
+ for (v = r[n], a = l + 1; a < O; )
11321
11328
  v[a] -= v[l] * p[a], ++a, v[a] -= v[l] * p[a], ++a;
11322
- a == L && (v[a] -= v[l] * p[a]), ++n;
11329
+ a == O && (v[a] -= v[l] * p[a]), ++n;
11323
11330
  }
11324
11331
  ++l;
11325
11332
  }
@@ -11349,12 +11356,12 @@ var Ah = { exports: {} };
11349
11356
  var _ = re.getMinCoordOnAxis(n.points, n.faces[p], l);
11350
11357
  u.push(new ee(_, p));
11351
11358
  }
11352
- u.sort(function(P, k) {
11353
- var T = P.item0, L = k.item0;
11354
- return T == L ? 0 : T > L ? 1 : -1;
11359
+ u.sort(function(I, k) {
11360
+ var T = I.item0, O = k.item0;
11361
+ return T == O ? 0 : T > O ? 1 : -1;
11355
11362
  });
11356
- for (var v = [], w = 0, I = u.length; w < I; ) {
11357
- var S = w++;
11363
+ for (var v = [], A = 0, P = u.length; A < P; ) {
11364
+ var S = A++;
11358
11365
  v.push(u[S].item1);
11359
11366
  }
11360
11367
  return v;
@@ -11376,8 +11383,8 @@ var Ah = { exports: {} };
11376
11383
  }
11377
11384
  return a;
11378
11385
  }, re.triangleUVFromPoint = function(r, n, a) {
11379
- var l = r.faces[n], u = r.points[l[0]], d = r.points[l[1]], p = r.points[l[2]], _ = r.uvs[l[0]], v = r.uvs[l[1]], w = r.uvs[l[2]], I = m.sub(u, a), S = m.sub(d, a), P = m.sub(p, a), k = m.norm(m.cross(m.sub(u, d), m.sub(u, p))), T = m.norm(m.cross(S, P)) / k, L = m.norm(m.cross(P, I)) / k, C = m.norm(m.cross(I, S)) / k;
11380
- return m.add(m.mul(T, _), m.add(m.mul(L, v), m.mul(C, w)));
11386
+ var l = r.faces[n], u = r.points[l[0]], d = r.points[l[1]], p = r.points[l[2]], _ = r.uvs[l[0]], v = r.uvs[l[1]], A = r.uvs[l[2]], P = m.sub(u, a), S = m.sub(d, a), I = m.sub(p, a), k = m.norm(m.cross(m.sub(u, d), m.sub(u, p))), T = m.norm(m.cross(S, I)) / k, O = m.norm(m.cross(I, P)) / k, C = m.norm(m.cross(P, S)) / k;
11387
+ return m.add(m.mul(T, _), m.add(m.mul(O, v), m.mul(C, A)));
11381
11388
  };
11382
11389
  var Cr = function(r, n) {
11383
11390
  if (this._empty = !1, this._face = -1, n == null) {
@@ -11424,22 +11431,22 @@ var Ah = { exports: {} };
11424
11431
  var d = n.length, p = r(n), _ = p, v;
11425
11432
  if (isNaN(p)) throw new Q("uncmin: f(x0) is a NaN!");
11426
11433
  a = Math.max(a, rt.EPSILON);
11427
- var w, I, S, P = Lt.identity(d), k = 0, T = [], L, C, F, R, U, V, q = "";
11428
- for (I = l(n); k < u; ) {
11429
- if (!m.all(m.finite(I))) {
11434
+ var A, P, S, I = Lt.identity(d), k = 0, T = [], O, C, F, R, U, V, q = "";
11435
+ for (P = l(n); k < u; ) {
11436
+ if (!m.all(m.finite(P))) {
11430
11437
  q = "Gradient has Infinity or NaN";
11431
11438
  break;
11432
11439
  }
11433
- if (w = m.neg(Lt.dot(P, I)), !m.all(m.finite(w))) {
11440
+ if (A = m.neg(Lt.dot(I, P)), !m.all(m.finite(A))) {
11434
11441
  q = "Search direction has Infinity or NaN";
11435
11442
  break;
11436
11443
  }
11437
- if (V = m.norm(w), V < a) {
11444
+ if (V = m.norm(A), V < a) {
11438
11445
  q = "Newton step smaller than tol";
11439
11446
  break;
11440
11447
  }
11441
- for (U = 1, v = m.dot(I, w), L = n; k < u && !(U * V < a); ) {
11442
- if (T = m.mul(U, w), L = m.add(n, T), _ = r(L), _ - p >= 0.1 * U * v || isNaN(_)) {
11448
+ for (U = 1, v = m.dot(P, A), O = n; k < u && !(U * V < a); ) {
11449
+ if (T = m.mul(U, A), O = m.add(n, T), _ = r(O), _ - p >= 0.1 * U * v || isNaN(_)) {
11443
11450
  U *= 0.5, ++k;
11444
11451
  continue;
11445
11452
  }
@@ -11453,20 +11460,20 @@ var Ah = { exports: {} };
11453
11460
  q = "maxit reached during line search";
11454
11461
  break;
11455
11462
  }
11456
- S = l(L), C = m.sub(S, I), R = m.dot(C, T), F = Lt.dot(P, C), P = Lt.sub(Lt.add(P, Lt.mul((R + m.dot(C, F)) / (R * R), Xe.tensor(T, T))), Lt.div(Lt.add(Xe.tensor(F, T), Xe.tensor(T, F)), R)), n = L, p = _, I = S, ++k;
11463
+ S = l(O), C = m.sub(S, P), R = m.dot(C, T), F = Lt.dot(I, C), I = Lt.sub(Lt.add(I, Lt.mul((R + m.dot(C, F)) / (R * R), Xe.tensor(T, T))), Lt.div(Lt.add(Xe.tensor(F, T), Xe.tensor(T, F)), R)), n = O, p = _, P = S, ++k;
11457
11464
  }
11458
- return new Kn(n, p, I, P, k, q);
11465
+ return new Kn(n, p, P, I, k, q);
11459
11466
  }, Xe.numericalGradient = function(r, n) {
11460
11467
  var a = n.length, l = r(n);
11461
11468
  if (l == NaN) throw new Q("gradient: f(x) is a NaN!");
11462
- for (var u = n.slice(0), d, p, _ = [], v, w = 1e-3, I, S, P, k = 0, T, L, C, F = 0; F < a; )
11469
+ for (var u = n.slice(0), d, p, _ = [], v, A = 1e-3, P, S, I, k = 0, T, O, C, F = 0; F < a; )
11463
11470
  for (var R = F++, U = Math.max(1e-6 * l, 1e-8); ; ) {
11464
11471
  if (++k, k > 20) throw new Q("Numerical gradient fails");
11465
11472
  if (u[R] = n[R] + U, d = r(u), u[R] = n[R] - U, p = r(u), u[R] = n[R], isNaN(d) || isNaN(p)) {
11466
11473
  U /= 16;
11467
11474
  continue;
11468
11475
  }
11469
- if (_[R] = (d - p) / (2 * U), I = n[R] - U, S = n[R], P = n[R] + U, T = (d - l) / U, L = (l - p) / U, C = m.max([Math.abs(_[R]), Math.abs(l), Math.abs(d), Math.abs(p), Math.abs(I), Math.abs(S), Math.abs(P), 1e-8]), v = Math.min(m.max([Math.abs(T - _[R]), Math.abs(L - _[R]), Math.abs(T - L)]) / C, U / C), v > w) U /= 16;
11476
+ if (_[R] = (d - p) / (2 * U), P = n[R] - U, S = n[R], I = n[R] + U, T = (d - l) / U, O = (l - p) / U, C = m.max([Math.abs(_[R]), Math.abs(l), Math.abs(d), Math.abs(p), Math.abs(P), Math.abs(S), Math.abs(I), 1e-8]), v = Math.min(m.max([Math.abs(T - _[R]), Math.abs(O - _[R]), Math.abs(T - O)]) / C, U / C), v > A) U /= 16;
11470
11477
  else break;
11471
11478
  }
11472
11479
  return _;
@@ -11517,19 +11524,19 @@ var Ah = { exports: {} };
11517
11524
  }, Ne.segmentClosestPoint = function(r, n, a, l, u) {
11518
11525
  var d = m.sub(a, n), p = m.norm(d);
11519
11526
  if (p < rt.EPSILON) return { u: l, pt: n };
11520
- var _ = n, v = m.mul(1 / p, d), w = m.sub(r, _), I = m.dot(w, v);
11521
- return I < 0 ? { u: l, pt: n } : I > p ? { u, pt: a } : { u: l + (u - l) * I / p, pt: m.add(_, m.mul(I, v)) };
11527
+ var _ = n, v = m.mul(1 / p, d), A = m.sub(r, _), P = m.dot(A, v);
11528
+ return P < 0 ? { u: l, pt: n } : P > p ? { u, pt: a } : { u: l + (u - l) * P / p, pt: m.add(_, m.mul(P, v)) };
11522
11529
  };
11523
11530
  var m = f.core.Vec = function() {
11524
11531
  };
11525
11532
  b["verb.core.Vec"] = m, m.__name__ = ["verb", "core", "Vec"], m.angleBetween = function(r, n) {
11526
11533
  return Math.acos(m.dot(r, n) / (m.norm(r) * m.norm(n)));
11527
11534
  }, m.positiveAngleBetween = function(r, n, a) {
11528
- var l = m.cross(r, n), u = m.norm(r), d = m.norm(n), p = u * d, _ = m.dot(r, n), v = m.norm(l) / p, w = _ / p, I = Math.atan2(v, w), S = m.dot(a, l);
11529
- return Math.abs(S) < rt.EPSILON || S > 0 ? I : -I;
11535
+ var l = m.cross(r, n), u = m.norm(r), d = m.norm(n), p = u * d, _ = m.dot(r, n), v = m.norm(l) / p, A = _ / p, P = Math.atan2(v, A), S = m.dot(a, l);
11536
+ return Math.abs(S) < rt.EPSILON || S > 0 ? P : -P;
11530
11537
  }, m.signedAngleBetween = function(r, n, a) {
11531
- var l = m.cross(r, n), u = m.norm(r), d = m.norm(n), p = u * d, _ = m.dot(r, n), v = m.norm(l) / p, w = _ / p, I = Math.atan2(v, w), S = m.dot(a, l);
11532
- return S > 0 ? I : 2 * Math.PI - I;
11538
+ var l = m.cross(r, n), u = m.norm(r), d = m.norm(n), p = u * d, _ = m.dot(r, n), v = m.norm(l) / p, A = _ / p, P = Math.atan2(v, A), S = m.dot(a, l);
11539
+ return S > 0 ? P : 2 * Math.PI - P;
11533
11540
  }, m.angleBetweenNormalized2d = function(r, n) {
11534
11541
  var a = r[0] * n[1] - r[1] * n[0];
11535
11542
  return Math.atan2(a, m.dot(r, n));
@@ -11735,23 +11742,23 @@ var Ah = { exports: {} };
11735
11742
  var a = yt.rationalSurfaceClosestParam(r, n);
11736
11743
  return N.rationalSurfacePoint(r, a[0], a[1]);
11737
11744
  }, yt.rationalSurfaceClosestParam = function(r, n) {
11738
- for (var a = 5, l = 0, u, d = 1e-4, p = 5e-4, _, v = r.knotsU[0], w = $.last(r.knotsU), I = r.knotsV[0], S = $.last(r.knotsV), P = yt.isRationalSurfaceClosed(r), k = yt.isRationalSurfaceClosed(r, !1), T, L = zt.rationalSurfaceAdaptive(r, new Lr()), C = 1 / 0, F = 0, R = L.points.length; F < R; ) {
11739
- var U = F++, V = L.points[U], q = m.normSquared(m.sub(n, V));
11740
- q < C && (C = q, T = L.uvs[U]);
11745
+ for (var a = 5, l = 0, u, d = 1e-4, p = 5e-4, _, v = r.knotsU[0], A = $.last(r.knotsU), P = r.knotsV[0], S = $.last(r.knotsV), I = yt.isRationalSurfaceClosed(r), k = yt.isRationalSurfaceClosed(r, !1), T, O = zt.rationalSurfaceAdaptive(r, new Lr()), C = 1 / 0, F = 0, R = O.points.length; F < R; ) {
11746
+ var U = F++, V = O.points[U], q = m.normSquared(m.sub(n, V));
11747
+ q < C && (C = q, T = O.uvs[U]);
11741
11748
  }
11742
11749
  for (var J = function(jt) {
11743
11750
  return N.rationalSurfaceDerivatives(r, jt[0], jt[1], 2);
11744
11751
  }, H = function(jt, Xt, Dt) {
11745
- var Kt = Xt[1][0], Ae = Xt[0][1], We = Xt[2][0], _e = Xt[0][2], ge = Xt[1][1], Se = Xt[1][1], Le = m.dot(Kt, Dt), $e = m.dot(Ae, Dt), lr = [-Le, -$e], Ze = m.dot(Kt, Kt) + m.dot(We, Dt), Qe = m.dot(Kt, Ae) + m.dot(ge, Dt), Je = m.dot(Kt, Ae) + m.dot(Se, Dt), dr = m.dot(Ae, Ae) + m.dot(_e, Dt), Pn = [[Ze, Qe], [Je, dr]], qr = Lt.solve(Pn, lr);
11752
+ var Kt = Xt[1][0], Ae = Xt[0][1], We = Xt[2][0], _e = Xt[0][2], ge = Xt[1][1], Se = Xt[1][1], Le = m.dot(Kt, Dt), $e = m.dot(Ae, Dt), lr = [-Le, -$e], Ze = m.dot(Kt, Kt) + m.dot(We, Dt), Qe = m.dot(Kt, Ae) + m.dot(ge, Dt), Je = m.dot(Kt, Ae) + m.dot(Se, Dt), dr = m.dot(Ae, Ae) + m.dot(_e, Dt), In = [[Ze, Qe], [Je, dr]], qr = Lt.solve(In, lr);
11746
11753
  return m.add(qr, jt);
11747
11754
  }; l < a; ) {
11748
11755
  u = J(T), _ = m.sub(u[0][0], n);
11749
11756
  var G = m.norm(_), K = m.dot(u[1][0], _), tt = m.norm(u[1][0]) * G, et = m.dot(u[0][1], _), it = m.norm(u[0][1]) * G, ht = K / tt, at = et / it, ct = G < d, nt = ht < p, mt = at < p;
11750
11757
  if (ct && nt && mt) return T;
11751
11758
  var X = H(T, u, _);
11752
- X[0] < v ? P ? X = [w - (X[0] - v), X[1]] : X = [v + rt.EPSILON, X[1]] : X[0] > w && (P ? X = [v + (X[0] - w), X[1]] : X = [w - rt.EPSILON, X[1]]), X[1] < I ? k ? X = [X[0], S - (X[1] - I)] : X = [X[0], I + rt.EPSILON] : X[1] > S && (k ? X = [X[0], I + (X[0] - S)] : X = [X[0], S - rt.EPSILON]);
11753
- var gt = m.norm(m.mul(X[0] - T[0], u[1][0])), It = m.norm(m.mul(X[1] - T[1], u[0][1]));
11754
- if (gt + It < d) return T;
11759
+ X[0] < v ? I ? X = [A - (X[0] - v), X[1]] : X = [v + rt.EPSILON, X[1]] : X[0] > A && (I ? X = [v + (X[0] - A), X[1]] : X = [A - rt.EPSILON, X[1]]), X[1] < P ? k ? X = [X[0], S - (X[1] - P)] : X = [X[0], P + rt.EPSILON] : X[1] > S && (k ? X = [X[0], P + (X[0] - S)] : X = [X[0], S - rt.EPSILON]);
11760
+ var gt = m.norm(m.mul(X[0] - T[0], u[1][0])), Pt = m.norm(m.mul(X[1] - T[1], u[0][1]));
11761
+ if (gt + Pt < d) return T;
11755
11762
  T = X, l++;
11756
11763
  }
11757
11764
  return T;
@@ -11759,15 +11766,15 @@ var Ah = { exports: {} };
11759
11766
  return N.rationalCurvePoint(r, yt.rationalCurveClosestParam(r, n));
11760
11767
  }, yt.rationalCurveClosestParam = function(r, n) {
11761
11768
  for (var a = 1 / 0, l = 0, u = zt.rationalCurveRegularSample(r, r.controlPoints.length * r.degree, !0), d = 0, p = u.length - 1; d < p; ) {
11762
- var _ = d++, v = u[_][0], w = u[_ + 1][0], I = u[_].slice(1), S = u[_ + 1].slice(1), P = Ne.segmentClosestPoint(n, I, S, v, w), k = m.norm(m.sub(n, P.pt));
11763
- k < a && (a = k, l = P.u);
11769
+ var _ = d++, v = u[_][0], A = u[_ + 1][0], P = u[_].slice(1), S = u[_ + 1].slice(1), I = Ne.segmentClosestPoint(n, P, S, v, A), k = m.norm(m.sub(n, I.pt));
11770
+ k < a && (a = k, l = I.u);
11764
11771
  }
11765
- for (var T = 5, L = 0, C, F = 1e-4, R = 5e-4, U, V = r.knots[0], q = $.last(r.knots), J = m.normSquared(m.sub(r.controlPoints[0], $.last(r.controlPoints))) < rt.EPSILON, H = l, G = function(X) {
11772
+ for (var T = 5, O = 0, C, F = 1e-4, R = 5e-4, U, V = r.knots[0], q = $.last(r.knots), J = m.normSquared(m.sub(r.controlPoints[0], $.last(r.controlPoints))) < rt.EPSILON, H = l, G = function(X) {
11766
11773
  return N.rationalCurveDerivatives(r, X, 2);
11767
- }, K = function(X, gt, It) {
11768
- var jt = m.dot(gt[1], It), Xt = m.dot(gt[2], It), Dt = m.dot(gt[1], gt[1]), Kt = Xt + Dt;
11774
+ }, K = function(X, gt, Pt) {
11775
+ var jt = m.dot(gt[1], Pt), Xt = m.dot(gt[2], Pt), Dt = m.dot(gt[1], gt[1]), Kt = Xt + Dt;
11769
11776
  return X - jt / Kt;
11770
- }; L < T; ) {
11777
+ }; O < T; ) {
11771
11778
  C = G(H), U = m.sub(C[0], n);
11772
11779
  var tt = m.norm(U), et = m.dot(C[1], U), it = m.norm(C[1]) * tt, ht = et / it, at = tt < F, ct = Math.abs(ht) < R;
11773
11780
  if (at && ct) return H;
@@ -11775,7 +11782,7 @@ var Ah = { exports: {} };
11775
11782
  nt < V ? J ? nt = q - (nt - V) : nt = V : nt > q && (J ? nt = V + (nt - q) : nt = q);
11776
11783
  var mt = m.norm(m.mul(nt - H, C[1]));
11777
11784
  if (mt < F) return H;
11778
- H = nt, L++;
11785
+ H = nt, O++;
11779
11786
  }
11780
11787
  return H;
11781
11788
  }, yt.rationalCurveParamAtArcLength = function(r, n, a, l, u) {
@@ -11794,9 +11801,9 @@ var Ah = { exports: {} };
11794
11801
  if (n < 0) return r.knots[0];
11795
11802
  var u;
11796
11803
  if (l != null ? u = l : u = yt.rationalBezierCurveArcLength(r), n > u) return $.last(r.knots);
11797
- var d = r.knots[0], p = 0, _ = $.last(r.knots), v = u, w = 0, I = 0, S;
11804
+ var d = r.knots[0], p = 0, _ = $.last(r.knots), v = u, A = 0, P = 0, S;
11798
11805
  for (a != null ? S = a : S = rt.TOLERANCE * 2; v - p > S; )
11799
- w = (d + _) / 2, I = yt.rationalBezierCurveArcLength(r, w), I > n ? (_ = w, v = I) : (d = w, p = I);
11806
+ A = (d + _) / 2, P = yt.rationalBezierCurveArcLength(r, A), P > n ? (_ = A, v = P) : (d = A, p = P);
11800
11807
  return (d + _) / 2;
11801
11808
  }, yt.rationalCurveArcLength = function(r, n, a) {
11802
11809
  a == null && (a = 16), n == null ? n = $.last(r.knots) : n = n;
@@ -11809,9 +11816,9 @@ var Ah = { exports: {} };
11809
11816
  a == null && (a = 16);
11810
11817
  var l;
11811
11818
  n == null ? l = $.last(r.knots) : l = n;
11812
- for (var u = (l - r.knots[0]) / 2, d = 0, p = r.degree + a, _, v, w = 0; w < p; ) {
11813
- var I = w++;
11814
- _ = u * yt.Tvalues[p][I] + u + r.knots[0], v = N.rationalCurveDerivatives(r, _, 1), d += yt.Cvalues[p][I] * m.norm(v[1]);
11819
+ for (var u = (l - r.knots[0]) / 2, d = 0, p = r.degree + a, _, v, A = 0; A < p; ) {
11820
+ var P = A++;
11821
+ _ = u * yt.Tvalues[p][P] + u + r.knots[0], v = N.rationalCurveDerivatives(r, _, 1), d += yt.Cvalues[p][P] * m.norm(v[1]);
11815
11822
  }
11816
11823
  return u * d;
11817
11824
  };
@@ -11872,35 +11879,35 @@ var Ah = { exports: {} };
11872
11879
  a == null && (a = !1);
11873
11880
  var l, u, d;
11874
11881
  a ? (d = r.controlPoints, l = r.knotsV, u = r.degreeV) : (d = Lt.transpose(r.controlPoints), l = r.knotsU, u = r.degreeU);
11875
- for (var p, _ = [], v = 0, w = u + 1; v < w; )
11882
+ for (var p, _ = [], v = 0, A = u + 1; v < A; )
11876
11883
  v++, _.push(n);
11877
11884
  p = _;
11878
- for (var I = [], S = [], P = N.knotSpan(u, n, l), k = null, T = 0; T < d.length; ) {
11879
- var L = d[T];
11880
- ++T, k = ft.curveKnotRefine(new Gt(u, l, L), p), I.push(k.controlPoints.slice(0, P + 1)), S.push(k.controlPoints.slice(P + 1));
11885
+ for (var P = [], S = [], I = N.knotSpan(u, n, l), k = null, T = 0; T < d.length; ) {
11886
+ var O = d[T];
11887
+ ++T, k = ft.curveKnotRefine(new Gt(u, l, O), p), P.push(k.controlPoints.slice(0, I + 1)), S.push(k.controlPoints.slice(I + 1));
11881
11888
  }
11882
- var C = k.knots.slice(0, P + u + 2), F = k.knots.slice(P + 1);
11883
- return a ? [new te(r.degreeU, u, r.knotsU.slice(), C, I), new te(r.degreeU, u, r.knotsU.slice(), F, S)] : (I = Lt.transpose(I), S = Lt.transpose(S), [new te(u, r.degreeV, C, r.knotsV.slice(), I), new te(u, r.degreeV, F, r.knotsV.slice(), S)]);
11889
+ var C = k.knots.slice(0, I + u + 2), F = k.knots.slice(I + 1);
11890
+ return a ? [new te(r.degreeU, u, r.knotsU.slice(), C, P), new te(r.degreeU, u, r.knotsU.slice(), F, S)] : (P = Lt.transpose(P), S = Lt.transpose(S), [new te(u, r.degreeV, C, r.knotsV.slice(), P), new te(u, r.degreeV, F, r.knotsV.slice(), S)]);
11884
11891
  }, oe.curveSplit = function(r, n) {
11885
11892
  var a = r.degree;
11886
11893
  r.controlPoints;
11887
11894
  for (var l = r.knots, u, d = [], p = 0, _ = a + 1; p < _; )
11888
11895
  p++, d.push(n);
11889
11896
  u = d;
11890
- var v = ft.curveKnotRefine(r, u), w = N.knotSpan(a, n, l), I = v.knots.slice(0, w + a + 2), S = v.knots.slice(w + 1), P = v.controlPoints.slice(0, w + 1), k = v.controlPoints.slice(w + 1);
11891
- return [new Gt(a, I, P), new Gt(a, S, k)];
11897
+ var v = ft.curveKnotRefine(r, u), A = N.knotSpan(a, n, l), P = v.knots.slice(0, A + a + 2), S = v.knots.slice(A + 1), I = v.controlPoints.slice(0, A + 1), k = v.controlPoints.slice(A + 1);
11898
+ return [new Gt(a, P, I), new Gt(a, S, k)];
11892
11899
  }, oe.rationalCurveByEqualArcLength = function(r, n) {
11893
11900
  var a = yt.rationalCurveArcLength(r), l = a / n;
11894
11901
  return oe.rationalCurveByArcLength(r, l);
11895
11902
  }, oe.rationalCurveByArcLength = function(r, n) {
11896
- var a = ft.decomposeCurveIntoBeziers(r), l = a.map(function(P) {
11897
- return yt.rationalBezierCurveArcLength(P);
11903
+ var a = ft.decomposeCurveIntoBeziers(r), l = a.map(function(I) {
11904
+ return yt.rationalBezierCurveArcLength(I);
11898
11905
  }), u = m.sum(l), d = [new An(r.knots[0], 0)];
11899
11906
  if (n > u) return d;
11900
- for (var p = n, _ = 0, v = p, w = 0, I = 0, S; _ < a.length; ) {
11901
- for (w += l[_]; v < w + rt.EPSILON; )
11902
- S = yt.rationalBezierCurveParamAtArcLength(a[_], v - I, rt.TOLERANCE, l[_]), d.push(new An(S, v)), v += p;
11903
- I += l[_], _++;
11907
+ for (var p = n, _ = 0, v = p, A = 0, P = 0, S; _ < a.length; ) {
11908
+ for (A += l[_]; v < A + rt.EPSILON; )
11909
+ S = yt.rationalBezierCurveParamAtArcLength(a[_], v - P, rt.TOLERANCE, l[_]), d.push(new An(S, v)), v += p;
11910
+ P += l[_], _++;
11904
11911
  }
11905
11912
  return d;
11906
11913
  };
@@ -11920,24 +11927,24 @@ var Ah = { exports: {} };
11920
11927
  return m.cross(l[1][0], l[0][1]);
11921
11928
  }, N.rationalSurfaceDerivatives = function(r, n, a, l) {
11922
11929
  l == null && (l = 1);
11923
- for (var u = N.surfaceDerivatives(r, n, a, l), d = N.rational2d(u), p = N.weight2d(u), _ = [], v = d[0][0].length, w = 0, I = l + 1; w < I; ) {
11924
- var S = w++;
11930
+ for (var u = N.surfaceDerivatives(r, n, a, l), d = N.rational2d(u), p = N.weight2d(u), _ = [], v = d[0][0].length, A = 0, P = l + 1; A < P; ) {
11931
+ var S = A++;
11925
11932
  _.push([]);
11926
- for (var P = 0, k = l - S + 1; P < k; ) {
11927
- for (var T = P++, L = d[S][T], C = 1, F = T + 1; C < F; ) {
11933
+ for (var I = 0, k = l - S + 1; I < k; ) {
11934
+ for (var T = I++, O = d[S][T], C = 1, F = T + 1; C < F; ) {
11928
11935
  var R = C++;
11929
- m.subMulMutate(L, Ft.get(T, R) * p[0][R], _[S][T - R]);
11936
+ m.subMulMutate(O, Ft.get(T, R) * p[0][R], _[S][T - R]);
11930
11937
  }
11931
11938
  for (var U = 1, V = S + 1; U < V; ) {
11932
11939
  var q = U++;
11933
- m.subMulMutate(L, Ft.get(S, q) * p[q][0], _[S - q][T]);
11940
+ m.subMulMutate(O, Ft.get(S, q) * p[q][0], _[S - q][T]);
11934
11941
  for (var J = m.zeros1d(v), H = 1, G = T + 1; H < G; ) {
11935
11942
  var K = H++;
11936
11943
  m.addMulMutate(J, Ft.get(T, K) * p[q][K], _[S - q][T - K]);
11937
11944
  }
11938
- m.subMulMutate(L, Ft.get(S, q), J);
11945
+ m.subMulMutate(O, Ft.get(S, q), J);
11939
11946
  }
11940
- m.mulMutate(1 / p[0][0], L), _[S].push(L);
11947
+ m.mulMutate(1 / p[0][0], O), _[S].push(O);
11941
11948
  }
11942
11949
  }
11943
11950
  return _;
@@ -11946,11 +11953,11 @@ var Ah = { exports: {} };
11946
11953
  }, N.rationalCurveDerivatives = function(r, n, a) {
11947
11954
  a == null && (a = 1);
11948
11955
  for (var l = N.curveDerivatives(r, n, a), u = N.rational1d(l), d = N.weight1d(l), p = [], _ = 0, v = a + 1; _ < v; ) {
11949
- for (var w = _++, I = u[w], S = 1, P = w + 1; S < P; ) {
11956
+ for (var A = _++, P = u[A], S = 1, I = A + 1; S < I; ) {
11950
11957
  var k = S++;
11951
- m.subMulMutate(I, Ft.get(w, k) * d[k], p[w - k]);
11958
+ m.subMulMutate(P, Ft.get(A, k) * d[k], p[A - k]);
11952
11959
  }
11953
- m.mulMutate(1 / d[0], I), p.push(I);
11960
+ m.mulMutate(1 / d[0], P), p.push(P);
11954
11961
  }
11955
11962
  return p;
11956
11963
  }, N.rationalCurvePoint = function(r, n) {
@@ -11959,19 +11966,19 @@ var Ah = { exports: {} };
11959
11966
  var u = r.knotsU.length - r.degreeU - 2, d = r.knotsV.length - r.degreeV - 2;
11960
11967
  return N.surfaceDerivativesGivenNM(u, d, r, n, a, l);
11961
11968
  }, N.surfaceDerivativesGivenNM = function(r, n, a, l, u, d) {
11962
- var p = a.degreeU, _ = a.degreeV, v = a.controlPoints, w = a.knotsU, I = a.knotsV;
11963
- if (!N.areValidRelations(p, v.length, w.length) || !N.areValidRelations(_, v[0].length, I.length)) throw new Q("Invalid relations between control points, knot vector, and n");
11964
- var S = v[0][0].length, P;
11965
- d < p ? P = d : P = p;
11969
+ var p = a.degreeU, _ = a.degreeV, v = a.controlPoints, A = a.knotsU, P = a.knotsV;
11970
+ if (!N.areValidRelations(p, v.length, A.length) || !N.areValidRelations(_, v[0].length, P.length)) throw new Q("Invalid relations between control points, knot vector, and n");
11971
+ var S = v[0][0].length, I;
11972
+ d < p ? I = d : I = p;
11966
11973
  var k;
11967
11974
  d < _ ? k = d : k = _;
11968
- for (var T = m.zeros3d(d + 1, d + 1, S), L = N.knotSpanGivenN(r, p, l, w), C = N.knotSpanGivenN(n, _, u, I), F = N.derivativeBasisFunctionsGivenNI(L, l, p, r, w), R = N.derivativeBasisFunctionsGivenNI(C, u, _, n, I), U = m.zeros2d(_ + 1, S), V = 0, q = 0, J = P + 1; q < J; ) {
11975
+ for (var T = m.zeros3d(d + 1, d + 1, S), O = N.knotSpanGivenN(r, p, l, A), C = N.knotSpanGivenN(n, _, u, P), F = N.derivativeBasisFunctionsGivenNI(O, l, p, r, A), R = N.derivativeBasisFunctionsGivenNI(C, u, _, n, P), U = m.zeros2d(_ + 1, S), V = 0, q = 0, J = I + 1; q < J; ) {
11969
11976
  for (var H = q++, G = 0, K = _ + 1; G < K; ) {
11970
11977
  var tt = G++;
11971
11978
  U[tt] = m.zeros1d(S);
11972
11979
  for (var et = 0, it = p + 1; et < it; ) {
11973
11980
  var ht = et++;
11974
- m.addMulMutate(U[tt], F[H][ht], v[L - p + ht][C - _ + tt]);
11981
+ m.addMulMutate(U[tt], F[H][ht], v[O - p + ht][C - _ + tt]);
11975
11982
  }
11976
11983
  }
11977
11984
  var at = d - H;
@@ -11980,8 +11987,8 @@ var Ah = { exports: {} };
11980
11987
  var mt = ct++;
11981
11988
  T[H][mt] = m.zeros1d(S);
11982
11989
  for (var X = 0, gt = _ + 1; X < gt; ) {
11983
- var It = X++;
11984
- m.addMulMutate(T[H][mt], R[mt][It], U[It]);
11990
+ var Pt = X++;
11991
+ m.addMulMutate(T[H][mt], R[mt][Pt], U[Pt]);
11985
11992
  }
11986
11993
  }
11987
11994
  }
@@ -11990,36 +11997,36 @@ var Ah = { exports: {} };
11990
11997
  var l = r.knotsU.length - r.degreeU - 2, u = r.knotsV.length - r.degreeV - 2;
11991
11998
  return N.surfacePointGivenNM(l, u, r, n, a);
11992
11999
  }, N.surfacePointGivenNM = function(r, n, a, l, u) {
11993
- var d = a.degreeU, p = a.degreeV, _ = a.controlPoints, v = a.knotsU, w = a.knotsV;
11994
- if (!N.areValidRelations(d, _.length, v.length) || !N.areValidRelations(p, _[0].length, w.length)) throw new Q("Invalid relations between control points, knot vector, and n");
11995
- for (var I = _[0][0].length, S = N.knotSpanGivenN(r, d, l, v), P = N.knotSpanGivenN(n, p, u, w), k = N.basisFunctionsGivenKnotSpanIndex(S, l, d, v), T = N.basisFunctionsGivenKnotSpanIndex(P, u, p, w), L = S - d, C = P, F = m.zeros1d(I), R = m.zeros1d(I), U = 0, V = p + 1; U < V; ) {
12000
+ var d = a.degreeU, p = a.degreeV, _ = a.controlPoints, v = a.knotsU, A = a.knotsV;
12001
+ if (!N.areValidRelations(d, _.length, v.length) || !N.areValidRelations(p, _[0].length, A.length)) throw new Q("Invalid relations between control points, knot vector, and n");
12002
+ for (var P = _[0][0].length, S = N.knotSpanGivenN(r, d, l, v), I = N.knotSpanGivenN(n, p, u, A), k = N.basisFunctionsGivenKnotSpanIndex(S, l, d, v), T = N.basisFunctionsGivenKnotSpanIndex(I, u, p, A), O = S - d, C = I, F = m.zeros1d(P), R = m.zeros1d(P), U = 0, V = p + 1; U < V; ) {
11996
12003
  var q = U++;
11997
- R = m.zeros1d(I), C = P - p + q;
12004
+ R = m.zeros1d(P), C = I - p + q;
11998
12005
  for (var J = 0, H = d + 1; J < H; ) {
11999
12006
  var G = J++;
12000
- m.addMulMutate(R, k[G], _[L + G][C]);
12007
+ m.addMulMutate(R, k[G], _[O + G][C]);
12001
12008
  }
12002
12009
  m.addMulMutate(F, T[q], R);
12003
12010
  }
12004
12011
  return F;
12005
12012
  }, N.curveRegularSamplePoints = function(r, n) {
12006
- for (var a = N.curveDerivatives(r, r.knots[0], r.degree), l = 1 / n, u = l * l, d = a[0], p = m.mul(l, a[1]), _ = m.mul(u * 0.5, a[2]), v = m.mul(u * l * 0.5, a[3]), w = m.add(_, _), I = m.add(v, v), S = m.mul(0.3333333333333333, v), P = [], k = 0, T = n + 1; k < T; )
12007
- k++, P.push(N.dehomogenize(d)), m.addAllMutate([d, p, _, S]), m.addAllMutate([p, w, v]), m.addAllMutate([w, I]), m.addAllMutate([_, v]);
12008
- return P;
12013
+ for (var a = N.curveDerivatives(r, r.knots[0], r.degree), l = 1 / n, u = l * l, d = a[0], p = m.mul(l, a[1]), _ = m.mul(u * 0.5, a[2]), v = m.mul(u * l * 0.5, a[3]), A = m.add(_, _), P = m.add(v, v), S = m.mul(0.3333333333333333, v), I = [], k = 0, T = n + 1; k < T; )
12014
+ k++, I.push(N.dehomogenize(d)), m.addAllMutate([d, p, _, S]), m.addAllMutate([p, A, v]), m.addAllMutate([A, P]), m.addAllMutate([_, v]);
12015
+ return I;
12009
12016
  }, N.curveRegularSamplePoints2 = function(r, n) {
12010
- for (var a = N.curveDerivatives(r, r.knots[0], r.degree), l = 1 / n, u = l * l, d = a[0], p = m.mul(l, a[1]), _ = m.mul(u * 0.5, a[2]), v = m.mul(u * l * 0.5, a[3]), w = m.add(_, _), I = m.add(v, v), S = m.mul(0.3333333333333333, v), P = [], k = 0, T = n + 1; k < T; )
12011
- k++, P.push(N.dehomogenize(d)), m.addAllMutate([d, p, _, S]), m.addAllMutate([p, w, v]), m.addAllMutate([w, I]), m.addAllMutate([_, v]);
12012
- return P;
12017
+ for (var a = N.curveDerivatives(r, r.knots[0], r.degree), l = 1 / n, u = l * l, d = a[0], p = m.mul(l, a[1]), _ = m.mul(u * 0.5, a[2]), v = m.mul(u * l * 0.5, a[3]), A = m.add(_, _), P = m.add(v, v), S = m.mul(0.3333333333333333, v), I = [], k = 0, T = n + 1; k < T; )
12018
+ k++, I.push(N.dehomogenize(d)), m.addAllMutate([d, p, _, S]), m.addAllMutate([p, A, v]), m.addAllMutate([A, P]), m.addAllMutate([_, v]);
12019
+ return I;
12013
12020
  }, N.rationalSurfaceRegularSampleDerivatives = function(r, n, a, l) {
12014
- for (var u = N.surfaceRegularSampleDerivatives(r, n, a, l), d = [], p = n + 1, _ = a + 1, v = l + 1, w = 0; w < p; ) {
12015
- var I = w++, S = [];
12021
+ for (var u = N.surfaceRegularSampleDerivatives(r, n, a, l), d = [], p = n + 1, _ = a + 1, v = l + 1, A = 0; A < p; ) {
12022
+ var P = A++, S = [];
12016
12023
  d.push(S);
12017
- for (var P = 0; P < _; ) {
12018
- for (var k = P++, T = u[I][k], L = N.rational2d(T), C = N.weight2d(T), F = [], R = L[0][0].length, U = 0; U < v; ) {
12024
+ for (var I = 0; I < _; ) {
12025
+ for (var k = I++, T = u[P][k], O = N.rational2d(T), C = N.weight2d(T), F = [], R = O[0][0].length, U = 0; U < v; ) {
12019
12026
  var V = U++;
12020
12027
  F.push([]);
12021
12028
  for (var q = 0, J = v - V; q < J; ) {
12022
- for (var H = q++, G = L[V][H], K = 1, tt = H + 1; K < tt; ) {
12029
+ for (var H = q++, G = O[V][H], K = 1, tt = H + 1; K < tt; ) {
12023
12030
  var et = K++;
12024
12031
  m.subMulMutate(G, Ft.get(H, et) * C[0][et], F[V][H - et]);
12025
12032
  }
@@ -12040,14 +12047,14 @@ var Ah = { exports: {} };
12040
12047
  }
12041
12048
  return d;
12042
12049
  }, N.surfaceRegularSampleDerivatives = function(r, n, a, l) {
12043
- var u = r.degreeU, d = r.degreeV, p = r.controlPoints, _ = r.knotsU, v = r.knotsV, w = p[0][0].length;
12050
+ var u = r.degreeU, d = r.degreeV, p = r.controlPoints, _ = r.knotsU, v = r.knotsV, A = p[0][0].length;
12044
12051
  ($.last(_) - _[0]) / n, ($.last(v) - v[0]) / a;
12045
- for (var I = N.regularlySpacedDerivativeBasisFunctions(u, _, n), S = I.item0, P = I.item1, k = N.regularlySpacedDerivativeBasisFunctions(d, v, a), T = k.item0, L = k.item1, C = [], F = n + 1, R = a + 1, U = 0; U < F; ) {
12052
+ for (var P = N.regularlySpacedDerivativeBasisFunctions(u, _, n), S = P.item0, I = P.item1, k = N.regularlySpacedDerivativeBasisFunctions(d, v, a), T = k.item0, O = k.item1, C = [], F = n + 1, R = a + 1, U = 0; U < F; ) {
12046
12053
  var V = U++, q = [];
12047
12054
  C.push(q);
12048
12055
  for (var J = 0; J < R; ) {
12049
12056
  var H = J++;
12050
- q.push(N.surfaceDerivativesGivenBasesKnotSpans(u, d, p, S[V], T[H], P[V], L[H], w, l));
12057
+ q.push(N.surfaceDerivativesGivenBasesKnotSpans(u, d, p, S[V], T[H], I[V], O[H], A, l));
12051
12058
  }
12052
12059
  }
12053
12060
  return C;
@@ -12056,47 +12063,47 @@ var Ah = { exports: {} };
12056
12063
  }, N.surfaceRegularSamplePoints = function(r, n, a) {
12057
12064
  var l = r.degreeU, u = r.degreeV, d = r.controlPoints, p = r.knotsU, _ = r.knotsV, v = d[0][0].length;
12058
12065
  ($.last(p) - p[0]) / n, ($.last(_) - _[0]) / a;
12059
- for (var w = N.regularlySpacedBasisFunctions(l, p, n), I = w.item0, S = w.item1, P = N.regularlySpacedBasisFunctions(u, _, a), k = P.item0, T = P.item1, L = [], C = n + 1, F = a + 1, R = 0; R < C; ) {
12066
+ for (var A = N.regularlySpacedBasisFunctions(l, p, n), P = A.item0, S = A.item1, I = N.regularlySpacedBasisFunctions(u, _, a), k = I.item0, T = I.item1, O = [], C = n + 1, F = a + 1, R = 0; R < C; ) {
12060
12067
  var U = R++, V = [];
12061
- L.push(V);
12068
+ O.push(V);
12062
12069
  for (var q = 0; q < F; ) {
12063
12070
  var J = q++;
12064
- V.push(N.surfacePointGivenBasesKnotSpans(l, u, d, I[U], k[J], S[U], T[J], v));
12071
+ V.push(N.surfacePointGivenBasesKnotSpans(l, u, d, P[U], k[J], S[U], T[J], v));
12065
12072
  }
12066
12073
  }
12067
- return L;
12074
+ return O;
12068
12075
  }, N.regularlySpacedBasisFunctions = function(r, n, a) {
12069
- for (var l = n.length - r - 2, u = ($.last(n) - n[0]) / a, d = [], p = [], _ = n[0], v = N.knotSpanGivenN(l, r, _, n), w = a + 1, I = 0; I < w; ) {
12070
- for (I++; _ >= n[v + 1]; ) v++;
12076
+ for (var l = n.length - r - 2, u = ($.last(n) - n[0]) / a, d = [], p = [], _ = n[0], v = N.knotSpanGivenN(l, r, _, n), A = a + 1, P = 0; P < A; ) {
12077
+ for (P++; _ >= n[v + 1]; ) v++;
12071
12078
  p.push(v), d.push(N.basisFunctionsGivenKnotSpanIndex(v, _, r, n)), _ += u;
12072
12079
  }
12073
12080
  return new ee(p, d);
12074
12081
  }, N.regularlySpacedDerivativeBasisFunctions = function(r, n, a) {
12075
- for (var l = n.length - r - 2, u = ($.last(n) - n[0]) / a, d = [], p = [], _ = n[0], v = N.knotSpanGivenN(l, r, _, n), w = a + 1, I = 0; I < w; ) {
12076
- for (I++; _ >= n[v + 1]; ) v++;
12082
+ for (var l = n.length - r - 2, u = ($.last(n) - n[0]) / a, d = [], p = [], _ = n[0], v = N.knotSpanGivenN(l, r, _, n), A = a + 1, P = 0; P < A; ) {
12083
+ for (P++; _ >= n[v + 1]; ) v++;
12077
12084
  p.push(v), d.push(N.derivativeBasisFunctionsGivenNI(v, _, r, l, n)), _ += u;
12078
12085
  }
12079
12086
  return new ee(p, d);
12080
12087
  }, N.surfacePointGivenBasesKnotSpans = function(r, n, a, l, u, d, p, _) {
12081
- for (var v = m.zeros1d(_), w, I = l - r, S = u - n, P = 0, k = n + 1; P < k; ) {
12082
- var T = P++;
12083
- w = m.zeros1d(_);
12084
- for (var L = 0, C = r + 1; L < C; ) {
12085
- var F = L++;
12086
- m.addMulMutate(w, d[F], a[I + F][S]);
12088
+ for (var v = m.zeros1d(_), A, P = l - r, S = u - n, I = 0, k = n + 1; I < k; ) {
12089
+ var T = I++;
12090
+ A = m.zeros1d(_);
12091
+ for (var O = 0, C = r + 1; O < C; ) {
12092
+ var F = O++;
12093
+ m.addMulMutate(A, d[F], a[P + F][S]);
12087
12094
  }
12088
- S++, m.addMulMutate(v, p[T], w);
12095
+ S++, m.addMulMutate(v, p[T], A);
12089
12096
  }
12090
12097
  return v;
12091
12098
  }, N.surfaceDerivativesGivenBasesKnotSpans = function(r, n, a, l, u, d, p, _, v) {
12092
- var w = a[0][0].length, I;
12093
- v < r ? I = v : I = r;
12099
+ var A = a[0][0].length, P;
12100
+ v < r ? P = v : P = r;
12094
12101
  var S;
12095
12102
  v < n ? S = v : S = n;
12096
- for (var P = m.zeros3d(I + 1, S + 1, w), k = m.zeros2d(n + 1, w), T = 0, L = 0, C = I + 1; L < C; ) {
12097
- for (var F = L++, R = 0, U = n + 1; R < U; ) {
12103
+ for (var I = m.zeros3d(P + 1, S + 1, A), k = m.zeros2d(n + 1, A), T = 0, O = 0, C = P + 1; O < C; ) {
12104
+ for (var F = O++, R = 0, U = n + 1; R < U; ) {
12098
12105
  var V = R++;
12099
- k[V] = m.zeros1d(w);
12106
+ k[V] = m.zeros1d(A);
12100
12107
  for (var q = 0, J = r + 1; q < J; ) {
12101
12108
  var H = q++;
12102
12109
  m.addMulMutate(k[V], d[F][H], a[l - r + H][u - n + V]);
@@ -12106,14 +12113,14 @@ var Ah = { exports: {} };
12106
12113
  G < S ? T = G : T = S;
12107
12114
  for (var K = 0, tt = T + 1; K < tt; ) {
12108
12115
  var et = K++;
12109
- P[F][et] = m.zeros1d(w);
12116
+ I[F][et] = m.zeros1d(A);
12110
12117
  for (var it = 0, ht = n + 1; it < ht; ) {
12111
12118
  var at = it++;
12112
- m.addMulMutate(P[F][et], p[et][at], k[at]);
12119
+ m.addMulMutate(I[F][et], p[et][at], k[at]);
12113
12120
  }
12114
12121
  }
12115
12122
  }
12116
- return P;
12123
+ return I;
12117
12124
  }, N.curveDerivatives = function(r, n, a) {
12118
12125
  var l = r.knots.length - r.degree - 2;
12119
12126
  return N.curveDerivativesGivenN(l, r, n, a);
@@ -12122,12 +12129,12 @@ var Ah = { exports: {} };
12122
12129
  if (!N.areValidRelations(u, d.length, p.length)) throw new Q("Invalid relations between control points, knot vector, and n");
12123
12130
  var _ = d[0].length, v;
12124
12131
  l < u ? v = l : v = u;
12125
- for (var w = m.zeros2d(l + 1, _), I = N.knotSpanGivenN(r, u, a, p), S = N.derivativeBasisFunctionsGivenNI(I, a, u, v, p), P = 0, k = v + 1; P < k; )
12126
- for (var T = P++, L = 0, C = u + 1; L < C; ) {
12127
- var F = L++;
12128
- m.addMulMutate(w[T], S[T][F], d[I - u + F]);
12132
+ for (var A = m.zeros2d(l + 1, _), P = N.knotSpanGivenN(r, u, a, p), S = N.derivativeBasisFunctionsGivenNI(P, a, u, v, p), I = 0, k = v + 1; I < k; )
12133
+ for (var T = I++, O = 0, C = u + 1; O < C; ) {
12134
+ var F = O++;
12135
+ m.addMulMutate(A[T], S[T][F], d[P - u + F]);
12129
12136
  }
12130
- return w;
12137
+ return A;
12131
12138
  }, N.curvePoint = function(r, n) {
12132
12139
  var a = r.knots.length - r.degree - 2;
12133
12140
  return N.curvePointGivenN(a, r, n);
@@ -12137,8 +12144,8 @@ var Ah = { exports: {} };
12137
12144
  var l = n.degree, u = n.controlPoints, d = n.knots;
12138
12145
  if (!N.areValidRelations(l, u.length, d.length))
12139
12146
  throw new Q("Invalid relations between control points, knot Array, and n");
12140
- for (var p = N.knotSpanGivenN(r, l, a, d), _ = N.basisFunctionsGivenKnotSpanIndex(p, a, l, d), v = m.zeros1d(u[0].length), w = 0, I = l + 1; w < I; ) {
12141
- var S = w++;
12147
+ for (var p = N.knotSpanGivenN(r, l, a, d), _ = N.basisFunctionsGivenKnotSpanIndex(p, a, l, d), v = m.zeros1d(u[0].length), A = 0, P = l + 1; A < P; ) {
12148
+ var S = A++;
12142
12149
  m.addMulMutate(v, _[S], u[p - l + S]);
12143
12150
  }
12144
12151
  return v;
@@ -12147,13 +12154,13 @@ var Ah = { exports: {} };
12147
12154
  return N.volumePointGivenNML(r, u, d, p, n, a, l);
12148
12155
  }, N.volumePointGivenNML = function(r, n, a, l, u, d, p) {
12149
12156
  if (!N.areValidRelations(r.degreeU, r.controlPoints.length, r.knotsU.length) || !N.areValidRelations(r.degreeV, r.controlPoints[0].length, r.knotsV.length) || !N.areValidRelations(r.degreeW, r.controlPoints[0][0].length, r.knotsW.length)) throw new Q("Invalid relations between control points and knot vector");
12150
- for (var _ = r.controlPoints, v = r.degreeU, w = r.degreeV, I = r.degreeW, S = r.knotsU, P = r.knotsV, k = r.knotsW, T = _[0][0][0].length, L = N.knotSpanGivenN(n, v, u, S), C = N.knotSpanGivenN(a, w, d, P), F = N.knotSpanGivenN(l, I, p, k), R = N.basisFunctionsGivenKnotSpanIndex(L, u, v, S), U = N.basisFunctionsGivenKnotSpanIndex(C, d, w, P), V = N.basisFunctionsGivenKnotSpanIndex(F, p, I, k), q = L - v, J = m.zeros1d(T), H = m.zeros1d(T), G = m.zeros1d(T), K = 0, tt = I + 1; K < tt; ) {
12157
+ for (var _ = r.controlPoints, v = r.degreeU, A = r.degreeV, P = r.degreeW, S = r.knotsU, I = r.knotsV, k = r.knotsW, T = _[0][0][0].length, O = N.knotSpanGivenN(n, v, u, S), C = N.knotSpanGivenN(a, A, d, I), F = N.knotSpanGivenN(l, P, p, k), R = N.basisFunctionsGivenKnotSpanIndex(O, u, v, S), U = N.basisFunctionsGivenKnotSpanIndex(C, d, A, I), V = N.basisFunctionsGivenKnotSpanIndex(F, p, P, k), q = O - v, J = m.zeros1d(T), H = m.zeros1d(T), G = m.zeros1d(T), K = 0, tt = P + 1; K < tt; ) {
12151
12158
  var et = K++;
12152
12159
  G = m.zeros1d(T);
12153
- for (var it = F - I + et, ht = 0, at = w + 1; ht < at; ) {
12160
+ for (var it = F - P + et, ht = 0, at = A + 1; ht < at; ) {
12154
12161
  var ct = ht++;
12155
12162
  H = m.zeros1d(T);
12156
- for (var nt = C - w + ct, mt = 0, X = v + 1; mt < X; ) {
12163
+ for (var nt = C - A + ct, mt = 0, X = v + 1; mt < X; ) {
12157
12164
  var gt = mt++;
12158
12165
  m.addMulMutate(H, R[gt], _[q + gt][nt][it]);
12159
12166
  }
@@ -12166,20 +12173,20 @@ var Ah = { exports: {} };
12166
12173
  var l = N.knotSpan(n, r, a), u = a.length - 1, d = u - n - 1;
12167
12174
  return N.derivativeBasisFunctionsGivenNI(l, r, n, d, a);
12168
12175
  }, N.derivativeBasisFunctionsGivenNI = function(r, n, a, l, u) {
12169
- var d = m.zeros2d(a + 1, a + 1), p = m.zeros1d(a + 1), _ = m.zeros1d(a + 1), v = 0, w = 0;
12176
+ var d = m.zeros2d(a + 1, a + 1), p = m.zeros1d(a + 1), _ = m.zeros1d(a + 1), v = 0, A = 0;
12170
12177
  d[0][0] = 1;
12171
- for (var I = 1, S = a + 1; I < S; ) {
12172
- var P = I++;
12173
- p[P] = n - u[r + 1 - P], _[P] = u[r + P] - n, v = 0;
12174
- for (var k = 0; k < P; ) {
12178
+ for (var P = 1, S = a + 1; P < S; ) {
12179
+ var I = P++;
12180
+ p[I] = n - u[r + 1 - I], _[I] = u[r + I] - n, v = 0;
12181
+ for (var k = 0; k < I; ) {
12175
12182
  var T = k++;
12176
- d[P][T] = _[T + 1] + p[P - T], w = d[T][P - 1] / d[P][T], d[T][P] = v + _[T + 1] * w, v = p[P - T] * w;
12183
+ d[I][T] = _[T + 1] + p[I - T], A = d[T][I - 1] / d[I][T], d[T][I] = v + _[T + 1] * A, v = p[I - T] * A;
12177
12184
  }
12178
- d[P][P] = v;
12185
+ d[I][I] = v;
12179
12186
  }
12180
- for (var L = m.zeros2d(l + 1, a + 1), C = m.zeros2d(2, a + 1), F = 0, R = 1, U = 0, V = 0, q = 0, J = 0, H = 0, G = 0, K = a + 1; G < K; ) {
12187
+ for (var O = m.zeros2d(l + 1, a + 1), C = m.zeros2d(2, a + 1), F = 0, R = 1, U = 0, V = 0, q = 0, J = 0, H = 0, G = 0, K = a + 1; G < K; ) {
12181
12188
  var tt = G++;
12182
- L[0][tt] = d[tt][a];
12189
+ O[0][tt] = d[tt][a];
12183
12190
  }
12184
12191
  for (var et = 0, it = a + 1; et < it; ) {
12185
12192
  var ht = et++;
@@ -12191,30 +12198,30 @@ var Ah = { exports: {} };
12191
12198
  var gt = mt++;
12192
12199
  C[R][gt] = (C[F][gt] - C[F][gt - 1]) / d[q + 1][V + gt], U += C[R][gt] * d[V + gt][q];
12193
12200
  }
12194
- ht <= q && (C[R][nt] = -C[F][nt - 1] / d[q + 1][ht], U += C[R][nt] * d[ht][q]), L[nt][ht] = U;
12195
- var It = F;
12196
- F = R, R = It;
12201
+ ht <= q && (C[R][nt] = -C[F][nt - 1] / d[q + 1][ht], U += C[R][nt] * d[ht][q]), O[nt][ht] = U;
12202
+ var Pt = F;
12203
+ F = R, R = Pt;
12197
12204
  }
12198
12205
  }
12199
12206
  for (var jt = a, Xt = 1, Dt = l + 1; Xt < Dt; ) {
12200
12207
  for (var Kt = Xt++, Ae = 0, We = a + 1; Ae < We; ) {
12201
12208
  var _e = Ae++;
12202
- L[Kt][_e] *= jt;
12209
+ O[Kt][_e] *= jt;
12203
12210
  }
12204
12211
  jt *= a - Kt;
12205
12212
  }
12206
- return L;
12213
+ return O;
12207
12214
  }, N.basisFunctions = function(r, n, a) {
12208
12215
  var l = N.knotSpan(n, r, a);
12209
12216
  return N.basisFunctionsGivenKnotSpanIndex(l, r, n, a);
12210
12217
  }, N.basisFunctionsGivenKnotSpanIndex = function(r, n, a, l) {
12211
12218
  var u = m.zeros1d(a + 1), d = m.zeros1d(a + 1), p = m.zeros1d(a + 1), _ = 0, v = 0;
12212
12219
  u[0] = 1;
12213
- for (var w = 1, I = a + 1; w < I; ) {
12214
- var S = w++;
12220
+ for (var A = 1, P = a + 1; A < P; ) {
12221
+ var S = A++;
12215
12222
  d[S] = n - l[r + 1 - S], p[S] = l[r + S] - n, _ = 0;
12216
- for (var P = 0; P < S; ) {
12217
- var k = P++;
12223
+ for (var I = 0; I < S; ) {
12224
+ var k = I++;
12218
12225
  v = u[k] / (p[k + 1] + d[S - k]), u[k] = _ + p[k + 1] * v, _ = d[S - k] * v;
12219
12226
  }
12220
12227
  u[S] = _;
@@ -12256,13 +12263,13 @@ var Ah = { exports: {} };
12256
12263
  var a = r.length, l = r[0].length, u = [], d = 0, p = [], _;
12257
12264
  n != null ? _ = n : _ = m.rep(r.length, 1);
12258
12265
  for (var v = 0; v < a; ) {
12259
- var w = v++, I = [];
12260
- p = r[w], d = _[w];
12266
+ var A = v++, P = [];
12267
+ p = r[A], d = _[A];
12261
12268
  for (var S = 0; S < l; ) {
12262
- var P = S++;
12263
- I.push(p[P] * d);
12269
+ var I = S++;
12270
+ P.push(p[I] * d);
12264
12271
  }
12265
- I.push(d), u.push(I);
12272
+ P.push(d), u.push(P);
12266
12273
  }
12267
12274
  return u;
12268
12275
  }, N.homogenize2d = function(r, n) {
@@ -12293,12 +12300,12 @@ var Ah = { exports: {} };
12293
12300
  }), 3);
12294
12301
  });
12295
12302
  }, lt.surfacesAtPointWithEstimate = function(r, n, a, l, u) {
12296
- var d, p, _, v, w, I, S, P, k, T, L, C, F, R = 5, U = 0;
12303
+ var d, p, _, v, A, P, S, I, k, T, O, C, F, R = 5, U = 0;
12297
12304
  do {
12298
- if (d = N.rationalSurfaceDerivatives(r, a[0], a[1], 1), p = d[0][0], v = d[1][0], w = d[0][1], _ = m.normalized(m.cross(v, w)), I = m.dot(_, p), S = N.rationalSurfaceDerivatives(n, l[0], l[1], 1), P = S[0][0], T = S[1][0], L = S[0][1], k = m.normalized(m.cross(T, L)), C = m.dot(k, P), F = m.distSquared(p, P), F < u * u) break;
12299
- var V = m.normalized(m.cross(_, k)), q = m.dot(V, p), J = lt.threePlanes(_, I, k, C, V, q);
12305
+ if (d = N.rationalSurfaceDerivatives(r, a[0], a[1], 1), p = d[0][0], v = d[1][0], A = d[0][1], _ = m.normalized(m.cross(v, A)), P = m.dot(_, p), S = N.rationalSurfaceDerivatives(n, l[0], l[1], 1), I = S[0][0], T = S[1][0], O = S[0][1], k = m.normalized(m.cross(T, O)), C = m.dot(k, I), F = m.distSquared(p, I), F < u * u) break;
12306
+ var V = m.normalized(m.cross(_, k)), q = m.dot(V, p), J = lt.threePlanes(_, P, k, C, V, q);
12300
12307
  if (J == null) throw new Q("panic!");
12301
- var H = m.sub(J, p), G = m.sub(J, P), K = m.cross(v, _), tt = m.cross(w, _), et = m.cross(T, k), it = m.cross(L, k), ht = m.dot(tt, H) / m.dot(tt, v), at = m.dot(K, H) / m.dot(K, w), ct = m.dot(it, G) / m.dot(it, T), nt = m.dot(et, G) / m.dot(et, L);
12308
+ var H = m.sub(J, p), G = m.sub(J, I), K = m.cross(v, _), tt = m.cross(A, _), et = m.cross(T, k), it = m.cross(O, k), ht = m.dot(tt, H) / m.dot(tt, v), at = m.dot(K, H) / m.dot(K, A), ct = m.dot(it, G) / m.dot(it, T), nt = m.dot(et, G) / m.dot(et, O);
12302
12309
  a = m.add([ht, at], a), l = m.add([ct, nt], l), U++;
12303
12310
  } while (U < R);
12304
12311
  return new Wn(a, l, p, F);
@@ -12311,15 +12318,15 @@ var Ah = { exports: {} };
12311
12318
  }).filter(function(p) {
12312
12319
  return m.distSquared(p.min.point, p.max.point) > rt.EPSILON;
12313
12320
  }), function(p, _) {
12314
- var v = m.sub(p.min.uv0, _.min.uv0), w = m.dot(v, v), I = m.sub(p.max.uv0, _.max.uv0), S = m.dot(I, I), P = m.sub(p.min.uv0, _.max.uv0), k = m.dot(P, P), T = m.sub(p.max.uv0, _.min.uv0), L = m.dot(T, T);
12315
- return w < rt.EPSILON && S < rt.EPSILON || k < rt.EPSILON && L < rt.EPSILON;
12321
+ var v = m.sub(p.min.uv0, _.min.uv0), A = m.dot(v, v), P = m.sub(p.max.uv0, _.max.uv0), S = m.dot(P, P), I = m.sub(p.min.uv0, _.max.uv0), k = m.dot(I, I), T = m.sub(p.max.uv0, _.min.uv0), O = m.dot(T, T);
12322
+ return A < rt.EPSILON && S < rt.EPSILON || k < rt.EPSILON && O < rt.EPSILON;
12316
12323
  });
12317
12324
  return lt.makeMeshIntersectionPolylines(d);
12318
12325
  }, lt.meshSlices = function(r, n, a, l) {
12319
- for (var u = new Cr(r), d = u.boundingBox(), p = d.min[0], _ = d.min[1], v = d.max[0], w = d.max[1], I = m.span(n, a, l), S = [], P = 0; P < I.length; ) {
12320
- var k = I[P];
12321
- ++P;
12322
- var T = [[p, _, k], [v, _, k], [v, w, k], [p, w, k]], L = [[0, 0], [1, 0], [1, 1], [0, 1]], C = [[0, 1, 2], [0, 2, 3]], F = new qe(C, T, null, L);
12326
+ for (var u = new Cr(r), d = u.boundingBox(), p = d.min[0], _ = d.min[1], v = d.max[0], A = d.max[1], P = m.span(n, a, l), S = [], I = 0; I < P.length; ) {
12327
+ var k = P[I];
12328
+ ++I;
12329
+ var T = [[p, _, k], [v, _, k], [v, A, k], [p, A, k]], O = [[0, 0], [1, 0], [1, 1], [0, 1]], C = [[0, 1, 2], [0, 2, 3]], F = new qe(C, T, null, O);
12323
12330
  S.push(lt.meshes(r, F, u));
12324
12331
  }
12325
12332
  return S;
@@ -12336,25 +12343,25 @@ var Ah = { exports: {} };
12336
12343
  for (var _ = 0; _ < u.length; ) {
12337
12344
  var v = u[_];
12338
12345
  if (++_, v.adj == null) {
12339
- var w = lt.lookupAdjacentSegment(v, l, r.length);
12340
- w != null && w.adj == null && (v.adj = w, w.adj = v);
12346
+ var A = lt.lookupAdjacentSegment(v, l, r.length);
12347
+ A != null && A.adj == null && (v.adj = A, A.adj = v);
12341
12348
  }
12342
12349
  }
12343
- var I = u.filter(function(R) {
12350
+ var P = u.filter(function(R) {
12344
12351
  return R.adj == null;
12345
12352
  });
12346
- I.length == 0 && (I = u);
12347
- for (var S = [], P = 0, k = !1; I.length != 0; ) {
12348
- var T = I.pop();
12353
+ P.length == 0 && (P = u);
12354
+ for (var S = [], I = 0, k = !1; P.length != 0; ) {
12355
+ var T = P.pop();
12349
12356
  if (!T.visited) {
12350
- for (var L = [], C = T; C != null && !(C.visited || (C.visited = !0, C.opp.visited = !0, L.push(C), P += 2, C = C.opp.adj, C == T)); )
12357
+ for (var O = [], C = T; C != null && !(C.visited || (C.visited = !0, C.opp.visited = !0, O.push(C), I += 2, C = C.opp.adj, C == T)); )
12351
12358
  ;
12352
- L.length > 0 && (L.push(L[L.length - 1].opp), S.push(L));
12359
+ O.length > 0 && (O.push(O[O.length - 1].opp), S.push(O));
12353
12360
  }
12354
- if (I.length == 0 && u.length > 0 && (k || P < u.length)) {
12361
+ if (P.length == 0 && u.length > 0 && (k || I < u.length)) {
12355
12362
  k = !0;
12356
12363
  var F = u.pop();
12357
- I.push(F);
12364
+ P.push(F);
12358
12365
  }
12359
12366
  }
12360
12367
  return S;
@@ -12375,7 +12382,7 @@ var Ah = { exports: {} };
12375
12382
  a == null && (a = 1e-3), l != null ? l = l : l = new ir(r), u != null ? u = u : u = new Nr(n);
12376
12383
  var d = lt.boundingBoxTrees(l, u, a);
12377
12384
  return $.unique(d.map(function(p) {
12378
- var _ = p.item0, v = p.item1, w = $.first(_.knots), I = $.last(_.knots), S = (w + I) / 2, P = $.first(v.knotsU), k = $.last(v.knotsU), T = $.first(v.knotsV), L = $.last(v.knotsV), C = [(P + k) / 2, (T + L) / 2];
12385
+ var _ = p.item0, v = p.item1, A = $.first(_.knots), P = $.last(_.knots), S = (A + P) / 2, I = $.first(v.knotsU), k = $.last(v.knotsU), T = $.first(v.knotsV), O = $.last(v.knotsV), C = [(I + k) / 2, (T + O) / 2];
12379
12386
  return lt.curveAndSurfaceWithEstimate(_, v, [S].concat(C), a);
12380
12387
  }).filter(function(p) {
12381
12388
  return m.distSquared(p.curvePoint, p.surfacePoint) < a * a;
@@ -12385,21 +12392,21 @@ var Ah = { exports: {} };
12385
12392
  }, lt.curveAndSurfaceWithEstimate = function(r, n, a, l) {
12386
12393
  l == null && (l = 1e-3);
12387
12394
  var u = function(v) {
12388
- var w = N.rationalCurvePoint(r, v[0]), I = N.rationalSurfacePoint(n, v[1], v[2]), S = m.sub(w, I);
12395
+ var A = N.rationalCurvePoint(r, v[0]), P = N.rationalSurfacePoint(n, v[1], v[2]), S = m.sub(A, P);
12389
12396
  return m.dot(S, S);
12390
12397
  }, d = function(v) {
12391
- var w = N.rationalCurveDerivatives(r, v[0], 1), I = N.rationalSurfaceDerivatives(n, v[1], v[2], 1), S = m.sub(I[0][0], w[0]), P = m.mul(-1, w[1]), k = I[1][0], T = I[0][1];
12392
- return [2 * m.dot(P, S), 2 * m.dot(k, S), 2 * m.dot(T, S)];
12398
+ var A = N.rationalCurveDerivatives(r, v[0], 1), P = N.rationalSurfaceDerivatives(n, v[1], v[2], 1), S = m.sub(P[0][0], A[0]), I = m.mul(-1, A[1]), k = P[1][0], T = P[0][1];
12399
+ return [2 * m.dot(I, S), 2 * m.dot(k, S), 2 * m.dot(T, S)];
12393
12400
  }, p = Xe.uncmin(u, a, l * l, d), _ = p.solution;
12394
12401
  return new Gn(_[0], [_[1], _[2]], N.rationalCurvePoint(r, _[0]), N.rationalSurfacePoint(n, _[1], _[2]));
12395
12402
  }, lt.polylineAndMesh = function(r, n, a) {
12396
12403
  for (var l = lt.boundingBoxTrees(new or(r), new ar(n), a), u = [], d = 0; d < l.length; ) {
12397
12404
  var p = l[d];
12398
12405
  ++d;
12399
- var _ = p.item0, v = p.item1, w = lt.segmentWithTriangle(r.points[_], r.points[_ + 1], n.points, n.faces[v]);
12400
- if (w != null) {
12401
- var I = w.point, S = m.lerp(w.p, [r.params[_]], [r.params[_ + 1]])[0], P = re.triangleUVFromPoint(n, v, I);
12402
- u.push(new jn(I, S, P, _, v));
12406
+ var _ = p.item0, v = p.item1, A = lt.segmentWithTriangle(r.points[_], r.points[_ + 1], n.points, n.faces[v]);
12407
+ if (A != null) {
12408
+ var P = A.point, S = m.lerp(A.p, [r.params[_]], [r.params[_ + 1]])[0], I = re.triangleUVFromPoint(n, v, P);
12409
+ u.push(new jn(P, S, I, _, v));
12403
12410
  }
12404
12411
  }
12405
12412
  return u;
@@ -12410,21 +12417,21 @@ var Ah = { exports: {} };
12410
12417
  for (var d = []; l.length > 0; ) {
12411
12418
  var p = l.pop(), _ = u.pop();
12412
12419
  if (!(p.empty() || _.empty()) && p.boundingBox().intersects(_.boundingBox(), a)) {
12413
- var v = p.indivisible(a), w = _.indivisible(a);
12414
- if (v && w) {
12420
+ var v = p.indivisible(a), A = _.indivisible(a);
12421
+ if (v && A) {
12415
12422
  d.push(new ee(p.yield(), _.yield()));
12416
12423
  continue;
12417
- } else if (v && !w) {
12418
- var I = _.split();
12419
- l.push(p), u.push(I.item1), l.push(p), u.push(I.item0);
12424
+ } else if (v && !A) {
12425
+ var P = _.split();
12426
+ l.push(p), u.push(P.item1), l.push(p), u.push(P.item0);
12420
12427
  continue;
12421
- } else if (!v && w) {
12428
+ } else if (!v && A) {
12422
12429
  var S = p.split();
12423
12430
  l.push(S.item1), u.push(_), l.push(S.item0), u.push(_);
12424
12431
  continue;
12425
12432
  }
12426
- var P = p.split(), k = _.split();
12427
- l.push(P.item1), u.push(k.item1), l.push(P.item1), u.push(k.item0), l.push(P.item0), u.push(k.item1), l.push(P.item0), u.push(k.item0);
12433
+ var I = p.split(), k = _.split();
12434
+ l.push(I.item1), u.push(k.item1), l.push(I.item1), u.push(k.item0), l.push(I.item0), u.push(k.item1), l.push(I.item0), u.push(k.item0);
12428
12435
  }
12429
12436
  }
12430
12437
  return d;
@@ -12438,32 +12445,32 @@ var Ah = { exports: {} };
12438
12445
  return Math.abs(u.u0 - d.u0) < a * 5;
12439
12446
  });
12440
12447
  }, lt.curvesWithEstimate = function(r, n, a, l, u) {
12441
- var d = function(P) {
12442
- var k = N.rationalCurvePoint(r, P[0]), T = N.rationalCurvePoint(n, P[1]), L = m.sub(k, T);
12443
- return m.dot(L, L);
12444
- }, p = function(P) {
12445
- var k = N.rationalCurveDerivatives(r, P[0], 1), T = N.rationalCurveDerivatives(n, P[1], 1), L = m.sub(k[0], T[0]), C = k[1], F = m.mul(-1, T[1]);
12446
- return [2 * m.dot(C, L), 2 * m.dot(F, L)];
12447
- }, _ = Xe.uncmin(d, [a, l], u * u, p), v = _.solution[0], w = _.solution[1], I = N.rationalCurvePoint(r, v), S = N.rationalCurvePoint(n, w);
12448
- return new Hr(I, S, v, w);
12448
+ var d = function(I) {
12449
+ var k = N.rationalCurvePoint(r, I[0]), T = N.rationalCurvePoint(n, I[1]), O = m.sub(k, T);
12450
+ return m.dot(O, O);
12451
+ }, p = function(I) {
12452
+ var k = N.rationalCurveDerivatives(r, I[0], 1), T = N.rationalCurveDerivatives(n, I[1], 1), O = m.sub(k[0], T[0]), C = k[1], F = m.mul(-1, T[1]);
12453
+ return [2 * m.dot(C, O), 2 * m.dot(F, O)];
12454
+ }, _ = Xe.uncmin(d, [a, l], u * u, p), v = _.solution[0], A = _.solution[1], P = N.rationalCurvePoint(r, v), S = N.rationalCurvePoint(n, A);
12455
+ return new Hr(P, S, v, A);
12449
12456
  }, lt.triangles = function(r, n, a, l) {
12450
- var u = r.faces[n], d = a.faces[l], p = re.getTriangleNorm(r.points, u), _ = re.getTriangleNorm(a.points, d), v = r.points[u[0]], w = a.points[d[0]], I = lt.planes(v, p, w, _);
12451
- if (I == null) return null;
12452
- var S = lt.clipRayInCoplanarTriangle(I, r, n);
12453
- if (S == null) return null;
12454
- var P = lt.clipRayInCoplanarTriangle(I, a, l);
12457
+ var u = r.faces[n], d = a.faces[l], p = re.getTriangleNorm(r.points, u), _ = re.getTriangleNorm(a.points, d), v = r.points[u[0]], A = a.points[d[0]], P = lt.planes(v, p, A, _);
12455
12458
  if (P == null) return null;
12456
- var k = lt.mergeTriangleClipIntervals(S, P, r, n, a, l);
12459
+ var S = lt.clipRayInCoplanarTriangle(P, r, n);
12460
+ if (S == null) return null;
12461
+ var I = lt.clipRayInCoplanarTriangle(P, a, l);
12462
+ if (I == null) return null;
12463
+ var k = lt.mergeTriangleClipIntervals(S, I, r, n, a, l);
12457
12464
  return k == null ? null : new we(new Tr(k.min.uv0, k.min.uv1, k.min.point, n, l), new Tr(k.max.uv0, k.max.uv1, k.max.point, n, l));
12458
12465
  }, lt.clipRayInCoplanarTriangle = function(r, n, a) {
12459
- for (var l = n.faces[a], u = [n.points[l[0]], n.points[l[1]], n.points[l[2]]], d = [n.uvs[l[0]], n.uvs[l[1]], n.uvs[l[2]]], p = [m.sub(d[1], d[0]), m.sub(d[2], d[1]), m.sub(d[0], d[2])], _ = [m.sub(u[1], u[0]), m.sub(u[2], u[1]), m.sub(u[0], u[2])], v = _.map(m.normalized), w = _.map(m.norm), I = null, S = null, P = 0; P < 3; ) {
12460
- var k = P++, T = u[k], L = v[k], C = lt.rays(T, L, r.origin, r.dir);
12466
+ for (var l = n.faces[a], u = [n.points[l[0]], n.points[l[1]], n.points[l[2]]], d = [n.uvs[l[0]], n.uvs[l[1]], n.uvs[l[2]]], p = [m.sub(d[1], d[0]), m.sub(d[2], d[1]), m.sub(d[0], d[2])], _ = [m.sub(u[1], u[0]), m.sub(u[2], u[1]), m.sub(u[0], u[2])], v = _.map(m.normalized), A = _.map(m.norm), P = null, S = null, I = 0; I < 3; ) {
12467
+ var k = I++, T = u[k], O = v[k], C = lt.rays(T, O, r.origin, r.dir);
12461
12468
  if (C != null) {
12462
12469
  var F = C.u0, R = C.u1;
12463
- F < -rt.EPSILON || F > w[k] + rt.EPSILON || ((I == null || R < I.u) && (I = new vn(R, m.onRay(r.origin, r.dir, R), m.onRay(d[k], p[k], F / w[k]))), (S == null || R > S.u) && (S = new vn(R, m.onRay(r.origin, r.dir, R), m.onRay(d[k], p[k], F / w[k]))));
12470
+ F < -rt.EPSILON || F > A[k] + rt.EPSILON || ((P == null || R < P.u) && (P = new vn(R, m.onRay(r.origin, r.dir, R), m.onRay(d[k], p[k], F / A[k]))), (S == null || R > S.u) && (S = new vn(R, m.onRay(r.origin, r.dir, R), m.onRay(d[k], p[k], F / A[k]))));
12464
12471
  }
12465
12472
  }
12466
- return S == null || I == null ? null : new we(I, S);
12473
+ return S == null || P == null ? null : new we(P, S);
12467
12474
  }, lt.mergeTriangleClipIntervals = function(r, n, a, l, u, d) {
12468
12475
  if (n.min.u > r.max.u + rt.EPSILON || r.min.u > n.max.u + rt.EPSILON) return null;
12469
12476
  var p;
@@ -12477,44 +12484,44 @@ var Ah = { exports: {} };
12477
12484
  if (m.dot(u, u) < rt.EPSILON) return null;
12478
12485
  var d = 0, p = Math.abs(u[0]), _ = Math.abs(u[1]), v = Math.abs(u[2]);
12479
12486
  _ > p && (d = 1, p = _), v > p && (d = 2, p = v);
12480
- var w, I, S, P;
12481
- d == 0 ? (w = n[1], I = n[2], S = l[1], P = l[2]) : d == 1 ? (w = n[0], I = n[2], S = l[0], P = l[2]) : (w = n[0], I = n[1], S = l[0], P = l[1]);
12482
- var k = -m.dot(r, n), T = -m.dot(a, l), L = w * P - I * S, C = (I * T - k * P) / L, F = (k * S - w * T) / L, R;
12487
+ var A, P, S, I;
12488
+ d == 0 ? (A = n[1], P = n[2], S = l[1], I = l[2]) : d == 1 ? (A = n[0], P = n[2], S = l[0], I = l[2]) : (A = n[0], P = n[1], S = l[0], I = l[1]);
12489
+ var k = -m.dot(r, n), T = -m.dot(a, l), O = A * I - P * S, C = (P * T - k * I) / O, F = (k * S - A * T) / O, R;
12483
12490
  return d == 0 ? R = [0, C, F] : d == 1 ? R = [C, 0, F] : R = [C, F, 0], new _n(R, m.normalized(u));
12484
12491
  }, lt.threePlanes = function(r, n, a, l, u, d) {
12485
12492
  var p = m.cross(a, u), _ = m.dot(r, p);
12486
12493
  if (Math.abs(_) < rt.EPSILON) return null;
12487
- var v = m.sub(m.mul(d, a), m.mul(l, u)), w = m.add(m.mul(n, p), m.cross(r, v));
12488
- return m.mul(1 / _, w);
12494
+ var v = m.sub(m.mul(d, a), m.mul(l, u)), A = m.add(m.mul(n, p), m.cross(r, v));
12495
+ return m.mul(1 / _, A);
12489
12496
  }, lt.polylines = function(r, n, a) {
12490
12497
  for (var l = lt.boundingBoxTrees(new or(r), new or(n), a), u = [], d = 0; d < l.length; ) {
12491
12498
  var p = l[d];
12492
12499
  ++d;
12493
- var _ = p.item0, v = p.item1, w = lt.segments(r.points[_], r.points[_ + 1], n.points[v], n.points[v + 1], a);
12494
- w != null && (w.u0 = m.lerp(w.u0, [r.params[_]], [r.params[_ + 1]])[0], w.u1 = m.lerp(w.u1, [n.params[v]], [n.params[v + 1]])[0], u.push(w));
12500
+ var _ = p.item0, v = p.item1, A = lt.segments(r.points[_], r.points[_ + 1], n.points[v], n.points[v + 1], a);
12501
+ A != null && (A.u0 = m.lerp(A.u0, [r.params[_]], [r.params[_ + 1]])[0], A.u1 = m.lerp(A.u1, [n.params[v]], [n.params[v + 1]])[0], u.push(A));
12495
12502
  }
12496
12503
  return u;
12497
12504
  }, lt.segments = function(r, n, a, l, u) {
12498
- var d = m.sub(n, r), p = Math.sqrt(m.dot(d, d)), _ = m.mul(1 / p, d), v = m.sub(l, a), w = Math.sqrt(m.dot(v, v)), I = m.mul(1 / w, v), S = lt.rays(r, _, a, I);
12505
+ var d = m.sub(n, r), p = Math.sqrt(m.dot(d, d)), _ = m.mul(1 / p, d), v = m.sub(l, a), A = Math.sqrt(m.dot(v, v)), P = m.mul(1 / A, v), S = lt.rays(r, _, a, P);
12499
12506
  if (S != null) {
12500
- var P = Math.min(Math.max(0, S.u0 / p), 1), k = Math.min(Math.max(0, S.u1 / w), 1), T = m.onRay(r, d, P), L = m.onRay(a, v, k), C = m.distSquared(T, L);
12501
- if (C < u * u) return new Hr(T, L, P, k);
12507
+ var I = Math.min(Math.max(0, S.u0 / p), 1), k = Math.min(Math.max(0, S.u1 / A), 1), T = m.onRay(r, d, I), O = m.onRay(a, v, k), C = m.distSquared(T, O);
12508
+ if (C < u * u) return new Hr(T, O, I, k);
12502
12509
  }
12503
12510
  return null;
12504
12511
  }, lt.rays = function(r, n, a, l) {
12505
- var u = m.dot(n, l), d = m.dot(n, a), p = m.dot(n, r), _ = m.dot(l, a), v = m.dot(l, r), w = m.dot(n, n), I = m.dot(l, l), S = w * I - u * u;
12512
+ var u = m.dot(n, l), d = m.dot(n, a), p = m.dot(n, r), _ = m.dot(l, a), v = m.dot(l, r), A = m.dot(n, n), P = m.dot(l, l), S = A * P - u * u;
12506
12513
  if (Math.abs(S) < rt.EPSILON) return null;
12507
- var P = u * (d - p) - w * (_ - v), k = P / S, T = (d - p + k * u) / w, L = m.onRay(r, n, T), C = m.onRay(a, l, k);
12508
- return new Hr(L, C, T, k);
12514
+ var I = u * (d - p) - A * (_ - v), k = I / S, T = (d - p + k * u) / A, O = m.onRay(r, n, T), C = m.onRay(a, l, k);
12515
+ return new Hr(O, C, T, k);
12509
12516
  }, lt.segmentWithTriangle = function(r, n, a, l) {
12510
- var u = a[l[0]], d = a[l[1]], p = a[l[2]], _ = m.sub(d, u), v = m.sub(p, u), w = m.cross(_, v), I = m.sub(n, r), S = m.sub(r, u), P = -m.dot(w, S), k = m.dot(w, I);
12517
+ var u = a[l[0]], d = a[l[1]], p = a[l[2]], _ = m.sub(d, u), v = m.sub(p, u), A = m.cross(_, v), P = m.sub(n, r), S = m.sub(r, u), I = -m.dot(A, S), k = m.dot(A, P);
12511
12518
  if (Math.abs(k) < rt.EPSILON) return null;
12512
- var T = P / k;
12519
+ var T = I / k;
12513
12520
  if (T < 0 || T > 1) return null;
12514
- var L = m.add(r, m.mul(T, I)), C = m.dot(_, v), F = m.dot(_, _), R = m.dot(v, v), U = m.sub(L, u), V = m.dot(U, _), q = m.dot(U, v), J = C * C - F * R;
12521
+ var O = m.add(r, m.mul(T, P)), C = m.dot(_, v), F = m.dot(_, _), R = m.dot(v, v), U = m.sub(O, u), V = m.dot(U, _), q = m.dot(U, v), J = C * C - F * R;
12515
12522
  if (Math.abs(J) < rt.EPSILON) return null;
12516
12523
  var H = (C * q - R * V) / J, G = (C * V - F * q) / J;
12517
- return H > 1 + rt.EPSILON || G > 1 + rt.EPSILON || G < -rt.EPSILON || H < -rt.EPSILON || H + G > 1 + rt.EPSILON ? null : new Hn(L, H, G, T);
12524
+ return H > 1 + rt.EPSILON || G > 1 + rt.EPSILON || G < -rt.EPSILON || H < -rt.EPSILON || H + G > 1 + rt.EPSILON ? null : new Hn(O, H, G, T);
12518
12525
  }, lt.segmentAndPlane = function(r, n, a, l) {
12519
12526
  var u = m.dot(l, m.sub(n, r));
12520
12527
  if (Math.abs(u) < rt.EPSILON) return null;
@@ -12525,7 +12532,7 @@ var Ah = { exports: {} };
12525
12532
  };
12526
12533
  b["verb.eval.Make"] = pt, pt.__name__ = ["verb", "eval", "Make"], pt.rationalTranslationalSurface = function(r, n) {
12527
12534
  for (var a = N.rationalCurvePoint(n, $.first(n.knots)), l = $.first(n.knots), u = $.last(n.knots), d = 2 * n.controlPoints.length, p = (u - l) / (d - 1), _ = [], v = 0; v < d; ) {
12528
- var w = v++, I = m.sub(N.rationalCurvePoint(n, l + w * p), a), S = ft.rationalCurveTransform(r, [[1, 0, 0, I[0]], [0, 1, 0, I[1]], [0, 0, 1, I[2]], [0, 0, 0, 1]]);
12535
+ var A = v++, P = m.sub(N.rationalCurvePoint(n, l + A * p), a), S = ft.rationalCurveTransform(r, [[1, 0, 0, P[0]], [0, 1, 0, P[1]], [0, 0, 1, P[2]], [0, 0, 0, 1]]);
12529
12536
  _.push(S);
12530
12537
  }
12531
12538
  return pt.loftedSurface(_);
@@ -12539,35 +12546,35 @@ var Ah = { exports: {} };
12539
12546
  var u;
12540
12547
  a ? u = r.degreeV : u = r.degreeU;
12541
12548
  for (var d = yt.knotMultiplicities(l), p = -1, _ = 0, v = d.length; _ < v; ) {
12542
- var w = _++;
12543
- if (Math.abs(n - d[w].knot) < rt.EPSILON) {
12544
- p = w;
12549
+ var A = _++;
12550
+ if (Math.abs(n - d[A].knot) < rt.EPSILON) {
12551
+ p = A;
12545
12552
  break;
12546
12553
  }
12547
12554
  }
12548
- var I = u + 1;
12549
- p >= 0 && (I = I - d[p].mult);
12555
+ var P = u + 1;
12556
+ p >= 0 && (P = P - d[p].mult);
12550
12557
  var S;
12551
- I > 0 ? S = ft.surfaceKnotRefine(r, m.rep(I, n), a) : S = r;
12552
- var P = N.knotSpan(u, n, l);
12553
- return Math.abs(n - $.first(l)) < rt.EPSILON ? P = 0 : Math.abs(n - $.last(l)) < rt.EPSILON && (P = (a ? S.controlPoints[0].length : S.controlPoints.length) - 1), a ? new Gt(S.degreeU, S.knotsU, function(k) {
12554
- for (var T, L = [], C = 0, F = S.controlPoints; C < F.length; ) {
12558
+ P > 0 ? S = ft.surfaceKnotRefine(r, m.rep(P, n), a) : S = r;
12559
+ var I = N.knotSpan(u, n, l);
12560
+ return Math.abs(n - $.first(l)) < rt.EPSILON ? I = 0 : Math.abs(n - $.last(l)) < rt.EPSILON && (I = (a ? S.controlPoints[0].length : S.controlPoints.length) - 1), a ? new Gt(S.degreeU, S.knotsU, function(k) {
12561
+ for (var T, O = [], C = 0, F = S.controlPoints; C < F.length; ) {
12555
12562
  var R = F[C];
12556
- ++C, L.push(R[P]);
12563
+ ++C, O.push(R[I]);
12557
12564
  }
12558
- return T = L, T;
12559
- }()) : new Gt(S.degreeV, S.knotsV, S.controlPoints[P]);
12565
+ return T = O, T;
12566
+ }()) : new Gt(S.degreeV, S.knotsV, S.controlPoints[I]);
12560
12567
  }, pt.loftedSurface = function(r, n) {
12561
12568
  r = ft.unifyCurveKnotVectors(r);
12562
12569
  var a = r[0].degree;
12563
12570
  n == null && (n = 3), n > r.length - 1 && (n = r.length - 1);
12564
12571
  for (var l = r[0].knots, u = [], d = [], p = 0, _ = r[0].controlPoints.length; p < _; ) {
12565
- var v = [p++], w = r.map(/* @__PURE__ */ function(S) {
12566
- return function(P) {
12567
- return P.controlPoints[S[0]];
12572
+ var v = [p++], A = r.map(/* @__PURE__ */ function(S) {
12573
+ return function(I) {
12574
+ return I.controlPoints[S[0]];
12568
12575
  };
12569
- }(v)), I = pt.rationalInterpCurve(w, n, !0);
12570
- d.push(I.controlPoints), u = I.knots;
12576
+ }(v)), P = pt.rationalInterpCurve(A, n, !0);
12577
+ d.push(P.controlPoints), u = P.knots;
12571
12578
  }
12572
12579
  return new te(a, n, l, u, d);
12573
12580
  }, pt.clonedCurve = function(r) {
@@ -12583,11 +12590,11 @@ var Ah = { exports: {} };
12583
12590
  }, pt.fourPointSurface = function(r, n, a, l, u) {
12584
12591
  u == null && (u = 3);
12585
12592
  for (var d = u, p = [], _ = 0, v = u + 1; _ < v; ) {
12586
- for (var w = _++, I = [], S = 0, P = u + 1; S < P; ) {
12587
- var k = S++, T = 1 - w / d, L = m.lerp(T, r, n), C = m.lerp(T, l, a), F = m.lerp(1 - k / d, L, C);
12588
- F.push(1), I.push(F);
12593
+ for (var A = _++, P = [], S = 0, I = u + 1; S < I; ) {
12594
+ var k = S++, T = 1 - A / d, O = m.lerp(T, r, n), C = m.lerp(T, l, a), F = m.lerp(1 - k / d, O, C);
12595
+ F.push(1), P.push(F);
12589
12596
  }
12590
- p.push(I);
12597
+ p.push(P);
12591
12598
  }
12592
12599
  var R = m.rep(u + 1, 0), U = m.rep(u + 1, 1);
12593
12600
  return new te(u, u, R.concat(U), R.concat(U), p);
@@ -12596,15 +12603,15 @@ var Ah = { exports: {} };
12596
12603
  n = m.normalized(n), a = m.normalized(a), u < l && (u = 2 * Math.PI + l);
12597
12604
  var _ = u - l, v = 0;
12598
12605
  _ <= Math.PI / 2 ? v = 1 : _ <= Math.PI ? v = 2 : _ <= 3 * Math.PI / 2 ? v = 3 : v = 4;
12599
- var w = _ / v, I = Math.cos(w / 2), S = m.add(r, m.add(m.mul(d * Math.cos(l), n), m.mul(p * Math.sin(l), a))), P = m.sub(m.mul(Math.cos(l), a), m.mul(Math.sin(l), n)), k = [], T = m.zeros1d(2 * v + 3), L = 0, C = l, F = m.zeros1d(v * 2);
12606
+ var A = _ / v, P = Math.cos(A / 2), S = m.add(r, m.add(m.mul(d * Math.cos(l), n), m.mul(p * Math.sin(l), a))), I = m.sub(m.mul(Math.cos(l), a), m.mul(Math.sin(l), n)), k = [], T = m.zeros1d(2 * v + 3), O = 0, C = l, F = m.zeros1d(v * 2);
12600
12607
  k[0] = S, F[0] = 1;
12601
12608
  for (var R = 1, U = v + 1; R < U; ) {
12602
12609
  var V = R++;
12603
- C += w;
12610
+ C += A;
12604
12611
  var q = m.add(r, m.add(m.mul(d * Math.cos(C), n), m.mul(p * Math.sin(C), a)));
12605
- F[L + 2] = 1, k[L + 2] = q;
12606
- var J = m.sub(m.mul(Math.cos(C), a), m.mul(Math.sin(C), n)), H = lt.rays(S, m.mul(1 / m.norm(P), P), q, m.mul(1 / m.norm(J), J)), G = m.add(S, m.mul(H.u0, P));
12607
- F[L + 1] = I, k[L + 1] = G, L += 2, V < v && (S = q, P = J);
12612
+ F[O + 2] = 1, k[O + 2] = q;
12613
+ var J = m.sub(m.mul(Math.cos(C), a), m.mul(Math.sin(C), n)), H = lt.rays(S, m.mul(1 / m.norm(I), I), q, m.mul(1 / m.norm(J), J)), G = m.add(S, m.mul(H.u0, I));
12614
+ F[O + 1] = P, k[O + 1] = G, O += 2, V < v && (S = q, I = J);
12608
12615
  }
12609
12616
  for (var K = 2 * v + 1, tt = 0; tt < 3; ) {
12610
12617
  var et = tt++;
@@ -12630,12 +12637,12 @@ var Ah = { exports: {} };
12630
12637
  a += m.dist(r[d], r[d + 1]), n.push(a);
12631
12638
  }
12632
12639
  n.push(a), n = m.mul(1 / a, n);
12633
- for (var p, _ = [], v = 0, w = r.length; v < w; )
12640
+ for (var p, _ = [], v = 0, A = r.length; v < A; )
12634
12641
  v++, _.push(1);
12635
12642
  return p = _, new Gt(1, n, N.homogenize1d(r.slice(0), p));
12636
12643
  }, pt.extrudedSurface = function(r, n, a) {
12637
- for (var l = [[], [], []], u = [[], [], []], d = N.dehomogenize1d(a.controlPoints), p = N.weight1d(a.controlPoints), _ = m.mul(n, r), v = m.mul(0.5 * n, r), w = 0, I = d.length; w < I; ) {
12638
- var S = w++;
12644
+ for (var l = [[], [], []], u = [[], [], []], d = N.dehomogenize1d(a.controlPoints), p = N.weight1d(a.controlPoints), _ = m.mul(n, r), v = m.mul(0.5 * n, r), A = 0, P = d.length; A < P; ) {
12645
+ var S = A++;
12639
12646
  l[2][S] = d[S], l[1][S] = m.add(v, d[S]), l[0][S] = m.add(_, d[S]), u[0][S] = p[S], u[1][S] = p[S], u[2][S] = p[S];
12640
12647
  }
12641
12648
  return new te(2, a.degree, [0, 0, 0, 1, 1, 1], a.knots, N.homogenize2d(l, u));
@@ -12645,13 +12652,13 @@ var Ah = { exports: {} };
12645
12652
  }, pt.revolvedSurface = function(r, n, a, l) {
12646
12653
  var u = N.dehomogenize1d(r.controlPoints), d = N.weight1d(r.controlPoints), p, _;
12647
12654
  l <= Math.PI / 2 ? (p = 1, _ = m.zeros1d(6 + 2 * (p - 1))) : l <= Math.PI ? (p = 2, _ = m.zeros1d(6 + 2 * (p - 1)), _[3] = _[4] = 0.5) : l <= 3 * Math.PI / 2 ? (p = 3, _ = m.zeros1d(6 + 2 * (p - 1)), _[3] = _[4] = 0.3333333333333333, _[5] = _[6] = 0.6666666666666666) : (p = 4, _ = m.zeros1d(6 + 2 * (p - 1)), _[3] = _[4] = 0.25, _[5] = _[6] = 0.5, _[7] = _[8] = 0.75);
12648
- for (var v = l / p, w = 3 + 2 * (p - 1), I = 0; I < 3; ) {
12649
- var S = I++;
12650
- _[S] = 0, _[w + S] = 1;
12655
+ for (var v = l / p, A = 3 + 2 * (p - 1), P = 0; P < 3; ) {
12656
+ var S = P++;
12657
+ _[S] = 0, _[A + S] = 1;
12651
12658
  }
12652
- for (var P = Math.cos(v / 2), k = 0, T = m.zeros1d(p + 1), L = m.zeros1d(p + 1), C = m.zeros3d(2 * p + 1, u.length, 3), F = m.zeros2d(2 * p + 1, u.length), R = 1, U = p + 1; R < U; ) {
12659
+ for (var I = Math.cos(v / 2), k = 0, T = m.zeros1d(p + 1), O = m.zeros1d(p + 1), C = m.zeros3d(2 * p + 1, u.length, 3), F = m.zeros2d(2 * p + 1, u.length), R = 1, U = p + 1; R < U; ) {
12653
12660
  var V = R++;
12654
- k += v, L[V] = Math.cos(k), T[V] = Math.sin(k);
12661
+ k += v, O[V] = Math.cos(k), T[V] = Math.sin(k);
12655
12662
  }
12656
12663
  for (var q = 0, J = u.length; q < J; ) {
12657
12664
  var H = q++, G = Ne.rayClosestPoint(u[H], n, a), K = m.sub(u[H], G), tt = m.norm(K), et = m.cross(a, K);
@@ -12660,14 +12667,14 @@ var Ah = { exports: {} };
12660
12667
  F[0][H] = d[H];
12661
12668
  for (var ht = et, at = 0, ct = 1, nt = p + 1; ct < nt; ) {
12662
12669
  var mt = ct++, X;
12663
- tt == 0 ? X = G : X = m.add(G, m.add(m.mul(tt * L[mt], K), m.mul(tt * T[mt], et))), C[at + 2][H] = X, F[at + 2][H] = d[H];
12664
- var gt = m.sub(m.mul(L[mt], et), m.mul(T[mt], K));
12670
+ tt == 0 ? X = G : X = m.add(G, m.add(m.mul(tt * O[mt], K), m.mul(tt * T[mt], et))), C[at + 2][H] = X, F[at + 2][H] = d[H];
12671
+ var gt = m.sub(m.mul(O[mt], et), m.mul(T[mt], K));
12665
12672
  if (tt == 0) C[at + 1][H] = G;
12666
12673
  else {
12667
- var It = lt.rays(it, m.mul(1 / m.norm(ht), ht), X, m.mul(1 / m.norm(gt), gt)), jt = m.add(it, m.mul(It.u0, ht));
12674
+ var Pt = lt.rays(it, m.mul(1 / m.norm(ht), ht), X, m.mul(1 / m.norm(gt), gt)), jt = m.add(it, m.mul(Pt.u0, ht));
12668
12675
  C[at + 1][H] = jt;
12669
12676
  }
12670
- F[at + 1][H] = P * d[H], at += 2, mt < p && (it = X, ht = gt);
12677
+ F[at + 1][H] = I * d[H], at += 2, mt < p && (it = X, ht = gt);
12671
12678
  }
12672
12679
  }
12673
12680
  return new te(2, r.degree, _, r.knots, N.homogenize2d(C, F));
@@ -12675,19 +12682,19 @@ var Ah = { exports: {} };
12675
12682
  var u = pt.arc(r, m.mul(-1, n), a, l, 0, Math.PI);
12676
12683
  return pt.revolvedSurface(u, r, n, 2 * Math.PI);
12677
12684
  }, pt.conicalSurface = function(r, n, a, l, u) {
12678
- var d = 2 * Math.PI, p = 1, _ = [m.add(a, m.mul(l, r)), m.add(a, m.mul(u, n))], v = [0, 0, 1, 1], w = [1, 1], I = new Gt(p, v, N.homogenize1d(_, w));
12679
- return pt.revolvedSurface(I, a, r, d);
12685
+ var d = 2 * Math.PI, p = 1, _ = [m.add(a, m.mul(l, r)), m.add(a, m.mul(u, n))], v = [0, 0, 1, 1], A = [1, 1], P = new Gt(p, v, N.homogenize1d(_, A));
12686
+ return pt.revolvedSurface(P, a, r, d);
12680
12687
  }, pt.rationalInterpCurve = function(r, n, a, l, u) {
12681
12688
  if (a == null && (a = !1), n == null && (n = 3), r.length < n + 1) throw new Q("You need to supply at least degree + 1 points! You only supplied " + r.length + " points.");
12682
12689
  for (var d = [0], p = 1, _ = r.length; p < _; ) {
12683
- var v = p++, w = m.norm(m.sub(r[v], r[v - 1])), I = d[d.length - 1];
12684
- d.push(I + w);
12690
+ var v = p++, A = m.norm(m.sub(r[v], r[v - 1])), P = d[d.length - 1];
12691
+ d.push(P + A);
12685
12692
  }
12686
- for (var S = d[d.length - 1], P = 0, k = d.length; P < k; ) {
12687
- var T = P++;
12693
+ for (var S = d[d.length - 1], I = 0, k = d.length; I < k; ) {
12694
+ var T = I++;
12688
12695
  d[T] = d[T] / S;
12689
12696
  }
12690
- var L = m.rep(n + 1, 0), C = l != null && u != null, F;
12697
+ var O = m.rep(n + 1, 0), C = l != null && u != null, F;
12691
12698
  C ? F = 0 : F = 1;
12692
12699
  var R;
12693
12700
  C ? R = d.length - n + 1 : R = d.length - n;
@@ -12696,9 +12703,9 @@ var Ah = { exports: {} };
12696
12703
  var H = J++;
12697
12704
  q += d[V + H];
12698
12705
  }
12699
- L.push(1 / n * q);
12706
+ O.push(1 / n * q);
12700
12707
  }
12701
- var G = L.concat(m.rep(n + 1, 1)), K = [], tt;
12708
+ var G = O.concat(m.rep(n + 1, 1)), K = [], tt;
12702
12709
  C ? tt = r.length + 1 : tt = r.length - 1;
12703
12710
  var et;
12704
12711
  C ? et = r.length - (n - 1) : et = r.length - (n + 1);
@@ -12709,8 +12716,8 @@ var Ah = { exports: {} };
12709
12716
  K.push(mt.concat(ct).concat(X));
12710
12717
  }
12711
12718
  if (C) {
12712
- var gt = K[0].length - 2, It = [-1, 1].concat(m.zeros1d(gt)), jt = m.zeros1d(gt).concat([-1, 1]);
12713
- $.spliceAndInsert(K, 1, 0, It), $.spliceAndInsert(K, K.length - 1, 0, jt);
12719
+ var gt = K[0].length - 2, Pt = [-1, 1].concat(m.zeros1d(gt)), jt = m.zeros1d(gt).concat([-1, 1]);
12720
+ $.spliceAndInsert(K, 1, 0, Pt), $.spliceAndInsert(K, K.length - 1, 0, jt);
12714
12721
  }
12715
12722
  for (var Xt = r[0].length, Dt = [], Kt = (1 - G[G.length - n - 2]) / n, Ae = G[n + 1] / n, We = 0; We < Xt; ) {
12716
12723
  var _e = [We++], ge;
@@ -12770,20 +12777,20 @@ var Ah = { exports: {} };
12770
12777
  ++_, p.push(new we($.first(v.knots), $.last(v.knots)));
12771
12778
  }
12772
12779
  d = p;
12773
- for (var w = 0, I = r.length; w < I; ) {
12774
- var S = w++, P = [d[S].min];
12780
+ for (var A = 0, P = r.length; A < P; ) {
12781
+ var S = A++, I = [d[S].min];
12775
12782
  r[S].knots = r[S].knots.map(/* @__PURE__ */ function(G) {
12776
12783
  return function(K) {
12777
12784
  return K - G[0];
12778
12785
  };
12779
- }(P));
12786
+ }(I));
12780
12787
  }
12781
12788
  for (var k = d.map(function(G) {
12782
12789
  return G.max - G.min;
12783
12790
  }), T = z.fold(k, function(G, K) {
12784
12791
  return Math.max(G, K);
12785
- }, 0), L = 0, C = r.length; L < C; ) {
12786
- var F = L++, R = [T / k[F]];
12792
+ }, 0), O = 0, C = r.length; O < C; ) {
12793
+ var F = O++, R = [T / k[F]];
12787
12794
  r[F].knots = r[F].knots.map(/* @__PURE__ */ function(G) {
12788
12795
  return function(K) {
12789
12796
  return K * G[0];
@@ -12803,7 +12810,7 @@ var Ah = { exports: {} };
12803
12810
  return r > n ? r : n;
12804
12811
  }, ft.curveElevateDegree = function(r, n) {
12805
12812
  if (n <= r.degree) return r;
12806
- var a = r.knots.length - r.degree - 2, l = r.degree, u = r.knots, d = r.controlPoints, p = n - r.degree, _ = r.controlPoints[0].length, v = m.zeros2d(l + p + 1, l + 1), w = [], I = [], S = [], P = a + l + 1, k = n, T = Math.floor(k / 2), L = [], C = [];
12813
+ var a = r.knots.length - r.degree - 2, l = r.degree, u = r.knots, d = r.controlPoints, p = n - r.degree, _ = r.controlPoints[0].length, v = m.zeros2d(l + p + 1, l + 1), A = [], P = [], S = [], I = a + l + 1, k = n, T = Math.floor(k / 2), O = [], C = [];
12807
12814
  v[0][0] = 1, v[k][l] = 1;
12808
12815
  for (var F = 1, R = T + 1; F < R; )
12809
12816
  for (var U = F++, V = 1 / Ft.get(k, U), q = ft.imin(l, U), J = ft.imax(0, U - p), H = q + 1; J < H; ) {
@@ -12815,86 +12822,86 @@ var Ah = { exports: {} };
12815
12822
  var at = it++;
12816
12823
  v[tt][at] = v[k - tt][l - at];
12817
12824
  }
12818
- var ct = k + 1, nt = -1, mt = l, X = l + 1, gt = 1, It = u[0];
12819
- L[0] = d[0];
12825
+ var ct = k + 1, nt = -1, mt = l, X = l + 1, gt = 1, Pt = u[0];
12826
+ O[0] = d[0];
12820
12827
  for (var jt = 0, Xt = k + 1; jt < Xt; ) {
12821
12828
  var Dt = jt++;
12822
- C[Dt] = It;
12829
+ C[Dt] = Pt;
12823
12830
  }
12824
12831
  for (var Kt = 0, Ae = l + 1; Kt < Ae; ) {
12825
12832
  var We = Kt++;
12826
- w[We] = d[We];
12833
+ A[We] = d[We];
12827
12834
  }
12828
- for (; X < P; ) {
12829
- for (var _e = X; X < P && u[X] == u[X + 1]; ) X = X + 1;
12835
+ for (; X < I; ) {
12836
+ for (var _e = X; X < I && u[X] == u[X + 1]; ) X = X + 1;
12830
12837
  var ge = X - _e + 1, Se = u[X], Le = nt;
12831
12838
  nt = l - ge;
12832
12839
  var $e;
12833
12840
  Le > 0 ? $e = Math.floor((Le + 2) / 2) : $e = 1;
12834
12841
  var lr;
12835
12842
  if (nt > 0 ? lr = Math.floor(k - (nt + 1) / 2) : lr = k, nt > 0) {
12836
- for (var Ze = Se - It, Qe = [], Je = l; Je > ge; )
12837
- Qe[Je - ge - 1] = Ze / (u[mt + Je] - It), Je--;
12838
- for (var dr = 1, Pn = nt + 1; dr < Pn; ) {
12843
+ for (var Ze = Se - Pt, Qe = [], Je = l; Je > ge; )
12844
+ Qe[Je - ge - 1] = Ze / (u[mt + Je] - Pt), Je--;
12845
+ for (var dr = 1, In = nt + 1; dr < In; ) {
12839
12846
  for (var qr = dr++, zh = nt - qr, ci = ge + qr, Xr = l; Xr >= ci; )
12840
- w[Xr] = m.add(m.mul(Qe[Xr - ci], w[Xr]), m.mul(1 - Qe[Xr - ci], w[Xr - 1])), Xr--;
12841
- S[zh] = w[l];
12847
+ A[Xr] = m.add(m.mul(Qe[Xr - ci], A[Xr]), m.mul(1 - Qe[Xr - ci], A[Xr - 1])), Xr--;
12848
+ S[zh] = A[l];
12842
12849
  }
12843
12850
  }
12844
12851
  for (var ao = $e, Rh = k + 1; ao < Rh; ) {
12845
12852
  var En = ao++;
12846
- I[En] = m.zeros1d(_);
12853
+ P[En] = m.zeros1d(_);
12847
12854
  for (var Fh = ft.imin(l, En), oo = ft.imax(0, En - p), Bh = Fh + 1; oo < Bh; ) {
12848
12855
  var lo = oo++;
12849
- I[En] = m.add(I[En], m.mul(v[En][lo], w[lo]));
12856
+ P[En] = m.add(P[En], m.mul(v[En][lo], A[lo]));
12850
12857
  }
12851
12858
  }
12852
12859
  if (Le > 1)
12853
- for (var di = ct - 2, mi = ct, ho = Se - It, Dh = (Se - C[ct - 1]) / ho, uo = 1; uo < Le; ) {
12860
+ for (var di = ct - 2, mi = ct, ho = Se - Pt, Dh = (Se - C[ct - 1]) / ho, uo = 1; uo < Le; ) {
12854
12861
  for (var pi = uo++, mr = di, Kr = mi, Br = Kr - ct + 1; Kr - mr > pi; ) {
12855
12862
  if (mr < gt) {
12856
- var Uh = (Se - C[mr]) / (It - C[mr]);
12857
- L[mr] = m.lerp(Uh, L[mr], L[mr - 1]);
12863
+ var Uh = (Se - C[mr]) / (Pt - C[mr]);
12864
+ O[mr] = m.lerp(Uh, O[mr], O[mr - 1]);
12858
12865
  }
12859
12866
  if (Kr >= $e) {
12860
12867
  if (Kr - pi <= ct - k + Le) {
12861
12868
  var Vh = (Se - C[Kr - pi]) / ho;
12862
- I[Br] = m.lerp(Vh, I[Br], I[Br + 1]);
12869
+ P[Br] = m.lerp(Vh, P[Br], P[Br + 1]);
12863
12870
  }
12864
- } else I[Br] = m.lerp(Dh, I[Br], I[Br + 1]);
12871
+ } else P[Br] = m.lerp(Dh, P[Br], P[Br + 1]);
12865
12872
  mr = mr + 1, Kr = Kr - 1, Br = Br - 1;
12866
12873
  }
12867
12874
  di = di - 1, mi = mi + 1;
12868
12875
  }
12869
12876
  if (mt != l)
12870
12877
  for (var co = 0, Gh = k - Le; co < Gh; )
12871
- co++, C[ct] = It, ct = ct + 1;
12878
+ co++, C[ct] = Pt, ct = ct + 1;
12872
12879
  for (var mo = $e, jh = lr + 1; mo < jh; ) {
12873
12880
  var Wh = mo++;
12874
- L[gt] = I[Wh], gt = gt + 1;
12881
+ O[gt] = P[Wh], gt = gt + 1;
12875
12882
  }
12876
- if (X < P) {
12883
+ if (X < I) {
12877
12884
  for (var po = 0; po < nt; ) {
12878
12885
  var go = po++;
12879
- w[go] = S[go];
12886
+ A[go] = S[go];
12880
12887
  }
12881
12888
  for (var fo = nt, Hh = l + 1; fo < Hh; ) {
12882
12889
  var _o = fo++;
12883
- w[_o] = d[X - l + _o];
12890
+ A[_o] = d[X - l + _o];
12884
12891
  }
12885
- mt = X, X = X + 1, It = Se;
12892
+ mt = X, X = X + 1, Pt = Se;
12886
12893
  } else
12887
12894
  for (var vo = 0, Yh = k + 1; vo < Yh; ) {
12888
12895
  var qh = vo++;
12889
12896
  C[ct + qh] = Se;
12890
12897
  }
12891
12898
  }
12892
- return new Gt(n, C, L);
12899
+ return new Gt(n, C, O);
12893
12900
  }, ft.rationalSurfaceTransform = function(r, n) {
12894
12901
  for (var a = N.dehomogenize2d(r.controlPoints), l = 0, u = a.length; l < u; )
12895
12902
  for (var d = l++, p = 0, _ = a[d].length; p < _; ) {
12896
- var v = p++, w = a[d][v];
12897
- w.push(1), a[d][v] = Lt.dot(n, w).slice(0, w.length - 1);
12903
+ var v = p++, A = a[d][v];
12904
+ A.push(1), a[d][v] = Lt.dot(n, A).slice(0, A.length - 1);
12898
12905
  }
12899
12906
  return new te(r.degreeU, r.degreeV, r.knotsU.slice(), r.knotsV.slice(), N.homogenize2d(a, N.weight2d(r.controlPoints)));
12900
12907
  }, ft.rationalCurveTransform = function(r, n) {
@@ -12907,66 +12914,66 @@ var Ah = { exports: {} };
12907
12914
  var l = [], u, d, p;
12908
12915
  a ? (p = r.controlPoints, u = r.knotsV, d = r.degreeV) : (p = Lt.transpose(r.controlPoints), u = r.knotsU, d = r.degreeU);
12909
12916
  for (var _ = null, v = 0; v < p.length; ) {
12910
- var w = p[v];
12911
- ++v, _ = ft.curveKnotRefine(new Gt(d, u, w), n), l.push(_.controlPoints);
12917
+ var A = p[v];
12918
+ ++v, _ = ft.curveKnotRefine(new Gt(d, u, A), n), l.push(_.controlPoints);
12912
12919
  }
12913
- var I = _.knots;
12914
- return a ? new te(r.degreeU, r.degreeV, r.knotsU.slice(), I, l) : (l = Lt.transpose(l), new te(r.degreeU, r.degreeV, I, r.knotsV.slice(), l));
12920
+ var P = _.knots;
12921
+ return a ? new te(r.degreeU, r.degreeV, r.knotsU.slice(), P, l) : (l = Lt.transpose(l), new te(r.degreeU, r.degreeV, P, r.knotsV.slice(), l));
12915
12922
  }, ft.decomposeCurveIntoBeziers = function(r) {
12916
12923
  for (var n = r.degree, a = r.controlPoints, l = r.knots, u = yt.knotMultiplicities(l), d = n + 1, p = 0; p < u.length; ) {
12917
12924
  var _ = u[p];
12918
12925
  if (++p, _.mult < d) {
12919
- var v = m.rep(d - _.mult, _.knot), w = ft.curveKnotRefine(new Gt(n, l, a), v);
12920
- l = w.knots, a = w.controlPoints;
12926
+ var v = m.rep(d - _.mult, _.knot), A = ft.curveKnotRefine(new Gt(n, l, a), v);
12927
+ l = A.knots, a = A.controlPoints;
12921
12928
  }
12922
12929
  }
12923
12930
  l.length / d - 1;
12924
- for (var I = d * 2, S = [], P = 0; P < a.length; ) {
12925
- var k = l.slice(P, P + I), T = a.slice(P, P + d);
12926
- S.push(new Gt(n, k, T)), P += d;
12931
+ for (var P = d * 2, S = [], I = 0; I < a.length; ) {
12932
+ var k = l.slice(I, I + P), T = a.slice(I, I + d);
12933
+ S.push(new Gt(n, k, T)), I += d;
12927
12934
  }
12928
12935
  return S;
12929
12936
  }, ft.curveKnotRefine = function(r, n) {
12930
12937
  if (n.length == 0) return pt.clonedCurve(r);
12931
- for (var a = r.degree, l = r.controlPoints, u = r.knots, d = l.length - 1, p = d + a + 1, _ = n.length - 1, v = N.knotSpan(a, n[0], u), w = N.knotSpan(a, n[_], u), I = [], S = [], P = 0, k = v - a + 1; P < k; ) {
12932
- var T = P++;
12933
- I[T] = l[T];
12938
+ for (var a = r.degree, l = r.controlPoints, u = r.knots, d = l.length - 1, p = d + a + 1, _ = n.length - 1, v = N.knotSpan(a, n[0], u), A = N.knotSpan(a, n[_], u), P = [], S = [], I = 0, k = v - a + 1; I < k; ) {
12939
+ var T = I++;
12940
+ P[T] = l[T];
12934
12941
  }
12935
- for (var L = w - 1, C = d + 1; L < C; ) {
12936
- var F = L++;
12937
- I[F + _ + 1] = l[F];
12942
+ for (var O = A - 1, C = d + 1; O < C; ) {
12943
+ var F = O++;
12944
+ P[F + _ + 1] = l[F];
12938
12945
  }
12939
12946
  for (var R = 0, U = v + 1; R < U; ) {
12940
12947
  var V = R++;
12941
12948
  S[V] = u[V];
12942
12949
  }
12943
- for (var q = w + a, J = p + 1; q < J; ) {
12950
+ for (var q = A + a, J = p + 1; q < J; ) {
12944
12951
  var H = q++;
12945
12952
  S[H + _ + 1] = u[H];
12946
12953
  }
12947
- for (var G = w + a - 1, K = w + a + _, tt = _; tt >= 0; ) {
12954
+ for (var G = A + a - 1, K = A + a + _, tt = _; tt >= 0; ) {
12948
12955
  for (; n[tt] <= u[G] && G > v; )
12949
- I[K - a - 1] = l[G - a - 1], S[K] = u[G], K = K - 1, G = G - 1;
12950
- I[K - a - 1] = I[K - a];
12956
+ P[K - a - 1] = l[G - a - 1], S[K] = u[G], K = K - 1, G = G - 1;
12957
+ P[K - a - 1] = P[K - a];
12951
12958
  for (var et = 1, it = a + 1; et < it; ) {
12952
12959
  var ht = et++, at = K - a + ht, ct = S[K + ht] - n[tt];
12953
- Math.abs(ct) < rt.EPSILON ? I[at - 1] = I[at] : (ct = ct / (S[K + ht] - u[G - a + ht]), I[at - 1] = m.add(m.mul(ct, I[at - 1]), m.mul(1 - ct, I[at])));
12960
+ Math.abs(ct) < rt.EPSILON ? P[at - 1] = P[at] : (ct = ct / (S[K + ht] - u[G - a + ht]), P[at - 1] = m.add(m.mul(ct, P[at - 1]), m.mul(1 - ct, P[at])));
12954
12961
  }
12955
12962
  S[K] = n[tt], K = K - 1, tt--;
12956
12963
  }
12957
- return new Gt(a, S, I);
12964
+ return new Gt(a, S, P);
12958
12965
  }, ft.curveKnotInsert = function(r, n, a) {
12959
- for (var l = r.degree, u = r.controlPoints, d = r.knots, p = 0, _ = u.length, v = N.knotSpan(l, n, d), w = [], I = [], S = [], P = 1, k = v + 1; P < k; ) {
12960
- var T = P++;
12961
- I[T] = d[T];
12966
+ for (var l = r.degree, u = r.controlPoints, d = r.knots, p = 0, _ = u.length, v = N.knotSpan(l, n, d), A = [], P = [], S = [], I = 1, k = v + 1; I < k; ) {
12967
+ var T = I++;
12968
+ P[T] = d[T];
12962
12969
  }
12963
- for (var L = 1, C = a + 1; L < C; ) {
12964
- var F = L++;
12965
- I[v + F] = n;
12970
+ for (var O = 1, C = a + 1; O < C; ) {
12971
+ var F = O++;
12972
+ P[v + F] = n;
12966
12973
  }
12967
12974
  for (var R = v + 1, U = d.length; R < U; ) {
12968
12975
  var V = R++;
12969
- I[V + a] = d[V];
12976
+ P[V + a] = d[V];
12970
12977
  }
12971
12978
  for (var q = 0, J = v - l + 1; q < J; ) {
12972
12979
  var H = q++;
@@ -12978,22 +12985,22 @@ var Ah = { exports: {} };
12978
12985
  }
12979
12986
  for (var tt = 0, et = l - p + 1; tt < et; ) {
12980
12987
  var it = tt++;
12981
- w[it] = u[v - l + it];
12988
+ A[it] = u[v - l + it];
12982
12989
  }
12983
12990
  for (var ht = 0, at = 0, ct = 1, nt = a + 1; ct < nt; ) {
12984
12991
  var mt = ct++;
12985
12992
  ht = v - l + mt;
12986
12993
  for (var X = 0, gt = l - mt - p + 1; X < gt; ) {
12987
- var It = X++;
12988
- at = (n - d[ht + It]) / (d[It + v + 1] - d[ht + It]), w[It] = m.add(m.mul(at, w[It + 1]), m.mul(1 - at, w[It]));
12994
+ var Pt = X++;
12995
+ at = (n - d[ht + Pt]) / (d[Pt + v + 1] - d[ht + Pt]), A[Pt] = m.add(m.mul(at, A[Pt + 1]), m.mul(1 - at, A[Pt]));
12989
12996
  }
12990
- S[ht] = w[0], S[v + a - mt - p] = w[l - mt - p];
12997
+ S[ht] = A[0], S[v + a - mt - p] = A[l - mt - p];
12991
12998
  }
12992
12999
  for (var jt = ht + 1, Xt = v - p; jt < Xt; ) {
12993
13000
  var Dt = jt++;
12994
- S[Dt] = w[Dt - ht];
13001
+ S[Dt] = A[Dt - ht];
12995
13002
  }
12996
- return new Gt(l, I, S);
13003
+ return new Gt(l, P, S);
12997
13004
  };
12998
13005
  var zt = f.eval.Tess = function() {
12999
13006
  };
@@ -13002,8 +13009,8 @@ var Ah = { exports: {} };
13002
13009
  }, zt.rationalCurveRegularSampleRange = function(r, n, a, l, u) {
13003
13010
  l < 1 && (l = 2);
13004
13011
  for (var d = [], p = (a - n) / (l - 1), _ = 0, v = 0; v < l; ) {
13005
- var w = v++;
13006
- _ = n + p * w, u ? d.push([_].concat(N.rationalCurvePoint(r, _))) : d.push(N.rationalCurvePoint(r, _));
13012
+ var A = v++;
13013
+ _ = n + p * A, u ? d.push([_].concat(N.rationalCurvePoint(r, _))) : d.push(N.rationalCurvePoint(r, _));
13007
13014
  }
13008
13015
  return d;
13009
13016
  }, zt.rationalCurveAdaptiveSample = function(r, n, a) {
@@ -13018,19 +13025,19 @@ var Ah = { exports: {} };
13018
13025
  return r.controlPoints.map(N.dehomogenize);
13019
13026
  return zt.rationalCurveAdaptiveSampleRange(r, r.knots[0], $.last(r.knots), n, a);
13020
13027
  }, zt.rationalCurveAdaptiveSampleRange = function(r, n, a, l, u) {
13021
- var d = N.rationalCurvePoint(r, n), p = N.rationalCurvePoint(r, a), _ = 0.5 + 0.2 * Math.random(), v = n + (a - n) * _, w = N.rationalCurvePoint(r, v), I = m.sub(d, p), S = m.sub(d, w);
13022
- if (m.dot(I, I) < l && m.dot(S, S) > l || !Ne.threePointsAreFlat(d, w, p, l)) {
13023
- var P = n + (a - n) * 0.5, k = zt.rationalCurveAdaptiveSampleRange(r, n, P, l, u), T = zt.rationalCurveAdaptiveSampleRange(r, P, a, l, u);
13028
+ var d = N.rationalCurvePoint(r, n), p = N.rationalCurvePoint(r, a), _ = 0.5 + 0.2 * Math.random(), v = n + (a - n) * _, A = N.rationalCurvePoint(r, v), P = m.sub(d, p), S = m.sub(d, A);
13029
+ if (m.dot(P, P) < l && m.dot(S, S) > l || !Ne.threePointsAreFlat(d, A, p, l)) {
13030
+ var I = n + (a - n) * 0.5, k = zt.rationalCurveAdaptiveSampleRange(r, n, I, l, u), T = zt.rationalCurveAdaptiveSampleRange(r, I, a, l, u);
13024
13031
  return k.slice(0, -1).concat(T);
13025
13032
  } else return u ? [[n].concat(d), [a].concat(p)] : [d, p];
13026
13033
  }, zt.rationalSurfaceNaive = function(r, n, a) {
13027
13034
  n < 1 && (n = 1), a < 1 && (a = 1), r.degreeU, r.degreeV, r.controlPoints;
13028
- for (var l = r.knotsU, u = r.knotsV, d = $.last(l) - l[0], p = $.last(u) - u[0], _ = d / n, v = p / a, w = [], I = [], S = [], P = 0, k = n + 1; P < k; )
13029
- for (var T = P++, L = 0, C = a + 1; L < C; ) {
13030
- var F = L++, R = T * _, U = F * v;
13031
- I.push([R, U]);
13035
+ for (var l = r.knotsU, u = r.knotsV, d = $.last(l) - l[0], p = $.last(u) - u[0], _ = d / n, v = p / a, A = [], P = [], S = [], I = 0, k = n + 1; I < k; )
13036
+ for (var T = I++, O = 0, C = a + 1; O < C; ) {
13037
+ var F = O++, R = T * _, U = F * v;
13038
+ P.push([R, U]);
13032
13039
  var V = N.rationalSurfaceDerivatives(r, R, U, 1), q = V[0][0];
13033
- w.push(q);
13040
+ A.push(q);
13034
13041
  var J = m.normalized(m.cross(V[1][0], V[0][1]));
13035
13042
  S.push(J);
13036
13043
  }
@@ -13039,16 +13046,16 @@ var Ah = { exports: {} };
13039
13046
  var et = tt++, it = K * (a + 1) + et, ht = (K + 1) * (a + 1) + et, at = ht + 1, ct = it + 1, nt = [it, ht, at], mt = [it, at, ct];
13040
13047
  H.push(nt), H.push(mt);
13041
13048
  }
13042
- return new qe(H, w, S, I);
13049
+ return new qe(H, A, S, P);
13043
13050
  }, zt.divideRationalSurfaceAdaptive = function(r, n) {
13044
13051
  n == null && (n = new Lr()), n.minDivsU != null ? n.minDivsU = n.minDivsU : n.minDivsU = 1, n.minDivsV != null ? n.minDivsU = n.minDivsV : n.minDivsU = 1, n.refine != null ? n.refine = n.refine : n.refine = !0;
13045
13052
  var a = (r.controlPoints.length - 1) * 2, l = (r.controlPoints[0].length - 1) * 2, u;
13046
13053
  n.minDivsU > a ? u = n.minDivsU = n.minDivsU : u = n.minDivsU = a;
13047
13054
  var d;
13048
13055
  n.minDivsV > l ? d = n.minDivsV = n.minDivsV : d = n.minDivsV = l;
13049
- for (var p = $.last(r.knotsU), _ = r.knotsU[0], v = $.last(r.knotsV), w = r.knotsV[0], I = (p - _) / u, S = (v - w) / d, P = [], k = [], T = 0, L = d + 1; T < L; ) {
13056
+ for (var p = $.last(r.knotsU), _ = r.knotsU[0], v = $.last(r.knotsV), A = r.knotsV[0], P = (p - _) / u, S = (v - A) / d, I = [], k = [], T = 0, O = d + 1; T < O; ) {
13050
13057
  for (var C = T++, F = [], R = 0, U = u + 1; R < U; ) {
13051
- var V = R++, q = _ + I * V, J = w + S * C, H = N.rationalSurfaceDerivatives(r, q, J, 1), G = m.normalized(m.cross(H[0][1], H[1][0]));
13058
+ var V = R++, q = _ + P * V, J = A + S * C, H = N.rationalSurfaceDerivatives(r, q, J, 1), G = m.normalized(m.cross(H[0][1], H[1][0]));
13052
13059
  F.push(new Ge(H[0][0], G, [q, J], -1, m.isZero(G)));
13053
13060
  }
13054
13061
  k.push(F);
@@ -13056,15 +13063,15 @@ var Ah = { exports: {} };
13056
13063
  for (var K = 0; K < d; )
13057
13064
  for (var tt = K++, et = 0; et < u; ) {
13058
13065
  var it = et++, ht = [k[d - tt - 1][it], k[d - tt - 1][it + 1], k[d - tt][it + 1], k[d - tt][it]];
13059
- P.push(new cr(r, ht));
13066
+ I.push(new cr(r, ht));
13060
13067
  }
13061
- if (!n.refine) return P;
13068
+ if (!n.refine) return I;
13062
13069
  for (var at = 0; at < d; )
13063
13070
  for (var ct = at++, nt = 0; nt < u; ) {
13064
- var mt = nt++, X = ct * u + mt, gt = zt.north(X, ct, mt, u, d, P), It = zt.east(X, ct, mt, u, d, P), jt = zt.south(X, ct, mt, u, d, P), Xt = zt.west(X, ct, mt, u, d, P);
13065
- P[X].neighbors = [jt, It, gt, Xt], P[X].divide(n);
13071
+ var mt = nt++, X = ct * u + mt, gt = zt.north(X, ct, mt, u, d, I), Pt = zt.east(X, ct, mt, u, d, I), jt = zt.south(X, ct, mt, u, d, I), Xt = zt.west(X, ct, mt, u, d, I);
13072
+ I[X].neighbors = [jt, Pt, gt, Xt], I[X].divide(n);
13066
13073
  }
13067
- return P;
13074
+ return I;
13068
13075
  }, zt.north = function(r, n, a, l, u, d) {
13069
13076
  return n == 0 ? null : d[r - l];
13070
13077
  }, zt.south = function(r, n, a, l, u, d) {
@@ -13203,8 +13210,8 @@ var Ah = { exports: {} };
13203
13210
  this.children = [new cr(this.srf, d), new cr(this.srf, p)], this.children[0].neighbors = [this.neighbors[0], this.children[1], this.neighbors[2], this.neighbors[3]], this.children[1].neighbors = [this.neighbors[0], this.neighbors[1], this.neighbors[2], this.children[0]];
13204
13211
  }
13205
13212
  for (var _ = 0, v = this.children; _ < v.length; ) {
13206
- var w = v[_];
13207
- ++_, w._divide(r, n, !a);
13213
+ var A = v[_];
13214
+ ++_, A._divide(r, n, !a);
13208
13215
  }
13209
13216
  }
13210
13217
  },
@@ -13221,18 +13228,18 @@ var Ah = { exports: {} };
13221
13228
  for (var n = r.points.length, a = [], l = [], u = 0, d = 0; d < 4; ) {
13222
13229
  var p = d++, _ = this.getAllCorners(p);
13223
13230
  _.length == 2 && (u = p + 1);
13224
- for (var v = 0, w = _.length; v < w; ) {
13225
- var I = v++;
13226
- a.push(_[I]);
13231
+ for (var v = 0, A = _.length; v < A; ) {
13232
+ var P = v++;
13233
+ a.push(_[P]);
13227
13234
  }
13228
13235
  }
13229
13236
  for (var S = 0; S < a.length; ) {
13230
- var P = a[S];
13231
- if (++S, P.id != -1) {
13232
- l.push(P.id);
13237
+ var I = a[S];
13238
+ if (++S, I.id != -1) {
13239
+ l.push(I.id);
13233
13240
  continue;
13234
13241
  }
13235
- r.uvs.push(P.uv), r.points.push(P.point), r.normals.push(P.normal), P.id = n, l.push(n), n++;
13242
+ r.uvs.push(I.uv), r.points.push(I.point), r.normals.push(I.normal), I.id = n, l.push(n), n++;
13236
13243
  }
13237
13244
  if (a.length == 4)
13238
13245
  return r.faces.push([l[0], l[3], l[1]]), r.faces.push([l[3], l[2], l[1]]), r;
@@ -13242,8 +13249,8 @@ var Ah = { exports: {} };
13242
13249
  }
13243
13250
  var T = this.center();
13244
13251
  r.uvs.push(T.uv), r.points.push(T.point), r.normals.push(T.normal);
13245
- for (var L = r.points.length - 1, C = 0, F = a.length - 1; C < a.length; )
13246
- r.faces.push([L, l[C], l[F]]), F = C++;
13252
+ for (var O = r.points.length - 1, C = 0, F = a.length - 1; C < a.length; )
13253
+ r.faces.push([O, l[C], l[F]]), F = C++;
13247
13254
  return r;
13248
13255
  },
13249
13256
  __class__: cr
@@ -13467,27 +13474,27 @@ var Ah = { exports: {} };
13467
13474
  b["verb.geom.Circle"] = Zn, Zn.__name__ = ["verb", "geom", "Circle"], Zn.__super__ = zr, Zn.prototype = M(zr.prototype, {
13468
13475
  __class__: Zn
13469
13476
  });
13470
- var In = function() {
13477
+ var Pn = function() {
13471
13478
  };
13472
- b["verb.geom.ISurface"] = In, In.__name__ = ["verb", "geom", "ISurface"], In.__interfaces__ = [bn], In.prototype = {
13473
- __class__: In
13479
+ b["verb.geom.ISurface"] = Pn, Pn.__name__ = ["verb", "geom", "ISurface"], Pn.__interfaces__ = [bn], Pn.prototype = {
13480
+ __class__: Pn
13474
13481
  };
13475
- var Pt = f.geom.NurbsSurface = function(r) {
13482
+ var It = f.geom.NurbsSurface = function(r) {
13476
13483
  this._data = je.isValidNurbsSurfaceData(r);
13477
13484
  };
13478
- b["verb.geom.NurbsSurface"] = Pt, Pt.__name__ = ["verb", "geom", "NurbsSurface"], Pt.__interfaces__ = [In], Pt.byKnotsControlPointsWeights = function(r, n, a, l, u, d) {
13479
- return new Pt(new te(r, n, a, l, N.homogenize2d(u, d)));
13480
- }, Pt.byCorners = function(r, n, a, l) {
13481
- return new Pt(pt.fourPointSurface(r, n, a, l));
13482
- }, Pt.byLoftingCurves = function(r, n) {
13483
- return new Pt(pt.loftedSurface(function(a) {
13485
+ b["verb.geom.NurbsSurface"] = It, It.__name__ = ["verb", "geom", "NurbsSurface"], It.__interfaces__ = [Pn], It.byKnotsControlPointsWeights = function(r, n, a, l, u, d) {
13486
+ return new It(new te(r, n, a, l, N.homogenize2d(u, d)));
13487
+ }, It.byCorners = function(r, n, a, l) {
13488
+ return new It(pt.fourPointSurface(r, n, a, l));
13489
+ }, It.byLoftingCurves = function(r, n) {
13490
+ return new It(pt.loftedSurface(function(a) {
13484
13491
  for (var l, u = [], d = 0; d < r.length; ) {
13485
13492
  var p = r[d];
13486
13493
  ++d, u.push(p.asNurbs());
13487
13494
  }
13488
13495
  return l = u, l;
13489
13496
  }(), n));
13490
- }, Pt.__super__ = $t, Pt.prototype = M($t.prototype, {
13497
+ }, It.__super__ = $t, It.prototype = M($t.prototype, {
13491
13498
  degreeU: function() {
13492
13499
  return this._data.degreeU;
13493
13500
  },
@@ -13510,7 +13517,7 @@ var Ah = { exports: {} };
13510
13517
  return new te(this.degreeU(), this.degreeV(), this.knotsU(), this.knotsV(), N.homogenize2d(this.controlPoints(), this.weights()));
13511
13518
  },
13512
13519
  clone: function() {
13513
- return new Pt(this.asNurbs());
13520
+ return new It(this.asNurbs());
13514
13521
  },
13515
13522
  domainU: function() {
13516
13523
  return new we($.first(this._data.knotsU), $.last(this._data.knotsU));
@@ -13550,22 +13557,22 @@ var Ah = { exports: {} };
13550
13557
  },
13551
13558
  split: function(r, n) {
13552
13559
  return n == null && (n = !1), oe.surfaceSplit(this._data, r, n).map(function(a) {
13553
- return new Pt(a);
13560
+ return new It(a);
13554
13561
  });
13555
13562
  },
13556
13563
  splitAsync: function(r, n) {
13557
13564
  return n == null && (n = !1), wt.dispatchMethod(oe, "surfaceSplit", [this._data, r, n]).then(function(a) {
13558
13565
  return a.map(function(l) {
13559
- return new Pt(l);
13566
+ return new It(l);
13560
13567
  });
13561
13568
  });
13562
13569
  },
13563
13570
  reverse: function(r) {
13564
- return r == null && (r = !1), new Pt(ft.surfaceReverse(this._data, r));
13571
+ return r == null && (r = !1), new It(ft.surfaceReverse(this._data, r));
13565
13572
  },
13566
13573
  reverseAsync: function(r) {
13567
13574
  return r == null && (r = !1), wt.dispatchMethod(ft, "surfaceReverse", [this._data, r]).then(function(n) {
13568
- return new Pt(n);
13575
+ return new It(n);
13569
13576
  });
13570
13577
  },
13571
13578
  isocurve: function(r, n) {
@@ -13595,19 +13602,19 @@ var Ah = { exports: {} };
13595
13602
  return wt.dispatchMethod(zt, "rationalSurfaceAdaptive", [this._data, r]);
13596
13603
  },
13597
13604
  transform: function(r) {
13598
- return new Pt(ft.rationalSurfaceTransform(this._data, r));
13605
+ return new It(ft.rationalSurfaceTransform(this._data, r));
13599
13606
  },
13600
13607
  transformAsync: function(r) {
13601
13608
  return wt.dispatchMethod(ft, "rationalSurfaceTransform", [this._data, r]).then(function(n) {
13602
- return new Pt(n);
13609
+ return new It(n);
13603
13610
  });
13604
13611
  },
13605
- __class__: Pt
13612
+ __class__: It
13606
13613
  });
13607
13614
  var Qn = f.geom.ConicalSurface = function(r, n, a, l, u) {
13608
- Pt.call(this, pt.conicalSurface(r, n, a, l, u)), this._axis = r, this._xaxis = n, this._base = a, this._height = l, this._radius = u;
13615
+ It.call(this, pt.conicalSurface(r, n, a, l, u)), this._axis = r, this._xaxis = n, this._base = a, this._height = l, this._radius = u;
13609
13616
  };
13610
- b["verb.geom.ConicalSurface"] = Qn, Qn.__name__ = ["verb", "geom", "ConicalSurface"], Qn.__super__ = Pt, Qn.prototype = M(Pt.prototype, {
13617
+ b["verb.geom.ConicalSurface"] = Qn, Qn.__name__ = ["verb", "geom", "ConicalSurface"], Qn.__super__ = It, Qn.prototype = M(It.prototype, {
13611
13618
  axis: function() {
13612
13619
  return this._axis;
13613
13620
  },
@@ -13626,9 +13633,9 @@ var Ah = { exports: {} };
13626
13633
  __class__: Qn
13627
13634
  });
13628
13635
  var Jn = f.geom.CylindricalSurface = function(r, n, a, l, u) {
13629
- Pt.call(this, pt.cylindricalSurface(r, n, a, l, u)), this._axis = r, this._xaxis = n, this._base = a, this._height = l, this._radius = u;
13636
+ It.call(this, pt.cylindricalSurface(r, n, a, l, u)), this._axis = r, this._xaxis = n, this._base = a, this._height = l, this._radius = u;
13630
13637
  };
13631
- b["verb.geom.CylindricalSurface"] = Jn, Jn.__name__ = ["verb", "geom", "CylindricalSurface"], Jn.__super__ = Pt, Jn.prototype = M(Pt.prototype, {
13638
+ b["verb.geom.CylindricalSurface"] = Jn, Jn.__name__ = ["verb", "geom", "CylindricalSurface"], Jn.__super__ = It, Jn.prototype = M(It.prototype, {
13632
13639
  axis: function() {
13633
13640
  return this._axis;
13634
13641
  },
@@ -13674,9 +13681,9 @@ var Ah = { exports: {} };
13674
13681
  __class__: ts
13675
13682
  });
13676
13683
  var es = f.geom.ExtrudedSurface = function(r, n) {
13677
- Pt.call(this, pt.extrudedSurface(m.normalized(n), m.norm(n), r.asNurbs())), this._profile = r, this._direction = n;
13684
+ It.call(this, pt.extrudedSurface(m.normalized(n), m.norm(n), r.asNurbs())), this._profile = r, this._direction = n;
13678
13685
  };
13679
- b["verb.geom.ExtrudedSurface"] = es, es.__name__ = ["verb", "geom", "ExtrudedSurface"], es.__super__ = Pt, es.prototype = M(Pt.prototype, {
13686
+ b["verb.geom.ExtrudedSurface"] = es, es.__name__ = ["verb", "geom", "ExtrudedSurface"], es.__super__ = It, es.prototype = M(It.prototype, {
13680
13687
  profile: function() {
13681
13688
  return this._profile;
13682
13689
  },
@@ -13719,9 +13726,9 @@ var Ah = { exports: {} };
13719
13726
  __class__: rs
13720
13727
  });
13721
13728
  var ns = f.geom.RevolvedSurface = function(r, n, a, l) {
13722
- Pt.call(this, pt.revolvedSurface(r.asNurbs(), n, a, l)), this._profile = r, this._center = n, this._axis = a, this._angle = l;
13729
+ It.call(this, pt.revolvedSurface(r.asNurbs(), n, a, l)), this._profile = r, this._center = n, this._axis = a, this._angle = l;
13723
13730
  };
13724
- b["verb.geom.RevolvedSurface"] = ns, ns.__name__ = ["verb", "geom", "RevolvedSurface"], ns.__super__ = Pt, ns.prototype = M(Pt.prototype, {
13731
+ b["verb.geom.RevolvedSurface"] = ns, ns.__name__ = ["verb", "geom", "RevolvedSurface"], ns.__super__ = It, ns.prototype = M(It.prototype, {
13725
13732
  profile: function() {
13726
13733
  return this._profile;
13727
13734
  },
@@ -13737,9 +13744,9 @@ var Ah = { exports: {} };
13737
13744
  __class__: ns
13738
13745
  });
13739
13746
  var ss = f.geom.SphericalSurface = function(r, n) {
13740
- Pt.call(this, pt.sphericalSurface(r, [0, 0, 1], [1, 0, 0], n)), this._center = r, this._radius = n;
13747
+ It.call(this, pt.sphericalSurface(r, [0, 0, 1], [1, 0, 0], n)), this._center = r, this._radius = n;
13741
13748
  };
13742
- b["verb.geom.SphericalSurface"] = ss, ss.__name__ = ["verb", "geom", "SphericalSurface"], ss.__super__ = Pt, ss.prototype = M(Pt.prototype, {
13749
+ b["verb.geom.SphericalSurface"] = ss, ss.__name__ = ["verb", "geom", "SphericalSurface"], ss.__super__ = It, ss.prototype = M(It.prototype, {
13743
13750
  center: function() {
13744
13751
  return this._center;
13745
13752
  },
@@ -13749,9 +13756,9 @@ var Ah = { exports: {} };
13749
13756
  __class__: ss
13750
13757
  });
13751
13758
  var is = f.geom.SweptSurface = function(r, n) {
13752
- Pt.call(this, pt.rationalTranslationalSurface(r.asNurbs(), n.asNurbs())), this._profile = r, this._rail = n;
13759
+ It.call(this, pt.rationalTranslationalSurface(r.asNurbs(), n.asNurbs())), this._profile = r, this._rail = n;
13753
13760
  };
13754
- b["verb.geom.SweptSurface"] = is, is.__name__ = ["verb", "geom", "SweptSurface"], is.__super__ = Pt, is.prototype = M(Pt.prototype, {
13761
+ b["verb.geom.SweptSurface"] = is, is.__name__ = ["verb", "geom", "SweptSurface"], is.__super__ = It, is.prototype = M(It.prototype, {
13755
13762
  profile: function() {
13756
13763
  return this._profile;
13757
13764
  },
@@ -13762,7 +13769,7 @@ var Ah = { exports: {} };
13762
13769
  });
13763
13770
  function Ke(r) {
13764
13771
  return r instanceof Array ? function() {
13765
- return O.iter(r);
13772
+ return L.iter(r);
13766
13773
  } : typeof r.iterator == "function" ? Ce(r, r.iterator) : r.iterator;
13767
13774
  }
13768
13775
  var li, Ch = 0;
@@ -13793,9 +13800,9 @@ var Ah = { exports: {} };
13793
13800
  }
13794
13801
  return n;
13795
13802
  });
13796
- var hi = {}, Ls = A.ArrayBuffer || ae;
13797
- Ls.prototype.slice == null && (Ls.prototype.slice = ae.sliceImpl), A.DataView;
13798
- var ui = A.Uint8Array || sr._new;
13803
+ var hi = {}, Ls = w.ArrayBuffer || ae;
13804
+ Ls.prototype.slice == null && (Ls.prototype.slice = ae.sliceImpl), w.DataView;
13805
+ var ui = w.Uint8Array || sr._new;
13799
13806
  (function(r, n) {
13800
13807
  if (r.setImmediate)
13801
13808
  return;
@@ -13809,9 +13816,9 @@ var Ah = { exports: {} };
13809
13816
  typeof R == "function" ? R.apply(n, U) : new Function("" + R)();
13810
13817
  };
13811
13818
  }
13812
- function w(R) {
13819
+ function A(R) {
13813
13820
  if (u)
13814
- setTimeout(v(w, R), 0);
13821
+ setTimeout(v(A, R), 0);
13815
13822
  else {
13816
13823
  var U = l[R];
13817
13824
  if (U) {
@@ -13819,21 +13826,21 @@ var Ah = { exports: {} };
13819
13826
  try {
13820
13827
  U();
13821
13828
  } finally {
13822
- I(R), u = !1;
13829
+ P(R), u = !1;
13823
13830
  }
13824
13831
  }
13825
13832
  }
13826
13833
  }
13827
- function I(R) {
13834
+ function P(R) {
13828
13835
  delete l[R];
13829
13836
  }
13830
13837
  function S() {
13831
13838
  p = function() {
13832
13839
  var R = _(arguments);
13833
- return process.nextTick(v(w, R)), R;
13840
+ return process.nextTick(v(A, R)), R;
13834
13841
  };
13835
13842
  }
13836
- function P() {
13843
+ function I() {
13837
13844
  if (r.postMessage && !r.importScripts) {
13838
13845
  var R = !0, U = r.onmessage;
13839
13846
  return r.onmessage = function() {
@@ -13843,7 +13850,7 @@ var Ah = { exports: {} };
13843
13850
  }
13844
13851
  function k() {
13845
13852
  var R = "setImmediate$" + Math.random() + "$", U = function(V) {
13846
- V.source === r && typeof V.data == "string" && V.data.indexOf(R) === 0 && w(+V.data.slice(R.length));
13853
+ V.source === r && typeof V.data == "string" && V.data.indexOf(R) === 0 && A(+V.data.slice(R.length));
13847
13854
  };
13848
13855
  r.addEventListener ? r.addEventListener("message", U, !1) : r.attachEvent("onmessage", U), p = function() {
13849
13856
  var V = _(arguments);
@@ -13854,29 +13861,29 @@ var Ah = { exports: {} };
13854
13861
  var R = new MessageChannel();
13855
13862
  R.port1.onmessage = function(U) {
13856
13863
  var V = U.data;
13857
- w(V);
13864
+ A(V);
13858
13865
  }, p = function() {
13859
13866
  var U = _(arguments);
13860
13867
  return R.port2.postMessage(U), U;
13861
13868
  };
13862
13869
  }
13863
- function L() {
13870
+ function O() {
13864
13871
  var R = d.documentElement;
13865
13872
  p = function() {
13866
13873
  var U = _(arguments), V = d.createElement("script");
13867
13874
  return V.onreadystatechange = function() {
13868
- w(U), V.onreadystatechange = null, R.removeChild(V), V = null;
13875
+ A(U), V.onreadystatechange = null, R.removeChild(V), V = null;
13869
13876
  }, R.appendChild(V), U;
13870
13877
  };
13871
13878
  }
13872
13879
  function C() {
13873
13880
  p = function() {
13874
13881
  var R = _(arguments);
13875
- return setTimeout(v(w, R), 0), R;
13882
+ return setTimeout(v(A, R), 0), R;
13876
13883
  };
13877
13884
  }
13878
13885
  var F = Object.getPrototypeOf && Object.getPrototypeOf(r);
13879
- F = F && F.setTimeout ? F : r, {}.toString.call(r.process) === "[object process]" ? S() : P() ? k() : r.MessageChannel ? T() : d && "onreadystatechange" in d.createElement("script") ? L() : C(), F.setImmediate = p, F.clearImmediate = I;
13886
+ F = F && F.setTimeout ? F : r, {}.toString.call(r.process) === "[object process]" ? S() : I() ? k() : r.MessageChannel ? T() : d && "onreadystatechange" in d.createElement("script") ? O() : C(), F.setImmediate = p, F.clearImmediate = P;
13880
13887
  })(new Function("return this")()), qt.USE_CACHE = !1, qt.USE_ENUM_INDEX = !1, qt.BASE64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:", Wt.DEFAULT_RESOLVER = ut, Wt.BASE64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:", Ot.count = 0, ie.i64tmp = function(r) {
13881
13888
  var n, a = new Vt(0, 0);
13882
13889
  return n = a, n;
@@ -13999,14 +14006,14 @@ class Md extends Ts {
13999
14006
  const c = (h - (this._closed ? 0 : 1)) * t;
14000
14007
  let g = Math.floor(c), x = c - g;
14001
14008
  this._closed ? g += g > 0 ? 0 : (Math.floor(Math.abs(g) / h) + 1) * h : x === 0 && g === h - 1 && (g = h - 2, x = 1);
14002
- let f, A;
14009
+ let f, w;
14003
14010
  this._closed || g > 0 ? f = o[(g - 1) % h] : (this._tmp.subVectors(o[0], o[1]).add(o[0]), f = new Y(this._tmp.x, this._tmp.y, this._tmp.z));
14004
14011
  const b = o[g % h], E = o[(g + 1) % h];
14005
- if (this._closed || g + 2 < h ? A = o[(g + 2) % h] : (this._tmp.subVectors(o[h - 1], o[h - 2]).add(o[h - 1]), A = new Y(this._tmp.x, this._tmp.y, this._tmp.z)), this._curveType === "centripetal" || this._curveType === "chordal") {
14012
+ if (this._closed || g + 2 < h ? w = o[(g + 2) % h] : (this._tmp.subVectors(o[h - 1], o[h - 2]).add(o[h - 1]), w = new Y(this._tmp.x, this._tmp.y, this._tmp.z)), this._curveType === "centripetal" || this._curveType === "chordal") {
14006
14013
  const M = this._curveType === "chordal" ? 0.5 : 0.25;
14007
- let O = Math.pow(f.distanceToSquared(b), M), z = Math.pow(b.distanceToSquared(E), M), D = Math.pow(E.distanceToSquared(A), M);
14008
- z < 1e-4 && (z = 1), O < 1e-4 && (O = z), D < 1e-4 && (D = z), this._px.initNonuniformCatmullRom(f.x, b.x, E.x, A.x, O, z, D), this._py.initNonuniformCatmullRom(f.y, b.y, E.y, A.y, O, z, D), this._pz.initNonuniformCatmullRom(f.z, b.z, E.z, A.z, O, z, D);
14009
- } else this._curveType === "catmullrom" && (this._px.initCatmullRom(f.x, b.x, E.x, A.x, this._tension), this._py.initCatmullRom(f.y, b.y, E.y, A.y, this._tension), this._pz.initCatmullRom(f.z, b.z, E.z, A.z, this._tension));
14014
+ let L = Math.pow(f.distanceToSquared(b), M), z = Math.pow(b.distanceToSquared(E), M), D = Math.pow(E.distanceToSquared(w), M);
14015
+ z < 1e-4 && (z = 1), L < 1e-4 && (L = z), D < 1e-4 && (D = z), this._px.initNonuniformCatmullRom(f.x, b.x, E.x, w.x, L, z, D), this._py.initNonuniformCatmullRom(f.y, b.y, E.y, w.y, L, z, D), this._pz.initNonuniformCatmullRom(f.z, b.z, E.z, w.z, L, z, D);
14016
+ } else this._curveType === "catmullrom" && (this._px.initCatmullRom(f.x, b.x, E.x, w.x, this._tension), this._py.initCatmullRom(f.y, b.y, E.y, w.y, this._tension), this._pz.initCatmullRom(f.z, b.z, E.z, w.z, this._tension));
14010
14017
  return s.set(
14011
14018
  this._px.calc(x),
14012
14019
  this._py.calc(x),
@@ -14214,11 +14221,11 @@ class mn extends Ts {
14214
14221
  let g, x = 3, f = !1;
14215
14222
  if (c >= 3 && (Array.isArray(s) ? (g = s, c >= 4 && (x = o || 3), c >= 5 && (f = h)) : s !== void 0 && (x = s || 3, c >= 4 && (f = o))), s === void 0 && c >= 4 && (x = o || 3, c >= 5 && (f = h)), this._degree = x, this._closed = f, this._controlPoints.length < this._degree + 1)
14216
14223
  throw Ye.ILLEGAL_PARAMETERS;
14217
- const A = this.toVerbPoints(this._controlPoints);
14224
+ const w = this.toVerbPoints(this._controlPoints);
14218
14225
  this._nurbsCurve = Nn.geom.NurbsCurve.byKnotsControlPointsWeights(
14219
14226
  this._degree,
14220
14227
  e,
14221
- A,
14228
+ w,
14222
14229
  g
14223
14230
  );
14224
14231
  } else {
@@ -14327,7 +14334,7 @@ class mn extends Ts {
14327
14334
  getPoints(t = 100) {
14328
14335
  const e = this._nurbsCurve, s = [], o = e.knots(), h = this._nurbsCurve.degree(), c = o[h], g = o[o.length - h - 1], x = (g - c) / (t - 1);
14329
14336
  for (let f = 0; f < t; f++) {
14330
- const A = f === t - 1 ? g : c + f * x, b = e.point(A);
14337
+ const w = f === t - 1 ? g : c + f * x, b = e.point(w);
14331
14338
  s.push(new Y(b[0], b[1], b[2]));
14332
14339
  }
14333
14340
  return s;
@@ -15065,15 +15072,15 @@ const Sa = class Sa extends Ee {
15065
15072
  Sa.typeName = "Curve";
15066
15073
  let ke = Sa;
15067
15074
  var Ss = /* @__PURE__ */ ((i) => (i[i.SimplePoly = 0] = "SimplePoly", i[i.FitCurvePoly = 1] = "FitCurvePoly", i[i.QuadSplinePoly = 2] = "QuadSplinePoly", i[i.CubicSplinePoly = 3] = "CubicSplinePoly", i))(Ss || {});
15068
- const Ia = class Ia extends ke {
15075
+ const Pa = class Pa extends ke {
15069
15076
  /**
15070
15077
  * Creates a new empty 2d polyline entity.
15071
15078
  */
15072
15079
  constructor(t, e, s = 0, o = !1, h = 0, c = 0, g = null) {
15073
15080
  super(), this._polyType = t, this._elevation = s;
15074
- const x = g && (g == null ? void 0 : g.length) === e.length, f = e.map((A, b) => ({
15075
- x: A.x,
15076
- y: A.y,
15081
+ const x = g && (g == null ? void 0 : g.length) === e.length, f = e.map((w, b) => ({
15082
+ x: w.x,
15083
+ y: w.y,
15077
15084
  bulge: x ? g[b] : void 0
15078
15085
  }));
15079
15086
  this._geo = new Rn(f, o);
@@ -15196,10 +15203,10 @@ const Ia = class Ia extends ke {
15196
15203
  ), t.lines(e, this.lineStyle);
15197
15204
  }
15198
15205
  };
15199
- Ia.typeName = "2dPolyline";
15200
- let Di = Ia;
15206
+ Pa.typeName = "2dPolyline";
15207
+ let Di = Pa;
15201
15208
  var Nd = /* @__PURE__ */ ((i) => (i[i.Vertex = 0] = "Vertex", i[i.CurveFitVertex = 1] = "CurveFitVertex", i[i.SplineFitVertex = 8] = "SplineFitVertex", i[i.SplineCtlVertex = 9] = "SplineCtlVertex", i))(Nd || {});
15202
- const Pa = class Pa extends Ee {
15209
+ const Ia = class Ia extends Ee {
15203
15210
  /**
15204
15211
  * Creates a new 2d vertex entity.
15205
15212
  */
@@ -15327,8 +15334,8 @@ const Pa = class Pa extends Ee {
15327
15334
  draw(t) {
15328
15335
  }
15329
15336
  };
15330
- Pa.typeName = "2dVertex";
15331
- let Oo = Pa;
15337
+ Ia.typeName = "2dVertex";
15338
+ let Oo = Ia;
15332
15339
  var $s = /* @__PURE__ */ ((i) => (i[i.SimplePoly = 0] = "SimplePoly", i[i.QuadSplinePoly = 1] = "QuadSplinePoly", i[i.CubicSplinePoly = 2] = "CubicSplinePoly", i))($s || {});
15333
15340
  const Ea = class Ea extends ke {
15334
15341
  /**
@@ -17765,7 +17772,7 @@ const Ra = class Ra extends ke {
17765
17772
  };
17766
17773
  Ra.typeName = "Line";
17767
17774
  let qi = Ra;
17768
- var Ih = /* @__PURE__ */ ((i) => (i.ClosedFilled = "", i.Dot = "_DOT", i.DotSmall = "_DOTSMALL", i.DotBlank = "_DOTBLANK", i.Origin = "_ORIGIN", i.Origin2 = "_ORIGIN2", i.Open = "_OPEN", i.Open90 = "_OPEN90", i.Open30 = "_OPEN30", i.Closed = "_CLOSED", i.Small = "_SMALL", i.None = "_NONE", i.Oblique = "_OBLIQUE", i.BoxFilled = "_BOXFILLED", i.Box = "_BOXBLANK", i.ClosedBlank = "_CLOSEDBLANK", i.DatumBlank = "_DATUMBLANK", i.DatumFilled = "_DATUMFILLED", i.Integral = "_INTEGRAL", i.ArchTick = "_ARCHTICK", i))(Ih || {}), Gr = /* @__PURE__ */ ((i) => (i[i.LEFT_TO_RIGHT = 1] = "LEFT_TO_RIGHT", i[i.RIGHT_TO_LEFT = 2] = "RIGHT_TO_LEFT", i[i.TOP_TO_BOTTOM = 3] = "TOP_TO_BOTTOM", i[i.BOTTOM_TO_TOP = 4] = "BOTTOM_TO_TOP", i[i.BY_STYLE = 5] = "BY_STYLE", i))(Gr || {}), Pe = /* @__PURE__ */ ((i) => (i[i.TopLeft = 1] = "TopLeft", i[i.TopCenter = 2] = "TopCenter", i[i.TopRight = 3] = "TopRight", i[i.MiddleLeft = 4] = "MiddleLeft", i[i.MiddleCenter = 5] = "MiddleCenter", i[i.MiddleRight = 6] = "MiddleRight", i[i.BottomLeft = 7] = "BottomLeft", i[i.BottomCenter = 8] = "BottomCenter", i[i.BottomRight = 9] = "BottomRight", i))(Pe || {}), Ph = /* @__PURE__ */ ((i) => (i[i.OPTIMIZED_2D = 0] = "OPTIMIZED_2D", i[i.WIREFRAME = 1] = "WIREFRAME", i[i.HIDDEN_LINE = 2] = "HIDDEN_LINE", i[i.FLAT_SHADED = 3] = "FLAT_SHADED", i[i.GOURAUD_SHADED = 4] = "GOURAUD_SHADED", i[i.FLAT_SHADED_WITH_WIREFRAME = 5] = "FLAT_SHADED_WITH_WIREFRAME", i[i.GOURAUD_SHADED_WITH_WIREFRAME = 6] = "GOURAUD_SHADED_WITH_WIREFRAME", i))(Ph || {}), Eh = /* @__PURE__ */ ((i) => (i[i.NON_ORTHOGRAPHIC = 0] = "NON_ORTHOGRAPHIC", i[i.TOP = 1] = "TOP", i[i.BOTTOM = 2] = "BOTTOM", i[i.FRONT = 3] = "FRONT", i[i.BACK = 4] = "BACK", i[i.LEFT = 5] = "LEFT", i[i.RIGHT = 6] = "RIGHT", i))(Eh || {}), kh = /* @__PURE__ */ ((i) => (i[i.ONE_DISTANT_LIGHT = 0] = "ONE_DISTANT_LIGHT", i[i.TWO_DISTANT_LIGHTS = 1] = "TWO_DISTANT_LIGHTS", i))(kh || {});
17775
+ var Ph = /* @__PURE__ */ ((i) => (i.ClosedFilled = "", i.Dot = "_DOT", i.DotSmall = "_DOTSMALL", i.DotBlank = "_DOTBLANK", i.Origin = "_ORIGIN", i.Origin2 = "_ORIGIN2", i.Open = "_OPEN", i.Open90 = "_OPEN90", i.Open30 = "_OPEN30", i.Closed = "_CLOSED", i.Small = "_SMALL", i.None = "_NONE", i.Oblique = "_OBLIQUE", i.BoxFilled = "_BOXFILLED", i.Box = "_BOXBLANK", i.ClosedBlank = "_CLOSEDBLANK", i.DatumBlank = "_DATUMBLANK", i.DatumFilled = "_DATUMFILLED", i.Integral = "_INTEGRAL", i.ArchTick = "_ARCHTICK", i))(Ph || {}), Gr = /* @__PURE__ */ ((i) => (i[i.LEFT_TO_RIGHT = 1] = "LEFT_TO_RIGHT", i[i.RIGHT_TO_LEFT = 2] = "RIGHT_TO_LEFT", i[i.TOP_TO_BOTTOM = 3] = "TOP_TO_BOTTOM", i[i.BOTTOM_TO_TOP = 4] = "BOTTOM_TO_TOP", i[i.BY_STYLE = 5] = "BY_STYLE", i))(Gr || {}), Ie = /* @__PURE__ */ ((i) => (i[i.TopLeft = 1] = "TopLeft", i[i.TopCenter = 2] = "TopCenter", i[i.TopRight = 3] = "TopRight", i[i.MiddleLeft = 4] = "MiddleLeft", i[i.MiddleCenter = 5] = "MiddleCenter", i[i.MiddleRight = 6] = "MiddleRight", i[i.BottomLeft = 7] = "BottomLeft", i[i.BottomCenter = 8] = "BottomCenter", i[i.BottomRight = 9] = "BottomRight", i))(Ie || {}), Ih = /* @__PURE__ */ ((i) => (i[i.OPTIMIZED_2D = 0] = "OPTIMIZED_2D", i[i.WIREFRAME = 1] = "WIREFRAME", i[i.HIDDEN_LINE = 2] = "HIDDEN_LINE", i[i.FLAT_SHADED = 3] = "FLAT_SHADED", i[i.GOURAUD_SHADED = 4] = "GOURAUD_SHADED", i[i.FLAT_SHADED_WITH_WIREFRAME = 5] = "FLAT_SHADED_WITH_WIREFRAME", i[i.GOURAUD_SHADED_WITH_WIREFRAME = 6] = "GOURAUD_SHADED_WITH_WIREFRAME", i))(Ih || {}), Eh = /* @__PURE__ */ ((i) => (i[i.NON_ORTHOGRAPHIC = 0] = "NON_ORTHOGRAPHIC", i[i.TOP = 1] = "TOP", i[i.BOTTOM = 2] = "BOTTOM", i[i.FRONT = 3] = "FRONT", i[i.BACK = 4] = "BACK", i[i.LEFT = 5] = "LEFT", i[i.RIGHT = 6] = "RIGHT", i))(Eh || {}), kh = /* @__PURE__ */ ((i) => (i[i.ONE_DISTANT_LIGHT = 0] = "ONE_DISTANT_LIGHT", i[i.TWO_DISTANT_LIGHTS = 1] = "TWO_DISTANT_LIGHTS", i))(kh || {});
17769
17776
  class xa {
17770
17777
  constructor() {
17771
17778
  this._number = -1, this._id = "", this._groupId = "", this._centerPoint = new Y(), this._height = 0, this._width = 0, this._viewCenter = new Y(), this._viewHeight = 0;
@@ -17904,7 +17911,7 @@ const Fa = class Fa extends Ee {
17904
17911
  * ```
17905
17912
  */
17906
17913
  constructor() {
17907
- super(), this._contents = "", this._height = 0, this._width = 0, this._lineSpacingFactor = 0.25, this._lineSpacingStyle = 0, this._backgroundFill = !1, this._backgroundFillColor = 13158600, this._backgroundFillTransparency = 1, this._backgroundScaleFactor = 1, this._rotation = 0, this._styleName = "", this._location = new Y(), this._attachmentPoint = Pe.TopLeft, this._direction = new Z(1, 0, 0), this._drawingDirection = Gr.LEFT_TO_RIGHT;
17914
+ super(), this._contents = "", this._height = 0, this._width = 0, this._lineSpacingFactor = 0.25, this._lineSpacingStyle = 0, this._backgroundFill = !1, this._backgroundFillColor = 13158600, this._backgroundFillTransparency = 1, this._backgroundScaleFactor = 1, this._rotation = 0, this._styleName = "", this._location = new Y(), this._attachmentPoint = Ie.TopLeft, this._direction = new Z(1, 0, 0), this._drawingDirection = Gr.LEFT_TO_RIGHT;
17908
17915
  }
17909
17916
  /**
17910
17917
  * Gets the contents of the mtext object.
@@ -18123,12 +18130,12 @@ const Fa = class Fa extends Ee {
18123
18130
  return new Ct();
18124
18131
  }
18125
18132
  /**
18126
- * Returns the full property definition for this ray entity, including
18133
+ * Returns the full property definition for this mtext entity, including
18127
18134
  * general group and geometry group.
18128
18135
  *
18129
18136
  * The geometry group exposes editable start/end coordinates via
18130
18137
  * {@link AcDbPropertyAccessor} so the property palette can update
18131
- * the ray in real-time.
18138
+ * the mtext in real-time.
18132
18139
  *
18133
18140
  * Each property is an {@link AcDbEntityRuntimeProperty}.
18134
18141
  */
@@ -18167,15 +18174,15 @@ const Fa = class Fa extends Ee {
18167
18174
  type: "enum",
18168
18175
  editable: !0,
18169
18176
  options: [
18170
- { label: Pe[1], value: 1 },
18171
- { label: Pe[2], value: 2 },
18172
- { label: Pe[3], value: 3 },
18173
- { label: Pe[4], value: 4 },
18174
- { label: Pe[5], value: 5 },
18175
- { label: Pe[6], value: 6 },
18176
- { label: Pe[7], value: 7 },
18177
- { label: Pe[8], value: 8 },
18178
- { label: Pe[9], value: 9 }
18177
+ { label: Ie[1], value: 1 },
18178
+ { label: Ie[2], value: 2 },
18179
+ { label: Ie[3], value: 3 },
18180
+ { label: Ie[4], value: 4 },
18181
+ { label: Ie[5], value: 5 },
18182
+ { label: Ie[6], value: 6 },
18183
+ { label: Ie[7], value: 7 },
18184
+ { label: Ie[8], value: 8 },
18185
+ { label: Ie[9], value: 9 }
18179
18186
  ],
18180
18187
  accessor: {
18181
18188
  get: () => this.attachmentPoint,
@@ -18453,7 +18460,7 @@ const Rd = /* @__PURE__ */ new Z(), Da = class Da extends ti {
18453
18460
  * @param numColumns - The number of columns in the table
18454
18461
  */
18455
18462
  constructor(t, e, s) {
18456
- super(t), this._attachmentPoint = Pe.TopLeft, this._numColumns = s, this._numRows = e, this._columnWidth = new Array(s), this._rowHeight = new Array(e), this._cells = new Array(e * s);
18463
+ super(t), this._attachmentPoint = Ie.TopLeft, this._numColumns = s, this._numRows = e, this._columnWidth = new Array(s), this._rowHeight = new Array(e), this._cells = new Array(e * s);
18457
18464
  }
18458
18465
  /**
18459
18466
  * Gets or sets the cell alignment value for this table.
@@ -18652,9 +18659,9 @@ const Rd = /* @__PURE__ */ new Z(), Da = class Da extends ti {
18652
18659
  s += E > 0 ? this.columnWidth(E - 1) : 0, e = 0;
18653
18660
  for (let M = 0; M < this.numRows; M++) {
18654
18661
  e += M > 0 ? this.rowHeight(M - 1) : 0;
18655
- const O = this.cell(M * this.numColumns + E);
18656
- if (f = M * this.numColumns + E, O && !x[f]) {
18657
- const z = O.borderWidth ?? 1, D = O.borderHeight ?? 1;
18662
+ const L = this.cell(M * this.numColumns + E);
18663
+ if (f = M * this.numColumns + E, L && !x[f]) {
18664
+ const z = L.borderWidth ?? 1, D = L.borderHeight ?? 1;
18658
18665
  this.fillVisited(
18659
18666
  x,
18660
18667
  f,
@@ -18665,20 +18672,20 @@ const Rd = /* @__PURE__ */ new Z(), Da = class Da extends ti {
18665
18672
  const B = h[o[c - 1] * 3] - s, dt = E + (M + D) * (this.numColumns + 1) + z;
18666
18673
  E + z == this.numColumns && (o[c++] = E + M * (this.numColumns + 1) + z, o[c++] = dt);
18667
18674
  const vt = -h[dt * 3 + 1] - e;
18668
- if (M + D == this.numRows && (o[c++] = E + (M + D) * (this.numColumns + 1) + D, o[c++] = E + (M + D) * (this.numColumns + 1)), o[c++] = E + (M + D) * (this.numColumns + 1), o[c++] = E + M * (this.numColumns + 1), O.text) {
18669
- const ot = O.attachmentPoint || this.attachmentPoint || Pe.MiddleCenter, W = this.getTableTextOffset(
18675
+ if (M + D == this.numRows && (o[c++] = E + (M + D) * (this.numColumns + 1) + D, o[c++] = E + (M + D) * (this.numColumns + 1)), o[c++] = E + (M + D) * (this.numColumns + 1), o[c++] = E + M * (this.numColumns + 1), L.text) {
18676
+ const ot = L.attachmentPoint || this.attachmentPoint || Ie.MiddleCenter, W = this.getTableTextOffset(
18670
18677
  ot,
18671
18678
  B,
18672
18679
  vt
18673
18680
  ), ut = {
18674
- text: O.text,
18675
- height: O.textHeight,
18681
+ text: L.text,
18682
+ height: L.textHeight,
18676
18683
  width: B,
18677
18684
  position: Rd.set(s, -e, 0).clone().add(W),
18678
18685
  rotation: this.rotation,
18679
18686
  attachmentPoint: ot
18680
18687
  }, st = {
18681
- ...this.getTextStyle(O),
18688
+ ...this.getTextStyle(L),
18682
18689
  color: this.color.color
18683
18690
  };
18684
18691
  g.push(t.mtext(ut, st));
@@ -18687,8 +18694,8 @@ const Rd = /* @__PURE__ */ new Z(), Da = class Da extends ti {
18687
18694
  }
18688
18695
  }
18689
18696
  g.push(t.lineSegments(h, 3, o, this.lineStyle));
18690
- const A = t.group(g), b = new un();
18691
- return b.setFromAxisAngle(Z.Z_AXIS, this.rotation), Ro.compose(this.position, b, this.scaleFactors), A.applyMatrix(Ro), this.attachEntityInfo(A), A;
18697
+ const w = t.group(g), b = new un();
18698
+ return b.setFromAxisAngle(Z.Z_AXIS, this.rotation), Ro.compose(this.position, b, this.scaleFactors), w.applyMatrix(Ro), this.attachEntityInfo(w), w;
18692
18699
  }
18693
18700
  /**
18694
18701
  * Marks cells as visited to handle merged cell rendering.
@@ -19095,6 +19102,133 @@ const Ua = class Ua extends Ee {
19095
19102
  get geometricExtents() {
19096
19103
  return new Ct();
19097
19104
  }
19105
+ /**
19106
+ * Returns the full property definition for this text entity, including
19107
+ * general group and geometry group.
19108
+ *
19109
+ * The geometry group exposes editable start/end coordinates via
19110
+ * {@link AcDbPropertyAccessor} so the property palette can update
19111
+ * the text in real-time.
19112
+ *
19113
+ * Each property is an {@link AcDbEntityRuntimeProperty}.
19114
+ */
19115
+ get properties() {
19116
+ return {
19117
+ type: this.type,
19118
+ groups: [
19119
+ this.getGeneralProperties(),
19120
+ {
19121
+ groupName: "text",
19122
+ properties: [
19123
+ {
19124
+ name: "contents",
19125
+ type: "string",
19126
+ editable: !0,
19127
+ accessor: {
19128
+ get: () => this.textString,
19129
+ set: (t) => {
19130
+ this.textString = t;
19131
+ }
19132
+ }
19133
+ },
19134
+ {
19135
+ name: "styleName",
19136
+ type: "string",
19137
+ editable: !0,
19138
+ accessor: {
19139
+ get: () => this.styleName,
19140
+ set: (t) => {
19141
+ this.styleName = t;
19142
+ }
19143
+ }
19144
+ },
19145
+ {
19146
+ name: "textHeight",
19147
+ type: "float",
19148
+ editable: !0,
19149
+ accessor: {
19150
+ get: () => this.height,
19151
+ set: (t) => {
19152
+ this.height = t;
19153
+ }
19154
+ }
19155
+ },
19156
+ {
19157
+ name: "rotation",
19158
+ type: "float",
19159
+ editable: !0,
19160
+ accessor: {
19161
+ get: () => this.rotation,
19162
+ set: (t) => {
19163
+ this.rotation = t;
19164
+ }
19165
+ }
19166
+ },
19167
+ {
19168
+ name: "widthFactor",
19169
+ type: "float",
19170
+ editable: !0,
19171
+ accessor: {
19172
+ get: () => this.widthFactor,
19173
+ set: (t) => {
19174
+ this.widthFactor = t;
19175
+ }
19176
+ }
19177
+ },
19178
+ {
19179
+ name: "oblique",
19180
+ type: "float",
19181
+ editable: !0,
19182
+ accessor: {
19183
+ get: () => this.oblique,
19184
+ set: (t) => {
19185
+ this.oblique = t;
19186
+ }
19187
+ }
19188
+ }
19189
+ ]
19190
+ },
19191
+ {
19192
+ groupName: "geometry",
19193
+ properties: [
19194
+ {
19195
+ name: "positionX",
19196
+ type: "float",
19197
+ editable: !0,
19198
+ accessor: {
19199
+ get: () => this.position.x,
19200
+ set: (t) => {
19201
+ this.position.x = t;
19202
+ }
19203
+ }
19204
+ },
19205
+ {
19206
+ name: "positionY",
19207
+ type: "float",
19208
+ editable: !0,
19209
+ accessor: {
19210
+ get: () => this.position.y,
19211
+ set: (t) => {
19212
+ this.position.y = t;
19213
+ }
19214
+ }
19215
+ },
19216
+ {
19217
+ name: "positionZ",
19218
+ type: "float",
19219
+ editable: !0,
19220
+ accessor: {
19221
+ get: () => this.position.z,
19222
+ set: (t) => {
19223
+ this.position.z = t;
19224
+ }
19225
+ }
19226
+ }
19227
+ ]
19228
+ }
19229
+ ]
19230
+ };
19231
+ }
19098
19232
  /**
19099
19233
  * Gets the text style for this text entity.
19100
19234
  *
@@ -19142,7 +19276,7 @@ const Ua = class Ua extends Ee {
19142
19276
  rotation: this.rotation,
19143
19277
  // MText draw text from top to bottom.
19144
19278
  drawingDirection: Gr.BOTTOM_TO_TOP,
19145
- attachmentPoint: Pe.BottomLeft
19279
+ attachmentPoint: Ie.BottomLeft
19146
19280
  }, o = { ...this.getTextStyle(), color: this.rgbColor };
19147
19281
  return t.mtext(s, o, e);
19148
19282
  }
@@ -21116,7 +21250,7 @@ const Ka = class Ka extends Ee {
21116
21250
  */
21117
21251
  getArrowName(t) {
21118
21252
  const e = this.database.tables.blockTable.getIdAt(t);
21119
- return e ? e.name.toUpperCase() : Ih.Closed;
21253
+ return e ? e.name.toUpperCase() : Ph.Closed;
21120
21254
  }
21121
21255
  };
21122
21256
  Ka.typeName = "Dimension";
@@ -22190,70 +22324,70 @@ class Do {
22190
22324
  }), e.hatchStyle = t.hatchStyle, e.patternName = t.patternName, e.patternType = t.patternType, e.patternAngle = t.patternAngle == null ? 0 : t.patternAngle, e.patternScale = t.patternScale == null ? 0 : t.patternScale, t.boundaryPaths.forEach((h) => {
22191
22325
  if (h.boundaryPathTypeFlag & 2) {
22192
22326
  const g = h, x = new Rn();
22193
- x.closed = g.isClosed, g.vertices.forEach((f, A) => {
22194
- x.addVertexAt(A, {
22327
+ x.closed = g.isClosed, g.vertices.forEach((f, w) => {
22328
+ x.addVertexAt(w, {
22195
22329
  x: f.x,
22196
22330
  y: f.y,
22197
22331
  bulge: f.bulge
22198
22332
  });
22199
22333
  }), e.add(x);
22200
22334
  } else {
22201
- const g = h, x = new Pd();
22335
+ const g = h, x = new Id();
22202
22336
  g.edges.forEach((f) => {
22203
22337
  if (f.type == 1) {
22204
- const A = f;
22205
- x.add(new ya(A.start, A.end));
22338
+ const w = f;
22339
+ x.add(new ya(w.start, w.end));
22206
22340
  } else if (f.type == 2) {
22207
- const A = f;
22341
+ const w = f;
22208
22342
  x.add(
22209
- new Ps(
22210
- A.center,
22211
- A.radius,
22212
- kt.degToRad(A.startAngle || 0),
22213
- kt.degToRad(A.endAngle || 0),
22214
- !A.isCCW
22343
+ new Is(
22344
+ w.center,
22345
+ w.radius,
22346
+ kt.degToRad(w.startAngle || 0),
22347
+ kt.degToRad(w.endAngle || 0),
22348
+ !w.isCCW
22215
22349
  )
22216
22350
  );
22217
22351
  } else if (f.type == 3) {
22218
- const A = f;
22219
- new Zt().subVectors(A.end, A.center);
22352
+ const w = f;
22353
+ new Zt().subVectors(w.end, w.center);
22220
22354
  const E = Math.sqrt(
22221
- Math.pow(A.end.x, 2) + Math.pow(A.end.y, 2)
22222
- ), M = E * A.lengthOfMinorAxis;
22223
- let O = kt.degToRad(A.startAngle || 0), z = kt.degToRad(A.endAngle || 0);
22224
- const D = Math.atan2(A.end.y, A.end.x);
22225
- A.isCCW || (O = Math.PI * 2 - O, z = Math.PI * 2 - z), x.add(
22355
+ Math.pow(w.end.x, 2) + Math.pow(w.end.y, 2)
22356
+ ), M = E * w.lengthOfMinorAxis;
22357
+ let L = kt.degToRad(w.startAngle || 0), z = kt.degToRad(w.endAngle || 0);
22358
+ const D = Math.atan2(w.end.y, w.end.x);
22359
+ w.isCCW || (L = Math.PI * 2 - L, z = Math.PI * 2 - z), x.add(
22226
22360
  new _a(
22227
- { ...A.center, z: 0 },
22361
+ { ...w.center, z: 0 },
22228
22362
  E,
22229
22363
  M,
22230
- O,
22364
+ L,
22231
22365
  z,
22232
- !A.isCCW,
22366
+ !w.isCCW,
22233
22367
  D
22234
22368
  )
22235
22369
  );
22236
22370
  } else if (f.type == 4) {
22237
- const A = f;
22238
- if (A.numberOfControlPoints > 0 && A.numberOfKnots > 0) {
22239
- const b = A.controlPoints.map(
22240
- (O) => ({
22241
- x: O.x,
22242
- y: O.y,
22371
+ const w = f;
22372
+ if (w.numberOfControlPoints > 0 && w.numberOfKnots > 0) {
22373
+ const b = w.controlPoints.map(
22374
+ (L) => ({
22375
+ x: L.x,
22376
+ y: L.y,
22243
22377
  z: 0
22244
22378
  })
22245
22379
  );
22246
22380
  let E = !0;
22247
- const M = A.controlPoints.map((O) => (O.weight == null && (E = !1), O.weight || 1));
22381
+ const M = w.controlPoints.map((L) => (L.weight == null && (E = !1), L.weight || 1));
22248
22382
  x.add(
22249
22383
  new mn(
22250
22384
  b,
22251
- A.knots,
22385
+ w.knots,
22252
22386
  E ? M : void 0
22253
22387
  )
22254
22388
  );
22255
- } else if (A.numberOfFitData > 0) {
22256
- const b = A.fitDatum.map((E) => ({
22389
+ } else if (w.numberOfFitData > 0) {
22390
+ const b = w.fitDatum.map((E) => ({
22257
22391
  x: E.x,
22258
22392
  y: E.y,
22259
22393
  z: 0
@@ -22985,23 +23119,23 @@ class Hd {
22985
23119
  timeout: x
22986
23120
  });
22987
23121
  const f = (b) => {
22988
- const { id: E, success: M, data: O, error: z } = b.data;
23122
+ const { id: E, success: M, data: L, error: z } = b.data;
22989
23123
  if (E !== t) return;
22990
23124
  this.cleanupTask(t);
22991
23125
  const D = Date.now() - o;
22992
23126
  h(M ? {
22993
23127
  success: !0,
22994
- data: O,
23128
+ data: L,
22995
23129
  duration: D
22996
23130
  } : {
22997
23131
  success: !1,
22998
23132
  error: z,
22999
23133
  duration: D
23000
23134
  });
23001
- }, A = (b) => {
23135
+ }, w = (b) => {
23002
23136
  this.cleanupTask(t), c(new Error(`Worker error: ${b.message}`));
23003
23137
  };
23004
- g.addEventListener("message", f), g.addEventListener("error", A), g.postMessage({
23138
+ g.addEventListener("message", f), g.addEventListener("error", w), g.postMessage({
23005
23139
  id: t,
23006
23140
  input: e
23007
23141
  });
@@ -23112,7 +23246,7 @@ class Yd {
23112
23246
  function qd(i) {
23113
23247
  return new Yd(i);
23114
23248
  }
23115
- class P0 {
23249
+ class I0 {
23116
23250
  constructor() {
23117
23251
  this.setupMessageHandler();
23118
23252
  }
@@ -23248,11 +23382,11 @@ class Xd extends Zo {
23248
23382
  t.forEach((c) => {
23249
23383
  if (c.type == "MTEXT") {
23250
23384
  const g = c;
23251
- [...g.text.matchAll(h)].forEach((A) => {
23252
- o.add(A[1].toLowerCase());
23385
+ [...g.text.matchAll(h)].forEach((w) => {
23386
+ o.add(w[1].toLowerCase());
23253
23387
  });
23254
23388
  const f = s.get(g.styleName);
23255
- f == null || f.forEach((A) => o.add(A));
23389
+ f == null || f.forEach((w) => o.add(w));
23256
23390
  } else if (c.type == "TEXT") {
23257
23391
  const g = c, x = s.get(g.styleName);
23258
23392
  x == null || x.forEach((f) => o.add(f));
@@ -23290,14 +23424,14 @@ class Xd extends Zo {
23290
23424
  s
23291
23425
  );
23292
23426
  this.config.convertByEntityType && (g = this.groupAndFlattenByType(g));
23293
- const A = e.tables.blockTable.modelSpace;
23427
+ const w = e.tables.blockTable.modelSpace;
23294
23428
  await f.processChunk(async (b, E) => {
23295
- let M = [], O = b < E ? g[b].type : "";
23429
+ let M = [], L = b < E ? g[b].type : "";
23296
23430
  for (let z = b; z < E; z++) {
23297
23431
  const D = g[z], B = c.convert(D);
23298
- B && (this.config.convertByEntityType && D.type !== O && (A.appendEntity(M), M = [], O = D.type), M.push(B));
23432
+ B && (this.config.convertByEntityType && D.type !== L && (w.appendEntity(M), M = [], L = D.type), M.push(B));
23299
23433
  }
23300
- if (A.appendEntity(M), h) {
23434
+ if (w.appendEntity(M), h) {
23301
23435
  let z = o.value + E / x * (100 - o.value);
23302
23436
  z > 100 && (z = 100), await h(z, "ENTITY", "IN-PROGRESS");
23303
23437
  }
@@ -23699,15 +23833,15 @@ class Kd extends Zo {
23699
23833
  );
23700
23834
  this.config.convertByEntityType && (c = this.groupAndFlattenByType(c));
23701
23835
  const f = e.tables.blockTable.modelSpace;
23702
- await x.processChunk(async (A, b) => {
23703
- let E = [], M = A < b ? c[A].type : "";
23704
- for (let O = A; O < b; O++) {
23705
- const z = c[O];
23836
+ await x.processChunk(async (w, b) => {
23837
+ let E = [], M = w < b ? c[w].type : "";
23838
+ for (let L = w; L < b; L++) {
23839
+ const z = c[L];
23706
23840
  this.config.convertByEntityType && z.type !== M && (this.triggerEvents(f, E), E = [], M = z.type), E.push(z);
23707
23841
  }
23708
23842
  if (this.triggerEvents(f, E), h) {
23709
- let O = o.value + b / g * (100 - o.value);
23710
- O > 100 && (O = 100), await h(O, "ENTITY", "IN-PROGRESS");
23843
+ let L = o.value + b / g * (100 - o.value);
23844
+ L > 100 && (L = 100), await h(L, "ENTITY", "IN-PROGRESS");
23711
23845
  }
23712
23846
  });
23713
23847
  }
@@ -26417,8 +26551,8 @@ class E0 extends pn {
26417
26551
  throw new Error("Failed to get response reader");
26418
26552
  const x = [];
26419
26553
  for (; ; ) {
26420
- const { done: O, value: z } = await g.read();
26421
- if (O)
26554
+ const { done: L, value: z } = await g.read();
26555
+ if (L)
26422
26556
  break;
26423
26557
  if (x.push(z), c += z.length, h !== null) {
26424
26558
  const D = Math.round(c / h * 100);
@@ -26431,9 +26565,9 @@ class E0 extends pn {
26431
26565
  }
26432
26566
  }
26433
26567
  const f = new Uint8Array(c);
26434
- let A = 0;
26435
- for (const O of x)
26436
- f.set(O, A), A += O.length;
26568
+ let w = 0;
26569
+ for (const L of x)
26570
+ f.set(L, w), w += L.length;
26437
26571
  this.getFileNameFromUri(t).toLowerCase().split(".").pop() === "dwg" ? await this.read(f.buffer, e, Zs.DWG) : await this.read(f.buffer, e, Zs.DXF), this.events.openProgress.dispatch({
26438
26572
  database: this,
26439
26573
  percentage: 100,
@@ -26590,7 +26724,7 @@ const o0 = {
26590
26724
  viewTwistAngle: 0,
26591
26725
  frozenLayers: [],
26592
26726
  styleSheet: "",
26593
- renderMode: Ph.OPTIMIZED_2D,
26727
+ renderMode: Ih.OPTIMIZED_2D,
26594
26728
  viewMode: 0,
26595
26729
  ucsIconSetting: 0,
26596
26730
  ucsOrigin: new Y(0, 0, 0),
@@ -27079,7 +27213,7 @@ export {
27079
27213
  qo as AcDbAngleUnits,
27080
27214
  Vi as AcDbArc,
27081
27215
  Bo as AcDbArcDimension,
27082
- P0 as AcDbBaseWorker,
27216
+ I0 as AcDbBaseWorker,
27083
27217
  Yo as AcDbBatchProcessing,
27084
27218
  ti as AcDbBlockReference,
27085
27219
  $d as AcDbBlockTable,
@@ -27161,7 +27295,7 @@ export {
27161
27295
  be as AcGeBox2d,
27162
27296
  Ct as AcGeBox3d,
27163
27297
  Md as AcGeCatmullRomCurve3d,
27164
- Ps as AcGeCircArc2d,
27298
+ Is as AcGeCircArc2d,
27165
27299
  Ln as AcGeCircArc3d,
27166
27300
  Ms as AcGeCurve2d,
27167
27301
  _a as AcGeEllipseArc2d,
@@ -27170,7 +27304,7 @@ export {
27170
27304
  gd as AcGeGeometryUtil,
27171
27305
  ya as AcGeLine2d,
27172
27306
  dn as AcGeLine3d,
27173
- Pd as AcGeLoop2d,
27307
+ Id as AcGeLoop2d,
27174
27308
  kt as AcGeMathUtil,
27175
27309
  ga as AcGeMatrix2d,
27176
27310
  cn as AcGeMatrix3d,
@@ -27185,12 +27319,12 @@ export {
27185
27319
  gh as AcGeTol,
27186
27320
  Zt as AcGeVector2d,
27187
27321
  Z as AcGeVector3d,
27188
- Ih as AcGiArrowType,
27322
+ Ph as AcGiArrowType,
27189
27323
  kh as AcGiDefaultLightingType,
27190
- Pe as AcGiMTextAttachmentPoint,
27324
+ Ie as AcGiMTextAttachmentPoint,
27191
27325
  Gr as AcGiMTextFlowDirection,
27192
27326
  Eh as AcGiOrthographicType,
27193
- Ph as AcGiRenderMode,
27327
+ Ih as AcGiRenderMode,
27194
27328
  xa as AcGiViewport,
27195
27329
  g0 as AcTrStringUtil,
27196
27330
  lu as ByBlock,
@@ -27225,12 +27359,12 @@ export {
27225
27359
  fd as generateUniformKnots,
27226
27360
  Jh as has,
27227
27361
  ch as intPartLength,
27228
- I0 as interpolateControlPoints,
27362
+ P0 as interpolateControlPoints,
27229
27363
  Zc as inverseLerp,
27230
27364
  cd as isBetween,
27231
27365
  dd as isBetweenAngle,
27232
27366
  tu as isEmpty,
27233
- Is as isEqual,
27367
+ Ps as isEqual,
27234
27368
  x0 as isImperialUnits,
27235
27369
  y0 as isMetricUnits,
27236
27370
  _h as isPointInPolygon,