@vitessce/comparative 4.0.0-test.0 → 4.0.0-test.2

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.
Files changed (23) hide show
  1. package/dist/{GeometryAndMeshXR-DbXTK2iw.js → GeometryAndMeshXR-Rj8DuqKI.js} +4 -4
  2. package/dist/{OrbitControls-BRGXsf1T.js → OrbitControls-CSK4x9Nb.js} +1 -1
  3. package/dist/{ReactNeuroglancer-Crb1U7Tn.js → ReactNeuroglancer-BAmwPpri.js} +696 -661
  4. package/dist/{XREnterButton-C9Klf67I.js → XREnterButton-BTyk-JNM.js} +1 -1
  5. package/dist/{XRSceneComponents-DiBc2L-q.js → XRSceneComponents-Bdj5nq7u.js} +2 -2
  6. package/dist/{XRWrapper-CUvoPsz0.js → XRWrapper-C_ChUWmZ.js} +2 -2
  7. package/dist/{deflate-B9H5qR9U.js → deflate-CrBkHn3o.js} +1 -1
  8. package/dist/{emulate-_ez3oxw8.js → emulate-BMuLpa2M.js} +2 -2
  9. package/dist/{higlass-B_MV2PxY.js → higlass-R4akpd_U.js} +31823 -30868
  10. package/dist/{index-BX839aW7.js → index-BvABCvu0.js} +65 -8
  11. package/dist/{index-D0v2yFRh.js → index-CaGs2wGk.js} +370 -366
  12. package/dist/{index-bml8OCCz.js → index-ChP-N2-Q.js} +100916 -100730
  13. package/dist/{index-BKHCQDj_.js → index-evkxJwCU.js} +1 -1
  14. package/dist/index.min.js +1 -1
  15. package/dist/{jpeg-D_7ycwtQ.js → jpeg-CmFz2x7u.js} +1 -1
  16. package/dist/{lerc-BqhNOBeL.js → lerc-D9Z1SChC.js} +1 -1
  17. package/dist/{lzw-DUcfioj8.js → lzw-BxcPIsd9.js} +1 -1
  18. package/dist/{packbits-CgF8yylX.js → packbits-BvyhLVrx.js} +1 -1
  19. package/dist/{raw-CuemTavy.js → raw-nQNg2593.js} +1 -1
  20. package/dist/{ray-grab-4cLIYg6C.js → ray-grab-CunbRXU8.js} +3 -3
  21. package/dist/{webimage-BulHlQ32.js → webimage-CD0PiPO_.js} +1 -1
  22. package/dist/{xrStore-Ckkme0YQ.js → xrStore-BFuIULKr.js} +1 -1
  23. package/package.json +11 -11
@@ -3,7 +3,7 @@ var p_ = (i, e, t) => e in i ? f_(i, e, { enumerable: !0, configurable: !0, writ
3
3
  var Qn = (i, e, t) => p_(i, typeof e != "symbol" ? e + "" : e, t);
4
4
  import { jsx as g_, jsxs as m_ } from "react/jsx-runtime";
5
5
  import Hb from "react";
6
- import { g as Qe, bs as v_, bt as Ot, bu as ut, bv as Hv, bw as qv, bx as $k, by as jv, bz as Mr, bA as Jv, bB as aa, bC as Ro, bD as Ao, bE as Gk, bF as oa, bG as qu, bH as Nr, bI as ju, bJ as Ju, bK as xs, bL as y_, bM as S_, bN as b_, bO as Ku, bP as w_, bQ as C_, bR as Wk, bS as Yu, bT as x_, bU as E_, bV as k_, bW as T_, bX as L_, bY as Kv, bZ as Hk, b_ as D_, b$ as Yv, c0 as I_, c1 as P_, c2 as R_, c3 as A_, c4 as __, c5 as M_, c6 as N_, c7 as O_, c8 as V_, c9 as B_ } from "./index-bml8OCCz.js";
6
+ import { g as Qe, bs as v_, bt as Ot, bu as ut, bv as Hv, bw as qv, bx as $k, by as jv, bz as Nr, bA as Jv, bB as aa, bC as Ro, bD as Ao, bE as Gk, bF as oa, bG as qu, bH as Or, bI as ju, bJ as Ju, bK as xs, bL as y_, bM as S_, bN as b_, bO as Ku, bP as w_, bQ as C_, bR as Wk, bS as Yu, bT as x_, bU as E_, bV as k_, bW as T_, bX as L_, bY as Kv, bZ as Hk, b_ as D_, b$ as Yv, c0 as I_, c1 as P_, c2 as R_, c3 as A_, c4 as __, c5 as M_, c6 as N_, c7 as O_, c8 as V_, c9 as B_ } from "./index-ChP-N2-Q.js";
7
7
  var F_ = v_();
8
8
  const H = /* @__PURE__ */ Qe(F_);
9
9
  var qb = {}, Nf, jb;
@@ -43,7 +43,7 @@ var xd = {}, Bf, Xb;
43
43
  function Xu() {
44
44
  if (Xb) return Bf;
45
45
  Xb = 1;
46
- var i = jv(), e = Mr()("toStringTag"), t = i(/* @__PURE__ */ function() {
46
+ var i = jv(), e = Nr()("toStringTag"), t = i(/* @__PURE__ */ function() {
47
47
  return arguments;
48
48
  }()) == "Arguments", n = function(r, s) {
49
49
  try {
@@ -60,7 +60,7 @@ var Ff, Zb;
60
60
  function W_() {
61
61
  if (Zb) return Ff;
62
62
  Zb = 1;
63
- var i = Xu(), e = Mr()("iterator"), t = Jv();
63
+ var i = Xu(), e = Nr()("iterator"), t = Jv();
64
64
  return Ff = ut().isIterable = function(n) {
65
65
  var r = Object(n);
66
66
  return r[e] !== void 0 || "@@iterator" in r || t.hasOwnProperty(i(r));
@@ -78,7 +78,7 @@ var $f, tw;
78
78
  function Xv() {
79
79
  if (tw) return $f;
80
80
  tw = 1;
81
- var i = Xu(), e = Mr()("iterator"), t = Jv();
81
+ var i = Xu(), e = Nr()("iterator"), t = Jv();
82
82
  return $f = ut().getIteratorMethod = function(n) {
83
83
  if (n != null) return n[e] || n["@@iterator"] || t[i(n)];
84
84
  }, $f;
@@ -175,7 +175,7 @@ var Yf, cw;
175
175
  function Kk() {
176
176
  if (cw) return Yf;
177
177
  cw = 1;
178
- var i = Jv(), e = Mr()("iterator"), t = Array.prototype;
178
+ var i = Jv(), e = Nr()("iterator"), t = Array.prototype;
179
179
  return Yf = function(n) {
180
180
  return n !== void 0 && (i.Array === n || t[e] === n);
181
181
  }, Yf;
@@ -201,7 +201,7 @@ var Xf, uw;
201
201
  function Yk() {
202
202
  if (uw) return Xf;
203
203
  uw = 1;
204
- var i = Nr(), e = ut(), t = ju(), n = Ju(), r = Mr()("species");
204
+ var i = Or(), e = ut(), t = ju(), n = Ju(), r = Nr()("species");
205
205
  return Xf = function(s) {
206
206
  var a = typeof e[s] == "function" ? e[s] : i[s];
207
207
  n && a && !a[r] && t.f(a, r, {
@@ -305,7 +305,7 @@ var ep, pw;
305
305
  function X_() {
306
306
  if (pw) return ep;
307
307
  pw = 1;
308
- var i = xs(), e = w_(), t = Mr()("species");
308
+ var i = xs(), e = w_(), t = Nr()("species");
309
309
  return ep = function(n) {
310
310
  var r;
311
311
  return e(n) && (r = n.constructor, typeof r == "function" && (r === Array || e(r.prototype)) && (r = void 0), i(r) && (r = r[t], r === null && (r = void 0))), r === void 0 ? Array : r;
@@ -353,7 +353,7 @@ var ip, vw;
353
353
  function eh() {
354
354
  if (vw) return ip;
355
355
  vw = 1;
356
- var i = Nr(), e = Ot(), t = Ku(), n = Hv(), r = Gk(), s = Zu(), a = _o(), l = Qu(), d = xs(), u = Wk(), h = ju().f, g = Zv()(0), v = Ju();
356
+ var i = Or(), e = Ot(), t = Ku(), n = Hv(), r = Gk(), s = Zu(), a = _o(), l = Qu(), d = xs(), u = Wk(), h = ju().f, g = Zv()(0), v = Ju();
357
357
  return ip = function(y, C, w, b, E, T) {
358
358
  var P = i[y], R = P, I = E ? "set" : "add", L = R && R.prototype, A = {};
359
359
  return !v || typeof R != "function" || !(T || L.forEach && !n(function() {
@@ -483,7 +483,7 @@ var hp, _w;
483
483
  function Qk() {
484
484
  if (_w) return hp;
485
485
  _w = 1;
486
- var i = Mr()("iterator"), e = !1;
486
+ var i = Nr()("iterator"), e = !1;
487
487
  try {
488
488
  var t = [7][i]();
489
489
  t.return = function() {
@@ -1298,7 +1298,7 @@ function ty(i, e) {
1298
1298
  i[0] = e[0], i[1] = e[4], i[2] = e[8], i[3] = e[12], i[4] = e[1], i[5] = e[5], i[6] = e[9], i[7] = e[13], i[8] = e[2], i[9] = e[6], i[10] = e[10], i[11] = e[14], i[12] = e[3], i[13] = e[7], i[14] = e[11], i[15] = e[15];
1299
1299
  return i;
1300
1300
  }
1301
- function gs(i, e) {
1301
+ function ms(i, e) {
1302
1302
  var t = e[0], n = e[1], r = e[2], s = e[3], a = e[4], l = e[5], d = e[6], u = e[7], h = e[8], g = e[9], v = e[10], y = e[11], C = e[12], w = e[13], b = e[14], E = e[15], T = t * l - n * a, P = t * d - r * a, R = t * u - s * a, I = n * d - r * l, L = n * u - s * l, A = r * u - s * d, M = h * w - g * C, O = h * b - v * C, F = h * E - y * C, q = g * b - v * w, U = g * E - y * w, V = v * E - y * b, $ = T * V - P * U + R * q + I * F - L * O + A * M;
1303
1303
  return $ ? ($ = 1 / $, i[0] = (l * V - d * U + u * q) * $, i[1] = (r * U - n * V - s * q) * $, i[2] = (w * A - b * L + E * I) * $, i[3] = (v * L - g * A - y * I) * $, i[4] = (d * F - a * V - u * O) * $, i[5] = (t * V - r * F + s * O) * $, i[6] = (b * R - C * A - E * P) * $, i[7] = (h * A - v * R + y * P) * $, i[8] = (a * U - l * F + u * M) * $, i[9] = (n * F - t * U - s * M) * $, i[10] = (C * L - w * R + E * T) * $, i[11] = (g * R - h * L - y * T) * $, i[12] = (l * O - a * q - d * M) * $, i[13] = (t * q - n * O + r * M) * $, i[14] = (w * P - C * I - b * T) * $, i[15] = (h * I - g * P + v * T) * $, i) : null;
1304
1304
  }
@@ -1439,7 +1439,7 @@ function fm(i, e, t) {
1439
1439
  var n = Math.sin(t);
1440
1440
  return i[0] = n * e[0], i[1] = n * e[1], i[2] = n * e[2], i[3] = Math.cos(t), i;
1441
1441
  }
1442
- function us(i, e, t) {
1442
+ function hs(i, e, t) {
1443
1443
  var n = e[0], r = e[1], s = e[2], a = e[3], l = t[0], d = t[1], u = t[2], h = t[3];
1444
1444
  return i[0] = n * h + a * l + r * u - s * d, i[1] = r * h + a * d + s * l - n * u, i[2] = s * h + a * u + n * d - r * l, i[3] = a * h - n * l - r * d - s * u, i;
1445
1445
  }
@@ -1887,7 +1887,7 @@ var cC = {}, dC;
1887
1887
  function kN() {
1888
1888
  if (dC) return cC;
1889
1889
  dC = 1;
1890
- var i = Ot(), e = Nr().isFinite;
1890
+ var i = Ot(), e = Or().isFinite;
1891
1891
  return i(i.S, "Number", {
1892
1892
  isFinite: function(n) {
1893
1893
  return typeof n == "number" && e(n);
@@ -2209,7 +2209,7 @@ function No(i) {
2209
2209
  * See the License for the specific language governing permissions and
2210
2210
  * limitations under the License.
2211
2211
  */
2212
- const vC = 2 ** -1074, bm = new Float64Array(1), rs = new Uint32Array(bm.buffer);
2212
+ const vC = 2 ** -1074, bm = new Float64Array(1), ss = new Uint32Array(bm.buffer);
2213
2213
  function WN(i, e) {
2214
2214
  if (isNaN(i) || isNaN(e)) return NaN;
2215
2215
  if (i === e) return e;
@@ -2217,7 +2217,7 @@ function WN(i, e) {
2217
2217
  return e < 0 ? -vC : vC;
2218
2218
  bm[0] = i;
2219
2219
  const t = pc === jn.LITTLE ? 0 : 1, n = 1 - t;
2220
- return e > i == i > 0 ? rs[t] === 4294967295 ? (rs[t] = 0, rs[n] += 1) : rs[t] += 1 : rs[t] === 0 ? (rs[t] = 4294967295, rs[n] -= 1) : rs[t] -= 1, bm[0];
2220
+ return e > i == i > 0 ? ss[t] === 4294967295 ? (ss[t] = 0, ss[n] += 1) : ss[t] += 1 : ss[t] === 0 ? (ss[t] = 4294967295, ss[n] -= 1) : ss[t] -= 1, bm[0];
2221
2221
  }
2222
2222
  var yC = {}, SC;
2223
2223
  function HN() {
@@ -2610,7 +2610,7 @@ var _e;
2610
2610
  (function(i) {
2611
2611
  i[i.POINT = 0] = "POINT", i[i.LINE = 1] = "LINE", i[i.AXIS_ALIGNED_BOUNDING_BOX = 2] = "AXIS_ALIGNED_BOUNDING_BOX", i[i.ELLIPSOID = 3] = "ELLIPSOID", i[i.SPHERE = 4] = "SPHERE";
2612
2612
  })(_e || (_e = {}));
2613
- const Lr = [_e.POINT, _e.LINE, _e.AXIS_ALIGNED_BOUNDING_BOX, _e.ELLIPSOID, _e.SPHERE], ms = {
2613
+ const Lr = [_e.POINT, _e.LINE, _e.AXIS_ALIGNED_BOUNDING_BOX, _e.ELLIPSOID, _e.SPHERE], vs = {
2614
2614
  rgb: {
2615
2615
  serializedBytes() {
2616
2616
  return 3;
@@ -2797,7 +2797,7 @@ function AT(i, e, t) {
2797
2797
  const r = t.length, s = new Array(r), a = [];
2798
2798
  for (let v = 0; v < r; ++v)
2799
2799
  s[v] = v;
2800
- const l = (v) => ms[t[v].type].alignment(i);
2800
+ const l = (v) => vs[t[v].type].alignment(i);
2801
2801
  s.sort((v, y) => l(y) - l(v));
2802
2802
  let d = 0;
2803
2803
  const u = new Array(r);
@@ -2806,7 +2806,7 @@ function AT(i, e, t) {
2806
2806
  h += (4 - h % 4) % 4, n += h, a[d] = h, h = 0, ++d;
2807
2807
  };
2808
2808
  for (let v = 0; v < r; ++v) {
2809
- const y = s[v], C = t[y], w = ms[C.type], b = w.serializedBytes(i), E = w.alignment(i), T = (E - h % E) % E, R = h + T + b;
2809
+ const y = s[v], C = t[y], w = vs[C.type], b = w.serializedBytes(i), E = w.alignment(i), T = (E - h % E) % E, R = h + T + b;
2810
2810
  R + (4 - R % 4) % 4 <= rO ? h += T : g(), u[y] = { offset: h, group: d }, h += b;
2811
2811
  }
2812
2812
  return g(), { serializedBytes: n, offsets: u, propertyGroupBytes: a };
@@ -2830,7 +2830,7 @@ class _T {
2830
2830
  const g = n.length;
2831
2831
  for (let y = 0; y < g; ++y) {
2832
2832
  var v = a[y];
2833
- const C = v.group, w = v.offset, b = n[y], E = ms[b.type], T = `properties[${y}]`, P = `groupOffset${C} + ${w}`;
2833
+ const C = v.group, w = v.offset, b = n[y], E = vs[b.type], T = `properties[${y}]`, P = `groupOffset${C} + ${w}`;
2834
2834
  u += E.serializeCode(T, P, e), h += E.deserializeCode(T, P, e);
2835
2835
  }
2836
2836
  this.serializedBytes = s, this.serialize = new Function("dv", "offset", "annotationIndex", "annotationCount", "isLittleEndian", "properties", u), this.deserialize = new Function("dv", "offset", "annotationIndex", "annotationCount", "isLittleEndian", "properties", h);
@@ -2870,7 +2870,7 @@ function aO(i) {
2870
2870
  return e;
2871
2871
  }
2872
2872
  function oO(i) {
2873
- if (Le(i), !Object.prototype.hasOwnProperty.call(ms, i))
2873
+ if (Le(i), !Object.prototype.hasOwnProperty.call(vs, i))
2874
2874
  throw new Error("Unsupported property type: $JSON.stringify(obj)}");
2875
2875
  return i;
2876
2876
  }
@@ -2885,7 +2885,7 @@ function lO(i) {
2885
2885
  function cO(i) {
2886
2886
  ge(i);
2887
2887
  const e = Y(i, "id", aO), t = Y(i, "type", oO), n = ye(i, "description", Le);
2888
- let r = ye(i, "default", (l) => ms[t].deserializeJson(l), 0), s, a;
2888
+ let r = ye(i, "default", (l) => vs[t].deserializeJson(l), 0), s, a;
2889
2889
  switch (t) {
2890
2890
  case "rgb":
2891
2891
  case "rgba":
@@ -2903,7 +2903,7 @@ function dO(i) {
2903
2903
  id: i.identifier,
2904
2904
  description: i.description,
2905
2905
  type: i.type,
2906
- default: e === 0 ? void 0 : ms[i.type].serializeJson(e)
2906
+ default: e === 0 ? void 0 : vs[i.type].serializeJson(e)
2907
2907
  };
2908
2908
  }
2909
2909
  function uO(i) {
@@ -3056,7 +3056,7 @@ function Em(i, e) {
3056
3056
  const n = i.relatedSegments;
3057
3057
  if (n !== void 0 && n.some((r) => r.length !== 0) && (t.segments = n.map((r) => r.map((s) => s.toString()))), e.properties.length !== 0) {
3058
3058
  const r = e.properties;
3059
- t.props = i.properties.map((s, a) => ms[r[a].type].serializeJson(s));
3059
+ t.props = i.properties.map((s, a) => vs[r[a].type].serializeJson(s));
3060
3060
  }
3061
3061
  return t;
3062
3062
  }
@@ -3069,7 +3069,7 @@ function hO(i, e, t = !1) {
3069
3069
  return u.length === 0 ? e.relationships.map(() => []) : e.relationships.length === 1 && !Array.isArray(u[0]) ? [We(u, (h) => te.parseString(h))] : We(ji(d, e.relationships.length), (h) => We(h, (g) => te.parseString(g)));
3070
3070
  }), a = Y(i, "props", (d) => {
3071
3071
  const u = e.properties;
3072
- return d === void 0 ? u.map((h) => h.default) : We(ji(d, e.properties.length), (h, g) => ms[u[g].type].deserializeJson(h));
3072
+ return d === void 0 ? u.map((h) => h.default) : We(ji(d, e.properties.length), (h, g) => vs[u[g].type].deserializeJson(h));
3073
3073
  }), l = {
3074
3074
  id: r,
3075
3075
  description: Y(i, "description", Li),
@@ -4670,7 +4670,7 @@ function iL(i, e) {
4670
4670
  }
4671
4671
  }
4672
4672
  const h = Je();
4673
- gs(h, u);
4673
+ ms(h, u);
4674
4674
  for (let g = d.length; g < 3; ++g)
4675
4675
  d[g] = -1;
4676
4676
  return {
@@ -4791,12 +4791,12 @@ var vr;
4791
4791
  (function(i) {
4792
4792
  i[i.numChunks = 0] = "numChunks", i[i.systemMemoryBytes = 1] = "systemMemoryBytes", i[i.gpuMemoryBytes = 2] = "gpuMemoryBytes";
4793
4793
  })(vr || (vr = {}));
4794
- const os = 3;
4794
+ const ls = 3;
4795
4795
  function Gs(i, e) {
4796
4796
  return i * sL + e;
4797
4797
  }
4798
4798
  function jC(i) {
4799
- return rL * sL * os + i;
4799
+ return rL * sL * ls + i;
4800
4800
  }
4801
4801
  const dV = "ChunkQueueManager", uV = "ChunkManager", hV = "ChunkSource.invalidate", fV = "ChunkQueueManager.requestChunkStatistics", pV = "ChunkManager.chunkLayerStatistics";
4802
4802
  class Sy {
@@ -5121,7 +5121,7 @@ function yV(i, e) {
5121
5121
  }
5122
5122
  function fL(i) {
5123
5123
  const e = i.viewMatrix, t = i.viewProjectionMat;
5124
- gs(e, i.invViewMatrix), en(t, i.projectionMat, e), gs(i.invViewProjectionMat, t);
5124
+ ms(e, i.invViewMatrix), en(t, i.projectionMat, e), ms(i.invViewProjectionMat, t);
5125
5125
  }
5126
5126
  /**
5127
5127
  * @license
@@ -5173,7 +5173,7 @@ var JC = {}, Kp, KC;
5173
5173
  function pL() {
5174
5174
  if (KC) return Kp;
5175
5175
  KC = 1;
5176
- var i = Ao(), e = Yu(), t = Mr()("species");
5176
+ var i = Ao(), e = Yu(), t = Nr()("species");
5177
5177
  return Kp = function(n, r) {
5178
5178
  var s = i(n).constructor, a;
5179
5179
  return s === void 0 || (a = i(s)[t]) == null ? r : e(a);
@@ -5202,7 +5202,7 @@ var Xp, XC;
5202
5202
  function gL() {
5203
5203
  if (XC) return Xp;
5204
5204
  XC = 1;
5205
- var i = oa(), e = xV(), t = P_(), n = R_(), r = Nr(), s = r.process, a = r.setImmediate, l = r.clearImmediate, d = r.MessageChannel, u = r.Dispatch, h = 0, g = {}, v = "onreadystatechange", y, C, w, b = function() {
5205
+ var i = oa(), e = xV(), t = P_(), n = R_(), r = Or(), s = r.process, a = r.setImmediate, l = r.clearImmediate, d = r.MessageChannel, u = r.Dispatch, h = 0, g = {}, v = "onreadystatechange", y, C, w, b = function() {
5206
5206
  var T = +this;
5207
5207
  if (g.hasOwnProperty(T)) {
5208
5208
  var P = g[T];
@@ -5239,7 +5239,7 @@ var Zp, ZC;
5239
5239
  function EV() {
5240
5240
  if (ZC) return Zp;
5241
5241
  ZC = 1;
5242
- var i = Nr(), e = gL().set, t = i.MutationObserver || i.WebKitMutationObserver, n = i.process, r = i.Promise, s = jv()(n) == "process";
5242
+ var i = Or(), e = gL().set, t = i.MutationObserver || i.WebKitMutationObserver, n = i.process, r = i.Promise, s = jv()(n) == "process";
5243
5243
  return Zp = function() {
5244
5244
  var a, l, d, u = function() {
5245
5245
  var y, C;
@@ -5307,7 +5307,7 @@ var tg, tx;
5307
5307
  function kV() {
5308
5308
  if (tx) return tg;
5309
5309
  tx = 1;
5310
- var i = Nr(), e = i.navigator;
5310
+ var i = Or(), e = i.navigator;
5311
5311
  return tg = e && e.userAgent || "", tg;
5312
5312
  }
5313
5313
  var ng, nx;
@@ -5325,10 +5325,10 @@ var ix;
5325
5325
  function TV() {
5326
5326
  if (ix) return JC;
5327
5327
  ix = 1;
5328
- var i = A_(), e = Nr(), t = oa(), n = Xu(), r = Ot(), s = xs(), a = Yu(), l = Qu(), d = _o(), u = pL(), h = gL().set, g = EV()(), v = wy(), y = mL(), C = kV(), w = vL(), b = "Promise", E = e.TypeError, T = e.process, P = T && T.versions, R = P && P.v8 || "", I = e[b], L = n(T) == "process", A = function() {
5328
+ var i = A_(), e = Or(), t = oa(), n = Xu(), r = Ot(), s = xs(), a = Yu(), l = Qu(), d = _o(), u = pL(), h = gL().set, g = EV()(), v = wy(), y = mL(), C = kV(), w = vL(), b = "Promise", E = e.TypeError, T = e.process, P = T && T.versions, R = P && P.v8 || "", I = e[b], L = n(T) == "process", A = function() {
5329
5329
  }, M, O, F, q, U = O = v.f, V = !!function() {
5330
5330
  try {
5331
- var oe = I.resolve(1), he = (oe.constructor = {})[Mr()("species")] = function(Ae) {
5331
+ var oe = I.resolve(1), he = (oe.constructor = {})[Nr()("species")] = function(Ae) {
5332
5332
  Ae(A, A);
5333
5333
  };
5334
5334
  return (L || typeof PromiseRejectionEvent == "function") && oe.then(A) instanceof he && R.indexOf("6.6") !== 0 && C.indexOf("Chrome/66") === -1;
@@ -5455,7 +5455,7 @@ var rx = {}, sx;
5455
5455
  function LV() {
5456
5456
  if (sx) return rx;
5457
5457
  sx = 1;
5458
- var i = Ot(), e = ut(), t = Nr(), n = pL(), r = vL();
5458
+ var i = Ot(), e = ut(), t = Or(), n = pL(), r = vL();
5459
5459
  return i(i.P + i.R, "Promise", { finally: function(s) {
5460
5460
  var a = n(this, e.Promise || t.Promise), l = typeof s == "function";
5461
5461
  return this.then(
@@ -5515,10 +5515,10 @@ class AV {
5515
5515
  return "CANCELED";
5516
5516
  }
5517
5517
  }
5518
- const vs = new AV();
5518
+ const ys = new AV();
5519
5519
  function _V(i) {
5520
5520
  if (i.isCanceled === !0)
5521
- throw vs;
5521
+ throw ys;
5522
5522
  }
5523
5523
  const Im = () => {
5524
5524
  }, Nt = {
@@ -5611,7 +5611,7 @@ kt(Pm, function(i) {
5611
5611
  let e = i.id;
5612
5612
  var t = this.get(e);
5613
5613
  let n = t.resolve, r = t.reject;
5614
- this.delete(e), i.hasOwnProperty("value") ? n(i.value) : i.errorName === vs.name ? r(vs) : r(new OV(i.errorName, i.error));
5614
+ this.delete(e), i.hasOwnProperty("value") ? n(i.value) : i.errorName === ys.name ? r(ys) : r(new OV(i.errorName, i.error));
5615
5615
  });
5616
5616
  const VV = yL ? -1 : 0;
5617
5617
  class BV {
@@ -8393,7 +8393,7 @@ function aF(i, e, t, n, r) {
8393
8393
  a[4 * v + C] *= y;
8394
8394
  }
8395
8395
  const l = qB;
8396
- gs(l, a);
8396
+ ms(l, a);
8397
8397
  const d = _y, u = My, h = 1e-3;
8398
8398
  for (let v = 0; v < 3; ++v) {
8399
8399
  const y = l[12 + v] + h / s[v], C = Math.abs(l[v]), w = Math.abs(l[4 + v]);
@@ -8429,7 +8429,7 @@ function Ny(i, e) {
8429
8429
  const b = Math.max(1, v - g);
8430
8430
  n[12 + u] = g, n[5 * u] = b;
8431
8431
  }
8432
- return gs(r, n), Ga;
8432
+ return ms(r, n), Ga;
8433
8433
  }
8434
8434
  const oF = "annotation.MetadataChunkSource", lF = "annotation.GeometryChunkSource", cF = "annotation.SubsetGeometryChunkSource", dF = "annotation.reference.add", uF = "annotation.reference.delete", hF = "annotation.commit", fF = "annotation.commit", pF = "annotation/SpatiallyIndexedRenderLayer", gF = "annotation/PerspectiveRenderLayer:updateSources", mF = "annotation/RenderLayer", vF = "annotation/RenderLayer.updateSegmentation", yF = hc();
8435
8435
  function SF(i, e, t, n, r, s) {
@@ -8927,7 +8927,7 @@ let Mm = class extends er {
8927
8927
  var n = t.promise;
8928
8928
  const r = n.resolve, s = n.reject;
8929
8929
  if (n.cancellationToken.isCanceled) {
8930
- s(vs);
8930
+ s(ys);
8931
8931
  return;
8932
8932
  }
8933
8933
  const l = t.key, d = e.chunks.get(l);
@@ -9036,7 +9036,7 @@ let Nm = class extends er {
9036
9036
  }
9037
9037
  };
9038
9038
  Nm = Vy([hi(uV)], Nm);
9039
- class Or extends er {
9039
+ class Vr extends er {
9040
9040
  constructor(e, t = {}) {
9041
9041
  super(), this.chunkManager = e, this.chunks = new ce(), this.immediateChunkUpdates = !1;
9042
9042
  }
@@ -9172,7 +9172,7 @@ function Bo(i, e) {
9172
9172
  }
9173
9173
  }
9174
9174
  }
9175
- const jt = 40, QL = 0.5, eD = -4;
9175
+ const Jt = 40, QL = 0.5, eD = -4;
9176
9176
  function jd(i) {
9177
9177
  return (Un(i) - eD) / QL;
9178
9178
  }
@@ -9184,7 +9184,7 @@ function ia(i) {
9184
9184
  }
9185
9185
  class yo {
9186
9186
  constructor() {
9187
- this.visibility = new Xl(), this.changed = new be(), this.frameNumber = -1, this.spatialScales = new ce(), this.numHistogramRows = 1, this.value = new Uint32Array(jt * this.numHistogramRows * 2);
9187
+ this.visibility = new Xl(), this.changed = new be(), this.frameNumber = -1, this.spatialScales = new ce(), this.numHistogramRows = 1, this.value = new Uint32Array(Jt * this.numHistogramRows * 2);
9188
9188
  }
9189
9189
  begin(e) {
9190
9190
  e !== this.frameNumber && (this.value.fill(0), this.frameNumber = e, this.spatialScales.clear(), this.changed.dispatch());
@@ -9201,11 +9201,11 @@ class yo {
9201
9201
  let s = this.spatialScales, a = this.numHistogramRows, l = this.value, d = s.get(e);
9202
9202
  if (d === void 0 && (d = s.size, s.set(e, d)), d >= a) {
9203
9203
  this.numHistogramRows = a *= 2;
9204
- const h = new Uint32Array(a * jt * 2);
9204
+ const h = new Uint32Array(a * Jt * 2);
9205
9205
  h.set(l), this.value = l = h;
9206
9206
  }
9207
- const u = d * jt * 2 + Math.min(Math.max(0, Math.round(jd(t))), jt - 1);
9208
- l[u] += n, l[u + jt] += r;
9207
+ const u = d * Jt * 2 + Math.min(Math.max(0, Math.round(jd(t))), Jt - 1);
9208
+ l[u] += n, l[u + Jt] += r;
9209
9209
  }
9210
9210
  }
9211
9211
  class By extends EL {
@@ -9490,7 +9490,7 @@ let yu = class extends AF {
9490
9490
  }
9491
9491
  };
9492
9492
  yu = PF([hi(nF)], yu);
9493
- class tD extends Or {
9493
+ class tD extends Vr {
9494
9494
  constructor(e, t) {
9495
9495
  super(e, t), this.spec = t.spec;
9496
9496
  }
@@ -9794,7 +9794,7 @@ let bo = class extends tD {
9794
9794
  }
9795
9795
  };
9796
9796
  bo = zy([hi(lF)], bo);
9797
- let Om = class extends Or {
9797
+ let Om = class extends Vr {
9798
9798
  constructor(e, t, n) {
9799
9799
  super(e, {}), this.parent = t, this.relationshipIndex = n, this.immediateChunkUpdates = !0;
9800
9800
  }
@@ -9811,7 +9811,7 @@ class VF extends Ls {
9811
9811
  super(e), this.annotation = ly(t.annotation);
9812
9812
  }
9813
9813
  }
9814
- let Vm = class extends Or {
9814
+ let Vm = class extends Vr {
9815
9815
  constructor(e, t) {
9816
9816
  super(e), this.parent = t;
9817
9817
  }
@@ -10793,7 +10793,7 @@ var Cg = { exports: {} }, Kx;
10793
10793
  function m3() {
10794
10794
  if (Kx) return Cg.exports;
10795
10795
  Kx = 1;
10796
- var i = Nr(), e = Zv()(0), t = O_(), n = Ku(), r = V_(), s = mD(), a = xs(), l = Qs(), d = Qs(), u = !i.ActiveXObject && "ActiveXObject" in i, h = "WeakMap", g = n.getWeak, v = Object.isExtensible, y = s.ufstore, C, w = function(T) {
10796
+ var i = Or(), e = Zv()(0), t = O_(), n = Ku(), r = V_(), s = mD(), a = xs(), l = Qs(), d = Qs(), u = !i.ActiveXObject && "ActiveXObject" in i, h = "WeakMap", g = n.getWeak, v = Object.isExtensible, y = s.ufstore, C, w = function(T) {
10797
10797
  return function() {
10798
10798
  return T(this, arguments.length > 0 ? arguments[0] : void 0);
10799
10799
  };
@@ -11226,14 +11226,14 @@ class wo extends X {
11226
11226
  * versa.
11227
11227
  */
11228
11228
  static makeRelative(e, t) {
11229
- let n = new wo(us(Rn(), e.orientation, t)), r = !1;
11229
+ let n = new wo(hs(Rn(), e.orientation, t)), r = !1;
11230
11230
  n.registerDisposer(e.changed.add(() => {
11231
- r || (s = !0, us(n.orientation, e.orientation, t), n.changed.dispatch(), s = !1);
11231
+ r || (s = !0, hs(n.orientation, e.orientation, t), n.changed.dispatch(), s = !1);
11232
11232
  }));
11233
11233
  let s = !1;
11234
11234
  const a = iu(Rn(), t);
11235
11235
  return n.registerDisposer(n.changed.add(() => {
11236
- s || (r = !0, us(e.orientation, n.orientation, a), e.changed.dispatch(), r = !1);
11236
+ s || (r = !0, hs(e.orientation, n.orientation, a), e.changed.dispatch(), r = !1);
11237
11237
  })), n;
11238
11238
  }
11239
11239
  assign(e) {
@@ -11247,13 +11247,13 @@ class Um extends Pc {
11247
11247
  isValid: () => !0,
11248
11248
  difference: (e, t) => {
11249
11249
  const n = Rn();
11250
- return us(n, iu(n, t.orientation), e.orientation);
11250
+ return hs(n, iu(n, t.orientation), e.orientation);
11251
11251
  },
11252
11252
  add: (e, t, n) => {
11253
- us(e.orientation, t.orientation, n), e.changed.dispatch();
11253
+ hs(e.orientation, t.orientation, n), e.changed.dispatch();
11254
11254
  },
11255
11255
  subtract: (e, t, n) => {
11256
- us(e.orientation, t.orientation, iu(yD, n)), e.changed.dispatch();
11256
+ hs(e.orientation, t.orientation, iu(yD, n)), e.changed.dispatch();
11257
11257
  }
11258
11258
  });
11259
11259
  }
@@ -11604,7 +11604,7 @@ class Co extends X {
11604
11604
  var n = Rn();
11605
11605
  fm(n, e, t);
11606
11606
  var r = this.orientation.orientation;
11607
- us(r, r, n), this.orientation.changed.dispatch();
11607
+ hs(r, r, n), this.orientation.changed.dispatch();
11608
11608
  }
11609
11609
  rotateAbsolute(e, t, n) {
11610
11610
  var r = this.position;
@@ -11621,7 +11621,7 @@ class Co extends X {
11621
11621
  C[b] = T * g[E] * l[E];
11622
11622
  }
11623
11623
  const w = iu(yD, y);
11624
- eo(C, C, w), us(y, v, y), eo(C, C, y);
11624
+ eo(C, C, w), hs(y, v, y), eo(C, C, y);
11625
11625
  for (let b = 0; b < h; ++b) {
11626
11626
  const E = u[b];
11627
11627
  a[E] = n[E] - C[b] / (g[E] * l[E]);
@@ -11913,15 +11913,15 @@ function N3(i, e, t, n, r, s, a) {
11913
11913
  const B = V(-U * O, -U * F, -U * q), le = i.clipLowerBound[0], ne = i.clipLowerBound[1], Ee = i.clipLowerBound[2], se = i.clipUpperBound[0], we = i.clipUpperBound[1], oe = i.clipUpperBound[2], he = Math.sqrt((v * r) ** 2 + (w * s) ** 2), Ae = Math.sqrt((y * r) ** 2 + (b * s) ** 2), De = Math.sqrt((C * r) ** 2 + (E * s) ** 2), ze = Math.max(he, Ae, De);
11914
11914
  function Ie(ke, Pe, Ue) {
11915
11915
  const Fe = 1 << ke, Ce = Pe * 5, Ke = l[Ce], Vt = l[Ce + 1], Bt = l[Ce + 2], bn = l[Ce + 3], Yt = l[Ce + 4];
11916
- let cn = Ke * Fe * h[0] + u[0], wn = Vt * Fe * h[1] + u[1], fi = Bt * Fe * h[2] + u[2], qe = cn + Fe * h[0], Yn = wn + Fe * h[1], Fr = fi + Fe * h[2];
11917
- if (cn = Math.max(cn, le), wn = Math.max(wn, ne), fi = Math.max(fi, Ee), qe = Math.min(qe, se), Yn = Math.min(Yn, we), Fr = Math.min(Fr, oe), CT(cn, wn, fi, qe, Yn, Fr, t)) {
11918
- const Ur = Math.max(B, $(cn, wn, fi, qe, Yn, Fr)) / ze;
11919
- if (Ue === 0 || Ur * n < Ue) {
11916
+ let cn = Ke * Fe * h[0] + u[0], wn = Vt * Fe * h[1] + u[1], fi = Bt * Fe * h[2] + u[2], qe = cn + Fe * h[0], Yn = wn + Fe * h[1], Ur = fi + Fe * h[2];
11917
+ if (cn = Math.max(cn, le), wn = Math.max(wn, ne), fi = Math.max(fi, Ee), qe = Math.min(qe, se), Yn = Math.min(Yn, we), Ur = Math.min(Ur, oe), CT(cn, wn, fi, qe, Yn, Ur, t)) {
11918
+ const zr = Math.max(B, $(cn, wn, fi, qe, Yn, Ur)) / ze;
11919
+ if (Ue === 0 || zr * n < Ue) {
11920
11920
  const Mi = d[ke];
11921
- if (Mi !== 0 && a(ke, Pe, Mi / Ur, Yt >>> 31), ke > 0 && (Mi === 0 || Ur * n < Mi)) {
11921
+ if (Mi !== 0 && a(ke, Pe, Mi / zr, Yt >>> 31), ke > 0 && (Mi === 0 || zr * n < Mi)) {
11922
11922
  const Ps = Mi === 0 ? Ue : Mi, pi = (Yt & 2147483647) >>> 0;
11923
- for (let zr = bn; zr < pi; ++zr)
11924
- Ie(ke - 1, zr, Ps);
11923
+ for (let $r = bn; $r < pi; ++$r)
11924
+ Ie(ke - 1, $r, Ps);
11925
11925
  }
11926
11926
  }
11927
11927
  }
@@ -13371,7 +13371,7 @@ const ro = "neuroglancer-drag-over", S1 = {
13371
13371
  right: "left",
13372
13372
  top: "bottom",
13373
13373
  bottom: "top"
13374
- }, ss = {
13374
+ }, as = {
13375
13375
  left: "column",
13376
13376
  right: "column",
13377
13377
  top: "row",
@@ -13492,7 +13492,7 @@ class xU extends X {
13492
13492
  makeDropZone(e, t, n, r, s = !1) {
13493
13493
  const a = document.createElement("div");
13494
13494
  a.className = "neuroglancer-side-panel-drop-zone";
13495
- const l = 10, d = ss[r], u = Ad[r];
13495
+ const l = 10, d = as[r], u = Ad[r];
13496
13496
  return a.style[Ha[u]] = `${l}px`, a.style[Ha[d]] = "100%", s ? (a.style.position = "absolute", a.style[r] = "50%", a.style[w1[r]] = "-${size/2}px") : (a.style.position = "relative", a.style[w1[wU[r]]] = `-${l}px`), a.addEventListener("dragenter", (h) => {
13497
13497
  this.hasDroppablePanel() && (a.classList.add(ro), h.preventDefault(), Yi(a, "drop", () => document.createTextNode(`Drop side panel as new ${d}`)));
13498
13498
  }), a.addEventListener("dragleave", () => {
@@ -13503,7 +13503,7 @@ class xU extends X {
13503
13503
  const g = this.dragSource;
13504
13504
  if (g === void 0) return;
13505
13505
  gn(a, "drop"), a.classList.remove(ro);
13506
- const v = ss[e];
13506
+ const v = as[e];
13507
13507
  g.dropAsNewPanel({
13508
13508
  side: e,
13509
13509
  row: v === "column" ? n : t,
@@ -13578,7 +13578,7 @@ class xU extends X {
13578
13578
  makeFlexGutter(e, t, n) {
13579
13579
  const r = document.createElement("div");
13580
13580
  r.style.position = "relative";
13581
- const s = ss[e];
13581
+ const s = as[e];
13582
13582
  r.className = `neuroglancer-resize-gutter-${s === "row" ? "horizontal" : "vertical"}`, r.addEventListener("pointerdown", (l) => {
13583
13583
  if ("button" in l && l.button !== 0)
13584
13584
  return;
@@ -13609,14 +13609,14 @@ class xU extends X {
13609
13609
  /*flexIndex=*/
13610
13610
  n + 0.5,
13611
13611
  /*zoneSide=*/
13612
- b1[ss[e]],
13612
+ b1[as[e]],
13613
13613
  /*centered=*/
13614
13614
  !0
13615
13615
  );
13616
13616
  return r.appendChild(a), r;
13617
13617
  }
13618
13618
  renderSide(e, t, n) {
13619
- const r = S1[Ad[e]], s = S1[ss[e]];
13619
+ const r = S1[Ad[e]], s = S1[as[e]];
13620
13620
  n.sort((d, u) => {
13621
13621
  const h = d.location.value, g = u.location.value, v = h[s] - g[s];
13622
13622
  return v !== 0 ? v : h[r] - g[r];
@@ -13636,7 +13636,7 @@ class xU extends X {
13636
13636
  let b = t[h];
13637
13637
  if (b === void 0) {
13638
13638
  const T = a.makeCrossGutter(e, h), P = document.createElement("div");
13639
- P.className = `neuroglancer-side-panel-${ss[e]}`, b = t[h] = {
13639
+ P.className = `neuroglancer-side-panel-${as[e]}`, b = t[h] = {
13640
13640
  element: P,
13641
13641
  gutterElement: T,
13642
13642
  cells: [],
@@ -13648,14 +13648,14 @@ class xU extends X {
13648
13648
  h,
13649
13649
  /*flexIndex=*/
13650
13650
  -1 / 0,
13651
- b1[ss[e]]
13651
+ b1[as[e]]
13652
13652
  ),
13653
13653
  endDropZone: a.makeDropZone(
13654
13654
  e,
13655
13655
  h,
13656
13656
  /*flexIndex=*/
13657
13657
  1 / 0,
13658
- CU[ss[e]]
13658
+ CU[as[e]]
13659
13659
  )
13660
13660
  };
13661
13661
  } else
@@ -13732,7 +13732,7 @@ function Jn(i, e = "text/plain") {
13732
13732
  * See the License for the specific language governing permissions and
13733
13733
  * limitations under the License.
13734
13734
  */
13735
- class Vr extends X {
13735
+ class Br extends X {
13736
13736
  constructor(e, t, n) {
13737
13737
  super(), this.target = e, this.eventMap = t, this.registerEventListener(e, "wheel", (r) => {
13738
13738
  n !== void 0 && n(r), this.dispatch("wheel", r);
@@ -13823,7 +13823,7 @@ class x1 extends ua {
13823
13823
  constructor(e, t, n, r) {
13824
13824
  super(e, t.location), this.sidePanelManager = e, this.state = t, this.manager = n, this.selectedLayer = r, this.body = document.createElement("div");
13825
13825
  const s = this.element, a = this.body;
13826
- s.classList.add("neuroglancer-selection-details"), this.registerDisposer(new Vr(this.element, bh()));
13826
+ s.classList.add("neuroglancer-selection-details"), this.registerDisposer(new Br(this.element, bh()));
13827
13827
  var l = this.addTitleBar({ title: "Selection" });
13828
13828
  const d = l.titleBar, u = pt({
13829
13829
  svg: MD,
@@ -13903,7 +13903,7 @@ const TU = "data:image/svg+xml,%3csvg%20role='img'%20xmlns='http://www.w3.org/20
13903
13903
  function LU(i = {}) {
13904
13904
  return pt(H({ svg: TU }, i));
13905
13905
  }
13906
- class ys {
13906
+ class Ss {
13907
13907
  constructor(e, t, n) {
13908
13908
  this.key = e, this.value = t, this.label = n;
13909
13909
  }
@@ -13930,7 +13930,7 @@ class DU extends X {
13930
13930
  u = !1;
13931
13931
  else if (typeof e == "number")
13932
13932
  s = l = e >>> 0, a = d = e < 0 ? 4294967295 : 0, u = !0;
13933
- else if (e instanceof ys) {
13933
+ else if (e instanceof Ss) {
13934
13934
  const h = e.value || e.key;
13935
13935
  s = h.low, a = h.high, l = e.key.low, d = e.key.high, u = !0;
13936
13936
  } else e instanceof te ? (s = l = e.low, a = d = e.high, u = !0) : u = !1;
@@ -13955,12 +13955,12 @@ function GD(i, e, t = !1) {
13955
13955
  if (typeof e == "number" ? n = new te(e >>> 0, e < 0 ? 4294967295 : 0) : typeof e == "string" ? n = te.parseString(e) : n = t ? e.clone() : e, i == null) return n;
13956
13956
  var l = i.segmentationGroupState.value;
13957
13957
  const d = l.segmentEquivalences, u = l.segmentPropertyMap.value;
13958
- return d.size !== 0 ? (r = d.get(n), te.equal(r, n) ? s = void 0 : s = r) : r = n, a = u?.getSegmentLabel(r), a === void 0 && s == null ? n : new ys(n, s, a);
13958
+ return d.size !== 0 ? (r = d.get(n), te.equal(r, n) ? s = void 0 : s = r) : r = n, a = u?.getSegmentLabel(r), a === void 0 && s == null ? n : new Ss(n, s, a);
13959
13959
  }
13960
13960
  function Eo(i, e) {
13961
- if (e instanceof ys) return e;
13961
+ if (e instanceof Ss) return e;
13962
13962
  let t = GD(i, e);
13963
- return t instanceof te ? new ys(t) : t;
13963
+ return t instanceof te ? new Ss(t) : t;
13964
13964
  }
13965
13965
  function E1(i, e) {
13966
13966
  const t = e.length;
@@ -14495,7 +14495,7 @@ class FU extends Ls {
14495
14495
  super.freeGPUMemory(e), YD(this);
14496
14496
  }
14497
14497
  }
14498
- class Mc extends Or {
14498
+ class Mc extends Vr {
14499
14499
  constructor(e, t) {
14500
14500
  super(e, t), this.fragmentSource = this.registerDisposer(new qm(this.chunkManager, this));
14501
14501
  }
@@ -14509,7 +14509,7 @@ class Mc extends Or {
14509
14509
  return { key: `${e}/${t}`, fragmentId: t };
14510
14510
  }
14511
14511
  }
14512
- let qm = class extends Or {
14512
+ let qm = class extends Vr {
14513
14513
  constructor(e, t) {
14514
14514
  super(e), this.meshSource = t;
14515
14515
  }
@@ -14626,7 +14626,7 @@ class zU extends Ls {
14626
14626
  super.freeGPUMemory(e), YD(this);
14627
14627
  }
14628
14628
  }
14629
- class wh extends Or {
14629
+ class wh extends Vr {
14630
14630
  constructor(e, t) {
14631
14631
  super(e, t), this.fragmentSource = this.registerDisposer(new jm(this.chunkManager, this)), this.format = t.format;
14632
14632
  }
@@ -14640,7 +14640,7 @@ class wh extends Or {
14640
14640
  return new UU(this, e);
14641
14641
  }
14642
14642
  }
14643
- let jm = class extends Or {
14643
+ let jm = class extends Vr {
14644
14644
  constructor(e, t) {
14645
14645
  super(e), this.meshSource = t;
14646
14646
  }
@@ -14898,7 +14898,7 @@ float getRadiusAdjustment(vec3 vertex, float r) {
14898
14898
  * See the License for the specific language governing permissions and
14899
14899
  * limitations under the License.
14900
14900
  */
14901
- const hs = iS;
14901
+ const fs = iS;
14902
14902
  function tr(i, e = !1) {
14903
14903
  i.addVertexCode(rS), i.addUniform("highp vec3", "uLineParams"), i.addVarying("highp float", "vLineCoord"), i.addVarying("highp float", "vLineFeatherFraction"), e && (i.addVarying("highp float", "vEndpointFraction"), i.addVarying("highp float", "vLineCoordT"), i.addVarying("highp float", "vLineBorderStartFraction")), i.addVertexCode(SB), i.addVertexCode(`
14904
14904
  vec2 getLineOffset() { return getQuadVertexPosition(vec2(0.0, -1.0), vec2(1.0, 1.0)); }
@@ -15340,7 +15340,7 @@ function rz(i) {
15340
15340
  e.push(Rc(new yh(), t.dataType, t.numComponents));
15341
15341
  return e;
15342
15342
  }
15343
- class Ch extends Or {
15343
+ class Ch extends Vr {
15344
15344
  constructor(e, t) {
15345
15345
  super(e, t);
15346
15346
  }
@@ -15590,7 +15590,7 @@ class uz extends X {
15590
15590
  }
15591
15591
  });
15592
15592
  const r = this.element, s = this.registerDisposer(new _i(r, F1));
15593
- s.allShortcutsAreGlobal = !0, r.classList.add("neuroglancer-coordinate-space-transform-widget"), this.registerDisposer(new Vr(r, F1));
15593
+ s.allShortcutsAreGlobal = !0, r.classList.add("neuroglancer-coordinate-space-transform-widget"), this.registerDisposer(new Br(r, F1));
15594
15594
  const a = dt(() => this.updateView());
15595
15595
  this.registerDisposer(e.changed.add(a));
15596
15596
  const l = this.coefficientContainer, d = this.translationContainer, u = this.outputNameContainer, h = this.inputNameContainer, g = this.inputScaleContainer, v = this.inputLowerBoundsContainer, y = this.inputUpperBoundsContainer, C = this.outputScaleContainer, w = this.addOutputDimensionCell, b = this.addOutputDimensionIcon, E = this.addSourceDimensionIcon, T = this.resetToIdentityButton, P = this.resetToDefaultButton;
@@ -16594,7 +16594,7 @@ class xz extends X {
16594
16594
  e !== void 0 && e.dispose(), Et(this.element), this.cancelActiveCompletion(), super.disposed();
16595
16595
  }
16596
16596
  }
16597
- class Br extends X {
16597
+ class Fr extends X {
16598
16598
  constructor(e = new Mt(Mt.VISIBLE)) {
16599
16599
  super(), this.visibility = e, this.element = document.createElement("div"), this.element.classList.add("neuroglancer-tab-content");
16600
16600
  }
@@ -16913,7 +16913,7 @@ function aI(i) {
16913
16913
  }
16914
16914
  return !1;
16915
16915
  }
16916
- class _z extends Br {
16916
+ class _z extends Fr {
16917
16917
  constructor(e) {
16918
16918
  super(), this.layer = e, this.generation = -1, this.sourceViews = new ce(), this.addDataSourceIcon = rI({ title: "Add additional data source" }), this.layerTypeDetection = document.createElement("div"), this.layerTypeElement = document.createElement("span"), this.dataSourcesContainer = document.createElement("div"), this.detectedLayerConstructor = void 0;
16919
16919
  const t = this.element, n = this.dataSourcesContainer;
@@ -17934,7 +17934,7 @@ class SI extends dL {
17934
17934
  constructor(e, t, n) {
17935
17935
  super(e, t, n.visibility), this.viewer = n, this.mouseX = -1, this.mouseY = -1, this.pickRequestPending = !1, this.mouseStateForcer = () => this.blockOnPickRequest(), this.pickingData = [new eE(), new eE()], this.pickRequests = [new tE(), new tE()], this.pickBufferContents = new Float32Array(2 * 4 * nt * nt), this.pickTimerId = -1, this.nextPickRequestTime = 0, this.pendingPickRequestTimerId = -1, this.pendingPickRequestTimerExpired = () => {
17936
17936
  this.pendingPickRequestTimerId = -1, this.pickRequestPending && this.attemptToIssuePickRequest();
17937
- }, this.inputEventMap = n.inputEventMap, t.classList.add("neuroglancer-rendered-data-panel"), t.classList.add("neuroglancer-panel"), t.classList.add("neuroglancer-noselect"), typeof NEUROGLANCER_SHOW_OBJECT_SELECTION_TOOLTIP < "u" && NEUROGLANCER_SHOW_OBJECT_SELECTION_TOOLTIP === !0 && (t.title = "Double click to toggle display of object under mouse pointer. Control+rightclick to pin/unpin selection."), this.registerDisposer(new Th(t)), this.registerDisposer(new _i(t, this.inputEventMap)), this.registerDisposer(new Vr(t, this.inputEventMap, (r) => {
17937
+ }, this.inputEventMap = n.inputEventMap, t.classList.add("neuroglancer-rendered-data-panel"), t.classList.add("neuroglancer-panel"), t.classList.add("neuroglancer-noselect"), typeof NEUROGLANCER_SHOW_OBJECT_SELECTION_TOOLTIP < "u" && NEUROGLANCER_SHOW_OBJECT_SELECTION_TOOLTIP === !0 && (t.title = "Double click to toggle display of object under mouse pointer. Control+rightclick to pin/unpin selection."), this.registerDisposer(new Th(t)), this.registerDisposer(new _i(t, this.inputEventMap)), this.registerDisposer(new Br(t, this.inputEventMap, (r) => {
17938
17938
  this.onMousemove(r);
17939
17939
  })), this.registerDisposer(new l$(t, this.inputEventMap)), this.registerEventListener(t, "mousemove", this.onMousemove.bind(this)), this.registerEventListener(t, "touchstart", this.onTouchstart.bind(this)), this.registerEventListener(t, "mouseleave", () => this.onMouseout()), this.registerEventListener(
17940
17940
  t,
@@ -18912,7 +18912,7 @@ class O$ extends X {
18912
18912
  this.updateDefault();
18913
18913
  }), a.appendChild(d), this.registerDisposer(e), this.registerDisposer(n), this.registerDisposer(t.changed.add(this.scheduleUpdateView)), this.registerDisposer(e.changed.add(this.scheduleUpdateView));
18914
18914
  const g = this.registerDisposer(new _i(s, iE));
18915
- g.allShortcutsAreGlobal = !0, this.registerDisposer(new Vr(s, iE)), ve(a, "cancel", () => {
18915
+ g.allShortcutsAreGlobal = !0, this.registerDisposer(new Br(s, iE)), ve(a, "cancel", () => {
18916
18916
  this.updateView();
18917
18917
  const w = document.activeElement;
18918
18918
  w instanceof HTMLElement && s.contains(w) && w.blur();
@@ -19408,7 +19408,7 @@ function Y$(i) {
19408
19408
  function sr(i) {
19409
19409
  return i.json();
19410
19410
  }
19411
- async function Ss(i, e, t, n = Nt) {
19411
+ async function bs(i, e, t, n = Nt) {
19412
19412
  if (n === Nt) {
19413
19413
  const a = await rE(i, e);
19414
19414
  return await t(a);
@@ -19441,7 +19441,7 @@ async function hS(i, e, t, n, r, s, a = Nt) {
19441
19441
  _V(a), d > 1 && await new xt((u) => setTimeout(u, sE(d - 2))), l = await i.get(l, a);
19442
19442
  t: for (let u = 0; ; )
19443
19443
  try {
19444
- return await Ss(typeof e == "function" ? e(l.credentials) : e, r(l.credentials, t), n, a);
19444
+ return await bs(typeof e == "function" ? e(l.credentials) : e, r(l.credentials, t), n, a);
19445
19445
  } catch (h) {
19446
19446
  if (h instanceof ra) {
19447
19447
  if (s(h, l.credentials) === "refresh") {
@@ -19457,7 +19457,7 @@ async function hS(i, e, t, n, r, s, a = Nt) {
19457
19457
  }
19458
19458
  }
19459
19459
  function Ys(i, e, t, n, r = Nt) {
19460
- return i === void 0 ? Ss(e, t, n, r) : hS(i, e, t, n, (s, a) => {
19460
+ return i === void 0 ? bs(e, t, n, r) : hS(i, e, t, n, (s, a) => {
19461
19461
  if (!s.accessToken) return a;
19462
19462
  const l = new Headers(a.headers);
19463
19463
  return l.set("Authorization", `${s.tokenType} ${s.accessToken}`), H(H({}, a), { headers: l });
@@ -19531,7 +19531,7 @@ class nG extends Uc {
19531
19531
  constructor(e) {
19532
19532
  super(), this.bucket = e, this.get = Eh(async () => {
19533
19533
  var t;
19534
- const n = this.bucket, r = await Ss(`https://s3.amazonaws.com/${n}?location`, {}, (d) => d.text()), a = new DOMParser().parseFromString(r, "application/xml").querySelector("LocationConstraint");
19534
+ const n = this.bucket, r = await bs(`https://s3.amazonaws.com/${n}?location`, {}, (d) => d.text()), a = new DOMParser().parseFromString(r, "application/xml").querySelector("LocationConstraint");
19535
19535
  if (a === null)
19536
19536
  throw new Error(`Unable to determine location of S3 bucket: ${n}`);
19537
19537
  return { region: ((t = a.textContent) === null || t === void 0 ? void 0 : t.trim()) || "us-east-1" };
@@ -19544,7 +19544,7 @@ function DI(i) {
19544
19544
  }
19545
19545
  async function iG(i, e, t, n, r, s = Nt) {
19546
19546
  const l = (await i.get()).credentials.region;
19547
- return await Ss(`https://${e}.s3.${l}.amazonaws.com${t}`, n, r, s);
19547
+ return await bs(`https://${e}.s3.${l}.amazonaws.com${t}`, n, r, s);
19548
19548
  }
19549
19549
  async function rG(i, e, t) {
19550
19550
  const s = (await DI(i).get()).credentials.region;
@@ -19928,7 +19928,7 @@ class aE {
19928
19928
  for (const l of this.layers) {
19929
19929
  var r = ae(l, 2);
19930
19930
  const d = r[0], u = r[1];
19931
- W4(d, s[u]);
19931
+ WW(d, s[u]);
19932
19932
  }
19933
19933
  } catch {
19934
19934
  return !1;
@@ -20101,7 +20101,7 @@ function OI(i) {
20101
20101
  });
20102
20102
  }
20103
20103
  const CG = "data:image/svg+xml,%3csvg%20role='img'%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20aria-labelledby='binIconTitle'%3e%3ctitle%20id='binIconTitle'%3eBin%3c/title%3e%3cpath%20d='M19%206L5%206M14%205L10%205M6%2010L6%2020C6%2020.6666667%206.33333333%2021%207%2021%207.66666667%2021%2011%2021%2017%2021%2017.6666667%2021%2018%2020.6666667%2018%2020%2018%2019.3333333%2018%2016%2018%2010'/%3e%3c/svg%3e";
20104
- function fs(i = {}) {
20104
+ function ps(i = {}) {
20105
20105
  const e = pt(H({ svg: CG }, i)), t = e.firstElementChild;
20106
20106
  return t && (t.style.fill = "white"), e;
20107
20107
  }
@@ -20225,7 +20225,7 @@ class Rh extends X {
20225
20225
  }
20226
20226
  this.registerDisposer(e.changed.add(this.registerCancellable(dt(() => this.updateView()))));
20227
20227
  const a = this.registerDisposer(new _i(r, uE));
20228
- a.allShortcutsAreGlobal = !0, this.registerDisposer(new Vr(r, uE)), this.registerDisposer(ve(r, "cancel", (l) => {
20228
+ a.allShortcutsAreGlobal = !0, this.registerDisposer(new Br(r, uE)), this.registerDisposer(ve(r, "cancel", (l) => {
20229
20229
  this.coordinateSpace = void 0, this.updateView(), this.closeDropdown();
20230
20230
  const d = l.target;
20231
20231
  d instanceof HTMLElement && d.blur();
@@ -20640,7 +20640,7 @@ class _G extends X {
20640
20640
  }), y.addEventListener("click", (E) => {
20641
20641
  this.panel.layerManager === this.panel.manager.rootLayers ? this.layer.setArchived(!0) : this.layer.containers.size > 2 ? this.panel.layerManager.removeManagedLayer(this.layer) : this.layer.setArchived(!0), E.stopPropagation();
20642
20642
  });
20643
- const w = fs();
20643
+ const w = ps();
20644
20644
  w.title = "Delete this layer", w.addEventListener("click", (E) => {
20645
20645
  jo(this.layer), E.stopPropagation();
20646
20646
  }), r.appendChild(a), g.appendChild(l), g.appendChild(v), v.appendChild(y), v.appendChild(w), r.appendChild(s), !((n = e.layer) === null || n === void 0) && n.allowingRefresh && r.appendChild(C), r.appendChild(g);
@@ -21507,7 +21507,7 @@ class Pu extends ua {
21507
21507
  disableTitle: "Unpin panel to this layer"
21508
21508
  })).element), this.registerDisposer(Tr((u) => {
21509
21509
  r.dataset.neuroglancerLayerPanelPinned = u.toString();
21510
- }, d)), a.appendChild(fs({
21510
+ }, d)), a.appendChild(ps({
21511
21511
  title: "Delete layer",
21512
21512
  onClick: () => {
21513
21513
  jo(this.layer.managedLayer);
@@ -21705,7 +21705,7 @@ class ZG extends X {
21705
21705
  enableTitle: "Archive layer (disable and remove from layer groups)",
21706
21706
  disableTitle: "Unarchive layer (enable and add to all layer groups)"
21707
21707
  })).element), n.appendChild(r), n.appendChild(this.registerDisposer(new YG(t)).element), n.appendChild(this.registerDisposer(new zI(t)).element), n.appendChild(this.registerDisposer(XG(t)).element);
21708
- const s = fs({
21708
+ const s = ps({
21709
21709
  title: "Delete layer",
21710
21710
  onClick: () => {
21711
21711
  jo(this.layer);
@@ -21781,7 +21781,7 @@ class QG extends ua {
21781
21781
  this.titleElement.textContent = d;
21782
21782
  }
21783
21783
  }
21784
- class e4 extends X {
21784
+ class eW extends X {
21785
21785
  constructor(e) {
21786
21786
  super(), this.layerManager = e, this.element = document.createElement("div");
21787
21787
  const t = this.registerCancellable(dt(() => this.render()));
@@ -21800,12 +21800,12 @@ class e4 extends X {
21800
21800
  n.textContent = "";
21801
21801
  }
21802
21802
  }
21803
- var mE = { exports: {} }, Xd = { exports: {} }, t4 = Xd.exports, vE;
21803
+ var mE = { exports: {} }, Xd = { exports: {} }, tW = Xd.exports, vE;
21804
21804
  function Wo() {
21805
21805
  return vE || (vE = 1, function(i, e) {
21806
21806
  (function(t, n) {
21807
21807
  i.exports = n();
21808
- })(t4, function() {
21808
+ })(tW, function() {
21809
21809
  var t = navigator.userAgent, n = navigator.platform, r = /gecko\/\d/i.test(t), s = /MSIE \d/.test(t), a = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(t), l = /Edge\/(\d+)/.exec(t), d = s || a || l, u = d && (s ? document.documentMode || 6 : +(l || a)[1]), h = !l && /WebKit\//.test(t), g = h && /Qt\/\d+\.\d+/.test(t), v = !l && /Chrome\/(\d+)/.exec(t), y = v && +v[1], C = /Opera\//.test(t), w = /Apple Computer/.test(navigator.vendor), b = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(t), E = /PhantomJS/.test(t), T = w && (/Mobile\/\w+/.test(t) || navigator.maxTouchPoints > 2), P = /Android/.test(t), R = T || P || /webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t), I = T || /Mac/.test(n), L = /\bCrOS\b/.test(t), A = /win/i.test(n), M = C && t.match(/Version\/(\d*\.\d*)/);
21810
21810
  M && (M = Number(M[1])), M && M >= 15 && (C = !1, h = !0);
21811
21811
  var O = I && (g || C && (M == null || M < 12.11)), F = r || d && u >= 9;
@@ -21969,14 +21969,14 @@ function Wo() {
21969
21969
  p[f] = c(o[f], f);
21970
21970
  return p;
21971
21971
  }
21972
- function Fr(o, c, p) {
21972
+ function Ur(o, c, p) {
21973
21973
  for (var f = 0, m = p(c); f < o.length && p(o[f]) <= m; )
21974
21974
  f++;
21975
21975
  o.splice(f, 0, c);
21976
21976
  }
21977
21977
  function Ko() {
21978
21978
  }
21979
- function Ur(o, c) {
21979
+ function zr(o, c) {
21980
21980
  var p;
21981
21981
  return Object.create ? p = Object.create(o) : (Ko.prototype = o, p = new Ko()), c && Pe(c, p), p;
21982
21982
  }
@@ -21987,7 +21987,7 @@ function Wo() {
21987
21987
  function pi(o, c) {
21988
21988
  return c ? c.source.indexOf("\\w") > -1 && Ps(o) ? !0 : c.test(o) : Ps(o);
21989
21989
  }
21990
- function zr(o) {
21990
+ function $r(o) {
21991
21991
  for (var c in o)
21992
21992
  if (o.hasOwnProperty(c) && o[c])
21993
21993
  return !1;
@@ -21997,7 +21997,7 @@ function Wo() {
21997
21997
  function Rt(o) {
21998
21998
  return o.charCodeAt(0) >= 768 && ar.test(o);
21999
21999
  }
22000
- function $r(o, c, p) {
22000
+ function Gr(o, c, p) {
22001
22001
  for (; (p < 0 ? c > 0 : c < o.length) && Rt(o.charAt(c)); )
22002
22002
  c += p;
22003
22003
  return c;
@@ -22012,7 +22012,7 @@ function Wo() {
22012
22012
  o(S) ? p = S : c = S + f;
22013
22013
  }
22014
22014
  }
22015
- function Gr(o, c, p, f) {
22015
+ function Wr(o, c, p, f) {
22016
22016
  if (!o)
22017
22017
  return f(c, p, "ltr", 0);
22018
22018
  for (var m = !1, S = 0; S < o.length; ++S) {
@@ -22022,7 +22022,7 @@ function Wo() {
22022
22022
  m || f(c, p, "ltr");
22023
22023
  }
22024
22024
  var Rs = null;
22025
- function Wr(o, c, p) {
22025
+ function Hr(o, c, p) {
22026
22026
  var f;
22027
22027
  Rs = null;
22028
22028
  for (var m = 0; m < o.length; ++m) {
@@ -22061,10 +22061,10 @@ function Wo() {
22061
22061
  He == "+" && Me == "1" && J[Ve + 1] == "1" ? J[Ve] = "1" : He == "," && Me == J[Ve + 1] && (Me == "1" || Me == "n") && (J[Ve] = Me), Me = He;
22062
22062
  }
22063
22063
  for (var ht = 0; ht < K; ++ht) {
22064
- var Ht = J[ht];
22065
- if (Ht == ",")
22064
+ var qt = J[ht];
22065
+ if (qt == ",")
22066
22066
  J[ht] = "N";
22067
- else if (Ht == "%") {
22067
+ else if (qt == "%") {
22068
22068
  var yt = void 0;
22069
22069
  for (yt = ht + 1; yt < K && J[yt] == "%"; ++yt)
22070
22070
  ;
@@ -22082,30 +22082,30 @@ function Wo() {
22082
22082
  var _t = void 0;
22083
22083
  for (_t = Ft + 1; _t < K && m.test(J[_t]); ++_t)
22084
22084
  ;
22085
- for (var Ct = (Ft ? J[Ft - 1] : W) == "L", Dn = (_t < K ? J[_t] : W) == "L", Fa = Ct == Dn ? Ct ? "L" : "R" : W, is = Ft; is < _t; ++is)
22086
- J[is] = Fa;
22085
+ for (var Ct = (Ft ? J[Ft - 1] : W) == "L", Dn = (_t < K ? J[_t] : W) == "L", Fa = Ct == Dn ? Ct ? "L" : "R" : W, rs = Ft; rs < _t; ++rs)
22086
+ J[rs] = Fa;
22087
22087
  Ft = _t - 1;
22088
22088
  }
22089
- for (var sn = [], Ui, qt = 0; qt < K; )
22090
- if (x.test(J[qt])) {
22091
- var _f = qt;
22092
- for (++qt; qt < K && x.test(J[qt]); ++qt)
22089
+ for (var sn = [], Ui, jt = 0; jt < K; )
22090
+ if (x.test(J[jt])) {
22091
+ var _f = jt;
22092
+ for (++jt; jt < K && x.test(J[jt]); ++jt)
22093
22093
  ;
22094
- sn.push(new D(0, _f, qt));
22094
+ sn.push(new D(0, _f, jt));
22095
22095
  } else {
22096
- var pr = qt, zs = sn.length, $s = z == "rtl" ? 1 : 0;
22097
- for (++qt; qt < K && J[qt] != "L"; ++qt)
22096
+ var pr = jt, zs = sn.length, $s = z == "rtl" ? 1 : 0;
22097
+ for (++jt; jt < K && J[jt] != "L"; ++jt)
22098
22098
  ;
22099
- for (var un = pr; un < qt; )
22099
+ for (var un = pr; un < jt; )
22100
22100
  if (k.test(J[un])) {
22101
22101
  pr < un && (sn.splice(zs, 0, new D(1, pr, un)), zs += $s);
22102
22102
  var Ua = un;
22103
- for (++un; un < qt && k.test(J[un]); ++un)
22103
+ for (++un; un < jt && k.test(J[un]); ++un)
22104
22104
  ;
22105
22105
  sn.splice(zs, 0, new D(2, Ua, un)), zs += $s, pr = un;
22106
22106
  } else
22107
22107
  ++un;
22108
- pr < qt && sn.splice(zs, 0, new D(1, pr, qt));
22108
+ pr < jt && sn.splice(zs, 0, new D(1, pr, jt));
22109
22109
  }
22110
22110
  return z == "ltr" && (sn[0].level == 1 && (Ui = _.match(/^\s+/)) && (sn[0].from = Ui[0].length, sn.unshift(new D(0, 0, Ui[0].length))), qe(sn).level == 1 && (Ui = _.match(/\s+$/)) && (qe(sn).to -= Ui[0].length, sn.push(new D(0, K - Ui[0].length, K)))), z == "rtl" ? sn.reverse() : sn;
22111
22111
  };
@@ -22176,7 +22176,7 @@ function Wo() {
22176
22176
  function Cn(o) {
22177
22177
  return o.defaultPrevented != null ? o.defaultPrevented : o.returnValue == !1;
22178
22178
  }
22179
- function Hr(o) {
22179
+ function qr(o) {
22180
22180
  nn(o), pa(o);
22181
22181
  }
22182
22182
  function Yo(o) {
@@ -22201,7 +22201,7 @@ function Wo() {
22201
22201
  return p.setAttribute("cm-text", ""), p;
22202
22202
  }
22203
22203
  var Xo;
22204
- function qr(o) {
22204
+ function jr(o) {
22205
22205
  if (Xo != null)
22206
22206
  return Xo;
22207
22207
  var c = $(o, document.createTextNode("AخA")), p = ne(c, 0, 1).getBoundingClientRect(), f = ne(c, 1, 2).getBoundingClientRect();
@@ -22220,7 +22220,7 @@ b`.split(/\n/).length != 3 ? function(o) {
22220
22220
  return p;
22221
22221
  } : function(o) {
22222
22222
  return o.split(/\r\n?|\n/);
22223
- }, jr = window.getSelection ? function(o) {
22223
+ }, Jr = window.getSelection ? function(o) {
22224
22224
  try {
22225
22225
  return o.selectionStart != o.selectionEnd;
22226
22226
  } catch {
@@ -22255,7 +22255,7 @@ b`.split(/\n/).length != 3 ? function(o) {
22255
22255
  o = yi[o];
22256
22256
  else if (o && typeof o.name == "string" && yi.hasOwnProperty(o.name)) {
22257
22257
  var c = yi[o.name];
22258
- typeof c == "string" && (c = { name: c }), o = Ur(c, o), o.name = c.name;
22258
+ typeof c == "string" && (c = { name: c }), o = zr(c, o), o.name = c.name;
22259
22259
  } else {
22260
22260
  if (typeof o == "string" && /^[\w\-]+\/[\w\-]+\+xml$/.test(o))
22261
22261
  return va("application/xml");
@@ -22270,8 +22270,8 @@ b`.split(/\n/).length != 3 ? function(o) {
22270
22270
  if (!p)
22271
22271
  return ya(o, "text/plain");
22272
22272
  var f = p(o, c);
22273
- if (Jr.hasOwnProperty(c.name)) {
22274
- var m = Jr[c.name];
22273
+ if (Kr.hasOwnProperty(c.name)) {
22274
+ var m = Kr[c.name];
22275
22275
  for (var S in m)
22276
22276
  m.hasOwnProperty(S) && (f.hasOwnProperty(S) && (f["_" + S] = f[S]), f[S] = m[S]);
22277
22277
  }
@@ -22280,9 +22280,9 @@ b`.split(/\n/).length != 3 ? function(o) {
22280
22280
  f[x] = c.modeProps[x];
22281
22281
  return f;
22282
22282
  }
22283
- var Jr = {};
22283
+ var Kr = {};
22284
22284
  function Sa(o, c) {
22285
- var p = Jr.hasOwnProperty(o) ? Jr[o] : Jr[o] = {};
22285
+ var p = Kr.hasOwnProperty(o) ? Kr[o] : Kr[o] = {};
22286
22286
  Pe(c, p);
22287
22287
  }
22288
22288
  function Oi(o, c) {
@@ -22447,7 +22447,7 @@ b`.split(/\n/).length != 3 ? function(o) {
22447
22447
  function et(o, c) {
22448
22448
  return o.sticky == c.sticky && me(o, c) == 0;
22449
22449
  }
22450
- function zt(o) {
22450
+ function $t(o) {
22451
22451
  return Z(o.line, o.ch);
22452
22452
  }
22453
22453
  function xn(o, c) {
@@ -22849,13 +22849,13 @@ b`.split(/\n/).length != 3 ? function(o) {
22849
22849
  if (c > o.lastLine())
22850
22850
  return c;
22851
22851
  var p = Re(o, c), f;
22852
- if (!Kr(o, p))
22852
+ if (!Yr(o, p))
22853
22853
  return c;
22854
22854
  for (; f = Xc(p); )
22855
22855
  p = f.find(1, !0).line;
22856
22856
  return N(p) + 1;
22857
22857
  }
22858
- function Kr(o, c) {
22858
+ function Yr(o, c) {
22859
22859
  var p = cr && c.markedSpans;
22860
22860
  if (p) {
22861
22861
  for (var f = void 0, m = 0; m < p.length; ++m)
@@ -22949,7 +22949,7 @@ b`.split(/\n/).length != 3 ? function(o) {
22949
22949
  c.measure = {};
22950
22950
  for (var m = 0; m <= (c.rest ? c.rest.length : 0); m++) {
22951
22951
  var S = m ? c.rest[m - 1] : c.line, x = void 0;
22952
- f.pos = 0, f.addToken = AR, qr(o.display.measure) && (x = je(S, o.doc.direction)) && (f.addToken = MR(f.addToken, x)), f.map = [];
22952
+ f.pos = 0, f.addToken = AR, jr(o.display.measure) && (x = je(S, o.doc.direction)) && (f.addToken = MR(f.addToken, x)), f.map = [];
22953
22953
  var k = c != o.display.externalMeasured && N(S);
22954
22954
  NR(S, f, KS(o, S, k)), S.styleClasses && (S.styleClasses.bgClass && (f.bgClass = oe(S.styleClasses.bgClass, f.bgClass || "")), S.styleClasses.textClass && (f.textClass = oe(S.styleClasses.textClass, f.textClass || ""))), f.map.length == 0 && f.map.push(0, 0, f.content.appendChild(Hc(o.display.measure))), m == 0 ? (c.measure.map = f.map, c.measure.cache = {}) : ((c.measure.maps || (c.measure.maps = [])).push(f.map), (c.measure.caches || (c.measure.caches = [])).push({}));
22955
22955
  }
@@ -23048,8 +23048,8 @@ b`.split(/\n/).length != 3 ? function(o) {
23048
23048
  } else Me.from > D && J > Me.from && (J = Me.from);
23049
23049
  }
23050
23050
  if (xe)
23051
- for (var Ht = 0; Ht < xe.length; Ht += 2)
23052
- xe[Ht + 1] == J && (ie += " " + xe[Ht]);
23051
+ for (var qt = 0; qt < xe.length; qt += 2)
23052
+ xe[qt + 1] == J && (ie += " " + xe[qt]);
23053
23053
  if (!fe || fe.from == D)
23054
23054
  for (var yt = 0; yt < pe.length; ++yt)
23055
23055
  u0(c, 0, pe[yt]);
@@ -23092,7 +23092,7 @@ b`.split(/\n/).length != 3 ? function(o) {
23092
23092
  }
23093
23093
  }
23094
23094
  function h0(o, c, p) {
23095
- this.line = c, this.rest = TR(c), this.size = this.rest ? N(qe(this.rest)) - p + 1 : 1, this.node = this.text = null, this.hidden = Kr(o, c);
23095
+ this.line = c, this.rest = TR(c), this.size = this.rest ? N(qe(this.rest)) - p + 1 : 1, this.node = this.text = null, this.hidden = Yr(o, c);
23096
23096
  }
23097
23097
  function Qc(o, c, p) {
23098
23098
  for (var f = [], m, S = c; S < p; S = m) {
@@ -23131,7 +23131,7 @@ b`.split(/\n/).length != 3 ? function(o) {
23131
23131
  }
23132
23132
  }
23133
23133
  var nl = null;
23134
- function $t(o, c) {
23134
+ function Gt(o, c) {
23135
23135
  var p = or(o, c);
23136
23136
  if (p.length) {
23137
23137
  var f = Array.prototype.slice.call(arguments, 2), m;
@@ -23233,7 +23233,7 @@ b`.split(/\n/).length != 3 ? function(o) {
23233
23233
  if (c.widgets)
23234
23234
  for (var S = il(p), x = 0, k = c.widgets; x < k.length; ++x) {
23235
23235
  var D = k[x], _ = B("div", [D.node], "CodeMirror-linewidget" + (D.className ? " " + D.className : ""));
23236
- D.handleMouseEvents || _.setAttribute("cm-ignore-events", "true"), WR(D, _, p, f), o.display.input.setUneditable(_), m && D.above ? S.insertBefore(_, p.gutter || p.text) : S.appendChild(_), $t(D, "redraw");
23236
+ D.handleMouseEvents || _.setAttribute("cm-ignore-events", "true"), WR(D, _, p, f), o.display.input.setUneditable(_), m && D.above ? S.insertBefore(_, p.gutter || p.text) : S.appendChild(_), Gt(D, "redraw");
23237
23237
  }
23238
23238
  }
23239
23239
  function WR(o, c, p, f) {
@@ -23488,7 +23488,7 @@ b`.split(/\n/).length != 3 ? function(o) {
23488
23488
  var fe = k[ie], Se = fe.level == 1;
23489
23489
  return x(ue ? Q - 1 : Q, Se != ue);
23490
23490
  }
23491
- var W = Wr(k, D, _), K = Rs, J = z(D, W, _ == "before");
23491
+ var W = Hr(k, D, _), K = Rs, J = z(D, W, _ == "before");
23492
23492
  return K != null && (J.other = z(D, K, _ != "before")), J;
23493
23493
  }
23494
23494
  function D0(o, c) {
@@ -23555,7 +23555,7 @@ b`.split(/\n/).length != 3 ? function(o) {
23555
23555
  var xe = wi(o, Z(p, Q, ue), "line", c, S);
23556
23556
  ie = xe.left, fe = m < xe.top ? -1 : m >= xe.bottom ? 1 : 0;
23557
23557
  }
23558
- return Q = $r(c.text, Q, 1), Qh(p, Q, ue, fe, f - ie);
23558
+ return Q = Gr(c.text, Q, 1), Qh(p, Q, ue, fe, f - ie);
23559
23559
  }
23560
23560
  function XR(o, c, p, f, m, S, x) {
23561
23561
  var k = Ni(function(W) {
@@ -23633,7 +23633,7 @@ b`.split(/\n/).length != 3 ? function(o) {
23633
23633
  function R0(o) {
23634
23634
  var c = ka(o.display), p = o.options.lineWrapping, f = p && Math.max(5, o.display.scroller.clientWidth / Ta(o.display) - 3);
23635
23635
  return function(m) {
23636
- if (Kr(o.doc, m))
23636
+ if (Yr(o.doc, m))
23637
23637
  return 0;
23638
23638
  var S = 0;
23639
23639
  if (m.widgets)
@@ -23677,25 +23677,25 @@ b`.split(/\n/).length != 3 ? function(o) {
23677
23677
  c == null && (c = o.doc.first), p == null && (p = o.doc.first + o.doc.size), f || (f = 0);
23678
23678
  var m = o.display;
23679
23679
  if (f && p < m.viewTo && (m.updateLineNumbers == null || m.updateLineNumbers > c) && (m.updateLineNumbers = c), o.curOp.viewChanged = !0, c >= m.viewTo)
23680
- cr && Hh(o.doc, c) < m.viewTo && Xr(o);
23680
+ cr && Hh(o.doc, c) < m.viewTo && Zr(o);
23681
23681
  else if (p <= m.viewFrom)
23682
- cr && l0(o.doc, p + f) > m.viewFrom ? Xr(o) : (m.viewFrom += f, m.viewTo += f);
23682
+ cr && l0(o.doc, p + f) > m.viewFrom ? Zr(o) : (m.viewFrom += f, m.viewTo += f);
23683
23683
  else if (c <= m.viewFrom && p >= m.viewTo)
23684
- Xr(o);
23684
+ Zr(o);
23685
23685
  else if (c <= m.viewFrom) {
23686
23686
  var S = id(o, p, p + f, 1);
23687
- S ? (m.view = m.view.slice(S.index), m.viewFrom = S.lineN, m.viewTo += f) : Xr(o);
23687
+ S ? (m.view = m.view.slice(S.index), m.viewFrom = S.lineN, m.viewTo += f) : Zr(o);
23688
23688
  } else if (p >= m.viewTo) {
23689
23689
  var x = id(o, c, c, -1);
23690
- x ? (m.view = m.view.slice(0, x.index), m.viewTo = x.lineN) : Xr(o);
23690
+ x ? (m.view = m.view.slice(0, x.index), m.viewTo = x.lineN) : Zr(o);
23691
23691
  } else {
23692
23692
  var k = id(o, c, c, -1), D = id(o, p, p + f, 1);
23693
- k && D ? (m.view = m.view.slice(0, k.index).concat(Qc(o, k.lineN, D.lineN)).concat(m.view.slice(D.index)), m.viewTo += f) : Xr(o);
23693
+ k && D ? (m.view = m.view.slice(0, k.index).concat(Qc(o, k.lineN, D.lineN)).concat(m.view.slice(D.index)), m.viewTo += f) : Zr(o);
23694
23694
  }
23695
23695
  var _ = m.externalMeasured;
23696
23696
  _ && (p < _.lineN ? _.lineN += f : c < _.lineN + _.size && (m.externalMeasured = null));
23697
23697
  }
23698
- function Yr(o, c, p) {
23698
+ function Xr(o, c, p) {
23699
23699
  o.curOp.viewChanged = !0;
23700
23700
  var f = o.display, m = o.display.externalMeasured;
23701
23701
  if (m && c >= m.lineN && c < m.lineN + m.size && (f.externalMeasured = null), !(c < f.viewFrom || c >= f.viewTo)) {
@@ -23706,7 +23706,7 @@ b`.split(/\n/).length != 3 ? function(o) {
23706
23706
  }
23707
23707
  }
23708
23708
  }
23709
- function Xr(o) {
23709
+ function Zr(o) {
23710
23710
  o.display.viewFrom = o.display.viewTo = o.doc.first, o.display.view = [], o.display.viewOffset = 0;
23711
23711
  }
23712
23712
  function id(o, c, p, f) {
@@ -23785,7 +23785,7 @@ b`.split(/\n/).length != 3 ? function(o) {
23785
23785
  height: ` + (Me - xe) + "px"));
23786
23786
  }
23787
23787
  function W(pe, xe, Ve) {
23788
- var Me = Re(m, pe), He = Me.text.length, ht, Ht;
23788
+ var Me = Re(m, pe), He = Me.text.length, ht, qt;
23789
23789
  function yt(At, Ln) {
23790
23790
  return nd(o, Z(pe, At), "div", Me, Ln);
23791
23791
  }
@@ -23794,17 +23794,17 @@ b`.split(/\n/).length != 3 ? function(o) {
23794
23794
  return yt(Ct, _t)[_t];
23795
23795
  }
23796
23796
  var Tn = je(Me, m.direction);
23797
- return Gr(Tn, xe || 0, Ve ?? He, function(At, Ln, Xt, Ft) {
23798
- var _t = Xt == "ltr", Ct = yt(At, _t ? "left" : "right"), Dn = yt(Ln - 1, _t ? "right" : "left"), Fa = xe == null && At == 0, is = Ve == null && Ln == He, sn = Ft == 0, Ui = !Tn || Ft == Tn.length - 1;
23797
+ return Wr(Tn, xe || 0, Ve ?? He, function(At, Ln, Xt, Ft) {
23798
+ var _t = Xt == "ltr", Ct = yt(At, _t ? "left" : "right"), Dn = yt(Ln - 1, _t ? "right" : "left"), Fa = xe == null && At == 0, rs = Ve == null && Ln == He, sn = Ft == 0, Ui = !Tn || Ft == Tn.length - 1;
23799
23799
  if (Dn.top - Ct.top <= 3) {
23800
- var qt = (_ ? Fa : is) && sn, _f = (_ ? is : Fa) && Ui, pr = qt ? k : (_t ? Ct : Dn).left, zs = _f ? D : (_t ? Dn : Ct).right;
23800
+ var jt = (_ ? Fa : rs) && sn, _f = (_ ? rs : Fa) && Ui, pr = jt ? k : (_t ? Ct : Dn).left, zs = _f ? D : (_t ? Dn : Ct).right;
23801
23801
  z(pr, Ct.top, zs - pr, Ct.bottom);
23802
23802
  } else {
23803
23803
  var $s, un, Ua, Mf;
23804
- _t ? ($s = _ && Fa && sn ? k : Ct.left, un = _ ? D : Bn(At, Xt, "before"), Ua = _ ? k : Bn(Ln, Xt, "after"), Mf = _ && is && Ui ? D : Dn.right) : ($s = _ ? Bn(At, Xt, "before") : k, un = !_ && Fa && sn ? D : Ct.right, Ua = !_ && is && Ui ? k : Dn.left, Mf = _ ? Bn(Ln, Xt, "after") : D), z($s, Ct.top, un - $s, Ct.bottom), Ct.bottom < Dn.top && z(k, Ct.bottom, null, Dn.top), z(Ua, Dn.top, Mf - Ua, Dn.bottom);
23804
+ _t ? ($s = _ && Fa && sn ? k : Ct.left, un = _ ? D : Bn(At, Xt, "before"), Ua = _ ? k : Bn(Ln, Xt, "after"), Mf = _ && rs && Ui ? D : Dn.right) : ($s = _ ? Bn(At, Xt, "before") : k, un = !_ && Fa && sn ? D : Ct.right, Ua = !_ && rs && Ui ? k : Dn.left, Mf = _ ? Bn(Ln, Xt, "after") : D), z($s, Ct.top, un - $s, Ct.bottom), Ct.bottom < Dn.top && z(k, Ct.bottom, null, Dn.top), z(Ua, Dn.top, Mf - Ua, Dn.bottom);
23805
23805
  }
23806
- (!ht || rd(Ct, ht) < 0) && (ht = Ct), rd(Dn, ht) < 0 && (ht = Dn), (!Ht || rd(Ct, Ht) < 0) && (Ht = Ct), rd(Dn, Ht) < 0 && (Ht = Dn);
23807
- }), { start: ht, end: Ht };
23806
+ (!ht || rd(Ct, ht) < 0) && (ht = Ct), rd(Dn, ht) < 0 && (ht = Dn), (!qt || rd(Ct, qt) < 0) && (qt = Ct), rd(Dn, qt) < 0 && (qt = Dn);
23807
+ }), { start: ht, end: qt };
23808
23808
  }
23809
23809
  var K = c.from(), J = c.to();
23810
23810
  if (K.line == J.line)
@@ -24163,7 +24163,7 @@ b`.split(/\n/).length != 3 ? function(o) {
24163
24163
  Us(o);
24164
24164
  }
24165
24165
  }
24166
- function Gt(o, c) {
24166
+ function Wt(o, c) {
24167
24167
  return function() {
24168
24168
  if (o.curOp)
24169
24169
  return c.apply(o, arguments);
@@ -24187,7 +24187,7 @@ b`.split(/\n/).length != 3 ? function(o) {
24187
24187
  }
24188
24188
  };
24189
24189
  }
24190
- function Wt(o) {
24190
+ function Ht(o) {
24191
24191
  return function() {
24192
24192
  var c = this.cm;
24193
24193
  if (!c || c.curOp)
@@ -24222,7 +24222,7 @@ b`.split(/\n/).length != 3 ? function(o) {
24222
24222
  return ul(o, o.options.workDelay), !0;
24223
24223
  }), c.highlightFrontier = f.line, c.modeFrontier = Math.max(c.modeFrontier, f.line), m.length && Vn(o, function() {
24224
24224
  for (var S = 0; S < m.length; S++)
24225
- Yr(o, m[S], "text");
24225
+ Xr(o, m[S], "text");
24226
24226
  });
24227
24227
  }
24228
24228
  }
@@ -24262,10 +24262,10 @@ b`.split(/\n/).length != 3 ? function(o) {
24262
24262
  function hf(o, c) {
24263
24263
  var p = o.display, f = o.doc;
24264
24264
  if (c.editorIsHidden)
24265
- return Xr(o), !1;
24265
+ return Zr(o), !1;
24266
24266
  if (!c.force && c.visible.from >= p.viewFrom && c.visible.to <= p.viewTo && (p.updateLineNumbers == null || p.updateLineNumbers >= p.viewTo) && p.renderedView == p.view && A0(o) == 0)
24267
24267
  return !1;
24268
- G0(o) && (Xr(o), c.dims = nf(o));
24268
+ G0(o) && (Zr(o), c.dims = nf(o));
24269
24269
  var m = f.first + f.size, S = Math.max(c.visible.from - o.options.viewportMargin, f.first), x = Math.min(m, c.visible.to + o.options.viewportMargin);
24270
24270
  p.viewFrom < S && S - p.viewFrom < 20 && (S = Math.max(f.first, p.viewFrom)), p.viewTo > x && p.viewTo - x < 20 && (x = Math.min(m, p.viewTo)), cr && (S = Hh(o.doc, S), x = l0(o.doc, x));
24271
24271
  var k = S != p.viewFrom || x != p.viewTo || p.lastWrapHeight != c.wrapperHeight || p.lastWrapWidth != c.wrapperWidth;
@@ -24322,7 +24322,7 @@ b`.split(/\n/).length != 3 ? function(o) {
24322
24322
  }
24323
24323
  function pf(o) {
24324
24324
  var c = o.gutters.offsetWidth;
24325
- o.sizer.style.marginLeft = c + "px", $t(o, "gutterChanged", o);
24325
+ o.sizer.style.marginLeft = c + "px", Gt(o, "gutterChanged", o);
24326
24326
  }
24327
24327
  function gf(o, c) {
24328
24328
  o.display.sizer.style.minHeight = c.docHeight + "px", o.display.heightForcer.style.top = c.docHeight + "px", o.display.gutters.style.height = c.docHeight + o.display.barHeight + Bi(o) + "px";
@@ -24450,7 +24450,7 @@ b`.split(/\n/).length != 3 ? function(o) {
24450
24450
  return !0;
24451
24451
  }, Wn.prototype.deepCopy = function() {
24452
24452
  for (var o = [], c = 0; c < this.ranges.length; c++)
24453
- o[c] = new tt(zt(this.ranges[c].anchor), zt(this.ranges[c].head));
24453
+ o[c] = new tt($t(this.ranges[c].anchor), $t(this.ranges[c].head));
24454
24454
  return new Wn(o, this.primIndex);
24455
24455
  }, Wn.prototype.somethingSelected = function() {
24456
24456
  for (var o = 0; o < this.ranges.length; o++)
@@ -24490,10 +24490,10 @@ b`.split(/\n/).length != 3 ? function(o) {
24490
24490
  }
24491
24491
  return new Wn(c, p);
24492
24492
  }
24493
- function Zr(o, c) {
24493
+ function Qr(o, c) {
24494
24494
  return new Wn([new tt(o, c || o)], 0);
24495
24495
  }
24496
- function Qr(o) {
24496
+ function es(o) {
24497
24497
  return o.text ? Z(
24498
24498
  o.from.line + o.text.length - 1,
24499
24499
  qe(o.text).length + (o.text.length == 1 ? o.from.ch : 0)
@@ -24503,9 +24503,9 @@ b`.split(/\n/).length != 3 ? function(o) {
24503
24503
  if (me(o, c.from) < 0)
24504
24504
  return o;
24505
24505
  if (me(o, c.to) <= 0)
24506
- return Qr(c);
24506
+ return es(c);
24507
24507
  var p = o.line + c.text.length - (c.to.line - c.from.line) - 1, f = o.ch;
24508
- return o.line == c.to.line && (f += Qr(c).ch - c.to.ch), Z(p, f);
24508
+ return o.line == c.to.line && (f += es(c).ch - c.to.ch), Z(p, f);
24509
24509
  }
24510
24510
  function vf(o, c) {
24511
24511
  for (var p = [], f = 0; f < o.sel.ranges.length; f++) {
@@ -24522,7 +24522,7 @@ b`.split(/\n/).length != 3 ? function(o) {
24522
24522
  }
24523
24523
  function SA(o, c, p) {
24524
24524
  for (var f = [], m = Z(o.first, 0), S = m, x = 0; x < c.length; x++) {
24525
- var k = c[x], D = J0(k.from, m, S), _ = J0(Qr(k), m, S);
24525
+ var k = c[x], D = J0(k.from, m, S), _ = J0(es(k), m, S);
24526
24526
  if (m = k.to, S = _, p == "around") {
24527
24527
  var z = o.sel.ranges[x], W = me(z.head, z.anchor) < 0;
24528
24528
  f[x] = new tt(W ? _ : D, W ? D : _);
@@ -24547,7 +24547,7 @@ b`.split(/\n/).length != 3 ? function(o) {
24547
24547
  return p ? p[Se] : null;
24548
24548
  }
24549
24549
  function S(Se, pe, xe) {
24550
- LR(Se, pe, xe, f), $t(Se, "change", Se, c);
24550
+ LR(Se, pe, xe, f), Gt(Se, "change", Se, c);
24551
24551
  }
24552
24552
  function x(Se, pe) {
24553
24553
  for (var xe = [], Ve = Se; Ve < pe; ++Ve)
@@ -24574,9 +24574,9 @@ b`.split(/\n/).length != 3 ? function(o) {
24574
24574
  var fe = x(1, _.length - 1);
24575
24575
  Q > 1 && o.remove(k.line + 1, Q - 1), o.insert(k.line + 1, fe);
24576
24576
  }
24577
- $t(o, "change", o, c);
24577
+ Gt(o, "change", o, c);
24578
24578
  }
24579
- function es(o, c, p) {
24579
+ function ts(o, c, p) {
24580
24580
  function f(m, S, x) {
24581
24581
  if (m.linked)
24582
24582
  for (var k = 0; k < m.linked.length; ++k) {
@@ -24606,8 +24606,8 @@ b`.split(/\n/).length != 3 ? function(o) {
24606
24606
  this.done = [], this.undone = [], this.undoDepth = o ? o.undoDepth : 1 / 0, this.lastModTime = this.lastSelTime = 0, this.lastOp = this.lastSelOp = null, this.lastOrigin = this.lastSelOrigin = null, this.generation = this.maxGeneration = o ? o.maxGeneration : 1;
24607
24607
  }
24608
24608
  function bf(o, c) {
24609
- var p = { from: zt(c.from), to: Qr(c), text: lr(o, c.from, c.to) };
24610
- return eb(o, p, c.from.line, c.to.line + 1), es(o, function(f) {
24609
+ var p = { from: $t(c.from), to: es(c), text: lr(o, c.from, c.to) };
24610
+ return eb(o, p, c.from.line, c.to.line + 1), ts(o, function(f) {
24611
24611
  return eb(f, p, c.from.line, c.to.line + 1);
24612
24612
  }, !0), p;
24613
24613
  }
@@ -24633,7 +24633,7 @@ b`.split(/\n/).length != 3 ? function(o) {
24633
24633
  m.undone.length = 0;
24634
24634
  var S = +/* @__PURE__ */ new Date(), x, k;
24635
24635
  if ((m.lastOp == f || m.lastOrigin == c.origin && c.origin && (c.origin.charAt(0) == "+" && m.lastModTime > S - (o.cm ? o.cm.options.historyEventDelay : 500) || c.origin.charAt(0) == "*")) && (x = wA(m, m.lastOp == f)))
24636
- k = qe(x.changes), me(c.from, c.to) == 0 && me(c.from, k.to) == 0 ? k.to = Qr(c) : x.changes.push(bf(o, c));
24636
+ k = qe(x.changes), me(c.from, c.to) == 0 && me(c.from, k.to) == 0 ? k.to = es(c) : x.changes.push(bf(o, c));
24637
24637
  else {
24638
24638
  var D = qe(m.done);
24639
24639
  for ((!D || !D.ranges) && ud(o.sel, m.done), x = {
@@ -24739,7 +24739,7 @@ b`.split(/\n/).length != 3 ? function(o) {
24739
24739
  m[c] = p, rn(o, Ci(o.cm, m, o.sel.primIndex), f);
24740
24740
  }
24741
24741
  function ib(o, c, p, f) {
24742
- rn(o, Zr(c, p), f);
24742
+ rn(o, Qr(c, p), f);
24743
24743
  }
24744
24744
  function TA(o, c, p) {
24745
24745
  var f = {
@@ -24769,7 +24769,7 @@ b`.split(/\n/).length != 3 ? function(o) {
24769
24769
  sb(o, ob(o, c, f, !0)), !(p && p.scroll === !1) && o.cm && o.cm.getOption("readOnly") != "nocursor" && Da(o.cm);
24770
24770
  }
24771
24771
  function sb(o, c) {
24772
- c.equals(o.sel) || (o.sel = c, o.cm && (o.cm.curOp.updateInput = 1, o.cm.curOp.selectionChanged = !0, Xn(o.cm)), $t(o, "cursorActivity", o));
24772
+ c.equals(o.sel) || (o.sel = c, o.cm && (o.cm.curOp.updateInput = 1, o.cm.curOp.selectionChanged = !0, Xn(o.cm)), Gt(o, "cursorActivity", o));
24773
24773
  }
24774
24774
  function ab(o) {
24775
24775
  sb(o, ob(o, o.sel, null, !1));
@@ -24834,7 +24834,7 @@ b`.split(/\n/).length != 3 ? function(o) {
24834
24834
  function Aa(o, c, p) {
24835
24835
  if (o.cm) {
24836
24836
  if (!o.cm.curOp)
24837
- return Gt(o.cm, Aa)(o, c, p);
24837
+ return Wt(o.cm, Aa)(o, c, p);
24838
24838
  if (o.cm.state.suppressEdits)
24839
24839
  return;
24840
24840
  }
@@ -24852,7 +24852,7 @@ b`.split(/\n/).length != 3 ? function(o) {
24852
24852
  var p = vf(o, c);
24853
24853
  Q0(o, c, p, o.cm ? o.cm.curOp.id : NaN), pl(o, c, p, Gh(o, c));
24854
24854
  var f = [];
24855
- es(o, function(m, S) {
24855
+ ts(o, function(m, S) {
24856
24856
  !S && Ce(f, m.history) == -1 && (gb(m.history, c), f.push(m.history)), pl(m, c, null, Gh(m, c));
24857
24857
  });
24858
24858
  }
@@ -24883,9 +24883,9 @@ b`.split(/\n/).length != 3 ? function(o) {
24883
24883
  return k.length = 0, {};
24884
24884
  z.push(bf(o, ue));
24885
24885
  var fe = ie ? vf(o, ue) : qe(k);
24886
- pl(o, ue, fe, tb(o, ue)), !ie && o.cm && o.cm.scrollIntoView({ from: ue.from, to: Qr(ue) });
24886
+ pl(o, ue, fe, tb(o, ue)), !ie && o.cm && o.cm.scrollIntoView({ from: ue.from, to: es(ue) });
24887
24887
  var Se = [];
24888
- es(o, function(pe, xe) {
24888
+ ts(o, function(pe, xe) {
24889
24889
  !xe && Ce(Se, pe.history) == -1 && (gb(pe.history, ue), Se.push(pe.history)), pl(pe, ue, null, tb(pe, ue));
24890
24890
  });
24891
24891
  }, J = S.changes.length - 1; J >= 0; --J) {
@@ -24904,12 +24904,12 @@ b`.split(/\n/).length != 3 ? function(o) {
24904
24904
  }), o.sel.primIndex), o.cm)) {
24905
24905
  En(o.cm, o.first, o.first - c, c);
24906
24906
  for (var p = o.cm.display, f = p.viewFrom; f < p.viewTo; f++)
24907
- Yr(o.cm, f, "gutter");
24907
+ Xr(o.cm, f, "gutter");
24908
24908
  }
24909
24909
  }
24910
24910
  function pl(o, c, p, f) {
24911
24911
  if (o.cm && !o.cm.curOp)
24912
- return Gt(o.cm, pl)(o, c, p, f);
24912
+ return Wt(o.cm, pl)(o, c, p, f);
24913
24913
  if (c.to.line < o.first) {
24914
24914
  hb(o, c.text.length - 1 - (c.to.line - c.from.line));
24915
24915
  return;
@@ -24943,7 +24943,7 @@ b`.split(/\n/).length != 3 ? function(o) {
24943
24943
  Q > m.maxLineLength && (m.maxLine = J, m.maxLineLength = Q, m.maxLineChanged = !0, k = !1);
24944
24944
  }), k && (o.curOp.updateMaxLine = !0)), mR(f, S.line), ul(o, 400);
24945
24945
  var _ = c.text.length - (x.line - S.line) - 1;
24946
- c.full ? En(o) : S.line == x.line && c.text.length == 1 && !K0(o.doc, c) ? Yr(o, S.line, "text") : En(o, S.line, x.line + 1, _);
24946
+ c.full ? En(o) : S.line == x.line && c.text.length == 1 && !K0(o.doc, c) ? Xr(o, S.line, "text") : En(o, S.line, x.line + 1, _);
24947
24947
  var z = On(o, "changes"), W = On(o, "change");
24948
24948
  if (W || z) {
24949
24949
  var K = {
@@ -24953,7 +24953,7 @@ b`.split(/\n/).length != 3 ? function(o) {
24953
24953
  removed: c.removed,
24954
24954
  origin: c.origin
24955
24955
  };
24956
- W && $t(o, "change", o, K), z && (o.curOp.changeObjs || (o.curOp.changeObjs = [])).push(K);
24956
+ W && Gt(o, "change", o, K), z && (o.curOp.changeObjs || (o.curOp.changeObjs = [])).push(K);
24957
24957
  }
24958
24958
  o.display.selForContextMenu = null;
24959
24959
  }
@@ -24991,7 +24991,7 @@ b`.split(/\n/).length != 3 ? function(o) {
24991
24991
  }
24992
24992
  function gl(o, c, p, f) {
24993
24993
  var m = c, S = c;
24994
- return typeof c == "number" ? S = Re(o, qS(o, c)) : m = N(c), m == null ? null : (f(S, m) && o.cm && Yr(o.cm, m, p), S);
24994
+ return typeof c == "number" ? S = Re(o, qS(o, c)) : m = N(c), m == null ? null : (f(S, m) && o.cm && Xr(o.cm, m, p), S);
24995
24995
  }
24996
24996
  function ml(o) {
24997
24997
  this.lines = o, this.parent = null;
@@ -25007,7 +25007,7 @@ b`.split(/\n/).length != 3 ? function(o) {
25007
25007
  removeInner: function(o, c) {
25008
25008
  for (var p = o, f = o + c; p < f; ++p) {
25009
25009
  var m = this.lines[p];
25010
- this.height -= m.height, DR(m), $t(m, "delete");
25010
+ this.height -= m.height, DR(m), Gt(m, "delete");
25011
25011
  }
25012
25012
  this.lines.splice(o, c);
25013
25013
  },
@@ -25127,15 +25127,15 @@ b`.split(/\n/).length != 3 ? function(o) {
25127
25127
  c.length || (p.widgets = null);
25128
25128
  var S = rl(this);
25129
25129
  Gn(p, Math.max(0, p.height - S)), o && (Vn(o, function() {
25130
- mb(o, p, -S), Yr(o, f, "widget");
25131
- }), $t(o, "lineWidgetCleared", o, this, f));
25130
+ mb(o, p, -S), Xr(o, f, "widget");
25131
+ }), Gt(o, "lineWidgetCleared", o, this, f));
25132
25132
  }
25133
25133
  }, yl.prototype.changed = function() {
25134
25134
  var o = this, c = this.height, p = this.doc.cm, f = this.line;
25135
25135
  this.height = null;
25136
25136
  var m = rl(this) - c;
25137
- m && (Kr(this.doc, f) || Gn(f, f.height + m), p && Vn(p, function() {
25138
- p.curOp.forceUpdate = !0, mb(p, f, m), $t(p, "lineWidgetChanged", p, o, N(f));
25137
+ m && (Yr(this.doc, f) || Gn(f, f.height + m), p && Vn(p, function() {
25138
+ p.curOp.forceUpdate = !0, mb(p, f, m), Gt(p, "lineWidgetChanged", p, o, N(f));
25139
25139
  }));
25140
25140
  }, gi(yl);
25141
25141
  function mb(o, c, p) {
@@ -25145,35 +25145,35 @@ b`.split(/\n/).length != 3 ? function(o) {
25145
25145
  var m = new yl(o, p, f), S = o.cm;
25146
25146
  return S && m.noHScroll && (S.display.alignWidgets = !0), gl(o, c, "widget", function(x) {
25147
25147
  var k = x.widgets || (x.widgets = []);
25148
- if (m.insertAt == null ? k.push(m) : k.splice(Math.min(k.length, Math.max(0, m.insertAt)), 0, m), m.line = x, S && !Kr(o, x)) {
25148
+ if (m.insertAt == null ? k.push(m) : k.splice(Math.min(k.length, Math.max(0, m.insertAt)), 0, m), m.line = x, S && !Yr(o, x)) {
25149
25149
  var D = dr(x) < o.scrollTop;
25150
25150
  Gn(x, x.height + rl(m)), D && uf(S, m.height), S.curOp.forceUpdate = !0;
25151
25151
  }
25152
25152
  return !0;
25153
- }), S && $t(S, "lineWidgetAdded", S, m, typeof c == "number" ? c : N(c)), m;
25153
+ }), S && Gt(S, "lineWidgetAdded", S, m, typeof c == "number" ? c : N(c)), m;
25154
25154
  }
25155
- var vb = 0, ts = function(o, c) {
25155
+ var vb = 0, ns = function(o, c) {
25156
25156
  this.lines = [], this.type = c, this.doc = o, this.id = ++vb;
25157
25157
  };
25158
- ts.prototype.clear = function() {
25158
+ ns.prototype.clear = function() {
25159
25159
  if (!this.explicitlyCleared) {
25160
25160
  var o = this.doc.cm, c = o && !o.curOp;
25161
25161
  if (c && Fs(o), On(this, "clear")) {
25162
25162
  var p = this.find();
25163
- p && $t(this, "clear", p.from, p.to);
25163
+ p && Gt(this, "clear", p.from, p.to);
25164
25164
  }
25165
25165
  for (var f = null, m = null, S = 0; S < this.lines.length; ++S) {
25166
25166
  var x = this.lines[S], k = tl(x.markedSpans, this);
25167
- o && !this.collapsed ? Yr(o, N(x), "text") : o && (k.to != null && (m = N(x)), k.from != null && (f = N(x))), x.markedSpans = SR(x.markedSpans, k), k.from == null && this.collapsed && !Kr(this.doc, x) && o && Gn(x, ka(o.display));
25167
+ o && !this.collapsed ? Xr(o, N(x), "text") : o && (k.to != null && (m = N(x)), k.from != null && (f = N(x))), x.markedSpans = SR(x.markedSpans, k), k.from == null && this.collapsed && !Yr(this.doc, x) && o && Gn(x, ka(o.display));
25168
25168
  }
25169
25169
  if (o && this.collapsed && !o.options.lineWrapping)
25170
25170
  for (var D = 0; D < this.lines.length; ++D) {
25171
25171
  var _ = bi(this.lines[D]), z = Zc(_);
25172
25172
  z > o.display.maxLineLength && (o.display.maxLine = _, o.display.maxLineLength = z, o.display.maxLineChanged = !0);
25173
25173
  }
25174
- f != null && o && this.collapsed && En(o, f, m + 1), this.lines.length = 0, this.explicitlyCleared = !0, this.atomic && this.doc.cantEdit && (this.doc.cantEdit = !1, o && ab(o.doc)), o && $t(o, "markerCleared", o, this, f, m), c && Us(o), this.parent && this.parent.clear();
25174
+ f != null && o && this.collapsed && En(o, f, m + 1), this.lines.length = 0, this.explicitlyCleared = !0, this.atomic && this.doc.cantEdit && (this.doc.cantEdit = !1, o && ab(o.doc)), o && Gt(o, "markerCleared", o, this, f, m), c && Us(o), this.parent && this.parent.clear();
25175
25175
  }
25176
- }, ts.prototype.find = function(o, c) {
25176
+ }, ns.prototype.find = function(o, c) {
25177
25177
  o == null && this.type == "bookmark" && (o = 1);
25178
25178
  for (var p, f, m = 0; m < this.lines.length; ++m) {
25179
25179
  var S = this.lines[m], x = tl(S.markedSpans, this);
@@ -25183,36 +25183,36 @@ b`.split(/\n/).length != 3 ? function(o) {
25183
25183
  return f;
25184
25184
  }
25185
25185
  return p && { from: p, to: f };
25186
- }, ts.prototype.changed = function() {
25186
+ }, ns.prototype.changed = function() {
25187
25187
  var o = this, c = this.find(-1, !0), p = this, f = this.doc.cm;
25188
25188
  !c || !f || Vn(f, function() {
25189
25189
  var m = c.line, S = N(c.line), x = Xh(f, S);
25190
- if (x && (x0(x), f.curOp.selectionChanged = f.curOp.forceUpdate = !0), f.curOp.updateMaxLine = !0, !Kr(p.doc, m) && p.height != null) {
25190
+ if (x && (x0(x), f.curOp.selectionChanged = f.curOp.forceUpdate = !0), f.curOp.updateMaxLine = !0, !Yr(p.doc, m) && p.height != null) {
25191
25191
  var k = p.height;
25192
25192
  p.height = null;
25193
25193
  var D = rl(p) - k;
25194
25194
  D && Gn(m, m.height + D);
25195
25195
  }
25196
- $t(f, "markerChanged", f, o);
25196
+ Gt(f, "markerChanged", f, o);
25197
25197
  });
25198
- }, ts.prototype.attachLine = function(o) {
25198
+ }, ns.prototype.attachLine = function(o) {
25199
25199
  if (!this.lines.length && this.doc.cm) {
25200
25200
  var c = this.doc.cm.curOp;
25201
25201
  (!c.maybeHiddenMarkers || Ce(c.maybeHiddenMarkers, this) == -1) && (c.maybeUnhiddenMarkers || (c.maybeUnhiddenMarkers = [])).push(this);
25202
25202
  }
25203
25203
  this.lines.push(o);
25204
- }, ts.prototype.detachLine = function(o) {
25204
+ }, ns.prototype.detachLine = function(o) {
25205
25205
  if (this.lines.splice(Ce(this.lines, o), 1), !this.lines.length && this.doc.cm) {
25206
25206
  var c = this.doc.cm.curOp;
25207
25207
  (c.maybeHiddenMarkers || (c.maybeHiddenMarkers = [])).push(this);
25208
25208
  }
25209
- }, gi(ts);
25209
+ }, gi(ns);
25210
25210
  function Ma(o, c, p, f, m) {
25211
25211
  if (f && f.shared)
25212
25212
  return IA(o, c, p, f, m);
25213
25213
  if (o.cm && !o.cm.curOp)
25214
- return Gt(o.cm, Ma)(o, c, p, f, m);
25215
- var S = new ts(o, m), x = me(c, p);
25214
+ return Wt(o.cm, Ma)(o, c, p, f, m);
25215
+ var S = new ns(o, m), x = me(c, p);
25216
25216
  if (f && Pe(f, S, !1), x > 0 || x == 0 && S.clearWhenEmpty !== !1)
25217
25217
  return S;
25218
25218
  if (S.replacedWith && (S.collapsed = !0, S.widgetNode = le("span", [S.replacedWith], "CodeMirror-widget"), f.handleMouseEvents || S.widgetNode.setAttribute("cm-ignore-events", "true"), f.insertLeft && (S.widgetNode.insertLeft = !0)), S.collapsed) {
@@ -25229,7 +25229,7 @@ b`.split(/\n/).length != 3 ? function(o) {
25229
25229
  k == p.line ? p.ch : null
25230
25230
  ), o.cm && o.cm.curOp), ++k;
25231
25231
  }), S.collapsed && o.iter(c.line, p.line + 1, function(W) {
25232
- Kr(o, W) && Gn(W, 0);
25232
+ Yr(o, W) && Gn(W, 0);
25233
25233
  }), S.clearOnEnter && Oe(S, "beforeCursorEnter", function() {
25234
25234
  return S.clear();
25235
25235
  }), S.readOnly && (vR(), (o.history.done.length || o.history.undone.length) && o.clearHistory()), S.collapsed && (S.id = ++vb, S.atomic = !0), D) {
@@ -25237,8 +25237,8 @@ b`.split(/\n/).length != 3 ? function(o) {
25237
25237
  En(D, c.line, p.line + 1);
25238
25238
  else if (S.className || S.startStyle || S.endStyle || S.css || S.attributes || S.title)
25239
25239
  for (var z = c.line; z <= p.line; z++)
25240
- Yr(D, z, "text");
25241
- S.atomic && ab(D.doc), $t(D, "markerAdded", D, S);
25240
+ Xr(D, z, "text");
25241
+ S.atomic && ab(D.doc), Gt(D, "markerAdded", D, S);
25242
25242
  }
25243
25243
  return S;
25244
25244
  }
@@ -25252,7 +25252,7 @@ b`.split(/\n/).length != 3 ? function(o) {
25252
25252
  this.explicitlyCleared = !0;
25253
25253
  for (var o = 0; o < this.markers.length; ++o)
25254
25254
  this.markers[o].clear();
25255
- $t(this, "clear");
25255
+ Gt(this, "clear");
25256
25256
  }
25257
25257
  }, Sl.prototype.find = function(o, c) {
25258
25258
  return this.primary.find(o, c);
@@ -25260,7 +25260,7 @@ b`.split(/\n/).length != 3 ? function(o) {
25260
25260
  function IA(o, c, p, f, m) {
25261
25261
  f = Pe(f), f.shared = !1;
25262
25262
  var S = [Ma(o, c, p, f, m)], x = S[0], k = f.widgetNode;
25263
- return es(o, function(D) {
25263
+ return ts(o, function(D) {
25264
25264
  k && (f.widgetNode = k.cloneNode(!0)), S.push(Ma(D, $e(D, c), $e(D, p), f, m));
25265
25265
  for (var _ = 0; _ < D.linked.length; ++_)
25266
25266
  if (D.linked[_].isParent)
@@ -25285,7 +25285,7 @@ b`.split(/\n/).length != 3 ? function(o) {
25285
25285
  function RA(o) {
25286
25286
  for (var c = function(f) {
25287
25287
  var m = o[f], S = [m.primary.doc];
25288
- es(m.primary.doc, function(D) {
25288
+ ts(m.primary.doc, function(D) {
25289
25289
  return S.push(D);
25290
25290
  });
25291
25291
  for (var x = 0; x < m.markers.length; x++) {
@@ -25299,9 +25299,9 @@ b`.split(/\n/).length != 3 ? function(o) {
25299
25299
  return new kn(o, c, p, f, m);
25300
25300
  p == null && (p = 0), vl.call(this, [new ml([new Ca("", null)])]), this.first = p, this.scrollTop = this.scrollLeft = 0, this.cantEdit = !1, this.cleanGeneration = 1, this.modeFrontier = this.highlightFrontier = p;
25301
25301
  var S = Z(p, 0);
25302
- this.sel = Zr(S), this.history = new dd(null), this.id = ++AA, this.modeOption = c, this.lineSep = f, this.direction = m == "rtl" ? "rtl" : "ltr", this.extend = !1, typeof o == "string" && (o = this.splitLines(o)), Sf(this, { from: S, to: S, text: o }), rn(this, Zr(S), Bt);
25302
+ this.sel = Qr(S), this.history = new dd(null), this.id = ++AA, this.modeOption = c, this.lineSep = f, this.direction = m == "rtl" ? "rtl" : "ltr", this.extend = !1, typeof o == "string" && (o = this.splitLines(o)), Sf(this, { from: S, to: S, text: o }), rn(this, Qr(S), Bt);
25303
25303
  };
25304
- kn.prototype = Ur(vl.prototype, {
25304
+ kn.prototype = zr(vl.prototype, {
25305
25305
  constructor: kn,
25306
25306
  // Iterate over the document. Supports two forms -- with only one
25307
25307
  // argument, it calls that for each line in the document. With
@@ -25325,7 +25325,7 @@ b`.split(/\n/).length != 3 ? function(o) {
25325
25325
  var c = Qo(this, this.first, this.first + this.size);
25326
25326
  return o === !1 ? c : c.join(o || this.lineSeparator());
25327
25327
  },
25328
- setValue: Wt(function(o) {
25328
+ setValue: Ht(function(o) {
25329
25329
  var c = Z(this.first, 0), p = this.first + this.size - 1;
25330
25330
  Aa(this, {
25331
25331
  from: c,
@@ -25333,7 +25333,7 @@ b`.split(/\n/).length != 3 ? function(o) {
25333
25333
  text: this.splitLines(o),
25334
25334
  origin: "setValue",
25335
25335
  full: !0
25336
- }, !0), this.cm && ol(this.cm, 0, 0), rn(this, Zr(c), Bt);
25336
+ }, !0), this.cm && ol(this.cm, 0, 0), rn(this, Qr(c), Bt);
25337
25337
  }),
25338
25338
  replaceRange: function(o, c, p, f) {
25339
25339
  c = $e(this, c), p = p ? $e(this, p) : c, _a(this, o, c, p, f);
@@ -25378,23 +25378,23 @@ b`.split(/\n/).length != 3 ? function(o) {
25378
25378
  somethingSelected: function() {
25379
25379
  return this.sel.somethingSelected();
25380
25380
  },
25381
- setCursor: Wt(function(o, c, p) {
25381
+ setCursor: Ht(function(o, c, p) {
25382
25382
  ib(this, $e(this, typeof o == "number" ? Z(o, c || 0) : o), null, p);
25383
25383
  }),
25384
- setSelection: Wt(function(o, c, p) {
25384
+ setSelection: Ht(function(o, c, p) {
25385
25385
  ib(this, $e(this, o), $e(this, c || o), p);
25386
25386
  }),
25387
- extendSelection: Wt(function(o, c, p) {
25387
+ extendSelection: Ht(function(o, c, p) {
25388
25388
  hd(this, $e(this, o), c && $e(this, c), p);
25389
25389
  }),
25390
- extendSelections: Wt(function(o, c) {
25390
+ extendSelections: Ht(function(o, c) {
25391
25391
  nb(this, jS(this, o), c);
25392
25392
  }),
25393
- extendSelectionsBy: Wt(function(o, c) {
25393
+ extendSelectionsBy: Ht(function(o, c) {
25394
25394
  var p = Yn(this.sel.ranges, o);
25395
25395
  nb(this, jS(this, p), c);
25396
25396
  }),
25397
- setSelections: Wt(function(o, c, p) {
25397
+ setSelections: Ht(function(o, c, p) {
25398
25398
  if (o.length) {
25399
25399
  for (var f = [], m = 0; m < o.length; m++)
25400
25400
  f[m] = new tt(
@@ -25404,7 +25404,7 @@ b`.split(/\n/).length != 3 ? function(o) {
25404
25404
  c == null && (c = Math.min(o.length - 1, this.sel.primIndex)), rn(this, Ci(this.cm, f, c), p);
25405
25405
  }
25406
25406
  }),
25407
- addSelection: Wt(function(o, c, p) {
25407
+ addSelection: Ht(function(o, c, p) {
25408
25408
  var f = this.sel.ranges.slice(0);
25409
25409
  f.push(new tt($e(this, o), $e(this, c || o))), rn(this, Ci(this.cm, f, f.length - 1), p);
25410
25410
  }),
@@ -25427,7 +25427,7 @@ b`.split(/\n/).length != 3 ? function(o) {
25427
25427
  f[m] = o;
25428
25428
  this.replaceSelections(f, c, p || "+input");
25429
25429
  },
25430
- replaceSelections: Wt(function(o, c, p) {
25430
+ replaceSelections: Ht(function(o, c, p) {
25431
25431
  for (var f = [], m = this.sel, S = 0; S < m.ranges.length; S++) {
25432
25432
  var x = m.ranges[S];
25433
25433
  f[S] = { from: x.from(), to: x.to(), text: this.splitLines(o[S]), origin: p };
@@ -25436,16 +25436,16 @@ b`.split(/\n/).length != 3 ? function(o) {
25436
25436
  Aa(this, f[D]);
25437
25437
  k ? rb(this, k) : this.cm && Da(this.cm);
25438
25438
  }),
25439
- undo: Wt(function() {
25439
+ undo: Ht(function() {
25440
25440
  gd(this, "undo");
25441
25441
  }),
25442
- redo: Wt(function() {
25442
+ redo: Ht(function() {
25443
25443
  gd(this, "redo");
25444
25444
  }),
25445
- undoSelection: Wt(function() {
25445
+ undoSelection: Ht(function() {
25446
25446
  gd(this, "undo", !0);
25447
25447
  }),
25448
- redoSelection: Wt(function() {
25448
+ redoSelection: Ht(function() {
25449
25449
  gd(this, "redo", !0);
25450
25450
  }),
25451
25451
  setExtending: function(o) {
@@ -25463,7 +25463,7 @@ b`.split(/\n/).length != 3 ? function(o) {
25463
25463
  },
25464
25464
  clearHistory: function() {
25465
25465
  var o = this;
25466
- this.history = new dd(this.history), es(this, function(c) {
25466
+ this.history = new dd(this.history), ts(this, function(c) {
25467
25467
  return c.history = o.history;
25468
25468
  }, !0);
25469
25469
  },
@@ -25486,17 +25486,17 @@ b`.split(/\n/).length != 3 ? function(o) {
25486
25486
  var c = this.history = new dd(this.history);
25487
25487
  c.done = Pa(o.done.slice(0), null, !0), c.undone = Pa(o.undone.slice(0), null, !0);
25488
25488
  },
25489
- setGutterMarker: Wt(function(o, c, p) {
25489
+ setGutterMarker: Ht(function(o, c, p) {
25490
25490
  return gl(this, o, "gutter", function(f) {
25491
25491
  var m = f.gutterMarkers || (f.gutterMarkers = {});
25492
- return m[c] = p, !p && zr(m) && (f.gutterMarkers = null), !0;
25492
+ return m[c] = p, !p && $r(m) && (f.gutterMarkers = null), !0;
25493
25493
  });
25494
25494
  }),
25495
- clearGutter: Wt(function(o) {
25495
+ clearGutter: Ht(function(o) {
25496
25496
  var c = this;
25497
25497
  this.iter(function(p) {
25498
25498
  p.gutterMarkers && p.gutterMarkers[o] && gl(c, p, "gutter", function() {
25499
- return p.gutterMarkers[o] = null, zr(p.gutterMarkers) && (p.gutterMarkers = null), !0;
25499
+ return p.gutterMarkers[o] = null, $r(p.gutterMarkers) && (p.gutterMarkers = null), !0;
25500
25500
  });
25501
25501
  });
25502
25502
  }),
@@ -25518,7 +25518,7 @@ b`.split(/\n/).length != 3 ? function(o) {
25518
25518
  widgets: o.widgets
25519
25519
  };
25520
25520
  },
25521
- addLineClass: Wt(function(o, c, p) {
25521
+ addLineClass: Ht(function(o, c, p) {
25522
25522
  return gl(this, o, c == "gutter" ? "gutter" : "class", function(f) {
25523
25523
  var m = c == "text" ? "textClass" : c == "background" ? "bgClass" : c == "gutter" ? "gutterClass" : "wrapClass";
25524
25524
  if (!f[m])
@@ -25531,7 +25531,7 @@ b`.split(/\n/).length != 3 ? function(o) {
25531
25531
  return !0;
25532
25532
  });
25533
25533
  }),
25534
- removeLineClass: Wt(function(o, c, p) {
25534
+ removeLineClass: Ht(function(o, c, p) {
25535
25535
  return gl(this, o, c == "gutter" ? "gutter" : "class", function(f) {
25536
25536
  var m = c == "text" ? "textClass" : c == "background" ? "bgClass" : c == "gutter" ? "gutterClass" : "wrapClass", S = f[m];
25537
25537
  if (S)
@@ -25548,7 +25548,7 @@ b`.split(/\n/).length != 3 ? function(o) {
25548
25548
  return !0;
25549
25549
  });
25550
25550
  }),
25551
- addLineWidget: Wt(function(o, c, p) {
25551
+ addLineWidget: Ht(function(o, c, p) {
25552
25552
  return DA(this, o, c, p);
25553
25553
  }),
25554
25554
  removeLineWidget: function(o) {
@@ -25646,13 +25646,13 @@ b`.split(/\n/).length != 3 ? function(o) {
25646
25646
  }
25647
25647
  if (o.history == this.history) {
25648
25648
  var f = [o.id];
25649
- es(o, function(m) {
25649
+ ts(o, function(m) {
25650
25650
  return f.push(m.id);
25651
25651
  }, !0), o.history = new dd(null), o.history.done = Pa(this.history.done, f), o.history.undone = Pa(this.history.undone, f);
25652
25652
  }
25653
25653
  },
25654
25654
  iterLinkedDocs: function(o) {
25655
- es(this, o);
25655
+ ts(this, o);
25656
25656
  },
25657
25657
  getMode: function() {
25658
25658
  return this.mode;
@@ -25667,7 +25667,7 @@ b`.split(/\n/).length != 3 ? function(o) {
25667
25667
  return this.lineSep || `
25668
25668
  `;
25669
25669
  },
25670
- setDirection: Wt(function(o) {
25670
+ setDirection: Ht(function(o) {
25671
25671
  o != "rtl" && (o = "ltr"), o != this.direction && (this.direction = o, this.iter(function(c) {
25672
25672
  return c.order = null;
25673
25673
  }), this.cm && bA(this.cm));
@@ -25682,7 +25682,7 @@ b`.split(/\n/).length != 3 ? function(o) {
25682
25682
  if (!(!p || c.isReadOnly()))
25683
25683
  if (f && f.length && window.FileReader && window.File)
25684
25684
  for (var m = f.length, S = Array(m), x = 0, k = function() {
25685
- ++x == m && Gt(c, function() {
25685
+ ++x == m && Wt(c, function() {
25686
25686
  p = $e(c.doc, p);
25687
25687
  var J = {
25688
25688
  from: p,
@@ -25694,7 +25694,7 @@ b`.split(/\n/).length != 3 ? function(o) {
25694
25694
  ),
25695
25695
  origin: "paste"
25696
25696
  };
25697
- Aa(c.doc, J), rb(c.doc, Zr($e(c.doc, p), $e(c.doc, Qr(J))));
25697
+ Aa(c.doc, J), rb(c.doc, Qr($e(c.doc, p), $e(c.doc, es(J))));
25698
25698
  })();
25699
25699
  }, D = function(J, Q) {
25700
25700
  if (c.options.allowDropFileTypes && Ce(c.options.allowDropFileTypes, J.type) == -1) {
@@ -25725,7 +25725,7 @@ b`.split(/\n/).length != 3 ? function(o) {
25725
25725
  var z = o.dataTransfer.getData("Text");
25726
25726
  if (z) {
25727
25727
  var W;
25728
- if (c.state.draggingText && !c.state.draggingText.copy && (W = c.listSelections()), fd(c.doc, Zr(p, p)), W)
25728
+ if (c.state.draggingText && !c.state.draggingText.copy && (W = c.listSelections()), fd(c.doc, Qr(p, p)), W)
25729
25729
  for (var K = 0; K < W.length; ++K)
25730
25730
  _a(c.doc, "", W[K].anchor, W[K].head, "drag");
25731
25731
  c.replaceSelection(z, "around", "paste"), c.display.input.focus();
@@ -25737,7 +25737,7 @@ b`.split(/\n/).length != 3 ? function(o) {
25737
25737
  }
25738
25738
  function MA(o, c) {
25739
25739
  if (d && (!o.state.draggingText || +/* @__PURE__ */ new Date() - Sb < 100)) {
25740
- Hr(c);
25740
+ qr(c);
25741
25741
  return;
25742
25742
  }
25743
25743
  if (!(bt(o, c) || ur(o.display, c)) && (c.dataTransfer.setData("Text", o.getSelection()), c.dataTransfer.effectAllowed = "copyMove", c.dataTransfer.setDragImage && !w)) {
@@ -25785,7 +25785,7 @@ b`.split(/\n/).length != 3 ? function(o) {
25785
25785
  var c = o.display;
25786
25786
  c.cachedCharWidth = c.cachedTextHeight = c.cachedPaddingH = null, c.scrollbarsClipped = !1, o.setSize();
25787
25787
  }
25788
- for (var ns = {
25788
+ for (var is = {
25789
25789
  3: "Pause",
25790
25790
  8: "Backspace",
25791
25791
  9: "Tab",
@@ -25843,11 +25843,11 @@ b`.split(/\n/).length != 3 ? function(o) {
25843
25843
  63277: "PageDown",
25844
25844
  63302: "Insert"
25845
25845
  }, bl = 0; bl < 10; bl++)
25846
- ns[bl + 48] = ns[bl + 96] = String(bl);
25846
+ is[bl + 48] = is[bl + 96] = String(bl);
25847
25847
  for (var md = 65; md <= 90; md++)
25848
- ns[md] = String.fromCharCode(md);
25848
+ is[md] = String.fromCharCode(md);
25849
25849
  for (var wl = 1; wl <= 12; wl++)
25850
- ns[wl + 111] = ns[wl + 63235] = "F" + wl;
25850
+ is[wl + 111] = is[wl + 63235] = "F" + wl;
25851
25851
  var fr = {};
25852
25852
  fr.basic = {
25853
25853
  Left: "goCharLeft",
@@ -26006,7 +26006,7 @@ b`.split(/\n/).length != 3 ? function(o) {
26006
26006
  }
26007
26007
  }
26008
26008
  function xb(o) {
26009
- var c = typeof o == "string" ? o : ns[o.keyCode];
26009
+ var c = typeof o == "string" ? o : is[o.keyCode];
26010
26010
  return c == "Ctrl" || c == "Alt" || c == "Shift" || c == "Mod";
26011
26011
  }
26012
26012
  function Eb(o, c, p) {
@@ -26016,7 +26016,7 @@ b`.split(/\n/).length != 3 ? function(o) {
26016
26016
  function kb(o, c) {
26017
26017
  if (C && o.keyCode == 34 && o.char)
26018
26018
  return !1;
26019
- var p = ns[o.keyCode];
26019
+ var p = is[o.keyCode];
26020
26020
  return p == null || o.altGraphKey ? !1 : (o.keyCode == 3 && o.code && (p = o.code), Eb(p, o, c));
26021
26021
  }
26022
26022
  function vd(o) {
@@ -26040,7 +26040,7 @@ b`.split(/\n/).length != 3 ? function(o) {
26040
26040
  });
26041
26041
  }
26042
26042
  function xf(o, c, p) {
26043
- var f = $r(o.text, c + p, p);
26043
+ var f = Gr(o.text, c + p, p);
26044
26044
  return f < 0 || f > o.text.length ? null : f;
26045
26045
  }
26046
26046
  function Ef(o, c, p) {
@@ -26072,7 +26072,7 @@ b`.split(/\n/).length != 3 ? function(o) {
26072
26072
  if (!m)
26073
26073
  return Ef(c, p, f);
26074
26074
  p.ch >= c.text.length ? (p.ch = c.text.length, p.sticky = "before") : p.ch <= 0 && (p.ch = 0, p.sticky = "after");
26075
- var S = Wr(m, p.ch, p.sticky), x = m[S];
26075
+ var S = Hr(m, p.ch, p.sticky), x = m[S];
26076
26076
  if (o.doc.direction == "ltr" && x.level % 2 == 0 && (f > 0 ? x.to > p.ch : x.from < p.ch))
26077
26077
  return Ef(c, p, f);
26078
26078
  var k = function(fe, Se) {
@@ -26088,8 +26088,8 @@ b`.split(/\n/).length != 3 ? function(o) {
26088
26088
  }
26089
26089
  }
26090
26090
  var Q = function(fe, Se, pe) {
26091
- for (var xe = function(ht, Ht) {
26092
- return Ht ? new Z(p.line, k(ht, 1), "before") : new Z(p.line, ht, "after");
26091
+ for (var xe = function(ht, qt) {
26092
+ return qt ? new Z(p.line, k(ht, 1), "before") : new Z(p.line, ht, "after");
26093
26093
  }; fe >= 0 && fe < m.length; fe += Se) {
26094
26094
  var Ve = m[fe], Me = Se > 0 == (Ve.level != 1), He = Me ? pe.begin : k(pe.end, -1);
26095
26095
  if (Ve.from <= He && He < Ve.to || (He = Me ? Ve.from : k(Ve.to, -1), pe.begin <= He && He < pe.end))
@@ -26383,7 +26383,7 @@ b`.split(/\n/).length != 3 ? function(o) {
26383
26383
  }
26384
26384
  function Db(o, c, p, f) {
26385
26385
  var m = GA(o, c, f);
26386
- return m == "multi" && (o.state.keySeq = c), m == "handled" && $t(o, "keyHandled", o, c, p), (m == "handled" || m == "multi") && (nn(p), of(o)), !!m;
26386
+ return m == "multi" && (o.state.keySeq = c), m == "handled" && Gt(o, "keyHandled", o, c, p), (m == "handled" || m == "multi") && (nn(p), of(o)), !!m;
26387
26387
  }
26388
26388
  function Ib(o, c) {
26389
26389
  var p = kb(c, !0);
@@ -26493,7 +26493,7 @@ b`.split(/\n/).length != 3 ? function(o) {
26493
26493
  o.options.dragDrop && Fh && !o.isReadOnly() && p == "single" && (x = S.contains(c)) > -1 && (me((x = S.ranges[x]).from(), c) < 0 || c.xRel > 0) && (me(x.to(), c) > 0 || c.xRel < 0) ? ZA(o, f, c, m) : QA(o, f, c, m);
26494
26494
  }
26495
26495
  function ZA(o, c, p, f) {
26496
- var m = o.display, S = !1, x = Gt(o, function(_) {
26496
+ var m = o.display, S = !1, x = Wt(o, function(_) {
26497
26497
  h && (m.scroller.draggable = !1), o.state.draggingText = !1, o.state.delayingBlurEvent && (o.hasFocus() ? o.state.delayingBlurEvent = !1 : lf(o)), tn(m.wrapper.ownerDocument, "mouseup", x), tn(m.wrapper.ownerDocument, "mousemove", k), tn(m.scroller, "dragstart", D), tn(m.scroller, "drop", x), S || (nn(_), f.addNew || hd(o.doc, p, null, null, f.extend), h && !w || d && u == 9 ? setTimeout(function() {
26498
26498
  m.wrapper.ownerDocument.body.focus({ preventScroll: !0 }), m.input.focus();
26499
26499
  }, 20) : m.input.focus());
@@ -26540,9 +26540,9 @@ b`.split(/\n/).length != 3 ? function(o) {
26540
26540
  function K(pe) {
26541
26541
  if (me(W, pe) != 0)
26542
26542
  if (W = pe, f.unit == "rectangle") {
26543
- for (var xe = [], Ve = o.options.tabSize, Me = Ue(Re(S, p.line).text, p.ch, Ve), He = Ue(Re(S, pe.line).text, pe.ch, Ve), ht = Math.min(Me, He), Ht = Math.max(Me, He), yt = Math.min(p.line, pe.line), Bn = Math.min(o.lastLine(), Math.max(p.line, pe.line)); yt <= Bn; yt++) {
26543
+ for (var xe = [], Ve = o.options.tabSize, Me = Ue(Re(S, p.line).text, p.ch, Ve), He = Ue(Re(S, pe.line).text, pe.ch, Ve), ht = Math.min(Me, He), qt = Math.max(Me, He), yt = Math.min(p.line, pe.line), Bn = Math.min(o.lastLine(), Math.max(p.line, pe.line)); yt <= Bn; yt++) {
26544
26544
  var Tn = Re(S, yt).text, At = cn(Tn, ht, Ve);
26545
- ht == Ht ? xe.push(new tt(Z(yt, At), Z(yt, At))) : Tn.length > At && xe.push(new tt(Z(yt, At), Z(yt, cn(Tn, Ht, Ve))));
26545
+ ht == qt ? xe.push(new tt(Z(yt, At), Z(yt, At))) : Tn.length > At && xe.push(new tt(Z(yt, At), Z(yt, cn(Tn, qt, Ve))));
26546
26546
  }
26547
26547
  xe.length || xe.push(new tt(p, p)), rn(
26548
26548
  S,
@@ -26563,12 +26563,12 @@ b`.split(/\n/).length != 3 ? function(o) {
26563
26563
  if (me(Ve, W) != 0) {
26564
26564
  o.curOp.focus = se(De(o)), K(Ve);
26565
26565
  var Me = ad(m, S);
26566
- (Ve.line >= Me.to || Ve.line < Me.from) && setTimeout(Gt(o, function() {
26566
+ (Ve.line >= Me.to || Ve.line < Me.from) && setTimeout(Wt(o, function() {
26567
26567
  Q == xe && ie(pe);
26568
26568
  }), 150);
26569
26569
  } else {
26570
26570
  var He = pe.clientY < J.top ? -20 : pe.clientY > J.bottom ? 20 : 0;
26571
- He && setTimeout(Gt(o, function() {
26571
+ He && setTimeout(Wt(o, function() {
26572
26572
  Q == xe && (m.scroller.scrollTop += He, ie(pe));
26573
26573
  }), 50);
26574
26574
  }
@@ -26576,9 +26576,9 @@ b`.split(/\n/).length != 3 ? function(o) {
26576
26576
  function ue(pe) {
26577
26577
  o.state.selectingText = !1, Q = 1 / 0, pe && (nn(pe), m.input.focus()), tn(m.wrapper.ownerDocument, "mousemove", fe), tn(m.wrapper.ownerDocument, "mouseup", Se), S.history.lastSelOrigin = null;
26578
26578
  }
26579
- var fe = Gt(o, function(pe) {
26579
+ var fe = Wt(o, function(pe) {
26580
26580
  pe.buttons === 0 || !mi(pe) ? ue(pe) : ie(pe);
26581
- }), Se = Gt(o, ue);
26581
+ }), Se = Wt(o, ue);
26582
26582
  o.state.selectingText = Se, Oe(m.wrapper.ownerDocument, "mousemove", fe), Oe(m.wrapper.ownerDocument, "mouseup", Se);
26583
26583
  }
26584
26584
  function e_(o, c) {
@@ -26588,7 +26588,7 @@ b`.split(/\n/).length != 3 ? function(o) {
26588
26588
  var S = je(m);
26589
26589
  if (!S)
26590
26590
  return c;
26591
- var x = Wr(S, p.ch, p.sticky), k = S[x];
26591
+ var x = Hr(S, p.ch, p.sticky), k = S[x];
26592
26592
  if (k.from != p.ch && k.to != p.ch)
26593
26593
  return c;
26594
26594
  var D = x + (k.from == p.ch == (k.level != 1) ? 0 : 1);
@@ -26598,7 +26598,7 @@ b`.split(/\n/).length != 3 ? function(o) {
26598
26598
  if (f.line != p.line)
26599
26599
  _ = (f.line - p.line) * (o.doc.direction == "ltr" ? 1 : -1) > 0;
26600
26600
  else {
26601
- var z = Wr(S, f.ch, f.sticky), W = z - x || (f.ch - p.ch) * (k.level == 1 ? -1 : 1);
26601
+ var z = Hr(S, f.ch, f.sticky), W = z - x || (f.ch - p.ch) * (k.level == 1 ? -1 : 1);
26602
26602
  z == D - 1 || z == D ? _ = W < 0 : _ = W > 0;
26603
26603
  }
26604
26604
  var K = S[D + (_ ? -1 : 0)], J = _ == (K.level == 1), Q = J ? K.from : K.to, ie = J ? "after" : "before";
@@ -26776,7 +26776,7 @@ b`.split(/\n/).length != 3 ? function(o) {
26776
26776
  mt.defaults = Bb, mt.optionHandlers = Sd;
26777
26777
  function s_(o) {
26778
26778
  var c = o.display;
26779
- Oe(c.scroller, "mousedown", Gt(o, _b)), d && u < 11 ? Oe(c.scroller, "dblclick", Gt(o, function(D) {
26779
+ Oe(c.scroller, "mousedown", Wt(o, _b)), d && u < 11 ? Oe(c.scroller, "dblclick", Wt(o, function(D) {
26780
26780
  if (!bt(o, D)) {
26781
26781
  var _ = Ns(o, D);
26782
26782
  if (!(!_ || Df(o, D) || ur(o.display, D))) {
@@ -26839,15 +26839,15 @@ b`.split(/\n/).length != 3 ? function(o) {
26839
26839
  return c.wrapper.scrollTop = c.wrapper.scrollLeft = 0;
26840
26840
  }), c.dragFunctions = {
26841
26841
  enter: function(D) {
26842
- bt(o, D) || Hr(D);
26842
+ bt(o, D) || qr(D);
26843
26843
  },
26844
26844
  over: function(D) {
26845
- bt(o, D) || (NA(o, D), Hr(D));
26845
+ bt(o, D) || (NA(o, D), qr(D));
26846
26846
  },
26847
26847
  start: function(D) {
26848
26848
  return MA(o, D);
26849
26849
  },
26850
- drop: Gt(o, _A),
26850
+ drop: Wt(o, _A),
26851
26851
  leave: function(D) {
26852
26852
  bt(o, D) || bb(o);
26853
26853
  }
@@ -26855,7 +26855,7 @@ b`.split(/\n/).length != 3 ? function(o) {
26855
26855
  var k = c.input.getField();
26856
26856
  Oe(k, "keyup", function(D) {
26857
26857
  return Rb.call(o, D);
26858
- }), Oe(k, "keydown", Gt(o, Pb)), Oe(k, "keypress", Gt(o, Ab)), Oe(k, "focus", function(D) {
26858
+ }), Oe(k, "keydown", Wt(o, Pb)), Oe(k, "keypress", Wt(o, Ab)), Oe(k, "focus", function(D) {
26859
26859
  return cf(o, D);
26860
26860
  }), Oe(k, "blur", function(D) {
26861
26861
  return La(o, D);
@@ -26924,7 +26924,7 @@ b`.split(/\n/).length != 3 ? function(o) {
26924
26924
  text: _ ? _[K % _.length] : D,
26925
26925
  origin: m || (k ? "paste" : o.state.cutIncoming > x ? "cut" : "+input")
26926
26926
  };
26927
- Aa(o.doc, ue), $t(o, "inputRead", o, ue);
26927
+ Aa(o.doc, ue), Gt(o, "inputRead", o, ue);
26928
26928
  }
26929
26929
  c && !k && Ub(o, c), Da(o), o.curOp.updateInput < 2 && (o.curOp.updateInput = W), o.curOp.typing = !0, o.state.pasteIncoming = o.state.cutIncoming = -1;
26930
26930
  }
@@ -26948,7 +26948,7 @@ b`.split(/\n/).length != 3 ? function(o) {
26948
26948
  break;
26949
26949
  }
26950
26950
  } else S.electricInput && S.electricInput.test(Re(o.doc, m.head.line).text.slice(0, m.head.ch)) && (x = Tl(o, m.head.line, "smart"));
26951
- x && $t(o, "electricInput", o, m.head.line);
26951
+ x && Gt(o, "electricInput", o, m.head.line);
26952
26952
  }
26953
26953
  }
26954
26954
  }
@@ -26975,7 +26975,7 @@ b`.split(/\n/).length != 3 ? function(o) {
26975
26975
  },
26976
26976
  setOption: function(f, m) {
26977
26977
  var S = this.options, x = S[f];
26978
- S[f] == m && f != "mode" || (S[f] = m, c.hasOwnProperty(f) && Gt(this, c[f])(this, m, x), St(this, "optionChange", this, f));
26978
+ S[f] == m && f != "mode" || (S[f] = m, c.hasOwnProperty(f) && Wt(this, c[f])(this, m, x), St(this, "optionChange", this, f));
26979
26979
  },
26980
26980
  getOption: function(f) {
26981
26981
  return this.options[f];
@@ -26995,7 +26995,7 @@ b`.split(/\n/).length != 3 ? function(o) {
26995
26995
  var S = f.token ? f : o.getMode(this.options, f);
26996
26996
  if (S.startState)
26997
26997
  throw new Error("Overlays may not be stateful.");
26998
- Fr(
26998
+ Ur(
26999
26999
  this.state.overlays,
27000
27000
  {
27001
27001
  mode: S,
@@ -27245,7 +27245,7 @@ b`.split(/\n/).length != 3 ? function(o) {
27245
27245
  if (D.widgets) {
27246
27246
  for (var _ = 0; _ < D.widgets.length; _++)
27247
27247
  if (D.widgets[_].noHScroll) {
27248
- Yr(S, k, "widget");
27248
+ Xr(S, k, "widget");
27249
27249
  break;
27250
27250
  }
27251
27251
  }
@@ -27267,7 +27267,7 @@ b`.split(/\n/).length != 3 ? function(o) {
27267
27267
  }),
27268
27268
  swapDoc: dn(function(f) {
27269
27269
  var m = this.doc;
27270
- return m.cm = null, this.state.selectingText && this.state.selectingText(), Y0(this, f), sl(this), this.display.input.reset(), ol(this, f.scrollLeft, f.scrollTop), this.curOp.forceScroll = !0, $t(this, "swapDoc", this, m), m;
27270
+ return m.cm = null, this.state.selectingText && this.state.selectingText(), Y0(this, f), sl(this), this.display.input.reset(), ol(this, f.scrollLeft, f.scrollTop), this.curOp.forceScroll = !0, Gt(this, "swapDoc", this, m), m;
27271
27271
  }),
27272
27272
  phrase: function(f) {
27273
27273
  var m = this.options.phrases;
@@ -27367,7 +27367,7 @@ b`.split(/\n/).length != 3 ? function(o) {
27367
27367
  return !1;
27368
27368
  }
27369
27369
  Oe(m, "paste", function(k) {
27370
- !S(k) || bt(f, k) || Fb(k, f) || u <= 11 && setTimeout(Gt(f, function() {
27370
+ !S(k) || bt(f, k) || Fb(k, f) || u <= 11 && setTimeout(Wt(f, function() {
27371
27371
  return c.updateFromDOM();
27372
27372
  }), 20);
27373
27373
  }), Oe(m, "compositionstart", function(k) {
@@ -27495,7 +27495,7 @@ b`.split(/\n/).length != 3 ? function(o) {
27495
27495
  this.rememberSelection();
27496
27496
  var p = wd(c, o.anchorNode, o.anchorOffset), f = wd(c, o.focusNode, o.focusOffset);
27497
27497
  p && f && Vn(c, function() {
27498
- rn(c.doc, Zr(p, f), Bt), (p.bad || f.bad) && (c.curOp.selectionChanged = !0);
27498
+ rn(c.doc, Qr(p, f), Bt), (p.bad || f.bad) && (c.curOp.selectionChanged = !0);
27499
27499
  });
27500
27500
  }
27501
27501
  }
@@ -27554,7 +27554,7 @@ b`.split(/\n/).length != 3 ? function(o) {
27554
27554
  }, ot.prototype.setUneditable = function(o) {
27555
27555
  o.contentEditable = "false";
27556
27556
  }, ot.prototype.onKeyPress = function(o) {
27557
- o.charCode == 0 || this.composing || (o.preventDefault(), this.cm.isReadOnly() || Gt(this.cm, Pf)(this.cm, String.fromCharCode(o.charCode == null ? o.keyCode : o.charCode), 0));
27557
+ o.charCode == 0 || this.composing || (o.preventDefault(), this.cm.isReadOnly() || Wt(this.cm, Pf)(this.cm, String.fromCharCode(o.charCode == null ? o.keyCode : o.charCode), 0));
27558
27558
  }, ot.prototype.readOnlyChanged = function(o) {
27559
27559
  this.div.contentEditable = String(o != "nocursor");
27560
27560
  }, ot.prototype.onContextMenu = function() {
@@ -27566,7 +27566,7 @@ b`.split(/\n/).length != 3 ? function(o) {
27566
27566
  return null;
27567
27567
  var f = Re(o.doc, c.line), m = S0(p, f, c.line), S = je(f, o.doc.direction), x = "left";
27568
27568
  if (S) {
27569
- var k = Wr(S, c.ch);
27569
+ var k = Hr(S, c.ch);
27570
27570
  x = k % 2 ? "right" : "left";
27571
27571
  }
27572
27572
  var D = C0(m.map, c.ch, x);
@@ -27785,7 +27785,7 @@ b`.split(/\n/).length != 3 ? function(o) {
27785
27785
  c.polling.set(20, p);
27786
27786
  }, Tt.prototype.poll = function() {
27787
27787
  var o = this, c = this.cm, p = this.textarea, f = this.prevInput;
27788
- if (this.contextMenuPending || this.resetting || !c.state.focused || jr(p) && !f && !this.composing || c.isReadOnly() || c.options.disableInput || c.state.keySeq)
27788
+ if (this.contextMenuPending || this.resetting || !c.state.focused || Jr(p) && !f && !this.composing || c.isReadOnly() || c.options.disableInput || c.state.keySeq)
27789
27789
  return !1;
27790
27790
  var m = p.value;
27791
27791
  if (m == f && !c.somethingSelected())
@@ -27824,7 +27824,7 @@ b`.split(/\n/).length != 3 ? function(o) {
27824
27824
  if (!S || C)
27825
27825
  return;
27826
27826
  var k = p.options.resetSelectionOnContextMenu;
27827
- k && p.doc.sel.contains(S) == -1 && Gt(p, rn)(p.doc, Zr(S), Bt);
27827
+ k && p.doc.sel.contains(S) == -1 && Wt(p, rn)(p.doc, Qr(S), Bt);
27828
27828
  var D = m.style.cssText, _ = c.wrapper.style.cssText, z = c.wrapper.offsetParent.getBoundingClientRect();
27829
27829
  c.wrapper.style.cssText = "position: static", m.style.cssText = `position: absolute; width: 30px; height: 30px;
27830
27830
  top: ` + (o.clientY - z.top - 5) + "px; left: " + (o.clientX - z.left - 5) + `px;
@@ -27842,13 +27842,13 @@ b`.split(/\n/).length != 3 ? function(o) {
27842
27842
  if (c.contextMenuPending == J && (c.contextMenuPending = !1, c.wrapper.style.cssText = _, m.style.cssText = D, d && u < 9 && f.scrollbars.setScrollTop(f.scroller.scrollTop = x), m.selectionStart != null)) {
27843
27843
  (!d || d && u < 9) && K();
27844
27844
  var ie = 0, ue = function() {
27845
- f.selForContextMenu == p.doc.sel && m.selectionStart == 0 && m.selectionEnd > 0 && c.prevInput == "​" ? Gt(p, cb)(p) : ie++ < 10 ? f.detectingSelectAll = setTimeout(ue, 500) : (f.selForContextMenu = null, f.input.reset());
27845
+ f.selForContextMenu == p.doc.sel && m.selectionStart == 0 && m.selectionEnd > 0 && c.prevInput == "​" ? Wt(p, cb)(p) : ie++ < 10 ? f.detectingSelectAll = setTimeout(ue, 500) : (f.selForContextMenu = null, f.input.reset());
27846
27846
  };
27847
27847
  f.detectingSelectAll = setTimeout(ue, 200);
27848
27848
  }
27849
27849
  }
27850
27850
  if (d && u >= 9 && K(), F) {
27851
- Hr(o);
27851
+ qr(o);
27852
27852
  var Q = function() {
27853
27853
  tn(window, "mouseup", Q), setTimeout(J, 20);
27854
27854
  };
@@ -27894,7 +27894,7 @@ b`.split(/\n/).length != 3 ? function(o) {
27894
27894
  return k;
27895
27895
  }
27896
27896
  function u_(o) {
27897
- o.off = tn, o.on = Oe, o.wheelEventPixels = yA, o.Doc = kn, o.splitLines = Zn, o.countColumn = Ue, o.findColumn = cn, o.isWordChar = Ps, o.Pass = Vt, o.signal = St, o.Line = Ca, o.changeEnd = Qr, o.scrollbarModel = F0, o.Pos = Z, o.cmpPos = me, o.modes = ma, o.mimeModes = yi, o.resolveMode = va, o.getMode = ya, o.modeExtensions = Jr, o.extendMode = Sa, o.copyState = Oi, o.startState = ba, o.innerMode = Zo, o.commands = Cl, o.keyMap = fr, o.keyName = kb, o.isModifierKey = xb, o.lookupKey = Na, o.normalizeKeyMap = UA, o.StringStream = wt, o.SharedTextMarker = Sl, o.TextMarker = ts, o.LineWidget = yl, o.e_preventDefault = nn, o.e_stopPropagation = pa, o.e_stop = Hr, o.addClass = we, o.contains = Ee, o.rmClass = U, o.keyNames = ns;
27897
+ o.off = tn, o.on = Oe, o.wheelEventPixels = yA, o.Doc = kn, o.splitLines = Zn, o.countColumn = Ue, o.findColumn = cn, o.isWordChar = Ps, o.Pass = Vt, o.signal = St, o.Line = Ca, o.changeEnd = es, o.scrollbarModel = F0, o.Pos = Z, o.cmpPos = me, o.modes = ma, o.mimeModes = yi, o.resolveMode = va, o.getMode = ya, o.modeExtensions = Kr, o.extendMode = Sa, o.copyState = Oi, o.startState = ba, o.innerMode = Zo, o.commands = Cl, o.keyMap = fr, o.keyName = kb, o.isModifierKey = xb, o.lookupKey = Na, o.normalizeKeyMap = UA, o.StringStream = wt, o.SharedTextMarker = Sl, o.TextMarker = ns, o.LineWidget = yl, o.e_preventDefault = nn, o.e_stopPropagation = pa, o.e_stop = qr, o.addClass = we, o.contains = Ee, o.rmClass = U, o.keyNames = is;
27898
27898
  }
27899
27899
  n_(mt), a_(mt);
27900
27900
  var h_ = "iter insert remove copy getEditor constructor".split(" ");
@@ -27919,15 +27919,15 @@ b`.split(/\n/).length != 3 ? function(o) {
27919
27919
  }(Xd)), Xd.exports;
27920
27920
  }
27921
27921
  var yE;
27922
- function n4() {
27922
+ function nW() {
27923
27923
  return yE || (yE = 1, function(i, e) {
27924
27924
  (function(t) {
27925
27925
  t(Wo());
27926
27926
  })(function(t) {
27927
27927
  t.defineMode("javascript", function(n, r) {
27928
27928
  var s = n.indentUnit, a = r.statementIndent, l = r.jsonld, d = r.json || l, u = r.trackScope !== !1, h = r.typescript, g = r.wordCharacters || /[\w$\xa1-\uffff]/, v = function() {
27929
- function N(zt) {
27930
- return { type: zt, style: "keyword" };
27929
+ function N($t) {
27930
+ return { type: $t, style: "keyword" };
27931
27931
  }
27932
27932
  var G = N("keyword a"), ee = N("keyword b"), de = N("keyword c"), Z = N("keyword d"), me = N("operator"), et = { type: "atom", style: "atom" };
27933
27933
  return {
@@ -28069,25 +28069,25 @@ function n4() {
28069
28069
  de && (ee = de.index);
28070
28070
  }
28071
28071
  for (var Z = 0, me = !1, et = ee - 1; et >= 0; --et) {
28072
- var zt = N.string.charAt(et), xn = A.indexOf(zt);
28072
+ var $t = N.string.charAt(et), xn = A.indexOf($t);
28073
28073
  if (xn >= 0 && xn < 3) {
28074
28074
  if (!Z) {
28075
28075
  ++et;
28076
28076
  break;
28077
28077
  }
28078
28078
  if (--Z == 0) {
28079
- zt == "(" && (me = !0);
28079
+ $t == "(" && (me = !0);
28080
28080
  break;
28081
28081
  }
28082
28082
  } else if (xn >= 3 && xn < 6)
28083
28083
  ++Z;
28084
- else if (g.test(zt))
28084
+ else if (g.test($t))
28085
28085
  me = !0;
28086
- else if (/["'\/`]/.test(zt))
28086
+ else if (/["'\/`]/.test($t))
28087
28087
  for (; ; --et) {
28088
28088
  if (et == 0) return;
28089
28089
  var wa = N.string.charAt(et - 1);
28090
- if (wa == zt && N.string.charAt(et - 2) != "\\") {
28090
+ if (wa == $t && N.string.charAt(et - 2) != "\\") {
28091
28091
  et--;
28092
28092
  break;
28093
28093
  }
@@ -28222,7 +28222,7 @@ function n4() {
28222
28222
  ke,
28223
28223
  ke,
28224
28224
  ze
28225
- ) : N == "case" ? B(Ce, Pe(":")) : N == "default" ? B(Pe(":")) : N == "catch" ? B(Ie("form"), Ae, Fe, Ue, ke, ze) : N == "export" ? B(Ie("stat"), va, ke) : N == "import" ? B(Ie("stat"), Jr, ke) : N == "async" ? B(Ue) : G == "@" ? B(Ce, Ue) : $(Ie("stat"), Ce, Pe(";"), ke);
28225
+ ) : N == "case" ? B(Ce, Pe(":")) : N == "default" ? B(Pe(":")) : N == "catch" ? B(Ie("form"), Ae, Fe, Ue, ke, ze) : N == "export" ? B(Ie("stat"), va, ke) : N == "import" ? B(Ie("stat"), Kr, ke) : N == "async" ? B(Ue) : G == "@" ? B(Ce, Ue) : $(Ie("stat"), Ce, Pe(";"), ke);
28226
28226
  }
28227
28227
  function Fe(N) {
28228
28228
  if (N == "(") return B(vi, Pe(")"));
@@ -28243,7 +28243,7 @@ function n4() {
28243
28243
  if (N == "variable") return $(Ae, Cn, Pe("=>"), de, ze);
28244
28244
  }
28245
28245
  var Z = ee ? cn : Yt;
28246
- return O.hasOwnProperty(N) ? B(Z) : N == "function" ? B(Zn, Z) : N == "class" || h && G == "interface" ? (V.marked = "keyword", B(Ie("form"), Uh, ke)) : N == "keyword c" || N == "async" ? B(ee ? Ke : Ce) : N == "(" ? B(Ie(")"), bn, Pe(")"), ke, Z) : N == "operator" || N == "spread" ? B(ee ? Ke : Ce) : N == "[" ? B(Ie("]"), wt, ke, Z) : N == "{" ? $r(pi, "}", null, Z) : N == "quasi" ? $(wn, Z) : N == "new" ? B(Fr(ee)) : B();
28246
+ return O.hasOwnProperty(N) ? B(Z) : N == "function" ? B(Zn, Z) : N == "class" || h && G == "interface" ? (V.marked = "keyword", B(Ie("form"), Uh, ke)) : N == "keyword c" || N == "async" ? B(ee ? Ke : Ce) : N == "(" ? B(Ie(")"), bn, Pe(")"), ke, Z) : N == "operator" || N == "spread" ? B(ee ? Ke : Ce) : N == "[" ? B(Ie("]"), wt, ke, Z) : N == "{" ? Gr(pi, "}", null, Z) : N == "quasi" ? $(wn, Z) : N == "new" ? B(Ur(ee)) : B();
28247
28247
  }
28248
28248
  function bn(N) {
28249
28249
  return N.match(/[;\}\)\],]/) ? $() : $(Ce);
@@ -28259,7 +28259,7 @@ function n4() {
28259
28259
  if (N == "quasi")
28260
28260
  return $(wn, de);
28261
28261
  if (N != ";") {
28262
- if (N == "(") return $r(Ke, ")", "call", de);
28262
+ if (N == "(") return Gr(Ke, ")", "call", de);
28263
28263
  if (N == ".") return B(Ps, de);
28264
28264
  if (N == "[") return B(Ie("]"), bn, Pe("]"), ke, de);
28265
28265
  if (h && G == "as")
@@ -28281,16 +28281,16 @@ function n4() {
28281
28281
  function Yn(N) {
28282
28282
  return M(V.stream, V.state), $(N == "{" ? Ue : Ke);
28283
28283
  }
28284
- function Fr(N) {
28284
+ function Ur(N) {
28285
28285
  return function(G) {
28286
- return G == "." ? B(N ? Ur : Ko) : G == "variable" && h ? B(On, N ? cn : Yt) : $(N ? Ke : Ce);
28286
+ return G == "." ? B(N ? zr : Ko) : G == "variable" && h ? B(On, N ? cn : Yt) : $(N ? Ke : Ce);
28287
28287
  };
28288
28288
  }
28289
28289
  function Ko(N, G) {
28290
28290
  if (G == "target")
28291
28291
  return V.marked = "keyword", B(Yt);
28292
28292
  }
28293
- function Ur(N, G) {
28293
+ function zr(N, G) {
28294
28294
  if (G == "target")
28295
28295
  return V.marked = "keyword", B(cn);
28296
28296
  }
@@ -28305,7 +28305,7 @@ function n4() {
28305
28305
  if (N == "async")
28306
28306
  return V.marked = "property", B(pi);
28307
28307
  if (N == "variable" || V.style == "keyword") {
28308
- if (V.marked = "property", G == "get" || G == "set") return B(zr);
28308
+ if (V.marked = "property", G == "get" || G == "set") return B($r);
28309
28309
  var ee;
28310
28310
  return h && V.state.fatArrowAt == V.stream.start && (ee = V.stream.match(/^\s*:\s*/, !1)) && (V.state.fatArrowAt = V.stream.pos + ee[0].length), B(ar);
28311
28311
  } else {
@@ -28316,7 +28316,7 @@ function n4() {
28316
28316
  if (h && se(G))
28317
28317
  return V.marked = "keyword", B(pi);
28318
28318
  if (N == "[")
28319
- return B(Ce, Gr, Pe("]"), ar);
28319
+ return B(Ce, Wr, Pe("]"), ar);
28320
28320
  if (N == "spread")
28321
28321
  return B(Ke, ar);
28322
28322
  if (G == "*")
@@ -28325,7 +28325,7 @@ function n4() {
28325
28325
  return $(ar);
28326
28326
  }
28327
28327
  }
28328
- function zr(N) {
28328
+ function $r(N) {
28329
28329
  return N != "variable" ? $(ar) : (V.marked = "property", B(Zn));
28330
28330
  }
28331
28331
  function ar(N) {
@@ -28336,8 +28336,8 @@ function n4() {
28336
28336
  function de(Z, me) {
28337
28337
  if (ee ? ee.indexOf(Z) > -1 : Z == ",") {
28338
28338
  var et = V.state.lexical;
28339
- return et.info == "call" && (et.pos = (et.pos || 0) + 1), B(function(zt, xn) {
28340
- return zt == G || xn == G ? $() : $(N);
28339
+ return et.info == "call" && (et.pos = (et.pos || 0) + 1), B(function($t, xn) {
28340
+ return $t == G || xn == G ? $() : $(N);
28341
28341
  }, de);
28342
28342
  }
28343
28343
  return Z == G || me == G ? B() : ee && ee.indexOf(";") > -1 ? $(N) : B(Pe(G));
@@ -28346,7 +28346,7 @@ function n4() {
28346
28346
  return Z == G || me == G ? B() : $(N, de);
28347
28347
  };
28348
28348
  }
28349
- function $r(N, G, ee) {
28349
+ function Gr(N, G, ee) {
28350
28350
  for (var de = 3; de < arguments.length; de++)
28351
28351
  V.cc.push(arguments[de]);
28352
28352
  return B(Ie(G, ee), Rt(N, G), ke);
@@ -28354,16 +28354,16 @@ function n4() {
28354
28354
  function Ni(N) {
28355
28355
  return N == "}" ? B() : $(Ue, Ni);
28356
28356
  }
28357
- function Gr(N, G) {
28357
+ function Wr(N, G) {
28358
28358
  if (h) {
28359
28359
  if (N == ":") return B(je);
28360
- if (G == "?") return B(Gr);
28360
+ if (G == "?") return B(Wr);
28361
28361
  }
28362
28362
  }
28363
28363
  function Rs(N, G) {
28364
28364
  if (h && (N == ":" || G == "in")) return B(je);
28365
28365
  }
28366
- function Wr(N) {
28366
+ function Hr(N) {
28367
28367
  if (h && N == ":")
28368
28368
  return V.stream.match(/^\s*\w+\s+is\b/, !1) ? B(Ce, Bh, je) : B(je);
28369
28369
  }
@@ -28401,7 +28401,7 @@ function n4() {
28401
28401
  if (N == "[")
28402
28402
  return B(Pe("variable"), Rs, Pe("]"), or);
28403
28403
  if (N == "(")
28404
- return $(jr, or);
28404
+ return $(Jr, or);
28405
28405
  if (!N.match(/[;\}\)\],]/))
28406
28406
  return B();
28407
28407
  }
@@ -28433,7 +28433,7 @@ function n4() {
28433
28433
  if (G == "=") return B(je);
28434
28434
  }
28435
28435
  function pa(N, G) {
28436
- return G == "enum" ? (V.marked = "keyword", B(Re)) : $(Cn, Gr, mi, Fh);
28436
+ return G == "enum" ? (V.marked = "keyword", B(Re)) : $(Cn, Wr, mi, Fh);
28437
28437
  }
28438
28438
  function Cn(N, G) {
28439
28439
  if (h && se(G))
@@ -28441,11 +28441,11 @@ function n4() {
28441
28441
  if (N == "variable")
28442
28442
  return ne(G), B();
28443
28443
  if (N == "spread") return B(Cn);
28444
- if (N == "[") return $r(Yo, "]");
28445
- if (N == "{") return $r(Hr, "}");
28444
+ if (N == "[") return Gr(Yo, "]");
28445
+ if (N == "{") return Gr(qr, "}");
28446
28446
  }
28447
- function Hr(N, G) {
28448
- return N == "variable" && !V.stream.match(/^\s*:/, !1) ? (ne(G), B(mi)) : (N == "variable" && (V.marked = "property"), N == "spread" ? B(Cn) : N == "}" ? $() : N == "[" ? B(Ce, Pe("]"), Pe(":"), Hr) : B(Pe(":"), Cn, mi));
28447
+ function qr(N, G) {
28448
+ return N == "variable" && !V.stream.match(/^\s*:/, !1) ? (ne(G), B(mi)) : (N == "variable" && (V.marked = "property"), N == "spread" ? B(Cn) : N == "}" ? $() : N == "[" ? B(Ce, Pe("]"), Pe(":"), qr) : B(Pe(":"), Cn, mi));
28449
28449
  }
28450
28450
  function Yo() {
28451
28451
  return $(Cn, mi);
@@ -28464,26 +28464,26 @@ function n4() {
28464
28464
  if (N == "(") return B(Ie(")"), Xo, ke);
28465
28465
  }
28466
28466
  function Xo(N) {
28467
- return N == "var" ? B(pa, qr) : N == "variable" ? B(qr) : $(qr);
28467
+ return N == "var" ? B(pa, jr) : N == "variable" ? B(jr) : $(jr);
28468
28468
  }
28469
- function qr(N, G) {
28470
- return N == ")" ? B() : N == ";" ? B(qr) : G == "in" || G == "of" ? (V.marked = "keyword", B(Ce, qr)) : $(Ce, qr);
28469
+ function jr(N, G) {
28470
+ return N == ")" ? B() : N == ";" ? B(jr) : G == "in" || G == "of" ? (V.marked = "keyword", B(Ce, jr)) : $(Ce, jr);
28471
28471
  }
28472
28472
  function Zn(N, G) {
28473
28473
  if (G == "*")
28474
28474
  return V.marked = "keyword", B(Zn);
28475
28475
  if (N == "variable")
28476
28476
  return ne(G), B(Zn);
28477
- if (N == "(") return B(Ae, Ie(")"), Rt(vi, ")"), ke, Wr, Ue, ze);
28477
+ if (N == "(") return B(Ae, Ie(")"), Rt(vi, ")"), ke, Hr, Ue, ze);
28478
28478
  if (h && G == "<") return B(Ie(">"), Rt(gi, ">"), ke, Zn);
28479
28479
  }
28480
- function jr(N, G) {
28480
+ function Jr(N, G) {
28481
28481
  if (G == "*")
28482
- return V.marked = "keyword", B(jr);
28482
+ return V.marked = "keyword", B(Jr);
28483
28483
  if (N == "variable")
28484
- return ne(G), B(jr);
28485
- if (N == "(") return B(Ae, Ie(")"), Rt(vi, ")"), ke, Wr, ze);
28486
- if (h && G == "<") return B(Ie(">"), Rt(gi, ">"), ke, jr);
28484
+ return ne(G), B(Jr);
28485
+ if (N == "(") return B(Ae, Ie(")"), Rt(vi, ")"), ke, Hr, ze);
28486
+ if (h && G == "<") return B(Ie(">"), Rt(gi, ">"), ke, Jr);
28487
28487
  }
28488
28488
  function qc(N, G) {
28489
28489
  if (N == "keyword" || N == "variable")
@@ -28492,7 +28492,7 @@ function n4() {
28492
28492
  return B(Ie(">"), Rt(gi, ">"), ke);
28493
28493
  }
28494
28494
  function vi(N, G) {
28495
- return G == "@" && B(Ce, vi), N == "spread" ? B(vi) : h && se(G) ? (V.marked = "keyword", B(vi)) : h && N == "this" ? B(Gr, mi) : $(Cn, Gr, mi);
28495
+ return G == "@" && B(Ce, vi), N == "spread" ? B(vi) : h && se(G) ? (V.marked = "keyword", B(vi)) : h && N == "this" ? B(Wr, mi) : $(Cn, Wr, mi);
28496
28496
  }
28497
28497
  function Uh(N, G) {
28498
28498
  return N == "variable" ? ma(N, G) : yi(N, G);
@@ -28514,10 +28514,10 @@ function n4() {
28514
28514
  return V.marked = "property", B(As, Si);
28515
28515
  if (N == "number" || N == "string") return B(As, Si);
28516
28516
  if (N == "[")
28517
- return B(Ce, Gr, Pe("]"), As, Si);
28517
+ return B(Ce, Wr, Pe("]"), As, Si);
28518
28518
  if (G == "*")
28519
28519
  return V.marked = "keyword", B(Si);
28520
- if (h && N == "(") return $(jr, Si);
28520
+ if (h && N == "(") return $(Jr, Si);
28521
28521
  if (N == ";" || N == ",") return B(Si);
28522
28522
  if (N == "}") return B();
28523
28523
  if (G == "@") return B(Ce, Si);
@@ -28527,7 +28527,7 @@ function n4() {
28527
28527
  if (N == ":") return B(je, mi);
28528
28528
  if (G == "=") return B(Ke);
28529
28529
  var ee = V.state.lexical.prev, de = ee && ee.info == "interface";
28530
- return $(de ? jr : Zn);
28530
+ return $(de ? Jr : Zn);
28531
28531
  }
28532
28532
  function va(N, G) {
28533
28533
  return G == "*" ? (V.marked = "keyword", B(ba, Pe(";"))) : G == "default" ? (V.marked = "keyword", B(Ce, Pe(";"))) : N == "{" ? B(Rt(ya, "}"), ba, Pe(";")) : $(Ue);
@@ -28537,11 +28537,11 @@ function n4() {
28537
28537
  return V.marked = "keyword", B(Pe("variable"));
28538
28538
  if (N == "variable") return $(Ke, ya);
28539
28539
  }
28540
- function Jr(N) {
28540
+ function Kr(N) {
28541
28541
  return N == "string" ? B() : N == "(" ? $(Ce) : N == "." ? $(Yt) : $(Sa, Oi, ba);
28542
28542
  }
28543
28543
  function Sa(N, G) {
28544
- return N == "{" ? $r(Sa, "}") : (N == "variable" && ne(G), G == "*" && (V.marked = "keyword"), B(Zo));
28544
+ return N == "{" ? Gr(Sa, "}") : (N == "variable" && ne(G), G == "*" && (V.marked = "keyword"), B(Zo));
28545
28545
  }
28546
28546
  function Oi(N) {
28547
28547
  if (N == ",") return B(Sa, Oi);
@@ -28599,8 +28599,8 @@ function n4() {
28599
28599
  for (; (de.type == "stat" || de.type == "form") && (ee == "}" || (Z = N.cc[N.cc.length - 1]) && (Z == Yt || Z == cn) && !/^[,\.=+\-*:?[\(]/.test(G)); )
28600
28600
  de = de.prev;
28601
28601
  a && de.type == ")" && de.prev.type == "stat" && (de = de.prev);
28602
- var zt = de.type, xn = ee == zt;
28603
- return zt == "vardef" ? de.indented + (N.lastType == "operator" || N.lastType == "," ? de.info.length + 1 : 0) : zt == "form" && ee == "{" ? de.indented : zt == "form" ? de.indented + s : zt == "stat" ? de.indented + (Qo(N, G) ? a || s : 0) : de.info == "switch" && !xn && r.doubleIndentSwitch != !1 ? de.indented + (/^(?:case|default)\b/.test(G) ? s : 2 * s) : de.align ? de.column + (xn ? 0 : 1) : de.indented + (xn ? 0 : s);
28602
+ var $t = de.type, xn = ee == $t;
28603
+ return $t == "vardef" ? de.indented + (N.lastType == "operator" || N.lastType == "," ? de.info.length + 1 : 0) : $t == "form" && ee == "{" ? de.indented : $t == "form" ? de.indented + s : $t == "stat" ? de.indented + (Qo(N, G) ? a || s : 0) : de.info == "switch" && !xn && r.doubleIndentSwitch != !1 ? de.indented + (/^(?:case|default)\b/.test(G) ? s : 2 * s) : de.align ? de.column + (xn ? 0 : 1) : de.indented + (xn ? 0 : s);
28604
28604
  },
28605
28605
  electricInput: /^\s*(?:case .*?:|default:|\{|\})$/,
28606
28606
  blockCommentStart: d ? null : "/*",
@@ -28621,7 +28621,7 @@ function n4() {
28621
28621
  });
28622
28622
  }()), mE.exports;
28623
28623
  }
28624
- n4();
28624
+ nW();
28625
28625
  var SE = { exports: {} }, bE;
28626
28626
  function $I() {
28627
28627
  return bE || (bE = 1, function(i, e) {
@@ -28734,7 +28734,7 @@ function $I() {
28734
28734
  }
28735
28735
  $I();
28736
28736
  var wE = { exports: {} }, CE;
28737
- function i4() {
28737
+ function iW() {
28738
28738
  return CE || (CE = 1, function(i, e) {
28739
28739
  (function(t) {
28740
28740
  t(Wo(), $I());
@@ -28835,9 +28835,9 @@ function i4() {
28835
28835
  });
28836
28836
  }()), wE.exports;
28837
28837
  }
28838
- i4();
28838
+ iW();
28839
28839
  var xE = { exports: {} }, EE;
28840
- function r4() {
28840
+ function rW() {
28841
28841
  return EE || (EE = 1, function(i, e) {
28842
28842
  (function(t) {
28843
28843
  t(Wo());
@@ -28932,10 +28932,10 @@ function r4() {
28932
28932
  });
28933
28933
  }()), xE.exports;
28934
28934
  }
28935
- r4();
28936
- var s4 = Wo();
28937
- const cs = /* @__PURE__ */ Qe(s4), a4 = 100;
28938
- class o4 extends Ah {
28935
+ rW();
28936
+ var sW = Wo();
28937
+ const ds = /* @__PURE__ */ Qe(sW), aW = 100;
28938
+ class oW extends Ah {
28939
28939
  constructor(e) {
28940
28940
  super(), this.viewer = e, this.parsedValue = null, this.debouncedValueUpdater = it(() => {
28941
28941
  const s = this.textEditor.getValue();
@@ -28959,17 +28959,17 @@ class o4 extends Ah {
28959
28959
  getAnnotations: () => [{
28960
28960
  message: u,
28961
28961
  severity: "error",
28962
- from: cs.Pos(l, d)
28962
+ from: ds.Pos(l, d)
28963
28963
  }]
28964
28964
  });
28965
28965
  }
28966
- }, a4), this.content.classList.add("neuroglancer-state-editor");
28966
+ }, aW), this.content.classList.add("neuroglancer-state-editor");
28967
28967
  const t = this.applyButton = document.createElement("button");
28968
28968
  t.textContent = "Apply changes", this.content.appendChild(t), t.addEventListener("click", () => this.applyChanges()), t.disabled = !0;
28969
28969
  const n = this.closeButton = document.createElement("button");
28970
28970
  n.classList.add("close-button"), n.textContent = "Close", this.content.appendChild(n), n.addEventListener("click", () => this.dispose());
28971
28971
  const r = this.downloadButton = document.createElement("button");
28972
- r.textContent = "Download", r.title = "Download state as a JSON file", this.content.appendChild(r), r.addEventListener("click", () => this.downloadState()), this.textEditor = cs((s) => {
28972
+ r.textContent = "Download", r.title = "Download state as a JSON file", this.content.appendChild(r), r.addEventListener("click", () => this.downloadState()), this.textEditor = ds((s) => {
28973
28973
  }, {
28974
28974
  value: "",
28975
28975
  mode: { name: "javascript", json: !0 },
@@ -28994,7 +28994,7 @@ class o4 extends Ah {
28994
28994
  }
28995
28995
  }
28996
28996
  var Bd = {}, kE;
28997
- function l4() {
28997
+ function lW() {
28998
28998
  if (kE) return Bd;
28999
28999
  kE = 1, Bd.__esModule = !0;
29000
29000
  var i = eT(), e = t(i);
@@ -29005,8 +29005,8 @@ function l4() {
29005
29005
  return Array.isArray(n) ? n : (0, e.default)(n);
29006
29006
  }, Bd;
29007
29007
  }
29008
- var c4 = l4();
29009
- const d4 = /* @__PURE__ */ Qe(c4), u4 = {
29008
+ var cW = lW();
29009
+ const dW = /* @__PURE__ */ Qe(cW), uW = {
29010
29010
  side: "bottom",
29011
29011
  size: 100,
29012
29012
  minSize: 50,
@@ -29015,9 +29015,9 @@ const d4 = /* @__PURE__ */ Qe(c4), u4 = {
29015
29015
  flex: 1,
29016
29016
  visible: !1
29017
29017
  };
29018
- class h4 {
29018
+ class hW {
29019
29019
  constructor() {
29020
- this.location = new Ds(u4);
29020
+ this.location = new Ds(uW);
29021
29021
  }
29022
29022
  get changed() {
29023
29023
  return this.location.changed;
@@ -29032,7 +29032,7 @@ class h4 {
29032
29032
  return No(this.location.toJSON());
29033
29033
  }
29034
29034
  }
29035
- function f4(i) {
29035
+ function fW(i) {
29036
29036
  const e = new ce();
29037
29037
  function t(n, r) {
29038
29038
  if (typeof n != "object") {
@@ -29044,7 +29044,7 @@ function f4(i) {
29044
29044
  }
29045
29045
  return t(i, ""), e;
29046
29046
  }
29047
- function p4(i) {
29047
+ function pW(i) {
29048
29048
  const e = new Ge();
29049
29049
  e.add(".type");
29050
29050
  const t = new Ge();
@@ -29075,7 +29075,7 @@ function p4(i) {
29075
29075
  }
29076
29076
  return Te(e);
29077
29077
  }
29078
- function g4(i, e) {
29078
+ function gW(i, e) {
29079
29079
  const t = {};
29080
29080
  for (const n of e) {
29081
29081
  const r = i.get(n);
@@ -29086,48 +29086,48 @@ function g4(i, e) {
29086
29086
  }
29087
29087
  return re(t);
29088
29088
  }
29089
- function m4(i) {
29089
+ function mW(i) {
29090
29090
  return H({ type: i.RPC_TYPE_ID }, i.key || {});
29091
29091
  }
29092
- function v4(i) {
29093
- const e = i.map(f4), t = p4(e);
29094
- return e.map((n) => g4(n, t));
29092
+ function vW(i) {
29093
+ const e = i.map(fW), t = pW(e);
29094
+ return e.map((n) => gW(n, t));
29095
29095
  }
29096
- const y4 = 1e3, Wg = [{
29096
+ const yW = 1e3, Wg = [{
29097
29097
  label: "Visible chunks/T",
29098
29098
  key: "visibleChunksTotal",
29099
29099
  getter: (i) => {
29100
29100
  let e = 0;
29101
29101
  for (let t = 0; t < rL; ++t)
29102
- e += i[Gs(t, mr.VISIBLE) * os + vr.numChunks];
29102
+ e += i[Gs(t, mr.VISIBLE) * ls + vr.numChunks];
29103
29103
  return e;
29104
29104
  }
29105
29105
  }, {
29106
29106
  label: "Visible chunks/D",
29107
29107
  key: "visibleChunksDownloading",
29108
- getter: (i) => i[Gs(ft.DOWNLOADING, mr.VISIBLE) * os + vr.numChunks]
29108
+ getter: (i) => i[Gs(ft.DOWNLOADING, mr.VISIBLE) * ls + vr.numChunks]
29109
29109
  }, {
29110
29110
  label: "Visible chunks/M",
29111
29111
  key: "visibleChunksSystemMemory",
29112
- getter: (i) => i[Gs(ft.SYSTEM_MEMORY, mr.VISIBLE) * os + vr.numChunks] + i[Gs(ft.SYSTEM_MEMORY_WORKER, mr.VISIBLE) * os + vr.numChunks]
29112
+ getter: (i) => i[Gs(ft.SYSTEM_MEMORY, mr.VISIBLE) * ls + vr.numChunks] + i[Gs(ft.SYSTEM_MEMORY_WORKER, mr.VISIBLE) * ls + vr.numChunks]
29113
29113
  }, {
29114
29114
  label: "Visible chunks/G",
29115
29115
  key: "visibleChunksGpuMemory",
29116
- getter: (i) => i[Gs(ft.GPU_MEMORY, mr.VISIBLE) * os + vr.numChunks]
29116
+ getter: (i) => i[Gs(ft.GPU_MEMORY, mr.VISIBLE) * ls + vr.numChunks]
29117
29117
  }, {
29118
29118
  label: "Visible chunks/F",
29119
29119
  key: "visibleChunksFailed",
29120
- getter: (i) => i[Gs(ft.FAILED, mr.VISIBLE) * os + vr.numChunks]
29120
+ getter: (i) => i[Gs(ft.FAILED, mr.VISIBLE) * ls + vr.numChunks]
29121
29121
  }, {
29122
29122
  label: "Visible memory",
29123
29123
  key: "visibleGpuMemory",
29124
- getter: (i) => i[Gs(ft.GPU_MEMORY, mr.VISIBLE) * os + vr.gpuMemoryBytes]
29124
+ getter: (i) => i[Gs(ft.GPU_MEMORY, mr.VISIBLE) * ls + vr.gpuMemoryBytes]
29125
29125
  }, {
29126
29126
  label: "Download latency",
29127
29127
  key: "downloadLatency",
29128
29128
  getter: (i) => i[jC(fu.totalTime)] / i[jC(fu.totalChunks)]
29129
29129
  }];
29130
- class S4 extends ua {
29130
+ class SW extends ua {
29131
29131
  constructor(e, t, n) {
29132
29132
  super(e, n.location), this.chunkQueueManager = t, this.displayState = n, this.data = void 0, this.requestDataTimerId = -1, this.dataRequested = !1, this.body = document.createElement("div"), this.debouncedUpdateView = this.registerCancellable(it(() => this.updateView(), 0));
29133
29133
  const r = this.body;
@@ -29142,7 +29142,7 @@ class S4 extends ua {
29142
29142
  this.dataRequested = !0, e.getStatistics().then((t) => {
29143
29143
  this.dataRequested = !1, this.data = t, this.debouncedUpdateView(), this.requestDataTimerId = window.setTimeout(() => {
29144
29144
  this.requestDataTimerId = -1, this.requestData();
29145
- }, y4);
29145
+ }, yW);
29146
29146
  });
29147
29147
  }
29148
29148
  updateView() {
@@ -29158,7 +29158,7 @@ class S4 extends ua {
29158
29158
  }
29159
29159
  n.push(v);
29160
29160
  }
29161
- const s = v4(n.map((u) => m4(u[0]))), a = new ce();
29161
+ const s = vW(n.map((u) => mW(u[0]))), a = new ce();
29162
29162
  s.forEach((u, h) => {
29163
29163
  a.set(n[h][0], u);
29164
29164
  });
@@ -29200,7 +29200,7 @@ class S4 extends ua {
29200
29200
  }
29201
29201
  const l = document.createElement("tbody");
29202
29202
  for (const u of n) {
29203
- var d = d4(u);
29203
+ var d = dW(u);
29204
29204
  const h = d[0], g = d.slice(1), v = document.createElement("tr"), y = (C) => {
29205
29205
  const w = document.createElement("td");
29206
29206
  w.textContent = C, v.appendChild(w);
@@ -29254,7 +29254,7 @@ class gS extends X {
29254
29254
  s += r > 0 ? 1 : r < 0 ? -1 : 0, s = (s + 256) % 256, n[0] = s / 256, wu(n, n[0], n[1], n[2]), this.model.value = n;
29255
29255
  }
29256
29256
  }
29257
- class b4 extends X {
29257
+ class bW extends X {
29258
29258
  constructor(e, t = {}) {
29259
29259
  super(), this.model = e, this.element = document.createElement("label"), this.inputElement = document.createElement("input");
29260
29260
  let n = t.validator, r = t.label;
@@ -29316,10 +29316,10 @@ class GI extends X {
29316
29316
  this.updateView();
29317
29317
  }
29318
29318
  }
29319
- const w4 = H(H({}, da), { side: "left", row: 2 });
29320
- class C4 {
29319
+ const wW = H(H({}, da), { side: "left", row: 2 });
29320
+ class CW {
29321
29321
  constructor() {
29322
- this.location = new Ds(w4);
29322
+ this.location = new Ds(wW);
29323
29323
  }
29324
29324
  get changed() {
29325
29325
  return this.location.changed;
@@ -29334,7 +29334,7 @@ class C4 {
29334
29334
  this.location.restoreState(e);
29335
29335
  }
29336
29336
  }
29337
- class x4 extends ua {
29337
+ class xW extends ua {
29338
29338
  constructor(e, t, n) {
29339
29339
  super(e, t.location), this.addTitleBar({ title: "Settings" });
29340
29340
  const r = document.createElement("div");
@@ -29346,7 +29346,7 @@ class x4 extends ua {
29346
29346
  u.element.placeholder = "Title", u.element.classList.add("neuroglancer-settings-title"), s.appendChild(u.element);
29347
29347
  }
29348
29348
  const a = (u, h) => {
29349
- const g = this.registerDisposer(new b4(h, { label: u }));
29349
+ const g = this.registerDisposer(new bW(h, { label: u }));
29350
29350
  g.element.classList.add("neuroglancer-settings-limit-widget"), s.appendChild(g.element);
29351
29351
  };
29352
29352
  a("GPU memory limit", n.chunkQueueManager.capacities.gpuMemory.sizeLimit), a("System memory limit", n.chunkQueueManager.capacities.systemMemory.sizeLimit), a("Concurrent chunk requests", n.chunkQueueManager.capacities.download.itemLimit);
@@ -29366,7 +29366,7 @@ class x4 extends ua {
29366
29366
  d("Cross-section background", n.crossSectionBackgroundColor), d("Projection background", n.perspectiveViewBackgroundColor);
29367
29367
  }
29368
29368
  }
29369
- class E4 extends X {
29369
+ class EW extends X {
29370
29370
  constructor(e, t) {
29371
29371
  super(), this.selectedLayer = e, this.toolBinder = t, this.element = document.createElement("div"), this.viewContext = void 0, this.updateView = this.registerCancellable(dt(() => {
29372
29372
  let r = this.viewContext;
@@ -29423,16 +29423,22 @@ class E4 extends X {
29423
29423
  return n.appendChild(r), n.appendChild(l), n;
29424
29424
  }
29425
29425
  }
29426
- function k4(i) {
29426
+ function kW(i) {
29427
29427
  return encodeURI(i).replace(/[!'()*;,]/g, function(e) {
29428
29428
  return "%" + e.charCodeAt(0).toString(16).toUpperCase();
29429
29429
  });
29430
29430
  }
29431
- class T4 extends X {
29431
+ class TW extends X {
29432
29432
  constructor(e, t, n = "") {
29433
29433
  super(), this.gl = e, this.frameNumberCounter = t;
29434
29434
  const r = n + "chunk_worker.bundle.js";
29435
- this.worker = typeof n == "string" ? new Worker(r) : n, this.chunkQueueManager = this.registerDisposer(new Mm(new BV(this.worker), this.gl, this.frameNumberCounter, {
29435
+ this.worker = typeof n == "string" ? new Worker(r) : n, typeof n != "string" && this.worker.addEventListener("message", (s) => {
29436
+ if (s.data?.functionName === "Worker" && s.data?.path === "async_computation.bundle.js") {
29437
+ s.stopImmediatePropagation();
29438
+ const a = n.AsyncComputationWorker;
29439
+ a && new a().postMessage({ port: s.data.port }, [s.data.port]);
29440
+ }
29441
+ }, !0), this.chunkQueueManager = this.registerDisposer(new Mm(new BV(this.worker), this.gl, this.frameNumberCounter, {
29436
29442
  gpuMemory: new Ld({ defaultItemLimit: 1e6, defaultSizeLimit: 1e9 }),
29437
29443
  systemMemory: new Ld({ defaultItemLimit: 1e7, defaultSizeLimit: 2e9 }),
29438
29444
  download: new Ld({ defaultItemLimit: 100, defaultSizeLimit: Number.POSITIVE_INFINITY }),
@@ -29444,20 +29450,20 @@ class T4 extends X {
29444
29450
  }
29445
29451
  }
29446
29452
  const WI = ["showHelpButton", "showSettingsButton", "showEditStateButton", "showLayerListPanelButton", "showSelectionPanelButton", "showLayerSidePanelButton", "showLocation", "showAnnotationToolStatus"], HI = [...WI, "showLayerPanel", "showLayerHoverValues"], qI = [...HI, "showUIControls", "showPanelBorders"];
29447
- function L4() {
29453
+ function LW() {
29448
29454
  return Object.fromEntries(qI.map((i) => [i, new Ut(!0)]));
29449
29455
  }
29450
- function D4(i, e) {
29456
+ function DW(i, e) {
29451
29457
  for (const t of qI) {
29452
29458
  const n = e[t];
29453
29459
  n !== void 0 && (i[t].value = n);
29454
29460
  }
29455
29461
  }
29456
- const I4 = typeof NEUROGLANCER_OVERRIDE_DEFAULT_VIEWER_OPTIONS < "u" ? NEUROGLANCER_OVERRIDE_DEFAULT_VIEWER_OPTIONS : {
29462
+ const IW = typeof NEUROGLANCER_OVERRIDE_DEFAULT_VIEWER_OPTIONS < "u" ? NEUROGLANCER_OVERRIDE_DEFAULT_VIEWER_OPTIONS : {
29457
29463
  showLayerDialog: !0,
29458
29464
  resetStateWhenEmpty: !0
29459
29465
  };
29460
- class P4 extends mh {
29466
+ class PW extends mh {
29461
29467
  constructor(e) {
29462
29468
  super(), this.viewer = e, this.add("title", e.title), this.add("dimensions", e.coordinateSpace), this.add("relativeDisplayScales", e.relativeDisplayScales), this.add("displayDimensions", e.displayDimensions), this.add("position", e.position), this.add("crossSectionOrientation", e.crossSectionOrientation), this.add("crossSectionScale", e.crossSectionScale), this.add("crossSectionDepth", e.crossSectionDepthRange), this.add("projectionOrientation", e.projectionOrientation), this.add("projectionScale", e.projectionScale), this.add("projectionDepth", e.projectionDepthRange), this.add("layers", e.layerSpecification), this.add("showAxisLines", e.showAxisLines), this.add("wireFrame", e.wireFrame), this.add("showScaleBar", e.showScaleBar), this.add("showDefaultAnnotations", e.showDefaultAnnotations), this.add("showSlices", e.showPerspectiveSliceViews), this.add("gpuMemoryLimit", e.dataContext.chunkQueueManager.capacities.gpuMemory.sizeLimit), this.add("prefetch", e.dataContext.chunkQueueManager.enablePrefetch), this.add("systemMemoryLimit", e.dataContext.chunkQueueManager.capacities.systemMemory.sizeLimit), this.add("concurrentDownloads", e.dataContext.chunkQueueManager.capacities.download.itemLimit), this.add("selectedLayer", e.selectedLayer), this.add("crossSectionBackgroundColor", e.crossSectionBackgroundColor), this.add("projectionBackgroundColor", e.perspectiveViewBackgroundColor), this.add("layout", e.layout), this.add("statistics", e.statisticsDisplayState), this.add("helpPanel", e.helpPanelState), this.add("settingsPanel", e.settingsPanelState), this.add("selection", e.selectionDetailsState), this.add("layerListPanel", e.layerListPanelState), this.add("partialViewport", e.partialViewport), this.add("selectedStateServer", e.selectedStateServer);
29463
29469
  }
@@ -29482,16 +29488,16 @@ class P4 extends mh {
29482
29488
  }), pn(e, "perspectiveOrientation", t.projectionOrientation), pn(e, "perspectiveZoom", t.projectionScale.legacyJsonView), pn(e, "perspectiveViewBackgroundColor", t.perspectiveViewBackgroundColor);
29483
29489
  }
29484
29490
  }
29485
- const ps = {
29491
+ const gs = {
29486
29492
  expectingExternalUI: !1
29487
29493
  };
29488
- class R4 extends X {
29494
+ class RW extends X {
29489
29495
  constructor(e, t = {}) {
29490
- super(), this.display = e, this.title = new Kt(void 0, Le), this.coordinateSpace = new py(), this.position = this.registerDisposer(new Js(this.coordinateSpace)), this.relativeDisplayScales = this.registerDisposer(new xD(this.coordinateSpace)), this.displayDimensions = this.registerDisposer(new kD(this.coordinateSpace)), this.displayDimensionRenderInfo = this.registerDisposer(new ED(this.relativeDisplayScales.addRef(), this.displayDimensions.addRef())), this.crossSectionOrientation = this.registerDisposer(new wo()), this.crossSectionScale = this.registerDisposer(new D3(this.displayDimensionRenderInfo.addRef())), this.projectionOrientation = this.registerDisposer(new wo()), this.crossSectionDepthRange = this.registerDisposer(new $m(-10, this.displayDimensionRenderInfo)), this.projectionDepthRange = this.registerDisposer(new $m(-50, this.displayDimensionRenderInfo)), this.projectionScale = this.registerDisposer(new I3(this.displayDimensionRenderInfo.addRef())), this.navigationState = this.registerDisposer(new xo(new Co(this.position.addRef(), this.displayDimensionRenderInfo.addRef(), this.crossSectionOrientation.addRef()), this.crossSectionScale.addRef(), this.crossSectionDepthRange.addRef())), this.perspectiveNavigationState = this.registerDisposer(new xo(new Co(this.position.addRef(), this.displayDimensionRenderInfo.addRef(), this.projectionOrientation.addRef()), this.projectionScale.addRef(), this.projectionDepthRange.addRef())), this.mouseState = new N4(), this.layerManager = this.registerDisposer(new jI()), this.selectedLayer = this.registerDisposer(new $4(this.layerManager.addRef())), this.showAxisLines = new Ut(!0, !0), this.wireFrame = new Ut(!1, !1), this.showScaleBar = new Ut(!0, !0), this.showPerspectiveSliceViews = new Ut(!0, !0), this.visibleLayerRoles = WV(), this.showDefaultAnnotations = new Ut(!0, !0), this.crossSectionBackgroundColor = new su(lt(0.5, 0.5, 0.5)), this.perspectiveViewBackgroundColor = new su(lt(0, 0, 0)), this.scaleBarOptions = new S$(), this.partialViewport = new mV(), this.statisticsDisplayState = new h4(), this.helpPanelState = new uG(), this.settingsPanelState = new C4(), this.layerSelectedValues = this.registerDisposer(new O4(this.layerManager, this.mouseState)), this.selectionDetailsState = this.registerDisposer(new V4(this.coordinateSpace, this.layerSelectedValues)), this.selectedStateServer = new Kt("", Le), this.layerListPanelState = new KG(), this.resetInitiated = new be(), this.makeUrlFromState = (P) => ps.expectingExternalUI ? "/#!" + k4(re(P)) : window.location.toString(), this.uiControlVisibility = {}, this.visible = !0, this.toolInputEventMapBinder = (P, R) => {
29496
+ super(), this.display = e, this.title = new Kt(void 0, Le), this.coordinateSpace = new py(), this.position = this.registerDisposer(new Js(this.coordinateSpace)), this.relativeDisplayScales = this.registerDisposer(new xD(this.coordinateSpace)), this.displayDimensions = this.registerDisposer(new kD(this.coordinateSpace)), this.displayDimensionRenderInfo = this.registerDisposer(new ED(this.relativeDisplayScales.addRef(), this.displayDimensions.addRef())), this.crossSectionOrientation = this.registerDisposer(new wo()), this.crossSectionScale = this.registerDisposer(new D3(this.displayDimensionRenderInfo.addRef())), this.projectionOrientation = this.registerDisposer(new wo()), this.crossSectionDepthRange = this.registerDisposer(new $m(-10, this.displayDimensionRenderInfo)), this.projectionDepthRange = this.registerDisposer(new $m(-50, this.displayDimensionRenderInfo)), this.projectionScale = this.registerDisposer(new I3(this.displayDimensionRenderInfo.addRef())), this.navigationState = this.registerDisposer(new xo(new Co(this.position.addRef(), this.displayDimensionRenderInfo.addRef(), this.crossSectionOrientation.addRef()), this.crossSectionScale.addRef(), this.crossSectionDepthRange.addRef())), this.perspectiveNavigationState = this.registerDisposer(new xo(new Co(this.position.addRef(), this.displayDimensionRenderInfo.addRef(), this.projectionOrientation.addRef()), this.projectionScale.addRef(), this.projectionDepthRange.addRef())), this.mouseState = new NW(), this.layerManager = this.registerDisposer(new jI()), this.selectedLayer = this.registerDisposer(new $W(this.layerManager.addRef())), this.showAxisLines = new Ut(!0, !0), this.wireFrame = new Ut(!1, !1), this.showScaleBar = new Ut(!0, !0), this.showPerspectiveSliceViews = new Ut(!0, !0), this.visibleLayerRoles = WV(), this.showDefaultAnnotations = new Ut(!0, !0), this.crossSectionBackgroundColor = new su(lt(0.5, 0.5, 0.5)), this.perspectiveViewBackgroundColor = new su(lt(0, 0, 0)), this.scaleBarOptions = new S$(), this.partialViewport = new mV(), this.statisticsDisplayState = new hW(), this.helpPanelState = new uG(), this.settingsPanelState = new CW(), this.layerSelectedValues = this.registerDisposer(new OW(this.layerManager, this.mouseState)), this.selectionDetailsState = this.registerDisposer(new VW(this.coordinateSpace, this.layerSelectedValues)), this.selectedStateServer = new Kt("", Le), this.layerListPanelState = new KG(), this.resetInitiated = new be(), this.makeUrlFromState = (P) => gs.expectingExternalUI ? "/#!" + kW(re(P)) : window.location.toString(), this.uiControlVisibility = {}, this.visible = !0, this.toolInputEventMapBinder = (P, R) => {
29491
29497
  R.registerDisposer(this.inputEventBindings.sliceView.addParent(P, Number.POSITIVE_INFINITY)), R.registerDisposer(this.inputEventBindings.perspectiveView.addParent(P, Number.POSITIVE_INFINITY));
29492
29498
  }, this.toolBinder = this.registerDisposer(new Uz(this.toolInputEventMapBinder));
29493
29499
  var n = t.dataContext;
29494
- const r = n === void 0 ? new T4(e.gl, e, t.bundleRoot) : n;
29500
+ const r = n === void 0 ? new TW(e.gl, e, t.bundleRoot) : n;
29495
29501
  var s = t.visibility;
29496
29502
  const a = s === void 0 ? new Mt(Mt.VISIBLE) : s;
29497
29503
  var l = t.inputEventBindings;
@@ -29505,16 +29511,16 @@ class R4 extends X {
29505
29511
  var g = t.dataSourceProvider;
29506
29512
  const v = g === void 0 ? K$({ credentialsManager: $o }) : g;
29507
29513
  var y = t.uiConfiguration;
29508
- const C = y === void 0 ? L4() : y;
29514
+ const C = y === void 0 ? LW() : y;
29509
29515
  this.visibility = a, this.inputEventBindings = d, this.element = h, this.dataSourceProvider = v, this.uiConfiguration = C, this.registerDisposer(Tr((P) => {
29510
29516
  this.display.applyWindowedViewportToElement(h, P);
29511
- }, this.partialViewport)), this.registerDisposer(() => Et(this.element)), this.dataContext = this.registerDisposer(r), D4(C, t);
29512
- const w = H(H({}, I4), t), b = w.resetStateWhenEmpty, E = w.showLayerDialog;
29517
+ }, this.partialViewport)), this.registerDisposer(() => Et(this.element)), this.dataContext = this.registerDisposer(r), DW(C, t);
29518
+ const w = H(H({}, IW), t), b = w.resetStateWhenEmpty, E = w.showLayerDialog;
29513
29519
  for (const P of HI)
29514
29520
  this.uiControlVisibility[P] = this.makeUiControlVisibilityState(P);
29515
29521
  this.registerDisposer(this.uiConfiguration.showPanelBorders.changed.add(() => {
29516
29522
  this.updateShowBorders();
29517
- })), this.showLayerDialog = E, this.resetStateWhenEmpty = b, this.layerSpecification = new H4(this.display, this.dataSourceProvider, this.layerManager, this.chunkManager, this.selectionDetailsState, this.selectedLayer, this.navigationState.coordinateSpace, this.navigationState.pose.position, this.toolBinder), this.registerDisposer(e.updateStarted.add(() => {
29523
+ })), this.showLayerDialog = E, this.resetStateWhenEmpty = b, this.layerSpecification = new HW(this.display, this.dataSourceProvider, this.layerManager, this.chunkManager, this.selectionDetailsState, this.selectedLayer, this.navigationState.coordinateSpace, this.navigationState.pose.position, this.toolBinder), this.registerDisposer(e.updateStarted.add(() => {
29518
29524
  this.onUpdateDisplay();
29519
29525
  })), this.showDefaultAnnotations.changed.add(() => {
29520
29526
  this.showDefaultAnnotations.value ? this.visibleLayerRoles.add(ui.DEFAULT_ANNOTATION) : this.visibleLayerRoles.delete(ui.DEFAULT_ANNOTATION);
@@ -29528,7 +29534,7 @@ class R4 extends X {
29528
29534
  this.layerSelectedValues.handleLayerChange();
29529
29535
  })), this.registerDisposer(this.dataContext.chunkQueueManager.visibleChunksChanged.add(() => {
29530
29536
  this.visible && e.scheduleRedraw();
29531
- })), this.makeUI(), this.updateShowBorders(), this.registerActionListeners(), this.registerEventActionBindings(), this.registerDisposer(VI(h, this.navigationState.position)), this.state = new P4(this);
29537
+ })), this.makeUI(), this.updateShowBorders(), this.registerActionListeners(), this.registerEventActionBindings(), this.registerDisposer(VI(h, this.navigationState.position)), this.state = new PW(this);
29532
29538
  }
29533
29539
  get chunkManager() {
29534
29540
  return this.dataContext.chunkManager;
@@ -29537,10 +29543,10 @@ class R4 extends X {
29537
29543
  return this.dataContext.chunkQueueManager;
29538
29544
  }
29539
29545
  get expectingExternalUI() {
29540
- return ps.expectingExternalUI;
29546
+ return gs.expectingExternalUI;
29541
29547
  }
29542
29548
  set expectingExternalUI(e) {
29543
- ps.expectingExternalUI = e;
29549
+ gs.expectingExternalUI = e;
29544
29550
  }
29545
29551
  makeUiControlVisibilityState(e) {
29546
29552
  const t = this.uiConfiguration.showUIControls, n = this.uiConfiguration[e];
@@ -29569,7 +29575,7 @@ class R4 extends X {
29569
29575
  g.style.marginRight = "5px", g.href = u, g.textContent = h, g.style.fontFamily = "sans-serif", g.style.color = "yellow", g.target = "_blank", t.appendChild(g);
29570
29576
  }
29571
29577
  }
29572
- const s = this.registerDisposer(new E4(this.selectedLayer, this.toolBinder));
29578
+ const s = this.registerDisposer(new EW(this.selectedLayer, this.toolBinder));
29573
29579
  if (t.appendChild(s.element), this.registerDisposer(new ti(this.uiControlVisibility.showAnnotationToolStatus, s.element)), aG) {
29574
29580
  const l = this.registerDisposer(new oG(this));
29575
29581
  t.appendChild(l.element);
@@ -29581,7 +29587,7 @@ class R4 extends X {
29581
29587
  enableTitle: "Show layer list panel",
29582
29588
  disableTitle: "Hide layer list panel"
29583
29589
  }));
29584
- d.element.insertAdjacentElement("afterbegin", this.registerDisposer(new e4(this.layerManager)).element), this.registerDisposer(new ti(this.uiControlVisibility.showLayerListPanelButton, d.element)), t.appendChild(d.element);
29590
+ d.element.insertAdjacentElement("afterbegin", this.registerDisposer(new eW(this.layerManager)).element), this.registerDisposer(new ti(this.uiControlVisibility.showLayerListPanelButton, d.element)), t.appendChild(d.element);
29585
29591
  }
29586
29592
  {
29587
29593
  const l = this.selectionDetailsState, d = this.registerDisposer(new Gi(l.location.watchableVisible, {
@@ -29654,7 +29660,7 @@ class R4 extends X {
29654
29660
  l.panel instanceof x1 && l.panel.close();
29655
29661
  }, this.registerDisposer(this.sidePanelManager.registerPanel({
29656
29662
  location: this.statisticsDisplayState.location,
29657
- makePanel: () => new S4(this.sidePanelManager, this.chunkQueueManager, this.statisticsDisplayState)
29663
+ makePanel: () => new SW(this.sidePanelManager, this.chunkQueueManager, this.statisticsDisplayState)
29658
29664
  })), this.registerDisposer(this.sidePanelManager.registerPanel({
29659
29665
  location: this.helpPanelState.location,
29660
29666
  makePanel: () => {
@@ -29663,7 +29669,7 @@ class R4 extends X {
29663
29669
  }
29664
29670
  })), this.registerDisposer(this.sidePanelManager.registerPanel({
29665
29671
  location: this.settingsPanelState.location,
29666
- makePanel: () => new x4(this.sidePanelManager, this.settingsPanelState, this)
29672
+ makePanel: () => new xW(this.sidePanelManager, this.settingsPanelState, this)
29667
29673
  }));
29668
29674
  const a = () => {
29669
29675
  const l = this.visibility.visible;
@@ -29742,7 +29748,7 @@ class R4 extends X {
29742
29748
  this.toolBinder.activate(e);
29743
29749
  }
29744
29750
  editJsonState() {
29745
- new o4(this);
29751
+ new oW(this);
29746
29752
  }
29747
29753
  copyJsonStateToUrl() {
29748
29754
  Jn(this.makeUrlFromState(this.state.toJSON()));
@@ -29763,8 +29769,8 @@ class R4 extends X {
29763
29769
  }
29764
29770
  }
29765
29771
  }
29766
- const TE = "tool", LE = "toolBindings", Hg = "localPosition", DE = "localDimensions", IE = "source", A4 = "transform", PE = "pick";
29767
- class _4 {
29772
+ const TE = "tool", LE = "toolBindings", Hg = "localPosition", DE = "localDimensions", IE = "source", AW = "transform", PE = "pick";
29773
+ class _W {
29768
29774
  constructor() {
29769
29775
  this.callbacks = [];
29770
29776
  }
@@ -29885,7 +29891,7 @@ class Ho extends X {
29885
29891
  }
29886
29892
  getDataSourceSpecifications(e) {
29887
29893
  let t, n = Y(e, IE, (s) => Array.isArray(s) ? s.map((a) => Gl(a)) : typeof s == "object" ? [Gl(s)] : (t = s, []));
29888
- const r = Y(e, A4, JO);
29894
+ const r = Y(e, AW, JO);
29889
29895
  return n.push(...this.getLegacyDataSourceSpecifications(t, e, r, n)), n = n.filter((s) => s.url), n.length === 0 && n.push(fD()), n;
29890
29896
  }
29891
29897
  restoreState(e) {
@@ -29924,7 +29930,7 @@ class Ho extends X {
29924
29930
  return e;
29925
29931
  }
29926
29932
  toJSON() {
29927
- return H({ type: this.type, [IE]: M4(this.dataSources), [TE]: this.tool.toJSON(), [LE]: this.toolBinder.toJSON(), [DE]: this.localCoordinateSpace.toJSON(), [Hg]: this.localPosition.toJSON(), [PE]: this.pick.toJSON() }, this.panels.toJSON());
29933
+ return H({ type: this.type, [IE]: MW(this.dataSources), [TE]: this.tool.toJSON(), [LE]: this.toolBinder.toJSON(), [DE]: this.localCoordinateSpace.toJSON(), [Hg]: this.localPosition.toJSON(), [PE]: this.pick.toJSON() }, this.panels.toJSON());
29928
29934
  }
29929
29935
  // Derived classes should override.
29930
29936
  handleAction(e, t) {
@@ -29941,7 +29947,7 @@ class Ho extends X {
29941
29947
  }
29942
29948
  }
29943
29949
  Ho.supportsPickOption = !1;
29944
- function M4(i) {
29950
+ function MW(i) {
29945
29951
  if (i.length !== 0)
29946
29952
  return i.length === 1 ? i[0].toJSON() : i.map((e) => e.toJSON());
29947
29953
  }
@@ -30151,7 +30157,7 @@ class jI extends X {
30151
30157
  };
30152
30158
  }
30153
30159
  invokeAction(e, t) {
30154
- const n = new _4();
30160
+ const n = new _W();
30155
30161
  for (let r of this.managedLayers) {
30156
30162
  if (r.layer === null || !r.visible || t !== void 0 && r !== t)
30157
30163
  continue;
@@ -30164,7 +30170,7 @@ class jI extends X {
30164
30170
  r();
30165
30171
  }
30166
30172
  }
30167
- class N4 {
30173
+ class NW {
30168
30174
  constructor() {
30169
30175
  this.changed = new be(), this.coordinateSpace = Pr, this.position = uo, this.unsnappedPosition = uo, this.active = !1, this.displayDimensions = void 0, this.pickedRenderLayer = null, this.pickedValue = new te(0, 0), this.pickedOffset = 0, this.pickedAnnotationLayer = void 0, this.pickedAnnotationId = void 0, this.pickedAnnotationBuffer = void 0, this.pickedAnnotationBufferBaseOffset = void 0, this.pickedAnnotationIndex = void 0, this.pickedAnnotationCount = void 0, this.pickedAnnotationType = void 0, this.forcerFunction = void 0;
30170
30176
  }
@@ -30182,7 +30188,7 @@ class N4 {
30182
30188
  (this.active !== e || e === !0) && (this.active = e, this.changed.dispatch());
30183
30189
  }
30184
30190
  }
30185
- class O4 extends X {
30191
+ class OW extends X {
30186
30192
  constructor(e, t) {
30187
30193
  super(), this.layerManager = e, this.mouseState = t, this.changed = new be(), this.needsUpdate = !0, this.registerDisposer(t.changed.add(() => {
30188
30194
  this.handleChange();
@@ -30235,7 +30241,7 @@ class O4 extends X {
30235
30241
  }
30236
30242
  }
30237
30243
  const RE = 10, cv = H(H({}, da), { minSize: 150, row: 1 }), AE = H(H({}, cv), { visible: !0 });
30238
- class V4 extends X {
30244
+ class VW extends X {
30239
30245
  constructor(e, t) {
30240
30246
  super(), this.coordinateSpace = e, this.layerSelectedValues = t, this.changed = new be(), this.history = [], this.historyIndex = 0, this.location = new Ds(cv), this.pin = new ct(!0), this.registerDisposer(Ir((n, r) => {
30241
30247
  r || (this.capture(!0), n.registerDisposer(t.changed.add(n.registerCancellable(gh(() => this.capture(!0), 100, { leading: !0, trailing: !0 })))));
@@ -30284,7 +30290,7 @@ class V4 extends X {
30284
30290
  const e = this.value;
30285
30291
  let t;
30286
30292
  if (this.location.visible) {
30287
- if (t = this.location.toJSON(H(H({}, AE), { visible: !ps.expectingExternalUI })), this.pin.value && e !== void 0) {
30293
+ if (t = this.location.toJSON(H(H({}, AE), { visible: !gs.expectingExternalUI })), this.pin.value && e !== void 0) {
30288
30294
  const n = {};
30289
30295
  for (const r of e.layers) {
30290
30296
  let a = r.layer.selectionStateToJson(r.state, !1);
@@ -30301,7 +30307,7 @@ class V4 extends X {
30301
30307
  e && (this.location.visible = !0), t.value = !t.value, t.value && this.capture();
30302
30308
  }
30303
30309
  capture(e = !1) {
30304
- const t = B4(this.layerSelectedValues);
30310
+ const t = BW(this.layerSelectedValues);
30305
30311
  e && t === void 0 || (this.value = t);
30306
30312
  }
30307
30313
  restoreState(e) {
@@ -30313,7 +30319,7 @@ class V4 extends X {
30313
30319
  this.pin.value = !1, this.location.visible = !0, this.value = void 0;
30314
30320
  return;
30315
30321
  }
30316
- ge(e), this.location.restoreState(e, H(H({}, AE), { visible: !ps.expectingExternalUI }));
30322
+ ge(e), this.location.restoreState(e, H(H({}, AE), { visible: !gs.expectingExternalUI }));
30317
30323
  const t = this.coordinateSpace.value, n = t.rank > 0 ? ye(e, "position", (s) => rt(new Float32Array(t.rank), s, vt)) : void 0, r = [];
30318
30324
  ye(e, "layers", (s) => {
30319
30325
  ge(s);
@@ -30331,7 +30337,7 @@ class V4 extends X {
30331
30337
  }), this.pin.value = r.length > 0 || n !== void 0, this.value = { position: n, coordinateSpace: t, layers: r };
30332
30338
  }
30333
30339
  }
30334
- function B4(i) {
30340
+ function BW(i) {
30335
30341
  const e = i.mouseState;
30336
30342
  if (!e.active) return;
30337
30343
  const t = [];
@@ -30352,13 +30358,13 @@ function B4(i) {
30352
30358
  layers: t
30353
30359
  };
30354
30360
  }
30355
- class F4 extends X {
30361
+ class FW extends X {
30356
30362
  constructor(e) {
30357
30363
  super(), this.view = e, this.messages = new Oo(), this.seenGeneration = -1, this.state = void 0;
30358
30364
  }
30359
30365
  }
30360
- let U4 = 0;
30361
- class z4 extends X {
30366
+ let UW = 0;
30367
+ class zW extends X {
30362
30368
  constructor(e, t, n, r, s, a) {
30363
30369
  super(), this.layerManager = e, this.renderLayerType = t, this.view = n, this.roles = r, this.layerAdded = s, this.visibility = a, this.visibleLayers_ = new ce(), this.debouncedUpdateVisibleLayers = this.registerCancellable(it(() => this.updateVisibleLayers(), 0)), this.registerDisposer(e.layersChanged.add(this.debouncedUpdateVisibleLayers)), this.registerDisposer(r.changed.add(this.debouncedUpdateVisibleLayers)), this.updateVisibleLayers();
30364
30370
  }
@@ -30366,11 +30372,11 @@ class z4 extends X {
30366
30372
  this.visibleLayers.forEach((e) => e.dispose()), this.visibleLayers.clear(), super.disposed();
30367
30373
  }
30368
30374
  updateVisibleLayers() {
30369
- const e = ++U4, t = this.visibleLayers_, n = this.renderLayerType, r = this.layerAdded, s = this.roles;
30375
+ const e = ++UW, t = this.visibleLayers_, n = this.renderLayerType, r = this.layerAdded, s = this.roles;
30370
30376
  for (let l of this.layerManager.readyRenderLayers())
30371
30377
  if (l instanceof n && s.has(l.role)) {
30372
30378
  let d = l, u = t.get(d);
30373
- u === void 0 && (u = new F4(this.view), u.registerDisposer(d.messages.addChild(u.messages)), u.registerDisposer(d.addRef()), u.registerDisposer(d.visibility.add(this.visibility)), t.set(d, u), r(d, u), d.attach(u)), u.seenGeneration = e;
30379
+ u === void 0 && (u = new FW(this.view), u.registerDisposer(d.messages.addChild(u.messages)), u.registerDisposer(d.addRef()), u.registerDisposer(d.visibility.add(this.visibility)), t.set(d, u), r(d, u), d.attach(u)), u.seenGeneration = e;
30374
30380
  }
30375
30381
  for (const l of t) {
30376
30382
  var a = ae(l, 2);
@@ -30383,13 +30389,13 @@ class z4 extends X {
30383
30389
  }
30384
30390
  }
30385
30391
  function JI(i, e, t, n, r) {
30386
- return n.registerDisposer(new z4(i, e, n, t, (s, a) => {
30392
+ return n.registerDisposer(new zW(i, e, n, t, (s, a) => {
30387
30393
  a.registerDisposer(s.redrawNeeded.add(() => n.scheduleRedraw()));
30388
30394
  const l = s.backend;
30389
30395
  l && (l.rpc.invoke(SV, { layer: l.rpcId, view: n.rpcId }), a.registerDisposer(() => l.rpc.invoke(bV, { layer: l.rpcId, view: n.rpcId }))), n.scheduleRedraw(), a.registerDisposer(() => n.scheduleRedraw());
30390
30396
  }, n.visibility));
30391
30397
  }
30392
- class $4 extends X {
30398
+ class $W extends X {
30393
30399
  constructor(e) {
30394
30400
  super(), this.layerManager = e, this.changed = new be(), this.location = new Ds(Mz), this.registerDisposer(e), this.location.changed.add(() => {
30395
30401
  var t, n;
@@ -30471,7 +30477,7 @@ class $4 extends X {
30471
30477
  this.location.reset(), this.layer = void 0;
30472
30478
  }
30473
30479
  }
30474
- class G4 extends X {
30480
+ class GW extends X {
30475
30481
  constructor(e, t) {
30476
30482
  super(), this.layerManager = e, this.filter = t, this.changed = new be(), this.validate = it(() => {
30477
30483
  const n = this.layerName_;
@@ -30606,7 +30612,7 @@ function XI(i, e) {
30606
30612
  throw jo(i), t;
30607
30613
  }
30608
30614
  }
30609
- function W4(i, e) {
30615
+ function WW(i, e) {
30610
30616
  try {
30611
30617
  XI(i, e);
30612
30618
  } catch (t) {
@@ -30622,7 +30628,7 @@ class QI extends X {
30622
30628
  super(...arguments), this.changed = new be();
30623
30629
  }
30624
30630
  }
30625
- class H4 extends QI {
30631
+ class HW extends QI {
30626
30632
  constructor(e, t, n, r, s, a, l, d, u) {
30627
30633
  super(), this.display = e, this.dataSourceProviderRegistry = t, this.layerManager = n, this.chunkManager = r, this.selectionState = s, this.selectedLayer = a, this.coordinateSpace = l, this.globalPosition = d, this.toolBinder = u, this.coordinateSpaceCombiner = new yy(this.coordinateSpace, GO), this.subsets = new Ge(), this.layerSelectedValues = this.selectionState.layerSelectedValues, this.registerDisposer(n.layersChanged.add(this.changed.dispatch)), this.registerDisposer(n.specificationChanged.add(this.changed.dispatch));
30628
30634
  }
@@ -30757,7 +30763,7 @@ function jo(i) {
30757
30763
  function dv(i, e) {
30758
30764
  return i === void 0 ? e : e === void 0 ? i : i.priority < e.priority ? e : i;
30759
30765
  }
30760
- function q4(i) {
30766
+ function qW(i) {
30761
30767
  let e;
30762
30768
  for (const n of tP)
30763
30769
  e = dv(e, n(i));
@@ -30772,7 +30778,7 @@ function rP(i) {
30772
30778
  let e;
30773
30779
  for (const t of i) {
30774
30780
  const r = t.subsourceEntry.subsource;
30775
- e = dv(e, q4(r));
30781
+ e = dv(e, qW(r));
30776
30782
  }
30777
30783
  return e;
30778
30784
  }
@@ -30802,14 +30808,14 @@ qo(bS);
30802
30808
  function ME(i, e) {
30803
30809
  return e = Hi(e, 3432918353) >>> 0, e = (e << 15 | e >>> 17) >>> 0, e = Hi(e, 461845907) >>> 0, i ^= e, i = (i << 13 | i >>> 19) >>> 0, i = Hi(i, 5) + 3864292196 >>> 0, i;
30804
30810
  }
30805
- function j4(i, e) {
30811
+ function jW(i, e) {
30806
30812
  return i ^= e, i ^= i >>> 16, i = Hi(i, 2246822507) >>> 0, i ^= i >>> 13, i *= 3266489909, i ^= i >>> 16, i >>> 0;
30807
30813
  }
30808
30814
  function aP(i, e, t) {
30809
30815
  let n = i;
30810
- return n = ME(n, e), n = ME(n, t), j4(n, 8);
30816
+ return n = ME(n, e), n = ME(n, t), jW(n, 8);
30811
30817
  }
30812
- class J4 extends Or {
30818
+ class JW extends Vr {
30813
30819
  constructor(e, t) {
30814
30820
  super(e, t), this.properties = t.properties;
30815
30821
  }
@@ -30817,7 +30823,7 @@ class J4 extends Or {
30817
30823
  return { properties: e.properties };
30818
30824
  }
30819
30825
  }
30820
- function K4(i, e, t) {
30826
+ function KW(i, e, t) {
30821
30827
  const n = i.length - 1;
30822
30828
  for (; ; ) {
30823
30829
  if (e = e & n, i[e] === 0) {
@@ -30830,11 +30836,11 @@ function K4(i, e, t) {
30830
30836
  function Au(i, e) {
30831
30837
  return e <= 255 ? new Uint8Array(i) : e <= 65535 ? new Uint16Array(i) : new Uint32Array(i);
30832
30838
  }
30833
- function Y4(i) {
30839
+ function YW(i) {
30834
30840
  const e = i.length / 2, n = 2 ** (Math.ceil(Un(e)) + 1), r = Au(n, e + 1);
30835
30841
  for (let s = 0; s < e; ++s) {
30836
30842
  const a = i[2 * s], l = i[2 * s + 1];
30837
- K4(r, aP(
30843
+ KW(r, aP(
30838
30844
  /*seed=*/
30839
30845
  0,
30840
30846
  a,
@@ -30843,7 +30849,7 @@ function Y4(i) {
30843
30849
  }
30844
30850
  return r;
30845
30851
  }
30846
- function X4(i, e, t, n) {
30852
+ function XW(i, e, t, n) {
30847
30853
  let r = aP(
30848
30854
  /*seed=*/
30849
30855
  0,
@@ -30865,16 +30871,16 @@ class oP {
30865
30871
  this.inlineProperties = e.inlineProperties;
30866
30872
  }
30867
30873
  }
30868
- class Z4 {
30874
+ class ZW {
30869
30875
  constructor(e) {
30870
30876
  var t;
30871
30877
  this.segmentPropertyMap = e;
30872
30878
  const n = e.inlineProperties;
30873
- n !== void 0 && (this.inlineIdToIndex = Y4(n.ids)), this.tags = n?.properties.find((r) => r.type === "tags"), this.labels = n?.properties.find((r) => r.type === "label"), this.numericalProperties = (t = n?.properties.filter((r) => r.type === "number")) !== null && t !== void 0 ? t : [];
30879
+ n !== void 0 && (this.inlineIdToIndex = YW(n.ids)), this.tags = n?.properties.find((r) => r.type === "tags"), this.labels = n?.properties.find((r) => r.type === "label"), this.numericalProperties = (t = n?.properties.filter((r) => r.type === "number")) !== null && t !== void 0 ? t : [];
30874
30880
  }
30875
30881
  getSegmentInlineIndex(e) {
30876
30882
  const t = this.inlineIdToIndex;
30877
- return t === void 0 ? -1 : X4(t, this.segmentPropertyMap.inlineProperties.ids, e.low, e.high);
30883
+ return t === void 0 ? -1 : XW(t, this.segmentPropertyMap.inlineProperties.ids, e.low, e.high);
30878
30884
  }
30879
30885
  getSegmentLabel(e) {
30880
30886
  const t = this.getSegmentInlineIndex(e);
@@ -30897,7 +30903,7 @@ function lP(i, e, t) {
30897
30903
  for (let n = 0, r = t.length; n < r; ++n)
30898
30904
  e[t[n]] = i[n];
30899
30905
  }
30900
- function Q4(i) {
30906
+ function QW(i) {
30901
30907
  const e = i.length;
30902
30908
  if (e === 0) return !0;
30903
30909
  let t = i[0], n = i[1];
@@ -30908,9 +30914,9 @@ function Q4(i) {
30908
30914
  }
30909
30915
  return !0;
30910
30916
  }
30911
- function eW(i) {
30917
+ function e4(i) {
30912
30918
  const e = i.ids;
30913
- if (Q4(e))
30919
+ if (QW(e))
30914
30920
  return i;
30915
30921
  const t = e.length / 2, n = Au(t, t - 1);
30916
30922
  for (let a = 0; a < t; ++a)
@@ -30932,19 +30938,19 @@ function eW(i) {
30932
30938
  });
30933
30939
  return { ids: r, properties: s };
30934
30940
  }
30935
- function tW(i, e, t) {
30941
+ function t4(i, e, t) {
30936
30942
  const n = new Array(e);
30937
30943
  return n.fill(""), lP(i.values, n, t), H(H({}, i), { values: n });
30938
30944
  }
30939
- function nW(i, e, t) {
30945
+ function n4(i, e, t) {
30940
30946
  const n = new Float32Array(e);
30941
30947
  return n.fill(Number.NaN), lP(i.values, n, t), H(H({}, i), { values: n });
30942
30948
  }
30943
30949
  function NE(i, e, t) {
30944
30950
  const n = i.type;
30945
- return n === "label" || n === "description" || n === "string" || n === "tags" ? tW(i, e, t) : nW(i, e, t);
30951
+ return n === "label" || n === "description" || n === "string" || n === "tags" ? t4(i, e, t) : n4(i, e, t);
30946
30952
  }
30947
- function iW(i, e) {
30953
+ function i4(i, e) {
30948
30954
  if (i === void 0) return e;
30949
30955
  if (e === void 0) return i;
30950
30956
  let t = 0;
@@ -30988,32 +30994,32 @@ function iW(i, e) {
30988
30994
  h.push(NE(g, t, a));
30989
30995
  return { ids: u, properties: h };
30990
30996
  }
30991
- function rW(i, e) {
30997
+ function r4(i, e) {
30992
30998
  return new oP({
30993
- inlineProperties: iW(i.inlineProperties, e.inlineProperties)
30999
+ inlineProperties: i4(i.inlineProperties, e.inlineProperties)
30994
31000
  });
30995
31001
  }
30996
- function sW(i) {
31002
+ function s4(i) {
30997
31003
  for (; ; ) {
30998
31004
  if (i.length === 0) return;
30999
31005
  if (i.length === 1) return i[0];
31000
31006
  const e = [];
31001
31007
  for (let t = 0, n = i.length; t < n; t += 2)
31002
- t + 1 === n ? e.push(i[t]) : e.push(rW(i[t], i[t + 1]));
31008
+ t + 1 === n ? e.push(i[t]) : e.push(r4(i[t], i[t + 1]));
31003
31009
  i = e;
31004
31010
  }
31005
31011
  }
31006
- function aW(i, e) {
31012
+ function a4(i, e) {
31007
31013
  return i.memoize.getUncounted({ id: "getPreprocessedSegmentPropertyMap", maps: e.map((t) => ln(t)) }, () => {
31008
- const t = sW(e);
31014
+ const t = s4(e);
31009
31015
  if (t !== void 0)
31010
- return new Z4(t);
31016
+ return new ZW(t);
31011
31017
  });
31012
31018
  }
31013
- const oW = /^[,\s]*[0-9]+(?:[,\s]+[0-9]+)*[,\s]*$/;
31014
- function lW(i, e) {
31019
+ const o4 = /^[,\s]*[0-9]+(?:[,\s]+[0-9]+)*[,\s]*$/;
31020
+ function l4(i, e) {
31015
31021
  var t;
31016
- if (e.match(oW) !== null) {
31022
+ if (e.match(o4) !== null) {
31017
31023
  const g = e.split(/[\s,]+/), v = [], y = new Ge();
31018
31024
  for (let C = 0, w = g.length; C < w; ++C) {
31019
31025
  const b = g[C];
@@ -31186,7 +31192,7 @@ function lW(i, e) {
31186
31192
  function qg(i) {
31187
31193
  return "\\u" + i.toString(16).padStart(4, "0");
31188
31194
  }
31189
- function cW(i, e) {
31195
+ function c4(i, e) {
31190
31196
  var t;
31191
31197
  if (e.errors !== void 0)
31192
31198
  return { query: e, total: -1, count: 0, errors: e.errors };
@@ -31309,7 +31315,7 @@ function cW(i, e) {
31309
31315
  total: s
31310
31316
  };
31311
31317
  }
31312
- function dW(i, e, t) {
31318
+ function d4(i, e, t) {
31313
31319
  const r = e.values;
31314
31320
  var s = ae(t, 2);
31315
31321
  const a = s[0], l = s[1], d = l <= a ? 0 : 256 / (l - a), u = new Uint32Array(258), h = i.query.numericalConstraints, g = h.findIndex((v) => v.fieldId === e.id);
@@ -31329,7 +31335,7 @@ function dW(i, e, t) {
31329
31335
  }
31330
31336
  return { queryResult: i, histogram: u, window: t };
31331
31337
  }
31332
- function uW(i, e, t, n) {
31338
+ function u4(i, e, t, n) {
31333
31339
  if (i === void 0) {
31334
31340
  t.length = 0, n.length = 0;
31335
31341
  return;
@@ -31341,13 +31347,13 @@ function uW(i, e, t, n) {
31341
31347
  }
31342
31348
  for (let l = 0; l < s; ++l) {
31343
31349
  const d = t[l], u = n[l], h = r[l];
31344
- d !== void 0 && d.queryResult === e && xr(h.dataType, d.window, u) || (t[l] = dW(e, h, u));
31350
+ d !== void 0 && d.queryResult === e && xr(h.dataType, d.window, u) || (t[l] = d4(e, h, u));
31345
31351
  }
31346
31352
  }
31347
31353
  function cP(i) {
31348
31354
  return i?.tags || i?.labels ? "label" : "id";
31349
31355
  }
31350
- function hW(i, e) {
31356
+ function h4(i, e) {
31351
31357
  var t = e;
31352
31358
  const n = t.ids;
31353
31359
  if (n !== void 0)
@@ -31412,7 +31418,7 @@ function Zd(i, e, t) {
31412
31418
  }
31413
31419
  }
31414
31420
  }
31415
- function fW(i, e, t) {
31421
+ function f4(i, e, t) {
31416
31422
  if (t.size === 0) return 0;
31417
31423
  let n = 0;
31418
31424
  return Zd(i, e, (r) => {
@@ -31423,7 +31429,7 @@ function OE(i, e, t, n) {
31423
31429
  const r = i.includeTags.filter((a) => a !== e), s = i.excludeTags.filter((a) => a !== e);
31424
31430
  return n === !0 && (t ? r : s).push(e), H(H({}, i), { includeTags: r, excludeTags: s });
31425
31431
  }
31426
- function pW(i) {
31432
+ function p4(i) {
31427
31433
  return i.ids !== void 0 ? !1 : i.errors !== void 0 ? !0 : !(i.numericalConstraints.length > 0 || i.includeTags.length > 0 || i.excludeTags.length > 0 || i.prefix || i.regexp);
31428
31434
  }
31429
31435
  function wS(i, e) {
@@ -31440,11 +31446,11 @@ function Jg(i) {
31440
31446
  e[Er] = t, e = i, i = e[Er];
31441
31447
  return t;
31442
31448
  }
31443
- function gW(i, e) {
31449
+ function g4(i, e) {
31444
31450
  let t = i[Qd], n = e[Qd];
31445
31451
  return t > n ? (e[Er] = i, i) : (i[Er] = e, t === n && (e[Qd] = n + 1), e);
31446
31452
  }
31447
- function mW(i, e) {
31453
+ function m4(i, e) {
31448
31454
  let t = i[Vl], n = e[Vl];
31449
31455
  e[Vl] = t, t[_u] = e, i[Vl] = n, n[_u] = i;
31450
31456
  }
@@ -31454,7 +31460,7 @@ function* VE(i) {
31454
31460
  yield e, e = e[_u];
31455
31461
  while (e !== i);
31456
31462
  }
31457
- function vW(i) {
31463
+ function v4(i) {
31458
31464
  i[Er] = i, i[Qd] = 0, i[_u] = i[Vl] = i;
31459
31465
  }
31460
31466
  const qa = Kn("disjoint_sets:min");
@@ -31479,7 +31485,7 @@ class dP {
31479
31485
  }
31480
31486
  makeSet(e) {
31481
31487
  let t = e.toString(), n = this.map, r = n.get(t);
31482
- return r === void 0 ? (r = e.clone(), vW(r), r[qa] = r, n.set(t, r), r) : Jg(r);
31488
+ return r === void 0 ? (r = e.clone(), v4(r), r[qa] = r, n.set(t, r), r) : Jg(r);
31483
31489
  }
31484
31490
  /**
31485
31491
  * Union the sets containing `a` and `b`.
@@ -31489,8 +31495,8 @@ class dP {
31489
31495
  if (e = this.makeSet(e), t = this.makeSet(t), e === t)
31490
31496
  return !1;
31491
31497
  this.generation++;
31492
- let n = gW(e, t);
31493
- mW(e, t);
31498
+ let n = g4(e, t);
31499
+ m4(e, t);
31494
31500
  let r = e[qa], s = t[qa];
31495
31501
  const a = (this.visibleSegmentEquivalencePolicy.value & Di.MAX_REPRESENTATIVE) !== 0;
31496
31502
  return n[qa] = te.less(r, s) === a ? s : r, !0;
@@ -31564,13 +31570,13 @@ class dP {
31564
31570
  * See the License for the specific language governing permissions and
31565
31571
  * limitations under the License.
31566
31572
  */
31567
- var yW = function(i, e, t, n) {
31573
+ var y4 = function(i, e, t, n) {
31568
31574
  var r = arguments.length, s = r < 3 ? e : n === null ? n = Ai(e, t) : n, a;
31569
31575
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function") s = Reflect.decorate(i, e, t, n);
31570
31576
  else for (var l = i.length - 1; l >= 0; l--) (a = i[l]) && (s = (r < 3 ? a(s) : r > 3 ? a(e, t, s) : a(e, t)) || s);
31571
31577
  return r > 3 && s && Ri(e, t, s), s;
31572
31578
  }, uv;
31573
- const SW = "DisjointUint64Sets", uP = "DisjointUint64Sets.add", hP = "DisjointUint64Sets.clear", fP = "DisjointUint64Sets.highBitRepresentativeChanged", pP = "DisjointUint64Sets.deleteSet";
31579
+ const S4 = "DisjointUint64Sets", uP = "DisjointUint64Sets.add", hP = "DisjointUint64Sets.clear", fP = "DisjointUint64Sets.highBitRepresentativeChanged", pP = "DisjointUint64Sets.deleteSet";
31574
31580
  let cc = uv = class extends lh {
31575
31581
  constructor() {
31576
31582
  super(...arguments), this.disjointSets = new dP(), this.changed = new be();
@@ -31650,7 +31656,7 @@ let cc = uv = class extends lh {
31650
31656
  }
31651
31657
  }
31652
31658
  };
31653
- cc = uv = yW([ch(SW)], cc);
31659
+ cc = uv = y4([ch(S4)], cc);
31654
31660
  const so = new te(), Kg = new te();
31655
31661
  kt(uP, function(i) {
31656
31662
  let e = this.get(i.id);
@@ -31671,7 +31677,7 @@ kt(pP, function(i) {
31671
31677
  let e = this.get(i.id);
31672
31678
  so.low = i.l, so.high = i.h, e.disjointSets.deleteSet(so) && e.changed.dispatch();
31673
31679
  });
31674
- class bW extends wF {
31680
+ class b4 extends wF {
31675
31681
  constructor() {
31676
31682
  super(...arguments), this.spanningTreeEdges = new ce(), this.equivalences = new cc(), this.connections = new Ge(), this.changed = new Ze();
31677
31683
  }
@@ -31787,7 +31793,7 @@ class bW extends wF {
31787
31793
  };
31788
31794
  }
31789
31795
  connect(e) {
31790
- const t = new wW(this, e);
31796
+ const t = new w4(this, e);
31791
31797
  return e.segmentEquivalences.assignFrom(this.equivalences), Yg(e.visibleSegments, e.segmentEquivalences.disjointSets), t.registerDisposer(e.visibleSegments.changed.add(t.registerCancellable(it(() => Yg(e.visibleSegments, e.segmentEquivalences.disjointSets), 0)))), this.connections.add(t), t.registerDisposer(() => {
31792
31798
  this.connections.delete(t);
31793
31799
  }), t;
@@ -31802,7 +31808,7 @@ function Yg(i, e) {
31802
31808
  for (const n of t)
31803
31809
  i.add(n);
31804
31810
  }
31805
- class wW extends CF {
31811
+ class w4 extends CF {
31806
31812
  computeSplit(e, t) {
31807
31813
  return this.graph.computeSplit(e, t);
31808
31814
  }
@@ -31821,7 +31827,7 @@ function UE(i) {
31821
31827
  dataType: t
31822
31828
  });
31823
31829
  }
31824
- function CW(i) {
31830
+ function C4(i) {
31825
31831
  if (i.compressedSegmentationBlockSize !== void 0 || i.volumeType !== mn.SEGMENTATION && !i.volumeSourceOptions.discreteValues)
31826
31832
  return !1;
31827
31833
  switch (i.dataType) {
@@ -31840,9 +31846,9 @@ function CW(i) {
31840
31846
  return !1;
31841
31847
  }
31842
31848
  }
31843
- function xW(i) {
31849
+ function x4(i) {
31844
31850
  let e = i.rank, t = i.lowerVoxelBound, n = i.upperVoxelBound;
31845
- if (!CW(i))
31851
+ if (!C4(i))
31846
31852
  return UE(i);
31847
31853
  var r = i.volumeSourceOptions;
31848
31854
  let s = r.displayRank, a = r.multiscaleToViewTransform, l = i.chunkToMultiscaleTransform, d = i.chunkToViewTransform;
@@ -31901,7 +31907,7 @@ function $c(i) {
31901
31907
  minBlockSize: d,
31902
31908
  chunkToViewTransform: l,
31903
31909
  displayRank: n
31904
- })) : g).map((y) => xW(H(H({}, i), { chunkDataSize: y, chunkToViewTransform: l })));
31910
+ })) : g).map((y) => x4(H(H({}, i), { chunkDataSize: y, chunkToViewTransform: l })));
31905
31911
  }
31906
31912
  /**
31907
31913
  * @license
@@ -31918,14 +31924,14 @@ function $c(i) {
31918
31924
  * See the License for the specific language governing permissions and
31919
31925
  * limitations under the License.
31920
31926
  */
31921
- const EW = Ne(), kW = Ne(), zE = 1e-3, TW = 1e-3;
31922
- function LW(i) {
31927
+ const E4 = Ne(), k4 = Ne(), zE = 1e-3, T4 = 1e-3;
31928
+ function L4(i) {
31923
31929
  let e = 0;
31924
31930
  for (var t = 0; t < 3; ++t)
31925
31931
  i[t] < 0 && (e += 1 << t);
31926
31932
  return e;
31927
31933
  }
31928
- const gP = new Float32Array([0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1]), DW = (() => {
31934
+ const gP = new Float32Array([0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1]), D4 = (() => {
31929
31935
  const i = [0, 1, 2, 4, 5, 3, 6, 7], e = [0, 1, 2, 5, 3, 4, 6, 7], t = [0, 1, 1, 4, 4, 7, 4, 7, 1, 5, 0, 1, 1, 4, 4, 7, 0, 2, 2, 5, 5, 7, 5, 7, 2, 6, 0, 2, 2, 5, 5, 7, 0, 3, 3, 6, 6, 7, 6, 7, 3, 4, 0, 3, 3, 6, 6, 7], n = [0, 1, 2, 3, 4, 5, 6, 7, 1, 4, 5, 0, 3, 7, 2, 6, 2, 6, 0, 5, 7, 3, 1, 4, 3, 0, 6, 4, 1, 2, 7, 5, 4, 3, 7, 1, 0, 6, 5, 2, 5, 2, 1, 7, 6, 0, 4, 3, 6, 7, 3, 2, 5, 4, 0, 1, 7, 5, 4, 6, 2, 1, 3, 0], r = new Int32Array(8 * 8 * 6);
31930
31936
  for (let s = 0; s < 8; ++s)
31931
31937
  for (let a = 0; a < t.length; ++a) {
@@ -31945,7 +31951,7 @@ vec3 getBoundingBoxPlaneIntersectionVertexPosition(vec3 chunkSize, vec3 boxLower
31945
31951
  highp vec3 v2 = max(lowerClipBound, min(upperClipBound, chunkSize * uVertexBasePosition[vidx.y] + boxLower));
31946
31952
  highp vec3 vDir = v2 - v1;
31947
31953
  highp float denom = dot(vDir, uPlaneNormal);
31948
- if (abs(denom) > ${TW}) {
31954
+ if (abs(denom) > ${T4}) {
31949
31955
  highp float lambda = (planeDistance - dot(v1, uPlaneNormal)) / denom;
31950
31956
  if ((lambda >= -${zE}) && (lambda <= (1.0 + ${zE}))) {
31951
31957
  lambda = clamp(lambda, 0.0, 1.0);
@@ -31961,17 +31967,17 @@ vec3 getBoundingBoxPlaneIntersectionVertexPosition(vec3 chunkSize, vec3 boxLower
31961
31967
  }
31962
31968
  `);
31963
31969
  }
31964
- function IW(i, e, t) {
31970
+ function I4(i, e, t) {
31965
31971
  const n = i.gl;
31966
31972
  n.uniform3fv(i.uniform("uPlaneNormal"), e), n.uniform1f(i.uniform("uPlaneDistance"), t);
31967
- const r = LW(e);
31968
- n.uniform2iv(i.uniform("uVertexIndex"), DW.subarray(r * 48, (r + 1) * 48));
31973
+ const r = L4(e);
31974
+ n.uniform2iv(i.uniform("uVertexIndex"), D4.subarray(r * 48, (r + 1) * 48));
31969
31975
  }
31970
31976
  function CS(i, e, t, n, r) {
31971
- const s = bT(EW, e, n);
31977
+ const s = bT(E4, e, n);
31972
31978
  nu(s, s);
31973
- const a = iy(ai(kW, t, r), s);
31974
- IW(i, s, a);
31979
+ const a = iy(ai(k4, t, r), s);
31980
+ I4(i, s, a);
31975
31981
  }
31976
31982
  /**
31977
31983
  * @license
@@ -31988,11 +31994,11 @@ function CS(i, e, t, n, r) {
31988
31994
  * See the License for the specific language governing permissions and
31989
31995
  * limitations under the License.
31990
31996
  */
31991
- const PW = 1e-3, RW = Je();
31992
- function AW(i, e) {
31997
+ const P4 = 1e-3, R4 = Je();
31998
+ function A4(i, e) {
31993
31999
  if (Ar(i), Mu(i), i.addUniform("highp vec3", "uTranslation"), i.addUniform("highp mat4", "uProjectionMatrix"), i.addUniform("highp vec3", "uChunkDataSize"), i.addUniform("highp vec3", "uLowerClipBound"), i.addUniform("highp vec3", "uUpperClipBound"), e) {
31994
32000
  tr(i), i.setVertexMain(`
31995
- int vertexIndex1 = gl_VertexID / ${hs};
32001
+ int vertexIndex1 = gl_VertexID / ${fs};
31996
32002
  int vertexIndex2 = vertexIndex1 == 5 ? 0 : vertexIndex1 + 1;
31997
32003
  vec3 vertexPosition1 = getBoundingBoxPlaneIntersectionVertexPosition(uChunkDataSize, uTranslation, uLowerClipBound, uUpperClipBound, vertexIndex1);
31998
32004
  vec3 vertexPosition2 = getBoundingBoxPlaneIntersectionVertexPosition(uChunkDataSize, uTranslation, uLowerClipBound, uUpperClipBound, vertexIndex2);
@@ -32009,10 +32015,10 @@ vec3 position = getBoundingBoxPlaneIntersectionVertexPosition(uChunkDataSize, uT
32009
32015
  gl_Position = uProjectionMatrix * vec4(position, 1.0);
32010
32016
  gl_Position.z = 0.0;
32011
32017
  vChunkPosition = (position - uTranslation) +
32012
- ${PW} * abs(uPlaneNormal);
32018
+ ${P4} * abs(uPlaneNormal);
32013
32019
  `);
32014
32020
  }
32015
- function _W(i, e, t) {
32021
+ function _4(i, e, t) {
32016
32022
  t && ir(
32017
32023
  i,
32018
32024
  e,
@@ -32020,17 +32026,17 @@ function _W(i, e, t) {
32020
32026
  1
32021
32027
  );
32022
32028
  }
32023
- function MW(i, e, t, n, r, s) {
32029
+ function M4(i, e, t, n, r, s) {
32024
32030
  const a = t.projectionParameters.value, l = a.centerDataPosition;
32025
- CS(e, a.viewportNormalInGlobalCoordinates, l, s.transform, s.invTransform), i.uniformMatrix4fv(e.uniform("uProjectionMatrix"), !1, en(RW, n, s.transform)), i.uniform3fv(e.uniform("uLowerClipBound"), r.lowerClipDisplayBound), i.uniform3fv(e.uniform("uUpperClipBound"), r.upperClipDisplayBound);
32031
+ CS(e, a.viewportNormalInGlobalCoordinates, l, s.transform, s.invTransform), i.uniformMatrix4fv(e.uniform("uProjectionMatrix"), !1, en(R4, n, s.transform)), i.uniform3fv(e.uniform("uLowerClipBound"), r.lowerClipDisplayBound), i.uniform3fv(e.uniform("uUpperClipBound"), r.upperClipDisplayBound);
32026
32032
  }
32027
- function NW(i, e, t) {
32033
+ function N4(i, e, t) {
32028
32034
  i.uniform3fv(e.uniform("uChunkDataSize"), t);
32029
32035
  }
32030
- function OW(i, e, t, n) {
32036
+ function O4(i, e, t, n) {
32031
32037
  i.uniform3fv(e.uniform("uTranslation"), t), n ? nr(e.gl, 6, 1) : i.drawArrays(i.TRIANGLE_FAN, 0, 6);
32032
32038
  }
32033
- function VW(i, e, t) {
32039
+ function V4(i, e, t) {
32034
32040
  return i > e ? t > i ? i : e > t ? e : t : t > e ? e : i > t ? i : t;
32035
32041
  }
32036
32042
  class mP extends By {
@@ -32052,7 +32058,7 @@ class mP extends By {
32052
32058
  extraParameters: d,
32053
32059
  defineShader: (u, h, g, v) => {
32054
32060
  const y = h.chunkFormat, C = h.dataHistogramsEnabled, w = v.dataHistogramChannelSpecifications, b = v.numChannelDimensions;
32055
- if (AW(u, y === null), u.addOutputBuffer("vec4", "v4f_fragData0", 0), u.addFragmentCode(`
32061
+ if (A4(u, y === null), u.addOutputBuffer("vec4", "v4f_fragData0", 0), u.addFragmentCode(`
32056
32062
  void emit(vec4 color) {
32057
32063
  v4f_fragData0 = color;
32058
32064
  }
@@ -32118,7 +32124,7 @@ void main() {
32118
32124
  }
32119
32125
  beginChunkFormat(e, t, n) {
32120
32126
  const r = this.gl, s = this.dataHistogramSpecifications.visibility.visible, a = this.shaderGetter({ chunkFormat: t, dataHistogramsEnabled: s }), l = a.shader, d = a.parameters, u = a.fallback;
32121
- if (l !== null && (l.bind(), _W(l, n, t === null), t !== null)) {
32127
+ if (l !== null && (l.bind(), _4(l, n, t === null), t !== null)) {
32122
32128
  if (s) {
32123
32129
  const g = a.extraParameters.dataHistogramChannelSpecifications.length, v = this.dataHistogramSpecifications.bounds.value;
32124
32130
  for (let y = 0; y < g; ++y)
@@ -32153,7 +32159,7 @@ void main() {
32153
32159
  y.fill(1);
32154
32160
  let M = E.size, O;
32155
32161
  const F = P.spec.rank;
32156
- MW(l, g, t, s.viewProjectionMat, b, E), L !== null && L.beginSource(l, g), w = !0;
32162
+ M4(l, g, t, s.viewProjectionMat, b, E), L !== null && L.beginSource(l, g), w = !0;
32157
32163
  let q = 0, U = 0;
32158
32164
  if (t.forEachVisibleChunk(b, E, (V) => {
32159
32165
  let $ = A.get(V);
@@ -32165,18 +32171,18 @@ void main() {
32165
32171
  const Ee = I[ne];
32166
32172
  y[ne] = Ee === -1 || Ee >= F ? 1 : O[Ee];
32167
32173
  }
32168
- NW(l, g, y);
32174
+ N4(l, g, y);
32169
32175
  }
32170
32176
  const le = $.chunkGridPosition;
32171
32177
  for (let ne = 0; ne < 3; ++ne) {
32172
32178
  const Ee = I[ne];
32173
32179
  d[ne] = Ee === -1 || Ee >= F ? 0 : M[ne] * le[Ee];
32174
32180
  }
32175
- L !== null && L.bindChunk(l, g, $, R, I, T, w), w = !1, OW(l, g, d, a), ++q;
32181
+ L !== null && L.bindChunk(l, g, $, R, I, T, w), w = !1, O4(l, g, d, a), ++q;
32176
32182
  } else
32177
32183
  ++U;
32178
32184
  }), (q !== 0 || U !== 0) && u !== void 0) {
32179
- const V = b.effectiveVoxelSize, $ = VW(V[0], V[1], V[2]);
32185
+ const V = b.effectiveVoxelSize, $ = V4(V[0], V[1], V[2]);
32180
32186
  u.add($, $ / s.pixelSize, q, U);
32181
32187
  }
32182
32188
  }
@@ -32348,7 +32354,7 @@ function Bl(i = 0.5) {
32348
32354
  * See the License for the specific language governing permissions and
32349
32355
  * limitations under the License.
32350
32356
  */
32351
- const xS = 12, vP = 8, BW = 6, FW = `
32357
+ const xS = 12, vP = 8, B4 = 6, F4 = `
32352
32358
  vec3 getBoxFaceVertexPosition(int vertexIndex) {
32353
32359
  const vec3 vertexPositions[] = vec3[](
32354
32360
  // Front face
@@ -32398,10 +32404,10 @@ vec3 getBoxFaceVertexPosition(int vertexIndex) {
32398
32404
  return vertexPositions[indices[vertexIndex]];
32399
32405
  }
32400
32406
  `;
32401
- function UW(i, e, t) {
32402
- i.drawArraysInstanced(WebGL2RenderingContext.TRIANGLES, 0, 6 * BW * e, t);
32407
+ function U4(i, e, t) {
32408
+ i.drawArraysInstanced(WebGL2RenderingContext.TRIANGLES, 0, 6 * B4 * e, t);
32403
32409
  }
32404
- const yP = 0, Nu = yP + 1, hn = Nu + vP, SP = hn + xS, zW = SP + 6, $W = Float32Array.from([
32410
+ const yP = 0, Nu = yP + 1, hn = Nu + vP, SP = hn + xS, z4 = SP + 6, $4 = Float32Array.from([
32405
32411
  // a1
32406
32412
  0,
32407
32413
  0,
@@ -32522,7 +32528,7 @@ const yP = 0, Nu = yP + 1, hn = Nu + vP, SP = hn + xS, zW = SP + 6, $W = Float32
32522
32528
  1,
32523
32529
  // c12
32524
32530
  hn + 11
32525
- ]), GE = Je(), as = new Float32Array(6);
32531
+ ]), GE = Je(), os = new Float32Array(6);
32526
32532
  let bP = class extends Ec {
32527
32533
  constructor() {
32528
32534
  super(...arguments), this.vertexIdHelper = this.registerDisposer(rr.get(this.gl));
@@ -32542,19 +32548,19 @@ let bP = class extends Ec {
32542
32548
  ), e.addUniform("vec3", "uModelSpaceBoundOffsets", 2);
32543
32549
  }
32544
32550
  enable(e, t, n) {
32545
- gs(GE, t.modelViewProjectionMatrix), uN(GE, as);
32551
+ ms(GE, t.modelViewProjectionMatrix), uN(GE, os);
32546
32552
  const r = t.chunkDisplayTransform.numChunkDisplayDims;
32547
32553
  for (let s = 0; s < r; ++s)
32548
- as[s] = 0, as[s + 3] = 0;
32554
+ os[s] = 0, os[s + 3] = 0;
32549
32555
  for (let s = r; s < 3; ++s) {
32550
- const a = Math.abs(as[s + 3] - as[s]);
32551
- as[s] -= a, as[s + 3] += a;
32556
+ const a = Math.abs(os[s + 3] - os[s]);
32557
+ os[s] -= a, os[s + 3] += a;
32552
32558
  }
32553
32559
  super.enable(e, t, (s) => {
32554
32560
  const a = s.vertexShaderInputBinders.Bounds;
32555
32561
  a.enable(1);
32556
32562
  const l = this.gl;
32557
- l.uniform3fv(s.uniform("uModelSpaceBoundOffsets"), as), l.bindBuffer(WebGL2RenderingContext.ARRAY_BUFFER, t.buffer.buffer), a.bind(this.geometryDataStride, t.bufferOffset);
32563
+ l.uniform3fv(s.uniform("uModelSpaceBoundOffsets"), os), l.bindBuffer(WebGL2RenderingContext.ARRAY_BUFFER, t.buffer.buffer), a.bind(this.geometryDataStride, t.bufferOffset);
32558
32564
  const d = this.vertexIdHelper;
32559
32565
  d.enable(), n(s), d.disable(), a.disable();
32560
32566
  });
@@ -32582,23 +32588,23 @@ void setBoundingBoxBorderColor(vec4 color) {
32582
32588
  }
32583
32589
  `);
32584
32590
  }
32585
- function GW(i) {
32591
+ function G4(i) {
32586
32592
  wP(i), i.addVertexCode(`
32587
32593
  void setBoundingBoxFillColor(vec4 color) {
32588
32594
  vColor = color;
32589
32595
  }
32590
32596
  `);
32591
32597
  }
32592
- class WW extends bP {
32598
+ class W4 extends bP {
32593
32599
  constructor() {
32594
32600
  super(...arguments), this.edgeBoxCornerOffsetsBuffer = this.registerDisposer(zn.fromData(this.gl, om(
32595
- $W,
32601
+ $4,
32596
32602
  /*majorDimension=*/
32597
32603
  7,
32598
32604
  /*minorTiles=*/
32599
32605
  1,
32600
32606
  /*majorTiles=*/
32601
- hs
32607
+ fs
32602
32608
  ))), this.edgeShaderGetter = this.getDependentShader("annotation/boundingBox/projection/border", (e) => {
32603
32609
  const t = this.rank;
32604
32610
  this.defineShader(e), tr(e), e.addAttribute("highp vec3", "aBoxCornerOffset1"), e.addAttribute("highp vec4", "aBoxCornerOffset2"), e.addVarying("highp float", "vClipCoefficient"), hv(e), e.setVertexMain(`
@@ -32710,7 +32716,7 @@ emitAnnotation(color);
32710
32716
  this.drawEdges(e), this.drawCorners(e);
32711
32717
  }
32712
32718
  }
32713
- let HW = class extends bP {
32719
+ let H4 = class extends bP {
32714
32720
  constructor() {
32715
32721
  super(...arguments), this.faceShaderGetter = this.getDependentShader("annotation/boundingBox/crossSection/face", (e) => {
32716
32722
  const t = this.rank;
@@ -32730,7 +32736,7 @@ if (vClipCoefficient == 0.0) {
32730
32736
  }
32731
32737
  vec3 subspacePositionA = projectModelVectorToSubspace(modelPositionA) + uModelSpaceBoundOffsets[0];
32732
32738
  vec3 subspacePositionB = projectModelVectorToSubspace(modelPositionB) + uModelSpaceBoundOffsets[1];
32733
- int vertexIndex1 = gl_VertexID / ${hs};
32739
+ int vertexIndex1 = gl_VertexID / ${fs};
32734
32740
  int vertexIndex2 = vertexIndex1 == 5 ? 0 : vertexIndex1 + 1;
32735
32741
  vec3 vertexPosition1 = getBoundingBoxPlaneIntersectionVertexPosition(subspacePositionB - subspacePositionA, subspacePositionA, subspacePositionA, subspacePositionB, vertexIndex1);
32736
32742
  vec3 vertexPosition2 = getBoundingBoxPlaneIntersectionVertexPosition(subspacePositionB - subspacePositionA, subspacePositionA, subspacePositionA, subspacePositionB, vertexIndex2);
@@ -32745,7 +32751,7 @@ emitAnnotation(vec4(vColor.rgb, vColor.a * getLineAlpha() * vClipCoefficient));
32745
32751
  `);
32746
32752
  }), this.fillShaderGetter = this.getDependentShader("annotation/boundingBox/crossSection/fill", (e) => {
32747
32753
  const t = this.rank;
32748
- super.defineShader(e), Mu(e), e.addVarying("highp float", "vClipCoefficient"), GW(e), e.setVertexMain(`
32754
+ super.defineShader(e), Mu(e), e.addVarying("highp float", "vClipCoefficient"), G4(e), e.setVertexMain(`
32749
32755
  float modelPositionA[${t}] = getBounds0();
32750
32756
  float modelPositionB[${t}] = getBounds1();
32751
32757
  for (int i = 0; i < ${t}; ++i) {
@@ -32790,7 +32796,7 @@ emitAnnotation(vec4(vColor.rgb, vColor.a * vClipCoefficient));
32790
32796
  });
32791
32797
  }
32792
32798
  };
32793
- function qW(i, e) {
32799
+ function q4(i, e) {
32794
32800
  const t = i.length;
32795
32801
  for (let n = 0; n < t; ++n) {
32796
32802
  const r = e[n], s = e[n + t], a = i[n];
@@ -32798,15 +32804,15 @@ function qW(i, e) {
32798
32804
  }
32799
32805
  }
32800
32806
  kc(_e.AXIS_ALIGNED_BOUNDING_BOX, {
32801
- sliceViewRenderHelper: HW,
32802
- perspectiveViewRenderHelper: WW,
32807
+ sliceViewRenderHelper: H4,
32808
+ perspectiveViewRenderHelper: W4,
32803
32809
  defineShaderNoOpSetters(i) {
32804
32810
  CP(i), wP(i);
32805
32811
  },
32806
- pickIdsPerInstance: zW,
32812
+ pickIdsPerInstance: z4,
32807
32813
  snapPosition(i, e, t, n) {
32808
32814
  const r = i.length, s = new Float32Array(e, t, r * 2);
32809
- n >= Nu && n < hn && qW(i, s);
32815
+ n >= Nu && n < hn && q4(i, s);
32810
32816
  },
32811
32817
  getRepresentativePoint(i, e, t) {
32812
32818
  t === yP || t >= Nu && t < hn || t >= hn && t < SP, i.set(e.pointA);
@@ -32820,7 +32826,7 @@ kc(_e.AXIS_ALIGNED_BOUNDING_BOX, {
32820
32826
  return H(H({}, i), { pointA: a, pointB: l });
32821
32827
  }
32822
32828
  });
32823
- const Ja = 0, fv = Ja + 1, jW = fv + 2;
32829
+ const Ja = 0, fv = Ja + 1, j4 = fv + 2;
32824
32830
  function xP(i) {
32825
32831
  i.addVertexCode(`
32826
32832
  void setEndpointMarkerSize(float startSize, float endSize) {}
@@ -32949,11 +32955,11 @@ emitAnnotation(color);
32949
32955
  this.drawEdges(e), this.drawEndpoints(e);
32950
32956
  }
32951
32957
  };
32952
- function JW(i, e) {
32958
+ function J4(i, e) {
32953
32959
  const t = i.length;
32954
32960
  wT(i, e.subarray(0, t), e.subarray(t), i);
32955
32961
  }
32956
- function KW(i, e, t) {
32962
+ function K4(i, e, t) {
32957
32963
  const n = i.length, r = n * t;
32958
32964
  for (let s = 0; s < n; ++s)
32959
32965
  i[s] = e[r + s];
@@ -32964,10 +32970,10 @@ kc(_e.LINE, {
32964
32970
  defineShaderNoOpSetters(i) {
32965
32971
  xP(i), EP(i);
32966
32972
  },
32967
- pickIdsPerInstance: jW,
32973
+ pickIdsPerInstance: j4,
32968
32974
  snapPosition(i, e, t, n) {
32969
32975
  const r = i.length, s = new Float32Array(e, t, r * 2);
32970
- n === Ja ? JW(i, s) : KW(i, s, n - fv);
32976
+ n === Ja ? J4(i, s) : K4(i, s, n - fv);
32971
32977
  },
32972
32978
  getRepresentativePoint(i, e, t) {
32973
32979
  i.set(t === Ja || t === fv ? e.pointA : e.pointB);
@@ -33165,7 +33171,7 @@ struct EllipseQuadraticForm {
33165
33171
  highp float E; // y coefficient
33166
33172
  highp float F; // 1 coefficient
33167
33173
  };
33168
- `, YW = [kP, `
33174
+ `, Y4 = [kP, `
33169
33175
  EllipseQuadraticForm computeCrossSectionEllipse(mat3 A, vec3 c) {
33170
33176
  EllipseQuadraticForm p;
33171
33177
  p.A = A[0][0];
@@ -33180,7 +33186,7 @@ EllipseQuadraticForm computeCrossSectionEllipse(mat3 A, vec3 c) {
33180
33186
  c[1] * c[2] * (A[1][2] + A[2][1]) + c[2] * c[2] * A[2][2] - 1.0;
33181
33187
  return p;
33182
33188
  }
33183
- `], XW = `
33189
+ `], X4 = `
33184
33190
  struct CenterOrientEllipse {
33185
33191
  vec2 k; // center
33186
33192
  vec2 u1; // minor axis direction
@@ -33189,7 +33195,7 @@ struct CenterOrientEllipse {
33189
33195
  float b; // semiminor axis
33190
33196
  bool valid; // indicates if the ellipse is valid
33191
33197
  };
33192
- `, ZW = [kP, XW, `
33198
+ `, Z4 = [kP, X4, `
33193
33199
  CenterOrientEllipse computeCenterOrientEllipse(EllipseQuadraticForm p) {
33194
33200
  CenterOrientEllipse r;
33195
33201
  float a11 = p.A;
@@ -33280,7 +33286,7 @@ void setEllipsoidFillColor(vec4 color) {
33280
33286
  });
33281
33287
  }
33282
33288
  };
33283
- class QW extends TP {
33289
+ class Q4 extends TP {
33284
33290
  constructor() {
33285
33291
  super(...arguments), this.sphereRenderHelper = this.registerDisposer(new ZD(this.gl, 10, 10)), this.shaderGetter = this.getDependentShader("annotation/ellipsoid/projection", (e) => {
33286
33292
  this.defineShader(e), this.sphereRenderHelper.defineShader(e), e.addUniform("highp vec4", "uLightDirection"), e.addUniform("highp mat4", "uNormalTransform"), e.addVarying("highp float", "vClipCoefficient"), e.setVertexMain(`
@@ -33316,7 +33322,7 @@ emitAnnotation(vec4(vColor.rgb * vLightingFactor, vColor.a * vClipCoefficient));
33316
33322
  class eH extends TP {
33317
33323
  constructor() {
33318
33324
  super(...arguments), this.shaderGetter = this.getDependentShader("annotation/ellipsoid/crossSection", (e) => {
33319
- Ar(e), this.defineShader(e), e.addUniform("highp mat4", "uViewportToObject"), e.addUniform("highp mat4", "uObjectToViewport"), e.addUniform("highp mat4", "uViewportToDevice"), e.addAttribute("highp vec2", "aCornerOffset"), e.addVarying("highp vec2", "vCircleCoord"), e.addVarying("highp float", "vClipCoefficient"), e.addVertexCode(YW), e.addVertexCode(ZW), e.addVertexCode(rS), e.setVertexMain(`
33325
+ Ar(e), this.defineShader(e), e.addUniform("highp mat4", "uViewportToObject"), e.addUniform("highp mat4", "uObjectToViewport"), e.addUniform("highp mat4", "uViewportToDevice"), e.addAttribute("highp vec2", "aCornerOffset"), e.addVarying("highp vec2", "vCircleCoord"), e.addVarying("highp float", "vClipCoefficient"), e.addVertexCode(Y4), e.addVertexCode(Z4), e.addVertexCode(rS), e.setVertexMain(`
33320
33326
  SubspaceParams params = getSubspaceParams();
33321
33327
  if (params.cull) {
33322
33328
  gl_Position = vec4(2.0, 0.0, 0.0, 1.0);
@@ -33370,7 +33376,7 @@ emitAnnotation(vec4(vColor.rgb, vColor.a * vClipCoefficient));
33370
33376
  r.projectionMat
33371
33377
  );
33372
33378
  const a = qE;
33373
- gs(a, s), n.uniformMatrix4fv(
33379
+ ms(a, s), n.uniformMatrix4fv(
33374
33380
  t.uniform("uObjectToViewport"),
33375
33381
  /*transpose=*/
33376
33382
  !1,
@@ -33383,7 +33389,7 @@ emitAnnotation(vec4(vColor.rgb, vColor.a * vClipCoefficient));
33383
33389
  }
33384
33390
  kc(_e.ELLIPSOID, {
33385
33391
  sliceViewRenderHelper: eH,
33386
- perspectiveViewRenderHelper: QW,
33392
+ perspectiveViewRenderHelper: Q4,
33387
33393
  defineShaderNoOpSetters(i) {
33388
33394
  i.addVertexCode(`
33389
33395
  void setEllipsoidFillColor(vec4 color) {}
@@ -33654,7 +33660,7 @@ const vec3[24] boxCornerOffsets = vec3[](
33654
33660
  vec3(0, 1, 1), vec3(1, 1, 1) // e12
33655
33661
  );
33656
33662
  `), i.setVertexMain(`
33657
- int edgeIndex = gl_VertexID / ${hs};
33663
+ int edgeIndex = gl_VertexID / ${fs};
33658
33664
  vec3 cornerA = max(uLowerClipBound, min(uUpperClipBound, uTranslation));
33659
33665
  vec3 cornerB = max(uLowerClipBound, min(uUpperClipBound, uTranslation + uChunkDataSize));
33660
33666
  vec3 vertexPosition1 = mix(cornerA, cornerB, boxCornerOffsets[edgeIndex * 2]);
@@ -33690,7 +33696,7 @@ emitLine(uProjectionMatrix * vec4(vertexPosition1, 1.0),
33690
33696
  }, sH = {
33691
33697
  defineShader(i) {
33692
33698
  Mu(i), IP(i), tr(i), i.setVertexMain(`
33693
- int vertexIndex1 = gl_VertexID / ${hs};
33699
+ int vertexIndex1 = gl_VertexID / ${fs};
33694
33700
  int vertexIndex2 = vertexIndex1 == 5 ? 0 : vertexIndex1 + 1;
33695
33701
  vec3 vertexPosition1 = getBoundingBoxPlaneIntersectionVertexPosition(uChunkDataSize, uTranslation, uLowerClipBound, uUpperClipBound, vertexIndex1);
33696
33702
  vec3 vertexPosition2 = getBoundingBoxPlaneIntersectionVertexPosition(uChunkDataSize, uTranslation, uLowerClipBound, uUpperClipBound, vertexIndex2);
@@ -34187,7 +34193,7 @@ function NP(i, e, t) {
34187
34193
  (a ? OT : kr)(l, e.chunkToLayerTransform, n + 1, r, n), t(l, a);
34188
34194
  });
34189
34195
  }
34190
- class vH extends Br {
34196
+ class vH extends Fr {
34191
34197
  constructor(e, t) {
34192
34198
  super(), this.layer = e, this.displayState = t, this.previousSelectedState = void 0, this.previousHoverId = void 0, this.previousHoverAnnotationLayerState = void 0, this.virtualListSource = {
34193
34199
  length: 0,
@@ -34255,7 +34261,7 @@ class vH extends Br {
34255
34261
  this.displayState.hoverState.value = void 0;
34256
34262
  });
34257
34263
  const v = cU();
34258
- this.registerDisposer(new Vr(this.virtualList.element, v)), this.virtualList.element.title = v.describe(), this.registerDisposer(this.displayState.hoverState.changed.add(() => this.updateHoverView())), this.registerDisposer(this.selectedAnnotationState.changed.add(() => this.updateSelectionView())), this.registerDisposer(this.layer.localCoordinateSpace.changed.add(() => {
34264
+ this.registerDisposer(new Br(this.virtualList.element, v)), this.virtualList.element.title = v.describe(), this.registerDisposer(this.displayState.hoverState.changed.add(() => this.updateHoverView())), this.registerDisposer(this.selectedAnnotationState.changed.add(() => this.updateSelectionView())), this.registerDisposer(this.layer.localCoordinateSpace.changed.add(() => {
34259
34265
  this.updateCoordinateSpace(), this.updateView();
34260
34266
  })), this.registerDisposer(this.layer.manager.root.coordinateSpace.changed.add(() => {
34261
34267
  this.updateCoordinateSpace(), this.updateView();
@@ -34488,7 +34494,7 @@ class vH extends Br {
34488
34494
  s.className = "neuroglancer-annotation-icon", s.textContent = Pn[e.type].icon, r.appendChild(s);
34489
34495
  let a;
34490
34496
  const l = () => {
34491
- t.source.readonly || a === void 0 && (a = fs({
34497
+ t.source.readonly || a === void 0 && (a = ps({
34492
34498
  title: "Delete annotation",
34493
34499
  onClick: (h) => {
34494
34500
  h.stopPropagation(), h.preventDefault();
@@ -34542,7 +34548,7 @@ class vH extends Br {
34542
34548
  return u !== void 0 && u.annotationLayerState === t && u.annotationId === e.id && r.classList.add("neuroglancer-annotation-selected"), r;
34543
34549
  }
34544
34550
  }
34545
- class yH extends Br {
34551
+ class yH extends Fr {
34546
34552
  constructor(e) {
34547
34553
  super(), this.layer = e, this.layerView = this.registerDisposer(new vH(this.layer, this.layer.annotationDisplayState));
34548
34554
  const t = this.element;
@@ -34594,7 +34600,7 @@ class $P extends OP {
34594
34600
  !0
34595
34601
  );
34596
34602
  t.source instanceof Ii ? this.sourceSignalUpdated || (t.source.childAdded.add((a) => {
34597
- a.source === void 0 && this.layer.selectAnnotation(t, a.id, !0, !ps.expectingExternalUI);
34603
+ a.source === void 0 && this.layer.selectAnnotation(t, a.id, !0, !gs.expectingExternalUI);
34598
34604
  }), this.sourceSignalUpdated = !0) : this.layer.selectAnnotation(t, s.id, !0), s.dispose();
34599
34605
  }
34600
34606
  }
@@ -34618,7 +34624,7 @@ class GP extends OP {
34618
34624
  if (t !== void 0 && e.updateUnconditionally()) {
34619
34625
  const n = () => {
34620
34626
  const r = this.inProgressAnnotation, s = r.reference, a = this.getUpdatedAnnotation(s.value, e, t);
34621
- re(Em(a, t.source)) !== re(Em(s.value, t.source)) && (r.annotationLayer.source.update(s, a), this.layer.selectAnnotation(t, s.id, !0, !ps.expectingExternalUI));
34627
+ re(Em(a, t.source)) !== re(Em(s.value, t.source)) && (r.annotationLayer.source.update(s, a), this.layer.selectAnnotation(t, s.id, !0, !gs.expectingExternalUI));
34622
34628
  };
34623
34629
  if (this.inProgressAnnotation === void 0) {
34624
34630
  const r = t.source.add(
@@ -34626,7 +34632,7 @@ class GP extends OP {
34626
34632
  /*commit=*/
34627
34633
  !1
34628
34634
  );
34629
- this.layer.selectAnnotation(t, r.id, !0, !ps.expectingExternalUI);
34635
+ this.layer.selectAnnotation(t, r.id, !0, !gs.expectingExternalUI);
34630
34636
  const s = e.changed.add(n), a = () => {
34631
34637
  s(), r.dispose();
34632
34638
  };
@@ -34774,7 +34780,7 @@ function bH(i, e, t, n) {
34774
34780
  for (const b of e)
34775
34781
  C.set(b, w);
34776
34782
  }), d.appendChild(h)), n !== void 0) {
34777
- const C = fs({
34783
+ const C = ps({
34778
34784
  title: "Remove all IDs",
34779
34785
  onClick: () => {
34780
34786
  n([]);
@@ -34794,7 +34800,7 @@ function bH(i, e, t, n) {
34794
34800
  const A = document.createElement("input");
34795
34801
  A.classList.add("neuroglancer-segment-list-entry-visible-checkbox"), A.type = "checkbox", E.appendChild(A);
34796
34802
  }
34797
- const P = fs({
34803
+ const P = ps({
34798
34804
  title: "Cancel adding new segment ID",
34799
34805
  onClick: () => {
34800
34806
  b();
@@ -34835,7 +34841,7 @@ function bH(i, e, t, n) {
34835
34841
  for (const C of e) {
34836
34842
  const w = y.get(C);
34837
34843
  if (v.push(w), n !== void 0) {
34838
- const b = fs({
34844
+ const b = ps({
34839
34845
  title: "Remove ID",
34840
34846
  onClick: (E) => {
34841
34847
  n(e.filter((T) => !te.equal(T, C))), E.stopPropagation();
@@ -34949,7 +34955,7 @@ function IS(i) {
34949
34955
  });
34950
34956
  }
34951
34957
  if (!a.source.readonly) {
34952
- const O = fs({
34958
+ const O = ps({
34953
34959
  title: "Delete annotation",
34954
34960
  onClick: () => {
34955
34961
  a.source.delete(l);
@@ -35088,7 +35094,7 @@ const YE = at.fromObject({
35088
35094
  });
35089
35095
  class HP extends X {
35090
35096
  constructor(e, t, n, r) {
35091
- super(), this.element = e, this.dataType = t, this.getModel = n, this.setModel = r, e.title = YE.describe(), this.registerDisposer(new Vr(e, YE)), ve(e, "set", (s) => {
35097
+ super(), this.element = e, this.dataType = t, this.getModel = n, this.setModel = r, e.title = YE.describe(), this.registerDisposer(new Br(e, YE)), ve(e, "set", (s) => {
35092
35098
  const a = s.detail, l = this.getModel(), d = this.getTargetValue(a);
35093
35099
  if (d === void 0) return;
35094
35100
  const u = Ul(l.window, l.range), h = tO(u, d), g = (v) => {
@@ -35143,10 +35149,10 @@ class CH extends uL {
35143
35149
  super(e.display, document.createElement("div"), e.visibility), this.parent = e, this.controller = this.registerDisposer(new HP(this.element, this.parent.dataType, () => this.parent.trackable.value, (n) => {
35144
35150
  this.parent.trackable.value = n;
35145
35151
  })), this.dataValuesBuffer = this.registerDisposer(Ql(this.gl, WebGL2RenderingContext.ARRAY_BUFFER, () => {
35146
- const n = new Uint8Array(Nl * hs);
35152
+ const n = new Uint8Array(Nl * fs);
35147
35153
  for (let r = 0; r < Nl; ++r)
35148
- for (let s = 0; s < hs; ++s)
35149
- n[r * hs + s] = r;
35154
+ for (let s = 0; s < fs; ++s)
35155
+ n[r * fs + s] = r;
35150
35156
  return n;
35151
35157
  })).value, this.lineShader = this.registerDisposer((() => {
35152
35158
  const n = new na(this.gl);
@@ -35356,7 +35362,7 @@ function TH(i, e, t, n, r) {
35356
35362
  const s = Math.exp(r), a = e.value, l = Cr(t, i, 0.5 - s / 2 + n), d = Cr(t, i, 0.5 + s / 2 + n);
35357
35363
  e.value = H(H({}, a), { range: [l, d] });
35358
35364
  }
35359
- class LH extends Br {
35365
+ class LH extends Fr {
35360
35366
  constructor(e, t, n, r, s, a, l) {
35361
35367
  super(e), this.display = t, this.dataType = n, this.trackable = r, this.histogramSpecifications = s, this.histogramIndex = a, this.legendShaderOptions = l, this.cdfPanel = this.registerDisposer(new CH(this)), this.boundElements = {
35362
35368
  range: QE("range", this.dataType, this.trackable),
@@ -35553,7 +35559,7 @@ class RH extends To {
35553
35559
  if (t.useTemporaryVisibleSegments.value = !0, C !== void 0) {
35554
35560
  const M = L.computeSplit(y, C);
35555
35561
  if (M !== void 0) {
35556
- E = new ys(y, M.includeRepresentative), T = new ys(C, M.excludeRepresentative), t.useTemporarySegmentEquivalences.value = !0;
35562
+ E = new Ss(y, M.includeRepresentative), T = new Ss(C, M.excludeRepresentative), t.useTemporarySegmentEquivalences.value = !0;
35557
35563
  const O = M.includeRepresentative, F = M.excludeRepresentative, q = t.temporarySegmentEquivalences;
35558
35564
  q.clear();
35559
35565
  for (const V of M.includeBaseSegments)
@@ -35625,7 +35631,7 @@ class RH extends To {
35625
35631
  }
35626
35632
  }
35627
35633
  function AH() {
35628
- lc(Jt, PS, (i) => new PH(i)), lc(Jt, RS, (i) => new RH(i));
35634
+ lc(zt, PS, (i) => new PH(i)), lc(zt, RS, (i) => new RH(i));
35629
35635
  }
35630
35636
  /**
35631
35637
  * /**
@@ -35723,7 +35729,7 @@ class MH extends To {
35723
35729
  }
35724
35730
  }
35725
35731
  function NH() {
35726
- lc(Jt, AS, (i) => new MH(i));
35732
+ lc(zt, AS, (i) => new MH(i));
35727
35733
  }
35728
35734
  const OH = new te();
35729
35735
  class VH extends X {
@@ -35753,12 +35759,12 @@ class VH extends X {
35753
35759
  if (this.prevQuery === t)
35754
35760
  s = r;
35755
35761
  else {
35756
- const b = lW(n, t);
35757
- s = cW(n, b);
35762
+ const b = l4(n, t);
35763
+ s = c4(n, b);
35758
35764
  }
35759
35765
  const a = [];
35760
35766
  let l = !1, d = "";
35761
- const u = this.segmentationDisplayState.segmentationGroupState.value.visibleSegments, h = u.changed.count, g = this.visibleSegmentsGeneration, v = pW(s.query);
35767
+ const u = this.segmentationDisplayState.segmentationGroupState.value.visibleSegments, h = u.changed.count, g = this.visibleSegmentsGeneration, v = p4(s.query);
35762
35768
  if (v) {
35763
35769
  if (g !== h || this.explicitSegments === void 0 || !this.explicitSegmentsVisible) {
35764
35770
  this.visibleSegmentsGeneration = h;
@@ -35779,7 +35785,7 @@ class VH extends X {
35779
35785
  insertCount: s.count
35780
35786
  }), l = !0, this.queryResult.value = s), s.explicitIds !== void 0 ? d = `${s.count} ids` : v ? d = `${s.count} listed ids` : s.total > 0 && (d = `${s.count}/${s.total} matches`), r !== s || h !== g) {
35781
35787
  let b = d, E = 0;
35782
- n !== void 0 && s.count > 0 && (E = fW(n, s, u), b += ` (${E} visible)`), this.selectedMatches = E, this.statusText.value = b;
35788
+ n !== void 0 && s.count > 0 && (E = f4(n, s, u), b += ` (${E} visible)`), this.selectedMatches = E, this.statusText.value = b;
35783
35789
  }
35784
35790
  this.prevQuery = t, this.matchStatusTextPrefix = d;
35785
35791
  const w = this.explicitSegments;
@@ -35915,7 +35921,7 @@ class zH extends X {
35915
35921
  }
35916
35922
  updateHistograms() {
35917
35923
  const e = this.queryResult.value;
35918
- this.listElement !== void 0 && (uW(this.segmentPropertyMap, e, this.propertyHistograms, this.bounds.window.value), this.updateHistogramRenderings());
35924
+ this.listElement !== void 0 && (u4(this.segmentPropertyMap, e, this.propertyHistograms, this.bounds.window.value), this.updateHistogramRenderings());
35919
35925
  }
35920
35926
  updateHistogramRenderings() {
35921
35927
  this.debouncedRender.cancel();
@@ -36075,7 +36081,7 @@ function $H(i, e) {
36075
36081
  }
36076
36082
  return r;
36077
36083
  }
36078
- class GH extends Br {
36084
+ class GH extends Fr {
36079
36085
  constructor(e) {
36080
36086
  super(), this.layer = e;
36081
36087
  const t = this.element;
@@ -36119,7 +36125,7 @@ class GH extends Br {
36119
36125
  (d, u, h) => {
36120
36126
  const g = (se) => {
36121
36127
  r.focus(), r.select();
36122
- const we = hW(d, se);
36128
+ const we = h4(d, se);
36123
36129
  document.execCommand("insertText", !1, we), a.value = we, r.select();
36124
36130
  }, v = h.registerDisposer(new VH(a, d, e.displayState, u)), y = e.displayState.segmentationGroupState.value, C = document.createElement("ul");
36125
36131
  C.classList.add("neuroglancer-segment-query-errors"), u.appendChild(C);
@@ -36201,7 +36207,7 @@ class GH extends Br {
36201
36207
  const V = h.registerDisposer(new oS({ source: v, horizontalScroll: !0 })), $ = h.registerCancellable(dt(() => {
36202
36208
  v.updateRenderedItems(V);
36203
36209
  })), B = this.layer.displayState;
36204
- h.registerDisposer(B.segmentSelectionState.changed.add($)), h.registerDisposer(y.visibleSegments.changed.add($)), h.registerDisposer(B.segmentColorHash.changed.add($)), h.registerDisposer(B.segmentStatedColors.changed.add($)), h.registerDisposer(B.segmentDefaultColor.changed.add($)), V.element.classList.add("neuroglancer-segment-list"), h.registerDisposer(e.bindSegmentListWidth(V.element)), h.registerDisposer(new Vr(V.element, bh()));
36210
+ h.registerDisposer(B.segmentSelectionState.changed.add($)), h.registerDisposer(y.visibleSegments.changed.add($)), h.registerDisposer(B.segmentColorHash.changed.add($)), h.registerDisposer(B.segmentStatedColors.changed.add($)), h.registerDisposer(B.segmentDefaultColor.changed.add($)), V.element.classList.add("neuroglancer-segment-list"), h.registerDisposer(e.bindSegmentListWidth(V.element)), h.registerDisposer(new Br(V.element, bh()));
36205
36211
  const le = h.registerDisposer(new zH(d, v.queryResult, g));
36206
36212
  {
36207
36213
  const se = le.listElement;
@@ -36670,7 +36676,7 @@ const JH = /* @__PURE__ */ Qe(jH);
36670
36676
  * See the License for the specific language governing permissions and
36671
36677
  * limitations under the License.
36672
36678
  */
36673
- JH(cs);
36679
+ JH(ds);
36674
36680
  const KH = 500;
36675
36681
  class OS extends X {
36676
36682
  constructor(e) {
@@ -36681,7 +36687,7 @@ class OS extends X {
36681
36687
  } finally {
36682
36688
  this.changingValue = !1;
36683
36689
  }
36684
- }, KH), this.textEditor = cs((r) => {
36690
+ }, KH), this.textEditor = ds((r) => {
36685
36691
  }, {
36686
36692
  value: this.state.fragmentMain.value,
36687
36693
  mode: "glsl",
@@ -36719,7 +36725,7 @@ class OS extends X {
36719
36725
  a.push({
36720
36726
  message: l.message,
36721
36727
  severity: "error",
36722
- from: cs.Pos(l.line)
36728
+ from: ds.Pos(l.line)
36723
36729
  });
36724
36730
  if (n != null)
36725
36731
  if (n.name === "ShaderCompilationError")
@@ -36727,16 +36733,16 @@ class OS extends X {
36727
36733
  a.push({
36728
36734
  message: l.message,
36729
36735
  severity: "error",
36730
- from: cs.Pos(l.file === t && l.line || 0)
36736
+ from: ds.Pos(l.file === t && l.line || 0)
36731
36737
  });
36732
36738
  else n.name === "ShaderLinkError" ? a.push({
36733
36739
  message: n.log,
36734
36740
  severity: "error",
36735
- from: cs.Pos(0)
36741
+ from: ds.Pos(0)
36736
36742
  }) : a.push({
36737
36743
  message: n.message,
36738
36744
  severity: "error",
36739
- from: cs.Pos(0)
36745
+ from: ds.Pos(0)
36740
36746
  });
36741
36747
  return a;
36742
36748
  }
@@ -36896,7 +36902,7 @@ class QH extends X {
36896
36902
  const e6 = at.fromObject({
36897
36903
  "at:shift+wheel": { action: "adjust-via-wheel" }
36898
36904
  });
36899
- function ds(i) {
36905
+ function us(i) {
36900
36906
  return {
36901
36907
  makeControl: (e, t) => {
36902
36908
  var n = i(e);
@@ -36916,7 +36922,7 @@ function ak(i, e) {
36916
36922
  const r = n.control;
36917
36923
  switch (r.type) {
36918
36924
  case "slider":
36919
- return ds(() => ({
36925
+ return us(() => ({
36920
36926
  value: n.trackable,
36921
36927
  options: { min: r.min, max: r.max, step: r.step }
36922
36928
  }));
@@ -36958,7 +36964,7 @@ function t2(i, e, t) {
36958
36964
  }
36959
36965
  };
36960
36966
  }
36961
- class VS extends Br {
36967
+ class VS extends Fr {
36962
36968
  constructor(e, t, n, r = {}) {
36963
36969
  super(r.visibility), this.state = e, this.display = t, this.layer = n, this.options = r, this.controlDisposer = void 0;
36964
36970
  var s = r.toolId;
@@ -37026,7 +37032,7 @@ function r2(i) {
37026
37032
  shaderControlState: i.displayState.skeletonRenderingOptions.shaderControlState
37027
37033
  });
37028
37034
  }
37029
- class i6 extends Br {
37035
+ class i6 extends Fr {
37030
37036
  constructor(e) {
37031
37037
  super(), this.layer = e;
37032
37038
  const t = this.element;
@@ -37339,9 +37345,9 @@ class Ev extends X {
37339
37345
  constructor(e, t) {
37340
37346
  super(), this.histogram = e, this.target = t, this.label = document.createElement("div"), this.element = document.createElement("div"), this.canvas = document.createElement("canvas"), this.legend = document.createElement("div"), this.legendRenderScale = document.createElement("div"), this.legendSpatialScale = document.createElement("div"), this.legendChunks = document.createElement("div"), this.ctx = this.canvas.getContext("2d"), this.hoverTarget = new ct(void 0), this.throttledUpdateView = this.registerCancellable(gh(() => this.debouncedUpdateView(), l6, { leading: !0, trailing: !0 })), this.debouncedUpdateView = this.registerCancellable(it(() => this.updateView(), 0));
37341
37347
  const n = this.canvas, r = this.label, s = this.element, a = this.legend, l = this.legendRenderScale, d = this.legendSpatialScale, u = this.legendChunks;
37342
- r.className = "neuroglancer-render-scale-widget-prompt", s.className = "neuroglancer-render-scale-widget", s.title = ok.describe(), a.className = "neuroglancer-render-scale-widget-legend", s.appendChild(r), s.appendChild(n), s.appendChild(a), l.title = "Target resolution of data in screen pixels", u.title = "Number of chunks rendered", a.appendChild(l), a.appendChild(u), a.appendChild(d), this.registerDisposer(e.changed.add(this.throttledUpdateView)), this.registerDisposer(e.visibility.changed.add(this.debouncedUpdateView)), this.registerDisposer(t.changed.add(this.debouncedUpdateView)), this.registerDisposer(new Vr(n, ok)), this.registerDisposer(t.changed.add(this.debouncedUpdateView)), this.registerDisposer(this.hoverTarget.changed.add(this.debouncedUpdateView));
37348
+ r.className = "neuroglancer-render-scale-widget-prompt", s.className = "neuroglancer-render-scale-widget", s.title = ok.describe(), a.className = "neuroglancer-render-scale-widget-legend", s.appendChild(r), s.appendChild(n), s.appendChild(a), l.title = "Target resolution of data in screen pixels", u.title = "Number of chunks rendered", a.appendChild(l), a.appendChild(u), a.appendChild(d), this.registerDisposer(e.changed.add(this.throttledUpdateView)), this.registerDisposer(e.visibility.changed.add(this.debouncedUpdateView)), this.registerDisposer(t.changed.add(this.debouncedUpdateView)), this.registerDisposer(new Br(n, ok)), this.registerDisposer(t.changed.add(this.debouncedUpdateView)), this.registerDisposer(this.hoverTarget.changed.add(this.debouncedUpdateView));
37343
37349
  const h = (v) => {
37344
- const y = v.offsetX / n.width * jt;
37350
+ const y = v.offsetX / n.width * Jt;
37345
37351
  return IF(y);
37346
37352
  };
37347
37353
  this.registerEventListener(n, "pointermove", (v) => {
@@ -37372,7 +37378,7 @@ class Ev extends X {
37372
37378
  L.textContent = M + " px";
37373
37379
  }
37374
37380
  function l(L) {
37375
- return L * n / jt;
37381
+ return L * n / Jt;
37376
37382
  }
37377
37383
  e.clearRect(0, 0, n, r);
37378
37384
  const d = this.histogram, u = d.value, h = d.spatialScales;
@@ -37383,10 +37389,10 @@ class Ev extends X {
37383
37389
  let y = 1;
37384
37390
  const C = h.size;
37385
37391
  let w = 0, b = 0;
37386
- for (let L = 0; L < jt; ++L) {
37392
+ for (let L = 0; L < Jt; ++L) {
37387
37393
  let A = 0;
37388
37394
  for (let M = 0; M < C; ++M) {
37389
- const O = M * jt * 2 + L, F = u[O], q = u[O + jt];
37395
+ const O = M * Jt * 2 + L, F = u[O], q = u[O + Jt];
37390
37396
  w += F, b += q, A += F + q;
37391
37397
  }
37392
37398
  y = Math.max(A, y);
@@ -37398,11 +37404,11 @@ class Ev extends X {
37398
37404
  let R;
37399
37405
  if (a !== void 0) {
37400
37406
  const L = Math.floor(jd(a[0]));
37401
- if (L >= 0 && L < jt) {
37407
+ if (L >= 0 && L < Jt) {
37402
37408
  let A = 0;
37403
37409
  const M = a[1];
37404
37410
  for (let O = C - 1; O >= 0; --O) {
37405
- const F = g[O], U = 2 * h.get(F) * jt + L, V = u[U] + u[U + jt];
37411
+ const F = g[O], U = 2 * h.get(F) * Jt + L, V = u[U] + u[U + Jt];
37406
37412
  if (V === 0) continue;
37407
37413
  const $ = Math.round(P(A));
37408
37414
  if (A += V, Math.round(P(A)) <= M && M <= $) {
@@ -37414,10 +37420,10 @@ class Ev extends X {
37414
37420
  }
37415
37421
  if (R !== void 0) {
37416
37422
  w = 0, b = 0;
37417
- const A = 2 * h.get(R) * jt;
37418
- for (let M = 0; M < jt; ++M) {
37423
+ const A = 2 * h.get(R) * Jt;
37424
+ for (let M = 0; M < Jt; ++M) {
37419
37425
  const O = A + M;
37420
- w += u[O], b += u[O + jt];
37426
+ w += u[O], b += u[O + Jt];
37421
37427
  }
37422
37428
  gt(R) ? this.legendSpatialScale.textContent = ta(R, "m", { precision: 2, elide1: !1 }) : this.legendSpatialScale.textContent = "unknown";
37423
37429
  } else
@@ -37432,10 +37438,10 @@ class Ev extends X {
37432
37438
  const F = An(v);
37433
37439
  return [O, F];
37434
37440
  });
37435
- for (let L = 0; L < jt; ++L) {
37441
+ for (let L = 0; L < Jt; ++L) {
37436
37442
  let A = 0;
37437
37443
  for (let M = C - 1; M >= 0; --M) {
37438
- const O = g[M], q = h.get(O) * jt * 2 + L, U = u[q], V = u[q + jt], $ = U + V;
37444
+ const O = g[M], q = h.get(O) * Jt * 2 + L, U = u[q], V = u[q + Jt], $ = U + V;
37439
37445
  if ($ === 0) continue;
37440
37446
  const B = Math.round(l(L)), le = Math.round(l(L + 1)), ne = Math.round(P(A));
37441
37447
  A += $;
@@ -37528,7 +37534,7 @@ function f6() {
37528
37534
  const kv = "selectedAlpha", Tv = "notSelectedAlpha", Lv = "objectAlpha", Dv = "saturation", Iv = "hideSegmentZero", Pv = "baseSegmentColoring", Rv = "ignoreNullVisibleSet", p6 = "mesh", g6 = "skeletons", lk = "segments", Uu = "equivalences", Av = "colorSeed", ck = "segmentColors", _v = "meshRenderScale", Mv = "crossSectionRenderScale", zu = "skeletonRendering", m6 = "skeletonShader", dk = "segmentQuery", Nv = "meshSilhouetteRendering", uk = "linkedSegmentationGroup", hk = "linkedSegmentationColorGroup", Ov = "segmentDefaultColor", fk = "anchorSegment", a2 = "skeletonShaderControl";
37529
37535
  class v6 extends X {
37530
37536
  constructor(e) {
37531
- super(), this.layer = e, this.specificationChanged = new Ze(), this.localGraph = new bW(), this.visibleSegments = this.registerDisposer(Vu.makeWithCounterpart(this.layer.manager.rpc)), this.segmentPropertyMap = new ct(void 0), this.graph = new ct(void 0), this.segmentEquivalences = this.registerDisposer(cc.makeWithCounterpart(this.layer.manager.rpc, this.layer.registerDisposer(ci((n) => n && n.visibleSegmentEquivalencePolicy || Di.MIN_REPRESENTATIVE, [this.graph])))), this.localSegmentEquivalences = !1, this.maxIdLength = new ct(1), this.hideSegmentZero = new Ut(!0, !0), this.segmentQuery = new Kt("", Le), this.temporaryVisibleSegments = this.layer.registerDisposer(Vu.makeWithCounterpart(this.layer.manager.rpc)), this.temporarySegmentEquivalences = this.layer.registerDisposer(cc.makeWithCounterpart(this.layer.manager.rpc, this.segmentEquivalences.disjointSets.visibleSegmentEquivalencePolicy)), this.useTemporaryVisibleSegments = this.layer.registerDisposer(vn.make(this.layer.manager.rpc, !1)), this.useTemporarySegmentEquivalences = this.layer.registerDisposer(vn.make(this.layer.manager.rpc, !1));
37537
+ super(), this.layer = e, this.specificationChanged = new Ze(), this.localGraph = new b4(), this.visibleSegments = this.registerDisposer(Vu.makeWithCounterpart(this.layer.manager.rpc)), this.segmentPropertyMap = new ct(void 0), this.graph = new ct(void 0), this.segmentEquivalences = this.registerDisposer(cc.makeWithCounterpart(this.layer.manager.rpc, this.layer.registerDisposer(ci((n) => n && n.visibleSegmentEquivalencePolicy || Di.MIN_REPRESENTATIVE, [this.graph])))), this.localSegmentEquivalences = !1, this.maxIdLength = new ct(1), this.hideSegmentZero = new Ut(!0, !0), this.segmentQuery = new Kt("", Le), this.temporaryVisibleSegments = this.layer.registerDisposer(Vu.makeWithCounterpart(this.layer.manager.rpc)), this.temporarySegmentEquivalences = this.layer.registerDisposer(cc.makeWithCounterpart(this.layer.manager.rpc, this.segmentEquivalences.disjointSets.visibleSegmentEquivalencePolicy)), this.useTemporaryVisibleSegments = this.layer.registerDisposer(vn.make(this.layer.manager.rpc, !1)), this.useTemporarySegmentEquivalences = this.layer.registerDisposer(vn.make(this.layer.manager.rpc, !1));
37532
37538
  const t = this.specificationChanged;
37533
37539
  this.visibleSegments.changed.add(t.dispatch), this.hideSegmentZero.changed.add(t.dispatch), this.segmentQuery.changed.add(t.dispatch);
37534
37540
  }
@@ -37619,11 +37625,11 @@ class S6 {
37619
37625
  constructor(e) {
37620
37626
  this.layer = e, this.segmentSelectionState = new DU(), this.selectedAlpha = Bl(0.5), this.saturation = Bl(1), this.notSelectedAlpha = Bl(0), this.silhouetteRendering = new Kt(0, DT, 0), this.objectAlpha = Bl(1), this.ignoreNullVisibleSet = new Ut(!0, !0), this.skeletonRenderingOptions = new ZU(), this.shaderError = uh(), this.renderScaleHistogram = new yo(), this.renderScaleTarget = ia(1), this.selectSegment = this.layer.selectSegment, this.transparentPickEnabled = this.layer.pick, this.baseSegmentColoring = new Ut(!1, !1), this.filterBySegmentLabel = this.layer.filterBySegmentLabel, this.moveToSegment = (t) => {
37621
37627
  this.layer.moveToSegment(t);
37622
- }, this.linkedSegmentationGroup = this.layer.registerDisposer(new _E(this.layer.manager.rootLayers, this.layer, (t) => t instanceof Jt, (t) => t.displayState.linkedSegmentationGroup)), this.linkedSegmentationColorGroup = this.layer.registerDisposer(new _E(this.layer.manager.rootLayers, this.layer, (t) => t instanceof Jt, (t) => t.displayState.linkedSegmentationColorGroup)), this.originalSegmentationGroupState = this.layer.registerDisposer(new v6(this.layer)), this.originalSegmentationColorGroupState = this.layer.registerDisposer(new y6(this.layer)), e.displayState = this, this.segmentationGroupState = this.layer.registerDisposer(new pk(this.linkedSegmentationGroup, "originalSegmentationGroupState")), this.segmentationColorGroupState = this.layer.registerDisposer(new pk(this.linkedSegmentationColorGroup, "originalSegmentationColorGroupState")), this.hideSegmentZero = this.layer.registerDisposer(new $d(this.segmentationGroupState, (t) => t.hideSegmentZero)), this.segmentColorHash = this.layer.registerDisposer(new Tp(this.segmentationColorGroupState, (t) => t.segmentColorHash)), this.segmentStatedColors = this.layer.registerDisposer(new Tp(this.segmentationColorGroupState, (t) => t.segmentStatedColors)), this.segmentDefaultColor = this.layer.registerDisposer(new Tp(this.segmentationColorGroupState, (t) => t.segmentDefaultColor)), this.segmentQuery = this.layer.registerDisposer(new $d(this.segmentationGroupState, (t) => t.segmentQuery)), this.segmentPropertyMap = this.layer.registerDisposer(new $d(this.segmentationGroupState, (t) => t.segmentPropertyMap));
37628
+ }, this.linkedSegmentationGroup = this.layer.registerDisposer(new _E(this.layer.manager.rootLayers, this.layer, (t) => t instanceof zt, (t) => t.displayState.linkedSegmentationGroup)), this.linkedSegmentationColorGroup = this.layer.registerDisposer(new _E(this.layer.manager.rootLayers, this.layer, (t) => t instanceof zt, (t) => t.displayState.linkedSegmentationColorGroup)), this.originalSegmentationGroupState = this.layer.registerDisposer(new v6(this.layer)), this.originalSegmentationColorGroupState = this.layer.registerDisposer(new y6(this.layer)), e.displayState = this, this.segmentationGroupState = this.layer.registerDisposer(new pk(this.linkedSegmentationGroup, "originalSegmentationGroupState")), this.segmentationColorGroupState = this.layer.registerDisposer(new pk(this.linkedSegmentationColorGroup, "originalSegmentationColorGroupState")), this.hideSegmentZero = this.layer.registerDisposer(new $d(this.segmentationGroupState, (t) => t.hideSegmentZero)), this.segmentColorHash = this.layer.registerDisposer(new Tp(this.segmentationColorGroupState, (t) => t.segmentColorHash)), this.segmentStatedColors = this.layer.registerDisposer(new Tp(this.segmentationColorGroupState, (t) => t.segmentStatedColors)), this.segmentDefaultColor = this.layer.registerDisposer(new Tp(this.segmentationColorGroupState, (t) => t.segmentDefaultColor)), this.segmentQuery = this.layer.registerDisposer(new $d(this.segmentationGroupState, (t) => t.segmentQuery)), this.segmentPropertyMap = this.layer.registerDisposer(new $d(this.segmentationGroupState, (t) => t.segmentPropertyMap));
37623
37629
  }
37624
37630
  }
37625
37631
  const b6 = IS(Ho);
37626
- class Jt extends b6 {
37632
+ class zt extends b6 {
37627
37633
  constructor(e) {
37628
37634
  super(e), this.sliceViewRenderScaleHistogram = new yo(), this.sliceViewRenderScaleTarget = ia(1), this.segmentQueryFocusTime = new ct(Number.NEGATIVE_INFINITY), this.selectSegment = (t, n) => {
37629
37635
  this.manager.root.selectionState.captureSingleLayerState(this, (r) => (r.value = t.clone(), !0), n);
@@ -37683,7 +37689,7 @@ class Jt extends b6 {
37683
37689
  });
37684
37690
  })) : a.deactivate("Not supported on non-root linked segmentation layers") : a.deactivate("Not compatible with segmentation layer");
37685
37691
  }
37686
- this.displayState.originalSegmentationGroupState.segmentPropertyMap.value = aW(this.manager.chunkManager, t), this.displayState.originalSegmentationGroupState.graph.value = r;
37692
+ this.displayState.originalSegmentationGroupState.segmentPropertyMap.value = a4(this.manager.chunkManager, t), this.displayState.originalSegmentationGroupState.graph.value = r;
37687
37693
  }
37688
37694
  getLegacyDataSourceSpecifications(e, t, n, r) {
37689
37695
  const s = super.getLegacyDataSourceSpecifications(e, t, n, r), a = ye(t, p6, (d) => d === null ? null : Le(d)), l = ye(t, g6, (d) => d === null ? null : Le(d));
@@ -37784,7 +37790,7 @@ class Jt extends b6 {
37784
37790
  selectionStateToJson(e, t) {
37785
37791
  const n = super.selectionStateToJson(e, t);
37786
37792
  let r = e.value;
37787
- return r instanceof ys ? t ? n.value = {
37793
+ return r instanceof Ss ? t ? n.value = {
37788
37794
  key: r.key.toString(),
37789
37795
  value: r.value ? r.value.toString() : void 0,
37790
37796
  label: r.label
@@ -37797,7 +37803,7 @@ class Jt extends b6 {
37797
37803
  return !1;
37798
37804
  if (r instanceof te)
37799
37805
  s = r.clone();
37800
- else if (r instanceof ys)
37806
+ else if (r instanceof Ss)
37801
37807
  s = r.key.clone();
37802
37808
  else
37803
37809
  return !1;
@@ -37858,35 +37864,35 @@ class Jt extends b6 {
37858
37864
  t || Xe.showTemporaryMessage(`No position information loaded for segment ${e}`);
37859
37865
  }
37860
37866
  }
37861
- Jt.type = "segmentation";
37862
- Jt.typeAbbreviation = "seg";
37863
- Jt.supportsPickOption = !0;
37867
+ zt.type = "segmentation";
37868
+ zt.typeAbbreviation = "seg";
37869
+ zt.supportsPickOption = !0;
37864
37870
  const w6 = 10;
37865
37871
  function gk(i) {
37866
- return [H({ label: `Skeleton mode (${i})`, toolJson: `${zu}.mode${i}`, isValid: (e) => e.hasSkeletonsLayer }, s2((e) => e.displayState.skeletonRenderingOptions[`params${i}`].mode)), H({ label: `Line width (${i})`, toolJson: `${zu}.lineWidth${i}`, isValid: (e) => e.hasSkeletonsLayer, toolDescription: `Skeleton line width (${i})`, title: `Skeleton line width (${i})` }, ds((e) => ({
37872
+ return [H({ label: `Skeleton mode (${i})`, toolJson: `${zu}.mode${i}`, isValid: (e) => e.hasSkeletonsLayer }, s2((e) => e.displayState.skeletonRenderingOptions[`params${i}`].mode)), H({ label: `Line width (${i})`, toolJson: `${zu}.lineWidth${i}`, isValid: (e) => e.hasSkeletonsLayer, toolDescription: `Skeleton line width (${i})`, title: `Skeleton line width (${i})` }, us((e) => ({
37867
37873
  value: e.displayState.skeletonRenderingOptions[`params${i}`].lineWidth,
37868
37874
  options: { min: 1, max: 40, step: 1 }
37869
37875
  })))];
37870
37876
  }
37871
- const o2 = [H({ label: "Color seed", title: "Color segments based on a hash of their id", toolJson: Av }, h6()), H({ label: "Fixed color", title: "Use a fixed color for all segments without an explicitly-specified color", toolJson: Ov }, f6()), H({ label: "Saturation", toolJson: Dv, title: "Saturation of segment colors" }, ds((i) => ({ value: i.displayState.saturation }))), H({ label: "Opacity (on)", toolJson: kv, isValid: (i) => i.has2dLayer, title: "Opacity in cross-section views of segments that are selected" }, ds((i) => ({ value: i.displayState.selectedAlpha }))), H({ label: "Opacity (off)", toolJson: Tv, isValid: (i) => i.has2dLayer, title: "Opacity in cross-section views of segments that are not selected" }, ds((i) => ({ value: i.displayState.notSelectedAlpha }))), H({ label: "Resolution (slice)", toolJson: Mv, isValid: (i) => i.has2dLayer }, Bu((i) => ({
37877
+ const o2 = [H({ label: "Color seed", title: "Color segments based on a hash of their id", toolJson: Av }, h6()), H({ label: "Fixed color", title: "Use a fixed color for all segments without an explicitly-specified color", toolJson: Ov }, f6()), H({ label: "Saturation", toolJson: Dv, title: "Saturation of segment colors" }, us((i) => ({ value: i.displayState.saturation }))), H({ label: "Opacity (on)", toolJson: kv, isValid: (i) => i.has2dLayer, title: "Opacity in cross-section views of segments that are selected" }, us((i) => ({ value: i.displayState.selectedAlpha }))), H({ label: "Opacity (off)", toolJson: Tv, isValid: (i) => i.has2dLayer, title: "Opacity in cross-section views of segments that are not selected" }, us((i) => ({ value: i.displayState.notSelectedAlpha }))), H({ label: "Resolution (slice)", toolJson: Mv, isValid: (i) => i.has2dLayer }, Bu((i) => ({
37872
37878
  histogram: i.sliceViewRenderScaleHistogram,
37873
37879
  target: i.sliceViewRenderScaleTarget
37874
37880
  }))), H({ label: "Resolution (mesh)", toolJson: _v, isValid: (i) => i.has3dLayer }, Bu((i) => ({
37875
37881
  histogram: i.displayState.renderScaleHistogram,
37876
37882
  target: i.displayState.renderScaleTarget
37877
- }))), H({ label: "Opacity (3d)", toolJson: Lv, isValid: (i) => i.has3dLayer, title: "Opacity of meshes and skeletons" }, ds((i) => ({ value: i.displayState.objectAlpha }))), H({ label: "Silhouette (3d)", toolJson: Nv, isValid: (i) => i.has3dLayer, title: "Set to a non-zero value to increase transparency of object faces perpendicular to view direction" }, ds((i) => ({
37883
+ }))), H({ label: "Opacity (3d)", toolJson: Lv, isValid: (i) => i.has3dLayer, title: "Opacity of meshes and skeletons" }, us((i) => ({ value: i.displayState.objectAlpha }))), H({ label: "Silhouette (3d)", toolJson: Nv, isValid: (i) => i.has3dLayer, title: "Set to a non-zero value to increase transparency of object faces perpendicular to view direction" }, us((i) => ({
37878
37884
  value: i.displayState.silhouetteRendering,
37879
37885
  options: { min: 0, max: w6, step: 0.1 }
37880
37886
  }))), H({ label: "Hide segment ID 0", toolJson: Iv, title: "Disallow selection and display of segment id 0" }, ql((i) => i.displayState.hideSegmentZero)), H({ label: "Base segment coloring", toolJson: Pv, title: "Color base segments individually" }, ql((i) => i.displayState.baseSegmentColoring)), H({ label: "Show all by default", title: "Show all segments if none are selected", toolJson: Rv }, ql((i) => i.displayState.ignoreNullVisibleSet)), ...gk("2d"), ...gk("3d")];
37881
37887
  for (const i of o2)
37882
- QP(Jt, i);
37883
- qo(Jt);
37884
- nP(mn.SEGMENTATION, Jt);
37888
+ QP(zt, i);
37889
+ qo(zt);
37890
+ nP(mn.SEGMENTATION, zt);
37885
37891
  yS((i) => {
37886
37892
  if (i.mesh !== void 0)
37887
- return { layerConstructor: Jt, priority: 1 };
37893
+ return { layerConstructor: zt, priority: 1 };
37888
37894
  });
37889
- BS(Jt, (i) => ({
37895
+ BS(zt, (i) => ({
37890
37896
  shaderControlState: i.displayState.skeletonRenderingOptions.shaderControlState
37891
37897
  }), a2);
37892
37898
  AH();
@@ -37941,13 +37947,13 @@ function E6(i, e) {
37941
37947
  }
37942
37948
  function k6(i) {
37943
37949
  const e = i.layer;
37944
- return e === null || e instanceof Jt;
37950
+ return e === null || e instanceof zt;
37945
37951
  }
37946
37952
  function T6(i) {
37947
37953
  if (i === void 0)
37948
37954
  return null;
37949
37955
  const e = i.layer;
37950
- return e === null || !(e instanceof Jt) ? null : e.displayState;
37956
+ return e === null || !(e instanceof zt) ? null : e.displayState;
37951
37957
  }
37952
37958
  const Ck = "linkedSegmentationLayer", xk = "filterBySegmentation", Ek = "ignoreNullSegmentFilter";
37953
37959
  class L6 extends X {
@@ -37973,7 +37979,7 @@ class L6 extends X {
37973
37979
  r && this.changed.dispatch();
37974
37980
  }
37975
37981
  addRelationship(e) {
37976
- const t = this.annotationDisplayState.relationshipStates.get(e), n = new G4(this.layerManager.addRef(), k6);
37982
+ const t = this.annotationDisplayState.relationshipStates.get(e), n = new GW(this.layerManager.addRef(), k6);
37977
37983
  n.registerDisposer(n.changed.add(() => {
37978
37984
  t.segmentationState.value = n.layerName === void 0 ? void 0 : T6(n.layer);
37979
37985
  }));
@@ -38083,7 +38089,7 @@ class I6 extends X {
38083
38089
  }
38084
38090
  }
38085
38091
  const P6 = IS(Ho);
38086
- class bs extends P6 {
38092
+ class Mr extends P6 {
38087
38093
  constructor(e) {
38088
38094
  super(e), this.annotationProperties = new ct(void 0), this.localAnnotationsJson = void 0, this.pointAnnotationsJson = void 0, this.linkedSegmentationLayers = this.registerDisposer(new L6(this.manager.rootLayers, this.annotationStates, this.annotationDisplayState)), this.linkedSegmentationLayers.changed.add(this.specificationChanged.dispatch), this.annotationDisplayState.ignoreNullSegmentFilter.changed.add(this.specificationChanged.dispatch), this.annotationCrossSectionRenderScaleTarget.changed.add(this.specificationChanged.dispatch), this.tabs.add("rendering", { label: "Rendering", order: -100, getter: () => new A6(this) }), this.tabs.default = "annotations", this.allowingRefresh = !0;
38089
38095
  }
@@ -38204,8 +38210,8 @@ class bs extends P6 {
38204
38210
  return e[vk] = t && t.length === 1 && t[0] === "segments" ? void 0 : t, e[Ek] = this.annotationDisplayState.ignoreNullSegmentFilter.toJSON(), e[bk] = this.annotationDisplayState.shader.toJSON(), e[wk] = this.annotationDisplayState.shaderControls.toJSON(), H(e, this.linkedSegmentationLayers.toJSON()), e;
38205
38211
  }
38206
38212
  }
38207
- bs.type = "annotation";
38208
- bs.typeAbbreviation = "ann";
38213
+ Mr.type = "annotation";
38214
+ Mr.typeAbbreviation = "ann";
38209
38215
  function l2(i) {
38210
38216
  return new OS({
38211
38217
  shaderError: i.annotationDisplayState.shaderError,
@@ -38217,7 +38223,7 @@ let R6 = class extends Ah {
38217
38223
  constructor(e) {
38218
38224
  super(), this.layer = e, this.codeWidget = this.registerDisposer(l2(this.layer)), this.content.appendChild(this.codeWidget.element), this.codeWidget.textEditor.refresh();
38219
38225
  }
38220
- }, A6 = class extends Br {
38226
+ }, A6 = class extends Fr {
38221
38227
  constructor(e) {
38222
38228
  super(), this.layer = e, this.codeWidget = this.registerDisposer(l2(this.layer));
38223
38229
  const t = this.element;
@@ -38250,15 +38256,15 @@ let R6 = class extends Ah {
38250
38256
  })), t.appendChild(n), t.appendChild(this.codeWidget.element), t.appendChild(this.registerDisposer(new VS(e.annotationDisplayState.shaderControls, this.layer.manager.root.display, this.layer, { visibility: this.visibility })).element);
38251
38257
  }
38252
38258
  };
38253
- qo(bs);
38254
- qo(bs, "pointAnnotation");
38259
+ qo(Mr);
38260
+ qo(Mr, "pointAnnotation");
38255
38261
  yS((i) => {
38256
38262
  if (i.local === Rr.annotations)
38257
- return { layerConstructor: bs, priority: 100 };
38263
+ return { layerConstructor: Mr, priority: 100 };
38258
38264
  if (i.annotation !== void 0)
38259
- return { layerConstructor: bs, priority: 1 };
38265
+ return { layerConstructor: Mr, priority: 1 };
38260
38266
  });
38261
- BS(bs, (i) => ({
38267
+ BS(Mr, (i) => ({
38262
38268
  shaderControlState: i.annotationDisplayState.shaderControls
38263
38269
  }));
38264
38270
  function _6(i) {
@@ -38754,7 +38760,7 @@ iI((i, e) => e.compressedSegmentationBlockSize != null ? new W6(i, e) : null);
38754
38760
  function H6(i, e = document.getElementById("neuroglancer-container")) {
38755
38761
  try {
38756
38762
  let t = new vV(e);
38757
- return new R4(t, i);
38763
+ return new RW(t, i);
38758
38764
  } catch (t) {
38759
38765
  throw Xe.showMessage(`Error: ${t.message}`), t;
38760
38766
  }
@@ -38785,7 +38791,7 @@ function j6(i) {
38785
38791
  }
38786
38792
  function J6(i, e = Nt) {
38787
38793
  const t = `${i.url}`, n = { method: i.method, body: i.payload };
38788
- return Ss(t, n, sr, e);
38794
+ return bs(t, n, sr, e);
38789
38795
  }
38790
38796
  function K6(i, e, t = Nt) {
38791
38797
  return Y6(i, e.url, { method: e.method, body: e.payload }, sr, t);
@@ -38801,7 +38807,7 @@ function Y6(i, e, t, n, r = Nt) {
38801
38807
  }, r);
38802
38808
  }
38803
38809
  async function X6(i, e = Nt) {
38804
- return { token: await Ss(i, { method: "GET", credentials: "include" }, j6, e) };
38810
+ return { token: await bs(i, { method: "GET", credentials: "include" }, j6, e) };
38805
38811
  }
38806
38812
  class Z6 extends Uc {
38807
38813
  constructor(e) {
@@ -38817,7 +38823,7 @@ class Z6 extends Uc {
38817
38823
  r = void 0, n.dispose();
38818
38824
  };
38819
38825
  t.add(() => {
38820
- r !== void 0 && (r.cancel(), r = void 0, n.dispose(), a(vs));
38826
+ r !== void 0 && (r.cancel(), r = void 0, n.dispose(), a(ys));
38821
38827
  });
38822
38828
  function d(h, g = "DVID authorization required.", v = "Request authorization.") {
38823
38829
  n.setText(g + " ");
@@ -39597,7 +39603,7 @@ class Mq extends Uc {
39597
39603
  s = void 0, r.dispose();
39598
39604
  };
39599
39605
  n.add(() => {
39600
- s !== void 0 && (s.cancel(), s = void 0, r.dispose(), l(vs));
39606
+ s !== void 0 && (s.cancel(), s = void 0, r.dispose(), l(ys));
39601
39607
  });
39602
39608
  const u = (v = "Authorization required.", y = "Request authorization.") => {
39603
39609
  if (r.setText(v + " "), this.retry) {
@@ -39625,7 +39631,7 @@ class Mq extends Uc {
39625
39631
  return _q(window);
39626
39632
  {
39627
39633
  const n = new Headers();
39628
- return Ss(e, { method: "GET", headers: n }, Tk, t).catch(() => Ss(e, { method: "GET" }, Tk, t));
39634
+ return bs(e, { method: "GET", headers: n }, Tk, t).catch(() => bs(e, { method: "GET" }, Tk, t));
39629
39635
  }
39630
39636
  } else return xt.resolve("");
39631
39637
  }
@@ -41081,7 +41087,7 @@ function q5(i, e = Nt) {
41081
41087
  });
41082
41088
  });
41083
41089
  if (s.finished.add(e.add(() => {
41084
- s.finished.dispatch(void 0, vs);
41090
+ s.finished.dispatch(void 0, ys);
41085
41091
  })), i.immediate)
41086
41092
  n.relayReadyPromise.then(() => {
41087
41093
  if (e.isCanceled)
@@ -41112,7 +41118,7 @@ class j5 extends Uc {
41112
41118
  s = void 0, r.dispose();
41113
41119
  };
41114
41120
  t.add(() => {
41115
- s !== void 0 && (s.cancel(), s = void 0, r.dispose(), l(vs));
41121
+ s !== void 0 && (s.cancel(), s = void 0, r.dispose(), l(ys));
41116
41122
  });
41117
41123
  function u(g = `${n.description} authorization required.`, v = "Request authorization.") {
41118
41124
  r.setText(g + " ");
@@ -41836,9 +41842,9 @@ function Sj(i) {
41836
41842
  });
41837
41843
  return { id: l, description: d, type: u, values: h };
41838
41844
  }));
41839
- return eW({ ids: t, properties: r });
41845
+ return e4({ ids: t, properties: r });
41840
41846
  }
41841
- It(Pt()(J4), X2);
41847
+ It(Pt()(JW), X2);
41842
41848
  function Vh(i, e, t, n) {
41843
41849
  try {
41844
41850
  const r = Y(t, "@type", Le);
@@ -42085,7 +42091,7 @@ async function rR(i, e, t, n) {
42085
42091
  if (s.indexOf(void 0) === -1)
42086
42092
  return s.reverse(), H({}, ...s);
42087
42093
  }
42088
- function ls(i, e) {
42094
+ function cs(i, e) {
42089
42095
  if (i !== -1 && e !== i)
42090
42096
  throw new Error(`Rank mismatch, received ${e} but expected ${i}`);
42091
42097
  return e;
@@ -42099,7 +42105,7 @@ function aR(i) {
42099
42105
  let t = -1;
42100
42106
  return { all: We(e, (r) => {
42101
42107
  const s = sR(r);
42102
- return t = ls(t, s.length), s;
42108
+ return t = cs(t, s.length), s;
42103
42109
  }), single: void 0, rank: t };
42104
42110
  }
42105
42111
  function Rj(i) {
@@ -42121,30 +42127,30 @@ function Mj(i, e) {
42121
42127
  ge(e);
42122
42128
  let t = -1, n = ye(e, "resolution", (v) => {
42123
42129
  const y = Float64Array.from(We(v, Sn));
42124
- return t = ls(t, y.length), y;
42130
+ return t = cs(t, y.length), y;
42125
42131
  }), r = ye(e, "axes", (v) => {
42126
42132
  const y = We(v, Le);
42127
- return t = ls(t, y.length), y;
42133
+ return t = cs(t, y.length), y;
42128
42134
  }), s = ye(e, "units", (v) => {
42129
42135
  const y = We(v, MC);
42130
- return t = ls(t, y.length), y;
42136
+ return t = cs(t, y.length), y;
42131
42137
  }), a = { unit: "m", exponent: -9 }, l, d;
42132
42138
  ye(e, "downsamplingFactors", (v) => {
42133
42139
  var y = Rj(v);
42134
42140
  const C = y.single, w = y.all, b = y.rank;
42135
- t = ls(t, b), C !== void 0 && (l = C), w !== void 0 && (d = w);
42141
+ t = cs(t, b), C !== void 0 && (l = C), w !== void 0 && (d = w);
42136
42142
  }), ye(e, "pixelResolution", (v) => {
42137
42143
  a = Y(v, "unit", MC), ye(v, "dimensions", (y) => {
42138
- n = Float64Array.from(We(y, Sn)), t = ls(t, n.length);
42144
+ n = Float64Array.from(We(y, Sn)), t = cs(t, n.length);
42139
42145
  });
42140
42146
  }), ye(e, "scales", (v) => {
42141
42147
  var y = aR(v);
42142
42148
  const C = y.all, w = y.rank;
42143
- t = ls(t, w), d = C;
42149
+ t = cs(t, w), d = C;
42144
42150
  });
42145
42151
  const u = ye(e, "dimensions", (v) => {
42146
42152
  const y = We(v, on);
42147
- return t = ls(t, y.length), y;
42153
+ return t = cs(t, y.length), y;
42148
42154
  });
42149
42155
  if (t === -1)
42150
42156
  throw new Error("Unable to determine rank of dataset");
@@ -42608,7 +42614,7 @@ class e8 extends zo {
42608
42614
  throw new Error("Invalid UI control specification");
42609
42615
  Ar(a), a.addFragmentCode(`
42610
42616
  #define VOLUME_RENDERING true
42611
- `), l(a), a.addUniform("highp float", "uNearLimitFraction"), a.addUniform("highp float", "uFarLimitFraction"), a.addUniform("highp int", "uMaxSteps"), a.addUniform("highp vec3", "uTranslation"), a.addUniform("highp mat4", "uModelViewProjectionMatrix"), a.addUniform("highp mat4", "uInvModelViewProjectionMatrix"), a.addUniform("highp vec3", "uChunkDataSize"), a.addUniform("highp vec3", "uLowerClipBound"), a.addUniform("highp vec3", "uUpperClipBound"), a.addUniform("highp float", "uBrightnessFactor"), a.addVarying("highp vec4", "vNormalizedPosition"), a.addVertexCode(FW), a.setVertexMain(`
42617
+ `), l(a), a.addUniform("highp float", "uNearLimitFraction"), a.addUniform("highp float", "uFarLimitFraction"), a.addUniform("highp int", "uMaxSteps"), a.addUniform("highp vec3", "uTranslation"), a.addUniform("highp mat4", "uModelViewProjectionMatrix"), a.addUniform("highp mat4", "uInvModelViewProjectionMatrix"), a.addUniform("highp vec3", "uChunkDataSize"), a.addUniform("highp vec3", "uLowerClipBound"), a.addUniform("highp vec3", "uUpperClipBound"), a.addUniform("highp float", "uBrightnessFactor"), a.addVarying("highp vec4", "vNormalizedPosition"), a.addVertexCode(F4), a.setVertexMain(`
42612
42618
  vec3 boxVertex = getBoxFaceVertexPosition(gl_VertexID);
42613
42619
  vec3 position = max(uLowerClipBound, min(uUpperClipBound, uTranslation + boxVertex * uChunkDataSize));
42614
42620
  vNormalizedPosition = gl_Position = uModelViewProjectionMatrix * vec4(position, 1.0);
@@ -42746,7 +42752,7 @@ void main() {
42746
42752
  const $ = en(Zj, C.viewProjectionMat, O.transform);
42747
42753
  h.uniformMatrix4fv(a.uniform("uModelViewProjectionMatrix"), !1, $);
42748
42754
  const B = Qj;
42749
- ru(B, $), gs($, $), h.uniformMatrix4fv(a.uniform("uInvModelViewProjectionMatrix"), !1, $);
42755
+ ru(B, $), ms($, $), h.uniformMatrix4fv(a.uniform("uInvModelViewProjectionMatrix"), !1, $);
42750
42756
  var le = Xj(B, I.lowerClipDisplayBound, I.upperClipDisplayBound);
42751
42757
  const ne = le.near, Ee = le.far, se = le.adjustedNear, we = le.adjustedFar, he = (we - se) / (Fv - 1) / (Ee - ne);
42752
42758
  h.uniform1f(a.uniform("uBrightnessFactor"), he);
@@ -42772,7 +42778,7 @@ void main() {
42772
42778
  const B = F[$];
42773
42779
  R[$] = B === -1 || B >= P ? 0 : M[$] * V[B];
42774
42780
  }
42775
- l?.bindChunk(h, a, A, q, F, U, y), y = !1, h.uniform3fv(a.uniform("uTranslation"), R), UW(h, 1, 1), ++b;
42781
+ l?.bindChunk(h, a, A, q, F, U, y), y = !1, h.uniform3fv(a.uniform("uTranslation"), R), U4(h, 1, 1), ++b;
42776
42782
  } else
42777
42783
  ++E;
42778
42784
  }), h.disable(WebGL2RenderingContext.CULL_FACE), v(), this.vertexIdHelper.disable();
@@ -43023,10 +43029,10 @@ const hR = [H({ label: "Resolution (slice)", toolJson: $v }, Bu((i) => ({
43023
43029
  }))), H({ label: "Blending", toolJson: zv }, s2((i) => i.blendMode)), H({ label: "Volume rendering (experimental)", toolJson: Gv }, ql((i) => i.volumeRendering)), H({ label: "Resolution (3d)", toolJson: r8, isValid: (i) => i.volumeRendering }, Bu((i) => ({
43024
43030
  histogram: i.volumeRenderingRenderScaleHistogram,
43025
43031
  target: i.volumeRenderingRenderScaleTarget
43026
- }))), H({ label: "Opacity", toolJson: Uv }, ds((i) => ({ value: i.opacity })))];
43032
+ }))), H({ label: "Opacity", toolJson: Uv }, us((i) => ({ value: i.opacity })))];
43027
43033
  for (const i of hR)
43028
43034
  QP(fa, i);
43029
- class a8 extends Br {
43035
+ class a8 extends Fr {
43030
43036
  constructor(e) {
43031
43037
  super(), this.layer = e, this.codeWidget = this.registerDisposer(uR(this.layer));
43032
43038
  const t = this.element;
@@ -43095,7 +43101,7 @@ function pJ(i, e) {
43095
43101
  const t = te.parseString(i), n = e ? ws[e] : Cs;
43096
43102
  if (n) {
43097
43103
  for (const r of n.layerManager.managedLayers)
43098
- if (r.layer instanceof Jt) {
43104
+ if (r.layer instanceof zt) {
43099
43105
  const { displayState: s } = r.layer, a = qD(s, t);
43100
43106
  if (s.segmentSelectionState.isSelected(t))
43101
43107
  for (let d = 0; d < 3; d += 1)
@@ -43123,7 +43129,7 @@ function Wv(i, e) {
43123
43129
  }
43124
43130
  function fR(i, e) {
43125
43131
  const t = Wv(i, e);
43126
- if (t && t.layer instanceof bs)
43132
+ if (t && t.layer instanceof Mr)
43127
43133
  return t.layer;
43128
43134
  }
43129
43135
  function mJ(i, e) {
@@ -43274,20 +43280,18 @@ class g8 extends Hb.Component {
43274
43280
  Qn(this, "applyColorsAndVisibility", (t) => {
43275
43281
  if (!this.viewer)
43276
43282
  return;
43277
- const n = { ...t || {} };
43278
- for (const l of Object.keys(n))
43279
- this.allKnownIds.add(l);
43280
- if (this.allKnownIds.size === 0) {
43281
- const l = this.props.viewerState?.layers?.[0]?.segmentColors || {};
43282
- for (const d of Object.keys(l))
43283
- this.allKnownIds.add(d);
43284
- }
43285
- const r = {};
43286
- for (const l of this.allKnownIds)
43287
- r[l] = n[l] || c8;
43288
- const a = (this.props.viewerState?.layers ?? (this.viewer.state.toJSON().layers || [])).map((l, d) => d === 0 || l?.type === "segmentation" ? { ...l, segmentColors: r } : l);
43283
+ const r = (this.props.viewerState?.layers ?? (this.viewer.state.toJSON().layers || [])).map((s) => {
43284
+ const a = Object.keys(t).find((u) => s.name?.includes(u)), l = { ...t[a]?.colors || {} };
43285
+ this.allKnownIdsByLayer || (this.allKnownIdsByLayer = {}), this.allKnownIdsByLayer[a] || (this.allKnownIdsByLayer[a] = /* @__PURE__ */ new Set());
43286
+ for (const u of Object.keys(l))
43287
+ this.allKnownIdsByLayer[a].add(u);
43288
+ const d = {};
43289
+ for (const u of this.allKnownIdsByLayer[a] || [])
43290
+ d[u] = l[u] || c8;
43291
+ return s.type === "segmentation" ? { ...s, segmentColors: d } : s;
43292
+ });
43289
43293
  this.withoutEmitting(() => {
43290
- this.viewer.state.restoreState({ layers: a });
43294
+ this.viewer.state.restoreState({ layers: r });
43291
43295
  });
43292
43296
  });
43293
43297
  Qn(this, "updateEventBindings", (t) => {
@@ -43319,7 +43323,7 @@ class g8 extends Hb.Component {
43319
43323
  if (t || n) {
43320
43324
  this.handlerRemovers = [];
43321
43325
  for (const r of this.viewer.layerManager.managedLayers)
43322
- if (r.layer instanceof Jt) {
43326
+ if (r.layer instanceof zt) {
43323
43327
  const { segmentSelectionState: s } = r.layer.displayState, { visibleSegments: a } = r.layer.displayState.segmentationGroupState.value;
43324
43328
  if (s && t) {
43325
43329
  const l = this.selectedChanged.bind(void 0, r), d = s.changed.add(l);
@@ -43355,7 +43359,7 @@ class g8 extends Hb.Component {
43355
43359
  }
43356
43360
  }
43357
43361
  });
43358
- this.ngContainer = Hb.createRef(), this.viewer = null, this.muteViewerChanged = !1, this.prevVisibleIds = /* @__PURE__ */ new Set(), this.prevColorMap = null, this.disposers = [], this.prevColorOverrides = /* @__PURE__ */ new Set(), this.overrideColorsById = /* @__PURE__ */ Object.create(null), this.allKnownIds = /* @__PURE__ */ new Set();
43362
+ this.ngContainer = Hb.createRef(), this.viewer = null, this.muteViewerChanged = !1, this.prevVisibleIds = /* @__PURE__ */ new Set(), this.prevColorMap = null, this.disposers = [], this.prevColorOverrides = /* @__PURE__ */ new Set(), this.overrideColorsById = /* @__PURE__ */ Object.create(null), this.allKnownIdsByLayer = {};
43359
43363
  }
43360
43364
  componentDidMount() {
43361
43365
  const {
@@ -43376,19 +43380,49 @@ class g8 extends Hb.Component {
43376
43380
  this.disposers.push(this.viewer.projectionScale.changed.add(d)), this.disposers.push(this.viewer.projectionOrientation.changed.add(d)), this.disposers.push(this.viewer.position.changed.add(d)), t && this.withoutEmitting(() => {
43377
43381
  this.viewer.state.restoreState(t);
43378
43382
  }), a ? ws[a] = this.viewer : Cs = this.viewer;
43383
+ const { visibleChunksChanged: u } = this.viewer.chunkQueueManager;
43384
+ let h = !1;
43385
+ this.disposers.push(u.add(() => {
43386
+ if (!h) {
43387
+ for (const g of this.viewer.layerManager.managedLayers)
43388
+ if (g.layer instanceof zt && g.layer.renderLayers?.some((y) => {
43389
+ const { numVisibleChunksAvailable: C, numVisibleChunksNeeded: w } = y.layerChunkProgressInfo || {};
43390
+ return !w || !C ? !1 : C / w > 0.25;
43391
+ })) {
43392
+ h = !0, requestAnimationFrame(() => {
43393
+ requestAnimationFrame(() => {
43394
+ this.props.onLayerLoadingChange?.(!0);
43395
+ });
43396
+ });
43397
+ return;
43398
+ }
43399
+ }
43400
+ })), this.disposers.push(() => {
43401
+ h = !1;
43402
+ });
43379
43403
  }
43380
43404
  componentDidUpdate(t, n) {
43381
43405
  const { viewerState: r, cellColorMapping: s } = this.props, a = {};
43382
43406
  for (const I of this.viewer.layerManager.managedLayers)
43383
- if (I.layer instanceof Jt) {
43407
+ if (I.layer instanceof zt) {
43384
43408
  const { segmentSelectionState: L } = I.layer.displayState;
43385
43409
  a[I.name] = L.selectedSegment;
43386
43410
  }
43387
- for (const I of this.viewer.layerManager.managedLayers)
43388
- if (I.layer instanceof Jt) {
43411
+ for (const I of this.viewer.layerManager.managedLayers) {
43412
+ if (I.layer instanceof zt) {
43389
43413
  const { segmentSelectionState: L } = I.layer.displayState;
43390
43414
  L.set(a[I.name]);
43415
+ const A = Object.keys(s).find((M) => I.name?.includes(M));
43416
+ if (A) {
43417
+ const M = s[A]?.opacity ?? 1;
43418
+ I.layer.displayState.objectAlpha.value = M;
43419
+ }
43391
43420
  }
43421
+ if (I.layer instanceof Mr) {
43422
+ const L = (r?.layers || []).find((A) => A.name === I.name);
43423
+ L?.shader && I.layer.annotationDisplayState.shader.value_ !== L.shader && (I.layer.annotationDisplayState.shader.value = L.shader);
43424
+ }
43425
+ }
43392
43426
  if (!r)
43393
43427
  return;
43394
43428
  const l = t.viewerState, d = B_(l, r);
@@ -43400,15 +43434,15 @@ class g8 extends Hb.Component {
43400
43434
  const I = Array.isArray(r.layers) ? r.layers : [];
43401
43435
  this.viewer.state.restoreState({ layers: I }), s && Object.keys(s).length && this.applyColorsAndVisibility(s);
43402
43436
  });
43403
- const u = t.cellColorMapping ? Object.keys(t.cellColorMapping).length : 0, h = s ? Object.keys(s).length : 0, g = t.cellColorMapping !== s;
43437
+ const u = t.cellColorMapping ? Object.values(t.cellColorMapping).reduce((I, L) => I + Object.keys(L?.colors || {}).length, 0) : 0, h = s ? Object.values(s).reduce((I, L) => I + Object.keys(L?.colors || {}).length, 0) : 0, g = t.cellColorMapping !== this.props.cellColorMapping;
43404
43438
  !this.didLayersChange(l, r) && (g || u !== h) && this.withoutEmitting(() => {
43405
43439
  this.applyColorsAndVisibility(s);
43406
43440
  });
43407
43441
  const v = (I) => (I || []).map((L) => {
43408
43442
  if (!L)
43409
43443
  return L;
43410
- const { segments: A, segmentColors: M, ...O } = L;
43411
- return O;
43444
+ const { segments: A, segmentColors: M, objectAlpha: O, ...F } = L;
43445
+ return F;
43412
43446
  }), y = t.viewerState?.layers, C = r?.layers, w = JSON.stringify(v(y)), b = JSON.stringify(v(C)), E = w !== b, T = y && y[0] && Array.isArray(y[0].segments) ? y[0].segments.length : 0, P = C && C[0] && Array.isArray(C[0].segments) ? C[0].segments.length : 0, R = T === 0 && P > 0;
43413
43447
  (E || R) && this.withoutEmitting(() => {
43414
43448
  this.viewer.state.restoreState({ layers: C });
@@ -43455,6 +43489,7 @@ Qn(g8, "defaultProps", {
43455
43489
  onVisibleChanged: null,
43456
43490
  onSelectionDetailsStateChanged: null,
43457
43491
  onViewerStateChanged: null,
43492
+ onLayerLoadingChange: null,
43458
43493
  key: null,
43459
43494
  callbacks: [],
43460
43495
  ngServer: "https://neuroglancer-demo.appspot.com/"