UNPKG

@sheerid/jslib-nightly

Version:

SheerID JavaScript Library

197 lines (195 loc) • 6.72 kB
/** * VERSION: 2.130.0-alpha.4 * BUILD_TIMESTAMP: 1759000305348 * BUILD_DATE: Sat Sep 27 2025 19:11:45 GMT+0000 (Coordinated Universal Time) * BUILD_COMMIT: be6ef87ab40e8747994d32363389cf39e36a4326 */ import { j as e, m, Z as o, d as n, b as t, R as r, _ as h, A as u, l as f, V as g } from "../sheerid.js"; import { S as k } from "./index-Cu25bQnA.js"; const x = ({ verificationService: s }) => /* @__PURE__ */ e.jsx(m, { verificationService: s, children: /* @__PURE__ */ e.jsxs("div", { children: [ /* @__PURE__ */ e.jsx("p", { children: /* @__PURE__ */ e.jsx( o, { id: "step.idCheckLoop.terms", defaultMessage: 'By clicking "Continue", you agree you have read, understand, and accept {scanPolicy}, {privacyPolicyLink}, and {termsOfService}.', values: { scanPolicy: /* @__PURE__ */ e.jsx( "a", { href: "https://onfido.com/facial-scan-policy-and-release/", target: "_blank", rel: "noopener noreferrer", className: "sid-link", children: /* @__PURE__ */ e.jsx( o, { id: "step.idCheckLoop.scanPolicy", defaultMessage: "Onfido Facial Scan Policy and Release" } ) } ), privacyPolicyLink: /* @__PURE__ */ e.jsx( "a", { href: "https://www.onfido.com/privacy/", target: "_blank", rel: "noopener noreferrer", className: "sid-link", children: /* @__PURE__ */ e.jsx( o, { id: "step.idCheckLoop.privacyPolicy", defaultMessage: "Privacy Policy" } ) } ), termsOfService: /* @__PURE__ */ e.jsx( "a", { href: "https://onfido.com/terms-of-service/", target: "_blank", rel: "noopener noreferrer", className: "sid-link", children: /* @__PURE__ */ e.jsx( o, { id: "step.idCheckLoop.termsOfService", defaultMessage: "Terms of Service" } ) } ) } } ) }), /* @__PURE__ */ e.jsx("p", { children: /* @__PURE__ */ e.jsx(o, { id: "companyName", defaultMessage: "{Company}", children: (i) => /* @__PURE__ */ e.jsx( o, { id: "step.idCheckLoop.disclaimer", defaultMessage: "SheerID, {companyName}'s trusted partner, use a third party, {serviceType}, to process our identity check.", values: { serviceType: "Onfido", companyName: i } } ) }) }) ] }) }), j = (s) => { const i = []; return n(() => s.config.onfidoReportNames.includes("document"), !1) && i.push(() => ({ title: /* @__PURE__ */ e.jsx( t, { id: "step.idCheckLoop.steps.idCheck.title", defaultMessage: "Take a photo of your government ID" } ), subtitle: /* @__PURE__ */ e.jsx( t, { id: "step.idCheckLoop.steps.idCheck.subtitle", defaultMessage: "A valid government-issued document such as a driver's license, state ID, passport, or residence permit." } ), icon: /* @__PURE__ */ e.jsx( "img", { className: "sid-identity-check-steps__icon", alt: "", src: "https://assets-resources.sheerid.com/common/images/2018/icons/id-photo.svg" } ) })), n(() => s.config.onfidoReportNames.includes("facial_similarity_motion")) && i.push(() => ({ title: /* @__PURE__ */ e.jsx( t, { id: "step.idCheckLoop.steps.selfie.title", defaultMessage: "Take a selfie" } ), icon: /* @__PURE__ */ e.jsx( "img", { className: "sid-identity-check-steps__icon", alt: "", src: "https://assets-resources.sheerid.com/common/images/2018/icons/selfie.svg" } ) })), s.docUploadEnabled && i.push(() => ({ title: /* @__PURE__ */ e.jsx( t, { id: "step.idCheckLoop.steps.docReview.title", defaultMessage: "Upload proof of status" } ), icon: /* @__PURE__ */ e.jsx( "img", { className: "sid-identity-check-steps__icon", alt: "", src: "https://assets-resources.sheerid.com/common/images/2018/icons/upload-proof.svg" } ) })), i.map((a, c) => { const { title: d, subtitle: l, icon: p } = a(); return /* @__PURE__ */ e.jsx( k, { title: d, subtitle: l, icon: p, isHighlighted: c === 0 }, d.toString() ); }); }, v = ({ verificationService: s }) => { const i = s.verificationResponse, [a, c] = r.useState(!1), d = () => { f.info("StepIDCheckLoop initiating ID Check Loop"), s.submitStep( g.idCheckLoop, s.viewModel, s.verificationResponse ); }; return r.useEffect(() => { i && i.sdkToken && c(!0); }, [i]), /* @__PURE__ */ e.jsxs("div", { id: "sid-step-id-check-loop", className: "sid-l-container", children: [ a && /* @__PURE__ */ e.jsx("div", { className: "sid-l-space-btm-lg", children: /* @__PURE__ */ e.jsx("div", { role: "main", children: /* @__PURE__ */ e.jsx(h, { verificationService: s }) }) }), !a && /* @__PURE__ */ e.jsxs("div", { children: [ /* @__PURE__ */ e.jsxs("div", { role: "main", children: [ /* @__PURE__ */ e.jsx(u, { align: "center", children: /* @__PURE__ */ e.jsx( t, { id: "step.idCheckLoop.title", defaultMessage: "Let's verify your identity", tagName: "h1" } ) }), /* @__PURE__ */ e.jsx("div", { className: "sid-header__subtitle sid-l-horz-center sid-l-space-btm-md", children: /* @__PURE__ */ e.jsx( t, { id: "step.idCheckLoop.subtitle", defaultMessage: "You'll need access to a mobile phone with a camera or computer with a webcam." } ) }), /* @__PURE__ */ e.jsx("div", { className: "sid-identity-check-steps", children: j(s.programTheme) }), /* @__PURE__ */ e.jsx("div", { className: "sid-submit sid-l-horz-center sid-l-space-top-md sid-l-space-btm-md", children: /* @__PURE__ */ e.jsx( "button", { onClick: d, type: "button", className: "sid-btn sid-btn--dark", "aria-label": "submit", children: /* @__PURE__ */ e.jsx(t, { id: "step.idCheckLoop.continue", defaultMessage: "Continue" }) } ) }) ] }), /* @__PURE__ */ e.jsx(x, { verificationService: s }) ] }) ] }); }; export { v as default };