PageSourceSearch

https://www.sheconomy.in/assets/GenderVerificationModal-B_xEGY87.js

js sheconomy.in collected 2026-09-24 13:17:23 UTC 7,578 bytes, 1 lines download raw bytes

1import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{Lt as t,dt as n,n as r,pt as i,y as a}from"./dist-E2Iv6aiw.js";import{t as o}from"./jsx-runtime-CFwixLRt.js";import{r as s}from"./brand-C9FlSxrT.js";import{Co as c,Ht as l,Ra as u,Un as d,Ya as f,_t as p,j as m,ma as h,qt as g,r as _,ro as v,wo as y}from"./ui-BzW7fosv.js";import{_ as b,m as x}from"./navigate-BoVRbIm3.js";import{t as S}from"./logger-Dbz43fO_.js";import{a as C,i as w,n as T,o as E,r as D,t as O}from"./useGenderVerification.web-Dv1X_MQ4.js";var k=e(t());r();var A=o(),j=class extends k.Component{state={error:null};static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){S.error(`Unhandled gender-verification error`,{scope:this.props.scope??`gender-verification`,message:e.message,stack:e.stack,componentStack:t.componentStack,platform:i.OS})}handleRetry=()=>{this.setState({error:null}),this.props.onReset?.()};render(){if(!this.state.error)return this.props.children;let e=E(this.state.error);return(0,A.jsxs)(y,{alignItems:`center`,justifyContent:`center`,padding:`$6`,gap:`$4`,width:`100%`,children:[(0,A.jsx)(u,{size:30,color:`#b45309`}),(0,A.jsx)(l,{fontSize:18,fontWeight:`700`,textAlign:`center`,children:this.props.title??`Verification couldn’t continue`}),(0,A.jsx)(l,{fontSize:14,color:`$color10`,textAlign:`center`,maxWidth:420,lineHeight:22,children:e}),(0,A.jsx)(f,{size:`$4`,theme:`active`,borderRadius:999,onPress:this.handleRetry,children:`Try again`})]})}};r();function M({open:e,dismissible:t=!0,onClose:n,onVerified:r}){return(0,A.jsx)(p,{open:e,onOpenChange:e=>{e||n()},title:`Human verification`,showHandle:t,scrollable:!1,children:e?(0,A.jsx)(N,{dismissible:t,onClose:n,onVerified:r}):null})}function N({dismissible:e=!0,onClose:t,onVerified:n}){g();let{isDesktop:r,safeTop:i,safeBottom:a}=m();return(0,A.jsx)(y,{width:`100%`,gap:`$2`,minHeight:420,children:(0,A.jsx)(P,{onClose:t,onVerified:n,footerPad:Math.max(a,12),fillHeight:!1})})}function P({onClose:e,onVerified:t,footerPad:r,fillHeight:i}){let a=g(),o=O({onVerified:t}),p=o.phase!==`idle`&&o.phase!==`error`&&o.phase!==`success`,m=`softRetrying`in o&&o.softRetrying,S=o.error?E(o.error):null,k=o.diagnostics,M=k?b(k):null,N=(o.error?C(o.error):null)===w.NOT_ELIGIBLE?`Access not unlocked`:m?`Retrying…`:`Let’s try that again`,P=`cameraBlocked`in o&&o.cameraBlocked,I=m||p&&o.phase===`loading`?`Starting…`:o.phase===`idle`?`Start verification`:o.phase===`error`?`Try again`:`Verification in progress…`;return o.phase===`success`?(0,A.jsx)(j,{scope:`Modal`,onReset:o.reset,children:(0,A.jsxs)(y,{flexGrow:+!!i,minHeight:i?0:240,alignItems:`center`,justifyContent:`center`,gap:`$3`,padding:`$5`,children:[(0,A.jsx)(y,{width:64,height:64,borderRadius:999,alignItems:`center`,justifyContent:`center`,backgroundColor:`rgba(22, 163, 74, 0.12)`,children:(0,A.jsx)(d,{size:32,color:`#16a34a`})}),(0,A.jsx)(l,{fontSize:18,fontWeight:`800`,color:a.text,textAlign:`center`,children:`You’re verified!`}),(0,A.jsxs)(l,{fontSize:14,color:a.textMuted,textAlign:`center`,maxWidth:360,lineHeight:20,children:[`Full access to the `,s,` community, chat, and seller tools is now unlocked.`]}),(0,A.jsx)(f,{tone:`primary`,size:`$4`,borderRadius:v.pill,width:`100%`,onPress:e,children:`Continue`})]})}):(0,A.jsx)(j,{scope:`Modal`,onReset:o.reset,children:(0,A.jsxs)(y,{flexGrow:+!!i,flexShrink:1,flexBasis:i?0:`auto`,minHeight:0,width:`100%`,children:[(0,A.jsxs)(_,{flexGrow:+!!i,flexShrink:1,flexBasis:i?0:`auto`,zIndex:0,width:`100%`,minHeight:0,showsVerticalScrollIndicator:!1,keyboardShouldPersistTaps:`handled`,nestedScrollEnabled:!0,contentContainerStyle:{paddingHorizontal:20,paddingTop:16,paddingBottom:12,gap:16,flexGrow:1},children:[o.phase===`idle`?(0,A.jsxs)(y,{gap:`$3`,children:[(0,A.jsxs)(l,{fontSize:14,color:a.textSecondary,lineHeight:21,children:[`Optional face check — blink `,o.requiredBlinks,` times to unlock Community, Chat, and Create store. Video stays on this device. Skip anytime to keep using Commerce, Classes, and Co-Work.`]}),(0,A.jsxs)(y,{padding:`$3`,borderRadius:v.chip,backgroundColor:a.surfaceMuted,borderWidth:1,borderColor:a.borderSubtle,gap:`$1.5`,children:[(0,A.jsx)(l,{fontSize:13,fontWeight:`700`,color:a.text,children:`Our commitment`}),(0,A.jsx)(l,{fontSize:12,color:a.textSecondary,lineHeight:18,children:x})]})]}):null,o.supported?null:(0,A.jsxs)(y,{padding:`$3`,borderRadius:v.chip,backgroundColor:`rgba(180, 83, 9, 0.08)`,borderWidth:1,borderColor:`rgba(180, 83, 9, 0.2)`,gap:`$1.5`,children:[(0,A.jsxs)(c,{alignItems:`center`,gap:`$2`,children:[(0,A.jsx)(u,{size:16,color:`#b45309`}),(0,A.jsx)(l,{fontSize:13,fontWeight:`700`,color:`#b45309`,children:`Camera required`})]}
1),(0,A.jsx)(l,{color:a.textSecondary,fontSize:13,lineHeight:19,children:`Use a device with a front camera and allow camera access to complete verification.`})]}),(0,A.jsx)(D,{phase:o.phase}),(0,A.jsx)(T,{containerRef:o.containerRef,phase:o.phase,instruction:o.instruction,blinkCount:o.blinkCount,requiredBlinks:o.requiredBlinks,tracking:o.tracking,cameraRef:`cameraRef`in o?o.cameraRef:void 0,analyzerRef:`analyzerRef`in o?o.analyzerRef:void 0,cameraPermission:`cameraPermission`in o?o.cameraPermission:void 0,onCameraReady:`onCameraReady`in o?o.onCameraReady:void 0,onAnalyzerReady:`onAnalyzerReady`in o?o.onAnalyzerReady:void 0,onAnalyzerError:o.onAnalyzerError}),S?(0,A.jsxs)(y,{padding:`$3`,borderRadius:v.chip,backgroundColor:`rgba(180, 83, 9, 0.08)`,borderWidth:1,borderColor:`rgba(180, 83, 9, 0.2)`,gap:`$1.5`,children:[(0,A.jsxs)(c,{alignItems:`center`,gap:`$2`,children:[(0,A.jsx)(u,{size:16,color:`#b45309`}),(0,A.jsx)(l,{fontSize:13,fontWeight:`700`,color:`#b45309`,children:N})]}),(0,A.jsx)(l,{color:a.textSecondary,fontSize:13,lineHeight:19,children:S}),M?(0,A.jsx)(l,{color:a.textMuted,fontSize:11,lineHeight:16,children:M}):null]}):null]}),(0,A.jsxs)(n,{collapsable:!1,pointerEvents:`box-none`,style:{width:`100%`,zIndex:40,elevation:40,backgroundColor:a.surface,borderTopWidth:1,borderTopColor:a.borderSubtle,paddingHorizontal:20,paddingTop:12,paddingBottom:r,gap:10},children:[P?(0,A.jsx)(F,{primary:!0,label:`Open Settings`,onPress:()=>{`openCameraSettings`in o&&o.openCameraSettings()},brand:a.brand,onBrand:a.onBrand,text:a.text,border:a.borderSubtle}):(0,A.jsx)(F,{primary:!0,label:I,disabled:p||m||!o.supported,onPress:()=>{o.start()},icon:o.phase===`idle`?(0,A.jsx)(h,{size:18,color:a.onBrand}):void 0,brand:a.brand,onBrand:a.onBrand,text:a.text,border:a.borderSubtle}),o.phase===`error`&&!P&&!m?(0,A.jsx)(F,{label:`Reset`,onPress:o.reset,brand:a.brand,onBrand:a.onBrand,text:a.text,border:a.borderSubtle}):null,(0,A.jsx)(F,{label:`Skip for now`,onPress:e,accessibilityLabel:`Skip human verification`,brand:a.brand,onBrand:a.onBrand,text:a.text,border:a.borderSubtle}),(0,A.jsx)(l,{fontSize:12,color:a.textMuted,textAlign:`center`,lineHeight:17,children:`Skip keeps Commerce, Classes, and Co-Work unlocked.`})]})]})})}function F({label:e,onPress:t,primary:r=!1,disabled:i=!1,icon:o,accessibilityLabel:s,brand:c,onBrand:u,text:d,border:f}){return(0,A.jsxs)(a,{accessibilityRole:`button`,accessibilityLabel:s??e,disabled:i,onPress:t,style:({pressed:e})=>({minHeight:48,borderRadius:999,alignItems:`center`,justifyContent:`center`,flexDirection:`row`,paddingHorizontal:20,paddingVertical:14,opacity:i?.5:e?.88:1,backgroundColor:r?c:`transparent`,borderWidth:r?0:1.5,borderColor:f,transform:e&&!i?[{scale:.98}]:void 0}),children:[o?(0,A.jsx)(n,{style:{marginRight:8},children:o}):null,(0,A.jsx)(l,{fontSize:15,fontWeight:`700`,color:r?u:d,children:e})]})}export{M as t};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.