@realsee/dnalogel 2.3.9-alpha.5 → 2.3.9-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/PanoTagPlugin/typings/controller.d.ts +2 -0
- package/dist/PanoTagPlugin/utils/audio/SharedAudio.d.ts +16 -0
- package/dist/index.cjs.js +31 -31
- package/dist/index.js +3156 -3103
- package/dist/index.umd.js +31 -31
- package/dist/shared-utils/audio.d.ts +16 -4
- package/docs/classes/CSS3DRender.html +31 -31
- package/docs/classes/CruisePluginController.html +24 -24
- package/docs/classes/Magnifier.html +16 -16
- package/docs/classes/ModelRoomLabelController.html +11 -11
- package/docs/classes/Object3DHelperController.html +24 -24
- package/docs/classes/PaintBrush.html +15 -15
- package/docs/classes/PanoTagPluginController.html +41 -41
- package/docs/classes/Util.BetterTween.html +8 -8
- package/docs/classes/Util.FivePointSelector.html +12 -12
- package/docs/classes/Util.Interval.html +12 -12
- package/docs/classes/Util.Magnifier.html +17 -17
- package/docs/classes/Util.PointDomHelper.html +11 -11
- package/docs/classes/Util.PointHelper.html +11 -11
- package/docs/classes/Util.Rectangle.html +13 -13
- package/docs/enums/CameraMovementEffect.html +7 -7
- package/docs/enums/ContentType.html +16 -16
- package/docs/enums/DIRECTION.html +9 -9
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +9 -9
- package/docs/enums/DimensionType.html +7 -7
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +8 -8
- package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +9 -9
- package/docs/enums/PaintBrushTypeEnum.html +8 -8
- package/docs/enums/PointType.html +7 -7
- package/docs/enums/Rotation.html +8 -8
- package/docs/functions/CSS3DRenderPlugin.html +4 -4
- package/docs/functions/CameraMovementPlugin.html +4 -4
- package/docs/functions/CruisePlugin.html +4 -4
- package/docs/functions/GuideLinePlugin.html +5 -5
- package/docs/functions/ItemLabelPlugin.html +4 -4
- package/docs/functions/MapviewFloorplanPlugin.html +4 -4
- package/docs/functions/ModelChassisCompassPlugin.html +4 -4
- package/docs/functions/ModelEntryDoorGuidePlugin.html +4 -4
- package/docs/functions/ModelFloorplanPlugin.html +4 -4
- package/docs/functions/ModelItemLabelPlugin.html +4 -4
- package/docs/functions/ModelRoomLabelPlugin.html +4 -4
- package/docs/functions/ModelTVVideoPlugin.html +4 -4
- package/docs/functions/ModelViewPlugin.html +4 -4
- package/docs/functions/Object3DHelperPlugin.html +4 -4
- package/docs/functions/PanoCompassPlugin.html +4 -4
- package/docs/functions/PanoCursorRaycasterPlugin.html +4 -4
- package/docs/functions/PanoDoorLabelPlugin.html +4 -4
- package/docs/functions/PanoFloorplanRadarPlugin.html +4 -4
- package/docs/functions/PanoMeasurePlugin.html +4 -4
- package/docs/functions/PanoRulerPlugin.html +4 -4
- package/docs/functions/PanoRulerProPlugin.html +4 -4
- package/docs/functions/PanoSpatialTagPlugin.html +4 -4
- package/docs/functions/PanoTagPlugin.html +4 -4
- package/docs/functions/TopviewFloorplanPlugin.html +4 -4
- package/docs/functions/Util.getCoordsFromClient.html +5 -5
- package/docs/functions/Util.getCoordsFromElement.html +5 -5
- package/docs/functions/Util.getFrameTime.html +5 -5
- package/docs/functions/Util.getIntersectFromRelativePosition.html +5 -5
- package/docs/functions/Util.getRaycasterFromFivePointer.html +5 -5
- package/docs/functions/Util.isNil.html +5 -5
- package/docs/functions/Util.nextFrame.html +5 -5
- package/docs/functions/Util.notNil.html +5 -5
- package/docs/functions/Util.requestAnimationFrameInterval.html +5 -5
- package/docs/functions/Util.tweenProgress.html +5 -5
- package/docs/functions/pluginFlag.html +5 -5
- package/docs/index.html +4 -4
- package/docs/interfaces/AddTagConfig.html +6 -6
- package/docs/interfaces/CSS3DRenderPluginEventMap.html +11 -11
- package/docs/interfaces/CSS3DRenderPluginState.html +8 -8
- package/docs/interfaces/CameraMovementPluginExportType.html +7 -7
- package/docs/interfaces/EventMap.html +15 -15
- package/docs/interfaces/FloorplanBounding.html +8 -8
- package/docs/interfaces/FloorplanData.html +10 -10
- package/docs/interfaces/FloorplanEntrance.html +11 -11
- package/docs/interfaces/FloorplanExtraObject.html +10 -10
- package/docs/interfaces/FloorplanExtraObject3D.html +8 -8
- package/docs/interfaces/FloorplanFloorData.html +9 -9
- package/docs/interfaces/FloorplanImagePosition.html +7 -7
- package/docs/interfaces/FloorplanObserver.html +9 -9
- package/docs/interfaces/FloorplanOutlineItem.html +9 -9
- package/docs/interfaces/FloorplanPosition.html +7 -7
- package/docs/interfaces/FloorplanRoomItem.html +13 -13
- package/docs/interfaces/FloorplanRoomLabelItem.html +7 -7
- package/docs/interfaces/FloorplanServerBounding.html +8 -8
- package/docs/interfaces/FloorplanServerComputedData.html +10 -10
- package/docs/interfaces/FloorplanServerData.html +7 -7
- package/docs/interfaces/FloorplanServerDoorItem.html +10 -10
- package/docs/interfaces/FloorplanServerDoorPosition.html +8 -8
- package/docs/interfaces/FloorplanServerEntrance.html +11 -11
- package/docs/interfaces/FloorplanServerFloorData.html +9 -9
- package/docs/interfaces/FloorplanServerImagePosition.html +7 -7
- package/docs/interfaces/FloorplanServerObserver.html +9 -9
- package/docs/interfaces/FloorplanServerOutlineItem.html +9 -9
- package/docs/interfaces/FloorplanServerPosition.html +7 -7
- package/docs/interfaces/FloorplanServerRoomItem.html +14 -14
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +7 -7
- package/docs/interfaces/ItemLabelPluginData.html +6 -6
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +11 -11
- package/docs/interfaces/ItemLabelPluginParametersType.html +9 -9
- package/docs/interfaces/LineJson.html +7 -7
- package/docs/interfaces/MinMax.html +7 -7
- package/docs/interfaces/ModelChassisCompassPluginData.html +7 -7
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +8 -8
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +7 -7
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +8 -8
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +8 -8
- package/docs/interfaces/ModelItemLabelPluginData.html +6 -6
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +11 -11
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +7 -7
- package/docs/interfaces/ModelRoomLabelPluginData.html +6 -6
- package/docs/interfaces/ModelTVVideoPluginData.html +9 -9
- package/docs/interfaces/ModelTVVideoPluginExportType.html +8 -8
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +6 -6
- package/docs/interfaces/ModelViewPluginExportType.html +11 -11
- package/docs/interfaces/Object3DHelperState.html +8 -8
- package/docs/interfaces/OpenParameter.html +7 -7
- package/docs/interfaces/PaintBrushAction.html +12 -12
- package/docs/interfaces/PaintBrushConfigs.html +12 -12
- package/docs/interfaces/PaintBrushState.html +10 -10
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +10 -10
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +5 -5
- package/docs/interfaces/PanoMeasureParameterType.html +11 -11
- package/docs/interfaces/PanoRulerPluginExportType.html +10 -10
- package/docs/interfaces/PanoRulerPluginOptions.html +7 -7
- package/docs/interfaces/PanoRulerPluginParameterType.html +8 -8
- package/docs/interfaces/PanoRulerProPluginExportType.html +9 -9
- package/docs/interfaces/PanoRulerProPluginOptions.html +7 -7
- package/docs/interfaces/PanoRulerProPluginParameterType.html +7 -7
- package/docs/interfaces/PanoRulerProPluginState.html +8 -8
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +5 -5
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +5 -5
- package/docs/interfaces/PanoSpatialTagPluginData.html +11 -11
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +10 -10
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +13 -13
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +10 -10
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +13 -13
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +11 -11
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +10 -10
- package/docs/interfaces/Point.html +8 -8
- package/docs/interfaces/PointJson.html +8 -8
- package/docs/interfaces/Room.html +9 -9
- package/docs/interfaces/RoomInfo.html +7 -7
- package/docs/interfaces/RoomLabel.html +14 -14
- package/docs/interfaces/RoomRules.html +5 -5
- package/docs/interfaces/Rooms.html +5 -5
- package/docs/interfaces/Scissor.html +9 -9
- package/docs/interfaces/State.html +8 -8
- package/docs/interfaces/TagCache.html +10 -10
- package/docs/interfaces/TagConfig.html +10 -10
- package/docs/interfaces/TagIconUrl.html +9 -9
- package/docs/interfaces/Tags.html +9 -9
- package/docs/interfaces/TemporaryState.html +6 -6
- package/docs/interfaces/Util.MagnifierParameter.html +11 -11
- package/docs/interfaces/Util.MouseGroupParameter.html +8 -8
- package/docs/modules/Util.html +5 -5
- package/docs/modules.html +4 -4
- package/docs/types/ArrayPosition.html +5 -5
- package/docs/types/AudioAppearance.html +5 -5
- package/docs/types/AudioTagTypeConfigKey.html +5 -5
- package/docs/types/CSS3DRenderExportType.html +5 -5
- package/docs/types/CSS3DRenderPluginExportType.html +5 -5
- package/docs/types/CSS3DRenderPluginParameterType.html +5 -5
- package/docs/types/Color.html +5 -5
- package/docs/types/ContentTypeConfigKey.html +5 -5
- package/docs/types/ContentTypeConfigKeySplit.html +5 -5
- package/docs/types/ContentTypeMap.html +5 -5
- package/docs/types/Create3DDomContainerReturnType.html +5 -5
- package/docs/types/Create3DElementReturnType.html +5 -5
- package/docs/types/CruisePluginExportType.html +5 -5
- package/docs/types/Direction-1.html +5 -5
- package/docs/types/Direction4.html +5 -5
- package/docs/types/FloorplanRuleLabels.html +5 -5
- package/docs/types/FloorplanServerRuleLabels.html +5 -5
- package/docs/types/GuideLinePluginExportType.html +5 -5
- package/docs/types/HelperEventMap.html +5 -5
- package/docs/types/LoadTagConfig.html +5 -5
- package/docs/types/MapviewFloorplanPluginParameterType.html +5 -5
- package/docs/types/MapviewFloorplanPluginReturnType.html +5 -5
- package/docs/types/MediaData.html +5 -5
- package/docs/types/MediaStore.html +5 -5
- package/docs/types/ModelEntryDoorGuidePluginParameterType.html +5 -5
- package/docs/types/ModelFloorplanPluginParameterType.html +5 -5
- package/docs/types/ModelFloorplanPluginReturnType.html +5 -5
- package/docs/types/ModelRoomLabelPluginParameters.html +5 -5
- package/docs/types/ModelRoomLabelPluginReturnType.html +5 -5
- package/docs/types/MoveArgs.html +5 -5
- package/docs/types/MoveOpts.html +5 -5
- package/docs/types/Object3DHelperEventMap.html +5 -5
- package/docs/types/ObjectFit.html +5 -5
- package/docs/types/PaintBrushEventMap.html +5 -5
- package/docs/types/PanoCompassPluginData.html +5 -5
- package/docs/types/PanoCompassPluginExportType.html +5 -5
- package/docs/types/PanoCompassPluginParameterType.html +5 -5
- package/docs/types/PanoFloorplanRadarPluginParameterType.html +5 -5
- package/docs/types/PanoFloorplanRadarPluginReturnType.html +5 -5
- package/docs/types/PanoIndex.html +5 -5
- package/docs/types/PanoMeasurePluginEvent.html +5 -5
- package/docs/types/PanoMeasureReturnType.html +5 -5
- package/docs/types/PanoSpatialTagPluginId.html +5 -5
- package/docs/types/PanoTagPluginExportInterface.html +5 -5
- package/docs/types/PanoTagPluginParamsInterface.html +5 -5
- package/docs/types/PlaneTag.html +5 -5
- package/docs/types/PlaneTagElement.html +5 -5
- package/docs/types/Point2DElement.html +5 -5
- package/docs/types/Point2DTag.html +5 -5
- package/docs/types/Point3DElement.html +5 -5
- package/docs/types/Point3DTag.html +5 -5
- package/docs/types/PointTag.html +5 -5
- package/docs/types/PointTagElement.html +5 -5
- package/docs/types/Position.html +5 -5
- package/docs/types/RotateArgs.html +5 -5
- package/docs/types/RotateOpts.html +5 -5
- package/docs/types/RuleLabelsKey.html +5 -5
- package/docs/types/RuleLabelsValue.html +5 -5
- package/docs/types/StickType.html +5 -5
- package/docs/types/Tag.html +5 -5
- package/docs/types/Tag2D.html +5 -5
- package/docs/types/Tag3D.html +5 -5
- package/docs/types/TagContentType.html +5 -5
- package/docs/types/TagDimensionType.html +5 -5
- package/docs/types/TagElement.html +6 -6
- package/docs/types/TagEvents.html +5 -5
- package/docs/types/TagHooks.html +5 -5
- package/docs/types/TagIconSize.html +5 -5
- package/docs/types/TagId.html +5 -5
- package/docs/types/TagPointType.html +5 -5
- package/docs/types/TopviewFloorplanPluginParameterType.html +5 -5
- package/docs/types/TopviewFloorplanPluginReturnType.html +5 -5
- package/docs/types/WorkCode.html +5 -5
- package/docs/variables/FLOOR_TYPE_MAP.html +5 -5
- package/docs/variables/PLUGIN.html +5 -5
- package/docs/variables/ROOM_FETILE_TYPE_MAP.html +5 -5
- package/docs/variables/ROOM_TYPE_MAP.html +5 -5
- package/docs/variables/VERSION.html +5 -5
- package/docs/variables/itemLabelPluginServerParams.html +5 -5
- package/docs/variables/modelItemLabelPluginServerParams.html +5 -5
- package/docs/variables/modelRoomLabelPluginServerParams.html +5 -5
- package/libs/PanoTagPlugin/Components/Common/Audio.js +88 -129
- package/libs/PanoTagPlugin/Components/Common/Icon/Icon.js +95 -72
- package/libs/PanoTagPlugin/Components/Common/Shadow.js +1 -1
- package/libs/PanoTagPlugin/Components/Tag/AudioTag/AudioPlaneTag.js +131 -153
- package/libs/PanoTagPlugin/Components/Tag/AudioTag/AudioTag.js +112 -105
- package/libs/PanoTagPlugin/Components/Tag/AudioTag/index.js +52 -48
- package/libs/PanoTagPlugin/Components/Tag/LinkTag.js +59 -43
- package/libs/PanoTagPlugin/Components/Tag/TextTag/TextPlaneTag.js +46 -46
- package/libs/PanoTagPlugin/Components/Tag/index.js +3 -2
- package/libs/PanoTagPlugin/Components/TagContainer.js +3 -2
- package/libs/PanoTagPlugin/Components/TagItem.js +3 -2
- package/libs/PanoTagPlugin/controller/index.js +40 -39
- package/libs/PanoTagPlugin/index.js +12 -11
- package/libs/PanoTagPlugin/typings/controller.d.ts +2 -0
- package/libs/PanoTagPlugin/utils/audio/SharedAudio.d.ts +16 -0
- package/libs/PanoTagPlugin/utils/audio/SharedAudio.js +107 -0
- package/libs/index.js +93 -92
- package/libs/shared-utils/audio.d.ts +16 -4
- package/libs/shared-utils/audio.js +38 -34
- package/package.json +1 -1
|
@@ -1,100 +1,100 @@
|
|
|
1
|
-
import { SvelteComponent as j, init as A, safe_not_equal as B, append_styles as E, empty as F, insert as
|
|
1
|
+
import { SvelteComponent as j, init as A, safe_not_equal as B, append_styles as E, empty as F, insert as Y, transition_in as u, transition_out as k, check_outros as G, detach as z, create_component as h, space as D, element as _, attr as v, set_style as M, toggle_class as x, mount_component as b, append as g, destroy_component as y, group_outros as H } from "../../../../vendor/svelte/internal/index.js";
|
|
2
2
|
import I from "../../Common/Line/Straight.js";
|
|
3
3
|
import N from "../../Common/Text/MText.js";
|
|
4
4
|
import "../../../../vendor/svelte/transition/index.js";
|
|
5
5
|
import "../../../../vendor/svelte/easing/index.js";
|
|
6
6
|
import "../../../../shared-utils/uuid.js";
|
|
7
7
|
import "../../../utils/px2rem.js";
|
|
8
|
-
function J(
|
|
9
|
-
E(
|
|
8
|
+
function J(n) {
|
|
9
|
+
E(n, "svelte-1oxrkr1", ".plane__container.svelte-1oxrkr1.svelte-1oxrkr1{position:absolute;left:50%;transform:translate(-50%, -100%);width:-moz-max-content;width:max-content}.plane__wrapper.svelte-1oxrkr1.svelte-1oxrkr1{transition:transform 500ms linear, opacity 200ms linear;padding:0.625rem;background-color:rgba(0, 0, 0, 0.5);border:0.03125rem solid rgba(255, 255, 255, 0.3);border-radius:0.25rem}.unfolded.svelte-1oxrkr1 .plane__wrapper.svelte-1oxrkr1{transition-delay:200ms, 500ms;opacity:1}.folded.svelte-1oxrkr1 .plane__wrapper.svelte-1oxrkr1{opacity:0}.plane.svelte-1oxrkr1.svelte-1oxrkr1{max-width:11.75rem}.title.svelte-1oxrkr1.svelte-1oxrkr1{white-space:pre-wrap;font-weight:bold;font-size:0.75rem;line-height:1.125rem}.description.svelte-1oxrkr1.svelte-1oxrkr1{margin-top:0.25rem;white-space:pre-wrap;font-size:0.6875rem;line-height:1rem}");
|
|
10
10
|
}
|
|
11
|
-
function P(
|
|
12
|
-
var
|
|
13
|
-
let
|
|
14
|
-
return
|
|
11
|
+
function P(n) {
|
|
12
|
+
var T, C;
|
|
13
|
+
let o, a, e, r, i, d, l, c, p, f, m;
|
|
14
|
+
return o = new I({
|
|
15
15
|
props: {
|
|
16
|
-
unfolded:
|
|
16
|
+
unfolded: n[1],
|
|
17
17
|
direction: "vertical",
|
|
18
18
|
length: 15,
|
|
19
19
|
duration: 500,
|
|
20
20
|
inDelay: 200,
|
|
21
21
|
useLinearColor: !0
|
|
22
22
|
}
|
|
23
|
-
}),
|
|
23
|
+
}), l = new N({
|
|
24
24
|
props: {
|
|
25
|
-
text:
|
|
26
|
-
edit: (
|
|
25
|
+
text: n[2],
|
|
26
|
+
edit: (T = n[0].data.edit) == null ? void 0 : T.title
|
|
27
27
|
}
|
|
28
28
|
}), f = new N({
|
|
29
29
|
props: {
|
|
30
|
-
text:
|
|
31
|
-
edit: (C =
|
|
30
|
+
text: n[0].data.description,
|
|
31
|
+
edit: (C = n[0].data.edit) == null ? void 0 : C.description,
|
|
32
32
|
maxLine: 3
|
|
33
33
|
}
|
|
34
34
|
}), {
|
|
35
35
|
c() {
|
|
36
|
-
|
|
36
|
+
h(o.$$.fragment), a = D(), e = _("div"), r = _("div"), i = _("div"), d = _("div"), h(l.$$.fragment), c = D(), p = _("div"), h(f.$$.fragment), v(d, "class", "title svelte-1oxrkr1"), v(p, "class", "description svelte-1oxrkr1"), v(i, "class", "plane svelte-1oxrkr1"), v(r, "class", "plane__wrapper svelte-1oxrkr1"), M(r, "transform", n[1] ? "translateY(-15px)" : "translateY(0)"), v(e, "class", "plane__container svelte-1oxrkr1"), x(e, "unfolded", n[1]), x(e, "folded", n[3]);
|
|
37
37
|
},
|
|
38
|
-
m(t,
|
|
39
|
-
|
|
38
|
+
m(t, s) {
|
|
39
|
+
b(o, t, s), Y(t, a, s), Y(t, e, s), g(e, r), g(r, i), g(i, d), b(l, d, null), g(i, c), g(i, p), b(f, p, null), m = !0;
|
|
40
40
|
},
|
|
41
|
-
p(t,
|
|
41
|
+
p(t, s) {
|
|
42
42
|
var S, q;
|
|
43
43
|
const L = {};
|
|
44
|
-
|
|
44
|
+
s & 2 && (L.unfolded = t[1]), o.$set(L);
|
|
45
|
+
const w = {};
|
|
46
|
+
s & 4 && (w.text = t[2]), s & 1 && (w.edit = (S = t[0].data.edit) == null ? void 0 : S.title), l.$set(w);
|
|
45
47
|
const $ = {};
|
|
46
|
-
|
|
47
|
-
const b = {};
|
|
48
|
-
o & 1 && (b.text = t[0].data.description), o & 1 && (b.edit = (q = t[0].data.edit) == null ? void 0 : q.description), f.$set(b), o & 2 && M(i, "transform", t[1] ? "translateY(-15px)" : "translateY(0)"), (!m || o & 2) && g(e, "unfolded", t[1]), (!m || o & 8) && g(e, "folded", t[3]);
|
|
48
|
+
s & 1 && ($.text = t[0].data.description), s & 1 && ($.edit = (q = t[0].data.edit) == null ? void 0 : q.description), f.$set($), s & 2 && M(r, "transform", t[1] ? "translateY(-15px)" : "translateY(0)"), (!m || s & 2) && x(e, "unfolded", t[1]), (!m || s & 8) && x(e, "folded", t[3]);
|
|
49
49
|
},
|
|
50
50
|
i(t) {
|
|
51
|
-
m || (u(
|
|
51
|
+
m || (u(o.$$.fragment, t), u(l.$$.fragment, t), u(f.$$.fragment, t), m = !0);
|
|
52
52
|
},
|
|
53
53
|
o(t) {
|
|
54
|
-
|
|
54
|
+
k(o.$$.fragment, t), k(l.$$.fragment, t), k(f.$$.fragment, t), m = !1;
|
|
55
55
|
},
|
|
56
56
|
d(t) {
|
|
57
|
-
|
|
57
|
+
y(o, t), t && z(a), t && z(e), y(l), y(f);
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
-
function K(
|
|
62
|
-
let
|
|
61
|
+
function K(n) {
|
|
62
|
+
let o, a, e = n[0].state && P(n);
|
|
63
63
|
return {
|
|
64
64
|
c() {
|
|
65
|
-
e && e.c(),
|
|
65
|
+
e && e.c(), o = F();
|
|
66
66
|
},
|
|
67
|
-
m(
|
|
68
|
-
e && e.m(
|
|
67
|
+
m(r, i) {
|
|
68
|
+
e && e.m(r, i), Y(r, o, i), a = !0;
|
|
69
69
|
},
|
|
70
|
-
p(
|
|
71
|
-
|
|
70
|
+
p(r, [i]) {
|
|
71
|
+
r[0].state ? e ? (e.p(r, i), i & 1 && u(e, 1)) : (e = P(r), e.c(), u(e, 1), e.m(o.parentNode, o)) : e && (H(), k(e, 1, 1, () => {
|
|
72
72
|
e = null;
|
|
73
73
|
}), G());
|
|
74
74
|
},
|
|
75
|
-
i(
|
|
75
|
+
i(r) {
|
|
76
76
|
a || (u(e), a = !0);
|
|
77
77
|
},
|
|
78
|
-
o(
|
|
79
|
-
|
|
78
|
+
o(r) {
|
|
79
|
+
k(e), a = !1;
|
|
80
80
|
},
|
|
81
|
-
d(
|
|
82
|
-
e && e.d(
|
|
81
|
+
d(r) {
|
|
82
|
+
e && e.d(r), r && z(o);
|
|
83
83
|
}
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
|
-
function O(
|
|
87
|
-
let e,
|
|
88
|
-
return
|
|
89
|
-
"tag" in
|
|
90
|
-
},
|
|
91
|
-
var
|
|
92
|
-
|
|
93
|
-
}, [d, e,
|
|
86
|
+
function O(n, o, a) {
|
|
87
|
+
let e, r, i, { tag: d } = o;
|
|
88
|
+
return n.$$set = (l) => {
|
|
89
|
+
"tag" in l && a(0, d = l.tag);
|
|
90
|
+
}, n.$$.update = () => {
|
|
91
|
+
var l, c, p;
|
|
92
|
+
n.$$.dirty & 1 && a(1, e = !!((l = d.state) != null && l.unfolded)), n.$$.dirty & 2 && a(3, r = !e), n.$$.dirty & 1 && a(2, i = (p = (c = d.data.title) != null ? c : d.data.text) != null ? p : "");
|
|
93
|
+
}, [d, e, i, r];
|
|
94
94
|
}
|
|
95
95
|
class ee extends j {
|
|
96
|
-
constructor(
|
|
97
|
-
super(), A(this,
|
|
96
|
+
constructor(o) {
|
|
97
|
+
super(), A(this, o, O, K, B, { tag: 0 }, J);
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
export {
|
|
@@ -62,6 +62,7 @@ import "../../../shared-utils/animationFrame/index.js";
|
|
|
62
62
|
import "./AudioTag/AudioTag.js";
|
|
63
63
|
import "../Common/Audio.js";
|
|
64
64
|
import "../../../shared-utils/audio.js";
|
|
65
|
+
import "../../utils/audio/SharedAudio.js";
|
|
65
66
|
import "../Common/Icon/audioIcon.js";
|
|
66
67
|
import "./AudioTag/AudioPlaneTag.js";
|
|
67
68
|
import "../../utils/timeToString.js";
|
|
@@ -371,7 +372,7 @@ function BA(o, A, t) {
|
|
|
371
372
|
E
|
|
372
373
|
];
|
|
373
374
|
}
|
|
374
|
-
class
|
|
375
|
+
class Pe extends V {
|
|
375
376
|
constructor(A) {
|
|
376
377
|
super(), N(
|
|
377
378
|
this,
|
|
@@ -392,5 +393,5 @@ class Je extends V {
|
|
|
392
393
|
}
|
|
393
394
|
}
|
|
394
395
|
export {
|
|
395
|
-
|
|
396
|
+
Pe as default
|
|
396
397
|
};
|
|
@@ -61,6 +61,7 @@ import "./Tag/AudioTag/index.js";
|
|
|
61
61
|
import "./Tag/AudioTag/AudioTag.js";
|
|
62
62
|
import "./Common/Audio.js";
|
|
63
63
|
import "../../shared-utils/audio.js";
|
|
64
|
+
import "../utils/audio/SharedAudio.js";
|
|
64
65
|
import "./Common/Icon/audioIcon.js";
|
|
65
66
|
import "./Tag/AudioTag/AudioPlaneTag.js";
|
|
66
67
|
import "../utils/timeToString.js";
|
|
@@ -186,7 +187,7 @@ function F(l, t, o) {
|
|
|
186
187
|
"withAnimation" in a && o(0, e = a.withAnimation), "tags" in a && o(1, n = a.tags), "hooks" in a && o(5, r = a.hooks), "mediaStore" in a && o(2, p = a.mediaStore), "state" in a && o(3, i = a.state), "temporaryState" in a && o(4, m = a.temporaryState);
|
|
187
188
|
}, [e, n, p, i, m, r];
|
|
188
189
|
}
|
|
189
|
-
class
|
|
190
|
+
class oe extends S {
|
|
190
191
|
constructor(t) {
|
|
191
192
|
super(), v(
|
|
192
193
|
this,
|
|
@@ -207,5 +208,5 @@ class ie extends S {
|
|
|
207
208
|
}
|
|
208
209
|
}
|
|
209
210
|
export {
|
|
210
|
-
|
|
211
|
+
oe as default
|
|
211
212
|
};
|
|
@@ -61,6 +61,7 @@ import "./Tag/AudioTag/index.js";
|
|
|
61
61
|
import "./Tag/AudioTag/AudioTag.js";
|
|
62
62
|
import "./Common/Audio.js";
|
|
63
63
|
import "../../shared-utils/audio.js";
|
|
64
|
+
import "../utils/audio/SharedAudio.js";
|
|
64
65
|
import "./Common/Icon/audioIcon.js";
|
|
65
66
|
import "./Tag/AudioTag/AudioPlaneTag.js";
|
|
66
67
|
import "../utils/timeToString.js";
|
|
@@ -229,7 +230,7 @@ function it(o, e, t) {
|
|
|
229
230
|
m
|
|
230
231
|
];
|
|
231
232
|
}
|
|
232
|
-
class
|
|
233
|
+
class Se extends K {
|
|
233
234
|
constructor(e) {
|
|
234
235
|
super(), M(
|
|
235
236
|
this,
|
|
@@ -249,5 +250,5 @@ class ve extends K {
|
|
|
249
250
|
}
|
|
250
251
|
}
|
|
251
252
|
export {
|
|
252
|
-
|
|
253
|
+
Se as default
|
|
253
254
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var P = Object.defineProperty, w = Object.defineProperties;
|
|
2
|
+
var E = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var T = Object.getOwnPropertySymbols;
|
|
4
|
-
var
|
|
5
|
-
var u = (h, a, e) => a in h ?
|
|
4
|
+
var R = Object.prototype.hasOwnProperty, k = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var u = (h, a, e) => a in h ? P(h, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : h[a] = e, p = (h, a) => {
|
|
6
6
|
for (var e in a || (a = {}))
|
|
7
|
-
|
|
7
|
+
R.call(a, e) && u(h, e, a[e]);
|
|
8
8
|
if (T)
|
|
9
9
|
for (var e of T(a))
|
|
10
|
-
|
|
10
|
+
k.call(a, e) && u(h, e, a[e]);
|
|
11
11
|
return h;
|
|
12
|
-
}, f = (h, a) =>
|
|
12
|
+
}, f = (h, a) => w(h, E(a));
|
|
13
13
|
var d = (h, a, e) => (u(h, typeof a != "symbol" ? a + "" : a, e), e);
|
|
14
14
|
var m = (h, a, e) => new Promise((t, i) => {
|
|
15
15
|
var s = (r) => {
|
|
@@ -27,24 +27,24 @@ var m = (h, a, e) => new Promise((t, i) => {
|
|
|
27
27
|
}, n = (r) => r.done ? t(r.value) : Promise.resolve(r.value).then(s, o);
|
|
28
28
|
n((e = e.apply(h, a)).next());
|
|
29
29
|
});
|
|
30
|
-
import { Subscribe as
|
|
31
|
-
import { Quaternion as
|
|
30
|
+
import { Subscribe as F } from "@realsee/five";
|
|
31
|
+
import { Quaternion as U } from "three";
|
|
32
32
|
import c from "object-assign-deep";
|
|
33
|
-
import { writable as
|
|
34
|
-
import
|
|
35
|
-
import
|
|
33
|
+
import { writable as L } from "../../vendor/svelte/store/index.js";
|
|
34
|
+
import O from "../Components/TagContainer.js";
|
|
35
|
+
import I from "../Components/Tag/index.js";
|
|
36
36
|
import { arrayPositionToVector3 as g } from "../../CSS3DRenderPlugin/utils/positionToVector3.js";
|
|
37
|
-
import { addDebugPoints as
|
|
38
|
-
import { planeNormal as
|
|
39
|
-
import { waitFiveModelLoaded as
|
|
40
|
-
import { normalPositionToPositions as
|
|
37
|
+
import { addDebugPoints as B } from "../utils/addDebugPoints.js";
|
|
38
|
+
import { planeNormal as M } from "../utils/planeNormal.js";
|
|
39
|
+
import { waitFiveModelLoaded as N } from "../utils/actionAfterFiveModelLoad.js";
|
|
40
|
+
import { normalPositionToPositions as V } from "../utils/normalPositionToPositions.js";
|
|
41
41
|
import { debounce as C } from "../utils/debounce.js";
|
|
42
|
-
import { throttle as
|
|
42
|
+
import { throttle as z } from "../utils/throttle.js";
|
|
43
43
|
import { resizeObserver as D } from "../utils/resizeObserver.js";
|
|
44
|
-
import { TagComputer as
|
|
45
|
-
import { CSS3DRenderPlugin as
|
|
46
|
-
import
|
|
47
|
-
import { generateBlankAudio as
|
|
44
|
+
import { TagComputer as W } from "./TagComputer.js";
|
|
45
|
+
import { CSS3DRenderPlugin as _ } from "../../CSS3DRenderPlugin/index.js";
|
|
46
|
+
import $ from "../utils/tag/format.js";
|
|
47
|
+
import { generateBlankAudio as A, AudioNamespace as S } from "../../shared-utils/audio.js";
|
|
48
48
|
import "../../vendor/svelte/internal/index.js";
|
|
49
49
|
import "../Components/TagItem.js";
|
|
50
50
|
import "../utils/noTypecheck.js";
|
|
@@ -106,6 +106,7 @@ import "../../shared-utils/animationFrame/index.js";
|
|
|
106
106
|
import "../Components/Tag/AudioTag/index.js";
|
|
107
107
|
import "../Components/Tag/AudioTag/AudioTag.js";
|
|
108
108
|
import "../Components/Common/Audio.js";
|
|
109
|
+
import "../utils/audio/SharedAudio.js";
|
|
109
110
|
import "../Components/Common/Icon/audioIcon.js";
|
|
110
111
|
import "../Components/Tag/AudioTag/AudioPlaneTag.js";
|
|
111
112
|
import "../utils/timeToString.js";
|
|
@@ -121,18 +122,18 @@ import "./TagCacheController.js";
|
|
|
121
122
|
import "../../base/BasePlugin.js";
|
|
122
123
|
import "../../CSS3DRenderPlugin/Controller.js";
|
|
123
124
|
import "../../CSS3DRenderPlugin/utils/waitFiveModelLoaded.js";
|
|
124
|
-
const
|
|
125
|
-
class
|
|
125
|
+
const y = "2.0.5", v = `DnalogelPlugin-PanoTagPlugin@${y}`, G = !1, Ot = (h) => `${v}--${h}`;
|
|
126
|
+
class It extends W {
|
|
126
127
|
constructor(e, t) {
|
|
127
128
|
super(e);
|
|
128
|
-
d(this, "version",
|
|
129
|
+
d(this, "version", y);
|
|
129
130
|
d(this, "state", { enabled: !0, visible: !0 });
|
|
130
131
|
d(this, "params");
|
|
131
132
|
d(this, "debug");
|
|
132
133
|
d(this, "css3DRenderPlugin");
|
|
133
134
|
d(this, "TagContainerSvelte");
|
|
134
135
|
d(this, "temporaryState", { visible: !0 });
|
|
135
|
-
d(this, "mediaStore",
|
|
136
|
+
d(this, "mediaStore", L({
|
|
136
137
|
currentMediaElement: null
|
|
137
138
|
}));
|
|
138
139
|
d(this, "isIOSWX", navigator.userAgent.toLowerCase().indexOf("micromessenger") !== -1 && navigator.userAgent.toLowerCase().indexOf("iphone") !== -1);
|
|
@@ -145,7 +146,7 @@ class Lt extends N {
|
|
|
145
146
|
d(this, "disposedErrorLog", () => {
|
|
146
147
|
console.error(`${v} is disposed`);
|
|
147
148
|
});
|
|
148
|
-
this.params = p({ debug: !1, config: this.config }, t), this.debug = this.params.debug, this.config = this.params.config,
|
|
149
|
+
this.params = p({ debug: !1, config: this.config }, t), this.debug = this.params.debug, this.config = this.params.config, A(1, { namespace: S.GetAudioDuration }), A(1, { namespace: S.PlayAudio }), Object.assign(window, { [`__PANOTAGPLUGIN_DEBUG_${Date.now()}__`]: this }), Object.assign(window, { __PANOTAGPLUGIN_DEBUG__: this });
|
|
149
150
|
}
|
|
150
151
|
load(e, t) {
|
|
151
152
|
return m(this, null, function* () {
|
|
@@ -155,7 +156,7 @@ class Lt extends N {
|
|
|
155
156
|
contentTypeConfig: (s = e.contentTypeConfig) != null ? s : {}
|
|
156
157
|
}), this.debug)
|
|
157
158
|
try {
|
|
158
|
-
|
|
159
|
+
B(this.five, this.tags);
|
|
159
160
|
} catch (o) {
|
|
160
161
|
console.error(o);
|
|
161
162
|
}
|
|
@@ -167,13 +168,13 @@ class Lt extends N {
|
|
|
167
168
|
const s = (Array.isArray(e) ? e : [e]).map((o) => {
|
|
168
169
|
const n = this.getTagConfig(o);
|
|
169
170
|
return f(p({}, o), {
|
|
170
|
-
state: p({ visible: void 0, unfolded:
|
|
171
|
-
hooks: new
|
|
171
|
+
state: p({ visible: void 0, unfolded: G }, n.initialState),
|
|
172
|
+
hooks: new F(),
|
|
172
173
|
clickable: n.clickable,
|
|
173
174
|
mergedConfig: n
|
|
174
175
|
});
|
|
175
176
|
}).filter((o) => o.position);
|
|
176
|
-
return s.forEach(
|
|
177
|
+
return s.forEach($), this.tags.push(...s), N(this.five).then(() => {
|
|
177
178
|
var o, n, r;
|
|
178
179
|
return this.store.eventListenerDisposer && ((n = (o = this.store).eventListenerDisposer) == null || n.call(o)), this.state.enabled && (this.store.eventListenerDisposer = this.addEventListener()), this.addResizeListener(), this.checkPanelTag(), this.setVisibleAndUnfolded({ withAnimation: (r = t == null ? void 0 : t.withAnimation) != null ? r : !0 }).then(() => this.updateRenderAllTags()), this.updateRenderAllTags(), !0;
|
|
179
180
|
});
|
|
@@ -313,7 +314,7 @@ class Lt extends N {
|
|
|
313
314
|
}, i = () => {
|
|
314
315
|
!this.state.enabled || this.hide();
|
|
315
316
|
}, { observe: s, unobserve: o } = D(
|
|
316
|
-
|
|
317
|
+
z(() => {
|
|
317
318
|
!this.store.resizeObserverDisposer || i();
|
|
318
319
|
}, 500),
|
|
319
320
|
e
|
|
@@ -402,7 +403,7 @@ class Lt extends N {
|
|
|
402
403
|
const i = (t = this.five.getElement()) == null ? void 0 : t.parentElement;
|
|
403
404
|
if (!i)
|
|
404
405
|
return console.error("updateRenderPlaneTag: tag2DContainer not found");
|
|
405
|
-
this.TagContainerSvelte = new
|
|
406
|
+
this.TagContainerSvelte = new O({
|
|
406
407
|
target: i,
|
|
407
408
|
props: { hooks: this.hooks, tags: e, state: this.state, temporaryState: this.temporaryState, mediaStore: this.mediaStore }
|
|
408
409
|
});
|
|
@@ -419,19 +420,19 @@ class Lt extends N {
|
|
|
419
420
|
state: this.state,
|
|
420
421
|
temporaryState: this.temporaryState
|
|
421
422
|
}), !n.equals(r)) {
|
|
422
|
-
const l = new
|
|
423
|
+
const l = new U().setFromUnitVectors(n, r);
|
|
423
424
|
o.css3DObject.setRotationFromQuaternion(l);
|
|
424
425
|
}
|
|
425
426
|
} else {
|
|
426
427
|
if (((i = t.state) == null ? void 0 : i.visible) === !1)
|
|
427
428
|
return;
|
|
428
|
-
if (this.css3DRenderPlugin || (this.css3DRenderPlugin =
|
|
429
|
+
if (this.css3DRenderPlugin || (this.css3DRenderPlugin = _(this.five)), t.stickType === "3DPoint" && !t.normal)
|
|
429
430
|
return console.error("updateRenderPlaneTag: \u4E09\u7EF4\u70B9\u6807\u7B7E\u7F3A\u5C11\u6CD5\u5411\u91CF\uFF01");
|
|
430
|
-
const s = t.stickType === "Plane" ? t.position :
|
|
431
|
+
const s = t.stickType === "Plane" ? t.position : V(this.five.camera.position, g(t.position), g(t.normal)), o = t.stickType === "Plane" ? M(t.position) : g(t.normal), n = this.getTagConfig(t).tag3DConfig, r = this.css3DRenderPlugin.create3DDomContainer(s, n);
|
|
431
432
|
if (!r)
|
|
432
433
|
return;
|
|
433
434
|
this.store.css3DRenderDisposer.set(t.id, r.dispose), t.tag3DContentSvelte = {
|
|
434
|
-
svelteApp: new
|
|
435
|
+
svelteApp: new I({
|
|
435
436
|
target: r.container,
|
|
436
437
|
props: {
|
|
437
438
|
tag: t,
|
|
@@ -465,7 +466,7 @@ class Lt extends N {
|
|
|
465
466
|
}
|
|
466
467
|
}
|
|
467
468
|
export {
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
469
|
+
It as PanoTagPluginController,
|
|
470
|
+
It as default,
|
|
471
|
+
Ot as pluginFlag
|
|
471
472
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./controller/index.js";
|
|
2
|
-
import { default as
|
|
3
|
-
import { ContentType as
|
|
4
|
-
import { DimensionType as
|
|
2
|
+
import { default as Xo, pluginFlag as Yo } from "./controller/index.js";
|
|
3
|
+
import { ContentType as _o } from "./typings/tag/TagData.js";
|
|
4
|
+
import { DimensionType as or, PointType as rr } from "./typings/tag/Utils.js";
|
|
5
5
|
import "@realsee/five";
|
|
6
6
|
import "three";
|
|
7
7
|
import "object-assign-deep";
|
|
@@ -68,6 +68,7 @@ import "./Components/Tag/AudioTag/index.js";
|
|
|
68
68
|
import "./Components/Tag/AudioTag/AudioTag.js";
|
|
69
69
|
import "./Components/Common/Audio.js";
|
|
70
70
|
import "../shared-utils/audio.js";
|
|
71
|
+
import "./utils/audio/SharedAudio.js";
|
|
71
72
|
import "./Components/Common/Icon/audioIcon.js";
|
|
72
73
|
import "./Components/Tag/AudioTag/AudioPlaneTag.js";
|
|
73
74
|
import "./utils/timeToString.js";
|
|
@@ -96,13 +97,13 @@ import "../CSS3DRenderPlugin/index.js";
|
|
|
96
97
|
import "../CSS3DRenderPlugin/Controller.js";
|
|
97
98
|
import "../CSS3DRenderPlugin/utils/waitFiveModelLoaded.js";
|
|
98
99
|
import "./utils/tag/format.js";
|
|
99
|
-
const
|
|
100
|
+
const Uo = (o, r) => new t(o, r);
|
|
100
101
|
export {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
102
|
+
_o as ContentType,
|
|
103
|
+
or as DimensionType,
|
|
104
|
+
Uo as PanoTagPlugin,
|
|
105
|
+
Xo as PanoTagPluginController,
|
|
106
|
+
rr as PointType,
|
|
107
|
+
Uo as default,
|
|
108
|
+
Yo as pluginFlag
|
|
108
109
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare class SharedAudio extends Audio {
|
|
2
|
+
sharedAudioSrc?: string;
|
|
3
|
+
sharedAudioPaused: boolean;
|
|
4
|
+
get paused(): boolean;
|
|
5
|
+
get currentTime(): number;
|
|
6
|
+
private sharedAudioCurrentTime;
|
|
7
|
+
private tryplaying;
|
|
8
|
+
private audioInstance?;
|
|
9
|
+
private eventListenerDisposer?;
|
|
10
|
+
constructor(src?: string);
|
|
11
|
+
play(): Promise<void>;
|
|
12
|
+
pause(): void;
|
|
13
|
+
dispose(): void;
|
|
14
|
+
private clear;
|
|
15
|
+
private addEventListeners;
|
|
16
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
var y = Object.defineProperty;
|
|
2
|
+
var L = (i, a, e) => a in i ? y(i, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[a] = e;
|
|
3
|
+
var o = (i, a, e) => (L(i, typeof a != "symbol" ? a + "" : a, e), e);
|
|
4
|
+
var m = (i, a, e) => new Promise((d, r) => {
|
|
5
|
+
var u = (s) => {
|
|
6
|
+
try {
|
|
7
|
+
h(e.next(s));
|
|
8
|
+
} catch (c) {
|
|
9
|
+
r(c);
|
|
10
|
+
}
|
|
11
|
+
}, p = (s) => {
|
|
12
|
+
try {
|
|
13
|
+
h(e.throw(s));
|
|
14
|
+
} catch (c) {
|
|
15
|
+
r(c);
|
|
16
|
+
}
|
|
17
|
+
}, h = (s) => s.done ? d(s.value) : Promise.resolve(s.value).then(u, p);
|
|
18
|
+
h((e = e.apply(i, a)).next());
|
|
19
|
+
});
|
|
20
|
+
import { getAudio as E, AudioNamespace as A } from "../../../shared-utils/audio.js";
|
|
21
|
+
class f extends Audio {
|
|
22
|
+
constructor(e) {
|
|
23
|
+
super();
|
|
24
|
+
o(this, "sharedAudioSrc");
|
|
25
|
+
o(this, "sharedAudioPaused", !0);
|
|
26
|
+
o(this, "sharedAudioCurrentTime", 0);
|
|
27
|
+
o(this, "tryplaying", !1);
|
|
28
|
+
o(this, "audioInstance");
|
|
29
|
+
o(this, "eventListenerDisposer");
|
|
30
|
+
this.sharedAudioSrc = e;
|
|
31
|
+
}
|
|
32
|
+
get paused() {
|
|
33
|
+
var e;
|
|
34
|
+
return (e = this.sharedAudioPaused) != null ? e : !0;
|
|
35
|
+
}
|
|
36
|
+
get currentTime() {
|
|
37
|
+
return this.sharedAudioCurrentTime;
|
|
38
|
+
}
|
|
39
|
+
play() {
|
|
40
|
+
return m(this, null, function* () {
|
|
41
|
+
var e, d, r;
|
|
42
|
+
this.tryplaying || (this.tryplaying = !0, (!this.audioInstance || ((e = this.audioInstance) == null ? void 0 : e.realSrc) !== this.sharedAudioSrc) && (this.audioInstance = E(this.sharedAudioSrc, { namespace: A.PlayAudio })), this.audioInstance.currentTime = (d = this.currentTime) != null ? d : 0, (r = this.eventListenerDisposer) == null || r.call(this), this.eventListenerDisposer = this.addEventListeners(), this.audioInstance.play().then(() => {
|
|
43
|
+
this.sharedAudioPaused = !1;
|
|
44
|
+
}).catch((u) => {
|
|
45
|
+
this.pause(), console.warn(u);
|
|
46
|
+
}).finally(() => {
|
|
47
|
+
this.tryplaying = !1;
|
|
48
|
+
}));
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
pause() {
|
|
52
|
+
!this.audioInstance || this.paused || (this.sharedAudioPaused = !0, this.audioInstance.addEventListener(
|
|
53
|
+
"pause",
|
|
54
|
+
() => {
|
|
55
|
+
var e;
|
|
56
|
+
(e = this.eventListenerDisposer) == null || e.call(this);
|
|
57
|
+
},
|
|
58
|
+
{ once: !0 }
|
|
59
|
+
), this.audioInstance.pause());
|
|
60
|
+
}
|
|
61
|
+
dispose() {
|
|
62
|
+
this.clear(), this.audioInstance = void 0;
|
|
63
|
+
}
|
|
64
|
+
clear() {
|
|
65
|
+
var e;
|
|
66
|
+
(e = this.audioInstance) == null || e.clear();
|
|
67
|
+
}
|
|
68
|
+
addEventListeners() {
|
|
69
|
+
const e = this.audioInstance;
|
|
70
|
+
if (!e)
|
|
71
|
+
return;
|
|
72
|
+
const d = (n) => {
|
|
73
|
+
var t;
|
|
74
|
+
this.sharedAudioCurrentTime = e.currentTime, (t = this.ontimeupdate) == null || t.call(this, n);
|
|
75
|
+
}, r = (n) => {
|
|
76
|
+
var t;
|
|
77
|
+
return (t = this.onplay) == null ? void 0 : t.call(this, n);
|
|
78
|
+
}, u = (n) => {
|
|
79
|
+
var t;
|
|
80
|
+
(t = this.onpause) == null || t.call(this, n), this.clear();
|
|
81
|
+
}, p = (n) => {
|
|
82
|
+
var t;
|
|
83
|
+
(t = this.onended) == null || t.call(this, n), this.sharedAudioCurrentTime = 0;
|
|
84
|
+
}, h = (n) => {
|
|
85
|
+
var t;
|
|
86
|
+
return (t = this.onerror) == null ? void 0 : t.call(this, n);
|
|
87
|
+
}, s = (n) => {
|
|
88
|
+
var t;
|
|
89
|
+
return (t = this.oncanplay) == null ? void 0 : t.call(this, n);
|
|
90
|
+
}, c = (n) => {
|
|
91
|
+
var t;
|
|
92
|
+
return (t = this.oncanplaythrough) == null ? void 0 : t.call(this, n);
|
|
93
|
+
}, l = (n) => {
|
|
94
|
+
var t;
|
|
95
|
+
return (t = this.onloadeddata) == null ? void 0 : t.call(this, n);
|
|
96
|
+
}, v = (n) => {
|
|
97
|
+
var t;
|
|
98
|
+
return (t = this.onloadedmetadata) == null ? void 0 : t.call(this, n);
|
|
99
|
+
};
|
|
100
|
+
return e.addEventListener("timeupdate", d), e.addEventListener("play", r), e.addEventListener("pause", u), e.addEventListener("ended", p), e.addEventListener("error", h), e.addEventListener("canplay", s), e.addEventListener("canplaythrough", c), e.addEventListener("loadeddata", l), e.addEventListener("loadedmetadata", v), () => {
|
|
101
|
+
e.removeEventListener("timeupdate", d), e.removeEventListener("play", r), e.removeEventListener("pause", u), e.removeEventListener("ended", p), e.removeEventListener("error", h), e.removeEventListener("canplay", s), e.removeEventListener("canplaythrough", c), e.removeEventListener("loadeddata", l), e.removeEventListener("loadedmetadata", v);
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
export {
|
|
106
|
+
f as SharedAudio
|
|
107
|
+
};
|