iflow-engine-base 3.9.20 → 3.9.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +118 -0
- package/dist/bim-engine-sdk.es.js +7 -7
- package/dist/bim-engine-sdk.umd.js +696 -696
- package/dist/chunks/{engine-2d-mQsokiAx.js → engine-2d-DAiE1uAy.js} +98 -85
- package/dist/chunks/{engine-3d-CeUaONqH.js → engine-3d-CdsLfd0i.js} +1124 -1113
- package/dist/chunks/{engine-720-BrYzIaAW.js → engine-720-K9uF9wMA.js} +40 -26
- package/dist/chunks/{engine-gaussian-BDphGvln.js → engine-gaussian-x3jsCp15.js} +141 -126
- package/dist/chunks/{engine-gis-nj5ISJb2.js → engine-gis-BStgPU0Q.js} +778 -578
- package/dist/chunks/{sdk-assets-F7qFhuao.js → sdk-assets-1SXx8Tbf.js} +1 -1
- package/dist/chunks/{sdk-runtime-DLvF5IZ2.js → sdk-runtime-cY1Wn7o-.js} +1554 -1350
- package/dist/index.d.ts +74 -1
- package/dist2d/dwg-preview.es.js +1075 -859
- package/dist2d/dwg-preview.umd.js +17 -17
- package/distGaussian/gaussian.es.js +396 -75
- package/distGaussian/gaussian.umd.js +1 -1
- package/package.json +1 -1
package/dist2d/dwg-preview.es.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import * as _ from "three";
|
|
2
|
-
import { Loader as
|
|
3
|
-
import * as
|
|
4
|
-
var
|
|
5
|
-
function
|
|
6
|
-
return
|
|
2
|
+
import { Loader as bt, FileLoader as wt, ShapePath as xt, Vector4 as ze, Vector3 as Fe, Curve as kt, BufferGeometry as Mt, BufferAttribute as _t } from "three";
|
|
3
|
+
import * as Et from "opentype.js";
|
|
4
|
+
var Ie = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
5
|
+
function lt(b) {
|
|
6
|
+
return b && b.__esModule && Object.prototype.hasOwnProperty.call(b, "default") ? b.default : b;
|
|
7
7
|
}
|
|
8
|
-
var
|
|
9
|
-
function
|
|
10
|
-
return
|
|
8
|
+
var De = { exports: {} }, Ct = De.exports, qe;
|
|
9
|
+
function St() {
|
|
10
|
+
return qe || (qe = 1, (function(b, e) {
|
|
11
11
|
(function(t, i) {
|
|
12
|
-
|
|
13
|
-
})(
|
|
12
|
+
b.exports = i();
|
|
13
|
+
})(Ct, function() {
|
|
14
14
|
var t = function() {
|
|
15
15
|
function i(d) {
|
|
16
16
|
return s.appendChild(d.dom), d;
|
|
@@ -40,20 +40,20 @@ function vt() {
|
|
|
40
40
|
}, domElement: s, setMode: n };
|
|
41
41
|
};
|
|
42
42
|
return t.Panel = function(i, n, r) {
|
|
43
|
-
var s = 1 / 0, o = 0, a = Math.round, l = a(window.devicePixelRatio || 1), c = 80 * l, f = 48 * l, p = 3 * l, d = 2 * l, y = 3 * l, h = 15 * l, g = 74 * l, v = 30 * l,
|
|
44
|
-
|
|
45
|
-
var
|
|
46
|
-
return
|
|
47
|
-
s = Math.min(s, S), o = Math.max(o, S),
|
|
43
|
+
var s = 1 / 0, o = 0, a = Math.round, l = a(window.devicePixelRatio || 1), c = 80 * l, f = 48 * l, p = 3 * l, d = 2 * l, y = 3 * l, h = 15 * l, g = 74 * l, v = 30 * l, w = document.createElement("canvas");
|
|
44
|
+
w.width = c, w.height = f, w.style.cssText = "width:80px;height:48px";
|
|
45
|
+
var M = w.getContext("2d");
|
|
46
|
+
return M.font = "bold " + 9 * l + "px Helvetica,Arial,sans-serif", M.textBaseline = "top", M.fillStyle = r, M.fillRect(0, 0, c, f), M.fillStyle = n, M.fillText(i, p, d), M.fillRect(y, h, g, v), M.fillStyle = r, M.globalAlpha = 0.9, M.fillRect(y, h, g, v), { dom: w, update: function(S, C) {
|
|
47
|
+
s = Math.min(s, S), o = Math.max(o, S), M.fillStyle = r, M.globalAlpha = 1, M.fillRect(0, 0, c, h), M.fillStyle = n, M.fillText(a(S) + " " + i + " (" + a(s) + "-" + a(o) + ")", p, d), M.drawImage(w, y + l, h, g - l, v, y, h, g - l, v), M.fillRect(y + g - l, h, l, v), M.fillStyle = r, M.globalAlpha = 0.9, M.fillRect(y + g - l, h, l, a((1 - S / C) * v));
|
|
48
48
|
} };
|
|
49
49
|
}, t;
|
|
50
50
|
});
|
|
51
|
-
})(
|
|
51
|
+
})(De)), De.exports;
|
|
52
52
|
}
|
|
53
|
-
var
|
|
54
|
-
const
|
|
55
|
-
var fe = /* @__PURE__ */ ((
|
|
56
|
-
class
|
|
53
|
+
var Tt = St();
|
|
54
|
+
const At = /* @__PURE__ */ lt(Tt);
|
|
55
|
+
var fe = /* @__PURE__ */ ((b) => (b.ModelLoadStart = "model-load-start", b.ModelLoadProgress = "model-load-progress", b.ModelLoaded = "model-loaded", b.ModelLoadError = "model-load-error", b.RenderStart = "render-start", b.RenderEnd = "render-end", b.CameraChanged = "camera-changed", b.CameraReset = "camera-reset", b.SelectionChanged = "selection-changed", b.HoverChanged = "hover-changed", b.EntityClick = "entity-click", b.LayerVisibilityChanged = "layer-visibility-changed", b.LayerColorChanged = "layer-color-changed", b.ViewZoomChanged = "view-zoom-changed", b.ViewPanChanged = "view-pan-changed", b.ToolActivated = "tool-activated", b.ToolDeactivated = "tool-deactivated", b.Error = "error", b.Warning = "warning", b))(fe || {});
|
|
56
|
+
class Lt {
|
|
57
57
|
listeners = /* @__PURE__ */ new Map();
|
|
58
58
|
onceListeners = /* @__PURE__ */ new Map();
|
|
59
59
|
debugMode = !1;
|
|
@@ -165,7 +165,7 @@ class xt {
|
|
|
165
165
|
this.removeAllListeners(), this.listeners.clear(), this.onceListeners.clear(), this.debugMode && console.log("[EventModule2d] Disposed");
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
|
-
const
|
|
168
|
+
const It = `
|
|
169
169
|
varying vec2 vWorldPos;
|
|
170
170
|
|
|
171
171
|
void main() {
|
|
@@ -173,7 +173,7 @@ const kt = `
|
|
|
173
173
|
vWorldPos = worldPosition.xy;
|
|
174
174
|
gl_Position = projectionMatrix * viewMatrix * worldPosition;
|
|
175
175
|
}
|
|
176
|
-
`,
|
|
176
|
+
`, Pt = `
|
|
177
177
|
precision highp float;
|
|
178
178
|
|
|
179
179
|
varying vec2 vWorldPos;
|
|
@@ -229,7 +229,7 @@ const kt = `
|
|
|
229
229
|
gl_FragColor = vec4(color, alpha);
|
|
230
230
|
}
|
|
231
231
|
`;
|
|
232
|
-
class
|
|
232
|
+
class Dt {
|
|
233
233
|
scene;
|
|
234
234
|
camera;
|
|
235
235
|
container;
|
|
@@ -282,8 +282,8 @@ class _t {
|
|
|
282
282
|
createGridMesh() {
|
|
283
283
|
this.gridGeometry = new _.PlaneGeometry(1, 1, 1, 1), this.gridMaterial = new _.ShaderMaterial({
|
|
284
284
|
uniforms: this.gridUniforms,
|
|
285
|
-
vertexShader:
|
|
286
|
-
fragmentShader:
|
|
285
|
+
vertexShader: It,
|
|
286
|
+
fragmentShader: Pt,
|
|
287
287
|
transparent: !0,
|
|
288
288
|
depthWrite: !1,
|
|
289
289
|
depthTest: !1,
|
|
@@ -329,8 +329,8 @@ class _t {
|
|
|
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
|
|
333
|
-
if (!(
|
|
332
|
+
const w = Math.abs(n - h.zoom) / Math.max(1e-4, h.zoom || 1) > 0.02, M = 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, D = Math.abs(a - h.viewHeight) > h.viewHeight * 0.01, U = t !== h.containerWidth || i !== h.containerHeight;
|
|
333
|
+
if (!(w || M || S || C || R || D || U))
|
|
334
334
|
return;
|
|
335
335
|
}
|
|
336
336
|
const g = o * this.coverageMultiplier, v = a * this.coverageMultiplier;
|
|
@@ -372,7 +372,7 @@ class _t {
|
|
|
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
|
|
375
|
+
class zt {
|
|
376
376
|
engine;
|
|
377
377
|
scene;
|
|
378
378
|
options;
|
|
@@ -405,7 +405,7 @@ class Et {
|
|
|
405
405
|
* 创建网格辅助(自适应网格)
|
|
406
406
|
*/
|
|
407
407
|
createGrid(e = 1e3, t = 50) {
|
|
408
|
-
this.adaptiveGrid && (this.adaptiveGrid.dispose(), this.adaptiveGrid = void 0), this.adaptiveGrid = new
|
|
408
|
+
this.adaptiveGrid && (this.adaptiveGrid.dispose(), this.adaptiveGrid = void 0), this.adaptiveGrid = new Dt(
|
|
409
409
|
this.scene,
|
|
410
410
|
this.engine.cameraModule2d.orthographicCamera,
|
|
411
411
|
this.engine.renderModule2d.container
|
|
@@ -507,7 +507,7 @@ class Et {
|
|
|
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
|
|
510
|
+
class Bt {
|
|
511
511
|
engine;
|
|
512
512
|
isFree;
|
|
513
513
|
// 高亮模型
|
|
@@ -523,7 +523,7 @@ class Ct {
|
|
|
523
523
|
this.engine = e, this.isFree = !0, this.highlightModels = [], this.hideModels = [], this.translucentModels = [], this.highlightHoverModels = [], this.models = [];
|
|
524
524
|
}
|
|
525
525
|
}
|
|
526
|
-
class
|
|
526
|
+
class Rt {
|
|
527
527
|
engine;
|
|
528
528
|
orthographicCamera;
|
|
529
529
|
container;
|
|
@@ -575,9 +575,9 @@ class St {
|
|
|
575
575
|
a.addVectors(r, s).multiplyScalar(0.5);
|
|
576
576
|
const l = new _.Vector3();
|
|
577
577
|
l.subVectors(s, r);
|
|
578
|
-
const f = Math.max(l.x, l.y) * t, p = this.container.clientWidth / this.container.clientHeight, d = f / 2, y = d * p, h = -y, g = y, v = d,
|
|
578
|
+
const f = Math.max(l.x, l.y) * t, p = this.container.clientWidth / this.container.clientHeight, d = f / 2, y = d * p, h = -y, g = y, v = d, w = -d, M = a.x, S = a.y, C = 1;
|
|
579
579
|
if (!i) {
|
|
580
|
-
this.orthographicCamera.left = h, this.orthographicCamera.right = g, this.orthographicCamera.top = v, this.orthographicCamera.bottom =
|
|
580
|
+
this.orthographicCamera.left = h, this.orthographicCamera.right = g, this.orthographicCamera.top = v, this.orthographicCamera.bottom = w, this.orthographicCamera.position.set(M, S, this.defaultPosition.z), this.orthographicCamera.zoom = C, this.orthographicCamera.updateProjectionMatrix(), this.engine.controlModule2d?.panControls && (this.engine.controlModule2d.panControls.setPosition(M, S), this.engine.controlModule2d.panControls.setZoom(C)), this.engine.events && this.engine.events.trigger("camera-changed", {
|
|
581
581
|
type: "fit-to-extents",
|
|
582
582
|
center: a,
|
|
583
583
|
size: l
|
|
@@ -596,8 +596,8 @@ class St {
|
|
|
596
596
|
left: h,
|
|
597
597
|
right: g,
|
|
598
598
|
top: v,
|
|
599
|
-
bottom:
|
|
600
|
-
x:
|
|
599
|
+
bottom: w,
|
|
600
|
+
x: M,
|
|
601
601
|
y: S,
|
|
602
602
|
zoom: C
|
|
603
603
|
}, this.animationDuration = n, this.animationStartTime = performance.now(), this.animateFitToExtents(a, l);
|
|
@@ -755,7 +755,7 @@ class St {
|
|
|
755
755
|
this.animationId !== null && (cancelAnimationFrame(this.animationId), this.animationId = null), this.orthographicCamera = null;
|
|
756
756
|
}
|
|
757
757
|
}
|
|
758
|
-
class
|
|
758
|
+
class Nt {
|
|
759
759
|
engine;
|
|
760
760
|
renderer;
|
|
761
761
|
container;
|
|
@@ -887,7 +887,7 @@ class Tt {
|
|
|
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
|
|
890
|
+
class Ot extends _.EventDispatcher {
|
|
891
891
|
object;
|
|
892
892
|
domElement;
|
|
893
893
|
enabled = !0;
|
|
@@ -1097,7 +1097,7 @@ class At 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
|
|
1100
|
+
class Vt {
|
|
1101
1101
|
engine;
|
|
1102
1102
|
panControls;
|
|
1103
1103
|
isActive = !0;
|
|
@@ -1114,7 +1114,7 @@ class Lt {
|
|
|
1114
1114
|
* 创建 2D 平移控制器
|
|
1115
1115
|
*/
|
|
1116
1116
|
createPanControls() {
|
|
1117
|
-
const e = new
|
|
1117
|
+
const e = new Ot(
|
|
1118
1118
|
this.engine.camera,
|
|
1119
1119
|
this.engine.renderer.domElement
|
|
1120
1120
|
);
|
|
@@ -1230,7 +1230,7 @@ class Lt {
|
|
|
1230
1230
|
this.panControls.dispose(), this.panControls = null;
|
|
1231
1231
|
}
|
|
1232
1232
|
}
|
|
1233
|
-
class
|
|
1233
|
+
class jt extends bt {
|
|
1234
1234
|
/**
|
|
1235
1235
|
* Constructs a new font loader.
|
|
1236
1236
|
*
|
|
@@ -1249,7 +1249,7 @@ class Pt extends ct {
|
|
|
1249
1249
|
* @param {onErrorCallback} onError - Executed when errors occur.
|
|
1250
1250
|
*/
|
|
1251
1251
|
load(e, t, i, n) {
|
|
1252
|
-
const r = this, s = new
|
|
1252
|
+
const r = this, s = new wt(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 ct {
|
|
|
1262
1262
|
* @return {Font} The font.
|
|
1263
1263
|
*/
|
|
1264
1264
|
parse(e) {
|
|
1265
|
-
return new
|
|
1265
|
+
return new Ut(e);
|
|
1266
1266
|
}
|
|
1267
1267
|
}
|
|
1268
|
-
class
|
|
1268
|
+
class Ut {
|
|
1269
1269
|
/**
|
|
1270
1270
|
* Constructs a new font.
|
|
1271
1271
|
*
|
|
@@ -1284,14 +1284,14 @@ class It {
|
|
|
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 =
|
|
1287
|
+
const n = [], r = Wt(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
|
|
1294
|
-
const n = Array.from(
|
|
1293
|
+
function Wt(b, e, t, i) {
|
|
1294
|
+
const n = Array.from(b), 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();
|
|
1297
1297
|
for (let c = 0; c < n.length; c++) {
|
|
@@ -1300,19 +1300,19 @@ function zt(M, e, t, i) {
|
|
|
1300
1300
|
`)
|
|
1301
1301
|
a = 0, l -= s;
|
|
1302
1302
|
else {
|
|
1303
|
-
const p =
|
|
1303
|
+
const p = Ft(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
|
|
1310
|
-
const r = n.glyphs[
|
|
1309
|
+
function Ft(b, e, t, i, n) {
|
|
1310
|
+
const r = n.glyphs[b] || n.glyphs["?"];
|
|
1311
1311
|
if (!r) {
|
|
1312
|
-
console.error('THREE.Font: character "' +
|
|
1312
|
+
console.error('THREE.Font: character "' + b + '" does not exists in font family ' + n.familyName + ".");
|
|
1313
1313
|
return;
|
|
1314
1314
|
}
|
|
1315
|
-
const s = new
|
|
1315
|
+
const s = new xt();
|
|
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,12 +1344,12 @@ class ce {
|
|
|
1344
1344
|
}
|
|
1345
1345
|
/** 从 ArrayBuffer 解析字体,生成 typeface.json。 */
|
|
1346
1346
|
static fromArrayBuffer(e, t) {
|
|
1347
|
-
const i =
|
|
1347
|
+
const i = Et.parse(e);
|
|
1348
1348
|
return ce._convert(i, t?.chars);
|
|
1349
1349
|
}
|
|
1350
1350
|
/** 将 typeface.json 转为 Three.js Font 对象,可直接用于文字几何。 */
|
|
1351
1351
|
static toThreeFont(e) {
|
|
1352
|
-
return new
|
|
1352
|
+
return new jt().parse(e);
|
|
1353
1353
|
}
|
|
1354
1354
|
static _convert(e, t) {
|
|
1355
1355
|
const i = {}, n = e.unitsPerEm, r = (f) => Math.round(f), s = (f) => {
|
|
@@ -1487,76 +1487,76 @@ class ce {
|
|
|
1487
1487
|
return i;
|
|
1488
1488
|
}
|
|
1489
1489
|
}
|
|
1490
|
-
const
|
|
1491
|
-
function
|
|
1490
|
+
const Ht = "__BIM_ENGINE_SDK_ASSET_BASE__", Gt = "https://unpkg.com/iflow-engine-base@3.9.20/dist/";
|
|
1491
|
+
function $t() {
|
|
1492
1492
|
return typeof globalThis < "u" ? globalThis : null;
|
|
1493
1493
|
}
|
|
1494
|
-
function
|
|
1495
|
-
return
|
|
1494
|
+
function $e(b) {
|
|
1495
|
+
return b.endsWith("/") ? b : `${b}/`;
|
|
1496
1496
|
}
|
|
1497
|
-
function
|
|
1498
|
-
return /^(?:[a-z][a-z\d+\-.]*:)?\/\//i.test(
|
|
1497
|
+
function ht(b) {
|
|
1498
|
+
return /^(?:[a-z][a-z\d+\-.]*:)?\/\//i.test(b) || /^(?:data|blob):/i.test(b);
|
|
1499
1499
|
}
|
|
1500
|
-
function
|
|
1501
|
-
return
|
|
1500
|
+
function Zt(b) {
|
|
1501
|
+
return b.startsWith("./") || b.startsWith("../");
|
|
1502
1502
|
}
|
|
1503
|
-
function
|
|
1503
|
+
function Be(b, e) {
|
|
1504
1504
|
try {
|
|
1505
|
-
return e ? new URL(
|
|
1505
|
+
return e ? new URL(b, e).toString() : new URL(b).toString();
|
|
1506
1506
|
} catch {
|
|
1507
1507
|
return null;
|
|
1508
1508
|
}
|
|
1509
1509
|
}
|
|
1510
|
-
function
|
|
1510
|
+
function ct() {
|
|
1511
1511
|
return typeof document < "u" && document.baseURI ? document.baseURI : typeof location < "u" && location.href ? location.href : null;
|
|
1512
1512
|
}
|
|
1513
|
-
function
|
|
1514
|
-
const t =
|
|
1515
|
-
if (
|
|
1513
|
+
function Yt(b, e) {
|
|
1514
|
+
const t = $e(b);
|
|
1515
|
+
if (ht(t))
|
|
1516
1516
|
return t;
|
|
1517
|
-
const i =
|
|
1518
|
-
return
|
|
1517
|
+
const i = Re(e) || Kt() || ct();
|
|
1518
|
+
return Be(t, i || void 0) || t;
|
|
1519
1519
|
}
|
|
1520
|
-
function
|
|
1521
|
-
if (!
|
|
1520
|
+
function Re(b) {
|
|
1521
|
+
if (!b)
|
|
1522
1522
|
return null;
|
|
1523
1523
|
try {
|
|
1524
|
-
const e =
|
|
1525
|
-
return n.endsWith("/chunks/") ? new URL("../", i).toString() : e && /\/src\//.test(n) ?
|
|
1524
|
+
const e = ct(), t = Be(b, e || void 0) || b, i = new URL(".", t), n = i.pathname.replace(/\\/g, "/");
|
|
1525
|
+
return n.endsWith("/chunks/") ? new URL("../", i).toString() : e && /\/src\//.test(n) ? $e(e) : i.toString();
|
|
1526
1526
|
} catch {
|
|
1527
1527
|
return null;
|
|
1528
1528
|
}
|
|
1529
1529
|
}
|
|
1530
|
-
function
|
|
1530
|
+
function Kt() {
|
|
1531
1531
|
if (typeof document > "u")
|
|
1532
1532
|
return null;
|
|
1533
|
-
const
|
|
1534
|
-
if (
|
|
1535
|
-
return
|
|
1533
|
+
const b = document.currentScript;
|
|
1534
|
+
if (b?.src)
|
|
1535
|
+
return Re(b.src);
|
|
1536
1536
|
const e = document.getElementsByTagName("script");
|
|
1537
1537
|
for (let t = e.length - 1; t >= 0; t -= 1) {
|
|
1538
1538
|
const i = e[t]?.src;
|
|
1539
1539
|
if (i && /(?:bim-engine-sdk|iflow-engine-base|dwg-preview|gaussian)\.(?:es|umd)\.js(?:[?#].*)?$/.test(i))
|
|
1540
|
-
return
|
|
1540
|
+
return Re(i);
|
|
1541
1541
|
}
|
|
1542
1542
|
return null;
|
|
1543
1543
|
}
|
|
1544
|
-
function
|
|
1545
|
-
const t =
|
|
1546
|
-
return typeof t == "string" && t.length > 0 ?
|
|
1544
|
+
function Xt(b) {
|
|
1545
|
+
const t = $t()?.[Ht];
|
|
1546
|
+
return typeof t == "string" && t.length > 0 ? Yt(t, b) : $e(Gt);
|
|
1547
1547
|
}
|
|
1548
|
-
function be(
|
|
1549
|
-
if (
|
|
1550
|
-
return
|
|
1551
|
-
if (
|
|
1552
|
-
const n =
|
|
1548
|
+
function be(b, e) {
|
|
1549
|
+
if (ht(b))
|
|
1550
|
+
return b;
|
|
1551
|
+
if (Zt(b)) {
|
|
1552
|
+
const n = Be(b, Re(e) || void 0);
|
|
1553
1553
|
if (n)
|
|
1554
1554
|
return n;
|
|
1555
1555
|
}
|
|
1556
|
-
const t =
|
|
1557
|
-
return
|
|
1556
|
+
const t = b.replace(/^\/+/, ""), i = Xt(e);
|
|
1557
|
+
return Be(t, i) || t;
|
|
1558
1558
|
}
|
|
1559
|
-
class
|
|
1559
|
+
class qt {
|
|
1560
1560
|
panel = null;
|
|
1561
1561
|
listEl = null;
|
|
1562
1562
|
isVisible = !1;
|
|
@@ -1703,14 +1703,14 @@ class Wt {
|
|
|
1703
1703
|
this.panel?.remove(), this.panel = null, this.listEl = null;
|
|
1704
1704
|
}
|
|
1705
1705
|
}
|
|
1706
|
-
class
|
|
1706
|
+
class dt {
|
|
1707
1707
|
engine;
|
|
1708
1708
|
layerMap = /* @__PURE__ */ new Map();
|
|
1709
1709
|
panelUI = null;
|
|
1710
1710
|
constructor(e) {
|
|
1711
1711
|
this.engine = e;
|
|
1712
1712
|
const t = document.getElementById(e?.options?.containerId ?? "") ?? e?.container ?? null;
|
|
1713
|
-
t && (this.panelUI = new
|
|
1713
|
+
t && (this.panelUI = new qt(t, this));
|
|
1714
1714
|
}
|
|
1715
1715
|
// ─── 数据 ──────────────────────────────────────────────
|
|
1716
1716
|
_loadLayers(e = this.engine.dwgData?.layers ?? []) {
|
|
@@ -1837,38 +1837,38 @@ class it {
|
|
|
1837
1837
|
this.panelUI?.dispose(), this.panelUI = null, this.layerMap.clear();
|
|
1838
1838
|
}
|
|
1839
1839
|
}
|
|
1840
|
-
function we(
|
|
1841
|
-
return Array.isArray(
|
|
1840
|
+
function we(b) {
|
|
1841
|
+
return Array.isArray(b) ? new _.Vector3(b[0] ?? 0, b[1] ?? 0, b[2] ?? 0) : new _.Vector3(b?.x ?? 0, b?.y ?? 0, b?.z ?? 0);
|
|
1842
1842
|
}
|
|
1843
|
-
function xe(
|
|
1844
|
-
return
|
|
1845
|
-
min:
|
|
1846
|
-
max:
|
|
1843
|
+
function xe(b) {
|
|
1844
|
+
return b ? (b.computeBoundingBox(), {
|
|
1845
|
+
min: b.boundingBox?.min.clone() ?? new _.Vector3(),
|
|
1846
|
+
max: b.boundingBox?.max.clone() ?? new _.Vector3()
|
|
1847
1847
|
}) : { min: new _.Vector3(), max: new _.Vector3() };
|
|
1848
1848
|
}
|
|
1849
|
-
function
|
|
1850
|
-
const i = new _.Vector3(
|
|
1849
|
+
function He(b, e, t) {
|
|
1850
|
+
const i = new _.Vector3(b[0] ?? 0, b[1] ?? 0, b[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);
|
|
1851
1851
|
return new _.Matrix4().compose(i, s, r);
|
|
1852
1852
|
}
|
|
1853
|
-
function
|
|
1854
|
-
return Array.isArray(
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1853
|
+
function Jt(b) {
|
|
1854
|
+
return Array.isArray(b?.transformMatrix) && b.transformMatrix.length === 16 ? new _.Matrix4().fromArray(b.transformMatrix) : He(
|
|
1855
|
+
b.position ?? [0, 0, 0],
|
|
1856
|
+
b.scale ?? [1, 1, 1],
|
|
1857
|
+
b.rotation ?? 0
|
|
1858
1858
|
);
|
|
1859
1859
|
}
|
|
1860
|
-
function
|
|
1861
|
-
if (
|
|
1860
|
+
function ut(b) {
|
|
1861
|
+
if (b.length === 0)
|
|
1862
1862
|
return { min: new _.Vector3(), max: new _.Vector3() };
|
|
1863
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);
|
|
1864
|
-
return
|
|
1864
|
+
return b.forEach((i) => {
|
|
1865
1865
|
e.x = Math.min(e.x, i.x), e.y = Math.min(e.y, i.y), e.z = Math.min(e.z, i.z), t.x = Math.max(t.x, i.x), t.y = Math.max(t.y, i.y), t.z = Math.max(t.z, i.z);
|
|
1866
1866
|
}), {
|
|
1867
1867
|
min: e,
|
|
1868
1868
|
max: t
|
|
1869
1869
|
};
|
|
1870
1870
|
}
|
|
1871
|
-
class
|
|
1871
|
+
class Je {
|
|
1872
1872
|
constructor(e) {
|
|
1873
1873
|
this.geometryFactory = e;
|
|
1874
1874
|
}
|
|
@@ -1912,7 +1912,7 @@ class Ge {
|
|
|
1912
1912
|
for (const n of e)
|
|
1913
1913
|
if (n?.visible !== !1) {
|
|
1914
1914
|
if (n.type === "INSERT") {
|
|
1915
|
-
const r = this.getBlockItems(n.blockId, i + 1), s = t.clone().multiply(
|
|
1915
|
+
const r = this.getBlockItems(n.blockId, i + 1), s = t.clone().multiply(Jt(n)), o = this.getClipPolygon(n, t);
|
|
1916
1916
|
for (const a of r) {
|
|
1917
1917
|
const l = this.cloneRenderItem(a, s, n), c = o ? this.clipRenderItem(l, o) : l;
|
|
1918
1918
|
c && (yield c);
|
|
@@ -2041,11 +2041,11 @@ class Ge {
|
|
|
2041
2041
|
}), f = r ? r.count : i.count;
|
|
2042
2042
|
for (let d = 0; d < f; d += 3) {
|
|
2043
2043
|
const y = r ? r.getX(d) : d, h = r ? r.getX(d + 1) : d + 1, g = r ? r.getX(d + 2) : d + 2, v = [c(y), c(h), c(g)];
|
|
2044
|
-
l.forEach((
|
|
2045
|
-
const
|
|
2046
|
-
if (!(
|
|
2047
|
-
for (let S = 1; S <
|
|
2048
|
-
[
|
|
2044
|
+
l.forEach((w) => {
|
|
2045
|
+
const M = this.clipTriangle(v, w);
|
|
2046
|
+
if (!(M.length < 3))
|
|
2047
|
+
for (let S = 1; S < M.length - 1; S += 1)
|
|
2048
|
+
[M[0], M[S], M[S + 1]].forEach((C) => {
|
|
2049
2049
|
s.push(C.position.x, C.position.y, C.position.z), a && C.uv && o.push(C.uv.x, C.uv.y);
|
|
2050
2050
|
});
|
|
2051
2051
|
});
|
|
@@ -2126,21 +2126,21 @@ class Ge {
|
|
|
2126
2126
|
};
|
|
2127
2127
|
}
|
|
2128
2128
|
}
|
|
2129
|
-
function
|
|
2130
|
-
throw new Error('Could not dynamically require "' +
|
|
2129
|
+
function Pe(b) {
|
|
2130
|
+
throw new Error('Could not dynamically require "' + b + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
2131
2131
|
}
|
|
2132
|
-
var
|
|
2133
|
-
var
|
|
2134
|
-
function
|
|
2135
|
-
return
|
|
2132
|
+
var je = { exports: {} };
|
|
2133
|
+
var Qe;
|
|
2134
|
+
function Qt() {
|
|
2135
|
+
return Qe || (Qe = 1, (function(b, e) {
|
|
2136
2136
|
(function(t) {
|
|
2137
|
-
|
|
2137
|
+
b.exports = t();
|
|
2138
2138
|
})(function() {
|
|
2139
2139
|
return (function t(i, n, r) {
|
|
2140
2140
|
function s(l, c) {
|
|
2141
2141
|
if (!n[l]) {
|
|
2142
2142
|
if (!i[l]) {
|
|
2143
|
-
var f = typeof
|
|
2143
|
+
var f = typeof Pe == "function" && Pe;
|
|
2144
2144
|
if (!c && f) return f(l, !0);
|
|
2145
2145
|
if (o) return o(l, !0);
|
|
2146
2146
|
var p = new Error("Cannot find module '" + l + "'");
|
|
@@ -2154,20 +2154,20 @@ function Gt() {
|
|
|
2154
2154
|
}
|
|
2155
2155
|
return n[l].exports;
|
|
2156
2156
|
}
|
|
2157
|
-
for (var o = typeof
|
|
2157
|
+
for (var o = typeof Pe == "function" && Pe, a = 0; a < r.length; a++) s(r[a]);
|
|
2158
2158
|
return s;
|
|
2159
2159
|
})({ 1: [function(t, i, n) {
|
|
2160
2160
|
var r = t("./utils"), s = t("./support"), o = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
|
2161
2161
|
n.encode = function(a) {
|
|
2162
|
-
for (var l, c, f, p, d, y, h, g = [], v = 0,
|
|
2162
|
+
for (var l, c, f, p, d, y, h, g = [], v = 0, w = a.length, M = w, S = r.getTypeOf(a) !== "string"; v < a.length; ) M = w - v, f = S ? (l = a[v++], c = v < w ? a[v++] : 0, v < w ? a[v++] : 0) : (l = a.charCodeAt(v++), c = v < w ? a.charCodeAt(v++) : 0, v < w ? a.charCodeAt(v++) : 0), p = l >> 2, d = (3 & l) << 4 | c >> 4, y = 1 < M ? (15 & c) << 2 | f >> 6 : 64, h = 2 < M ? 63 & f : 64, g.push(o.charAt(p) + o.charAt(d) + o.charAt(y) + o.charAt(h));
|
|
2163
2163
|
return g.join("");
|
|
2164
2164
|
}, n.decode = function(a) {
|
|
2165
2165
|
var l, c, f, p, d, y, h = 0, g = 0, v = "data:";
|
|
2166
2166
|
if (a.substr(0, v.length) === v) throw new Error("Invalid base64 input, it looks like a data url.");
|
|
2167
|
-
var
|
|
2168
|
-
if (a.charAt(a.length - 1) === o.charAt(64) &&
|
|
2169
|
-
for (
|
|
2170
|
-
return
|
|
2167
|
+
var w, M = 3 * (a = a.replace(/[^A-Za-z0-9+/=]/g, "")).length / 4;
|
|
2168
|
+
if (a.charAt(a.length - 1) === o.charAt(64) && M--, a.charAt(a.length - 2) === o.charAt(64) && M--, M % 1 != 0) throw new Error("Invalid base64 input, bad content length.");
|
|
2169
|
+
for (w = s.uint8array ? new Uint8Array(0 | M) : new Array(0 | M); h < a.length; ) l = o.indexOf(a.charAt(h++)) << 2 | (p = o.indexOf(a.charAt(h++))) >> 4, c = (15 & p) << 4 | (d = o.indexOf(a.charAt(h++))) >> 2, f = (3 & d) << 6 | (y = o.indexOf(a.charAt(h++))), w[g++] = l, d !== 64 && (w[g++] = c), y !== 64 && (w[g++] = f);
|
|
2170
|
+
return w;
|
|
2171
2171
|
};
|
|
2172
2172
|
}, { "./support": 30, "./utils": 32 }], 2: [function(t, i, n) {
|
|
2173
2173
|
var r = t("./external"), s = t("./stream/DataWorker"), o = t("./stream/Crc32Probe"), a = t("./stream/DataLengthProbe");
|
|
@@ -2246,21 +2246,21 @@ function Gt() {
|
|
|
2246
2246
|
for (h = 0; h < y; h++) g += String.fromCharCode(255 & d), d >>>= 8;
|
|
2247
2247
|
return g;
|
|
2248
2248
|
}
|
|
2249
|
-
function s(d, y, h, g, v,
|
|
2250
|
-
var
|
|
2251
|
-
y && !h || (
|
|
2252
|
-
var
|
|
2253
|
-
y && (
|
|
2254
|
-
var L = 0,
|
|
2255
|
-
te && (L |= 16), v === "UNIX" ? (
|
|
2249
|
+
function s(d, y, h, g, v, w) {
|
|
2250
|
+
var M, S, C = d.file, R = d.compression, D = w !== l.utf8encode, U = o.transformTo("string", w(C.name)), z = o.transformTo("string", l.utf8encode(C.name)), G = C.comment, q = o.transformTo("string", w(G)), E = o.transformTo("string", l.utf8encode(G)), B = z.length !== C.name.length, m = E.length !== G.length, O = "", ee = "", W = "", te = C.dir, F = C.date, Q = { crc32: 0, compressedSize: 0, uncompressedSize: 0 };
|
|
2251
|
+
y && !h || (Q.crc32 = d.crc32, Q.compressedSize = d.compressedSize, Q.uncompressedSize = d.uncompressedSize);
|
|
2252
|
+
var I = 0;
|
|
2253
|
+
y && (I |= 8), D || !B && !m || (I |= 2048);
|
|
2254
|
+
var L = 0, J = 0;
|
|
2255
|
+
te && (L |= 16), v === "UNIX" ? (J = 798, L |= (function(Z, ae) {
|
|
2256
2256
|
var ue = Z;
|
|
2257
2257
|
return Z || (ue = ae ? 16893 : 33204), (65535 & ue) << 16;
|
|
2258
|
-
})(C.unixPermissions, te)) : (
|
|
2258
|
+
})(C.unixPermissions, te)) : (J = 20, L |= (function(Z) {
|
|
2259
2259
|
return 63 & (Z || 0);
|
|
2260
|
-
})(C.dosPermissions)),
|
|
2260
|
+
})(C.dosPermissions)), M = F.getUTCHours(), M <<= 6, M |= F.getUTCMinutes(), M <<= 5, M |= 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) + z, O += "up" + r(ee.length, 2) + ee), m && (W = r(1, 1) + r(c(q), 4) + E, O += "uc" + r(W.length, 2) + W);
|
|
2261
2261
|
var Y = "";
|
|
2262
2262
|
return Y += `
|
|
2263
|
-
\0`, Y += r(
|
|
2263
|
+
\0`, Y += r(I, 2), Y += R.magic, Y += r(M, 2), Y += r(S, 2), Y += r(Q.crc32, 4), Y += r(Q.compressedSize, 4), Y += r(Q.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(J, 2) + Y + r(q.length, 2) + "\0\0\0\0" + r(L, 4) + r(g, 4) + U + O + q };
|
|
2264
2264
|
}
|
|
2265
2265
|
var o = t("../utils"), a = t("../stream/GenericWorker"), l = t("../utf8"), c = t("../crc32"), f = t("../signature");
|
|
2266
2266
|
function p(d, y, h, g) {
|
|
@@ -2286,9 +2286,9 @@ function Gt() {
|
|
|
2286
2286
|
this.currentFile = null;
|
|
2287
2287
|
}, p.prototype.flush = function() {
|
|
2288
2288
|
for (var d = this.bytesWritten, y = 0; y < this.dirRecords.length; y++) this.push({ data: this.dirRecords[y], meta: { percent: 100 } });
|
|
2289
|
-
var h = this.bytesWritten - d, g = (function(v,
|
|
2289
|
+
var h = this.bytesWritten - d, g = (function(v, w, M, S, C) {
|
|
2290
2290
|
var R = o.transformTo("string", C(S));
|
|
2291
|
-
return f.CENTRAL_DIRECTORY_END + "\0\0\0\0" + r(v, 2) + r(v, 2) + r(
|
|
2291
|
+
return f.CENTRAL_DIRECTORY_END + "\0\0\0\0" + r(v, 2) + r(v, 2) + r(w, 4) + r(M, 4) + r(R.length, 2) + R;
|
|
2292
2292
|
})(this.dirRecords.length, h, d, this.zipComment, this.encodeFileName);
|
|
2293
2293
|
this.push({ data: g, meta: { percent: 100 } });
|
|
2294
2294
|
}, p.prototype.prepareNextSource = function() {
|
|
@@ -2324,8 +2324,8 @@ function Gt() {
|
|
|
2324
2324
|
try {
|
|
2325
2325
|
o.forEach(function(p, d) {
|
|
2326
2326
|
f++;
|
|
2327
|
-
var y = (function(
|
|
2328
|
-
var S =
|
|
2327
|
+
var y = (function(w, M) {
|
|
2328
|
+
var S = w || M, C = r[S];
|
|
2329
2329
|
if (!C) throw new Error(S + " is not a valid compression method !");
|
|
2330
2330
|
return C;
|
|
2331
2331
|
})(d.options.compression, a.compression), h = d.options.compressionOptions || a.compressionOptions || {}, g = d.dir, v = d.date;
|
|
@@ -2368,12 +2368,12 @@ function Gt() {
|
|
|
2368
2368
|
return g.load(h), g;
|
|
2369
2369
|
}).then(function(h) {
|
|
2370
2370
|
var g = [s.Promise.resolve(h)], v = h.files;
|
|
2371
|
-
if (d.checkCRC32) for (var
|
|
2371
|
+
if (d.checkCRC32) for (var w = 0; w < v.length; w++) g.push(f(v[w]));
|
|
2372
2372
|
return s.Promise.all(g);
|
|
2373
2373
|
}).then(function(h) {
|
|
2374
|
-
for (var g = h.shift(), v = g.files,
|
|
2375
|
-
var
|
|
2376
|
-
y.file(C,
|
|
2374
|
+
for (var g = h.shift(), v = g.files, w = 0; w < v.length; w++) {
|
|
2375
|
+
var M = v[w], S = M.fileNameStr, C = r.resolve(M.fileNameStr);
|
|
2376
|
+
y.file(C, M.decompressed, { binary: !0, optimizedBinaryString: !0, date: M.date, dir: M.dir, comment: M.fileCommentStr.length ? M.fileCommentStr : null, unixPermissions: M.unixPermissions, dosPermissions: M.dosPermissions, createFolders: d.createFolders }), M.dir || (y.file(C).unsafeOriginalName = S);
|
|
2377
2377
|
}
|
|
2378
2378
|
return g.zipComment.length && (y.comment = g.zipComment), y;
|
|
2379
2379
|
});
|
|
@@ -2428,14 +2428,14 @@ function Gt() {
|
|
|
2428
2428
|
return r && typeof r.on == "function" && typeof r.pause == "function" && typeof r.resume == "function";
|
|
2429
2429
|
} };
|
|
2430
2430
|
}, {}], 15: [function(t, i, n) {
|
|
2431
|
-
function r(C, R,
|
|
2432
|
-
var U,
|
|
2433
|
-
|
|
2434
|
-
var q =
|
|
2435
|
-
|
|
2431
|
+
function r(C, R, D) {
|
|
2432
|
+
var U, z = o.getTypeOf(R), G = o.extend(D || {}, c);
|
|
2433
|
+
G.date = G.date || /* @__PURE__ */ new Date(), G.compression !== null && (G.compression = G.compression.toUpperCase()), typeof G.unixPermissions == "string" && (G.unixPermissions = parseInt(G.unixPermissions, 8)), G.unixPermissions && 16384 & G.unixPermissions && (G.dir = !0), G.dosPermissions && 16 & G.dosPermissions && (G.dir = !0), G.dir && (C = v(C)), G.createFolders && (U = g(C)) && w.call(this, U, !0);
|
|
2434
|
+
var q = z === "string" && G.binary === !1 && G.base64 === !1;
|
|
2435
|
+
D && D.binary !== void 0 || (G.binary = !q), (R instanceof f && R.uncompressedSize === 0 || G.dir || !R || R.length === 0) && (G.base64 = !1, G.binary = !0, R = "", G.compression = "STORE", z = "string");
|
|
2436
2436
|
var E = null;
|
|
2437
|
-
E = R instanceof f || R instanceof a ? R : y.isNode && y.isStream(R) ? new h(C, R) : o.prepareContent(C, R,
|
|
2438
|
-
var B = new p(C, E,
|
|
2437
|
+
E = R instanceof f || R instanceof a ? R : y.isNode && y.isStream(R) ? new h(C, R) : o.prepareContent(C, R, G.binary, G.optimizedBinaryString, G.base64);
|
|
2438
|
+
var B = new p(C, E, G);
|
|
2439
2439
|
this.files[C] = B;
|
|
2440
2440
|
}
|
|
2441
2441
|
var s = t("./utf8"), o = t("./utils"), a = t("./stream/GenericWorker"), l = t("./stream/StreamHelper"), c = t("./defaults"), f = t("./compressedObject"), p = t("./zipObject"), d = t("./generate"), y = t("./nodejsUtils"), h = t("./nodejs/NodejsStreamInputAdapter"), g = function(C) {
|
|
@@ -2444,60 +2444,60 @@ function Gt() {
|
|
|
2444
2444
|
return 0 < R ? C.substring(0, R) : "";
|
|
2445
2445
|
}, v = function(C) {
|
|
2446
2446
|
return C.slice(-1) !== "/" && (C += "/"), C;
|
|
2447
|
-
},
|
|
2447
|
+
}, w = function(C, R) {
|
|
2448
2448
|
return R = R !== void 0 ? R : c.createFolders, C = v(C), this.files[C] || r.call(this, C, null, { dir: !0, createFolders: R }), this.files[C];
|
|
2449
2449
|
};
|
|
2450
|
-
function
|
|
2450
|
+
function M(C) {
|
|
2451
2451
|
return Object.prototype.toString.call(C) === "[object RegExp]";
|
|
2452
2452
|
}
|
|
2453
2453
|
var S = { load: function() {
|
|
2454
2454
|
throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
2455
2455
|
}, forEach: function(C) {
|
|
2456
|
-
var R,
|
|
2457
|
-
for (R in this.files) U = this.files[R], (
|
|
2456
|
+
var R, D, U;
|
|
2457
|
+
for (R in this.files) U = this.files[R], (D = R.slice(this.root.length, R.length)) && R.slice(0, this.root.length) === this.root && C(D, U);
|
|
2458
2458
|
}, filter: function(C) {
|
|
2459
2459
|
var R = [];
|
|
2460
|
-
return this.forEach(function(
|
|
2461
|
-
C(
|
|
2460
|
+
return this.forEach(function(D, U) {
|
|
2461
|
+
C(D, U) && R.push(U);
|
|
2462
2462
|
}), R;
|
|
2463
|
-
}, file: function(C, R,
|
|
2464
|
-
if (arguments.length !== 1) return C = this.root + C, r.call(this, C, R,
|
|
2465
|
-
if (
|
|
2463
|
+
}, file: function(C, R, D) {
|
|
2464
|
+
if (arguments.length !== 1) return C = this.root + C, r.call(this, C, R, D), this;
|
|
2465
|
+
if (M(C)) {
|
|
2466
2466
|
var U = C;
|
|
2467
|
-
return this.filter(function(
|
|
2468
|
-
return !q.dir && U.test(
|
|
2467
|
+
return this.filter(function(G, q) {
|
|
2468
|
+
return !q.dir && U.test(G);
|
|
2469
2469
|
});
|
|
2470
2470
|
}
|
|
2471
|
-
var
|
|
2472
|
-
return
|
|
2471
|
+
var z = this.files[this.root + C];
|
|
2472
|
+
return z && !z.dir ? z : null;
|
|
2473
2473
|
}, folder: function(C) {
|
|
2474
2474
|
if (!C) return this;
|
|
2475
|
-
if (
|
|
2476
|
-
return
|
|
2475
|
+
if (M(C)) return this.filter(function(z, G) {
|
|
2476
|
+
return G.dir && C.test(z);
|
|
2477
2477
|
});
|
|
2478
|
-
var R = this.root + C,
|
|
2479
|
-
return U.root =
|
|
2478
|
+
var R = this.root + C, D = w.call(this, R), U = this.clone();
|
|
2479
|
+
return U.root = D.name, U;
|
|
2480
2480
|
}, remove: function(C) {
|
|
2481
2481
|
C = this.root + C;
|
|
2482
2482
|
var R = this.files[C];
|
|
2483
2483
|
if (R || (C.slice(-1) !== "/" && (C += "/"), R = this.files[C]), R && !R.dir) delete this.files[C];
|
|
2484
|
-
else for (var
|
|
2485
|
-
return
|
|
2486
|
-
}), U = 0; U <
|
|
2484
|
+
else for (var D = this.filter(function(z, G) {
|
|
2485
|
+
return G.name.slice(0, C.length) === C;
|
|
2486
|
+
}), U = 0; U < D.length; U++) delete this.files[D[U].name];
|
|
2487
2487
|
return this;
|
|
2488
2488
|
}, generate: function() {
|
|
2489
2489
|
throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
2490
2490
|
}, generateInternalStream: function(C) {
|
|
2491
|
-
var R,
|
|
2491
|
+
var R, D = {};
|
|
2492
2492
|
try {
|
|
2493
|
-
if ((
|
|
2494
|
-
o.checkSupport(
|
|
2495
|
-
var U =
|
|
2496
|
-
R = d.generateWorker(this,
|
|
2497
|
-
} catch (
|
|
2498
|
-
(R = new a("error")).error(
|
|
2493
|
+
if ((D = o.extend(C || {}, { streamFiles: !1, compression: "STORE", compressionOptions: null, type: "", platform: "DOS", comment: null, mimeType: "application/zip", encodeFileName: s.utf8encode })).type = D.type.toLowerCase(), D.compression = D.compression.toUpperCase(), D.type === "binarystring" && (D.type = "string"), !D.type) throw new Error("No output type specified.");
|
|
2494
|
+
o.checkSupport(D.type), D.platform !== "darwin" && D.platform !== "freebsd" && D.platform !== "linux" && D.platform !== "sunos" || (D.platform = "UNIX"), D.platform === "win32" && (D.platform = "DOS");
|
|
2495
|
+
var U = D.comment || this.comment || "";
|
|
2496
|
+
R = d.generateWorker(this, D, U);
|
|
2497
|
+
} catch (z) {
|
|
2498
|
+
(R = new a("error")).error(z);
|
|
2499
2499
|
}
|
|
2500
|
-
return new l(R,
|
|
2500
|
+
return new l(R, D.type || "string", D.mimeType);
|
|
2501
2501
|
}, generateAsync: function(C, R) {
|
|
2502
2502
|
return this.generateInternalStream(C).accumulate(R);
|
|
2503
2503
|
}, generateNodeStream: function(C, R) {
|
|
@@ -2722,44 +2722,44 @@ function Gt() {
|
|
|
2722
2722
|
}
|
|
2723
2723
|
function p(y, h) {
|
|
2724
2724
|
return new c.Promise(function(g, v) {
|
|
2725
|
-
var
|
|
2726
|
-
y.on("data", function(R,
|
|
2727
|
-
|
|
2725
|
+
var w = [], M = y._internalType, S = y._outputType, C = y._mimeType;
|
|
2726
|
+
y.on("data", function(R, D) {
|
|
2727
|
+
w.push(R), h && h(D);
|
|
2728
2728
|
}).on("error", function(R) {
|
|
2729
|
-
|
|
2729
|
+
w = [], v(R);
|
|
2730
2730
|
}).on("end", function() {
|
|
2731
2731
|
try {
|
|
2732
|
-
var R = (function(
|
|
2733
|
-
switch (
|
|
2732
|
+
var R = (function(D, U, z) {
|
|
2733
|
+
switch (D) {
|
|
2734
2734
|
case "blob":
|
|
2735
|
-
return r.newBlob(r.transformTo("arraybuffer", U),
|
|
2735
|
+
return r.newBlob(r.transformTo("arraybuffer", U), z);
|
|
2736
2736
|
case "base64":
|
|
2737
2737
|
return a.encode(U);
|
|
2738
2738
|
default:
|
|
2739
|
-
return r.transformTo(
|
|
2739
|
+
return r.transformTo(D, U);
|
|
2740
2740
|
}
|
|
2741
|
-
})(S, (function(
|
|
2742
|
-
var
|
|
2743
|
-
for (
|
|
2744
|
-
switch (
|
|
2741
|
+
})(S, (function(D, U) {
|
|
2742
|
+
var z, G = 0, q = null, E = 0;
|
|
2743
|
+
for (z = 0; z < U.length; z++) E += U[z].length;
|
|
2744
|
+
switch (D) {
|
|
2745
2745
|
case "string":
|
|
2746
2746
|
return U.join("");
|
|
2747
2747
|
case "array":
|
|
2748
2748
|
return Array.prototype.concat.apply([], U);
|
|
2749
2749
|
case "uint8array":
|
|
2750
|
-
for (q = new Uint8Array(E),
|
|
2750
|
+
for (q = new Uint8Array(E), z = 0; z < U.length; z++) q.set(U[z], G), G += U[z].length;
|
|
2751
2751
|
return q;
|
|
2752
2752
|
case "nodebuffer":
|
|
2753
2753
|
return Buffer.concat(U);
|
|
2754
2754
|
default:
|
|
2755
|
-
throw new Error("concat : unsupported type '" +
|
|
2755
|
+
throw new Error("concat : unsupported type '" + D + "'");
|
|
2756
2756
|
}
|
|
2757
|
-
})(
|
|
2757
|
+
})(M, w), C);
|
|
2758
2758
|
g(R);
|
|
2759
|
-
} catch (
|
|
2760
|
-
v(
|
|
2759
|
+
} catch (D) {
|
|
2760
|
+
v(D);
|
|
2761
2761
|
}
|
|
2762
|
-
|
|
2762
|
+
w = [];
|
|
2763
2763
|
}).resume();
|
|
2764
2764
|
});
|
|
2765
2765
|
}
|
|
@@ -2775,8 +2775,8 @@ function Gt() {
|
|
|
2775
2775
|
}
|
|
2776
2776
|
try {
|
|
2777
2777
|
this._internalType = v, this._outputType = h, this._mimeType = g, r.checkSupport(v), this._worker = y.pipe(new s(v)), y.lock();
|
|
2778
|
-
} catch (
|
|
2779
|
-
this._worker = new o("error"), this._worker.error(
|
|
2778
|
+
} catch (w) {
|
|
2779
|
+
this._worker = new o("error"), this._worker.error(w);
|
|
2780
2780
|
}
|
|
2781
2781
|
}
|
|
2782
2782
|
d.prototype = { accumulate: function(y) {
|
|
@@ -2827,19 +2827,19 @@ function Gt() {
|
|
|
2827
2827
|
}
|
|
2828
2828
|
n.utf8encode = function(d) {
|
|
2829
2829
|
return s.nodebuffer ? o.newBufferFrom(d, "utf-8") : (function(y) {
|
|
2830
|
-
var h, g, v,
|
|
2831
|
-
for (
|
|
2832
|
-
for (h = s.uint8array ? new Uint8Array(C) : new Array(C),
|
|
2830
|
+
var h, g, v, w, M, S = y.length, C = 0;
|
|
2831
|
+
for (w = 0; w < S; w++) (64512 & (g = y.charCodeAt(w))) == 55296 && w + 1 < S && (64512 & (v = y.charCodeAt(w + 1))) == 56320 && (g = 65536 + (g - 55296 << 10) + (v - 56320), w++), C += g < 128 ? 1 : g < 2048 ? 2 : g < 65536 ? 3 : 4;
|
|
2832
|
+
for (h = s.uint8array ? new Uint8Array(C) : new Array(C), w = M = 0; M < C; w++) (64512 & (g = y.charCodeAt(w))) == 55296 && w + 1 < S && (64512 & (v = y.charCodeAt(w + 1))) == 56320 && (g = 65536 + (g - 55296 << 10) + (v - 56320), w++), g < 128 ? h[M++] = g : (g < 2048 ? h[M++] = 192 | g >>> 6 : (g < 65536 ? h[M++] = 224 | g >>> 12 : (h[M++] = 240 | g >>> 18, h[M++] = 128 | g >>> 12 & 63), h[M++] = 128 | g >>> 6 & 63), h[M++] = 128 | 63 & g);
|
|
2833
2833
|
return h;
|
|
2834
2834
|
})(d);
|
|
2835
2835
|
}, n.utf8decode = function(d) {
|
|
2836
2836
|
return s.nodebuffer ? r.transformTo("nodebuffer", d).toString("utf-8") : (function(y) {
|
|
2837
|
-
var h, g, v,
|
|
2838
|
-
for (h = g = 0; h <
|
|
2839
|
-
else if (4 < (
|
|
2837
|
+
var h, g, v, w, M = y.length, S = new Array(2 * M);
|
|
2838
|
+
for (h = g = 0; h < M; ) if ((v = y[h++]) < 128) S[g++] = v;
|
|
2839
|
+
else if (4 < (w = l[v])) S[g++] = 65533, h += w - 1;
|
|
2840
2840
|
else {
|
|
2841
|
-
for (v &=
|
|
2842
|
-
1 <
|
|
2841
|
+
for (v &= w === 2 ? 31 : w === 3 ? 15 : 7; 1 < w && h < M; ) v = v << 6 | 63 & y[h++], w--;
|
|
2842
|
+
1 < w ? S[g++] = 65533 : v < 65536 ? S[g++] = v : (v -= 65536, S[g++] = 55296 | v >> 10 & 1023, S[g++] = 56320 | 1023 & v);
|
|
2843
2843
|
}
|
|
2844
2844
|
return S.length !== g && (S.subarray ? S = S.subarray(0, g) : S.length = g), r.applyFromCharCode(S);
|
|
2845
2845
|
})(d = r.transformTo(s.uint8array ? "uint8array" : "array", d));
|
|
@@ -2852,10 +2852,10 @@ function Gt() {
|
|
|
2852
2852
|
} else y = this.leftOver.concat(y);
|
|
2853
2853
|
this.leftOver = null;
|
|
2854
2854
|
}
|
|
2855
|
-
var g = (function(
|
|
2855
|
+
var g = (function(w, M) {
|
|
2856
2856
|
var S;
|
|
2857
|
-
for ((
|
|
2858
|
-
return S < 0 || S === 0 ?
|
|
2857
|
+
for ((M = M || w.length) > w.length && (M = w.length), S = M - 1; 0 <= S && (192 & w[S]) == 128; ) S--;
|
|
2858
|
+
return S < 0 || S === 0 ? M : S + l[w[S]] > M ? S : M;
|
|
2859
2859
|
})(y), v = y;
|
|
2860
2860
|
g !== y.length && (s.uint8array ? (v = y.subarray(0, g), this.leftOver = y.subarray(g, y.length)) : (v = y.slice(0, g), this.leftOver = y.slice(g, y.length))), this.push({ data: n.utf8decode(v), meta: d.meta });
|
|
2861
2861
|
}, f.prototype.flush = function() {
|
|
@@ -2886,10 +2886,10 @@ function Gt() {
|
|
|
2886
2886
|
}
|
|
2887
2887
|
};
|
|
2888
2888
|
var f = { stringifyByChunk: function(h, g, v) {
|
|
2889
|
-
var
|
|
2889
|
+
var w = [], M = 0, S = h.length;
|
|
2890
2890
|
if (S <= v) return String.fromCharCode.apply(null, h);
|
|
2891
|
-
for (;
|
|
2892
|
-
return
|
|
2891
|
+
for (; M < S; ) g === "array" || g === "nodebuffer" ? w.push(String.fromCharCode.apply(null, h.slice(M, Math.min(M + v, S)))) : w.push(String.fromCharCode.apply(null, h.subarray(M, Math.min(M + v, S)))), M += v;
|
|
2892
|
+
return w.join("");
|
|
2893
2893
|
}, stringifyByChar: function(h) {
|
|
2894
2894
|
for (var g = "", v = 0; v < h.length; v++) g += String.fromCharCode(h[v]);
|
|
2895
2895
|
return g;
|
|
@@ -2907,8 +2907,8 @@ function Gt() {
|
|
|
2907
2907
|
}
|
|
2908
2908
|
})() } };
|
|
2909
2909
|
function p(h) {
|
|
2910
|
-
var g = 65536, v = n.getTypeOf(h),
|
|
2911
|
-
if (v === "uint8array" ?
|
|
2910
|
+
var g = 65536, v = n.getTypeOf(h), w = !0;
|
|
2911
|
+
if (v === "uint8array" ? w = f.applyCanBeUsed.uint8array : v === "nodebuffer" && (w = f.applyCanBeUsed.nodebuffer), w) for (; 1 < g; ) try {
|
|
2912
2912
|
return f.stringifyByChunk(h, v, g);
|
|
2913
2913
|
} catch {
|
|
2914
2914
|
g = Math.floor(g / 2);
|
|
@@ -2961,9 +2961,9 @@ function Gt() {
|
|
|
2961
2961
|
var v = n.getTypeOf(g);
|
|
2962
2962
|
return y[v][h](g);
|
|
2963
2963
|
}, n.resolve = function(h) {
|
|
2964
|
-
for (var g = h.split("/"), v = [],
|
|
2965
|
-
var
|
|
2966
|
-
|
|
2964
|
+
for (var g = h.split("/"), v = [], w = 0; w < g.length; w++) {
|
|
2965
|
+
var M = g[w];
|
|
2966
|
+
M === "." || M === "" && w !== 0 && w !== g.length - 1 || (M === ".." ? v.pop() : v.push(M));
|
|
2967
2967
|
}
|
|
2968
2968
|
return v.join("/");
|
|
2969
2969
|
}, n.getTypeOf = function(h) {
|
|
@@ -2971,9 +2971,9 @@ function Gt() {
|
|
|
2971
2971
|
}, n.checkSupport = function(h) {
|
|
2972
2972
|
if (!r[h.toLowerCase()]) throw new Error(h + " is not supported by this platform");
|
|
2973
2973
|
}, n.MAX_VALUE_16BITS = 65535, n.MAX_VALUE_32BITS = -1, n.pretty = function(h) {
|
|
2974
|
-
var g, v,
|
|
2975
|
-
for (v = 0; v < (h || "").length; v++)
|
|
2976
|
-
return
|
|
2974
|
+
var g, v, w = "";
|
|
2975
|
+
for (v = 0; v < (h || "").length; v++) w += "\\x" + ((g = h.charCodeAt(v)) < 16 ? "0" : "") + g.toString(16).toUpperCase();
|
|
2976
|
+
return w;
|
|
2977
2977
|
}, n.delay = function(h, g, v) {
|
|
2978
2978
|
setImmediate(function() {
|
|
2979
2979
|
h.apply(v || null, g || []);
|
|
@@ -2986,19 +2986,19 @@ function Gt() {
|
|
|
2986
2986
|
var h, g, v = {};
|
|
2987
2987
|
for (h = 0; h < arguments.length; h++) for (g in arguments[h]) Object.prototype.hasOwnProperty.call(arguments[h], g) && v[g] === void 0 && (v[g] = arguments[h][g]);
|
|
2988
2988
|
return v;
|
|
2989
|
-
}, n.prepareContent = function(h, g, v,
|
|
2989
|
+
}, n.prepareContent = function(h, g, v, w, M) {
|
|
2990
2990
|
return a.Promise.resolve(g).then(function(S) {
|
|
2991
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) {
|
|
2992
|
-
var
|
|
2993
|
-
|
|
2992
|
+
var D = new FileReader();
|
|
2993
|
+
D.onload = function(U) {
|
|
2994
2994
|
C(U.target.result);
|
|
2995
|
-
},
|
|
2995
|
+
}, D.onerror = function(U) {
|
|
2996
2996
|
R(U.target.error);
|
|
2997
|
-
},
|
|
2997
|
+
}, D.readAsArrayBuffer(S);
|
|
2998
2998
|
}) : S;
|
|
2999
2999
|
}).then(function(S) {
|
|
3000
3000
|
var C = n.getTypeOf(S);
|
|
3001
|
-
return C ? (C === "arraybuffer" ? S = n.transformTo("uint8array", S) : C === "string" && (
|
|
3001
|
+
return C ? (C === "arraybuffer" ? S = n.transformTo("uint8array", S) : C === "string" && (M ? S = s.decode(S) : v && w !== !0 && (S = (function(R) {
|
|
3002
3002
|
return c(R, r.uint8array ? new Uint8Array(R.length) : new Array(R.length));
|
|
3003
3003
|
})(S))), S) : a.Promise.reject(new Error("Can't read the data of '" + h + "'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"));
|
|
3004
3004
|
});
|
|
@@ -3133,10 +3133,10 @@ function Gt() {
|
|
|
3133
3133
|
if (!y) throw new Error("No output type specified.");
|
|
3134
3134
|
var v = (g = y.toLowerCase()) === "string" || g === "text";
|
|
3135
3135
|
g !== "binarystring" && g !== "text" || (g = "string"), h = this._decompressWorker();
|
|
3136
|
-
var
|
|
3137
|
-
|
|
3138
|
-
} catch (
|
|
3139
|
-
(h = new c("error")).error(
|
|
3136
|
+
var w = !this._dataBinary;
|
|
3137
|
+
w && !v && (h = h.pipe(new a.Utf8EncodeWorker())), !w && v && (h = h.pipe(new a.Utf8DecodeWorker()));
|
|
3138
|
+
} catch (M) {
|
|
3139
|
+
(h = new c("error")).error(M);
|
|
3140
3140
|
}
|
|
3141
3141
|
return new s(h, g, "");
|
|
3142
3142
|
}, async: function(y, h) {
|
|
@@ -3189,7 +3189,7 @@ function Gt() {
|
|
|
3189
3189
|
i.exports = function(h) {
|
|
3190
3190
|
d.push(h) !== 1 || o || s();
|
|
3191
3191
|
};
|
|
3192
|
-
}).call(this, typeof
|
|
3192
|
+
}).call(this, typeof Ie < "u" ? Ie : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
3193
3193
|
}, {}], 37: [function(t, i, n) {
|
|
3194
3194
|
var r = t("immediate");
|
|
3195
3195
|
function s() {
|
|
@@ -3199,14 +3199,14 @@ function Gt() {
|
|
|
3199
3199
|
if (typeof v != "function") throw new TypeError("resolver must be a function");
|
|
3200
3200
|
this.state = c, this.queue = [], this.outcome = void 0, v !== s && h(this, v);
|
|
3201
3201
|
}
|
|
3202
|
-
function p(v,
|
|
3203
|
-
this.promise = v, typeof
|
|
3202
|
+
function p(v, w, M) {
|
|
3203
|
+
this.promise = v, typeof w == "function" && (this.onFulfilled = w, this.callFulfilled = this.otherCallFulfilled), typeof M == "function" && (this.onRejected = M, this.callRejected = this.otherCallRejected);
|
|
3204
3204
|
}
|
|
3205
|
-
function d(v,
|
|
3205
|
+
function d(v, w, M) {
|
|
3206
3206
|
r(function() {
|
|
3207
3207
|
var S;
|
|
3208
3208
|
try {
|
|
3209
|
-
S =
|
|
3209
|
+
S = w(M);
|
|
3210
3210
|
} catch (C) {
|
|
3211
3211
|
return o.reject(v, C);
|
|
3212
3212
|
}
|
|
@@ -3214,51 +3214,51 @@ function Gt() {
|
|
|
3214
3214
|
});
|
|
3215
3215
|
}
|
|
3216
3216
|
function y(v) {
|
|
3217
|
-
var
|
|
3218
|
-
if (v && (typeof v == "object" || typeof v == "function") && typeof
|
|
3219
|
-
|
|
3217
|
+
var w = v && v.then;
|
|
3218
|
+
if (v && (typeof v == "object" || typeof v == "function") && typeof w == "function") return function() {
|
|
3219
|
+
w.apply(v, arguments);
|
|
3220
3220
|
};
|
|
3221
3221
|
}
|
|
3222
|
-
function h(v,
|
|
3223
|
-
var
|
|
3224
|
-
function S(
|
|
3225
|
-
|
|
3222
|
+
function h(v, w) {
|
|
3223
|
+
var M = !1;
|
|
3224
|
+
function S(D) {
|
|
3225
|
+
M || (M = !0, o.reject(v, D));
|
|
3226
3226
|
}
|
|
3227
|
-
function C(
|
|
3228
|
-
|
|
3227
|
+
function C(D) {
|
|
3228
|
+
M || (M = !0, o.resolve(v, D));
|
|
3229
3229
|
}
|
|
3230
3230
|
var R = g(function() {
|
|
3231
|
-
|
|
3231
|
+
w(C, S);
|
|
3232
3232
|
});
|
|
3233
3233
|
R.status === "error" && S(R.value);
|
|
3234
3234
|
}
|
|
3235
|
-
function g(v,
|
|
3236
|
-
var
|
|
3235
|
+
function g(v, w) {
|
|
3236
|
+
var M = {};
|
|
3237
3237
|
try {
|
|
3238
|
-
|
|
3238
|
+
M.value = v(w), M.status = "success";
|
|
3239
3239
|
} catch (S) {
|
|
3240
|
-
|
|
3240
|
+
M.status = "error", M.value = S;
|
|
3241
3241
|
}
|
|
3242
|
-
return
|
|
3242
|
+
return M;
|
|
3243
3243
|
}
|
|
3244
3244
|
(i.exports = f).prototype.finally = function(v) {
|
|
3245
3245
|
if (typeof v != "function") return this;
|
|
3246
|
-
var
|
|
3247
|
-
return this.then(function(
|
|
3248
|
-
return
|
|
3249
|
-
return
|
|
3246
|
+
var w = this.constructor;
|
|
3247
|
+
return this.then(function(M) {
|
|
3248
|
+
return w.resolve(v()).then(function() {
|
|
3249
|
+
return M;
|
|
3250
3250
|
});
|
|
3251
|
-
}, function(
|
|
3252
|
-
return
|
|
3253
|
-
throw
|
|
3251
|
+
}, function(M) {
|
|
3252
|
+
return w.resolve(v()).then(function() {
|
|
3253
|
+
throw M;
|
|
3254
3254
|
});
|
|
3255
3255
|
});
|
|
3256
3256
|
}, f.prototype.catch = function(v) {
|
|
3257
3257
|
return this.then(null, v);
|
|
3258
|
-
}, f.prototype.then = function(v,
|
|
3259
|
-
if (typeof v != "function" && this.state === l || typeof
|
|
3260
|
-
var
|
|
3261
|
-
return this.state !== c ? d(
|
|
3258
|
+
}, f.prototype.then = function(v, w) {
|
|
3259
|
+
if (typeof v != "function" && this.state === l || typeof w != "function" && this.state === a) return this;
|
|
3260
|
+
var M = new this.constructor(s);
|
|
3261
|
+
return this.state !== c ? d(M, this.state === l ? v : w, this.outcome) : this.queue.push(new p(M, v, w)), M;
|
|
3262
3262
|
}, p.prototype.callFulfilled = function(v) {
|
|
3263
3263
|
o.resolve(this.promise, v);
|
|
3264
3264
|
}, p.prototype.otherCallFulfilled = function(v) {
|
|
@@ -3267,50 +3267,50 @@ function Gt() {
|
|
|
3267
3267
|
o.reject(this.promise, v);
|
|
3268
3268
|
}, p.prototype.otherCallRejected = function(v) {
|
|
3269
3269
|
d(this.promise, this.onRejected, v);
|
|
3270
|
-
}, o.resolve = function(v,
|
|
3271
|
-
var
|
|
3272
|
-
if (
|
|
3273
|
-
var S =
|
|
3270
|
+
}, o.resolve = function(v, w) {
|
|
3271
|
+
var M = g(y, w);
|
|
3272
|
+
if (M.status === "error") return o.reject(v, M.value);
|
|
3273
|
+
var S = M.value;
|
|
3274
3274
|
if (S) h(v, S);
|
|
3275
3275
|
else {
|
|
3276
|
-
v.state = l, v.outcome =
|
|
3277
|
-
for (var C = -1, R = v.queue.length; ++C < R; ) v.queue[C].callFulfilled(
|
|
3276
|
+
v.state = l, v.outcome = w;
|
|
3277
|
+
for (var C = -1, R = v.queue.length; ++C < R; ) v.queue[C].callFulfilled(w);
|
|
3278
3278
|
}
|
|
3279
3279
|
return v;
|
|
3280
|
-
}, o.reject = function(v,
|
|
3281
|
-
v.state = a, v.outcome =
|
|
3282
|
-
for (var
|
|
3280
|
+
}, o.reject = function(v, w) {
|
|
3281
|
+
v.state = a, v.outcome = w;
|
|
3282
|
+
for (var M = -1, S = v.queue.length; ++M < S; ) v.queue[M].callRejected(w);
|
|
3283
3283
|
return v;
|
|
3284
3284
|
}, f.resolve = function(v) {
|
|
3285
3285
|
return v instanceof this ? v : o.resolve(new this(s), v);
|
|
3286
3286
|
}, f.reject = function(v) {
|
|
3287
|
-
var
|
|
3288
|
-
return o.reject(
|
|
3287
|
+
var w = new this(s);
|
|
3288
|
+
return o.reject(w, v);
|
|
3289
3289
|
}, f.all = function(v) {
|
|
3290
|
-
var
|
|
3290
|
+
var w = this;
|
|
3291
3291
|
if (Object.prototype.toString.call(v) !== "[object Array]") return this.reject(new TypeError("must be an array"));
|
|
3292
|
-
var
|
|
3293
|
-
if (!
|
|
3294
|
-
for (var C = new Array(
|
|
3292
|
+
var M = v.length, S = !1;
|
|
3293
|
+
if (!M) return this.resolve([]);
|
|
3294
|
+
for (var C = new Array(M), R = 0, D = -1, U = new this(s); ++D < M; ) z(v[D], D);
|
|
3295
3295
|
return U;
|
|
3296
|
-
function
|
|
3297
|
-
|
|
3298
|
-
C[q] = E, ++R !==
|
|
3296
|
+
function z(G, q) {
|
|
3297
|
+
w.resolve(G).then(function(E) {
|
|
3298
|
+
C[q] = E, ++R !== M || S || (S = !0, o.resolve(U, C));
|
|
3299
3299
|
}, function(E) {
|
|
3300
3300
|
S || (S = !0, o.reject(U, E));
|
|
3301
3301
|
});
|
|
3302
3302
|
}
|
|
3303
3303
|
}, f.race = function(v) {
|
|
3304
|
-
var
|
|
3304
|
+
var w = this;
|
|
3305
3305
|
if (Object.prototype.toString.call(v) !== "[object Array]") return this.reject(new TypeError("must be an array"));
|
|
3306
|
-
var
|
|
3307
|
-
if (!
|
|
3308
|
-
for (var C = -1, R = new this(s); ++C <
|
|
3306
|
+
var M = v.length, S = !1;
|
|
3307
|
+
if (!M) return this.resolve([]);
|
|
3308
|
+
for (var C = -1, R = new this(s); ++C < M; ) D = v[C], w.resolve(D).then(function(U) {
|
|
3309
3309
|
S || (S = !0, o.resolve(R, U));
|
|
3310
3310
|
}, function(U) {
|
|
3311
3311
|
S || (S = !0, o.reject(R, U));
|
|
3312
3312
|
});
|
|
3313
|
-
var
|
|
3313
|
+
var D;
|
|
3314
3314
|
return R;
|
|
3315
3315
|
};
|
|
3316
3316
|
}, { immediate: 36 }], 38: [function(t, i, n) {
|
|
@@ -3321,38 +3321,38 @@ function Gt() {
|
|
|
3321
3321
|
function h(v) {
|
|
3322
3322
|
if (!(this instanceof h)) return new h(v);
|
|
3323
3323
|
this.options = s.assign({ level: p, method: y, chunkSize: 16384, windowBits: 15, memLevel: 8, strategy: d, to: "" }, v || {});
|
|
3324
|
-
var
|
|
3325
|
-
|
|
3326
|
-
var
|
|
3327
|
-
if (
|
|
3328
|
-
if (
|
|
3324
|
+
var w = this.options;
|
|
3325
|
+
w.raw && 0 < w.windowBits ? w.windowBits = -w.windowBits : w.gzip && 0 < w.windowBits && w.windowBits < 16 && (w.windowBits += 16), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new l(), this.strm.avail_out = 0;
|
|
3326
|
+
var M = r.deflateInit2(this.strm, w.level, w.method, w.windowBits, w.memLevel, w.strategy);
|
|
3327
|
+
if (M !== f) throw new Error(a[M]);
|
|
3328
|
+
if (w.header && r.deflateSetHeader(this.strm, w.header), w.dictionary) {
|
|
3329
3329
|
var S;
|
|
3330
|
-
if (S = typeof
|
|
3330
|
+
if (S = typeof w.dictionary == "string" ? o.string2buf(w.dictionary) : c.call(w.dictionary) === "[object ArrayBuffer]" ? new Uint8Array(w.dictionary) : w.dictionary, (M = r.deflateSetDictionary(this.strm, S)) !== f) throw new Error(a[M]);
|
|
3331
3331
|
this._dict_set = !0;
|
|
3332
3332
|
}
|
|
3333
3333
|
}
|
|
3334
|
-
function g(v,
|
|
3335
|
-
var
|
|
3336
|
-
if (
|
|
3337
|
-
return
|
|
3334
|
+
function g(v, w) {
|
|
3335
|
+
var M = new h(w);
|
|
3336
|
+
if (M.push(v, !0), M.err) throw M.msg || a[M.err];
|
|
3337
|
+
return M.result;
|
|
3338
3338
|
}
|
|
3339
|
-
h.prototype.push = function(v,
|
|
3340
|
-
var
|
|
3339
|
+
h.prototype.push = function(v, w) {
|
|
3340
|
+
var M, S, C = this.strm, R = this.options.chunkSize;
|
|
3341
3341
|
if (this.ended) return !1;
|
|
3342
|
-
S =
|
|
3342
|
+
S = w === ~~w ? w : w === !0 ? 4 : 0, typeof v == "string" ? C.input = o.string2buf(v) : c.call(v) === "[object ArrayBuffer]" ? C.input = new Uint8Array(v) : C.input = v, C.next_in = 0, C.avail_in = C.input.length;
|
|
3343
3343
|
do {
|
|
3344
|
-
if (C.avail_out === 0 && (C.output = new s.Buf8(R), C.next_out = 0, C.avail_out = R), (
|
|
3344
|
+
if (C.avail_out === 0 && (C.output = new s.Buf8(R), C.next_out = 0, C.avail_out = R), (M = r.deflate(C, S)) !== 1 && M !== f) return this.onEnd(M), !(this.ended = !0);
|
|
3345
3345
|
C.avail_out !== 0 && (C.avail_in !== 0 || S !== 4 && S !== 2) || (this.options.to === "string" ? this.onData(o.buf2binstring(s.shrinkBuf(C.output, C.next_out))) : this.onData(s.shrinkBuf(C.output, C.next_out)));
|
|
3346
|
-
} while ((0 < C.avail_in || C.avail_out === 0) &&
|
|
3347
|
-
return S === 4 ? (
|
|
3346
|
+
} while ((0 < C.avail_in || C.avail_out === 0) && M !== 1);
|
|
3347
|
+
return S === 4 ? (M = r.deflateEnd(this.strm), this.onEnd(M), this.ended = !0, M === f) : S !== 2 || (this.onEnd(f), !(C.avail_out = 0));
|
|
3348
3348
|
}, h.prototype.onData = function(v) {
|
|
3349
3349
|
this.chunks.push(v);
|
|
3350
3350
|
}, h.prototype.onEnd = function(v) {
|
|
3351
3351
|
v === f && (this.options.to === "string" ? this.result = this.chunks.join("") : this.result = s.flattenChunks(this.chunks)), this.chunks = [], this.err = v, this.msg = this.strm.msg;
|
|
3352
|
-
}, n.Deflate = h, n.deflate = g, n.deflateRaw = function(v,
|
|
3353
|
-
return (
|
|
3354
|
-
}, n.gzip = function(v,
|
|
3355
|
-
return (
|
|
3352
|
+
}, n.Deflate = h, n.deflate = g, n.deflateRaw = function(v, w) {
|
|
3353
|
+
return (w = w || {}).raw = !0, g(v, w);
|
|
3354
|
+
}, n.gzip = function(v, w) {
|
|
3355
|
+
return (w = w || {}).gzip = !0, g(v, w);
|
|
3356
3356
|
};
|
|
3357
3357
|
}, { "./utils/common": 41, "./utils/strings": 42, "./zlib/deflate": 46, "./zlib/messages": 51, "./zlib/zstream": 53 }], 40: [function(t, i, n) {
|
|
3358
3358
|
var r = t("./zlib/inflate"), s = t("./utils/common"), o = t("./utils/strings"), a = t("./zlib/constants"), l = t("./zlib/messages"), c = t("./zlib/zstream"), f = t("./zlib/gzheader"), p = Object.prototype.toString;
|
|
@@ -3371,14 +3371,14 @@ function Gt() {
|
|
|
3371
3371
|
return v.result;
|
|
3372
3372
|
}
|
|
3373
3373
|
d.prototype.push = function(h, g) {
|
|
3374
|
-
var v,
|
|
3374
|
+
var v, w, M, S, C, R, D = this.strm, U = this.options.chunkSize, z = this.options.dictionary, G = !1;
|
|
3375
3375
|
if (this.ended) return !1;
|
|
3376
|
-
|
|
3376
|
+
w = g === ~~g ? g : g === !0 ? a.Z_FINISH : a.Z_NO_FLUSH, typeof h == "string" ? D.input = o.binstring2buf(h) : p.call(h) === "[object ArrayBuffer]" ? D.input = new Uint8Array(h) : D.input = h, D.next_in = 0, D.avail_in = D.input.length;
|
|
3377
3377
|
do {
|
|
3378
|
-
if (
|
|
3379
|
-
|
|
3380
|
-
} while ((0 <
|
|
3381
|
-
return v === a.Z_STREAM_END && (
|
|
3378
|
+
if (D.avail_out === 0 && (D.output = new s.Buf8(U), D.next_out = 0, D.avail_out = U), (v = r.inflate(D, a.Z_NO_FLUSH)) === a.Z_NEED_DICT && z && (R = typeof z == "string" ? o.string2buf(z) : p.call(z) === "[object ArrayBuffer]" ? new Uint8Array(z) : z, v = r.inflateSetDictionary(this.strm, R)), v === a.Z_BUF_ERROR && G === !0 && (v = a.Z_OK, G = !1), v !== a.Z_STREAM_END && v !== a.Z_OK) return this.onEnd(v), !(this.ended = !0);
|
|
3379
|
+
D.next_out && (D.avail_out !== 0 && v !== a.Z_STREAM_END && (D.avail_in !== 0 || w !== a.Z_FINISH && w !== a.Z_SYNC_FLUSH) || (this.options.to === "string" ? (M = o.utf8border(D.output, D.next_out), S = D.next_out - M, C = o.buf2string(D.output, M), D.next_out = S, D.avail_out = U - S, S && s.arraySet(D.output, D.output, M, S, 0), this.onData(C)) : this.onData(s.shrinkBuf(D.output, D.next_out)))), D.avail_in === 0 && D.avail_out === 0 && (G = !0);
|
|
3380
|
+
} while ((0 < D.avail_in || D.avail_out === 0) && v !== a.Z_STREAM_END);
|
|
3381
|
+
return v === a.Z_STREAM_END && (w = a.Z_FINISH), w === a.Z_FINISH ? (v = r.inflateEnd(this.strm), this.onEnd(v), this.ended = !0, v === a.Z_OK) : w !== a.Z_SYNC_FLUSH || (this.onEnd(a.Z_OK), !(D.avail_out = 0));
|
|
3382
3382
|
}, d.prototype.onData = function(h) {
|
|
3383
3383
|
this.chunks.push(h);
|
|
3384
3384
|
}, d.prototype.onEnd = function(h) {
|
|
@@ -3435,9 +3435,9 @@ function Gt() {
|
|
|
3435
3435
|
return d;
|
|
3436
3436
|
}
|
|
3437
3437
|
a[254] = a[254] = 1, n.string2buf = function(f) {
|
|
3438
|
-
var p, d, y, h, g, v = f.length,
|
|
3439
|
-
for (h = 0; h < v; h++) (64512 & (d = f.charCodeAt(h))) == 55296 && h + 1 < v && (64512 & (y = f.charCodeAt(h + 1))) == 56320 && (d = 65536 + (d - 55296 << 10) + (y - 56320), h++),
|
|
3440
|
-
for (p = new r.Buf8(
|
|
3438
|
+
var p, d, y, h, g, v = f.length, w = 0;
|
|
3439
|
+
for (h = 0; h < v; h++) (64512 & (d = f.charCodeAt(h))) == 55296 && h + 1 < v && (64512 & (y = f.charCodeAt(h + 1))) == 56320 && (d = 65536 + (d - 55296 << 10) + (y - 56320), h++), w += d < 128 ? 1 : d < 2048 ? 2 : d < 65536 ? 3 : 4;
|
|
3440
|
+
for (p = new r.Buf8(w), h = g = 0; g < w; h++) (64512 & (d = f.charCodeAt(h))) == 55296 && h + 1 < v && (64512 & (y = f.charCodeAt(h + 1))) == 56320 && (d = 65536 + (d - 55296 << 10) + (y - 56320), h++), d < 128 ? p[g++] = d : (d < 2048 ? p[g++] = 192 | d >>> 6 : (d < 65536 ? p[g++] = 224 | d >>> 12 : (p[g++] = 240 | d >>> 18, p[g++] = 128 | d >>> 12 & 63), p[g++] = 128 | d >>> 6 & 63), p[g++] = 128 | 63 & d);
|
|
3441
3441
|
return p;
|
|
3442
3442
|
}, n.buf2binstring = function(f) {
|
|
3443
3443
|
return c(f, f.length);
|
|
@@ -3445,14 +3445,14 @@ function Gt() {
|
|
|
3445
3445
|
for (var p = new r.Buf8(f.length), d = 0, y = p.length; d < y; d++) p[d] = f.charCodeAt(d);
|
|
3446
3446
|
return p;
|
|
3447
3447
|
}, n.buf2string = function(f, p) {
|
|
3448
|
-
var d, y, h, g, v = p || f.length,
|
|
3449
|
-
for (d = y = 0; d < v; ) if ((h = f[d++]) < 128)
|
|
3450
|
-
else if (4 < (g = a[h]))
|
|
3448
|
+
var d, y, h, g, v = p || f.length, w = new Array(2 * v);
|
|
3449
|
+
for (d = y = 0; d < v; ) if ((h = f[d++]) < 128) w[y++] = h;
|
|
3450
|
+
else if (4 < (g = a[h])) w[y++] = 65533, d += g - 1;
|
|
3451
3451
|
else {
|
|
3452
3452
|
for (h &= g === 2 ? 31 : g === 3 ? 15 : 7; 1 < g && d < v; ) h = h << 6 | 63 & f[d++], g--;
|
|
3453
|
-
1 < g ?
|
|
3453
|
+
1 < g ? w[y++] = 65533 : h < 65536 ? w[y++] = h : (h -= 65536, w[y++] = 55296 | h >> 10 & 1023, w[y++] = 56320 | 1023 & h);
|
|
3454
3454
|
}
|
|
3455
|
-
return c(
|
|
3455
|
+
return c(w, y);
|
|
3456
3456
|
}, n.utf8border = function(f, p) {
|
|
3457
3457
|
var d;
|
|
3458
3458
|
for ((p = p || f.length) > f.length && (p = f.length), d = p - 1; 0 <= d && (192 & f[d]) == 128; ) d--;
|
|
@@ -3484,93 +3484,93 @@ function Gt() {
|
|
|
3484
3484
|
return -1 ^ s;
|
|
3485
3485
|
};
|
|
3486
3486
|
}, {}], 46: [function(t, i, n) {
|
|
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,
|
|
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, w = 8, M = 9, S = 286, C = 30, R = 19, D = 2 * S + 1, U = 15, z = 3, G = 258, q = G + z + 1, E = 42, B = 113, m = 1, O = 2, ee = 3, W = 4;
|
|
3488
3488
|
function te(u, N) {
|
|
3489
3489
|
return u.msg = c[N], N;
|
|
3490
3490
|
}
|
|
3491
3491
|
function F(u) {
|
|
3492
3492
|
return (u << 1) - (4 < u ? 9 : 0);
|
|
3493
3493
|
}
|
|
3494
|
-
function
|
|
3494
|
+
function Q(u) {
|
|
3495
3495
|
for (var N = u.length; 0 <= --N; ) u[N] = 0;
|
|
3496
3496
|
}
|
|
3497
|
-
function
|
|
3498
|
-
var N = u.state,
|
|
3499
|
-
|
|
3497
|
+
function I(u) {
|
|
3498
|
+
var N = u.state, P = N.pending;
|
|
3499
|
+
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));
|
|
3500
3500
|
}
|
|
3501
3501
|
function L(u, N) {
|
|
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,
|
|
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, I(u.strm);
|
|
3503
3503
|
}
|
|
3504
|
-
function
|
|
3504
|
+
function J(u, N) {
|
|
3505
3505
|
u.pending_buf[u.pending++] = N;
|
|
3506
3506
|
}
|
|
3507
3507
|
function Y(u, N) {
|
|
3508
3508
|
u.pending_buf[u.pending++] = N >>> 8 & 255, u.pending_buf[u.pending++] = 255 & N;
|
|
3509
3509
|
}
|
|
3510
3510
|
function Z(u, N) {
|
|
3511
|
-
var
|
|
3512
|
-
u.prev_length >= u.good_match && (
|
|
3511
|
+
var P, k, x = 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, H = u.window, K = u.w_mask, $ = u.prev, X = u.strstart + G, se = H[T + V - 1], ne = H[T + V];
|
|
3512
|
+
u.prev_length >= u.good_match && (x >>= 2), j > u.lookahead && (j = u.lookahead);
|
|
3513
3513
|
do
|
|
3514
|
-
if (
|
|
3515
|
-
T += 2,
|
|
3514
|
+
if (H[(P = N) + V] === ne && H[P + V - 1] === se && H[P] === H[T] && H[++P] === H[T + 1]) {
|
|
3515
|
+
T += 2, P++;
|
|
3516
3516
|
do
|
|
3517
3517
|
;
|
|
3518
|
-
while (
|
|
3519
|
-
if (
|
|
3520
|
-
if (u.match_start = N, j <= (V =
|
|
3521
|
-
se =
|
|
3518
|
+
while (H[++T] === H[++P] && H[++T] === H[++P] && H[++T] === H[++P] && H[++T] === H[++P] && H[++T] === H[++P] && H[++T] === H[++P] && H[++T] === H[++P] && H[++T] === H[++P] && T < X);
|
|
3519
|
+
if (k = G - (X - T), T = X - G, V < k) {
|
|
3520
|
+
if (u.match_start = N, j <= (V = k)) break;
|
|
3521
|
+
se = H[T + V - 1], ne = H[T + V];
|
|
3522
3522
|
}
|
|
3523
3523
|
}
|
|
3524
|
-
while ((N = $[N &
|
|
3524
|
+
while ((N = $[N & K]) > A && --x != 0);
|
|
3525
3525
|
return V <= u.lookahead ? V : u.lookahead;
|
|
3526
3526
|
}
|
|
3527
3527
|
function ae(u) {
|
|
3528
|
-
var N,
|
|
3528
|
+
var N, P, k, x, T, V, j, A, H, K, $ = u.w_size;
|
|
3529
3529
|
do {
|
|
3530
|
-
if (
|
|
3531
|
-
for (s.arraySet(u.window, u.window, $, $, 0), u.match_start -= $, u.strstart -= $, u.block_start -= $, N =
|
|
3532
|
-
for (N =
|
|
3533
|
-
|
|
3530
|
+
if (x = u.window_size - u.lookahead - u.strstart, u.strstart >= $ + ($ - q)) {
|
|
3531
|
+
for (s.arraySet(u.window, u.window, $, $, 0), u.match_start -= $, u.strstart -= $, u.block_start -= $, N = P = u.hash_size; k = u.head[--N], u.head[N] = $ <= k ? k - $ : 0, --P; ) ;
|
|
3532
|
+
for (N = P = $; k = u.prev[--N], u.prev[N] = $ <= k ? k - $ : 0, --P; ) ;
|
|
3533
|
+
x += $;
|
|
3534
3534
|
}
|
|
3535
3535
|
if (u.strm.avail_in === 0) break;
|
|
3536
|
-
if (V = u.strm, j = u.window, A = u.strstart + u.lookahead,
|
|
3536
|
+
if (V = u.strm, j = u.window, A = u.strstart + u.lookahead, H = x, K = void 0, K = V.avail_in, H < K && (K = H), P = K === 0 ? 0 : (V.avail_in -= K, s.arraySet(j, V.input, V.next_in, K, A), V.state.wrap === 1 ? V.adler = a(V.adler, j, K, A) : V.state.wrap === 2 && (V.adler = l(V.adler, j, K, A)), V.next_in += K, V.total_in += K, K), u.lookahead += P, u.lookahead + u.insert >= z) 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 + z - 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 < z)); ) ;
|
|
3537
3537
|
} while (u.lookahead < q && u.strm.avail_in !== 0);
|
|
3538
3538
|
}
|
|
3539
3539
|
function ue(u, N) {
|
|
3540
|
-
for (var
|
|
3540
|
+
for (var P, k; ; ) {
|
|
3541
3541
|
if (u.lookahead < q) {
|
|
3542
3542
|
if (ae(u), u.lookahead < q && N === f) return m;
|
|
3543
3543
|
if (u.lookahead === 0) break;
|
|
3544
3544
|
}
|
|
3545
|
-
if (
|
|
3546
|
-
for (u.match_length--; u.strstart++, u.ins_h = (u.ins_h << u.hash_shift ^ u.window[u.strstart +
|
|
3545
|
+
if (P = 0, u.lookahead >= z && (u.ins_h = (u.ins_h << u.hash_shift ^ u.window[u.strstart + z - 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 >= z) if (k = o._tr_tally(u, u.strstart - u.match_start, u.match_length - z), u.lookahead -= u.match_length, u.match_length <= u.max_lazy_match && u.lookahead >= z) {
|
|
3546
|
+
for (u.match_length--; u.strstart++, u.ins_h = (u.ins_h << u.hash_shift ^ u.window[u.strstart + z - 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; ) ;
|
|
3547
3547
|
u.strstart++;
|
|
3548
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;
|
|
3549
|
-
else
|
|
3550
|
-
if (
|
|
3549
|
+
else k = o._tr_tally(u, 0, u.window[u.strstart]), u.lookahead--, u.strstart++;
|
|
3550
|
+
if (k && (L(u, !1), u.strm.avail_out === 0)) return m;
|
|
3551
3551
|
}
|
|
3552
|
-
return u.insert = u.strstart <
|
|
3552
|
+
return u.insert = u.strstart < z - 1 ? u.strstart : z - 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;
|
|
3553
3553
|
}
|
|
3554
3554
|
function ie(u, N) {
|
|
3555
|
-
for (var
|
|
3555
|
+
for (var P, k, x; ; ) {
|
|
3556
3556
|
if (u.lookahead < q) {
|
|
3557
3557
|
if (ae(u), u.lookahead < q && N === f) return m;
|
|
3558
3558
|
if (u.lookahead === 0) break;
|
|
3559
3559
|
}
|
|
3560
|
-
if (
|
|
3561
|
-
for (
|
|
3562
|
-
if (u.match_available = 0, u.match_length =
|
|
3560
|
+
if (P = 0, u.lookahead >= z && (u.ins_h = (u.ins_h << u.hash_shift ^ u.window[u.strstart + z - 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 = z - 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 === z && 4096 < u.strstart - u.match_start) && (u.match_length = z - 1)), u.prev_length >= z && u.match_length <= u.prev_length) {
|
|
3561
|
+
for (x = u.strstart + u.lookahead - z, k = o._tr_tally(u, u.strstart - 1 - u.prev_match, u.prev_length - z), u.lookahead -= u.prev_length - 1, u.prev_length -= 2; ++u.strstart <= x && (u.ins_h = (u.ins_h << u.hash_shift ^ u.window[u.strstart + z - 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; ) ;
|
|
3562
|
+
if (u.match_available = 0, u.match_length = z - 1, u.strstart++, k && (L(u, !1), u.strm.avail_out === 0)) return m;
|
|
3563
3563
|
} else if (u.match_available) {
|
|
3564
|
-
if ((
|
|
3564
|
+
if ((k = o._tr_tally(u, 0, u.window[u.strstart - 1])) && L(u, !1), u.strstart++, u.lookahead--, u.strm.avail_out === 0) return m;
|
|
3565
3565
|
} else u.match_available = 1, u.strstart++, u.lookahead--;
|
|
3566
3566
|
}
|
|
3567
|
-
return u.match_available && (
|
|
3567
|
+
return u.match_available && (k = o._tr_tally(u, 0, u.window[u.strstart - 1]), u.match_available = 0), u.insert = u.strstart < z - 1 ? u.strstart : z - 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;
|
|
3568
3568
|
}
|
|
3569
|
-
function re(u, N,
|
|
3570
|
-
this.good_length = u, this.max_lazy = N, this.nice_length =
|
|
3569
|
+
function re(u, N, P, k, x) {
|
|
3570
|
+
this.good_length = u, this.max_lazy = N, this.nice_length = P, this.max_chain = k, this.func = x;
|
|
3571
3571
|
}
|
|
3572
3572
|
function de() {
|
|
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 =
|
|
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 = w, 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 * D), this.dyn_dtree = new s.Buf16(2 * (2 * C + 1)), this.bl_tree = new s.Buf16(2 * (2 * R + 1)), Q(this.dyn_ltree), Q(this.dyn_dtree), Q(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), Q(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new s.Buf16(2 * S + 1), Q(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;
|
|
3574
3574
|
}
|
|
3575
3575
|
function le(u) {
|
|
3576
3576
|
var N;
|
|
@@ -3578,115 +3578,115 @@ function Gt() {
|
|
|
3578
3578
|
}
|
|
3579
3579
|
function ge(u) {
|
|
3580
3580
|
var N = le(u);
|
|
3581
|
-
return N === d && (function(
|
|
3582
|
-
|
|
3581
|
+
return N === d && (function(P) {
|
|
3582
|
+
P.window_size = 2 * P.w_size, Q(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 = z - 1, P.match_available = 0, P.ins_h = 0;
|
|
3583
3583
|
})(u.state), N;
|
|
3584
3584
|
}
|
|
3585
|
-
function me(u, N,
|
|
3585
|
+
function me(u, N, P, k, x, T) {
|
|
3586
3586
|
if (!u) return y;
|
|
3587
3587
|
var V = 1;
|
|
3588
|
-
if (N === h && (N = 6),
|
|
3589
|
-
|
|
3588
|
+
if (N === h && (N = 6), k < 0 ? (V = 0, k = -k) : 15 < k && (V = 2, k -= 16), x < 1 || M < x || P !== w || k < 8 || 15 < k || N < 0 || 9 < N || T < 0 || g < T) return te(u, y);
|
|
3589
|
+
k === 8 && (k = 9);
|
|
3590
3590
|
var j = new de();
|
|
3591
|
-
return (u.state = j).strm = u, j.wrap = V, j.gzhead = null, j.w_bits =
|
|
3591
|
+
return (u.state = j).strm = u, j.wrap = V, j.gzhead = null, j.w_bits = k, j.w_size = 1 << j.w_bits, j.w_mask = j.w_size - 1, j.hash_bits = x + 7, j.hash_size = 1 << j.hash_bits, j.hash_mask = j.hash_size - 1, j.hash_shift = ~~((j.hash_bits + z - 1) / z), 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 << x + 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);
|
|
3592
3592
|
}
|
|
3593
3593
|
r = [new re(0, 0, 0, 0, function(u, N) {
|
|
3594
|
-
var
|
|
3595
|
-
for (
|
|
3594
|
+
var P = 65535;
|
|
3595
|
+
for (P > u.pending_buf_size - 5 && (P = u.pending_buf_size - 5); ; ) {
|
|
3596
3596
|
if (u.lookahead <= 1) {
|
|
3597
3597
|
if (ae(u), u.lookahead === 0 && N === f) return m;
|
|
3598
3598
|
if (u.lookahead === 0) break;
|
|
3599
3599
|
}
|
|
3600
3600
|
u.strstart += u.lookahead, u.lookahead = 0;
|
|
3601
|
-
var
|
|
3602
|
-
if ((u.strstart === 0 || u.strstart >=
|
|
3601
|
+
var k = u.block_start + P;
|
|
3602
|
+
if ((u.strstart === 0 || u.strstart >= k) && (u.lookahead = u.strstart - k, u.strstart = k, 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;
|
|
3603
3603
|
}
|
|
3604
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);
|
|
3605
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) {
|
|
3606
|
-
return me(u, N,
|
|
3606
|
+
return me(u, N, w, 15, 8, 0);
|
|
3607
3607
|
}, n.deflateInit2 = me, n.deflateReset = ge, n.deflateResetKeep = le, n.deflateSetHeader = function(u, N) {
|
|
3608
3608
|
return u && u.state ? u.state.wrap !== 2 ? y : (u.state.gzhead = N, d) : y;
|
|
3609
3609
|
}, n.deflate = function(u, N) {
|
|
3610
|
-
var
|
|
3610
|
+
var P, k, x, T;
|
|
3611
3611
|
if (!u || !u.state || 5 < N || N < 0) return u ? te(u, y) : y;
|
|
3612
|
-
if (
|
|
3613
|
-
if (
|
|
3612
|
+
if (k = u.state, !u.output || !u.input && u.avail_in !== 0 || k.status === 666 && N !== p) return te(u, u.avail_out === 0 ? -5 : y);
|
|
3613
|
+
if (k.strm = u, P = k.last_flush, k.last_flush = N, k.status === E) if (k.wrap === 2) u.adler = 0, J(k, 31), J(k, 139), J(k, 8), k.gzhead ? (J(k, (k.gzhead.text ? 1 : 0) + (k.gzhead.hcrc ? 2 : 0) + (k.gzhead.extra ? 4 : 0) + (k.gzhead.name ? 8 : 0) + (k.gzhead.comment ? 16 : 0)), J(k, 255 & k.gzhead.time), J(k, k.gzhead.time >> 8 & 255), J(k, k.gzhead.time >> 16 & 255), J(k, k.gzhead.time >> 24 & 255), J(k, k.level === 9 ? 2 : 2 <= k.strategy || k.level < 2 ? 4 : 0), J(k, 255 & k.gzhead.os), k.gzhead.extra && k.gzhead.extra.length && (J(k, 255 & k.gzhead.extra.length), J(k, k.gzhead.extra.length >> 8 & 255)), k.gzhead.hcrc && (u.adler = l(u.adler, k.pending_buf, k.pending, 0)), k.gzindex = 0, k.status = 69) : (J(k, 0), J(k, 0), J(k, 0), J(k, 0), J(k, 0), J(k, k.level === 9 ? 2 : 2 <= k.strategy || k.level < 2 ? 4 : 0), J(k, 3), k.status = B);
|
|
3614
3614
|
else {
|
|
3615
|
-
var V =
|
|
3616
|
-
V |= (2 <=
|
|
3615
|
+
var V = w + (k.w_bits - 8 << 4) << 8;
|
|
3616
|
+
V |= (2 <= k.strategy || k.level < 2 ? 0 : k.level < 6 ? 1 : k.level === 6 ? 2 : 3) << 6, k.strstart !== 0 && (V |= 32), V += 31 - V % 31, k.status = B, Y(k, V), k.strstart !== 0 && (Y(k, u.adler >>> 16), Y(k, 65535 & u.adler)), u.adler = 1;
|
|
3617
3617
|
}
|
|
3618
|
-
if (
|
|
3619
|
-
for (
|
|
3620
|
-
|
|
3621
|
-
} else
|
|
3622
|
-
if (
|
|
3623
|
-
|
|
3618
|
+
if (k.status === 69) if (k.gzhead.extra) {
|
|
3619
|
+
for (x = k.pending; k.gzindex < (65535 & k.gzhead.extra.length) && (k.pending !== k.pending_buf_size || (k.gzhead.hcrc && k.pending > x && (u.adler = l(u.adler, k.pending_buf, k.pending - x, x)), I(u), x = k.pending, k.pending !== k.pending_buf_size)); ) J(k, 255 & k.gzhead.extra[k.gzindex]), k.gzindex++;
|
|
3620
|
+
k.gzhead.hcrc && k.pending > x && (u.adler = l(u.adler, k.pending_buf, k.pending - x, x)), k.gzindex === k.gzhead.extra.length && (k.gzindex = 0, k.status = 73);
|
|
3621
|
+
} else k.status = 73;
|
|
3622
|
+
if (k.status === 73) if (k.gzhead.name) {
|
|
3623
|
+
x = k.pending;
|
|
3624
3624
|
do {
|
|
3625
|
-
if (
|
|
3625
|
+
if (k.pending === k.pending_buf_size && (k.gzhead.hcrc && k.pending > x && (u.adler = l(u.adler, k.pending_buf, k.pending - x, x)), I(u), x = k.pending, k.pending === k.pending_buf_size)) {
|
|
3626
3626
|
T = 1;
|
|
3627
3627
|
break;
|
|
3628
3628
|
}
|
|
3629
|
-
T =
|
|
3629
|
+
T = k.gzindex < k.gzhead.name.length ? 255 & k.gzhead.name.charCodeAt(k.gzindex++) : 0, J(k, T);
|
|
3630
3630
|
} while (T !== 0);
|
|
3631
|
-
|
|
3632
|
-
} else
|
|
3633
|
-
if (
|
|
3634
|
-
|
|
3631
|
+
k.gzhead.hcrc && k.pending > x && (u.adler = l(u.adler, k.pending_buf, k.pending - x, x)), T === 0 && (k.gzindex = 0, k.status = 91);
|
|
3632
|
+
} else k.status = 91;
|
|
3633
|
+
if (k.status === 91) if (k.gzhead.comment) {
|
|
3634
|
+
x = k.pending;
|
|
3635
3635
|
do {
|
|
3636
|
-
if (
|
|
3636
|
+
if (k.pending === k.pending_buf_size && (k.gzhead.hcrc && k.pending > x && (u.adler = l(u.adler, k.pending_buf, k.pending - x, x)), I(u), x = k.pending, k.pending === k.pending_buf_size)) {
|
|
3637
3637
|
T = 1;
|
|
3638
3638
|
break;
|
|
3639
3639
|
}
|
|
3640
|
-
T =
|
|
3640
|
+
T = k.gzindex < k.gzhead.comment.length ? 255 & k.gzhead.comment.charCodeAt(k.gzindex++) : 0, J(k, T);
|
|
3641
3641
|
} while (T !== 0);
|
|
3642
|
-
|
|
3643
|
-
} else
|
|
3644
|
-
if (
|
|
3645
|
-
if (
|
|
3646
|
-
} else if (u.avail_in === 0 && F(N) <= F(
|
|
3647
|
-
if (
|
|
3648
|
-
if (u.avail_in !== 0 ||
|
|
3649
|
-
var j =
|
|
3650
|
-
for (var
|
|
3642
|
+
k.gzhead.hcrc && k.pending > x && (u.adler = l(u.adler, k.pending_buf, k.pending - x, x)), T === 0 && (k.status = 103);
|
|
3643
|
+
} else k.status = 103;
|
|
3644
|
+
if (k.status === 103 && (k.gzhead.hcrc ? (k.pending + 2 > k.pending_buf_size && I(u), k.pending + 2 <= k.pending_buf_size && (J(k, 255 & u.adler), J(k, u.adler >> 8 & 255), u.adler = 0, k.status = B)) : k.status = B), k.pending !== 0) {
|
|
3645
|
+
if (I(u), u.avail_out === 0) return k.last_flush = -1, d;
|
|
3646
|
+
} else if (u.avail_in === 0 && F(N) <= F(P) && N !== p) return te(u, -5);
|
|
3647
|
+
if (k.status === 666 && u.avail_in !== 0) return te(u, -5);
|
|
3648
|
+
if (u.avail_in !== 0 || k.lookahead !== 0 || N !== f && k.status !== 666) {
|
|
3649
|
+
var j = k.strategy === 2 ? (function(A, H) {
|
|
3650
|
+
for (var K; ; ) {
|
|
3651
3651
|
if (A.lookahead === 0 && (ae(A), A.lookahead === 0)) {
|
|
3652
|
-
if (
|
|
3652
|
+
if (H === f) return m;
|
|
3653
3653
|
break;
|
|
3654
3654
|
}
|
|
3655
|
-
if (A.match_length = 0,
|
|
3655
|
+
if (A.match_length = 0, K = o._tr_tally(A, 0, A.window[A.strstart]), A.lookahead--, A.strstart++, K && (L(A, !1), A.strm.avail_out === 0)) return m;
|
|
3656
3656
|
}
|
|
3657
|
-
return A.insert = 0,
|
|
3658
|
-
})(
|
|
3659
|
-
for (var
|
|
3660
|
-
if (A.lookahead <=
|
|
3661
|
-
if (ae(A), A.lookahead <=
|
|
3657
|
+
return A.insert = 0, H === p ? (L(A, !0), A.strm.avail_out === 0 ? ee : W) : A.last_lit && (L(A, !1), A.strm.avail_out === 0) ? m : O;
|
|
3658
|
+
})(k, N) : k.strategy === 3 ? (function(A, H) {
|
|
3659
|
+
for (var K, $, X, se, ne = A.window; ; ) {
|
|
3660
|
+
if (A.lookahead <= G) {
|
|
3661
|
+
if (ae(A), A.lookahead <= G && H === f) return m;
|
|
3662
3662
|
if (A.lookahead === 0) break;
|
|
3663
3663
|
}
|
|
3664
|
-
if (A.match_length = 0, A.lookahead >=
|
|
3665
|
-
se = A.strstart +
|
|
3664
|
+
if (A.match_length = 0, A.lookahead >= z && 0 < A.strstart && ($ = ne[X = A.strstart - 1]) === ne[++X] && $ === ne[++X] && $ === ne[++X]) {
|
|
3665
|
+
se = A.strstart + G;
|
|
3666
3666
|
do
|
|
3667
3667
|
;
|
|
3668
|
-
while ($ === ne[++
|
|
3669
|
-
A.match_length =
|
|
3668
|
+
while ($ === ne[++X] && $ === ne[++X] && $ === ne[++X] && $ === ne[++X] && $ === ne[++X] && $ === ne[++X] && $ === ne[++X] && $ === ne[++X] && X < se);
|
|
3669
|
+
A.match_length = G - (se - X), A.match_length > A.lookahead && (A.match_length = A.lookahead);
|
|
3670
3670
|
}
|
|
3671
|
-
if (A.match_length >=
|
|
3671
|
+
if (A.match_length >= z ? (K = o._tr_tally(A, 1, A.match_length - z), A.lookahead -= A.match_length, A.strstart += A.match_length, A.match_length = 0) : (K = o._tr_tally(A, 0, A.window[A.strstart]), A.lookahead--, A.strstart++), K && (L(A, !1), A.strm.avail_out === 0)) return m;
|
|
3672
3672
|
}
|
|
3673
|
-
return A.insert = 0,
|
|
3674
|
-
})(
|
|
3675
|
-
if (j !== ee && j !== W || (
|
|
3676
|
-
if (j === O && (N === 1 ? o._tr_align(
|
|
3673
|
+
return A.insert = 0, H === p ? (L(A, !0), A.strm.avail_out === 0 ? ee : W) : A.last_lit && (L(A, !1), A.strm.avail_out === 0) ? m : O;
|
|
3674
|
+
})(k, N) : r[k.level].func(k, N);
|
|
3675
|
+
if (j !== ee && j !== W || (k.status = 666), j === m || j === ee) return u.avail_out === 0 && (k.last_flush = -1), d;
|
|
3676
|
+
if (j === O && (N === 1 ? o._tr_align(k) : N !== 5 && (o._tr_stored_block(k, 0, 0, !1), N === 3 && (Q(k.head), k.lookahead === 0 && (k.strstart = 0, k.block_start = 0, k.insert = 0))), I(u), u.avail_out === 0)) return k.last_flush = -1, d;
|
|
3677
3677
|
}
|
|
3678
|
-
return N !== p ? d :
|
|
3678
|
+
return N !== p ? d : k.wrap <= 0 ? 1 : (k.wrap === 2 ? (J(k, 255 & u.adler), J(k, u.adler >> 8 & 255), J(k, u.adler >> 16 & 255), J(k, u.adler >> 24 & 255), J(k, 255 & u.total_in), J(k, u.total_in >> 8 & 255), J(k, u.total_in >> 16 & 255), J(k, u.total_in >> 24 & 255)) : (Y(k, u.adler >>> 16), Y(k, 65535 & u.adler)), I(u), 0 < k.wrap && (k.wrap = -k.wrap), k.pending !== 0 ? d : 1);
|
|
3679
3679
|
}, n.deflateEnd = function(u) {
|
|
3680
3680
|
var N;
|
|
3681
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;
|
|
3682
3682
|
}, n.deflateSetDictionary = function(u, N) {
|
|
3683
|
-
var
|
|
3684
|
-
if (!u || !u.state || (T = (
|
|
3685
|
-
for (T === 1 && (u.adler = a(u.adler, N,
|
|
3686
|
-
for (
|
|
3687
|
-
|
|
3683
|
+
var P, k, x, T, V, j, A, H, K = N.length;
|
|
3684
|
+
if (!u || !u.state || (T = (P = u.state).wrap) === 2 || T === 1 && P.status !== E || P.lookahead) return y;
|
|
3685
|
+
for (T === 1 && (u.adler = a(u.adler, N, K, 0)), P.wrap = 0, K >= P.w_size && (T === 0 && (Q(P.head), P.strstart = 0, P.block_start = 0, P.insert = 0), H = new s.Buf8(P.w_size), s.arraySet(H, N, K - P.w_size, P.w_size, 0), N = H, K = P.w_size), V = u.avail_in, j = u.next_in, A = u.input, u.avail_in = K, u.next_in = 0, u.input = N, ae(P); P.lookahead >= z; ) {
|
|
3686
|
+
for (k = P.strstart, x = P.lookahead - (z - 1); P.ins_h = (P.ins_h << P.hash_shift ^ P.window[k + z - 1]) & P.hash_mask, P.prev[k & P.w_mask] = P.head[P.ins_h], P.head[P.ins_h] = k, k++, --x; ) ;
|
|
3687
|
+
P.strstart = k, P.lookahead = z - 1, ae(P);
|
|
3688
3688
|
}
|
|
3689
|
-
return
|
|
3689
|
+
return P.strstart += P.lookahead, P.block_start = P.strstart, P.insert = P.lookahead, P.lookahead = 0, P.match_length = P.prev_length = z - 1, P.match_available = 0, u.next_in = j, u.input = A, u.avail_in = V, P.wrap = T, d;
|
|
3690
3690
|
}, n.deflateInfo = "pako deflate (from Nodeca project)";
|
|
3691
3691
|
}, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./messages": 51, "./trees": 52 }], 47: [function(t, i, n) {
|
|
3692
3692
|
i.exports = function() {
|
|
@@ -3694,66 +3694,66 @@ function Gt() {
|
|
|
3694
3694
|
};
|
|
3695
3695
|
}, {}], 48: [function(t, i, n) {
|
|
3696
3696
|
i.exports = function(r, s) {
|
|
3697
|
-
var o, a, l, c, f, p, d, y, h, g, v,
|
|
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,
|
|
3697
|
+
var o, a, l, c, f, p, d, y, h, g, v, w, M, S, C, R, D, U, z, G, q, E, B, m, O;
|
|
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, w = o.hold, M = o.bits, S = o.lencode, C = o.distcode, R = (1 << o.lenbits) - 1, D = (1 << o.distbits) - 1;
|
|
3699
3699
|
e: do {
|
|
3700
|
-
|
|
3700
|
+
M < 15 && (w += m[a++] << M, M += 8, w += m[a++] << M, M += 8), U = S[w & R];
|
|
3701
3701
|
t: for (; ; ) {
|
|
3702
|
-
if (
|
|
3702
|
+
if (w >>>= z = U >>> 24, M -= z, (z = U >>> 16 & 255) === 0) O[c++] = 65535 & U;
|
|
3703
3703
|
else {
|
|
3704
|
-
if (!(16 &
|
|
3705
|
-
if ((64 &
|
|
3706
|
-
U = S[(65535 & U) + (
|
|
3704
|
+
if (!(16 & z)) {
|
|
3705
|
+
if ((64 & z) == 0) {
|
|
3706
|
+
U = S[(65535 & U) + (w & (1 << z) - 1)];
|
|
3707
3707
|
continue t;
|
|
3708
3708
|
}
|
|
3709
|
-
if (32 &
|
|
3709
|
+
if (32 & z) {
|
|
3710
3710
|
o.mode = 12;
|
|
3711
3711
|
break e;
|
|
3712
3712
|
}
|
|
3713
3713
|
r.msg = "invalid literal/length code", o.mode = 30;
|
|
3714
3714
|
break e;
|
|
3715
3715
|
}
|
|
3716
|
-
|
|
3716
|
+
G = 65535 & U, (z &= 15) && (M < z && (w += m[a++] << M, M += 8), G += w & (1 << z) - 1, w >>>= z, M -= z), M < 15 && (w += m[a++] << M, M += 8, w += m[a++] << M, M += 8), U = C[w & D];
|
|
3717
3717
|
i: for (; ; ) {
|
|
3718
|
-
if (
|
|
3719
|
-
if ((64 &
|
|
3720
|
-
U = C[(65535 & U) + (
|
|
3718
|
+
if (w >>>= z = U >>> 24, M -= z, !(16 & (z = U >>> 16 & 255))) {
|
|
3719
|
+
if ((64 & z) == 0) {
|
|
3720
|
+
U = C[(65535 & U) + (w & (1 << z) - 1)];
|
|
3721
3721
|
continue i;
|
|
3722
3722
|
}
|
|
3723
3723
|
r.msg = "invalid distance code", o.mode = 30;
|
|
3724
3724
|
break e;
|
|
3725
3725
|
}
|
|
3726
|
-
if (q = 65535 & U,
|
|
3726
|
+
if (q = 65535 & U, M < (z &= 15) && (w += m[a++] << M, (M += 8) < z && (w += m[a++] << M, M += 8)), d < (q += w & (1 << z) - 1)) {
|
|
3727
3727
|
r.msg = "invalid distance too far back", o.mode = 30;
|
|
3728
3728
|
break e;
|
|
3729
3729
|
}
|
|
3730
|
-
if (
|
|
3731
|
-
if (h < (
|
|
3730
|
+
if (w >>>= z, M -= z, (z = c - f) < q) {
|
|
3731
|
+
if (h < (z = q - z) && o.sane) {
|
|
3732
3732
|
r.msg = "invalid distance too far back", o.mode = 30;
|
|
3733
3733
|
break e;
|
|
3734
3734
|
}
|
|
3735
3735
|
if (B = v, (E = 0) === g) {
|
|
3736
|
-
if (E += y -
|
|
3737
|
-
for (
|
|
3736
|
+
if (E += y - z, z < G) {
|
|
3737
|
+
for (G -= z; O[c++] = v[E++], --z; ) ;
|
|
3738
3738
|
E = c - q, B = O;
|
|
3739
3739
|
}
|
|
3740
|
-
} else if (g <
|
|
3741
|
-
if (E += y + g -
|
|
3742
|
-
for (
|
|
3743
|
-
if (E = 0, g <
|
|
3744
|
-
for (
|
|
3740
|
+
} else if (g < z) {
|
|
3741
|
+
if (E += y + g - z, (z -= g) < G) {
|
|
3742
|
+
for (G -= z; O[c++] = v[E++], --z; ) ;
|
|
3743
|
+
if (E = 0, g < G) {
|
|
3744
|
+
for (G -= z = g; O[c++] = v[E++], --z; ) ;
|
|
3745
3745
|
E = c - q, B = O;
|
|
3746
3746
|
}
|
|
3747
3747
|
}
|
|
3748
|
-
} else if (E += g -
|
|
3749
|
-
for (
|
|
3748
|
+
} else if (E += g - z, z < G) {
|
|
3749
|
+
for (G -= z; O[c++] = v[E++], --z; ) ;
|
|
3750
3750
|
E = c - q, B = O;
|
|
3751
3751
|
}
|
|
3752
|
-
for (; 2 <
|
|
3753
|
-
|
|
3752
|
+
for (; 2 < G; ) O[c++] = B[E++], O[c++] = B[E++], O[c++] = B[E++], G -= 3;
|
|
3753
|
+
G && (O[c++] = B[E++], 1 < G && (O[c++] = B[E++]));
|
|
3754
3754
|
} else {
|
|
3755
|
-
for (E = c - q; O[c++] = O[E++], O[c++] = O[E++], O[c++] = O[E++], 2 < (
|
|
3756
|
-
|
|
3755
|
+
for (E = c - q; O[c++] = O[E++], O[c++] = O[E++], O[c++] = O[E++], 2 < (G -= 3); ) ;
|
|
3756
|
+
G && (O[c++] = O[E++], 1 < G && (O[c++] = O[E++]));
|
|
3757
3757
|
}
|
|
3758
3758
|
break;
|
|
3759
3759
|
}
|
|
@@ -3761,23 +3761,23 @@ function Gt() {
|
|
|
3761
3761
|
break;
|
|
3762
3762
|
}
|
|
3763
3763
|
} while (a < l && c < p);
|
|
3764
|
-
a -=
|
|
3764
|
+
a -= G = M >> 3, w &= (1 << (M -= G << 3)) - 1, r.next_in = a, r.next_out = c, r.avail_in = a < l ? l - a + 5 : 5 - (a - l), r.avail_out = c < p ? p - c + 257 : 257 - (c - p), o.hold = w, o.bits = M;
|
|
3765
3765
|
};
|
|
3766
3766
|
}, {}], 49: [function(t, i, n) {
|
|
3767
3767
|
var r = t("../utils/common"), s = t("./adler32"), o = t("./crc32"), a = t("./inffast"), l = t("./inftrees"), c = 1, f = 2, p = 0, d = -2, y = 1, h = 852, g = 592;
|
|
3768
3768
|
function v(E) {
|
|
3769
3769
|
return (E >>> 24 & 255) + (E >>> 8 & 65280) + ((65280 & E) << 8) + ((255 & E) << 24);
|
|
3770
3770
|
}
|
|
3771
|
-
function
|
|
3771
|
+
function w() {
|
|
3772
3772
|
this.mode = 0, this.last = !1, this.wrap = 0, this.havedict = !1, this.flags = 0, this.dmax = 0, this.check = 0, this.total = 0, this.head = null, this.wbits = 0, this.wsize = 0, this.whave = 0, this.wnext = 0, this.window = null, this.hold = 0, this.bits = 0, this.length = 0, this.offset = 0, this.extra = 0, this.lencode = null, this.distcode = null, this.lenbits = 0, this.distbits = 0, this.ncode = 0, this.nlen = 0, this.ndist = 0, this.have = 0, this.next = null, this.lens = new r.Buf16(320), this.work = new r.Buf16(288), this.lendyn = null, this.distdyn = null, this.sane = 0, this.back = 0, this.was = 0;
|
|
3773
3773
|
}
|
|
3774
|
-
function
|
|
3774
|
+
function M(E) {
|
|
3775
3775
|
var B;
|
|
3776
3776
|
return E && E.state ? (B = E.state, E.total_in = E.total_out = B.total = 0, E.msg = "", B.wrap && (E.adler = 1 & B.wrap), B.mode = y, B.last = 0, B.havedict = 0, B.dmax = 32768, B.head = null, B.hold = 0, B.bits = 0, B.lencode = B.lendyn = new r.Buf32(h), B.distcode = B.distdyn = new r.Buf32(g), B.sane = 1, B.back = -1, p) : d;
|
|
3777
3777
|
}
|
|
3778
3778
|
function S(E) {
|
|
3779
3779
|
var B;
|
|
3780
|
-
return E && E.state ? ((B = E.state).wsize = 0, B.whave = 0, B.wnext = 0,
|
|
3780
|
+
return E && E.state ? ((B = E.state).wsize = 0, B.whave = 0, B.wnext = 0, M(E)) : d;
|
|
3781
3781
|
}
|
|
3782
3782
|
function C(E, B) {
|
|
3783
3783
|
var m, O;
|
|
@@ -3785,31 +3785,31 @@ function Gt() {
|
|
|
3785
3785
|
}
|
|
3786
3786
|
function R(E, B) {
|
|
3787
3787
|
var m, O;
|
|
3788
|
-
return E ? (O = new
|
|
3788
|
+
return E ? (O = new w(), (E.state = O).window = null, (m = C(E, B)) !== p && (E.state = null), m) : d;
|
|
3789
3789
|
}
|
|
3790
|
-
var
|
|
3791
|
-
function
|
|
3792
|
-
if (
|
|
3790
|
+
var D, U, z = !0;
|
|
3791
|
+
function G(E) {
|
|
3792
|
+
if (z) {
|
|
3793
3793
|
var B;
|
|
3794
|
-
for (
|
|
3794
|
+
for (D = new r.Buf32(512), U = new r.Buf32(32), B = 0; B < 144; ) E.lens[B++] = 8;
|
|
3795
3795
|
for (; B < 256; ) E.lens[B++] = 9;
|
|
3796
3796
|
for (; B < 280; ) E.lens[B++] = 7;
|
|
3797
3797
|
for (; B < 288; ) E.lens[B++] = 8;
|
|
3798
|
-
for (l(c, E.lens, 0, 288,
|
|
3799
|
-
l(f, E.lens, 0, 32, U, 0, E.work, { bits: 5 }),
|
|
3798
|
+
for (l(c, E.lens, 0, 288, D, 0, E.work, { bits: 9 }), B = 0; B < 32; ) E.lens[B++] = 5;
|
|
3799
|
+
l(f, E.lens, 0, 32, U, 0, E.work, { bits: 5 }), z = !1;
|
|
3800
3800
|
}
|
|
3801
|
-
E.lencode =
|
|
3801
|
+
E.lencode = D, E.lenbits = 9, E.distcode = U, E.distbits = 5;
|
|
3802
3802
|
}
|
|
3803
3803
|
function q(E, B, m, O) {
|
|
3804
3804
|
var ee, W = E.state;
|
|
3805
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;
|
|
3806
3806
|
}
|
|
3807
|
-
n.inflateReset = S, n.inflateReset2 = C, n.inflateResetKeep =
|
|
3807
|
+
n.inflateReset = S, n.inflateReset2 = C, n.inflateResetKeep = M, n.inflateInit = function(E) {
|
|
3808
3808
|
return R(E, 15);
|
|
3809
3809
|
}, n.inflateInit2 = R, n.inflate = function(E, B) {
|
|
3810
|
-
var m, O, ee, W, te, F,
|
|
3810
|
+
var m, O, ee, W, te, F, Q, I, L, J, Y, Z, ae, ue, ie, re, de, le, ge, me, u, N, P, k, x = 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];
|
|
3811
3811
|
if (!E || !E.state || !E.output || !E.input && E.avail_in !== 0) return d;
|
|
3812
|
-
(m = E.state).mode === 12 && (m.mode = 13), te = E.next_out, ee = E.output,
|
|
3812
|
+
(m = E.state).mode === 12 && (m.mode = 13), te = E.next_out, ee = E.output, Q = E.avail_out, W = E.next_in, O = E.input, F = E.avail_in, I = m.hold, L = m.bits, J = F, Y = Q, N = p;
|
|
3813
3813
|
e: for (; ; ) switch (m.mode) {
|
|
3814
3814
|
case y:
|
|
3815
3815
|
if (m.wrap === 0) {
|
|
@@ -3818,33 +3818,33 @@ function Gt() {
|
|
|
3818
3818
|
}
|
|
3819
3819
|
for (; L < 16; ) {
|
|
3820
3820
|
if (F === 0) break e;
|
|
3821
|
-
F--,
|
|
3821
|
+
F--, I += O[W++] << L, L += 8;
|
|
3822
3822
|
}
|
|
3823
|
-
if (2 & m.wrap &&
|
|
3824
|
-
T[m.check = 0] = 255 &
|
|
3823
|
+
if (2 & m.wrap && I === 35615) {
|
|
3824
|
+
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;
|
|
3825
3825
|
break;
|
|
3826
3826
|
}
|
|
3827
|
-
if (m.flags = 0, m.head && (m.head.done = !1), !(1 & m.wrap) || (((255 &
|
|
3827
|
+
if (m.flags = 0, m.head && (m.head.done = !1), !(1 & m.wrap) || (((255 & I) << 8) + (I >> 8)) % 31) {
|
|
3828
3828
|
E.msg = "incorrect header check", m.mode = 30;
|
|
3829
3829
|
break;
|
|
3830
3830
|
}
|
|
3831
|
-
if ((15 &
|
|
3831
|
+
if ((15 & I) != 8) {
|
|
3832
3832
|
E.msg = "unknown compression method", m.mode = 30;
|
|
3833
3833
|
break;
|
|
3834
3834
|
}
|
|
3835
|
-
if (L -= 4, u = 8 + (15 & (
|
|
3835
|
+
if (L -= 4, u = 8 + (15 & (I >>>= 4)), m.wbits === 0) m.wbits = u;
|
|
3836
3836
|
else if (u > m.wbits) {
|
|
3837
3837
|
E.msg = "invalid window size", m.mode = 30;
|
|
3838
3838
|
break;
|
|
3839
3839
|
}
|
|
3840
|
-
m.dmax = 1 << u, E.adler = m.check = 1, m.mode = 512 &
|
|
3840
|
+
m.dmax = 1 << u, E.adler = m.check = 1, m.mode = 512 & I ? 10 : 12, L = I = 0;
|
|
3841
3841
|
break;
|
|
3842
3842
|
case 2:
|
|
3843
3843
|
for (; L < 16; ) {
|
|
3844
3844
|
if (F === 0) break e;
|
|
3845
|
-
F--,
|
|
3845
|
+
F--, I += O[W++] << L, L += 8;
|
|
3846
3846
|
}
|
|
3847
|
-
if (m.flags =
|
|
3847
|
+
if (m.flags = I, (255 & m.flags) != 8) {
|
|
3848
3848
|
E.msg = "unknown compression method", m.mode = 30;
|
|
3849
3849
|
break;
|
|
3850
3850
|
}
|
|
@@ -3852,26 +3852,26 @@ function Gt() {
|
|
|
3852
3852
|
E.msg = "unknown header flags set", m.mode = 30;
|
|
3853
3853
|
break;
|
|
3854
3854
|
}
|
|
3855
|
-
m.head && (m.head.text =
|
|
3855
|
+
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;
|
|
3856
3856
|
case 3:
|
|
3857
3857
|
for (; L < 32; ) {
|
|
3858
3858
|
if (F === 0) break e;
|
|
3859
|
-
F--,
|
|
3859
|
+
F--, I += O[W++] << L, L += 8;
|
|
3860
3860
|
}
|
|
3861
|
-
m.head && (m.head.time =
|
|
3861
|
+
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;
|
|
3862
3862
|
case 4:
|
|
3863
3863
|
for (; L < 16; ) {
|
|
3864
3864
|
if (F === 0) break e;
|
|
3865
|
-
F--,
|
|
3865
|
+
F--, I += O[W++] << L, L += 8;
|
|
3866
3866
|
}
|
|
3867
|
-
m.head && (m.head.xflags = 255 &
|
|
3867
|
+
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;
|
|
3868
3868
|
case 5:
|
|
3869
3869
|
if (1024 & m.flags) {
|
|
3870
3870
|
for (; L < 16; ) {
|
|
3871
3871
|
if (F === 0) break e;
|
|
3872
|
-
F--,
|
|
3872
|
+
F--, I += O[W++] << L, L += 8;
|
|
3873
3873
|
}
|
|
3874
|
-
m.length =
|
|
3874
|
+
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;
|
|
3875
3875
|
} else m.head && (m.head.extra = null);
|
|
3876
3876
|
m.mode = 6;
|
|
3877
3877
|
case 6:
|
|
@@ -3895,43 +3895,43 @@ function Gt() {
|
|
|
3895
3895
|
if (512 & m.flags) {
|
|
3896
3896
|
for (; L < 16; ) {
|
|
3897
3897
|
if (F === 0) break e;
|
|
3898
|
-
F--,
|
|
3898
|
+
F--, I += O[W++] << L, L += 8;
|
|
3899
3899
|
}
|
|
3900
|
-
if (
|
|
3900
|
+
if (I !== (65535 & m.check)) {
|
|
3901
3901
|
E.msg = "header crc mismatch", m.mode = 30;
|
|
3902
3902
|
break;
|
|
3903
3903
|
}
|
|
3904
|
-
L =
|
|
3904
|
+
L = I = 0;
|
|
3905
3905
|
}
|
|
3906
3906
|
m.head && (m.head.hcrc = m.flags >> 9 & 1, m.head.done = !0), E.adler = m.check = 0, m.mode = 12;
|
|
3907
3907
|
break;
|
|
3908
3908
|
case 10:
|
|
3909
3909
|
for (; L < 32; ) {
|
|
3910
3910
|
if (F === 0) break e;
|
|
3911
|
-
F--,
|
|
3911
|
+
F--, I += O[W++] << L, L += 8;
|
|
3912
3912
|
}
|
|
3913
|
-
E.adler = m.check = v(
|
|
3913
|
+
E.adler = m.check = v(I), L = I = 0, m.mode = 11;
|
|
3914
3914
|
case 11:
|
|
3915
|
-
if (m.havedict === 0) return E.next_out = te, E.avail_out =
|
|
3915
|
+
if (m.havedict === 0) return E.next_out = te, E.avail_out = Q, E.next_in = W, E.avail_in = F, m.hold = I, m.bits = L, 2;
|
|
3916
3916
|
E.adler = m.check = 1, m.mode = 12;
|
|
3917
3917
|
case 12:
|
|
3918
3918
|
if (B === 5 || B === 6) break e;
|
|
3919
3919
|
case 13:
|
|
3920
3920
|
if (m.last) {
|
|
3921
|
-
|
|
3921
|
+
I >>>= 7 & L, L -= 7 & L, m.mode = 27;
|
|
3922
3922
|
break;
|
|
3923
3923
|
}
|
|
3924
3924
|
for (; L < 3; ) {
|
|
3925
3925
|
if (F === 0) break e;
|
|
3926
|
-
F--,
|
|
3926
|
+
F--, I += O[W++] << L, L += 8;
|
|
3927
3927
|
}
|
|
3928
|
-
switch (m.last = 1 &
|
|
3928
|
+
switch (m.last = 1 & I, L -= 1, 3 & (I >>>= 1)) {
|
|
3929
3929
|
case 0:
|
|
3930
3930
|
m.mode = 14;
|
|
3931
3931
|
break;
|
|
3932
3932
|
case 1:
|
|
3933
|
-
if (
|
|
3934
|
-
|
|
3933
|
+
if (G(m), m.mode = 20, B !== 6) break;
|
|
3934
|
+
I >>>= 2, L -= 2;
|
|
3935
3935
|
break e;
|
|
3936
3936
|
case 2:
|
|
3937
3937
|
m.mode = 17;
|
|
@@ -3939,24 +3939,24 @@ function Gt() {
|
|
|
3939
3939
|
case 3:
|
|
3940
3940
|
E.msg = "invalid block type", m.mode = 30;
|
|
3941
3941
|
}
|
|
3942
|
-
|
|
3942
|
+
I >>>= 2, L -= 2;
|
|
3943
3943
|
break;
|
|
3944
3944
|
case 14:
|
|
3945
|
-
for (
|
|
3945
|
+
for (I >>>= 7 & L, L -= 7 & L; L < 32; ) {
|
|
3946
3946
|
if (F === 0) break e;
|
|
3947
|
-
F--,
|
|
3947
|
+
F--, I += O[W++] << L, L += 8;
|
|
3948
3948
|
}
|
|
3949
|
-
if ((65535 &
|
|
3949
|
+
if ((65535 & I) != (I >>> 16 ^ 65535)) {
|
|
3950
3950
|
E.msg = "invalid stored block lengths", m.mode = 30;
|
|
3951
3951
|
break;
|
|
3952
3952
|
}
|
|
3953
|
-
if (m.length = 65535 &
|
|
3953
|
+
if (m.length = 65535 & I, L = I = 0, m.mode = 15, B === 6) break e;
|
|
3954
3954
|
case 15:
|
|
3955
3955
|
m.mode = 16;
|
|
3956
3956
|
case 16:
|
|
3957
3957
|
if (Z = m.length) {
|
|
3958
|
-
if (F < Z && (Z = F),
|
|
3959
|
-
r.arraySet(ee, O, W, Z, te), F -= Z, W += Z,
|
|
3958
|
+
if (F < Z && (Z = F), Q < Z && (Z = Q), Z === 0) break e;
|
|
3959
|
+
r.arraySet(ee, O, W, Z, te), F -= Z, W += Z, Q -= Z, te += Z, m.length -= Z;
|
|
3960
3960
|
break;
|
|
3961
3961
|
}
|
|
3962
3962
|
m.mode = 12;
|
|
@@ -3964,9 +3964,9 @@ function Gt() {
|
|
|
3964
3964
|
case 17:
|
|
3965
3965
|
for (; L < 14; ) {
|
|
3966
3966
|
if (F === 0) break e;
|
|
3967
|
-
F--,
|
|
3967
|
+
F--, I += O[W++] << L, L += 8;
|
|
3968
3968
|
}
|
|
3969
|
-
if (m.nlen = 257 + (31 &
|
|
3969
|
+
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) {
|
|
3970
3970
|
E.msg = "too many length or distance symbols", m.mode = 30;
|
|
3971
3971
|
break;
|
|
3972
3972
|
}
|
|
@@ -3975,46 +3975,46 @@ function Gt() {
|
|
|
3975
3975
|
for (; m.have < m.ncode; ) {
|
|
3976
3976
|
for (; L < 3; ) {
|
|
3977
3977
|
if (F === 0) break e;
|
|
3978
|
-
F--,
|
|
3978
|
+
F--, I += O[W++] << L, L += 8;
|
|
3979
3979
|
}
|
|
3980
|
-
m.lens[V[m.have++]] = 7 &
|
|
3980
|
+
m.lens[V[m.have++]] = 7 & I, I >>>= 3, L -= 3;
|
|
3981
3981
|
}
|
|
3982
3982
|
for (; m.have < 19; ) m.lens[V[m.have++]] = 0;
|
|
3983
|
-
if (m.lencode = m.lendyn, m.lenbits = 7,
|
|
3983
|
+
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) {
|
|
3984
3984
|
E.msg = "invalid code lengths set", m.mode = 30;
|
|
3985
3985
|
break;
|
|
3986
3986
|
}
|
|
3987
3987
|
m.have = 0, m.mode = 19;
|
|
3988
3988
|
case 19:
|
|
3989
3989
|
for (; m.have < m.nlen + m.ndist; ) {
|
|
3990
|
-
for (; re = (
|
|
3990
|
+
for (; re = (x = m.lencode[I & (1 << m.lenbits) - 1]) >>> 16 & 255, de = 65535 & x, !((ie = x >>> 24) <= L); ) {
|
|
3991
3991
|
if (F === 0) break e;
|
|
3992
|
-
F--,
|
|
3992
|
+
F--, I += O[W++] << L, L += 8;
|
|
3993
3993
|
}
|
|
3994
|
-
if (de < 16)
|
|
3994
|
+
if (de < 16) I >>>= ie, L -= ie, m.lens[m.have++] = de;
|
|
3995
3995
|
else {
|
|
3996
3996
|
if (de === 16) {
|
|
3997
|
-
for (
|
|
3997
|
+
for (k = ie + 2; L < k; ) {
|
|
3998
3998
|
if (F === 0) break e;
|
|
3999
|
-
F--,
|
|
3999
|
+
F--, I += O[W++] << L, L += 8;
|
|
4000
4000
|
}
|
|
4001
|
-
if (
|
|
4001
|
+
if (I >>>= ie, L -= ie, m.have === 0) {
|
|
4002
4002
|
E.msg = "invalid bit length repeat", m.mode = 30;
|
|
4003
4003
|
break;
|
|
4004
4004
|
}
|
|
4005
|
-
u = m.lens[m.have - 1], Z = 3 + (3 &
|
|
4005
|
+
u = m.lens[m.have - 1], Z = 3 + (3 & I), I >>>= 2, L -= 2;
|
|
4006
4006
|
} else if (de === 17) {
|
|
4007
|
-
for (
|
|
4007
|
+
for (k = ie + 3; L < k; ) {
|
|
4008
4008
|
if (F === 0) break e;
|
|
4009
|
-
F--,
|
|
4009
|
+
F--, I += O[W++] << L, L += 8;
|
|
4010
4010
|
}
|
|
4011
|
-
L -= ie, u = 0, Z = 3 + (7 & (
|
|
4011
|
+
L -= ie, u = 0, Z = 3 + (7 & (I >>>= ie)), I >>>= 3, L -= 3;
|
|
4012
4012
|
} else {
|
|
4013
|
-
for (
|
|
4013
|
+
for (k = ie + 7; L < k; ) {
|
|
4014
4014
|
if (F === 0) break e;
|
|
4015
|
-
F--,
|
|
4015
|
+
F--, I += O[W++] << L, L += 8;
|
|
4016
4016
|
}
|
|
4017
|
-
L -= ie, u = 0, Z = 11 + (127 & (
|
|
4017
|
+
L -= ie, u = 0, Z = 11 + (127 & (I >>>= ie)), I >>>= 7, L -= 7;
|
|
4018
4018
|
}
|
|
4019
4019
|
if (m.have + Z > m.nlen + m.ndist) {
|
|
4020
4020
|
E.msg = "invalid bit length repeat", m.mode = 30;
|
|
@@ -4028,11 +4028,11 @@ function Gt() {
|
|
|
4028
4028
|
E.msg = "invalid code -- missing end-of-block", m.mode = 30;
|
|
4029
4029
|
break;
|
|
4030
4030
|
}
|
|
4031
|
-
if (m.lenbits = 9,
|
|
4031
|
+
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) {
|
|
4032
4032
|
E.msg = "invalid literal/lengths set", m.mode = 30;
|
|
4033
4033
|
break;
|
|
4034
4034
|
}
|
|
4035
|
-
if (m.distbits = 6, m.distcode = m.distdyn,
|
|
4035
|
+
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) {
|
|
4036
4036
|
E.msg = "invalid distances set", m.mode = 30;
|
|
4037
4037
|
break;
|
|
4038
4038
|
}
|
|
@@ -4040,22 +4040,22 @@ function Gt() {
|
|
|
4040
4040
|
case 20:
|
|
4041
4041
|
m.mode = 21;
|
|
4042
4042
|
case 21:
|
|
4043
|
-
if (6 <= F && 258 <=
|
|
4044
|
-
E.next_out = te, E.avail_out =
|
|
4043
|
+
if (6 <= F && 258 <= Q) {
|
|
4044
|
+
E.next_out = te, E.avail_out = Q, E.next_in = W, E.avail_in = F, m.hold = I, m.bits = L, a(E, Y), te = E.next_out, ee = E.output, Q = E.avail_out, W = E.next_in, O = E.input, F = E.avail_in, I = m.hold, L = m.bits, m.mode === 12 && (m.back = -1);
|
|
4045
4045
|
break;
|
|
4046
4046
|
}
|
|
4047
|
-
for (m.back = 0; re = (
|
|
4047
|
+
for (m.back = 0; re = (x = m.lencode[I & (1 << m.lenbits) - 1]) >>> 16 & 255, de = 65535 & x, !((ie = x >>> 24) <= L); ) {
|
|
4048
4048
|
if (F === 0) break e;
|
|
4049
|
-
F--,
|
|
4049
|
+
F--, I += O[W++] << L, L += 8;
|
|
4050
4050
|
}
|
|
4051
4051
|
if (re && (240 & re) == 0) {
|
|
4052
|
-
for (le = ie, ge = re, me = de; re = (
|
|
4052
|
+
for (le = ie, ge = re, me = de; re = (x = m.lencode[me + ((I & (1 << le + ge) - 1) >> le)]) >>> 16 & 255, de = 65535 & x, !(le + (ie = x >>> 24) <= L); ) {
|
|
4053
4053
|
if (F === 0) break e;
|
|
4054
|
-
F--,
|
|
4054
|
+
F--, I += O[W++] << L, L += 8;
|
|
4055
4055
|
}
|
|
4056
|
-
|
|
4056
|
+
I >>>= le, L -= le, m.back += le;
|
|
4057
4057
|
}
|
|
4058
|
-
if (
|
|
4058
|
+
if (I >>>= ie, L -= ie, m.back += ie, m.length = de, re === 0) {
|
|
4059
4059
|
m.mode = 26;
|
|
4060
4060
|
break;
|
|
4061
4061
|
}
|
|
@@ -4070,37 +4070,37 @@ function Gt() {
|
|
|
4070
4070
|
m.extra = 15 & re, m.mode = 22;
|
|
4071
4071
|
case 22:
|
|
4072
4072
|
if (m.extra) {
|
|
4073
|
-
for (
|
|
4073
|
+
for (k = m.extra; L < k; ) {
|
|
4074
4074
|
if (F === 0) break e;
|
|
4075
|
-
F--,
|
|
4075
|
+
F--, I += O[W++] << L, L += 8;
|
|
4076
4076
|
}
|
|
4077
|
-
m.length +=
|
|
4077
|
+
m.length += I & (1 << m.extra) - 1, I >>>= m.extra, L -= m.extra, m.back += m.extra;
|
|
4078
4078
|
}
|
|
4079
4079
|
m.was = m.length, m.mode = 23;
|
|
4080
4080
|
case 23:
|
|
4081
|
-
for (; re = (
|
|
4081
|
+
for (; re = (x = m.distcode[I & (1 << m.distbits) - 1]) >>> 16 & 255, de = 65535 & x, !((ie = x >>> 24) <= L); ) {
|
|
4082
4082
|
if (F === 0) break e;
|
|
4083
|
-
F--,
|
|
4083
|
+
F--, I += O[W++] << L, L += 8;
|
|
4084
4084
|
}
|
|
4085
4085
|
if ((240 & re) == 0) {
|
|
4086
|
-
for (le = ie, ge = re, me = de; re = (
|
|
4086
|
+
for (le = ie, ge = re, me = de; re = (x = m.distcode[me + ((I & (1 << le + ge) - 1) >> le)]) >>> 16 & 255, de = 65535 & x, !(le + (ie = x >>> 24) <= L); ) {
|
|
4087
4087
|
if (F === 0) break e;
|
|
4088
|
-
F--,
|
|
4088
|
+
F--, I += O[W++] << L, L += 8;
|
|
4089
4089
|
}
|
|
4090
|
-
|
|
4090
|
+
I >>>= le, L -= le, m.back += le;
|
|
4091
4091
|
}
|
|
4092
|
-
if (
|
|
4092
|
+
if (I >>>= ie, L -= ie, m.back += ie, 64 & re) {
|
|
4093
4093
|
E.msg = "invalid distance code", m.mode = 30;
|
|
4094
4094
|
break;
|
|
4095
4095
|
}
|
|
4096
4096
|
m.offset = de, m.extra = 15 & re, m.mode = 24;
|
|
4097
4097
|
case 24:
|
|
4098
4098
|
if (m.extra) {
|
|
4099
|
-
for (
|
|
4099
|
+
for (k = m.extra; L < k; ) {
|
|
4100
4100
|
if (F === 0) break e;
|
|
4101
|
-
F--,
|
|
4101
|
+
F--, I += O[W++] << L, L += 8;
|
|
4102
4102
|
}
|
|
4103
|
-
m.offset +=
|
|
4103
|
+
m.offset += I & (1 << m.extra) - 1, I >>>= m.extra, L -= m.extra, m.back += m.extra;
|
|
4104
4104
|
}
|
|
4105
4105
|
if (m.offset > m.dmax) {
|
|
4106
4106
|
E.msg = "invalid distance too far back", m.mode = 30;
|
|
@@ -4108,45 +4108,45 @@ function Gt() {
|
|
|
4108
4108
|
}
|
|
4109
4109
|
m.mode = 25;
|
|
4110
4110
|
case 25:
|
|
4111
|
-
if (
|
|
4112
|
-
if (Z = Y -
|
|
4111
|
+
if (Q === 0) break e;
|
|
4112
|
+
if (Z = Y - Q, m.offset > Z) {
|
|
4113
4113
|
if ((Z = m.offset - Z) > m.whave && m.sane) {
|
|
4114
4114
|
E.msg = "invalid distance too far back", m.mode = 30;
|
|
4115
4115
|
break;
|
|
4116
4116
|
}
|
|
4117
4117
|
ae = Z > m.wnext ? (Z -= m.wnext, m.wsize - Z) : m.wnext - Z, Z > m.length && (Z = m.length), ue = m.window;
|
|
4118
4118
|
} else ue = ee, ae = te - m.offset, Z = m.length;
|
|
4119
|
-
for (
|
|
4119
|
+
for (Q < Z && (Z = Q), Q -= Z, m.length -= Z; ee[te++] = ue[ae++], --Z; ) ;
|
|
4120
4120
|
m.length === 0 && (m.mode = 21);
|
|
4121
4121
|
break;
|
|
4122
4122
|
case 26:
|
|
4123
|
-
if (
|
|
4124
|
-
ee[te++] = m.length,
|
|
4123
|
+
if (Q === 0) break e;
|
|
4124
|
+
ee[te++] = m.length, Q--, m.mode = 21;
|
|
4125
4125
|
break;
|
|
4126
4126
|
case 27:
|
|
4127
4127
|
if (m.wrap) {
|
|
4128
4128
|
for (; L < 32; ) {
|
|
4129
4129
|
if (F === 0) break e;
|
|
4130
|
-
F--,
|
|
4130
|
+
F--, I |= O[W++] << L, L += 8;
|
|
4131
4131
|
}
|
|
4132
|
-
if (Y -=
|
|
4132
|
+
if (Y -= Q, 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 = Q, (m.flags ? I : v(I)) !== m.check) {
|
|
4133
4133
|
E.msg = "incorrect data check", m.mode = 30;
|
|
4134
4134
|
break;
|
|
4135
4135
|
}
|
|
4136
|
-
L =
|
|
4136
|
+
L = I = 0;
|
|
4137
4137
|
}
|
|
4138
4138
|
m.mode = 28;
|
|
4139
4139
|
case 28:
|
|
4140
4140
|
if (m.wrap && m.flags) {
|
|
4141
4141
|
for (; L < 32; ) {
|
|
4142
4142
|
if (F === 0) break e;
|
|
4143
|
-
F--,
|
|
4143
|
+
F--, I += O[W++] << L, L += 8;
|
|
4144
4144
|
}
|
|
4145
|
-
if (
|
|
4145
|
+
if (I !== (4294967295 & m.total)) {
|
|
4146
4146
|
E.msg = "incorrect length check", m.mode = 30;
|
|
4147
4147
|
break;
|
|
4148
4148
|
}
|
|
4149
|
-
L =
|
|
4149
|
+
L = I = 0;
|
|
4150
4150
|
}
|
|
4151
4151
|
m.mode = 29;
|
|
4152
4152
|
case 29:
|
|
@@ -4161,7 +4161,7 @@ function Gt() {
|
|
|
4161
4161
|
default:
|
|
4162
4162
|
return d;
|
|
4163
4163
|
}
|
|
4164
|
-
return E.next_out = te, E.avail_out =
|
|
4164
|
+
return E.next_out = te, E.avail_out = Q, E.next_in = W, 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) : (J -= E.avail_in, Y -= E.avail_out, E.total_in += J, 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), (J == 0 && Y === 0 || B === 4) && N === p && (N = -5), N);
|
|
4165
4165
|
}, n.inflateEnd = function(E) {
|
|
4166
4166
|
if (!E || !E.state) return d;
|
|
4167
4167
|
var B = E.state;
|
|
@@ -4176,7 +4176,7 @@ function Gt() {
|
|
|
4176
4176
|
}, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./inffast": 48, "./inftrees": 50 }], 50: [function(t, i, n) {
|
|
4177
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];
|
|
4178
4178
|
i.exports = function(c, f, p, d, y, h, g, v) {
|
|
4179
|
-
var
|
|
4179
|
+
var w, M, S, C, R, D, U, z, G, q = v.bits, E = 0, B = 0, m = 0, O = 0, ee = 0, W = 0, te = 0, F = 0, Q = 0, I = 0, L = null, J = 0, Y = new r.Buf16(16), Z = new r.Buf16(16), ae = null, ue = 0;
|
|
4180
4180
|
for (E = 0; E <= 15; E++) Y[E] = 0;
|
|
4181
4181
|
for (B = 0; B < d; B++) Y[f[p + B]]++;
|
|
4182
4182
|
for (ee = q, O = 15; 1 <= O && Y[O] === 0; O--) ;
|
|
@@ -4186,30 +4186,30 @@ function Gt() {
|
|
|
4186
4186
|
if (0 < F && (c === 0 || O !== 1)) return -1;
|
|
4187
4187
|
for (Z[1] = 0, E = 1; E < 15; E++) Z[E + 1] = Z[E] + Y[E];
|
|
4188
4188
|
for (B = 0; B < d; B++) f[p + B] !== 0 && (g[Z[f[p + B]]++] = B);
|
|
4189
|
-
if (
|
|
4189
|
+
if (D = c === 0 ? (L = ae = g, 19) : c === 1 ? (L = s, J -= 257, ae = o, ue -= 257, 256) : (L = a, ae = l, -1), E = m, R = h, te = B = I = 0, S = -1, C = (Q = 1 << (W = ee)) - 1, c === 1 && 852 < Q || c === 2 && 592 < Q) return 1;
|
|
4190
4190
|
for (; ; ) {
|
|
4191
|
-
for (U = E - te,
|
|
4192
|
-
for (
|
|
4193
|
-
if (
|
|
4191
|
+
for (U = E - te, G = g[B] < D ? (z = 0, g[B]) : g[B] > D ? (z = ae[ue + g[B]], L[J + g[B]]) : (z = 96, 0), w = 1 << E - te, m = M = 1 << W; y[R + (I >> te) + (M -= w)] = U << 24 | z << 16 | G | 0, M !== 0; ) ;
|
|
4192
|
+
for (w = 1 << E - 1; I & w; ) w >>= 1;
|
|
4193
|
+
if (w !== 0 ? (I &= w - 1, I += w) : I = 0, B++, --Y[E] == 0) {
|
|
4194
4194
|
if (E === O) break;
|
|
4195
4195
|
E = f[p + g[B]];
|
|
4196
4196
|
}
|
|
4197
|
-
if (ee < E && (
|
|
4197
|
+
if (ee < E && (I & C) !== S) {
|
|
4198
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 (
|
|
4200
|
-
y[S =
|
|
4199
|
+
if (Q += 1 << W, c === 1 && 852 < Q || c === 2 && 592 < Q) return 1;
|
|
4200
|
+
y[S = I & C] = ee << 24 | W << 16 | R - h | 0;
|
|
4201
4201
|
}
|
|
4202
4202
|
}
|
|
4203
|
-
return
|
|
4203
|
+
return I !== 0 && (y[R + I] = E - te << 24 | 64 << 16 | 0), v.bits = ee, 0;
|
|
4204
4204
|
};
|
|
4205
4205
|
}, { "../utils/common": 41 }], 51: [function(t, i, n) {
|
|
4206
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" };
|
|
4207
4207
|
}, {}], 52: [function(t, i, n) {
|
|
4208
4208
|
var r = t("../utils/common"), s = 0, o = 1;
|
|
4209
|
-
function a(
|
|
4210
|
-
for (var T =
|
|
4209
|
+
function a(x) {
|
|
4210
|
+
for (var T = x.length; 0 <= --T; ) x[T] = 0;
|
|
4211
4211
|
}
|
|
4212
|
-
var l = 0, c = 29, f = 256, p = f + 1 + c, d = 30, y = 19, h = 2 * p + 1, g = 15, v = 16,
|
|
4212
|
+
var l = 0, c = 29, f = 256, p = f + 1 + c, d = 30, y = 19, h = 2 * p + 1, g = 15, v = 16, w = 7, M = 256, S = 16, C = 17, R = 18, D = [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], z = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7], G = [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));
|
|
4213
4213
|
a(q);
|
|
4214
4214
|
var E = new Array(2 * d);
|
|
4215
4215
|
a(E);
|
|
@@ -4220,134 +4220,134 @@ function Gt() {
|
|
|
4220
4220
|
var O = new Array(c);
|
|
4221
4221
|
a(O);
|
|
4222
4222
|
var ee, W, te, F = new Array(d);
|
|
4223
|
-
function
|
|
4224
|
-
this.static_tree =
|
|
4223
|
+
function Q(x, T, V, j, A) {
|
|
4224
|
+
this.static_tree = x, this.extra_bits = T, this.extra_base = V, this.elems = j, this.max_length = A, this.has_stree = x && x.length;
|
|
4225
4225
|
}
|
|
4226
|
-
function
|
|
4227
|
-
this.dyn_tree =
|
|
4226
|
+
function I(x, T) {
|
|
4227
|
+
this.dyn_tree = x, this.max_code = 0, this.stat_desc = T;
|
|
4228
4228
|
}
|
|
4229
|
-
function L(
|
|
4230
|
-
return
|
|
4229
|
+
function L(x) {
|
|
4230
|
+
return x < 256 ? B[x] : B[256 + (x >>> 7)];
|
|
4231
4231
|
}
|
|
4232
|
-
function
|
|
4233
|
-
|
|
4232
|
+
function J(x, T) {
|
|
4233
|
+
x.pending_buf[x.pending++] = 255 & T, x.pending_buf[x.pending++] = T >>> 8 & 255;
|
|
4234
4234
|
}
|
|
4235
|
-
function Y(
|
|
4236
|
-
|
|
4235
|
+
function Y(x, T, V) {
|
|
4236
|
+
x.bi_valid > v - V ? (x.bi_buf |= T << x.bi_valid & 65535, J(x, x.bi_buf), x.bi_buf = T >> v - x.bi_valid, x.bi_valid += V - v) : (x.bi_buf |= T << x.bi_valid & 65535, x.bi_valid += V);
|
|
4237
4237
|
}
|
|
4238
|
-
function Z(
|
|
4239
|
-
Y(
|
|
4238
|
+
function Z(x, T, V) {
|
|
4239
|
+
Y(x, V[2 * T], V[2 * T + 1]);
|
|
4240
4240
|
}
|
|
4241
|
-
function ae(
|
|
4242
|
-
for (var V = 0; V |= 1 &
|
|
4241
|
+
function ae(x, T) {
|
|
4242
|
+
for (var V = 0; V |= 1 & x, x >>>= 1, V <<= 1, 0 < --T; ) ;
|
|
4243
4243
|
return V >>> 1;
|
|
4244
4244
|
}
|
|
4245
|
-
function ue(
|
|
4246
|
-
var j, A,
|
|
4247
|
-
for (j = 1; j <= g; j++)
|
|
4245
|
+
function ue(x, T, V) {
|
|
4246
|
+
var j, A, H = new Array(g + 1), K = 0;
|
|
4247
|
+
for (j = 1; j <= g; j++) H[j] = K = K + V[j - 1] << 1;
|
|
4248
4248
|
for (A = 0; A <= T; A++) {
|
|
4249
|
-
var $ =
|
|
4250
|
-
$ !== 0 && (
|
|
4249
|
+
var $ = x[2 * A + 1];
|
|
4250
|
+
$ !== 0 && (x[2 * A] = ae(H[$]++, $));
|
|
4251
4251
|
}
|
|
4252
4252
|
}
|
|
4253
|
-
function ie(
|
|
4253
|
+
function ie(x) {
|
|
4254
4254
|
var T;
|
|
4255
|
-
for (T = 0; T < p; T++)
|
|
4256
|
-
for (T = 0; T < d; T++)
|
|
4257
|
-
for (T = 0; T < y; T++)
|
|
4258
|
-
|
|
4255
|
+
for (T = 0; T < p; T++) x.dyn_ltree[2 * T] = 0;
|
|
4256
|
+
for (T = 0; T < d; T++) x.dyn_dtree[2 * T] = 0;
|
|
4257
|
+
for (T = 0; T < y; T++) x.bl_tree[2 * T] = 0;
|
|
4258
|
+
x.dyn_ltree[2 * M] = 1, x.opt_len = x.static_len = 0, x.last_lit = x.matches = 0;
|
|
4259
4259
|
}
|
|
4260
|
-
function re(
|
|
4261
|
-
8 <
|
|
4260
|
+
function re(x) {
|
|
4261
|
+
8 < x.bi_valid ? J(x, x.bi_buf) : 0 < x.bi_valid && (x.pending_buf[x.pending++] = x.bi_buf), x.bi_buf = 0, x.bi_valid = 0;
|
|
4262
4262
|
}
|
|
4263
|
-
function de(
|
|
4264
|
-
var A = 2 * T,
|
|
4265
|
-
return
|
|
4263
|
+
function de(x, T, V, j) {
|
|
4264
|
+
var A = 2 * T, H = 2 * V;
|
|
4265
|
+
return x[A] < x[H] || x[A] === x[H] && j[T] <= j[V];
|
|
4266
4266
|
}
|
|
4267
|
-
function le(
|
|
4268
|
-
for (var j =
|
|
4269
|
-
|
|
4267
|
+
function le(x, T, V) {
|
|
4268
|
+
for (var j = x.heap[V], A = V << 1; A <= x.heap_len && (A < x.heap_len && de(T, x.heap[A + 1], x.heap[A], x.depth) && A++, !de(T, j, x.heap[A], x.depth)); ) x.heap[V] = x.heap[A], V = A, A <<= 1;
|
|
4269
|
+
x.heap[V] = j;
|
|
4270
4270
|
}
|
|
4271
|
-
function ge(
|
|
4272
|
-
var j, A,
|
|
4273
|
-
if (
|
|
4274
|
-
Z(
|
|
4271
|
+
function ge(x, T, V) {
|
|
4272
|
+
var j, A, H, K, $ = 0;
|
|
4273
|
+
if (x.last_lit !== 0) for (; j = x.pending_buf[x.d_buf + 2 * $] << 8 | x.pending_buf[x.d_buf + 2 * $ + 1], A = x.pending_buf[x.l_buf + $], $++, j === 0 ? Z(x, A, T) : (Z(x, (H = m[A]) + f + 1, T), (K = D[H]) !== 0 && Y(x, A -= O[H], K), Z(x, H = L(--j), V), (K = U[H]) !== 0 && Y(x, j -= F[H], K)), $ < x.last_lit; ) ;
|
|
4274
|
+
Z(x, M, T);
|
|
4275
4275
|
}
|
|
4276
|
-
function me(
|
|
4277
|
-
var V, j, A,
|
|
4278
|
-
for (
|
|
4279
|
-
for (;
|
|
4280
|
-
for (T.max_code = se, V =
|
|
4281
|
-
for (A =
|
|
4282
|
-
|
|
4283
|
-
var ke, ye, Me, he,
|
|
4276
|
+
function me(x, T) {
|
|
4277
|
+
var V, j, A, H = T.dyn_tree, K = T.stat_desc.static_tree, $ = T.stat_desc.has_stree, X = T.stat_desc.elems, se = -1;
|
|
4278
|
+
for (x.heap_len = 0, x.heap_max = h, V = 0; V < X; V++) H[2 * V] !== 0 ? (x.heap[++x.heap_len] = se = V, x.depth[V] = 0) : H[2 * V + 1] = 0;
|
|
4279
|
+
for (; x.heap_len < 2; ) H[2 * (A = x.heap[++x.heap_len] = se < 2 ? ++se : 0)] = 1, x.depth[A] = 0, x.opt_len--, $ && (x.static_len -= K[2 * A + 1]);
|
|
4280
|
+
for (T.max_code = se, V = x.heap_len >> 1; 1 <= V; V--) le(x, H, V);
|
|
4281
|
+
for (A = X; V = x.heap[1], x.heap[1] = x.heap[x.heap_len--], le(x, H, 1), j = x.heap[1], x.heap[--x.heap_max] = V, x.heap[--x.heap_max] = j, H[2 * A] = H[2 * V] + H[2 * j], x.depth[A] = (x.depth[V] >= x.depth[j] ? x.depth[V] : x.depth[j]) + 1, H[2 * V + 1] = H[2 * j + 1] = A, x.heap[1] = A++, le(x, H, 1), 2 <= x.heap_len; ) ;
|
|
4282
|
+
x.heap[--x.heap_max] = x.heap[1], (function(ne, pe) {
|
|
4283
|
+
var ke, ye, Me, he, Ae, Ve, ve = pe.dyn_tree, Ke = pe.max_code, gt = pe.stat_desc.static_tree, yt = pe.stat_desc.has_stree, vt = pe.stat_desc.extra_bits, Xe = pe.stat_desc.extra_base, _e = pe.stat_desc.max_length, Le = 0;
|
|
4284
4284
|
for (he = 0; he <= g; he++) ne.bl_count[he] = 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,
|
|
4286
|
-
if (
|
|
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, Le++), ve[2 * ye + 1] = he, Ke < ye || (ne.bl_count[he]++, Ae = 0, Xe <= ye && (Ae = vt[ye - Xe]), Ve = ve[2 * ye], ne.opt_len += Ve * (he + Ae), yt && (ne.static_len += Ve * (gt[2 * ye + 1] + Ae)));
|
|
4286
|
+
if (Le !== 0) {
|
|
4287
4287
|
do {
|
|
4288
4288
|
for (he = _e - 1; ne.bl_count[he] === 0; ) he--;
|
|
4289
|
-
ne.bl_count[he]--, ne.bl_count[he + 1] += 2, ne.bl_count[_e]--,
|
|
4290
|
-
} while (0 <
|
|
4291
|
-
for (he = _e; he !== 0; he--) for (ye = ne.bl_count[he]; ye !== 0; )
|
|
4289
|
+
ne.bl_count[he]--, ne.bl_count[he + 1] += 2, ne.bl_count[_e]--, Le -= 2;
|
|
4290
|
+
} while (0 < Le);
|
|
4291
|
+
for (he = _e; he !== 0; he--) for (ye = ne.bl_count[he]; ye !== 0; ) Ke < (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--);
|
|
4292
4292
|
}
|
|
4293
|
-
})(
|
|
4293
|
+
})(x, T), ue(H, se, x.bl_count);
|
|
4294
4294
|
}
|
|
4295
|
-
function u(
|
|
4296
|
-
var j, A,
|
|
4297
|
-
for (
|
|
4295
|
+
function u(x, T, V) {
|
|
4296
|
+
var j, A, H = -1, K = T[1], $ = 0, X = 7, se = 4;
|
|
4297
|
+
for (K === 0 && (X = 138, se = 3), T[2 * (V + 1) + 1] = 65535, j = 0; j <= V; j++) A = K, K = T[2 * (j + 1) + 1], ++$ < X && A === K || ($ < se ? x.bl_tree[2 * A] += $ : A !== 0 ? (A !== H && x.bl_tree[2 * A]++, x.bl_tree[2 * S]++) : $ <= 10 ? x.bl_tree[2 * C]++ : x.bl_tree[2 * R]++, H = A, se = ($ = 0) === K ? (X = 138, 3) : A === K ? (X = 6, 3) : (X = 7, 4));
|
|
4298
4298
|
}
|
|
4299
|
-
function N(
|
|
4300
|
-
var j, A,
|
|
4301
|
-
for (
|
|
4302
|
-
if ($ < se) for (; Z(
|
|
4303
|
-
else A !== 0 ? (A !==
|
|
4304
|
-
|
|
4299
|
+
function N(x, T, V) {
|
|
4300
|
+
var j, A, H = -1, K = T[1], $ = 0, X = 7, se = 4;
|
|
4301
|
+
for (K === 0 && (X = 138, se = 3), j = 0; j <= V; j++) if (A = K, K = T[2 * (j + 1) + 1], !(++$ < X && A === K)) {
|
|
4302
|
+
if ($ < se) for (; Z(x, A, x.bl_tree), --$ != 0; ) ;
|
|
4303
|
+
else A !== 0 ? (A !== H && (Z(x, A, x.bl_tree), $--), Z(x, S, x.bl_tree), Y(x, $ - 3, 2)) : $ <= 10 ? (Z(x, C, x.bl_tree), Y(x, $ - 3, 3)) : (Z(x, R, x.bl_tree), Y(x, $ - 11, 7));
|
|
4304
|
+
H = A, se = ($ = 0) === K ? (X = 138, 3) : A === K ? (X = 6, 3) : (X = 7, 4);
|
|
4305
4305
|
}
|
|
4306
4306
|
}
|
|
4307
4307
|
a(F);
|
|
4308
|
-
var
|
|
4309
|
-
function x
|
|
4310
|
-
Y(
|
|
4311
|
-
re(A),
|
|
4312
|
-
})(
|
|
4308
|
+
var P = !1;
|
|
4309
|
+
function k(x, T, V, j) {
|
|
4310
|
+
Y(x, (l << 1) + (j ? 1 : 0), 3), (function(A, H, K, $) {
|
|
4311
|
+
re(A), J(A, K), J(A, ~K), r.arraySet(A.pending_buf, A.window, H, K, A.pending), A.pending += K;
|
|
4312
|
+
})(x, T, V);
|
|
4313
4313
|
}
|
|
4314
|
-
n._tr_init = function(
|
|
4315
|
-
|
|
4316
|
-
var T, V, j, A,
|
|
4317
|
-
for (A = j = 0; A < c - 1; A++) for (O[A] = j, T = 0; T < 1 <<
|
|
4318
|
-
for (m[j - 1] = A, A =
|
|
4319
|
-
for (
|
|
4320
|
-
for (V = 0; V <= g; V++)
|
|
4321
|
-
for (T = 0; T <= 143; ) q[2 * T + 1] = 8, T++,
|
|
4322
|
-
for (; T <= 255; ) q[2 * T + 1] = 9, T++,
|
|
4323
|
-
for (; T <= 279; ) q[2 * T + 1] = 7, T++,
|
|
4324
|
-
for (; T <= 287; ) q[2 * T + 1] = 8, T++,
|
|
4325
|
-
for (ue(q, p + 1,
|
|
4326
|
-
ee = new
|
|
4327
|
-
})(),
|
|
4328
|
-
}, n._tr_stored_block =
|
|
4329
|
-
var A,
|
|
4330
|
-
0 <
|
|
4331
|
-
var
|
|
4332
|
-
for (
|
|
4314
|
+
n._tr_init = function(x) {
|
|
4315
|
+
P || ((function() {
|
|
4316
|
+
var T, V, j, A, H, K = new Array(g + 1);
|
|
4317
|
+
for (A = j = 0; A < c - 1; A++) for (O[A] = j, T = 0; T < 1 << D[A]; T++) m[j++] = A;
|
|
4318
|
+
for (m[j - 1] = A, A = H = 0; A < 16; A++) for (F[A] = H, T = 0; T < 1 << U[A]; T++) B[H++] = A;
|
|
4319
|
+
for (H >>= 7; A < d; A++) for (F[A] = H << 7, T = 0; T < 1 << U[A] - 7; T++) B[256 + H++] = A;
|
|
4320
|
+
for (V = 0; V <= g; V++) K[V] = 0;
|
|
4321
|
+
for (T = 0; T <= 143; ) q[2 * T + 1] = 8, T++, K[8]++;
|
|
4322
|
+
for (; T <= 255; ) q[2 * T + 1] = 9, T++, K[9]++;
|
|
4323
|
+
for (; T <= 279; ) q[2 * T + 1] = 7, T++, K[7]++;
|
|
4324
|
+
for (; T <= 287; ) q[2 * T + 1] = 8, T++, K[8]++;
|
|
4325
|
+
for (ue(q, p + 1, K), T = 0; T < d; T++) E[2 * T + 1] = 5, E[2 * T] = ae(T, 5);
|
|
4326
|
+
ee = new Q(q, D, f + 1, p, g), W = new Q(E, U, 0, d, g), te = new Q(new Array(0), z, 0, y, w);
|
|
4327
|
+
})(), P = !0), x.l_desc = new I(x.dyn_ltree, ee), x.d_desc = new I(x.dyn_dtree, W), x.bl_desc = new I(x.bl_tree, te), x.bi_buf = 0, x.bi_valid = 0, ie(x);
|
|
4328
|
+
}, n._tr_stored_block = k, n._tr_flush_block = function(x, T, V, j) {
|
|
4329
|
+
var A, H, K = 0;
|
|
4330
|
+
0 < x.level ? (x.strm.data_type === 2 && (x.strm.data_type = (function($) {
|
|
4331
|
+
var X, se = 4093624447;
|
|
4332
|
+
for (X = 0; X <= 31; X++, se >>>= 1) if (1 & se && $.dyn_ltree[2 * X] !== 0) return s;
|
|
4333
4333
|
if ($.dyn_ltree[18] !== 0 || $.dyn_ltree[20] !== 0 || $.dyn_ltree[26] !== 0) return o;
|
|
4334
|
-
for (
|
|
4334
|
+
for (X = 32; X < f; X++) if ($.dyn_ltree[2 * X] !== 0) return o;
|
|
4335
4335
|
return s;
|
|
4336
|
-
})(
|
|
4337
|
-
var
|
|
4338
|
-
for (u($, $.dyn_ltree, $.l_desc.max_code), u($, $.dyn_dtree, $.d_desc.max_code), me($, $.bl_desc),
|
|
4339
|
-
return $.opt_len += 3 * (
|
|
4340
|
-
})(
|
|
4336
|
+
})(x)), me(x, x.l_desc), me(x, x.d_desc), K = (function($) {
|
|
4337
|
+
var X;
|
|
4338
|
+
for (u($, $.dyn_ltree, $.l_desc.max_code), u($, $.dyn_dtree, $.d_desc.max_code), me($, $.bl_desc), X = y - 1; 3 <= X && $.bl_tree[2 * G[X] + 1] === 0; X--) ;
|
|
4339
|
+
return $.opt_len += 3 * (X + 1) + 5 + 5 + 4, X;
|
|
4340
|
+
})(x), A = x.opt_len + 3 + 7 >>> 3, (H = x.static_len + 3 + 7 >>> 3) <= A && (A = H)) : A = H = V + 5, V + 4 <= A && T !== -1 ? k(x, T, V, j) : x.strategy === 4 || H === A ? (Y(x, 2 + (j ? 1 : 0), 3), ge(x, q, E)) : (Y(x, 4 + (j ? 1 : 0), 3), (function($, X, se, ne) {
|
|
4341
4341
|
var pe;
|
|
4342
|
-
for (Y($,
|
|
4343
|
-
N($, $.dyn_ltree,
|
|
4344
|
-
})(
|
|
4345
|
-
}, n._tr_tally = function(
|
|
4346
|
-
return
|
|
4347
|
-
}, n._tr_align = function(
|
|
4348
|
-
Y(
|
|
4349
|
-
T.bi_valid === 16 ? (
|
|
4350
|
-
})(
|
|
4342
|
+
for (Y($, X - 257, 5), Y($, se - 1, 5), Y($, ne - 4, 4), pe = 0; pe < ne; pe++) Y($, $.bl_tree[2 * G[pe] + 1], 3);
|
|
4343
|
+
N($, $.dyn_ltree, X - 1), N($, $.dyn_dtree, se - 1);
|
|
4344
|
+
})(x, x.l_desc.max_code + 1, x.d_desc.max_code + 1, K + 1), ge(x, x.dyn_ltree, x.dyn_dtree)), ie(x), j && re(x);
|
|
4345
|
+
}, n._tr_tally = function(x, T, V) {
|
|
4346
|
+
return x.pending_buf[x.d_buf + 2 * x.last_lit] = T >>> 8 & 255, x.pending_buf[x.d_buf + 2 * x.last_lit + 1] = 255 & T, x.pending_buf[x.l_buf + x.last_lit] = 255 & V, x.last_lit++, T === 0 ? x.dyn_ltree[2 * V]++ : (x.matches++, T--, x.dyn_ltree[2 * (m[V] + f + 1)]++, x.dyn_dtree[2 * L(T)]++), x.last_lit === x.lit_bufsize - 1;
|
|
4347
|
+
}, n._tr_align = function(x) {
|
|
4348
|
+
Y(x, 2, 3), Z(x, M, q), (function(T) {
|
|
4349
|
+
T.bi_valid === 16 ? (J(T, T.bi_buf), T.bi_buf = 0, T.bi_valid = 0) : 8 <= T.bi_valid && (T.pending_buf[T.pending++] = 255 & T.bi_buf, T.bi_buf >>= 8, T.bi_valid -= 8);
|
|
4350
|
+
})(x);
|
|
4351
4351
|
};
|
|
4352
4352
|
}, { "../utils/common": 41 }], 53: [function(t, i, n) {
|
|
4353
4353
|
i.exports = function() {
|
|
@@ -4360,7 +4360,7 @@ function Gt() {
|
|
|
4360
4360
|
var a, l, c, f, p = 1, d = {}, y = !1, h = s.document, g = Object.getPrototypeOf && Object.getPrototypeOf(s);
|
|
4361
4361
|
g = g && g.setTimeout ? g : s, a = {}.toString.call(s.process) === "[object process]" ? function(S) {
|
|
4362
4362
|
process.nextTick(function() {
|
|
4363
|
-
|
|
4363
|
+
w(S);
|
|
4364
4364
|
});
|
|
4365
4365
|
} : (function() {
|
|
4366
4366
|
if (s.postMessage && !s.importScripts) {
|
|
@@ -4369,53 +4369,53 @@ function Gt() {
|
|
|
4369
4369
|
S = !1;
|
|
4370
4370
|
}, s.postMessage("", "*"), s.onmessage = C, S;
|
|
4371
4371
|
}
|
|
4372
|
-
})() ? (f = "setImmediate$" + Math.random() + "$", s.addEventListener ? s.addEventListener("message",
|
|
4372
|
+
})() ? (f = "setImmediate$" + Math.random() + "$", s.addEventListener ? s.addEventListener("message", M, !1) : s.attachEvent("onmessage", M), function(S) {
|
|
4373
4373
|
s.postMessage(f + S, "*");
|
|
4374
4374
|
}) : s.MessageChannel ? ((c = new MessageChannel()).port1.onmessage = function(S) {
|
|
4375
|
-
|
|
4375
|
+
w(S.data);
|
|
4376
4376
|
}, function(S) {
|
|
4377
4377
|
c.port2.postMessage(S);
|
|
4378
4378
|
}) : h && "onreadystatechange" in h.createElement("script") ? (l = h.documentElement, function(S) {
|
|
4379
4379
|
var C = h.createElement("script");
|
|
4380
4380
|
C.onreadystatechange = function() {
|
|
4381
|
-
|
|
4381
|
+
w(S), C.onreadystatechange = null, l.removeChild(C), C = null;
|
|
4382
4382
|
}, l.appendChild(C);
|
|
4383
4383
|
}) : function(S) {
|
|
4384
|
-
setTimeout(
|
|
4384
|
+
setTimeout(w, 0, S);
|
|
4385
4385
|
}, g.setImmediate = function(S) {
|
|
4386
4386
|
typeof S != "function" && (S = new Function("" + S));
|
|
4387
4387
|
for (var C = new Array(arguments.length - 1), R = 0; R < C.length; R++) C[R] = arguments[R + 1];
|
|
4388
|
-
var
|
|
4389
|
-
return d[p] =
|
|
4388
|
+
var D = { callback: S, args: C };
|
|
4389
|
+
return d[p] = D, a(p), p++;
|
|
4390
4390
|
}, g.clearImmediate = v;
|
|
4391
4391
|
}
|
|
4392
4392
|
function v(S) {
|
|
4393
4393
|
delete d[S];
|
|
4394
4394
|
}
|
|
4395
|
-
function
|
|
4396
|
-
if (y) setTimeout(
|
|
4395
|
+
function w(S) {
|
|
4396
|
+
if (y) setTimeout(w, 0, S);
|
|
4397
4397
|
else {
|
|
4398
4398
|
var C = d[S];
|
|
4399
4399
|
if (C) {
|
|
4400
4400
|
y = !0;
|
|
4401
4401
|
try {
|
|
4402
4402
|
(function(R) {
|
|
4403
|
-
var
|
|
4403
|
+
var D = R.callback, U = R.args;
|
|
4404
4404
|
switch (U.length) {
|
|
4405
4405
|
case 0:
|
|
4406
|
-
|
|
4406
|
+
D();
|
|
4407
4407
|
break;
|
|
4408
4408
|
case 1:
|
|
4409
|
-
|
|
4409
|
+
D(U[0]);
|
|
4410
4410
|
break;
|
|
4411
4411
|
case 2:
|
|
4412
|
-
|
|
4412
|
+
D(U[0], U[1]);
|
|
4413
4413
|
break;
|
|
4414
4414
|
case 3:
|
|
4415
|
-
|
|
4415
|
+
D(U[0], U[1], U[2]);
|
|
4416
4416
|
break;
|
|
4417
4417
|
default:
|
|
4418
|
-
|
|
4418
|
+
D.apply(o, U);
|
|
4419
4419
|
}
|
|
4420
4420
|
})(C);
|
|
4421
4421
|
} finally {
|
|
@@ -4424,18 +4424,18 @@ function Gt() {
|
|
|
4424
4424
|
}
|
|
4425
4425
|
}
|
|
4426
4426
|
}
|
|
4427
|
-
function
|
|
4428
|
-
S.source === s && typeof S.data == "string" && S.data.indexOf(f) === 0 &&
|
|
4427
|
+
function M(S) {
|
|
4428
|
+
S.source === s && typeof S.data == "string" && S.data.indexOf(f) === 0 && w(+S.data.slice(f.length));
|
|
4429
4429
|
}
|
|
4430
4430
|
})(typeof self > "u" ? r === void 0 ? this : r : self);
|
|
4431
|
-
}).call(this, typeof
|
|
4431
|
+
}).call(this, typeof Ie < "u" ? Ie : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
4432
4432
|
}, {}] }, {}, [10])(10);
|
|
4433
4433
|
});
|
|
4434
|
-
})(
|
|
4434
|
+
})(je)), je.exports;
|
|
4435
4435
|
}
|
|
4436
|
-
var
|
|
4437
|
-
const
|
|
4438
|
-
class
|
|
4436
|
+
var ei = Qt();
|
|
4437
|
+
const ti = /* @__PURE__ */ lt(ei);
|
|
4438
|
+
class ii {
|
|
4439
4439
|
zipObjectUrls = [];
|
|
4440
4440
|
/** 加载新版 manifest 分包数据,并返回 Loader 可消费的 DWGData 结构。 */
|
|
4441
4441
|
async load(e) {
|
|
@@ -4581,7 +4581,7 @@ class Zt {
|
|
|
4581
4581
|
const t = await fetch(e);
|
|
4582
4582
|
if (!t.ok)
|
|
4583
4583
|
throw new Error(`HTTP error! status: ${t.status}`);
|
|
4584
|
-
const i = await
|
|
4584
|
+
const i = await ti.loadAsync(await t.arrayBuffer()), n = this.findZipManifestPath(i), r = await this.fetchZipJson(i, n);
|
|
4585
4585
|
if (!this.isSplitManifest(r))
|
|
4586
4586
|
throw new Error("[LoaderModule2d] Expected split CAD manifest data in .2d package.");
|
|
4587
4587
|
const s = this.getZipBasePath(n);
|
|
@@ -4658,22 +4658,22 @@ class Zt {
|
|
|
4658
4658
|
this.zipObjectUrls.forEach((e) => URL.revokeObjectURL(e)), this.zipObjectUrls = [];
|
|
4659
4659
|
}
|
|
4660
4660
|
}
|
|
4661
|
-
function
|
|
4662
|
-
const i = t.length -
|
|
4661
|
+
function ft(b, e, t) {
|
|
4662
|
+
const i = t.length - b - 1;
|
|
4663
4663
|
if (e >= t[i])
|
|
4664
4664
|
return i - 1;
|
|
4665
|
-
if (e <= t[
|
|
4666
|
-
return
|
|
4667
|
-
let n =
|
|
4665
|
+
if (e <= t[b])
|
|
4666
|
+
return b;
|
|
4667
|
+
let n = b, r = i, s = Math.floor((n + r) / 2);
|
|
4668
4668
|
for (; e < t[s] || e >= t[s + 1]; )
|
|
4669
4669
|
e < t[s] ? r = s : n = s, s = Math.floor((n + r) / 2);
|
|
4670
4670
|
return s;
|
|
4671
4671
|
}
|
|
4672
|
-
function
|
|
4672
|
+
function ni(b, e, t, i) {
|
|
4673
4673
|
const n = [], r = [], s = [];
|
|
4674
4674
|
n[0] = 1;
|
|
4675
4675
|
for (let o = 1; o <= t; ++o) {
|
|
4676
|
-
r[o] = e - i[
|
|
4676
|
+
r[o] = e - i[b + 1 - o], s[o] = i[b + o] - e;
|
|
4677
4677
|
let a = 0;
|
|
4678
4678
|
for (let l = 0; l < o; ++l) {
|
|
4679
4679
|
const c = s[l + 1], f = r[o - l], p = n[l] / (c + f);
|
|
@@ -4683,15 +4683,15 @@ function Yt(M, e, t, i) {
|
|
|
4683
4683
|
}
|
|
4684
4684
|
return n;
|
|
4685
4685
|
}
|
|
4686
|
-
function
|
|
4687
|
-
const n =
|
|
4688
|
-
for (let o = 0; o <=
|
|
4689
|
-
const a = t[n -
|
|
4686
|
+
function ri(b, e, t, i) {
|
|
4687
|
+
const n = ft(b, i, e), r = ni(n, i, b, e), s = new ze(0, 0, 0, 0);
|
|
4688
|
+
for (let o = 0; o <= b; ++o) {
|
|
4689
|
+
const a = t[n - b + o], l = r[o], c = a.w * l;
|
|
4690
4690
|
s.x += a.x * c, s.y += a.y * c, s.z += a.z * c, s.w += a.w * l;
|
|
4691
4691
|
}
|
|
4692
4692
|
return s;
|
|
4693
4693
|
}
|
|
4694
|
-
function
|
|
4694
|
+
function si(b, e, t, i, n) {
|
|
4695
4695
|
const r = [];
|
|
4696
4696
|
for (let f = 0; f <= t; ++f)
|
|
4697
4697
|
r[f] = 0;
|
|
@@ -4704,7 +4704,7 @@ function Kt(M, e, t, i, n) {
|
|
|
4704
4704
|
o[0][0] = 1;
|
|
4705
4705
|
const a = r.slice(0), l = r.slice(0);
|
|
4706
4706
|
for (let f = 1; f <= t; ++f) {
|
|
4707
|
-
a[f] = e - n[
|
|
4707
|
+
a[f] = e - n[b + 1 - f], l[f] = n[b + f] - e;
|
|
4708
4708
|
let p = 0;
|
|
4709
4709
|
for (let d = 0; d < f; ++d) {
|
|
4710
4710
|
const y = l[d + 1], h = a[f - d];
|
|
@@ -4724,12 +4724,12 @@ function Kt(M, e, t, i, n) {
|
|
|
4724
4724
|
y[0][0] = 1;
|
|
4725
4725
|
for (let h = 1; h <= i; ++h) {
|
|
4726
4726
|
let g = 0;
|
|
4727
|
-
const v = f - h,
|
|
4728
|
-
f >= h && (y[d][0] = y[p][0] / o[
|
|
4729
|
-
const
|
|
4730
|
-
for (let R =
|
|
4731
|
-
y[d][R] = (y[p][R] - y[p][R - 1]) / o[
|
|
4732
|
-
f <=
|
|
4727
|
+
const v = f - h, w = t - h;
|
|
4728
|
+
f >= h && (y[d][0] = y[p][0] / o[w + 1][v], g = y[d][0] * o[v][w]);
|
|
4729
|
+
const M = v >= -1 ? 1 : -v, S = f - 1 <= w ? h - 1 : t - f;
|
|
4730
|
+
for (let R = M; R <= S; ++R)
|
|
4731
|
+
y[d][R] = (y[p][R] - y[p][R - 1]) / o[w + 1][v + R], g += y[d][R] * o[v + R][w];
|
|
4732
|
+
f <= w && (y[d][h] = -y[p][h - 1] / o[w + 1][f], g += y[d][h] * o[f][w]), s[h][f] = g;
|
|
4733
4733
|
const C = p;
|
|
4734
4734
|
p = d, d = C;
|
|
4735
4735
|
}
|
|
@@ -4742,53 +4742,53 @@ function Kt(M, e, t, i, n) {
|
|
|
4742
4742
|
}
|
|
4743
4743
|
return s;
|
|
4744
4744
|
}
|
|
4745
|
-
function
|
|
4746
|
-
const r = n <
|
|
4745
|
+
function oi(b, e, t, i, n) {
|
|
4746
|
+
const r = n < b ? n : b, s = [], o = ft(b, i, e), a = si(o, i, b, r, e), l = [];
|
|
4747
4747
|
for (let c = 0; c < t.length; ++c) {
|
|
4748
4748
|
const f = t[c].clone(), p = f.w;
|
|
4749
4749
|
f.x *= p, f.y *= p, f.z *= p, l[c] = f;
|
|
4750
4750
|
}
|
|
4751
4751
|
for (let c = 0; c <= r; ++c) {
|
|
4752
|
-
const f = l[o -
|
|
4753
|
-
for (let p = 1; p <=
|
|
4754
|
-
f.add(l[o -
|
|
4752
|
+
const f = l[o - b].clone().multiplyScalar(a[c][0]);
|
|
4753
|
+
for (let p = 1; p <= b; ++p)
|
|
4754
|
+
f.add(l[o - b + p].clone().multiplyScalar(a[c][p]));
|
|
4755
4755
|
s[c] = f;
|
|
4756
4756
|
}
|
|
4757
4757
|
for (let c = r + 1; c <= n + 1; ++c)
|
|
4758
|
-
s[c] = new
|
|
4758
|
+
s[c] = new ze(0, 0, 0);
|
|
4759
4759
|
return s;
|
|
4760
4760
|
}
|
|
4761
|
-
function
|
|
4761
|
+
function ai(b, e) {
|
|
4762
4762
|
let t = 1;
|
|
4763
|
-
for (let n = 2; n <=
|
|
4763
|
+
for (let n = 2; n <= b; ++n)
|
|
4764
4764
|
t *= n;
|
|
4765
4765
|
let i = 1;
|
|
4766
4766
|
for (let n = 2; n <= e; ++n)
|
|
4767
4767
|
i *= n;
|
|
4768
|
-
for (let n = 2; n <=
|
|
4768
|
+
for (let n = 2; n <= b - e; ++n)
|
|
4769
4769
|
i *= n;
|
|
4770
4770
|
return t / i;
|
|
4771
4771
|
}
|
|
4772
|
-
function
|
|
4773
|
-
const e =
|
|
4772
|
+
function li(b) {
|
|
4773
|
+
const e = b.length, t = [], i = [];
|
|
4774
4774
|
for (let r = 0; r < e; ++r) {
|
|
4775
|
-
const s =
|
|
4776
|
-
t[r] = new
|
|
4775
|
+
const s = b[r];
|
|
4776
|
+
t[r] = new Fe(s.x, s.y, s.z), i[r] = s.w;
|
|
4777
4777
|
}
|
|
4778
4778
|
const n = [];
|
|
4779
4779
|
for (let r = 0; r < e; ++r) {
|
|
4780
4780
|
const s = t[r].clone();
|
|
4781
4781
|
for (let o = 1; o <= r; ++o)
|
|
4782
|
-
s.sub(n[r - o].clone().multiplyScalar(
|
|
4782
|
+
s.sub(n[r - o].clone().multiplyScalar(ai(r, o) * i[o]));
|
|
4783
4783
|
n[r] = s.divideScalar(i[0]);
|
|
4784
4784
|
}
|
|
4785
4785
|
return n;
|
|
4786
4786
|
}
|
|
4787
|
-
function
|
|
4788
|
-
const r =
|
|
4789
|
-
return
|
|
4787
|
+
function hi(b, e, t, i, n) {
|
|
4788
|
+
const r = oi(b, e, t, i, n);
|
|
4789
|
+
return li(r);
|
|
4790
4790
|
}
|
|
4791
|
-
class
|
|
4791
|
+
class ci extends kt {
|
|
4792
4792
|
/**
|
|
4793
4793
|
* Constructs a new NURBS curve.
|
|
4794
4794
|
*
|
|
@@ -4804,7 +4804,7 @@ class ti extends ft {
|
|
|
4804
4804
|
this.degree = e, this.knots = t, this.controlPoints = [], this.startKnot = n || 0, this.endKnot = r || s;
|
|
4805
4805
|
for (let a = 0; a < o; ++a) {
|
|
4806
4806
|
const l = i[a];
|
|
4807
|
-
this.controlPoints[a] = new
|
|
4807
|
+
this.controlPoints[a] = new ze(l.x, l.y, l.z, l.w);
|
|
4808
4808
|
}
|
|
4809
4809
|
}
|
|
4810
4810
|
/**
|
|
@@ -4814,8 +4814,8 @@ class ti extends ft {
|
|
|
4814
4814
|
* @param {Vector3} [optionalTarget] - The optional target vector the result is written to.
|
|
4815
4815
|
* @return {Vector3} The position on the curve.
|
|
4816
4816
|
*/
|
|
4817
|
-
getPoint(e, t = new
|
|
4818
|
-
const i = t, n = this.knots[this.startKnot] + e * (this.knots[this.endKnot] - this.knots[this.startKnot]), r =
|
|
4817
|
+
getPoint(e, t = new Fe()) {
|
|
4818
|
+
const i = t, n = this.knots[this.startKnot] + e * (this.knots[this.endKnot] - this.knots[this.startKnot]), r = ri(this.degree, this.knots, this.controlPoints, n);
|
|
4819
4819
|
return r.w !== 1 && r.divideScalar(r.w), i.set(r.x, r.y, r.z);
|
|
4820
4820
|
}
|
|
4821
4821
|
/**
|
|
@@ -4825,8 +4825,8 @@ class ti extends ft {
|
|
|
4825
4825
|
* @param {Vector3} [optionalTarget] - The optional target vector the result is written to.
|
|
4826
4826
|
* @return {Vector3} The tangent vector.
|
|
4827
4827
|
*/
|
|
4828
|
-
getTangent(e, t = new
|
|
4829
|
-
const i = t, n = this.knots[0] + e * (this.knots[this.knots.length - 1] - this.knots[0]), r =
|
|
4828
|
+
getTangent(e, t = new Fe()) {
|
|
4829
|
+
const i = t, n = this.knots[0] + e * (this.knots[this.knots.length - 1] - this.knots[0]), r = hi(this.degree, this.knots, this.controlPoints, n, 1);
|
|
4830
4830
|
return i.copy(r[1]).normalize(), i;
|
|
4831
4831
|
}
|
|
4832
4832
|
toJSON() {
|
|
@@ -4834,14 +4834,14 @@ class ti extends ft {
|
|
|
4834
4834
|
return e.degree = this.degree, e.knots = [...this.knots], e.controlPoints = this.controlPoints.map((t) => t.toArray()), e.startKnot = this.startKnot, e.endKnot = this.endKnot, e;
|
|
4835
4835
|
}
|
|
4836
4836
|
fromJSON(e) {
|
|
4837
|
-
return super.fromJSON(e), this.degree = e.degree, this.knots = [...e.knots], this.controlPoints = e.controlPoints.map((t) => new
|
|
4837
|
+
return super.fromJSON(e), this.degree = e.degree, this.knots = [...e.knots], this.controlPoints = e.controlPoints.map((t) => new ze(t[0], t[1], t[2], t[3])), this.startKnot = e.startKnot, this.endKnot = e.endKnot, this;
|
|
4838
4838
|
}
|
|
4839
4839
|
}
|
|
4840
|
-
function Ee(
|
|
4841
|
-
const t =
|
|
4840
|
+
function Ee(b, e = !1) {
|
|
4841
|
+
const t = b[0].index !== null, i = new Set(Object.keys(b[0].attributes)), n = new Set(Object.keys(b[0].morphAttributes)), r = {}, s = {}, o = b[0].morphTargetsRelative, a = new Mt();
|
|
4842
4842
|
let l = 0;
|
|
4843
|
-
for (let c = 0; c <
|
|
4844
|
-
const f =
|
|
4843
|
+
for (let c = 0; c < b.length; ++c) {
|
|
4844
|
+
const f = b[c];
|
|
4845
4845
|
let p = 0;
|
|
4846
4846
|
if (t !== (f.index !== null))
|
|
4847
4847
|
return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index " + c + ". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them."), null;
|
|
@@ -4873,16 +4873,16 @@ function Ee(M, e = !1) {
|
|
|
4873
4873
|
if (t) {
|
|
4874
4874
|
let c = 0;
|
|
4875
4875
|
const f = [];
|
|
4876
|
-
for (let p = 0; p <
|
|
4877
|
-
const d =
|
|
4876
|
+
for (let p = 0; p < b.length; ++p) {
|
|
4877
|
+
const d = b[p].index;
|
|
4878
4878
|
for (let y = 0; y < d.count; ++y)
|
|
4879
4879
|
f.push(d.getX(y) + c);
|
|
4880
|
-
c +=
|
|
4880
|
+
c += b[p].attributes.position.count;
|
|
4881
4881
|
}
|
|
4882
4882
|
a.setIndex(f);
|
|
4883
4883
|
}
|
|
4884
4884
|
for (const c in r) {
|
|
4885
|
-
const f =
|
|
4885
|
+
const f = et(r[c]);
|
|
4886
4886
|
if (!f)
|
|
4887
4887
|
return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the " + c + " attribute."), null;
|
|
4888
4888
|
a.setAttribute(c, f);
|
|
@@ -4895,7 +4895,7 @@ function Ee(M, e = !1) {
|
|
|
4895
4895
|
const d = [];
|
|
4896
4896
|
for (let h = 0; h < s[c].length; ++h)
|
|
4897
4897
|
d.push(s[c][h][p]);
|
|
4898
|
-
const y =
|
|
4898
|
+
const y = et(d);
|
|
4899
4899
|
if (!y)
|
|
4900
4900
|
return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the " + c + " morphAttribute."), null;
|
|
4901
4901
|
a.morphAttributes[c].push(y);
|
|
@@ -4903,10 +4903,10 @@ function Ee(M, e = !1) {
|
|
|
4903
4903
|
}
|
|
4904
4904
|
return a;
|
|
4905
4905
|
}
|
|
4906
|
-
function
|
|
4906
|
+
function et(b) {
|
|
4907
4907
|
let e, t, i, n = -1, r = 0;
|
|
4908
|
-
for (let l = 0; l <
|
|
4909
|
-
const c =
|
|
4908
|
+
for (let l = 0; l < b.length; ++l) {
|
|
4909
|
+
const c = b[l];
|
|
4910
4910
|
if (e === void 0 && (e = c.array.constructor), e !== c.array.constructor)
|
|
4911
4911
|
return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.array must be of consistent array types across matching attributes."), null;
|
|
4912
4912
|
if (t === void 0 && (t = c.itemSize), t !== c.itemSize)
|
|
@@ -4917,10 +4917,10 @@ function $e(M) {
|
|
|
4917
4917
|
return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.gpuType must be consistent across matching attributes."), null;
|
|
4918
4918
|
r += c.count * t;
|
|
4919
4919
|
}
|
|
4920
|
-
const s = new e(r), o = new
|
|
4920
|
+
const s = new e(r), o = new _t(s, t, i);
|
|
4921
4921
|
let a = 0;
|
|
4922
|
-
for (let l = 0; l <
|
|
4923
|
-
const c =
|
|
4922
|
+
for (let l = 0; l < b.length; ++l) {
|
|
4923
|
+
const c = b[l];
|
|
4924
4924
|
if (c.isInterleavedBufferAttribute) {
|
|
4925
4925
|
const f = a / t;
|
|
4926
4926
|
for (let p = 0, d = c.count; p < d; p++)
|
|
@@ -4934,8 +4934,8 @@ function $e(M) {
|
|
|
4934
4934
|
}
|
|
4935
4935
|
return n !== void 0 && (o.gpuType = n), o;
|
|
4936
4936
|
}
|
|
4937
|
-
const oe = 1e-8,
|
|
4938
|
-
class
|
|
4937
|
+
const oe = 1e-8, tt = 1e-3, di = 8421504;
|
|
4938
|
+
class ui {
|
|
4939
4939
|
constructor(e) {
|
|
4940
4940
|
this.engine = e;
|
|
4941
4941
|
}
|
|
@@ -4948,7 +4948,7 @@ class ni {
|
|
|
4948
4948
|
if (this.isSolidFill(e))
|
|
4949
4949
|
return this.createSolidItems(e, t, i);
|
|
4950
4950
|
const r = this.createPatternLineItem(e, t, i);
|
|
4951
|
-
return r ? [r] : (this.warnUnknownPatternFallback(e), this.createSolidItems(e, t, i,
|
|
4951
|
+
return r ? [r] : (this.warnUnknownPatternFallback(e), this.createSolidItems(e, t, i, di));
|
|
4952
4952
|
}
|
|
4953
4953
|
/** 只有明确的 SOLID 才作为实心面;patternType=SolidFill 在当前导出数据里不可靠。 */
|
|
4954
4954
|
isSolidFill(e) {
|
|
@@ -5067,8 +5067,8 @@ class ni {
|
|
|
5067
5067
|
applyGradientVertexColors(e, t, i) {
|
|
5068
5068
|
const n = e.getAttribute("position"), r = [], s = this.resolveGradientStops(i), o = this.getBounds(t), a = new _.Vector2((o.minX + o.maxX) / 2, (o.minY + o.maxY) / 2), l = Math.max(o.maxX - o.minX, oe), c = Math.max(o.maxY - o.minY, oe), f = Math.max(Math.hypot(l / 2, c / 2), oe), p = Number(i?.angle ?? 0), d = new _.Vector2(Math.cos(p), Math.sin(p)).normalize(), y = new _.Vector2(-d.y, d.x);
|
|
5069
5069
|
for (let h = 0; h < n.count; h += 1) {
|
|
5070
|
-
const g = new _.Vector2(n.getX(h), n.getY(h)), v = this.resolveGradientFactor(g, a, d, y, l, c, f, i),
|
|
5071
|
-
r.push(
|
|
5070
|
+
const g = new _.Vector2(n.getX(h), n.getY(h)), v = this.resolveGradientFactor(g, a, d, y, l, c, f, i), w = this.sampleGradientColor(s, v);
|
|
5071
|
+
r.push(w.r, w.g, w.b);
|
|
5072
5072
|
}
|
|
5073
5073
|
e.setAttribute("color", new _.Float32BufferAttribute(r, 3));
|
|
5074
5074
|
}
|
|
@@ -5148,15 +5148,15 @@ class ni {
|
|
|
5148
5148
|
const p = this.createPatternFamilySegments(e, f, a, i.holes, l, c, r - s);
|
|
5149
5149
|
p.forEach(([d, y]) => {
|
|
5150
5150
|
n.push(
|
|
5151
|
-
new _.Vector3(d.x, d.y,
|
|
5152
|
-
new _.Vector3(y.x, y.y,
|
|
5151
|
+
new _.Vector3(d.x, d.y, tt),
|
|
5152
|
+
new _.Vector3(y.x, y.y, tt)
|
|
5153
5153
|
);
|
|
5154
5154
|
}), s += p.length;
|
|
5155
5155
|
}
|
|
5156
5156
|
}
|
|
5157
5157
|
if (n.length === 0) return null;
|
|
5158
5158
|
n.forEach((a) => a.applyMatrix4(t));
|
|
5159
|
-
const o =
|
|
5159
|
+
const o = ut(n);
|
|
5160
5160
|
return {
|
|
5161
5161
|
kind: "line",
|
|
5162
5162
|
layer: e.layer ?? "0",
|
|
@@ -5178,10 +5178,10 @@ class ni {
|
|
|
5178
5178
|
new _.Vector2(r.maxX, r.minY),
|
|
5179
5179
|
new _.Vector2(r.maxX, r.maxY),
|
|
5180
5180
|
new _.Vector2(r.minX, r.maxY)
|
|
5181
|
-
], h = f.dot(c), g = y.map((
|
|
5182
|
-
for (let
|
|
5183
|
-
const U = f.clone().add(p.clone().multiplyScalar(
|
|
5184
|
-
this.clipLineByPolygon(
|
|
5181
|
+
], h = f.dot(c), g = y.map((D) => D.dot(c) - h), v = Math.min(...g) - s, w = Math.max(...g) + s, M = Math.floor(Math.min(v / d, w / d)) - 2, S = Math.ceil(Math.max(v / d, w / d)) + 2, C = [], R = new _.Vector2((r.minX + r.maxX) / 2, (r.minY + r.maxY) / 2);
|
|
5182
|
+
for (let D = M; D <= S && C.length < o; D += 1) {
|
|
5183
|
+
const U = f.clone().add(p.clone().multiplyScalar(D)), z = U.clone().add(l.clone().multiplyScalar(R.clone().sub(U).dot(l))), G = z.clone().add(l.clone().multiplyScalar(-s * 2)), q = z.clone().add(l.clone().multiplyScalar(s * 2));
|
|
5184
|
+
this.clipLineByPolygon(G, q, i).forEach(([B, m]) => {
|
|
5185
5185
|
this.subtractHoles(B, m, n).forEach(([O, ee]) => {
|
|
5186
5186
|
this.appendDashedSegment(C, O, ee, t.dashLengths, U, l);
|
|
5187
5187
|
});
|
|
@@ -5242,16 +5242,16 @@ class ni {
|
|
|
5242
5242
|
e.push([t, i]);
|
|
5243
5243
|
return;
|
|
5244
5244
|
}
|
|
5245
|
-
const a = this.normalizeDashPattern(n), l = a.reduce((
|
|
5245
|
+
const a = this.normalizeDashPattern(n), l = a.reduce((M, S) => M + S.length, 0);
|
|
5246
5246
|
if (l < oe) {
|
|
5247
5247
|
e.push([t, i]);
|
|
5248
5248
|
return;
|
|
5249
5249
|
}
|
|
5250
5250
|
const c = s?.clone().normalize() ?? i.clone().sub(t).normalize(), f = r ?? t, d = i.clone().sub(t).normalize().dot(c) >= 0 ? 1 : -1, y = t.clone().sub(f).dot(c) * d, h = this.positiveModulo(y, l);
|
|
5251
|
-
let g = 0, v = this.findDashIndex(a, h),
|
|
5251
|
+
let g = 0, v = this.findDashIndex(a, h), w = h - a[v].start;
|
|
5252
5252
|
for (; g < o - oe; ) {
|
|
5253
|
-
const
|
|
5254
|
-
|
|
5253
|
+
const M = a[v], S = Math.max(M.length - w, oe), C = Math.min(o, g + S);
|
|
5254
|
+
M.draw && e.push([this.pointAtLength(t, i, g), this.pointAtLength(t, i, C)]), g = C, v = (v + 1) % a.length, w = 0;
|
|
5255
5255
|
}
|
|
5256
5256
|
}
|
|
5257
5257
|
/** 将 PAT dash 数组转为带累计起点的周期表,0 长点线用很短的可见段表示。 */
|
|
@@ -5316,9 +5316,9 @@ class ni {
|
|
|
5316
5316
|
}), i;
|
|
5317
5317
|
}
|
|
5318
5318
|
}
|
|
5319
|
-
class
|
|
5319
|
+
class it {
|
|
5320
5320
|
constructor(e, t) {
|
|
5321
|
-
this.engine = e, this.textFactory = t, this.hatchRenderer = new
|
|
5321
|
+
this.engine = e, this.textFactory = t, this.hatchRenderer = new ui(e);
|
|
5322
5322
|
}
|
|
5323
5323
|
hatchRenderer;
|
|
5324
5324
|
/** 根据实体类型分发到线、文字、填充、图片等具体几何生成逻辑。 */
|
|
@@ -5413,8 +5413,8 @@ class Ye {
|
|
|
5413
5413
|
if (o < 1e-12) return [i, n];
|
|
5414
5414
|
const a = 4 * Math.atan(r), l = o * (1 + r * r) / (4 * Math.abs(r)), c = i.clone().add(n).multiplyScalar(0.5), f = new _.Vector3(-s.y / o, s.x / o, 0), p = c.clone().add(f.multiplyScalar(o * (1 - r * r) / (4 * r))), d = Math.atan2(i.y - p.y, i.x - p.x), y = Math.max(4, Math.ceil(Math.abs(a) / (this.engine.options?.polylineArcAngleStep ?? Math.PI / 18))), h = [];
|
|
5415
5415
|
for (let g = 0; g <= y; g += 1) {
|
|
5416
|
-
const v = g / y,
|
|
5417
|
-
h.push(new _.Vector3(p.x + Math.cos(
|
|
5416
|
+
const v = g / y, w = d + a * v;
|
|
5417
|
+
h.push(new _.Vector3(p.x + Math.cos(w) * l, p.y + Math.sin(w) * l, i.z + (n.z - i.z) * v));
|
|
5418
5418
|
}
|
|
5419
5419
|
return this.pointsToSegments(h);
|
|
5420
5420
|
}
|
|
@@ -5432,7 +5432,7 @@ class Ye {
|
|
|
5432
5432
|
return new _.Vector4(a.x, a.y, a.z, Number.isFinite(c) ? c : 1);
|
|
5433
5433
|
});
|
|
5434
5434
|
let s = (e.length - 1) * 2;
|
|
5435
|
-
const o = new
|
|
5435
|
+
const o = new ci(i, n, r).getPoints(s);
|
|
5436
5436
|
return t.closed === !0 && o.length > 1 && o.push(o[0].clone()), o;
|
|
5437
5437
|
}
|
|
5438
5438
|
/** 在缺少 knots 的数据里生成首尾夹紧的均匀节点向量。 */
|
|
@@ -5460,7 +5460,7 @@ class Ye {
|
|
|
5460
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);
|
|
5461
5461
|
if (!Number.isFinite(o) || !Number.isFinite(a) || o === 0 || a === 0) return [];
|
|
5462
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);
|
|
5463
|
-
[f, p, d, y].forEach((
|
|
5463
|
+
[f, p, d, y].forEach((w) => w.applyMatrix4(t));
|
|
5464
5464
|
const h = new _.BufferGeometry();
|
|
5465
5465
|
h.setAttribute("position", new _.Float32BufferAttribute([
|
|
5466
5466
|
f.x,
|
|
@@ -5510,7 +5510,7 @@ class Ye {
|
|
|
5510
5510
|
}];
|
|
5511
5511
|
}
|
|
5512
5512
|
}
|
|
5513
|
-
class
|
|
5513
|
+
class fi {
|
|
5514
5514
|
constructor(e, t, i = e.modelGroup, n = {}) {
|
|
5515
5515
|
this.model = t, this.targetGroup = i, this.options = n;
|
|
5516
5516
|
}
|
|
@@ -5601,7 +5601,7 @@ class ri {
|
|
|
5601
5601
|
const l = this.targetGroup.children.length - 1;
|
|
5602
5602
|
let c = 0;
|
|
5603
5603
|
e.forEach((f, p) => {
|
|
5604
|
-
const d =
|
|
5604
|
+
const d = ut(f.points);
|
|
5605
5605
|
this.pushNodeMap(p, {
|
|
5606
5606
|
indexes: [l, c, c + f.points.length * 3],
|
|
5607
5607
|
object: o,
|
|
@@ -5742,7 +5742,7 @@ class ri {
|
|
|
5742
5742
|
return Array.from(new Set([...e, ...t].filter((i) => !!i)));
|
|
5743
5743
|
}
|
|
5744
5744
|
}
|
|
5745
|
-
class
|
|
5745
|
+
class nt {
|
|
5746
5746
|
constructor(e, t) {
|
|
5747
5747
|
this.engine = e, this.font = t;
|
|
5748
5748
|
}
|
|
@@ -5756,7 +5756,7 @@ class Xe {
|
|
|
5756
5756
|
const s = [...e.position ?? [0, 0, 0]];
|
|
5757
5757
|
s[1] = s[1] - (e.height ?? 0);
|
|
5758
5758
|
const o = this.resolveWidthScale(e), a = new _.Vector3(s[0] ?? 0, s[1] ?? 0, s[2] ?? 0).applyMatrix4(t), l = 1.4 * e.scale;
|
|
5759
|
-
r.applyMatrix4(t.clone().multiply(
|
|
5759
|
+
r.applyMatrix4(t.clone().multiply(He(s, [o * 1.4, 1 * l, 1 * l], e.rotation ?? 0)));
|
|
5760
5760
|
const c = xe(r), f = [{
|
|
5761
5761
|
kind: "text",
|
|
5762
5762
|
layer: e.layer,
|
|
@@ -5824,16 +5824,16 @@ class Xe {
|
|
|
5824
5824
|
const i = t.max.x - t.min.x, n = t.max.y - t.min.y;
|
|
5825
5825
|
if (i <= 0 || n <= 0) return null;
|
|
5826
5826
|
const r = new _.PlaneGeometry(i, n);
|
|
5827
|
-
return r.applyMatrix4(
|
|
5827
|
+
return r.applyMatrix4(He([(t.min.x + t.max.x) / 2, (t.min.y + t.max.y) / 2, 0], [1, 1, 1], 0)), r;
|
|
5828
5828
|
}
|
|
5829
5829
|
}
|
|
5830
|
-
class
|
|
5830
|
+
class pi {
|
|
5831
5831
|
engine;
|
|
5832
5832
|
data = null;
|
|
5833
5833
|
enableValidation = !0;
|
|
5834
5834
|
model = this.createEmptyModel();
|
|
5835
5835
|
font = null;
|
|
5836
|
-
dataSource = new
|
|
5836
|
+
dataSource = new ii();
|
|
5837
5837
|
lastBuildOptions = {};
|
|
5838
5838
|
activeWorkspace = { type: "model", name: "模型" };
|
|
5839
5839
|
workspaceCache = /* @__PURE__ */ new Map();
|
|
@@ -5950,7 +5950,7 @@ class si {
|
|
|
5950
5950
|
async buildScene(e, t = {}) {
|
|
5951
5951
|
const i = this.createEmptyModel();
|
|
5952
5952
|
i.layers = e.layers, this.model = i, this._emitProgress(30, "加载字体..."), this.font = await this.loadFont(e), this._emitProgress(45, "生成图元...");
|
|
5953
|
-
const n = new
|
|
5953
|
+
const n = new nt(this.engine, this.font), r = new it(this.engine, n), s = new Je(r);
|
|
5954
5954
|
s.setBlocks(e.blocks ?? []);
|
|
5955
5955
|
const o = e.tiles ?? [];
|
|
5956
5956
|
await this.buildTilesIntoGroup(o, this.engine.modelGroup, s, t);
|
|
@@ -5969,7 +5969,7 @@ class si {
|
|
|
5969
5969
|
n.name = `workspace:layout:${t.id}`, n.visible = !1, this.engine.modelGroup.add(n);
|
|
5970
5970
|
const r = this.createEmptyModel();
|
|
5971
5971
|
r.layers = e.layers, this.model = r, this.font || (this._emitProgress(30, "加载字体..."), this.font = await this.loadFont(e));
|
|
5972
|
-
const s = new
|
|
5972
|
+
const s = new nt(this.engine, this.font), o = new it(this.engine, s), a = new Je(o);
|
|
5973
5973
|
a.setBlocks(e.blocks ?? []);
|
|
5974
5974
|
const l = new _.Group();
|
|
5975
5975
|
l.name = `layout-viewports:${t.id}`, n.add(l), await this.buildViewportGroups(e, t, l, a, i);
|
|
@@ -6011,7 +6011,7 @@ class si {
|
|
|
6011
6011
|
for (let a = 0; a < e.length; a += 1) {
|
|
6012
6012
|
const l = e[a], c = this.createTileGroup(l, n.namePrefix);
|
|
6013
6013
|
t.add(c);
|
|
6014
|
-
const f = new
|
|
6014
|
+
const f = new fi(this.engine, this.model, c, {
|
|
6015
6015
|
interactive: n.interactive ?? !0
|
|
6016
6016
|
}), p = /* @__PURE__ */ new Set();
|
|
6017
6017
|
let d = 0, y = 0;
|
|
@@ -6272,7 +6272,7 @@ class si {
|
|
|
6272
6272
|
r && e ? this.engine.cameraModule2d?.fitToExtents(e) : r && this.engine.fitToView();
|
|
6273
6273
|
} catch {
|
|
6274
6274
|
}
|
|
6275
|
-
this.engine.layerManager || (this.engine.layerManager = new
|
|
6275
|
+
this.engine.layerManager || (this.engine.layerManager = new dt(this.engine)), this.engine.layerManager._loadLayers();
|
|
6276
6276
|
const i = this.engine.scene?.background, n = i instanceof _.Color ? i.getHex() : this.engine.options?.backgroundColor ?? 1710618;
|
|
6277
6277
|
this.engine.modelToolModule2d?.updateColorsForBackground(n), this.engine.layerManager.refresh(), this.engine.events?.trigger(fe.ModelLoaded, {});
|
|
6278
6278
|
}
|
|
@@ -6336,7 +6336,7 @@ class si {
|
|
|
6336
6336
|
this.clear();
|
|
6337
6337
|
}
|
|
6338
6338
|
}
|
|
6339
|
-
class
|
|
6339
|
+
class pt {
|
|
6340
6340
|
/**
|
|
6341
6341
|
* 构造函数
|
|
6342
6342
|
* @param camera - Three.js 相机对象(用于投影计算)
|
|
@@ -6448,7 +6448,7 @@ class st {
|
|
|
6448
6448
|
this.scene = e;
|
|
6449
6449
|
}
|
|
6450
6450
|
}
|
|
6451
|
-
class
|
|
6451
|
+
class mi {
|
|
6452
6452
|
engine;
|
|
6453
6453
|
pickBoxElementIds = [];
|
|
6454
6454
|
worldToScreen;
|
|
@@ -6456,7 +6456,7 @@ class oi {
|
|
|
6456
6456
|
maxHoverLineCoordinateCount = 3e4;
|
|
6457
6457
|
maxHoverMeshVertexCount = 3e4;
|
|
6458
6458
|
constructor(e) {
|
|
6459
|
-
this.engine = e, this.pickBoxElementIds = [], this.worldToScreen = new
|
|
6459
|
+
this.engine = e, this.pickBoxElementIds = [], this.worldToScreen = new pt(e.camera, e.renderer, e.scene);
|
|
6460
6460
|
}
|
|
6461
6461
|
init() {
|
|
6462
6462
|
this.pickBoxElementIds = [];
|
|
@@ -6479,12 +6479,12 @@ class oi {
|
|
|
6479
6479
|
if (h == null || h === !1) return;
|
|
6480
6480
|
const g = [];
|
|
6481
6481
|
for (let v = 0; v < d.length / 2; v += 1) {
|
|
6482
|
-
const
|
|
6483
|
-
|
|
6482
|
+
const w = this.worldToScreen.worldToScreen(d[v * 2]), M = this.worldToScreen.worldToScreen(d[v * 2 + 1]);
|
|
6483
|
+
w.distanceTo(M) > 1 && g.push([w, M]);
|
|
6484
6484
|
}
|
|
6485
6485
|
g.forEach((v) => {
|
|
6486
|
-
const
|
|
6487
|
-
|
|
6486
|
+
const w = this.pointToLineDistance(n, v[0], v[1]);
|
|
6487
|
+
w < 10 && r.push({ distance: w, linkId: o });
|
|
6488
6488
|
});
|
|
6489
6489
|
} else {
|
|
6490
6490
|
const f = this.getNodeGeometry(c, l);
|
|
@@ -6585,7 +6585,7 @@ class oi {
|
|
|
6585
6585
|
return e.distanceTo(a);
|
|
6586
6586
|
}
|
|
6587
6587
|
}
|
|
6588
|
-
class
|
|
6588
|
+
class gi {
|
|
6589
6589
|
engine;
|
|
6590
6590
|
// 小组件容器
|
|
6591
6591
|
widgetContainer = null;
|
|
@@ -6612,7 +6612,7 @@ class ai {
|
|
|
6612
6612
|
// 是否启用状态
|
|
6613
6613
|
enabled = !1;
|
|
6614
6614
|
constructor(e) {
|
|
6615
|
-
this.engine = e, this.worldToScreen = new
|
|
6615
|
+
this.engine = e, this.worldToScreen = new pt(e.camera, e.renderer, e.scene), this.initWidget();
|
|
6616
6616
|
let t = this;
|
|
6617
6617
|
this.engine.controlModule2d.panControls.addEventListener("change", () => {
|
|
6618
6618
|
t.updateViewPoint();
|
|
@@ -6753,7 +6753,7 @@ class ai {
|
|
|
6753
6753
|
return Math.atan2(e.clientX - i, n - e.clientY);
|
|
6754
6754
|
}
|
|
6755
6755
|
}
|
|
6756
|
-
class
|
|
6756
|
+
class yi {
|
|
6757
6757
|
engine;
|
|
6758
6758
|
enabled = !1;
|
|
6759
6759
|
constructor(e) {
|
|
@@ -6806,7 +6806,7 @@ class li {
|
|
|
6806
6806
|
return e?.object ?? e?.group?.children?.[e.indexes?.[0]] ?? this.engine.modelGroup?.children?.[e.indexes?.[0]];
|
|
6807
6807
|
}
|
|
6808
6808
|
}
|
|
6809
|
-
class
|
|
6809
|
+
class vi {
|
|
6810
6810
|
engine;
|
|
6811
6811
|
highlightMaterial;
|
|
6812
6812
|
hideMaterial;
|
|
@@ -7066,7 +7066,7 @@ class hi {
|
|
|
7066
7066
|
return !0;
|
|
7067
7067
|
}
|
|
7068
7068
|
}
|
|
7069
|
-
function
|
|
7069
|
+
function bi(b) {
|
|
7070
7070
|
const e = {
|
|
7071
7071
|
mouseMoveFrame: null,
|
|
7072
7072
|
latestMouseMoveEvent: null,
|
|
@@ -7088,9 +7088,9 @@ function ci(M) {
|
|
|
7088
7088
|
}, e.render = function() {
|
|
7089
7089
|
e.self && e.self.render != null && e.self.render();
|
|
7090
7090
|
}, e.active = function() {
|
|
7091
|
-
|
|
7091
|
+
b.renderer.domElement.addEventListener("mousedown", o), b.renderer.domElement.addEventListener("mouseup", l), b.renderer.domElement.addEventListener("mousemove", a), b.renderer.domElement.addEventListener("touchstart", f, { passive: !1 }), b.renderer.domElement.addEventListener("touchend", d, { passive: !1 }), b.renderer.domElement.addEventListener("touchmove", p, { passive: !1 }), window.addEventListener("keydown", t), window.addEventListener("keyup", i);
|
|
7092
7092
|
}, e.disActive = function() {
|
|
7093
|
-
|
|
7093
|
+
b.renderer.domElement.removeEventListener("mousedown", o), b.renderer.domElement.removeEventListener("mouseup", l), b.renderer.domElement.removeEventListener("mousemove", a), b.renderer.domElement.removeEventListener("touchstart", f), b.renderer.domElement.removeEventListener("touchend", d), b.renderer.domElement.removeEventListener("touchmove", p), window.removeEventListener("keydown", t), window.removeEventListener("keyup", i), e.mouseMoveFrame != null && (cancelAnimationFrame(e.mouseMoveFrame), e.mouseMoveFrame = null, e.latestMouseMoveEvent = null);
|
|
7094
7094
|
};
|
|
7095
7095
|
function t(h) {
|
|
7096
7096
|
(h.keyCode === 8 || h.keyCode === 46) && e.self && e.self.handelKeyDeleteDown != null && e.self.handelKeyDeleteDown(), h.keyCode === 27 && e.self && e.self.handelKeyEscDown != null && e.self.handelKeyEscDown(), h.keyCode === 13 && e.self && e.self.handelKeyEnterDown != null && e.self.handelKeyEnterDown(), h.keyCode === 32 && e.self && e.self.handelKeySpaceDown != null && e.self.handelKeySpaceDown(), h.key === "Control" && e.self && e.self.handelKeyCtrlDown != null && e.self.handelKeyCtrlDown(), h.key === "Delete" && e.self && e.self.handelKeyDeleteDown != null && e.self.handelKeyDeleteDown(), h.key === "Shift" && e.self && e.self.handelKeyShiftDown != null && e.self.handelKeyShiftDown(), h.key === "Meta" && e.self && e.self.handelKeyMetaDown != null && e.self.handelKeyMetaDown();
|
|
@@ -7099,22 +7099,22 @@ function ci(M) {
|
|
|
7099
7099
|
h.key === "Alt" && e.self && e.self.handelKeyAltUp != null && e.self.handelKeyAltUp(), h.key === "Tab" && e.self && e.self.handelKeyTabUp != null && e.self.handelKeyTabUp(), h.key === "Control" && e.self && e.self.handelKeyCtrlUp != null && e.self.handelKeyCtrlUp(), h.key === "Shift" && e.self && e.self.handelKeyShiftUp != null && e.self.handelKeyShiftUp(), h.key === "Meta" && e.self && e.self.handelKeyMetaUp != null && e.self.handelKeyMetaUp(), h.key === "Command" && e.self && e.self.handelKeyCommandUp != null && e.self.handelKeyCommandUp(), h.key === "Windows" && e.self && e.self.handelKeyWindowsUp != null && e.self.handelKeyWindowsUp();
|
|
7100
7100
|
}
|
|
7101
7101
|
function n(h) {
|
|
7102
|
-
const g = new _.Vector2(), v =
|
|
7103
|
-
return g.x = h.offsetX / v * 2 - 1, g.y = -(h.offsetY /
|
|
7102
|
+
const g = new _.Vector2(), v = b.renderer.domElement.clientWidth, w = b.renderer.domElement.clientHeight;
|
|
7103
|
+
return g.x = h.offsetX / v * 2 - 1, g.y = -(h.offsetY / w) * 2 + 1, g;
|
|
7104
7104
|
}
|
|
7105
7105
|
function r(h) {
|
|
7106
7106
|
const g = new _.Raycaster(), v = n(h);
|
|
7107
|
-
return g.setFromCamera(v,
|
|
7107
|
+
return g.setFromCamera(v, b.camera), g;
|
|
7108
7108
|
}
|
|
7109
7109
|
function s(h, g = !1) {
|
|
7110
7110
|
const v = r(h);
|
|
7111
7111
|
if (h.raycaster = v, g) {
|
|
7112
|
-
const
|
|
7113
|
-
h.catch =
|
|
7112
|
+
const w = y(v, h);
|
|
7113
|
+
h.catch = w;
|
|
7114
7114
|
}
|
|
7115
7115
|
}
|
|
7116
7116
|
function o(h) {
|
|
7117
|
-
h.button === 0 && (e.mouseDownTime = Date.now(), e.mouseDownPosition = new _.Vector3(h.offsetX, h.offsetY, 0), e.self && e.self.handleMouseDown != null && (
|
|
7117
|
+
h.button === 0 && (e.mouseDownTime = Date.now(), e.mouseDownPosition = new _.Vector3(h.offsetX, h.offsetY, 0), e.self && e.self.handleMouseDown != null && (b.engineStatus.isFree = !0, s(h, !0), h.catch != null && b.controlModule.orbitControls.origin.set(h.catch.point.x, h.catch.point.y, h.catch.point.z), e.self.handleMouseDown(h)));
|
|
7118
7118
|
}
|
|
7119
7119
|
function a(h) {
|
|
7120
7120
|
e.latestMouseMoveEvent = h, e.mouseMoveFrame == null && (e.mouseMoveFrame = requestAnimationFrame(() => {
|
|
@@ -7125,18 +7125,18 @@ function ci(M) {
|
|
|
7125
7125
|
function l(h) {
|
|
7126
7126
|
if (h.button !== 0)
|
|
7127
7127
|
return;
|
|
7128
|
-
const g = Date.now(), v = g - e.mouseDownTime,
|
|
7128
|
+
const g = Date.now(), v = g - e.mouseDownTime, w = new _.Vector3(h.offsetX, h.offsetY, 0);
|
|
7129
7129
|
e.self && e.self.handleMouseUp != null && (s(h, !1), e.self.handleMouseUp(h));
|
|
7130
|
-
const
|
|
7131
|
-
(v < 100 ||
|
|
7130
|
+
const M = w.distanceTo(e.mouseDownPosition);
|
|
7131
|
+
(v < 100 || M == 0) && e.self && e.self.handleMouseClick != null && (s(h, !0), g - e.lastClickTime < 200 ? e.self.handleMouseDoubleClick != null && e.self.handleMouseDoubleClick(h) : e.self.handleMouseClick != null && e.self.handleMouseClick(h), e.lastClickTime = Date.now());
|
|
7132
7132
|
}
|
|
7133
7133
|
function c(h) {
|
|
7134
7134
|
const g = h.touches[0] || h.changedTouches[0];
|
|
7135
7135
|
if (!g)
|
|
7136
7136
|
return null;
|
|
7137
|
-
const
|
|
7137
|
+
const w = b.renderer.domElement.getBoundingClientRect(), M = g.clientX - w.left, S = g.clientY - w.top;
|
|
7138
7138
|
return {
|
|
7139
|
-
offsetX:
|
|
7139
|
+
offsetX: M,
|
|
7140
7140
|
offsetY: S,
|
|
7141
7141
|
button: 0,
|
|
7142
7142
|
// 模拟左键
|
|
@@ -7166,9 +7166,9 @@ function ci(M) {
|
|
|
7166
7166
|
g && l(g);
|
|
7167
7167
|
}
|
|
7168
7168
|
function y(h, g) {
|
|
7169
|
-
if (
|
|
7169
|
+
if (b.isModelSpaceActive?.() === !1 && b.isElementLink2d3dEnabled?.() !== !0)
|
|
7170
7170
|
return null;
|
|
7171
|
-
var v =
|
|
7171
|
+
var v = b.octreeBox2d.pick2d(h, g);
|
|
7172
7172
|
return v == null ? null : {
|
|
7173
7173
|
point: null,
|
|
7174
7174
|
id: v
|
|
@@ -7176,7 +7176,7 @@ function ci(M) {
|
|
|
7176
7176
|
}
|
|
7177
7177
|
return e;
|
|
7178
7178
|
}
|
|
7179
|
-
class
|
|
7179
|
+
class wi {
|
|
7180
7180
|
el;
|
|
7181
7181
|
xEl;
|
|
7182
7182
|
yEl;
|
|
@@ -7195,8 +7195,8 @@ class di {
|
|
|
7195
7195
|
this.el.parentElement?.removeChild(this.el);
|
|
7196
7196
|
}
|
|
7197
7197
|
}
|
|
7198
|
-
var
|
|
7199
|
-
class
|
|
7198
|
+
var mt = /* @__PURE__ */ ((b) => (b.ModelLoadStart = "model-load-start", b.ModelLoadProgress = "model-load-progress", b.ModelLoaded = "model-loaded", b.ModelError = "model-error", b.SelectionChanged = "selection-changed", b.HoverChanged = "hover-changed", b.Click = "click", b.MouseMove = "mouse-move", b.CameraChanged = "camera-changed", b.CameraIdle = "camera-idle", b.EngineFree = "engine-free", b.EngineBusy = "engine-busy", b.MeasureChanged = "measure-changed", b.MeasureClick = "measure-click", b.SectionMove = "section-move", b))(mt || {});
|
|
7199
|
+
class xi {
|
|
7200
7200
|
engine;
|
|
7201
7201
|
behavior;
|
|
7202
7202
|
mouseCoordUI = null;
|
|
@@ -7206,7 +7206,7 @@ class ui {
|
|
|
7206
7206
|
init() {
|
|
7207
7207
|
this.behavior = this.engine.handelBehaved2d, this.behavior.init(this);
|
|
7208
7208
|
const e = this.engine.container;
|
|
7209
|
-
e && this.engine.options?.showMouseCoordinates !== !1 && (this.mouseCoordUI = new
|
|
7209
|
+
e && this.engine.options?.showMouseCoordinates !== !1 && (this.mouseCoordUI = new wi(e));
|
|
7210
7210
|
}
|
|
7211
7211
|
active() {
|
|
7212
7212
|
this.behavior.active();
|
|
@@ -7248,7 +7248,7 @@ class ui {
|
|
|
7248
7248
|
handleMouseClick(e) {
|
|
7249
7249
|
if (this.canHandleElementInteraction())
|
|
7250
7250
|
if (e.catch != null && this.isModelInteractive(e.catch.id)) {
|
|
7251
|
-
this.engine.modelToolModule2d.highlightModel([e.catch.id]), this.engine.events.trigger(
|
|
7251
|
+
this.engine.modelToolModule2d.highlightModel([e.catch.id]), this.engine.events.trigger(mt.Click, e.catch.id);
|
|
7252
7252
|
let t = new CustomEvent("D2ElementClick", {
|
|
7253
7253
|
detail: { id: e.catch.id }
|
|
7254
7254
|
});
|
|
@@ -7273,7 +7273,7 @@ class ui {
|
|
|
7273
7273
|
this.mouseCoordUI?.dispose(), this.mouseCoordUI = null;
|
|
7274
7274
|
}
|
|
7275
7275
|
}
|
|
7276
|
-
class
|
|
7276
|
+
class ki {
|
|
7277
7277
|
overlay;
|
|
7278
7278
|
hLine;
|
|
7279
7279
|
vLine;
|
|
@@ -7316,7 +7316,7 @@ class fi {
|
|
|
7316
7316
|
this.canvas.removeEventListener("mousemove", this.onMouseMove), this.canvas.removeEventListener("mouseenter", this.onMouseEnter), this.canvas.removeEventListener("mouseleave", this.onMouseLeave), this.canvas.style.cursor = "", this.overlay.parentElement?.removeChild(this.overlay);
|
|
7317
7317
|
}
|
|
7318
7318
|
}
|
|
7319
|
-
const
|
|
7319
|
+
const rt = [
|
|
7320
7320
|
{ action: "search", label: "搜索" },
|
|
7321
7321
|
{ action: "hideElement", label: "隐藏元素", dividerBefore: !0 },
|
|
7322
7322
|
{ action: "showAll", label: "显示全部" },
|
|
@@ -7327,7 +7327,7 @@ const Ke = [
|
|
|
7327
7327
|
{ action: "linkElement2d3d", label: "模型联动", dividerBefore: !0 },
|
|
7328
7328
|
{ action: "linkView2d3d", label: "视角关联" }
|
|
7329
7329
|
];
|
|
7330
|
-
class
|
|
7330
|
+
class Mi {
|
|
7331
7331
|
menu;
|
|
7332
7332
|
container;
|
|
7333
7333
|
canvas;
|
|
@@ -7351,8 +7351,8 @@ class pi {
|
|
|
7351
7351
|
}
|
|
7352
7352
|
/** 按初始化配置解析菜单项顺序和显隐,未传配置时保持默认菜单。 */
|
|
7353
7353
|
resolveMenuItems(e) {
|
|
7354
|
-
return !e || e.length === 0 ?
|
|
7355
|
-
const i =
|
|
7354
|
+
return !e || e.length === 0 ? rt : e.filter((t) => t.visible !== !1).map((t) => {
|
|
7355
|
+
const i = rt.find((n) => n.action === t.action);
|
|
7356
7356
|
return {
|
|
7357
7357
|
action: t.action,
|
|
7358
7358
|
label: t.label ?? i?.label ?? t.action,
|
|
@@ -7400,7 +7400,7 @@ class pi {
|
|
|
7400
7400
|
this.canvas.removeEventListener("contextmenu", this.onContextMenu), document.removeEventListener("mousedown", this.onDocMouseDown), document.removeEventListener("keydown", this.onEscape), this.menu.parentElement?.removeChild(this.menu);
|
|
7401
7401
|
}
|
|
7402
7402
|
}
|
|
7403
|
-
class
|
|
7403
|
+
class _i {
|
|
7404
7404
|
overlay = null;
|
|
7405
7405
|
textEl = null;
|
|
7406
7406
|
barEl = null;
|
|
@@ -7535,14 +7535,14 @@ class mi {
|
|
|
7535
7535
|
this.overlay?.remove(), this.overlay = null, this.textEl = null, this.barEl = null, this.pctEl = null;
|
|
7536
7536
|
}
|
|
7537
7537
|
}
|
|
7538
|
-
const
|
|
7538
|
+
const Ei = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
7539
7539
|
<circle cx="6.5" cy="6.5" r="4.5" stroke="currentColor" stroke-width="1.5"/>
|
|
7540
7540
|
<line x1="10" y1="10" x2="14" y2="14" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
|
|
7541
|
-
</svg>`,
|
|
7541
|
+
</svg>`, Ci = `<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
7542
7542
|
<line x1="1" y1="1" x2="11" y2="11" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
|
|
7543
7543
|
<line x1="11" y1="1" x2="1" y2="11" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
|
|
7544
7544
|
</svg>`;
|
|
7545
|
-
class
|
|
7545
|
+
class Si {
|
|
7546
7546
|
manager;
|
|
7547
7547
|
wrapper;
|
|
7548
7548
|
input;
|
|
@@ -7561,7 +7561,7 @@ class vi {
|
|
|
7561
7561
|
return e.className = "engine-2d-search", e.innerHTML = `
|
|
7562
7562
|
<div class="engine-2d-search__box">
|
|
7563
7563
|
<div class="engine-2d-search__input-row">
|
|
7564
|
-
<span class="engine-2d-search__icon">${
|
|
7564
|
+
<span class="engine-2d-search__icon">${Ei}</span>
|
|
7565
7565
|
<input
|
|
7566
7566
|
class="engine-2d-search__input"
|
|
7567
7567
|
type="text"
|
|
@@ -7569,7 +7569,7 @@ class vi {
|
|
|
7569
7569
|
autocomplete="off"
|
|
7570
7570
|
spellcheck="false"
|
|
7571
7571
|
/>
|
|
7572
|
-
<button class="engine-2d-search__clear" title="清除">${
|
|
7572
|
+
<button class="engine-2d-search__clear" title="清除">${Ci}</button>
|
|
7573
7573
|
</div>
|
|
7574
7574
|
<div class="engine-2d-search__divider"></div>
|
|
7575
7575
|
<div class="engine-2d-search__status"></div>
|
|
@@ -7675,13 +7675,13 @@ class vi {
|
|
|
7675
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);
|
|
7676
7676
|
}
|
|
7677
7677
|
}
|
|
7678
|
-
class
|
|
7678
|
+
class Ti {
|
|
7679
7679
|
engine;
|
|
7680
7680
|
searchUI = null;
|
|
7681
7681
|
constructor(e) {
|
|
7682
7682
|
this.engine = e;
|
|
7683
7683
|
const t = document.getElementById(e?.options?.containerId ?? "") ?? e?.container ?? null;
|
|
7684
|
-
t && (this.searchUI = new
|
|
7684
|
+
t && (this.searchUI = new Si(t, this));
|
|
7685
7685
|
}
|
|
7686
7686
|
/** 只查询已加载的文字实体,支持连续包含和按字符顺序的模糊匹配。 */
|
|
7687
7687
|
search(e) {
|
|
@@ -7755,7 +7755,7 @@ class bi {
|
|
|
7755
7755
|
this.searchUI?.dispose(), this.searchUI = null;
|
|
7756
7756
|
}
|
|
7757
7757
|
}
|
|
7758
|
-
const
|
|
7758
|
+
const st = {
|
|
7759
7759
|
dark: {
|
|
7760
7760
|
/* 背景 */
|
|
7761
7761
|
"--e2d-bg": "#1e1f22",
|
|
@@ -7858,14 +7858,14 @@ const qe = {
|
|
|
7858
7858
|
"--e2d-coord-label": "rgba(0,0,0,0.50)"
|
|
7859
7859
|
}
|
|
7860
7860
|
};
|
|
7861
|
-
class
|
|
7861
|
+
class Ai {
|
|
7862
7862
|
container;
|
|
7863
7863
|
current;
|
|
7864
7864
|
constructor(e, t = "dark") {
|
|
7865
7865
|
this.container = e, this.current = t, this._apply(t);
|
|
7866
7866
|
}
|
|
7867
7867
|
_apply(e) {
|
|
7868
|
-
const t =
|
|
7868
|
+
const t = st[e];
|
|
7869
7869
|
for (const [i, n] of Object.entries(t))
|
|
7870
7870
|
this.container.style.setProperty(i, n);
|
|
7871
7871
|
this.container.setAttribute("data-e2d-theme", e);
|
|
@@ -7880,18 +7880,18 @@ class wi {
|
|
|
7880
7880
|
this.setTheme(this.current === "dark" ? "light" : "dark");
|
|
7881
7881
|
}
|
|
7882
7882
|
dispose() {
|
|
7883
|
-
for (const e of Object.keys(
|
|
7883
|
+
for (const e of Object.keys(st[this.current]))
|
|
7884
7884
|
this.container.style.removeProperty(e);
|
|
7885
7885
|
this.container.removeAttribute("data-e2d-theme");
|
|
7886
7886
|
}
|
|
7887
7887
|
}
|
|
7888
|
-
const
|
|
7888
|
+
const ot = {
|
|
7889
7889
|
precision: 3,
|
|
7890
7890
|
unit: "m",
|
|
7891
7891
|
areaUnit: "m²",
|
|
7892
7892
|
scale: 1
|
|
7893
7893
|
};
|
|
7894
|
-
class
|
|
7894
|
+
class Ze {
|
|
7895
7895
|
manager;
|
|
7896
7896
|
points = [];
|
|
7897
7897
|
constructor(e) {
|
|
@@ -7926,7 +7926,7 @@ class je {
|
|
|
7926
7926
|
this.clearAllPoints();
|
|
7927
7927
|
}
|
|
7928
7928
|
}
|
|
7929
|
-
class
|
|
7929
|
+
class Li extends Ze {
|
|
7930
7930
|
/** 两点完成一条距离测量。 */
|
|
7931
7931
|
handleClick(e) {
|
|
7932
7932
|
super.handleClick(e), this.points.length === 2 && (this.manager.addMeasurement("distance", this.points), this.clearAllPoints());
|
|
@@ -7935,7 +7935,7 @@ class xi extends je {
|
|
|
7935
7935
|
this.points.length === 1 && this.manager.drawPreview("distance", [this.points[0], e]);
|
|
7936
7936
|
}
|
|
7937
7937
|
}
|
|
7938
|
-
class
|
|
7938
|
+
class Ii extends Ze {
|
|
7939
7939
|
/** 三点及以上可以闭合面积,双击或 Enter 结束。 */
|
|
7940
7940
|
handleClick(e) {
|
|
7941
7941
|
super.handleClick(e), this.manager.drawPreview("area", this.points);
|
|
@@ -7948,7 +7948,7 @@ class ki extends je {
|
|
|
7948
7948
|
e.length >= 3 && this.manager.addMeasurement("area", e), this.clearAllPoints();
|
|
7949
7949
|
}
|
|
7950
7950
|
}
|
|
7951
|
-
class
|
|
7951
|
+
class Pi extends Ze {
|
|
7952
7952
|
/** 三点完成角度测量,第二个点作为角点。 */
|
|
7953
7953
|
handleClick(e) {
|
|
7954
7954
|
super.handleClick(e), this.points.length === 3 && (this.manager.addMeasurement("angle", this.points), this.clearAllPoints());
|
|
@@ -7957,7 +7957,7 @@ class Mi extends je {
|
|
|
7957
7957
|
this.points.length >= 2 && this.manager.drawPreview("angle", [...this.points, e]);
|
|
7958
7958
|
}
|
|
7959
7959
|
}
|
|
7960
|
-
class
|
|
7960
|
+
class Di {
|
|
7961
7961
|
distanceMeasure;
|
|
7962
7962
|
areaMeasure;
|
|
7963
7963
|
angleMeasure;
|
|
@@ -7969,7 +7969,7 @@ class _i {
|
|
|
7969
7969
|
engine;
|
|
7970
7970
|
container;
|
|
7971
7971
|
annotationContainer;
|
|
7972
|
-
setting = { ...
|
|
7972
|
+
setting = { ...ot };
|
|
7973
7973
|
isActive = !1;
|
|
7974
7974
|
currentTool = null;
|
|
7975
7975
|
previewRecord = null;
|
|
@@ -7977,7 +7977,7 @@ class _i {
|
|
|
7977
7977
|
hasDraggedAfterMouseDown = !1;
|
|
7978
7978
|
currentWorkspaceKey = "model";
|
|
7979
7979
|
constructor(e) {
|
|
7980
|
-
this.engine = e, this.container = e.container, this.distanceMeasure = new
|
|
7980
|
+
this.engine = e, this.container = e.container, this.distanceMeasure = new Li(this), this.areaMeasure = new Ii(this), this.angleMeasure = new Pi(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);
|
|
7981
7981
|
}
|
|
7982
7982
|
/** 开启 2D 测量事件;只停用图元点选,不停用 pan/zoom 视图控制。 */
|
|
7983
7983
|
active() {
|
|
@@ -8224,19 +8224,19 @@ class _i {
|
|
|
8224
8224
|
return e === "distance" ? this.annotationData.distanceAnnotation : e === "area" ? this.annotationData.areaAnnotation : this.annotationData.angleAnnotation;
|
|
8225
8225
|
}
|
|
8226
8226
|
normalizePrecision(e) {
|
|
8227
|
-
return Number.isFinite(e) ? Math.max(0, Math.min(8, Math.round(e))) :
|
|
8227
|
+
return Number.isFinite(e) ? Math.max(0, Math.min(8, Math.round(e))) : ot.precision;
|
|
8228
8228
|
}
|
|
8229
8229
|
createId() {
|
|
8230
8230
|
return `measure-2d-${Date.now()}-${Math.random().toString(16).slice(2)}`;
|
|
8231
8231
|
}
|
|
8232
8232
|
}
|
|
8233
|
-
const
|
|
8233
|
+
const Ue = {
|
|
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
|
-
},
|
|
8239
|
+
}, zi = {
|
|
8240
8240
|
none: be("/assets/icon/选择.svg", import.meta.url),
|
|
8241
8241
|
line: be("/assets/icon/线.svg", import.meta.url),
|
|
8242
8242
|
arrow: be("/assets/icon/箭头.svg", import.meta.url),
|
|
@@ -8245,8 +8245,8 @@ const Re = {
|
|
|
8245
8245
|
polygon: be("/assets/icon/面积.svg", import.meta.url),
|
|
8246
8246
|
text: be("/assets/icon/文字.svg", import.meta.url),
|
|
8247
8247
|
cloudline: be("/assets/icon/云线.svg", import.meta.url)
|
|
8248
|
-
},
|
|
8249
|
-
class
|
|
8248
|
+
}, Bi = "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>'), Ri = "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 Ni {
|
|
8250
8250
|
engine;
|
|
8251
8251
|
container;
|
|
8252
8252
|
layer;
|
|
@@ -8255,7 +8255,7 @@ class Ti {
|
|
|
8255
8255
|
records = [];
|
|
8256
8256
|
isActive = !1;
|
|
8257
8257
|
currentType = null;
|
|
8258
|
-
style = { ...
|
|
8258
|
+
style = { ...Ue };
|
|
8259
8259
|
draft = null;
|
|
8260
8260
|
draftStart = null;
|
|
8261
8261
|
polygonPoints = [];
|
|
@@ -8426,7 +8426,7 @@ class Ti {
|
|
|
8426
8426
|
{ type: "cloudline", title: "云线,双击或 Enter 结束" },
|
|
8427
8427
|
{ type: "text", title: "文字" }
|
|
8428
8428
|
].forEach((a) => {
|
|
8429
|
-
const l = this.createIconButton(a.title,
|
|
8429
|
+
const l = this.createIconButton(a.title, zi[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);
|
|
@@ -8437,15 +8437,15 @@ class Ti {
|
|
|
8437
8437
|
}, e.appendChild(i);
|
|
8438
8438
|
const n = document.createElement("input");
|
|
8439
8439
|
n.type = "number", n.min = "1", n.max = "20", n.value = `${this.style.strokeWidth}`, n.title = "线宽", n.onchange = () => {
|
|
8440
|
-
this.style.strokeWidth = this.normalizeNumber(n.valueAsNumber, 1, 20,
|
|
8440
|
+
this.style.strokeWidth = this.normalizeNumber(n.valueAsNumber, 1, 20, Ue.strokeWidth);
|
|
8441
8441
|
}, e.appendChild(n);
|
|
8442
8442
|
const r = document.createElement("input");
|
|
8443
8443
|
r.type = "number", r.min = "10", r.max = "72", r.value = `${this.style.fontSize}`, r.title = "字号", r.onchange = () => {
|
|
8444
|
-
this.style.fontSize = this.normalizeNumber(r.valueAsNumber, 10, 72,
|
|
8444
|
+
this.style.fontSize = this.normalizeNumber(r.valueAsNumber, 10, 72, Ue.fontSize);
|
|
8445
8445
|
}, e.appendChild(r), e.appendChild(this.createDivider());
|
|
8446
|
-
const s = this.createIconButton("清空",
|
|
8446
|
+
const s = this.createIconButton("清空", Bi);
|
|
8447
8447
|
s.onclick = () => this.clearAll(), e.appendChild(s);
|
|
8448
|
-
const o = this.createIconButton("关闭",
|
|
8448
|
+
const o = this.createIconButton("关闭", Ri);
|
|
8449
8449
|
return o.onclick = () => {
|
|
8450
8450
|
this.hideToolbar(), this.disActive();
|
|
8451
8451
|
}, e.appendChild(o), e;
|
|
@@ -8646,7 +8646,7 @@ class Ti {
|
|
|
8646
8646
|
return `markup-2d-${Date.now()}-${Math.random().toString(16).slice(2)}`;
|
|
8647
8647
|
}
|
|
8648
8648
|
}
|
|
8649
|
-
class
|
|
8649
|
+
class Oi {
|
|
8650
8650
|
container;
|
|
8651
8651
|
labelContainer;
|
|
8652
8652
|
projectCoordinate;
|
|
@@ -8845,11 +8845,11 @@ class Ai {
|
|
|
8845
8845
|
e.stopImmediatePropagation();
|
|
8846
8846
|
};
|
|
8847
8847
|
}
|
|
8848
|
-
class
|
|
8848
|
+
class Vi {
|
|
8849
8849
|
engine;
|
|
8850
8850
|
manager;
|
|
8851
8851
|
constructor(e) {
|
|
8852
|
-
this.engine = e, this.manager = new
|
|
8852
|
+
this.engine = e, this.manager = new Oi({
|
|
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 Li {
|
|
|
8912
8912
|
return { x: i.x, y: i.y, z: 0 };
|
|
8913
8913
|
}
|
|
8914
8914
|
}
|
|
8915
|
-
class
|
|
8915
|
+
class ji {
|
|
8916
8916
|
engine;
|
|
8917
8917
|
mainViewPort = null;
|
|
8918
8918
|
constructor(e) {
|
|
@@ -8948,7 +8948,7 @@ class Pi {
|
|
|
8948
8948
|
};
|
|
8949
8949
|
}
|
|
8950
8950
|
}
|
|
8951
|
-
class
|
|
8951
|
+
class Ui {
|
|
8952
8952
|
constructor(e, t) {
|
|
8953
8953
|
this.container = e, this.engine = t, this.el = document.createElement("div"), this.el.className = "engine-2d-workspace-tabs", this.container.appendChild(this.el), this.unsubscribe = this.engine.events?.on(fe.ModelLoaded, () => this.refresh()) ?? (() => {
|
|
8954
8954
|
}), this.refresh();
|
|
@@ -8987,10 +8987,213 @@ class Ii {
|
|
|
8987
8987
|
this.unsubscribe(), this.el.remove();
|
|
8988
8988
|
}
|
|
8989
8989
|
}
|
|
8990
|
-
const
|
|
8991
|
-
version:
|
|
8992
|
-
},
|
|
8993
|
-
|
|
8990
|
+
const Wi = "3.9.205", Fi = {
|
|
8991
|
+
version: Wi
|
|
8992
|
+
}, Ce = Fi.version;
|
|
8993
|
+
function Ye() {
|
|
8994
|
+
const b = globalThis.crypto?.subtle;
|
|
8995
|
+
if (!b)
|
|
8996
|
+
throw new Error("[BimEngine] Web Crypto API is required for secure sdkAuth credentials mode");
|
|
8997
|
+
return b;
|
|
8998
|
+
}
|
|
8999
|
+
function Se(b) {
|
|
9000
|
+
return new TextEncoder().encode(b);
|
|
9001
|
+
}
|
|
9002
|
+
function Te(b) {
|
|
9003
|
+
return b.buffer.slice(b.byteOffset, b.byteOffset + b.byteLength);
|
|
9004
|
+
}
|
|
9005
|
+
function at(b) {
|
|
9006
|
+
let e = "";
|
|
9007
|
+
return b.forEach((t) => {
|
|
9008
|
+
e += String.fromCharCode(t);
|
|
9009
|
+
}), btoa(e);
|
|
9010
|
+
}
|
|
9011
|
+
function Hi(b) {
|
|
9012
|
+
const e = b.getUTCFullYear(), t = String(b.getUTCMonth() + 1).padStart(2, "0"), i = String(b.getUTCDate()).padStart(2, "0");
|
|
9013
|
+
return `${e}${t}${i}`;
|
|
9014
|
+
}
|
|
9015
|
+
async function Gi(b) {
|
|
9016
|
+
const e = await Ye().digest("SHA-256", Te(Se(b)));
|
|
9017
|
+
return Array.from(new Uint8Array(e)).map((t) => t.toString(16).padStart(2, "0")).join("");
|
|
9018
|
+
}
|
|
9019
|
+
async function $i(b, e) {
|
|
9020
|
+
const t = Ye(), i = await t.importKey("raw", Te(b), { name: "HMAC", hash: "SHA-256" }, !1, ["sign"]);
|
|
9021
|
+
return t.sign("HMAC", i, Te(Se(e)));
|
|
9022
|
+
}
|
|
9023
|
+
function Zi(b) {
|
|
9024
|
+
return Se(
|
|
9025
|
+
[b.appId, b.engineType, b.requestDate, String(b.timestamp), b.nonce].join("|")
|
|
9026
|
+
);
|
|
9027
|
+
}
|
|
9028
|
+
async function Yi(b) {
|
|
9029
|
+
const e = Ye(), t = /* @__PURE__ */ new Date(), i = t.getTime(), n = Hi(t), r = globalThis.crypto.randomUUID(), s = globalThis.crypto.getRandomValues(new Uint8Array(12)), o = await Gi(b.appSecret), a = await $i(Se(o), n), l = await e.importKey("raw", a, "AES-GCM", !1, ["encrypt"]), c = JSON.stringify({
|
|
9030
|
+
appKey: b.appKey,
|
|
9031
|
+
appSecret: b.appSecret
|
|
9032
|
+
}), f = await e.encrypt(
|
|
9033
|
+
{
|
|
9034
|
+
name: "AES-GCM",
|
|
9035
|
+
iv: s,
|
|
9036
|
+
additionalData: Te(Zi({
|
|
9037
|
+
appId: b.appId,
|
|
9038
|
+
engineType: b.engineType,
|
|
9039
|
+
requestDate: n,
|
|
9040
|
+
timestamp: i,
|
|
9041
|
+
nonce: r
|
|
9042
|
+
})),
|
|
9043
|
+
tagLength: 128
|
|
9044
|
+
},
|
|
9045
|
+
l,
|
|
9046
|
+
Te(Se(c))
|
|
9047
|
+
);
|
|
9048
|
+
return {
|
|
9049
|
+
appId: b.appId,
|
|
9050
|
+
engineType: b.engineType,
|
|
9051
|
+
requestDate: n,
|
|
9052
|
+
timestamp: i,
|
|
9053
|
+
nonce: r,
|
|
9054
|
+
iv: at(s),
|
|
9055
|
+
cipherText: at(new Uint8Array(f)),
|
|
9056
|
+
sdkVersion: b.sdkVersion,
|
|
9057
|
+
origin: b.origin,
|
|
9058
|
+
product: b.product
|
|
9059
|
+
};
|
|
9060
|
+
}
|
|
9061
|
+
const We = /* @__PURE__ */ new Map();
|
|
9062
|
+
function Ne(b) {
|
|
9063
|
+
return b.replace(/\/+$/, "");
|
|
9064
|
+
}
|
|
9065
|
+
function Oe(b) {
|
|
9066
|
+
if (b) return b;
|
|
9067
|
+
if (typeof window < "u" && typeof window.location?.origin == "string")
|
|
9068
|
+
return window.location.origin;
|
|
9069
|
+
}
|
|
9070
|
+
function Ki(b, e) {
|
|
9071
|
+
return JSON.stringify({
|
|
9072
|
+
endpoint: Ne(b.endpoint),
|
|
9073
|
+
token: b.token ?? "",
|
|
9074
|
+
appId: b.appId ?? "",
|
|
9075
|
+
appKey: b.appKey ?? "",
|
|
9076
|
+
appSecret: b.appSecret ?? "",
|
|
9077
|
+
origin: Oe(b.origin) ?? "",
|
|
9078
|
+
product: b.product ?? "",
|
|
9079
|
+
engineType: e,
|
|
9080
|
+
sdkVersion: Ce
|
|
9081
|
+
});
|
|
9082
|
+
}
|
|
9083
|
+
async function Ge(b, e, t) {
|
|
9084
|
+
const i = typeof AbortController < "u" ? new AbortController() : void 0, n = i ? setTimeout(() => i.abort(), t) : void 0;
|
|
9085
|
+
try {
|
|
9086
|
+
const r = await fetch(b, {
|
|
9087
|
+
method: "POST",
|
|
9088
|
+
headers: {
|
|
9089
|
+
"Content-Type": "application/json"
|
|
9090
|
+
},
|
|
9091
|
+
body: JSON.stringify(e),
|
|
9092
|
+
signal: i?.signal
|
|
9093
|
+
}), s = await r.json().catch(() => ({}));
|
|
9094
|
+
if (!r.ok) {
|
|
9095
|
+
const o = s?.error?.message ?? s?.message ?? `SDK authentication failed with status ${r.status}`;
|
|
9096
|
+
throw new Error(o);
|
|
9097
|
+
}
|
|
9098
|
+
return s;
|
|
9099
|
+
} finally {
|
|
9100
|
+
n != null && clearTimeout(n);
|
|
9101
|
+
}
|
|
9102
|
+
}
|
|
9103
|
+
async function Xi(b, e) {
|
|
9104
|
+
const t = await Ge(`${Ne(b.endpoint)}/oauth/sdk-verify`, {
|
|
9105
|
+
sdkToken: b.token,
|
|
9106
|
+
engineType: e,
|
|
9107
|
+
sdkVersion: Ce,
|
|
9108
|
+
origin: Oe(b.origin),
|
|
9109
|
+
product: b.product
|
|
9110
|
+
}, b.timeoutMs ?? 8e3);
|
|
9111
|
+
return t.sdkToken = b.token, t;
|
|
9112
|
+
}
|
|
9113
|
+
async function qi(b, e) {
|
|
9114
|
+
const t = await Yi({
|
|
9115
|
+
appId: b.appId,
|
|
9116
|
+
appKey: b.appKey,
|
|
9117
|
+
appSecret: b.appSecret,
|
|
9118
|
+
engineType: e,
|
|
9119
|
+
sdkVersion: Ce,
|
|
9120
|
+
origin: Oe(b.origin),
|
|
9121
|
+
product: b.product
|
|
9122
|
+
}), i = await Ge(
|
|
9123
|
+
`${Ne(b.endpoint)}/oauth/sdk-token/secure`,
|
|
9124
|
+
t,
|
|
9125
|
+
b.timeoutMs ?? 8e3
|
|
9126
|
+
), n = await Ge(`${Ne(b.endpoint)}/oauth/sdk-verify`, {
|
|
9127
|
+
sdkToken: i.sdkToken,
|
|
9128
|
+
engineType: e,
|
|
9129
|
+
sdkVersion: Ce,
|
|
9130
|
+
origin: Oe(b.origin),
|
|
9131
|
+
product: b.product
|
|
9132
|
+
}, b.timeoutMs ?? 8e3);
|
|
9133
|
+
return n.sdkToken = i.sdkToken, n;
|
|
9134
|
+
}
|
|
9135
|
+
async function Ji(b, e) {
|
|
9136
|
+
const t = b?.sdkAuth;
|
|
9137
|
+
if (!t)
|
|
9138
|
+
throw new Error("[BimEngine] sdkAuth is required. Provide sdkAuth.token or sdkAuth.appId/appKey/appSecret");
|
|
9139
|
+
if (!t.endpoint)
|
|
9140
|
+
throw new Error("[BimEngine] sdkAuth.endpoint is required");
|
|
9141
|
+
if (!t.token && !(t.appId && t.appKey && t.appSecret))
|
|
9142
|
+
throw new Error("[BimEngine] Provide sdkAuth.token or sdkAuth.appId/appKey/appSecret");
|
|
9143
|
+
const i = Ki(t, e), n = We.get(i);
|
|
9144
|
+
if (n) {
|
|
9145
|
+
const s = await n;
|
|
9146
|
+
return b && (b.__sdkAuthSession = s), s;
|
|
9147
|
+
}
|
|
9148
|
+
const r = (t.token ? Xi(t, e) : qi(t, e)).then((s) => {
|
|
9149
|
+
if (s.authorized !== !0)
|
|
9150
|
+
throw new Error("[BimEngine] SDK authorization rejected");
|
|
9151
|
+
return b && (b.__sdkAuthSession = s), s;
|
|
9152
|
+
}).catch((s) => {
|
|
9153
|
+
throw We.delete(i), s;
|
|
9154
|
+
});
|
|
9155
|
+
return We.set(i, r), r;
|
|
9156
|
+
}
|
|
9157
|
+
function Qi(b) {
|
|
9158
|
+
return b.replace(/\/+$/, "");
|
|
9159
|
+
}
|
|
9160
|
+
async function en(b, e, t) {
|
|
9161
|
+
const i = typeof AbortController < "u" ? new AbortController() : void 0, n = i ? setTimeout(() => i.abort(), t) : void 0;
|
|
9162
|
+
try {
|
|
9163
|
+
const r = await fetch(b, {
|
|
9164
|
+
method: "POST",
|
|
9165
|
+
headers: {
|
|
9166
|
+
"Content-Type": "application/json"
|
|
9167
|
+
},
|
|
9168
|
+
body: JSON.stringify(e),
|
|
9169
|
+
signal: i?.signal
|
|
9170
|
+
}), s = await r.json().catch(() => ({}));
|
|
9171
|
+
if (!r.ok) {
|
|
9172
|
+
const o = s?.error?.message ?? s?.message ?? `ViewToken resolve failed with status ${r.status}`;
|
|
9173
|
+
throw new Error(o);
|
|
9174
|
+
}
|
|
9175
|
+
return s;
|
|
9176
|
+
} finally {
|
|
9177
|
+
n != null && clearTimeout(n);
|
|
9178
|
+
}
|
|
9179
|
+
}
|
|
9180
|
+
async function tn(b, e, t) {
|
|
9181
|
+
const i = await Ji(b, t), n = b?.sdkAuth;
|
|
9182
|
+
if (!n?.endpoint)
|
|
9183
|
+
throw new Error("[BimEngine] sdkAuth.endpoint is required for viewToken loading");
|
|
9184
|
+
if (!i?.sdkToken)
|
|
9185
|
+
throw new Error("[BimEngine] sdkToken is missing after SDK authorization");
|
|
9186
|
+
return en(
|
|
9187
|
+
`${Qi(n.endpoint)}/models/view-token/resolve`,
|
|
9188
|
+
{
|
|
9189
|
+
sdkToken: i.sdkToken,
|
|
9190
|
+
viewToken: e,
|
|
9191
|
+
engineType: t
|
|
9192
|
+
},
|
|
9193
|
+
n.timeoutMs ?? 8e3
|
|
9194
|
+
);
|
|
9195
|
+
}
|
|
9196
|
+
class nn {
|
|
8994
9197
|
// 配置选项
|
|
8995
9198
|
options;
|
|
8996
9199
|
container = null;
|
|
@@ -9035,7 +9238,7 @@ class Ri {
|
|
|
9035
9238
|
renderer = null;
|
|
9036
9239
|
// 数据
|
|
9037
9240
|
dwgData = null;
|
|
9038
|
-
version =
|
|
9241
|
+
version = Ce;
|
|
9039
9242
|
constructor(e) {
|
|
9040
9243
|
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
9244
|
items: [
|
|
@@ -9049,13 +9252,13 @@ class Ri {
|
|
|
9049
9252
|
]
|
|
9050
9253
|
}, this.enablePerformanceMonitoring = e.enablePerformanceMonitoring ?? !1, this.container = document.getElementById(e.containerId), !this.container)
|
|
9051
9254
|
throw new Error(`Container ${e.containerId} not found`);
|
|
9052
|
-
this.initialize(), this.handelBehaved2d =
|
|
9255
|
+
this.initialize(), this.handelBehaved2d = bi(this), this.interactionModule2d = new xi(this), this.interactionModule2d.init(), this.interactionModule2d.active();
|
|
9053
9256
|
}
|
|
9054
9257
|
/**
|
|
9055
9258
|
* 初始化引擎
|
|
9056
9259
|
*/
|
|
9057
9260
|
initialize() {
|
|
9058
|
-
this.events = new
|
|
9261
|
+
this.events = new Lt(!1), this.sceneModule2d = new zt(this, this.options), this.scene = this.sceneModule2d.scene, this.cameraModule2d = new Rt(this, this.container), this.camera = this.cameraModule2d.orthographicCamera, this.renderModule2d = new Nt(this, this.container, this.options), this.renderer = this.renderModule2d.renderer, this.controlModule2d = new Vt(this), this.loaderModule2d = new pi(this), this.themeManager = new Ai(this.container), this.layerManager = new dt(this), this.searchManager = new Ti(this), this.measure = new Di(this), this.markup = new Ni(this), this.label = new Vi(this), this.viewCube = new ji(this), this.octreeBox2d = new mi(this), this.modelToolModule2d = new vi(this), this.engineStatus2d = new Bt(this), this.linkView2d3d = new gi(this), this.linkElement2d3d = new yi(this), this.sceneModule2d.initGrid(), this.cadCursorUI = new ki(this.container, this.renderer.domElement, this.options.cursorStyle ?? "short-crosshair"), this.cadCursorUI.setBackgroundColor(this.options.backgroundColor ?? 1710618), this.loadingUI = new _i(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 Ui(this.container, this), this.contextMenuUI = new Mi(
|
|
9059
9262
|
this.container,
|
|
9060
9263
|
this.renderer.domElement,
|
|
9061
9264
|
(e) => {
|
|
@@ -9098,7 +9301,7 @@ class Ri {
|
|
|
9098
9301
|
};
|
|
9099
9302
|
/** 初始化 stats.js 性能监视器,showStats 优先控制可视面板,旧配置 enablePerformanceMonitoring 继续兼容。 */
|
|
9100
9303
|
initStatsMonitor() {
|
|
9101
|
-
!(this.options.showStats ?? this.enablePerformanceMonitoring) || !this.container || (this.stats = new
|
|
9304
|
+
!(this.options.showStats ?? this.enablePerformanceMonitoring) || !this.container || (this.stats = new At(), 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
9305
|
}
|
|
9103
9306
|
/**
|
|
9104
9307
|
* 更新性能统计
|
|
@@ -9119,6 +9322,19 @@ class Ri {
|
|
|
9119
9322
|
async loadModel(e, t) {
|
|
9120
9323
|
return await this.loaderModule2d.loadModel(e, t), {};
|
|
9121
9324
|
}
|
|
9325
|
+
/**
|
|
9326
|
+
* 通过 viewToken 向 OpenAPI 解析真实加载地址,再复用现有 2D URL 加载逻辑。
|
|
9327
|
+
*/
|
|
9328
|
+
async loadModelByViewToken(e, t) {
|
|
9329
|
+
const i = await tn(
|
|
9330
|
+
this.options,
|
|
9331
|
+
e,
|
|
9332
|
+
"2d"
|
|
9333
|
+
);
|
|
9334
|
+
if (i.assetCategory === "composite_model" && i.urls.length > 1)
|
|
9335
|
+
throw new Error("[BimEngine] 2D engine does not support composite_model viewToken loading");
|
|
9336
|
+
return this.loadModel(i.url, t);
|
|
9337
|
+
}
|
|
9122
9338
|
/** 获取当前 2D 图纸中可切换的布局空间列表。 */
|
|
9123
9339
|
getLayouts() {
|
|
9124
9340
|
return this.loaderModule2d?.getLayouts() ?? [];
|
|
@@ -9317,11 +9533,11 @@ class Ri {
|
|
|
9317
9533
|
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
9534
|
}
|
|
9319
9535
|
}
|
|
9320
|
-
function
|
|
9321
|
-
return new
|
|
9536
|
+
function sn(b) {
|
|
9537
|
+
return new nn(b);
|
|
9322
9538
|
}
|
|
9323
9539
|
export {
|
|
9324
|
-
|
|
9325
|
-
|
|
9326
|
-
|
|
9540
|
+
nn as EngineKernel2d,
|
|
9541
|
+
sn as createEngine2d,
|
|
9542
|
+
sn as default
|
|
9327
9543
|
};
|