@pioneer-platform/pioneer-react 0.2.39 → 0.2.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +380 -401
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -47231,10 +47231,10 @@
47231
47231
  return fn.apply(thisArg, arguments);
47232
47232
  };
47233
47233
  }
47234
- const { toString: toString$g } = Object.prototype;
47234
+ const { toString: toString$h } = Object.prototype;
47235
47235
  const { getPrototypeOf: getPrototypeOf$3 } = Object;
47236
47236
  const kindOf$1 = ((cache) => (thing) => {
47237
- const str2 = toString$g.call(thing);
47237
+ const str2 = toString$h.call(thing);
47238
47238
  return cache[str2] || (cache[str2] = str2.slice(8, -1).toLowerCase());
47239
47239
  })(/* @__PURE__ */ Object.create(null));
47240
47240
  const kindOfTest$1 = (type2) => {
@@ -50040,10 +50040,10 @@
50040
50040
  };
50041
50041
  };
50042
50042
  var uncurryThis$k = functionUncurryThis;
50043
- var toString$f = uncurryThis$k({}.toString);
50043
+ var toString$g = uncurryThis$k({}.toString);
50044
50044
  var stringSlice$1 = uncurryThis$k("".slice);
50045
50045
  var classofRaw$2 = function(it) {
50046
- return stringSlice$1(toString$f(it), 8, -1);
50046
+ return stringSlice$1(toString$g(it), 8, -1);
50047
50047
  };
50048
50048
  var classofRaw$1 = classofRaw$2;
50049
50049
  var uncurryThis$j = functionUncurryThis;
@@ -50257,9 +50257,9 @@
50257
50257
  var uncurryThis$f = functionUncurryThis;
50258
50258
  var id$2 = 0;
50259
50259
  var postfix = Math.random();
50260
- var toString$e = uncurryThis$f(1 .toString);
50260
+ var toString$f = uncurryThis$f(1 .toString);
50261
50261
  var uid$3 = function(key2) {
50262
- return "Symbol(" + (key2 === void 0 ? "" : key2) + ")_" + toString$e(++id$2 + postfix, 36);
50262
+ return "Symbol(" + (key2 === void 0 ? "" : key2) + ")_" + toString$f(++id$2 + postfix, 36);
50263
50263
  };
50264
50264
  var global$8 = global$e;
50265
50265
  var shared$6 = sharedExports;
@@ -50652,7 +50652,7 @@
50652
50652
  };
50653
50653
  var classof$7 = classof$8;
50654
50654
  var $String$1 = String;
50655
- var toString$d = function(argument) {
50655
+ var toString$e = function(argument) {
50656
50656
  if (classof$7(argument) === "Symbol")
50657
50657
  throw TypeError("Cannot convert a Symbol value to a string");
50658
50658
  return $String$1(argument);
@@ -50844,7 +50844,7 @@
50844
50844
  var defineProperty$9 = objectDefineProperty.f;
50845
50845
  var createNonEnumerableProperty$2 = createNonEnumerableProperty$5;
50846
50846
  var hasOwn$a = hasOwnProperty_1;
50847
- var toString$c = objectToString$4;
50847
+ var toString$d = objectToString$4;
50848
50848
  var wellKnownSymbol$9 = wellKnownSymbol$f;
50849
50849
  var TO_STRING_TAG$1 = wellKnownSymbol$9("toStringTag");
50850
50850
  var setToStringTag$5 = function(it, TAG2, STATIC, SET_METHOD) {
@@ -50854,7 +50854,7 @@
50854
50854
  defineProperty$9(target, TO_STRING_TAG$1, { configurable: true, value: TAG2 });
50855
50855
  }
50856
50856
  if (SET_METHOD && !TO_STRING_TAG_SUPPORT) {
50857
- createNonEnumerableProperty$2(target, "toString", toString$c);
50857
+ createNonEnumerableProperty$2(target, "toString", toString$d);
50858
50858
  }
50859
50859
  }
50860
50860
  };
@@ -51103,7 +51103,7 @@
51103
51103
  var anObject$1 = anObject$5;
51104
51104
  var toIndexedObject$3 = toIndexedObject$9;
51105
51105
  var toPropertyKey$1 = toPropertyKey$5;
51106
- var $toString = toString$d;
51106
+ var $toString = toString$e;
51107
51107
  var createPropertyDescriptor$1 = createPropertyDescriptor$5;
51108
51108
  var nativeObjectCreate = objectCreate;
51109
51109
  var objectKeys$4 = objectKeys$6;
@@ -51326,14 +51326,14 @@
51326
51326
  var $$h = _export;
51327
51327
  var getBuiltIn$5 = getBuiltIn$a;
51328
51328
  var hasOwn$7 = hasOwnProperty_1;
51329
- var toString$b = toString$d;
51329
+ var toString$c = toString$e;
51330
51330
  var shared$2 = sharedExports;
51331
51331
  var NATIVE_SYMBOL_REGISTRY$1 = symbolRegistryDetection;
51332
51332
  var StringToSymbolRegistry = shared$2("string-to-symbol-registry");
51333
51333
  var SymbolToStringRegistry$1 = shared$2("symbol-to-string-registry");
51334
51334
  $$h({ target: "Symbol", stat: true, forced: !NATIVE_SYMBOL_REGISTRY$1 }, {
51335
51335
  "for": function(key2) {
51336
- var string2 = toString$b(key2);
51336
+ var string2 = toString$c(key2);
51337
51337
  if (hasOwn$7(StringToSymbolRegistry, string2))
51338
51338
  return StringToSymbolRegistry[string2];
51339
51339
  var symbol2 = getBuiltIn$5("Symbol")(string2);
@@ -51363,7 +51363,7 @@
51363
51363
  var isArray$l = isArray$n;
51364
51364
  var isCallable$3 = isCallable$f;
51365
51365
  var classof$2 = classofRaw$2;
51366
- var toString$a = toString$d;
51366
+ var toString$b = toString$e;
51367
51367
  var push$8 = uncurryThis$6([].push);
51368
51368
  var getJsonReplacerFunction = function(replacer) {
51369
51369
  if (isCallable$3(replacer))
@@ -51377,7 +51377,7 @@
51377
51377
  if (typeof element == "string")
51378
51378
  push$8(keys2, element);
51379
51379
  else if (typeof element == "number" || classof$2(element) == "Number" || classof$2(element) == "String")
51380
- push$8(keys2, toString$a(element));
51380
+ push$8(keys2, toString$b(element));
51381
51381
  }
51382
51382
  var keysLength = keys2.length;
51383
51383
  var root2 = true;
@@ -52208,14 +52208,14 @@
52208
52208
  const _Symbol$1 = /* @__PURE__ */ getDefaultExportFromCjs(symbol);
52209
52209
  var uncurryThis$1 = functionUncurryThis;
52210
52210
  var toIntegerOrInfinity = toIntegerOrInfinity$3;
52211
- var toString$9 = toString$d;
52211
+ var toString$a = toString$e;
52212
52212
  var requireObjectCoercible = requireObjectCoercible$3;
52213
52213
  var charAt$1 = uncurryThis$1("".charAt);
52214
52214
  var charCodeAt = uncurryThis$1("".charCodeAt);
52215
52215
  var stringSlice = uncurryThis$1("".slice);
52216
52216
  var createMethod = function(CONVERT_TO_STRING) {
52217
52217
  return function($this, pos) {
52218
- var S = toString$9(requireObjectCoercible($this));
52218
+ var S = toString$a(requireObjectCoercible($this));
52219
52219
  var position2 = toIntegerOrInfinity(pos);
52220
52220
  var size2 = S.length;
52221
52221
  var first2, second;
@@ -52234,7 +52234,7 @@
52234
52234
  charAt: createMethod(true)
52235
52235
  };
52236
52236
  var charAt = stringMultibyte.charAt;
52237
- var toString$8 = toString$d;
52237
+ var toString$9 = toString$e;
52238
52238
  var InternalStateModule = internalState;
52239
52239
  var defineIterator = iteratorDefine;
52240
52240
  var createIterResultObject = createIterResultObject$2;
@@ -52244,7 +52244,7 @@
52244
52244
  defineIterator(String, "String", function(iterated) {
52245
52245
  setInternalState(this, {
52246
52246
  type: STRING_ITERATOR,
52247
- string: toString$8(iterated),
52247
+ string: toString$9(iterated),
52248
52248
  index: 0
52249
52249
  });
52250
52250
  }, function next() {
@@ -56488,14 +56488,14 @@
56488
56488
  }
56489
56489
  return result;
56490
56490
  }
56491
- function isBinary$1(obj) {
56491
+ function isBinary$2(obj) {
56492
56492
  return Object.prototype.toString.call(obj) === "[object Uint8Array]";
56493
56493
  }
56494
56494
  var binary$1 = new type$5("tag:yaml.org,2002:binary", {
56495
56495
  kind: "scalar",
56496
56496
  resolve: resolveYamlBinary,
56497
56497
  construct: constructYamlBinary,
56498
- predicate: isBinary$1,
56498
+ predicate: isBinary$2,
56499
56499
  represent: representYamlBinary
56500
56500
  });
56501
56501
  var _hasOwnProperty$3 = Object.prototype.hasOwnProperty;
@@ -61864,16 +61864,16 @@
61864
61864
  }
61865
61865
  var _baseToString = baseToString$1;
61866
61866
  var baseToString = _baseToString;
61867
- function toString$7(value2) {
61867
+ function toString$8(value2) {
61868
61868
  return value2 == null ? "" : baseToString(value2);
61869
61869
  }
61870
- var toString_1 = toString$7;
61871
- var isArray$8 = isArray_1, isKey = _isKey, stringToPath = _stringToPath, toString$6 = toString_1;
61870
+ var toString_1 = toString$8;
61871
+ var isArray$8 = isArray_1, isKey = _isKey, stringToPath = _stringToPath, toString$7 = toString_1;
61872
61872
  function castPath$1(value2, object2) {
61873
61873
  if (isArray$8(value2)) {
61874
61874
  return value2;
61875
61875
  }
61876
- return isKey(value2, object2) ? [value2] : stringToPath(toString$6(value2));
61876
+ return isKey(value2, object2) ? [value2] : stringToPath(toString$7(value2));
61877
61877
  }
61878
61878
  var _castPath = castPath$1;
61879
61879
  var isSymbol = isSymbol_1;
@@ -62230,10 +62230,10 @@
62230
62230
  }
62231
62231
  }
62232
62232
  const _objectIs$1 = typeof Object.is === "function" ? Object.is : _objectIs;
62233
- var toString$5 = Object.prototype.toString;
62233
+ var toString$6 = Object.prototype.toString;
62234
62234
  var _isArguments = /* @__PURE__ */ function() {
62235
- return toString$5.call(arguments) === "[object Arguments]" ? function _isArguments2(x2) {
62236
- return toString$5.call(x2) === "[object Arguments]";
62235
+ return toString$6.call(arguments) === "[object Arguments]" ? function _isArguments2(x2) {
62236
+ return toString$6.call(x2) === "[object Arguments]";
62237
62237
  } : function _isArguments2(x2) {
62238
62238
  return _has("callee", x2);
62239
62239
  };
@@ -62573,10 +62573,10 @@
62573
62573
  return "{" + mapPairs(x2, keys$6(x2)).join(", ") + "}";
62574
62574
  }
62575
62575
  }
62576
- var toString$3 = /* @__PURE__ */ _curry1(function toString2(val) {
62576
+ var toString$4 = /* @__PURE__ */ _curry1(function toString2(val) {
62577
62577
  return _toString(val, []);
62578
62578
  });
62579
- const toString$4 = toString$3;
62579
+ const toString$5 = toString$4;
62580
62580
  var max$1 = /* @__PURE__ */ _curry2(function max2(a2, b) {
62581
62581
  if (a2 === b) {
62582
62582
  return b;
@@ -62595,8 +62595,8 @@
62595
62595
  if (maxByType !== void 0) {
62596
62596
  return maxByType === typeof a2 ? a2 : b;
62597
62597
  }
62598
- var stringA = toString$4(a2);
62599
- var maxByStringValue = safeMax(stringA, toString$4(b));
62598
+ var stringA = toString$5(a2);
62599
+ var maxByStringValue = safeMax(stringA, toString$5(b));
62600
62600
  if (maxByStringValue !== void 0) {
62601
62601
  return maxByStringValue === stringA ? a2 : b;
62602
62602
  }
@@ -63449,7 +63449,7 @@
63449
63449
  if (target != null && _isFunction(target[method2])) {
63450
63450
  return target[method2].apply(target, Array.prototype.slice.call(arguments, 0, arity));
63451
63451
  }
63452
- throw new TypeError(toString$4(target) + ' does not have a method named "' + method2 + '"');
63452
+ throw new TypeError(toString$5(target) + ' does not have a method named "' + method2 + '"');
63453
63453
  });
63454
63454
  });
63455
63455
  const invoker$1 = invoker;
@@ -63614,7 +63614,7 @@
63614
63614
  }
63615
63615
  var test = /* @__PURE__ */ _curry2(function test2(pattern2, str2) {
63616
63616
  if (!_isRegExp(pattern2)) {
63617
- throw new TypeError("‘test’ requires a value of type RegExp as its first argument; received " + toString$4(pattern2));
63617
+ throw new TypeError("‘test’ requires a value of type RegExp as its first argument; received " + toString$5(pattern2));
63618
63618
  }
63619
63619
  return _cloneRegExp(pattern2).test(str2);
63620
63620
  });
@@ -63716,7 +63716,7 @@
63716
63716
  var isObjLike = curryN$1(1, both$1(isNotNull$1, isOfTypeObject$1));
63717
63717
  const isObjLike$1 = isObjLike;
63718
63718
  var isObject$8 = pipe(type$4, identical$1("Object"));
63719
- var isObjectConstructor = pipe(toString$4, equals$1(toString$4(Object)));
63719
+ var isObjectConstructor = pipe(toString$5, equals$1(toString$5(Object)));
63720
63720
  var hasObjectConstructor = pathSatisfies$1(both$1(isFunction$3, isObjectConstructor), ["constructor"]);
63721
63721
  var isPlainObj = curryN$1(1, function(val) {
63722
63722
  if (!isObjLike$1(val) || !isObject$8(val)) {
@@ -86156,19 +86156,19 @@ CAUSE: ${cause === null || cause === void 0 ? void 0 : cause.stack}`;
86156
86156
  Object.defineProperty(encodePacket_browser, "__esModule", { value: true });
86157
86157
  encodePacket_browser.encodePacket = encodePacket_browser.encodePacketToBinary = void 0;
86158
86158
  const commons_js_1$1 = commons;
86159
- const withNativeBlob = typeof Blob === "function" || typeof Blob !== "undefined" && Object.prototype.toString.call(Blob) === "[object BlobConstructor]";
86160
- const withNativeArrayBuffer$1 = typeof ArrayBuffer === "function";
86161
- const isView$1 = (obj) => {
86159
+ const withNativeBlob$1 = typeof Blob === "function" || typeof Blob !== "undefined" && Object.prototype.toString.call(Blob) === "[object BlobConstructor]";
86160
+ const withNativeArrayBuffer$2 = typeof ArrayBuffer === "function";
86161
+ const isView$2 = (obj) => {
86162
86162
  return typeof ArrayBuffer.isView === "function" ? ArrayBuffer.isView(obj) : obj && obj.buffer instanceof ArrayBuffer;
86163
86163
  };
86164
86164
  const encodePacket = ({ type: type2, data: data2 }, supportsBinary, callback) => {
86165
- if (withNativeBlob && data2 instanceof Blob) {
86165
+ if (withNativeBlob$1 && data2 instanceof Blob) {
86166
86166
  if (supportsBinary) {
86167
86167
  return callback(data2);
86168
86168
  } else {
86169
86169
  return encodeBlobAsBase64(data2, callback);
86170
86170
  }
86171
- } else if (withNativeArrayBuffer$1 && (data2 instanceof ArrayBuffer || isView$1(data2))) {
86171
+ } else if (withNativeArrayBuffer$2 && (data2 instanceof ArrayBuffer || isView$2(data2))) {
86172
86172
  if (supportsBinary) {
86173
86173
  return callback(data2);
86174
86174
  } else {
@@ -86197,9 +86197,9 @@ CAUSE: ${cause === null || cause === void 0 ? void 0 : cause.stack}`;
86197
86197
  }
86198
86198
  let TEXT_ENCODER;
86199
86199
  function encodePacketToBinary(packet, callback) {
86200
- if (withNativeBlob && packet.data instanceof Blob) {
86200
+ if (withNativeBlob$1 && packet.data instanceof Blob) {
86201
86201
  return packet.data.arrayBuffer().then(toArray$1).then(callback);
86202
- } else if (withNativeArrayBuffer$1 && (packet.data instanceof ArrayBuffer || isView$1(packet.data))) {
86202
+ } else if (withNativeArrayBuffer$2 && (packet.data instanceof ArrayBuffer || isView$2(packet.data))) {
86203
86203
  return callback(toArray$1(packet.data));
86204
86204
  }
86205
86205
  encodePacket(packet, false, (encoded) => {
@@ -86260,7 +86260,7 @@ CAUSE: ${cause === null || cause === void 0 ? void 0 : cause.stack}`;
86260
86260
  decodePacket_browser.decodePacket = void 0;
86261
86261
  const commons_js_1 = commons;
86262
86262
  const base64_arraybuffer_js_1 = base64Arraybuffer;
86263
- const withNativeArrayBuffer = typeof ArrayBuffer === "function";
86263
+ const withNativeArrayBuffer$1 = typeof ArrayBuffer === "function";
86264
86264
  const decodePacket = (encodedPacket, binaryType) => {
86265
86265
  if (typeof encodedPacket !== "string") {
86266
86266
  return {
@@ -86288,7 +86288,7 @@ CAUSE: ${cause === null || cause === void 0 ? void 0 : cause.stack}`;
86288
86288
  };
86289
86289
  decodePacket_browser.decodePacket = decodePacket;
86290
86290
  const decodeBase64Packet = (data2, binaryType) => {
86291
- if (withNativeArrayBuffer) {
86291
+ if (withNativeArrayBuffer$1) {
86292
86292
  const decoded = (0, base64_arraybuffer_js_1.decode)(data2);
86293
86293
  return mapBinary(decoded, binaryType);
86294
86294
  } else {
@@ -88580,400 +88580,379 @@ CAUSE: ${cause === null || cause === void 0 ? void 0 : cause.stack}`;
88580
88580
  var socket = {};
88581
88581
  var cjs = {};
88582
88582
  var binary = {};
88583
- var isBinary = {};
88584
- var hasRequiredIsBinary;
88585
- function requireIsBinary() {
88586
- if (hasRequiredIsBinary)
88587
- return isBinary;
88588
- hasRequiredIsBinary = 1;
88589
- Object.defineProperty(isBinary, "__esModule", { value: true });
88590
- isBinary.hasBinary = isBinary.isBinary = void 0;
88591
- const withNativeArrayBuffer2 = typeof ArrayBuffer === "function";
88592
- const isView2 = (obj) => {
88593
- return typeof ArrayBuffer.isView === "function" ? ArrayBuffer.isView(obj) : obj.buffer instanceof ArrayBuffer;
88594
- };
88595
- const toString2 = Object.prototype.toString;
88596
- const withNativeBlob2 = typeof Blob === "function" || typeof Blob !== "undefined" && toString2.call(Blob) === "[object BlobConstructor]";
88597
- const withNativeFile = typeof File === "function" || typeof File !== "undefined" && toString2.call(File) === "[object FileConstructor]";
88598
- function isBinary$12(obj) {
88599
- return withNativeArrayBuffer2 && (obj instanceof ArrayBuffer || isView2(obj)) || withNativeBlob2 && obj instanceof Blob || withNativeFile && obj instanceof File;
88600
- }
88601
- isBinary.isBinary = isBinary$12;
88602
- function hasBinary(obj, toJSON) {
88603
- if (!obj || typeof obj !== "object") {
88604
- return false;
88605
- }
88606
- if (Array.isArray(obj)) {
88607
- for (let i2 = 0, l2 = obj.length; i2 < l2; i2++) {
88608
- if (hasBinary(obj[i2])) {
88609
- return true;
88610
- }
88583
+ var isBinary$1 = {};
88584
+ Object.defineProperty(isBinary$1, "__esModule", { value: true });
88585
+ isBinary$1.hasBinary = isBinary$1.isBinary = void 0;
88586
+ const withNativeArrayBuffer = typeof ArrayBuffer === "function";
88587
+ const isView$1 = (obj) => {
88588
+ return typeof ArrayBuffer.isView === "function" ? ArrayBuffer.isView(obj) : obj.buffer instanceof ArrayBuffer;
88589
+ };
88590
+ const toString$3 = Object.prototype.toString;
88591
+ const withNativeBlob = typeof Blob === "function" || typeof Blob !== "undefined" && toString$3.call(Blob) === "[object BlobConstructor]";
88592
+ const withNativeFile = typeof File === "function" || typeof File !== "undefined" && toString$3.call(File) === "[object FileConstructor]";
88593
+ function isBinary(obj) {
88594
+ return withNativeArrayBuffer && (obj instanceof ArrayBuffer || isView$1(obj)) || withNativeBlob && obj instanceof Blob || withNativeFile && obj instanceof File;
88595
+ }
88596
+ isBinary$1.isBinary = isBinary;
88597
+ function hasBinary(obj, toJSON) {
88598
+ if (!obj || typeof obj !== "object") {
88599
+ return false;
88600
+ }
88601
+ if (Array.isArray(obj)) {
88602
+ for (let i2 = 0, l2 = obj.length; i2 < l2; i2++) {
88603
+ if (hasBinary(obj[i2])) {
88604
+ return true;
88611
88605
  }
88612
- return false;
88613
88606
  }
88614
- if (isBinary$12(obj)) {
88607
+ return false;
88608
+ }
88609
+ if (isBinary(obj)) {
88610
+ return true;
88611
+ }
88612
+ if (obj.toJSON && typeof obj.toJSON === "function" && arguments.length === 1) {
88613
+ return hasBinary(obj.toJSON(), true);
88614
+ }
88615
+ for (const key2 in obj) {
88616
+ if (Object.prototype.hasOwnProperty.call(obj, key2) && hasBinary(obj[key2])) {
88615
88617
  return true;
88616
88618
  }
88617
- if (obj.toJSON && typeof obj.toJSON === "function" && arguments.length === 1) {
88618
- return hasBinary(obj.toJSON(), true);
88619
+ }
88620
+ return false;
88621
+ }
88622
+ isBinary$1.hasBinary = hasBinary;
88623
+ Object.defineProperty(binary, "__esModule", { value: true });
88624
+ binary.reconstructPacket = binary.deconstructPacket = void 0;
88625
+ const is_binary_js_1 = isBinary$1;
88626
+ function deconstructPacket(packet) {
88627
+ const buffers = [];
88628
+ const packetData = packet.data;
88629
+ const pack2 = packet;
88630
+ pack2.data = _deconstructPacket(packetData, buffers);
88631
+ pack2.attachments = buffers.length;
88632
+ return { packet: pack2, buffers };
88633
+ }
88634
+ binary.deconstructPacket = deconstructPacket;
88635
+ function _deconstructPacket(data2, buffers) {
88636
+ if (!data2)
88637
+ return data2;
88638
+ if ((0, is_binary_js_1.isBinary)(data2)) {
88639
+ const placeholder = { _placeholder: true, num: buffers.length };
88640
+ buffers.push(data2);
88641
+ return placeholder;
88642
+ } else if (Array.isArray(data2)) {
88643
+ const newData = new Array(data2.length);
88644
+ for (let i2 = 0; i2 < data2.length; i2++) {
88645
+ newData[i2] = _deconstructPacket(data2[i2], buffers);
88619
88646
  }
88620
- for (const key2 in obj) {
88621
- if (Object.prototype.hasOwnProperty.call(obj, key2) && hasBinary(obj[key2])) {
88622
- return true;
88647
+ return newData;
88648
+ } else if (typeof data2 === "object" && !(data2 instanceof Date)) {
88649
+ const newData = {};
88650
+ for (const key2 in data2) {
88651
+ if (Object.prototype.hasOwnProperty.call(data2, key2)) {
88652
+ newData[key2] = _deconstructPacket(data2[key2], buffers);
88623
88653
  }
88624
88654
  }
88625
- return false;
88655
+ return newData;
88626
88656
  }
88627
- isBinary.hasBinary = hasBinary;
88628
- return isBinary;
88629
- }
88630
- var hasRequiredBinary;
88631
- function requireBinary() {
88632
- if (hasRequiredBinary)
88633
- return binary;
88634
- hasRequiredBinary = 1;
88635
- Object.defineProperty(binary, "__esModule", { value: true });
88636
- binary.reconstructPacket = binary.deconstructPacket = void 0;
88637
- const is_binary_js_1 = requireIsBinary();
88638
- function deconstructPacket(packet) {
88639
- const buffers = [];
88640
- const packetData = packet.data;
88641
- const pack2 = packet;
88642
- pack2.data = _deconstructPacket(packetData, buffers);
88643
- pack2.attachments = buffers.length;
88644
- return { packet: pack2, buffers };
88645
- }
88646
- binary.deconstructPacket = deconstructPacket;
88647
- function _deconstructPacket(data2, buffers) {
88648
- if (!data2)
88649
- return data2;
88650
- if ((0, is_binary_js_1.isBinary)(data2)) {
88651
- const placeholder = { _placeholder: true, num: buffers.length };
88652
- buffers.push(data2);
88653
- return placeholder;
88654
- } else if (Array.isArray(data2)) {
88655
- const newData = new Array(data2.length);
88656
- for (let i2 = 0; i2 < data2.length; i2++) {
88657
- newData[i2] = _deconstructPacket(data2[i2], buffers);
88658
- }
88659
- return newData;
88660
- } else if (typeof data2 === "object" && !(data2 instanceof Date)) {
88661
- const newData = {};
88662
- for (const key2 in data2) {
88663
- if (Object.prototype.hasOwnProperty.call(data2, key2)) {
88664
- newData[key2] = _deconstructPacket(data2[key2], buffers);
88665
- }
88657
+ return data2;
88658
+ }
88659
+ function reconstructPacket(packet, buffers) {
88660
+ packet.data = _reconstructPacket(packet.data, buffers);
88661
+ delete packet.attachments;
88662
+ return packet;
88663
+ }
88664
+ binary.reconstructPacket = reconstructPacket;
88665
+ function _reconstructPacket(data2, buffers) {
88666
+ if (!data2)
88667
+ return data2;
88668
+ if (data2 && data2._placeholder === true) {
88669
+ const isIndexValid = typeof data2.num === "number" && data2.num >= 0 && data2.num < buffers.length;
88670
+ if (isIndexValid) {
88671
+ return buffers[data2.num];
88672
+ } else {
88673
+ throw new Error("illegal attachments");
88674
+ }
88675
+ } else if (Array.isArray(data2)) {
88676
+ for (let i2 = 0; i2 < data2.length; i2++) {
88677
+ data2[i2] = _reconstructPacket(data2[i2], buffers);
88678
+ }
88679
+ } else if (typeof data2 === "object") {
88680
+ for (const key2 in data2) {
88681
+ if (Object.prototype.hasOwnProperty.call(data2, key2)) {
88682
+ data2[key2] = _reconstructPacket(data2[key2], buffers);
88666
88683
  }
88667
- return newData;
88668
88684
  }
88669
- return data2;
88670
88685
  }
88671
- function reconstructPacket(packet, buffers) {
88672
- packet.data = _reconstructPacket(packet.data, buffers);
88673
- delete packet.attachments;
88674
- return packet;
88675
- }
88676
- binary.reconstructPacket = reconstructPacket;
88677
- function _reconstructPacket(data2, buffers) {
88678
- if (!data2)
88679
- return data2;
88680
- if (data2 && data2._placeholder === true) {
88681
- const isIndexValid = typeof data2.num === "number" && data2.num >= 0 && data2.num < buffers.length;
88682
- if (isIndexValid) {
88683
- return buffers[data2.num];
88684
- } else {
88685
- throw new Error("illegal attachments");
88686
- }
88687
- } else if (Array.isArray(data2)) {
88688
- for (let i2 = 0; i2 < data2.length; i2++) {
88689
- data2[i2] = _reconstructPacket(data2[i2], buffers);
88690
- }
88691
- } else if (typeof data2 === "object") {
88692
- for (const key2 in data2) {
88693
- if (Object.prototype.hasOwnProperty.call(data2, key2)) {
88694
- data2[key2] = _reconstructPacket(data2[key2], buffers);
88686
+ return data2;
88687
+ }
88688
+ (function(exports2) {
88689
+ Object.defineProperty(exports2, "__esModule", { value: true });
88690
+ exports2.Decoder = exports2.Encoder = exports2.PacketType = exports2.protocol = void 0;
88691
+ const component_emitter_12 = require$$5$1;
88692
+ const binary_js_1 = binary;
88693
+ const is_binary_js_12 = isBinary$1;
88694
+ const debug_12 = browserExports$2;
88695
+ const debug2 = (0, debug_12.default)("socket.io-parser");
88696
+ const RESERVED_EVENTS2 = [
88697
+ "connect",
88698
+ "connect_error",
88699
+ "disconnect",
88700
+ "disconnecting",
88701
+ "newListener",
88702
+ "removeListener"
88703
+ // used by the Node.js EventEmitter
88704
+ ];
88705
+ exports2.protocol = 5;
88706
+ var PacketType;
88707
+ (function(PacketType2) {
88708
+ PacketType2[PacketType2["CONNECT"] = 0] = "CONNECT";
88709
+ PacketType2[PacketType2["DISCONNECT"] = 1] = "DISCONNECT";
88710
+ PacketType2[PacketType2["EVENT"] = 2] = "EVENT";
88711
+ PacketType2[PacketType2["ACK"] = 3] = "ACK";
88712
+ PacketType2[PacketType2["CONNECT_ERROR"] = 4] = "CONNECT_ERROR";
88713
+ PacketType2[PacketType2["BINARY_EVENT"] = 5] = "BINARY_EVENT";
88714
+ PacketType2[PacketType2["BINARY_ACK"] = 6] = "BINARY_ACK";
88715
+ })(PacketType = exports2.PacketType || (exports2.PacketType = {}));
88716
+ class Encoder {
88717
+ /**
88718
+ * Encoder constructor
88719
+ *
88720
+ * @param {function} replacer - custom replacer to pass down to JSON.parse
88721
+ */
88722
+ constructor(replacer) {
88723
+ this.replacer = replacer;
88724
+ }
88725
+ /**
88726
+ * Encode a packet as a single string if non-binary, or as a
88727
+ * buffer sequence, depending on packet type.
88728
+ *
88729
+ * @param {Object} obj - packet object
88730
+ */
88731
+ encode(obj) {
88732
+ debug2("encoding packet %j", obj);
88733
+ if (obj.type === PacketType.EVENT || obj.type === PacketType.ACK) {
88734
+ if ((0, is_binary_js_12.hasBinary)(obj)) {
88735
+ return this.encodeAsBinary({
88736
+ type: obj.type === PacketType.EVENT ? PacketType.BINARY_EVENT : PacketType.BINARY_ACK,
88737
+ nsp: obj.nsp,
88738
+ data: obj.data,
88739
+ id: obj.id
88740
+ });
88695
88741
  }
88696
88742
  }
88743
+ return [this.encodeAsString(obj)];
88697
88744
  }
88698
- return data2;
88699
- }
88700
- return binary;
88701
- }
88702
- var hasRequiredCjs;
88703
- function requireCjs() {
88704
- if (hasRequiredCjs)
88705
- return cjs;
88706
- hasRequiredCjs = 1;
88707
- (function(exports2) {
88708
- Object.defineProperty(exports2, "__esModule", { value: true });
88709
- exports2.Decoder = exports2.Encoder = exports2.PacketType = exports2.protocol = void 0;
88710
- const component_emitter_12 = require$$5$1;
88711
- const binary_js_1 = requireBinary();
88712
- const is_binary_js_1 = requireIsBinary();
88713
- const debug_12 = browserExports$2;
88714
- const debug2 = (0, debug_12.default)("socket.io-parser");
88715
- const RESERVED_EVENTS2 = [
88716
- "connect",
88717
- "connect_error",
88718
- "disconnect",
88719
- "disconnecting",
88720
- "newListener",
88721
- "removeListener"
88722
- // used by the Node.js EventEmitter
88723
- ];
88724
- exports2.protocol = 5;
88725
- var PacketType;
88726
- (function(PacketType2) {
88727
- PacketType2[PacketType2["CONNECT"] = 0] = "CONNECT";
88728
- PacketType2[PacketType2["DISCONNECT"] = 1] = "DISCONNECT";
88729
- PacketType2[PacketType2["EVENT"] = 2] = "EVENT";
88730
- PacketType2[PacketType2["ACK"] = 3] = "ACK";
88731
- PacketType2[PacketType2["CONNECT_ERROR"] = 4] = "CONNECT_ERROR";
88732
- PacketType2[PacketType2["BINARY_EVENT"] = 5] = "BINARY_EVENT";
88733
- PacketType2[PacketType2["BINARY_ACK"] = 6] = "BINARY_ACK";
88734
- })(PacketType = exports2.PacketType || (exports2.PacketType = {}));
88735
- class Encoder {
88736
- /**
88737
- * Encoder constructor
88738
- *
88739
- * @param {function} replacer - custom replacer to pass down to JSON.parse
88740
- */
88741
- constructor(replacer) {
88742
- this.replacer = replacer;
88745
+ /**
88746
+ * Encode packet as string.
88747
+ */
88748
+ encodeAsString(obj) {
88749
+ let str2 = "" + obj.type;
88750
+ if (obj.type === PacketType.BINARY_EVENT || obj.type === PacketType.BINARY_ACK) {
88751
+ str2 += obj.attachments + "-";
88743
88752
  }
88744
- /**
88745
- * Encode a packet as a single string if non-binary, or as a
88746
- * buffer sequence, depending on packet type.
88747
- *
88748
- * @param {Object} obj - packet object
88749
- */
88750
- encode(obj) {
88751
- debug2("encoding packet %j", obj);
88752
- if (obj.type === PacketType.EVENT || obj.type === PacketType.ACK) {
88753
- if ((0, is_binary_js_1.hasBinary)(obj)) {
88754
- return this.encodeAsBinary({
88755
- type: obj.type === PacketType.EVENT ? PacketType.BINARY_EVENT : PacketType.BINARY_ACK,
88756
- nsp: obj.nsp,
88757
- data: obj.data,
88758
- id: obj.id
88759
- });
88760
- }
88761
- }
88762
- return [this.encodeAsString(obj)];
88753
+ if (obj.nsp && "/" !== obj.nsp) {
88754
+ str2 += obj.nsp + ",";
88763
88755
  }
88764
- /**
88765
- * Encode packet as string.
88766
- */
88767
- encodeAsString(obj) {
88768
- let str2 = "" + obj.type;
88769
- if (obj.type === PacketType.BINARY_EVENT || obj.type === PacketType.BINARY_ACK) {
88770
- str2 += obj.attachments + "-";
88771
- }
88772
- if (obj.nsp && "/" !== obj.nsp) {
88773
- str2 += obj.nsp + ",";
88774
- }
88775
- if (null != obj.id) {
88776
- str2 += obj.id;
88777
- }
88778
- if (null != obj.data) {
88779
- str2 += JSON.stringify(obj.data, this.replacer);
88780
- }
88781
- debug2("encoded %j as %s", obj, str2);
88782
- return str2;
88756
+ if (null != obj.id) {
88757
+ str2 += obj.id;
88783
88758
  }
88784
- /**
88785
- * Encode packet as 'buffer sequence' by removing blobs, and
88786
- * deconstructing packet into object with placeholders and
88787
- * a list of buffers.
88788
- */
88789
- encodeAsBinary(obj) {
88790
- const deconstruction = (0, binary_js_1.deconstructPacket)(obj);
88791
- const pack2 = this.encodeAsString(deconstruction.packet);
88792
- const buffers = deconstruction.buffers;
88793
- buffers.unshift(pack2);
88794
- return buffers;
88759
+ if (null != obj.data) {
88760
+ str2 += JSON.stringify(obj.data, this.replacer);
88795
88761
  }
88762
+ debug2("encoded %j as %s", obj, str2);
88763
+ return str2;
88796
88764
  }
88797
- exports2.Encoder = Encoder;
88798
- function isObject2(value2) {
88799
- return Object.prototype.toString.call(value2) === "[object Object]";
88765
+ /**
88766
+ * Encode packet as 'buffer sequence' by removing blobs, and
88767
+ * deconstructing packet into object with placeholders and
88768
+ * a list of buffers.
88769
+ */
88770
+ encodeAsBinary(obj) {
88771
+ const deconstruction = (0, binary_js_1.deconstructPacket)(obj);
88772
+ const pack2 = this.encodeAsString(deconstruction.packet);
88773
+ const buffers = deconstruction.buffers;
88774
+ buffers.unshift(pack2);
88775
+ return buffers;
88800
88776
  }
88801
- class Decoder extends component_emitter_12.Emitter {
88802
- /**
88803
- * Decoder constructor
88804
- *
88805
- * @param {function} reviver - custom reviver to pass down to JSON.stringify
88806
- */
88807
- constructor(reviver) {
88808
- super();
88809
- this.reviver = reviver;
88810
- }
88811
- /**
88812
- * Decodes an encoded packet string into packet JSON.
88813
- *
88814
- * @param {String} obj - encoded packet
88815
- */
88816
- add(obj) {
88817
- let packet;
88818
- if (typeof obj === "string") {
88819
- if (this.reconstructor) {
88820
- throw new Error("got plaintext data when reconstructing a packet");
88821
- }
88822
- packet = this.decodeString(obj);
88823
- const isBinaryEvent = packet.type === PacketType.BINARY_EVENT;
88824
- if (isBinaryEvent || packet.type === PacketType.BINARY_ACK) {
88825
- packet.type = isBinaryEvent ? PacketType.EVENT : PacketType.ACK;
88826
- this.reconstructor = new BinaryReconstructor(packet);
88827
- if (packet.attachments === 0) {
88828
- super.emitReserved("decoded", packet);
88829
- }
88830
- } else {
88777
+ }
88778
+ exports2.Encoder = Encoder;
88779
+ function isObject2(value2) {
88780
+ return Object.prototype.toString.call(value2) === "[object Object]";
88781
+ }
88782
+ class Decoder extends component_emitter_12.Emitter {
88783
+ /**
88784
+ * Decoder constructor
88785
+ *
88786
+ * @param {function} reviver - custom reviver to pass down to JSON.stringify
88787
+ */
88788
+ constructor(reviver) {
88789
+ super();
88790
+ this.reviver = reviver;
88791
+ }
88792
+ /**
88793
+ * Decodes an encoded packet string into packet JSON.
88794
+ *
88795
+ * @param {String} obj - encoded packet
88796
+ */
88797
+ add(obj) {
88798
+ let packet;
88799
+ if (typeof obj === "string") {
88800
+ if (this.reconstructor) {
88801
+ throw new Error("got plaintext data when reconstructing a packet");
88802
+ }
88803
+ packet = this.decodeString(obj);
88804
+ const isBinaryEvent = packet.type === PacketType.BINARY_EVENT;
88805
+ if (isBinaryEvent || packet.type === PacketType.BINARY_ACK) {
88806
+ packet.type = isBinaryEvent ? PacketType.EVENT : PacketType.ACK;
88807
+ this.reconstructor = new BinaryReconstructor(packet);
88808
+ if (packet.attachments === 0) {
88831
88809
  super.emitReserved("decoded", packet);
88832
88810
  }
88833
- } else if ((0, is_binary_js_1.isBinary)(obj) || obj.base64) {
88834
- if (!this.reconstructor) {
88835
- throw new Error("got binary data when not reconstructing a packet");
88836
- } else {
88837
- packet = this.reconstructor.takeBinaryData(obj);
88838
- if (packet) {
88839
- this.reconstructor = null;
88840
- super.emitReserved("decoded", packet);
88841
- }
88842
- }
88843
88811
  } else {
88844
- throw new Error("Unknown type: " + obj);
88812
+ super.emitReserved("decoded", packet);
88845
88813
  }
88846
- }
88847
- /**
88848
- * Decode a packet String (JSON data)
88849
- *
88850
- * @param {String} str
88851
- * @return {Object} packet
88852
- */
88853
- decodeString(str2) {
88854
- let i2 = 0;
88855
- const p2 = {
88856
- type: Number(str2.charAt(0))
88857
- };
88858
- if (PacketType[p2.type] === void 0) {
88859
- throw new Error("unknown packet type " + p2.type);
88860
- }
88861
- if (p2.type === PacketType.BINARY_EVENT || p2.type === PacketType.BINARY_ACK) {
88862
- const start = i2 + 1;
88863
- while (str2.charAt(++i2) !== "-" && i2 != str2.length) {
88864
- }
88865
- const buf = str2.substring(start, i2);
88866
- if (buf != Number(buf) || str2.charAt(i2) !== "-") {
88867
- throw new Error("Illegal attachments");
88868
- }
88869
- p2.attachments = Number(buf);
88870
- }
88871
- if ("/" === str2.charAt(i2 + 1)) {
88872
- const start = i2 + 1;
88873
- while (++i2) {
88874
- const c2 = str2.charAt(i2);
88875
- if ("," === c2)
88876
- break;
88877
- if (i2 === str2.length)
88878
- break;
88879
- }
88880
- p2.nsp = str2.substring(start, i2);
88814
+ } else if ((0, is_binary_js_12.isBinary)(obj) || obj.base64) {
88815
+ if (!this.reconstructor) {
88816
+ throw new Error("got binary data when not reconstructing a packet");
88881
88817
  } else {
88882
- p2.nsp = "/";
88883
- }
88884
- const next = str2.charAt(i2 + 1);
88885
- if ("" !== next && Number(next) == next) {
88886
- const start = i2 + 1;
88887
- while (++i2) {
88888
- const c2 = str2.charAt(i2);
88889
- if (null == c2 || Number(c2) != c2) {
88890
- --i2;
88891
- break;
88892
- }
88893
- if (i2 === str2.length)
88894
- break;
88895
- }
88896
- p2.id = Number(str2.substring(start, i2 + 1));
88897
- }
88898
- if (str2.charAt(++i2)) {
88899
- const payload = this.tryParse(str2.substr(i2));
88900
- if (Decoder.isPayloadValid(p2.type, payload)) {
88901
- p2.data = payload;
88902
- } else {
88903
- throw new Error("invalid payload");
88818
+ packet = this.reconstructor.takeBinaryData(obj);
88819
+ if (packet) {
88820
+ this.reconstructor = null;
88821
+ super.emitReserved("decoded", packet);
88904
88822
  }
88905
88823
  }
88906
- debug2("decoded %s as %j", str2, p2);
88907
- return p2;
88824
+ } else {
88825
+ throw new Error("Unknown type: " + obj);
88908
88826
  }
88909
- tryParse(str2) {
88910
- try {
88911
- return JSON.parse(str2, this.reviver);
88912
- } catch (e2) {
88913
- return false;
88827
+ }
88828
+ /**
88829
+ * Decode a packet String (JSON data)
88830
+ *
88831
+ * @param {String} str
88832
+ * @return {Object} packet
88833
+ */
88834
+ decodeString(str2) {
88835
+ let i2 = 0;
88836
+ const p2 = {
88837
+ type: Number(str2.charAt(0))
88838
+ };
88839
+ if (PacketType[p2.type] === void 0) {
88840
+ throw new Error("unknown packet type " + p2.type);
88841
+ }
88842
+ if (p2.type === PacketType.BINARY_EVENT || p2.type === PacketType.BINARY_ACK) {
88843
+ const start = i2 + 1;
88844
+ while (str2.charAt(++i2) !== "-" && i2 != str2.length) {
88845
+ }
88846
+ const buf = str2.substring(start, i2);
88847
+ if (buf != Number(buf) || str2.charAt(i2) !== "-") {
88848
+ throw new Error("Illegal attachments");
88914
88849
  }
88850
+ p2.attachments = Number(buf);
88915
88851
  }
88916
- static isPayloadValid(type2, payload) {
88917
- switch (type2) {
88918
- case PacketType.CONNECT:
88919
- return isObject2(payload);
88920
- case PacketType.DISCONNECT:
88921
- return payload === void 0;
88922
- case PacketType.CONNECT_ERROR:
88923
- return typeof payload === "string" || isObject2(payload);
88924
- case PacketType.EVENT:
88925
- case PacketType.BINARY_EVENT:
88926
- return Array.isArray(payload) && (typeof payload[0] === "number" || typeof payload[0] === "string" && RESERVED_EVENTS2.indexOf(payload[0]) === -1);
88927
- case PacketType.ACK:
88928
- case PacketType.BINARY_ACK:
88929
- return Array.isArray(payload);
88852
+ if ("/" === str2.charAt(i2 + 1)) {
88853
+ const start = i2 + 1;
88854
+ while (++i2) {
88855
+ const c2 = str2.charAt(i2);
88856
+ if ("," === c2)
88857
+ break;
88858
+ if (i2 === str2.length)
88859
+ break;
88860
+ }
88861
+ p2.nsp = str2.substring(start, i2);
88862
+ } else {
88863
+ p2.nsp = "/";
88864
+ }
88865
+ const next = str2.charAt(i2 + 1);
88866
+ if ("" !== next && Number(next) == next) {
88867
+ const start = i2 + 1;
88868
+ while (++i2) {
88869
+ const c2 = str2.charAt(i2);
88870
+ if (null == c2 || Number(c2) != c2) {
88871
+ --i2;
88872
+ break;
88873
+ }
88874
+ if (i2 === str2.length)
88875
+ break;
88930
88876
  }
88877
+ p2.id = Number(str2.substring(start, i2 + 1));
88931
88878
  }
88932
- /**
88933
- * Deallocates a parser's resources
88934
- */
88935
- destroy() {
88936
- if (this.reconstructor) {
88937
- this.reconstructor.finishedReconstruction();
88938
- this.reconstructor = null;
88879
+ if (str2.charAt(++i2)) {
88880
+ const payload = this.tryParse(str2.substr(i2));
88881
+ if (Decoder.isPayloadValid(p2.type, payload)) {
88882
+ p2.data = payload;
88883
+ } else {
88884
+ throw new Error("invalid payload");
88939
88885
  }
88940
88886
  }
88887
+ debug2("decoded %s as %j", str2, p2);
88888
+ return p2;
88941
88889
  }
88942
- exports2.Decoder = Decoder;
88943
- class BinaryReconstructor {
88944
- constructor(packet) {
88945
- this.packet = packet;
88946
- this.buffers = [];
88947
- this.reconPack = packet;
88890
+ tryParse(str2) {
88891
+ try {
88892
+ return JSON.parse(str2, this.reviver);
88893
+ } catch (e2) {
88894
+ return false;
88948
88895
  }
88949
- /**
88950
- * Method to be called when binary data received from connection
88951
- * after a BINARY_EVENT packet.
88952
- *
88953
- * @param {Buffer | ArrayBuffer} binData - the raw binary data received
88954
- * @return {null | Object} returns null if more binary data is expected or
88955
- * a reconstructed packet object if all buffers have been received.
88956
- */
88957
- takeBinaryData(binData) {
88958
- this.buffers.push(binData);
88959
- if (this.buffers.length === this.reconPack.attachments) {
88960
- const packet = (0, binary_js_1.reconstructPacket)(this.reconPack, this.buffers);
88961
- this.finishedReconstruction();
88962
- return packet;
88963
- }
88964
- return null;
88896
+ }
88897
+ static isPayloadValid(type2, payload) {
88898
+ switch (type2) {
88899
+ case PacketType.CONNECT:
88900
+ return isObject2(payload);
88901
+ case PacketType.DISCONNECT:
88902
+ return payload === void 0;
88903
+ case PacketType.CONNECT_ERROR:
88904
+ return typeof payload === "string" || isObject2(payload);
88905
+ case PacketType.EVENT:
88906
+ case PacketType.BINARY_EVENT:
88907
+ return Array.isArray(payload) && (typeof payload[0] === "number" || typeof payload[0] === "string" && RESERVED_EVENTS2.indexOf(payload[0]) === -1);
88908
+ case PacketType.ACK:
88909
+ case PacketType.BINARY_ACK:
88910
+ return Array.isArray(payload);
88965
88911
  }
88966
- /**
88967
- * Cleans up binary packet reconstruction variables.
88968
- */
88969
- finishedReconstruction() {
88970
- this.reconPack = null;
88971
- this.buffers = [];
88912
+ }
88913
+ /**
88914
+ * Deallocates a parser's resources
88915
+ */
88916
+ destroy() {
88917
+ if (this.reconstructor) {
88918
+ this.reconstructor.finishedReconstruction();
88919
+ this.reconstructor = null;
88972
88920
  }
88973
88921
  }
88974
- })(cjs);
88975
- return cjs;
88976
- }
88922
+ }
88923
+ exports2.Decoder = Decoder;
88924
+ class BinaryReconstructor {
88925
+ constructor(packet) {
88926
+ this.packet = packet;
88927
+ this.buffers = [];
88928
+ this.reconPack = packet;
88929
+ }
88930
+ /**
88931
+ * Method to be called when binary data received from connection
88932
+ * after a BINARY_EVENT packet.
88933
+ *
88934
+ * @param {Buffer | ArrayBuffer} binData - the raw binary data received
88935
+ * @return {null | Object} returns null if more binary data is expected or
88936
+ * a reconstructed packet object if all buffers have been received.
88937
+ */
88938
+ takeBinaryData(binData) {
88939
+ this.buffers.push(binData);
88940
+ if (this.buffers.length === this.reconPack.attachments) {
88941
+ const packet = (0, binary_js_1.reconstructPacket)(this.reconPack, this.buffers);
88942
+ this.finishedReconstruction();
88943
+ return packet;
88944
+ }
88945
+ return null;
88946
+ }
88947
+ /**
88948
+ * Cleans up binary packet reconstruction variables.
88949
+ */
88950
+ finishedReconstruction() {
88951
+ this.reconPack = null;
88952
+ this.buffers = [];
88953
+ }
88954
+ }
88955
+ })(cjs);
88977
88956
  var on$1 = {};
88978
88957
  Object.defineProperty(on$1, "__esModule", { value: true });
88979
88958
  on$1.on = void 0;
@@ -88989,7 +88968,7 @@ CAUSE: ${cause === null || cause === void 0 ? void 0 : cause.stack}`;
88989
88968
  };
88990
88969
  Object.defineProperty(socket, "__esModule", { value: true });
88991
88970
  socket.Socket = void 0;
88992
- const socket_io_parser_1 = requireCjs();
88971
+ const socket_io_parser_1 = cjs;
88993
88972
  const on_js_1$1 = on$1;
88994
88973
  const component_emitter_1$1 = require$$5$1;
88995
88974
  const debug_1$3 = __importDefault$A(browserExports$2);
@@ -89831,7 +89810,7 @@ CAUSE: ${cause === null || cause === void 0 ? void 0 : cause.stack}`;
89831
89810
  manager.Manager = void 0;
89832
89811
  const engine_io_client_1 = cjs$2;
89833
89812
  const socket_js_1 = socket;
89834
- const parser$1 = __importStar$A(requireCjs());
89813
+ const parser$1 = __importStar$A(cjs);
89835
89814
  const on_js_1 = on$1;
89836
89815
  const backo2_js_1 = backo2;
89837
89816
  const component_emitter_1 = require$$5$1;
@@ -90244,7 +90223,7 @@ CAUSE: ${cause === null || cause === void 0 ? void 0 : cause.stack}`;
90244
90223
  io: lookup2,
90245
90224
  connect: lookup2
90246
90225
  });
90247
- var socket_io_parser_12 = requireCjs();
90226
+ var socket_io_parser_12 = cjs;
90248
90227
  Object.defineProperty(exports2, "protocol", { enumerable: true, get: function() {
90249
90228
  return socket_io_parser_12.protocol;
90250
90229
  } });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pioneer-platform/pioneer-react",
3
- "version": "0.2.39",
3
+ "version": "0.2.41",
4
4
  "author": "highlander",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",