@sawport/react-sdk 0.1.0-alpha.63 → 0.1.0-alpha.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +354 -351
- package/dist/index.umd.js +12 -12
- package/dist/style.css +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1366,14 +1366,14 @@ function baseToString$2(value2) {
|
|
|
1366
1366
|
var result = value2 + "";
|
|
1367
1367
|
return result == "0" && 1 / value2 == -INFINITY$2 ? "-0" : result;
|
|
1368
1368
|
}
|
|
1369
|
-
function toString$
|
|
1369
|
+
function toString$h(value2) {
|
|
1370
1370
|
return value2 == null ? "" : baseToString$2(value2);
|
|
1371
1371
|
}
|
|
1372
1372
|
function toPath(value2) {
|
|
1373
1373
|
if (isArray$l(value2)) {
|
|
1374
1374
|
return arrayMap$2(value2, toKey$5);
|
|
1375
1375
|
}
|
|
1376
|
-
return isSymbol$a(value2) ? [value2] : copyArray(stringToPath$4(toString$
|
|
1376
|
+
return isSymbol$a(value2) ? [value2] : copyArray(stringToPath$4(toString$h(value2)));
|
|
1377
1377
|
}
|
|
1378
1378
|
var isProduction = true;
|
|
1379
1379
|
function warning$4(condition, message) {
|
|
@@ -2712,7 +2712,7 @@ function baseClone(src2, circulars, clones) {
|
|
|
2712
2712
|
function clone$2(src2) {
|
|
2713
2713
|
return baseClone(src2, [], []);
|
|
2714
2714
|
}
|
|
2715
|
-
const toString$
|
|
2715
|
+
const toString$g = Object.prototype.toString;
|
|
2716
2716
|
const errorToString = Error.prototype.toString;
|
|
2717
2717
|
const regExpToString = RegExp.prototype.toString;
|
|
2718
2718
|
const symbolToString$1 = typeof Symbol !== "undefined" ? Symbol.prototype.toString : () => "";
|
|
@@ -2735,7 +2735,7 @@ function printSimpleValue(val, quoteStrings = false) {
|
|
|
2735
2735
|
return "[Function " + (val.name || "anonymous") + "]";
|
|
2736
2736
|
if (typeOf === "symbol")
|
|
2737
2737
|
return symbolToString$1.call(val).replace(SYMBOL_REGEXP, "Symbol($1)");
|
|
2738
|
-
const tag = toString$
|
|
2738
|
+
const tag = toString$g.call(val).slice(8, -1);
|
|
2739
2739
|
if (tag === "Date")
|
|
2740
2740
|
return isNaN(val.getTime()) ? "" + val : val.toISOString(val);
|
|
2741
2741
|
if (tag === "Error" || val instanceof Error)
|
|
@@ -3243,16 +3243,16 @@ function baseToString$1(value2) {
|
|
|
3243
3243
|
}
|
|
3244
3244
|
var _baseToString = baseToString$1;
|
|
3245
3245
|
var baseToString = _baseToString;
|
|
3246
|
-
function toString$
|
|
3246
|
+
function toString$f(value2) {
|
|
3247
3247
|
return value2 == null ? "" : baseToString(value2);
|
|
3248
3248
|
}
|
|
3249
|
-
var toString_1 = toString$
|
|
3250
|
-
var isArray$g = isArray_1, isKey$2 = _isKey, stringToPath$1 = _stringToPath, toString$
|
|
3249
|
+
var toString_1 = toString$f;
|
|
3250
|
+
var isArray$g = isArray_1, isKey$2 = _isKey, stringToPath$1 = _stringToPath, toString$e = toString_1;
|
|
3251
3251
|
function castPath$2(value2, object4) {
|
|
3252
3252
|
if (isArray$g(value2)) {
|
|
3253
3253
|
return value2;
|
|
3254
3254
|
}
|
|
3255
|
-
return isKey$2(value2, object4) ? [value2] : stringToPath$1(toString$
|
|
3255
|
+
return isKey$2(value2, object4) ? [value2] : stringToPath$1(toString$e(value2));
|
|
3256
3256
|
}
|
|
3257
3257
|
var _castPath = castPath$2;
|
|
3258
3258
|
var baseGetTag$2 = _baseGetTag, isObjectLike$3 = isObjectLike_1;
|
|
@@ -5554,13 +5554,13 @@ var deburredLetters = {
|
|
|
5554
5554
|
};
|
|
5555
5555
|
var deburrLetter$1 = basePropertyOf(deburredLetters);
|
|
5556
5556
|
var _deburrLetter = deburrLetter$1;
|
|
5557
|
-
var deburrLetter = _deburrLetter, toString$
|
|
5557
|
+
var deburrLetter = _deburrLetter, toString$d = toString_1;
|
|
5558
5558
|
var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
|
|
5559
5559
|
var rsComboMarksRange$3 = "\\u0300-\\u036f", reComboHalfMarksRange$3 = "\\ufe20-\\ufe2f", rsComboSymbolsRange$3 = "\\u20d0-\\u20ff", rsComboRange$3 = rsComboMarksRange$3 + reComboHalfMarksRange$3 + rsComboSymbolsRange$3;
|
|
5560
5560
|
var rsCombo$2 = "[" + rsComboRange$3 + "]";
|
|
5561
5561
|
var reComboMark = RegExp(rsCombo$2, "g");
|
|
5562
5562
|
function deburr$1(string3) {
|
|
5563
|
-
string3 = toString$
|
|
5563
|
+
string3 = toString$d(string3);
|
|
5564
5564
|
return string3 && string3.replace(reLatin, deburrLetter).replace(reComboMark, "");
|
|
5565
5565
|
}
|
|
5566
5566
|
var deburr_1 = deburr$1;
|
|
@@ -5591,9 +5591,9 @@ function unicodeWords$1(string3) {
|
|
|
5591
5591
|
return string3.match(reUnicodeWord) || [];
|
|
5592
5592
|
}
|
|
5593
5593
|
var _unicodeWords = unicodeWords$1;
|
|
5594
|
-
var asciiWords = _asciiWords, hasUnicodeWord = _hasUnicodeWord, toString$
|
|
5594
|
+
var asciiWords = _asciiWords, hasUnicodeWord = _hasUnicodeWord, toString$c = toString_1, unicodeWords = _unicodeWords;
|
|
5595
5595
|
function words$1(string3, pattern4, guard) {
|
|
5596
|
-
string3 = toString$
|
|
5596
|
+
string3 = toString$c(string3);
|
|
5597
5597
|
pattern4 = guard ? void 0 : pattern4;
|
|
5598
5598
|
if (pattern4 === void 0) {
|
|
5599
5599
|
return hasUnicodeWord(string3) ? unicodeWords(string3) : asciiWords(string3);
|
|
@@ -5664,10 +5664,10 @@ function stringToArray$1(string3) {
|
|
|
5664
5664
|
return hasUnicode$1(string3) ? unicodeToArray(string3) : asciiToArray(string3);
|
|
5665
5665
|
}
|
|
5666
5666
|
var _stringToArray = stringToArray$1;
|
|
5667
|
-
var castSlice = _castSlice, hasUnicode = _hasUnicode, stringToArray = _stringToArray, toString$
|
|
5667
|
+
var castSlice = _castSlice, hasUnicode = _hasUnicode, stringToArray = _stringToArray, toString$b = toString_1;
|
|
5668
5668
|
function createCaseFirst$1(methodName) {
|
|
5669
5669
|
return function(string3) {
|
|
5670
|
-
string3 = toString$
|
|
5670
|
+
string3 = toString$b(string3);
|
|
5671
5671
|
var strSymbols = hasUnicode(string3) ? stringToArray(string3) : void 0;
|
|
5672
5672
|
var chr = strSymbols ? strSymbols[0] : string3.charAt(0);
|
|
5673
5673
|
var trailing = strSymbols ? castSlice(strSymbols, 1).join("") : string3.slice(1);
|
|
@@ -5678,9 +5678,9 @@ var _createCaseFirst = createCaseFirst$1;
|
|
|
5678
5678
|
var createCaseFirst = _createCaseFirst;
|
|
5679
5679
|
var upperFirst$1 = createCaseFirst("toUpperCase");
|
|
5680
5680
|
var upperFirst_1 = upperFirst$1;
|
|
5681
|
-
var toString$
|
|
5681
|
+
var toString$a = toString_1, upperFirst = upperFirst_1;
|
|
5682
5682
|
function capitalize$1(string3) {
|
|
5683
|
-
return upperFirst(toString$
|
|
5683
|
+
return upperFirst(toString$a(string3).toLowerCase());
|
|
5684
5684
|
}
|
|
5685
5685
|
var capitalize_1 = capitalize$1;
|
|
5686
5686
|
var capitalize = capitalize_1, createCompounder = _createCompounder;
|
|
@@ -6107,10 +6107,10 @@ var bind$9 = function bind(fn, thisArg) {
|
|
|
6107
6107
|
};
|
|
6108
6108
|
};
|
|
6109
6109
|
var bind$8 = bind$9;
|
|
6110
|
-
var toString$
|
|
6110
|
+
var toString$9 = Object.prototype.toString;
|
|
6111
6111
|
var kindOf = function(cache) {
|
|
6112
6112
|
return function(thing) {
|
|
6113
|
-
var str = toString$
|
|
6113
|
+
var str = toString$9.call(thing);
|
|
6114
6114
|
return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
|
|
6115
6115
|
};
|
|
6116
6116
|
}(/* @__PURE__ */ Object.create(null));
|
|
@@ -6160,14 +6160,14 @@ var isFile = kindOfTest("File");
|
|
|
6160
6160
|
var isBlob = kindOfTest("Blob");
|
|
6161
6161
|
var isFileList = kindOfTest("FileList");
|
|
6162
6162
|
function isFunction$1(val) {
|
|
6163
|
-
return toString$
|
|
6163
|
+
return toString$9.call(val) === "[object Function]";
|
|
6164
6164
|
}
|
|
6165
6165
|
function isStream(val) {
|
|
6166
6166
|
return isObject$e(val) && isFunction$1(val.pipe);
|
|
6167
6167
|
}
|
|
6168
6168
|
function isFormData(thing) {
|
|
6169
6169
|
var pattern4 = "[object FormData]";
|
|
6170
|
-
return thing && (typeof FormData === "function" && thing instanceof FormData || toString$
|
|
6170
|
+
return thing && (typeof FormData === "function" && thing instanceof FormData || toString$9.call(thing) === pattern4 || isFunction$1(thing.toString) && thing.toString() === pattern4);
|
|
6171
6171
|
}
|
|
6172
6172
|
var isURLSearchParams = kindOfTest("URLSearchParams");
|
|
6173
6173
|
function trim$2(str) {
|
|
@@ -11866,7 +11866,7 @@ function monthDiff(a2, b2) {
|
|
|
11866
11866
|
}
|
|
11867
11867
|
hooks.defaultFormat = "YYYY-MM-DDTHH:mm:ssZ";
|
|
11868
11868
|
hooks.defaultFormatUtc = "YYYY-MM-DDTHH:mm:ss[Z]";
|
|
11869
|
-
function toString$
|
|
11869
|
+
function toString$8() {
|
|
11870
11870
|
return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ");
|
|
11871
11871
|
}
|
|
11872
11872
|
function toISOString(keepOffset) {
|
|
@@ -12577,7 +12577,7 @@ if (typeof Symbol !== "undefined" && Symbol.for != null) {
|
|
|
12577
12577
|
};
|
|
12578
12578
|
}
|
|
12579
12579
|
proto.toJSON = toJSON2;
|
|
12580
|
-
proto.toString = toString$
|
|
12580
|
+
proto.toString = toString$8;
|
|
12581
12581
|
proto.unix = unix;
|
|
12582
12582
|
proto.valueOf = valueOf;
|
|
12583
12583
|
proto.creationData = creationData;
|
|
@@ -27056,20 +27056,20 @@ const viewCalendar = (id2, params) => api("/calendars/" + id2, params);
|
|
|
27056
27056
|
const updateCalendar = (id2, params) => api("/calendars/" + id2, params, "put");
|
|
27057
27057
|
const schedule = (params) => api("/calendars", params, "post");
|
|
27058
27058
|
const getSlots = (params) => api("/calendars/slots", params);
|
|
27059
|
-
const input = "
|
|
27060
|
-
const offline_input = "
|
|
27061
|
-
const scheduleBtn = "
|
|
27062
|
-
const schTitle = "
|
|
27063
|
-
const schAvatar = "
|
|
27064
|
-
const schIconCon = "
|
|
27065
|
-
const schedules = "
|
|
27066
|
-
const reason = "
|
|
27067
|
-
const schTime = "
|
|
27068
|
-
const schActionBtn = "
|
|
27069
|
-
const schActionBtnJoin = "
|
|
27070
|
-
const schActionBtnPending = "
|
|
27071
|
-
const picker = "
|
|
27072
|
-
const inputError = "
|
|
27059
|
+
const input = "_input_u3x0g_1";
|
|
27060
|
+
const offline_input = "_offline_input_u3x0g_6";
|
|
27061
|
+
const scheduleBtn = "_scheduleBtn_u3x0g_11";
|
|
27062
|
+
const schTitle = "_schTitle_u3x0g_16";
|
|
27063
|
+
const schAvatar = "_schAvatar_u3x0g_21";
|
|
27064
|
+
const schIconCon = "_schIconCon_u3x0g_27";
|
|
27065
|
+
const schedules = "_schedules_u3x0g_34";
|
|
27066
|
+
const reason = "_reason_u3x0g_38";
|
|
27067
|
+
const schTime = "_schTime_u3x0g_43";
|
|
27068
|
+
const schActionBtn = "_schActionBtn_u3x0g_47";
|
|
27069
|
+
const schActionBtnJoin = "_schActionBtnJoin_u3x0g_47";
|
|
27070
|
+
const schActionBtnPending = "_schActionBtnPending_u3x0g_47";
|
|
27071
|
+
const picker = "_picker_u3x0g_62";
|
|
27072
|
+
const inputError = "_inputError_u3x0g_67";
|
|
27073
27073
|
const styles$2 = {
|
|
27074
27074
|
input,
|
|
27075
27075
|
offline_input,
|
|
@@ -32946,19 +32946,19 @@ const ERROR_PACKET = { type: "error", data: "parser error" };
|
|
|
32946
32946
|
commons.ERROR_PACKET = ERROR_PACKET;
|
|
32947
32947
|
Object.defineProperty(encodePacket_browser, "__esModule", { value: true });
|
|
32948
32948
|
const commons_js_1$1 = commons;
|
|
32949
|
-
const withNativeBlob = typeof Blob === "function" || typeof Blob !== "undefined" && Object.prototype.toString.call(Blob) === "[object BlobConstructor]";
|
|
32950
|
-
const withNativeArrayBuffer$
|
|
32951
|
-
const isView = (obj) => {
|
|
32949
|
+
const withNativeBlob$1 = typeof Blob === "function" || typeof Blob !== "undefined" && Object.prototype.toString.call(Blob) === "[object BlobConstructor]";
|
|
32950
|
+
const withNativeArrayBuffer$2 = typeof ArrayBuffer === "function";
|
|
32951
|
+
const isView$1 = (obj) => {
|
|
32952
32952
|
return typeof ArrayBuffer.isView === "function" ? ArrayBuffer.isView(obj) : obj && obj.buffer instanceof ArrayBuffer;
|
|
32953
32953
|
};
|
|
32954
32954
|
const encodePacket = ({ type: type4, data: data2 }, supportsBinary, callback) => {
|
|
32955
|
-
if (withNativeBlob && data2 instanceof Blob) {
|
|
32955
|
+
if (withNativeBlob$1 && data2 instanceof Blob) {
|
|
32956
32956
|
if (supportsBinary) {
|
|
32957
32957
|
return callback(data2);
|
|
32958
32958
|
} else {
|
|
32959
32959
|
return encodeBlobAsBase64(data2, callback);
|
|
32960
32960
|
}
|
|
32961
|
-
} else if (withNativeArrayBuffer$
|
|
32961
|
+
} else if (withNativeArrayBuffer$2 && (data2 instanceof ArrayBuffer || isView$1(data2))) {
|
|
32962
32962
|
if (supportsBinary) {
|
|
32963
32963
|
return callback(data2);
|
|
32964
32964
|
} else {
|
|
@@ -33025,7 +33025,7 @@ base64Arraybuffer.decode = decode$2;
|
|
|
33025
33025
|
Object.defineProperty(decodePacket_browser, "__esModule", { value: true });
|
|
33026
33026
|
const commons_js_1 = commons;
|
|
33027
33027
|
const base64_arraybuffer_js_1 = base64Arraybuffer;
|
|
33028
|
-
const withNativeArrayBuffer = typeof ArrayBuffer === "function";
|
|
33028
|
+
const withNativeArrayBuffer$1 = typeof ArrayBuffer === "function";
|
|
33029
33029
|
const decodePacket = (encodedPacket, binaryType) => {
|
|
33030
33030
|
if (typeof encodedPacket !== "string") {
|
|
33031
33031
|
return {
|
|
@@ -33052,7 +33052,7 @@ const decodePacket = (encodedPacket, binaryType) => {
|
|
|
33052
33052
|
};
|
|
33053
33053
|
};
|
|
33054
33054
|
const decodeBase64Packet = (data2, binaryType) => {
|
|
33055
|
-
if (withNativeArrayBuffer) {
|
|
33055
|
+
if (withNativeArrayBuffer$1) {
|
|
33056
33056
|
const decoded = (0, base64_arraybuffer_js_1.decode)(data2);
|
|
33057
33057
|
return mapBinary(decoded, binaryType);
|
|
33058
33058
|
} else {
|
|
@@ -34825,332 +34825,311 @@ var manager = {};
|
|
|
34825
34825
|
var socket = {};
|
|
34826
34826
|
var cjs = {};
|
|
34827
34827
|
var binary = {};
|
|
34828
|
-
var isBinary = {};
|
|
34829
|
-
|
|
34830
|
-
|
|
34831
|
-
|
|
34832
|
-
|
|
34833
|
-
|
|
34834
|
-
|
|
34835
|
-
|
|
34836
|
-
|
|
34837
|
-
|
|
34838
|
-
|
|
34839
|
-
|
|
34840
|
-
|
|
34841
|
-
|
|
34842
|
-
|
|
34843
|
-
|
|
34844
|
-
return
|
|
34845
|
-
}
|
|
34846
|
-
|
|
34847
|
-
|
|
34848
|
-
|
|
34849
|
-
|
|
34850
|
-
}
|
|
34851
|
-
if (Array.isArray(obj)) {
|
|
34852
|
-
for (let i2 = 0, l2 = obj.length; i2 < l2; i2++) {
|
|
34853
|
-
if (hasBinary(obj[i2])) {
|
|
34854
|
-
return true;
|
|
34855
|
-
}
|
|
34828
|
+
var isBinary$1 = {};
|
|
34829
|
+
Object.defineProperty(isBinary$1, "__esModule", { value: true });
|
|
34830
|
+
isBinary$1.hasBinary = isBinary$1.isBinary = void 0;
|
|
34831
|
+
const withNativeArrayBuffer = typeof ArrayBuffer === "function";
|
|
34832
|
+
const isView = (obj) => {
|
|
34833
|
+
return typeof ArrayBuffer.isView === "function" ? ArrayBuffer.isView(obj) : obj.buffer instanceof ArrayBuffer;
|
|
34834
|
+
};
|
|
34835
|
+
const toString$7 = Object.prototype.toString;
|
|
34836
|
+
const withNativeBlob = typeof Blob === "function" || typeof Blob !== "undefined" && toString$7.call(Blob) === "[object BlobConstructor]";
|
|
34837
|
+
const withNativeFile = typeof File === "function" || typeof File !== "undefined" && toString$7.call(File) === "[object FileConstructor]";
|
|
34838
|
+
function isBinary(obj) {
|
|
34839
|
+
return withNativeArrayBuffer && (obj instanceof ArrayBuffer || isView(obj)) || withNativeBlob && obj instanceof Blob || withNativeFile && obj instanceof File;
|
|
34840
|
+
}
|
|
34841
|
+
isBinary$1.isBinary = isBinary;
|
|
34842
|
+
function hasBinary(obj, toJSON3) {
|
|
34843
|
+
if (!obj || typeof obj !== "object") {
|
|
34844
|
+
return false;
|
|
34845
|
+
}
|
|
34846
|
+
if (Array.isArray(obj)) {
|
|
34847
|
+
for (let i2 = 0, l2 = obj.length; i2 < l2; i2++) {
|
|
34848
|
+
if (hasBinary(obj[i2])) {
|
|
34849
|
+
return true;
|
|
34856
34850
|
}
|
|
34857
|
-
return false;
|
|
34858
34851
|
}
|
|
34859
|
-
|
|
34852
|
+
return false;
|
|
34853
|
+
}
|
|
34854
|
+
if (isBinary(obj)) {
|
|
34855
|
+
return true;
|
|
34856
|
+
}
|
|
34857
|
+
if (obj.toJSON && typeof obj.toJSON === "function" && arguments.length === 1) {
|
|
34858
|
+
return hasBinary(obj.toJSON(), true);
|
|
34859
|
+
}
|
|
34860
|
+
for (const key in obj) {
|
|
34861
|
+
if (Object.prototype.hasOwnProperty.call(obj, key) && hasBinary(obj[key])) {
|
|
34860
34862
|
return true;
|
|
34861
34863
|
}
|
|
34862
|
-
|
|
34863
|
-
|
|
34864
|
+
}
|
|
34865
|
+
return false;
|
|
34866
|
+
}
|
|
34867
|
+
isBinary$1.hasBinary = hasBinary;
|
|
34868
|
+
Object.defineProperty(binary, "__esModule", { value: true });
|
|
34869
|
+
binary.reconstructPacket = binary.deconstructPacket = void 0;
|
|
34870
|
+
const is_binary_js_1 = isBinary$1;
|
|
34871
|
+
function deconstructPacket(packet) {
|
|
34872
|
+
const buffers = [];
|
|
34873
|
+
const packetData = packet.data;
|
|
34874
|
+
const pack = packet;
|
|
34875
|
+
pack.data = _deconstructPacket(packetData, buffers);
|
|
34876
|
+
pack.attachments = buffers.length;
|
|
34877
|
+
return { packet: pack, buffers };
|
|
34878
|
+
}
|
|
34879
|
+
binary.deconstructPacket = deconstructPacket;
|
|
34880
|
+
function _deconstructPacket(data2, buffers) {
|
|
34881
|
+
if (!data2)
|
|
34882
|
+
return data2;
|
|
34883
|
+
if (is_binary_js_1.isBinary(data2)) {
|
|
34884
|
+
const placeholder = { _placeholder: true, num: buffers.length };
|
|
34885
|
+
buffers.push(data2);
|
|
34886
|
+
return placeholder;
|
|
34887
|
+
} else if (Array.isArray(data2)) {
|
|
34888
|
+
const newData = new Array(data2.length);
|
|
34889
|
+
for (let i2 = 0; i2 < data2.length; i2++) {
|
|
34890
|
+
newData[i2] = _deconstructPacket(data2[i2], buffers);
|
|
34864
34891
|
}
|
|
34865
|
-
|
|
34866
|
-
|
|
34867
|
-
|
|
34892
|
+
return newData;
|
|
34893
|
+
} else if (typeof data2 === "object" && !(data2 instanceof Date)) {
|
|
34894
|
+
const newData = {};
|
|
34895
|
+
for (const key in data2) {
|
|
34896
|
+
if (Object.prototype.hasOwnProperty.call(data2, key)) {
|
|
34897
|
+
newData[key] = _deconstructPacket(data2[key], buffers);
|
|
34868
34898
|
}
|
|
34869
34899
|
}
|
|
34870
|
-
return
|
|
34900
|
+
return newData;
|
|
34871
34901
|
}
|
|
34872
|
-
|
|
34873
|
-
|
|
34874
|
-
|
|
34875
|
-
|
|
34876
|
-
|
|
34877
|
-
|
|
34878
|
-
|
|
34879
|
-
|
|
34880
|
-
|
|
34881
|
-
|
|
34882
|
-
const is_binary_js_1 = requireIsBinary();
|
|
34883
|
-
function deconstructPacket(packet) {
|
|
34884
|
-
const buffers = [];
|
|
34885
|
-
const packetData = packet.data;
|
|
34886
|
-
const pack = packet;
|
|
34887
|
-
pack.data = _deconstructPacket(packetData, buffers);
|
|
34888
|
-
pack.attachments = buffers.length;
|
|
34889
|
-
return { packet: pack, buffers };
|
|
34890
|
-
}
|
|
34891
|
-
binary.deconstructPacket = deconstructPacket;
|
|
34892
|
-
function _deconstructPacket(data2, buffers) {
|
|
34893
|
-
if (!data2)
|
|
34894
|
-
return data2;
|
|
34895
|
-
if (is_binary_js_1.isBinary(data2)) {
|
|
34896
|
-
const placeholder = { _placeholder: true, num: buffers.length };
|
|
34897
|
-
buffers.push(data2);
|
|
34898
|
-
return placeholder;
|
|
34899
|
-
} else if (Array.isArray(data2)) {
|
|
34900
|
-
const newData = new Array(data2.length);
|
|
34901
|
-
for (let i2 = 0; i2 < data2.length; i2++) {
|
|
34902
|
-
newData[i2] = _deconstructPacket(data2[i2], buffers);
|
|
34903
|
-
}
|
|
34904
|
-
return newData;
|
|
34905
|
-
} else if (typeof data2 === "object" && !(data2 instanceof Date)) {
|
|
34906
|
-
const newData = {};
|
|
34907
|
-
for (const key in data2) {
|
|
34908
|
-
if (Object.prototype.hasOwnProperty.call(data2, key)) {
|
|
34909
|
-
newData[key] = _deconstructPacket(data2[key], buffers);
|
|
34910
|
-
}
|
|
34911
|
-
}
|
|
34912
|
-
return newData;
|
|
34913
|
-
}
|
|
34902
|
+
return data2;
|
|
34903
|
+
}
|
|
34904
|
+
function reconstructPacket(packet, buffers) {
|
|
34905
|
+
packet.data = _reconstructPacket(packet.data, buffers);
|
|
34906
|
+
packet.attachments = void 0;
|
|
34907
|
+
return packet;
|
|
34908
|
+
}
|
|
34909
|
+
binary.reconstructPacket = reconstructPacket;
|
|
34910
|
+
function _reconstructPacket(data2, buffers) {
|
|
34911
|
+
if (!data2)
|
|
34914
34912
|
return data2;
|
|
34915
|
-
|
|
34916
|
-
|
|
34917
|
-
|
|
34918
|
-
|
|
34919
|
-
|
|
34920
|
-
|
|
34921
|
-
|
|
34922
|
-
|
|
34923
|
-
|
|
34924
|
-
|
|
34925
|
-
|
|
34926
|
-
|
|
34927
|
-
|
|
34928
|
-
|
|
34929
|
-
|
|
34930
|
-
throw new Error("illegal attachments");
|
|
34931
|
-
}
|
|
34932
|
-
} else if (Array.isArray(data2)) {
|
|
34933
|
-
for (let i2 = 0; i2 < data2.length; i2++) {
|
|
34934
|
-
data2[i2] = _reconstructPacket(data2[i2], buffers);
|
|
34935
|
-
}
|
|
34936
|
-
} else if (typeof data2 === "object") {
|
|
34937
|
-
for (const key in data2) {
|
|
34938
|
-
if (Object.prototype.hasOwnProperty.call(data2, key)) {
|
|
34939
|
-
data2[key] = _reconstructPacket(data2[key], buffers);
|
|
34940
|
-
}
|
|
34913
|
+
if (data2 && data2._placeholder === true) {
|
|
34914
|
+
const isIndexValid = typeof data2.num === "number" && data2.num >= 0 && data2.num < buffers.length;
|
|
34915
|
+
if (isIndexValid) {
|
|
34916
|
+
return buffers[data2.num];
|
|
34917
|
+
} else {
|
|
34918
|
+
throw new Error("illegal attachments");
|
|
34919
|
+
}
|
|
34920
|
+
} else if (Array.isArray(data2)) {
|
|
34921
|
+
for (let i2 = 0; i2 < data2.length; i2++) {
|
|
34922
|
+
data2[i2] = _reconstructPacket(data2[i2], buffers);
|
|
34923
|
+
}
|
|
34924
|
+
} else if (typeof data2 === "object") {
|
|
34925
|
+
for (const key in data2) {
|
|
34926
|
+
if (Object.prototype.hasOwnProperty.call(data2, key)) {
|
|
34927
|
+
data2[key] = _reconstructPacket(data2[key], buffers);
|
|
34941
34928
|
}
|
|
34942
34929
|
}
|
|
34943
|
-
return data2;
|
|
34944
34930
|
}
|
|
34945
|
-
return
|
|
34946
|
-
}
|
|
34947
|
-
|
|
34948
|
-
|
|
34949
|
-
|
|
34950
|
-
|
|
34951
|
-
|
|
34952
|
-
|
|
34953
|
-
|
|
34954
|
-
|
|
34955
|
-
|
|
34956
|
-
|
|
34957
|
-
|
|
34958
|
-
|
|
34959
|
-
|
|
34960
|
-
|
|
34961
|
-
|
|
34962
|
-
|
|
34963
|
-
|
|
34964
|
-
|
|
34965
|
-
|
|
34966
|
-
|
|
34967
|
-
|
|
34968
|
-
|
|
34969
|
-
|
|
34970
|
-
|
|
34971
|
-
|
|
34972
|
-
|
|
34973
|
-
|
|
34974
|
-
|
|
34975
|
-
|
|
34976
|
-
|
|
34977
|
-
|
|
34978
|
-
|
|
34979
|
-
|
|
34980
|
-
|
|
34981
|
-
|
|
34982
|
-
|
|
34983
|
-
|
|
34984
|
-
}
|
|
34985
|
-
|
|
34986
|
-
|
|
34987
|
-
|
|
34988
|
-
|
|
34989
|
-
|
|
34990
|
-
|
|
34991
|
-
|
|
34992
|
-
|
|
34993
|
-
|
|
34994
|
-
|
|
34995
|
-
|
|
34996
|
-
|
|
34997
|
-
|
|
34931
|
+
return data2;
|
|
34932
|
+
}
|
|
34933
|
+
(function(exports2) {
|
|
34934
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
34935
|
+
exports2.Decoder = exports2.Encoder = exports2.PacketType = exports2.protocol = void 0;
|
|
34936
|
+
const component_emitter_12 = require$$5;
|
|
34937
|
+
const binary_js_1 = binary;
|
|
34938
|
+
const is_binary_js_12 = isBinary$1;
|
|
34939
|
+
const debug_12 = browser.exports;
|
|
34940
|
+
const debug2 = debug_12.default("socket.io-parser");
|
|
34941
|
+
exports2.protocol = 5;
|
|
34942
|
+
var PacketType;
|
|
34943
|
+
(function(PacketType2) {
|
|
34944
|
+
PacketType2[PacketType2["CONNECT"] = 0] = "CONNECT";
|
|
34945
|
+
PacketType2[PacketType2["DISCONNECT"] = 1] = "DISCONNECT";
|
|
34946
|
+
PacketType2[PacketType2["EVENT"] = 2] = "EVENT";
|
|
34947
|
+
PacketType2[PacketType2["ACK"] = 3] = "ACK";
|
|
34948
|
+
PacketType2[PacketType2["CONNECT_ERROR"] = 4] = "CONNECT_ERROR";
|
|
34949
|
+
PacketType2[PacketType2["BINARY_EVENT"] = 5] = "BINARY_EVENT";
|
|
34950
|
+
PacketType2[PacketType2["BINARY_ACK"] = 6] = "BINARY_ACK";
|
|
34951
|
+
})(PacketType = exports2.PacketType || (exports2.PacketType = {}));
|
|
34952
|
+
class Encoder {
|
|
34953
|
+
constructor(replacer) {
|
|
34954
|
+
this.replacer = replacer;
|
|
34955
|
+
}
|
|
34956
|
+
encode(obj) {
|
|
34957
|
+
debug2("encoding packet %j", obj);
|
|
34958
|
+
if (obj.type === PacketType.EVENT || obj.type === PacketType.ACK) {
|
|
34959
|
+
if (is_binary_js_12.hasBinary(obj)) {
|
|
34960
|
+
obj.type = obj.type === PacketType.EVENT ? PacketType.BINARY_EVENT : PacketType.BINARY_ACK;
|
|
34961
|
+
return this.encodeAsBinary(obj);
|
|
34962
|
+
}
|
|
34963
|
+
}
|
|
34964
|
+
return [this.encodeAsString(obj)];
|
|
34965
|
+
}
|
|
34966
|
+
encodeAsString(obj) {
|
|
34967
|
+
let str = "" + obj.type;
|
|
34968
|
+
if (obj.type === PacketType.BINARY_EVENT || obj.type === PacketType.BINARY_ACK) {
|
|
34969
|
+
str += obj.attachments + "-";
|
|
34970
|
+
}
|
|
34971
|
+
if (obj.nsp && "/" !== obj.nsp) {
|
|
34972
|
+
str += obj.nsp + ",";
|
|
34973
|
+
}
|
|
34974
|
+
if (null != obj.id) {
|
|
34975
|
+
str += obj.id;
|
|
34976
|
+
}
|
|
34977
|
+
if (null != obj.data) {
|
|
34978
|
+
str += JSON.stringify(obj.data, this.replacer);
|
|
34979
|
+
}
|
|
34980
|
+
debug2("encoded %j as %s", obj, str);
|
|
34981
|
+
return str;
|
|
34982
|
+
}
|
|
34983
|
+
encodeAsBinary(obj) {
|
|
34984
|
+
const deconstruction = binary_js_1.deconstructPacket(obj);
|
|
34985
|
+
const pack = this.encodeAsString(deconstruction.packet);
|
|
34986
|
+
const buffers = deconstruction.buffers;
|
|
34987
|
+
buffers.unshift(pack);
|
|
34988
|
+
return buffers;
|
|
34989
|
+
}
|
|
34990
|
+
}
|
|
34991
|
+
exports2.Encoder = Encoder;
|
|
34992
|
+
class Decoder extends component_emitter_12.Emitter {
|
|
34993
|
+
constructor(reviver) {
|
|
34994
|
+
super();
|
|
34995
|
+
this.reviver = reviver;
|
|
34996
|
+
}
|
|
34997
|
+
add(obj) {
|
|
34998
|
+
let packet;
|
|
34999
|
+
if (typeof obj === "string") {
|
|
35000
|
+
if (this.reconstructor) {
|
|
35001
|
+
throw new Error("got plaintext data when reconstructing a packet");
|
|
34998
35002
|
}
|
|
34999
|
-
|
|
35000
|
-
|
|
35001
|
-
|
|
35002
|
-
|
|
35003
|
-
const deconstruction = binary_js_1.deconstructPacket(obj);
|
|
35004
|
-
const pack = this.encodeAsString(deconstruction.packet);
|
|
35005
|
-
const buffers = deconstruction.buffers;
|
|
35006
|
-
buffers.unshift(pack);
|
|
35007
|
-
return buffers;
|
|
35008
|
-
}
|
|
35009
|
-
}
|
|
35010
|
-
exports2.Encoder = Encoder;
|
|
35011
|
-
class Decoder extends component_emitter_12.Emitter {
|
|
35012
|
-
constructor(reviver) {
|
|
35013
|
-
super();
|
|
35014
|
-
this.reviver = reviver;
|
|
35015
|
-
}
|
|
35016
|
-
add(obj) {
|
|
35017
|
-
let packet;
|
|
35018
|
-
if (typeof obj === "string") {
|
|
35019
|
-
if (this.reconstructor) {
|
|
35020
|
-
throw new Error("got plaintext data when reconstructing a packet");
|
|
35021
|
-
}
|
|
35022
|
-
packet = this.decodeString(obj);
|
|
35023
|
-
if (packet.type === PacketType.BINARY_EVENT || packet.type === PacketType.BINARY_ACK) {
|
|
35024
|
-
this.reconstructor = new BinaryReconstructor(packet);
|
|
35025
|
-
if (packet.attachments === 0) {
|
|
35026
|
-
super.emitReserved("decoded", packet);
|
|
35027
|
-
}
|
|
35028
|
-
} else {
|
|
35003
|
+
packet = this.decodeString(obj);
|
|
35004
|
+
if (packet.type === PacketType.BINARY_EVENT || packet.type === PacketType.BINARY_ACK) {
|
|
35005
|
+
this.reconstructor = new BinaryReconstructor(packet);
|
|
35006
|
+
if (packet.attachments === 0) {
|
|
35029
35007
|
super.emitReserved("decoded", packet);
|
|
35030
35008
|
}
|
|
35031
|
-
} else if (is_binary_js_1.isBinary(obj) || obj.base64) {
|
|
35032
|
-
if (!this.reconstructor) {
|
|
35033
|
-
throw new Error("got binary data when not reconstructing a packet");
|
|
35034
|
-
} else {
|
|
35035
|
-
packet = this.reconstructor.takeBinaryData(obj);
|
|
35036
|
-
if (packet) {
|
|
35037
|
-
this.reconstructor = null;
|
|
35038
|
-
super.emitReserved("decoded", packet);
|
|
35039
|
-
}
|
|
35040
|
-
}
|
|
35041
35009
|
} else {
|
|
35042
|
-
|
|
35043
|
-
}
|
|
35044
|
-
}
|
|
35045
|
-
decodeString(str) {
|
|
35046
|
-
let i2 = 0;
|
|
35047
|
-
const p2 = {
|
|
35048
|
-
type: Number(str.charAt(0))
|
|
35049
|
-
};
|
|
35050
|
-
if (PacketType[p2.type] === void 0) {
|
|
35051
|
-
throw new Error("unknown packet type " + p2.type);
|
|
35010
|
+
super.emitReserved("decoded", packet);
|
|
35052
35011
|
}
|
|
35053
|
-
|
|
35054
|
-
|
|
35055
|
-
|
|
35056
|
-
}
|
|
35057
|
-
const buf = str.substring(start, i2);
|
|
35058
|
-
if (buf != Number(buf) || str.charAt(i2) !== "-") {
|
|
35059
|
-
throw new Error("Illegal attachments");
|
|
35060
|
-
}
|
|
35061
|
-
p2.attachments = Number(buf);
|
|
35062
|
-
}
|
|
35063
|
-
if ("/" === str.charAt(i2 + 1)) {
|
|
35064
|
-
const start = i2 + 1;
|
|
35065
|
-
while (++i2) {
|
|
35066
|
-
const c2 = str.charAt(i2);
|
|
35067
|
-
if ("," === c2)
|
|
35068
|
-
break;
|
|
35069
|
-
if (i2 === str.length)
|
|
35070
|
-
break;
|
|
35071
|
-
}
|
|
35072
|
-
p2.nsp = str.substring(start, i2);
|
|
35012
|
+
} else if (is_binary_js_12.isBinary(obj) || obj.base64) {
|
|
35013
|
+
if (!this.reconstructor) {
|
|
35014
|
+
throw new Error("got binary data when not reconstructing a packet");
|
|
35073
35015
|
} else {
|
|
35074
|
-
|
|
35075
|
-
|
|
35076
|
-
|
|
35077
|
-
|
|
35078
|
-
const start = i2 + 1;
|
|
35079
|
-
while (++i2) {
|
|
35080
|
-
const c2 = str.charAt(i2);
|
|
35081
|
-
if (null == c2 || Number(c2) != c2) {
|
|
35082
|
-
--i2;
|
|
35083
|
-
break;
|
|
35084
|
-
}
|
|
35085
|
-
if (i2 === str.length)
|
|
35086
|
-
break;
|
|
35087
|
-
}
|
|
35088
|
-
p2.id = Number(str.substring(start, i2 + 1));
|
|
35089
|
-
}
|
|
35090
|
-
if (str.charAt(++i2)) {
|
|
35091
|
-
const payload = this.tryParse(str.substr(i2));
|
|
35092
|
-
if (Decoder.isPayloadValid(p2.type, payload)) {
|
|
35093
|
-
p2.data = payload;
|
|
35094
|
-
} else {
|
|
35095
|
-
throw new Error("invalid payload");
|
|
35016
|
+
packet = this.reconstructor.takeBinaryData(obj);
|
|
35017
|
+
if (packet) {
|
|
35018
|
+
this.reconstructor = null;
|
|
35019
|
+
super.emitReserved("decoded", packet);
|
|
35096
35020
|
}
|
|
35097
35021
|
}
|
|
35098
|
-
|
|
35099
|
-
|
|
35022
|
+
} else {
|
|
35023
|
+
throw new Error("Unknown type: " + obj);
|
|
35100
35024
|
}
|
|
35101
|
-
|
|
35102
|
-
|
|
35103
|
-
|
|
35104
|
-
|
|
35105
|
-
|
|
35025
|
+
}
|
|
35026
|
+
decodeString(str) {
|
|
35027
|
+
let i2 = 0;
|
|
35028
|
+
const p2 = {
|
|
35029
|
+
type: Number(str.charAt(0))
|
|
35030
|
+
};
|
|
35031
|
+
if (PacketType[p2.type] === void 0) {
|
|
35032
|
+
throw new Error("unknown packet type " + p2.type);
|
|
35033
|
+
}
|
|
35034
|
+
if (p2.type === PacketType.BINARY_EVENT || p2.type === PacketType.BINARY_ACK) {
|
|
35035
|
+
const start = i2 + 1;
|
|
35036
|
+
while (str.charAt(++i2) !== "-" && i2 != str.length) {
|
|
35106
35037
|
}
|
|
35038
|
+
const buf = str.substring(start, i2);
|
|
35039
|
+
if (buf != Number(buf) || str.charAt(i2) !== "-") {
|
|
35040
|
+
throw new Error("Illegal attachments");
|
|
35041
|
+
}
|
|
35042
|
+
p2.attachments = Number(buf);
|
|
35107
35043
|
}
|
|
35108
|
-
|
|
35109
|
-
|
|
35110
|
-
|
|
35111
|
-
|
|
35112
|
-
|
|
35113
|
-
|
|
35114
|
-
|
|
35115
|
-
|
|
35116
|
-
|
|
35117
|
-
|
|
35118
|
-
|
|
35119
|
-
|
|
35120
|
-
|
|
35121
|
-
|
|
35044
|
+
if ("/" === str.charAt(i2 + 1)) {
|
|
35045
|
+
const start = i2 + 1;
|
|
35046
|
+
while (++i2) {
|
|
35047
|
+
const c2 = str.charAt(i2);
|
|
35048
|
+
if ("," === c2)
|
|
35049
|
+
break;
|
|
35050
|
+
if (i2 === str.length)
|
|
35051
|
+
break;
|
|
35052
|
+
}
|
|
35053
|
+
p2.nsp = str.substring(start, i2);
|
|
35054
|
+
} else {
|
|
35055
|
+
p2.nsp = "/";
|
|
35056
|
+
}
|
|
35057
|
+
const next2 = str.charAt(i2 + 1);
|
|
35058
|
+
if ("" !== next2 && Number(next2) == next2) {
|
|
35059
|
+
const start = i2 + 1;
|
|
35060
|
+
while (++i2) {
|
|
35061
|
+
const c2 = str.charAt(i2);
|
|
35062
|
+
if (null == c2 || Number(c2) != c2) {
|
|
35063
|
+
--i2;
|
|
35064
|
+
break;
|
|
35065
|
+
}
|
|
35066
|
+
if (i2 === str.length)
|
|
35067
|
+
break;
|
|
35122
35068
|
}
|
|
35069
|
+
p2.id = Number(str.substring(start, i2 + 1));
|
|
35123
35070
|
}
|
|
35124
|
-
|
|
35125
|
-
|
|
35126
|
-
|
|
35071
|
+
if (str.charAt(++i2)) {
|
|
35072
|
+
const payload = this.tryParse(str.substr(i2));
|
|
35073
|
+
if (Decoder.isPayloadValid(p2.type, payload)) {
|
|
35074
|
+
p2.data = payload;
|
|
35075
|
+
} else {
|
|
35076
|
+
throw new Error("invalid payload");
|
|
35127
35077
|
}
|
|
35128
35078
|
}
|
|
35079
|
+
debug2("decoded %s as %j", str, p2);
|
|
35080
|
+
return p2;
|
|
35129
35081
|
}
|
|
35130
|
-
|
|
35131
|
-
|
|
35132
|
-
|
|
35133
|
-
|
|
35134
|
-
|
|
35135
|
-
this.reconPack = packet;
|
|
35082
|
+
tryParse(str) {
|
|
35083
|
+
try {
|
|
35084
|
+
return JSON.parse(str, this.reviver);
|
|
35085
|
+
} catch (e2) {
|
|
35086
|
+
return false;
|
|
35136
35087
|
}
|
|
35137
|
-
|
|
35138
|
-
|
|
35139
|
-
|
|
35140
|
-
|
|
35141
|
-
|
|
35142
|
-
|
|
35143
|
-
|
|
35144
|
-
|
|
35088
|
+
}
|
|
35089
|
+
static isPayloadValid(type4, payload) {
|
|
35090
|
+
switch (type4) {
|
|
35091
|
+
case PacketType.CONNECT:
|
|
35092
|
+
return typeof payload === "object";
|
|
35093
|
+
case PacketType.DISCONNECT:
|
|
35094
|
+
return payload === void 0;
|
|
35095
|
+
case PacketType.CONNECT_ERROR:
|
|
35096
|
+
return typeof payload === "string" || typeof payload === "object";
|
|
35097
|
+
case PacketType.EVENT:
|
|
35098
|
+
case PacketType.BINARY_EVENT:
|
|
35099
|
+
return Array.isArray(payload) && payload.length > 0;
|
|
35100
|
+
case PacketType.ACK:
|
|
35101
|
+
case PacketType.BINARY_ACK:
|
|
35102
|
+
return Array.isArray(payload);
|
|
35145
35103
|
}
|
|
35146
|
-
|
|
35147
|
-
|
|
35148
|
-
|
|
35104
|
+
}
|
|
35105
|
+
destroy() {
|
|
35106
|
+
if (this.reconstructor) {
|
|
35107
|
+
this.reconstructor.finishedReconstruction();
|
|
35149
35108
|
}
|
|
35150
35109
|
}
|
|
35151
|
-
}
|
|
35152
|
-
|
|
35153
|
-
|
|
35110
|
+
}
|
|
35111
|
+
exports2.Decoder = Decoder;
|
|
35112
|
+
class BinaryReconstructor {
|
|
35113
|
+
constructor(packet) {
|
|
35114
|
+
this.packet = packet;
|
|
35115
|
+
this.buffers = [];
|
|
35116
|
+
this.reconPack = packet;
|
|
35117
|
+
}
|
|
35118
|
+
takeBinaryData(binData) {
|
|
35119
|
+
this.buffers.push(binData);
|
|
35120
|
+
if (this.buffers.length === this.reconPack.attachments) {
|
|
35121
|
+
const packet = binary_js_1.reconstructPacket(this.reconPack, this.buffers);
|
|
35122
|
+
this.finishedReconstruction();
|
|
35123
|
+
return packet;
|
|
35124
|
+
}
|
|
35125
|
+
return null;
|
|
35126
|
+
}
|
|
35127
|
+
finishedReconstruction() {
|
|
35128
|
+
this.reconPack = null;
|
|
35129
|
+
this.buffers = [];
|
|
35130
|
+
}
|
|
35131
|
+
}
|
|
35132
|
+
})(cjs);
|
|
35154
35133
|
var on$1 = {};
|
|
35155
35134
|
Object.defineProperty(on$1, "__esModule", { value: true });
|
|
35156
35135
|
on$1.on = void 0;
|
|
@@ -35166,7 +35145,7 @@ var __importDefault$5 = commonjsGlobal$1 && commonjsGlobal$1.__importDefault ||
|
|
|
35166
35145
|
};
|
|
35167
35146
|
Object.defineProperty(socket, "__esModule", { value: true });
|
|
35168
35147
|
socket.Socket = void 0;
|
|
35169
|
-
const socket_io_parser_1 =
|
|
35148
|
+
const socket_io_parser_1 = cjs;
|
|
35170
35149
|
const on_js_1$1 = on$1;
|
|
35171
35150
|
const component_emitter_1$1 = require$$5;
|
|
35172
35151
|
const debug_1$1 = __importDefault$5(browser.exports);
|
|
@@ -35580,7 +35559,7 @@ Object.defineProperty(manager, "__esModule", { value: true });
|
|
|
35580
35559
|
manager.Manager = void 0;
|
|
35581
35560
|
const engine_io_client_1 = cjs$2;
|
|
35582
35561
|
const socket_js_1 = socket;
|
|
35583
|
-
const parser = __importStar$2(
|
|
35562
|
+
const parser = __importStar$2(cjs);
|
|
35584
35563
|
const on_js_1 = on$1;
|
|
35585
35564
|
const backo2_js_1 = backo2;
|
|
35586
35565
|
const component_emitter_1 = require$$5;
|
|
@@ -35895,7 +35874,7 @@ manager.Manager = Manager;
|
|
|
35895
35874
|
io: lookup2,
|
|
35896
35875
|
connect: lookup2
|
|
35897
35876
|
});
|
|
35898
|
-
var socket_io_parser_12 =
|
|
35877
|
+
var socket_io_parser_12 = cjs;
|
|
35899
35878
|
Object.defineProperty(exports2, "protocol", { enumerable: true, get: function() {
|
|
35900
35879
|
return socket_io_parser_12.protocol;
|
|
35901
35880
|
} });
|
|
@@ -67041,7 +67020,7 @@ Step 4: Click the blue "Join" button to join meeting.`,
|
|
|
67041
67020
|
children: hooks(date4).format("dddd, MMMM Do YYYY").toString()
|
|
67042
67021
|
}), /* @__PURE__ */ jsx("p", {
|
|
67043
67022
|
className: "text-center my-0 py-2 text-lg text-alt",
|
|
67044
|
-
children: hooks(`${date4}
|
|
67023
|
+
children: hooks(`${date4}T${time2}`).format("hh:mm A").toString()
|
|
67045
67024
|
}), /* @__PURE__ */ jsx("div", {
|
|
67046
67025
|
children: /* @__PURE__ */ jsx(Tooltip$1, {
|
|
67047
67026
|
title: /* @__PURE__ */ jsxs("div", {
|
|
@@ -67123,13 +67102,15 @@ const styles$1 = {
|
|
|
67123
67102
|
}
|
|
67124
67103
|
};
|
|
67125
67104
|
const Schedule = ({
|
|
67105
|
+
status,
|
|
67126
67106
|
actionist,
|
|
67127
67107
|
reason: reason2,
|
|
67128
67108
|
scheduledAt,
|
|
67129
67109
|
conversation,
|
|
67130
67110
|
join: join2,
|
|
67131
67111
|
reschedule,
|
|
67132
|
-
id: id2
|
|
67112
|
+
id: id2,
|
|
67113
|
+
cancelCall
|
|
67133
67114
|
}) => {
|
|
67134
67115
|
const onJoin = () => join2({
|
|
67135
67116
|
conversation
|
|
@@ -67137,6 +67118,9 @@ const Schedule = ({
|
|
|
67137
67118
|
const onReschedule = () => reschedule({
|
|
67138
67119
|
id: id2
|
|
67139
67120
|
});
|
|
67121
|
+
const onCallCancel = () => cancelCall({
|
|
67122
|
+
id: id2
|
|
67123
|
+
});
|
|
67140
67124
|
return /* @__PURE__ */ jsxs(Col$1, {
|
|
67141
67125
|
className: "my-3 border-bottom pb-3",
|
|
67142
67126
|
children: [/* @__PURE__ */ jsxs(Row$1, {
|
|
@@ -67182,7 +67166,11 @@ const Schedule = ({
|
|
|
67182
67166
|
})]
|
|
67183
67167
|
}), /* @__PURE__ */ jsxs(Row$1, {
|
|
67184
67168
|
className: "w-100 ml-4 pl-2",
|
|
67185
|
-
children: [/* @__PURE__ */ jsx(Button$1, {
|
|
67169
|
+
children: [status === "accepted" ? /* @__PURE__ */ jsx(Button$1, {
|
|
67170
|
+
onClick: onCallCancel,
|
|
67171
|
+
className: styles$2.schActionBtnPending + " border-0 rounded-pill mt-2",
|
|
67172
|
+
children: "Cancel"
|
|
67173
|
+
}) : /* @__PURE__ */ jsx(Button$1, {
|
|
67186
67174
|
onClick: onReschedule,
|
|
67187
67175
|
className: styles$2.schActionBtn + " border-0 rounded-pill mt-2",
|
|
67188
67176
|
children: "Reschedule"
|
|
@@ -67315,7 +67303,7 @@ const SlotPicker = react.exports.memo(({
|
|
|
67315
67303
|
})
|
|
67316
67304
|
}), /* @__PURE__ */ jsx(TimePicker$1, {
|
|
67317
67305
|
className: styles$2.picker,
|
|
67318
|
-
format: "HH:mm",
|
|
67306
|
+
format: "HH:mm A",
|
|
67319
67307
|
minuteStep: 30,
|
|
67320
67308
|
disabledTime,
|
|
67321
67309
|
name: "time",
|
|
@@ -67791,7 +67779,8 @@ const Schedules = react.exports.memo(function({
|
|
|
67791
67779
|
state: {
|
|
67792
67780
|
data: {
|
|
67793
67781
|
data: schedules2 = []
|
|
67794
|
-
} = {}
|
|
67782
|
+
} = {},
|
|
67783
|
+
isLoading
|
|
67795
67784
|
}
|
|
67796
67785
|
} = useRequest({
|
|
67797
67786
|
asyncRequest: calendars,
|
|
@@ -67849,6 +67838,17 @@ const Schedules = react.exports.memo(function({
|
|
|
67849
67838
|
calendar: calendar2
|
|
67850
67839
|
});
|
|
67851
67840
|
}, []);
|
|
67841
|
+
const cancelCall = react.exports.useCallback(async ({
|
|
67842
|
+
id: id2
|
|
67843
|
+
}) => {
|
|
67844
|
+
await updateCalendar(id2, {
|
|
67845
|
+
status: "cancelled"
|
|
67846
|
+
});
|
|
67847
|
+
setParentState({
|
|
67848
|
+
companyClosed: true,
|
|
67849
|
+
isScheduling: false
|
|
67850
|
+
});
|
|
67851
|
+
}, []);
|
|
67852
67852
|
return /* @__PURE__ */ jsxs(Col$1, {
|
|
67853
67853
|
className: "",
|
|
67854
67854
|
align: "middle",
|
|
@@ -67857,11 +67857,12 @@ const Schedules = react.exports.memo(function({
|
|
|
67857
67857
|
children: "Scheduled Appointments"
|
|
67858
67858
|
}), /* @__PURE__ */ jsx("div", {
|
|
67859
67859
|
className: `${styles$2.schedules} scroller`,
|
|
67860
|
-
children: (schedules2 == null ? void 0 : schedules2.length) ? schedules2.map((sch,
|
|
67860
|
+
children: isLoading ? /* @__PURE__ */ jsx(SpinFC$1, {}) : (schedules2 == null ? void 0 : schedules2.length) ? schedules2.map((sch, index2) => /* @__PURE__ */ react.exports.createElement(Schedule$1, {
|
|
67861
67861
|
...sch,
|
|
67862
67862
|
join: join2,
|
|
67863
|
+
cancelCall,
|
|
67863
67864
|
reschedule,
|
|
67864
|
-
key:
|
|
67865
|
+
key: index2
|
|
67865
67866
|
})) : /* @__PURE__ */ jsx(EmptySchedule$1, {})
|
|
67866
67867
|
}), /* @__PURE__ */ jsx(Button$1, {
|
|
67867
67868
|
type: "primary",
|
|
@@ -73095,6 +73096,7 @@ function useVideoCalling({ userId, conversation_id }) {
|
|
|
73095
73096
|
}, [ref]);
|
|
73096
73097
|
const callCleanup = react.exports.useCallback(
|
|
73097
73098
|
(setUp) => {
|
|
73099
|
+
var _a, _b;
|
|
73098
73100
|
if (ref.current.localStream) {
|
|
73099
73101
|
const { peerConnection } = ref.current;
|
|
73100
73102
|
if (document.pictureInPictureElement) {
|
|
@@ -73106,7 +73108,8 @@ function useVideoCalling({ userId, conversation_id }) {
|
|
|
73106
73108
|
peerConnection.onaddstream = null;
|
|
73107
73109
|
localVideoRef.current && (localVideoRef.current.srcObject = null);
|
|
73108
73110
|
remoteVideoRef.current && (remoteVideoRef.current.srcObject = null);
|
|
73109
|
-
ref.current.localStream.getTracks().forEach((track) => track.stop());
|
|
73111
|
+
(_a = ref.current.localStream) == null ? void 0 : _a.getTracks().forEach((track) => track.stop());
|
|
73112
|
+
(_b = ref.current.screenStream) == null ? void 0 : _b.getVideoTracks().forEach((track) => track.stop());
|
|
73110
73113
|
if (setUp) {
|
|
73111
73114
|
ref.current.peerConnection = new RTCPeerConnection(peerConnectionConfig);
|
|
73112
73115
|
}
|
|
@@ -73285,14 +73288,14 @@ function useVideoCalling({ userId, conversation_id }) {
|
|
|
73285
73288
|
};
|
|
73286
73289
|
const reject = () => {
|
|
73287
73290
|
ref.current.isInit = false;
|
|
73288
|
-
clearCalls({ callUserId: void 0 });
|
|
73289
73291
|
callCleanup(true);
|
|
73292
|
+
clearCalls({ callUserId: void 0 });
|
|
73290
73293
|
toast.error("Call Rejected");
|
|
73291
73294
|
};
|
|
73292
73295
|
const ended = () => {
|
|
73293
73296
|
ref.current.isInit = false;
|
|
73294
|
-
clearCalls({ callUserId: void 0 });
|
|
73295
73297
|
callCleanup(true);
|
|
73298
|
+
clearCalls({ callUserId: void 0 });
|
|
73296
73299
|
};
|
|
73297
73300
|
const onExpectScreenShare = (data2) => ref.current.expectScreenShare = data2.value;
|
|
73298
73301
|
const candidate = ({ candidate: candidate2 }) => {
|
|
@@ -73368,8 +73371,8 @@ function useVideoCalling({ userId, conversation_id }) {
|
|
|
73368
73371
|
if (stateRef.current.isCalling || stateRef.current.isOutgoing) {
|
|
73369
73372
|
const data2 = ref.current.data;
|
|
73370
73373
|
ref.current.isInit = false;
|
|
73371
|
-
clearCalls({ callUserId: void 0 });
|
|
73372
73374
|
callCleanup(true);
|
|
73375
|
+
clearCalls({ callUserId: void 0 });
|
|
73373
73376
|
socket2.emit("end-call", {
|
|
73374
73377
|
to: (data2 == null ? void 0 : data2.from) || stateRef.current.callUserId,
|
|
73375
73378
|
from: data2 == null ? void 0 : data2.to,
|