@realsee/dnalogel 3.73.1-alpha.1 → 3.73.1

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.
@@ -333,7 +333,6 @@ import "../Sculpt/Editors/BoxMeshEditor.js";
333
333
  import "../Sculpt/Meshes/Box.js";
334
334
  import "../shared-utils/forReverseEach.js";
335
335
  import "../Sculpt/Objects/Line/index.js";
336
- import "../shared-utils/five/getFloorMesh.js";
337
336
  import "../PanoTagPlugin/Components/TagContainer.js";
338
337
  import "../PanoTagPlugin/Components/TagItem.js";
339
338
  import "../PanoTagPlugin/Components/Common/TagPoint.js";
@@ -366,7 +365,7 @@ import "./utils/coordinatesToVector.js";
366
365
  import "./utils/safeCall.js";
367
366
  import "./utils/sleep.js";
368
367
  import "../shared-utils/five/fiveLoaded.js";
369
- class Zp extends z {
368
+ class Yp extends z {
370
369
  constructor(t, r) {
371
370
  var h;
372
371
  super(t, r);
@@ -474,5 +473,5 @@ class Zp extends z {
474
473
  }
475
474
  }
476
475
  export {
477
- Zp as default
476
+ Yp as default
478
477
  };
@@ -319,7 +319,6 @@ import "../Sculpt/Editors/BoxMeshEditor.js";
319
319
  import "../Sculpt/Meshes/Box.js";
320
320
  import "../shared-utils/forReverseEach.js";
321
321
  import "../Sculpt/Objects/Line/index.js";
322
- import "../shared-utils/five/getFloorMesh.js";
323
322
  import "../PanoTagPlugin/Components/TagContainer.js";
324
323
  import "../PanoTagPlugin/Components/TagItem.js";
325
324
  import "../PanoTagPlugin/Components/Common/TagPoint.js";
@@ -366,7 +365,7 @@ import "../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
366
365
  import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
367
366
  import "./Work.js";
368
367
  import "./utils/coordinatesToVector.js";
369
- class ia extends G {
368
+ class ta extends G {
370
369
  constructor(t, i) {
371
370
  super(t, i);
372
371
  k(this, "state", {
@@ -757,5 +756,5 @@ class ia extends G {
757
756
  }
758
757
  }
759
758
  export {
760
- ia as default
759
+ ta as default
761
760
  };
@@ -1,4 +1,4 @@
1
- import { typing as Tm } from "./typing/index.js";
1
+ import { typing as km } from "./typing/index.js";
2
2
  import t from "./Work.js";
3
3
  import i from "./Move.js";
4
4
  import "../GuideLinePlugin/index.js";
@@ -305,7 +305,6 @@ import "../Sculpt/Editors/BoxMeshEditor.js";
305
305
  import "../Sculpt/Meshes/Box.js";
306
306
  import "../shared-utils/forReverseEach.js";
307
307
  import "../Sculpt/Objects/Line/index.js";
308
- import "../shared-utils/five/getFloorMesh.js";
309
308
  import "../PanoTagPlugin/Components/TagContainer.js";
310
309
  import "../PanoTagPlugin/Components/TagItem.js";
311
310
  import "../PanoTagPlugin/Components/Common/TagPoint.js";
@@ -338,13 +337,13 @@ import "./utils/sleep.js";
338
337
  import "../shared-utils/five/fiveLoaded.js";
339
338
  import "./BaseController.js";
340
339
  import "./utils/getFiveStateOnCurve.js";
341
- const ym = (o, r) => new t(o, r), Mm = (o, r) => new i(o, r);
340
+ const xm = (o, r) => new t(o, r), ym = (o, r) => new i(o, r);
342
341
  export {
343
- ym as CruisePlugin,
342
+ xm as CruisePlugin,
344
343
  t as CruisePluginController,
345
- Tm as CruisePluginTypes,
344
+ km as CruisePluginTypes,
346
345
  i as MoveController,
347
- Mm as MovePlugin,
346
+ ym as MovePlugin,
348
347
  t as WalkController,
349
- ym as default
348
+ xm as default
350
349
  };
@@ -330,7 +330,6 @@ import "../Sculpt/Editors/BoxMeshEditor.js";
330
330
  import "../Sculpt/Meshes/Box.js";
331
331
  import "../shared-utils/forReverseEach.js";
332
332
  import "../Sculpt/Objects/Line/index.js";
333
- import "../shared-utils/five/getFloorMesh.js";
334
333
  import "../PanoTagPlugin/Components/TagContainer.js";
335
334
  import "../PanoTagPlugin/Components/TagItem.js";
336
335
  import "../PanoTagPlugin/Components/Common/TagPoint.js";
@@ -366,8 +365,8 @@ import "../CruisePlugin/utils/coordinatesToVector.js";
366
365
  import "../CruisePlugin/utils/safeCall.js";
367
366
  import "../CruisePlugin/utils/sleep.js";
368
367
  import "../shared-utils/five/fiveLoaded.js";
369
- const _ = "GuideLinePlugin", E = `${_}`, ne = (a) => `${E}--${a}`;
370
- class le extends k {
368
+ const _ = "GuideLinePlugin", E = `${_}`, ae = (a) => `${E}--${a}`;
369
+ class ne extends k {
371
370
  constructor(t, i) {
372
371
  super(t, i);
373
372
  d(this, "name", _);
@@ -531,6 +530,6 @@ class le extends k {
531
530
  }
532
531
  }
533
532
  export {
534
- le as default,
535
- ne as pluginFlag
533
+ ne as default,
534
+ ae as pluginFlag
536
535
  };
@@ -5,7 +5,7 @@ import "../shared-utils/five/changeMode.js";
5
5
  import "../CruisePlugin/Move.js";
6
6
  import "../CruisePlugin/Work.js";
7
7
  import "../shared-utils/Subscribe.js";
8
- import { GuideLineItem as cp } from "./GuideLineItem/index.js";
8
+ import { GuideLineItem as bp } from "./GuideLineItem/index.js";
9
9
  import "three";
10
10
  import "./utils/createLineGeometry.js";
11
11
  import "../vendor/polyline-normals/index.js";
@@ -299,7 +299,6 @@ import "../Sculpt/Editors/BoxMeshEditor.js";
299
299
  import "../Sculpt/Meshes/Box.js";
300
300
  import "../shared-utils/forReverseEach.js";
301
301
  import "../Sculpt/Objects/Line/index.js";
302
- import "../shared-utils/five/getFloorMesh.js";
303
302
  import "../PanoTagPlugin/Components/TagContainer.js";
304
303
  import "../PanoTagPlugin/Components/TagItem.js";
305
304
  import "../PanoTagPlugin/Components/Common/TagPoint.js";
@@ -338,5 +337,5 @@ import "../CruisePlugin/utils/safeCall.js";
338
337
  import "../CruisePlugin/utils/sleep.js";
339
338
  import "../shared-utils/five/fiveLoaded.js";
340
339
  export {
341
- cp as GuideLineItem
340
+ bp as GuideLineItem
342
341
  };
@@ -24,7 +24,7 @@ import "./utils/index.js";
24
24
  import "../vendor/object-assign-deep/objectAssignDeep.js";
25
25
  import "./utils/createPath.js";
26
26
  import "../shared-utils/fontSize.js";
27
- import { GuideLineModeItem as Zt } from "./GuideLineModeItem/index.js";
27
+ import { GuideLineModeItem as Yt } from "./GuideLineModeItem/index.js";
28
28
  import "../vendor/polyline-normals/index.js";
29
29
  import "../vendor/polyline-miter-util/index.js";
30
30
  import "../vendor/gl-vec2/add.js";
@@ -298,7 +298,6 @@ import "../Sculpt/Editors/BoxMeshEditor.js";
298
298
  import "../Sculpt/Meshes/Box.js";
299
299
  import "../shared-utils/forReverseEach.js";
300
300
  import "../Sculpt/Objects/Line/index.js";
301
- import "../shared-utils/five/getFloorMesh.js";
302
301
  import "../PanoTagPlugin/Components/TagContainer.js";
303
302
  import "../PanoTagPlugin/Components/TagItem.js";
304
303
  import "../PanoTagPlugin/Components/Common/TagPoint.js";
@@ -318,5 +317,5 @@ import "../PanoTagPlugin/Components/Common/TagPopover/ShareIcon.js";
318
317
  import "../PanoTagPlugin/utils/popoverContainer.js";
319
318
  import "../shared-utils/px2rem.js";
320
319
  export {
321
- Zt as GuideLineModeItem
320
+ Yt as GuideLineModeItem
322
321
  };
@@ -1,6 +1,6 @@
1
1
  import t from "./Controller.js";
2
- import { GuideLineItem$1 as Mp } from "./GuideLineItem/index.js";
3
- import { GuideLineModeItem$1 as wp } from "./GuideLineModeItem/index.js";
2
+ import { GuideLineItem$1 as gp } from "./GuideLineItem/index.js";
3
+ import { GuideLineModeItem$1 as Pp } from "./GuideLineModeItem/index.js";
4
4
  import "../base/BasePluginWithData.js";
5
5
  import "../base/BasePlugin.js";
6
6
  import "../shared-utils/Subscribe.js";
@@ -309,7 +309,6 @@ import "../Sculpt/Editors/BoxMeshEditor.js";
309
309
  import "../Sculpt/Meshes/Box.js";
310
310
  import "../shared-utils/forReverseEach.js";
311
311
  import "../Sculpt/Objects/Line/index.js";
312
- import "../shared-utils/five/getFloorMesh.js";
313
312
  import "../PanoTagPlugin/Components/TagContainer.js";
314
313
  import "../PanoTagPlugin/Components/TagItem.js";
315
314
  import "../PanoTagPlugin/Components/Common/TagPoint.js";
@@ -337,10 +336,10 @@ import "../shared-utils/five/changeMode.js";
337
336
  import "../shared-utils/nearlyEqual.js";
338
337
  import "../CruisePlugin/Move.js";
339
338
  import "../CruisePlugin/utils/getFiveStateOnCurve.js";
340
- const r = (i, o) => new t(i, o), $p = r;
339
+ const r = (i, o) => new t(i, o), xp = r;
341
340
  export {
342
- Mp as GuideLineItem,
343
- wp as GuideLineModeItem,
341
+ gp as GuideLineItem,
342
+ Pp as GuideLineModeItem,
344
343
  r as GuideLinePlugin,
345
- $p as default
344
+ xp as default
346
345
  };
@@ -6,19 +6,11 @@ import type { Vector3 } from 'three';
6
6
  import { Rectangle } from '../../../Sculpt/Objects/Rectangle';
7
7
  export type PlaneTagInterface<C extends TagContentType = TagContentType> = TagInstance<C, 'Plane'>;
8
8
  export declare class PlaneTag<C extends TagContentType = TagContentType> extends BaseTag<C, 'Plane'> {
9
- rectanglePlane?: Rectangle;
10
- private _floorIndex?;
11
- private _floorIndexDirty;
12
9
  constructor(plugin: PanoTagPluginController, tagData: TagData);
13
- /** 获取楼层索引(惰性计算 + 缓存) */
14
- get floorIndex(): number | undefined;
15
- /** 标记 floorIndex 需要重新计算(在位置等相关数据变化时调用) */
16
- invalidateFloorIndex(): void;
10
+ rectanglePlane?: Rectangle;
17
11
  applyVisible(): void;
18
12
  set(tag: PartialObjectDeep<Tag<C, 'Plane'>>, deepMerge?: boolean): void;
19
13
  setData(...data: Parameters<InstanceType<typeof BaseTag<C, 'Plane'>>['setData']>): void;
20
- /** 计算楼层索引 */
21
- private computeFloorIndex;
22
14
  private loadModel;
23
15
  private initialSculpt;
24
16
  editorEnable(): void;
@@ -1,46 +1,44 @@
1
- var j = Object.defineProperty, R = Object.defineProperties;
2
- var V = Object.getOwnPropertyDescriptors;
3
- var F = Object.getOwnPropertySymbols;
4
- var k = Object.prototype.hasOwnProperty, M = Object.prototype.propertyIsEnumerable;
5
- var y = (d, m, t) => m in d ? j(d, m, { enumerable: !0, configurable: !0, writable: !0, value: t }) : d[m] = t, I = (d, m) => {
6
- for (var t in m || (m = {}))
7
- k.call(m, t) && y(d, t, m[t]);
8
- if (F)
9
- for (var t of F(m))
10
- M.call(m, t) && y(d, t, m[t]);
11
- return d;
12
- }, S = (d, m) => R(d, V(m));
13
- var b = (d, m, t) => (y(d, typeof m != "symbol" ? m + "" : m, t), t);
14
- var C = (d, m, t) => new Promise((o, i) => {
15
- var a = (r) => {
1
+ var F = Object.defineProperty, T = Object.defineProperties;
2
+ var j = Object.getOwnPropertyDescriptors;
3
+ var b = Object.getOwnPropertySymbols;
4
+ var R = Object.prototype.hasOwnProperty, k = Object.prototype.propertyIsEnumerable;
5
+ var S = (l, i, t) => i in l ? F(l, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : l[i] = t, v = (l, i) => {
6
+ for (var t in i || (i = {}))
7
+ R.call(i, t) && S(l, t, i[t]);
8
+ if (b)
9
+ for (var t of b(i))
10
+ k.call(i, t) && S(l, t, i[t]);
11
+ return l;
12
+ }, D = (l, i) => T(l, j(i));
13
+ var C = (l, i, t) => new Promise((e, o) => {
14
+ var n = (s) => {
16
15
  try {
17
- e(t.next(r));
18
- } catch (p) {
19
- i(p);
16
+ r(t.next(s));
17
+ } catch (d) {
18
+ o(d);
20
19
  }
21
- }, n = (r) => {
20
+ }, m = (s) => {
22
21
  try {
23
- e(t.throw(r));
24
- } catch (p) {
25
- i(p);
22
+ r(t.throw(s));
23
+ } catch (d) {
24
+ o(d);
26
25
  }
27
- }, e = (r) => r.done ? o(r.value) : Promise.resolve(r.value).then(a, n);
28
- e((t = t.apply(d, m)).next());
26
+ }, r = (s) => s.done ? e(s.value) : Promise.resolve(s.value).then(n, m);
27
+ r((t = t.apply(l, i)).next());
29
28
  });
30
- import { CONST as w } from "../../../shared-utils/constants.js";
31
- import { CSS3DObjectPlus as O } from "../../../shared-utils/CSS3DRender/CSS3DObject.js";
32
- import { anyPositionToVector3 as T, arrayPositionToVector3 as g } from "../../../shared-utils/positionToVector3.js";
33
- import * as E from "three";
34
- import { planeNormal as _ } from "../../utils/planeNormal.js";
35
- import { centerPoint as G } from "../../../shared-utils/three/centerPoint.js";
36
- import { VideoPlane as L, ImagePlane as A } from "../../utils/model/mediaPlane.js";
37
- import N from "../../Components/Tag/index.js";
38
- import { BaseTag as B } from "./BaseTag.js";
29
+ import { CONST as E } from "../../../shared-utils/constants.js";
30
+ import { CSS3DObjectPlus as V } from "../../../shared-utils/CSS3DRender/CSS3DObject.js";
31
+ import { anyPositionToVector3 as M, arrayPositionToVector3 as u } from "../../../shared-utils/positionToVector3.js";
32
+ import "three";
33
+ import { planeNormal as O } from "../../utils/planeNormal.js";
34
+ import { VideoPlane as w, ImagePlane as G } from "../../utils/model/mediaPlane.js";
35
+ import L from "../../Components/Tag/index.js";
36
+ import { BaseTag as A } from "./BaseTag.js";
39
37
  import "../../../shared-utils/tag.js";
40
38
  import "../../../vendor/hammerjs/hammer.js";
41
39
  import "../../../shared-utils/three/PointSelector/index.js";
42
40
  import "../../../shared-utils/three/CSS3DRenderer/index.js";
43
- import { initialCSS3DRender as H } from "../../../shared-utils/CSS3DRender/index.js";
41
+ import { initialCSS3DRender as N } from "../../../shared-utils/CSS3DRender/index.js";
44
42
  import "@realsee/five/line";
45
43
  import "../../../shared-utils/three/core/Five_LineMaterial2.js";
46
44
  import "../../../shared-utils/three/core/Sphere.js";
@@ -48,14 +46,14 @@ import "../../../shared-utils/three/blink.js";
48
46
  import "../../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
49
47
  import "../../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
50
48
  import "../../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
51
- import { waitFiveModelLoaded as x } from "../../../shared-utils/five/fiveModelLoad.js";
52
- import { uuid as $ } from "../../../shared-utils/uuid.js";
49
+ import { waitFiveModelLoaded as I } from "../../../shared-utils/five/fiveModelLoad.js";
50
+ import { uuid as B } from "../../../shared-utils/uuid.js";
53
51
  import "../../../shared-utils/five/FivePuppet.js";
54
- import { Sculpt as U } from "../../../Sculpt/index.js";
55
- import { Rectangle as q } from "../../../Sculpt/Objects/Rectangle/index.js";
56
- import { getFloorMesh as W } from "../../../shared-utils/five/getFloorMesh.js";
52
+ import { Sculpt as x } from "../../../Sculpt/index.js";
53
+ import { Rectangle as H } from "../../../Sculpt/Objects/Rectangle/index.js";
57
54
  import "../../../shared-utils/even.js";
58
55
  import "../../../shared-utils/CSS3DRender/OpacityMesh.js";
56
+ import "../../../shared-utils/three/centerPoint.js";
59
57
  import "../../../shared-utils/isNil.js";
60
58
  import "../../../shared-utils/three/loadTexture.js";
61
59
  import "../../../shared-utils/three/Quadrangle.js";
@@ -299,89 +297,43 @@ import "../../../shared-utils/forReverseEach.js";
299
297
  import "../../../Sculpt/Objects/Line/index.js";
300
298
  import "../../../Sculpt/Editors/RectangleMeshEditor.js";
301
299
  import "../../../Sculpt/utils/sortPositionsByCameraPosition.js";
302
- const Z = /* @__PURE__ */ new Map(), z = /* @__PURE__ */ new Map();
303
- class Xr extends B {
304
- constructor(t, o) {
305
- super(t, o);
306
- b(this, "_floorIndex");
307
- b(this, "_floorIndexDirty", !0);
308
- this.state.unfolded = !0, this.loadModel();
309
- }
310
- /** 获取楼层索引(惰性计算 + 缓存) */
311
- get floorIndex() {
312
- return (this._floorIndexDirty || this._floorIndex === void 0) && (this._floorIndex = this.computeFloorIndex(), this._floorIndexDirty = !1), this._floorIndex;
313
- }
314
- /** 标记 floorIndex 需要重新计算(在位置等相关数据变化时调用) */
315
- invalidateFloorIndex() {
316
- this._floorIndexDirty = !0;
300
+ const $ = /* @__PURE__ */ new Map(), U = /* @__PURE__ */ new Map();
301
+ class Zr extends A {
302
+ constructor(i, t) {
303
+ super(i, t), this.state.unfolded = !0, this.loadModel();
317
304
  }
318
305
  applyVisible() {
319
- var o, i, a, n, e, r;
320
- this.computeRenderType() === "Mesh" ? (this.initialSculpt(), ((i = (o = this.data.mediaData) == null ? void 0 : o[0]) == null ? void 0 : i.type) === "Video" ? this.renderVideoPlane() : ((n = (a = this.data.mediaData) == null ? void 0 : a[0]) == null ? void 0 : n.type) === "Image" ? this.renderImagePlane() : this.renderEmptyPlane()) : ((e = this.tag3DContentSvelte) == null || e.svelteApp.$set({ tag: this, state: this.plugin.state, temporaryState: this.plugin.temporaryState }), (r = this.tag3DContentSvelte) != null && r.css3DInstance && (this.tag3DContentSvelte.css3DInstance.visible = this.visible, this.five.needsRender = !0));
306
+ var t, e, o, n, m, r;
307
+ this.computeRenderType() === "Mesh" ? (this.initialSculpt(), ((e = (t = this.data.mediaData) == null ? void 0 : t[0]) == null ? void 0 : e.type) === "Video" ? this.renderVideoPlane() : ((n = (o = this.data.mediaData) == null ? void 0 : o[0]) == null ? void 0 : n.type) === "Image" ? this.renderImagePlane() : this.renderEmptyPlane()) : ((m = this.tag3DContentSvelte) == null || m.svelteApp.$set({ tag: this, state: this.plugin.state, temporaryState: this.plugin.temporaryState }), (r = this.tag3DContentSvelte) != null && r.css3DInstance && (this.tag3DContentSvelte.css3DInstance.visible = this.visible, this.five.needsRender = !0));
321
308
  }
322
- set(t, o = !0) {
323
- super.set(t, o), x(this.five).then(() => {
324
- this.tag3DContentSvelte && (t.data ? this.tag3DContentSvelte.svelteApp.$set({ tag: this, state: this.plugin.state, temporaryState: this.plugin.temporaryState }) : t.position && this.loadModel());
309
+ set(i, t = !0) {
310
+ super.set(i, t), I(this.five).then(() => {
311
+ this.tag3DContentSvelte && (i.data ? this.tag3DContentSvelte.svelteApp.$set({ tag: this, state: this.plugin.state, temporaryState: this.plugin.temporaryState }) : i.position && this.loadModel());
325
312
  });
326
313
  }
327
- setData(...t) {
328
- var i, a, n, e, r;
329
- super.setData(...t), this.computeRenderType() === "Mesh" ? ((a = (i = this.data.mediaData) == null ? void 0 : i[0]) == null ? void 0 : a.type) === "Video" ? this.renderVideoPlane() : ((e = (n = this.data.mediaData) == null ? void 0 : n[0]) == null ? void 0 : e.type) === "Image" ? this.renderImagePlane() : this.renderEmptyPlane() : (r = this.tag3DContentSvelte) == null || r.svelteApp.$set({ tag: this });
330
- }
331
- /** 计算楼层索引 */
332
- computeFloorIndex() {
333
- const t = /* @__PURE__ */ new Map();
334
- this.five.observers.forEach((n) => {
335
- var r;
336
- const e = (r = n.floorIndex) != null ? r : 0;
337
- if (!t.has(e)) {
338
- const p = W(this.five, e);
339
- p.isEmpty() || t.set(e, p);
340
- }
341
- });
342
- const o = G(...this.position.map(T)), i = [], a = [];
343
- if (t.forEach((n, e) => {
344
- a.push({ floorIndex: e, box: n }), n.containsPoint(o) && i.push({ floorIndex: e, box: n });
345
- }), i.length === 1)
346
- return i[0].floorIndex;
347
- if (i.length > 1) {
348
- let n = 1 / 0, e = i[0].floorIndex;
349
- return i.forEach(({ floorIndex: r, box: p }) => {
350
- const h = new E.Vector3();
351
- p.getCenter(h);
352
- const c = o.distanceTo(h);
353
- c < n && (n = c, e = r);
354
- }), e;
355
- }
356
- if (a.length > 0) {
357
- let n = 1 / 0, e = a[0].floorIndex;
358
- return a.forEach(({ floorIndex: r, box: p }) => {
359
- const h = new E.Vector3();
360
- p.getCenter(h);
361
- const c = o.distanceTo(h);
362
- c < n && (n = c, e = r);
363
- }), e;
364
- }
314
+ setData(...i) {
315
+ var e, o, n, m, r;
316
+ super.setData(...i), this.computeRenderType() === "Mesh" ? ((o = (e = this.data.mediaData) == null ? void 0 : e[0]) == null ? void 0 : o.type) === "Video" ? this.renderVideoPlane() : ((m = (n = this.data.mediaData) == null ? void 0 : n[0]) == null ? void 0 : m.type) === "Image" ? this.renderImagePlane() : this.renderEmptyPlane() : (r = this.tag3DContentSvelte) == null || r.svelteApp.$set({ tag: this });
365
317
  }
366
318
  loadModel() {
367
319
  return C(this, null, function* () {
368
- var o, i, a, n, e, r;
369
- if (yield x(this.five), this.computeRenderType() === "Mesh")
370
- this.initialSculpt(), ((i = (o = this.data.mediaData) == null ? void 0 : o[0]) == null ? void 0 : i.type) === "Video" ? this.renderVideoPlane() : ((n = (a = this.data.mediaData) == null ? void 0 : a[0]) == null ? void 0 : n.type) === "Image" ? this.renderImagePlane() : this.renderEmptyPlane();
320
+ var t, e, o, n, m, r;
321
+ if (yield I(this.five), this.computeRenderType() === "Mesh")
322
+ this.initialSculpt(), ((e = (t = this.data.mediaData) == null ? void 0 : t[0]) == null ? void 0 : e.type) === "Video" ? this.renderVideoPlane() : ((n = (o = this.data.mediaData) == null ? void 0 : o[0]) == null ? void 0 : n.type) === "Image" ? this.renderImagePlane() : this.renderEmptyPlane();
371
323
  else {
372
- H(this.five);
373
- const p = this.position.map(T);
374
- (r = (e = this.tag3DContentSvelte) == null ? void 0 : e.dispose) == null || r.call(e);
375
- const h = document.createElement("div");
376
- h.classList.add("tag-media-container");
377
- const c = I({ mode: "front", cornerPoints: p, container: h }, this.config.tag3DConfig), P = this.computeRenderType() === "BehindDom" || c.mode === "behind" ? "behind" : "front", l = new O(S(I({}, c), { mode: P })), s = this.computeNormal();
378
- l.position.add(s.clone().setLength(w.Z_FIGHTING_OFFSET)), this.plugin.group.add(l);
379
- let v;
380
- l.mode === "behind" && this.config.clickable !== !1 && (v = this.addObjectClickHandler(this, l, (f) => {
381
- this.plugin.hooks.emit("click", { event: f, target: "TagContent", tag: this });
324
+ N(this.five);
325
+ const s = this.position.map(M);
326
+ (r = (m = this.tag3DContentSvelte) == null ? void 0 : m.dispose) == null || r.call(m);
327
+ const d = document.createElement("div");
328
+ d.classList.add("tag-media-container");
329
+ const g = v({ mode: "front", cornerPoints: s, container: d }, this.config.tag3DConfig), P = this.computeRenderType() === "BehindDom" || g.mode === "behind" ? "behind" : "front", p = new V(D(v({}, g), { mode: P })), a = this.computeNormal();
330
+ p.position.add(a.clone().setLength(E.Z_FIGHTING_OFFSET)), this.plugin.group.add(p);
331
+ let f;
332
+ p.mode === "behind" && this.config.clickable !== !1 && (f = this.addObjectClickHandler(this, p, (c) => {
333
+ this.plugin.hooks.emit("click", { event: c, target: "TagContent", tag: this });
382
334
  }));
383
- const u = new N({
384
- target: h,
335
+ const h = new L({
336
+ target: d,
385
337
  props: {
386
338
  tag: this,
387
339
  hooks: this.plugin.hooks,
@@ -392,15 +344,15 @@ class Xr extends B {
392
344
  }
393
345
  });
394
346
  this.tag3DContentSvelte = {
395
- svelteApp: u,
347
+ svelteApp: h,
396
348
  domContainer: {
397
- css3DObject: l
349
+ css3DObject: p
398
350
  },
399
- css3DInstance: l,
400
- initialNormal: s,
401
- currentNormal: s,
351
+ css3DInstance: p,
352
+ initialNormal: a,
353
+ currentNormal: a,
402
354
  dispose: () => {
403
- u.$destroy(), l.dispose(), v == null || v();
355
+ h.$destroy(), p.dispose(), f == null || f();
404
356
  }
405
357
  }, this.five.needsRender = !0;
406
358
  }
@@ -409,15 +361,15 @@ class Xr extends B {
409
361
  initialSculpt() {
410
362
  if (this.rectanglePlane)
411
363
  return;
412
- const t = new U(this.five, void 0, {
364
+ const i = new x(this.five, void 0, {
413
365
  magnifier: null
414
366
  });
415
- t.clear(), t.group.removeFromParent();
416
- const o = $(), i = new q(
367
+ i.clear(), i.group.removeFromParent();
368
+ const t = B(), e = new H(
417
369
  {
418
- id: o,
370
+ id: t,
419
371
  type: "Rectangle",
420
- points: this.position.map(g),
372
+ points: this.position.map(u),
421
373
  style: {
422
374
  color: 2203620,
423
375
  opacity: 0.1,
@@ -428,91 +380,91 @@ class Xr extends B {
428
380
  defaultAction: !1
429
381
  }
430
382
  );
431
- i.visible = !1, this.plugin.imagePlaneGroup.add(i), this.rectanglePlane = i, i.editor.hooks.on("objectUpdate", () => {
432
- var a;
433
- (a = this.mediaPlane) == null || a.changePointsOrParams({ cornerPoints: i.data.points.map(g) });
434
- }), i.editor.disable();
383
+ e.visible = !1, this.plugin.imagePlaneGroup.add(e), this.rectanglePlane = e, e.editor.hooks.on("objectUpdate", () => {
384
+ var o;
385
+ (o = this.mediaPlane) == null || o.changePointsOrParams({ cornerPoints: e.data.points.map(u) });
386
+ }), e.editor.disable();
435
387
  }
436
388
  editorEnable() {
437
389
  this.rectanglePlane || this.initialSculpt(), this.rectanglePlane.visible = !0, this.rectanglePlane.editor.enable();
438
390
  }
439
- editorDisable(t) {
440
- var i;
391
+ editorDisable(i) {
392
+ var e;
441
393
  this.rectanglePlane.visible = !1;
442
- const o = t || this.position.map(g);
443
- (i = this.mediaPlane) == null || i.changePointsOrParams({ cornerPoints: o }), this.rectanglePlane.setData({
444
- points: o
394
+ const t = i || this.position.map(u);
395
+ (e = this.mediaPlane) == null || e.changePointsOrParams({ cornerPoints: t }), this.rectanglePlane.setData({
396
+ points: t
445
397
  }), this.rectanglePlane.editor.disable();
446
398
  }
447
399
  renderVideoPlane() {
448
- var h, c, P;
449
- const t = this.data.mediaData[0];
450
- if (!t)
400
+ var d, g, P;
401
+ const i = this.data.mediaData[0];
402
+ if (!i)
451
403
  return;
452
- const { url: o } = t;
453
- if (!o)
404
+ const { url: t } = i;
405
+ if (!t)
454
406
  return;
455
- const i = (h = this.data.objectFit) != null ? h : "contain", a = this.currentVisible, n = (() => !!(this.mediaPlane && !a))(), e = (() => !!(!this.mediaPlane && a))(), r = (() => !!(this.mediaPlane && (this.mediaPlane.src !== o || this.mediaPlane.objectFit !== i)))();
407
+ const e = (d = this.data.objectFit) != null ? d : "contain", o = this.currentVisible, n = (() => !!(this.mediaPlane && !o))(), m = (() => !!(!this.mediaPlane && o))(), r = (() => !!(this.mediaPlane && (this.mediaPlane.src !== t || this.mediaPlane.objectFit !== e)))();
456
408
  (n || r) && this.mediaPlane && (this.plugin.imagePlaneGroup.remove(this.mediaPlane), this.mediaPlane.dispose(), this.mediaPlane.removeFromParent(), this.mediaPlane = void 0);
457
- const p = (() => !!(this.mediaPlane && this.mediaPlane.objectFit && this.mediaPlane.objectFit !== i))();
458
- if (e || r) {
459
- let l = this.position.map(g);
460
- this.rectanglePlane && (l = this.rectanglePlane.data.points.map(g));
461
- const s = new L(o, l, {
462
- videoCoverSrc: t.videoCoverUrl,
409
+ const s = (() => !!(this.mediaPlane && this.mediaPlane.objectFit && this.mediaPlane.objectFit !== e))();
410
+ if (m || r) {
411
+ let p = this.position.map(u);
412
+ this.rectanglePlane && (p = this.rectanglePlane.data.points.map(u));
413
+ const a = new w(t, p, {
414
+ videoCoverSrc: i.videoCoverUrl,
463
415
  playButton: this.data.playIcon,
464
- paused: !((c = this.data.autoplayConfig) != null && c.autoplayVideo),
416
+ paused: !((g = this.data.autoplayConfig) != null && g.autoplayVideo),
465
417
  objectFit: this.data.objectFit,
466
- videoTextureMap: Z,
467
- ImageTextureMap: z,
418
+ videoTextureMap: $,
419
+ ImageTextureMap: U,
468
420
  domEvents: this.plugin.domEvents
469
421
  });
470
- this.plugin.domEvents.addAutoBindEventListener(s, "click", (u) => {
471
- var f, D;
472
- !((f = s.videoInstance) != null && f.paused) && ((D = s.videoInstance) == null ? void 0 : D.muted) === !1 && this.plugin.hooks.emit("playStateChange", {
473
- event: u,
422
+ this.plugin.domEvents.addAutoBindEventListener(a, "click", (h) => {
423
+ var c, y;
424
+ !((c = a.videoInstance) != null && c.paused) && ((y = a.videoInstance) == null ? void 0 : y.muted) === !1 && this.plugin.hooks.emit("playStateChange", {
425
+ event: h,
474
426
  state: "playing",
475
427
  tag: this,
476
- mediaInstance: s.videoInstance
428
+ mediaInstance: a.videoInstance
477
429
  });
478
- }), s.onVideoReady = (u) => {
479
- u.addEventListener("play", (f) => {
480
- this.plugin.mediaStore.set({ currentMediaElement: s.videoInstance }), this.plugin.hooks.emit("playStateChange", { event: f, state: "playing", tag: this, mediaInstance: s.videoInstance });
481
- }), u.addEventListener("pause", (f) => {
482
- this.plugin.hooks.emit("playStateChange", { event: f, state: "paused", tag: this, mediaInstance: s.videoInstance });
483
- }), u.addEventListener("ended", (f) => {
484
- this.plugin.hooks.emit("playStateChange", { event: f, state: "paused", tag: this, mediaInstance: s.videoInstance });
430
+ }), a.onVideoReady = (h) => {
431
+ h.addEventListener("play", (c) => {
432
+ this.plugin.mediaStore.set({ currentMediaElement: a.videoInstance }), this.plugin.hooks.emit("playStateChange", { event: c, state: "playing", tag: this, mediaInstance: a.videoInstance });
433
+ }), h.addEventListener("pause", (c) => {
434
+ this.plugin.hooks.emit("playStateChange", { event: c, state: "paused", tag: this, mediaInstance: a.videoInstance });
435
+ }), h.addEventListener("ended", (c) => {
436
+ this.plugin.hooks.emit("playStateChange", { event: c, state: "paused", tag: this, mediaInstance: a.videoInstance });
485
437
  });
486
438
  };
487
- const v = (u) => (this.five.on("renderFrame", u), () => this.five.off("renderFrame", u));
488
- s.initialRenderHooks(v), this.mediaPlane = s, this.play = () => s.play(), this.pause = () => s.pause(), this.plugin.imagePlaneGroup.add(this.mediaPlane);
439
+ const f = (h) => (this.five.on("renderFrame", h), () => this.five.off("renderFrame", h));
440
+ a.initialRenderHooks(f), this.mediaPlane = a, this.play = () => a.play(), this.pause = () => a.pause(), this.plugin.imagePlaneGroup.add(this.mediaPlane);
489
441
  }
490
- if (p) {
491
- const l = this.rectanglePlane.data.points.map(g);
492
- (P = this.mediaPlane) == null || P.changePointsOrParams({ cornerPoints: l, params: { objectFit: i } });
442
+ if (s) {
443
+ const p = this.rectanglePlane.data.points.map(u);
444
+ (P = this.mediaPlane) == null || P.changePointsOrParams({ cornerPoints: p, params: { objectFit: e } });
493
445
  }
494
446
  this.five.needsRender = !0;
495
447
  }
496
448
  renderImagePlane() {
497
- var c, P;
498
- const t = this.data.mediaData[0], o = (c = this.data.objectFit) != null ? c : "contain";
499
- if (!t)
500
- return;
501
- const { url: i } = t;
449
+ var g, P;
450
+ const i = this.data.mediaData[0], t = (g = this.data.objectFit) != null ? g : "contain";
502
451
  if (!i)
503
452
  return;
504
- let a = this.position.map(g);
505
- const n = this.currentVisible, e = (() => !!(this.mediaPlane && !n))(), r = (() => !!(!this.mediaPlane && n))(), p = (() => !!(this.mediaPlane && this.mediaPlane.src !== i))(), h = (() => !!(this.mediaPlane && this.mediaPlane.objectFit && this.mediaPlane.objectFit !== o))();
506
- if ((e || p) && this.mediaPlane && (this.plugin.imagePlaneGroup.remove(this.mediaPlane), this.mediaPlane.dispose(), this.mediaPlane.removeFromParent(), this.mediaPlane = void 0), (r || p) && (this.rectanglePlane && (a = this.rectanglePlane.data.points.map(g)), this.mediaPlane = new A(i, a, { objectFit: this.data.objectFit }), this.getConfig().clickable !== !1 && this.plugin.domEvents.addAutoBindEventListener(
453
+ const { url: e } = i;
454
+ if (!e)
455
+ return;
456
+ let o = this.position.map(u);
457
+ const n = this.currentVisible, m = (() => !!(this.mediaPlane && !n))(), r = (() => !!(!this.mediaPlane && n))(), s = (() => !!(this.mediaPlane && this.mediaPlane.src !== e))(), d = (() => !!(this.mediaPlane && this.mediaPlane.objectFit && this.mediaPlane.objectFit !== t))();
458
+ if ((m || s) && this.mediaPlane && (this.plugin.imagePlaneGroup.remove(this.mediaPlane), this.mediaPlane.dispose(), this.mediaPlane.removeFromParent(), this.mediaPlane = void 0), (r || s) && (this.rectanglePlane && (o = this.rectanglePlane.data.points.map(u)), this.mediaPlane = new G(e, o, { objectFit: this.data.objectFit }), this.getConfig().clickable !== !1 && this.plugin.domEvents.addAutoBindEventListener(
507
459
  this.mediaPlane,
508
460
  "click",
509
- (l) => {
510
- this.plugin.hooks.emit("click", { tag: this, target: "TagContent", event: l.origDomEvent });
461
+ (p) => {
462
+ this.plugin.hooks.emit("click", { tag: this, target: "TagContent", event: p.origDomEvent });
511
463
  },
512
464
  { noEmitWhenHide: !0 }
513
- ), this.plugin.imagePlaneGroup.add(this.mediaPlane)), h) {
514
- const l = this.rectanglePlane.data.points.map(g);
515
- (P = this.mediaPlane) == null || P.changePointsOrParams({ cornerPoints: l, params: { objectFit: o } });
465
+ ), this.plugin.imagePlaneGroup.add(this.mediaPlane)), d) {
466
+ const p = this.rectanglePlane.data.points.map(u);
467
+ (P = this.mediaPlane) == null || P.changePointsOrParams({ cornerPoints: p, params: { objectFit: t } });
516
468
  }
517
469
  this.five.needsRender = !0;
518
470
  }
@@ -520,9 +472,9 @@ class Xr extends B {
520
472
  this.mediaPlane && (this.plugin.imagePlaneGroup.remove(this.mediaPlane), this.mediaPlane.dispose(), this.mediaPlane.removeFromParent(), this.mediaPlane = void 0);
521
473
  }
522
474
  computeNormal() {
523
- return _(this.position);
475
+ return O(this.position);
524
476
  }
525
477
  }
526
478
  export {
527
- Xr as PlaneTag
479
+ Zr as PlaneTag
528
480
  };