vitessce 3.9.6 → 3.9.8

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