vue-parley 4.2.0 → 4.3.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.
Files changed (60) hide show
  1. package/dist/chat.css +59 -33
  2. package/dist/chunks/{Call-7lGaUPcp.mjs → Call-CPHjSt8T.mjs} +108 -61
  3. package/dist/chunks/Call-CPHjSt8T.mjs.map +1 -0
  4. package/dist/chunks/{Call-D48LfnDv.cjs → Call-DF1buv8M.cjs} +107 -60
  5. package/dist/chunks/Call-DF1buv8M.cjs.map +1 -0
  6. package/dist/chunks/{index-C8N5eSUe.mjs → index-DI5ok4ow.mjs} +150 -145
  7. package/dist/chunks/index-DI5ok4ow.mjs.map +1 -0
  8. package/dist/chunks/{index-DrcpfLUy.cjs → index-DwJwSnRN.cjs} +131 -126
  9. package/dist/chunks/index-DwJwSnRN.cjs.map +1 -0
  10. package/dist/chunks/{session-B8Q7eiUV.mjs → session-BxYnJEOe.mjs} +183 -73
  11. package/dist/chunks/session-BxYnJEOe.mjs.map +1 -0
  12. package/dist/chunks/{session-BwgUu6F3.cjs → session-D2gbmnmM.cjs} +183 -73
  13. package/dist/chunks/session-D2gbmnmM.cjs.map +1 -0
  14. package/dist/index.cjs +1 -1
  15. package/dist/index.mjs +19 -19
  16. package/dist/types/app/components/ChatPage.vue.d.ts.map +1 -1
  17. package/dist/types/app/components/call/Call.vue.d.ts.map +1 -1
  18. package/dist/types/app/components/chat/ChatBubble.vue.d.ts.map +1 -1
  19. package/dist/types/app/components/chat/ChatInput.vue.d.ts.map +1 -1
  20. package/dist/types/app/components/chat/ChatMessages.vue.d.ts.map +1 -1
  21. package/dist/types/app/components/chat/ChatPageBar.vue.d.ts.map +1 -1
  22. package/dist/types/app/components/chat/ChatProfileOverview.vue.d.ts +5 -1
  23. package/dist/types/app/components/chat/ChatProfileOverview.vue.d.ts.map +1 -1
  24. package/dist/types/app/components/chat/ChatView.vue.d.ts.map +1 -1
  25. package/dist/types/app/components/chat/chat-bubbles/BubbleOptions.vue.d.ts.map +1 -1
  26. package/dist/types/app/components/chat/chat-bubbles/MediaViewer.vue.d.ts.map +1 -1
  27. package/dist/types/app/components/chat/chat-input/InputAttachement.vue.d.ts.map +1 -1
  28. package/dist/types/app/components/chat/contact/ChatList.vue.d.ts.map +1 -1
  29. package/dist/types/app/components/chat/messages/FloatingDateHeader.vue.d.ts +0 -1
  30. package/dist/types/app/components/chat/messages/FloatingDateHeader.vue.d.ts.map +1 -1
  31. package/dist/types/app/components/general/ResponsiveDialog.vue.d.ts.map +1 -1
  32. package/dist/types/app/composables/call/media.d.ts +1 -0
  33. package/dist/types/app/composables/call/media.d.ts.map +1 -1
  34. package/dist/types/app/composables/call/peer.d.ts +4 -1
  35. package/dist/types/app/composables/call/peer.d.ts.map +1 -1
  36. package/dist/types/app/composables/call/peers.d.ts +10 -0
  37. package/dist/types/app/composables/call/peers.d.ts.map +1 -1
  38. package/dist/types/app/composables/call/session.d.ts +8 -1
  39. package/dist/types/app/composables/call/session.d.ts.map +1 -1
  40. package/dist/types/app/composables/call/signaling.d.ts +5 -3
  41. package/dist/types/app/composables/call/signaling.d.ts.map +1 -1
  42. package/dist/types/app/composables/call/useCallUi.d.ts +2 -0
  43. package/dist/types/app/composables/call/useCallUi.d.ts.map +1 -1
  44. package/dist/types/app/composables/useCall.d.ts +2 -0
  45. package/dist/types/app/composables/useCall.d.ts.map +1 -1
  46. package/dist/types/app/composables/useFlippedVirtualScroll.d.ts +0 -1
  47. package/dist/types/app/composables/useFlippedVirtualScroll.d.ts.map +1 -1
  48. package/dist/types/app/stores/callStore.d.ts +45 -9
  49. package/dist/types/app/stores/callStore.d.ts.map +1 -1
  50. package/dist/types/app/types/index.d.ts +2 -0
  51. package/dist/types/app/types/index.d.ts.map +1 -1
  52. package/dist/types/i18n/locales/index.d.ts +20 -0
  53. package/dist/types/i18n/locales/index.d.ts.map +1 -1
  54. package/package.json +13 -12
  55. package/dist/chunks/Call-7lGaUPcp.mjs.map +0 -1
  56. package/dist/chunks/Call-D48LfnDv.cjs.map +0 -1
  57. package/dist/chunks/index-C8N5eSUe.mjs.map +0 -1
  58. package/dist/chunks/index-DrcpfLUy.cjs.map +0 -1
  59. package/dist/chunks/session-B8Q7eiUV.mjs.map +0 -1
  60. package/dist/chunks/session-BwgUu6F3.cjs.map +0 -1
package/dist/chat.css CHANGED
@@ -505,8 +505,8 @@
505
505
  top: calc(var(--spacing) * 4);
506
506
  }
507
507
 
508
- :where(.vue-chat, .vue-chat *).top-12 {
509
- top: calc(var(--spacing) * 12);
508
+ :where(.vue-chat, .vue-chat *).top-6 {
509
+ top: calc(var(--spacing) * 6);
510
510
  }
511
511
 
512
512
  :where(.vue-chat, .vue-chat *).right-0 {
@@ -1362,6 +1362,10 @@
1362
1362
  flex-direction: row !important;
1363
1363
  }
1364
1364
 
1365
+ :where(.vue-chat, .vue-chat *).flex-row-reverse {
1366
+ flex-direction: row-reverse;
1367
+ }
1368
+
1365
1369
  :where(.vue-chat, .vue-chat *).flex-wrap {
1366
1370
  flex-wrap: wrap;
1367
1371
  }
@@ -1588,33 +1592,33 @@
1588
1592
  border-radius: var(--radius-xl) !important;
1589
1593
  }
1590
1594
 
1591
- :where(.vue-chat, .vue-chat *).rounded-ss-md {
1592
- border-start-start-radius: var(--radius-md);
1595
+ :where(.vue-chat, .vue-chat *).rounded-tl-md {
1596
+ border-top-left-radius: var(--radius-md);
1593
1597
  }
1594
1598
 
1595
- :where(.vue-chat, .vue-chat *).rounded-se-md {
1596
- border-start-end-radius: var(--radius-md);
1599
+ :where(.vue-chat, .vue-chat *).rounded-tr-md {
1600
+ border-top-right-radius: var(--radius-md);
1597
1601
  }
1598
1602
 
1599
- :where(.vue-chat, .vue-chat *).rounded-ee-md {
1600
- border-end-end-radius: var(--radius-md);
1603
+ :where(.vue-chat, .vue-chat *).rounded-b-none\! {
1604
+ border-bottom-right-radius: 0 !important;
1605
+ border-bottom-left-radius: 0 !important;
1601
1606
  }
1602
1607
 
1603
- :where(.vue-chat, .vue-chat *).rounded-ee-xs {
1604
- border-end-end-radius: var(--radius-xs);
1608
+ :where(.vue-chat, .vue-chat *).rounded-br-md {
1609
+ border-bottom-right-radius: var(--radius-md);
1605
1610
  }
1606
1611
 
1607
- :where(.vue-chat, .vue-chat *).rounded-es-md {
1608
- border-end-start-radius: var(--radius-md);
1612
+ :where(.vue-chat, .vue-chat *).rounded-br-xs {
1613
+ border-bottom-right-radius: var(--radius-xs);
1609
1614
  }
1610
1615
 
1611
- :where(.vue-chat, .vue-chat *).rounded-es-xs {
1612
- border-end-start-radius: var(--radius-xs);
1616
+ :where(.vue-chat, .vue-chat *).rounded-bl-md {
1617
+ border-bottom-left-radius: var(--radius-md);
1613
1618
  }
1614
1619
 
1615
- :where(.vue-chat, .vue-chat *).rounded-b-none\! {
1616
- border-bottom-right-radius: 0 !important;
1617
- border-bottom-left-radius: 0 !important;
1620
+ :where(.vue-chat, .vue-chat *).rounded-bl-xs {
1621
+ border-bottom-left-radius: var(--radius-xs);
1618
1622
  }
1619
1623
 
1620
1624
  :where(.vue-chat, .vue-chat *).border {
@@ -2014,6 +2018,16 @@
2014
2018
  }
2015
2019
  }
2016
2020
 
2021
+ :where(.vue-chat, .vue-chat *).bg-white\/15 {
2022
+ background-color: #ffffff26;
2023
+ }
2024
+
2025
+ @supports (color: color-mix(in lab, red, red)) {
2026
+ :where(.vue-chat, .vue-chat *).bg-white\/15 {
2027
+ background-color: color-mix(in oklab, var(--color-white) 15%, transparent);
2028
+ }
2029
+ }
2030
+
2017
2031
  :where(.vue-chat, .vue-chat *).bg-linear-to-b {
2018
2032
  --tw-gradient-position: to bottom;
2019
2033
  }
@@ -2046,10 +2060,6 @@
2046
2060
  background-image: var(--background-image-diamond-error);
2047
2061
  }
2048
2062
 
2049
- :where(.vue-chat, .vue-chat *).bg-diamond-primary-secondary {
2050
- background-image: var(--background-image-diamond-primary-secondary);
2051
- }
2052
-
2053
2063
  :where(.vue-chat, .vue-chat *).bg-gradient-primary-secondary {
2054
2064
  background-image: var(--background-image-gradient-primary-secondary);
2055
2065
  }
@@ -2949,6 +2959,10 @@
2949
2959
  user-select: text;
2950
2960
  }
2951
2961
 
2962
+ :where(.vue-chat, .vue-chat *).\[unicode-bidi\:plaintext\] {
2963
+ unicode-bidi: plaintext;
2964
+ }
2965
+
2952
2966
  :where(.vue-chat, .vue-chat *).\[vue-chat\:call\] {
2953
2967
  vue-chat: call;
2954
2968
  }
@@ -3274,10 +3288,22 @@
3274
3288
  rotate: 180deg;
3275
3289
  }
3276
3290
 
3291
+ :where(.vue-chat, .vue-chat *).rtl\:flex-row:where(:dir(rtl), [dir="rtl"], [dir="rtl"] *) {
3292
+ flex-direction: row;
3293
+ }
3294
+
3277
3295
  :where(.vue-chat, .vue-chat *).rtl\:flex-row\!:where(:dir(rtl), [dir="rtl"], [dir="rtl"] *) {
3278
3296
  flex-direction: row !important;
3279
3297
  }
3280
3298
 
3299
+ :where(.vue-chat, .vue-chat *).rtl\:justify-end:where(:dir(rtl), [dir="rtl"], [dir="rtl"] *) {
3300
+ justify-content: flex-end;
3301
+ }
3302
+
3303
+ :where(.vue-chat, .vue-chat *).rtl\:justify-start:where(:dir(rtl), [dir="rtl"], [dir="rtl"] *) {
3304
+ justify-content: flex-start;
3305
+ }
3306
+
3281
3307
  :where(.vue-chat, .vue-chat *):where(.rtl\:space-x-reverse:where(:dir(rtl), [dir="rtl"], [dir="rtl"] *) > :not(:last-child)) {
3282
3308
  --tw-space-x-reverse: 1;
3283
3309
  }
@@ -3809,15 +3835,15 @@
3809
3835
  }
3810
3836
 
3811
3837
  /* Styles remain exactly the same */
3812
- :where(.vue-chat, .vue-chat *).flip-vertical[data-v-01ea74e6] {
3838
+ :where(.vue-chat, .vue-chat *).flip-vertical[data-v-cb7cc93f] {
3813
3839
  transform: scaleY(-1);
3814
3840
  will-change: transform;
3815
3841
  }
3816
- :where(.vue-chat, .vue-chat *)[data-index][data-v-01ea74e6] {
3842
+ :where(.vue-chat, .vue-chat *)[data-index][data-v-cb7cc93f] {
3817
3843
  will-change: transform;
3818
3844
  backface-visibility: hidden;
3819
3845
  }
3820
- @keyframes slide-in-right-01ea74e6 {
3846
+ @keyframes slide-in-right-cb7cc93f {
3821
3847
  0% {
3822
3848
  opacity: 0;
3823
3849
  transform: scaleY(-1) translateX(30px);
@@ -3827,7 +3853,7 @@
3827
3853
  transform: scaleY(-1) translateX(0);
3828
3854
  }
3829
3855
  }
3830
- @keyframes slide-in-left-01ea74e6 {
3856
+ @keyframes slide-in-left-cb7cc93f {
3831
3857
  0% {
3832
3858
  opacity: 0;
3833
3859
  transform: scaleY(-1) translateX(-30px);
@@ -3837,23 +3863,23 @@
3837
3863
  transform: scaleY(-1) translateX(0);
3838
3864
  }
3839
3865
  }
3840
- :where(.vue-chat, .vue-chat *).animate-slide-right[data-v-01ea74e6] {
3841
- animation: slide-in-right-01ea74e6 300ms ease-out forwards;
3866
+ :where(.vue-chat, .vue-chat *).animate-slide-right[data-v-cb7cc93f] {
3867
+ animation: slide-in-right-cb7cc93f 300ms ease-out forwards;
3842
3868
  will-change: transform, opacity;
3843
3869
  }
3844
- :where(.vue-chat, .vue-chat *).animate-slide-left[data-v-01ea74e6] {
3845
- animation: slide-in-left-01ea74e6 300ms ease-out forwards;
3870
+ :where(.vue-chat, .vue-chat *).animate-slide-left[data-v-cb7cc93f] {
3871
+ animation: slide-in-left-cb7cc93f 300ms ease-out forwards;
3846
3872
  will-change: transform, opacity;
3847
3873
  }
3848
- :where(.vue-chat, .vue-chat *)#list[data-v-01ea74e6] {
3874
+ :where(.vue-chat, .vue-chat *)#list[data-v-cb7cc93f] {
3849
3875
  will-change: padding-top;
3850
3876
  }
3851
- :where(.vue-chat, .vue-chat *).animate-request-in[data-v-01ea74e6] {
3852
- animation: request-in-01ea74e6 0.4s ease-out forwards;
3877
+ :where(.vue-chat, .vue-chat *).animate-request-in[data-v-cb7cc93f] {
3878
+ animation: request-in-cb7cc93f 0.4s ease-out forwards;
3853
3879
  overflow: hidden;
3854
3880
  transform: scaleY(-1);
3855
3881
  }
3856
- @keyframes request-in-01ea74e6 {
3882
+ @keyframes request-in-cb7cc93f {
3857
3883
  0% {
3858
3884
  opacity: 0;
3859
3885
  max-height: 0;
@@ -1,5 +1,5 @@
1
- import { u as useCallStore, a as useLocalI18n, c as chat, b as useDirection, _ as _sfc_main$1, d as _sfc_main$2, e as _sfc_main$3 } from "./index-C8N5eSUe.mjs";
2
- import { ref, onMounted, onUnmounted, watch, nextTick, defineComponent, computed, openBlock, createElementBlock, Fragment, unref, normalizeClass, normalizeStyle, createElementVNode, toDisplayString, createVNode, withModifiers, withCtx, createCommentVNode, withDirectives, mergeProps, vShow, renderList, createBlock } from "vue";
1
+ import { u as useCallStore, a as useLocalI18n, c as chat, b as useDirection, d as useChatStore, _ as _sfc_main$1, e as _sfc_main$2, f as formatDuration, g as _sfc_main$3 } from "./index-DI5ok4ow.mjs";
2
+ import { ref, onMounted, onUnmounted, watch, nextTick, defineComponent, computed, openBlock, createElementBlock, Fragment, unref, normalizeClass, normalizeStyle, createElementVNode, toDisplayString, createVNode, withModifiers, withCtx, createCommentVNode, withDirectives, mergeProps, createBlock, vShow, renderList } from "vue";
3
3
  import { useWindowSize, useDraggable } from "@vueuse/core";
4
4
  import Button from "primevue/button";
5
5
  import Listbox from "primevue/listbox";
@@ -53,11 +53,29 @@ function useCallUi(opts) {
53
53
  else el.pause();
54
54
  videoPaused.value[tileId] = !videoPaused.value[tileId];
55
55
  }
56
+ const soundBlocked = ref(false);
57
+ async function play(el) {
58
+ try {
59
+ await el.play();
60
+ } catch (err) {
61
+ if ((err == null ? void 0 : err.name) !== "NotAllowedError" || el.muted) return;
62
+ el.muted = true;
63
+ soundBlocked.value = true;
64
+ await el.play().catch((e) => console.error("[vue-chat] Remote video can't play:", e));
65
+ }
66
+ }
67
+ function enableSound() {
68
+ soundBlocked.value = false;
69
+ for (const el of Object.values(remoteRefs.value)) {
70
+ if (!el) continue;
71
+ el.muted = false;
72
+ void play(el);
73
+ }
74
+ }
56
75
  const attach = (el, stream) => {
57
76
  if (!el) return;
58
77
  if (el.srcObject !== stream) el.srcObject = stream;
59
- el.play().catch(() => {
60
- });
78
+ void play(el);
61
79
  };
62
80
  watch(
63
81
  [localStream, opts.isMinimized],
@@ -116,6 +134,8 @@ function useCallUi(opts) {
116
134
  toggleRemote,
117
135
  videoPaused,
118
136
  toggleVideoPause,
137
+ soundBlocked,
138
+ enableSound,
119
139
  detachAll
120
140
  };
121
141
  }
@@ -165,6 +185,8 @@ function useCall() {
165
185
  toggleFullscreen: ui.toggleFullscreen,
166
186
  toggleRemote: ui.toggleRemote,
167
187
  videoPaused: ui.videoPaused,
188
+ soundBlocked: ui.soundBlocked,
189
+ enableSound: ui.enableSound,
168
190
  toggleVideoPause: ui.toggleVideoPause,
169
191
  localVideo: ui.localVideo,
170
192
  localScreen: ui.localScreen,
@@ -173,35 +195,35 @@ function useCall() {
173
195
  remoteParents: ui.remoteParents
174
196
  };
175
197
  }
176
- const _hoisted_1 = { class: "relative h-full w-full" };
177
- const _hoisted_2 = { class: "absolute top-3 right-3 left-3 z-10 flex items-center justify-between" };
178
- const _hoisted_3 = { class: "flex items-center gap-x-2 rounded-full bg-black/40 px-3 py-1.5 backdrop-blur-sm" };
179
- const _hoisted_4 = { class: "text-label-sm text-white/90 select-none" };
180
- const _hoisted_5 = { class: "absolute right-3 bottom-3 left-3 z-10 flex items-center justify-between" };
181
- const _hoisted_6 = { class: "flex items-center gap-2" };
182
- const _hoisted_7 = {
198
+ const _hoisted_1 = ["dir"];
199
+ const _hoisted_2 = { class: "relative h-full w-full" };
200
+ const _hoisted_3 = { class: "absolute top-3 right-3 left-3 z-10 flex items-center justify-between" };
201
+ const _hoisted_4 = { class: "flex items-center gap-x-2 rounded-full bg-black/40 px-3 py-1.5 backdrop-blur-sm" };
202
+ const _hoisted_5 = { class: "text-label-sm text-white/90 select-none" };
203
+ const _hoisted_6 = { class: "absolute right-3 bottom-3 left-3 z-10 flex items-center justify-between" };
204
+ const _hoisted_7 = { class: "flex items-center gap-2" };
205
+ const _hoisted_8 = {
183
206
  key: 0,
184
207
  class: "flex gap-1"
185
208
  };
186
- const _hoisted_8 = {
209
+ const _hoisted_9 = {
187
210
  key: 0,
188
211
  class: "flex h-7 w-7 items-center justify-center rounded-full bg-diamond-error"
189
212
  };
190
- const _hoisted_9 = {
213
+ const _hoisted_10 = {
191
214
  key: 1,
192
215
  class: "flex h-7 w-7 items-center justify-center rounded-full bg-diamond-error"
193
216
  };
194
- const _hoisted_10 = {
195
- "data-testid": "call-view",
196
- class: "vue-chat fixed inset-0 z-[60] flex h-full w-full flex-col bg-diamond-black"
217
+ const _hoisted_11 = ["dir"];
218
+ const _hoisted_12 = { class: "flex items-center gap-x-4" };
219
+ const _hoisted_13 = { class: "hidden select-none text-label-lg text-white md:block" };
220
+ const _hoisted_14 = { class: "flex items-center gap-x-2 text-white text-body-sm" };
221
+ const _hoisted_15 = { "data-testid": "call-participants" };
222
+ const _hoisted_16 = { class: "flex items-center gap-x-4.5" };
223
+ const _hoisted_17 = {
224
+ dir: "ltr",
225
+ class: "flex h-6 items-center justify-center rounded-full bg-white/15 px-2.5 text-body-sm text-white tabular-nums select-none"
197
226
  };
198
- const _hoisted_11 = { class: "flex items-center gap-x-4" };
199
- const _hoisted_12 = { class: "hidden select-none text-label-lg text-white md:block" };
200
- const _hoisted_13 = { class: "flex items-center gap-x-2 text-white text-body-sm" };
201
- const _hoisted_14 = { "data-testid": "call-participants" };
202
- const _hoisted_15 = { class: "flex items-center gap-x-4.5" };
203
- const _hoisted_16 = { class: "flex h-6 items-center justify-center rounded-full bg-diamond-error px-2 text-white select-none" };
204
- const _hoisted_17 = { class: "text-body-sm" };
205
227
  const _hoisted_18 = { class: "grid h-full min-h-0 w-full min-w-0 grid-cols-1 gap-4 md:grid-cols-[repeat(auto-fit,minmax(300px,1fr))]" };
206
228
  const _hoisted_19 = { class: "absolute bottom-3 left-3 z-20 flex items-center gap-x-2" };
207
229
  const _hoisted_20 = { class: "rounded bg-black-500 px-2 py-1 text-label-sm text-white select-none" };
@@ -228,6 +250,7 @@ const _hoisted_34 = { class: "text-label-md" };
228
250
  const PIP_WIDTH = 280;
229
251
  const PIP_HEIGHT = 160;
230
252
  const PADDING = 16;
253
+ const PIP_INSET_Y = 96;
231
254
  const _sfc_main = /* @__PURE__ */ defineComponent({
232
255
  __name: "Call",
233
256
  setup(__props) {
@@ -235,8 +258,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
235
258
  const minimizedRef = ref(null);
236
259
  const bodyRef = ref(null);
237
260
  const cameraPickerOpen = ref(false);
238
- const { t, locale } = useLocalI18n(chat);
261
+ const { t } = useLocalI18n(chat);
239
262
  const { dir } = useDirection();
263
+ const chatStore = useChatStore();
264
+ const callTitle = computed(() => {
265
+ const contact = callStore.channelId ? chatStore.getContactById(callStore.channelId) : null;
266
+ const name = contact ? `${contact.name} ${contact.lastName ?? ""}`.trim() : "";
267
+ return name || t("chat.call.title");
268
+ });
240
269
  const {
241
270
  toggleVideoPause,
242
271
  toggleRemote,
@@ -266,7 +295,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
266
295
  remoteRefs,
267
296
  remoteScreens,
268
297
  remoteScreenRefs,
269
- remoteVideos
298
+ remoteVideos,
299
+ soundBlocked,
300
+ enableSound
270
301
  } = useCall();
271
302
  const pickCamera = (deviceId) => {
272
303
  cameraPickerOpen.value = false;
@@ -348,7 +379,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
348
379
  const { x, y, isDragging } = useDraggable(minimizedRef, {
349
380
  initialValue: {
350
381
  x: typeof window !== "undefined" ? window.innerWidth - PIP_WIDTH - PADDING : PADDING,
351
- y: typeof window !== "undefined" ? window.innerHeight - PIP_HEIGHT - PADDING : PADDING
382
+ y: PIP_INSET_Y
352
383
  },
353
384
  // غیرفعال کردن درگ در صورتی که کامپوننت مینیمایز نباشد
354
385
  disabled: computed(() => !callStore.isMinimized)
@@ -356,10 +387,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
356
387
  watch(isDragging, (dragging) => {
357
388
  if (!dragging && callStore.isMinimized) {
358
389
  const maxX = windowWidth.value - PIP_WIDTH - PADDING;
359
- const maxY = windowHeight.value - PIP_HEIGHT - PADDING;
360
- dir.value === "rtl";
390
+ const maxY = windowHeight.value - PIP_HEIGHT - PIP_INSET_Y;
361
391
  const targetX = x.value < windowWidth.value / 2 ? PADDING : maxX;
362
- const targetY = y.value < windowHeight.value / 2 ? PADDING : maxY;
392
+ const targetY = y.value < windowHeight.value / 2 ? PIP_INSET_Y : maxY;
363
393
  x.value = targetX;
364
394
  y.value = targetY;
365
395
  }
@@ -371,7 +401,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
371
401
  nextTick(() => {
372
402
  const isRtl = dir.value === "rtl";
373
403
  x.value = isRtl ? PADDING : windowWidth.value - PIP_WIDTH - PADDING;
374
- y.value = windowHeight.value - PIP_HEIGHT - PADDING;
404
+ y.value = PIP_INSET_Y;
375
405
  });
376
406
  }
377
407
  },
@@ -397,7 +427,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
397
427
  ref: minimizedRef,
398
428
  "data-testid": "call-pip",
399
429
  style: normalizeStyle(clampedStyle.value),
400
- class: normalizeClass(["vue-chat fixed w-70 h-40 bg-black-600 rounded-2xl shadow-floating z-9999 overflow-hidden border border-white/10 flex flex-col items-center justify-center cursor-move touch-none", [!unref(isDragging) ? "transition-all duration-300 ease-out" : ""]])
430
+ dir: unref(dir),
431
+ class: normalizeClass(["vue-chat font-chat-family fixed w-70 h-40 bg-black-600 rounded-2xl shadow-floating z-9999 overflow-hidden border border-white/10 flex flex-col items-center justify-center cursor-move touch-none", [!unref(isDragging) ? "transition-all duration-300 ease-out" : ""]])
401
432
  }, [
402
433
  createElementVNode("video", {
403
434
  ref_key: "pipVideoRef",
@@ -409,14 +440,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
409
440
  }, null, 512),
410
441
  _cache[18] || (_cache[18] = createElementVNode("div", { class: "pointer-events-none absolute inset-0 bg-gradient-to-br from-blue-500/5 via-purple-500/5 to-pink-500/5 opacity-0 transition-opacity duration-500 group-hover:opacity-100" }, null, -1)),
411
442
  _cache[19] || (_cache[19] = createElementVNode("div", { class: "pointer-events-none absolute inset-0 bg-gradient-to-t from-black/50 via-transparent to-black/20" }, null, -1)),
412
- createElementVNode("div", _hoisted_1, [
413
- createElementVNode("div", _hoisted_2, [
414
- createElementVNode("div", _hoisted_3, [
443
+ createElementVNode("div", _hoisted_2, [
444
+ createElementVNode("div", _hoisted_3, [
445
+ createElementVNode("div", _hoisted_4, [
415
446
  _cache[16] || (_cache[16] = createElementVNode("div", { class: "relative" }, [
416
447
  createElementVNode("div", { class: "h-2.5 w-2.5 animate-pulse rounded-full bg-diamond-error" }),
417
448
  createElementVNode("div", { class: "absolute inset-0 h-2.5 w-2.5 animate-ping rounded-full bg-diamond-error/30" })
418
449
  ], -1)),
419
- createElementVNode("span", _hoisted_4, toDisplayString(unref(t)("Call active")), 1),
450
+ createElementVNode("span", _hoisted_5, toDisplayString(unref(t)("chat.call.active")), 1),
420
451
  _cache[17] || (_cache[17] = createElementVNode("div", { class: "flex -space-x-1" }, [
421
452
  createElementVNode("div", {
422
453
  class: "h-1.5 w-1.5 animate-pulse rounded-full bg-green-400",
@@ -444,8 +475,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
444
475
  onClick: withModifiers(unref(endCall), ["stop"])
445
476
  }, null, 8, ["label", "onClick"])
446
477
  ]),
447
- createElementVNode("div", _hoisted_5, [
448
- createElementVNode("div", _hoisted_6, [
478
+ createElementVNode("div", _hoisted_6, [
479
+ createElementVNode("div", _hoisted_7, [
449
480
  createVNode(unref(Button), {
450
481
  label: String(unref(participantCount)),
451
482
  "aria-label": unref(t)("chat.call.controls.nextParticipant"),
@@ -466,14 +497,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
466
497
  ]),
467
498
  _: 1
468
499
  }, 8, ["label", "aria-label", "disabled"]),
469
- !unref(isAudioOn) || !unref(isVideoOn) ? (openBlock(), createElementBlock("div", _hoisted_7, [
470
- !unref(isAudioOn) ? (openBlock(), createElementBlock("div", _hoisted_8, [
500
+ !unref(isAudioOn) || !unref(isVideoOn) ? (openBlock(), createElementBlock("div", _hoisted_8, [
501
+ !unref(isAudioOn) ? (openBlock(), createElementBlock("div", _hoisted_9, [
471
502
  createVNode(_component_BIcon, {
472
503
  icon: "PhMicrophoneSlash",
473
504
  class: "h-3 w-3 fill-white"
474
505
  })
475
506
  ])) : createCommentVNode("", true),
476
- !unref(isVideoOn) ? (openBlock(), createElementBlock("div", _hoisted_9, [
507
+ !unref(isVideoOn) ? (openBlock(), createElementBlock("div", _hoisted_10, [
477
508
  createVNode(_component_BIcon, {
478
509
  icon: "PhVideoCameraSlash",
479
510
  class: "h-3 w-3 fill-white"
@@ -494,8 +525,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
494
525
  }, null, 8, ["label"])
495
526
  ])
496
527
  ])
497
- ], 6)) : createCommentVNode("", true),
498
- withDirectives(createElementVNode("div", _hoisted_10, [
528
+ ], 14, _hoisted_1)) : createCommentVNode("", true),
529
+ withDirectives(createElementVNode("div", {
530
+ "data-testid": "call-view",
531
+ dir: unref(dir),
532
+ class: "vue-chat font-chat-family fixed inset-0 z-[60] flex h-full w-full flex-col bg-diamond-black"
533
+ }, [
499
534
  !unref(callStore).isMinimized ? (openBlock(), createElementBlock("div", {
500
535
  key: 0,
501
536
  class: normalizeClass(["flex h-16 items-center justify-between px-4 transition-all duration-300 sm:h-20", unref(showControls) ? "opacity-100" : "opacity-0"]),
@@ -504,24 +539,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
504
539
  onMousemove: _cache[5] || (_cache[5] = //@ts-ignore
505
540
  (...args) => unref(resetControlsTimeout) && unref(resetControlsTimeout)(...args))
506
541
  }, [
507
- createElementVNode("div", _hoisted_11, [
508
- createElementVNode("div", _hoisted_12, toDisplayString(unref(t)("Behayand Meeting")), 1),
509
- createElementVNode("div", _hoisted_13, [
542
+ createElementVNode("div", _hoisted_12, [
543
+ createElementVNode("div", _hoisted_13, toDisplayString(callTitle.value), 1),
544
+ createElementVNode("div", _hoisted_14, [
510
545
  createVNode(_component_BIcon, {
511
546
  icon: "PhUsers",
512
547
  class: "h-4 w-4 fill-white"
513
548
  }),
514
- createElementVNode("span", _hoisted_14, toDisplayString(unref(participantCount)) + " " + toDisplayString(unref(participantCount) > 1 ? unref(t)("participants") : unref(t)("participant")), 1)
549
+ createElementVNode("span", _hoisted_15, toDisplayString(unref(t)("chat.call.participants", unref(participantCount))), 1)
515
550
  ])
516
551
  ]),
517
- createElementVNode("div", _hoisted_15, [
518
- createElementVNode("div", _hoisted_16, [
519
- createElementVNode("div", _hoisted_17, toDisplayString((/* @__PURE__ */ new Date()).toLocaleTimeString(unref(locale), {
520
- hour: "2-digit",
521
- minute: "2-digit",
522
- hour12: true
523
- })), 1)
524
- ]),
552
+ createElementVNode("div", _hoisted_16, [
553
+ createElementVNode("div", _hoisted_17, toDisplayString(unref(formatDuration)(unref(callStore).elapsedTime)), 1),
525
554
  createVNode(_sfc_main$1, mergeProps({
526
555
  icon: "PhCaretDown",
527
556
  label: unref(t)("chat.call.controls.minimize")
@@ -536,6 +565,24 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
536
565
  onMousemove: _cache[10] || (_cache[10] = //@ts-ignore
537
566
  (...args) => unref(resetControlsTimeout) && unref(resetControlsTimeout)(...args))
538
567
  }, [
568
+ unref(soundBlocked) ? (openBlock(), createBlock(unref(Button), {
569
+ key: 0,
570
+ label: unref(t)("chat.call.controls.enableSound"),
571
+ dt: callButtonDt,
572
+ severity: "secondary",
573
+ rounded: "",
574
+ "data-testid": "call-enable-sound",
575
+ class: "absolute! top-6 left-1/2 z-30 -translate-x-1/2",
576
+ onClick: unref(enableSound)
577
+ }, {
578
+ icon: withCtx(() => [
579
+ createVNode(_component_BIcon, {
580
+ icon: "PhSpeakerHigh",
581
+ class: "size-4"
582
+ })
583
+ ]),
584
+ _: 1
585
+ }, 8, ["label", "onClick"])) : createCommentVNode("", true),
539
586
  withDirectives(createElementVNode("div", _hoisted_18, [
540
587
  withDirectives(createElementVNode("div", {
541
588
  ref: (el) => unref(remoteParents)[`self_screen`] = el,
@@ -550,7 +597,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
550
597
  class: "absolute inset-0 z-0 h-full w-full object-cover"
551
598
  }, null, 512),
552
599
  createElementVNode("div", _hoisted_19, [
553
- createElementVNode("div", _hoisted_20, toDisplayString(unref(t)("Your Presentation")), 1),
600
+ createElementVNode("div", _hoisted_20, toDisplayString(unref(t)("chat.call.yourPresentation")), 1),
554
601
  createElementVNode("div", _hoisted_21, [
555
602
  createVNode(_component_BIcon, {
556
603
  icon: "PhMonitor",
@@ -637,7 +684,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
637
684
  class: "absolute inset-0 z-0 h-full w-full object-cover"
638
685
  }, null, 512),
639
686
  createElementVNode("div", _hoisted_24, [
640
- createElementVNode("div", _hoisted_25, toDisplayString(unref(t)("Presentation of")) + " " + toDisplayString(stream.name.slice(0, 15)), 1),
687
+ createElementVNode("div", _hoisted_25, toDisplayString(unref(t)("chat.call.presentationOf", { name: stream.name.slice(0, 15) })), 1),
641
688
  createElementVNode("div", _hoisted_26, [
642
689
  createVNode(_component_BIcon, {
643
690
  icon: "PhMonitor",
@@ -689,7 +736,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
689
736
  }, null, 512),
690
737
  _cache[20] || (_cache[20] = createElementVNode("div", { class: "pointer-events-none absolute inset-0 bg-gradient-to-t from-black/60 via-transparent to-transparent" }, null, -1)),
691
738
  createElementVNode("div", _hoisted_27, [
692
- createElementVNode("div", _hoisted_28, toDisplayString(unref(t)("You")), 1),
739
+ createElementVNode("div", _hoisted_28, toDisplayString(unref(t)("chat.call.you")), 1),
693
740
  !unref(isAudioOn) ? (openBlock(), createElementBlock("div", _hoisted_29, [
694
741
  createVNode(_component_BIcon, {
695
742
  icon: "PhMicrophoneSlash",
@@ -716,9 +763,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
716
763
  !unref(isVideoOn) ? (openBlock(), createElementBlock("div", _hoisted_30, [
717
764
  createElementVNode("div", _hoisted_31, [
718
765
  createElementVNode("div", _hoisted_32, [
719
- createElementVNode("span", _hoisted_33, toDisplayString(unref(t)("You")), 1)
766
+ createElementVNode("span", _hoisted_33, toDisplayString(unref(t)("chat.call.you")), 1)
720
767
  ]),
721
- createElementVNode("p", _hoisted_34, toDisplayString(unref(t)("Camera is off")), 1)
768
+ createElementVNode("p", _hoisted_34, toDisplayString(unref(t)("chat.call.cameraIsOff")), 1)
722
769
  ])
723
770
  ])) : createCommentVNode("", true)
724
771
  ], 2)) : createCommentVNode("", true)
@@ -805,7 +852,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
805
852
  onClick: unref(endCall)
806
853
  }, null, 8, ["label", "onClick"])
807
854
  ], 34)) : createCommentVNode("", true)
808
- ], 512), [
855
+ ], 8, _hoisted_11), [
809
856
  [vShow, unref(callStore).isActive && !unref(callStore).isMinimized]
810
857
  ])
811
858
  ], 64);
@@ -815,4 +862,4 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
815
862
  export {
816
863
  _sfc_main as default
817
864
  };
818
- //# sourceMappingURL=Call-7lGaUPcp.mjs.map
865
+ //# sourceMappingURL=Call-CPHjSt8T.mjs.map