@tmsoft/webphone 3.0.8 → 3.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/webphone.component.js +25 -25
- package/dist/webphone.es.js +175 -336
- package/dist/webphone.umd.js +2 -2
- package/package.json +1 -1
package/dist/webphone.es.js
CHANGED
|
@@ -7052,13 +7052,13 @@ var concatArrays = (e, t) => {
|
|
|
7052
7052
|
isArbitraryVariablePosition,
|
|
7053
7053
|
isArbitraryPosition,
|
|
7054
7054
|
{ position: [isArbitraryVariable, isArbitraryValue] }
|
|
7055
|
-
],
|
|
7055
|
+
], Vp = () => ["no-repeat", { repeat: [
|
|
7056
7056
|
"",
|
|
7057
7057
|
"x",
|
|
7058
7058
|
"y",
|
|
7059
7059
|
"space",
|
|
7060
7060
|
"round"
|
|
7061
|
-
] }],
|
|
7061
|
+
] }], Hp = () => [
|
|
7062
7062
|
"auto",
|
|
7063
7063
|
"cover",
|
|
7064
7064
|
"contain",
|
|
@@ -7081,12 +7081,12 @@ var concatArrays = (e, t) => {
|
|
|
7081
7081
|
isNumber,
|
|
7082
7082
|
isArbitraryVariableLength,
|
|
7083
7083
|
isArbitraryLength
|
|
7084
|
-
],
|
|
7084
|
+
], Up = () => [
|
|
7085
7085
|
"solid",
|
|
7086
7086
|
"dashed",
|
|
7087
7087
|
"dotted",
|
|
7088
7088
|
"double"
|
|
7089
|
-
],
|
|
7089
|
+
], Wp = () => [
|
|
7090
7090
|
"normal",
|
|
7091
7091
|
"multiply",
|
|
7092
7092
|
"screen",
|
|
@@ -7108,7 +7108,7 @@ var concatArrays = (e, t) => {
|
|
|
7108
7108
|
isPercent,
|
|
7109
7109
|
isArbitraryVariablePosition,
|
|
7110
7110
|
isArbitraryPosition
|
|
7111
|
-
],
|
|
7111
|
+
], Gp = () => [
|
|
7112
7112
|
"",
|
|
7113
7113
|
"none",
|
|
7114
7114
|
_,
|
|
@@ -7537,7 +7537,7 @@ var concatArrays = (e, t) => {
|
|
|
7537
7537
|
"line-through",
|
|
7538
7538
|
"no-underline"
|
|
7539
7539
|
],
|
|
7540
|
-
"text-decoration-style": [{ decoration: [...
|
|
7540
|
+
"text-decoration-style": [{ decoration: [...Up(), "wavy"] }],
|
|
7541
7541
|
"text-decoration-thickness": [{ decoration: [
|
|
7542
7542
|
isNumber,
|
|
7543
7543
|
"from-font",
|
|
@@ -7628,8 +7628,8 @@ var concatArrays = (e, t) => {
|
|
|
7628
7628
|
"content"
|
|
7629
7629
|
] }],
|
|
7630
7630
|
"bg-position": [{ bg: V() }],
|
|
7631
|
-
"bg-repeat": [{ bg:
|
|
7632
|
-
"bg-size": [{ bg:
|
|
7631
|
+
"bg-repeat": [{ bg: Vp() }],
|
|
7632
|
+
"bg-size": [{ bg: Hp() }],
|
|
7633
7633
|
"bg-image": [{ bg: [
|
|
7634
7634
|
"none",
|
|
7635
7635
|
{
|
|
@@ -7700,12 +7700,12 @@ var concatArrays = (e, t) => {
|
|
|
7700
7700
|
"divide-y": [{ "divide-y": W() }],
|
|
7701
7701
|
"divide-y-reverse": ["divide-y-reverse"],
|
|
7702
7702
|
"border-style": [{ border: [
|
|
7703
|
-
...
|
|
7703
|
+
...Up(),
|
|
7704
7704
|
"hidden",
|
|
7705
7705
|
"none"
|
|
7706
7706
|
] }],
|
|
7707
7707
|
"divide-style": [{ divide: [
|
|
7708
|
-
...
|
|
7708
|
+
...Up(),
|
|
7709
7709
|
"hidden",
|
|
7710
7710
|
"none"
|
|
7711
7711
|
] }],
|
|
@@ -7722,7 +7722,7 @@ var concatArrays = (e, t) => {
|
|
|
7722
7722
|
"border-color-l": [{ "border-l": B() }],
|
|
7723
7723
|
"divide-color": [{ divide: B() }],
|
|
7724
7724
|
"outline-style": [{ outline: [
|
|
7725
|
-
...
|
|
7725
|
+
...Up(),
|
|
7726
7726
|
"none",
|
|
7727
7727
|
"hidden"
|
|
7728
7728
|
] }],
|
|
@@ -7773,11 +7773,11 @@ var concatArrays = (e, t) => {
|
|
|
7773
7773
|
isArbitraryValue
|
|
7774
7774
|
] }],
|
|
7775
7775
|
"mix-blend": [{ "mix-blend": [
|
|
7776
|
-
...
|
|
7776
|
+
...Wp(),
|
|
7777
7777
|
"plus-darker",
|
|
7778
7778
|
"plus-lighter"
|
|
7779
7779
|
] }],
|
|
7780
|
-
"bg-blend": [{ "bg-blend":
|
|
7780
|
+
"bg-blend": [{ "bg-blend": Wp() }],
|
|
7781
7781
|
"mask-clip": [{ "mask-clip": [
|
|
7782
7782
|
"border",
|
|
7783
7783
|
"padding",
|
|
@@ -7851,8 +7851,8 @@ var concatArrays = (e, t) => {
|
|
|
7851
7851
|
"view"
|
|
7852
7852
|
] }],
|
|
7853
7853
|
"mask-position": [{ mask: V() }],
|
|
7854
|
-
"mask-repeat": [{ mask:
|
|
7855
|
-
"mask-size": [{ mask:
|
|
7854
|
+
"mask-repeat": [{ mask: Vp() }],
|
|
7855
|
+
"mask-size": [{ mask: Hp() }],
|
|
7856
7856
|
"mask-type": [{ "mask-type": ["alpha", "luminance"] }],
|
|
7857
7857
|
"mask-image": [{ mask: [
|
|
7858
7858
|
"none",
|
|
@@ -7865,7 +7865,7 @@ var concatArrays = (e, t) => {
|
|
|
7865
7865
|
isArbitraryVariable,
|
|
7866
7866
|
isArbitraryValue
|
|
7867
7867
|
] }],
|
|
7868
|
-
blur: [{ blur:
|
|
7868
|
+
blur: [{ blur: Gp() }],
|
|
7869
7869
|
brightness: [{ brightness: [
|
|
7870
7870
|
isNumber,
|
|
7871
7871
|
isArbitraryVariable,
|
|
@@ -7918,7 +7918,7 @@ var concatArrays = (e, t) => {
|
|
|
7918
7918
|
isArbitraryVariable,
|
|
7919
7919
|
isArbitraryValue
|
|
7920
7920
|
] }],
|
|
7921
|
-
"backdrop-blur": [{ "backdrop-blur":
|
|
7921
|
+
"backdrop-blur": [{ "backdrop-blur": Gp() }],
|
|
7922
7922
|
"backdrop-brightness": [{ "backdrop-brightness": [
|
|
7923
7923
|
isNumber,
|
|
7924
7924
|
isArbitraryVariable,
|
|
@@ -8442,7 +8442,7 @@ const createSipService = (e, t = {}) => {
|
|
|
8442
8442
|
return;
|
|
8443
8443
|
}
|
|
8444
8444
|
try {
|
|
8445
|
-
let [a] = (await navigator.mediaDevices.getUserMedia(
|
|
8445
|
+
let [a] = (await navigator.mediaDevices.getUserMedia(Vp(!1))).getAudioTracks();
|
|
8446
8446
|
if (!a) return;
|
|
8447
8447
|
a.enabled = i;
|
|
8448
8448
|
let o = new MediaStream([a]);
|
|
@@ -8452,7 +8452,7 @@ const createSipService = (e, t = {}) => {
|
|
|
8452
8452
|
} catch (e) {
|
|
8453
8453
|
console.warn("[SipJs] Failed to recover outbound audio track:", e);
|
|
8454
8454
|
}
|
|
8455
|
-
},
|
|
8455
|
+
}, Vp = (e = !1) => {
|
|
8456
8456
|
let t = {
|
|
8457
8457
|
echoCancellation: { ideal: !0 },
|
|
8458
8458
|
noiseSuppression: { ideal: !1 },
|
|
@@ -8463,7 +8463,7 @@ const createSipService = (e, t = {}) => {
|
|
|
8463
8463
|
audio: t,
|
|
8464
8464
|
video: e
|
|
8465
8465
|
};
|
|
8466
|
-
},
|
|
8466
|
+
}, Hp = async (t) => {
|
|
8467
8467
|
if (!n.value) {
|
|
8468
8468
|
try {
|
|
8469
8469
|
(await navigator.mediaDevices.getUserMedia({ audio: !0 })).getTracks().forEach((e) => e.stop());
|
|
@@ -8485,7 +8485,7 @@ const createSipService = (e, t = {}) => {
|
|
|
8485
8485
|
delegate: {
|
|
8486
8486
|
onConnect: () => e.setConnected(!0),
|
|
8487
8487
|
onDisconnect: () => e.setConnected(!1),
|
|
8488
|
-
onInvite: (e) =>
|
|
8488
|
+
onInvite: (e) => Wp(e)
|
|
8489
8489
|
}
|
|
8490
8490
|
}), await n.value.start(), i.value = new Registerer(n.value), await i.value.register(), H();
|
|
8491
8491
|
} catch {}
|
|
@@ -8535,7 +8535,7 @@ const createSipService = (e, t = {}) => {
|
|
|
8535
8535
|
console.error("[SipJs] Reconnection failed:", e);
|
|
8536
8536
|
}
|
|
8537
8537
|
}
|
|
8538
|
-
},
|
|
8538
|
+
}, Up = async () => {
|
|
8539
8539
|
v?.abort(), v = null, y &&= (clearTimeout(y), null), b &&= (clearInterval(b), null);
|
|
8540
8540
|
let e = i.value, t = n.value;
|
|
8541
8541
|
if (i.value = null, n.value = null, e) try {
|
|
@@ -8548,7 +8548,7 @@ const createSipService = (e, t = {}) => {
|
|
|
8548
8548
|
} catch (e) {
|
|
8549
8549
|
console.warn("[SipJs] UserAgent stop failed:", e);
|
|
8550
8550
|
}
|
|
8551
|
-
},
|
|
8551
|
+
}, Wp = (t) => {
|
|
8552
8552
|
console.log("[SipJs] 📞 Llamada entrante recibida"), console.log("[SipJs] Remote Identity URI:", t.remoteIdentity.uri.toString()), console.log("[SipJs] Remote Identity URI user:", t.remoteIdentity.uri.user), console.log("[SipJs] Remote Identity displayName:", t.remoteIdentity.displayName);
|
|
8553
8553
|
let n = e.channels.value.find((e) => e.status === "idle");
|
|
8554
8554
|
if (!n) {
|
|
@@ -8590,14 +8590,14 @@ const createSipService = (e, t = {}) => {
|
|
|
8590
8590
|
isHeld: !1,
|
|
8591
8591
|
hasVideo: !1,
|
|
8592
8592
|
hasEarlyMedia: !1
|
|
8593
|
-
}), a.value.delete(i), e.activeChannelId.value === i &&
|
|
8593
|
+
}), a.value.delete(i), e.activeChannelId.value === i && $p(), N();
|
|
8594
8594
|
break;
|
|
8595
8595
|
}
|
|
8596
8596
|
case SessionState.Established:
|
|
8597
8597
|
m.add(i), e.updateChannelState(i, {
|
|
8598
8598
|
status: "connected",
|
|
8599
8599
|
startTime: Date.now()
|
|
8600
|
-
}), A(i, "connected"), e.activeChannelId.value === i && (
|
|
8600
|
+
}), A(i, "connected"), e.activeChannelId.value === i && (Qp(t), V(t).then(() => j(t, i))), N();
|
|
8601
8601
|
break;
|
|
8602
8602
|
}
|
|
8603
8603
|
});
|
|
@@ -8622,7 +8622,7 @@ const createSipService = (e, t = {}) => {
|
|
|
8622
8622
|
m.add(o), e.channels.value.find((e) => e.id === o)?.status !== "connected" && (e.updateChannelState(o, {
|
|
8623
8623
|
status: "connected",
|
|
8624
8624
|
startTime: Date.now()
|
|
8625
|
-
}), A(o, "connected"),
|
|
8625
|
+
}), A(o, "connected"), Qp(l), V(l).then(() => j(l, o)), N());
|
|
8626
8626
|
break;
|
|
8627
8627
|
case SessionState.Terminated: {
|
|
8628
8628
|
let n = e.channels.value.find((e) => e.id === o);
|
|
@@ -8650,27 +8650,27 @@ const createSipService = (e, t = {}) => {
|
|
|
8650
8650
|
startTime: void 0,
|
|
8651
8651
|
keypadValue: "",
|
|
8652
8652
|
hasVideo: !1
|
|
8653
|
-
}), a.value.delete(o), e.activeChannelId.value === o &&
|
|
8653
|
+
}), a.value.delete(o), e.activeChannelId.value === o && $p(), N();
|
|
8654
8654
|
break;
|
|
8655
8655
|
}
|
|
8656
8656
|
}
|
|
8657
8657
|
});
|
|
8658
8658
|
let u = {
|
|
8659
|
-
sessionDescriptionHandlerOptions: { constraints:
|
|
8659
|
+
sessionDescriptionHandlerOptions: { constraints: Vp(i) },
|
|
8660
8660
|
requestDelegate: {
|
|
8661
8661
|
onProgress: (t) => {
|
|
8662
|
-
(t.message.statusCode === 180 || t.message.statusCode === 183) && (t.message.body && (e.updateChannelState(o, { hasEarlyMedia: !0 }),
|
|
8662
|
+
(t.message.statusCode === 180 || t.message.statusCode === 183) && (t.message.body && (e.updateChannelState(o, { hasEarlyMedia: !0 }), Qp(l)), N());
|
|
8663
8663
|
},
|
|
8664
8664
|
onAccept: (t) => {
|
|
8665
8665
|
e.channels.value.find((e) => e.id === o)?.status !== "connected" && (m.add(o), e.updateChannelState(o, {
|
|
8666
8666
|
status: "connected",
|
|
8667
8667
|
startTime: Date.now()
|
|
8668
|
-
}), A(o, "connected"),
|
|
8668
|
+
}), A(o, "connected"), Qp(l), V(l).then(() => j(l, o)), N());
|
|
8669
8669
|
}
|
|
8670
8670
|
}
|
|
8671
8671
|
};
|
|
8672
8672
|
await l.invite(u);
|
|
8673
|
-
},
|
|
8673
|
+
}, Gp = async (t = !1) => {
|
|
8674
8674
|
let n = e.activeChannelId.value, i = a.value.get(n);
|
|
8675
8675
|
if (i instanceof Invitation && i.state === SessionState.Initial) {
|
|
8676
8676
|
for (let [t, n] of a.value.entries()) if (t !== e.activeChannelId.value && n.state === SessionState.Established && !e.channels.value.find((e) => e.id === t)?.isHeld) try {
|
|
@@ -8678,7 +8678,7 @@ const createSipService = (e, t = {}) => {
|
|
|
8678
8678
|
} catch (e) {
|
|
8679
8679
|
console.error(`[SipJs] Failed to hold channel ${t}:`, e);
|
|
8680
8680
|
}
|
|
8681
|
-
let o = { sessionDescriptionHandlerOptions: { constraints:
|
|
8681
|
+
let o = { sessionDescriptionHandlerOptions: { constraints: Vp(t) } };
|
|
8682
8682
|
e.updateChannelState(n, {
|
|
8683
8683
|
status: "connected",
|
|
8684
8684
|
startTime: Date.now()
|
|
@@ -8719,7 +8719,7 @@ const createSipService = (e, t = {}) => {
|
|
|
8719
8719
|
try {
|
|
8720
8720
|
await J(t, n), e.setHeld(n), z(t, e.channels.value.find((t) => t.id === e.activeChannelId.value));
|
|
8721
8721
|
} catch {}
|
|
8722
|
-
},
|
|
8722
|
+
}, Kp = async (t) => {
|
|
8723
8723
|
let n = e.activeChannelId.value;
|
|
8724
8724
|
if (n === t) return;
|
|
8725
8725
|
let i = a.value.get(n), o = a.value.get(t), s = e.channels.value.find((e) => e.id === n), l = e.channels.value.find((e) => e.id === t);
|
|
@@ -8730,8 +8730,8 @@ const createSipService = (e, t = {}) => {
|
|
|
8730
8730
|
if (l?.isHeld) try {
|
|
8731
8731
|
await J(o, !1), e.updateChannelState(t, { isHeld: !1 });
|
|
8732
8732
|
} catch {}
|
|
8733
|
-
z(o, e.channels.value.find((e) => e.id === t)),
|
|
8734
|
-
} else
|
|
8733
|
+
z(o, e.channels.value.find((e) => e.id === t)), Qp(o);
|
|
8734
|
+
} else $p();
|
|
8735
8735
|
}, Z = (t) => {
|
|
8736
8736
|
let n = a.value.get(e.activeChannelId.value);
|
|
8737
8737
|
if (n?.state !== SessionState.Established) return;
|
|
@@ -8741,10 +8741,10 @@ const createSipService = (e, t = {}) => {
|
|
|
8741
8741
|
contentDisposition: "signal"
|
|
8742
8742
|
} } };
|
|
8743
8743
|
n.info(i);
|
|
8744
|
-
},
|
|
8744
|
+
}, qp = (t, n) => {
|
|
8745
8745
|
let i = e.channels.value.find((e) => e.id === t);
|
|
8746
|
-
!i || i.status !== "connected" || (
|
|
8747
|
-
},
|
|
8746
|
+
!i || i.status !== "connected" || (Qp(n), z(n, i), V(n), o.play().catch(() => {}));
|
|
8747
|
+
}, Jp = async (t) => {
|
|
8748
8748
|
console.log("[SipJs] 🔄 transferCall iniciado"), console.log("[SipJs] Target:", t);
|
|
8749
8749
|
let i = e.activeChannelId.value, o = a.value.get(i);
|
|
8750
8750
|
if (!o) throw console.error("[SipJs] ❌ No hay sesión activa en el canal", i), Error("No active session to transfer");
|
|
@@ -8764,7 +8764,7 @@ const createSipService = (e, t = {}) => {
|
|
|
8764
8764
|
},
|
|
8765
8765
|
onReject: (e) => {
|
|
8766
8766
|
let t = e.message.statusCode;
|
|
8767
|
-
console.error("[SipJs] ❌ Transfer REFER rechazado:", t), console.error("[SipJs] Response completo:", e.message),
|
|
8767
|
+
console.error("[SipJs] ❌ Transfer REFER rechazado:", t), console.error("[SipJs] Response completo:", e.message), qp(i, o);
|
|
8768
8768
|
}
|
|
8769
8769
|
},
|
|
8770
8770
|
onNotify: (e) => {
|
|
@@ -8787,7 +8787,7 @@ const createSipService = (e, t = {}) => {
|
|
|
8787
8787
|
487: "Transferencia cancelada",
|
|
8788
8788
|
503: "Servicio no disponible - el destino puede estar fuera de línea"
|
|
8789
8789
|
}[t] || `Error en transferencia (código ${t})`;
|
|
8790
|
-
console.warn("[SipJs] 💬", e),
|
|
8790
|
+
console.warn("[SipJs] 💬", e), qp(i, o);
|
|
8791
8791
|
} else t >= 100 && t < 200 && console.log("[SipJs] 📞 Transferencia en progreso:", t, n);
|
|
8792
8792
|
} else console.warn("[SipJs] ⚠️ No se pudo extraer el código de estado del NOTIFY body");
|
|
8793
8793
|
} else console.warn("[SipJs] ⚠️ NOTIFY sin body");
|
|
@@ -8796,7 +8796,7 @@ const createSipService = (e, t = {}) => {
|
|
|
8796
8796
|
} catch (e) {
|
|
8797
8797
|
throw console.error("[SipJs] ❌ Error en transferCall:", e), console.error("[SipJs] Error type:", e?.constructor?.name), console.error("[SipJs] Error message:", e instanceof Error ? e.message : String(e)), console.error("[SipJs] Error stack:", e instanceof Error ? e.stack : "N/A"), e;
|
|
8798
8798
|
}
|
|
8799
|
-
},
|
|
8799
|
+
}, Yp = async (t) => {
|
|
8800
8800
|
console.log("[SipJs] 🔄 startAttendedTransfer iniciado"), console.log("[SipJs] Target:", t);
|
|
8801
8801
|
let n = e.activeChannelId.value, i = a.value.get(n);
|
|
8802
8802
|
if (console.log("[SipJs] Canal original:", n), console.log("[SipJs] Sesión original:", i?.state), !i || i.state !== SessionState.Established) throw console.error("[SipJs] ❌ No hay llamada establecida para transferir"), Error("No established call to transfer");
|
|
@@ -8817,7 +8817,7 @@ const createSipService = (e, t = {}) => {
|
|
|
8817
8817
|
} catch (t) {
|
|
8818
8818
|
throw console.error("[SipJs] ❌ Failed to start consultation call:", t), console.log("[SipJs] 🔄 Volviendo al canal original y quitando hold..."), e.setActiveChannelId(n), await J(i, !1).catch(() => {}), e.updateChannelState(n, { isHeld: !1 }), Error("Failed to initiate consultation call");
|
|
8819
8819
|
}
|
|
8820
|
-
},
|
|
8820
|
+
}, Xp = async () => {
|
|
8821
8821
|
console.log("[SipJs] 🔄 completeAttendedTransfer iniciado");
|
|
8822
8822
|
let t = e.transferInProgress.value;
|
|
8823
8823
|
if (!t) throw console.error("[SipJs] ❌ No hay transferencia en progreso"), Error("No transfer in progress");
|
|
@@ -8860,7 +8860,7 @@ const createSipService = (e, t = {}) => {
|
|
|
8860
8860
|
} catch (e) {
|
|
8861
8861
|
throw console.error("[SipJs] Attended transfer failed:", e), e;
|
|
8862
8862
|
}
|
|
8863
|
-
},
|
|
8863
|
+
}, Zp = async () => {
|
|
8864
8864
|
let t = e.transferInProgress.value;
|
|
8865
8865
|
if (!t) throw Error("No transfer in progress");
|
|
8866
8866
|
console.log("[SipJs] Canceling attended transfer...");
|
|
@@ -8876,7 +8876,7 @@ const createSipService = (e, t = {}) => {
|
|
|
8876
8876
|
console.warn("[SipJs] Error resuming original call:", e);
|
|
8877
8877
|
}
|
|
8878
8878
|
e.setTransferInProgress(null);
|
|
8879
|
-
},
|
|
8879
|
+
}, Qp = (e) => {
|
|
8880
8880
|
let t = e.sessionDescriptionHandler;
|
|
8881
8881
|
if (!t) {
|
|
8882
8882
|
console.error("[SipJs] setupRemoteMedia: no sessionDescriptionHandler");
|
|
@@ -8909,23 +8909,23 @@ const createSipService = (e, t = {}) => {
|
|
|
8909
8909
|
}, { signal: g.signal });
|
|
8910
8910
|
let [s] = n.getTracks();
|
|
8911
8911
|
s && (o.srcObject = n, a(s), i && j(e, i.id));
|
|
8912
|
-
},
|
|
8912
|
+
}, $p = () => {
|
|
8913
8913
|
_?.abort(), _ = null, g?.abort(), g = null, o.pause(), o.srcObject = null, u.value = null, d.value = null;
|
|
8914
8914
|
};
|
|
8915
8915
|
return {
|
|
8916
|
-
initUserAgent:
|
|
8917
|
-
stop:
|
|
8916
|
+
initUserAgent: Hp,
|
|
8917
|
+
stop: Up,
|
|
8918
8918
|
makeCall: G,
|
|
8919
|
-
answerCall:
|
|
8919
|
+
answerCall: Gp,
|
|
8920
8920
|
hangupCall: K,
|
|
8921
8921
|
toggleMute: q,
|
|
8922
8922
|
toggleHold: Y,
|
|
8923
8923
|
sendDTMF: Z,
|
|
8924
|
-
transferCall:
|
|
8925
|
-
startAttendedTransfer:
|
|
8926
|
-
completeAttendedTransfer:
|
|
8927
|
-
cancelAttendedTransfer:
|
|
8928
|
-
switchChannel:
|
|
8924
|
+
transferCall: Jp,
|
|
8925
|
+
startAttendedTransfer: Yp,
|
|
8926
|
+
completeAttendedTransfer: Xp,
|
|
8927
|
+
cancelAttendedTransfer: Zp,
|
|
8928
|
+
switchChannel: Kp,
|
|
8929
8929
|
extension: x,
|
|
8930
8930
|
setVolume: P,
|
|
8931
8931
|
setNotificationVolume: D,
|
|
@@ -14824,89 +14824,6 @@ var _hoisted_1$17 = {
|
|
|
14824
14824
|
_: 3
|
|
14825
14825
|
}, 16));
|
|
14826
14826
|
}
|
|
14827
|
-
}), [injectToggleGroupRootContext, provideToggleGroupRootContext] = createContext("ToggleGroupRoot"), Toggle_default$1 = /* @__PURE__ */ defineComponent({
|
|
14828
|
-
__name: "Toggle",
|
|
14829
|
-
props: {
|
|
14830
|
-
defaultValue: {
|
|
14831
|
-
type: Boolean,
|
|
14832
|
-
required: !1
|
|
14833
|
-
},
|
|
14834
|
-
modelValue: {
|
|
14835
|
-
type: [Boolean, null],
|
|
14836
|
-
required: !1,
|
|
14837
|
-
default: void 0
|
|
14838
|
-
},
|
|
14839
|
-
disabled: {
|
|
14840
|
-
type: Boolean,
|
|
14841
|
-
required: !1,
|
|
14842
|
-
default: !1
|
|
14843
|
-
},
|
|
14844
|
-
asChild: {
|
|
14845
|
-
type: Boolean,
|
|
14846
|
-
required: !1
|
|
14847
|
-
},
|
|
14848
|
-
as: {
|
|
14849
|
-
type: null,
|
|
14850
|
-
required: !1,
|
|
14851
|
-
default: "button"
|
|
14852
|
-
},
|
|
14853
|
-
name: {
|
|
14854
|
-
type: String,
|
|
14855
|
-
required: !1
|
|
14856
|
-
},
|
|
14857
|
-
required: {
|
|
14858
|
-
type: Boolean,
|
|
14859
|
-
required: !1
|
|
14860
|
-
}
|
|
14861
|
-
},
|
|
14862
|
-
emits: ["update:modelValue"],
|
|
14863
|
-
setup(e, { emit: t }) {
|
|
14864
|
-
let n = e, i = t, { forwardRef: a, currentElement: o } = useForwardExpose(), d = injectToggleGroupRootContext(null), f = useVModel(n, "modelValue", i, {
|
|
14865
|
-
defaultValue: n.defaultValue,
|
|
14866
|
-
passive: n.modelValue === void 0
|
|
14867
|
-
});
|
|
14868
|
-
function p() {
|
|
14869
|
-
f.value = !f.value;
|
|
14870
|
-
}
|
|
14871
|
-
let m = computed(() => f.value ? "on" : "off"), g = useFormControl(o);
|
|
14872
|
-
return (e, t) => (openBlock(), createBlock(unref(Primitive), {
|
|
14873
|
-
ref: unref(a),
|
|
14874
|
-
type: e.as === "button" ? "button" : void 0,
|
|
14875
|
-
"as-child": n.asChild,
|
|
14876
|
-
as: e.as,
|
|
14877
|
-
"aria-pressed": unref(f),
|
|
14878
|
-
"data-state": m.value,
|
|
14879
|
-
"data-disabled": e.disabled ? "" : void 0,
|
|
14880
|
-
disabled: e.disabled,
|
|
14881
|
-
onClick: p
|
|
14882
|
-
}, {
|
|
14883
|
-
default: withCtx(() => [renderSlot(e.$slots, "default", {
|
|
14884
|
-
modelValue: unref(f),
|
|
14885
|
-
disabled: e.disabled,
|
|
14886
|
-
pressed: unref(f),
|
|
14887
|
-
state: m.value
|
|
14888
|
-
}), unref(g) && e.name && !unref(d) ? (openBlock(), createBlock(VisuallyHiddenInput_default, {
|
|
14889
|
-
key: 0,
|
|
14890
|
-
type: "checkbox",
|
|
14891
|
-
name: e.name,
|
|
14892
|
-
value: unref(f),
|
|
14893
|
-
required: e.required
|
|
14894
|
-
}, null, 8, [
|
|
14895
|
-
"name",
|
|
14896
|
-
"value",
|
|
14897
|
-
"required"
|
|
14898
|
-
])) : createCommentVNode("v-if", !0)]),
|
|
14899
|
-
_: 3
|
|
14900
|
-
}, 8, [
|
|
14901
|
-
"type",
|
|
14902
|
-
"as-child",
|
|
14903
|
-
"as",
|
|
14904
|
-
"aria-pressed",
|
|
14905
|
-
"data-state",
|
|
14906
|
-
"data-disabled",
|
|
14907
|
-
"disabled"
|
|
14908
|
-
]));
|
|
14909
|
-
}
|
|
14910
14827
|
}), TooltipArrow_default = /* @__PURE__ */ defineComponent({
|
|
14911
14828
|
__name: "TooltipArrow",
|
|
14912
14829
|
props: {
|
|
@@ -16311,7 +16228,7 @@ var icon_phone_default = { render }, Tooltip_default = /* @__PURE__ */ defineCom
|
|
|
16311
16228
|
}, _hoisted_16$1 = {
|
|
16312
16229
|
key: 4,
|
|
16313
16230
|
class: "webphone-display__non-idle wp:flex wp:flex-col wp:items-center wp:justify-center wp:gap-2"
|
|
16314
|
-
}, _hoisted_17$1 = { class: "webphone-display__non-idle-row wp:flex wp:items-center wp:gap-4" }, _hoisted_18
|
|
16231
|
+
}, _hoisted_17$1 = { class: "webphone-display__non-idle-row wp:flex wp:items-center wp:gap-4" }, _hoisted_18 = { class: "webphone-display__non-idle-caller wp:flex wp:flex-col wp:items-center" }, _hoisted_19 = { class: "webphone-display__non-idle-name wp:text-md wp:font-bold wp:text-neutral-800 wp:dark:text-white" }, _hoisted_20 = {
|
|
16315
16232
|
key: 0,
|
|
16316
16233
|
class: "webphone-display__non-idle-number wp:text-sm wp:text-muted-foreground"
|
|
16317
16234
|
}, CallDisplay_default = /* @__PURE__ */ defineComponent({
|
|
@@ -16482,7 +16399,7 @@ var icon_phone_default = { render }, Tooltip_default = /* @__PURE__ */ defineCom
|
|
|
16482
16399
|
})) : (openBlock(), createBlock(unref(CircleUser), {
|
|
16483
16400
|
key: 4,
|
|
16484
16401
|
class: "wp:w-3 wp:h-3"
|
|
16485
|
-
}))], 2), createElementVNode("div", _hoisted_9$4, [createElementVNode("span", _hoisted_10$3, toDisplayString(e.name), 1), createElementVNode("span", _hoisted_11$3, toDisplayString(e.number), 1)])], 40, _hoisted_8$4))), 128))], 512), [[vShow, v.value && x.value && (T.value.length > 0 || S.value)]])], 512)])) : (p.value?.status || "idle") === "connected" ? (openBlock(), createElementBlock("div", _hoisted_12$3, [createElementVNode("div", _hoisted_13$1, [createElementVNode("div", _hoisted_14$1, " En llamada con " + toDisplayString(L.value), 1), L.value === z.value ? createCommentVNode("", !0) : (openBlock(), createElementBlock("div", _hoisted_15$1, toDisplayString(z.value), 1))])])) : (p.value?.status || "idle") === "idle" ? createCommentVNode("", !0) : (openBlock(), createElementBlock("div", _hoisted_16$1, [createElementVNode("div", _hoisted_17$1, [createElementVNode("div", _hoisted_18
|
|
16402
|
+
}))], 2), createElementVNode("div", _hoisted_9$4, [createElementVNode("span", _hoisted_10$3, toDisplayString(e.name), 1), createElementVNode("span", _hoisted_11$3, toDisplayString(e.number), 1)])], 40, _hoisted_8$4))), 128))], 512), [[vShow, v.value && x.value && (T.value.length > 0 || S.value)]])], 512)])) : (p.value?.status || "idle") === "connected" ? (openBlock(), createElementBlock("div", _hoisted_12$3, [createElementVNode("div", _hoisted_13$1, [createElementVNode("div", _hoisted_14$1, " En llamada con " + toDisplayString(L.value), 1), L.value === z.value ? createCommentVNode("", !0) : (openBlock(), createElementBlock("div", _hoisted_15$1, toDisplayString(z.value), 1))])])) : (p.value?.status || "idle") === "idle" ? createCommentVNode("", !0) : (openBlock(), createElementBlock("div", _hoisted_16$1, [createElementVNode("div", _hoisted_17$1, [createElementVNode("div", _hoisted_18, [createElementVNode("div", _hoisted_19, toDisplayString(L.value), 1), L.value === z.value ? createCommentVNode("", !0) : (openBlock(), createElementBlock("div", _hoisted_20, toDisplayString(z.value), 1))]), createVNode(unref(TooltipProvider_default), null, {
|
|
16486
16403
|
default: withCtx(() => [createVNode(unref(Tooltip_default), null, {
|
|
16487
16404
|
default: withCtx(() => [createVNode(unref(TooltipTrigger_default), { "as-child": "" }), createVNode(unref(TooltipContent_default), { class: "wp:flex wp:items-center wp:gap-2" }, {
|
|
16488
16405
|
default: withCtx(() => [createElementVNode("span", null, toDisplayString(unref(t).isKeypadVisible ? "Ocultar" : "Mostrar") + " teclado", 1), createVNode(unref(Kbd_default), null, {
|
|
@@ -16935,107 +16852,48 @@ var icon_phone_default = { render }, Tooltip_default = /* @__PURE__ */ defineCom
|
|
|
16935
16852
|
let t = e, n = reactiveOmit(t, "class");
|
|
16936
16853
|
return (e, i) => (openBlock(), createBlock(unref(Separator_default$1), mergeProps({ "data-slot": "separator" }, unref(n), { class: unref(cn)("wp:bg-border wp:shrink-0 wp:data-[orientation=horizontal]:h-px wp:data-[orientation=horizontal]:w-full wp:data-[orientation=vertical]:h-full wp:data-[orientation=vertical]:w-px", t.class) }), null, 16, ["class"]));
|
|
16937
16854
|
}
|
|
16938
|
-
}),
|
|
16939
|
-
__name: "Toggle",
|
|
16940
|
-
props: {
|
|
16941
|
-
defaultValue: { type: Boolean },
|
|
16942
|
-
modelValue: { type: [Boolean, null] },
|
|
16943
|
-
disabled: {
|
|
16944
|
-
type: Boolean,
|
|
16945
|
-
default: !1
|
|
16946
|
-
},
|
|
16947
|
-
asChild: { type: Boolean },
|
|
16948
|
-
as: {},
|
|
16949
|
-
name: {},
|
|
16950
|
-
required: { type: Boolean },
|
|
16951
|
-
class: { type: [
|
|
16952
|
-
Boolean,
|
|
16953
|
-
null,
|
|
16954
|
-
String,
|
|
16955
|
-
Object,
|
|
16956
|
-
Array
|
|
16957
|
-
] },
|
|
16958
|
-
variant: { default: "default" },
|
|
16959
|
-
size: { default: "default" }
|
|
16960
|
-
},
|
|
16961
|
-
emits: ["update:modelValue"],
|
|
16962
|
-
setup(e, { emit: t }) {
|
|
16963
|
-
let n = e, i = t, a = useForwardPropsEmits(reactiveOmit(n, "class", "size", "variant"), i);
|
|
16964
|
-
return (t, i) => (openBlock(), createBlock(unref(Toggle_default$1), mergeProps({ "data-slot": "toggle" }, unref(a), { class: unref(cn)(unref(toggleVariants)({
|
|
16965
|
-
variant: e.variant,
|
|
16966
|
-
size: e.size
|
|
16967
|
-
}), n.class) }), {
|
|
16968
|
-
default: withCtx((e) => [renderSlot(t.$slots, "default", normalizeProps(guardReactiveProps(e)))]),
|
|
16969
|
-
_: 3
|
|
16970
|
-
}, 16, ["class"]));
|
|
16971
|
-
}
|
|
16972
|
-
});
|
|
16973
|
-
const toggleVariants = cva("wp:inline-flex wp:items-center wp:justify-center wp:gap-2 wp:rounded-md wp:text-sm wp:font-medium wp:hover:bg-muted wp:hover:text-muted-foreground wp:disabled:pointer-events-none wp:disabled:opacity-50 wp:data-[state=on]:bg-accent wp:data-[state=on]:text-accent-foreground wp:[&_svg]:pointer-events-none wp:[&_svg:not([class*='size-'])]:size-4 wp:[&_svg]:shrink-0 wp:focus-visible:border-ring wp:focus-visible:ring-ring/50 wp:focus-visible:ring-[3px] wp:outline-none wp:transition-[color,box-shadow] wp:aria-invalid:ring-destructive/20 wp:dark:aria-invalid:ring-destructive/40 wp:aria-invalid:border-destructive wp:whitespace-nowrap", {
|
|
16974
|
-
variants: {
|
|
16975
|
-
variant: {
|
|
16976
|
-
default: "wp:bg-transparent",
|
|
16977
|
-
outline: "wp:border wp:border-input wp:bg-transparent wp:shadow-xs wp:hover:bg-accent wp:hover:text-accent-foreground"
|
|
16978
|
-
},
|
|
16979
|
-
size: {
|
|
16980
|
-
default: "wp:h-9 wp:px-2 wp:min-w-9",
|
|
16981
|
-
sm: "wp:h-8 wp:px-1.5 wp:min-w-8",
|
|
16982
|
-
lg: "wp:h-10 wp:px-2.5 wp:min-w-10"
|
|
16983
|
-
}
|
|
16984
|
-
},
|
|
16985
|
-
defaultVariants: {
|
|
16986
|
-
variant: "default",
|
|
16987
|
-
size: "default"
|
|
16988
|
-
}
|
|
16989
|
-
});
|
|
16990
|
-
var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2$3 = { class: "wp:flex wp:items-center wp:justify-between wp:gap-2" }, _hoisted_3$3 = { class: "wp:flex wp:flex-col" }, _hoisted_4$3 = { class: "wp:text-sm wp:text-muted-foreground" }, _hoisted_5$3 = { class: "wp:flex wp:flex-col wp:gap-2" }, _hoisted_6$3 = { class: "wp:flex wp:flex-col wp:gap-2" }, _hoisted_7$3 = { class: "wp:flex wp:flex-col wp:gap-4" }, _hoisted_8$3 = { class: "wp:flex wp:justify-between" }, _hoisted_9$3 = { class: "wp:text-sm wp:text-muted-foreground" }, _hoisted_10$2 = { class: "wp:flex wp:flex-col wp:gap-4" }, _hoisted_11$2 = { class: "wp:flex wp:justify-between" }, _hoisted_12$2 = { class: "wp:text-sm wp:text-muted-foreground" }, _hoisted_13 = { class: "wp:flex wp:flex-col wp:gap-3" }, _hoisted_14 = { class: "wp:grid wp:grid-cols-2 wp:gap-2 wp:text-sm" }, _hoisted_15 = { class: "wp:flex wp:items-center wp:justify-between wp:gap-2" }, _hoisted_16 = { class: "wp:flex wp:items-center wp:justify-between wp:gap-2" }, _hoisted_17 = { class: "wp:flex wp:items-center wp:justify-between wp:gap-2" }, _hoisted_18 = { class: "wp:flex wp:items-center wp:justify-between wp:gap-2" }, _hoisted_19 = { class: "wp:flex wp:items-center wp:justify-between wp:gap-2" }, _hoisted_20 = { class: "wp:flex wp:items-center wp:justify-between wp:gap-2" }, AudioSettingsDialog_default = /* @__PURE__ */ defineComponent({
|
|
16855
|
+
}), _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2$3 = { class: "wp:flex wp:flex-col wp:gap-2" }, _hoisted_3$3 = { class: "wp:flex wp:flex-col wp:gap-2" }, _hoisted_4$3 = { class: "wp:flex wp:flex-col wp:gap-4" }, _hoisted_5$3 = { class: "wp:flex wp:justify-between" }, _hoisted_6$3 = { class: "wp:text-sm wp:text-muted-foreground" }, _hoisted_7$3 = { class: "wp:flex wp:flex-col wp:gap-4" }, _hoisted_8$3 = { class: "wp:flex wp:justify-between" }, _hoisted_9$3 = { class: "wp:text-sm wp:text-muted-foreground" }, _hoisted_10$2 = { class: "wp:flex wp:flex-col wp:gap-3" }, _hoisted_11$2 = { class: "wp:grid wp:grid-cols-2 wp:gap-2 wp:text-sm" }, _hoisted_12$2 = { class: "wp:flex wp:items-center wp:justify-between wp:gap-2" }, _hoisted_13 = { class: "wp:flex wp:items-center wp:justify-between wp:gap-2" }, _hoisted_14 = { class: "wp:flex wp:items-center wp:justify-between wp:gap-2" }, _hoisted_15 = { class: "wp:flex wp:items-center wp:justify-between wp:gap-2" }, _hoisted_16 = { class: "wp:flex wp:items-center wp:justify-between wp:gap-2" }, _hoisted_17 = { class: "wp:flex wp:items-center wp:justify-between wp:gap-2" }, AudioSettingsDialog_default = /* @__PURE__ */ defineComponent({
|
|
16991
16856
|
__name: "AudioSettingsDialog",
|
|
16992
16857
|
props: { visible: { type: Boolean } },
|
|
16993
16858
|
emits: ["update:visible"],
|
|
16994
16859
|
setup(e, { emit: t }) {
|
|
16995
|
-
let i = t, a = navigator.platform.toUpperCase().indexOf("MAC") >= 0 ? "⌘" : "Ctrl+", { setVolume: o, setOutputDevice: p, setInputDevice: _, setNotificationVolume: v } = inject("sip"), y =
|
|
16996
|
-
b.value = !0;
|
|
16997
|
-
try {
|
|
16998
|
-
e ? await y.register() : await y.unregister();
|
|
16999
|
-
} finally {
|
|
17000
|
-
b.value = !1;
|
|
17001
|
-
}
|
|
17002
|
-
}, S = ref([]), E = ref([]), D = useStorage("webphone-input-device", ""), O = useStorage("webphone-output-device", ""), k = useStorage("webphone-volume", 100), A = useStorage("webphone-notification-volume", 100), j = async () => {
|
|
16860
|
+
let i = t, a = navigator.platform.toUpperCase().indexOf("MAC") >= 0 ? "⌘" : "Ctrl+", { setVolume: o, setOutputDevice: p, setInputDevice: _, setNotificationVolume: v } = inject("sip"), y = ref([]), b = ref([]), x = useStorage("webphone-input-device", ""), S = useStorage("webphone-output-device", ""), E = useStorage("webphone-volume", 100), D = useStorage("webphone-notification-volume", 100), O = async () => {
|
|
17003
16861
|
try {
|
|
17004
16862
|
await navigator.mediaDevices.getUserMedia({ audio: !0 });
|
|
17005
16863
|
let e = await navigator.mediaDevices.enumerateDevices();
|
|
17006
|
-
|
|
16864
|
+
y.value = e.filter((e) => e.kind === "audioinput").map((e, t) => ({
|
|
17007
16865
|
deviceId: e.deviceId,
|
|
17008
16866
|
label: e.label || `Microphone ${t + 1}`
|
|
17009
|
-
})),
|
|
16867
|
+
})), b.value = e.filter((e) => e.kind === "audiooutput").map((e, t) => ({
|
|
17010
16868
|
deviceId: e.deviceId,
|
|
17011
16869
|
label: e.label || `Speaker ${t + 1}`
|
|
17012
16870
|
}));
|
|
17013
|
-
let t =
|
|
17014
|
-
(!
|
|
17015
|
-
let n =
|
|
17016
|
-
(!
|
|
16871
|
+
let t = y.value.some((e) => e.deviceId === x.value);
|
|
16872
|
+
(!x.value || !t) && y.value.length > 0 && (x.value = y.value[0]?.deviceId ?? "");
|
|
16873
|
+
let n = b.value.some((e) => e.deviceId === S.value);
|
|
16874
|
+
(!S.value || !n) && b.value.length > 0 && (S.value = b.value[0]?.deviceId ?? ""), x.value && _(x.value), S.value && p(S.value);
|
|
17017
16875
|
} catch (e) {
|
|
17018
16876
|
console.error("Error loading devices", e);
|
|
17019
16877
|
}
|
|
17020
|
-
},
|
|
16878
|
+
}, k = (e) => {
|
|
17021
16879
|
let t = String(e);
|
|
17022
|
-
|
|
17023
|
-
},
|
|
16880
|
+
x.value = t, _(t);
|
|
16881
|
+
}, A = (e) => {
|
|
17024
16882
|
let t = String(e);
|
|
17025
|
-
|
|
17026
|
-
},
|
|
17027
|
-
get: () => [
|
|
16883
|
+
S.value = t, p(t);
|
|
16884
|
+
}, j = (e, t = 35) => e.length <= t ? e : e.substring(0, t) + "...", M = computed({
|
|
16885
|
+
get: () => [E.value],
|
|
17028
16886
|
set: (e) => {
|
|
17029
|
-
|
|
16887
|
+
E.value = e[0], o(E.value);
|
|
17030
16888
|
}
|
|
17031
|
-
}),
|
|
17032
|
-
get: () => [
|
|
16889
|
+
}), N = computed({
|
|
16890
|
+
get: () => [D.value],
|
|
17033
16891
|
set: (e) => {
|
|
17034
|
-
|
|
16892
|
+
D.value = e[0], v(D.value);
|
|
17035
16893
|
}
|
|
17036
16894
|
});
|
|
17037
16895
|
return onMounted(() => {
|
|
17038
|
-
|
|
16896
|
+
O(), o(E.value), v(D.value);
|
|
17039
16897
|
}), (t, o) => e.visible ? (openBlock(), createBlock(unref(Dialog_default), {
|
|
17040
16898
|
key: 0,
|
|
17041
16899
|
open: e.visible,
|
|
@@ -17051,43 +16909,24 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
17051
16909
|
_: 1
|
|
17052
16910
|
}),
|
|
17053
16911
|
createElementVNode("div", _hoisted_1$3, [
|
|
17054
|
-
createElementVNode("div", _hoisted_2$3, [
|
|
17055
|
-
default: withCtx(() => [...o[7] ||= [createTextVNode("
|
|
17056
|
-
_: 1
|
|
17057
|
-
}), createElementVNode("span", _hoisted_4$3, toDisplayString(unref(y).isConnected.value ? "Registrada" : "Sin registrar"), 1)]), createVNode(unref(Toggle_default), {
|
|
17058
|
-
"model-value": unref(y).isConnected.value,
|
|
17059
|
-
disabled: b.value,
|
|
17060
|
-
"aria-label": "Registrar o desregistrar la extensión SIP",
|
|
17061
|
-
"onUpdate:modelValue": x
|
|
17062
|
-
}, {
|
|
17063
|
-
default: withCtx(() => [unref(y).isConnected.value ? (openBlock(), createBlock(unref(Check), {
|
|
17064
|
-
key: 0,
|
|
17065
|
-
class: "wp:w-4 wp:h-4"
|
|
17066
|
-
})) : (openBlock(), createBlock(unref(X), {
|
|
17067
|
-
key: 1,
|
|
17068
|
-
class: "wp:w-4 wp:h-4"
|
|
17069
|
-
}))]),
|
|
17070
|
-
_: 1
|
|
17071
|
-
}, 8, ["model-value", "disabled"])]),
|
|
17072
|
-
createVNode(unref(Separator_default)),
|
|
17073
|
-
createElementVNode("div", _hoisted_5$3, [createVNode(unref(Label_default), null, {
|
|
17074
|
-
default: withCtx(() => [...o[8] ||= [createTextVNode("Microphone", -1)]]),
|
|
16912
|
+
createElementVNode("div", _hoisted_2$3, [createVNode(unref(Label_default), null, {
|
|
16913
|
+
default: withCtx(() => [...o[7] ||= [createTextVNode("Microphone", -1)]]),
|
|
17075
16914
|
_: 1
|
|
17076
16915
|
}), createVNode(unref(Select_default), {
|
|
17077
|
-
modelValue: unref(
|
|
17078
|
-
"onUpdate:modelValue": [o[0] ||= (e) => isRef(
|
|
16916
|
+
modelValue: unref(x),
|
|
16917
|
+
"onUpdate:modelValue": [o[0] ||= (e) => isRef(x) ? x.value = e : null, k]
|
|
17079
16918
|
}, {
|
|
17080
16919
|
default: withCtx(() => [createVNode(unref(SelectTrigger_default), { class: "wp:w-full" }, {
|
|
17081
16920
|
default: withCtx(() => [createVNode(unref(SelectValue_default), { placeholder: "Select Microphone" })]),
|
|
17082
16921
|
_: 1
|
|
17083
16922
|
}), createVNode(unref(SelectContent_default), null, {
|
|
17084
16923
|
default: withCtx(() => [createVNode(unref(SelectGroup_default), null, {
|
|
17085
|
-
default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
16924
|
+
default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(y.value, (e) => (openBlock(), createBlock(unref(SelectItem_default), {
|
|
17086
16925
|
key: e.deviceId,
|
|
17087
16926
|
value: e.deviceId,
|
|
17088
16927
|
title: e.label
|
|
17089
16928
|
}, {
|
|
17090
|
-
default: withCtx(() => [createTextVNode(toDisplayString(
|
|
16929
|
+
default: withCtx(() => [createTextVNode(toDisplayString(j(e.label)), 1)]),
|
|
17091
16930
|
_: 2
|
|
17092
16931
|
}, 1032, ["value", "title"]))), 128))]),
|
|
17093
16932
|
_: 1
|
|
@@ -17096,24 +16935,24 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
17096
16935
|
})]),
|
|
17097
16936
|
_: 1
|
|
17098
16937
|
}, 8, ["modelValue"])]),
|
|
17099
|
-
createElementVNode("div",
|
|
17100
|
-
default: withCtx(() => [...o[
|
|
16938
|
+
createElementVNode("div", _hoisted_3$3, [createVNode(unref(Label_default), null, {
|
|
16939
|
+
default: withCtx(() => [...o[8] ||= [createTextVNode("Speaker", -1)]]),
|
|
17101
16940
|
_: 1
|
|
17102
16941
|
}), createVNode(unref(Select_default), {
|
|
17103
|
-
modelValue: unref(
|
|
17104
|
-
"onUpdate:modelValue": [o[1] ||= (e) => isRef(
|
|
16942
|
+
modelValue: unref(S),
|
|
16943
|
+
"onUpdate:modelValue": [o[1] ||= (e) => isRef(S) ? S.value = e : null, A]
|
|
17105
16944
|
}, {
|
|
17106
16945
|
default: withCtx(() => [createVNode(unref(SelectTrigger_default), { class: "wp:w-full" }, {
|
|
17107
16946
|
default: withCtx(() => [createVNode(unref(SelectValue_default), { placeholder: "Select Speaker" })]),
|
|
17108
16947
|
_: 1
|
|
17109
16948
|
}), createVNode(unref(SelectContent_default), null, {
|
|
17110
16949
|
default: withCtx(() => [createVNode(unref(SelectGroup_default), null, {
|
|
17111
|
-
default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
16950
|
+
default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(b.value, (e) => (openBlock(), createBlock(unref(SelectItem_default), {
|
|
17112
16951
|
key: e.deviceId,
|
|
17113
16952
|
value: e.deviceId,
|
|
17114
16953
|
title: e.label
|
|
17115
16954
|
}, {
|
|
17116
|
-
default: withCtx(() => [createTextVNode(toDisplayString(
|
|
16955
|
+
default: withCtx(() => [createTextVNode(toDisplayString(j(e.label)), 1)]),
|
|
17117
16956
|
_: 2
|
|
17118
16957
|
}, 1032, ["value", "title"]))), 128))]),
|
|
17119
16958
|
_: 1
|
|
@@ -17122,50 +16961,50 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
17122
16961
|
})]),
|
|
17123
16962
|
_: 1
|
|
17124
16963
|
}, 8, ["modelValue"])]),
|
|
17125
|
-
createElementVNode("div",
|
|
17126
|
-
default: withCtx(() => [...o[
|
|
16964
|
+
createElementVNode("div", _hoisted_4$3, [createElementVNode("div", _hoisted_5$3, [createVNode(unref(Label_default), null, {
|
|
16965
|
+
default: withCtx(() => [...o[9] ||= [createTextVNode("Media Volume", -1)]]),
|
|
17127
16966
|
_: 1
|
|
17128
|
-
}), createElementVNode("span",
|
|
17129
|
-
modelValue:
|
|
17130
|
-
"onUpdate:modelValue": o[2] ||= (e) =>
|
|
16967
|
+
}), createElementVNode("span", _hoisted_6$3, toDisplayString(unref(E)) + "%", 1)]), createVNode(unref(Slider_default), {
|
|
16968
|
+
modelValue: M.value,
|
|
16969
|
+
"onUpdate:modelValue": o[2] ||= (e) => M.value = e,
|
|
17131
16970
|
max: 100,
|
|
17132
16971
|
step: 1
|
|
17133
16972
|
}, null, 8, ["modelValue"])]),
|
|
17134
|
-
createElementVNode("div",
|
|
17135
|
-
default: withCtx(() => [...o[
|
|
16973
|
+
createElementVNode("div", _hoisted_7$3, [createElementVNode("div", _hoisted_8$3, [createVNode(unref(Label_default), null, {
|
|
16974
|
+
default: withCtx(() => [...o[10] ||= [createTextVNode("Notification Volume", -1)]]),
|
|
17136
16975
|
_: 1
|
|
17137
|
-
}), createElementVNode("span",
|
|
17138
|
-
modelValue:
|
|
17139
|
-
"onUpdate:modelValue": o[3] ||= (e) =>
|
|
16976
|
+
}), createElementVNode("span", _hoisted_9$3, toDisplayString(unref(D)) + "%", 1)]), createVNode(unref(Slider_default), {
|
|
16977
|
+
modelValue: N.value,
|
|
16978
|
+
"onUpdate:modelValue": o[3] ||= (e) => N.value = e,
|
|
17140
16979
|
max: 100,
|
|
17141
16980
|
step: 1
|
|
17142
16981
|
}, null, 8, ["modelValue"])]),
|
|
17143
16982
|
createVNode(unref(Separator_default)),
|
|
17144
|
-
createElementVNode("div",
|
|
17145
|
-
default: withCtx(() => [...o[
|
|
16983
|
+
createElementVNode("div", _hoisted_10$2, [createVNode(unref(Label_default), { class: "wp:text-base" }, {
|
|
16984
|
+
default: withCtx(() => [...o[11] ||= [createTextVNode("Atajos de teclado", -1)]]),
|
|
17146
16985
|
_: 1
|
|
17147
|
-
}), createElementVNode("div",
|
|
17148
|
-
createElementVNode("div",
|
|
16986
|
+
}), createElementVNode("div", _hoisted_11$2, [
|
|
16987
|
+
createElementVNode("div", _hoisted_12$2, [o[12] ||= createElementVNode("span", { class: "wp:text-muted-foreground" }, "Historial", -1), createVNode(unref(Kbd_default), null, {
|
|
17149
16988
|
default: withCtx(() => [createTextVNode(toDisplayString(unref(a)) + "H", 1)]),
|
|
17150
16989
|
_: 1
|
|
17151
16990
|
})]),
|
|
17152
|
-
createElementVNode("div",
|
|
16991
|
+
createElementVNode("div", _hoisted_13, [o[13] ||= createElementVNode("span", { class: "wp:text-muted-foreground" }, "Configuración", -1), createVNode(unref(Kbd_default), null, {
|
|
17153
16992
|
default: withCtx(() => [createTextVNode(toDisplayString(unref(a)) + ",", 1)]),
|
|
17154
16993
|
_: 1
|
|
17155
16994
|
})]),
|
|
17156
|
-
createElementVNode("div",
|
|
16995
|
+
createElementVNode("div", _hoisted_14, [o[14] ||= createElementVNode("span", { class: "wp:text-muted-foreground" }, "Teclado", -1), createVNode(unref(Kbd_default), null, {
|
|
17157
16996
|
default: withCtx(() => [createTextVNode(toDisplayString(unref(a)) + "K", 1)]),
|
|
17158
16997
|
_: 1
|
|
17159
16998
|
})]),
|
|
17160
|
-
createElementVNode("div",
|
|
16999
|
+
createElementVNode("div", _hoisted_15, [o[15] ||= createElementVNode("span", { class: "wp:text-muted-foreground" }, "Línea 1", -1), createVNode(unref(Kbd_default), null, {
|
|
17161
17000
|
default: withCtx(() => [createTextVNode(toDisplayString(unref(a)) + "1", 1)]),
|
|
17162
17001
|
_: 1
|
|
17163
17002
|
})]),
|
|
17164
|
-
createElementVNode("div",
|
|
17003
|
+
createElementVNode("div", _hoisted_16, [o[16] ||= createElementVNode("span", { class: "wp:text-muted-foreground" }, "Línea 2", -1), createVNode(unref(Kbd_default), null, {
|
|
17165
17004
|
default: withCtx(() => [createTextVNode(toDisplayString(unref(a)) + "2", 1)]),
|
|
17166
17005
|
_: 1
|
|
17167
17006
|
})]),
|
|
17168
|
-
createElementVNode("div",
|
|
17007
|
+
createElementVNode("div", _hoisted_17, [o[17] ||= createElementVNode("span", { class: "wp:text-muted-foreground" }, "Línea 3", -1), createVNode(unref(Kbd_default), null, {
|
|
17169
17008
|
default: withCtx(() => [createTextVNode(toDisplayString(unref(a)) + "3", 1)]),
|
|
17170
17009
|
_: 1
|
|
17171
17010
|
})])
|
|
@@ -17176,7 +17015,7 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
17176
17015
|
variant: "secondary",
|
|
17177
17016
|
onClick: o[4] ||= (e) => i("update:visible", !1)
|
|
17178
17017
|
}, {
|
|
17179
|
-
default: withCtx(() => [...o[
|
|
17018
|
+
default: withCtx(() => [...o[18] ||= [createTextVNode("Close", -1)]]),
|
|
17180
17019
|
_: 1
|
|
17181
17020
|
})]),
|
|
17182
17021
|
_: 1
|
|
@@ -17712,7 +17551,7 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
17712
17551
|
provide("webphone", x), provide("sip", S), t({ stop: S.stop }), watchEffect(() => {
|
|
17713
17552
|
o.mode === "webcall" && (o.to || console.error("WebPhone: \"to\" prop is required when mode is \"webcall\""), o.logo || console.error("WebPhone: \"logo\" prop is required when mode is \"webcall\""));
|
|
17714
17553
|
});
|
|
17715
|
-
let O = ref(!1), k = ref(!1), j = ref(!1), N = ref(null), F = ref(null), L = ref(null),
|
|
17554
|
+
let O = ref(!1), k = ref(!1), j = ref(!1), N = ref(null), F = ref(null), L = ref(null), Hp = navigator.platform.toUpperCase().indexOf("MAC") >= 0 ? "⌘" : "Ctrl+", H = computed(() => o.mode === "webcall"), U = ref(0), W = (e) => !!e && e.getVideoTracks().length > 0;
|
|
17716
17555
|
watch(() => x.callStatus, (e) => {
|
|
17717
17556
|
if (e === "idle" && !x.isKeypadVisible) {
|
|
17718
17557
|
x.toggleKeypad();
|
|
@@ -17720,68 +17559,68 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
17720
17559
|
}
|
|
17721
17560
|
e !== "idle" && x.isKeypadVisible && x.toggleKeypad();
|
|
17722
17561
|
});
|
|
17723
|
-
let
|
|
17562
|
+
let Wp = computed(() => x.channels.find((e) => e.id === x.activeChannelId) ?? null), G = (e) => {
|
|
17724
17563
|
if (!e) return "";
|
|
17725
17564
|
let t = e.trim(), n = t.startsWith("+"), i = t.replace(/[^\d]/g, "");
|
|
17726
17565
|
return n ? `+${i}` : i;
|
|
17727
|
-
},
|
|
17728
|
-
let e =
|
|
17566
|
+
}, Gp = computed(() => {
|
|
17567
|
+
let e = Wp.value?.remoteNumber || x.remoteNumber, t = G(e);
|
|
17729
17568
|
return o.contacts.find((e) => G(e.number) === t)?.name || e || "Llamada";
|
|
17730
|
-
}), K = computed(() => (U.value, !!
|
|
17731
|
-
|
|
17732
|
-
},
|
|
17569
|
+
}), K = computed(() => (U.value, !!Wp.value?.hasVideo || W(E.value) || W(D.value))), { isOnline: q } = useNetwork(), J = computed(() => !q.value), Y = ref(null), Z = ref(!1), Xp = computed(() => o.enablePictureInPicture), $p = () => {
|
|
17570
|
+
Xp.value && Y.value?.toggle();
|
|
17571
|
+
}, em = async (e, t) => {
|
|
17733
17572
|
try {
|
|
17734
17573
|
t === "blind" ? await S.transferCall(e) : await S.startAttendedTransfer(e);
|
|
17735
17574
|
} catch (e) {
|
|
17736
17575
|
console.error("[WebPhone] Transfer error:", e), alert(e instanceof Error ? e.message : "Transfer failed. Please try again.");
|
|
17737
17576
|
}
|
|
17738
|
-
},
|
|
17577
|
+
}, tm = async () => {
|
|
17739
17578
|
try {
|
|
17740
17579
|
await S.completeAttendedTransfer();
|
|
17741
17580
|
} catch (e) {
|
|
17742
17581
|
console.error("[WebPhone] Complete transfer error:", e), alert(e instanceof Error ? e.message : "Failed to complete transfer.");
|
|
17743
17582
|
}
|
|
17744
|
-
},
|
|
17583
|
+
}, nm = async () => {
|
|
17745
17584
|
try {
|
|
17746
17585
|
await S.cancelAttendedTransfer();
|
|
17747
17586
|
} catch (e) {
|
|
17748
17587
|
console.error("[WebPhone] Cancel transfer error:", e), alert(e instanceof Error ? e.message : "Failed to cancel transfer.");
|
|
17749
17588
|
}
|
|
17750
|
-
},
|
|
17589
|
+
}, rm = (e) => {
|
|
17751
17590
|
x.keypadValue = e, S.makeCall(e);
|
|
17752
|
-
},
|
|
17591
|
+
}, im = (e) => {
|
|
17753
17592
|
if (o.onAnswer) {
|
|
17754
17593
|
o.onAnswer(e);
|
|
17755
17594
|
return;
|
|
17756
17595
|
}
|
|
17757
17596
|
S.answerCall(e);
|
|
17758
|
-
},
|
|
17597
|
+
}, am = () => {
|
|
17759
17598
|
if (o.onHangup) {
|
|
17760
17599
|
o.onHangup();
|
|
17761
17600
|
return;
|
|
17762
17601
|
}
|
|
17763
17602
|
S.hangupCall();
|
|
17764
|
-
},
|
|
17603
|
+
}, om = () => {
|
|
17765
17604
|
if (o.onReject) {
|
|
17766
17605
|
o.onReject();
|
|
17767
17606
|
return;
|
|
17768
17607
|
}
|
|
17769
17608
|
S.hangupCall();
|
|
17770
|
-
},
|
|
17609
|
+
}, sm = () => {
|
|
17771
17610
|
j.value = !0, Y.value?.close(), window.focus();
|
|
17772
|
-
},
|
|
17773
|
-
if (!
|
|
17611
|
+
}, cm = () => {
|
|
17612
|
+
if (!Xp.value) return !1;
|
|
17774
17613
|
let e = x.callStatus !== "idle", t = document.hidden || !document.hasFocus();
|
|
17775
17614
|
return e && t && !Z.value;
|
|
17776
17615
|
}, Q = () => {
|
|
17777
17616
|
window.setTimeout(() => {
|
|
17778
|
-
|
|
17617
|
+
cm() && Y.value?.open();
|
|
17779
17618
|
}, 150);
|
|
17780
17619
|
};
|
|
17781
17620
|
watchEffect(() => {
|
|
17782
17621
|
F.value && (Z.value || !E.value ? F.value.srcObject = null : F.value.srcObject = E.value), L.value && (Z.value || !D.value ? L.value.srcObject = null : L.value.srcObject = D.value);
|
|
17783
17622
|
});
|
|
17784
|
-
let
|
|
17623
|
+
let lm = (e) => {
|
|
17785
17624
|
if (!e || typeof e.addEventListener != "function" || typeof e.removeEventListener != "function") return () => {};
|
|
17786
17625
|
let t = () => {
|
|
17787
17626
|
U.value += 1;
|
|
@@ -17791,11 +17630,11 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
17791
17630
|
};
|
|
17792
17631
|
};
|
|
17793
17632
|
watch(E, (e, t, n) => {
|
|
17794
|
-
U.value += 1, n(
|
|
17633
|
+
U.value += 1, n(lm(e));
|
|
17795
17634
|
}, { immediate: !0 }), watch(D, (e, t, n) => {
|
|
17796
|
-
U.value += 1, n(
|
|
17635
|
+
U.value += 1, n(lm(e));
|
|
17797
17636
|
}, { immediate: !0 });
|
|
17798
|
-
let
|
|
17637
|
+
let um = [
|
|
17799
17638
|
"button",
|
|
17800
17639
|
"a",
|
|
17801
17640
|
"input",
|
|
@@ -17806,15 +17645,15 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
17806
17645
|
"[role=\"button\"]",
|
|
17807
17646
|
"[role=\"radio\"]",
|
|
17808
17647
|
"[data-no-drag]"
|
|
17809
|
-
].join(", "),
|
|
17648
|
+
].join(", "), dm = () => {
|
|
17810
17649
|
let e = window.innerWidth < 640, t = window.innerWidth < 1024, n = 360;
|
|
17811
17650
|
return e ? n = window.innerWidth * .9 : t && (n = 340), {
|
|
17812
17651
|
x: Math.max(0, (window.innerWidth - n) / 2),
|
|
17813
17652
|
y: e ? 30 : 80
|
|
17814
17653
|
};
|
|
17815
|
-
}, { x:
|
|
17654
|
+
}, { x: fm, y: pm, style: mm } = useDraggable(N, {
|
|
17816
17655
|
initialValue: computed(() => {
|
|
17817
|
-
let e =
|
|
17656
|
+
let e = dm();
|
|
17818
17657
|
return {
|
|
17819
17658
|
x: o.position.x ?? e.x,
|
|
17820
17659
|
y: o.position.y ?? e.y
|
|
@@ -17823,14 +17662,14 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
17823
17662
|
preventDefault: !0,
|
|
17824
17663
|
onStart: (e, t) => {
|
|
17825
17664
|
let n = t.target;
|
|
17826
|
-
if (n instanceof HTMLElement && n.closest(
|
|
17665
|
+
if (n instanceof HTMLElement && n.closest(um)) return !1;
|
|
17827
17666
|
}
|
|
17828
17667
|
});
|
|
17829
17668
|
watch(() => o.position, (e) => {
|
|
17830
|
-
let t =
|
|
17831
|
-
|
|
17669
|
+
let t = dm();
|
|
17670
|
+
fm.value = e.x ?? t.x, pm.value = e.y ?? t.y;
|
|
17832
17671
|
}, { deep: !0 });
|
|
17833
|
-
let
|
|
17672
|
+
let hm = [
|
|
17834
17673
|
{
|
|
17835
17674
|
label: "Canal 1",
|
|
17836
17675
|
value: 0
|
|
@@ -17843,27 +17682,27 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
17843
17682
|
label: "Canal 3",
|
|
17844
17683
|
value: 2
|
|
17845
17684
|
}
|
|
17846
|
-
],
|
|
17685
|
+
], gm = ref(!1), $ = computed({
|
|
17847
17686
|
get: () => x.activeChannelId.toString(),
|
|
17848
17687
|
set: async (e) => {
|
|
17849
|
-
if (!J.value && e && !
|
|
17850
|
-
|
|
17688
|
+
if (!J.value && e && !gm.value) {
|
|
17689
|
+
gm.value = !0;
|
|
17851
17690
|
try {
|
|
17852
17691
|
await T(parseInt(e));
|
|
17853
17692
|
} finally {
|
|
17854
|
-
|
|
17693
|
+
gm.value = !1;
|
|
17855
17694
|
}
|
|
17856
17695
|
}
|
|
17857
17696
|
}
|
|
17858
|
-
}),
|
|
17697
|
+
}), _m = (e) => {
|
|
17859
17698
|
let t = x.channels.find((t) => t.id === e);
|
|
17860
17699
|
return t ? t.status === "connected" || t.status === "calling" || t.status === "incoming" : !1;
|
|
17861
|
-
},
|
|
17700
|
+
}, vm = (e) => {
|
|
17862
17701
|
let t = x.channels.find((t) => t.id === e);
|
|
17863
17702
|
return t ? t.isHeld || t.status === "held" : !1;
|
|
17864
|
-
},
|
|
17703
|
+
}, ym = (e) => {
|
|
17865
17704
|
J.value || ($.value = e.toString());
|
|
17866
|
-
},
|
|
17705
|
+
}, bm = (e) => {
|
|
17867
17706
|
if (!J.value && ((e.metaKey || e.ctrlKey) && e.key.toLowerCase() === "h" && (e.preventDefault(), k.value = !0), (e.metaKey || e.ctrlKey) && e.key === "," && (e.preventDefault(), O.value = !0), (e.metaKey || e.ctrlKey) && e.key.toLowerCase() === "k" && (e.preventDefault(), x.toggleKeypad()), (e.metaKey || e.ctrlKey) && [
|
|
17868
17707
|
"1",
|
|
17869
17708
|
"2",
|
|
@@ -17871,43 +17710,43 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
17871
17710
|
].includes(e.key))) {
|
|
17872
17711
|
e.preventDefault();
|
|
17873
17712
|
let t = parseInt(e.key) - 1;
|
|
17874
|
-
|
|
17875
|
-
|
|
17713
|
+
gm.value || (gm.value = !0, T(t).finally(() => {
|
|
17714
|
+
gm.value = !1;
|
|
17876
17715
|
}));
|
|
17877
17716
|
}
|
|
17878
17717
|
};
|
|
17879
17718
|
watch(() => x.callStatus, () => {
|
|
17880
|
-
|
|
17719
|
+
cm() && Q();
|
|
17881
17720
|
}), watch(() => x.isConnected, (e) => {
|
|
17882
17721
|
v.value && a.set(v.value, e);
|
|
17883
|
-
}, { immediate: !0 }), watch(
|
|
17722
|
+
}, { immediate: !0 }), watch(Xp, (e) => {
|
|
17884
17723
|
!e && Z.value && Y.value?.close();
|
|
17885
17724
|
});
|
|
17886
|
-
let
|
|
17887
|
-
|
|
17725
|
+
let xm = ref(!1), Sm = async () => {
|
|
17726
|
+
xm.value || J.value || !o.host || !o.extension || !o.password || (await w({
|
|
17888
17727
|
uri: `sip:${o.extension}@${o.host}`,
|
|
17889
17728
|
transportOptions: { server: _.value },
|
|
17890
17729
|
authorizationUsername: o.extension,
|
|
17891
17730
|
authorizationPassword: o.password
|
|
17892
|
-
}), S.extension.value && (
|
|
17731
|
+
}), S.extension.value && (xm.value = !0, o.mode === "webcall" && o.to && S.makeCall(o.to)));
|
|
17893
17732
|
};
|
|
17894
17733
|
return provide("webphoneRegistration", {
|
|
17895
17734
|
isConnected: computed(() => x.isConnected),
|
|
17896
|
-
register: () =>
|
|
17735
|
+
register: () => Sm(),
|
|
17897
17736
|
unregister: async () => {
|
|
17898
|
-
await S.stop(),
|
|
17737
|
+
await S.stop(), xm.value = !1;
|
|
17899
17738
|
}
|
|
17900
17739
|
}), onMounted(async () => {
|
|
17901
|
-
window.addEventListener("keydown",
|
|
17740
|
+
window.addEventListener("keydown", bm), document.addEventListener("visibilitychange", Q), window.addEventListener("blur", Q), window.addEventListener("pagehide", Q), !(o.mode === "webcall" && (!o.to || !o.logo)) && await Sm();
|
|
17902
17741
|
}), watch(() => q.value, async (e) => {
|
|
17903
|
-
e && await
|
|
17742
|
+
e && await Sm();
|
|
17904
17743
|
}), onUnmounted(() => {
|
|
17905
|
-
S.stop(), window.removeEventListener("keydown",
|
|
17744
|
+
S.stop(), window.removeEventListener("keydown", bm), document.removeEventListener("visibilitychange", Q), window.removeEventListener("blur", Q), window.removeEventListener("pagehide", Q);
|
|
17906
17745
|
}), (e, t) => (openBlock(), createElementBlock(Fragment, null, [
|
|
17907
17746
|
createElementVNode("div", {
|
|
17908
17747
|
ref_key: "phoneRef",
|
|
17909
17748
|
ref: N,
|
|
17910
|
-
style: normalizeStyle(unref(
|
|
17749
|
+
style: normalizeStyle(unref(mm)),
|
|
17911
17750
|
class: normalizeClass(["webphone webphone-container wp:bg-white wp:dark:bg-neutral-800 wp:rounded-2xl wp:shadow-sm wp:inset-shadow-2xs wp:w-[min(92vw,330px)] wp:fixed wp:z-50 wp:select-none wp:[&_button]:cursor-pointer wp:**:[[role=button]]:cursor-pointer", J.value ? "wp:opacity-70" : ""]),
|
|
17912
17751
|
"data-mode": o.mode,
|
|
17913
17752
|
"data-call-status": x.callStatus,
|
|
@@ -17929,22 +17768,22 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
17929
17768
|
}, null, 512)])])) : createCommentVNode("", !0),
|
|
17930
17769
|
createElementVNode("div", _hoisted_4, [
|
|
17931
17770
|
H.value ? createCommentVNode("", !0) : (openBlock(), createElementBlock("div", _hoisted_5, [createElementVNode("div", _hoisted_6, [
|
|
17932
|
-
createElementVNode("div", _hoisted_7, [(openBlock(), createElementBlock(Fragment, null, renderList(
|
|
17771
|
+
createElementVNode("div", _hoisted_7, [(openBlock(), createElementBlock(Fragment, null, renderList(hm, (e) => createElementVNode("button", {
|
|
17933
17772
|
key: e.value,
|
|
17934
17773
|
type: "button",
|
|
17935
17774
|
role: "radio",
|
|
17936
17775
|
"aria-checked": $.value === e.value.toString(),
|
|
17937
17776
|
disabled: J.value,
|
|
17938
|
-
title: `${e.label} (${unref(
|
|
17939
|
-
class: normalizeClass(["webphone__channel-button wp:flex wp:items-center wp:gap-1 wp:px-2 wp:py-2 wp:rounded-lg wp:transition-colors wp:duration-200 wp:outline-none wp:focus-visible:ring-2 wp:focus-visible:ring-[var(--p-primary-color)] wp:focus-visible:ring-offset-2 wp:focus-visible:ring-offset-white wp:dark:focus-visible:ring-offset-neutral-900",
|
|
17777
|
+
title: `${e.label} (${unref(Hp)}${e.value + 1})`,
|
|
17778
|
+
class: normalizeClass(["webphone__channel-button wp:flex wp:items-center wp:gap-1 wp:px-2 wp:py-2 wp:rounded-lg wp:transition-colors wp:duration-200 wp:outline-none wp:focus-visible:ring-2 wp:focus-visible:ring-[var(--p-primary-color)] wp:focus-visible:ring-offset-2 wp:focus-visible:ring-offset-white wp:dark:focus-visible:ring-offset-neutral-900", vm(e.value) ? "wp:bg-status-hold/12 hover:wp:bg-status-hold/18" : _m(e.value) ? "wp:bg-[var(--color-red)]/12 hover:wp:bg-[var(--color-red)]/18" : $.value === e.value.toString() ? "wp:bg-[var(--p-primary-color)]/12" : "wp:hover:bg-neutral-100 wp:dark:hover:bg-neutral-800/80"]),
|
|
17940
17779
|
"data-channel-id": e.value,
|
|
17941
17780
|
"data-state": $.value === e.value.toString() ? "active" : "idle",
|
|
17942
|
-
"data-call-state":
|
|
17943
|
-
onClick: (t) =>
|
|
17781
|
+
"data-call-state": vm(e.value) ? "held" : _m(e.value) ? "busy" : "available",
|
|
17782
|
+
onClick: (t) => ym(e.value)
|
|
17944
17783
|
}, [createVNode(unref(icon_phone_default), {
|
|
17945
|
-
class: normalizeClass(["webphone__channel-icon wp:size-3 wp:shrink-0",
|
|
17784
|
+
class: normalizeClass(["webphone__channel-icon wp:size-3 wp:shrink-0", vm(e.value) ? "wp:text-status-hold" : _m(e.value) ? "wp:text-[var(--color-red)]" : $.value === e.value.toString() ? "wp:text-[var(--p-primary-color)]" : "wp:text-neutral-400"]),
|
|
17946
17785
|
"stroke-width": 1.8
|
|
17947
|
-
}, null, 8, ["class"]), createElementVNode("span", { class: normalizeClass(["webphone__channel-label wp:text-[12px] wp:leading-none ibrand",
|
|
17786
|
+
}, null, 8, ["class"]), createElementVNode("span", { class: normalizeClass(["webphone__channel-label wp:text-[12px] wp:leading-none ibrand", vm(e.value) ? "wp:text-status-hold" : _m(e.value) ? "wp:text-[var(--color-red)]" : $.value === e.value.toString() ? "wp:text-[var(--p-primary-color)]" : "wp:text-neutral-500 wp:dark:text-neutral-400"]) }, toDisplayString(e.label), 3)], 10, _hoisted_8)), 64))]),
|
|
17948
17787
|
createVNode(unref(TooltipProvider_default), null, {
|
|
17949
17788
|
default: withCtx(() => [createVNode(unref(Tooltip_default), null, {
|
|
17950
17789
|
default: withCtx(() => [createVNode(unref(TooltipTrigger_default), { "as-child": "" }, {
|
|
@@ -17953,7 +17792,7 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
17953
17792
|
size: "icon",
|
|
17954
17793
|
class: normalizeClass(["wp:h-8 wp:w-8 wp:rounded-full", Z.value ? "wp:text-primary" : ""]),
|
|
17955
17794
|
title: "Picture-in-Picture",
|
|
17956
|
-
onClick:
|
|
17795
|
+
onClick: $p
|
|
17957
17796
|
}, {
|
|
17958
17797
|
default: withCtx(() => [createVNode(unref(PictureInPicture2), { class: "wp:w-4 wp:h-4 wp:text-[var(--color-settings)]" })]),
|
|
17959
17798
|
_: 1
|
|
@@ -17982,7 +17821,7 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
17982
17821
|
_: 1
|
|
17983
17822
|
}), createVNode(unref(TooltipContent_default), { class: "wp:flex wp:items-center wp:gap-2" }, {
|
|
17984
17823
|
default: withCtx(() => [t[9] ||= createElementVNode("span", null, "Configuración", -1), createVNode(unref(Kbd_default), null, {
|
|
17985
|
-
default: withCtx(() => [createTextVNode(toDisplayString(unref(
|
|
17824
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(Hp)) + ",", 1)]),
|
|
17986
17825
|
_: 1
|
|
17987
17826
|
})]),
|
|
17988
17827
|
_: 1
|
|
@@ -18021,8 +17860,8 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
18021
17860
|
"on-hangup": o.onHangup,
|
|
18022
17861
|
"on-reject": o.onReject,
|
|
18023
17862
|
onTransfer: t[1] ||= (e) => j.value = !0,
|
|
18024
|
-
onCompleteTransfer:
|
|
18025
|
-
onCancelTransfer:
|
|
17863
|
+
onCompleteTransfer: tm,
|
|
17864
|
+
onCancelTransfer: nm
|
|
18026
17865
|
}, null, 8, [
|
|
18027
17866
|
"style",
|
|
18028
17867
|
"destination",
|
|
@@ -18047,23 +17886,23 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
18047
17886
|
visible: k.value,
|
|
18048
17887
|
"onUpdate:visible": t[3] ||= (e) => k.value = e,
|
|
18049
17888
|
contacts: o.contacts,
|
|
18050
|
-
onCall:
|
|
17889
|
+
onCall: rm
|
|
18051
17890
|
}, null, 8, ["visible", "contacts"]),
|
|
18052
17891
|
createVNode(TransferDialog_default, {
|
|
18053
17892
|
visible: j.value,
|
|
18054
17893
|
"onUpdate:visible": t[4] ||= (e) => j.value = e,
|
|
18055
17894
|
contacts: o.contacts,
|
|
18056
|
-
onTransfer:
|
|
17895
|
+
onTransfer: em
|
|
18057
17896
|
}, null, 8, ["visible", "contacts"]),
|
|
18058
17897
|
createVNode(DocumentPip_default, {
|
|
18059
17898
|
ref_key: "documentPipRef",
|
|
18060
17899
|
ref: Y,
|
|
18061
17900
|
active: Z.value,
|
|
18062
17901
|
"onUpdate:active": t[5] ||= (e) => Z.value = e,
|
|
18063
|
-
"auto-open-on-blur":
|
|
17902
|
+
"auto-open-on-blur": Xp.value,
|
|
18064
17903
|
"is-connected": x.isConnected,
|
|
18065
17904
|
"remote-number": x.remoteNumber,
|
|
18066
|
-
"caller-name":
|
|
17905
|
+
"caller-name": Gp.value,
|
|
18067
17906
|
"has-video": K.value ?? !1,
|
|
18068
17907
|
"remote-stream": unref(E),
|
|
18069
17908
|
"local-stream": unref(D),
|
|
@@ -18072,11 +17911,11 @@ var _hoisted_1$3 = { class: "wp:flex wp:flex-col wp:gap-6 wp:py-4" }, _hoisted_2
|
|
|
18072
17911
|
"call-status": x.callStatus,
|
|
18073
17912
|
"is-muted": x.isMuted,
|
|
18074
17913
|
"is-held": x.isHeld,
|
|
18075
|
-
onTransfer:
|
|
18076
|
-
onTransferRequest:
|
|
18077
|
-
onHangup:
|
|
18078
|
-
onReject:
|
|
18079
|
-
onAnswer:
|
|
17914
|
+
onTransfer: sm,
|
|
17915
|
+
onTransferRequest: em,
|
|
17916
|
+
onHangup: am,
|
|
17917
|
+
onReject: om,
|
|
17918
|
+
onAnswer: im,
|
|
18080
17919
|
onToggleMute: t[6] ||= (e) => unref(S).toggleMute(),
|
|
18081
17920
|
onToggleHold: t[7] ||= (e) => unref(S).toggleHold()
|
|
18082
17921
|
}, null, 8, [
|