@shjjs/visual-ui 3.0.5 → 3.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,14 @@
1
- import { defineComponent as Y, computed as A, ref as c, watch as z, onMounted as de, nextTick as h, onUnmounted as ve, resolveComponent as M, createElementBlock as l, openBlock as s, createCommentVNode as u, createElementVNode as r, Fragment as D, withDirectives as B, vShow as N, normalizeStyle as x, createVNode as G, withCtx as U, renderList as we, toDisplayString as fe, createStaticVNode as Se } from "vue";
2
- import Ve from "./resources/zv-vr-select.svg.mjs";
3
- import C from "./resources/zv-return.svg.mjs";
4
- import ye from "./resources/zv-add.svg.mjs";
5
- import ge from "./resources/zv-reduce.svg.mjs";
1
+ import { defineComponent as $, computed as P, ref as p, watch as D, onMounted as we, nextTick as C, onUnmounted as fe, resolveComponent as N, createElementBlock as s, openBlock as c, createCommentVNode as u, createElementVNode as l, Fragment as G, withDirectives as W, vShow as U, normalizeStyle as j, createVNode as Y, withCtx as F, renderList as Se, toDisplayString as Ve, createStaticVNode as ye } from "vue";
2
+ import ge from "./resources/zv-vr-select.svg.mjs";
3
+ import _ from "./resources/zv-return.svg.mjs";
4
+ import he from "./resources/zv-add.svg.mjs";
5
+ import He from "./resources/zv-reduce.svg.mjs";
6
6
  import be from "./resources/zv-play.svg.mjs";
7
- import He from "./resources/zv-pause.svg.mjs";
8
- import Je from "./resources/zv-refresh.svg.mjs";
9
- import L from "hls.js";
10
- import { isArray as ke, debounce as he, cloneDeep as W } from "lodash";
11
- import { useRoute as Ee } from "vue-router";
7
+ import Je from "./resources/zv-pause.svg.mjs";
8
+ import ke from "./resources/zv-refresh.svg.mjs";
9
+ import M from "hls.js";
10
+ import { cloneDeep as H, isArray as Ee, debounce as Te } from "lodash";
11
+ import { useRoute as Ce } from "vue-router";
12
12
  /* empty css */
13
13
  /* empty css */
14
14
  import "../../../Interaction/components/Tabs/index.mjs";
@@ -164,28 +164,28 @@ import "../UnityIframe/index.mjs";
164
164
  import "../UnityWebgl/index.mjs";
165
165
  import "./index.mjs";
166
166
  import "../Earth/index.mjs";
167
- import { SHJParseEvent as E } from "../../../../commons/plugins/event/index.mjs";
167
+ import { SHJParseEvent as I } from "../../../../commons/plugins/event/index.mjs";
168
168
  import "../../../../commons/plugins/datasource/utils/request.mjs";
169
169
  import "mqtt";
170
170
  import "nanoid";
171
- import { upgradeVr as Te } from "./version.mjs";
172
- const Re = {
171
+ import { upgradeVr as Ie } from "./version.mjs";
172
+ const Oe = {
173
173
  key: 0,
174
174
  class: "loading-placeholder"
175
- }, Ce = {
175
+ }, Re = {
176
176
  id: "panorama",
177
177
  class: "vr-scene"
178
178
  }, _e = {
179
179
  id: "panorama-video-wrap",
180
180
  class: "vr-scene-main"
181
- }, Ie = {
181
+ }, Ae = {
182
182
  key: 2,
183
183
  class: "vr-scene-controls"
184
- }, Oe = { class: "scene-list" }, Ae = ["onClick"], xe = ["src"], Le = { class: "label" }, Pe = ["autoplay", "loop", "volume"], je = ["src"], ze = {
184
+ }, Le = { class: "scene-list" }, xe = ["onClick"], Pe = ["src"], je = { class: "label" }, Me = ["autoplay", "loop", "volume"], ze = ["src"], Be = {
185
185
  key: 4,
186
186
  class: "mouse-tip"
187
- }, Me = Y({ name: "ShjVr" }), qi = /* @__PURE__ */ Y({
188
- ...Me,
187
+ }, De = $({ name: "ShjVr" }), Xr = /* @__PURE__ */ $({
188
+ ...De,
189
189
  props: {
190
190
  option: {},
191
191
  sources: {},
@@ -197,16 +197,16 @@ const Re = {
197
197
  "on-scene-zooming",
198
198
  "on-scene-hotClick"
199
199
  ],
200
- setup(S, { expose: $, emit: F }) {
201
- const Z = Ee(), o = A(() => Te(S.option)), g = F, m = c(), d = c({ src: "", autoplay: !0, loop: !0, volume: 50 }), v = c(null), _ = c(), p = c(!1), f = c(!1);
202
- let b = null;
203
- const K = c(o.value.default.firstScene), V = c(K.value), i = A(() => {
200
+ setup(y, { expose: Z, emit: K }) {
201
+ const q = Ce(), t = P(() => Ie(y.option)), b = K, w = p(), f = p({ src: "", autoplay: !0, loop: !0, volume: 50 }), m = p(null), S = p(null), A = p(), v = p(!1), V = p(!1);
202
+ let J = null;
203
+ const Q = p(t.value.default.firstScene), g = p(Q.value), r = P(() => {
204
204
  try {
205
- return o.value.scenes[V.value];
205
+ return t.value.scenes[g.value];
206
206
  } catch {
207
207
  return null;
208
208
  }
209
- }), P = {
209
+ }), z = {
210
210
  bylineLabel: "来自 %s",
211
211
  noPanoramaError: "未指定全景图像。",
212
212
  fileAccessError: "The file %s could not be accessed.",
@@ -215,21 +215,25 @@ const Re = {
215
215
  genericWebGLError: "您的浏览器没有显示此全景图所需的WebGL支持。",
216
216
  textureSizeError: "This panorama is too big for your device! It's %spx wide, but your device only supports images up to %spx wide. Try another device. (If you're the author, try scaling down the image.)",
217
217
  unknownError: "未知错误。检查开发人员控制台。"
218
- }, q = () => {
218
+ }, X = () => {
219
+ const o = H(t.value);
219
220
  window.SHJSceneVrViewer = window.pannellum.viewer("panorama", {
220
- ...o.value,
221
- default: Object.assign(W(o.value.default), {
222
- firstScene: V.value
221
+ ...o,
222
+ default: Object.assign(H(o.default), {
223
+ firstScene: g.value
223
224
  }),
224
- strings: P
225
+ strings: z
225
226
  });
226
- }, Q = () => {
227
- const t = () => {
228
- const a = document.getElementById("panorama-video-wrap");
229
- a.innerHTML = `
227
+ }, ee = () => {
228
+ var n, a;
229
+ const o = () => {
230
+ const d = document.getElementById("panorama-video-wrap");
231
+ d.innerHTML = `
230
232
  <video
231
233
  id="panorama-video"
232
234
  autoplay
235
+ muted
236
+ playsinline
233
237
  class="video-js vjs-default-skin vr-scene vjs-big-play-centered"
234
238
  preload="none"
235
239
  style="width:100%;height:100%;"
@@ -238,105 +242,158 @@ const Re = {
238
242
  </video>
239
243
  `;
240
244
  };
241
- v.value && (v.value.dispose(), v.value = null, t()), v.value || t();
245
+ m.value && (m.value.dispose(), m.value = null, o()), m.value || o();
242
246
  const e = document.getElementById(
243
247
  "panorama-video"
244
- ), n = o.value;
245
- if (v.value = window.videojs(e, {
248
+ ), i = H(t.value);
249
+ if (m.value = window.videojs(e, {
246
250
  loop: !0,
247
251
  autoplay: !0,
252
+ muted: !0,
253
+ controls: !1,
248
254
  plugins: {
249
255
  pannellum: {
250
- ...n,
251
- default: Object.assign(W(n.default), {
252
- firstScene: V.value
256
+ ...i,
257
+ default: Object.assign(H(i.default), {
258
+ firstScene: g.value
253
259
  }),
254
- strings: P
260
+ strings: z
255
261
  }
256
262
  }
257
- }), window.SHJSceneVrViewer = v.value.pnlmViewer, i.value.sceneType === "video" && (e.src = i.value.panorama), i.value.sceneType === "hls")
258
- if (L.isSupported()) {
259
- const a = new L();
260
- a.loadSource(i.value.panorama), a.attachMedia(e), a.on(L.Events.MANIFEST_PARSED, () => {
261
- e.play();
263
+ }), window.SHJSceneVrViewer = m.value.pnlmViewer, r.value.sceneType === "video" && (e.muted = !0, e.src = r.value.panorama, (n = e.play) == null || n.call(e).catch(() => {
264
+ })), r.value.sceneType === "hls")
265
+ if (M.isSupported()) {
266
+ if (S.value)
267
+ try {
268
+ S.value.destroy();
269
+ } catch {
270
+ }
271
+ const d = new M();
272
+ S.value = d, d.loadSource(r.value.panorama), d.attachMedia(e), d.on(M.Events.MANIFEST_PARSED, () => {
273
+ e.muted = !0, e.play();
262
274
  });
263
- } else e.canPlayType("application/vnd.apple.mpegurl") && (e.src = i.value.panorama);
264
- }, H = Z.path.includes("designer-vr"), y = () => {
265
- if (!(!p.value || f.value) && window.pannellum && o.value) {
266
- window.SHJSceneVrViewer && (window.SHJSceneVrViewer.destroy(), window.SHJSceneVrViewer = null), i.value.sceneType === "image" ? q() : Q();
267
- try {
268
- o.value.scenes[window.SHJSceneVrViewer.getScene()] && (d.value = o.value.default.audio, m.value && d.value && (window.SHJSceneVrViewer.audio = m, m.value.src = d.value.src, setTimeout(() => {
269
- m.value && (k.value = m.value.paused);
270
- }, 500)));
271
- } catch {
272
- }
273
- window.SHJSceneVrViewer.on("load", () => {
274
- g("on-scene-loaded", i.value), E.parseEvents(
275
- S.useEvents,
276
- "on-scene-loaded",
277
- i.value
275
+ } else e.canPlayType("application/vnd.apple.mpegurl") && (e.src = r.value.panorama, e.muted = !0, (a = e.play) == null || a.call(e).catch(() => {
276
+ }));
277
+ }, k = q.path.includes("designer-vr"), h = (o = !1) => {
278
+ if (!(!o && (!v.value || V.value))) {
279
+ if (o) {
280
+ if (V.value = !1, window.SHJSceneVrViewer) {
281
+ try {
282
+ window.SHJSceneVrViewer.destroy();
283
+ } catch {
284
+ }
285
+ window.SHJSceneVrViewer = null;
286
+ }
287
+ if (m.value) {
288
+ try {
289
+ m.value.dispose();
290
+ } catch {
291
+ }
292
+ m.value = null;
293
+ }
294
+ if (S.value) {
295
+ try {
296
+ S.value.destroy();
297
+ } catch {
298
+ }
299
+ S.value = null;
300
+ }
301
+ const e = document.getElementById(
302
+ "panorama-video"
278
303
  );
279
- }), H || o.value.default.autoRotate === 0 ? window.SHJSceneVrViewer.stopAutoRotate() : window.SHJSceneVrViewer.startAutoRotate();
280
- try {
281
- window.SHJSceneVrViewer && async function() {
282
- for (const t in o.value.scenes)
283
- Object.prototype.hasOwnProperty.call(o.value.scenes, t) && o.value.scenes[t].hotSpots.forEach(async (n) => {
284
- await setTimeout(() => {
285
- n.draggable = H, window.SHJSceneVrViewer.removeHotSpot(n.id, t), window.SHJSceneVrViewer.addHotSpot(n, t);
286
- }, 100);
287
- });
288
- }();
289
- } catch {
304
+ if (e && (e.pause(), e.src = "", e.srcObject = null, e.load(), e.hls))
305
+ try {
306
+ e.hls.destroy(), e.hls = null;
307
+ } catch {
308
+ }
309
+ const i = document.getElementById("panorama-video-wrap");
310
+ i && (i.innerHTML = "");
290
311
  }
291
- window.SHJSceneVrViewer.on("scenechange", (t) => {
292
- const e = document.getElementsByTagName("video");
293
- if (ke(e) && e.length > 0 && e.forEach((n) => {
294
- n && n.pause();
295
- }), i.value) {
296
- const n = i.value.sceneType;
297
- V.value = t;
298
- const a = i.value.sceneType;
299
- setTimeout(() => {
300
- (a !== "image" || n !== "image" && a === "image") && y(), T.value = V.value, g("on-scene-scenechange", i.value), E.parseEvents(
301
- S.useEvents,
302
- "on-scene-scenechange",
303
- i.value
304
- );
305
- }), H ? window.SHJSceneVrViewer.stopAutoRotate() : window.SHJSceneVrViewer.startAutoRotate();
306
- } else
307
- V.value = o.value.default.firstScene, h(() => {
308
- y(), g("on-scene-scenechange", i.value), E.parseEvents(
309
- S.useEvents,
310
- "on-scene-scenechange",
311
- i.value
312
- );
313
- });
314
- }), window.SHJSceneVrViewer.on(
315
- "zoomchange",
316
- he(() => {
317
- g("on-scene-zooming", i.value), E.parseEvents(
318
- S.useEvents,
319
- "on-scene-zooming",
320
- i.value
312
+ if (window.pannellum && t.value) {
313
+ if (!o && window.SHJSceneVrViewer) {
314
+ try {
315
+ window.SHJSceneVrViewer.destroy();
316
+ } catch {
317
+ }
318
+ window.SHJSceneVrViewer = null;
319
+ }
320
+ r.value.sceneType === "image" ? X() : ee();
321
+ try {
322
+ t.value.scenes[window.SHJSceneVrViewer.getScene()] && (f.value = t.value.default.audio, w.value && f.value && (window.SHJSceneVrViewer.audio = w, w.value.src = f.value.src, setTimeout(() => {
323
+ w.value && (T.value = w.value.paused);
324
+ }, 500)));
325
+ } catch {
326
+ }
327
+ window.SHJSceneVrViewer.on("load", () => {
328
+ b("on-scene-loaded", r.value), I.parseEvents(
329
+ y.useEvents,
330
+ "on-scene-loaded",
331
+ r.value
321
332
  );
322
- }, 300)
323
- ), window.SHJSceneVrViewer.on("hot-click", (t) => {
324
- g("on-scene-hotClick", t), E.parseEvents(S.useEvents, "on-scene-hotClick", t);
325
- }), f.value = !0;
333
+ }), k || t.value.default.autoRotate === 0 ? window.SHJSceneVrViewer.stopAutoRotate() : window.SHJSceneVrViewer.startAutoRotate();
334
+ try {
335
+ window.SHJSceneVrViewer && async function() {
336
+ const e = H(t.value.scenes);
337
+ for (const i in e)
338
+ Object.prototype.hasOwnProperty.call(e, i) && e[i].hotSpots.forEach(async (a) => {
339
+ await setTimeout(() => {
340
+ const d = H(a);
341
+ d.draggable = k, window.SHJSceneVrViewer.removeHotSpot(d.id, i), window.SHJSceneVrViewer.addHotSpot(d, i);
342
+ }, 100);
343
+ });
344
+ }();
345
+ } catch {
346
+ }
347
+ window.SHJSceneVrViewer.on("scenechange", (e) => {
348
+ const i = document.getElementsByTagName("video");
349
+ if (Ee(i) && i.length > 0 && i.forEach((n) => {
350
+ n && n.pause();
351
+ }), r.value) {
352
+ const n = r.value.sceneType;
353
+ g.value = e;
354
+ const a = r.value.sceneType;
355
+ setTimeout(() => {
356
+ (a !== "image" || n !== "image" && a === "image" || n !== a) && h(!0), O.value = g.value, b("on-scene-scenechange", r.value), I.parseEvents(
357
+ y.useEvents,
358
+ "on-scene-scenechange",
359
+ r.value
360
+ );
361
+ }), k ? window.SHJSceneVrViewer.stopAutoRotate() : window.SHJSceneVrViewer.startAutoRotate();
362
+ } else
363
+ g.value = t.value.default.firstScene, C(() => {
364
+ h(), b("on-scene-scenechange", r.value), I.parseEvents(
365
+ y.useEvents,
366
+ "on-scene-scenechange",
367
+ r.value
368
+ );
369
+ });
370
+ }), window.SHJSceneVrViewer.on(
371
+ "zoomchange",
372
+ Te(() => {
373
+ b("on-scene-zooming", r.value), I.parseEvents(
374
+ y.useEvents,
375
+ "on-scene-zooming",
376
+ r.value
377
+ );
378
+ }, 300)
379
+ ), window.SHJSceneVrViewer.on("hot-click", (e) => {
380
+ b("on-scene-hotClick", e), I.parseEvents(y.useEvents, "on-scene-hotClick", e);
381
+ }), V.value = !0;
382
+ }
326
383
  }
327
- }, X = () => {
328
- if (_.value) {
384
+ }, te = () => {
385
+ if (A.value) {
329
386
  if (!("IntersectionObserver" in window)) {
330
- p.value = !0, h(() => {
331
- y();
387
+ v.value = !0, C(() => {
388
+ h();
332
389
  });
333
390
  return;
334
391
  }
335
- b = new IntersectionObserver(
336
- (t) => {
337
- t.forEach((e) => {
338
- p.value = e.isIntersecting, e.isIntersecting && !f.value && h(() => {
339
- y();
392
+ J = new IntersectionObserver(
393
+ (o) => {
394
+ o.forEach((e) => {
395
+ v.value = e.isIntersecting, e.isIntersecting && !V.value && C(() => {
396
+ h();
340
397
  });
341
398
  });
342
399
  },
@@ -346,113 +403,133 @@ const Re = {
346
403
  rootMargin: "50px"
347
404
  // 提前50px开始加载
348
405
  }
349
- ), b.observe(_.value);
406
+ ), J.observe(A.value);
350
407
  }
351
- }, ee = () => {
352
- f.value || (p.value = !0, h(() => {
353
- y();
354
- }));
355
408
  }, oe = () => {
356
- b && (b.disconnect(), b = null);
357
- }, T = c(o.value.default.firstScene), te = A(() => {
358
- const t = [];
359
- if (o.value) {
360
- const e = o.value.scenes;
361
- for (const n in e)
362
- if (Object.prototype.hasOwnProperty.call(e, n)) {
363
- const a = e[n];
364
- t.push({
365
- label: a.label,
366
- value: n,
367
- thumbnail: a.cover
409
+ V.value || (v.value = !0, C(() => {
410
+ h();
411
+ }));
412
+ }, re = () => {
413
+ J && (J.disconnect(), J = null);
414
+ }, O = p(t.value.default.firstScene), ie = P(() => {
415
+ const o = [];
416
+ if (t.value) {
417
+ const e = t.value.scenes;
418
+ for (const i in e)
419
+ if (Object.prototype.hasOwnProperty.call(e, i)) {
420
+ const n = e[i];
421
+ o.push({
422
+ label: n.label,
423
+ value: i,
424
+ thumbnail: n.cover
368
425
  });
369
426
  }
370
427
  }
371
- return t.sort((e, n) => {
372
- const a = parseInt(e.value.replace("scene", "")), w = parseInt(n.value.replace("scene", ""));
373
- return a - w;
428
+ return o.sort((e, i) => {
429
+ const n = parseInt(e.value.replace("scene", "")), a = parseInt(i.value.replace("scene", ""));
430
+ return n - a;
374
431
  });
375
432
  });
376
- z(
377
- () => o.value.default,
433
+ D(
434
+ () => t.value.default,
378
435
  () => {
379
- window.SHJSceneVrViewer && (H ? window.SHJSceneVrViewer.stopAutoRotate() : window.SHJSceneVrViewer.startAutoRotate());
436
+ window.SHJSceneVrViewer && (k ? window.SHJSceneVrViewer.stopAutoRotate() : window.SHJSceneVrViewer.startAutoRotate());
380
437
  },
381
438
  { deep: !0 }
382
439
  );
383
- const ie = (t) => {
384
- window.SHJSceneVrViewer && T.value !== t && (T.value = t, window.SHJSceneVrViewer.isLoaded() && (window.SHJSceneVrViewer.loadScene(t), H ? window.SHJSceneVrViewer.stopAutoRotate() : window.SHJSceneVrViewer.startAutoRotate()));
385
- }, I = c(), J = c(!0), re = () => {
386
- J.value ? I.value.style.bottom = "-999px" : I.value.style.bottom = "80px", J.value = !J.value;
440
+ const ne = (o) => {
441
+ window.SHJSceneVrViewer && O.value !== o && (O.value = o, window.SHJSceneVrViewer.isLoaded() && (window.SHJSceneVrViewer.loadScene(o), k ? window.SHJSceneVrViewer.stopAutoRotate() : window.SHJSceneVrViewer.startAutoRotate()));
442
+ }, L = p(), E = p(!0), le = () => {
443
+ E.value ? L.value.style.bottom = "-999px" : L.value.style.bottom = "80px", E.value = !E.value;
387
444
  };
388
- de(() => {
389
- o.value && (o.value.default.controls === void 0 && (o.value.default.controls = i.value.controls), o.value.default.audio === void 0 && (o.value.default.audio = i.value.audio)), X(), me();
390
- }), z(p, (t) => {
391
- t && !f.value && h(() => {
392
- y();
445
+ we(() => {
446
+ t.value && (t.value.default.controls === void 0 && (t.value.default.controls = r.value.controls), t.value.default.audio === void 0 && (t.value.default.audio = r.value.audio)), te(), ve();
447
+ }), D(v, (o) => {
448
+ o && !V.value && C(() => {
449
+ h();
393
450
  });
394
- }), ve(() => {
395
- oe(), window.SHJSceneVrViewer && (window.SHJSceneVrViewer.destroy(), window.SHJSceneVrViewer = null), v.value && (v.value.dispose(), v.value = null);
451
+ }), fe(() => {
452
+ if (re(), window.SHJSceneVrViewer) {
453
+ try {
454
+ window.SHJSceneVrViewer.destroy();
455
+ } catch {
456
+ }
457
+ window.SHJSceneVrViewer = null;
458
+ }
459
+ if (m.value) {
460
+ try {
461
+ m.value.dispose();
462
+ } catch {
463
+ }
464
+ m.value = null;
465
+ }
466
+ if (S.value) {
467
+ try {
468
+ S.value.destroy();
469
+ } catch {
470
+ }
471
+ S.value = null;
472
+ }
396
473
  });
397
- const ne = () => {
474
+ const ae = () => {
398
475
  window.SHJSceneVrViewer.setPitch(window.SHJSceneVrViewer.getPitch() + 10);
399
- }, le = () => {
400
- window.SHJSceneVrViewer.setPitch(window.SHJSceneVrViewer.getPitch() - 10);
401
476
  }, se = () => {
477
+ window.SHJSceneVrViewer.setPitch(window.SHJSceneVrViewer.getPitch() - 10);
478
+ }, ce = () => {
402
479
  window.SHJSceneVrViewer.setYaw(window.SHJSceneVrViewer.getYaw() - 10);
403
- }, ae = () => {
404
- window.SHJSceneVrViewer.setYaw(window.SHJSceneVrViewer.getYaw() + 10);
405
480
  }, ue = () => {
481
+ window.SHJSceneVrViewer.setYaw(window.SHJSceneVrViewer.getYaw() + 10);
482
+ }, pe = () => {
406
483
  window.SHJSceneVrViewer.setHfov(window.SHJSceneVrViewer.getHfov() - 10);
407
- }, ce = () => {
484
+ }, me = () => {
408
485
  window.SHJSceneVrViewer.setHfov(window.SHJSceneVrViewer.getHfov() + 10);
409
- }, k = c(!1), j = (t) => {
410
- m.value && (t === "play" ? (m.value.play(), k.value = !1) : (m.value.pause(), k.value = !0));
411
- }, pe = () => {
486
+ }, T = p(!1), B = (o) => {
487
+ w.value && (o === "play" ? (w.value.play(), T.value = !1) : (w.value.pause(), T.value = !0));
488
+ }, de = () => {
412
489
  window.SHJSceneVrViewer.startAutoRotate();
413
490
  };
414
- let O;
415
- const R = c(!1), me = () => {
416
- o.value.default.controls ? R.value = o.value.default.controls.mouseTipShow : R.value = !0, O && clearTimeout(O), O = setTimeout(() => {
491
+ let x;
492
+ const R = p(!1), ve = () => {
493
+ t.value.default.controls ? R.value = t.value.default.controls.mouseTipShow : R.value = !0, x && clearTimeout(x), x = setTimeout(() => {
417
494
  R.value = !1;
418
495
  }, 3500);
419
496
  };
420
- return $({
421
- forceInit: ee,
422
- isVisible: p,
423
- isInitialized: f
424
- }), (t, e) => {
425
- const n = M("el-tooltip"), a = M("el-scrollbar");
426
- return s(), l("div", {
497
+ return Z({
498
+ forceInit: oe,
499
+ isVisible: v,
500
+ isInitialized: V
501
+ }), (o, e) => {
502
+ const i = N("el-tooltip"), n = N("el-scrollbar");
503
+ return c(), s("div", {
427
504
  ref_key: "containerRef",
428
- ref: _,
505
+ ref: A,
429
506
  class: "vr-scene-wrap"
430
507
  }, [
431
- !p.value && !f.value ? (s(), l("div", Re, e[2] || (e[2] = [
432
- r("div", { class: "loading-content" }, [
433
- r("div", { class: "loading-spinner" }),
434
- r("p", null, "全景场景加载中...")
508
+ !v.value && !V.value ? (c(), s("div", Oe, e[2] || (e[2] = [
509
+ l("div", { class: "loading-content" }, [
510
+ l("div", { class: "loading-spinner" }),
511
+ l("p", null, "全景场景加载中...")
435
512
  ], -1)
436
513
  ]))) : u("", !0),
437
- i.value && p.value ? (s(), l(D, { key: 1 }, [
438
- B(r("div", Ce, null, 512), [
439
- [N, i.value.sceneType === "image"]
514
+ r.value && v.value ? (c(), s(G, { key: 1 }, [
515
+ W(l("div", Re, null, 512), [
516
+ [U, r.value.sceneType === "image"]
440
517
  ]),
441
- B(r("div", _e, null, 512), [
442
- [N, i.value.sceneType !== "image"]
518
+ W(l("div", _e, null, 512), [
519
+ [U, r.value.sceneType !== "image"]
443
520
  ])
444
521
  ], 64)) : u("", !0),
445
- o.value.default.controls && p.value ? (s(), l("div", Ie, [
446
- o.value.default.controls.scene ? (s(), l("div", {
522
+ t.value.default.controls && v.value ? (c(), s("div", Ae, [
523
+ t.value.default.controls.scene ? (c(), s("div", {
447
524
  key: 0,
448
525
  class: "btn-icon left",
449
- style: x({ borderColor: J.value ? "#ff7d00" : "#ffffff3d" }),
450
- onClick: re
526
+ style: j({ borderColor: E.value ? "#ff7d00" : "#ffffff3d" }),
527
+ onClick: le
451
528
  }, [
452
- G(n, { content: "场景选择" }, {
453
- default: U(() => e[3] || (e[3] = [
454
- r("img", {
455
- src: Ve,
529
+ Y(i, { content: "场景选择" }, {
530
+ default: F(() => e[3] || (e[3] = [
531
+ l("img", {
532
+ src: ge,
456
533
  alt: ""
457
534
  }, null, -1)
458
535
  ])),
@@ -460,146 +537,146 @@ const Re = {
460
537
  __: [3]
461
538
  })
462
539
  ], 4)) : u("", !0),
463
- o.value.default.controls.left ? (s(), l("div", {
540
+ t.value.default.controls.left ? (c(), s("div", {
464
541
  key: 1,
465
542
  class: "btn-icon left",
466
- onClick: se
543
+ onClick: ce
467
544
  }, e[4] || (e[4] = [
468
- r("img", {
469
- src: C,
545
+ l("img", {
546
+ src: _,
470
547
  alt: ""
471
548
  }, null, -1)
472
549
  ]))) : u("", !0),
473
- o.value.default.controls.right ? (s(), l("div", {
550
+ t.value.default.controls.right ? (c(), s("div", {
474
551
  key: 2,
475
552
  class: "btn-icon right",
476
- onClick: ae
553
+ onClick: ue
477
554
  }, e[5] || (e[5] = [
478
- r("img", {
479
- src: C,
555
+ l("img", {
556
+ src: _,
480
557
  alt: ""
481
558
  }, null, -1)
482
559
  ]))) : u("", !0),
483
- o.value.default.controls.top ? (s(), l("div", {
560
+ t.value.default.controls.top ? (c(), s("div", {
484
561
  key: 3,
485
562
  class: "btn-icon up",
486
- onClick: ne
563
+ onClick: ae
487
564
  }, e[6] || (e[6] = [
488
- r("img", {
489
- src: C,
565
+ l("img", {
566
+ src: _,
490
567
  alt: ""
491
568
  }, null, -1)
492
569
  ]))) : u("", !0),
493
- o.value.default.controls.bottom ? (s(), l("div", {
570
+ t.value.default.controls.bottom ? (c(), s("div", {
494
571
  key: 4,
495
572
  class: "btn-icon down",
496
- onClick: le
573
+ onClick: se
497
574
  }, e[7] || (e[7] = [
498
- r("img", {
499
- src: C,
575
+ l("img", {
576
+ src: _,
500
577
  alt: ""
501
578
  }, null, -1)
502
579
  ]))) : u("", !0),
503
- o.value.default.controls.magnify ? (s(), l("div", {
580
+ t.value.default.controls.magnify ? (c(), s("div", {
504
581
  key: 5,
505
582
  class: "btn-icon",
506
- onClick: ue
583
+ onClick: pe
507
584
  }, e[8] || (e[8] = [
508
- r("img", {
509
- src: ye,
585
+ l("img", {
586
+ src: he,
510
587
  alt: ""
511
588
  }, null, -1)
512
589
  ]))) : u("", !0),
513
- o.value.default.controls.shrink ? (s(), l("div", {
590
+ t.value.default.controls.shrink ? (c(), s("div", {
514
591
  key: 6,
515
592
  class: "btn-icon",
516
- onClick: ce
593
+ onClick: me
517
594
  }, e[9] || (e[9] = [
518
- r("img", {
519
- src: ge,
595
+ l("img", {
596
+ src: He,
520
597
  alt: ""
521
598
  }, null, -1)
522
599
  ]))) : u("", !0),
523
- k.value && d.value.src && o.value.default.audio ? (s(), l("div", {
600
+ T.value && f.value.src && t.value.default.audio ? (c(), s("div", {
524
601
  key: 7,
525
602
  class: "btn-icon",
526
- onClick: e[0] || (e[0] = (w) => j("play"))
603
+ onClick: e[0] || (e[0] = (a) => B("play"))
527
604
  }, e[10] || (e[10] = [
528
- r("img", {
605
+ l("img", {
529
606
  src: be,
530
607
  alt: ""
531
608
  }, null, -1)
532
609
  ]))) : u("", !0),
533
- !k.value && d.value.src && o.value.default.audio ? (s(), l("div", {
610
+ !T.value && f.value.src && t.value.default.audio ? (c(), s("div", {
534
611
  key: 8,
535
612
  class: "btn-icon",
536
- onClick: e[1] || (e[1] = (w) => j("pause"))
613
+ onClick: e[1] || (e[1] = (a) => B("pause"))
537
614
  }, e[11] || (e[11] = [
538
- r("img", {
539
- src: He,
615
+ l("img", {
616
+ src: Je,
540
617
  alt: ""
541
618
  }, null, -1)
542
619
  ]))) : u("", !0),
543
- o.value.default.controls.rotate ? (s(), l("div", {
620
+ t.value.default.controls.rotate ? (c(), s("div", {
544
621
  key: 9,
545
622
  class: "btn-icon",
546
- onClick: pe
623
+ onClick: de
547
624
  }, e[12] || (e[12] = [
548
- r("img", {
549
- src: Je,
625
+ l("img", {
626
+ src: ke,
550
627
  alt: ""
551
628
  }, null, -1)
552
629
  ]))) : u("", !0)
553
630
  ])) : u("", !0),
554
- o.value.default.controls && p.value ? (s(), l("div", {
631
+ t.value.default.controls && v.value ? (c(), s("div", {
555
632
  key: 3,
556
633
  ref_key: "sceneMenuRef",
557
- ref: I,
634
+ ref: L,
558
635
  class: "scene-menu",
559
- style: x({
560
- bottom: J.value && o.value.default.controls.scene ? "80px" : "-9999999999999px"
636
+ style: j({
637
+ bottom: E.value && t.value.default.controls.scene ? "80px" : "-9999999999999px"
561
638
  })
562
639
  }, [
563
- G(a, null, {
564
- default: U(() => [
565
- r("div", Oe, [
566
- (s(!0), l(D, null, we(te.value, (w) => (s(), l("div", {
567
- key: w.value,
640
+ Y(n, null, {
641
+ default: F(() => [
642
+ l("div", Le, [
643
+ (c(!0), s(G, null, Se(ie.value, (a) => (c(), s("div", {
644
+ key: a.value,
568
645
  class: "scene-item",
569
- style: x({
570
- borderColor: T.value === w.value ? "#ff7d00" : "#fff"
646
+ style: j({
647
+ borderColor: O.value === a.value ? "#ff7d00" : "#fff"
571
648
  }),
572
- onClick: (De) => ie(w.value)
649
+ onClick: (d) => ne(a.value)
573
650
  }, [
574
- r("img", {
651
+ l("img", {
575
652
  class: "thumbnail",
576
- src: w.thumbnail
577
- }, null, 8, xe),
578
- r("p", Le, fe(w.label), 1)
579
- ], 12, Ae))), 128))
653
+ src: a.thumbnail
654
+ }, null, 8, Pe),
655
+ l("p", je, Ve(a.label), 1)
656
+ ], 12, xe))), 128))
580
657
  ])
581
658
  ]),
582
659
  _: 1
583
660
  })
584
661
  ], 4)) : u("", !0),
585
- r("audio", {
662
+ l("audio", {
586
663
  ref_key: "audioRef",
587
- ref: m,
588
- autoplay: d.value.autoplay,
589
- loop: d.value.loop,
590
- volume: d.value.volume
664
+ ref: w,
665
+ autoplay: f.value.autoplay,
666
+ loop: f.value.loop,
667
+ volume: f.value.volume
591
668
  }, [
592
- r("source", {
593
- src: d.value.src
594
- }, null, 8, je)
595
- ], 8, Pe),
596
- R.value && p.value ? (s(), l("div", ze, e[13] || (e[13] = [
597
- Se('<div class="icon-wrap" data-v-eb6bdd6d><div class="left" data-v-eb6bdd6d><i class="iconfont zv-drop-down" data-v-eb6bdd6d></i></div><i class="iconfont zv-mouse" data-v-eb6bdd6d></i><div class="right" data-v-eb6bdd6d><i class="iconfont zv-drop-down" data-v-eb6bdd6d></i></div></div><p class="title" data-v-eb6bdd6d>左右拖动   更多精彩</p>', 2)
669
+ l("source", {
670
+ src: f.value.src
671
+ }, null, 8, ze)
672
+ ], 8, Me),
673
+ R.value && v.value ? (c(), s("div", Be, e[13] || (e[13] = [
674
+ ye('<div class="icon-wrap" data-v-5d09e9c5><div class="left" data-v-5d09e9c5><i class="iconfont zv-drop-down" data-v-5d09e9c5></i></div><i class="iconfont zv-mouse" data-v-5d09e9c5></i><div class="right" data-v-5d09e9c5><i class="iconfont zv-drop-down" data-v-5d09e9c5></i></div></div><p class="title" data-v-5d09e9c5>左右拖动   更多精彩</p>', 2)
598
675
  ]))) : u("", !0)
599
676
  ], 512);
600
677
  };
601
678
  }
602
679
  });
603
680
  export {
604
- qi as default
681
+ Xr as default
605
682
  };