@tmsoft/webphone 2.0.16 → 2.0.17
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 +22 -22
- package/dist/webphone.es.js +229 -212
- package/dist/webphone.umd.js +2 -2
- package/package.json +1 -1
package/dist/webphone.es.js
CHANGED
|
@@ -7030,41 +7030,41 @@ var concatArrays = (e, t) => {
|
|
|
7030
7030
|
isArbitraryVariablePosition,
|
|
7031
7031
|
isArbitraryPosition,
|
|
7032
7032
|
{ position: [isArbitraryVariable, isArbitraryValue] }
|
|
7033
|
-
],
|
|
7033
|
+
], ym = () => ["no-repeat", { repeat: [
|
|
7034
7034
|
"",
|
|
7035
7035
|
"x",
|
|
7036
7036
|
"y",
|
|
7037
7037
|
"space",
|
|
7038
7038
|
"round"
|
|
7039
|
-
] }],
|
|
7039
|
+
] }], B = () => [
|
|
7040
7040
|
"auto",
|
|
7041
7041
|
"cover",
|
|
7042
7042
|
"contain",
|
|
7043
7043
|
isArbitraryVariableSize,
|
|
7044
7044
|
isArbitrarySize,
|
|
7045
7045
|
{ size: [isArbitraryVariable, isArbitraryValue] }
|
|
7046
|
-
],
|
|
7046
|
+
], V = () => [
|
|
7047
7047
|
isPercent,
|
|
7048
7048
|
isArbitraryVariableLength,
|
|
7049
7049
|
isArbitraryLength
|
|
7050
|
-
],
|
|
7050
|
+
], H = () => [
|
|
7051
7051
|
"",
|
|
7052
7052
|
"none",
|
|
7053
7053
|
"full",
|
|
7054
7054
|
d,
|
|
7055
7055
|
isArbitraryVariable,
|
|
7056
7056
|
isArbitraryValue
|
|
7057
|
-
],
|
|
7057
|
+
], U = () => [
|
|
7058
7058
|
"",
|
|
7059
7059
|
isNumber,
|
|
7060
7060
|
isArbitraryVariableLength,
|
|
7061
7061
|
isArbitraryLength
|
|
7062
|
-
],
|
|
7062
|
+
], W = () => [
|
|
7063
7063
|
"solid",
|
|
7064
7064
|
"dashed",
|
|
7065
7065
|
"dotted",
|
|
7066
7066
|
"double"
|
|
7067
|
-
],
|
|
7067
|
+
], G = () => [
|
|
7068
7068
|
"normal",
|
|
7069
7069
|
"multiply",
|
|
7070
7070
|
"screen",
|
|
@@ -7081,32 +7081,32 @@ var concatArrays = (e, t) => {
|
|
|
7081
7081
|
"saturation",
|
|
7082
7082
|
"color",
|
|
7083
7083
|
"luminosity"
|
|
7084
|
-
],
|
|
7084
|
+
], K = () => [
|
|
7085
7085
|
isNumber,
|
|
7086
7086
|
isPercent,
|
|
7087
7087
|
isArbitraryVariablePosition,
|
|
7088
7088
|
isArbitraryPosition
|
|
7089
|
-
],
|
|
7089
|
+
], q = () => [
|
|
7090
7090
|
"",
|
|
7091
7091
|
"none",
|
|
7092
7092
|
_,
|
|
7093
7093
|
isArbitraryVariable,
|
|
7094
7094
|
isArbitraryValue
|
|
7095
|
-
],
|
|
7095
|
+
], J = () => [
|
|
7096
7096
|
"none",
|
|
7097
7097
|
isNumber,
|
|
7098
7098
|
isArbitraryVariable,
|
|
7099
7099
|
isArbitraryValue
|
|
7100
|
-
],
|
|
7100
|
+
], Y = () => [
|
|
7101
7101
|
"none",
|
|
7102
7102
|
isNumber,
|
|
7103
7103
|
isArbitraryVariable,
|
|
7104
7104
|
isArbitraryValue
|
|
7105
|
-
],
|
|
7105
|
+
], Z = () => [
|
|
7106
7106
|
isNumber,
|
|
7107
7107
|
isArbitraryVariable,
|
|
7108
7108
|
isArbitraryValue
|
|
7109
|
-
],
|
|
7109
|
+
], Q = () => [
|
|
7110
7110
|
isFraction,
|
|
7111
7111
|
"full",
|
|
7112
7112
|
...O()
|
|
@@ -7496,7 +7496,7 @@ var concatArrays = (e, t) => {
|
|
|
7496
7496
|
"line-through",
|
|
7497
7497
|
"no-underline"
|
|
7498
7498
|
],
|
|
7499
|
-
"text-decoration-style": [{ decoration: [...
|
|
7499
|
+
"text-decoration-style": [{ decoration: [...W(), "wavy"] }],
|
|
7500
7500
|
"text-decoration-thickness": [{ decoration: [
|
|
7501
7501
|
isNumber,
|
|
7502
7502
|
"from-font",
|
|
@@ -7587,8 +7587,8 @@ var concatArrays = (e, t) => {
|
|
|
7587
7587
|
"content"
|
|
7588
7588
|
] }],
|
|
7589
7589
|
"bg-position": [{ bg: z() }],
|
|
7590
|
-
"bg-repeat": [{ bg:
|
|
7591
|
-
"bg-size": [{ bg:
|
|
7590
|
+
"bg-repeat": [{ bg: ym() }],
|
|
7591
|
+
"bg-size": [{ bg: B() }],
|
|
7592
7592
|
"bg-image": [{ bg: [
|
|
7593
7593
|
"none",
|
|
7594
7594
|
{
|
|
@@ -7622,47 +7622,47 @@ var concatArrays = (e, t) => {
|
|
|
7622
7622
|
isArbitraryImage
|
|
7623
7623
|
] }],
|
|
7624
7624
|
"bg-color": [{ bg: R() }],
|
|
7625
|
-
"gradient-from-pos": [{ from:
|
|
7626
|
-
"gradient-via-pos": [{ via:
|
|
7627
|
-
"gradient-to-pos": [{ to:
|
|
7625
|
+
"gradient-from-pos": [{ from: V() }],
|
|
7626
|
+
"gradient-via-pos": [{ via: V() }],
|
|
7627
|
+
"gradient-to-pos": [{ to: V() }],
|
|
7628
7628
|
"gradient-from": [{ from: R() }],
|
|
7629
7629
|
"gradient-via": [{ via: R() }],
|
|
7630
7630
|
"gradient-to": [{ to: R() }],
|
|
7631
|
-
rounded: [{ rounded:
|
|
7632
|
-
"rounded-s": [{ "rounded-s":
|
|
7633
|
-
"rounded-e": [{ "rounded-e":
|
|
7634
|
-
"rounded-t": [{ "rounded-t":
|
|
7635
|
-
"rounded-r": [{ "rounded-r":
|
|
7636
|
-
"rounded-b": [{ "rounded-b":
|
|
7637
|
-
"rounded-l": [{ "rounded-l":
|
|
7638
|
-
"rounded-ss": [{ "rounded-ss":
|
|
7639
|
-
"rounded-se": [{ "rounded-se":
|
|
7640
|
-
"rounded-ee": [{ "rounded-ee":
|
|
7641
|
-
"rounded-es": [{ "rounded-es":
|
|
7642
|
-
"rounded-tl": [{ "rounded-tl":
|
|
7643
|
-
"rounded-tr": [{ "rounded-tr":
|
|
7644
|
-
"rounded-br": [{ "rounded-br":
|
|
7645
|
-
"rounded-bl": [{ "rounded-bl":
|
|
7646
|
-
"border-w": [{ border:
|
|
7647
|
-
"border-w-x": [{ "border-x":
|
|
7648
|
-
"border-w-y": [{ "border-y":
|
|
7649
|
-
"border-w-s": [{ "border-s":
|
|
7650
|
-
"border-w-e": [{ "border-e":
|
|
7651
|
-
"border-w-t": [{ "border-t":
|
|
7652
|
-
"border-w-r": [{ "border-r":
|
|
7653
|
-
"border-w-b": [{ "border-b":
|
|
7654
|
-
"border-w-l": [{ "border-l":
|
|
7655
|
-
"divide-x": [{ "divide-x":
|
|
7631
|
+
rounded: [{ rounded: H() }],
|
|
7632
|
+
"rounded-s": [{ "rounded-s": H() }],
|
|
7633
|
+
"rounded-e": [{ "rounded-e": H() }],
|
|
7634
|
+
"rounded-t": [{ "rounded-t": H() }],
|
|
7635
|
+
"rounded-r": [{ "rounded-r": H() }],
|
|
7636
|
+
"rounded-b": [{ "rounded-b": H() }],
|
|
7637
|
+
"rounded-l": [{ "rounded-l": H() }],
|
|
7638
|
+
"rounded-ss": [{ "rounded-ss": H() }],
|
|
7639
|
+
"rounded-se": [{ "rounded-se": H() }],
|
|
7640
|
+
"rounded-ee": [{ "rounded-ee": H() }],
|
|
7641
|
+
"rounded-es": [{ "rounded-es": H() }],
|
|
7642
|
+
"rounded-tl": [{ "rounded-tl": H() }],
|
|
7643
|
+
"rounded-tr": [{ "rounded-tr": H() }],
|
|
7644
|
+
"rounded-br": [{ "rounded-br": H() }],
|
|
7645
|
+
"rounded-bl": [{ "rounded-bl": H() }],
|
|
7646
|
+
"border-w": [{ border: U() }],
|
|
7647
|
+
"border-w-x": [{ "border-x": U() }],
|
|
7648
|
+
"border-w-y": [{ "border-y": U() }],
|
|
7649
|
+
"border-w-s": [{ "border-s": U() }],
|
|
7650
|
+
"border-w-e": [{ "border-e": U() }],
|
|
7651
|
+
"border-w-t": [{ "border-t": U() }],
|
|
7652
|
+
"border-w-r": [{ "border-r": U() }],
|
|
7653
|
+
"border-w-b": [{ "border-b": U() }],
|
|
7654
|
+
"border-w-l": [{ "border-l": U() }],
|
|
7655
|
+
"divide-x": [{ "divide-x": U() }],
|
|
7656
7656
|
"divide-x-reverse": ["divide-x-reverse"],
|
|
7657
|
-
"divide-y": [{ "divide-y":
|
|
7657
|
+
"divide-y": [{ "divide-y": U() }],
|
|
7658
7658
|
"divide-y-reverse": ["divide-y-reverse"],
|
|
7659
7659
|
"border-style": [{ border: [
|
|
7660
|
-
...
|
|
7660
|
+
...W(),
|
|
7661
7661
|
"hidden",
|
|
7662
7662
|
"none"
|
|
7663
7663
|
] }],
|
|
7664
7664
|
"divide-style": [{ divide: [
|
|
7665
|
-
...
|
|
7665
|
+
...W(),
|
|
7666
7666
|
"hidden",
|
|
7667
7667
|
"none"
|
|
7668
7668
|
] }],
|
|
@@ -7677,7 +7677,7 @@ var concatArrays = (e, t) => {
|
|
|
7677
7677
|
"border-color-l": [{ "border-l": R() }],
|
|
7678
7678
|
"divide-color": [{ divide: R() }],
|
|
7679
7679
|
"outline-style": [{ outline: [
|
|
7680
|
-
...
|
|
7680
|
+
...W(),
|
|
7681
7681
|
"none",
|
|
7682
7682
|
"hidden"
|
|
7683
7683
|
] }],
|
|
@@ -7708,12 +7708,12 @@ var concatArrays = (e, t) => {
|
|
|
7708
7708
|
isArbitraryShadow
|
|
7709
7709
|
] }],
|
|
7710
7710
|
"inset-shadow-color": [{ "inset-shadow": R() }],
|
|
7711
|
-
"ring-w": [{ ring:
|
|
7711
|
+
"ring-w": [{ ring: U() }],
|
|
7712
7712
|
"ring-w-inset": ["ring-inset"],
|
|
7713
7713
|
"ring-color": [{ ring: R() }],
|
|
7714
7714
|
"ring-offset-w": [{ "ring-offset": [isNumber, isArbitraryLength] }],
|
|
7715
7715
|
"ring-offset-color": [{ "ring-offset": R() }],
|
|
7716
|
-
"inset-ring-w": [{ "inset-ring":
|
|
7716
|
+
"inset-ring-w": [{ "inset-ring": U() }],
|
|
7717
7717
|
"inset-ring-color": [{ "inset-ring": R() }],
|
|
7718
7718
|
"text-shadow": [{ "text-shadow": [
|
|
7719
7719
|
"none",
|
|
@@ -7728,11 +7728,11 @@ var concatArrays = (e, t) => {
|
|
|
7728
7728
|
isArbitraryValue
|
|
7729
7729
|
] }],
|
|
7730
7730
|
"mix-blend": [{ "mix-blend": [
|
|
7731
|
-
...
|
|
7731
|
+
...G(),
|
|
7732
7732
|
"plus-darker",
|
|
7733
7733
|
"plus-lighter"
|
|
7734
7734
|
] }],
|
|
7735
|
-
"bg-blend": [{ "bg-blend":
|
|
7735
|
+
"bg-blend": [{ "bg-blend": G() }],
|
|
7736
7736
|
"mask-clip": [{ "mask-clip": [
|
|
7737
7737
|
"border",
|
|
7738
7738
|
"padding",
|
|
@@ -7748,37 +7748,37 @@ var concatArrays = (e, t) => {
|
|
|
7748
7748
|
"exclude"
|
|
7749
7749
|
] }],
|
|
7750
7750
|
"mask-image-linear-pos": [{ "mask-linear": [isNumber] }],
|
|
7751
|
-
"mask-image-linear-from-pos": [{ "mask-linear-from":
|
|
7752
|
-
"mask-image-linear-to-pos": [{ "mask-linear-to":
|
|
7751
|
+
"mask-image-linear-from-pos": [{ "mask-linear-from": K() }],
|
|
7752
|
+
"mask-image-linear-to-pos": [{ "mask-linear-to": K() }],
|
|
7753
7753
|
"mask-image-linear-from-color": [{ "mask-linear-from": R() }],
|
|
7754
7754
|
"mask-image-linear-to-color": [{ "mask-linear-to": R() }],
|
|
7755
|
-
"mask-image-t-from-pos": [{ "mask-t-from":
|
|
7756
|
-
"mask-image-t-to-pos": [{ "mask-t-to":
|
|
7755
|
+
"mask-image-t-from-pos": [{ "mask-t-from": K() }],
|
|
7756
|
+
"mask-image-t-to-pos": [{ "mask-t-to": K() }],
|
|
7757
7757
|
"mask-image-t-from-color": [{ "mask-t-from": R() }],
|
|
7758
7758
|
"mask-image-t-to-color": [{ "mask-t-to": R() }],
|
|
7759
|
-
"mask-image-r-from-pos": [{ "mask-r-from":
|
|
7760
|
-
"mask-image-r-to-pos": [{ "mask-r-to":
|
|
7759
|
+
"mask-image-r-from-pos": [{ "mask-r-from": K() }],
|
|
7760
|
+
"mask-image-r-to-pos": [{ "mask-r-to": K() }],
|
|
7761
7761
|
"mask-image-r-from-color": [{ "mask-r-from": R() }],
|
|
7762
7762
|
"mask-image-r-to-color": [{ "mask-r-to": R() }],
|
|
7763
|
-
"mask-image-b-from-pos": [{ "mask-b-from":
|
|
7764
|
-
"mask-image-b-to-pos": [{ "mask-b-to":
|
|
7763
|
+
"mask-image-b-from-pos": [{ "mask-b-from": K() }],
|
|
7764
|
+
"mask-image-b-to-pos": [{ "mask-b-to": K() }],
|
|
7765
7765
|
"mask-image-b-from-color": [{ "mask-b-from": R() }],
|
|
7766
7766
|
"mask-image-b-to-color": [{ "mask-b-to": R() }],
|
|
7767
|
-
"mask-image-l-from-pos": [{ "mask-l-from":
|
|
7768
|
-
"mask-image-l-to-pos": [{ "mask-l-to":
|
|
7767
|
+
"mask-image-l-from-pos": [{ "mask-l-from": K() }],
|
|
7768
|
+
"mask-image-l-to-pos": [{ "mask-l-to": K() }],
|
|
7769
7769
|
"mask-image-l-from-color": [{ "mask-l-from": R() }],
|
|
7770
7770
|
"mask-image-l-to-color": [{ "mask-l-to": R() }],
|
|
7771
|
-
"mask-image-x-from-pos": [{ "mask-x-from":
|
|
7772
|
-
"mask-image-x-to-pos": [{ "mask-x-to":
|
|
7771
|
+
"mask-image-x-from-pos": [{ "mask-x-from": K() }],
|
|
7772
|
+
"mask-image-x-to-pos": [{ "mask-x-to": K() }],
|
|
7773
7773
|
"mask-image-x-from-color": [{ "mask-x-from": R() }],
|
|
7774
7774
|
"mask-image-x-to-color": [{ "mask-x-to": R() }],
|
|
7775
|
-
"mask-image-y-from-pos": [{ "mask-y-from":
|
|
7776
|
-
"mask-image-y-to-pos": [{ "mask-y-to":
|
|
7775
|
+
"mask-image-y-from-pos": [{ "mask-y-from": K() }],
|
|
7776
|
+
"mask-image-y-to-pos": [{ "mask-y-to": K() }],
|
|
7777
7777
|
"mask-image-y-from-color": [{ "mask-y-from": R() }],
|
|
7778
7778
|
"mask-image-y-to-color": [{ "mask-y-to": R() }],
|
|
7779
7779
|
"mask-image-radial": [{ "mask-radial": [isArbitraryVariable, isArbitraryValue] }],
|
|
7780
|
-
"mask-image-radial-from-pos": [{ "mask-radial-from":
|
|
7781
|
-
"mask-image-radial-to-pos": [{ "mask-radial-to":
|
|
7780
|
+
"mask-image-radial-from-pos": [{ "mask-radial-from": K() }],
|
|
7781
|
+
"mask-image-radial-to-pos": [{ "mask-radial-to": K() }],
|
|
7782
7782
|
"mask-image-radial-from-color": [{ "mask-radial-from": R() }],
|
|
7783
7783
|
"mask-image-radial-to-color": [{ "mask-radial-to": R() }],
|
|
7784
7784
|
"mask-image-radial-shape": [{ "mask-radial": ["circle", "ellipse"] }],
|
|
@@ -7788,8 +7788,8 @@ var concatArrays = (e, t) => {
|
|
|
7788
7788
|
}] }],
|
|
7789
7789
|
"mask-image-radial-pos": [{ "mask-radial-at": w() }],
|
|
7790
7790
|
"mask-image-conic-pos": [{ "mask-conic": [isNumber] }],
|
|
7791
|
-
"mask-image-conic-from-pos": [{ "mask-conic-from":
|
|
7792
|
-
"mask-image-conic-to-pos": [{ "mask-conic-to":
|
|
7791
|
+
"mask-image-conic-from-pos": [{ "mask-conic-from": K() }],
|
|
7792
|
+
"mask-image-conic-to-pos": [{ "mask-conic-to": K() }],
|
|
7793
7793
|
"mask-image-conic-from-color": [{ "mask-conic-from": R() }],
|
|
7794
7794
|
"mask-image-conic-to-color": [{ "mask-conic-to": R() }],
|
|
7795
7795
|
"mask-mode": [{ mask: [
|
|
@@ -7806,8 +7806,8 @@ var concatArrays = (e, t) => {
|
|
|
7806
7806
|
"view"
|
|
7807
7807
|
] }],
|
|
7808
7808
|
"mask-position": [{ mask: z() }],
|
|
7809
|
-
"mask-repeat": [{ mask:
|
|
7810
|
-
"mask-size": [{ mask:
|
|
7809
|
+
"mask-repeat": [{ mask: ym() }],
|
|
7810
|
+
"mask-size": [{ mask: B() }],
|
|
7811
7811
|
"mask-type": [{ "mask-type": ["alpha", "luminance"] }],
|
|
7812
7812
|
"mask-image": [{ mask: [
|
|
7813
7813
|
"none",
|
|
@@ -7820,7 +7820,7 @@ var concatArrays = (e, t) => {
|
|
|
7820
7820
|
isArbitraryVariable,
|
|
7821
7821
|
isArbitraryValue
|
|
7822
7822
|
] }],
|
|
7823
|
-
blur: [{ blur:
|
|
7823
|
+
blur: [{ blur: q() }],
|
|
7824
7824
|
brightness: [{ brightness: [
|
|
7825
7825
|
isNumber,
|
|
7826
7826
|
isArbitraryVariable,
|
|
@@ -7873,7 +7873,7 @@ var concatArrays = (e, t) => {
|
|
|
7873
7873
|
isArbitraryVariable,
|
|
7874
7874
|
isArbitraryValue
|
|
7875
7875
|
] }],
|
|
7876
|
-
"backdrop-blur": [{ "backdrop-blur":
|
|
7876
|
+
"backdrop-blur": [{ "backdrop-blur": q() }],
|
|
7877
7877
|
"backdrop-brightness": [{ "backdrop-brightness": [
|
|
7878
7878
|
isNumber,
|
|
7879
7879
|
isArbitraryVariable,
|
|
@@ -7966,18 +7966,18 @@ var concatArrays = (e, t) => {
|
|
|
7966
7966
|
isArbitraryValue
|
|
7967
7967
|
] }],
|
|
7968
7968
|
"perspective-origin": [{ "perspective-origin": T() }],
|
|
7969
|
-
rotate: [{ rotate:
|
|
7970
|
-
"rotate-x": [{ "rotate-x":
|
|
7971
|
-
"rotate-y": [{ "rotate-y":
|
|
7972
|
-
"rotate-z": [{ "rotate-z":
|
|
7973
|
-
scale: [{ scale:
|
|
7974
|
-
"scale-x": [{ "scale-x":
|
|
7975
|
-
"scale-y": [{ "scale-y":
|
|
7976
|
-
"scale-z": [{ "scale-z":
|
|
7969
|
+
rotate: [{ rotate: J() }],
|
|
7970
|
+
"rotate-x": [{ "rotate-x": J() }],
|
|
7971
|
+
"rotate-y": [{ "rotate-y": J() }],
|
|
7972
|
+
"rotate-z": [{ "rotate-z": J() }],
|
|
7973
|
+
scale: [{ scale: Y() }],
|
|
7974
|
+
"scale-x": [{ "scale-x": Y() }],
|
|
7975
|
+
"scale-y": [{ "scale-y": Y() }],
|
|
7976
|
+
"scale-z": [{ "scale-z": Y() }],
|
|
7977
7977
|
"scale-3d": ["scale-3d"],
|
|
7978
|
-
skew: [{ skew:
|
|
7979
|
-
"skew-x": [{ "skew-x":
|
|
7980
|
-
"skew-y": [{ "skew-y":
|
|
7978
|
+
skew: [{ skew: Z() }],
|
|
7979
|
+
"skew-x": [{ "skew-x": Z() }],
|
|
7980
|
+
"skew-y": [{ "skew-y": Z() }],
|
|
7981
7981
|
transform: [{ transform: [
|
|
7982
7982
|
isArbitraryVariable,
|
|
7983
7983
|
isArbitraryValue,
|
|
@@ -7988,10 +7988,10 @@ var concatArrays = (e, t) => {
|
|
|
7988
7988
|
] }],
|
|
7989
7989
|
"transform-origin": [{ origin: T() }],
|
|
7990
7990
|
"transform-style": [{ transform: ["3d", "flat"] }],
|
|
7991
|
-
translate: [{ translate:
|
|
7992
|
-
"translate-x": [{ "translate-x":
|
|
7993
|
-
"translate-y": [{ "translate-y":
|
|
7994
|
-
"translate-z": [{ "translate-z":
|
|
7991
|
+
translate: [{ translate: Q() }],
|
|
7992
|
+
"translate-x": [{ "translate-x": Q() }],
|
|
7993
|
+
"translate-y": [{ "translate-y": Q() }],
|
|
7994
|
+
"translate-z": [{ "translate-z": Q() }],
|
|
7995
7995
|
"translate-none": ["translate-none"],
|
|
7996
7996
|
accent: [{ accent: R() }],
|
|
7997
7997
|
appearance: [{ appearance: ["none", "auto"] }],
|
|
@@ -8315,29 +8315,26 @@ var cleanPhoneNumber = (e) => e.replace(/[^\d+*#]/g, ""), isValidPhoneOrExtensio
|
|
|
8315
8315
|
const createSipService = (e) => {
|
|
8316
8316
|
let t = shallowRef(null), n = shallowRef(null), i = shallowRef(/* @__PURE__ */ new Map()), a = new Audio();
|
|
8317
8317
|
a.autoplay = !0;
|
|
8318
|
-
let o = shallowRef(void 0), l = shallowRef(null), u = shallowRef(null), d = computed(() => t.value?.configuration.uri?.user || ""), { startRingtone:
|
|
8319
|
-
e.channels.value.some((e) => e.status === "incoming") ?
|
|
8320
|
-
|
|
8321
|
-
t?.status === "calling" && !t.hasEarlyMedia ? m() : g();
|
|
8322
|
-
}, y = (e) => {
|
|
8318
|
+
let o = shallowRef(void 0), l = shallowRef(null), u = shallowRef(null), d = null, f = null, p = computed(() => t.value?.configuration.uri?.user || ""), { startRingtone: m, stopRingtone: g, startRingback: _, stopRingback: v, setNotificationVolume: y } = useAudioSounds(), b = () => {
|
|
8319
|
+
e.channels.value.some((e) => e.status === "incoming") ? m() : g(), e.activeChannel.value?.status === "calling" ? _() : v();
|
|
8320
|
+
}, x = (e) => {
|
|
8323
8321
|
a.volume = e / 100;
|
|
8324
|
-
},
|
|
8322
|
+
}, S = async (e) => {
|
|
8325
8323
|
typeof a.setSinkId == "function" && await a.setSinkId(e);
|
|
8326
|
-
},
|
|
8324
|
+
}, w = (e) => {
|
|
8327
8325
|
o.value = e;
|
|
8328
|
-
},
|
|
8326
|
+
}, T = (e = !1) => {
|
|
8329
8327
|
let t = {
|
|
8330
8328
|
echoCancellation: { ideal: !0 },
|
|
8331
|
-
noiseSuppression: { ideal: !
|
|
8332
|
-
autoGainControl: { ideal: !
|
|
8333
|
-
channelCount: 1
|
|
8334
|
-
voiceIsolation: { ideal: !0 }
|
|
8329
|
+
noiseSuppression: { ideal: !1 },
|
|
8330
|
+
autoGainControl: { ideal: !1 },
|
|
8331
|
+
channelCount: 1
|
|
8335
8332
|
};
|
|
8336
8333
|
return o.value && (t.deviceId = { exact: o.value }), {
|
|
8337
8334
|
audio: t,
|
|
8338
8335
|
video: e
|
|
8339
8336
|
};
|
|
8340
|
-
},
|
|
8337
|
+
}, E = async (i) => {
|
|
8341
8338
|
if (!t.value) {
|
|
8342
8339
|
try {
|
|
8343
8340
|
(await navigator.mediaDevices.getUserMedia({ audio: !0 })).getTracks().forEach((e) => e.stop());
|
|
@@ -8359,15 +8356,15 @@ const createSipService = (e) => {
|
|
|
8359
8356
|
delegate: {
|
|
8360
8357
|
onConnect: () => e.setConnected(!0),
|
|
8361
8358
|
onDisconnect: () => e.setConnected(!1),
|
|
8362
|
-
onInvite: (e) =>
|
|
8359
|
+
onInvite: (e) => k(e)
|
|
8363
8360
|
}
|
|
8364
|
-
}), await t.value.start(), n.value = new Registerer(t.value), await n.value.register(),
|
|
8361
|
+
}), await t.value.start(), n.value = new Registerer(t.value), await n.value.register(), D();
|
|
8365
8362
|
} catch {}
|
|
8366
8363
|
}
|
|
8367
|
-
},
|
|
8364
|
+
}, D = () => {
|
|
8368
8365
|
let t = null, n = Date.now(), i = (e = 1e3) => {
|
|
8369
8366
|
t && clearTimeout(t), t = setTimeout(async () => {
|
|
8370
|
-
t = null, await
|
|
8367
|
+
t = null, await O();
|
|
8371
8368
|
}, e);
|
|
8372
8369
|
}, a = () => {
|
|
8373
8370
|
if (document.visibilityState === "visible") {
|
|
@@ -8382,7 +8379,7 @@ const createSipService = (e) => {
|
|
|
8382
8379
|
}, l = null, u = () => {
|
|
8383
8380
|
l = setInterval(() => {
|
|
8384
8381
|
let e = Date.now(), t = e - n;
|
|
8385
|
-
t >
|
|
8382
|
+
t > 3e4 && (console.log(`[SipJs] Heartbeat drift detected (${Math.round(t / 1e3)}s), device may have woken from sleep`), i(1500)), n = e;
|
|
8386
8383
|
}, 1e3);
|
|
8387
8384
|
};
|
|
8388
8385
|
document.addEventListener("visibilitychange", a), window.addEventListener("online", o), window.addEventListener("offline", s), document.addEventListener("freeze", () => {
|
|
@@ -8390,12 +8387,16 @@ const createSipService = (e) => {
|
|
|
8390
8387
|
}), document.addEventListener("resume", () => {
|
|
8391
8388
|
console.log("[SipJs] Page resumed"), n = Date.now(), u(), i(1e3);
|
|
8392
8389
|
}), u();
|
|
8393
|
-
},
|
|
8390
|
+
}, O = async () => {
|
|
8394
8391
|
if (t.value) {
|
|
8395
8392
|
if (!navigator.onLine) {
|
|
8396
8393
|
console.log("[SipJs] Skipping reconnect, device is offline");
|
|
8397
8394
|
return;
|
|
8398
8395
|
}
|
|
8396
|
+
if (i.value.size > 0) {
|
|
8397
|
+
console.log("[SipJs] Skipping reconnect, active calls in progress");
|
|
8398
|
+
return;
|
|
8399
|
+
}
|
|
8399
8400
|
try {
|
|
8400
8401
|
if (t.value.isConnected() || (console.log("[SipJs] Reconnecting..."), await t.value.reconnect()), n.value && t.value.isConnected()) try {
|
|
8401
8402
|
await n.value.register();
|
|
@@ -8404,7 +8405,7 @@ const createSipService = (e) => {
|
|
|
8404
8405
|
console.error("[SipJs] Reconnection failed:", e);
|
|
8405
8406
|
}
|
|
8406
8407
|
}
|
|
8407
|
-
},
|
|
8408
|
+
}, k = (t) => {
|
|
8408
8409
|
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);
|
|
8409
8410
|
let n = e.channels.value.find((e) => e.status === "idle");
|
|
8410
8411
|
if (!n) {
|
|
@@ -8419,7 +8420,7 @@ const createSipService = (e) => {
|
|
|
8419
8420
|
remoteNumber: s,
|
|
8420
8421
|
remoteDisplayName: t.remoteIdentity.displayName || void 0,
|
|
8421
8422
|
hasVideo: o
|
|
8422
|
-
}),
|
|
8423
|
+
}), b(), e.setActiveChannelId(a), t.stateChange.addListener((n) => {
|
|
8423
8424
|
switch (n) {
|
|
8424
8425
|
case SessionState.Terminated: {
|
|
8425
8426
|
let n = e.channels.value.find((e) => e.id === a), o = extractCallerNumber(t.remoteIdentity.uri.user, t.remoteIdentity.displayName);
|
|
@@ -8446,18 +8447,18 @@ const createSipService = (e) => {
|
|
|
8446
8447
|
isHeld: !1,
|
|
8447
8448
|
hasVideo: !1,
|
|
8448
8449
|
hasEarlyMedia: !1
|
|
8449
|
-
}), i.value.delete(a), e.activeChannelId.value === a &&
|
|
8450
|
+
}), i.value.delete(a), e.activeChannelId.value === a && H(), b();
|
|
8450
8451
|
break;
|
|
8451
8452
|
}
|
|
8452
8453
|
case SessionState.Established:
|
|
8453
8454
|
e.updateChannelState(a, {
|
|
8454
8455
|
status: "connected",
|
|
8455
8456
|
startTime: Date.now()
|
|
8456
|
-
}), e.activeChannelId.value === a &&
|
|
8457
|
+
}), e.activeChannelId.value === a && V(t), b();
|
|
8457
8458
|
break;
|
|
8458
8459
|
}
|
|
8459
8460
|
});
|
|
8460
|
-
},
|
|
8461
|
+
}, A = async (n, a = !1) => {
|
|
8461
8462
|
if (!t.value) return;
|
|
8462
8463
|
let o = e.activeChannelId.value;
|
|
8463
8464
|
if (i.value.has(o)) return;
|
|
@@ -8472,13 +8473,13 @@ const createSipService = (e) => {
|
|
|
8472
8473
|
status: "calling",
|
|
8473
8474
|
remoteNumber: n,
|
|
8474
8475
|
hasVideo: a
|
|
8475
|
-
}), e.setLastDialedNumber(n),
|
|
8476
|
+
}), e.setLastDialedNumber(n), b(), l.stateChange.addListener((t) => {
|
|
8476
8477
|
switch (t) {
|
|
8477
8478
|
case SessionState.Established:
|
|
8478
8479
|
e.channels.value.find((e) => e.id === o)?.status !== "connected" && (e.updateChannelState(o, {
|
|
8479
8480
|
status: "connected",
|
|
8480
8481
|
startTime: Date.now()
|
|
8481
|
-
}),
|
|
8482
|
+
}), V(l), b());
|
|
8482
8483
|
break;
|
|
8483
8484
|
case SessionState.Terminated: {
|
|
8484
8485
|
let t = e.channels.value.find((e) => e.id === o);
|
|
@@ -8506,38 +8507,38 @@ const createSipService = (e) => {
|
|
|
8506
8507
|
startTime: void 0,
|
|
8507
8508
|
keypadValue: "",
|
|
8508
8509
|
hasVideo: !1
|
|
8509
|
-
}), i.value.delete(o), e.activeChannelId.value === o &&
|
|
8510
|
+
}), i.value.delete(o), e.activeChannelId.value === o && H(), b();
|
|
8510
8511
|
break;
|
|
8511
8512
|
}
|
|
8512
8513
|
}
|
|
8513
8514
|
});
|
|
8514
8515
|
let u = {
|
|
8515
|
-
sessionDescriptionHandlerOptions: { constraints:
|
|
8516
|
+
sessionDescriptionHandlerOptions: { constraints: T(a) },
|
|
8516
8517
|
requestDelegate: {
|
|
8517
8518
|
onProgress: (t) => {
|
|
8518
|
-
(t.message.statusCode === 180 || t.message.statusCode === 183) && (t.message.body && (e.updateChannelState(o, { hasEarlyMedia: !0 }),
|
|
8519
|
+
(t.message.statusCode === 180 || t.message.statusCode === 183) && (t.message.body && (e.updateChannelState(o, { hasEarlyMedia: !0 }), V(l)), b());
|
|
8519
8520
|
},
|
|
8520
8521
|
onAccept: (t) => {
|
|
8521
8522
|
e.channels.value.find((e) => e.id === o)?.status !== "connected" && (e.updateChannelState(o, {
|
|
8522
8523
|
status: "connected",
|
|
8523
8524
|
startTime: Date.now()
|
|
8524
|
-
}),
|
|
8525
|
+
}), V(l), b());
|
|
8525
8526
|
}
|
|
8526
8527
|
}
|
|
8527
8528
|
};
|
|
8528
8529
|
await l.invite(u);
|
|
8529
|
-
},
|
|
8530
|
+
}, j = async (t = !1) => {
|
|
8530
8531
|
let n = i.value.get(e.activeChannelId.value);
|
|
8531
8532
|
if (n instanceof Invitation && n.state === SessionState.Initial) {
|
|
8532
8533
|
for (let [t, n] of i.value.entries()) if (t !== e.activeChannelId.value && n.state === SessionState.Established && !e.channels.value.find((e) => e.id === t)?.isHeld) try {
|
|
8533
|
-
await
|
|
8534
|
+
await P(n, !0), e.updateChannelState(t, { isHeld: !0 });
|
|
8534
8535
|
} catch (e) {
|
|
8535
8536
|
console.error(`[SipJs] Failed to hold channel ${t}:`, e);
|
|
8536
8537
|
}
|
|
8537
|
-
let a = { sessionDescriptionHandlerOptions: { constraints:
|
|
8538
|
-
await n.accept(a),
|
|
8538
|
+
let a = { sessionDescriptionHandlerOptions: { constraints: T(t) } };
|
|
8539
|
+
await n.accept(a), b();
|
|
8539
8540
|
}
|
|
8540
|
-
},
|
|
8541
|
+
}, M = async () => {
|
|
8541
8542
|
let t = i.value.get(e.activeChannelId.value);
|
|
8542
8543
|
if (t) switch (t.state) {
|
|
8543
8544
|
case SessionState.Initial:
|
|
@@ -8548,7 +8549,7 @@ const createSipService = (e) => {
|
|
|
8548
8549
|
await t.bye();
|
|
8549
8550
|
break;
|
|
8550
8551
|
}
|
|
8551
|
-
},
|
|
8552
|
+
}, N = () => {
|
|
8552
8553
|
let t = i.value.get(e.activeChannelId.value);
|
|
8553
8554
|
if (!t) return;
|
|
8554
8555
|
let n = !e.isMuted.value, a = !1, o = t.sessionDescriptionHandler;
|
|
@@ -8557,26 +8558,26 @@ const createSipService = (e) => {
|
|
|
8557
8558
|
}), u.value && u.value.getAudioTracks().forEach((e) => {
|
|
8558
8559
|
e.enabled = !n, a = !0;
|
|
8559
8560
|
}), a || console.warn("[SipJs] No audio tracks found to mute/unmute"), e.setMuted(n);
|
|
8560
|
-
},
|
|
8561
|
+
}, P = async (e, t) => {
|
|
8561
8562
|
let n = { sessionDescriptionHandlerOptions: { hold: t } };
|
|
8562
8563
|
await e.invite(n);
|
|
8563
|
-
},
|
|
8564
|
+
}, F = async () => {
|
|
8564
8565
|
let t = i.value.get(e.activeChannelId.value);
|
|
8565
8566
|
if (t?.state !== SessionState.Established) return;
|
|
8566
8567
|
let n = !e.isHeld.value;
|
|
8567
8568
|
try {
|
|
8568
|
-
await
|
|
8569
|
+
await P(t, n), e.setHeld(n);
|
|
8569
8570
|
} catch {}
|
|
8570
|
-
},
|
|
8571
|
+
}, I = async (t) => {
|
|
8571
8572
|
let n = e.activeChannelId.value;
|
|
8572
8573
|
if (n === t) return;
|
|
8573
8574
|
let a = i.value.get(n), o = i.value.get(t), s = e.channels.value.find((e) => e.id === n), l = e.channels.value.find((e) => e.id === t);
|
|
8574
8575
|
if (a && a.state === SessionState.Established && !s?.isHeld) try {
|
|
8575
|
-
await
|
|
8576
|
+
await P(a, !0), e.updateChannelState(n, { isHeld: !0 });
|
|
8576
8577
|
} catch {}
|
|
8577
|
-
if (e.setActiveChannelId(t),
|
|
8578
|
+
if (e.setActiveChannelId(t), b(), o && o.state === SessionState.Established) {
|
|
8578
8579
|
if (l?.isHeld) try {
|
|
8579
|
-
await
|
|
8580
|
+
await P(o, !1), e.updateChannelState(t, { isHeld: !1 });
|
|
8580
8581
|
} catch {}
|
|
8581
8582
|
if (l?.isMuted) {
|
|
8582
8583
|
let e = o.sessionDescriptionHandler;
|
|
@@ -8586,9 +8587,9 @@ const createSipService = (e) => {
|
|
|
8586
8587
|
e.enabled = !1;
|
|
8587
8588
|
});
|
|
8588
8589
|
}
|
|
8589
|
-
|
|
8590
|
-
} else
|
|
8591
|
-
},
|
|
8590
|
+
V(o);
|
|
8591
|
+
} else H();
|
|
8592
|
+
}, L = (t) => {
|
|
8592
8593
|
let n = i.value.get(e.activeChannelId.value);
|
|
8593
8594
|
if (n?.state !== SessionState.Established) return;
|
|
8594
8595
|
let a = { requestOptions: { body: {
|
|
@@ -8597,7 +8598,7 @@ const createSipService = (e) => {
|
|
|
8597
8598
|
contentDisposition: "signal"
|
|
8598
8599
|
} } };
|
|
8599
8600
|
n.info(a);
|
|
8600
|
-
},
|
|
8601
|
+
}, R = async (n) => {
|
|
8601
8602
|
console.log("[SipJs] 🔄 transferCall iniciado"), console.log("[SipJs] Target:", n);
|
|
8602
8603
|
let a = e.activeChannelId.value, o = i.value.get(a);
|
|
8603
8604
|
if (!o) throw console.error("[SipJs] ❌ No hay sesión activa en el canal", a), Error("No active session to transfer");
|
|
@@ -8649,28 +8650,28 @@ const createSipService = (e) => {
|
|
|
8649
8650
|
} catch (e) {
|
|
8650
8651
|
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;
|
|
8651
8652
|
}
|
|
8652
|
-
},
|
|
8653
|
+
}, z = async (t) => {
|
|
8653
8654
|
console.log("[SipJs] 🔄 startAttendedTransfer iniciado"), console.log("[SipJs] Target:", t);
|
|
8654
8655
|
let n = e.activeChannelId.value, a = i.value.get(n);
|
|
8655
8656
|
if (console.log("[SipJs] Canal original:", n), console.log("[SipJs] Sesión original:", a?.state), !a || a.state !== SessionState.Established) throw console.error("[SipJs] ❌ No hay llamada establecida para transferir"), Error("No established call to transfer");
|
|
8656
8657
|
let o = e.channels.value.find((e) => e.status === "idle");
|
|
8657
8658
|
if (console.log("[SipJs] Canal de consulta encontrado:", o?.id), !o) throw console.error("[SipJs] ❌ No hay canales disponibles para llamada de consulta"), Error("No available channel for consultation call");
|
|
8658
8659
|
try {
|
|
8659
|
-
console.log("[SipJs] 🔇 Poniendo llamada original en hold..."), await
|
|
8660
|
+
console.log("[SipJs] 🔇 Poniendo llamada original en hold..."), await P(a, !0), e.updateChannelState(n, { isHeld: !0 }), console.log("[SipJs] ✅ Llamada original en hold");
|
|
8660
8661
|
} catch (e) {
|
|
8661
8662
|
throw console.error("[SipJs] ❌ Failed to hold original call:", e), Error("Failed to put call on hold");
|
|
8662
8663
|
}
|
|
8663
8664
|
console.log("[SipJs] 🔄 Cambiando al canal de consulta:", o.id), e.setActiveChannelId(o.id);
|
|
8664
8665
|
try {
|
|
8665
|
-
console.log("[SipJs] 📞 Iniciando llamada de consulta a:", t), await
|
|
8666
|
+
console.log("[SipJs] 📞 Iniciando llamada de consulta a:", t), await A(t, !1), console.log("[SipJs] ✅ Llamada de consulta iniciada"), e.setTransferInProgress({
|
|
8666
8667
|
originalChannelId: n,
|
|
8667
8668
|
consultationChannelId: o.id,
|
|
8668
8669
|
targetNumber: t
|
|
8669
8670
|
}), console.log("[SipJs] 📋 Transferencia en progreso registrada");
|
|
8670
8671
|
} catch (t) {
|
|
8671
|
-
throw console.error("[SipJs] ❌ Failed to start consultation call:", t), console.log("[SipJs] 🔄 Volviendo al canal original y quitando hold..."), e.setActiveChannelId(n), await
|
|
8672
|
+
throw console.error("[SipJs] ❌ Failed to start consultation call:", t), console.log("[SipJs] 🔄 Volviendo al canal original y quitando hold..."), e.setActiveChannelId(n), await P(a, !1).catch(() => {}), e.updateChannelState(n, { isHeld: !1 }), Error("Failed to initiate consultation call");
|
|
8672
8673
|
}
|
|
8673
|
-
},
|
|
8674
|
+
}, ym = async () => {
|
|
8674
8675
|
console.log("[SipJs] 🔄 completeAttendedTransfer iniciado");
|
|
8675
8676
|
let n = e.transferInProgress.value;
|
|
8676
8677
|
if (!n) throw console.error("[SipJs] ❌ No hay transferencia en progreso"), Error("No transfer in progress");
|
|
@@ -8713,7 +8714,7 @@ const createSipService = (e) => {
|
|
|
8713
8714
|
} catch (e) {
|
|
8714
8715
|
throw console.error("[SipJs] Attended transfer failed:", e), e;
|
|
8715
8716
|
}
|
|
8716
|
-
},
|
|
8717
|
+
}, B = async () => {
|
|
8717
8718
|
let t = e.transferInProgress.value;
|
|
8718
8719
|
if (!t) throw Error("No transfer in progress");
|
|
8719
8720
|
console.log("[SipJs] Canceling attended transfer...");
|
|
@@ -8724,47 +8725,63 @@ const createSipService = (e) => {
|
|
|
8724
8725
|
console.warn("[SipJs] Error ending consultation:", e);
|
|
8725
8726
|
}
|
|
8726
8727
|
if (n) try {
|
|
8727
|
-
e.setActiveChannelId(t.originalChannelId), await
|
|
8728
|
+
e.setActiveChannelId(t.originalChannelId), await P(n, !1), e.updateChannelState(t.originalChannelId, { isHeld: !1 }), console.log("[SipJs] Returned to original call");
|
|
8728
8729
|
} catch (e) {
|
|
8729
8730
|
console.warn("[SipJs] Error resuming original call:", e);
|
|
8730
8731
|
}
|
|
8731
8732
|
e.setTransferInProgress(null);
|
|
8732
|
-
},
|
|
8733
|
-
let t = e.sessionDescriptionHandler
|
|
8734
|
-
if (!t)
|
|
8735
|
-
|
|
8736
|
-
|
|
8737
|
-
|
|
8738
|
-
|
|
8739
|
-
|
|
8740
|
-
|
|
8741
|
-
|
|
8742
|
-
|
|
8743
|
-
|
|
8744
|
-
|
|
8745
|
-
|
|
8746
|
-
|
|
8747
|
-
|
|
8748
|
-
|
|
8733
|
+
}, V = (e) => {
|
|
8734
|
+
let t = e.sessionDescriptionHandler;
|
|
8735
|
+
if (!t) {
|
|
8736
|
+
console.error("[SipJs] setupRemoteMedia: no sessionDescriptionHandler");
|
|
8737
|
+
return;
|
|
8738
|
+
}
|
|
8739
|
+
let n = t.remoteMediaStream;
|
|
8740
|
+
if (!n) {
|
|
8741
|
+
console.error("[SipJs] setupRemoteMedia: no remoteMediaStream on SDH");
|
|
8742
|
+
return;
|
|
8743
|
+
}
|
|
8744
|
+
if (l.value === n) return;
|
|
8745
|
+
a.pause(), a.srcObject = null, d?.abort(), d = new AbortController(), l.value = n, u.value = t.localMediaStream ?? null;
|
|
8746
|
+
let i = (e) => {
|
|
8747
|
+
f?.abort(), f = new AbortController();
|
|
8748
|
+
let { signal: t } = f, n = () => {
|
|
8749
|
+
a.play().catch((e) => {
|
|
8750
|
+
e.name !== "AbortError" && console.error("[SipJs] play() failed:", e.name, e.message);
|
|
8751
|
+
});
|
|
8752
|
+
};
|
|
8753
|
+
e.addEventListener("mute", () => {
|
|
8754
|
+
a.pause();
|
|
8755
|
+
}, { signal: t }), e.addEventListener("unmute", () => {
|
|
8756
|
+
n();
|
|
8757
|
+
}, { signal: t }), e.muted || n();
|
|
8758
|
+
};
|
|
8759
|
+
n.addEventListener("addtrack", (e) => {
|
|
8760
|
+
e.track.kind === "audio" && (a.srcObject = null, a.srcObject = n, i(e.track));
|
|
8761
|
+
}, { signal: d.signal });
|
|
8762
|
+
let [o] = n.getTracks();
|
|
8763
|
+
o && (a.srcObject = n, i(o));
|
|
8764
|
+
}, H = () => {
|
|
8765
|
+
f?.abort(), f = null, d?.abort(), d = null, a.pause(), a.srcObject = null, l.value = null, u.value = null;
|
|
8749
8766
|
};
|
|
8750
8767
|
return {
|
|
8751
|
-
initUserAgent:
|
|
8752
|
-
makeCall:
|
|
8753
|
-
answerCall:
|
|
8754
|
-
hangupCall:
|
|
8755
|
-
toggleMute:
|
|
8756
|
-
toggleHold:
|
|
8757
|
-
sendDTMF:
|
|
8758
|
-
transferCall:
|
|
8759
|
-
startAttendedTransfer:
|
|
8760
|
-
completeAttendedTransfer:
|
|
8761
|
-
cancelAttendedTransfer:
|
|
8762
|
-
switchChannel:
|
|
8763
|
-
extension:
|
|
8764
|
-
setVolume:
|
|
8765
|
-
setNotificationVolume:
|
|
8766
|
-
setOutputDevice:
|
|
8767
|
-
setInputDevice:
|
|
8768
|
+
initUserAgent: E,
|
|
8769
|
+
makeCall: A,
|
|
8770
|
+
answerCall: j,
|
|
8771
|
+
hangupCall: M,
|
|
8772
|
+
toggleMute: N,
|
|
8773
|
+
toggleHold: F,
|
|
8774
|
+
sendDTMF: L,
|
|
8775
|
+
transferCall: R,
|
|
8776
|
+
startAttendedTransfer: z,
|
|
8777
|
+
completeAttendedTransfer: ym,
|
|
8778
|
+
cancelAttendedTransfer: B,
|
|
8779
|
+
switchChannel: I,
|
|
8780
|
+
extension: p,
|
|
8781
|
+
setVolume: x,
|
|
8782
|
+
setNotificationVolume: y,
|
|
8783
|
+
setOutputDevice: S,
|
|
8784
|
+
setInputDevice: w,
|
|
8768
8785
|
remoteStream: l,
|
|
8769
8786
|
localStream: u
|
|
8770
8787
|
};
|
|
@@ -16500,9 +16517,9 @@ var _hoisted_1$7 = { class: "wp:grid wp:grid-cols-3 wp:gap-x-6 wp:gap-y-3 wp:p-3
|
|
|
16500
16517
|
return t === "idle" ? "Disponible" : t === "calling" ? "Llamando..." : e?.isHeld ? `En espera - ${e.remoteNumber || e.keypadValue || "Unknown"}` : t === "connected" ? "Conectado" : t.charAt(0).toUpperCase() + t.slice(1);
|
|
16501
16518
|
}), R = computed(() => {
|
|
16502
16519
|
let e = g.value, t = e?.remoteNumber || e?.keypadValue, n = e?.remoteDisplayName;
|
|
16503
|
-
if (
|
|
16504
|
-
let i = o.contacts?.find((e) =>
|
|
16505
|
-
return
|
|
16520
|
+
if (!t) return "Unknown";
|
|
16521
|
+
let i = o.contacts?.find((e) => e.number === t || t.endsWith(e.number) || e.number.endsWith(t));
|
|
16522
|
+
return i ? i.name : n || t;
|
|
16506
16523
|
}), z = computed(() => {
|
|
16507
16524
|
let e = g.value;
|
|
16508
16525
|
return e?.remoteNumber || e?.keypadValue || "";
|
|
@@ -17750,11 +17767,11 @@ var ToggleGroupItem_default = /* @__PURE__ */ defineComponent({
|
|
|
17750
17767
|
provide("webphone", _), provide("sip", v), watchEffect(() => {
|
|
17751
17768
|
i.mode === "webcall" && (i.to || console.error("WebPhone: \"to\" prop is required when mode is \"webcall\""), i.logo || console.error("WebPhone: \"logo\" prop is required when mode is \"webcall\""));
|
|
17752
17769
|
});
|
|
17753
|
-
let { isDark: w, toggleDark: T } = useDarkMode(), E = ref(!1), D = ref(!1), O = ref(!1), A = ref(null), M = ref(null), P = ref(null), z = ref(null),
|
|
17770
|
+
let { isDark: w, toggleDark: T } = useDarkMode(), E = ref(!1), D = ref(!1), O = ref(!1), A = ref(null), M = ref(null), P = ref(null), z = ref(null), V = ref(null), H = navigator.platform.toUpperCase().indexOf("MAC") >= 0 ? "⌘" : "Ctrl+", U = computed(() => i.mode === "webcall"), G = computed(() => x.value && x.value.getVideoTracks().length > 0), { isOnline: K } = useNetwork(), q = computed(() => K.value ? _.isConnected ? "connected" : "disconnected" : "offline"), J = ref(null), Y = ref(!1), Z = computed(() => {
|
|
17754
17771
|
let e = _.callStatus !== "idle";
|
|
17755
|
-
return (
|
|
17772
|
+
return (J.value?.canUsePip ?? !1) && e;
|
|
17756
17773
|
}), bm = () => {
|
|
17757
|
-
|
|
17774
|
+
J.value?.toggle();
|
|
17758
17775
|
}, xm = async (e, t) => {
|
|
17759
17776
|
try {
|
|
17760
17777
|
t === "blind" ? await v.transferCall(e) : await v.startAttendedTransfer(e);
|
|
@@ -17775,9 +17792,9 @@ var ToggleGroupItem_default = /* @__PURE__ */ defineComponent({
|
|
|
17775
17792
|
}
|
|
17776
17793
|
};
|
|
17777
17794
|
watchEffect(() => {
|
|
17778
|
-
z.value && x.value && (
|
|
17795
|
+
z.value && x.value && (Y.value ? z.value.srcObject = null : z.value.srcObject = x.value), V.value && S.value && (Y.value ? V.value.srcObject = null : V.value.srcObject = S.value);
|
|
17779
17796
|
});
|
|
17780
|
-
let wm = computed(() =>
|
|
17797
|
+
let wm = computed(() => U.value ? P.value : M.value), { style: Tm } = useDraggable(A, {
|
|
17781
17798
|
initialValue: (() => {
|
|
17782
17799
|
let e = window.innerWidth < 640, t = window.innerWidth < 1024, n = 400;
|
|
17783
17800
|
return e ? n = window.innerWidth * .95 : t && (n = 360), {
|
|
@@ -17846,7 +17863,7 @@ var ToggleGroupItem_default = /* @__PURE__ */ defineComponent({
|
|
|
17846
17863
|
style: normalizeStyle(unref(Tm)),
|
|
17847
17864
|
class: "webphone-container wp:bg-white wp:dark:bg-neutral-900 wp:rounded-2xl wp:shadow-xl wp:w-[min(95vw,400px)] wp:fixed wp:z-50 wp:select-none wp:[&_button]:cursor-pointer wp:**:[[role=button]]:cursor-pointer"
|
|
17848
17865
|
}, [
|
|
17849
|
-
|
|
17866
|
+
U.value ? (openBlock(), createElementBlock("div", _hoisted_5, [createElementVNode("div", _hoisted_6, [
|
|
17850
17867
|
createVNode(unref(Button_default), {
|
|
17851
17868
|
variant: "ghost",
|
|
17852
17869
|
size: "icon",
|
|
@@ -17868,11 +17885,11 @@ var ToggleGroupItem_default = /* @__PURE__ */ defineComponent({
|
|
|
17868
17885
|
o[22] ||= createElementVNode("span", { class: "wp:font-medium" }, " WebCall", -1),
|
|
17869
17886
|
createElementVNode("div", {
|
|
17870
17887
|
class: "wp:relative wp:flex wp:items-center",
|
|
17871
|
-
title:
|
|
17872
|
-
}, [
|
|
17888
|
+
title: q.value === "connected" ? "Conectado" : q.value === "disconnected" ? "Desconectado del servidor" : "Sin conexión a Internet"
|
|
17889
|
+
}, [q.value === "offline" ? (openBlock(), createBlock(unref(WifiOff), {
|
|
17873
17890
|
key: 0,
|
|
17874
17891
|
class: "wp:w-3 wp:h-3 wp:text-red-500"
|
|
17875
|
-
})) :
|
|
17892
|
+
})) : q.value === "disconnected" ? (openBlock(), createBlock(unref(Wifi), {
|
|
17876
17893
|
key: 1,
|
|
17877
17894
|
class: "wp:w-3 wp:h-3 wp:text-amber-500 wp:animate-pulse"
|
|
17878
17895
|
})) : (openBlock(), createBlock(unref(Wifi), {
|
|
@@ -17881,11 +17898,11 @@ var ToggleGroupItem_default = /* @__PURE__ */ defineComponent({
|
|
|
17881
17898
|
}))], 8, _hoisted_7)
|
|
17882
17899
|
], 2),
|
|
17883
17900
|
createElementVNode("div", _hoisted_8, [
|
|
17884
|
-
|
|
17901
|
+
Z.value ? (openBlock(), createBlock(unref(Button_default), {
|
|
17885
17902
|
key: 0,
|
|
17886
17903
|
variant: "ghost",
|
|
17887
17904
|
size: "icon",
|
|
17888
|
-
class: normalizeClass(["wp:h-8 wp:w-8 wp:rounded-full",
|
|
17905
|
+
class: normalizeClass(["wp:h-8 wp:w-8 wp:rounded-full", Y.value ? "wp:text-primary" : ""]),
|
|
17889
17906
|
title: "Picture-in-Picture",
|
|
17890
17907
|
onClick: bm
|
|
17891
17908
|
}, {
|
|
@@ -17922,7 +17939,7 @@ var ToggleGroupItem_default = /* @__PURE__ */ defineComponent({
|
|
|
17922
17939
|
_: 1
|
|
17923
17940
|
}), createVNode(unref(TooltipContent_default), { class: "wp:flex wp:items-center wp:gap-2" }, {
|
|
17924
17941
|
default: withCtx(() => [o[23] ||= createElementVNode("span", null, "Historial", -1), createVNode(unref(Kbd_default), null, {
|
|
17925
|
-
default: withCtx(() => [createTextVNode(toDisplayString(unref(
|
|
17942
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(H)) + "H", 1)]),
|
|
17926
17943
|
_: 1
|
|
17927
17944
|
})]),
|
|
17928
17945
|
_: 1
|
|
@@ -17946,7 +17963,7 @@ var ToggleGroupItem_default = /* @__PURE__ */ defineComponent({
|
|
|
17946
17963
|
_: 1
|
|
17947
17964
|
}), createVNode(unref(TooltipContent_default), { class: "wp:flex wp:items-center wp:gap-2" }, {
|
|
17948
17965
|
default: withCtx(() => [o[24] ||= createElementVNode("span", null, "Configuración", -1), createVNode(unref(Kbd_default), null, {
|
|
17949
|
-
default: withCtx(() => [createTextVNode(toDisplayString(unref(
|
|
17966
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(H)) + ",", 1)]),
|
|
17950
17967
|
_: 1
|
|
17951
17968
|
})]),
|
|
17952
17969
|
_: 1
|
|
@@ -17972,11 +17989,11 @@ var ToggleGroupItem_default = /* @__PURE__ */ defineComponent({
|
|
|
17972
17989
|
o[19] ||= createElementVNode("span", { class: "wp:font-medium" }, "WebPhone", -1),
|
|
17973
17990
|
createElementVNode("div", {
|
|
17974
17991
|
class: "wp:relative wp:flex wp:items-center",
|
|
17975
|
-
title:
|
|
17976
|
-
}, [
|
|
17992
|
+
title: q.value === "connected" ? "Conectado" : q.value === "disconnected" ? "Desconectado del servidor" : "Sin conexión a Internet"
|
|
17993
|
+
}, [q.value === "offline" ? (openBlock(), createBlock(unref(WifiOff), {
|
|
17977
17994
|
key: 0,
|
|
17978
17995
|
class: "wp:w-3 wp:h-3 wp:text-red-500"
|
|
17979
|
-
})) :
|
|
17996
|
+
})) : q.value === "disconnected" ? (openBlock(), createBlock(unref(Wifi), {
|
|
17980
17997
|
key: 1,
|
|
17981
17998
|
class: "wp:w-3 wp:h-3 wp:text-amber-500 wp:animate-pulse"
|
|
17982
17999
|
})) : (openBlock(), createBlock(unref(Wifi), {
|
|
@@ -17984,11 +18001,11 @@ var ToggleGroupItem_default = /* @__PURE__ */ defineComponent({
|
|
|
17984
18001
|
class: "wp:w-3 wp:h-3 wp:text-green-500"
|
|
17985
18002
|
}))], 8, _hoisted_3)
|
|
17986
18003
|
], 2), createElementVNode("div", _hoisted_4, [
|
|
17987
|
-
|
|
18004
|
+
Z.value ? (openBlock(), createBlock(unref(Button_default), {
|
|
17988
18005
|
key: 0,
|
|
17989
18006
|
variant: "ghost",
|
|
17990
18007
|
size: "icon",
|
|
17991
|
-
class: normalizeClass(["wp:h-8 wp:w-8 wp:rounded-full",
|
|
18008
|
+
class: normalizeClass(["wp:h-8 wp:w-8 wp:rounded-full", Y.value ? "wp:text-primary" : ""]),
|
|
17992
18009
|
title: "Picture-in-Picture",
|
|
17993
18010
|
onClick: bm
|
|
17994
18011
|
}, {
|
|
@@ -18025,7 +18042,7 @@ var ToggleGroupItem_default = /* @__PURE__ */ defineComponent({
|
|
|
18025
18042
|
_: 1
|
|
18026
18043
|
}), createVNode(unref(TooltipContent_default), { class: "wp:flex wp:items-center wp:gap-2" }, {
|
|
18027
18044
|
default: withCtx(() => [o[20] ||= createElementVNode("span", null, "Historial", -1), createVNode(unref(Kbd_default), null, {
|
|
18028
|
-
default: withCtx(() => [createTextVNode(toDisplayString(unref(
|
|
18045
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(H)) + "H", 1)]),
|
|
18029
18046
|
_: 1
|
|
18030
18047
|
})]),
|
|
18031
18048
|
_: 1
|
|
@@ -18049,7 +18066,7 @@ var ToggleGroupItem_default = /* @__PURE__ */ defineComponent({
|
|
|
18049
18066
|
_: 1
|
|
18050
18067
|
}), createVNode(unref(TooltipContent_default), { class: "wp:flex wp:items-center wp:gap-2" }, {
|
|
18051
18068
|
default: withCtx(() => [o[21] ||= createElementVNode("span", null, "Configuración", -1), createVNode(unref(Kbd_default), null, {
|
|
18052
|
-
default: withCtx(() => [createTextVNode(toDisplayString(unref(
|
|
18069
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(H)) + ",", 1)]),
|
|
18053
18070
|
_: 1
|
|
18054
18071
|
})]),
|
|
18055
18072
|
_: 1
|
|
@@ -18059,7 +18076,7 @@ var ToggleGroupItem_default = /* @__PURE__ */ defineComponent({
|
|
|
18059
18076
|
_: 1
|
|
18060
18077
|
})
|
|
18061
18078
|
])])])),
|
|
18062
|
-
|
|
18079
|
+
G.value && !Y.value ? (openBlock(), createElementBlock("div", _hoisted_10, [createElementVNode("video", {
|
|
18063
18080
|
ref_key: "remoteVideoRef",
|
|
18064
18081
|
ref: z,
|
|
18065
18082
|
autoplay: "",
|
|
@@ -18067,14 +18084,14 @@ var ToggleGroupItem_default = /* @__PURE__ */ defineComponent({
|
|
|
18067
18084
|
class: "wp:w-full wp:h-full wp:object-cover"
|
|
18068
18085
|
}, null, 512), createElementVNode("div", _hoisted_11, [createElementVNode("video", {
|
|
18069
18086
|
ref_key: "localVideoRef",
|
|
18070
|
-
ref:
|
|
18087
|
+
ref: V,
|
|
18071
18088
|
autoplay: "",
|
|
18072
18089
|
playsinline: "",
|
|
18073
18090
|
muted: "",
|
|
18074
18091
|
class: "wp:w-full wp:h-full wp:object-cover"
|
|
18075
18092
|
}, null, 512)])])) : createCommentVNode("", !0),
|
|
18076
18093
|
createElementVNode("div", _hoisted_12, [
|
|
18077
|
-
|
|
18094
|
+
U.value ? createCommentVNode("", !0) : (openBlock(), createElementBlock("div", _hoisted_13, [createVNode(unref(ToggleGroup_default), {
|
|
18078
18095
|
modelValue: Dm.value,
|
|
18079
18096
|
"onUpdate:modelValue": o[7] ||= (e) => Dm.value = e,
|
|
18080
18097
|
type: "single",
|
|
@@ -18098,8 +18115,8 @@ var ToggleGroupItem_default = /* @__PURE__ */ defineComponent({
|
|
|
18098
18115
|
createElementVNode("div", _hoisted_15, [(openBlock(!0), createElementBlock(Fragment, null, renderList(_.channels, (e) => withDirectives((openBlock(), createBlock(CallDisplay_default, {
|
|
18099
18116
|
key: e.id,
|
|
18100
18117
|
"channel-id": e.id,
|
|
18101
|
-
"allow-input": !
|
|
18102
|
-
"is-web-call":
|
|
18118
|
+
"allow-input": !U.value,
|
|
18119
|
+
"is-web-call": U.value,
|
|
18103
18120
|
contacts: i.contacts,
|
|
18104
18121
|
user: i.extension
|
|
18105
18122
|
}, null, 8, [
|
|
@@ -18111,14 +18128,14 @@ var ToggleGroupItem_default = /* @__PURE__ */ defineComponent({
|
|
|
18111
18128
|
])), [[vShow, e.id === _.activeChannelId]])), 128))]),
|
|
18112
18129
|
createElementVNode("div", { class: normalizeClass(["wp:transition-all wp:duration-300 wp:ease-in-out wp:overflow-hidden", _.isKeypadVisible ? "wp:max-h-[300px] wp:opacity-100" : "wp:max-h-0 wp:opacity-0"]) }, [createVNode(KeyPad_default)], 2),
|
|
18113
18130
|
createVNode(CallActions_default, {
|
|
18114
|
-
destination:
|
|
18131
|
+
destination: U.value ? i.to : void 0,
|
|
18115
18132
|
"is-video": i.mode === "video",
|
|
18116
18133
|
onTransfer: o[8] ||= (e) => O.value = !0,
|
|
18117
18134
|
onCompleteTransfer: Sm,
|
|
18118
18135
|
onCancelTransfer: Cm
|
|
18119
18136
|
}, null, 8, ["destination", "is-video"])
|
|
18120
18137
|
]),
|
|
18121
|
-
|
|
18138
|
+
U.value ? (openBlock(), createElementBlock("div", _hoisted_16, [...o[25] ||= [createElementVNode("div", { class: "wp:text-[10px] wp:text-primary" }, "Powered By", -1), createElementVNode("div", { class: "wp:flex wp:items-center wp:gap-2" }, [createElementVNode("a", {
|
|
18122
18139
|
href: "https://www.nebula123.com",
|
|
18123
18140
|
target: "_blank",
|
|
18124
18141
|
class: "wp:text-[10px] wp:text-primary wp:hover:underline"
|
|
@@ -18144,15 +18161,15 @@ var ToggleGroupItem_default = /* @__PURE__ */ defineComponent({
|
|
|
18144
18161
|
}, null, 8, ["visible", "contacts"]),
|
|
18145
18162
|
createVNode(DocumentPip_default, {
|
|
18146
18163
|
ref_key: "documentPipRef",
|
|
18147
|
-
ref:
|
|
18148
|
-
active:
|
|
18149
|
-
"onUpdate:active": o[13] ||= (e) =>
|
|
18164
|
+
ref: J,
|
|
18165
|
+
active: Y.value,
|
|
18166
|
+
"onUpdate:active": o[13] ||= (e) => Y.value = e,
|
|
18150
18167
|
"is-connected": _.isConnected,
|
|
18151
18168
|
"remote-number": _.remoteNumber,
|
|
18152
|
-
"has-video":
|
|
18169
|
+
"has-video": G.value ?? !1,
|
|
18153
18170
|
"remote-stream": unref(x),
|
|
18154
18171
|
"local-stream": unref(S),
|
|
18155
|
-
destination:
|
|
18172
|
+
destination: U.value ? i.to : void 0,
|
|
18156
18173
|
"is-video": i.mode === "video",
|
|
18157
18174
|
"call-status": _.callStatus,
|
|
18158
18175
|
"is-muted": _.isMuted,
|