@archbee/app-widget 1.1.25 → 1.1.27
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/README.md +1 -0
- package/index.esm.js +457 -311
- package/package.json +1 -1
- package/src/lib/main.d.ts +13 -20
- package/src/lib/scripts/initScripts.d.ts +1 -1
- package/src/lib/scripts/render.d.ts +1 -1
- package/src/lib/types.d.ts +5 -4
package/index.esm.js
CHANGED
|
@@ -2,47 +2,6 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import React, { forwardRef, useRef, useMemo, useImperativeHandle } from 'react';
|
|
3
3
|
import ReactDOM from 'react-dom';
|
|
4
4
|
|
|
5
|
-
const initScripts = () => {
|
|
6
|
-
var _a;
|
|
7
|
-
const widgetcsslink = document.createElement('link');
|
|
8
|
-
const link = document.getElementsByTagName('link')[0];
|
|
9
|
-
const mainurl = "https://widget.archbee.com/v1";
|
|
10
|
-
widgetcsslink['rel'] = 'stylesheet';
|
|
11
|
-
widgetcsslink['href'] = `${mainurl}/main.css`;
|
|
12
|
-
if (!link) {
|
|
13
|
-
document.getElementsByTagName('head')[0].append(widgetcsslink);
|
|
14
|
-
}
|
|
15
|
-
(_a = link === null || link === void 0 ? void 0 : link.parentNode) === null || _a === void 0 ? void 0 : _a.appendChild(widgetcsslink);
|
|
16
|
-
};
|
|
17
|
-
const initJsScripts = loadingStrategy => {
|
|
18
|
-
var _a;
|
|
19
|
-
const mainUrl = "https://widget.archbee.com/v1";
|
|
20
|
-
let scripttag = document.createElement('script');
|
|
21
|
-
scripttag['async'] = loadingStrategy === 'lazy';
|
|
22
|
-
scripttag['src'] = `${mainUrl}/main.js`;
|
|
23
|
-
const script = document.getElementsByTagName('script')[0];
|
|
24
|
-
(_a = script === null || script === void 0 ? void 0 : script.parentNode) === null || _a === void 0 ? void 0 : _a.insertBefore(scripttag, script);
|
|
25
|
-
};
|
|
26
|
-
const createArchbeeWidget = (spaceId, jwt, shareableToken, loadingStrategy = 'lazy', bubble = 'invisible') => {
|
|
27
|
-
if (!window._archbee) {
|
|
28
|
-
window._archbee = window._archbee || {
|
|
29
|
-
queue: [],
|
|
30
|
-
push: function (event) {
|
|
31
|
-
window._archbee.queue.push(event);
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
window._archbee.push({
|
|
35
|
-
eventType: 'init',
|
|
36
|
-
spaceId,
|
|
37
|
-
jwt,
|
|
38
|
-
shareableToken,
|
|
39
|
-
bubble
|
|
40
|
-
});
|
|
41
|
-
initJsScripts(loadingStrategy);
|
|
42
|
-
}
|
|
43
|
-
return window._archbee;
|
|
44
|
-
};
|
|
45
|
-
|
|
46
5
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
47
6
|
|
|
48
7
|
var check = function (it) {
|
|
@@ -57,12 +16,13 @@ var global$b =
|
|
|
57
16
|
// eslint-disable-next-line no-restricted-globals -- safe
|
|
58
17
|
check(typeof self == 'object' && self) ||
|
|
59
18
|
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
|
|
19
|
+
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
|
|
60
20
|
// eslint-disable-next-line no-new-func -- fallback
|
|
61
|
-
(function () { return this; })() ||
|
|
21
|
+
(function () { return this; })() || Function('return this')();
|
|
62
22
|
|
|
63
23
|
var objectGetOwnPropertyDescriptor = {};
|
|
64
24
|
|
|
65
|
-
var fails$
|
|
25
|
+
var fails$d = function (exec) {
|
|
66
26
|
try {
|
|
67
27
|
return !!exec();
|
|
68
28
|
} catch (error) {
|
|
@@ -70,17 +30,17 @@ var fails$c = function (exec) {
|
|
|
70
30
|
}
|
|
71
31
|
};
|
|
72
32
|
|
|
73
|
-
var fails$
|
|
33
|
+
var fails$c = fails$d;
|
|
74
34
|
|
|
75
35
|
// Detect IE8's incomplete defineProperty implementation
|
|
76
|
-
var descriptors = !fails$
|
|
36
|
+
var descriptors = !fails$c(function () {
|
|
77
37
|
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
78
38
|
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
|
|
79
39
|
});
|
|
80
40
|
|
|
81
|
-
var fails$
|
|
41
|
+
var fails$b = fails$d;
|
|
82
42
|
|
|
83
|
-
var functionBindNative = !fails$
|
|
43
|
+
var functionBindNative = !fails$b(function () {
|
|
84
44
|
// eslint-disable-next-line es/no-function-prototype-bind -- safe
|
|
85
45
|
var test = (function () { /* empty */ }).bind();
|
|
86
46
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
@@ -99,15 +59,15 @@ var objectPropertyIsEnumerable = {};
|
|
|
99
59
|
|
|
100
60
|
var $propertyIsEnumerable = {}.propertyIsEnumerable;
|
|
101
61
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
102
|
-
var getOwnPropertyDescriptor$
|
|
62
|
+
var getOwnPropertyDescriptor$2 = Object.getOwnPropertyDescriptor;
|
|
103
63
|
|
|
104
64
|
// Nashorn ~ JDK8 bug
|
|
105
|
-
var NASHORN_BUG = getOwnPropertyDescriptor$
|
|
65
|
+
var NASHORN_BUG = getOwnPropertyDescriptor$2 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
|
|
106
66
|
|
|
107
67
|
// `Object.prototype.propertyIsEnumerable` method implementation
|
|
108
68
|
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
|
|
109
69
|
objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
|
110
|
-
var descriptor = getOwnPropertyDescriptor$
|
|
70
|
+
var descriptor = getOwnPropertyDescriptor$2(this, V);
|
|
111
71
|
return !!descriptor && descriptor.enumerable;
|
|
112
72
|
} : $propertyIsEnumerable;
|
|
113
73
|
|
|
@@ -142,19 +102,19 @@ var classofRaw$1 = function (it) {
|
|
|
142
102
|
};
|
|
143
103
|
|
|
144
104
|
var uncurryThis$9 = functionUncurryThis;
|
|
145
|
-
var fails$
|
|
146
|
-
var classof$
|
|
105
|
+
var fails$a = fails$d;
|
|
106
|
+
var classof$4 = classofRaw$1;
|
|
147
107
|
|
|
148
108
|
var $Object$4 = Object;
|
|
149
109
|
var split = uncurryThis$9(''.split);
|
|
150
110
|
|
|
151
111
|
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
152
|
-
var indexedObject = fails$
|
|
112
|
+
var indexedObject = fails$a(function () {
|
|
153
113
|
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
|
154
114
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
155
115
|
return !$Object$4('z').propertyIsEnumerable(0);
|
|
156
116
|
}) ? function (it) {
|
|
157
|
-
return classof$
|
|
117
|
+
return classof$4(it) === 'String' ? split(it, '') : $Object$4(it);
|
|
158
118
|
} : $Object$4;
|
|
159
119
|
|
|
160
120
|
// we can't use just `it == null` since of `document.all` special case
|
|
@@ -165,12 +125,12 @@ var isNullOrUndefined$2 = function (it) {
|
|
|
165
125
|
|
|
166
126
|
var isNullOrUndefined$1 = isNullOrUndefined$2;
|
|
167
127
|
|
|
168
|
-
var $TypeError$
|
|
128
|
+
var $TypeError$8 = TypeError;
|
|
169
129
|
|
|
170
130
|
// `RequireObjectCoercible` abstract operation
|
|
171
131
|
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
172
132
|
var requireObjectCoercible$3 = function (it) {
|
|
173
|
-
if (isNullOrUndefined$1(it)) throw new $TypeError$
|
|
133
|
+
if (isNullOrUndefined$1(it)) throw new $TypeError$8("Can't call method on " + it);
|
|
174
134
|
return it;
|
|
175
135
|
};
|
|
176
136
|
|
|
@@ -182,37 +142,21 @@ var toIndexedObject$4 = function (it) {
|
|
|
182
142
|
return IndexedObject$1(requireObjectCoercible$2(it));
|
|
183
143
|
};
|
|
184
144
|
|
|
185
|
-
var documentAll$2 = typeof document == 'object' && document.all;
|
|
186
|
-
|
|
187
145
|
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
|
|
188
|
-
|
|
189
|
-
var IS_HTMLDDA = typeof documentAll$2 == 'undefined' && documentAll$2 !== undefined;
|
|
190
|
-
|
|
191
|
-
var documentAll_1 = {
|
|
192
|
-
all: documentAll$2,
|
|
193
|
-
IS_HTMLDDA: IS_HTMLDDA
|
|
194
|
-
};
|
|
195
|
-
|
|
196
|
-
var $documentAll$1 = documentAll_1;
|
|
197
|
-
|
|
198
|
-
var documentAll$1 = $documentAll$1.all;
|
|
146
|
+
var documentAll = typeof document == 'object' && document.all;
|
|
199
147
|
|
|
200
148
|
// `IsCallable` abstract operation
|
|
201
149
|
// https://tc39.es/ecma262/#sec-iscallable
|
|
202
|
-
|
|
203
|
-
|
|
150
|
+
// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
|
|
151
|
+
var isCallable$c = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
|
|
152
|
+
return typeof argument == 'function' || argument === documentAll;
|
|
204
153
|
} : function (argument) {
|
|
205
154
|
return typeof argument == 'function';
|
|
206
155
|
};
|
|
207
156
|
|
|
208
157
|
var isCallable$b = isCallable$c;
|
|
209
|
-
var $documentAll = documentAll_1;
|
|
210
|
-
|
|
211
|
-
var documentAll = $documentAll.all;
|
|
212
158
|
|
|
213
|
-
var isObject$7 =
|
|
214
|
-
return typeof it == 'object' ? it !== null : isCallable$b(it) || it === documentAll;
|
|
215
|
-
} : function (it) {
|
|
159
|
+
var isObject$7 = function (it) {
|
|
216
160
|
return typeof it == 'object' ? it !== null : isCallable$b(it);
|
|
217
161
|
};
|
|
218
162
|
|
|
@@ -263,13 +207,13 @@ var engineV8Version = version;
|
|
|
263
207
|
|
|
264
208
|
/* eslint-disable es/no-symbol -- required for testing */
|
|
265
209
|
var V8_VERSION = engineV8Version;
|
|
266
|
-
var fails$
|
|
210
|
+
var fails$9 = fails$d;
|
|
267
211
|
var global$8 = global$b;
|
|
268
212
|
|
|
269
213
|
var $String$4 = global$8.String;
|
|
270
214
|
|
|
271
215
|
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
|
|
272
|
-
var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$
|
|
216
|
+
var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$9(function () {
|
|
273
217
|
var symbol = Symbol('symbol detection');
|
|
274
218
|
// Chrome 38 Symbol has incorrect toString conversion
|
|
275
219
|
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
|
@@ -314,12 +258,12 @@ var tryToString$1 = function (argument) {
|
|
|
314
258
|
var isCallable$8 = isCallable$c;
|
|
315
259
|
var tryToString = tryToString$1;
|
|
316
260
|
|
|
317
|
-
var $TypeError$
|
|
261
|
+
var $TypeError$7 = TypeError;
|
|
318
262
|
|
|
319
263
|
// `Assert: IsCallable(argument) is true`
|
|
320
264
|
var aCallable$1 = function (argument) {
|
|
321
265
|
if (isCallable$8(argument)) return argument;
|
|
322
|
-
throw new $TypeError$
|
|
266
|
+
throw new $TypeError$7(tryToString(argument) + ' is not a function');
|
|
323
267
|
};
|
|
324
268
|
|
|
325
269
|
var aCallable = aCallable$1;
|
|
@@ -336,7 +280,7 @@ var call$4 = functionCall;
|
|
|
336
280
|
var isCallable$7 = isCallable$c;
|
|
337
281
|
var isObject$6 = isObject$7;
|
|
338
282
|
|
|
339
|
-
var $TypeError$
|
|
283
|
+
var $TypeError$6 = TypeError;
|
|
340
284
|
|
|
341
285
|
// `OrdinaryToPrimitive` abstract operation
|
|
342
286
|
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
|
@@ -345,56 +289,56 @@ var ordinaryToPrimitive$1 = function (input, pref) {
|
|
|
345
289
|
if (pref === 'string' && isCallable$7(fn = input.toString) && !isObject$6(val = call$4(fn, input))) return val;
|
|
346
290
|
if (isCallable$7(fn = input.valueOf) && !isObject$6(val = call$4(fn, input))) return val;
|
|
347
291
|
if (pref !== 'string' && isCallable$7(fn = input.toString) && !isObject$6(val = call$4(fn, input))) return val;
|
|
348
|
-
throw new $TypeError$
|
|
292
|
+
throw new $TypeError$6("Can't convert object to primitive value");
|
|
349
293
|
};
|
|
350
294
|
|
|
351
|
-
var
|
|
295
|
+
var sharedStore = {exports: {}};
|
|
352
296
|
|
|
353
297
|
var global$7 = global$b;
|
|
354
298
|
|
|
355
299
|
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
356
|
-
var defineProperty$
|
|
300
|
+
var defineProperty$4 = Object.defineProperty;
|
|
357
301
|
|
|
358
302
|
var defineGlobalProperty$3 = function (key, value) {
|
|
359
303
|
try {
|
|
360
|
-
defineProperty$
|
|
304
|
+
defineProperty$4(global$7, key, { value: value, configurable: true, writable: true });
|
|
361
305
|
} catch (error) {
|
|
362
306
|
global$7[key] = value;
|
|
363
307
|
} return value;
|
|
364
308
|
};
|
|
365
309
|
|
|
366
|
-
var
|
|
310
|
+
var globalThis$1 = global$b;
|
|
367
311
|
var defineGlobalProperty$2 = defineGlobalProperty$3;
|
|
368
312
|
|
|
369
313
|
var SHARED = '__core-js_shared__';
|
|
370
|
-
var store$3 =
|
|
314
|
+
var store$3 = sharedStore.exports = globalThis$1[SHARED] || defineGlobalProperty$2(SHARED, {});
|
|
371
315
|
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
var store$2 = sharedStore;
|
|
375
|
-
|
|
376
|
-
(shared$3.exports = function (key, value) {
|
|
377
|
-
return store$2[key] || (store$2[key] = value !== undefined ? value : {});
|
|
378
|
-
})('versions', []).push({
|
|
379
|
-
version: '3.33.2',
|
|
316
|
+
(store$3.versions || (store$3.versions = [])).push({
|
|
317
|
+
version: '3.36.1',
|
|
380
318
|
mode: 'global',
|
|
381
|
-
copyright: '© 2014-
|
|
382
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.
|
|
319
|
+
copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
|
|
320
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.36.1/LICENSE',
|
|
383
321
|
source: 'https://github.com/zloirock/core-js'
|
|
384
322
|
});
|
|
385
323
|
|
|
324
|
+
var store$2 = sharedStore.exports;
|
|
325
|
+
|
|
326
|
+
var shared$3 = function (key, value) {
|
|
327
|
+
return store$2[key] || (store$2[key] = value || {});
|
|
328
|
+
};
|
|
329
|
+
|
|
386
330
|
var requireObjectCoercible$1 = requireObjectCoercible$3;
|
|
387
331
|
|
|
388
332
|
var $Object$2 = Object;
|
|
389
333
|
|
|
390
334
|
// `ToObject` abstract operation
|
|
391
335
|
// https://tc39.es/ecma262/#sec-toobject
|
|
392
|
-
var toObject$
|
|
336
|
+
var toObject$4 = function (argument) {
|
|
393
337
|
return $Object$2(requireObjectCoercible$1(argument));
|
|
394
338
|
};
|
|
395
339
|
|
|
396
340
|
var uncurryThis$7 = functionUncurryThis;
|
|
397
|
-
var toObject$
|
|
341
|
+
var toObject$3 = toObject$4;
|
|
398
342
|
|
|
399
343
|
var hasOwnProperty = uncurryThis$7({}.hasOwnProperty);
|
|
400
344
|
|
|
@@ -402,7 +346,7 @@ var hasOwnProperty = uncurryThis$7({}.hasOwnProperty);
|
|
|
402
346
|
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
403
347
|
// eslint-disable-next-line es/no-object-hasown -- safe
|
|
404
348
|
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
405
|
-
return hasOwnProperty(toObject$
|
|
349
|
+
return hasOwnProperty(toObject$3(it), key);
|
|
406
350
|
};
|
|
407
351
|
|
|
408
352
|
var uncurryThis$6 = functionUncurryThis;
|
|
@@ -415,20 +359,20 @@ var uid$2 = function (key) {
|
|
|
415
359
|
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$2(++id + postfix, 36);
|
|
416
360
|
};
|
|
417
361
|
|
|
418
|
-
var global$
|
|
419
|
-
var shared$2 = shared$3
|
|
420
|
-
var hasOwn$
|
|
362
|
+
var global$6 = global$b;
|
|
363
|
+
var shared$2 = shared$3;
|
|
364
|
+
var hasOwn$9 = hasOwnProperty_1;
|
|
421
365
|
var uid$1 = uid$2;
|
|
422
366
|
var NATIVE_SYMBOL = symbolConstructorDetection;
|
|
423
367
|
var USE_SYMBOL_AS_UID = useSymbolAsUid;
|
|
424
368
|
|
|
425
|
-
var Symbol$1 = global$
|
|
369
|
+
var Symbol$1 = global$6.Symbol;
|
|
426
370
|
var WellKnownSymbolsStore = shared$2('wks');
|
|
427
371
|
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1['for'] || Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
|
|
428
372
|
|
|
429
|
-
var wellKnownSymbol$
|
|
430
|
-
if (!hasOwn$
|
|
431
|
-
WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$
|
|
373
|
+
var wellKnownSymbol$7 = function (name) {
|
|
374
|
+
if (!hasOwn$9(WellKnownSymbolsStore, name)) {
|
|
375
|
+
WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$9(Symbol$1, name)
|
|
432
376
|
? Symbol$1[name]
|
|
433
377
|
: createWellKnownSymbol('Symbol.' + name);
|
|
434
378
|
} return WellKnownSymbolsStore[name];
|
|
@@ -439,10 +383,10 @@ var isObject$5 = isObject$7;
|
|
|
439
383
|
var isSymbol$1 = isSymbol$2;
|
|
440
384
|
var getMethod = getMethod$1;
|
|
441
385
|
var ordinaryToPrimitive = ordinaryToPrimitive$1;
|
|
442
|
-
var wellKnownSymbol$
|
|
386
|
+
var wellKnownSymbol$6 = wellKnownSymbol$7;
|
|
443
387
|
|
|
444
|
-
var $TypeError$
|
|
445
|
-
var TO_PRIMITIVE = wellKnownSymbol$
|
|
388
|
+
var $TypeError$5 = TypeError;
|
|
389
|
+
var TO_PRIMITIVE = wellKnownSymbol$6('toPrimitive');
|
|
446
390
|
|
|
447
391
|
// `ToPrimitive` abstract operation
|
|
448
392
|
// https://tc39.es/ecma262/#sec-toprimitive
|
|
@@ -454,7 +398,7 @@ var toPrimitive$1 = function (input, pref) {
|
|
|
454
398
|
if (pref === undefined) pref = 'default';
|
|
455
399
|
result = call$3(exoticToPrim, input, pref);
|
|
456
400
|
if (!isObject$5(result) || isSymbol$1(result)) return result;
|
|
457
|
-
throw new $TypeError$
|
|
401
|
+
throw new $TypeError$5("Can't convert object to primitive value");
|
|
458
402
|
}
|
|
459
403
|
if (pref === undefined) pref = 'number';
|
|
460
404
|
return ordinaryToPrimitive(input, pref);
|
|
@@ -470,10 +414,10 @@ var toPropertyKey$2 = function (argument) {
|
|
|
470
414
|
return isSymbol(key) ? key : key + '';
|
|
471
415
|
};
|
|
472
416
|
|
|
473
|
-
var global$
|
|
417
|
+
var global$5 = global$b;
|
|
474
418
|
var isObject$4 = isObject$7;
|
|
475
419
|
|
|
476
|
-
var document$1 = global$
|
|
420
|
+
var document$1 = global$5.document;
|
|
477
421
|
// typeof document.createElement is 'object' in old IE
|
|
478
422
|
var EXISTS$1 = isObject$4(document$1) && isObject$4(document$1.createElement);
|
|
479
423
|
|
|
@@ -481,25 +425,25 @@ var documentCreateElement$1 = function (it) {
|
|
|
481
425
|
return EXISTS$1 ? document$1.createElement(it) : {};
|
|
482
426
|
};
|
|
483
427
|
|
|
484
|
-
var DESCRIPTORS$
|
|
485
|
-
var fails$
|
|
428
|
+
var DESCRIPTORS$9 = descriptors;
|
|
429
|
+
var fails$8 = fails$d;
|
|
486
430
|
var createElement = documentCreateElement$1;
|
|
487
431
|
|
|
488
432
|
// Thanks to IE8 for its funny defineProperty
|
|
489
|
-
var ie8DomDefine = !DESCRIPTORS$
|
|
433
|
+
var ie8DomDefine = !DESCRIPTORS$9 && !fails$8(function () {
|
|
490
434
|
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
491
435
|
return Object.defineProperty(createElement('div'), 'a', {
|
|
492
436
|
get: function () { return 7; }
|
|
493
437
|
}).a !== 7;
|
|
494
438
|
});
|
|
495
439
|
|
|
496
|
-
var DESCRIPTORS$
|
|
440
|
+
var DESCRIPTORS$8 = descriptors;
|
|
497
441
|
var call$2 = functionCall;
|
|
498
442
|
var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
|
|
499
443
|
var createPropertyDescriptor$2 = createPropertyDescriptor$3;
|
|
500
444
|
var toIndexedObject$3 = toIndexedObject$4;
|
|
501
445
|
var toPropertyKey$1 = toPropertyKey$2;
|
|
502
|
-
var hasOwn$
|
|
446
|
+
var hasOwn$8 = hasOwnProperty_1;
|
|
503
447
|
var IE8_DOM_DEFINE$1 = ie8DomDefine;
|
|
504
448
|
|
|
505
449
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
@@ -507,23 +451,23 @@ var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
|
507
451
|
|
|
508
452
|
// `Object.getOwnPropertyDescriptor` method
|
|
509
453
|
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
|
510
|
-
objectGetOwnPropertyDescriptor.f = DESCRIPTORS$
|
|
454
|
+
objectGetOwnPropertyDescriptor.f = DESCRIPTORS$8 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
|
|
511
455
|
O = toIndexedObject$3(O);
|
|
512
456
|
P = toPropertyKey$1(P);
|
|
513
457
|
if (IE8_DOM_DEFINE$1) try {
|
|
514
458
|
return $getOwnPropertyDescriptor$1(O, P);
|
|
515
459
|
} catch (error) { /* empty */ }
|
|
516
|
-
if (hasOwn$
|
|
460
|
+
if (hasOwn$8(O, P)) return createPropertyDescriptor$2(!call$2(propertyIsEnumerableModule$1.f, O, P), O[P]);
|
|
517
461
|
};
|
|
518
462
|
|
|
519
463
|
var objectDefineProperty = {};
|
|
520
464
|
|
|
521
|
-
var DESCRIPTORS$
|
|
522
|
-
var fails$
|
|
465
|
+
var DESCRIPTORS$7 = descriptors;
|
|
466
|
+
var fails$7 = fails$d;
|
|
523
467
|
|
|
524
468
|
// V8 ~ Chrome 36-
|
|
525
469
|
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
|
526
|
-
var v8PrototypeDefineBug = DESCRIPTORS$
|
|
470
|
+
var v8PrototypeDefineBug = DESCRIPTORS$7 && fails$7(function () {
|
|
527
471
|
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
528
472
|
return Object.defineProperty(function () { /* empty */ }, 'prototype', {
|
|
529
473
|
value: 42,
|
|
@@ -534,21 +478,21 @@ var v8PrototypeDefineBug = DESCRIPTORS$6 && fails$6(function () {
|
|
|
534
478
|
var isObject$3 = isObject$7;
|
|
535
479
|
|
|
536
480
|
var $String$2 = String;
|
|
537
|
-
var $TypeError$
|
|
481
|
+
var $TypeError$4 = TypeError;
|
|
538
482
|
|
|
539
483
|
// `Assert: Type(argument) is Object`
|
|
540
484
|
var anObject$5 = function (argument) {
|
|
541
485
|
if (isObject$3(argument)) return argument;
|
|
542
|
-
throw new $TypeError$
|
|
486
|
+
throw new $TypeError$4($String$2(argument) + ' is not an object');
|
|
543
487
|
};
|
|
544
488
|
|
|
545
|
-
var DESCRIPTORS$
|
|
489
|
+
var DESCRIPTORS$6 = descriptors;
|
|
546
490
|
var IE8_DOM_DEFINE = ie8DomDefine;
|
|
547
491
|
var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
|
|
548
492
|
var anObject$4 = anObject$5;
|
|
549
493
|
var toPropertyKey = toPropertyKey$2;
|
|
550
494
|
|
|
551
|
-
var $TypeError$
|
|
495
|
+
var $TypeError$3 = TypeError;
|
|
552
496
|
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
553
497
|
var $defineProperty = Object.defineProperty;
|
|
554
498
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
@@ -559,7 +503,7 @@ var WRITABLE = 'writable';
|
|
|
559
503
|
|
|
560
504
|
// `Object.defineProperty` method
|
|
561
505
|
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
562
|
-
objectDefineProperty.f = DESCRIPTORS$
|
|
506
|
+
objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
|
|
563
507
|
anObject$4(O);
|
|
564
508
|
P = toPropertyKey(P);
|
|
565
509
|
anObject$4(Attributes);
|
|
@@ -581,16 +525,16 @@ objectDefineProperty.f = DESCRIPTORS$5 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
|
|
|
581
525
|
if (IE8_DOM_DEFINE) try {
|
|
582
526
|
return $defineProperty(O, P, Attributes);
|
|
583
527
|
} catch (error) { /* empty */ }
|
|
584
|
-
if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$
|
|
528
|
+
if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$3('Accessors not supported');
|
|
585
529
|
if ('value' in Attributes) O[P] = Attributes.value;
|
|
586
530
|
return O;
|
|
587
531
|
};
|
|
588
532
|
|
|
589
|
-
var DESCRIPTORS$
|
|
533
|
+
var DESCRIPTORS$5 = descriptors;
|
|
590
534
|
var definePropertyModule$4 = objectDefineProperty;
|
|
591
535
|
var createPropertyDescriptor$1 = createPropertyDescriptor$3;
|
|
592
536
|
|
|
593
|
-
var createNonEnumerableProperty$2 = DESCRIPTORS$
|
|
537
|
+
var createNonEnumerableProperty$2 = DESCRIPTORS$5 ? function (object, key, value) {
|
|
594
538
|
return definePropertyModule$4.f(object, key, createPropertyDescriptor$1(1, value));
|
|
595
539
|
} : function (object, key, value) {
|
|
596
540
|
object[key] = value;
|
|
@@ -599,17 +543,17 @@ var createNonEnumerableProperty$2 = DESCRIPTORS$4 ? function (object, key, value
|
|
|
599
543
|
|
|
600
544
|
var makeBuiltIn$2 = {exports: {}};
|
|
601
545
|
|
|
602
|
-
var DESCRIPTORS$
|
|
603
|
-
var hasOwn$
|
|
546
|
+
var DESCRIPTORS$4 = descriptors;
|
|
547
|
+
var hasOwn$7 = hasOwnProperty_1;
|
|
604
548
|
|
|
605
549
|
var FunctionPrototype = Function.prototype;
|
|
606
550
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
607
|
-
var getDescriptor = DESCRIPTORS$
|
|
551
|
+
var getDescriptor = DESCRIPTORS$4 && Object.getOwnPropertyDescriptor;
|
|
608
552
|
|
|
609
|
-
var EXISTS = hasOwn$
|
|
553
|
+
var EXISTS = hasOwn$7(FunctionPrototype, 'name');
|
|
610
554
|
// additional protection from minified / mangled / dropped function names
|
|
611
555
|
var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
|
|
612
|
-
var CONFIGURABLE = EXISTS && (!DESCRIPTORS$
|
|
556
|
+
var CONFIGURABLE = EXISTS && (!DESCRIPTORS$4 || (DESCRIPTORS$4 && getDescriptor(FunctionPrototype, 'name').configurable));
|
|
613
557
|
|
|
614
558
|
var functionName = {
|
|
615
559
|
EXISTS: EXISTS,
|
|
@@ -619,7 +563,7 @@ var functionName = {
|
|
|
619
563
|
|
|
620
564
|
var uncurryThis$5 = functionUncurryThis;
|
|
621
565
|
var isCallable$6 = isCallable$c;
|
|
622
|
-
var store$1 = sharedStore;
|
|
566
|
+
var store$1 = sharedStore.exports;
|
|
623
567
|
|
|
624
568
|
var functionToString = uncurryThis$5(Function.toString);
|
|
625
569
|
|
|
@@ -632,14 +576,14 @@ if (!isCallable$6(store$1.inspectSource)) {
|
|
|
632
576
|
|
|
633
577
|
var inspectSource$1 = store$1.inspectSource;
|
|
634
578
|
|
|
635
|
-
var global$
|
|
579
|
+
var global$4 = global$b;
|
|
636
580
|
var isCallable$5 = isCallable$c;
|
|
637
581
|
|
|
638
|
-
var WeakMap$1 = global$
|
|
582
|
+
var WeakMap$1 = global$4.WeakMap;
|
|
639
583
|
|
|
640
584
|
var weakMapBasicDetection = isCallable$5(WeakMap$1) && /native code/.test(String(WeakMap$1));
|
|
641
585
|
|
|
642
|
-
var shared$1 = shared$3
|
|
586
|
+
var shared$1 = shared$3;
|
|
643
587
|
var uid = uid$2;
|
|
644
588
|
|
|
645
589
|
var keys = shared$1('keys');
|
|
@@ -651,17 +595,17 @@ var sharedKey$3 = function (key) {
|
|
|
651
595
|
var hiddenKeys$4 = {};
|
|
652
596
|
|
|
653
597
|
var NATIVE_WEAK_MAP = weakMapBasicDetection;
|
|
654
|
-
var global$
|
|
598
|
+
var global$3 = global$b;
|
|
655
599
|
var isObject$2 = isObject$7;
|
|
656
600
|
var createNonEnumerableProperty$1 = createNonEnumerableProperty$2;
|
|
657
|
-
var hasOwn$
|
|
658
|
-
var shared = sharedStore;
|
|
601
|
+
var hasOwn$6 = hasOwnProperty_1;
|
|
602
|
+
var shared = sharedStore.exports;
|
|
659
603
|
var sharedKey$2 = sharedKey$3;
|
|
660
604
|
var hiddenKeys$3 = hiddenKeys$4;
|
|
661
605
|
|
|
662
606
|
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
|
663
|
-
var TypeError$1 = global$
|
|
664
|
-
var WeakMap = global$
|
|
607
|
+
var TypeError$1 = global$3.TypeError;
|
|
608
|
+
var WeakMap = global$3.WeakMap;
|
|
665
609
|
var set$1, get, has;
|
|
666
610
|
|
|
667
611
|
var enforce = function (it) {
|
|
@@ -700,16 +644,16 @@ if (NATIVE_WEAK_MAP || shared.state) {
|
|
|
700
644
|
var STATE = sharedKey$2('state');
|
|
701
645
|
hiddenKeys$3[STATE] = true;
|
|
702
646
|
set$1 = function (it, metadata) {
|
|
703
|
-
if (hasOwn$
|
|
647
|
+
if (hasOwn$6(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
|
|
704
648
|
metadata.facade = it;
|
|
705
649
|
createNonEnumerableProperty$1(it, STATE, metadata);
|
|
706
650
|
return metadata;
|
|
707
651
|
};
|
|
708
652
|
get = function (it) {
|
|
709
|
-
return hasOwn$
|
|
653
|
+
return hasOwn$6(it, STATE) ? it[STATE] : {};
|
|
710
654
|
};
|
|
711
655
|
has = function (it) {
|
|
712
|
-
return hasOwn$
|
|
656
|
+
return hasOwn$6(it, STATE);
|
|
713
657
|
};
|
|
714
658
|
}
|
|
715
659
|
|
|
@@ -722,10 +666,10 @@ var internalState = {
|
|
|
722
666
|
};
|
|
723
667
|
|
|
724
668
|
var uncurryThis$4 = functionUncurryThis;
|
|
725
|
-
var fails$
|
|
669
|
+
var fails$6 = fails$d;
|
|
726
670
|
var isCallable$4 = isCallable$c;
|
|
727
|
-
var hasOwn$
|
|
728
|
-
var DESCRIPTORS$
|
|
671
|
+
var hasOwn$5 = hasOwnProperty_1;
|
|
672
|
+
var DESCRIPTORS$3 = descriptors;
|
|
729
673
|
var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
|
|
730
674
|
var inspectSource = inspectSource$1;
|
|
731
675
|
var InternalStateModule = internalState;
|
|
@@ -734,38 +678,38 @@ var enforceInternalState = InternalStateModule.enforce;
|
|
|
734
678
|
var getInternalState = InternalStateModule.get;
|
|
735
679
|
var $String$1 = String;
|
|
736
680
|
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
737
|
-
var defineProperty$
|
|
681
|
+
var defineProperty$3 = Object.defineProperty;
|
|
738
682
|
var stringSlice = uncurryThis$4(''.slice);
|
|
739
683
|
var replace = uncurryThis$4(''.replace);
|
|
740
684
|
var join = uncurryThis$4([].join);
|
|
741
685
|
|
|
742
|
-
var CONFIGURABLE_LENGTH = DESCRIPTORS$
|
|
743
|
-
return defineProperty$
|
|
686
|
+
var CONFIGURABLE_LENGTH = DESCRIPTORS$3 && !fails$6(function () {
|
|
687
|
+
return defineProperty$3(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
|
|
744
688
|
});
|
|
745
689
|
|
|
746
690
|
var TEMPLATE = String(String).split('String');
|
|
747
691
|
|
|
748
692
|
var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
|
|
749
693
|
if (stringSlice($String$1(name), 0, 7) === 'Symbol(') {
|
|
750
|
-
name = '[' + replace($String$1(name), /^Symbol\(([^)]*)\)
|
|
694
|
+
name = '[' + replace($String$1(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
|
|
751
695
|
}
|
|
752
696
|
if (options && options.getter) name = 'get ' + name;
|
|
753
697
|
if (options && options.setter) name = 'set ' + name;
|
|
754
|
-
if (!hasOwn$
|
|
755
|
-
if (DESCRIPTORS$
|
|
698
|
+
if (!hasOwn$5(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
|
|
699
|
+
if (DESCRIPTORS$3) defineProperty$3(value, 'name', { value: name, configurable: true });
|
|
756
700
|
else value.name = name;
|
|
757
701
|
}
|
|
758
|
-
if (CONFIGURABLE_LENGTH && options && hasOwn$
|
|
759
|
-
defineProperty$
|
|
702
|
+
if (CONFIGURABLE_LENGTH && options && hasOwn$5(options, 'arity') && value.length !== options.arity) {
|
|
703
|
+
defineProperty$3(value, 'length', { value: options.arity });
|
|
760
704
|
}
|
|
761
705
|
try {
|
|
762
|
-
if (options && hasOwn$
|
|
763
|
-
if (DESCRIPTORS$
|
|
706
|
+
if (options && hasOwn$5(options, 'constructor') && options.constructor) {
|
|
707
|
+
if (DESCRIPTORS$3) defineProperty$3(value, 'prototype', { writable: false });
|
|
764
708
|
// in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
|
|
765
709
|
} else if (value.prototype) value.prototype = undefined;
|
|
766
710
|
} catch (error) { /* empty */ }
|
|
767
711
|
var state = enforceInternalState(value);
|
|
768
|
-
if (!hasOwn$
|
|
712
|
+
if (!hasOwn$5(state, 'source')) {
|
|
769
713
|
state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
|
|
770
714
|
} return value;
|
|
771
715
|
};
|
|
@@ -847,26 +791,28 @@ var min = Math.min;
|
|
|
847
791
|
// `ToLength` abstract operation
|
|
848
792
|
// https://tc39.es/ecma262/#sec-tolength
|
|
849
793
|
var toLength$1 = function (argument) {
|
|
850
|
-
|
|
794
|
+
var len = toIntegerOrInfinity(argument);
|
|
795
|
+
return len > 0 ? min(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
851
796
|
};
|
|
852
797
|
|
|
853
798
|
var toLength = toLength$1;
|
|
854
799
|
|
|
855
800
|
// `LengthOfArrayLike` abstract operation
|
|
856
801
|
// https://tc39.es/ecma262/#sec-lengthofarraylike
|
|
857
|
-
var lengthOfArrayLike$
|
|
802
|
+
var lengthOfArrayLike$2 = function (obj) {
|
|
858
803
|
return toLength(obj.length);
|
|
859
804
|
};
|
|
860
805
|
|
|
861
806
|
var toIndexedObject$2 = toIndexedObject$4;
|
|
862
807
|
var toAbsoluteIndex = toAbsoluteIndex$1;
|
|
863
|
-
var lengthOfArrayLike = lengthOfArrayLike$
|
|
808
|
+
var lengthOfArrayLike$1 = lengthOfArrayLike$2;
|
|
864
809
|
|
|
865
810
|
// `Array.prototype.{ indexOf, includes }` methods implementation
|
|
866
811
|
var createMethod = function (IS_INCLUDES) {
|
|
867
812
|
return function ($this, el, fromIndex) {
|
|
868
813
|
var O = toIndexedObject$2($this);
|
|
869
|
-
var length = lengthOfArrayLike(O);
|
|
814
|
+
var length = lengthOfArrayLike$1(O);
|
|
815
|
+
if (length === 0) return !IS_INCLUDES && -1;
|
|
870
816
|
var index = toAbsoluteIndex(fromIndex, length);
|
|
871
817
|
var value;
|
|
872
818
|
// Array#includes uses SameValueZero equality algorithm
|
|
@@ -892,7 +838,7 @@ var arrayIncludes = {
|
|
|
892
838
|
};
|
|
893
839
|
|
|
894
840
|
var uncurryThis$3 = functionUncurryThis;
|
|
895
|
-
var hasOwn$
|
|
841
|
+
var hasOwn$4 = hasOwnProperty_1;
|
|
896
842
|
var toIndexedObject$1 = toIndexedObject$4;
|
|
897
843
|
var indexOf = arrayIncludes.indexOf;
|
|
898
844
|
var hiddenKeys$2 = hiddenKeys$4;
|
|
@@ -904,9 +850,9 @@ var objectKeysInternal = function (object, names) {
|
|
|
904
850
|
var i = 0;
|
|
905
851
|
var result = [];
|
|
906
852
|
var key;
|
|
907
|
-
for (key in O) !hasOwn$
|
|
853
|
+
for (key in O) !hasOwn$4(hiddenKeys$2, key) && hasOwn$4(O, key) && push(result, key);
|
|
908
854
|
// Don't enum bug & hidden keys
|
|
909
|
-
while (names.length > i) if (hasOwn$
|
|
855
|
+
while (names.length > i) if (hasOwn$4(O, key = names[i++])) {
|
|
910
856
|
~indexOf(result, key) || push(result, key);
|
|
911
857
|
}
|
|
912
858
|
return result;
|
|
@@ -955,7 +901,7 @@ var ownKeys$1 = getBuiltIn$1('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
|
955
901
|
return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
|
|
956
902
|
};
|
|
957
903
|
|
|
958
|
-
var hasOwn$
|
|
904
|
+
var hasOwn$3 = hasOwnProperty_1;
|
|
959
905
|
var ownKeys = ownKeys$1;
|
|
960
906
|
var getOwnPropertyDescriptorModule$1 = objectGetOwnPropertyDescriptor;
|
|
961
907
|
var definePropertyModule$2 = objectDefineProperty;
|
|
@@ -966,13 +912,13 @@ var copyConstructorProperties$1 = function (target, source, exceptions) {
|
|
|
966
912
|
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule$1.f;
|
|
967
913
|
for (var i = 0; i < keys.length; i++) {
|
|
968
914
|
var key = keys[i];
|
|
969
|
-
if (!hasOwn$
|
|
915
|
+
if (!hasOwn$3(target, key) && !(exceptions && hasOwn$3(exceptions, key))) {
|
|
970
916
|
defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
|
971
917
|
}
|
|
972
918
|
}
|
|
973
919
|
};
|
|
974
920
|
|
|
975
|
-
var fails$
|
|
921
|
+
var fails$5 = fails$d;
|
|
976
922
|
var isCallable$2 = isCallable$c;
|
|
977
923
|
|
|
978
924
|
var replacement = /#|\.prototype\./;
|
|
@@ -981,7 +927,7 @@ var isForced$1 = function (feature, detection) {
|
|
|
981
927
|
var value = data[normalize(feature)];
|
|
982
928
|
return value === POLYFILL ? true
|
|
983
929
|
: value === NATIVE ? false
|
|
984
|
-
: isCallable$2(detection) ? fails$
|
|
930
|
+
: isCallable$2(detection) ? fails$5(detection)
|
|
985
931
|
: !!detection;
|
|
986
932
|
};
|
|
987
933
|
|
|
@@ -995,8 +941,8 @@ var POLYFILL = isForced$1.POLYFILL = 'P';
|
|
|
995
941
|
|
|
996
942
|
var isForced_1 = isForced$1;
|
|
997
943
|
|
|
998
|
-
var global$
|
|
999
|
-
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
|
944
|
+
var global$2 = global$b;
|
|
945
|
+
var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
|
|
1000
946
|
var createNonEnumerableProperty = createNonEnumerableProperty$2;
|
|
1001
947
|
var defineBuiltIn = defineBuiltIn$1;
|
|
1002
948
|
var defineGlobalProperty = defineGlobalProperty$3;
|
|
@@ -1024,16 +970,16 @@ var _export = function (options, source) {
|
|
|
1024
970
|
var STATIC = options.stat;
|
|
1025
971
|
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
|
1026
972
|
if (GLOBAL) {
|
|
1027
|
-
target = global$
|
|
973
|
+
target = global$2;
|
|
1028
974
|
} else if (STATIC) {
|
|
1029
|
-
target = global$
|
|
975
|
+
target = global$2[TARGET] || defineGlobalProperty(TARGET, {});
|
|
1030
976
|
} else {
|
|
1031
|
-
target =
|
|
977
|
+
target = global$2[TARGET] && global$2[TARGET].prototype;
|
|
1032
978
|
}
|
|
1033
979
|
if (target) for (key in source) {
|
|
1034
980
|
sourceProperty = source[key];
|
|
1035
981
|
if (options.dontCallGetSet) {
|
|
1036
|
-
descriptor = getOwnPropertyDescriptor(target, key);
|
|
982
|
+
descriptor = getOwnPropertyDescriptor$1(target, key);
|
|
1037
983
|
targetProperty = descriptor && descriptor.value;
|
|
1038
984
|
} else targetProperty = target[key];
|
|
1039
985
|
FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
|
@@ -1050,15 +996,276 @@ var _export = function (options, source) {
|
|
|
1050
996
|
}
|
|
1051
997
|
};
|
|
1052
998
|
|
|
999
|
+
var classof$3 = classofRaw$1;
|
|
1000
|
+
|
|
1001
|
+
// `IsArray` abstract operation
|
|
1002
|
+
// https://tc39.es/ecma262/#sec-isarray
|
|
1003
|
+
// eslint-disable-next-line es/no-array-isarray -- safe
|
|
1004
|
+
var isArray$1 = Array.isArray || function isArray(argument) {
|
|
1005
|
+
return classof$3(argument) === 'Array';
|
|
1006
|
+
};
|
|
1007
|
+
|
|
1008
|
+
var DESCRIPTORS$2 = descriptors;
|
|
1009
|
+
var isArray = isArray$1;
|
|
1010
|
+
|
|
1011
|
+
var $TypeError$2 = TypeError;
|
|
1012
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
1013
|
+
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
1014
|
+
|
|
1015
|
+
// Safari < 13 does not throw an error in this case
|
|
1016
|
+
var SILENT_ON_NON_WRITABLE_LENGTH_SET = DESCRIPTORS$2 && !function () {
|
|
1017
|
+
// makes no sense without proper strict mode support
|
|
1018
|
+
if (this !== undefined) return true;
|
|
1019
|
+
try {
|
|
1020
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
1021
|
+
Object.defineProperty([], 'length', { writable: false }).length = 1;
|
|
1022
|
+
} catch (error) {
|
|
1023
|
+
return error instanceof TypeError;
|
|
1024
|
+
}
|
|
1025
|
+
}();
|
|
1026
|
+
|
|
1027
|
+
var arraySetLength = SILENT_ON_NON_WRITABLE_LENGTH_SET ? function (O, length) {
|
|
1028
|
+
if (isArray(O) && !getOwnPropertyDescriptor(O, 'length').writable) {
|
|
1029
|
+
throw new $TypeError$2('Cannot set read only .length');
|
|
1030
|
+
} return O.length = length;
|
|
1031
|
+
} : function (O, length) {
|
|
1032
|
+
return O.length = length;
|
|
1033
|
+
};
|
|
1034
|
+
|
|
1035
|
+
var $TypeError$1 = TypeError;
|
|
1036
|
+
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
|
|
1037
|
+
|
|
1038
|
+
var doesNotExceedSafeInteger$1 = function (it) {
|
|
1039
|
+
if (it > MAX_SAFE_INTEGER) throw $TypeError$1('Maximum allowed index exceeded');
|
|
1040
|
+
return it;
|
|
1041
|
+
};
|
|
1042
|
+
|
|
1043
|
+
var $$5 = _export;
|
|
1044
|
+
var toObject$2 = toObject$4;
|
|
1045
|
+
var lengthOfArrayLike = lengthOfArrayLike$2;
|
|
1046
|
+
var setArrayLength = arraySetLength;
|
|
1047
|
+
var doesNotExceedSafeInteger = doesNotExceedSafeInteger$1;
|
|
1048
|
+
var fails$4 = fails$d;
|
|
1049
|
+
|
|
1050
|
+
var INCORRECT_TO_LENGTH = fails$4(function () {
|
|
1051
|
+
return [].push.call({ length: 0x100000000 }, 1) !== 4294967297;
|
|
1052
|
+
});
|
|
1053
|
+
|
|
1054
|
+
// V8 <= 121 and Safari <= 15.4; FF < 23 throws InternalError
|
|
1055
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=12681
|
|
1056
|
+
var properErrorOnNonWritableLength = function () {
|
|
1057
|
+
try {
|
|
1058
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
1059
|
+
Object.defineProperty([], 'length', { writable: false }).push();
|
|
1060
|
+
} catch (error) {
|
|
1061
|
+
return error instanceof TypeError;
|
|
1062
|
+
}
|
|
1063
|
+
};
|
|
1064
|
+
|
|
1065
|
+
var FORCED = INCORRECT_TO_LENGTH || !properErrorOnNonWritableLength();
|
|
1066
|
+
|
|
1067
|
+
// `Array.prototype.push` method
|
|
1068
|
+
// https://tc39.es/ecma262/#sec-array.prototype.push
|
|
1069
|
+
$$5({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {
|
|
1070
|
+
// eslint-disable-next-line no-unused-vars -- required for `.length`
|
|
1071
|
+
push: function push(item) {
|
|
1072
|
+
var O = toObject$2(this);
|
|
1073
|
+
var len = lengthOfArrayLike(O);
|
|
1074
|
+
var argCount = arguments.length;
|
|
1075
|
+
doesNotExceedSafeInteger(len + argCount);
|
|
1076
|
+
for (var i = 0; i < argCount; i++) {
|
|
1077
|
+
O[len] = arguments[i];
|
|
1078
|
+
len++;
|
|
1079
|
+
}
|
|
1080
|
+
setArrayLength(O, len);
|
|
1081
|
+
return len;
|
|
1082
|
+
}
|
|
1083
|
+
});
|
|
1084
|
+
|
|
1085
|
+
var internalObjectKeys = objectKeysInternal;
|
|
1086
|
+
var enumBugKeys$1 = enumBugKeys$3;
|
|
1087
|
+
|
|
1088
|
+
// `Object.keys` method
|
|
1089
|
+
// https://tc39.es/ecma262/#sec-object.keys
|
|
1090
|
+
// eslint-disable-next-line es/no-object-keys -- safe
|
|
1091
|
+
var objectKeys$2 = Object.keys || function keys(O) {
|
|
1092
|
+
return internalObjectKeys(O, enumBugKeys$1);
|
|
1093
|
+
};
|
|
1094
|
+
|
|
1095
|
+
var DESCRIPTORS$1 = descriptors;
|
|
1096
|
+
var uncurryThis$1 = functionUncurryThis;
|
|
1097
|
+
var call$1 = functionCall;
|
|
1098
|
+
var fails$3 = fails$d;
|
|
1099
|
+
var objectKeys$1 = objectKeys$2;
|
|
1100
|
+
var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
|
|
1101
|
+
var propertyIsEnumerableModule = objectPropertyIsEnumerable;
|
|
1102
|
+
var toObject$1 = toObject$4;
|
|
1103
|
+
var IndexedObject = indexedObject;
|
|
1104
|
+
|
|
1105
|
+
// eslint-disable-next-line es/no-object-assign -- safe
|
|
1106
|
+
var $assign = Object.assign;
|
|
1107
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
1108
|
+
var defineProperty$2 = Object.defineProperty;
|
|
1109
|
+
var concat = uncurryThis$1([].concat);
|
|
1110
|
+
|
|
1111
|
+
// `Object.assign` method
|
|
1112
|
+
// https://tc39.es/ecma262/#sec-object.assign
|
|
1113
|
+
var objectAssign = !$assign || fails$3(function () {
|
|
1114
|
+
// should have correct order of operations (Edge bug)
|
|
1115
|
+
if (DESCRIPTORS$1 && $assign({ b: 1 }, $assign(defineProperty$2({}, 'a', {
|
|
1116
|
+
enumerable: true,
|
|
1117
|
+
get: function () {
|
|
1118
|
+
defineProperty$2(this, 'b', {
|
|
1119
|
+
value: 3,
|
|
1120
|
+
enumerable: false
|
|
1121
|
+
});
|
|
1122
|
+
}
|
|
1123
|
+
}), { b: 2 })).b !== 1) return true;
|
|
1124
|
+
// should work with symbols and should have deterministic property order (V8 bug)
|
|
1125
|
+
var A = {};
|
|
1126
|
+
var B = {};
|
|
1127
|
+
// eslint-disable-next-line es/no-symbol -- safe
|
|
1128
|
+
var symbol = Symbol('assign detection');
|
|
1129
|
+
var alphabet = 'abcdefghijklmnopqrst';
|
|
1130
|
+
A[symbol] = 7;
|
|
1131
|
+
alphabet.split('').forEach(function (chr) { B[chr] = chr; });
|
|
1132
|
+
return $assign({}, A)[symbol] !== 7 || objectKeys$1($assign({}, B)).join('') !== alphabet;
|
|
1133
|
+
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
|
|
1134
|
+
var T = toObject$1(target);
|
|
1135
|
+
var argumentsLength = arguments.length;
|
|
1136
|
+
var index = 1;
|
|
1137
|
+
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
|
|
1138
|
+
var propertyIsEnumerable = propertyIsEnumerableModule.f;
|
|
1139
|
+
while (argumentsLength > index) {
|
|
1140
|
+
var S = IndexedObject(arguments[index++]);
|
|
1141
|
+
var keys = getOwnPropertySymbols ? concat(objectKeys$1(S), getOwnPropertySymbols(S)) : objectKeys$1(S);
|
|
1142
|
+
var length = keys.length;
|
|
1143
|
+
var j = 0;
|
|
1144
|
+
var key;
|
|
1145
|
+
while (length > j) {
|
|
1146
|
+
key = keys[j++];
|
|
1147
|
+
if (!DESCRIPTORS$1 || call$1(propertyIsEnumerable, S, key)) T[key] = S[key];
|
|
1148
|
+
}
|
|
1149
|
+
} return T;
|
|
1150
|
+
} : $assign;
|
|
1151
|
+
|
|
1152
|
+
var $$4 = _export;
|
|
1153
|
+
var assign = objectAssign;
|
|
1154
|
+
|
|
1155
|
+
// `Object.assign` method
|
|
1156
|
+
// https://tc39.es/ecma262/#sec-object.assign
|
|
1157
|
+
// eslint-disable-next-line es/no-object-assign -- required for testing
|
|
1158
|
+
$$4({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
|
|
1159
|
+
assign: assign
|
|
1160
|
+
});
|
|
1161
|
+
|
|
1162
|
+
/******************************************************************************
|
|
1163
|
+
Copyright (c) Microsoft Corporation.
|
|
1164
|
+
|
|
1165
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
1166
|
+
purpose with or without fee is hereby granted.
|
|
1167
|
+
|
|
1168
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
1169
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
1170
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
1171
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
1172
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
1173
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
1174
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
1175
|
+
***************************************************************************** */
|
|
1176
|
+
|
|
1177
|
+
function __rest(s, e) {
|
|
1178
|
+
var t = {};
|
|
1179
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1180
|
+
t[p] = s[p];
|
|
1181
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
1182
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
1183
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
1184
|
+
t[p[i]] = s[p[i]];
|
|
1185
|
+
}
|
|
1186
|
+
return t;
|
|
1187
|
+
}
|
|
1188
|
+
|
|
1189
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
1190
|
+
var e = new Error(message);
|
|
1191
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
1192
|
+
};
|
|
1193
|
+
|
|
1194
|
+
const initScripts = () => {
|
|
1195
|
+
var _a;
|
|
1196
|
+
const widgetcsslink = document.createElement('link');
|
|
1197
|
+
const link = document.getElementsByTagName('link')[0];
|
|
1198
|
+
const mainUrl = "https://widget.archbee.com/v1";
|
|
1199
|
+
widgetcsslink['rel'] = 'stylesheet';
|
|
1200
|
+
widgetcsslink['href'] = `${mainUrl}/main.css`;
|
|
1201
|
+
if (!link) {
|
|
1202
|
+
document.getElementsByTagName('head')[0].append(widgetcsslink);
|
|
1203
|
+
}
|
|
1204
|
+
(_a = link === null || link === void 0 ? void 0 : link.parentNode) === null || _a === void 0 ? void 0 : _a.appendChild(widgetcsslink);
|
|
1205
|
+
};
|
|
1206
|
+
const initJsScripts = loadingStrategy => {
|
|
1207
|
+
var _a;
|
|
1208
|
+
const mainUrl = "https://widget.archbee.com/v1";
|
|
1209
|
+
let scripttag = document.createElement('script');
|
|
1210
|
+
scripttag['async'] = loadingStrategy === 'lazy';
|
|
1211
|
+
scripttag['src'] = `${mainUrl}/main.js`;
|
|
1212
|
+
const script = document.getElementsByTagName('script')[0];
|
|
1213
|
+
(_a = script === null || script === void 0 ? void 0 : script.parentNode) === null || _a === void 0 ? void 0 : _a.insertBefore(scripttag, script);
|
|
1214
|
+
};
|
|
1215
|
+
const createArchbeeWidget = (spaceId, jwt, shareableToken, loadingStrategy = 'lazy', bubble = 'invisible', bubblePlaceholder, anchor) => {
|
|
1216
|
+
if (!window._archbee) {
|
|
1217
|
+
window._archbee = window._archbee || {
|
|
1218
|
+
queue: [],
|
|
1219
|
+
push: function (event) {
|
|
1220
|
+
window._archbee.queue.push(event);
|
|
1221
|
+
}
|
|
1222
|
+
};
|
|
1223
|
+
window._archbee.push({
|
|
1224
|
+
eventType: 'init',
|
|
1225
|
+
spaceId,
|
|
1226
|
+
jwt,
|
|
1227
|
+
shareableToken,
|
|
1228
|
+
bubble,
|
|
1229
|
+
bubblePlaceholder,
|
|
1230
|
+
anchor
|
|
1231
|
+
});
|
|
1232
|
+
initJsScripts(loadingStrategy);
|
|
1233
|
+
}
|
|
1234
|
+
return window._archbee;
|
|
1235
|
+
};
|
|
1236
|
+
|
|
1237
|
+
var defineProperty$1 = objectDefineProperty.f;
|
|
1238
|
+
var hasOwn$2 = hasOwnProperty_1;
|
|
1239
|
+
var wellKnownSymbol$5 = wellKnownSymbol$7;
|
|
1240
|
+
|
|
1241
|
+
var TO_STRING_TAG$2 = wellKnownSymbol$5('toStringTag');
|
|
1242
|
+
|
|
1243
|
+
var setToStringTag$1 = function (target, TAG, STATIC) {
|
|
1244
|
+
if (target && !STATIC) target = target.prototype;
|
|
1245
|
+
if (target && !hasOwn$2(target, TO_STRING_TAG$2)) {
|
|
1246
|
+
defineProperty$1(target, TO_STRING_TAG$2, { configurable: true, value: TAG });
|
|
1247
|
+
}
|
|
1248
|
+
};
|
|
1249
|
+
|
|
1250
|
+
var $$3 = _export;
|
|
1251
|
+
var global$1 = global$b;
|
|
1252
|
+
var setToStringTag = setToStringTag$1;
|
|
1253
|
+
|
|
1254
|
+
$$3({ global: true }, { Reflect: {} });
|
|
1255
|
+
|
|
1256
|
+
// Reflect[@@toStringTag] property
|
|
1257
|
+
// https://tc39.es/ecma262/#sec-reflect-@@tostringtag
|
|
1258
|
+
setToStringTag(global$1.Reflect, 'Reflect', true);
|
|
1259
|
+
|
|
1053
1260
|
var hasOwn$1 = hasOwnProperty_1;
|
|
1054
1261
|
|
|
1055
1262
|
var isDataDescriptor$1 = function (descriptor) {
|
|
1056
1263
|
return descriptor !== undefined && (hasOwn$1(descriptor, 'value') || hasOwn$1(descriptor, 'writable'));
|
|
1057
1264
|
};
|
|
1058
1265
|
|
|
1059
|
-
var fails$
|
|
1266
|
+
var fails$2 = fails$d;
|
|
1060
1267
|
|
|
1061
|
-
var correctPrototypeGetter = !fails$
|
|
1268
|
+
var correctPrototypeGetter = !fails$2(function () {
|
|
1062
1269
|
function F() { /* empty */ }
|
|
1063
1270
|
F.prototype.constructor = null;
|
|
1064
1271
|
// eslint-disable-next-line es/no-object-getprototypeof -- required for testing
|
|
@@ -1067,7 +1274,7 @@ var correctPrototypeGetter = !fails$3(function () {
|
|
|
1067
1274
|
|
|
1068
1275
|
var hasOwn = hasOwnProperty_1;
|
|
1069
1276
|
var isCallable$1 = isCallable$c;
|
|
1070
|
-
var toObject
|
|
1277
|
+
var toObject = toObject$4;
|
|
1071
1278
|
var sharedKey$1 = sharedKey$3;
|
|
1072
1279
|
var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
|
|
1073
1280
|
|
|
@@ -1079,7 +1286,7 @@ var ObjectPrototype = $Object$1.prototype;
|
|
|
1079
1286
|
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
|
1080
1287
|
// eslint-disable-next-line es/no-object-getprototypeof -- safe
|
|
1081
1288
|
var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf : function (O) {
|
|
1082
|
-
var object = toObject
|
|
1289
|
+
var object = toObject(O);
|
|
1083
1290
|
if (hasOwn(object, IE_PROTO$1)) return object[IE_PROTO$1];
|
|
1084
1291
|
var constructor = object.constructor;
|
|
1085
1292
|
if (isCallable$1(constructor) && object instanceof constructor) {
|
|
@@ -1087,12 +1294,12 @@ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf :
|
|
|
1087
1294
|
} return object instanceof $Object$1 ? ObjectPrototype : null;
|
|
1088
1295
|
};
|
|
1089
1296
|
|
|
1090
|
-
var $$
|
|
1091
|
-
var call
|
|
1297
|
+
var $$2 = _export;
|
|
1298
|
+
var call = functionCall;
|
|
1092
1299
|
var anObject$2 = anObject$5;
|
|
1093
1300
|
var isObject$1 = isObject$7;
|
|
1094
1301
|
var isDataDescriptor = isDataDescriptor$1;
|
|
1095
|
-
var fails$
|
|
1302
|
+
var fails$1 = fails$d;
|
|
1096
1303
|
var definePropertyModule$1 = objectDefineProperty;
|
|
1097
1304
|
var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
|
|
1098
1305
|
var getPrototypeOf = objectGetPrototypeOf;
|
|
@@ -1120,49 +1327,39 @@ function set(target, propertyKey, V /* , receiver */) {
|
|
|
1120
1327
|
} else {
|
|
1121
1328
|
setter = ownDescriptor.set;
|
|
1122
1329
|
if (setter === undefined) return false;
|
|
1123
|
-
call
|
|
1330
|
+
call(setter, receiver, V);
|
|
1124
1331
|
} return true;
|
|
1125
1332
|
}
|
|
1126
1333
|
|
|
1127
1334
|
// MS Edge 17-18 Reflect.set allows setting the property to object
|
|
1128
1335
|
// with non-writable property on the prototype
|
|
1129
|
-
var MS_EDGE_BUG = fails$
|
|
1336
|
+
var MS_EDGE_BUG = fails$1(function () {
|
|
1130
1337
|
var Constructor = function () { /* empty */ };
|
|
1131
1338
|
var object = definePropertyModule$1.f(new Constructor(), 'a', { configurable: true });
|
|
1132
1339
|
// eslint-disable-next-line es/no-reflect -- required for testing
|
|
1133
1340
|
return Reflect.set(Constructor.prototype, 'a', 1, object) !== false;
|
|
1134
1341
|
});
|
|
1135
1342
|
|
|
1136
|
-
$$
|
|
1343
|
+
$$2({ target: 'Reflect', stat: true, forced: MS_EDGE_BUG }, {
|
|
1137
1344
|
set: set
|
|
1138
1345
|
});
|
|
1139
1346
|
|
|
1140
1347
|
var objectDefineProperties = {};
|
|
1141
1348
|
|
|
1142
|
-
var
|
|
1143
|
-
var enumBugKeys$1 = enumBugKeys$3;
|
|
1144
|
-
|
|
1145
|
-
// `Object.keys` method
|
|
1146
|
-
// https://tc39.es/ecma262/#sec-object.keys
|
|
1147
|
-
// eslint-disable-next-line es/no-object-keys -- safe
|
|
1148
|
-
var objectKeys$2 = Object.keys || function keys(O) {
|
|
1149
|
-
return internalObjectKeys(O, enumBugKeys$1);
|
|
1150
|
-
};
|
|
1151
|
-
|
|
1152
|
-
var DESCRIPTORS$1 = descriptors;
|
|
1349
|
+
var DESCRIPTORS = descriptors;
|
|
1153
1350
|
var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
|
|
1154
1351
|
var definePropertyModule = objectDefineProperty;
|
|
1155
1352
|
var anObject$1 = anObject$5;
|
|
1156
1353
|
var toIndexedObject = toIndexedObject$4;
|
|
1157
|
-
var objectKeys
|
|
1354
|
+
var objectKeys = objectKeys$2;
|
|
1158
1355
|
|
|
1159
1356
|
// `Object.defineProperties` method
|
|
1160
1357
|
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
1161
1358
|
// eslint-disable-next-line es/no-object-defineproperties -- safe
|
|
1162
|
-
objectDefineProperties.f = DESCRIPTORS
|
|
1359
|
+
objectDefineProperties.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
1163
1360
|
anObject$1(O);
|
|
1164
1361
|
var props = toIndexedObject(Properties);
|
|
1165
|
-
var keys = objectKeys
|
|
1362
|
+
var keys = objectKeys(Properties);
|
|
1166
1363
|
var length = keys.length;
|
|
1167
1364
|
var index = 0;
|
|
1168
1365
|
var key;
|
|
@@ -1258,9 +1455,9 @@ var objectCreate = Object.create || function create(O, Properties) {
|
|
|
1258
1455
|
return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
|
|
1259
1456
|
};
|
|
1260
1457
|
|
|
1261
|
-
var wellKnownSymbol$4 = wellKnownSymbol$
|
|
1458
|
+
var wellKnownSymbol$4 = wellKnownSymbol$7;
|
|
1262
1459
|
var create = objectCreate;
|
|
1263
|
-
var defineProperty
|
|
1460
|
+
var defineProperty = objectDefineProperty.f;
|
|
1264
1461
|
|
|
1265
1462
|
var UNSCOPABLES = wellKnownSymbol$4('unscopables');
|
|
1266
1463
|
var ArrayPrototype = Array.prototype;
|
|
@@ -1268,7 +1465,7 @@ var ArrayPrototype = Array.prototype;
|
|
|
1268
1465
|
// Array.prototype[@@unscopables]
|
|
1269
1466
|
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
1270
1467
|
if (ArrayPrototype[UNSCOPABLES] === undefined) {
|
|
1271
|
-
defineProperty
|
|
1468
|
+
defineProperty(ArrayPrototype, UNSCOPABLES, {
|
|
1272
1469
|
configurable: true,
|
|
1273
1470
|
value: create(null)
|
|
1274
1471
|
});
|
|
@@ -1279,20 +1476,20 @@ var addToUnscopables$1 = function (key) {
|
|
|
1279
1476
|
ArrayPrototype[UNSCOPABLES][key] = true;
|
|
1280
1477
|
};
|
|
1281
1478
|
|
|
1282
|
-
var $$
|
|
1479
|
+
var $$1 = _export;
|
|
1283
1480
|
var $includes = arrayIncludes.includes;
|
|
1284
|
-
var fails
|
|
1481
|
+
var fails = fails$d;
|
|
1285
1482
|
var addToUnscopables = addToUnscopables$1;
|
|
1286
1483
|
|
|
1287
1484
|
// FF99+ bug
|
|
1288
|
-
var BROKEN_ON_SPARSE = fails
|
|
1485
|
+
var BROKEN_ON_SPARSE = fails(function () {
|
|
1289
1486
|
// eslint-disable-next-line es/no-array-prototype-includes -- detection
|
|
1290
1487
|
return !Array(1).includes();
|
|
1291
1488
|
});
|
|
1292
1489
|
|
|
1293
1490
|
// `Array.prototype.includes` method
|
|
1294
1491
|
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
1295
|
-
$$
|
|
1492
|
+
$$1({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
|
|
1296
1493
|
includes: function includes(el /* , fromIndex = 0 */) {
|
|
1297
1494
|
return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
|
|
1298
1495
|
}
|
|
@@ -1303,7 +1500,7 @@ addToUnscopables('includes');
|
|
|
1303
1500
|
|
|
1304
1501
|
var isObject = isObject$7;
|
|
1305
1502
|
var classof$2 = classofRaw$1;
|
|
1306
|
-
var wellKnownSymbol$3 = wellKnownSymbol$
|
|
1503
|
+
var wellKnownSymbol$3 = wellKnownSymbol$7;
|
|
1307
1504
|
|
|
1308
1505
|
var MATCH$1 = wellKnownSymbol$3('match');
|
|
1309
1506
|
|
|
@@ -1324,7 +1521,7 @@ var notARegexp = function (it) {
|
|
|
1324
1521
|
} return it;
|
|
1325
1522
|
};
|
|
1326
1523
|
|
|
1327
|
-
var wellKnownSymbol$2 = wellKnownSymbol$
|
|
1524
|
+
var wellKnownSymbol$2 = wellKnownSymbol$7;
|
|
1328
1525
|
|
|
1329
1526
|
var TO_STRING_TAG$1 = wellKnownSymbol$2('toStringTag');
|
|
1330
1527
|
var test = {};
|
|
@@ -1336,7 +1533,7 @@ var toStringTagSupport = String(test) === '[object z]';
|
|
|
1336
1533
|
var TO_STRING_TAG_SUPPORT = toStringTagSupport;
|
|
1337
1534
|
var isCallable = isCallable$c;
|
|
1338
1535
|
var classofRaw = classofRaw$1;
|
|
1339
|
-
var wellKnownSymbol$1 = wellKnownSymbol$
|
|
1536
|
+
var wellKnownSymbol$1 = wellKnownSymbol$7;
|
|
1340
1537
|
|
|
1341
1538
|
var TO_STRING_TAG = wellKnownSymbol$1('toStringTag');
|
|
1342
1539
|
var $Object = Object;
|
|
@@ -1372,7 +1569,7 @@ var toString$1 = function (argument) {
|
|
|
1372
1569
|
return $String(argument);
|
|
1373
1570
|
};
|
|
1374
1571
|
|
|
1375
|
-
var wellKnownSymbol = wellKnownSymbol$
|
|
1572
|
+
var wellKnownSymbol = wellKnownSymbol$7;
|
|
1376
1573
|
|
|
1377
1574
|
var MATCH = wellKnownSymbol('match');
|
|
1378
1575
|
|
|
@@ -1388,18 +1585,18 @@ var correctIsRegexpLogic = function (METHOD_NAME) {
|
|
|
1388
1585
|
} return false;
|
|
1389
1586
|
};
|
|
1390
1587
|
|
|
1391
|
-
var
|
|
1392
|
-
var uncurryThis
|
|
1588
|
+
var $ = _export;
|
|
1589
|
+
var uncurryThis = functionUncurryThis;
|
|
1393
1590
|
var notARegExp = notARegexp;
|
|
1394
1591
|
var requireObjectCoercible = requireObjectCoercible$3;
|
|
1395
1592
|
var toString = toString$1;
|
|
1396
1593
|
var correctIsRegExpLogic = correctIsRegexpLogic;
|
|
1397
1594
|
|
|
1398
|
-
var stringIndexOf = uncurryThis
|
|
1595
|
+
var stringIndexOf = uncurryThis(''.indexOf);
|
|
1399
1596
|
|
|
1400
1597
|
// `String.prototype.includes` method
|
|
1401
1598
|
// https://tc39.es/ecma262/#sec-string.prototype.includes
|
|
1402
|
-
|
|
1599
|
+
$({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
|
|
1403
1600
|
includes: function includes(searchString /* , position = 0 */) {
|
|
1404
1601
|
return !!~stringIndexOf(
|
|
1405
1602
|
toString(requireObjectCoercible(this)),
|
|
@@ -1425,101 +1622,45 @@ const hideWidgetEvent = () => {
|
|
|
1425
1622
|
return new CustomEvent(EVENT_TYPE_ENUM.hideWidget);
|
|
1426
1623
|
};
|
|
1427
1624
|
|
|
1428
|
-
const render = (component, cb) => {
|
|
1625
|
+
const render = (component, createContainer, cb) => {
|
|
1626
|
+
createContainer();
|
|
1429
1627
|
const element = document.getElementsByClassName('ab-widget')[0];
|
|
1430
1628
|
ReactDOM.render(jsx(React.StrictMode, {
|
|
1431
1629
|
children: component
|
|
1432
1630
|
}), element, () => cb && cb(element));
|
|
1433
1631
|
};
|
|
1434
1632
|
|
|
1435
|
-
var DESCRIPTORS = descriptors;
|
|
1436
|
-
var uncurryThis = functionUncurryThis;
|
|
1437
|
-
var call = functionCall;
|
|
1438
|
-
var fails = fails$c;
|
|
1439
|
-
var objectKeys = objectKeys$2;
|
|
1440
|
-
var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
|
|
1441
|
-
var propertyIsEnumerableModule = objectPropertyIsEnumerable;
|
|
1442
|
-
var toObject = toObject$3;
|
|
1443
|
-
var IndexedObject = indexedObject;
|
|
1444
|
-
|
|
1445
|
-
// eslint-disable-next-line es/no-object-assign -- safe
|
|
1446
|
-
var $assign = Object.assign;
|
|
1447
|
-
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
1448
|
-
var defineProperty = Object.defineProperty;
|
|
1449
|
-
var concat = uncurryThis([].concat);
|
|
1450
|
-
|
|
1451
|
-
// `Object.assign` method
|
|
1452
|
-
// https://tc39.es/ecma262/#sec-object.assign
|
|
1453
|
-
var objectAssign = !$assign || fails(function () {
|
|
1454
|
-
// should have correct order of operations (Edge bug)
|
|
1455
|
-
if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
|
|
1456
|
-
enumerable: true,
|
|
1457
|
-
get: function () {
|
|
1458
|
-
defineProperty(this, 'b', {
|
|
1459
|
-
value: 3,
|
|
1460
|
-
enumerable: false
|
|
1461
|
-
});
|
|
1462
|
-
}
|
|
1463
|
-
}), { b: 2 })).b !== 1) return true;
|
|
1464
|
-
// should work with symbols and should have deterministic property order (V8 bug)
|
|
1465
|
-
var A = {};
|
|
1466
|
-
var B = {};
|
|
1467
|
-
// eslint-disable-next-line es/no-symbol -- safe
|
|
1468
|
-
var symbol = Symbol('assign detection');
|
|
1469
|
-
var alphabet = 'abcdefghijklmnopqrst';
|
|
1470
|
-
A[symbol] = 7;
|
|
1471
|
-
alphabet.split('').forEach(function (chr) { B[chr] = chr; });
|
|
1472
|
-
return $assign({}, A)[symbol] !== 7 || objectKeys($assign({}, B)).join('') !== alphabet;
|
|
1473
|
-
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
|
|
1474
|
-
var T = toObject(target);
|
|
1475
|
-
var argumentsLength = arguments.length;
|
|
1476
|
-
var index = 1;
|
|
1477
|
-
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
|
|
1478
|
-
var propertyIsEnumerable = propertyIsEnumerableModule.f;
|
|
1479
|
-
while (argumentsLength > index) {
|
|
1480
|
-
var S = IndexedObject(arguments[index++]);
|
|
1481
|
-
var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
|
|
1482
|
-
var length = keys.length;
|
|
1483
|
-
var j = 0;
|
|
1484
|
-
var key;
|
|
1485
|
-
while (length > j) {
|
|
1486
|
-
key = keys[j++];
|
|
1487
|
-
if (!DESCRIPTORS || call(propertyIsEnumerable, S, key)) T[key] = S[key];
|
|
1488
|
-
}
|
|
1489
|
-
} return T;
|
|
1490
|
-
} : $assign;
|
|
1491
|
-
|
|
1492
|
-
var $ = _export;
|
|
1493
|
-
var assign = objectAssign;
|
|
1494
|
-
|
|
1495
|
-
// `Object.assign` method
|
|
1496
|
-
// https://tc39.es/ecma262/#sec-object.assign
|
|
1497
|
-
// eslint-disable-next-line es/no-object-assign -- required for testing
|
|
1498
|
-
$({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
|
|
1499
|
-
assign: assign
|
|
1500
|
-
});
|
|
1501
|
-
|
|
1502
1633
|
const setWidget = widget => {
|
|
1503
1634
|
window._archbee.widget = Object.assign({}, widget);
|
|
1504
1635
|
window._archbee.widget.isOpen = false;
|
|
1505
1636
|
};
|
|
1506
1637
|
const loadWidget = (widg, render) => {
|
|
1638
|
+
var _a;
|
|
1507
1639
|
if (typeof document.addEventListener !== 'function') {
|
|
1508
1640
|
return;
|
|
1509
1641
|
}
|
|
1510
|
-
window._archbee.widget = Object.assign(Object.assign({}, window._archbee.widget), widg);
|
|
1642
|
+
window._archbee.widget = Object.assign(Object.assign({}, (_a = window._archbee) === null || _a === void 0 ? void 0 : _a.widget), widg);
|
|
1511
1643
|
try {
|
|
1512
|
-
render(widg.onRenderFinish);
|
|
1644
|
+
render(createContainer, widg.onRenderFinish);
|
|
1513
1645
|
} catch (err) {
|
|
1514
1646
|
console.log(err);
|
|
1515
1647
|
}
|
|
1516
1648
|
};
|
|
1517
1649
|
const createContainer = () => {
|
|
1650
|
+
var _a;
|
|
1518
1651
|
if (document.getElementsByClassName('ab-widget').length) return;
|
|
1652
|
+
const widget = (_a = window._archbee) === null || _a === void 0 ? void 0 : _a.widget;
|
|
1519
1653
|
const abDiv = document.createElement('div');
|
|
1520
|
-
abDiv.style.cssText =
|
|
1654
|
+
abDiv.style.cssText = `visibility:hidden;${widget.bubble === 'ask' ? '' : 'z-index:-2147483001;'}`;
|
|
1521
1655
|
abDiv.className = `ab-widget ab-id-${Date.now()}`;
|
|
1522
|
-
|
|
1656
|
+
if (!(widget === null || widget === void 0 ? void 0 : widget.anchor)) {
|
|
1657
|
+
document.body.appendChild(abDiv);
|
|
1658
|
+
return;
|
|
1659
|
+
}
|
|
1660
|
+
const anchor = document.querySelector(widget === null || widget === void 0 ? void 0 : widget.anchor);
|
|
1661
|
+
if (!anchor) return;
|
|
1662
|
+
abDiv.className = `${abDiv.className} ab-absolute`;
|
|
1663
|
+
anchor.appendChild(abDiv);
|
|
1523
1664
|
};
|
|
1524
1665
|
|
|
1525
1666
|
const registerProxy = component => {
|
|
@@ -1584,25 +1725,29 @@ const iterateProxy = (proxy, component) => {
|
|
|
1584
1725
|
});
|
|
1585
1726
|
};
|
|
1586
1727
|
|
|
1587
|
-
const ArchbeeAppWidget = /*#__PURE__*/forwardRef(({
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1728
|
+
const ArchbeeAppWidget = /*#__PURE__*/forwardRef((_a, ref) => {
|
|
1729
|
+
var {
|
|
1730
|
+
className,
|
|
1731
|
+
spaceId,
|
|
1732
|
+
jwt,
|
|
1733
|
+
shareableToken,
|
|
1734
|
+
docId,
|
|
1735
|
+
blockId,
|
|
1736
|
+
widgetType = 'docs',
|
|
1737
|
+
loadingStrategy = 'lazy',
|
|
1738
|
+
onWidgetOpen,
|
|
1739
|
+
onWidgetClose,
|
|
1740
|
+
bubble,
|
|
1741
|
+
bubblePlaceholder,
|
|
1742
|
+
anchor,
|
|
1743
|
+
children
|
|
1744
|
+
} = _a,
|
|
1745
|
+
rest = __rest(_a, ["className", "spaceId", "jwt", "shareableToken", "docId", "blockId", "widgetType", "loadingStrategy", "onWidgetOpen", "onWidgetClose", "bubble", "bubblePlaceholder", "anchor", "children"]);
|
|
1601
1746
|
const elementRef = useRef(null);
|
|
1602
1747
|
const widgetInstance = useMemo(() => {
|
|
1603
1748
|
if (typeof window === 'undefined') return;
|
|
1604
|
-
return createArchbeeWidget(spaceId, jwt, shareableToken,
|
|
1605
|
-
}, [spaceId, jwt, shareableToken,
|
|
1749
|
+
return createArchbeeWidget(spaceId, jwt, shareableToken, loadingStrategy, bubble, bubblePlaceholder, anchor);
|
|
1750
|
+
}, [spaceId, jwt, shareableToken, loadingStrategy, bubble, bubblePlaceholder, anchor]);
|
|
1606
1751
|
useImperativeHandle(ref, () => {
|
|
1607
1752
|
return {
|
|
1608
1753
|
open: onOpenWidget,
|
|
@@ -1613,7 +1758,7 @@ const ArchbeeAppWidget = /*#__PURE__*/forwardRef(({
|
|
|
1613
1758
|
const onOpenWidget = () => {
|
|
1614
1759
|
widgetInstance === null || widgetInstance === void 0 ? void 0 : widgetInstance.push({
|
|
1615
1760
|
eventType: 'show-widget',
|
|
1616
|
-
widgetType
|
|
1761
|
+
widgetType,
|
|
1617
1762
|
docId,
|
|
1618
1763
|
blockId
|
|
1619
1764
|
});
|
|
@@ -1632,12 +1777,13 @@ const ArchbeeAppWidget = /*#__PURE__*/forwardRef(({
|
|
|
1632
1777
|
onOpenWidget();
|
|
1633
1778
|
}
|
|
1634
1779
|
};
|
|
1635
|
-
return jsx("div", {
|
|
1780
|
+
return jsx("div", Object.assign({
|
|
1636
1781
|
className: className !== null && className !== void 0 ? className : '',
|
|
1637
1782
|
ref: elementRef,
|
|
1638
|
-
onClick: onElementClicked
|
|
1783
|
+
onClick: onElementClicked
|
|
1784
|
+
}, rest, {
|
|
1639
1785
|
children: children
|
|
1640
|
-
});
|
|
1786
|
+
}));
|
|
1641
1787
|
});
|
|
1642
1788
|
|
|
1643
1789
|
export { ArchbeeAppWidget, EVENT_TYPE_ENUM, EVENT_TYPE_LIST, createArchbeeWidget, createContainer, hideWidgetEvent, initJsScripts, initScripts, iterateProxy, loadWidget, registerProxy, render, setWidget, showWidgetEvent };
|