@ikonai/sdk 1.0.9 → 1.0.10
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/index.js +460 -465
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const zr = {
|
|
2
2
|
Compressed: 8
|
|
3
3
|
};
|
|
4
|
-
function
|
|
4
|
+
function bl(t) {
|
|
5
5
|
return t;
|
|
6
6
|
}
|
|
7
7
|
function fe(t) {
|
|
@@ -1482,29 +1482,29 @@ function $s(t, e, r) {
|
|
|
1482
1482
|
const n = Ws(t);
|
|
1483
1483
|
return P(Ps, n, Dt, e, r);
|
|
1484
1484
|
}
|
|
1485
|
-
const Ks = 1048601, Ys = 112005851, js = 814454131, zs = 976255570, Xs =
|
|
1486
|
-
function
|
|
1485
|
+
const Ks = 1048601, Ys = 112005851, js = 814454131, zs = 976255570, Xs = 2885165957, Js = 3748161056, Qs = 4289118421;
|
|
1486
|
+
function Zs(t) {
|
|
1487
1487
|
const e = {};
|
|
1488
1488
|
return Mt(e), e;
|
|
1489
1489
|
}
|
|
1490
1490
|
function Mt(t) {
|
|
1491
|
-
return t.FunctionId = m.fromBytes(new Uint8Array(16)), t.CallId = m.fromBytes(new Uint8Array(16)), t.InstanceId = m.fromBytes(new Uint8Array(16)), t.FunctionName = "", t.Parameters = [], t.
|
|
1491
|
+
return t.FunctionId = m.fromBytes(new Uint8Array(16)), t.CallId = m.fromBytes(new Uint8Array(16)), t.InstanceId = m.fromBytes(new Uint8Array(16)), t.FunctionName = "", t.Parameters = [], t.Scopes = [], t;
|
|
1492
1492
|
}
|
|
1493
|
-
function
|
|
1493
|
+
function qs(t, e) {
|
|
1494
1494
|
const r = X.create(t);
|
|
1495
|
-
return
|
|
1495
|
+
return ei(r, e);
|
|
1496
1496
|
}
|
|
1497
|
-
function
|
|
1498
|
-
const r = e ??
|
|
1499
|
-
return Mt(r),
|
|
1497
|
+
function ei(t, e) {
|
|
1498
|
+
const r = e ?? Zs();
|
|
1499
|
+
return Mt(r), ti(t, r), r;
|
|
1500
1500
|
}
|
|
1501
|
-
function
|
|
1501
|
+
function ti(t, e) {
|
|
1502
1502
|
let r;
|
|
1503
1503
|
for (; (r = t.next()) !== null; )
|
|
1504
1504
|
switch (r.fieldId) {
|
|
1505
1505
|
case Ys: {
|
|
1506
1506
|
if (r.isNull) throw new Error();
|
|
1507
|
-
e.Scopes =
|
|
1507
|
+
e.Scopes = ni(r.asArray());
|
|
1508
1508
|
break;
|
|
1509
1509
|
}
|
|
1510
1510
|
case js: {
|
|
@@ -1519,116 +1519,111 @@ function ri(t, e) {
|
|
|
1519
1519
|
}
|
|
1520
1520
|
case Xs: {
|
|
1521
1521
|
if (r.isNull) throw new Error();
|
|
1522
|
-
e.
|
|
1522
|
+
e.Parameters = si(r.asArray());
|
|
1523
1523
|
break;
|
|
1524
1524
|
}
|
|
1525
1525
|
case Js: {
|
|
1526
|
-
if (r.isNull) throw new Error();
|
|
1527
|
-
e.Parameters = ii(r.asArray());
|
|
1528
|
-
break;
|
|
1529
|
-
}
|
|
1530
|
-
case Qs: {
|
|
1531
1526
|
if (r.isNull) throw new Error();
|
|
1532
1527
|
e.CallId = r.asGuid();
|
|
1533
1528
|
break;
|
|
1534
1529
|
}
|
|
1535
|
-
case
|
|
1530
|
+
case Qs: {
|
|
1536
1531
|
if (r.isNull) throw new Error();
|
|
1537
1532
|
e.InstanceId = r.asGuid();
|
|
1538
1533
|
break;
|
|
1539
1534
|
}
|
|
1540
1535
|
}
|
|
1541
1536
|
}
|
|
1542
|
-
async function
|
|
1537
|
+
async function ri(t, e) {
|
|
1543
1538
|
const r = await Be(t, Ks);
|
|
1544
|
-
return
|
|
1539
|
+
return qs(r, e);
|
|
1545
1540
|
}
|
|
1546
|
-
function
|
|
1541
|
+
function ni(t) {
|
|
1547
1542
|
const e = [];
|
|
1548
1543
|
let r;
|
|
1549
1544
|
for (; (r = t.next()) !== null; )
|
|
1550
|
-
e.push(
|
|
1545
|
+
e.push(ci(r.asObject()));
|
|
1551
1546
|
return e;
|
|
1552
1547
|
}
|
|
1553
|
-
function
|
|
1548
|
+
function si(t) {
|
|
1554
1549
|
const e = [];
|
|
1555
1550
|
let r;
|
|
1556
1551
|
for (; (r = t.next()) !== null; )
|
|
1557
1552
|
e.push(_n(r.asObject()));
|
|
1558
1553
|
return e;
|
|
1559
1554
|
}
|
|
1560
|
-
const
|
|
1561
|
-
function
|
|
1555
|
+
const ii = 2994044322, oi = 3167053791;
|
|
1556
|
+
function ai(t) {
|
|
1562
1557
|
const e = {};
|
|
1563
1558
|
return Ot(e), e;
|
|
1564
1559
|
}
|
|
1565
1560
|
function Ot(t) {
|
|
1566
1561
|
return t.Type = "", t.Id = "", t;
|
|
1567
1562
|
}
|
|
1568
|
-
function
|
|
1569
|
-
const r = e ??
|
|
1570
|
-
return Ot(r),
|
|
1563
|
+
function ci(t, e) {
|
|
1564
|
+
const r = e ?? ai();
|
|
1565
|
+
return Ot(r), li(t, r), r;
|
|
1571
1566
|
}
|
|
1572
|
-
function
|
|
1567
|
+
function li(t, e) {
|
|
1573
1568
|
let r;
|
|
1574
1569
|
for (; (r = t.next()) !== null; )
|
|
1575
1570
|
switch (r.fieldId) {
|
|
1576
|
-
case
|
|
1571
|
+
case ii: {
|
|
1577
1572
|
if (r.isNull) throw new Error();
|
|
1578
1573
|
e.Id = r.asString();
|
|
1579
1574
|
break;
|
|
1580
1575
|
}
|
|
1581
|
-
case
|
|
1576
|
+
case oi: {
|
|
1582
1577
|
if (r.isNull) throw new Error();
|
|
1583
1578
|
e.Type = r.asString();
|
|
1584
1579
|
break;
|
|
1585
1580
|
}
|
|
1586
1581
|
}
|
|
1587
1582
|
}
|
|
1588
|
-
const Lt = 1,
|
|
1589
|
-
function
|
|
1583
|
+
const Lt = 1, ui = 1048631, hi = 2205234621, di = 2838554230, fi = 3748161056, Ei = 4194102057, pi = 4289118421;
|
|
1584
|
+
function Ii(t) {
|
|
1590
1585
|
const e = {};
|
|
1591
|
-
return
|
|
1586
|
+
return mi(e), t && Object.assign(e, t), e;
|
|
1592
1587
|
}
|
|
1593
|
-
function
|
|
1588
|
+
function mi(t) {
|
|
1594
1589
|
return t.CallId = m.fromBytes(new Uint8Array(16)), t.InstanceId = m.fromBytes(new Uint8Array(16)), t.ErrorMessage = "", t.ErrorTypeName = "", t.StackTrace = "", t;
|
|
1595
1590
|
}
|
|
1596
|
-
function
|
|
1591
|
+
function _i(t) {
|
|
1597
1592
|
const e = new D(Lt);
|
|
1598
|
-
return
|
|
1593
|
+
return Ti(t, e), e.finish();
|
|
1599
1594
|
}
|
|
1600
|
-
function
|
|
1601
|
-
e.writeStringField(
|
|
1595
|
+
function Ti(t, e) {
|
|
1596
|
+
e.writeStringField(hi, t.ErrorTypeName), e.writeStringField(di, t.ErrorMessage), e.writeGuidField(fi, t.CallId), e.writeStringField(Ei, t.StackTrace), e.writeGuidField(pi, t.InstanceId);
|
|
1602
1597
|
}
|
|
1603
|
-
function
|
|
1604
|
-
const n =
|
|
1605
|
-
return P(
|
|
1598
|
+
function Si(t, e, r) {
|
|
1599
|
+
const n = _i(t);
|
|
1600
|
+
return P(ui, n, Lt, e, r);
|
|
1606
1601
|
}
|
|
1607
|
-
const Ye = 1,
|
|
1608
|
-
function
|
|
1602
|
+
const Ye = 1, wi = 1048600, vt = 703025676, Ft = 814454131, Pt = 972460562, Bt = 976255570, xt = 1368629611, Gt = 1479280922, Vt = 1533537016, Wt = 2274386296, Ht = 2603556958, $t = 2885165957, Kt = 3568439632;
|
|
1603
|
+
function Ai(t) {
|
|
1609
1604
|
const e = {};
|
|
1610
1605
|
return Yt(e), e;
|
|
1611
1606
|
}
|
|
1612
1607
|
function Yt(t) {
|
|
1613
1608
|
return t.FunctionId = m.fromBytes(new Uint8Array(16)), t.FunctionName = "", t.Parameters = [], t.ResultTypeName = "", t.IsEnumerable = !1, t.EnumerableItemTypeName = "", t.IsCancellable = !1, t.Description = "", t.LlmInlineResult = !1, t.LlmCallOnlyOnce = !1, t.RequiresInstance = !1, t;
|
|
1614
1609
|
}
|
|
1615
|
-
function
|
|
1610
|
+
function yi(t) {
|
|
1616
1611
|
const e = new D(Ye);
|
|
1617
1612
|
return jt(t, e), e.finish();
|
|
1618
1613
|
}
|
|
1619
1614
|
function jt(t, e) {
|
|
1620
1615
|
e.writeStringField(vt, t.ResultTypeName), e.writeStringField(Ft, t.FunctionName), e.writeStringField(Pt, t.EnumerableItemTypeName), e.writeGuidField(Bt, t.FunctionId), e.writeStringField(xt, t.Description), e.writeBoolField(Gt, t.IsCancellable), e.writeBoolField(Vt, t.RequiresInstance), e.writeBoolField(Wt, t.LlmInlineResult), e.writeBoolField(Ht, t.IsEnumerable), e.writeArrayField($t, R.Object, (r) => {
|
|
1621
1616
|
for (const n of t.Parameters)
|
|
1622
|
-
r.writeObject(
|
|
1623
|
-
|
|
1617
|
+
r.writeObject(bi, (s) => {
|
|
1618
|
+
Ui(n, s);
|
|
1624
1619
|
});
|
|
1625
1620
|
}), e.writeBoolField(Kt, t.LlmCallOnlyOnce);
|
|
1626
1621
|
}
|
|
1627
|
-
function
|
|
1628
|
-
const r = e ??
|
|
1629
|
-
return Yt(r),
|
|
1622
|
+
function gi(t, e) {
|
|
1623
|
+
const r = e ?? Ai();
|
|
1624
|
+
return Yt(r), Ni(t, r), r;
|
|
1630
1625
|
}
|
|
1631
|
-
function
|
|
1626
|
+
function Ni(t, e) {
|
|
1632
1627
|
let r;
|
|
1633
1628
|
for (; (r = t.next()) !== null; )
|
|
1634
1629
|
switch (r.fieldId) {
|
|
@@ -1679,7 +1674,7 @@ function Ci(t, e) {
|
|
|
1679
1674
|
}
|
|
1680
1675
|
case $t: {
|
|
1681
1676
|
if (r.isNull) throw new Error();
|
|
1682
|
-
e.Parameters =
|
|
1677
|
+
e.Parameters = Ri(r.asArray());
|
|
1683
1678
|
break;
|
|
1684
1679
|
}
|
|
1685
1680
|
case Kt: {
|
|
@@ -1689,33 +1684,33 @@ function Ci(t, e) {
|
|
|
1689
1684
|
}
|
|
1690
1685
|
}
|
|
1691
1686
|
}
|
|
1692
|
-
function
|
|
1693
|
-
const n =
|
|
1694
|
-
return P(
|
|
1687
|
+
function Ci(t, e, r) {
|
|
1688
|
+
const n = yi(t);
|
|
1689
|
+
return P(wi, n, Ye, e, r);
|
|
1695
1690
|
}
|
|
1696
|
-
function
|
|
1691
|
+
function Ri(t) {
|
|
1697
1692
|
const e = [];
|
|
1698
1693
|
let r;
|
|
1699
1694
|
for (; (r = t.next()) !== null; )
|
|
1700
|
-
e.push(
|
|
1695
|
+
e.push(Di(r.asObject()));
|
|
1701
1696
|
return e;
|
|
1702
1697
|
}
|
|
1703
|
-
const
|
|
1704
|
-
function
|
|
1698
|
+
const bi = 1, zt = 607861992, Xt = 894485888, Jt = 972460562, Qt = 1368629611, Zt = 1883521406, qt = 2603556958, er = 3609695522, tr = 4075263697, rr = 4257460908;
|
|
1699
|
+
function ki(t) {
|
|
1705
1700
|
const e = {};
|
|
1706
1701
|
return nr(e), e;
|
|
1707
1702
|
}
|
|
1708
1703
|
function nr(t) {
|
|
1709
1704
|
return t.ParameterIndex = 0, t.ParameterName = "", t.TypeName = "", t.HasDefaultValue = !1, t.DefaultValueJson = "", t.DefaultValueData = new Uint8Array(0), t.IsEnumerable = !1, t.EnumerableItemTypeName = "", t.Description = "", t;
|
|
1710
1705
|
}
|
|
1711
|
-
function
|
|
1706
|
+
function Ui(t, e) {
|
|
1712
1707
|
e.writeBoolField(zt, t.HasDefaultValue), e.writeStringField(Xt, t.DefaultValueJson), e.writeStringField(Jt, t.EnumerableItemTypeName), e.writeStringField(Qt, t.Description), e.writeBinaryField(Zt, t.DefaultValueData), e.writeBoolField(qt, t.IsEnumerable), e.writeStringField(er, t.TypeName), e.writeStringField(tr, t.ParameterName), e.writeInt32Field(rr, t.ParameterIndex | 0);
|
|
1713
1708
|
}
|
|
1714
|
-
function
|
|
1715
|
-
const r = e ??
|
|
1716
|
-
return nr(r),
|
|
1709
|
+
function Di(t, e) {
|
|
1710
|
+
const r = e ?? ki();
|
|
1711
|
+
return nr(r), Mi(t, r), r;
|
|
1717
1712
|
}
|
|
1718
|
-
function
|
|
1713
|
+
function Mi(t, e) {
|
|
1719
1714
|
let r;
|
|
1720
1715
|
for (; (r = t.next()) !== null; )
|
|
1721
1716
|
switch (r.fieldId) {
|
|
@@ -1766,61 +1761,61 @@ function Oi(t, e) {
|
|
|
1766
1761
|
}
|
|
1767
1762
|
}
|
|
1768
1763
|
}
|
|
1769
|
-
const sr = 1,
|
|
1770
|
-
function
|
|
1764
|
+
const sr = 1, Oi = 1048638, Li = 3678477544;
|
|
1765
|
+
function vi(t) {
|
|
1771
1766
|
const e = {};
|
|
1772
|
-
return
|
|
1767
|
+
return Fi(e), t && Object.assign(e, t), e;
|
|
1773
1768
|
}
|
|
1774
|
-
function
|
|
1769
|
+
function Fi(t) {
|
|
1775
1770
|
return t.Functions = [], t;
|
|
1776
1771
|
}
|
|
1777
|
-
function
|
|
1772
|
+
function Pi(t) {
|
|
1778
1773
|
const e = new D(sr);
|
|
1779
|
-
return
|
|
1774
|
+
return Bi(t, e), e.finish();
|
|
1780
1775
|
}
|
|
1781
|
-
function
|
|
1782
|
-
e.writeArrayField(
|
|
1776
|
+
function Bi(t, e) {
|
|
1777
|
+
e.writeArrayField(Li, R.Object, (r) => {
|
|
1783
1778
|
for (const n of t.Functions)
|
|
1784
1779
|
r.writeObject(Ye, (s) => {
|
|
1785
1780
|
jt(n, s);
|
|
1786
1781
|
});
|
|
1787
1782
|
});
|
|
1788
1783
|
}
|
|
1789
|
-
function
|
|
1790
|
-
const n =
|
|
1791
|
-
return P(
|
|
1784
|
+
function xi(t, e, r) {
|
|
1785
|
+
const n = Pi(t);
|
|
1786
|
+
return P(Oi, n, sr, e, r);
|
|
1792
1787
|
}
|
|
1793
|
-
const ir = 1,
|
|
1794
|
-
function
|
|
1788
|
+
const ir = 1, Gi = 1048602, Vi = 349453957, Wi = 703025676, Hi = 3403385840, $i = 3748161056, Ki = 4289118421;
|
|
1789
|
+
function Yi(t) {
|
|
1795
1790
|
const e = {};
|
|
1796
|
-
return
|
|
1791
|
+
return ji(e), t && Object.assign(e, t), e;
|
|
1797
1792
|
}
|
|
1798
|
-
function
|
|
1793
|
+
function ji(t) {
|
|
1799
1794
|
return t.CallId = m.fromBytes(new Uint8Array(16)), t.InstanceId = m.fromBytes(new Uint8Array(16)), t.ResultTypeName = "", t.ResultJson = "", t.ResultData = new Uint8Array(0), t;
|
|
1800
1795
|
}
|
|
1801
|
-
function
|
|
1796
|
+
function zi(t) {
|
|
1802
1797
|
const e = new D(ir);
|
|
1803
|
-
return
|
|
1798
|
+
return Xi(t, e), e.finish();
|
|
1804
1799
|
}
|
|
1805
|
-
function
|
|
1806
|
-
e.writeBinaryField(
|
|
1800
|
+
function Xi(t, e) {
|
|
1801
|
+
e.writeBinaryField(Vi, t.ResultData), e.writeStringField(Wi, t.ResultTypeName), e.writeStringField(Hi, t.ResultJson), e.writeGuidField($i, t.CallId), e.writeGuidField(Ki, t.InstanceId);
|
|
1807
1802
|
}
|
|
1808
|
-
function
|
|
1809
|
-
const n =
|
|
1810
|
-
return P(
|
|
1803
|
+
function Ji(t, e, r) {
|
|
1804
|
+
const n = zi(t);
|
|
1805
|
+
return P(Gi, n, ir, e, r);
|
|
1811
1806
|
}
|
|
1812
|
-
const or = 1,
|
|
1807
|
+
const or = 1, Qi = 65549;
|
|
1813
1808
|
function et(t) {
|
|
1814
1809
|
return {};
|
|
1815
1810
|
}
|
|
1816
|
-
function
|
|
1811
|
+
function Zi(t) {
|
|
1817
1812
|
return new D(or).finish();
|
|
1818
1813
|
}
|
|
1819
1814
|
function tt(t, e, r) {
|
|
1820
|
-
const n =
|
|
1821
|
-
return P(
|
|
1815
|
+
const n = Zi();
|
|
1816
|
+
return P(Qi, n, or, e, r);
|
|
1822
1817
|
}
|
|
1823
|
-
const
|
|
1818
|
+
const qi = 3167053791, eo = 3342364356, to = 3612929027;
|
|
1824
1819
|
function ar(t) {
|
|
1825
1820
|
const e = {};
|
|
1826
1821
|
return cr(e), e;
|
|
@@ -1828,39 +1823,39 @@ function ar(t) {
|
|
|
1828
1823
|
function cr(t) {
|
|
1829
1824
|
return t.Category = "", t.Type = Tt.Face, t.FaceBlendshapes = [], t;
|
|
1830
1825
|
}
|
|
1831
|
-
function
|
|
1826
|
+
function ro(t, e) {
|
|
1832
1827
|
const r = e ?? ar();
|
|
1833
|
-
return cr(r),
|
|
1828
|
+
return cr(r), no(t, r), r;
|
|
1834
1829
|
}
|
|
1835
|
-
function
|
|
1830
|
+
function no(t, e) {
|
|
1836
1831
|
let r;
|
|
1837
1832
|
for (; (r = t.next()) !== null; )
|
|
1838
1833
|
switch (r.fieldId) {
|
|
1839
|
-
case
|
|
1834
|
+
case qi: {
|
|
1840
1835
|
if (r.isNull) throw new Error();
|
|
1841
1836
|
e.Type = r.asInt32();
|
|
1842
1837
|
break;
|
|
1843
1838
|
}
|
|
1844
|
-
case
|
|
1839
|
+
case eo: {
|
|
1845
1840
|
if (r.isNull) throw new Error();
|
|
1846
|
-
e.FaceBlendshapes =
|
|
1841
|
+
e.FaceBlendshapes = so(r.asArray());
|
|
1847
1842
|
break;
|
|
1848
1843
|
}
|
|
1849
|
-
case
|
|
1844
|
+
case to: {
|
|
1850
1845
|
if (r.isNull) throw new Error();
|
|
1851
1846
|
e.Category = r.asString();
|
|
1852
1847
|
break;
|
|
1853
1848
|
}
|
|
1854
1849
|
}
|
|
1855
1850
|
}
|
|
1856
|
-
function
|
|
1851
|
+
function so(t) {
|
|
1857
1852
|
const e = [];
|
|
1858
1853
|
let r;
|
|
1859
1854
|
for (; (r = t.next()) !== null; )
|
|
1860
1855
|
e.push(r.asString());
|
|
1861
1856
|
return e;
|
|
1862
1857
|
}
|
|
1863
|
-
const
|
|
1858
|
+
const io = 3612929027;
|
|
1864
1859
|
function lr(t) {
|
|
1865
1860
|
const e = {};
|
|
1866
1861
|
return ur(e), e;
|
|
@@ -1868,22 +1863,22 @@ function lr(t) {
|
|
|
1868
1863
|
function ur(t) {
|
|
1869
1864
|
return t.Category = "", t;
|
|
1870
1865
|
}
|
|
1871
|
-
function
|
|
1866
|
+
function oo(t, e) {
|
|
1872
1867
|
const r = e ?? lr();
|
|
1873
|
-
return ur(r),
|
|
1868
|
+
return ur(r), ao(t, r), r;
|
|
1874
1869
|
}
|
|
1875
|
-
function
|
|
1870
|
+
function ao(t, e) {
|
|
1876
1871
|
let r;
|
|
1877
1872
|
for (; (r = t.next()) !== null; )
|
|
1878
1873
|
switch (r.fieldId) {
|
|
1879
|
-
case
|
|
1874
|
+
case io: {
|
|
1880
1875
|
if (r.isNull) throw new Error();
|
|
1881
1876
|
e.Category = r.asString();
|
|
1882
1877
|
break;
|
|
1883
1878
|
}
|
|
1884
1879
|
}
|
|
1885
1880
|
}
|
|
1886
|
-
const
|
|
1881
|
+
const co = 164808083, lo = 1368629611, uo = 2739413426, ho = 2768375929, fo = 2950031986, Eo = 3284746250, po = 4065070594;
|
|
1887
1882
|
function hr(t) {
|
|
1888
1883
|
const e = {};
|
|
1889
1884
|
return dr(e), e;
|
|
@@ -1891,173 +1886,173 @@ function hr(t) {
|
|
|
1891
1886
|
function dr(t) {
|
|
1892
1887
|
return t.Description = "", t.Codec = St.H264, t.Width = 0, t.Height = 0, t.Framerate = 30, t.Bitrate = 0, t.IsHardwareAccelerated = !1, t;
|
|
1893
1888
|
}
|
|
1894
|
-
function
|
|
1889
|
+
function Io(t, e) {
|
|
1895
1890
|
const r = e ?? hr();
|
|
1896
|
-
return dr(r),
|
|
1891
|
+
return dr(r), mo(t, r), r;
|
|
1897
1892
|
}
|
|
1898
|
-
function
|
|
1893
|
+
function mo(t, e) {
|
|
1899
1894
|
let r;
|
|
1900
1895
|
for (; (r = t.next()) !== null; )
|
|
1901
1896
|
switch (r.fieldId) {
|
|
1902
|
-
case
|
|
1897
|
+
case co: {
|
|
1903
1898
|
if (r.isNull) throw new Error();
|
|
1904
1899
|
e.Framerate = r.asInt32();
|
|
1905
1900
|
break;
|
|
1906
1901
|
}
|
|
1907
|
-
case
|
|
1902
|
+
case lo: {
|
|
1908
1903
|
if (r.isNull) throw new Error();
|
|
1909
1904
|
e.Description = r.asString();
|
|
1910
1905
|
break;
|
|
1911
1906
|
}
|
|
1912
|
-
case
|
|
1907
|
+
case uo: {
|
|
1913
1908
|
if (r.isNull) throw new Error();
|
|
1914
1909
|
e.IsHardwareAccelerated = r.asBool();
|
|
1915
1910
|
break;
|
|
1916
1911
|
}
|
|
1917
|
-
case
|
|
1912
|
+
case ho: {
|
|
1918
1913
|
if (r.isNull) throw new Error();
|
|
1919
1914
|
e.Bitrate = r.asInt32();
|
|
1920
1915
|
break;
|
|
1921
1916
|
}
|
|
1922
|
-
case
|
|
1917
|
+
case fo: {
|
|
1923
1918
|
if (r.isNull) throw new Error();
|
|
1924
1919
|
e.Height = r.asInt32();
|
|
1925
1920
|
break;
|
|
1926
1921
|
}
|
|
1927
|
-
case
|
|
1922
|
+
case Eo: {
|
|
1928
1923
|
if (r.isNull) throw new Error();
|
|
1929
1924
|
e.Codec = r.asInt32();
|
|
1930
1925
|
break;
|
|
1931
1926
|
}
|
|
1932
|
-
case
|
|
1927
|
+
case po: {
|
|
1933
1928
|
if (r.isNull) throw new Error();
|
|
1934
1929
|
e.Width = r.asInt32();
|
|
1935
1930
|
break;
|
|
1936
1931
|
}
|
|
1937
1932
|
}
|
|
1938
1933
|
}
|
|
1939
|
-
const
|
|
1940
|
-
function
|
|
1934
|
+
const _o = 65539, To = 693643444, So = 1144553441, wo = 1497620243, Ao = 1559330978, yo = 1976546434, go = 1999510636, No = 2277643855, Co = 2469008121, Ro = 3042922213, bo = 3064612128, ko = 3219210453, Uo = 3504054055, Do = 3678477544, Mo = 3696445035, Oo = 3707543140, Lo = 3712281496, vo = 3895362455, Fo = 3897397815, Po = 4225107827;
|
|
1935
|
+
function Bo(t) {
|
|
1941
1936
|
const e = {};
|
|
1942
1937
|
return fr(e), e;
|
|
1943
1938
|
}
|
|
1944
1939
|
function fr(t) {
|
|
1945
1940
|
return t.Clients = /* @__PURE__ */ Object.create(null), t.Functions = /* @__PURE__ */ Object.create(null), t.UIStreams = /* @__PURE__ */ Object.create(null), t.AudioStreams = /* @__PURE__ */ Object.create(null), t.VideoStreams = /* @__PURE__ */ Object.create(null), t.TrackingStreams = /* @__PURE__ */ Object.create(null), t.SpaceId = "", t.ChannelId = "", t.SessionId = "", t.ChannelUrl = "", t.FirstUserId = "", t.PrimaryUserId = "", t.OrganisationName = "", t.SpaceName = "", t.ChannelName = "", t.ServerRunType = wt.Local, t.AppSourceType = At.Bundle, t.PublicAccess = !1, t.DebugMode = !1, t;
|
|
1946
1941
|
}
|
|
1947
|
-
function
|
|
1942
|
+
function xo(t, e) {
|
|
1948
1943
|
const r = X.create(t);
|
|
1949
|
-
return
|
|
1944
|
+
return Go(r, e);
|
|
1950
1945
|
}
|
|
1951
|
-
function
|
|
1952
|
-
const r = e ??
|
|
1953
|
-
return fr(r),
|
|
1946
|
+
function Go(t, e) {
|
|
1947
|
+
const r = e ?? Bo();
|
|
1948
|
+
return fr(r), Vo(t, r), r;
|
|
1954
1949
|
}
|
|
1955
|
-
function
|
|
1950
|
+
function Vo(t, e) {
|
|
1956
1951
|
let r;
|
|
1957
1952
|
for (; (r = t.next()) !== null; )
|
|
1958
1953
|
switch (r.fieldId) {
|
|
1959
|
-
case
|
|
1954
|
+
case To: {
|
|
1960
1955
|
if (r.isNull) throw new Error();
|
|
1961
1956
|
e.FirstUserId = r.asString();
|
|
1962
1957
|
break;
|
|
1963
1958
|
}
|
|
1959
|
+
case So: {
|
|
1960
|
+
if (r.isNull) throw new Error();
|
|
1961
|
+
e.Clients = Ho(r.asDictionary());
|
|
1962
|
+
break;
|
|
1963
|
+
}
|
|
1964
1964
|
case wo: {
|
|
1965
1965
|
if (r.isNull) throw new Error();
|
|
1966
|
-
e.
|
|
1966
|
+
e.TrackingStreams = $o(r.asDictionary());
|
|
1967
1967
|
break;
|
|
1968
1968
|
}
|
|
1969
1969
|
case Ao: {
|
|
1970
1970
|
if (r.isNull) throw new Error();
|
|
1971
|
-
e.
|
|
1971
|
+
e.ChannelId = r.asString();
|
|
1972
1972
|
break;
|
|
1973
1973
|
}
|
|
1974
1974
|
case yo: {
|
|
1975
1975
|
if (r.isNull) throw new Error();
|
|
1976
|
-
e.
|
|
1976
|
+
e.AppSourceType = r.asInt32();
|
|
1977
1977
|
break;
|
|
1978
1978
|
}
|
|
1979
1979
|
case go: {
|
|
1980
1980
|
if (r.isNull) throw new Error();
|
|
1981
|
-
e.
|
|
1981
|
+
e.SessionId = r.asString();
|
|
1982
1982
|
break;
|
|
1983
1983
|
}
|
|
1984
1984
|
case No: {
|
|
1985
1985
|
if (r.isNull) throw new Error();
|
|
1986
|
-
e.
|
|
1986
|
+
e.ChannelUrl = r.asString();
|
|
1987
1987
|
break;
|
|
1988
1988
|
}
|
|
1989
1989
|
case Co: {
|
|
1990
1990
|
if (r.isNull) throw new Error();
|
|
1991
|
-
e.
|
|
1991
|
+
e.ChannelName = r.asString();
|
|
1992
1992
|
break;
|
|
1993
1993
|
}
|
|
1994
1994
|
case Ro: {
|
|
1995
1995
|
if (r.isNull) throw new Error();
|
|
1996
|
-
e.
|
|
1996
|
+
e.PublicAccess = r.asBool();
|
|
1997
1997
|
break;
|
|
1998
1998
|
}
|
|
1999
1999
|
case bo: {
|
|
2000
2000
|
if (r.isNull) throw new Error();
|
|
2001
|
-
e.
|
|
2001
|
+
e.ServerRunType = r.asInt32();
|
|
2002
2002
|
break;
|
|
2003
2003
|
}
|
|
2004
2004
|
case ko: {
|
|
2005
2005
|
if (r.isNull) throw new Error();
|
|
2006
|
-
e.
|
|
2006
|
+
e.OrganisationName = r.asString();
|
|
2007
2007
|
break;
|
|
2008
2008
|
}
|
|
2009
2009
|
case Uo: {
|
|
2010
2010
|
if (r.isNull) throw new Error();
|
|
2011
|
-
e.
|
|
2011
|
+
e.DebugMode = r.asBool();
|
|
2012
2012
|
break;
|
|
2013
2013
|
}
|
|
2014
2014
|
case Do: {
|
|
2015
2015
|
if (r.isNull) throw new Error();
|
|
2016
|
-
e.
|
|
2016
|
+
e.Functions = Ko(r.asDictionary());
|
|
2017
2017
|
break;
|
|
2018
2018
|
}
|
|
2019
2019
|
case Mo: {
|
|
2020
2020
|
if (r.isNull) throw new Error();
|
|
2021
|
-
e.
|
|
2021
|
+
e.UIStreams = Yo(r.asDictionary());
|
|
2022
2022
|
break;
|
|
2023
2023
|
}
|
|
2024
2024
|
case Oo: {
|
|
2025
2025
|
if (r.isNull) throw new Error();
|
|
2026
|
-
e.
|
|
2026
|
+
e.SpaceId = r.asString();
|
|
2027
2027
|
break;
|
|
2028
2028
|
}
|
|
2029
2029
|
case Lo: {
|
|
2030
2030
|
if (r.isNull) throw new Error();
|
|
2031
|
-
e.
|
|
2031
|
+
e.PrimaryUserId = r.asString();
|
|
2032
2032
|
break;
|
|
2033
2033
|
}
|
|
2034
2034
|
case vo: {
|
|
2035
2035
|
if (r.isNull) throw new Error();
|
|
2036
|
-
e.
|
|
2036
|
+
e.AudioStreams = jo(r.asDictionary());
|
|
2037
2037
|
break;
|
|
2038
2038
|
}
|
|
2039
2039
|
case Fo: {
|
|
2040
2040
|
if (r.isNull) throw new Error();
|
|
2041
|
-
e.
|
|
2041
|
+
e.VideoStreams = zo(r.asDictionary());
|
|
2042
2042
|
break;
|
|
2043
2043
|
}
|
|
2044
2044
|
case Po: {
|
|
2045
|
-
if (r.isNull) throw new Error();
|
|
2046
|
-
e.VideoStreams = Xo(r.asDictionary());
|
|
2047
|
-
break;
|
|
2048
|
-
}
|
|
2049
|
-
case Bo: {
|
|
2050
2045
|
if (r.isNull) throw new Error();
|
|
2051
2046
|
e.SpaceName = r.asString();
|
|
2052
2047
|
break;
|
|
2053
2048
|
}
|
|
2054
2049
|
}
|
|
2055
2050
|
}
|
|
2056
|
-
async function
|
|
2057
|
-
const r = await Be(t,
|
|
2058
|
-
return
|
|
2051
|
+
async function Wo(t, e) {
|
|
2052
|
+
const r = await Be(t, _o);
|
|
2053
|
+
return xo(r, e);
|
|
2059
2054
|
}
|
|
2060
|
-
function
|
|
2055
|
+
function Ho(t) {
|
|
2061
2056
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2062
2057
|
let r;
|
|
2063
2058
|
for (; (r = t.next()) !== null; ) {
|
|
@@ -2066,231 +2061,231 @@ function $o(t) {
|
|
|
2066
2061
|
}
|
|
2067
2062
|
return e;
|
|
2068
2063
|
}
|
|
2069
|
-
function
|
|
2064
|
+
function $o(t) {
|
|
2070
2065
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2071
2066
|
let r;
|
|
2072
2067
|
for (; (r = t.next()) !== null; ) {
|
|
2073
2068
|
const n = r.key.asString();
|
|
2074
|
-
e[n] =
|
|
2069
|
+
e[n] = Aa(r.value.asObject());
|
|
2075
2070
|
}
|
|
2076
2071
|
return e;
|
|
2077
2072
|
}
|
|
2078
|
-
function
|
|
2073
|
+
function Ko(t) {
|
|
2079
2074
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2080
2075
|
let r;
|
|
2081
2076
|
for (; (r = t.next()) !== null; ) {
|
|
2082
2077
|
const n = r.key.asInt32();
|
|
2083
|
-
e[n] =
|
|
2078
|
+
e[n] = Xo(r.value.asArray());
|
|
2084
2079
|
}
|
|
2085
2080
|
return e;
|
|
2086
2081
|
}
|
|
2087
|
-
function
|
|
2082
|
+
function Yo(t) {
|
|
2088
2083
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2089
2084
|
let r;
|
|
2090
2085
|
for (; (r = t.next()) !== null; ) {
|
|
2091
2086
|
const n = r.key.asString();
|
|
2092
|
-
e[n] =
|
|
2087
|
+
e[n] = ta(r.value.asObject());
|
|
2093
2088
|
}
|
|
2094
2089
|
return e;
|
|
2095
2090
|
}
|
|
2096
|
-
function
|
|
2091
|
+
function jo(t) {
|
|
2097
2092
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2098
2093
|
let r;
|
|
2099
2094
|
for (; (r = t.next()) !== null; ) {
|
|
2100
2095
|
const n = r.key.asString();
|
|
2101
|
-
e[n] =
|
|
2096
|
+
e[n] = ca(r.value.asObject());
|
|
2102
2097
|
}
|
|
2103
2098
|
return e;
|
|
2104
2099
|
}
|
|
2105
|
-
function
|
|
2100
|
+
function zo(t) {
|
|
2106
2101
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2107
2102
|
let r;
|
|
2108
2103
|
for (; (r = t.next()) !== null; ) {
|
|
2109
2104
|
const n = r.key.asString();
|
|
2110
|
-
e[n] =
|
|
2105
|
+
e[n] = pa(r.value.asObject());
|
|
2111
2106
|
}
|
|
2112
2107
|
return e;
|
|
2113
2108
|
}
|
|
2114
|
-
function
|
|
2109
|
+
function Xo(t) {
|
|
2115
2110
|
const e = [];
|
|
2116
2111
|
let r;
|
|
2117
2112
|
for (; (r = t.next()) !== null; )
|
|
2118
|
-
e.push(
|
|
2113
|
+
e.push(gi(r.asObject()));
|
|
2119
2114
|
return e;
|
|
2120
2115
|
}
|
|
2121
|
-
const
|
|
2122
|
-
function
|
|
2116
|
+
const Jo = 161083277, Qo = 325678206, Zo = 3469892363, qo = 3645544153;
|
|
2117
|
+
function ea(t) {
|
|
2123
2118
|
const e = {};
|
|
2124
2119
|
return Er(e), e;
|
|
2125
2120
|
}
|
|
2126
2121
|
function Er(t) {
|
|
2127
2122
|
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = lr(), t;
|
|
2128
2123
|
}
|
|
2129
|
-
function
|
|
2130
|
-
const r = e ??
|
|
2131
|
-
return Er(r),
|
|
2124
|
+
function ta(t, e) {
|
|
2125
|
+
const r = e ?? ea();
|
|
2126
|
+
return Er(r), ra(t, r), r;
|
|
2132
2127
|
}
|
|
2133
|
-
function
|
|
2128
|
+
function ra(t, e) {
|
|
2134
2129
|
let r;
|
|
2135
2130
|
for (; (r = t.next()) !== null; )
|
|
2136
2131
|
switch (r.fieldId) {
|
|
2137
|
-
case
|
|
2132
|
+
case Jo: {
|
|
2138
2133
|
if (r.isNull) throw new Error();
|
|
2139
2134
|
e.StreamId = r.asString();
|
|
2140
2135
|
break;
|
|
2141
2136
|
}
|
|
2142
|
-
case
|
|
2137
|
+
case Qo: {
|
|
2143
2138
|
if (r.isNull) throw new Error();
|
|
2144
2139
|
e.ClientSessionId = r.asInt32();
|
|
2145
2140
|
break;
|
|
2146
2141
|
}
|
|
2147
|
-
case
|
|
2142
|
+
case Zo: {
|
|
2148
2143
|
if (r.isNull) throw new Error();
|
|
2149
2144
|
e.TrackId = r.asInt32();
|
|
2150
2145
|
break;
|
|
2151
2146
|
}
|
|
2152
|
-
case
|
|
2147
|
+
case qo: {
|
|
2153
2148
|
if (r.isNull) throw new Error();
|
|
2154
|
-
e.Info =
|
|
2149
|
+
e.Info = oo(r.asObject());
|
|
2155
2150
|
break;
|
|
2156
2151
|
}
|
|
2157
2152
|
}
|
|
2158
2153
|
}
|
|
2159
|
-
const
|
|
2160
|
-
function
|
|
2154
|
+
const na = 161083277, sa = 325678206, ia = 3469892363, oa = 3645544153;
|
|
2155
|
+
function aa(t) {
|
|
2161
2156
|
const e = {};
|
|
2162
2157
|
return pr(e), e;
|
|
2163
2158
|
}
|
|
2164
2159
|
function pr(t) {
|
|
2165
2160
|
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = Nt(), t;
|
|
2166
2161
|
}
|
|
2167
|
-
function
|
|
2168
|
-
const r = e ??
|
|
2169
|
-
return pr(r),
|
|
2162
|
+
function ca(t, e) {
|
|
2163
|
+
const r = e ?? aa();
|
|
2164
|
+
return pr(r), la(t, r), r;
|
|
2170
2165
|
}
|
|
2171
|
-
function
|
|
2166
|
+
function la(t, e) {
|
|
2172
2167
|
let r;
|
|
2173
2168
|
for (; (r = t.next()) !== null; )
|
|
2174
2169
|
switch (r.fieldId) {
|
|
2175
|
-
case
|
|
2170
|
+
case na: {
|
|
2176
2171
|
if (r.isNull) throw new Error();
|
|
2177
2172
|
e.StreamId = r.asString();
|
|
2178
2173
|
break;
|
|
2179
2174
|
}
|
|
2180
|
-
case
|
|
2175
|
+
case sa: {
|
|
2181
2176
|
if (r.isNull) throw new Error();
|
|
2182
2177
|
e.ClientSessionId = r.asInt32();
|
|
2183
2178
|
break;
|
|
2184
2179
|
}
|
|
2185
|
-
case
|
|
2180
|
+
case ia: {
|
|
2186
2181
|
if (r.isNull) throw new Error();
|
|
2187
2182
|
e.TrackId = r.asInt32();
|
|
2188
2183
|
break;
|
|
2189
2184
|
}
|
|
2190
|
-
case
|
|
2185
|
+
case oa: {
|
|
2191
2186
|
if (r.isNull) throw new Error();
|
|
2192
2187
|
e.Info = Cn(r.asObject());
|
|
2193
2188
|
break;
|
|
2194
2189
|
}
|
|
2195
2190
|
}
|
|
2196
2191
|
}
|
|
2197
|
-
const
|
|
2198
|
-
function
|
|
2192
|
+
const ua = 161083277, ha = 325678206, da = 3469892363, fa = 3645544153;
|
|
2193
|
+
function Ea(t) {
|
|
2199
2194
|
const e = {};
|
|
2200
2195
|
return Ir(e), e;
|
|
2201
2196
|
}
|
|
2202
2197
|
function Ir(t) {
|
|
2203
2198
|
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = hr(), t;
|
|
2204
2199
|
}
|
|
2205
|
-
function
|
|
2206
|
-
const r = e ??
|
|
2207
|
-
return Ir(r),
|
|
2200
|
+
function pa(t, e) {
|
|
2201
|
+
const r = e ?? Ea();
|
|
2202
|
+
return Ir(r), Ia(t, r), r;
|
|
2208
2203
|
}
|
|
2209
|
-
function
|
|
2204
|
+
function Ia(t, e) {
|
|
2210
2205
|
let r;
|
|
2211
2206
|
for (; (r = t.next()) !== null; )
|
|
2212
2207
|
switch (r.fieldId) {
|
|
2213
|
-
case
|
|
2208
|
+
case ua: {
|
|
2214
2209
|
if (r.isNull) throw new Error();
|
|
2215
2210
|
e.StreamId = r.asString();
|
|
2216
2211
|
break;
|
|
2217
2212
|
}
|
|
2218
|
-
case
|
|
2213
|
+
case ha: {
|
|
2219
2214
|
if (r.isNull) throw new Error();
|
|
2220
2215
|
e.ClientSessionId = r.asInt32();
|
|
2221
2216
|
break;
|
|
2222
2217
|
}
|
|
2223
|
-
case
|
|
2218
|
+
case da: {
|
|
2224
2219
|
if (r.isNull) throw new Error();
|
|
2225
2220
|
e.TrackId = r.asInt32();
|
|
2226
2221
|
break;
|
|
2227
2222
|
}
|
|
2228
|
-
case
|
|
2223
|
+
case fa: {
|
|
2229
2224
|
if (r.isNull) throw new Error();
|
|
2230
|
-
e.Info =
|
|
2225
|
+
e.Info = Io(r.asObject());
|
|
2231
2226
|
break;
|
|
2232
2227
|
}
|
|
2233
2228
|
}
|
|
2234
2229
|
}
|
|
2235
|
-
const
|
|
2236
|
-
function
|
|
2230
|
+
const ma = 161083277, _a = 325678206, Ta = 3469892363, Sa = 3645544153;
|
|
2231
|
+
function wa(t) {
|
|
2237
2232
|
const e = {};
|
|
2238
2233
|
return mr(e), e;
|
|
2239
2234
|
}
|
|
2240
2235
|
function mr(t) {
|
|
2241
2236
|
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = ar(), t;
|
|
2242
2237
|
}
|
|
2243
|
-
function
|
|
2244
|
-
const r = e ??
|
|
2245
|
-
return mr(r),
|
|
2238
|
+
function Aa(t, e) {
|
|
2239
|
+
const r = e ?? wa();
|
|
2240
|
+
return mr(r), ya(t, r), r;
|
|
2246
2241
|
}
|
|
2247
|
-
function
|
|
2242
|
+
function ya(t, e) {
|
|
2248
2243
|
let r;
|
|
2249
2244
|
for (; (r = t.next()) !== null; )
|
|
2250
2245
|
switch (r.fieldId) {
|
|
2251
|
-
case
|
|
2246
|
+
case ma: {
|
|
2252
2247
|
if (r.isNull) throw new Error();
|
|
2253
2248
|
e.StreamId = r.asString();
|
|
2254
2249
|
break;
|
|
2255
2250
|
}
|
|
2256
|
-
case
|
|
2251
|
+
case _a: {
|
|
2257
2252
|
if (r.isNull) throw new Error();
|
|
2258
2253
|
e.ClientSessionId = r.asInt32();
|
|
2259
2254
|
break;
|
|
2260
2255
|
}
|
|
2261
|
-
case
|
|
2256
|
+
case Ta: {
|
|
2262
2257
|
if (r.isNull) throw new Error();
|
|
2263
2258
|
e.TrackId = r.asInt32();
|
|
2264
2259
|
break;
|
|
2265
2260
|
}
|
|
2266
|
-
case
|
|
2261
|
+
case Sa: {
|
|
2267
2262
|
if (r.isNull) throw new Error();
|
|
2268
|
-
e.Info =
|
|
2263
|
+
e.Info = ro(r.asObject());
|
|
2269
2264
|
break;
|
|
2270
2265
|
}
|
|
2271
2266
|
}
|
|
2272
2267
|
}
|
|
2273
|
-
const _r = 1,
|
|
2268
|
+
const _r = 1, ga = 131074;
|
|
2274
2269
|
function Tr(t) {
|
|
2275
2270
|
return {};
|
|
2276
2271
|
}
|
|
2277
|
-
function
|
|
2272
|
+
function Na(t) {
|
|
2278
2273
|
return new D(_r).finish();
|
|
2279
2274
|
}
|
|
2280
2275
|
function Sr(t, e, r) {
|
|
2281
|
-
const n =
|
|
2282
|
-
return P(
|
|
2276
|
+
const n = Na();
|
|
2277
|
+
return P(ga, n, _r, e, r);
|
|
2283
2278
|
}
|
|
2284
|
-
const wr = 1,
|
|
2285
|
-
function
|
|
2279
|
+
const wr = 1, Ca = 8388612;
|
|
2280
|
+
function Ra(t) {
|
|
2286
2281
|
return {};
|
|
2287
2282
|
}
|
|
2288
|
-
function
|
|
2283
|
+
function ba(t) {
|
|
2289
2284
|
return new D(wr).finish();
|
|
2290
2285
|
}
|
|
2291
|
-
function
|
|
2292
|
-
const n =
|
|
2293
|
-
return P(
|
|
2286
|
+
function ka(t, e, r) {
|
|
2287
|
+
const n = ba();
|
|
2288
|
+
return P(Ca, n, wr, e, r);
|
|
2294
2289
|
}
|
|
2295
2290
|
class je extends Error {
|
|
2296
2291
|
constructor(e, r) {
|
|
@@ -2312,27 +2307,27 @@ class ze extends H {
|
|
|
2312
2307
|
super(`No keepalive received within ${e}ms`), this.name = "KeepaliveTimeoutError";
|
|
2313
2308
|
}
|
|
2314
2309
|
}
|
|
2315
|
-
class
|
|
2310
|
+
class Ua extends je {
|
|
2316
2311
|
constructor(e) {
|
|
2317
2312
|
super(`Maximum reconnection attempts (${e}) exceeded`), this.name = "MaxRetriesExceededError";
|
|
2318
2313
|
}
|
|
2319
2314
|
}
|
|
2320
|
-
class
|
|
2315
|
+
class Da extends g {
|
|
2321
2316
|
constructor(e) {
|
|
2322
2317
|
super(`Channel provisioning timeout after ${e}ms`), this.name = "ProvisioningTimeoutError";
|
|
2323
2318
|
}
|
|
2324
2319
|
}
|
|
2325
|
-
class
|
|
2320
|
+
class kl extends g {
|
|
2326
2321
|
constructor(e) {
|
|
2327
2322
|
super(`Channel not found: ${e}`), this.name = "ChannelNotFoundError";
|
|
2328
2323
|
}
|
|
2329
2324
|
}
|
|
2330
|
-
class
|
|
2325
|
+
class Ul extends g {
|
|
2331
2326
|
constructor(e) {
|
|
2332
2327
|
super(`Space not found for domain: ${e}`), this.name = "SpaceNotFoundError";
|
|
2333
2328
|
}
|
|
2334
2329
|
}
|
|
2335
|
-
class
|
|
2330
|
+
class Dl extends g {
|
|
2336
2331
|
constructor() {
|
|
2337
2332
|
super("No channels available in this space"), this.name = "NoChannelsError";
|
|
2338
2333
|
}
|
|
@@ -2357,16 +2352,16 @@ const De = /* @__PURE__ */ new Map();
|
|
|
2357
2352
|
function yr(t) {
|
|
2358
2353
|
Xe = t;
|
|
2359
2354
|
}
|
|
2360
|
-
function
|
|
2355
|
+
function Ml() {
|
|
2361
2356
|
return Xe;
|
|
2362
2357
|
}
|
|
2363
|
-
function
|
|
2358
|
+
function Ma(t) {
|
|
2364
2359
|
Ie = t;
|
|
2365
2360
|
}
|
|
2366
|
-
function
|
|
2361
|
+
function Ol() {
|
|
2367
2362
|
return Ie;
|
|
2368
2363
|
}
|
|
2369
|
-
function
|
|
2364
|
+
function Ll(t, e) {
|
|
2370
2365
|
return De.set(t, e ?? {
|
|
2371
2366
|
minLevel: 2
|
|
2372
2367
|
/* WARN */
|
|
@@ -2374,18 +2369,18 @@ function vl(t, e) {
|
|
|
2374
2369
|
De.delete(t);
|
|
2375
2370
|
};
|
|
2376
2371
|
}
|
|
2377
|
-
const
|
|
2372
|
+
const Oa = {
|
|
2378
2373
|
0: "DEBUG",
|
|
2379
2374
|
1: "INFO",
|
|
2380
2375
|
2: "WARN",
|
|
2381
2376
|
3: "ERROR",
|
|
2382
2377
|
4: "NONE"
|
|
2383
2378
|
};
|
|
2384
|
-
function
|
|
2379
|
+
function La(t, e) {
|
|
2385
2380
|
return `[${t}] ${e}`;
|
|
2386
2381
|
}
|
|
2387
2382
|
function ae(t, e, r, n) {
|
|
2388
|
-
const s = (/* @__PURE__ */ new Date()).toISOString(), i =
|
|
2383
|
+
const s = (/* @__PURE__ */ new Date()).toISOString(), i = Oa[t], o = {
|
|
2389
2384
|
timestamp: s,
|
|
2390
2385
|
level: t,
|
|
2391
2386
|
levelName: i,
|
|
@@ -2403,7 +2398,7 @@ function ae(t, e, r, n) {
|
|
|
2403
2398
|
}
|
|
2404
2399
|
}
|
|
2405
2400
|
if (Xe <= t) {
|
|
2406
|
-
const a =
|
|
2401
|
+
const a = La(e, r);
|
|
2407
2402
|
switch (t) {
|
|
2408
2403
|
case 0:
|
|
2409
2404
|
console.debug(a, ...n);
|
|
@@ -2436,8 +2431,8 @@ function M(t) {
|
|
|
2436
2431
|
}
|
|
2437
2432
|
};
|
|
2438
2433
|
}
|
|
2439
|
-
const ce = M("WebSocketTransport"),
|
|
2440
|
-
class
|
|
2434
|
+
const ce = M("WebSocketTransport"), va = 1e4;
|
|
2435
|
+
class Fa {
|
|
2441
2436
|
ws = null;
|
|
2442
2437
|
keepaliveTimeout = null;
|
|
2443
2438
|
// Pre-allocated keepalive response message to avoid allocation per keepalive
|
|
@@ -2464,7 +2459,7 @@ class Pa {
|
|
|
2464
2459
|
clearTimeout(c), this.ws && (this.ws.onopen = null, this.ws.onerror = null, this.ws.onclose = null, this.ws.onmessage = null);
|
|
2465
2460
|
}, c = setTimeout(() => {
|
|
2466
2461
|
o || (o = !0, a(), this.ws?.close(), s(new H("WebSocket connection timeout")));
|
|
2467
|
-
},
|
|
2462
|
+
}, va);
|
|
2468
2463
|
this.ws.onopen = () => {
|
|
2469
2464
|
i = !0, clearTimeout(c), this.ws.send(r), this.resetKeepaliveTimeout(), o || (o = !0, n());
|
|
2470
2465
|
}, this.ws.onerror = () => {
|
|
@@ -2513,11 +2508,11 @@ class Pa {
|
|
|
2513
2508
|
this.keepaliveTimeout && (clearTimeout(this.keepaliveTimeout), this.keepaliveTimeout = null);
|
|
2514
2509
|
}
|
|
2515
2510
|
}
|
|
2516
|
-
const B = M("WebTransportTransport"), rt = 4,
|
|
2511
|
+
const B = M("WebTransportTransport"), rt = 4, Pa = 65536;
|
|
2517
2512
|
function gr() {
|
|
2518
2513
|
return typeof WebTransport < "u";
|
|
2519
2514
|
}
|
|
2520
|
-
class
|
|
2515
|
+
class Ba {
|
|
2521
2516
|
transport = null;
|
|
2522
2517
|
stream = null;
|
|
2523
2518
|
reader = null;
|
|
@@ -2525,7 +2520,7 @@ class xa {
|
|
|
2525
2520
|
keepaliveTimeout = null;
|
|
2526
2521
|
readLoopActive = !1;
|
|
2527
2522
|
// Grow-only receive buffer with offset/length tracking to minimize allocations
|
|
2528
|
-
receiveBuffer = new Uint8Array(
|
|
2523
|
+
receiveBuffer = new Uint8Array(Pa);
|
|
2529
2524
|
receiveBufferOffset = 0;
|
|
2530
2525
|
receiveBufferLength = 0;
|
|
2531
2526
|
// Cached DataView to avoid allocation per message
|
|
@@ -2680,7 +2675,7 @@ class xa {
|
|
|
2680
2675
|
}
|
|
2681
2676
|
}
|
|
2682
2677
|
const te = M("Channel");
|
|
2683
|
-
class
|
|
2678
|
+
class xa {
|
|
2684
2679
|
state = "disconnected";
|
|
2685
2680
|
transport = null;
|
|
2686
2681
|
config;
|
|
@@ -2757,13 +2752,13 @@ class Ga {
|
|
|
2757
2752
|
switch (e.Type) {
|
|
2758
2753
|
case k.WebSocket:
|
|
2759
2754
|
case k.WebSocketProxy:
|
|
2760
|
-
this.transport = new
|
|
2755
|
+
this.transport = new Fa(r);
|
|
2761
2756
|
break;
|
|
2762
2757
|
case k.WebTransport:
|
|
2763
2758
|
case k.WebTransportProxy:
|
|
2764
2759
|
if (!gr())
|
|
2765
2760
|
throw new Error("WebTransport is not supported in this browser");
|
|
2766
|
-
this.transport = new
|
|
2761
|
+
this.transport = new Ba(r);
|
|
2767
2762
|
break;
|
|
2768
2763
|
default:
|
|
2769
2764
|
throw new Error(`Unsupported entrypoint type: ${k[e.Type]}`);
|
|
@@ -2805,7 +2800,7 @@ class Ga {
|
|
|
2805
2800
|
}
|
|
2806
2801
|
}
|
|
2807
2802
|
const x = M("ChannelManager");
|
|
2808
|
-
class
|
|
2803
|
+
class Ga {
|
|
2809
2804
|
channels = /* @__PURE__ */ new Map();
|
|
2810
2805
|
// keyed by opcode group
|
|
2811
2806
|
activeType = null;
|
|
@@ -2907,7 +2902,7 @@ class Va {
|
|
|
2907
2902
|
* Connect a single channel.
|
|
2908
2903
|
*/
|
|
2909
2904
|
async connectChannel(e) {
|
|
2910
|
-
const r = new
|
|
2905
|
+
const r = new xa({
|
|
2911
2906
|
entrypoint: e,
|
|
2912
2907
|
sessionId: this.config.sessionId,
|
|
2913
2908
|
keepaliveTimeoutMs: this.config.keepaliveTimeoutMs,
|
|
@@ -2962,7 +2957,7 @@ class Va {
|
|
|
2962
2957
|
if (!this.shouldReconnect)
|
|
2963
2958
|
return;
|
|
2964
2959
|
if (this.reconnectAttempts >= this.config.maxReconnectAttempts) {
|
|
2965
|
-
x.error(`Max reconnect attempts (${this.config.maxReconnectAttempts}) reached`), this.setState("offline"), this.config.onError?.(new
|
|
2960
|
+
x.error(`Max reconnect attempts (${this.config.maxReconnectAttempts}) reached`), this.setState("offline"), this.config.onError?.(new Ua(this.config.maxReconnectAttempts));
|
|
2966
2961
|
return;
|
|
2967
2962
|
}
|
|
2968
2963
|
this.setState("reconnecting"), this.reconnectAttempts++;
|
|
@@ -2989,7 +2984,7 @@ class Va {
|
|
|
2989
2984
|
this.state !== e && (this.state = e, this.config.onStateChange?.(e));
|
|
2990
2985
|
}
|
|
2991
2986
|
}
|
|
2992
|
-
const
|
|
2987
|
+
const Va = 5e3, Wa = 3e4, nt = 35e3, st = 500, it = 6, Nr = 6e4, Me = "ikon_device_id";
|
|
2993
2988
|
function Je() {
|
|
2994
2989
|
if (typeof window > "u" || typeof localStorage > "u")
|
|
2995
2990
|
return crypto.randomUUID();
|
|
@@ -3000,14 +2995,14 @@ function Je() {
|
|
|
3000
2995
|
return crypto.randomUUID();
|
|
3001
2996
|
}
|
|
3002
2997
|
}
|
|
3003
|
-
function
|
|
2998
|
+
function vl() {
|
|
3004
2999
|
if (!(typeof localStorage > "u"))
|
|
3005
3000
|
try {
|
|
3006
3001
|
localStorage.removeItem(Me);
|
|
3007
3002
|
} catch {
|
|
3008
3003
|
}
|
|
3009
3004
|
}
|
|
3010
|
-
function
|
|
3005
|
+
function Fl(t) {
|
|
3011
3006
|
try {
|
|
3012
3007
|
const e = t.split(".");
|
|
3013
3008
|
return e.length !== 3 ? null : JSON.parse(atob(e[1])).id ?? null;
|
|
@@ -3015,22 +3010,22 @@ function Pl(t) {
|
|
|
3015
3010
|
return null;
|
|
3016
3011
|
}
|
|
3017
3012
|
}
|
|
3018
|
-
const me = {}, Oe = "https://api.prod.ikon.live", _e = "https://api.dev.ikon.live", ot = "https://auth.ikonai.com", at = "https://auth.dev.ikonai.com",
|
|
3013
|
+
const me = {}, Oe = "https://api.prod.ikon.live", _e = "https://api.dev.ikon.live", ot = "https://auth.ikonai.com", at = "https://auth.dev.ikonai.com", Pl = "https://auth.ikonai.com";
|
|
3019
3014
|
function Cr(t) {
|
|
3020
3015
|
return t === "development" ? _e : Oe;
|
|
3021
3016
|
}
|
|
3022
|
-
function
|
|
3017
|
+
function Bl() {
|
|
3023
3018
|
const t = typeof import.meta < "u" ? me?.VITE_IKON_BACKEND_URL : void 0;
|
|
3024
3019
|
return t || (typeof window > "u" ? Oe : !Qe() || window.location.hostname.includes(".dev.") ? _e : Oe);
|
|
3025
3020
|
}
|
|
3026
|
-
function
|
|
3021
|
+
function xl() {
|
|
3027
3022
|
const t = typeof import.meta < "u" ? me?.VITE_IKON_BACKEND_TYPE : void 0;
|
|
3028
3023
|
if (t === "development" || t === "production")
|
|
3029
3024
|
return t;
|
|
3030
3025
|
const e = typeof import.meta < "u" ? me?.VITE_IKON_BACKEND_URL : void 0;
|
|
3031
3026
|
return e ? e.includes(".dev.") ? "development" : "production" : typeof window > "u" ? "production" : Qe() ? window.location.hostname.includes(".dev.") ? "development" : "production" : "development";
|
|
3032
3027
|
}
|
|
3033
|
-
function
|
|
3028
|
+
function Gl() {
|
|
3034
3029
|
const t = typeof import.meta < "u" ? me?.VITE_IKON_AUTH_URL : void 0;
|
|
3035
3030
|
return t || (typeof window > "u" ? ot : !Qe() || window.location.hostname.includes(".dev.") ? at : ot);
|
|
3036
3031
|
}
|
|
@@ -3042,11 +3037,11 @@ function Rr() {
|
|
|
3042
3037
|
e[r] = n;
|
|
3043
3038
|
return e;
|
|
3044
3039
|
}
|
|
3045
|
-
const
|
|
3046
|
-
function
|
|
3047
|
-
return typeof window > "u" ? void 0 : new URLSearchParams(window.location.search).get(
|
|
3040
|
+
const Ha = ["ikon_token", "ikon_provider", "error"], $a = "ikon_server_url";
|
|
3041
|
+
function Ka() {
|
|
3042
|
+
return typeof window > "u" ? void 0 : new URLSearchParams(window.location.search).get($a) ?? void 0;
|
|
3048
3043
|
}
|
|
3049
|
-
function
|
|
3044
|
+
function Vl() {
|
|
3050
3045
|
if (typeof window > "u")
|
|
3051
3046
|
return { parameters: {} };
|
|
3052
3047
|
const t = window.location.pathname;
|
|
@@ -3058,7 +3053,7 @@ function Wl() {
|
|
|
3058
3053
|
throw new Error("URL cannot contain both /s/[sessionId] and /c/[channelKey]");
|
|
3059
3054
|
const i = Rr(), o = {};
|
|
3060
3055
|
for (const [a, c] of Object.entries(i))
|
|
3061
|
-
|
|
3056
|
+
Ha.includes(a) || (o[a] = c);
|
|
3062
3057
|
return { sessionId: e, channelKey: r, parameters: o };
|
|
3063
3058
|
}
|
|
3064
3059
|
function Qe() {
|
|
@@ -3073,8 +3068,8 @@ function Qe() {
|
|
|
3073
3068
|
}
|
|
3074
3069
|
return !0;
|
|
3075
3070
|
}
|
|
3076
|
-
const Te = M("Authenticator"), z = S.GROUP_CORE | S.GROUP_KEEPALIVE | S.GROUP_EVENTS | S.GROUP_ACTIONS | S.GROUP_UI | S.GROUP_AUDIO | S.GROUP_VIDEO | S.GROUP_ANALYTICS,
|
|
3077
|
-
async function
|
|
3071
|
+
const Te = M("Authenticator"), z = S.GROUP_CORE | S.GROUP_KEEPALIVE | S.GROUP_EVENTS | S.GROUP_ACTIONS | S.GROUP_UI | S.GROUP_AUDIO | S.GROUP_VIDEO | S.GROUP_ANALYTICS, Ya = 1e3, ja = 5e3;
|
|
3072
|
+
async function za(t) {
|
|
3078
3073
|
try {
|
|
3079
3074
|
const e = await fetch(`${_e}/users/me`, {
|
|
3080
3075
|
credentials: "include",
|
|
@@ -3110,7 +3105,7 @@ async function kr(t, e, r, n, s, i, o) {
|
|
|
3110
3105
|
}
|
|
3111
3106
|
return await l.json();
|
|
3112
3107
|
}
|
|
3113
|
-
async function
|
|
3108
|
+
async function Xa(t, e, r, n) {
|
|
3114
3109
|
const s = `${t}/rooms/connect`, i = await fetch(s, br(e, r, n));
|
|
3115
3110
|
if (!i.ok) {
|
|
3116
3111
|
const o = await i.text().catch(() => "Unknown error");
|
|
@@ -3120,17 +3115,17 @@ async function Ja(t, e, r, n) {
|
|
|
3120
3115
|
}
|
|
3121
3116
|
async function Ur(t, e, r, n, s) {
|
|
3122
3117
|
const i = Date.now();
|
|
3123
|
-
let o =
|
|
3118
|
+
let o = Ya;
|
|
3124
3119
|
for (; ; ) {
|
|
3125
3120
|
if (s?.aborted)
|
|
3126
3121
|
throw new g("Connection aborted");
|
|
3127
3122
|
if (Date.now() - i >= r)
|
|
3128
|
-
throw new
|
|
3129
|
-
const c = await
|
|
3123
|
+
throw new Da(r);
|
|
3124
|
+
const c = await Xa(t, e, n, s), l = c.state?.toLowerCase();
|
|
3130
3125
|
if (l === "running")
|
|
3131
3126
|
return c;
|
|
3132
3127
|
if (l === "provisioning") {
|
|
3133
|
-
await Ar(o, s), o = Math.min(o * 1.5,
|
|
3128
|
+
await Ar(o, s), o = Math.min(o * 1.5, ja);
|
|
3134
3129
|
continue;
|
|
3135
3130
|
}
|
|
3136
3131
|
throw new g(`Unexpected channel state: ${c.state}`);
|
|
@@ -3145,7 +3140,7 @@ async function ne(t, e) {
|
|
|
3145
3140
|
const n = await r.arrayBuffer(), s = new Uint8Array(n);
|
|
3146
3141
|
return { authResponse: await Ms(s) };
|
|
3147
3142
|
}
|
|
3148
|
-
function
|
|
3143
|
+
function Ja(t, e) {
|
|
3149
3144
|
return vs({
|
|
3150
3145
|
ServerSessionId: "",
|
|
3151
3146
|
// Server will fill this in
|
|
@@ -3173,7 +3168,7 @@ function Qa(t, e) {
|
|
|
3173
3168
|
Parameters: t.parameters ?? {}
|
|
3174
3169
|
});
|
|
3175
3170
|
}
|
|
3176
|
-
function
|
|
3171
|
+
function Qa(t) {
|
|
3177
3172
|
return {
|
|
3178
3173
|
ServerSessionId: t.ServerSessionId,
|
|
3179
3174
|
ContextType: t.ContextType,
|
|
@@ -3200,13 +3195,13 @@ function Za(t) {
|
|
|
3200
3195
|
Parameters: t.Parameters
|
|
3201
3196
|
};
|
|
3202
3197
|
}
|
|
3203
|
-
async function
|
|
3198
|
+
async function Za(t, e) {
|
|
3204
3199
|
const r = `https://${t.host}:${t.httpsPort}`;
|
|
3205
3200
|
Te.debug(`Authenticating with local server: ${r}`);
|
|
3206
3201
|
const s = { ...Rr(), ...t.parameters };
|
|
3207
3202
|
let i = t.userId;
|
|
3208
|
-
i || (i = await
|
|
3209
|
-
const o =
|
|
3203
|
+
i || (i = await za(e), i || (i = "local", Te.warn('Could not determine user ID. Using fallback "local". To fix: either provide userId in config, or log in to the Ikon portal at https://portal.dev.ikon.live')));
|
|
3204
|
+
const o = Ja({ ...t, parameters: s }, i), a = Qa(o), c = await fetch(`${r}/connect-token`, {
|
|
3210
3205
|
method: "POST",
|
|
3211
3206
|
headers: {
|
|
3212
3207
|
"Content-Type": "application/json"
|
|
@@ -3224,7 +3219,7 @@ async function qa(t, e) {
|
|
|
3224
3219
|
const d = `${r}/connect?token=${encodeURIComponent(E)}`;
|
|
3225
3220
|
return ne(d, e);
|
|
3226
3221
|
}
|
|
3227
|
-
async function
|
|
3222
|
+
async function qa(t, e) {
|
|
3228
3223
|
if (t.sessionId && t.channelKey)
|
|
3229
3224
|
throw new g("Cannot specify both sessionId and channelKey. Use sessionId for precomputed sessions or channelKey to select a channel.");
|
|
3230
3225
|
const r = Cr(t.backendType);
|
|
@@ -3284,7 +3279,7 @@ async function ec(t, e) {
|
|
|
3284
3279
|
const d = E.configuration.url;
|
|
3285
3280
|
return ne(d, e);
|
|
3286
3281
|
}
|
|
3287
|
-
async function
|
|
3282
|
+
async function ec(t, e) {
|
|
3288
3283
|
if (t.sessionId && t.channelKey)
|
|
3289
3284
|
throw new g("Cannot specify both sessionId and channelKey. Use sessionId for precomputed sessions or channelKey to select a channel.");
|
|
3290
3285
|
const r = Cr(t.backendType), n = t.token;
|
|
@@ -3325,22 +3320,22 @@ async function tc(t, e) {
|
|
|
3325
3320
|
const l = c.configuration.url;
|
|
3326
3321
|
return ne(l, e);
|
|
3327
3322
|
}
|
|
3328
|
-
const Dr = "ikon.theme", Le = "ikon.theme-user",
|
|
3323
|
+
const Dr = "ikon.theme", Le = "ikon.theme-user", tc = "ikon.theme-change";
|
|
3329
3324
|
function Mr(t) {
|
|
3330
3325
|
typeof document < "u" && document.documentElement && document.documentElement.setAttribute("data-theme", t);
|
|
3331
3326
|
}
|
|
3332
|
-
const
|
|
3327
|
+
const rc = {
|
|
3333
3328
|
name: "ikon.client.getTheme",
|
|
3334
3329
|
description: "Get the currently selected client theme",
|
|
3335
3330
|
returnType: { kind: "string", nullable: !0 }
|
|
3336
3331
|
};
|
|
3337
|
-
function
|
|
3332
|
+
function nc() {
|
|
3338
3333
|
if (typeof window > "u" || !window.localStorage)
|
|
3339
3334
|
return null;
|
|
3340
3335
|
const t = window.localStorage.getItem(Le) ?? window.localStorage.getItem(Dr) ?? "light";
|
|
3341
3336
|
return Mr(t), t;
|
|
3342
3337
|
}
|
|
3343
|
-
const
|
|
3338
|
+
const sc = {
|
|
3344
3339
|
name: "ikon.client.setTheme",
|
|
3345
3340
|
description: "Update the client UI theme",
|
|
3346
3341
|
returnType: { kind: "boolean" },
|
|
@@ -3349,7 +3344,7 @@ const ic = {
|
|
|
3349
3344
|
{ name: "persist", type: { kind: "boolean", nullable: !0 }, description: "Whether to persist as user preference" }
|
|
3350
3345
|
]
|
|
3351
3346
|
};
|
|
3352
|
-
function
|
|
3347
|
+
function ic(t, e) {
|
|
3353
3348
|
if (typeof window > "u" || !window.localStorage || typeof t != "string")
|
|
3354
3349
|
return !1;
|
|
3355
3350
|
const r = t.trim().toLowerCase();
|
|
@@ -3358,40 +3353,40 @@ function oc(t, e) {
|
|
|
3358
3353
|
const n = e === void 0 ? !0 : !!e, s = window.localStorage;
|
|
3359
3354
|
n ? s.setItem(Le, r) : s.removeItem(Le), s.setItem(Dr, r);
|
|
3360
3355
|
try {
|
|
3361
|
-
window.dispatchEvent(new CustomEvent(
|
|
3356
|
+
window.dispatchEvent(new CustomEvent(tc, { detail: { mode: r } }));
|
|
3362
3357
|
} catch {
|
|
3363
3358
|
}
|
|
3364
3359
|
return Mr(r), !0;
|
|
3365
3360
|
}
|
|
3366
|
-
const
|
|
3361
|
+
const oc = {
|
|
3367
3362
|
name: "ikon.client.getLanguage",
|
|
3368
3363
|
description: "Get the browser language preference",
|
|
3369
3364
|
returnType: { kind: "string" }
|
|
3370
3365
|
};
|
|
3371
|
-
function
|
|
3366
|
+
function ac() {
|
|
3372
3367
|
return typeof navigator > "u" ? "en-US" : navigator.language || "en-US";
|
|
3373
3368
|
}
|
|
3374
|
-
const
|
|
3369
|
+
const cc = {
|
|
3375
3370
|
name: "ikon.client.getTimezone",
|
|
3376
3371
|
description: "Get the browser timezone (IANA format)",
|
|
3377
3372
|
returnType: { kind: "string" }
|
|
3378
3373
|
};
|
|
3379
|
-
function
|
|
3374
|
+
function lc() {
|
|
3380
3375
|
try {
|
|
3381
3376
|
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
3382
3377
|
} catch {
|
|
3383
3378
|
return "UTC";
|
|
3384
3379
|
}
|
|
3385
3380
|
}
|
|
3386
|
-
const
|
|
3381
|
+
const uc = {
|
|
3387
3382
|
name: "ikon.client.getUrl",
|
|
3388
3383
|
description: "Get the current browser URL path and query string",
|
|
3389
3384
|
returnType: { kind: "string", nullable: !0 }
|
|
3390
3385
|
};
|
|
3391
|
-
function
|
|
3386
|
+
function hc() {
|
|
3392
3387
|
return typeof window > "u" ? null : window.location.pathname + window.location.search;
|
|
3393
3388
|
}
|
|
3394
|
-
const
|
|
3389
|
+
const dc = {
|
|
3395
3390
|
name: "ikon.client.setUrl",
|
|
3396
3391
|
description: "Update the browser URL without triggering a page reload",
|
|
3397
3392
|
returnType: { kind: "boolean" },
|
|
@@ -3400,7 +3395,7 @@ const fc = {
|
|
|
3400
3395
|
{ name: "replace", type: { kind: "boolean", nullable: !0 }, description: "If true, replaces current history entry instead of adding new one" }
|
|
3401
3396
|
]
|
|
3402
3397
|
};
|
|
3403
|
-
function
|
|
3398
|
+
function fc(t, e) {
|
|
3404
3399
|
if (typeof window > "u" || !window.history || typeof t != "string")
|
|
3405
3400
|
return !1;
|
|
3406
3401
|
const r = t.trim();
|
|
@@ -3412,13 +3407,13 @@ function Ec(t, e) {
|
|
|
3412
3407
|
return !1;
|
|
3413
3408
|
}
|
|
3414
3409
|
}
|
|
3415
|
-
const
|
|
3410
|
+
const Ec = {
|
|
3416
3411
|
name: "ikon.client.vibrate",
|
|
3417
3412
|
description: "Trigger haptic feedback on supported devices",
|
|
3418
3413
|
returnType: { kind: "boolean" },
|
|
3419
3414
|
parameters: [{ name: "pattern", type: { kind: "string" }, description: 'Duration in ms, or comma-separated pattern (e.g., "200" or "100,50,100")' }]
|
|
3420
3415
|
};
|
|
3421
|
-
function
|
|
3416
|
+
function pc(t) {
|
|
3422
3417
|
if (typeof navigator > "u" || !navigator.vibrate || typeof t != "string")
|
|
3423
3418
|
return !1;
|
|
3424
3419
|
try {
|
|
@@ -3429,13 +3424,13 @@ function Ic(t) {
|
|
|
3429
3424
|
}
|
|
3430
3425
|
}
|
|
3431
3426
|
let re = null;
|
|
3432
|
-
const
|
|
3427
|
+
const Ic = {
|
|
3433
3428
|
name: "ikon.client.keepScreenAwake",
|
|
3434
3429
|
description: "Prevent or allow the screen to sleep",
|
|
3435
3430
|
returnType: { kind: "boolean" },
|
|
3436
3431
|
parameters: [{ name: "enabled", type: { kind: "boolean" }, description: "Whether to keep the screen awake" }]
|
|
3437
3432
|
};
|
|
3438
|
-
async function
|
|
3433
|
+
async function mc(t) {
|
|
3439
3434
|
if (typeof navigator > "u" || !("wakeLock" in navigator))
|
|
3440
3435
|
return !1;
|
|
3441
3436
|
try {
|
|
@@ -3444,15 +3439,15 @@ async function _c(t) {
|
|
|
3444
3439
|
return !1;
|
|
3445
3440
|
}
|
|
3446
3441
|
}
|
|
3447
|
-
const
|
|
3442
|
+
const _c = {
|
|
3448
3443
|
name: "ikon.client.getVisibility",
|
|
3449
3444
|
description: "Get the current page visibility state",
|
|
3450
3445
|
returnType: { kind: "string", nullable: !0 }
|
|
3451
3446
|
};
|
|
3452
|
-
function
|
|
3447
|
+
function Tc() {
|
|
3453
3448
|
return typeof document > "u" ? null : document.visibilityState || null;
|
|
3454
3449
|
}
|
|
3455
|
-
const
|
|
3450
|
+
const Sc = {
|
|
3456
3451
|
name: "ikon.client.scrollTo",
|
|
3457
3452
|
description: "Scroll the page to a specific position",
|
|
3458
3453
|
returnType: { kind: "boolean" },
|
|
@@ -3462,7 +3457,7 @@ const wc = {
|
|
|
3462
3457
|
{ name: "smooth", type: { kind: "boolean", nullable: !0 }, description: "Whether to animate the scroll" }
|
|
3463
3458
|
]
|
|
3464
3459
|
};
|
|
3465
|
-
function
|
|
3460
|
+
function wc(t, e, r) {
|
|
3466
3461
|
if (typeof window > "u" || typeof t != "number" || typeof e != "number")
|
|
3467
3462
|
return !1;
|
|
3468
3463
|
try {
|
|
@@ -3475,12 +3470,12 @@ function Ac(t, e, r) {
|
|
|
3475
3470
|
return !1;
|
|
3476
3471
|
}
|
|
3477
3472
|
}
|
|
3478
|
-
const
|
|
3473
|
+
const Ac = {
|
|
3479
3474
|
name: "ikon.client.getBatteryLevel",
|
|
3480
3475
|
description: "Get the current battery level (0-100)",
|
|
3481
3476
|
returnType: { kind: "number", nullable: !0 }
|
|
3482
3477
|
};
|
|
3483
|
-
async function
|
|
3478
|
+
async function yc() {
|
|
3484
3479
|
if (typeof navigator > "u" || !("getBattery" in navigator))
|
|
3485
3480
|
return null;
|
|
3486
3481
|
try {
|
|
@@ -3490,39 +3485,39 @@ async function gc() {
|
|
|
3490
3485
|
return null;
|
|
3491
3486
|
}
|
|
3492
3487
|
}
|
|
3493
|
-
const
|
|
3488
|
+
const gc = {
|
|
3494
3489
|
name: "ikon.client.getNetworkType",
|
|
3495
3490
|
description: "Get the current network connection type",
|
|
3496
3491
|
returnType: { kind: "string", nullable: !0 }
|
|
3497
3492
|
};
|
|
3498
|
-
function
|
|
3493
|
+
function Nc() {
|
|
3499
3494
|
if (typeof navigator > "u")
|
|
3500
3495
|
return null;
|
|
3501
3496
|
const t = navigator.connection;
|
|
3502
3497
|
return t && (t.effectiveType || t.type) || null;
|
|
3503
3498
|
}
|
|
3504
|
-
const
|
|
3505
|
-
{ definition:
|
|
3506
|
-
{ definition:
|
|
3507
|
-
{ definition:
|
|
3508
|
-
{ definition:
|
|
3509
|
-
{ definition:
|
|
3510
|
-
{ definition:
|
|
3511
|
-
{ definition:
|
|
3512
|
-
{ definition:
|
|
3513
|
-
{ definition:
|
|
3514
|
-
{ definition:
|
|
3515
|
-
{ definition:
|
|
3516
|
-
{ definition:
|
|
3499
|
+
const Cc = [
|
|
3500
|
+
{ definition: rc, handler: nc },
|
|
3501
|
+
{ definition: sc, handler: ic },
|
|
3502
|
+
{ definition: oc, handler: ac },
|
|
3503
|
+
{ definition: cc, handler: lc },
|
|
3504
|
+
{ definition: uc, handler: hc },
|
|
3505
|
+
{ definition: dc, handler: fc },
|
|
3506
|
+
{ definition: Ec, handler: pc },
|
|
3507
|
+
{ definition: Ic, handler: mc },
|
|
3508
|
+
{ definition: _c, handler: Tc },
|
|
3509
|
+
{ definition: Sc, handler: wc },
|
|
3510
|
+
{ definition: Ac, handler: yc },
|
|
3511
|
+
{ definition: gc, handler: Nc }
|
|
3517
3512
|
];
|
|
3518
|
-
function
|
|
3519
|
-
const e =
|
|
3513
|
+
function Rc(t) {
|
|
3514
|
+
const e = Cc.map(({ definition: r, handler: n }) => t.register(r, n));
|
|
3520
3515
|
return () => e.forEach((r) => r());
|
|
3521
3516
|
}
|
|
3522
3517
|
function ct() {
|
|
3523
3518
|
return typeof window < "u" && typeof navigator < "u";
|
|
3524
3519
|
}
|
|
3525
|
-
const
|
|
3520
|
+
const bc = new Uint8Array(0);
|
|
3526
3521
|
function Se(t) {
|
|
3527
3522
|
switch (t.kind) {
|
|
3528
3523
|
case "array":
|
|
@@ -3582,7 +3577,7 @@ function Or(t, e) {
|
|
|
3582
3577
|
}
|
|
3583
3578
|
return JSON.stringify(t);
|
|
3584
3579
|
}
|
|
3585
|
-
function
|
|
3580
|
+
function kc(t, e) {
|
|
3586
3581
|
const r = (t.parameters ?? []).map((i) => {
|
|
3587
3582
|
const o = Se(i.type), a = Object.prototype.hasOwnProperty.call(i, "defaultValue"), c = a ? Or(i.defaultValue, o) : "";
|
|
3588
3583
|
return {
|
|
@@ -3609,7 +3604,7 @@ function Uc(t, e) {
|
|
|
3609
3604
|
TypeName: se(i.descriptor),
|
|
3610
3605
|
HasDefaultValue: i.hasDefaultValue,
|
|
3611
3606
|
DefaultValueJson: i.defaultValueJson,
|
|
3612
|
-
DefaultValueData:
|
|
3607
|
+
DefaultValueData: bc,
|
|
3613
3608
|
IsEnumerable: !1,
|
|
3614
3609
|
EnumerableItemTypeName: "",
|
|
3615
3610
|
Description: i.description ?? ""
|
|
@@ -3623,11 +3618,11 @@ function Uc(t, e) {
|
|
|
3623
3618
|
returnType: n
|
|
3624
3619
|
};
|
|
3625
3620
|
}
|
|
3626
|
-
const ge = M("FunctionRegistry"),
|
|
3627
|
-
function
|
|
3621
|
+
const ge = M("FunctionRegistry"), Uc = new Uint8Array(0);
|
|
3622
|
+
function Dc(t) {
|
|
3628
3623
|
return !t || typeof t != "object" ? !1 : t.data instanceof Uint8Array;
|
|
3629
3624
|
}
|
|
3630
|
-
class
|
|
3625
|
+
class Mc {
|
|
3631
3626
|
functions = /* @__PURE__ */ new Map();
|
|
3632
3627
|
remoteFunctions = /* @__PURE__ */ new Map();
|
|
3633
3628
|
config = null;
|
|
@@ -3650,7 +3645,7 @@ class Oc {
|
|
|
3650
3645
|
* If already connected, sends registration to server immediately.
|
|
3651
3646
|
*/
|
|
3652
3647
|
register(e, r) {
|
|
3653
|
-
const n =
|
|
3648
|
+
const n = kc(e, r);
|
|
3654
3649
|
return this.functions.set(e.name, n), this.isConnected && this.config && this.sendRegistration(n), () => this.unregister(e.name);
|
|
3655
3650
|
}
|
|
3656
3651
|
/**
|
|
@@ -3754,7 +3749,7 @@ class Oc {
|
|
|
3754
3749
|
sendAllRegistrations() {
|
|
3755
3750
|
if (!this.config || this.functions.size === 0)
|
|
3756
3751
|
return;
|
|
3757
|
-
const e = Array.from(this.functions.values()).map((s) => s.registerPayload), r =
|
|
3752
|
+
const e = Array.from(this.functions.values()).map((s) => s.registerPayload), r = vi({ Functions: e }), n = xi(r, this.config.sessionId);
|
|
3758
3753
|
this.config.sendProtocolMessage(n);
|
|
3759
3754
|
}
|
|
3760
3755
|
/**
|
|
@@ -3763,14 +3758,14 @@ class Oc {
|
|
|
3763
3758
|
sendRegistration(e) {
|
|
3764
3759
|
if (!this.config)
|
|
3765
3760
|
return;
|
|
3766
|
-
const r =
|
|
3761
|
+
const r = Ci(e.registerPayload, this.config.sessionId);
|
|
3767
3762
|
this.config.sendProtocolMessage(r);
|
|
3768
3763
|
}
|
|
3769
3764
|
/**
|
|
3770
3765
|
* Handle an incoming function call.
|
|
3771
3766
|
*/
|
|
3772
3767
|
async handleFunctionCall(e, r) {
|
|
3773
|
-
const n = await
|
|
3768
|
+
const n = await ri(e), s = this.functions.get(n.FunctionName);
|
|
3774
3769
|
if (!s) {
|
|
3775
3770
|
ge.warn(`Received call for unknown function: ${n.FunctionName}`), this.sendError(n.CallId, n.InstanceId, r, new Error(`Unknown function: ${n.FunctionName}`));
|
|
3776
3771
|
return;
|
|
@@ -3788,8 +3783,8 @@ class Oc {
|
|
|
3788
3783
|
h === void 0 || h === "" ? E.hasDefaultValue ? s.push(lt(E.defaultValueJson, E.descriptor)) : s.push(void 0) : s.push(lt(h, E.descriptor));
|
|
3789
3784
|
}
|
|
3790
3785
|
const i = await e.handler(...s);
|
|
3791
|
-
let o = i, a =
|
|
3792
|
-
|
|
3786
|
+
let o = i, a = Uc;
|
|
3787
|
+
Dc(i) && (o = i.value, a = new Uint8Array(i.data));
|
|
3793
3788
|
const c = Or(o, e.returnType);
|
|
3794
3789
|
this.sendResult(r.CallId, r.InstanceId, n, e, c, a);
|
|
3795
3790
|
} catch (s) {
|
|
@@ -3811,8 +3806,8 @@ class Oc {
|
|
|
3811
3806
|
sendResult(e, r, n, s, i, o) {
|
|
3812
3807
|
if (!this.config)
|
|
3813
3808
|
return;
|
|
3814
|
-
const a =
|
|
3815
|
-
|
|
3809
|
+
const a = Ji(
|
|
3810
|
+
Yi({
|
|
3816
3811
|
CallId: e,
|
|
3817
3812
|
InstanceId: r,
|
|
3818
3813
|
ResultTypeName: se(s.returnType),
|
|
@@ -3830,8 +3825,8 @@ class Oc {
|
|
|
3830
3825
|
sendError(e, r, n, s) {
|
|
3831
3826
|
if (!this.config)
|
|
3832
3827
|
return;
|
|
3833
|
-
const i =
|
|
3834
|
-
|
|
3828
|
+
const i = Si(
|
|
3829
|
+
Ii({
|
|
3835
3830
|
CallId: e,
|
|
3836
3831
|
InstanceId: r,
|
|
3837
3832
|
ErrorMessage: s.message,
|
|
@@ -3844,7 +3839,7 @@ class Oc {
|
|
|
3844
3839
|
this.config.sendProtocolMessage(i);
|
|
3845
3840
|
}
|
|
3846
3841
|
}
|
|
3847
|
-
function
|
|
3842
|
+
function Oc(t, e) {
|
|
3848
3843
|
return { value: t, data: e };
|
|
3849
3844
|
}
|
|
3850
3845
|
function Ne(t) {
|
|
@@ -3860,7 +3855,7 @@ const ye = {
|
|
|
3860
3855
|
StartAudioCapture: "ikon.client.startAudioCapture",
|
|
3861
3856
|
StopCapture: "ikon.client.stopCapture",
|
|
3862
3857
|
CaptureImage: "ikon.client.captureImage"
|
|
3863
|
-
},
|
|
3858
|
+
}, Lc = {
|
|
3864
3859
|
name: ye.StartVideoCapture,
|
|
3865
3860
|
description: "Start camera or screen capture and stream video frames to the server",
|
|
3866
3861
|
returnType: { kind: "string" },
|
|
@@ -3868,26 +3863,26 @@ const ye = {
|
|
|
3868
3863
|
{ name: "source", type: { kind: "string", nullable: !0 }, description: "camera or screen" },
|
|
3869
3864
|
{ name: "optionsJson", type: { kind: "string", nullable: !0 }, description: "JSON encoded capture options" }
|
|
3870
3865
|
]
|
|
3871
|
-
},
|
|
3866
|
+
}, vc = {
|
|
3872
3867
|
name: ye.StartAudioCapture,
|
|
3873
3868
|
description: "Start microphone capture and stream audio frames to the server",
|
|
3874
3869
|
returnType: { kind: "string" },
|
|
3875
3870
|
parameters: [{ name: "optionsJson", type: { kind: "string", nullable: !0 }, description: "JSON encoded capture options" }]
|
|
3876
|
-
},
|
|
3871
|
+
}, Fc = {
|
|
3877
3872
|
name: ye.StopCapture,
|
|
3878
3873
|
description: "Stop a previously started capture by captureId",
|
|
3879
3874
|
returnType: { kind: "boolean" },
|
|
3880
3875
|
parameters: [{ name: "captureId", type: { kind: "string" }, description: "Capture ID to stop" }]
|
|
3881
|
-
},
|
|
3876
|
+
}, Pc = {
|
|
3882
3877
|
name: ye.CaptureImage,
|
|
3883
3878
|
description: "Capture a single image from the camera and return metadata (JSON) plus binary image data",
|
|
3884
3879
|
returnType: { kind: "string" },
|
|
3885
3880
|
parameters: [{ name: "optionsJson", type: { kind: "string", nullable: !0 }, description: "JSON encoded capture options" }]
|
|
3886
3881
|
};
|
|
3887
|
-
function
|
|
3882
|
+
function Bc(t, e) {
|
|
3888
3883
|
const r = [];
|
|
3889
3884
|
return r.push(
|
|
3890
|
-
t.register(
|
|
3885
|
+
t.register(Lc, async (n, s) => {
|
|
3891
3886
|
const i = e.mediaCapture;
|
|
3892
3887
|
if (!i)
|
|
3893
3888
|
throw new Error("Media capture is not available in this environment");
|
|
@@ -3895,7 +3890,7 @@ function xc(t, e) {
|
|
|
3895
3890
|
return ((typeof n == "string" && n.trim().toLowerCase() === "screen" ? "screen" : "camera") === "screen" ? await i.video.startScreen({ userGesture: !1, options: o, constraints: o?.constraints }) : await i.video.startCamera({ userGesture: !1, options: o, constraints: o?.constraints })).captureId;
|
|
3896
3891
|
})
|
|
3897
3892
|
), r.push(
|
|
3898
|
-
t.register(
|
|
3893
|
+
t.register(vc, async (n) => {
|
|
3899
3894
|
const s = e.mediaCapture;
|
|
3900
3895
|
if (!s)
|
|
3901
3896
|
throw new Error("Media capture is not available in this environment");
|
|
@@ -3903,7 +3898,7 @@ function xc(t, e) {
|
|
|
3903
3898
|
return (await s.audio.startMic({ userGesture: !1, options: i, constraints: i?.constraints })).captureId;
|
|
3904
3899
|
})
|
|
3905
3900
|
), r.push(
|
|
3906
|
-
t.register(
|
|
3901
|
+
t.register(Fc, async (n) => {
|
|
3907
3902
|
const s = e.mediaCapture;
|
|
3908
3903
|
if (!s || typeof n != "string" || !n.trim())
|
|
3909
3904
|
return !1;
|
|
@@ -3911,7 +3906,7 @@ function xc(t, e) {
|
|
|
3911
3906
|
return i || o;
|
|
3912
3907
|
})
|
|
3913
3908
|
), r.push(
|
|
3914
|
-
t.register(
|
|
3909
|
+
t.register(Pc, async (n) => {
|
|
3915
3910
|
const s = e.mediaCapture;
|
|
3916
3911
|
if (!s)
|
|
3917
3912
|
throw new Error("Media capture is not available in this environment");
|
|
@@ -3923,7 +3918,7 @@ function xc(t, e) {
|
|
|
3923
3918
|
width: i.width,
|
|
3924
3919
|
height: i.height
|
|
3925
3920
|
}), a = JSON.stringify({ mime: o.mime, width: o.width, height: o.height });
|
|
3926
|
-
return
|
|
3921
|
+
return Oc(a, o.data);
|
|
3927
3922
|
})
|
|
3928
3923
|
), () => {
|
|
3929
3924
|
for (const n of r)
|
|
@@ -3935,13 +3930,13 @@ const Lr = () => {
|
|
|
3935
3930
|
return !1;
|
|
3936
3931
|
const t = navigator.userAgent, e = /iPad|iPhone|iPod/.test(t), r = t.includes("Macintosh") && typeof navigator.maxTouchPoints == "number" && navigator.maxTouchPoints > 1;
|
|
3937
3932
|
return e || r;
|
|
3938
|
-
}, le = M("Capabilities"),
|
|
3933
|
+
}, le = M("Capabilities"), xc = globalThis;
|
|
3939
3934
|
function de() {
|
|
3940
3935
|
if (typeof SharedArrayBuffer > "u")
|
|
3941
3936
|
return le.debug("SharedArrayBuffer not supported: SharedArrayBuffer is undefined"), !1;
|
|
3942
3937
|
if (typeof Atomics > "u")
|
|
3943
3938
|
return le.debug("SharedArrayBuffer not supported: Atomics is undefined"), !1;
|
|
3944
|
-
if (
|
|
3939
|
+
if (xc.crossOriginIsolated === !1)
|
|
3945
3940
|
return le.debug("SharedArrayBuffer not supported: crossOriginIsolated is false (missing COOP/COEP headers)"), !1;
|
|
3946
3941
|
try {
|
|
3947
3942
|
new SharedArrayBuffer(1);
|
|
@@ -3953,7 +3948,7 @@ function de() {
|
|
|
3953
3948
|
function vr(t) {
|
|
3954
3949
|
return typeof AudioWorkletNode != "function" ? !1 : typeof t.audioWorklet?.addModule == "function";
|
|
3955
3950
|
}
|
|
3956
|
-
function
|
|
3951
|
+
function Gc(t) {
|
|
3957
3952
|
return new Worker(
|
|
3958
3953
|
"" + new URL("assets/audio-playback-worker-CM2aCt54.js", import.meta.url).href,
|
|
3959
3954
|
{
|
|
@@ -3962,7 +3957,7 @@ function Vc(t) {
|
|
|
3962
3957
|
}
|
|
3963
3958
|
);
|
|
3964
3959
|
}
|
|
3965
|
-
const ue = 48e3, b = 2, Fr = 1500, ut = 512, ht = "playback",
|
|
3960
|
+
const ue = 48e3, b = 2, Fr = 1500, ut = 512, ht = "playback", Vc = 120, Wc = 300, Hc = 4, $c = 200, Kc = 100, Yc = 8e3, jc = 10, Pr = 100, ve = 50, Br = 128, zc = 20, Xc = !0, G = 1500, Jc = -20, Qc = -100, Zc = 200, A = M("IkonAudioPlayback"), qc = () => {
|
|
3966
3961
|
if (typeof navigator > "u" || typeof window > "u")
|
|
3967
3962
|
return !1;
|
|
3968
3963
|
const t = navigator.userAgent, e = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(t), r = t.includes("Macintosh") && typeof navigator.maxTouchPoints == "number" && navigator.maxTouchPoints > 1;
|
|
@@ -3974,19 +3969,19 @@ const ue = 48e3, b = 2, Fr = 1500, ut = 512, ht = "playback", Wc = 120, Hc = 300
|
|
|
3974
3969
|
function V(t) {
|
|
3975
3970
|
return t instanceof Error ? `${t.name}: ${t.message}` : String(t);
|
|
3976
3971
|
}
|
|
3977
|
-
function
|
|
3972
|
+
function el(t) {
|
|
3978
3973
|
return `
|
|
3979
3974
|
// Audio buffer constants
|
|
3980
3975
|
const OUTPUT_SAMPLE_RATE_HZ = ${t.outputSampleRateHz};
|
|
3981
3976
|
const DEFAULT_FRAME_SAMPLES_PER_CHANNEL = Math.max(1, Math.round(OUTPUT_SAMPLE_RATE_HZ * 0.02));
|
|
3982
|
-
const BUFFER_TARGET_MIN_MS = ${
|
|
3983
|
-
const BUFFER_TARGET_MAX_MS = ${
|
|
3984
|
-
const JITTER_MULTIPLIER = ${
|
|
3977
|
+
const BUFFER_TARGET_MIN_MS = ${Vc};
|
|
3978
|
+
const BUFFER_TARGET_MAX_MS = ${Wc};
|
|
3979
|
+
const JITTER_MULTIPLIER = ${Hc};
|
|
3985
3980
|
const LOCAL_BUFFER_MAX_MS = ${Fr};
|
|
3986
|
-
const CONTROL_PERIOD_MS = ${
|
|
3987
|
-
const UNDERRUN_JUMP_MS = ${
|
|
3988
|
-
const STABLE_TIME_TO_DECREASE_MS = ${
|
|
3989
|
-
const DECREASE_STEP_MS = ${
|
|
3981
|
+
const CONTROL_PERIOD_MS = ${$c};
|
|
3982
|
+
const UNDERRUN_JUMP_MS = ${Kc};
|
|
3983
|
+
const STABLE_TIME_TO_DECREASE_MS = ${Yc};
|
|
3984
|
+
const DECREASE_STEP_MS = ${jc};
|
|
3990
3985
|
const DEFAULT_STATS_INTERVAL_SAMPLES = OUTPUT_SAMPLE_RATE_HZ;
|
|
3991
3986
|
|
|
3992
3987
|
// Pre-computed reciprocals for division-free calculations
|
|
@@ -4005,7 +4000,7 @@ const FADE_OUT_INCREMENT = 1.0 / FADE_OUT_DURATION_SAMPLES;
|
|
|
4005
4000
|
const RENDER_QUANTUM_SIZE = ${Br};
|
|
4006
4001
|
|
|
4007
4002
|
// Buffer reduction crossfade constants (align to quantum boundary to avoid partial quanta)
|
|
4008
|
-
const BUFFER_REDUCTION_CROSSFADE_MS = ${
|
|
4003
|
+
const BUFFER_REDUCTION_CROSSFADE_MS = ${zc};
|
|
4009
4004
|
const BUFFER_REDUCTION_CROSSFADE_SAMPLES_RAW = Math.round(OUTPUT_SAMPLE_RATE_HZ * BUFFER_REDUCTION_CROSSFADE_MS / 1000);
|
|
4010
4005
|
const BUFFER_REDUCTION_CROSSFADE_SAMPLES = Math.ceil(BUFFER_REDUCTION_CROSSFADE_SAMPLES_RAW / RENDER_QUANTUM_SIZE) * RENDER_QUANTUM_SIZE;
|
|
4011
4006
|
|
|
@@ -4216,7 +4211,7 @@ class IkonAudioPlayerProcessor extends AudioWorkletProcessor {
|
|
|
4216
4211
|
this.statsIntervalSamples = Math.max(1, Math.round((OUTPUT_SAMPLE_RATE_HZ * statusIntervalMs) / 1000));
|
|
4217
4212
|
|
|
4218
4213
|
// Normalization config (hardcoded)
|
|
4219
|
-
this.normalizationEnabled = ${
|
|
4214
|
+
this.normalizationEnabled = ${Xc};
|
|
4220
4215
|
|
|
4221
4216
|
// Stream states for audio buffer
|
|
4222
4217
|
this.streams = new Map();
|
|
@@ -4899,7 +4894,7 @@ class Ze {
|
|
|
4899
4894
|
config;
|
|
4900
4895
|
enabled = !1;
|
|
4901
4896
|
stateUnsubscribe = null;
|
|
4902
|
-
isMobile =
|
|
4897
|
+
isMobile = qc();
|
|
4903
4898
|
boundVisibilityChange = null;
|
|
4904
4899
|
boundPageHide = null;
|
|
4905
4900
|
unlockHandler = null;
|
|
@@ -5333,7 +5328,7 @@ class Ze {
|
|
|
5333
5328
|
URL.revokeObjectURL(this.workletModuleUrl);
|
|
5334
5329
|
} catch {
|
|
5335
5330
|
}
|
|
5336
|
-
this.workletModuleKey = i, this.workletReady = null, this.workletModuleUrl = URL.createObjectURL(new Blob([
|
|
5331
|
+
this.workletModuleKey = i, this.workletReady = null, this.workletModuleUrl = URL.createObjectURL(new Blob([el({ outputSampleRateHz: this.outputSampleRateHz, outputChannels: b })], { type: "text/javascript" }));
|
|
5337
5332
|
}
|
|
5338
5333
|
this.workletReady || (this.workletReady = e.audioWorklet.addModule(this.workletModuleUrl).catch((E) => {
|
|
5339
5334
|
throw A.warn(`Failed to load AudioWorklet module, falling back: ${V(E)}`), E;
|
|
@@ -5584,7 +5579,7 @@ class Ze {
|
|
|
5584
5579
|
}
|
|
5585
5580
|
this.protocolPort = e;
|
|
5586
5581
|
try {
|
|
5587
|
-
this.audioWorker = new
|
|
5582
|
+
this.audioWorker = new Gc();
|
|
5588
5583
|
} catch (d) {
|
|
5589
5584
|
A.warn(`Failed to create audio worker: ${V(d)}`), this.protocolPort.close(), this.protocolPort = null;
|
|
5590
5585
|
return;
|
|
@@ -5668,7 +5663,7 @@ class Ze {
|
|
|
5668
5663
|
s.epochTimestampSamples = e.timestampInterleavedSamples;
|
|
5669
5664
|
const c = this.audioContext;
|
|
5670
5665
|
if (c) {
|
|
5671
|
-
const l = (c.outputLatency ?? 0) + (c.baseLatency ?? 0), E =
|
|
5666
|
+
const l = (c.outputLatency ?? 0) + (c.baseLatency ?? 0), E = Jc + l * 1e3, d = Math.min(Zc, Math.max(Qc, E));
|
|
5672
5667
|
s.playbackStartContextTime = c.currentTime + d / 1e3;
|
|
5673
5668
|
}
|
|
5674
5669
|
s.timingEstablished = !0;
|
|
@@ -5791,7 +5786,7 @@ class Ze {
|
|
|
5791
5786
|
}));
|
|
5792
5787
|
}
|
|
5793
5788
|
}
|
|
5794
|
-
function
|
|
5789
|
+
function tl(t) {
|
|
5795
5790
|
return new Worker(
|
|
5796
5791
|
"" + new URL("assets/video-playback-worker-C7sQMgD-.js", import.meta.url).href,
|
|
5797
5792
|
{
|
|
@@ -5804,7 +5799,7 @@ const W = M("IkonVideoPlayback");
|
|
|
5804
5799
|
function Ce(t) {
|
|
5805
5800
|
return t instanceof Error ? `${t.name}: ${t.message}` : String(t);
|
|
5806
5801
|
}
|
|
5807
|
-
class
|
|
5802
|
+
class rl {
|
|
5808
5803
|
client;
|
|
5809
5804
|
config;
|
|
5810
5805
|
enabled = !0;
|
|
@@ -5879,7 +5874,7 @@ class nl {
|
|
|
5879
5874
|
}
|
|
5880
5875
|
let e;
|
|
5881
5876
|
try {
|
|
5882
|
-
e = new
|
|
5877
|
+
e = new tl();
|
|
5883
5878
|
} catch (r) {
|
|
5884
5879
|
W.warn(`Failed to create video worker: ${Ce(r)}`);
|
|
5885
5880
|
return;
|
|
@@ -5968,7 +5963,7 @@ class nl {
|
|
|
5968
5963
|
const r = this.parseStreamId(e);
|
|
5969
5964
|
if (!r)
|
|
5970
5965
|
return;
|
|
5971
|
-
const n =
|
|
5966
|
+
const n = ka(Ra(), this.client.sessionId ?? 0, {
|
|
5972
5967
|
trackId: r.trackId,
|
|
5973
5968
|
targetIds: [r.senderId]
|
|
5974
5969
|
});
|
|
@@ -6028,11 +6023,11 @@ class nl {
|
|
|
6028
6023
|
}));
|
|
6029
6024
|
}
|
|
6030
6025
|
}
|
|
6031
|
-
class
|
|
6026
|
+
class nl {
|
|
6032
6027
|
audio;
|
|
6033
6028
|
video;
|
|
6034
6029
|
constructor(e, r) {
|
|
6035
|
-
this.audio = new Ze(e, r?.audio), this.video = new
|
|
6030
|
+
this.audio = new Ze(e, r?.audio), this.video = new rl(e, r?.video), r?.mediaSession && this.audio.setMediaSession(r.mediaSession);
|
|
6036
6031
|
}
|
|
6037
6032
|
/**
|
|
6038
6033
|
* Releases media resources (workers, audio graph, decoders).
|
|
@@ -6043,7 +6038,7 @@ class sl {
|
|
|
6043
6038
|
this.audio.dispose(), this.video.dispose();
|
|
6044
6039
|
}
|
|
6045
6040
|
}
|
|
6046
|
-
class
|
|
6041
|
+
class sl {
|
|
6047
6042
|
static getStorageForCapacity(e, r) {
|
|
6048
6043
|
const n = Int32Array.BYTES_PER_ELEMENT * 2, s = r.BYTES_PER_ELEMENT * e;
|
|
6049
6044
|
return new SharedArrayBuffer(n + s);
|
|
@@ -6097,7 +6092,7 @@ class il {
|
|
|
6097
6092
|
return n = (n + r) % this.capacity, Atomics.store(this.readWrite, 0, n), r;
|
|
6098
6093
|
}
|
|
6099
6094
|
}
|
|
6100
|
-
function
|
|
6095
|
+
function il(t) {
|
|
6101
6096
|
return new Worker(
|
|
6102
6097
|
"" + new URL("assets/audio-capture-worker-D0tD-mzj.js", import.meta.url).href,
|
|
6103
6098
|
{
|
|
@@ -6107,11 +6102,11 @@ function ol(t) {
|
|
|
6107
6102
|
);
|
|
6108
6103
|
}
|
|
6109
6104
|
const ft = M("IkonAudioCapture");
|
|
6110
|
-
function
|
|
6105
|
+
function ol() {
|
|
6111
6106
|
const t = globalThis.crypto;
|
|
6112
6107
|
return t?.randomUUID ? t.randomUUID() : `cap_${Date.now()}_${Math.floor(Math.random() * 1e9)}`;
|
|
6113
6108
|
}
|
|
6114
|
-
function
|
|
6109
|
+
function al() {
|
|
6115
6110
|
return `
|
|
6116
6111
|
class RingBuffer {
|
|
6117
6112
|
static getStorageForCapacity(capacity, type) {
|
|
@@ -6240,7 +6235,7 @@ class IkonAudioCaptureProcessor extends AudioWorkletProcessor {
|
|
|
6240
6235
|
registerProcessor('ikon-audio-capture', IkonAudioCaptureProcessor);
|
|
6241
6236
|
`;
|
|
6242
6237
|
}
|
|
6243
|
-
class
|
|
6238
|
+
class cl {
|
|
6244
6239
|
constructor(e, r) {
|
|
6245
6240
|
this.client = e, this.config = r ?? {};
|
|
6246
6241
|
}
|
|
@@ -6260,7 +6255,7 @@ class ll {
|
|
|
6260
6255
|
ensureWorker() {
|
|
6261
6256
|
if (this.worker)
|
|
6262
6257
|
return this.worker;
|
|
6263
|
-
const e = new
|
|
6258
|
+
const e = new il();
|
|
6264
6259
|
return this.worker = e, e.addEventListener("message", (r) => {
|
|
6265
6260
|
const n = r.data;
|
|
6266
6261
|
if (n?.type === "error") {
|
|
@@ -6303,7 +6298,7 @@ class ll {
|
|
|
6303
6298
|
async ensureWorklet(e) {
|
|
6304
6299
|
if (!vr(e))
|
|
6305
6300
|
throw new Error("AudioWorklet is not supported in this browser");
|
|
6306
|
-
this.workletModuleUrl || (this.workletModuleUrl = URL.createObjectURL(new Blob([
|
|
6301
|
+
this.workletModuleUrl || (this.workletModuleUrl = URL.createObjectURL(new Blob([al()], { type: "text/javascript" }))), (!this.workletReady || this.workletContext !== e) && (this.workletContext = e, this.workletReady = e.audioWorklet.addModule(this.workletModuleUrl));
|
|
6307
6302
|
try {
|
|
6308
6303
|
await this.workletReady;
|
|
6309
6304
|
} catch (r) {
|
|
@@ -6319,13 +6314,13 @@ class ll {
|
|
|
6319
6314
|
if (!i)
|
|
6320
6315
|
throw s.getTracks().forEach((_) => _.stop()), new Error("No audio track available");
|
|
6321
6316
|
await this.ensureWorklet(n);
|
|
6322
|
-
const o =
|
|
6317
|
+
const o = ol(), a = this.allocateTrackId(), c = n.createMediaStreamSource(s), l = n.createGain();
|
|
6323
6318
|
l.gain.value = 0, l.connect(n.destination);
|
|
6324
6319
|
const h = de() ? "sab" : "pcm";
|
|
6325
6320
|
let f;
|
|
6326
6321
|
if (h === "sab") {
|
|
6327
6322
|
const _ = Math.floor(n.sampleRate * 2);
|
|
6328
|
-
f =
|
|
6323
|
+
f = sl.getStorageForCapacity(_, Float32Array);
|
|
6329
6324
|
}
|
|
6330
6325
|
const p = this.ensureWorker();
|
|
6331
6326
|
p.postMessage({
|
|
@@ -6466,9 +6461,9 @@ class ll {
|
|
|
6466
6461
|
}
|
|
6467
6462
|
}
|
|
6468
6463
|
}
|
|
6469
|
-
const xr = 1280, Gr = 720,
|
|
6470
|
-
async function
|
|
6471
|
-
const r = e.mime ?? Vr, n = e.quality ??
|
|
6464
|
+
const xr = 1280, Gr = 720, ll = 30, Vr = "image/jpeg", ul = 0.92;
|
|
6465
|
+
async function hl(t, e) {
|
|
6466
|
+
const r = e.mime ?? Vr, n = e.quality ?? ul;
|
|
6472
6467
|
if (typeof OffscreenCanvas < "u" && t instanceof OffscreenCanvas)
|
|
6473
6468
|
try {
|
|
6474
6469
|
return await t.convertToBlob({ type: r, quality: n });
|
|
@@ -6485,7 +6480,7 @@ async function dl(t, e) {
|
|
|
6485
6480
|
);
|
|
6486
6481
|
});
|
|
6487
6482
|
}
|
|
6488
|
-
class
|
|
6483
|
+
class dl {
|
|
6489
6484
|
async acquireCameraStream(e) {
|
|
6490
6485
|
if (!navigator.mediaDevices)
|
|
6491
6486
|
throw new Error("Media devices are not available in this environment");
|
|
@@ -6522,7 +6517,7 @@ class fl {
|
|
|
6522
6517
|
if (!E)
|
|
6523
6518
|
throw new Error("2D canvas context unavailable");
|
|
6524
6519
|
E.drawImage(s, 0, 0, a, c);
|
|
6525
|
-
const d = await
|
|
6520
|
+
const d = await hl(l, e), h = await d.arrayBuffer();
|
|
6526
6521
|
return {
|
|
6527
6522
|
mime: d.type || e.mime || Vr,
|
|
6528
6523
|
width: a,
|
|
@@ -6549,7 +6544,7 @@ class fl {
|
|
|
6549
6544
|
}
|
|
6550
6545
|
}
|
|
6551
6546
|
}
|
|
6552
|
-
function
|
|
6547
|
+
function fl(t) {
|
|
6553
6548
|
return new Worker(
|
|
6554
6549
|
"" + new URL("assets/video-capture-worker-DZZ0ggvo.js", import.meta.url).href,
|
|
6555
6550
|
{
|
|
@@ -6559,17 +6554,17 @@ function El(t) {
|
|
|
6559
6554
|
);
|
|
6560
6555
|
}
|
|
6561
6556
|
const Et = M("IkonVideoCapture");
|
|
6562
|
-
function
|
|
6557
|
+
function El() {
|
|
6563
6558
|
const t = globalThis.crypto;
|
|
6564
6559
|
return t?.randomUUID ? t.randomUUID() : `cap_${Date.now()}_${Math.floor(Math.random() * 1e9)}`;
|
|
6565
6560
|
}
|
|
6566
|
-
function
|
|
6561
|
+
function pl() {
|
|
6567
6562
|
const t = globalThis.MediaStreamTrackProcessor;
|
|
6568
6563
|
if (!t)
|
|
6569
6564
|
throw new Error("MediaStreamTrackProcessor is not available in this browser");
|
|
6570
6565
|
return t;
|
|
6571
6566
|
}
|
|
6572
|
-
class
|
|
6567
|
+
class Il {
|
|
6573
6568
|
constructor(e) {
|
|
6574
6569
|
this.client = e;
|
|
6575
6570
|
}
|
|
@@ -6585,7 +6580,7 @@ class ml {
|
|
|
6585
6580
|
ensureWorker() {
|
|
6586
6581
|
if (this.worker)
|
|
6587
6582
|
return this.worker;
|
|
6588
|
-
const e = new
|
|
6583
|
+
const e = new fl();
|
|
6589
6584
|
return this.worker = e, e.addEventListener("message", (r) => {
|
|
6590
6585
|
const n = r.data;
|
|
6591
6586
|
if (n?.type === "error") {
|
|
@@ -6612,7 +6607,7 @@ class ml {
|
|
|
6612
6607
|
async getMediaStream(e) {
|
|
6613
6608
|
if (!navigator.mediaDevices)
|
|
6614
6609
|
throw new Error("Media devices are not available in this environment");
|
|
6615
|
-
const r = e.constraints ?? {}, n = e.options?.framerate ??
|
|
6610
|
+
const r = e.constraints ?? {}, n = e.options?.framerate ?? ll, s = {
|
|
6616
6611
|
...r,
|
|
6617
6612
|
frameRate: r.frameRate ?? { ideal: n }
|
|
6618
6613
|
};
|
|
@@ -6623,10 +6618,10 @@ class ml {
|
|
|
6623
6618
|
if (!r)
|
|
6624
6619
|
throw new Error("Cannot start video capture before client is connected");
|
|
6625
6620
|
this.ensurePorts();
|
|
6626
|
-
const n =
|
|
6621
|
+
const n = El(), s = await this.getMediaStream(e), i = s.getVideoTracks()[0];
|
|
6627
6622
|
if (!i)
|
|
6628
6623
|
throw s.getTracks().forEach((I) => I.stop()), new Error("No video track available");
|
|
6629
|
-
const o = i.getSettings(), a = e.options?.width ?? o.width ?? xr, c = e.options?.height ?? o.height ?? Gr, l =
|
|
6624
|
+
const o = i.getSettings(), a = e.options?.width ?? o.width ?? xr, c = e.options?.height ?? o.height ?? Gr, l = pl(), d = new l({ track: i }).readable, h = this.allocateTrackId(), f = this.ensureWorker();
|
|
6630
6625
|
f.postMessage(
|
|
6631
6626
|
{
|
|
6632
6627
|
type: "start",
|
|
@@ -6694,12 +6689,12 @@ class ml {
|
|
|
6694
6689
|
this.protocolPort?.close(), this.protocolPort = null, this.sendPort?.close(), this.sendPort = null;
|
|
6695
6690
|
}
|
|
6696
6691
|
}
|
|
6697
|
-
class
|
|
6692
|
+
class ml {
|
|
6698
6693
|
audio;
|
|
6699
6694
|
video;
|
|
6700
6695
|
image;
|
|
6701
6696
|
constructor(e, r) {
|
|
6702
|
-
this.audio = new
|
|
6697
|
+
this.audio = new cl(e, r?.audio), this.video = new Il(e), this.image = new dl();
|
|
6703
6698
|
}
|
|
6704
6699
|
dispose() {
|
|
6705
6700
|
this.audio.dispose(), this.video.dispose();
|
|
@@ -6707,19 +6702,19 @@ class _l {
|
|
|
6707
6702
|
}
|
|
6708
6703
|
const Wr = M("DebugMode");
|
|
6709
6704
|
let Y = !1;
|
|
6710
|
-
function
|
|
6705
|
+
function _l() {
|
|
6711
6706
|
return typeof window > "u" ? !1 : new URLSearchParams(window.location.search).get("debug") === "true";
|
|
6712
6707
|
}
|
|
6713
|
-
function
|
|
6714
|
-
return Y =
|
|
6708
|
+
function Tl() {
|
|
6709
|
+
return Y = _l(), Y && (yr(Ae.DEBUG), Wr.warn("Debug mode enabled")), Y;
|
|
6715
6710
|
}
|
|
6716
|
-
function
|
|
6711
|
+
function Sl() {
|
|
6717
6712
|
return Y;
|
|
6718
6713
|
}
|
|
6719
|
-
function
|
|
6714
|
+
function wl() {
|
|
6720
6715
|
Y || (Y = !0, yr(Ae.DEBUG), Wr.warn("Debug mode enabled"));
|
|
6721
6716
|
}
|
|
6722
|
-
function
|
|
6717
|
+
function Al(t) {
|
|
6723
6718
|
return new Worker(
|
|
6724
6719
|
"" + new URL("assets/protocol-worker-CH5R2dxZ.js", import.meta.url).href,
|
|
6725
6720
|
{
|
|
@@ -6734,7 +6729,7 @@ const pt = {
|
|
|
6734
6729
|
[k.WebTransportProxy]: 2,
|
|
6735
6730
|
[k.WebSocketProxy]: 3
|
|
6736
6731
|
}, Re = "ikon_endpoint_type";
|
|
6737
|
-
class
|
|
6732
|
+
class yl {
|
|
6738
6733
|
isLocal;
|
|
6739
6734
|
workingEndpointType = null;
|
|
6740
6735
|
constructor(e) {
|
|
@@ -6796,10 +6791,10 @@ class gl {
|
|
|
6796
6791
|
}
|
|
6797
6792
|
}
|
|
6798
6793
|
const T = M("IkonClient");
|
|
6799
|
-
function
|
|
6794
|
+
function gl() {
|
|
6800
6795
|
return typeof __IKON_WAIT_FOR_EXTERNAL_CONNECT_URL__ < "u" && __IKON_WAIT_FOR_EXTERNAL_CONNECT_URL__;
|
|
6801
6796
|
}
|
|
6802
|
-
class
|
|
6797
|
+
class Wl {
|
|
6803
6798
|
channelManager = null;
|
|
6804
6799
|
protocolWorker = null;
|
|
6805
6800
|
workerManagerState = null;
|
|
@@ -6837,7 +6832,7 @@ class Hl {
|
|
|
6837
6832
|
_media;
|
|
6838
6833
|
_mediaCapture = null;
|
|
6839
6834
|
// External connect URL mode
|
|
6840
|
-
_waitForExternalConnectUrl =
|
|
6835
|
+
_waitForExternalConnectUrl = gl();
|
|
6841
6836
|
_externalConnectUrlCleanup = null;
|
|
6842
6837
|
/**
|
|
6843
6838
|
* SDK-provided media pipelines (audio/video).
|
|
@@ -6857,27 +6852,27 @@ class Hl {
|
|
|
6857
6852
|
return this._mediaCapture;
|
|
6858
6853
|
}
|
|
6859
6854
|
constructor(e) {
|
|
6860
|
-
this.config = e, this.slowConnectionThresholdMs = e.timeouts?.slowConnectionThresholdMs ??
|
|
6855
|
+
this.config = e, this.slowConnectionThresholdMs = e.timeouts?.slowConnectionThresholdMs ?? Va, this.connectionTimeoutMs = e.timeouts?.connectionTimeoutMs ?? Wa;
|
|
6861
6856
|
const r = [e.local, e.apiKey, e.sessionToken].filter(Boolean).length;
|
|
6862
6857
|
if (r === 0)
|
|
6863
6858
|
throw new Error('IkonClient requires one of: "local", "apiKey", or "sessionToken" configuration');
|
|
6864
6859
|
if (r > 1)
|
|
6865
6860
|
throw new Error('IkonClient accepts only one of: "local", "apiKey", or "sessionToken" configuration');
|
|
6866
|
-
this.endpointSelector = new
|
|
6861
|
+
this.endpointSelector = new yl({
|
|
6867
6862
|
local: e.local
|
|
6868
|
-
}), this._functionRegistry = new
|
|
6863
|
+
}), this._functionRegistry = new Mc(), ct() && !e.disableBrowserFunctions && (this.unregisterBrowserFunctions = Rc(this._functionRegistry));
|
|
6869
6864
|
const n = e.audio ? {
|
|
6870
6865
|
performance: e.audio.performance,
|
|
6871
6866
|
background: e.audio.background,
|
|
6872
6867
|
diagnostics: e.audio.diagnostics
|
|
6873
6868
|
} : void 0, s = e.video ? { performance: e.video.performance } : void 0;
|
|
6874
|
-
this._media = new
|
|
6869
|
+
this._media = new nl(this, { audio: n, video: s, mediaSession: e.mediaSession }), this._media.audio.setEnabled(!0), this._media.video.setEnabled(!0), ct() && (this._mediaCapture = new ml(this, {
|
|
6875
6870
|
audio: {
|
|
6876
6871
|
performance: {
|
|
6877
6872
|
preferWebCodecs: e.audio?.performance?.preferWebCodecs
|
|
6878
6873
|
}
|
|
6879
6874
|
}
|
|
6880
|
-
}), this.unregisterMediaCaptureFunctions =
|
|
6875
|
+
}), this.unregisterMediaCaptureFunctions = Bc(this._functionRegistry, this));
|
|
6881
6876
|
}
|
|
6882
6877
|
_lastError = void 0;
|
|
6883
6878
|
/**
|
|
@@ -6922,7 +6917,7 @@ class Hl {
|
|
|
6922
6917
|
if (this.currentState !== "idle")
|
|
6923
6918
|
throw new Error(`Cannot connect: already in state ${this.currentState}`);
|
|
6924
6919
|
this.setupLifecycleHandlers();
|
|
6925
|
-
const e =
|
|
6920
|
+
const e = Ka();
|
|
6926
6921
|
if (e) {
|
|
6927
6922
|
T.info("Found external connect URL in query parameter"), await this.executeConnection(() => ne(e, this.abortController.signal));
|
|
6928
6923
|
return;
|
|
@@ -7134,11 +7129,11 @@ class Hl {
|
|
|
7134
7129
|
async authenticate() {
|
|
7135
7130
|
const e = this.abortController?.signal;
|
|
7136
7131
|
if (this.config.local)
|
|
7137
|
-
return
|
|
7132
|
+
return Za(this.config.local, e);
|
|
7138
7133
|
if (this.config.apiKey)
|
|
7139
|
-
return
|
|
7134
|
+
return qa(this.config.apiKey, e);
|
|
7140
7135
|
if (this.config.sessionToken)
|
|
7141
|
-
return
|
|
7136
|
+
return ec(this.config.sessionToken, e);
|
|
7142
7137
|
throw new Error("No connection configuration provided (need local, apiKey, or sessionToken)");
|
|
7143
7138
|
}
|
|
7144
7139
|
/**
|
|
@@ -7150,8 +7145,8 @@ class Hl {
|
|
|
7150
7145
|
this.notifyMessageSubscribers(e, r, n);
|
|
7151
7146
|
return;
|
|
7152
7147
|
}
|
|
7153
|
-
r === S.CORE_GLOBAL_STATE &&
|
|
7154
|
-
this._globalState = s, this._sessionId !== void 0 && this._functionRegistry.syncFromGlobalState(s, this._sessionId), this._globalState.DebugMode &&
|
|
7148
|
+
r === S.CORE_GLOBAL_STATE && Wo(e).then((s) => {
|
|
7149
|
+
this._globalState = s, this._sessionId !== void 0 && this._functionRegistry.syncFromGlobalState(s, this._sessionId), this._globalState.DebugMode && wl(), Sl() && this.protocolWorker && this.protocolWorker.postMessage({ type: "enableDevtools", enabled: !0 }), this._globalStateReceived || (this._globalStateReceived = !0, this.tryHandleJoined());
|
|
7155
7150
|
}).catch((s) => {
|
|
7156
7151
|
T.error("Failed to parse GlobalState:", s);
|
|
7157
7152
|
}), this.notifyMessageSubscribers(e, r, n);
|
|
@@ -7238,7 +7233,7 @@ class Hl {
|
|
|
7238
7233
|
}
|
|
7239
7234
|
let r;
|
|
7240
7235
|
try {
|
|
7241
|
-
r = new
|
|
7236
|
+
r = new Al();
|
|
7242
7237
|
} catch (l) {
|
|
7243
7238
|
T.warn(`Failed to create protocol worker, falling back to main thread: ${l}`), await this.connectProtocolOnMainThread(e);
|
|
7244
7239
|
return;
|
|
@@ -7269,7 +7264,7 @@ class Hl {
|
|
|
7269
7264
|
E(new Error(`Protocol worker failed: ${f.join(" ")}`.trim()));
|
|
7270
7265
|
});
|
|
7271
7266
|
}), s = this.computeOrderedEndpointTypes(e), i = this.config.timeouts?.keepaliveTimeoutMs ?? nt, o = this.config.timeouts?.reconnectBackoffMs ?? st, a = this.config.timeouts?.maxReconnectAttempts ?? it;
|
|
7272
|
-
this.updateWorkerInterestMask(),
|
|
7267
|
+
this.updateWorkerInterestMask(), Tl() && r.postMessage({ type: "enableDevtools", enabled: !0 }), r.postMessage({
|
|
7273
7268
|
type: "connect",
|
|
7274
7269
|
sessionId: this._sessionId,
|
|
7275
7270
|
entrypoints: e,
|
|
@@ -7285,7 +7280,7 @@ class Hl {
|
|
|
7285
7280
|
}
|
|
7286
7281
|
}
|
|
7287
7282
|
async connectProtocolOnMainThread(e) {
|
|
7288
|
-
this.workerManagerState = null, this.protocolWorker = null, this.channelManager = new
|
|
7283
|
+
this.workerManagerState = null, this.protocolWorker = null, this.channelManager = new Ga({
|
|
7289
7284
|
sessionId: this._sessionId,
|
|
7290
7285
|
keepaliveTimeoutMs: this.config.timeouts?.keepaliveTimeoutMs ?? nt,
|
|
7291
7286
|
reconnectBackoffMs: this.config.timeouts?.reconnectBackoffMs ?? st,
|
|
@@ -7443,124 +7438,124 @@ class Hl {
|
|
|
7443
7438
|
}
|
|
7444
7439
|
}
|
|
7445
7440
|
}
|
|
7446
|
-
function
|
|
7441
|
+
function Hl(t) {
|
|
7447
7442
|
return t === "waitingForExternalConnectUrl" || t === "connecting" || t === "connectingSlow" || t === "reconnecting";
|
|
7448
7443
|
}
|
|
7449
|
-
function
|
|
7444
|
+
function $l(t) {
|
|
7450
7445
|
return t === "connected";
|
|
7451
7446
|
}
|
|
7452
|
-
function
|
|
7447
|
+
function Kl(t) {
|
|
7453
7448
|
return t === "offline" || t === "offlineError" || t === "idle";
|
|
7454
7449
|
}
|
|
7455
|
-
function
|
|
7450
|
+
function Yl(t) {
|
|
7456
7451
|
return t === "offlineError";
|
|
7457
7452
|
}
|
|
7458
7453
|
const Hr = /* @__PURE__ */ new Map();
|
|
7459
7454
|
for (const [t, e] of Object.entries(S))
|
|
7460
7455
|
typeof e == "number" && Hr.set(e, t);
|
|
7461
|
-
function
|
|
7456
|
+
function jl(t) {
|
|
7462
7457
|
return Hr.get(t) ?? `UNKNOWN_${t}`;
|
|
7463
7458
|
}
|
|
7464
7459
|
const $r = 1e3, Kr = Ae.INFO;
|
|
7465
7460
|
let L = [], Fe = $r, Yr = Kr, Pe = null;
|
|
7466
|
-
function
|
|
7461
|
+
function Nl(t) {
|
|
7467
7462
|
t.level < Yr || (L.push(t), L.length > Fe && (L = L.slice(-Fe)));
|
|
7468
7463
|
}
|
|
7469
|
-
function
|
|
7470
|
-
Fe = t?.maxBufferSize ?? $r, Yr = t?.minLevel ?? Kr, L = [],
|
|
7464
|
+
function Cl(t) {
|
|
7465
|
+
Fe = t?.maxBufferSize ?? $r, Yr = t?.minLevel ?? Kr, L = [], Ma(Nl);
|
|
7471
7466
|
}
|
|
7472
|
-
function
|
|
7467
|
+
function zl(t) {
|
|
7473
7468
|
Pe = t;
|
|
7474
7469
|
}
|
|
7475
|
-
function
|
|
7470
|
+
function Xl() {
|
|
7476
7471
|
return L;
|
|
7477
7472
|
}
|
|
7478
|
-
function
|
|
7473
|
+
function Rl() {
|
|
7479
7474
|
const t = L;
|
|
7480
7475
|
return L = [], t;
|
|
7481
7476
|
}
|
|
7482
|
-
function
|
|
7477
|
+
function Jl() {
|
|
7483
7478
|
if (!Pe || L.length === 0)
|
|
7484
7479
|
return 0;
|
|
7485
|
-
const t =
|
|
7480
|
+
const t = Rl();
|
|
7486
7481
|
return Pe(t), t.length;
|
|
7487
7482
|
}
|
|
7488
|
-
function
|
|
7483
|
+
function Ql() {
|
|
7489
7484
|
L = [];
|
|
7490
7485
|
}
|
|
7491
|
-
function
|
|
7486
|
+
function Zl() {
|
|
7492
7487
|
return L.length;
|
|
7493
7488
|
}
|
|
7494
|
-
|
|
7489
|
+
Cl();
|
|
7495
7490
|
export {
|
|
7496
7491
|
g as AuthenticationError,
|
|
7497
|
-
|
|
7498
|
-
|
|
7499
|
-
|
|
7492
|
+
xa as Channel,
|
|
7493
|
+
Ga as ChannelManager,
|
|
7494
|
+
kl as ChannelNotFoundError,
|
|
7500
7495
|
J as ClientType,
|
|
7501
7496
|
je as ConnectionError,
|
|
7502
7497
|
Q as ContextType,
|
|
7503
|
-
|
|
7498
|
+
yl as EndpointSelector,
|
|
7504
7499
|
k as EntrypointType,
|
|
7505
|
-
|
|
7506
|
-
|
|
7500
|
+
Mc as FunctionRegistry,
|
|
7501
|
+
Pl as IKON_AUTH_BASE_URL,
|
|
7507
7502
|
at as IKON_AUTH_URL_DEV,
|
|
7508
7503
|
ot as IKON_AUTH_URL_PROD,
|
|
7509
7504
|
_e as IKON_BACKEND_URL_DEV,
|
|
7510
7505
|
Oe as IKON_BACKEND_URL_PROD,
|
|
7511
|
-
|
|
7506
|
+
cl as IkonAudioCapture,
|
|
7512
7507
|
Ze as IkonAudioPlayback,
|
|
7513
|
-
|
|
7514
|
-
|
|
7515
|
-
|
|
7516
|
-
|
|
7517
|
-
|
|
7518
|
-
|
|
7508
|
+
Wl as IkonClient,
|
|
7509
|
+
dl as IkonImageCapture,
|
|
7510
|
+
nl as IkonMedia,
|
|
7511
|
+
ml as IkonMediaCapture,
|
|
7512
|
+
Il as IkonVideoCapture,
|
|
7513
|
+
rl as IkonVideoPlayback,
|
|
7519
7514
|
ze as KeepaliveTimeoutError,
|
|
7520
7515
|
Ae as LogLevel,
|
|
7521
|
-
|
|
7522
|
-
|
|
7516
|
+
Ua as MaxRetriesExceededError,
|
|
7517
|
+
Dl as NoChannelsError,
|
|
7523
7518
|
S as Opcode,
|
|
7524
|
-
|
|
7525
|
-
|
|
7519
|
+
Da as ProvisioningTimeoutError,
|
|
7520
|
+
Ul as SpaceNotFoundError,
|
|
7526
7521
|
H as TransportError,
|
|
7527
7522
|
q as UserType,
|
|
7528
|
-
|
|
7529
|
-
|
|
7530
|
-
|
|
7523
|
+
bl as asProtocolMessage,
|
|
7524
|
+
vl as clearDeviceId,
|
|
7525
|
+
Ql as clearLogBuffer,
|
|
7531
7526
|
M as createLogger,
|
|
7532
|
-
|
|
7533
|
-
|
|
7534
|
-
|
|
7535
|
-
|
|
7536
|
-
|
|
7537
|
-
|
|
7538
|
-
|
|
7539
|
-
|
|
7540
|
-
|
|
7541
|
-
|
|
7527
|
+
Gl as deriveAuthUrl,
|
|
7528
|
+
xl as deriveBackendType,
|
|
7529
|
+
Bl as deriveBackendUrl,
|
|
7530
|
+
Fl as extractUserIdFromToken,
|
|
7531
|
+
Jl as flushLogs,
|
|
7532
|
+
Xl as getBufferedLogs,
|
|
7533
|
+
Zl as getLogBufferSize,
|
|
7534
|
+
Ml as getLogLevel,
|
|
7535
|
+
Ol as getLogSink,
|
|
7536
|
+
jl as getOpcodeName,
|
|
7542
7537
|
Je as getOrCreateDeviceId,
|
|
7543
|
-
|
|
7544
|
-
|
|
7538
|
+
Tl as initializeDebugMode,
|
|
7539
|
+
Cl as initializeLogSink,
|
|
7545
7540
|
vr as isAudioWorkletSupported,
|
|
7546
7541
|
ct as isBrowserEnvironment,
|
|
7547
7542
|
Qe as isCloudEnvironment,
|
|
7548
|
-
|
|
7549
|
-
|
|
7550
|
-
|
|
7551
|
-
|
|
7552
|
-
|
|
7543
|
+
$l as isConnected,
|
|
7544
|
+
Hl as isConnecting,
|
|
7545
|
+
Sl as isDebugModeEnabled,
|
|
7546
|
+
Yl as isError,
|
|
7547
|
+
Kl as isOffline,
|
|
7553
7548
|
de as isSharedArrayBufferSupported,
|
|
7554
7549
|
gr as isWebTransportSupported,
|
|
7555
|
-
|
|
7550
|
+
Vl as parseUrlParams,
|
|
7556
7551
|
fe as readOpcode,
|
|
7557
7552
|
he as readOpcodeGroup,
|
|
7558
7553
|
ie as readProtocolMessageHeaders,
|
|
7559
|
-
|
|
7554
|
+
Rc as registerBrowserFunctions,
|
|
7560
7555
|
yr as setLogLevel,
|
|
7561
|
-
|
|
7562
|
-
|
|
7563
|
-
|
|
7564
|
-
|
|
7565
|
-
|
|
7556
|
+
Ma as setLogSink,
|
|
7557
|
+
zl as setSendLogsCallback,
|
|
7558
|
+
Ll as subscribeToLogEvents,
|
|
7559
|
+
Rl as takeBufferedLogs,
|
|
7560
|
+
Oc as withResultData
|
|
7566
7561
|
};
|