idmission-web-sdk 0.0.20 → 0.0.21

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.
@@ -3212,7 +3212,7 @@
3212
3212
  return (_b = (_a = url.match(/^(data:.*;base64),/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : '';
3213
3213
  }
3214
3214
 
3215
- var PageContainerDiv = styled__default['default'].div(templateObject_1$6 || (templateObject_1$6 = __makeTemplateObject(["\n position: fixed;\n top: 0;\n left: 0;\n width: var(--app-width);\n height: calc(\n var(--app-height) - ", "px\n );\n overflow-x: hidden;\n overflow-y: auto;\n font-family: Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto,\n Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;\n\n &.flex {\n display: flex;\n }\n\n &.padded {\n box-sizing: border-box;\n padding: 16px 24px;\n }\n"], ["\n position: fixed;\n top: 0;\n left: 0;\n width: var(--app-width);\n height: calc(\n var(--app-height) - ", "px\n );\n overflow-x: hidden;\n overflow-y: auto;\n font-family: Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto,\n Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;\n\n &.flex {\n display: flex;\n }\n\n &.padded {\n box-sizing: border-box;\n padding: 16px 24px;\n }\n"])), function (_a) {
3215
+ var PageContainerDiv = styled__default['default'].div(templateObject_1$7 || (templateObject_1$7 = __makeTemplateObject(["\n position: fixed;\n top: 0;\n left: 0;\n width: var(--app-width);\n height: calc(\n var(--app-height) - ", "px\n );\n overflow-x: hidden;\n overflow-y: auto;\n font-family: Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto,\n Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;\n\n &.flex {\n display: flex;\n }\n\n &.padded {\n box-sizing: border-box;\n padding: 16px 24px;\n }\n"], ["\n position: fixed;\n top: 0;\n left: 0;\n width: var(--app-width);\n height: calc(\n var(--app-height) - ", "px\n );\n overflow-x: hidden;\n overflow-y: auto;\n font-family: Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto,\n Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;\n\n &.flex {\n display: flex;\n }\n\n &.padded {\n box-sizing: border-box;\n padding: 16px 24px;\n }\n"])), function (_a) {
3216
3216
  var $heightOffset = _a.$heightOffset;
3217
3217
  return $heightOffset !== null && $heightOffset !== void 0 ? $heightOffset : 0;
3218
3218
  });
@@ -3244,13 +3244,13 @@
3244
3244
  }, children);
3245
3245
  });
3246
3246
  PageContainer.displayName = 'PageContainer';
3247
- var templateObject_1$6;
3247
+ var templateObject_1$7;
3248
3248
 
3249
- var OverlayContainer = styled__default['default'](PageContainer)(templateObject_1$5 || (templateObject_1$5 = __makeTemplateObject(["\n background: white;\n z-index: 10000;\n"], ["\n background: white;\n z-index: 10000;\n"])));
3250
- var OverlayInner = styled__default['default'].div(templateObject_2$1 || (templateObject_2$1 = __makeTemplateObject(["\n text-align: center;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n padding: 25px;\n max-height: var(--app-height);\n height: 100%;\n box-sizing: border-box;\n"], ["\n text-align: center;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n padding: 25px;\n max-height: var(--app-height);\n height: 100%;\n box-sizing: border-box;\n"])));
3251
- var OverlayImageWrapper = styled__default['default'].div(templateObject_3$1 || (templateObject_3$1 = __makeTemplateObject(["\n position: relative;\n display: flex;\n flex-grow: 1;\n padding-bottom: 25px;\n max-width: var(--app-width);\n max-height: var(--app-height);\n overflow: hidden;\n\n & > img {\n margin: 0 auto;\n width: max-content;\n max-width: 100%;\n max-height: 100%;\n aspect-ratio: initial;\n object-fit: contain;\n display: block;\n }\n"], ["\n position: relative;\n display: flex;\n flex-grow: 1;\n padding-bottom: 25px;\n max-width: var(--app-width);\n max-height: var(--app-height);\n overflow: hidden;\n\n & > img {\n margin: 0 auto;\n width: max-content;\n max-width: 100%;\n max-height: 100%;\n aspect-ratio: initial;\n object-fit: contain;\n display: block;\n }\n"])));
3252
- var OverlayImageMultiContainer = styled__default['default'].div(templateObject_4$1 || (templateObject_4$1 = __makeTemplateObject(["\n display: flex;\n margin: auto;\n\n & > div {\n max-height: calc(100vh - 320px);\n\n & > img {\n width: 100%;\n max-height: 100%;\n height: auto;\n object-fit: contain;\n }\n }\n"], ["\n display: flex;\n margin: auto;\n\n & > div {\n max-height: calc(100vh - 320px);\n\n & > img {\n width: 100%;\n max-height: 100%;\n height: auto;\n object-fit: contain;\n }\n }\n"])));
3253
- var templateObject_1$5, templateObject_2$1, templateObject_3$1, templateObject_4$1;
3249
+ var OverlayContainer = styled__default['default'](PageContainer)(templateObject_1$6 || (templateObject_1$6 = __makeTemplateObject(["\n background: white;\n z-index: 10000;\n"], ["\n background: white;\n z-index: 10000;\n"])));
3250
+ var OverlayInner = styled__default['default'].div(templateObject_2$3 || (templateObject_2$3 = __makeTemplateObject(["\n text-align: center;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n padding: 25px;\n max-height: var(--app-height);\n height: 100%;\n box-sizing: border-box;\n"], ["\n text-align: center;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n padding: 25px;\n max-height: var(--app-height);\n height: 100%;\n box-sizing: border-box;\n"])));
3251
+ var OverlayImageWrapper = styled__default['default'].div(templateObject_3$2 || (templateObject_3$2 = __makeTemplateObject(["\n position: relative;\n display: flex;\n flex-grow: 1;\n padding-bottom: 25px;\n max-width: var(--app-width);\n max-height: var(--app-height);\n overflow: hidden;\n\n & > img {\n margin: 0 auto;\n width: max-content;\n max-width: 100%;\n max-height: 100%;\n aspect-ratio: initial;\n object-fit: contain;\n display: block;\n }\n"], ["\n position: relative;\n display: flex;\n flex-grow: 1;\n padding-bottom: 25px;\n max-width: var(--app-width);\n max-height: var(--app-height);\n overflow: hidden;\n\n & > img {\n margin: 0 auto;\n width: max-content;\n max-width: 100%;\n max-height: 100%;\n aspect-ratio: initial;\n object-fit: contain;\n display: block;\n }\n"])));
3252
+ var OverlayImageMultiContainer = styled__default['default'].div(templateObject_4$2 || (templateObject_4$2 = __makeTemplateObject(["\n display: flex;\n margin: auto;\n\n & > div {\n max-height: calc(100vh - 320px);\n\n & > img {\n width: 100%;\n max-height: 100%;\n height: auto;\n object-fit: contain;\n }\n }\n"], ["\n display: flex;\n margin: auto;\n\n & > div {\n max-height: calc(100vh - 320px);\n\n & > img {\n width: 100%;\n max-height: 100%;\n height: auto;\n object-fit: contain;\n }\n }\n"])));
3253
+ var templateObject_1$6, templateObject_2$3, templateObject_3$2, templateObject_4$2;
3254
3254
 
3255
3255
  var __assign = (undefined && undefined.__assign) || function () {
3256
3256
  __assign = Object.assign || function(t) {
@@ -11693,15 +11693,15 @@
11693
11693
  console.error('failed to dispose backend', e);
11694
11694
  }
11695
11695
  }
11696
- var InvisibleCanvas = styled__default['default'].canvas(templateObject_1$4 || (templateObject_1$4 = __makeTemplateObject(["\n display: none;\n"], ["\n display: none;\n"])));
11697
- var templateObject_1$4;
11696
+ var InvisibleCanvas = styled__default['default'].canvas(templateObject_1$5 || (templateObject_1$5 = __makeTemplateObject(["\n display: none;\n"], ["\n display: none;\n"])));
11697
+ var templateObject_1$5;
11698
11698
 
11699
- var DebugStatsPane = styled__default['default'].span(templateObject_1$3 || (templateObject_1$3 = __makeTemplateObject(["\n font-size: 16px;\n font-family: monospace;\n position: absolute;\n left: 20px;\n bottom: 20px;\n color: limegreen;\n background: rgba(0, 0, 0, 0.5);\n z-index: 1001;\n"], ["\n font-size: 16px;\n font-family: monospace;\n position: absolute;\n left: 20px;\n bottom: 20px;\n color: limegreen;\n background: rgba(0, 0, 0, 0.5);\n z-index: 1001;\n"])));
11700
- var ObjectDetectionDebugOverlay = styled__default['default'].div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n position: absolute;\n z-index: 1001;\n width: 100%;\n height: 100%;\n max-width: 100%;\n max-height: 100%;\n overflow: hidden;\n ", "\n"], ["\n position: absolute;\n z-index: 1001;\n width: 100%;\n height: 100%;\n max-width: 100%;\n max-height: 100%;\n overflow: hidden;\n ", "\n"])), function (_a) {
11699
+ var DebugStatsPane = styled__default['default'].span(templateObject_1$4 || (templateObject_1$4 = __makeTemplateObject(["\n font-size: 16px;\n font-family: monospace;\n position: absolute;\n left: 20px;\n bottom: 20px;\n color: limegreen;\n background: rgba(0, 0, 0, 0.5);\n z-index: 1001;\n"], ["\n font-size: 16px;\n font-family: monospace;\n position: absolute;\n left: 20px;\n bottom: 20px;\n color: limegreen;\n background: rgba(0, 0, 0, 0.5);\n z-index: 1001;\n"])));
11700
+ var ObjectDetectionDebugOverlay = styled__default['default'].div(templateObject_2$2 || (templateObject_2$2 = __makeTemplateObject(["\n position: absolute;\n z-index: 1001;\n width: 100%;\n height: 100%;\n max-width: 100%;\n max-height: 100%;\n overflow: hidden;\n ", "\n"], ["\n position: absolute;\n z-index: 1001;\n width: 100%;\n height: 100%;\n max-width: 100%;\n max-height: 100%;\n overflow: hidden;\n ", "\n"])), function (_a) {
11701
11701
  var $flipX = _a.$flipX;
11702
11702
  return $flipX ? 'transform: scaleX(-1);' : '';
11703
11703
  });
11704
- var ObjectDetectionDebugBox = styled__default['default'].div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n font: 10px monospace;\n position: absolute;\n top: ", "px;\n left: ", "px;\n width: ", "px;\n height: ", "px;\n border: 3px solid ", ";\n color: ", ";\n ", "\n"], ["\n font: 10px monospace;\n position: absolute;\n top: ", "px;\n left: ", "px;\n width: ", "px;\n height: ", "px;\n border: 3px solid ", ";\n color: ", ";\n ", "\n"])), function (_a) {
11704
+ var ObjectDetectionDebugBox = styled__default['default'].div(templateObject_3$1 || (templateObject_3$1 = __makeTemplateObject(["\n font: 10px monospace;\n position: absolute;\n top: ", "px;\n left: ", "px;\n width: ", "px;\n height: ", "px;\n border: 3px solid ", ";\n color: ", ";\n ", "\n"], ["\n font: 10px monospace;\n position: absolute;\n top: ", "px;\n left: ", "px;\n width: ", "px;\n height: ", "px;\n border: 3px solid ", ";\n color: ", ";\n ", "\n"])), function (_a) {
11705
11705
  var $top = _a.$top;
11706
11706
  return $top;
11707
11707
  }, function (_a) {
@@ -11723,7 +11723,7 @@
11723
11723
  var $flipX = _a.$flipX;
11724
11724
  return $flipX ? 'transform: scaleX(-1);' : '';
11725
11725
  });
11726
- var FaceDetectionKeypointMarker = styled__default['default'].div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n position: absolute;\n top: ", "px;\n left: ", "px;\n width: ", "px;\n height: ", "px;\n border: ", "px solid\n ", ";\n font: 10px monospace;\n color: ", ";\n border-radius: 50%;\n ", "\n"], ["\n position: absolute;\n top: ", "px;\n left: ", "px;\n width: ", "px;\n height: ", "px;\n border: ", "px solid\n ", ";\n font: 10px monospace;\n color: ", ";\n border-radius: 50%;\n ", "\n"])), function (_a) {
11726
+ var FaceDetectionKeypointMarker = styled__default['default'].div(templateObject_4$1 || (templateObject_4$1 = __makeTemplateObject(["\n position: absolute;\n top: ", "px;\n left: ", "px;\n width: ", "px;\n height: ", "px;\n border: ", "px solid\n ", ";\n font: 10px monospace;\n color: ", ";\n border-radius: 50%;\n ", "\n"], ["\n position: absolute;\n top: ", "px;\n left: ", "px;\n width: ", "px;\n height: ", "px;\n border: ", "px solid\n ", ";\n font: 10px monospace;\n color: ", ";\n border-radius: 50%;\n ", "\n"])), function (_a) {
11727
11727
  var $top = _a.$top,
11728
11728
  $height = _a.$height;
11729
11729
  return $top - $height / 2;
@@ -11887,7 +11887,7 @@
11887
11887
  "$color": color
11888
11888
  });
11889
11889
  }
11890
- var templateObject_1$3, templateObject_2, templateObject_3, templateObject_4;
11890
+ var templateObject_1$4, templateObject_2$2, templateObject_3$1, templateObject_4$1;
11891
11891
 
11892
11892
  var initialState$5 = {
11893
11893
  videoWidth: 0,
@@ -12863,10 +12863,10 @@
12863
12863
  "$isRearFacing": (_a = cameraRef.current) === null || _a === void 0 ? void 0 : _a.isRearFacing
12864
12864
  });
12865
12865
  };
12866
- var FullscreenVideoTag = styled__default['default'].video(templateObject_1$2 || (templateObject_1$2 = __makeTemplateObject(["\n transform: ", ";\n min-width: 100%;\n min-height: 100%;\n width: auto;\n height: auto;\n object-fit: cover;\n"], ["\n transform: ", ";\n min-width: 100%;\n min-height: 100%;\n width: auto;\n height: auto;\n object-fit: cover;\n"])), function (props) {
12866
+ var FullscreenVideoTag = styled__default['default'].video(templateObject_1$3 || (templateObject_1$3 = __makeTemplateObject(["\n transform: ", ";\n min-width: 100%;\n min-height: 100%;\n width: auto;\n height: auto;\n object-fit: cover;\n"], ["\n transform: ", ";\n min-width: 100%;\n min-height: 100%;\n width: auto;\n height: auto;\n object-fit: cover;\n"])), function (props) {
12867
12867
  return props.$isRearFacing ? '' : 'scaleX(-1)';
12868
12868
  });
12869
- var templateObject_1$2;
12869
+ var templateObject_1$3;
12870
12870
 
12871
12871
  var CaptureState;
12872
12872
  (function (CaptureState) {
@@ -13535,11 +13535,6 @@
13535
13535
  var isMobile = state.videoWidth < state.videoHeight;
13536
13536
  var tooCloseMultiple = isMobile ? 2 : 4.5;
13537
13537
  var tooFarMultiple = isMobile ? 6 : 7;
13538
- console.log({
13539
- faceBoxWidth: face.box.width,
13540
- videoWidth: state.videoWidth,
13541
- tooCloseMultiple: tooCloseMultiple
13542
- });
13543
13538
  faceTooClose = face.box.width > state.videoWidth / tooCloseMultiple;
13544
13539
  faceTooFar = face.box.width < state.videoWidth / tooFarMultiple;
13545
13540
  }
@@ -14798,8 +14793,8 @@
14798
14793
  return truncated;
14799
14794
  }
14800
14795
 
14801
- var Spinner = styled__default['default'].div(templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject(["\n display: inline-block;\n width: 80px;\n height: 80px;\n margin: auto;\n\n &:after {\n content: ' ';\n display: block;\n width: 64px;\n height: 64px;\n margin: 8px;\n border-radius: 50%;\n border: 6px solid #888;\n border-color: #888 transparent #888 transparent;\n animation: lds-dual-ring 1.2s linear infinite;\n }\n\n @keyframes lds-dual-ring {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n"], ["\n display: inline-block;\n width: 80px;\n height: 80px;\n margin: auto;\n\n &:after {\n content: ' ';\n display: block;\n width: 64px;\n height: 64px;\n margin: 8px;\n border-radius: 50%;\n border: 6px solid #888;\n border-color: #888 transparent #888 transparent;\n animation: lds-dual-ring 1.2s linear infinite;\n }\n\n @keyframes lds-dual-ring {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n"])));
14802
- var templateObject_1$1;
14796
+ var Spinner = styled__default['default'].div(templateObject_1$2 || (templateObject_1$2 = __makeTemplateObject(["\n display: inline-block;\n width: 80px;\n height: 80px;\n margin: auto;\n\n &:after {\n content: ' ';\n display: block;\n width: 64px;\n height: 64px;\n margin: 8px;\n border-radius: 50%;\n border: 6px solid #888;\n border-color: #888 transparent #888 transparent;\n animation: lds-dual-ring 1.2s linear infinite;\n }\n\n @keyframes lds-dual-ring {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n"], ["\n display: inline-block;\n width: 80px;\n height: 80px;\n margin: auto;\n\n &:after {\n content: ' ';\n display: block;\n width: 64px;\n height: 64px;\n margin: 8px;\n border-radius: 50%;\n border: 6px solid #888;\n border-color: #888 transparent #888 transparent;\n animation: lds-dual-ring 1.2s linear infinite;\n }\n\n @keyframes lds-dual-ring {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n"])));
14797
+ var templateObject_1$2;
14803
14798
 
14804
14799
  var AdditionalDocumentCapture = function AdditionalDocumentCapture(_a) {
14805
14800
  var document = _a.document,
@@ -15025,7 +15020,7 @@
15025
15020
  };
15026
15021
  }
15027
15022
 
15028
- function SignaturePad(canvas, options) {
15023
+ function SignaturePad$1(canvas, options) {
15029
15024
  var self = this;
15030
15025
  var opts = options || {};
15031
15026
 
@@ -15036,9 +15031,9 @@
15036
15031
  this.minDistance = 'minDistance' in opts ? opts.minDistance : 5;
15037
15032
 
15038
15033
  if (this.throttle) {
15039
- this._strokeMoveUpdate = throttle(SignaturePad.prototype._strokeUpdate, this.throttle);
15034
+ this._strokeMoveUpdate = throttle(SignaturePad$1.prototype._strokeUpdate, this.throttle);
15040
15035
  } else {
15041
- this._strokeMoveUpdate = SignaturePad.prototype._strokeUpdate;
15036
+ this._strokeMoveUpdate = SignaturePad$1.prototype._strokeUpdate;
15042
15037
  }
15043
15038
 
15044
15039
  this.dotSize = opts.dotSize || function () {
@@ -15103,7 +15098,7 @@
15103
15098
  }
15104
15099
 
15105
15100
  // Public methods
15106
- SignaturePad.prototype.clear = function () {
15101
+ SignaturePad$1.prototype.clear = function () {
15107
15102
  var ctx = this._ctx;
15108
15103
  var canvas = this._canvas;
15109
15104
 
@@ -15116,7 +15111,7 @@
15116
15111
  this._isEmpty = true;
15117
15112
  };
15118
15113
 
15119
- SignaturePad.prototype.fromDataURL = function (dataUrl) {
15114
+ SignaturePad$1.prototype.fromDataURL = function (dataUrl) {
15120
15115
  var _this = this;
15121
15116
 
15122
15117
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
@@ -15134,7 +15129,7 @@
15134
15129
  this._isEmpty = false;
15135
15130
  };
15136
15131
 
15137
- SignaturePad.prototype.toDataURL = function (type) {
15132
+ SignaturePad$1.prototype.toDataURL = function (type) {
15138
15133
  var _canvas;
15139
15134
 
15140
15135
  switch (type) {
@@ -15149,12 +15144,12 @@
15149
15144
  }
15150
15145
  };
15151
15146
 
15152
- SignaturePad.prototype.on = function () {
15147
+ SignaturePad$1.prototype.on = function () {
15153
15148
  this._handleMouseEvents();
15154
15149
  this._handleTouchEvents();
15155
15150
  };
15156
15151
 
15157
- SignaturePad.prototype.off = function () {
15152
+ SignaturePad$1.prototype.off = function () {
15158
15153
  this._canvas.removeEventListener('mousedown', this._handleMouseDown);
15159
15154
  this._canvas.removeEventListener('mousemove', this._handleMouseMove);
15160
15155
  document.removeEventListener('mouseup', this._handleMouseUp);
@@ -15164,12 +15159,12 @@
15164
15159
  this._canvas.removeEventListener('touchend', this._handleTouchEnd);
15165
15160
  };
15166
15161
 
15167
- SignaturePad.prototype.isEmpty = function () {
15162
+ SignaturePad$1.prototype.isEmpty = function () {
15168
15163
  return this._isEmpty;
15169
15164
  };
15170
15165
 
15171
15166
  // Private methods
15172
- SignaturePad.prototype._strokeBegin = function (event) {
15167
+ SignaturePad$1.prototype._strokeBegin = function (event) {
15173
15168
  this._data.push([]);
15174
15169
  this._reset();
15175
15170
  this._strokeUpdate(event);
@@ -15179,7 +15174,7 @@
15179
15174
  }
15180
15175
  };
15181
15176
 
15182
- SignaturePad.prototype._strokeUpdate = function (event) {
15177
+ SignaturePad$1.prototype._strokeUpdate = function (event) {
15183
15178
  var x = event.clientX;
15184
15179
  var y = event.clientY;
15185
15180
 
@@ -15207,7 +15202,7 @@
15207
15202
  }
15208
15203
  };
15209
15204
 
15210
- SignaturePad.prototype._strokeEnd = function (event) {
15205
+ SignaturePad$1.prototype._strokeEnd = function (event) {
15211
15206
  var canDrawCurve = this.points.length > 2;
15212
15207
  var point = this.points[0]; // Point instance
15213
15208
 
@@ -15236,7 +15231,7 @@
15236
15231
  }
15237
15232
  };
15238
15233
 
15239
- SignaturePad.prototype._handleMouseEvents = function () {
15234
+ SignaturePad$1.prototype._handleMouseEvents = function () {
15240
15235
  this._mouseButtonDown = false;
15241
15236
 
15242
15237
  this._canvas.addEventListener('mousedown', this._handleMouseDown);
@@ -15244,7 +15239,7 @@
15244
15239
  document.addEventListener('mouseup', this._handleMouseUp);
15245
15240
  };
15246
15241
 
15247
- SignaturePad.prototype._handleTouchEvents = function () {
15242
+ SignaturePad$1.prototype._handleTouchEvents = function () {
15248
15243
  // Pass touch events to canvas element on mobile IE11 and Edge.
15249
15244
  this._canvas.style.msTouchAction = 'none';
15250
15245
  this._canvas.style.touchAction = 'none';
@@ -15254,20 +15249,20 @@
15254
15249
  this._canvas.addEventListener('touchend', this._handleTouchEnd);
15255
15250
  };
15256
15251
 
15257
- SignaturePad.prototype._reset = function () {
15252
+ SignaturePad$1.prototype._reset = function () {
15258
15253
  this.points = [];
15259
15254
  this._lastVelocity = 0;
15260
15255
  this._lastWidth = (this.minWidth + this.maxWidth) / 2;
15261
15256
  this._ctx.fillStyle = this.penColor;
15262
15257
  };
15263
15258
 
15264
- SignaturePad.prototype._createPoint = function (x, y, time) {
15259
+ SignaturePad$1.prototype._createPoint = function (x, y, time) {
15265
15260
  var rect = this._canvas.getBoundingClientRect();
15266
15261
 
15267
15262
  return new Point(x - rect.left, y - rect.top, time || new Date().getTime());
15268
15263
  };
15269
15264
 
15270
- SignaturePad.prototype._addPoint = function (point) {
15265
+ SignaturePad$1.prototype._addPoint = function (point) {
15271
15266
  var points = this.points;
15272
15267
  var tmp = void 0;
15273
15268
 
@@ -15295,7 +15290,7 @@
15295
15290
  return {};
15296
15291
  };
15297
15292
 
15298
- SignaturePad.prototype._calculateCurveControlPoints = function (s1, s2, s3) {
15293
+ SignaturePad$1.prototype._calculateCurveControlPoints = function (s1, s2, s3) {
15299
15294
  var dx1 = s1.x - s2.x;
15300
15295
  var dy1 = s1.y - s2.y;
15301
15296
  var dx2 = s2.x - s3.x;
@@ -15322,7 +15317,7 @@
15322
15317
  };
15323
15318
  };
15324
15319
 
15325
- SignaturePad.prototype._calculateCurveWidths = function (curve) {
15320
+ SignaturePad$1.prototype._calculateCurveWidths = function (curve) {
15326
15321
  var startPoint = curve.startPoint;
15327
15322
  var endPoint = curve.endPoint;
15328
15323
  var widths = { start: null, end: null };
@@ -15340,11 +15335,11 @@
15340
15335
  return widths;
15341
15336
  };
15342
15337
 
15343
- SignaturePad.prototype._strokeWidth = function (velocity) {
15338
+ SignaturePad$1.prototype._strokeWidth = function (velocity) {
15344
15339
  return Math.max(this.maxWidth / (velocity + 1), this.minWidth);
15345
15340
  };
15346
15341
 
15347
- SignaturePad.prototype._drawPoint = function (x, y, size) {
15342
+ SignaturePad$1.prototype._drawPoint = function (x, y, size) {
15348
15343
  var ctx = this._ctx;
15349
15344
 
15350
15345
  ctx.moveTo(x, y);
@@ -15352,7 +15347,7 @@
15352
15347
  this._isEmpty = false;
15353
15348
  };
15354
15349
 
15355
- SignaturePad.prototype._drawCurve = function (curve, startWidth, endWidth) {
15350
+ SignaturePad$1.prototype._drawCurve = function (curve, startWidth, endWidth) {
15356
15351
  var ctx = this._ctx;
15357
15352
  var widthDelta = endWidth - startWidth;
15358
15353
  var drawSteps = Math.floor(curve.length());
@@ -15386,7 +15381,7 @@
15386
15381
  ctx.fill();
15387
15382
  };
15388
15383
 
15389
- SignaturePad.prototype._drawDot = function (point) {
15384
+ SignaturePad$1.prototype._drawDot = function (point) {
15390
15385
  var ctx = this._ctx;
15391
15386
  var width = typeof this.dotSize === 'function' ? this.dotSize() : this.dotSize;
15392
15387
 
@@ -15396,7 +15391,7 @@
15396
15391
  ctx.fill();
15397
15392
  };
15398
15393
 
15399
- SignaturePad.prototype._fromData = function (pointGroups, drawCurve, drawDot) {
15394
+ SignaturePad$1.prototype._fromData = function (pointGroups, drawCurve, drawDot) {
15400
15395
  for (var i = 0; i < pointGroups.length; i += 1) {
15401
15396
  var group = pointGroups[i];
15402
15397
 
@@ -15434,7 +15429,7 @@
15434
15429
  }
15435
15430
  };
15436
15431
 
15437
- SignaturePad.prototype._toSVG = function () {
15432
+ SignaturePad$1.prototype._toSVG = function () {
15438
15433
  var _this2 = this;
15439
15434
 
15440
15435
  var pointGroups = this._data;
@@ -15500,7 +15495,7 @@
15500
15495
  return prefix + btoa(data);
15501
15496
  };
15502
15497
 
15503
- SignaturePad.prototype.fromData = function (pointGroups) {
15498
+ SignaturePad$1.prototype.fromData = function (pointGroups) {
15504
15499
  var _this3 = this;
15505
15500
 
15506
15501
  this.clear();
@@ -15514,13 +15509,13 @@
15514
15509
  this._data = pointGroups;
15515
15510
  };
15516
15511
 
15517
- SignaturePad.prototype.toData = function () {
15512
+ SignaturePad$1.prototype.toData = function () {
15518
15513
  return this._data;
15519
15514
  };
15520
15515
 
15521
15516
  var signature_pad = /*#__PURE__*/Object.freeze({
15522
15517
  __proto__: null,
15523
- 'default': SignaturePad
15518
+ 'default': SignaturePad$1
15524
15519
  });
15525
15520
 
15526
15521
  var build$1 = createCommonjsModule(function (module, exports) {
@@ -15565,55 +15560,43 @@
15565
15560
  return signatureData;
15566
15561
  }
15567
15562
 
15563
+ var SignatureCanvasContainer = styled__default['default'].div(templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject(["\n position: absolute;\n top: 25%;\n left: 15%;\n width: 70%;\n height: 50%;\n\n @media (max-width: 800px) {\n top: 15%;\n left: 2%;\n width: 96%;\n height: 70%;\n }\n"], ["\n position: absolute;\n top: 25%;\n left: 15%;\n width: 70%;\n height: 50%;\n\n @media (max-width: 800px) {\n top: 15%;\n left: 2%;\n width: 96%;\n height: 70%;\n }\n"])));
15564
+ var SignaturePad = styled__default['default'].div(templateObject_2$1 || (templateObject_2$1 = __makeTemplateObject(["\n position: relative;\n background: rgba(255, 255, 255, 0.5);\n border-radius: 16px;\n flex-grow: 1;\n z-index: 100;\n height: 100%;\n"], ["\n position: relative;\n background: rgba(255, 255, 255, 0.5);\n border-radius: 16px;\n flex-grow: 1;\n z-index: 100;\n height: 100%;\n"])));
15565
+ var SignatureButtonsContainer = styled__default['default'].div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n flex-grow: 0;\n padding-top: 12px;\n display: flex;\n z-index: 1000;\n position: relative;\n"], ["\n flex-grow: 0;\n padding-top: 12px;\n display: flex;\n z-index: 1000;\n position: relative;\n"])));
15566
+ var SignaturePaperBacking = styled__default['default'].div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n background-color: #e5e5f7;\n opacity: 0.8;\n background-image: radial-gradient(#444cf7 0.5px, transparent 0.5px),\n radial-gradient(#444cf7 0.5px, #e5e5f7 0.5px);\n background-size: 20px 20px;\n background-position: 0 0, 10px 10px;\n"], ["\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n background-color: #e5e5f7;\n opacity: 0.8;\n background-image: radial-gradient(#444cf7 0.5px, transparent 0.5px),\n radial-gradient(#444cf7 0.5px, #e5e5f7 0.5px);\n background-size: 20px 20px;\n background-position: 0 0, 10px 10px;\n"])));
15567
+ var templateObject_1$1, templateObject_2$1, templateObject_3, templateObject_4;
15568
+
15569
+ var GuidanceMessageContainer = styled__default['default'].div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: absolute;\n top: calc(", ");\n font-weight: bold;\n width: 100%;\n display: flex;\n"], ["\n position: absolute;\n top: calc(", ");\n font-weight: bold;\n width: 100%;\n display: flex;\n"])), function (_a) {
15570
+ var $top = _a.$top;
15571
+ return $top !== null && $top !== void 0 ? $top : '10vh';
15572
+ });
15573
+ var GuidanceMessage = styled__default['default'].div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n margin-left: auto;\n margin-right: auto;\n background: #ccc;\n padding: 10px 12px 8px;\n border-radius: 8px;\n"], ["\n margin-left: auto;\n margin-right: auto;\n background: #ccc;\n padding: 10px 12px 8px;\n border-radius: 8px;\n"])));
15574
+ var templateObject_1, templateObject_2;
15575
+
15568
15576
  var SignatureCapture = function SignatureCapture(_a) {
15569
15577
  var onAccept = _a.onAccept,
15570
- _b = _a.background,
15571
- background = _b === void 0 ? 'white' : _b,
15572
- _c = _a.verbiage,
15573
- verbiage = _c === void 0 ? {} : _c;
15578
+ _b = _a.verbiage,
15579
+ verbiage = _b === void 0 ? {} : _b;
15574
15580
  var t = useTranslation().t;
15575
- var _d = useResizeObserver(),
15576
- ref = _d.ref,
15577
- width = _d.width,
15578
- height = _d.height;
15581
+ var _c = useResizeObserver(),
15582
+ ref = _c.ref,
15583
+ width = _c.width,
15584
+ height = _c.height;
15579
15585
  var signaturePad = React.useRef(null);
15580
15586
  verbiage.headingText = verbiage.headingText || t('Please sign the box below');
15581
15587
  verbiage.acceptBtnText = verbiage.acceptBtnText || t('Accept');
15582
15588
  verbiage.clearBtnText = verbiage.clearBtnText || t('Clear');
15583
- return /*#__PURE__*/React__default['default'].createElement(OverlayContainer, {
15584
- style: {
15585
- background: background
15586
- }
15587
- }, /*#__PURE__*/React__default['default'].createElement(OverlayInner, null, /*#__PURE__*/React__default['default'].createElement("div", {
15588
- style: {
15589
- flexGrow: 0,
15590
- paddingBottom: 12
15591
- }
15592
- }, /*#__PURE__*/React__default['default'].createElement("h3", {
15593
- style: {
15594
- margin: 0
15595
- }
15596
- }, verbiage.headingText)), /*#__PURE__*/React__default['default'].createElement("div", {
15597
- ref: ref,
15598
- style: {
15599
- position: 'relative',
15600
- border: '3px solid #888',
15601
- flexGrow: 1,
15602
- zIndex: '100'
15603
- }
15589
+ return /*#__PURE__*/React__default['default'].createElement(PageContainer, null, /*#__PURE__*/React__default['default'].createElement(SignaturePaperBacking, null, /*#__PURE__*/React__default['default'].createElement(GuidanceMessageContainer, {
15590
+ "$top": "5vh"
15591
+ }, /*#__PURE__*/React__default['default'].createElement(GuidanceMessage, null, verbiage.headingText)), /*#__PURE__*/React__default['default'].createElement(SignatureCanvasContainer, null, /*#__PURE__*/React__default['default'].createElement(SignaturePad, {
15592
+ ref: ref
15604
15593
  }, /*#__PURE__*/React__default['default'].createElement(SignatureCanvas, {
15605
15594
  ref: signaturePad,
15606
15595
  canvasProps: {
15607
15596
  width: width,
15608
- height: (height !== null && height !== void 0 ? height : 500) - 4
15609
- }
15610
- })), /*#__PURE__*/React__default['default'].createElement("div", {
15611
- style: {
15612
- flexGrow: 0,
15613
- paddingTop: 12,
15614
- display: 'flex'
15597
+ height: height
15615
15598
  }
15616
- }, /*#__PURE__*/React__default['default'].createElement("button", {
15599
+ })), /*#__PURE__*/React__default['default'].createElement(SignatureButtonsContainer, null, /*#__PURE__*/React__default['default'].createElement("button", {
15617
15600
  onClick: function onClick(e) {
15618
15601
  var _a;
15619
15602
  e.preventDefault();
@@ -15629,7 +15612,7 @@
15629
15612
  var signatureData = signatureDataToIdmissionFormat(signaturePad.current);
15630
15613
  onAccept === null || onAccept === void 0 ? void 0 : onAccept(signatureData, signaturePad.current.toDataURL());
15631
15614
  }
15632
- }, verbiage.acceptBtnText))));
15615
+ }, verbiage.acceptBtnText)))));
15633
15616
  };
15634
15617
 
15635
15618
  var useVideoRecorder = function useVideoRecorder(camera) {
@@ -15673,7 +15656,6 @@
15673
15656
  };
15674
15657
  };
15675
15658
 
15676
- var SignatureCanvasContainer = styled__default['default'].div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: absolute;\n top: 25%;\n left: 15%;\n width: 70%;\n height: 50%;\n\n @media (max-width: 800px) {\n top: 15%;\n left: 2%;\n width: 96%;\n height: 70%;\n }\n"], ["\n position: absolute;\n top: 25%;\n left: 15%;\n width: 70%;\n height: 50%;\n\n @media (max-width: 800px) {\n top: 15%;\n left: 2%;\n width: 96%;\n height: 70%;\n }\n"])));
15677
15659
  var VideoSignatureCapture = function VideoSignatureCapture(_a) {
15678
15660
  var _b, _c;
15679
15661
  var onComplete = _a.onComplete,
@@ -15816,47 +15798,17 @@
15816
15798
  var guidanceMessage = t('Please sign the box below');
15817
15799
  return /*#__PURE__*/React__default['default'].createElement(PageContainer, {
15818
15800
  className: "flex"
15819
- }, /*#__PURE__*/React__default['default'].createElement(CameraVideoTag, null), guidanceMessage !== '' && /*#__PURE__*/React__default['default'].createElement("div", {
15820
- style: {
15821
- position: 'absolute',
15822
- top: 'calc(5vh)',
15823
- fontWeight: 'bold',
15824
- width: '100%',
15825
- display: 'flex'
15826
- }
15827
- }, /*#__PURE__*/React__default['default'].createElement("div", {
15828
- style: {
15829
- marginLeft: 'auto',
15830
- marginRight: 'auto',
15831
- background: '#ccc',
15832
- padding: '10px 12px 8px',
15833
- borderRadius: 8
15834
- }
15835
- }, guidanceMessage)), /*#__PURE__*/React__default['default'].createElement(SignatureCanvasContainer, null, /*#__PURE__*/React__default['default'].createElement("div", {
15836
- ref: ref,
15837
- style: {
15838
- position: 'relative',
15839
- background: 'rgba(255,255,255,0.5)',
15840
- borderRadius: 16,
15841
- flexGrow: 1,
15842
- zIndex: '100',
15843
- height: '100%'
15844
- }
15801
+ }, /*#__PURE__*/React__default['default'].createElement(CameraVideoTag, null), guidanceMessage !== '' && /*#__PURE__*/React__default['default'].createElement(GuidanceMessageContainer, {
15802
+ "$top": "5vh"
15803
+ }, /*#__PURE__*/React__default['default'].createElement(GuidanceMessage, null, guidanceMessage)), /*#__PURE__*/React__default['default'].createElement(SignatureCanvasContainer, null, /*#__PURE__*/React__default['default'].createElement(SignaturePad, {
15804
+ ref: ref
15845
15805
  }, /*#__PURE__*/React__default['default'].createElement(SignatureCanvas, {
15846
15806
  ref: signaturePad,
15847
15807
  canvasProps: {
15848
15808
  width: width,
15849
15809
  height: height
15850
15810
  }
15851
- })), /*#__PURE__*/React__default['default'].createElement("div", {
15852
- style: {
15853
- flexGrow: 0,
15854
- paddingTop: 12,
15855
- display: 'flex',
15856
- zIndex: 1000,
15857
- position: 'relative'
15858
- }
15859
- }, /*#__PURE__*/React__default['default'].createElement("button", {
15811
+ })), /*#__PURE__*/React__default['default'].createElement(SignatureButtonsContainer, null, /*#__PURE__*/React__default['default'].createElement("button", {
15860
15812
  onClick: function onClick(e) {
15861
15813
  var _a;
15862
15814
  e.preventDefault();
@@ -15888,7 +15840,6 @@
15888
15840
  }
15889
15841
  })));
15890
15842
  };
15891
- var templateObject_1;
15892
15843
 
15893
15844
  var SignatureKYCLoadingOverlay = function SignatureKYCLoadingOverlay(_a) {
15894
15845
  var headingText = _a.headingText,