mxcad 1.0.6 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/mxcad.es.js CHANGED
@@ -1,25 +1,25 @@
1
- import { MxFun as S, MrxDbgUiPrPoint as ue, store as Ve, MxPaintBrush as q, MrxDbgUiPrBaseReturn as R, MxDbCircleShape as vt, MxDbLine as ke, MxDbPolyline as Ht, MxDbRegularPolygon as Nt, MxDbCircleArc as De, Mx3PointArc as zt, MxDbEllipseShape as Gt } from "mxdraw";
2
- async function Xt(i, o) {
1
+ import { MxFun as I, MrxDbgUiPrPoint as ae, store as He, MxPaintBrush as U, MrxDbgUiPrBaseReturn as T, MxDbCircleShape as vt, MxDbLine as We, MxDbPolyline as zt, MxDbRegularPolygon as Gt, MxDbCircleArc as Fe, Mx3PointArc as Xt, MxDbEllipseShape as $t } from "mxdraw";
2
+ async function Yt(i, o) {
3
3
  const f = await (await fetch(i)).arrayBuffer();
4
4
  return await WebAssembly.instantiate(f, o);
5
5
  }
6
- function Pt(i) {
6
+ function xt(i) {
7
7
  return btoa(unescape(encodeURIComponent(i)));
8
8
  }
9
- function xt(i) {
9
+ function Mt(i) {
10
10
  return decodeURIComponent(escape(atob(i)));
11
11
  }
12
- function Mt(i) {
12
+ function Ct(i) {
13
13
  let o = JSON.stringify(i);
14
- S.callCommand("MxCAD_SetEntityData", o);
14
+ I.callCommand("MxCAD_SetEntityData", o);
15
15
  }
16
- const He = {
17
- b64Encode: Pt,
18
- b64Decode: xt,
19
- setMcDbEntity: Mt
16
+ const Ne = {
17
+ b64Encode: xt,
18
+ b64Decode: Mt,
19
+ setMcDbEntity: Ct
20
20
  };
21
- async function $t() {
22
- const i = new ue();
21
+ async function Zt() {
22
+ const i = new ae();
23
23
  i.setMessage(`
24
24
  \u6307\u5B9A\u63D2\u5165\u4F4D\u7F6E:`);
25
25
  let o = await i.go();
@@ -28,17 +28,17 @@ async function $t() {
28
28
  let r = "\u6D4B\u8BD5";
29
29
  if (r.length <= 0)
30
30
  return;
31
- let f = S.screenCoordLong2Doc(50);
32
- r = He.b64Encode(r);
31
+ let f = I.screenCoordLong2Doc(50);
32
+ r = Ne.b64Encode(r);
33
33
  const l = {
34
34
  postx: o.x,
35
35
  posty: o.y,
36
36
  text: r,
37
37
  height: f
38
38
  };
39
- S.call("Mx_Text", l);
39
+ I.call("Mx_Text", l);
40
40
  }
41
- class Yt extends vt {
41
+ class Jt extends vt {
42
42
  getGripPoints() {
43
43
  const { x: o, y: r, z: f } = this.center;
44
44
  let l = new THREE.Vector3(o, r + this.radius, f), A = new THREE.Vector3(o, r - this.radius, f), p = new THREE.Vector3(o - this.radius, r, f), h = new THREE.Vector3(o + this.radius, r, f);
@@ -49,14 +49,14 @@ class Yt extends vt {
49
49
  return o === 0 && (this.center = f.add(r)), o === 1 && (this.radius = l.add(r).distanceTo(this.center)), o === 2 && (this.radius = A.add(r).distanceTo(this.center)), o === 3 && (this.radius = p.add(r).distanceTo(this.center)), o === 4 && (this.radius = h.add(r).distanceTo(this.center)), !0;
50
50
  }
51
51
  }
52
- const _t = (i) => {
53
- const [o, r, f] = i, { x: l, y: A, z: p } = o, { x: h, y: w, z: E } = r, { x, y: D, z: T } = f, _ = A * E - w * p - A * T + D * p + w * T - D * E, M = -(l * E - h * p - l * T + x * p + h * T - x * E), W = l * w - h * A - l * D + x * A + h * D - x * w, v = -(l * w * T - l * D * E - h * A * T + h * D * p + x * A * E - x * w * p), P = 2 * (h - l), I = 2 * (w - A), O = 2 * (E - p), U = l * l + A * A + p * p - h * h - w * w - E * E, N = 2 * (x - l), z = 2 * (D - A), G = 2 * (T - p), V = l * l + A * A + p * p - x * x - D * D - T * T, pe = -(M * O * V - M * G * U - I * W * V + I * G * v + z * W * U - z * O * v) / (_ * I * G - _ * z * O - P * M * G + P * z * W + N * M * O - N * I * W), ye = (_ * O * V - _ * G * U - P * W * V + P * G * v + N * W * U - N * O * v) / (_ * I * G - _ * z * O - P * M * G + P * z * W + N * M * O - N * I * W), j = -(_ * I * V - _ * z * U - P * M * V + P * z * v + N * M * U - N * I * v) / (_ * I * G - _ * z * O - P * M * G + P * z * W + N * M * O - N * I * W);
54
- return new THREE.Vector3(pe, ye, j);
52
+ const mt = (i) => {
53
+ const [o, r, f] = i, { x: l, y: A, z: p } = o, { x: h, y: w, z: E } = r, { x, y: D, z: W } = f, _ = A * E - w * p - A * W + D * p + w * W - D * E, M = -(l * E - h * p - l * W + x * p + h * W - x * E), R = l * w - h * A - l * D + x * A + h * D - x * w, P = -(l * w * W - l * D * E - h * A * W + h * D * p + x * A * E - x * w * p), v = 2 * (h - l), L = 2 * (w - A), j = 2 * (E - p), q = l * l + A * A + p * p - h * h - w * w - E * E, N = 2 * (x - l), z = 2 * (D - A), G = 2 * (W - p), V = l * l + A * A + p * p - x * x - D * D - W * W, ye = -(M * j * V - M * G * q - L * R * V + L * G * P + z * R * q - z * j * P) / (_ * L * G - _ * z * j - v * M * G + v * z * R + N * M * j - N * L * R), he = (_ * j * V - _ * G * q - v * R * V + v * G * P + N * R * q - N * j * P) / (_ * L * G - _ * z * j - v * M * G + v * z * R + N * M * j - N * L * R), K = -(_ * L * V - _ * z * q - v * M * V + v * z * P + N * M * q - N * L * P) / (_ * L * G - _ * z * j - v * M * G + v * z * R + N * M * j - N * L * R);
54
+ return new THREE.Vector3(ye, he, K);
55
55
  };
56
- function Ct() {
57
- const i = new ue();
58
- let o = new Yt();
59
- q.use(o), o.closed = !1;
56
+ function Bt() {
57
+ const i = new ae();
58
+ let o = new Jt();
59
+ U.use(o), o.closed = !1;
60
60
  let r = 0, f = "default", l = !0;
61
61
  const A = () => {
62
62
  i.setUserDraw(
@@ -66,35 +66,35 @@ function Ct() {
66
66
  );
67
67
  }, p = (_) => {
68
68
  if (f === "default") {
69
- if (_ === R.kOk) {
69
+ if (_ === T.kOk) {
70
70
  if (r === 0)
71
71
  i.setMessage(`
72
72
  \u6307\u5B9A\u5706\u7684\u534A\u5F84:`), i.setKeyWords("[\u76F4\u5F84(D)]"), o.center = i.value(), A();
73
73
  else if (r === 1)
74
- return S.getCurrentDraw().addMxEntity(o), !0;
74
+ return I.getCurrentDraw().addMxEntity(o), !0;
75
75
  r++;
76
76
  }
77
- _ === R.kKeyWord && i.isKeyWordPicked("D") && (l = !1, A(), i.setMessage(`
77
+ _ === T.kKeyWord && i.isKeyWordPicked("D") && (l = !1, A(), i.setMessage(`
78
78
  \u6307\u5B9A\u5706\u7684\u76F4\u5F84:`), i.setKeyWords(""));
79
79
  }
80
80
  };
81
81
  let h = [];
82
82
  const w = (_) => {
83
83
  if (f === "3P" && (i.setMessage(`
84
- \u6307\u5B9A\u5706\u4E0A\u7684\u7B2C\u4E00\u4E2A\u70B9:`), _ === R.kOk)) {
85
- if (r === 0 && (h.push(i.value()), i.setUserDraw((M, W) => {
86
- W.drawLine(h[0], M);
84
+ \u6307\u5B9A\u5706\u4E0A\u7684\u7B2C\u4E00\u4E2A\u70B9:`), _ === T.kOk)) {
85
+ if (r === 0 && (h.push(i.value()), i.setUserDraw((M, R) => {
86
+ R.drawLine(h[0], M);
87
87
  }), i.setMessage(`
88
- \u6307\u5B9A\u5706\u4E0A\u7684\u7B2C\u4E8C\u4E2A\u70B9:`)), r === 1 && (h.push(i.value()), i.setUserDraw((M, W) => {
89
- const [v, P] = h, I = M;
90
- o.center = _t([
91
- v,
88
+ \u6307\u5B9A\u5706\u4E0A\u7684\u7B2C\u4E8C\u4E2A\u70B9:`)), r === 1 && (h.push(i.value()), i.setUserDraw((M, R) => {
89
+ const [P, v] = h, L = M;
90
+ o.center = mt([
92
91
  P,
93
- I
94
- ]), o.radius = o.center.distanceTo(v), W.drawCustomEntity(o);
92
+ v,
93
+ L
94
+ ]), o.radius = o.center.distanceTo(P), R.drawCustomEntity(o);
95
95
  }), i.setMessage(`
96
96
  \u6307\u5B9A\u5706\u4E0A\u7684\u7B2C\u4E09\u4E2A\u70B9:`)), r === 2)
97
- return h.push(i.value()), o.center = _t(h), o.radius = o.center.distanceTo(h[0]), S.getCurrentDraw().addMxEntity(o), !0;
97
+ return h.push(i.value()), o.center = mt(h), o.radius = o.center.distanceTo(h[0]), I.getCurrentDraw().addMxEntity(o), !0;
98
98
  r++;
99
99
  }
100
100
  };
@@ -103,21 +103,21 @@ function Ct() {
103
103
  new THREE.Line3(_, M).getCenter(o.center), o.radius = M.distanceTo(_) / 2;
104
104
  }, D = (_) => {
105
105
  if (f === "2P" && (i.setMessage(`
106
- \u6307\u5B9A\u5706\u76F4\u5F84\u7684\u7B2C\u4E00\u4E2A\u7AEF\u70B9:`), _ === R.kOk)) {
107
- if (r === 0 && (E = i.value(), i.setUserDraw((M, W) => {
108
- x(E, M), W.drawCustomEntity(o), W.drawLine(E, M);
106
+ \u6307\u5B9A\u5706\u76F4\u5F84\u7684\u7B2C\u4E00\u4E2A\u7AEF\u70B9:`), _ === T.kOk)) {
107
+ if (r === 0 && (E = i.value(), i.setUserDraw((M, R) => {
108
+ x(E, M), R.drawCustomEntity(o), R.drawLine(E, M);
109
109
  }), i.setMessage(`
110
110
  \u6307\u5B9A\u5706\u76F4\u5F84\u7684\u7B2C\u4E8C\u4E2A\u7AEF\u70B9:`)), r === 1)
111
- return x(E, i.value()), S.getCurrentDraw().addMxEntity(o), !0;
111
+ return x(E, i.value()), I.getCurrentDraw().addMxEntity(o), !0;
112
112
  r++;
113
113
  }
114
- }, T = (_) => {
114
+ }, W = (_) => {
115
115
  if (f === "T") {
116
116
  if (i.setMessage(`
117
- \u6307\u5B9A\u5BF9\u8C61\u4E0E\u5706\u7684\u7B2C\u4E00\u4E2A\u5207\u70B9:`), _ === R.kOk) {
117
+ \u6307\u5B9A\u5BF9\u8C61\u4E0E\u5706\u7684\u7B2C\u4E00\u4E2A\u5207\u70B9:`), _ === T.kOk) {
118
118
  if (r === 0) {
119
119
  const M = i.value();
120
- console.log(M), S.getCurrentDraw();
120
+ console.log(M), I.getCurrentDraw();
121
121
  }
122
122
  r++;
123
123
  }
@@ -129,32 +129,32 @@ function Ct() {
129
129
  \u6307\u5B9A\u5706\u7684\u5706\u5FC3\u6216[\u4E09\u70B9(3P)/\u4E24\u70B9(2P)/\u5207\u70B9\u3001\u5207\u70B9\u3001\u534A\u5F84(T)]:`
130
130
  ), i.setKeyWords("3P 2P T"), i.goWhile(
131
131
  (_) => {
132
- if (_ === R.kKeyWord && (i.isKeyWordPicked("3P") ? f = "3P" : i.isKeyWordPicked("2P") ? f = "2P" : i.isKeyWordPicked("T") && (f = "T")), p(_))
132
+ if (_ === T.kKeyWord && (i.isKeyWordPicked("3P") ? f = "3P" : i.isKeyWordPicked("2P") ? f = "2P" : i.isKeyWordPicked("T") && (f = "T")), p(_))
133
133
  return { exit: !0 };
134
134
  if (w(_))
135
135
  return { exit: !0 };
136
136
  if (D(_))
137
137
  return { exit: !0 };
138
- if (T(_))
138
+ if (W(_))
139
139
  return { exit: !0 };
140
140
  },
141
141
  (_) => {
142
- _ === R.kCancel && S.getCurrentDraw().addMxEntity(o);
142
+ _ === T.kCancel && I.getCurrentDraw().addMxEntity(o);
143
143
  }
144
144
  );
145
145
  }
146
- Ve.events.on("MxDbEntityRegister", () => {
147
- S.addCommand("Mx_Circle", Ct);
146
+ He.events.on("MxDbEntityRegister", () => {
147
+ I.addCommand("Mx_Circle", Bt);
148
148
  });
149
- const mt = () => Ve.state.MxFun.stopRunCommand();
149
+ const Pt = () => He.state.MxFun.stopRunCommand();
150
150
  function Oe(i, o, r, f) {
151
151
  const l = i - r, A = o - f;
152
152
  let p = 0;
153
153
  return l == 0 ? p = Math.PI / 2 : p = Math.atan(Math.abs(A / l)), l < 0 && A >= 0 ? p = Math.PI - p : l < 0 && A < 0 ? p = Math.PI + p : l >= 0 && A < 0 && (p = Math.PI * 2 - p), p;
154
154
  }
155
- async function Bt() {
156
- const i = new ue();
157
- let o = new ke(), r = [];
155
+ async function Dt() {
156
+ const i = new ae();
157
+ let o = new We(), r = [];
158
158
  i.setMessage(`
159
159
  \u6307\u5B9A\u7B2C\u4E00\u70B9:`);
160
160
  let f = await i.go();
@@ -169,28 +169,28 @@ async function Bt() {
169
169
  };
170
170
  l(), i.goWhile(
171
171
  (A) => {
172
- if (A === R.kOk && (o = new ke(), q.use(o), o.pt1 = f, o.pt2 = i.value(), f = o.pt2.clone(), r.push(o), l()), A === R.kKeyWord) {
172
+ if (A === T.kOk && (o = new We(), U.use(o), o.pt1 = f, o.pt2 = i.value(), f = o.pt2.clone(), r.push(o), l()), A === T.kKeyWord) {
173
173
  if (i.isKeyWordPicked("E"))
174
- mt();
174
+ Pt();
175
175
  else if (i.isKeyWordPicked("C")) {
176
- const p = new ke();
177
- return p.pt1 = f.clone(), p.pt2 = r[0].pt1.clone(), q.use(p), r.push(p), f = p.pt2.clone(), mt(), { exit: !0 };
176
+ const p = new We();
177
+ return p.pt1 = f.clone(), p.pt2 = r[0].pt1.clone(), U.use(p), r.push(p), f = p.pt2.clone(), Pt(), { exit: !0 };
178
178
  }
179
179
  }
180
180
  },
181
181
  (A) => {
182
- if (A === R.kCancel)
182
+ if (A === T.kCancel)
183
183
  return r.forEach((p) => {
184
- S.getCurrentDraw().addMxEntity(p);
184
+ I.getCurrentDraw().addMxEntity(p);
185
185
  }), { exit: !0 };
186
186
  }
187
187
  );
188
188
  }
189
- Ve.events.on("MxDbEntityRegister", () => {
190
- S.addCommand("Mx_Line", Bt);
189
+ He.events.on("MxDbEntityRegister", () => {
190
+ I.addCommand("Mx_Line", Dt);
191
191
  });
192
- async function Zt() {
193
- const i = new ue();
192
+ async function Qt() {
193
+ const i = new ae();
194
194
  i.setMessage(`
195
195
  \u6307\u5B9A\u63D2\u5165\u4F4D\u7F6E:`);
196
196
  let o = await i.go();
@@ -200,41 +200,41 @@ async function Zt() {
200
200
  \u6D4B\u8BD5`;
201
201
  if (r.length <= 0)
202
202
  return;
203
- let f = S.screenCoordLong2Doc(50);
204
- r = He.b64Encode(r);
203
+ let f = I.screenCoordLong2Doc(50);
204
+ r = Ne.b64Encode(r);
205
205
  const l = {
206
206
  postx: o.x,
207
207
  posty: o.y,
208
208
  text: r,
209
209
  height: f
210
210
  };
211
- S.call("Mx_MText", l);
211
+ I.call("Mx_MText", l);
212
212
  }
213
- async function Jt() {
214
- const i = new ue(), o = new Ht();
215
- q.use(o), i.setMessage(`
213
+ async function Ut() {
214
+ const i = new ae(), o = new zt();
215
+ U.use(o), i.setMessage(`
216
216
  \u6307\u5B9A\u8D77\u70B9:`);
217
217
  let r;
218
218
  i.setUserDraw((f, l) => {
219
219
  l.drawCustomEntity(o), r && l.drawLine(r, f);
220
220
  }), i.goWhile(
221
221
  (f) => {
222
- if (f === R.kOk) {
222
+ if (f === T.kOk) {
223
223
  const l = i.value();
224
224
  o.points.push(i.value()), r = l, i.setMessage(`
225
225
  \u6307\u5B9A\u4E0B\u4E00\u4E2A\u70B9:`), i.setKeyWords("[\u5706\u5F27(A)/\u5BBD\u5EA6(W)]");
226
226
  } else
227
- f === R.kKeyWord && (i.isKeyWordPicked("A"), i.isKeyWordPicked("W"));
227
+ f === T.kKeyWord && (i.isKeyWordPicked("A"), i.isKeyWordPicked("W"));
228
228
  },
229
229
  (f) => {
230
- f === R.kCancel && S.getCurrentDraw().addMxEntity(o);
230
+ f === T.kCancel && I.getCurrentDraw().addMxEntity(o);
231
231
  }
232
232
  );
233
233
  }
234
- async function Qt() {
235
- const i = new ue();
236
- let o = new Nt();
237
- q.use(o), i.setMessage(`
234
+ async function qt() {
235
+ const i = new ae();
236
+ let o = new Gt();
237
+ U.use(o), i.setMessage(`
238
238
  \u8F93\u5165\u8FB9\u7684\u6570\u76EE<5>:`);
239
239
  let r = 3, f = [r];
240
240
  for (; r < 25; )
@@ -242,7 +242,7 @@ async function Qt() {
242
242
  i.setKeyWords(f.join(" "));
243
243
  let l = 0;
244
244
  i.goWhile((A) => {
245
- if (A === R.kOk)
245
+ if (A === T.kOk)
246
246
  if (l === 1)
247
247
  o.centerPoint = i.value(), i.setMessage(`
248
248
  [\u5185\u63A5\u4E8E\u5706(I)/\u5916\u5207\u4E8E\u5706(C)]<\u5916\u5207>:`), i.setKeyWords("I C");
@@ -254,11 +254,11 @@ async function Qt() {
254
254
  return i.setMessage(`
255
255
  \u6307\u5B9A\u8FB9\u7684\u7B2C\u4E8C\u4E2A\u7AEF\u70B9:`), { exit: !0 };
256
256
  if (l === 4)
257
- return o.otherPoint = i.value(), S.getCurrentDraw().addMxEntity(o), { exit: !0 };
257
+ return o.otherPoint = i.value(), I.getCurrentDraw().addMxEntity(o), { exit: !0 };
258
258
  l === 5 && i.setMessage(`
259
259
  \u5916\u5207\u4E8E\u5706(C)\u65E0\u6CD5\u7ED8\u5236:`);
260
260
  }
261
- if (A === R.kKeyWord) {
261
+ if (A === T.kKeyWord) {
262
262
  const p = i.keyWordPicked(), h = Number(p);
263
263
  !Number.isNaN(h) && l === 0 && (o.sidesNumber = h, i.setMessage(`
264
264
  \u6307\u5B9A\u6B63\u591A\u8FB9\u5F62\u7684\u4E2D\u5FC3\u70B9\u6216 [\u8FB9(E)]:`), i.setKeyWords("E"), l++), l === 1 && (i.isKeyWordPicked("E") && (i.setMessage(`
@@ -270,21 +270,21 @@ async function Qt() {
270
270
  }
271
271
  });
272
272
  }
273
- function qt(i, o, r) {
274
- const f = i.x, l = o.x, A = r.x, p = i.y, h = o.y, w = r.y, E = f - l, x = p - h, D = f - A, T = p - w, _ = (f * f - l * l + (p * p - h * h)) / 2, M = (f * f - A * A + (p * p - w * w)) / 2, W = x * D - E * T, v = -(T * _ - x * M) / W, P = -(E * M - D * _) / W;
275
- return new THREE.Vector3(v, P, 0);
273
+ function en(i, o, r) {
274
+ const f = i.x, l = o.x, A = r.x, p = i.y, h = o.y, w = r.y, E = f - l, x = p - h, D = f - A, W = p - w, _ = (f * f - l * l + (p * p - h * h)) / 2, M = (f * f - A * A + (p * p - w * w)) / 2, R = x * D - E * W, P = -(W * _ - x * M) / R, v = -(E * M - D * _) / R;
275
+ return new THREE.Vector3(P, v, 0);
276
276
  }
277
- function Ut(i, o) {
277
+ function tn(i, o) {
278
278
  const r = i.x, f = i.y, l = o.x, A = o.y;
279
279
  return Math.sqrt((r - l) * (r - l) + (f - A) * (f - A));
280
280
  }
281
- function en(i, o, r) {
281
+ function nn(i, o, r) {
282
282
  let f;
283
283
  i < r ? f = r - i : f = r - i + 360;
284
284
  let l;
285
285
  return i < o ? l = o - i : l = o - i + 360, l > f;
286
286
  }
287
- function Ke(i, o, r) {
287
+ function Ve(i, o, r) {
288
288
  const f = i.x, l = o.x, A = i.y, p = o.y;
289
289
  let h, w, E;
290
290
  return h = (A - p) / r, w = (f - l) / r, w >= 0.99999 && (w = 0.99999), w <= -0.99999 && (w = -0.99999), E = Math.acos(w), E = E / Math.PI * 180, h < -0.05 && (E = 360 - E), {
@@ -296,13 +296,13 @@ function Ke(i, o, r) {
296
296
  const Q = (i, o, r) => {
297
297
  const f = () => {
298
298
  i.go((l) => {
299
- if (l === R.kKeyWord && r() && f(), l === R.kOk && o() && f(), l === R.kNone && f(), l === R.kCancel)
299
+ if (l === T.kKeyWord && r() && f(), l === T.kOk && o() && f(), l === T.kNone && f(), l === T.kCancel)
300
300
  return { exit: !0 };
301
301
  });
302
302
  };
303
303
  return f;
304
304
  };
305
- class Ne extends vt {
305
+ class ze extends vt {
306
306
  constructor() {
307
307
  super(), this._propertyDbKeys = [...this._propertyDbKeys, "bulge"];
308
308
  }
@@ -310,7 +310,7 @@ class Ne extends vt {
310
310
  return "MxDbCircle";
311
311
  }
312
312
  create() {
313
- return new Ne();
313
+ return new ze();
314
314
  }
315
315
  getArcBulge(o, r, f) {
316
316
  const l = o.distanceTo(r);
@@ -326,8 +326,8 @@ class Ne extends vt {
326
326
  E.x = p.x + r * Math.cos(h), E.y = p.y + r * Math.sin(h), x.x = p.x + r * Math.cos(w), x.y = p.y + r * Math.sin(w);
327
327
  const D = r;
328
328
  (A ? f < l : f > l) && (w += Math.PI * 2);
329
- const T = new THREE.Vector3();
330
- return T.x = p.x + D * Math.cos((h + w) / 2), T.y = p.y + D * Math.sin((h + w) / 2), [E, T, x, this.center];
329
+ const W = new THREE.Vector3();
330
+ return W.x = p.x + D * Math.cos((h + w) / 2), W.y = p.y + D * Math.sin((h + w) / 2), [E, W, x, this.center];
331
331
  }
332
332
  getGripPoints() {
333
333
  return this.getArcMidPoint(
@@ -347,34 +347,34 @@ class Ne extends vt {
347
347
  upDatePoints(o, r, f) {
348
348
  o[r].add(f);
349
349
  const [l, A, p] = o;
350
- this.center = qt(l, p, A), this.radius = Ut(A, this.center);
351
- const h = Ke(l, this.center, this.radius), w = Ke(p, this.center, this.radius), E = Ke(A, this.center, this.radius);
352
- this.clockwise = en(
350
+ this.center = en(l, p, A), this.radius = tn(A, this.center);
351
+ const h = Ve(l, this.center, this.radius), w = Ve(p, this.center, this.radius), E = Ve(A, this.center, this.radius);
352
+ this.clockwise = nn(
353
353
  w.angle,
354
354
  h.angle,
355
355
  E.angle
356
356
  ), this.startAngle = THREE.MathUtils.degToRad(h.angle), this.endAngle = THREE.MathUtils.degToRad(w.angle);
357
357
  }
358
358
  }
359
- async function tn() {
360
- const i = new ue();
359
+ async function rn() {
360
+ const i = new ae();
361
361
  i.setMessage(`
362
362
  \u6307\u5B9A\u5706\u5F27\u7684\u8D77\u70B9:`), i.setKeyWords("[\u5706\u5FC3(C)]");
363
- let o = new Ne();
364
- o.closed = !1, q.use(o);
363
+ let o = new ze();
364
+ o.closed = !1, U.use(o);
365
365
  let r, f, l;
366
366
  const A = Q(
367
367
  i,
368
368
  () => {
369
369
  r = i.value(), i.setMessage(`
370
- \u6307\u5B9A\u5706\u5F27\u7684\u7B2C\u4E8C\u4E2A\u70B9:`), i.setKeyWords("[\u5706\u5FC3(C)/\u7AEF\u70B9(E)]"), i.setUserDraw((v, P) => {
371
- P.drawLine(r, v);
370
+ \u6307\u5B9A\u5706\u5F27\u7684\u7B2C\u4E8C\u4E2A\u70B9:`), i.setKeyWords("[\u5706\u5FC3(C)/\u7AEF\u70B9(E)]"), i.setUserDraw((P, v) => {
371
+ v.drawLine(r, P);
372
372
  }), M();
373
373
  },
374
374
  () => {
375
375
  if (i.isKeyWordPicked("C")) {
376
- const v = new De();
377
- o.center = i.value(), v.center = i.value(), i.setMessage(`
376
+ const P = new Fe();
377
+ o.center = i.value(), P.center = i.value(), i.setMessage(`
378
378
  \u6307\u5B9A\u5706\u5F27\u7684\u5706\u5FC3:`), i.setKeyWords(""), h();
379
379
  } else
380
380
  return !0;
@@ -384,9 +384,9 @@ async function tn() {
384
384
  const h = Q(
385
385
  i,
386
386
  () => {
387
- p = i.value(), l = new De(), l.closed = !1, q.use(l), l.center = p, o.center = p, i.setMessage(`
388
- \u6307\u5B9A\u5706\u5F27\u7684\u8D77\u70B9:`), i.setUserDraw((v, P) => {
389
- P.drawCustomEntity(l), P.drawLine(p, v);
387
+ p = i.value(), l = new Fe(), l.closed = !1, U.use(l), l.center = p, o.center = p, i.setMessage(`
388
+ \u6307\u5B9A\u5706\u5F27\u7684\u8D77\u70B9:`), i.setUserDraw((P, v) => {
389
+ v.drawCustomEntity(l), v.drawLine(p, P);
390
390
  }), x();
391
391
  },
392
392
  () => {
@@ -399,40 +399,40 @@ async function tn() {
399
399
  w = i.value(), l.endPoint = w, i.setMessage(
400
400
  `
401
401
  \u6307\u5B9A\u5706\u5F27\u7684\u7AEF\u70B9(\u6309\u4F4F ctrl \u952E\u53D6\u76F8\u53CD\u65B9\u5411)\u6216 [\u89D2\u5EA6(A)/\u5F26\u957F(L)/\u4FEE\u6539\u534A\u5F84(R)]:`
402
- ), i.setKeyWords("A L R"), E = new ke(), E.setDashLineDisplay(!0), E.setDashArray(0.05), E.setLineWidth(2), E.setColor("#ffd30d"), E.pt1 = l.center, i.setUserDraw((v, P) => {
403
- l.startPoint = v, E.pt2 = v, P.drawCustomEntity(l), P.drawCustomEntity(E);
404
- }), T();
402
+ ), i.setKeyWords("A L R"), E = new We(), E.setDashLineDisplay(!0), E.setDashArray(0.05), E.setLineWidth(2), E.setColor("#ffd30d"), E.pt1 = l.center, i.setUserDraw((P, v) => {
403
+ l.startPoint = P, E.pt2 = P, v.drawCustomEntity(l), v.drawCustomEntity(E);
404
+ }), W();
405
405
  },
406
406
  () => {
407
407
  }
408
408
  );
409
409
  let D;
410
- const T = Q(
410
+ const W = Q(
411
411
  i,
412
412
  () => {
413
- D = i.value(), l.startPoint = D, l.endPoint = w, S.getCurrentDraw().addMxEntity(l);
413
+ D = i.value(), l.startPoint = D, l.endPoint = w, I.getCurrentDraw().addMxEntity(l);
414
414
  },
415
415
  () => {
416
416
  if (i.isKeyWordPicked("A"))
417
417
  return i.setMessage(
418
418
  `
419
419
  \u6307\u5B9A\u5706\u5F27\u7684\u5939\u89D2(\u6309\u4F4F ctrl \u952E\u53D6\u76F8\u53CD\u65B9\u5411)\u6216 [\u4FEE\u6539\u534A\u5F84(R)]:`
420
- ), i.setKeyWords("R"), i.setUserDraw((v, P) => {
421
- l.startPoint = v, P.drawCustomEntity(l), P.drawCustomEntity(E);
420
+ ), i.setKeyWords("R"), i.setUserDraw((P, v) => {
421
+ l.startPoint = P, v.drawCustomEntity(l), v.drawCustomEntity(E);
422
422
  }), !0;
423
423
  if (i.isKeyWordPicked("L"))
424
424
  return i.setMessage(
425
425
  `
426
426
  \u6307\u5B9A\u5706\u5F27\u7684\u5939\u89D2(\u6309\u4F4F ctrl \u952E\u53D6\u76F8\u53CD\u65B9\u5411)\u6216 [\u4FEE\u6539\u534A\u5F84(R)]:`
427
- ), i.setKeyWords("R"), i.setUserDraw((v, P) => {
428
- l.startPoint = v, P.drawCustomEntity(l), P.drawCustomEntity(E);
427
+ ), i.setKeyWords("R"), i.setUserDraw((P, v) => {
428
+ l.startPoint = P, v.drawCustomEntity(l), v.drawCustomEntity(E);
429
429
  }), !0;
430
430
  if (i.isKeyWordPicked("R"))
431
431
  i.setMessage(
432
432
  `
433
433
  \u6307\u5B9A\u5706\u5F27\u7684\u534A\u5F84${l.radius ? "<" + l.radius + ">" : ""}:`
434
- ), i.setKeyWords(""), i.setUserDraw((v, P) => {
435
- P.drawLine(v, l.center), l.startPoint = v, P.drawCustomEntity(l);
434
+ ), i.setKeyWords(""), i.setUserDraw((P, v) => {
435
+ v.drawLine(P, l.center), l.startPoint = P, v.drawCustomEntity(l);
436
436
  }), x();
437
437
  else
438
438
  return !0;
@@ -443,28 +443,28 @@ async function tn() {
443
443
  i,
444
444
  () => {
445
445
  _ = i.value(), i.setMessage(`
446
- \u6307\u5B9A\u5706\u5F27\u7684\u7AEF\u70B9:`), f = new zt(), f.autoClockwise = !0, f.closed = !1, q.use(f), f.point1 = r, f.point3 = _, o.center, i.setUserDraw((v, P) => {
447
- f.point2 = v, P.drawCustomEntity(o);
448
- }), W();
446
+ \u6307\u5B9A\u5706\u5F27\u7684\u7AEF\u70B9:`), f = new Xt(), f.autoClockwise = !0, f.closed = !1, U.use(f), f.point1 = r, f.point3 = _, o.center, i.setUserDraw((P, v) => {
447
+ f.point2 = P, v.drawCustomEntity(o);
448
+ }), R();
449
449
  },
450
450
  () => {
451
451
  if (i.isKeyWordPicked("C"))
452
- l = new De(), l.closed = !1, q.use(l), i.setMessage(`
453
- \u6307\u5B9A\u5706\u5F27\u7684\u5706\u5FC3`), i.setKeyWords(""), i.setUserDraw((v, P) => {
454
- l.startPoint = r, P.drawLine(v, l.startPoint);
452
+ l = new Fe(), l.closed = !1, U.use(l), i.setMessage(`
453
+ \u6307\u5B9A\u5706\u5F27\u7684\u5706\u5FC3`), i.setKeyWords(""), i.setUserDraw((P, v) => {
454
+ l.startPoint = r, v.drawLine(P, l.startPoint);
455
455
  }), h();
456
456
  else if (i.isKeyWordPicked("E"))
457
- l = new De(), l.closed = !1, q.use(l), i.setMessage(`
458
- \u6307\u5B9A\u5706\u5F27\u7684\u5706\u5FC3`), i.setKeyWords(""), i.setUserDraw((v, P) => {
459
- l.startPoint = r, P.drawLine(v, l.startPoint);
457
+ l = new Fe(), l.closed = !1, U.use(l), i.setMessage(`
458
+ \u6307\u5B9A\u5706\u5F27\u7684\u5706\u5FC3`), i.setKeyWords(""), i.setUserDraw((P, v) => {
459
+ l.startPoint = r, v.drawLine(P, l.startPoint);
460
460
  }), h();
461
461
  else
462
462
  return !0;
463
463
  }
464
- ), W = Q(
464
+ ), R = Q(
465
465
  i,
466
466
  () => {
467
- f.point1 = r, f.point2 = i.value(), f.point3 = _, S.getCurrentDraw().addMxEntity(f);
467
+ f.point1 = r, f.point2 = i.value(), f.point3 = _, I.getCurrentDraw().addMxEntity(f);
468
468
  },
469
469
  () => {
470
470
  if (i.isKeyWordPicked("C"))
@@ -477,9 +477,9 @@ async function tn() {
477
477
  );
478
478
  A();
479
479
  }
480
- function nn() {
481
- const i = new ue(), o = new Gt();
482
- o.closed = !1, q.use(o), i.setMessage(`
480
+ function un() {
481
+ const i = new ae(), o = new $t();
482
+ o.closed = !1, U.use(o), i.setMessage(`
483
483
  \u6307\u5B9A\u692D\u5706\u7684\u8F74\u7AEF\u70B9`), i.setKeyWords("[\u4E2D\u5FC3\u70B9(C)]");
484
484
  let r, f = new THREE.Vector3();
485
485
  Q(
@@ -527,13 +527,13 @@ function nn() {
527
527
  ), w = Q(
528
528
  i,
529
529
  () => {
530
- S.getCurrentDraw().addMxEntity(o);
530
+ I.getCurrentDraw().addMxEntity(o);
531
531
  },
532
532
  () => {
533
533
  }
534
534
  );
535
535
  }
536
- var Fe = (() => {
536
+ var Re = (() => {
537
537
  var i = typeof document < "u" && document.currentScript ? document.currentScript.src : void 0;
538
538
  return typeof __filename < "u" && (i = i || __filename), function(o) {
539
539
  o = o || {};
@@ -543,14 +543,14 @@ var Fe = (() => {
543
543
  r.ready = new Promise(function(e, t) {
544
544
  f = e, l = t;
545
545
  });
546
- var A = Object.assign({}, r), p = typeof window == "object", h = typeof importScripts == "function", w = "", E, x, D, T, _, M;
546
+ var A = Object.assign({}, r), p = typeof window == "object", h = typeof importScripts == "function", w = "", E, x, D, W, _, M;
547
547
  typeof process == "object" && typeof process.versions == "object" && typeof process.versions.node == "string" ? (w = h ? require("path").dirname(w) + "/" : __dirname + "/", M = () => {
548
- _ || (T = require("fs"), _ = require("path"));
548
+ _ || (W = require("fs"), _ = require("path"));
549
549
  }, E = function(e, t) {
550
- return M(), e = _.normalize(e), T.readFileSync(e, t ? void 0 : "utf8");
550
+ return M(), e = _.normalize(e), W.readFileSync(e, t ? void 0 : "utf8");
551
551
  }, D = (e) => (e = E(e, !0), e.buffer || (e = new Uint8Array(e)), e), x = (e, t, n) => {
552
- M(), e = _.normalize(e), T.readFile(e, function(s, u) {
553
- s ? n(s) : t(u.buffer);
552
+ M(), e = _.normalize(e), W.readFile(e, function(u, s) {
553
+ u ? n(u) : t(s.buffer);
554
554
  });
555
555
  }, 1 < process.argv.length && process.argv[1].replace(/\\/g, "/"), process.argv.slice(2), process.on("uncaughtException", function(e) {
556
556
  throw e;
@@ -565,48 +565,48 @@ var Fe = (() => {
565
565
  var t = new XMLHttpRequest();
566
566
  return t.open("GET", e, !1), t.responseType = "arraybuffer", t.send(null), new Uint8Array(t.response);
567
567
  }), x = (e, t, n) => {
568
- var s = new XMLHttpRequest();
569
- s.open("GET", e, !0), s.responseType = "arraybuffer", s.onload = () => {
570
- s.status == 200 || s.status == 0 && s.response ? t(s.response) : n();
571
- }, s.onerror = n, s.send(null);
568
+ var u = new XMLHttpRequest();
569
+ u.open("GET", e, !0), u.responseType = "arraybuffer", u.onload = () => {
570
+ u.status == 200 || u.status == 0 && u.response ? t(u.response) : n();
571
+ }, u.onerror = n, u.send(null);
572
572
  });
573
- var W = r.print || console.log.bind(console), v = r.printErr || console.warn.bind(console);
573
+ var R = r.print || console.log.bind(console), P = r.printErr || console.warn.bind(console);
574
574
  Object.assign(r, A), A = null;
575
- function P(e) {
576
- I || (I = {}), I[e] || (I[e] = 1, v(e));
575
+ function v(e) {
576
+ L || (L = {}), L[e] || (L[e] = 1, P(e));
577
577
  }
578
- var I, O;
579
- r.wasmBinary && (O = r.wasmBinary), r.noExitRuntime, typeof WebAssembly != "object" && ie("no native wasm support detected");
580
- var U, N = !1, z = typeof TextDecoder < "u" ? new TextDecoder("utf8") : void 0;
578
+ var L, j;
579
+ r.wasmBinary && (j = r.wasmBinary), r.noExitRuntime, typeof WebAssembly != "object" && ue("no native wasm support detected");
580
+ var q, N = !1, z = typeof TextDecoder < "u" ? new TextDecoder("utf8") : void 0;
581
581
  function G(e, t, n) {
582
- var s = t + n;
583
- for (n = t; e[n] && !(n >= s); )
582
+ var u = t + n;
583
+ for (n = t; e[n] && !(n >= u); )
584
584
  ++n;
585
585
  if (16 < n - t && e.buffer && z)
586
586
  return z.decode(e.subarray(t, n));
587
- for (s = ""; t < n; ) {
588
- var u = e[t++];
589
- if (u & 128) {
587
+ for (u = ""; t < n; ) {
588
+ var s = e[t++];
589
+ if (s & 128) {
590
590
  var a = e[t++] & 63;
591
- if ((u & 224) == 192)
592
- s += String.fromCharCode((u & 31) << 6 | a);
591
+ if ((s & 224) == 192)
592
+ u += String.fromCharCode((s & 31) << 6 | a);
593
593
  else {
594
594
  var c = e[t++] & 63;
595
- u = (u & 240) == 224 ? (u & 15) << 12 | a << 6 | c : (u & 7) << 18 | a << 12 | c << 6 | e[t++] & 63, 65536 > u ? s += String.fromCharCode(u) : (u -= 65536, s += String.fromCharCode(55296 | u >> 10, 56320 | u & 1023));
595
+ s = (s & 240) == 224 ? (s & 15) << 12 | a << 6 | c : (s & 7) << 18 | a << 12 | c << 6 | e[t++] & 63, 65536 > s ? u += String.fromCharCode(s) : (s -= 65536, u += String.fromCharCode(55296 | s >> 10, 56320 | s & 1023));
596
596
  }
597
597
  } else
598
- s += String.fromCharCode(u);
598
+ u += String.fromCharCode(s);
599
599
  }
600
- return s;
600
+ return u;
601
601
  }
602
602
  function V(e, t) {
603
603
  return e ? G(ee, e, t) : "";
604
604
  }
605
- function pe(e, t, n, s) {
606
- if (!(0 < s))
605
+ function ye(e, t, n, u) {
606
+ if (!(0 < u))
607
607
  return 0;
608
- var u = n;
609
- s = n + s - 1;
608
+ var s = n;
609
+ u = n + u - 1;
610
610
  for (var a = 0; a < e.length; ++a) {
611
611
  var c = e.charCodeAt(a);
612
612
  if (55296 <= c && 57343 >= c) {
@@ -614,21 +614,21 @@ var Fe = (() => {
614
614
  c = 65536 + ((c & 1023) << 10) | y & 1023;
615
615
  }
616
616
  if (127 >= c) {
617
- if (n >= s)
617
+ if (n >= u)
618
618
  break;
619
619
  t[n++] = c;
620
620
  } else {
621
621
  if (2047 >= c) {
622
- if (n + 1 >= s)
622
+ if (n + 1 >= u)
623
623
  break;
624
624
  t[n++] = 192 | c >> 6;
625
625
  } else {
626
626
  if (65535 >= c) {
627
- if (n + 2 >= s)
627
+ if (n + 2 >= u)
628
628
  break;
629
629
  t[n++] = 224 | c >> 12;
630
630
  } else {
631
- if (n + 3 >= s)
631
+ if (n + 3 >= u)
632
632
  break;
633
633
  t[n++] = 240 | c >> 18, t[n++] = 128 | c >> 12 & 63;
634
634
  }
@@ -637,52 +637,52 @@ var Fe = (() => {
637
637
  t[n++] = 128 | c & 63;
638
638
  }
639
639
  }
640
- return t[n] = 0, n - u;
640
+ return t[n] = 0, n - s;
641
641
  }
642
- var ye, j, ee, C, he, Ee;
643
- function ze() {
644
- var e = U.buffer;
645
- ye = e, r.HEAP8 = j = new Int8Array(e), r.HEAP16 = new Int16Array(e), r.HEAP32 = C = new Int32Array(e), r.HEAPU8 = ee = new Uint8Array(e), r.HEAPU16 = new Uint16Array(e), r.HEAPU32 = new Uint32Array(e), r.HEAPF32 = he = new Float32Array(e), r.HEAPF64 = Ee = new Float64Array(e);
642
+ var he, K, ee, C, Ee, Ae;
643
+ function Ge() {
644
+ var e = q.buffer;
645
+ he = e, r.HEAP8 = K = new Int8Array(e), r.HEAP16 = new Int16Array(e), r.HEAP32 = C = new Int32Array(e), r.HEAPU8 = ee = new Uint8Array(e), r.HEAPU16 = new Uint16Array(e), r.HEAPU32 = new Uint32Array(e), r.HEAPF32 = Ee = new Float32Array(e), r.HEAPF64 = Ae = new Float64Array(e);
646
646
  }
647
- var Ge, Xe = [], $e = [], Ye = [];
648
- function Dt() {
647
+ var Xe, $e = [], Ye = [], Ze = [];
648
+ function kt() {
649
649
  var e = r.preRun.shift();
650
- Xe.unshift(e);
650
+ $e.unshift(e);
651
651
  }
652
- var ae = 0, de = null;
652
+ var ce = 0, pe = null;
653
653
  r.preloadedImages = {}, r.preloadedAudios = {};
654
- function ie(e) {
655
- throw r.onAbort && r.onAbort(e), e = "Aborted(" + e + ")", v(e), N = !0, e = new WebAssembly.RuntimeError(e + ". Build with -s ASSERTIONS=1 for more info."), l(e), e;
654
+ function ue(e) {
655
+ throw r.onAbort && r.onAbort(e), e = "Aborted(" + e + ")", P(e), N = !0, e = new WebAssembly.RuntimeError(e + ". Build with -s ASSERTIONS=1 for more info."), l(e), e;
656
656
  }
657
- function Ze() {
657
+ function Je() {
658
658
  return $.startsWith("data:application/octet-stream;base64,");
659
659
  }
660
660
  var $;
661
- if ($ = "mxdrawassembly_min.wasm", !Ze()) {
662
- var Je = $;
663
- $ = r.locateFile ? r.locateFile(Je, w) : w + Je;
661
+ if ($ = "mxdrawassembly_min.wasm", !Je()) {
662
+ var Qe = $;
663
+ $ = r.locateFile ? r.locateFile(Qe, w) : w + Qe;
664
664
  }
665
- function Qe() {
665
+ function Ue() {
666
666
  var e = $;
667
667
  try {
668
- if (e == $ && O)
669
- return new Uint8Array(O);
668
+ if (e == $ && j)
669
+ return new Uint8Array(j);
670
670
  if (D)
671
671
  return D(e);
672
672
  throw "both async and sync fetching of the wasm failed";
673
673
  } catch (t) {
674
- ie(t);
674
+ ue(t);
675
675
  }
676
676
  }
677
- function kt() {
678
- if (!O && (p || h)) {
677
+ function Ft() {
678
+ if (!j && (p || h)) {
679
679
  if (typeof fetch == "function" && !$.startsWith("file://"))
680
680
  return fetch($, { credentials: "same-origin" }).then(function(e) {
681
681
  if (!e.ok)
682
682
  throw "failed to load wasm binary file at '" + $ + "'";
683
683
  return e.arrayBuffer();
684
684
  }).catch(function() {
685
- return Qe();
685
+ return Ue();
686
686
  });
687
687
  if (x)
688
688
  return new Promise(function(e, t) {
@@ -692,45 +692,45 @@ var Fe = (() => {
692
692
  });
693
693
  }
694
694
  return Promise.resolve().then(function() {
695
- return Qe();
695
+ return Ue();
696
696
  });
697
697
  }
698
- function We(e) {
698
+ function Te(e) {
699
699
  for (; 0 < e.length; ) {
700
700
  var t = e.shift();
701
701
  if (typeof t == "function")
702
702
  t(r);
703
703
  else {
704
- var n = t.Fa;
705
- typeof n == "number" ? t.ha === void 0 ? qe(n)() : qe(n)(t.ha) : n(t.ha === void 0 ? null : t.ha);
704
+ var n = t.Ia;
705
+ typeof n == "number" ? t.ia === void 0 ? qe(n)() : qe(n)(t.ia) : n(t.ia === void 0 ? null : t.ia);
706
706
  }
707
707
  }
708
708
  }
709
- var Ae = [];
709
+ var ge = [];
710
710
  function qe(e) {
711
- var t = Ae[e];
712
- return t || (e >= Ae.length && (Ae.length = e + 1), Ae[e] = t = Ge.get(e)), t;
711
+ var t = ge[e];
712
+ return t || (e >= ge.length && (ge.length = e + 1), ge[e] = t = Xe.get(e)), t;
713
713
  }
714
- function Ue(e, t) {
714
+ function et(e, t) {
715
715
  if (0 >= e)
716
716
  return e;
717
717
  var n = 32 >= t ? Math.abs(1 << t - 1) : Math.pow(2, t - 1);
718
718
  return e >= n && (32 >= t || e > n) && (e = -2 * n + e), e;
719
719
  }
720
- function et(e, t) {
720
+ function tt(e, t) {
721
721
  return 0 <= e ? e : 32 >= t ? 2 * Math.abs(1 << t - 1) + e : Math.pow(2, t) + e;
722
722
  }
723
- function Ft(e, t) {
723
+ function Wt(e, t) {
724
724
  function n(Y) {
725
- var je = s;
726
- return (Y === "double" || Y === "i64") && je & 7 && (je += 4), s = je, Y === "double" ? (Y = Number(Ee[s >> 3]), s += 8) : Y == "i64" ? (Y = [C[s >> 2], C[s + 4 >> 2]], s += 8) : (Y = C[s >> 2], s += 4), Y;
725
+ var je = u;
726
+ return (Y === "double" || Y === "i64") && je & 7 && (je += 4), u = je, Y === "double" ? (Y = Number(Ae[u >> 3]), u += 8) : Y == "i64" ? (Y = [C[u >> 2], C[u + 4 >> 2]], u += 8) : (Y = C[u >> 2], u += 4), Y;
727
727
  }
728
- for (var s = t, u = [], a, c; ; ) {
728
+ for (var u = t, s = [], a, c; ; ) {
729
729
  var y = e;
730
- if (a = j[e >> 0], a === 0)
730
+ if (a = K[e >> 0], a === 0)
731
731
  break;
732
- if (c = j[e + 1 >> 0], a == 37) {
733
- var B = !1, m = t = !1, k = !1, re = !1;
732
+ if (c = K[e + 1 >> 0], a == 37) {
733
+ var B = !1, m = t = !1, k = !1, ie = !1;
734
734
  e:
735
735
  for (; ; ) {
736
736
  switch (c) {
@@ -749,38 +749,38 @@ var Fe = (() => {
749
749
  k = !0;
750
750
  break;
751
751
  case 32:
752
- re = !0;
752
+ ie = !0;
753
753
  break;
754
754
  default:
755
755
  break e;
756
756
  }
757
- e++, c = j[e + 1 >> 0];
757
+ e++, c = K[e + 1 >> 0];
758
758
  }
759
759
  var H = 0;
760
760
  if (c == 42)
761
- H = n("i32"), e++, c = j[e + 1 >> 0];
761
+ H = n("i32"), e++, c = K[e + 1 >> 0];
762
762
  else
763
763
  for (; 48 <= c && 57 >= c; )
764
- H = 10 * H + (c - 48), e++, c = j[e + 1 >> 0];
765
- var K = !1, L = -1;
764
+ H = 10 * H + (c - 48), e++, c = K[e + 1 >> 0];
765
+ var O = !1, S = -1;
766
766
  if (c == 46) {
767
- if (L = 0, K = !0, e++, c = j[e + 1 >> 0], c == 42)
768
- L = n("i32"), e++;
767
+ if (S = 0, O = !0, e++, c = K[e + 1 >> 0], c == 42)
768
+ S = n("i32"), e++;
769
769
  else
770
- for (; c = j[e + 1 >> 0], !(48 > c || 57 < c); )
771
- L = 10 * L + (c - 48), e++;
772
- c = j[e + 1 >> 0];
770
+ for (; c = K[e + 1 >> 0], !(48 > c || 57 < c); )
771
+ S = 10 * S + (c - 48), e++;
772
+ c = K[e + 1 >> 0];
773
773
  }
774
- switch (0 > L && (L = 6, K = !1), String.fromCharCode(c)) {
774
+ switch (0 > S && (S = 6, O = !1), String.fromCharCode(c)) {
775
775
  case "h":
776
- if (c = j[e + 2 >> 0], c == 104) {
776
+ if (c = K[e + 2 >> 0], c == 104) {
777
777
  e++;
778
778
  var F = 1;
779
779
  } else
780
780
  F = 2;
781
781
  break;
782
782
  case "l":
783
- c = j[e + 2 >> 0], c == 108 ? (e++, F = 8) : F = 4;
783
+ c = K[e + 2 >> 0], c == 108 ? (e++, F = 8) : F = 4;
784
784
  break;
785
785
  case "L":
786
786
  case "q":
@@ -795,7 +795,7 @@ var Fe = (() => {
795
795
  default:
796
796
  F = null;
797
797
  }
798
- switch (F && e++, c = j[e + 1 >> 0], String.fromCharCode(c)) {
798
+ switch (F && e++, c = K[e + 1 >> 0], String.fromCharCode(c)) {
799
799
  case "d":
800
800
  case "i":
801
801
  case "u":
@@ -803,12 +803,12 @@ var Fe = (() => {
803
803
  case "x":
804
804
  case "X":
805
805
  case "p":
806
- y = c == 100 || c == 105, F = F || 4, a = n("i" + 8 * F), F == 8 && (a = c == 117 ? (a[0] >>> 0) + 4294967296 * (a[1] >>> 0) : (a[0] >>> 0) + 4294967296 * a[1]), 4 >= F && (a = (y ? Ue : et)(a & Math.pow(256, F) - 1, 8 * F));
806
+ y = c == 100 || c == 105, F = F || 4, a = n("i" + 8 * F), F == 8 && (a = c == 117 ? (a[0] >>> 0) + 4294967296 * (a[1] >>> 0) : (a[0] >>> 0) + 4294967296 * a[1]), 4 >= F && (a = (y ? et : tt)(a & Math.pow(256, F) - 1, 8 * F));
807
807
  var oe = Math.abs(a);
808
808
  if (y = "", c == 100 || c == 105)
809
- var g = Ue(a, 8 * F).toString(10);
809
+ var g = et(a, 8 * F).toString(10);
810
810
  else if (c == 117)
811
- g = et(a, 8 * F).toString(10), a = Math.abs(a);
811
+ g = tt(a, 8 * F).toString(10), a = Math.abs(a);
812
812
  else if (c == 111)
813
813
  g = (m ? "0" : "") + oe.toString(8);
814
814
  else if (c == 120 || c == 88) {
@@ -822,13 +822,13 @@ var Fe = (() => {
822
822
  c == 88 && (y = y.toUpperCase(), g = g.toUpperCase());
823
823
  } else
824
824
  c == 112 && (oe === 0 ? g = "(nil)" : (y = "0x", g = oe.toString(16)));
825
- if (K)
826
- for (; g.length < L; )
825
+ if (O)
826
+ for (; g.length < S; )
827
827
  g = "0" + g;
828
- for (0 <= a && (B ? y = "+" + y : re && (y = " " + y)), g.charAt(0) == "-" && (y = "-" + y, g = g.substr(1)); y.length + g.length < H; )
828
+ for (0 <= a && (B ? y = "+" + y : ie && (y = " " + y)), g.charAt(0) == "-" && (y = "-" + y, g = g.substr(1)); y.length + g.length < H; )
829
829
  t ? g += " " : k ? g = "0" + g : y = " " + y;
830
830
  g = y + g, g.split("").forEach(function(Y) {
831
- u.push(Y.charCodeAt(0));
831
+ s.push(Y.charCodeAt(0));
832
832
  });
833
833
  break;
834
834
  case "f":
@@ -840,76 +840,76 @@ var Fe = (() => {
840
840
  if (a = n("double"), isNaN(a))
841
841
  g = "nan", k = !1;
842
842
  else if (isFinite(a)) {
843
- if (K = !1, F = Math.min(L, 20), (c == 103 || c == 71) && (K = !0, L = L || 1, F = parseInt(a.toExponential(F).split("e")[1], 10), L > F && -4 <= F ? (c = (c == 103 ? "f" : "F").charCodeAt(0), L -= F + 1) : (c = (c == 103 ? "e" : "E").charCodeAt(0), L--), F = Math.min(L, 20)), c == 101 || c == 69 ? (g = a.toExponential(F), /[eE][-+]\d$/.test(g) && (g = g.slice(0, -1) + "0" + g.slice(-1))) : (c == 102 || c == 70) && (g = a.toFixed(F), a === 0 && (0 > a || a === 0 && 1 / a === -1 / 0) && (g = "-" + g)), y = g.split("e"), K && !m)
843
+ if (O = !1, F = Math.min(S, 20), (c == 103 || c == 71) && (O = !0, S = S || 1, F = parseInt(a.toExponential(F).split("e")[1], 10), S > F && -4 <= F ? (c = (c == 103 ? "f" : "F").charCodeAt(0), S -= F + 1) : (c = (c == 103 ? "e" : "E").charCodeAt(0), S--), F = Math.min(S, 20)), c == 101 || c == 69 ? (g = a.toExponential(F), /[eE][-+]\d$/.test(g) && (g = g.slice(0, -1) + "0" + g.slice(-1))) : (c == 102 || c == 70) && (g = a.toFixed(F), a === 0 && (0 > a || a === 0 && 1 / a === -1 / 0) && (g = "-" + g)), y = g.split("e"), O && !m)
844
844
  for (; 1 < y[0].length && y[0].includes(".") && (y[0].slice(-1) == "0" || y[0].slice(-1) == "."); )
845
845
  y[0] = y[0].slice(0, -1);
846
846
  else
847
- for (m && g.indexOf(".") == -1 && (y[0] += "."); L > F++; )
847
+ for (m && g.indexOf(".") == -1 && (y[0] += "."); S > F++; )
848
848
  y[0] += "0";
849
- g = y[0] + (1 < y.length ? "e" + y[1] : ""), c == 69 && (g = g.toUpperCase()), 0 <= a && (B ? g = "+" + g : re && (g = " " + g));
849
+ g = y[0] + (1 < y.length ? "e" + y[1] : ""), c == 69 && (g = g.toUpperCase()), 0 <= a && (B ? g = "+" + g : ie && (g = " " + g));
850
850
  } else
851
851
  g = (0 > a ? "-" : "") + "inf", k = !1;
852
852
  for (; g.length < H; )
853
853
  g = t ? g + " " : !k || g[0] != "-" && g[0] != "+" ? (k ? "0" : " ") + g : g[0] + "0" + g.slice(1);
854
854
  97 > c && (g = g.toUpperCase()), g.split("").forEach(function(Y) {
855
- u.push(Y.charCodeAt(0));
855
+ s.push(Y.charCodeAt(0));
856
856
  });
857
857
  break;
858
858
  case "s":
859
- if (k = (B = n("i8*")) ? ht(B) : 6, K && (k = Math.min(k, L)), !t)
859
+ if (k = (B = n("i8*")) ? Et(B) : 6, O && (k = Math.min(k, S)), !t)
860
860
  for (; k < H--; )
861
- u.push(32);
861
+ s.push(32);
862
862
  if (B)
863
863
  for (m = 0; m < k; m++)
864
- u.push(ee[B++ >> 0]);
864
+ s.push(ee[B++ >> 0]);
865
865
  else
866
- u = u.concat(ut(
866
+ s = s.concat(at(
867
867
  "(null)".substr(0, k),
868
868
  !0
869
869
  ));
870
870
  if (t)
871
871
  for (; k < H--; )
872
- u.push(32);
872
+ s.push(32);
873
873
  break;
874
874
  case "c":
875
- for (t && u.push(n("i8")); 0 < --H; )
876
- u.push(32);
877
- t || u.push(n("i8"));
875
+ for (t && s.push(n("i8")); 0 < --H; )
876
+ s.push(32);
877
+ t || s.push(n("i8"));
878
878
  break;
879
879
  case "n":
880
- t = n("i32*"), C[t >> 2] = u.length;
880
+ t = n("i32*"), C[t >> 2] = s.length;
881
881
  break;
882
882
  case "%":
883
- u.push(a);
883
+ s.push(a);
884
884
  break;
885
885
  default:
886
886
  for (m = y; m < e + 2; m++)
887
- u.push(j[m >> 0]);
887
+ s.push(K[m >> 0]);
888
888
  }
889
889
  e += 2;
890
890
  } else
891
- u.push(a), e += 1;
891
+ s.push(a), e += 1;
892
892
  }
893
- return u;
893
+ return s;
894
894
  }
895
- function Re(e) {
895
+ function Se(e) {
896
896
  if (!e || !e.callee || !e.callee.name)
897
897
  return [null, "", ""];
898
- var t = e.callee.name, n = "(", s = !0, u;
899
- for (u in e) {
900
- var a = e[u];
901
- s || (n += ", "), s = !1, n = typeof a == "number" || typeof a == "string" ? n + a : n + ("(" + typeof a + ")");
898
+ var t = e.callee.name, n = "(", u = !0, s;
899
+ for (s in e) {
900
+ var a = e[s];
901
+ u || (n += ", "), u = !1, n = typeof a == "number" || typeof a == "string" ? n + a : n + ("(" + typeof a + ")");
902
902
  }
903
- return n += ")", e = (e = e.callee.caller) ? e.arguments : [], s && (n = ""), [e, t, n];
903
+ return n += ")", e = (e = e.callee.caller) ? e.arguments : [], u && (n = ""), [e, t, n];
904
904
  }
905
- function Tt(e) {
905
+ function Rt(e) {
906
906
  e: {
907
907
  var t = Error();
908
908
  if (!t.stack) {
909
909
  try {
910
910
  throw Error();
911
- } catch (L) {
912
- t = L;
911
+ } catch (S) {
912
+ t = S;
913
913
  }
914
914
  if (!t.stack) {
915
915
  t = "(no stack trace available)";
@@ -919,23 +919,23 @@ var Fe = (() => {
919
919
  t = t.stack.toString();
920
920
  }
921
921
  t = t.slice(t.indexOf(`
922
- `, Math.max(t.lastIndexOf("_emscripten_log"), t.lastIndexOf("_emscripten_get_callstack"))) + 1), e & 32 && P("EM_LOG_DEMANGLE is deprecated; ignoring"), e & 8 && typeof emscripten_source_map > "u" && (P('Source map information is not available, emscripten_log with EM_LOG_C_STACK will be ignored. Build with "--pre-js $EMSCRIPTEN/src/emscripten-source-map.min.js" linker flag to add source map loading to code.'), e = e ^ 8 | 16);
922
+ `, Math.max(t.lastIndexOf("_emscripten_log"), t.lastIndexOf("_emscripten_get_callstack"))) + 1), e & 32 && v("EM_LOG_DEMANGLE is deprecated; ignoring"), e & 8 && typeof emscripten_source_map > "u" && (v('Source map information is not available, emscripten_log with EM_LOG_C_STACK will be ignored. Build with "--pre-js $EMSCRIPTEN/src/emscripten-source-map.min.js" linker flag to add source map loading to code.'), e = e ^ 8 | 16);
923
923
  var n = null;
924
924
  if (e & 128)
925
- for (n = Re(arguments); n[1].includes("_emscripten_"); )
926
- n = Re(n[0]);
927
- var s = t.split(`
925
+ for (n = Se(arguments); n[1].includes("_emscripten_"); )
926
+ n = Se(n[0]);
927
+ var u = t.split(`
928
928
  `);
929
929
  t = "";
930
- var u = RegExp("\\s*(.*?)@(.*?):([0-9]+):([0-9]+)"), a = RegExp("\\s*(.*?)@(.*):(.*)(:(.*))?"), c = RegExp("\\s*at (.*?) \\((.*):(.*):(.*)\\)"), y;
931
- for (y in s) {
932
- var B = s[y], m;
930
+ var s = RegExp("\\s*(.*?)@(.*?):([0-9]+):([0-9]+)"), a = RegExp("\\s*(.*?)@(.*):(.*)(:(.*))?"), c = RegExp("\\s*at (.*?) \\((.*):(.*):(.*)\\)"), y;
931
+ for (y in u) {
932
+ var B = u[y], m;
933
933
  if ((m = c.exec(B)) && m.length == 5) {
934
934
  B = m[1];
935
- var k = m[2], re = m[3];
935
+ var k = m[2], ie = m[3];
936
936
  m = m[4];
937
- } else if ((m = u.exec(B)) || (m = a.exec(B)), m && 4 <= m.length)
938
- B = m[1], k = m[2], re = m[3], m = m[4] | 0;
937
+ } else if ((m = s.exec(B)) || (m = a.exec(B)), m && 4 <= m.length)
938
+ B = m[1], k = m[2], ie = m[3], m = m[4] | 0;
939
939
  else {
940
940
  t += B + `
941
941
  `;
@@ -943,30 +943,30 @@ var Fe = (() => {
943
943
  }
944
944
  var H = !1;
945
945
  if (e & 8) {
946
- var K = emscripten_source_map.Ka({
947
- line: re,
948
- ya: m
946
+ var O = emscripten_source_map.Na({
947
+ line: ie,
948
+ Aa: m
949
949
  });
950
- (H = K && K.source) && (e & 64 && (K.source = K.source.substring(K.source.replace(/\\/g, "/").lastIndexOf("/") + 1)), t += " at " + B + " (" + K.source + ":" + K.line + ":" + K.ya + `)
950
+ (H = O && O.source) && (e & 64 && (O.source = O.source.substring(O.source.replace(/\\/g, "/").lastIndexOf("/") + 1)), t += " at " + B + " (" + O.source + ":" + O.line + ":" + O.Aa + `)
951
951
  `);
952
952
  }
953
- (e & 16 || !H) && (e & 64 && (k = k.substring(k.replace(/\\/g, "/").lastIndexOf("/") + 1)), t += (H ? " = " + B : " at " + B) + " (" + k + ":" + re + ":" + m + `)
953
+ (e & 16 || !H) && (e & 64 && (k = k.substring(k.replace(/\\/g, "/").lastIndexOf("/") + 1)), t += (H ? " = " + B : " at " + B) + " (" + k + ":" + ie + ":" + m + `)
954
954
  `), e & 128 && n[0] && (n[1] == B && 0 < n[2].length && (t = t.replace(/\s+$/, ""), t += " with values: " + n[1] + n[2] + `
955
- `), n = Re(n[0]));
955
+ `), n = Se(n[0]));
956
956
  }
957
957
  return t = t.replace(/\s+$/, "");
958
958
  }
959
- function Wt(e) {
959
+ function bt(e) {
960
960
  var t = e.getExtension("ANGLE_instanced_arrays");
961
- t && (e.vertexAttribDivisor = function(n, s) {
962
- t.vertexAttribDivisorANGLE(n, s);
963
- }, e.drawArraysInstanced = function(n, s, u, a) {
964
- t.drawArraysInstancedANGLE(n, s, u, a);
965
- }, e.drawElementsInstanced = function(n, s, u, a, c) {
966
- t.drawElementsInstancedANGLE(n, s, u, a, c);
961
+ t && (e.vertexAttribDivisor = function(n, u) {
962
+ t.vertexAttribDivisorANGLE(n, u);
963
+ }, e.drawArraysInstanced = function(n, u, s, a) {
964
+ t.drawArraysInstancedANGLE(n, u, s, a);
965
+ }, e.drawElementsInstanced = function(n, u, s, a, c) {
966
+ t.drawElementsInstancedANGLE(n, u, s, a, c);
967
967
  });
968
968
  }
969
- function Rt(e) {
969
+ function Tt(e) {
970
970
  var t = e.getExtension("OES_vertex_array_object");
971
971
  t && (e.createVertexArray = function() {
972
972
  return t.createVertexArrayOES();
@@ -978,401 +978,387 @@ var Fe = (() => {
978
978
  return t.isVertexArrayOES(n);
979
979
  });
980
980
  }
981
- function bt(e) {
981
+ function St(e) {
982
982
  var t = e.getExtension("WEBGL_draw_buffers");
983
- t && (e.drawBuffers = function(n, s) {
984
- t.drawBuffersWEBGL(n, s);
983
+ t && (e.drawBuffers = function(n, u) {
984
+ t.drawBuffersWEBGL(n, u);
985
985
  });
986
986
  }
987
- var tt = 1, ce = [], te = [], ne = [], nt = [], be = [], rt = [1, 1, 2, 2, 4, 4, 4, 2, 3, 4, 8];
988
- function le(e) {
989
- we || (we = e);
987
+ var nt = 1, le = [], te = [], ne = [], rt = [], re = [], it = [1, 1, 2, 2, 4, 4, 4, 2, 3, 4, 8];
988
+ function fe(e) {
989
+ _e || (_e = e);
990
990
  }
991
- function ge(e) {
992
- for (var t = tt++, n = e.length; n < t; n++)
991
+ function we(e) {
992
+ for (var t = nt++, n = e.length; n < t; n++)
993
993
  e[n] = null;
994
994
  return t;
995
995
  }
996
- function Le(e) {
996
+ function Ie(e) {
997
997
  return 32 - Math.clz32(e === 0 ? 0 : e - 1);
998
998
  }
999
- function Lt(e, t) {
1000
- e.ja || (e.ja = e.getContext, e.getContext = function(s, u) {
1001
- return (u = e.ja(s, u)) || (u = e.ja(s)), s == "webgl" == u instanceof WebGLRenderingContext ? u : null;
999
+ function It(e, t) {
1000
+ e.ka || (e.ka = e.getContext, e.getContext = function(u, s) {
1001
+ return (s = e.ka(u, s)) || (s = e.ka(u)), u == "webgl" == s instanceof WebGLRenderingContext ? s : null;
1002
1002
  });
1003
- var n = 1 < t.ra ? e.getContext("webgl2", t) : e.getContext("webgl", t);
1004
- return n ? St(n, t) : 0;
1003
+ var n = 1 < t.sa ? e.getContext("webgl2", t) : e.getContext("webgl", t);
1004
+ return n ? Lt(n, t) : 0;
1005
1005
  }
1006
- function St(e, t) {
1007
- var n = ge(be), s = { Ga: n, attributes: t, version: t.ra, ga: e };
1008
- for (e.canvas && (e.canvas.Ca = s), be[n] = s, (typeof t.qa > "u" || t.qa) && It(s), s.sa = s.ga.getParameter(34921), s.Z = [], e = 0; e < s.sa; e++)
1009
- s.Z[e] = { enabled: !1, ia: !1, size: 0, type: 0, ta: 0, ka: 0, T: 0, xa: null };
1010
- for (e = Le(2097152), s.W = [], s.ua = [], s.W.length = s.ua.length = e + 1, s.fa = [], s.la = [], s.fa.length = s.la.length = e + 1, s.U = [], s.U.length = e + 1, t = 0; t <= e; ++t) {
1011
- s.U[t] = null, s.W[t] = s.ua[t] = 0, s.fa[t] = [], s.la[t] = [];
1012
- var u = s.fa[t], a = s.la[t];
1013
- u.length = a.length = 64;
1006
+ function Lt(e, t) {
1007
+ var n = we(re), u = { Ja: n, attributes: t, version: t.sa, V: e };
1008
+ for (e.canvas && (e.canvas.za = u), re[n] = u, (typeof t.ra > "u" || t.ra) && Kt(u), u.ta = u.V.getParameter(34921), u.aa = [], e = 0; e < u.ta; e++)
1009
+ u.aa[e] = { enabled: !1, ja: !1, size: 0, type: 0, ua: 0, la: 0, U: 0, ya: null };
1010
+ for (e = Ie(2097152), u.Y = [], u.va = [], u.Y.length = u.va.length = e + 1, u.ha = [], u.ma = [], u.ha.length = u.ma.length = e + 1, u.W = [], u.W.length = e + 1, t = 0; t <= e; ++t) {
1011
+ u.W[t] = null, u.Y[t] = u.va[t] = 0, u.ha[t] = [], u.ma[t] = [];
1012
+ var s = u.ha[t], a = u.ma[t];
1013
+ s.length = a.length = 64;
1014
1014
  for (var c = 0; 64 > c; ++c)
1015
- u[c] = a[c] = null;
1015
+ s[c] = a[c] = null;
1016
1016
  }
1017
1017
  return n;
1018
1018
  }
1019
- function It(e) {
1020
- if (e || (e = b), !e.Ba) {
1021
- e.Ba = !0;
1022
- var t = e.ga;
1023
- Wt(t), Rt(t), bt(t), t.Ea = t.getExtension("WEBGL_draw_instanced_base_vertex_base_instance"), t.Ha = t.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance"), 2 <= e.version && (t.pa = t.getExtension("EXT_disjoint_timer_query_webgl2")), (2 > e.version || !t.pa) && (t.pa = t.getExtension("EXT_disjoint_timer_query")), t.Ja = t.getExtension("WEBGL_multi_draw"), (t.getSupportedExtensions() || []).forEach(function(n) {
1019
+ function Kt(e) {
1020
+ if (e || (e = b), !e.Da) {
1021
+ e.Da = !0;
1022
+ var t = e.V;
1023
+ bt(t), Tt(t), St(t), t.Fa = t.getExtension("WEBGL_draw_instanced_base_vertex_base_instance"), t.Ka = t.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance"), 2 <= e.version && (t.qa = t.getExtension("EXT_disjoint_timer_query_webgl2")), (2 > e.version || !t.qa) && (t.qa = t.getExtension("EXT_disjoint_timer_query")), t.Ma = t.getExtension("WEBGL_multi_draw"), (t.getSupportedExtensions() || []).forEach(function(n) {
1024
1024
  n.includes("lose_context") || n.includes("debug") || t.getExtension(n);
1025
1025
  });
1026
1026
  }
1027
1027
  }
1028
- var we, b, Se, jt = ["default", "low-power", "high-performance"], Ot = [0, typeof document < "u" ? document : 0, typeof window < "u" ? window : 0];
1029
- function it(e) {
1028
+ var _e, b, Le, me = [], jt = {}, Ot = ["default", "low-power", "high-performance"], Vt = [0, typeof document < "u" ? document : 0, typeof window < "u" ? window : 0];
1029
+ function ut(e) {
1030
1030
  return e.slice(-1) == "]" && e.lastIndexOf("[");
1031
1031
  }
1032
1032
  function st(e) {
1033
- var t = d.za;
1033
+ var t = d.Ba;
1034
1034
  if (t) {
1035
- var n = t.X[e];
1036
- return typeof n == "number" && (t.X[e] = n = d.getUniformLocation(t, t.va[e] + (0 < n ? "[" + n + "]" : ""))), n;
1035
+ var n = t.Z[e];
1036
+ return typeof n == "number" && (t.Z[e] = n = d.getUniformLocation(t, t.wa[e] + (0 < n ? "[" + n + "]" : ""))), n;
1037
1037
  }
1038
- le(1282);
1038
+ fe(1282);
1039
1039
  }
1040
- for (var ot = [], d, Kt = new Float32Array(288), _e = 0; 288 > _e; ++_e)
1041
- ot[_e] = Kt.subarray(0, _e + 1);
1042
- function ut(e, t) {
1043
- for (var n = 0, s = 0; s < e.length; ++s) {
1044
- var u = e.charCodeAt(s);
1045
- 55296 <= u && 57343 >= u && (u = 65536 + ((u & 1023) << 10) | e.charCodeAt(++s) & 1023), 127 >= u ? ++n : n = 2047 >= u ? n + 2 : 65535 >= u ? n + 3 : n + 4;
1040
+ for (var ot = [], d, Ht = new Float32Array(288), Pe = 0; 288 > Pe; ++Pe)
1041
+ ot[Pe] = Ht.subarray(0, Pe + 1);
1042
+ function at(e, t) {
1043
+ for (var n = 0, u = 0; u < e.length; ++u) {
1044
+ var s = e.charCodeAt(u);
1045
+ 55296 <= s && 57343 >= s && (s = 65536 + ((s & 1023) << 10) | e.charCodeAt(++u) & 1023), 127 >= s ? ++n : n = 2047 >= s ? n + 2 : 65535 >= s ? n + 3 : n + 4;
1046
1046
  }
1047
- return n = Array(n + 1), e = pe(e, n, 0, n.length), t && (n.length = e), n;
1047
+ return n = Array(n + 1), e = ye(e, n, 0, n.length), t && (n.length = e), n;
1048
1048
  }
1049
- var Vt = {
1050
- a: function(e, t, n, s) {
1051
- ie("Assertion failed: " + V(e) + ", at: " + [t ? V(t) : "unknown filename", n, s ? V(s) : "unknown function"]);
1052
- },
1053
- b: function() {
1054
- ie("");
1055
- },
1056
- c: function(e, t, n) {
1057
- t = Ft(t, n), t = G(t, 0), e & 24 && (t = t.replace(/\s+$/, ""), t += (0 < t.length ? `
1058
- ` : "") + Tt(e)), e & 1 ? e & 4 ? console.error(t) : e & 2 ? console.warn(t) : e & 512 ? console.info(t) : e & 256 ? console.debug(t) : console.log(t) : e & 6 ? v(t) : W(t);
1059
- },
1060
- q: function(e, t, n) {
1061
- ee.copyWithin(e, t, t + n);
1062
- },
1063
- p: function(e) {
1064
- var t = ee.length;
1065
- if (e >>>= 0, 2147483648 < e)
1066
- return !1;
1067
- for (var n = 1; 4 >= n; n *= 2) {
1068
- var s = t * (1 + 0.2 / n);
1069
- s = Math.min(s, e + 100663296);
1070
- var u = Math;
1071
- s = Math.max(e, s), u = u.min.call(u, 2147483648, s + (65536 - s % 65536) % 65536);
1072
- e: {
1073
- try {
1074
- U.grow(u - ye.byteLength + 65535 >>> 16), ze();
1075
- var a = 1;
1076
- break e;
1077
- } catch {
1078
- }
1079
- a = void 0;
1080
- }
1081
- if (a)
1082
- return !0;
1083
- }
1049
+ var Nt = { a: function(e, t, n, u) {
1050
+ ue("Assertion failed: " + V(e) + ", at: " + [t ? V(t) : "unknown filename", n, u ? V(u) : "unknown function"]);
1051
+ }, b: function() {
1052
+ ue("");
1053
+ }, c: function(e, t, n) {
1054
+ t = Wt(t, n), t = G(t, 0), e & 24 && (t = t.replace(/\s+$/, ""), t += (0 < t.length ? `
1055
+ ` : "") + Rt(e)), e & 1 ? e & 4 ? console.error(t) : e & 2 ? console.warn(t) : e & 512 ? console.info(t) : e & 256 ? console.debug(t) : console.log(t) : e & 6 ? P(t) : R(t);
1056
+ }, q: function(e, t, n) {
1057
+ ee.copyWithin(e, t, t + n);
1058
+ }, p: function(e) {
1059
+ var t = ee.length;
1060
+ if (e >>>= 0, 2147483648 < e)
1084
1061
  return !1;
1085
- },
1086
- m: function(e, t) {
1087
- return t >>= 2, t = { alpha: !!C[t + 0], depth: !!C[t + 1], stencil: !!C[t + 2], antialias: !!C[t + 3], premultipliedAlpha: !!C[t + 4], preserveDrawingBuffer: !!C[t + 5], powerPreference: jt[C[t + 6]], failIfMajorPerformanceCaveat: !!C[t + 7], ra: C[t + 8], Ia: C[t + 9], qa: C[t + 10], Aa: C[t + 11], La: C[t + 12], Ma: C[t + 13] }, e = 2 < e ? V(e) : e, e = Ot[e] || (typeof document < "u" ? document.querySelector(e) : void 0), !e || t.Aa ? 0 : Lt(e, t);
1088
- },
1089
- e: function(e) {
1090
- return b = be[e], r.Da = d = b && b.ga, !e || d ? 0 : -5;
1091
- },
1092
- k: function(e, t) {
1093
- d.attachShader(te[e], ne[t]);
1094
- },
1095
- E: function(e, t, n) {
1096
- d.bindAttribLocation(te[e], t, V(n));
1097
- },
1098
- d: function(e, t) {
1099
- e == 34962 ? d.$ = t : e == 34963 && (d.aa = t), e == 35051 ? d.na = t : e == 35052 && (d.oa = t), d.bindBuffer(e, ce[t]);
1100
- },
1101
- g: function(e, t, n, s) {
1102
- 2 <= b.version ? n ? d.bufferData(e, ee, s, n, t) : d.bufferData(e, t, s) : d.bufferData(e, n ? ee.subarray(n, n + t) : t, s);
1103
- },
1104
- z: function(e) {
1105
- d.clear(e);
1106
- },
1107
- A: function(e, t, n, s) {
1108
- d.clearColor(e, t, n, s);
1109
- },
1110
- r: function(e) {
1111
- d.compileShader(ne[e]);
1112
- },
1113
- l: function() {
1114
- var e = ge(te), t = d.createProgram();
1115
- return t.name = e, t.ea = t.ba = t.da = 0, t.ma = 1, te[e] = t, e;
1116
- },
1117
- F: function(e) {
1118
- var t = ge(ne);
1119
- return ne[t] = d.createShader(e), t;
1120
- },
1121
- f: function(e, t) {
1122
- for (var n = 0; n < e; n++) {
1123
- var s = C[t + 4 * n >> 2], u = ce[s];
1124
- u && (d.deleteBuffer(u), u.name = 0, ce[s] = null, s == d.$ && (d.$ = 0), s == d.aa && (d.aa = 0), s == d.na && (d.na = 0), s == d.oa && (d.oa = 0));
1125
- }
1126
- },
1127
- s: function(e, t) {
1128
- for (var n = 0; n < e; n++) {
1129
- var s = C[t + 4 * n >> 2];
1130
- d.deleteVertexArray(nt[s]), nt[s] = null;
1131
- }
1132
- },
1133
- u: function(e, t, n, s) {
1134
- if (!d.aa) {
1135
- var u = 1 * rt[n - 5120] * t, a = Le(u), c = b.U[a];
1136
- c ? a = c : (c = d.getParameter(34965), b.U[a] = d.createBuffer(), d.bindBuffer(34963, b.U[a]), d.bufferData(34963, 1 << a, 35048), d.bindBuffer(34963, c), a = b.U[a]), d.bindBuffer(34963, a), d.bufferSubData(34963, 0, ee.subarray(s, s + u)), s = 0;
1062
+ for (var n = 1; 4 >= n; n *= 2) {
1063
+ var u = t * (1 + 0.2 / n);
1064
+ u = Math.min(u, e + 100663296);
1065
+ var s = Math;
1066
+ u = Math.max(e, u), s = s.min.call(s, 2147483648, u + (65536 - u % 65536) % 65536);
1067
+ e: {
1068
+ try {
1069
+ q.grow(s - he.byteLength + 65535 >>> 16), Ge();
1070
+ var a = 1;
1071
+ break e;
1072
+ } catch {
1073
+ }
1074
+ a = void 0;
1137
1075
  }
1138
- for (Se = !1, u = 0; u < b.sa; ++u)
1139
- if (a = b.Z[u], a.ia && a.enabled) {
1140
- Se = !0, c = a.ka, c = 0 < c ? t * c : a.size * rt[a.type - 5120] * t;
1141
- var y = Le(c), B = b.fa[y], m = b.W[y];
1142
- b.W[y] = b.W[y] + 1 & 63;
1143
- var k = B[m];
1144
- k ? y = k : (k = d.getParameter(34964), B[m] = d.createBuffer(), d.bindBuffer(34962, B[m]), d.bufferData(34962, 1 << y, 35048), d.bindBuffer(34962, k), y = B[m]), d.bindBuffer(34962, y), d.bufferSubData(34962, 0, ee.subarray(a.T, a.T + c)), a.xa.call(d, u, a.size, a.type, a.ta, a.ka, 0);
1076
+ if (a)
1077
+ return !0;
1078
+ }
1079
+ return !1;
1080
+ }, l: function(e, t) {
1081
+ return t >>= 2, t = { alpha: !!C[t + 0], depth: !!C[t + 1], stencil: !!C[t + 2], antialias: !!C[t + 3], premultipliedAlpha: !!C[t + 4], preserveDrawingBuffer: !!C[t + 5], powerPreference: Ot[C[t + 6]], failIfMajorPerformanceCaveat: !!C[t + 7], sa: C[t + 8], La: C[t + 9], ra: C[t + 10], Ca: C[t + 11], Oa: C[t + 12], Pa: C[t + 13] }, e = 2 < e ? V(e) : e, e = Vt[e] || (typeof document < "u" ? document.querySelector(e) : void 0), !e || t.Ca ? 0 : It(e, t);
1082
+ }, m: function(e) {
1083
+ if (b == e && (b = 0), b === re[e] && (b = null), typeof jt == "object") {
1084
+ for (var t = re[e].V.canvas, n = 0; n < me.length; ++n)
1085
+ if (me[n].target == t) {
1086
+ var u = n--, s = me[u];
1087
+ s.target.removeEventListener(s.Ha, s.Ga, s.Qa), me.splice(u, 1);
1145
1088
  }
1146
- d.drawElements(e, t, n, s), Se && d.bindBuffer(34962, ce[d.$]), d.aa || d.bindBuffer(34963, null);
1147
- },
1148
- w: function(e) {
1149
- b.Z[e].enabled = !0, d.enableVertexAttribArray(e);
1150
- },
1151
- h: function(e, t) {
1152
- for (var n = 0; n < e; n++) {
1153
- var s = d.createBuffer(), u = s && ge(ce);
1154
- s ? (s.name = u, ce[u] = s) : le(1282), C[t + 4 * n >> 2] = u;
1089
+ }
1090
+ re[e] && re[e].V.canvas && (re[e].V.canvas.za = void 0), re[e] = null;
1091
+ }, e: function(e) {
1092
+ return b = re[e], r.Ea = d = b && b.V, !e || d ? 0 : -5;
1093
+ }, k: function(e, t) {
1094
+ d.attachShader(te[e], ne[t]);
1095
+ }, E: function(e, t, n) {
1096
+ d.bindAttribLocation(
1097
+ te[e],
1098
+ t,
1099
+ V(n)
1100
+ );
1101
+ }, d: function(e, t) {
1102
+ e == 34962 ? d.ba = t : e == 34963 && (d.da = t), e == 35051 ? d.oa = t : e == 35052 && (d.pa = t), d.bindBuffer(e, le[t]);
1103
+ }, g: function(e, t, n, u) {
1104
+ 2 <= b.version ? n ? d.bufferData(e, ee, u, n, t) : d.bufferData(e, t, u) : d.bufferData(e, n ? ee.subarray(n, n + t) : t, u);
1105
+ }, z: function(e) {
1106
+ d.clear(e);
1107
+ }, A: function(e, t, n, u) {
1108
+ d.clearColor(e, t, n, u);
1109
+ }, r: function(e) {
1110
+ d.compileShader(ne[e]);
1111
+ }, F: function() {
1112
+ var e = we(te), t = d.createProgram();
1113
+ return t.name = e, t.ga = t.ea = t.fa = 0, t.na = 1, te[e] = t, e;
1114
+ }, G: function(e) {
1115
+ var t = we(ne);
1116
+ return ne[t] = d.createShader(e), t;
1117
+ }, f: function(e, t) {
1118
+ for (var n = 0; n < e; n++) {
1119
+ var u = C[t + 4 * n >> 2], s = le[u];
1120
+ s && (d.deleteBuffer(s), s.name = 0, le[u] = null, u == d.ba && (d.ba = 0), u == d.da && (d.da = 0), u == d.oa && (d.oa = 0), u == d.pa && (d.pa = 0));
1121
+ }
1122
+ }, s: function(e, t) {
1123
+ for (var n = 0; n < e; n++) {
1124
+ var u = C[t + 4 * n >> 2];
1125
+ d.deleteVertexArray(rt[u]), rt[u] = null;
1126
+ }
1127
+ }, u: function(e, t, n, u) {
1128
+ if (!d.da) {
1129
+ var s = 1 * it[n - 5120] * t, a = Ie(s), c = b.W[a];
1130
+ c ? a = c : (c = d.getParameter(34965), b.W[a] = d.createBuffer(), d.bindBuffer(34963, b.W[a]), d.bufferData(34963, 1 << a, 35048), d.bindBuffer(34963, c), a = b.W[a]), d.bindBuffer(34963, a), d.bufferSubData(34963, 0, ee.subarray(u, u + s)), u = 0;
1131
+ }
1132
+ for (Le = !1, s = 0; s < b.ta; ++s)
1133
+ if (a = b.aa[s], a.ja && a.enabled) {
1134
+ Le = !0, c = a.la, c = 0 < c ? t * c : a.size * it[a.type - 5120] * t;
1135
+ var y = Ie(c), B = b.ha[y], m = b.Y[y];
1136
+ b.Y[y] = b.Y[y] + 1 & 63;
1137
+ var k = B[m];
1138
+ k ? y = k : (k = d.getParameter(34964), B[m] = d.createBuffer(), d.bindBuffer(34962, B[m]), d.bufferData(34962, 1 << y, 35048), d.bindBuffer(34962, k), y = B[m]), d.bindBuffer(34962, y), d.bufferSubData(34962, 0, ee.subarray(a.U, a.U + c)), a.ya.call(d, s, a.size, a.type, a.ua, a.la, 0);
1155
1139
  }
1156
- },
1157
- t: function() {
1158
- var e = d.getError() || we;
1159
- return we = 0, e;
1160
- },
1161
- B: function(e, t, n) {
1162
- if (n)
1163
- if (e >= tt)
1164
- le(1281);
1165
- else if (e = te[e], t == 35716)
1166
- e = d.getProgramInfoLog(e), e === null && (e = "(unknown error)"), C[n >> 2] = e.length + 1;
1167
- else if (t == 35719) {
1168
- if (!e.ea)
1169
- for (t = 0; t < d.getProgramParameter(e, 35718); ++t)
1170
- e.ea = Math.max(e.ea, d.getActiveUniform(e, t).name.length + 1);
1171
- C[n >> 2] = e.ea;
1172
- } else if (t == 35722) {
1173
- if (!e.ba)
1174
- for (t = 0; t < d.getProgramParameter(e, 35721); ++t)
1175
- e.ba = Math.max(e.ba, d.getActiveAttrib(e, t).name.length + 1);
1176
- C[n >> 2] = e.ba;
1177
- } else if (t == 35381) {
1178
- if (!e.da)
1179
- for (t = 0; t < d.getProgramParameter(e, 35382); ++t)
1180
- e.da = Math.max(e.da, d.getActiveUniformBlockName(e, t).length + 1);
1181
- C[n >> 2] = e.da;
1182
- } else
1183
- C[n >> 2] = d.getProgramParameter(e, t);
1184
- else
1185
- le(1281);
1186
- },
1187
- n: function(e, t, n, s) {
1188
- e = d.getShaderInfoLog(ne[e]), e === null && (e = "(unknown error)"), t = 0 < t && s ? pe(e, ee, s, t) : 0, n && (C[n >> 2] = t);
1189
- },
1190
- o: function(e, t, n) {
1191
- n ? t == 35716 ? (e = d.getShaderInfoLog(ne[e]), e === null && (e = "(unknown error)"), C[n >> 2] = e ? e.length + 1 : 0) : t == 35720 ? (e = d.getShaderSource(ne[e]), C[n >> 2] = e ? e.length + 1 : 0) : C[n >> 2] = d.getShaderParameter(ne[e], t) : le(1281);
1192
- },
1193
- j: function(e, t) {
1194
- if (t = V(t), e = te[e]) {
1195
- var n = e, s = n.X, u = n.wa, a;
1196
- if (!s)
1197
- for (n.X = s = {}, n.va = {}, a = 0; a < d.getProgramParameter(n, 35718); ++a) {
1198
- var c = d.getActiveUniform(n, a), y = c.name;
1199
- c = c.size;
1200
- var B = it(y);
1201
- B = 0 < B ? y.slice(0, B) : y;
1202
- var m = n.ma;
1203
- for (n.ma += c, u[B] = [c, m], y = 0; y < c; ++y)
1204
- s[m] = y, n.va[m++] = B;
1205
- }
1206
- if (n = e.X, s = 0, u = t, a = it(t), 0 < a && (s = parseInt(t.slice(a + 1)) >>> 0, u = t.slice(0, a)), (u = e.wa[u]) && s < u[0] && (s += u[1], n[s] = n[s] || d.getUniformLocation(e, t)))
1207
- return s;
1140
+ d.drawElements(e, t, n, u), Le && d.bindBuffer(
1141
+ 34962,
1142
+ le[d.ba]
1143
+ ), d.da || d.bindBuffer(34963, null);
1144
+ }, w: function(e) {
1145
+ b.aa[e].enabled = !0, d.enableVertexAttribArray(e);
1146
+ }, h: function(e, t) {
1147
+ for (var n = 0; n < e; n++) {
1148
+ var u = d.createBuffer(), s = u && we(le);
1149
+ u ? (u.name = s, le[s] = u) : fe(1282), C[t + 4 * n >> 2] = s;
1150
+ }
1151
+ }, t: function() {
1152
+ var e = d.getError() || _e;
1153
+ return _e = 0, e;
1154
+ }, B: function(e, t, n) {
1155
+ if (n)
1156
+ if (e >= nt)
1157
+ fe(1281);
1158
+ else if (e = te[e], t == 35716)
1159
+ e = d.getProgramInfoLog(e), e === null && (e = "(unknown error)"), C[n >> 2] = e.length + 1;
1160
+ else if (t == 35719) {
1161
+ if (!e.ga)
1162
+ for (t = 0; t < d.getProgramParameter(e, 35718); ++t)
1163
+ e.ga = Math.max(
1164
+ e.ga,
1165
+ d.getActiveUniform(e, t).name.length + 1
1166
+ );
1167
+ C[n >> 2] = e.ga;
1168
+ } else if (t == 35722) {
1169
+ if (!e.ea)
1170
+ for (t = 0; t < d.getProgramParameter(e, 35721); ++t)
1171
+ e.ea = Math.max(e.ea, d.getActiveAttrib(e, t).name.length + 1);
1172
+ C[n >> 2] = e.ea;
1173
+ } else if (t == 35381) {
1174
+ if (!e.fa)
1175
+ for (t = 0; t < d.getProgramParameter(e, 35382); ++t)
1176
+ e.fa = Math.max(e.fa, d.getActiveUniformBlockName(e, t).length + 1);
1177
+ C[n >> 2] = e.fa;
1208
1178
  } else
1209
- le(1281);
1210
- return -1;
1211
- },
1212
- D: function(e) {
1213
- e = te[e], d.linkProgram(e), e.X = 0, e.wa = {};
1214
- },
1215
- x: function(e, t, n, s) {
1216
- for (var u = "", a = 0; a < t; ++a) {
1217
- var c = s ? C[s + 4 * a >> 2] : -1;
1218
- u += V(C[n + 4 * a >> 2], 0 > c ? void 0 : c);
1219
- }
1220
- d.shaderSource(ne[e], u);
1221
- },
1222
- i: function(e, t, n, s) {
1223
- if (2 <= b.version)
1224
- d.uniformMatrix4fv(st(e), !!n, he, s >> 2, 16 * t);
1225
- else {
1226
- if (18 >= t) {
1227
- var u = ot[16 * t - 1], a = he;
1228
- s >>= 2;
1229
- for (var c = 0; c < 16 * t; c += 16) {
1230
- var y = s + c;
1231
- u[c] = a[y], u[c + 1] = a[y + 1], u[c + 2] = a[y + 2], u[c + 3] = a[y + 3], u[c + 4] = a[y + 4], u[c + 5] = a[y + 5], u[c + 6] = a[y + 6], u[c + 7] = a[y + 7], u[c + 8] = a[y + 8], u[c + 9] = a[y + 9], u[c + 10] = a[y + 10], u[c + 11] = a[y + 11], u[c + 12] = a[y + 12], u[c + 13] = a[y + 13], u[c + 14] = a[y + 14], u[c + 15] = a[y + 15];
1232
- }
1233
- } else
1234
- u = he.subarray(s >> 2, s + 64 * t >> 2);
1235
- d.uniformMatrix4fv(st(e), !!n, u);
1236
- }
1237
- },
1238
- y: function(e) {
1239
- e = te[e], d.useProgram(e), d.za = e;
1240
- },
1241
- C: function(e) {
1242
- d.validateProgram(te[e]);
1243
- },
1244
- v: function(e, t, n, s, u, a) {
1245
- var c = b.Z[e];
1246
- d.$ ? (c.ia = !1, d.vertexAttribPointer(e, t, n, !!s, u, a)) : (c.size = t, c.type = n, c.ta = s, c.ka = u, c.T = a, c.ia = !0, c.xa = function(y, B, m, k, re, H) {
1247
- this.vertexAttribPointer(y, B, m, k, re, H);
1248
- });
1179
+ C[n >> 2] = d.getProgramParameter(e, t);
1180
+ else
1181
+ fe(1281);
1182
+ }, n: function(e, t, n, u) {
1183
+ e = d.getShaderInfoLog(ne[e]), e === null && (e = "(unknown error)"), t = 0 < t && u ? ye(e, ee, u, t) : 0, n && (C[n >> 2] = t);
1184
+ }, o: function(e, t, n) {
1185
+ n ? t == 35716 ? (e = d.getShaderInfoLog(ne[e]), e === null && (e = "(unknown error)"), C[n >> 2] = e ? e.length + 1 : 0) : t == 35720 ? (e = d.getShaderSource(ne[e]), C[n >> 2] = e ? e.length + 1 : 0) : C[n >> 2] = d.getShaderParameter(ne[e], t) : fe(1281);
1186
+ }, j: function(e, t) {
1187
+ if (t = V(t), e = te[e]) {
1188
+ var n = e, u = n.Z, s = n.xa, a;
1189
+ if (!u)
1190
+ for (n.Z = u = {}, n.wa = {}, a = 0; a < d.getProgramParameter(n, 35718); ++a) {
1191
+ var c = d.getActiveUniform(n, a), y = c.name;
1192
+ c = c.size;
1193
+ var B = ut(y);
1194
+ B = 0 < B ? y.slice(0, B) : y;
1195
+ var m = n.na;
1196
+ for (n.na += c, s[B] = [c, m], y = 0; y < c; ++y)
1197
+ u[m] = y, n.wa[m++] = B;
1198
+ }
1199
+ if (n = e.Z, u = 0, s = t, a = ut(t), 0 < a && (u = parseInt(t.slice(a + 1)) >>> 0, s = t.slice(0, a)), (s = e.xa[s]) && u < s[0] && (u += s[1], n[u] = n[u] || d.getUniformLocation(e, t)))
1200
+ return u;
1201
+ } else
1202
+ fe(1281);
1203
+ return -1;
1204
+ }, D: function(e) {
1205
+ e = te[e], d.linkProgram(e), e.Z = 0, e.xa = {};
1206
+ }, x: function(e, t, n, u) {
1207
+ for (var s = "", a = 0; a < t; ++a) {
1208
+ var c = u ? C[u + 4 * a >> 2] : -1;
1209
+ s += V(C[n + 4 * a >> 2], 0 > c ? void 0 : c);
1249
1210
  }
1250
- };
1211
+ d.shaderSource(ne[e], s);
1212
+ }, i: function(e, t, n, u) {
1213
+ if (2 <= b.version)
1214
+ d.uniformMatrix4fv(st(e), !!n, Ee, u >> 2, 16 * t);
1215
+ else {
1216
+ if (18 >= t) {
1217
+ var s = ot[16 * t - 1], a = Ee;
1218
+ u >>= 2;
1219
+ for (var c = 0; c < 16 * t; c += 16) {
1220
+ var y = u + c;
1221
+ s[c] = a[y], s[c + 1] = a[y + 1], s[c + 2] = a[y + 2], s[c + 3] = a[y + 3], s[c + 4] = a[y + 4], s[c + 5] = a[y + 5], s[c + 6] = a[y + 6], s[c + 7] = a[y + 7], s[c + 8] = a[y + 8], s[c + 9] = a[y + 9], s[c + 10] = a[y + 10], s[c + 11] = a[y + 11], s[c + 12] = a[y + 12], s[c + 13] = a[y + 13], s[c + 14] = a[y + 14], s[c + 15] = a[y + 15];
1222
+ }
1223
+ } else
1224
+ s = Ee.subarray(u >> 2, u + 64 * t >> 2);
1225
+ d.uniformMatrix4fv(st(e), !!n, s);
1226
+ }
1227
+ }, y: function(e) {
1228
+ e = te[e], d.useProgram(e), d.Ba = e;
1229
+ }, C: function(e) {
1230
+ d.validateProgram(te[e]);
1231
+ }, v: function(e, t, n, u, s, a) {
1232
+ var c = b.aa[e];
1233
+ d.ba ? (c.ja = !1, d.vertexAttribPointer(e, t, n, !!u, s, a)) : (c.size = t, c.type = n, c.ua = u, c.la = s, c.U = a, c.ja = !0, c.ya = function(y, B, m, k, ie, H) {
1234
+ this.vertexAttribPointer(y, B, m, k, ie, H);
1235
+ });
1236
+ } };
1251
1237
  (function() {
1252
- function e(u) {
1253
- r.asm = u.exports, U = r.asm.G, ze(), Ge = r.asm.P, $e.unshift(r.asm.H), ae--, r.monitorRunDependencies && r.monitorRunDependencies(ae), ae == 0 && de && (u = de, de = null, u());
1238
+ function e(s) {
1239
+ r.asm = s.exports, q = r.asm.H, Ge(), Xe = r.asm.Q, Ye.unshift(r.asm.I), ce--, r.monitorRunDependencies && r.monitorRunDependencies(ce), ce == 0 && pe && (s = pe, pe = null, s());
1254
1240
  }
1255
- function t(u) {
1256
- e(u.instance);
1241
+ function t(s) {
1242
+ e(s.instance);
1257
1243
  }
1258
- function n(u) {
1259
- return kt().then(function(a) {
1260
- return WebAssembly.instantiate(a, s);
1244
+ function n(s) {
1245
+ return Ft().then(function(a) {
1246
+ return WebAssembly.instantiate(a, u);
1261
1247
  }).then(function(a) {
1262
1248
  return a;
1263
- }).then(u, function(a) {
1264
- v("failed to asynchronously prepare wasm: " + a), ie(a);
1249
+ }).then(s, function(a) {
1250
+ P("failed to asynchronously prepare wasm: " + a), ue(a);
1265
1251
  });
1266
1252
  }
1267
- var s = { a: Vt };
1268
- if (ae++, r.monitorRunDependencies && r.monitorRunDependencies(ae), r.instantiateWasm)
1253
+ var u = { a: Nt };
1254
+ if (ce++, r.monitorRunDependencies && r.monitorRunDependencies(ce), r.instantiateWasm)
1269
1255
  try {
1270
1256
  return r.instantiateWasm(
1271
- s,
1257
+ u,
1272
1258
  e
1273
1259
  );
1274
- } catch (u) {
1275
- return v("Module.instantiateWasm callback failed with error: " + u), !1;
1260
+ } catch (s) {
1261
+ return P("Module.instantiateWasm callback failed with error: " + s), !1;
1276
1262
  }
1277
1263
  return function() {
1278
- return O || typeof WebAssembly.instantiateStreaming != "function" || Ze() || $.startsWith("file://") || typeof fetch != "function" ? n(t) : fetch($, { credentials: "same-origin" }).then(function(u) {
1279
- return WebAssembly.instantiateStreaming(u, s).then(t, function(a) {
1280
- return v("wasm streaming compile failed: " + a), v("falling back to ArrayBuffer instantiation"), n(t);
1264
+ return j || typeof WebAssembly.instantiateStreaming != "function" || Je() || $.startsWith("file://") || typeof fetch != "function" ? n(t) : fetch($, { credentials: "same-origin" }).then(function(s) {
1265
+ return WebAssembly.instantiateStreaming(s, u).then(t, function(a) {
1266
+ return P("wasm streaming compile failed: " + a), P("falling back to ArrayBuffer instantiation"), n(t);
1281
1267
  });
1282
1268
  });
1283
1269
  }().catch(l), {};
1284
1270
  })(), r.___wasm_call_ctors = function() {
1285
- return (r.___wasm_call_ctors = r.asm.H).apply(null, arguments);
1271
+ return (r.___wasm_call_ctors = r.asm.I).apply(null, arguments);
1286
1272
  };
1287
- var at = r._emscripten_bind_VoidPtr___destroy___0 = function() {
1288
- return (at = r._emscripten_bind_VoidPtr___destroy___0 = r.asm.I).apply(null, arguments);
1289
- }, ct = r._emscripten_bind_McObject_updateDisplay_2 = function() {
1290
- return (ct = r._emscripten_bind_McObject_updateDisplay_2 = r.asm.J).apply(null, arguments);
1291
- }, lt = r._emscripten_bind_McObject_test_0 = function() {
1292
- return (lt = r._emscripten_bind_McObject_test_0 = r.asm.K).apply(null, arguments);
1293
- }, ft = r._emscripten_bind_McApp_McApp_0 = function() {
1294
- return (ft = r._emscripten_bind_McApp_McApp_0 = r.asm.L).apply(null, arguments);
1295
- }, dt = r._emscripten_bind_McApp_Init_0 = function() {
1296
- return (dt = r._emscripten_bind_McApp_Init_0 = r.asm.M).apply(null, arguments);
1297
- }, pt = r._emscripten_bind_McApp_CreateMxDraw_3 = function() {
1298
- return (pt = r._emscripten_bind_McApp_CreateMxDraw_3 = r.asm.N).apply(null, arguments);
1299
- }, yt = r._emscripten_bind_McApp___destroy___0 = function() {
1300
- return (yt = r._emscripten_bind_McApp___destroy___0 = r.asm.O).apply(null, arguments);
1301
- }, ht = r._strlen = function() {
1302
- return (ht = r._strlen = r.asm.Q).apply(null, arguments);
1273
+ var ct = r._emscripten_bind_VoidPtr___destroy___0 = function() {
1274
+ return (ct = r._emscripten_bind_VoidPtr___destroy___0 = r.asm.J).apply(null, arguments);
1275
+ }, lt = r._emscripten_bind_McObject_updateDisplay_2 = function() {
1276
+ return (lt = r._emscripten_bind_McObject_updateDisplay_2 = r.asm.K).apply(null, arguments);
1277
+ }, ft = r._emscripten_bind_McObject_test_0 = function() {
1278
+ return (ft = r._emscripten_bind_McObject_test_0 = r.asm.L).apply(null, arguments);
1279
+ }, dt = r._emscripten_bind_McApp_McApp_0 = function() {
1280
+ return (dt = r._emscripten_bind_McApp_McApp_0 = r.asm.M).apply(null, arguments);
1281
+ }, pt = r._emscripten_bind_McApp_Init_0 = function() {
1282
+ return (pt = r._emscripten_bind_McApp_Init_0 = r.asm.N).apply(null, arguments);
1283
+ }, yt = r._emscripten_bind_McApp_CreateMxDraw_3 = function() {
1284
+ return (yt = r._emscripten_bind_McApp_CreateMxDraw_3 = r.asm.O).apply(null, arguments);
1285
+ }, ht = r._emscripten_bind_McApp___destroy___0 = function() {
1286
+ return (ht = r._emscripten_bind_McApp___destroy___0 = r.asm.P).apply(null, arguments);
1287
+ }, Et = r._strlen = function() {
1288
+ return (Et = r._strlen = r.asm.R).apply(null, arguments);
1303
1289
  };
1304
1290
  r._free = function() {
1305
- return (r._free = r.asm.R).apply(null, arguments);
1291
+ return (r._free = r.asm.S).apply(null, arguments);
1306
1292
  }, r._malloc = function() {
1307
- return (r._malloc = r.asm.S).apply(null, arguments);
1293
+ return (r._malloc = r.asm.T).apply(null, arguments);
1308
1294
  };
1309
- var me;
1310
- de = function e() {
1311
- me || Ie(), me || (de = e);
1295
+ var ve;
1296
+ pe = function e() {
1297
+ ve || Ke(), ve || (pe = e);
1312
1298
  };
1313
- function Ie() {
1299
+ function Ke() {
1314
1300
  function e() {
1315
- if (!me && (me = !0, r.calledRun = !0, !N)) {
1316
- if (We($e), f(r), r.onRuntimeInitialized && r.onRuntimeInitialized(), r.postRun)
1301
+ if (!ve && (ve = !0, r.calledRun = !0, !N)) {
1302
+ if (Te(Ye), f(r), r.onRuntimeInitialized && r.onRuntimeInitialized(), r.postRun)
1317
1303
  for (typeof r.postRun == "function" && (r.postRun = [r.postRun]); r.postRun.length; ) {
1318
1304
  var t = r.postRun.shift();
1319
- Ye.unshift(t);
1305
+ Ze.unshift(t);
1320
1306
  }
1321
- We(Ye);
1307
+ Te(Ze);
1322
1308
  }
1323
1309
  }
1324
- if (!(0 < ae)) {
1310
+ if (!(0 < ce)) {
1325
1311
  if (r.preRun)
1326
1312
  for (typeof r.preRun == "function" && (r.preRun = [r.preRun]); r.preRun.length; )
1327
- Dt();
1328
- We(Xe), 0 < ae || (r.setStatus ? (r.setStatus("Running..."), setTimeout(function() {
1313
+ kt();
1314
+ Te($e), 0 < ce || (r.setStatus ? (r.setStatus("Running..."), setTimeout(function() {
1329
1315
  setTimeout(function() {
1330
1316
  r.setStatus("");
1331
1317
  }, 1), e();
1332
1318
  }, 1)) : e());
1333
1319
  }
1334
1320
  }
1335
- if (r.run = Ie, r.preInit)
1321
+ if (r.run = Ke, r.preInit)
1336
1322
  for (typeof r.preInit == "function" && (r.preInit = [r.preInit]); 0 < r.preInit.length; )
1337
1323
  r.preInit.pop()();
1338
- Ie();
1324
+ Ke();
1339
1325
  function X() {
1340
1326
  }
1341
- X.prototype = Object.create(X.prototype), X.prototype.constructor = X, X.prototype.V = X, X.Y = {}, r.WrapperObject = X;
1342
- function ve(e) {
1343
- return (e || X).Y;
1327
+ X.prototype = Object.create(X.prototype), X.prototype.constructor = X, X.prototype.X = X, X.$ = {}, r.WrapperObject = X;
1328
+ function xe(e) {
1329
+ return (e || X).$;
1344
1330
  }
1345
- r.getCache = ve;
1346
- function Pe(e, t) {
1347
- var n = ve(t), s = n[e];
1348
- return s || (s = Object.create((t || X).prototype), s.T = e, n[e] = s);
1331
+ r.getCache = xe;
1332
+ function Me(e, t) {
1333
+ var n = xe(t), u = n[e];
1334
+ return u || (u = Object.create((t || X).prototype), u.U = e, n[e] = u);
1349
1335
  }
1350
- r.wrapPointer = Pe, r.castObject = function(e, t) {
1351
- return Pe(e.T, t);
1352
- }, r.NULL = Pe(0), r.destroy = function(e) {
1336
+ r.wrapPointer = Me, r.castObject = function(e, t) {
1337
+ return Me(e.U, t);
1338
+ }, r.NULL = Me(0), r.destroy = function(e) {
1353
1339
  if (!e.__destroy__)
1354
1340
  throw "Error: Cannot destroy object. (Did you create it yourself?)";
1355
- e.__destroy__(), delete ve(e.V)[e.T];
1341
+ e.__destroy__(), delete xe(e.X)[e.U];
1356
1342
  }, r.compare = function(e, t) {
1357
- return e.T === t.T;
1343
+ return e.U === t.U;
1358
1344
  }, r.getPointer = function(e) {
1359
- return e.T;
1345
+ return e.U;
1360
1346
  }, r.getClass = function(e) {
1361
- return e.V;
1347
+ return e.X;
1362
1348
  };
1363
- var fe = 0, xe = 0, Me = 0, Ce = [], Be = 0;
1364
- function Et() {
1365
- if (Be) {
1366
- for (var e = 0; e < Ce.length; e++)
1367
- r._free(Ce[e]);
1368
- Ce.length = 0, r._free(fe), fe = 0, xe += Be, Be = 0;
1349
+ var de = 0, Ce = 0, Be = 0, De = [], ke = 0;
1350
+ function At() {
1351
+ if (ke) {
1352
+ for (var e = 0; e < De.length; e++)
1353
+ r._free(De[e]);
1354
+ De.length = 0, r._free(de), de = 0, Ce += ke, ke = 0;
1369
1355
  }
1370
- fe || (xe += 128, (fe = r._malloc(xe)) || ie(void 0)), Me = 0;
1356
+ de || (Ce += 128, (de = r._malloc(Ce)) || ue(void 0)), Be = 0;
1371
1357
  }
1372
- function At(e, t) {
1373
- return fe || ie(void 0), e = e.length * t.BYTES_PER_ELEMENT, e = e + 7 & -8, Me + e >= xe ? (0 < e || ie(void 0), Be += e, t = r._malloc(e), Ce.push(t)) : (t = fe + Me, Me += e), t;
1358
+ function gt(e, t) {
1359
+ return de || ue(void 0), e = e.length * t.BYTES_PER_ELEMENT, e = e + 7 & -8, Be + e >= Ce ? (0 < e || ue(void 0), ke += e, t = r._malloc(e), De.push(t)) : (t = de + Be, Be += e), t;
1374
1360
  }
1375
- function gt(e, t, n) {
1361
+ function wt(e, t, n) {
1376
1362
  switch (n >>>= 0, t.BYTES_PER_ELEMENT) {
1377
1363
  case 2:
1378
1364
  n >>>= 1;
@@ -1383,99 +1369,99 @@ var Fe = (() => {
1383
1369
  case 8:
1384
1370
  n >>>= 3;
1385
1371
  }
1386
- for (var s = 0; s < e.length; s++)
1387
- t[n + s] = e[s];
1372
+ for (var u = 0; u < e.length; u++)
1373
+ t[n + u] = e[u];
1388
1374
  }
1389
- function wt(e) {
1375
+ function _t(e) {
1390
1376
  if (typeof e == "object") {
1391
- var t = At(e, Ee);
1392
- return gt(e, Ee, t), t;
1377
+ var t = gt(e, Ae);
1378
+ return wt(e, Ae, t), t;
1393
1379
  }
1394
1380
  return e;
1395
1381
  }
1396
1382
  function se() {
1397
1383
  throw "cannot construct a VoidPtr, no constructor in IDL";
1398
1384
  }
1399
- se.prototype = Object.create(X.prototype), se.prototype.constructor = se, se.prototype.V = se, se.Y = {}, r.VoidPtr = se, se.prototype.__destroy__ = function() {
1400
- at(this.T);
1385
+ se.prototype = Object.create(X.prototype), se.prototype.constructor = se, se.prototype.X = se, se.$ = {}, r.VoidPtr = se, se.prototype.__destroy__ = function() {
1386
+ ct(this.U);
1401
1387
  };
1402
1388
  function Z() {
1403
1389
  throw "cannot construct a McObject, no constructor in IDL";
1404
1390
  }
1405
- Z.prototype = Object.create(X.prototype), Z.prototype.constructor = Z, Z.prototype.V = Z, Z.Y = {}, r.McObject = Z, Z.prototype.updateDisplay = function(e, t) {
1406
- var n = this.T;
1407
- return Et(), typeof e == "object" && (e = wt(e)), typeof t == "object" && (t = wt(t)), !!ct(n, e, t);
1391
+ Z.prototype = Object.create(X.prototype), Z.prototype.constructor = Z, Z.prototype.X = Z, Z.$ = {}, r.McObject = Z, Z.prototype.updateDisplay = function(e, t) {
1392
+ var n = this.U;
1393
+ return At(), typeof e == "object" && (e = _t(e)), typeof t == "object" && (t = _t(t)), !!lt(n, e, t);
1408
1394
  }, Z.prototype.test = Z.prototype.test = function() {
1409
- lt(this.T);
1395
+ ft(this.U);
1410
1396
  };
1411
1397
  function J() {
1412
- this.T = ft(), ve(J)[this.T] = this;
1398
+ this.U = dt(), xe(J)[this.U] = this;
1413
1399
  }
1414
- return J.prototype = Object.create(X.prototype), J.prototype.constructor = J, J.prototype.V = J, J.Y = {}, r.McApp = J, J.prototype.Init = function() {
1415
- dt(this.T);
1400
+ return J.prototype = Object.create(X.prototype), J.prototype.constructor = J, J.prototype.X = J, J.$ = {}, r.McApp = J, J.prototype.Init = function() {
1401
+ pt(this.U);
1416
1402
  }, J.prototype.CreateMxDraw = function(e, t, n) {
1417
- var s = this.T;
1418
- if (Et(), e && typeof e == "object" && (e = e.T), t && typeof t == "object" && (t = t.T), n && typeof n == "object")
1419
- n = n.T;
1403
+ var u = this.U;
1404
+ if (At(), e && typeof e == "object" && (e = e.U), t && typeof t == "object" && (t = t.U), n && typeof n == "object")
1405
+ n = n.U;
1420
1406
  else if (typeof n == "string") {
1421
- n = ut(n);
1422
- var u = At(n, j);
1423
- gt(n, j, u), n = u;
1407
+ n = at(n);
1408
+ var s = gt(n, K);
1409
+ wt(n, K, s), n = s;
1424
1410
  }
1425
- return Pe(pt(s, e, t, n), Z);
1411
+ return Me(yt(u, e, t, n), Z);
1426
1412
  }, J.prototype.__destroy__ = function() {
1427
- yt(this.T);
1413
+ ht(this.U);
1428
1414
  }, o.ready;
1429
1415
  };
1430
1416
  })();
1431
- typeof exports == "object" && typeof module == "object" ? module.exports = Fe : typeof define == "function" && define.amd ? define([], function() {
1432
- return Fe;
1433
- }) : typeof exports == "object" && (exports.mxdrawassembly = Fe);
1434
- const rn = (i, o) => new URL(i, o || self.location.href).toString();
1435
- let Te;
1436
- function sn(i, o = rn) {
1437
- Fe({
1417
+ typeof exports == "object" && typeof module == "object" ? module.exports = Re : typeof define == "function" && define.amd ? define([], function() {
1418
+ return Re;
1419
+ }) : typeof exports == "object" && (exports.mxdrawassembly = Re);
1420
+ const sn = (i, o) => new URL(i, o || self.location.href).toString();
1421
+ let be;
1422
+ function on(i, o = sn) {
1423
+ Re({
1438
1424
  locateFile: o
1439
1425
  }).then((r) => {
1440
1426
  let f = new r.McApp();
1441
- f.Init(), Te = r, Te.McApp = f, i(Te);
1427
+ f.Init(), be = r, be.McApp = f, i(be);
1442
1428
  });
1443
1429
  }
1444
- const un = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1430
+ const cn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1445
1431
  __proto__: null,
1446
1432
  get MxCpp() {
1447
- return Te;
1433
+ return be;
1448
1434
  },
1449
- loadMxdrawassembly: sn,
1450
- fetchAndInstantiate: Xt,
1451
- b64Encode: Pt,
1452
- b64Decode: xt,
1453
- setMcDbEntity: Mt,
1454
- MxTools: He,
1455
- drawText: $t,
1456
- drawCircle: Ct,
1457
- drawLine: Bt,
1458
- drawMText: Zt,
1459
- drawPolyLine: Jt,
1460
- drawPolygon: Qt,
1461
- drawArc: tn,
1462
- drawEllipticalArc: nn
1435
+ loadMxdrawassembly: on,
1436
+ fetchAndInstantiate: Yt,
1437
+ b64Encode: xt,
1438
+ b64Decode: Mt,
1439
+ setMcDbEntity: Ct,
1440
+ MxTools: Ne,
1441
+ drawText: Zt,
1442
+ drawCircle: Bt,
1443
+ drawLine: Dt,
1444
+ drawMText: Qt,
1445
+ drawPolyLine: Ut,
1446
+ drawPolygon: qt,
1447
+ drawArc: rn,
1448
+ drawEllipticalArc: un
1463
1449
  }, Symbol.toStringTag, { value: "Module" }));
1464
1450
  export {
1465
- Te as MxCpp,
1466
- He as MxTools,
1467
- xt as b64Decode,
1468
- Pt as b64Encode,
1469
- un as default,
1470
- tn as drawArc,
1471
- Ct as drawCircle,
1472
- nn as drawEllipticalArc,
1473
- Bt as drawLine,
1474
- Zt as drawMText,
1475
- Jt as drawPolyLine,
1476
- Qt as drawPolygon,
1477
- $t as drawText,
1478
- Xt as fetchAndInstantiate,
1479
- sn as loadMxdrawassembly,
1480
- Mt as setMcDbEntity
1451
+ be as MxCpp,
1452
+ Ne as MxTools,
1453
+ Mt as b64Decode,
1454
+ xt as b64Encode,
1455
+ cn as default,
1456
+ rn as drawArc,
1457
+ Bt as drawCircle,
1458
+ un as drawEllipticalArc,
1459
+ Dt as drawLine,
1460
+ Qt as drawMText,
1461
+ Ut as drawPolyLine,
1462
+ qt as drawPolygon,
1463
+ Zt as drawText,
1464
+ Yt as fetchAndInstantiate,
1465
+ on as loadMxdrawassembly,
1466
+ Ct as setMcDbEntity
1481
1467
  };