@myinterview/widget-react 1.1.23-revert-dev-deps-001 → 1.1.23-svg-check

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/esm/index.js CHANGED
@@ -2,31 +2,6 @@ import * as React from 'react';
2
2
  import React__default, { createContext, forwardRef, useRef, useEffect, useState, useLayoutEffect, useImperativeHandle, useDebugValue, useContext, createElement, useCallback, useMemo } from 'react';
3
3
  import { createPortal } from 'react-dom';
4
4
 
5
- /*! *****************************************************************************
6
- Copyright (c) Microsoft Corporation.
7
-
8
- Permission to use, copy, modify, and/or distribute this software for any
9
- purpose with or without fee is hereby granted.
10
-
11
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
12
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
13
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
14
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
15
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
16
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17
- PERFORMANCE OF THIS SOFTWARE.
18
- ***************************************************************************** */
19
-
20
- function __awaiter(thisArg, _arguments, P, generator) {
21
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
22
- return new (P || (P = Promise))(function (resolve, reject) {
23
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
24
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
25
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
26
- step((generator = generator.apply(thisArg, _arguments || [])).next());
27
- });
28
- }
29
-
30
5
  // eslint-disable-next-line @typescript-eslint/unbound-method
31
6
  const objectToString = Object.prototype.toString;
32
7
 
@@ -395,21 +370,85 @@ function getLocationHref() {
395
370
  }
396
371
  }
397
372
 
398
- /** An error emitted by Sentry SDKs and related utilities. */
399
- class SentryError extends Error {
400
- /** Display name of this error instance. */
373
+ /** Prefix for logging strings */
374
+ const PREFIX = 'Sentry Logger ';
401
375
 
402
- constructor( message, logLevel = 'warn') {
403
- super(message);this.message = message;
404
- this.name = new.target.prototype.constructor.name;
405
- // This sets the prototype to be `Error`, not `SentryError`. It's unclear why we do this, but commenting this line
406
- // out causes various (seemingly totally unrelated) playwright tests consistently time out. FYI, this makes
407
- // instances of `SentryError` fail `obj instanceof SentryError` checks.
408
- Object.setPrototypeOf(this, new.target.prototype);
409
- this.logLevel = logLevel;
376
+ const CONSOLE_LEVELS = ['debug', 'info', 'warn', 'error', 'log', 'assert', 'trace'] ;
377
+
378
+ /**
379
+ * Temporarily disable sentry console instrumentations.
380
+ *
381
+ * @param callback The function to run against the original `console` messages
382
+ * @returns The results of the callback
383
+ */
384
+ function consoleSandbox(callback) {
385
+ if (!('console' in GLOBAL_OBJ)) {
386
+ return callback();
387
+ }
388
+
389
+ const originalConsole = GLOBAL_OBJ.console ;
390
+ const wrappedLevels = {};
391
+
392
+ // Restore all wrapped console methods
393
+ CONSOLE_LEVELS.forEach(level => {
394
+ // TODO(v7): Remove this check as it's only needed for Node 6
395
+ const originalWrappedFunc =
396
+ originalConsole[level] && (originalConsole[level] ).__sentry_original__;
397
+ if (level in originalConsole && originalWrappedFunc) {
398
+ wrappedLevels[level] = originalConsole[level] ;
399
+ originalConsole[level] = originalWrappedFunc ;
400
+ }
401
+ });
402
+
403
+ try {
404
+ return callback();
405
+ } finally {
406
+ // Revert restoration to wrapped state
407
+ Object.keys(wrappedLevels).forEach(level => {
408
+ originalConsole[level] = wrappedLevels[level ];
409
+ });
410
410
  }
411
411
  }
412
412
 
413
+ function makeLogger() {
414
+ let enabled = false;
415
+ const logger = {
416
+ enable: () => {
417
+ enabled = true;
418
+ },
419
+ disable: () => {
420
+ enabled = false;
421
+ },
422
+ };
423
+
424
+ if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {
425
+ CONSOLE_LEVELS.forEach(name => {
426
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
427
+ logger[name] = (...args) => {
428
+ if (enabled) {
429
+ consoleSandbox(() => {
430
+ GLOBAL_OBJ.console[name](`${PREFIX}[${name}]:`, ...args);
431
+ });
432
+ }
433
+ };
434
+ });
435
+ } else {
436
+ CONSOLE_LEVELS.forEach(name => {
437
+ logger[name] = () => undefined;
438
+ });
439
+ }
440
+
441
+ return logger ;
442
+ }
443
+
444
+ // Ensure we only have a single logger instance, even if multiple versions of @sentry/utils are being used
445
+ let logger;
446
+ if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {
447
+ logger = getGlobalSingleton('logger', makeLogger);
448
+ } else {
449
+ logger = makeLogger();
450
+ }
451
+
413
452
  /** Regular expression used to parse a Dsn. */
414
453
  const DSN_REGEX = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;
415
454
 
@@ -438,13 +477,16 @@ function dsnToString(dsn, withPassword = false) {
438
477
  * Parses a Dsn from a given string.
439
478
  *
440
479
  * @param str A Dsn as string
441
- * @returns Dsn as DsnComponents
480
+ * @returns Dsn as DsnComponents or undefined if @param str is not a valid DSN string
442
481
  */
443
482
  function dsnFromString(str) {
444
483
  const match = DSN_REGEX.exec(str);
445
484
 
446
485
  if (!match) {
447
- throw new SentryError(`Invalid Sentry Dsn: ${str}`);
486
+ // This should be logged to the console
487
+ // eslint-disable-next-line no-console
488
+ console.error(`Invalid Sentry Dsn: ${str}`);
489
+ return undefined;
448
490
  }
449
491
 
450
492
  const [protocol, publicKey, pass = '', host, port = '', lastPath] = match.slice(1);
@@ -481,117 +523,67 @@ function dsnFromComponents(components) {
481
523
 
482
524
  function validateDsn(dsn) {
483
525
  if (!(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {
484
- return;
526
+ return true;
485
527
  }
486
528
 
487
529
  const { port, projectId, protocol } = dsn;
488
530
 
489
531
  const requiredComponents = ['protocol', 'publicKey', 'host', 'projectId'];
490
- requiredComponents.forEach(component => {
532
+ const hasMissingRequiredComponent = requiredComponents.find(component => {
491
533
  if (!dsn[component]) {
492
- throw new SentryError(`Invalid Sentry Dsn: ${component} missing`);
534
+ logger.error(`Invalid Sentry Dsn: ${component} missing`);
535
+ return true;
493
536
  }
537
+ return false;
494
538
  });
495
539
 
540
+ if (hasMissingRequiredComponent) {
541
+ return false;
542
+ }
543
+
496
544
  if (!projectId.match(/^\d+$/)) {
497
- throw new SentryError(`Invalid Sentry Dsn: Invalid projectId ${projectId}`);
545
+ logger.error(`Invalid Sentry Dsn: Invalid projectId ${projectId}`);
546
+ return false;
498
547
  }
499
548
 
500
549
  if (!isValidProtocol(protocol)) {
501
- throw new SentryError(`Invalid Sentry Dsn: Invalid protocol ${protocol}`);
550
+ logger.error(`Invalid Sentry Dsn: Invalid protocol ${protocol}`);
551
+ return false;
502
552
  }
503
553
 
504
554
  if (port && isNaN(parseInt(port, 10))) {
505
- throw new SentryError(`Invalid Sentry Dsn: Invalid port ${port}`);
555
+ logger.error(`Invalid Sentry Dsn: Invalid port ${port}`);
556
+ return false;
506
557
  }
507
558
 
508
559
  return true;
509
560
  }
510
561
 
511
- /** The Sentry Dsn, identifying a Sentry instance and project. */
512
- function makeDsn(from) {
513
- const components = typeof from === 'string' ? dsnFromString(from) : dsnFromComponents(from);
514
- validateDsn(components);
515
- return components;
516
- }
517
-
518
- /** Prefix for logging strings */
519
- const PREFIX = 'Sentry Logger ';
520
-
521
- const CONSOLE_LEVELS = ['debug', 'info', 'warn', 'error', 'log', 'assert', 'trace'] ;
522
-
523
562
  /**
524
- * Temporarily disable sentry console instrumentations.
525
- *
526
- * @param callback The function to run against the original `console` messages
527
- * @returns The results of the callback
563
+ * Creates a valid Sentry Dsn object, identifying a Sentry instance and project.
564
+ * @returns a valid DsnComponents object or `undefined` if @param from is an invalid DSN source
528
565
  */
529
- function consoleSandbox(callback) {
530
- if (!('console' in GLOBAL_OBJ)) {
531
- return callback();
532
- }
533
-
534
- const originalConsole = GLOBAL_OBJ.console ;
535
- const wrappedLevels = {};
536
-
537
- // Restore all wrapped console methods
538
- CONSOLE_LEVELS.forEach(level => {
539
- // TODO(v7): Remove this check as it's only needed for Node 6
540
- const originalWrappedFunc =
541
- originalConsole[level] && (originalConsole[level] ).__sentry_original__;
542
- if (level in originalConsole && originalWrappedFunc) {
543
- wrappedLevels[level] = originalConsole[level] ;
544
- originalConsole[level] = originalWrappedFunc ;
545
- }
546
- });
547
-
548
- try {
549
- return callback();
550
- } finally {
551
- // Revert restoration to wrapped state
552
- Object.keys(wrappedLevels).forEach(level => {
553
- originalConsole[level] = wrappedLevels[level ];
554
- });
566
+ function makeDsn(from) {
567
+ const components = typeof from === 'string' ? dsnFromString(from) : dsnFromComponents(from);
568
+ if (!components || !validateDsn(components)) {
569
+ return undefined;
555
570
  }
571
+ return components;
556
572
  }
557
573
 
558
- function makeLogger() {
559
- let enabled = false;
560
- const logger = {
561
- enable: () => {
562
- enabled = true;
563
- },
564
- disable: () => {
565
- enabled = false;
566
- },
567
- };
574
+ /** An error emitted by Sentry SDKs and related utilities. */
575
+ class SentryError extends Error {
576
+ /** Display name of this error instance. */
568
577
 
569
- if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {
570
- CONSOLE_LEVELS.forEach(name => {
571
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
572
- logger[name] = (...args) => {
573
- if (enabled) {
574
- consoleSandbox(() => {
575
- GLOBAL_OBJ.console[name](`${PREFIX}[${name}]:`, ...args);
576
- });
577
- }
578
- };
579
- });
580
- } else {
581
- CONSOLE_LEVELS.forEach(name => {
582
- logger[name] = () => undefined;
583
- });
578
+ constructor( message, logLevel = 'warn') {
579
+ super(message);this.message = message;
580
+ this.name = new.target.prototype.constructor.name;
581
+ // This sets the prototype to be `Error`, not `SentryError`. It's unclear why we do this, but commenting this line
582
+ // out causes various (seemingly totally unrelated) playwright tests consistently time out. FYI, this makes
583
+ // instances of `SentryError` fail `obj instanceof SentryError` checks.
584
+ Object.setPrototypeOf(this, new.target.prototype);
585
+ this.logLevel = logLevel;
584
586
  }
585
-
586
- return logger ;
587
- }
588
-
589
- // Ensure we only have a single logger instance, even if multiple versions of @sentry/utils are being used
590
- let logger;
591
- if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {
592
- logger = getGlobalSingleton('logger', makeLogger);
593
- } else {
594
- logger = makeLogger();
595
587
  }
596
588
 
597
589
  /**
@@ -5091,16 +5083,20 @@ class BaseClient {
5091
5083
  */
5092
5084
  constructor(options) {BaseClient.prototype.__init.call(this);BaseClient.prototype.__init2.call(this);BaseClient.prototype.__init3.call(this);BaseClient.prototype.__init4.call(this);BaseClient.prototype.__init5.call(this);
5093
5085
  this._options = options;
5086
+
5094
5087
  if (options.dsn) {
5095
5088
  this._dsn = makeDsn(options.dsn);
5089
+ } else {
5090
+ (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('No DSN provided, client will not do anything.');
5091
+ }
5092
+
5093
+ if (this._dsn) {
5096
5094
  const url = getEnvelopeEndpointWithUrlEncodedAuth(this._dsn, options);
5097
5095
  this._transport = options.transport({
5098
5096
  recordDroppedEvent: this.recordDroppedEvent.bind(this),
5099
5097
  ...options.transportOptions,
5100
5098
  url,
5101
5099
  });
5102
- } else {
5103
- (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('No DSN provided, client will not do anything.');
5104
5100
  }
5105
5101
  }
5106
5102
 
@@ -5819,7 +5815,7 @@ function getEventForEnvelopeItem(item, type) {
5819
5815
  return Array.isArray(item) ? (item )[1] : undefined;
5820
5816
  }
5821
5817
 
5822
- const SDK_VERSION = '7.52.1';
5818
+ const SDK_VERSION = '7.53.0';
5823
5819
 
5824
5820
  let originalFunctionToString;
5825
5821
 
@@ -6052,9 +6048,9 @@ function _getEventFilterUrl(event) {
6052
6048
  }
6053
6049
 
6054
6050
  var Integrations = /*#__PURE__*/Object.freeze({
6055
- __proto__: null,
6056
- FunctionToString: FunctionToString,
6057
- InboundFilters: InboundFilters
6051
+ __proto__: null,
6052
+ FunctionToString: FunctionToString,
6053
+ InboundFilters: InboundFilters
6058
6054
  });
6059
6055
 
6060
6056
  const WINDOW$1 = GLOBAL_OBJ ;
@@ -8278,13 +8274,13 @@ function startSessionTracking() {
8278
8274
  }
8279
8275
 
8280
8276
  var index$1 = /*#__PURE__*/Object.freeze({
8281
- __proto__: null,
8282
- GlobalHandlers: GlobalHandlers,
8283
- TryCatch: TryCatch,
8284
- Breadcrumbs: Breadcrumbs,
8285
- LinkedErrors: LinkedErrors,
8286
- HttpContext: HttpContext,
8287
- Dedupe: Dedupe
8277
+ __proto__: null,
8278
+ GlobalHandlers: GlobalHandlers,
8279
+ TryCatch: TryCatch,
8280
+ Breadcrumbs: Breadcrumbs,
8281
+ LinkedErrors: LinkedErrors,
8282
+ HttpContext: HttpContext,
8283
+ Dedupe: Dedupe
8288
8284
  });
8289
8285
 
8290
8286
  // exporting a separate copy of `WINDOW` rather than exporting the one from `@sentry/browser`
@@ -11571,6 +11567,23 @@ var NodeType;
11571
11567
  NodeType[NodeType["Comment"] = 5] = "Comment";
11572
11568
  })(NodeType || (NodeType = {}));
11573
11569
 
11570
+ /* eslint-disable @typescript-eslint/naming-convention */
11571
+
11572
+ var EventType; (function (EventType) {
11573
+ const DomContentLoaded = 0; EventType[EventType["DomContentLoaded"] = DomContentLoaded] = "DomContentLoaded";
11574
+ const Load = 1; EventType[EventType["Load"] = Load] = "Load";
11575
+ const FullSnapshot = 2; EventType[EventType["FullSnapshot"] = FullSnapshot] = "FullSnapshot";
11576
+ const IncrementalSnapshot = 3; EventType[EventType["IncrementalSnapshot"] = IncrementalSnapshot] = "IncrementalSnapshot";
11577
+ const Meta = 4; EventType[EventType["Meta"] = Meta] = "Meta";
11578
+ const Custom = 5; EventType[EventType["Custom"] = Custom] = "Custom";
11579
+ const Plugin = 6; EventType[EventType["Plugin"] = Plugin] = "Plugin";
11580
+ })(EventType || (EventType = {}));
11581
+
11582
+ /**
11583
+ * This is a partial copy of rrweb's eventWithTime type which only contains the properties
11584
+ * we specifcally need in the SDK.
11585
+ */
11586
+
11574
11587
  /**
11575
11588
  * Converts a timestamp to ms, if it was in s, or keeps it as ms.
11576
11589
  */
@@ -11613,7 +11626,18 @@ async function addEvent(
11613
11626
  replay.eventBuffer.clear();
11614
11627
  }
11615
11628
 
11616
- return await replay.eventBuffer.addEvent(event);
11629
+ const replayOptions = replay.getOptions();
11630
+
11631
+ const eventAfterPossibleCallback =
11632
+ typeof replayOptions.beforeAddRecordingEvent === 'function' && event.type === EventType.Custom
11633
+ ? replayOptions.beforeAddRecordingEvent(event)
11634
+ : event;
11635
+
11636
+ if (!eventAfterPossibleCallback) {
11637
+ return;
11638
+ }
11639
+
11640
+ return await replay.eventBuffer.addEvent(eventAfterPossibleCallback);
11617
11641
  } catch (error) {
11618
11642
  (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error(error);
11619
11643
  await replay.stop('addEvent');
@@ -14589,23 +14613,6 @@ function debounce(func, wait, options) {
14589
14613
  return debounced;
14590
14614
  }
14591
14615
 
14592
- /* eslint-disable @typescript-eslint/naming-convention */
14593
-
14594
- var EventType; (function (EventType) {
14595
- const DomContentLoaded = 0; EventType[EventType["DomContentLoaded"] = DomContentLoaded] = "DomContentLoaded";
14596
- const Load = 1; EventType[EventType["Load"] = Load] = "Load";
14597
- const FullSnapshot = 2; EventType[EventType["FullSnapshot"] = FullSnapshot] = "FullSnapshot";
14598
- const IncrementalSnapshot = 3; EventType[EventType["IncrementalSnapshot"] = IncrementalSnapshot] = "IncrementalSnapshot";
14599
- const Meta = 4; EventType[EventType["Meta"] = Meta] = "Meta";
14600
- const Custom = 5; EventType[EventType["Custom"] = Custom] = "Custom";
14601
- const Plugin = 6; EventType[EventType["Plugin"] = Plugin] = "Plugin";
14602
- })(EventType || (EventType = {}));
14603
-
14604
- /**
14605
- * This is a partial copy of rrweb's eventWithTime type which only contains the properties
14606
- * we specifcally need in the SDK.
14607
- */
14608
-
14609
14616
  /**
14610
14617
  * Handler for recording events.
14611
14618
  *
@@ -14679,6 +14686,30 @@ function getHandleRecordingEmit(replay) {
14679
14686
  }
14680
14687
  }
14681
14688
 
14689
+ const options = replay.getOptions();
14690
+
14691
+ // TODO: We want this as an experiment so that we can test
14692
+ // internally and create metrics before making this the default
14693
+ if (options._experiments.delayFlushOnCheckout) {
14694
+ // If the full snapshot is due to an initial load, we will not have
14695
+ // a previous session ID. In this case, we want to buffer events
14696
+ // for a set amount of time before flushing. This can help avoid
14697
+ // capturing replays of users that immediately close the window.
14698
+ setTimeout(() => replay.conditionalFlush(), options._experiments.delayFlushOnCheckout);
14699
+
14700
+ // Cancel any previously debounced flushes to ensure there are no [near]
14701
+ // simultaneous flushes happening. The latter request should be
14702
+ // insignificant in this case, so wait for additional user interaction to
14703
+ // trigger a new flush.
14704
+ //
14705
+ // This can happen because there's no guarantee that a recording event
14706
+ // happens first. e.g. a mouse click can happen and trigger a debounced
14707
+ // flush before the checkout.
14708
+ replay.cancelFlush();
14709
+
14710
+ return true;
14711
+ }
14712
+
14682
14713
  // Flush immediately so that we do not miss the first segment, otherwise
14683
14714
  // it can prevent loading on the UI. This will cause an increase in short
14684
14715
  // replays (e.g. opening and closing a tab quickly), but these can be
@@ -15444,7 +15475,17 @@ class ReplayContainer {
15444
15475
  }
15445
15476
 
15446
15477
  /**
15447
- *
15478
+ * Only flush if `this.recordingMode === 'session'`
15479
+ */
15480
+ conditionalFlush() {
15481
+ if (this.recordingMode === 'buffer') {
15482
+ return Promise.resolve();
15483
+ }
15484
+
15485
+ return this.flushImmediate();
15486
+ }
15487
+
15488
+ /**
15448
15489
  * Always flush via `_debouncedFlush` so that we do not have flushes triggered
15449
15490
  * from calling both `flush` and `_debouncedFlush`. Otherwise, there could be
15450
15491
  * cases of mulitple flushes happening closely together.
@@ -15455,6 +15496,13 @@ class ReplayContainer {
15455
15496
  return this._debouncedFlush.flush() ;
15456
15497
  }
15457
15498
 
15499
+ /**
15500
+ * Cancels queued up flushes.
15501
+ */
15502
+ cancelFlush() {
15503
+ this._debouncedFlush.cancel();
15504
+ }
15505
+
15458
15506
  /** Get the current sesion (=replay) ID */
15459
15507
  getSessionId() {
15460
15508
  return this.session && this.session.id;
@@ -15704,7 +15752,7 @@ class ReplayContainer {
15704
15752
  // Send replay when the page/tab becomes hidden. There is no reason to send
15705
15753
  // replay if it becomes visible, since no actions we care about were done
15706
15754
  // while it was hidden
15707
- this._conditionalFlush();
15755
+ void this.conditionalFlush();
15708
15756
  }
15709
15757
 
15710
15758
  /**
@@ -15788,17 +15836,6 @@ class ReplayContainer {
15788
15836
  return Promise.all(createPerformanceSpans(this, createPerformanceEntries(entries)));
15789
15837
  }
15790
15838
 
15791
- /**
15792
- * Only flush if `this.recordingMode === 'session'`
15793
- */
15794
- _conditionalFlush() {
15795
- if (this.recordingMode === 'buffer') {
15796
- return;
15797
- }
15798
-
15799
- void this.flushImmediate();
15800
- }
15801
-
15802
15839
  /**
15803
15840
  * Clear _context
15804
15841
  */
@@ -16160,6 +16197,8 @@ class Replay {
16160
16197
  ignore = [],
16161
16198
  maskFn,
16162
16199
 
16200
+ beforeAddRecordingEvent,
16201
+
16163
16202
  // eslint-disable-next-line deprecation/deprecation
16164
16203
  blockClass,
16165
16204
  // eslint-disable-next-line deprecation/deprecation
@@ -16217,6 +16256,7 @@ class Replay {
16217
16256
  networkCaptureBodies,
16218
16257
  networkRequestHeaders: _getMergedNetworkHeaders(networkRequestHeaders),
16219
16258
  networkResponseHeaders: _getMergedNetworkHeaders(networkResponseHeaders),
16259
+ beforeAddRecordingEvent,
16220
16260
 
16221
16261
  _experiments,
16222
16262
  };
@@ -25585,7 +25625,6 @@ var STATES$5;
25585
25625
  STATES["RE_INIT_RECORDER__NEXT_QUESTION"] = "reInitRecorderNextQuestion";
25586
25626
  STATES["UPLOADING"] = "uploading";
25587
25627
  STATES["CONFIRM"] = "confirm";
25588
- STATES["CONFIRM_WATING"] = "confirmWaiting";
25589
25628
  STATES["FINISHED"] = "finished";
25590
25629
  STATES["ERROR"] = "error";
25591
25630
  })(STATES$5 || (STATES$5 = {}));
@@ -25639,7 +25678,6 @@ var ACTIONS$6;
25639
25678
  ACTIONS["RESET_FAILED_RECORDING_ATTEMPTS"] = "resetFailedRecordingAttempts";
25640
25679
  ACTIONS["CLEAR_VIDEO_ERROR"] = "clearVideoError";
25641
25680
  ACTIONS["UPDATE_VIDEO_DIMENSIONS"] = "updateVideoDimensions";
25642
- ACTIONS["UPDATE_UPLOADED_FALSE_COUNT"] = "updateUploadedFalseCount";
25643
25681
  })(ACTIONS$6 || (ACTIONS$6 = {}));
25644
25682
  var EVENTS$5;
25645
25683
  (function (EVENTS) {
@@ -25695,7 +25733,6 @@ var GUARDS$3;
25695
25733
  GUARDS["IS_RECORDER_READY"] = "isRecorderReady";
25696
25734
  GUARDS["IS_ASSESSMENT_QUESTION"] = "isAssessmentQuestion";
25697
25735
  GUARDS["IS_TIMES_UP"] = "isTimesUp";
25698
- GUARDS["SHOULD_TRY_TO_CONFIRM"] = "shouldTryToConfirm";
25699
25736
  })(GUARDS$3 || (GUARDS$3 = {}));
25700
25737
  var TAGS;
25701
25738
  (function (TAGS) {
@@ -25705,7 +25742,6 @@ var TAGS;
25705
25742
  TAGS["DISPLAY_OUTER_VIEW"] = "displayOuterView";
25706
25743
  TAGS["DISPLAY_QUESTION"] = "displayQuestion";
25707
25744
  TAGS["DISPLAY_QUESTIONS_LIST"] = "displayQuestionsList";
25708
- TAGS["DISPLAY_UPLOAD"] = "displayUpload";
25709
25745
  TAGS["LOADING"] = "loading";
25710
25746
  })(TAGS || (TAGS = {}));
25711
25747
 
@@ -30427,7 +30463,7 @@ const configGenerator = () => {
30427
30463
  let release;
30428
30464
  try {
30429
30465
  environment !== null && environment !== void 0 ? environment : (environment = "staging");
30430
- release !== null && release !== void 0 ? release : (release = "1.1.23-revert-dev-deps-001");
30466
+ release !== null && release !== void 0 ? release : (release = "1.1.23-svg-check");
30431
30467
  }
30432
30468
  catch (_a) {
30433
30469
  console.error('sentry configGenerator error');
@@ -30900,7 +30936,6 @@ const SECONDS_LEFT_HIGHLIGHT = 10;
30900
30936
  const DEFAULT_ASSESSMENT_MAX_CHARS = 300;
30901
30937
  const DEFAULT_ASSESSMENT_DURATION = 0;
30902
30938
  const DEFAULT_VIDEO_DIMENSIONS = { width: 1280, height: 720 }; // Transcoder default dimensions (720p)
30903
- const MAX_CONFIRM_ATTEMPTS = 5;
30904
30939
  // Font
30905
30940
  const FONT_URL = 'https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@400;600;700&display=swap';
30906
30941
  var RETAKE_SPEED;
@@ -35061,8 +35096,8 @@ function memoizeOne(resultFn, isEqual) {
35061
35096
  }
35062
35097
 
35063
35098
  var memoizeOne_esm = /*#__PURE__*/Object.freeze({
35064
- __proto__: null,
35065
- 'default': memoizeOne
35099
+ __proto__: null,
35100
+ 'default': memoizeOne
35066
35101
  });
35067
35102
 
35068
35103
  var require$$2 = /*@__PURE__*/getAugmentedNamespace(memoizeOne_esm);
@@ -39022,11 +39057,6 @@ var EVENT_TYPES;
39022
39057
  EVENT_TYPES["SOUND_RESTORED"] = "soundRestored";
39023
39058
  EVENT_TYPES["TIMES_UP"] = "timesUp";
39024
39059
  EVENT_TYPES["COMPLETED_INTERVIEW"] = "completedInterview";
39025
- EVENT_TYPES["RECONNECTED"] = "reconnected";
39026
- EVENT_TYPES["CONFIRM_UPLOADED_FAILED"] = "confirmUploadedFailed";
39027
- EVENT_TYPES["FINISHED"] = "finished";
39028
- EVENT_TYPES["ON_FINISH_SUCCEED"] = "onFinishSucceed";
39029
- EVENT_TYPES["ON_FINISH_FAILED"] = "onFinishFailed";
39030
39060
  })(EVENT_TYPES || (EVENT_TYPES = {}));
39031
39061
  let event_id;
39032
39062
  const updateEventId = (eventId) => { event_id = eventId; };
@@ -39576,6 +39606,31 @@ const Setup = ({ widgetMachine, sendToWidget, isPracticeDisabled, recordWithoutV
39576
39606
  React__default.createElement(C, { className: startButtonClassNames, color: "special", backgroundColor: "white", onClick: () => sendToWidget(EVENTS$5.QUESTION_MODE), disabled: !canStartInterview }, t(isResumed ? 'welcome.resumeInterview' : 'buttons.btn_start').toUpperCase()))));
39577
39607
  };
39578
39608
 
39609
+ /*! *****************************************************************************
39610
+ Copyright (c) Microsoft Corporation.
39611
+
39612
+ Permission to use, copy, modify, and/or distribute this software for any
39613
+ purpose with or without fee is hereby granted.
39614
+
39615
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
39616
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
39617
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
39618
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
39619
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
39620
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
39621
+ PERFORMANCE OF THIS SOFTWARE.
39622
+ ***************************************************************************** */
39623
+
39624
+ function __awaiter(thisArg, _arguments, P, generator) {
39625
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
39626
+ return new (P || (P = Promise))(function (resolve, reject) {
39627
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
39628
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
39629
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
39630
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
39631
+ });
39632
+ }
39633
+
39579
39634
  const uploadToS3 = (url, data, onProgress, timeout = 0) => s3AxiosInstance.put(url, data, {
39580
39635
  headers: { 'Content-Type': 'video/webm' }, onUploadProgress: onProgress, timeout,
39581
39636
  });
@@ -39646,8 +39701,8 @@ const OuterView = ({ widgetMachine, sendToWidget, recorderRef }) => {
39646
39701
  const isQuestionDisplayed = widgetMachine.hasTag(TAGS.DISPLAY_QUESTION) || (isVideoQuestionState && !currentQuestionObj.thinkingTime);
39647
39702
  const isPreviewState = widgetMachine.matches(STATES$5.PREVIEW);
39648
39703
  const isUploadingState = widgetMachine.matches(STATES$5.UPLOADING);
39704
+ const isConfirmState = widgetMachine.matches(STATES$5.CONFIRM);
39649
39705
  const isQuestionsListDisplayed = widgetMachine.hasTag(TAGS.DISPLAY_QUESTIONS_LIST);
39650
- const isUploadDisplayed = widgetMachine.hasTag(TAGS.DISPLAY_UPLOAD);
39651
39706
  const isRecording = recorderMachine.matches({ [STATES$6.RECORDING]: STATES$6.COLLECTING_BLOBS });
39652
39707
  const isCountDown = recorderMachine.matches({ [STATES$6.RECORDING]: STATES$6.COUNT_DOWN });
39653
39708
  const isPracticeMode = recordingType === TAKE_TYPES.PRACTICE;
@@ -39665,7 +39720,7 @@ const OuterView = ({ widgetMachine, sendToWidget, recorderRef }) => {
39665
39720
  isSetupState && React__default.createElement(Setup, { recordWithoutVideo: recordWithoutVideo, widgetMachine: widgetMachine, sendToWidget: sendToWidget, isPracticeDisabled: !!config.disablePractice }),
39666
39721
  isQuestionsListDisplayed && React__default.createElement(QuestionsList, { questions: questions, currentQuestion: currentQuestion, isPracticeMode: isPracticeMode, questionsStatus: questionsStatus }),
39667
39722
  isQuestionDisplayed && React__default.createElement(Question, { questionObj: currentQuestionObj }),
39668
- isUploadDisplayed && (React__default.createElement(Upload, { isConnected: isConnected, totalFileSize: totalFileSize, totalUploadedFilesSize: totalUploadedFilesSize, totalUploadSpeed: totalUploadSpeed }))));
39723
+ (isUploadingState || isConfirmState) && (React__default.createElement(Upload, { isConnected: isConnected, totalFileSize: totalFileSize, totalUploadedFilesSize: totalUploadedFilesSize, totalUploadSpeed: totalUploadSpeed }))));
39669
39724
  };
39670
39725
 
39671
39726
  var actions = {};
@@ -44762,7 +44817,7 @@ const accUploaderMachine = createMachine({
44762
44817
  actions: [ACTIONS$2.SENTRY],
44763
44818
  },
44764
44819
  {
44765
- actions: [ACTIONS$2.SENTRY],
44820
+ actions: [ACTIONS$2.SET_UPLOADED, ACTIONS$2.SENTRY],
44766
44821
  target: `#uploader.${STATES$2.UPLOADED}`, // In case the video already uploaded
44767
44822
  },
44768
44823
  ],
@@ -44779,6 +44834,7 @@ const accUploaderMachine = createMachine({
44779
44834
  id: 'uploadToS3',
44780
44835
  src: ({ signedUrl, file }) => (callback) => uploadToS3(signedUrl, file, callback),
44781
44836
  onDone: {
44837
+ // actions: [ACTIONS.SET_UPLOADED],
44782
44838
  target: `#uploader.${STATES$2.UPLOADED}`,
44783
44839
  },
44784
44840
  onError: {
@@ -45134,14 +45190,10 @@ const accWidgetMachine = createMachine({
45134
45190
  failedRecordingMessage: VIDEO_CORRUPTED_STATES.NO_ERROR,
45135
45191
  isResumed: false,
45136
45192
  videoDimensions: DEFAULT_VIDEO_DIMENSIONS,
45137
- confirmUploadedFalseCount: 0,
45138
45193
  },
45139
45194
  on: {
45140
45195
  [EVENTS$1.CONNECTION_CHANGED]: {
45141
- actions: [
45142
- ACTIONS$6.SET_CONNECTION,
45143
- { type: ACTIONS$6.EMIT_TRACKING_EVENT, data: { eventType: EVENT_TYPES.RECONNECTED } },
45144
- ],
45196
+ actions: [ACTIONS$6.SET_CONNECTION],
45145
45197
  },
45146
45198
  [EVENTS$5.UPLOADER_PROGRESS]: {
45147
45199
  actions: [ACTIONS$6.UPDATE_TOTAL_UPLOADED_FILES_SIZE],
@@ -45668,7 +45720,7 @@ const accWidgetMachine = createMachine({
45668
45720
  },
45669
45721
  },
45670
45722
  [STATES$5.UPLOADING]: {
45671
- tags: [TAGS.DISPLAY_OUTER_VIEW, TAGS.DISPLAY_UPLOAD],
45723
+ tags: [TAGS.DISPLAY_OUTER_VIEW],
45672
45724
  entry: [
45673
45725
  { type: ACTIONS$6.SESSION_EVENT, data: { event: 'widget_completed', type: 'date' } },
45674
45726
  { type: ACTIONS$6.CONSOLE_DEBUG, data: { message: DEBUG.UPLOADING_STATE } },
@@ -45682,57 +45734,30 @@ const accWidgetMachine = createMachine({
45682
45734
  },
45683
45735
  },
45684
45736
  },
45685
- [STATES$5.CONFIRM_WATING]: {
45686
- tags: [TAGS.DISPLAY_OUTER_VIEW, TAGS.DISPLAY_UPLOAD],
45687
- always: {
45688
- target: STATES$5.CONFIRM,
45689
- cond: GUARDS$3.IS_CONNECTED,
45690
- },
45691
- },
45692
45737
  [STATES$5.CONFIRM]: {
45693
- tags: [TAGS.DISPLAY_OUTER_VIEW, TAGS.DISPLAY_UPLOAD],
45738
+ tags: [TAGS.DISPLAY_OUTER_VIEW],
45694
45739
  invoke: {
45695
45740
  id: 'getVideo',
45696
45741
  src: (context) => { var _a; return getVideo(((_a = context.widgetConfig.video) === null || _a === void 0 ? void 0 : _a.video_id) || ''); },
45697
- onDone: [
45698
- {
45699
- target: STATES$5.FINISHED,
45700
- cond: (_, event) => !!event.data.data.data.video.uploaded,
45701
- },
45702
- {
45703
- actions: [
45704
- ACTIONS$6.UPDATE_UPLOADED_FALSE_COUNT,
45705
- { type: ACTIONS$6.SENTRY, data: { eventName: 'CONFIRM::UPLOADED_FALSE' } },
45706
- ],
45707
- target: STATES$5.CONFIRM_WATING,
45708
- cond: GUARDS$3.SHOULD_TRY_TO_CONFIRM,
45709
- },
45710
- {
45711
- actions: [
45712
- { type: ACTIONS$6.SET_VIDEO_ERROR, data: { errorMessage: 'Error, Please contact support' } },
45713
- { type: ACTIONS$6.EMIT_TRACKING_EVENT, data: { eventType: EVENT_TYPES.CONFIRM_UPLOADED_FAILED } },
45714
- ],
45715
- target: STATES$5.ERROR,
45716
- },
45717
- ],
45742
+ onDone: {
45743
+ target: STATES$5.FINISHED,
45744
+ cond: (_, event) => !!event.data.data.data.video.uploaded,
45745
+ },
45718
45746
  onError: [
45719
45747
  {
45720
- actions: [() => console.error('UPDATE_VIDEO_UPLADED_ERROR:'), console.error, { type: ACTIONS$6.SENTRY, data: { eventName: 'CONFIRM::ERROR__NOT_FOUND' } }],
45748
+ actions: [() => console.error('UPDATE_VIDEO_UPLADED_ERROR:'), console.error, ACTIONS$6.SENTRY],
45721
45749
  target: STATES$5.FINISHED,
45722
45750
  cond: (_, event) => event.data.response.status === STATUS_CODES.NOT_FOUND,
45723
45751
  },
45724
45752
  {
45725
- actions: [() => console.error('UPDATE_VIDEO_UPLADED_ERROR:'), console.error, { type: ACTIONS$6.SENTRY, data: { eventName: 'CONFIRM::ERROR' } }],
45726
- target: STATES$5.CONFIRM_WATING,
45753
+ actions: [ACTIONS$6.SENTRY],
45754
+ target: STATES$5.CONFIRM,
45727
45755
  },
45728
45756
  ],
45729
45757
  },
45730
45758
  },
45731
45759
  [STATES$5.FINISHED]: {
45732
- entry: [
45733
- { type: ACTIONS$6.CONSOLE_DEBUG, data: { message: DEBUG.INTERVIEW_SUBMITTED } },
45734
- { type: ACTIONS$6.EMIT_TRACKING_EVENT, data: { eventType: EVENT_TYPES.FINISHED } },
45735
- ],
45760
+ entry: [{ type: ACTIONS$6.CONSOLE_DEBUG, data: { message: DEBUG.INTERVIEW_SUBMITTED } }],
45736
45761
  type: 'final',
45737
45762
  },
45738
45763
  [STATES$5.ERROR]: {
@@ -45928,12 +45953,9 @@ const accWidgetMachine = createMachine({
45928
45953
  widgetConfig: Object.assign(Object.assign({}, widgetConfig), { video: Object.assign(Object.assign({}, widgetConfig.video), { videos: (_b = (_a = widgetConfig.video) === null || _a === void 0 ? void 0 : _a.videos) === null || _b === void 0 ? void 0 : _b.map((video, idx) => ((idx !== questionNumber - 1) ? video : videoFile)) }) }),
45929
45954
  });
45930
45955
  }),
45931
- [ACTIONS$6.SET_VIDEO_ERROR]: assign$2((_, event, meta) => {
45932
- var _a, _b, _c, _d;
45933
- return ({
45934
- error: ((_b = (_a = event.data) === null || _a === void 0 ? void 0 : _a.response) === null || _b === void 0 ? void 0 : _b.data) || { errorMessage: ((_c = event.data) === null || _c === void 0 ? void 0 : _c.message) || ((_d = meta.action.data) === null || _d === void 0 ? void 0 : _d.errorMessage) },
45935
- });
45936
- }),
45956
+ [ACTIONS$6.SET_VIDEO_ERROR]: assign$2((_, event) => ({
45957
+ error: event.data.response.data || { errorMessage: event.data.message },
45958
+ })),
45937
45959
  [ACTIONS$6.REVOKE_MEMORY]: send$2((_, event) => ({ type: EVENTS$4.REMOVE_TAKES, data: { questionToRemove: event.data.questionNumber } }), { to: ({ storageRef }) => storageRef }),
45938
45960
  [ACTIONS$6.UPDATE_VIDEO_OBJECT]: assign$2(({ widgetConfig, recordingType }) => {
45939
45961
  var _a, _b;
@@ -45967,9 +45989,6 @@ const accWidgetMachine = createMachine({
45967
45989
  height: event.data.height,
45968
45990
  },
45969
45991
  })),
45970
- [ACTIONS$6.UPDATE_UPLOADED_FALSE_COUNT]: assign$2(({ confirmUploadedFalseCount }) => ({
45971
- confirmUploadedFalseCount: confirmUploadedFalseCount + 1,
45972
- })),
45973
45992
  },
45974
45993
  services: {
45975
45994
  [SERVICES$1.UPDATE_VIDEO_OBJECT_CALL]: ({ widgetConfig: { video }, recordingType, speedTestResult }, event, meta) => (callback, onReceive) => {
@@ -46013,7 +46032,6 @@ const accWidgetMachine = createMachine({
46013
46032
  [GUARDS$3.IS_RECORDER_READY]: ({ recorderRef }) => (recorderRef === null || recorderRef === void 0 ? void 0 : recorderRef.getSnapshot().value) === STATES$6.IDLE,
46014
46033
  [GUARDS$3.IS_ASSESSMENT_QUESTION]: ({ questions, currentQuestion }) => !!questions[currentQuestion - 1].answerType && questions[currentQuestion - 1].answerType !== ANSWER_TYPES.VIDEO,
46015
46034
  [GUARDS$3.IS_TIMES_UP]: (_, event) => !!event.data.isTimesUp,
46016
- [GUARDS$3.SHOULD_TRY_TO_CONFIRM]: ({ confirmUploadedFalseCount }) => confirmUploadedFalseCount <= MAX_CONFIRM_ATTEMPTS,
46017
46035
  },
46018
46036
  });
46019
46037
 
@@ -48536,25 +48554,10 @@ const Main = ({ widgetConfig, setShouldShowWaterMark, myinterviewRef, isWidgetMi
48536
48554
  useEffect(() => {
48537
48555
  setShouldShowWaterMark(!!(company === null || company === void 0 ? void 0 : company.shouldShowWaterMark));
48538
48556
  }, [company === null || company === void 0 ? void 0 : company.shouldShowWaterMark]);
48539
- const _onFinish = () => __awaiter(void 0, void 0, void 0, function* () { var _a, _b; return (_b = (_a = widgetConfig.config).onFinish) === null || _b === void 0 ? void 0 : _b.call(_a, { redirectUrl: candidate.redirectUrl, video_id: (video === null || video === void 0 ? void 0 : video.video_id) || '' }); });
48540
48557
  useEffect(() => {
48558
+ var _a, _b;
48541
48559
  if (machine.done) {
48542
- if (widgetConfig.config.onFinish) {
48543
- _onFinish().then(() => {
48544
- emitTrackEvent({ eventType: EVENT_TYPES.ON_FINISH_SUCCEED });
48545
- }).catch((err) => {
48546
- var _a;
48547
- let errorMessage = '';
48548
- try {
48549
- errorMessage = (err === null || err === void 0 ? void 0 : err.message) || (err === null || err === void 0 ? void 0 : err.msg) || ((_a = err === null || err === void 0 ? void 0 : err.data) === null || _a === void 0 ? void 0 : _a.message);
48550
- }
48551
- catch (_b) {
48552
- //
48553
- }
48554
- emitTrackEvent({ eventType: EVENT_TYPES.ON_FINISH_FAILED, extraData: { errorMessage } });
48555
- throw err;
48556
- });
48557
- }
48560
+ (_b = (_a = widgetConfig.config).onFinish) === null || _b === void 0 ? void 0 : _b.call(_a, { redirectUrl: candidate.redirectUrl, video_id: (video === null || video === void 0 ? void 0 : video.video_id) || '' });
48558
48561
  }
48559
48562
  }, [machine.done]);
48560
48563
  useEffect(() => {
@@ -48570,16 +48573,11 @@ const Main = ({ widgetConfig, setShouldShowWaterMark, myinterviewRef, isWidgetMi
48570
48573
  });
48571
48574
  }
48572
48575
  }, [candidate, job === null || job === void 0 ? void 0 : job.language]);
48573
- const setBackgroundOpacity = () => {
48574
- var _a;
48575
- (_a = myinterviewRef === null || myinterviewRef === void 0 ? void 0 : myinterviewRef.current) === null || _a === void 0 ? void 0 : _a.style.setProperty('--myinterview-background-opacity', isLoading || isErrorState ? '0' : '1');
48576
- };
48577
48576
  useEffect(() => {
48578
48577
  var _a, _b;
48579
48578
  if (isErrorState && (error === null || error === void 0 ? void 0 : error.statusCode) === 400) {
48580
48579
  (_b = (_a = widgetConfig.config).onError) === null || _b === void 0 ? void 0 : _b.call(_a, { messageType: 'applied' });
48581
48580
  }
48582
- setBackgroundOpacity();
48583
48581
  }, [isErrorState]);
48584
48582
  const isResumed = useMemo(() => { var _a, _b; return !!((_b = (_a = widgetConfig.video) === null || _a === void 0 ? void 0 : _a.videos) === null || _b === void 0 ? void 0 : _b.some((v) => v.uploaded)); }, [widgetConfig.video]);
48585
48583
  const handleScroll = (e) => {
@@ -48589,7 +48587,8 @@ const Main = ({ widgetConfig, setShouldShowWaterMark, myinterviewRef, isWidgetMi
48589
48587
  (_b = viewsRef === null || viewsRef === void 0 ? void 0 : viewsRef.current) === null || _b === void 0 ? void 0 : _b.style.setProperty('--myinterview-widget-practice-opacity', scrollTop > 10 ? '0' : '1');
48590
48588
  };
48591
48589
  useEffect(() => {
48592
- setBackgroundOpacity();
48590
+ var _a;
48591
+ (_a = myinterviewRef === null || myinterviewRef === void 0 ? void 0 : myinterviewRef.current) === null || _a === void 0 ? void 0 : _a.style.setProperty('--myinterview-background-opacity', isLoading || isErrorState ? '0' : '1');
48593
48592
  }, [isLoading]);
48594
48593
  const onRetry = () => {
48595
48594
  send(EVENTS$5.RETRY);
@@ -48787,15 +48786,15 @@ const Widget = ({ candidate, job, video, config, disabled = false, buttonText =
48787
48786
  revertBodyStyling();
48788
48787
  setIsWidgetOpen(false);
48789
48788
  };
48790
- const onInterviewCompleted = (data) => __awaiter(void 0, void 0, void 0, function* () {
48789
+ const onInterviewCompleted = (data) => {
48791
48790
  var _a;
48791
+ (_a = config.onFinish) === null || _a === void 0 ? void 0 : _a.call(config, data);
48792
48792
  onCloseWidget();
48793
- yield ((_a = config.onFinish) === null || _a === void 0 ? void 0 : _a.call(config, data));
48794
- });
48793
+ };
48795
48794
  const onError = (data) => {
48796
48795
  var _a;
48797
- onCloseWidget();
48798
48796
  (_a = config.onError) === null || _a === void 0 ? void 0 : _a.call(config, data);
48797
+ onCloseWidget();
48799
48798
  };
48800
48799
  const openWidget = () => {
48801
48800
  var _a;