@cubejs-client/ws-transport 1.3.5 → 1.3.6

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.
@@ -1156,6 +1156,187 @@
1156
1156
  filterReject: createMethod(7)
1157
1157
  };
1158
1158
 
1159
+ var SPECIES$3 = wellKnownSymbol('species');
1160
+
1161
+ var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
1162
+ // We can't use this feature detection in V8 since it causes
1163
+ // deoptimization and serious performance degradation
1164
+ // https://github.com/zloirock/core-js/issues/677
1165
+ return engineV8Version >= 51 || !fails(function () {
1166
+ var array = [];
1167
+ var constructor = array.constructor = {};
1168
+ constructor[SPECIES$3] = function () {
1169
+ return { foo: 1 };
1170
+ };
1171
+ return array[METHOD_NAME](Boolean).foo !== 1;
1172
+ });
1173
+ };
1174
+
1175
+ var $filter = arrayIteration.filter;
1176
+
1177
+
1178
+ var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');
1179
+
1180
+ // `Array.prototype.filter` method
1181
+ // https://tc39.es/ecma262/#sec-array.prototype.filter
1182
+ // with adding support of @@species
1183
+ _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
1184
+ filter: function filter(callbackfn /* , thisArg */) {
1185
+ return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
1186
+ }
1187
+ });
1188
+
1189
+ // `Object.keys` method
1190
+ // https://tc39.es/ecma262/#sec-object.keys
1191
+ // eslint-disable-next-line es/no-object-keys -- safe
1192
+ var objectKeys = Object.keys || function keys(O) {
1193
+ return objectKeysInternal(O, enumBugKeys);
1194
+ };
1195
+
1196
+ // `Object.defineProperties` method
1197
+ // https://tc39.es/ecma262/#sec-object.defineproperties
1198
+ // eslint-disable-next-line es/no-object-defineproperties -- safe
1199
+ var f$1 = descriptors && !v8PrototypeDefineBug ? Object.defineProperties : function defineProperties(O, Properties) {
1200
+ anObject(O);
1201
+ var props = toIndexedObject(Properties);
1202
+ var keys = objectKeys(Properties);
1203
+ var length = keys.length;
1204
+ var index = 0;
1205
+ var key;
1206
+ while (length > index) objectDefineProperty.f(O, key = keys[index++], props[key]);
1207
+ return O;
1208
+ };
1209
+
1210
+ var objectDefineProperties = {
1211
+ f: f$1
1212
+ };
1213
+
1214
+ var html = getBuiltIn('document', 'documentElement');
1215
+
1216
+ /* global ActiveXObject -- old IE, WSH */
1217
+
1218
+
1219
+
1220
+
1221
+
1222
+
1223
+
1224
+
1225
+ var GT = '>';
1226
+ var LT = '<';
1227
+ var PROTOTYPE = 'prototype';
1228
+ var SCRIPT = 'script';
1229
+ var IE_PROTO = sharedKey('IE_PROTO');
1230
+
1231
+ var EmptyConstructor = function () { /* empty */ };
1232
+
1233
+ var scriptTag = function (content) {
1234
+ return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
1235
+ };
1236
+
1237
+ // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
1238
+ var NullProtoObjectViaActiveX = function (activeXDocument) {
1239
+ activeXDocument.write(scriptTag(''));
1240
+ activeXDocument.close();
1241
+ var temp = activeXDocument.parentWindow.Object;
1242
+ activeXDocument = null; // avoid memory leak
1243
+ return temp;
1244
+ };
1245
+
1246
+ // Create object with fake `null` prototype: use iframe Object with cleared prototype
1247
+ var NullProtoObjectViaIFrame = function () {
1248
+ // Thrash, waste and sodomy: IE GC bug
1249
+ var iframe = documentCreateElement('iframe');
1250
+ var JS = 'java' + SCRIPT + ':';
1251
+ var iframeDocument;
1252
+ iframe.style.display = 'none';
1253
+ html.appendChild(iframe);
1254
+ // https://github.com/zloirock/core-js/issues/475
1255
+ iframe.src = String(JS);
1256
+ iframeDocument = iframe.contentWindow.document;
1257
+ iframeDocument.open();
1258
+ iframeDocument.write(scriptTag('document.F=Object'));
1259
+ iframeDocument.close();
1260
+ return iframeDocument.F;
1261
+ };
1262
+
1263
+ // Check for document.domain and active x support
1264
+ // No need to use active x approach when document.domain is not set
1265
+ // see https://github.com/es-shims/es5-shim/issues/150
1266
+ // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
1267
+ // avoid IE GC bug
1268
+ var activeXDocument;
1269
+ var NullProtoObject = function () {
1270
+ try {
1271
+ activeXDocument = new ActiveXObject('htmlfile');
1272
+ } catch (error) { /* ignore */ }
1273
+ NullProtoObject = typeof document != 'undefined'
1274
+ ? document.domain && activeXDocument
1275
+ ? NullProtoObjectViaActiveX(activeXDocument) // old IE
1276
+ : NullProtoObjectViaIFrame()
1277
+ : NullProtoObjectViaActiveX(activeXDocument); // WSH
1278
+ var length = enumBugKeys.length;
1279
+ while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
1280
+ return NullProtoObject();
1281
+ };
1282
+
1283
+ hiddenKeys$1[IE_PROTO] = true;
1284
+
1285
+ // `Object.create` method
1286
+ // https://tc39.es/ecma262/#sec-object.create
1287
+ // eslint-disable-next-line es/no-object-create -- safe
1288
+ var objectCreate = Object.create || function create(O, Properties) {
1289
+ var result;
1290
+ if (O !== null) {
1291
+ EmptyConstructor[PROTOTYPE] = anObject(O);
1292
+ result = new EmptyConstructor();
1293
+ EmptyConstructor[PROTOTYPE] = null;
1294
+ // add "__proto__" for Object.getPrototypeOf polyfill
1295
+ result[IE_PROTO] = O;
1296
+ } else result = NullProtoObject();
1297
+ return Properties === undefined ? result : objectDefineProperties.f(result, Properties);
1298
+ };
1299
+
1300
+ var defineProperty$1 = objectDefineProperty.f;
1301
+
1302
+ var UNSCOPABLES = wellKnownSymbol('unscopables');
1303
+ var ArrayPrototype$1 = Array.prototype;
1304
+
1305
+ // Array.prototype[@@unscopables]
1306
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1307
+ if (ArrayPrototype$1[UNSCOPABLES] === undefined) {
1308
+ defineProperty$1(ArrayPrototype$1, UNSCOPABLES, {
1309
+ configurable: true,
1310
+ value: objectCreate(null)
1311
+ });
1312
+ }
1313
+
1314
+ // add a key to Array.prototype[@@unscopables]
1315
+ var addToUnscopables = function (key) {
1316
+ ArrayPrototype$1[UNSCOPABLES][key] = true;
1317
+ };
1318
+
1319
+ var $find = arrayIteration.find;
1320
+
1321
+
1322
+ var FIND = 'find';
1323
+ var SKIPS_HOLES = true;
1324
+
1325
+ // Shouldn't skip holes
1326
+ // eslint-disable-next-line es/no-array-prototype-find -- testing
1327
+ if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
1328
+
1329
+ // `Array.prototype.find` method
1330
+ // https://tc39.es/ecma262/#sec-array.prototype.find
1331
+ _export({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
1332
+ find: function find(callbackfn /* , that = undefined */) {
1333
+ return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
1334
+ }
1335
+ });
1336
+
1337
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1338
+ addToUnscopables(FIND);
1339
+
1159
1340
  var arrayMethodIsStrict = function (METHOD_NAME, argument) {
1160
1341
  var method = [][METHOD_NAME];
1161
1342
  return !!method && fails(function () {
@@ -1183,78 +1364,21 @@
1183
1364
  forEach: arrayForEach
1184
1365
  });
1185
1366
 
1186
- // `Object.prototype.toString` method implementation
1187
- // https://tc39.es/ecma262/#sec-object.prototype.tostring
1188
- var objectToString = toStringTagSupport ? {}.toString : function toString() {
1189
- return '[object ' + classof(this) + ']';
1190
- };
1191
-
1192
- // `Object.prototype.toString` method
1193
- // https://tc39.es/ecma262/#sec-object.prototype.tostring
1194
- if (!toStringTagSupport) {
1195
- defineBuiltIn(Object.prototype, 'toString', objectToString, { unsafe: true });
1196
- }
1197
-
1198
- // iterable DOM collections
1199
- // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
1200
- var domIterables = {
1201
- CSSRuleList: 0,
1202
- CSSStyleDeclaration: 0,
1203
- CSSValueList: 0,
1204
- ClientRectList: 0,
1205
- DOMRectList: 0,
1206
- DOMStringList: 0,
1207
- DOMTokenList: 1,
1208
- DataTransferItemList: 0,
1209
- FileList: 0,
1210
- HTMLAllCollection: 0,
1211
- HTMLCollection: 0,
1212
- HTMLFormElement: 0,
1213
- HTMLSelectElement: 0,
1214
- MediaList: 0,
1215
- MimeTypeArray: 0,
1216
- NamedNodeMap: 0,
1217
- NodeList: 1,
1218
- PaintRequestList: 0,
1219
- Plugin: 0,
1220
- PluginArray: 0,
1221
- SVGLengthList: 0,
1222
- SVGNumberList: 0,
1223
- SVGPathSegList: 0,
1224
- SVGPointList: 0,
1225
- SVGStringList: 0,
1226
- SVGTransformList: 0,
1227
- SourceBufferList: 0,
1228
- StyleSheetList: 0,
1229
- TextTrackCueList: 0,
1230
- TextTrackList: 0,
1231
- TouchList: 0
1232
- };
1233
-
1234
- // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
1235
-
1236
-
1237
- var classList = documentCreateElement('span').classList;
1238
- var DOMTokenListPrototype = classList && classList.constructor && classList.constructor.prototype;
1239
-
1240
- var domTokenListPrototype = DOMTokenListPrototype === Object.prototype ? undefined : DOMTokenListPrototype;
1241
-
1242
- var handlePrototype = function (CollectionPrototype) {
1243
- // some Chrome versions have non-configurable methods on DOMTokenList
1244
- if (CollectionPrototype && CollectionPrototype.forEach !== arrayForEach) try {
1245
- createNonEnumerableProperty(CollectionPrototype, 'forEach', arrayForEach);
1246
- } catch (error) {
1247
- CollectionPrototype.forEach = arrayForEach;
1248
- }
1249
- };
1367
+ var FORCED = fails(function () {
1368
+ return new Date(NaN).toJSON() !== null
1369
+ || Date.prototype.toJSON.call({ toISOString: function () { return 1; } }) !== 1;
1370
+ });
1250
1371
 
1251
- for (var COLLECTION_NAME in domIterables) {
1252
- if (domIterables[COLLECTION_NAME]) {
1253
- handlePrototype(global$1[COLLECTION_NAME] && global$1[COLLECTION_NAME].prototype);
1372
+ // `Date.prototype.toJSON` method
1373
+ // https://tc39.es/ecma262/#sec-date.prototype.tojson
1374
+ _export({ target: 'Date', proto: true, arity: 1, forced: FORCED }, {
1375
+ // eslint-disable-next-line no-unused-vars -- required for `.length`
1376
+ toJSON: function toJSON(key) {
1377
+ var O = toObject(this);
1378
+ var pv = toPrimitive(O, 'number');
1379
+ return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString();
1254
1380
  }
1255
- }
1256
-
1257
- handlePrototype(domTokenListPrototype);
1381
+ });
1258
1382
 
1259
1383
  // TODO: Remove from `core-js@4`
1260
1384
 
@@ -1276,13 +1400,6 @@
1276
1400
  });
1277
1401
  }
1278
1402
 
1279
- // `Object.keys` method
1280
- // https://tc39.es/ecma262/#sec-object.keys
1281
- // eslint-disable-next-line es/no-object-keys -- safe
1282
- var objectKeys = Object.keys || function keys(O) {
1283
- return objectKeysInternal(O, enumBugKeys);
1284
- };
1285
-
1286
1403
  var FAILS_ON_PRIMITIVES = fails(function () { objectKeys(1); });
1287
1404
 
1288
1405
  // `Object.keys` method
@@ -1293,6 +1410,18 @@
1293
1410
  }
1294
1411
  });
1295
1412
 
1413
+ // `Object.prototype.toString` method implementation
1414
+ // https://tc39.es/ecma262/#sec-object.prototype.tostring
1415
+ var objectToString = toStringTagSupport ? {}.toString : function toString() {
1416
+ return '[object ' + classof(this) + ']';
1417
+ };
1418
+
1419
+ // `Object.prototype.toString` method
1420
+ // https://tc39.es/ecma262/#sec-object.prototype.tostring
1421
+ if (!toStringTagSupport) {
1422
+ defineBuiltIn(Object.prototype, 'toString', objectToString, { unsafe: true });
1423
+ }
1424
+
1296
1425
  var engineIsNode = classofRaw(global$1.process) === 'process';
1297
1426
 
1298
1427
  var functionUncurryThisAccessor = function (object, key, method) {
@@ -1337,7 +1466,7 @@
1337
1466
  };
1338
1467
  }() : undefined);
1339
1468
 
1340
- var defineProperty$1 = objectDefineProperty.f;
1469
+ var defineProperty = objectDefineProperty.f;
1341
1470
 
1342
1471
 
1343
1472
 
@@ -1346,7 +1475,7 @@
1346
1475
  var setToStringTag = function (target, TAG, STATIC) {
1347
1476
  if (target && !STATIC) target = target.prototype;
1348
1477
  if (target && !hasOwnProperty_1(target, TO_STRING_TAG)) {
1349
- defineProperty$1(target, TO_STRING_TAG, { configurable: true, value: TAG });
1478
+ defineProperty(target, TO_STRING_TAG, { configurable: true, value: TAG });
1350
1479
  }
1351
1480
  };
1352
1481
 
@@ -1356,13 +1485,13 @@
1356
1485
  return objectDefineProperty.f(target, name, descriptor);
1357
1486
  };
1358
1487
 
1359
- var SPECIES$3 = wellKnownSymbol('species');
1488
+ var SPECIES$2 = wellKnownSymbol('species');
1360
1489
 
1361
1490
  var setSpecies = function (CONSTRUCTOR_NAME) {
1362
1491
  var Constructor = getBuiltIn(CONSTRUCTOR_NAME);
1363
1492
 
1364
- if (descriptors && Constructor && !Constructor[SPECIES$3]) {
1365
- defineBuiltInAccessor(Constructor, SPECIES$3, {
1493
+ if (descriptors && Constructor && !Constructor[SPECIES$2]) {
1494
+ defineBuiltInAccessor(Constructor, SPECIES$2, {
1366
1495
  configurable: true,
1367
1496
  get: function () { return this; }
1368
1497
  });
@@ -1384,14 +1513,14 @@
1384
1513
  throw new $TypeError$4(tryToString(argument) + ' is not a constructor');
1385
1514
  };
1386
1515
 
1387
- var SPECIES$2 = wellKnownSymbol('species');
1516
+ var SPECIES$1 = wellKnownSymbol('species');
1388
1517
 
1389
1518
  // `SpeciesConstructor` abstract operation
1390
1519
  // https://tc39.es/ecma262/#sec-speciesconstructor
1391
1520
  var speciesConstructor = function (O, defaultConstructor) {
1392
1521
  var C = anObject(O).constructor;
1393
1522
  var S;
1394
- return C === undefined || isNullOrUndefined(S = anObject(C)[SPECIES$2]) ? defaultConstructor : aConstructor(S);
1523
+ return C === undefined || isNullOrUndefined(S = anObject(C)[SPECIES$1]) ? defaultConstructor : aConstructor(S);
1395
1524
  };
1396
1525
 
1397
1526
  var FunctionPrototype = Function.prototype;
@@ -1403,8 +1532,6 @@
1403
1532
  return call.apply(apply, arguments);
1404
1533
  });
1405
1534
 
1406
- var html = getBuiltIn('document', 'documentElement');
1407
-
1408
1535
  var arraySlice = functionUncurryThis([].slice);
1409
1536
 
1410
1537
  var $TypeError$3 = TypeError;
@@ -1654,7 +1781,7 @@
1654
1781
  && typeof document == 'object';
1655
1782
 
1656
1783
  promiseNativeConstructor && promiseNativeConstructor.prototype;
1657
- var SPECIES$1 = wellKnownSymbol('species');
1784
+ var SPECIES = wellKnownSymbol('species');
1658
1785
  var SUBCLASSING = false;
1659
1786
  var NATIVE_PROMISE_REJECTION_EVENT$1 = isCallable(global$1.PromiseRejectionEvent);
1660
1787
 
@@ -1675,7 +1802,7 @@
1675
1802
  exec(function () { /* empty */ }, function () { /* empty */ });
1676
1803
  };
1677
1804
  var constructor = promise.constructor = {};
1678
- constructor[SPECIES$1] = FakePromise;
1805
+ constructor[SPECIES] = FakePromise;
1679
1806
  SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
1680
1807
  if (!SUBCLASSING) return true;
1681
1808
  // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
@@ -1703,12 +1830,12 @@
1703
1830
 
1704
1831
  // `NewPromiseCapability` abstract operation
1705
1832
  // https://tc39.es/ecma262/#sec-newpromisecapability
1706
- var f$1 = function (C) {
1833
+ var f = function (C) {
1707
1834
  return new PromiseCapability(C);
1708
1835
  };
1709
1836
 
1710
1837
  var newPromiseCapability$1 = {
1711
- f: f$1
1838
+ f: f
1712
1839
  };
1713
1840
 
1714
1841
  var task = task$1.set;
@@ -1988,11 +2115,11 @@
1988
2115
  var iterators = {};
1989
2116
 
1990
2117
  var ITERATOR$2 = wellKnownSymbol('iterator');
1991
- var ArrayPrototype$1 = Array.prototype;
2118
+ var ArrayPrototype = Array.prototype;
1992
2119
 
1993
2120
  // check on default Array iterator
1994
2121
  var isArrayIteratorMethod = function (it) {
1995
- return it !== undefined && (iterators.Array === it || ArrayPrototype$1[ITERATOR$2] === it);
2122
+ return it !== undefined && (iterators.Array === it || ArrayPrototype[ITERATOR$2] === it);
1996
2123
  };
1997
2124
 
1998
2125
  var ITERATOR$1 = wellKnownSymbol('iterator');
@@ -2241,6 +2368,67 @@
2241
2368
  }
2242
2369
  });
2243
2370
 
2371
+ // iterable DOM collections
2372
+ // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
2373
+ var domIterables = {
2374
+ CSSRuleList: 0,
2375
+ CSSStyleDeclaration: 0,
2376
+ CSSValueList: 0,
2377
+ ClientRectList: 0,
2378
+ DOMRectList: 0,
2379
+ DOMStringList: 0,
2380
+ DOMTokenList: 1,
2381
+ DataTransferItemList: 0,
2382
+ FileList: 0,
2383
+ HTMLAllCollection: 0,
2384
+ HTMLCollection: 0,
2385
+ HTMLFormElement: 0,
2386
+ HTMLSelectElement: 0,
2387
+ MediaList: 0,
2388
+ MimeTypeArray: 0,
2389
+ NamedNodeMap: 0,
2390
+ NodeList: 1,
2391
+ PaintRequestList: 0,
2392
+ Plugin: 0,
2393
+ PluginArray: 0,
2394
+ SVGLengthList: 0,
2395
+ SVGNumberList: 0,
2396
+ SVGPathSegList: 0,
2397
+ SVGPointList: 0,
2398
+ SVGStringList: 0,
2399
+ SVGTransformList: 0,
2400
+ SourceBufferList: 0,
2401
+ StyleSheetList: 0,
2402
+ TextTrackCueList: 0,
2403
+ TextTrackList: 0,
2404
+ TouchList: 0
2405
+ };
2406
+
2407
+ // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
2408
+
2409
+
2410
+ var classList = documentCreateElement('span').classList;
2411
+ var DOMTokenListPrototype = classList && classList.constructor && classList.constructor.prototype;
2412
+
2413
+ var domTokenListPrototype = DOMTokenListPrototype === Object.prototype ? undefined : DOMTokenListPrototype;
2414
+
2415
+ var handlePrototype = function (CollectionPrototype) {
2416
+ // some Chrome versions have non-configurable methods on DOMTokenList
2417
+ if (CollectionPrototype && CollectionPrototype.forEach !== arrayForEach) try {
2418
+ createNonEnumerableProperty(CollectionPrototype, 'forEach', arrayForEach);
2419
+ } catch (error) {
2420
+ CollectionPrototype.forEach = arrayForEach;
2421
+ }
2422
+ };
2423
+
2424
+ for (var COLLECTION_NAME in domIterables) {
2425
+ if (domIterables[COLLECTION_NAME]) {
2426
+ handlePrototype(global$1[COLLECTION_NAME] && global$1[COLLECTION_NAME].prototype);
2427
+ }
2428
+ }
2429
+
2430
+ handlePrototype(domTokenListPrototype);
2431
+
2244
2432
  /* global Bun -- Bun case */
2245
2433
  var engineIsBun = typeof Bun == 'function' && Bun && typeof Bun.version == 'string';
2246
2434
 
@@ -2283,178 +2471,6 @@
2283
2471
  setTimeout: setTimeout$1
2284
2472
  });
2285
2473
 
2286
- // `Object.defineProperties` method
2287
- // https://tc39.es/ecma262/#sec-object.defineproperties
2288
- // eslint-disable-next-line es/no-object-defineproperties -- safe
2289
- var f = descriptors && !v8PrototypeDefineBug ? Object.defineProperties : function defineProperties(O, Properties) {
2290
- anObject(O);
2291
- var props = toIndexedObject(Properties);
2292
- var keys = objectKeys(Properties);
2293
- var length = keys.length;
2294
- var index = 0;
2295
- var key;
2296
- while (length > index) objectDefineProperty.f(O, key = keys[index++], props[key]);
2297
- return O;
2298
- };
2299
-
2300
- var objectDefineProperties = {
2301
- f: f
2302
- };
2303
-
2304
- /* global ActiveXObject -- old IE, WSH */
2305
-
2306
-
2307
-
2308
-
2309
-
2310
-
2311
-
2312
-
2313
- var GT = '>';
2314
- var LT = '<';
2315
- var PROTOTYPE = 'prototype';
2316
- var SCRIPT = 'script';
2317
- var IE_PROTO = sharedKey('IE_PROTO');
2318
-
2319
- var EmptyConstructor = function () { /* empty */ };
2320
-
2321
- var scriptTag = function (content) {
2322
- return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
2323
- };
2324
-
2325
- // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
2326
- var NullProtoObjectViaActiveX = function (activeXDocument) {
2327
- activeXDocument.write(scriptTag(''));
2328
- activeXDocument.close();
2329
- var temp = activeXDocument.parentWindow.Object;
2330
- activeXDocument = null; // avoid memory leak
2331
- return temp;
2332
- };
2333
-
2334
- // Create object with fake `null` prototype: use iframe Object with cleared prototype
2335
- var NullProtoObjectViaIFrame = function () {
2336
- // Thrash, waste and sodomy: IE GC bug
2337
- var iframe = documentCreateElement('iframe');
2338
- var JS = 'java' + SCRIPT + ':';
2339
- var iframeDocument;
2340
- iframe.style.display = 'none';
2341
- html.appendChild(iframe);
2342
- // https://github.com/zloirock/core-js/issues/475
2343
- iframe.src = String(JS);
2344
- iframeDocument = iframe.contentWindow.document;
2345
- iframeDocument.open();
2346
- iframeDocument.write(scriptTag('document.F=Object'));
2347
- iframeDocument.close();
2348
- return iframeDocument.F;
2349
- };
2350
-
2351
- // Check for document.domain and active x support
2352
- // No need to use active x approach when document.domain is not set
2353
- // see https://github.com/es-shims/es5-shim/issues/150
2354
- // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
2355
- // avoid IE GC bug
2356
- var activeXDocument;
2357
- var NullProtoObject = function () {
2358
- try {
2359
- activeXDocument = new ActiveXObject('htmlfile');
2360
- } catch (error) { /* ignore */ }
2361
- NullProtoObject = typeof document != 'undefined'
2362
- ? document.domain && activeXDocument
2363
- ? NullProtoObjectViaActiveX(activeXDocument) // old IE
2364
- : NullProtoObjectViaIFrame()
2365
- : NullProtoObjectViaActiveX(activeXDocument); // WSH
2366
- var length = enumBugKeys.length;
2367
- while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
2368
- return NullProtoObject();
2369
- };
2370
-
2371
- hiddenKeys$1[IE_PROTO] = true;
2372
-
2373
- // `Object.create` method
2374
- // https://tc39.es/ecma262/#sec-object.create
2375
- // eslint-disable-next-line es/no-object-create -- safe
2376
- var objectCreate = Object.create || function create(O, Properties) {
2377
- var result;
2378
- if (O !== null) {
2379
- EmptyConstructor[PROTOTYPE] = anObject(O);
2380
- result = new EmptyConstructor();
2381
- EmptyConstructor[PROTOTYPE] = null;
2382
- // add "__proto__" for Object.getPrototypeOf polyfill
2383
- result[IE_PROTO] = O;
2384
- } else result = NullProtoObject();
2385
- return Properties === undefined ? result : objectDefineProperties.f(result, Properties);
2386
- };
2387
-
2388
- var defineProperty = objectDefineProperty.f;
2389
-
2390
- var UNSCOPABLES = wellKnownSymbol('unscopables');
2391
- var ArrayPrototype = Array.prototype;
2392
-
2393
- // Array.prototype[@@unscopables]
2394
- // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
2395
- if (ArrayPrototype[UNSCOPABLES] === undefined) {
2396
- defineProperty(ArrayPrototype, UNSCOPABLES, {
2397
- configurable: true,
2398
- value: objectCreate(null)
2399
- });
2400
- }
2401
-
2402
- // add a key to Array.prototype[@@unscopables]
2403
- var addToUnscopables = function (key) {
2404
- ArrayPrototype[UNSCOPABLES][key] = true;
2405
- };
2406
-
2407
- var $find = arrayIteration.find;
2408
-
2409
-
2410
- var FIND = 'find';
2411
- var SKIPS_HOLES = true;
2412
-
2413
- // Shouldn't skip holes
2414
- // eslint-disable-next-line es/no-array-prototype-find -- testing
2415
- if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
2416
-
2417
- // `Array.prototype.find` method
2418
- // https://tc39.es/ecma262/#sec-array.prototype.find
2419
- _export({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
2420
- find: function find(callbackfn /* , that = undefined */) {
2421
- return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
2422
- }
2423
- });
2424
-
2425
- // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
2426
- addToUnscopables(FIND);
2427
-
2428
- var SPECIES = wellKnownSymbol('species');
2429
-
2430
- var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
2431
- // We can't use this feature detection in V8 since it causes
2432
- // deoptimization and serious performance degradation
2433
- // https://github.com/zloirock/core-js/issues/677
2434
- return engineV8Version >= 51 || !fails(function () {
2435
- var array = [];
2436
- var constructor = array.constructor = {};
2437
- constructor[SPECIES] = function () {
2438
- return { foo: 1 };
2439
- };
2440
- return array[METHOD_NAME](Boolean).foo !== 1;
2441
- });
2442
- };
2443
-
2444
- var $filter = arrayIteration.filter;
2445
-
2446
-
2447
- var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');
2448
-
2449
- // `Array.prototype.filter` method
2450
- // https://tc39.es/ecma262/#sec-array.prototype.filter
2451
- // with adding support of @@species
2452
- _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
2453
- filter: function filter(callbackfn /* , thisArg */) {
2454
- return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
2455
- }
2456
- });
2457
-
2458
2474
  var _typeof_1 = createCommonjsModule(function (module) {
2459
2475
  function _typeof(o) {
2460
2476
  "@babel/helpers - typeof";
@@ -2827,19 +2843,17 @@
2827
2843
  this.status = status;
2828
2844
  this.result = message;
2829
2845
  }
2830
- _createClass(WebSocketTransportResult, [{
2846
+ return _createClass(WebSocketTransportResult, [{
2831
2847
  key: "json",
2832
2848
  value: function () {
2833
- var _json = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee() {
2849
+ var _json = _asyncToGenerator(/*#__PURE__*/regenerator.mark(function _callee() {
2834
2850
  return regenerator.wrap(function _callee$(_context) {
2835
- while (1) {
2836
- switch (_context.prev = _context.next) {
2837
- case 0:
2838
- return _context.abrupt("return", this.result);
2839
- case 1:
2840
- case "end":
2841
- return _context.stop();
2842
- }
2851
+ while (1) switch (_context.prev = _context.next) {
2852
+ case 0:
2853
+ return _context.abrupt("return", this.result);
2854
+ case 1:
2855
+ case "end":
2856
+ return _context.stop();
2843
2857
  }
2844
2858
  }, _callee, this);
2845
2859
  }));
@@ -2857,16 +2871,14 @@
2857
2871
  }, {
2858
2872
  key: "text",
2859
2873
  value: function () {
2860
- var _text = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2() {
2874
+ var _text = _asyncToGenerator(/*#__PURE__*/regenerator.mark(function _callee2() {
2861
2875
  return regenerator.wrap(function _callee2$(_context2) {
2862
- while (1) {
2863
- switch (_context2.prev = _context2.next) {
2864
- case 0:
2865
- return _context2.abrupt("return", typeof this.result === 'string' ? this.result : JSON.stringify(this.result));
2866
- case 1:
2867
- case "end":
2868
- return _context2.stop();
2869
- }
2876
+ while (1) switch (_context2.prev = _context2.next) {
2877
+ case 0:
2878
+ return _context2.abrupt("return", typeof this.result === 'string' ? this.result : JSON.stringify(this.result));
2879
+ case 1:
2880
+ case "end":
2881
+ return _context2.stop();
2870
2882
  }
2871
2883
  }, _callee2, this);
2872
2884
  }));
@@ -2876,7 +2888,6 @@
2876
2888
  return text;
2877
2889
  }()
2878
2890
  }]);
2879
- return WebSocketTransportResult;
2880
2891
  }();
2881
2892
  var WebSocketTransport = /*#__PURE__*/function () {
2882
2893
  function WebSocketTransport(_ref2) {
@@ -2901,7 +2912,7 @@
2901
2912
  this.heartBeatInterval = hearBeatInterval;
2902
2913
  }
2903
2914
  }
2904
- _createClass(WebSocketTransport, [{
2915
+ return _createClass(WebSocketTransport, [{
2905
2916
  key: "authorization",
2906
2917
  get: function get() {
2907
2918
  return this.token;
@@ -2915,20 +2926,18 @@
2915
2926
  }, {
2916
2927
  key: "close",
2917
2928
  value: function () {
2918
- var _close = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee3() {
2929
+ var _close = _asyncToGenerator(/*#__PURE__*/regenerator.mark(function _callee3() {
2919
2930
  return regenerator.wrap(function _callee3$(_context3) {
2920
- while (1) {
2921
- switch (_context3.prev = _context3.next) {
2922
- case 0:
2923
- if (this.ws) {
2924
- // Flush send queue before sending close frame
2925
- this.ws.sendQueue();
2926
- this.ws.close();
2927
- }
2928
- case 1:
2929
- case "end":
2930
- return _context3.stop();
2931
- }
2931
+ while (1) switch (_context3.prev = _context3.next) {
2932
+ case 0:
2933
+ if (this.ws) {
2934
+ // Flush send queue before sending close frame
2935
+ this.ws.sendQueue();
2936
+ this.ws.close();
2937
+ }
2938
+ case 1:
2939
+ case "end":
2940
+ return _context3.stop();
2932
2941
  }
2933
2942
  }, _callee3, this);
2934
2943
  }));
@@ -3024,19 +3033,17 @@
3024
3033
  } else {
3025
3034
  this.messageQueue.push(message);
3026
3035
  }
3027
- setTimeout( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee4() {
3036
+ setTimeout(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/regenerator.mark(function _callee4() {
3028
3037
  return regenerator.wrap(function _callee4$(_context4) {
3029
- while (1) {
3030
- switch (_context4.prev = _context4.next) {
3031
- case 0:
3032
- _context4.next = 2;
3033
- return _this2.initSocket();
3034
- case 2:
3035
- _this2.ws.sendQueue();
3036
- case 3:
3037
- case "end":
3038
- return _context4.stop();
3039
- }
3038
+ while (1) switch (_context4.prev = _context4.next) {
3039
+ case 0:
3040
+ _context4.next = 2;
3041
+ return _this2.initSocket();
3042
+ case 2:
3043
+ _this2.ws.sendQueue();
3044
+ case 3:
3045
+ case "end":
3046
+ return _context4.stop();
3040
3047
  }
3041
3048
  }, _callee4);
3042
3049
  })), 100);
@@ -3071,47 +3078,43 @@
3071
3078
  return {
3072
3079
  subscribe: function subscribe(callback) {
3073
3080
  var _this3 = this;
3074
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee5() {
3081
+ return _asyncToGenerator(/*#__PURE__*/regenerator.mark(function _callee5() {
3075
3082
  var result;
3076
3083
  return regenerator.wrap(function _callee5$(_context5) {
3077
- while (1) {
3078
- switch (_context5.prev = _context5.next) {
3079
- case 0:
3080
- transport.sendMessage(message);
3081
- _context5.next = 3;
3082
- return new Promise(function (resolve) {
3083
- nextMessage = resolve;
3084
- if (pendingResults.length) {
3085
- runNextMessage();
3086
- }
3087
- });
3088
- case 3:
3089
- result = _context5.sent;
3090
- return _context5.abrupt("return", callback(result, function () {
3091
- return _this3.subscribe(callback);
3092
- }));
3093
- case 5:
3094
- case "end":
3095
- return _context5.stop();
3096
- }
3084
+ while (1) switch (_context5.prev = _context5.next) {
3085
+ case 0:
3086
+ transport.sendMessage(message);
3087
+ _context5.next = 3;
3088
+ return new Promise(function (resolve) {
3089
+ nextMessage = resolve;
3090
+ if (pendingResults.length) {
3091
+ runNextMessage();
3092
+ }
3093
+ });
3094
+ case 3:
3095
+ result = _context5.sent;
3096
+ return _context5.abrupt("return", callback(result, function () {
3097
+ return _this3.subscribe(callback);
3098
+ }));
3099
+ case 5:
3100
+ case "end":
3101
+ return _context5.stop();
3097
3102
  }
3098
3103
  }, _callee5);
3099
3104
  }))();
3100
3105
  },
3101
3106
  unsubscribe: function unsubscribe() {
3102
- return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee6() {
3107
+ return _asyncToGenerator(/*#__PURE__*/regenerator.mark(function _callee6() {
3103
3108
  return regenerator.wrap(function _callee6$(_context6) {
3104
- while (1) {
3105
- switch (_context6.prev = _context6.next) {
3106
- case 0:
3107
- transport.sendMessage({
3108
- unsubscribe: message.messageId
3109
- });
3110
- delete transport.messageIdToSubscription[message.messageId];
3111
- case 2:
3112
- case "end":
3113
- return _context6.stop();
3114
- }
3109
+ while (1) switch (_context6.prev = _context6.next) {
3110
+ case 0:
3111
+ transport.sendMessage({
3112
+ unsubscribe: message.messageId
3113
+ });
3114
+ delete transport.messageIdToSubscription[message.messageId];
3115
+ case 2:
3116
+ case "end":
3117
+ return _context6.stop();
3115
3118
  }
3116
3119
  }, _callee6);
3117
3120
  }))();
@@ -3119,7 +3122,6 @@
3119
3122
  };
3120
3123
  }
3121
3124
  }]);
3122
- return WebSocketTransport;
3123
3125
  }();
3124
3126
 
3125
3127
  return WebSocketTransport;