idmission-web-sdk 1.0.238 → 1.0.239

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.
@@ -49,7 +49,7 @@ var LanguageDetector__default = /*#__PURE__*/_interopDefaultLegacy(LanguageDetec
49
49
  var i18n__default = /*#__PURE__*/_interopDefaultLegacy(i18n);
50
50
  var SignatureCanvas__default = /*#__PURE__*/_interopDefaultLegacy(SignatureCanvas);
51
51
 
52
- var webSdkVersion = '1.0.238';
52
+ var webSdkVersion = '1.0.239';
53
53
 
54
54
  function getPlatform() {
55
55
  if (typeof window === 'undefined') return;
@@ -983,7 +983,7 @@ var SubmissionProvider = function SubmissionProvider(_a) {
983
983
  _b.label = 2;
984
984
  case 2:
985
985
  if (_a) return [2 /*return*/, resolve(blobToB64(blob))];
986
- upload = new tusJsClient.Upload(blob, {
986
+ upload = createUpload(blob, {
987
987
  endpoint: documentServiceUrl,
988
988
  retryDelays: [0, 1000, 1000, 1000, 3000, 5000, 10000, 20000],
989
989
  headers: {
@@ -1479,6 +1479,13 @@ var SubmissionProvider = function SubmissionProvider(_a) {
1479
1479
  onRetry: onRetry
1480
1480
  })));
1481
1481
  };
1482
+ function createUpload(blob, options) {
1483
+ var UploadType =
1484
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
1485
+ // @ts-ignore
1486
+ typeof window.tus !== 'undefined' ? window.tus.Upload : tusJsClient.Upload;
1487
+ return new UploadType(blob, options);
1488
+ }
1482
1489
  function convertBase64ToBlob(base64Image) {
1483
1490
  // Split into two parts
1484
1491
  var parts = base64Image.split(';base64,');