diff --git a/__mocks__/globals.js b/__mocks__/globals.js index 3085bcf192cf..c87fa63be2b6 100644 --- a/__mocks__/globals.js +++ b/__mocks__/globals.js @@ -2,3 +2,9 @@ jest.mock('copy-anything', () => ({ copy: jest.fn(), })); + +const mock_onfido = { + init: jest.fn().mockResolvedValue({}), +}; + +window.Onfido = mock_onfido; diff --git a/package-lock.json b/package-lock.json index ed3a3131d945..62851c73e1af 100644 --- a/package-lock.json +++ b/package-lock.json @@ -127,7 +127,6 @@ "moment": "^2.29.2", "null-loader": "^4.0.1", "object.fromentries": "^2.0.0", - "onfido-sdk-ui": "^11.0.0", "pako": "^1.0.11", "postcss-loader": "^6.2.1", "postcss-preset-env": "^7.4.3", @@ -6289,16 +6288,6 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/@mediapipe/face_detection": { - "version": "0.4.1646425229", - "resolved": "https://registry.npmjs.org/@mediapipe/face_detection/-/face_detection-0.4.1646425229.tgz", - "integrity": "sha512-aeCN+fRAojv9ch3NXorP6r5tcGVLR3/gC1HmtqB0WEZBRXrdP6/3W/sGR0dHr1iT6ueiK95G9PVjbzFosf/hrg==" - }, - "node_modules/@mediapipe/face_mesh": { - "version": "0.4.1633559619", - "resolved": "https://registry.npmjs.org/@mediapipe/face_mesh/-/face_mesh-0.4.1633559619.tgz", - "integrity": "sha512-Vc8cdjxS5+O2gnjWH9KncYpUCVXT0h714KlWAsyqJvJbIgUJBqpppbIx8yWcAzBDxm/5cYSuBI5p5ySIPxzcEg==" - }, "node_modules/@motionone/animation": { "version": "10.16.3", "resolved": "https://registry.npmjs.org/@motionone/animation/-/animation-10.16.3.tgz", @@ -7090,157 +7079,6 @@ "@octokit/openapi-types": "^14.0.0" } }, - "node_modules/@onfido/active-video-capture": { - "version": "0.22.2", - "resolved": "https://registry.npmjs.org/@onfido/active-video-capture/-/active-video-capture-0.22.2.tgz", - "integrity": "sha512-wM7PJUdB0rwCpIdKoOczynqALW9zXXr/x43RGDpaGBFMdY5imbXpQtI/JaaZjQsWK6cH8FKAkKLvrxRNYCsMmQ==", - "hasInstallScript": true, - "dependencies": { - "@mediapipe/face_detection": "^0.4.1646425229", - "@mediapipe/face_mesh": "^0.4.1633559619", - "@onfido/castor": "^2.2.2", - "@onfido/castor-icons": "^2.12.0", - "@tensorflow-models/face-detection": "^1.0.1", - "@tensorflow-models/face-landmarks-detection": "^1.0.2", - "@tensorflow/tfjs-backend-wasm": "^3.20.0", - "@tensorflow/tfjs-backend-webgl": "^3.20.0", - "@tensorflow/tfjs-converter": "^3.20.0", - "@tensorflow/tfjs-core": "^3.20.0", - "@typescript/lib-dom": "npm:@types/web", - "patch-package": "^6.4.7", - "postinstall-postinstall": "^2.1.0", - "preact": "^10.10.6", - "react-webcam": "^7.0.0" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/@onfido/active-video-capture/node_modules/@tensorflow-models/face-landmarks-detection": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@tensorflow-models/face-landmarks-detection/-/face-landmarks-detection-1.0.5.tgz", - "integrity": "sha512-54XJPi8g29/MknJ33ZBrLsEzr9kw/dJtrJMMD3xrCrnRlfFQPIKQ5PI2Wml55Fz2p4U2hemzBB0/H+S94JddIQ==", - "dependencies": { - "rimraf": "^3.0.2" - }, - "peerDependencies": { - "@mediapipe/face_mesh": "~0.4.0", - "@tensorflow-models/face-detection": "~1.0.0", - "@tensorflow/tfjs-backend-webgl": "^3.12.0", - "@tensorflow/tfjs-converter": "^3.12.0", - "@tensorflow/tfjs-core": "^3.12.0" - } - }, - "node_modules/@onfido/active-video-capture/node_modules/@tensorflow/tfjs-backend-cpu": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-cpu/-/tfjs-backend-cpu-3.21.0.tgz", - "integrity": "sha512-88S21UAdzyK0CsLUrH17GPTD+26E85OP9CqmLZslaWjWUmBkeTQ5Zqyp6iK+gELnLxPx6q7JsNEeFuPv4254lQ==", - "dependencies": { - "@types/seedrandom": "^2.4.28", - "seedrandom": "^3.0.5" - }, - "engines": { - "yarn": ">= 1.3.2" - }, - "peerDependencies": { - "@tensorflow/tfjs-core": "3.21.0" - } - }, - "node_modules/@onfido/active-video-capture/node_modules/@tensorflow/tfjs-backend-wasm": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-wasm/-/tfjs-backend-wasm-3.21.0.tgz", - "integrity": "sha512-TVkJWrqukdxvIaQn9jZvtXR+7fmT7sti6NQH5OKVcBmFYIW7I3RiRRE66inVrHjEEvIVTUuW9yo9Ialn31EFIw==", - "dependencies": { - "@tensorflow/tfjs-backend-cpu": "3.21.0", - "@types/emscripten": "~0.0.34" - }, - "peerDependencies": { - "@tensorflow/tfjs-core": "3.21.0" - } - }, - "node_modules/@onfido/active-video-capture/node_modules/@tensorflow/tfjs-backend-webgl": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-webgl/-/tfjs-backend-webgl-3.21.0.tgz", - "integrity": "sha512-N4zitIAT9IX8B8oe489qM3f3VcESxGZIZvHmVP8varOQakTvTX859aaPo1s8hK1qCy4BjSGbweooZe4U8D4kTQ==", - "dependencies": { - "@tensorflow/tfjs-backend-cpu": "3.21.0", - "@types/offscreencanvas": "~2019.3.0", - "@types/seedrandom": "^2.4.28", - "@types/webgl-ext": "0.0.30", - "@types/webgl2": "0.0.6", - "seedrandom": "^3.0.5" - }, - "engines": { - "yarn": ">= 1.3.2" - }, - "peerDependencies": { - "@tensorflow/tfjs-core": "3.21.0" - } - }, - "node_modules/@onfido/active-video-capture/node_modules/@tensorflow/tfjs-converter": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-converter/-/tfjs-converter-3.21.0.tgz", - "integrity": "sha512-12Y4zVDq3yW+wSjSDpSv4HnpL2sDZrNiGSg8XNiDE4HQBdjdA+a+Q3sZF/8NV9y2yoBhL5L7V4mMLDdbZBd9/Q==", - "peerDependencies": { - "@tensorflow/tfjs-core": "3.21.0" - } - }, - "node_modules/@onfido/active-video-capture/node_modules/@tensorflow/tfjs-core": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-core/-/tfjs-core-3.21.0.tgz", - "integrity": "sha512-YSfsswOqWfd+M4bXIhT3hwtAb+IV8+ODwIxwdFR/7jTAPZP1wMVnSlpKnXHAN64HFOiP+Tm3HmKusEZ0+09A0w==", - "dependencies": { - "@types/long": "^4.0.1", - "@types/offscreencanvas": "~2019.3.0", - "@types/seedrandom": "^2.4.28", - "@types/webgl-ext": "0.0.30", - "@webgpu/types": "0.1.16", - "long": "4.0.0", - "node-fetch": "~2.6.1", - "seedrandom": "^3.0.5" - }, - "engines": { - "yarn": ">= 1.3.2" - } - }, - "node_modules/@onfido/active-video-capture/node_modules/@webgpu/types": { - "version": "0.1.16", - "resolved": "https://registry.npmjs.org/@webgpu/types/-/types-0.1.16.tgz", - "integrity": "sha512-9E61voMP4+Rze02jlTXud++Htpjyyk8vw5Hyw9FGRrmhHQg2GqbuOfwf5Klrb8vTxc2XWI3EfO7RUHMpxTj26A==" - }, - "node_modules/@onfido/castor": { - "version": "2.2.5", - "resolved": "https://registry.npmjs.org/@onfido/castor/-/castor-2.2.5.tgz", - "integrity": "sha512-Io3FTazT06FDFJGjHWNF9g0fsIKHw38L2apL//zp/vveyEV1Zce/U0fLzC8LcE5TuoMnoAYaRi6Jwogd8EN5TA==", - "dependencies": { - "@onfido/castor-tokens": "^1.0.0-beta.6", - "csstype": "^3.1.1" - }, - "peerDependencies": { - "@onfido/castor-icons": ">=1.0.0" - } - }, - "node_modules/@onfido/castor-icons": { - "version": "2.22.0", - "resolved": "https://registry.npmjs.org/@onfido/castor-icons/-/castor-icons-2.22.0.tgz", - "integrity": "sha512-7OnCvu5xqVWcBLqovZyb99NP0oHw7sjkVYXZhi438i0U6Pgecrhu/14Gc/IN/kvgDxWj9qmiYdd0qdjNaVckrQ==", - "peerDependencies": { - "react": ">=17 || ^16.14 || ^15.7 || ^0.14.10" - } - }, - "node_modules/@onfido/castor-tokens": { - "version": "1.0.0-beta.6", - "resolved": "https://registry.npmjs.org/@onfido/castor-tokens/-/castor-tokens-1.0.0-beta.6.tgz", - "integrity": "sha512-MfwuSlNdM0Ay0cI3LLyqZGsHW0e1Y1R/0IdQKVU575PdWQx1Q/538aOZMo/a3/oSW0pMEgfOm+mNqPx057cvWA==" - }, - "node_modules/@onfido/opencv": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@onfido/opencv/-/opencv-1.0.2.tgz", - "integrity": "sha512-dgUj7NJ3tohlqU6WdYiey5NBTTjI0VYp2yyL8dz1g8c/nX5tM5toOgEgyaNz7fX2tlpJO877G/CT/n5yYSb+gg==", - "dependencies": { - "mirada": "^0.0.15" - } - }, "node_modules/@parcel/watcher": { "version": "2.0.4", "dev": true, @@ -8239,82 +8077,6 @@ } } }, - "node_modules/@sentry-internal/tracing": { - "version": "7.70.0", - "resolved": "https://registry.npmjs.org/@sentry-internal/tracing/-/tracing-7.70.0.tgz", - "integrity": "sha512-SpbE6wZhs6QwG2ORWCt8r28o1T949qkWx/KeRTCdK4Ub95PQ3Y3DgnqD8Wz//3q50Wt6EZDEibmz4t067g6PPg==", - "dependencies": { - "@sentry/core": "7.70.0", - "@sentry/types": "7.70.0", - "@sentry/utils": "7.70.0", - "tslib": "^2.4.1 || ^1.9.3" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@sentry/browser": { - "version": "7.70.0", - "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-7.70.0.tgz", - "integrity": "sha512-PB+IP49/TLcnDHCj9eJ5tcHE0pzXg23wBakmF3KGMSd5nxEbUvmOsaFPZcgUUlL9JlU3v1Y40We7HdPStrY6oA==", - "dependencies": { - "@sentry-internal/tracing": "7.70.0", - "@sentry/core": "7.70.0", - "@sentry/replay": "7.70.0", - "@sentry/types": "7.70.0", - "@sentry/utils": "7.70.0", - "tslib": "^2.4.1 || ^1.9.3" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@sentry/core": { - "version": "7.70.0", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.70.0.tgz", - "integrity": "sha512-voUsGVM+jwRp99AQYFnRvr7sVd2tUhIMj1L6F42LtD3vp7t5ZnKp3NpXagtFW2vWzXESfyJUBhM0qI/bFvn7ZA==", - "dependencies": { - "@sentry/types": "7.70.0", - "@sentry/utils": "7.70.0", - "tslib": "^2.4.1 || ^1.9.3" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@sentry/replay": { - "version": "7.70.0", - "resolved": "https://registry.npmjs.org/@sentry/replay/-/replay-7.70.0.tgz", - "integrity": "sha512-XjnyE6ORREz9kBWWHdXaIjS9P2Wo7uEw+y23vfLQwzV0Nx3xJ+FG4dwf8onyIoeCZDKbz7cqQIbugU1gkgUtZw==", - "dependencies": { - "@sentry/core": "7.70.0", - "@sentry/types": "7.70.0", - "@sentry/utils": "7.70.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@sentry/types": { - "version": "7.70.0", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.70.0.tgz", - "integrity": "sha512-rY4DqpiDBtXSk4MDNBH3dwWqfPbNBI/9GA7Y5WJSIcObBtfBKp0fzYliHJZD0pgM7d4DPFrDn42K9Iiumgymkw==", - "engines": { - "node": ">=8" - } - }, - "node_modules/@sentry/utils": { - "version": "7.70.0", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.70.0.tgz", - "integrity": "sha512-0cChMH0lsGp+5I3D4wOHWwjFN19HVrGUs7iWTLTO5St3EaVbdeLbI1vFXHxMxvopbwgpeZafbreHw/loIdZKpw==", - "dependencies": { - "@sentry/types": "7.70.0", - "tslib": "^2.4.1 || ^1.9.3" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/@sinonjs/commons": { "version": "1.8.6", "dev": true, @@ -8357,11 +8119,6 @@ "integrity": "sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ==", "peer": true }, - "node_modules/@socket.io/component-emitter": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz", - "integrity": "sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==" - }, "node_modules/@stitches/react": { "version": "1.2.8", "resolved": "https://registry.npmjs.org/@stitches/react/-/react-1.2.8.tgz", @@ -15555,93 +15312,6 @@ "url": "https://github.com/sponsors/tannerlinsley" } }, - "node_modules/@tensorflow-models/face-detection": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@tensorflow-models/face-detection/-/face-detection-1.0.2.tgz", - "integrity": "sha512-anjSxy3MnZdTiVluOEQZeaFWM30IPswFM+SltX6wseXKja/AbrHYqamGNZKUylAs2JAyudq+xqTRPS+nA2ourg==", - "dependencies": { - "rimraf": "^3.0.2", - "tslib": "2.4.0" - }, - "peerDependencies": { - "@mediapipe/face_detection": "~0.4.0", - "@tensorflow/tfjs-backend-webgl": "^4.4.0", - "@tensorflow/tfjs-converter": "^4.4.0", - "@tensorflow/tfjs-core": "^4.4.0" - } - }, - "node_modules/@tensorflow-models/face-detection/node_modules/tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" - }, - "node_modules/@tensorflow/tfjs-backend-cpu": { - "version": "4.11.0", - "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-cpu/-/tfjs-backend-cpu-4.11.0.tgz", - "integrity": "sha512-2zmGX9MuR8AwscSGOybz4fBOFgQDnj+ZCWGkLxDzbKecy9GxuilukT46xB2zU0kSq7Mf3ncfE/9eUEy6a7ZDqQ==", - "peer": true, - "dependencies": { - "@types/seedrandom": "^2.4.28", - "seedrandom": "^3.0.5" - }, - "engines": { - "yarn": ">= 1.3.2" - }, - "peerDependencies": { - "@tensorflow/tfjs-core": "4.11.0" - } - }, - "node_modules/@tensorflow/tfjs-backend-webgl": { - "version": "4.11.0", - "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-webgl/-/tfjs-backend-webgl-4.11.0.tgz", - "integrity": "sha512-sM/B65u+1T3U+Ctiq1fn5j6VmiLEZW7BpuSa3ZXDXtIS07MoZ2FTuO8BMudxEY4xGpTyoOzqTOGT9BaGO3qrWg==", - "peer": true, - "dependencies": { - "@tensorflow/tfjs-backend-cpu": "4.11.0", - "@types/offscreencanvas": "~2019.3.0", - "@types/seedrandom": "^2.4.28", - "seedrandom": "^3.0.5" - }, - "engines": { - "yarn": ">= 1.3.2" - }, - "peerDependencies": { - "@tensorflow/tfjs-core": "4.11.0" - } - }, - "node_modules/@tensorflow/tfjs-converter": { - "version": "4.11.0", - "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-converter/-/tfjs-converter-4.11.0.tgz", - "integrity": "sha512-j2JEVwkqh+pyin+sxUiNUG7QOIU2S0+5SzN8LFXHlR90/bPvC2qiaaSPYdGG/BYidFc27QCHD3obBXrb1EE/ow==", - "peer": true, - "peerDependencies": { - "@tensorflow/tfjs-core": "4.11.0" - } - }, - "node_modules/@tensorflow/tfjs-core": { - "version": "4.11.0", - "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-core/-/tfjs-core-4.11.0.tgz", - "integrity": "sha512-t0mCNIco8wg6aZdHWT1d6ZuKtbbdY5y871ELWLSUA1+grXDvvaroHYh5eeJexJYXeg+EQ0/hzB0G8nLsLjlyVQ==", - "peer": true, - "dependencies": { - "@types/long": "^4.0.1", - "@types/offscreencanvas": "~2019.7.0", - "@types/seedrandom": "^2.4.28", - "@webgpu/types": "0.1.30", - "long": "4.0.0", - "node-fetch": "~2.6.1", - "seedrandom": "^3.0.5" - }, - "engines": { - "yarn": ">= 1.3.2" - } - }, - "node_modules/@tensorflow/tfjs-core/node_modules/@types/offscreencanvas": { - "version": "2019.7.1", - "resolved": "https://registry.npmjs.org/@types/offscreencanvas/-/offscreencanvas-2019.7.1.tgz", - "integrity": "sha512-+HSrJgjBW77ALieQdMJvXhRZUIRN1597L+BKvsyeiIlHHERnqjcuOLyodK3auJ3Y3zRezNKtKAhuQWYJfEgFHQ==", - "peer": true - }, "node_modules/@testing-library/dom": { "version": "8.19.0", "license": "MIT", @@ -15976,11 +15646,6 @@ "classnames": "*" } }, - "node_modules/@types/emscripten": { - "version": "0.0.34", - "resolved": "https://registry.npmjs.org/@types/emscripten/-/emscripten-0.0.34.tgz", - "integrity": "sha512-QSb9ojDincskc+uKMI0KXp8e1NALFINCrMlp8VGKGcTSxeEyRTTKyjWw75NYrCZHUsVEEEpr1tYHpbtaC++/sQ==" - }, "node_modules/@types/eslint": { "version": "7.29.0", "license": "MIT", @@ -16149,11 +15814,6 @@ "@types/lodash": "*" } }, - "node_modules/@types/long": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", - "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==" - }, "node_modules/@types/mdast": { "version": "3.0.10", "license": "MIT", @@ -16210,11 +15870,6 @@ "resolved": "https://registry.npmjs.org/@types/object.fromentries/-/object.fromentries-2.0.2.tgz", "integrity": "sha512-yUrBe89bzuR2AT0XJU26cmMylc15AOTeZzrnzbYcaMCd8fobYPsre+BJku5JJq5iauUdZkdkrujjzEz0l3MrLg==" }, - "node_modules/@types/offscreencanvas": { - "version": "2019.3.0", - "resolved": "https://registry.npmjs.org/@types/offscreencanvas/-/offscreencanvas-2019.3.0.tgz", - "integrity": "sha512-esIJx9bQg+QYF0ra8GnvfianIY8qWB0GBx54PK5Eps6m+xTj86KLavHv6qDhzKcu5UUOgNfJ2pWaIIV7TRUd9Q==" - }, "node_modules/@types/parse-json": { "version": "4.0.0", "license": "MIT" @@ -16372,11 +16027,6 @@ "version": "0.16.2", "license": "MIT" }, - "node_modules/@types/seedrandom": { - "version": "2.4.30", - "resolved": "https://registry.npmjs.org/@types/seedrandom/-/seedrandom-2.4.30.tgz", - "integrity": "sha512-AnxLHewubLVzoF/A4qdxBGHCKifw8cY32iro3DQX9TPcetE95zBeVt3jnsvtvAUf1vwzMfwzp4t/L2yqPlnjkQ==" - }, "node_modules/@types/semver": { "version": "7.3.13", "license": "MIT" @@ -16431,16 +16081,6 @@ "version": "2.0.6", "license": "MIT" }, - "node_modules/@types/webgl-ext": { - "version": "0.0.30", - "resolved": "https://registry.npmjs.org/@types/webgl-ext/-/webgl-ext-0.0.30.tgz", - "integrity": "sha512-LKVgNmBxN0BbljJrVUwkxwRYqzsAEPcZOe6S2T6ZaBDIrFp0qu4FNlpc5sM1tGbXUYFgdVQIoeLk1Y1UoblyEg==" - }, - "node_modules/@types/webgl2": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/@types/webgl2/-/webgl2-0.0.6.tgz", - "integrity": "sha512-50GQhDVTq/herLMiqSQkdtRu+d5q/cWHn4VvKJtrj4DJAjo1MNkWYa2MA41BaBO1q1HgsUjuQvEOk0QHvlnAaQ==" - }, "node_modules/@types/webpack": { "version": "4.41.33", "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.33.tgz", @@ -16868,12 +16508,6 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/@typescript/lib-dom": { - "name": "@types/web", - "version": "0.0.115", - "resolved": "https://registry.npmjs.org/@types/web/-/web-0.0.115.tgz", - "integrity": "sha512-IBtUgtxnITC7WTCg4tv6kCnSP0T+fM+3PzQPIzLzJY1DDlhBFKM/9+uMURw14YweWPDiFNIZ94Gc1bJtwow97g==" - }, "node_modules/@webassemblyjs/ast": { "version": "1.11.5", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.5.tgz", @@ -17104,12 +16738,6 @@ "@xtuc/long": "4.2.2" } }, - "node_modules/@webgpu/types": { - "version": "0.1.30", - "resolved": "https://registry.npmjs.org/@webgpu/types/-/types-0.1.30.tgz", - "integrity": "sha512-9AXJSmL3MzY8ZL//JjudA//q+2kBRGhLBFpkdGksWIuxrMy81nFrCzj2Am+mbh8WoU6rXmv7cY5E3rdlyru2Qg==", - "peer": true - }, "node_modules/@webpack-cli/configtest": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.2.0.tgz", @@ -17174,6 +16802,7 @@ }, "node_modules/@yarnpkg/lockfile": { "version": "1.1.0", + "dev": true, "license": "BSD-2-Clause" }, "node_modules/@yarnpkg/parsers": { @@ -19298,11 +18927,6 @@ "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" }, - "node_modules/blueimp-load-image": { - "version": "2.29.0", - "resolved": "https://registry.npmjs.org/blueimp-load-image/-/blueimp-load-image-2.29.0.tgz", - "integrity": "sha512-psm81GlZ0ffKxVT0QN9dvhpzXMv1KxgXSg8ars0XGAcEGsTwFT2IPo59HDXlw4Lo2oImdPzwrwkliZSiLLUpIw==" - }, "node_modules/bn.js": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", @@ -19685,6 +19309,7 @@ }, "node_modules/buffer": { "version": "5.7.1", + "dev": true, "funding": [ { "type": "github", @@ -22062,14 +21687,6 @@ "which": "bin/which" } }, - "node_modules/cross-fetch": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.8.tgz", - "integrity": "sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==", - "dependencies": { - "node-fetch": "^2.6.12" - } - }, "node_modules/cross-spawn": { "version": "7.0.3", "license": "MIT", @@ -23753,11 +23370,6 @@ "domelementtype": "1" } }, - "node_modules/dompurify": { - "version": "2.4.7", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.4.7.tgz", - "integrity": "sha512-kxxKlPEDa6Nc5WJi+qRgPbOAbgTpSULL+vI3NUXsZMlkJxTqYI9wg5ZTay2sFrdZRWHPWNi+EdAhcJf81WtoMQ==" - }, "node_modules/domready": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/domready/-/domready-1.0.8.tgz", @@ -24069,46 +23681,6 @@ "objectorarray": "^1.0.5" } }, - "node_modules/engine.io-client": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-6.5.2.tgz", - "integrity": "sha512-CQZqbrpEYnrpGqC07a9dJDz4gePZUgTPMU3NKJPSeQOyw27Tst4Pl3FemKoFGAlHzgZmKjoRmiJvbWfhCXUlIg==", - "dependencies": { - "@socket.io/component-emitter": "~3.1.0", - "debug": "~4.3.1", - "engine.io-parser": "~5.2.1", - "ws": "~8.11.0", - "xmlhttprequest-ssl": "~2.0.0" - } - }, - "node_modules/engine.io-client/node_modules/ws": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", - "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, - "node_modules/engine.io-parser": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.1.tgz", - "integrity": "sha512-9JktcM3u18nU9N2Lz3bWeBgxVgOKpw7yhRaoxQA3FUDZzzw+9WlA6p4G4u0RixNkg14fH7EfEc/RhpurtiROTQ==", - "engines": { - "node": ">=10.0.0" - } - }, "node_modules/enhanced-resolve": { "version": "0.9.1", "dependencies": { @@ -24134,11 +23706,6 @@ "version": "1.1.2", "license": "BSD-2-Clause" }, - "node_modules/enumerate-devices": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/enumerate-devices/-/enumerate-devices-1.1.1.tgz", - "integrity": "sha512-8zDbrc7ocusTL1ZGmvgy0cTwdyCaM7sGZoYLRmnWJalLQzmftDtce+uDU91gafOTo9MCtgjSIxyMv/F4+Hcchw==" - }, "node_modules/env-paths": { "version": "2.2.1", "dev": true, @@ -25956,11 +25523,6 @@ "resolved": "https://registry.npmjs.org/event-emitter-es6/-/event-emitter-es6-1.1.5.tgz", "integrity": "sha512-/n7qzkJBySdbe1W9/FBDdO7gzDIaewgj+Rj6Ayc2BdvVcaGP+p40DyViOFudCgV47UU8+cUFmcD3tJgjwY65qQ==" }, - "node_modules/eventemitter2": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-2.2.2.tgz", - "integrity": "sha512-AmQ734LWUB9Iyk+2WIU3Z8iRhdL1XQihEE0iF/QC5Xp11zST0Z5tn5jRHa/PgIld2QIPSCys3CREqOQLUhNvkw==" - }, "node_modules/eventemitter3": { "version": "4.0.7", "license": "MIT" @@ -26718,14 +26280,6 @@ "ramda": "^0.28.0" } }, - "node_modules/file-type": { - "version": "12.4.2", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-12.4.2.tgz", - "integrity": "sha512-UssQP5ZgIOKelfsaB5CuGAL+Y+q7EmONuiwF3N5HAH0t27rvrttgi6Ra9k/+DVaY9UF6+ybxu5pOXLUdA8N7Vg==", - "engines": { - "node": ">=8" - } - }, "node_modules/file-uri-to-path": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", @@ -26955,14 +26509,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/find-yarn-workspace-root": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz", - "integrity": "sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ==", - "dependencies": { - "micromatch": "^4.0.2" - } - }, "node_modules/flat": { "version": "5.0.2", "dev": true, @@ -33761,14 +33307,6 @@ "node": ">=0.10.0" } }, - "node_modules/klaw-sync": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/klaw-sync/-/klaw-sync-6.0.0.tgz", - "integrity": "sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ==", - "dependencies": { - "graceful-fs": "^4.1.11" - } - }, "node_modules/kleur": { "version": "3.0.3", "license": "MIT", @@ -34626,11 +34164,6 @@ "url": "https://tidelift.com/funding/github/npm/loglevel" } }, - "node_modules/long": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", - "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" - }, "node_modules/longest-streak": { "version": "2.0.4", "dev": true, @@ -35403,22 +34936,6 @@ "node": ">= 8" } }, - "node_modules/mirada": { - "version": "0.0.15", - "resolved": "https://registry.npmjs.org/mirada/-/mirada-0.0.15.tgz", - "integrity": "sha512-mbm4c+wjBVcmUzHRLv/TfOAq+iy03D24KwGxx8H+NSXkD5EOZV9zFWbVxTvZCc9XwR0FIUhryU/kQm12SMSQ3g==", - "dependencies": { - "buffer": "^5.4.3", - "cross-fetch": "^3.0.4", - "file-type": "^12.3.0", - "misc-utils-of-mine-generic": "^0.2.31" - } - }, - "node_modules/misc-utils-of-mine-generic": { - "version": "0.2.45", - "resolved": "https://registry.npmjs.org/misc-utils-of-mine-generic/-/misc-utils-of-mine-generic-0.2.45.tgz", - "integrity": "sha512-WsG2zYiui2cdEbHF2pXmJfnjHb4zL+cy+PaYcLgIpMju98hwX89VbjlvGIfamCfEodbQ0qjCEvD3ocgkCXfMOQ==" - }, "node_modules/mississippi": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz", @@ -37222,80 +36739,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/onfido-sdk-ui": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/onfido-sdk-ui/-/onfido-sdk-ui-11.0.1.tgz", - "integrity": "sha512-S61h4njiuWQD3KNLRZaoobiaSjTvt1FjBOwqnsJmnkN7TD/knu8c1IyNlgztRe0Fg2CSE70rwEiO8tdlM3pqsg==", - "dependencies": { - "@onfido/active-video-capture": "^0.22.1", - "@onfido/opencv": "^1.0.0", - "@sentry/browser": "^7.2.0", - "blueimp-load-image": "~2.29.0", - "classnames": "~2.2.5", - "core-js": "^3.21.1", - "deepmerge": "^4.2.2", - "dompurify": "^2.2.6", - "enumerate-devices": "^1.1.1", - "eventemitter2": "~2.2.2", - "history": "~4.5.1", - "hoist-non-react-statics": "^3.3.2", - "js-cookie": "^3.0.1", - "pdfobject": "^2.2.7", - "preact": "^10.5.13", - "redux": "^4.0.5", - "socket.io-client": "^4.2.0", - "supports-webp": "~1.0.3", - "uuid": "^8.3.2", - "visibilityjs": "~1.2.4", - "xstate": "^4.33.6" - }, - "bin": { - "migrate_locales": "scripts/migrate_locales.js" - } - }, - "node_modules/onfido-sdk-ui/node_modules/classnames": { - "version": "2.2.6", - "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.6.tgz", - "integrity": "sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q==" - }, - "node_modules/onfido-sdk-ui/node_modules/core-js": { - "version": "3.32.2", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.32.2.tgz", - "integrity": "sha512-pxXSw1mYZPDGvTQqEc5vgIb83jGQKFGYWY76z4a7weZXUolw3G+OvpZqSRcfYOoOVUQJYEPsWeQK8pKEnUtWxQ==", - "hasInstallScript": true, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/core-js" - } - }, - "node_modules/onfido-sdk-ui/node_modules/history": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/history/-/history-4.5.1.tgz", - "integrity": "sha512-gfHeJeYeMzFtos61gdA1AloO0hGXPF2Yum+2FRdJvlylYQOz51OnT1zuwg9UYst1BRrONhcAh3Nmsg9iblgl6g==", - "dependencies": { - "invariant": "^2.2.1", - "loose-envify": "^1.2.0", - "resolve-pathname": "^2.0.0", - "value-equal": "^0.2.0", - "warning": "^3.0.0" - } - }, - "node_modules/onfido-sdk-ui/node_modules/js-cookie": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.5.tgz", - "integrity": "sha512-cEiJEAEoIbWfCZYKWhVwFuvPX1gETRYPw6LlaTKoxD3s2AkXzkCjnp6h0V77ozyqj0jakteJ4YqDJT830+lVGw==", - "engines": { - "node": ">=14" - } - }, - "node_modules/onfido-sdk-ui/node_modules/warning": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/warning/-/warning-3.0.0.tgz", - "integrity": "sha512-jMBt6pUrKn5I+OGgtQ4YZLdhIeJmObddh6CsibPxyQ5yPZm1XExSyzC1LCNX7BzhxWgiHmizBWJTHJIjMjTQYQ==", - "dependencies": { - "loose-envify": "^1.0.0" - } - }, "node_modules/open": { "version": "8.4.0", "license": "MIT", @@ -37930,207 +37373,6 @@ "node": ">=0.10.0" } }, - "node_modules/patch-package": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/patch-package/-/patch-package-6.5.1.tgz", - "integrity": "sha512-I/4Zsalfhc6bphmJTlrLoOcAF87jcxko4q0qsv4bGcurbr8IskEOtdnt9iCmsQVGL1B+iUhSQqweyTLJfCF9rA==", - "dependencies": { - "@yarnpkg/lockfile": "^1.1.0", - "chalk": "^4.1.2", - "cross-spawn": "^6.0.5", - "find-yarn-workspace-root": "^2.0.0", - "fs-extra": "^9.0.0", - "is-ci": "^2.0.0", - "klaw-sync": "^6.0.0", - "minimist": "^1.2.6", - "open": "^7.4.2", - "rimraf": "^2.6.3", - "semver": "^5.6.0", - "slash": "^2.0.0", - "tmp": "^0.0.33", - "yaml": "^1.10.2" - }, - "bin": { - "patch-package": "index.js" - }, - "engines": { - "node": ">=10", - "npm": ">5" - } - }, - "node_modules/patch-package/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/patch-package/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/patch-package/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/patch-package/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "node_modules/patch-package/node_modules/cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dependencies": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - }, - "engines": { - "node": ">=4.8" - } - }, - "node_modules/patch-package/node_modules/fs-extra": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", - "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", - "dependencies": { - "at-least-node": "^1.0.0", - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/patch-package/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/patch-package/node_modules/open": { - "version": "7.4.2", - "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz", - "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==", - "dependencies": { - "is-docker": "^2.0.0", - "is-wsl": "^2.1.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/patch-package/node_modules/path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", - "engines": { - "node": ">=4" - } - }, - "node_modules/patch-package/node_modules/rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - } - }, - "node_modules/patch-package/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/patch-package/node_modules/shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", - "dependencies": { - "shebang-regex": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/patch-package/node_modules/shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/patch-package/node_modules/slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "engines": { - "node": ">=6" - } - }, - "node_modules/patch-package/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/patch-package/node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" - } - }, "node_modules/path-browserify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", @@ -38207,11 +37449,6 @@ "node": ">=0.12" } }, - "node_modules/pdfobject": { - "version": "2.2.12", - "resolved": "https://registry.npmjs.org/pdfobject/-/pdfobject-2.2.12.tgz", - "integrity": "sha512-D0oyD/sj8j82AMaJhoyMaY1aD5TkbpU3FbJC6w9/cpJlZRpYHqAkutXw1Ca/FKjYPZmTAu58uGIfgOEaDlbY8A==" - }, "node_modules/performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", @@ -39833,21 +39070,6 @@ "posthtml-render": "^1.0.6" } }, - "node_modules/postinstall-postinstall": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/postinstall-postinstall/-/postinstall-postinstall-2.1.0.tgz", - "integrity": "sha512-7hQX6ZlZXIoRiWNrbMQaLzUUfH+sSx39u8EJ9HYuDc1kLo9IXKWjM5RSquZN1ad5GnH8CGFM78fsAAQi3OKEEQ==", - "hasInstallScript": true - }, - "node_modules/preact": { - "version": "10.17.1", - "resolved": "https://registry.npmjs.org/preact/-/preact-10.17.1.tgz", - "integrity": "sha512-X9BODrvQ4Ekwv9GURm9AKAGaomqXmip7NQTZgY7gcNmr7XE83adOMJvd3N42id1tMFU7ojiynRsYnY6/BRFxLA==", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/preact" - } - }, "node_modules/preload-webpack-plugin": { "version": "3.0.0-beta.4", "resolved": "https://registry.npmjs.org/preload-webpack-plugin/-/preload-webpack-plugin-3.0.0-beta.4.tgz", @@ -41394,15 +40616,6 @@ "react-dom": "^15.3.0 || ^16.0.0-alpha || ^17.0.0 || ^18.0.0" } }, - "node_modules/react-webcam": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/react-webcam/-/react-webcam-7.1.1.tgz", - "integrity": "sha512-2W5WN8wmEv8ZlxvyAlOxVuw6new8Bi7+KSPqoq5oa7z1KSKZ72ucaKqCFRtHSuFjZ5sh5ioS9lp4BGwnaZ6lDg==", - "peerDependencies": { - "react": ">=16.2.0", - "react-dom": ">=16.2.0" - } - }, "node_modules/react-window": { "version": "1.8.9", "resolved": "https://registry.npmjs.org/react-window/-/react-window-1.8.9.tgz", @@ -42560,11 +41773,6 @@ "node": ">=8" } }, - "node_modules/resolve-pathname": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/resolve-pathname/-/resolve-pathname-2.2.0.tgz", - "integrity": "sha512-bAFz9ld18RzJfddgrO2e/0S2O81710++chRMUxHjXOYKF6jTAMrUNZrEZ1PvV0zlhfjidm08iRPdTLPno1FuRg==" - }, "node_modules/resolve-url": { "version": "0.2.1", "license": "MIT" @@ -43454,11 +42662,6 @@ "resolved": "https://registry.npmjs.org/scrollparent/-/scrollparent-2.1.0.tgz", "integrity": "sha512-bnnvJL28/Rtz/kz2+4wpBjHzWoEzXhVg/TE8BeVGJHUqE8THNIRnDxDWMktwM+qahvlRdvlLdsQfYe+cuqfZeA==" }, - "node_modules/seedrandom": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/seedrandom/-/seedrandom-3.0.5.tgz", - "integrity": "sha512-8OwmbklUNzwezjGInmZ+2clQmExQPvomqjL7LFqOYqtmuxRgQYqOD3mHaU+MvZn5FLUeVxVfQjwLZW/n/JFuqg==" - }, "node_modules/select": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/select/-/select-1.1.2.tgz", @@ -44156,32 +43359,6 @@ "node": ">=0.10.0" } }, - "node_modules/socket.io-client": { - "version": "4.7.2", - "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.7.2.tgz", - "integrity": "sha512-vtA0uD4ibrYD793SOIAwlo8cj6haOeMHrGvwPxJsxH7CeIksqJ+3Zc06RvWTIFgiSqx4A3sOnTXpfAEE2Zyz6w==", - "dependencies": { - "@socket.io/component-emitter": "~3.1.0", - "debug": "~4.3.2", - "engine.io-client": "~6.5.2", - "socket.io-parser": "~4.2.4" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/socket.io-parser": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.4.tgz", - "integrity": "sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==", - "dependencies": { - "@socket.io/component-emitter": "~3.1.0", - "debug": "~4.3.1" - }, - "engines": { - "node": ">=10.0.0" - } - }, "node_modules/sockjs": { "version": "0.3.24", "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.24.tgz", @@ -45612,11 +44789,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/supports-webp": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/supports-webp/-/supports-webp-1.0.7.tgz", - "integrity": "sha512-ZlqT+sCgZKcykOLrk8DYR4t3Em+nyVSHpiV3q7uzOutLwKIYU23n88KibCLw3FzM4NCQeRorvZ55AV/77lQyOQ==" - }, "node_modules/svg-baker": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/svg-baker/-/svg-baker-1.7.0.tgz", @@ -46352,6 +45524,7 @@ }, "node_modules/tmp": { "version": "0.0.33", + "dev": true, "license": "MIT", "dependencies": { "os-tmpdir": "~1.0.2" @@ -47591,11 +46764,6 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/value-equal": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/value-equal/-/value-equal-0.2.1.tgz", - "integrity": "sha512-yRL36Xb2K/HmFT5Fe3M86S7mu4+a12/3l7uytUh6eNPPjP77ldPBvsAvmnWff39sXn55naRMZN8LZWRO8PWaeQ==" - }, "node_modules/vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", @@ -47673,11 +46841,6 @@ "node": ">=0.10.0" } }, - "node_modules/visibilityjs": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/visibilityjs/-/visibilityjs-1.2.8.tgz", - "integrity": "sha512-Y+aL3OUX88b+/VSmkmC2ApuLbf0grzbNLpCfIDSw3BzTU6PqcPsdgIOaw8b+eZoy+DdQqnVN3y/Evow9vQq9Ig==" - }, "node_modules/vm-browserify": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", @@ -49924,23 +49087,6 @@ "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==" }, - "node_modules/xmlhttprequest-ssl": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.0.0.tgz", - "integrity": "sha512-QKxVRxiRACQcVuQEYFsI1hhkrMlrXHPegbbd1yn9UHOmRxY+si12nQYzri3vbzt8VdTTRviqcKxcyllFas5z2A==", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/xstate": { - "version": "4.38.2", - "resolved": "https://registry.npmjs.org/xstate/-/xstate-4.38.2.tgz", - "integrity": "sha512-Fba/DwEPDLneHT3tbJ9F3zafbQXszOlyCJyQqqdzmtlY/cwE2th462KK48yaANf98jHlP6lJvxfNtN0LFKXPQg==", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/xstate" - } - }, "node_modules/xtend": { "version": "4.0.2", "license": "MIT", @@ -54103,16 +53249,6 @@ "resolved": "https://registry.npmjs.org/@mdx-js/util/-/util-1.6.22.tgz", "integrity": "sha512-H1rQc1ZOHANWBvPcW+JpGwr+juXSxM8Q8YCkm3GhZd8REu1fHR3z99CErO1p9pkcfcxZnMdIZdIsXkOHY0NilA==" }, - "@mediapipe/face_detection": { - "version": "0.4.1646425229", - "resolved": "https://registry.npmjs.org/@mediapipe/face_detection/-/face_detection-0.4.1646425229.tgz", - "integrity": "sha512-aeCN+fRAojv9ch3NXorP6r5tcGVLR3/gC1HmtqB0WEZBRXrdP6/3W/sGR0dHr1iT6ueiK95G9PVjbzFosf/hrg==" - }, - "@mediapipe/face_mesh": { - "version": "0.4.1633559619", - "resolved": "https://registry.npmjs.org/@mediapipe/face_mesh/-/face_mesh-0.4.1633559619.tgz", - "integrity": "sha512-Vc8cdjxS5+O2gnjWH9KncYpUCVXT0h714KlWAsyqJvJbIgUJBqpppbIx8yWcAzBDxm/5cYSuBI5p5ySIPxzcEg==" - }, "@motionone/animation": { "version": "10.16.3", "resolved": "https://registry.npmjs.org/@motionone/animation/-/animation-10.16.3.tgz", @@ -54691,123 +53827,6 @@ "@octokit/openapi-types": "^14.0.0" } }, - "@onfido/active-video-capture": { - "version": "0.22.2", - "resolved": "https://registry.npmjs.org/@onfido/active-video-capture/-/active-video-capture-0.22.2.tgz", - "integrity": "sha512-wM7PJUdB0rwCpIdKoOczynqALW9zXXr/x43RGDpaGBFMdY5imbXpQtI/JaaZjQsWK6cH8FKAkKLvrxRNYCsMmQ==", - "requires": { - "@mediapipe/face_detection": "^0.4.1646425229", - "@mediapipe/face_mesh": "^0.4.1633559619", - "@onfido/castor": "^2.2.2", - "@onfido/castor-icons": "^2.12.0", - "@tensorflow-models/face-detection": "^1.0.1", - "@tensorflow-models/face-landmarks-detection": "^1.0.2", - "@tensorflow/tfjs-backend-wasm": "^3.20.0", - "@tensorflow/tfjs-backend-webgl": "^3.20.0", - "@tensorflow/tfjs-converter": "^3.20.0", - "@tensorflow/tfjs-core": "^3.20.0", - "@typescript/lib-dom": "npm:@types/web", - "patch-package": "^6.4.7", - "postinstall-postinstall": "^2.1.0", - "preact": "^10.10.6", - "react-webcam": "^7.0.0" - }, - "dependencies": { - "@tensorflow-models/face-landmarks-detection": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@tensorflow-models/face-landmarks-detection/-/face-landmarks-detection-1.0.5.tgz", - "integrity": "sha512-54XJPi8g29/MknJ33ZBrLsEzr9kw/dJtrJMMD3xrCrnRlfFQPIKQ5PI2Wml55Fz2p4U2hemzBB0/H+S94JddIQ==", - "requires": { - "rimraf": "^3.0.2" - } - }, - "@tensorflow/tfjs-backend-cpu": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-cpu/-/tfjs-backend-cpu-3.21.0.tgz", - "integrity": "sha512-88S21UAdzyK0CsLUrH17GPTD+26E85OP9CqmLZslaWjWUmBkeTQ5Zqyp6iK+gELnLxPx6q7JsNEeFuPv4254lQ==", - "requires": { - "@types/seedrandom": "^2.4.28", - "seedrandom": "^3.0.5" - } - }, - "@tensorflow/tfjs-backend-wasm": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-wasm/-/tfjs-backend-wasm-3.21.0.tgz", - "integrity": "sha512-TVkJWrqukdxvIaQn9jZvtXR+7fmT7sti6NQH5OKVcBmFYIW7I3RiRRE66inVrHjEEvIVTUuW9yo9Ialn31EFIw==", - "requires": { - "@tensorflow/tfjs-backend-cpu": "3.21.0", - "@types/emscripten": "~0.0.34" - } - }, - "@tensorflow/tfjs-backend-webgl": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-webgl/-/tfjs-backend-webgl-3.21.0.tgz", - "integrity": "sha512-N4zitIAT9IX8B8oe489qM3f3VcESxGZIZvHmVP8varOQakTvTX859aaPo1s8hK1qCy4BjSGbweooZe4U8D4kTQ==", - "requires": { - "@tensorflow/tfjs-backend-cpu": "3.21.0", - "@types/offscreencanvas": "~2019.3.0", - "@types/seedrandom": "^2.4.28", - "@types/webgl-ext": "0.0.30", - "@types/webgl2": "0.0.6", - "seedrandom": "^3.0.5" - } - }, - "@tensorflow/tfjs-converter": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-converter/-/tfjs-converter-3.21.0.tgz", - "integrity": "sha512-12Y4zVDq3yW+wSjSDpSv4HnpL2sDZrNiGSg8XNiDE4HQBdjdA+a+Q3sZF/8NV9y2yoBhL5L7V4mMLDdbZBd9/Q==", - "requires": {} - }, - "@tensorflow/tfjs-core": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-core/-/tfjs-core-3.21.0.tgz", - "integrity": "sha512-YSfsswOqWfd+M4bXIhT3hwtAb+IV8+ODwIxwdFR/7jTAPZP1wMVnSlpKnXHAN64HFOiP+Tm3HmKusEZ0+09A0w==", - "requires": { - "@types/long": "^4.0.1", - "@types/offscreencanvas": "~2019.3.0", - "@types/seedrandom": "^2.4.28", - "@types/webgl-ext": "0.0.30", - "@webgpu/types": "0.1.16", - "long": "4.0.0", - "node-fetch": "~2.6.1", - "seedrandom": "^3.0.5" - } - }, - "@webgpu/types": { - "version": "0.1.16", - "resolved": "https://registry.npmjs.org/@webgpu/types/-/types-0.1.16.tgz", - "integrity": "sha512-9E61voMP4+Rze02jlTXud++Htpjyyk8vw5Hyw9FGRrmhHQg2GqbuOfwf5Klrb8vTxc2XWI3EfO7RUHMpxTj26A==" - } - } - }, - "@onfido/castor": { - "version": "2.2.5", - "resolved": "https://registry.npmjs.org/@onfido/castor/-/castor-2.2.5.tgz", - "integrity": "sha512-Io3FTazT06FDFJGjHWNF9g0fsIKHw38L2apL//zp/vveyEV1Zce/U0fLzC8LcE5TuoMnoAYaRi6Jwogd8EN5TA==", - "requires": { - "@onfido/castor-tokens": "^1.0.0-beta.6", - "csstype": "^3.1.1" - } - }, - "@onfido/castor-icons": { - "version": "2.22.0", - "resolved": "https://registry.npmjs.org/@onfido/castor-icons/-/castor-icons-2.22.0.tgz", - "integrity": "sha512-7OnCvu5xqVWcBLqovZyb99NP0oHw7sjkVYXZhi438i0U6Pgecrhu/14Gc/IN/kvgDxWj9qmiYdd0qdjNaVckrQ==", - "requires": {} - }, - "@onfido/castor-tokens": { - "version": "1.0.0-beta.6", - "resolved": "https://registry.npmjs.org/@onfido/castor-tokens/-/castor-tokens-1.0.0-beta.6.tgz", - "integrity": "sha512-MfwuSlNdM0Ay0cI3LLyqZGsHW0e1Y1R/0IdQKVU575PdWQx1Q/538aOZMo/a3/oSW0pMEgfOm+mNqPx057cvWA==" - }, - "@onfido/opencv": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@onfido/opencv/-/opencv-1.0.2.tgz", - "integrity": "sha512-dgUj7NJ3tohlqU6WdYiey5NBTTjI0VYp2yyL8dz1g8c/nX5tM5toOgEgyaNz7fX2tlpJO877G/CT/n5yYSb+gg==", - "requires": { - "mirada": "^0.0.15" - } - }, "@parcel/watcher": { "version": "2.0.4", "dev": true, @@ -55364,64 +54383,6 @@ "integrity": "sha512-VNipPeJT7B6hD/OBDi6IjcGW+Y8fJHNkVUkvFk0BUkkZLY1eefUmtrv2CWWbJ0hxfGFWe+wRVEjsdWDXqLN/DA==", "requires": {} }, - "@sentry-internal/tracing": { - "version": "7.70.0", - "resolved": "https://registry.npmjs.org/@sentry-internal/tracing/-/tracing-7.70.0.tgz", - "integrity": "sha512-SpbE6wZhs6QwG2ORWCt8r28o1T949qkWx/KeRTCdK4Ub95PQ3Y3DgnqD8Wz//3q50Wt6EZDEibmz4t067g6PPg==", - "requires": { - "@sentry/core": "7.70.0", - "@sentry/types": "7.70.0", - "@sentry/utils": "7.70.0", - "tslib": "^2.4.1 || ^1.9.3" - } - }, - "@sentry/browser": { - "version": "7.70.0", - "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-7.70.0.tgz", - "integrity": "sha512-PB+IP49/TLcnDHCj9eJ5tcHE0pzXg23wBakmF3KGMSd5nxEbUvmOsaFPZcgUUlL9JlU3v1Y40We7HdPStrY6oA==", - "requires": { - "@sentry-internal/tracing": "7.70.0", - "@sentry/core": "7.70.0", - "@sentry/replay": "7.70.0", - "@sentry/types": "7.70.0", - "@sentry/utils": "7.70.0", - "tslib": "^2.4.1 || ^1.9.3" - } - }, - "@sentry/core": { - "version": "7.70.0", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.70.0.tgz", - "integrity": "sha512-voUsGVM+jwRp99AQYFnRvr7sVd2tUhIMj1L6F42LtD3vp7t5ZnKp3NpXagtFW2vWzXESfyJUBhM0qI/bFvn7ZA==", - "requires": { - "@sentry/types": "7.70.0", - "@sentry/utils": "7.70.0", - "tslib": "^2.4.1 || ^1.9.3" - } - }, - "@sentry/replay": { - "version": "7.70.0", - "resolved": "https://registry.npmjs.org/@sentry/replay/-/replay-7.70.0.tgz", - "integrity": "sha512-XjnyE6ORREz9kBWWHdXaIjS9P2Wo7uEw+y23vfLQwzV0Nx3xJ+FG4dwf8onyIoeCZDKbz7cqQIbugU1gkgUtZw==", - "requires": { - "@sentry/core": "7.70.0", - "@sentry/types": "7.70.0", - "@sentry/utils": "7.70.0" - } - }, - "@sentry/types": { - "version": "7.70.0", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.70.0.tgz", - "integrity": "sha512-rY4DqpiDBtXSk4MDNBH3dwWqfPbNBI/9GA7Y5WJSIcObBtfBKp0fzYliHJZD0pgM7d4DPFrDn42K9Iiumgymkw==" - }, - "@sentry/utils": { - "version": "7.70.0", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.70.0.tgz", - "integrity": "sha512-0cChMH0lsGp+5I3D4wOHWwjFN19HVrGUs7iWTLTO5St3EaVbdeLbI1vFXHxMxvopbwgpeZafbreHw/loIdZKpw==", - "requires": { - "@sentry/types": "7.70.0", - "tslib": "^2.4.1 || ^1.9.3" - } - }, "@sinonjs/commons": { "version": "1.8.6", "dev": true, @@ -55464,11 +54425,6 @@ "integrity": "sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ==", "peer": true }, - "@socket.io/component-emitter": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz", - "integrity": "sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==" - }, "@stitches/react": { "version": "1.2.8", "resolved": "https://registry.npmjs.org/@stitches/react/-/react-1.2.8.tgz", @@ -60887,74 +59843,6 @@ "resolved": "https://registry.npmjs.org/@tanstack/table-core/-/table-core-8.10.3.tgz", "integrity": "sha512-hJ55YfJlWbfzRROfcyA/kC1aZr/shsLA8XNAwN8jXylhYWGLnPmiJJISrUfj4dMMWRiFi0xBlnlC7MLH+zSrcw==" }, - "@tensorflow-models/face-detection": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@tensorflow-models/face-detection/-/face-detection-1.0.2.tgz", - "integrity": "sha512-anjSxy3MnZdTiVluOEQZeaFWM30IPswFM+SltX6wseXKja/AbrHYqamGNZKUylAs2JAyudq+xqTRPS+nA2ourg==", - "requires": { - "rimraf": "^3.0.2", - "tslib": "2.4.0" - }, - "dependencies": { - "tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" - } - } - }, - "@tensorflow/tfjs-backend-cpu": { - "version": "4.11.0", - "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-cpu/-/tfjs-backend-cpu-4.11.0.tgz", - "integrity": "sha512-2zmGX9MuR8AwscSGOybz4fBOFgQDnj+ZCWGkLxDzbKecy9GxuilukT46xB2zU0kSq7Mf3ncfE/9eUEy6a7ZDqQ==", - "peer": true, - "requires": { - "@types/seedrandom": "^2.4.28", - "seedrandom": "^3.0.5" - } - }, - "@tensorflow/tfjs-backend-webgl": { - "version": "4.11.0", - "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-webgl/-/tfjs-backend-webgl-4.11.0.tgz", - "integrity": "sha512-sM/B65u+1T3U+Ctiq1fn5j6VmiLEZW7BpuSa3ZXDXtIS07MoZ2FTuO8BMudxEY4xGpTyoOzqTOGT9BaGO3qrWg==", - "peer": true, - "requires": { - "@tensorflow/tfjs-backend-cpu": "4.11.0", - "@types/offscreencanvas": "~2019.3.0", - "@types/seedrandom": "^2.4.28", - "seedrandom": "^3.0.5" - } - }, - "@tensorflow/tfjs-converter": { - "version": "4.11.0", - "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-converter/-/tfjs-converter-4.11.0.tgz", - "integrity": "sha512-j2JEVwkqh+pyin+sxUiNUG7QOIU2S0+5SzN8LFXHlR90/bPvC2qiaaSPYdGG/BYidFc27QCHD3obBXrb1EE/ow==", - "peer": true, - "requires": {} - }, - "@tensorflow/tfjs-core": { - "version": "4.11.0", - "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-core/-/tfjs-core-4.11.0.tgz", - "integrity": "sha512-t0mCNIco8wg6aZdHWT1d6ZuKtbbdY5y871ELWLSUA1+grXDvvaroHYh5eeJexJYXeg+EQ0/hzB0G8nLsLjlyVQ==", - "peer": true, - "requires": { - "@types/long": "^4.0.1", - "@types/offscreencanvas": "~2019.7.0", - "@types/seedrandom": "^2.4.28", - "@webgpu/types": "0.1.30", - "long": "4.0.0", - "node-fetch": "~2.6.1", - "seedrandom": "^3.0.5" - }, - "dependencies": { - "@types/offscreencanvas": { - "version": "2019.7.1", - "resolved": "https://registry.npmjs.org/@types/offscreencanvas/-/offscreencanvas-2019.7.1.tgz", - "integrity": "sha512-+HSrJgjBW77ALieQdMJvXhRZUIRN1597L+BKvsyeiIlHHERnqjcuOLyodK3auJ3Y3zRezNKtKAhuQWYJfEgFHQ==", - "peer": true - } - } - }, "@testing-library/dom": { "version": "8.19.0", "requires": { @@ -61180,11 +60068,6 @@ "classnames": "*" } }, - "@types/emscripten": { - "version": "0.0.34", - "resolved": "https://registry.npmjs.org/@types/emscripten/-/emscripten-0.0.34.tgz", - "integrity": "sha512-QSb9ojDincskc+uKMI0KXp8e1NALFINCrMlp8VGKGcTSxeEyRTTKyjWw75NYrCZHUsVEEEpr1tYHpbtaC++/sQ==" - }, "@types/eslint": { "version": "7.29.0", "requires": { @@ -61342,11 +60225,6 @@ "@types/lodash": "*" } }, - "@types/long": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", - "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==" - }, "@types/mdast": { "version": "3.0.10", "requires": { @@ -61397,11 +60275,6 @@ "resolved": "https://registry.npmjs.org/@types/object.fromentries/-/object.fromentries-2.0.2.tgz", "integrity": "sha512-yUrBe89bzuR2AT0XJU26cmMylc15AOTeZzrnzbYcaMCd8fobYPsre+BJku5JJq5iauUdZkdkrujjzEz0l3MrLg==" }, - "@types/offscreencanvas": { - "version": "2019.3.0", - "resolved": "https://registry.npmjs.org/@types/offscreencanvas/-/offscreencanvas-2019.3.0.tgz", - "integrity": "sha512-esIJx9bQg+QYF0ra8GnvfianIY8qWB0GBx54PK5Eps6m+xTj86KLavHv6qDhzKcu5UUOgNfJ2pWaIIV7TRUd9Q==" - }, "@types/parse-json": { "version": "4.0.0" }, @@ -61550,11 +60423,6 @@ "@types/scheduler": { "version": "0.16.2" }, - "@types/seedrandom": { - "version": "2.4.30", - "resolved": "https://registry.npmjs.org/@types/seedrandom/-/seedrandom-2.4.30.tgz", - "integrity": "sha512-AnxLHewubLVzoF/A4qdxBGHCKifw8cY32iro3DQX9TPcetE95zBeVt3jnsvtvAUf1vwzMfwzp4t/L2yqPlnjkQ==" - }, "@types/semver": { "version": "7.3.13" }, @@ -61605,16 +60473,6 @@ "@types/unist": { "version": "2.0.6" }, - "@types/webgl-ext": { - "version": "0.0.30", - "resolved": "https://registry.npmjs.org/@types/webgl-ext/-/webgl-ext-0.0.30.tgz", - "integrity": "sha512-LKVgNmBxN0BbljJrVUwkxwRYqzsAEPcZOe6S2T6ZaBDIrFp0qu4FNlpc5sM1tGbXUYFgdVQIoeLk1Y1UoblyEg==" - }, - "@types/webgl2": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/@types/webgl2/-/webgl2-0.0.6.tgz", - "integrity": "sha512-50GQhDVTq/herLMiqSQkdtRu+d5q/cWHn4VvKJtrj4DJAjo1MNkWYa2MA41BaBO1q1HgsUjuQvEOk0QHvlnAaQ==" - }, "@types/webpack": { "version": "4.41.33", "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.33.tgz", @@ -61856,11 +60714,6 @@ } } }, - "@typescript/lib-dom": { - "version": "npm:@types/web@0.0.115", - "resolved": "https://registry.npmjs.org/@types/web/-/web-0.0.115.tgz", - "integrity": "sha512-IBtUgtxnITC7WTCg4tv6kCnSP0T+fM+3PzQPIzLzJY1DDlhBFKM/9+uMURw14YweWPDiFNIZ94Gc1bJtwow97g==" - }, "@webassemblyjs/ast": { "version": "1.11.5", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.5.tgz", @@ -62097,12 +60950,6 @@ "@xtuc/long": "4.2.2" } }, - "@webgpu/types": { - "version": "0.1.30", - "resolved": "https://registry.npmjs.org/@webgpu/types/-/types-0.1.30.tgz", - "integrity": "sha512-9AXJSmL3MzY8ZL//JjudA//q+2kBRGhLBFpkdGksWIuxrMy81nFrCzj2Am+mbh8WoU6rXmv7cY5E3rdlyru2Qg==", - "peer": true - }, "@webpack-cli/configtest": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.2.0.tgz", @@ -62147,7 +60994,8 @@ "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==" }, "@yarnpkg/lockfile": { - "version": "1.1.0" + "version": "1.1.0", + "dev": true }, "@yarnpkg/parsers": { "version": "3.0.0-rc.32", @@ -63723,11 +62571,6 @@ "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" }, - "blueimp-load-image": { - "version": "2.29.0", - "resolved": "https://registry.npmjs.org/blueimp-load-image/-/blueimp-load-image-2.29.0.tgz", - "integrity": "sha512-psm81GlZ0ffKxVT0QN9dvhpzXMv1KxgXSg8ars0XGAcEGsTwFT2IPo59HDXlw4Lo2oImdPzwrwkliZSiLLUpIw==" - }, "bn.js": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", @@ -64028,6 +62871,7 @@ }, "buffer": { "version": "5.7.1", + "dev": true, "requires": { "base64-js": "^1.3.1", "ieee754": "^1.1.13" @@ -65764,14 +64608,6 @@ } } }, - "cross-fetch": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.8.tgz", - "integrity": "sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==", - "requires": { - "node-fetch": "^2.6.12" - } - }, "cross-spawn": { "version": "7.0.3", "requires": { @@ -66984,11 +65820,6 @@ "domelementtype": "1" } }, - "dompurify": { - "version": "2.4.7", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.4.7.tgz", - "integrity": "sha512-kxxKlPEDa6Nc5WJi+qRgPbOAbgTpSULL+vI3NUXsZMlkJxTqYI9wg5ZTay2sFrdZRWHPWNi+EdAhcJf81WtoMQ==" - }, "domready": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/domready/-/domready-1.0.8.tgz", @@ -67252,31 +66083,6 @@ "objectorarray": "^1.0.5" } }, - "engine.io-client": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-6.5.2.tgz", - "integrity": "sha512-CQZqbrpEYnrpGqC07a9dJDz4gePZUgTPMU3NKJPSeQOyw27Tst4Pl3FemKoFGAlHzgZmKjoRmiJvbWfhCXUlIg==", - "requires": { - "@socket.io/component-emitter": "~3.1.0", - "debug": "~4.3.1", - "engine.io-parser": "~5.2.1", - "ws": "~8.11.0", - "xmlhttprequest-ssl": "~2.0.0" - }, - "dependencies": { - "ws": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", - "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", - "requires": {} - } - } - }, - "engine.io-parser": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.1.tgz", - "integrity": "sha512-9JktcM3u18nU9N2Lz3bWeBgxVgOKpw7yhRaoxQA3FUDZzzw+9WlA6p4G4u0RixNkg14fH7EfEc/RhpurtiROTQ==" - }, "enhanced-resolve": { "version": "0.9.1", "requires": { @@ -67294,11 +66100,6 @@ "entities": { "version": "1.1.2" }, - "enumerate-devices": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/enumerate-devices/-/enumerate-devices-1.1.1.tgz", - "integrity": "sha512-8zDbrc7ocusTL1ZGmvgy0cTwdyCaM7sGZoYLRmnWJalLQzmftDtce+uDU91gafOTo9MCtgjSIxyMv/F4+Hcchw==" - }, "env-paths": { "version": "2.2.1", "dev": true @@ -68491,11 +67292,6 @@ "resolved": "https://registry.npmjs.org/event-emitter-es6/-/event-emitter-es6-1.1.5.tgz", "integrity": "sha512-/n7qzkJBySdbe1W9/FBDdO7gzDIaewgj+Rj6Ayc2BdvVcaGP+p40DyViOFudCgV47UU8+cUFmcD3tJgjwY65qQ==" }, - "eventemitter2": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-2.2.2.tgz", - "integrity": "sha512-AmQ734LWUB9Iyk+2WIU3Z8iRhdL1XQihEE0iF/QC5Xp11zST0Z5tn5jRHa/PgIld2QIPSCys3CREqOQLUhNvkw==" - }, "eventemitter3": { "version": "4.0.7" }, @@ -69056,11 +67852,6 @@ "ramda": "^0.28.0" } }, - "file-type": { - "version": "12.4.2", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-12.4.2.tgz", - "integrity": "sha512-UssQP5ZgIOKelfsaB5CuGAL+Y+q7EmONuiwF3N5HAH0t27rvrttgi6Ra9k/+DVaY9UF6+ybxu5pOXLUdA8N7Vg==" - }, "file-uri-to-path": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", @@ -69233,14 +68024,6 @@ "path-exists": "^4.0.0" } }, - "find-yarn-workspace-root": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz", - "integrity": "sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ==", - "requires": { - "micromatch": "^4.0.2" - } - }, "flat": { "version": "5.0.2", "dev": true @@ -73889,14 +72672,6 @@ "kind-of": { "version": "6.0.3" }, - "klaw-sync": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/klaw-sync/-/klaw-sync-6.0.0.tgz", - "integrity": "sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ==", - "requires": { - "graceful-fs": "^4.1.11" - } - }, "kleur": { "version": "3.0.3" }, @@ -74506,11 +73281,6 @@ "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.8.1.tgz", "integrity": "sha512-tCRIJM51SHjAayKwC+QAg8hT8vg6z7GSgLJKGvzuPb1Wc+hLzqtuVLxp6/HzSPOozuK+8ErAhy7U/sVzw8Dgfg==" }, - "long": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", - "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" - }, "longest-streak": { "version": "2.0.4", "dev": true @@ -75051,22 +73821,6 @@ "yallist": "^4.0.0" } }, - "mirada": { - "version": "0.0.15", - "resolved": "https://registry.npmjs.org/mirada/-/mirada-0.0.15.tgz", - "integrity": "sha512-mbm4c+wjBVcmUzHRLv/TfOAq+iy03D24KwGxx8H+NSXkD5EOZV9zFWbVxTvZCc9XwR0FIUhryU/kQm12SMSQ3g==", - "requires": { - "buffer": "^5.4.3", - "cross-fetch": "^3.0.4", - "file-type": "^12.3.0", - "misc-utils-of-mine-generic": "^0.2.31" - } - }, - "misc-utils-of-mine-generic": { - "version": "0.2.45", - "resolved": "https://registry.npmjs.org/misc-utils-of-mine-generic/-/misc-utils-of-mine-generic-0.2.45.tgz", - "integrity": "sha512-WsG2zYiui2cdEbHF2pXmJfnjHb4zL+cy+PaYcLgIpMju98hwX89VbjlvGIfamCfEodbQ0qjCEvD3ocgkCXfMOQ==" - }, "mississippi": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz", @@ -76355,71 +75109,6 @@ "mimic-fn": "^2.1.0" } }, - "onfido-sdk-ui": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/onfido-sdk-ui/-/onfido-sdk-ui-11.0.1.tgz", - "integrity": "sha512-S61h4njiuWQD3KNLRZaoobiaSjTvt1FjBOwqnsJmnkN7TD/knu8c1IyNlgztRe0Fg2CSE70rwEiO8tdlM3pqsg==", - "requires": { - "@onfido/active-video-capture": "^0.22.1", - "@onfido/opencv": "^1.0.0", - "@sentry/browser": "^7.2.0", - "blueimp-load-image": "~2.29.0", - "classnames": "~2.2.5", - "core-js": "^3.21.1", - "deepmerge": "^4.2.2", - "dompurify": "^2.2.6", - "enumerate-devices": "^1.1.1", - "eventemitter2": "~2.2.2", - "history": "~4.5.1", - "hoist-non-react-statics": "^3.3.2", - "js-cookie": "^3.0.1", - "pdfobject": "^2.2.7", - "preact": "^10.5.13", - "redux": "^4.0.5", - "socket.io-client": "^4.2.0", - "supports-webp": "~1.0.3", - "uuid": "^8.3.2", - "visibilityjs": "~1.2.4", - "xstate": "^4.33.6" - }, - "dependencies": { - "classnames": { - "version": "2.2.6", - "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.6.tgz", - "integrity": "sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q==" - }, - "core-js": { - "version": "3.32.2", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.32.2.tgz", - "integrity": "sha512-pxXSw1mYZPDGvTQqEc5vgIb83jGQKFGYWY76z4a7weZXUolw3G+OvpZqSRcfYOoOVUQJYEPsWeQK8pKEnUtWxQ==" - }, - "history": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/history/-/history-4.5.1.tgz", - "integrity": "sha512-gfHeJeYeMzFtos61gdA1AloO0hGXPF2Yum+2FRdJvlylYQOz51OnT1zuwg9UYst1BRrONhcAh3Nmsg9iblgl6g==", - "requires": { - "invariant": "^2.2.1", - "loose-envify": "^1.2.0", - "resolve-pathname": "^2.0.0", - "value-equal": "^0.2.0", - "warning": "^3.0.0" - } - }, - "js-cookie": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.5.tgz", - "integrity": "sha512-cEiJEAEoIbWfCZYKWhVwFuvPX1gETRYPw6LlaTKoxD3s2AkXzkCjnp6h0V77ozyqj0jakteJ4YqDJT830+lVGw==" - }, - "warning": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/warning/-/warning-3.0.0.tgz", - "integrity": "sha512-jMBt6pUrKn5I+OGgtQ4YZLdhIeJmObddh6CsibPxyQ5yPZm1XExSyzC1LCNX7BzhxWgiHmizBWJTHJIjMjTQYQ==", - "requires": { - "loose-envify": "^1.0.0" - } - } - } - }, "open": { "version": "8.4.0", "requires": { @@ -76852,148 +75541,6 @@ "pascalcase": { "version": "0.1.1" }, - "patch-package": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/patch-package/-/patch-package-6.5.1.tgz", - "integrity": "sha512-I/4Zsalfhc6bphmJTlrLoOcAF87jcxko4q0qsv4bGcurbr8IskEOtdnt9iCmsQVGL1B+iUhSQqweyTLJfCF9rA==", - "requires": { - "@yarnpkg/lockfile": "^1.1.0", - "chalk": "^4.1.2", - "cross-spawn": "^6.0.5", - "find-yarn-workspace-root": "^2.0.0", - "fs-extra": "^9.0.0", - "is-ci": "^2.0.0", - "klaw-sync": "^6.0.0", - "minimist": "^1.2.6", - "open": "^7.4.2", - "rimraf": "^2.6.3", - "semver": "^5.6.0", - "slash": "^2.0.0", - "tmp": "^0.0.33", - "yaml": "^1.10.2" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "fs-extra": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", - "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", - "requires": { - "at-least-node": "^1.0.0", - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - } - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" - }, - "open": { - "version": "7.4.2", - "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz", - "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==", - "requires": { - "is-docker": "^2.0.0", - "is-wsl": "^2.1.1" - } - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==" - }, - "rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "requires": { - "glob": "^7.1.3" - } - }, - "semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==" - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==" - }, - "slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==" - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "requires": { - "has-flag": "^4.0.0" - } - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "requires": { - "isexe": "^2.0.0" - } - } - } - }, "path-browserify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", @@ -77047,11 +75594,6 @@ "sha.js": "^2.4.8" } }, - "pdfobject": { - "version": "2.2.12", - "resolved": "https://registry.npmjs.org/pdfobject/-/pdfobject-2.2.12.tgz", - "integrity": "sha512-D0oyD/sj8j82AMaJhoyMaY1aD5TkbpU3FbJC6w9/cpJlZRpYHqAkutXw1Ca/FKjYPZmTAu58uGIfgOEaDlbY8A==" - }, "performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", @@ -78026,16 +76568,6 @@ "posthtml-render": "^1.0.6" } }, - "postinstall-postinstall": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/postinstall-postinstall/-/postinstall-postinstall-2.1.0.tgz", - "integrity": "sha512-7hQX6ZlZXIoRiWNrbMQaLzUUfH+sSx39u8EJ9HYuDc1kLo9IXKWjM5RSquZN1ad5GnH8CGFM78fsAAQi3OKEEQ==" - }, - "preact": { - "version": "10.17.1", - "resolved": "https://registry.npmjs.org/preact/-/preact-10.17.1.tgz", - "integrity": "sha512-X9BODrvQ4Ekwv9GURm9AKAGaomqXmip7NQTZgY7gcNmr7XE83adOMJvd3N42id1tMFU7ojiynRsYnY6/BRFxLA==" - }, "preload-webpack-plugin": { "version": "3.0.0-beta.4", "resolved": "https://registry.npmjs.org/preload-webpack-plugin/-/preload-webpack-plugin-3.0.0-beta.4.tgz", @@ -79186,12 +77718,6 @@ "react-lifecycles-compat": "^3.0.4" } }, - "react-webcam": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/react-webcam/-/react-webcam-7.1.1.tgz", - "integrity": "sha512-2W5WN8wmEv8ZlxvyAlOxVuw6new8Bi7+KSPqoq5oa7z1KSKZ72ucaKqCFRtHSuFjZ5sh5ioS9lp4BGwnaZ6lDg==", - "requires": {} - }, "react-window": { "version": "1.8.9", "resolved": "https://registry.npmjs.org/react-window/-/react-window-1.8.9.tgz", @@ -79998,11 +78524,6 @@ "global-dirs": "^0.1.1" } }, - "resolve-pathname": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/resolve-pathname/-/resolve-pathname-2.2.0.tgz", - "integrity": "sha512-bAFz9ld18RzJfddgrO2e/0S2O81710++chRMUxHjXOYKF6jTAMrUNZrEZ1PvV0zlhfjidm08iRPdTLPno1FuRg==" - }, "resolve-url": { "version": "0.2.1" }, @@ -80639,11 +79160,6 @@ "resolved": "https://registry.npmjs.org/scrollparent/-/scrollparent-2.1.0.tgz", "integrity": "sha512-bnnvJL28/Rtz/kz2+4wpBjHzWoEzXhVg/TE8BeVGJHUqE8THNIRnDxDWMktwM+qahvlRdvlLdsQfYe+cuqfZeA==" }, - "seedrandom": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/seedrandom/-/seedrandom-3.0.5.tgz", - "integrity": "sha512-8OwmbklUNzwezjGInmZ+2clQmExQPvomqjL7LFqOYqtmuxRgQYqOD3mHaU+MvZn5FLUeVxVfQjwLZW/n/JFuqg==" - }, "select": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/select/-/select-1.1.2.tgz", @@ -81174,26 +79690,6 @@ } } }, - "socket.io-client": { - "version": "4.7.2", - "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.7.2.tgz", - "integrity": "sha512-vtA0uD4ibrYD793SOIAwlo8cj6haOeMHrGvwPxJsxH7CeIksqJ+3Zc06RvWTIFgiSqx4A3sOnTXpfAEE2Zyz6w==", - "requires": { - "@socket.io/component-emitter": "~3.1.0", - "debug": "~4.3.2", - "engine.io-client": "~6.5.2", - "socket.io-parser": "~4.2.4" - } - }, - "socket.io-parser": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.4.tgz", - "integrity": "sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==", - "requires": { - "@socket.io/component-emitter": "~3.1.0", - "debug": "~4.3.1" - } - }, "sockjs": { "version": "0.3.24", "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.24.tgz", @@ -82193,11 +80689,6 @@ "supports-preserve-symlinks-flag": { "version": "1.0.0" }, - "supports-webp": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/supports-webp/-/supports-webp-1.0.7.tgz", - "integrity": "sha512-ZlqT+sCgZKcykOLrk8DYR4t3Em+nyVSHpiV3q7uzOutLwKIYU23n88KibCLw3FzM4NCQeRorvZ55AV/77lQyOQ==" - }, "svg-baker": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/svg-baker/-/svg-baker-1.7.0.tgz", @@ -82740,6 +81231,7 @@ }, "tmp": { "version": "0.0.33", + "dev": true, "requires": { "os-tmpdir": "~1.0.2" } @@ -83536,11 +82028,6 @@ "builtins": "^5.0.0" } }, - "value-equal": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/value-equal/-/value-equal-0.2.1.tgz", - "integrity": "sha512-yRL36Xb2K/HmFT5Fe3M86S7mu4+a12/3l7uytUh6eNPPjP77ldPBvsAvmnWff39sXn55naRMZN8LZWRO8PWaeQ==" - }, "vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", @@ -83599,11 +82086,6 @@ } } }, - "visibilityjs": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/visibilityjs/-/visibilityjs-1.2.8.tgz", - "integrity": "sha512-Y+aL3OUX88b+/VSmkmC2ApuLbf0grzbNLpCfIDSw3BzTU6PqcPsdgIOaw8b+eZoy+DdQqnVN3y/Evow9vQq9Ig==" - }, "vm-browserify": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", @@ -85338,16 +83820,6 @@ "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==" }, - "xmlhttprequest-ssl": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.0.0.tgz", - "integrity": "sha512-QKxVRxiRACQcVuQEYFsI1hhkrMlrXHPegbbd1yn9UHOmRxY+si12nQYzri3vbzt8VdTTRviqcKxcyllFas5z2A==" - }, - "xstate": { - "version": "4.38.2", - "resolved": "https://registry.npmjs.org/xstate/-/xstate-4.38.2.tgz", - "integrity": "sha512-Fba/DwEPDLneHT3tbJ9F3zafbQXszOlyCJyQqqdzmtlY/cwE2th462KK48yaANf98jHlP6lJvxfNtN0LFKXPQg==" - }, "xtend": { "version": "4.0.2" }, diff --git a/packages/account/package.json b/packages/account/package.json index 2c0fa8befa1b..9d5c57f8320b 100644 --- a/packages/account/package.json +++ b/packages/account/package.json @@ -44,7 +44,6 @@ "js-cookie": "^2.2.1", "mobx": "^6.6.1", "mobx-react": "^7.5.1", - "onfido-sdk-ui": "^11.0.0", "prop-types": "^15.7.2", "qrcode.react": "^1.0.0", "react": "^17.0.2", diff --git a/packages/account/src/Components/additional-kyc-info-modal/__test__/additional-kyc-info-form.spec.tsx b/packages/account/src/Components/additional-kyc-info-modal/__test__/additional-kyc-info-form.spec.tsx new file mode 100644 index 000000000000..0b1f9dc9affe --- /dev/null +++ b/packages/account/src/Components/additional-kyc-info-modal/__test__/additional-kyc-info-form.spec.tsx @@ -0,0 +1,134 @@ +import React from 'react'; +import { render, screen, waitFor } from '@testing-library/react'; +import { StoreProvider, mockStore } from '@deriv/stores'; +import { AdditionalKycInfoForm } from '../additional-kyc-info-form'; +import userEvent from '@testing-library/user-event'; +import { useSettings } from '@deriv/api'; + +jest.mock('@deriv/api', () => ({ + ...jest.requireActual('@deriv/api'), + useSettings: jest.fn(), +})); + +const mockedUseSettings = useSettings as jest.MockedFunction; + +const mock_settings: ReturnType = { + update: jest.fn(), + mutation: { isLoading: false, isSuccess: false, error: null, isError: false }, + data: { + tax_identification_number: '', + tax_residence: '', + place_of_birth: '', + account_opening_reason: '', + }, +}; + +jest.mock('@deriv/shared', () => ({ + ...jest.requireActual('@deriv/shared'), + generateValidationFunction: jest.fn(), +})); + +describe('AdditionalKycInfoForm', () => { + const setError = jest.fn(); + const mock_store = mockStore({}); + + it('should render the form fields', () => { + mockedUseSettings.mockReturnValue(mock_settings); + render( + + + + ); + + expect(screen.getByTestId('dt_place_of_birth')).toBeInTheDocument(); + expect(screen.getByTestId('dt_tax_residence')).toBeInTheDocument(); + expect(screen.getByTestId('dt_tax_identification_number')).toBeInTheDocument(); + expect(screen.getByTestId('dt_account_opening_reason')).toBeInTheDocument(); + }); + + it('should render loading state upon fetching data', () => { + mockedUseSettings.mockReturnValue({ ...mock_settings, isLoading: true }); + render( + + + + ); + + expect(screen.getByTestId('dt_initial_loader')).toBeInTheDocument(); + }); + + it('should submit the form when all fields are valid', async () => { + mockedUseSettings.mockReturnValue(mock_settings); + render( + + + + ); + + const submit_btn = screen.getByRole('button', { name: 'Submit' }); + + userEvent.type(screen.getByTestId('dt_place_of_birth'), 'Ghana'); + userEvent.type(screen.getByTestId('dt_tax_residence'), 'Ghana'); + userEvent.type(screen.getByTestId('dt_tax_identification_number'), 'GHA-000000000-0'); + userEvent.type(screen.getByTestId('dt_account_opening_reason'), 'Speculative'); + + await waitFor(() => { + expect(submit_btn).toBeEnabled(); + }); + userEvent.click(screen.getByRole('button', { name: 'Submit' })); + + expect(mockedUseSettings).toHaveBeenCalled(); + }); + + it('should be able to submit the form without filling optional fields', async () => { + mockedUseSettings.mockReturnValue(mock_settings); + render( + + + + ); + + const submit_btn = screen.getByRole('button', { name: 'Submit' }); + + userEvent.type(screen.getByTestId('dt_place_of_birth'), 'Ghana'); + userEvent.type(screen.getByTestId('dt_account_opening_reason'), 'Speculative'); + + await waitFor(() => { + expect(submit_btn).toBeEnabled(); + }); + userEvent.click(screen.getByRole('button', { name: 'Submit' })); + + expect(mockedUseSettings).toHaveBeenCalled(); + }); + + it('should show an error message if form validation fails', async () => { + mockedUseSettings.mockReturnValue({ + ...mock_settings, + mutation: { + ...mock_settings.mutation, + isError: true, + status: 'error', + error: { + message: 'Invalid TIN format', + }, + }, + }); + render( + + + + ); + + const submit_btn = screen.getByRole('button', { name: 'Submit' }); + + userEvent.type(screen.getByTestId('dt_place_of_birth'), 'Ghana'); + userEvent.type(screen.getByTestId('dt_tax_residence'), 'Ghana'); + userEvent.type(screen.getByTestId('dt_tax_identification_number'), 'GHA-00000000'); + userEvent.type(screen.getByTestId('dt_account_opening_reason'), 'Speculative'); + + userEvent.click(submit_btn); + + expect(mockedUseSettings).toHaveBeenCalled(); + expect(setError).toHaveBeenCalled(); + }); +}); diff --git a/packages/account/src/Components/additional-kyc-info-modal/__test__/additional-kyc-info-modal.spec.tsx b/packages/account/src/Components/additional-kyc-info-modal/__test__/additional-kyc-info-modal.spec.tsx new file mode 100644 index 000000000000..13decd303a3c --- /dev/null +++ b/packages/account/src/Components/additional-kyc-info-modal/__test__/additional-kyc-info-modal.spec.tsx @@ -0,0 +1,36 @@ +import React from 'react'; +import { render, screen } from '@testing-library/react'; +import { StoreProvider, mockStore } from '@deriv/stores'; +import { AdditionalKycInfoModal } from '../additional-kyc-info-modal'; + +jest.mock('../additional-kyc-info-form.tsx', () => jest.fn(() =>
AdditionalKycInfoForm
)); + +describe('AdditionalKycInfoModal', () => { + let modal_root_el: HTMLElement; + const mock_store = mockStore({ + ui: { + is_additional_kyc_info_modal_open: true, + toggleAdditionalKycInfoModal: jest.fn(), + }, + }); + + beforeAll(() => { + modal_root_el = document.createElement('div'); + modal_root_el.setAttribute('id', 'modal_root'); + document.body.appendChild(modal_root_el); + }); + + afterAll(() => { + document.body.removeChild(modal_root_el); + }); + + it('should render the modal when is_additional_kyc_info_modal_open is true', () => { + render( + + + + ); + expect(screen.getByText(/additional information required/i)).toBeInTheDocument(); + expect(screen.getByText(/AdditionalKycInfoForm/i)).toBeInTheDocument(); + }); +}); diff --git a/packages/account/src/Components/additional-kyc-info-modal/__test__/form-config.spec.tsx b/packages/account/src/Components/additional-kyc-info-modal/__test__/form-config.spec.tsx new file mode 100644 index 000000000000..015cb169b86d --- /dev/null +++ b/packages/account/src/Components/additional-kyc-info-modal/__test__/form-config.spec.tsx @@ -0,0 +1,67 @@ +import { GetSettings, ResidenceList } from '@deriv/api-types'; +import { getFormFieldsConfig, getFormConfig, TFields } from '../form-config'; + +const mockAccountSettings: GetSettings = { + immutable_fields: ['place_of_birth'], + place_of_birth: 'UK', + tax_residence: 'UK', + tax_identification_number: '12345', + account_opening_reason: 'Hedging', +}; + +const mockResidenceList: ResidenceList = [ + { value: 'UK', text: 'United Kingdom' }, + { value: 'US', text: 'United States' }, +]; + +describe('getFormFieldsConfig', () => { + it('should return the correct form fields configuration', () => { + const requiredFields: TFields[] = ['place_of_birth', 'tax_residence']; + const config = getFormFieldsConfig(mockAccountSettings, mockResidenceList, requiredFields); + + expect(config.place_of_birth.type).toBe('select'); + expect(config.place_of_birth.initial_value).toBe('United Kingdom'); + expect(config.place_of_birth.disabled).toBe(true); + expect(config.place_of_birth.required).toBe(true); + + expect(config.tax_residence.type).toBe('select'); + expect(config.tax_residence.initial_value).toBe('United Kingdom'); + expect(config.tax_residence.disabled).toBe(false); + expect(config.tax_residence.required).toBe(true); + }); +}); + +describe('getFormConfig', () => { + it('should return the correct form configuration', () => { + const requiredFields: TFields[] = ['place_of_birth', 'tax_residence']; + const formConfig = getFormConfig({ + account_settings: mockAccountSettings, + residence_list: mockResidenceList, + required_fields: requiredFields, + }); + + expect(formConfig.fields.place_of_birth.disabled).toBe(true); + expect(formConfig.fields.place_of_birth.required).toBe(true); + + expect(formConfig.fields.tax_residence.disabled).toBe(false); + expect(formConfig.fields.tax_residence.required).toBe(true); + }); + + it('should return the correct form configuration with input types', () => { + const requiredFields: TFields[] = ['place_of_birth', 'tax_residence']; + const formConfig = getFormConfig({ + account_settings: { ...mockAccountSettings, immutable_fields: ['place_of_birth', 'tax_residence'] }, + residence_list: mockResidenceList, + required_fields: requiredFields, + with_input_types: true, + }); + + expect(formConfig.fields.place_of_birth.type).toBe('select'); + expect(formConfig.fields.place_of_birth.disabled).toBe(true); + expect(formConfig.fields.place_of_birth.required).toBe(true); + + expect(formConfig.fields.tax_residence.type).toBe('select'); + expect(formConfig.fields.tax_residence.disabled).toBe(true); + expect(formConfig.fields.tax_residence.required).toBe(true); + }); +}); diff --git a/packages/account/src/Components/additional-kyc-info-modal/additional-kyc-info-form.tsx b/packages/account/src/Components/additional-kyc-info-modal/additional-kyc-info-form.tsx new file mode 100644 index 000000000000..e0f4eef52830 --- /dev/null +++ b/packages/account/src/Components/additional-kyc-info-modal/additional-kyc-info-form.tsx @@ -0,0 +1,161 @@ +import { Button, Loading, Modal, Text } from '@deriv/components'; +import { isMobile } from '@deriv/shared'; +import { observer, useStore } from '@deriv/stores'; +import { Localize } from '@deriv/translations'; +import classNames from 'classnames'; +import { Form, Formik } from 'formik'; +import React from 'react'; +import { useSettings } from '@deriv/api'; +import { OECD_TIN_FORMAT_URL } from '../../Constants/external-urls'; +import FormFieldInfo from '../form-field-info'; +import { FormInputField } from '../forms/form-fields'; +import FormSelectField from '../forms/form-select-field'; +import { TListItem, getFormConfig } from './form-config'; + +const FormTitle = () => ( + + + +); + +type TAdditionalKycInfoFormProps = { + setError?: React.Dispatch>; +}; + +export const AdditionalKycInfoForm = observer(({ setError }: TAdditionalKycInfoFormProps) => { + const { client, ui, notifications } = useStore(); + const { residence_list, updateAccountStatus } = client; + const { + update, + mutation: { isLoading, error, status }, + data: account_settings, + isLoading: isAccountSettingsLoading, + } = useSettings(); + + const { fields, initialValues, validate } = getFormConfig({ + account_settings, + residence_list, + required_fields: ['place_of_birth', 'account_opening_reason'], + }); + + const onSubmit = (values: typeof initialValues) => { + const place_of_birth = residence_list?.find(item => item.text === values.place_of_birth)?.value; + + const payload: Record = { + place_of_birth, + account_opening_reason: values.account_opening_reason, + }; + + if (values.tax_identification_number) { + payload.tax_identification_number = values.tax_identification_number; + } + + if (values.tax_residence) { + const tax_residence = residence_list?.find(item => item.text === values.tax_residence)?.value; + payload.tax_residence = tax_residence; + } + + update(payload); + }; + + React.useEffect(() => { + if (status === 'success') { + updateAccountStatus(); + notifications.refreshNotifications(); + ui.toggleAdditionalKycInfoModal(); + ui.toggleKycInformationSubmittedModal(); + } else if (status === 'error') { + setError?.(error); + } + }, [error, notifications, setError, status, ui, updateAccountStatus]); + + if (isAccountSettingsLoading) { + return ; + } + + return ( + + {({ isValid, setFieldValue }) => ( +
+ {isLoading ? ( + + ) : ( +
+ +
+ +
+
+ + + } + /> +
+
+ + , +
, + ]} + /> + } + /> +
+
+ { + setFieldValue('account_opening_reason', value, true); + }} + list_height='6rem' + {...fields.account_opening_reason} + /> +
+
+ )} + + + + + )} +
+ ); +}); + +AdditionalKycInfoForm.displayName = 'AdditionalKycInfoForm'; + +export default AdditionalKycInfoForm; diff --git a/packages/account/src/Components/additional-kyc-info-modal/additional-kyc-info-modal.scss b/packages/account/src/Components/additional-kyc-info-modal/additional-kyc-info-modal.scss new file mode 100644 index 000000000000..873a8703237f --- /dev/null +++ b/packages/account/src/Components/additional-kyc-info-modal/additional-kyc-info-modal.scss @@ -0,0 +1,91 @@ +.dc-modal { + &__container { + &_additional-kyc-info { + &-header { + border-bottom: 2px solid var(--general-section-1); + } + + &-footer { + padding: 1.6rem 0 0; + margin: unset; + } + + .inline-message { + margin: 0.8rem 1.6rem; + width: calc(100% - 3.2rem); + justify-content: flex-start; + } + } + } +} + +.additional-kyc-info-modal { + &__portal-header { + padding: 2.5rem 2rem; + } + + &__form { + padding: unset; + height: 100%; + position: relative; + + @include mobile { + width: 100%; + } + + &--header { + margin: 1.6rem 0 2.4rem; + + @include mobile { + padding: 0; + } + } + + .dc-dropdown-list { + margin: 1rem 0; + } + + &-layout { + display: flex; + flex-direction: column; + height: 100%; + + &--fields { + display: flex; + flex-direction: column; + padding: 0 24.4rem; + + @include mobile { + padding: 0 1.6rem; + } + } + } + + &-field { + margin-bottom: 3.2rem; + + &--info { + display: flex; + align-items: baseline; + gap: 0.8rem; + } + } + + &-action { + padding: 1.6rem 2.4rem; + + @include mobile { + position: absolute; + bottom: 0; + width: 100%; + padding: 1.6rem; + } + + .dc-btn { + @include mobile { + width: 100%; + } + } + } + } +} diff --git a/packages/account/src/Components/additional-kyc-info-modal/additional-kyc-info-modal.tsx b/packages/account/src/Components/additional-kyc-info-modal/additional-kyc-info-modal.tsx new file mode 100644 index 000000000000..5b3f86785759 --- /dev/null +++ b/packages/account/src/Components/additional-kyc-info-modal/additional-kyc-info-modal.tsx @@ -0,0 +1,107 @@ +import { + DesktopWrapper, + Div100vhContainer, + InlineMessage, + MobileWrapper, + Modal, + PageOverlay, + Text, + UILoader, +} from '@deriv/components'; +import { getPlatformSettings } from '@deriv/shared'; +import { observer, useStore } from '@deriv/stores'; +import { Localize } from '@deriv/translations'; +import React from 'react'; +import AdditionalKycInfoForm from './additional-kyc-info-form'; + +type TAdditionalKycInfoFormWithHintBox = { + error?: unknown; + setError?: React.Dispatch>; +}; + +const AdditionalKycInfoFormWithHintBox = ({ error, setError }: TAdditionalKycInfoFormWithHintBox) => { + return ( + + {!!error && ( + + )} + + + ); +}; + +export const AdditionalKycInfoModal = observer(() => { + const { + ui: { is_additional_kyc_info_modal_open: is_open, toggleAdditionalKycInfoModal }, + } = useStore(); + const [error, setError] = React.useState(''); + + const toggleModal = (e?: React.MouseEvent | undefined) => { + // if e.target is anchor tag, don't close modal for link click within modal + const target = e?.target as HTMLElement; + if (target.tagName === 'A') e?.stopPropagation(); + toggleAdditionalKycInfoModal(); + }; + + const mt5_platform_settings = getPlatformSettings('mt5'); + + const ModalTitle = () => ( + + ); + + return ( + }> +
+ + } + toggleModal={toggleModal} + className='additional-kyc-info' + width='90.4rem' + height={error ? '54.4rem' : '49.6rem'} + > + + + + + + + + + + } + onClickClose={toggleAdditionalKycInfoModal} + header_classname='additional-kyc-info-modal__portal-header' + > + + + + + +
+
+ ); +}); + +AdditionalKycInfoModal.displayName = 'AdditionalKycInfoModal'; diff --git a/packages/account/src/Components/additional-kyc-info-modal/form-config.tsx b/packages/account/src/Components/additional-kyc-info-modal/form-config.tsx new file mode 100644 index 000000000000..9b1bcd5a3c3b --- /dev/null +++ b/packages/account/src/Components/additional-kyc-info-modal/form-config.tsx @@ -0,0 +1,259 @@ +import React from 'react'; +import { GetSettings, ResidenceList } from '@deriv/api-types'; +import { Localize, localize } from '@deriv/translations'; +import { generateValidationFunction } from '@deriv/shared'; + +// Type for the list of items in a dropdown or select +export type TListItem = { + /** + * The text of the item (e.g. 'United Kingdom', 'Germany', etc.) + */ + text: string; + /** + * The value of the item + */ + value: string; +}; + +export type TFields = 'place_of_birth' | 'tax_residence' | 'tax_identification_number' | 'account_opening_reason'; + +type ReqRule = ['req', React.ReactNode]; + +type LengthRule = ['length', React.ReactNode, { min: number; max: number }]; + +type RegularRule = ['regular', React.ReactNode, { regex: RegExp }]; + +type CustomValidator = ( + value: string, + /** + * The options passed to the validation function + */ + options: Record, + /** + * The values of all fields in the form + */ + values: Record +) => React.ReactNode; + +type CustomRule = [CustomValidator, React.ReactNode]; + +type Rule = ReqRule | LengthRule | RegularRule | CustomRule; + +type TInputConfig = { + label: React.ReactNode; + /** + * The type of the input field (e.g. 'text', 'password', 'select', etc.) + */ + type?: string; + initial_value: string; + required?: boolean; + disabled?: boolean; + placeholder?: string; + /** + * The list of items for the dropdown or select + */ + list_items?: TListItem[]; + /** + * The validation rules for the input field (e.g. 'req', 'length', 'regular', etc.) + */ + rules?: Array; +}; + +export type TGetField = Omit & { name: string }; + +export type TFormFieldsConfig = { + [key in TFields]: TInputConfig; +}; + +/** + * The base config for form fields with validation rules + * every field should have label, type, initial_value, disabled, required, placeholder, list_items, rules + * + * `list_items` is used for dropdowns and select + * @returns TFormFieldsConfig + */ +export const getFormFieldsConfig = ( + account_settings: GetSettings, + residence_list: ResidenceList, + required_fields: TFields[] +) => { + /** + * Check if the field is disabled based on the immutable_fields from API + */ + const isFieldDisabled = (field: string) => account_settings?.immutable_fields?.includes(field); + + /** + * Check if the field is required based on the required_fields array passed + */ + const isFieldRequired = (field: TFields) => required_fields.includes(field); + + const config: TFormFieldsConfig = { + place_of_birth: { + label: ( + + ), + type: 'select', + initial_value: + (account_settings.place_of_birth && + residence_list.find(item => item.value === account_settings.place_of_birth)?.text) ?? + '', + disabled: isFieldDisabled('place_of_birth'), + required: isFieldRequired('place_of_birth'), + list_items: residence_list as TListItem[], + rules: [['req', ]], + }, + tax_residence: { + label: ( + + ), + type: 'select', + initial_value: + (account_settings.tax_residence && + residence_list.find(item => item.value === account_settings.tax_residence)?.text) ?? + '', + disabled: isFieldDisabled('tax_residence'), + required: isFieldRequired('tax_residence'), + list_items: residence_list as TListItem[], + rules: [], + }, + tax_identification_number: { + label: ( + + ), + type: 'text', + initial_value: account_settings.tax_identification_number ?? '', + disabled: isFieldDisabled('tax_identification_number'), + required: isFieldRequired('tax_identification_number'), + rules: [ + [ + 'length', + , + { min: 0, max: 25 }, + ], + [ + // check if the TIN value is available, then perform the regex test + // else return true (to pass the test) + // this is to allow empty string to pass the test in case of optioal TIN field + (value: string) => (value ? RegExp(/^(?!^$|\s+)[A-Za-z0-9./\s-]{0,25}$/).test(value) : true), + localize('Letters, numbers, spaces, periods, hyphens and forward slashes only.'), + ], + [ + (value, options, { tax_residence }) => { + return value ? !!tax_residence : true; + }, + , + ], + [ + (value: string, options, { tax_residence }) => { + const tin_format = residence_list.find( + res => res.text === tax_residence && res.tin_format + )?.tin_format; + return value && tin_format + ? tin_format.some(tax_regex => new RegExp(tax_regex).test(value)) + : true; + }, + , + ], + ], + }, + account_opening_reason: { + label: ( + + ), + type: 'select', + initial_value: account_settings.account_opening_reason ?? '', + disabled: isFieldDisabled('account_opening_reason'), + required: isFieldRequired('account_opening_reason'), + list_items: [ + { + text: localize('Hedging'), + value: 'Hedging', + }, + { + text: localize('Income Earning'), + value: 'Income Earning', + }, + { + text: localize('Speculative'), + value: 'Speculative', + }, + ], + rules: [ + [ + 'req', + , + ], + ], + }, + }; + return config; +}; + +/** + * Generate initial values for form fields + */ +const generateInitialValues = (fields: ReturnType) => { + const initial_values: Record = {} as Record; + (Object.keys(fields) as TFields[]).forEach(field => { + initial_values[field] = fields[field].initial_value; + }); + return initial_values; +}; + +/** + * This function is used to transform form fields config to the format that is used in Formik or Formik Field + */ +const getField = (fields: TFormFieldsConfig, name: TFields, with_input_types: boolean): TGetField => { + const { label, placeholder, required, disabled, type, list_items } = fields[name]; + + return { + name, + label, + required, + disabled, + ...(with_input_types ? { type } : {}), + ...(placeholder ? { placeholder } : {}), + ...(list_items ? { list_items } : {}), + }; +}; + +/** + * Function to transform and return form config that can be used within the component that renders the form + */ +export const getFormConfig = (options: { + account_settings: GetSettings; + residence_list: ResidenceList; + required_fields: TFields[]; + with_input_types?: boolean; +}) => { + const { account_settings, residence_list, required_fields, with_input_types = false } = options; + const fields_config = getFormFieldsConfig(account_settings, residence_list, required_fields); + const inputs: Record = {} as Record; + Object.keys(fields_config).forEach(field_key => { + // @ts-expect-error `field_key` is always a key of `fields_config`, Hence can ignore the TS error. + inputs[field_key] = getField(fields_config, field_key, with_input_types); + }); + return { + fields: inputs, + /** typing fields_config as any as this current config has different structure + * and generateValidationFunction should have generic types + * */ + validate: generateValidationFunction('', fields_config as any), + initialValues: generateInitialValues(fields_config), + }; +}; diff --git a/packages/account/src/Components/additional-kyc-info-modal/index.ts b/packages/account/src/Components/additional-kyc-info-modal/index.ts new file mode 100644 index 000000000000..8d987c7f7f09 --- /dev/null +++ b/packages/account/src/Components/additional-kyc-info-modal/index.ts @@ -0,0 +1,4 @@ +import { AdditionalKycInfoModal } from './additional-kyc-info-modal'; +import './additional-kyc-info-modal.scss'; + +export default AdditionalKycInfoModal; diff --git a/packages/account/src/Components/form-field-info/__tests__/form-field-info.spec.tsx b/packages/account/src/Components/form-field-info/__tests__/form-field-info.spec.tsx new file mode 100644 index 000000000000..be0e29de1147 --- /dev/null +++ b/packages/account/src/Components/form-field-info/__tests__/form-field-info.spec.tsx @@ -0,0 +1,30 @@ +import React from 'react'; +import { render, screen } from '@testing-library/react'; +import { FormFieldInfo } from '../form-field-info'; +import userEvent from '@testing-library/user-event'; + +describe('FormFieldInfo', () => { + it('should render the component', () => { + render(); + const popover = screen.getByTestId('dt_form-field-info__popover'); + expect(popover).toBeInTheDocument(); + }); + + it('should toggle popover on click', () => { + render(); + expect(screen.queryByText('Info content')).not.toBeInTheDocument(); + userEvent.click(screen.getByTestId('dt_form-field-info__popover')); + expect(screen.getByText('Info content')).toBeInTheDocument(); + }); + + it('should close popover when clicking outside', () => { + render(); + expect(screen.queryByText('Info content')).not.toBeInTheDocument(); + userEvent.click(screen.getByTestId('dt_form-field-info__popover')); + + const content = screen.getByText('Info content'); + expect(content).toBeInTheDocument(); + userEvent.click(document.body); + expect(content).not.toBeVisible(); + }); +}); diff --git a/packages/account/src/Components/form-field-info/form-field-info.tsx b/packages/account/src/Components/form-field-info/form-field-info.tsx new file mode 100644 index 000000000000..10563cefac35 --- /dev/null +++ b/packages/account/src/Components/form-field-info/form-field-info.tsx @@ -0,0 +1,40 @@ +import React from 'react'; +import { Popover, useOnClickOutside } from '@deriv/components'; +import { TPopoverProps } from '@deriv/components/src/components/types'; +import { isMobile } from '@deriv/shared'; + +/** + * A component that renders a popover with an info icon. + * + * @param {TPopoverProps} props - Props for the popover component. + * @returns React.ReactElement - A React component. + */ +export const FormFieldInfo = (props: Omit) => { + const [is_open, setIsOpen] = React.useState(false); + const ref = React.useRef(null); + const validateClickOutside = (event: MouseEvent) => { + const target = event?.target as HTMLElement; + if (target.tagName === 'A') { + event?.stopPropagation(); + return false; + } + return !ref.current?.contains(target); + }; + + useOnClickOutside(ref, () => setIsOpen(false), validateClickOutside); + return ( +
+ setIsOpen(prev_is_open => !prev_is_open)} + alignment={isMobile() ? 'left' : 'right'} + /> +
+ ); +}; diff --git a/packages/account/src/Components/form-field-info/index.ts b/packages/account/src/Components/form-field-info/index.ts new file mode 100644 index 000000000000..9f25eecaab50 --- /dev/null +++ b/packages/account/src/Components/form-field-info/index.ts @@ -0,0 +1,3 @@ +import { FormFieldInfo } from './form-field-info'; + +export default FormFieldInfo; diff --git a/packages/account/src/Components/forms/__test__/form-select-field.spec.tsx b/packages/account/src/Components/forms/__test__/form-select-field.spec.tsx new file mode 100644 index 000000000000..9e9e732bf950 --- /dev/null +++ b/packages/account/src/Components/forms/__test__/form-select-field.spec.tsx @@ -0,0 +1,75 @@ +import React from 'react'; +import { render, screen } from '@testing-library/react'; +import FormSelectField from '../form-select-field'; +import { StoreProvider, mockStore } from '@deriv/stores'; +import { Formik } from 'formik'; +import userEvent from '@testing-library/user-event'; + +describe('FormSelectField', () => { + const list_items = [ + { value: '1', text: 'Option 1' }, + { value: '2', text: 'Option 2' }, + { value: '3', text: 'Option 3' }, + ]; + const mock_store = mockStore({}); + + it('should render label', () => { + render( + + + + + + ); + expect(screen.getByLabelText('Test Label')).toBeInTheDocument(); + }); + + it('should render and select an option', async () => { + render( + + + + + + ); + + const select_element = screen.getByLabelText('Test Label'); + userEvent.type(select_element, '{arrowdown}{arrowdown}{enter}'); + + // Verify that Option 2 is selected + expect(select_element).toHaveValue('Option 2'); + }); + + it('should render error message for invalid input', async () => { + render( + + + + + + ); + + expect(screen.getByText('This field is required')).toBeInTheDocument(); + }); +}); diff --git a/packages/account/src/Components/forms/form-select-field.tsx b/packages/account/src/Components/forms/form-select-field.tsx new file mode 100644 index 000000000000..ca1da54afa7f --- /dev/null +++ b/packages/account/src/Components/forms/form-select-field.tsx @@ -0,0 +1,79 @@ +import { Autocomplete, SelectNative } from '@deriv/components'; +import { useStore } from '@deriv/stores'; +import { Field, FieldProps, FormikErrors } from 'formik'; +import React from 'react'; +import { TGetField, TListItem } from '../additional-kyc-info-modal/form-config'; + +type TFormSelectField = TGetField & { + onItemSelection?: (item: TListItem) => void; + list_height?: string; +}; + +type TSetFieldValue = ( + field: string, + value: string, + shouldValidate?: boolean +) => Promise>>; + +const FormSelectField: React.FC = ({ + label, + name, + required = false, + disabled = false, + list_items, + onItemSelection, + placeholder, + list_height, +}) => { + const { ui } = useStore(); + const { is_mobile } = ui; + + const onSelect = + (field: string, setFieldValue: TSetFieldValue) => + ({ value, text }: TListItem) => { + setFieldValue(field, value ? text : '', true); + }; + // TODO: remove the following ts-expect-error comments once the issue is fixed within the components + return ( + + {({ field, meta: { touched, error }, form: { setFieldValue } }: FieldProps) => ( + + {is_mobile ? ( + + ) : ( + + )} + + )} + + ); +}; + +export default FormSelectField; diff --git a/packages/account/src/Components/forms/idv-form.tsx b/packages/account/src/Components/forms/idv-form.tsx index f81b083fb5a0..9febec547d50 100644 --- a/packages/account/src/Components/forms/idv-form.tsx +++ b/packages/account/src/Components/forms/idv-form.tsx @@ -3,7 +3,7 @@ import classNames from 'classnames'; import { Field, FieldProps } from 'formik'; import { localize } from '@deriv/translations'; import { formatInput, getIDVNotApplicableOption } from '@deriv/shared'; -import { Autocomplete, DesktopWrapper, Input, MobileWrapper, SelectNative, Text } from '@deriv/components'; +import { Autocomplete, DesktopWrapper, Input, MobileWrapper, SelectNative } from '@deriv/components'; import { getDocumentData, preventEmptyClipboardPaste, @@ -25,17 +25,15 @@ const IDVForm = ({ can_skip_document_verification = false, }: TIDVForm) => { const [document_list, setDocumentList] = React.useState([]); - const [document_image, setDocumentImage] = React.useState(null); const [selected_doc, setSelectedDoc] = React.useState(''); - const { documents_supported: document_data, has_visual_sample } = selected_country?.identity?.services?.idv ?? {}; + const { documents_supported: document_data } = selected_country?.identity?.services?.idv ?? {}; const default_document = { id: '', text: '', value: '', example_format: '', - sample_image: '', }; const IDV_NOT_APPLICABLE_OPTION = React.useMemo(() => getIDVNotApplicableOption(), []); @@ -50,8 +48,10 @@ const IDVForm = ({ const new_document_list = filtered_documents.map(key => { const { display_name, format } = document_data[key]; - const { new_display_name, example_format, sample_image, additional_document_example_format } = - getDocumentData(selected_country.value ?? '', key); + const { new_display_name, example_format, additional_document_example_format } = getDocumentData( + selected_country.value ?? '', + key + ); const needs_additional_document = !!document_data[key].additional; if (needs_additional_document) { @@ -64,7 +64,6 @@ const IDVForm = ({ example_format: additional_document_example_format, }, value: format, - sample_image, example_format, }; } @@ -72,7 +71,6 @@ const IDVForm = ({ id: key, text: display_name ?? new_display_name, // Display document name from API if available, else use the one from the helper function value: format, - sample_image, example_format, }; }); @@ -109,9 +107,6 @@ const IDVForm = ({ setFieldValue('document_number', '', true); setFieldValue('document_additional', '', true); } - if (has_visual_sample) { - setDocumentImage(item.sample_image ?? ''); - } }; return ( @@ -124,11 +119,7 @@ const IDVForm = ({ 'proof-of-identity__container--idv': hide_hint, })} > -
+
@@ -263,20 +254,6 @@ const IDVForm = ({
)}
- {document_image && ( -
- - {localize('Sample:')} - -
- document sample image -
-
- )}
diff --git a/packages/account/src/Components/poi/idv-document-submit/__tests__/idv-document-submit.spec.tsx b/packages/account/src/Components/poi/idv-document-submit/__tests__/idv-document-submit.spec.tsx index 7599e31bd4c7..a4c01889c3fa 100644 --- a/packages/account/src/Components/poi/idv-document-submit/__tests__/idv-document-submit.spec.tsx +++ b/packages/account/src/Components/poi/idv-document-submit/__tests__/idv-document-submit.spec.tsx @@ -20,12 +20,10 @@ jest.mock('Helpers/utils', () => ({ document_1: { new_display_name: '', example_format: '5436454364243', - sample_image: '', }, document_2: { new_display_name: '', example_format: 'A-52431', - sample_image: '', }, }, }; diff --git a/packages/account/src/Components/poi/idv-document-submit/idv-document-submit.tsx b/packages/account/src/Components/poi/idv-document-submit/idv-document-submit.tsx index 461078949cd7..026308a1b066 100644 --- a/packages/account/src/Components/poi/idv-document-submit/idv-document-submit.tsx +++ b/packages/account/src/Components/poi/idv-document-submit/idv-document-submit.tsx @@ -56,7 +56,6 @@ const IdvDocumentSubmit = observer(({ handleBack, handleViewComplete, selected_c text: '', value: '', example_format: '', - sample_image: '', }, document_number: '', ...form_initial_values, diff --git a/packages/account/src/Components/poi/poi-form-on-signup/idv-doc-submit-on-signup/idv-doc-submit-on-signup.tsx b/packages/account/src/Components/poi/poi-form-on-signup/idv-doc-submit-on-signup/idv-doc-submit-on-signup.tsx index 5aba4d1a9360..4df0df924f3e 100644 --- a/packages/account/src/Components/poi/poi-form-on-signup/idv-doc-submit-on-signup/idv-doc-submit-on-signup.tsx +++ b/packages/account/src/Components/poi/poi-form-on-signup/idv-doc-submit-on-signup/idv-doc-submit-on-signup.tsx @@ -77,7 +77,6 @@ export const IdvDocSubmitOnSignup = ({ text: '', value: '', example_format: '', - sample_image: '', }, document_number: '', ...form_initial_values, diff --git a/packages/account/src/Configs/personal-details-config.ts b/packages/account/src/Configs/personal-details-config.ts index 27f134aa9e8a..1c404fb4f36d 100644 --- a/packages/account/src/Configs/personal-details-config.ts +++ b/packages/account/src/Configs/personal-details-config.ts @@ -176,7 +176,6 @@ export const personal_details_config = ({ text: '', value: '', example_format: '', - sample_image: '', }, supported_in: ['svg'], rules: [], diff --git a/packages/account/src/Constants/external-urls.ts b/packages/account/src/Constants/external-urls.ts new file mode 100644 index 000000000000..3d3789cc86be --- /dev/null +++ b/packages/account/src/Constants/external-urls.ts @@ -0,0 +1,2 @@ +export const OECD_TIN_FORMAT_URL = + 'https://www.oecd.org/tax/automatic-exchange/crs-implementation-and-assistance/tax-identification-numbers/'; diff --git a/packages/account/src/Constants/idv-document-config.ts b/packages/account/src/Constants/idv-document-config.ts index 59fdbc749838..c63b2dcdf1d0 100644 --- a/packages/account/src/Constants/idv-document-config.ts +++ b/packages/account/src/Constants/idv-document-config.ts @@ -1,8 +1,5 @@ -import { getUrlBase } from '@deriv/shared'; import { localize } from '@deriv/translations'; -const getImageLocation = (image_name: string) => getUrlBase(`/public/images/common/${image_name}`); - // Note: Ensure that the object keys matches BE API's keys. This is simply a mapping for FE templates const getIDVDocumentConfig = () => ({ @@ -10,119 +7,98 @@ const getIDVDocumentConfig = () => ({ alien_card: { new_display_name: '', example_format: '123456', - sample_image: getImageLocation('ke_alien_card.png'), }, national_id: { new_display_name: '', example_format: '12345678', - sample_image: getImageLocation('ke_national_identity_card.png'), }, passport: { new_display_name: '', example_format: 'A12345678', - sample_image: getImageLocation('ke_passport.png'), }, }, za: { national_id: { new_display_name: localize('National ID'), example_format: '1234567890123', - sample_image: getImageLocation('za_national_identity_card.png'), }, national_id_no_photo: { new_display_name: localize('National ID (No Photo)'), example_format: '1234567890123', - sample_image: '', }, }, ng: { bvn: { new_display_name: localize('Bank Verification Number'), example_format: '12345678901', - sample_image: '', }, cac: { new_display_name: localize('Corporate Affairs Commission'), example_format: '12345678', - sample_image: '', }, drivers_license: { new_display_name: '', example_format: 'ABC123456789', - sample_image: getImageLocation('ng_drivers_license.png'), }, nin: { new_display_name: localize('National Identity Number'), example_format: '12345678901', - sample_image: '', }, nin_slip: { new_display_name: localize('National Identity Number Slip'), example_format: '12345678901', - sample_image: getImageLocation('ng_nin_slip.png'), }, tin: { new_display_name: localize('Taxpayer identification number'), example_format: '12345678-1234', - sample_image: '', }, voter_id: { new_display_name: localize('Voter ID'), example_format: '1234567890123456789', - sample_image: getImageLocation('ng_voter_id.png'), }, }, gh: { drivers_license: { new_display_name: '', example_format: 'B1234567', - sample_image: '', }, national_id: { new_display_name: localize('National ID'), example_format: 'GHA-123456789-1', - sample_image: '', }, passport: { new_display_name: localize('Passport'), example_format: 'G1234567', - sample_image: '', }, ssnit: { new_display_name: localize('Social Security and National Insurance Trust'), example_format: 'C123456789012', - sample_image: '', }, voter_id: { new_display_name: localize('Voter ID'), example_format: '01234567890', - sample_image: '', }, }, br: { cpf: { new_display_name: localize('CPF'), example_format: '123.456.789-12', - sample_image: '', }, }, ug: { national_id: { new_display_name: localize('National ID'), example_format: 'CM12345678PE1D', - sample_image: getImageLocation('ug_national_identity_card.png'), }, national_id_no_photo: { new_display_name: localize('National ID (No Photo)'), example_format: 'CM12345678PE1D', - sample_image: '', }, }, zw: { national_id: { new_display_name: localize('National ID'), example_format: '081234567F53', - sample_image: getImageLocation('zw_national_identity_card.png'), }, }, cl: { diff --git a/packages/account/src/Containers/__tests__/routes.spec.tsx b/packages/account/src/Containers/__tests__/routes.spec.tsx index 6c06ae2b351c..5d2ad2c67afe 100644 --- a/packages/account/src/Containers/__tests__/routes.spec.tsx +++ b/packages/account/src/Containers/__tests__/routes.spec.tsx @@ -10,10 +10,6 @@ jest.mock('Components/Routes', () => ({ BinaryRoutes: jest.fn(() => 'MockedBinaryRoutesComponent'), })); -jest.mock('onfido-sdk-ui', () => ({ - init: jest.fn().mockResolvedValue({}), -})); - jest.mock('@deriv/components', () => ({ ...jest.requireActual('@deriv/components'), PageError: jest.fn(() => 'MockedPageErrorComponent'), diff --git a/packages/account/src/Helpers/__tests__/utils.spec.tsx b/packages/account/src/Helpers/__tests__/utils.spec.tsx index e3aeeb15070b..2589a55b4026 100644 --- a/packages/account/src/Helpers/__tests__/utils.spec.tsx +++ b/packages/account/src/Helpers/__tests__/utils.spec.tsx @@ -119,7 +119,6 @@ describe('getDocumentData', () => { expect(getDocumentData('zw', 'national_id')).toEqual({ new_display_name: 'National ID', example_format: '081234567F53', - sample_image: '/public/images/common/zw_national_identity_card.png', }); }); }); diff --git a/packages/account/src/Helpers/utils.tsx b/packages/account/src/Helpers/utils.tsx index 637724d9ef60..b9403a5b0411 100644 --- a/packages/account/src/Helpers/utils.tsx +++ b/packages/account/src/Helpers/utils.tsx @@ -59,7 +59,6 @@ export const getDocumentData = (country_code: string, document_type: string) => const DEFAULT_CONFIG = { new_display_name: '', example_format: '', - sample_image: '', }; const IDV_DOCUMENT_DATA: any = getIDVDocuments(country_code); return IDV_DOCUMENT_DATA[document_type] ?? DEFAULT_CONFIG; diff --git a/packages/account/src/Sections/Verification/ProofOfIdentity/__tests__/proof-of-identity-container.spec.js b/packages/account/src/Sections/Verification/ProofOfIdentity/__tests__/proof-of-identity-container.spec.js index eb2e0087aec4..8d998bffa19c 100644 --- a/packages/account/src/Sections/Verification/ProofOfIdentity/__tests__/proof-of-identity-container.spec.js +++ b/packages/account/src/Sections/Verification/ProofOfIdentity/__tests__/proof-of-identity-container.spec.js @@ -19,10 +19,6 @@ jest.mock('@deriv/components', () => ({ Loading: jest.fn(() => 'mockedLoading'), })); -jest.mock('onfido-sdk-ui', () => ({ - init: jest.fn().mockResolvedValue({}), -})); - jest.mock('../../Helpers/verification.js', () => ({ populateVerificationStatus: jest.fn().mockReturnValue({ is_age_verified: false, diff --git a/packages/account/src/Sections/Verification/ProofOfIdentity/onfido-sdk-view-container.tsx b/packages/account/src/Sections/Verification/ProofOfIdentity/onfido-sdk-view-container.tsx index e395acc3ffa6..81229c563e4d 100644 --- a/packages/account/src/Sections/Verification/ProofOfIdentity/onfido-sdk-view-container.tsx +++ b/packages/account/src/Sections/Verification/ProofOfIdentity/onfido-sdk-view-container.tsx @@ -1,6 +1,5 @@ import React, { useCallback } from 'react'; import countries from 'i18n-iso-countries'; -import { init, SdkHandle, SdkResponse, SupportedLanguages } from 'onfido-sdk-ui'; import { CSSTransition } from 'react-transition-group'; import { GetSettings, ResidenceList } from '@deriv/api-types'; import { Loading, ThemedScrollbars } from '@deriv/components'; @@ -35,6 +34,11 @@ type TOnfidoSdkViewContainer = { is_default_enabled?: boolean; }; +// TODO: Update types for this later once bundle and CDN issue with Onfido is resolved +type SdkHandle = any; +type SupportedLanguages = any; +type SdkResponse = any; + const OnfidoSdkViewContainer = ({ account_settings, country_code, @@ -99,7 +103,7 @@ const OnfidoSdkViewContainer = ({ async (service_token: string) => { if (!service_token) return; try { - onfido_init.current = await init({ + onfido_init.current = await window.Onfido.init({ containerId: 'onfido', language: { locale: (getLanguage().toLowerCase() as SupportedLanguages) || 'en', diff --git a/packages/account/src/Styles/account.scss b/packages/account/src/Styles/account.scss index f1f5a9ec3a6b..8aa2b4ca0fae 100644 --- a/packages/account/src/Styles/account.scss +++ b/packages/account/src/Styles/account.scss @@ -2212,27 +2212,6 @@ $MIN_HEIGHT_FLOATING: calc( } } - &__sample-container { - margin-left: 1.6rem; - - @include mobile { - margin-left: unset; - width: 94%; - } - } - - &__sample-container-external { - margin-top: 2.8rem; - } - - &__image-container { - width: fit-content; - height: fit-content; - padding: 8px; - border-radius: 4px; - background-color: $color-grey-2; - } - &__image { max-width: 24.5rem; border-radius: 4px; diff --git a/packages/account/src/Types/common.type.ts b/packages/account/src/Types/common.type.ts index 484f07083825..746d62899935 100644 --- a/packages/account/src/Types/common.type.ts +++ b/packages/account/src/Types/common.type.ts @@ -160,7 +160,6 @@ export type TDocument = { id: string; text: string; value?: string; - sample_image?: string; example_format?: string; additional?: { display_name?: string; diff --git a/packages/cfd/src/Containers/dmt5-trade-modal.tsx b/packages/cfd/src/Containers/dmt5-trade-modal.tsx index af33377a23e8..76b215000699 100644 --- a/packages/cfd/src/Containers/dmt5-trade-modal.tsx +++ b/packages/cfd/src/Containers/dmt5-trade-modal.tsx @@ -12,17 +12,18 @@ import { isMobile, } from '@deriv/shared'; import { Localize, localize } from '@deriv/translations'; - -import TradingPlatformIcon from '../Assets/svgs/trading-platform'; +import { getPlatformMt5DownloadLink } from '../Helpers/constants'; +import SpecBox from '../Components/specbox'; import PasswordBox from '../Components/passwordbox'; +import TradingPlatformIcon from '../Assets/svgs/trading-platform'; import { TTradingPlatformAccounts } from '../Components/props.types'; -import SpecBox from '../Components/specbox'; -import { getMT5WebTerminalLink, getPlatformMt5DownloadLink } from '../Helpers/constants'; import { TCFDPasswordReset } from './props.types'; type TMT5TradeModalProps = { - mt5_trade_account: DetailsOfEachMT5Loginid; + mt5_trade_account: DetailsOfEachMT5Loginid & { + webtrader_url?: string; + }; show_eu_related_content: boolean; onPasswordManager: ( arg1: string | undefined, @@ -154,11 +155,7 @@ const DMT5TradeModal = ({ diff --git a/packages/cfd/src/Helpers/constants.ts b/packages/cfd/src/Helpers/constants.ts index 34efa01099f2..fdc37e99ef76 100644 --- a/packages/cfd/src/Helpers/constants.ts +++ b/packages/cfd/src/Helpers/constants.ts @@ -37,9 +37,7 @@ const REAL_DXTRADE_URL = 'https://dx.deriv.com'; const DEMO_DXTRADE_URL = 'https://dx-demo.deriv.com'; const CTRADER_DESKTOP_DOWNLOAD = 'https://getctrader.com/deriv/ctrader-deriv-setup.exe'; - const CTRADER_DOWNLOAD_LINK = 'https://ctrader.com/download/'; - const CTRADER_URL = 'https://ct.deriv.com/'; const DERIVEZ_URL = 'https://dqwsqxuu0r6t9.cloudfront.net/'; @@ -117,7 +115,7 @@ const getPlatformMt5DownloadLink = (platform: string | undefined = undefined) => case 'android': return 'https://download.mql5.com/cdn/mobile/mt5/android?server=Deriv-Demo,Deriv-Server,Deriv-Server-02'; default: - return getMT5WebTerminalLink({ category: 'real' }); // Web + return ''; } }; @@ -145,22 +143,6 @@ const getDerivEzWebTerminalLink = (category: string, token?: string) => { return url; }; -const getMT5WebTerminalLink = ({ - category, - loginid, - server_name = 'Deriv-Server', -}: { - category?: string; - loginid?: string; - server_name?: string; -}) => { - const is_demo = category === 'demo'; - const server = is_demo ? 'Deriv-Demo' : server_name; - const login = loginid ?? ''; - - return `https://metatraderweb.app/trade?servers=${server}&trade_server=${server}${login && `&login=${login}`}`; -}; - export { REAL_DXTRADE_URL, DEMO_DXTRADE_URL, @@ -179,6 +161,5 @@ export { platformsIcons, getTitle, getDerivEzWebTerminalLink, - getMT5WebTerminalLink, getTopUpConfig, }; diff --git a/packages/components/src/components/calendar/calendar-body.tsx b/packages/components/src/components/calendar/calendar-body.tsx index eb16d0a4ef1e..4b097cbdcbd9 100644 --- a/packages/components/src/components/calendar/calendar-body.tsx +++ b/packages/components/src/components/calendar/calendar-body.tsx @@ -5,13 +5,13 @@ import { CommonPropTypes } from './views/types'; type TBodyProps = CommonPropTypes & { calendar_view: string; date_format: string; - disabled_days: number[]; + disabled_days?: number[]; start_date: string; - events: Array<{ + events?: Array<{ dates: string[]; descrip: string; }>; - has_range_selection: boolean; + has_range_selection?: boolean; hovered_date: string | null; onMouseLeave?: React.MouseEventHandler; onMouseOver?: React.MouseEventHandler; diff --git a/packages/components/src/components/calendar/calendar-footer.tsx b/packages/components/src/components/calendar/calendar-footer.tsx index 9f1853dafa5b..e00a785bbbc9 100644 --- a/packages/components/src/components/calendar/calendar-footer.tsx +++ b/packages/components/src/components/calendar/calendar-footer.tsx @@ -6,7 +6,7 @@ type TFooterProps = { clear_text?: string; footer: string; has_clear_btn?: boolean; - has_today_btn: boolean; + has_today_btn?: boolean; onClick?: React.MouseEventHandler; onClear?: React.MouseEventHandler; use_icon?: string; diff --git a/packages/components/src/components/calendar/calendar.tsx b/packages/components/src/components/calendar/calendar.tsx index 288f9a16f031..bd898d3e5d59 100644 --- a/packages/components/src/components/calendar/calendar.tsx +++ b/packages/components/src/components/calendar/calendar.tsx @@ -7,30 +7,30 @@ import { getDate } from './helpers/constants'; type TCalendarProps = { date_format?: string; - footer: string; - has_today_btn: boolean; - holidays: Array<{ + footer?: string; + has_today_btn?: boolean; + holidays?: Array<{ dates: string[]; descrip: string; }>; max_date?: string; min_date?: string; - onChangeCalendarMonth: (start_of_month: string) => void; + onChangeCalendarMonth?: (start_of_month: string) => void; onSelect: (formatted_date: string, keep_open: boolean) => void; - start_date: string; + start_date?: string; value: string; - disable_days: number[]; + disable_days?: number[]; calendar_view?: string; calendar_el_ref: React.RefObject; - disabled_days: number[]; - events: Array<{ + disabled_days?: number[]; + events?: Array<{ dates: string[]; descrip: string; }>; - has_range_selection: boolean; - keep_open: boolean; + has_range_selection?: boolean; + keep_open?: boolean; onHover?: (selected_date: moment.MomentInput | null) => void; - should_show_today: boolean; + should_show_today?: boolean; }; type TCalendarRef = { @@ -52,7 +52,7 @@ const Calendar: React.MemoExoticComponent< date_format = 'YYYY-MM-DD', disabled_days, events, - footer, + footer = '', has_today_btn, has_range_selection, keep_open, @@ -61,7 +61,7 @@ const Calendar: React.MemoExoticComponent< onChangeCalendarMonth, onHover, onSelect, - start_date, + start_date = '', value, should_show_today, }, @@ -137,7 +137,7 @@ const Calendar: React.MemoExoticComponent< setSelectedDate(formatted_date); if (onSelect) { - onSelect(formatted_date, keep_open); + onSelect(formatted_date, !!keep_open); } }; @@ -211,7 +211,7 @@ const Calendar: React.MemoExoticComponent< hovered_date={hovered_date} onMouseOver={onMouseOver} onMouseLeave={onMouseLeave} - should_show_today={should_show_today} + should_show_today={!!should_show_today} />