comprodls-sdk 2.18.0 → 2.20.0
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/comprodls-sdk.js +382 -387
- package/dist/comprodls-sdk.min.js +18 -18
- package/lib/config/index.js +10 -47
- package/lib/services/analytics/index.js +15 -7
- package/lib/services/auth/index.js +36 -19
- package/lib/services/invitations/index.js +10 -1
- package/lib/services/pub/index.js +12 -4
- package/package.json +3 -2
package/dist/comprodls-sdk.js
CHANGED
|
@@ -178,48 +178,27 @@ comproDLS.prototype.Drive = drive;
|
|
|
178
178
|
|
|
179
179
|
exports.REALM_HOSTS = {
|
|
180
180
|
GLOBAL: {
|
|
181
|
-
|
|
182
|
-
PUB: '
|
|
183
|
-
AUTH: '
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
SISEVENTS: 'https://sisevents-staging1.comprodls.com',
|
|
192
|
-
INTEGRATION: 'https://integration-staging1.comprodls.com',
|
|
193
|
-
DRIVE: 'https://drive-staging1.comprodls.com'
|
|
194
|
-
},
|
|
195
|
-
PRODUCTION: {
|
|
196
|
-
PUB: 'https://pub.comprodls.com',
|
|
197
|
-
AUTH: 'https://auth.comprodls.com',
|
|
198
|
-
PUSH: 'push.comprodls.com',
|
|
199
|
-
PUSHX: 'https://pushx.comprodls.com',
|
|
200
|
-
XAPI: 'https://xapi.comprodls.com',
|
|
201
|
-
COLLAB: 'https://collab.comprodls.com',
|
|
202
|
-
PRODUCT: 'https://product.comprodls.com',
|
|
203
|
-
ACTIVITY: 'https://activity.comprodls.com',
|
|
204
|
-
ANALYTICS: 'https://analytics.comprodls.com',
|
|
205
|
-
SISEVENTS: 'https://sisevents.comprodls.com',
|
|
206
|
-
INTEGRATION: 'https://integration.comprodls.com',
|
|
207
|
-
DRIVE: 'https://drive.comprodls.com'
|
|
181
|
+
PROD1: {
|
|
182
|
+
PUB: 'http://internal-dls-global-prod1-1755536919.us-west-2.elb.amazonaws.com/lb-pub',
|
|
183
|
+
AUTH: 'http://internal-dls-global-prod1-1755536919.us-west-2.elb.amazonaws.com/lb-auth',
|
|
184
|
+
PUSHX: 'http://internal-dls-global-prod1-1755536919.us-west-2.elb.amazonaws.com/lb-pushx',
|
|
185
|
+
XAPI: 'http://internal-dls-global-prod1-1755536919.us-west-2.elb.amazonaws.com/lb-xapi',
|
|
186
|
+
ATTEMPTS: 'http://internal-dls-global-prod1-1755536919.us-west-2.elb.amazonaws.com/lb-attempts',
|
|
187
|
+
PRODUCT: 'http://internal-dls-global-prod1-1755536919.us-west-2.elb.amazonaws.com/lb-product',
|
|
188
|
+
ANALYTICS: 'http://internal-dls-global-prod1-1755536919.us-west-2.elb.amazonaws.com/lb-analytics',
|
|
189
|
+
INTEGRATION: 'http://internal-dls-global-prod1-1755536919.us-west-2.elb.amazonaws.com/lb-integrations',
|
|
190
|
+
DRIVE: 'http://internal-dls-global-prod1-1755536919.us-west-2.elb.amazonaws.com/lb-drive'
|
|
208
191
|
}
|
|
209
192
|
},
|
|
210
193
|
ASGARD: {
|
|
211
194
|
THOR: {
|
|
212
195
|
PUB: 'http://dls-asgard-thor-1453383019.us-west-2.elb.amazonaws.com/lb-pub',
|
|
213
196
|
AUTH: 'http://dls-asgard-thor-1453383019.us-west-2.elb.amazonaws.com/lb-auth',
|
|
214
|
-
PUSH: 'http://dls-asgard-thor-1453383019.us-west-2.elb.amazonaws.com/lb-push',
|
|
215
197
|
PUSHX: 'http://dls-asgard-thor-1453383019.us-west-2.elb.amazonaws.com/lb-pushx',
|
|
216
198
|
XAPI: 'http://dls-asgard-thor-1453383019.us-west-2.elb.amazonaws.com/lb-xapi',
|
|
217
199
|
ATTEMPTS: 'http://dls-asgard-thor-1453383019.us-west-2.elb.amazonaws.com/lb-attempts',
|
|
218
|
-
COLLAB: 'http://dls-asgard-thor-1453383019.us-west-2.elb.amazonaws.com/lb-collab',
|
|
219
200
|
PRODUCT: 'http://dls-asgard-thor-1453383019.us-west-2.elb.amazonaws.com/lb-product',
|
|
220
|
-
ACTIVITY: 'http://dls-asgard-thor-1453383019.us-west-2.elb.amazonaws.com/lb-activity',
|
|
221
201
|
ANALYTICS: 'http://dls-asgard-thor-1453383019.us-west-2.elb.amazonaws.com/lb-analytics',
|
|
222
|
-
SISEVENTS: 'http://dls-asgard-thor-1453383019.us-west-2.elb.amazonaws.com/lb-sisevents',
|
|
223
202
|
INTEGRATION: 'http://dls-asgard-thor-1453383019.us-west-2.elb.amazonaws.com/lb-integrations',
|
|
224
203
|
DRIVE: 'http://dls-asgard-thor-1453383019.us-west-2.elb.amazonaws.com/lb-drive'
|
|
225
204
|
}
|
|
@@ -239,60 +218,44 @@ exports.REALM_HOSTS = {
|
|
|
239
218
|
PROD1: {
|
|
240
219
|
PUB: 'http://internal-dls-cup-prod1-284466545.us-west-2.elb.amazonaws.com/lb-pub',
|
|
241
220
|
AUTH: 'http://internal-dls-cup-prod1-284466545.us-west-2.elb.amazonaws.com/lb-auth',
|
|
242
|
-
PUSH: 'http://internal-dls-cup-prod1-284466545.us-west-2.elb.amazonaws.com/lb-push',
|
|
243
221
|
PUSHX: 'http://internal-dls-cup-prod1-284466545.us-west-2.elb.amazonaws.com/lb-pushx',
|
|
244
222
|
XAPI: 'http://internal-dls-cup-prod1-284466545.us-west-2.elb.amazonaws.com/lb-xapi',
|
|
245
223
|
ATTEMPTS: 'http://internal-dls-cup-prod1-284466545.us-west-2.elb.amazonaws.com/lb-attempts',
|
|
246
|
-
COLLAB: 'http://internal-dls-cup-prod1-284466545.us-west-2.elb.amazonaws.com/lb-collab',
|
|
247
224
|
PRODUCT: 'http://internal-dls-cup-prod1-284466545.us-west-2.elb.amazonaws.com/lb-product',
|
|
248
|
-
ACTIVITY: 'http://internal-dls-cup-prod1-284466545.us-west-2.elb.amazonaws.com/lb-activity',
|
|
249
225
|
ANALYTICS: 'http://internal-dls-cup-prod1-284466545.us-west-2.elb.amazonaws.com/lb-analytics',
|
|
250
|
-
SISEVENTS: 'http://internal-dls-cup-prod1-284466545.us-west-2.elb.amazonaws.com/lb-sisevents',
|
|
251
226
|
INTEGRATION: 'http://internal-dls-cup-prod1-284466545.us-west-2.elb.amazonaws.com/lb-integrations',
|
|
252
227
|
DRIVE: 'http://internal-dls-cup-prod1-284466545.us-west-2.elb.amazonaws.com/lb-drive'
|
|
253
228
|
},
|
|
254
229
|
QA: {
|
|
255
230
|
PUB: 'http://internal-dls-cup-qa-41690511.us-west-2.elb.amazonaws.com/lb-pub',
|
|
256
231
|
AUTH: 'http://internal-dls-cup-qa-41690511.us-west-2.elb.amazonaws.com/lb-auth',
|
|
257
|
-
PUSH: 'http://internal-dls-cup-qa-41690511.us-west-2.elb.amazonaws.com/lb-push',
|
|
258
232
|
PUSHX: 'http://internal-dls-cup-qa-41690511.us-west-2.elb.amazonaws.com/lb-pushx',
|
|
259
233
|
XAPI: 'http://internal-dls-cup-qa-41690511.us-west-2.elb.amazonaws.com/lb-xapi',
|
|
260
234
|
ATTEMPTS: 'http://internal-dls-cup-qa-41690511.us-west-2.elb.amazonaws.com/lb-attempts',
|
|
261
|
-
COLLAB: 'http://internal-dls-cup-qa-41690511.us-west-2.elb.amazonaws.com/lb-collab',
|
|
262
235
|
PRODUCT: 'http://internal-dls-cup-qa-41690511.us-west-2.elb.amazonaws.com/lb-product',
|
|
263
|
-
ACTIVITY: 'http://internal-dls-cup-qa-41690511.us-west-2.elb.amazonaws.com/lb-activity',
|
|
264
236
|
ANALYTICS: 'http://internal-dls-cup-qa-41690511.us-west-2.elb.amazonaws.com/lb-analytics',
|
|
265
|
-
SISEVENTS: 'http://internal-dls-cup-qa-41690511.us-west-2.elb.amazonaws.com/lb-sisevents',
|
|
266
237
|
INTEGRATION: 'http://internal-dls-cup-qa-41690511.us-west-2.elb.amazonaws.com/lb-integrations',
|
|
267
238
|
DRIVE: 'http://internal-dls-cup-qa-41690511.us-west-2.elb.amazonaws.com/lb-drive'
|
|
268
239
|
},
|
|
269
240
|
HFX: {
|
|
270
241
|
PUB: 'http://internal-dls-cup-hfx-908523553.us-west-2.elb.amazonaws.com/lb-pub',
|
|
271
242
|
AUTH: 'http://internal-dls-cup-hfx-908523553.us-west-2.elb.amazonaws.com/lb-auth',
|
|
272
|
-
PUSH: 'http://internal-dls-cup-hfx-908523553.us-west-2.elb.amazonaws.com/lb-push',
|
|
273
243
|
PUSHX: 'http://internal-dls-cup-hfx-908523553.us-west-2.elb.amazonaws.com/lb-pushx',
|
|
274
244
|
XAPI: 'http://internal-dls-cup-hfx-908523553.us-west-2.elb.amazonaws.com/lb-xapi',
|
|
275
245
|
ATTEMPTS: 'http://internal-dls-cup-hfx-908523553.us-west-2.elb.amazonaws.com/lb-attempts',
|
|
276
|
-
COLLAB: 'http://internal-dls-cup-hfx-908523553.us-west-2.elb.amazonaws.com/lb-collab',
|
|
277
246
|
PRODUCT: 'http://internal-dls-cup-hfx-908523553.us-west-2.elb.amazonaws.com/lb-product',
|
|
278
|
-
ACTIVITY: 'http://internal-dls-cup-hfx-908523553.us-west-2.elb.amazonaws.com/lb-activity',
|
|
279
247
|
ANALYTICS: 'http://internal-dls-cup-hfx-908523553.us-west-2.elb.amazonaws.com/lb-analytics',
|
|
280
|
-
SISEVENTS: 'http://internal-dls-cup-hfx-908523553.us-west-2.elb.amazonaws.com/lb-sisevents',
|
|
281
248
|
INTEGRATION: 'http://internal-dls-cup-hfx-908523553.us-west-2.elb.amazonaws.com/lb-integrations',
|
|
282
249
|
DRIVE: 'http://internal-dls-cup-hfx-908523553.us-west-2.elb.amazonaws.com/lb-drive'
|
|
283
250
|
},
|
|
284
251
|
REL: {
|
|
285
252
|
PUB: 'http://internal-dls-cup-rel-1458752944.us-west-2.elb.amazonaws.com/lb-pub',
|
|
286
253
|
AUTH: 'http://internal-dls-cup-rel-1458752944.us-west-2.elb.amazonaws.com/lb-auth',
|
|
287
|
-
PUSH: 'http://internal-dls-cup-rel-1458752944.us-west-2.elb.amazonaws.com/lb-push',
|
|
288
254
|
PUSHX: 'http://internal-dls-cup-rel-1458752944.us-west-2.elb.amazonaws.com/lb-pushx',
|
|
289
255
|
XAPI: 'http://internal-dls-cup-rel-1458752944.us-west-2.elb.amazonaws.com/lb-xapi',
|
|
290
256
|
ATTEMPTS: 'http://internal-dls-cup-rel-1458752944.us-west-2.elb.amazonaws.com/lb-attempts',
|
|
291
|
-
COLLAB: 'http://internal-dls-cup-rel-1458752944.us-west-2.elb.amazonaws.com/lb-collab',
|
|
292
257
|
PRODUCT: 'http://internal-dls-cup-rel-1458752944.us-west-2.elb.amazonaws.com/lb-product',
|
|
293
|
-
ACTIVITY: 'http://internal-dls-cup-rel-1458752944.us-west-2.elb.amazonaws.com/lb-activity',
|
|
294
258
|
ANALYTICS: 'http://internal-dls-cup-rel-1458752944.us-west-2.elb.amazonaws.com/lb-analytics',
|
|
295
|
-
SISEVENTS: 'http://internal-dls-cup-rel-1458752944.us-west-2.elb.amazonaws.com/lb-sisevents',
|
|
296
259
|
INTEGRATION: 'http://internal-dls-cup-rel-1458752944.us-west-2.elb.amazonaws.com/lb-integrations',
|
|
297
260
|
DRIVE: 'http://internal-dls-cup-rel-1458752944.us-west-2.elb.amazonaws.com/lb-drive'
|
|
298
261
|
}
|
|
@@ -782,7 +745,7 @@ function addClassIdQueryParam(url, classId) {
|
|
|
782
745
|
function setupAPIToken(request, token) {
|
|
783
746
|
return request.set('Authorization', token.access_token);
|
|
784
747
|
};
|
|
785
|
-
},{"../../../config":2,"../../../helpers":3,"../errors":7,"./validations":6,"q":
|
|
748
|
+
},{"../../../config":2,"../../../helpers":3,"../errors":7,"./validations":6,"q":88,"string-template":129,"superagent":131}],6:[function(require,module,exports){
|
|
786
749
|
/*************************************************************************
|
|
787
750
|
*
|
|
788
751
|
* COMPRO CONFIDENTIAL
|
|
@@ -1237,7 +1200,7 @@ function getSingleInvitation(organizationId, options) {
|
|
|
1237
1200
|
}
|
|
1238
1201
|
|
|
1239
1202
|
|
|
1240
|
-
},{"../helpers":3,"q":
|
|
1203
|
+
},{"../helpers":3,"q":88,"superagent":131}],11:[function(require,module,exports){
|
|
1241
1204
|
/*************************************************************************
|
|
1242
1205
|
*
|
|
1243
1206
|
* COMPRO CONFIDENTIAL
|
|
@@ -1448,7 +1411,7 @@ Activity.prototype.getQuestionsCount = function () {
|
|
|
1448
1411
|
return dfd.promise;
|
|
1449
1412
|
}
|
|
1450
1413
|
|
|
1451
|
-
},{"../../helpers":3,"./attempt":12,"extend":66,"q":
|
|
1414
|
+
},{"../../helpers":3,"./attempt":12,"extend":66,"q":88,"superagent":131}],12:[function(require,module,exports){
|
|
1452
1415
|
/*************************************************************************
|
|
1453
1416
|
*
|
|
1454
1417
|
* COMPRO CONFIDENTIAL
|
|
@@ -1881,7 +1844,7 @@ Attempt.prototype.submit = function (userresponse) {
|
|
|
1881
1844
|
return dfd.promise;
|
|
1882
1845
|
};
|
|
1883
1846
|
|
|
1884
|
-
},{"../../helpers":3,"extend":66,"q":
|
|
1847
|
+
},{"../../helpers":3,"extend":66,"q":88,"superagent":131}],13:[function(require,module,exports){
|
|
1885
1848
|
/*************************************************************************
|
|
1886
1849
|
*
|
|
1887
1850
|
* COMPRO CONFIDENTIAL
|
|
@@ -1943,12 +1906,18 @@ module.exports = require('./activity');
|
|
|
1943
1906
|
|
|
1944
1907
|
var q = require('q');
|
|
1945
1908
|
var request = require('superagent');
|
|
1909
|
+
var Agent = require('agentkeepalive');
|
|
1946
1910
|
|
|
1947
1911
|
var helpers = require('../../helpers');
|
|
1948
1912
|
var DLSError = helpers.errors.DLSError;
|
|
1949
1913
|
|
|
1950
1914
|
module.exports = analytics;
|
|
1951
1915
|
|
|
1916
|
+
var keepaliveAgent = new Agent({
|
|
1917
|
+
timeout: 60000,
|
|
1918
|
+
freeSocketTimeout: 30000
|
|
1919
|
+
});
|
|
1920
|
+
|
|
1952
1921
|
/*********************************
|
|
1953
1922
|
* Public Function definitions
|
|
1954
1923
|
**********************************/
|
|
@@ -3496,13 +3465,15 @@ function getTimeseriesAnalytics(options) {
|
|
|
3496
3465
|
|
|
3497
3466
|
if(self.traceid) { requestAPI.set('X-Amzn-Trace-Id', self.traceid); }
|
|
3498
3467
|
|
|
3499
|
-
requestAPI
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3468
|
+
requestAPI
|
|
3469
|
+
.agent(keepaliveAgent)
|
|
3470
|
+
.end(function (error, response) {
|
|
3471
|
+
if(error) {
|
|
3472
|
+
err = new DLSError(helpers.errors.ERROR_TYPES.API_ERROR, error);
|
|
3473
|
+
dfd.reject(err);
|
|
3474
|
+
}
|
|
3475
|
+
else { dfd.resolve(response.body); }
|
|
3476
|
+
});
|
|
3506
3477
|
}
|
|
3507
3478
|
else {
|
|
3508
3479
|
err = {};
|
|
@@ -3512,7 +3483,7 @@ function getTimeseriesAnalytics(options) {
|
|
|
3512
3483
|
}
|
|
3513
3484
|
return dfd.promise;
|
|
3514
3485
|
}
|
|
3515
|
-
},{"../../helpers":3,"q":
|
|
3486
|
+
},{"../../helpers":3,"agentkeepalive":35,"q":88,"superagent":131}],15:[function(require,module,exports){
|
|
3516
3487
|
/*************************************************************************
|
|
3517
3488
|
*
|
|
3518
3489
|
* COMPRO CONFIDENTIAL
|
|
@@ -3856,7 +3827,7 @@ function getUserLastAttemptForActivity(options) {
|
|
|
3856
3827
|
return dfd.promise;
|
|
3857
3828
|
}
|
|
3858
3829
|
|
|
3859
|
-
},{"../../helpers":3,"q":
|
|
3830
|
+
},{"../../helpers":3,"q":88,"superagent":131}],16:[function(require,module,exports){
|
|
3860
3831
|
/*************************************************************************
|
|
3861
3832
|
*
|
|
3862
3833
|
* COMPRO CONFIDENTIAL
|
|
@@ -3884,6 +3855,7 @@ function getUserLastAttemptForActivity(options) {
|
|
|
3884
3855
|
|
|
3885
3856
|
var q = require('q');
|
|
3886
3857
|
var request = require('superagent');
|
|
3858
|
+
var Agent = require('agentkeepalive');
|
|
3887
3859
|
|
|
3888
3860
|
var helpers = require('../../helpers');
|
|
3889
3861
|
var converter = require('../../helpers/lib/api/converter');
|
|
@@ -3894,6 +3866,12 @@ var DLSError = helpers.errors.DLSError;
|
|
|
3894
3866
|
* Setting Up Module Entry Point
|
|
3895
3867
|
**********************************/
|
|
3896
3868
|
module.exports = auth;
|
|
3869
|
+
|
|
3870
|
+
var keepaliveAgent = new Agent({
|
|
3871
|
+
timeout: 60000,
|
|
3872
|
+
freeSocketTimeout: 30000
|
|
3873
|
+
});
|
|
3874
|
+
|
|
3897
3875
|
//Auth Adaptor Contsructor
|
|
3898
3876
|
function auth() {
|
|
3899
3877
|
return {
|
|
@@ -4350,16 +4328,18 @@ function getClassUsers(options) {
|
|
|
4350
4328
|
requestAPI = helpers.api.setupAPIToken(requestAPI, self.token);
|
|
4351
4329
|
|
|
4352
4330
|
// Call GET ALL USER Api
|
|
4353
|
-
requestAPI
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4331
|
+
requestAPI
|
|
4332
|
+
.agent(keepaliveAgent)
|
|
4333
|
+
.end(function(err, response) {
|
|
4334
|
+
if(err) {
|
|
4335
|
+
err = new DLSError(helpers.errors.ERROR_TYPES.API_ERROR, err);
|
|
4336
|
+
dfd.reject(err);
|
|
4337
|
+
}
|
|
4338
|
+
else {
|
|
4339
|
+
response.body.entities = converter.convertEnrollmetsResponse({data: response.body.entities}) ;
|
|
4340
|
+
dfd.resolve(response.body);
|
|
4341
|
+
}
|
|
4342
|
+
});
|
|
4363
4343
|
} else {
|
|
4364
4344
|
err = {};
|
|
4365
4345
|
err.message = err.description = 'Required parameter classid is not defined.';
|
|
@@ -4768,14 +4748,16 @@ function getParticularClass(options) {
|
|
|
4768
4748
|
//Setup token in Authorization header
|
|
4769
4749
|
requestAPI = helpers.api.setupAPIToken(requestAPI, self.token);
|
|
4770
4750
|
|
|
4771
|
-
requestAPI
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
|
|
4776
|
-
|
|
4777
|
-
|
|
4778
|
-
|
|
4751
|
+
requestAPI
|
|
4752
|
+
.agent(keepaliveAgent)
|
|
4753
|
+
.end(function(err, response) {
|
|
4754
|
+
if(err) {
|
|
4755
|
+
err = new DLSError(helpers.errors.ERROR_TYPES.API_ERROR, err);
|
|
4756
|
+
dfd.reject(err);
|
|
4757
|
+
} else {
|
|
4758
|
+
dfd.resolve(response.body);
|
|
4759
|
+
}
|
|
4760
|
+
});
|
|
4779
4761
|
} else {
|
|
4780
4762
|
err = {};
|
|
4781
4763
|
err.message = err.description = 'classId not found in request options.';
|
|
@@ -5173,6 +5155,7 @@ function enrollUsertoClass(options) {
|
|
|
5173
5155
|
|
|
5174
5156
|
//options = {
|
|
5175
5157
|
// classid: '', //Class Id
|
|
5158
|
+
// classrole: ''
|
|
5176
5159
|
//};
|
|
5177
5160
|
function enrollSelftoClass(options) {
|
|
5178
5161
|
var self = this;
|
|
@@ -5193,8 +5176,13 @@ function enrollSelftoClass(options) {
|
|
|
5193
5176
|
classId: options.classid
|
|
5194
5177
|
});
|
|
5195
5178
|
|
|
5179
|
+
var params = { classrole: options.classrole };
|
|
5196
5180
|
//Setup request with URL and Params
|
|
5197
|
-
var requestAPI = request.post(url)
|
|
5181
|
+
var requestAPI = request.post(url)
|
|
5182
|
+
.set('Content-Type', 'application/json')
|
|
5183
|
+
.set('Accept', 'application/json')
|
|
5184
|
+
.send(params);
|
|
5185
|
+
|
|
5198
5186
|
if(self.traceid) { requestAPI.set('X-Amzn-Trace-Id', self.traceid); }
|
|
5199
5187
|
|
|
5200
5188
|
//Setup token in Authorization header
|
|
@@ -6461,7 +6449,7 @@ function deleteItemsFromShowcaseOfAClass(options){
|
|
|
6461
6449
|
return dfd.promise;
|
|
6462
6450
|
}
|
|
6463
6451
|
|
|
6464
|
-
},{"../../helpers":3,"../../helpers/lib/api/converter":4,"q":
|
|
6452
|
+
},{"../../helpers":3,"../../helpers/lib/api/converter":4,"agentkeepalive":35,"q":88,"superagent":131}],17:[function(require,module,exports){
|
|
6465
6453
|
/*************************************************************************
|
|
6466
6454
|
*
|
|
6467
6455
|
* COMPRO CONFIDENTIAL
|
|
@@ -6931,7 +6919,7 @@ function updateConnectionForUser(orgid, token, config, options, action) {
|
|
|
6931
6919
|
return dfd.promise;
|
|
6932
6920
|
}
|
|
6933
6921
|
|
|
6934
|
-
},{"../../helpers":3,"q":
|
|
6922
|
+
},{"../../helpers":3,"q":88,"superagent":131}],18:[function(require,module,exports){
|
|
6935
6923
|
/*************************************************************************
|
|
6936
6924
|
*
|
|
6937
6925
|
* COMPRO CONFIDENTIAL
|
|
@@ -7077,7 +7065,7 @@ function getAllDocumentsInAFolder(options) {
|
|
|
7077
7065
|
return dfd.promise;
|
|
7078
7066
|
}
|
|
7079
7067
|
|
|
7080
|
-
},{"../../helpers":3,"q":
|
|
7068
|
+
},{"../../helpers":3,"q":88,"superagent":131}],19:[function(require,module,exports){
|
|
7081
7069
|
/*************************************************************************
|
|
7082
7070
|
*
|
|
7083
7071
|
* COMPRO CONFIDENTIAL
|
|
@@ -7415,7 +7403,7 @@ function publishCustomEvents(options) {
|
|
|
7415
7403
|
return deferred.promise;
|
|
7416
7404
|
}
|
|
7417
7405
|
|
|
7418
|
-
},{"../../helpers":3,"../../helpers/lib/api/converter":4,"q":
|
|
7406
|
+
},{"../../helpers":3,"../../helpers/lib/api/converter":4,"q":88,"superagent":131}],20:[function(require,module,exports){
|
|
7419
7407
|
/*************************************************************************
|
|
7420
7408
|
*
|
|
7421
7409
|
* COMPRO CONFIDENTIAL
|
|
@@ -7469,9 +7457,18 @@ function invitations() {
|
|
|
7469
7457
|
context: 'string', // required
|
|
7470
7458
|
created: 'string', // required
|
|
7471
7459
|
space_title: 'string',
|
|
7472
|
-
class_enrollment: {
|
|
7460
|
+
class_enrollment: {
|
|
7461
|
+
classid: 'string', // required. Correlated with context
|
|
7462
|
+
class_role: 'string', // optional
|
|
7463
|
+
inviter_email: 'string' // optional
|
|
7464
|
+
},
|
|
7473
7465
|
invitation_data: [
|
|
7474
7466
|
{
|
|
7467
|
+
class_enrollment : { // optional, will override the outer context
|
|
7468
|
+
classid: 'string' // required. Correlated with context
|
|
7469
|
+
class_role: 'string', // optional
|
|
7470
|
+
inviter_email: 'string' // optional
|
|
7471
|
+
},
|
|
7475
7472
|
email: 'string', // required
|
|
7476
7473
|
dls_account_status: 'string',
|
|
7477
7474
|
ext_account_status: 'string',
|
|
@@ -7731,7 +7728,7 @@ function resendSingleInvitation(options) {
|
|
|
7731
7728
|
return dfd.promise;
|
|
7732
7729
|
}
|
|
7733
7730
|
|
|
7734
|
-
},{"../../helpers":3,"q":
|
|
7731
|
+
},{"../../helpers":3,"q":88,"superagent":131}],21:[function(require,module,exports){
|
|
7735
7732
|
/*************************************************************************
|
|
7736
7733
|
*
|
|
7737
7734
|
* COMPRO CONFIDENTIAL
|
|
@@ -8192,7 +8189,7 @@ function createStatement(options) {
|
|
|
8192
8189
|
}*/
|
|
8193
8190
|
|
|
8194
8191
|
|
|
8195
|
-
},{"../../helpers":3,"q":
|
|
8192
|
+
},{"../../helpers":3,"q":88,"tincanjs":133}],22:[function(require,module,exports){
|
|
8196
8193
|
/*************************************************************************
|
|
8197
8194
|
*
|
|
8198
8195
|
* COMPRO CONFIDENTIAL
|
|
@@ -8540,7 +8537,7 @@ function getSingleProductFamily(options) {
|
|
|
8540
8537
|
return dfd.promise;
|
|
8541
8538
|
}
|
|
8542
8539
|
|
|
8543
|
-
},{"../../helpers":3,"q":
|
|
8540
|
+
},{"../../helpers":3,"q":88,"superagent":131}],23:[function(require,module,exports){
|
|
8544
8541
|
/*************************************************************************
|
|
8545
8542
|
*
|
|
8546
8543
|
* COMPRO CONFIDENTIAL
|
|
@@ -8959,8 +8956,12 @@ function getSingleBundle(options) {
|
|
|
8959
8956
|
// "family-code": "string", // Mandatory
|
|
8960
8957
|
// "ext_user_id": "string", // Optional
|
|
8961
8958
|
// "assets": { // Optional
|
|
8962
|
-
// "branchref": "string", //
|
|
8963
|
-
// "bucket": "string" //
|
|
8959
|
+
// "branchref": "string", // Optional
|
|
8960
|
+
// "bucket": "string" // Optional
|
|
8961
|
+
// "source": { // Optional
|
|
8962
|
+
// "branchref": "string", // Mandatory
|
|
8963
|
+
// "bucket": "string" // Mandatory
|
|
8964
|
+
// }
|
|
8964
8965
|
// },
|
|
8965
8966
|
// "externalrefid": "string", // Optional
|
|
8966
8967
|
// "data": {... } // Optional
|
|
@@ -9008,8 +9009,12 @@ function createProductFamily(options) {
|
|
|
9008
9009
|
// "body": {
|
|
9009
9010
|
// "ext_user_id": "string", // Optional
|
|
9010
9011
|
// "assets": { // Optional
|
|
9011
|
-
// "branchref": "string", //
|
|
9012
|
-
// "bucket": "string" //
|
|
9012
|
+
// "branchref": "string", // Optional
|
|
9013
|
+
// "bucket": "string" // Optional
|
|
9014
|
+
// "source": { // Optional
|
|
9015
|
+
// "branchref": "string", // Mandatory
|
|
9016
|
+
// "bucket": "string" // Mandatory
|
|
9017
|
+
// }
|
|
9013
9018
|
// },
|
|
9014
9019
|
// "externalrefid": "string", // Optional
|
|
9015
9020
|
// "data": {... } // Optional
|
|
@@ -9132,7 +9137,7 @@ function getAllProductFamilies(options) {
|
|
|
9132
9137
|
return dfd.promise;
|
|
9133
9138
|
}
|
|
9134
9139
|
|
|
9135
|
-
},{"../../helpers":3,"q":
|
|
9140
|
+
},{"../../helpers":3,"q":88,"superagent":131}],24:[function(require,module,exports){
|
|
9136
9141
|
/*************************************************************************
|
|
9137
9142
|
*
|
|
9138
9143
|
* COMPRO CONFIDENTIAL
|
|
@@ -9324,7 +9329,7 @@ function grantByAccountIdOnExtUserId(options) {
|
|
|
9324
9329
|
}
|
|
9325
9330
|
|
|
9326
9331
|
|
|
9327
|
-
},{"../../helpers":3,"./pubnubClientWrapper":25,"q":
|
|
9332
|
+
},{"../../helpers":3,"./pubnubClientWrapper":25,"q":88,"superagent":131}],25:[function(require,module,exports){
|
|
9328
9333
|
var pubNub = require("pubnub");
|
|
9329
9334
|
var EventEmitter = require("events").EventEmitter;
|
|
9330
9335
|
var helpers = require('../../helpers');
|
|
@@ -9537,7 +9542,7 @@ module.exports = function () {
|
|
|
9537
9542
|
|
|
9538
9543
|
}; //End of Client Wrapper module
|
|
9539
9544
|
|
|
9540
|
-
},{"../../helpers":3,"events":65,"pubnub":
|
|
9545
|
+
},{"../../helpers":3,"events":65,"pubnub":86}],26:[function(require,module,exports){
|
|
9541
9546
|
/*************************************************************************
|
|
9542
9547
|
*
|
|
9543
9548
|
* COMPRO CONFIDENTIAL
|
|
@@ -9726,7 +9731,7 @@ function _setup(orgId, userId) {
|
|
|
9726
9731
|
return dfd.promise;
|
|
9727
9732
|
}
|
|
9728
9733
|
|
|
9729
|
-
},{"../../helpers":3,"events":65,"q":
|
|
9734
|
+
},{"../../helpers":3,"events":65,"q":88,"socket.io-client":107}],27:[function(require,module,exports){
|
|
9730
9735
|
/*************************************************************************
|
|
9731
9736
|
*
|
|
9732
9737
|
* COMPRO CONFIDENTIAL
|
|
@@ -9841,7 +9846,7 @@ function postSISEvent(options) {
|
|
|
9841
9846
|
return dfd.promise;
|
|
9842
9847
|
}
|
|
9843
9848
|
|
|
9844
|
-
},{"../../helpers":3,"q":
|
|
9849
|
+
},{"../../helpers":3,"q":88,"superagent":131,"underscore":135}],28:[function(require,module,exports){
|
|
9845
9850
|
/*************************************************************************
|
|
9846
9851
|
*
|
|
9847
9852
|
* COMPRO CONFIDENTIAL
|
|
@@ -10878,7 +10883,7 @@ function updateInstituteTitle(options){
|
|
|
10878
10883
|
return dfd.promise;
|
|
10879
10884
|
}
|
|
10880
10885
|
|
|
10881
|
-
},{"../../helpers":3,"q":
|
|
10886
|
+
},{"../../helpers":3,"q":88,"superagent":131}],29:[function(require,module,exports){
|
|
10882
10887
|
/*************************************************************************
|
|
10883
10888
|
*
|
|
10884
10889
|
* COMPRO CONFIDENTIAL
|
|
@@ -11055,7 +11060,7 @@ function provisionSpacesToSuperAdmin(options) {
|
|
|
11055
11060
|
return dfd.promise;
|
|
11056
11061
|
}
|
|
11057
11062
|
|
|
11058
|
-
},{"../../helpers":3,"q":
|
|
11063
|
+
},{"../../helpers":3,"q":88,"superagent":131}],30:[function(require,module,exports){
|
|
11059
11064
|
/*************************************************************************
|
|
11060
11065
|
*
|
|
11061
11066
|
* COMPRO CONFIDENTIAL
|
|
@@ -11521,7 +11526,7 @@ function updateWorkflowRequest(options) {
|
|
|
11521
11526
|
}
|
|
11522
11527
|
return dfd.promise;
|
|
11523
11528
|
}
|
|
11524
|
-
},{"./../../helpers":3,"q":
|
|
11529
|
+
},{"./../../helpers":3,"q":88,"superagent":131}],31:[function(require,module,exports){
|
|
11525
11530
|
/*************************************************************************
|
|
11526
11531
|
*
|
|
11527
11532
|
* COMPRO CONFIDENTIAL
|
|
@@ -11798,7 +11803,7 @@ function resetUserProductProgress(options) {
|
|
|
11798
11803
|
return dfd.promise;
|
|
11799
11804
|
}
|
|
11800
11805
|
|
|
11801
|
-
},{"../../helpers":3,"q":
|
|
11806
|
+
},{"../../helpers":3,"q":88,"superagent":131}],32:[function(require,module,exports){
|
|
11802
11807
|
/*************************************************************************
|
|
11803
11808
|
*
|
|
11804
11809
|
* COMPRO CONFIDENTIAL
|
|
@@ -11914,7 +11919,7 @@ function authWithToken(organizationId, token, options) {
|
|
|
11914
11919
|
return dfd.promise;
|
|
11915
11920
|
};
|
|
11916
11921
|
|
|
11917
|
-
},{"../helpers":3,"./validations":33,"q":
|
|
11922
|
+
},{"../helpers":3,"./validations":33,"q":88,"superagent":131}],33:[function(require,module,exports){
|
|
11918
11923
|
/*************************************************************************
|
|
11919
11924
|
*
|
|
11920
11925
|
* COMPRO CONFIDENTIAL
|
|
@@ -12035,6 +12040,13 @@ function after(count, callback, err_cb) {
|
|
|
12035
12040
|
function noop() {}
|
|
12036
12041
|
|
|
12037
12042
|
},{}],35:[function(require,module,exports){
|
|
12043
|
+
module.exports = noop;
|
|
12044
|
+
module.exports.HttpsAgent = noop;
|
|
12045
|
+
|
|
12046
|
+
// Noop function for browser since native api's don't use agents.
|
|
12047
|
+
function noop () {}
|
|
12048
|
+
|
|
12049
|
+
},{}],36:[function(require,module,exports){
|
|
12038
12050
|
/**
|
|
12039
12051
|
* An abstraction for slicing an arraybuffer even when
|
|
12040
12052
|
* ArrayBuffer.prototype.slice is not supported
|
|
@@ -12065,7 +12077,7 @@ module.exports = function(arraybuffer, start, end) {
|
|
|
12065
12077
|
return result.buffer;
|
|
12066
12078
|
};
|
|
12067
12079
|
|
|
12068
|
-
},{}],
|
|
12080
|
+
},{}],37:[function(require,module,exports){
|
|
12069
12081
|
|
|
12070
12082
|
/**
|
|
12071
12083
|
* Expose `Backoff`.
|
|
@@ -12152,7 +12164,7 @@ Backoff.prototype.setJitter = function(jitter){
|
|
|
12152
12164
|
};
|
|
12153
12165
|
|
|
12154
12166
|
|
|
12155
|
-
},{}],
|
|
12167
|
+
},{}],38:[function(require,module,exports){
|
|
12156
12168
|
/*
|
|
12157
12169
|
* base64-arraybuffer
|
|
12158
12170
|
* https://github.com/niklasvh/base64-arraybuffer
|
|
@@ -12213,7 +12225,7 @@ Backoff.prototype.setJitter = function(jitter){
|
|
|
12213
12225
|
};
|
|
12214
12226
|
})("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/");
|
|
12215
12227
|
|
|
12216
|
-
},{}],
|
|
12228
|
+
},{}],39:[function(require,module,exports){
|
|
12217
12229
|
var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
|
12218
12230
|
|
|
12219
12231
|
;(function (exports) {
|
|
@@ -12339,7 +12351,7 @@ var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
|
|
12339
12351
|
exports.fromByteArray = uint8ToBase64
|
|
12340
12352
|
}(typeof exports === 'undefined' ? (this.base64js = {}) : exports))
|
|
12341
12353
|
|
|
12342
|
-
},{}],
|
|
12354
|
+
},{}],40:[function(require,module,exports){
|
|
12343
12355
|
(function (global){
|
|
12344
12356
|
/**
|
|
12345
12357
|
* Create a blob builder even when vendor prefixes exist
|
|
@@ -12439,14 +12451,14 @@ module.exports = (function() {
|
|
|
12439
12451
|
})();
|
|
12440
12452
|
|
|
12441
12453
|
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
12442
|
-
},{}],40:[function(require,module,exports){
|
|
12443
|
-
|
|
12444
12454
|
},{}],41:[function(require,module,exports){
|
|
12455
|
+
|
|
12456
|
+
},{}],42:[function(require,module,exports){
|
|
12445
12457
|
(function (global){
|
|
12446
12458
|
/*!
|
|
12447
12459
|
* The buffer module from node.js, for the browser.
|
|
12448
12460
|
*
|
|
12449
|
-
* @author Feross Aboukhadijeh <
|
|
12461
|
+
* @author Feross Aboukhadijeh <http://feross.org>
|
|
12450
12462
|
* @license MIT
|
|
12451
12463
|
*/
|
|
12452
12464
|
/* eslint-disable no-proto */
|
|
@@ -13993,7 +14005,7 @@ function blitBuffer (src, dst, offset, length) {
|
|
|
13993
14005
|
}
|
|
13994
14006
|
|
|
13995
14007
|
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
13996
|
-
},{"base64-js":
|
|
14008
|
+
},{"base64-js":39,"ieee754":72,"isarray":75}],43:[function(require,module,exports){
|
|
13997
14009
|
module.exports = {
|
|
13998
14010
|
"100": "Continue",
|
|
13999
14011
|
"101": "Switching Protocols",
|
|
@@ -14054,7 +14066,7 @@ module.exports = {
|
|
|
14054
14066
|
"511": "Network Authentication Required"
|
|
14055
14067
|
}
|
|
14056
14068
|
|
|
14057
|
-
},{}],
|
|
14069
|
+
},{}],44:[function(require,module,exports){
|
|
14058
14070
|
/**
|
|
14059
14071
|
* Slice reference.
|
|
14060
14072
|
*/
|
|
@@ -14079,171 +14091,6 @@ module.exports = function(obj, fn){
|
|
|
14079
14091
|
}
|
|
14080
14092
|
};
|
|
14081
14093
|
|
|
14082
|
-
},{}],44:[function(require,module,exports){
|
|
14083
|
-
|
|
14084
|
-
/**
|
|
14085
|
-
* Expose `Emitter`.
|
|
14086
|
-
*/
|
|
14087
|
-
|
|
14088
|
-
if (typeof module !== 'undefined') {
|
|
14089
|
-
module.exports = Emitter;
|
|
14090
|
-
}
|
|
14091
|
-
|
|
14092
|
-
/**
|
|
14093
|
-
* Initialize a new `Emitter`.
|
|
14094
|
-
*
|
|
14095
|
-
* @api public
|
|
14096
|
-
*/
|
|
14097
|
-
|
|
14098
|
-
function Emitter(obj) {
|
|
14099
|
-
if (obj) return mixin(obj);
|
|
14100
|
-
};
|
|
14101
|
-
|
|
14102
|
-
/**
|
|
14103
|
-
* Mixin the emitter properties.
|
|
14104
|
-
*
|
|
14105
|
-
* @param {Object} obj
|
|
14106
|
-
* @return {Object}
|
|
14107
|
-
* @api private
|
|
14108
|
-
*/
|
|
14109
|
-
|
|
14110
|
-
function mixin(obj) {
|
|
14111
|
-
for (var key in Emitter.prototype) {
|
|
14112
|
-
obj[key] = Emitter.prototype[key];
|
|
14113
|
-
}
|
|
14114
|
-
return obj;
|
|
14115
|
-
}
|
|
14116
|
-
|
|
14117
|
-
/**
|
|
14118
|
-
* Listen on the given `event` with `fn`.
|
|
14119
|
-
*
|
|
14120
|
-
* @param {String} event
|
|
14121
|
-
* @param {Function} fn
|
|
14122
|
-
* @return {Emitter}
|
|
14123
|
-
* @api public
|
|
14124
|
-
*/
|
|
14125
|
-
|
|
14126
|
-
Emitter.prototype.on =
|
|
14127
|
-
Emitter.prototype.addEventListener = function(event, fn){
|
|
14128
|
-
this._callbacks = this._callbacks || {};
|
|
14129
|
-
(this._callbacks['$' + event] = this._callbacks['$' + event] || [])
|
|
14130
|
-
.push(fn);
|
|
14131
|
-
return this;
|
|
14132
|
-
};
|
|
14133
|
-
|
|
14134
|
-
/**
|
|
14135
|
-
* Adds an `event` listener that will be invoked a single
|
|
14136
|
-
* time then automatically removed.
|
|
14137
|
-
*
|
|
14138
|
-
* @param {String} event
|
|
14139
|
-
* @param {Function} fn
|
|
14140
|
-
* @return {Emitter}
|
|
14141
|
-
* @api public
|
|
14142
|
-
*/
|
|
14143
|
-
|
|
14144
|
-
Emitter.prototype.once = function(event, fn){
|
|
14145
|
-
function on() {
|
|
14146
|
-
this.off(event, on);
|
|
14147
|
-
fn.apply(this, arguments);
|
|
14148
|
-
}
|
|
14149
|
-
|
|
14150
|
-
on.fn = fn;
|
|
14151
|
-
this.on(event, on);
|
|
14152
|
-
return this;
|
|
14153
|
-
};
|
|
14154
|
-
|
|
14155
|
-
/**
|
|
14156
|
-
* Remove the given callback for `event` or all
|
|
14157
|
-
* registered callbacks.
|
|
14158
|
-
*
|
|
14159
|
-
* @param {String} event
|
|
14160
|
-
* @param {Function} fn
|
|
14161
|
-
* @return {Emitter}
|
|
14162
|
-
* @api public
|
|
14163
|
-
*/
|
|
14164
|
-
|
|
14165
|
-
Emitter.prototype.off =
|
|
14166
|
-
Emitter.prototype.removeListener =
|
|
14167
|
-
Emitter.prototype.removeAllListeners =
|
|
14168
|
-
Emitter.prototype.removeEventListener = function(event, fn){
|
|
14169
|
-
this._callbacks = this._callbacks || {};
|
|
14170
|
-
|
|
14171
|
-
// all
|
|
14172
|
-
if (0 == arguments.length) {
|
|
14173
|
-
this._callbacks = {};
|
|
14174
|
-
return this;
|
|
14175
|
-
}
|
|
14176
|
-
|
|
14177
|
-
// specific event
|
|
14178
|
-
var callbacks = this._callbacks['$' + event];
|
|
14179
|
-
if (!callbacks) return this;
|
|
14180
|
-
|
|
14181
|
-
// remove all handlers
|
|
14182
|
-
if (1 == arguments.length) {
|
|
14183
|
-
delete this._callbacks['$' + event];
|
|
14184
|
-
return this;
|
|
14185
|
-
}
|
|
14186
|
-
|
|
14187
|
-
// remove specific handler
|
|
14188
|
-
var cb;
|
|
14189
|
-
for (var i = 0; i < callbacks.length; i++) {
|
|
14190
|
-
cb = callbacks[i];
|
|
14191
|
-
if (cb === fn || cb.fn === fn) {
|
|
14192
|
-
callbacks.splice(i, 1);
|
|
14193
|
-
break;
|
|
14194
|
-
}
|
|
14195
|
-
}
|
|
14196
|
-
return this;
|
|
14197
|
-
};
|
|
14198
|
-
|
|
14199
|
-
/**
|
|
14200
|
-
* Emit `event` with the given args.
|
|
14201
|
-
*
|
|
14202
|
-
* @param {String} event
|
|
14203
|
-
* @param {Mixed} ...
|
|
14204
|
-
* @return {Emitter}
|
|
14205
|
-
*/
|
|
14206
|
-
|
|
14207
|
-
Emitter.prototype.emit = function(event){
|
|
14208
|
-
this._callbacks = this._callbacks || {};
|
|
14209
|
-
var args = [].slice.call(arguments, 1)
|
|
14210
|
-
, callbacks = this._callbacks['$' + event];
|
|
14211
|
-
|
|
14212
|
-
if (callbacks) {
|
|
14213
|
-
callbacks = callbacks.slice(0);
|
|
14214
|
-
for (var i = 0, len = callbacks.length; i < len; ++i) {
|
|
14215
|
-
callbacks[i].apply(this, args);
|
|
14216
|
-
}
|
|
14217
|
-
}
|
|
14218
|
-
|
|
14219
|
-
return this;
|
|
14220
|
-
};
|
|
14221
|
-
|
|
14222
|
-
/**
|
|
14223
|
-
* Return array of callbacks for `event`.
|
|
14224
|
-
*
|
|
14225
|
-
* @param {String} event
|
|
14226
|
-
* @return {Array}
|
|
14227
|
-
* @api public
|
|
14228
|
-
*/
|
|
14229
|
-
|
|
14230
|
-
Emitter.prototype.listeners = function(event){
|
|
14231
|
-
this._callbacks = this._callbacks || {};
|
|
14232
|
-
return this._callbacks['$' + event] || [];
|
|
14233
|
-
};
|
|
14234
|
-
|
|
14235
|
-
/**
|
|
14236
|
-
* Check if this emitter has `event` handlers.
|
|
14237
|
-
*
|
|
14238
|
-
* @param {String} event
|
|
14239
|
-
* @return {Boolean}
|
|
14240
|
-
* @api public
|
|
14241
|
-
*/
|
|
14242
|
-
|
|
14243
|
-
Emitter.prototype.hasListeners = function(event){
|
|
14244
|
-
return !! this.listeners(event).length;
|
|
14245
|
-
};
|
|
14246
|
-
|
|
14247
14094
|
},{}],45:[function(require,module,exports){
|
|
14248
14095
|
|
|
14249
14096
|
module.exports = function(a, b){
|
|
@@ -14253,7 +14100,6 @@ module.exports = function(a, b){
|
|
|
14253
14100
|
a.prototype.constructor = a;
|
|
14254
14101
|
};
|
|
14255
14102
|
},{}],46:[function(require,module,exports){
|
|
14256
|
-
(function (Buffer){
|
|
14257
14103
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
14258
14104
|
//
|
|
14259
14105
|
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
@@ -14356,14 +14202,13 @@ function isPrimitive(arg) {
|
|
|
14356
14202
|
}
|
|
14357
14203
|
exports.isPrimitive = isPrimitive;
|
|
14358
14204
|
|
|
14359
|
-
exports.isBuffer = Buffer.isBuffer;
|
|
14205
|
+
exports.isBuffer = require('buffer').Buffer.isBuffer;
|
|
14360
14206
|
|
|
14361
14207
|
function objectToString(o) {
|
|
14362
14208
|
return Object.prototype.toString.call(o);
|
|
14363
14209
|
}
|
|
14364
14210
|
|
|
14365
|
-
}
|
|
14366
|
-
},{"../../is-buffer/index.js":75}],47:[function(require,module,exports){
|
|
14211
|
+
},{"buffer":42}],47:[function(require,module,exports){
|
|
14367
14212
|
|
|
14368
14213
|
module.exports = require('./lib/');
|
|
14369
14214
|
|
|
@@ -15111,7 +14956,7 @@ Socket.prototype.filterUpgrades = function (upgrades) {
|
|
|
15111
14956
|
};
|
|
15112
14957
|
|
|
15113
14958
|
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
15114
|
-
},{"./transport":50,"./transports":51,"component-emitter":57,"debug":58,"engine.io-parser":61,"indexof":73,"parsejson":
|
|
14959
|
+
},{"./transport":50,"./transports":51,"component-emitter":57,"debug":58,"engine.io-parser":61,"indexof":73,"parsejson":81,"parseqs":82,"parseuri":83}],50:[function(require,module,exports){
|
|
15115
14960
|
/**
|
|
15116
14961
|
* Module dependencies.
|
|
15117
14962
|
*/
|
|
@@ -16232,7 +16077,7 @@ Polling.prototype.uri = function(){
|
|
|
16232
16077
|
return schema + '://' + (ipv6 ? '[' + this.hostname + ']' : this.hostname) + port + this.path + query;
|
|
16233
16078
|
};
|
|
16234
16079
|
|
|
16235
|
-
},{"../transport":50,"component-inherit":45,"debug":58,"engine.io-parser":61,"parseqs":
|
|
16080
|
+
},{"../transport":50,"component-inherit":45,"debug":58,"engine.io-parser":61,"parseqs":82,"xmlhttprequest-ssl":56,"yeast":142}],55:[function(require,module,exports){
|
|
16236
16081
|
(function (global){
|
|
16237
16082
|
/**
|
|
16238
16083
|
* Module dependencies.
|
|
@@ -16524,7 +16369,7 @@ WS.prototype.check = function(){
|
|
|
16524
16369
|
};
|
|
16525
16370
|
|
|
16526
16371
|
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
16527
|
-
},{"../transport":50,"component-inherit":45,"debug":58,"engine.io-parser":61,"parseqs":
|
|
16372
|
+
},{"../transport":50,"component-inherit":45,"debug":58,"engine.io-parser":61,"parseqs":82,"ws":41,"yeast":142}],56:[function(require,module,exports){
|
|
16528
16373
|
// browser shim for xmlhttprequest module
|
|
16529
16374
|
var hasCORS = require('has-cors');
|
|
16530
16375
|
|
|
@@ -17822,7 +17667,7 @@ exports.decodePayloadAsBinary = function (data, binaryType, callback) {
|
|
|
17822
17667
|
};
|
|
17823
17668
|
|
|
17824
17669
|
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
17825
|
-
},{"./keys":62,"after":34,"arraybuffer.slice":
|
|
17670
|
+
},{"./keys":62,"after":34,"arraybuffer.slice":36,"base64-arraybuffer":38,"blob":40,"has-binary":63,"utf8":137}],62:[function(require,module,exports){
|
|
17826
17671
|
|
|
17827
17672
|
/**
|
|
17828
17673
|
* Gets the keys for an object.
|
|
@@ -18458,7 +18303,8 @@ https.request = function (params, cb) {
|
|
|
18458
18303
|
return http.request.call(this, params, cb);
|
|
18459
18304
|
}
|
|
18460
18305
|
|
|
18461
|
-
},{"http":
|
|
18306
|
+
},{"http":125}],72:[function(require,module,exports){
|
|
18307
|
+
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
18462
18308
|
exports.read = function (buffer, offset, isLE, mLen, nBytes) {
|
|
18463
18309
|
var e, m
|
|
18464
18310
|
var eLen = (nBytes * 8) - mLen - 1
|
|
@@ -18559,58 +18405,39 @@ module.exports = function(arr, obj){
|
|
|
18559
18405
|
if (typeof Object.create === 'function') {
|
|
18560
18406
|
// implementation from standard node.js 'util' module
|
|
18561
18407
|
module.exports = function inherits(ctor, superCtor) {
|
|
18562
|
-
|
|
18563
|
-
|
|
18564
|
-
|
|
18565
|
-
|
|
18566
|
-
|
|
18567
|
-
|
|
18568
|
-
|
|
18569
|
-
|
|
18570
|
-
|
|
18408
|
+
if (superCtor) {
|
|
18409
|
+
ctor.super_ = superCtor
|
|
18410
|
+
ctor.prototype = Object.create(superCtor.prototype, {
|
|
18411
|
+
constructor: {
|
|
18412
|
+
value: ctor,
|
|
18413
|
+
enumerable: false,
|
|
18414
|
+
writable: true,
|
|
18415
|
+
configurable: true
|
|
18416
|
+
}
|
|
18417
|
+
})
|
|
18418
|
+
}
|
|
18571
18419
|
};
|
|
18572
18420
|
} else {
|
|
18573
18421
|
// old school shim for old browsers
|
|
18574
18422
|
module.exports = function inherits(ctor, superCtor) {
|
|
18575
|
-
|
|
18576
|
-
|
|
18577
|
-
|
|
18578
|
-
|
|
18579
|
-
|
|
18423
|
+
if (superCtor) {
|
|
18424
|
+
ctor.super_ = superCtor
|
|
18425
|
+
var TempCtor = function () {}
|
|
18426
|
+
TempCtor.prototype = superCtor.prototype
|
|
18427
|
+
ctor.prototype = new TempCtor()
|
|
18428
|
+
ctor.prototype.constructor = ctor
|
|
18429
|
+
}
|
|
18580
18430
|
}
|
|
18581
18431
|
}
|
|
18582
18432
|
|
|
18583
18433
|
},{}],75:[function(require,module,exports){
|
|
18584
|
-
/*!
|
|
18585
|
-
* Determine if an object is a Buffer
|
|
18586
|
-
*
|
|
18587
|
-
* @author Feross Aboukhadijeh <https://feross.org>
|
|
18588
|
-
* @license MIT
|
|
18589
|
-
*/
|
|
18590
|
-
|
|
18591
|
-
// The _isBuffer check is for Safari 5-7 support, because it's missing
|
|
18592
|
-
// Object.prototype.constructor. Remove this eventually
|
|
18593
|
-
module.exports = function (obj) {
|
|
18594
|
-
return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer)
|
|
18595
|
-
}
|
|
18596
|
-
|
|
18597
|
-
function isBuffer (obj) {
|
|
18598
|
-
return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)
|
|
18599
|
-
}
|
|
18600
|
-
|
|
18601
|
-
// For Node v0.10 support. Remove this eventually.
|
|
18602
|
-
function isSlowBuffer (obj) {
|
|
18603
|
-
return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))
|
|
18604
|
-
}
|
|
18605
|
-
|
|
18606
|
-
},{}],76:[function(require,module,exports){
|
|
18607
18434
|
var toString = {}.toString;
|
|
18608
18435
|
|
|
18609
18436
|
module.exports = Array.isArray || function (arr) {
|
|
18610
18437
|
return toString.call(arr) == '[object Array]';
|
|
18611
18438
|
};
|
|
18612
18439
|
|
|
18613
|
-
},{}],
|
|
18440
|
+
},{}],76:[function(require,module,exports){
|
|
18614
18441
|
(function (global){
|
|
18615
18442
|
/*! JSON v3.3.2 | http://bestiejs.github.io/json3 | Copyright 2012-2014, Kit Cambridge | http://kit.mit-license.org */
|
|
18616
18443
|
;(function () {
|
|
@@ -19516,7 +19343,7 @@ module.exports = Array.isArray || function (arr) {
|
|
|
19516
19343
|
}).call(this);
|
|
19517
19344
|
|
|
19518
19345
|
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
19519
|
-
},{}],
|
|
19346
|
+
},{}],77:[function(require,module,exports){
|
|
19520
19347
|
'use strict';
|
|
19521
19348
|
|
|
19522
19349
|
var keysShim;
|
|
@@ -19550,6 +19377,8 @@ if (!Object.keys) {
|
|
|
19550
19377
|
$frames: true,
|
|
19551
19378
|
$innerHeight: true,
|
|
19552
19379
|
$innerWidth: true,
|
|
19380
|
+
$onmozfullscreenchange: true,
|
|
19381
|
+
$onmozfullscreenerror: true,
|
|
19553
19382
|
$outerHeight: true,
|
|
19554
19383
|
$outerWidth: true,
|
|
19555
19384
|
$pageXOffset: true,
|
|
@@ -19638,7 +19467,7 @@ if (!Object.keys) {
|
|
|
19638
19467
|
}
|
|
19639
19468
|
module.exports = keysShim;
|
|
19640
19469
|
|
|
19641
|
-
},{"./isArguments":
|
|
19470
|
+
},{"./isArguments":79}],78:[function(require,module,exports){
|
|
19642
19471
|
'use strict';
|
|
19643
19472
|
|
|
19644
19473
|
var slice = Array.prototype.slice;
|
|
@@ -19672,7 +19501,7 @@ keysShim.shim = function shimObjectKeys() {
|
|
|
19672
19501
|
|
|
19673
19502
|
module.exports = keysShim;
|
|
19674
19503
|
|
|
19675
|
-
},{"./implementation":
|
|
19504
|
+
},{"./implementation":77,"./isArguments":79}],79:[function(require,module,exports){
|
|
19676
19505
|
'use strict';
|
|
19677
19506
|
|
|
19678
19507
|
var toStr = Object.prototype.toString;
|
|
@@ -19691,7 +19520,7 @@ module.exports = function isArguments(value) {
|
|
|
19691
19520
|
return isArgs;
|
|
19692
19521
|
};
|
|
19693
19522
|
|
|
19694
|
-
},{}],
|
|
19523
|
+
},{}],80:[function(require,module,exports){
|
|
19695
19524
|
exports.endianness = function () { return 'LE' };
|
|
19696
19525
|
|
|
19697
19526
|
exports.hostname = function () {
|
|
@@ -19738,7 +19567,7 @@ exports.tmpdir = exports.tmpDir = function () {
|
|
|
19738
19567
|
|
|
19739
19568
|
exports.EOL = '\n';
|
|
19740
19569
|
|
|
19741
|
-
},{}],
|
|
19570
|
+
},{}],81:[function(require,module,exports){
|
|
19742
19571
|
(function (global){
|
|
19743
19572
|
/**
|
|
19744
19573
|
* JSON parse.
|
|
@@ -19773,7 +19602,7 @@ module.exports = function parsejson(data) {
|
|
|
19773
19602
|
}
|
|
19774
19603
|
};
|
|
19775
19604
|
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
19776
|
-
},{}],
|
|
19605
|
+
},{}],82:[function(require,module,exports){
|
|
19777
19606
|
/**
|
|
19778
19607
|
* Compiles a querystring
|
|
19779
19608
|
* Returns string representation of the object
|
|
@@ -19812,7 +19641,7 @@ exports.decode = function(qs){
|
|
|
19812
19641
|
return qry;
|
|
19813
19642
|
};
|
|
19814
19643
|
|
|
19815
|
-
},{}],
|
|
19644
|
+
},{}],83:[function(require,module,exports){
|
|
19816
19645
|
/**
|
|
19817
19646
|
* Parses an URI
|
|
19818
19647
|
*
|
|
@@ -19853,11 +19682,12 @@ module.exports = function parseuri(str) {
|
|
|
19853
19682
|
return uri;
|
|
19854
19683
|
};
|
|
19855
19684
|
|
|
19856
|
-
},{}],
|
|
19685
|
+
},{}],84:[function(require,module,exports){
|
|
19857
19686
|
(function (process){
|
|
19858
19687
|
'use strict';
|
|
19859
19688
|
|
|
19860
|
-
if (
|
|
19689
|
+
if (typeof process === 'undefined' ||
|
|
19690
|
+
!process.version ||
|
|
19861
19691
|
process.version.indexOf('v0.') === 0 ||
|
|
19862
19692
|
process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) {
|
|
19863
19693
|
module.exports = { nextTick: nextTick };
|
|
@@ -19901,7 +19731,7 @@ function nextTick(fn, arg1, arg2, arg3) {
|
|
|
19901
19731
|
|
|
19902
19732
|
|
|
19903
19733
|
}).call(this,require('_process'))
|
|
19904
|
-
},{"_process":
|
|
19734
|
+
},{"_process":85}],85:[function(require,module,exports){
|
|
19905
19735
|
// shim for using process in browser
|
|
19906
19736
|
var process = module.exports = {};
|
|
19907
19737
|
|
|
@@ -20087,11 +19917,11 @@ process.chdir = function (dir) {
|
|
|
20087
19917
|
};
|
|
20088
19918
|
process.umask = function() { return 0; };
|
|
20089
19919
|
|
|
20090
|
-
},{}],
|
|
19920
|
+
},{}],86:[function(require,module,exports){
|
|
20091
19921
|
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.PubNub=t():e.PubNub=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e){if(!navigator||!navigator.sendBeacon)return!1;navigator.sendBeacon(e)}Object.defineProperty(t,"__esModule",{value:!0});var u=n(1),c=r(u),l=n(40),h=r(l),f=n(41),p=r(f),d=n(42),y=(n(5),function(e){function t(e){i(this,t);var n=e.listenToBrowserNetworkEvents,r=void 0===n||n;e.db=p.default,e.sdkFamily="Web",e.networking=new h.default({del:d.del,get:d.get,post:d.post,sendBeacon:a});var o=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r&&(window.addEventListener("offline",function(){o.networkDownDetected()}),window.addEventListener("online",function(){o.networkUpDetected()})),o}return o(t,e),t}(c.default));t.default=y,e.exports=t.default},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(2),u=i(a),c=n(6),l=i(c),h=n(8),f=i(h),p=n(9),d=i(p),y=n(16),g=i(y),b=n(17),v=r(b),_=n(18),m=r(_),k=n(19),P=r(k),O=n(20),T=r(O),S=n(21),w=r(S),C=n(22),M=r(C),E=n(23),x=r(E),N=n(24),R=r(N),A=n(25),D=r(A),K=n(26),j=r(K),G=n(27),U=r(G),I=n(28),H=r(I),B=n(29),L=r(B),q=n(30),F=r(q),z=n(31),X=r(z),W=n(32),J=r(W),V=n(33),$=r(V),Q=n(34),Y=r(Q),Z=n(35),ee=r(Z),te=n(36),ne=r(te),re=n(37),ie=r(re),se=n(38),oe=r(se),ae=n(12),ue=r(ae),ce=n(39),le=r(ce),he=n(13),fe=i(he),pe=n(10),de=i(pe),ye=(n(5),n(3)),ge=i(ye),be=function(){function e(t){var n=this;s(this,e);var r=t.db,i=t.networking,o=this._config=new u.default({setup:t,db:r}),a=new l.default({config:o});i.init(o);var c={config:o,networking:i,crypto:a},h=g.default.bind(this,c,ue),p=g.default.bind(this,c,j),y=g.default.bind(this,c,H),b=g.default.bind(this,c,F),_=g.default.bind(this,c,le),k=this._listenerManager=new d.default,O=new f.default({timeEndpoint:h,leaveEndpoint:p,heartbeatEndpoint:y,setStateEndpoint:b,subscribeEndpoint:_,crypto:c.crypto,config:c.config,listenerManager:k});this.addListener=k.addListener.bind(k),this.removeListener=k.removeListener.bind(k),this.removeAllListeners=k.removeAllListeners.bind(k),this.channelGroups={listGroups:g.default.bind(this,c,T),listChannels:g.default.bind(this,c,w),addChannels:g.default.bind(this,c,v),removeChannels:g.default.bind(this,c,m),deleteGroup:g.default.bind(this,c,P)},this.push={addChannels:g.default.bind(this,c,M),removeChannels:g.default.bind(this,c,x),deleteDevice:g.default.bind(this,c,D),listChannels:g.default.bind(this,c,R)},this.hereNow=g.default.bind(this,c,X),this.whereNow=g.default.bind(this,c,U),this.getState=g.default.bind(this,c,L),this.setState=O.adaptStateChange.bind(O),this.grant=g.default.bind(this,c,$),this.audit=g.default.bind(this,c,J),this.publish=g.default.bind(this,c,Y),this.fire=function(e,t){return e.replicate=!1,e.storeInHistory=!1,n.publish(e,t)},this.history=g.default.bind(this,c,ee),this.deleteMessages=g.default.bind(this,c,ne),this.messageCounts=g.default.bind(this,c,ie),this.fetchMessages=g.default.bind(this,c,oe),this.time=h,this.subscribe=O.adaptSubscribeChange.bind(O),this.presence=O.adaptPresenceChange.bind(O),this.unsubscribe=O.adaptUnsubscribeChange.bind(O),this.disconnect=O.disconnect.bind(O),this.reconnect=O.reconnect.bind(O),this.destroy=function(e){O.unsubscribeAll(e),O.disconnect()},this.stop=this.destroy,this.unsubscribeAll=O.unsubscribeAll.bind(O),this.getSubscribedChannels=O.getSubscribedChannels.bind(O),this.getSubscribedChannelGroups=O.getSubscribedChannelGroups.bind(O),this.encrypt=a.encrypt.bind(a),this.decrypt=a.decrypt.bind(a),this.getAuthKey=c.config.getAuthKey.bind(c.config),this.setAuthKey=c.config.setAuthKey.bind(c.config),this.setCipherKey=c.config.setCipherKey.bind(c.config),this.getUUID=c.config.getUUID.bind(c.config),this.setUUID=c.config.setUUID.bind(c.config),this.getFilterExpression=c.config.getFilterExpression.bind(c.config),this.setFilterExpression=c.config.setFilterExpression.bind(c.config),this.setHeartbeatInterval=c.config.setHeartbeatInterval.bind(c.config),i.hasModule("proxy")&&(this.setProxy=function(e){c.config.setProxy(e),n.reconnect()})}return o(e,[{key:"getVersion",value:function(){return this._config.getVersion()}},{key:"networkDownDetected",value:function(){this._listenerManager.announceNetworkDown(),this._config.restore?this.disconnect():this.destroy(!0)}},{key:"networkUpDetected",value:function(){this._listenerManager.announceNetworkUp(),this.reconnect()}}],[{key:"generateUUID",value:function(){return ge.default.createUUID()}}]),e}();be.OPERATIONS=fe.default,be.CATEGORIES=de.default,t.default=be,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(3),o=function(e){return e&&e.__esModule?e:{default:e}}(s),a=(n(5),function(){function e(t){var n=t.setup,i=t.db;r(this,e),this._db=i,this.instanceId="pn-"+o.default.createUUID(),this.secretKey=n.secretKey||n.secret_key,this.subscribeKey=n.subscribeKey||n.subscribe_key,this.publishKey=n.publishKey||n.publish_key,this.sdkName=n.sdkName,this.sdkFamily=n.sdkFamily,this.partnerId=n.partnerId,this.setAuthKey(n.authKey),this.setCipherKey(n.cipherKey),this.setFilterExpression(n.filterExpression),this.origin=n.origin||"ps.pndsn.com",this.secure=n.ssl||!1,this.restore=n.restore||!1,this.proxy=n.proxy,this.keepAlive=n.keepAlive,this.keepAliveSettings=n.keepAliveSettings,this.autoNetworkDetection=n.autoNetworkDetection||!1,this.dedupeOnSubscribe=n.dedupeOnSubscribe||!1,this.maximumCacheSize=n.maximumCacheSize||100,this.customEncrypt=n.customEncrypt,this.customDecrypt=n.customDecrypt,"undefined"!=typeof location&&"https:"===location.protocol&&(this.secure=!0),this.logVerbosity=n.logVerbosity||!1,this.suppressLeaveEvents=n.suppressLeaveEvents||!1,this.announceFailedHeartbeats=n.announceFailedHeartbeats||!0,this.announceSuccessfulHeartbeats=n.announceSuccessfulHeartbeats||!1,this.useInstanceId=n.useInstanceId||!1,this.useRequestId=n.useRequestId||!1,this.requestMessageCountThreshold=n.requestMessageCountThreshold,this.setTransactionTimeout(n.transactionalRequestTimeout||15e3),this.setSubscribeTimeout(n.subscribeRequestTimeout||31e4),this.setSendBeaconConfig(n.useSendBeacon||!0),this.setPresenceTimeout(n.presenceTimeout||300),null!=n.heartbeatInterval&&this.setHeartbeatInterval(n.heartbeatInterval),this.setUUID(this._decideUUID(n.uuid))}return i(e,[{key:"getAuthKey",value:function(){return this.authKey}},{key:"setAuthKey",value:function(e){return this.authKey=e,this}},{key:"setCipherKey",value:function(e){return this.cipherKey=e,this}},{key:"getUUID",value:function(){return this.UUID}},{key:"setUUID",value:function(e){return this._db&&this._db.set&&this._db.set(this.subscribeKey+"uuid",e),this.UUID=e,this}},{key:"getFilterExpression",value:function(){return this.filterExpression}},{key:"setFilterExpression",value:function(e){return this.filterExpression=e,this}},{key:"getPresenceTimeout",value:function(){return this._presenceTimeout}},{key:"setPresenceTimeout",value:function(e){return this._presenceTimeout=e,this.setHeartbeatInterval(this._presenceTimeout/2-1),this}},{key:"setProxy",value:function(e){this.proxy=e}},{key:"getHeartbeatInterval",value:function(){return this._heartbeatInterval}},{key:"setHeartbeatInterval",value:function(e){return this._heartbeatInterval=e,this}},{key:"getSubscribeTimeout",value:function(){return this._subscribeRequestTimeout}},{key:"setSubscribeTimeout",value:function(e){return this._subscribeRequestTimeout=e,this}},{key:"getTransactionTimeout",value:function(){return this._transactionalRequestTimeout}},{key:"setTransactionTimeout",value:function(e){return this._transactionalRequestTimeout=e,this}},{key:"isSendBeaconEnabled",value:function(){return this._useSendBeacon}},{key:"setSendBeaconConfig",value:function(e){return this._useSendBeacon=e,this}},{key:"getVersion",value:function(){return"4.24.2"}},{key:"_decideUUID",value:function(e){return e||(this._db&&this._db.get&&this._db.get(this.subscribeKey+"uuid")?this._db.get(this.subscribeKey+"uuid"):"pn-"+o.default.createUUID())}}]),e}());t.default=a,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4),i=function(e){return e&&e.__esModule?e:{default:e}}(r);t.default={createUUID:function(){return i.default.uuid?i.default.uuid():(0,i.default)()}},e.exports=t.default},function(e,t,n){var r,i,s;!function(n,o){i=[t],r=o,void 0!==(s="function"==typeof r?r.apply(t,i):r)&&(e.exports=s)}(0,function(e){function t(){var e,t,n="";for(e=0;e<32;e++)t=16*Math.random()|0,8!==e&&12!==e&&16!==e&&20!==e||(n+="-"),n+=(12===e?4:16===e?3&t|8:t).toString(16);return n}function n(e,t){var n=r[t||"all"];return n&&n.test(e)||!1}var r={3:/^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,4:/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,5:/^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,all:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i};t.isUUID=n,t.VERSION="0.1.0",e.uuid=t,e.isUUID=n})},function(e,t){"use strict";e.exports={}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(2),a=(r(o),n(7)),u=r(a),c=function(){function e(t){var n=t.config;i(this,e),this._config=n,this._iv="0123456789012345",this._allowedKeyEncodings=["hex","utf8","base64","binary"],this._allowedKeyLengths=[128,256],this._allowedModes=["ecb","cbc"],this._defaultOptions={encryptKey:!0,keyEncoding:"utf8",keyLength:256,mode:"cbc"}}return s(e,[{key:"HMACSHA256",value:function(e){return u.default.HmacSHA256(e,this._config.secretKey).toString(u.default.enc.Base64)}},{key:"SHA256",value:function(e){return u.default.SHA256(e).toString(u.default.enc.Hex)}},{key:"_parseOptions",value:function(e){var t=e||{};return t.hasOwnProperty("encryptKey")||(t.encryptKey=this._defaultOptions.encryptKey),t.hasOwnProperty("keyEncoding")||(t.keyEncoding=this._defaultOptions.keyEncoding),t.hasOwnProperty("keyLength")||(t.keyLength=this._defaultOptions.keyLength),t.hasOwnProperty("mode")||(t.mode=this._defaultOptions.mode),-1===this._allowedKeyEncodings.indexOf(t.keyEncoding.toLowerCase())&&(t.keyEncoding=this._defaultOptions.keyEncoding),-1===this._allowedKeyLengths.indexOf(parseInt(t.keyLength,10))&&(t.keyLength=this._defaultOptions.keyLength),-1===this._allowedModes.indexOf(t.mode.toLowerCase())&&(t.mode=this._defaultOptions.mode),t}},{key:"_decodeKey",value:function(e,t){return"base64"===t.keyEncoding?u.default.enc.Base64.parse(e):"hex"===t.keyEncoding?u.default.enc.Hex.parse(e):e}},{key:"_getPaddedKey",value:function(e,t){return e=this._decodeKey(e,t),t.encryptKey?u.default.enc.Utf8.parse(this.SHA256(e).slice(0,32)):e}},{key:"_getMode",value:function(e){return"ecb"===e.mode?u.default.mode.ECB:u.default.mode.CBC}},{key:"_getIV",value:function(e){return"cbc"===e.mode?u.default.enc.Utf8.parse(this._iv):null}},{key:"encrypt",value:function(e,t,n){return this._config.customEncrypt?this._config.customEncrypt(e):this.pnEncrypt(e,t,n)}},{key:"decrypt",value:function(e,t,n){return this._config.customDecrypt?this._config.customDecrypt(e):this.pnDecrypt(e,t,n)}},{key:"pnEncrypt",value:function(e,t,n){if(!t&&!this._config.cipherKey)return e;n=this._parseOptions(n);var r=this._getIV(n),i=this._getMode(n),s=this._getPaddedKey(t||this._config.cipherKey,n);return u.default.AES.encrypt(e,s,{iv:r,mode:i}).ciphertext.toString(u.default.enc.Base64)||e}},{key:"pnDecrypt",value:function(e,t,n){if(!t&&!this._config.cipherKey)return e;n=this._parseOptions(n);var r=this._getIV(n),i=this._getMode(n),s=this._getPaddedKey(t||this._config.cipherKey,n);try{var o=u.default.enc.Base64.parse(e),a=u.default.AES.decrypt({ciphertext:o},s,{iv:r,mode:i}).toString(u.default.enc.Utf8);return JSON.parse(a)}catch(e){return null}}}]),e}();t.default=c,e.exports=t.default},function(e,t){"use strict";var n=n||function(e,t){var n={},r=n.lib={},i=function(){},s=r.Base={extend:function(e){i.prototype=this;var t=new i;return e&&t.mixIn(e),t.hasOwnProperty("init")||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},o=r.WordArray=s.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=void 0!=t?t:4*e.length},toString:function(e){return(e||u).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes;if(e=e.sigBytes,this.clamp(),r%4)for(var i=0;i<e;i++)t[r+i>>>2]|=(n[i>>>2]>>>24-i%4*8&255)<<24-(r+i)%4*8;else if(65535<n.length)for(i=0;i<e;i+=4)t[r+i>>>2]=n[i>>>2];else t.push.apply(t,n);return this.sigBytes+=e,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=s.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n=[],r=0;r<t;r+=4)n.push(4294967296*e.random()|0);return new o.init(n,t)}}),a=n.enc={},u=a.Hex={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],r=0;r<e;r++){var i=t[r>>>2]>>>24-r%4*8&255;n.push((i>>>4).toString(16)),n.push((15&i).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new o.init(n,t/2)}},c=a.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],r=0;r<e;r++)n.push(String.fromCharCode(t[r>>>2]>>>24-r%4*8&255));return n.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new o.init(n,t)}},l=a.Utf8={stringify:function(e){try{return decodeURIComponent(escape(c.stringify(e)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(e){return c.parse(unescape(encodeURIComponent(e)))}},h=r.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=l.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,r=n.words,i=n.sigBytes,s=this.blockSize,a=i/(4*s),a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0);if(t=a*s,i=e.min(4*t,i),t){for(var u=0;u<t;u+=s)this._doProcessBlock(r,u);u=r.splice(0,t),n.sigBytes-=i}return new o.init(u,i)},clone:function(){var e=s.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});r.Hasher=h.extend({cfg:s.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){h.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new f.HMAC.init(e,n).finalize(t)}}});var f=n.algo={};return n}(Math);!function(e){for(var t=n,r=t.lib,i=r.WordArray,s=r.Hasher,r=t.algo,o=[],a=[],u=function(e){return 4294967296*(e-(0|e))|0},c=2,l=0;64>l;){var h;e:{h=c;for(var f=e.sqrt(h),p=2;p<=f;p++)if(!(h%p)){h=!1;break e}h=!0}h&&(8>l&&(o[l]=u(e.pow(c,.5))),a[l]=u(e.pow(c,1/3)),l++),c++}var d=[],r=r.SHA256=s.extend({_doReset:function(){this._hash=new i.init(o.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],s=n[2],o=n[3],u=n[4],c=n[5],l=n[6],h=n[7],f=0;64>f;f++){if(16>f)d[f]=0|e[t+f];else{var p=d[f-15],y=d[f-2];d[f]=((p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3)+d[f-7]+((y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10)+d[f-16]}p=h+((u<<26|u>>>6)^(u<<21|u>>>11)^(u<<7|u>>>25))+(u&c^~u&l)+a[f]+d[f],y=((r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22))+(r&i^r&s^i&s),h=l,l=c,c=u,u=o+p|0,o=s,s=i,i=r,r=p+y|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+s|0,n[3]=n[3]+o|0,n[4]=n[4]+u|0,n[5]=n[5]+c|0,n[6]=n[6]+l|0,n[7]=n[7]+h|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return n[i>>>5]|=128<<24-i%32,n[14+(i+64>>>9<<4)]=e.floor(r/4294967296),n[15+(i+64>>>9<<4)]=r,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=s.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=s._createHelper(r),t.HmacSHA256=s._createHmacHelper(r)}(Math),function(){var e=n,t=e.enc.Utf8;e.algo.HMAC=e.lib.Base.extend({init:function(e,n){e=this._hasher=new e.init,"string"==typeof n&&(n=t.parse(n));var r=e.blockSize,i=4*r;n.sigBytes>i&&(n=e.finalize(n)),n.clamp();for(var s=this._oKey=n.clone(),o=this._iKey=n.clone(),a=s.words,u=o.words,c=0;c<r;c++)a[c]^=1549556828,u[c]^=909522486;s.sigBytes=o.sigBytes=i,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher;return e=t.finalize(e),t.reset(),t.finalize(this._oKey.clone().concat(e))}})}(),function(){var e=n,t=e.lib.WordArray;e.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,r=this._map;e.clamp(),e=[];for(var i=0;i<n;i+=3)for(var s=(t[i>>>2]>>>24-i%4*8&255)<<16|(t[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|t[i+2>>>2]>>>24-(i+2)%4*8&255,o=0;4>o&&i+.75*o<n;o++)e.push(r.charAt(s>>>6*(3-o)&63));if(t=r.charAt(64))for(;e.length%4;)e.push(t);return e.join("")},parse:function(e){var n=e.length,r=this._map,i=r.charAt(64);i&&-1!=(i=e.indexOf(i))&&(n=i);for(var i=[],s=0,o=0;o<n;o++)if(o%4){var a=r.indexOf(e.charAt(o-1))<<o%4*2,u=r.indexOf(e.charAt(o))>>>6-o%4*2;i[s>>>2]|=(a|u)<<24-s%4*8,s++}return t.create(i,s)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(e){function t(e,t,n,r,i,s,o){return((e=e+(t&n|~t&r)+i+o)<<s|e>>>32-s)+t}function r(e,t,n,r,i,s,o){return((e=e+(t&r|n&~r)+i+o)<<s|e>>>32-s)+t}function i(e,t,n,r,i,s,o){return((e=e+(t^n^r)+i+o)<<s|e>>>32-s)+t}function s(e,t,n,r,i,s,o){return((e=e+(n^(t|~r))+i+o)<<s|e>>>32-s)+t}for(var o=n,a=o.lib,u=a.WordArray,c=a.Hasher,a=o.algo,l=[],h=0;64>h;h++)l[h]=4294967296*e.abs(e.sin(h+1))|0;a=a.MD5=c.extend({_doReset:function(){this._hash=new u.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,n){for(var o=0;16>o;o++){var a=n+o,u=e[a];e[a]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}var o=this._hash.words,a=e[n+0],u=e[n+1],c=e[n+2],h=e[n+3],f=e[n+4],p=e[n+5],d=e[n+6],y=e[n+7],g=e[n+8],b=e[n+9],v=e[n+10],_=e[n+11],m=e[n+12],k=e[n+13],P=e[n+14],O=e[n+15],T=o[0],S=o[1],w=o[2],C=o[3],T=t(T,S,w,C,a,7,l[0]),C=t(C,T,S,w,u,12,l[1]),w=t(w,C,T,S,c,17,l[2]),S=t(S,w,C,T,h,22,l[3]),T=t(T,S,w,C,f,7,l[4]),C=t(C,T,S,w,p,12,l[5]),w=t(w,C,T,S,d,17,l[6]),S=t(S,w,C,T,y,22,l[7]),T=t(T,S,w,C,g,7,l[8]),C=t(C,T,S,w,b,12,l[9]),w=t(w,C,T,S,v,17,l[10]),S=t(S,w,C,T,_,22,l[11]),T=t(T,S,w,C,m,7,l[12]),C=t(C,T,S,w,k,12,l[13]),w=t(w,C,T,S,P,17,l[14]),S=t(S,w,C,T,O,22,l[15]),T=r(T,S,w,C,u,5,l[16]),C=r(C,T,S,w,d,9,l[17]),w=r(w,C,T,S,_,14,l[18]),S=r(S,w,C,T,a,20,l[19]),T=r(T,S,w,C,p,5,l[20]),C=r(C,T,S,w,v,9,l[21]),w=r(w,C,T,S,O,14,l[22]),S=r(S,w,C,T,f,20,l[23]),T=r(T,S,w,C,b,5,l[24]),C=r(C,T,S,w,P,9,l[25]),w=r(w,C,T,S,h,14,l[26]),S=r(S,w,C,T,g,20,l[27]),T=r(T,S,w,C,k,5,l[28]),C=r(C,T,S,w,c,9,l[29]),w=r(w,C,T,S,y,14,l[30]),S=r(S,w,C,T,m,20,l[31]),T=i(T,S,w,C,p,4,l[32]),C=i(C,T,S,w,g,11,l[33]),w=i(w,C,T,S,_,16,l[34]),S=i(S,w,C,T,P,23,l[35]),T=i(T,S,w,C,u,4,l[36]),C=i(C,T,S,w,f,11,l[37]),w=i(w,C,T,S,y,16,l[38]),S=i(S,w,C,T,v,23,l[39]),T=i(T,S,w,C,k,4,l[40]),C=i(C,T,S,w,a,11,l[41]),w=i(w,C,T,S,h,16,l[42]),S=i(S,w,C,T,d,23,l[43]),T=i(T,S,w,C,b,4,l[44]),C=i(C,T,S,w,m,11,l[45]),w=i(w,C,T,S,O,16,l[46]),S=i(S,w,C,T,c,23,l[47]),T=s(T,S,w,C,a,6,l[48]),C=s(C,T,S,w,y,10,l[49]),w=s(w,C,T,S,P,15,l[50]),S=s(S,w,C,T,p,21,l[51]),T=s(T,S,w,C,m,6,l[52]),C=s(C,T,S,w,h,10,l[53]),w=s(w,C,T,S,v,15,l[54]),S=s(S,w,C,T,u,21,l[55]),T=s(T,S,w,C,g,6,l[56]),C=s(C,T,S,w,O,10,l[57]),w=s(w,C,T,S,d,15,l[58]),S=s(S,w,C,T,k,21,l[59]),T=s(T,S,w,C,f,6,l[60]),C=s(C,T,S,w,_,10,l[61]),w=s(w,C,T,S,c,15,l[62]),S=s(S,w,C,T,b,21,l[63]);o[0]=o[0]+T|0,o[1]=o[1]+S|0,o[2]=o[2]+w|0,o[3]=o[3]+C|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;n[i>>>5]|=128<<24-i%32;var s=e.floor(r/4294967296);for(n[15+(i+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),n[14+(i+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),t.sigBytes=4*(n.length+1),this._process(),t=this._hash,n=t.words,r=0;4>r;r++)i=n[r],n[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8);return t},clone:function(){var e=c.clone.call(this);return e._hash=this._hash.clone(),e}}),o.MD5=c._createHelper(a),o.HmacMD5=c._createHmacHelper(a)}(Math),function(){var e=n,t=e.lib,r=t.Base,i=t.WordArray,t=e.algo,s=t.EvpKDF=r.extend({cfg:r.extend({keySize:4,hasher:t.MD5,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=this.cfg,r=n.hasher.create(),s=i.create(),o=s.words,a=n.keySize,n=n.iterations;o.length<a;){u&&r.update(u);var u=r.update(e).finalize(t);r.reset();for(var c=1;c<n;c++)u=r.finalize(u),r.reset();s.concat(u)}return s.sigBytes=4*a,s}});e.EvpKDF=function(e,t,n){return s.create(n).compute(e,t)}}(),n.lib.Cipher||function(e){var t=n,r=t.lib,i=r.Base,s=r.WordArray,o=r.BufferedBlockAlgorithm,a=t.enc.Base64,u=t.algo.EvpKDF,c=r.Cipher=o.extend({cfg:i.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){o.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(e){return{encrypt:function(t,n,r){return("string"==typeof n?y:d).encrypt(e,t,n,r)},decrypt:function(t,n,r){return("string"==typeof n?y:d).decrypt(e,t,n,r)}}}});r.StreamCipher=c.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var l=t.mode={},h=function(e,t,n){var r=this._iv;r?this._iv=void 0:r=this._prevBlock;for(var i=0;i<n;i++)e[t+i]^=r[i]},f=(r.BlockCipherMode=i.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}})).extend();f.Encryptor=f.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize;h.call(this,e,t,r),n.encryptBlock(e,t),this._prevBlock=e.slice(t,t+r)}}),f.Decryptor=f.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize,i=e.slice(t,t+r);n.decryptBlock(e,t),h.call(this,e,t,r),this._prevBlock=i}}),l=l.CBC=f,f=(t.pad={}).Pkcs7={pad:function(e,t){for(var n=4*t,n=n-e.sigBytes%n,r=n<<24|n<<16|n<<8|n,i=[],o=0;o<n;o+=4)i.push(r);n=s.create(i,n),e.concat(n)},unpad:function(e){e.sigBytes-=255&e.words[e.sigBytes-1>>>2]}},r.BlockCipher=c.extend({cfg:c.cfg.extend({mode:l,padding:f}),reset:function(){c.reset.call(this);var e=this.cfg,t=e.iv,e=e.mode;if(this._xformMode==this._ENC_XFORM_MODE)var n=e.createEncryptor;else n=e.createDecryptor,this._minBufferSize=1;this._mode=n.call(e,this,t&&t.words)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){e.pad(this._data,this.blockSize);var t=this._process(!0)}else t=this._process(!0),e.unpad(t);return t},blockSize:4});var p=r.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),l=(t.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext;return e=e.salt,(e?s.create([1398893684,1701076831]).concat(e).concat(t):t).toString(a)},parse:function(e){e=a.parse(e);var t=e.words;if(1398893684==t[0]&&1701076831==t[1]){var n=s.create(t.slice(2,4));t.splice(0,4),e.sigBytes-=16}return p.create({ciphertext:e,salt:n})}},d=r.SerializableCipher=i.extend({cfg:i.extend({format:l}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var i=e.createEncryptor(n,r);return t=i.finalize(t),i=i.cfg,p.create({ciphertext:t,key:n,iv:i.iv,algorithm:e,mode:i.mode,padding:i.padding,blockSize:e.blockSize,formatter:r.format})},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),e.createDecryptor(n,r).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),t=(t.kdf={}).OpenSSL={execute:function(e,t,n,r){return r||(r=s.random(8)),e=u.create({keySize:t+n}).compute(e,r),n=s.create(e.words.slice(t),4*n),e.sigBytes=4*t,p.create({key:e,iv:n,salt:r})}},y=r.PasswordBasedCipher=d.extend({cfg:d.cfg.extend({kdf:t}),encrypt:function(e,t,n,r){return r=this.cfg.extend(r),n=r.kdf.execute(n,e.keySize,e.ivSize),r.iv=n.iv,e=d.encrypt.call(this,e,t,n.key,r),e.mixIn(n),e},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),n=r.kdf.execute(n,e.keySize,e.ivSize,t.salt),r.iv=n.iv,d.decrypt.call(this,e,t,n.key,r)}})}(),function(){for(var e=n,t=e.lib.BlockCipher,r=e.algo,i=[],s=[],o=[],a=[],u=[],c=[],l=[],h=[],f=[],p=[],d=[],y=0;256>y;y++)d[y]=128>y?y<<1:y<<1^283;for(var g=0,b=0,y=0;256>y;y++){var v=b^b<<1^b<<2^b<<3^b<<4,v=v>>>8^255&v^99;i[g]=v,s[v]=g;var _=d[g],m=d[_],k=d[m],P=257*d[v]^16843008*v;o[g]=P<<24|P>>>8,a[g]=P<<16|P>>>16,u[g]=P<<8|P>>>24,c[g]=P,P=16843009*k^65537*m^257*_^16843008*g,l[v]=P<<24|P>>>8,h[v]=P<<16|P>>>16,f[v]=P<<8|P>>>24,p[v]=P,g?(g=_^d[d[d[k^_]]],b^=d[d[b]]):g=b=1}var O=[0,1,2,4,8,16,32,64,128,27,54],r=r.AES=t.extend({_doReset:function(){for(var e=this._key,t=e.words,n=e.sigBytes/4,e=4*((this._nRounds=n+6)+1),r=this._keySchedule=[],s=0;s<e;s++)if(s<n)r[s]=t[s];else{var o=r[s-1];s%n?6<n&&4==s%n&&(o=i[o>>>24]<<24|i[o>>>16&255]<<16|i[o>>>8&255]<<8|i[255&o]):(o=o<<8|o>>>24,o=i[o>>>24]<<24|i[o>>>16&255]<<16|i[o>>>8&255]<<8|i[255&o],o^=O[s/n|0]<<24),r[s]=r[s-n]^o}for(t=this._invKeySchedule=[],n=0;n<e;n++)s=e-n,o=n%4?r[s]:r[s-4],t[n]=4>n||4>=s?o:l[i[o>>>24]]^h[i[o>>>16&255]]^f[i[o>>>8&255]]^p[i[255&o]]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,o,a,u,c,i)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,l,h,f,p,s),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,i,s,o,a){for(var u=this._nRounds,c=e[t]^n[0],l=e[t+1]^n[1],h=e[t+2]^n[2],f=e[t+3]^n[3],p=4,d=1;d<u;d++)var y=r[c>>>24]^i[l>>>16&255]^s[h>>>8&255]^o[255&f]^n[p++],g=r[l>>>24]^i[h>>>16&255]^s[f>>>8&255]^o[255&c]^n[p++],b=r[h>>>24]^i[f>>>16&255]^s[c>>>8&255]^o[255&l]^n[p++],f=r[f>>>24]^i[c>>>16&255]^s[l>>>8&255]^o[255&h]^n[p++],c=y,l=g,h=b;y=(a[c>>>24]<<24|a[l>>>16&255]<<16|a[h>>>8&255]<<8|a[255&f])^n[p++],g=(a[l>>>24]<<24|a[h>>>16&255]<<16|a[f>>>8&255]<<8|a[255&c])^n[p++],b=(a[h>>>24]<<24|a[f>>>16&255]<<16|a[c>>>8&255]<<8|a[255&l])^n[p++],f=(a[f>>>24]<<24|a[c>>>16&255]<<16|a[l>>>8&255]<<8|a[255&h])^n[p++],e[t]=y,e[t+1]=g,e[t+2]=b,e[t+3]=f},keySize:8});e.AES=t._createHelper(r)}(),n.mode.ECB=function(){var e=n.lib.BlockCipherMode.extend();return e.Encryptor=e.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),e.Decryptor=e.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),e}(),e.exports=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(6),a=(r(o),n(2)),u=(r(a),n(9)),c=(r(u),n(11)),l=r(c),h=n(14),f=r(h),p=n(15),d=r(p),y=(n(5),n(10)),g=r(y),b=function(){function e(t){var n=t.subscribeEndpoint,r=t.leaveEndpoint,s=t.heartbeatEndpoint,o=t.setStateEndpoint,a=t.timeEndpoint,u=t.config,c=t.crypto,h=t.listenerManager;i(this,e),this._listenerManager=h,this._config=u,this._leaveEndpoint=r,this._heartbeatEndpoint=s,this._setStateEndpoint=o,this._subscribeEndpoint=n,this._crypto=c,this._channels={},this._presenceChannels={},this._heartbeatChannels={},this._heartbeatChannelGroups={},this._channelGroups={},this._presenceChannelGroups={},this._pendingChannelSubscriptions=[],this._pendingChannelGroupSubscriptions=[],this._currentTimetoken=0,this._lastTimetoken=0,this._storedTimetoken=null,this._subscriptionStatusAnnounced=!1,this._isOnline=!0,this._reconnectionManager=new l.default({timeEndpoint:a}),this._dedupingManager=new f.default({config:u})}return s(e,[{key:"adaptStateChange",value:function(e,t){var n=this,r=e.state,i=e.channels,s=void 0===i?[]:i,o=e.channelGroups,a=void 0===o?[]:o;return s.forEach(function(e){e in n._channels&&(n._channels[e].state=r)}),a.forEach(function(e){e in n._channelGroups&&(n._channelGroups[e].state=r)}),this._setStateEndpoint({state:r,channels:s,channelGroups:a},t)}},{key:"adaptPresenceChange",value:function(e){var t=this,n=e.connected,r=e.channels,i=void 0===r?[]:r,s=e.channelGroups,o=void 0===s?[]:s;n?(i.forEach(function(e){t._heartbeatChannels[e]={state:{}}}),o.forEach(function(e){t._heartbeatChannelGroups[e]={state:{}}})):(i.forEach(function(e){e in t._heartbeatChannels&&delete t._heartbeatChannels[e]}),o.forEach(function(e){e in t._heartbeatChannelGroups&&delete t._heartbeatChannelGroups[e]}),!1===this._config.suppressLeaveEvents&&this._leaveEndpoint({channels:i,channelGroups:o},function(e){t._listenerManager.announceStatus(e)})),this.reconnect()}},{key:"adaptSubscribeChange",value:function(e){var t=this,n=e.timetoken,r=e.channels,i=void 0===r?[]:r,s=e.channelGroups,o=void 0===s?[]:s,a=e.withPresence,u=void 0!==a&&a,c=e.withHeartbeats,l=void 0!==c&&c;if(!this._config.subscribeKey||""===this._config.subscribeKey)return void(console&&console.log&&console.log("subscribe key missing; aborting subscribe"));n&&(this._lastTimetoken=this._currentTimetoken,
|
|
20092
19922
|
this._currentTimetoken=n),"0"!==this._currentTimetoken&&0!==this._currentTimetoken&&(this._storedTimetoken=this._currentTimetoken,this._currentTimetoken=0),i.forEach(function(e){t._channels[e]={state:{}},u&&(t._presenceChannels[e]={}),l&&(t._heartbeatChannels[e]={}),t._pendingChannelSubscriptions.push(e)}),o.forEach(function(e){t._channelGroups[e]={state:{}},u&&(t._presenceChannelGroups[e]={}),l&&(t._heartbeatChannelGroups[e]={}),t._pendingChannelGroupSubscriptions.push(e)}),this._subscriptionStatusAnnounced=!1,this.reconnect()}},{key:"adaptUnsubscribeChange",value:function(e,t){var n=this,r=e.channels,i=void 0===r?[]:r,s=e.channelGroups,o=void 0===s?[]:s,a=[],u=[];i.forEach(function(e){e in n._channels&&(delete n._channels[e],a.push(e),e in n._heartbeatChannels&&delete n._heartbeatChannels[e]),e in n._presenceChannels&&(delete n._presenceChannels[e],a.push(e))}),o.forEach(function(e){e in n._channelGroups&&(delete n._channelGroups[e],u.push(e),e in n._heartbeatChannelGroups&&delete n._heartbeatChannelGroups[e]),e in n._presenceChannelGroups&&(delete n._channelGroups[e],u.push(e))}),0===a.length&&0===u.length||(!1!==this._config.suppressLeaveEvents||t||this._leaveEndpoint({channels:a,channelGroups:u},function(e){e.affectedChannels=a,e.affectedChannelGroups=u,e.currentTimetoken=n._currentTimetoken,e.lastTimetoken=n._lastTimetoken,n._listenerManager.announceStatus(e)}),0===Object.keys(this._channels).length&&0===Object.keys(this._presenceChannels).length&&0===Object.keys(this._channelGroups).length&&0===Object.keys(this._presenceChannelGroups).length&&(this._lastTimetoken=0,this._currentTimetoken=0,this._storedTimetoken=null,this._region=null,this._reconnectionManager.stopPolling()),this.reconnect())}},{key:"unsubscribeAll",value:function(e){this.adaptUnsubscribeChange({channels:this.getSubscribedChannels(),channelGroups:this.getSubscribedChannelGroups()},e)}},{key:"getHeartbeatChannels",value:function(){return Object.keys(this._heartbeatChannels)}},{key:"getHeartbeatChannelGroups",value:function(){return Object.keys(this._heartbeatChannelGroups)}},{key:"getSubscribedChannels",value:function(){return Object.keys(this._channels)}},{key:"getSubscribedChannelGroups",value:function(){return Object.keys(this._channelGroups)}},{key:"reconnect",value:function(){this._startSubscribeLoop(),this._registerHeartbeatTimer()}},{key:"disconnect",value:function(){this._stopSubscribeLoop(),this._stopHeartbeatTimer(),this._reconnectionManager.stopPolling()}},{key:"_registerHeartbeatTimer",value:function(){this._stopHeartbeatTimer(),0!==this._config.getHeartbeatInterval()&&(this._performHeartbeatLoop(),this._heartbeatTimer=setInterval(this._performHeartbeatLoop.bind(this),1e3*this._config.getHeartbeatInterval()))}},{key:"_stopHeartbeatTimer",value:function(){this._heartbeatTimer&&(clearInterval(this._heartbeatTimer),this._heartbeatTimer=null)}},{key:"_performHeartbeatLoop",value:function(){var e=this,t=this.getHeartbeatChannels(),n=this.getHeartbeatChannelGroups(),r={};if(0!==t.length||0!==n.length){this.getSubscribedChannels().forEach(function(t){var n=e._channels[t].state;Object.keys(n).length&&(r[t]=n)}),this.getSubscribedChannelGroups().forEach(function(t){var n=e._channelGroups[t].state;Object.keys(n).length&&(r[t]=n)});var i=function(t){t.error&&e._config.announceFailedHeartbeats&&e._listenerManager.announceStatus(t),t.error&&e._config.autoNetworkDetection&&e._isOnline&&(e._isOnline=!1,e.disconnect(),e._listenerManager.announceNetworkDown(),e.reconnect()),!t.error&&e._config.announceSuccessfulHeartbeats&&e._listenerManager.announceStatus(t)};this._heartbeatEndpoint({channels:t,channelGroups:n,state:r},i.bind(this))}}},{key:"_startSubscribeLoop",value:function(){var e=this;this._stopSubscribeLoop();var t={},n=[],r=[];if(Object.keys(this._channels).forEach(function(r){var i=e._channels[r].state;Object.keys(i).length&&(t[r]=i),n.push(r)}),Object.keys(this._presenceChannels).forEach(function(e){n.push(e+"-pnpres")}),Object.keys(this._channelGroups).forEach(function(n){var i=e._channelGroups[n].state;Object.keys(i).length&&(t[n]=i),r.push(n)}),Object.keys(this._presenceChannelGroups).forEach(function(e){r.push(e+"-pnpres")}),0!==n.length||0!==r.length){var i={channels:n,channelGroups:r,state:t,timetoken:this._currentTimetoken,filterExpression:this._config.filterExpression,region:this._region};this._subscribeCall=this._subscribeEndpoint(i,this._processSubscribeResponse.bind(this))}}},{key:"_processSubscribeResponse",value:function(e,t){var n=this;if(e.error)return void(e.category===g.default.PNTimeoutCategory?this._startSubscribeLoop():e.category===g.default.PNNetworkIssuesCategory?(this.disconnect(),e.error&&this._config.autoNetworkDetection&&this._isOnline&&(this._isOnline=!1,this._listenerManager.announceNetworkDown()),this._reconnectionManager.onReconnection(function(){n._config.autoNetworkDetection&&!n._isOnline&&(n._isOnline=!0,n._listenerManager.announceNetworkUp()),n.reconnect(),n._subscriptionStatusAnnounced=!0;var t={category:g.default.PNReconnectedCategory,operation:e.operation,lastTimetoken:n._lastTimetoken,currentTimetoken:n._currentTimetoken};n._listenerManager.announceStatus(t)}),this._reconnectionManager.startPolling(),this._listenerManager.announceStatus(e)):e.category===g.default.PNBadRequestCategory?(this._stopHeartbeatTimer(),this._listenerManager.announceStatus(e)):this._listenerManager.announceStatus(e));if(this._storedTimetoken?(this._currentTimetoken=this._storedTimetoken,this._storedTimetoken=null):(this._lastTimetoken=this._currentTimetoken,this._currentTimetoken=t.metadata.timetoken),!this._subscriptionStatusAnnounced){var r={};r.category=g.default.PNConnectedCategory,r.operation=e.operation,r.affectedChannels=this._pendingChannelSubscriptions,r.subscribedChannels=this.getSubscribedChannels(),r.affectedChannelGroups=this._pendingChannelGroupSubscriptions,r.lastTimetoken=this._lastTimetoken,r.currentTimetoken=this._currentTimetoken,this._subscriptionStatusAnnounced=!0,this._listenerManager.announceStatus(r),this._pendingChannelSubscriptions=[],this._pendingChannelGroupSubscriptions=[]}var i=t.messages||[],s=this._config,o=s.requestMessageCountThreshold,a=s.dedupeOnSubscribe;if(o&&i.length>=o){var u={};u.category=g.default.PNRequestMessageCountExceededCategory,u.operation=e.operation,this._listenerManager.announceStatus(u)}i.forEach(function(e){var t=e.channel,r=e.subscriptionMatch,i=e.publishMetaData;if(t===r&&(r=null),a){if(n._dedupingManager.isDuplicate(e))return;n._dedupingManager.addEntry(e)}if(d.default.endsWith(e.channel,"-pnpres")){var s={};s.channel=null,s.subscription=null,s.actualChannel=null!=r?t:null,s.subscribedChannel=null!=r?r:t,t&&(s.channel=t.substring(0,t.lastIndexOf("-pnpres"))),r&&(s.subscription=r.substring(0,r.lastIndexOf("-pnpres"))),s.action=e.payload.action,s.state=e.payload.data,s.timetoken=i.publishTimetoken,s.occupancy=e.payload.occupancy,s.uuid=e.payload.uuid,s.timestamp=e.payload.timestamp,e.payload.join&&(s.join=e.payload.join),e.payload.leave&&(s.leave=e.payload.leave),e.payload.timeout&&(s.timeout=e.payload.timeout),n._listenerManager.announcePresence(s)}else{var o={};o.channel=null,o.subscription=null,o.actualChannel=null!=r?t:null,o.subscribedChannel=null!=r?r:t,o.channel=t,o.subscription=r,o.timetoken=i.publishTimetoken,o.publisher=e.issuingClientId,e.userMetadata&&(o.userMetadata=e.userMetadata),n._config.cipherKey?o.message=n._crypto.decrypt(e.payload):o.message=e.payload,n._listenerManager.announceMessage(o)}}),this._region=t.metadata.region,this._startSubscribeLoop()}},{key:"_stopSubscribeLoop",value:function(){this._subscribeCall&&("function"==typeof this._subscribeCall.abort&&this._subscribeCall.abort(),this._subscribeCall=null)}}]),e}();t.default=b,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=(n(5),n(10)),o=function(e){return e&&e.__esModule?e:{default:e}}(s),a=function(){function e(){r(this,e),this._listeners=[]}return i(e,[{key:"addListener",value:function(e){this._listeners.push(e)}},{key:"removeListener",value:function(e){var t=[];this._listeners.forEach(function(n){n!==e&&t.push(n)}),this._listeners=t}},{key:"removeAllListeners",value:function(){this._listeners=[]}},{key:"announcePresence",value:function(e){this._listeners.forEach(function(t){t.presence&&t.presence(e)})}},{key:"announceStatus",value:function(e){this._listeners.forEach(function(t){t.status&&t.status(e)})}},{key:"announceMessage",value:function(e){this._listeners.forEach(function(t){t.message&&t.message(e)})}},{key:"announceNetworkUp",value:function(){var e={};e.category=o.default.PNNetworkUpCategory,this.announceStatus(e)}},{key:"announceNetworkDown",value:function(){var e={};e.category=o.default.PNNetworkDownCategory,this.announceStatus(e)}}]),e}();t.default=a,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={PNNetworkUpCategory:"PNNetworkUpCategory",PNNetworkDownCategory:"PNNetworkDownCategory",PNNetworkIssuesCategory:"PNNetworkIssuesCategory",PNTimeoutCategory:"PNTimeoutCategory",PNBadRequestCategory:"PNBadRequestCategory",PNAccessDeniedCategory:"PNAccessDeniedCategory",PNUnknownCategory:"PNUnknownCategory",PNReconnectedCategory:"PNReconnectedCategory",PNConnectedCategory:"PNConnectedCategory",PNRequestMessageCountExceededCategory:"PNRequestMessageCountExceededCategory"},e.exports=t.default},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(12),o=(function(e){e&&e.__esModule}(s),n(5),function(){function e(t){var n=t.timeEndpoint;r(this,e),this._timeEndpoint=n}return i(e,[{key:"onReconnection",value:function(e){this._reconnectionCallback=e}},{key:"startPolling",value:function(){this._timeTimer=setInterval(this._performTimeLoop.bind(this),3e3)}},{key:"stopPolling",value:function(){clearInterval(this._timeTimer)}},{key:"_performTimeLoop",value:function(){var e=this;this._timeEndpoint(function(t){t.error||(clearInterval(e._timeTimer),e._reconnectionCallback())})}}]),e}());t.default=o,e.exports=t.default},function(e,t,n){"use strict";function r(){return h.default.PNTimeOperation}function i(){return"/time/0"}function s(e){return e.config.getTransactionTimeout()}function o(){return{}}function a(){return!1}function u(e,t){return{timetoken:t[0]}}function c(){}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=r,t.getURL=i,t.getRequestTimeout=s,t.prepareParams=o,t.isAuthSupported=a,t.handleResponse=u,t.validateParams=c;var l=(n(5),n(13)),h=function(e){return e&&e.__esModule?e:{default:e}}(l)},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={PNTimeOperation:"PNTimeOperation",PNHistoryOperation:"PNHistoryOperation",PNDeleteMessagesOperation:"PNDeleteMessagesOperation",PNFetchMessagesOperation:"PNFetchMessagesOperation",PNMessageCounts:"PNMessageCountsOperation",PNSubscribeOperation:"PNSubscribeOperation",PNUnsubscribeOperation:"PNUnsubscribeOperation",PNPublishOperation:"PNPublishOperation",PNPushNotificationEnabledChannelsOperation:"PNPushNotificationEnabledChannelsOperation",PNRemoveAllPushNotificationsOperation:"PNRemoveAllPushNotificationsOperation",PNWhereNowOperation:"PNWhereNowOperation",PNSetStateOperation:"PNSetStateOperation",PNHereNowOperation:"PNHereNowOperation",PNGetStateOperation:"PNGetStateOperation",PNHeartbeatOperation:"PNHeartbeatOperation",PNChannelGroupsOperation:"PNChannelGroupsOperation",PNRemoveGroupOperation:"PNRemoveGroupOperation",PNChannelsForGroupOperation:"PNChannelsForGroupOperation",PNAddChannelsToGroupOperation:"PNAddChannelsToGroupOperation",PNRemoveChannelsFromGroupOperation:"PNRemoveChannelsFromGroupOperation",PNAccessManagerGrant:"PNAccessManagerGrant",PNAccessManagerAudit:"PNAccessManagerAudit"},e.exports=t.default},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(2),o=(function(e){e&&e.__esModule}(s),n(5),function(e){var t=0;if(0===e.length)return t;for(var n=0;n<e.length;n+=1){t=(t<<5)-t+e.charCodeAt(n),t&=t}return t}),a=function(){function e(t){var n=t.config;r(this,e),this.hashHistory=[],this._config=n}return i(e,[{key:"getKey",value:function(e){var t=o(JSON.stringify(e.payload)).toString();return e.publishMetaData.publishTimetoken+"-"+t}},{key:"isDuplicate",value:function(e){return this.hashHistory.includes(this.getKey(e))}},{key:"addEntry",value:function(e){this.hashHistory.length>=this._config.maximumCacheSize&&this.hashHistory.shift(),this.hashHistory.push(this.getKey(e))}},{key:"clearHistory",value:function(){this.hashHistory=[]}}]),e}();t.default=a,e.exports=t.default},function(e,t){"use strict";function n(e){var t=[];return Object.keys(e).forEach(function(e){return t.push(e)}),t}function r(e){return encodeURIComponent(e).replace(/[!~*'()]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function i(e){return n(e).sort()}function s(e){return i(e).map(function(t){return t+"="+r(e[t])}).join("&")}function o(e,t){return-1!==e.indexOf(t,this.length-t.length)}function a(){var e=void 0,t=void 0;return{promise:new Promise(function(n,r){e=n,t=r}),reject:t,fulfill:e}}e.exports={signPamFromParams:s,endsWith:o,createPromise:a,encodeString:r}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e,t){return e.type=t,e.error=!0,e}function u(e){return a({message:e},"validationError")}function c(e,t,n){return e.usePost&&e.usePost(t,n)?e.postURL(t,n):e.getURL(t,n)}function l(e){if(e.sdkName)return e.sdkName;var t="PubNub-JS-"+e.sdkFamily;return e.partnerId&&(t+="-"+e.partnerId),t+="/"+e.getVersion()}function h(e,t,n){var r=e.config,i=e.crypto;n.timestamp=Math.floor((new Date).getTime()/1e3);var s=r.subscribeKey+"\n"+r.publishKey+"\n"+t+"\n";s+=y.default.signPamFromParams(n);var o=i.HMACSHA256(s);o=o.replace(/\+/g,"-"),o=o.replace(/\//g,"_"),n.signature=o}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=e.networking,r=e.config,i=null,s=null,o={};t.getOperation()===v.default.PNTimeOperation||t.getOperation()===v.default.PNChannelGroupsOperation?i=arguments.length<=2?void 0:arguments[2]:(o=arguments.length<=2?void 0:arguments[2],i=arguments.length<=3?void 0:arguments[3]),"undefined"==typeof Promise||i||(s=y.default.createPromise());var a=t.validateParams(e,o);if(!a){var f=t.prepareParams(e,o),d=c(t,e,o),g=void 0,b={url:d,operation:t.getOperation(),timeout:t.getRequestTimeout(e)};f.uuid=r.UUID,f.pnsdk=l(r),r.useInstanceId&&(f.instanceid=r.instanceId),r.useRequestId&&(f.requestid=p.default.createUUID()),t.isAuthSupported()&&r.getAuthKey()&&(f.auth=r.getAuthKey()),r.secretKey&&h(e,d,f);var m=function(n,r){if(n.error)return void(i?i(n):s&&s.reject(new _("PubNub call failed, check status for details",n)));var a=t.handleResponse(e,r,o);i?i(n,a):s&&s.fulfill(a)};if(t.usePost&&t.usePost(e,o)){var k=t.postPayload(e,o);g=n.POST(f,k,b,m)}else g=t.useDelete&&t.useDelete()?n.DELETE(f,b,m):n.GET(f,b,m);return t.getOperation()===v.default.PNSubscribeOperation?g:s?s.promise:void 0}return i?i(u(a)):s?(s.reject(new _("Validation failed, check status for details",u(a))),s.promise):void 0};var f=n(3),p=r(f),d=(n(5),n(15)),y=r(d),g=n(2),b=(r(g),n(13)),v=r(b),_=function(e){function t(e,n){i(this,t);var r=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.name=r.constructor.name,r.status=n,r.message=e,r}return o(t,e),t}(Error);e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return f.default.PNAddChannelsToGroupOperation}function s(e,t){var n=t.channels,r=t.channelGroup,i=e.config;return r?n&&0!==n.length?i.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channels":"Missing Channel Group"}function o(e,t){var n=t.channelGroup;return"/v1/channel-registration/sub-key/"+e.config.subscribeKey+"/channel-group/"+d.default.encodeString(n)}function a(e){return e.config.getTransactionTimeout()}function u(){return!0}function c(e,t){var n=t.channels;return{add:(void 0===n?[]:n).join(",")}}function l(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=s,t.getURL=o,t.getRequestTimeout=a,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var h=(n(5),n(13)),f=r(h),p=n(15),d=r(p)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return f.default.PNRemoveChannelsFromGroupOperation}function s(e,t){var n=t.channels,r=t.channelGroup,i=e.config;return r?n&&0!==n.length?i.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channels":"Missing Channel Group"}function o(e,t){var n=t.channelGroup;return"/v1/channel-registration/sub-key/"+e.config.subscribeKey+"/channel-group/"+d.default.encodeString(n)}function a(e){return e.config.getTransactionTimeout()}function u(){return!0}function c(e,t){var n=t.channels;return{remove:(void 0===n?[]:n).join(",")}}function l(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=s,t.getURL=o,t.getRequestTimeout=a,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var h=(n(5),n(13)),f=r(h),p=n(15),d=r(p)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return f.default.PNRemoveGroupOperation}function s(e,t){var n=t.channelGroup,r=e.config;return n?r.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channel Group"}function o(e,t){var n=t.channelGroup;return"/v1/channel-registration/sub-key/"+e.config.subscribeKey+"/channel-group/"+d.default.encodeString(n)+"/remove"}function a(){return!0}function u(e){return e.config.getTransactionTimeout()}function c(){return{}}function l(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=s,t.getURL=o,t.isAuthSupported=a,t.getRequestTimeout=u,t.prepareParams=c,t.handleResponse=l;var h=(n(5),n(13)),f=r(h),p=n(15),d=r(p)},function(e,t,n){"use strict";function r(){return h.default.PNChannelGroupsOperation}function i(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"}function s(e){return"/v1/channel-registration/sub-key/"+e.config.subscribeKey+"/channel-group"}function o(e){return e.config.getTransactionTimeout()}function a(){return!0}function u(){return{}}function c(e,t){return{groups:t.payload.groups}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=r,t.validateParams=i,t.getURL=s,t.getRequestTimeout=o,t.isAuthSupported=a,t.prepareParams=u,t.handleResponse=c;var l=(n(5),n(13)),h=function(e){return e&&e.__esModule?e:{default:e}}(l)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return f.default.PNChannelsForGroupOperation}function s(e,t){var n=t.channelGroup,r=e.config;return n?r.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channel Group"}function o(e,t){var n=t.channelGroup;return"/v1/channel-registration/sub-key/"+e.config.subscribeKey+"/channel-group/"+d.default.encodeString(n)}function a(e){return e.config.getTransactionTimeout()}function u(){return!0}function c(){return{}}function l(e,t){return{channels:t.payload.channels}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=s,t.getURL=o,t.getRequestTimeout=a,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var h=(n(5),n(13)),f=r(h),p=n(15),d=r(p)},function(e,t,n){"use strict";function r(){return h.default.PNPushNotificationEnabledChannelsOperation}function i(e,t){var n=t.device,r=t.pushGateway,i=t.channels,s=e.config;return n?r?i&&0!==i.length?s.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channels":"Missing GW Type (pushGateway: gcm or apns)":"Missing Device ID (device)"}function s(e,t){var n=t.device;return"/v1/push/sub-key/"+e.config.subscribeKey+"/devices/"+n}function o(e){return e.config.getTransactionTimeout()}function a(){return!0}function u(e,t){var n=t.pushGateway,r=t.channels;return{type:n,add:(void 0===r?[]:r).join(",")}}function c(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=r,t.validateParams=i,t.getURL=s,t.getRequestTimeout=o,t.isAuthSupported=a,t.prepareParams=u,t.handleResponse=c;var l=(n(5),n(13)),h=function(e){return e&&e.__esModule?e:{default:e}}(l)},function(e,t,n){"use strict";function r(){return h.default.PNPushNotificationEnabledChannelsOperation}function i(e,t){var n=t.device,r=t.pushGateway,i=t.channels,s=e.config;return n?r?i&&0!==i.length?s.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channels":"Missing GW Type (pushGateway: gcm or apns)":"Missing Device ID (device)"}function s(e,t){var n=t.device;return"/v1/push/sub-key/"+e.config.subscribeKey+"/devices/"+n}function o(e){return e.config.getTransactionTimeout()}function a(){return!0}function u(e,t){var n=t.pushGateway,r=t.channels;return{type:n,remove:(void 0===r?[]:r).join(",")}}function c(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=r,t.validateParams=i,t.getURL=s,t.getRequestTimeout=o,t.isAuthSupported=a,t.prepareParams=u,t.handleResponse=c;var l=(n(5),n(13)),h=function(e){return e&&e.__esModule?e:{default:e}}(l)},function(e,t,n){"use strict";function r(){return h.default.PNPushNotificationEnabledChannelsOperation}function i(e,t){var n=t.device,r=t.pushGateway,i=e.config;return n?r?i.subscribeKey?void 0:"Missing Subscribe Key":"Missing GW Type (pushGateway: gcm or apns)":"Missing Device ID (device)"}function s(e,t){var n=t.device;return"/v1/push/sub-key/"+e.config.subscribeKey+"/devices/"+n}function o(e){return e.config.getTransactionTimeout()}function a(){return!0}function u(e,t){return{type:t.pushGateway}}function c(e,t){return{channels:t}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=r,t.validateParams=i,t.getURL=s,t.getRequestTimeout=o,t.isAuthSupported=a,t.prepareParams=u,t.handleResponse=c;var l=(n(5),n(13)),h=function(e){return e&&e.__esModule?e:{default:e}}(l)},function(e,t,n){"use strict";function r(){return h.default.PNRemoveAllPushNotificationsOperation}function i(e,t){var n=t.device,r=t.pushGateway,i=e.config;return n?r?i.subscribeKey?void 0:"Missing Subscribe Key":"Missing GW Type (pushGateway: gcm or apns)":"Missing Device ID (device)"}function s(e,t){var n=t.device;return"/v1/push/sub-key/"+e.config.subscribeKey+"/devices/"+n+"/remove"}function o(e){return e.config.getTransactionTimeout()}function a(){return!0}function u(e,t){return{type:t.pushGateway}}function c(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=r,t.validateParams=i,t.getURL=s,t.getRequestTimeout=o,t.isAuthSupported=a,t.prepareParams=u,t.handleResponse=c;var l=(n(5),n(13)),h=function(e){return e&&e.__esModule?e:{default:e}}(l)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return f.default.PNUnsubscribeOperation}function s(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"}function o(e,t){var n=e.config,r=t.channels,i=void 0===r?[]:r,s=i.length>0?i.join(","):",";return"/v2/presence/sub-key/"+n.subscribeKey+"/channel/"+d.default.encodeString(s)+"/leave"}function a(e){return e.config.getTransactionTimeout()}function u(){return!0}function c(e,t){var n=t.channelGroups,r=void 0===n?[]:n,i={};return r.length>0&&(i["channel-group"]=r.join(",")),i}function l(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=s,t.getURL=o,t.getRequestTimeout=a,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var h=(n(5),n(13)),f=r(h),p=n(15),d=r(p)},function(e,t,n){"use strict";function r(){return h.default.PNWhereNowOperation}function i(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"}function s(e,t){var n=e.config,r=t.uuid,i=void 0===r?n.UUID:r;return"/v2/presence/sub-key/"+n.subscribeKey+"/uuid/"+i}function o(e){return e.config.getTransactionTimeout()}function a(){return!0}function u(){return{}}function c(e,t){return t.payload?{channels:t.payload.channels}:{channels:[]}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=r,t.validateParams=i,t.getURL=s,t.getRequestTimeout=o,t.isAuthSupported=a,t.prepareParams=u,t.handleResponse=c;var l=(n(5),n(13)),h=function(e){return e&&e.__esModule?e:{default:e}}(l)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return f.default.PNHeartbeatOperation}function s(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"}function o(e,t){var n=e.config,r=t.channels,i=void 0===r?[]:r,s=i.length>0?i.join(","):",";return"/v2/presence/sub-key/"+n.subscribeKey+"/channel/"+d.default.encodeString(s)+"/heartbeat"}function a(){return!0}function u(e){return e.config.getTransactionTimeout()}function c(e,t){var n=t.channelGroups,r=void 0===n?[]:n,i=t.state,s=void 0===i?{}:i,o=e.config,a={};return r.length>0&&(a["channel-group"]=r.join(",")),a.state=JSON.stringify(s),a.heartbeat=o.getPresenceTimeout(),a}function l(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=s,t.getURL=o,t.isAuthSupported=a,t.getRequestTimeout=u,t.prepareParams=c,t.handleResponse=l;var h=(n(5),n(13)),f=r(h),p=n(15),d=r(p)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return f.default.PNGetStateOperation}function s(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"}function o(e,t){var n=e.config,r=t.uuid,i=void 0===r?n.UUID:r,s=t.channels,o=void 0===s?[]:s,a=o.length>0?o.join(","):",";return"/v2/presence/sub-key/"+n.subscribeKey+"/channel/"+d.default.encodeString(a)+"/uuid/"+i}function a(e){return e.config.getTransactionTimeout()}function u(){return!0}function c(e,t){var n=t.channelGroups,r=void 0===n?[]:n,i={};return r.length>0&&(i["channel-group"]=r.join(",")),i}function l(e,t,n){var r=n.channels,i=void 0===r?[]:r,s=n.channelGroups,o=void 0===s?[]:s,a={};return 1===i.length&&0===o.length?a[i[0]]=t.payload:a=t.payload,{channels:a}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=s,t.getURL=o,t.getRequestTimeout=a,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var h=(n(5),n(13)),f=r(h),p=n(15),d=r(p)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return f.default.PNSetStateOperation}function s(e,t){var n=e.config,r=t.state,i=t.channels,s=void 0===i?[]:i,o=t.channelGroups,a=void 0===o?[]:o;return r?n.subscribeKey?0===s.length&&0===a.length?"Please provide a list of channels and/or channel-groups":void 0:"Missing Subscribe Key":"Missing State"}function o(e,t){var n=e.config,r=t.channels,i=void 0===r?[]:r,s=i.length>0?i.join(","):",";return"/v2/presence/sub-key/"+n.subscribeKey+"/channel/"+d.default.encodeString(s)+"/uuid/"+n.UUID+"/data"}function a(e){return e.config.getTransactionTimeout()}function u(){return!0}function c(e,t){var n=t.state,r=t.channelGroups,i=void 0===r?[]:r,s={};return s.state=JSON.stringify(n),i.length>0&&(s["channel-group"]=i.join(",")),s}function l(e,t){return{state:t.payload}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=s,t.getURL=o,t.getRequestTimeout=a,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var h=(n(5),n(13)),f=r(h),p=n(15),d=r(p)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return f.default.PNHereNowOperation}function s(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"}function o(e,t){var n=e.config,r=t.channels,i=void 0===r?[]:r,s=t.channelGroups,o=void 0===s?[]:s,a="/v2/presence/sub-key/"+n.subscribeKey;if(i.length>0||o.length>0){var u=i.length>0?i.join(","):",";a+="/channel/"+d.default.encodeString(u)}return a}function a(e){return e.config.getTransactionTimeout()}function u(){return!0}function c(e,t){var n=t.channelGroups,r=void 0===n?[]:n,i=t.includeUUIDs,s=void 0===i||i,o=t.includeState,a=void 0!==o&&o,u={};return s||(u.disable_uuids=1),a&&(u.state=1),r.length>0&&(u["channel-group"]=r.join(",")),u}function l(e,t,n){var r=n.channels,i=void 0===r?[]:r,s=n.channelGroups,o=void 0===s?[]:s,a=n.includeUUIDs,u=void 0===a||a,c=n.includeState,l=void 0!==c&&c;return i.length>1||o.length>0||0===o.length&&0===i.length?function(){var e={};return e.totalChannels=t.payload.total_channels,e.totalOccupancy=t.payload.total_occupancy,e.channels={},Object.keys(t.payload.channels).forEach(function(n){var r=t.payload.channels[n],i=[];return e.channels[n]={occupants:i,name:n,occupancy:r.occupancy},u&&r.uuids.forEach(function(e){l?i.push({state:e.state,uuid:e.uuid}):i.push({state:null,uuid:e})}),e}),e}():function(){var e={},n=[];return e.totalChannels=1,e.totalOccupancy=t.occupancy,e.channels={},e.channels[i[0]]={occupants:n,name:i[0],occupancy:t.occupancy},u&&t.uuids&&t.uuids.forEach(function(e){l?n.push({state:e.state,uuid:e.uuid}):n.push({state:null,uuid:e})}),e}()}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=s,t.getURL=o,t.getRequestTimeout=a,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var h=(n(5),n(13)),f=r(h),p=n(15),d=r(p)},function(e,t,n){"use strict";function r(){return h.default.PNAccessManagerAudit}function i(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"}function s(e){return"/v2/auth/audit/sub-key/"+e.config.subscribeKey}function o(e){return e.config.getTransactionTimeout()}function a(){return!1}function u(e,t){var n=t.channel,r=t.channelGroup,i=t.authKeys,s=void 0===i?[]:i,o={};return n&&(o.channel=n),r&&(o["channel-group"]=r),s.length>0&&(o.auth=s.join(",")),o}function c(e,t){return t.payload}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=r,t.validateParams=i,t.getURL=s,t.getRequestTimeout=o,t.isAuthSupported=a,t.prepareParams=u,t.handleResponse=c;var l=(n(5),n(13)),h=function(e){return e&&e.__esModule?e:{default:e}}(l)},function(e,t,n){"use strict";function r(){return h.default.PNAccessManagerGrant}function i(e){var t=e.config;return t.subscribeKey?t.publishKey?t.secretKey?void 0:"Missing Secret Key":"Missing Publish Key":"Missing Subscribe Key"}function s(e){return"/v2/auth/grant/sub-key/"+e.config.subscribeKey}function o(e){return e.config.getTransactionTimeout()}function a(){return!1}function u(e,t){var n=t.channels,r=void 0===n?[]:n,i=t.channelGroups,s=void 0===i?[]:i,o=t.ttl,a=t.read,u=void 0!==a&&a,c=t.write,l=void 0!==c&&c,h=t.manage,f=void 0!==h&&h,p=t.authKeys,d=void 0===p?[]:p,y={};return y.r=u?"1":"0",y.w=l?"1":"0",y.m=f?"1":"0",r.length>0&&(y.channel=r.join(",")),s.length>0&&(y["channel-group"]=s.join(",")),
|
|
20093
19923
|
d.length>0&&(y.auth=d.join(",")),(o||0===o)&&(y.ttl=o),y}function c(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=r,t.validateParams=i,t.getURL=s,t.getRequestTimeout=o,t.isAuthSupported=a,t.prepareParams=u,t.handleResponse=c;var l=(n(5),n(13)),h=function(e){return e&&e.__esModule?e:{default:e}}(l)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var n=e.crypto,r=e.config,i=JSON.stringify(t);return r.cipherKey&&(i=n.encrypt(i),i=JSON.stringify(i)),i}function s(){return b.default.PNPublishOperation}function o(e,t){var n=e.config,r=t.message;return t.channel?r?n.subscribeKey?void 0:"Missing Subscribe Key":"Missing Message":"Missing Channel"}function a(e,t){var n=t.sendByPost;return void 0!==n&&n}function u(e,t){var n=e.config,r=t.channel,s=t.message,o=i(e,s);return"/publish/"+n.publishKey+"/"+n.subscribeKey+"/0/"+_.default.encodeString(r)+"/0/"+_.default.encodeString(o)}function c(e,t){var n=e.config,r=t.channel;return"/publish/"+n.publishKey+"/"+n.subscribeKey+"/0/"+_.default.encodeString(r)+"/0"}function l(e){return e.config.getTransactionTimeout()}function h(){return!0}function f(e,t){return i(e,t.message)}function p(e,t){var n=t.meta,r=t.replicate,i=void 0===r||r,s=t.storeInHistory,o=t.ttl,a={};return null!=s&&(a.store=s?"1":"0"),o&&(a.ttl=o),!1===i&&(a.norep="true"),n&&"object"===(void 0===n?"undefined":y(n))&&(a.meta=JSON.stringify(n)),a}function d(e,t){return{timetoken:t[2]}}Object.defineProperty(t,"__esModule",{value:!0});var y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.getOperation=s,t.validateParams=o,t.usePost=a,t.getURL=u,t.postURL=c,t.getRequestTimeout=l,t.isAuthSupported=h,t.postPayload=f,t.prepareParams=p,t.handleResponse=d;var g=(n(5),n(13)),b=r(g),v=n(15),_=r(v)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var n=e.config,r=e.crypto;if(!n.cipherKey)return t;try{return r.decrypt(t)}catch(e){return t}}function s(){return p.default.PNHistoryOperation}function o(e,t){var n=t.channel,r=e.config;return n?r.subscribeKey?void 0:"Missing Subscribe Key":"Missing channel"}function a(e,t){var n=t.channel;return"/v2/history/sub-key/"+e.config.subscribeKey+"/channel/"+y.default.encodeString(n)}function u(e){return e.config.getTransactionTimeout()}function c(){return!0}function l(e,t){var n=t.start,r=t.end,i=t.reverse,s=t.count,o=void 0===s?100:s,a=t.stringifiedTimeToken,u=void 0!==a&&a,c={include_token:"true"};return c.count=o,n&&(c.start=n),r&&(c.end=r),u&&(c.string_message_token="true"),null!=i&&(c.reverse=i.toString()),c}function h(e,t){var n={messages:[],startTimeToken:t[1],endTimeToken:t[2]};return t[0].forEach(function(t){var r={timetoken:t.timetoken,entry:i(e,t.message)};n.messages.push(r)}),n}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=s,t.validateParams=o,t.getURL=a,t.getRequestTimeout=u,t.isAuthSupported=c,t.prepareParams=l,t.handleResponse=h;var f=(n(5),n(13)),p=r(f),d=n(15),y=r(d)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return p.default.PNDeleteMessagesOperation}function s(e,t){var n=t.channel,r=e.config;return n?r.subscribeKey?void 0:"Missing Subscribe Key":"Missing channel"}function o(){return!0}function a(e,t){var n=t.channel;return"/v3/history/sub-key/"+e.config.subscribeKey+"/channel/"+y.default.encodeString(n)}function u(e){return e.config.getTransactionTimeout()}function c(){return!0}function l(e,t){var n=t.start,r=t.end,i={};return n&&(i.start=n),r&&(i.end=r),i}function h(e,t){return t.payload}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=s,t.useDelete=o,t.getURL=a,t.getRequestTimeout=u,t.isAuthSupported=c,t.prepareParams=l,t.handleResponse=h;var f=(n(5),n(13)),p=r(f),d=n(15),y=r(d)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return p.default.PNMessageCounts}function s(e,t){var n=t.channels,r=t.timetoken,i=t.channelTimetokens,s=e.config;return n?r&&i?"timetoken and channelTimetokens are incompatible together":r&&i&&i.length>1&&n.length!==i.length?"Length of channelTimetokens and channels do not match":s.subscribeKey?void 0:"Missing Subscribe Key":"Missing channel"}function o(e,t){var n=t.channels,r=e.config,i=n.join(",");return"/v3/history/sub-key/"+r.subscribeKey+"/message-counts/"+y.default.encodeString(i)}function a(e){return e.config.getTransactionTimeout()}function u(){return!0}function c(e,t){var n=t.timetoken,r=t.channelTimetokens,i={};if(r&&1===r.length){var s=h(r,1),o=s[0];i.timetoken=o}else r?i.channelsTimetoken=r.join(","):n&&(i.timetoken=n);return i}function l(e,t){return{channels:t.channels}}Object.defineProperty(t,"__esModule",{value:!0});var h=function(){function e(e,t){var n=[],r=!0,i=!1,s=void 0;try{for(var o,a=e[Symbol.iterator]();!(r=(o=a.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,s=e}finally{try{!r&&a.return&&a.return()}finally{if(i)throw s}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();t.getOperation=i,t.validateParams=s,t.getURL=o,t.getRequestTimeout=a,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var f=n(13),p=r(f),d=n(15),y=r(d)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var n=e.config,r=e.crypto;if(!n.cipherKey)return t;try{return r.decrypt(t)}catch(e){return t}}function s(){return p.default.PNFetchMessagesOperation}function o(e,t){var n=t.channels,r=e.config;return n&&0!==n.length?r.subscribeKey?void 0:"Missing Subscribe Key":"Missing channels"}function a(e,t){var n=t.channels,r=void 0===n?[]:n,i=e.config,s=r.length>0?r.join(","):",";return"/v3/history/sub-key/"+i.subscribeKey+"/channel/"+y.default.encodeString(s)}function u(e){return e.config.getTransactionTimeout()}function c(){return!0}function l(e,t){var n=t.start,r=t.end,i=t.count,s=t.stringifiedTimeToken,o=void 0!==s&&s,a={};return i&&(a.max=i),n&&(a.start=n),r&&(a.end=r),o&&(a.string_message_token="true"),a}function h(e,t){var n={channels:{}};return Object.keys(t.channels||{}).forEach(function(r){n.channels[r]=[],(t.channels[r]||[]).forEach(function(t){var s={};s.channel=r,s.subscription=null,s.timetoken=t.timetoken,s.message=i(e,t.message),n.channels[r].push(s)})}),n}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=s,t.validateParams=o,t.getURL=a,t.getRequestTimeout=u,t.isAuthSupported=c,t.prepareParams=l,t.handleResponse=h;var f=(n(5),n(13)),p=r(f),d=n(15),y=r(d)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return f.default.PNSubscribeOperation}function s(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"}function o(e,t){var n=e.config,r=t.channels,i=void 0===r?[]:r,s=i.length>0?i.join(","):",";return"/v2/subscribe/"+n.subscribeKey+"/"+d.default.encodeString(s)+"/0"}function a(e){return e.config.getSubscribeTimeout()}function u(){return!0}function c(e,t){var n=e.config,r=t.state,i=t.channelGroups,s=void 0===i?[]:i,o=t.timetoken,a=t.filterExpression,u=t.region,c={heartbeat:n.getPresenceTimeout()};return s.length>0&&(c["channel-group"]=s.join(",")),a&&a.length>0&&(c["filter-expr"]=a),Object.keys(r).length&&(c.state=JSON.stringify(r)),o&&(c.tt=o),u&&(c.tr=u),c}function l(e,t){var n=[];t.m.forEach(function(e){var t={publishTimetoken:e.p.t,region:e.p.r},r={shard:parseInt(e.a,10),subscriptionMatch:e.b,channel:e.c,payload:e.d,flags:e.f,issuingClientId:e.i,subscribeKey:e.k,originationTimetoken:e.o,userMetadata:e.u,publishMetaData:t};n.push(r)});var r={timetoken:t.t.t,region:t.t.r};return{messages:n,metadata:r}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=s,t.getURL=o,t.getRequestTimeout=a,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var h=(n(5),n(13)),f=r(h),p=n(15),d=r(p)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(2),a=(r(o),n(10)),u=r(a),c=(n(5),function(){function e(t){var n=this;i(this,e),this._modules={},Object.keys(t).forEach(function(e){n._modules[e]=t[e].bind(n)})}return s(e,[{key:"init",value:function(e){this._config=e,this._maxSubDomain=20,this._currentSubDomain=Math.floor(Math.random()*this._maxSubDomain),this._providedFQDN=(this._config.secure?"https://":"http://")+this._config.origin,this._coreParams={},this.shiftStandardOrigin()}},{key:"nextOrigin",value:function(){if(-1===this._providedFQDN.indexOf("ps."))return this._providedFQDN;var e=void 0;return this._currentSubDomain=this._currentSubDomain+1,this._currentSubDomain>=this._maxSubDomain&&(this._currentSubDomain=1),e=this._currentSubDomain.toString(),this._providedFQDN.replace("ps.","ps"+e+".")}},{key:"hasModule",value:function(e){return e in this._modules}},{key:"shiftStandardOrigin",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._standardOrigin=this.nextOrigin(e),this._standardOrigin}},{key:"getStandardOrigin",value:function(){return this._standardOrigin}},{key:"POST",value:function(e,t,n,r){return this._modules.post(e,t,n,r)}},{key:"GET",value:function(e,t,n){return this._modules.get(e,t,n)}},{key:"DELETE",value:function(e,t,n){return this._modules.del(e,t,n)}},{key:"_detectErrorCategory",value:function(e){if("ENOTFOUND"===e.code)return u.default.PNNetworkIssuesCategory;if("ECONNREFUSED"===e.code)return u.default.PNNetworkIssuesCategory;if("ECONNRESET"===e.code)return u.default.PNNetworkIssuesCategory;if("EAI_AGAIN"===e.code)return u.default.PNNetworkIssuesCategory;if(0===e.status||e.hasOwnProperty("status")&&void 0===e.status)return u.default.PNNetworkIssuesCategory;if(e.timeout)return u.default.PNTimeoutCategory;if("ETIMEDOUT"===e.code)return u.default.PNNetworkIssuesCategory;if(e.response){if(e.response.badRequest)return u.default.PNBadRequestCategory;if(e.response.forbidden)return u.default.PNAccessDeniedCategory}return u.default.PNUnknownCategory}}]),e}());t.default=c,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={get:function(e){try{return localStorage.getItem(e)}catch(e){return null}},set:function(e,t){try{return localStorage.setItem(e,t)}catch(e){return null}}},e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=(new Date).getTime(),n=(new Date).toISOString(),r=function(){return console&&console.log?console:window&&window.console&&window.console.log?window.console:console}();r.log("<<<<<"),r.log("["+n+"]","\n",e.url,"\n",e.qs),r.log("-----"),e.on("response",function(n){var i=(new Date).getTime(),s=i-t,o=(new Date).toISOString();r.log(">>>>>>"),r.log("["+o+" / "+s+"]","\n",e.url,"\n",e.qs,"\n",n.text),r.log("-----")})}function i(e,t,n){var i=this;return this._config.logVerbosity&&(e=e.use(r)),this._config.proxy&&this._modules.proxy&&(e=this._modules.proxy.call(this,e)),this._config.keepAlive&&this._modules.keepAlive&&(e=this._modules.keepAlive(e)),e.timeout(t.timeout).end(function(e,r){var s=void 0,o={};if(o.error=null!==e,o.operation=t.operation,r&&r.status&&(o.statusCode=r.status),e){if(e.response&&e.response.text&&!i._config.logVerbosity)try{o.errorData=JSON.parse(e.response.text)}catch(t){o.errorData=e}else o.errorData=e;return o.category=i._detectErrorCategory(e),n(o,null)}try{s=JSON.parse(r.text)}catch(e){return o.errorData=r,o.error=!0,n(o,null)}return s.error&&1===s.error&&s.status&&s.message&&s.service?(o.errorData=s,o.statusCode=s.status,o.error=!0,o.category=i._detectErrorCategory(o),n(o,null)):n(o,s)})}function s(e,t,n){var r=c.default.get(this.getStandardOrigin()+t.url).query(e);return i.call(this,r,t,n)}function o(e,t,n,r){var s=c.default.post(this.getStandardOrigin()+n.url).query(e).send(t);return i.call(this,s,n,r)}function a(e,t,n){var r=c.default.delete(this.getStandardOrigin()+t.url).query(e);return i.call(this,r,t,n)}Object.defineProperty(t,"__esModule",{value:!0}),t.get=s,t.post=o,t.del=a;var u=n(43),c=function(e){return e&&e.__esModule?e:{default:e}}(u);n(5)},function(e,t,n){function r(){}function i(e){if(!y(e))return e;var t=[];for(var n in e)s(t,n,e[n]);return t.join("&")}function s(e,t,n){if(null!=n)if(Array.isArray(n))n.forEach(function(n){s(e,t,n)});else if(y(n))for(var r in n)s(e,t+"["+r+"]",n[r]);else e.push(encodeURIComponent(t)+"="+encodeURIComponent(n));else null===n&&e.push(encodeURIComponent(t))}function o(e){for(var t,n,r={},i=e.split("&"),s=0,o=i.length;s<o;++s)t=i[s],n=t.indexOf("="),-1==n?r[decodeURIComponent(t)]="":r[decodeURIComponent(t.slice(0,n))]=decodeURIComponent(t.slice(n+1));return r}function a(e){for(var t,n,r,i,s=e.split(/\r?\n/),o={},a=0,u=s.length;a<u;++a)n=s[a],-1!==(t=n.indexOf(":"))&&(r=n.slice(0,t).toLowerCase(),i=_(n.slice(t+1)),o[r]=i);return o}function u(e){return/[\/+]json($|[^-\w])/.test(e)}function c(e){this.req=e,this.xhr=this.req.xhr,this.text="HEAD"!=this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;var t=this.xhr.status;1223===t&&(t=204),this._setStatusProperties(t),this.header=this.headers=a(this.xhr.getAllResponseHeaders()),this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&e._responseType?this.body=this.xhr.response:this.body="HEAD"!=this.req.method?this._parseBody(this.text?this.text:this.xhr.response):null}function l(e,t){var n=this;this._query=this._query||[],this.method=e,this.url=t,this.header={},this._header={},this.on("end",function(){var e=null,t=null;try{t=new c(n)}catch(t){return e=new Error("Parser is unable to parse the response"),e.parse=!0,e.original=t,n.xhr?(e.rawResponse=void 0===n.xhr.responseType?n.xhr.responseText:n.xhr.response,e.status=n.xhr.status?n.xhr.status:null,e.statusCode=e.status):(e.rawResponse=null,e.status=null),n.callback(e)}n.emit("response",t);var r;try{n._isResponseOK(t)||(r=new Error(t.statusText||"Unsuccessful HTTP response"))}catch(e){r=e}r?(r.original=e,r.response=t,r.status=t.status,n.callback(r,t)):n.callback(null,t)})}function h(e,t,n){var r=v("DELETE",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r}var f;"undefined"!=typeof window?f=window:"undefined"!=typeof self?f=self:(console.warn("Using browser-only version of superagent in non-browser environment"),f=this);var p=n(44),d=n(45),y=n(46),g=n(47),b=n(49),v=t=e.exports=function(e,n){return"function"==typeof n?new t.Request("GET",e).end(n):1==arguments.length?new t.Request("GET",e):new t.Request(e,n)};t.Request=l,v.getXHR=function(){if(!(!f.XMLHttpRequest||f.location&&"file:"==f.location.protocol&&f.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}throw Error("Browser-only version of superagent could not find XHR")};var _="".trim?function(e){return e.trim()}:function(e){return e.replace(/(^\s*|\s*$)/g,"")};v.serializeObject=i,v.parseString=o,v.types={html:"text/html",json:"application/json",xml:"text/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},v.serialize={"application/x-www-form-urlencoded":i,"application/json":JSON.stringify},v.parse={"application/x-www-form-urlencoded":o,"application/json":JSON.parse},g(c.prototype),c.prototype._parseBody=function(e){var t=v.parse[this.type];return this.req._parser?this.req._parser(this,e):(!t&&u(this.type)&&(t=v.parse["application/json"]),t&&e&&(e.length||e instanceof Object)?t(e):null)},c.prototype.toError=function(){var e=this.req,t=e.method,n=e.url,r="cannot "+t+" "+n+" ("+this.status+")",i=new Error(r);return i.status=this.status,i.method=t,i.url=n,i},v.Response=c,p(l.prototype),d(l.prototype),l.prototype.type=function(e){return this.set("Content-Type",v.types[e]||e),this},l.prototype.accept=function(e){return this.set("Accept",v.types[e]||e),this},l.prototype.auth=function(e,t,n){1===arguments.length&&(t=""),"object"==typeof t&&null!==t&&(n=t,t=""),n||(n={type:"function"==typeof btoa?"basic":"auto"});var r=function(e){if("function"==typeof btoa)return btoa(e);throw new Error("Cannot use basic auth, btoa is not a function")};return this._auth(e,t,n,r)},l.prototype.query=function(e){return"string"!=typeof e&&(e=i(e)),e&&this._query.push(e),this},l.prototype.attach=function(e,t,n){if(t){if(this._data)throw Error("superagent can't mix .send() and .attach()");this._getFormData().append(e,t,n||t.name)}return this},l.prototype._getFormData=function(){return this._formData||(this._formData=new f.FormData),this._formData},l.prototype.callback=function(e,t){if(this._shouldRetry(e,t))return this._retry();var n=this._callback;this.clearTimeout(),e&&(this._maxRetries&&(e.retries=this._retries-1),this.emit("error",e)),n(e,t)},l.prototype.crossDomainError=function(){var e=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");e.crossDomain=!0,e.status=this.status,e.method=this.method,e.url=this.url,this.callback(e)},l.prototype.buffer=l.prototype.ca=l.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},l.prototype.pipe=l.prototype.write=function(){throw Error("Streaming is not supported in browser version of superagent")},l.prototype._isHost=function(e){return e&&"object"==typeof e&&!Array.isArray(e)&&"[object Object]"!==Object.prototype.toString.call(e)},l.prototype.end=function(e){return this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=e||r,this._finalizeQueryString(),this._end()},l.prototype._end=function(){var e=this,t=this.xhr=v.getXHR(),n=this._formData||this._data;this._setTimeouts(),t.onreadystatechange=function(){var n=t.readyState;if(n>=2&&e._responseTimeoutTimer&&clearTimeout(e._responseTimeoutTimer),4==n){var r;try{r=t.status}catch(e){r=0}if(!r){if(e.timedout||e._aborted)return;return e.crossDomainError()}e.emit("end")}};var r=function(t,n){n.total>0&&(n.percent=n.loaded/n.total*100),n.direction=t,e.emit("progress",n)};if(this.hasListeners("progress"))try{t.onprogress=r.bind(null,"download"),t.upload&&(t.upload.onprogress=r.bind(null,"upload"))}catch(e){}try{this.username&&this.password?t.open(this.method,this.url,!0,this.username,this.password):t.open(this.method,this.url,!0)}catch(e){return this.callback(e)}if(this._withCredentials&&(t.withCredentials=!0),!this._formData&&"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof n&&!this._isHost(n)){var i=this._header["content-type"],s=this._serializer||v.serialize[i?i.split(";")[0]:""];!s&&u(i)&&(s=v.serialize["application/json"]),s&&(n=s(n))}for(var o in this.header)null!=this.header[o]&&this.header.hasOwnProperty(o)&&t.setRequestHeader(o,this.header[o]);return this._responseType&&(t.responseType=this._responseType),this.emit("request",this),t.send(void 0!==n?n:null),this},v.agent=function(){return new b},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach(function(e){b.prototype[e.toLowerCase()]=function(t,n){var r=new v.Request(e,t);return this._setDefaults(r),n&&r.end(n),r}}),b.prototype.del=b.prototype.delete,v.get=function(e,t,n){var r=v("GET",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},v.head=function(e,t,n){var r=v("HEAD",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},v.options=function(e,t,n){var r=v("OPTIONS",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},v.del=h,v.delete=h,v.patch=function(e,t,n){var r=v("PATCH",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},v.post=function(e,t,n){var r=v("POST",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},v.put=function(e,t,n){var r=v("PUT",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r}},function(e,t,n){function r(e){if(e)return i(e)}function i(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}e.exports=r,r.prototype.on=r.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},r.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if((r=n[i])===t||r.fn===t){n.splice(i,1);break}return this},r.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),n=this._callbacks["$"+e];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this},r.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},r.prototype.hasListeners=function(e){return!!this.listeners(e).length}},function(e,t,n){"use strict";function r(e){if(e)return i(e)}function i(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}var s=n(46);e.exports=r,r.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,this},r.prototype.parse=function(e){return this._parser=e,this},r.prototype.responseType=function(e){return this._responseType=e,this},r.prototype.serialize=function(e){return this._serializer=e,this},r.prototype.timeout=function(e){if(!e||"object"!=typeof e)return this._timeout=e,this._responseTimeout=0,this;for(var t in e)switch(t){case"deadline":this._timeout=e.deadline;break;case"response":this._responseTimeout=e.response;break;default:console.warn("Unknown timeout option",t)}return this},r.prototype.retry=function(e,t){return 0!==arguments.length&&!0!==e||(e=1),e<=0&&(e=0),this._maxRetries=e,this._retries=0,this._retryCallback=t,this};var o=["ECONNRESET","ETIMEDOUT","EADDRINFO","ESOCKETTIMEDOUT"];r.prototype._shouldRetry=function(e,t){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var n=this._retryCallback(e,t);if(!0===n)return!0;if(!1===n)return!1}catch(e){console.error(e)}if(t&&t.status&&t.status>=500&&501!=t.status)return!0;if(e){if(e.code&&~o.indexOf(e.code))return!0;if(e.timeout&&"ECONNABORTED"==e.code)return!0;if(e.crossDomain)return!0}return!1},r.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this._end()},r.prototype.then=function(e,t){if(!this._fullfilledPromise){var n=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise(function(e,t){n.end(function(n,r){n?t(n):e(r)})})}return this._fullfilledPromise.then(e,t)},r.prototype.catch=function(e){return this.then(void 0,e)},r.prototype.use=function(e){return e(this),this},r.prototype.ok=function(e){if("function"!=typeof e)throw Error("Callback required");return this._okCallback=e,this},r.prototype._isResponseOK=function(e){return!!e&&(this._okCallback?this._okCallback(e):e.status>=200&&e.status<300)},r.prototype.get=function(e){return this._header[e.toLowerCase()]},r.prototype.getHeader=r.prototype.get,r.prototype.set=function(e,t){if(s(e)){for(var n in e)this.set(n,e[n]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},r.prototype.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},r.prototype.field=function(e,t){if(null===e||void 0===e)throw new Error(".field(name, val) name can not be empty");if(this._data&&console.error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()"),s(e)){for(var n in e)this.field(n,e[n]);return this}if(Array.isArray(t)){for(var r in t)this.field(e,t[r]);return this}if(null===t||void 0===t)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof t&&(t=""+t),this._getFormData().append(e,t),this},r.prototype.abort=function(){return this._aborted?this:(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort"),this)},r.prototype._auth=function(e,t,n,r){switch(n.type){case"basic":this.set("Authorization","Basic "+r(e+":"+t));break;case"auto":this.username=e,this.password=t;break;case"bearer":this.set("Authorization","Bearer "+e)}return this},r.prototype.withCredentials=function(e){return void 0==e&&(e=!0),this._withCredentials=e,this},r.prototype.redirects=function(e){return this._maxRedirects=e,this},r.prototype.maxResponseSize=function(e){if("number"!=typeof e)throw TypeError("Invalid argument");return this._maxResponseSize=e,this},r.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},r.prototype.send=function(e){var t=s(e),n=this._header["content-type"];if(this._formData&&console.error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()"),t&&!this._data)Array.isArray(e)?this._data=[]:this._isHost(e)||(this._data={});else if(e&&this._data&&this._isHost(this._data))throw Error("Can't merge these send calls");if(t&&s(this._data))for(var r in e)this._data[r]=e[r];else"string"==typeof e?(n||this.type("form"),n=this._header["content-type"],this._data="application/x-www-form-urlencoded"==n?this._data?this._data+"&"+e:e:(this._data||"")+e):this._data=e;return!t||this._isHost(e)?this:(n||this.type("json"),this)},r.prototype.sortQuery=function(e){return this._sort=void 0===e||e,this},r.prototype._finalizeQueryString=function(){var e=this._query.join("&");if(e&&(this.url+=(this.url.indexOf("?")>=0?"&":"?")+e),this._query.length=0,this._sort){var t=this.url.indexOf("?");if(t>=0){var n=this.url.substring(t+1).split("&");"function"==typeof this._sort?n.sort(this._sort):n.sort(),this.url=this.url.substring(0,t)+"?"+n.join("&")}}},r.prototype._appendQueryString=function(){console.trace("Unsupported")},r.prototype._timeoutError=function(e,t,n){if(!this._aborted){var r=new Error(e+t+"ms exceeded");r.timeout=t,r.code="ECONNABORTED",r.errno=n,this.timedout=!0,this.abort(),this.callback(r)}},r.prototype._setTimeouts=function(){var e=this;this._timeout&&!this._timer&&(this._timer=setTimeout(function(){e._timeoutError("Timeout of ",e._timeout,"ETIME")},this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout(function(){e._timeoutError("Response timeout of ",e._responseTimeout,"ETIMEDOUT")},this._responseTimeout))}},function(e,t){"use strict";function n(e){return null!==e&&"object"==typeof e}e.exports=n},function(e,t,n){"use strict";function r(e){if(e)return i(e)}function i(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}var s=n(48);e.exports=r,r.prototype.get=function(e){return this.header[e.toLowerCase()]},r.prototype._setHeaderProperties=function(e){var t=e["content-type"]||"";this.type=s.type(t);var n=s.params(t);for(var r in n)this[r]=n[r];this.links={};try{e.link&&(this.links=s.parseLinks(e.link))}catch(e){}},r.prototype._setStatusProperties=function(e){var t=e/100|0;this.status=this.statusCode=e,this.statusType=t,this.info=1==t,this.ok=2==t,this.redirect=3==t,this.clientError=4==t,this.serverError=5==t,this.error=(4==t||5==t)&&this.toError(),this.created=201==e,this.accepted=202==e,this.noContent=204==e,this.badRequest=400==e,this.unauthorized=401==e,this.notAcceptable=406==e,this.forbidden=403==e,this.notFound=404==e,this.unprocessableEntity=422==e}},function(e,t){"use strict";t.type=function(e){return e.split(/ *; */).shift()},t.params=function(e){return e.split(/ *; */).reduce(function(e,t){var n=t.split(/ *= */),r=n.shift(),i=n.shift();return r&&i&&(e[r]=i),e},{})},t.parseLinks=function(e){return e.split(/ *, */).reduce(function(e,t){var n=t.split(/ *; */),r=n[0].slice(1,-1);return e[n[1].split(/ *= */)[1].slice(1,-1)]=r,e},{})},t.cleanHeader=function(e,t){return delete e["content-type"],delete e["content-length"],delete e["transfer-encoding"],delete e.host,t&&(delete e.authorization,delete e.cookie),e}},function(e,t){function n(){this._defaults=[]}["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert"].forEach(function(e){n.prototype[e]=function(){return this._defaults.push({fn:e,arguments:arguments}),this}}),n.prototype._setDefaults=function(e){this._defaults.forEach(function(t){e[t.fn].apply(e,t.arguments)})},e.exports=n}])});
|
|
20094
|
-
},{}],
|
|
19924
|
+
},{}],87:[function(require,module,exports){
|
|
20095
19925
|
(function (global){
|
|
20096
19926
|
/*! https://mths.be/punycode v1.4.1 by @mathias */
|
|
20097
19927
|
;(function(root) {
|
|
@@ -20628,7 +20458,7 @@ d.length>0&&(y.auth=d.join(",")),(o||0===o)&&(y.ttl=o),y}function c(){return{}}O
|
|
|
20628
20458
|
}(this));
|
|
20629
20459
|
|
|
20630
20460
|
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
20631
|
-
},{}],
|
|
20461
|
+
},{}],88:[function(require,module,exports){
|
|
20632
20462
|
(function (process){
|
|
20633
20463
|
// vim:ts=4:sts=4:sw=4:
|
|
20634
20464
|
/*!
|
|
@@ -22680,7 +22510,7 @@ return Q;
|
|
|
22680
22510
|
});
|
|
22681
22511
|
|
|
22682
22512
|
}).call(this,require('_process'))
|
|
22683
|
-
},{"_process":
|
|
22513
|
+
},{"_process":85}],89:[function(require,module,exports){
|
|
22684
22514
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
22685
22515
|
//
|
|
22686
22516
|
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
@@ -22766,7 +22596,7 @@ var isArray = Array.isArray || function (xs) {
|
|
|
22766
22596
|
return Object.prototype.toString.call(xs) === '[object Array]';
|
|
22767
22597
|
};
|
|
22768
22598
|
|
|
22769
|
-
},{}],
|
|
22599
|
+
},{}],90:[function(require,module,exports){
|
|
22770
22600
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
22771
22601
|
//
|
|
22772
22602
|
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
@@ -22853,16 +22683,16 @@ var objectKeys = Object.keys || function (obj) {
|
|
|
22853
22683
|
return res;
|
|
22854
22684
|
};
|
|
22855
22685
|
|
|
22856
|
-
},{}],
|
|
22686
|
+
},{}],91:[function(require,module,exports){
|
|
22857
22687
|
'use strict';
|
|
22858
22688
|
|
|
22859
22689
|
exports.decode = exports.parse = require('./decode');
|
|
22860
22690
|
exports.encode = exports.stringify = require('./encode');
|
|
22861
22691
|
|
|
22862
|
-
},{"./decode":
|
|
22692
|
+
},{"./decode":89,"./encode":90}],92:[function(require,module,exports){
|
|
22863
22693
|
module.exports = require('./lib/_stream_duplex.js');
|
|
22864
22694
|
|
|
22865
|
-
},{"./lib/_stream_duplex.js":
|
|
22695
|
+
},{"./lib/_stream_duplex.js":93}],93:[function(require,module,exports){
|
|
22866
22696
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
22867
22697
|
//
|
|
22868
22698
|
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
@@ -22908,7 +22738,7 @@ var objectKeys = Object.keys || function (obj) {
|
|
|
22908
22738
|
module.exports = Duplex;
|
|
22909
22739
|
|
|
22910
22740
|
/*<replacement>*/
|
|
22911
|
-
var util = require('core-util-is');
|
|
22741
|
+
var util = Object.create(require('core-util-is'));
|
|
22912
22742
|
util.inherits = require('inherits');
|
|
22913
22743
|
/*</replacement>*/
|
|
22914
22744
|
|
|
@@ -22994,7 +22824,7 @@ Duplex.prototype._destroy = function (err, cb) {
|
|
|
22994
22824
|
|
|
22995
22825
|
pna.nextTick(cb, err);
|
|
22996
22826
|
};
|
|
22997
|
-
},{"./_stream_readable":
|
|
22827
|
+
},{"./_stream_readable":95,"./_stream_writable":97,"core-util-is":46,"inherits":74,"process-nextick-args":84}],94:[function(require,module,exports){
|
|
22998
22828
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
22999
22829
|
//
|
|
23000
22830
|
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
@@ -23027,7 +22857,7 @@ module.exports = PassThrough;
|
|
|
23027
22857
|
var Transform = require('./_stream_transform');
|
|
23028
22858
|
|
|
23029
22859
|
/*<replacement>*/
|
|
23030
|
-
var util = require('core-util-is');
|
|
22860
|
+
var util = Object.create(require('core-util-is'));
|
|
23031
22861
|
util.inherits = require('inherits');
|
|
23032
22862
|
/*</replacement>*/
|
|
23033
22863
|
|
|
@@ -23042,7 +22872,7 @@ function PassThrough(options) {
|
|
|
23042
22872
|
PassThrough.prototype._transform = function (chunk, encoding, cb) {
|
|
23043
22873
|
cb(null, chunk);
|
|
23044
22874
|
};
|
|
23045
|
-
},{"./_stream_transform":
|
|
22875
|
+
},{"./_stream_transform":96,"core-util-is":46,"inherits":74}],95:[function(require,module,exports){
|
|
23046
22876
|
(function (process,global){
|
|
23047
22877
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
23048
22878
|
//
|
|
@@ -23110,7 +22940,7 @@ function _isUint8Array(obj) {
|
|
|
23110
22940
|
/*</replacement>*/
|
|
23111
22941
|
|
|
23112
22942
|
/*<replacement>*/
|
|
23113
|
-
var util = require('core-util-is');
|
|
22943
|
+
var util = Object.create(require('core-util-is'));
|
|
23114
22944
|
util.inherits = require('inherits');
|
|
23115
22945
|
/*</replacement>*/
|
|
23116
22946
|
|
|
@@ -24064,7 +23894,7 @@ function indexOf(xs, x) {
|
|
|
24064
23894
|
return -1;
|
|
24065
23895
|
}
|
|
24066
23896
|
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
24067
|
-
},{"./_stream_duplex":
|
|
23897
|
+
},{"./_stream_duplex":93,"./internal/streams/BufferList":98,"./internal/streams/destroy":99,"./internal/streams/stream":100,"_process":85,"core-util-is":46,"events":65,"inherits":74,"isarray":75,"process-nextick-args":84,"safe-buffer":106,"string_decoder/":130,"util":41}],96:[function(require,module,exports){
|
|
24068
23898
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
24069
23899
|
//
|
|
24070
23900
|
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
@@ -24135,7 +23965,7 @@ module.exports = Transform;
|
|
|
24135
23965
|
var Duplex = require('./_stream_duplex');
|
|
24136
23966
|
|
|
24137
23967
|
/*<replacement>*/
|
|
24138
|
-
var util = require('core-util-is');
|
|
23968
|
+
var util = Object.create(require('core-util-is'));
|
|
24139
23969
|
util.inherits = require('inherits');
|
|
24140
23970
|
/*</replacement>*/
|
|
24141
23971
|
|
|
@@ -24279,7 +24109,7 @@ function done(stream, er, data) {
|
|
|
24279
24109
|
|
|
24280
24110
|
return stream.push(null);
|
|
24281
24111
|
}
|
|
24282
|
-
},{"./_stream_duplex":
|
|
24112
|
+
},{"./_stream_duplex":93,"core-util-is":46,"inherits":74}],97:[function(require,module,exports){
|
|
24283
24113
|
(function (process,global){
|
|
24284
24114
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
24285
24115
|
//
|
|
@@ -24347,7 +24177,7 @@ var Duplex;
|
|
|
24347
24177
|
Writable.WritableState = WritableState;
|
|
24348
24178
|
|
|
24349
24179
|
/*<replacement>*/
|
|
24350
|
-
var util = require('core-util-is');
|
|
24180
|
+
var util = Object.create(require('core-util-is'));
|
|
24351
24181
|
util.inherits = require('inherits');
|
|
24352
24182
|
/*</replacement>*/
|
|
24353
24183
|
|
|
@@ -24969,7 +24799,7 @@ Writable.prototype._destroy = function (err, cb) {
|
|
|
24969
24799
|
cb(err);
|
|
24970
24800
|
};
|
|
24971
24801
|
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
24972
|
-
},{"./_stream_duplex":
|
|
24802
|
+
},{"./_stream_duplex":93,"./internal/streams/destroy":99,"./internal/streams/stream":100,"_process":85,"core-util-is":46,"inherits":74,"process-nextick-args":84,"safe-buffer":106,"util-deprecate":138}],98:[function(require,module,exports){
|
|
24973
24803
|
'use strict';
|
|
24974
24804
|
|
|
24975
24805
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
@@ -25049,7 +24879,7 @@ if (util && util.inspect && util.inspect.custom) {
|
|
|
25049
24879
|
return this.constructor.name + ' ' + obj;
|
|
25050
24880
|
};
|
|
25051
24881
|
}
|
|
25052
|
-
},{"safe-buffer":
|
|
24882
|
+
},{"safe-buffer":106,"util":41}],99:[function(require,module,exports){
|
|
25053
24883
|
'use strict';
|
|
25054
24884
|
|
|
25055
24885
|
/*<replacement>*/
|
|
@@ -25124,13 +24954,13 @@ module.exports = {
|
|
|
25124
24954
|
destroy: destroy,
|
|
25125
24955
|
undestroy: undestroy
|
|
25126
24956
|
};
|
|
25127
|
-
},{"process-nextick-args":
|
|
24957
|
+
},{"process-nextick-args":84}],100:[function(require,module,exports){
|
|
25128
24958
|
module.exports = require('events').EventEmitter;
|
|
25129
24959
|
|
|
25130
|
-
},{"events":65}],
|
|
24960
|
+
},{"events":65}],101:[function(require,module,exports){
|
|
25131
24961
|
module.exports = require('./readable').PassThrough
|
|
25132
24962
|
|
|
25133
|
-
},{"./readable":
|
|
24963
|
+
},{"./readable":102}],102:[function(require,module,exports){
|
|
25134
24964
|
exports = module.exports = require('./lib/_stream_readable.js');
|
|
25135
24965
|
exports.Stream = exports;
|
|
25136
24966
|
exports.Readable = exports;
|
|
@@ -25139,13 +24969,13 @@ exports.Duplex = require('./lib/_stream_duplex.js');
|
|
|
25139
24969
|
exports.Transform = require('./lib/_stream_transform.js');
|
|
25140
24970
|
exports.PassThrough = require('./lib/_stream_passthrough.js');
|
|
25141
24971
|
|
|
25142
|
-
},{"./lib/_stream_duplex.js":
|
|
24972
|
+
},{"./lib/_stream_duplex.js":93,"./lib/_stream_passthrough.js":94,"./lib/_stream_readable.js":95,"./lib/_stream_transform.js":96,"./lib/_stream_writable.js":97}],103:[function(require,module,exports){
|
|
25143
24973
|
module.exports = require('./readable').Transform
|
|
25144
24974
|
|
|
25145
|
-
},{"./readable":
|
|
24975
|
+
},{"./readable":102}],104:[function(require,module,exports){
|
|
25146
24976
|
module.exports = require('./lib/_stream_writable.js');
|
|
25147
24977
|
|
|
25148
|
-
},{"./lib/_stream_writable.js":
|
|
24978
|
+
},{"./lib/_stream_writable.js":97}],105:[function(require,module,exports){
|
|
25149
24979
|
|
|
25150
24980
|
/**
|
|
25151
24981
|
* Reduce `arr` with `fn`.
|
|
@@ -25170,7 +25000,7 @@ module.exports = function(arr, fn, initial){
|
|
|
25170
25000
|
|
|
25171
25001
|
return curr;
|
|
25172
25002
|
};
|
|
25173
|
-
},{}],
|
|
25003
|
+
},{}],106:[function(require,module,exports){
|
|
25174
25004
|
/* eslint-disable node/no-deprecated-api */
|
|
25175
25005
|
var buffer = require('buffer')
|
|
25176
25006
|
var Buffer = buffer.Buffer
|
|
@@ -25234,7 +25064,7 @@ SafeBuffer.allocUnsafeSlow = function (size) {
|
|
|
25234
25064
|
return buffer.SlowBuffer(size)
|
|
25235
25065
|
}
|
|
25236
25066
|
|
|
25237
|
-
},{"buffer":
|
|
25067
|
+
},{"buffer":42}],107:[function(require,module,exports){
|
|
25238
25068
|
|
|
25239
25069
|
/**
|
|
25240
25070
|
* Module dependencies.
|
|
@@ -25328,7 +25158,7 @@ exports.connect = lookup;
|
|
|
25328
25158
|
exports.Manager = require('./manager');
|
|
25329
25159
|
exports.Socket = require('./socket');
|
|
25330
25160
|
|
|
25331
|
-
},{"./manager":
|
|
25161
|
+
},{"./manager":108,"./socket":110,"./url":111,"debug":113,"socket.io-parser":117}],108:[function(require,module,exports){
|
|
25332
25162
|
|
|
25333
25163
|
/**
|
|
25334
25164
|
* Module dependencies.
|
|
@@ -25887,7 +25717,7 @@ Manager.prototype.onreconnect = function(){
|
|
|
25887
25717
|
this.emitAll('reconnect', attempt);
|
|
25888
25718
|
};
|
|
25889
25719
|
|
|
25890
|
-
},{"./on":
|
|
25720
|
+
},{"./on":109,"./socket":110,"backo2":37,"component-bind":44,"component-emitter":112,"debug":113,"engine.io-client":47,"indexof":73,"socket.io-parser":117}],109:[function(require,module,exports){
|
|
25891
25721
|
|
|
25892
25722
|
/**
|
|
25893
25723
|
* Module exports.
|
|
@@ -25913,7 +25743,7 @@ function on(obj, ev, fn) {
|
|
|
25913
25743
|
};
|
|
25914
25744
|
}
|
|
25915
25745
|
|
|
25916
|
-
},{}],
|
|
25746
|
+
},{}],110:[function(require,module,exports){
|
|
25917
25747
|
|
|
25918
25748
|
/**
|
|
25919
25749
|
* Module dependencies.
|
|
@@ -26327,7 +26157,7 @@ Socket.prototype.compress = function(compress){
|
|
|
26327
26157
|
return this;
|
|
26328
26158
|
};
|
|
26329
26159
|
|
|
26330
|
-
},{"./on":
|
|
26160
|
+
},{"./on":109,"component-bind":44,"component-emitter":112,"debug":113,"has-binary":68,"socket.io-parser":117,"to-array":134}],111:[function(require,module,exports){
|
|
26331
26161
|
(function (global){
|
|
26332
26162
|
|
|
26333
26163
|
/**
|
|
@@ -26407,7 +26237,7 @@ function url(uri, loc){
|
|
|
26407
26237
|
}
|
|
26408
26238
|
|
|
26409
26239
|
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
26410
|
-
},{"debug":
|
|
26240
|
+
},{"debug":113,"parseuri":83}],112:[function(require,module,exports){
|
|
26411
26241
|
|
|
26412
26242
|
/**
|
|
26413
26243
|
* Expose `Emitter`.
|
|
@@ -26570,13 +26400,13 @@ Emitter.prototype.hasListeners = function(event){
|
|
|
26570
26400
|
return !! this.listeners(event).length;
|
|
26571
26401
|
};
|
|
26572
26402
|
|
|
26573
|
-
},{}],
|
|
26403
|
+
},{}],113:[function(require,module,exports){
|
|
26574
26404
|
arguments[4][58][0].apply(exports,arguments)
|
|
26575
|
-
},{"./debug":
|
|
26405
|
+
},{"./debug":114,"dup":58}],114:[function(require,module,exports){
|
|
26576
26406
|
arguments[4][59][0].apply(exports,arguments)
|
|
26577
|
-
},{"dup":59,"ms":
|
|
26407
|
+
},{"dup":59,"ms":115}],115:[function(require,module,exports){
|
|
26578
26408
|
arguments[4][60][0].apply(exports,arguments)
|
|
26579
|
-
},{"dup":60}],
|
|
26409
|
+
},{"dup":60}],116:[function(require,module,exports){
|
|
26580
26410
|
(function (global){
|
|
26581
26411
|
/*global Blob,File*/
|
|
26582
26412
|
|
|
@@ -26721,7 +26551,7 @@ exports.removeBlobs = function(data, callback) {
|
|
|
26721
26551
|
};
|
|
26722
26552
|
|
|
26723
26553
|
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
26724
|
-
},{"./is-buffer":
|
|
26554
|
+
},{"./is-buffer":118,"isarray":122}],117:[function(require,module,exports){
|
|
26725
26555
|
|
|
26726
26556
|
/**
|
|
26727
26557
|
* Module dependencies.
|
|
@@ -27123,7 +26953,7 @@ function error(data){
|
|
|
27123
26953
|
};
|
|
27124
26954
|
}
|
|
27125
26955
|
|
|
27126
|
-
},{"./binary":
|
|
26956
|
+
},{"./binary":116,"./is-buffer":118,"component-emitter":119,"debug":120,"isarray":122,"json3":76}],118:[function(require,module,exports){
|
|
27127
26957
|
(function (global){
|
|
27128
26958
|
|
|
27129
26959
|
module.exports = isBuf;
|
|
@@ -27140,17 +26970,17 @@ function isBuf(obj) {
|
|
|
27140
26970
|
}
|
|
27141
26971
|
|
|
27142
26972
|
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
27143
|
-
},{}],
|
|
26973
|
+
},{}],119:[function(require,module,exports){
|
|
27144
26974
|
arguments[4][57][0].apply(exports,arguments)
|
|
27145
|
-
},{"dup":57}],
|
|
26975
|
+
},{"dup":57}],120:[function(require,module,exports){
|
|
27146
26976
|
arguments[4][58][0].apply(exports,arguments)
|
|
27147
|
-
},{"./debug":
|
|
26977
|
+
},{"./debug":121,"dup":58}],121:[function(require,module,exports){
|
|
27148
26978
|
arguments[4][59][0].apply(exports,arguments)
|
|
27149
|
-
},{"dup":59,"ms":
|
|
26979
|
+
},{"dup":59,"ms":123}],122:[function(require,module,exports){
|
|
27150
26980
|
arguments[4][64][0].apply(exports,arguments)
|
|
27151
|
-
},{"dup":64}],
|
|
26981
|
+
},{"dup":64}],123:[function(require,module,exports){
|
|
27152
26982
|
arguments[4][60][0].apply(exports,arguments)
|
|
27153
|
-
},{"dup":60}],
|
|
26983
|
+
},{"dup":60}],124:[function(require,module,exports){
|
|
27154
26984
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
27155
26985
|
//
|
|
27156
26986
|
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
@@ -27279,7 +27109,7 @@ Stream.prototype.pipe = function(dest, options) {
|
|
|
27279
27109
|
return dest;
|
|
27280
27110
|
};
|
|
27281
27111
|
|
|
27282
|
-
},{"events":65,"inherits":74,"readable-stream/duplex.js":
|
|
27112
|
+
},{"events":65,"inherits":74,"readable-stream/duplex.js":92,"readable-stream/passthrough.js":101,"readable-stream/readable.js":102,"readable-stream/transform.js":103,"readable-stream/writable.js":104}],125:[function(require,module,exports){
|
|
27283
27113
|
var ClientRequest = require('./lib/request')
|
|
27284
27114
|
var extend = require('xtend')
|
|
27285
27115
|
var statusCodes = require('builtin-status-codes')
|
|
@@ -27354,7 +27184,7 @@ http.METHODS = [
|
|
|
27354
27184
|
'UNLOCK',
|
|
27355
27185
|
'UNSUBSCRIBE'
|
|
27356
27186
|
]
|
|
27357
|
-
},{"./lib/request":
|
|
27187
|
+
},{"./lib/request":127,"builtin-status-codes":43,"url":136,"xtend":141}],126:[function(require,module,exports){
|
|
27358
27188
|
(function (global){
|
|
27359
27189
|
exports.fetch = isFunction(global.fetch) && isFunction(global.ReadableByteStream)
|
|
27360
27190
|
|
|
@@ -27398,7 +27228,7 @@ function isFunction (value) {
|
|
|
27398
27228
|
xhr = null // Help gc
|
|
27399
27229
|
|
|
27400
27230
|
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
27401
|
-
},{}],
|
|
27231
|
+
},{}],127:[function(require,module,exports){
|
|
27402
27232
|
(function (process,global,Buffer){
|
|
27403
27233
|
// var Base64 = require('Base64')
|
|
27404
27234
|
var capability = require('./capability')
|
|
@@ -27680,7 +27510,7 @@ var unsafeHeaders = [
|
|
|
27680
27510
|
]
|
|
27681
27511
|
|
|
27682
27512
|
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer)
|
|
27683
|
-
},{"./capability":
|
|
27513
|
+
},{"./capability":126,"./response":128,"_process":85,"buffer":42,"foreach":67,"indexof":73,"inherits":74,"object-keys":78,"stream":124}],128:[function(require,module,exports){
|
|
27684
27514
|
(function (process,global,Buffer){
|
|
27685
27515
|
var capability = require('./capability')
|
|
27686
27516
|
var foreach = require('foreach')
|
|
@@ -27857,7 +27687,7 @@ IncomingMessage.prototype._onXHRProgress = function () {
|
|
|
27857
27687
|
}
|
|
27858
27688
|
|
|
27859
27689
|
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer)
|
|
27860
|
-
},{"./capability":
|
|
27690
|
+
},{"./capability":126,"_process":85,"buffer":42,"foreach":67,"inherits":74,"stream":124}],129:[function(require,module,exports){
|
|
27861
27691
|
var nargs = /\{([0-9a-zA-Z_]+)\}/g
|
|
27862
27692
|
|
|
27863
27693
|
module.exports = template
|
|
@@ -27895,7 +27725,7 @@ function template(string) {
|
|
|
27895
27725
|
})
|
|
27896
27726
|
}
|
|
27897
27727
|
|
|
27898
|
-
},{}],
|
|
27728
|
+
},{}],130:[function(require,module,exports){
|
|
27899
27729
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
27900
27730
|
//
|
|
27901
27731
|
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
@@ -28192,7 +28022,7 @@ function simpleWrite(buf) {
|
|
|
28192
28022
|
function simpleEnd(buf) {
|
|
28193
28023
|
return buf && buf.length ? this.write(buf) : '';
|
|
28194
28024
|
}
|
|
28195
|
-
},{"safe-buffer":
|
|
28025
|
+
},{"safe-buffer":106}],131:[function(require,module,exports){
|
|
28196
28026
|
/**
|
|
28197
28027
|
* Module dependencies.
|
|
28198
28028
|
*/
|
|
@@ -29385,7 +29215,172 @@ request.put = function(url, data, fn){
|
|
|
29385
29215
|
|
|
29386
29216
|
module.exports = request;
|
|
29387
29217
|
|
|
29388
|
-
},{"emitter":
|
|
29218
|
+
},{"emitter":132,"reduce":105}],132:[function(require,module,exports){
|
|
29219
|
+
|
|
29220
|
+
/**
|
|
29221
|
+
* Expose `Emitter`.
|
|
29222
|
+
*/
|
|
29223
|
+
|
|
29224
|
+
if (typeof module !== 'undefined') {
|
|
29225
|
+
module.exports = Emitter;
|
|
29226
|
+
}
|
|
29227
|
+
|
|
29228
|
+
/**
|
|
29229
|
+
* Initialize a new `Emitter`.
|
|
29230
|
+
*
|
|
29231
|
+
* @api public
|
|
29232
|
+
*/
|
|
29233
|
+
|
|
29234
|
+
function Emitter(obj) {
|
|
29235
|
+
if (obj) return mixin(obj);
|
|
29236
|
+
};
|
|
29237
|
+
|
|
29238
|
+
/**
|
|
29239
|
+
* Mixin the emitter properties.
|
|
29240
|
+
*
|
|
29241
|
+
* @param {Object} obj
|
|
29242
|
+
* @return {Object}
|
|
29243
|
+
* @api private
|
|
29244
|
+
*/
|
|
29245
|
+
|
|
29246
|
+
function mixin(obj) {
|
|
29247
|
+
for (var key in Emitter.prototype) {
|
|
29248
|
+
obj[key] = Emitter.prototype[key];
|
|
29249
|
+
}
|
|
29250
|
+
return obj;
|
|
29251
|
+
}
|
|
29252
|
+
|
|
29253
|
+
/**
|
|
29254
|
+
* Listen on the given `event` with `fn`.
|
|
29255
|
+
*
|
|
29256
|
+
* @param {String} event
|
|
29257
|
+
* @param {Function} fn
|
|
29258
|
+
* @return {Emitter}
|
|
29259
|
+
* @api public
|
|
29260
|
+
*/
|
|
29261
|
+
|
|
29262
|
+
Emitter.prototype.on =
|
|
29263
|
+
Emitter.prototype.addEventListener = function(event, fn){
|
|
29264
|
+
this._callbacks = this._callbacks || {};
|
|
29265
|
+
(this._callbacks['$' + event] = this._callbacks['$' + event] || [])
|
|
29266
|
+
.push(fn);
|
|
29267
|
+
return this;
|
|
29268
|
+
};
|
|
29269
|
+
|
|
29270
|
+
/**
|
|
29271
|
+
* Adds an `event` listener that will be invoked a single
|
|
29272
|
+
* time then automatically removed.
|
|
29273
|
+
*
|
|
29274
|
+
* @param {String} event
|
|
29275
|
+
* @param {Function} fn
|
|
29276
|
+
* @return {Emitter}
|
|
29277
|
+
* @api public
|
|
29278
|
+
*/
|
|
29279
|
+
|
|
29280
|
+
Emitter.prototype.once = function(event, fn){
|
|
29281
|
+
function on() {
|
|
29282
|
+
this.off(event, on);
|
|
29283
|
+
fn.apply(this, arguments);
|
|
29284
|
+
}
|
|
29285
|
+
|
|
29286
|
+
on.fn = fn;
|
|
29287
|
+
this.on(event, on);
|
|
29288
|
+
return this;
|
|
29289
|
+
};
|
|
29290
|
+
|
|
29291
|
+
/**
|
|
29292
|
+
* Remove the given callback for `event` or all
|
|
29293
|
+
* registered callbacks.
|
|
29294
|
+
*
|
|
29295
|
+
* @param {String} event
|
|
29296
|
+
* @param {Function} fn
|
|
29297
|
+
* @return {Emitter}
|
|
29298
|
+
* @api public
|
|
29299
|
+
*/
|
|
29300
|
+
|
|
29301
|
+
Emitter.prototype.off =
|
|
29302
|
+
Emitter.prototype.removeListener =
|
|
29303
|
+
Emitter.prototype.removeAllListeners =
|
|
29304
|
+
Emitter.prototype.removeEventListener = function(event, fn){
|
|
29305
|
+
this._callbacks = this._callbacks || {};
|
|
29306
|
+
|
|
29307
|
+
// all
|
|
29308
|
+
if (0 == arguments.length) {
|
|
29309
|
+
this._callbacks = {};
|
|
29310
|
+
return this;
|
|
29311
|
+
}
|
|
29312
|
+
|
|
29313
|
+
// specific event
|
|
29314
|
+
var callbacks = this._callbacks['$' + event];
|
|
29315
|
+
if (!callbacks) return this;
|
|
29316
|
+
|
|
29317
|
+
// remove all handlers
|
|
29318
|
+
if (1 == arguments.length) {
|
|
29319
|
+
delete this._callbacks['$' + event];
|
|
29320
|
+
return this;
|
|
29321
|
+
}
|
|
29322
|
+
|
|
29323
|
+
// remove specific handler
|
|
29324
|
+
var cb;
|
|
29325
|
+
for (var i = 0; i < callbacks.length; i++) {
|
|
29326
|
+
cb = callbacks[i];
|
|
29327
|
+
if (cb === fn || cb.fn === fn) {
|
|
29328
|
+
callbacks.splice(i, 1);
|
|
29329
|
+
break;
|
|
29330
|
+
}
|
|
29331
|
+
}
|
|
29332
|
+
return this;
|
|
29333
|
+
};
|
|
29334
|
+
|
|
29335
|
+
/**
|
|
29336
|
+
* Emit `event` with the given args.
|
|
29337
|
+
*
|
|
29338
|
+
* @param {String} event
|
|
29339
|
+
* @param {Mixed} ...
|
|
29340
|
+
* @return {Emitter}
|
|
29341
|
+
*/
|
|
29342
|
+
|
|
29343
|
+
Emitter.prototype.emit = function(event){
|
|
29344
|
+
this._callbacks = this._callbacks || {};
|
|
29345
|
+
var args = [].slice.call(arguments, 1)
|
|
29346
|
+
, callbacks = this._callbacks['$' + event];
|
|
29347
|
+
|
|
29348
|
+
if (callbacks) {
|
|
29349
|
+
callbacks = callbacks.slice(0);
|
|
29350
|
+
for (var i = 0, len = callbacks.length; i < len; ++i) {
|
|
29351
|
+
callbacks[i].apply(this, args);
|
|
29352
|
+
}
|
|
29353
|
+
}
|
|
29354
|
+
|
|
29355
|
+
return this;
|
|
29356
|
+
};
|
|
29357
|
+
|
|
29358
|
+
/**
|
|
29359
|
+
* Return array of callbacks for `event`.
|
|
29360
|
+
*
|
|
29361
|
+
* @param {String} event
|
|
29362
|
+
* @return {Array}
|
|
29363
|
+
* @api public
|
|
29364
|
+
*/
|
|
29365
|
+
|
|
29366
|
+
Emitter.prototype.listeners = function(event){
|
|
29367
|
+
this._callbacks = this._callbacks || {};
|
|
29368
|
+
return this._callbacks['$' + event] || [];
|
|
29369
|
+
};
|
|
29370
|
+
|
|
29371
|
+
/**
|
|
29372
|
+
* Check if this emitter has `event` handlers.
|
|
29373
|
+
*
|
|
29374
|
+
* @param {String} event
|
|
29375
|
+
* @return {Boolean}
|
|
29376
|
+
* @api public
|
|
29377
|
+
*/
|
|
29378
|
+
|
|
29379
|
+
Emitter.prototype.hasListeners = function(event){
|
|
29380
|
+
return !! this.listeners(event).length;
|
|
29381
|
+
};
|
|
29382
|
+
|
|
29383
|
+
},{}],133:[function(require,module,exports){
|
|
29389
29384
|
(function (Buffer){
|
|
29390
29385
|
"0.50.0";
|
|
29391
29386
|
/*
|
|
@@ -37582,7 +37577,7 @@ TinCan client library
|
|
|
37582
37577
|
}());
|
|
37583
37578
|
|
|
37584
37579
|
}).call(this,require("buffer").Buffer)
|
|
37585
|
-
},{"buffer":
|
|
37580
|
+
},{"buffer":42,"querystring":91,"xhr2":140}],134:[function(require,module,exports){
|
|
37586
37581
|
module.exports = toArray
|
|
37587
37582
|
|
|
37588
37583
|
function toArray(list, index) {
|
|
@@ -39856,7 +39851,7 @@ function isNullOrUndefined(arg) {
|
|
|
39856
39851
|
return arg == null;
|
|
39857
39852
|
}
|
|
39858
39853
|
|
|
39859
|
-
},{"punycode":
|
|
39854
|
+
},{"punycode":87,"querystring":91}],137:[function(require,module,exports){
|
|
39860
39855
|
(function (global){
|
|
39861
39856
|
/*! https://mths.be/utf8js v2.0.0 by @mathias */
|
|
39862
39857
|
;(function(root) {
|
|
@@ -42101,7 +42096,7 @@ function config (name) {
|
|
|
42101
42096
|
}).call(this);
|
|
42102
42097
|
|
|
42103
42098
|
}).call(this,require('_process'),require("buffer").Buffer)
|
|
42104
|
-
},{"_process":
|
|
42099
|
+
},{"_process":85,"buffer":42,"http":125,"https":71,"os":80,"url":136}],141:[function(require,module,exports){
|
|
42105
42100
|
module.exports = extend
|
|
42106
42101
|
|
|
42107
42102
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|