iflow-engine-base 3.9.16 → 3.9.162

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,16 +1,16 @@
1
1
  import * as _ from "three";
2
- import { Loader as dt, FileLoader as ut, ShapePath as ft, Vector4 as Pe, Vector3 as Ne, Curve as pt, BufferGeometry as mt, BufferAttribute as gt } from "three";
3
- import * as yt from "opentype.js";
4
- var Ae = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
2
+ import { Loader as ct, FileLoader as dt, ShapePath as ut, Vector4 as Pe, Vector3 as Ne, Curve as ft, BufferGeometry as pt, BufferAttribute as mt } from "three";
3
+ import * as gt from "opentype.js";
4
+ var Te = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
5
5
  function Je(M) {
6
6
  return M && M.__esModule && Object.prototype.hasOwnProperty.call(M, "default") ? M.default : M;
7
7
  }
8
- var Ie = { exports: {} }, vt = Ie.exports, Fe;
9
- function bt() {
8
+ var Le = { exports: {} }, yt = Le.exports, Fe;
9
+ function vt() {
10
10
  return Fe || (Fe = 1, (function(M, e) {
11
11
  (function(t, i) {
12
12
  M.exports = i();
13
- })(vt, function() {
13
+ })(yt, function() {
14
14
  var t = function() {
15
15
  function i(d) {
16
16
  return s.appendChild(d.dom), d;
@@ -48,12 +48,12 @@ function bt() {
48
48
  } };
49
49
  }, t;
50
50
  });
51
- })(Ie)), Ie.exports;
51
+ })(Le)), Le.exports;
52
52
  }
53
- var wt = bt();
54
- const xt = /* @__PURE__ */ Je(wt);
53
+ var bt = vt();
54
+ const wt = /* @__PURE__ */ Je(bt);
55
55
  var fe = /* @__PURE__ */ ((M) => (M.ModelLoadStart = "model-load-start", M.ModelLoadProgress = "model-load-progress", M.ModelLoaded = "model-loaded", M.ModelLoadError = "model-load-error", M.RenderStart = "render-start", M.RenderEnd = "render-end", M.CameraChanged = "camera-changed", M.CameraReset = "camera-reset", M.SelectionChanged = "selection-changed", M.HoverChanged = "hover-changed", M.EntityClick = "entity-click", M.LayerVisibilityChanged = "layer-visibility-changed", M.LayerColorChanged = "layer-color-changed", M.ViewZoomChanged = "view-zoom-changed", M.ViewPanChanged = "view-pan-changed", M.ToolActivated = "tool-activated", M.ToolDeactivated = "tool-deactivated", M.Error = "error", M.Warning = "warning", M))(fe || {});
56
- class kt {
56
+ class xt {
57
57
  listeners = /* @__PURE__ */ new Map();
58
58
  onceListeners = /* @__PURE__ */ new Map();
59
59
  debugMode = !1;
@@ -165,7 +165,7 @@ class kt {
165
165
  this.removeAllListeners(), this.listeners.clear(), this.onceListeners.clear(), this.debugMode && console.log("[EventModule2d] Disposed");
166
166
  }
167
167
  }
168
- const Mt = `
168
+ const kt = `
169
169
  varying vec2 vWorldPos;
170
170
 
171
171
  void main() {
@@ -173,7 +173,7 @@ const Mt = `
173
173
  vWorldPos = worldPosition.xy;
174
174
  gl_Position = projectionMatrix * viewMatrix * worldPosition;
175
175
  }
176
- `, _t = `
176
+ `, Mt = `
177
177
  precision highp float;
178
178
 
179
179
  varying vec2 vWorldPos;
@@ -229,7 +229,7 @@ const Mt = `
229
229
  gl_FragColor = vec4(color, alpha);
230
230
  }
231
231
  `;
232
- class Et {
232
+ class _t {
233
233
  scene;
234
234
  camera;
235
235
  container;
@@ -282,8 +282,8 @@ class Et {
282
282
  createGridMesh() {
283
283
  this.gridGeometry = new _.PlaneGeometry(1, 1, 1, 1), this.gridMaterial = new _.ShaderMaterial({
284
284
  uniforms: this.gridUniforms,
285
- vertexShader: Mt,
286
- fragmentShader: _t,
285
+ vertexShader: kt,
286
+ fragmentShader: Mt,
287
287
  transparent: !0,
288
288
  depthWrite: !1,
289
289
  depthTest: !1,
@@ -329,8 +329,8 @@ class Et {
329
329
  return;
330
330
  const t = Math.max(1, this.container.clientWidth), i = Math.max(1, this.container.clientHeight), n = this.camera.zoom, r = this.camera.right - this.camera.left, s = this.camera.top - this.camera.bottom, o = Math.max(this.minSpacing, r / n), a = Math.max(this.minSpacing, s / n), l = this.camera.position.x, c = this.camera.position.y, f = o / t, p = a / i, d = f * this.desiredMinorPixelSize, y = this.normalizeSpacing(d), h = this.lastState;
331
331
  if (!e) {
332
- const b = Math.abs(n - h.zoom) / Math.max(1e-4, h.zoom || 1) > 0.02, k = Math.abs(y - h.minorSpacing) > h.minorSpacing * 0.05, S = Math.abs(l - h.centerX) > Math.max(y * 0.5, 0.01), C = Math.abs(c - h.centerY) > Math.max(y * 0.5, 0.01), R = Math.abs(o - h.viewWidth) > h.viewWidth * 0.01, z = Math.abs(a - h.viewHeight) > h.viewHeight * 0.01, W = t !== h.containerWidth || i !== h.containerHeight;
333
- if (!(b || k || S || C || R || z || W))
332
+ const b = Math.abs(n - h.zoom) / Math.max(1e-4, h.zoom || 1) > 0.02, k = Math.abs(y - h.minorSpacing) > h.minorSpacing * 0.05, S = Math.abs(l - h.centerX) > Math.max(y * 0.5, 0.01), C = Math.abs(c - h.centerY) > Math.max(y * 0.5, 0.01), R = Math.abs(o - h.viewWidth) > h.viewWidth * 0.01, z = Math.abs(a - h.viewHeight) > h.viewHeight * 0.01, U = t !== h.containerWidth || i !== h.containerHeight;
333
+ if (!(b || k || S || C || R || z || U))
334
334
  return;
335
335
  }
336
336
  const g = o * this.coverageMultiplier, v = a * this.coverageMultiplier;
@@ -372,7 +372,7 @@ class Et {
372
372
  this.stopMonitoring(), this.teardownResizeObserver(), this.gridMesh && this.gridGroup.remove(this.gridMesh), this.gridGeometry && (this.gridGeometry.dispose(), this.gridGeometry = void 0), this.gridMaterial && (this.gridMaterial.dispose(), this.gridMaterial = void 0), this.gridMesh = void 0;
373
373
  }
374
374
  }
375
- class Ct {
375
+ class Et {
376
376
  engine;
377
377
  scene;
378
378
  options;
@@ -405,7 +405,7 @@ class Ct {
405
405
  * 创建网格辅助(自适应网格)
406
406
  */
407
407
  createGrid(e = 1e3, t = 50) {
408
- this.adaptiveGrid && (this.adaptiveGrid.dispose(), this.adaptiveGrid = void 0), this.adaptiveGrid = new Et(
408
+ this.adaptiveGrid && (this.adaptiveGrid.dispose(), this.adaptiveGrid = void 0), this.adaptiveGrid = new _t(
409
409
  this.scene,
410
410
  this.engine.cameraModule2d.orthographicCamera,
411
411
  this.engine.renderModule2d.container
@@ -507,7 +507,7 @@ class Ct {
507
507
  this.clearScene(), this.adaptiveGrid && (this.adaptiveGrid.dispose(), this.adaptiveGrid = void 0), this.axesHelper && (this.scene.remove(this.axesHelper), this.axesHelper = void 0), this.scene.clear();
508
508
  }
509
509
  }
510
- class St {
510
+ class Ct {
511
511
  engine;
512
512
  isFree;
513
513
  // 高亮模型
@@ -523,7 +523,7 @@ class St {
523
523
  this.engine = e, this.isFree = !0, this.highlightModels = [], this.hideModels = [], this.translucentModels = [], this.highlightHoverModels = [], this.models = [];
524
524
  }
525
525
  }
526
- class Tt {
526
+ class St {
527
527
  engine;
528
528
  orthographicCamera;
529
529
  container;
@@ -755,7 +755,7 @@ class Tt {
755
755
  this.animationId !== null && (cancelAnimationFrame(this.animationId), this.animationId = null), this.orthographicCamera = null;
756
756
  }
757
757
  }
758
- class At {
758
+ class Tt {
759
759
  engine;
760
760
  renderer;
761
761
  container;
@@ -887,7 +887,7 @@ class At {
887
887
  window.removeEventListener("resize", this.onWindowResize.bind(this)), this.renderer.dispose(), this.container.contains(this.renderer.domElement) && this.container.removeChild(this.renderer.domElement), this.renderer = null;
888
888
  }
889
889
  }
890
- class Lt extends _.EventDispatcher {
890
+ class At extends _.EventDispatcher {
891
891
  object;
892
892
  domElement;
893
893
  enabled = !0;
@@ -1097,7 +1097,7 @@ class Lt extends _.EventDispatcher {
1097
1097
  this.enabled = !1, this.domElement.removeEventListener("mousedown", this.onMouseDown.bind(this)), this.domElement.removeEventListener("mousemove", this.onMouseMove.bind(this)), this.domElement.removeEventListener("mouseup", this.onMouseUp.bind(this)), this.domElement.removeEventListener("mouseleave", this.onMouseUp.bind(this)), this.domElement.removeEventListener("wheel", this.onWheel.bind(this)), this.domElement.removeEventListener("dblclick", this.onDoubleClick.bind(this)), this.domElement.removeEventListener("click", this.onClick.bind(this)), this.domElement.removeEventListener("touchstart", this.onTouchStart.bind(this)), this.domElement.removeEventListener("touchmove", this.onTouchMove.bind(this)), this.domElement.removeEventListener("touchend", this.onTouchEnd.bind(this));
1098
1098
  }
1099
1099
  }
1100
- class It {
1100
+ class Lt {
1101
1101
  engine;
1102
1102
  panControls;
1103
1103
  isActive = !0;
@@ -1114,7 +1114,7 @@ class It {
1114
1114
  * 创建 2D 平移控制器
1115
1115
  */
1116
1116
  createPanControls() {
1117
- const e = new Lt(
1117
+ const e = new At(
1118
1118
  this.engine.camera,
1119
1119
  this.engine.renderer.domElement
1120
1120
  );
@@ -1230,7 +1230,7 @@ class It {
1230
1230
  this.panControls.dispose(), this.panControls = null;
1231
1231
  }
1232
1232
  }
1233
- class Pt extends dt {
1233
+ class Pt extends ct {
1234
1234
  /**
1235
1235
  * Constructs a new font loader.
1236
1236
  *
@@ -1249,7 +1249,7 @@ class Pt extends dt {
1249
1249
  * @param {onErrorCallback} onError - Executed when errors occur.
1250
1250
  */
1251
1251
  load(e, t, i, n) {
1252
- const r = this, s = new ut(this.manager);
1252
+ const r = this, s = new dt(this.manager);
1253
1253
  s.setPath(this.path), s.setRequestHeader(this.requestHeader), s.setWithCredentials(this.withCredentials), s.load(e, function(o) {
1254
1254
  const a = r.parse(JSON.parse(o));
1255
1255
  t && t(a);
@@ -1262,10 +1262,10 @@ class Pt extends dt {
1262
1262
  * @return {Font} The font.
1263
1263
  */
1264
1264
  parse(e) {
1265
- return new zt(e);
1265
+ return new It(e);
1266
1266
  }
1267
1267
  }
1268
- class zt {
1268
+ class It {
1269
1269
  /**
1270
1270
  * Constructs a new font.
1271
1271
  *
@@ -1284,13 +1284,13 @@ class zt {
1284
1284
  * @return {Array<Shape>} An array of shapes representing the text.
1285
1285
  */
1286
1286
  generateShapes(e, t = 100, i = "ltr") {
1287
- const n = [], r = Dt(e, t, this.data, i);
1287
+ const n = [], r = zt(e, t, this.data, i);
1288
1288
  for (let s = 0, o = r.length; s < o; s++)
1289
1289
  n.push(...r[s].toShapes());
1290
1290
  return n;
1291
1291
  }
1292
1292
  }
1293
- function Dt(M, e, t, i) {
1293
+ function zt(M, e, t, i) {
1294
1294
  const n = Array.from(M), r = e / t.resolution, s = (t.boundingBox.yMax - t.boundingBox.yMin + t.underlineThickness) * r, o = [];
1295
1295
  let a = 0, l = 0;
1296
1296
  (i == "rtl" || i == "tb") && n.reverse();
@@ -1300,19 +1300,19 @@ function Dt(M, e, t, i) {
1300
1300
  `)
1301
1301
  a = 0, l -= s;
1302
1302
  else {
1303
- const p = Bt(f, r, a, l, t);
1303
+ const p = Dt(f, r, a, l, t);
1304
1304
  i == "tb" ? (a = 0, l += t.ascender * r) : a += p.offsetX, o.push(p.path);
1305
1305
  }
1306
1306
  }
1307
1307
  return o;
1308
1308
  }
1309
- function Bt(M, e, t, i, n) {
1309
+ function Dt(M, e, t, i, n) {
1310
1310
  const r = n.glyphs[M] || n.glyphs["?"];
1311
1311
  if (!r) {
1312
1312
  console.error('THREE.Font: character "' + M + '" does not exists in font family ' + n.familyName + ".");
1313
1313
  return;
1314
1314
  }
1315
- const s = new ft();
1315
+ const s = new ut();
1316
1316
  let o, a, l, c, f, p, d, y;
1317
1317
  if (r.o) {
1318
1318
  const h = r._cachedOutline || (r._cachedOutline = r.o.split(" "));
@@ -1344,7 +1344,7 @@ class ce {
1344
1344
  }
1345
1345
  /** 从 ArrayBuffer 解析字体,生成 typeface.json。 */
1346
1346
  static fromArrayBuffer(e, t) {
1347
- const i = yt.parse(e);
1347
+ const i = gt.parse(e);
1348
1348
  return ce._convert(i, t?.chars);
1349
1349
  }
1350
1350
  /** 将 typeface.json 转为 Three.js Font 对象,可直接用于文字几何。 */
@@ -1487,7 +1487,76 @@ class ce {
1487
1487
  return i;
1488
1488
  }
1489
1489
  }
1490
- class Rt {
1490
+ const Bt = "__BIM_ENGINE_SDK_ASSET_BASE__", Rt = "https://unpkg.com/iflow-engine-base@3.9.16/dist/";
1491
+ function Nt() {
1492
+ return typeof globalThis < "u" ? globalThis : null;
1493
+ }
1494
+ function Ve(M) {
1495
+ return M.endsWith("/") ? M : `${M}/`;
1496
+ }
1497
+ function et(M) {
1498
+ return /^(?:[a-z][a-z\d+\-.]*:)?\/\//i.test(M) || /^(?:data|blob):/i.test(M);
1499
+ }
1500
+ function Ot(M) {
1501
+ return M.startsWith("./") || M.startsWith("../");
1502
+ }
1503
+ function Ie(M, e) {
1504
+ try {
1505
+ return e ? new URL(M, e).toString() : new URL(M).toString();
1506
+ } catch {
1507
+ return null;
1508
+ }
1509
+ }
1510
+ function tt() {
1511
+ return typeof document < "u" && document.baseURI ? document.baseURI : typeof location < "u" && location.href ? location.href : null;
1512
+ }
1513
+ function Vt(M, e) {
1514
+ const t = Ve(M);
1515
+ if (et(t))
1516
+ return t;
1517
+ const i = ze(e) || jt() || tt();
1518
+ return Ie(t, i || void 0) || t;
1519
+ }
1520
+ function ze(M) {
1521
+ if (!M)
1522
+ return null;
1523
+ try {
1524
+ const e = tt(), t = Ie(M, e || void 0) || M, i = new URL(".", t), n = i.pathname.replace(/\\/g, "/");
1525
+ return n.endsWith("/chunks/") ? new URL("../", i).toString() : e && /\/src\//.test(n) ? Ve(e) : i.toString();
1526
+ } catch {
1527
+ return null;
1528
+ }
1529
+ }
1530
+ function jt() {
1531
+ if (typeof document > "u")
1532
+ return null;
1533
+ const M = document.currentScript;
1534
+ if (M?.src)
1535
+ return ze(M.src);
1536
+ const e = document.getElementsByTagName("script");
1537
+ for (let t = e.length - 1; t >= 0; t -= 1) {
1538
+ const i = e[t]?.src;
1539
+ if (i && /(?:bim-engine-sdk|iflow-engine-base|dwg-preview|gaussian)\.(?:es|umd)\.js(?:[?#].*)?$/.test(i))
1540
+ return ze(i);
1541
+ }
1542
+ return null;
1543
+ }
1544
+ function Ut(M) {
1545
+ const t = Nt()?.[Bt];
1546
+ return typeof t == "string" && t.length > 0 ? Vt(t, M) : Ve(Rt);
1547
+ }
1548
+ function be(M, e) {
1549
+ if (et(M))
1550
+ return M;
1551
+ if (Ot(M)) {
1552
+ const n = Ie(M, ze(e) || void 0);
1553
+ if (n)
1554
+ return n;
1555
+ }
1556
+ const t = M.replace(/^\/+/, ""), i = Ut(e);
1557
+ return Ie(t, i) || t;
1558
+ }
1559
+ class Wt {
1491
1560
  panel = null;
1492
1561
  listEl = null;
1493
1562
  isVisible = !1;
@@ -1634,14 +1703,14 @@ class Rt {
1634
1703
  this.panel?.remove(), this.panel = null, this.listEl = null;
1635
1704
  }
1636
1705
  }
1637
- class et {
1706
+ class it {
1638
1707
  engine;
1639
1708
  layerMap = /* @__PURE__ */ new Map();
1640
1709
  panelUI = null;
1641
1710
  constructor(e) {
1642
1711
  this.engine = e;
1643
1712
  const t = document.getElementById(e?.options?.containerId ?? "") ?? e?.container ?? null;
1644
- t && (this.panelUI = new Rt(t, this));
1713
+ t && (this.panelUI = new Wt(t, this));
1645
1714
  }
1646
1715
  // ─── 数据 ──────────────────────────────────────────────
1647
1716
  _loadLayers(e = this.engine.dwgData?.layers ?? []) {
@@ -1768,7 +1837,7 @@ class et {
1768
1837
  this.panelUI?.dispose(), this.panelUI = null, this.layerMap.clear();
1769
1838
  }
1770
1839
  }
1771
- function be(M) {
1840
+ function we(M) {
1772
1841
  return Array.isArray(M) ? new _.Vector3(M[0] ?? 0, M[1] ?? 0, M[2] ?? 0) : new _.Vector3(M?.x ?? 0, M?.y ?? 0, M?.z ?? 0);
1773
1842
  }
1774
1843
  function xe(M) {
@@ -1781,14 +1850,14 @@ function Oe(M, e, t) {
1781
1850
  const i = new _.Vector3(M[0] ?? 0, M[1] ?? 0, M[2] ?? 0), n = new _.Euler(0, 0, t ?? 0), r = new _.Vector3(e[0] ?? 1, e[1] ?? 1, e[2] ?? 1), s = new _.Quaternion().setFromEuler(n);
1782
1851
  return new _.Matrix4().compose(i, s, r);
1783
1852
  }
1784
- function Nt(M) {
1853
+ function Ft(M) {
1785
1854
  return Array.isArray(M?.transformMatrix) && M.transformMatrix.length === 16 ? new _.Matrix4().fromArray(M.transformMatrix) : Oe(
1786
1855
  M.position ?? [0, 0, 0],
1787
1856
  M.scale ?? [1, 1, 1],
1788
1857
  M.rotation ?? 0
1789
1858
  );
1790
1859
  }
1791
- function tt(M) {
1860
+ function nt(M) {
1792
1861
  if (M.length === 0)
1793
1862
  return { min: new _.Vector3(), max: new _.Vector3() };
1794
1863
  const e = new _.Vector3(Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY), t = new _.Vector3(Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY);
@@ -1843,7 +1912,7 @@ class Ge {
1843
1912
  for (const n of e)
1844
1913
  if (n?.visible !== !1) {
1845
1914
  if (n.type === "INSERT") {
1846
- const r = this.getBlockItems(n.blockId, i + 1), s = t.clone().multiply(Nt(n)), o = this.getClipPolygon(n, t);
1915
+ const r = this.getBlockItems(n.blockId, i + 1), s = t.clone().multiply(Ft(n)), o = this.getClipPolygon(n, t);
1847
1916
  for (const a of r) {
1848
1917
  const l = this.cloneRenderItem(a, s, n), c = o ? this.clipRenderItem(l, o) : l;
1849
1918
  c && (yield c);
@@ -2057,12 +2126,12 @@ class Ge {
2057
2126
  };
2058
2127
  }
2059
2128
  }
2060
- function Le(M) {
2129
+ function Ae(M) {
2061
2130
  throw new Error('Could not dynamically require "' + M + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
2062
2131
  }
2063
2132
  var Be = { exports: {} };
2064
2133
  var He;
2065
- function Ot() {
2134
+ function Gt() {
2066
2135
  return He || (He = 1, (function(M, e) {
2067
2136
  (function(t) {
2068
2137
  M.exports = t();
@@ -2071,7 +2140,7 @@ function Ot() {
2071
2140
  function s(l, c) {
2072
2141
  if (!n[l]) {
2073
2142
  if (!i[l]) {
2074
- var f = typeof Le == "function" && Le;
2143
+ var f = typeof Ae == "function" && Ae;
2075
2144
  if (!c && f) return f(l, !0);
2076
2145
  if (o) return o(l, !0);
2077
2146
  var p = new Error("Cannot find module '" + l + "'");
@@ -2085,7 +2154,7 @@ function Ot() {
2085
2154
  }
2086
2155
  return n[l].exports;
2087
2156
  }
2088
- for (var o = typeof Le == "function" && Le, a = 0; a < r.length; a++) s(r[a]);
2157
+ for (var o = typeof Ae == "function" && Ae, a = 0; a < r.length; a++) s(r[a]);
2089
2158
  return s;
2090
2159
  })({ 1: [function(t, i, n) {
2091
2160
  var r = t("./utils"), s = t("./support"), o = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
@@ -2178,20 +2247,20 @@ function Ot() {
2178
2247
  return g;
2179
2248
  }
2180
2249
  function s(d, y, h, g, v, b) {
2181
- var k, S, C = d.file, R = d.compression, z = b !== l.utf8encode, W = o.transformTo("string", b(C.name)), D = o.transformTo("string", l.utf8encode(C.name)), H = C.comment, q = o.transformTo("string", b(H)), E = o.transformTo("string", l.utf8encode(H)), B = D.length !== C.name.length, m = E.length !== H.length, O = "", ee = "", U = "", te = C.dir, F = C.date, J = { crc32: 0, compressedSize: 0, uncompressedSize: 0 };
2250
+ var k, S, C = d.file, R = d.compression, z = b !== l.utf8encode, U = o.transformTo("string", b(C.name)), D = o.transformTo("string", l.utf8encode(C.name)), H = C.comment, q = o.transformTo("string", b(H)), E = o.transformTo("string", l.utf8encode(H)), B = D.length !== C.name.length, m = E.length !== H.length, O = "", ee = "", W = "", te = C.dir, F = C.date, J = { crc32: 0, compressedSize: 0, uncompressedSize: 0 };
2182
2251
  y && !h || (J.crc32 = d.crc32, J.compressedSize = d.compressedSize, J.uncompressedSize = d.uncompressedSize);
2183
- var I = 0;
2184
- y && (I |= 8), z || !B && !m || (I |= 2048);
2252
+ var P = 0;
2253
+ y && (P |= 8), z || !B && !m || (P |= 2048);
2185
2254
  var L = 0, Q = 0;
2186
2255
  te && (L |= 16), v === "UNIX" ? (Q = 798, L |= (function(Z, ae) {
2187
2256
  var ue = Z;
2188
2257
  return Z || (ue = ae ? 16893 : 33204), (65535 & ue) << 16;
2189
2258
  })(C.unixPermissions, te)) : (Q = 20, L |= (function(Z) {
2190
2259
  return 63 & (Z || 0);
2191
- })(C.dosPermissions)), k = F.getUTCHours(), k <<= 6, k |= F.getUTCMinutes(), k <<= 5, k |= F.getUTCSeconds() / 2, S = F.getUTCFullYear() - 1980, S <<= 4, S |= F.getUTCMonth() + 1, S <<= 5, S |= F.getUTCDate(), B && (ee = r(1, 1) + r(c(W), 4) + D, O += "up" + r(ee.length, 2) + ee), m && (U = r(1, 1) + r(c(q), 4) + E, O += "uc" + r(U.length, 2) + U);
2260
+ })(C.dosPermissions)), k = F.getUTCHours(), k <<= 6, k |= F.getUTCMinutes(), k <<= 5, k |= F.getUTCSeconds() / 2, S = F.getUTCFullYear() - 1980, S <<= 4, S |= F.getUTCMonth() + 1, S <<= 5, S |= F.getUTCDate(), B && (ee = r(1, 1) + r(c(U), 4) + D, O += "up" + r(ee.length, 2) + ee), m && (W = r(1, 1) + r(c(q), 4) + E, O += "uc" + r(W.length, 2) + W);
2192
2261
  var Y = "";
2193
2262
  return Y += `
2194
- \0`, Y += r(I, 2), Y += R.magic, Y += r(k, 2), Y += r(S, 2), Y += r(J.crc32, 4), Y += r(J.compressedSize, 4), Y += r(J.uncompressedSize, 4), Y += r(W.length, 2), Y += r(O.length, 2), { fileRecord: f.LOCAL_FILE_HEADER + Y + W + O, dirRecord: f.CENTRAL_FILE_HEADER + r(Q, 2) + Y + r(q.length, 2) + "\0\0\0\0" + r(L, 4) + r(g, 4) + W + O + q };
2263
+ \0`, Y += r(P, 2), Y += R.magic, Y += r(k, 2), Y += r(S, 2), Y += r(J.crc32, 4), Y += r(J.compressedSize, 4), Y += r(J.uncompressedSize, 4), Y += r(U.length, 2), Y += r(O.length, 2), { fileRecord: f.LOCAL_FILE_HEADER + Y + U + O, dirRecord: f.CENTRAL_FILE_HEADER + r(Q, 2) + Y + r(q.length, 2) + "\0\0\0\0" + r(L, 4) + r(g, 4) + U + O + q };
2195
2264
  }
2196
2265
  var o = t("../utils"), a = t("../stream/GenericWorker"), l = t("../utf8"), c = t("../crc32"), f = t("../signature");
2197
2266
  function p(d, y, h, g) {
@@ -2360,8 +2429,8 @@ function Ot() {
2360
2429
  } };
2361
2430
  }, {}], 15: [function(t, i, n) {
2362
2431
  function r(C, R, z) {
2363
- var W, D = o.getTypeOf(R), H = o.extend(z || {}, c);
2364
- H.date = H.date || /* @__PURE__ */ new Date(), H.compression !== null && (H.compression = H.compression.toUpperCase()), typeof H.unixPermissions == "string" && (H.unixPermissions = parseInt(H.unixPermissions, 8)), H.unixPermissions && 16384 & H.unixPermissions && (H.dir = !0), H.dosPermissions && 16 & H.dosPermissions && (H.dir = !0), H.dir && (C = v(C)), H.createFolders && (W = g(C)) && b.call(this, W, !0);
2432
+ var U, D = o.getTypeOf(R), H = o.extend(z || {}, c);
2433
+ H.date = H.date || /* @__PURE__ */ new Date(), H.compression !== null && (H.compression = H.compression.toUpperCase()), typeof H.unixPermissions == "string" && (H.unixPermissions = parseInt(H.unixPermissions, 8)), H.unixPermissions && 16384 & H.unixPermissions && (H.dir = !0), H.dosPermissions && 16 & H.dosPermissions && (H.dir = !0), H.dir && (C = v(C)), H.createFolders && (U = g(C)) && b.call(this, U, !0);
2365
2434
  var q = D === "string" && H.binary === !1 && H.base64 === !1;
2366
2435
  z && z.binary !== void 0 || (H.binary = !q), (R instanceof f && R.uncompressedSize === 0 || H.dir || !R || R.length === 0) && (H.base64 = !1, H.binary = !0, R = "", H.compression = "STORE", D = "string");
2367
2436
  var E = null;
@@ -2384,19 +2453,19 @@ function Ot() {
2384
2453
  var S = { load: function() {
2385
2454
  throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
2386
2455
  }, forEach: function(C) {
2387
- var R, z, W;
2388
- for (R in this.files) W = this.files[R], (z = R.slice(this.root.length, R.length)) && R.slice(0, this.root.length) === this.root && C(z, W);
2456
+ var R, z, U;
2457
+ for (R in this.files) U = this.files[R], (z = R.slice(this.root.length, R.length)) && R.slice(0, this.root.length) === this.root && C(z, U);
2389
2458
  }, filter: function(C) {
2390
2459
  var R = [];
2391
- return this.forEach(function(z, W) {
2392
- C(z, W) && R.push(W);
2460
+ return this.forEach(function(z, U) {
2461
+ C(z, U) && R.push(U);
2393
2462
  }), R;
2394
2463
  }, file: function(C, R, z) {
2395
2464
  if (arguments.length !== 1) return C = this.root + C, r.call(this, C, R, z), this;
2396
2465
  if (k(C)) {
2397
- var W = C;
2466
+ var U = C;
2398
2467
  return this.filter(function(H, q) {
2399
- return !q.dir && W.test(H);
2468
+ return !q.dir && U.test(H);
2400
2469
  });
2401
2470
  }
2402
2471
  var D = this.files[this.root + C];
@@ -2406,15 +2475,15 @@ function Ot() {
2406
2475
  if (k(C)) return this.filter(function(D, H) {
2407
2476
  return H.dir && C.test(D);
2408
2477
  });
2409
- var R = this.root + C, z = b.call(this, R), W = this.clone();
2410
- return W.root = z.name, W;
2478
+ var R = this.root + C, z = b.call(this, R), U = this.clone();
2479
+ return U.root = z.name, U;
2411
2480
  }, remove: function(C) {
2412
2481
  C = this.root + C;
2413
2482
  var R = this.files[C];
2414
2483
  if (R || (C.slice(-1) !== "/" && (C += "/"), R = this.files[C]), R && !R.dir) delete this.files[C];
2415
2484
  else for (var z = this.filter(function(D, H) {
2416
2485
  return H.name.slice(0, C.length) === C;
2417
- }), W = 0; W < z.length; W++) delete this.files[z[W].name];
2486
+ }), U = 0; U < z.length; U++) delete this.files[z[U].name];
2418
2487
  return this;
2419
2488
  }, generate: function() {
2420
2489
  throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
@@ -2423,8 +2492,8 @@ function Ot() {
2423
2492
  try {
2424
2493
  if ((z = o.extend(C || {}, { streamFiles: !1, compression: "STORE", compressionOptions: null, type: "", platform: "DOS", comment: null, mimeType: "application/zip", encodeFileName: s.utf8encode })).type = z.type.toLowerCase(), z.compression = z.compression.toUpperCase(), z.type === "binarystring" && (z.type = "string"), !z.type) throw new Error("No output type specified.");
2425
2494
  o.checkSupport(z.type), z.platform !== "darwin" && z.platform !== "freebsd" && z.platform !== "linux" && z.platform !== "sunos" || (z.platform = "UNIX"), z.platform === "win32" && (z.platform = "DOS");
2426
- var W = z.comment || this.comment || "";
2427
- R = d.generateWorker(this, z, W);
2495
+ var U = z.comment || this.comment || "";
2496
+ R = d.generateWorker(this, z, U);
2428
2497
  } catch (D) {
2429
2498
  (R = new a("error")).error(D);
2430
2499
  }
@@ -2660,28 +2729,28 @@ function Ot() {
2660
2729
  b = [], v(R);
2661
2730
  }).on("end", function() {
2662
2731
  try {
2663
- var R = (function(z, W, D) {
2732
+ var R = (function(z, U, D) {
2664
2733
  switch (z) {
2665
2734
  case "blob":
2666
- return r.newBlob(r.transformTo("arraybuffer", W), D);
2735
+ return r.newBlob(r.transformTo("arraybuffer", U), D);
2667
2736
  case "base64":
2668
- return a.encode(W);
2737
+ return a.encode(U);
2669
2738
  default:
2670
- return r.transformTo(z, W);
2739
+ return r.transformTo(z, U);
2671
2740
  }
2672
- })(S, (function(z, W) {
2741
+ })(S, (function(z, U) {
2673
2742
  var D, H = 0, q = null, E = 0;
2674
- for (D = 0; D < W.length; D++) E += W[D].length;
2743
+ for (D = 0; D < U.length; D++) E += U[D].length;
2675
2744
  switch (z) {
2676
2745
  case "string":
2677
- return W.join("");
2746
+ return U.join("");
2678
2747
  case "array":
2679
- return Array.prototype.concat.apply([], W);
2748
+ return Array.prototype.concat.apply([], U);
2680
2749
  case "uint8array":
2681
- for (q = new Uint8Array(E), D = 0; D < W.length; D++) q.set(W[D], H), H += W[D].length;
2750
+ for (q = new Uint8Array(E), D = 0; D < U.length; D++) q.set(U[D], H), H += U[D].length;
2682
2751
  return q;
2683
2752
  case "nodebuffer":
2684
- return Buffer.concat(W);
2753
+ return Buffer.concat(U);
2685
2754
  default:
2686
2755
  throw new Error("concat : unsupported type '" + z + "'");
2687
2756
  }
@@ -2921,10 +2990,10 @@ function Ot() {
2921
2990
  return a.Promise.resolve(g).then(function(S) {
2922
2991
  return r.blob && (S instanceof Blob || ["[object File]", "[object Blob]"].indexOf(Object.prototype.toString.call(S)) !== -1) && typeof FileReader < "u" ? new a.Promise(function(C, R) {
2923
2992
  var z = new FileReader();
2924
- z.onload = function(W) {
2925
- C(W.target.result);
2926
- }, z.onerror = function(W) {
2927
- R(W.target.error);
2993
+ z.onload = function(U) {
2994
+ C(U.target.result);
2995
+ }, z.onerror = function(U) {
2996
+ R(U.target.error);
2928
2997
  }, z.readAsArrayBuffer(S);
2929
2998
  }) : S;
2930
2999
  }).then(function(S) {
@@ -3120,7 +3189,7 @@ function Ot() {
3120
3189
  i.exports = function(h) {
3121
3190
  d.push(h) !== 1 || o || s();
3122
3191
  };
3123
- }).call(this, typeof Ae < "u" ? Ae : typeof self < "u" ? self : typeof window < "u" ? window : {});
3192
+ }).call(this, typeof Te < "u" ? Te : typeof self < "u" ? self : typeof window < "u" ? window : {});
3124
3193
  }, {}], 37: [function(t, i, n) {
3125
3194
  var r = t("immediate");
3126
3195
  function s() {
@@ -3222,13 +3291,13 @@ function Ot() {
3222
3291
  if (Object.prototype.toString.call(v) !== "[object Array]") return this.reject(new TypeError("must be an array"));
3223
3292
  var k = v.length, S = !1;
3224
3293
  if (!k) return this.resolve([]);
3225
- for (var C = new Array(k), R = 0, z = -1, W = new this(s); ++z < k; ) D(v[z], z);
3226
- return W;
3294
+ for (var C = new Array(k), R = 0, z = -1, U = new this(s); ++z < k; ) D(v[z], z);
3295
+ return U;
3227
3296
  function D(H, q) {
3228
3297
  b.resolve(H).then(function(E) {
3229
- C[q] = E, ++R !== k || S || (S = !0, o.resolve(W, C));
3298
+ C[q] = E, ++R !== k || S || (S = !0, o.resolve(U, C));
3230
3299
  }, function(E) {
3231
- S || (S = !0, o.reject(W, E));
3300
+ S || (S = !0, o.reject(U, E));
3232
3301
  });
3233
3302
  }
3234
3303
  }, f.race = function(v) {
@@ -3236,10 +3305,10 @@ function Ot() {
3236
3305
  if (Object.prototype.toString.call(v) !== "[object Array]") return this.reject(new TypeError("must be an array"));
3237
3306
  var k = v.length, S = !1;
3238
3307
  if (!k) return this.resolve([]);
3239
- for (var C = -1, R = new this(s); ++C < k; ) z = v[C], b.resolve(z).then(function(W) {
3240
- S || (S = !0, o.resolve(R, W));
3241
- }, function(W) {
3242
- S || (S = !0, o.reject(R, W));
3308
+ for (var C = -1, R = new this(s); ++C < k; ) z = v[C], b.resolve(z).then(function(U) {
3309
+ S || (S = !0, o.resolve(R, U));
3310
+ }, function(U) {
3311
+ S || (S = !0, o.reject(R, U));
3243
3312
  });
3244
3313
  var z;
3245
3314
  return R;
@@ -3302,12 +3371,12 @@ function Ot() {
3302
3371
  return v.result;
3303
3372
  }
3304
3373
  d.prototype.push = function(h, g) {
3305
- var v, b, k, S, C, R, z = this.strm, W = this.options.chunkSize, D = this.options.dictionary, H = !1;
3374
+ var v, b, k, S, C, R, z = this.strm, U = this.options.chunkSize, D = this.options.dictionary, H = !1;
3306
3375
  if (this.ended) return !1;
3307
3376
  b = g === ~~g ? g : g === !0 ? a.Z_FINISH : a.Z_NO_FLUSH, typeof h == "string" ? z.input = o.binstring2buf(h) : p.call(h) === "[object ArrayBuffer]" ? z.input = new Uint8Array(h) : z.input = h, z.next_in = 0, z.avail_in = z.input.length;
3308
3377
  do {
3309
- if (z.avail_out === 0 && (z.output = new s.Buf8(W), z.next_out = 0, z.avail_out = W), (v = r.inflate(z, a.Z_NO_FLUSH)) === a.Z_NEED_DICT && D && (R = typeof D == "string" ? o.string2buf(D) : p.call(D) === "[object ArrayBuffer]" ? new Uint8Array(D) : D, v = r.inflateSetDictionary(this.strm, R)), v === a.Z_BUF_ERROR && H === !0 && (v = a.Z_OK, H = !1), v !== a.Z_STREAM_END && v !== a.Z_OK) return this.onEnd(v), !(this.ended = !0);
3310
- z.next_out && (z.avail_out !== 0 && v !== a.Z_STREAM_END && (z.avail_in !== 0 || b !== a.Z_FINISH && b !== a.Z_SYNC_FLUSH) || (this.options.to === "string" ? (k = o.utf8border(z.output, z.next_out), S = z.next_out - k, C = o.buf2string(z.output, k), z.next_out = S, z.avail_out = W - S, S && s.arraySet(z.output, z.output, k, S, 0), this.onData(C)) : this.onData(s.shrinkBuf(z.output, z.next_out)))), z.avail_in === 0 && z.avail_out === 0 && (H = !0);
3378
+ if (z.avail_out === 0 && (z.output = new s.Buf8(U), z.next_out = 0, z.avail_out = U), (v = r.inflate(z, a.Z_NO_FLUSH)) === a.Z_NEED_DICT && D && (R = typeof D == "string" ? o.string2buf(D) : p.call(D) === "[object ArrayBuffer]" ? new Uint8Array(D) : D, v = r.inflateSetDictionary(this.strm, R)), v === a.Z_BUF_ERROR && H === !0 && (v = a.Z_OK, H = !1), v !== a.Z_STREAM_END && v !== a.Z_OK) return this.onEnd(v), !(this.ended = !0);
3379
+ z.next_out && (z.avail_out !== 0 && v !== a.Z_STREAM_END && (z.avail_in !== 0 || b !== a.Z_FINISH && b !== a.Z_SYNC_FLUSH) || (this.options.to === "string" ? (k = o.utf8border(z.output, z.next_out), S = z.next_out - k, C = o.buf2string(z.output, k), z.next_out = S, z.avail_out = U - S, S && s.arraySet(z.output, z.output, k, S, 0), this.onData(C)) : this.onData(s.shrinkBuf(z.output, z.next_out)))), z.avail_in === 0 && z.avail_out === 0 && (H = !0);
3311
3380
  } while ((0 < z.avail_in || z.avail_out === 0) && v !== a.Z_STREAM_END);
3312
3381
  return v === a.Z_STREAM_END && (b = a.Z_FINISH), b === a.Z_FINISH ? (v = r.inflateEnd(this.strm), this.onEnd(v), this.ended = !0, v === a.Z_OK) : b !== a.Z_SYNC_FLUSH || (this.onEnd(a.Z_OK), !(z.avail_out = 0));
3313
3382
  }, d.prototype.onData = function(h) {
@@ -3415,7 +3484,7 @@ function Ot() {
3415
3484
  return -1 ^ s;
3416
3485
  };
3417
3486
  }, {}], 46: [function(t, i, n) {
3418
- var r, s = t("../utils/common"), o = t("./trees"), a = t("./adler32"), l = t("./crc32"), c = t("./messages"), f = 0, p = 4, d = 0, y = -2, h = -1, g = 4, v = 2, b = 8, k = 9, S = 286, C = 30, R = 19, z = 2 * S + 1, W = 15, D = 3, H = 258, q = H + D + 1, E = 42, B = 113, m = 1, O = 2, ee = 3, U = 4;
3487
+ var r, s = t("../utils/common"), o = t("./trees"), a = t("./adler32"), l = t("./crc32"), c = t("./messages"), f = 0, p = 4, d = 0, y = -2, h = -1, g = 4, v = 2, b = 8, k = 9, S = 286, C = 30, R = 19, z = 2 * S + 1, U = 15, D = 3, H = 258, q = H + D + 1, E = 42, B = 113, m = 1, O = 2, ee = 3, W = 4;
3419
3488
  function te(u, N) {
3420
3489
  return u.msg = c[N], N;
3421
3490
  }
@@ -3425,12 +3494,12 @@ function Ot() {
3425
3494
  function J(u) {
3426
3495
  for (var N = u.length; 0 <= --N; ) u[N] = 0;
3427
3496
  }
3428
- function I(u) {
3429
- var N = u.state, P = N.pending;
3430
- P > u.avail_out && (P = u.avail_out), P !== 0 && (s.arraySet(u.output, N.pending_buf, N.pending_out, P, u.next_out), u.next_out += P, N.pending_out += P, u.total_out += P, u.avail_out -= P, N.pending -= P, N.pending === 0 && (N.pending_out = 0));
3497
+ function P(u) {
3498
+ var N = u.state, I = N.pending;
3499
+ I > u.avail_out && (I = u.avail_out), I !== 0 && (s.arraySet(u.output, N.pending_buf, N.pending_out, I, u.next_out), u.next_out += I, N.pending_out += I, u.total_out += I, u.avail_out -= I, N.pending -= I, N.pending === 0 && (N.pending_out = 0));
3431
3500
  }
3432
3501
  function L(u, N) {
3433
- o._tr_flush_block(u, 0 <= u.block_start ? u.block_start : -1, u.strstart - u.block_start, N), u.block_start = u.strstart, I(u.strm);
3502
+ o._tr_flush_block(u, 0 <= u.block_start ? u.block_start : -1, u.strstart - u.block_start, N), u.block_start = u.strstart, P(u.strm);
3434
3503
  }
3435
3504
  function Q(u, N) {
3436
3505
  u.pending_buf[u.pending++] = N;
@@ -3439,14 +3508,14 @@ function Ot() {
3439
3508
  u.pending_buf[u.pending++] = N >>> 8 & 255, u.pending_buf[u.pending++] = 255 & N;
3440
3509
  }
3441
3510
  function Z(u, N) {
3442
- var P, x, w = u.max_chain_length, T = u.strstart, V = u.prev_length, j = u.nice_match, A = u.strstart > u.w_size - q ? u.strstart - (u.w_size - q) : 0, G = u.window, X = u.w_mask, $ = u.prev, K = u.strstart + H, se = G[T + V - 1], ne = G[T + V];
3511
+ var I, x, w = u.max_chain_length, T = u.strstart, V = u.prev_length, j = u.nice_match, A = u.strstart > u.w_size - q ? u.strstart - (u.w_size - q) : 0, G = u.window, X = u.w_mask, $ = u.prev, K = u.strstart + H, se = G[T + V - 1], ne = G[T + V];
3443
3512
  u.prev_length >= u.good_match && (w >>= 2), j > u.lookahead && (j = u.lookahead);
3444
3513
  do
3445
- if (G[(P = N) + V] === ne && G[P + V - 1] === se && G[P] === G[T] && G[++P] === G[T + 1]) {
3446
- T += 2, P++;
3514
+ if (G[(I = N) + V] === ne && G[I + V - 1] === se && G[I] === G[T] && G[++I] === G[T + 1]) {
3515
+ T += 2, I++;
3447
3516
  do
3448
3517
  ;
3449
- while (G[++T] === G[++P] && G[++T] === G[++P] && G[++T] === G[++P] && G[++T] === G[++P] && G[++T] === G[++P] && G[++T] === G[++P] && G[++T] === G[++P] && G[++T] === G[++P] && T < K);
3518
+ while (G[++T] === G[++I] && G[++T] === G[++I] && G[++T] === G[++I] && G[++T] === G[++I] && G[++T] === G[++I] && G[++T] === G[++I] && G[++T] === G[++I] && G[++T] === G[++I] && T < K);
3450
3519
  if (x = H - (K - T), T = K - H, V < x) {
3451
3520
  if (u.match_start = N, j <= (V = x)) break;
3452
3521
  se = G[T + V - 1], ne = G[T + V];
@@ -3456,52 +3525,52 @@ function Ot() {
3456
3525
  return V <= u.lookahead ? V : u.lookahead;
3457
3526
  }
3458
3527
  function ae(u) {
3459
- var N, P, x, w, T, V, j, A, G, X, $ = u.w_size;
3528
+ var N, I, x, w, T, V, j, A, G, X, $ = u.w_size;
3460
3529
  do {
3461
3530
  if (w = u.window_size - u.lookahead - u.strstart, u.strstart >= $ + ($ - q)) {
3462
- for (s.arraySet(u.window, u.window, $, $, 0), u.match_start -= $, u.strstart -= $, u.block_start -= $, N = P = u.hash_size; x = u.head[--N], u.head[N] = $ <= x ? x - $ : 0, --P; ) ;
3463
- for (N = P = $; x = u.prev[--N], u.prev[N] = $ <= x ? x - $ : 0, --P; ) ;
3531
+ for (s.arraySet(u.window, u.window, $, $, 0), u.match_start -= $, u.strstart -= $, u.block_start -= $, N = I = u.hash_size; x = u.head[--N], u.head[N] = $ <= x ? x - $ : 0, --I; ) ;
3532
+ for (N = I = $; x = u.prev[--N], u.prev[N] = $ <= x ? x - $ : 0, --I; ) ;
3464
3533
  w += $;
3465
3534
  }
3466
3535
  if (u.strm.avail_in === 0) break;
3467
- if (V = u.strm, j = u.window, A = u.strstart + u.lookahead, G = w, X = void 0, X = V.avail_in, G < X && (X = G), P = X === 0 ? 0 : (V.avail_in -= X, s.arraySet(j, V.input, V.next_in, X, A), V.state.wrap === 1 ? V.adler = a(V.adler, j, X, A) : V.state.wrap === 2 && (V.adler = l(V.adler, j, X, A)), V.next_in += X, V.total_in += X, X), u.lookahead += P, u.lookahead + u.insert >= D) for (T = u.strstart - u.insert, u.ins_h = u.window[T], u.ins_h = (u.ins_h << u.hash_shift ^ u.window[T + 1]) & u.hash_mask; u.insert && (u.ins_h = (u.ins_h << u.hash_shift ^ u.window[T + D - 1]) & u.hash_mask, u.prev[T & u.w_mask] = u.head[u.ins_h], u.head[u.ins_h] = T, T++, u.insert--, !(u.lookahead + u.insert < D)); ) ;
3536
+ if (V = u.strm, j = u.window, A = u.strstart + u.lookahead, G = w, X = void 0, X = V.avail_in, G < X && (X = G), I = X === 0 ? 0 : (V.avail_in -= X, s.arraySet(j, V.input, V.next_in, X, A), V.state.wrap === 1 ? V.adler = a(V.adler, j, X, A) : V.state.wrap === 2 && (V.adler = l(V.adler, j, X, A)), V.next_in += X, V.total_in += X, X), u.lookahead += I, u.lookahead + u.insert >= D) for (T = u.strstart - u.insert, u.ins_h = u.window[T], u.ins_h = (u.ins_h << u.hash_shift ^ u.window[T + 1]) & u.hash_mask; u.insert && (u.ins_h = (u.ins_h << u.hash_shift ^ u.window[T + D - 1]) & u.hash_mask, u.prev[T & u.w_mask] = u.head[u.ins_h], u.head[u.ins_h] = T, T++, u.insert--, !(u.lookahead + u.insert < D)); ) ;
3468
3537
  } while (u.lookahead < q && u.strm.avail_in !== 0);
3469
3538
  }
3470
3539
  function ue(u, N) {
3471
- for (var P, x; ; ) {
3540
+ for (var I, x; ; ) {
3472
3541
  if (u.lookahead < q) {
3473
3542
  if (ae(u), u.lookahead < q && N === f) return m;
3474
3543
  if (u.lookahead === 0) break;
3475
3544
  }
3476
- if (P = 0, u.lookahead >= D && (u.ins_h = (u.ins_h << u.hash_shift ^ u.window[u.strstart + D - 1]) & u.hash_mask, P = u.prev[u.strstart & u.w_mask] = u.head[u.ins_h], u.head[u.ins_h] = u.strstart), P !== 0 && u.strstart - P <= u.w_size - q && (u.match_length = Z(u, P)), u.match_length >= D) if (x = o._tr_tally(u, u.strstart - u.match_start, u.match_length - D), u.lookahead -= u.match_length, u.match_length <= u.max_lazy_match && u.lookahead >= D) {
3477
- for (u.match_length--; u.strstart++, u.ins_h = (u.ins_h << u.hash_shift ^ u.window[u.strstart + D - 1]) & u.hash_mask, P = u.prev[u.strstart & u.w_mask] = u.head[u.ins_h], u.head[u.ins_h] = u.strstart, --u.match_length != 0; ) ;
3545
+ if (I = 0, u.lookahead >= D && (u.ins_h = (u.ins_h << u.hash_shift ^ u.window[u.strstart + D - 1]) & u.hash_mask, I = u.prev[u.strstart & u.w_mask] = u.head[u.ins_h], u.head[u.ins_h] = u.strstart), I !== 0 && u.strstart - I <= u.w_size - q && (u.match_length = Z(u, I)), u.match_length >= D) if (x = o._tr_tally(u, u.strstart - u.match_start, u.match_length - D), u.lookahead -= u.match_length, u.match_length <= u.max_lazy_match && u.lookahead >= D) {
3546
+ for (u.match_length--; u.strstart++, u.ins_h = (u.ins_h << u.hash_shift ^ u.window[u.strstart + D - 1]) & u.hash_mask, I = u.prev[u.strstart & u.w_mask] = u.head[u.ins_h], u.head[u.ins_h] = u.strstart, --u.match_length != 0; ) ;
3478
3547
  u.strstart++;
3479
3548
  } else u.strstart += u.match_length, u.match_length = 0, u.ins_h = u.window[u.strstart], u.ins_h = (u.ins_h << u.hash_shift ^ u.window[u.strstart + 1]) & u.hash_mask;
3480
3549
  else x = o._tr_tally(u, 0, u.window[u.strstart]), u.lookahead--, u.strstart++;
3481
3550
  if (x && (L(u, !1), u.strm.avail_out === 0)) return m;
3482
3551
  }
3483
- return u.insert = u.strstart < D - 1 ? u.strstart : D - 1, N === p ? (L(u, !0), u.strm.avail_out === 0 ? ee : U) : u.last_lit && (L(u, !1), u.strm.avail_out === 0) ? m : O;
3552
+ return u.insert = u.strstart < D - 1 ? u.strstart : D - 1, N === p ? (L(u, !0), u.strm.avail_out === 0 ? ee : W) : u.last_lit && (L(u, !1), u.strm.avail_out === 0) ? m : O;
3484
3553
  }
3485
3554
  function ie(u, N) {
3486
- for (var P, x, w; ; ) {
3555
+ for (var I, x, w; ; ) {
3487
3556
  if (u.lookahead < q) {
3488
3557
  if (ae(u), u.lookahead < q && N === f) return m;
3489
3558
  if (u.lookahead === 0) break;
3490
3559
  }
3491
- if (P = 0, u.lookahead >= D && (u.ins_h = (u.ins_h << u.hash_shift ^ u.window[u.strstart + D - 1]) & u.hash_mask, P = u.prev[u.strstart & u.w_mask] = u.head[u.ins_h], u.head[u.ins_h] = u.strstart), u.prev_length = u.match_length, u.prev_match = u.match_start, u.match_length = D - 1, P !== 0 && u.prev_length < u.max_lazy_match && u.strstart - P <= u.w_size - q && (u.match_length = Z(u, P), u.match_length <= 5 && (u.strategy === 1 || u.match_length === D && 4096 < u.strstart - u.match_start) && (u.match_length = D - 1)), u.prev_length >= D && u.match_length <= u.prev_length) {
3492
- for (w = u.strstart + u.lookahead - D, x = o._tr_tally(u, u.strstart - 1 - u.prev_match, u.prev_length - D), u.lookahead -= u.prev_length - 1, u.prev_length -= 2; ++u.strstart <= w && (u.ins_h = (u.ins_h << u.hash_shift ^ u.window[u.strstart + D - 1]) & u.hash_mask, P = u.prev[u.strstart & u.w_mask] = u.head[u.ins_h], u.head[u.ins_h] = u.strstart), --u.prev_length != 0; ) ;
3560
+ if (I = 0, u.lookahead >= D && (u.ins_h = (u.ins_h << u.hash_shift ^ u.window[u.strstart + D - 1]) & u.hash_mask, I = u.prev[u.strstart & u.w_mask] = u.head[u.ins_h], u.head[u.ins_h] = u.strstart), u.prev_length = u.match_length, u.prev_match = u.match_start, u.match_length = D - 1, I !== 0 && u.prev_length < u.max_lazy_match && u.strstart - I <= u.w_size - q && (u.match_length = Z(u, I), u.match_length <= 5 && (u.strategy === 1 || u.match_length === D && 4096 < u.strstart - u.match_start) && (u.match_length = D - 1)), u.prev_length >= D && u.match_length <= u.prev_length) {
3561
+ for (w = u.strstart + u.lookahead - D, x = o._tr_tally(u, u.strstart - 1 - u.prev_match, u.prev_length - D), u.lookahead -= u.prev_length - 1, u.prev_length -= 2; ++u.strstart <= w && (u.ins_h = (u.ins_h << u.hash_shift ^ u.window[u.strstart + D - 1]) & u.hash_mask, I = u.prev[u.strstart & u.w_mask] = u.head[u.ins_h], u.head[u.ins_h] = u.strstart), --u.prev_length != 0; ) ;
3493
3562
  if (u.match_available = 0, u.match_length = D - 1, u.strstart++, x && (L(u, !1), u.strm.avail_out === 0)) return m;
3494
3563
  } else if (u.match_available) {
3495
3564
  if ((x = o._tr_tally(u, 0, u.window[u.strstart - 1])) && L(u, !1), u.strstart++, u.lookahead--, u.strm.avail_out === 0) return m;
3496
3565
  } else u.match_available = 1, u.strstart++, u.lookahead--;
3497
3566
  }
3498
- return u.match_available && (x = o._tr_tally(u, 0, u.window[u.strstart - 1]), u.match_available = 0), u.insert = u.strstart < D - 1 ? u.strstart : D - 1, N === p ? (L(u, !0), u.strm.avail_out === 0 ? ee : U) : u.last_lit && (L(u, !1), u.strm.avail_out === 0) ? m : O;
3567
+ return u.match_available && (x = o._tr_tally(u, 0, u.window[u.strstart - 1]), u.match_available = 0), u.insert = u.strstart < D - 1 ? u.strstart : D - 1, N === p ? (L(u, !0), u.strm.avail_out === 0 ? ee : W) : u.last_lit && (L(u, !1), u.strm.avail_out === 0) ? m : O;
3499
3568
  }
3500
- function re(u, N, P, x, w) {
3501
- this.good_length = u, this.max_lazy = N, this.nice_length = P, this.max_chain = x, this.func = w;
3569
+ function re(u, N, I, x, w) {
3570
+ this.good_length = u, this.max_lazy = N, this.nice_length = I, this.max_chain = x, this.func = w;
3502
3571
  }
3503
3572
  function de() {
3504
- this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = b, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new s.Buf16(2 * z), this.dyn_dtree = new s.Buf16(2 * (2 * C + 1)), this.bl_tree = new s.Buf16(2 * (2 * R + 1)), J(this.dyn_ltree), J(this.dyn_dtree), J(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new s.Buf16(W + 1), this.heap = new s.Buf16(2 * S + 1), J(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new s.Buf16(2 * S + 1), J(this.depth), this.l_buf = 0, this.lit_bufsize = 0, this.last_lit = 0, this.d_buf = 0, this.opt_len = 0, this.static_len = 0, this.matches = 0, this.insert = 0, this.bi_buf = 0, this.bi_valid = 0;
3573
+ this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = b, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new s.Buf16(2 * z), this.dyn_dtree = new s.Buf16(2 * (2 * C + 1)), this.bl_tree = new s.Buf16(2 * (2 * R + 1)), J(this.dyn_ltree), J(this.dyn_dtree), J(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new s.Buf16(U + 1), this.heap = new s.Buf16(2 * S + 1), J(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new s.Buf16(2 * S + 1), J(this.depth), this.l_buf = 0, this.lit_bufsize = 0, this.last_lit = 0, this.d_buf = 0, this.opt_len = 0, this.static_len = 0, this.matches = 0, this.insert = 0, this.bi_buf = 0, this.bi_valid = 0;
3505
3574
  }
3506
3575
  function le(u) {
3507
3576
  var N;
@@ -3509,51 +3578,51 @@ function Ot() {
3509
3578
  }
3510
3579
  function ge(u) {
3511
3580
  var N = le(u);
3512
- return N === d && (function(P) {
3513
- P.window_size = 2 * P.w_size, J(P.head), P.max_lazy_match = r[P.level].max_lazy, P.good_match = r[P.level].good_length, P.nice_match = r[P.level].nice_length, P.max_chain_length = r[P.level].max_chain, P.strstart = 0, P.block_start = 0, P.lookahead = 0, P.insert = 0, P.match_length = P.prev_length = D - 1, P.match_available = 0, P.ins_h = 0;
3581
+ return N === d && (function(I) {
3582
+ I.window_size = 2 * I.w_size, J(I.head), I.max_lazy_match = r[I.level].max_lazy, I.good_match = r[I.level].good_length, I.nice_match = r[I.level].nice_length, I.max_chain_length = r[I.level].max_chain, I.strstart = 0, I.block_start = 0, I.lookahead = 0, I.insert = 0, I.match_length = I.prev_length = D - 1, I.match_available = 0, I.ins_h = 0;
3514
3583
  })(u.state), N;
3515
3584
  }
3516
- function me(u, N, P, x, w, T) {
3585
+ function me(u, N, I, x, w, T) {
3517
3586
  if (!u) return y;
3518
3587
  var V = 1;
3519
- if (N === h && (N = 6), x < 0 ? (V = 0, x = -x) : 15 < x && (V = 2, x -= 16), w < 1 || k < w || P !== b || x < 8 || 15 < x || N < 0 || 9 < N || T < 0 || g < T) return te(u, y);
3588
+ if (N === h && (N = 6), x < 0 ? (V = 0, x = -x) : 15 < x && (V = 2, x -= 16), w < 1 || k < w || I !== b || x < 8 || 15 < x || N < 0 || 9 < N || T < 0 || g < T) return te(u, y);
3520
3589
  x === 8 && (x = 9);
3521
3590
  var j = new de();
3522
- return (u.state = j).strm = u, j.wrap = V, j.gzhead = null, j.w_bits = x, j.w_size = 1 << j.w_bits, j.w_mask = j.w_size - 1, j.hash_bits = w + 7, j.hash_size = 1 << j.hash_bits, j.hash_mask = j.hash_size - 1, j.hash_shift = ~~((j.hash_bits + D - 1) / D), j.window = new s.Buf8(2 * j.w_size), j.head = new s.Buf16(j.hash_size), j.prev = new s.Buf16(j.w_size), j.lit_bufsize = 1 << w + 6, j.pending_buf_size = 4 * j.lit_bufsize, j.pending_buf = new s.Buf8(j.pending_buf_size), j.d_buf = 1 * j.lit_bufsize, j.l_buf = 3 * j.lit_bufsize, j.level = N, j.strategy = T, j.method = P, ge(u);
3591
+ return (u.state = j).strm = u, j.wrap = V, j.gzhead = null, j.w_bits = x, j.w_size = 1 << j.w_bits, j.w_mask = j.w_size - 1, j.hash_bits = w + 7, j.hash_size = 1 << j.hash_bits, j.hash_mask = j.hash_size - 1, j.hash_shift = ~~((j.hash_bits + D - 1) / D), j.window = new s.Buf8(2 * j.w_size), j.head = new s.Buf16(j.hash_size), j.prev = new s.Buf16(j.w_size), j.lit_bufsize = 1 << w + 6, j.pending_buf_size = 4 * j.lit_bufsize, j.pending_buf = new s.Buf8(j.pending_buf_size), j.d_buf = 1 * j.lit_bufsize, j.l_buf = 3 * j.lit_bufsize, j.level = N, j.strategy = T, j.method = I, ge(u);
3523
3592
  }
3524
3593
  r = [new re(0, 0, 0, 0, function(u, N) {
3525
- var P = 65535;
3526
- for (P > u.pending_buf_size - 5 && (P = u.pending_buf_size - 5); ; ) {
3594
+ var I = 65535;
3595
+ for (I > u.pending_buf_size - 5 && (I = u.pending_buf_size - 5); ; ) {
3527
3596
  if (u.lookahead <= 1) {
3528
3597
  if (ae(u), u.lookahead === 0 && N === f) return m;
3529
3598
  if (u.lookahead === 0) break;
3530
3599
  }
3531
3600
  u.strstart += u.lookahead, u.lookahead = 0;
3532
- var x = u.block_start + P;
3601
+ var x = u.block_start + I;
3533
3602
  if ((u.strstart === 0 || u.strstart >= x) && (u.lookahead = u.strstart - x, u.strstart = x, L(u, !1), u.strm.avail_out === 0) || u.strstart - u.block_start >= u.w_size - q && (L(u, !1), u.strm.avail_out === 0)) return m;
3534
3603
  }
3535
- return u.insert = 0, N === p ? (L(u, !0), u.strm.avail_out === 0 ? ee : U) : (u.strstart > u.block_start && (L(u, !1), u.strm.avail_out), m);
3604
+ return u.insert = 0, N === p ? (L(u, !0), u.strm.avail_out === 0 ? ee : W) : (u.strstart > u.block_start && (L(u, !1), u.strm.avail_out), m);
3536
3605
  }), new re(4, 4, 8, 4, ue), new re(4, 5, 16, 8, ue), new re(4, 6, 32, 32, ue), new re(4, 4, 16, 16, ie), new re(8, 16, 32, 32, ie), new re(8, 16, 128, 128, ie), new re(8, 32, 128, 256, ie), new re(32, 128, 258, 1024, ie), new re(32, 258, 258, 4096, ie)], n.deflateInit = function(u, N) {
3537
3606
  return me(u, N, b, 15, 8, 0);
3538
3607
  }, n.deflateInit2 = me, n.deflateReset = ge, n.deflateResetKeep = le, n.deflateSetHeader = function(u, N) {
3539
3608
  return u && u.state ? u.state.wrap !== 2 ? y : (u.state.gzhead = N, d) : y;
3540
3609
  }, n.deflate = function(u, N) {
3541
- var P, x, w, T;
3610
+ var I, x, w, T;
3542
3611
  if (!u || !u.state || 5 < N || N < 0) return u ? te(u, y) : y;
3543
3612
  if (x = u.state, !u.output || !u.input && u.avail_in !== 0 || x.status === 666 && N !== p) return te(u, u.avail_out === 0 ? -5 : y);
3544
- if (x.strm = u, P = x.last_flush, x.last_flush = N, x.status === E) if (x.wrap === 2) u.adler = 0, Q(x, 31), Q(x, 139), Q(x, 8), x.gzhead ? (Q(x, (x.gzhead.text ? 1 : 0) + (x.gzhead.hcrc ? 2 : 0) + (x.gzhead.extra ? 4 : 0) + (x.gzhead.name ? 8 : 0) + (x.gzhead.comment ? 16 : 0)), Q(x, 255 & x.gzhead.time), Q(x, x.gzhead.time >> 8 & 255), Q(x, x.gzhead.time >> 16 & 255), Q(x, x.gzhead.time >> 24 & 255), Q(x, x.level === 9 ? 2 : 2 <= x.strategy || x.level < 2 ? 4 : 0), Q(x, 255 & x.gzhead.os), x.gzhead.extra && x.gzhead.extra.length && (Q(x, 255 & x.gzhead.extra.length), Q(x, x.gzhead.extra.length >> 8 & 255)), x.gzhead.hcrc && (u.adler = l(u.adler, x.pending_buf, x.pending, 0)), x.gzindex = 0, x.status = 69) : (Q(x, 0), Q(x, 0), Q(x, 0), Q(x, 0), Q(x, 0), Q(x, x.level === 9 ? 2 : 2 <= x.strategy || x.level < 2 ? 4 : 0), Q(x, 3), x.status = B);
3613
+ if (x.strm = u, I = x.last_flush, x.last_flush = N, x.status === E) if (x.wrap === 2) u.adler = 0, Q(x, 31), Q(x, 139), Q(x, 8), x.gzhead ? (Q(x, (x.gzhead.text ? 1 : 0) + (x.gzhead.hcrc ? 2 : 0) + (x.gzhead.extra ? 4 : 0) + (x.gzhead.name ? 8 : 0) + (x.gzhead.comment ? 16 : 0)), Q(x, 255 & x.gzhead.time), Q(x, x.gzhead.time >> 8 & 255), Q(x, x.gzhead.time >> 16 & 255), Q(x, x.gzhead.time >> 24 & 255), Q(x, x.level === 9 ? 2 : 2 <= x.strategy || x.level < 2 ? 4 : 0), Q(x, 255 & x.gzhead.os), x.gzhead.extra && x.gzhead.extra.length && (Q(x, 255 & x.gzhead.extra.length), Q(x, x.gzhead.extra.length >> 8 & 255)), x.gzhead.hcrc && (u.adler = l(u.adler, x.pending_buf, x.pending, 0)), x.gzindex = 0, x.status = 69) : (Q(x, 0), Q(x, 0), Q(x, 0), Q(x, 0), Q(x, 0), Q(x, x.level === 9 ? 2 : 2 <= x.strategy || x.level < 2 ? 4 : 0), Q(x, 3), x.status = B);
3545
3614
  else {
3546
3615
  var V = b + (x.w_bits - 8 << 4) << 8;
3547
3616
  V |= (2 <= x.strategy || x.level < 2 ? 0 : x.level < 6 ? 1 : x.level === 6 ? 2 : 3) << 6, x.strstart !== 0 && (V |= 32), V += 31 - V % 31, x.status = B, Y(x, V), x.strstart !== 0 && (Y(x, u.adler >>> 16), Y(x, 65535 & u.adler)), u.adler = 1;
3548
3617
  }
3549
3618
  if (x.status === 69) if (x.gzhead.extra) {
3550
- for (w = x.pending; x.gzindex < (65535 & x.gzhead.extra.length) && (x.pending !== x.pending_buf_size || (x.gzhead.hcrc && x.pending > w && (u.adler = l(u.adler, x.pending_buf, x.pending - w, w)), I(u), w = x.pending, x.pending !== x.pending_buf_size)); ) Q(x, 255 & x.gzhead.extra[x.gzindex]), x.gzindex++;
3619
+ for (w = x.pending; x.gzindex < (65535 & x.gzhead.extra.length) && (x.pending !== x.pending_buf_size || (x.gzhead.hcrc && x.pending > w && (u.adler = l(u.adler, x.pending_buf, x.pending - w, w)), P(u), w = x.pending, x.pending !== x.pending_buf_size)); ) Q(x, 255 & x.gzhead.extra[x.gzindex]), x.gzindex++;
3551
3620
  x.gzhead.hcrc && x.pending > w && (u.adler = l(u.adler, x.pending_buf, x.pending - w, w)), x.gzindex === x.gzhead.extra.length && (x.gzindex = 0, x.status = 73);
3552
3621
  } else x.status = 73;
3553
3622
  if (x.status === 73) if (x.gzhead.name) {
3554
3623
  w = x.pending;
3555
3624
  do {
3556
- if (x.pending === x.pending_buf_size && (x.gzhead.hcrc && x.pending > w && (u.adler = l(u.adler, x.pending_buf, x.pending - w, w)), I(u), w = x.pending, x.pending === x.pending_buf_size)) {
3625
+ if (x.pending === x.pending_buf_size && (x.gzhead.hcrc && x.pending > w && (u.adler = l(u.adler, x.pending_buf, x.pending - w, w)), P(u), w = x.pending, x.pending === x.pending_buf_size)) {
3557
3626
  T = 1;
3558
3627
  break;
3559
3628
  }
@@ -3564,7 +3633,7 @@ function Ot() {
3564
3633
  if (x.status === 91) if (x.gzhead.comment) {
3565
3634
  w = x.pending;
3566
3635
  do {
3567
- if (x.pending === x.pending_buf_size && (x.gzhead.hcrc && x.pending > w && (u.adler = l(u.adler, x.pending_buf, x.pending - w, w)), I(u), w = x.pending, x.pending === x.pending_buf_size)) {
3636
+ if (x.pending === x.pending_buf_size && (x.gzhead.hcrc && x.pending > w && (u.adler = l(u.adler, x.pending_buf, x.pending - w, w)), P(u), w = x.pending, x.pending === x.pending_buf_size)) {
3568
3637
  T = 1;
3569
3638
  break;
3570
3639
  }
@@ -3572,9 +3641,9 @@ function Ot() {
3572
3641
  } while (T !== 0);
3573
3642
  x.gzhead.hcrc && x.pending > w && (u.adler = l(u.adler, x.pending_buf, x.pending - w, w)), T === 0 && (x.status = 103);
3574
3643
  } else x.status = 103;
3575
- if (x.status === 103 && (x.gzhead.hcrc ? (x.pending + 2 > x.pending_buf_size && I(u), x.pending + 2 <= x.pending_buf_size && (Q(x, 255 & u.adler), Q(x, u.adler >> 8 & 255), u.adler = 0, x.status = B)) : x.status = B), x.pending !== 0) {
3576
- if (I(u), u.avail_out === 0) return x.last_flush = -1, d;
3577
- } else if (u.avail_in === 0 && F(N) <= F(P) && N !== p) return te(u, -5);
3644
+ if (x.status === 103 && (x.gzhead.hcrc ? (x.pending + 2 > x.pending_buf_size && P(u), x.pending + 2 <= x.pending_buf_size && (Q(x, 255 & u.adler), Q(x, u.adler >> 8 & 255), u.adler = 0, x.status = B)) : x.status = B), x.pending !== 0) {
3645
+ if (P(u), u.avail_out === 0) return x.last_flush = -1, d;
3646
+ } else if (u.avail_in === 0 && F(N) <= F(I) && N !== p) return te(u, -5);
3578
3647
  if (x.status === 666 && u.avail_in !== 0) return te(u, -5);
3579
3648
  if (u.avail_in !== 0 || x.lookahead !== 0 || N !== f && x.status !== 666) {
3580
3649
  var j = x.strategy === 2 ? (function(A, G) {
@@ -3585,7 +3654,7 @@ function Ot() {
3585
3654
  }
3586
3655
  if (A.match_length = 0, X = o._tr_tally(A, 0, A.window[A.strstart]), A.lookahead--, A.strstart++, X && (L(A, !1), A.strm.avail_out === 0)) return m;
3587
3656
  }
3588
- return A.insert = 0, G === p ? (L(A, !0), A.strm.avail_out === 0 ? ee : U) : A.last_lit && (L(A, !1), A.strm.avail_out === 0) ? m : O;
3657
+ return A.insert = 0, G === p ? (L(A, !0), A.strm.avail_out === 0 ? ee : W) : A.last_lit && (L(A, !1), A.strm.avail_out === 0) ? m : O;
3589
3658
  })(x, N) : x.strategy === 3 ? (function(A, G) {
3590
3659
  for (var X, $, K, se, ne = A.window; ; ) {
3591
3660
  if (A.lookahead <= H) {
@@ -3601,23 +3670,23 @@ function Ot() {
3601
3670
  }
3602
3671
  if (A.match_length >= D ? (X = o._tr_tally(A, 1, A.match_length - D), A.lookahead -= A.match_length, A.strstart += A.match_length, A.match_length = 0) : (X = o._tr_tally(A, 0, A.window[A.strstart]), A.lookahead--, A.strstart++), X && (L(A, !1), A.strm.avail_out === 0)) return m;
3603
3672
  }
3604
- return A.insert = 0, G === p ? (L(A, !0), A.strm.avail_out === 0 ? ee : U) : A.last_lit && (L(A, !1), A.strm.avail_out === 0) ? m : O;
3673
+ return A.insert = 0, G === p ? (L(A, !0), A.strm.avail_out === 0 ? ee : W) : A.last_lit && (L(A, !1), A.strm.avail_out === 0) ? m : O;
3605
3674
  })(x, N) : r[x.level].func(x, N);
3606
- if (j !== ee && j !== U || (x.status = 666), j === m || j === ee) return u.avail_out === 0 && (x.last_flush = -1), d;
3607
- if (j === O && (N === 1 ? o._tr_align(x) : N !== 5 && (o._tr_stored_block(x, 0, 0, !1), N === 3 && (J(x.head), x.lookahead === 0 && (x.strstart = 0, x.block_start = 0, x.insert = 0))), I(u), u.avail_out === 0)) return x.last_flush = -1, d;
3675
+ if (j !== ee && j !== W || (x.status = 666), j === m || j === ee) return u.avail_out === 0 && (x.last_flush = -1), d;
3676
+ if (j === O && (N === 1 ? o._tr_align(x) : N !== 5 && (o._tr_stored_block(x, 0, 0, !1), N === 3 && (J(x.head), x.lookahead === 0 && (x.strstart = 0, x.block_start = 0, x.insert = 0))), P(u), u.avail_out === 0)) return x.last_flush = -1, d;
3608
3677
  }
3609
- return N !== p ? d : x.wrap <= 0 ? 1 : (x.wrap === 2 ? (Q(x, 255 & u.adler), Q(x, u.adler >> 8 & 255), Q(x, u.adler >> 16 & 255), Q(x, u.adler >> 24 & 255), Q(x, 255 & u.total_in), Q(x, u.total_in >> 8 & 255), Q(x, u.total_in >> 16 & 255), Q(x, u.total_in >> 24 & 255)) : (Y(x, u.adler >>> 16), Y(x, 65535 & u.adler)), I(u), 0 < x.wrap && (x.wrap = -x.wrap), x.pending !== 0 ? d : 1);
3678
+ return N !== p ? d : x.wrap <= 0 ? 1 : (x.wrap === 2 ? (Q(x, 255 & u.adler), Q(x, u.adler >> 8 & 255), Q(x, u.adler >> 16 & 255), Q(x, u.adler >> 24 & 255), Q(x, 255 & u.total_in), Q(x, u.total_in >> 8 & 255), Q(x, u.total_in >> 16 & 255), Q(x, u.total_in >> 24 & 255)) : (Y(x, u.adler >>> 16), Y(x, 65535 & u.adler)), P(u), 0 < x.wrap && (x.wrap = -x.wrap), x.pending !== 0 ? d : 1);
3610
3679
  }, n.deflateEnd = function(u) {
3611
3680
  var N;
3612
3681
  return u && u.state ? (N = u.state.status) !== E && N !== 69 && N !== 73 && N !== 91 && N !== 103 && N !== B && N !== 666 ? te(u, y) : (u.state = null, N === B ? te(u, -3) : d) : y;
3613
3682
  }, n.deflateSetDictionary = function(u, N) {
3614
- var P, x, w, T, V, j, A, G, X = N.length;
3615
- if (!u || !u.state || (T = (P = u.state).wrap) === 2 || T === 1 && P.status !== E || P.lookahead) return y;
3616
- for (T === 1 && (u.adler = a(u.adler, N, X, 0)), P.wrap = 0, X >= P.w_size && (T === 0 && (J(P.head), P.strstart = 0, P.block_start = 0, P.insert = 0), G = new s.Buf8(P.w_size), s.arraySet(G, N, X - P.w_size, P.w_size, 0), N = G, X = P.w_size), V = u.avail_in, j = u.next_in, A = u.input, u.avail_in = X, u.next_in = 0, u.input = N, ae(P); P.lookahead >= D; ) {
3617
- for (x = P.strstart, w = P.lookahead - (D - 1); P.ins_h = (P.ins_h << P.hash_shift ^ P.window[x + D - 1]) & P.hash_mask, P.prev[x & P.w_mask] = P.head[P.ins_h], P.head[P.ins_h] = x, x++, --w; ) ;
3618
- P.strstart = x, P.lookahead = D - 1, ae(P);
3683
+ var I, x, w, T, V, j, A, G, X = N.length;
3684
+ if (!u || !u.state || (T = (I = u.state).wrap) === 2 || T === 1 && I.status !== E || I.lookahead) return y;
3685
+ for (T === 1 && (u.adler = a(u.adler, N, X, 0)), I.wrap = 0, X >= I.w_size && (T === 0 && (J(I.head), I.strstart = 0, I.block_start = 0, I.insert = 0), G = new s.Buf8(I.w_size), s.arraySet(G, N, X - I.w_size, I.w_size, 0), N = G, X = I.w_size), V = u.avail_in, j = u.next_in, A = u.input, u.avail_in = X, u.next_in = 0, u.input = N, ae(I); I.lookahead >= D; ) {
3686
+ for (x = I.strstart, w = I.lookahead - (D - 1); I.ins_h = (I.ins_h << I.hash_shift ^ I.window[x + D - 1]) & I.hash_mask, I.prev[x & I.w_mask] = I.head[I.ins_h], I.head[I.ins_h] = x, x++, --w; ) ;
3687
+ I.strstart = x, I.lookahead = D - 1, ae(I);
3619
3688
  }
3620
- return P.strstart += P.lookahead, P.block_start = P.strstart, P.insert = P.lookahead, P.lookahead = 0, P.match_length = P.prev_length = D - 1, P.match_available = 0, u.next_in = j, u.input = A, u.avail_in = V, P.wrap = T, d;
3689
+ return I.strstart += I.lookahead, I.block_start = I.strstart, I.insert = I.lookahead, I.lookahead = 0, I.match_length = I.prev_length = D - 1, I.match_available = 0, u.next_in = j, u.input = A, u.avail_in = V, I.wrap = T, d;
3621
3690
  }, n.deflateInfo = "pako deflate (from Nodeca project)";
3622
3691
  }, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./messages": 51, "./trees": 52 }], 47: [function(t, i, n) {
3623
3692
  i.exports = function() {
@@ -3625,16 +3694,16 @@ function Ot() {
3625
3694
  };
3626
3695
  }, {}], 48: [function(t, i, n) {
3627
3696
  i.exports = function(r, s) {
3628
- var o, a, l, c, f, p, d, y, h, g, v, b, k, S, C, R, z, W, D, H, q, E, B, m, O;
3697
+ var o, a, l, c, f, p, d, y, h, g, v, b, k, S, C, R, z, U, D, H, q, E, B, m, O;
3629
3698
  o = r.state, a = r.next_in, m = r.input, l = a + (r.avail_in - 5), c = r.next_out, O = r.output, f = c - (s - r.avail_out), p = c + (r.avail_out - 257), d = o.dmax, y = o.wsize, h = o.whave, g = o.wnext, v = o.window, b = o.hold, k = o.bits, S = o.lencode, C = o.distcode, R = (1 << o.lenbits) - 1, z = (1 << o.distbits) - 1;
3630
3699
  e: do {
3631
- k < 15 && (b += m[a++] << k, k += 8, b += m[a++] << k, k += 8), W = S[b & R];
3700
+ k < 15 && (b += m[a++] << k, k += 8, b += m[a++] << k, k += 8), U = S[b & R];
3632
3701
  t: for (; ; ) {
3633
- if (b >>>= D = W >>> 24, k -= D, (D = W >>> 16 & 255) === 0) O[c++] = 65535 & W;
3702
+ if (b >>>= D = U >>> 24, k -= D, (D = U >>> 16 & 255) === 0) O[c++] = 65535 & U;
3634
3703
  else {
3635
3704
  if (!(16 & D)) {
3636
3705
  if ((64 & D) == 0) {
3637
- W = S[(65535 & W) + (b & (1 << D) - 1)];
3706
+ U = S[(65535 & U) + (b & (1 << D) - 1)];
3638
3707
  continue t;
3639
3708
  }
3640
3709
  if (32 & D) {
@@ -3644,17 +3713,17 @@ function Ot() {
3644
3713
  r.msg = "invalid literal/length code", o.mode = 30;
3645
3714
  break e;
3646
3715
  }
3647
- H = 65535 & W, (D &= 15) && (k < D && (b += m[a++] << k, k += 8), H += b & (1 << D) - 1, b >>>= D, k -= D), k < 15 && (b += m[a++] << k, k += 8, b += m[a++] << k, k += 8), W = C[b & z];
3716
+ H = 65535 & U, (D &= 15) && (k < D && (b += m[a++] << k, k += 8), H += b & (1 << D) - 1, b >>>= D, k -= D), k < 15 && (b += m[a++] << k, k += 8, b += m[a++] << k, k += 8), U = C[b & z];
3648
3717
  i: for (; ; ) {
3649
- if (b >>>= D = W >>> 24, k -= D, !(16 & (D = W >>> 16 & 255))) {
3718
+ if (b >>>= D = U >>> 24, k -= D, !(16 & (D = U >>> 16 & 255))) {
3650
3719
  if ((64 & D) == 0) {
3651
- W = C[(65535 & W) + (b & (1 << D) - 1)];
3720
+ U = C[(65535 & U) + (b & (1 << D) - 1)];
3652
3721
  continue i;
3653
3722
  }
3654
3723
  r.msg = "invalid distance code", o.mode = 30;
3655
3724
  break e;
3656
3725
  }
3657
- if (q = 65535 & W, k < (D &= 15) && (b += m[a++] << k, (k += 8) < D && (b += m[a++] << k, k += 8)), d < (q += b & (1 << D) - 1)) {
3726
+ if (q = 65535 & U, k < (D &= 15) && (b += m[a++] << k, (k += 8) < D && (b += m[a++] << k, k += 8)), d < (q += b & (1 << D) - 1)) {
3658
3727
  r.msg = "invalid distance too far back", o.mode = 30;
3659
3728
  break e;
3660
3729
  }
@@ -3718,29 +3787,29 @@ function Ot() {
3718
3787
  var m, O;
3719
3788
  return E ? (O = new b(), (E.state = O).window = null, (m = C(E, B)) !== p && (E.state = null), m) : d;
3720
3789
  }
3721
- var z, W, D = !0;
3790
+ var z, U, D = !0;
3722
3791
  function H(E) {
3723
3792
  if (D) {
3724
3793
  var B;
3725
- for (z = new r.Buf32(512), W = new r.Buf32(32), B = 0; B < 144; ) E.lens[B++] = 8;
3794
+ for (z = new r.Buf32(512), U = new r.Buf32(32), B = 0; B < 144; ) E.lens[B++] = 8;
3726
3795
  for (; B < 256; ) E.lens[B++] = 9;
3727
3796
  for (; B < 280; ) E.lens[B++] = 7;
3728
3797
  for (; B < 288; ) E.lens[B++] = 8;
3729
3798
  for (l(c, E.lens, 0, 288, z, 0, E.work, { bits: 9 }), B = 0; B < 32; ) E.lens[B++] = 5;
3730
- l(f, E.lens, 0, 32, W, 0, E.work, { bits: 5 }), D = !1;
3799
+ l(f, E.lens, 0, 32, U, 0, E.work, { bits: 5 }), D = !1;
3731
3800
  }
3732
- E.lencode = z, E.lenbits = 9, E.distcode = W, E.distbits = 5;
3801
+ E.lencode = z, E.lenbits = 9, E.distcode = U, E.distbits = 5;
3733
3802
  }
3734
3803
  function q(E, B, m, O) {
3735
- var ee, U = E.state;
3736
- return U.window === null && (U.wsize = 1 << U.wbits, U.wnext = 0, U.whave = 0, U.window = new r.Buf8(U.wsize)), O >= U.wsize ? (r.arraySet(U.window, B, m - U.wsize, U.wsize, 0), U.wnext = 0, U.whave = U.wsize) : (O < (ee = U.wsize - U.wnext) && (ee = O), r.arraySet(U.window, B, m - O, ee, U.wnext), (O -= ee) ? (r.arraySet(U.window, B, m - O, O, 0), U.wnext = O, U.whave = U.wsize) : (U.wnext += ee, U.wnext === U.wsize && (U.wnext = 0), U.whave < U.wsize && (U.whave += ee))), 0;
3804
+ var ee, W = E.state;
3805
+ return W.window === null && (W.wsize = 1 << W.wbits, W.wnext = 0, W.whave = 0, W.window = new r.Buf8(W.wsize)), O >= W.wsize ? (r.arraySet(W.window, B, m - W.wsize, W.wsize, 0), W.wnext = 0, W.whave = W.wsize) : (O < (ee = W.wsize - W.wnext) && (ee = O), r.arraySet(W.window, B, m - O, ee, W.wnext), (O -= ee) ? (r.arraySet(W.window, B, m - O, O, 0), W.wnext = O, W.whave = W.wsize) : (W.wnext += ee, W.wnext === W.wsize && (W.wnext = 0), W.whave < W.wsize && (W.whave += ee))), 0;
3737
3806
  }
3738
3807
  n.inflateReset = S, n.inflateReset2 = C, n.inflateResetKeep = k, n.inflateInit = function(E) {
3739
3808
  return R(E, 15);
3740
3809
  }, n.inflateInit2 = R, n.inflate = function(E, B) {
3741
- var m, O, ee, U, te, F, J, I, L, Q, Y, Z, ae, ue, ie, re, de, le, ge, me, u, N, P, x, w = 0, T = new r.Buf8(4), V = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];
3810
+ var m, O, ee, W, te, F, J, P, L, Q, Y, Z, ae, ue, ie, re, de, le, ge, me, u, N, I, x, w = 0, T = new r.Buf8(4), V = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];
3742
3811
  if (!E || !E.state || !E.output || !E.input && E.avail_in !== 0) return d;
3743
- (m = E.state).mode === 12 && (m.mode = 13), te = E.next_out, ee = E.output, J = E.avail_out, U = E.next_in, O = E.input, F = E.avail_in, I = m.hold, L = m.bits, Q = F, Y = J, N = p;
3812
+ (m = E.state).mode === 12 && (m.mode = 13), te = E.next_out, ee = E.output, J = E.avail_out, W = E.next_in, O = E.input, F = E.avail_in, P = m.hold, L = m.bits, Q = F, Y = J, N = p;
3744
3813
  e: for (; ; ) switch (m.mode) {
3745
3814
  case y:
3746
3815
  if (m.wrap === 0) {
@@ -3749,33 +3818,33 @@ function Ot() {
3749
3818
  }
3750
3819
  for (; L < 16; ) {
3751
3820
  if (F === 0) break e;
3752
- F--, I += O[U++] << L, L += 8;
3821
+ F--, P += O[W++] << L, L += 8;
3753
3822
  }
3754
- if (2 & m.wrap && I === 35615) {
3755
- T[m.check = 0] = 255 & I, T[1] = I >>> 8 & 255, m.check = o(m.check, T, 2, 0), L = I = 0, m.mode = 2;
3823
+ if (2 & m.wrap && P === 35615) {
3824
+ T[m.check = 0] = 255 & P, T[1] = P >>> 8 & 255, m.check = o(m.check, T, 2, 0), L = P = 0, m.mode = 2;
3756
3825
  break;
3757
3826
  }
3758
- if (m.flags = 0, m.head && (m.head.done = !1), !(1 & m.wrap) || (((255 & I) << 8) + (I >> 8)) % 31) {
3827
+ if (m.flags = 0, m.head && (m.head.done = !1), !(1 & m.wrap) || (((255 & P) << 8) + (P >> 8)) % 31) {
3759
3828
  E.msg = "incorrect header check", m.mode = 30;
3760
3829
  break;
3761
3830
  }
3762
- if ((15 & I) != 8) {
3831
+ if ((15 & P) != 8) {
3763
3832
  E.msg = "unknown compression method", m.mode = 30;
3764
3833
  break;
3765
3834
  }
3766
- if (L -= 4, u = 8 + (15 & (I >>>= 4)), m.wbits === 0) m.wbits = u;
3835
+ if (L -= 4, u = 8 + (15 & (P >>>= 4)), m.wbits === 0) m.wbits = u;
3767
3836
  else if (u > m.wbits) {
3768
3837
  E.msg = "invalid window size", m.mode = 30;
3769
3838
  break;
3770
3839
  }
3771
- m.dmax = 1 << u, E.adler = m.check = 1, m.mode = 512 & I ? 10 : 12, L = I = 0;
3840
+ m.dmax = 1 << u, E.adler = m.check = 1, m.mode = 512 & P ? 10 : 12, L = P = 0;
3772
3841
  break;
3773
3842
  case 2:
3774
3843
  for (; L < 16; ) {
3775
3844
  if (F === 0) break e;
3776
- F--, I += O[U++] << L, L += 8;
3845
+ F--, P += O[W++] << L, L += 8;
3777
3846
  }
3778
- if (m.flags = I, (255 & m.flags) != 8) {
3847
+ if (m.flags = P, (255 & m.flags) != 8) {
3779
3848
  E.msg = "unknown compression method", m.mode = 30;
3780
3849
  break;
3781
3850
  }
@@ -3783,86 +3852,86 @@ function Ot() {
3783
3852
  E.msg = "unknown header flags set", m.mode = 30;
3784
3853
  break;
3785
3854
  }
3786
- m.head && (m.head.text = I >> 8 & 1), 512 & m.flags && (T[0] = 255 & I, T[1] = I >>> 8 & 255, m.check = o(m.check, T, 2, 0)), L = I = 0, m.mode = 3;
3855
+ m.head && (m.head.text = P >> 8 & 1), 512 & m.flags && (T[0] = 255 & P, T[1] = P >>> 8 & 255, m.check = o(m.check, T, 2, 0)), L = P = 0, m.mode = 3;
3787
3856
  case 3:
3788
3857
  for (; L < 32; ) {
3789
3858
  if (F === 0) break e;
3790
- F--, I += O[U++] << L, L += 8;
3859
+ F--, P += O[W++] << L, L += 8;
3791
3860
  }
3792
- m.head && (m.head.time = I), 512 & m.flags && (T[0] = 255 & I, T[1] = I >>> 8 & 255, T[2] = I >>> 16 & 255, T[3] = I >>> 24 & 255, m.check = o(m.check, T, 4, 0)), L = I = 0, m.mode = 4;
3861
+ m.head && (m.head.time = P), 512 & m.flags && (T[0] = 255 & P, T[1] = P >>> 8 & 255, T[2] = P >>> 16 & 255, T[3] = P >>> 24 & 255, m.check = o(m.check, T, 4, 0)), L = P = 0, m.mode = 4;
3793
3862
  case 4:
3794
3863
  for (; L < 16; ) {
3795
3864
  if (F === 0) break e;
3796
- F--, I += O[U++] << L, L += 8;
3865
+ F--, P += O[W++] << L, L += 8;
3797
3866
  }
3798
- m.head && (m.head.xflags = 255 & I, m.head.os = I >> 8), 512 & m.flags && (T[0] = 255 & I, T[1] = I >>> 8 & 255, m.check = o(m.check, T, 2, 0)), L = I = 0, m.mode = 5;
3867
+ m.head && (m.head.xflags = 255 & P, m.head.os = P >> 8), 512 & m.flags && (T[0] = 255 & P, T[1] = P >>> 8 & 255, m.check = o(m.check, T, 2, 0)), L = P = 0, m.mode = 5;
3799
3868
  case 5:
3800
3869
  if (1024 & m.flags) {
3801
3870
  for (; L < 16; ) {
3802
3871
  if (F === 0) break e;
3803
- F--, I += O[U++] << L, L += 8;
3872
+ F--, P += O[W++] << L, L += 8;
3804
3873
  }
3805
- m.length = I, m.head && (m.head.extra_len = I), 512 & m.flags && (T[0] = 255 & I, T[1] = I >>> 8 & 255, m.check = o(m.check, T, 2, 0)), L = I = 0;
3874
+ m.length = P, m.head && (m.head.extra_len = P), 512 & m.flags && (T[0] = 255 & P, T[1] = P >>> 8 & 255, m.check = o(m.check, T, 2, 0)), L = P = 0;
3806
3875
  } else m.head && (m.head.extra = null);
3807
3876
  m.mode = 6;
3808
3877
  case 6:
3809
- if (1024 & m.flags && (F < (Z = m.length) && (Z = F), Z && (m.head && (u = m.head.extra_len - m.length, m.head.extra || (m.head.extra = new Array(m.head.extra_len)), r.arraySet(m.head.extra, O, U, Z, u)), 512 & m.flags && (m.check = o(m.check, O, Z, U)), F -= Z, U += Z, m.length -= Z), m.length)) break e;
3878
+ if (1024 & m.flags && (F < (Z = m.length) && (Z = F), Z && (m.head && (u = m.head.extra_len - m.length, m.head.extra || (m.head.extra = new Array(m.head.extra_len)), r.arraySet(m.head.extra, O, W, Z, u)), 512 & m.flags && (m.check = o(m.check, O, Z, W)), F -= Z, W += Z, m.length -= Z), m.length)) break e;
3810
3879
  m.length = 0, m.mode = 7;
3811
3880
  case 7:
3812
3881
  if (2048 & m.flags) {
3813
3882
  if (F === 0) break e;
3814
- for (Z = 0; u = O[U + Z++], m.head && u && m.length < 65536 && (m.head.name += String.fromCharCode(u)), u && Z < F; ) ;
3815
- if (512 & m.flags && (m.check = o(m.check, O, Z, U)), F -= Z, U += Z, u) break e;
3883
+ for (Z = 0; u = O[W + Z++], m.head && u && m.length < 65536 && (m.head.name += String.fromCharCode(u)), u && Z < F; ) ;
3884
+ if (512 & m.flags && (m.check = o(m.check, O, Z, W)), F -= Z, W += Z, u) break e;
3816
3885
  } else m.head && (m.head.name = null);
3817
3886
  m.length = 0, m.mode = 8;
3818
3887
  case 8:
3819
3888
  if (4096 & m.flags) {
3820
3889
  if (F === 0) break e;
3821
- for (Z = 0; u = O[U + Z++], m.head && u && m.length < 65536 && (m.head.comment += String.fromCharCode(u)), u && Z < F; ) ;
3822
- if (512 & m.flags && (m.check = o(m.check, O, Z, U)), F -= Z, U += Z, u) break e;
3890
+ for (Z = 0; u = O[W + Z++], m.head && u && m.length < 65536 && (m.head.comment += String.fromCharCode(u)), u && Z < F; ) ;
3891
+ if (512 & m.flags && (m.check = o(m.check, O, Z, W)), F -= Z, W += Z, u) break e;
3823
3892
  } else m.head && (m.head.comment = null);
3824
3893
  m.mode = 9;
3825
3894
  case 9:
3826
3895
  if (512 & m.flags) {
3827
3896
  for (; L < 16; ) {
3828
3897
  if (F === 0) break e;
3829
- F--, I += O[U++] << L, L += 8;
3898
+ F--, P += O[W++] << L, L += 8;
3830
3899
  }
3831
- if (I !== (65535 & m.check)) {
3900
+ if (P !== (65535 & m.check)) {
3832
3901
  E.msg = "header crc mismatch", m.mode = 30;
3833
3902
  break;
3834
3903
  }
3835
- L = I = 0;
3904
+ L = P = 0;
3836
3905
  }
3837
3906
  m.head && (m.head.hcrc = m.flags >> 9 & 1, m.head.done = !0), E.adler = m.check = 0, m.mode = 12;
3838
3907
  break;
3839
3908
  case 10:
3840
3909
  for (; L < 32; ) {
3841
3910
  if (F === 0) break e;
3842
- F--, I += O[U++] << L, L += 8;
3911
+ F--, P += O[W++] << L, L += 8;
3843
3912
  }
3844
- E.adler = m.check = v(I), L = I = 0, m.mode = 11;
3913
+ E.adler = m.check = v(P), L = P = 0, m.mode = 11;
3845
3914
  case 11:
3846
- if (m.havedict === 0) return E.next_out = te, E.avail_out = J, E.next_in = U, E.avail_in = F, m.hold = I, m.bits = L, 2;
3915
+ if (m.havedict === 0) return E.next_out = te, E.avail_out = J, E.next_in = W, E.avail_in = F, m.hold = P, m.bits = L, 2;
3847
3916
  E.adler = m.check = 1, m.mode = 12;
3848
3917
  case 12:
3849
3918
  if (B === 5 || B === 6) break e;
3850
3919
  case 13:
3851
3920
  if (m.last) {
3852
- I >>>= 7 & L, L -= 7 & L, m.mode = 27;
3921
+ P >>>= 7 & L, L -= 7 & L, m.mode = 27;
3853
3922
  break;
3854
3923
  }
3855
3924
  for (; L < 3; ) {
3856
3925
  if (F === 0) break e;
3857
- F--, I += O[U++] << L, L += 8;
3926
+ F--, P += O[W++] << L, L += 8;
3858
3927
  }
3859
- switch (m.last = 1 & I, L -= 1, 3 & (I >>>= 1)) {
3928
+ switch (m.last = 1 & P, L -= 1, 3 & (P >>>= 1)) {
3860
3929
  case 0:
3861
3930
  m.mode = 14;
3862
3931
  break;
3863
3932
  case 1:
3864
3933
  if (H(m), m.mode = 20, B !== 6) break;
3865
- I >>>= 2, L -= 2;
3934
+ P >>>= 2, L -= 2;
3866
3935
  break e;
3867
3936
  case 2:
3868
3937
  m.mode = 17;
@@ -3870,24 +3939,24 @@ function Ot() {
3870
3939
  case 3:
3871
3940
  E.msg = "invalid block type", m.mode = 30;
3872
3941
  }
3873
- I >>>= 2, L -= 2;
3942
+ P >>>= 2, L -= 2;
3874
3943
  break;
3875
3944
  case 14:
3876
- for (I >>>= 7 & L, L -= 7 & L; L < 32; ) {
3945
+ for (P >>>= 7 & L, L -= 7 & L; L < 32; ) {
3877
3946
  if (F === 0) break e;
3878
- F--, I += O[U++] << L, L += 8;
3947
+ F--, P += O[W++] << L, L += 8;
3879
3948
  }
3880
- if ((65535 & I) != (I >>> 16 ^ 65535)) {
3949
+ if ((65535 & P) != (P >>> 16 ^ 65535)) {
3881
3950
  E.msg = "invalid stored block lengths", m.mode = 30;
3882
3951
  break;
3883
3952
  }
3884
- if (m.length = 65535 & I, L = I = 0, m.mode = 15, B === 6) break e;
3953
+ if (m.length = 65535 & P, L = P = 0, m.mode = 15, B === 6) break e;
3885
3954
  case 15:
3886
3955
  m.mode = 16;
3887
3956
  case 16:
3888
3957
  if (Z = m.length) {
3889
3958
  if (F < Z && (Z = F), J < Z && (Z = J), Z === 0) break e;
3890
- r.arraySet(ee, O, U, Z, te), F -= Z, U += Z, J -= Z, te += Z, m.length -= Z;
3959
+ r.arraySet(ee, O, W, Z, te), F -= Z, W += Z, J -= Z, te += Z, m.length -= Z;
3891
3960
  break;
3892
3961
  }
3893
3962
  m.mode = 12;
@@ -3895,9 +3964,9 @@ function Ot() {
3895
3964
  case 17:
3896
3965
  for (; L < 14; ) {
3897
3966
  if (F === 0) break e;
3898
- F--, I += O[U++] << L, L += 8;
3967
+ F--, P += O[W++] << L, L += 8;
3899
3968
  }
3900
- if (m.nlen = 257 + (31 & I), I >>>= 5, L -= 5, m.ndist = 1 + (31 & I), I >>>= 5, L -= 5, m.ncode = 4 + (15 & I), I >>>= 4, L -= 4, 286 < m.nlen || 30 < m.ndist) {
3969
+ if (m.nlen = 257 + (31 & P), P >>>= 5, L -= 5, m.ndist = 1 + (31 & P), P >>>= 5, L -= 5, m.ncode = 4 + (15 & P), P >>>= 4, L -= 4, 286 < m.nlen || 30 < m.ndist) {
3901
3970
  E.msg = "too many length or distance symbols", m.mode = 30;
3902
3971
  break;
3903
3972
  }
@@ -3906,46 +3975,46 @@ function Ot() {
3906
3975
  for (; m.have < m.ncode; ) {
3907
3976
  for (; L < 3; ) {
3908
3977
  if (F === 0) break e;
3909
- F--, I += O[U++] << L, L += 8;
3978
+ F--, P += O[W++] << L, L += 8;
3910
3979
  }
3911
- m.lens[V[m.have++]] = 7 & I, I >>>= 3, L -= 3;
3980
+ m.lens[V[m.have++]] = 7 & P, P >>>= 3, L -= 3;
3912
3981
  }
3913
3982
  for (; m.have < 19; ) m.lens[V[m.have++]] = 0;
3914
- if (m.lencode = m.lendyn, m.lenbits = 7, P = { bits: m.lenbits }, N = l(0, m.lens, 0, 19, m.lencode, 0, m.work, P), m.lenbits = P.bits, N) {
3983
+ if (m.lencode = m.lendyn, m.lenbits = 7, I = { bits: m.lenbits }, N = l(0, m.lens, 0, 19, m.lencode, 0, m.work, I), m.lenbits = I.bits, N) {
3915
3984
  E.msg = "invalid code lengths set", m.mode = 30;
3916
3985
  break;
3917
3986
  }
3918
3987
  m.have = 0, m.mode = 19;
3919
3988
  case 19:
3920
3989
  for (; m.have < m.nlen + m.ndist; ) {
3921
- for (; re = (w = m.lencode[I & (1 << m.lenbits) - 1]) >>> 16 & 255, de = 65535 & w, !((ie = w >>> 24) <= L); ) {
3990
+ for (; re = (w = m.lencode[P & (1 << m.lenbits) - 1]) >>> 16 & 255, de = 65535 & w, !((ie = w >>> 24) <= L); ) {
3922
3991
  if (F === 0) break e;
3923
- F--, I += O[U++] << L, L += 8;
3992
+ F--, P += O[W++] << L, L += 8;
3924
3993
  }
3925
- if (de < 16) I >>>= ie, L -= ie, m.lens[m.have++] = de;
3994
+ if (de < 16) P >>>= ie, L -= ie, m.lens[m.have++] = de;
3926
3995
  else {
3927
3996
  if (de === 16) {
3928
3997
  for (x = ie + 2; L < x; ) {
3929
3998
  if (F === 0) break e;
3930
- F--, I += O[U++] << L, L += 8;
3999
+ F--, P += O[W++] << L, L += 8;
3931
4000
  }
3932
- if (I >>>= ie, L -= ie, m.have === 0) {
4001
+ if (P >>>= ie, L -= ie, m.have === 0) {
3933
4002
  E.msg = "invalid bit length repeat", m.mode = 30;
3934
4003
  break;
3935
4004
  }
3936
- u = m.lens[m.have - 1], Z = 3 + (3 & I), I >>>= 2, L -= 2;
4005
+ u = m.lens[m.have - 1], Z = 3 + (3 & P), P >>>= 2, L -= 2;
3937
4006
  } else if (de === 17) {
3938
4007
  for (x = ie + 3; L < x; ) {
3939
4008
  if (F === 0) break e;
3940
- F--, I += O[U++] << L, L += 8;
4009
+ F--, P += O[W++] << L, L += 8;
3941
4010
  }
3942
- L -= ie, u = 0, Z = 3 + (7 & (I >>>= ie)), I >>>= 3, L -= 3;
4011
+ L -= ie, u = 0, Z = 3 + (7 & (P >>>= ie)), P >>>= 3, L -= 3;
3943
4012
  } else {
3944
4013
  for (x = ie + 7; L < x; ) {
3945
4014
  if (F === 0) break e;
3946
- F--, I += O[U++] << L, L += 8;
4015
+ F--, P += O[W++] << L, L += 8;
3947
4016
  }
3948
- L -= ie, u = 0, Z = 11 + (127 & (I >>>= ie)), I >>>= 7, L -= 7;
4017
+ L -= ie, u = 0, Z = 11 + (127 & (P >>>= ie)), P >>>= 7, L -= 7;
3949
4018
  }
3950
4019
  if (m.have + Z > m.nlen + m.ndist) {
3951
4020
  E.msg = "invalid bit length repeat", m.mode = 30;
@@ -3959,11 +4028,11 @@ function Ot() {
3959
4028
  E.msg = "invalid code -- missing end-of-block", m.mode = 30;
3960
4029
  break;
3961
4030
  }
3962
- if (m.lenbits = 9, P = { bits: m.lenbits }, N = l(c, m.lens, 0, m.nlen, m.lencode, 0, m.work, P), m.lenbits = P.bits, N) {
4031
+ if (m.lenbits = 9, I = { bits: m.lenbits }, N = l(c, m.lens, 0, m.nlen, m.lencode, 0, m.work, I), m.lenbits = I.bits, N) {
3963
4032
  E.msg = "invalid literal/lengths set", m.mode = 30;
3964
4033
  break;
3965
4034
  }
3966
- if (m.distbits = 6, m.distcode = m.distdyn, P = { bits: m.distbits }, N = l(f, m.lens, m.nlen, m.ndist, m.distcode, 0, m.work, P), m.distbits = P.bits, N) {
4035
+ if (m.distbits = 6, m.distcode = m.distdyn, I = { bits: m.distbits }, N = l(f, m.lens, m.nlen, m.ndist, m.distcode, 0, m.work, I), m.distbits = I.bits, N) {
3967
4036
  E.msg = "invalid distances set", m.mode = 30;
3968
4037
  break;
3969
4038
  }
@@ -3972,21 +4041,21 @@ function Ot() {
3972
4041
  m.mode = 21;
3973
4042
  case 21:
3974
4043
  if (6 <= F && 258 <= J) {
3975
- E.next_out = te, E.avail_out = J, E.next_in = U, E.avail_in = F, m.hold = I, m.bits = L, a(E, Y), te = E.next_out, ee = E.output, J = E.avail_out, U = E.next_in, O = E.input, F = E.avail_in, I = m.hold, L = m.bits, m.mode === 12 && (m.back = -1);
4044
+ E.next_out = te, E.avail_out = J, E.next_in = W, E.avail_in = F, m.hold = P, m.bits = L, a(E, Y), te = E.next_out, ee = E.output, J = E.avail_out, W = E.next_in, O = E.input, F = E.avail_in, P = m.hold, L = m.bits, m.mode === 12 && (m.back = -1);
3976
4045
  break;
3977
4046
  }
3978
- for (m.back = 0; re = (w = m.lencode[I & (1 << m.lenbits) - 1]) >>> 16 & 255, de = 65535 & w, !((ie = w >>> 24) <= L); ) {
4047
+ for (m.back = 0; re = (w = m.lencode[P & (1 << m.lenbits) - 1]) >>> 16 & 255, de = 65535 & w, !((ie = w >>> 24) <= L); ) {
3979
4048
  if (F === 0) break e;
3980
- F--, I += O[U++] << L, L += 8;
4049
+ F--, P += O[W++] << L, L += 8;
3981
4050
  }
3982
4051
  if (re && (240 & re) == 0) {
3983
- for (le = ie, ge = re, me = de; re = (w = m.lencode[me + ((I & (1 << le + ge) - 1) >> le)]) >>> 16 & 255, de = 65535 & w, !(le + (ie = w >>> 24) <= L); ) {
4052
+ for (le = ie, ge = re, me = de; re = (w = m.lencode[me + ((P & (1 << le + ge) - 1) >> le)]) >>> 16 & 255, de = 65535 & w, !(le + (ie = w >>> 24) <= L); ) {
3984
4053
  if (F === 0) break e;
3985
- F--, I += O[U++] << L, L += 8;
4054
+ F--, P += O[W++] << L, L += 8;
3986
4055
  }
3987
- I >>>= le, L -= le, m.back += le;
4056
+ P >>>= le, L -= le, m.back += le;
3988
4057
  }
3989
- if (I >>>= ie, L -= ie, m.back += ie, m.length = de, re === 0) {
4058
+ if (P >>>= ie, L -= ie, m.back += ie, m.length = de, re === 0) {
3990
4059
  m.mode = 26;
3991
4060
  break;
3992
4061
  }
@@ -4003,24 +4072,24 @@ function Ot() {
4003
4072
  if (m.extra) {
4004
4073
  for (x = m.extra; L < x; ) {
4005
4074
  if (F === 0) break e;
4006
- F--, I += O[U++] << L, L += 8;
4075
+ F--, P += O[W++] << L, L += 8;
4007
4076
  }
4008
- m.length += I & (1 << m.extra) - 1, I >>>= m.extra, L -= m.extra, m.back += m.extra;
4077
+ m.length += P & (1 << m.extra) - 1, P >>>= m.extra, L -= m.extra, m.back += m.extra;
4009
4078
  }
4010
4079
  m.was = m.length, m.mode = 23;
4011
4080
  case 23:
4012
- for (; re = (w = m.distcode[I & (1 << m.distbits) - 1]) >>> 16 & 255, de = 65535 & w, !((ie = w >>> 24) <= L); ) {
4081
+ for (; re = (w = m.distcode[P & (1 << m.distbits) - 1]) >>> 16 & 255, de = 65535 & w, !((ie = w >>> 24) <= L); ) {
4013
4082
  if (F === 0) break e;
4014
- F--, I += O[U++] << L, L += 8;
4083
+ F--, P += O[W++] << L, L += 8;
4015
4084
  }
4016
4085
  if ((240 & re) == 0) {
4017
- for (le = ie, ge = re, me = de; re = (w = m.distcode[me + ((I & (1 << le + ge) - 1) >> le)]) >>> 16 & 255, de = 65535 & w, !(le + (ie = w >>> 24) <= L); ) {
4086
+ for (le = ie, ge = re, me = de; re = (w = m.distcode[me + ((P & (1 << le + ge) - 1) >> le)]) >>> 16 & 255, de = 65535 & w, !(le + (ie = w >>> 24) <= L); ) {
4018
4087
  if (F === 0) break e;
4019
- F--, I += O[U++] << L, L += 8;
4088
+ F--, P += O[W++] << L, L += 8;
4020
4089
  }
4021
- I >>>= le, L -= le, m.back += le;
4090
+ P >>>= le, L -= le, m.back += le;
4022
4091
  }
4023
- if (I >>>= ie, L -= ie, m.back += ie, 64 & re) {
4092
+ if (P >>>= ie, L -= ie, m.back += ie, 64 & re) {
4024
4093
  E.msg = "invalid distance code", m.mode = 30;
4025
4094
  break;
4026
4095
  }
@@ -4029,9 +4098,9 @@ function Ot() {
4029
4098
  if (m.extra) {
4030
4099
  for (x = m.extra; L < x; ) {
4031
4100
  if (F === 0) break e;
4032
- F--, I += O[U++] << L, L += 8;
4101
+ F--, P += O[W++] << L, L += 8;
4033
4102
  }
4034
- m.offset += I & (1 << m.extra) - 1, I >>>= m.extra, L -= m.extra, m.back += m.extra;
4103
+ m.offset += P & (1 << m.extra) - 1, P >>>= m.extra, L -= m.extra, m.back += m.extra;
4035
4104
  }
4036
4105
  if (m.offset > m.dmax) {
4037
4106
  E.msg = "invalid distance too far back", m.mode = 30;
@@ -4058,26 +4127,26 @@ function Ot() {
4058
4127
  if (m.wrap) {
4059
4128
  for (; L < 32; ) {
4060
4129
  if (F === 0) break e;
4061
- F--, I |= O[U++] << L, L += 8;
4130
+ F--, P |= O[W++] << L, L += 8;
4062
4131
  }
4063
- if (Y -= J, E.total_out += Y, m.total += Y, Y && (E.adler = m.check = m.flags ? o(m.check, ee, Y, te - Y) : s(m.check, ee, Y, te - Y)), Y = J, (m.flags ? I : v(I)) !== m.check) {
4132
+ if (Y -= J, E.total_out += Y, m.total += Y, Y && (E.adler = m.check = m.flags ? o(m.check, ee, Y, te - Y) : s(m.check, ee, Y, te - Y)), Y = J, (m.flags ? P : v(P)) !== m.check) {
4064
4133
  E.msg = "incorrect data check", m.mode = 30;
4065
4134
  break;
4066
4135
  }
4067
- L = I = 0;
4136
+ L = P = 0;
4068
4137
  }
4069
4138
  m.mode = 28;
4070
4139
  case 28:
4071
4140
  if (m.wrap && m.flags) {
4072
4141
  for (; L < 32; ) {
4073
4142
  if (F === 0) break e;
4074
- F--, I += O[U++] << L, L += 8;
4143
+ F--, P += O[W++] << L, L += 8;
4075
4144
  }
4076
- if (I !== (4294967295 & m.total)) {
4145
+ if (P !== (4294967295 & m.total)) {
4077
4146
  E.msg = "incorrect length check", m.mode = 30;
4078
4147
  break;
4079
4148
  }
4080
- L = I = 0;
4149
+ L = P = 0;
4081
4150
  }
4082
4151
  m.mode = 29;
4083
4152
  case 29:
@@ -4092,7 +4161,7 @@ function Ot() {
4092
4161
  default:
4093
4162
  return d;
4094
4163
  }
4095
- return E.next_out = te, E.avail_out = J, E.next_in = U, E.avail_in = F, m.hold = I, m.bits = L, (m.wsize || Y !== E.avail_out && m.mode < 30 && (m.mode < 27 || B !== 4)) && q(E, E.output, E.next_out, Y - E.avail_out) ? (m.mode = 31, -4) : (Q -= E.avail_in, Y -= E.avail_out, E.total_in += Q, E.total_out += Y, m.total += Y, m.wrap && Y && (E.adler = m.check = m.flags ? o(m.check, ee, Y, E.next_out - Y) : s(m.check, ee, Y, E.next_out - Y)), E.data_type = m.bits + (m.last ? 64 : 0) + (m.mode === 12 ? 128 : 0) + (m.mode === 20 || m.mode === 15 ? 256 : 0), (Q == 0 && Y === 0 || B === 4) && N === p && (N = -5), N);
4164
+ return E.next_out = te, E.avail_out = J, E.next_in = W, E.avail_in = F, m.hold = P, m.bits = L, (m.wsize || Y !== E.avail_out && m.mode < 30 && (m.mode < 27 || B !== 4)) && q(E, E.output, E.next_out, Y - E.avail_out) ? (m.mode = 31, -4) : (Q -= E.avail_in, Y -= E.avail_out, E.total_in += Q, E.total_out += Y, m.total += Y, m.wrap && Y && (E.adler = m.check = m.flags ? o(m.check, ee, Y, E.next_out - Y) : s(m.check, ee, Y, E.next_out - Y)), E.data_type = m.bits + (m.last ? 64 : 0) + (m.mode === 12 ? 128 : 0) + (m.mode === 20 || m.mode === 15 ? 256 : 0), (Q == 0 && Y === 0 || B === 4) && N === p && (N = -5), N);
4096
4165
  }, n.inflateEnd = function(E) {
4097
4166
  if (!E || !E.state) return d;
4098
4167
  var B = E.state;
@@ -4107,7 +4176,7 @@ function Ot() {
4107
4176
  }, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./inffast": 48, "./inftrees": 50 }], 50: [function(t, i, n) {
4108
4177
  var r = t("../utils/common"), s = [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0], o = [16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78], a = [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 0, 0], l = [16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 64, 64];
4109
4178
  i.exports = function(c, f, p, d, y, h, g, v) {
4110
- var b, k, S, C, R, z, W, D, H, q = v.bits, E = 0, B = 0, m = 0, O = 0, ee = 0, U = 0, te = 0, F = 0, J = 0, I = 0, L = null, Q = 0, Y = new r.Buf16(16), Z = new r.Buf16(16), ae = null, ue = 0;
4179
+ var b, k, S, C, R, z, U, D, H, q = v.bits, E = 0, B = 0, m = 0, O = 0, ee = 0, W = 0, te = 0, F = 0, J = 0, P = 0, L = null, Q = 0, Y = new r.Buf16(16), Z = new r.Buf16(16), ae = null, ue = 0;
4111
4180
  for (E = 0; E <= 15; E++) Y[E] = 0;
4112
4181
  for (B = 0; B < d; B++) Y[f[p + B]]++;
4113
4182
  for (ee = q, O = 15; 1 <= O && Y[O] === 0; O--) ;
@@ -4117,21 +4186,21 @@ function Ot() {
4117
4186
  if (0 < F && (c === 0 || O !== 1)) return -1;
4118
4187
  for (Z[1] = 0, E = 1; E < 15; E++) Z[E + 1] = Z[E] + Y[E];
4119
4188
  for (B = 0; B < d; B++) f[p + B] !== 0 && (g[Z[f[p + B]]++] = B);
4120
- if (z = c === 0 ? (L = ae = g, 19) : c === 1 ? (L = s, Q -= 257, ae = o, ue -= 257, 256) : (L = a, ae = l, -1), E = m, R = h, te = B = I = 0, S = -1, C = (J = 1 << (U = ee)) - 1, c === 1 && 852 < J || c === 2 && 592 < J) return 1;
4189
+ if (z = c === 0 ? (L = ae = g, 19) : c === 1 ? (L = s, Q -= 257, ae = o, ue -= 257, 256) : (L = a, ae = l, -1), E = m, R = h, te = B = P = 0, S = -1, C = (J = 1 << (W = ee)) - 1, c === 1 && 852 < J || c === 2 && 592 < J) return 1;
4121
4190
  for (; ; ) {
4122
- for (W = E - te, H = g[B] < z ? (D = 0, g[B]) : g[B] > z ? (D = ae[ue + g[B]], L[Q + g[B]]) : (D = 96, 0), b = 1 << E - te, m = k = 1 << U; y[R + (I >> te) + (k -= b)] = W << 24 | D << 16 | H | 0, k !== 0; ) ;
4123
- for (b = 1 << E - 1; I & b; ) b >>= 1;
4124
- if (b !== 0 ? (I &= b - 1, I += b) : I = 0, B++, --Y[E] == 0) {
4191
+ for (U = E - te, H = g[B] < z ? (D = 0, g[B]) : g[B] > z ? (D = ae[ue + g[B]], L[Q + g[B]]) : (D = 96, 0), b = 1 << E - te, m = k = 1 << W; y[R + (P >> te) + (k -= b)] = U << 24 | D << 16 | H | 0, k !== 0; ) ;
4192
+ for (b = 1 << E - 1; P & b; ) b >>= 1;
4193
+ if (b !== 0 ? (P &= b - 1, P += b) : P = 0, B++, --Y[E] == 0) {
4125
4194
  if (E === O) break;
4126
4195
  E = f[p + g[B]];
4127
4196
  }
4128
- if (ee < E && (I & C) !== S) {
4129
- for (te === 0 && (te = ee), R += m, F = 1 << (U = E - te); U + te < O && !((F -= Y[U + te]) <= 0); ) U++, F <<= 1;
4130
- if (J += 1 << U, c === 1 && 852 < J || c === 2 && 592 < J) return 1;
4131
- y[S = I & C] = ee << 24 | U << 16 | R - h | 0;
4197
+ if (ee < E && (P & C) !== S) {
4198
+ for (te === 0 && (te = ee), R += m, F = 1 << (W = E - te); W + te < O && !((F -= Y[W + te]) <= 0); ) W++, F <<= 1;
4199
+ if (J += 1 << W, c === 1 && 852 < J || c === 2 && 592 < J) return 1;
4200
+ y[S = P & C] = ee << 24 | W << 16 | R - h | 0;
4132
4201
  }
4133
4202
  }
4134
- return I !== 0 && (y[R + I] = E - te << 24 | 64 << 16 | 0), v.bits = ee, 0;
4203
+ return P !== 0 && (y[R + P] = E - te << 24 | 64 << 16 | 0), v.bits = ee, 0;
4135
4204
  };
4136
4205
  }, { "../utils/common": 41 }], 51: [function(t, i, n) {
4137
4206
  i.exports = { 2: "need dictionary", 1: "stream end", 0: "", "-1": "file error", "-2": "stream error", "-3": "data error", "-4": "insufficient memory", "-5": "buffer error", "-6": "incompatible version" };
@@ -4140,7 +4209,7 @@ function Ot() {
4140
4209
  function a(w) {
4141
4210
  for (var T = w.length; 0 <= --T; ) w[T] = 0;
4142
4211
  }
4143
- var l = 0, c = 29, f = 256, p = f + 1 + c, d = 30, y = 19, h = 2 * p + 1, g = 15, v = 16, b = 7, k = 256, S = 16, C = 17, R = 18, z = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0], W = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13], D = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7], H = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], q = new Array(2 * (p + 2));
4212
+ var l = 0, c = 29, f = 256, p = f + 1 + c, d = 30, y = 19, h = 2 * p + 1, g = 15, v = 16, b = 7, k = 256, S = 16, C = 17, R = 18, z = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0], U = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13], D = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7], H = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], q = new Array(2 * (p + 2));
4144
4213
  a(q);
4145
4214
  var E = new Array(2 * d);
4146
4215
  a(E);
@@ -4150,11 +4219,11 @@ function Ot() {
4150
4219
  a(m);
4151
4220
  var O = new Array(c);
4152
4221
  a(O);
4153
- var ee, U, te, F = new Array(d);
4222
+ var ee, W, te, F = new Array(d);
4154
4223
  function J(w, T, V, j, A) {
4155
4224
  this.static_tree = w, this.extra_bits = T, this.extra_base = V, this.elems = j, this.max_length = A, this.has_stree = w && w.length;
4156
4225
  }
4157
- function I(w, T) {
4226
+ function P(w, T) {
4158
4227
  this.dyn_tree = w, this.max_code = 0, this.stat_desc = T;
4159
4228
  }
4160
4229
  function L(w) {
@@ -4201,7 +4270,7 @@ function Ot() {
4201
4270
  }
4202
4271
  function ge(w, T, V) {
4203
4272
  var j, A, G, X, $ = 0;
4204
- if (w.last_lit !== 0) for (; j = w.pending_buf[w.d_buf + 2 * $] << 8 | w.pending_buf[w.d_buf + 2 * $ + 1], A = w.pending_buf[w.l_buf + $], $++, j === 0 ? Z(w, A, T) : (Z(w, (G = m[A]) + f + 1, T), (X = z[G]) !== 0 && Y(w, A -= O[G], X), Z(w, G = L(--j), V), (X = W[G]) !== 0 && Y(w, j -= F[G], X)), $ < w.last_lit; ) ;
4273
+ if (w.last_lit !== 0) for (; j = w.pending_buf[w.d_buf + 2 * $] << 8 | w.pending_buf[w.d_buf + 2 * $ + 1], A = w.pending_buf[w.l_buf + $], $++, j === 0 ? Z(w, A, T) : (Z(w, (G = m[A]) + f + 1, T), (X = z[G]) !== 0 && Y(w, A -= O[G], X), Z(w, G = L(--j), V), (X = U[G]) !== 0 && Y(w, j -= F[G], X)), $ < w.last_lit; ) ;
4205
4274
  Z(w, k, T);
4206
4275
  }
4207
4276
  function me(w, T) {
@@ -4211,15 +4280,15 @@ function Ot() {
4211
4280
  for (T.max_code = se, V = w.heap_len >> 1; 1 <= V; V--) le(w, G, V);
4212
4281
  for (A = K; V = w.heap[1], w.heap[1] = w.heap[w.heap_len--], le(w, G, 1), j = w.heap[1], w.heap[--w.heap_max] = V, w.heap[--w.heap_max] = j, G[2 * A] = G[2 * V] + G[2 * j], w.depth[A] = (w.depth[V] >= w.depth[j] ? w.depth[V] : w.depth[j]) + 1, G[2 * V + 1] = G[2 * j + 1] = A, w.heap[1] = A++, le(w, G, 1), 2 <= w.heap_len; ) ;
4213
4282
  w.heap[--w.heap_max] = w.heap[1], (function(ne, pe) {
4214
- var ke, ye, Me, he, Se, De, ve = pe.dyn_tree, We = pe.max_code, lt = pe.stat_desc.static_tree, ht = pe.stat_desc.has_stree, ct = pe.stat_desc.extra_bits, Ue = pe.stat_desc.extra_base, _e = pe.stat_desc.max_length, Te = 0;
4283
+ var ke, ye, Me, he, Ce, De, ve = pe.dyn_tree, Ue = pe.max_code, at = pe.stat_desc.static_tree, lt = pe.stat_desc.has_stree, ht = pe.stat_desc.extra_bits, We = pe.stat_desc.extra_base, _e = pe.stat_desc.max_length, Se = 0;
4215
4284
  for (he = 0; he <= g; he++) ne.bl_count[he] = 0;
4216
- for (ve[2 * ne.heap[ne.heap_max] + 1] = 0, ke = ne.heap_max + 1; ke < h; ke++) _e < (he = ve[2 * ve[2 * (ye = ne.heap[ke]) + 1] + 1] + 1) && (he = _e, Te++), ve[2 * ye + 1] = he, We < ye || (ne.bl_count[he]++, Se = 0, Ue <= ye && (Se = ct[ye - Ue]), De = ve[2 * ye], ne.opt_len += De * (he + Se), ht && (ne.static_len += De * (lt[2 * ye + 1] + Se)));
4217
- if (Te !== 0) {
4285
+ for (ve[2 * ne.heap[ne.heap_max] + 1] = 0, ke = ne.heap_max + 1; ke < h; ke++) _e < (he = ve[2 * ve[2 * (ye = ne.heap[ke]) + 1] + 1] + 1) && (he = _e, Se++), ve[2 * ye + 1] = he, Ue < ye || (ne.bl_count[he]++, Ce = 0, We <= ye && (Ce = ht[ye - We]), De = ve[2 * ye], ne.opt_len += De * (he + Ce), lt && (ne.static_len += De * (at[2 * ye + 1] + Ce)));
4286
+ if (Se !== 0) {
4218
4287
  do {
4219
4288
  for (he = _e - 1; ne.bl_count[he] === 0; ) he--;
4220
- ne.bl_count[he]--, ne.bl_count[he + 1] += 2, ne.bl_count[_e]--, Te -= 2;
4221
- } while (0 < Te);
4222
- for (he = _e; he !== 0; he--) for (ye = ne.bl_count[he]; ye !== 0; ) We < (Me = ne.heap[--ke]) || (ve[2 * Me + 1] !== he && (ne.opt_len += (he - ve[2 * Me + 1]) * ve[2 * Me], ve[2 * Me + 1] = he), ye--);
4289
+ ne.bl_count[he]--, ne.bl_count[he + 1] += 2, ne.bl_count[_e]--, Se -= 2;
4290
+ } while (0 < Se);
4291
+ for (he = _e; he !== 0; he--) for (ye = ne.bl_count[he]; ye !== 0; ) Ue < (Me = ne.heap[--ke]) || (ve[2 * Me + 1] !== he && (ne.opt_len += (he - ve[2 * Me + 1]) * ve[2 * Me], ve[2 * Me + 1] = he), ye--);
4223
4292
  }
4224
4293
  })(w, T), ue(G, se, w.bl_count);
4225
4294
  }
@@ -4236,26 +4305,26 @@ function Ot() {
4236
4305
  }
4237
4306
  }
4238
4307
  a(F);
4239
- var P = !1;
4308
+ var I = !1;
4240
4309
  function x(w, T, V, j) {
4241
4310
  Y(w, (l << 1) + (j ? 1 : 0), 3), (function(A, G, X, $) {
4242
4311
  re(A), Q(A, X), Q(A, ~X), r.arraySet(A.pending_buf, A.window, G, X, A.pending), A.pending += X;
4243
4312
  })(w, T, V);
4244
4313
  }
4245
4314
  n._tr_init = function(w) {
4246
- P || ((function() {
4315
+ I || ((function() {
4247
4316
  var T, V, j, A, G, X = new Array(g + 1);
4248
4317
  for (A = j = 0; A < c - 1; A++) for (O[A] = j, T = 0; T < 1 << z[A]; T++) m[j++] = A;
4249
- for (m[j - 1] = A, A = G = 0; A < 16; A++) for (F[A] = G, T = 0; T < 1 << W[A]; T++) B[G++] = A;
4250
- for (G >>= 7; A < d; A++) for (F[A] = G << 7, T = 0; T < 1 << W[A] - 7; T++) B[256 + G++] = A;
4318
+ for (m[j - 1] = A, A = G = 0; A < 16; A++) for (F[A] = G, T = 0; T < 1 << U[A]; T++) B[G++] = A;
4319
+ for (G >>= 7; A < d; A++) for (F[A] = G << 7, T = 0; T < 1 << U[A] - 7; T++) B[256 + G++] = A;
4251
4320
  for (V = 0; V <= g; V++) X[V] = 0;
4252
4321
  for (T = 0; T <= 143; ) q[2 * T + 1] = 8, T++, X[8]++;
4253
4322
  for (; T <= 255; ) q[2 * T + 1] = 9, T++, X[9]++;
4254
4323
  for (; T <= 279; ) q[2 * T + 1] = 7, T++, X[7]++;
4255
4324
  for (; T <= 287; ) q[2 * T + 1] = 8, T++, X[8]++;
4256
4325
  for (ue(q, p + 1, X), T = 0; T < d; T++) E[2 * T + 1] = 5, E[2 * T] = ae(T, 5);
4257
- ee = new J(q, z, f + 1, p, g), U = new J(E, W, 0, d, g), te = new J(new Array(0), D, 0, y, b);
4258
- })(), P = !0), w.l_desc = new I(w.dyn_ltree, ee), w.d_desc = new I(w.dyn_dtree, U), w.bl_desc = new I(w.bl_tree, te), w.bi_buf = 0, w.bi_valid = 0, ie(w);
4326
+ ee = new J(q, z, f + 1, p, g), W = new J(E, U, 0, d, g), te = new J(new Array(0), D, 0, y, b);
4327
+ })(), I = !0), w.l_desc = new P(w.dyn_ltree, ee), w.d_desc = new P(w.dyn_dtree, W), w.bl_desc = new P(w.bl_tree, te), w.bi_buf = 0, w.bi_valid = 0, ie(w);
4259
4328
  }, n._tr_stored_block = x, n._tr_flush_block = function(w, T, V, j) {
4260
4329
  var A, G, X = 0;
4261
4330
  0 < w.level ? (w.strm.data_type === 2 && (w.strm.data_type = (function($) {
@@ -4331,22 +4400,22 @@ function Ot() {
4331
4400
  y = !0;
4332
4401
  try {
4333
4402
  (function(R) {
4334
- var z = R.callback, W = R.args;
4335
- switch (W.length) {
4403
+ var z = R.callback, U = R.args;
4404
+ switch (U.length) {
4336
4405
  case 0:
4337
4406
  z();
4338
4407
  break;
4339
4408
  case 1:
4340
- z(W[0]);
4409
+ z(U[0]);
4341
4410
  break;
4342
4411
  case 2:
4343
- z(W[0], W[1]);
4412
+ z(U[0], U[1]);
4344
4413
  break;
4345
4414
  case 3:
4346
- z(W[0], W[1], W[2]);
4415
+ z(U[0], U[1], U[2]);
4347
4416
  break;
4348
4417
  default:
4349
- z.apply(o, W);
4418
+ z.apply(o, U);
4350
4419
  }
4351
4420
  })(C);
4352
4421
  } finally {
@@ -4359,14 +4428,14 @@ function Ot() {
4359
4428
  S.source === s && typeof S.data == "string" && S.data.indexOf(f) === 0 && b(+S.data.slice(f.length));
4360
4429
  }
4361
4430
  })(typeof self > "u" ? r === void 0 ? this : r : self);
4362
- }).call(this, typeof Ae < "u" ? Ae : typeof self < "u" ? self : typeof window < "u" ? window : {});
4431
+ }).call(this, typeof Te < "u" ? Te : typeof self < "u" ? self : typeof window < "u" ? window : {});
4363
4432
  }, {}] }, {}, [10])(10);
4364
4433
  });
4365
4434
  })(Be)), Be.exports;
4366
4435
  }
4367
- var Vt = Ot();
4368
- const jt = /* @__PURE__ */ Je(Vt);
4369
- class Wt {
4436
+ var Ht = Gt();
4437
+ const $t = /* @__PURE__ */ Je(Ht);
4438
+ class Zt {
4370
4439
  zipObjectUrls = [];
4371
4440
  /** 加载新版 manifest 分包数据,并返回 Loader 可消费的 DWGData 结构。 */
4372
4441
  async load(e) {
@@ -4512,7 +4581,7 @@ class Wt {
4512
4581
  const t = await fetch(e);
4513
4582
  if (!t.ok)
4514
4583
  throw new Error(`HTTP error! status: ${t.status}`);
4515
- const i = await jt.loadAsync(await t.arrayBuffer()), n = this.findZipManifestPath(i), r = await this.fetchZipJson(i, n);
4584
+ const i = await $t.loadAsync(await t.arrayBuffer()), n = this.findZipManifestPath(i), r = await this.fetchZipJson(i, n);
4516
4585
  if (!this.isSplitManifest(r))
4517
4586
  throw new Error("[LoaderModule2d] Expected split CAD manifest data in .2d package.");
4518
4587
  const s = this.getZipBasePath(n);
@@ -4589,7 +4658,7 @@ class Wt {
4589
4658
  this.zipObjectUrls.forEach((e) => URL.revokeObjectURL(e)), this.zipObjectUrls = [];
4590
4659
  }
4591
4660
  }
4592
- function it(M, e, t) {
4661
+ function rt(M, e, t) {
4593
4662
  const i = t.length - M - 1;
4594
4663
  if (e >= t[i])
4595
4664
  return i - 1;
@@ -4600,7 +4669,7 @@ function it(M, e, t) {
4600
4669
  e < t[s] ? r = s : n = s, s = Math.floor((n + r) / 2);
4601
4670
  return s;
4602
4671
  }
4603
- function Ut(M, e, t, i) {
4672
+ function Yt(M, e, t, i) {
4604
4673
  const n = [], r = [], s = [];
4605
4674
  n[0] = 1;
4606
4675
  for (let o = 1; o <= t; ++o) {
@@ -4614,15 +4683,15 @@ function Ut(M, e, t, i) {
4614
4683
  }
4615
4684
  return n;
4616
4685
  }
4617
- function Ft(M, e, t, i) {
4618
- const n = it(M, i, e), r = Ut(n, i, M, e), s = new Pe(0, 0, 0, 0);
4686
+ function Xt(M, e, t, i) {
4687
+ const n = rt(M, i, e), r = Yt(n, i, M, e), s = new Pe(0, 0, 0, 0);
4619
4688
  for (let o = 0; o <= M; ++o) {
4620
4689
  const a = t[n - M + o], l = r[o], c = a.w * l;
4621
4690
  s.x += a.x * c, s.y += a.y * c, s.z += a.z * c, s.w += a.w * l;
4622
4691
  }
4623
4692
  return s;
4624
4693
  }
4625
- function Gt(M, e, t, i, n) {
4694
+ function Kt(M, e, t, i, n) {
4626
4695
  const r = [];
4627
4696
  for (let f = 0; f <= t; ++f)
4628
4697
  r[f] = 0;
@@ -4673,8 +4742,8 @@ function Gt(M, e, t, i, n) {
4673
4742
  }
4674
4743
  return s;
4675
4744
  }
4676
- function Ht(M, e, t, i, n) {
4677
- const r = n < M ? n : M, s = [], o = it(M, i, e), a = Gt(o, i, M, r, e), l = [];
4745
+ function qt(M, e, t, i, n) {
4746
+ const r = n < M ? n : M, s = [], o = rt(M, i, e), a = Kt(o, i, M, r, e), l = [];
4678
4747
  for (let c = 0; c < t.length; ++c) {
4679
4748
  const f = t[c].clone(), p = f.w;
4680
4749
  f.x *= p, f.y *= p, f.z *= p, l[c] = f;
@@ -4689,7 +4758,7 @@ function Ht(M, e, t, i, n) {
4689
4758
  s[c] = new Pe(0, 0, 0);
4690
4759
  return s;
4691
4760
  }
4692
- function $t(M, e) {
4761
+ function Qt(M, e) {
4693
4762
  let t = 1;
4694
4763
  for (let n = 2; n <= M; ++n)
4695
4764
  t *= n;
@@ -4700,7 +4769,7 @@ function $t(M, e) {
4700
4769
  i *= n;
4701
4770
  return t / i;
4702
4771
  }
4703
- function Zt(M) {
4772
+ function Jt(M) {
4704
4773
  const e = M.length, t = [], i = [];
4705
4774
  for (let r = 0; r < e; ++r) {
4706
4775
  const s = M[r];
@@ -4710,16 +4779,16 @@ function Zt(M) {
4710
4779
  for (let r = 0; r < e; ++r) {
4711
4780
  const s = t[r].clone();
4712
4781
  for (let o = 1; o <= r; ++o)
4713
- s.sub(n[r - o].clone().multiplyScalar($t(r, o) * i[o]));
4782
+ s.sub(n[r - o].clone().multiplyScalar(Qt(r, o) * i[o]));
4714
4783
  n[r] = s.divideScalar(i[0]);
4715
4784
  }
4716
4785
  return n;
4717
4786
  }
4718
- function Yt(M, e, t, i, n) {
4719
- const r = Ht(M, e, t, i, n);
4720
- return Zt(r);
4787
+ function ei(M, e, t, i, n) {
4788
+ const r = qt(M, e, t, i, n);
4789
+ return Jt(r);
4721
4790
  }
4722
- class Xt extends pt {
4791
+ class ti extends ft {
4723
4792
  /**
4724
4793
  * Constructs a new NURBS curve.
4725
4794
  *
@@ -4746,7 +4815,7 @@ class Xt extends pt {
4746
4815
  * @return {Vector3} The position on the curve.
4747
4816
  */
4748
4817
  getPoint(e, t = new Ne()) {
4749
- const i = t, n = this.knots[this.startKnot] + e * (this.knots[this.endKnot] - this.knots[this.startKnot]), r = Ft(this.degree, this.knots, this.controlPoints, n);
4818
+ const i = t, n = this.knots[this.startKnot] + e * (this.knots[this.endKnot] - this.knots[this.startKnot]), r = Xt(this.degree, this.knots, this.controlPoints, n);
4750
4819
  return r.w !== 1 && r.divideScalar(r.w), i.set(r.x, r.y, r.z);
4751
4820
  }
4752
4821
  /**
@@ -4757,7 +4826,7 @@ class Xt extends pt {
4757
4826
  * @return {Vector3} The tangent vector.
4758
4827
  */
4759
4828
  getTangent(e, t = new Ne()) {
4760
- const i = t, n = this.knots[0] + e * (this.knots[this.knots.length - 1] - this.knots[0]), r = Yt(this.degree, this.knots, this.controlPoints, n, 1);
4829
+ const i = t, n = this.knots[0] + e * (this.knots[this.knots.length - 1] - this.knots[0]), r = ei(this.degree, this.knots, this.controlPoints, n, 1);
4761
4830
  return i.copy(r[1]).normalize(), i;
4762
4831
  }
4763
4832
  toJSON() {
@@ -4769,7 +4838,7 @@ class Xt extends pt {
4769
4838
  }
4770
4839
  }
4771
4840
  function Ee(M, e = !1) {
4772
- const t = M[0].index !== null, i = new Set(Object.keys(M[0].attributes)), n = new Set(Object.keys(M[0].morphAttributes)), r = {}, s = {}, o = M[0].morphTargetsRelative, a = new mt();
4841
+ const t = M[0].index !== null, i = new Set(Object.keys(M[0].attributes)), n = new Set(Object.keys(M[0].morphAttributes)), r = {}, s = {}, o = M[0].morphTargetsRelative, a = new pt();
4773
4842
  let l = 0;
4774
4843
  for (let c = 0; c < M.length; ++c) {
4775
4844
  const f = M[c];
@@ -4848,7 +4917,7 @@ function $e(M) {
4848
4917
  return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.gpuType must be consistent across matching attributes."), null;
4849
4918
  r += c.count * t;
4850
4919
  }
4851
- const s = new e(r), o = new gt(s, t, i);
4920
+ const s = new e(r), o = new mt(s, t, i);
4852
4921
  let a = 0;
4853
4922
  for (let l = 0; l < M.length; ++l) {
4854
4923
  const c = M[l];
@@ -4865,8 +4934,8 @@ function $e(M) {
4865
4934
  }
4866
4935
  return n !== void 0 && (o.gpuType = n), o;
4867
4936
  }
4868
- const oe = 1e-8, Ze = 1e-3, Kt = 8421504;
4869
- class qt {
4937
+ const oe = 1e-8, Ze = 1e-3, ii = 8421504;
4938
+ class ni {
4870
4939
  constructor(e) {
4871
4940
  this.engine = e;
4872
4941
  }
@@ -4879,7 +4948,7 @@ class qt {
4879
4948
  if (this.isSolidFill(e))
4880
4949
  return this.createSolidItems(e, t, i);
4881
4950
  const r = this.createPatternLineItem(e, t, i);
4882
- return r ? [r] : (this.warnUnknownPatternFallback(e), this.createSolidItems(e, t, i, Kt));
4951
+ return r ? [r] : (this.warnUnknownPatternFallback(e), this.createSolidItems(e, t, i, ii));
4883
4952
  }
4884
4953
  /** 只有明确的 SOLID 才作为实心面;patternType=SolidFill 在当前导出数据里不可靠。 */
4885
4954
  isSolidFill(e) {
@@ -5087,7 +5156,7 @@ class qt {
5087
5156
  }
5088
5157
  if (n.length === 0) return null;
5089
5158
  n.forEach((a) => a.applyMatrix4(t));
5090
- const o = tt(n);
5159
+ const o = nt(n);
5091
5160
  return {
5092
5161
  kind: "line",
5093
5162
  layer: e.layer ?? "0",
@@ -5111,10 +5180,10 @@ class qt {
5111
5180
  new _.Vector2(r.minX, r.maxY)
5112
5181
  ], h = f.dot(c), g = y.map((z) => z.dot(c) - h), v = Math.min(...g) - s, b = Math.max(...g) + s, k = Math.floor(Math.min(v / d, b / d)) - 2, S = Math.ceil(Math.max(v / d, b / d)) + 2, C = [], R = new _.Vector2((r.minX + r.maxX) / 2, (r.minY + r.maxY) / 2);
5113
5182
  for (let z = k; z <= S && C.length < o; z += 1) {
5114
- const W = f.clone().add(p.clone().multiplyScalar(z)), D = W.clone().add(l.clone().multiplyScalar(R.clone().sub(W).dot(l))), H = D.clone().add(l.clone().multiplyScalar(-s * 2)), q = D.clone().add(l.clone().multiplyScalar(s * 2));
5183
+ const U = f.clone().add(p.clone().multiplyScalar(z)), D = U.clone().add(l.clone().multiplyScalar(R.clone().sub(U).dot(l))), H = D.clone().add(l.clone().multiplyScalar(-s * 2)), q = D.clone().add(l.clone().multiplyScalar(s * 2));
5115
5184
  this.clipLineByPolygon(H, q, i).forEach(([B, m]) => {
5116
5185
  this.subtractHoles(B, m, n).forEach(([O, ee]) => {
5117
- this.appendDashedSegment(C, O, ee, t.dashLengths, W, l);
5186
+ this.appendDashedSegment(C, O, ee, t.dashLengths, U, l);
5118
5187
  });
5119
5188
  });
5120
5189
  }
@@ -5249,7 +5318,7 @@ class qt {
5249
5318
  }
5250
5319
  class Ye {
5251
5320
  constructor(e, t) {
5252
- this.engine = e, this.textFactory = t, this.hatchRenderer = new qt(e);
5321
+ this.engine = e, this.textFactory = t, this.hatchRenderer = new ni(e);
5253
5322
  }
5254
5323
  hatchRenderer;
5255
5324
  /** 根据实体类型分发到线、文字、填充、图片等具体几何生成逻辑。 */
@@ -5293,7 +5362,7 @@ class Ye {
5293
5362
  case "LINE_GROUP":
5294
5363
  return this.getLineGroupPoints(e);
5295
5364
  case "LINE":
5296
- return [be(e.startPoint), be(e.endPoint)];
5365
+ return [we(e.startPoint), we(e.endPoint)];
5297
5366
  case "CIRCLE":
5298
5367
  return this.getCirclePoints(e);
5299
5368
  case "POLYLINE":
@@ -5338,7 +5407,7 @@ class Ye {
5338
5407
  }
5339
5408
  /** 根据 bulge = tan(圆心角 / 4) 将单段多段线转换为直线或圆弧采样点对。 */
5340
5409
  getPolylineSegmentPoints(e, t) {
5341
- const i = be(e), n = be(t), r = Number(e?.bulge ?? 0);
5410
+ const i = we(e), n = we(t), r = Number(e?.bulge ?? 0);
5342
5411
  if (!Number.isFinite(r) || Math.abs(r) < 1e-10) return [i, n];
5343
5412
  const s = n.clone().sub(i), o = s.length();
5344
5413
  if (o < 1e-12) return [i, n];
@@ -5351,7 +5420,7 @@ class Ye {
5351
5420
  }
5352
5421
  /** 样条线使用控制点生成平滑曲线,不强制穿过每一个控制点。 */
5353
5422
  getSplinePoints(e) {
5354
- const t = (e.points ?? []).map((n) => be(n));
5423
+ const t = (e.points ?? []).map((n) => we(n));
5355
5424
  if (t.length < 2) return [];
5356
5425
  const i = t.length === 2 ? t : this.sampleSplineCurve(t, e);
5357
5426
  return this.pointsToSegments(i);
@@ -5363,7 +5432,7 @@ class Ye {
5363
5432
  return new _.Vector4(a.x, a.y, a.z, Number.isFinite(c) ? c : 1);
5364
5433
  });
5365
5434
  let s = (e.length - 1) * 2;
5366
- const o = new Xt(i, n, r).getPoints(s);
5435
+ const o = new ti(i, n, r).getPoints(s);
5367
5436
  return t.closed === !0 && o.length > 1 && o.push(o[0].clone()), o;
5368
5437
  }
5369
5438
  /** 在缺少 knots 的数据里生成首尾夹紧的均匀节点向量。 */
@@ -5388,7 +5457,7 @@ class Ye {
5388
5457
  createImage(e, t) {
5389
5458
  const i = e.imageUrl || e.url;
5390
5459
  if (!i) return [];
5391
- const n = be(e.position), r = be(e.uVector), s = be(e.vVector), o = Number(e.pixelWidth ?? e.width ?? 1), a = Number(e.pixelHeight ?? e.height ?? 1);
5460
+ const n = we(e.position), r = we(e.uVector), s = we(e.vVector), o = Number(e.pixelWidth ?? e.width ?? 1), a = Number(e.pixelHeight ?? e.height ?? 1);
5392
5461
  if (!Number.isFinite(o) || !Number.isFinite(a) || o === 0 || a === 0) return [];
5393
5462
  const l = r.multiplyScalar(o), c = s.multiplyScalar(a), f = n.clone(), p = n.clone().add(l), d = n.clone().add(l).add(c), y = n.clone().add(c);
5394
5463
  [f, p, d, y].forEach((b) => b.applyMatrix4(t));
@@ -5441,7 +5510,7 @@ class Ye {
5441
5510
  }];
5442
5511
  }
5443
5512
  }
5444
- class Qt {
5513
+ class ri {
5445
5514
  constructor(e, t, i = e.modelGroup, n = {}) {
5446
5515
  this.model = t, this.targetGroup = i, this.options = n;
5447
5516
  }
@@ -5532,7 +5601,7 @@ class Qt {
5532
5601
  const l = this.targetGroup.children.length - 1;
5533
5602
  let c = 0;
5534
5603
  e.forEach((f, p) => {
5535
- const d = tt(f.points);
5604
+ const d = nt(f.points);
5536
5605
  this.pushNodeMap(p, {
5537
5606
  indexes: [l, c, c + f.points.length * 3],
5538
5607
  object: o,
@@ -5758,13 +5827,13 @@ class Xe {
5758
5827
  return r.applyMatrix4(Oe([(t.min.x + t.max.x) / 2, (t.min.y + t.max.y) / 2, 0], [1, 1, 1], 0)), r;
5759
5828
  }
5760
5829
  }
5761
- class Jt {
5830
+ class si {
5762
5831
  engine;
5763
5832
  data = null;
5764
5833
  enableValidation = !0;
5765
5834
  model = this.createEmptyModel();
5766
5835
  font = null;
5767
- dataSource = new Wt();
5836
+ dataSource = new Zt();
5768
5837
  lastBuildOptions = {};
5769
5838
  activeWorkspace = { type: "model", name: "模型" };
5770
5839
  workspaceCache = /* @__PURE__ */ new Map();
@@ -5942,7 +6011,7 @@ class Jt {
5942
6011
  for (let a = 0; a < e.length; a += 1) {
5943
6012
  const l = e[a], c = this.createTileGroup(l, n.namePrefix);
5944
6013
  t.add(c);
5945
- const f = new Qt(this.engine, this.model, c, {
6014
+ const f = new ri(this.engine, this.model, c, {
5946
6015
  interactive: n.interactive ?? !0
5947
6016
  }), p = /* @__PURE__ */ new Set();
5948
6017
  let d = 0, y = 0;
@@ -6177,7 +6246,7 @@ class Jt {
6177
6246
  }
6178
6247
  /** 按图纸实际文字裁剪字体字符集,降低字体转换成本。 */
6179
6248
  async loadFont(e) {
6180
- const t = this.engine.options?.fontUrl ?? "/fonts/simfang.ttf", i = await ce.fromUrl(t, { chars: this.collectTextChars(e) });
6249
+ const t = this.engine.options?.fontUrl ?? be("/fonts/simfang.ttf", import.meta.url), i = await ce.fromUrl(t, { chars: this.collectTextChars(e) });
6181
6250
  return ce.toThreeFont(i);
6182
6251
  }
6183
6252
  /** 从 block 实体中收集需要转换的文字字符;根实体来自 tile insert,不包含真实文字。 */
@@ -6203,7 +6272,7 @@ class Jt {
6203
6272
  r && e ? this.engine.cameraModule2d?.fitToExtents(e) : r && this.engine.fitToView();
6204
6273
  } catch {
6205
6274
  }
6206
- this.engine.layerManager || (this.engine.layerManager = new et(this.engine)), this.engine.layerManager._loadLayers();
6275
+ this.engine.layerManager || (this.engine.layerManager = new it(this.engine)), this.engine.layerManager._loadLayers();
6207
6276
  const i = this.engine.scene?.background, n = i instanceof _.Color ? i.getHex() : this.engine.options?.backgroundColor ?? 1710618;
6208
6277
  this.engine.modelToolModule2d?.updateColorsForBackground(n), this.engine.layerManager.refresh(), this.engine.events?.trigger(fe.ModelLoaded, {});
6209
6278
  }
@@ -6267,7 +6336,7 @@ class Jt {
6267
6336
  this.clear();
6268
6337
  }
6269
6338
  }
6270
- class nt {
6339
+ class st {
6271
6340
  /**
6272
6341
  * 构造函数
6273
6342
  * @param camera - Three.js 相机对象(用于投影计算)
@@ -6379,7 +6448,7 @@ class nt {
6379
6448
  this.scene = e;
6380
6449
  }
6381
6450
  }
6382
- class ei {
6451
+ class oi {
6383
6452
  engine;
6384
6453
  pickBoxElementIds = [];
6385
6454
  worldToScreen;
@@ -6387,7 +6456,7 @@ class ei {
6387
6456
  maxHoverLineCoordinateCount = 3e4;
6388
6457
  maxHoverMeshVertexCount = 3e4;
6389
6458
  constructor(e) {
6390
- this.engine = e, this.pickBoxElementIds = [], this.worldToScreen = new nt(e.camera, e.renderer, e.scene);
6459
+ this.engine = e, this.pickBoxElementIds = [], this.worldToScreen = new st(e.camera, e.renderer, e.scene);
6391
6460
  }
6392
6461
  init() {
6393
6462
  this.pickBoxElementIds = [];
@@ -6516,7 +6585,7 @@ class ei {
6516
6585
  return e.distanceTo(a);
6517
6586
  }
6518
6587
  }
6519
- class ti {
6588
+ class ai {
6520
6589
  engine;
6521
6590
  // 小组件容器
6522
6591
  widgetContainer = null;
@@ -6543,7 +6612,7 @@ class ti {
6543
6612
  // 是否启用状态
6544
6613
  enabled = !1;
6545
6614
  constructor(e) {
6546
- this.engine = e, this.worldToScreen = new nt(e.camera, e.renderer, e.scene), this.initWidget();
6615
+ this.engine = e, this.worldToScreen = new st(e.camera, e.renderer, e.scene), this.initWidget();
6547
6616
  let t = this;
6548
6617
  this.engine.controlModule2d.panControls.addEventListener("change", () => {
6549
6618
  t.updateViewPoint();
@@ -6684,7 +6753,7 @@ class ti {
6684
6753
  return Math.atan2(e.clientX - i, n - e.clientY);
6685
6754
  }
6686
6755
  }
6687
- class ii {
6756
+ class li {
6688
6757
  engine;
6689
6758
  enabled = !1;
6690
6759
  constructor(e) {
@@ -6737,7 +6806,7 @@ class ii {
6737
6806
  return e?.object ?? e?.group?.children?.[e.indexes?.[0]] ?? this.engine.modelGroup?.children?.[e.indexes?.[0]];
6738
6807
  }
6739
6808
  }
6740
- class ni {
6809
+ class hi {
6741
6810
  engine;
6742
6811
  highlightMaterial;
6743
6812
  hideMaterial;
@@ -6997,7 +7066,7 @@ class ni {
6997
7066
  return !0;
6998
7067
  }
6999
7068
  }
7000
- function ri(M) {
7069
+ function ci(M) {
7001
7070
  const e = {
7002
7071
  mouseMoveFrame: null,
7003
7072
  latestMouseMoveEvent: null,
@@ -7107,7 +7176,7 @@ function ri(M) {
7107
7176
  }
7108
7177
  return e;
7109
7178
  }
7110
- class si {
7179
+ class di {
7111
7180
  el;
7112
7181
  xEl;
7113
7182
  yEl;
@@ -7126,8 +7195,8 @@ class si {
7126
7195
  this.el.parentElement?.removeChild(this.el);
7127
7196
  }
7128
7197
  }
7129
- var rt = /* @__PURE__ */ ((M) => (M.ModelLoadStart = "model-load-start", M.ModelLoadProgress = "model-load-progress", M.ModelLoaded = "model-loaded", M.ModelError = "model-error", M.SelectionChanged = "selection-changed", M.HoverChanged = "hover-changed", M.Click = "click", M.MouseMove = "mouse-move", M.CameraChanged = "camera-changed", M.CameraIdle = "camera-idle", M.EngineFree = "engine-free", M.EngineBusy = "engine-busy", M.MeasureChanged = "measure-changed", M.MeasureClick = "measure-click", M.SectionMove = "section-move", M))(rt || {});
7130
- class oi {
7198
+ var ot = /* @__PURE__ */ ((M) => (M.ModelLoadStart = "model-load-start", M.ModelLoadProgress = "model-load-progress", M.ModelLoaded = "model-loaded", M.ModelError = "model-error", M.SelectionChanged = "selection-changed", M.HoverChanged = "hover-changed", M.Click = "click", M.MouseMove = "mouse-move", M.CameraChanged = "camera-changed", M.CameraIdle = "camera-idle", M.EngineFree = "engine-free", M.EngineBusy = "engine-busy", M.MeasureChanged = "measure-changed", M.MeasureClick = "measure-click", M.SectionMove = "section-move", M))(ot || {});
7199
+ class ui {
7131
7200
  engine;
7132
7201
  behavior;
7133
7202
  mouseCoordUI = null;
@@ -7137,7 +7206,7 @@ class oi {
7137
7206
  init() {
7138
7207
  this.behavior = this.engine.handelBehaved2d, this.behavior.init(this);
7139
7208
  const e = this.engine.container;
7140
- e && this.engine.options?.showMouseCoordinates !== !1 && (this.mouseCoordUI = new si(e));
7209
+ e && this.engine.options?.showMouseCoordinates !== !1 && (this.mouseCoordUI = new di(e));
7141
7210
  }
7142
7211
  active() {
7143
7212
  this.behavior.active();
@@ -7179,7 +7248,7 @@ class oi {
7179
7248
  handleMouseClick(e) {
7180
7249
  if (this.canHandleElementInteraction())
7181
7250
  if (e.catch != null && this.isModelInteractive(e.catch.id)) {
7182
- this.engine.modelToolModule2d.highlightModel([e.catch.id]), this.engine.events.trigger(rt.Click, e.catch.id);
7251
+ this.engine.modelToolModule2d.highlightModel([e.catch.id]), this.engine.events.trigger(ot.Click, e.catch.id);
7183
7252
  let t = new CustomEvent("D2ElementClick", {
7184
7253
  detail: { id: e.catch.id }
7185
7254
  });
@@ -7204,7 +7273,7 @@ class oi {
7204
7273
  this.mouseCoordUI?.dispose(), this.mouseCoordUI = null;
7205
7274
  }
7206
7275
  }
7207
- class ai {
7276
+ class fi {
7208
7277
  overlay;
7209
7278
  hLine;
7210
7279
  vLine;
@@ -7258,7 +7327,7 @@ const Ke = [
7258
7327
  { action: "linkElement2d3d", label: "模型联动", dividerBefore: !0 },
7259
7328
  { action: "linkView2d3d", label: "视角关联" }
7260
7329
  ];
7261
- class li {
7330
+ class pi {
7262
7331
  menu;
7263
7332
  container;
7264
7333
  canvas;
@@ -7331,7 +7400,7 @@ class li {
7331
7400
  this.canvas.removeEventListener("contextmenu", this.onContextMenu), document.removeEventListener("mousedown", this.onDocMouseDown), document.removeEventListener("keydown", this.onEscape), this.menu.parentElement?.removeChild(this.menu);
7332
7401
  }
7333
7402
  }
7334
- class hi {
7403
+ class mi {
7335
7404
  overlay = null;
7336
7405
  textEl = null;
7337
7406
  barEl = null;
@@ -7466,14 +7535,14 @@ class hi {
7466
7535
  this.overlay?.remove(), this.overlay = null, this.textEl = null, this.barEl = null, this.pctEl = null;
7467
7536
  }
7468
7537
  }
7469
- const ci = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
7538
+ const gi = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
7470
7539
  <circle cx="6.5" cy="6.5" r="4.5" stroke="currentColor" stroke-width="1.5"/>
7471
7540
  <line x1="10" y1="10" x2="14" y2="14" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
7472
- </svg>`, di = `<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
7541
+ </svg>`, yi = `<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
7473
7542
  <line x1="1" y1="1" x2="11" y2="11" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
7474
7543
  <line x1="11" y1="1" x2="1" y2="11" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
7475
7544
  </svg>`;
7476
- class ui {
7545
+ class vi {
7477
7546
  manager;
7478
7547
  wrapper;
7479
7548
  input;
@@ -7492,7 +7561,7 @@ class ui {
7492
7561
  return e.className = "engine-2d-search", e.innerHTML = `
7493
7562
  <div class="engine-2d-search__box">
7494
7563
  <div class="engine-2d-search__input-row">
7495
- <span class="engine-2d-search__icon">${ci}</span>
7564
+ <span class="engine-2d-search__icon">${gi}</span>
7496
7565
  <input
7497
7566
  class="engine-2d-search__input"
7498
7567
  type="text"
@@ -7500,7 +7569,7 @@ class ui {
7500
7569
  autocomplete="off"
7501
7570
  spellcheck="false"
7502
7571
  />
7503
- <button class="engine-2d-search__clear" title="清除">${di}</button>
7572
+ <button class="engine-2d-search__clear" title="清除">${yi}</button>
7504
7573
  </div>
7505
7574
  <div class="engine-2d-search__divider"></div>
7506
7575
  <div class="engine-2d-search__status"></div>
@@ -7606,13 +7675,13 @@ class ui {
7606
7675
  this.input.removeEventListener("input", this.onInput), this.input.removeEventListener("keydown", this.onKeyDown), this.clearBtn.removeEventListener("click", this.onClear), document.removeEventListener("mousedown", this.onDocMouseDown), document.removeEventListener("keydown", this.onEscape), this.wrapper.parentElement?.removeChild(this.wrapper), this.debounceTimer !== null && clearTimeout(this.debounceTimer);
7607
7676
  }
7608
7677
  }
7609
- class fi {
7678
+ class bi {
7610
7679
  engine;
7611
7680
  searchUI = null;
7612
7681
  constructor(e) {
7613
7682
  this.engine = e;
7614
7683
  const t = document.getElementById(e?.options?.containerId ?? "") ?? e?.container ?? null;
7615
- t && (this.searchUI = new ui(t, this));
7684
+ t && (this.searchUI = new vi(t, this));
7616
7685
  }
7617
7686
  /** 只查询已加载的文字实体,支持连续包含和按字符顺序的模糊匹配。 */
7618
7687
  search(e) {
@@ -7789,7 +7858,7 @@ const qe = {
7789
7858
  "--e2d-coord-label": "rgba(0,0,0,0.50)"
7790
7859
  }
7791
7860
  };
7792
- class pi {
7861
+ class wi {
7793
7862
  container;
7794
7863
  current;
7795
7864
  constructor(e, t = "dark") {
@@ -7822,7 +7891,7 @@ const Qe = {
7822
7891
  areaUnit: "m²",
7823
7892
  scale: 1
7824
7893
  };
7825
- class Ve {
7894
+ class je {
7826
7895
  manager;
7827
7896
  points = [];
7828
7897
  constructor(e) {
@@ -7857,7 +7926,7 @@ class Ve {
7857
7926
  this.clearAllPoints();
7858
7927
  }
7859
7928
  }
7860
- class mi extends Ve {
7929
+ class xi extends je {
7861
7930
  /** 两点完成一条距离测量。 */
7862
7931
  handleClick(e) {
7863
7932
  super.handleClick(e), this.points.length === 2 && (this.manager.addMeasurement("distance", this.points), this.clearAllPoints());
@@ -7866,7 +7935,7 @@ class mi extends Ve {
7866
7935
  this.points.length === 1 && this.manager.drawPreview("distance", [this.points[0], e]);
7867
7936
  }
7868
7937
  }
7869
- class gi extends Ve {
7938
+ class ki extends je {
7870
7939
  /** 三点及以上可以闭合面积,双击或 Enter 结束。 */
7871
7940
  handleClick(e) {
7872
7941
  super.handleClick(e), this.manager.drawPreview("area", this.points);
@@ -7879,7 +7948,7 @@ class gi extends Ve {
7879
7948
  e.length >= 3 && this.manager.addMeasurement("area", e), this.clearAllPoints();
7880
7949
  }
7881
7950
  }
7882
- class yi extends Ve {
7951
+ class Mi extends je {
7883
7952
  /** 三点完成角度测量,第二个点作为角点。 */
7884
7953
  handleClick(e) {
7885
7954
  super.handleClick(e), this.points.length === 3 && (this.manager.addMeasurement("angle", this.points), this.clearAllPoints());
@@ -7888,7 +7957,7 @@ class yi extends Ve {
7888
7957
  this.points.length >= 2 && this.manager.drawPreview("angle", [...this.points, e]);
7889
7958
  }
7890
7959
  }
7891
- class vi {
7960
+ class _i {
7892
7961
  distanceMeasure;
7893
7962
  areaMeasure;
7894
7963
  angleMeasure;
@@ -7908,7 +7977,7 @@ class vi {
7908
7977
  hasDraggedAfterMouseDown = !1;
7909
7978
  currentWorkspaceKey = "model";
7910
7979
  constructor(e) {
7911
- this.engine = e, this.container = e.container, this.distanceMeasure = new mi(this), this.areaMeasure = new gi(this), this.angleMeasure = new yi(this), this.annotationContainer = document.createElement("div"), this.annotationContainer.className = "annotation-container", this.annotationContainer.style.pointerEvents = "none", this.annotationContainer.style.zIndex = "20", this.container.appendChild(this.annotationContainer);
7980
+ this.engine = e, this.container = e.container, this.distanceMeasure = new xi(this), this.areaMeasure = new ki(this), this.angleMeasure = new Mi(this), this.annotationContainer = document.createElement("div"), this.annotationContainer.className = "annotation-container", this.annotationContainer.style.pointerEvents = "none", this.annotationContainer.style.zIndex = "20", this.container.appendChild(this.annotationContainer);
7912
7981
  }
7913
7982
  /** 开启 2D 测量事件;只停用图元点选,不停用 pan/zoom 视图控制。 */
7914
7983
  active() {
@@ -8161,92 +8230,23 @@ class vi {
8161
8230
  return `measure-2d-${Date.now()}-${Math.random().toString(16).slice(2)}`;
8162
8231
  }
8163
8232
  }
8164
- const bi = "__BIM_ENGINE_SDK_ASSET_BASE__";
8165
- function wi() {
8166
- return typeof globalThis < "u" ? globalThis : null;
8167
- }
8168
- function je(M) {
8169
- return M.endsWith("/") ? M : `${M}/`;
8170
- }
8171
- function st(M) {
8172
- return /^(?:[a-z][a-z\d+\-.]*:)?\/\//i.test(M) || /^(?:data|blob):/i.test(M);
8173
- }
8174
- function xi(M) {
8175
- return M.startsWith("./") || M.startsWith("../");
8176
- }
8177
- function ze(M, e) {
8178
- try {
8179
- return e ? new URL(M, e).toString() : new URL(M).toString();
8180
- } catch {
8181
- return null;
8182
- }
8183
- }
8184
- function ot() {
8185
- return typeof document < "u" && document.baseURI ? document.baseURI : typeof location < "u" && location.href ? location.href : null;
8186
- }
8187
- function ki(M, e) {
8188
- const t = je(M);
8189
- if (st(t))
8190
- return t;
8191
- const i = Ce(e) || at() || ot();
8192
- return ze(t, i || void 0) || t;
8193
- }
8194
- function Ce(M) {
8195
- if (!M)
8196
- return null;
8197
- try {
8198
- const e = ot(), t = ze(M, e || void 0) || M, i = new URL(".", t), n = i.pathname.replace(/\\/g, "/");
8199
- return n.endsWith("/chunks/") ? new URL("../", i).toString() : e && /\/src\//.test(n) ? je(e) : i.toString();
8200
- } catch {
8201
- return null;
8202
- }
8203
- }
8204
- function at() {
8205
- if (typeof document > "u")
8206
- return null;
8207
- const M = document.currentScript;
8208
- if (M?.src)
8209
- return Ce(M.src);
8210
- const e = document.getElementsByTagName("script");
8211
- for (let t = e.length - 1; t >= 0; t -= 1) {
8212
- const i = e[t]?.src;
8213
- if (i && /(?:bim-engine-sdk|iflow-engine-base|dwg-preview|gaussian)\.(?:es|umd)\.js(?:[?#].*)?$/.test(i))
8214
- return Ce(i);
8215
- }
8216
- return null;
8217
- }
8218
- function Mi(M) {
8219
- const t = wi()?.[bi];
8220
- return typeof t == "string" && t.length > 0 ? ki(t, M) : Ce(M) || at() || (typeof document < "u" ? je(document.baseURI) : "./");
8221
- }
8222
- function we(M, e) {
8223
- if (e?.includes("@fs") && (e = e.split("@")[0]), console.log("资源路径", M, e), st(M))
8224
- return M;
8225
- if (xi(M)) {
8226
- const n = ze(M, Ce(e) || void 0);
8227
- if (n)
8228
- return n;
8229
- }
8230
- const t = M.replace(/^\/+/, ""), i = Mi(e);
8231
- return ze(t, i) || t;
8232
- }
8233
8233
  const Re = {
8234
8234
  stroke: "#ff4d4f",
8235
8235
  fill: "rgba(255, 77, 79, 0.08)",
8236
8236
  strokeWidth: 2,
8237
8237
  fontSize: 16,
8238
8238
  cloudRadius: 10
8239
- }, _i = {
8240
- none: we("/assets/icon/选择.svg", import.meta.url),
8241
- line: we("/assets/icon/线.svg", import.meta.url),
8242
- arrow: we("/assets/icon/箭头.svg", import.meta.url),
8243
- rect: we("/assets/icon/矩形.svg", import.meta.url),
8244
- ellipse: we("/assets/icon/圆形.svg", import.meta.url),
8245
- polygon: we("/assets/icon/面积.svg", import.meta.url),
8246
- text: we("/assets/icon/文字.svg", import.meta.url),
8247
- cloudline: we("/assets/icon/云线.svg", import.meta.url)
8248
- }, Ei = "data:image/svg+xml;utf8," + encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="#1f2937" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18"/><path d="M8 6V4h8v2"/><path d="M6 6l1 16h10l1-16"/><path d="M10 11v6"/><path d="M14 11v6"/></svg>'), Ci = "data:image/svg+xml;utf8," + encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="#1f2937" stroke-width="2" stroke-linecap="round"><path d="M6 6l12 12"/><path d="M18 6L6 18"/></svg>');
8249
- class Si {
8239
+ }, Ei = {
8240
+ none: be("/assets/icon/选择.svg", import.meta.url),
8241
+ line: be("/assets/icon/线.svg", import.meta.url),
8242
+ arrow: be("/assets/icon/箭头.svg", import.meta.url),
8243
+ rect: be("/assets/icon/矩形.svg", import.meta.url),
8244
+ ellipse: be("/assets/icon/圆形.svg", import.meta.url),
8245
+ polygon: be("/assets/icon/面积.svg", import.meta.url),
8246
+ text: be("/assets/icon/文字.svg", import.meta.url),
8247
+ cloudline: be("/assets/icon/云线.svg", import.meta.url)
8248
+ }, Ci = "data:image/svg+xml;utf8," + encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="#1f2937" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18"/><path d="M8 6V4h8v2"/><path d="M6 6l1 16h10l1-16"/><path d="M10 11v6"/><path d="M14 11v6"/></svg>'), Si = "data:image/svg+xml;utf8," + encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="#1f2937" stroke-width="2" stroke-linecap="round"><path d="M6 6l12 12"/><path d="M18 6L6 18"/></svg>');
8249
+ class Ti {
8250
8250
  engine;
8251
8251
  container;
8252
8252
  layer;
@@ -8426,7 +8426,7 @@ class Si {
8426
8426
  { type: "cloudline", title: "云线,双击或 Enter 结束" },
8427
8427
  { type: "text", title: "文字" }
8428
8428
  ].forEach((a) => {
8429
- const l = this.createIconButton(a.title, _i[a.type]);
8429
+ const l = this.createIconButton(a.title, Ei[a.type]);
8430
8430
  l.onclick = () => {
8431
8431
  this.active(), this.setDrawType(a.type);
8432
8432
  }, a.type !== "none" && (this.buttons[a.type] = l), e.appendChild(l);
@@ -8443,9 +8443,9 @@ class Si {
8443
8443
  r.type = "number", r.min = "10", r.max = "72", r.value = `${this.style.fontSize}`, r.title = "字号", r.onchange = () => {
8444
8444
  this.style.fontSize = this.normalizeNumber(r.valueAsNumber, 10, 72, Re.fontSize);
8445
8445
  }, e.appendChild(r), e.appendChild(this.createDivider());
8446
- const s = this.createIconButton("清空", Ei);
8446
+ const s = this.createIconButton("清空", Ci);
8447
8447
  s.onclick = () => this.clearAll(), e.appendChild(s);
8448
- const o = this.createIconButton("关闭", Ci);
8448
+ const o = this.createIconButton("关闭", Si);
8449
8449
  return o.onclick = () => {
8450
8450
  this.hideToolbar(), this.disActive();
8451
8451
  }, e.appendChild(o), e;
@@ -8646,7 +8646,7 @@ class Si {
8646
8646
  return `markup-2d-${Date.now()}-${Math.random().toString(16).slice(2)}`;
8647
8647
  }
8648
8648
  }
8649
- class Ti {
8649
+ class Ai {
8650
8650
  container;
8651
8651
  labelContainer;
8652
8652
  projectCoordinate;
@@ -8845,11 +8845,11 @@ class Ti {
8845
8845
  e.stopImmediatePropagation();
8846
8846
  };
8847
8847
  }
8848
- class Ai {
8848
+ class Li {
8849
8849
  engine;
8850
8850
  manager;
8851
8851
  constructor(e) {
8852
- this.engine = e, this.manager = new Ti({
8852
+ this.engine = e, this.manager = new Ai({
8853
8853
  container: e.container,
8854
8854
  className: "bim-engine-label-container bim-engine-label-container-2d",
8855
8855
  projectCoordinate: (t) => this.projectCoordinate(t),
@@ -8912,7 +8912,7 @@ class Ai {
8912
8912
  return { x: i.x, y: i.y, z: 0 };
8913
8913
  }
8914
8914
  }
8915
- class Li {
8915
+ class Pi {
8916
8916
  engine;
8917
8917
  mainViewPort = null;
8918
8918
  constructor(e) {
@@ -8987,10 +8987,10 @@ class Ii {
8987
8987
  this.unsubscribe(), this.el.remove();
8988
8988
  }
8989
8989
  }
8990
- const Pi = "3.9.16", zi = {
8991
- version: Pi
8992
- }, Di = zi.version;
8993
- class Bi {
8990
+ const zi = "3.9.161", Di = {
8991
+ version: zi
8992
+ }, Bi = Di.version;
8993
+ class Ri {
8994
8994
  // 配置选项
8995
8995
  options;
8996
8996
  container = null;
@@ -9035,7 +9035,7 @@ class Bi {
9035
9035
  renderer = null;
9036
9036
  // 数据
9037
9037
  dwgData = null;
9038
- version = Di;
9038
+ version = Bi;
9039
9039
  constructor(e) {
9040
9040
  if (this.options = e, this.options.backgroundColor = this.options.backgroundColor ?? 1710618, this.options.enablePerformanceMonitoring = this.options.enablePerformanceMonitoring ?? !1, this.options.showMouseCoordinates = this.options.showMouseCoordinates ?? !1, this.options.loadingStyle = this.options.loadingStyle ?? 2, this.options.contextMenu = this.options.contextMenu ?? {
9041
9041
  items: [
@@ -9049,13 +9049,13 @@ class Bi {
9049
9049
  ]
9050
9050
  }, this.enablePerformanceMonitoring = e.enablePerformanceMonitoring ?? !1, this.container = document.getElementById(e.containerId), !this.container)
9051
9051
  throw new Error(`Container ${e.containerId} not found`);
9052
- this.initialize(), this.handelBehaved2d = ri(this), this.interactionModule2d = new oi(this), this.interactionModule2d.init(), this.interactionModule2d.active();
9052
+ this.initialize(), this.handelBehaved2d = ci(this), this.interactionModule2d = new ui(this), this.interactionModule2d.init(), this.interactionModule2d.active();
9053
9053
  }
9054
9054
  /**
9055
9055
  * 初始化引擎
9056
9056
  */
9057
9057
  initialize() {
9058
- this.events = new kt(!1), this.sceneModule2d = new Ct(this, this.options), this.scene = this.sceneModule2d.scene, this.cameraModule2d = new Tt(this, this.container), this.camera = this.cameraModule2d.orthographicCamera, this.renderModule2d = new At(this, this.container, this.options), this.renderer = this.renderModule2d.renderer, this.controlModule2d = new It(this), this.loaderModule2d = new Jt(this), this.themeManager = new pi(this.container), this.layerManager = new et(this), this.searchManager = new fi(this), this.measure = new vi(this), this.markup = new Si(this), this.label = new Ai(this), this.viewCube = new Li(this), this.octreeBox2d = new ei(this), this.modelToolModule2d = new ni(this), this.engineStatus2d = new St(this), this.linkView2d3d = new ti(this), this.linkElement2d3d = new ii(this), this.sceneModule2d.initGrid(), this.cadCursorUI = new ai(this.container, this.renderer.domElement, this.options.cursorStyle ?? "short-crosshair"), this.cadCursorUI.setBackgroundColor(this.options.backgroundColor ?? 1710618), this.loadingUI = new hi(this.container, this.options.loadingStyle), this.events.on(fe.ModelLoadStart, () => this.loadingUI.show("正在加载...", 0)), this.events.on(fe.ModelLoadProgress, (e) => this.loadingUI.update(e.text, e.progress)), this.events.on(fe.ModelLoaded, () => this.loadingUI.hide()), this.events.on(fe.ModelLoadError, () => this.loadingUI.hide()), this.versionEl = document.createElement("div"), this.versionEl.className = "engine-2d-version-text", this.updateVersionDisplay(), this.container.appendChild(this.versionEl), this.workspaceTabsUI = new Ii(this.container, this), this.contextMenuUI = new li(
9058
+ this.events = new xt(!1), this.sceneModule2d = new Et(this, this.options), this.scene = this.sceneModule2d.scene, this.cameraModule2d = new St(this, this.container), this.camera = this.cameraModule2d.orthographicCamera, this.renderModule2d = new Tt(this, this.container, this.options), this.renderer = this.renderModule2d.renderer, this.controlModule2d = new Lt(this), this.loaderModule2d = new si(this), this.themeManager = new wi(this.container), this.layerManager = new it(this), this.searchManager = new bi(this), this.measure = new _i(this), this.markup = new Ti(this), this.label = new Li(this), this.viewCube = new Pi(this), this.octreeBox2d = new oi(this), this.modelToolModule2d = new hi(this), this.engineStatus2d = new Ct(this), this.linkView2d3d = new ai(this), this.linkElement2d3d = new li(this), this.sceneModule2d.initGrid(), this.cadCursorUI = new fi(this.container, this.renderer.domElement, this.options.cursorStyle ?? "short-crosshair"), this.cadCursorUI.setBackgroundColor(this.options.backgroundColor ?? 1710618), this.loadingUI = new mi(this.container, this.options.loadingStyle), this.events.on(fe.ModelLoadStart, () => this.loadingUI.show("正在加载...", 0)), this.events.on(fe.ModelLoadProgress, (e) => this.loadingUI.update(e.text, e.progress)), this.events.on(fe.ModelLoaded, () => this.loadingUI.hide()), this.events.on(fe.ModelLoadError, () => this.loadingUI.hide()), this.versionEl = document.createElement("div"), this.versionEl.className = "engine-2d-version-text", this.updateVersionDisplay(), this.container.appendChild(this.versionEl), this.workspaceTabsUI = new Ii(this.container, this), this.contextMenuUI = new pi(
9059
9059
  this.container,
9060
9060
  this.renderer.domElement,
9061
9061
  (e) => {
@@ -9098,7 +9098,7 @@ class Bi {
9098
9098
  };
9099
9099
  /** 初始化 stats.js 性能监视器,showStats 优先控制可视面板,旧配置 enablePerformanceMonitoring 继续兼容。 */
9100
9100
  initStatsMonitor() {
9101
- !(this.options.showStats ?? this.enablePerformanceMonitoring) || !this.container || (this.stats = new xt(), this.stats.showPanel(0), this.stats.dom.className = "engine-2d-stats-monitor", this.stats.dom.style.position = "absolute", this.stats.dom.style.top = "0px", this.stats.dom.style.left = "0px", this.stats.dom.style.zIndex = "1000", this.container.appendChild(this.stats.dom));
9101
+ !(this.options.showStats ?? this.enablePerformanceMonitoring) || !this.container || (this.stats = new wt(), this.stats.showPanel(0), this.stats.dom.className = "engine-2d-stats-monitor", this.stats.dom.style.position = "absolute", this.stats.dom.style.top = "0px", this.stats.dom.style.left = "0px", this.stats.dom.style.zIndex = "1000", this.container.appendChild(this.stats.dom));
9102
9102
  }
9103
9103
  /**
9104
9104
  * 更新性能统计
@@ -9317,11 +9317,11 @@ class Bi {
9317
9317
  console.log("[EngineKernel2d] Disposing engine..."), this.stopRendering(), this.cadCursorUI?.dispose(), this.contextMenuUI?.dispose(), this.loadingUI?.dispose(), this.workspaceTabsUI?.dispose(), this.versionEl?.parentElement?.removeChild(this.versionEl), this.searchManager?.dispose(), this.measure?.dispose(), this.markup?.dispose(), this.label?.dispose(), this.themeManager?.dispose(), this.loaderModule2d?.dispose(), this.controlModule2d?.dispose(), this.renderModule2d?.dispose(), this.cameraModule2d?.dispose(), this.sceneModule2d?.dispose(), this.events?.dispose(), this.stats?.dom?.parentElement && this.stats.dom.parentElement.removeChild(this.stats.dom), this.scene = null, this.camera = null, this.renderer = null, this.dwgData = null, this.stats = void 0, this.versionEl = null, console.log("[EngineKernel2d] Engine disposed");
9318
9318
  }
9319
9319
  }
9320
- function Ni(M) {
9321
- return new Bi(M);
9320
+ function Oi(M) {
9321
+ return new Ri(M);
9322
9322
  }
9323
9323
  export {
9324
- Bi as EngineKernel2d,
9325
- Ni as createEngine2d,
9326
- Ni as default
9324
+ Ri as EngineKernel2d,
9325
+ Oi as createEngine2d,
9326
+ Oi as default
9327
9327
  };