@snapcall/stream-ui 1.10.1 → 1.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
- import {jsx as $3Sbms$jsx, jsxs as $3Sbms$jsxs, Fragment as $3Sbms$Fragment} from "react/jsx-runtime";
1
+ import {jsxs as $3Sbms$jsxs, Fragment as $3Sbms$Fragment, jsx as $3Sbms$jsx} from "react/jsx-runtime";
2
2
  import {createRoot as $3Sbms$createRoot} from "react-dom/client";
3
3
  import $3Sbms$hotjarbrowser from "@hotjar/browser";
4
4
  import $3Sbms$reacthottoast, {toast as $3Sbms$toast, Toaster as $3Sbms$Toaster, ToastBar as $3Sbms$ToastBar} from "react-hot-toast";
5
5
  import $3Sbms$styledcomponents, {keyframes as $3Sbms$keyframes, ThemeProvider as $3Sbms$ThemeProvider, css as $3Sbms$css, ThemeContext as $3Sbms$ThemeContext, createGlobalStyle as $3Sbms$createGlobalStyle} from "styled-components";
6
- import {useState as $3Sbms$useState, useRef as $3Sbms$useRef, useEffect as $3Sbms$useEffect, useContext as $3Sbms$useContext, useMemo as $3Sbms$useMemo, createContext as $3Sbms$createContext, useReducer as $3Sbms$useReducer, useLayoutEffect as $3Sbms$useLayoutEffect, useCallback as $3Sbms$useCallback} from "react";
6
+ import $3Sbms$react, {useState as $3Sbms$useState, useRef as $3Sbms$useRef, useEffect as $3Sbms$useEffect, useContext as $3Sbms$useContext, useMemo as $3Sbms$useMemo, createContext as $3Sbms$createContext, useReducer as $3Sbms$useReducer, useLayoutEffect as $3Sbms$useLayoutEffect, useCallback as $3Sbms$useCallback, forwardRef as $3Sbms$forwardRef} from "react";
7
7
  import "inobounce";
8
8
  import $3Sbms$i18next from "i18next";
9
9
  import {initReactI18next as $3Sbms$initReactI18next, useTranslation as $3Sbms$useTranslation} from "react-i18next";
@@ -16,10 +16,22 @@ import {Device as $3Sbms$Device} from "mediasoup-client";
16
16
  import {SelfieSegmentation as $3Sbms$SelfieSegmentation} from "@mediapipe/selfie_segmentation";
17
17
  import {createPortal as $3Sbms$createPortal} from "react-dom";
18
18
  import {toCanvas as $3Sbms$toCanvas} from "qrcode";
19
+ import {useOverlayTriggerState as $3Sbms$useOverlayTriggerState, useToggleState as $3Sbms$useToggleState} from "react-stately";
20
+ import $3Sbms$classnames from "classnames";
21
+ import {useToggleButton as $3Sbms$useToggleButton, useFocusRing as $3Sbms$useFocusRing, useButton as $3Sbms$useButton} from "react-aria";
22
+ import {useModalOverlay as $3Sbms$useModalOverlay, Overlay as $3Sbms$Overlay} from "@react-aria/overlays";
23
+ import {useViewportSize as $3Sbms$useViewportSize} from "@react-aria/utils";
24
+ import {CSSTransition as $3Sbms$CSSTransition} from "react-transition-group";
25
+ import {useHover as $3Sbms$useHover} from "@react-aria/interactions";
26
+ import $3Sbms$reactcontentloader from "react-content-loader";
27
+
28
+ function $parcel$interopDefault(a) {
29
+ return a && a.__esModule ? a.default : a;
30
+ }
19
31
 
20
32
 
21
33
 
22
-
34
+ // https://github.com/voodoocreation/ts-deepmerge/blob/master/src/index.ts
23
35
  const $365e765f9890497b$var$isObject = (obj)=>{
24
36
  if (typeof obj === "object" && obj !== null) {
25
37
  if (typeof Object.getPrototypeOf === "function") {
@@ -329,6 +341,9 @@ const $18fb8799f38eb407$export$84584c2a98eb6753 = {
329
341
  header: {
330
342
  free: "Free version"
331
343
  },
344
+ loader: {
345
+ connection: "Connecting..."
346
+ },
332
347
  notifications: {
333
348
  screensharingError: "An error occured when trying to toggle screensharing",
334
349
  microphoneError: "An error occured when trying to toggle the microphone",
@@ -480,6 +495,9 @@ const $c5472fb74fa04782$export$acb2a88f7d552ebf = {
480
495
  header: {
481
496
  free: "Version gratuite"
482
497
  },
498
+ loader: {
499
+ connection: "Connexion..."
500
+ },
483
501
  notifications: {
484
502
  screensharingError: "Une erreur est survenue pendant l'activation du partage d'\xe9cran",
485
503
  microphoneError: "Une erreur est survenue pendant l'activation du micro",
@@ -631,6 +649,9 @@ const $b7790fb9e48df5c4$export$3486a10f30cf1ee4 = {
631
649
  header: {
632
650
  free: "Versione gratuita"
633
651
  },
652
+ loader: {
653
+ connection: "Connessione..."
654
+ },
634
655
  notifications: {
635
656
  screensharingError: "Si \xe8 verificato un errore durante l'attivazione della condivisione dello schermo",
636
657
  microphoneError: "Si \xe8 verificato un errore durante l'attivazione del microfono",
@@ -806,7 +827,7 @@ var $384d985bb9605c35$export$2e2bcd8739ae039 = (0, $3Sbms$i18next);
806
827
 
807
828
 
808
829
 
809
-
830
+ /* eslint-disable no-console */
810
831
  const $0f65a9eaf4a1e910$var$LogLevel = {
811
832
  error: 1,
812
833
  warn: 2,
@@ -973,8 +994,8 @@ class $67e45b2e30dcc030$export$ea669869acd8f177 {
973
994
  });
974
995
  try {
975
996
  this.audioStreamSource.disconnect(this.analyser);
976
- } catch (err1) {
977
- $67e45b2e30dcc030$var$log.error("release", "audioStreamSource failed to disconnect", err1);
997
+ } catch (err) {
998
+ $67e45b2e30dcc030$var$log.error("release", "audioStreamSource failed to disconnect", err);
978
999
  }
979
1000
  this.audioContext.close().catch((err)=>{
980
1001
  $67e45b2e30dcc030$var$log.error("release", "audioContext failed to close", err);
@@ -1228,7 +1249,7 @@ class $0148b6fd862a22e8$export$2e2bcd8739ae039 {
1228
1249
  live = false;
1229
1250
  fps = 24;
1230
1251
  blurLevel = 10;
1231
- timerWorker = new Worker(new URL("timer.370d0e5a.js", import.meta.url), {
1252
+ timerWorker = new Worker(new URL("timer.7144fe82.js", import.meta.url), {
1232
1253
  name: "VirtualBackgroundTimerWorker"
1233
1254
  });
1234
1255
  constructor(stream, options){
@@ -1360,7 +1381,7 @@ class $0148b6fd862a22e8$export$2e2bcd8739ae039 {
1360
1381
 
1361
1382
 
1362
1383
  const $c31e3fb4360572af$var$log = new (0, $0f65a9eaf4a1e910$export$2e2bcd8739ae039)("StreamerClient");
1363
- const $c31e3fb4360572af$export$818d60b2e626da0c = {
1384
+ const $c31e3fb4360572af$export$103bedf43ba882db = {
1364
1385
  WEBRTC_FAILED: "WRTC1",
1365
1386
  WEBRTC_RECOVER_ERROR: "WRTC2",
1366
1387
  CREATE_TRANSPORT_FAILED: "TRANS1",
@@ -1409,7 +1430,7 @@ const $c31e3fb4360572af$var$WEBCAM_SIMULCAST_ENCODINGS = [
1409
1430
  {
1410
1431
  scaleResolutionDownBy: 1,
1411
1432
  maxBitrate: 5000000
1412
- },
1433
+ }
1413
1434
  ];
1414
1435
  const $c31e3fb4360572af$var$SCREEN_SHARING_SIMULCAST_ENCODINGS = [
1415
1436
  {
@@ -1419,7 +1440,7 @@ const $c31e3fb4360572af$var$SCREEN_SHARING_SIMULCAST_ENCODINGS = [
1419
1440
  {
1420
1441
  dtx: true,
1421
1442
  maxBitrate: 6000000
1422
- },
1443
+ }
1423
1444
  ];
1424
1445
  class $c31e3fb4360572af$var$SnapcallEvent extends CustomEvent {
1425
1446
  // eslint-disable-next-line @typescript-eslint/no-useless-constructor
@@ -1447,6 +1468,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
1447
1468
  super();
1448
1469
  navigator.mediaDevices.addEventListener("devicechange", ()=>this.onDeviceChange());
1449
1470
  this.config = {
1471
+ streamApiURL: String("https://apistream.snapcall.io"),
1450
1472
  apiUrl: String("https://api.snapcall.io/v2"),
1451
1473
  streamerServer: String("wss://g.snapcall.io/stream"),
1452
1474
  streamerApi: String("https://g.snapcall.io/stream"),
@@ -1456,7 +1478,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
1456
1478
  username: "test",
1457
1479
  credential: "test",
1458
1480
  credentialType: "password"
1459
- },
1481
+ }
1460
1482
  ]
1461
1483
  };
1462
1484
  this.peers = new Map();
@@ -1564,7 +1586,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
1564
1586
  if (!this.peerId) this.peerId = (0, $3Sbms$v4)();
1565
1587
  let url;
1566
1588
  try {
1567
- const { streamer_instance: instanceId , plan: { permissions: permissions , name: name } , } = await fetch(`${this.config.apiUrl}/streams/${room}/info`, {
1589
+ const { streamer_instance: instanceId , plan: { permissions: permissions , name: name } } = await fetch(`${this.config.apiUrl}/streams/${room}/info`, {
1568
1590
  method: "get",
1569
1591
  headers: {
1570
1592
  "Content-Type": "application/json"
@@ -1575,7 +1597,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
1575
1597
  });
1576
1598
  this.permissions = permissions;
1577
1599
  this.plan = name;
1578
- url = `${this.config.streamerServer}/${instanceId}/?roomId=${room}&peerId=${this.peerId}`;
1600
+ url = `${this.config.streamerServer}/${instanceId}${this.joinOptions.recorder ? "/recorder" : ""}?roomId=${room}&peerId=${this.peerId}`;
1579
1601
  } catch (roomError) {
1580
1602
  const event = new $c31e3fb4360572af$var$SnapcallEvent("invalidRoom", {
1581
1603
  detail: {}
@@ -1591,21 +1613,25 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
1591
1613
  });
1592
1614
  this.protoo = new $3Sbms$Peer(this.protooTransport);
1593
1615
  this.protoo.on("open", ()=>{
1616
+ if (this.joinOptions.recorder) {
1617
+ this.joinRecorder();
1618
+ return;
1619
+ }
1594
1620
  this.joinRoom();
1595
1621
  });
1596
1622
  this.protoo.on("failed", ()=>{
1597
1623
  $c31e3fb4360572af$var$log.error("protoo.on", "failed");
1598
- this.onCriticalError($c31e3fb4360572af$export$818d60b2e626da0c.SOCKET_LOST);
1624
+ this.onCriticalError($c31e3fb4360572af$export$103bedf43ba882db.SOCKET_LOST);
1599
1625
  });
1600
1626
  this.protoo.on("disconnected", ()=>{
1601
1627
  $c31e3fb4360572af$var$log.error("protoo.on", "disconnected");
1602
- this.onCriticalError($c31e3fb4360572af$export$818d60b2e626da0c.SOCKET_LOST);
1628
+ this.onCriticalError($c31e3fb4360572af$export$103bedf43ba882db.SOCKET_LOST);
1603
1629
  });
1604
1630
  this.protoo.on("close", ()=>$c31e3fb4360572af$var$log.log("protoo.on", "close :("));
1605
1631
  this.protoo.on("notification", async (notification)=>{
1606
1632
  $c31e3fb4360572af$var$log.log("notification", notification);
1607
1633
  if (notification.method === "error") {
1608
- if (notification.data?.reason === "reached user limit") this.onCriticalError($c31e3fb4360572af$export$818d60b2e626da0c.USER_LIMIT);
1634
+ if (notification.data?.reason === "reached user limit") this.onCriticalError($c31e3fb4360572af$export$103bedf43ba882db.USER_LIMIT);
1609
1635
  } else if (notification.method === "newPeer") {
1610
1636
  const { id: id , profile: profile , muted: muted } = notification.data;
1611
1637
  this.peers.set(id, {
@@ -1651,7 +1677,10 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
1651
1677
  this.onConsumerClose({
1652
1678
  consumerId: consumerId
1653
1679
  });
1654
- } else if (notification.method === "displayName") {
1680
+ } else if (notification.method === "recordStopped") this.dispatchEvent(new $c31e3fb4360572af$var$SnapcallEvent("recordStopped", {
1681
+ detail: notification.data
1682
+ }));
1683
+ else if (notification.method === "displayName") {
1655
1684
  const { peerId: peerId , displayName: displayName } = notification.data;
1656
1685
  const event = new $c31e3fb4360572af$var$SnapcallEvent("displayName", {
1657
1686
  detail: {
@@ -1731,17 +1760,17 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
1731
1760
  });
1732
1761
  this.dispatchEvent(event);
1733
1762
  } else if (notification.method === "customMessage") {
1734
- const { messageId: messageId , chunk: chunk1 , chunkIndex: chunkIndex , totalChunks: totalChunks } = notification.data.event;
1763
+ const { messageId: messageId , chunk: chunk , chunkIndex: chunkIndex , totalChunks: totalChunks } = notification.data.event;
1735
1764
  const existingMessage = this.customMessages.get(messageId);
1736
1765
  if (existingMessage) existingMessage.chunks.push({
1737
1766
  index: chunkIndex,
1738
- data: chunk1
1767
+ data: chunk
1739
1768
  });
1740
1769
  else this.customMessages.set(messageId, {
1741
1770
  chunks: [
1742
1771
  {
1743
1772
  index: chunkIndex,
1744
- data: chunk1
1773
+ data: chunk
1745
1774
  }
1746
1775
  ],
1747
1776
  totalChunks: totalChunks
@@ -1786,7 +1815,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
1786
1815
  transport.transport = await promise;
1787
1816
  if (transport.transport) this.listenWebRTCTransportStates(transport);
1788
1817
  } catch (err) {
1789
- this.onCriticalError($c31e3fb4360572af$export$818d60b2e626da0c.CREATE_TRANSPORT_FAILED);
1818
+ this.onCriticalError($c31e3fb4360572af$export$103bedf43ba882db.CREATE_TRANSPORT_FAILED);
1790
1819
  throw err;
1791
1820
  }
1792
1821
  return transport.transport;
@@ -1813,7 +1842,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
1813
1842
  }
1814
1843
  });
1815
1844
  $c31e3fb4360572af$var$log.error("listenWebRTCTransportStats", "webrtc stat failed", err);
1816
- this.onCriticalError($c31e3fb4360572af$export$818d60b2e626da0c.WEBRTC_FAILED);
1845
+ this.onCriticalError($c31e3fb4360572af$export$103bedf43ba882db.WEBRTC_FAILED);
1817
1846
  }
1818
1847
  }
1819
1848
  });
@@ -1854,7 +1883,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
1854
1883
  {
1855
1884
  ...peer,
1856
1885
  peerId: peer.id || peer.peerId
1857
- },
1886
+ }
1858
1887
  ]));
1859
1888
  const callId = await this.getCallId();
1860
1889
  this.dispatchEvent(new $c31e3fb4360572af$var$SnapcallEvent("enterRoom", {
@@ -1882,6 +1911,19 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
1882
1911
  });
1883
1912
  });
1884
1913
  }
1914
+ async joinRecorder() {
1915
+ this.streamerMediasoup = await (0, $a2f0e3c29b11c88e$export$2e2bcd8739ae039).create(this.protoo, this.config);
1916
+ const callId = await this.getCallId();
1917
+ this.dispatchEvent(new $c31e3fb4360572af$var$SnapcallEvent("enterRoom", {
1918
+ detail: {
1919
+ peerId: this.peerId,
1920
+ peers: [],
1921
+ callId: callId,
1922
+ plan: this.plan,
1923
+ permissions: this.permissions
1924
+ }
1925
+ }));
1926
+ }
1885
1927
  async switchMicrophone(deviceId) {
1886
1928
  try {
1887
1929
  $c31e3fb4360572af$var$log.log("switchMicrophone", "switching Microphone");
@@ -2137,7 +2179,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
2137
2179
  iceParameters: iceParameters
2138
2180
  });
2139
2181
  } catch (err) {
2140
- this.onCriticalError($c31e3fb4360572af$export$818d60b2e626da0c.WEBRTC_RECOVER_ERROR);
2182
+ this.onCriticalError($c31e3fb4360572af$export$103bedf43ba882db.WEBRTC_RECOVER_ERROR);
2141
2183
  $c31e3fb4360572af$var$log.log("restartIce", "restartIceFailed", err);
2142
2184
  $3Sbms$captureException(err, {
2143
2185
  extra: {
@@ -2204,20 +2246,39 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
2204
2246
  if (!this.webcamProducer || this.webcamProducer.closed) return;
2205
2247
  await this.switchWebcam({});
2206
2248
  }
2207
- async switchWebcam({ device: device , resolution: resolution , rotate: rotate }) {
2249
+ async switchWebcam({ device: device , resolution: resolution , rotate: rotate , frameRate: frameRate , facingMode: facingMode }) {
2208
2250
  if (!this.webcam.device) throw new Error("no webcam devices");
2251
+ const optionalParam = {};
2209
2252
  if (rotate) {
2210
- const webcams = Array.from(this.webcams.keys());
2211
- const deviceId = this.webcam?.device?.deviceId || "unknow";
2212
- let newWebcamIndex = webcams.indexOf(deviceId);
2213
- if (newWebcamIndex < webcams.length - 1) newWebcamIndex++;
2214
- else newWebcamIndex = 0;
2215
- const newWebcamDevice = this.webcams.get(webcams[newWebcamIndex]);
2216
- if (!newWebcamDevice) throw new Error("no webcam device");
2217
- this.webcam.device = newWebcamDevice;
2218
- this.webcam.resolution = "hd";
2253
+ if (this.webcam.facingMode) {
2254
+ console.log("switch by facing mod");
2255
+ this.webcam.facingMode = this.webcam.facingMode === "user" ? "environment" : "user";
2256
+ optionalParam.facingMode = this.webcam.facingMode;
2257
+ } else {
2258
+ const webcams = Array.from(this.webcams.keys());
2259
+ const deviceId = this.webcam?.device?.deviceId || "unknow";
2260
+ let newWebcamIndex = webcams.indexOf(deviceId);
2261
+ if (newWebcamIndex < webcams.length - 1) newWebcamIndex++;
2262
+ else newWebcamIndex = 0;
2263
+ const newWebcamDevice = this.webcams.get(webcams[newWebcamIndex]);
2264
+ if (!newWebcamDevice) throw new Error("no webcam device");
2265
+ this.webcam.device = newWebcamDevice;
2266
+ this.webcam.resolution = "hd";
2267
+ optionalParam.deviceId = {
2268
+ ideal: this.webcam.device?.deviceId
2269
+ };
2270
+ }
2219
2271
  } else {
2220
- if (device) this.webcam.device = device;
2272
+ if (facingMode) {
2273
+ this.webcam.facingMode = facingMode;
2274
+ optionalParam.facingMode = this.webcam.facingMode;
2275
+ } else if (device) {
2276
+ this.webcam.device = device;
2277
+ this.webcam.facingMode = undefined;
2278
+ optionalParam.deviceId = {
2279
+ ideal: this.webcam.device.deviceId
2280
+ };
2281
+ }
2221
2282
  if (resolution) this.webcam.resolution = resolution;
2222
2283
  }
2223
2284
  let usedResolution = $c31e3fb4360572af$export$d21ffcc5eb136bfa[resolution || this.webcam.resolution];
@@ -2237,9 +2298,8 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
2237
2298
  });
2238
2299
  const mediaStream = await this.handleGetUserMediaError("webcam", navigator.mediaDevices.getUserMedia({
2239
2300
  video: {
2240
- deviceId: {
2241
- ideal: this.webcam.device.deviceId
2242
- },
2301
+ frameRate: frameRate,
2302
+ ...optionalParam,
2243
2303
  ...usedResolution
2244
2304
  }
2245
2305
  }));
@@ -2269,7 +2329,16 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
2269
2329
  }
2270
2330
  async enableVideo(config) {
2271
2331
  await this.updateWebcams();
2272
- if (config?.device) this.webcam.device = config.device;
2332
+ const optionalParam = {};
2333
+ if (config?.facingMode) {
2334
+ optionalParam.facingMode = config.facingMode;
2335
+ this.webcam.facingMode = config.facingMode;
2336
+ } else {
2337
+ if (config?.device) this.webcam.device = config.device;
2338
+ optionalParam.deviceId = {
2339
+ ideal: this.webcam.device?.deviceId
2340
+ };
2341
+ }
2273
2342
  if (!this.webcam.device) throw new Error("no webcam devices");
2274
2343
  let usedResolution = $c31e3fb4360572af$export$d21ffcc5eb136bfa[config?.resolution || this.webcam.resolution];
2275
2344
  if (this.useVideoBackground) usedResolution = {
@@ -2283,12 +2352,18 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
2283
2352
  };
2284
2353
  const mediaStream = await this.handleGetUserMediaError("webcam", navigator.mediaDevices.getUserMedia({
2285
2354
  video: {
2286
- deviceId: {
2287
- ideal: this.webcam.device.deviceId
2288
- },
2355
+ frameRate: config?.frameRate,
2356
+ ...optionalParam,
2289
2357
  ...usedResolution
2290
2358
  }
2291
2359
  }));
2360
+ if (config?.facingMode) try {
2361
+ const capabilities = mediaStream.getVideoTracks()[0].getCapabilities();
2362
+ if (!capabilities?.facingMode || capabilities.facingMode.length === 0) throw new Error("no facing mod");
2363
+ } catch {
2364
+ this.webcam.device = this.webcams.values().next().value;
2365
+ this.webcam.facingMode = undefined;
2366
+ }
2292
2367
  if (this.useVideoBackground) {
2293
2368
  if (this.mediaPipe) await this.mediaPipe.clean();
2294
2369
  this.mediaPipe = new (0, $0148b6fd862a22e8$export$2e2bcd8739ae039)(mediaStream, this.mediaPipeOption);
@@ -2344,7 +2419,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
2344
2419
  advanced: [
2345
2420
  {
2346
2421
  zoom: this.webcamZoom.min * 2
2347
- },
2422
+ }
2348
2423
  ]
2349
2424
  });
2350
2425
  }
@@ -2355,7 +2430,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
2355
2430
  advanced: [
2356
2431
  {
2357
2432
  zoom: this.webcamZoom.min
2358
- },
2433
+ }
2359
2434
  ]
2360
2435
  });
2361
2436
  }
@@ -2464,6 +2539,27 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
2464
2539
  element.srcObject = mediaStream;
2465
2540
  } else $c31e3fb4360572af$var$log.error("requestVideo", `Video consumer ${consumer} not found`);
2466
2541
  }
2542
+ async saveCapture(base64Image) {
2543
+ const { objectUrl: objectUrl } = await fetch(`${this.config.streamApiURL}/uploadSnapshot`, {
2544
+ method: "POST",
2545
+ body: JSON.stringify({
2546
+ file: base64Image
2547
+ })
2548
+ }).then((rawResponse)=>rawResponse.json());
2549
+ const res = await this.protoo.request("addCapture", {
2550
+ url: objectUrl
2551
+ });
2552
+ return {
2553
+ url: objectUrl,
2554
+ assetId: res.assetId
2555
+ };
2556
+ }
2557
+ async deleteCapture(assetId) {
2558
+ const res = await this.protoo.request("deleteCapture", {
2559
+ assetId: assetId
2560
+ });
2561
+ return res;
2562
+ }
2467
2563
  async captureVideo(videoElement) {
2468
2564
  if (this.permissions.find((permission)=>permission === "instant_picture")) {
2469
2565
  let image;
@@ -2558,7 +2654,7 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
2558
2654
  consumerId: consumer.id
2559
2655
  });
2560
2656
  } catch (error) {
2561
- this.onCriticalError($c31e3fb4360572af$export$818d60b2e626da0c.CONSUME_ERROR);
2657
+ this.onCriticalError($c31e3fb4360572af$export$103bedf43ba882db.CONSUME_ERROR);
2562
2658
  $c31e3fb4360572af$var$log.error("consumeProducer", "newConsumer request failed", error);
2563
2659
  throw error;
2564
2660
  }
@@ -2762,6 +2858,12 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
2762
2858
  getPermissions() {
2763
2859
  return this.permissions;
2764
2860
  }
2861
+ async startRecord() {
2862
+ await this.protoo.request("startRecord");
2863
+ }
2864
+ async stopRecord() {
2865
+ await this.protoo.request("stopRecord");
2866
+ }
2765
2867
  }
2766
2868
 
2767
2869
 
@@ -2776,17 +2878,17 @@ var $5f30d8bf4f04621e$export$2e2bcd8739ae039 = $5f30d8bf4f04621e$var$StreamUICon
2776
2878
 
2777
2879
 
2778
2880
  let $2884da8a64948e35$export$96a9662a3eda31f6;
2779
- (function(StreamsReducerActionTypes1) {
2780
- StreamsReducerActionTypes1[StreamsReducerActionTypes1["SET_STREAMS"] = 0] = "SET_STREAMS";
2781
- StreamsReducerActionTypes1[StreamsReducerActionTypes1["ADD_STREAM"] = 1] = "ADD_STREAM";
2782
- StreamsReducerActionTypes1[StreamsReducerActionTypes1["REMOVE_STREAM"] = 2] = "REMOVE_STREAM";
2783
- StreamsReducerActionTypes1[StreamsReducerActionTypes1["DEVICE_UPDATE"] = 3] = "DEVICE_UPDATE";
2784
- StreamsReducerActionTypes1[StreamsReducerActionTypes1["MUTE"] = 4] = "MUTE";
2785
- StreamsReducerActionTypes1[StreamsReducerActionTypes1["UNMUTE"] = 5] = "UNMUTE";
2786
- StreamsReducerActionTypes1[StreamsReducerActionTypes1["SET_HIGHLIGHTED_TILE"] = 6] = "SET_HIGHLIGHTED_TILE";
2787
- StreamsReducerActionTypes1[StreamsReducerActionTypes1["UNSET_HIGHLIGHTED_TILE"] = 7] = "UNSET_HIGHLIGHTED_TILE";
2788
- StreamsReducerActionTypes1[StreamsReducerActionTypes1["SET_STREAM_PROFILE"] = 8] = "SET_STREAM_PROFILE";
2789
- StreamsReducerActionTypes1[StreamsReducerActionTypes1["SET_STREAM_SPEAKING"] = 9] = "SET_STREAM_SPEAKING";
2881
+ (function(StreamsReducerActionTypes) {
2882
+ StreamsReducerActionTypes[StreamsReducerActionTypes["SET_STREAMS"] = 0] = "SET_STREAMS";
2883
+ StreamsReducerActionTypes[StreamsReducerActionTypes["ADD_STREAM"] = 1] = "ADD_STREAM";
2884
+ StreamsReducerActionTypes[StreamsReducerActionTypes["REMOVE_STREAM"] = 2] = "REMOVE_STREAM";
2885
+ StreamsReducerActionTypes[StreamsReducerActionTypes["DEVICE_UPDATE"] = 3] = "DEVICE_UPDATE";
2886
+ StreamsReducerActionTypes[StreamsReducerActionTypes["MUTE"] = 4] = "MUTE";
2887
+ StreamsReducerActionTypes[StreamsReducerActionTypes["UNMUTE"] = 5] = "UNMUTE";
2888
+ StreamsReducerActionTypes[StreamsReducerActionTypes["SET_HIGHLIGHTED_TILE"] = 6] = "SET_HIGHLIGHTED_TILE";
2889
+ StreamsReducerActionTypes[StreamsReducerActionTypes["UNSET_HIGHLIGHTED_TILE"] = 7] = "UNSET_HIGHLIGHTED_TILE";
2890
+ StreamsReducerActionTypes[StreamsReducerActionTypes["SET_STREAM_PROFILE"] = 8] = "SET_STREAM_PROFILE";
2891
+ StreamsReducerActionTypes[StreamsReducerActionTypes["SET_STREAM_SPEAKING"] = 9] = "SET_STREAM_SPEAKING";
2790
2892
  })($2884da8a64948e35$export$96a9662a3eda31f6 || ($2884da8a64948e35$export$96a9662a3eda31f6 = {}));
2791
2893
  const $2884da8a64948e35$export$7fc21eab2c971c9c = {
2792
2894
  streams: [],
@@ -2997,6 +3099,52 @@ const $a1ac29d50bdaa837$var$SnapcallLogoMedium = ()=>{
2997
3099
  })
2998
3100
  });
2999
3101
  };
3102
+ const $a1ac29d50bdaa837$export$3741e4ac43f04ca2 = ()=>{
3103
+ return /*#__PURE__*/ (0, $3Sbms$jsxs)("svg", {
3104
+ width: "48",
3105
+ height: "48",
3106
+ viewBox: "0 0 48 48",
3107
+ fill: "none",
3108
+ xmlns: "http://www.w3.org/2000/svg",
3109
+ children: [
3110
+ /*#__PURE__*/ (0, $3Sbms$jsxs)("g", {
3111
+ clipPath: "url(#clip0_243_300)",
3112
+ children: [
3113
+ /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
3114
+ d: "M0 24C0 4.236 4.236 0 24 0C43.764 0 48 4.236 48 24C48 43.764 43.764 48 24 48C4.236 48 0 43.764 0 24Z",
3115
+ fill: "black"
3116
+ }),
3117
+ /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
3118
+ d: "M24.15 38.2856C25.7279 38.2856 27.0502 36.9758 26.5626 35.4753C26.1419 34.1801 25.4321 32.9898 24.4746 32.0064C22.853 30.341 20.6537 29.4053 18.3605 29.4053C16.0673 29.4053 13.8679 30.341 12.2464 32.0064C11.2888 32.9898 10.5791 34.1801 10.1583 35.4753C9.67078 36.9758 10.9931 38.2856 12.571 38.2856H24.15Z",
3119
+ fill: "white"
3120
+ }),
3121
+ /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
3122
+ d: "M23.8494 9.71436C22.2714 9.71436 20.9491 11.0242 21.4367 12.5249C21.8574 13.8199 22.5672 15.0102 23.5248 15.9937C25.1463 17.6591 27.3456 18.5947 29.6389 18.5947C31.932 18.5947 34.1314 17.6591 35.7529 15.9937C36.7106 15.0102 37.4203 13.8199 37.8409 12.5249C38.3286 11.0242 37.0063 9.71436 35.4283 9.71436H23.8494Z",
3123
+ fill: "white"
3124
+ }),
3125
+ /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
3126
+ d: "M29.6387 35.4287C29.6387 37.0067 30.953 38.3301 32.4415 37.8064C33.6767 37.3715 34.8118 36.6509 35.7527 35.6847C37.3744 34.0195 38.2852 31.7606 38.2852 29.4055C38.2852 27.0502 37.3744 24.7915 35.7527 23.1261C34.8118 22.1599 33.6767 21.4393 32.4415 21.0046C30.953 20.4807 29.6387 21.8043 29.6387 23.3823V35.4287Z",
3127
+ fill: "white"
3128
+ }),
3129
+ /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
3130
+ d: "M18.3605 12.5712C18.3605 10.9933 17.0461 9.66972 15.5576 10.1936C14.3224 10.6283 13.1872 11.3489 12.2464 12.3151C10.6248 13.9804 9.71387 16.2392 9.71387 18.5944C9.71387 20.9496 10.6248 23.2083 12.2464 24.8737C13.1872 25.8399 14.3224 26.5605 15.5576 26.9952C17.0461 27.5191 18.3605 26.1955 18.3605 24.6176V12.5712Z",
3131
+ fill: "white"
3132
+ })
3133
+ ]
3134
+ }),
3135
+ /*#__PURE__*/ (0, $3Sbms$jsx)("defs", {
3136
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("clipPath", {
3137
+ id: "clip0_243_300",
3138
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("rect", {
3139
+ width: "48",
3140
+ height: "48",
3141
+ fill: "white"
3142
+ })
3143
+ })
3144
+ })
3145
+ ]
3146
+ });
3147
+ };
3000
3148
  var $a1ac29d50bdaa837$export$2e2bcd8739ae039 = $a1ac29d50bdaa837$var$SnapcallLogo;
3001
3149
 
3002
3150
 
@@ -3357,7 +3505,7 @@ const $ae6e25be45301335$var$HeaderSettings = ({ baseCategories: baseCategories ,
3357
3505
  items: [
3358
3506
  ...baseCategory.items
3359
3507
  ]
3360
- })),
3508
+ }))
3361
3509
  ];
3362
3510
  extraCategories?.forEach((extraCategory)=>{
3363
3511
  const existingCategory = mergedCategories.find((category)=>category.id === extraCategory.id);
@@ -3497,7 +3645,7 @@ const $e96d119a19ed0c6c$var$getLayout = ({ width: width , cellAspectRatio: cellA
3497
3645
  width: roundedWidth,
3498
3646
  height: height
3499
3647
  }
3500
- },
3648
+ }
3501
3649
  ],
3502
3650
  tileCount: tileCount
3503
3651
  };
@@ -3619,7 +3767,7 @@ const $f235befa4cdc42d6$var$multiPiP = new (0, $e96d119a19ed0c6c$export$45fabd1c
3619
3767
  const $f235befa4cdc42d6$var$browser = $3Sbms$parse(window.navigator.userAgent);
3620
3768
  const $f235befa4cdc42d6$var$Header = ()=>{
3621
3769
  const { t: t } = (0, $3Sbms$useTranslation)();
3622
- const { setIsQuickConnectPopupVisible: setIsQuickConnectPopupVisible , setIsSettingsMenuVisible: setIsSettingsMenuVisible , setIsVirtualBackgroundPopupVisible: setIsVirtualBackgroundPopupVisible , options: options , muted: muted , streaming: streaming , permissions: permissions , plan: plan , setBlockedFeaturePopupOpen: setBlockedFeaturePopupOpen , } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
3770
+ const { setIsQuickConnectPopupVisible: setIsQuickConnectPopupVisible , setIsSettingsMenuVisible: setIsSettingsMenuVisible , setIsVirtualBackgroundPopupVisible: setIsVirtualBackgroundPopupVisible , options: options , muted: muted , streaming: streaming , permissions: permissions , plan: plan , setBlockedFeaturePopupOpen: setBlockedFeaturePopupOpen } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
3623
3771
  const { streams: streams } = (0, $cce9fd41d8a55a18$export$b5633a7cfbe42d9f)();
3624
3772
  const [extraOptions, setExtraOptions] = (0, $3Sbms$useState)(options.extraSettingsOptions || []);
3625
3773
  const onSetExtraSettingsOptions = (event)=>{
@@ -3688,7 +3836,7 @@ const $f235befa4cdc42d6$var$Header = ()=>{
3688
3836
  title: t("menu.openNewTab"),
3689
3837
  jsxIcon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $2da9626742e3560b$export$6546b255bd3a2004), {}),
3690
3838
  action: onOpenInNewTabClick
3691
- },
3839
+ }
3692
3840
  ]
3693
3841
  },
3694
3842
  {
@@ -3705,7 +3853,7 @@ const $f235befa4cdc42d6$var$Header = ()=>{
3705
3853
  title: t("quickConnect.title"),
3706
3854
  jsxIcon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $2da9626742e3560b$export$6470d09a29d34d08), {}),
3707
3855
  action: onScanQuickConnectClick
3708
- },
3856
+ }
3709
3857
  ]
3710
3858
  },
3711
3859
  {
@@ -3716,9 +3864,9 @@ const $f235befa4cdc42d6$var$Header = ()=>{
3716
3864
  title: t("settings.title"),
3717
3865
  jsxIcon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $2da9626742e3560b$export$1095c93890fce526), {}),
3718
3866
  action: onSettingsMenuClick
3719
- },
3867
+ }
3720
3868
  ]
3721
- },
3869
+ }
3722
3870
  ];
3723
3871
  if ($f235befa4cdc42d6$var$browser.platform.type === "desktop" && $f235befa4cdc42d6$var$browser.engine.name === "Blink") computedCategories[2].items.unshift({
3724
3872
  id: "virtualBackground",
@@ -3742,7 +3890,7 @@ const $f235befa4cdc42d6$var$Header = ()=>{
3742
3890
  setIsQuickConnectPopupVisible,
3743
3891
  setBlockedFeaturePopupOpen,
3744
3892
  setIsSettingsMenuVisible,
3745
- setIsVirtualBackgroundPopupVisible,
3893
+ setIsVirtualBackgroundPopupVisible
3746
3894
  ]);
3747
3895
  return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $ab29487ffcc05855$export$1e86fd0e1db89578), {
3748
3896
  children: [
@@ -4540,9 +4688,9 @@ const $6efc75079651494a$export$2b501aee548bae06 = (0, $3Sbms$styledcomponents).d
4540
4688
  width: 100%;
4541
4689
  height: 100%;
4542
4690
  background-color: #fff;
4543
- border-radius: 20px;
4691
+ border-radius: inherit;
4544
4692
  z-index: 20;
4545
- animation: ${$6efc75079651494a$var$Flash} 0.8s;
4693
+ animation: ${$6efc75079651494a$var$Flash} 0.8s forwards;
4546
4694
  `;
4547
4695
  const $6efc75079651494a$export$75b79d6244558c9c = (0, $3Sbms$styledcomponents).img`
4548
4696
  width: 88px;
@@ -4899,7 +5047,7 @@ var $f260365f66cb6a6f$export$2e2bcd8739ae039 = $f260365f66cb6a6f$var$Reduce;
4899
5047
 
4900
5048
 
4901
5049
 
4902
- const $57ab7b9a012d9acd$var$Cross = ()=>/*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
5050
+ const $57ab7b9a012d9acd$var$Cross = ({ color: color = "#fff" })=>/*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
4903
5051
  width: "24",
4904
5052
  height: "24",
4905
5053
  viewBox: "0 0 24 24",
@@ -4907,7 +5055,7 @@ const $57ab7b9a012d9acd$var$Cross = ()=>/*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
4907
5055
  xmlns: "http://www.w3.org/2000/svg",
4908
5056
  children: /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
4909
5057
  d: "m13.41 12 6.3-6.29a1.004 1.004 0 0 0-1.42-1.42L12 10.59l-6.29-6.3a1.004 1.004 0 1 0-1.42 1.42l6.3 6.29-6.3 6.29a.999.999 0 0 0 0 1.42 1 1 0 0 0 1.42 0l6.29-6.3 6.29 6.3a1.001 1.001 0 0 0 1.639-.325 1 1 0 0 0-.22-1.095L13.41 12Z",
4910
- fill: "#fff"
5058
+ fill: color
4911
5059
  })
4912
5060
  });
4913
5061
  var $57ab7b9a012d9acd$export$2e2bcd8739ae039 = $57ab7b9a012d9acd$var$Cross;
@@ -5256,7 +5404,7 @@ const $5939a59dc7c96d41$var$SelfStreamTile = ({ isSomeonePresenting: isSomeonePr
5256
5404
  const videoElementRef = (0, $3Sbms$useRef)(null);
5257
5405
  const videoMediaProviderRef = (0, $3Sbms$useRef)(null);
5258
5406
  const SelfTileRef = (0, $3Sbms$useRef)(null);
5259
- const { videosContainerRef: videosContainerRef , remoteTilesContainerRef: remoteTilesContainerRef , profile: profile , muted: muted , streaming: streaming , orientation: orientation , options: options , permissions: permissions , setBlockedFeaturePopupOpen: setBlockedFeaturePopupOpen , } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
5407
+ const { videosContainerRef: videosContainerRef , remoteTilesContainerRef: remoteTilesContainerRef , profile: profile , muted: muted , streaming: streaming , orientation: orientation , options: options , permissions: permissions , setBlockedFeaturePopupOpen: setBlockedFeaturePopupOpen } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
5260
5408
  const { streams: streams } = (0, $cce9fd41d8a55a18$export$b5633a7cfbe42d9f)();
5261
5409
  const [containerWidth, containerHeight] = (0, $af23c74942bdcae7$export$2b86bedf890eab8)(videosContainerRef.current);
5262
5410
  const cursor = streaming && !extended ? "pointer" : "default";
@@ -5501,7 +5649,7 @@ const $5939a59dc7c96d41$var$SelfStreamTile = ({ isSomeonePresenting: isSomeonePr
5501
5649
  }), remoteTilesContainerRef.current);
5502
5650
  return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Fragment), {
5503
5651
  children: [
5504
- /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $6efc75079651494a$export$98d9314e6a208b24), {
5652
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $6efc75079651494a$export$98d9314e6a208b24), {
5505
5653
  ref: SelfTileRef,
5506
5654
  style: {
5507
5655
  width: tileWidth,
@@ -5511,16 +5659,16 @@ const $5939a59dc7c96d41$var$SelfStreamTile = ({ isSomeonePresenting: isSomeonePr
5511
5659
  onClick: onSelfTileClick,
5512
5660
  onMouseDown: onSelfTileMouseDown,
5513
5661
  onTouchStart: onSelfTileMouseDown,
5514
- children: [
5515
- snapshotAnimation && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $6efc75079651494a$export$2b501aee548bae06), {
5516
- onAnimationEnd: ()=>setSnapshotAnimation(false)
5517
- }),
5518
- /*#__PURE__*/ (0, $3Sbms$jsx)((0, $6efc75079651494a$export$ba5a75b023bcdce2), {
5519
- orientation: orientation,
5520
- border: !streaming && !deviceRequest,
5521
- children: content
5522
- })
5523
- ]
5662
+ children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $6efc75079651494a$export$ba5a75b023bcdce2), {
5663
+ orientation: orientation,
5664
+ border: !streaming && !deviceRequest,
5665
+ children: [
5666
+ snapshotAnimation && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $6efc75079651494a$export$2b501aee548bae06), {
5667
+ onAnimationEnd: ()=>setSnapshotAnimation(false)
5668
+ }),
5669
+ content
5670
+ ]
5671
+ })
5524
5672
  }),
5525
5673
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $6efc75079651494a$export$9e533c08c30af08), {
5526
5674
  show: extended
@@ -5670,7 +5818,7 @@ const $f81bfa56534026c2$export$e9785ae652b3a722 = (item)=>{
5670
5818
  {
5671
5819
  ...item,
5672
5820
  id: 0
5673
- },
5821
+ }
5674
5822
  ]);
5675
5823
  localStorage.setItem(key, stringifiedHistory);
5676
5824
  }
@@ -5778,7 +5926,7 @@ const $5e2ac34f2c3f1b42$export$405a29439cf92237 = "youtube_pause";
5778
5926
  const $5e2ac34f2c3f1b42$export$649698d6e35b1ef3 = "youtube_stop";
5779
5927
  const $5e2ac34f2c3f1b42$var$YoutubeTile = (tile)=>{
5780
5928
  const { selfPeerId: selfPeerId } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
5781
- const [player1, setPlayer] = (0, $3Sbms$useState)(null);
5929
+ const [player, setPlayer] = (0, $3Sbms$useState)(null);
5782
5930
  const isSelf = tile.peerId === selfPeerId;
5783
5931
  const onVideoStateChange = (event)=>{
5784
5932
  const time = event.target.getCurrentTime();
@@ -5846,15 +5994,15 @@ const $5e2ac34f2c3f1b42$var$YoutubeTile = (tile)=>{
5846
5994
  isSelf
5847
5995
  ]);
5848
5996
  (0, $3Sbms$useEffect)(()=>{
5849
- if (!isSelf && player1) {
5997
+ if (!isSelf && player) {
5850
5998
  const onCustomMessage = (event)=>{
5851
5999
  const { type: type , time: time } = event.detail.event;
5852
6000
  if (type === $5e2ac34f2c3f1b42$export$405a29439cf92237) {
5853
- player1.pauseVideo();
5854
- player1.seekTo(time, true);
6001
+ player.pauseVideo();
6002
+ player.seekTo(time, true);
5855
6003
  } else if (type === $5e2ac34f2c3f1b42$export$1712c056f28ddd33) {
5856
- player1.playVideo();
5857
- player1.seekTo(time, true);
6004
+ player.playVideo();
6005
+ player.seekTo(time, true);
5858
6006
  }
5859
6007
  };
5860
6008
  (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("customMessage", onCustomMessage);
@@ -5862,10 +6010,10 @@ const $5e2ac34f2c3f1b42$var$YoutubeTile = (tile)=>{
5862
6010
  (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("customMessage", onCustomMessage);
5863
6011
  };
5864
6012
  }
5865
- if (isSelf && player1) {
6013
+ if (isSelf && player) {
5866
6014
  const onNewPeer = (event)=>{
5867
6015
  const { peerId: peerId } = event.detail;
5868
- const time = player1.getCurrentTime();
6016
+ const time = player.getCurrentTime();
5869
6017
  (0, $c9e496369b59be7a$export$2f377c2162fd02b2).sendCustomMessage(peerId, {
5870
6018
  type: $5e2ac34f2c3f1b42$export$8bd7ff36223ef5c1,
5871
6019
  videoId: tile.data.videoId,
@@ -5880,7 +6028,7 @@ const $5e2ac34f2c3f1b42$var$YoutubeTile = (tile)=>{
5880
6028
  }, [
5881
6029
  tile.data,
5882
6030
  isSelf,
5883
- player1
6031
+ player
5884
6032
  ]);
5885
6033
  return /*#__PURE__*/ (0, $3Sbms$jsx)((0, $34a6fb3d684caabd$export$f4a8a05247f8d4c), {
5886
6034
  children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $34a6fb3d684caabd$export$b0da35797f3be127), {
@@ -6454,7 +6602,7 @@ var $b8963bf62cf5b984$export$2e2bcd8739ae039 = $b8963bf62cf5b984$var$tooltip;
6454
6602
 
6455
6603
 
6456
6604
  const $cdab47bb8796991e$var$Video = ()=>{
6457
- const { selfPeerId: selfPeerId , videosContainerRef: videosContainerRef , remoteTilesContainerRef: remoteTilesContainerRef , options: options , muted: selfMuted , profile: profile1 , orientation: orientation , userInteractionTriggered: userInteractionTriggered , } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
6605
+ const { selfPeerId: selfPeerId , videosContainerRef: videosContainerRef , remoteTilesContainerRef: remoteTilesContainerRef , options: options , muted: selfMuted , profile: profile , orientation: orientation , userInteractionTriggered: userInteractionTriggered } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
6458
6606
  const [tileSize, setTileSize] = (0, $3Sbms$useState)({
6459
6607
  width: 0,
6460
6608
  height: 0
@@ -6634,7 +6782,7 @@ const $cdab47bb8796991e$var$Video = ()=>{
6634
6782
  stream: {
6635
6783
  id: String(selfPeerId),
6636
6784
  muted: selfMuted,
6637
- profile: profile1
6785
+ profile: profile
6638
6786
  }
6639
6787
  }),
6640
6788
  streams.map((stream)=>{
@@ -6695,6 +6843,18 @@ const $58d405d56c1abe95$var$Rotate = ()=>/*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
6695
6843
  fill: "#F7F7F7"
6696
6844
  })
6697
6845
  });
6846
+ const $58d405d56c1abe95$export$aefffb14595958fe = ()=>{
6847
+ return /*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
6848
+ xmlns: "http://www.w3.org/2000/svg",
6849
+ width: "32",
6850
+ height: "32",
6851
+ fill: "none",
6852
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
6853
+ fill: "#fff",
6854
+ d: "M26.547 20.68h-6.04a1.333 1.333 0 1 0 0 2.666h3.2A10.667 10.667 0 0 1 5.334 16a1.333 1.333 0 0 0-2.667 0 13.333 13.333 0 0 0 22.507 9.64V28a1.333 1.333 0 1 0 2.666 0v-6a1.333 1.333 0 0 0-1.293-1.32ZM16 2.666A13.333 13.333 0 0 0 6.827 6.36V4A1.333 1.333 0 1 0 4.16 4v6a1.333 1.333 0 0 0 1.334 1.333h6a1.333 1.333 0 0 0 0-2.667h-3.2A10.667 10.667 0 0 1 26.667 16a1.333 1.333 0 1 0 2.667 0A13.333 13.333 0 0 0 16 2.666Z"
6855
+ })
6856
+ });
6857
+ };
6698
6858
  var $58d405d56c1abe95$export$2e2bcd8739ae039 = $58d405d56c1abe95$var$Rotate;
6699
6859
 
6700
6860
 
@@ -6878,7 +7038,7 @@ const $db92fac48417791a$var$HighlightButton = ()=>{
6878
7038
  const { t: t } = (0, $3Sbms$useTranslation)();
6879
7039
  const highlightMenuRef = (0, $3Sbms$useRef)(null);
6880
7040
  const [isHighlightMenuOpen, setIsHighlightMenuOpen] = (0, $3Sbms$useState)(false);
6881
- const { setIsYoutubePopupVisible: setIsYoutubePopupVisible , setIsLinksharePopupVisible: setIsLinksharePopupVisible , selfPeerId: selfPeerId , permissions: permissions , setBlockedFeaturePopupOpen: setBlockedFeaturePopupOpen , } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
7041
+ const { setIsYoutubePopupVisible: setIsYoutubePopupVisible , setIsLinksharePopupVisible: setIsLinksharePopupVisible , selfPeerId: selfPeerId , permissions: permissions , setBlockedFeaturePopupOpen: setBlockedFeaturePopupOpen } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
6882
7042
  const { highlightedTile: highlightedTile , dispatch: dispatch } = (0, $cce9fd41d8a55a18$export$b5633a7cfbe42d9f)();
6883
7043
  const isPresenting = Boolean(highlightedTile?.isGlobal && highlightedTile?.peerId === selfPeerId);
6884
7044
  (0, $e1413aacdaa5a03e$export$71b2224f1ce5e08e)(highlightMenuRef, ()=>setIsHighlightMenuOpen(false));
@@ -6931,9 +7091,9 @@ const $db92fac48417791a$var$HighlightButton = ()=>{
6931
7091
  title: t("youtube.title"),
6932
7092
  jsxIcon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $a2d206a438475087$export$2e2bcd8739ae039), {}),
6933
7093
  action: onYoutubeClick
6934
- },
7094
+ }
6935
7095
  ]
6936
- },
7096
+ }
6937
7097
  ];
6938
7098
  if ($db92fac48417791a$var$isScreenshareSupported) menuCategories.push({
6939
7099
  id: "2",
@@ -6943,7 +7103,7 @@ const $db92fac48417791a$var$HighlightButton = ()=>{
6943
7103
  title: t("menu.screenSharing"),
6944
7104
  jsxIcon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $1ca024917df8f7bc$export$2e2bcd8739ae039), {}),
6945
7105
  action: onScreenshareClick
6946
- },
7106
+ }
6947
7107
  ]
6948
7108
  });
6949
7109
  return /*#__PURE__*/ (0, $3Sbms$jsx)((0, $3Sbms$Fragment), {
@@ -7088,9 +7248,9 @@ const $69a9c49ece80e773$var$ControlBar = ()=>{
7088
7248
  jsxIcon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $2da9626742e3560b$export$e57aa6aff2e1f414), {}),
7089
7249
  action: terminateCall,
7090
7250
  danger: true
7091
- },
7251
+ }
7092
7252
  ]
7093
- },
7253
+ }
7094
7254
  ]
7095
7255
  })
7096
7256
  }),
@@ -7271,7 +7431,7 @@ const $5b80b81d7b095f89$var$QuickConnect = ()=>{
7271
7431
  const themeContext = (0, $3Sbms$useContext)((0, $3Sbms$ThemeContext));
7272
7432
  const QuickConnectContainerRef = (0, $3Sbms$useRef)(null);
7273
7433
  const QuickConnectRef = (0, $3Sbms$useRef)(null);
7274
- const { selfPeerId: selfPeerId , profile: profile , isQuickConnectPopupVisible: isQuickConnectPopupVisible , setIsQuickConnectPopupVisible: setIsQuickConnectPopupVisible , options: options , orientation: orientation , } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
7434
+ const { selfPeerId: selfPeerId , profile: profile , isQuickConnectPopupVisible: isQuickConnectPopupVisible , setIsQuickConnectPopupVisible: setIsQuickConnectPopupVisible , options: options , orientation: orientation } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
7275
7435
  (0, $e1413aacdaa5a03e$export$71b2224f1ce5e08e)(QuickConnectContainerRef, ()=>{
7276
7436
  if (isQuickConnectPopupVisible) setIsQuickConnectPopupVisible(false);
7277
7437
  });
@@ -9125,7 +9285,7 @@ const $d493afe60dcea711$var$backgroundOptions = [
9125
9285
  title: "Blurred",
9126
9286
  value: "blurred",
9127
9287
  id: "background-blurred"
9128
- },
9288
+ }
9129
9289
  ];
9130
9290
  const $d493afe60dcea711$var$VirtualBackgroundPopup = ()=>{
9131
9291
  const { t: t } = (0, $3Sbms$useTranslation)();
@@ -9398,7 +9558,7 @@ const $e1c48a389d8ac959$export$8376625f8bb18347 = (0, $3Sbms$styledcomponents).d
9398
9558
 
9399
9559
 
9400
9560
  const $01986a58bfba8001$var$Settings = ()=>{
9401
- const { isQuickConnectPopupVisible: isQuickConnectPopupVisible , isSettingsMenuVisible: isSettingsMenuVisible , isYoutubePopupVisible: isYoutubePopupVisible , isLinksharePopupVisible: isLinksharePopupVisible , isVirtualBackgroundPopupVisible: isVirtualBackgroundPopupVisible , isBlockedFeaturePopupOpen: isBlockedFeaturePopupOpen , } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
9561
+ const { isQuickConnectPopupVisible: isQuickConnectPopupVisible , isSettingsMenuVisible: isSettingsMenuVisible , isYoutubePopupVisible: isYoutubePopupVisible , isLinksharePopupVisible: isLinksharePopupVisible , isVirtualBackgroundPopupVisible: isVirtualBackgroundPopupVisible , isBlockedFeaturePopupOpen: isBlockedFeaturePopupOpen } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
9402
9562
  const open = isQuickConnectPopupVisible || isSettingsMenuVisible || isYoutubePopupVisible || isBlockedFeaturePopupOpen || isLinksharePopupVisible || isVirtualBackgroundPopupVisible;
9403
9563
  return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $e1c48a389d8ac959$export$8376625f8bb18347), {
9404
9564
  open: open,
@@ -10176,8 +10336,8 @@ const $15a01b611391c1e7$var$audioSource = new Blob([
10176
10336
  170,
10177
10337
  170,
10178
10338
  170,
10179
- 170,
10180
- ]),
10339
+ 170
10340
+ ])
10181
10341
  ], {
10182
10342
  type: "audio/mpeg"
10183
10343
  });
@@ -10278,118 +10438,1478 @@ const $4fb4815baa04b470$export$914ddf2021ea8ee6 = (0, $3Sbms$styledcomponents).d
10278
10438
 
10279
10439
 
10280
10440
 
10281
- const $26ed036cbc17809a$var$currentTheme = (0, $52580db2e49cdd90$export$3bfd0d5209a8006a)();
10282
- const $26ed036cbc17809a$var$currentLanguage = (0, $a3e657fb86ae23f3$export$604ba5624273df44)();
10283
- let $26ed036cbc17809a$var$timestampCriticalError = -1;
10284
- const $26ed036cbc17809a$var$StreamUI = ({ options: options })=>{
10285
- const [selfPeerId, setSelfPeerId] = (0, $3Sbms$useState)(undefined);
10286
- const streamUIContainerRef = (0, $3Sbms$useRef)(null);
10287
- const videosContainerRef = (0, $3Sbms$useRef)(null);
10288
- const remoteTilesContainerRef = (0, $3Sbms$useRef)(null);
10289
- const [streamState, setStreamState] = (0, $3Sbms$useState)("streaming");
10290
- const [isQuickConnectPopupVisible, setIsQuickConnectPopupVisible] = (0, $3Sbms$useState)(false);
10291
- const [isSettingsMenuVisible, setIsSettingsMenuVisible] = (0, $3Sbms$useState)(false);
10292
- const [isYoutubePopupVisible, setIsYoutubePopupVisible] = (0, $3Sbms$useState)(false);
10293
- const [isLinksharePopupVisible, setIsLinksharePopupVisible] = (0, $3Sbms$useState)(false);
10294
- const [isVirtualBackgroundPopupVisible, setIsVirtualBackgroundPopupVisible] = (0, $3Sbms$useState)(false);
10295
- const [theme, setTheme] = (0, $3Sbms$useState)($26ed036cbc17809a$var$currentTheme);
10296
- const [language, setLanguage] = (0, $3Sbms$useState)(options.language || $26ed036cbc17809a$var$currentLanguage);
10297
- const [profile1, setProfile] = (0, $3Sbms$useState)({});
10298
- const [muted, setMuted] = (0, $3Sbms$useState)(true);
10299
- const [streaming, setStreaming] = (0, $3Sbms$useState)(false);
10300
- const [screensharing, setScreensharing] = (0, $3Sbms$useState)(false);
10301
- const [isAgent, setIsAgent] = (0, $3Sbms$useState)(false);
10302
- const [userInteractionTriggered, setUserInteractionTriggered] = (0, $3Sbms$useState)(false);
10303
- const [containerWidth, containerHeight] = (0, $af23c74942bdcae7$export$2b86bedf890eab8)(streamUIContainerRef.current);
10304
- const [isBlockedDevicesPopupOpen, setBlockedDevicesPopupOpen] = (0, $3Sbms$useState)(false);
10305
- const [isBlockedFeaturePopupOpen, setBlockedFeaturePopupOpen] = (0, $3Sbms$useState)(false);
10306
- const [permissions, setPermissions] = (0, $3Sbms$useState)([]);
10307
- const [plan, setPlan] = (0, $3Sbms$useState)(undefined);
10308
- const orientation = (containerWidth || window.screen.width) > (containerHeight || window.screen.height) ? "landscape" : "portrait";
10309
- const styledTheme = theme === "dark" ? (0, $52580db2e49cdd90$export$3e936a8db52a10a0) : (0, $52580db2e49cdd90$export$f30cb9bc4f736419);
10310
- const onWebcamUpdate = (event)=>{
10311
- if (event.type === "localVideoAvailable") setStreaming(true);
10312
- else setStreaming(false);
10313
- };
10314
- const onScreenshareUpdate = (event)=>{
10315
- if (event.type === "screenshareEnabled") setScreensharing(true);
10316
- else setScreensharing(false);
10317
- };
10318
- const onMicrophoneUpdate = (event)=>{
10319
- if (event.type === "microphoneMute") setMuted(true);
10320
- else setMuted(false);
10321
- };
10322
- const onDefaultAudioDeviceChange = (event)=>{
10323
- const micro = event.detail.label;
10324
- (0, $a5146f9062d7bf28$export$3a57e165650c636f)(`Connected to ${micro}`, {
10325
- duration: 3000,
10326
- icon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $6043ae1b48c5aa97$export$2e2bcd8739ae039), {}),
10327
- messageStyle: {
10328
- fontWeight: 600
10329
- }
10330
- });
10331
- };
10332
- const onSelfProfileUpdate = (event)=>{
10333
- const { profile: profile } = event.detail;
10334
- setProfile(profile);
10335
- };
10336
- const onCallEnd = ()=>{
10337
- (0, $15a01b611391c1e7$export$716eeec86fd18da7)();
10338
- setStreamState("ended");
10339
- setMuted(true);
10340
- setStreaming(false);
10341
- setScreensharing(false);
10342
- setUserInteractionTriggered(false);
10343
- };
10344
- const onCallTerminated = ()=>{
10345
- (0, $15a01b611391c1e7$export$716eeec86fd18da7)();
10346
- setStreamState("terminated");
10441
+
10442
+
10443
+
10444
+
10445
+
10446
+
10447
+
10448
+
10449
+
10450
+
10451
+
10452
+
10453
+
10454
+
10455
+
10456
+ function $5a48b7481979330f$export$61dc559f8a0b9bcf(ref) {
10457
+ const innerRef = (0, $3Sbms$useRef)(null);
10458
+ (0, $3Sbms$useEffect)(()=>{
10459
+ if (!ref) return;
10460
+ if (typeof ref === "function") ref(innerRef.current);
10461
+ else ref.current = innerRef.current;
10462
+ });
10463
+ return innerRef;
10464
+ }
10465
+ const $5a48b7481979330f$export$d2b052e7b4be1756 = /*#__PURE__*/ (0, $3Sbms$forwardRef)(function Button({ children: children , ...otherProps }, forwardedRef) {
10466
+ const ref = $5a48b7481979330f$export$61dc559f8a0b9bcf(forwardedRef);
10467
+ let state = (0, $3Sbms$useToggleState)(otherProps);
10468
+ const { buttonProps: buttonProps } = (0, $3Sbms$useToggleButton)(otherProps, state, ref);
10469
+ const { isFocusVisible: isFocusVisible , focusProps: focusProps } = (0, $3Sbms$useFocusRing)();
10470
+ return /*#__PURE__*/ (0, $3Sbms$jsx)("button", {
10471
+ className: (0, $3Sbms$classnames)("w-[76px] h-[40px]", otherProps.isSelected ? "bg-[#FFFFFF]" : "bg-[#FFFFFF] opacity-[0.4]", "rounded-full", "text-black", "flex items-center justify-center gap-[5px]", "text-base font-medium", "transition-colors ease-in-out", "focus:outline-none", {
10472
+ "ring-[3px] ring-cta": isFocusVisible,
10473
+ "cursor-not-allowed": buttonProps.disabled
10474
+ }),
10475
+ ...buttonProps,
10476
+ ...focusProps,
10477
+ ref: ref,
10478
+ children: children
10479
+ });
10480
+ });
10481
+
10482
+
10483
+
10484
+
10485
+
10486
+
10487
+
10488
+
10489
+
10490
+
10491
+
10492
+
10493
+
10494
+
10495
+
10496
+
10497
+
10498
+
10499
+
10500
+
10501
+ const $0590ee3141e14968$export$353f5b6fc5456de1 = /*#__PURE__*/ (0, $3Sbms$forwardRef)(function Button({ children: children , variant: variant = "primary" , size: size = "medium" , fullWidth: fullWidth = false , form: form , className: className , ...otherProps }, forwardedRef) {
10502
+ const ref = (0, $5a48b7481979330f$export$61dc559f8a0b9bcf)(forwardedRef);
10503
+ const { buttonProps: buttonProps , isPressed: isPressed } = (0, $3Sbms$useButton)(otherProps, ref);
10504
+ const { isFocusVisible: isFocusVisible , focusProps: focusProps } = (0, $3Sbms$useFocusRing)();
10505
+ const { hoverProps: hoverProps , isHovered: isHovered } = (0, $3Sbms$useHover)({
10506
+ isDisabled: buttonProps.disabled
10507
+ });
10508
+ const isActive = isHovered || isFocusVisible || isPressed;
10509
+ const variantStyle = {
10510
+ primary: (0, $3Sbms$classnames)(isActive ? "bg-primaryLight" : "bg-primary", "text-white disabled:bg-secondaryLight"),
10511
+ secondary: (0, $3Sbms$classnames)(isActive ? "bg-graySelected" : "bg-transparent", "text-primary border border-secondaryLight disabled:text-secondaryLight disabled:bg-graySelected"),
10512
+ basic: (0, $3Sbms$classnames)(isActive ? "bg-graySelected" : "bg-white", "text-primary disabled:text-secondaryLight disabled:bg-graySelected"),
10513
+ custom: ""
10347
10514
  };
10348
- const onInvalidRoom = ()=>{
10349
- setStreamState("expired");
10515
+ const sizeStyle = {
10516
+ large: "py-3 px-4 text-base rounded-lg",
10517
+ medium: "py-[9px] px-3.5 text-base rounded-lg",
10518
+ small: "py-2 px-3 text-sm rounded-lg",
10519
+ extraSmall: "py-1.5 px-2.5 text-xs rounded-md",
10520
+ custom: ""
10350
10521
  };
10351
- const onAgentIdentity = (event)=>{
10352
- const { success: success , email: email } = event.detail;
10353
- if (success) {
10354
- setIsAgent(true);
10355
- if (email) (0, $3Sbms$hotjarbrowser).identify(null, {
10356
- email: email
10357
- });
10358
- } else (0, $3Sbms$reacthottoast)("An error occured while trying to join the room as an agent", {
10359
- className: "error"
10360
- });
10522
+ return /*#__PURE__*/ (0, $3Sbms$jsx)("button", {
10523
+ className: (0, $3Sbms$classnames)(sizeStyle[size], variantStyle[variant], "flex items-center justify-center gap-[5px] font-medium", "transition-colors ease-in-out", "focus:outline-none", {
10524
+ "ring-[3px] ring-cta": isFocusVisible,
10525
+ "cursor-not-allowed": buttonProps.disabled,
10526
+ "w-full": fullWidth
10527
+ }, className),
10528
+ ...buttonProps,
10529
+ ...focusProps,
10530
+ ...hoverProps,
10531
+ form: form,
10532
+ ref: ref,
10533
+ children: children
10534
+ });
10535
+ });
10536
+
10537
+
10538
+ function $c0bb66c3d546ed81$export$2b77a92f1a5ad772(props) {
10539
+ const { children: children , state: state , size: size = "small" , title: title , description: description , primaryAction: primaryAction , secondaryAction: secondaryAction , centered: centered = false } = props;
10540
+ const ref = (0, $3Sbms$react).useRef(null);
10541
+ const { modalProps: modalProps , underlayProps: underlayProps } = (0, $3Sbms$useModalOverlay)({
10542
+ isDismissable: true,
10543
+ ...props
10544
+ }, state, ref);
10545
+ const [exited, setExited] = (0, $3Sbms$useState)(!state.isOpen);
10546
+ const viewport = (0, $3Sbms$useViewportSize)();
10547
+ const maxHeight = viewport.height - 64;
10548
+ const modalSize = {
10549
+ small: "max-w-[400px] mx-[20px]",
10550
+ medium: "max-w-[600px]",
10551
+ large: "max-w-[800px]"
10361
10552
  };
10362
- const onCriticalError = (event)=>{
10363
- const duration = 20000;
10364
- const now = Date.now();
10365
- if (event.detail.code === "USERLIMIT") {
10366
- setStreamState("full");
10367
- return;
10368
- }
10369
- if ($26ed036cbc17809a$var$timestampCriticalError !== -1 && $26ed036cbc17809a$var$timestampCriticalError + duration > now) return;
10370
- $26ed036cbc17809a$var$timestampCriticalError = now;
10371
- (0, $a5146f9062d7bf28$export$3a57e165650c636f)(`A critical error has occurred (error ${event.detail.code}).`, {
10372
- icon: (0, $93a0377c243d965e$export$c7df1b15b59b1df2),
10373
- button: {
10374
- text: "Reload",
10375
- action: ()=>{
10376
- window.location.reload();
10377
- }
10553
+ // Don't render anything if the modal is not open and we're not animating out.
10554
+ if (!(state.isOpen || !exited)) return null;
10555
+ return /*#__PURE__*/ (0, $3Sbms$jsx)((0, $3Sbms$Overlay), {
10556
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $3Sbms$CSSTransition), {
10557
+ in: state.isOpen,
10558
+ appear: true,
10559
+ onEntered: ()=>setExited(false),
10560
+ onExited: ()=>setExited(true),
10561
+ timeout: {
10562
+ enter: 0,
10563
+ exit: 300
10378
10564
  },
10379
- duration: duration
10380
- });
10381
- };
10382
- (0, $3Sbms$useEffect)(()=>{
10383
- try {
10384
- localStorage.setItem("stream_ui_theme", theme);
10385
- } catch (localStorageError) {
10386
- console.warn(localStorageError);
10387
- }
10388
- }, [
10389
- theme
10390
- ]);
10391
- (0, $3Sbms$useEffect)(()=>{
10392
- try {
10565
+ classNames: {
10566
+ enter: "opacity-0",
10567
+ enterDone: "opacity-1 transition ease-in",
10568
+ exit: "opacity-0 transition ease-out"
10569
+ },
10570
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
10571
+ className: "fixed z-[100] inset-0 bg-black bg-opacity-90 flex justify-center items-center inter",
10572
+ ...underlayProps,
10573
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $3Sbms$CSSTransition), {
10574
+ in: state.isOpen,
10575
+ appear: true,
10576
+ nodeRef: ref,
10577
+ timeout: {
10578
+ enter: 0,
10579
+ exit: 300
10580
+ },
10581
+ classNames: {
10582
+ appear: "translate-y-2",
10583
+ appearDone: "translate-y-0 transition ease-in",
10584
+ exit: "translate-y-2 transition ease-out"
10585
+ },
10586
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
10587
+ ...modalProps,
10588
+ ref: ref,
10589
+ className: (0, $3Sbms$classnames)("bg-white rounded-[10px] z-[1] overflow-auto focus:outline-none", modalSize[size]),
10590
+ style: {
10591
+ maxHeight: `${maxHeight}px`
10592
+ },
10593
+ children: /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
10594
+ className: "flex flex-col gap-5 px-5 py-[25px]",
10595
+ children: [
10596
+ /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
10597
+ className: (0, $3Sbms$classnames)("flex flex-col gap-[5px]", {
10598
+ "text-center": centered
10599
+ }),
10600
+ children: [
10601
+ /*#__PURE__*/ (0, $3Sbms$jsx)("h2", {
10602
+ className: "text-xl font-medium",
10603
+ children: title
10604
+ }),
10605
+ description && /*#__PURE__*/ (0, $3Sbms$jsx)("p", {
10606
+ className: "text-sm text-secondary",
10607
+ children: description
10608
+ })
10609
+ ]
10610
+ }),
10611
+ children,
10612
+ (primaryAction || secondaryAction) && /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
10613
+ className: (0, $3Sbms$classnames)("flex justify-end gap-2.5", centered ? "justify-center" : "justify-end"),
10614
+ children: [
10615
+ typeof secondaryAction === "string" && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $0590ee3141e14968$export$353f5b6fc5456de1), {
10616
+ variant: "secondary",
10617
+ onPress: state.close,
10618
+ fullWidth: centered,
10619
+ children: secondaryAction
10620
+ }),
10621
+ typeof secondaryAction === "function" && secondaryAction({
10622
+ close: state.close
10623
+ }),
10624
+ typeof primaryAction === "string" && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $0590ee3141e14968$export$353f5b6fc5456de1), {
10625
+ onPress: state.close,
10626
+ fullWidth: centered,
10627
+ children: primaryAction
10628
+ }),
10629
+ typeof primaryAction === "function" && primaryAction({
10630
+ close: state.close
10631
+ })
10632
+ ]
10633
+ })
10634
+ ]
10635
+ })
10636
+ })
10637
+ })
10638
+ })
10639
+ })
10640
+ });
10641
+ }
10642
+
10643
+
10644
+
10645
+
10646
+ const $444e1dd9fa8f6883$export$f9da3144ae2525a3 = ()=>/*#__PURE__*/ (0, $3Sbms$jsxs)("svg", {
10647
+ width: "20",
10648
+ height: "21",
10649
+ viewBox: "0 0 20 21",
10650
+ fill: "none",
10651
+ xmlns: "http://www.w3.org/2000/svg",
10652
+ style: {
10653
+ display: "inline"
10654
+ },
10655
+ transform: "translate(0 -1)",
10656
+ children: [
10657
+ /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
10658
+ d: "M10 2.167a8.333 8.333 0 1 0 0 16.666 8.333 8.333 0 0 0 0-16.666Zm0 15a6.667 6.667 0 1 1 0-13.334 6.667 6.667 0 0 1 0 13.333Z",
10659
+ fill: "#1D1C20"
10660
+ }),
10661
+ /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
10662
+ d: "M6.76 5.65a5.833 5.833 0 1 1 6.481 9.7 5.833 5.833 0 0 1-6.481-9.7Z",
10663
+ fill: "#F12828"
10664
+ })
10665
+ ]
10666
+ });
10667
+ const $444e1dd9fa8f6883$export$c6a849fd9d9d93a2 = ()=>/*#__PURE__*/ (0, $3Sbms$jsxs)("svg", {
10668
+ width: "20",
10669
+ height: "20",
10670
+ viewBox: "0 0 20 20",
10671
+ fill: "none",
10672
+ xmlns: "http://www.w3.org/2000/svg",
10673
+ style: {
10674
+ display: "inline"
10675
+ },
10676
+ transform: "translate(0 -1)",
10677
+ children: [
10678
+ /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
10679
+ d: "M10 1.667a8.333 8.333 0 1 0 0 16.666 8.333 8.333 0 0 0 0-16.666Zm0 15a6.667 6.667 0 1 1 0-13.334 6.667 6.667 0 0 1 0 13.333Z",
10680
+ fill: "#1D1C20"
10681
+ }),
10682
+ /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
10683
+ d: "M7.5 6.667h5a.833.833 0 0 1 .833.833v5a.833.833 0 0 1-.834.834h-5a.833.833 0 0 1-.833-.834v-5a.833.833 0 0 1 .833-.833Z",
10684
+ fill: "#F12828"
10685
+ })
10686
+ ]
10687
+ });
10688
+ const $444e1dd9fa8f6883$export$dce36e07153365d = ()=>/*#__PURE__*/ (0, $3Sbms$jsxs)("svg", {
10689
+ width: "20",
10690
+ height: "20",
10691
+ viewBox: "0 0 20 20",
10692
+ fill: "none",
10693
+ xmlns: "http://www.w3.org/2000/svg",
10694
+ style: {
10695
+ display: "inline"
10696
+ },
10697
+ transform: "translate(0 -1)",
10698
+ children: [
10699
+ /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
10700
+ d: "M10 1.667a8.333 8.333 0 1 0 0 16.666 8.333 8.333 0 0 0 0-16.666Zm0 15a6.666 6.666 0 1 1 0-13.333 6.666 6.666 0 0 1 0 13.333Z",
10701
+ fill: "#1D1C20"
10702
+ }),
10703
+ /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
10704
+ d: "M6.76 5.15a5.833 5.833 0 1 1 6.481 9.7 5.833 5.833 0 0 1-6.481-9.7Z",
10705
+ fill: "#1D1C20"
10706
+ })
10707
+ ]
10708
+ });
10709
+
10710
+
10711
+
10712
+
10713
+
10714
+ const $96999d2514f71e51$var$Text = ({ children: children })=>/*#__PURE__*/ (0, $3Sbms$jsx)("span", {
10715
+ className: "w-full text-base text-primaryLight font-normal leading-[20px]",
10716
+ children: children
10717
+ });
10718
+ const $96999d2514f71e51$var$Bold = ({ children: children })=>/*#__PURE__*/ (0, $3Sbms$jsx)("span", {
10719
+ className: "text-primary font-medium",
10720
+ children: children
10721
+ });
10722
+ const $96999d2514f71e51$var$InstructionRow = ({ children: children , index: index })=>/*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
10723
+ className: "flex flex-row justify-center gap-[5px]",
10724
+ children: [
10725
+ /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
10726
+ className: "flex items-center justify-center min-w-[24px] h-[24px] rounded-[50%] bg-secondaryVLight",
10727
+ children: index
10728
+ }),
10729
+ children
10730
+ ]
10731
+ });
10732
+ const $96999d2514f71e51$export$788cb893d96254c8 = ({ state: state , type: type })=>{
10733
+ const [permissionsState, setPermissionsState] = (0, $3Sbms$useState)("idle");
10734
+ const [isRoomReady, setRoomReady] = (0, $3Sbms$useState)(false);
10735
+ const { orientation: orientation } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
10736
+ const device = orientation === "landscape" ? "desktop" : "mobile";
10737
+ const videoLength = permissionsState === "granted" ? "short" : "full";
10738
+ const videoType = type === "picture" ? "photo" : "video";
10739
+ const onDeviceEnabled = ()=>setPermissionsState("granted");
10740
+ const onEnterRoom = ()=>setRoomReady(true);
10741
+ const onLeaveRoom = ()=>setRoomReady(false);
10742
+ const ref = (0, $3Sbms$useRef)(null);
10743
+ const title = (0, $3Sbms$useMemo)(()=>{
10744
+ if (permissionsState === "refused") return "Something went wrong!";
10745
+ if (type === "picture") return "Ready to take a shot?";
10746
+ return "Ready to record a video?";
10747
+ }, [
10748
+ permissionsState,
10749
+ type
10750
+ ]);
10751
+ (0, $3Sbms$useEffect)(()=>{
10752
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("localVideoAvailable", onDeviceEnabled);
10753
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("microphoneEnabled", onDeviceEnabled);
10754
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("enterRoom", onEnterRoom);
10755
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("leaveRoom", onLeaveRoom);
10756
+ return ()=>{
10757
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("localVideoAvailable", onDeviceEnabled);
10758
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("microphoneEnabled", onDeviceEnabled);
10759
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("enterRoom", onEnterRoom);
10760
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("leaveRoom", onLeaveRoom);
10761
+ };
10762
+ }, []);
10763
+ const permissionsInstructionIndex = Number(permissionsState !== "granted");
10764
+ return /*#__PURE__*/ (0, $3Sbms$jsx)((0, $c0bb66c3d546ed81$export$2b77a92f1a5ad772), {
10765
+ title: title,
10766
+ state: state,
10767
+ centered: permissionsState !== "refused",
10768
+ isDismissable: false,
10769
+ children: /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
10770
+ className: "flex flex-col gap-[20px]",
10771
+ children: [
10772
+ /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
10773
+ className: "flex flex-col gap-[10px]",
10774
+ ref: ref,
10775
+ children: permissionsState === "refused" ? /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Text, {
10776
+ children: "Without camera and microphone access, you can't take photos or videos to share with the support team. Please grant access in your browser settings."
10777
+ }) : /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Fragment), {
10778
+ children: [
10779
+ permissionsState !== "granted" && /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$InstructionRow, {
10780
+ index: 1,
10781
+ children: /*#__PURE__*/ (0, $3Sbms$jsxs)($96999d2514f71e51$var$Text, {
10782
+ children: [
10783
+ "When prompted, ",
10784
+ /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Bold, {
10785
+ children: "allow access"
10786
+ }),
10787
+ " to camera and microphone."
10788
+ ]
10789
+ })
10790
+ }),
10791
+ type === "picture" && /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Fragment), {
10792
+ children: [
10793
+ /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$InstructionRow, {
10794
+ index: 1 + permissionsInstructionIndex,
10795
+ children: /*#__PURE__*/ (0, $3Sbms$jsxs)($96999d2514f71e51$var$Text, {
10796
+ children: [
10797
+ "Tap the ",
10798
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $444e1dd9fa8f6883$export$dce36e07153365d), {}),
10799
+ /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Bold, {
10800
+ children: " Camera button"
10801
+ }),
10802
+ " to take a photo."
10803
+ ]
10804
+ })
10805
+ }),
10806
+ /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$InstructionRow, {
10807
+ index: 2 + permissionsInstructionIndex,
10808
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Text, {
10809
+ children: "Don't hesitate to take multiple photos for more detail."
10810
+ })
10811
+ }),
10812
+ /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$InstructionRow, {
10813
+ index: 3 + permissionsInstructionIndex,
10814
+ children: /*#__PURE__*/ (0, $3Sbms$jsxs)($96999d2514f71e51$var$Text, {
10815
+ children: [
10816
+ "You can review your photo and then ",
10817
+ /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Bold, {
10818
+ children: "send it when you're done."
10819
+ })
10820
+ ]
10821
+ })
10822
+ })
10823
+ ]
10824
+ }),
10825
+ type === "video" && /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Fragment), {
10826
+ children: [
10827
+ /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$InstructionRow, {
10828
+ index: 1 + permissionsInstructionIndex,
10829
+ children: /*#__PURE__*/ (0, $3Sbms$jsxs)($96999d2514f71e51$var$Text, {
10830
+ children: [
10831
+ "Tap the ",
10832
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $444e1dd9fa8f6883$export$f9da3144ae2525a3), {}),
10833
+ /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Bold, {
10834
+ children: " Record button"
10835
+ }),
10836
+ " to start a recording."
10837
+ ]
10838
+ })
10839
+ }),
10840
+ /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$InstructionRow, {
10841
+ index: 2 + permissionsInstructionIndex,
10842
+ children: /*#__PURE__*/ (0, $3Sbms$jsxs)($96999d2514f71e51$var$Text, {
10843
+ children: [
10844
+ "You can ",
10845
+ /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Bold, {
10846
+ children: "speak during"
10847
+ }),
10848
+ " the recording for added detail."
10849
+ ]
10850
+ })
10851
+ }),
10852
+ /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$InstructionRow, {
10853
+ index: 3 + permissionsInstructionIndex,
10854
+ children: /*#__PURE__*/ (0, $3Sbms$jsxs)($96999d2514f71e51$var$Text, {
10855
+ children: [
10856
+ "When you're finished, tap the ",
10857
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $444e1dd9fa8f6883$export$c6a849fd9d9d93a2), {}),
10858
+ /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Bold, {
10859
+ children: " Stop button"
10860
+ }),
10861
+ "."
10862
+ ]
10863
+ })
10864
+ }),
10865
+ /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$InstructionRow, {
10866
+ index: 4 + permissionsInstructionIndex,
10867
+ children: /*#__PURE__*/ (0, $3Sbms$jsxs)($96999d2514f71e51$var$Text, {
10868
+ children: [
10869
+ "You can review your video and then ",
10870
+ /*#__PURE__*/ (0, $3Sbms$jsx)($96999d2514f71e51$var$Bold, {
10871
+ children: "send it when you're done"
10872
+ }),
10873
+ "."
10874
+ ]
10875
+ })
10876
+ })
10877
+ ]
10878
+ })
10879
+ ]
10880
+ })
10881
+ }),
10882
+ permissionsState !== "refused" && /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
10883
+ className: "flex items-center justify-center rounded-[8px] overflow-hidden",
10884
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("video", {
10885
+ src: `${"https://stream-assets.snapcall.io"}/animations/${device}-assist-onboarding-${videoType}-${videoLength}.mp4`,
10886
+ playsInline: true,
10887
+ autoPlay: true,
10888
+ muted: true,
10889
+ loop: true
10890
+ })
10891
+ }),
10892
+ permissionsState === "refused" ? /*#__PURE__*/ (0, $3Sbms$jsx)((0, $0590ee3141e14968$export$353f5b6fc5456de1), {
10893
+ onPress: ()=>window.location.reload(),
10894
+ children: "Allow access"
10895
+ }) : /*#__PURE__*/ (0, $3Sbms$jsx)((0, $3Sbms$Fragment), {
10896
+ children: permissionsState === "granted" ? /*#__PURE__*/ (0, $3Sbms$jsx)((0, $0590ee3141e14968$export$353f5b6fc5456de1), {
10897
+ onPress: state.close,
10898
+ children: "Okay"
10899
+ }) : /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $0590ee3141e14968$export$353f5b6fc5456de1), {
10900
+ isDisabled: permissionsState === "requesting" || isRoomReady === false,
10901
+ onPress: async ()=>{
10902
+ setPermissionsState("requesting");
10903
+ try {
10904
+ const mediaResult = await navigator.mediaDevices.getUserMedia({
10905
+ audio: true,
10906
+ video: true
10907
+ });
10908
+ mediaResult.getTracks().forEach((track)=>track.stop());
10909
+ await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).enableMicrophone();
10910
+ await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).enableVideo({
10911
+ resolution: "vga",
10912
+ frameRate: 20,
10913
+ facingMode: "environment"
10914
+ });
10915
+ } catch {
10916
+ setPermissionsState("refused");
10917
+ }
10918
+ },
10919
+ children: [
10920
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $910dd7d7d872a463$export$2e2bcd8739ae039), {}),
10921
+ "Allow access to cam/mic"
10922
+ ]
10923
+ })
10924
+ })
10925
+ ]
10926
+ })
10927
+ });
10928
+ };
10929
+
10930
+
10931
+
10932
+
10933
+
10934
+
10935
+
10936
+
10937
+ const $1c8fc500105e5c78$export$f9d8408fefd786da = ({ state: state , setReady: setReady })=>{
10938
+ const QRCodeRef = (0, $3Sbms$useRef)(null);
10939
+ (0, $3Sbms$useEffect)(()=>{
10940
+ $3Sbms$toCanvas(QRCodeRef.current, window.location.href, {
10941
+ errorCorrectionLevel: "M"
10942
+ });
10943
+ }, []);
10944
+ return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $c0bb66c3d546ed81$export$2b77a92f1a5ad772), {
10945
+ centered: true,
10946
+ title: "Switch to your mobile",
10947
+ description: "Enjoy an even more convenient experience by using your phone to take photos and record videos.",
10948
+ state: state,
10949
+ children: [
10950
+ /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
10951
+ className: "pb-[20px]",
10952
+ children: [
10953
+ /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
10954
+ className: "flex flex-1 items-center justify-center relative",
10955
+ children: [
10956
+ /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
10957
+ className: "absolute w-[70px] h-[70px]",
10958
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $16d11fc0880587fd$export$2e2bcd8739ae039), {})
10959
+ }),
10960
+ /*#__PURE__*/ (0, $3Sbms$jsx)("canvas", {
10961
+ ref: QRCodeRef
10962
+ })
10963
+ ]
10964
+ }),
10965
+ /*#__PURE__*/ (0, $3Sbms$jsx)("p", {
10966
+ className: "flex items-center justify-center text-xs text-primaryLight",
10967
+ children: "Scan this QR code with a compatible device."
10968
+ })
10969
+ ]
10970
+ }),
10971
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $0590ee3141e14968$export$353f5b6fc5456de1), {
10972
+ onPress: ()=>{
10973
+ setReady(true);
10974
+ state.close();
10975
+ },
10976
+ children: "Use desktop version"
10977
+ })
10978
+ ]
10979
+ });
10980
+ };
10981
+
10982
+
10983
+ function $d48329960b5b412c$export$fc3bf4634b488af8({ mode: mode }) {
10984
+ const { orientation: orientation } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
10985
+ const desktop = orientation === "landscape";
10986
+ const [ready, setReady] = (0, $3Sbms$useState)(!desktop);
10987
+ (0, $3Sbms$useEffect)(()=>{
10988
+ if (ready) {
10989
+ setIsPhotoInstructionsModalOpen(mode === "photo" && ready);
10990
+ setIsVideoInstructionsModalOpen(mode === "video" && ready);
10991
+ }
10992
+ }, [
10993
+ ready,
10994
+ mode
10995
+ ]);
10996
+ const [isPhotoInstructionsModalOpen, setIsPhotoInstructionsModalOpen] = (0, $3Sbms$useState)(mode === "photo" && ready);
10997
+ const [isVideoInstructionsModalOpen, setIsVideoInstructionsModalOpen] = (0, $3Sbms$useState)(mode === "video" && ready);
10998
+ const photoInstructionsModalState = (0, $3Sbms$useOverlayTriggerState)({
10999
+ isOpen: isPhotoInstructionsModalOpen,
11000
+ onOpenChange: setIsPhotoInstructionsModalOpen
11001
+ });
11002
+ const videoInstructionsModalState = (0, $3Sbms$useOverlayTriggerState)({
11003
+ isOpen: isVideoInstructionsModalOpen,
11004
+ onOpenChange: setIsVideoInstructionsModalOpen
11005
+ });
11006
+ return {
11007
+ photoInstructionsModalState: photoInstructionsModalState,
11008
+ videoInstructionsModalState: videoInstructionsModalState,
11009
+ ready: ready,
11010
+ setReady: setReady
11011
+ };
11012
+ }
11013
+ const $d48329960b5b412c$export$bee10e8ab511933f = ({ state: state })=>{
11014
+ const [isSwitchToMobileModalOpen, setIsSwitchToMobileOpen] = (0, $3Sbms$useState)(!state.ready);
11015
+ const switchToMobileModalState = (0, $3Sbms$useOverlayTriggerState)({
11016
+ isOpen: isSwitchToMobileModalOpen,
11017
+ onOpenChange: setIsSwitchToMobileOpen
11018
+ });
11019
+ return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Fragment), {
11020
+ children: [
11021
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $96999d2514f71e51$export$788cb893d96254c8), {
11022
+ state: state.photoInstructionsModalState,
11023
+ type: "picture"
11024
+ }),
11025
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $96999d2514f71e51$export$788cb893d96254c8), {
11026
+ state: state.videoInstructionsModalState,
11027
+ type: "video"
11028
+ }),
11029
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $1c8fc500105e5c78$export$f9d8408fefd786da), {
11030
+ state: switchToMobileModalState,
11031
+ setReady: state.setReady
11032
+ })
11033
+ ]
11034
+ });
11035
+ };
11036
+
11037
+
11038
+ function $a94f21ef9007b90a$export$bd7b6af6aa16550c({ photo: photo = true }) {
11039
+ const [isPhoto, setPhoto] = (0, $3Sbms$useState)(photo);
11040
+ const [streaming, setStreaming] = (0, $3Sbms$useState)(false);
11041
+ return {
11042
+ photo: isPhoto,
11043
+ setPhoto: setPhoto,
11044
+ streaming: streaming,
11045
+ setStreaming: setStreaming
11046
+ };
11047
+ }
11048
+ const $a94f21ef9007b90a$export$11a6fe490bbc4873 = (props)=>{
11049
+ const setupModalsState = (0, $d48329960b5b412c$export$fc3bf4634b488af8)({
11050
+ mode: props.state.photo ? "photo" : "video"
11051
+ });
11052
+ return /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11053
+ className: "flex flex-col bg-primary h-[150px] w-full max-w-[400px] rounded-[15px] p-2.5 gap-2.5",
11054
+ children: [
11055
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $d48329960b5b412c$export$bee10e8ab511933f), {
11056
+ state: setupModalsState
11057
+ }),
11058
+ /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11059
+ className: "flex flex-1 flex-row px-[10px] w-full",
11060
+ children: [
11061
+ /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11062
+ className: "flex flex-row flex-auto items-center gap-[10px]",
11063
+ children: [
11064
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $a1ac29d50bdaa837$export$3741e4ac43f04ca2), {}),
11065
+ /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11066
+ className: " text-white text-base font-medium",
11067
+ children: "SnapCall"
11068
+ })
11069
+ ]
11070
+ }),
11071
+ /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11072
+ className: "flex flex-row justify-end flex-auto items-center gap-[10px] ",
11073
+ children: [
11074
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $5a48b7481979330f$export$d2b052e7b4be1756), {
11075
+ onPress: ()=>{
11076
+ if (!props.state.streaming) {
11077
+ props.state.setPhoto(true);
11078
+ setupModalsState.photoInstructionsModalState.open();
11079
+ }
11080
+ },
11081
+ isSelected: props.state.photo,
11082
+ children: "Photo"
11083
+ }),
11084
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $5a48b7481979330f$export$d2b052e7b4be1756), {
11085
+ onPress: ()=>{
11086
+ if (!props.state.streaming) {
11087
+ props.state.setPhoto(false);
11088
+ setupModalsState.videoInstructionsModalState.open();
11089
+ }
11090
+ },
11091
+ isSelected: !props.state.photo,
11092
+ children: "Video"
11093
+ })
11094
+ ]
11095
+ })
11096
+ ]
11097
+ }),
11098
+ /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11099
+ className: "flex flex-row flex-1 items-center justify-between w-full ",
11100
+ children: [
11101
+ /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11102
+ className: "w-[60px] h-[60px]",
11103
+ children: props.thumbnail
11104
+ }),
11105
+ /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11106
+ className: "bg-white rounded-full w-[72px] h-[72px] p-[3px]",
11107
+ onClick: ()=>props.onCapturePress(),
11108
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11109
+ className: "bg-primary rounded-full w-full h-full p-[3px] flex items-center justify-center cursor-pointer",
11110
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11111
+ className: (0, $3Sbms$classnames)("w-full h-full transition-[transform,border-radius] duration-300", props.state.photo ? "bg-white" : "bg-[#f12828]", props.state.streaming ? "rounded-[5px] scale-[0.4]" : "rounded-[60px]")
11112
+ })
11113
+ })
11114
+ }),
11115
+ /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11116
+ onClick: props.onSwitch,
11117
+ className: "bg-[#565656] rounded-full w-[56px] h-[56px] flex items-center justify-center cursor-pointer",
11118
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $58d405d56c1abe95$export$aefffb14595958fe), {})
11119
+ })
11120
+ ]
11121
+ })
11122
+ ]
11123
+ });
11124
+ };
11125
+
11126
+
11127
+
11128
+
11129
+
11130
+
11131
+
11132
+
11133
+
11134
+
11135
+
11136
+
11137
+
11138
+ function $38cdd553fb158eaa$export$4589ed81930b555c(props) {
11139
+ const { children: children , state: state } = props;
11140
+ const ref = (0, $3Sbms$react).useRef(null);
11141
+ const { orientation: orientation } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
11142
+ const { modalProps: modalProps , underlayProps: underlayProps } = (0, $3Sbms$useModalOverlay)(props, state, ref);
11143
+ const [exited, setExited] = (0, $3Sbms$useState)(!state.isOpen);
11144
+ const viewport = (0, $3Sbms$useViewportSize)();
11145
+ const maxHeight = viewport.height - 64;
11146
+ const desktop = orientation === "landscape";
11147
+ // Don't render anything if the modal is not open and we're not animating out.
11148
+ if (!(state.isOpen || !exited)) return null;
11149
+ return /*#__PURE__*/ (0, $3Sbms$jsx)((0, $3Sbms$Overlay), {
11150
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $3Sbms$CSSTransition), {
11151
+ in: state.isOpen,
11152
+ appear: true,
11153
+ onEntered: ()=>setExited(false),
11154
+ onExited: ()=>setExited(true),
11155
+ timeout: {
11156
+ enter: 0,
11157
+ exit: 300
11158
+ },
11159
+ classNames: {
11160
+ enter: "opacity-0",
11161
+ enterDone: "opacity-1 transition ease-in",
11162
+ exit: "opacity-0 transition ease-out"
11163
+ },
11164
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11165
+ className: (0, $3Sbms$classnames)("fixed z-[100] inset-0 bg-underlay flex justify-center inter", desktop ? "items-center" : "items-end"),
11166
+ ...underlayProps,
11167
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $3Sbms$CSSTransition), {
11168
+ in: state.isOpen,
11169
+ appear: true,
11170
+ nodeRef: ref,
11171
+ timeout: {
11172
+ enter: 0,
11173
+ exit: 300
11174
+ },
11175
+ classNames: {
11176
+ appear: desktop ? "translate-y-[200%]" : "translate-y-full",
11177
+ appearDone: "translate-y-0 transition duration-300 ease-out",
11178
+ exit: (0, $3Sbms$classnames)("transition ease-out", desktop ? "translate-y-[200%]" : "translate-y-full")
11179
+ },
11180
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11181
+ ...modalProps,
11182
+ ref: ref,
11183
+ className: (0, $3Sbms$classnames)("bg-white z-[1] overflow-auto focus:outline-none", desktop ? "translate-y-[200%] rounded-[15px]" : "translate-y-full rounded-t-[15px]"),
11184
+ style: {
11185
+ maxHeight: `${maxHeight}px`
11186
+ },
11187
+ children: children
11188
+ })
11189
+ })
11190
+ })
11191
+ })
11192
+ });
11193
+ }
11194
+
11195
+
11196
+
11197
+
11198
+
11199
+
11200
+
11201
+
11202
+
11203
+
11204
+
11205
+ const $4425c0dfad3f82bb$export$480db61f4dcd7727 = ()=>/*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
11206
+ width: "12",
11207
+ height: "15",
11208
+ viewBox: "0 0 12 15",
11209
+ fill: "none",
11210
+ xmlns: "http://www.w3.org/2000/svg",
11211
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
11212
+ d: "M11.103 5.747 2.677.272A1.614 1.614 0 0 0 1.773 0a1.62 1.62 0 0 0-.9.288 1.886 1.886 0 0 0-.64.733A2.235 2.235 0 0 0 0 2.025v10.95c0 .352.08.699.233 1.004.154.305.375.558.64.733.273.186.584.285.9.288.317.003.63-.091.904-.272l8.426-5.475c.272-.173.498-.427.656-.736.158-.308.241-.66.241-1.017a2.24 2.24 0 0 0-.24-1.017 1.884 1.884 0 0 0-.657-.736Z",
11213
+ fill: "#fff"
11214
+ })
11215
+ });
11216
+
11217
+
11218
+ const $c7542aa0d9bb5f39$export$1cd1efc78cb52ca5 = ({ asset: asset , onClick: onClick })=>{
11219
+ if (!asset) return null;
11220
+ return /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11221
+ className: "flex items-center justify-center w-[60px] h-[60px] rounded-[8px] cursor-pointer bg-white relative overflow-hidden",
11222
+ onClick: onClick,
11223
+ children: [
11224
+ asset?.type === "picture" && /*#__PURE__*/ (0, $3Sbms$jsx)("img", {
11225
+ className: "cursor-pointer bg-white",
11226
+ src: asset.objectUrl,
11227
+ alt: "last shot"
11228
+ }),
11229
+ asset?.type === "video" && /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Fragment), {
11230
+ children: [
11231
+ /*#__PURE__*/ (0, $3Sbms$jsx)("video", {
11232
+ src: asset.objectUrl,
11233
+ className: "min-w-[100%] min-h-[100%] object-cover"
11234
+ }),
11235
+ /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11236
+ className: "absolute left-0 top-0 flex items-center justify-center w-[60px] h-[60px] bg-primary opacity-50",
11237
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $4425c0dfad3f82bb$export$480db61f4dcd7727), {})
11238
+ })
11239
+ ]
11240
+ })
11241
+ ]
11242
+ });
11243
+ };
11244
+
11245
+
11246
+
11247
+
11248
+ const $a879d6bc7f43b0c5$export$28e1ba20e0688eb7 = ()=>/*#__PURE__*/ (0, $3Sbms$jsx)("svg", {
11249
+ width: "18",
11250
+ height: "19",
11251
+ viewBox: "0 0 18 19",
11252
+ fill: "none",
11253
+ xmlns: "http://www.w3.org/2000/svg",
11254
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("path", {
11255
+ d: "M7.5 14a.75.75 0 0 0 .75-.75v-4.5a.75.75 0 0 0-1.5 0v4.5a.75.75 0 0 0 .75.75ZM15 5h-3v-.75A2.25 2.25 0 0 0 9.75 2h-1.5A2.25 2.25 0 0 0 6 4.25V5H3a.75.75 0 0 0 0 1.5h.75v8.25A2.25 2.25 0 0 0 6 17h6a2.25 2.25 0 0 0 2.25-2.25V6.5H15A.75.75 0 1 0 15 5Zm-7.5-.75a.75.75 0 0 1 .75-.75h1.5a.75.75 0 0 1 .75.75V5h-3v-.75Zm5.25 10.5a.75.75 0 0 1-.75.75H6a.75.75 0 0 1-.75-.75V6.5h7.5v8.25ZM10.5 14a.75.75 0 0 0 .75-.75v-4.5a.75.75 0 1 0-1.5 0v4.5a.75.75 0 0 0 .75.75Z",
11256
+ fill: "#fff"
11257
+ })
11258
+ });
11259
+
11260
+
11261
+ const $77fb06ba253d6f7c$var$dateFormat = new Intl.DateTimeFormat("default", {
11262
+ dateStyle: "short"
11263
+ });
11264
+ const $77fb06ba253d6f7c$var$timeFormat = new Intl.DateTimeFormat("default", {
11265
+ hour: "numeric",
11266
+ minute: "2-digit"
11267
+ });
11268
+ function $77fb06ba253d6f7c$var$formatDate(date) {
11269
+ const ampm = date.getHours() % 12 >= 12 ? "PM" : "AM";
11270
+ return `${$77fb06ba253d6f7c$var$dateFormat.format(date)} at ${$77fb06ba253d6f7c$var$timeFormat.format(date)} ${ampm}`;
11271
+ }
11272
+ const $77fb06ba253d6f7c$export$c9169049516d8bcf = ({ asset: asset , index: index , removeAsset: removeAsset })=>{
11273
+ const confirmRemovalModalState = (0, $3Sbms$useOverlayTriggerState)({});
11274
+ return /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11275
+ className: "flex flex-row justify-between items-center",
11276
+ children: [
11277
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $c0bb66c3d546ed81$export$2b77a92f1a5ad772), {
11278
+ title: "Confirm removal",
11279
+ state: confirmRemovalModalState,
11280
+ description: "Are you sure you want to remove this photo/video? This action cannot be undone.",
11281
+ primaryAction: ({ close: close })=>/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $0590ee3141e14968$export$353f5b6fc5456de1), {
11282
+ onPress: async ()=>{
11283
+ await removeAsset(asset);
11284
+ close();
11285
+ },
11286
+ children: [
11287
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $a879d6bc7f43b0c5$export$28e1ba20e0688eb7), {}),
11288
+ "Confirm"
11289
+ ]
11290
+ }),
11291
+ secondaryAction: "Cancel"
11292
+ }),
11293
+ /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11294
+ className: "flex flex-row gap-[10px] items-center",
11295
+ children: [
11296
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $c7542aa0d9bb5f39$export$1cd1efc78cb52ca5), {
11297
+ asset: asset
11298
+ }),
11299
+ /*#__PURE__*/ (0, $3Sbms$jsxs)("span", {
11300
+ className: "text-sm",
11301
+ style: {
11302
+ hyphens: "manual"
11303
+ },
11304
+ children: [
11305
+ asset.type === "picture" ? "Photo" : "Video",
11306
+ " ",
11307
+ index + 1,
11308
+ " \xb7",
11309
+ " ",
11310
+ $77fb06ba253d6f7c$var$formatDate(new Date(asset.timestamp))
11311
+ ]
11312
+ })
11313
+ ]
11314
+ }),
11315
+ /*#__PURE__*/ (0, $3Sbms$jsx)("span", {
11316
+ className: "text-xs font-bold underline cursor-pointer ml-[10px]",
11317
+ onClick: confirmRemovalModalState.open,
11318
+ children: "Remove"
11319
+ })
11320
+ ]
11321
+ }, asset.assetId);
11322
+ };
11323
+
11324
+
11325
+
11326
+
11327
+ const $7436fc0a14c16764$export$4fa52f68b1c78fbf = ()=>/*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11328
+ className: "w-screen max-w-[400px] h-[235px] px-[20px] py-[25px] gap-[10px]",
11329
+ children: [
11330
+ /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11331
+ className: "w-[360px] h-[93px]",
11332
+ children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$reactcontentloader), {
11333
+ width: 360,
11334
+ height: 93,
11335
+ foregroundColor: "#EBEBEB",
11336
+ children: [
11337
+ /*#__PURE__*/ (0, $3Sbms$jsx)("rect", {
11338
+ x: 0,
11339
+ y: 0,
11340
+ rx: 8,
11341
+ ry: 8,
11342
+ width: 230,
11343
+ height: 16
11344
+ }),
11345
+ /*#__PURE__*/ (0, $3Sbms$jsx)("rect", {
11346
+ x: 0,
11347
+ y: 33,
11348
+ rx: 8,
11349
+ ry: 8,
11350
+ width: 60,
11351
+ height: 60
11352
+ }),
11353
+ /*#__PURE__*/ (0, $3Sbms$jsx)("rect", {
11354
+ x: 70,
11355
+ y: 56,
11356
+ rx: 7,
11357
+ ry: 7,
11358
+ width: 180,
11359
+ height: 14
11360
+ })
11361
+ ]
11362
+ })
11363
+ }),
11364
+ /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11365
+ className: "flex items-center justify-center w-full h-[40px] rounded-[8px] border border-primaryLight mt-[10px]",
11366
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $3Sbms$reactcontentloader), {
11367
+ width: 120,
11368
+ height: 14,
11369
+ foregroundColor: "#EBEBEB",
11370
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("rect", {
11371
+ x: 0,
11372
+ y: 0,
11373
+ rx: 7,
11374
+ ry: 7,
11375
+ width: 120,
11376
+ height: 14
11377
+ })
11378
+ })
11379
+ }),
11380
+ /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11381
+ className: "flex items-center justify-center w-full h-[40px] rounded-[8px] bg-primary mt-[10px]",
11382
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $3Sbms$reactcontentloader), {
11383
+ width: 120,
11384
+ height: 14,
11385
+ foregroundColor: "#EBEBEB",
11386
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("rect", {
11387
+ x: 0,
11388
+ y: 0,
11389
+ rx: 7,
11390
+ ry: 7,
11391
+ width: 120,
11392
+ height: 14
11393
+ })
11394
+ })
11395
+ })
11396
+ ]
11397
+ });
11398
+
11399
+
11400
+ const $d4d374dc7955cc18$export$5c334f209b1aa661 = ({ assets: assets , state: state , onSendAssets: onSendAssets , removeAsset: removeAsset , loading: loading })=>{
11401
+ const ref = (0, $3Sbms$useRef)(null);
11402
+ const [assetKind, setAssetKind] = (0, $3Sbms$useState)(assets[assets.length - 1]?.type === "picture" ? "photo" : "video");
11403
+ const { orientation: orientation } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
11404
+ const desktop = orientation === "landscape";
11405
+ (0, $3Sbms$useEffect)(()=>{
11406
+ if (assets.length < 1) return;
11407
+ setAssetKind(assets[assets.length - 1]?.type === "picture" ? "photo" : "video");
11408
+ }, [
11409
+ assets
11410
+ ]);
11411
+ return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Fragment), {
11412
+ children: [
11413
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $3Sbms$CSSTransition), {
11414
+ in: state.isOpen,
11415
+ appear: true,
11416
+ timeout: {
11417
+ enter: 0,
11418
+ exit: 300
11419
+ },
11420
+ classNames: {
11421
+ enter: "opacity-0",
11422
+ enterDone: "opacity-90 transition ease-in",
11423
+ exit: "opacity-0 transition ease-out"
11424
+ },
11425
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11426
+ className: (0, $3Sbms$classnames)("fixed justify-center w-screen h-screen top-0 left-0 bg-black z-[1]", state.isOpen ? "flex" : "hidden"),
11427
+ children: loading && /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11428
+ className: (0, $3Sbms$classnames)("flex mt-[50px] h-fit opacity-1", desktop ? "flex-row items-center w-[400px]" : "flex-col items-center text-center w-[320px]"),
11429
+ children: [
11430
+ /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11431
+ className: "w-[24px] h-[24px] m-[10px]",
11432
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $8b7bd174d29d9a1f$export$2e2bcd8739ae039), {})
11433
+ }),
11434
+ /*#__PURE__*/ (0, $3Sbms$jsxs)("span", {
11435
+ className: "text-sm text-white",
11436
+ children: [
11437
+ "Please wait a moment while your ",
11438
+ loading,
11439
+ " is being processed...",
11440
+ loading === "video" ? " It may take up to 15 seconds for a video to be ready." : ""
11441
+ ]
11442
+ })
11443
+ ]
11444
+ })
11445
+ })
11446
+ }),
11447
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $38cdd553fb158eaa$export$4589ed81930b555c), {
11448
+ state: {
11449
+ ...state,
11450
+ close: loading ? ()=>{} : state.close
11451
+ },
11452
+ children: loading ? /*#__PURE__*/ (0, $3Sbms$jsx)((0, $7436fc0a14c16764$export$4fa52f68b1c78fbf), {}) : /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11453
+ ref: ref,
11454
+ className: "flex flex-col w-screen max-w-[400px] text-primary",
11455
+ children: [
11456
+ /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11457
+ className: "flex flex-row justify-between p-[12px]",
11458
+ children: [
11459
+ /*#__PURE__*/ (0, $3Sbms$jsxs)("h1", {
11460
+ className: "text-lg first-letter:capitalize",
11461
+ children: [
11462
+ assetKind,
11463
+ " successfully captured"
11464
+ ]
11465
+ }),
11466
+ /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11467
+ className: "flex justify-center items-center rounded-full bg-[#f3f3f3] h-[30px] w-[30px] cursor-pointer",
11468
+ onClick: state.close,
11469
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $57ab7b9a012d9acd$export$2e2bcd8739ae039), {
11470
+ color: "#565656"
11471
+ })
11472
+ })
11473
+ ]
11474
+ }),
11475
+ /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11476
+ className: "flex flex-col px-[20px] pb-[25px] gap-[10px]",
11477
+ children: [
11478
+ assets.map((asset, index)=>/*#__PURE__*/ (0, $3Sbms$jsx)((0, $77fb06ba253d6f7c$export$c9169049516d8bcf), {
11479
+ asset: asset,
11480
+ index: index,
11481
+ removeAsset: removeAsset
11482
+ }, asset.assetId)),
11483
+ /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $0590ee3141e14968$export$353f5b6fc5456de1), {
11484
+ variant: "secondary",
11485
+ onPress: state.close,
11486
+ children: [
11487
+ "Take new ",
11488
+ assetKind
11489
+ ]
11490
+ }),
11491
+ /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $0590ee3141e14968$export$353f5b6fc5456de1), {
11492
+ onPress: ()=>{
11493
+ onSendAssets();
11494
+ state.close();
11495
+ },
11496
+ children: [
11497
+ "Send ",
11498
+ assets.length > 1 ? `${assets.length} elements` : assetKind
11499
+ ]
11500
+ })
11501
+ ]
11502
+ })
11503
+ ]
11504
+ })
11505
+ })
11506
+ ]
11507
+ });
11508
+ };
11509
+
11510
+
11511
+
11512
+
11513
+
11514
+
11515
+
11516
+ const $db82628e5503d51b$export$53819c0e58f98d49 = (props)=>{
11517
+ const [countdown, setCountdown] = (0, $3Sbms$useState)(props.initialValue);
11518
+ (0, $3Sbms$useEffect)(()=>{
11519
+ if (countdown === undefined) return;
11520
+ const t = setTimeout(()=>{
11521
+ if (countdown === 1) props.onFinish();
11522
+ setCountdown(countdown - 1);
11523
+ }, 1000);
11524
+ return ()=>clearTimeout(t);
11525
+ }, [
11526
+ countdown,
11527
+ props
11528
+ ]);
11529
+ return /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11530
+ className: "absolute w-full h-full flex justify-center items-center bg-black/[.6] z-50",
11531
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("span", {
11532
+ className: "text-white/80 text-[112px] font-medium",
11533
+ children: countdown
11534
+ })
11535
+ });
11536
+ };
11537
+
11538
+
11539
+ const $92672d57809ea9d3$var$timerText = (delta)=>{
11540
+ const d = [
11541
+ Math.floor(delta / 60),
11542
+ Math.round(delta % 60)
11543
+ ].map((n)=>`${n < 10 ? "0" : ""}${n}`);
11544
+ return d.join(":");
11545
+ };
11546
+ const $92672d57809ea9d3$export$336a011955157f9a = ()=>{
11547
+ const [startRecordTime, setStartRecordTime] = (0, $3Sbms$useState)(undefined);
11548
+ const [timer, setTimer] = (0, $3Sbms$useState)(0);
11549
+ const [countdownVisible, setCountdownVisible] = (0, $3Sbms$useState)(false);
11550
+ const videoElementRef = (0, $3Sbms$useRef)(null);
11551
+ const [assets, setAssets] = (0, $3Sbms$useState)([]);
11552
+ const [assetLoading, setAssetLoading] = (0, $3Sbms$useState)(null);
11553
+ const [isAssetsPopupStateOpen, setIsAssetsPopupStateOpen] = (0, $3Sbms$useState)(false);
11554
+ const [facingMode, setFacingMode] = (0, $3Sbms$useState)("user");
11555
+ const assetsPopupState = (0, $3Sbms$useOverlayTriggerState)({
11556
+ isOpen: isAssetsPopupStateOpen,
11557
+ onOpenChange: setIsAssetsPopupStateOpen
11558
+ });
11559
+ const sendAssetsModalState = (0, $3Sbms$useOverlayTriggerState)({});
11560
+ const [flashAnimation, setFlashAnimation] = (0, $3Sbms$useState)(false);
11561
+ const menuBarState = (0, $a94f21ef9007b90a$export$bd7b6af6aa16550c)({});
11562
+ const exitStreaming = (0, $3Sbms$useCallback)(()=>{
11563
+ menuBarState.setStreaming(false);
11564
+ setStartRecordTime(undefined);
11565
+ setCountdownVisible(false);
11566
+ setTimer(0);
11567
+ }, [
11568
+ menuBarState
11569
+ ]);
11570
+ const onLocalVideoChange = (event)=>{
11571
+ if (!event.detail?.camera?.device || !videoElementRef.current) return;
11572
+ const { facingMode: newFacingMode } = (0, $c9e496369b59be7a$export$2f377c2162fd02b2).requestLocalVideo(videoElementRef?.current);
11573
+ setFacingMode(newFacingMode);
11574
+ };
11575
+ const onStopRecord = (0, $3Sbms$useCallback)((event)=>{
11576
+ const { url: url , assetId: assetId } = event.detail;
11577
+ exitStreaming();
11578
+ setAssetLoading(null);
11579
+ setAssets([
11580
+ ...assets,
11581
+ {
11582
+ type: "video",
11583
+ timestamp: Date.now(),
11584
+ objectUrl: url,
11585
+ assetId: assetId
11586
+ }
11587
+ ]);
11588
+ }, [
11589
+ assets,
11590
+ exitStreaming
11591
+ ]);
11592
+ const onPhotoCapture = async (videoElement)=>{
11593
+ const timestamp = Date.now();
11594
+ setAssetLoading("picture");
11595
+ const image = await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).captureVideo(videoElement);
11596
+ const { url: url , assetId: assetId } = await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).saveCapture(image);
11597
+ setAssetLoading(null);
11598
+ setAssets([
11599
+ ...assets,
11600
+ {
11601
+ type: "picture",
11602
+ timestamp: timestamp,
11603
+ objectUrl: url,
11604
+ assetId: assetId
11605
+ }
11606
+ ]);
11607
+ };
11608
+ const removeAsset = (0, $3Sbms$useCallback)(async (asset)=>{
11609
+ if (!asset.assetId) return;
11610
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).deleteCapture(asset.assetId);
11611
+ const newAssets = assets.filter((item)=>item.assetId !== asset.assetId);
11612
+ setAssets(newAssets);
11613
+ if (newAssets.length < 1) setIsAssetsPopupStateOpen(false);
11614
+ }, [
11615
+ assets
11616
+ ]);
11617
+ (0, $3Sbms$useEffect)(()=>{
11618
+ if (startRecordTime === undefined) return;
11619
+ const interval = setInterval(()=>{
11620
+ const delta = (Date.now() - startRecordTime) / 1000;
11621
+ setTimer(delta);
11622
+ }, 1000);
11623
+ return ()=>clearInterval(interval);
11624
+ }, [
11625
+ startRecordTime
11626
+ ]);
11627
+ (0, $3Sbms$useEffect)(()=>{
11628
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("localVideoAvailable", onLocalVideoChange);
11629
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("localVideoChange", onLocalVideoChange);
11630
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("recordStopped", onStopRecord);
11631
+ return ()=>{
11632
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("localVideoChange", onLocalVideoChange);
11633
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("localVideoAvailable", onLocalVideoChange);
11634
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).removeEventListener("recordStopped", onStopRecord);
11635
+ };
11636
+ }, [
11637
+ onStopRecord
11638
+ ]);
11639
+ return /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11640
+ className: "bg-[#000] w-full h-full justify-center flex flex-col antialiased inter",
11641
+ children: [
11642
+ !menuBarState.photo && /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11643
+ className: "text-base text-white text-center font-medium pt-2.5",
11644
+ children: $92672d57809ea9d3$var$timerText(timer)
11645
+ }),
11646
+ /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11647
+ className: "flex-1 min-h-0 p-2.5",
11648
+ children: /*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
11649
+ className: "relative w-full h-full rounded-[10px]",
11650
+ children: [
11651
+ countdownVisible && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $db82628e5503d51b$export$53819c0e58f98d49), {
11652
+ initialValue: 3,
11653
+ onFinish: ()=>{
11654
+ setCountdownVisible(false);
11655
+ setStartRecordTime(Date.now());
11656
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).startRecord();
11657
+ }
11658
+ }),
11659
+ flashAnimation && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $6efc75079651494a$export$2b501aee548bae06), {
11660
+ onAnimationEnd: ()=>{
11661
+ setFlashAnimation(false);
11662
+ assetsPopupState.open();
11663
+ }
11664
+ }),
11665
+ /*#__PURE__*/ (0, $3Sbms$jsx)("video", {
11666
+ autoPlay: true,
11667
+ muted: true,
11668
+ playsInline: true,
11669
+ ref: videoElementRef,
11670
+ className: (0, $3Sbms$classnames)("w-full h-full object-cover rounded-[inherit]", {
11671
+ "scale-x-[-1]": facingMode === "user"
11672
+ })
11673
+ })
11674
+ ]
11675
+ })
11676
+ }),
11677
+ /*#__PURE__*/ (0, $3Sbms$jsx)("div", {
11678
+ className: "flex justify-center px-2.5 pb-2.5",
11679
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $a94f21ef9007b90a$export$11a6fe490bbc4873), {
11680
+ state: menuBarState,
11681
+ thumbnail: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $c7542aa0d9bb5f39$export$1cd1efc78cb52ca5), {
11682
+ asset: assets[assets.length - 1],
11683
+ onClick: assetsPopupState.open
11684
+ }),
11685
+ onSwitch: ()=>{
11686
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).rotateVideo();
11687
+ },
11688
+ onCapturePress: ()=>{
11689
+ if (menuBarState.photo && videoElementRef.current) {
11690
+ onPhotoCapture(videoElementRef.current);
11691
+ setFlashAnimation(true);
11692
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).captureVideo(videoElementRef.current);
11693
+ }
11694
+ if (!menuBarState.photo && !menuBarState.streaming) {
11695
+ menuBarState.setStreaming(true);
11696
+ setTimer(0);
11697
+ setCountdownVisible(true);
11698
+ }
11699
+ if (!menuBarState.photo && menuBarState.streaming) {
11700
+ exitStreaming();
11701
+ if (startRecordTime) {
11702
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).stopRecord();
11703
+ setAssetLoading("video");
11704
+ assetsPopupState.open();
11705
+ }
11706
+ }
11707
+ }
11708
+ })
11709
+ }),
11710
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $d4d374dc7955cc18$export$5c334f209b1aa661), {
11711
+ assets: assets,
11712
+ state: assetsPopupState,
11713
+ onSendAssets: ()=>{
11714
+ (0, $c9e496369b59be7a$export$2f377c2162fd02b2).release();
11715
+ sendAssetsModalState.open();
11716
+ },
11717
+ removeAsset: removeAsset,
11718
+ loading: assetLoading
11719
+ }),
11720
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $c0bb66c3d546ed81$export$2b77a92f1a5ad772), {
11721
+ title: "Thank you for your submission!",
11722
+ state: sendAssetsModalState,
11723
+ isDismissable: false,
11724
+ children: /*#__PURE__*/ (0, $3Sbms$jsx)("span", {
11725
+ className: "text-base text-primaryLight",
11726
+ children: "Your photo/video has been successfully sent. We will review it and get back to you soon."
11727
+ })
11728
+ })
11729
+ ]
11730
+ });
11731
+ };
11732
+
11733
+
11734
+
11735
+
11736
+
11737
+ const $759492438a7a357d$export$7f7cbe89f1eacd2 = (0, $3Sbms$styledcomponents).div`
11738
+ border: 2px solid #ffffff;
11739
+ border-top: 2px solid #000000;
11740
+ border-radius: 50%;
11741
+ width: 24px;
11742
+ height: 24px;
11743
+ animation: spin 1s linear infinite;
11744
+ @keyframes spin {
11745
+ 0% {
11746
+ transform: rotate(0deg);
11747
+ }
11748
+ 100% {
11749
+ transform: rotate(360deg);
11750
+ }
11751
+ }
11752
+ `;
11753
+ const $759492438a7a357d$export$3b0d6d7590275603 = (0, $3Sbms$styledcomponents).div`
11754
+ position: absolute;
11755
+ background-color: #000000;
11756
+ opacity: 0.9;
11757
+ z-index: 999999;
11758
+ display: flex;
11759
+ vertical-align: middle;
11760
+ align-items: center;
11761
+ top: 0px;
11762
+ right: 0px;
11763
+ bottom: 0px;
11764
+ left: 0px;
11765
+ gap: 0.25rem;
11766
+ `;
11767
+ const $759492438a7a357d$export$42a852a2b6b56249 = (0, $3Sbms$styledcomponents).div`
11768
+ display: flex;
11769
+ gap: 25px;
11770
+ width: 100%;
11771
+ margin-left: auto;
11772
+ margin-right: auto;
11773
+ justify-content: center;
11774
+ align-items: center;
11775
+ vertical-align: middle;
11776
+ `;
11777
+ const $759492438a7a357d$export$52e284bf30d0364a = (0, $3Sbms$styledcomponents).h2`
11778
+ color: #ffffff;
11779
+ font-weight: 500;
11780
+ font-size: 14px;
11781
+ font-family: 'Lato';
11782
+ `;
11783
+
11784
+
11785
+ const $91d20ee7d2ade85c$export$669f6ea7d267feaf = ()=>{
11786
+ const { t: t } = (0, $3Sbms$useTranslation)();
11787
+ return /*#__PURE__*/ (0, $3Sbms$jsx)((0, $759492438a7a357d$export$3b0d6d7590275603), {
11788
+ children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $759492438a7a357d$export$42a852a2b6b56249), {
11789
+ children: [
11790
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $759492438a7a357d$export$7f7cbe89f1eacd2), {}),
11791
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $759492438a7a357d$export$52e284bf30d0364a), {
11792
+ children: t("loader.connection")
11793
+ })
11794
+ ]
11795
+ })
11796
+ });
11797
+ };
11798
+
11799
+
11800
+ const $26ed036cbc17809a$var$currentTheme = (0, $52580db2e49cdd90$export$3bfd0d5209a8006a)();
11801
+ const $26ed036cbc17809a$var$currentLanguage = (0, $a3e657fb86ae23f3$export$604ba5624273df44)();
11802
+ let $26ed036cbc17809a$var$timestampCriticalError = -1;
11803
+ const $26ed036cbc17809a$var$StreamUI = ({ options: options })=>{
11804
+ const [selfPeerId, setSelfPeerId] = (0, $3Sbms$useState)(undefined);
11805
+ const streamUIContainerRef = (0, $3Sbms$useRef)(null);
11806
+ const videosContainerRef = (0, $3Sbms$useRef)(null);
11807
+ const remoteTilesContainerRef = (0, $3Sbms$useRef)(null);
11808
+ const [streamState, setStreamState] = (0, $3Sbms$useState)(options.recorder ? "recorder" : "streaming");
11809
+ const [isQuickConnectPopupVisible, setIsQuickConnectPopupVisible] = (0, $3Sbms$useState)(false);
11810
+ const [isSettingsMenuVisible, setIsSettingsMenuVisible] = (0, $3Sbms$useState)(false);
11811
+ const [isYoutubePopupVisible, setIsYoutubePopupVisible] = (0, $3Sbms$useState)(false);
11812
+ const [isLinksharePopupVisible, setIsLinksharePopupVisible] = (0, $3Sbms$useState)(false);
11813
+ const [isVirtualBackgroundPopupVisible, setIsVirtualBackgroundPopupVisible] = (0, $3Sbms$useState)(false);
11814
+ const [theme, setTheme] = (0, $3Sbms$useState)($26ed036cbc17809a$var$currentTheme);
11815
+ const [language, setLanguage] = (0, $3Sbms$useState)(options.language || $26ed036cbc17809a$var$currentLanguage);
11816
+ const [profile, setProfile] = (0, $3Sbms$useState)({});
11817
+ const [muted, setMuted] = (0, $3Sbms$useState)(true);
11818
+ const [streaming, setStreaming] = (0, $3Sbms$useState)(false);
11819
+ const [isLoading, setLoading] = (0, $3Sbms$useState)(!options.recorder);
11820
+ const [screensharing, setScreensharing] = (0, $3Sbms$useState)(false);
11821
+ const [isAgent, setIsAgent] = (0, $3Sbms$useState)(false);
11822
+ const [userInteractionTriggered, setUserInteractionTriggered] = (0, $3Sbms$useState)(false);
11823
+ const [containerWidth, containerHeight] = (0, $af23c74942bdcae7$export$2b86bedf890eab8)(streamUIContainerRef.current);
11824
+ const [isBlockedDevicesPopupOpen, setBlockedDevicesPopupOpen] = (0, $3Sbms$useState)(false);
11825
+ const [isBlockedFeaturePopupOpen, setBlockedFeaturePopupOpen] = (0, $3Sbms$useState)(false);
11826
+ const [permissions, setPermissions] = (0, $3Sbms$useState)([]);
11827
+ const [plan, setPlan] = (0, $3Sbms$useState)(undefined);
11828
+ const orientation = (containerWidth || window.screen.width) > (containerHeight || window.screen.height) ? "landscape" : "portrait";
11829
+ const styledTheme = theme === "dark" ? (0, $52580db2e49cdd90$export$3e936a8db52a10a0) : (0, $52580db2e49cdd90$export$f30cb9bc4f736419);
11830
+ const onWebcamUpdate = (event)=>{
11831
+ if (event.type === "localVideoAvailable") setStreaming(true);
11832
+ else setStreaming(false);
11833
+ };
11834
+ const onScreenshareUpdate = (event)=>{
11835
+ if (event.type === "screenshareEnabled") setScreensharing(true);
11836
+ else setScreensharing(false);
11837
+ };
11838
+ const onMicrophoneUpdate = (event)=>{
11839
+ if (event.type === "microphoneMute") setMuted(true);
11840
+ else setMuted(false);
11841
+ };
11842
+ const onDefaultAudioDeviceChange = (event)=>{
11843
+ const micro = event.detail.label;
11844
+ (0, $a5146f9062d7bf28$export$3a57e165650c636f)(`Connected to ${micro}`, {
11845
+ duration: 3000,
11846
+ icon: /*#__PURE__*/ (0, $3Sbms$jsx)((0, $6043ae1b48c5aa97$export$2e2bcd8739ae039), {}),
11847
+ messageStyle: {
11848
+ fontWeight: 600
11849
+ }
11850
+ });
11851
+ };
11852
+ const onSelfProfileUpdate = (event)=>{
11853
+ const { profile: profile } = event.detail;
11854
+ setProfile(profile);
11855
+ };
11856
+ const onCallEnd = ()=>{
11857
+ (0, $15a01b611391c1e7$export$716eeec86fd18da7)();
11858
+ setStreamState("ended");
11859
+ setMuted(true);
11860
+ setStreaming(false);
11861
+ setScreensharing(false);
11862
+ setUserInteractionTriggered(false);
11863
+ };
11864
+ const onCallTerminated = ()=>{
11865
+ (0, $15a01b611391c1e7$export$716eeec86fd18da7)();
11866
+ setStreamState("terminated");
11867
+ };
11868
+ const onInvalidRoom = ()=>{
11869
+ setStreamState("expired");
11870
+ };
11871
+ const onAgentIdentity = (event)=>{
11872
+ const { success: success , email: email } = event.detail;
11873
+ if (success) {
11874
+ setIsAgent(true);
11875
+ if (email) (0, $3Sbms$hotjarbrowser).identify(null, {
11876
+ email: email
11877
+ });
11878
+ } else (0, $3Sbms$reacthottoast)("An error occured while trying to join the room as an agent", {
11879
+ className: "error"
11880
+ });
11881
+ };
11882
+ const onCriticalError = (event)=>{
11883
+ const duration = 20000;
11884
+ const now = Date.now();
11885
+ if (event.detail.code === "USERLIMIT") {
11886
+ setStreamState("full");
11887
+ return;
11888
+ }
11889
+ if ($26ed036cbc17809a$var$timestampCriticalError !== -1 && $26ed036cbc17809a$var$timestampCriticalError + duration > now) return;
11890
+ $26ed036cbc17809a$var$timestampCriticalError = now;
11891
+ (0, $a5146f9062d7bf28$export$3a57e165650c636f)(`A critical error has occurred (error ${event.detail.code}).`, {
11892
+ icon: (0, $93a0377c243d965e$export$c7df1b15b59b1df2),
11893
+ button: {
11894
+ text: "Reload",
11895
+ action: ()=>{
11896
+ window.location.reload();
11897
+ }
11898
+ },
11899
+ duration: duration
11900
+ });
11901
+ };
11902
+ (0, $3Sbms$useEffect)(()=>{
11903
+ try {
11904
+ localStorage.setItem("stream_ui_theme", theme);
11905
+ } catch (localStorageError) {
11906
+ console.warn(localStorageError);
11907
+ }
11908
+ }, [
11909
+ theme
11910
+ ]);
11911
+ (0, $3Sbms$useEffect)(()=>{
11912
+ try {
10393
11913
  localStorage.setItem("stream_ui_language", language);
10394
11914
  (0, $384d985bb9605c35$export$2e2bcd8739ae039).changeLanguage(language);
10395
11915
  } catch (localStorageError) {
@@ -10437,12 +11957,14 @@ const $26ed036cbc17809a$var$StreamUI = ({ options: options })=>{
10437
11957
  setPermissions(event.detail.permissions);
10438
11958
  console.log(event.detail.permissions);
10439
11959
  setSelfPeerId(peerId);
10440
- try {
11960
+ if (!options.recorder) try {
10441
11961
  await (0, $15a01b611391c1e7$export$494039379563c94d)(options);
10442
11962
  setUserInteractionTriggered(true);
10443
11963
  } catch (userInteractionError) {
10444
11964
  setBlockedDevicesPopupOpen(true);
10445
11965
  console.error("User interaction trigger failed", userInteractionError);
11966
+ } finally{
11967
+ setLoading(false);
10446
11968
  }
10447
11969
  };
10448
11970
  (0, $c9e496369b59be7a$export$2f377c2162fd02b2).addEventListener("enterRoom", onEnterRoom);
@@ -10479,7 +12001,7 @@ const $26ed036cbc17809a$var$StreamUI = ({ options: options })=>{
10479
12001
  language: language,
10480
12002
  setLanguage: setLanguage,
10481
12003
  options: options,
10482
- profile: profile1,
12004
+ profile: profile,
10483
12005
  muted: muted,
10484
12006
  streaming: streaming,
10485
12007
  screensharing: screensharing,
@@ -10495,6 +12017,7 @@ const $26ed036cbc17809a$var$StreamUI = ({ options: options })=>{
10495
12017
  /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $4fb4815baa04b470$export$914ddf2021ea8ee6), {
10496
12018
  ref: streamUIContainerRef,
10497
12019
  children: [
12020
+ isLoading && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $91d20ee7d2ade85c$export$669f6ea7d267feaf), {}),
10498
12021
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $3a42b2ef7646d035$export$2e2bcd8739ae039), {}),
10499
12022
  /*#__PURE__*/ (0, $3Sbms$jsx)((0, $805d92fa41e6e1b0$export$2e2bcd8739ae039), {}),
10500
12023
  isBlockedDevicesPopupOpen && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $6aca0f707e80bf63$export$2e2bcd8739ae039), {
@@ -10503,6 +12026,7 @@ const $26ed036cbc17809a$var$StreamUI = ({ options: options })=>{
10503
12026
  setBlockedDevicesPopupOpen(false);
10504
12027
  }
10505
12028
  }),
12029
+ streamState === "recorder" && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $92672d57809ea9d3$export$336a011955157f9a), {}),
10506
12030
  streamState === "streaming" && /*#__PURE__*/ (0, $3Sbms$jsx)((0, $3Sbms$Fragment), {
10507
12031
  children: /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $cce9fd41d8a55a18$export$74636703cfe1eecf), {
10508
12032
  children: [
@@ -10614,6 +12138,7 @@ const $35c6a4b506b7dc62$export$ae01dedf5c052bb = (0, $3Sbms$styledcomponents).vi
10614
12138
  background-color: black;
10615
12139
  border-radius: 15px;
10616
12140
  object-fit: cover;
12141
+ transform: scale(-1, 1);
10617
12142
  `;
10618
12143
  const $35c6a4b506b7dc62$export$778ed67917f5eacf = (0, $3Sbms$styledcomponents).div`
10619
12144
  display: flex;
@@ -10774,14 +12299,14 @@ const $f8d57e3d223f5089$var$GreetingView = ({ onGreetingDone: onGreetingDone })
10774
12299
  const [mainContainerRef, { width: width , height: height }] = (0, $af23c74942bdcae7$export$e295b0c537d32d7d)();
10775
12300
  const inputRef = (0, $3Sbms$useRef)(null);
10776
12301
  const videoRef = (0, $3Sbms$useRef)(null);
10777
- const [videoTrack1, setVideoTrack] = (0, $3Sbms$useState)(undefined);
12302
+ const [videoTrack, setVideoTrack] = (0, $3Sbms$useState)(undefined);
10778
12303
  const [micEnabled, setMicEnabled] = (0, $3Sbms$useState)(false);
10779
12304
  const [joining, setJoining] = (0, $3Sbms$useState)(false);
10780
12305
  const desktop = width >= height;
10781
12306
  const onSubmit = ()=>{
10782
12307
  const displayName = inputRef.current?.value;
10783
- const cameraEnabled = Boolean(videoTrack1);
10784
- videoTrack1?.stop();
12308
+ const cameraEnabled = Boolean(videoTrack);
12309
+ videoTrack?.stop();
10785
12310
  setJoining(true);
10786
12311
  setTimeout(()=>{
10787
12312
  onGreetingDone({
@@ -10804,15 +12329,15 @@ const $f8d57e3d223f5089$var$GreetingView = ({ onGreetingDone: onGreetingDone })
10804
12329
  }
10805
12330
  };
10806
12331
  const onCameraClick = (0, $3Sbms$useCallback)(async ()=>{
10807
- if (!videoTrack1) await getUserMedia({
12332
+ if (!videoTrack) await getUserMedia({
10808
12333
  video: true
10809
12334
  });
10810
12335
  else {
10811
- videoTrack1.stop();
12336
+ videoTrack.stop();
10812
12337
  setVideoTrack(undefined);
10813
12338
  }
10814
12339
  }, [
10815
- videoTrack1
12340
+ videoTrack
10816
12341
  ]);
10817
12342
  const onMicrophoneClick = (0, $3Sbms$useCallback)(async ()=>{
10818
12343
  if (!micEnabled) await getUserMedia({
@@ -10824,14 +12349,14 @@ const $f8d57e3d223f5089$var$GreetingView = ({ onGreetingDone: onGreetingDone })
10824
12349
  ]);
10825
12350
  (0, $3Sbms$useEffect)(()=>{
10826
12351
  if (videoRef.current) {
10827
- if (videoTrack1) videoRef.current.srcObject = new MediaStream([
10828
- videoTrack1
12352
+ if (videoTrack) videoRef.current.srcObject = new MediaStream([
12353
+ videoTrack
10829
12354
  ]);
10830
12355
  else videoRef.current.srcObject = null;
10831
12356
  }
10832
12357
  }, [
10833
12358
  videoRef,
10834
- videoTrack1,
12359
+ videoTrack,
10835
12360
  width,
10836
12361
  height
10837
12362
  ]);
@@ -10848,7 +12373,7 @@ const $f8d57e3d223f5089$var$GreetingView = ({ onGreetingDone: onGreetingDone })
10848
12373
  height: 40
10849
12374
  })
10850
12375
  });
10851
- const webcamEnabled = Boolean(videoTrack1);
12376
+ const webcamEnabled = Boolean(videoTrack);
10852
12377
  return /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $35c6a4b506b7dc62$export$d653589df987fd93), {
10853
12378
  ref: mainContainerRef,
10854
12379
  children: [
@@ -10947,10 +12472,19 @@ const $f8d57e3d223f5089$var$GreetingView = ({ onGreetingDone: onGreetingDone })
10947
12472
  var $f8d57e3d223f5089$export$2e2bcd8739ae039 = $f8d57e3d223f5089$var$GreetingView;
10948
12473
 
10949
12474
 
12475
+ var $1e2747ca72d0ab49$exports = {};
12476
+ $1e2747ca72d0ab49$exports = "*, :before, :after, ::backdrop {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: #3b82f680;\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n}\n\n.visible {\n visibility: visible;\n}\n\n.fixed {\n position: fixed;\n}\n\n.absolute {\n position: absolute;\n}\n\n.relative {\n position: relative;\n}\n\n.inset-0 {\n inset: 0;\n}\n\n.left-0 {\n left: 0;\n}\n\n.top-0 {\n top: 0;\n}\n\n.z-50 {\n z-index: 50;\n}\n\n.z-\\[100\\] {\n z-index: 100;\n}\n\n.z-\\[1\\] {\n z-index: 1;\n}\n\n.m-\\[10px\\] {\n margin: 10px;\n}\n\n.mx-\\[20px\\] {\n margin-left: 20px;\n margin-right: 20px;\n}\n\n.ml-\\[10px\\] {\n margin-left: 10px;\n}\n\n.mt-\\[10px\\] {\n margin-top: 10px;\n}\n\n.mt-\\[50px\\] {\n margin-top: 50px;\n}\n\n.block {\n display: block;\n}\n\n.inline {\n display: inline;\n}\n\n.flex {\n display: flex;\n}\n\n.table {\n display: table;\n}\n\n.hidden {\n display: none;\n}\n\n.h-full {\n height: 100%;\n}\n\n.h-\\[150px\\] {\n height: 150px;\n}\n\n.h-\\[60px\\] {\n height: 60px;\n}\n\n.h-\\[72px\\] {\n height: 72px;\n}\n\n.h-\\[56px\\] {\n height: 56px;\n}\n\n.h-\\[40px\\] {\n height: 40px;\n}\n\n.h-\\[235px\\] {\n height: 235px;\n}\n\n.h-\\[93px\\] {\n height: 93px;\n}\n\n.h-screen {\n height: 100vh;\n}\n\n.h-fit {\n height: -moz-fit-content;\n height: fit-content;\n}\n\n.h-\\[24px\\] {\n height: 24px;\n}\n\n.h-\\[30px\\] {\n height: 30px;\n}\n\n.h-\\[70px\\] {\n height: 70px;\n}\n\n.min-h-0 {\n min-height: 0;\n}\n\n.min-h-\\[100\\%\\] {\n min-height: 100%;\n}\n\n.w-full {\n width: 100%;\n}\n\n.w-\\[60px\\] {\n width: 60px;\n}\n\n.w-\\[72px\\] {\n width: 72px;\n}\n\n.w-\\[56px\\] {\n width: 56px;\n}\n\n.w-\\[76px\\] {\n width: 76px;\n}\n\n.w-screen {\n width: 100vw;\n}\n\n.w-\\[360px\\] {\n width: 360px;\n}\n\n.w-\\[400px\\] {\n width: 400px;\n}\n\n.w-\\[320px\\] {\n width: 320px;\n}\n\n.w-\\[24px\\] {\n width: 24px;\n}\n\n.w-\\[30px\\] {\n width: 30px;\n}\n\n.w-\\[70px\\] {\n width: 70px;\n}\n\n.min-w-\\[100\\%\\] {\n min-width: 100%;\n}\n\n.min-w-\\[24px\\] {\n min-width: 24px;\n}\n\n.max-w-\\[400px\\] {\n max-width: 400px;\n}\n\n.max-w-\\[600px\\] {\n max-width: 600px;\n}\n\n.max-w-\\[800px\\] {\n max-width: 800px;\n}\n\n.flex-1 {\n flex: 1;\n}\n\n.flex-auto {\n flex: auto;\n}\n\n.flex-grow {\n flex-grow: 1;\n}\n\n.translate-y-2 {\n --tw-translate-y: .5rem;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.translate-y-0 {\n --tw-translate-y: 0px;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.translate-y-\\[200\\%\\] {\n --tw-translate-y: 200%;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.translate-y-full {\n --tw-translate-y: 100%;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.scale-\\[0\\.4\\] {\n --tw-scale-x: .4;\n --tw-scale-y: .4;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.scale-x-\\[-1\\] {\n --tw-scale-x: -1;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.transform {\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.cursor-not-allowed {\n cursor: not-allowed;\n}\n\n.cursor-pointer {\n cursor: pointer;\n}\n\n.resize {\n resize: both;\n}\n\n.flex-row {\n flex-direction: row;\n}\n\n.flex-col {\n flex-direction: column;\n}\n\n.flex-wrap {\n flex-wrap: wrap;\n}\n\n.items-end {\n align-items: flex-end;\n}\n\n.items-center {\n align-items: center;\n}\n\n.justify-end {\n justify-content: flex-end;\n}\n\n.justify-center {\n justify-content: center;\n}\n\n.justify-between {\n justify-content: space-between;\n}\n\n.gap-\\[5px\\] {\n gap: 5px;\n}\n\n.gap-2\\.5 {\n gap: .625rem;\n}\n\n.gap-2 {\n gap: .5rem;\n}\n\n.gap-\\[10px\\] {\n gap: 10px;\n}\n\n.gap-5 {\n gap: 1.25rem;\n}\n\n.gap-\\[20px\\] {\n gap: 20px;\n}\n\n.overflow-auto {\n overflow: auto;\n}\n\n.overflow-hidden {\n overflow: hidden;\n}\n\n.rounded-lg {\n border-radius: .5rem;\n}\n\n.rounded-md {\n border-radius: .375rem;\n}\n\n.rounded-\\[15px\\] {\n border-radius: 15px;\n}\n\n.rounded-full {\n border-radius: 9999px;\n}\n\n.rounded-\\[5px\\] {\n border-radius: 5px;\n}\n\n.rounded-\\[60px\\] {\n border-radius: 60px;\n}\n\n.rounded-\\[10px\\] {\n border-radius: 10px;\n}\n\n.rounded-\\[inherit\\] {\n border-radius: inherit;\n}\n\n.rounded-\\[8px\\] {\n border-radius: 8px;\n}\n\n.rounded-\\[50\\%\\] {\n border-radius: 50%;\n}\n\n.rounded-t-\\[15px\\] {\n border-top-left-radius: 15px;\n border-top-right-radius: 15px;\n}\n\n.border {\n border-width: 1px;\n}\n\n.border-secondaryLight {\n --tw-border-opacity: 1;\n border-color: rgb(179 179 179 / var(--tw-border-opacity));\n}\n\n.border-primaryLight {\n --tw-border-opacity: 1;\n border-color: rgb(86 86 86 / var(--tw-border-opacity));\n}\n\n.bg-primaryLight {\n --tw-bg-opacity: 1;\n background-color: rgb(86 86 86 / var(--tw-bg-opacity));\n}\n\n.bg-primary {\n --tw-bg-opacity: 1;\n background-color: rgb(29 28 32 / var(--tw-bg-opacity));\n}\n\n.bg-graySelected {\n --tw-bg-opacity: 1;\n background-color: rgb(245 245 245 / var(--tw-bg-opacity));\n}\n\n.bg-transparent {\n background-color: #0000;\n}\n\n.bg-white {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity));\n}\n\n.bg-black\\/\\[\\.6\\] {\n background-color: #0009;\n}\n\n.bg-\\[\\#f12828\\] {\n --tw-bg-opacity: 1;\n background-color: rgb(241 40 40 / var(--tw-bg-opacity));\n}\n\n.bg-\\[\\#565656\\] {\n --tw-bg-opacity: 1;\n background-color: rgb(86 86 86 / var(--tw-bg-opacity));\n}\n\n.bg-black, .bg-\\[\\#000\\] {\n --tw-bg-opacity: 1;\n background-color: rgb(0 0 0 / var(--tw-bg-opacity));\n}\n\n.bg-\\[\\#FFFFFF\\] {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity));\n}\n\n.bg-underlay {\n background-color: #00000040;\n}\n\n.bg-\\[\\#f3f3f3\\] {\n --tw-bg-opacity: 1;\n background-color: rgb(243 243 243 / var(--tw-bg-opacity));\n}\n\n.bg-secondaryVLight {\n --tw-bg-opacity: 1;\n background-color: rgb(235 235 235 / var(--tw-bg-opacity));\n}\n\n.bg-opacity-90 {\n --tw-bg-opacity: .9;\n}\n\n.object-cover {\n object-fit: cover;\n}\n\n.p-2\\.5 {\n padding: .625rem;\n}\n\n.p-2 {\n padding: .5rem;\n}\n\n.p-\\[3px\\] {\n padding: 3px;\n}\n\n.p-\\[12px\\] {\n padding: 12px;\n}\n\n.py-3 {\n padding-top: .75rem;\n padding-bottom: .75rem;\n}\n\n.px-4 {\n padding-left: 1rem;\n padding-right: 1rem;\n}\n\n.py-\\[9px\\] {\n padding-top: 9px;\n padding-bottom: 9px;\n}\n\n.px-3\\.5 {\n padding-left: .875rem;\n padding-right: .875rem;\n}\n\n.px-3 {\n padding-left: .75rem;\n padding-right: .75rem;\n}\n\n.py-2 {\n padding-top: .5rem;\n padding-bottom: .5rem;\n}\n\n.py-1\\.5 {\n padding-top: .375rem;\n padding-bottom: .375rem;\n}\n\n.px-2\\.5 {\n padding-left: .625rem;\n padding-right: .625rem;\n}\n\n.py-1 {\n padding-top: .25rem;\n padding-bottom: .25rem;\n}\n\n.px-2 {\n padding-left: .5rem;\n padding-right: .5rem;\n}\n\n.px-\\[10px\\] {\n padding-left: 10px;\n padding-right: 10px;\n}\n\n.px-5 {\n padding-left: 1.25rem;\n padding-right: 1.25rem;\n}\n\n.py-\\[25px\\] {\n padding-top: 25px;\n padding-bottom: 25px;\n}\n\n.px-\\[20px\\] {\n padding-left: 20px;\n padding-right: 20px;\n}\n\n.pt-2\\.5 {\n padding-top: .625rem;\n}\n\n.pt-2 {\n padding-top: .5rem;\n}\n\n.pb-2\\.5 {\n padding-bottom: .625rem;\n}\n\n.pb-2 {\n padding-bottom: .5rem;\n}\n\n.pb-\\[25px\\] {\n padding-bottom: 25px;\n}\n\n.pb-\\[20px\\] {\n padding-bottom: 20px;\n}\n\n.text-center {\n text-align: center;\n}\n\n.text-base {\n letter-spacing: -.02em;\n font-size: 16px;\n line-height: 19px;\n}\n\n.text-sm {\n letter-spacing: -.02em;\n font-size: 14px;\n line-height: 17px;\n}\n\n.text-xs {\n letter-spacing: -.02em;\n font-size: 12px;\n line-height: 14px;\n}\n\n.text-\\[112px\\] {\n font-size: 112px;\n}\n\n.text-xl {\n letter-spacing: -.02em;\n font-size: 20px;\n line-height: 24px;\n}\n\n.text-lg {\n letter-spacing: -.02em;\n font-size: 18px;\n line-height: 22px;\n}\n\n.font-medium {\n font-weight: 500;\n}\n\n.font-bold {\n font-weight: 700;\n}\n\n.font-normal {\n font-weight: 400;\n}\n\n.leading-\\[20px\\] {\n line-height: 20px;\n}\n\n.text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n\n.text-primary {\n --tw-text-opacity: 1;\n color: rgb(29 28 32 / var(--tw-text-opacity));\n}\n\n.text-white\\/80 {\n color: #fffc;\n}\n\n.text-secondary {\n --tw-text-opacity: 1;\n color: rgb(134 134 134 / var(--tw-text-opacity));\n}\n\n.text-primaryLight {\n --tw-text-opacity: 1;\n color: rgb(86 86 86 / var(--tw-text-opacity));\n}\n\n.text-black {\n --tw-text-opacity: 1;\n color: rgb(0 0 0 / var(--tw-text-opacity));\n}\n\n.underline {\n text-decoration-line: underline;\n}\n\n.antialiased {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.opacity-0 {\n opacity: 0;\n}\n\n.opacity-50 {\n opacity: .5;\n}\n\n.opacity-\\[0\\.4\\] {\n opacity: .4;\n}\n\n.opacity-90 {\n opacity: .9;\n}\n\n.outline {\n outline-style: solid;\n}\n\n.ring-\\[3px\\] {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n\n.ring-cta {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgb(38 138 250 / var(--tw-ring-opacity));\n}\n\n.blur {\n --tw-blur: blur(8px);\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n\n.filter {\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n\n.transition {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter, backdrop-filter;\n transition-duration: .15s;\n transition-timing-function: cubic-bezier(.4, 0, .2, 1);\n}\n\n.transition-colors {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;\n transition-duration: .15s;\n transition-timing-function: cubic-bezier(.4, 0, .2, 1);\n}\n\n.transition-\\[transform\\,border-radius\\] {\n transition-property: transform, border-radius;\n transition-duration: .15s;\n transition-timing-function: cubic-bezier(.4, 0, .2, 1);\n}\n\n.duration-300 {\n transition-duration: .3s;\n}\n\n.ease-in-out {\n transition-timing-function: cubic-bezier(.4, 0, .2, 1);\n}\n\n.ease-in {\n transition-timing-function: cubic-bezier(.4, 0, 1, 1);\n}\n\n.ease-out {\n transition-timing-function: cubic-bezier(0, 0, .2, 1);\n}\n\n.inter {\n font-family: Inter, sans-serif;\n}\n\n@supports (font-variation-settings: normal) {\n .inter {\n font-family: Inter var, sans-serif;\n }\n}\n\n.first-letter\\:capitalize:first-letter {\n text-transform: capitalize;\n}\n\n.focus\\:outline-none:focus {\n outline-offset: 2px;\n outline: 2px solid #0000;\n}\n\n.disabled\\:bg-secondaryLight:disabled {\n --tw-bg-opacity: 1;\n background-color: rgb(179 179 179 / var(--tw-bg-opacity));\n}\n\n.disabled\\:bg-graySelected:disabled {\n --tw-bg-opacity: 1;\n background-color: rgb(245 245 245 / var(--tw-bg-opacity));\n}\n\n.disabled\\:text-secondaryLight:disabled {\n --tw-text-opacity: 1;\n color: rgb(179 179 179 / var(--tw-text-opacity));\n}\n\n";
12477
+
12478
+
12479
+ var $e02c50a47b475960$exports = {};
12480
+ $e02c50a47b475960$exports = "*, :before, :after {\n box-sizing: border-box;\n border: 0 solid #e5e7eb;\n}\n\n:before, :after {\n --tw-content: \"\";\n}\n\nhtml {\n -webkit-text-size-adjust: 100%;\n tab-size: 4;\n font-feature-settings: normal;\n font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;\n line-height: 1.5;\n}\n\nbody {\n line-height: inherit;\n margin: 0;\n}\n\nhr {\n height: 0;\n color: inherit;\n border-top-width: 1px;\n}\n\nabbr:where([title]) {\n text-decoration: underline dotted;\n}\n\nh1, h2, h3, h4, h5, h6 {\n font-size: inherit;\n font-weight: inherit;\n}\n\na {\n color: inherit;\n text-decoration: inherit;\n}\n\nb, strong {\n font-weight: bolder;\n}\n\ncode, kbd, samp, pre {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace;\n font-size: 1em;\n}\n\nsmall {\n font-size: 80%;\n}\n\nsub, sup {\n vertical-align: baseline;\n font-size: 75%;\n line-height: 0;\n position: relative;\n}\n\nsub {\n bottom: -.25em;\n}\n\nsup {\n top: -.5em;\n}\n\ntable {\n text-indent: 0;\n border-color: inherit;\n border-collapse: collapse;\n}\n\nbutton, input, optgroup, select, textarea {\n font-family: inherit;\n font-size: 100%;\n font-weight: inherit;\n line-height: inherit;\n color: inherit;\n margin: 0;\n padding: 0;\n}\n\nbutton, select {\n text-transform: none;\n}\n\nbutton, [type=\"button\"], [type=\"reset\"], [type=\"submit\"] {\n -webkit-appearance: button;\n background-color: #0000;\n background-image: none;\n}\n\n:-moz-focusring {\n outline: auto;\n}\n\n:-moz-ui-invalid {\n box-shadow: none;\n}\n\nprogress {\n vertical-align: baseline;\n}\n\n::-webkit-inner-spin-button, ::-webkit-outer-spin-button {\n height: auto;\n}\n\n[type=\"search\"] {\n -webkit-appearance: textfield;\n outline-offset: -2px;\n}\n\n::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n::-webkit-file-upload-button {\n -webkit-appearance: button;\n font: inherit;\n}\n\nsummary {\n display: list-item;\n}\n\nblockquote, dl, dd, h1, h2, h3, h4, h5, h6, hr, figure, p, pre {\n margin: 0;\n}\n\nfieldset {\n margin: 0;\n padding: 0;\n}\n\nlegend {\n padding: 0;\n}\n\nol, ul, menu {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n\ntextarea {\n resize: vertical;\n}\n\ninput::placeholder, textarea::placeholder {\n opacity: 1;\n color: #9ca3af;\n}\n\nbutton, [role=\"button\"] {\n cursor: pointer;\n}\n\n:disabled {\n cursor: default;\n}\n\nimg, svg, video, canvas, audio, iframe, embed, object {\n vertical-align: middle;\n display: block;\n}\n\nimg, video {\n max-width: 100%;\n height: auto;\n}\n\n[hidden] {\n display: none;\n}\n\n";
12481
+
12482
+
10950
12483
  const $24075a5d702d64b3$var$currentURL = new URL(window.location.href);
10951
12484
  const $24075a5d702d64b3$var$microphoneEnabled = $24075a5d702d64b3$var$currentURL.searchParams.get("microphone-enabled") !== "0";
10952
12485
  const $24075a5d702d64b3$var$cameraEnabled = $24075a5d702d64b3$var$currentURL.searchParams.get("camera-enabled") === "1";
10953
12486
  const $24075a5d702d64b3$var$defaultOptions = {
12487
+ recorder: false,
10954
12488
  sharedURL: window.location.href,
10955
12489
  showMenuButton: true,
10956
12490
  settingsShortcuts: [
@@ -10980,8 +12514,32 @@ const $24075a5d702d64b3$export$3f94917203ab7078 = {
10980
12514
  if (element?.nodeType !== window.Node.ELEMENT_NODE) throw new Error('The "element" property must be a valid element!');
10981
12515
  const mergedOptions = (0, $365e765f9890497b$export$6969335ea1e4e77c)($24075a5d702d64b3$var$defaultOptions, options);
10982
12516
  const rootElement = (0, $3Sbms$createRoot)(element);
10983
- rootElement.render(/*#__PURE__*/ (0, $3Sbms$jsx)((0, $26ed036cbc17809a$export$2e2bcd8739ae039), {
10984
- options: mergedOptions
12517
+ let styleElement = null;
12518
+ styleElement = /*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Fragment), {
12519
+ children: [
12520
+ options.recorder && /*#__PURE__*/ (0, $3Sbms$jsx)("style", {
12521
+ children: (0, (/*@__PURE__*/$parcel$interopDefault($e02c50a47b475960$exports)))
12522
+ }),
12523
+ /*#__PURE__*/ (0, $3Sbms$jsx)("style", {
12524
+ children: (0, (/*@__PURE__*/$parcel$interopDefault($1e2747ca72d0ab49$exports)))
12525
+ })
12526
+ ]
12527
+ });
12528
+ rootElement.render(/*#__PURE__*/ (0, $3Sbms$jsxs)((0, $3Sbms$Fragment), {
12529
+ children: [
12530
+ styleElement,
12531
+ /*#__PURE__*/ (0, $3Sbms$jsx)("link", {
12532
+ rel: "preconnect",
12533
+ href: "https://rsms.me/"
12534
+ }),
12535
+ /*#__PURE__*/ (0, $3Sbms$jsx)("link", {
12536
+ rel: "stylesheet",
12537
+ href: "https://rsms.me/inter/inter.css"
12538
+ }),
12539
+ /*#__PURE__*/ (0, $3Sbms$jsx)((0, $26ed036cbc17809a$export$2e2bcd8739ae039), {
12540
+ options: mergedOptions
12541
+ })
12542
+ ]
10985
12543
  }));
10986
12544
  if (mergedOptions.tracking) (0, $3Sbms$hotjarbrowser).init(3111933, 6);
10987
12545
  },
@@ -10999,6 +12557,8 @@ const $24075a5d702d64b3$export$3f94917203ab7078 = {
10999
12557
  });
11000
12558
  window.dispatchEvent(event);
11001
12559
  },
12560
+ startRecord: (0, $c9e496369b59be7a$export$2f377c2162fd02b2).startRecord.bind((0, $c9e496369b59be7a$export$2f377c2162fd02b2)),
12561
+ stopRecord: (0, $c9e496369b59be7a$export$2f377c2162fd02b2).stopRecord.bind((0, $c9e496369b59be7a$export$2f377c2162fd02b2)),
11002
12562
  sendNotification: $a5146f9062d7bf28$export$3a57e165650c636f,
11003
12563
  joinRoom: (0, $c9e496369b59be7a$export$2f377c2162fd02b2).init.bind((0, $c9e496369b59be7a$export$2f377c2162fd02b2)),
11004
12564
  leaveRoom: (0, $c9e496369b59be7a$export$2f377c2162fd02b2).endCall.bind((0, $c9e496369b59be7a$export$2f377c2162fd02b2)),