idmission-web-sdk 2.5.78 → 2.5.79-react16compat.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('platform'), require('tus-js-client'), require('styled-components'), require('react-dom'), require('react-dom/client')) :
3
- typeof define === 'function' && define.amd ? define(['exports', 'react', 'platform', 'tus-js-client', 'styled-components', 'react-dom', 'react-dom/client'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Sdk2 = {}, global.React, global.platform, global.tus, global.styled, global.ReactDOM, global.ReactDOM));
5
- })(this, (function (exports, React, platform, tusJsClient, sc$1, reactDom, ReactDOM) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('platform'), require('tus-js-client'), require('styled-components'), require('react-dom')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', 'react', 'platform', 'tus-js-client', 'styled-components', 'react-dom'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Sdk2 = {}, global.React, global.platform, global.tus, global.styled, global.ReactDOM));
5
+ })(this, (function (exports, React, platform, tusJsClient, sc$1, ReactDOM) { 'use strict';
6
6
 
7
7
  function _interopNamespaceDefault(e) {
8
8
  var n = Object.create(null);
@@ -11686,7 +11686,7 @@
11686
11686
  });
11687
11687
  var portalLocation = document.getElementById('idmission-above-guides-content');
11688
11688
  if (!portalLocation) return element;
11689
- return /*#__PURE__*/reactDom.createPortal(element, portalLocation);
11689
+ return /*#__PURE__*/ReactDOM.createPortal(element, portalLocation);
11690
11690
  }
11691
11691
  var DebugStatsPaneDiv = styled.span(_templateObject$_ || (_templateObject$_ = _taggedTemplateLiteralLoose(["\n font-size: 16px;\n font-family: monospace;\n position: absolute;\n left: 20px;\n bottom: 20px;\n margin-right: 20px;\n padding: 8px;\n color: limegreen;\n background: rgba(0, 0, 0, 0.5);\n z-index: 10002;\n pointer-events: none;\n"])));
11692
11692
  var ObjectDetectionDebugOverlayDiv = styled.div(_templateObject2$Q || (_templateObject2$Q = _taggedTemplateLiteralLoose(["\n position: absolute;\n z-index: 1001;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n max-width: 100%;\n max-height: 100%;\n overflow: hidden;\n pointer-events: none;\n ", "\n transform-style: preserve-3d;\n"])), function (_ref3) {
@@ -12089,7 +12089,7 @@
12089
12089
  }, []);
12090
12090
  if (!target) return null;
12091
12091
  var bottomColor = hiddenBottomColor != null ? hiddenBottomColor : color;
12092
- return /*#__PURE__*/reactDom.createPortal(jsxs(Fragment, {
12092
+ return /*#__PURE__*/ReactDOM.createPortal(jsxs(Fragment, {
12093
12093
  children: [jsx(EdgeStrip, {
12094
12094
  "$edge": "top",
12095
12095
  "$color": color,
@@ -12203,7 +12203,7 @@
12203
12203
  var element = jsx(GuidanceMessageContainerDiv, _extends({}, props));
12204
12204
  var portalLocation = document.getElementById('idmission-above-guides-content');
12205
12205
  if (!portalLocation) return element;
12206
- return /*#__PURE__*/reactDom.createPortal(element, portalLocation);
12206
+ return /*#__PURE__*/ReactDOM.createPortal(element, portalLocation);
12207
12207
  };
12208
12208
  var GuidanceMessage = styled.div(_templateObject2$P || (_templateObject2$P = _taggedTemplateLiteralLoose(["\n margin-left: auto;\n margin-right: auto;\n background: ", ";\n color: ", ";\n border-radius: 8px;\n z-index: 10001;\n padding: 16px 24px;\n font-size: 18px;\n font-weight: bold;\n box-shadow:\n 0 1px 3px 0 rgb(0 0 0 / 0.1),\n 0 1px 2px -1px rgb(0 0 0 / 0.1);\n"])), function (props) {
12209
12209
  var _ref3, _props$$background, _props$theme, _props$$variant;
@@ -24603,7 +24603,9 @@
24603
24603
  _ref$verbiage = _ref.verbiage,
24604
24604
  rawVerbiage = _ref$verbiage === void 0 ? {} : _ref$verbiage,
24605
24605
  _ref$classNames = _ref.classNames,
24606
- classNames = _ref$classNames === void 0 ? {} : _ref$classNames;
24606
+ classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
24607
+ _ref$colors = _ref.colors,
24608
+ colors = _ref$colors === void 0 ? {} : _ref$colors;
24607
24609
  var submitButtonRef = React.useRef(null);
24608
24610
  // Auto-focus submit button when session becomes ready.
24609
24611
  React.useEffect(function () {
@@ -24657,6 +24659,7 @@
24657
24659
  children: [jsx(WideButton, {
24658
24660
  ref: submitButtonRef,
24659
24661
  className: classNames.submitBtn,
24662
+ colors: colors.submitBtn,
24660
24663
  variant: "positive",
24661
24664
  onClick: onSubmit,
24662
24665
  disabled: submission === 'submitting' || !sessionReady,
@@ -24664,6 +24667,7 @@
24664
24667
  children: submission === 'submitting' ? verbiage.submittingText : !sessionReady ? 'Initializing...' : verbiage.submitText
24665
24668
  }), jsx(WideBorderButton, {
24666
24669
  className: classNames.retryBtn,
24670
+ colors: colors.retryBtn,
24667
24671
  variant: "warning",
24668
24672
  onClick: onRetry,
24669
24673
  disabled: submission !== 'idle',
@@ -26160,7 +26164,8 @@
26160
26164
  onSubmit: isFlipInterstitial ? handleConfirmFlip : handleSubmit,
26161
26165
  onRetry: handleRetake,
26162
26166
  verbiage: isFlipInterstitial ? reviewFlipVerbiage : verbiage.review,
26163
- classNames: classNames.review
26167
+ classNames: classNames.review,
26168
+ colors: colors.review
26164
26169
  }), !screenTakeover && state.phase === 'error' && state.error !== null && jsx(ErrorScreen, {
26165
26170
  error: state.error,
26166
26171
  onRetry: handleRetry,
@@ -30098,13 +30103,12 @@
30098
30103
  return props.$verticalAlign === 'bottom' ? 'flex-end' : 'center';
30099
30104
  });
30100
30105
  function SelfieCaptureAnimatedMask(_ref3) {
30101
- var _theme$selfieCapture$4, _theme$selfieCapture4, _theme$selfieCapture$5, _theme$selfieCapture5;
30106
+ var _ref4, _theme$selfieCapture4, _theme$selfieCapture$4, _theme$selfieCapture5, _theme$selfieCapture$5, _theme$selfieCapture6;
30102
30107
  var _ref3$frame = _ref3.frame,
30103
30108
  frame = _ref3$frame === void 0 ? 0 : _ref3$frame,
30104
30109
  _ref3$borderWidth = _ref3.borderWidth,
30105
30110
  borderWidth = _ref3$borderWidth === void 0 ? 5 : _ref3$borderWidth,
30106
- _ref3$borderColor = _ref3.borderColor,
30107
- borderColor = _ref3$borderColor === void 0 ? 'white' : _ref3$borderColor,
30111
+ borderColor = _ref3.borderColor,
30108
30112
  _ref3$borderOpacity = _ref3.borderOpacity,
30109
30113
  borderOpacity = _ref3$borderOpacity === void 0 ? 0.8 : _ref3$borderOpacity,
30110
30114
  _ref3$verticalAlign = _ref3.verticalAlign,
@@ -30114,9 +30118,12 @@
30114
30118
  guideStyle = _ref3.guideStyle,
30115
30119
  props = _objectWithoutPropertiesLoose(_ref3, _excluded3);
30116
30120
  var theme = useTheme();
30117
- var satisfiedColor = (_theme$selfieCapture$4 = (_theme$selfieCapture4 = theme.selfieCapture) == null || (_theme$selfieCapture4 = _theme$selfieCapture4.guides) == null ? void 0 : _theme$selfieCapture4.satisfiedColor) != null ? _theme$selfieCapture$4 : 'var(--idm-color-positive-600)';
30118
- var negativeColor = (_theme$selfieCapture$5 = (_theme$selfieCapture5 = theme.selfieCapture) == null || (_theme$selfieCapture5 = _theme$selfieCapture5.guides) == null ? void 0 : _theme$selfieCapture5.failureColor) != null ? _theme$selfieCapture$5 : 'var(--idm-color-negative-600)';
30119
- var statusBorderColor = status === 'failure' ? negativeColor : status === 'success' ? satisfiedColor : borderColor;
30121
+ // The outline while no face is framed yet. An explicit `borderColor` wins,
30122
+ // as the video-ID guides pass their own.
30123
+ var unsatisfiedColor = (_ref4 = borderColor != null ? borderColor : (_theme$selfieCapture4 = theme.selfieCapture) == null || (_theme$selfieCapture4 = _theme$selfieCapture4.guides) == null ? void 0 : _theme$selfieCapture4.unsatisfiedColor) != null ? _ref4 : 'white';
30124
+ var satisfiedColor = (_theme$selfieCapture$4 = (_theme$selfieCapture5 = theme.selfieCapture) == null || (_theme$selfieCapture5 = _theme$selfieCapture5.guides) == null ? void 0 : _theme$selfieCapture5.satisfiedColor) != null ? _theme$selfieCapture$4 : 'var(--idm-color-positive-600)';
30125
+ var negativeColor = (_theme$selfieCapture$5 = (_theme$selfieCapture6 = theme.selfieCapture) == null || (_theme$selfieCapture6 = _theme$selfieCapture6.guides) == null ? void 0 : _theme$selfieCapture6.failureColor) != null ? _theme$selfieCapture$5 : 'var(--idm-color-negative-600)';
30126
+ var statusBorderColor = status === 'failure' ? negativeColor : status === 'success' ? satisfiedColor : unsatisfiedColor;
30120
30127
  return jsxs(RelativeSvgContainer, {
30121
30128
  "$verticalAlign": verticalAlign,
30122
30129
  children: [jsx(HeadGuide, _extends({
@@ -30312,10 +30319,10 @@
30312
30319
  }))]
30313
30320
  });
30314
30321
  }
30315
- function SelfieCaptureAnimatedMaskWithStatus(_ref4) {
30316
- var _ref4$status = _ref4.status,
30317
- status = _ref4$status === void 0 ? 'ready' : _ref4$status,
30318
- props = _objectWithoutPropertiesLoose(_ref4, _excluded4);
30322
+ function SelfieCaptureAnimatedMaskWithStatus(_ref5) {
30323
+ var _ref5$status = _ref5.status,
30324
+ status = _ref5$status === void 0 ? 'ready' : _ref5$status,
30325
+ props = _objectWithoutPropertiesLoose(_ref5, _excluded4);
30319
30326
  var _useState3 = React.useState(1),
30320
30327
  _useState4 = _slicedToArray(_useState3, 2),
30321
30328
  frame = _useState4[0],
@@ -30356,8 +30363,7 @@
30356
30363
  guideStyle = _ref.guideStyle,
30357
30364
  _ref$borderWidth = _ref.borderWidth,
30358
30365
  borderWidth = _ref$borderWidth === void 0 ? 5 : _ref$borderWidth,
30359
- _ref$borderColor = _ref.borderColor,
30360
- borderColor = _ref$borderColor === void 0 ? 'white' : _ref$borderColor,
30366
+ borderColor = _ref.borderColor,
30361
30367
  _ref$borderOpacity = _ref.borderOpacity,
30362
30368
  borderOpacity = _ref$borderOpacity === void 0 ? 0.8 : _ref$borderOpacity;
30363
30369
  return jsx(FaceCaptureGuideContainer, {
@@ -37646,6 +37652,8 @@
37646
37652
  verbiage = _ref.verbiage,
37647
37653
  _ref$classNames = _ref.classNames,
37648
37654
  classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
37655
+ _ref$colors = _ref.colors,
37656
+ colors = _ref$colors === void 0 ? {} : _ref$colors,
37649
37657
  _ref$assets = _ref.assets,
37650
37658
  assets = _ref$assets === void 0 ? {} : _ref$assets,
37651
37659
  providedVideoRef = _ref.videoRef,
@@ -38019,6 +38027,8 @@
38019
38027
  children: [text.headingText && (!legacyVideoLayout || sessionReady) ? jsx(SignatureHeading, {
38020
38028
  as: "h1",
38021
38029
  className: classNames.heading,
38030
+ "$background": colors.headingBackgroundColor,
38031
+ "$textColor": colors.headingTextColor,
38022
38032
  "$legacyVideoLayout": legacyVideoLayout,
38023
38033
  children: text.headingText
38024
38034
  }) : null, !legacyVideoLayout ? jsx(Guidance, {
@@ -38078,6 +38088,7 @@
38078
38088
  variant: "warning",
38079
38089
  finished: true,
38080
38090
  className: classNames.retryBtn,
38091
+ colors: colors.retryBtn,
38081
38092
  onClick: function onClick() {
38082
38093
  var _padRef$current3;
38083
38094
  (_padRef$current3 = padRef.current) == null || _padRef$current3.clear();
@@ -38088,6 +38099,7 @@
38088
38099
  variant: "positive",
38089
38100
  finished: true,
38090
38101
  className: classNames.doneBtn,
38102
+ colors: colors.doneBtn,
38091
38103
  onClick: handleDone,
38092
38104
  children: text.doneBtnText
38093
38105
  })]
@@ -38097,6 +38109,7 @@
38097
38109
  return handledByState(controller.actions.retry());
38098
38110
  },
38099
38111
  classNames: classNames.microphoneAccessDenied,
38112
+ colors: colors.microphoneAccessDenied,
38100
38113
  verbiage: verbiage == null ? void 0 : verbiage.microphoneAccessDenied
38101
38114
  }) : null, state.phase === "error" && !micDenied && recordingInterrupted && !restarting && RecordingInterruptedScreen ? jsx(RecordingInterruptedScreen, {
38102
38115
  onStartOver: handleStartOver,
@@ -39944,7 +39957,7 @@
39944
39957
  });
39945
39958
  }
39946
39959
  function VideoIdCaptureViewContent(_ref) {
39947
- var _state$error, _state$artifact2, _state$artifact4, _state$artifact5, _state$error2, _state$error3;
39960
+ var _state$error, _state$artifact2, _state$artifact4, _state$artifact5, _state$error2, _state$error3, _colors$loadingOverla;
39948
39961
  var controller = _ref.controller,
39949
39962
  sessionReadyProp = _ref.sessionReady,
39950
39963
  _ref$autoStart = _ref.autoStart,
@@ -39967,6 +39980,8 @@
39967
39980
  verbiage = _ref.verbiage,
39968
39981
  _ref$classNames = _ref.classNames,
39969
39982
  classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
39983
+ _ref$colors = _ref.colors,
39984
+ colors = _ref$colors === void 0 ? {} : _ref$colors,
39970
39985
  _ref$guideImages = _ref.guideImages,
39971
39986
  guideImages = _ref$guideImages === void 0 ? defaultIdCaptureGuideImages : _ref$guideImages,
39972
39987
  loadingOverlayAssets = _ref.loadingOverlayAssets,
@@ -40145,6 +40160,7 @@
40145
40160
  finished: true,
40146
40161
  disabled: !state.reading.canFinish,
40147
40162
  className: classNames.readTextDoneBtn,
40163
+ colors: colors.readTextDoneBtn,
40148
40164
  onClick: function onClick() {
40149
40165
  onReadingFinished == null || onReadingFinished();
40150
40166
  void controller.actions.finishReading();
@@ -40164,6 +40180,7 @@
40164
40180
  transitionFromPreviousStage: transitionFromFaceCapture,
40165
40181
  assets: loadingOverlayAssets,
40166
40182
  classNames: classNames.loadingOverlay,
40183
+ colors: colors.loadingOverlay,
40167
40184
  verbiage: loadingOverlayVerbiage,
40168
40185
  onDismissed: function onDismissed() {
40169
40186
  return setOverlayDismissed(true);
@@ -40199,6 +40216,7 @@
40199
40216
  finished: true,
40200
40217
  variant: "warning",
40201
40218
  className: classNames.retryBtn,
40219
+ colors: colors.retryBtn,
40202
40220
  onClick: function onClick() {
40203
40221
  return void controller.actions.retry();
40204
40222
  },
@@ -40207,6 +40225,7 @@
40207
40225
  finished: true,
40208
40226
  variant: "positive",
40209
40227
  className: classNames.doneBtn,
40228
+ colors: colors.doneBtn,
40210
40229
  onClick: controller.actions.done,
40211
40230
  children: text.doneBtnText
40212
40231
  })]
@@ -40216,6 +40235,7 @@
40216
40235
  return void controller.actions.retry();
40217
40236
  },
40218
40237
  classNames: classNames.microphoneAccessDenied,
40238
+ colors: colors.microphoneAccessDenied,
40219
40239
  verbiage: verbiage == null ? void 0 : verbiage.microphoneAccessDenied
40220
40240
  }) : null, state.phase === 'error' && !micDenied ? jsxs(ErrorPanel, {
40221
40241
  role: "alert",
@@ -40226,6 +40246,10 @@
40226
40246
  children: (_state$error2 = state.error) == null ? void 0 : _state$error2.message
40227
40247
  }), (_state$error3 = state.error) != null && _state$error3.recoverable ? jsx(LoaderButton, {
40228
40248
  finished: true,
40249
+ // This panel is the video-ID stage's camera-denied screen too;
40250
+ // sdk2 coloured that screen's retry from the loading overlay bag.
40251
+ // An unavailable camera was the same 2.x screen (see ErrorScreen).
40252
+ colors: state.error.code === 'CAMERA_PERMISSION_DENIED' || state.error.code === 'CAMERA_UNAVAILABLE' ? (_colors$loadingOverla = colors.loadingOverlay) == null || (_colors$loadingOverla = _colors$loadingOverla.cameraAccessDenied) == null ? void 0 : _colors$loadingOverla.retryBtn : undefined,
40229
40253
  onClick: function onClick() {
40230
40254
  return void controller.actions.retry();
40231
40255
  },
@@ -52014,7 +52038,8 @@
52014
52038
  * async decision, so the mapper cannot know which path will run, and dropping
52015
52039
  * the flow-level classes for a customer who set only those would be the same
52016
52040
  * "my CSS stopped applying" failure this gate exists to catch. The more
52017
- * specific bag still wins wherever both name the same leaf.
52041
+ * specific bag still wins wherever both name the same leaf. Callers merge only
52042
+ * when the video path can run at all.
52018
52043
  */
52019
52044
  function mergeStyleBags(base, override) {
52020
52045
  if (!base) return override;
@@ -52327,32 +52352,43 @@
52327
52352
  }
52328
52353
  return compactOrUndefined(copy);
52329
52354
  }
52355
+ /**
52356
+ * One stage's colour bag. Unlike `stageBag`, a multi-stage flow (`prefixed`)
52357
+ * never falls back to the root: its root `success` is a DIFFERENT screen's
52358
+ * (the video-ID or signature review), so the fallback would paint that
52359
+ * screen's buttons onto this stage's.
52360
+ */
52361
+ function colorStage(rawBag, stage, prefixed) {
52362
+ return prefixed ? subBag(rawBag, stage) : stageBag(rawBag, stage);
52363
+ }
52330
52364
  /**
52331
52365
  * The half of sdk2's `colors` bag that stayed a component prop: the per-screen
52332
52366
  * BUTTON colours. Everything else in the bag is a theme field now — see
52333
52367
  * `mapThemeWithColors` in ./themes.ts, which the flows apply to `theme`.
52334
52368
  *
52335
- * The ID side keeps the loading overlay's continue button and the
52336
- * camera-denied retry button (the face mapper below already kept both). sdk2's
52337
- * `success.doneBtn`/`success.retryBtn` have no per-screen home: 3.0's
52338
- * ReviewScreen colours its buttons by `variant` off `theme.buttons`, so those
52339
- * two are reported in `__fixtures__/dispositions.md` as theme-level rather
52340
- * than silently dropped here.
52369
+ * The ID side keeps the loading overlay's buttons, the fallback screen's, and
52370
+ * sdk2's `success` pair, which is the review screen's.
52341
52371
  */
52342
- function mapIdColors(rawBag) {
52343
- var bag = stageBag(rawBag, 'idCapture');
52372
+ function mapIdColors(rawBag, prefixed) {
52373
+ var bag = colorStage(rawBag, 'idCapture', prefixed);
52344
52374
  if (!bag) return undefined;
52345
52375
  var loadingOverlay = bag.loadingOverlay;
52376
+ var success = subBag(bag, 'success');
52346
52377
  return compactOrUndefined({
52347
52378
  loadingOverlay: compactOrUndefined({
52348
52379
  continueBtn: loadingOverlay === null || loadingOverlay === void 0 ? void 0 : loadingOverlay.continueBtn,
52349
52380
  cameraAccessDenied: loadingOverlay === null || loadingOverlay === void 0 ? void 0 : loadingOverlay.cameraAccessDenied
52381
+ }),
52382
+ fallback: bag.fallback,
52383
+ review: compactOrUndefined({
52384
+ submitBtn: success === null || success === void 0 ? void 0 : success.doneBtn,
52385
+ retryBtn: success === null || success === void 0 ? void 0 : success.retryBtn
52350
52386
  })
52351
52387
  });
52352
52388
  }
52353
52389
  /** The same for the face stage, whose success/failure screens DO take colours. */
52354
- function mapFaceColors(rawBag) {
52355
- var bag = stageBag(rawBag, 'faceLiveness');
52390
+ function mapFaceColors(rawBag, prefixed) {
52391
+ var bag = colorStage(rawBag, 'faceLiveness', prefixed);
52356
52392
  if (!bag) return undefined;
52357
52393
  var loadingOverlay = bag.loadingOverlay;
52358
52394
  return compactOrUndefined({
@@ -52529,6 +52565,61 @@
52529
52565
  microphoneAccessDenied: subBag(subBag(bag, 'loadingOverlay'), 'microphoneAccessDenied')
52530
52566
  });
52531
52567
  }
52568
+ /**
52569
+ * The microphone-denied screen's colours. sdk2 showed that screen from the
52570
+ * loading overlay of the stage that asked for the microphone: the selfie
52571
+ * stage, on both the video signature and video ID (IdVideoCaptureWizard.tsx
52572
+ * asks only once ID capture is over). So each view reads that stage, then the
52573
+ * other, then a flat bag's own `loadingOverlay`.
52574
+ */
52575
+ function micDeniedColors(colors, first, second) {
52576
+ var _a, _b;
52577
+ var read = function read(bag) {
52578
+ return subBag(subBag(bag, 'loadingOverlay'), 'microphoneAccessDenied');
52579
+ };
52580
+ return (_b = (_a = read(subBag(colors, first))) !== null && _a !== void 0 ? _a : read(subBag(colors, second))) !== null && _b !== void 0 ? _b : read(colors);
52581
+ }
52582
+ /**
52583
+ * sdk2's video-signature colours (`VideoSignatureColors`) ->
52584
+ * `SignatureCaptureViewColors`. `bag` is that bag: the root on SignatureKYC,
52585
+ * `videoSignatureCapture` everywhere else. `flowColors` is the flow's whole
52586
+ * bag, for the microphone screen, which the selfie overlay showed first.
52587
+ */
52588
+ function mapSignatureColors(bag, flowColors) {
52589
+ var success = subBag(bag, 'success');
52590
+ return compactOrUndefined({
52591
+ headingBackgroundColor: bag === null || bag === void 0 ? void 0 : bag.guidanceMessageBackgroundColor,
52592
+ headingTextColor: bag === null || bag === void 0 ? void 0 : bag.guidanceMessageTextColor,
52593
+ retryBtn: success === null || success === void 0 ? void 0 : success.retryBtn,
52594
+ doneBtn: success === null || success === void 0 ? void 0 : success.doneBtn,
52595
+ microphoneAccessDenied: micDeniedColors(flowColors, 'faceLiveness', 'idCapture')
52596
+ });
52597
+ }
52598
+ /**
52599
+ * sdk2's video-ID wizard colours (`VideoIdWizardColors`, or VideoIdValidation's
52600
+ * root, the same shape) -> `VideoIdCaptureViewColors`. The guide colours are
52601
+ * theme fields (./themes.ts). The ID stage's loading overlay is the one this
52602
+ * view embeds. A camera denial here is on the front camera, which sdk2's
52603
+ * selfie stage asked for, so that stage's denied colours come first, as for
52604
+ * the microphone.
52605
+ */
52606
+ function mapVideoIdColors(bag) {
52607
+ var _a;
52608
+ var capture = subBag(bag, 'idVideoCapture');
52609
+ var success = subBag(bag, 'success');
52610
+ var idOverlay = subBag(subBag(bag, 'idCapture'), 'loadingOverlay');
52611
+ var faceOverlay = subBag(subBag(bag, 'faceLiveness'), 'loadingOverlay');
52612
+ return compactOrUndefined({
52613
+ readTextDoneBtn: capture === null || capture === void 0 ? void 0 : capture.readTextDoneBtn,
52614
+ retryBtn: success === null || success === void 0 ? void 0 : success.retryBtn,
52615
+ doneBtn: success === null || success === void 0 ? void 0 : success.doneBtn,
52616
+ loadingOverlay: compactOrUndefined({
52617
+ continueBtn: idOverlay === null || idOverlay === void 0 ? void 0 : idOverlay.continueBtn,
52618
+ cameraAccessDenied: (_a = faceOverlay === null || faceOverlay === void 0 ? void 0 : faceOverlay.cameraAccessDenied) !== null && _a !== void 0 ? _a : idOverlay === null || idOverlay === void 0 ? void 0 : idOverlay.cameraAccessDenied
52619
+ }),
52620
+ microphoneAccessDenied: micDeniedColors(bag, 'faceLiveness', 'idCapture')
52621
+ });
52622
+ }
52532
52623
  /**
52533
52624
  * sdk2's `idVideoCapture` and video `success` copy ->
52534
52625
  * `VideoIdCaptureViewVerbiage`. The read-aloud keys are renamed, as
@@ -52676,7 +52767,7 @@
52676
52767
  onExitAfterTamperSealPopped: props.onExitAfterTamperSealPopped,
52677
52768
  verbiage: mapIdVerbiage(props.verbiage),
52678
52769
  classNames: mapIdClassNames(props.classNames),
52679
- colors: mapIdColors(props.colors),
52770
+ colors: mapIdColors(props.colors, prefixed),
52680
52771
  assets: mapIdViewAssets(props.assets, guideImages)
52681
52772
  });
52682
52773
  return {
@@ -52769,7 +52860,7 @@
52769
52860
  customOverlayContent: props.customOverlayContent,
52770
52861
  verbiage: mapFaceVerbiage(props.verbiage),
52771
52862
  classNames: mapFaceClassNames(props.classNames),
52772
- colors: mapFaceColors(props.colors),
52863
+ colors: mapFaceColors(props.colors, prefixed),
52773
52864
  assets: mapFaceAssets(props.assets)
52774
52865
  });
52775
52866
  return {
@@ -52910,6 +53001,8 @@
52910
53001
  * guidesUnsatisfiedColor -> selfieCapture.guides.unsatisfiedColor
52911
53002
  * guidanceMessages*Satisfied* -> guidanceMessages.positive.*
52912
53003
  * guidanceMessages*Unsatisfied* -> guidanceMessages.default.*
53004
+ * idVideoCapture.guides*Color -> idVideoCapture.{faceGuides,idCardGuides}.*
53005
+ * and selfieCapture.guides.*, over guides*
52913
53006
  *
52914
53007
  * The satisfied/unsatisfied split maps onto `positive`/`default` because that
52915
53008
  * is the pair the views actually select between (`IdCaptureView` renders the
@@ -52920,6 +53013,7 @@
52920
53013
  * (`colors.guideBoxSatisfiedColor ?? theme…`, IdCapture.tsx:236-239).
52921
53014
  */
52922
53015
  function themeFromColors(rawColors) {
53016
+ var _a, _b;
52923
53017
  if (!rawColors) return undefined;
52924
53018
  // Same two shapes as the other style bags (see `stageBag` in ./shared.ts):
52925
53019
  // single-stage flows declare these fields FLAT, multi-stage ones nest one
@@ -52954,9 +53048,15 @@
52954
53048
  satisfiedColor: fromId('guideBoxSatisfiedColor'),
52955
53049
  unsatisfiedColor: fromId('guideBoxUnsatisfiedColor')
52956
53050
  });
53051
+ // Only ever nested: no flat flow has a video-ID stage. sdk2 coloured the face
53052
+ // and card guides with the same pair (IdVideoCapture.tsx:608-617), and its
53053
+ // liveness guide too, in place of the face stage's own
53054
+ // (IdVideoCaptureWizard.tsx:357-369). 3.0's video-ID liveness stage is the
53055
+ // flow's selfie stage, so the pair wins the selfie guides.
53056
+ var videoStage = stageColors(rawColors, 'idVideoCapture');
52957
53057
  var guides = stripUndefined({
52958
- satisfiedColor: fromFace('guidesSatisfiedColor'),
52959
- unsatisfiedColor: fromFace('guidesUnsatisfiedColor')
53058
+ satisfiedColor: (_a = videoStage.guidesSatisfiedColor) !== null && _a !== void 0 ? _a : fromFace('guidesSatisfiedColor'),
53059
+ unsatisfiedColor: (_b = videoStage.guidesUnsatisfiedColor) !== null && _b !== void 0 ? _b : fromFace('guidesUnsatisfiedColor')
52960
53060
  });
52961
53061
  var positive = stripUndefined({
52962
53062
  backgroundColor: shared('guidanceMessagesSatisfiedBackgroundColor'),
@@ -52966,6 +53066,10 @@
52966
53066
  backgroundColor: shared('guidanceMessagesUnsatisfiedBackgroundColor'),
52967
53067
  textColor: shared('guidanceMessagesUnsatisfiedTextColor')
52968
53068
  });
53069
+ var videoGuides = stripUndefined({
53070
+ satisfiedColor: videoStage.guidesSatisfiedColor,
53071
+ unsatisfiedColor: videoStage.guidesUnsatisfiedColor
53072
+ });
52969
53073
  var out = {};
52970
53074
  if (!isEmptyRecord(guideBox)) out.idCapture = {
52971
53075
  guideBox: guideBox
@@ -52973,6 +53077,12 @@
52973
53077
  if (!isEmptyRecord(guides)) out.selfieCapture = {
52974
53078
  guides: guides
52975
53079
  };
53080
+ if (!isEmptyRecord(videoGuides)) {
53081
+ out.idVideoCapture = {
53082
+ faceGuides: videoGuides,
53083
+ idCardGuides: videoGuides
53084
+ };
53085
+ }
52976
53086
  var guidanceMessages = {};
52977
53087
  if (!isEmptyRecord(positive)) guidanceMessages.positive = positive;
52978
53088
  if (!isEmptyRecord(byDefault)) guidanceMessages["default"] = byDefault;
@@ -53087,7 +53197,10 @@
53087
53197
  activeCopy = _b[1];
53088
53198
  return compactOrUndefined({
53089
53199
  classNames: mapSignatureClassNames(mergeStyleBags(baseClasses, activeClasses)),
53090
- verbiage: compactOrUndefined(_assign(_assign({}, mapSignatureVerbiage(baseCopy)), mapSignatureVerbiage(activeCopy)))
53200
+ verbiage: compactOrUndefined(_assign(_assign({}, mapSignatureVerbiage(baseCopy)), mapSignatureVerbiage(activeCopy))),
53201
+ // Only the video signature took colours in 2.x; sdk2's still
53202
+ // `SignatureCapture` had no colours prop.
53203
+ colors: props.captureSignature ? undefined : mapSignatureColors(subBag(props.colors, 'videoSignatureCapture'), props.colors)
53091
53204
  });
53092
53205
  }
53093
53206
  /**
@@ -53364,7 +53477,7 @@
53364
53477
  }
53365
53478
  // --- 4. SignatureKYC ------------------------------------------------------
53366
53479
  function mapSignatureKYCProps(props, ctx) {
53367
- var _a, _b, _c, _d, _e, _f;
53480
+ var _a, _b, _c, _d, _e, _f, _g;
53368
53481
  if (ctx === void 0) {
53369
53482
  ctx = EMPTY_CONTEXT;
53370
53483
  }
@@ -53396,7 +53509,10 @@
53396
53509
  verbiage: mergeStyleBags(compactOrUndefined({
53397
53510
  cameraStoreProvider: subBag(signatureVerbiage, 'cameraStoreProvider')
53398
53511
  }), (_c = signatureVerbiage === null || signatureVerbiage === void 0 ? void 0 : signatureVerbiage.faceLiveness) !== null && _c !== void 0 ? _c : nestedFaceProps.verbiage),
53399
- assets: (_d = signatureAssets === null || signatureAssets === void 0 ? void 0 : signatureAssets.faceLiveness) !== null && _d !== void 0 ? _d : nestedFaceProps.assets
53512
+ assets: (_d = signatureAssets === null || signatureAssets === void 0 ? void 0 : signatureAssets.faceLiveness) !== null && _d !== void 0 ? _d : nestedFaceProps.assets,
53513
+ // The root bag's `success` is the signature review's, so the face stage
53514
+ // reads only its own.
53515
+ colors: (_e = subBag(props.colors, 'faceLiveness')) !== null && _e !== void 0 ? _e : nestedFaceProps.colors
53400
53516
  });
53401
53517
  var face = mapFaceCapture(faceInputs);
53402
53518
  var nested = props.faceLivenessProps;
@@ -53442,7 +53558,7 @@
53442
53558
  // rather than in the shared mapper: `faceInputs` has already folded the
53443
53559
  // nested `faceLivenessProps` bag in, so a nested `true` is honoured and
53444
53560
  // only a genuinely absent prop falls back to 2.x's `false`.
53445
- debugShowSamplePoints: (_e = face.view.debugShowSamplePoints) !== null && _e !== void 0 ? _e : false,
53561
+ debugShowSamplePoints: (_f = face.view.debugShowSamplePoints) !== null && _f !== void 0 ? _f : false,
53446
53562
  onExitAfterFailure: typeof faceInputs.onExitAfterFailure === 'function' ? function () {
53447
53563
  var _a, _b;
53448
53564
  return faceInputs.onExitAfterFailure(null, (_b = (_a = ctx.lastLivenessRequest) === null || _a === void 0 ? void 0 : _a.call(ctx)) !== null && _b !== void 0 ? _b : null);
@@ -53492,7 +53608,8 @@
53492
53608
  showCaptureDiagnostics: props.debugMode,
53493
53609
  recordingInterruptedComponent: props.recordingInterruptedComponent,
53494
53610
  classNames: mapSignatureClassNames(signatureClassNames),
53495
- verbiage: mapSignatureVerbiage(signatureVerbiage)
53611
+ verbiage: mapSignatureVerbiage(signatureVerbiage),
53612
+ colors: mapSignatureColors(props.colors, props.colors)
53496
53613
  }),
53497
53614
  allowVirtualCameras: props.allowVirtualCameras,
53498
53615
  skipLivenessValidation: props.skipLivenessValidation,
@@ -53503,7 +53620,7 @@
53503
53620
  showFaceGuideThenSignaturePad: props.showFaceGuideThenSignaturePad,
53504
53621
  submission: mapSubmission(props),
53505
53622
  theme: mapThemeWithColors(props.theme, props.colors),
53506
- className: (_f = props.classNames) === null || _f === void 0 ? void 0 : _f.container,
53623
+ className: (_g = props.classNames) === null || _g === void 0 ? void 0 : _g.container,
53507
53624
  geolocationEnabled: props.geolocationEnabled,
53508
53625
  geolocationRequired: props.geolocationRequired,
53509
53626
  captureProgress: props.captureProgress,
@@ -53593,7 +53710,8 @@
53593
53710
  guideImages: props.idCaptureGuideImages,
53594
53711
  onExit: props.onExitCapture,
53595
53712
  classNames: mapVideoIdViewClassNames(props.classNames),
53596
- verbiage: mapVideoIdViewVerbiage(props.verbiage)
53713
+ verbiage: mapVideoIdViewVerbiage(props.verbiage),
53714
+ colors: mapVideoIdColors(props.colors)
53597
53715
  }),
53598
53716
  // sdk2 spread the verbiage sentence over this prop, so it wins for
53599
53717
  // display; only the prop turns the read-aloud stage on (`readText` above).
@@ -53874,12 +53992,17 @@
53874
53992
  // separate component instances there, but the very same `idView`/`faceView`
53875
53993
  // here, because `buildVideoIdSteps` reuses them. Folding the wrapper in
53876
53994
  // before the stage mappers run is what gives those sub-bags a destination;
53877
- // see `mergeStyleBags` for why it merges rather than overriding.
53995
+ // see `mergeStyleBags` for why it merges rather than overriding. With video
53996
+ // ID off (false or unset) the wrapper's wizard never runs, so its bags do not
53997
+ // apply; an async `captureVideoId` might, so they merge.
53998
+ var videoBag = function videoBag(bag) {
53999
+ return props.captureVideoId ? subBag(bag, 'videoIdCapture') : undefined;
54000
+ };
53878
54001
  var styled = _assign(_assign({}, props), {
53879
- classNames: mergeStyleBags(props.classNames, subBag(props.classNames, 'videoIdCapture')),
53880
- verbiage: mergeStyleBags(props.verbiage, subBag(props.verbiage, 'videoIdCapture')),
53881
- assets: mergeStyleBags(props.assets, subBag(props.assets, 'videoIdCapture')),
53882
- colors: mergeStyleBags(props.colors, subBag(props.colors, 'videoIdCapture'))
54002
+ classNames: mergeStyleBags(props.classNames, videoBag(props.classNames)),
54003
+ verbiage: mergeStyleBags(props.verbiage, videoBag(props.verbiage)),
54004
+ assets: mergeStyleBags(props.assets, videoBag(props.assets)),
54005
+ colors: mergeStyleBags(props.colors, videoBag(props.colors))
53883
54006
  });
53884
54007
  var id = mapIdCapture(styled, true);
53885
54008
  var face = mapFaceCapture(styled, true);
@@ -53917,7 +54040,8 @@
53917
54040
  })),
53918
54041
  videoIdView: compactOrUndefined({
53919
54042
  classNames: mapVideoIdViewClassNames(subBag(props.classNames, 'videoIdCapture')),
53920
- verbiage: mapVideoIdViewVerbiage(subBag(props.verbiage, 'videoIdCapture'))
54043
+ verbiage: mapVideoIdViewVerbiage(subBag(props.verbiage, 'videoIdCapture')),
54044
+ colors: mapVideoIdColors(subBag(props.colors, 'videoIdCapture'))
53921
54045
  }),
53922
54046
  captureSignature: props.captureSignature,
53923
54047
  captureSignatureVideo: props.captureSignatureVideo,
@@ -53926,7 +54050,7 @@
53926
54050
  enrollmentId: props.enrollmentId
53927
54051
  }),
53928
54052
  initialArtifacts: mapInitialArtifacts(props),
53929
- theme: mapThemeWithColors(props.theme, props.colors),
54053
+ theme: mapThemeWithColors(props.theme, styled.colors),
53930
54054
  className: (_b = props.classNames) === null || _b === void 0 ? void 0 : _b.container,
53931
54055
  ringScreenClassNames: mapRingScreenClassNames(props.classNames),
53932
54056
  additionalDocumentClassNames: mapAdditionalDocumentClassNames(props.classNames),
@@ -53949,7 +54073,7 @@
53949
54073
  });
53950
54074
  }
53951
54075
 
53952
- var webSdkVersion = '2.5.78';
54076
+ var webSdkVersion = '2.5.79-react16compat.0';
53953
54077
 
53954
54078
  // GENERATED by scripts/styleBagTypes.mjs from
53955
54079
  // src/__fixtures__/sdk2StyleBags.json and the mapper sweep — do not
@@ -55300,13 +55424,7 @@
55300
55424
  "videoSignatureCapture.cameraStoreProvider": 2
55301
55425
  },
55302
55426
  "colors": {
55303
- "loadingOverlay.microphoneAccessDenied": 2,
55304
- "success": 2,
55305
- "fallback": 2,
55306
- "videoSignatureCapture.guidanceMessageBackgroundColor": 2,
55307
- "videoSignatureCapture.guidanceMessageTextColor": 2,
55308
- "videoSignatureCapture.faceLiveness": 0,
55309
- "videoSignatureCapture.success": 2
55427
+ "videoSignatureCapture.faceLiveness": 0
55310
55428
  }
55311
55429
  },
55312
55430
  "FaceValidation": {
@@ -55320,7 +55438,7 @@
55320
55438
  "successScreen": 2
55321
55439
  },
55322
55440
  "colors": {
55323
- "loadingOverlay.microphoneAccessDenied": 2
55441
+ "loadingOverlay.microphoneAccessDenied": 1
55324
55442
  }
55325
55443
  },
55326
55444
  "IdAndFaceValidation": {
@@ -55351,14 +55469,7 @@
55351
55469
  "videoSignatureCapture.cameraStoreProvider": 2
55352
55470
  },
55353
55471
  "colors": {
55354
- "idCapture.loadingOverlay.microphoneAccessDenied": 2,
55355
- "idCapture.success": 2,
55356
- "idCapture.fallback": 2,
55357
- "faceLiveness.loadingOverlay.microphoneAccessDenied": 2,
55358
- "videoSignatureCapture.guidanceMessageBackgroundColor": 2,
55359
- "videoSignatureCapture.guidanceMessageTextColor": 2,
55360
- "videoSignatureCapture.faceLiveness": 0,
55361
- "videoSignatureCapture.success": 2
55472
+ "videoSignatureCapture.faceLiveness": 0
55362
55473
  }
55363
55474
  },
55364
55475
  "SignatureKYC": {
@@ -55377,11 +55488,6 @@
55377
55488
  "verbiage": {
55378
55489
  "finishingScreen": 2,
55379
55490
  "successScreen": 2
55380
- },
55381
- "colors": {
55382
- "guidanceMessageBackgroundColor": 2,
55383
- "guidanceMessageTextColor": 2,
55384
- "faceLiveness.loadingOverlay.microphoneAccessDenied": 2
55385
55491
  }
55386
55492
  },
55387
55493
  "VideoIdValidation": {
@@ -55421,15 +55527,7 @@
55421
55527
  "videoSignatureCapture.cameraStoreProvider": 2
55422
55528
  },
55423
55529
  "colors": {
55424
- "idCapture.loadingOverlay.microphoneAccessDenied": 2,
55425
- "idCapture.success": 2,
55426
- "idCapture.fallback": 2,
55427
- "faceLiveness.loadingOverlay.microphoneAccessDenied": 2,
55428
- "idVideoCapture": 2,
55429
- "videoSignatureCapture.guidanceMessageBackgroundColor": 2,
55430
- "videoSignatureCapture.guidanceMessageTextColor": 2,
55431
- "videoSignatureCapture.faceLiveness": 0,
55432
- "videoSignatureCapture.success": 2
55530
+ "videoSignatureCapture.faceLiveness": 0
55433
55531
  }
55434
55532
  },
55435
55533
  "CustomerBiometricsEnrollment": {
@@ -55452,11 +55550,7 @@
55452
55550
  "videoSignatureCapture.cameraStoreProvider": 2
55453
55551
  },
55454
55552
  "colors": {
55455
- "faceLiveness.loadingOverlay.microphoneAccessDenied": 2,
55456
- "videoSignatureCapture.guidanceMessageBackgroundColor": 2,
55457
- "videoSignatureCapture.guidanceMessageTextColor": 2,
55458
- "videoSignatureCapture.faceLiveness": 0,
55459
- "videoSignatureCapture.success": 2
55553
+ "videoSignatureCapture.faceLiveness": 0
55460
55554
  }
55461
55555
  },
55462
55556
  "CustomerIdAndBiometricsEnrollment": {
@@ -55506,31 +55600,7 @@
55506
55600
  "videoSignatureCapture.cameraStoreProvider": 2
55507
55601
  },
55508
55602
  "colors": {
55509
- "idCapture.loadingOverlay.microphoneAccessDenied": 2,
55510
- "idCapture.success": 2,
55511
- "idCapture.fallback": 2,
55512
- "faceLiveness.loadingOverlay.microphoneAccessDenied": 2,
55513
- "videoIdCapture.idCapture.guideBoxUnsatisfiedColor": 2,
55514
- "videoIdCapture.idCapture.guideBoxSatisfiedColor": 2,
55515
- "videoIdCapture.idCapture.guidanceMessagesSatisfiedBackgroundColor": 2,
55516
- "videoIdCapture.idCapture.guidanceMessagesUnsatisfiedBackgroundColor": 2,
55517
- "videoIdCapture.idCapture.guidanceMessagesSatisfiedTextColor": 2,
55518
- "videoIdCapture.idCapture.guidanceMessagesUnsatisfiedTextColor": 2,
55519
- "videoIdCapture.idCapture.loadingOverlay.microphoneAccessDenied": 2,
55520
- "videoIdCapture.idCapture.success": 2,
55521
- "videoIdCapture.idCapture.fallback": 2,
55522
- "videoIdCapture.faceLiveness.guidesUnsatisfiedColor": 2,
55523
- "videoIdCapture.faceLiveness.guidesSatisfiedColor": 2,
55524
- "videoIdCapture.faceLiveness.guidanceMessagesSatisfiedBackgroundColor": 2,
55525
- "videoIdCapture.faceLiveness.guidanceMessagesUnsatisfiedBackgroundColor": 2,
55526
- "videoIdCapture.faceLiveness.guidanceMessagesSatisfiedTextColor": 2,
55527
- "videoIdCapture.faceLiveness.guidanceMessagesUnsatisfiedTextColor": 2,
55528
- "videoIdCapture.faceLiveness.loadingOverlay.microphoneAccessDenied": 2,
55529
- "videoIdCapture.idVideoCapture": 2,
55530
- "videoSignatureCapture.guidanceMessageBackgroundColor": 2,
55531
- "videoSignatureCapture.guidanceMessageTextColor": 2,
55532
- "videoSignatureCapture.faceLiveness": 0,
55533
- "videoSignatureCapture.success": 2
55603
+ "videoSignatureCapture.faceLiveness": 0
55534
55604
  }
55535
55605
  }
55536
55606
  };
@@ -55759,12 +55829,11 @@
55759
55829
  * - guide-box / guide / guidance-message colours become theme overrides
55760
55830
  * (`mapThemeWithColors`, ./themes.ts), merged over whatever `theme` the
55761
55831
  * caller also passed, with the colours winning exactly as in 2.x;
55762
- * - per-screen BUTTON colours reach the view bags `IdCaptureView.colors` /
55763
- * `FaceLivenessView.colors` (`mapIdColors`/`mapFaceColors`, ./shared.ts).
55832
+ * - per-screen BUTTON colours reach each view's `colors` bag (the
55833
+ * `map*Colors` mappers in ./shared.ts).
55764
55834
  *
55765
- * The leaves with no 3.0 screen — sdk2's fallback screen, and the ReviewScreen
55766
- * buttons 3.0 colours by `variant` off `theme.buttons` — are recorded in
55767
- * `__fixtures__/dispositions.md` rather than silently implied to work.
55835
+ * The leaves no 3.0 screen renders are in the colours ledger
55836
+ * (./styleBagLedger.ts), and so in the docs tables and the style-key warnings.
55768
55837
  */
55769
55838
  var STYLE_WITH_ASSETS = {
55770
55839
  assets: MAPPED,
@@ -56607,6 +56676,25 @@
56607
56676
  }, mapCustomerIdAndBiometricsEnrollmentProps(props, ctx)), props.children);
56608
56677
  };
56609
56678
 
56679
+ /**
56680
+ * react-16-compat: React 16/17 have no `createRoot`, so this adapts the legacy
56681
+ * `ReactDOM.render` API to the root shape the rest of this module expects.
56682
+ * Keeping that shape means the teardown logic below stays byte-identical to
56683
+ * develop and merges cleanly. Runs on React 16.14 through 18; React 19
56684
+ * removed `ReactDOM.render`, which is why this build's peer range stops at 18.
56685
+ */
56686
+ function createRoot(container) {
56687
+ return {
56688
+ render: function render(element) {
56689
+ // eslint-disable-next-line react/no-deprecated -- the only mount API React 16 has
56690
+ ReactDOM.render(element, container);
56691
+ },
56692
+ unmount: function unmount() {
56693
+ // eslint-disable-next-line react/no-deprecated -- pairs with ReactDOM.render above
56694
+ ReactDOM.unmountComponentAtNode(container);
56695
+ }
56696
+ };
56697
+ }
56610
56698
  /**
56611
56699
  * Targets whose `remove` this module has already wrapped. Permanent: the
56612
56700
  * wrapper is installed at most once per element, so repeat renders can never
@@ -56634,8 +56722,7 @@
56634
56722
  targetElement = document.createElement('div');
56635
56723
  document.body.append(targetElement);
56636
56724
  }
56637
- var root = ReactDOM.createRoot(targetElement);
56638
- root.render(/*#__PURE__*/React.createElement(OverlayContainer, null, component));
56725
+ var root = createRoot(targetElement);
56639
56726
  if ('remove' in targetElement) {
56640
56727
  var element_1 = targetElement;
56641
56728
  // Always point at the newest root, even when the wrapper is already
@@ -56685,6 +56772,10 @@
56685
56772
  };
56686
56773
  }
56687
56774
  }
56775
+ // react-16-compat: render LAST. A legacy root mounts synchronously, so layout
56776
+ // effects (e.g. a customer `loadingSpinner`) run inside this call; one that
56777
+ // calls `.remove()` must already hit the wrapper above, not the native method.
56778
+ root.render(/*#__PURE__*/React.createElement(OverlayContainer, null, component));
56688
56779
  return targetElement;
56689
56780
  }
56690
56781
  function renderComponent(Component, targetElement, options) {