@tsocial/tvweb-sdk 5.35.1 → 5.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,256 @@
1
+ import{aM as e,z as i,aN as r,aO as t,aP as s,m as o,b as n,r as a,K as l,P as d,D as c,s as g,X as h,j as f,i as u,y as p,B as m,k as w,aQ as k}from"./chunk-78da2232.js";var b=Object.freeze({__proto__:null,blink:e,flipY:i,slide:r,spin:t,splash:s});let R=({curStep:e,faceDirection:i})=>{let r=n(e,"stepTimeConstraints.delayTime");return!!r&&(null===e.firstFrameSpottedAt?(e.name===i&&(e.firstFrameSpottedAt=new Date().getTime()),!0):!!(new Date().getTime()-e.firstFrameSpottedAt<r)||!1)},S=(e,i)=>({radius:e.radius??o("Selfie.progressCircle.radius")({theme:i}),strokeWidth:e.strokeWidth??o("Selfie.progressCircle.strokeWidth")({theme:i}),progress:e.progress??o("Selfie.progressCircle.progress")({theme:i}),showErrorRing:e.showErrorRing??o("Selfie.progressCircle.showErrorRing")({theme:i}),activeColor:e.activeColor??o("Selfie.progressCircle.activeColor")({theme:i}),innerPadding:e.innerPadding??o("Selfie.progressCircle.innerPadding")({theme:i}),outsideRingColor:e.outsideRingColor??o("Selfie.progressCircle.outsideRingColor")({theme:i}),outsideRingOpacity:e.outsideRingOpacity??o("Selfie.progressCircle.outsideRingOpacity")({theme:i}),insideRingColor:e.insideRingColor??o("Selfie.progressCircle.insideRingColor")({theme:i}),insideRingWidth:e.insideRingWidth??o("Selfie.progressCircle.insideRingWidth")({theme:i}),insideRingStrokeDash:e.insideRingStrokeDash??o("Selfie.progressCircle.insideRingStrokeDash")({theme:i}),errorRingWidth:e.errorRingWidth??o("Selfie.progressCircle.errorRingWidth")({theme:i}),errorRingColor:e.errorRingColor??o("Selfie.progressCircle.errorRingColor")({theme:i}),dashedRingColor:e.dashedRingColor??o("Selfie.progressCircle.dashedRingColor")({theme:i}),dashedRingOpacity:e.dashedRingOpacity??o("Selfie.progressCircle.dashedRingOpacity")({theme:i}),dashedRingWidth:e.dashedRingWidth??o("Selfie.progressCircle.dashedRingWidth")({theme:i}),dashedRingLineThick:e.dashedRingLineThick??o("Selfie.progressCircle.dashedRingLineThick")({theme:i}),dashedRingLineSpacing:e.dashedRingLineSpacing??o("Selfie.progressCircle.dashedRingLineSpacing")({theme:i}),dashedInsideRingColor:e.dashedInsideRingColor??o("Selfie.progressCircle.dashedInsideRingColor")({theme:i}),dashedInsideRingWidth:e.dashedInsideRingWidth??o("Selfie.progressCircle.dashedInsideRingWidth")({theme:i}),showOutsideRing:e.showOutsideRing??o("Selfie.progressCircle.showOutsideRing")({theme:i}),showInsideRing:e.showInsideRing??o("Selfie.progressCircle.showInsideRing")({theme:i}),showDashedRing:e.showDashedRing??o("Selfie.progressCircle.showDashedRing")({theme:i})}),_=(e,i)=>({radius:e.radius??o("Selfie.progressCircleV2.radius")({theme:i}),strokeWidth:e.strokeWidth??o("Selfie.progressCircleV2.strokeWidth")({theme:i}),progress:e.progress??o("Selfie.progressCircleV2.progress")({theme:i}),activeColor:e.activeColor??o("Selfie.progressCircleV2.activeColor")({theme:i}),neutralColor:e.neutralColor??o("Selfie.progressCircleV2.neutralColor")({theme:i}),errorColor:e.errorColor??o("Selfie.progressCircleV2.errorColor")({theme:i}),tickWidth:e.tickWidth??o("Selfie.progressCircleV2.tickWidth")({theme:i}),numberOfTicks:e.numberOfTicks??o("Selfie.progressCircleV2.numberOfTicks")({theme:i})}),y=({incomingFrame:e,currentBestFrame:i})=>e?.isEyeClosed&&!i?.isEyeClosed?i:!e?.isEyeClosed&&i?.isEyeClosed?e:e?.blurScore>i?.blurScore?e:i;function C(e){return new Promise(i=>{let r=new Image;r.onload=i,r.onerror=i,r.src=e})}let x=[],v=()=>{x=[]},$=(e,i,r,t)=>{t&&v(),x.push({id:null});let s=x.length-1;if(e&&e.key){let t=new Blob([JSON.stringify(i)]);r.uploadFile({file:t,metadata:JSON.stringify({type:"selfie"}),label:"video"},{"X-TV-Key":e.key}).then(e=>{e&&e.data&&e.data.file_id?x[s].id=e.data.file_id:x[s].id=-1})}else{let e=new Blob([JSON.stringify(i)]);r.uploadFile({file:e,metadata:JSON.stringify({type:"selfie"}),label:"video"}).then(e=>{e&&e.data&&e.data.file_id?x[s].id=e.data.file_id:x[s].id=-1})}},W=()=>new Promise(e=>{let i=setInterval(()=>{x.every(e=>e.id)&&(e(),clearInterval(i))},200)}),j=e=>e.enable?x.some(e=>-1===e.id)?null:x:[],I=[],O=null,D=!1,A=()=>I,T=()=>{D=!0,I=[];try{O instanceof MediaStream&&(O.getTracks().forEach(e=>e.stop()),O=null)}catch(e){}};async function E({outputImagesSize:e,videoEl:i,resultAnalyzeVideoAndWindowSizes:r}){let t;T();let s=document.createElement("canvas");s.width=e,s.height=e;let o=s.getContext("2d");try{let n={mimeType:"video/webm"};try{let e=(O=i?.captureStream()?.clone()).getVideoTracks()[0];await e.applyConstraints({width:{min:360,ideal:400},height:{min:360,ideal:400}})}catch(e){}MediaRecorder.isTypeSupported("video/mp4")&&(D=!1,!function e(i,r,t,s){if(!i||!s)return;let{cropX:o,cropY:n,cropWidth:a,cropHeight:l}=s;i.drawImage(r,o,n,a,l,0,0,t,t),D||requestAnimationFrame(()=>e(i,r,t,s))}(o,i,e,r),O=s.captureStream(25),n={mimeType:"video/mp4",videoBitsPerSecond:25e5}),t=new MediaRecorder(O,n);let a=async()=>{await new Promise((e,i)=>{t.ondataavailable=r=>(function(e,i,r){if(e.data.size>0){let r=new Blob([e.data],{type:"video/mp4"});I.push(r),i()}else console.error("No video have recored!"),r()})(r,e,i),"inactive"!==t.state&&t.stop()})};t.stopVideoRecording=a,t.discardRecording=()=>{"inactive"!==t.state&&t.stop()}}catch(e){}return{mediaRecorder:t}}let P={data:{settings:{sdk_settings:{passive_liveness_settings:{auto_capture:{enable:!0,show_capture_button:!0,show_countdown:!0,wait_for_best_image_time_ms_web:3e3},manual_capture:{show_countdown:!0,wait_for_best_image_time_ms_web:3e3},blur_check:{enable:!0,web_blurry_threshold:.4},close_eye_detector:{enable:!0,web_threshold:.342,web_timeout:5,force_check:!1},web_is_required_frontal_face:!0},active_liveness_settings:{reset_flow_on_orientation_change:!0,wait_before_start_flow_ms:2e3,face_tracking_setting:{enable:!1,web_terminate_threshold:.0030152991993743408,web_warning_threshold:.0017317430600108828,limit_for:"all_flow",max_warning_time:5},flow_interval_time_ms:3e3,take_one_picture_time_ms:3e3,limit_time_liveness_check:{enable:!1,limit_time_second:45,remain_time_show:10,format:"s",max_retry_count:0,non_stoppable:!1},terminate_if_no_face:{enable:!1,max_invalid_frame:5,max_time_ms:1e3},close_eye_detector:{enable:!0,web_threshold:.342,web_timeout:5,force_check:!1},exif_data_settings:{enable:!0},record_video:{enable:!1},save_encoded_frames:{enable:!1,enable_logging:!1,frames_batch_len:0,frames_interval_ms:180,quality_android:90,quality_ios:80},auto_gen_frame_ids:{enable:!1,max_items:50}}}}}},V=30,L=e=>{let{shouldStart:i,totalTime:r,totalDelayBetweenReset:t,interruptible:s=!0,onReset:o,onTick:n,onTimesUp:d}=e,c=a.useRef(new l({totalTime:r,totalDelayBetweenReset:t,interruptible:s}));return a.useEffect(()=>c.current.on("tick",({remainTime:e})=>{n({remainTime:e})}),[n]),a.useEffect(()=>c.current.on("delaystart",()=>{d()}),[d]),a.useEffect(()=>c.current.on("reset",({attemptCount:e,fromBackground:i})=>{o({attemptCount:e,fromBackground:i})}),[o]),a.useEffect(()=>i?c.current.start():()=>{},[i]),{stopTimer:a.useCallback(()=>{c.current.stop()},[])}},{ErrorDuration:z}=g;function M({children:e,errorMsg:i,className:r}){return h.isValidElement(e)?i?f.jsx("div",{className:r,children:h.cloneElement(e,{errorMsg:i})}):null:i?f.jsx("div",{className:r,children:i}):null}function B({children:e,className:i,error:r}){let t=a.useRef(0),s=a.useRef(""),o=c(),n=a.useRef(z.SHORT),{code:l,duration:d=z.SHORT}=r||{},g=o(l);return Date.now()-t.current>=n.current?(t.current=Date.now(),n.current=d,s.current=g,M({children:e,errorMsg:g,className:i})):M({children:e,errorMsg:s.current,className:i})}B.propTypes={children:d.node,className:d.string},B.defaultProps={className:""};let N=u.g`
2
+ transition: stroke-dashoffset 0.4s;
3
+ transform: rotate(-90deg);
4
+ transform-origin: 50% 50%;
5
+ `,F=u.circle`
6
+ transition: stroke-dashoffset 0.4s, stroke 0.4s;
7
+ transform: rotate(-90deg);
8
+ transform-origin: 50% 50%;
9
+ fill: none;
10
+ `,H=u.circle`
11
+ transition: stroke-dashoffset 0.4s;
12
+ transform: rotate(-90deg);
13
+ transform-origin: 50% 50%;
14
+ `;function K({className:e,style:i,radius:r,strokeWidth:t,progress:s,showErrorRing:o,activeColor:n,innerPadding:a,outsideRingColor:l,outsideRingOpacity:d,insideRingColor:c,insideRingWidth:g,insideRingStrokeDash:h,errorRingWidth:u,errorRingColor:p,dashedRingColor:m,dashedRingOpacity:w,dashedRingWidth:k,dashedRingLineThick:b,dashedRingLineSpacing:R,dashedInsideRingColor:S,dashedInsideRingWidth:_,showOutsideRing:y,showInsideRing:C,showDashedRing:x}){let v=2*r,$=2*r,W=r-2*t,j=2*Math.PI*W,I=W-k/2-t/2-a,O=2*Math.PI*I,D=I-_/2-k/2,A=2*Math.PI*D,T=D-g/2-_/2,E=D-u/2-_/2;return f.jsxs("svg",{className:e,style:i,width:v,height:$,viewBox:`0 0 ${v} ${$}`,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[y?f.jsxs(f.Fragment,{children:[f.jsx("circle",{"data-testid":"outsideRing",opacity:d,cx:r,cy:r,r:W,stroke:l}),f.jsx(H,{"data-testid":"outsideAnimateRing",cx:r,cy:r,r:W,stroke:n,strokeWidth:t,strokeLinecap:"round",strokeDasharray:`${j} ${j}`,style:{strokeDashoffset:j-s/100*j}})]}):null,x?f.jsxs(f.Fragment,{children:[f.jsx("circle",{"data-testid":"dashedRing",opacity:w,cx:r,cy:r,r:I,stroke:m,strokeWidth:k,strokeDasharray:`${b} ${R}`}),f.jsx("mask",{id:"mask0","mask-type":"alpha",maskUnits:"userSpaceOnUse",children:f.jsx("circle",{cx:r,cy:r,r:I,stroke:n,strokeWidth:k,strokeDasharray:`${b} ${R}`})}),f.jsx("g",{mask:"url(#mask0)",children:f.jsx(H,{"data-testid":"dashedAnimateRing",cx:r,cy:r,r:I,stroke:n,strokeWidth:k,strokeDasharray:`${O} ${O}`,style:{strokeDashoffset:O-s/100*O}})}),f.jsx("circle",{"data-testid":"dashedInsideRing",opacity:w,cx:r,cy:r,r:D,stroke:S,strokeWidth:_}),f.jsx(H,{"data-testid":"dashedInsideAnimateRing",cx:r,cy:r,r:D,stroke:n,strokeWidth:_,strokeLinecap:"round",strokeDasharray:`${A} ${A}`,style:{strokeDashoffset:A-s/100*A}})]}):null,C?f.jsx("circle",{"data-testid":"insideRing",strokeDasharray:h,cx:r,cy:r,r:T,stroke:c,strokeWidth:g}):null,o?f.jsx("circle",{"data-testid":"errorRing",strokeDasharray:h,cx:r,cy:r,r:E,stroke:p,strokeWidth:u}):null]})}K.propTypes={className:d.string,style:d.shape({}),radius:d.number,strokeWidth:d.number,progress:d.number,showErrorRing:d.bool,activeColor:d.string,innerPadding:d.number,outsideRingColor:d.string,outsideRingOpacity:d.number,insideRingColor:d.string,insideRingWidth:d.number,insideRingStrokeDash:d.string,errorRingColor:d.string,errorRingWidth:d.number,dashedRingColor:d.string,dashedRingOpacity:d.number,dashedRingWidth:d.number,dashedRingLineThick:d.number,dashedRingLineSpacing:d.number,dashedInsideRingColor:d.string,dashedInsideRingWidth:d.number,showOutsideRing:d.bool,showDashedRing:d.bool,showInsideRing:d.bool},K.defaultProps={className:"",style:null,radius:160,strokeWidth:3,progress:0,showErrorRing:!1,activeColor:"#0092ff",innerPadding:5,outsideRingColor:"#f2f6f9",outsideRingOpacity:.1,insideRingColor:"#f2f6f9",insideRingWidth:3,insideRingStrokeDash:"0",errorRingColor:"#df0000",errorRingWidth:3,dashedRingColor:"#ffffff",dashedRingOpacity:.3,dashedRingWidth:10,dashedRingLineThick:1,dashedRingLineSpacing:6,dashedInsideRingColor:"#ffffff",dashedInsideRingWidth:0,showOutsideRing:!0,showDashedRing:!0,showInsideRing:!0};let{blink:U,slide:q,spin:J}=b,X=p`
15
+ z-index: ${m+20};
16
+ color: #ffffff;
17
+ `,Y=u.div`
18
+ ${X}
19
+ `,Z=p`
20
+ ${X}
21
+ ${({top:e})=>e&&p`
22
+ top: ${e}px;
23
+ `}
24
+ ${({bottom:e})=>e&&p`
25
+ bottom: ${e}px;
26
+ `}
27
+ ${({centerY:e})=>e&&p`
28
+ top: 50%;
29
+ transform: translateY(-50%);
30
+ `}
31
+ font-size: ${o("Selfie.error.fontSize")};
32
+ font-weight: ${o("Selfie.error.fontWeight")};
33
+ background: ${o("Selfie.error.backgroundColor")};
34
+ color: ${o("Selfie.error.color")};
35
+ padding: ${o("Selfie.error.padding")};
36
+ border-radius: ${o("Selfie.error.borderRadius")};
37
+ position: absolute;
38
+ white-space: pre-wrap;
39
+ text-align: center;
40
+ max-width: 80%;
41
+ `;u(B)`
42
+ ${Z}
43
+ `;let G=u.div`
44
+ ${Z}
45
+ `,Q=u.div`
46
+ z-index: ${m+20};
47
+ display: flex;
48
+ align-items: center;
49
+ position: absolute;
50
+ left: 50%;
51
+ transform: translate(-50%, 0);
52
+ ${({top:e})=>e&&p`
53
+ top: ${e}px;
54
+ `}
55
+ `,ee=u(Y)`
56
+ font-size: ${o("Selfie.countdown.fontSize")};
57
+ font-weight: ${o("Selfie.countdown.fontWeight")};
58
+ background: ${o("Selfie.countdown.backgroundColor")};
59
+ color: ${o("Selfie.countdown.color")};
60
+ padding: ${o("Selfie.countdown.padding")};
61
+ border-radius: ${o("Selfie.countdown.borderRadius")};
62
+ white-space: nowrap;
63
+ `,ei=u(ee)`
64
+ position: absolute;
65
+ left: 50%;
66
+ transform: translate(-50%, 0);
67
+ ${({top:e})=>e&&p`
68
+ top: ${e}px;
69
+ `}
70
+ `,er=u(Y)`
71
+ position: absolute;
72
+ ${({top:e})=>e&&p`
73
+ top: ${e}px;
74
+ `}
75
+ ${({bottom:e})=>e&&p`
76
+ bottom: ${e}px;
77
+ `}
78
+ color: ${o("Selfie.Active.instruction.color")};
79
+ font-size: ${o("Selfie.Active.instruction.fontSize")};
80
+ font-weight: ${o("Selfie.Active.instruction.fontWeight")};
81
+ text-shadow: ${o("Selfie.Active.instruction.textShadow")};
82
+ background-color: ${o("Selfie.Active.instruction.backgroundColor")};
83
+ border: ${o("Selfie.Active.instruction.border")};
84
+ border-radius: ${o("Selfie.Active.instruction.borderRadius")};
85
+ `,et=u.div`
86
+ height: ${()=>w.isMobile?"50px":"70px"};
87
+ position: absolute;
88
+ ${({top:e})=>e&&p`
89
+ top: ${e}px;
90
+ `}
91
+ ${({bottom:e})=>e&&p`
92
+ bottom: ${e}px;
93
+ `}
94
+ width: 100%;
95
+ display: flex;
96
+ justify-content: center;
97
+ align-items: center;
98
+ z-index: ${m+20};
99
+ `,es=u.div`
100
+ width: ${o("Selfie.Active.imageHolder.width")};
101
+ height: ${o("Selfie.Active.imageHolder.height")};
102
+ border-radius: ${o("Selfie.Active.imageHolder.borderRadius")};
103
+ font-size: ${o("Selfie.Active.imageHolder.fontSize")};
104
+ color: ${o("Selfie.Active.imageHolder.color")};
105
+ font-weight: ${o("Selfie.Active.imageHolder.fontWeight")};
106
+
107
+ ${({theme:e})=>"v2"===n(e,"themeVersion")?"border: unset;":`border: ${o("Selfie.Active.imageHolder.border")({theme:e})};`}
108
+
109
+ display: flex;
110
+ justify-content: center;
111
+ align-items: center;
112
+
113
+ & + & {
114
+ margin-left: 10px;
115
+ }
116
+
117
+ ${e=>e.active?p`
118
+ img:not(.image_preview) {
119
+ border: ${o("Selfie.Active.imageHolder.activeStepBorder")};
120
+ border-radius: ${o("Selfie.Active.imageHolder.activeStepBorderRadius")};
121
+ }
122
+ `:p`
123
+ opacity: 0.3;
124
+ `}
125
+
126
+ img {
127
+ width: 100%;
128
+ margin: 0;
129
+ border-radius: ${o("Selfie.Active.imageHolder.borderRadius")};
130
+ }
131
+ img.image_preview {
132
+ border: ${o("Selfie.Active.imageHolder.border")};
133
+ }
134
+ `,eo=u.div`
135
+ color: #ffffff;
136
+ height: 70px;
137
+ position: absolute;
138
+ bottom: 0;
139
+ width: 100%;
140
+ display: flex;
141
+ justify-content: center;
142
+ align-items: center;
143
+ z-index: ${m+20};
144
+ `,en=u.div`
145
+ ${({disabled:e})=>e?p`
146
+ pointer-events: none;
147
+ `:p`
148
+ cursor: pointer;
149
+ `}
150
+ text-align: center;
151
+
152
+ img {
153
+ width: ${o("Selfie.captureIcon.width")};
154
+ }
155
+ `,ea=u.div`
156
+ position: absolute;
157
+ width: 100%;
158
+ top: 0;
159
+ bottom: 0;
160
+ display: flex;
161
+ justify-content: center;
162
+ align-items: center;
163
+ color: #ffffff;
164
+ font-size: 140px;
165
+ opacity: 0.6;
166
+ `,el=u.div`
167
+ position: absolute;
168
+ width: 100%;
169
+ top: 0;
170
+ bottom: 0;
171
+ display: flex;
172
+ flex-direction: column;
173
+ justify-content: center;
174
+ align-items: center;
175
+ ${q.default};
176
+ ${U.default};
177
+ `,ed=u(K)`
178
+ position: absolute;
179
+ top: 0;
180
+ left: 0;
181
+ width: 100%;
182
+ height: 100%;
183
+ `,ec=u(({className:e="",radius:i=80,neutralColor:r="#CBD5E1",activeColor:t="#0276F1",errorColor:s="#E84848",strokeWidth:o=2,tickWidth:n=15,numberOfTicks:a=200,progress:l=0,showErrorRing:d=!1})=>{let c=2*i,g=i-5,h=2*Math.PI*g,u=Array.from({length:a}).map((e,r)=>{let t=360*r/a+3;return f.jsx("use",{href:"#tick",transform:`rotate(${t} ${i} ${i})`},r)}),p=i-V,m=2*Math.PI*p;return f.jsxs("svg",{height:c,width:c,viewBox:`0 0 ${c} ${c}`,className:e,xmlns:"http://www.w3.org/2000/svg",children:[d?f.jsx("circle",{cx:i,cy:i,r:i-V,stroke:s,strokeWidth:o,fill:"none"}):f.jsxs(f.Fragment,{children:[f.jsx("circle",{cx:i,cy:i,r:p,stroke:r,strokeWidth:o,fill:"none"}),f.jsx(F,{cx:i,cy:i,r:p,stroke:t,strokeWidth:o,strokeLinecap:"round",strokeDasharray:`${m} ${m}`,style:{strokeDashoffset:m-l/100*m}})]}),f.jsx("defs",{children:f.jsx("line",{id:"tick",x1:i,y1:"0",x2:i,y2:n,stroke:r,strokeWidth:o,strokeLinecap:"round"})}),f.jsx("g",{id:"border-segments",children:u}),f.jsx("mask",{id:"tickMask",maskUnits:"userSpaceOnUse",children:f.jsx("g",{id:"tick-mask-segments",children:u})}),f.jsx("g",{mask:"url(#tickMask)",children:f.jsx(N,{strokeDasharray:`${h} ${h}`,style:{strokeDashoffset:h-l/100*h},children:f.jsx("circle",{cx:i,cy:i,r:g,stroke:t,strokeWidth:20,fill:"none"})})})]})})`
184
+ position: absolute;
185
+ top: 0;
186
+ left: 0;
187
+ width: 100%;
188
+ height: 100%;
189
+ `,eg=u(function({className:e=""}){return f.jsx("svg",{className:e,width:"320",height:"320",viewBox:"0 0 320 320",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M320 0H0V320H320V0ZM160 296C235.111 296 296 235.111 296 160C296 84.8893 235.111 24 160 24C84.8893 24 24 84.8893 24 160C24 235.111 84.8893 296 160 296Z",fill:"currentColor"})})})`
190
+ width: 100%;
191
+ height: 100%;
192
+ vertical-align: middle;
193
+ margin: 0;
194
+ color: ${o("Selfie.backgroundColor")};
195
+ `,eh=u(function({className:e="",radius:i=160,backgroundColor:r="#fff",padding:t=0}){let s=2*i;return f.jsxs("svg",{className:e,width:s,height:s,viewBox:`0 0 ${s} ${s}`,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsxs("mask",{id:"CIRCLE_MASK",children:[f.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"white",mask:"url(#CIRCLE_MASK)"}),f.jsx("circle",{cx:i,cy:i,r:i-t,fill:"black"})]}),f.jsx("circle",{cx:i,cy:i,r:i,fill:"none"}),f.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:r,mask:"url(#CIRCLE_MASK)"})]})})`
196
+ width: 100%;
197
+ height: 100%;
198
+ vertical-align: middle;
199
+ margin: 0;
200
+ color: ${o("Selfie.backgroundColor")};
201
+ `,ef=u.div`
202
+ position: absolute;
203
+ z-index: -1;
204
+ background: rgba(223, 0, 0, 0.2);
205
+ border-radius: 50%;
206
+ width: 86%;
207
+ height: 86%;
208
+ top: 7%;
209
+ left: 7%;
210
+ `,eu=k`
211
+ from {
212
+ opacity: 1;
213
+ }
214
+
215
+ to {
216
+ opacity: 0;
217
+ }
218
+ `,ep=u.div`
219
+ position: absolute;
220
+ width: 100%;
221
+ top: 0;
222
+ bottom: 0;
223
+ z-index: -1;
224
+ background: rgba(255, 255, 255, 0.3);
225
+ animation: ${eu} 1s infinite;
226
+ border-radius: 50%;
227
+ `,em=u.div`
228
+ top: 0;
229
+ left: 0;
230
+ right: 0;
231
+ bottom: 0;
232
+ position: absolute;
233
+ margin: auto;
234
+ width: ${o("Selfie.loadingIcon.width")};
235
+ height: ${o("Selfie.loadingIcon.height")};
236
+
237
+ img {
238
+ width: 100%;
239
+ }
240
+
241
+ z-index: ${m+20};
242
+ ${J.default}
243
+ `,ew=u.div`
244
+ text-align: center;
245
+ color: ${o("Selfie.title.color")};
246
+ font-size: ${o("Selfie.title.fontSize")};
247
+ font-weight: ${o("Selfie.title.fontWeight")};
248
+ background-color: ${o("Selfie.title.backgroundColor")};
249
+ position: absolute;
250
+ top: ${e=>e.y};
251
+ z-index: ${m+10};
252
+ display: flex;
253
+ align-items: center;
254
+ justify-content: center;
255
+ width: 100%;
256
+ `;export{V as A,eo as B,ea as C,ef as E,er as F,el as I,em as L,ed as O,G as S,ew as T,eg as a,ei as b,en as c,_ as d,eh as e,ec as f,S as g,ep as h,et as i,es as j,Q as k,ee as l,j as m,P as n,$ as o,C as p,A as q,T as r,v as s,R as t,L as u,E as v,W as w,y as x};
@@ -0,0 +1 @@
1
+ import{$ as r}from"./chunk-78da2232.js";import{r as o}from"./chunk-bf5a5b12.js";var s=r(o());export{s as d};
@@ -0,0 +1 @@
1
+ import{r as e,s as t,P as s,j as a,b as n,u as i,k as r,A as l,m as o,ap as _,aq as g,M as c,O as d,ar as f,as as h,at as u,au as m,av as b,aw as p,ax as v,ay as y,az as S,G as k,R as C,d as F,f as x,Q as E,aA as w,aB as M,Y as R}from"./chunk-78da2232.js";import{d as L}from"./chunk-df824644.js";import{t as W}from"./chunk-bf5a5b12.js";import{C as I,O as A}from"./chunk-7b011490.js";import{u as D,S as T,a as B,F as q,b as O,c as P,d as j,n as Q,l as V,e as N,s as U,f as H,R as $,g as G,h as J,i as z,j as K,W as X,k as Y,m as Z,o as ee,p as et,q as es,r as ea,A as en,O as ei}from"./chunk-84c22657.js";import{m as er,u as el,b as eo}from"./chunk-16aae30a.js";import{u as e_}from"./chunk-fbbb4c3f.js";let eg=e.createContext(t.Mode.FLASH_ADVANCED),ec=({flashMode:e,children:s})=>{let n=e===t.Mode.FLASH||e.startsWith("flash_")?e:t.Mode.FLASH;return a.jsx(eg.Provider,{value:n,children:s})};ec.defaultProps={flashMode:t.Mode.FLASH_ADVANCED},ec.propTypes={flashMode(e,t,s){if(!/(^flash_|^flash$)/.test(e[t]))return Error(`Invalid prop \`${t}\` of value \`${e[t]}\` supplied to \`${s}\`. \`${t}\` is either 'flash' or begins with 'flash_'. Falling back to 'flash'.`)},children:s.node.isRequired};let ed=()=>{let t=e.useContext(eg);if(void 0===t)throw Error("useFlashMode must be used within a FlashModeProvider");return t},ef=0,eh=1,eu={data:{settings:{flashing_modes:{flash:{frames_per_color:8,frames_per_color_web:8,colors:"r r rrr",colors_web:"r r rrr"}},sdk_settings:{flash_liveness_settings:{frontal_face_check:{enable:!0,up_down_bound_min:.35,up_down_bound_max:.7},capture_frame_settings:{enable:!1,frames_batch_length:10,frames_interval_time:0,frame_quality:.8,frame_scale:1,auto_capture_min_frames:0,auto_capture_min_frames_far:0,auto_capture_min_frames_close:0},not_qualified_settings:{enable_far:!1,enable_close:!1,threshold_far:.11,threshold_close:.11},close_eyes_settings:{enable:!1,timeout:5,force_check:!1},face_settings:{close_face_ratio:.82,max_far_face_ratio:.9,min_far_face_ratio:.8,mobile:{close_face_ratio:.95,max_far_face_ratio:.9,min_far_face_ratio:.85}},flash_settings:{colors_length:10,flash_color:"rgb(255, 0, 0)",secondary_flash_color:"rgba(0,0,0,0.6)",delay_between_colors:120,flash_intensity:1,frames_per_color:4,use_face_detector_when_flashing:!1,flash_frame_interval:0},liveness_settings:{enable_far_step:!0},timeout_settings:{enable:!0,total:30,countdown:10,max_retry_count:0,non_stoppable:!1},exif_data_settings:{enable:!0},mask_settings:{chin_to_mask_bottom_padding:20,large_scale:.85,mobile:{chin_to_mask_bottom_padding:20,large_scale:.9,oval_padding:{bottom:20,left:20,right:20,top:0},oval_vertical_offset:60,small_scale:.65},oval_padding:{bottom:20,left:30,right:30,top:0},oval_vertical_offset:0,small_scale:.6},image_settings:{valid_face_ratio:.6,image_quality:1,crop_center_far:!0,crop_center_close:!1,detection_to_whole_face_ratio:.8},blur_far_settings:{enable:!0,blurry_threshold:.4,wait_for_best_image_time_ms:1e3},blur_close_settings:{enable:!0,blurry_threshold:.4,wait_for_best_image_time_ms:1e3},brightness_detection_far_settings:{enable_too_bright_check:!1,enable_too_dark_check:!1,too_bright_threshold:.83,too_dark_threshold:.195},brightness_detection_close_settings:{enable_too_bright_check:!1,enable_too_dark_check:!1,too_bright_threshold:.83,too_dark_threshold:.195},output_image_settings:{image_ordering:["close","far"]},auto_gen_frame_ids:{enable:!1,max_items:50}}}}}},em=()=>{let s=e_(),a=ed();return e.useMemo(()=>{let e=er({},eu,s),l=n(e,`data.settings.flashing_modes.${t.Mode.FLASH}`),o=n(e,`data.settings.flashing_modes.${a}`,l),_={enable:i.getWebSetting(e,"data.settings.sdk_settings.flash_liveness_settings.capture_frame_settings.enable"),framesIntervalTime:i.getWebSetting(e,"data.settings.sdk_settings.flash_liveness_settings.capture_frame_settings.frames_interval_time"),framesBatchLength:i.getWebSetting(e,"data.settings.sdk_settings.flash_liveness_settings.capture_frame_settings.frames_batch_length"),frameScale:i.getWebSetting(e,"data.settings.sdk_settings.flash_liveness_settings.capture_frame_settings.frame_scale"),frameQuality:i.getWebSetting(e,"data.settings.sdk_settings.flash_liveness_settings.capture_frame_settings.frame_quality"),autoCaptureMinFramesFar:i.getWebSetting(e,"data.settings.sdk_settings.flash_liveness_settings.capture_frame_settings.auto_capture_min_frames_far"),autoCaptureMinFramesClose:i.getWebSetting(e,"data.settings.sdk_settings.flash_liveness_settings.capture_frame_settings.auto_capture_min_frames_close")},g={enableFarStep:i.getWebSetting(e,"data.settings.sdk_settings.flash_liveness_settings.liveness_settings.enable_far_step")},c={flashColor:i.getWebSetting(e,"data.settings.sdk_settings.flash_liveness_settings.flash_settings.flash_color"),secondaryFlashColor:i.getWebSetting(e,"data.settings.sdk_settings.flash_liveness_settings.flash_settings.secondary_flash_color"),colors:i.getWebSetting(o,"colors"),delayBetweenColors:i.getWebSetting(e,"data.settings.sdk_settings.flash_liveness_settings.flash_settings.delay_between_colors"),framesPerColor:i.getWebSetting(o,"frames_per_color"),flashIntensity:i.getWebSetting(e,"data.settings.sdk_settings.flash_liveness_settings.flash_settings.flash_intensity"),useFaceDetectorWhenFlashing:i.getWebSetting(e,"data.settings.sdk_settings.flash_liveness_settings.flash_settings.use_face_detector_when_flashing"),flashFrameInterval:i.getWebSetting(e,"data.settings.sdk_settings.flash_liveness_settings.flash_settings.flash_frame_interval")},d={smallScale:i.getWebSetting(e,r.isMobile?"data.settings.sdk_settings.flash_liveness_settings.mask_settings.mobile.small_scale":"data.settings.sdk_settings.flash_liveness_settings.mask_settings.small_scale"),largeScale:i.getWebSetting(e,r.isMobile?"data.settings.sdk_settings.flash_liveness_settings.mask_settings.mobile.large_scale":"data.settings.sdk_settings.flash_liveness_settings.mask_settings.large_scale"),ovalPadding:{left:i.getWebSetting(e,r.isMobile?"data.settings.sdk_settings.flash_liveness_settings.mask_settings.mobile.oval_padding.left":"data.settings.sdk_settings.flash_liveness_settings.mask_settings.oval_padding.left"),right:i.getWebSetting(e,r.isMobile?"data.settings.sdk_settings.flash_liveness_settings.mask_settings.mobile.oval_padding.right":"data.settings.sdk_settings.flash_liveness_settings.mask_settings.oval_padding.right"),top:i.getWebSetting(e,r.isMobile?"data.settings.sdk_settings.flash_liveness_settings.mask_settings.mobile.oval_padding.top":"data.settings.sdk_settings.flash_liveness_settings.mask_settings.oval_padding.top"),bottom:i.getWebSetting(e,r.isMobile?"data.settings.sdk_settings.flash_liveness_settings.mask_settings.mobile.oval_padding.bottom":"data.settings.sdk_settings.flash_liveness_settings.mask_settings.oval_padding.bottom")},ovalVerticalOffset:i.getWebSetting(e,r.isMobile?"data.settings.sdk_settings.flash_liveness_settings.mask_settings.mobile.oval_vertical_offset":"data.settings.sdk_settings.flash_liveness_settings.mask_settings.oval_vertical_offset"),chinToMaskBottomPadding:i.getWebSetting(e,r.isMobile?"data.settings.sdk_settings.flash_liveness_settings.mask_settings.mobile.chin_to_mask_bottom_padding":"data.settings.sdk_settings.flash_liveness_settings.mask_settings.chin_to_mask_bottom_padding")},f={minFarFaceRatio:i.getWebSetting(e,r.isMobile?"data.settings.sdk_settings.flash_liveness_settings.face_settings.mobile.min_far_face_ratio":"data.settings.sdk_settings.flash_liveness_settings.face_settings.min_far_face_ratio"),maxFarFaceRatio:i.getWebSetting(e,r.isMobile?"data.settings.sdk_settings.flash_liveness_settings.face_settings.mobile.max_far_face_ratio":"data.settings.sdk_settings.flash_liveness_settings.face_settings.max_far_face_ratio"),closeFaceRatio:i.getWebSetting(e,r.isMobile?"data.settings.sdk_settings.flash_liveness_settings.face_settings.mobile.close_face_ratio":"data.settings.sdk_settings.flash_liveness_settings.face_settings.close_face_ratio")},h={enable:i.getWebSetting(e,"data.settings.sdk_settings.flash_liveness_settings.close_eyes_settings.enable"),timeout:i.getWebSetting(e,"data.settings.sdk_settings.flash_liveness_settings.close_eyes_settings.timeout"),forceCheck:i.getWebSetting(e,"data.settings.sdk_settings.flash_liveness_settings.close_eyes_settings.force_check")},u={enable:i.getWebSetting(e,"data.settings.sdk_settings.flash_liveness_settings.exif_data_settings.enable")},m={imageQuality:i.getWebSetting(e,"data.settings.sdk_settings.flash_liveness_settings.image_settings.image_quality"),validFaceRatio:i.getWebSetting(e,"data.settings.sdk_settings.flash_liveness_settings.image_settings.valid_face_ratio"),enableCropCenterFar:i.getWebSetting(e,"data.settings.sdk_settings.flash_liveness_settings.image_settings.crop_center_far"),enableCropCenterClose:i.getWebSetting(e,"data.settings.sdk_settings.flash_liveness_settings.image_settings.crop_center_close"),detectionToWholeFaceRatio:i.getWebSetting(e,"data.settings.sdk_settings.flash_liveness_settings.image_settings.detection_to_whole_face_ratio")},b=i.getWebSetting(e,"data.settings.sdk_settings.flash_liveness_settings.timeout_settings.max_retry_count"),p={enable:i.getWebSetting(e,"data.settings.sdk_settings.flash_liveness_settings.timeout_settings.enable"),total:i.getWebSetting(e,"data.settings.sdk_settings.flash_liveness_settings.timeout_settings.total"),countdown:i.getWebSetting(e,"data.settings.sdk_settings.flash_liveness_settings.timeout_settings.countdown"),enableMaxRetryCount:b>0,maxRetryCount:b,interruptible:!i.getWebSetting(e,"data.settings.sdk_settings.flash_liveness_settings.timeout_settings.non_stoppable")},v={enable:i.getWebSetting(e,"data.settings.sdk_settings.flash_liveness_settings.blur_far_settings.enable"),threshold:i.getWebSetting(e,"data.settings.sdk_settings.flash_liveness_settings.blur_far_settings.blurry_threshold"),duration:i.getWebSetting(e,"data.settings.sdk_settings.flash_liveness_settings.blur_far_settings.wait_for_best_image_time_ms")},y={enable:i.getWebSetting(e,"data.settings.sdk_settings.flash_liveness_settings.blur_close_settings.enable"),threshold:i.getWebSetting(e,"data.settings.sdk_settings.flash_liveness_settings.blur_close_settings.blurry_threshold"),duration:i.getWebSetting(e,"data.settings.sdk_settings.flash_liveness_settings.blur_close_settings.wait_for_best_image_time_ms")},S={enable:i.getWebSetting(e,"data.settings.sdk_settings.flash_liveness_settings.not_qualified_settings.enable_far"),threshold:i.getWebSetting(e,"data.settings.sdk_settings.flash_liveness_settings.not_qualified_settings.threshold_far")},k={enable:i.getWebSetting(e,"data.settings.sdk_settings.flash_liveness_settings.not_qualified_settings.enable_close"),threshold:i.getWebSetting(e,"data.settings.sdk_settings.flash_liveness_settings.not_qualified_settings.threshold_close")},C={enableTooBrightCheck:n(e,"data.settings.sdk_settings.flash_liveness_settings.brightness_detection_far_settings.enable_too_bright_check"),enableTooDarkCheck:n(e,"data.settings.sdk_settings.flash_liveness_settings.brightness_detection_far_settings.enable_too_dark_check"),tooBrightThreshold:n(e,"data.settings.sdk_settings.flash_liveness_settings.brightness_detection_far_settings.too_bright_threshold"),tooDarkThreshold:n(e,"data.settings.sdk_settings.flash_liveness_settings.brightness_detection_far_settings.too_dark_threshold")},F={enableTooBrightCheck:n(e,"data.settings.sdk_settings.flash_liveness_settings.brightness_detection_close_settings.enable_too_bright_check"),enableTooDarkCheck:n(e,"data.settings.sdk_settings.flash_liveness_settings.brightness_detection_close_settings.enable_too_dark_check"),tooBrightThreshold:n(e,"data.settings.sdk_settings.flash_liveness_settings.brightness_detection_close_settings.too_bright_threshold"),tooDarkThreshold:n(e,"data.settings.sdk_settings.flash_liveness_settings.brightness_detection_close_settings.too_dark_threshold")},x={imageOrdering:i.getWebSetting(e,"data.settings.sdk_settings.flash_liveness_settings.output_image_settings.image_ordering"),farImageOrder:eh,closeImageOrder:ef};Array.isArray(x.imageOrdering)&&2===x.imageOrdering.length&&"far"===x.imageOrdering[0]&&"close"===x.imageOrdering[1]&&(x.farImageOrder=0,x.closeImageOrder=1);let E={enable:i.getWebSetting(e,"data.settings.sdk_settings.flash_liveness_settings.auto_gen_frame_ids.enable")&&p.enable,maxItems:i.getWebSetting(e,"data.settings.sdk_settings.flash_liveness_settings.auto_gen_frame_ids.max_items")};return{captureFrameSettings:_,livenessSettings:g,flashSettings:c,maskSettings:d,faceSettings:f,closeEyesSettings:h,exifSettings:u,imageSettings:m,timeoutSettings:p,blurCheckFarSettings:v,blurCheckCloseSettings:y,notQualifiedFarSettings:S,notQualifiedCloseSettings:k,brightnessDetectionFarSettings:C,brightnessDetectionCloseSettings:F,outputImageSettings:x,autoGenFrameIds:E,frontalFaceCheckSettings:{enable:i.getWebSetting(e,"data.settings.sdk_settings.flash_liveness_settings.frontal_face_check.enable"),upDownBoundMin:i.getWebSetting(e,"data.settings.sdk_settings.flash_liveness_settings.frontal_face_check.up_down_bound_min"),upDownBoundMax:i.getWebSetting(e,"data.settings.sdk_settings.flash_liveness_settings.frontal_face_check.up_down_bound_max")}}},[s,a])},eb=r.isMobile?{width:{ideal:640},whiteBalanceMode:"none"}:{width:{ideal:9999},whiteBalanceMode:"none"},ep=(e,t)=>""===t.faceError&&(!!e.isEyeClosed&&!t.isEyeClosed||(!!e.isEyeClosed||!t.isEyeClosed)&&(!!m.hasBetterBrightnessScore(t.brightnessScore,e.brightnessScore)||!!m.hasSameBrightnessScore(t.brightnessScore,e.brightnessScore)&&b.hasBetterBlurScore(t.blurScore,e.blurScore)));function ev(s){let{onReset:n,onFlashDone:i,frontCamera:r,styledComponent:m,onFramesCaptured:b,customComponent:F,extraConfig:x,onImageCaptured:E}=s,{onCloseCallback:w,onErrorCallback:M}=el(),R=em(),A=F?.FlashLivenessBody??p,ee=F?.FlashLivenessOverlay??v,et=F?.FlashLivenessError??y,es=F?.FlashLivenessCloseIcon??S,{maskSettings:ea,flashSettings:en,faceSettings:ei,livenessSettings:er,captureFrameSettings:e_,imageSettings:eg,timeoutSettings:ec,blurCheckFarSettings:ef,blurCheckCloseSettings:eh,exifSettings:eu,autoGenFrameIds:ev}=R;if(ea.smallScale>ea.largeScale)throw Error("smallScale must be smaller than largeScale");let ey=e.useRef(),eS=D(),ek=eo(),{framesPerColor:eC,delayBetweenColors:eF,useFaceDetectorWhenFlashing:ex,flashIntensity:eE,flashColor:ew,colors:eM,flashFrameInterval:eR,secondaryFlashColor:eL}=en,[eW,eI]=e.useState(""),eA=e.useMemo(()=>W(eI,1e3),[]),[eD,eT]=e.useState(!1),[eB,eq]=e.useState(T.LOADING),eO=l(),eP={width:o("FlashLiveness.mask.width")({theme:eO}),height:o("FlashLiveness.mask.height")({theme:eO}),strokeColor:(eB===T.FAR_FACE||eB===T.CLOSE_FACE)&&eW&&!eD?o("FlashLiveness.mask.strokeColorError")({theme:eO}):o("FlashLiveness.mask.strokeColor")({theme:eO}),strokeWidth:2*o("FlashLiveness.mask.strokeWidth")({theme:eO}),path:o("FlashLiveness.mask.path")({theme:eO}),backgroundColor:o("FlashLiveness.maskFill")({theme:eO})},ej=e.useRef(null),[eQ,eV,eN,eU]=B(),[eH,e$]=e.useState(0),[eG,eJ]=e.useState(!1),ez=e.useRef({frames:[],total:{[q.FAR_FACE]:0,[q.CLOSE_FACE]:0}}),eK=e.useRef(!1),eX=e.useRef(!1),eY=e.useRef(!1),eZ=O({compareFn:ep,duration:ef.duration,minFrames:e_.autoCaptureMinFramesFar}),e0=O({compareFn:ep,duration:eh.duration,minFrames:e_.autoCaptureMinFramesClose}),e1=ed(),[e2,e3]=e.useState(!1),{sessionId:e5,updateSessionId:e8}=P(),e9=e.useRef(_.createSingleUUID()),{onVideoPlayed:e6,cropArea:e4,isPlaying:e7}=j({}),{smallScale:te,largeScale:tt}=Q(ea,{width:eP.width,height:eP.height},{width:e4.width,height:e4.height}),ts=e.useRef(null),ta=e.useRef(null),tn=1e3*ec.total/e_.framesIntervalTime+eM.length*eC,{uuids:ti,getNextUUID:tr,reset:tl}=g({total:Math.min(ev.maxItems,Math.ceil(tn/e_.framesBatchLength))}),to=e.useCallback(e=>{let t=e[e.length-1];try{let e=JSON.parse(t.metadata);ev.enable&&(e.global_batch_id=tr()),e.global_session_id=e9.current,t.metadata=JSON.stringify(e)}catch(e){console.error("Unable to process last frame metadata",e)}},[ev.enable,tr]),{playVoice:t_}=c.useVoicePlayer(),tg=e.useMemo(()=>L(({reason:e})=>{if(eY.current=!1,ez.current.frames=[],ez.current.total[q.FAR_FACE]=0,ez.current.total[q.CLOSE_FACE]=0,eK.current=!1,eX.current=!1,ts.current=null,ta.current=null,er.enableFarStep?(e$(te),eq(T.FAR_FACE),t_("move_face_into_frame")):t_("move_face_closer"),e8(),ev.enable){let e=tl();d.addExifData("frame_batch_ids",e)}n({reason:e})},200,{leading:!0}),[er.enableFarStep,e8,ev.enable,n,te,t_,tl]),tc=V({offset:ea.ovalVerticalOffset,ovalPadding:ea.ovalPadding,largeScale:tt,maskHeight:e4.height,ovalHeight:eP.height}),{flashingColors:td,currentColor:tf,colorIndex:th,startFlashing:tu,goToNextColor:tm,colorInfoRef:tb,checkIsLastColor:tp}=(({colors:s="",onFlashDone:a,onErrorCallback:n,framesPerColor:i,flashColor:r,secondaryFlashColor:l})=>{let[o,_]=e.useState(null),g=e.useRef({colorIndex:null,frameIndex:null,colorStringIndex:null}),c=e.useMemo(()=>s.split("").reduce((e,t)=>e+t.repeat(i),""),[s,i]),d=" "===c[o]?l:r,f=e.useCallback(()=>g.current.colorStringIndex===c.length-1,[c.length]),h=e.useCallback(()=>{if(g.current.colorIndex+=Math.floor((g.current.frameIndex+1)/i),g.current.frameIndex=(g.current.frameIndex+1)%i,g.current.colorStringIndex+=1,!(g.current.colorStringIndex>c.length)){if(g.current.colorStringIndex<c.length)return void _(e=>e+1);_(null),g.current={colorIndex:null,frameIndex:null,colorStringIndex:null},"function"==typeof a&&a()}},[c.length,i,a]),u=e.useCallback(()=>{_(0),g.current={colorIndex:0,frameIndex:0,colorStringIndex:0}},[]);return e.useEffect(()=>{0===c.length&&"function"==typeof n&&n(t.Errors.flashing_color_error)},[c.length,n]),{flashingColors:c,colorIndex:o,currentColor:d,goToNextColor:h,startFlashing:u,colorInfoRef:g,checkIsLastColor:f}})({colors:eM,onFlashDone:e.useCallback(async()=>{eq(T.STOP_DECTECTING),eS("selfie_flash","user_activity.finish_flash"),eS("selfie_flash","user_activity",({lastTimeLog:e})=>({flash_liveness_in_ms:e-ey.current}));let{frames:e}=ez.current;if(e_.enable&&e_.framesBatchLength>0){let t=e.length%e_.framesBatchLength;if(0!==t){let s=e.slice(-1*t);to(s),"function"==typeof b&&b(s)}}try{"function"==typeof i&&await i({frames:ez.current.frames})}catch(e){M({error:e})}},[eS,e_.enable,e_.framesBatchLength,to,b,i,M]),onErrorCallback:M,framesPerColor:eC,flashColor:ew,secondaryFlashColor:eL}),tv=e.useCallback(()=>{!er.enableFarStep||(0===ez.current.total[q.FAR_FACE]&&(eY.current=!0),e_.enable&&(ez.current.total[q.FAR_FACE]+=1))},[e_.enable,er.enableFarStep]),ty=e.useMemo(()=>({x:Math.max(eV?.left,0),y:Math.max(eV?.top,0),width:Math.min(eV?.right-eV?.left,e4.width),height:Math.min(eV?.bottom-eV?.top,e4.height)}),[e4.height,e4.width,eV?.bottom,eV?.left,eV?.right,eV?.top]),tS=e.useCallback(({frame:e,prediction:t,originalRatio:s})=>{if(eK.current)return;let a=e=>{let t=Y({maskBoundingBox:ty,faceRatio:e.faceRatio,validFaceRatio:eg.validFaceRatio,video:ej.current,shouldCropCenterSquare:eg.enableCropCenterFar,cropArea:e4,frame:e.snapshot,facePrediction:e.facePrediction,detectionToWholeFaceRatio:eg.detectionToWholeFaceRatio}),s={blob:k.takePicture({canvas:t,quality:eg.imageQuality}),gesture:"frontal",captureTime:e.captureTime,selfieLabel:q.FAR_FACE,qualifyScore:e.qualifyScore,blurScore:e.blurScore,brightnessScore:e.brightnessScore,realQualifyScore:e.realQualifyScore,qualifyModelMessage:e.qualifyModelMessage};eK.current=!0,d.addExifData("flash_liveness.number_of_frames.far_frames",ez.current.total[q.FAR_FACE]),d.addExifData("model_score.face_blurry_score",s.blurScore),d.addExifData("model_score.face_brightness_score",s.brightnessScore),d.addExifData("model_score.face_qualify_score",s.qualifyScore),d.addExifData("debug_log.face_real_qualify_score",s.realQualifyScore),d.addExifData("debug_log.face_qualify_model_message",s.qualifyModelMessage),d.addExifData("selfie_label",s.selfieLabel),d.addExifData("capture_time",s.captureTime),d.addExifData("type",s.gesture),E(s),eI(""),e$(tt),eU(!0),eq(T.CLOSE_FACE),t_("move_face_closer")},n={qualifyScore:e.qualifyScore,blurScore:e.blurScore,isEyeClosed:e.isEyeClosed,faceRatio:e.faceRatio,snapshot:N(ej.current),captureTime:Date.now(),facePrediction:U(t,s),brightnessScore:e.brightnessScore,faceError:e.faceError,realQualifyScore:e.realQualifyScore,qualifyModelMessage:e.qualifyModelMessage};if(!ef.enable)return void a(n);if(!eZ.isAutoCapturing()){eT(!0),eZ.startCapturing({onDone:e=>{eT(!1),a(e)},initialFrame:n});return}eZ.captureFrame(n)},[ef.enable,eZ,ty,eg.validFaceRatio,eg.enableCropCenterFar,eg.detectionToWholeFaceRatio,eg.imageQuality,e4,E,tt,eU,t_]),tk=e.useCallback(({frame:e,prediction:t,originalRatio:s})=>{if(eX.current)return;let a=e=>{let t=Y({maskBoundingBox:ty,faceRatio:e.faceRatio,validFaceRatio:eg.validFaceRatio,video:ej.current,shouldCropCenterSquare:eg.enableCropCenterClose,cropArea:e4,frame:e.snapshot,facePrediction:e.facePrediction,detectionToWholeFaceRatio:eg.detectionToWholeFaceRatio}),s={blob:k.takePicture({canvas:t,quality:eg.imageQuality}),gesture:"frontal",captureTime:e.captureTime,selfieLabel:q.CLOSE_FACE,qualifyScore:e.qualifyScore,blurScore:e.blurScore,brightnessScore:e.brightnessScore,realQualifyScore:e.realQualifyScore,qualifyModelMessage:e.qualifyModelMessage};eX.current=!0,d.addExifData("flash_liveness.number_of_frames.close_frames",ez.current.total[q.CLOSE_FACE]),d.addExifData("model_score.face_blurry_score",s.blurScore),d.addExifData("model_score.face_brightness_score",s.brightnessScore),d.addExifData("model_score.face_qualify_score",s.qualifyScore),d.addExifData("debug_log.face_real_qualify_score",s.realQualifyScore),d.addExifData("debug_log.face_qualify_model_message",s.qualifyModelMessage),d.addExifData("selfie_label",s.selfieLabel),d.addExifData("capture_time",s.captureTime),d.addExifData("type",s.gesture),E(s),eI(""),eJ(!1),eq(T.START_FLASHING),tu()},n={qualifyScore:e.qualifyScore,blurScore:e.blurScore,isEyeClosed:e.isEyeClosed,faceRatio:e.faceRatio,snapshot:N(ej.current),captureTime:Date.now(),facePrediction:U(t,s),brightnessScore:e.brightnessScore,faceError:e.faceError,realQualifyScore:e.realQualifyScore,qualifyModelMessage:e.qualifyModelMessage};if(!eh.enable)return void a(n);if(!e0.isAutoCapturing()){t_("please_hold_still"),eT(!0),e0.startCapturing({onDone:e=>{eT(!1),a(e)},initialFrame:n});return}e0.captureFrame(n)},[eh.enable,e0,ty,eg.validFaceRatio,eg.enableCropCenterClose,eg.detectionToWholeFaceRatio,eg.imageQuality,e4,E,tu,t_]),tC=e.useMemo(()=>{if("number"==typeof th&&th%eC==0){let e=td[th-1];return e===td[th]?eR:Math.max(eF,eR)}return eR},[th,eF,eR,td,eC]),tF=null!==th&&eB===T.START_FLASHING,tx=e.useRef(!1),tE=e.useCallback(({prediction:e,canvas:t})=>{if(!tF||tx.current||null===tb.current.colorIndex||null===tb.current.frameIndex)return;if(!e_.enable)return void tm();let s=performance.now();if(null!==ta.current&&s-ta.current<tC)return;ta.current=s;let{frames:a}=ez.current,n=H({prediction:e,canvas:t,index:a.length,quality:e_.frameQuality}),i={color:tf,type:q.FLASHING,time:Math.round(performance.now()),colorIndex:tb.current.colorIndex,frameIndex:tb.current.frameIndex,colorStringIndex:tb.current.colorStringIndex,pattern:eM,session_id:e5},r=tp();if(r&&eu.enable&&(d.addExifData("flash_liveness.flash_liveness_in_ms",Math.round(performance.now()-ey.current)),i.exif=d.getCurrentExif()),n.metadata=JSON.stringify(i),a.push(n),e_.framesBatchLength>0&&a.length%e_.framesBatchLength==0){let e=a.slice(-1*e_.framesBatchLength);to(e),"function"==typeof b&&b(e)}r&&(tx.current=!0),tm()},[tF,e_.enable,e_.frameQuality,e_.framesBatchLength,tC,tf,tb,eM,e5,tp,eu.enable,tm,to,b]),tw=e.useCallback(({error:e})=>{eA(e),("no_face"===e||"multiple_faces"===e)&&"no_face"===e&&eY.current&&!eD&&tg({reason:$.no_face})},[eD,tg,eA]),{warmupDone:tM}=G({onError:M,isVideoPlaying:e7,step:eB,cropArea:e4,videoRef:ej,onFarFaceDetected:tv,onFarFullFaceDetected:tS,onCloseFaceDetected:e.useCallback(({prediction:e,canvas:t})=>{let{frames:s}=ez.current;if(er.enableFarStep||0!==s.length||(eY.current=!0),!e_.enable)return;let a=performance.now();if(null!==ta.current&&a-ta.current<e_.framesIntervalTime)return;ta.current=a;let n=H({prediction:e,canvas:t,index:s.length,quality:e_.frameQuality});if(n.metadata=JSON.stringify({color:"",type:q.CLOSE_FACE,time:Math.round(performance.now()),colorIndex:tb.current.colorIndex,pattern:eM,session_id:e5}),ez.current.total[q.CLOSE_FACE]+=1,s.push(n),e_.framesBatchLength>0&&s.length%e_.framesBatchLength==0){let e=s.slice(-1*e_.framesBatchLength);to(e),"function"==typeof b&&b(e)}},[er.enableFarStep,e_.enable,e_.framesIntervalTime,e_.frameQuality,e_.framesBatchLength,tb,eM,e5,to,b]),onCloseFullFaceDetected:tk,onFlashingFramesCaptured:tE,useFaceDetectorWhenFlashing:ex,onFaceError:tw,maskBoundingRect:eV,shouldPauseFaceDetection:eN||e2,faceDetectionSettings:R,shouldContinueOnError:eD,debug:ek});J(ej.current);z(()=>{!async function(){let{resourceReport:e,measureReport:t}=await C.reportAll();Object.values(e).forEach(e=>{eS("selfie_flash","sdk.download_model",e)}),Object.values(t).forEach(e=>{eS("selfie_flash","sdk.init_model",e)})}()},tM),z(()=>{er.enableFarStep?(t_("move_face_into_frame"),eq(T.FAR_FACE),e$(te)):(t_("move_face_closer"),eq(T.CLOSE_FACE),e$(tt)),eJ(!0),d.addExifData("selfie_type",e1),d.addExifData("flash_liveness",{flash_settings:{delay_between_colors:en.delayBetweenColors,flash_color:en.flashColor,secondary_flash_color:en.secondaryFlashColor},face_settings:{close_face_ratio:ei.closeFaceRatio,max_far_face_ratio:ei.maxFarFaceRatio,min_far_face_ratio:ei.minFarFaceRatio},mask_settings:{oval_vertical_offset:ea.ovalVerticalOffset,small_scale:ea.smallScale,large_scale:ea.largeScale},image_settings:{valid_face_ratio:eg.validFaceRatio}}),d.addExifData("global_session_id",e9.current),d.addExifData("pattern",eM),ev.enable&&d.addExifData("frame_batch_ids",ti),ey.current||(ey.current=performance.now())},tM&&e7),z(()=>eS("selfie_flash","user_activity.start"),!0),z(()=>eS("selfie_flash","user_activity.start_far"),eB===T.FAR_FACE),z(()=>eS("selfie_flash","user_activity.start_close"),eB===T.CLOSE_FACE),z(()=>eS("selfie_flash","user_activity.start_flash"),eB===T.START_FLASHING);let tR=null===th?0:Math.min(Math.round((th+1)/(eM.length*eC)*100),100),{Loading:tL}=m,tW=e.useCallback(()=>{eT(!1),eZ.stopCapturing(),e0.stopCapturing(),e3(!0)},[e0,eZ]),tI=e.useCallback(()=>{e3(!1),tg({reason:$.timeout})},[tg]),{remaining:tA}=K({shouldStart:eG&&ec.enable,onTimeout:tW,onDelayEnd:tI,onError:M,totalTime:ec.total,totalDelay:3,maxRetriesSettings:{enable:ec.enableMaxRetryCount,total:ec.maxRetryCount},interruptible:ec.interruptible}),tD=Z(eW),tT=e4.y+e4.height/2+tc;return a.jsxs(a.Fragment,{children:[a.jsx(f,{frontCamera:r,onVideoPlayed:e6,onClose:w,flipHorizontal:r,ref:ej,onError:M,videoSettings:eb,closeButton:a.jsx(es,{}),children:a.jsxs(X,{overlay:!tM||!e7,loadingComponent:tL,children:[""!==eW&&a.jsx(h,{}),a.jsx(I,{x:`${Math.round(e4.x)}px`,y:`${Math.round(e4.y)}px`,width:`${e4.width}px`,height:`${e4.height}px`,surroundStyle:{background:o("FlashLiveness.maskFill")({theme:eO})},children:a.jsx(u,{ref:eQ,scale:eH,debug:ek,width:e4.width,height:e4.height,padding:ea.ovalPadding,verticalOffset:tc,mask:eP})}),!eD&&""!==tD&&"start_flashing"!==eB&&a.jsx(et,{errorY:tT,errorMessage:tD})]})}),a.jsx(A,{step:eB,currentProgress:tR,errorCode:eW,timeoutProps:{remaining:tA,warningThreshold:ec.countdown,total:ec.total,shouldStart:eG&&ec.enable},isFlashingColor:tf===ew,isAutoCapturing:eD,extraConfig:x}),a.jsx(ee,{step:eB,currentColor:tf,flashIntensity:eE,flashColor:ew,secondaryFlashColor:eL})]})}let ey=s=>{let{apiCheck:n,onLivenessDetectionDone:i,frontalMinSize:r,serviceSettings:l,apiCredentials:o,..._}=s,g=_.customComponent?.FlashLivenessLoading??w,[c,f]=e.useState(!1),h=ee(),u=ed(),m=e_(),b=x.getEnabledServices(l,m),{verifyFlashLiveness:p,uploadImage:v}=function({outputEncryptionSettings:t,selfieType:s,enabledServices:a,apiCredentials:n}){let{apiClient:i}=F.useApiClient({apiCredentials:n}),r=e.useCallback(async e=>{if(!t.enable)return i.uploadImage({label:"portrait",file:e.blob,metadata:JSON.stringify({label:e.selfieLabel})});let s=new Blob([e.encrypted.hex]);return i.uploadImage({file:s,label:"portrait",metadata:JSON.stringify({label:e.selfieLabel})},{"X-TV-Key":t.key})},[i,t.enable,t.key]);return{verifyFlashLiveness:e.useCallback(async({videos:e,uploadedImages:t,metadata:n})=>{try{let r=null;a.enableVerifyFaceLiveness&&(r=i.verifyFaceLiveness({images:t.map(e=>({id:e?.data?.image_id,label:"portrait"})),videos:e,metadata:n,selfie_type:s}));let l=null;a.enableVerifySanityPortrait&&(l=i.requestVerifyPortrait({image:{id:t[t.length-1]?.data?.image_id},selfie_type:s}));let[o,_]=await Promise.all([r,l]);return{uploadedImages:t,faceLivenessResult:o,portraitResult:_}}catch(e){return console.error(e),{}}},[i,a.enableVerifyFaceLiveness,a.enableVerifySanityPortrait,s]),uploadImage:r}}({outputEncryptionSettings:h,selfieType:u,enabledServices:b,apiCredentials:o}),{captureFrameSettings:y,flashSettings:S,exifSettings:k,outputImageSettings:C}=em(),{framesIntervalTime:L}=y,{onFramesCaptured:W,onReset:I}=s,{onErrorCallback:A}=el(),D=et(),T=e.useRef([]),B=e.useRef([]),O=async e=>{let t=e;if(h.enable&&(t=await M.encryptFrames(t,h.key)),"function"==typeof W&&W(t),n&&b.enableUploadFrames){let e={};h.enable&&(e["X-TV-Key"]=h.key),es.uploadFrameBatch(ea(t),D,e)}},P=e.useCallback(async e=>{let t,s=new Promise(e=>{t=e});B.current.push(s);let a={...e,blob:await e.blob},i=await d.writeCurrentExif({imageData:a,enableExifData:k.enable});a.blob=i,h.enable&&(a.encrypted=await E.encrypt({blob:a.blob,key:h.key}));let r=e.selfieLabel===q.FAR_FACE?C.farImageOrder:C.closeImageOrder;T.current.push({image:a,uploadPromise:n&&b.enableUploadImages?v(a):null,order:r}),t()},[n,b.enableUploadImages,k.enable,h.enable,h.key,C.closeImageOrder,C.farImageOrder,v]),j=async e=>{f(!0),await Promise.all(B.current);let s={flash_color:S.flashColor,colors:S.colors,frames_per_color:S.framesPerColor,frame_interval:L,delay_between_colors:S.delayBetweenColors,use_face_detector_when_flashing:S.useFaceDetectorWhenFlashing};T.current=T.current.filter(e=>!!e),T.current.sort((e,t)=>e.order-t.order);let a=T.current.map(e=>e.image).filter(e=>"frontal"===e.gesture),l=a.map(e=>e.blob),o=a.map(e=>e.encrypted),_=l[l.length-1],g=_&&"number"==typeof r?await R.scaleImage(_,{minsize:r}):null,c=e.frames;if(h.enable&&(c=await M.encryptFrames(c,h.key)),!n||!b.enableUploadImages){await i({capturedFrames:c,frontalFaces:l,frontalFacesEncrypted:o,frontalScaledImage:g,steps:[],metadata:s}),f(!1);return}try{let e=null;e=y.enable?await es.getAllUploadedBatches():[{frames:ea(c)}];let t=await Promise.all(T.current.map(e=>e.uploadPromise)),{faceLivenessResult:a,portraitResult:n}=await p({videos:e,uploadedImages:t,metadata:s});if(es.resetUploadBatches(),f(!1),a?.errors)throw a.errors;if(n?.errors)throw n.errors;await i({capturedFrames:c,steps:[],frontalFaces:l.map((e,s)=>({blob:e,id:t?.[s]?.data?.image_id})),frontalFacesEncrypted:o,frontalScaledImage:g,apiCheckPassed:a?.data.is_live??!1,verifyFaceLivenessResult:a?.data??null,verifyPortraitResult:n?.data??null,uploadFramesResult:e})}catch(e){console.error(e),f(!1),A({...t.Errors.api_call_error,details:e})}};return a.jsxs(a.Fragment,{children:[a.jsx(ev,{..._,apiCheck:n,onFlashDone:j,onFramesCaptured:O,onReset:()=>{T.current=[],B.current=[],es.resetUploadBatches(),"function"==typeof I&&I()},onImageCaptured:P}),a.jsx(g,{loading:c})]})},eS=e=>{let{apiCredentials:t,outputEncryptionSettings:s,mode:n}=e;return a.jsx(A,{version:"v2",unmountOnHidden:!0,children:a.jsx(en,{apiCredentials:t,children:a.jsx(ec,{flashMode:n,children:a.jsx(ei,{settings:s,children:a.jsx(ey,{...e})})})})})};eS.propTypes={apiCheck:s.bool,apiCredentials:s.shape({accessKey:s.string,secretKey:s.string,apiUrl:s.string}),onReset:s.func,onLivenessDetectionDone:s.func,onClose:s.func,onError:s.func,onFramesCaptured:s.func,frontCamera:s.bool,styledComponent:s.shape({CloseCameraButton:s.node}),outputEncryptionSettings:s.shape({key:s.string}),frontalMinSize:s.number,serviceSettings:s.shape({enableGetClientSettings:s.bool,enableUploadFrames:s.bool,enableUploadImages:s.bool,enableVerifySanityPortrait:s.bool,enableVerifyFaceLiveness:s.bool}),mode:s.string,flowId:s.string,customTexts:s.shape({}),customComponents:s.shape({FlashLivenessBody:s.elementType,FlashLivenessOverlay:s.elementType}),extraConfig:s.shape({})},eS.defaultProps={apiCheck:!1,apiCredentials:{},onReset:()=>{},onLivenessDetectionDone:()=>{},onClose:()=>{},onError:()=>{},onFramesCaptured:()=>{},frontCamera:!0,styledComponent:{CloseCameraButton:null},outputEncryptionSettings:{key:""},frontalMinSize:null,serviceSettings:{enableGetClientSettings:!0,enableUploadFrames:!0,enableUploadImages:!0,enableVerifySanityPortrait:!0,enableVerifyFaceLiveness:!0},mode:t.Mode.FLASH_ADVANCED,flowId:"",customTexts:{},customComponents:{FlashLivenessBody:null,FlashLivenessOverlay:null},extraConfig:null};export{eS as default};
@@ -0,0 +1 @@
1
+ let e;import{d as t,r as s,j as n,a as i,aa as l,c as r,a9 as a,ab as o,o as c,u as u,g as g,p as d,s as S,e as h,X as v}from"./chunk-78da2232.js";import{e as f,d as j,c as p,D as b,S as x}from"./chunk-16aae30a.js";let k=s.createContext({}),y={},C=({children:e,enableGetClientSettings:i,clientSettings:l,apiCredentials:r,flowId:a})=>{let{apiClient:o}=t.useApiClient({apiCredentials:r}),[c,u]=s.useState({}),[g,d]=s.useState(!1);s.useEffect(()=>{i?async function e(){try{if(!o||"function"!=typeof o.clientSettings)return;let e=await o.clientSettings({flow_id:a});u(e)}catch(e){console.error(e)}finally{d(!0)}}():d(!0)},[i,o,a]);let S=y;return(l&&Object.keys(l).length>0?S=l:i&&(S=c),g)?n.jsx(k.Provider,{value:S,children:e}):null},m=()=>s.useContext(k),_=({children:e,onError:t})=>{let s=m();return n.jsx(i.LicenseProvider,{clientSettings:s,onError:t,children:e})},E=({children:e,onError:t,type:s})=>{let i=m();return n.jsx(l.Provider,{clientSettings:i,type:s,onError:t,children:e})},D={},P=({children:e,customTexts:t=D})=>{let s=m(),{lang:i,uiSettings:l}=r.useSDKSettings(),c=a({customTexts:t,clientSettings:s,lang:i,uiSettings:l});return n.jsx(o.SDKLocaleProvider,{value:c,children:e})},L={},B=({children:e,customTheme:t=L})=>{let s=m(),{uiSettings:i,themeVersion:l}=r.useSDKSettings(),a=f({customTheme:t,clientSettings:s,themeVersion:l,uiSettings:i,defaultThemes:j});return n.jsx(c,{theme:a,children:e})},z=v.lazy(()=>import("./chunk-f309ca64.js")),w=v.lazy(()=>import("./chunk-91c53b7b.js")),A=v.lazy(()=>import("./chunk-c9afc075.js")),K=v.lazy(()=>import("./chunk-b5e82a4b.js")),I=v.lazy(()=>import("./chunk-86785e18.js")),V=v.lazy(()=>import("./chunk-a03b960b.js"));var T=(e=e=>{var t,i,l;let a,{logCredentials:o={enable:!1},livenessComponent:c,customTheme:v={},customTexts:f,...j}=e,{mode:k,flowId:y,onError:C,onClose:D,debug:L,onLivenessDetectionDone:T}=j,W=m(),{billingSettings:M,enableBilling:O,themeVersion:G}=r.useSDKSettings(),F=u.getWebSetting(W,"data.settings.sdk_settings.billing_settings.billing_config"),{submitBilling:U}=g({enable:O,onError:C,billingSettings:M??{json:F??{}},billingUrl:u.getWebSetting(W,"data.settings.sdk_settings.billing_settings.url")}),X=d.buildBillingInput(e),$=p(),q="face_authen"===$?S.BillingService.faceAuth:S.BillingService.selfie,H=s.useCallback(async(...e)=>{if("face_authen"===$)return void await T(...e);try{if(!await U({service:q,input:X,output:{...d.buildBillingOutput(e?.[0]||{}),sdkStatus:S.BillingStatus.success}}))return}catch(e){console.error(e)}await T(...e)},[X,q,$,T,U]),J=s.useCallback(e=>{S.ErrorsWithoutBilling.includes(e.code)?C(e):(U({service:q,input:X,output:{error:e,sdkStatus:S.BillingStatus.fail}}),C&&C(e))},[U,q,X,C]),N=s.useCallback(()=>{U({service:q,input:X,output:{sdkStatus:S.BillingStatus.cancel}}),D&&D()},[U,q,X,D]),Q=(t=k,i=c,l=G,a=K,t===S.Mode.ACTIVE&&(a=i?.ActiveLiveness??("v1"===l?I:K)),t===S.Mode.PASSIVE_V2&&(a=i?.PassiveLivenessV2??A),t===S.Mode.PASSIVE&&(a=i?.PassiveLiveness??("v1"===l?V:w)),"string"==typeof t&&t.startsWith("flash")&&(a=i?.FlashLiveness??z),a);return n.jsx(b,{debug:L,children:n.jsx(x,{onDone:T,onError:J,onClose:N,children:n.jsx(P,{customTexts:f,children:n.jsx(E,{onError:J,type:"face_authen"===y?"face_auth":"liveness",children:n.jsx(_,{onError:C,children:n.jsx(B,{customTheme:v,children:n.jsx(h.SDKTrackingProvider,{value:{tracking:{...o}},children:n.jsx(s.Suspense,{fallback:null,children:n.jsx(Q,{...j,onLivenessDetectionDone:H})})})})})})})})})},function(t){let{apiCheck:s,apiCredentials:i,serviceSettings:l,flowId:r,clientSettings:a}=t,o=s&&(l?.enableGetClientSettings??!0);return n.jsx(C,{enableGetClientSettings:o,clientSettings:a,apiCredentials:i,flowId:r,children:n.jsx(e,{...t})})}),W=Object.freeze({__proto__:null,default:T});export{C as C,T as L,P as S,W as i,m as u};
@@ -0,0 +1 @@
1
+ export{s as Constants,a_ as SDK,h as SDKAdapter,aX as ScannerType,aZ as defaultClientSettings,aY as defaultReadIDCardSteps,aW as getSDKVersion}from"./chunk-78da2232.js";