@ericchen1990/pano-view 3.1.0 → 3.1.2

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/index.cjs CHANGED
@@ -46,7 +46,7 @@ var require_howler = __commonJS({
46
46
  * @return {Howler}
47
47
  */
48
48
  init: function() {
49
- var self = this || Howler3;
49
+ var self = this || Howler4;
50
50
  self._counter = 1e3;
51
51
  self._html5AudioPool = [];
52
52
  self.html5PoolSize = 10;
@@ -71,7 +71,7 @@ var require_howler = __commonJS({
71
71
  * @return {Howler/Float} Returns self or current volume.
72
72
  */
73
73
  volume: function(vol) {
74
- var self = this || Howler3;
74
+ var self = this || Howler4;
75
75
  vol = parseFloat(vol);
76
76
  if (!self.ctx) {
77
77
  setupAudioContext();
@@ -82,7 +82,7 @@ var require_howler = __commonJS({
82
82
  return self;
83
83
  }
84
84
  if (self.usingWebAudio) {
85
- self.masterGain.gain.setValueAtTime(vol, Howler3.ctx.currentTime);
85
+ self.masterGain.gain.setValueAtTime(vol, Howler4.ctx.currentTime);
86
86
  }
87
87
  for (var i = 0; i < self._howls.length; i++) {
88
88
  if (!self._howls[i]._webAudio) {
@@ -104,13 +104,13 @@ var require_howler = __commonJS({
104
104
  * @param {Boolean} muted Is muted or not.
105
105
  */
106
106
  mute: function(muted) {
107
- var self = this || Howler3;
107
+ var self = this || Howler4;
108
108
  if (!self.ctx) {
109
109
  setupAudioContext();
110
110
  }
111
111
  self._muted = muted;
112
112
  if (self.usingWebAudio) {
113
- self.masterGain.gain.setValueAtTime(muted ? 0 : self._volume, Howler3.ctx.currentTime);
113
+ self.masterGain.gain.setValueAtTime(muted ? 0 : self._volume, Howler4.ctx.currentTime);
114
114
  }
115
115
  for (var i = 0; i < self._howls.length; i++) {
116
116
  if (!self._howls[i]._webAudio) {
@@ -129,7 +129,7 @@ var require_howler = __commonJS({
129
129
  * Handle stopping all sounds globally.
130
130
  */
131
131
  stop: function() {
132
- var self = this || Howler3;
132
+ var self = this || Howler4;
133
133
  for (var i = 0; i < self._howls.length; i++) {
134
134
  self._howls[i].stop();
135
135
  }
@@ -140,7 +140,7 @@ var require_howler = __commonJS({
140
140
  * @return {Howler}
141
141
  */
142
142
  unload: function() {
143
- var self = this || Howler3;
143
+ var self = this || Howler4;
144
144
  for (var i = self._howls.length - 1; i >= 0; i--) {
145
145
  self._howls[i].unload();
146
146
  }
@@ -157,14 +157,14 @@ var require_howler = __commonJS({
157
157
  * @return {Boolean}
158
158
  */
159
159
  codecs: function(ext) {
160
- return (this || Howler3)._codecs[ext.replace(/^x-/, "")];
160
+ return (this || Howler4)._codecs[ext.replace(/^x-/, "")];
161
161
  },
162
162
  /**
163
163
  * Setup various state values for global tracking.
164
164
  * @return {Howler}
165
165
  */
166
166
  _setup: function() {
167
- var self = this || Howler3;
167
+ var self = this || Howler4;
168
168
  self.state = self.ctx ? self.ctx.state || "suspended" : "suspended";
169
169
  self._autoSuspend();
170
170
  if (!self.usingWebAudio) {
@@ -198,7 +198,7 @@ var require_howler = __commonJS({
198
198
  * @return {Howler}
199
199
  */
200
200
  _setupCodecs: function() {
201
- var self = this || Howler3;
201
+ var self = this || Howler4;
202
202
  var audioTest = null;
203
203
  try {
204
204
  audioTest = typeof Audio !== "undefined" ? new Audio() : null;
@@ -241,7 +241,7 @@ var require_howler = __commonJS({
241
241
  * @return {Howler}
242
242
  */
243
243
  _unlockAudio: function() {
244
- var self = this || Howler3;
244
+ var self = this || Howler4;
245
245
  if (self._audioUnlocked || !self.ctx) {
246
246
  return;
247
247
  }
@@ -311,7 +311,7 @@ var require_howler = __commonJS({
311
311
  * @return {Audio} HTML5 Audio object.
312
312
  */
313
313
  _obtainHtml5Audio: function() {
314
- var self = this || Howler3;
314
+ var self = this || Howler4;
315
315
  if (self._html5AudioPool.length) {
316
316
  return self._html5AudioPool.pop();
317
317
  }
@@ -328,7 +328,7 @@ var require_howler = __commonJS({
328
328
  * @return {Howler}
329
329
  */
330
330
  _releaseHtml5Audio: function(audio) {
331
- var self = this || Howler3;
331
+ var self = this || Howler4;
332
332
  if (audio._unlocked) {
333
333
  self._html5AudioPool.push(audio);
334
334
  }
@@ -341,7 +341,7 @@ var require_howler = __commonJS({
341
341
  */
342
342
  _autoSuspend: function() {
343
343
  var self = this;
344
- if (!self.autoSuspend || !self.ctx || typeof self.ctx.suspend === "undefined" || !Howler3.usingWebAudio) {
344
+ if (!self.autoSuspend || !self.ctx || typeof self.ctx.suspend === "undefined" || !Howler4.usingWebAudio) {
345
345
  return;
346
346
  }
347
347
  for (var i = 0; i < self._howls.length; i++) {
@@ -379,7 +379,7 @@ var require_howler = __commonJS({
379
379
  */
380
380
  _autoResume: function() {
381
381
  var self = this;
382
- if (!self.ctx || typeof self.ctx.resume === "undefined" || !Howler3.usingWebAudio) {
382
+ if (!self.ctx || typeof self.ctx.resume === "undefined" || !Howler4.usingWebAudio) {
383
383
  return;
384
384
  }
385
385
  if (self.state === "running" && self.ctx.state !== "interrupted" && self._suspendTimer) {
@@ -402,7 +402,7 @@ var require_howler = __commonJS({
402
402
  return self;
403
403
  }
404
404
  };
405
- var Howler3 = new HowlerGlobal2();
405
+ var Howler4 = new HowlerGlobal2();
406
406
  var Howl3 = function(o) {
407
407
  var self = this;
408
408
  if (!o.src || o.src.length === 0) {
@@ -419,7 +419,7 @@ var require_howler = __commonJS({
419
419
  */
420
420
  init: function(o) {
421
421
  var self = this;
422
- if (!Howler3.ctx) {
422
+ if (!Howler4.ctx) {
423
423
  setupAudioContext();
424
424
  }
425
425
  self._autoplay = o.autoplay || false;
@@ -458,11 +458,11 @@ var require_howler = __commonJS({
458
458
  self._onseek = o.onseek ? [{ fn: o.onseek }] : [];
459
459
  self._onunlock = o.onunlock ? [{ fn: o.onunlock }] : [];
460
460
  self._onresume = [];
461
- self._webAudio = Howler3.usingWebAudio && !self._html5;
462
- if (typeof Howler3.ctx !== "undefined" && Howler3.ctx && Howler3.autoUnlock) {
463
- Howler3._unlockAudio();
461
+ self._webAudio = Howler4.usingWebAudio && !self._html5;
462
+ if (typeof Howler4.ctx !== "undefined" && Howler4.ctx && Howler4.autoUnlock) {
463
+ Howler4._unlockAudio();
464
464
  }
465
- Howler3._howls.push(self);
465
+ Howler4._howls.push(self);
466
466
  if (self._autoplay) {
467
467
  self._queue.push({
468
468
  event: "play",
@@ -483,7 +483,7 @@ var require_howler = __commonJS({
483
483
  load: function() {
484
484
  var self = this;
485
485
  var url = null;
486
- if (Howler3.noAudio) {
486
+ if (Howler4.noAudio) {
487
487
  self._emit("loaderror", null, "No audio support.");
488
488
  return;
489
489
  }
@@ -511,7 +511,7 @@ var require_howler = __commonJS({
511
511
  if (!ext) {
512
512
  console.warn('No file extension was found. Consider using the "format" property or specify an extension.');
513
513
  }
514
- if (ext && Howler3.codecs(ext)) {
514
+ if (ext && Howler4.codecs(ext)) {
515
515
  url = self._src[i];
516
516
  break;
517
517
  }
@@ -589,7 +589,7 @@ var require_howler = __commonJS({
589
589
  return sound._id;
590
590
  }
591
591
  if (self._webAudio) {
592
- Howler3._autoResume();
592
+ Howler4._autoResume();
593
593
  }
594
594
  var seek = Math.max(0, sound._seek > 0 ? sound._seek : self._sprite[sprite][0] / 1e3);
595
595
  var duration = Math.max(0, (self._sprite[sprite][0] + self._sprite[sprite][1]) / 1e3 - seek);
@@ -616,8 +616,8 @@ var require_howler = __commonJS({
616
616
  setParams();
617
617
  self._refreshBuffer(sound);
618
618
  var vol = sound._muted || self._muted ? 0 : sound._volume;
619
- node.gain.setValueAtTime(vol, Howler3.ctx.currentTime);
620
- sound._playStart = Howler3.ctx.currentTime;
619
+ node.gain.setValueAtTime(vol, Howler4.ctx.currentTime);
620
+ sound._playStart = Howler4.ctx.currentTime;
621
621
  if (typeof node.bufferSource.start === "undefined") {
622
622
  sound._loop ? node.bufferSource.noteGrainOn(0, seek, 86400) : node.bufferSource.noteGrainOn(0, seek, duration);
623
623
  } else {
@@ -633,7 +633,7 @@ var require_howler = __commonJS({
633
633
  }, 0);
634
634
  }
635
635
  };
636
- if (Howler3.state === "running" && Howler3.ctx.state !== "interrupted") {
636
+ if (Howler4.state === "running" && Howler4.ctx.state !== "interrupted") {
637
637
  playWebAudio();
638
638
  } else {
639
639
  self._playLock = true;
@@ -643,8 +643,8 @@ var require_howler = __commonJS({
643
643
  } else {
644
644
  var playHtml5 = function() {
645
645
  node.currentTime = seek;
646
- node.muted = sound._muted || self._muted || Howler3._muted || node.muted;
647
- node.volume = sound._volume * Howler3.volume();
646
+ node.muted = sound._muted || self._muted || Howler4._muted || node.muted;
647
+ node.volume = sound._volume * Howler4.volume();
648
648
  node.playbackRate = sound._rate;
649
649
  try {
650
650
  var play = node.play();
@@ -692,7 +692,7 @@ var require_howler = __commonJS({
692
692
  node.src = self._src;
693
693
  node.load();
694
694
  }
695
- var loadedNoReadyState = window && window.ejecta || !node.readyState && Howler3._navigator.isCocoonJS;
695
+ var loadedNoReadyState = window && window.ejecta || !node.readyState && Howler4._navigator.isCocoonJS;
696
696
  if (node.readyState >= 3 || loadedNoReadyState) {
697
697
  playHtml5();
698
698
  } else {
@@ -701,9 +701,9 @@ var require_howler = __commonJS({
701
701
  var listener = function() {
702
702
  self._state = "loaded";
703
703
  playHtml5();
704
- node.removeEventListener(Howler3._canPlayEvent, listener, false);
704
+ node.removeEventListener(Howler4._canPlayEvent, listener, false);
705
705
  };
706
- node.addEventListener(Howler3._canPlayEvent, listener, false);
706
+ node.addEventListener(Howler4._canPlayEvent, listener, false);
707
707
  self._clearTimer(sound._id);
708
708
  }
709
709
  }
@@ -841,9 +841,9 @@ var require_howler = __commonJS({
841
841
  self._stopFade(sound._id);
842
842
  }
843
843
  if (self._webAudio && sound._node) {
844
- sound._node.gain.setValueAtTime(muted ? 0 : sound._volume, Howler3.ctx.currentTime);
844
+ sound._node.gain.setValueAtTime(muted ? 0 : sound._volume, Howler4.ctx.currentTime);
845
845
  } else if (sound._node) {
846
- sound._node.muted = Howler3._muted ? true : muted;
846
+ sound._node.muted = Howler4._muted ? true : muted;
847
847
  }
848
848
  self._emit("mute", sound._id);
849
849
  }
@@ -899,9 +899,9 @@ var require_howler = __commonJS({
899
899
  self._stopFade(id[i]);
900
900
  }
901
901
  if (self._webAudio && sound._node && !sound._muted) {
902
- sound._node.gain.setValueAtTime(vol, Howler3.ctx.currentTime);
902
+ sound._node.gain.setValueAtTime(vol, Howler4.ctx.currentTime);
903
903
  } else if (sound._node && !sound._muted) {
904
- sound._node.volume = vol * Howler3.volume();
904
+ sound._node.volume = vol * Howler4.volume();
905
905
  }
906
906
  self._emit("volume", sound._id);
907
907
  }
@@ -943,7 +943,7 @@ var require_howler = __commonJS({
943
943
  self._stopFade(ids[i]);
944
944
  }
945
945
  if (self._webAudio && !sound._muted) {
946
- var currentTime = Howler3.ctx.currentTime;
946
+ var currentTime = Howler4.ctx.currentTime;
947
947
  var end = currentTime + len / 1e3;
948
948
  sound._volume = from;
949
949
  sound._node.gain.setValueAtTime(from, currentTime);
@@ -1009,7 +1009,7 @@ var require_howler = __commonJS({
1009
1009
  var sound = self._soundById(id);
1010
1010
  if (sound && sound._interval) {
1011
1011
  if (self._webAudio) {
1012
- sound._node.gain.cancelScheduledValues(Howler3.ctx.currentTime);
1012
+ sound._node.gain.cancelScheduledValues(Howler4.ctx.currentTime);
1013
1013
  }
1014
1014
  clearInterval(sound._interval);
1015
1015
  sound._interval = null;
@@ -1111,11 +1111,11 @@ var require_howler = __commonJS({
1111
1111
  if (sound) {
1112
1112
  if (self.playing(id[i])) {
1113
1113
  sound._rateSeek = self.seek(id[i]);
1114
- sound._playStart = self._webAudio ? Howler3.ctx.currentTime : sound._playStart;
1114
+ sound._playStart = self._webAudio ? Howler4.ctx.currentTime : sound._playStart;
1115
1115
  }
1116
1116
  sound._rate = rate;
1117
1117
  if (self._webAudio && sound._node && sound._node.bufferSource) {
1118
- sound._node.bufferSource.playbackRate.setValueAtTime(rate, Howler3.ctx.currentTime);
1118
+ sound._node.bufferSource.playbackRate.setValueAtTime(rate, Howler4.ctx.currentTime);
1119
1119
  } else if (sound._node) {
1120
1120
  sound._node.playbackRate = rate;
1121
1121
  }
@@ -1209,7 +1209,7 @@ var require_howler = __commonJS({
1209
1209
  }
1210
1210
  } else {
1211
1211
  if (self._webAudio) {
1212
- var realTime = self.playing(id) ? Howler3.ctx.currentTime - sound._playStart : 0;
1212
+ var realTime = self.playing(id) ? Howler4.ctx.currentTime - sound._playStart : 0;
1213
1213
  var rateSeek = sound._rateSeek ? sound._rateSeek - sound._seek : 0;
1214
1214
  return sound._seek + (rateSeek + realTime * Math.abs(sound._rate));
1215
1215
  } else {
@@ -1272,20 +1272,20 @@ var require_howler = __commonJS({
1272
1272
  if (!self._webAudio) {
1273
1273
  self._clearSound(sounds[i]._node);
1274
1274
  sounds[i]._node.removeEventListener("error", sounds[i]._errorFn, false);
1275
- sounds[i]._node.removeEventListener(Howler3._canPlayEvent, sounds[i]._loadFn, false);
1275
+ sounds[i]._node.removeEventListener(Howler4._canPlayEvent, sounds[i]._loadFn, false);
1276
1276
  sounds[i]._node.removeEventListener("ended", sounds[i]._endFn, false);
1277
- Howler3._releaseHtml5Audio(sounds[i]._node);
1277
+ Howler4._releaseHtml5Audio(sounds[i]._node);
1278
1278
  }
1279
1279
  delete sounds[i]._node;
1280
1280
  self._clearTimer(sounds[i]._id);
1281
1281
  }
1282
- var index = Howler3._howls.indexOf(self);
1282
+ var index = Howler4._howls.indexOf(self);
1283
1283
  if (index >= 0) {
1284
- Howler3._howls.splice(index, 1);
1284
+ Howler4._howls.splice(index, 1);
1285
1285
  }
1286
1286
  var remCache = true;
1287
- for (i = 0; i < Howler3._howls.length; i++) {
1288
- if (Howler3._howls[i]._src === self._src || self._src.indexOf(Howler3._howls[i]._src) >= 0) {
1287
+ for (i = 0; i < Howler4._howls.length; i++) {
1288
+ if (Howler4._howls[i]._src === self._src || self._src.indexOf(Howler4._howls[i]._src) >= 0) {
1289
1289
  remCache = false;
1290
1290
  break;
1291
1291
  }
@@ -1293,7 +1293,7 @@ var require_howler = __commonJS({
1293
1293
  if (cache && remCache) {
1294
1294
  delete cache[self._src];
1295
1295
  }
1296
- Howler3.noAudio = false;
1296
+ Howler4.noAudio = false;
1297
1297
  self._state = "unloaded";
1298
1298
  self._sounds = [];
1299
1299
  self = null;
@@ -1426,7 +1426,7 @@ var require_howler = __commonJS({
1426
1426
  self._emit("play", sound._id);
1427
1427
  sound._seek = sound._start || 0;
1428
1428
  sound._rateSeek = 0;
1429
- sound._playStart = Howler3.ctx.currentTime;
1429
+ sound._playStart = Howler4.ctx.currentTime;
1430
1430
  var timeout = (sound._stop - sound._start) * 1e3 / Math.abs(sound._rate);
1431
1431
  self._endTimers[sound._id] = setTimeout(self._ended.bind(self, sound), timeout);
1432
1432
  }
@@ -1437,7 +1437,7 @@ var require_howler = __commonJS({
1437
1437
  sound._rateSeek = 0;
1438
1438
  self._clearTimer(sound._id);
1439
1439
  self._cleanBuffer(sound._node);
1440
- Howler3._autoSuspend();
1440
+ Howler4._autoSuspend();
1441
1441
  }
1442
1442
  if (!self._webAudio && !loop) {
1443
1443
  self.stop(sound._id, true);
@@ -1545,7 +1545,7 @@ var require_howler = __commonJS({
1545
1545
  */
1546
1546
  _refreshBuffer: function(sound) {
1547
1547
  var self = this;
1548
- sound._node.bufferSource = Howler3.ctx.createBufferSource();
1548
+ sound._node.bufferSource = Howler4.ctx.createBufferSource();
1549
1549
  sound._node.bufferSource.buffer = cache[self._src];
1550
1550
  if (sound._panner) {
1551
1551
  sound._node.bufferSource.connect(sound._panner);
@@ -1557,7 +1557,7 @@ var require_howler = __commonJS({
1557
1557
  sound._node.bufferSource.loopStart = sound._start || 0;
1558
1558
  sound._node.bufferSource.loopEnd = sound._stop || 0;
1559
1559
  }
1560
- sound._node.bufferSource.playbackRate.setValueAtTime(sound._rate, Howler3.ctx.currentTime);
1560
+ sound._node.bufferSource.playbackRate.setValueAtTime(sound._rate, Howler4.ctx.currentTime);
1561
1561
  return self;
1562
1562
  },
1563
1563
  /**
@@ -1567,16 +1567,16 @@ var require_howler = __commonJS({
1567
1567
  */
1568
1568
  _cleanBuffer: function(node) {
1569
1569
  var self = this;
1570
- var isIOS = Howler3._navigator && Howler3._navigator.vendor.indexOf("Apple") >= 0;
1570
+ var isIOS = Howler4._navigator && Howler4._navigator.vendor.indexOf("Apple") >= 0;
1571
1571
  if (!node.bufferSource) {
1572
1572
  return self;
1573
1573
  }
1574
- if (Howler3._scratchBuffer && node.bufferSource) {
1574
+ if (Howler4._scratchBuffer && node.bufferSource) {
1575
1575
  node.bufferSource.onended = null;
1576
1576
  node.bufferSource.disconnect(0);
1577
1577
  if (isIOS) {
1578
1578
  try {
1579
- node.bufferSource.buffer = Howler3._scratchBuffer;
1579
+ node.bufferSource.buffer = Howler4._scratchBuffer;
1580
1580
  } catch (e) {
1581
1581
  }
1582
1582
  }
@@ -1589,7 +1589,7 @@ var require_howler = __commonJS({
1589
1589
  * @param {Object} node Audio node to clear.
1590
1590
  */
1591
1591
  _clearSound: function(node) {
1592
- var checkIE = /MSIE |Trident\//.test(Howler3._navigator && Howler3._navigator.userAgent);
1592
+ var checkIE = /MSIE |Trident\//.test(Howler4._navigator && Howler4._navigator.userAgent);
1593
1593
  if (!checkIE) {
1594
1594
  node.src = "data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA";
1595
1595
  }
@@ -1615,7 +1615,7 @@ var require_howler = __commonJS({
1615
1615
  self._paused = true;
1616
1616
  self._ended = true;
1617
1617
  self._sprite = "__default";
1618
- self._id = ++Howler3._counter;
1618
+ self._id = ++Howler4._counter;
1619
1619
  parent._sounds.push(self);
1620
1620
  self.create();
1621
1621
  return self;
@@ -1627,23 +1627,23 @@ var require_howler = __commonJS({
1627
1627
  create: function() {
1628
1628
  var self = this;
1629
1629
  var parent = self._parent;
1630
- var volume = Howler3._muted || self._muted || self._parent._muted ? 0 : self._volume;
1630
+ var volume = Howler4._muted || self._muted || self._parent._muted ? 0 : self._volume;
1631
1631
  if (parent._webAudio) {
1632
- self._node = typeof Howler3.ctx.createGain === "undefined" ? Howler3.ctx.createGainNode() : Howler3.ctx.createGain();
1633
- self._node.gain.setValueAtTime(volume, Howler3.ctx.currentTime);
1632
+ self._node = typeof Howler4.ctx.createGain === "undefined" ? Howler4.ctx.createGainNode() : Howler4.ctx.createGain();
1633
+ self._node.gain.setValueAtTime(volume, Howler4.ctx.currentTime);
1634
1634
  self._node.paused = true;
1635
- self._node.connect(Howler3.masterGain);
1636
- } else if (!Howler3.noAudio) {
1637
- self._node = Howler3._obtainHtml5Audio();
1635
+ self._node.connect(Howler4.masterGain);
1636
+ } else if (!Howler4.noAudio) {
1637
+ self._node = Howler4._obtainHtml5Audio();
1638
1638
  self._errorFn = self._errorListener.bind(self);
1639
1639
  self._node.addEventListener("error", self._errorFn, false);
1640
1640
  self._loadFn = self._loadListener.bind(self);
1641
- self._node.addEventListener(Howler3._canPlayEvent, self._loadFn, false);
1641
+ self._node.addEventListener(Howler4._canPlayEvent, self._loadFn, false);
1642
1642
  self._endFn = self._endListener.bind(self);
1643
1643
  self._node.addEventListener("ended", self._endFn, false);
1644
1644
  self._node.src = parent._src;
1645
1645
  self._node.preload = parent._preload === true ? "auto" : parent._preload;
1646
- self._node.volume = volume * Howler3.volume();
1646
+ self._node.volume = volume * Howler4.volume();
1647
1647
  self._node.load();
1648
1648
  }
1649
1649
  return self;
@@ -1664,7 +1664,7 @@ var require_howler = __commonJS({
1664
1664
  self._paused = true;
1665
1665
  self._ended = true;
1666
1666
  self._sprite = "__default";
1667
- self._id = ++Howler3._counter;
1667
+ self._id = ++Howler4._counter;
1668
1668
  return self;
1669
1669
  },
1670
1670
  /**
@@ -1690,7 +1690,7 @@ var require_howler = __commonJS({
1690
1690
  parent._emit("load");
1691
1691
  parent._loadQueue();
1692
1692
  }
1693
- self._node.removeEventListener(Howler3._canPlayEvent, self._loadFn, false);
1693
+ self._node.removeEventListener(Howler4._canPlayEvent, self._loadFn, false);
1694
1694
  },
1695
1695
  /**
1696
1696
  * HTML5 Audio ended listener callback.
@@ -1772,10 +1772,10 @@ var require_howler = __commonJS({
1772
1772
  error();
1773
1773
  }
1774
1774
  };
1775
- if (typeof Promise !== "undefined" && Howler3.ctx.decodeAudioData.length === 1) {
1776
- Howler3.ctx.decodeAudioData(arraybuffer).then(success).catch(error);
1775
+ if (typeof Promise !== "undefined" && Howler4.ctx.decodeAudioData.length === 1) {
1776
+ Howler4.ctx.decodeAudioData(arraybuffer).then(success).catch(error);
1777
1777
  } else {
1778
- Howler3.ctx.decodeAudioData(arraybuffer, success, error);
1778
+ Howler4.ctx.decodeAudioData(arraybuffer, success, error);
1779
1779
  }
1780
1780
  };
1781
1781
  var loadSound = function(self, buffer) {
@@ -1792,59 +1792,59 @@ var require_howler = __commonJS({
1792
1792
  }
1793
1793
  };
1794
1794
  var setupAudioContext = function() {
1795
- if (!Howler3.usingWebAudio) {
1795
+ if (!Howler4.usingWebAudio) {
1796
1796
  return;
1797
1797
  }
1798
1798
  try {
1799
1799
  if (typeof AudioContext !== "undefined") {
1800
- Howler3.ctx = new AudioContext();
1800
+ Howler4.ctx = new AudioContext();
1801
1801
  } else if (typeof webkitAudioContext !== "undefined") {
1802
- Howler3.ctx = new webkitAudioContext();
1802
+ Howler4.ctx = new webkitAudioContext();
1803
1803
  } else {
1804
- Howler3.usingWebAudio = false;
1804
+ Howler4.usingWebAudio = false;
1805
1805
  }
1806
1806
  } catch (e) {
1807
- Howler3.usingWebAudio = false;
1807
+ Howler4.usingWebAudio = false;
1808
1808
  }
1809
- if (!Howler3.ctx) {
1810
- Howler3.usingWebAudio = false;
1809
+ if (!Howler4.ctx) {
1810
+ Howler4.usingWebAudio = false;
1811
1811
  }
1812
- var iOS = /iP(hone|od|ad)/.test(Howler3._navigator && Howler3._navigator.platform);
1813
- var appVersion = Howler3._navigator && Howler3._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);
1812
+ var iOS = /iP(hone|od|ad)/.test(Howler4._navigator && Howler4._navigator.platform);
1813
+ var appVersion = Howler4._navigator && Howler4._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);
1814
1814
  var version = appVersion ? parseInt(appVersion[1], 10) : null;
1815
1815
  if (iOS && version && version < 9) {
1816
- var safari = /safari/.test(Howler3._navigator && Howler3._navigator.userAgent.toLowerCase());
1817
- if (Howler3._navigator && !safari) {
1818
- Howler3.usingWebAudio = false;
1816
+ var safari = /safari/.test(Howler4._navigator && Howler4._navigator.userAgent.toLowerCase());
1817
+ if (Howler4._navigator && !safari) {
1818
+ Howler4.usingWebAudio = false;
1819
1819
  }
1820
1820
  }
1821
- if (Howler3.usingWebAudio) {
1822
- Howler3.masterGain = typeof Howler3.ctx.createGain === "undefined" ? Howler3.ctx.createGainNode() : Howler3.ctx.createGain();
1823
- Howler3.masterGain.gain.setValueAtTime(Howler3._muted ? 0 : Howler3._volume, Howler3.ctx.currentTime);
1824
- Howler3.masterGain.connect(Howler3.ctx.destination);
1821
+ if (Howler4.usingWebAudio) {
1822
+ Howler4.masterGain = typeof Howler4.ctx.createGain === "undefined" ? Howler4.ctx.createGainNode() : Howler4.ctx.createGain();
1823
+ Howler4.masterGain.gain.setValueAtTime(Howler4._muted ? 0 : Howler4._volume, Howler4.ctx.currentTime);
1824
+ Howler4.masterGain.connect(Howler4.ctx.destination);
1825
1825
  }
1826
- Howler3._setup();
1826
+ Howler4._setup();
1827
1827
  };
1828
1828
  if (typeof define === "function" && define.amd) {
1829
1829
  define([], function() {
1830
1830
  return {
1831
- Howler: Howler3,
1831
+ Howler: Howler4,
1832
1832
  Howl: Howl3
1833
1833
  };
1834
1834
  });
1835
1835
  }
1836
1836
  if (typeof exports2 !== "undefined") {
1837
- exports2.Howler = Howler3;
1837
+ exports2.Howler = Howler4;
1838
1838
  exports2.Howl = Howl3;
1839
1839
  }
1840
1840
  if (typeof global !== "undefined") {
1841
1841
  global.HowlerGlobal = HowlerGlobal2;
1842
- global.Howler = Howler3;
1842
+ global.Howler = Howler4;
1843
1843
  global.Howl = Howl3;
1844
1844
  global.Sound = Sound2;
1845
1845
  } else if (typeof window !== "undefined") {
1846
1846
  window.HowlerGlobal = HowlerGlobal2;
1847
- window.Howler = Howler3;
1847
+ window.Howler = Howler4;
1848
1848
  window.Howl = Howl3;
1849
1849
  window.Sound = Sound2;
1850
1850
  }
@@ -2352,6 +2352,22 @@ function cn(...values) {
2352
2352
 
2353
2353
  // src/audio/howl.ts
2354
2354
  var import_howler = __toESM(require_howler());
2355
+
2356
+ // src/media-activation-event.ts
2357
+ function isMediaActivationEvent(event) {
2358
+ switch (event.type) {
2359
+ case "keydown":
2360
+ return event instanceof KeyboardEvent && event.key !== "Escape";
2361
+ case "pointerdown":
2362
+ return event instanceof PointerEvent && event.pointerType === "mouse";
2363
+ case "pointerup":
2364
+ return event instanceof PointerEvent && event.pointerType !== "mouse";
2365
+ default:
2366
+ return false;
2367
+ }
2368
+ }
2369
+
2370
+ // src/audio/howl.ts
2355
2371
  import_howler.Howler.autoUnlock = true;
2356
2372
  function resumePanoAudio() {
2357
2373
  if (!import_howler.Howler.ctx || import_howler.Howler.ctx.state === "running") {
@@ -2359,6 +2375,9 @@ function resumePanoAudio() {
2359
2375
  }
2360
2376
  return import_howler.Howler.ctx.resume();
2361
2377
  }
2378
+ function isPanoAudioUnlocked() {
2379
+ return !import_howler.Howler.ctx || import_howler.Howler.ctx.state === "running";
2380
+ }
2362
2381
  function sourceList(src) {
2363
2382
  if (src == null) {
2364
2383
  return [];
@@ -2424,7 +2443,10 @@ function createUnlockingHowl({
2424
2443
  blockedNotified = true;
2425
2444
  onPlayError?.(error);
2426
2445
  }
2427
- const retry = () => {
2446
+ const retry = (event) => {
2447
+ if (!isMediaActivationEvent(event)) {
2448
+ return;
2449
+ }
2428
2450
  removeUnlockListeners();
2429
2451
  if (!disposed && isActive() && shouldRetryPlay()) {
2430
2452
  void resumePanoAudio();
@@ -2433,8 +2455,10 @@ function createUnlockingHowl({
2433
2455
  };
2434
2456
  removeUnlockListeners();
2435
2457
  unlockListeners.push({ type: "pointerdown", listener: retry });
2458
+ unlockListeners.push({ type: "pointerup", listener: retry });
2436
2459
  unlockListeners.push({ type: "keydown", listener: retry });
2437
2460
  window.addEventListener("pointerdown", retry, { capture: true });
2461
+ window.addEventListener("pointerup", retry, { capture: true });
2438
2462
  window.addEventListener("keydown", retry, { capture: true });
2439
2463
  }
2440
2464
  });
@@ -3848,8 +3872,8 @@ function isProduction2() {
3848
3872
  }
3849
3873
 
3850
3874
  // src/media-activation.tsx
3875
+ var import_howler2 = __toESM(require_howler());
3851
3876
  var import_react11 = require("react");
3852
- var import_jsx_runtime2 = require("react/jsx-runtime");
3853
3877
  var PanoMediaActivationHostContext = (0, import_react11.createContext)(null);
3854
3878
  function createPanoMediaActivationHost() {
3855
3879
  return { intents: /* @__PURE__ */ new Set(), listeners: /* @__PURE__ */ new Set(), revision: 0 };
@@ -3872,6 +3896,15 @@ function subscribePanoMediaActivation(host, listener) {
3872
3896
  function hasPanoMediaActivationIntent(host) {
3873
3897
  return host.intents.size > 0;
3874
3898
  }
3899
+ function needsMediaGesture() {
3900
+ if (typeof navigator !== "undefined" && navigator.userActivation?.hasBeenActive) {
3901
+ return false;
3902
+ }
3903
+ if (import_howler2.Howler.ctx?.state === "running") {
3904
+ return false;
3905
+ }
3906
+ return true;
3907
+ }
3875
3908
  function usePanoMediaActivationIntent(required) {
3876
3909
  const host = (0, import_react11.useContext)(PanoMediaActivationHostContext);
3877
3910
  const keyRef = (0, import_react11.useRef)(null);
@@ -3891,27 +3924,10 @@ function usePanoMediaActivationIntent(required) {
3891
3924
  };
3892
3925
  }, [host, required]);
3893
3926
  }
3894
- function PanoMediaActivationOverlay({
3895
- ariaLabel = "Enable sound",
3896
- className,
3897
- message = "Tap to enable sound",
3898
- onActivate
3899
- }) {
3900
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: cn("pano-media-activation", className), children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
3901
- "button",
3902
- {
3903
- "aria-label": ariaLabel,
3904
- className: "pano-media-activation-button",
3905
- onClick: onActivate,
3906
- type: "button",
3907
- children: message
3908
- }
3909
- ) });
3910
- }
3911
3927
 
3912
3928
  // src/pano-context-menu.tsx
3913
3929
  var import_react12 = require("react");
3914
- var import_jsx_runtime3 = require("react/jsx-runtime");
3930
+ var import_jsx_runtime2 = require("react/jsx-runtime");
3915
3931
  var DEFAULT_ICON_SIZE = 16;
3916
3932
  var MENU_EDGE_PADDING = 8;
3917
3933
  var MIN_PANO_CONTEXT_MENU_BACKGROUND_OPACITY = 0.4;
@@ -4074,7 +4090,7 @@ function DefaultContextMenuPanel({
4074
4090
  padding: resolved.padding,
4075
4091
  ...style
4076
4092
  };
4077
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
4093
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
4078
4094
  "div",
4079
4095
  {
4080
4096
  ref: menuRef,
@@ -4085,7 +4101,7 @@ function DefaultContextMenuPanel({
4085
4101
  style: panelStyle,
4086
4102
  tabIndex: -1,
4087
4103
  children: [
4088
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4104
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
4089
4105
  "div",
4090
4106
  {
4091
4107
  "aria-hidden": true,
@@ -4097,9 +4113,9 @@ function DefaultContextMenuPanel({
4097
4113
  }
4098
4114
  }
4099
4115
  ),
4100
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "pano-context-menu-items", children: visibleItems.map((item, index) => {
4116
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "pano-context-menu-items", children: visibleItems.map((item, index) => {
4101
4117
  if (!isActionItem(item)) {
4102
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4118
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
4103
4119
  "div",
4104
4120
  {
4105
4121
  "aria-hidden": true,
@@ -4116,7 +4132,7 @@ function DefaultContextMenuPanel({
4116
4132
  );
4117
4133
  }
4118
4134
  const disabled = item.disabled === true;
4119
- const iconNode = item.icon ?? (item.image ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4135
+ const iconNode = item.icon ?? (item.image ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
4120
4136
  "img",
4121
4137
  {
4122
4138
  alt: item.imageAlt ?? "",
@@ -4130,7 +4146,7 @@ function DefaultContextMenuPanel({
4130
4146
  }
4131
4147
  }
4132
4148
  ) : null);
4133
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
4149
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
4134
4150
  "button",
4135
4151
  {
4136
4152
  "aria-disabled": disabled || void 0,
@@ -4166,7 +4182,7 @@ function DefaultContextMenuPanel({
4166
4182
  tabIndex: disabled ? -1 : activeIndex === index ? 0 : -1,
4167
4183
  type: "button",
4168
4184
  children: [
4169
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4185
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
4170
4186
  "span",
4171
4187
  {
4172
4188
  "aria-hidden": true,
@@ -4178,7 +4194,7 @@ function DefaultContextMenuPanel({
4178
4194
  children: iconNode
4179
4195
  }
4180
4196
  ),
4181
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { style: { flex: 1 }, children: item.label })
4197
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { style: { flex: 1 }, children: item.label })
4182
4198
  ]
4183
4199
  },
4184
4200
  item.id
@@ -4231,7 +4247,7 @@ function PositionedMenuShell({
4231
4247
  top: Math.min(Math.max(rawTop, MENU_EDGE_PADDING), maxTop)
4232
4248
  });
4233
4249
  }, [clientX, clientY, overlayElement, children, viewportRevision]);
4234
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4250
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
4235
4251
  "div",
4236
4252
  {
4237
4253
  className: "pano-context-menu-shell",
@@ -4290,7 +4306,7 @@ function usePanoContextMenuOverlay() {
4290
4306
  document.removeEventListener("keydown", handleKeyDown);
4291
4307
  };
4292
4308
  }, [session2]);
4293
- const overlay = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4309
+ const overlay = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
4294
4310
  "div",
4295
4311
  {
4296
4312
  ref: setOverlayNode,
@@ -4301,7 +4317,7 @@ function usePanoContextMenuOverlay() {
4301
4317
  position: "absolute",
4302
4318
  zIndex: 20
4303
4319
  },
4304
- children: session2 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4320
+ children: session2 ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
4305
4321
  PositionedMenuShell,
4306
4322
  {
4307
4323
  clientX: session2.event.clientX,
@@ -4394,9 +4410,9 @@ function PanoContextMenu({
4394
4410
  view,
4395
4411
  render: () => {
4396
4412
  if (hasCustomChildren && current.children) {
4397
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { "data-pano-context-menu": true, style: { pointerEvents: "auto" }, children: current.children({ event, view, close }) });
4413
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { "data-pano-context-menu": true, style: { pointerEvents: "auto" }, children: current.children({ event, view, close }) });
4398
4414
  }
4399
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4415
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
4400
4416
  DefaultContextMenuPanel,
4401
4417
  {
4402
4418
  appearance: current.appearance,
@@ -4434,7 +4450,7 @@ function PanoContextMenu({
4434
4450
  return null;
4435
4451
  }
4436
4452
  function ResetViewIcon() {
4437
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
4453
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
4438
4454
  "svg",
4439
4455
  {
4440
4456
  "aria-hidden": true,
@@ -4447,14 +4463,14 @@ function ResetViewIcon() {
4447
4463
  viewBox: "0 0 16 16",
4448
4464
  width: "100%",
4449
4465
  children: [
4450
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M3.5 6.5A4.5 4.5 0 1 1 4 10" }),
4451
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M3.5 3.5v3h3" })
4466
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M3.5 6.5A4.5 4.5 0 1 1 4 10" }),
4467
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M3.5 3.5v3h3" })
4452
4468
  ]
4453
4469
  }
4454
4470
  );
4455
4471
  }
4456
4472
  function FullscreenIcon() {
4457
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4473
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
4458
4474
  "svg",
4459
4475
  {
4460
4476
  "aria-hidden": true,
@@ -4466,12 +4482,12 @@ function FullscreenIcon() {
4466
4482
  strokeWidth: "1.75",
4467
4483
  viewBox: "0 0 16 16",
4468
4484
  width: "100%",
4469
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M3 6V3h3M10 3h3v3M13 10v3h-3M6 13H3v-3" })
4485
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M3 6V3h3M10 3h3v3M13 10v3h-3M6 13H3v-3" })
4470
4486
  }
4471
4487
  );
4472
4488
  }
4473
4489
  function ExitFullscreenIcon() {
4474
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4490
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
4475
4491
  "svg",
4476
4492
  {
4477
4493
  "aria-hidden": true,
@@ -4483,7 +4499,7 @@ function ExitFullscreenIcon() {
4483
4499
  strokeWidth: "1.75",
4484
4500
  viewBox: "0 0 16 16",
4485
4501
  width: "100%",
4486
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M6 3v3H3M10 3v3h3M3 10h3v3M10 10h3v3" })
4502
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M6 3v3H3M10 3v3h3M3 10h3v3M10 10h3v3" })
4487
4503
  }
4488
4504
  );
4489
4505
  }
@@ -4492,7 +4508,7 @@ function createPanoContextMenuPresets(actions) {
4492
4508
  const resetView = {
4493
4509
  id: "pano-reset-view",
4494
4510
  label: "Reset view",
4495
- icon: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ResetViewIcon, {}),
4511
+ icon: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ResetViewIcon, {}),
4496
4512
  onSelect: () => {
4497
4513
  actions.reset();
4498
4514
  }
@@ -4500,7 +4516,7 @@ function createPanoContextMenuPresets(actions) {
4500
4516
  const fullscreen = {
4501
4517
  id: "pano-fullscreen",
4502
4518
  label: isFullscreen ? "Exit fullscreen" : "Enter fullscreen",
4503
- icon: isFullscreen ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ExitFullscreenIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(FullscreenIcon, {}),
4519
+ icon: isFullscreen ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ExitFullscreenIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(FullscreenIcon, {}),
4504
4520
  onSelect: () => {
4505
4521
  actions.toggleFullscreen();
4506
4522
  }
@@ -4598,7 +4614,7 @@ var PanoContextMenuActionsContext = (0, import_react12.createContext)(null);
4598
4614
  // src/pano-cursor.tsx
4599
4615
  var import_fiber5 = require("@react-three/fiber");
4600
4616
  var import_react13 = require("react");
4601
- var import_jsx_runtime4 = require("react/jsx-runtime");
4617
+ var import_jsx_runtime3 = require("react/jsx-runtime");
4602
4618
  var DEFAULT_PANO_CURSORS = {
4603
4619
  default: "grab",
4604
4620
  dragging: "grabbing",
@@ -4740,7 +4756,7 @@ function PanoCursorController({
4740
4756
  release(PANO_DRAG_CLAIM_ID);
4741
4757
  };
4742
4758
  }, [claim, eventBus, release]);
4743
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(PanoCursorContext.Provider, { value: api, children });
4759
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(PanoCursorContext.Provider, { value: api, children });
4744
4760
  }
4745
4761
 
4746
4762
  // src/pano-events.tsx
@@ -5101,7 +5117,7 @@ var DEFAULT_PANORAMA_CAMERA_NEAR = 0.1;
5101
5117
  var DEFAULT_PANORAMA_CAMERA_FAR = DEFAULT_PANORAMA_RADIUS * 2;
5102
5118
 
5103
5119
  // src/panorama-event-surface.tsx
5104
- var import_jsx_runtime5 = require("react/jsx-runtime");
5120
+ var import_jsx_runtime4 = require("react/jsx-runtime");
5105
5121
  var EVENT_SURFACE_RADIUS = DEFAULT_PANORAMA_RADIUS - 1;
5106
5122
  function makePanoramaPointerEvent(event) {
5107
5123
  const nativeEvent = event.nativeEvent;
@@ -5159,7 +5175,7 @@ function PanoramaEventSurface() {
5159
5175
  event.stopPropagation();
5160
5176
  eventBus.emit(type, makePanoramaPointerEvent(event));
5161
5177
  };
5162
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
5178
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
5163
5179
  "mesh",
5164
5180
  {
5165
5181
  renderOrder: -200,
@@ -5169,8 +5185,8 @@ function PanoramaEventSurface() {
5169
5185
  onPointerUp: (event) => emit("pointerup", event),
5170
5186
  onPointerMove: (event) => emit("pointermove", event),
5171
5187
  children: [
5172
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("sphereGeometry", { args: [EVENT_SURFACE_RADIUS, 64, 32] }),
5173
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5188
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("sphereGeometry", { args: [EVENT_SURFACE_RADIUS, 64, 32] }),
5189
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
5174
5190
  "meshBasicMaterial",
5175
5191
  {
5176
5192
  colorWrite: false,
@@ -5352,7 +5368,7 @@ function TouchControls({
5352
5368
 
5353
5369
  // src/video/chrome-overlay.tsx
5354
5370
  var import_react18 = require("react");
5355
- var import_jsx_runtime6 = require("react/jsx-runtime");
5371
+ var import_jsx_runtime5 = require("react/jsx-runtime");
5356
5372
  var PanoChromeOverlayContext = (0, import_react18.createContext)(null);
5357
5373
  function usePanoChromeOverlay() {
5358
5374
  const [overlayElement, setOverlayElement] = (0, import_react18.useState)(
@@ -5365,7 +5381,7 @@ function usePanoChromeOverlay() {
5365
5381
  () => ({ overlayElement }),
5366
5382
  [overlayElement]
5367
5383
  );
5368
- const overlay = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
5384
+ const overlay = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5369
5385
  "div",
5370
5386
  {
5371
5387
  className: "pano-chrome-overlay",
@@ -5442,7 +5458,7 @@ var import_react22 = require("react");
5442
5458
 
5443
5459
  // src/video/pano-video-captions.tsx
5444
5460
  var import_react20 = require("react");
5445
- var import_jsx_runtime7 = require("react/jsx-runtime");
5461
+ var import_jsx_runtime6 = require("react/jsx-runtime");
5446
5462
  var DEFAULT_PANO_VIDEO_CAPTION_APPEARANCE = {
5447
5463
  color: "#ffffff",
5448
5464
  background: "rgba(0, 0, 0, 0.55)",
@@ -5490,13 +5506,13 @@ function PanoVideoCaptionsOverlay({
5490
5506
  textShadow: snapshot.captionAppearance.textShadow,
5491
5507
  whiteSpace: "pre-wrap"
5492
5508
  };
5493
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
5509
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
5494
5510
  "div",
5495
5511
  {
5496
5512
  className: "pano-video-captions",
5497
5513
  "data-pano-video-captions": "",
5498
5514
  style: wrapperStyle,
5499
- children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: textStyle, children: snapshot.captionText })
5515
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: textStyle, children: snapshot.captionText })
5500
5516
  }
5501
5517
  );
5502
5518
  }
@@ -5639,7 +5655,7 @@ function cueText(cue) {
5639
5655
  }
5640
5656
 
5641
5657
  // src/video/pano-video-controls.tsx
5642
- var import_jsx_runtime8 = require("react/jsx-runtime");
5658
+ var import_jsx_runtime7 = require("react/jsx-runtime");
5643
5659
  var DEFAULT_PANO_VIDEO_CONTROLS_APPEARANCE = {
5644
5660
  background: "rgba(16, 16, 16, 0.88)",
5645
5661
  color: "#f4f4f4",
@@ -5700,7 +5716,7 @@ function volumeFromClientY(clientY, track) {
5700
5716
  return Math.max(0, Math.min(1, (rect.bottom - clientY) / rect.height));
5701
5717
  }
5702
5718
  function Icon({ path }) {
5703
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
5719
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
5704
5720
  "svg",
5705
5721
  {
5706
5722
  "aria-hidden": true,
@@ -5712,7 +5728,7 @@ function Icon({ path }) {
5712
5728
  strokeWidth: "1.75",
5713
5729
  viewBox: "0 0 16 16",
5714
5730
  width: "16",
5715
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("path", { d: path })
5731
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: path })
5716
5732
  }
5717
5733
  );
5718
5734
  }
@@ -5724,7 +5740,7 @@ function ChromeButton({
5724
5740
  label,
5725
5741
  onClick
5726
5742
  }) {
5727
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
5743
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
5728
5744
  "button",
5729
5745
  {
5730
5746
  "aria-label": label,
@@ -5750,14 +5766,14 @@ function ChromeMenu({
5750
5766
  labelledBy,
5751
5767
  items
5752
5768
  }) {
5753
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
5769
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
5754
5770
  ChromeMenuSurface,
5755
5771
  {
5756
5772
  appearance,
5757
5773
  id,
5758
5774
  labelledBy,
5759
5775
  role: "menu",
5760
- children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
5776
+ children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
5761
5777
  ChromeMenuRadioItem,
5762
5778
  {
5763
5779
  active: item.active,
@@ -5777,7 +5793,7 @@ function ChromeMenuSurface({
5777
5793
  labelledBy,
5778
5794
  role
5779
5795
  }) {
5780
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
5796
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
5781
5797
  "div",
5782
5798
  {
5783
5799
  "aria-labelledby": labelledBy,
@@ -5801,7 +5817,7 @@ function ChromeMenuRadioItem({
5801
5817
  label,
5802
5818
  onClick
5803
5819
  }) {
5804
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
5820
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
5805
5821
  "button",
5806
5822
  {
5807
5823
  "aria-checked": active,
@@ -5826,7 +5842,7 @@ function ChromeMenuActionItem({
5826
5842
  onClick,
5827
5843
  secondary
5828
5844
  }) {
5829
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
5845
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
5830
5846
  "button",
5831
5847
  {
5832
5848
  className: "pano-video-chrome-menu-action",
@@ -5841,7 +5857,7 @@ function ChromeMenuActionItem({
5841
5857
  },
5842
5858
  type: "button",
5843
5859
  children: [
5844
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: label }),
5860
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { children: label }),
5845
5861
  secondary
5846
5862
  ]
5847
5863
  }
@@ -5850,10 +5866,10 @@ function ChromeMenuActionItem({
5850
5866
  function ChromeMenuSectionLabel({
5851
5867
  children
5852
5868
  }) {
5853
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "pano-video-chrome-menu-label", children });
5869
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "pano-video-chrome-menu-label", children });
5854
5870
  }
5855
5871
  function ChromeMenuDivider() {
5856
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "pano-video-chrome-menu-divider" });
5872
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "pano-video-chrome-menu-divider" });
5857
5873
  }
5858
5874
  function CaptionsMenu({
5859
5875
  appearance,
@@ -5866,16 +5882,16 @@ function CaptionsMenu({
5866
5882
  panel,
5867
5883
  snapshot
5868
5884
  }) {
5869
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
5885
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
5870
5886
  ChromeMenuSurface,
5871
5887
  {
5872
5888
  appearance,
5873
5889
  id,
5874
5890
  labelledBy,
5875
5891
  role: "menu",
5876
- children: panel === "tracks" ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
5877
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "pano-video-chrome-menu-list", children: [
5878
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
5892
+ children: panel === "tracks" ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
5893
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "pano-video-chrome-menu-list", children: [
5894
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
5879
5895
  ChromeMenuRadioItem,
5880
5896
  {
5881
5897
  active: snapshot.trackId === null,
@@ -5888,7 +5904,7 @@ function CaptionsMenu({
5888
5904
  ),
5889
5905
  snapshot.tracks.map((track) => {
5890
5906
  const trackItemId = panoVideoTrackId(track);
5891
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
5907
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
5892
5908
  ChromeMenuRadioItem,
5893
5909
  {
5894
5910
  active: snapshot.trackId === trackItemId,
@@ -5902,29 +5918,29 @@ function CaptionsMenu({
5902
5918
  );
5903
5919
  })
5904
5920
  ] }),
5905
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ChromeMenuDivider, {}),
5906
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
5921
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ChromeMenuDivider, {}),
5922
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
5907
5923
  ChromeMenuActionItem,
5908
5924
  {
5909
5925
  appearance,
5910
5926
  label: "Settings",
5911
5927
  onClick: onOpenSettings,
5912
- secondary: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { "aria-hidden": true, children: "\u203A" })
5928
+ secondary: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { "aria-hidden": true, children: "\u203A" })
5913
5929
  }
5914
5930
  )
5915
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
5916
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
5931
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
5932
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
5917
5933
  ChromeMenuActionItem,
5918
5934
  {
5919
5935
  appearance,
5920
5936
  label: "Back",
5921
5937
  onClick: onShowTracks,
5922
- secondary: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { "aria-hidden": true, children: "\u2039" })
5938
+ secondary: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { "aria-hidden": true, children: "\u2039" })
5923
5939
  }
5924
5940
  ),
5925
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ChromeMenuDivider, {}),
5926
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ChromeMenuSectionLabel, { children: "Font size" }),
5927
- CAPTION_SIZE_OPTIONS.map((option) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
5941
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ChromeMenuDivider, {}),
5942
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ChromeMenuSectionLabel, { children: "Font size" }),
5943
+ CAPTION_SIZE_OPTIONS.map((option) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
5928
5944
  ChromeMenuRadioItem,
5929
5945
  {
5930
5946
  active: Number(snapshot.captionAppearance.fontSize) === option.value,
@@ -5936,9 +5952,9 @@ function CaptionsMenu({
5936
5952
  },
5937
5953
  option.id
5938
5954
  )),
5939
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ChromeMenuDivider, {}),
5940
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ChromeMenuSectionLabel, { children: "Background" }),
5941
- CAPTION_BACKGROUND_OPTIONS.map((option) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
5955
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ChromeMenuDivider, {}),
5956
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ChromeMenuSectionLabel, { children: "Background" }),
5957
+ CAPTION_BACKGROUND_OPTIONS.map((option) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
5942
5958
  ChromeMenuRadioItem,
5943
5959
  {
5944
5960
  active: snapshot.captionAppearance.background === option.value,
@@ -5979,7 +5995,7 @@ function VerticalVolumeSlider({
5979
5995
  }
5980
5996
  };
5981
5997
  const percentLabel = formatVolumePercent(volume);
5982
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
5998
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
5983
5999
  "div",
5984
6000
  {
5985
6001
  className: "pano-video-volume-popover",
@@ -5993,7 +6009,7 @@ function VerticalVolumeSlider({
5993
6009
  pointerEvents: "auto"
5994
6010
  },
5995
6011
  children: [
5996
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
6012
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
5997
6013
  "span",
5998
6014
  {
5999
6015
  "aria-hidden": true,
@@ -6005,14 +6021,14 @@ function VerticalVolumeSlider({
6005
6021
  children: percentLabel
6006
6022
  }
6007
6023
  ),
6008
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
6024
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
6009
6025
  "div",
6010
6026
  {
6011
6027
  style: {
6012
6028
  paddingBottom: VOLUME_THUMB_SIZE / 2,
6013
6029
  paddingTop: VOLUME_THUMB_SIZE / 2
6014
6030
  },
6015
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
6031
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
6016
6032
  "div",
6017
6033
  {
6018
6034
  "aria-label": "Volume",
@@ -6045,7 +6061,7 @@ function VerticalVolumeSlider({
6045
6061
  },
6046
6062
  tabIndex: 0,
6047
6063
  children: [
6048
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
6064
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
6049
6065
  "div",
6050
6066
  {
6051
6067
  style: {
@@ -6060,7 +6076,7 @@ function VerticalVolumeSlider({
6060
6076
  }
6061
6077
  }
6062
6078
  ),
6063
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
6079
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
6064
6080
  "div",
6065
6081
  {
6066
6082
  style: {
@@ -6119,17 +6135,17 @@ function VolumeControl({
6119
6135
  };
6120
6136
  }, [open, volumeAdjustable]);
6121
6137
  if (!volumeAdjustable) {
6122
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
6138
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
6123
6139
  ChromeButton,
6124
6140
  {
6125
6141
  appearance,
6126
6142
  label: mutedOrSilent ? "Unmute" : "Mute",
6127
6143
  onClick: onToggleMuted,
6128
- children: mutedOrSilent ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Icon, { path: "M3 6.5h2.2L8.5 4v8L5.2 9.5H3zM10.2 6.2l3.2 3.6M13.4 6.2l-3.2 3.6" }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Icon, { path: "M3 6.5h2.2L8.5 4v8L5.2 9.5H3zM10.5 5.5a3 3 0 0 1 0 5" })
6144
+ children: mutedOrSilent ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Icon, { path: "M3 6.5h2.2L8.5 4v8L5.2 9.5H3zM10.2 6.2l3.2 3.6M13.4 6.2l-3.2 3.6" }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Icon, { path: "M3 6.5h2.2L8.5 4v8L5.2 9.5H3zM10.5 5.5a3 3 0 0 1 0 5" })
6129
6145
  }
6130
6146
  );
6131
6147
  }
6132
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
6148
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
6133
6149
  "div",
6134
6150
  {
6135
6151
  "data-pano-video-volume": "",
@@ -6157,7 +6173,7 @@ function VolumeControl({
6157
6173
  },
6158
6174
  ref: rootRef,
6159
6175
  children: [
6160
- open ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
6176
+ open ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
6161
6177
  VerticalVolumeSlider,
6162
6178
  {
6163
6179
  appearance,
@@ -6165,7 +6181,7 @@ function VolumeControl({
6165
6181
  volume: displayVolume
6166
6182
  }
6167
6183
  ) : null,
6168
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
6184
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
6169
6185
  ChromeButton,
6170
6186
  {
6171
6187
  appearance,
@@ -6176,7 +6192,7 @@ function VolumeControl({
6176
6192
  }
6177
6193
  onToggleMuted();
6178
6194
  },
6179
- children: mutedOrSilent ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Icon, { path: "M3 6.5h2.2L8.5 4v8L5.2 9.5H3zM10.2 6.2l3.2 3.6M13.4 6.2l-3.2 3.6" }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Icon, { path: "M3 6.5h2.2L8.5 4v8L5.2 9.5H3zM10.5 5.5a3 3 0 0 1 0 5" })
6195
+ children: mutedOrSilent ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Icon, { path: "M3 6.5h2.2L8.5 4v8L5.2 9.5H3zM10.2 6.2l3.2 3.6M13.4 6.2l-3.2 3.6" }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Icon, { path: "M3 6.5h2.2L8.5 4v8L5.2 9.5H3zM10.5 5.5a3 3 0 0 1 0 5" })
6180
6196
  }
6181
6197
  )
6182
6198
  ]
@@ -6336,7 +6352,7 @@ function PanoVideoControlsHud({
6336
6352
  let menuNode = null;
6337
6353
  switch (menu) {
6338
6354
  case "rate":
6339
- menuNode = /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
6355
+ menuNode = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
6340
6356
  ChromeMenu,
6341
6357
  {
6342
6358
  appearance: resolved,
@@ -6355,7 +6371,7 @@ function PanoVideoControlsHud({
6355
6371
  );
6356
6372
  break;
6357
6373
  case "variant":
6358
- menuNode = /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
6374
+ menuNode = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
6359
6375
  ChromeMenu,
6360
6376
  {
6361
6377
  appearance: resolved,
@@ -6374,7 +6390,7 @@ function PanoVideoControlsHud({
6374
6390
  );
6375
6391
  break;
6376
6392
  case "captions":
6377
- menuNode = /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
6393
+ menuNode = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
6378
6394
  CaptionsMenu,
6379
6395
  {
6380
6396
  appearance: resolved,
@@ -6398,7 +6414,7 @@ function PanoVideoControlsHud({
6398
6414
  );
6399
6415
  break;
6400
6416
  case "more":
6401
- menuNode = /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
6417
+ menuNode = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
6402
6418
  ChromeMenu,
6403
6419
  {
6404
6420
  appearance: resolved,
@@ -6464,9 +6480,9 @@ function PanoVideoControlsHud({
6464
6480
  transition: "opacity 160ms ease",
6465
6481
  zIndex: 2
6466
6482
  };
6467
- const rateButton = /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "pano-video-menu", "data-pano-video-menu": "rate", children: [
6483
+ const rateButton = /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "pano-video-menu", "data-pano-video-menu": "rate", children: [
6468
6484
  !compact && menu === "rate" ? menuNode : null,
6469
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
6485
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
6470
6486
  ChromeButton,
6471
6487
  {
6472
6488
  appearance: resolved,
@@ -6474,13 +6490,13 @@ function PanoVideoControlsHud({
6474
6490
  onClick: () => {
6475
6491
  toggleMenu("rate");
6476
6492
  },
6477
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "pano-video-chrome-label", id: `${barId}-rate-btn`, children: snapshot.playbackRate === 1 ? "1x" : `${snapshot.playbackRate}x` })
6493
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "pano-video-chrome-label", id: `${barId}-rate-btn`, children: snapshot.playbackRate === 1 ? "1x" : `${snapshot.playbackRate}x` })
6478
6494
  }
6479
6495
  )
6480
6496
  ] });
6481
- const variantButton = canSwitchVariant ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "pano-video-menu", "data-pano-video-menu": "variant", children: [
6497
+ const variantButton = canSwitchVariant ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "pano-video-menu", "data-pano-video-menu": "variant", children: [
6482
6498
  !compact && menu === "variant" ? menuNode : null,
6483
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
6499
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
6484
6500
  ChromeButton,
6485
6501
  {
6486
6502
  appearance: resolved,
@@ -6488,13 +6504,13 @@ function PanoVideoControlsHud({
6488
6504
  onClick: () => {
6489
6505
  toggleMenu("variant");
6490
6506
  },
6491
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "pano-video-chrome-label", id: `${barId}-variant-btn`, children: snapshot.variants.find((variant) => variant.id === snapshot.variantId)?.label ?? "Quality" })
6507
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "pano-video-chrome-label", id: `${barId}-variant-btn`, children: snapshot.variants.find((variant) => variant.id === snapshot.variantId)?.label ?? "Quality" })
6492
6508
  }
6493
6509
  )
6494
6510
  ] }) : null;
6495
- const captionsButton = showCaptionsMenu ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "pano-video-menu", "data-pano-video-menu": "captions", children: [
6511
+ const captionsButton = showCaptionsMenu ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "pano-video-menu", "data-pano-video-menu": "captions", children: [
6496
6512
  !compact && menu === "captions" ? menuNode : null,
6497
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
6513
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
6498
6514
  ChromeButton,
6499
6515
  {
6500
6516
  appearance: resolved,
@@ -6502,18 +6518,18 @@ function PanoVideoControlsHud({
6502
6518
  onClick: () => {
6503
6519
  toggleMenu("captions");
6504
6520
  },
6505
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { id: `${barId}-captions-btn`, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Icon, { path: "M2.5 4.5h11v7h-11zM5 7.2h2.4M5 9.2h5.5" }) })
6521
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { id: `${barId}-captions-btn`, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Icon, { path: "M2.5 4.5h11v7h-11zM5 7.2h2.4M5 9.2h5.5" }) })
6506
6522
  }
6507
6523
  )
6508
6524
  ] }) : null;
6509
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
6525
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
6510
6526
  "div",
6511
6527
  {
6512
6528
  className: "pano-video-controls",
6513
6529
  "data-pano-video-controls": "",
6514
6530
  style: barStyle,
6515
6531
  children: [
6516
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
6532
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
6517
6533
  ChromeButton,
6518
6534
  {
6519
6535
  appearance: resolved,
@@ -6521,11 +6537,11 @@ function PanoVideoControlsHud({
6521
6537
  onClick: () => {
6522
6538
  controller.togglePlay();
6523
6539
  },
6524
- children: snapshot.playing ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Icon, { path: "M5 3.5h2.2v9H5zM8.8 3.5H11v9H8.8z" }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Icon, { path: "M5 3.2v9.6L13 8z" })
6540
+ children: snapshot.playing ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Icon, { path: "M5 3.5h2.2v9H5zM8.8 3.5H11v9H8.8z" }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Icon, { path: "M5 3.2v9.6L13 8z" })
6525
6541
  }
6526
6542
  ),
6527
- hideTime ? null : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "pano-video-time", children: formatMediaTime(snapshot.currentTime) }),
6528
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
6543
+ hideTime ? null : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "pano-video-time", children: formatMediaTime(snapshot.currentTime) }),
6544
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
6529
6545
  "input",
6530
6546
  {
6531
6547
  "aria-label": "Seek",
@@ -6547,8 +6563,8 @@ function PanoVideoControlsHud({
6547
6563
  value: duration > 0 ? snapshot.currentTime : 0
6548
6564
  }
6549
6565
  ),
6550
- hideTime ? null : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "pano-video-time", children: formatMediaTime(duration) }),
6551
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
6566
+ hideTime ? null : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "pano-video-time", children: formatMediaTime(duration) }),
6567
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
6552
6568
  VolumeControl,
6553
6569
  {
6554
6570
  appearance: resolved,
@@ -6564,9 +6580,9 @@ function PanoVideoControlsHud({
6564
6580
  volumeAdjustable: snapshot.volumeAdjustable
6565
6581
  }
6566
6582
  ),
6567
- compact ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "pano-video-menu", "data-pano-video-menu": "more", children: [
6583
+ compact ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "pano-video-menu", "data-pano-video-menu": "more", children: [
6568
6584
  menu !== null ? menuNode : null,
6569
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
6585
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
6570
6586
  ChromeButton,
6571
6587
  {
6572
6588
  appearance: resolved,
@@ -6575,15 +6591,15 @@ function PanoVideoControlsHud({
6575
6591
  onClick: () => {
6576
6592
  toggleMenu("more");
6577
6593
  },
6578
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Icon, { path: "M3 8a1 1 0 1 0 2 0 1 1 0 1 0-2 0M7 8a1 1 0 1 0 2 0 1 1 0 1 0-2 0M11 8a1 1 0 1 0 2 0 1 1 0 1 0-2 0" })
6594
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Icon, { path: "M3 8a1 1 0 1 0 2 0 1 1 0 1 0-2 0M7 8a1 1 0 1 0 2 0 1 1 0 1 0-2 0M11 8a1 1 0 1 0 2 0 1 1 0 1 0-2 0" })
6579
6595
  }
6580
6596
  )
6581
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
6597
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
6582
6598
  rateButton,
6583
6599
  variantButton,
6584
6600
  captionsButton
6585
6601
  ] }),
6586
- showFullscreen ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
6602
+ showFullscreen ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
6587
6603
  ChromeButton,
6588
6604
  {
6589
6605
  appearance: resolved,
@@ -6591,7 +6607,7 @@ function PanoVideoControlsHud({
6591
6607
  onClick: () => {
6592
6608
  fullscreen?.toggleFullscreen();
6593
6609
  },
6594
- children: fullscreen?.isFullscreen ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Icon, { path: "M6 3.5H3.5V6M10 3.5h2.5V6M6 12.5H3.5V10M10 12.5h2.5V10" }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Icon, { path: "M3.5 6V3.5H6M10 3.5h2.5V6M3.5 10v2.5H6M10 12.5h2.5V10" })
6610
+ children: fullscreen?.isFullscreen ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Icon, { path: "M6 3.5H3.5V6M10 3.5h2.5V6M6 12.5H3.5V10M10 12.5h2.5V10" }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Icon, { path: "M3.5 6V3.5H6M10 3.5h2.5V6M3.5 10v2.5H6M10 12.5h2.5V10" })
6595
6611
  }
6596
6612
  ) : null
6597
6613
  ]
@@ -6608,7 +6624,7 @@ function PanoVideoControls({ appearance }) {
6608
6624
  }
6609
6625
 
6610
6626
  // src/video/pano-video-chrome-bridge.tsx
6611
- var import_jsx_runtime9 = require("react/jsx-runtime");
6627
+ var import_jsx_runtime8 = require("react/jsx-runtime");
6612
6628
  function PanoVideoChromeBridge({
6613
6629
  fullscreen,
6614
6630
  host,
@@ -6623,8 +6639,8 @@ function PanoVideoChromeBridge({
6623
6639
  return null;
6624
6640
  }
6625
6641
  const showDefaultControls = host.controller !== null && host.controls !== false && host.controlClaims === 0;
6626
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
6627
- showDefaultControls ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
6642
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
6643
+ showDefaultControls ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
6628
6644
  PanoVideoControlsHud,
6629
6645
  {
6630
6646
  appearance: typeof host.controls === "object" ? host.controls : void 0,
@@ -6633,7 +6649,7 @@ function PanoVideoChromeBridge({
6633
6649
  overlayElement
6634
6650
  }
6635
6651
  ) : null,
6636
- host.captions !== false && host.controller ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(PanoVideoCaptionsOverlay, { controller: host.controller }) : null
6652
+ host.captions !== false && host.controller ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(PanoVideoCaptionsOverlay, { controller: host.controller }) : null
6637
6653
  ] });
6638
6654
  }
6639
6655
 
@@ -6786,7 +6802,7 @@ function clamp2(value, min, max) {
6786
6802
  }
6787
6803
 
6788
6804
  // src/webvr/chrome.tsx
6789
- var import_jsx_runtime10 = require("react/jsx-runtime");
6805
+ var import_jsx_runtime9 = require("react/jsx-runtime");
6790
6806
  function resolveAppearance(value) {
6791
6807
  return {
6792
6808
  ...DEFAULT_WEBVR_CHROME_APPEARANCE,
@@ -6798,7 +6814,7 @@ function ChromeButton2({
6798
6814
  children,
6799
6815
  onClick
6800
6816
  }) {
6801
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
6817
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
6802
6818
  "button",
6803
6819
  {
6804
6820
  className: "pano-webvr-button",
@@ -6835,7 +6851,7 @@ function SetupPanel({
6835
6851
  color: appearance.color,
6836
6852
  fontSize: appearance.fontSize
6837
6853
  };
6838
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
6854
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
6839
6855
  "div",
6840
6856
  {
6841
6857
  "aria-label": "Mobile VR setup",
@@ -6843,11 +6859,11 @@ function SetupPanel({
6843
6859
  role: "dialog",
6844
6860
  style: panelStyle,
6845
6861
  children: [
6846
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("h2", { className: "pano-webvr-setup-title", children: appearance.setupTitle ?? "MobileVR Setup" }),
6847
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("label", { className: "pano-webvr-setup-field", children: [
6862
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h2", { className: "pano-webvr-setup-title", children: appearance.setupTitle ?? "MobileVR Setup" }),
6863
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("label", { className: "pano-webvr-setup-field", children: [
6848
6864
  "Screen size (inch)",
6849
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "pano-webvr-setup-row", children: [
6850
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
6865
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "pano-webvr-setup-row", children: [
6866
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
6851
6867
  "button",
6852
6868
  {
6853
6869
  "aria-label": "Decrease screen size",
@@ -6859,8 +6875,8 @@ function SetupPanel({
6859
6875
  children: "\u2039"
6860
6876
  }
6861
6877
  ),
6862
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("strong", { className: "pano-webvr-setup-value", children: settings.screensize === "auto" ? "Auto" : settings.screensize.toFixed(1) }),
6863
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
6878
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("strong", { className: "pano-webvr-setup-value", children: settings.screensize === "auto" ? "Auto" : settings.screensize.toFixed(1) }),
6879
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
6864
6880
  "button",
6865
6881
  {
6866
6882
  "aria-label": "Increase screen size",
@@ -6874,10 +6890,10 @@ function SetupPanel({
6874
6890
  )
6875
6891
  ] })
6876
6892
  ] }),
6877
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("fieldset", { className: "pano-webvr-setup-fieldset", children: [
6878
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("legend", { className: "pano-webvr-setup-legend", children: "VR headset preset" }),
6879
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "pano-webvr-setup-row", children: [
6880
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
6893
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("fieldset", { className: "pano-webvr-setup-fieldset", children: [
6894
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("legend", { className: "pano-webvr-setup-legend", children: "VR headset preset" }),
6895
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "pano-webvr-setup-row", children: [
6896
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
6881
6897
  "button",
6882
6898
  {
6883
6899
  "aria-label": "Previous headset preset",
@@ -6887,8 +6903,8 @@ function SetupPanel({
6887
6903
  children: "\u2039"
6888
6904
  }
6889
6905
  ),
6890
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("strong", { className: "pano-webvr-setup-value-wide", children: WEBVR_PROFILES[settings.profileId].label }),
6891
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
6906
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("strong", { className: "pano-webvr-setup-value-wide", children: WEBVR_PROFILES[settings.profileId].label }),
6907
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
6892
6908
  "button",
6893
6909
  {
6894
6910
  "aria-label": "Next headset preset",
@@ -6900,7 +6916,7 @@ function SetupPanel({
6900
6916
  )
6901
6917
  ] })
6902
6918
  ] }),
6903
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
6919
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
6904
6920
  ChromeButton2,
6905
6921
  {
6906
6922
  appearance,
@@ -6923,9 +6939,9 @@ function WebVRChromeBridge({ host }) {
6923
6939
  return null;
6924
6940
  }
6925
6941
  const appearance = resolveAppearance(chrome);
6926
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
6927
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "pano-webvr-toolbar", children: mode ? /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "pano-webvr-toolbar-actions", children: [
6928
- mode !== "webxr" ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
6942
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
6943
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "pano-webvr-toolbar", children: mode ? /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "pano-webvr-toolbar-actions", children: [
6944
+ mode !== "webxr" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
6929
6945
  ChromeButton2,
6930
6946
  {
6931
6947
  appearance,
@@ -6933,7 +6949,7 @@ function WebVRChromeBridge({ host }) {
6933
6949
  children: "VR Setup"
6934
6950
  }
6935
6951
  ) : null,
6936
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
6952
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
6937
6953
  ChromeButton2,
6938
6954
  {
6939
6955
  appearance,
@@ -6941,7 +6957,7 @@ function WebVRChromeBridge({ host }) {
6941
6957
  children: "Exit VR"
6942
6958
  }
6943
6959
  )
6944
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
6960
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
6945
6961
  ChromeButton2,
6946
6962
  {
6947
6963
  appearance,
@@ -6949,7 +6965,7 @@ function WebVRChromeBridge({ host }) {
6949
6965
  children: available ? "Enter VR" : "VR unavailable"
6950
6966
  }
6951
6967
  ) }),
6952
- mode === "fake" ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
6968
+ mode === "fake" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
6953
6969
  "p",
6954
6970
  {
6955
6971
  className: "pano-webvr-hint",
@@ -6957,7 +6973,7 @@ function WebVRChromeBridge({ host }) {
6957
6973
  children: "Simulated VR Mode \xB7 Click the view to lock the mouse, then move to look around. Use a headset or phone for real VR."
6958
6974
  }
6959
6975
  ) : null,
6960
- setupOpen ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
6976
+ setupOpen ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
6961
6977
  SetupPanel,
6962
6978
  {
6963
6979
  appearance,
@@ -6999,7 +7015,7 @@ var import_fiber9 = require("@react-three/fiber");
6999
7015
  var import_xr2 = require("@react-three/xr");
7000
7016
  var import_react25 = require("react");
7001
7017
  var import_three5 = require("three");
7002
- var import_jsx_runtime11 = require("react/jsx-runtime");
7018
+ var import_jsx_runtime10 = require("react/jsx-runtime");
7003
7019
  function PanoramaXROrigin() {
7004
7020
  const originRef = (0, import_react25.useRef)(null);
7005
7021
  const localHeadPositionRef = (0, import_react25.useRef)(new import_three5.Vector3());
@@ -7015,11 +7031,11 @@ function PanoramaXROrigin() {
7015
7031
  origin.position.copy(localHeadPositionRef.current).multiplyScalar(-1);
7016
7032
  origin.updateMatrixWorld();
7017
7033
  }, -100);
7018
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_xr2.XROrigin, { ref: originRef });
7034
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_xr2.XROrigin, { ref: originRef });
7019
7035
  }
7020
7036
 
7021
7037
  // src/pano-viewer.tsx
7022
- var import_jsx_runtime12 = require("react/jsx-runtime");
7038
+ var import_jsx_runtime11 = require("react/jsx-runtime");
7023
7039
  var DEFAULT_VIEW = {
7024
7040
  yaw: 0,
7025
7041
  pitch: 0,
@@ -7064,7 +7080,7 @@ function PanoCursorTree({
7064
7080
  if (!cursors) {
7065
7081
  return children;
7066
7082
  }
7067
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(PanoCursorController, { cursors, children });
7083
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PanoCursorController, { cursors, children });
7068
7084
  }
7069
7085
  function PanoVideoHostReset() {
7070
7086
  const host = (0, import_react26.useContext)(PanoVideoHostContext);
@@ -7084,10 +7100,10 @@ function DefaultControlChannels({
7084
7100
  if (!claims) {
7085
7101
  return null;
7086
7102
  }
7087
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(DefaultControlChannelContext.Provider, { value: true, children: [
7088
- userControlsEnabled && mouseChannel.mount && claims.mouse === 0 ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(MouseControls, { ...mouseChannel.props, fovSpeed }) : null,
7089
- userControlsEnabled && touchChannel.mount && claims.touch === 0 ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(TouchControls, { ...touchChannel.props }) : null,
7090
- userControlsEnabled && keyboardChannel.mount && claims.keyboard === 0 ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
7103
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(DefaultControlChannelContext.Provider, { value: true, children: [
7104
+ userControlsEnabled && mouseChannel.mount && claims.mouse === 0 ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(MouseControls, { ...mouseChannel.props, fovSpeed }) : null,
7105
+ userControlsEnabled && touchChannel.mount && claims.touch === 0 ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(TouchControls, { ...touchChannel.props }) : null,
7106
+ userControlsEnabled && keyboardChannel.mount && claims.keyboard === 0 ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
7091
7107
  KeyboardControls,
7092
7108
  {
7093
7109
  ...keyboardChannel.props,
@@ -7173,14 +7189,58 @@ var PanoViewer = (0, import_react26.forwardRef)(
7173
7189
  }),
7174
7190
  [bgmHost, videoHost]
7175
7191
  );
7176
- const activateMedia = (0, import_react26.useCallback)(() => {
7177
- setMediaActivated(true);
7192
+ const runMediaActivation = (0, import_react26.useCallback)(() => {
7178
7193
  const resume = mediaActivationControls.resumeAudio();
7179
7194
  mediaActivationOptions?.onActivate?.(mediaActivationControls);
7180
7195
  return resume;
7181
7196
  }, [mediaActivationControls, mediaActivationOptions]);
7197
+ const activateMedia = (0, import_react26.useCallback)(() => {
7198
+ setMediaActivated(true);
7199
+ return runMediaActivation();
7200
+ }, [runMediaActivation]);
7182
7201
  const hasMediaActivationIntent = mediaActivationRevision >= 0 && hasPanoMediaActivationIntent(mediaActivationHost);
7183
- const shouldShowMediaActivation = mediaActivationOptions !== null && hasMediaActivationIntent && !mediaActivated;
7202
+ const shouldActivateMedia = mediaActivationOptions !== null && hasMediaActivationIntent && !mediaActivated;
7203
+ (0, import_react26.useEffect)(() => {
7204
+ if (!shouldActivateMedia) {
7205
+ return;
7206
+ }
7207
+ if (!needsMediaGesture()) {
7208
+ void activateMedia();
7209
+ return;
7210
+ }
7211
+ let cancelled = false;
7212
+ let activating = false;
7213
+ const removeListeners = () => {
7214
+ window.removeEventListener("pointerdown", handleGesture, true);
7215
+ window.removeEventListener("pointerup", handleGesture, true);
7216
+ window.removeEventListener("keydown", handleGesture, true);
7217
+ };
7218
+ const handleGesture = (event) => {
7219
+ if (!isMediaActivationEvent(event) || activating || cancelled) {
7220
+ return;
7221
+ }
7222
+ activating = true;
7223
+ try {
7224
+ const resume = runMediaActivation();
7225
+ void resume.then(() => {
7226
+ if (cancelled || !isPanoAudioUnlocked()) {
7227
+ return;
7228
+ }
7229
+ removeListeners();
7230
+ setMediaActivated(true);
7231
+ });
7232
+ } finally {
7233
+ activating = false;
7234
+ }
7235
+ };
7236
+ window.addEventListener("pointerdown", handleGesture, { capture: true });
7237
+ window.addEventListener("pointerup", handleGesture, { capture: true });
7238
+ window.addEventListener("keydown", handleGesture, { capture: true });
7239
+ return () => {
7240
+ cancelled = true;
7241
+ removeListeners();
7242
+ };
7243
+ }, [activateMedia, runMediaActivation, shouldActivateMedia]);
7184
7244
  const fallbackViewRef = (0, import_react26.useRef)(DEFAULT_VIEW);
7185
7245
  const normalizedMinFov = Math.max(1, Math.min(minFov, maxFov - 1));
7186
7246
  const normalizedMaxFov = Math.min(
@@ -7433,7 +7493,7 @@ var PanoViewer = (0, import_react26.forwardRef)(
7433
7493
  }),
7434
7494
  [style]
7435
7495
  );
7436
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
7496
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
7437
7497
  "div",
7438
7498
  {
7439
7499
  ...divProps,
@@ -7443,7 +7503,7 @@ var PanoViewer = (0, import_react26.forwardRef)(
7443
7503
  "aria-label": ariaLabel,
7444
7504
  style: rootStyle,
7445
7505
  children: [
7446
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
7506
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
7447
7507
  import_fiber10.Canvas,
7448
7508
  {
7449
7509
  "aria-label": `${ariaLabel} canvas`,
@@ -7465,23 +7525,23 @@ var PanoViewer = (0, import_react26.forwardRef)(
7465
7525
  ...DEFAULT_CANVAS_STYLE,
7466
7526
  touchAction: userControlsEnabled ? "none" : "auto"
7467
7527
  },
7468
- children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_xr3.XR, { store: xrStore, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
7528
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_xr3.XR, { store: xrStore, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
7469
7529
  WebVRRuntimeContext.Provider,
7470
7530
  {
7471
7531
  value: { host: webVRHost, xrStore, stereoView },
7472
7532
  children: [
7473
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(PanoramaXROrigin, {}),
7474
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(HotspotAccessibilityContext.Provider, { value: registry, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(HotspotTargetRegistryContext.Provider, { value: hotspotTargetRegistry, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(PanoEventBusContext.Provider, { value: eventBus, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(PanoCursorTree, { cursors: resolvedCursors, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(PanoramaViewContext.Provider, { value: controlsRef, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
7533
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PanoramaXROrigin, {}),
7534
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(HotspotAccessibilityContext.Provider, { value: registry, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(HotspotTargetRegistryContext.Provider, { value: hotspotTargetRegistry, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PanoEventBusContext.Provider, { value: eventBus, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PanoCursorTree, { cursors: resolvedCursors, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PanoramaViewContext.Provider, { value: controlsRef, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
7475
7535
  PanoContextMenuOverlayContext.Provider,
7476
7536
  {
7477
7537
  value: contextMenuOverlayApi,
7478
- children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(PanoChromeOverlayContext.Provider, { value: chromeOverlayApi, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(PanoVideoHostContext.Provider, { value: videoHost, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(PanoFilterHostContext.Provider, { value: filterHost, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
7538
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PanoChromeOverlayContext.Provider, { value: chromeOverlayApi, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PanoVideoHostContext.Provider, { value: videoHost, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PanoFilterHostContext.Provider, { value: filterHost, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
7479
7539
  PanoContextMenuActionsContext.Provider,
7480
7540
  {
7481
7541
  value: contextMenuActions,
7482
- children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ScenesHostContext.Provider, { value: scenesHost, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(BackgroundAudioHostContext.Provider, { value: bgmHost, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(PanoMediaActivationHostContext.Provider, { value: mediaActivationHost, children: [
7483
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(PanoVideoHostReset, {}),
7484
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
7542
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ScenesHostContext.Provider, { value: scenesHost, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(BackgroundAudioHostContext.Provider, { value: bgmHost, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(PanoMediaActivationHostContext.Provider, { value: mediaActivationHost, children: [
7543
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PanoVideoHostReset, {}),
7544
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
7485
7545
  PanoramaViewRuntime,
7486
7546
  {
7487
7547
  ref: controlsRef,
@@ -7492,7 +7552,7 @@ var PanoViewer = (0, import_react26.forwardRef)(
7492
7552
  options: controlOptions
7493
7553
  }
7494
7554
  ),
7495
- (onViewChange || onPanoramaClick || onPanoramaDoubleClick || onPanoramaPointerMove) && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
7555
+ (onViewChange || onPanoramaClick || onPanoramaDoubleClick || onPanoramaPointerMove) && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
7496
7556
  PanoEvents,
7497
7557
  {
7498
7558
  onViewChange,
@@ -7501,18 +7561,18 @@ var PanoViewer = (0, import_react26.forwardRef)(
7501
7561
  onPointerMove: onPanoramaPointerMove
7502
7562
  }
7503
7563
  ),
7504
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
7564
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
7505
7565
  AutoRotate,
7506
7566
  {
7507
7567
  enabled: legacyAutoRotate,
7508
7568
  speed: legacyAutoRotateOptions.autoRotateSpeed
7509
7569
  }
7510
7570
  ),
7511
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(PanoramaEventSurface, {}),
7512
- contextMenuChannel.mount ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(PanoContextMenu, { ...contextMenuChannel.props }) : null,
7513
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(ControlClaimsContext.Provider, { value: controlClaims, children: [
7571
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PanoramaEventSurface, {}),
7572
+ contextMenuChannel.mount ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PanoContextMenu, { ...contextMenuChannel.props }) : null,
7573
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(ControlClaimsContext.Provider, { value: controlClaims, children: [
7514
7574
  children,
7515
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
7575
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
7516
7576
  DefaultControlChannels,
7517
7577
  {
7518
7578
  fovSpeed: controlOptions.fovSpeed,
@@ -7533,14 +7593,14 @@ var PanoViewer = (0, import_react26.forwardRef)(
7533
7593
  ) })
7534
7594
  }
7535
7595
  ),
7536
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
7596
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
7537
7597
  "div",
7538
7598
  {
7539
7599
  className: "pano-chrome-overlay",
7540
7600
  "data-pano-chrome-overlay": "",
7541
7601
  ref: setOverlayNode,
7542
7602
  children: [
7543
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
7603
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
7544
7604
  PanoVideoChromeBridge,
7545
7605
  {
7546
7606
  fullscreen: contextMenuActions,
@@ -7548,21 +7608,12 @@ var PanoViewer = (0, import_react26.forwardRef)(
7548
7608
  overlayElement
7549
7609
  }
7550
7610
  ),
7551
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(WebVRChromeBridge, { host: webVRHost })
7611
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(WebVRChromeBridge, { host: webVRHost })
7552
7612
  ]
7553
7613
  }
7554
7614
  ),
7555
7615
  contextMenuOverlay,
7556
- hotspotAccessibilityControls,
7557
- shouldShowMediaActivation ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
7558
- PanoMediaActivationOverlay,
7559
- {
7560
- ...mediaActivationOptions,
7561
- onActivate: () => {
7562
- void activateMedia();
7563
- }
7564
- }
7565
- ) : null
7616
+ hotspotAccessibilityControls
7566
7617
  ]
7567
7618
  }
7568
7619
  );
@@ -8470,7 +8521,7 @@ async function detectWebVRCapabilities() {
8470
8521
  var import_fiber12 = require("@react-three/fiber");
8471
8522
  var import_react30 = require("react");
8472
8523
  var import_three8 = require("three");
8473
- var import_jsx_runtime13 = require("react/jsx-runtime");
8524
+ var import_jsx_runtime12 = require("react/jsx-runtime");
8474
8525
  var CENTER_NDC = new import_three8.Vector2(0, 0);
8475
8526
  var HUD_DISTANCE = 2;
8476
8527
  var RETICLE_SCALE = 1;
@@ -8630,7 +8681,7 @@ function WebVRReticle({
8630
8681
  group.quaternion.copy(activeCamera.quaternion);
8631
8682
  group.scale.setScalar(RETICLE_SCALE);
8632
8683
  });
8633
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
8684
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
8634
8685
  "group",
8635
8686
  {
8636
8687
  frustumCulled: false,
@@ -8638,15 +8689,15 @@ function WebVRReticle({
8638
8689
  renderOrder: RETICLE_RENDER_ORDER,
8639
8690
  visible,
8640
8691
  children: [
8641
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
8692
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
8642
8693
  "mesh",
8643
8694
  {
8644
8695
  frustumCulled: false,
8645
8696
  raycast: noopRaycast,
8646
8697
  renderOrder: RETICLE_RENDER_ORDER + 1,
8647
8698
  children: [
8648
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("boxGeometry", { args: [CROSSHAIR_LENGTH, CROSSHAIR_THICKNESS, 1e-3] }),
8649
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
8699
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("boxGeometry", { args: [CROSSHAIR_LENGTH, CROSSHAIR_THICKNESS, 1e-3] }),
8700
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
8650
8701
  "meshBasicMaterial",
8651
8702
  {
8652
8703
  color: "#ffffff",
@@ -8659,15 +8710,15 @@ function WebVRReticle({
8659
8710
  ]
8660
8711
  }
8661
8712
  ),
8662
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
8713
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
8663
8714
  "mesh",
8664
8715
  {
8665
8716
  frustumCulled: false,
8666
8717
  raycast: noopRaycast,
8667
8718
  renderOrder: RETICLE_RENDER_ORDER + 1,
8668
8719
  children: [
8669
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("boxGeometry", { args: [CROSSHAIR_THICKNESS, CROSSHAIR_LENGTH, 1e-3] }),
8670
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
8720
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("boxGeometry", { args: [CROSSHAIR_THICKNESS, CROSSHAIR_LENGTH, 1e-3] }),
8721
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
8671
8722
  "meshBasicMaterial",
8672
8723
  {
8673
8724
  color: "#ffffff",
@@ -8680,7 +8731,7 @@ function WebVRReticle({
8680
8731
  ]
8681
8732
  }
8682
8733
  ),
8683
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
8734
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
8684
8735
  "mesh",
8685
8736
  {
8686
8737
  frustumCulled: false,
@@ -8689,7 +8740,7 @@ function WebVRReticle({
8689
8740
  renderOrder: RETICLE_RENDER_ORDER + 2,
8690
8741
  visible: false,
8691
8742
  children: [
8692
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
8743
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
8693
8744
  "ringGeometry",
8694
8745
  {
8695
8746
  args: [
@@ -8702,7 +8753,7 @@ function WebVRReticle({
8702
8753
  ]
8703
8754
  }
8704
8755
  ),
8705
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
8756
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
8706
8757
  "meshBasicMaterial",
8707
8758
  {
8708
8759
  color: "#ffffff",
@@ -9143,7 +9194,7 @@ function useWebVRWakeLock(enabled) {
9143
9194
  }
9144
9195
 
9145
9196
  // src/webvr/webvr.tsx
9146
- var import_jsx_runtime14 = require("react/jsx-runtime");
9197
+ var import_jsx_runtime13 = require("react/jsx-runtime");
9147
9198
  function initializeSettings(screensize, profile) {
9148
9199
  const stored = loadWebVRSettings();
9149
9200
  return {
@@ -9476,8 +9527,8 @@ var WebVR = (0, import_react34.forwardRef)(function WebVR2({
9476
9527
  useWebVRWakeLock(
9477
9528
  wakelock && (mode === "mobilevr" || mode === "fake")
9478
9529
  );
9479
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
9480
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
9530
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
9531
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
9481
9532
  Gyro,
9482
9533
  {
9483
9534
  ref: gyroRef,
@@ -9491,7 +9542,7 @@ var WebVR = (0, import_react34.forwardRef)(function WebVR2({
9491
9542
  touchMode: "off"
9492
9543
  }
9493
9544
  ),
9494
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
9545
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
9495
9546
  WebVRStereoRenderer,
9496
9547
  {
9497
9548
  mode,
@@ -9499,7 +9550,7 @@ var WebVR = (0, import_react34.forwardRef)(function WebVR2({
9499
9550
  screensize: settings.screensize
9500
9551
  }
9501
9552
  ),
9502
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
9553
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
9503
9554
  WebVRReticle,
9504
9555
  {
9505
9556
  dwellMs: cursorDwellMs,
@@ -9775,7 +9826,7 @@ diffuseColor.rgb = mix(diffuseColor.rgb, applyPanoFilter(diffuseColor.rgb), clam
9775
9826
  }
9776
9827
 
9777
9828
  // src/pano-filter/pano-basic-material.tsx
9778
- var import_jsx_runtime15 = require("react/jsx-runtime");
9829
+ var import_jsx_runtime14 = require("react/jsx-runtime");
9779
9830
  function PanoBasicMaterial({
9780
9831
  map,
9781
9832
  side,
@@ -9822,7 +9873,7 @@ function PanoBasicMaterial({
9822
9873
  intensityUniformRef.current.value = snapshot.intensity;
9823
9874
  }
9824
9875
  }, [snapshot.intensity]);
9825
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
9876
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
9826
9877
  "meshBasicMaterial",
9827
9878
  {
9828
9879
  ref: materialRef,
@@ -9838,7 +9889,7 @@ function PanoBasicMaterial({
9838
9889
  }
9839
9890
 
9840
9891
  // src/sphere.tsx
9841
- var import_jsx_runtime16 = require("react/jsx-runtime");
9892
+ var import_jsx_runtime15 = require("react/jsx-runtime");
9842
9893
  function useEquirectTexture(url, anisotropy, generateMipmaps, onLoad, onError) {
9843
9894
  const [texture, setTexture] = (0, import_react37.useState)(null);
9844
9895
  const onLoadRef = (0, import_react37.useRef)(onLoad);
@@ -9937,14 +9988,14 @@ function Sphere({
9937
9988
  if (!displayTexture) {
9938
9989
  return null;
9939
9990
  }
9940
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
9991
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
9941
9992
  "mesh",
9942
9993
  {
9943
9994
  rotation: [0, import_three10.MathUtils.degToRad(90 + yawOffset), 0],
9944
9995
  visible,
9945
9996
  children: [
9946
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("sphereGeometry", { args: [DEFAULT_PANORAMA_RADIUS, 128, 64] }),
9947
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
9997
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("sphereGeometry", { args: [DEFAULT_PANORAMA_RADIUS, 128, 64] }),
9998
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
9948
9999
  PanoBasicMaterial,
9949
10000
  {
9950
10001
  map: displayTexture,
@@ -9961,7 +10012,7 @@ function Sphere({
9961
10012
  var import_fiber16 = require("@react-three/fiber");
9962
10013
  var import_react38 = require("react");
9963
10014
  var import_three11 = require("three");
9964
- var import_jsx_runtime17 = require("react/jsx-runtime");
10015
+ var import_jsx_runtime16 = require("react/jsx-runtime");
9965
10016
  var EMPTY_TRACKS = [];
9966
10017
  var EMPTY_RATES = DEFAULT_PANO_VIDEO_PLAYBACK_RATES;
9967
10018
  function createEmptySnapshot() {
@@ -10675,15 +10726,15 @@ function PanoVideo({
10675
10726
  if (variants.length === 0) {
10676
10727
  return null;
10677
10728
  }
10678
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
10679
- activeTexture ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
10729
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
10730
+ activeTexture ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
10680
10731
  "mesh",
10681
10732
  {
10682
10733
  rotation: [0, import_three11.MathUtils.degToRad(90 + yawOffset), 0],
10683
10734
  visible,
10684
10735
  children: [
10685
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("sphereGeometry", { args: [DEFAULT_PANORAMA_RADIUS, 128, 64] }),
10686
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
10736
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("sphereGeometry", { args: [DEFAULT_PANORAMA_RADIUS, 128, 64] }),
10737
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
10687
10738
  PanoBasicMaterial,
10688
10739
  {
10689
10740
  map: activeTexture,
@@ -10694,7 +10745,7 @@ function PanoVideo({
10694
10745
  ]
10695
10746
  }
10696
10747
  ) : null,
10697
- captionsEnabled ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(PanoVideoCaptions, { appearance: typeof captions === "object" ? captions : void 0 }) : null
10748
+ captionsEnabled ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(PanoVideoCaptions, { appearance: typeof captions === "object" ? captions : void 0 }) : null
10698
10749
  ] });
10699
10750
  }
10700
10751
 
@@ -10806,7 +10857,7 @@ function overlayProgress(elapsedTime, duration, startTime) {
10806
10857
  }
10807
10858
 
10808
10859
  // src/scene-transitions/particle-overlay.tsx
10809
- var import_jsx_runtime18 = require("react/jsx-runtime");
10860
+ var import_jsx_runtime17 = require("react/jsx-runtime");
10810
10861
  var PARTICLE_GRID = 48;
10811
10862
  var PARTICLE_COUNT = PARTICLE_GRID * PARTICLE_GRID;
10812
10863
  var PARTICLE_VERTEX_SHADER = `
@@ -10928,7 +10979,7 @@ function ParticleOverlay({
10928
10979
  onFinish();
10929
10980
  }
10930
10981
  });
10931
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
10982
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
10932
10983
  "mesh",
10933
10984
  {
10934
10985
  ref: meshRef,
@@ -11222,7 +11273,7 @@ function createSnapshotMaterial(preset, texture) {
11222
11273
  }
11223
11274
 
11224
11275
  // src/scene-transitions/snapshot-overlay.tsx
11225
- var import_jsx_runtime19 = require("react/jsx-runtime");
11276
+ var import_jsx_runtime18 = require("react/jsx-runtime");
11226
11277
  function SnapshotOverlay({
11227
11278
  snapshot,
11228
11279
  transition,
@@ -11271,21 +11322,21 @@ function SnapshotOverlay({
11271
11322
  if (!material) {
11272
11323
  return null;
11273
11324
  }
11274
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("mesh", { ref: meshRef, renderOrder: OVERLAY_RENDER_ORDER, frustumCulled: false, children: [
11275
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("primitive", { attach: "geometry", object: FULLSCREEN_PLANE }),
11276
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("primitive", { attach: "material", object: material })
11325
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("mesh", { ref: meshRef, renderOrder: OVERLAY_RENDER_ORDER, frustumCulled: false, children: [
11326
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("primitive", { attach: "geometry", object: FULLSCREEN_PLANE }),
11327
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("primitive", { attach: "material", object: material })
11277
11328
  ] });
11278
11329
  }
11279
11330
 
11280
11331
  // src/scene-transitions/transition-overlay.tsx
11281
- var import_jsx_runtime20 = require("react/jsx-runtime");
11332
+ var import_jsx_runtime19 = require("react/jsx-runtime");
11282
11333
  function TransitionOverlay(props) {
11283
11334
  const { preset } = props.transition;
11284
11335
  switch (preset) {
11285
11336
  case "none":
11286
11337
  return null;
11287
11338
  case "particles":
11288
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ParticleOverlay, { ...props });
11339
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ParticleOverlay, { ...props });
11289
11340
  case "crossfade":
11290
11341
  case "zoom":
11291
11342
  case "blackout":
@@ -11313,7 +11364,7 @@ function TransitionOverlay(props) {
11313
11364
  case "zoomBlur":
11314
11365
  case "hexDissolve":
11315
11366
  case "filmBurn":
11316
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(SnapshotOverlay, { ...props });
11367
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(SnapshotOverlay, { ...props });
11317
11368
  default: {
11318
11369
  const exhaustive = preset;
11319
11370
  void exhaustive;
@@ -11548,7 +11599,7 @@ var TileTextureManager = class {
11548
11599
  };
11549
11600
 
11550
11601
  // src/tile/texture-manager-context.tsx
11551
- var import_jsx_runtime21 = require("react/jsx-runtime");
11602
+ var import_jsx_runtime20 = require("react/jsx-runtime");
11552
11603
  var TileTextureManagerContext = (0, import_react41.createContext)(
11553
11604
  null
11554
11605
  );
@@ -11572,7 +11623,7 @@ function TileTextureManagerProvider({
11572
11623
  manager.resume();
11573
11624
  return () => manager.dispose();
11574
11625
  }, [manager]);
11575
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TileTextureManagerContext.Provider, { value: manager, children });
11626
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(TileTextureManagerContext.Provider, { value: manager, children });
11576
11627
  }
11577
11628
  function useSharedTileTextureManager() {
11578
11629
  return (0, import_react41.useContext)(TileTextureManagerContext);
@@ -11760,7 +11811,7 @@ function resolveTemplateUrl(template, address) {
11760
11811
  }
11761
11812
 
11762
11813
  // src/tile/tile.tsx
11763
- var import_jsx_runtime22 = require("react/jsx-runtime");
11814
+ var import_jsx_runtime21 = require("react/jsx-runtime");
11764
11815
  var MAX_LOD_UPDATE_INTERVAL_MS = 100;
11765
11816
  var FAST_ROTATION_THRESHOLD_RADIANS = Math.PI / 180;
11766
11817
  var FAST_FOV_THRESHOLD_DEGREES = 0.5;
@@ -11847,14 +11898,14 @@ function PreviewFace({
11847
11898
  [geometry]
11848
11899
  );
11849
11900
  const transform = getFaceTransform(face, PREVIEW_RADIUS);
11850
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
11901
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
11851
11902
  "mesh",
11852
11903
  {
11853
11904
  geometry,
11854
11905
  position: transform.position,
11855
11906
  renderOrder: -100,
11856
11907
  rotation: transform.rotation,
11857
- children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
11908
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
11858
11909
  PanoBasicMaterial,
11859
11910
  {
11860
11911
  depthTest: false,
@@ -11870,7 +11921,7 @@ function PreviewCube({
11870
11921
  texture,
11871
11922
  faceOrder
11872
11923
  }) {
11873
- return CUBE_FACES.map((face) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
11924
+ return CUBE_FACES.map((face) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
11874
11925
  PreviewFace,
11875
11926
  {
11876
11927
  face,
@@ -11915,14 +11966,14 @@ var TileMesh = (0, import_react42.memo)(function TileMesh2({
11915
11966
  if (!snapshot.texture) {
11916
11967
  return null;
11917
11968
  }
11918
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("group", { position: transform.position, rotation: transform.rotation, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
11969
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("group", { position: transform.position, rotation: transform.rotation, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
11919
11970
  "mesh",
11920
11971
  {
11921
11972
  geometry: SHARED_TILE_GEOMETRY,
11922
11973
  position: [layout.x, layout.y, 0],
11923
11974
  renderOrder,
11924
11975
  scale: [layout.width, layout.height, 1],
11925
- children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
11976
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
11926
11977
  PanoBasicMaterial,
11927
11978
  {
11928
11979
  depthTest: false,
@@ -11939,7 +11990,7 @@ var TileLayerMeshes = (0, import_react42.memo)(function TileLayerMeshes2({
11939
11990
  manager,
11940
11991
  resolveUrl
11941
11992
  }) {
11942
- return layer.addresses.map((address) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
11993
+ return layer.addresses.map((address) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
11943
11994
  TileMesh,
11944
11995
  {
11945
11996
  address,
@@ -12276,15 +12327,15 @@ function Tile({
12276
12327
  };
12277
12328
  commitLayers(nextLayers);
12278
12329
  });
12279
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("group", { visible, children: [
12280
- previewTexture ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
12330
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("group", { visible, children: [
12331
+ previewTexture ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
12281
12332
  PreviewCube,
12282
12333
  {
12283
12334
  texture: previewTexture,
12284
12335
  faceOrder: previewFaceOrder
12285
12336
  }
12286
12337
  ) : null,
12287
- layers.map((layer) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
12338
+ layers.map((layer) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
12288
12339
  TileLayerMeshes,
12289
12340
  {
12290
12341
  layer,
@@ -12297,7 +12348,7 @@ function Tile({
12297
12348
  }
12298
12349
 
12299
12350
  // src/scenes.tsx
12300
- var import_jsx_runtime23 = require("react/jsx-runtime");
12351
+ var import_jsx_runtime22 = require("react/jsx-runtime");
12301
12352
  function SceneSource({
12302
12353
  scene,
12303
12354
  visible,
@@ -12310,7 +12361,7 @@ function SceneSource({
12310
12361
  }
12311
12362
  switch (scene.type) {
12312
12363
  case "sphere":
12313
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
12364
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
12314
12365
  Sphere,
12315
12366
  {
12316
12367
  src: scene.src,
@@ -12323,7 +12374,7 @@ function SceneSource({
12323
12374
  );
12324
12375
  case "tile": {
12325
12376
  const { id: _id, type: _type, ...tileProps } = scene;
12326
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
12377
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
12327
12378
  Tile,
12328
12379
  {
12329
12380
  ...tileProps,
@@ -12590,8 +12641,8 @@ function ScenesController({
12590
12641
  }, [gl, manager, releaseInteraction, snapshot]);
12591
12642
  const renderedScene = slots[liveSlot];
12592
12643
  const snapshotVisible = snapshot !== null && (phase === "transitioning" || phase === "recapturing" || phase === "preloading");
12593
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Fragment, { children: [
12594
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
12644
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_react43.Fragment, { children: [
12645
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
12595
12646
  SnapshotCapture,
12596
12647
  {
12597
12648
  requestId: captureRequestId,
@@ -12603,7 +12654,7 @@ function ScenesController({
12603
12654
  const source = slots[slot];
12604
12655
  const isLive = slot === liveSlot;
12605
12656
  const isPending = slot === pendingSlot;
12606
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
12657
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
12607
12658
  SceneSource,
12608
12659
  {
12609
12660
  scene: source,
@@ -12619,7 +12670,7 @@ function ScenesController({
12619
12670
  `${slot}:${source?.id ?? "empty"}:${recoveryKey}`
12620
12671
  );
12621
12672
  }),
12622
- snapshotVisible ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
12673
+ snapshotVisible ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
12623
12674
  TransitionOverlay,
12624
12675
  {
12625
12676
  snapshot,
@@ -12712,12 +12763,12 @@ function Scenes({
12712
12763
  }
12713
12764
  };
12714
12765
  }, [host, requestSceneChange]);
12715
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
12766
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
12716
12767
  TileTextureManagerProvider,
12717
12768
  {
12718
12769
  maxTextureMemoryMb,
12719
12770
  maxConcurrentLoads: maxConcurrentTileLoads,
12720
- children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
12771
+ children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
12721
12772
  ScenesController,
12722
12773
  {
12723
12774
  ...rest,
@@ -12746,7 +12797,7 @@ var import_react45 = require("react");
12746
12797
  // src/webvr/stereo-html.tsx
12747
12798
  var import_drei = require("@react-three/drei");
12748
12799
  var import_react44 = require("react");
12749
- var import_jsx_runtime24 = require("react/jsx-runtime");
12800
+ var import_jsx_runtime23 = require("react/jsx-runtime");
12750
12801
  function useFallbackStereoView() {
12751
12802
  const runtime = (0, import_react44.useContext)(WebVRRuntimeContext);
12752
12803
  const host = runtime?.host ?? null;
@@ -12771,10 +12822,10 @@ function stereoCalculatePosition(eye, stereoView) {
12771
12822
  function PanoHtml({ children, ...htmlProps }) {
12772
12823
  const stereoView = useFallbackStereoView();
12773
12824
  if (!stereoView) {
12774
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_drei.Html, { ...htmlProps, children });
12825
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_drei.Html, { ...htmlProps, children });
12775
12826
  }
12776
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
12777
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
12827
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
12828
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
12778
12829
  import_drei.Html,
12779
12830
  {
12780
12831
  ...htmlProps,
@@ -12782,7 +12833,7 @@ function PanoHtml({ children, ...htmlProps }) {
12782
12833
  children
12783
12834
  }
12784
12835
  ),
12785
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
12836
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
12786
12837
  import_drei.Html,
12787
12838
  {
12788
12839
  ...htmlProps,
@@ -12795,7 +12846,7 @@ function PanoHtml({ children, ...htmlProps }) {
12795
12846
  }
12796
12847
 
12797
12848
  // src/hotspot/hotspot-tooltip.tsx
12798
- var import_jsx_runtime25 = require("react/jsx-runtime");
12849
+ var import_jsx_runtime24 = require("react/jsx-runtime");
12799
12850
  var DEFAULT_HOTSPOT_TOOLTIP_OFFSET = 12;
12800
12851
  var DEFAULT_HOTSPOT_TOOLTIP_APPEARANCE = {
12801
12852
  background: "rgba(22, 22, 22, 0.72)",
@@ -12892,14 +12943,14 @@ function HotspotTooltip({
12892
12943
  if (!showImage && !content.text) {
12893
12944
  return null;
12894
12945
  }
12895
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(PanoHtml, { pointerEvents: "none", style: WRAPPER_STYLE, zIndexRange: [20, 10], children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
12946
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(PanoHtml, { pointerEvents: "none", style: WRAPPER_STYLE, zIndexRange: [20, 10], children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
12896
12947
  "div",
12897
12948
  {
12898
12949
  className: "pano-hotspot-tooltip",
12899
12950
  role: "tooltip",
12900
12951
  style: bubbleStyle,
12901
12952
  children: [
12902
- showImage ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
12953
+ showImage ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
12903
12954
  "img",
12904
12955
  {
12905
12956
  alt: content.imageAlt ?? content.text ?? "",
@@ -12908,14 +12959,14 @@ function HotspotTooltip({
12908
12959
  src: content.image
12909
12960
  }
12910
12961
  ) : null,
12911
- content.text ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "pano-hotspot-tooltip-text", children: content.text }) : null
12962
+ content.text ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "pano-hotspot-tooltip-text", children: content.text }) : null
12912
12963
  ]
12913
12964
  }
12914
12965
  ) });
12915
12966
  }
12916
12967
 
12917
12968
  // src/hotspot/hotspot-anchor.tsx
12918
- var import_jsx_runtime26 = require("react/jsx-runtime");
12969
+ var import_jsx_runtime25 = require("react/jsx-runtime");
12919
12970
  var DEFAULT_FLOATING_DISTANCE = 10;
12920
12971
  var PANORAMA_RADIUS = DEFAULT_PANORAMA_RADIUS;
12921
12972
  var PANORAMA_SURFACE_INSET = 4;
@@ -13485,7 +13536,7 @@ function HotspotAnchor({
13485
13536
  setHovered(true);
13486
13537
  }
13487
13538
  };
13488
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
13539
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
13489
13540
  "group",
13490
13541
  {
13491
13542
  ref: groupRef,
@@ -13562,18 +13613,18 @@ function HotspotAnchor({
13562
13613
  } : void 0,
13563
13614
  onPointerUp: acceptsPointer ? (event) => releasePointer(event, true) : void 0,
13564
13615
  children: [
13565
- focused ? focusContent ?? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
13616
+ focused ? focusContent ?? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
13566
13617
  "lineSegments",
13567
13618
  {
13568
13619
  geometry: focusGeometry,
13569
13620
  position: [0, 0, 0.01],
13570
13621
  renderOrder: renderOrder + 1,
13571
13622
  scale: [1.12, 1.12, 1],
13572
- children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("lineBasicMaterial", { color: "#f5fbfc", depthTest: false })
13623
+ children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("lineBasicMaterial", { color: "#f5fbfc", depthTest: false })
13573
13624
  }
13574
13625
  ) : null,
13575
13626
  children,
13576
- tooltipOpen && tooltipContent ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("group", { ref: tooltipAnchorRef, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
13627
+ tooltipOpen && tooltipContent ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("group", { ref: tooltipAnchorRef, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
13577
13628
  HotspotTooltip,
13578
13629
  {
13579
13630
  appearance: tooltipAppearance,
@@ -13589,7 +13640,7 @@ function HotspotAnchor({
13589
13640
 
13590
13641
  // src/hotspot/hotspot-plane.tsx
13591
13642
  var import_three21 = require("three");
13592
- var import_jsx_runtime27 = require("react/jsx-runtime");
13643
+ var import_jsx_runtime26 = require("react/jsx-runtime");
13593
13644
  var HOTSPOT_ALPHA_CUTOFF = 0.05;
13594
13645
  var SAMPLE_UV = new import_three21.Vector2();
13595
13646
  var RAYCAST_HITS = [];
@@ -13691,9 +13742,9 @@ function HotspotPlane({
13691
13742
  map,
13692
13743
  opacity
13693
13744
  }) {
13694
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("mesh", { raycast: hotspotPlaneRaycast, children: [
13695
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("planeGeometry", { args: [1, 1] }),
13696
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
13745
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("mesh", { raycast: hotspotPlaneRaycast, children: [
13746
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("planeGeometry", { args: [1, 1] }),
13747
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
13697
13748
  "meshBasicMaterial",
13698
13749
  {
13699
13750
  alphaTest: HOTSPOT_ALPHA_CUTOFF,
@@ -13709,7 +13760,7 @@ function HotspotPlane({
13709
13760
  }
13710
13761
 
13711
13762
  // src/hotspot/image-hotspot.tsx
13712
- var import_jsx_runtime28 = require("react/jsx-runtime");
13763
+ var import_jsx_runtime27 = require("react/jsx-runtime");
13713
13764
  function useHotspotImageTexture(src, onLoad, onError) {
13714
13765
  const gl = (0, import_fiber23.useThree)((state) => state.gl);
13715
13766
  const [texture, setTexture] = (0, import_react47.useState)(null);
@@ -13773,7 +13824,7 @@ function ImageHotspot({
13773
13824
  ...anchorProps
13774
13825
  }) {
13775
13826
  const texture = useHotspotImageTexture(src, onLoad, onError);
13776
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(HotspotAnchor, { ...anchorProps, height, width, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(HotspotPlane, { map: texture, opacity }) });
13827
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(HotspotAnchor, { ...anchorProps, height, width, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(HotspotPlane, { map: texture, opacity }) });
13777
13828
  }
13778
13829
 
13779
13830
  // src/hotspot/polygon-hotspot.tsx
@@ -13785,7 +13836,7 @@ var import_drei2 = require("@react-three/drei");
13785
13836
  var import_fiber24 = require("@react-three/fiber");
13786
13837
  var import_react48 = require("react");
13787
13838
  var import_three23 = require("three");
13788
- var import_jsx_runtime29 = require("react/jsx-runtime");
13839
+ var import_jsx_runtime28 = require("react/jsx-runtime");
13789
13840
  var LINE_WORLD_POSITION = new import_three23.Vector3();
13790
13841
  function applyScreenSpaceDashScale(object, camera, viewportHeight) {
13791
13842
  const material = object?.material;
@@ -13831,7 +13882,7 @@ function HotspotStrokeLine({
13831
13882
  }
13832
13883
  applyScreenSpaceDashScale(lineRef.current, state.camera, state.size.height);
13833
13884
  });
13834
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
13885
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
13835
13886
  import_drei2.Line,
13836
13887
  {
13837
13888
  ref: lineRef,
@@ -13853,7 +13904,7 @@ function HotspotStrokeLine({
13853
13904
  }
13854
13905
 
13855
13906
  // src/hotspot/polygon-hotspot.tsx
13856
- var import_jsx_runtime30 = require("react/jsx-runtime");
13907
+ var import_jsx_runtime29 = require("react/jsx-runtime");
13857
13908
  var POLYGON_RADIUS = 990;
13858
13909
  var MAX_FILL_SEGMENT_DEGREES = 7;
13859
13910
  function cloneVertices(vertices) {
@@ -14141,7 +14192,7 @@ function PolygonHotspot({
14141
14192
  startPosition: event.startPosition
14142
14193
  });
14143
14194
  };
14144
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
14195
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
14145
14196
  HotspotAnchor,
14146
14197
  {
14147
14198
  ...anchorProps,
@@ -14156,7 +14207,7 @@ function PolygonHotspot({
14156
14207
  draggable,
14157
14208
  interactive,
14158
14209
  useAngularScale: false,
14159
- focusContent: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
14210
+ focusContent: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
14160
14211
  HotspotStrokeLine,
14161
14212
  {
14162
14213
  color: "#75cbd3",
@@ -14178,7 +14229,7 @@ function PolygonHotspot({
14178
14229
  startVerticesRef.current = null;
14179
14230
  },
14180
14231
  children: [
14181
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("mesh", { geometry: fillGeometry, renderOrder, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
14232
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("mesh", { geometry: fillGeometry, renderOrder, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
14182
14233
  "meshBasicMaterial",
14183
14234
  {
14184
14235
  color: fill,
@@ -14188,7 +14239,7 @@ function PolygonHotspot({
14188
14239
  transparent: true
14189
14240
  }
14190
14241
  ) }),
14191
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
14242
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
14192
14243
  HotspotStrokeLine,
14193
14244
  {
14194
14245
  color: stroke,
@@ -14208,7 +14259,7 @@ function PolygonHotspot({
14208
14259
  // src/hotspot/polyline-hotspot.tsx
14209
14260
  var import_react50 = require("react");
14210
14261
  var import_three25 = require("three");
14211
- var import_jsx_runtime31 = require("react/jsx-runtime");
14262
+ var import_jsx_runtime30 = require("react/jsx-runtime");
14212
14263
  var POLYLINE_RADIUS = 990;
14213
14264
  var MAX_SEGMENT_DEGREES = 7;
14214
14265
  function cloneVertices2(vertices) {
@@ -14348,7 +14399,7 @@ function PolylineHotspot({
14348
14399
  startPosition: event.startPosition
14349
14400
  });
14350
14401
  };
14351
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
14402
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
14352
14403
  HotspotAnchor,
14353
14404
  {
14354
14405
  ...anchorProps,
@@ -14362,7 +14413,7 @@ function PolylineHotspot({
14362
14413
  renderOrder,
14363
14414
  draggable,
14364
14415
  useAngularScale: false,
14365
- focusContent: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
14416
+ focusContent: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
14366
14417
  HotspotStrokeLine,
14367
14418
  {
14368
14419
  color: "#75cbd3",
@@ -14383,7 +14434,7 @@ function PolylineHotspot({
14383
14434
  emitVerticesChange(event, onDragEnd);
14384
14435
  startVerticesRef.current = null;
14385
14436
  },
14386
- children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
14437
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
14387
14438
  HotspotStrokeLine,
14388
14439
  {
14389
14440
  color: stroke,
@@ -14402,7 +14453,7 @@ function PolylineHotspot({
14402
14453
  // src/hotspot/graphic-hotspot.tsx
14403
14454
  var import_react51 = require("react");
14404
14455
  var import_three26 = require("three");
14405
- var import_jsx_runtime32 = require("react/jsx-runtime");
14456
+ var import_jsx_runtime31 = require("react/jsx-runtime");
14406
14457
  var GRAPHIC_TEXTURE_SIZE = 512;
14407
14458
  function resolveStrokeWidth(value) {
14408
14459
  return Number.isFinite(value) ? Math.max(value, 0) : 8;
@@ -14622,22 +14673,22 @@ function CanvasGraphicHotspot({
14622
14673
  ...anchorProps
14623
14674
  }) {
14624
14675
  const texture = useGraphicTexture(graphic, width, height, onLoad, onError);
14625
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(HotspotAnchor, { ...anchorProps, height, width, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(HotspotPlane, { map: texture, opacity }) });
14676
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(HotspotAnchor, { ...anchorProps, height, width, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(HotspotPlane, { map: texture, opacity }) });
14626
14677
  }
14627
14678
  function GraphicHotspot(props) {
14628
14679
  const { graphic, ...restProps } = props;
14629
14680
  if (graphic.kind === "svg") {
14630
14681
  const imageProps = restProps;
14631
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ImageHotspot, { ...imageProps, src: graphic.src });
14682
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ImageHotspot, { ...imageProps, src: graphic.src });
14632
14683
  }
14633
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(CanvasGraphicHotspot, { ...restProps, graphic });
14684
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(CanvasGraphicHotspot, { ...restProps, graphic });
14634
14685
  }
14635
14686
 
14636
14687
  // src/hotspot/sequence-hotspot.tsx
14637
14688
  var import_fiber25 = require("@react-three/fiber");
14638
14689
  var import_react52 = require("react");
14639
14690
  var import_three27 = require("three");
14640
- var import_jsx_runtime33 = require("react/jsx-runtime");
14691
+ var import_jsx_runtime32 = require("react/jsx-runtime");
14641
14692
  var DEFAULT_SEQUENCE_FPS = 12;
14642
14693
  function resolveFps(value) {
14643
14694
  return Number.isFinite(value) && value > 0 ? value : DEFAULT_SEQUENCE_FPS;
@@ -14813,14 +14864,14 @@ function SequenceHotspot({
14813
14864
  onFrameChangeRef.current?.({ id, index: nextIndex, src });
14814
14865
  }
14815
14866
  });
14816
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(HotspotAnchor, { ...anchorProps, id, height, width, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(HotspotPlane, { map: texture, opacity }) });
14867
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(HotspotAnchor, { ...anchorProps, id, height, width, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(HotspotPlane, { map: texture, opacity }) });
14817
14868
  }
14818
14869
 
14819
14870
  // src/hotspot/video-hotspot.tsx
14820
14871
  var import_fiber26 = require("@react-three/fiber");
14821
14872
  var import_react53 = require("react");
14822
14873
  var import_three28 = require("three");
14823
- var import_jsx_runtime34 = require("react/jsx-runtime");
14874
+ var import_jsx_runtime33 = require("react/jsx-runtime");
14824
14875
  function clampVolume2(volume) {
14825
14876
  if (!Number.isFinite(volume)) {
14826
14877
  return 1;
@@ -15045,14 +15096,14 @@ function VideoHotspot({
15045
15096
  };
15046
15097
  }, [playing, resource]);
15047
15098
  const activeTexture = resource?.ready ? resource.texture : posterTexture;
15048
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(HotspotAnchor, { ...anchorProps, id, height, width, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(HotspotPlane, { map: activeTexture, opacity }) });
15099
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(HotspotAnchor, { ...anchorProps, id, height, width, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(HotspotPlane, { map: activeTexture, opacity }) });
15049
15100
  }
15050
15101
 
15051
15102
  // src/hotspot/audio-hotspot.tsx
15052
15103
  var import_fiber27 = require("@react-three/fiber");
15053
15104
  var import_react54 = require("react");
15054
15105
  var import_three29 = require("three");
15055
- var import_jsx_runtime35 = require("react/jsx-runtime");
15106
+ var import_jsx_runtime34 = require("react/jsx-runtime");
15056
15107
  var SPEAKER_TEXTURE_SIZE = 512;
15057
15108
  function paintSpeakerBody(context, center) {
15058
15109
  context.fillStyle = "#f5fbfc";
@@ -15337,13 +15388,13 @@ function AudioHotspot({
15337
15388
  howl.mute(mutedRef.current);
15338
15389
  howl.volume(clampAudioVolume(volumeRef.current) * spatial.gain);
15339
15390
  });
15340
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(HotspotAnchor, { ...anchorProps, id, height, width, children: marker ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(HotspotPlane, { map: markerTexture, opacity }) : null });
15391
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(HotspotAnchor, { ...anchorProps, id, height, width, children: marker ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(HotspotPlane, { map: markerTexture, opacity }) : null });
15341
15392
  }
15342
15393
 
15343
15394
  // src/hotspot/text-hotspot.tsx
15344
15395
  var import_react55 = require("react");
15345
15396
  var import_three30 = require("three");
15346
- var import_jsx_runtime36 = require("react/jsx-runtime");
15397
+ var import_jsx_runtime35 = require("react/jsx-runtime");
15347
15398
  var TEXT_TEXTURE_LONG_SIDE = 1024;
15348
15399
  var DEFAULT_FONT_FAMILY = "system-ui, sans-serif";
15349
15400
  var DEFAULT_FONT_SIZE = 96;
@@ -15661,13 +15712,13 @@ function TextHotspot({
15661
15712
  whiteSpace
15662
15713
  };
15663
15714
  const texture = useTextTexture(text, width, height, style, onLoad, onError);
15664
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(HotspotAnchor, { ...anchorProps, height, width, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(HotspotPlane, { map: texture, opacity }) });
15715
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(HotspotAnchor, { ...anchorProps, height, width, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(HotspotPlane, { map: texture, opacity }) });
15665
15716
  }
15666
15717
 
15667
15718
  // src/hotspot/iframe-hotspot.tsx
15668
15719
  var import_drei3 = require("@react-three/drei");
15669
15720
  var import_three31 = require("three");
15670
- var import_jsx_runtime37 = require("react/jsx-runtime");
15721
+ var import_jsx_runtime36 = require("react/jsx-runtime");
15671
15722
  var IFRAME_LONG_SIDE = 800;
15672
15723
  var CSS3D_DISTANCE_FACTOR = 400;
15673
15724
  var DEFAULT_SANDBOX = "allow-scripts allow-popups allow-forms";
@@ -15724,7 +15775,7 @@ function IframeHotspot({
15724
15775
  interactive,
15725
15776
  pointerEvents
15726
15777
  );
15727
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
15778
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
15728
15779
  HotspotAnchor,
15729
15780
  {
15730
15781
  ...anchorProps,
@@ -15733,9 +15784,9 @@ function IframeHotspot({
15733
15784
  pointerEvents,
15734
15785
  width,
15735
15786
  children: [
15736
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("mesh", { children: [
15737
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("planeGeometry", { args: [1, 1] }),
15738
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
15787
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("mesh", { children: [
15788
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("planeGeometry", { args: [1, 1] }),
15789
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
15739
15790
  "meshBasicMaterial",
15740
15791
  {
15741
15792
  depthWrite: false,
@@ -15746,7 +15797,7 @@ function IframeHotspot({
15746
15797
  }
15747
15798
  )
15748
15799
  ] }),
15749
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
15800
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
15750
15801
  import_drei3.Html,
15751
15802
  {
15752
15803
  distanceFactor: CSS3D_DISTANCE_FACTOR,
@@ -15761,7 +15812,7 @@ function IframeHotspot({
15761
15812
  },
15762
15813
  transform: true,
15763
15814
  zIndexRange: [10, 0],
15764
- children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
15815
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
15765
15816
  "iframe",
15766
15817
  {
15767
15818
  allow,