gbc-kyc-kit 3.3.5 → 3.3.7

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.
@@ -40327,7 +40327,7 @@ function UploadDocument2({
40327
40327
  },
40328
40328
  children: /* @__PURE__ */ jsx$1(CircularProgress$1, {
40329
40329
  sx: {
40330
- color: "black"
40330
+ color: "var(--_primary)"
40331
40331
  }
40332
40332
  })
40333
40333
  }), /* @__PURE__ */ jsx$1("video", {
@@ -41707,7 +41707,11 @@ const ImageCropComponent = ({
41707
41707
  justifyContent: "center",
41708
41708
  alignItems: "center",
41709
41709
  p: 4,
41710
- children: /* @__PURE__ */ jsx$1(CircularProgress$1, {})
41710
+ children: /* @__PURE__ */ jsx$1(CircularProgress$1, {
41711
+ sx: {
41712
+ color: "var(--_primary)"
41713
+ }
41714
+ })
41711
41715
  }), /* @__PURE__ */ jsx$1("img", {
41712
41716
  ref: imageRef,
41713
41717
  src: image,
@@ -41779,9 +41783,20 @@ const ImageCropComponent = ({
41779
41783
  type: "button",
41780
41784
  variant: "contained",
41781
41785
  onClick: handleCrop,
41786
+ sx: {
41787
+ backgroundColor: "var(--_primary)",
41788
+ color: "white",
41789
+ "&:hover": {
41790
+ backgroundColor: "var(--_primary)",
41791
+ opacity: 0.8
41792
+ }
41793
+ },
41782
41794
  disabled: !imageLoaded || isLoading,
41783
41795
  startIcon: isLoading ? /* @__PURE__ */ jsx$1(CircularProgress$1, {
41784
- size: 20
41796
+ size: 20,
41797
+ sx: {
41798
+ color: "var(--_primary)"
41799
+ }
41785
41800
  }) : null,
41786
41801
  children: isLoading ? "Recortando..." : "Recortar"
41787
41802
  })]
@@ -45063,7 +45078,7 @@ const V2OcrComponent = ({
45063
45078
  variant: "contained",
45064
45079
  sx: {
45065
45080
  backgroundColor: "var(--_primary)",
45066
- color: "var(--_primary-contrastText)",
45081
+ color: "white",
45067
45082
  "&:hover": {
45068
45083
  backgroundColor: "var(--_primary)",
45069
45084
  opacity: 0.8
@@ -1401,7 +1401,7 @@ attempted value: ${a}
1401
1401
  top: 0;
1402
1402
  }
1403
1403
  `),B$,(t.vars||t).palette.action.hover));var T$=S.forwardRef(function(t,n){const r=E1({props:t,name:"MuiSkeleton"}),{animation:o="pulse",className:a,component:s="span",height:u,style:h,variant:g="text",width:d}=r,f=it(r,k$),p=L({},r,{animation:o,component:s,variant:g,hasChildren:Boolean(f.children)}),C=P$(p);return i(L$,L({as:s,ref:n,className:yt(C.root,a),ownerState:p},f,{style:L({width:d,height:u},h)}))});function R$(e){return b1("MuiTooltip",e)}var jl=p1("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);const D$=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];function V$(e){return Math.round(e*1e5)/1e5}const H$=e=>{const{classes:t,disableInteractive:n,arrow:r,touch:o,placement:a}=e,s={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",o&&"touch",`tooltipPlacement${vt(a.split("-")[0])}`],arrow:["arrow"]};return Tt(s,R$,t)},N$=ht(_3,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(({theme:e,ownerState:t,open:n})=>L({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none"},!t.disableInteractive&&{pointerEvents:"auto"},!n&&{pointerEvents:"none"},t.arrow&&{[`&[data-popper-placement*="bottom"] .${jl.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${jl.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${jl.arrow}`]:L({},t.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${jl.arrow}`]:L({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),Q$=ht("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${vt(n.placement.split("-")[0])}`]]}})(({theme:e,ownerState:t})=>L({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:_1(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},t.arrow&&{position:"relative",margin:0},t.touch&&{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${V$(16/14)}em`,fontWeight:e.typography.fontWeightRegular},{[`.${jl.popper}[data-popper-placement*="left"] &`]:L({transformOrigin:"right center"},t.isRtl?L({marginLeft:"14px"},t.touch&&{marginLeft:"24px"}):L({marginRight:"14px"},t.touch&&{marginRight:"24px"})),[`.${jl.popper}[data-popper-placement*="right"] &`]:L({transformOrigin:"left center"},t.isRtl?L({marginRight:"14px"},t.touch&&{marginRight:"24px"}):L({marginLeft:"14px"},t.touch&&{marginLeft:"24px"})),[`.${jl.popper}[data-popper-placement*="top"] &`]:L({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${jl.popper}[data-popper-placement*="bottom"] &`]:L({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})})),W$=ht("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:_1(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let l6=!1;const YC=new _8;let y4={x:0,y:0};function s6(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}var w4=S.forwardRef(function(t,n){var r,o,a,s,u,h,g,d,f,p,C,v,y,E,w,x,I,A,V;const F=E1({props:t,name:"MuiTooltip"}),{arrow:R=!1,children:P,components:O={},componentsProps:N={},describeChild:G=!1,disableFocusListener:q=!1,disableHoverListener:Q=!1,disableInteractive:T=!1,disableTouchListener:W=!1,enterDelay:D=100,enterNextDelay:H=0,enterTouchDelay:Z=700,followCursor:J=!1,id:ee,leaveDelay:ge=0,leaveTouchDelay:ce=1500,onClose:Ie,onOpen:Ce,open:re,placement:ue="bottom",PopperComponent:me,PopperProps:ye={},slotProps:ke={},slots:xe={},title:Ue,TransitionComponent:tt=r6,TransitionProps:we}=F,Le=it(F,D$),Ne=S.isValidElement(P)?P:i("span",{children:P}),Ve=na(),_e=$8(),[qe,wt]=S.useState(),[he,Se]=S.useState(null),Ae=S.useRef(!1),Me=T||J,ze=is(),Oe=is(),Re=is(),rt=is(),[We,Ke]=U3({controlled:re,default:!1,name:"Tooltip",state:"open"});let Ye=We;const zt=Tn(ee),It=S.useRef(),De=Pn(()=>{It.current!==void 0&&(document.body.style.WebkitUserSelect=It.current,It.current=void 0),rt.clear()});S.useEffect(()=>De,[De]);const Ct=Yt=>{YC.clear(),l6=!0,Ke(!0),Ce&&!Ye&&Ce(Yt)},lt=Pn(Yt=>{YC.start(800+ge,()=>{l6=!1}),Ke(!1),Ie&&Ye&&Ie(Yt),ze.start(Ve.transitions.duration.shortest,()=>{Ae.current=!1})}),St=Yt=>{Ae.current&&Yt.type!=="touchstart"||(qe&&qe.removeAttribute("title"),Oe.clear(),Re.clear(),D||l6&&H?Oe.start(l6?H:D,()=>{Ct(Yt)}):Ct(Yt))},Xt=Yt=>{Oe.clear(),Re.start(ge,()=>{lt(Yt)})},{isFocusVisibleRef:qt,onBlur:S1,onFocus:F1,ref:g1}=zm(),[,f1]=S.useState(!1),V1=Yt=>{S1(Yt),qt.current===!1&&(f1(!1),Xt(Yt))},sn=Yt=>{qe||wt(Yt.currentTarget),F1(Yt),qt.current===!0&&(f1(!0),St(Yt))},fn=Yt=>{Ae.current=!0;const B1=Ne.props;B1.onTouchStart&&B1.onTouchStart(Yt)},nr=Yt=>{fn(Yt),Re.clear(),ze.clear(),De(),It.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",rt.start(Z,()=>{document.body.style.WebkitUserSelect=It.current,St(Yt)})},cn=Yt=>{Ne.props.onTouchEnd&&Ne.props.onTouchEnd(Yt),De(),Re.start(ce,()=>{lt(Yt)})};S.useEffect(()=>{if(!Ye)return;function Yt(B1){(B1.key==="Escape"||B1.key==="Esc")&&lt(B1)}return document.addEventListener("keydown",Yt),()=>{document.removeEventListener("keydown",Yt)}},[lt,Ye]);const In=wn(K3(Ne),g1,wt,n);!Ue&&Ue!==0&&(Ye=!1);const At=S.useRef(),Jt=Yt=>{const B1=Ne.props;B1.onMouseMove&&B1.onMouseMove(Yt),y4={x:Yt.clientX,y:Yt.clientY},At.current&&At.current.update()},tn={},i1=typeof Ue=="string";G?(tn.title=!Ye&&i1&&!Q?Ue:null,tn["aria-describedby"]=Ye?zt:null):(tn["aria-label"]=i1?Ue:null,tn["aria-labelledby"]=Ye&&!i1?zt:null);const Gn=L({},tn,Le,Ne.props,{className:yt(Le.className,Ne.props.className),onTouchStart:fn,ref:In},J?{onMouseMove:Jt}:{}),br={};W||(Gn.onTouchStart=nr,Gn.onTouchEnd=cn),Q||(Gn.onMouseOver=s6(St,Gn.onMouseOver),Gn.onMouseLeave=s6(Xt,Gn.onMouseLeave),Me||(br.onMouseOver=St,br.onMouseLeave=Xt)),q||(Gn.onFocus=s6(sn,Gn.onFocus),Gn.onBlur=s6(V1,Gn.onBlur),Me||(br.onFocus=sn,br.onBlur=V1));const Zr=S.useMemo(()=>{var Yt;let B1=[{name:"arrow",enabled:Boolean(he),options:{element:he,padding:4}}];return(Yt=ye.popperOptions)!=null&&Yt.modifiers&&(B1=B1.concat(ye.popperOptions.modifiers)),L({},ye.popperOptions,{modifiers:B1})},[he,ye]),Nn=L({},F,{isRtl:_e,arrow:R,disableInteractive:Me,placement:ue,PopperComponentProp:me,touch:Ae.current}),Nr=H$(Nn),zr=(r=(o=xe.popper)!=null?o:O.Popper)!=null?r:N$,Dn=(a=(s=(u=xe.transition)!=null?u:O.Transition)!=null?s:tt)!=null?a:r6,En=(h=(g=xe.tooltip)!=null?g:O.Tooltip)!=null?h:Q$,ft=(d=(f=xe.arrow)!=null?f:O.Arrow)!=null?d:W$,Je=ls(zr,L({},ye,(p=ke.popper)!=null?p:N.popper,{className:yt(Nr.popper,ye==null?void 0:ye.className,(C=(v=ke.popper)!=null?v:N.popper)==null?void 0:C.className)}),Nn),Rt=ls(Dn,L({},we,(y=ke.transition)!=null?y:N.transition),Nn),Ut=ls(En,L({},(E=ke.tooltip)!=null?E:N.tooltip,{className:yt(Nr.tooltip,(w=(x=ke.tooltip)!=null?x:N.tooltip)==null?void 0:w.className)}),Nn),C1=ls(ft,L({},(I=ke.arrow)!=null?I:N.arrow,{className:yt(Nr.arrow,(A=(V=ke.arrow)!=null?V:N.arrow)==null?void 0:A.className)}),Nn);return _(S.Fragment,{children:[S.cloneElement(Ne,Gn),i(zr,L({as:me!=null?me:_3,placement:ue,anchorEl:J?{getBoundingClientRect:()=>({top:y4.y,left:y4.x,right:y4.x,bottom:y4.y,width:0,height:0})}:qe,popperRef:At,open:qe?Ye:!1,id:zt,transition:!0},br,Je,{popperOptions:Zr,children:({TransitionProps:Yt})=>i(Dn,L({timeout:Ve.transitions.duration.shorter},Yt,Rt,{children:_(En,L({},Ut,{children:[Ue,R?i(ft,L({},C1,{ref:Se})):null]}))}))}))]})});function j$(e){return b1("MuiSwitch",e)}var so=p1("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]);const U$=["className","color","edge","size","sx"],G$=e=>{const{classes:t,edge:n,size:r,color:o,checked:a,disabled:s}=e,u={root:["root",n&&`edge${vt(n)}`,`size${vt(r)}`],switchBase:["switchBase",`color${vt(o)}`,a&&"checked",s&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},h=Tt(u,j$,t);return L({},t,h)},K$=ht("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t[`edge${vt(n.edge)}`],t[`size${vt(n.size)}`]]}})({display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${so.thumb}`]:{width:16,height:16},[`& .${so.switchBase}`]:{padding:4,[`&.${so.checked}`]:{transform:"translateX(16px)"}}}}]}),Y$=ht(tC,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{[`& .${so.input}`]:t.input},n.color!=="default"&&t[`color${vt(n.color)}`]]}})(({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:e.vars?e.vars.palette.Switch.defaultColor:`${e.palette.mode==="light"?e.palette.common.white:e.palette.grey[300]}`,transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${so.checked}`]:{transform:"translateX(20px)"},[`&.${so.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${so.checked} + .${so.track}`]:{opacity:.5},[`&.${so.disabled} + .${so.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${e.palette.mode==="light"?.12:.2}`},[`& .${so.input}`]:{left:"-100%",width:"300%"}}),({theme:e})=>({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:_1(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(e.palette).filter(([,t])=>t.main&&t.light).map(([t])=>({props:{color:t},style:{[`&.${so.checked}`]:{color:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:_1(e.palette[t].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${so.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t}DisabledColor`]:`${e.palette.mode==="light"?r4(e.palette[t].main,.62):n4(e.palette[t].main,.55)}`}},[`&.${so.checked} + .${so.track}`]:{backgroundColor:(e.vars||e).palette[t].main}}}))]})),q$=ht("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:e.vars?e.vars.palette.common.onBackground:`${e.palette.mode==="light"?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:`${e.palette.mode==="light"?.38:.3}`})),J$=ht("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}));var Z$=S.forwardRef(function(t,n){const r=E1({props:t,name:"MuiSwitch"}),{className:o,color:a="primary",edge:s=!1,size:u="medium",sx:h}=r,g=it(r,U$),d=L({},r,{color:a,edge:s,size:u}),f=G$(d),p=i(J$,{className:f.thumb,ownerState:d});return _(K$,{className:yt(f.root,o),sx:h,ownerState:d,children:[i(Y$,L({type:"checkbox",icon:p,checkedIcon:p,ref:n,ownerState:d},g,{classes:L({},f,{root:f.switchBase})})),i(q$,{className:f.track,ownerState:d})]})});function X$(e){return b1("MuiTab",e)}var Ul=p1("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]);const _$=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],$$=e=>{const{classes:t,textColor:n,fullWidth:r,wrapped:o,icon:a,label:s,selected:u,disabled:h}=e,g={root:["root",a&&s&&"labelIcon",`textColor${vt(n)}`,r&&"fullWidth",o&&"wrapped",u&&"selected",h&&"disabled"],iconWrapper:["iconWrapper"]};return Tt(g,X$,t)},eee=ht(Xa,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${vt(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${Ul.iconWrapper}`]:t.iconWrapper}]}})(({theme:e,ownerState:t})=>L({},e.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},t.label&&{flexDirection:t.iconPosition==="top"||t.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},t.icon&&t.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${Ul.iconWrapper}`]:L({},t.iconPosition==="top"&&{marginBottom:6},t.iconPosition==="bottom"&&{marginTop:6},t.iconPosition==="start"&&{marginRight:e.spacing(1)},t.iconPosition==="end"&&{marginLeft:e.spacing(1)})},t.textColor==="inherit"&&{color:"inherit",opacity:.6,[`&.${Ul.selected}`]:{opacity:1},[`&.${Ul.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.textColor==="primary"&&{color:(e.vars||e).palette.text.secondary,[`&.${Ul.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${Ul.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.textColor==="secondary"&&{color:(e.vars||e).palette.text.secondary,[`&.${Ul.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${Ul.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},t.wrapped&&{fontSize:e.typography.pxToRem(12)}));var qC=S.forwardRef(function(t,n){const r=E1({props:t,name:"MuiTab"}),{className:o,disabled:a=!1,disableFocusRipple:s=!1,fullWidth:u,icon:h,iconPosition:g="top",indicator:d,label:f,onChange:p,onClick:C,onFocus:v,selected:y,selectionFollowsFocus:E,textColor:w="inherit",value:x,wrapped:I=!1}=r,A=it(r,_$),V=L({},r,{disabled:a,disableFocusRipple:s,selected:y,icon:!!h,iconPosition:g,label:!!f,fullWidth:u,textColor:w,wrapped:I}),F=$$(V),R=h&&f&&S.isValidElement(h)?S.cloneElement(h,{className:yt(F.iconWrapper,h.props.className)}):h,P=N=>{!y&&p&&p(N,x),C&&C(N)},O=N=>{E&&!y&&p&&p(N,x),v&&v(N)};return _(eee,L({focusRipple:!s,className:yt(F.root,o),ref:n,role:"tab","aria-selected":y,disabled:a,onClick:P,onFocus:O,ownerState:V,tabIndex:y?0:-1},A,{children:[g==="top"||g==="start"?_(S.Fragment,{children:[R,f]}):_(S.Fragment,{children:[f,R]}),d]}))}),tee=S.createContext(),nee=S.createContext();function ree(e){return b1("MuiTableCell",e)}var oee=p1("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]);const iee=["align","className","component","padding","scope","size","sortDirection","variant"],aee=e=>{const{classes:t,variant:n,align:r,padding:o,size:a,stickyHeader:s}=e,u={root:["root",n,s&&"stickyHeader",r!=="inherit"&&`align${vt(r)}`,o!=="normal"&&`padding${vt(o)}`,`size${vt(a)}`]};return Tt(u,ree,t)},lee=ht("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${vt(n.size)}`],n.padding!=="normal"&&t[`padding${vt(n.padding)}`],n.align!=="inherit"&&t[`align${vt(n.align)}`],n.stickyHeader&&t.stickyHeader]}})(({theme:e,ownerState:t})=>L({},e.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:e.vars?`1px solid ${e.vars.palette.TableCell.border}`:`1px solid
1404
- ${e.palette.mode==="light"?r4(_1(e.palette.divider,1),.88):n4(_1(e.palette.divider,1),.68)}`,textAlign:"left",padding:16},t.variant==="head"&&{color:(e.vars||e).palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium},t.variant==="body"&&{color:(e.vars||e).palette.text.primary},t.variant==="footer"&&{color:(e.vars||e).palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)},t.size==="small"&&{padding:"6px 16px",[`&.${oee.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}},t.padding==="checkbox"&&{width:48,padding:"0 0 0 4px"},t.padding==="none"&&{padding:0},t.align==="left"&&{textAlign:"left"},t.align==="center"&&{textAlign:"center"},t.align==="right"&&{textAlign:"right",flexDirection:"row-reverse"},t.align==="justify"&&{textAlign:"justify"},t.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:(e.vars||e).palette.background.default}));var Gu=S.forwardRef(function(t,n){const r=E1({props:t,name:"MuiTableCell"}),{align:o="inherit",className:a,component:s,padding:u,scope:h,size:g,sortDirection:d,variant:f}=r,p=it(r,iee),C=S.useContext(tee),v=S.useContext(nee),y=v&&v.variant==="head";let E;s?E=s:E=y?"th":"td";let w=h;E==="td"?w=void 0:!w&&y&&(w="col");const x=f||v&&v.variant,I=L({},r,{align:o,component:E,padding:u||(C&&C.padding?C.padding:"normal"),size:g||(C&&C.size?C.size:"medium"),sortDirection:d,stickyHeader:x==="head"&&C&&C.stickyHeader,variant:x}),A=aee(I);let V=null;return d&&(V=d==="asc"?"ascending":"descending"),i(lee,L({as:E,ref:n,className:yt(A.root,a),"aria-sort":V,scope:w,ownerState:I},p))});function see(e){return b1("MuiToolbar",e)}p1("MuiToolbar",["root","gutters","regular","dense"]);const cee=["className","component","disableGutters","variant"],uee=e=>{const{classes:t,disableGutters:n,variant:r}=e;return Tt({root:["root",!n&&"gutters",r]},see,t)},dee=ht("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(({theme:e,ownerState:t})=>L({position:"relative",display:"flex",alignItems:"center"},!t.disableGutters&&{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}},t.variant==="dense"&&{minHeight:48}),({theme:e,ownerState:t})=>t.variant==="regular"&&e.mixins.toolbar);var hee=S.forwardRef(function(t,n){const r=E1({props:t,name:"MuiToolbar"}),{className:o,component:a="div",disableGutters:s=!1,variant:u="regular"}=r,h=it(r,cee),g=L({},r,{component:a,disableGutters:s,variant:u}),d=uee(g);return i(dee,L({as:a,className:yt(d.root,o),ref:n,ownerState:g},h))}),JC=v1(i("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),ZC=v1(i("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");const fee=["backIconButtonProps","count","disabled","getItemAriaLabel","nextIconButtonProps","onPageChange","page","rowsPerPage","showFirstButton","showLastButton","slots","slotProps"];var pee=S.forwardRef(function(t,n){var r,o,a,s,u,h,g,d;const{backIconButtonProps:f,count:p,disabled:C=!1,getItemAriaLabel:v,nextIconButtonProps:y,onPageChange:E,page:w,rowsPerPage:x,showFirstButton:I,showLastButton:A,slots:V={},slotProps:F={}}=t,R=it(t,fee),P=$8(),O=ke=>{E(ke,0)},N=ke=>{E(ke,w-1)},G=ke=>{E(ke,w+1)},q=ke=>{E(ke,Math.max(0,Math.ceil(p/x)-1))},Q=(r=V.firstButton)!=null?r:Kr,T=(o=V.lastButton)!=null?o:Kr,W=(a=V.nextButton)!=null?a:Kr,D=(s=V.previousButton)!=null?s:Kr,H=(u=V.firstButtonIcon)!=null?u:f$,Z=(h=V.lastButtonIcon)!=null?h:p$,J=(g=V.nextButtonIcon)!=null?g:ZC,ee=(d=V.previousButtonIcon)!=null?d:JC,ge=P?T:Q,ce=P?W:D,Ie=P?D:W,Ce=P?Q:T,re=P?F.lastButton:F.firstButton,ue=P?F.nextButton:F.previousButton,me=P?F.previousButton:F.nextButton,ye=P?F.firstButton:F.lastButton;return _("div",L({ref:n},R,{children:[I&&i(ge,L({onClick:O,disabled:C||w===0,"aria-label":v("first",w),title:v("first",w)},re,{children:P?i(Z,L({},F.lastButtonIcon)):i(H,L({},F.firstButtonIcon))})),i(ce,L({onClick:N,disabled:C||w===0,color:"inherit","aria-label":v("previous",w),title:v("previous",w)},ue!=null?ue:f,{children:P?i(J,L({},F.nextButtonIcon)):i(ee,L({},F.previousButtonIcon))})),i(Ie,L({onClick:G,disabled:C||(p!==-1?w>=Math.ceil(p/x)-1:!1),color:"inherit","aria-label":v("next",w),title:v("next",w)},me!=null?me:y,{children:P?i(ee,L({},F.previousButtonIcon)):i(J,L({},F.nextButtonIcon))})),A&&i(Ce,L({onClick:q,disabled:C||w>=Math.ceil(p/x)-1,"aria-label":v("last",w),title:v("last",w)},ye,{children:P?i(H,L({},F.firstButtonIcon)):i(Z,L({},F.lastButtonIcon))}))]}))});function gee(e){return b1("MuiTablePagination",e)}var t0=p1("MuiTablePagination",["root","toolbar","spacer","selectLabel","selectRoot","select","selectIcon","input","menuItem","displayedRows","actions"]),XC;const mee=["ActionsComponent","backIconButtonProps","className","colSpan","component","count","disabled","getItemAriaLabel","labelDisplayedRows","labelRowsPerPage","nextIconButtonProps","onPageChange","onRowsPerPageChange","page","rowsPerPage","rowsPerPageOptions","SelectProps","showFirstButton","showLastButton","slotProps","slots"],vee=ht(Gu,{name:"MuiTablePagination",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({overflow:"auto",color:(e.vars||e).palette.text.primary,fontSize:e.typography.pxToRem(14),"&:last-child":{padding:0}})),Cee=ht(hee,{name:"MuiTablePagination",slot:"Toolbar",overridesResolver:(e,t)=>L({[`& .${t0.actions}`]:t.actions},t.toolbar)})(({theme:e})=>({minHeight:52,paddingRight:2,[`${e.breakpoints.up("xs")} and (orientation: landscape)`]:{minHeight:52},[e.breakpoints.up("sm")]:{minHeight:52,paddingRight:2},[`& .${t0.actions}`]:{flexShrink:0,marginLeft:20}})),bee=ht("div",{name:"MuiTablePagination",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})({flex:"1 1 100%"}),yee=ht("p",{name:"MuiTablePagination",slot:"SelectLabel",overridesResolver:(e,t)=>t.selectLabel})(({theme:e})=>L({},e.typography.body2,{flexShrink:0})),wee=ht(Uu,{name:"MuiTablePagination",slot:"Select",overridesResolver:(e,t)=>L({[`& .${t0.selectIcon}`]:t.selectIcon,[`& .${t0.select}`]:t.select},t.input,t.selectRoot)})({color:"inherit",fontSize:"inherit",flexShrink:0,marginRight:32,marginLeft:8,[`& .${t0.select}`]:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"}}),Iee=ht(sa,{name:"MuiTablePagination",slot:"MenuItem",overridesResolver:(e,t)=>t.menuItem})({}),Eee=ht("p",{name:"MuiTablePagination",slot:"DisplayedRows",overridesResolver:(e,t)=>t.displayedRows})(({theme:e})=>L({},e.typography.body2,{flexShrink:0}));function See({from:e,to:t,count:n}){return`${e}\u2013${t} of ${n!==-1?n:`more than ${t}`}`}function Aee(e){return`Go to ${e} page`}const xee=e=>{const{classes:t}=e;return Tt({root:["root"],toolbar:["toolbar"],spacer:["spacer"],selectLabel:["selectLabel"],select:["select"],input:["input"],selectIcon:["selectIcon"],menuItem:["menuItem"],displayedRows:["displayedRows"],actions:["actions"]},gee,t)};var Fee=S.forwardRef(function(t,n){var r;const o=E1({props:t,name:"MuiTablePagination"}),{ActionsComponent:a=pee,backIconButtonProps:s,className:u,colSpan:h,component:g=Gu,count:d,disabled:f=!1,getItemAriaLabel:p=Aee,labelDisplayedRows:C=See,labelRowsPerPage:v="Rows per page:",nextIconButtonProps:y,onPageChange:E,onRowsPerPageChange:w,page:x,rowsPerPage:I,rowsPerPageOptions:A=[10,25,50,100],SelectProps:V={},showFirstButton:F=!1,showLastButton:R=!1,slotProps:P={},slots:O={}}=o,N=it(o,mee),G=o,q=xee(G),Q=(r=P==null?void 0:P.select)!=null?r:V,T=Q.native?"option":Iee;let W;(g===Gu||g==="td")&&(W=h||1e3);const D=Tn(Q.id),H=Tn(Q.labelId),Z=()=>d===-1?(x+1)*I:I===-1?d:Math.min(d,(x+1)*I);return i(vee,L({colSpan:W,ref:n,as:g,ownerState:G,className:yt(q.root,u)},N,{children:_(Cee,{className:q.toolbar,children:[i(bee,{className:q.spacer}),A.length>1&&i(yee,{className:q.selectLabel,id:H,children:v}),A.length>1&&i(wee,L({variant:"standard"},!Q.variant&&{input:XC||(XC=i(ms,{}))},{value:I,onChange:w,id:D,labelId:H},Q,{classes:L({},Q.classes,{root:yt(q.input,q.selectRoot,(Q.classes||{}).root),select:yt(q.select,(Q.classes||{}).select),icon:yt(q.selectIcon,(Q.classes||{}).icon)}),disabled:f,children:A.map(J=>Ze.createElement(T,L({},!G3(T)&&{ownerState:G},{className:q.menuItem,key:J.label?J.label:J,value:J.value?J.value:J}),J.label?J.label:J))})),i(Eee,{className:q.displayedRows,children:C({from:d===0?0:x*I+1,to:Z(),count:d===-1?-1:d,page:x})}),i(a,{className:q.actions,backIconButtonProps:s,count:d,nextIconButtonProps:y,onPageChange:E,page:x,rowsPerPage:I,showFirstButton:F,showLastButton:R,slotProps:P.actions,slots:O.actions,getItemAriaLabel:p,disabled:f})]})}))});function Mee(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function zee(e,t,n,r={},o=()=>{}){const{ease:a=Mee,duration:s=300}=r;let u=null;const h=t[e];let g=!1;const d=()=>{g=!0},f=p=>{if(g){o(new Error("Animation cancelled"));return}u===null&&(u=p);const C=Math.min(1,(p-u)/s);if(t[e]=a(C)*(n-h)+h,C>=1){requestAnimationFrame(()=>{o(null)});return}requestAnimationFrame(f)};return h===n?(o(new Error("Element already at target position")),d):(requestAnimationFrame(f),d)}const kee=["onChange"],Pee={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function Oee(e){const{onChange:t}=e,n=it(e,kee),r=S.useRef(),o=S.useRef(null),a=()=>{r.current=o.current.offsetHeight-o.current.clientHeight};return xn(()=>{const s=os(()=>{const h=r.current;a(),h!==r.current&&t(r.current)}),u=ta(o.current);return u.addEventListener("resize",s),()=>{s.clear(),u.removeEventListener("resize",s)}},[t]),S.useEffect(()=>{a(),t(r.current)},[t]),i("div",L({style:Pee},n,{ref:o}))}function Bee(e){return b1("MuiTabScrollButton",e)}var Lee=p1("MuiTabScrollButton",["root","vertical","horizontal","disabled"]);const Tee=["className","slots","slotProps","direction","orientation","disabled"],Ree=e=>{const{classes:t,orientation:n,disabled:r}=e;return Tt({root:["root",n,r&&"disabled"]},Bee,t)},Dee=ht(Xa,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})(({ownerState:e})=>L({width:40,flexShrink:0,opacity:.8,[`&.${Lee.disabled}`]:{opacity:0}},e.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${e.isRtl?-90:90}deg)`}}));var Vee=S.forwardRef(function(t,n){var r,o;const a=E1({props:t,name:"MuiTabScrollButton"}),{className:s,slots:u={},slotProps:h={},direction:g}=a,d=it(a,Tee),f=$8(),p=L({isRtl:f},a),C=Ree(p),v=(r=u.StartScrollButtonIcon)!=null?r:JC,y=(o=u.EndScrollButtonIcon)!=null?o:ZC,E=m2({elementType:v,externalSlotProps:h.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:p}),w=m2({elementType:y,externalSlotProps:h.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:p});return i(Dee,L({component:"div",className:yt(C.root,s),ref:n,role:null,ownerState:p,tabIndex:null},d,{children:g==="left"?i(v,L({},E)):i(y,L({},w))}))});function Hee(e){return b1("MuiTabs",e)}var Ku=p1("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]);const Nee=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],_C=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,$C=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,c6=(e,t,n)=>{let r=!1,o=n(e,t);for(;o;){if(o===e.firstChild){if(r)return;r=!0}const a=o.disabled||o.getAttribute("aria-disabled")==="true";if(!o.hasAttribute("tabindex")||a)o=n(e,o);else{o.focus();return}}},Qee=e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:o,scrollableY:a,centered:s,scrollButtonsHideMobile:u,classes:h}=e;return Tt({root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",o&&"scrollableX",a&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",s&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",u&&"scrollButtonsHideMobile"],scrollableX:[o&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},Hee,h)},Wee=ht("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Ku.scrollButtons}`]:t.scrollButtons},{[`& .${Ku.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(({ownerState:e,theme:t})=>L({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},e.vertical&&{flexDirection:"column"},e.scrollButtonsHideMobile&&{[`& .${Ku.scrollButtons}`]:{[t.breakpoints.down("sm")]:{display:"none"}}})),jee=ht("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})(({ownerState:e})=>L({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},e.fixed&&{overflowX:"hidden",width:"100%"},e.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},e.scrollableX&&{overflowX:"auto",overflowY:"hidden"},e.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),Uee=ht("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})(({ownerState:e})=>L({display:"flex"},e.vertical&&{flexDirection:"column"},e.centered&&{justifyContent:"center"})),Gee=ht("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(({ownerState:e,theme:t})=>L({position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create()},e.indicatorColor==="primary"&&{backgroundColor:(t.vars||t).palette.primary.main},e.indicatorColor==="secondary"&&{backgroundColor:(t.vars||t).palette.secondary.main},e.vertical&&{height:"100%",width:2,right:0})),Kee=ht(Oee)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),eb={};var Yee=S.forwardRef(function(t,n){const r=E1({props:t,name:"MuiTabs"}),o=na(),a=$8(),{"aria-label":s,"aria-labelledby":u,action:h,centered:g=!1,children:d,className:f,component:p="div",allowScrollButtonsMobile:C=!1,indicatorColor:v="primary",onChange:y,orientation:E="horizontal",ScrollButtonComponent:w=Vee,scrollButtons:x="auto",selectionFollowsFocus:I,slots:A={},slotProps:V={},TabIndicatorProps:F={},TabScrollButtonProps:R={},textColor:P="primary",value:O,variant:N="standard",visibleScrollbar:G=!1}=r,q=it(r,Nee),Q=N==="scrollable",T=E==="vertical",W=T?"scrollTop":"scrollLeft",D=T?"top":"left",H=T?"bottom":"right",Z=T?"clientHeight":"clientWidth",J=T?"height":"width",ee=L({},r,{component:p,allowScrollButtonsMobile:C,indicatorColor:v,orientation:E,vertical:T,scrollButtons:x,textColor:P,variant:N,visibleScrollbar:G,fixed:!Q,hideScrollbar:Q&&!G,scrollableX:Q&&!T,scrollableY:Q&&T,centered:g&&!Q,scrollButtonsHideMobile:!C}),ge=Qee(ee),ce=m2({elementType:A.StartScrollButtonIcon,externalSlotProps:V.startScrollButtonIcon,ownerState:ee}),Ie=m2({elementType:A.EndScrollButtonIcon,externalSlotProps:V.endScrollButtonIcon,ownerState:ee}),[Ce,re]=S.useState(!1),[ue,me]=S.useState(eb),[ye,ke]=S.useState(!1),[xe,Ue]=S.useState(!1),[tt,we]=S.useState(!1),[Le,Ne]=S.useState({overflow:"hidden",scrollbarWidth:0}),Ve=new Map,_e=S.useRef(null),qe=S.useRef(null),wt=()=>{const lt=_e.current;let St;if(lt){const qt=lt.getBoundingClientRect();St={clientWidth:lt.clientWidth,scrollLeft:lt.scrollLeft,scrollTop:lt.scrollTop,scrollLeftNormalized:KU(lt,a?"rtl":"ltr"),scrollWidth:lt.scrollWidth,top:qt.top,bottom:qt.bottom,left:qt.left,right:qt.right}}let Xt;if(lt&&O!==!1){const qt=qe.current.children;if(qt.length>0){const S1=qt[Ve.get(O)];Xt=S1?S1.getBoundingClientRect():null}}return{tabsMeta:St,tabMeta:Xt}},he=Pn(()=>{const{tabsMeta:lt,tabMeta:St}=wt();let Xt=0,qt;if(T)qt="top",St&&lt&&(Xt=St.top-lt.top+lt.scrollTop);else if(qt=a?"right":"left",St&&lt){const F1=a?lt.scrollLeftNormalized+lt.clientWidth-lt.scrollWidth:lt.scrollLeft;Xt=(a?-1:1)*(St[qt]-lt[qt]+F1)}const S1={[qt]:Xt,[J]:St?St[J]:0};if(isNaN(ue[qt])||isNaN(ue[J]))me(S1);else{const F1=Math.abs(ue[qt]-S1[qt]),g1=Math.abs(ue[J]-S1[J]);(F1>=1||g1>=1)&&me(S1)}}),Se=(lt,{animation:St=!0}={})=>{St?zee(W,_e.current,lt,{duration:o.transitions.duration.standard}):_e.current[W]=lt},Ae=lt=>{let St=_e.current[W];T?St+=lt:(St+=lt*(a?-1:1),St*=a&&Pm()==="reverse"?-1:1),Se(St)},Me=()=>{const lt=_e.current[Z];let St=0;const Xt=Array.from(qe.current.children);for(let qt=0;qt<Xt.length;qt+=1){const S1=Xt[qt];if(St+S1[Z]>lt){qt===0&&(St=lt);break}St+=S1[Z]}return St},ze=()=>{Ae(-1*Me())},Oe=()=>{Ae(Me())},Re=S.useCallback(lt=>{Ne({overflow:null,scrollbarWidth:lt})},[]),rt=()=>{const lt={};lt.scrollbarSizeListener=Q?i(Kee,{onChange:Re,className:yt(ge.scrollableX,ge.hideScrollbar)}):null;const Xt=Q&&(x==="auto"&&(ye||xe)||x===!0);return lt.scrollButtonStart=Xt?i(w,L({slots:{StartScrollButtonIcon:A.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:ce},orientation:E,direction:a?"right":"left",onClick:ze,disabled:!ye},R,{className:yt(ge.scrollButtons,R.className)})):null,lt.scrollButtonEnd=Xt?i(w,L({slots:{EndScrollButtonIcon:A.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:Ie},orientation:E,direction:a?"left":"right",onClick:Oe,disabled:!xe},R,{className:yt(ge.scrollButtons,R.className)})):null,lt},We=Pn(lt=>{const{tabsMeta:St,tabMeta:Xt}=wt();if(!(!Xt||!St)){if(Xt[D]<St[D]){const qt=St[W]+(Xt[D]-St[D]);Se(qt,{animation:lt})}else if(Xt[H]>St[H]){const qt=St[W]+(Xt[H]-St[H]);Se(qt,{animation:lt})}}}),Ke=Pn(()=>{Q&&x!==!1&&we(!tt)});S.useEffect(()=>{const lt=os(()=>{_e.current&&he()});let St;const Xt=F1=>{F1.forEach(g1=>{g1.removedNodes.forEach(f1=>{var V1;(V1=St)==null||V1.unobserve(f1)}),g1.addedNodes.forEach(f1=>{var V1;(V1=St)==null||V1.observe(f1)})}),lt(),Ke()},qt=ta(_e.current);qt.addEventListener("resize",lt);let S1;return typeof ResizeObserver!="undefined"&&(St=new ResizeObserver(lt),Array.from(qe.current.children).forEach(F1=>{St.observe(F1)})),typeof MutationObserver!="undefined"&&(S1=new MutationObserver(Xt),S1.observe(qe.current,{childList:!0})),()=>{var F1,g1;lt.clear(),qt.removeEventListener("resize",lt),(F1=S1)==null||F1.disconnect(),(g1=St)==null||g1.disconnect()}},[he,Ke]),S.useEffect(()=>{const lt=Array.from(qe.current.children),St=lt.length;if(typeof IntersectionObserver!="undefined"&&St>0&&Q&&x!==!1){const Xt=lt[0],qt=lt[St-1],S1={root:_e.current,threshold:.99},F1=sn=>{ke(!sn[0].isIntersecting)},g1=new IntersectionObserver(F1,S1);g1.observe(Xt);const f1=sn=>{Ue(!sn[0].isIntersecting)},V1=new IntersectionObserver(f1,S1);return V1.observe(qt),()=>{g1.disconnect(),V1.disconnect()}}},[Q,x,tt,d==null?void 0:d.length]),S.useEffect(()=>{re(!0)},[]),S.useEffect(()=>{he()}),S.useEffect(()=>{We(eb!==ue)},[We,ue]),S.useImperativeHandle(h,()=>({updateIndicator:he,updateScrollButtons:Ke}),[he,Ke]);const Ye=i(Gee,L({},F,{className:yt(ge.indicator,F.className),ownerState:ee,style:L({},ue,F.style)}));let zt=0;const It=S.Children.map(d,lt=>{if(!S.isValidElement(lt))return null;const St=lt.props.value===void 0?zt:lt.props.value;Ve.set(St,zt);const Xt=St===O;return zt+=1,S.cloneElement(lt,L({fullWidth:N==="fullWidth",indicator:Xt&&!Ce&&Ye,selected:Xt,selectionFollowsFocus:I,onChange:y,textColor:P,value:St},zt===1&&O===!1&&!lt.props.tabIndex?{tabIndex:0}:{}))}),De=lt=>{const St=qe.current,Xt=Zn(St).activeElement;if(Xt.getAttribute("role")!=="tab")return;let S1=E==="horizontal"?"ArrowLeft":"ArrowUp",F1=E==="horizontal"?"ArrowRight":"ArrowDown";switch(E==="horizontal"&&a&&(S1="ArrowRight",F1="ArrowLeft"),lt.key){case S1:lt.preventDefault(),c6(St,Xt,$C);break;case F1:lt.preventDefault(),c6(St,Xt,_C);break;case"Home":lt.preventDefault(),c6(St,null,_C);break;case"End":lt.preventDefault(),c6(St,null,$C);break}},Ct=rt();return _(Wee,L({className:yt(ge.root,f),ownerState:ee,ref:n,as:p},q,{children:[Ct.scrollButtonStart,Ct.scrollbarSizeListener,_(jee,{className:ge.scroller,ownerState:ee,style:{overflow:Le.overflow,[T?`margin${a?"Left":"Right"}`:"marginBottom"]:G?void 0:-Le.scrollbarWidth},ref:_e,children:[i(Uee,{"aria-label":s,"aria-labelledby":u,"aria-orientation":E==="vertical"?"vertical":null,className:ge.flexContainer,ownerState:ee,onKeyDown:De,ref:qe,role:"tablist",children:It}),Ce&&Ye]}),Ct.scrollButtonEnd]}))});function qee(e){return b1("MuiTextField",e)}p1("MuiTextField",["root"]);const Jee=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],Zee={standard:IC,filled:gC,outlined:HC},Xee=e=>{const{classes:t}=e;return Tt({root:["root"]},qee,t)},_ee=ht(mC,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({});var $ee=S.forwardRef(function(t,n){const r=E1({props:t,name:"MuiTextField"}),{autoComplete:o,autoFocus:a=!1,children:s,className:u,color:h="primary",defaultValue:g,disabled:d=!1,error:f=!1,FormHelperTextProps:p,fullWidth:C=!1,helperText:v,id:y,InputLabelProps:E,inputProps:w,InputProps:x,inputRef:I,label:A,maxRows:V,minRows:F,multiline:R=!1,name:P,onBlur:O,onChange:N,onFocus:G,placeholder:q,required:Q=!1,rows:T,select:W=!1,SelectProps:D,type:H,value:Z,variant:J="outlined"}=r,ee=it(r,Jee),ge=L({},r,{autoFocus:a,color:h,disabled:d,error:f,fullWidth:C,multiline:R,required:Q,select:W,variant:J}),ce=Xee(ge),Ie={};J==="outlined"&&(E&&typeof E.shrink!="undefined"&&(Ie.notched=E.shrink),Ie.label=A),W&&((!D||!D.native)&&(Ie.id=void 0),Ie["aria-describedby"]=void 0);const Ce=Tn(y),re=v&&Ce?`${Ce}-helper-text`:void 0,ue=A&&Ce?`${Ce}-label`:void 0,me=Zee[J],ye=i(me,L({"aria-describedby":re,autoComplete:o,autoFocus:a,defaultValue:g,fullWidth:C,multiline:R,name:P,rows:T,maxRows:V,minRows:F,type:H,value:Z,id:Ce,inputRef:I,onBlur:O,onChange:N,onFocus:G,placeholder:q,inputProps:w},Ie,x));return _(_ee,L({className:yt(ce.root,u),disabled:d,error:f,fullWidth:C,ref:n,required:Q,color:h,variant:J,ownerState:ge},ee,{children:[A!=null&&A!==""&&i(AC,L({htmlFor:Ce,id:ue},E,{children:A})),W?i(Uu,L({"aria-describedby":re,id:Ce,labelId:ue,value:Z,input:ye},D,{children:s})):ye,v&&i(TX,L({id:re},p,{children:v}))]}))});function I4({status:e,message:t}){const n=[W3,Rl,"MATCH","NOT_VERIFY",Tl,Dl,"0",400,401,404,0,429,500],r=["ACCEPT","Success","FACER_OK",200];return _(Xi,{children:[n.includes(e)&&i(_Q,{message:t||"Error obteniendo el Token"}),r.includes(e)&&i(Fg,{message:t})]})}const E4=e=>e!==Tl&&e!==W3&&e!==Rl&&e!==Dl&&e!=="";var ete=v1(i("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"}),"ArrowBack"),u6=v1([i("path",{d:"M16 7h-1l-1-1h-4L9 7H8c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V9c0-1.1-.9-2-2-2m-4 7c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2"},"0"),i("path",{d:"m8.57.51 4.48 4.48V2.04c4.72.47 8.48 4.23 8.95 8.95h2C23.34 3.02 15.49-1.59 8.57.51m2.38 21.45c-4.72-.47-8.48-4.23-8.95-8.95H0c.66 7.97 8.51 12.58 15.43 10.48l-4.48-4.48z"},"1")],"Cameraswitch"),tb=v1(i("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),Cs=v1(i("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96M14 13v4h-4v-4H7l5-5 5 5z"}),"CloudUpload"),tte=v1(i("path",{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2m-11-4 2.03 2.71L16 11l4 5H8zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6z"}),"Collections"),nte=v1(i("path",{d:"M9.01 14H2v2h7.01v3L13 15l-3.99-4zm5.98-1v-3H22V8h-7.01V5L11 9z"}),"CompareArrows"),rte=v1(i("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}),"ContentCopy"),ote=v1(i("path",{d:"M17 15h2V7c0-1.1-.9-2-2-2H9v2h8zM7 17V1H5v4H1v2h4v10c0 1.1.9 2 2 2h10v4h2v-4h4v-2z"}),"Crop"),d6=v1(i("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete"),nb=v1(i("path",{d:"M20 5h-3.17L15 3H9L7.17 5H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m-8 13c-2.76 0-5-2.24-5-5H5l2.5-2.5L10 13H8c0 2.21 1.79 4 4 4 .58 0 1.13-.13 1.62-.35l.74.74c-.71.37-1.5.61-2.36.61m4.5-2.5L14 13h2c0-2.21-1.79-4-4-4-.58 0-1.13.13-1.62.35l-.74-.73C10.35 8.24 11.14 8 12 8c2.76 0 5 2.24 5 5h2z"}),"FlipCameraIos"),ite=v1(i("path",{d:"m21.9 21.9-8.49-8.49-9.82-9.82L2.1 2.1.69 3.51 3 5.83V19c0 1.1.9 2 2 2h13.17l2.31 2.31zM5 18l3.5-4.5 2.5 3.01L12.17 15l3 3zm16 .17L5.83 3H19c1.1 0 2 .9 2 2z"}),"ImageNotSupported"),rb=v1(i("path",{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5M2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1m18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1M11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1m0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1M5.99 4.58c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41zm12.37 12.37c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0 .39-.39.39-1.03 0-1.41zm1.06-10.96c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0zM7.05 18.36c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0z"}),"LightMode"),h6=v1([i("circle",{cx:"12",cy:"12",r:"3.2"},"0"),i("path",{d:"M9 2 7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5"},"1")],"PhotoCamera"),ob=v1(i("path",{d:"M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 16.01H3V4.99h18zM8 16h2.5l1.5 1.5 1.5-1.5H16v-2.5l1.5-1.5-1.5-1.5V8h-2.5L12 6.5 10.5 8H8v2.5L6.5 12 8 13.5zm4-7c1.66 0 3 1.34 3 3s-1.34 3-3 3z"}),"SettingsBrightness"),ib=v1(i("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14m.5-7H9v2H7v1h2v2h1v-2h2V9h-2z"}),"ZoomInTwoTone");function f6({action:e}){return i(c1,{className:I1["back-button-container"],children:_(Ii,{variant:"outlined",onClick:e,className:I1["back-button"],children:[i(ete,{className:I1.grayscale}),i(Rn,{variant:"body2",children:"Volver atras"})]})})}function ab({mode:e="light",showFilterByButton:t=!0,dataBlackList:n,icon:r,clientId:o,authorize:a,inProduction:s="prd",source:u="component",eventId:h=null,countryCodeAllowed:g=null,validateVpn:d=!1,successMessage:f,alertMessage:p}){const{onSendSubmitDocument:C,simpleHandleSubmit:v,isLoading:y,controlDoc:E,errorsDoc:w,status:x,message:I,listMatch:A,select:V,setSelect:F,clearState:R,countryCode:P}=Sg(o,a,s,u,h,g,d,f,p,n);return _("div",{className:`${I1["kit-gbc"]} ${I1[e]}`,style:{padding:"16px"},children:[i(N3,{className:"kit-gbc-toastify-container",position:"top-center",autoClose:5e3,hideProgressBar:!1,newestOnTop:!1,closeOnClick:!0,rtl:!1,pauseOnFocusLoss:!0,draggable:!0,pauseOnHover:!0}),y||g!==null&&!P?i(L8,{}):null,i("form",{onSubmit:v(C),id:"blacklist",children:_("div",{className:I1.sub,children:[E4(x)&&i(f6,{action:R}),_("div",{className:I1["header-component"],children:[i("h4",{children:"Lista de sanciones y PEPs"}),Rr(x)?i("p",{children:"Ingrese al menos el primer nombre y apellido de la persona a consultar."}):i(I4,{status:x,message:I.message?I.message:I})]}),!Rr(A)&&i(Mg,{lists:A}),Rr(x)&&_(Xi,{children:[i(Y0,{type:"text",name:"first_name",placeholder:"Primer nombre",icon:r&&r,control:E,error:w.first_name}),i(Y0,{type:"text",name:"second_name",label:"Segundo nombre",placeholder:"Segundo nombre",icon:r&&r,control:E,error:w.second_name}),i(Y0,{type:"text",name:"first_last_name",label:"Primer apellido",placeholder:"Primer apellido",icon:r&&r,control:E,error:w.first_last_name}),i(Y0,{type:"text",name:"second_last_name",label:"Segundo apellido",placeholder:"Segundo apellido",icon:r&&r,control:E,error:w.second_last_name}),i(Y0,{type:"date",name:"birth_date",label:"Fecha de nacimiento",placeholder:"Fecha de nacimiento",icon:r&&r,control:E,error:w.birth_date}),i(Y0,{type:"country",name:"country",customLabel:"Pa\xEDs de nacimiento",searchable:!0,searchPlaceholder:"Filtrar por pa\xEDs",onSelect:O=>F(O),selected:V,icon:r&&r,control:E,error:w.country}),i(_n,{type:"submit",children:"Procesar"})]}),x!==Tl&&x!==W3&&x!==Rl&&x!==Dl&&t?i(c1,{width:"100%",mt:2,children:R&&Object.keys(A).length>0&&i(_n,{className:"my-1 col-12",onClick:R,children:"Filtrar por"})}):null]})})]})}ab.propTypes={mode:jt.exports.PropTypes.string,icon:jt.exports.PropTypes.func,clientId:jt.exports.PropTypes.string.isRequired,authorize:jt.exports.PropTypes.func.isRequired,inProduction:jt.exports.PropTypes.string,countryCodeAllowed:jt.exports.PropTypes.array,source:jt.exports.PropTypes.string,eventId:jt.exports.PropTypes.string,validateVpn:jt.exports.PropTypes.bool,successMessage:jt.exports.PropTypes.string,alertMessage:jt.exports.PropTypes.string,dataBlackList:jt.exports.PropTypes.func.isRequired,showFilterByButton:jt.exports.PropTypes.bool};const ate=(e,t,n,r,o,a,s,u,h,g)=>{const[d,f]=Ze.useState({}),[p,C]=Ze.useState(""),[v,y]=Ze.useState(!1),[E,w]=Ze.useState(t===void 0?Rl:n===void 0?W3:""),[x,I]=Ze.useState(null),A=D5(a),[V,F]=Ze.useState(g),R=Ze.useRef(null),[P,O]=Ze.useState(!1),[N,G]=Ze.useState(!1);Ze.useEffect(()=>{s&&(A==null?void 0:A.data_connection.isocode)&&s.length!==0&&!s.some(ee=>ee===(A==null?void 0:A.data_connection.isocode))&&(w(Tl),C(V5)),u&&(A==null?void 0:A.data_connection.proxy)==N5&&(w(Dl),C(H5)),s&&A&&I(A==null?void 0:A.data_connection.isocode)},[A,s]);const q=()=>{F(g),f({}),w(""),C(""),y(!1)},{handleSubmit:Q}=g5(),T=async()=>{var ee,ge,ce,Ie,Ce;y(!0);try{const re=await n(),me={method:"POST",path:"api/v1/onboarding/validate",inProduction:a,customHeaders:{client_id:t,access_token:re},bodyParams:d,service:"services"};try{const ye=await V0(me),ke=ye.data.data,xe=await N2({data:{...ke,status_code:200},component:"ocr",eventId:r,source:o,inProduction:a,clientId:t,geolocation:A});xe&&Object.assign(ke,{checkIp:xe.check_ip}),ke&&await e(ke);const{message:Ue}=ye.data;Ue&&w(Ue),C(h||"Documento verificado con \xE9xito")}catch(ye){console.log(ye,"controller");let ke="";const{status:xe}=(ee=ye==null?void 0:ye.response)!=null?ee:{status:"Error desconocido"},Ue=await N2({data:{first_image:d.firstImage,second_image:Object.keys(d).length>1?d.secondImage:"",status_code:xe},component:"ocr",eventId:r,source:o,inProduction:a,clientId:t,geolocation:A});await e({...ye,countAttempts:Ue.count_try}),((ce=(ge=ye==null?void 0:ye.response)==null?void 0:ge.data)==null?void 0:ce.code)==="020"&&Ue.count_try>3&&G(!0),(Ce=(Ie=ye==null?void 0:ye.response)==null?void 0:Ie.data)!=null&&Ce.message?ke=ye.response.data.message:xe===500&&(ke={limit_of_request:S7}),y(null),C(ke),w(xe),P8(ye)}}catch{kn.error("Error - Verificar host con el proveedor")}finally{y(!1)}},W=async ee=>{const ge=R.current.getScreenshot(),ce=Object.assign(d,{[ee]:ge});f(ce),O(!1)},D=async(ee,ge)=>{const ce=Object.assign(d,{[ee]:ge});f(ce),O(!1)},Z=(()=>{const[ee,ge]=Ze.useState(window.innerHeight>window.innerWidth);return Ze.useEffect(()=>{const ce=()=>{ge(window.innerHeight>window.innerWidth)};return window.addEventListener("resize",ce),()=>{window.removeEventListener("resize",ce)}},[]),ee})(),J=Ze.useMemo(()=>({width:{ideal:Z?1080:1920},height:{ideal:Z?1920:1080},aspectRatio:{ideal:Z?16/9:9/16},frameRate:{ideal:30},focusMode:{ideal:"continuous"},facingMode:{ideal:"environment"}}),[Z]);return Ze.useEffect(()=>{P&&(O(!1),setTimeout(()=>O(!0),100))},[Z]),{onSendSubmitDocument:T,simpleHandleSubmit:Q,isLoading:v,status:E,message:p,base64:d,setBase64:f,clearState:q,countryCode:x,dualMode:V,setDualMode:F,dualModeRequired:g,onUploadImage:W,webcamRef:R,activateCamera:P,setActivateCamera:O,videoConstraints:J,onUploadImage2:D,uploadDocumentByPhone:N,setUploadDocumentByPhone:G}},lte=e=>e==="Tipo de documento no v\xE1lido"||e==="Datos de la imagen no reconocidas"||e==="Dato no reconocido(Primer Nombre)"||e=="Dato no reconocido(Primer Apellido)"||e=="",lb=({title:e,subtitle:t,uploadByPhone:n})=>_(c1,{children:[i(Rn,{variant:"h6",className:"title",mt:2,children:e}),i(Rn,{variant:"body2",children:t}),_(xC,{dense:!0,children:[n&&_(o6,{children:[i(aa,{children:i(tte,{})}),i(la,{primary:"Aseg\xFArate de tener las fotos de tu documento en tu galer\xEDa"})]}),_(o6,{children:[i(aa,{children:i(rb,{})}),i(la,{primary:"Procura que la foto tenga buena iluminaci\xF3n"})]}),_(o6,{children:[i(aa,{children:i(ob,{})}),i(la,{primary:"Evita reflejos en el documento de identidad"})]}),_(o6,{children:[i(aa,{children:i(u6,{})}),i(la,{primary:"Procura que el texto en el documento sea legible, sino prueba cambiando a otra c\xE1mara de tu dispositivo"})]})]})]});function sb({setActivateCamera:e,activateCamera:t,videoConstraints:n,videoRef:r,streamRef:o,onTapToFocus:a,title:s,subtitle:u,cameras:h,setCameras:g,currentCameraIndex:d}){const[f,p]=Ze.useState(!1);return Ze.useEffect(()=>{(async()=>{var v,y,E,w;try{(await navigator.mediaDevices.getUserMedia({video:!0})).getTracks().forEach(R=>R.stop());const A=(await navigator.mediaDevices.enumerateDevices()).filter(R=>R.kind==="videoinput");let V=-1,F=null;for(const R of A)try{const P=await navigator.mediaDevices.getUserMedia({video:{deviceId:R.deviceId}}),N=P.getVideoTracks()[0].getCapabilities(),G=((v=N.width)==null?void 0:v.max)||0,q=((y=N.height)==null?void 0:y.max)||0,Q=((E=N.zoom)==null?void 0:E.max)||1,T=((w=N.focusDistance)==null?void 0:w.max)||0,W=G*q+Q*1e3+T*1e3;W>V&&(V=W,F=R.deviceId),P.getTracks().forEach(D=>D.stop())}catch(P){console.error("Error al obtener capacidades de la c\xE1mara:",P)}if(F){const R=[...A.filter(P=>P.deviceId===F),...A.filter(P=>P.deviceId!==F)];g(R)}else g(A)}catch(x){console.error("Error al inicializar c\xE1maras:",x)}})()},[]),Ze.useEffect(()=>{if(t&&r.current&&h.length>0){p(!0);const C=h[d],v=C?{video:{deviceId:{ideal:C.deviceId},facingMode:{ideal:"environment"}},audio:!1}:{video:{facingMode:{ideal:"environment"}},audio:!1};navigator.mediaDevices.getUserMedia(v).then(y=>{r.current.srcObject=y,r.current.play(),o.current=y,r.current.onloadeddata=()=>{p(!1)}}).catch(y=>{console.error("Error al acceder a la c\xE1mara:",y),p(!1)})}return()=>{o.current&&(o.current.getTracks().forEach(C=>C.stop()),o.current=null),r.current&&(r.current.srcObject=null)}},[t,d,h,n]),i("div",{className:"drag-zone",children:i(c1,{className:"drag-and-drop-container",children:i(c1,{onClick:()=>e(!0),position:"relative",zIndex:1,width:"100%",height:"100%",overflow:"hidden",display:"flex",justifyContent:"center",alignItems:"center",children:t?_(c1,{sx:{position:"relative",width:"100%",height:"100%"},children:[f&&i(c1,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:2,display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},children:i(e0,{sx:{color:"black"}})}),i("video",{ref:r,style:{width:"100%",height:"100%",objectFit:"cover",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",borderRadius:"5px",opacity:f?0:1},onClick:a,playsInline:!0,muted:!0,autoPlay:!0})]}):i(lb,{title:s,subtitle:u})})})})}function cb({fileInputRef:e,handleFileChange:t,side:n,title:r,subtitle:o,startUpload:a,setActivateCamera:s}){const u=()=>{var h;(h=e.current)==null||h.click()};return i("div",{className:"drag-zone",children:i(c1,{className:"drag-and-drop-container",children:i(c1,{onClick:()=>a?u():s(!0),position:"relative",zIndex:1,width:"100%",height:"100%",overflow:"hidden",display:"flex",justifyContent:"center",alignItems:"center",padding:2,children:a?_(c1,{className:"test",children:[_("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[i(Cs,{}),i(Rn,{variant:"body2",style:{textAlign:"center",color:"gray",whiteSpace:"none",margin:"auto"},children:"Haz clic aqu\xED para subir una foto desde tu dispositivo"})]}),i("input",{ref:e,name:n,type:"file",accept:"image/*",onChange:t,style:{display:"none"}})]}):i(lb,{title:r,subtitle:o,uploadByPhone:!0})})})})}function ste(e){return new Promise((t,n)=>{const r=new FileReader;r.readAsDataURL(e),r.onload=()=>t(r.result),r.onerror=o=>n(o)})}const cte=e=>{const t=document.createElement("canvas"),n=t.getContext("2d");let r=e instanceof HTMLImageElement?e.width:e.videoWidth,o=e instanceof HTMLImageElement?e.height:e.videoHeight;if(r>Ig||o>Eg){const a=Math.min(Ig/r,Eg/o);r=Math.floor(r*a),o=Math.floor(o*a)}return t.width=r,t.height=o,n==null||n.drawImage(e,0,0,r,o),{canvas:t,ctx:n}};function Yu(e){const{children:t,value:n,index:r,tabOptions:o,base64:a,setBase64:s,setActivateCamera:u,activateCamera:h,webcamRef:g,Webcam:d,videoConstraints:f,onUploadImage:p,dualModeRequired:C,status:v,onUploadImage2:y,...E}=e;return i("div",{role:"tabpanel",hidden:n!==r,id:`simple-tabpanel-${r}`,"aria-labelledby":`simple-tab-${r}`,...E,className:"tabpanel",children:n===r&&i(c1,{height:"100%",children:t})})}Yu.propTypes={children:nt.node,index:nt.number.isRequired,value:nt.number.isRequired};function ub(e){return{id:`simple-tab-${e}`,"aria-controls":`simple-tabpanel-${e}`}}function ute({base64:e,setBase64:t,setActivateCamera:n,activateCamera:r,webcamRef:o,Webcam:a,videoConstraints:s,onUploadImage:u,dualModeRequired:h,status:g,onUploadImage2:d,uploadDocumentByPhone:f,onSendSubmitDocument:p}){const[C,v]=S.useState(0),[y,E]=S.useState(!1),[w,x]=Ze.useState(!1),[I,A]=Ze.useState([]),[V,F]=Ze.useState(0),R=(J,ee)=>{v(ee),n(!1)},P=J=>{const ee={...e};delete ee[J],t(ee)},O=()=>{E(!y)},N=Ze.useRef(null),G=Ze.useRef(null),q=async J=>{const ee=N.current;if(!ee)return;const{canvas:ge}=cte(ee),ce=ge.toDataURL("image/jpeg");d(J,ce),D()},Q=async()=>{var ge,ce;if(!G.current)return;const[J]=G.current.getVideoTracks(),ee=(ge=J.getCapabilities)==null?void 0:ge.call(J);if((ce=J.getSettings)==null||ce.call(J),!(!ee||!ee.focusMode))try{ee.focusMode.includes("continuous")?await J.applyConstraints({frameRate:{ideal:30},advanced:[{focusMode:"continuous"}]}):ee.focusMode.includes("single-shot")?await J.applyConstraints({frameRate:{ideal:30},advanced:[{focusMode:"single-shot"}]}):ee.focusMode.includes("manual")&&ee.focusDistance?await J.applyConstraints({frameRate:{ideal:30},advanced:[{focusMode:"manual",focusDistance:ee.focusDistance.min}]}):console.warn("No hay modo de enfoque compatible")}catch(Ie){console.error("Error al aplicar constraints de enfoque:",Ie)}},T=Ze.useRef(null),W=async J=>{const ee=J.target.files[0],ge=await ste(ee),ce=J.target.name;d(ce,ge),D()},D=()=>{e.firstImage&&h&&R(J=>J,1),e.firstImage&&e.secondImage&&p()},H=()=>{x(!1),n(!0)},Z=()=>{F(J=>(J+1)%I.length)};return _(c1,{sx:{width:"100%"},children:[i(c1,{sx:{borderBottom:1,borderColor:"divider"},children:_(Yee,{value:C,onChange:R,"aria-label":"document selector",children:[i(qC,{label:"Frontal",...ub(0)}),h&&i(qC,{label:"Reverso",...ub(1)})]})}),i(Yu,{value:C,index:0,children:i(c1,{className:"thumbnails-container",children:i(c1,{className:"thumbnails",children:_(c1,{display:"flex",flexDirection:"column",justifyContent:"flex-start",alignItems:"flex-start",width:"100%",children:[e.firstImage?i("div",{className:"img-container",style:{transition:"transform 0.3s ease-in-out, width 0.3s ease-in-out",width:"100%",position:"relative",zIndex:1},children:i("img",{src:e.firstImage,onClick:O,alt:"thumbnail",style:{width:"100%",height:"100%",objectFit:"cover"}})}):f?i(cb,{handleFileChange:W,side:"firstImage",fileInputRef:T,title:"Cargar documeto",subtitle:"Vamos a cargar el documento desde tu dispositivo. \xA1Ten en cuenta lo siguiente!",startUpload:r,setActivateCamera:n}):i(sb,{videoRef:N,streamRef:G,setActivateCamera:n,activateCamera:r,videoConstraints:s,onTapToFocus:Q,title:"Cargar documento",subtitle:"Subir frontal del documento",currentCameraIndex:V,cameras:I,setCameras:A}),_(c1,{width:"100%",children:[e.firstImage&&_(c1,{className:"toolbox-container",children:[i(c1,{className:"zoom-button",onClick:O,children:i(w4,{title:"Ampliar",placement:"right",arrow:!0,children:i(ib,{})})}),i(c1,{className:"delete-button",onClick:()=>P("firstImage"),children:i(w4,{title:"Vaciar",placement:"right",arrow:!0,children:i(d6,{sx:{color:"white"}})})})]}),!r&&!e.firstImage&&i(_n,{type:"button",onClick:H,children:"Continuar"}),!r&&e.firstImage&&h&&i(_n,{type:"button",onClick:J=>R(J,1),children:"Cargar reverso del documento"}),r&&!w&&!f&&_(c1,{display:"flex",flexDirection:"column",alignItems:"end",children:[I.length>1&&i(c1,{onClick:Z,className:"change-camera-button",children:i(u6,{})}),i(_n,{type:"button",onClick:()=>q("firstImage"),className:"m-0",children:"Capturar"})]}),!g&&Object.keys(e).length>0&&!r&&Rr(g)&&(!h&&e.firstImage||h&&e.firstImage&&e.secondImage)&&_(c1,{children:[h&&i(p4,{children:"O"}),i(_n,{type:"submit",children:"Procesar"})]})]})]})})})}),i(Yu,{value:C,index:1,children:i(c1,{className:"thumbnails-container",children:i(c1,{className:"thumbnails",children:_(c1,{display:"flex",flexDirection:"column",justifyContent:"flex-start",alignItems:"flex-start",width:"100%",children:[e.secondImage?i("div",{className:"img-container",style:{transition:"transform 0.3s ease-in-out, width 0.3s ease-in-out",width:"100%",position:"relative",zIndex:1},children:i("img",{src:e.secondImage,onClick:O,alt:"thumbnail",style:{width:"100%",height:"100%",objectFit:"cover"}})}):f?i(cb,{handleFileChange:W,side:"secondImage",fileInputRef:T,title:"Bien ahora vamos por el reverso",subtitle:"\xA1Recuerda tener en cuenta lo siguiente!",startUpload:r,setActivateCamera:n}):i(sb,{videoRef:N,streamRef:G,setActivateCamera:n,activateCamera:r,videoConstraints:s,title:"Bien ahora carguemos el reverso",subtitle:"Asegurate de que sea legible",onTapToFocus:Q,currentCameraIndex:V,cameras:I,setCameras:A}),_(c1,{width:"100%",children:[e.secondImage&&_(c1,{className:"toolbox-container",children:[i(c1,{className:"zoom-button",onClick:O,children:i(w4,{title:"Ampliar",placement:"right",arrow:!0,children:i(ib,{})})}),i(c1,{className:"delete-button",onClick:()=>P("secondImage"),children:i(w4,{title:"Vaciar",placement:"right",arrow:!0,children:i(d6,{sx:{color:"white"}})})})]}),!r&&!e.secondImage&&i(_n,{type:"button",onClick:H,children:"Continuar"}),r&&!w&&!f&&_(c1,{display:"flex",flexDirection:"column",alignItems:"end",children:[I.length>1&&i(c1,{onClick:Z,className:"change-camera-button",children:i(u6,{})}),i(_n,{type:"button",onClick:()=>q("secondImage"),children:"Capturar"})]}),!g&&Object.keys(e).length>0&&!r&&Rr(g)&&(!h&&e.secondImage&&e.firstImage||h&&e.firstImage&&e.secondImage)&&i(_n,{type:"submit",children:"Procesar"})]})]})})})}),y&&i(c1,{sx:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",justifyContent:"center",alignItems:"center",zIndex:999},children:i(c1,{display:"flex",justifyContent:"center",alignItems:"center",position:"relative",height:525,children:i("img",{src:C===0?e.firstImage:e.secondImage,alt:"zoomed",onClick:O,style:{overflow:"auto",maxWidth:y?"140%":"100%",maxHeight:"90%",objectFit:"contain",borderRadius:"5px"}})})})]})}var db={exports:{}};(function(e,t){(function(r,o){e.exports=o(_t.default)})(zl,function(n){return function(r){var o={};function a(s){if(o[s])return o[s].exports;var u=o[s]={i:s,l:!1,exports:{}};return r[s].call(u.exports,u,u.exports,a),u.l=!0,u.exports}return a.m=r,a.c=o,a.d=function(s,u,h){a.o(s,u)||Object.defineProperty(s,u,{enumerable:!0,get:h})},a.r=function(s){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},a.t=function(s,u){if(u&1&&(s=a(s)),u&8||u&4&&typeof s=="object"&&s&&s.__esModule)return s;var h=Object.create(null);if(a.r(h),Object.defineProperty(h,"default",{enumerable:!0,value:s}),u&2&&typeof s!="string")for(var g in s)a.d(h,g,function(d){return s[d]}.bind(null,g));return h},a.n=function(s){var u=s&&s.__esModule?function(){return s.default}:function(){return s};return a.d(u,"a",u),u},a.o=function(s,u){return Object.prototype.hasOwnProperty.call(s,u)},a.p="",a(a.s="./src/react-webcam.tsx")}({"./src/react-webcam.tsx":function(r,o,a){a.r(o);var s=a("react"),u=function(){var p=function(C,v){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,E){y.__proto__=E}||function(y,E){for(var w in E)E.hasOwnProperty(w)&&(y[w]=E[w])},p(C,v)};return function(C,v){p(C,v);function y(){this.constructor=C}C.prototype=v===null?Object.create(v):(y.prototype=v.prototype,new y)}}(),h=function(){return h=Object.assign||function(p){for(var C,v=1,y=arguments.length;v<y;v++){C=arguments[v];for(var E in C)Object.prototype.hasOwnProperty.call(C,E)&&(p[E]=C[E])}return p},h.apply(this,arguments)},g=function(p,C){var v={};for(var y in p)Object.prototype.hasOwnProperty.call(p,y)&&C.indexOf(y)<0&&(v[y]=p[y]);if(p!=null&&typeof Object.getOwnPropertySymbols=="function")for(var E=0,y=Object.getOwnPropertySymbols(p);E<y.length;E++)C.indexOf(y[E])<0&&Object.prototype.propertyIsEnumerable.call(p,y[E])&&(v[y[E]]=p[y[E]]);return v};(function(){typeof window!="undefined"&&(navigator.mediaDevices===void 0&&(navigator.mediaDevices={}),navigator.mediaDevices.getUserMedia===void 0&&(navigator.mediaDevices.getUserMedia=function(C){var v=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;return v?new Promise(function(y,E){v.call(navigator,C,y,E)}):Promise.reject(new Error("getUserMedia is not implemented in this browser"))}))})();function d(){return!!(navigator.mediaDevices&&navigator.mediaDevices.getUserMedia)}var f=function(p){u(C,p);function C(v){var y=p.call(this,v)||this;return y.canvas=null,y.ctx=null,y.requestUserMediaId=0,y.unmounted=!1,y.state={hasUserMedia:!1},y}return C.prototype.componentDidMount=function(){var v=this,y=v.state,E=v.props;if(this.unmounted=!1,!d()){E.onUserMediaError("getUserMedia not supported");return}y.hasUserMedia||this.requestUserMedia(),E.children&&typeof E.children!="function"&&console.warn("children must be a function")},C.prototype.componentDidUpdate=function(v){var y=this.props;if(!d()){y.onUserMediaError("getUserMedia not supported");return}var E=JSON.stringify(v.audioConstraints)!==JSON.stringify(y.audioConstraints),w=JSON.stringify(v.videoConstraints)!==JSON.stringify(y.videoConstraints),x=v.minScreenshotWidth!==y.minScreenshotWidth,I=v.minScreenshotHeight!==y.minScreenshotHeight;(w||x||I)&&(this.canvas=null,this.ctx=null),(E||w)&&(this.stopAndCleanup(),this.requestUserMedia())},C.prototype.componentWillUnmount=function(){this.unmounted=!0,this.stopAndCleanup()},C.stopMediaStream=function(v){v&&(v.getVideoTracks&&v.getAudioTracks?(v.getVideoTracks().map(function(y){v.removeTrack(y),y.stop()}),v.getAudioTracks().map(function(y){v.removeTrack(y),y.stop()})):v.stop())},C.prototype.stopAndCleanup=function(){var v=this.state;v.hasUserMedia&&(C.stopMediaStream(this.stream),v.src&&window.URL.revokeObjectURL(v.src))},C.prototype.getScreenshot=function(v){var y=this,E=y.state,w=y.props;if(!E.hasUserMedia)return null;var x=this.getCanvas(v);return x&&x.toDataURL(w.screenshotFormat,w.screenshotQuality)},C.prototype.getCanvas=function(v){var y=this,E=y.state,w=y.props;if(!this.video||!E.hasUserMedia||!this.video.videoHeight)return null;if(!this.ctx){var x=this.video.videoWidth,I=this.video.videoHeight;if(!this.props.forceScreenshotSourceSize){var A=x/I;x=w.minScreenshotWidth||this.video.clientWidth,I=x/A,w.minScreenshotHeight&&I<w.minScreenshotHeight&&(I=w.minScreenshotHeight,x=I*A)}this.canvas=document.createElement("canvas"),this.canvas.width=(v==null?void 0:v.width)||x,this.canvas.height=(v==null?void 0:v.height)||I,this.ctx=this.canvas.getContext("2d")}var V=this,F=V.ctx,R=V.canvas;return F&&R&&(R.width=(v==null?void 0:v.width)||R.width,R.height=(v==null?void 0:v.height)||R.height,w.mirrored&&(F.translate(R.width,0),F.scale(-1,1)),F.imageSmoothingEnabled=w.imageSmoothing,F.drawImage(this.video,0,0,(v==null?void 0:v.width)||R.width,(v==null?void 0:v.height)||R.height),w.mirrored&&(F.scale(-1,1),F.translate(-R.width,0))),R},C.prototype.requestUserMedia=function(){var v=this,y=this.props,E=function(I,A){var V={video:typeof A!="undefined"?A:!0};y.audio&&(V.audio=typeof I!="undefined"?I:!0),v.requestUserMediaId++;var F=v.requestUserMediaId;navigator.mediaDevices.getUserMedia(V).then(function(R){v.unmounted||F!==v.requestUserMediaId?C.stopMediaStream(R):v.handleUserMedia(null,R)}).catch(function(R){v.handleUserMedia(R)})};if("mediaDevices"in navigator)E(y.audioConstraints,y.videoConstraints);else{var w=function(I){return{optional:[{sourceId:I}]}},x=function(I){var A=I.deviceId;return typeof A=="string"?A:Array.isArray(A)&&A.length>0?A[0]:typeof A=="object"&&A.ideal?A.ideal:null};MediaStreamTrack.getSources(function(I){var A=null,V=null;I.forEach(function(P){P.kind==="audio"?A=P.id:P.kind==="video"&&(V=P.id)});var F=x(y.audioConstraints);F&&(A=F);var R=x(y.videoConstraints);R&&(V=R),E(w(A),w(V))})}},C.prototype.handleUserMedia=function(v,y){var E=this.props;if(v||!y){this.setState({hasUserMedia:!1}),E.onUserMediaError(v);return}this.stream=y;try{this.video&&(this.video.srcObject=y),this.setState({hasUserMedia:!0})}catch{this.setState({hasUserMedia:!0,src:window.URL.createObjectURL(y)})}E.onUserMedia(y)},C.prototype.render=function(){var v=this,y=this,E=y.state,w=y.props,x=w.audio;w.forceScreenshotSourceSize;var I=w.disablePictureInPicture;w.onUserMedia,w.onUserMediaError,w.screenshotFormat,w.screenshotQuality,w.minScreenshotWidth,w.minScreenshotHeight,w.audioConstraints,w.videoConstraints,w.imageSmoothing;var A=w.mirrored,V=w.style,F=V===void 0?{}:V,R=w.children,P=g(w,["audio","forceScreenshotSourceSize","disablePictureInPicture","onUserMedia","onUserMediaError","screenshotFormat","screenshotQuality","minScreenshotWidth","minScreenshotHeight","audioConstraints","videoConstraints","imageSmoothing","mirrored","style","children"]),O=A?h(h({},F),{transform:(F.transform||"")+" scaleX(-1)"}):F,N={getScreenshot:this.getScreenshot.bind(this)};return s.createElement(s.Fragment,null,s.createElement("video",h({autoPlay:!0,disablePictureInPicture:I,src:E.src,muted:!x,playsInline:!0,ref:function(G){v.video=G},style:O},P)),R&&R(N))},C.defaultProps={audio:!1,disablePictureInPicture:!1,forceScreenshotSourceSize:!1,imageSmoothing:!0,mirrored:!1,onUserMedia:function(){},onUserMediaError:function(){},screenshotFormat:"image/webp",screenshotQuality:.92},C}(s.Component);o.default=f},react:function(r,o){r.exports=n}}).default})})(db);var hb=GE(db.exports);class S4{static cropImage(t,n,r){return new Promise(o=>{const a=document.createElement("canvas"),s=a.getContext("2d"),u=t.naturalWidth/r.width,h=t.naturalHeight/r.height,g={x:n.x*u,y:n.y*h,width:n.width*u,height:n.height*h};a.width=g.width,a.height=g.height,s.drawImage(t,g.x,g.y,g.width,g.height,0,0,g.width,g.height);const d=a.toDataURL("image/jpeg",.9);o(d)})}static constrainCropArea(t,n,r=50){const o={...t};return o.width=Math.max(o.width,r),o.height=Math.max(o.height,r),o.x=Math.max(0,Math.min(o.x,n.width-o.width)),o.y=Math.max(0,Math.min(o.y,n.height-o.height)),o.x+o.width>n.width&&(o.width=n.width-o.x),o.y+o.height>n.height&&(o.height=n.height-o.y),o}static maintainAspectRatio(t,n,r){const o={...t},a=o.width/n;return a<=r.height-o.y?o.height=a:(o.height=r.height-o.y,o.width=o.height*n),o}}const dte=({aspectRatio:e,minCropSize:t=50}={})=>{const[n,r]=Ze.useState({x:0,y:0,width:200,height:200}),[o,a]=Ze.useState(!1),[s,u]=Ze.useState(!1),[h,g]=Ze.useState({x:0,y:0}),[d,f]=Ze.useState(""),[p,C]=Ze.useState({width:0,height:0}),v=Ze.useRef(null),y=Ze.useRef(null),E=Ze.useCallback(()=>{if(!v.current)return{width:0,height:0};const P=v.current.getBoundingClientRect();return{width:P.width,height:P.height}},[]),w=Ze.useCallback(()=>{if(!v.current||!y.current)return{x:0,y:0};const P=y.current.getBoundingClientRect(),O=v.current.getBoundingClientRect();return{x:O.left-P.left,y:O.top-P.top}},[]),x=Ze.useCallback(()=>{if(!v.current)return;const P=E();C(P);const O=Math.min(P.width,P.height)*.8,N=(P.width-O)/2,G=(P.height-O)/2;let q={x:N,y:G,width:O,height:O};e&&(q=S4.maintainAspectRatio(q,e,P)),r(q)},[e,E]),I=P=>"touches"in P&&P.touches.length>0?{clientX:P.touches[0].clientX,clientY:P.touches[0].clientY}:{clientX:P.clientX,clientY:P.clientY},A=Ze.useCallback((P,O)=>{var W;P.preventDefault(),P.stopPropagation();const N=(W=y.current)==null?void 0:W.getBoundingClientRect(),G=w();if(!N)return;const q=I(P),Q=q.clientX-N.left-G.x,T=q.clientY-N.top-G.y;g({x:Q,y:T}),O?(u(!0),f(O)):a(!0)},[w]),V=Ze.useCallback(P=>{var H;if(!v.current||!o&&!s)return;const O=(H=y.current)==null?void 0:H.getBoundingClientRect(),N=w();if(!O)return;const G=I(P),q=G.clientX-O.left-N.x,Q=G.clientY-O.top-N.y,T=q-h.x,W=Q-h.y,D=E();if(o){const Z={...n,x:n.x+T,y:n.y+W},J=S4.constrainCropArea(Z,D,t);r(J),g({x:q,y:Q})}else if(s){let Z={...n};switch(d){case"se":Z.width=Math.max(t,n.width+T),Z.height=Math.max(t,n.height+W);break;case"sw":Z.x=n.x+T,Z.width=Math.max(t,n.width-T),Z.height=Math.max(t,n.height+W);break;case"ne":Z.y=n.y+W,Z.width=Math.max(t,n.width+T),Z.height=Math.max(t,n.height-W);break;case"nw":Z.x=n.x+T,Z.y=n.y+W,Z.width=Math.max(t,n.width-T),Z.height=Math.max(t,n.height-W);break}e&&(Z=S4.maintainAspectRatio(Z,e,D));const J=S4.constrainCropArea(Z,D,t);r(J),g({x:q,y:Q})}},[o,s,h,n,d,e,t,w,E]),F=Ze.useCallback(()=>{a(!1),u(!1),f("")},[]),R=Ze.useCallback(async()=>{if(!v.current)return null;try{const P=await S4.cropImage(v.current,n,p);return{originalImage:v.current.src,croppedImage:P,cropArea:n}}catch(P){return console.error("Error cropping image:",P),null}},[n,p]);return{cropArea:n,isDragging:o,isResizing:s,imageRef:v,containerRef:y,displayedImageRect:p,initializeCrop:x,handleMouseDown:A,handleMouseMove:V,handleMouseUp:F,cropImage:R,getImageOffset:w}};var Mr={"image-crop-modal":"_image-crop-modal_13qpu_1","MuiDialog-paper":"_MuiDialog-paper_13qpu_1","image-crop-container":"_image-crop-container_13qpu_7","crop-header":"_crop-header_13qpu_14","crop-area":"_crop-area_13qpu_29","crop-image":"_crop-image_13qpu_40","crop-overlay":"_crop-overlay_13qpu_48","crop-selection":"_crop-selection_13qpu_56","crop-handle":"_crop-handle_13qpu_72","handle-nw":"_handle-nw_13qpu_100","handle-ne":"_handle-ne_13qpu_105","handle-sw":"_handle-sw_13qpu_110","handle-se":"_handle-se_13qpu_115","crop-grid":"_crop-grid_13qpu_120","grid-vertical":"_grid-vertical_13qpu_145","crop-actions":"_crop-actions_13qpu_158","MuiButton-root":"_MuiButton-root_13qpu_166","MuiButton-outlined":"_MuiButton-outlined_13qpu_173","crop-preview":"_crop-preview_13qpu_176","preview-label":"_preview-label_13qpu_183","preview-image":"_preview-image_13qpu_188"};const hte=({image:e,onCropComplete:t,onCancel:n,aspectRatio:r,minCropSize:o=50})=>{const[a,s]=Ze.useState(!1),[u,h]=Ze.useState(!1),{cropArea:g,isDragging:d,isResizing:f,imageRef:p,containerRef:C,initializeCrop:v,handleMouseDown:y,handleMouseMove:E,handleMouseUp:w,cropImage:x,getImageOffset:I}=dte({aspectRatio:r,minCropSize:o}),A=()=>{p.current&&setTimeout(()=>{v(),h(!0)},100)},V=async()=>{s(!0);try{const F=await x();F&&t(F)}catch(F){console.error("Error al recortar imagen:",F)}finally{s(!1)}};return Ze.useEffect(()=>{const F=N=>{if(d||f){const G={clientX:N.clientX,clientY:N.clientY,preventDefault:()=>N.preventDefault()};E(G)}},R=N=>{if(d||f){N.preventDefault();const G={touches:N.touches,preventDefault:()=>N.preventDefault()};E(G)}},P=()=>{w()},O=()=>{w()};return(d||f)&&(document.addEventListener("mousemove",F),document.addEventListener("mouseup",P),document.addEventListener("touchmove",R,{passive:!1}),document.addEventListener("touchend",O)),()=>{document.removeEventListener("mousemove",F),document.removeEventListener("mouseup",P),document.removeEventListener("touchmove",R),document.removeEventListener("touchend",O)}},[d,f,E,w]),i(iX,{open:!0,onClose:n,maxWidth:"lg",className:`${Mr["image-crop-modal"]} ${I1["kit-gbc"]}`,children:i(dX,{sx:{maxWidth:"md",padding:0},children:_("div",{className:Mr["image-crop-container"],children:[_("div",{className:Mr["crop-header"],children:[i(Rn,{variant:"h5",component:"h2",children:"Recortar Imagen"}),i(Rn,{variant:"body2",color:"text.secondary",children:"Arrastra para mover el \xE1rea de recorte, usa las esquinas para redimensionar"}),i(p4,{sx:{height:"1px",bgcolor:"primary.main",mt:2}})]}),_("div",{className:Mr["crop-area"],ref:C,onMouseMove:E,onMouseUp:w,children:[!u&&i(c1,{display:"flex",justifyContent:"center",alignItems:"center",p:4,children:i(e0,{})}),i("img",{ref:p,src:e,alt:"Imagen a recortar",className:Mr["crop-image"],onLoad:A,style:{opacity:u?1:0}}),u&&i(Xi,{children:i("div",{className:Mr["crop-overlay"],style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",pointerEvents:"none"},children:_("div",{className:Mr["crop-selection"],style:{position:"absolute",left:`${I().x+g.x}px`,top:`${I().y+g.y}px`,width:`${g.width}px`,height:`${g.height}px`,pointerEvents:"all"},onMouseDown:F=>y(F),onTouchStart:F=>y(F),children:[_("div",{className:Mr["crop-grid"],children:[i("div",{className:Mr["grid-vertical"]}),i("div",{className:Mr["grid-vertical"]})]}),i("div",{className:`${Mr["crop-handle"]} ${Mr["handle-nw"]}`,onMouseDown:F=>y(F,"nw"),onTouchStart:F=>y(F,"nw")}),i("div",{className:`${Mr["crop-handle"]} ${Mr["handle-ne"]}`,onMouseDown:F=>y(F,"ne"),onTouchStart:F=>y(F,"ne")}),i("div",{className:`${Mr["crop-handle"]} ${Mr["handle-sw"]}`,onMouseDown:F=>y(F,"sw"),onTouchStart:F=>y(F,"sw")}),i("div",{className:`${Mr["crop-handle"]} ${Mr["handle-se"]}`,onMouseDown:F=>y(F,"se"),onTouchStart:F=>y(F,"se")})]})})})]}),_("div",{className:Mr["crop-actions"],children:[i(_n,{type:"button",variant:"outlined",onClick:n,disabled:a,children:"Cancelar"}),i(_n,{type:"button",variant:"contained",onClick:V,disabled:!u||a,startIcon:a?i(e0,{size:20}):null,children:a?"Recortando...":"Recortar"})]})]})})})};function fb(){const e=navigator.userAgent;return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|Mobile|mobile|CriOS|FxiOS/i.test(e)}function fte(e,t){return t.forEach(function(n){n&&typeof n!="string"&&!Array.isArray(n)&&Object.keys(n).forEach(function(r){if(r!=="default"&&!(r in e)){var o=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(e,r,o.get?o:{enumerable:!0,get:function(){return n[r]}})}})}),Object.freeze(e)}function pb(e,t){return new Promise(function(n,r){let o;return pte(e).then(function(a){try{return o=a,n(new Blob([t.slice(0,2),o,t.slice(2)],{type:"image/jpeg"}))}catch(s){return r(s)}},r)})}const pte=e=>new Promise((t,n)=>{const r=new FileReader;r.addEventListener("load",({target:{result:o}})=>{const a=new DataView(o);let s=0;if(a.getUint16(s)!==65496)return n("not a valid JPEG");for(s+=2;;){const u=a.getUint16(s);if(u===65498)break;const h=a.getUint16(s+2);if(u===65505&&a.getUint32(s+4)===1165519206){const g=s+10;let d;switch(a.getUint16(g)){case 18761:d=!0;break;case 19789:d=!1;break;default:return n("TIFF header contains invalid endian")}if(a.getUint16(g+2,d)!==42)return n("TIFF header contains invalid version");const f=a.getUint32(g+4,d),p=g+f+2+12*a.getUint16(g+f,d);for(let C=g+f+2;C<p;C+=12)if(a.getUint16(C,d)==274){if(a.getUint16(C+2,d)!==3)return n("Orientation data type is invalid");if(a.getUint32(C+4,d)!==1)return n("Orientation data count is invalid");a.setUint16(C+8,1,d);break}return t(o.slice(s,s+2+h))}s+=2+h}return t(new Blob)}),r.readAsArrayBuffer(e)});var p6={},gte={get exports(){return p6},set exports(e){p6=e}};(function(e){var t,n,r={};gte.exports=r,r.parse=function(o,a){for(var s=r.bin.readUshort,u=r.bin.readUint,h=0,g={},d=new Uint8Array(o),f=d.length-4;u(d,f)!=101010256;)f--;h=f,h+=4;var p=s(d,h+=4);s(d,h+=2);var C=u(d,h+=2),v=u(d,h+=4);h+=4,h=v;for(var y=0;y<p;y++){u(d,h),h+=4,h+=4,h+=4,u(d,h+=4),C=u(d,h+=4);var E=u(d,h+=4),w=s(d,h+=4),x=s(d,h+2),I=s(d,h+4);h+=6;var A=u(d,h+=8);h+=4,h+=w+x+I,r._readLocal(d,A,g,C,E,a)}return g},r._readLocal=function(o,a,s,u,h,g){var d=r.bin.readUshort,f=r.bin.readUint;f(o,a),d(o,a+=4),d(o,a+=2);var p=d(o,a+=2);f(o,a+=2),f(o,a+=4),a+=4;var C=d(o,a+=8),v=d(o,a+=2);a+=2;var y=r.bin.readUTF8(o,a,C);if(a+=C,a+=v,g)s[y]={size:h,csize:u};else{var E=new Uint8Array(o.buffer,a);if(p==0)s[y]=new Uint8Array(E.buffer.slice(a,a+u));else{if(p!=8)throw"unknown compression method: "+p;var w=new Uint8Array(h);r.inflateRaw(E,w),s[y]=w}}},r.inflateRaw=function(o,a){return r.F.inflate(o,a)},r.inflate=function(o,a){return o[0],o[1],r.inflateRaw(new Uint8Array(o.buffer,o.byteOffset+2,o.length-6),a)},r.deflate=function(o,a){a==null&&(a={level:6});var s=0,u=new Uint8Array(50+Math.floor(1.1*o.length));u[s]=120,u[s+1]=156,s+=2,s=r.F.deflateRaw(o,u,s,a.level);var h=r.adler(o,0,o.length);return u[s+0]=h>>>24&255,u[s+1]=h>>>16&255,u[s+2]=h>>>8&255,u[s+3]=h>>>0&255,new Uint8Array(u.buffer,0,s+4)},r.deflateRaw=function(o,a){a==null&&(a={level:6});var s=new Uint8Array(50+Math.floor(1.1*o.length)),u=r.F.deflateRaw(o,s,u,a.level);return new Uint8Array(s.buffer,0,u)},r.encode=function(o,a){a==null&&(a=!1);var s=0,u=r.bin.writeUint,h=r.bin.writeUshort,g={};for(var d in o){var f=!r._noNeed(d)&&!a,p=o[d],C=r.crc.crc(p,0,p.length);g[d]={cpr:f,usize:p.length,crc:C,file:f?r.deflateRaw(p):p}}for(var d in g)s+=g[d].file.length+30+46+2*r.bin.sizeUTF8(d);s+=22;var v=new Uint8Array(s),y=0,E=[];for(var d in g){var w=g[d];E.push(y),y=r._writeHeader(v,y,d,w,0)}var x=0,I=y;for(var d in g)w=g[d],E.push(y),y=r._writeHeader(v,y,d,w,1,E[x++]);var A=y-I;return u(v,y,101010256),y+=4,h(v,y+=4,x),h(v,y+=2,x),u(v,y+=2,A),u(v,y+=4,I),y+=4,y+=2,v.buffer},r._noNeed=function(o){var a=o.split(".").pop().toLowerCase();return"png,jpg,jpeg,zip".indexOf(a)!=-1},r._writeHeader=function(o,a,s,u,h,g){var d=r.bin.writeUint,f=r.bin.writeUshort,p=u.file;return d(o,a,h==0?67324752:33639248),a+=4,h==1&&(a+=2),f(o,a,20),f(o,a+=2,0),f(o,a+=2,u.cpr?8:0),d(o,a+=2,0),d(o,a+=4,u.crc),d(o,a+=4,p.length),d(o,a+=4,u.usize),f(o,a+=4,r.bin.sizeUTF8(s)),f(o,a+=2,0),a+=2,h==1&&(a+=2,a+=2,d(o,a+=6,g),a+=4),a+=r.bin.writeUTF8(o,a,s),h==0&&(o.set(p,a),a+=p.length),a},r.crc={table:function(){for(var o=new Uint32Array(256),a=0;a<256;a++){for(var s=a,u=0;u<8;u++)1&s?s=3988292384^s>>>1:s>>>=1;o[a]=s}return o}(),update:function(o,a,s,u){for(var h=0;h<u;h++)o=r.crc.table[255&(o^a[s+h])]^o>>>8;return o},crc:function(o,a,s){return 4294967295^r.crc.update(4294967295,o,a,s)}},r.adler=function(o,a,s){for(var u=1,h=0,g=a,d=a+s;g<d;){for(var f=Math.min(g+5552,d);g<f;)h+=u+=o[g++];u%=65521,h%=65521}return h<<16|u},r.bin={readUshort:function(o,a){return o[a]|o[a+1]<<8},writeUshort:function(o,a,s){o[a]=255&s,o[a+1]=s>>8&255},readUint:function(o,a){return 16777216*o[a+3]+(o[a+2]<<16|o[a+1]<<8|o[a])},writeUint:function(o,a,s){o[a]=255&s,o[a+1]=s>>8&255,o[a+2]=s>>16&255,o[a+3]=s>>24&255},readASCII:function(o,a,s){for(var u="",h=0;h<s;h++)u+=String.fromCharCode(o[a+h]);return u},writeASCII:function(o,a,s){for(var u=0;u<s.length;u++)o[a+u]=s.charCodeAt(u)},pad:function(o){return o.length<2?"0"+o:o},readUTF8:function(o,a,s){for(var u,h="",g=0;g<s;g++)h+="%"+r.bin.pad(o[a+g].toString(16));try{u=decodeURIComponent(h)}catch{return r.bin.readASCII(o,a,s)}return u},writeUTF8:function(o,a,s){for(var u=s.length,h=0,g=0;g<u;g++){var d=s.charCodeAt(g);if((4294967168&d)==0)o[a+h]=d,h++;else if((4294965248&d)==0)o[a+h]=192|d>>6,o[a+h+1]=128|d>>0&63,h+=2;else if((4294901760&d)==0)o[a+h]=224|d>>12,o[a+h+1]=128|d>>6&63,o[a+h+2]=128|d>>0&63,h+=3;else{if((4292870144&d)!=0)throw"e";o[a+h]=240|d>>18,o[a+h+1]=128|d>>12&63,o[a+h+2]=128|d>>6&63,o[a+h+3]=128|d>>0&63,h+=4}}return h},sizeUTF8:function(o){for(var a=o.length,s=0,u=0;u<a;u++){var h=o.charCodeAt(u);if((4294967168&h)==0)s++;else if((4294965248&h)==0)s+=2;else if((4294901760&h)==0)s+=3;else{if((4292870144&h)!=0)throw"e";s+=4}}return s}},r.F={},r.F.deflateRaw=function(o,a,s,u){var h=[[0,0,0,0,0],[4,4,8,4,0],[4,5,16,8,0],[4,6,16,16,0],[4,10,16,32,0],[8,16,32,32,0],[8,16,128,128,0],[8,32,128,256,0],[32,128,258,1024,1],[32,258,258,4096,1]][u],g=r.F.U,d=r.F._goodIndex;r.F._hash;var f=r.F._putsE,p=0,C=s<<3,v=0,y=o.length;if(u==0){for(;p<y;)f(a,C,p+(G=Math.min(65535,y-p))==y?1:0),C=r.F._copyExact(o,p,G,a,C+8),p+=G;return C>>>3}var E=g.lits,w=g.strt,x=g.prev,I=0,A=0,V=0,F=0,R=0,P=0;for(y>2&&(w[P=r.F._hash(o,0)]=0),p=0;p<y;p++){if(R=P,p+1<y-2){P=r.F._hash(o,p+1);var O=p+1&32767;x[O]=w[P],w[P]=O}if(v<=p){(I>14e3||A>26697)&&y-p>100&&(v<p&&(E[I]=p-v,I+=2,v=p),C=r.F._writeBlock(p==y-1||v==y?1:0,E,I,F,o,V,p-V,a,C),I=A=F=0,V=p);var N=0;p<y-2&&(N=r.F._bestMatch(o,p,x,R,Math.min(h[2],y-p),h[3]));var G=N>>>16,q=65535&N;if(N!=0){q=65535&N;var Q=d(G=N>>>16,g.of0);g.lhst[257+Q]++;var T=d(q,g.df0);g.dhst[T]++,F+=g.exb[Q]+g.dxb[T],E[I]=G<<23|p-v,E[I+1]=q<<16|Q<<8|T,I+=2,v=p+G}else g.lhst[o[p]]++;A++}}for(V==p&&o.length!=0||(v<p&&(E[I]=p-v,I+=2,v=p),C=r.F._writeBlock(1,E,I,F,o,V,p-V,a,C),I=0,A=0,I=A=F=0,V=p);(7&C)!=0;)C++;return C>>>3},r.F._bestMatch=function(o,a,s,u,h,g){var d=32767&a,f=s[d],p=d-f+32768&32767;if(f==d||u!=r.F._hash(o,a-p))return 0;for(var C=0,v=0,y=Math.min(32767,a);p<=y&&--g!=0&&f!=d;){if(C==0||o[a+C]==o[a+C-p]){var E=r.F._howLong(o,a,p);if(E>C){if(v=p,(C=E)>=h)break;p+2<E&&(E=p+2);for(var w=0,x=0;x<E-2;x++){var I=a-p+x+32768&32767,A=I-s[I]+32768&32767;A>w&&(w=A,f=I)}}}p+=(d=f)-(f=s[d])+32768&32767}return C<<16|v},r.F._howLong=function(o,a,s){if(o[a]!=o[a-s]||o[a+1]!=o[a+1-s]||o[a+2]!=o[a+2-s])return 0;var u=a,h=Math.min(o.length,a+258);for(a+=3;a<h&&o[a]==o[a-s];)a++;return a-u},r.F._hash=function(o,a){return(o[a]<<8|o[a+1])+(o[a+2]<<4)&65535},r.saved=0,r.F._writeBlock=function(o,a,s,u,h,g,d,f,p){var C,v,y,E,w,x,I,A,V,F=r.F.U,R=r.F._putsF,P=r.F._putsE;F.lhst[256]++,v=(C=r.F.getTrees())[0],y=C[1],E=C[2],w=C[3],x=C[4],I=C[5],A=C[6],V=C[7];var O=32+((p+3&7)==0?0:8-(p+3&7))+(d<<3),N=u+r.F.contSize(F.fltree,F.lhst)+r.F.contSize(F.fdtree,F.dhst),G=u+r.F.contSize(F.ltree,F.lhst)+r.F.contSize(F.dtree,F.dhst);G+=14+3*I+r.F.contSize(F.itree,F.ihst)+(2*F.ihst[16]+3*F.ihst[17]+7*F.ihst[18]);for(var q=0;q<286;q++)F.lhst[q]=0;for(q=0;q<30;q++)F.dhst[q]=0;for(q=0;q<19;q++)F.ihst[q]=0;var Q=O<N&&O<G?0:N<G?1:2;if(R(f,p,o),R(f,p+1,Q),p+=3,Q==0){for(;(7&p)!=0;)p++;p=r.F._copyExact(h,g,d,f,p)}else{var T,W;if(Q==1&&(T=F.fltree,W=F.fdtree),Q==2){r.F.makeCodes(F.ltree,v),r.F.revCodes(F.ltree,v),r.F.makeCodes(F.dtree,y),r.F.revCodes(F.dtree,y),r.F.makeCodes(F.itree,E),r.F.revCodes(F.itree,E),T=F.ltree,W=F.dtree,P(f,p,w-257),P(f,p+=5,x-1),P(f,p+=5,I-4),p+=4;for(var D=0;D<I;D++)P(f,p+3*D,F.itree[1+(F.ordr[D]<<1)]);p+=3*I,p=r.F._codeTiny(A,F.itree,f,p),p=r.F._codeTiny(V,F.itree,f,p)}for(var H=g,Z=0;Z<s;Z+=2){for(var J=a[Z],ee=J>>>23,ge=H+(8388607&J);H<ge;)p=r.F._writeLit(h[H++],T,f,p);if(ee!=0){var ce=a[Z+1],Ie=ce>>16,Ce=ce>>8&255,re=255&ce;P(f,p=r.F._writeLit(257+Ce,T,f,p),ee-F.of0[Ce]),p+=F.exb[Ce],R(f,p=r.F._writeLit(re,W,f,p),Ie-F.df0[re]),p+=F.dxb[re],H+=ee}}p=r.F._writeLit(256,T,f,p)}return p},r.F._copyExact=function(o,a,s,u,h){var g=h>>>3;return u[g]=s,u[g+1]=s>>>8,u[g+2]=255-u[g],u[g+3]=255-u[g+1],g+=4,u.set(new Uint8Array(o.buffer,a,s),g),h+(s+4<<3)},r.F.getTrees=function(){for(var o=r.F.U,a=r.F._hufTree(o.lhst,o.ltree,15),s=r.F._hufTree(o.dhst,o.dtree,15),u=[],h=r.F._lenCodes(o.ltree,u),g=[],d=r.F._lenCodes(o.dtree,g),f=0;f<u.length;f+=2)o.ihst[u[f]]++;for(f=0;f<g.length;f+=2)o.ihst[g[f]]++;for(var p=r.F._hufTree(o.ihst,o.itree,7),C=19;C>4&&o.itree[1+(o.ordr[C-1]<<1)]==0;)C--;return[a,s,p,h,d,C,u,g]},r.F.getSecond=function(o){for(var a=[],s=0;s<o.length;s+=2)a.push(o[s+1]);return a},r.F.nonZero=function(o){for(var a="",s=0;s<o.length;s+=2)o[s+1]!=0&&(a+=(s>>1)+",");return a},r.F.contSize=function(o,a){for(var s=0,u=0;u<a.length;u++)s+=a[u]*o[1+(u<<1)];return s},r.F._codeTiny=function(o,a,s,u){for(var h=0;h<o.length;h+=2){var g=o[h],d=o[h+1];u=r.F._writeLit(g,a,s,u);var f=g==16?2:g==17?3:7;g>15&&(r.F._putsE(s,u,d,f),u+=f)}return u},r.F._lenCodes=function(o,a){for(var s=o.length;s!=2&&o[s-1]==0;)s-=2;for(var u=0;u<s;u+=2){var h=o[u+1],g=u+3<s?o[u+3]:-1,d=u+5<s?o[u+5]:-1,f=u==0?-1:o[u-1];if(h==0&&g==h&&d==h){for(var p=u+5;p+2<s&&o[p+2]==h;)p+=2;(C=Math.min(p+1-u>>>1,138))<11?a.push(17,C-3):a.push(18,C-11),u+=2*C-2}else if(h==f&&g==h&&d==h){for(p=u+5;p+2<s&&o[p+2]==h;)p+=2;var C=Math.min(p+1-u>>>1,6);a.push(16,C-3),u+=2*C-2}else a.push(h,0)}return s>>>1},r.F._hufTree=function(o,a,s){var u=[],h=o.length,g=a.length,d=0;for(d=0;d<g;d+=2)a[d]=0,a[d+1]=0;for(d=0;d<h;d++)o[d]!=0&&u.push({lit:d,f:o[d]});var f=u.length,p=u.slice(0);if(f==0)return 0;if(f==1){var C=u[0].lit;return p=C==0?1:0,a[1+(C<<1)]=1,a[1+(p<<1)]=1,1}u.sort(function(A,V){return A.f-V.f});var v=u[0],y=u[1],E=0,w=1,x=2;for(u[0]={lit:-1,f:v.f+y.f,l:v,r:y,d:0};w!=f-1;)v=E!=w&&(x==f||u[E].f<u[x].f)?u[E++]:u[x++],y=E!=w&&(x==f||u[E].f<u[x].f)?u[E++]:u[x++],u[w++]={lit:-1,f:v.f+y.f,l:v,r:y};var I=r.F.setDepth(u[w-1],0);for(I>s&&(r.F.restrictDepth(p,s,I),I=s),d=0;d<f;d++)a[1+(p[d].lit<<1)]=p[d].d;return I},r.F.setDepth=function(o,a){return o.lit!=-1?(o.d=a,a):Math.max(r.F.setDepth(o.l,a+1),r.F.setDepth(o.r,a+1))},r.F.restrictDepth=function(o,a,s){var u=0,h=1<<s-a,g=0;for(o.sort(function(f,p){return p.d==f.d?f.f-p.f:p.d-f.d}),u=0;u<o.length&&o[u].d>a;u++){var d=o[u].d;o[u].d=a,g+=h-(1<<s-d)}for(g>>>=s-a;g>0;)(d=o[u].d)<a?(o[u].d++,g-=1<<a-d-1):u++;for(;u>=0;u--)o[u].d==a&&g<0&&(o[u].d--,g++);g!=0&&console.log("debt left")},r.F._goodIndex=function(o,a){var s=0;return a[16|s]<=o&&(s|=16),a[8|s]<=o&&(s|=8),a[4|s]<=o&&(s|=4),a[2|s]<=o&&(s|=2),a[1|s]<=o&&(s|=1),s},r.F._writeLit=function(o,a,s,u){return r.F._putsF(s,u,a[o<<1]),u+a[1+(o<<1)]},r.F.inflate=function(o,a){var s=Uint8Array;if(o[0]==3&&o[1]==0)return a||new s(0);var u=r.F,h=u._bitsF,g=u._bitsE,d=u._decodeTiny,f=u.makeCodes,p=u.codes2map,C=u._get17,v=u.U,y=a==null;y&&(a=new s(o.length>>>2<<3));for(var E,w,x=0,I=0,A=0,V=0,F=0,R=0,P=0,O=0,N=0;x==0;)if(x=h(o,N,1),I=h(o,N+1,2),N+=3,I!=0){if(y&&(a=r.F._check(a,O+(1<<17))),I==1&&(E=v.flmap,w=v.fdmap,R=511,P=31),I==2){A=g(o,N,5)+257,V=g(o,N+5,5)+1,F=g(o,N+10,4)+4,N+=14;for(var G=0;G<38;G+=2)v.itree[G]=0,v.itree[G+1]=0;var q=1;for(G=0;G<F;G++){var Q=g(o,N+3*G,3);v.itree[1+(v.ordr[G]<<1)]=Q,Q>q&&(q=Q)}N+=3*F,f(v.itree,q),p(v.itree,q,v.imap),E=v.lmap,w=v.dmap,N=d(v.imap,(1<<q)-1,A+V,o,N,v.ttree);var T=u._copyOut(v.ttree,0,A,v.ltree);R=(1<<T)-1;var W=u._copyOut(v.ttree,A,V,v.dtree);P=(1<<W)-1,f(v.ltree,T),p(v.ltree,T,E),f(v.dtree,W),p(v.dtree,W,w)}for(;;){var D=E[C(o,N)&R];N+=15&D;var H=D>>>4;if(H>>>8==0)a[O++]=H;else{if(H==256)break;var Z=O+H-254;if(H>264){var J=v.ldef[H-257];Z=O+(J>>>3)+g(o,N,7&J),N+=7&J}var ee=w[C(o,N)&P];N+=15&ee;var ge=ee>>>4,ce=v.ddef[ge],Ie=(ce>>>4)+h(o,N,15&ce);for(N+=15&ce,y&&(a=r.F._check(a,O+(1<<17)));O<Z;)a[O]=a[O++-Ie],a[O]=a[O++-Ie],a[O]=a[O++-Ie],a[O]=a[O++-Ie];O=Z}}}else{(7&N)!=0&&(N+=8-(7&N));var Ce=4+(N>>>3),re=o[Ce-4]|o[Ce-3]<<8;y&&(a=r.F._check(a,O+re)),a.set(new s(o.buffer,o.byteOffset+Ce,re),O),N=Ce+re<<3,O+=re}return a.length==O?a:a.slice(0,O)},r.F._check=function(o,a){var s=o.length;if(a<=s)return o;var u=new Uint8Array(Math.max(s<<1,a));return u.set(o,0),u},r.F._decodeTiny=function(o,a,s,u,h,g){for(var d=r.F._bitsE,f=r.F._get17,p=0;p<s;){var C=o[f(u,h)&a];h+=15&C;var v=C>>>4;if(v<=15)g[p]=v,p++;else{var y=0,E=0;v==16?(E=3+d(u,h,2),h+=2,y=g[p-1]):v==17?(E=3+d(u,h,3),h+=3):v==18&&(E=11+d(u,h,7),h+=7);for(var w=p+E;p<w;)g[p]=y,p++}}return h},r.F._copyOut=function(o,a,s,u){for(var h=0,g=0,d=u.length>>>1;g<s;){var f=o[g+a];u[g<<1]=0,u[1+(g<<1)]=f,f>h&&(h=f),g++}for(;g<d;)u[g<<1]=0,u[1+(g<<1)]=0,g++;return h},r.F.makeCodes=function(o,a){for(var s,u,h,g,d=r.F.U,f=o.length,p=d.bl_count,C=0;C<=a;C++)p[C]=0;for(C=1;C<f;C+=2)p[o[C]]++;var v=d.next_code;for(s=0,p[0]=0,u=1;u<=a;u++)s=s+p[u-1]<<1,v[u]=s;for(h=0;h<f;h+=2)(g=o[h+1])!=0&&(o[h]=v[g],v[g]++)},r.F.codes2map=function(o,a,s){for(var u=o.length,h=r.F.U.rev15,g=0;g<u;g+=2)if(o[g+1]!=0)for(var d=g>>1,f=o[g+1],p=d<<4|f,C=a-f,v=o[g]<<C,y=v+(1<<C);v!=y;)s[h[v]>>>15-a]=p,v++},r.F.revCodes=function(o,a){for(var s=r.F.U.rev15,u=15-a,h=0;h<o.length;h+=2){var g=o[h]<<a-o[h+1];o[h]=s[g]>>>u}},r.F._putsE=function(o,a,s){s<<=7&a;var u=a>>>3;o[u]|=s,o[u+1]|=s>>>8},r.F._putsF=function(o,a,s){s<<=7&a;var u=a>>>3;o[u]|=s,o[u+1]|=s>>>8,o[u+2]|=s>>>16},r.F._bitsE=function(o,a,s){return(o[a>>>3]|o[1+(a>>>3)]<<8)>>>(7&a)&(1<<s)-1},r.F._bitsF=function(o,a,s){return(o[a>>>3]|o[1+(a>>>3)]<<8|o[2+(a>>>3)]<<16)>>>(7&a)&(1<<s)-1},r.F._get17=function(o,a){return(o[a>>>3]|o[1+(a>>>3)]<<8|o[2+(a>>>3)]<<16)>>>(7&a)},r.F._get25=function(o,a){return(o[a>>>3]|o[1+(a>>>3)]<<8|o[2+(a>>>3)]<<16|o[3+(a>>>3)]<<24)>>>(7&a)},r.F.U=(t=Uint16Array,n=Uint32Array,{next_code:new t(16),bl_count:new t(16),ordr:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],of0:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],exb:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],ldef:new t(32),df0:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],dxb:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],ddef:new n(32),flmap:new t(512),fltree:[],fdmap:new t(32),fdtree:[],lmap:new t(32768),ltree:[],ttree:[],dmap:new t(32768),dtree:[],imap:new t(512),itree:[],rev15:new t(32768),lhst:new n(286),dhst:new n(30),ihst:new n(19),lits:new n(15e3),strt:new t(65536),prev:new t(32768)}),function(){for(var o=r.F.U,a=0;a<32768;a++){var s=a;s=(4278255360&(s=(4042322160&(s=(3435973836&(s=(2863311530&s)>>>1|(1431655765&s)<<1))>>>2|(858993459&s)<<2))>>>4|(252645135&s)<<4))>>>8|(16711935&s)<<8,o.rev15[a]=(s>>>16|s<<16)>>>17}function u(h,g,d){for(;g--!=0;)h.push(0,d)}for(a=0;a<32;a++)o.ldef[a]=o.of0[a]<<3|o.exb[a],o.ddef[a]=o.df0[a]<<4|o.dxb[a];u(o.fltree,144,8),u(o.fltree,112,9),u(o.fltree,24,7),u(o.fltree,8,8),r.F.makeCodes(o.fltree,9),r.F.codes2map(o.fltree,9,o.flmap),r.F.revCodes(o.fltree,9),u(o.fdtree,32,5),r.F.makeCodes(o.fdtree,5),r.F.codes2map(o.fdtree,5,o.fdmap),r.F.revCodes(o.fdtree,5),u(o.itree,19,0),u(o.ltree,286,0),u(o.dtree,30,0),u(o.ttree,320,0)}()})();var mte=fte({__proto__:null,default:p6},[p6]);const Ei=function(){var e={nextZero(d,f){for(;d[f]!=0;)f++;return f},readUshort:(d,f)=>d[f]<<8|d[f+1],writeUshort(d,f,p){d[f]=p>>8&255,d[f+1]=255&p},readUint:(d,f)=>16777216*d[f]+(d[f+1]<<16|d[f+2]<<8|d[f+3]),writeUint(d,f,p){d[f]=p>>24&255,d[f+1]=p>>16&255,d[f+2]=p>>8&255,d[f+3]=255&p},readASCII(d,f,p){let C="";for(let v=0;v<p;v++)C+=String.fromCharCode(d[f+v]);return C},writeASCII(d,f,p){for(let C=0;C<p.length;C++)d[f+C]=p.charCodeAt(C)},readBytes(d,f,p){const C=[];for(let v=0;v<p;v++)C.push(d[f+v]);return C},pad:d=>d.length<2?`0${d}`:d,readUTF8(d,f,p){let C,v="";for(let y=0;y<p;y++)v+=`%${e.pad(d[f+y].toString(16))}`;try{C=decodeURIComponent(v)}catch{return e.readASCII(d,f,p)}return C}};function t(d,f,p,C){const v=f*p,y=a(C),E=Math.ceil(f*y/8),w=new Uint8Array(4*v),x=new Uint32Array(w.buffer),{ctype:I}=C,{depth:A}=C,V=e.readUshort;if(I==6){const J=v<<2;if(A==8)for(var F=0;F<J;F+=4)w[F]=d[F],w[F+1]=d[F+1],w[F+2]=d[F+2],w[F+3]=d[F+3];if(A==16)for(F=0;F<J;F++)w[F]=d[F<<1]}else if(I==2){const J=C.tabs.tRNS;if(J==null){if(A==8)for(F=0;F<v;F++){var R=3*F;x[F]=255<<24|d[R+2]<<16|d[R+1]<<8|d[R]}if(A==16)for(F=0;F<v;F++)R=6*F,x[F]=255<<24|d[R+4]<<16|d[R+2]<<8|d[R]}else{var P=J[0];const ee=J[1],ge=J[2];if(A==8)for(F=0;F<v;F++){var O=F<<2;R=3*F,x[F]=255<<24|d[R+2]<<16|d[R+1]<<8|d[R],d[R]==P&&d[R+1]==ee&&d[R+2]==ge&&(w[O+3]=0)}if(A==16)for(F=0;F<v;F++)O=F<<2,R=6*F,x[F]=255<<24|d[R+4]<<16|d[R+2]<<8|d[R],V(d,R)==P&&V(d,R+2)==ee&&V(d,R+4)==ge&&(w[O+3]=0)}}else if(I==3){const J=C.tabs.PLTE,ee=C.tabs.tRNS,ge=ee?ee.length:0;if(A==1)for(var N=0;N<p;N++){var G=N*E,q=N*f;for(F=0;F<f;F++){O=q+F<<2;var Q=3*(T=d[G+(F>>3)]>>7-((7&F)<<0)&1);w[O]=J[Q],w[O+1]=J[Q+1],w[O+2]=J[Q+2],w[O+3]=T<ge?ee[T]:255}}if(A==2)for(N=0;N<p;N++)for(G=N*E,q=N*f,F=0;F<f;F++)O=q+F<<2,Q=3*(T=d[G+(F>>2)]>>6-((3&F)<<1)&3),w[O]=J[Q],w[O+1]=J[Q+1],w[O+2]=J[Q+2],w[O+3]=T<ge?ee[T]:255;if(A==4)for(N=0;N<p;N++)for(G=N*E,q=N*f,F=0;F<f;F++)O=q+F<<2,Q=3*(T=d[G+(F>>1)]>>4-((1&F)<<2)&15),w[O]=J[Q],w[O+1]=J[Q+1],w[O+2]=J[Q+2],w[O+3]=T<ge?ee[T]:255;if(A==8)for(F=0;F<v;F++){var T;O=F<<2,Q=3*(T=d[F]),w[O]=J[Q],w[O+1]=J[Q+1],w[O+2]=J[Q+2],w[O+3]=T<ge?ee[T]:255}}else if(I==4){if(A==8)for(F=0;F<v;F++){O=F<<2;var W=d[D=F<<1];w[O]=W,w[O+1]=W,w[O+2]=W,w[O+3]=d[D+1]}if(A==16)for(F=0;F<v;F++){var D;O=F<<2,W=d[D=F<<2],w[O]=W,w[O+1]=W,w[O+2]=W,w[O+3]=d[D+2]}}else if(I==0)for(P=C.tabs.tRNS?C.tabs.tRNS:-1,N=0;N<p;N++){const J=N*E,ee=N*f;if(A==1)for(var H=0;H<f;H++){var Z=(W=255*(d[J+(H>>>3)]>>>7-(7&H)&1))==255*P?0:255;x[ee+H]=Z<<24|W<<16|W<<8|W}else if(A==2)for(H=0;H<f;H++)Z=(W=85*(d[J+(H>>>2)]>>>6-((3&H)<<1)&3))==85*P?0:255,x[ee+H]=Z<<24|W<<16|W<<8|W;else if(A==4)for(H=0;H<f;H++)Z=(W=17*(d[J+(H>>>1)]>>>4-((1&H)<<2)&15))==17*P?0:255,x[ee+H]=Z<<24|W<<16|W<<8|W;else if(A==8)for(H=0;H<f;H++)Z=(W=d[J+H])==P?0:255,x[ee+H]=Z<<24|W<<16|W<<8|W;else if(A==16)for(H=0;H<f;H++)W=d[J+(H<<1)],Z=V(d,J+(H<<1))==P?0:255,x[ee+H]=Z<<24|W<<16|W<<8|W}return w}function n(d,f,p,C){const v=a(d),y=Math.ceil(p*v/8),E=new Uint8Array((y+1+d.interlace)*C);return f=d.tabs.CgBI?o(f,E):r(f,E),d.interlace==0?f=s(f,d,0,p,C):d.interlace==1&&(f=function(x,I){const A=I.width,V=I.height,F=a(I),R=F>>3,P=Math.ceil(A*F/8),O=new Uint8Array(V*P);let N=0;const G=[0,0,4,0,2,0,1],q=[0,4,0,2,0,1,0],Q=[8,8,8,4,4,2,2],T=[8,8,4,4,2,2,1];let W=0;for(;W<7;){const H=Q[W],Z=T[W];let J=0,ee=0,ge=G[W];for(;ge<V;)ge+=H,ee++;let ce=q[W];for(;ce<A;)ce+=Z,J++;const Ie=Math.ceil(J*F/8);s(x,I,N,J,ee);let Ce=0,re=G[W];for(;re<V;){let ue=q[W],me=N+Ce*Ie<<3;for(;ue<A;){var D;if(F==1&&(D=(D=x[me>>3])>>7-(7&me)&1,O[re*P+(ue>>3)]|=D<<7-((7&ue)<<0)),F==2&&(D=(D=x[me>>3])>>6-(7&me)&3,O[re*P+(ue>>2)]|=D<<6-((3&ue)<<1)),F==4&&(D=(D=x[me>>3])>>4-(7&me)&15,O[re*P+(ue>>1)]|=D<<4-((1&ue)<<2)),F>=8){const ye=re*P+ue*R;for(let ke=0;ke<R;ke++)O[ye+ke]=x[(me>>3)+ke]}me+=F,ue+=Z}Ce++,re+=H}J*ee!=0&&(N+=ee*(1+Ie)),W+=1}return O}(f,d)),f}function r(d,f){return o(new Uint8Array(d.buffer,2,d.length-6),f)}var o=function(){const d={H:{}};return d.H.N=function(f,p){const C=Uint8Array;let v,y,E=0,w=0,x=0,I=0,A=0,V=0,F=0,R=0,P=0;if(f[0]==3&&f[1]==0)return p||new C(0);const O=d.H,N=O.b,G=O.e,q=O.R,Q=O.n,T=O.A,W=O.Z,D=O.m,H=p==null;for(H&&(p=new C(f.length>>>2<<5));E==0;)if(E=N(f,P,1),w=N(f,P+1,2),P+=3,w!=0){if(H&&(p=d.H.W(p,R+(1<<17))),w==1&&(v=D.J,y=D.h,V=511,F=31),w==2){x=G(f,P,5)+257,I=G(f,P+5,5)+1,A=G(f,P+10,4)+4,P+=14;let J=1;for(var Z=0;Z<38;Z+=2)D.Q[Z]=0,D.Q[Z+1]=0;for(Z=0;Z<A;Z++){const ce=G(f,P+3*Z,3);D.Q[1+(D.X[Z]<<1)]=ce,ce>J&&(J=ce)}P+=3*A,Q(D.Q,J),T(D.Q,J,D.u),v=D.w,y=D.d,P=q(D.u,(1<<J)-1,x+I,f,P,D.v);const ee=O.V(D.v,0,x,D.C);V=(1<<ee)-1;const ge=O.V(D.v,x,I,D.D);F=(1<<ge)-1,Q(D.C,ee),T(D.C,ee,v),Q(D.D,ge),T(D.D,ge,y)}for(;;){const J=v[W(f,P)&V];P+=15&J;const ee=J>>>4;if(ee>>>8==0)p[R++]=ee;else{if(ee==256)break;{let ge=R+ee-254;if(ee>264){const ue=D.q[ee-257];ge=R+(ue>>>3)+G(f,P,7&ue),P+=7&ue}const ce=y[W(f,P)&F];P+=15&ce;const Ie=ce>>>4,Ce=D.c[Ie],re=(Ce>>>4)+N(f,P,15&Ce);for(P+=15&Ce;R<ge;)p[R]=p[R++-re],p[R]=p[R++-re],p[R]=p[R++-re],p[R]=p[R++-re];R=ge}}}}else{(7&P)!=0&&(P+=8-(7&P));const J=4+(P>>>3),ee=f[J-4]|f[J-3]<<8;H&&(p=d.H.W(p,R+ee)),p.set(new C(f.buffer,f.byteOffset+J,ee),R),P=J+ee<<3,R+=ee}return p.length==R?p:p.slice(0,R)},d.H.W=function(f,p){const C=f.length;if(p<=C)return f;const v=new Uint8Array(C<<1);return v.set(f,0),v},d.H.R=function(f,p,C,v,y,E){const w=d.H.e,x=d.H.Z;let I=0;for(;I<C;){const A=f[x(v,y)&p];y+=15&A;const V=A>>>4;if(V<=15)E[I]=V,I++;else{let F=0,R=0;V==16?(R=3+w(v,y,2),y+=2,F=E[I-1]):V==17?(R=3+w(v,y,3),y+=3):V==18&&(R=11+w(v,y,7),y+=7);const P=I+R;for(;I<P;)E[I]=F,I++}}return y},d.H.V=function(f,p,C,v){let y=0,E=0;const w=v.length>>>1;for(;E<C;){const x=f[E+p];v[E<<1]=0,v[1+(E<<1)]=x,x>y&&(y=x),E++}for(;E<w;)v[E<<1]=0,v[1+(E<<1)]=0,E++;return y},d.H.n=function(f,p){const C=d.H.m,v=f.length;let y,E,w,x;const I=C.j;for(var A=0;A<=p;A++)I[A]=0;for(A=1;A<v;A+=2)I[f[A]]++;const V=C.K;for(y=0,I[0]=0,E=1;E<=p;E++)y=y+I[E-1]<<1,V[E]=y;for(w=0;w<v;w+=2)x=f[w+1],x!=0&&(f[w]=V[x],V[x]++)},d.H.A=function(f,p,C){const v=f.length,y=d.H.m.r;for(let E=0;E<v;E+=2)if(f[E+1]!=0){const w=E>>1,x=f[E+1],I=w<<4|x,A=p-x;let V=f[E]<<A;const F=V+(1<<A);for(;V!=F;)C[y[V]>>>15-p]=I,V++}},d.H.l=function(f,p){const C=d.H.m.r,v=15-p;for(let y=0;y<f.length;y+=2){const E=f[y]<<p-f[y+1];f[y]=C[E]>>>v}},d.H.M=function(f,p,C){C<<=7&p;const v=p>>>3;f[v]|=C,f[v+1]|=C>>>8},d.H.I=function(f,p,C){C<<=7&p;const v=p>>>3;f[v]|=C,f[v+1]|=C>>>8,f[v+2]|=C>>>16},d.H.e=function(f,p,C){return(f[p>>>3]|f[1+(p>>>3)]<<8)>>>(7&p)&(1<<C)-1},d.H.b=function(f,p,C){return(f[p>>>3]|f[1+(p>>>3)]<<8|f[2+(p>>>3)]<<16)>>>(7&p)&(1<<C)-1},d.H.Z=function(f,p){return(f[p>>>3]|f[1+(p>>>3)]<<8|f[2+(p>>>3)]<<16)>>>(7&p)},d.H.i=function(f,p){return(f[p>>>3]|f[1+(p>>>3)]<<8|f[2+(p>>>3)]<<16|f[3+(p>>>3)]<<24)>>>(7&p)},d.H.m=function(){const f=Uint16Array,p=Uint32Array;return{K:new f(16),j:new f(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new f(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new p(32),J:new f(512),_:[],h:new f(32),$:[],w:new f(32768),C:[],v:[],d:new f(32768),D:[],u:new f(512),Q:[],r:new f(32768),s:new p(286),Y:new p(30),a:new p(19),t:new p(15e3),k:new f(65536),g:new f(32768)}}(),function(){const f=d.H.m;for(var p=0;p<32768;p++){let v=p;v=(2863311530&v)>>>1|(1431655765&v)<<1,v=(3435973836&v)>>>2|(858993459&v)<<2,v=(4042322160&v)>>>4|(252645135&v)<<4,v=(4278255360&v)>>>8|(16711935&v)<<8,f.r[p]=(v>>>16|v<<16)>>>17}function C(v,y,E){for(;y--!=0;)v.push(0,E)}for(p=0;p<32;p++)f.q[p]=f.S[p]<<3|f.T[p],f.c[p]=f.p[p]<<4|f.z[p];C(f._,144,8),C(f._,112,9),C(f._,24,7),C(f._,8,8),d.H.n(f._,9),d.H.A(f._,9,f.J),d.H.l(f._,9),C(f.$,32,5),d.H.n(f.$,5),d.H.A(f.$,5,f.h),d.H.l(f.$,5),C(f.Q,19,0),C(f.C,286,0),C(f.D,30,0),C(f.v,320,0)}(),d.H.N}();function a(d){return[1,null,3,1,2,null,4][d.ctype]*d.depth}function s(d,f,p,C,v){let y=a(f);const E=Math.ceil(C*y/8);let w,x;y=Math.ceil(y/8);let I=d[p],A=0;if(I>1&&(d[p]=[0,0,1][I-2]),I==3)for(A=y;A<E;A++)d[A+1]=d[A+1]+(d[A+1-y]>>>1)&255;for(let V=0;V<v;V++)if(w=p+V*E,x=w+V+1,I=d[x-1],A=0,I==0)for(;A<E;A++)d[w+A]=d[x+A];else if(I==1){for(;A<y;A++)d[w+A]=d[x+A];for(;A<E;A++)d[w+A]=d[x+A]+d[w+A-y]}else if(I==2)for(;A<E;A++)d[w+A]=d[x+A]+d[w+A-E];else if(I==3){for(;A<y;A++)d[w+A]=d[x+A]+(d[w+A-E]>>>1);for(;A<E;A++)d[w+A]=d[x+A]+(d[w+A-E]+d[w+A-y]>>>1)}else{for(;A<y;A++)d[w+A]=d[x+A]+u(0,d[w+A-E],0);for(;A<E;A++)d[w+A]=d[x+A]+u(d[w+A-y],d[w+A-E],d[w+A-y-E])}return d}function u(d,f,p){const C=d+f-p,v=C-d,y=C-f,E=C-p;return v*v<=y*y&&v*v<=E*E?d:y*y<=E*E?f:p}function h(d,f,p){p.width=e.readUint(d,f),f+=4,p.height=e.readUint(d,f),f+=4,p.depth=d[f],f++,p.ctype=d[f],f++,p.compress=d[f],f++,p.filter=d[f],f++,p.interlace=d[f],f++}function g(d,f,p,C,v,y,E,w,x){const I=Math.min(f,v),A=Math.min(p,y);let V=0,F=0;for(let W=0;W<A;W++)for(let D=0;D<I;D++)if(E>=0&&w>=0?(V=W*f+D<<2,F=(w+W)*v+E+D<<2):(V=(-w+W)*f-E+D<<2,F=W*v+D<<2),x==0)C[F]=d[V],C[F+1]=d[V+1],C[F+2]=d[V+2],C[F+3]=d[V+3];else if(x==1){var R=d[V+3]*.00392156862745098,P=d[V]*R,O=d[V+1]*R,N=d[V+2]*R,G=C[F+3]*(1/255),q=C[F]*G,Q=C[F+1]*G,T=C[F+2]*G;const H=1-R,Z=R+G*H,J=Z==0?0:1/Z;C[F+3]=255*Z,C[F+0]=(P+q*H)*J,C[F+1]=(O+Q*H)*J,C[F+2]=(N+T*H)*J}else if(x==2)R=d[V+3],P=d[V],O=d[V+1],N=d[V+2],G=C[F+3],q=C[F],Q=C[F+1],T=C[F+2],R==G&&P==q&&O==Q&&N==T?(C[F]=0,C[F+1]=0,C[F+2]=0,C[F+3]=0):(C[F]=P,C[F+1]=O,C[F+2]=N,C[F+3]=R);else if(x==3){if(R=d[V+3],P=d[V],O=d[V+1],N=d[V+2],G=C[F+3],q=C[F],Q=C[F+1],T=C[F+2],R==G&&P==q&&O==Q&&N==T)continue;if(R<220&&G>20)return!1}return!0}return{decode:function(f){const p=new Uint8Array(f);let C=8;const v=e,y=v.readUshort,E=v.readUint,w={tabs:{},frames:[]},x=new Uint8Array(p.length);let I,A=0,V=0;const F=[137,80,78,71,13,10,26,10];for(var R=0;R<8;R++)if(p[R]!=F[R])throw"The input is not a PNG file!";for(;C<p.length;){const W=v.readUint(p,C);C+=4;const D=v.readASCII(p,C,4);if(C+=4,D=="IHDR")h(p,C,w);else if(D=="iCCP"){for(var P=C;p[P]!=0;)P++;v.readASCII(p,C,P-C),p[P+1];const H=p.slice(P+2,C+W);let Z=null;try{Z=r(H)}catch{Z=o(H)}w.tabs[D]=Z}else if(D=="CgBI")w.tabs[D]=p.slice(C,C+4);else if(D=="IDAT"){for(R=0;R<W;R++)x[A+R]=p[C+R];A+=W}else if(D=="acTL")w.tabs[D]={num_frames:E(p,C),num_plays:E(p,C+4)},I=new Uint8Array(p.length);else if(D=="fcTL"){V!=0&&((T=w.frames[w.frames.length-1]).data=n(w,I.slice(0,V),T.rect.width,T.rect.height),V=0);const H={x:E(p,C+12),y:E(p,C+16),width:E(p,C+4),height:E(p,C+8)};let Z=y(p,C+22);Z=y(p,C+20)/(Z==0?100:Z);const J={rect:H,delay:Math.round(1e3*Z),dispose:p[C+24],blend:p[C+25]};w.frames.push(J)}else if(D=="fdAT"){for(R=0;R<W-4;R++)I[V+R]=p[C+R+4];V+=W-4}else if(D=="pHYs")w.tabs[D]=[v.readUint(p,C),v.readUint(p,C+4),p[C+8]];else if(D=="cHRM")for(w.tabs[D]=[],R=0;R<8;R++)w.tabs[D].push(v.readUint(p,C+4*R));else if(D=="tEXt"||D=="zTXt"){w.tabs[D]==null&&(w.tabs[D]={});var O=v.nextZero(p,C),N=v.readASCII(p,C,O-C),G=C+W-O-1;if(D=="tEXt")Q=v.readASCII(p,O+1,G);else{var q=r(p.slice(O+2,O+2+G));Q=v.readUTF8(q,0,q.length)}w.tabs[D][N]=Q}else if(D=="iTXt"){w.tabs[D]==null&&(w.tabs[D]={}),O=0,P=C,O=v.nextZero(p,P),N=v.readASCII(p,P,O-P);const H=p[P=O+1];var Q;p[P+1],P+=2,O=v.nextZero(p,P),v.readASCII(p,P,O-P),P=O+1,O=v.nextZero(p,P),v.readUTF8(p,P,O-P),G=W-((P=O+1)-C),H==0?Q=v.readUTF8(p,P,G):(q=r(p.slice(P,P+G)),Q=v.readUTF8(q,0,q.length)),w.tabs[D][N]=Q}else if(D=="PLTE")w.tabs[D]=v.readBytes(p,C,W);else if(D=="hIST"){const H=w.tabs.PLTE.length/3;for(w.tabs[D]=[],R=0;R<H;R++)w.tabs[D].push(y(p,C+2*R))}else if(D=="tRNS")w.ctype==3?w.tabs[D]=v.readBytes(p,C,W):w.ctype==0?w.tabs[D]=y(p,C):w.ctype==2&&(w.tabs[D]=[y(p,C),y(p,C+2),y(p,C+4)]);else if(D=="gAMA")w.tabs[D]=v.readUint(p,C)/1e5;else if(D=="sRGB")w.tabs[D]=p[C];else if(D=="bKGD")w.ctype==0||w.ctype==4?w.tabs[D]=[y(p,C)]:w.ctype==2||w.ctype==6?w.tabs[D]=[y(p,C),y(p,C+2),y(p,C+4)]:w.ctype==3&&(w.tabs[D]=p[C]);else if(D=="IEND")break;C+=W,v.readUint(p,C),C+=4}var T;return V!=0&&((T=w.frames[w.frames.length-1]).data=n(w,I.slice(0,V),T.rect.width,T.rect.height)),w.data=n(w,x,w.width,w.height),delete w.compress,delete w.interlace,delete w.filter,w},toRGBA8:function(f){const p=f.width,C=f.height;if(f.tabs.acTL==null)return[t(f.data,p,C,f).buffer];const v=[];f.frames[0].data==null&&(f.frames[0].data=f.data);const y=p*C*4,E=new Uint8Array(y),w=new Uint8Array(y),x=new Uint8Array(y);for(let A=0;A<f.frames.length;A++){const V=f.frames[A],F=V.rect.x,R=V.rect.y,P=V.rect.width,O=V.rect.height,N=t(V.data,P,O,f);if(A!=0)for(var I=0;I<y;I++)x[I]=E[I];if(V.blend==0?g(N,P,O,E,p,C,F,R,0):V.blend==1&&g(N,P,O,E,p,C,F,R,1),v.push(E.buffer.slice(0)),V.dispose!=0){if(V.dispose==1)g(w,P,O,E,p,C,F,R,0);else if(V.dispose==2)for(I=0;I<y;I++)E[I]=x[I]}}return v},_paeth:u,_copyTile:g,_bin:e}}();(function(){const{_copyTile:e}=Ei,{_bin:t}=Ei,n=Ei._paeth;var r={table:function(){const P=new Uint32Array(256);for(let O=0;O<256;O++){let N=O;for(let G=0;G<8;G++)1&N?N=3988292384^N>>>1:N>>>=1;P[O]=N}return P}(),update(P,O,N,G){for(let q=0;q<G;q++)P=r.table[255&(P^O[N+q])]^P>>>8;return P},crc:(P,O,N)=>4294967295^r.update(4294967295,P,O,N)};function o(P,O,N,G){O[N]+=P[0]*G>>4,O[N+1]+=P[1]*G>>4,O[N+2]+=P[2]*G>>4,O[N+3]+=P[3]*G>>4}function a(P){return Math.max(0,Math.min(255,P))}function s(P,O){const N=P[0]-O[0],G=P[1]-O[1],q=P[2]-O[2],Q=P[3]-O[3];return N*N+G*G+q*q+Q*Q}function u(P,O,N,G,q,Q,T){T==null&&(T=1);const W=G.length,D=[];for(var H=0;H<W;H++){const re=G[H];D.push([re>>>0&255,re>>>8&255,re>>>16&255,re>>>24&255])}for(H=0;H<W;H++){let re=4294967295;for(var Z=0,J=0;J<W;J++){var ee=s(D[H],D[J]);J!=H&&ee<re&&(re=ee,Z=J)}}const ge=new Uint32Array(q.buffer),ce=new Int16Array(O*N*4),Ie=[0,8,2,10,12,4,14,6,3,11,1,9,15,7,13,5];for(H=0;H<Ie.length;H++)Ie[H]=255*((Ie[H]+.5)/16-.5);for(let re=0;re<N;re++)for(let ue=0;ue<O;ue++){var Ce;H=4*(re*O+ue),T!=2?Ce=[a(P[H]+ce[H]),a(P[H+1]+ce[H+1]),a(P[H+2]+ce[H+2]),a(P[H+3]+ce[H+3])]:(ee=Ie[4*(3&re)+(3&ue)],Ce=[a(P[H]+ee),a(P[H+1]+ee),a(P[H+2]+ee),a(P[H+3]+ee)]),Z=0;let me=16777215;for(J=0;J<W;J++){const xe=s(Ce,D[J]);xe<me&&(me=xe,Z=J)}const ye=D[Z],ke=[Ce[0]-ye[0],Ce[1]-ye[1],Ce[2]-ye[2],Ce[3]-ye[3]];T==1&&(ue!=O-1&&o(ke,ce,H+4,7),re!=N-1&&(ue!=0&&o(ke,ce,H+4*O-4,3),o(ke,ce,H+4*O,5),ue!=O-1&&o(ke,ce,H+4*O+4,1))),Q[H>>2]=Z,ge[H>>2]=G[Z]}}function h(P,O,N,G,q){q==null&&(q={});const{crc:Q}=r,T=t.writeUint,W=t.writeUshort,D=t.writeASCII;let H=8;const Z=P.frames.length>1;let J,ee=!1,ge=33+(Z?20:0);if(q.sRGB!=null&&(ge+=13),q.pHYs!=null&&(ge+=21),q.iCCP!=null&&(J=pako.deflate(q.iCCP),ge+=21+J.length+4),P.ctype==3){for(var ce=P.plte.length,Ie=0;Ie<ce;Ie++)P.plte[Ie]>>>24!=255&&(ee=!0);ge+=8+3*ce+4+(ee?8+1*ce+4:0)}for(var Ce=0;Ce<P.frames.length;Ce++)Z&&(ge+=38),ge+=(ye=P.frames[Ce]).cimg.length+12,Ce!=0&&(ge+=4);ge+=12;const re=new Uint8Array(ge),ue=[137,80,78,71,13,10,26,10];for(Ie=0;Ie<8;Ie++)re[Ie]=ue[Ie];if(T(re,H,13),H+=4,D(re,H,"IHDR"),H+=4,T(re,H,O),H+=4,T(re,H,N),H+=4,re[H]=P.depth,H++,re[H]=P.ctype,H++,re[H]=0,H++,re[H]=0,H++,re[H]=0,H++,T(re,H,Q(re,H-17,17)),H+=4,q.sRGB!=null&&(T(re,H,1),H+=4,D(re,H,"sRGB"),H+=4,re[H]=q.sRGB,H++,T(re,H,Q(re,H-5,5)),H+=4),q.iCCP!=null){const ke=13+J.length;T(re,H,ke),H+=4,D(re,H,"iCCP"),H+=4,D(re,H,"ICC profile"),H+=11,H+=2,re.set(J,H),H+=J.length,T(re,H,Q(re,H-(ke+4),ke+4)),H+=4}if(q.pHYs!=null&&(T(re,H,9),H+=4,D(re,H,"pHYs"),H+=4,T(re,H,q.pHYs[0]),H+=4,T(re,H,q.pHYs[1]),H+=4,re[H]=q.pHYs[2],H++,T(re,H,Q(re,H-13,13)),H+=4),Z&&(T(re,H,8),H+=4,D(re,H,"acTL"),H+=4,T(re,H,P.frames.length),H+=4,T(re,H,q.loop!=null?q.loop:0),H+=4,T(re,H,Q(re,H-12,12)),H+=4),P.ctype==3){for(T(re,H,3*(ce=P.plte.length)),H+=4,D(re,H,"PLTE"),H+=4,Ie=0;Ie<ce;Ie++){const ke=3*Ie,xe=P.plte[Ie],Ue=255&xe,tt=xe>>>8&255,we=xe>>>16&255;re[H+ke+0]=Ue,re[H+ke+1]=tt,re[H+ke+2]=we}if(H+=3*ce,T(re,H,Q(re,H-3*ce-4,3*ce+4)),H+=4,ee){for(T(re,H,ce),H+=4,D(re,H,"tRNS"),H+=4,Ie=0;Ie<ce;Ie++)re[H+Ie]=P.plte[Ie]>>>24&255;H+=ce,T(re,H,Q(re,H-ce-4,ce+4)),H+=4}}let me=0;for(Ce=0;Ce<P.frames.length;Ce++){var ye=P.frames[Ce];Z&&(T(re,H,26),H+=4,D(re,H,"fcTL"),H+=4,T(re,H,me++),H+=4,T(re,H,ye.rect.width),H+=4,T(re,H,ye.rect.height),H+=4,T(re,H,ye.rect.x),H+=4,T(re,H,ye.rect.y),H+=4,W(re,H,G[Ce]),H+=2,W(re,H,1e3),H+=2,re[H]=ye.dispose,H++,re[H]=ye.blend,H++,T(re,H,Q(re,H-30,30)),H+=4);const ke=ye.cimg;T(re,H,(ce=ke.length)+(Ce==0?0:4)),H+=4;const xe=H;D(re,H,Ce==0?"IDAT":"fdAT"),H+=4,Ce!=0&&(T(re,H,me++),H+=4),re.set(ke,H),H+=ce,T(re,H,Q(re,xe,H-xe)),H+=4}return T(re,H,0),H+=4,D(re,H,"IEND"),H+=4,T(re,H,Q(re,H-4,4)),H+=4,re.buffer}function g(P,O,N){for(let G=0;G<P.frames.length;G++){const q=P.frames[G];q.rect.width;const Q=q.rect.height,T=new Uint8Array(Q*q.bpl+Q);q.cimg=C(q.img,Q,q.bpp,q.bpl,T,O,N)}}function d(P,O,N,G,q){const Q=q[0],T=q[1],W=q[2],D=q[3],H=q[4],Z=q[5];let J=6,ee=8,ge=255;for(var ce=0;ce<P.length;ce++){const Ve=new Uint8Array(P[ce]);for(var Ie=Ve.length,Ce=0;Ce<Ie;Ce+=4)ge&=Ve[Ce+3]}const re=ge!=255,ue=function(_e,qe,wt,he,Se,Ae){const Me=[];for(var ze=0;ze<_e.length;ze++){const Ye=new Uint8Array(_e[ze]),zt=new Uint32Array(Ye.buffer);var Oe;let It=0,De=0,Ct=qe,lt=wt,St=he?1:0;if(ze!=0){const Xt=Ae||he||ze==1||Me[ze-2].dispose!=0?1:2;let qt=0,S1=1e9;for(let F1=0;F1<Xt;F1++){var Re=new Uint8Array(_e[ze-1-F1]);const g1=new Uint32Array(_e[ze-1-F1]);let f1=qe,V1=wt,sn=-1,fn=-1;for(let cn=0;cn<wt;cn++)for(let In=0;In<qe;In++)zt[We=cn*qe+In]!=g1[We]&&(In<f1&&(f1=In),In>sn&&(sn=In),cn<V1&&(V1=cn),cn>fn&&(fn=cn));sn==-1&&(f1=V1=sn=fn=0),Se&&((1&f1)==1&&f1--,(1&V1)==1&&V1--);const nr=(sn-f1+1)*(fn-V1+1);nr<S1&&(S1=nr,qt=F1,It=f1,De=V1,Ct=sn-f1+1,lt=fn-V1+1)}Re=new Uint8Array(_e[ze-1-qt]),qt==1&&(Me[ze-1].dispose=2),Oe=new Uint8Array(Ct*lt*4),e(Re,qe,wt,Oe,Ct,lt,-It,-De,0),St=e(Ye,qe,wt,Oe,Ct,lt,-It,-De,3)?1:0,St==1?p(Ye,qe,wt,Oe,{x:It,y:De,width:Ct,height:lt}):e(Ye,qe,wt,Oe,Ct,lt,-It,-De,0)}else Oe=Ye.slice(0);Me.push({rect:{x:It,y:De,width:Ct,height:lt},img:Oe,blend:St,dispose:0})}if(he)for(ze=0;ze<Me.length;ze++){if((Ke=Me[ze]).blend==1)continue;const Ye=Ke.rect,zt=Me[ze-1].rect,It=Math.min(Ye.x,zt.x),De=Math.min(Ye.y,zt.y),Ct={x:It,y:De,width:Math.max(Ye.x+Ye.width,zt.x+zt.width)-It,height:Math.max(Ye.y+Ye.height,zt.y+zt.height)-De};Me[ze-1].dispose=1,ze-1!=0&&f(_e,qe,wt,Me,ze-1,Ct,Se),f(_e,qe,wt,Me,ze,Ct,Se)}let rt=0;if(_e.length!=1)for(var We=0;We<Me.length;We++){var Ke;rt+=(Ke=Me[We]).rect.width*Ke.rect.height}return Me}(P,O,N,Q,T,W),me={},ye=[],ke=[];if(G!=0){const Ve=[];for(Ce=0;Ce<ue.length;Ce++)Ve.push(ue[Ce].img.buffer);const _e=function(Se){let Ae=0;for(var Me=0;Me<Se.length;Me++)Ae+=Se[Me].byteLength;const ze=new Uint8Array(Ae);let Oe=0;for(Me=0;Me<Se.length;Me++){const Re=new Uint8Array(Se[Me]),rt=Re.length;for(let We=0;We<rt;We+=4){let Ke=Re[We],Ye=Re[We+1],zt=Re[We+2];const It=Re[We+3];It==0&&(Ke=Ye=zt=0),ze[Oe+We]=Ke,ze[Oe+We+1]=Ye,ze[Oe+We+2]=zt,ze[Oe+We+3]=It}Oe+=rt}return ze.buffer}(Ve),qe=y(_e,G);for(Ce=0;Ce<qe.plte.length;Ce++)ye.push(qe.plte[Ce].est.rgba);let wt=0;for(Ce=0;Ce<ue.length;Ce++){const he=(Ue=ue[Ce]).img.length;var xe=new Uint8Array(qe.inds.buffer,wt>>2,he>>2);ke.push(xe);const Se=new Uint8Array(qe.abuf,wt,he);Z&&u(Ue.img,Ue.rect.width,Ue.rect.height,ye,Se,xe),Ue.img.set(Se),wt+=he}}else for(ce=0;ce<ue.length;ce++){var Ue=ue[ce];const Ve=new Uint32Array(Ue.img.buffer);var tt=Ue.rect.width;for(Ie=Ve.length,xe=new Uint8Array(Ie),ke.push(xe),Ce=0;Ce<Ie;Ce++){const _e=Ve[Ce];if(Ce!=0&&_e==Ve[Ce-1])xe[Ce]=xe[Ce-1];else if(Ce>tt&&_e==Ve[Ce-tt])xe[Ce]=xe[Ce-tt];else{let qe=me[_e];if(qe==null&&(me[_e]=qe=ye.length,ye.push(_e),ye.length>=300))break;xe[Ce]=qe}}}const we=ye.length;for(we<=256&&H==0&&(ee=we<=2?1:we<=4?2:we<=16?4:8,ee=Math.max(ee,D)),ce=0;ce<ue.length;ce++){(Ue=ue[ce]).rect.x,Ue.rect.y,tt=Ue.rect.width;const Ve=Ue.rect.height;let _e=Ue.img;new Uint32Array(_e.buffer);let qe=4*tt,wt=4;if(we<=256&&H==0){qe=Math.ceil(ee*tt/8);var Le=new Uint8Array(qe*Ve);const he=ke[ce];for(let Se=0;Se<Ve;Se++){Ce=Se*qe;const Ae=Se*tt;if(ee==8)for(var Ne=0;Ne<tt;Ne++)Le[Ce+Ne]=he[Ae+Ne];else if(ee==4)for(Ne=0;Ne<tt;Ne++)Le[Ce+(Ne>>1)]|=he[Ae+Ne]<<4-4*(1&Ne);else if(ee==2)for(Ne=0;Ne<tt;Ne++)Le[Ce+(Ne>>2)]|=he[Ae+Ne]<<6-2*(3&Ne);else if(ee==1)for(Ne=0;Ne<tt;Ne++)Le[Ce+(Ne>>3)]|=he[Ae+Ne]<<7-1*(7&Ne)}_e=Le,J=3,wt=1}else if(re==0&&ue.length==1){Le=new Uint8Array(tt*Ve*3);const he=tt*Ve;for(Ce=0;Ce<he;Ce++){const Se=3*Ce,Ae=4*Ce;Le[Se]=_e[Ae],Le[Se+1]=_e[Ae+1],Le[Se+2]=_e[Ae+2]}_e=Le,J=2,wt=3,qe=3*tt}Ue.img=_e,Ue.bpl=qe,Ue.bpp=wt}return{ctype:J,depth:ee,plte:ye,frames:ue}}function f(P,O,N,G,q,Q,T){const W=Uint8Array,D=Uint32Array,H=new W(P[q-1]),Z=new D(P[q-1]),J=q+1<P.length?new W(P[q+1]):null,ee=new W(P[q]),ge=new D(ee.buffer);let ce=O,Ie=N,Ce=-1,re=-1;for(let me=0;me<Q.height;me++)for(let ye=0;ye<Q.width;ye++){const ke=Q.x+ye,xe=Q.y+me,Ue=xe*O+ke,tt=ge[Ue];tt==0||G[q-1].dispose==0&&Z[Ue]==tt&&(J==null||J[4*Ue+3]!=0)||(ke<ce&&(ce=ke),ke>Ce&&(Ce=ke),xe<Ie&&(Ie=xe),xe>re&&(re=xe))}Ce==-1&&(ce=Ie=Ce=re=0),T&&((1&ce)==1&&ce--,(1&Ie)==1&&Ie--),Q={x:ce,y:Ie,width:Ce-ce+1,height:re-Ie+1};const ue=G[q];ue.rect=Q,ue.blend=1,ue.img=new Uint8Array(Q.width*Q.height*4),G[q-1].dispose==0?(e(H,O,N,ue.img,Q.width,Q.height,-Q.x,-Q.y,0),p(ee,O,N,ue.img,Q)):e(ee,O,N,ue.img,Q.width,Q.height,-Q.x,-Q.y,0)}function p(P,O,N,G,q){e(P,O,N,G,q.width,q.height,-q.x,-q.y,2)}function C(P,O,N,G,q,Q,T){const W=[];let D,H=[0,1,2,3,4];Q!=-1?H=[Q]:(O*G>5e5||N==1)&&(H=[0]),T&&(D={level:0});const Z=mte;for(var J=0;J<H.length;J++){for(let ce=0;ce<O;ce++)v(q,P,ce,G,N,H[J]);W.push(Z.deflate(q,D))}let ee,ge=1e9;for(J=0;J<W.length;J++)W[J].length<ge&&(ee=J,ge=W[J].length);return W[ee]}function v(P,O,N,G,q,Q){const T=N*G;let W=T+N;if(P[W]=Q,W++,Q==0)if(G<500)for(var D=0;D<G;D++)P[W+D]=O[T+D];else P.set(new Uint8Array(O.buffer,T,G),W);else if(Q==1){for(D=0;D<q;D++)P[W+D]=O[T+D];for(D=q;D<G;D++)P[W+D]=O[T+D]-O[T+D-q]+256&255}else if(N==0){for(D=0;D<q;D++)P[W+D]=O[T+D];if(Q==2)for(D=q;D<G;D++)P[W+D]=O[T+D];if(Q==3)for(D=q;D<G;D++)P[W+D]=O[T+D]-(O[T+D-q]>>1)+256&255;if(Q==4)for(D=q;D<G;D++)P[W+D]=O[T+D]-n(O[T+D-q],0,0)+256&255}else{if(Q==2)for(D=0;D<G;D++)P[W+D]=O[T+D]+256-O[T+D-G]&255;if(Q==3){for(D=0;D<q;D++)P[W+D]=O[T+D]+256-(O[T+D-G]>>1)&255;for(D=q;D<G;D++)P[W+D]=O[T+D]+256-(O[T+D-G]+O[T+D-q]>>1)&255}if(Q==4){for(D=0;D<q;D++)P[W+D]=O[T+D]+256-n(0,O[T+D-G],0)&255;for(D=q;D<G;D++)P[W+D]=O[T+D]+256-n(O[T+D-q],O[T+D-G],O[T+D-q-G])&255}}}function y(P,O){const N=new Uint8Array(P),G=N.slice(0),q=new Uint32Array(G.buffer),Q=E(G,O),T=Q[0],W=Q[1],D=N.length,H=new Uint8Array(D>>2);let Z;if(N.length<2e7)for(var J=0;J<D;J+=4)Z=w(T,ee=N[J]*(1/255),ge=N[J+1]*(1/255),ce=N[J+2]*(1/255),Ie=N[J+3]*(1/255)),H[J>>2]=Z.ind,q[J>>2]=Z.est.rgba;else for(J=0;J<D;J+=4){var ee=N[J]*.00392156862745098,ge=N[J+1]*(1/255),ce=N[J+2]*(1/255),Ie=N[J+3]*(1/255);for(Z=T;Z.left;)Z=x(Z.est,ee,ge,ce,Ie)<=0?Z.left:Z.right;H[J>>2]=Z.ind,q[J>>2]=Z.est.rgba}return{abuf:G.buffer,inds:H,plte:W}}function E(P,O,N){N==null&&(N=1e-4);const G=new Uint32Array(P.buffer),q={i0:0,i1:P.length,bst:null,est:null,tdst:0,left:null,right:null};q.bst=V(P,q.i0,q.i1),q.est=F(q.bst);const Q=[q];for(;Q.length<O;){let W=0,D=0;for(var T=0;T<Q.length;T++)Q[T].est.L>W&&(W=Q[T].est.L,D=T);if(W<N)break;const H=Q[D],Z=I(P,G,H.i0,H.i1,H.est.e,H.est.eMq255);if(H.i0>=Z||H.i1<=Z){H.est.L=0;continue}const J={i0:H.i0,i1:Z,bst:null,est:null,tdst:0,left:null,right:null};J.bst=V(P,J.i0,J.i1),J.est=F(J.bst);const ee={i0:Z,i1:H.i1,bst:null,est:null,tdst:0,left:null,right:null};for(ee.bst={R:[],m:[],N:H.bst.N-J.bst.N},T=0;T<16;T++)ee.bst.R[T]=H.bst.R[T]-J.bst.R[T];for(T=0;T<4;T++)ee.bst.m[T]=H.bst.m[T]-J.bst.m[T];ee.est=F(ee.bst),H.left=J,H.right=ee,Q[D]=J,Q.push(ee)}for(Q.sort((W,D)=>D.bst.N-W.bst.N),T=0;T<Q.length;T++)Q[T].ind=T;return[q,Q]}function w(P,O,N,G,q){if(P.left==null)return P.tdst=function(J,ee,ge,ce,Ie){const Ce=ee-J[0],re=ge-J[1],ue=ce-J[2],me=Ie-J[3];return Ce*Ce+re*re+ue*ue+me*me}(P.est.q,O,N,G,q),P;const Q=x(P.est,O,N,G,q);let T=P.left,W=P.right;Q>0&&(T=P.right,W=P.left);const D=w(T,O,N,G,q);if(D.tdst<=Q*Q)return D;const H=w(W,O,N,G,q);return H.tdst<D.tdst?H:D}function x(P,O,N,G,q){const{e:Q}=P;return Q[0]*O+Q[1]*N+Q[2]*G+Q[3]*q-P.eMq}function I(P,O,N,G,q,Q){for(G-=4;N<G;){for(;A(P,N,q)<=Q;)N+=4;for(;A(P,G,q)>Q;)G-=4;if(N>=G)break;const T=O[N>>2];O[N>>2]=O[G>>2],O[G>>2]=T,N+=4,G-=4}for(;A(P,N,q)>Q;)N-=4;return N+4}function A(P,O,N){return P[O]*N[0]+P[O+1]*N[1]+P[O+2]*N[2]+P[O+3]*N[3]}function V(P,O,N){const G=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],q=[0,0,0,0],Q=N-O>>2;for(let T=O;T<N;T+=4){const W=P[T]*.00392156862745098,D=P[T+1]*(1/255),H=P[T+2]*(1/255),Z=P[T+3]*(1/255);q[0]+=W,q[1]+=D,q[2]+=H,q[3]+=Z,G[0]+=W*W,G[1]+=W*D,G[2]+=W*H,G[3]+=W*Z,G[5]+=D*D,G[6]+=D*H,G[7]+=D*Z,G[10]+=H*H,G[11]+=H*Z,G[15]+=Z*Z}return G[4]=G[1],G[8]=G[2],G[9]=G[6],G[12]=G[3],G[13]=G[7],G[14]=G[11],{R:G,m:q,N:Q}}function F(P){const{R:O}=P,{m:N}=P,{N:G}=P,q=N[0],Q=N[1],T=N[2],W=N[3],D=G==0?0:1/G,H=[O[0]-q*q*D,O[1]-q*Q*D,O[2]-q*T*D,O[3]-q*W*D,O[4]-Q*q*D,O[5]-Q*Q*D,O[6]-Q*T*D,O[7]-Q*W*D,O[8]-T*q*D,O[9]-T*Q*D,O[10]-T*T*D,O[11]-T*W*D,O[12]-W*q*D,O[13]-W*Q*D,O[14]-W*T*D,O[15]-W*W*D],Z=H,J=R;let ee=[Math.random(),Math.random(),Math.random(),Math.random()],ge=0,ce=0;if(G!=0)for(let Ce=0;Ce<16&&(ee=J.multVec(Z,ee),ce=Math.sqrt(J.dot(ee,ee)),ee=J.sml(1/ce,ee),!(Ce!=0&&Math.abs(ce-ge)<1e-9));Ce++)ge=ce;const Ie=[q*D,Q*D,T*D,W*D];return{Cov:H,q:Ie,e:ee,L:ge,eMq255:J.dot(J.sml(255,Ie),ee),eMq:J.dot(ee,Ie),rgba:(Math.round(255*Ie[3])<<24|Math.round(255*Ie[2])<<16|Math.round(255*Ie[1])<<8|Math.round(255*Ie[0])<<0)>>>0}}var R={multVec:(P,O)=>[P[0]*O[0]+P[1]*O[1]+P[2]*O[2]+P[3]*O[3],P[4]*O[0]+P[5]*O[1]+P[6]*O[2]+P[7]*O[3],P[8]*O[0]+P[9]*O[1]+P[10]*O[2]+P[11]*O[3],P[12]*O[0]+P[13]*O[1]+P[14]*O[2]+P[15]*O[3]],dot:(P,O)=>P[0]*O[0]+P[1]*O[1]+P[2]*O[2]+P[3]*O[3],sml:(P,O)=>[P*O[0],P*O[1],P*O[2],P*O[3]]};Ei.encode=function(O,N,G,q,Q,T,W){q==null&&(q=0),W==null&&(W=!1);const D=d(O,N,G,q,[!1,!1,!1,0,W,!1]);return g(D,-1),h(D,N,G,Q,T)},Ei.encodeLL=function(O,N,G,q,Q,T,W,D){const H={ctype:0+(q==1?0:2)+(Q==0?0:4),depth:T,frames:[]},Z=(q+Q)*T,J=Z*N;for(let ee=0;ee<O.length;ee++)H.frames.push({rect:{x:0,y:0,width:N,height:G},img:new Uint8Array(O[ee]),blend:0,dispose:1,bpp:Math.ceil(Z/8),bpl:Math.ceil(J/8)});return g(H,0,!0),h(H,N,G,W,D)},Ei.encode.compress=d,Ei.encode.dither=u,Ei.quantize=y,Ei.quantize.getKDtree=E,Ei.quantize.getNearest=w})();const gb={toArrayBuffer(e,t){const n=e.width,r=e.height,o=n<<2,a=e.getContext("2d").getImageData(0,0,n,r),s=new Uint32Array(a.data.buffer),u=(32*n+31)/32<<2,h=u*r,g=122+h,d=new ArrayBuffer(g),f=new DataView(d),p=1<<20;let C,v,y,E,w=p,x=0,I=0,A=0;function V(P){f.setUint16(I,P,!0),I+=2}function F(P){f.setUint32(I,P,!0),I+=4}function R(P){I+=P}V(19778),F(g),R(4),F(122),F(108),F(n),F(-r>>>0),V(1),V(32),F(3),F(h),F(2835),F(2835),R(8),F(16711680),F(65280),F(255),F(4278190080),F(1466527264),function P(){for(;x<r&&w>0;){for(E=122+x*u,C=0;C<o;)w--,v=s[A++],y=v>>>24,f.setUint32(E+C,v<<8|y),C+=4;x++}A<s.length?(w=p,setTimeout(P,gb._dly)):t(d)}()},toBlob(e,t){this.toArrayBuffer(e,n=>{t(new Blob([n],{type:"image/bmp"}))})},_dly:9};var Go={CHROME:"CHROME",FIREFOX:"FIREFOX",DESKTOP_SAFARI:"DESKTOP_SAFARI",IE:"IE",IOS:"IOS",ETC:"ETC"},vte={[Go.CHROME]:16384,[Go.FIREFOX]:11180,[Go.DESKTOP_SAFARI]:16384,[Go.IE]:8192,[Go.IOS]:4096,[Go.ETC]:8192};const qu=typeof window!="undefined",mb=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope,g6=qu&&window.cordova&&window.cordova.require&&window.cordova.require("cordova/modulemapper"),Cte=(qu||mb)&&(g6&&g6.getOriginalSymbol(window,"File")||typeof File!="undefined"&&File),vb=(qu||mb)&&(g6&&g6.getOriginalSymbol(window,"FileReader")||typeof FileReader!="undefined"&&FileReader);function Ju(e,t,n=Date.now()){return new Promise(r=>{const o=e.split(","),a=o[0].match(/:(.*?);/)[1],s=globalThis.atob(o[1]);let u=s.length;const h=new Uint8Array(u);for(;u--;)h[u]=s.charCodeAt(u);const g=new Blob([h],{type:a});g.name=t,g.lastModified=n,r(g)})}function Cb(e){return new Promise((t,n)=>{const r=new vb;r.onload=()=>t(r.result),r.onerror=o=>n(o),r.readAsDataURL(e)})}function bb(e){return new Promise((t,n)=>{const r=new Image;r.onload=()=>t(r),r.onerror=o=>n(o),r.src=e})}function n0(){if(n0.cachedResult!==void 0)return n0.cachedResult;let e=Go.ETC;const{userAgent:t}=navigator;return/Chrom(e|ium)/i.test(t)?e=Go.CHROME:/iP(ad|od|hone)/i.test(t)&&/WebKit/i.test(t)?e=Go.IOS:/Safari/i.test(t)?e=Go.DESKTOP_SAFARI:/Firefox/i.test(t)?e=Go.FIREFOX:(/MSIE/i.test(t)||!!document.documentMode)&&(e=Go.IE),n0.cachedResult=e,n0.cachedResult}function yb(e,t){const n=n0(),r=vte[n];let o=e,a=t,s=o*a;const u=o>a?a/o:o/a;for(;s>r*r;){const h=(r+o)/2,g=(r+a)/2;h<g?(a=g,o=g*u):(a=h*u,o=h),s=o*a}return{width:o,height:a}}function m6(e,t){let n,r;try{if(n=new OffscreenCanvas(e,t),r=n.getContext("2d"),r===null)throw new Error("getContext of OffscreenCanvas returns null")}catch{n=document.createElement("canvas"),r=n.getContext("2d")}return n.width=e,n.height=t,[n,r]}function wb(e,t){const{width:n,height:r}=yb(e.width,e.height),[o,a]=m6(n,r);return t&&/jpe?g/.test(t)&&(a.fillStyle="white",a.fillRect(0,0,o.width,o.height)),a.drawImage(e,0,0,o.width,o.height),o}function v6(){return v6.cachedResult!==void 0||(v6.cachedResult=["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&typeof document!="undefined"&&"ontouchend"in document),v6.cachedResult}function C6(e,t={}){return new Promise(function(n,r){let o,a;var s=function(){try{return a=wb(o,t.fileType||e.type),n([o,a])}catch(h){return r(h)}},u=function(h){try{var g=function(d){try{throw d}catch(f){return r(f)}};try{let d;return Cb(e).then(function(f){try{return d=f,bb(d).then(function(p){try{return o=p,function(){try{return s()}catch(C){return r(C)}}()}catch(C){return g(C)}},g)}catch(p){return g(p)}},g)}catch(d){g(d)}}catch(d){return r(d)}};try{if(v6()||[Go.DESKTOP_SAFARI,Go.MOBILE_SAFARI].includes(n0()))throw new Error("Skip createImageBitmap on IOS and Safari");return createImageBitmap(e).then(function(h){try{return o=h,s()}catch{return u()}},u)}catch{u()}})}function b6(e,t,n,r,o=1){return new Promise(function(a,s){let u;if(t==="image/png"){let g,d,f;return g=e.getContext("2d"),{data:d}=g.getImageData(0,0,e.width,e.height),f=Ei.encode([d.buffer],e.width,e.height,4096*o),u=new Blob([f],{type:t}),u.name=n,u.lastModified=r,h.call(this)}{let g=function(){return h.call(this)};if(t==="image/bmp")return new Promise(d=>gb.toBlob(e,d)).then(function(d){try{return u=d,u.name=n,u.lastModified=r,g.call(this)}catch(f){return s(f)}}.bind(this),s);{let d=function(){return g.call(this)};if(typeof OffscreenCanvas=="function"&&e instanceof OffscreenCanvas)return e.convertToBlob({type:t,quality:o}).then(function(f){try{return u=f,u.name=n,u.lastModified=r,d.call(this)}catch(p){return s(p)}}.bind(this),s);{let f;return f=e.toDataURL(t,o),Ju(f,n,r).then(function(p){try{return u=p,d.call(this)}catch(C){return s(C)}}.bind(this),s)}}}function h(){return a(u)}})}function ca(e){e.width=0,e.height=0}function bs(){return new Promise(function(e,t){let n,r,o,a;return bs.cachedResult!==void 0?e(bs.cachedResult):Ju("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==","test.jpg",Date.now()).then(function(s){try{return n=s,C6(n).then(function(u){try{return r=u[1],b6(r,n.type,n.name,n.lastModified).then(function(h){try{return o=h,ca(r),C6(o).then(function(g){try{return a=g[0],bs.cachedResult=a.width===1&&a.height===2,e(bs.cachedResult)}catch(d){return t(d)}},t)}catch(g){return t(g)}},t)}catch(h){return t(h)}},t)}catch(u){return t(u)}},t)})}function Ib(e){return new Promise((t,n)=>{const r=new vb;r.onload=o=>{const a=new DataView(o.target.result);if(a.getUint16(0,!1)!=65496)return t(-2);const s=a.byteLength;let u=2;for(;u<s;){if(a.getUint16(u+2,!1)<=8)return t(-1);const h=a.getUint16(u,!1);if(u+=2,h==65505){if(a.getUint32(u+=2,!1)!=1165519206)return t(-1);const g=a.getUint16(u+=6,!1)==18761;u+=a.getUint32(u+4,g);const d=a.getUint16(u,g);u+=2;for(let f=0;f<d;f++)if(a.getUint16(u+12*f,g)==274)return t(a.getUint16(u+12*f+8,g))}else{if((65280&h)!=65280)break;u+=a.getUint16(u,!1)}}return t(-1)},r.onerror=o=>n(o),r.readAsArrayBuffer(e)})}function Eb(e,t){const{width:n}=e,{height:r}=e,{maxWidthOrHeight:o}=t;let a,s=e;return isFinite(o)&&(n>o||r>o)&&([s,a]=m6(n,r),n>r?(s.width=o,s.height=r/n*o):(s.width=n/r*o,s.height=o),a.drawImage(e,0,0,s.width,s.height),ca(e)),s}function Sb(e,t){const{width:n}=e,{height:r}=e,[o,a]=m6(n,r);switch(t>4&&t<9?(o.width=r,o.height=n):(o.width=n,o.height=r),t){case 2:a.transform(-1,0,0,1,n,0);break;case 3:a.transform(-1,0,0,-1,n,r);break;case 4:a.transform(1,0,0,-1,0,r);break;case 5:a.transform(0,1,1,0,0,0);break;case 6:a.transform(0,1,-1,0,r,0);break;case 7:a.transform(0,-1,-1,0,r,n);break;case 8:a.transform(0,-1,1,0,0,n)}return a.drawImage(e,0,0,n,r),ca(e),o}function Ab(e,t,n=0){return new Promise(function(r,o){let a,s,u,h,g,d,f,p,C,v,y,E,w,x,I,A,V,F,R,P;function O(G=5){if(t.signal&&t.signal.aborted)throw t.signal.reason;a+=G,t.onProgress(Math.min(a,100))}function N(G){if(t.signal&&t.signal.aborted)throw t.signal.reason;a=Math.min(Math.max(G,a),100),t.onProgress(a)}return a=n,s=t.maxIteration||10,u=1024*t.maxSizeMB*1024,O(),C6(e,t).then(function(G){try{return[,h]=G,O(),g=Eb(h,t),O(),new Promise(function(q,Q){var T;if(!(T=t.exifOrientation))return Ib(e).then(function(D){try{return T=D,W.call(this)}catch(H){return Q(H)}}.bind(this),Q);function W(){return q(T)}return W.call(this)}).then(function(q){try{return d=q,O(),bs().then(function(Q){try{return f=Q?g:Sb(g,d),O(),p=t.initialQuality||1,C=t.fileType||e.type,b6(f,C,e.name,e.lastModified,p).then(function(T){try{{let D=function(){if(s--&&(I>u||I>w)){let Z,J;return Z=P?.95*R.width:R.width,J=P?.95*R.height:R.height,[V,F]=m6(Z,J),F.drawImage(R,0,0,Z,J),p*=C==="image/png"?.85:.95,b6(V,C,e.name,e.lastModified,p).then(function(ee){try{return A=ee,ca(R),R=V,I=A.size,N(Math.min(99,Math.floor((x-I)/(x-u)*100))),D}catch(ge){return o(ge)}},o)}return[1]},H=function(){return ca(R),ca(V),ca(g),ca(f),ca(h),N(100),r(A)};if(v=T,O(),y=v.size>u,E=v.size>e.size,!y&&!E)return N(100),r(v);var W;return w=e.size,x=v.size,I=x,R=f,P=!t.alwaysKeepResolution&&y,(W=function(Z){for(;Z;){if(Z.then)return void Z.then(W,o);try{if(Z.pop){if(Z.length)return Z.pop()?H.call(this):Z;Z=D}else Z=Z.call(this)}catch(J){return o(J)}}}.bind(this))(D)}}catch(D){return o(D)}}.bind(this),o)}catch(T){return o(T)}}.bind(this),o)}catch(Q){return o(Q)}}.bind(this),o)}catch(q){return o(q)}}.bind(this),o)})}const bte=`
1404
+ ${e.palette.mode==="light"?r4(_1(e.palette.divider,1),.88):n4(_1(e.palette.divider,1),.68)}`,textAlign:"left",padding:16},t.variant==="head"&&{color:(e.vars||e).palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium},t.variant==="body"&&{color:(e.vars||e).palette.text.primary},t.variant==="footer"&&{color:(e.vars||e).palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)},t.size==="small"&&{padding:"6px 16px",[`&.${oee.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}},t.padding==="checkbox"&&{width:48,padding:"0 0 0 4px"},t.padding==="none"&&{padding:0},t.align==="left"&&{textAlign:"left"},t.align==="center"&&{textAlign:"center"},t.align==="right"&&{textAlign:"right",flexDirection:"row-reverse"},t.align==="justify"&&{textAlign:"justify"},t.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:(e.vars||e).palette.background.default}));var Gu=S.forwardRef(function(t,n){const r=E1({props:t,name:"MuiTableCell"}),{align:o="inherit",className:a,component:s,padding:u,scope:h,size:g,sortDirection:d,variant:f}=r,p=it(r,iee),C=S.useContext(tee),v=S.useContext(nee),y=v&&v.variant==="head";let E;s?E=s:E=y?"th":"td";let w=h;E==="td"?w=void 0:!w&&y&&(w="col");const x=f||v&&v.variant,I=L({},r,{align:o,component:E,padding:u||(C&&C.padding?C.padding:"normal"),size:g||(C&&C.size?C.size:"medium"),sortDirection:d,stickyHeader:x==="head"&&C&&C.stickyHeader,variant:x}),A=aee(I);let V=null;return d&&(V=d==="asc"?"ascending":"descending"),i(lee,L({as:E,ref:n,className:yt(A.root,a),"aria-sort":V,scope:w,ownerState:I},p))});function see(e){return b1("MuiToolbar",e)}p1("MuiToolbar",["root","gutters","regular","dense"]);const cee=["className","component","disableGutters","variant"],uee=e=>{const{classes:t,disableGutters:n,variant:r}=e;return Tt({root:["root",!n&&"gutters",r]},see,t)},dee=ht("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(({theme:e,ownerState:t})=>L({position:"relative",display:"flex",alignItems:"center"},!t.disableGutters&&{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}},t.variant==="dense"&&{minHeight:48}),({theme:e,ownerState:t})=>t.variant==="regular"&&e.mixins.toolbar);var hee=S.forwardRef(function(t,n){const r=E1({props:t,name:"MuiToolbar"}),{className:o,component:a="div",disableGutters:s=!1,variant:u="regular"}=r,h=it(r,cee),g=L({},r,{component:a,disableGutters:s,variant:u}),d=uee(g);return i(dee,L({as:a,className:yt(d.root,o),ref:n,ownerState:g},h))}),JC=v1(i("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),ZC=v1(i("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");const fee=["backIconButtonProps","count","disabled","getItemAriaLabel","nextIconButtonProps","onPageChange","page","rowsPerPage","showFirstButton","showLastButton","slots","slotProps"];var pee=S.forwardRef(function(t,n){var r,o,a,s,u,h,g,d;const{backIconButtonProps:f,count:p,disabled:C=!1,getItemAriaLabel:v,nextIconButtonProps:y,onPageChange:E,page:w,rowsPerPage:x,showFirstButton:I,showLastButton:A,slots:V={},slotProps:F={}}=t,R=it(t,fee),P=$8(),O=ke=>{E(ke,0)},N=ke=>{E(ke,w-1)},G=ke=>{E(ke,w+1)},q=ke=>{E(ke,Math.max(0,Math.ceil(p/x)-1))},Q=(r=V.firstButton)!=null?r:Kr,T=(o=V.lastButton)!=null?o:Kr,W=(a=V.nextButton)!=null?a:Kr,D=(s=V.previousButton)!=null?s:Kr,H=(u=V.firstButtonIcon)!=null?u:f$,Z=(h=V.lastButtonIcon)!=null?h:p$,J=(g=V.nextButtonIcon)!=null?g:ZC,ee=(d=V.previousButtonIcon)!=null?d:JC,ge=P?T:Q,ce=P?W:D,Ie=P?D:W,Ce=P?Q:T,re=P?F.lastButton:F.firstButton,ue=P?F.nextButton:F.previousButton,me=P?F.previousButton:F.nextButton,ye=P?F.firstButton:F.lastButton;return _("div",L({ref:n},R,{children:[I&&i(ge,L({onClick:O,disabled:C||w===0,"aria-label":v("first",w),title:v("first",w)},re,{children:P?i(Z,L({},F.lastButtonIcon)):i(H,L({},F.firstButtonIcon))})),i(ce,L({onClick:N,disabled:C||w===0,color:"inherit","aria-label":v("previous",w),title:v("previous",w)},ue!=null?ue:f,{children:P?i(J,L({},F.nextButtonIcon)):i(ee,L({},F.previousButtonIcon))})),i(Ie,L({onClick:G,disabled:C||(p!==-1?w>=Math.ceil(p/x)-1:!1),color:"inherit","aria-label":v("next",w),title:v("next",w)},me!=null?me:y,{children:P?i(ee,L({},F.previousButtonIcon)):i(J,L({},F.nextButtonIcon))})),A&&i(Ce,L({onClick:q,disabled:C||w>=Math.ceil(p/x)-1,"aria-label":v("last",w),title:v("last",w)},ye,{children:P?i(H,L({},F.firstButtonIcon)):i(Z,L({},F.lastButtonIcon))}))]}))});function gee(e){return b1("MuiTablePagination",e)}var t0=p1("MuiTablePagination",["root","toolbar","spacer","selectLabel","selectRoot","select","selectIcon","input","menuItem","displayedRows","actions"]),XC;const mee=["ActionsComponent","backIconButtonProps","className","colSpan","component","count","disabled","getItemAriaLabel","labelDisplayedRows","labelRowsPerPage","nextIconButtonProps","onPageChange","onRowsPerPageChange","page","rowsPerPage","rowsPerPageOptions","SelectProps","showFirstButton","showLastButton","slotProps","slots"],vee=ht(Gu,{name:"MuiTablePagination",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({overflow:"auto",color:(e.vars||e).palette.text.primary,fontSize:e.typography.pxToRem(14),"&:last-child":{padding:0}})),Cee=ht(hee,{name:"MuiTablePagination",slot:"Toolbar",overridesResolver:(e,t)=>L({[`& .${t0.actions}`]:t.actions},t.toolbar)})(({theme:e})=>({minHeight:52,paddingRight:2,[`${e.breakpoints.up("xs")} and (orientation: landscape)`]:{minHeight:52},[e.breakpoints.up("sm")]:{minHeight:52,paddingRight:2},[`& .${t0.actions}`]:{flexShrink:0,marginLeft:20}})),bee=ht("div",{name:"MuiTablePagination",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})({flex:"1 1 100%"}),yee=ht("p",{name:"MuiTablePagination",slot:"SelectLabel",overridesResolver:(e,t)=>t.selectLabel})(({theme:e})=>L({},e.typography.body2,{flexShrink:0})),wee=ht(Uu,{name:"MuiTablePagination",slot:"Select",overridesResolver:(e,t)=>L({[`& .${t0.selectIcon}`]:t.selectIcon,[`& .${t0.select}`]:t.select},t.input,t.selectRoot)})({color:"inherit",fontSize:"inherit",flexShrink:0,marginRight:32,marginLeft:8,[`& .${t0.select}`]:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"}}),Iee=ht(sa,{name:"MuiTablePagination",slot:"MenuItem",overridesResolver:(e,t)=>t.menuItem})({}),Eee=ht("p",{name:"MuiTablePagination",slot:"DisplayedRows",overridesResolver:(e,t)=>t.displayedRows})(({theme:e})=>L({},e.typography.body2,{flexShrink:0}));function See({from:e,to:t,count:n}){return`${e}\u2013${t} of ${n!==-1?n:`more than ${t}`}`}function Aee(e){return`Go to ${e} page`}const xee=e=>{const{classes:t}=e;return Tt({root:["root"],toolbar:["toolbar"],spacer:["spacer"],selectLabel:["selectLabel"],select:["select"],input:["input"],selectIcon:["selectIcon"],menuItem:["menuItem"],displayedRows:["displayedRows"],actions:["actions"]},gee,t)};var Fee=S.forwardRef(function(t,n){var r;const o=E1({props:t,name:"MuiTablePagination"}),{ActionsComponent:a=pee,backIconButtonProps:s,className:u,colSpan:h,component:g=Gu,count:d,disabled:f=!1,getItemAriaLabel:p=Aee,labelDisplayedRows:C=See,labelRowsPerPage:v="Rows per page:",nextIconButtonProps:y,onPageChange:E,onRowsPerPageChange:w,page:x,rowsPerPage:I,rowsPerPageOptions:A=[10,25,50,100],SelectProps:V={},showFirstButton:F=!1,showLastButton:R=!1,slotProps:P={},slots:O={}}=o,N=it(o,mee),G=o,q=xee(G),Q=(r=P==null?void 0:P.select)!=null?r:V,T=Q.native?"option":Iee;let W;(g===Gu||g==="td")&&(W=h||1e3);const D=Tn(Q.id),H=Tn(Q.labelId),Z=()=>d===-1?(x+1)*I:I===-1?d:Math.min(d,(x+1)*I);return i(vee,L({colSpan:W,ref:n,as:g,ownerState:G,className:yt(q.root,u)},N,{children:_(Cee,{className:q.toolbar,children:[i(bee,{className:q.spacer}),A.length>1&&i(yee,{className:q.selectLabel,id:H,children:v}),A.length>1&&i(wee,L({variant:"standard"},!Q.variant&&{input:XC||(XC=i(ms,{}))},{value:I,onChange:w,id:D,labelId:H},Q,{classes:L({},Q.classes,{root:yt(q.input,q.selectRoot,(Q.classes||{}).root),select:yt(q.select,(Q.classes||{}).select),icon:yt(q.selectIcon,(Q.classes||{}).icon)}),disabled:f,children:A.map(J=>Ze.createElement(T,L({},!G3(T)&&{ownerState:G},{className:q.menuItem,key:J.label?J.label:J,value:J.value?J.value:J}),J.label?J.label:J))})),i(Eee,{className:q.displayedRows,children:C({from:d===0?0:x*I+1,to:Z(),count:d===-1?-1:d,page:x})}),i(a,{className:q.actions,backIconButtonProps:s,count:d,nextIconButtonProps:y,onPageChange:E,page:x,rowsPerPage:I,showFirstButton:F,showLastButton:R,slotProps:P.actions,slots:O.actions,getItemAriaLabel:p,disabled:f})]})}))});function Mee(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function zee(e,t,n,r={},o=()=>{}){const{ease:a=Mee,duration:s=300}=r;let u=null;const h=t[e];let g=!1;const d=()=>{g=!0},f=p=>{if(g){o(new Error("Animation cancelled"));return}u===null&&(u=p);const C=Math.min(1,(p-u)/s);if(t[e]=a(C)*(n-h)+h,C>=1){requestAnimationFrame(()=>{o(null)});return}requestAnimationFrame(f)};return h===n?(o(new Error("Element already at target position")),d):(requestAnimationFrame(f),d)}const kee=["onChange"],Pee={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function Oee(e){const{onChange:t}=e,n=it(e,kee),r=S.useRef(),o=S.useRef(null),a=()=>{r.current=o.current.offsetHeight-o.current.clientHeight};return xn(()=>{const s=os(()=>{const h=r.current;a(),h!==r.current&&t(r.current)}),u=ta(o.current);return u.addEventListener("resize",s),()=>{s.clear(),u.removeEventListener("resize",s)}},[t]),S.useEffect(()=>{a(),t(r.current)},[t]),i("div",L({style:Pee},n,{ref:o}))}function Bee(e){return b1("MuiTabScrollButton",e)}var Lee=p1("MuiTabScrollButton",["root","vertical","horizontal","disabled"]);const Tee=["className","slots","slotProps","direction","orientation","disabled"],Ree=e=>{const{classes:t,orientation:n,disabled:r}=e;return Tt({root:["root",n,r&&"disabled"]},Bee,t)},Dee=ht(Xa,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})(({ownerState:e})=>L({width:40,flexShrink:0,opacity:.8,[`&.${Lee.disabled}`]:{opacity:0}},e.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${e.isRtl?-90:90}deg)`}}));var Vee=S.forwardRef(function(t,n){var r,o;const a=E1({props:t,name:"MuiTabScrollButton"}),{className:s,slots:u={},slotProps:h={},direction:g}=a,d=it(a,Tee),f=$8(),p=L({isRtl:f},a),C=Ree(p),v=(r=u.StartScrollButtonIcon)!=null?r:JC,y=(o=u.EndScrollButtonIcon)!=null?o:ZC,E=m2({elementType:v,externalSlotProps:h.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:p}),w=m2({elementType:y,externalSlotProps:h.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:p});return i(Dee,L({component:"div",className:yt(C.root,s),ref:n,role:null,ownerState:p,tabIndex:null},d,{children:g==="left"?i(v,L({},E)):i(y,L({},w))}))});function Hee(e){return b1("MuiTabs",e)}var Ku=p1("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]);const Nee=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],_C=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,$C=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,c6=(e,t,n)=>{let r=!1,o=n(e,t);for(;o;){if(o===e.firstChild){if(r)return;r=!0}const a=o.disabled||o.getAttribute("aria-disabled")==="true";if(!o.hasAttribute("tabindex")||a)o=n(e,o);else{o.focus();return}}},Qee=e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:o,scrollableY:a,centered:s,scrollButtonsHideMobile:u,classes:h}=e;return Tt({root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",o&&"scrollableX",a&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",s&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",u&&"scrollButtonsHideMobile"],scrollableX:[o&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},Hee,h)},Wee=ht("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Ku.scrollButtons}`]:t.scrollButtons},{[`& .${Ku.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(({ownerState:e,theme:t})=>L({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},e.vertical&&{flexDirection:"column"},e.scrollButtonsHideMobile&&{[`& .${Ku.scrollButtons}`]:{[t.breakpoints.down("sm")]:{display:"none"}}})),jee=ht("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})(({ownerState:e})=>L({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},e.fixed&&{overflowX:"hidden",width:"100%"},e.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},e.scrollableX&&{overflowX:"auto",overflowY:"hidden"},e.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),Uee=ht("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})(({ownerState:e})=>L({display:"flex"},e.vertical&&{flexDirection:"column"},e.centered&&{justifyContent:"center"})),Gee=ht("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(({ownerState:e,theme:t})=>L({position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create()},e.indicatorColor==="primary"&&{backgroundColor:(t.vars||t).palette.primary.main},e.indicatorColor==="secondary"&&{backgroundColor:(t.vars||t).palette.secondary.main},e.vertical&&{height:"100%",width:2,right:0})),Kee=ht(Oee)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),eb={};var Yee=S.forwardRef(function(t,n){const r=E1({props:t,name:"MuiTabs"}),o=na(),a=$8(),{"aria-label":s,"aria-labelledby":u,action:h,centered:g=!1,children:d,className:f,component:p="div",allowScrollButtonsMobile:C=!1,indicatorColor:v="primary",onChange:y,orientation:E="horizontal",ScrollButtonComponent:w=Vee,scrollButtons:x="auto",selectionFollowsFocus:I,slots:A={},slotProps:V={},TabIndicatorProps:F={},TabScrollButtonProps:R={},textColor:P="primary",value:O,variant:N="standard",visibleScrollbar:G=!1}=r,q=it(r,Nee),Q=N==="scrollable",T=E==="vertical",W=T?"scrollTop":"scrollLeft",D=T?"top":"left",H=T?"bottom":"right",Z=T?"clientHeight":"clientWidth",J=T?"height":"width",ee=L({},r,{component:p,allowScrollButtonsMobile:C,indicatorColor:v,orientation:E,vertical:T,scrollButtons:x,textColor:P,variant:N,visibleScrollbar:G,fixed:!Q,hideScrollbar:Q&&!G,scrollableX:Q&&!T,scrollableY:Q&&T,centered:g&&!Q,scrollButtonsHideMobile:!C}),ge=Qee(ee),ce=m2({elementType:A.StartScrollButtonIcon,externalSlotProps:V.startScrollButtonIcon,ownerState:ee}),Ie=m2({elementType:A.EndScrollButtonIcon,externalSlotProps:V.endScrollButtonIcon,ownerState:ee}),[Ce,re]=S.useState(!1),[ue,me]=S.useState(eb),[ye,ke]=S.useState(!1),[xe,Ue]=S.useState(!1),[tt,we]=S.useState(!1),[Le,Ne]=S.useState({overflow:"hidden",scrollbarWidth:0}),Ve=new Map,_e=S.useRef(null),qe=S.useRef(null),wt=()=>{const lt=_e.current;let St;if(lt){const qt=lt.getBoundingClientRect();St={clientWidth:lt.clientWidth,scrollLeft:lt.scrollLeft,scrollTop:lt.scrollTop,scrollLeftNormalized:KU(lt,a?"rtl":"ltr"),scrollWidth:lt.scrollWidth,top:qt.top,bottom:qt.bottom,left:qt.left,right:qt.right}}let Xt;if(lt&&O!==!1){const qt=qe.current.children;if(qt.length>0){const S1=qt[Ve.get(O)];Xt=S1?S1.getBoundingClientRect():null}}return{tabsMeta:St,tabMeta:Xt}},he=Pn(()=>{const{tabsMeta:lt,tabMeta:St}=wt();let Xt=0,qt;if(T)qt="top",St&&lt&&(Xt=St.top-lt.top+lt.scrollTop);else if(qt=a?"right":"left",St&&lt){const F1=a?lt.scrollLeftNormalized+lt.clientWidth-lt.scrollWidth:lt.scrollLeft;Xt=(a?-1:1)*(St[qt]-lt[qt]+F1)}const S1={[qt]:Xt,[J]:St?St[J]:0};if(isNaN(ue[qt])||isNaN(ue[J]))me(S1);else{const F1=Math.abs(ue[qt]-S1[qt]),g1=Math.abs(ue[J]-S1[J]);(F1>=1||g1>=1)&&me(S1)}}),Se=(lt,{animation:St=!0}={})=>{St?zee(W,_e.current,lt,{duration:o.transitions.duration.standard}):_e.current[W]=lt},Ae=lt=>{let St=_e.current[W];T?St+=lt:(St+=lt*(a?-1:1),St*=a&&Pm()==="reverse"?-1:1),Se(St)},Me=()=>{const lt=_e.current[Z];let St=0;const Xt=Array.from(qe.current.children);for(let qt=0;qt<Xt.length;qt+=1){const S1=Xt[qt];if(St+S1[Z]>lt){qt===0&&(St=lt);break}St+=S1[Z]}return St},ze=()=>{Ae(-1*Me())},Oe=()=>{Ae(Me())},Re=S.useCallback(lt=>{Ne({overflow:null,scrollbarWidth:lt})},[]),rt=()=>{const lt={};lt.scrollbarSizeListener=Q?i(Kee,{onChange:Re,className:yt(ge.scrollableX,ge.hideScrollbar)}):null;const Xt=Q&&(x==="auto"&&(ye||xe)||x===!0);return lt.scrollButtonStart=Xt?i(w,L({slots:{StartScrollButtonIcon:A.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:ce},orientation:E,direction:a?"right":"left",onClick:ze,disabled:!ye},R,{className:yt(ge.scrollButtons,R.className)})):null,lt.scrollButtonEnd=Xt?i(w,L({slots:{EndScrollButtonIcon:A.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:Ie},orientation:E,direction:a?"left":"right",onClick:Oe,disabled:!xe},R,{className:yt(ge.scrollButtons,R.className)})):null,lt},We=Pn(lt=>{const{tabsMeta:St,tabMeta:Xt}=wt();if(!(!Xt||!St)){if(Xt[D]<St[D]){const qt=St[W]+(Xt[D]-St[D]);Se(qt,{animation:lt})}else if(Xt[H]>St[H]){const qt=St[W]+(Xt[H]-St[H]);Se(qt,{animation:lt})}}}),Ke=Pn(()=>{Q&&x!==!1&&we(!tt)});S.useEffect(()=>{const lt=os(()=>{_e.current&&he()});let St;const Xt=F1=>{F1.forEach(g1=>{g1.removedNodes.forEach(f1=>{var V1;(V1=St)==null||V1.unobserve(f1)}),g1.addedNodes.forEach(f1=>{var V1;(V1=St)==null||V1.observe(f1)})}),lt(),Ke()},qt=ta(_e.current);qt.addEventListener("resize",lt);let S1;return typeof ResizeObserver!="undefined"&&(St=new ResizeObserver(lt),Array.from(qe.current.children).forEach(F1=>{St.observe(F1)})),typeof MutationObserver!="undefined"&&(S1=new MutationObserver(Xt),S1.observe(qe.current,{childList:!0})),()=>{var F1,g1;lt.clear(),qt.removeEventListener("resize",lt),(F1=S1)==null||F1.disconnect(),(g1=St)==null||g1.disconnect()}},[he,Ke]),S.useEffect(()=>{const lt=Array.from(qe.current.children),St=lt.length;if(typeof IntersectionObserver!="undefined"&&St>0&&Q&&x!==!1){const Xt=lt[0],qt=lt[St-1],S1={root:_e.current,threshold:.99},F1=sn=>{ke(!sn[0].isIntersecting)},g1=new IntersectionObserver(F1,S1);g1.observe(Xt);const f1=sn=>{Ue(!sn[0].isIntersecting)},V1=new IntersectionObserver(f1,S1);return V1.observe(qt),()=>{g1.disconnect(),V1.disconnect()}}},[Q,x,tt,d==null?void 0:d.length]),S.useEffect(()=>{re(!0)},[]),S.useEffect(()=>{he()}),S.useEffect(()=>{We(eb!==ue)},[We,ue]),S.useImperativeHandle(h,()=>({updateIndicator:he,updateScrollButtons:Ke}),[he,Ke]);const Ye=i(Gee,L({},F,{className:yt(ge.indicator,F.className),ownerState:ee,style:L({},ue,F.style)}));let zt=0;const It=S.Children.map(d,lt=>{if(!S.isValidElement(lt))return null;const St=lt.props.value===void 0?zt:lt.props.value;Ve.set(St,zt);const Xt=St===O;return zt+=1,S.cloneElement(lt,L({fullWidth:N==="fullWidth",indicator:Xt&&!Ce&&Ye,selected:Xt,selectionFollowsFocus:I,onChange:y,textColor:P,value:St},zt===1&&O===!1&&!lt.props.tabIndex?{tabIndex:0}:{}))}),De=lt=>{const St=qe.current,Xt=Zn(St).activeElement;if(Xt.getAttribute("role")!=="tab")return;let S1=E==="horizontal"?"ArrowLeft":"ArrowUp",F1=E==="horizontal"?"ArrowRight":"ArrowDown";switch(E==="horizontal"&&a&&(S1="ArrowRight",F1="ArrowLeft"),lt.key){case S1:lt.preventDefault(),c6(St,Xt,$C);break;case F1:lt.preventDefault(),c6(St,Xt,_C);break;case"Home":lt.preventDefault(),c6(St,null,_C);break;case"End":lt.preventDefault(),c6(St,null,$C);break}},Ct=rt();return _(Wee,L({className:yt(ge.root,f),ownerState:ee,ref:n,as:p},q,{children:[Ct.scrollButtonStart,Ct.scrollbarSizeListener,_(jee,{className:ge.scroller,ownerState:ee,style:{overflow:Le.overflow,[T?`margin${a?"Left":"Right"}`:"marginBottom"]:G?void 0:-Le.scrollbarWidth},ref:_e,children:[i(Uee,{"aria-label":s,"aria-labelledby":u,"aria-orientation":E==="vertical"?"vertical":null,className:ge.flexContainer,ownerState:ee,onKeyDown:De,ref:qe,role:"tablist",children:It}),Ce&&Ye]}),Ct.scrollButtonEnd]}))});function qee(e){return b1("MuiTextField",e)}p1("MuiTextField",["root"]);const Jee=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],Zee={standard:IC,filled:gC,outlined:HC},Xee=e=>{const{classes:t}=e;return Tt({root:["root"]},qee,t)},_ee=ht(mC,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({});var $ee=S.forwardRef(function(t,n){const r=E1({props:t,name:"MuiTextField"}),{autoComplete:o,autoFocus:a=!1,children:s,className:u,color:h="primary",defaultValue:g,disabled:d=!1,error:f=!1,FormHelperTextProps:p,fullWidth:C=!1,helperText:v,id:y,InputLabelProps:E,inputProps:w,InputProps:x,inputRef:I,label:A,maxRows:V,minRows:F,multiline:R=!1,name:P,onBlur:O,onChange:N,onFocus:G,placeholder:q,required:Q=!1,rows:T,select:W=!1,SelectProps:D,type:H,value:Z,variant:J="outlined"}=r,ee=it(r,Jee),ge=L({},r,{autoFocus:a,color:h,disabled:d,error:f,fullWidth:C,multiline:R,required:Q,select:W,variant:J}),ce=Xee(ge),Ie={};J==="outlined"&&(E&&typeof E.shrink!="undefined"&&(Ie.notched=E.shrink),Ie.label=A),W&&((!D||!D.native)&&(Ie.id=void 0),Ie["aria-describedby"]=void 0);const Ce=Tn(y),re=v&&Ce?`${Ce}-helper-text`:void 0,ue=A&&Ce?`${Ce}-label`:void 0,me=Zee[J],ye=i(me,L({"aria-describedby":re,autoComplete:o,autoFocus:a,defaultValue:g,fullWidth:C,multiline:R,name:P,rows:T,maxRows:V,minRows:F,type:H,value:Z,id:Ce,inputRef:I,onBlur:O,onChange:N,onFocus:G,placeholder:q,inputProps:w},Ie,x));return _(_ee,L({className:yt(ce.root,u),disabled:d,error:f,fullWidth:C,ref:n,required:Q,color:h,variant:J,ownerState:ge},ee,{children:[A!=null&&A!==""&&i(AC,L({htmlFor:Ce,id:ue},E,{children:A})),W?i(Uu,L({"aria-describedby":re,id:Ce,labelId:ue,value:Z,input:ye},D,{children:s})):ye,v&&i(TX,L({id:re},p,{children:v}))]}))});function I4({status:e,message:t}){const n=[W3,Rl,"MATCH","NOT_VERIFY",Tl,Dl,"0",400,401,404,0,429,500],r=["ACCEPT","Success","FACER_OK",200];return _(Xi,{children:[n.includes(e)&&i(_Q,{message:t||"Error obteniendo el Token"}),r.includes(e)&&i(Fg,{message:t})]})}const E4=e=>e!==Tl&&e!==W3&&e!==Rl&&e!==Dl&&e!=="";var ete=v1(i("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"}),"ArrowBack"),u6=v1([i("path",{d:"M16 7h-1l-1-1h-4L9 7H8c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V9c0-1.1-.9-2-2-2m-4 7c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2"},"0"),i("path",{d:"m8.57.51 4.48 4.48V2.04c4.72.47 8.48 4.23 8.95 8.95h2C23.34 3.02 15.49-1.59 8.57.51m2.38 21.45c-4.72-.47-8.48-4.23-8.95-8.95H0c.66 7.97 8.51 12.58 15.43 10.48l-4.48-4.48z"},"1")],"Cameraswitch"),tb=v1(i("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),Cs=v1(i("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96M14 13v4h-4v-4H7l5-5 5 5z"}),"CloudUpload"),tte=v1(i("path",{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2m-11-4 2.03 2.71L16 11l4 5H8zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6z"}),"Collections"),nte=v1(i("path",{d:"M9.01 14H2v2h7.01v3L13 15l-3.99-4zm5.98-1v-3H22V8h-7.01V5L11 9z"}),"CompareArrows"),rte=v1(i("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}),"ContentCopy"),ote=v1(i("path",{d:"M17 15h2V7c0-1.1-.9-2-2-2H9v2h8zM7 17V1H5v4H1v2h4v10c0 1.1.9 2 2 2h10v4h2v-4h4v-2z"}),"Crop"),d6=v1(i("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete"),nb=v1(i("path",{d:"M20 5h-3.17L15 3H9L7.17 5H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m-8 13c-2.76 0-5-2.24-5-5H5l2.5-2.5L10 13H8c0 2.21 1.79 4 4 4 .58 0 1.13-.13 1.62-.35l.74.74c-.71.37-1.5.61-2.36.61m4.5-2.5L14 13h2c0-2.21-1.79-4-4-4-.58 0-1.13.13-1.62.35l-.74-.73C10.35 8.24 11.14 8 12 8c2.76 0 5 2.24 5 5h2z"}),"FlipCameraIos"),ite=v1(i("path",{d:"m21.9 21.9-8.49-8.49-9.82-9.82L2.1 2.1.69 3.51 3 5.83V19c0 1.1.9 2 2 2h13.17l2.31 2.31zM5 18l3.5-4.5 2.5 3.01L12.17 15l3 3zm16 .17L5.83 3H19c1.1 0 2 .9 2 2z"}),"ImageNotSupported"),rb=v1(i("path",{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5M2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1m18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1M11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1m0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1M5.99 4.58c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41zm12.37 12.37c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0 .39-.39.39-1.03 0-1.41zm1.06-10.96c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0zM7.05 18.36c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0z"}),"LightMode"),h6=v1([i("circle",{cx:"12",cy:"12",r:"3.2"},"0"),i("path",{d:"M9 2 7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5"},"1")],"PhotoCamera"),ob=v1(i("path",{d:"M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 16.01H3V4.99h18zM8 16h2.5l1.5 1.5 1.5-1.5H16v-2.5l1.5-1.5-1.5-1.5V8h-2.5L12 6.5 10.5 8H8v2.5L6.5 12 8 13.5zm4-7c1.66 0 3 1.34 3 3s-1.34 3-3 3z"}),"SettingsBrightness"),ib=v1(i("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14m.5-7H9v2H7v1h2v2h1v-2h2V9h-2z"}),"ZoomInTwoTone");function f6({action:e}){return i(c1,{className:I1["back-button-container"],children:_(Ii,{variant:"outlined",onClick:e,className:I1["back-button"],children:[i(ete,{className:I1.grayscale}),i(Rn,{variant:"body2",children:"Volver atras"})]})})}function ab({mode:e="light",showFilterByButton:t=!0,dataBlackList:n,icon:r,clientId:o,authorize:a,inProduction:s="prd",source:u="component",eventId:h=null,countryCodeAllowed:g=null,validateVpn:d=!1,successMessage:f,alertMessage:p}){const{onSendSubmitDocument:C,simpleHandleSubmit:v,isLoading:y,controlDoc:E,errorsDoc:w,status:x,message:I,listMatch:A,select:V,setSelect:F,clearState:R,countryCode:P}=Sg(o,a,s,u,h,g,d,f,p,n);return _("div",{className:`${I1["kit-gbc"]} ${I1[e]}`,style:{padding:"16px"},children:[i(N3,{className:"kit-gbc-toastify-container",position:"top-center",autoClose:5e3,hideProgressBar:!1,newestOnTop:!1,closeOnClick:!0,rtl:!1,pauseOnFocusLoss:!0,draggable:!0,pauseOnHover:!0}),y||g!==null&&!P?i(L8,{}):null,i("form",{onSubmit:v(C),id:"blacklist",children:_("div",{className:I1.sub,children:[E4(x)&&i(f6,{action:R}),_("div",{className:I1["header-component"],children:[i("h4",{children:"Lista de sanciones y PEPs"}),Rr(x)?i("p",{children:"Ingrese al menos el primer nombre y apellido de la persona a consultar."}):i(I4,{status:x,message:I.message?I.message:I})]}),!Rr(A)&&i(Mg,{lists:A}),Rr(x)&&_(Xi,{children:[i(Y0,{type:"text",name:"first_name",placeholder:"Primer nombre",icon:r&&r,control:E,error:w.first_name}),i(Y0,{type:"text",name:"second_name",label:"Segundo nombre",placeholder:"Segundo nombre",icon:r&&r,control:E,error:w.second_name}),i(Y0,{type:"text",name:"first_last_name",label:"Primer apellido",placeholder:"Primer apellido",icon:r&&r,control:E,error:w.first_last_name}),i(Y0,{type:"text",name:"second_last_name",label:"Segundo apellido",placeholder:"Segundo apellido",icon:r&&r,control:E,error:w.second_last_name}),i(Y0,{type:"date",name:"birth_date",label:"Fecha de nacimiento",placeholder:"Fecha de nacimiento",icon:r&&r,control:E,error:w.birth_date}),i(Y0,{type:"country",name:"country",customLabel:"Pa\xEDs de nacimiento",searchable:!0,searchPlaceholder:"Filtrar por pa\xEDs",onSelect:O=>F(O),selected:V,icon:r&&r,control:E,error:w.country}),i(_n,{type:"submit",children:"Procesar"})]}),x!==Tl&&x!==W3&&x!==Rl&&x!==Dl&&t?i(c1,{width:"100%",mt:2,children:R&&Object.keys(A).length>0&&i(_n,{className:"my-1 col-12",onClick:R,children:"Filtrar por"})}):null]})})]})}ab.propTypes={mode:jt.exports.PropTypes.string,icon:jt.exports.PropTypes.func,clientId:jt.exports.PropTypes.string.isRequired,authorize:jt.exports.PropTypes.func.isRequired,inProduction:jt.exports.PropTypes.string,countryCodeAllowed:jt.exports.PropTypes.array,source:jt.exports.PropTypes.string,eventId:jt.exports.PropTypes.string,validateVpn:jt.exports.PropTypes.bool,successMessage:jt.exports.PropTypes.string,alertMessage:jt.exports.PropTypes.string,dataBlackList:jt.exports.PropTypes.func.isRequired,showFilterByButton:jt.exports.PropTypes.bool};const ate=(e,t,n,r,o,a,s,u,h,g)=>{const[d,f]=Ze.useState({}),[p,C]=Ze.useState(""),[v,y]=Ze.useState(!1),[E,w]=Ze.useState(t===void 0?Rl:n===void 0?W3:""),[x,I]=Ze.useState(null),A=D5(a),[V,F]=Ze.useState(g),R=Ze.useRef(null),[P,O]=Ze.useState(!1),[N,G]=Ze.useState(!1);Ze.useEffect(()=>{s&&(A==null?void 0:A.data_connection.isocode)&&s.length!==0&&!s.some(ee=>ee===(A==null?void 0:A.data_connection.isocode))&&(w(Tl),C(V5)),u&&(A==null?void 0:A.data_connection.proxy)==N5&&(w(Dl),C(H5)),s&&A&&I(A==null?void 0:A.data_connection.isocode)},[A,s]);const q=()=>{F(g),f({}),w(""),C(""),y(!1)},{handleSubmit:Q}=g5(),T=async()=>{var ee,ge,ce,Ie,Ce;y(!0);try{const re=await n(),me={method:"POST",path:"api/v1/onboarding/validate",inProduction:a,customHeaders:{client_id:t,access_token:re},bodyParams:d,service:"services"};try{const ye=await V0(me),ke=ye.data.data,xe=await N2({data:{...ke,status_code:200},component:"ocr",eventId:r,source:o,inProduction:a,clientId:t,geolocation:A});xe&&Object.assign(ke,{checkIp:xe.check_ip}),ke&&await e(ke);const{message:Ue}=ye.data;Ue&&w(Ue),C(h||"Documento verificado con \xE9xito")}catch(ye){console.log(ye,"controller");let ke="";const{status:xe}=(ee=ye==null?void 0:ye.response)!=null?ee:{status:"Error desconocido"},Ue=await N2({data:{first_image:d.firstImage,second_image:Object.keys(d).length>1?d.secondImage:"",status_code:xe},component:"ocr",eventId:r,source:o,inProduction:a,clientId:t,geolocation:A});await e({...ye,countAttempts:Ue.count_try}),((ce=(ge=ye==null?void 0:ye.response)==null?void 0:ge.data)==null?void 0:ce.code)==="020"&&Ue.count_try>3&&G(!0),(Ce=(Ie=ye==null?void 0:ye.response)==null?void 0:Ie.data)!=null&&Ce.message?ke=ye.response.data.message:xe===500&&(ke={limit_of_request:S7}),y(null),C(ke),w(xe),P8(ye)}}catch{kn.error("Error - Verificar host con el proveedor")}finally{y(!1)}},W=async ee=>{const ge=R.current.getScreenshot(),ce=Object.assign(d,{[ee]:ge});f(ce),O(!1)},D=async(ee,ge)=>{const ce=Object.assign(d,{[ee]:ge});f(ce),O(!1)},Z=(()=>{const[ee,ge]=Ze.useState(window.innerHeight>window.innerWidth);return Ze.useEffect(()=>{const ce=()=>{ge(window.innerHeight>window.innerWidth)};return window.addEventListener("resize",ce),()=>{window.removeEventListener("resize",ce)}},[]),ee})(),J=Ze.useMemo(()=>({width:{ideal:Z?1080:1920},height:{ideal:Z?1920:1080},aspectRatio:{ideal:Z?16/9:9/16},frameRate:{ideal:30},focusMode:{ideal:"continuous"},facingMode:{ideal:"environment"}}),[Z]);return Ze.useEffect(()=>{P&&(O(!1),setTimeout(()=>O(!0),100))},[Z]),{onSendSubmitDocument:T,simpleHandleSubmit:Q,isLoading:v,status:E,message:p,base64:d,setBase64:f,clearState:q,countryCode:x,dualMode:V,setDualMode:F,dualModeRequired:g,onUploadImage:W,webcamRef:R,activateCamera:P,setActivateCamera:O,videoConstraints:J,onUploadImage2:D,uploadDocumentByPhone:N,setUploadDocumentByPhone:G}},lte=e=>e==="Tipo de documento no v\xE1lido"||e==="Datos de la imagen no reconocidas"||e==="Dato no reconocido(Primer Nombre)"||e=="Dato no reconocido(Primer Apellido)"||e=="",lb=({title:e,subtitle:t,uploadByPhone:n})=>_(c1,{children:[i(Rn,{variant:"h6",className:"title",mt:2,children:e}),i(Rn,{variant:"body2",children:t}),_(xC,{dense:!0,children:[n&&_(o6,{children:[i(aa,{children:i(tte,{})}),i(la,{primary:"Aseg\xFArate de tener las fotos de tu documento en tu galer\xEDa"})]}),_(o6,{children:[i(aa,{children:i(rb,{})}),i(la,{primary:"Procura que la foto tenga buena iluminaci\xF3n"})]}),_(o6,{children:[i(aa,{children:i(ob,{})}),i(la,{primary:"Evita reflejos en el documento de identidad"})]}),_(o6,{children:[i(aa,{children:i(u6,{})}),i(la,{primary:"Procura que el texto en el documento sea legible, sino prueba cambiando a otra c\xE1mara de tu dispositivo"})]})]})]});function sb({setActivateCamera:e,activateCamera:t,videoConstraints:n,videoRef:r,streamRef:o,onTapToFocus:a,title:s,subtitle:u,cameras:h,setCameras:g,currentCameraIndex:d}){const[f,p]=Ze.useState(!1);return Ze.useEffect(()=>{(async()=>{var v,y,E,w;try{(await navigator.mediaDevices.getUserMedia({video:!0})).getTracks().forEach(R=>R.stop());const A=(await navigator.mediaDevices.enumerateDevices()).filter(R=>R.kind==="videoinput");let V=-1,F=null;for(const R of A)try{const P=await navigator.mediaDevices.getUserMedia({video:{deviceId:R.deviceId}}),N=P.getVideoTracks()[0].getCapabilities(),G=((v=N.width)==null?void 0:v.max)||0,q=((y=N.height)==null?void 0:y.max)||0,Q=((E=N.zoom)==null?void 0:E.max)||1,T=((w=N.focusDistance)==null?void 0:w.max)||0,W=G*q+Q*1e3+T*1e3;W>V&&(V=W,F=R.deviceId),P.getTracks().forEach(D=>D.stop())}catch(P){console.error("Error al obtener capacidades de la c\xE1mara:",P)}if(F){const R=[...A.filter(P=>P.deviceId===F),...A.filter(P=>P.deviceId!==F)];g(R)}else g(A)}catch(x){console.error("Error al inicializar c\xE1maras:",x)}})()},[]),Ze.useEffect(()=>{if(t&&r.current&&h.length>0){p(!0);const C=h[d],v=C?{video:{deviceId:{ideal:C.deviceId},facingMode:{ideal:"environment"}},audio:!1}:{video:{facingMode:{ideal:"environment"}},audio:!1};navigator.mediaDevices.getUserMedia(v).then(y=>{r.current.srcObject=y,r.current.play(),o.current=y,r.current.onloadeddata=()=>{p(!1)}}).catch(y=>{console.error("Error al acceder a la c\xE1mara:",y),p(!1)})}return()=>{o.current&&(o.current.getTracks().forEach(C=>C.stop()),o.current=null),r.current&&(r.current.srcObject=null)}},[t,d,h,n]),i("div",{className:"drag-zone",children:i(c1,{className:"drag-and-drop-container",children:i(c1,{onClick:()=>e(!0),position:"relative",zIndex:1,width:"100%",height:"100%",overflow:"hidden",display:"flex",justifyContent:"center",alignItems:"center",children:t?_(c1,{sx:{position:"relative",width:"100%",height:"100%"},children:[f&&i(c1,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:2,display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},children:i(e0,{sx:{color:"var(--_primary)"}})}),i("video",{ref:r,style:{width:"100%",height:"100%",objectFit:"cover",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",borderRadius:"5px",opacity:f?0:1},onClick:a,playsInline:!0,muted:!0,autoPlay:!0})]}):i(lb,{title:s,subtitle:u})})})})}function cb({fileInputRef:e,handleFileChange:t,side:n,title:r,subtitle:o,startUpload:a,setActivateCamera:s}){const u=()=>{var h;(h=e.current)==null||h.click()};return i("div",{className:"drag-zone",children:i(c1,{className:"drag-and-drop-container",children:i(c1,{onClick:()=>a?u():s(!0),position:"relative",zIndex:1,width:"100%",height:"100%",overflow:"hidden",display:"flex",justifyContent:"center",alignItems:"center",padding:2,children:a?_(c1,{className:"test",children:[_("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[i(Cs,{}),i(Rn,{variant:"body2",style:{textAlign:"center",color:"gray",whiteSpace:"none",margin:"auto"},children:"Haz clic aqu\xED para subir una foto desde tu dispositivo"})]}),i("input",{ref:e,name:n,type:"file",accept:"image/*",onChange:t,style:{display:"none"}})]}):i(lb,{title:r,subtitle:o,uploadByPhone:!0})})})})}function ste(e){return new Promise((t,n)=>{const r=new FileReader;r.readAsDataURL(e),r.onload=()=>t(r.result),r.onerror=o=>n(o)})}const cte=e=>{const t=document.createElement("canvas"),n=t.getContext("2d");let r=e instanceof HTMLImageElement?e.width:e.videoWidth,o=e instanceof HTMLImageElement?e.height:e.videoHeight;if(r>Ig||o>Eg){const a=Math.min(Ig/r,Eg/o);r=Math.floor(r*a),o=Math.floor(o*a)}return t.width=r,t.height=o,n==null||n.drawImage(e,0,0,r,o),{canvas:t,ctx:n}};function Yu(e){const{children:t,value:n,index:r,tabOptions:o,base64:a,setBase64:s,setActivateCamera:u,activateCamera:h,webcamRef:g,Webcam:d,videoConstraints:f,onUploadImage:p,dualModeRequired:C,status:v,onUploadImage2:y,...E}=e;return i("div",{role:"tabpanel",hidden:n!==r,id:`simple-tabpanel-${r}`,"aria-labelledby":`simple-tab-${r}`,...E,className:"tabpanel",children:n===r&&i(c1,{height:"100%",children:t})})}Yu.propTypes={children:nt.node,index:nt.number.isRequired,value:nt.number.isRequired};function ub(e){return{id:`simple-tab-${e}`,"aria-controls":`simple-tabpanel-${e}`}}function ute({base64:e,setBase64:t,setActivateCamera:n,activateCamera:r,webcamRef:o,Webcam:a,videoConstraints:s,onUploadImage:u,dualModeRequired:h,status:g,onUploadImage2:d,uploadDocumentByPhone:f,onSendSubmitDocument:p}){const[C,v]=S.useState(0),[y,E]=S.useState(!1),[w,x]=Ze.useState(!1),[I,A]=Ze.useState([]),[V,F]=Ze.useState(0),R=(J,ee)=>{v(ee),n(!1)},P=J=>{const ee={...e};delete ee[J],t(ee)},O=()=>{E(!y)},N=Ze.useRef(null),G=Ze.useRef(null),q=async J=>{const ee=N.current;if(!ee)return;const{canvas:ge}=cte(ee),ce=ge.toDataURL("image/jpeg");d(J,ce),D()},Q=async()=>{var ge,ce;if(!G.current)return;const[J]=G.current.getVideoTracks(),ee=(ge=J.getCapabilities)==null?void 0:ge.call(J);if((ce=J.getSettings)==null||ce.call(J),!(!ee||!ee.focusMode))try{ee.focusMode.includes("continuous")?await J.applyConstraints({frameRate:{ideal:30},advanced:[{focusMode:"continuous"}]}):ee.focusMode.includes("single-shot")?await J.applyConstraints({frameRate:{ideal:30},advanced:[{focusMode:"single-shot"}]}):ee.focusMode.includes("manual")&&ee.focusDistance?await J.applyConstraints({frameRate:{ideal:30},advanced:[{focusMode:"manual",focusDistance:ee.focusDistance.min}]}):console.warn("No hay modo de enfoque compatible")}catch(Ie){console.error("Error al aplicar constraints de enfoque:",Ie)}},T=Ze.useRef(null),W=async J=>{const ee=J.target.files[0],ge=await ste(ee),ce=J.target.name;d(ce,ge),D()},D=()=>{e.firstImage&&h&&R(J=>J,1),e.firstImage&&e.secondImage&&p()},H=()=>{x(!1),n(!0)},Z=()=>{F(J=>(J+1)%I.length)};return _(c1,{sx:{width:"100%"},children:[i(c1,{sx:{borderBottom:1,borderColor:"divider"},children:_(Yee,{value:C,onChange:R,"aria-label":"document selector",children:[i(qC,{label:"Frontal",...ub(0)}),h&&i(qC,{label:"Reverso",...ub(1)})]})}),i(Yu,{value:C,index:0,children:i(c1,{className:"thumbnails-container",children:i(c1,{className:"thumbnails",children:_(c1,{display:"flex",flexDirection:"column",justifyContent:"flex-start",alignItems:"flex-start",width:"100%",children:[e.firstImage?i("div",{className:"img-container",style:{transition:"transform 0.3s ease-in-out, width 0.3s ease-in-out",width:"100%",position:"relative",zIndex:1},children:i("img",{src:e.firstImage,onClick:O,alt:"thumbnail",style:{width:"100%",height:"100%",objectFit:"cover"}})}):f?i(cb,{handleFileChange:W,side:"firstImage",fileInputRef:T,title:"Cargar documeto",subtitle:"Vamos a cargar el documento desde tu dispositivo. \xA1Ten en cuenta lo siguiente!",startUpload:r,setActivateCamera:n}):i(sb,{videoRef:N,streamRef:G,setActivateCamera:n,activateCamera:r,videoConstraints:s,onTapToFocus:Q,title:"Cargar documento",subtitle:"Subir frontal del documento",currentCameraIndex:V,cameras:I,setCameras:A}),_(c1,{width:"100%",children:[e.firstImage&&_(c1,{className:"toolbox-container",children:[i(c1,{className:"zoom-button",onClick:O,children:i(w4,{title:"Ampliar",placement:"right",arrow:!0,children:i(ib,{})})}),i(c1,{className:"delete-button",onClick:()=>P("firstImage"),children:i(w4,{title:"Vaciar",placement:"right",arrow:!0,children:i(d6,{sx:{color:"white"}})})})]}),!r&&!e.firstImage&&i(_n,{type:"button",onClick:H,children:"Continuar"}),!r&&e.firstImage&&h&&i(_n,{type:"button",onClick:J=>R(J,1),children:"Cargar reverso del documento"}),r&&!w&&!f&&_(c1,{display:"flex",flexDirection:"column",alignItems:"end",children:[I.length>1&&i(c1,{onClick:Z,className:"change-camera-button",children:i(u6,{})}),i(_n,{type:"button",onClick:()=>q("firstImage"),className:"m-0",children:"Capturar"})]}),!g&&Object.keys(e).length>0&&!r&&Rr(g)&&(!h&&e.firstImage||h&&e.firstImage&&e.secondImage)&&_(c1,{children:[h&&i(p4,{children:"O"}),i(_n,{type:"submit",children:"Procesar"})]})]})]})})})}),i(Yu,{value:C,index:1,children:i(c1,{className:"thumbnails-container",children:i(c1,{className:"thumbnails",children:_(c1,{display:"flex",flexDirection:"column",justifyContent:"flex-start",alignItems:"flex-start",width:"100%",children:[e.secondImage?i("div",{className:"img-container",style:{transition:"transform 0.3s ease-in-out, width 0.3s ease-in-out",width:"100%",position:"relative",zIndex:1},children:i("img",{src:e.secondImage,onClick:O,alt:"thumbnail",style:{width:"100%",height:"100%",objectFit:"cover"}})}):f?i(cb,{handleFileChange:W,side:"secondImage",fileInputRef:T,title:"Bien ahora vamos por el reverso",subtitle:"\xA1Recuerda tener en cuenta lo siguiente!",startUpload:r,setActivateCamera:n}):i(sb,{videoRef:N,streamRef:G,setActivateCamera:n,activateCamera:r,videoConstraints:s,title:"Bien ahora carguemos el reverso",subtitle:"Asegurate de que sea legible",onTapToFocus:Q,currentCameraIndex:V,cameras:I,setCameras:A}),_(c1,{width:"100%",children:[e.secondImage&&_(c1,{className:"toolbox-container",children:[i(c1,{className:"zoom-button",onClick:O,children:i(w4,{title:"Ampliar",placement:"right",arrow:!0,children:i(ib,{})})}),i(c1,{className:"delete-button",onClick:()=>P("secondImage"),children:i(w4,{title:"Vaciar",placement:"right",arrow:!0,children:i(d6,{sx:{color:"white"}})})})]}),!r&&!e.secondImage&&i(_n,{type:"button",onClick:H,children:"Continuar"}),r&&!w&&!f&&_(c1,{display:"flex",flexDirection:"column",alignItems:"end",children:[I.length>1&&i(c1,{onClick:Z,className:"change-camera-button",children:i(u6,{})}),i(_n,{type:"button",onClick:()=>q("secondImage"),children:"Capturar"})]}),!g&&Object.keys(e).length>0&&!r&&Rr(g)&&(!h&&e.secondImage&&e.firstImage||h&&e.firstImage&&e.secondImage)&&i(_n,{type:"submit",children:"Procesar"})]})]})})})}),y&&i(c1,{sx:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",justifyContent:"center",alignItems:"center",zIndex:999},children:i(c1,{display:"flex",justifyContent:"center",alignItems:"center",position:"relative",height:525,children:i("img",{src:C===0?e.firstImage:e.secondImage,alt:"zoomed",onClick:O,style:{overflow:"auto",maxWidth:y?"140%":"100%",maxHeight:"90%",objectFit:"contain",borderRadius:"5px"}})})})]})}var db={exports:{}};(function(e,t){(function(r,o){e.exports=o(_t.default)})(zl,function(n){return function(r){var o={};function a(s){if(o[s])return o[s].exports;var u=o[s]={i:s,l:!1,exports:{}};return r[s].call(u.exports,u,u.exports,a),u.l=!0,u.exports}return a.m=r,a.c=o,a.d=function(s,u,h){a.o(s,u)||Object.defineProperty(s,u,{enumerable:!0,get:h})},a.r=function(s){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},a.t=function(s,u){if(u&1&&(s=a(s)),u&8||u&4&&typeof s=="object"&&s&&s.__esModule)return s;var h=Object.create(null);if(a.r(h),Object.defineProperty(h,"default",{enumerable:!0,value:s}),u&2&&typeof s!="string")for(var g in s)a.d(h,g,function(d){return s[d]}.bind(null,g));return h},a.n=function(s){var u=s&&s.__esModule?function(){return s.default}:function(){return s};return a.d(u,"a",u),u},a.o=function(s,u){return Object.prototype.hasOwnProperty.call(s,u)},a.p="",a(a.s="./src/react-webcam.tsx")}({"./src/react-webcam.tsx":function(r,o,a){a.r(o);var s=a("react"),u=function(){var p=function(C,v){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,E){y.__proto__=E}||function(y,E){for(var w in E)E.hasOwnProperty(w)&&(y[w]=E[w])},p(C,v)};return function(C,v){p(C,v);function y(){this.constructor=C}C.prototype=v===null?Object.create(v):(y.prototype=v.prototype,new y)}}(),h=function(){return h=Object.assign||function(p){for(var C,v=1,y=arguments.length;v<y;v++){C=arguments[v];for(var E in C)Object.prototype.hasOwnProperty.call(C,E)&&(p[E]=C[E])}return p},h.apply(this,arguments)},g=function(p,C){var v={};for(var y in p)Object.prototype.hasOwnProperty.call(p,y)&&C.indexOf(y)<0&&(v[y]=p[y]);if(p!=null&&typeof Object.getOwnPropertySymbols=="function")for(var E=0,y=Object.getOwnPropertySymbols(p);E<y.length;E++)C.indexOf(y[E])<0&&Object.prototype.propertyIsEnumerable.call(p,y[E])&&(v[y[E]]=p[y[E]]);return v};(function(){typeof window!="undefined"&&(navigator.mediaDevices===void 0&&(navigator.mediaDevices={}),navigator.mediaDevices.getUserMedia===void 0&&(navigator.mediaDevices.getUserMedia=function(C){var v=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;return v?new Promise(function(y,E){v.call(navigator,C,y,E)}):Promise.reject(new Error("getUserMedia is not implemented in this browser"))}))})();function d(){return!!(navigator.mediaDevices&&navigator.mediaDevices.getUserMedia)}var f=function(p){u(C,p);function C(v){var y=p.call(this,v)||this;return y.canvas=null,y.ctx=null,y.requestUserMediaId=0,y.unmounted=!1,y.state={hasUserMedia:!1},y}return C.prototype.componentDidMount=function(){var v=this,y=v.state,E=v.props;if(this.unmounted=!1,!d()){E.onUserMediaError("getUserMedia not supported");return}y.hasUserMedia||this.requestUserMedia(),E.children&&typeof E.children!="function"&&console.warn("children must be a function")},C.prototype.componentDidUpdate=function(v){var y=this.props;if(!d()){y.onUserMediaError("getUserMedia not supported");return}var E=JSON.stringify(v.audioConstraints)!==JSON.stringify(y.audioConstraints),w=JSON.stringify(v.videoConstraints)!==JSON.stringify(y.videoConstraints),x=v.minScreenshotWidth!==y.minScreenshotWidth,I=v.minScreenshotHeight!==y.minScreenshotHeight;(w||x||I)&&(this.canvas=null,this.ctx=null),(E||w)&&(this.stopAndCleanup(),this.requestUserMedia())},C.prototype.componentWillUnmount=function(){this.unmounted=!0,this.stopAndCleanup()},C.stopMediaStream=function(v){v&&(v.getVideoTracks&&v.getAudioTracks?(v.getVideoTracks().map(function(y){v.removeTrack(y),y.stop()}),v.getAudioTracks().map(function(y){v.removeTrack(y),y.stop()})):v.stop())},C.prototype.stopAndCleanup=function(){var v=this.state;v.hasUserMedia&&(C.stopMediaStream(this.stream),v.src&&window.URL.revokeObjectURL(v.src))},C.prototype.getScreenshot=function(v){var y=this,E=y.state,w=y.props;if(!E.hasUserMedia)return null;var x=this.getCanvas(v);return x&&x.toDataURL(w.screenshotFormat,w.screenshotQuality)},C.prototype.getCanvas=function(v){var y=this,E=y.state,w=y.props;if(!this.video||!E.hasUserMedia||!this.video.videoHeight)return null;if(!this.ctx){var x=this.video.videoWidth,I=this.video.videoHeight;if(!this.props.forceScreenshotSourceSize){var A=x/I;x=w.minScreenshotWidth||this.video.clientWidth,I=x/A,w.minScreenshotHeight&&I<w.minScreenshotHeight&&(I=w.minScreenshotHeight,x=I*A)}this.canvas=document.createElement("canvas"),this.canvas.width=(v==null?void 0:v.width)||x,this.canvas.height=(v==null?void 0:v.height)||I,this.ctx=this.canvas.getContext("2d")}var V=this,F=V.ctx,R=V.canvas;return F&&R&&(R.width=(v==null?void 0:v.width)||R.width,R.height=(v==null?void 0:v.height)||R.height,w.mirrored&&(F.translate(R.width,0),F.scale(-1,1)),F.imageSmoothingEnabled=w.imageSmoothing,F.drawImage(this.video,0,0,(v==null?void 0:v.width)||R.width,(v==null?void 0:v.height)||R.height),w.mirrored&&(F.scale(-1,1),F.translate(-R.width,0))),R},C.prototype.requestUserMedia=function(){var v=this,y=this.props,E=function(I,A){var V={video:typeof A!="undefined"?A:!0};y.audio&&(V.audio=typeof I!="undefined"?I:!0),v.requestUserMediaId++;var F=v.requestUserMediaId;navigator.mediaDevices.getUserMedia(V).then(function(R){v.unmounted||F!==v.requestUserMediaId?C.stopMediaStream(R):v.handleUserMedia(null,R)}).catch(function(R){v.handleUserMedia(R)})};if("mediaDevices"in navigator)E(y.audioConstraints,y.videoConstraints);else{var w=function(I){return{optional:[{sourceId:I}]}},x=function(I){var A=I.deviceId;return typeof A=="string"?A:Array.isArray(A)&&A.length>0?A[0]:typeof A=="object"&&A.ideal?A.ideal:null};MediaStreamTrack.getSources(function(I){var A=null,V=null;I.forEach(function(P){P.kind==="audio"?A=P.id:P.kind==="video"&&(V=P.id)});var F=x(y.audioConstraints);F&&(A=F);var R=x(y.videoConstraints);R&&(V=R),E(w(A),w(V))})}},C.prototype.handleUserMedia=function(v,y){var E=this.props;if(v||!y){this.setState({hasUserMedia:!1}),E.onUserMediaError(v);return}this.stream=y;try{this.video&&(this.video.srcObject=y),this.setState({hasUserMedia:!0})}catch{this.setState({hasUserMedia:!0,src:window.URL.createObjectURL(y)})}E.onUserMedia(y)},C.prototype.render=function(){var v=this,y=this,E=y.state,w=y.props,x=w.audio;w.forceScreenshotSourceSize;var I=w.disablePictureInPicture;w.onUserMedia,w.onUserMediaError,w.screenshotFormat,w.screenshotQuality,w.minScreenshotWidth,w.minScreenshotHeight,w.audioConstraints,w.videoConstraints,w.imageSmoothing;var A=w.mirrored,V=w.style,F=V===void 0?{}:V,R=w.children,P=g(w,["audio","forceScreenshotSourceSize","disablePictureInPicture","onUserMedia","onUserMediaError","screenshotFormat","screenshotQuality","minScreenshotWidth","minScreenshotHeight","audioConstraints","videoConstraints","imageSmoothing","mirrored","style","children"]),O=A?h(h({},F),{transform:(F.transform||"")+" scaleX(-1)"}):F,N={getScreenshot:this.getScreenshot.bind(this)};return s.createElement(s.Fragment,null,s.createElement("video",h({autoPlay:!0,disablePictureInPicture:I,src:E.src,muted:!x,playsInline:!0,ref:function(G){v.video=G},style:O},P)),R&&R(N))},C.defaultProps={audio:!1,disablePictureInPicture:!1,forceScreenshotSourceSize:!1,imageSmoothing:!0,mirrored:!1,onUserMedia:function(){},onUserMediaError:function(){},screenshotFormat:"image/webp",screenshotQuality:.92},C}(s.Component);o.default=f},react:function(r,o){r.exports=n}}).default})})(db);var hb=GE(db.exports);class S4{static cropImage(t,n,r){return new Promise(o=>{const a=document.createElement("canvas"),s=a.getContext("2d"),u=t.naturalWidth/r.width,h=t.naturalHeight/r.height,g={x:n.x*u,y:n.y*h,width:n.width*u,height:n.height*h};a.width=g.width,a.height=g.height,s.drawImage(t,g.x,g.y,g.width,g.height,0,0,g.width,g.height);const d=a.toDataURL("image/jpeg",.9);o(d)})}static constrainCropArea(t,n,r=50){const o={...t};return o.width=Math.max(o.width,r),o.height=Math.max(o.height,r),o.x=Math.max(0,Math.min(o.x,n.width-o.width)),o.y=Math.max(0,Math.min(o.y,n.height-o.height)),o.x+o.width>n.width&&(o.width=n.width-o.x),o.y+o.height>n.height&&(o.height=n.height-o.y),o}static maintainAspectRatio(t,n,r){const o={...t},a=o.width/n;return a<=r.height-o.y?o.height=a:(o.height=r.height-o.y,o.width=o.height*n),o}}const dte=({aspectRatio:e,minCropSize:t=50}={})=>{const[n,r]=Ze.useState({x:0,y:0,width:200,height:200}),[o,a]=Ze.useState(!1),[s,u]=Ze.useState(!1),[h,g]=Ze.useState({x:0,y:0}),[d,f]=Ze.useState(""),[p,C]=Ze.useState({width:0,height:0}),v=Ze.useRef(null),y=Ze.useRef(null),E=Ze.useCallback(()=>{if(!v.current)return{width:0,height:0};const P=v.current.getBoundingClientRect();return{width:P.width,height:P.height}},[]),w=Ze.useCallback(()=>{if(!v.current||!y.current)return{x:0,y:0};const P=y.current.getBoundingClientRect(),O=v.current.getBoundingClientRect();return{x:O.left-P.left,y:O.top-P.top}},[]),x=Ze.useCallback(()=>{if(!v.current)return;const P=E();C(P);const O=Math.min(P.width,P.height)*.8,N=(P.width-O)/2,G=(P.height-O)/2;let q={x:N,y:G,width:O,height:O};e&&(q=S4.maintainAspectRatio(q,e,P)),r(q)},[e,E]),I=P=>"touches"in P&&P.touches.length>0?{clientX:P.touches[0].clientX,clientY:P.touches[0].clientY}:{clientX:P.clientX,clientY:P.clientY},A=Ze.useCallback((P,O)=>{var W;P.preventDefault(),P.stopPropagation();const N=(W=y.current)==null?void 0:W.getBoundingClientRect(),G=w();if(!N)return;const q=I(P),Q=q.clientX-N.left-G.x,T=q.clientY-N.top-G.y;g({x:Q,y:T}),O?(u(!0),f(O)):a(!0)},[w]),V=Ze.useCallback(P=>{var H;if(!v.current||!o&&!s)return;const O=(H=y.current)==null?void 0:H.getBoundingClientRect(),N=w();if(!O)return;const G=I(P),q=G.clientX-O.left-N.x,Q=G.clientY-O.top-N.y,T=q-h.x,W=Q-h.y,D=E();if(o){const Z={...n,x:n.x+T,y:n.y+W},J=S4.constrainCropArea(Z,D,t);r(J),g({x:q,y:Q})}else if(s){let Z={...n};switch(d){case"se":Z.width=Math.max(t,n.width+T),Z.height=Math.max(t,n.height+W);break;case"sw":Z.x=n.x+T,Z.width=Math.max(t,n.width-T),Z.height=Math.max(t,n.height+W);break;case"ne":Z.y=n.y+W,Z.width=Math.max(t,n.width+T),Z.height=Math.max(t,n.height-W);break;case"nw":Z.x=n.x+T,Z.y=n.y+W,Z.width=Math.max(t,n.width-T),Z.height=Math.max(t,n.height-W);break}e&&(Z=S4.maintainAspectRatio(Z,e,D));const J=S4.constrainCropArea(Z,D,t);r(J),g({x:q,y:Q})}},[o,s,h,n,d,e,t,w,E]),F=Ze.useCallback(()=>{a(!1),u(!1),f("")},[]),R=Ze.useCallback(async()=>{if(!v.current)return null;try{const P=await S4.cropImage(v.current,n,p);return{originalImage:v.current.src,croppedImage:P,cropArea:n}}catch(P){return console.error("Error cropping image:",P),null}},[n,p]);return{cropArea:n,isDragging:o,isResizing:s,imageRef:v,containerRef:y,displayedImageRect:p,initializeCrop:x,handleMouseDown:A,handleMouseMove:V,handleMouseUp:F,cropImage:R,getImageOffset:w}};var Mr={"image-crop-modal":"_image-crop-modal_13qpu_1","MuiDialog-paper":"_MuiDialog-paper_13qpu_1","image-crop-container":"_image-crop-container_13qpu_7","crop-header":"_crop-header_13qpu_14","crop-area":"_crop-area_13qpu_29","crop-image":"_crop-image_13qpu_40","crop-overlay":"_crop-overlay_13qpu_48","crop-selection":"_crop-selection_13qpu_56","crop-handle":"_crop-handle_13qpu_72","handle-nw":"_handle-nw_13qpu_100","handle-ne":"_handle-ne_13qpu_105","handle-sw":"_handle-sw_13qpu_110","handle-se":"_handle-se_13qpu_115","crop-grid":"_crop-grid_13qpu_120","grid-vertical":"_grid-vertical_13qpu_145","crop-actions":"_crop-actions_13qpu_158","MuiButton-root":"_MuiButton-root_13qpu_166","MuiButton-outlined":"_MuiButton-outlined_13qpu_173","crop-preview":"_crop-preview_13qpu_176","preview-label":"_preview-label_13qpu_183","preview-image":"_preview-image_13qpu_188"};const hte=({image:e,onCropComplete:t,onCancel:n,aspectRatio:r,minCropSize:o=50})=>{const[a,s]=Ze.useState(!1),[u,h]=Ze.useState(!1),{cropArea:g,isDragging:d,isResizing:f,imageRef:p,containerRef:C,initializeCrop:v,handleMouseDown:y,handleMouseMove:E,handleMouseUp:w,cropImage:x,getImageOffset:I}=dte({aspectRatio:r,minCropSize:o}),A=()=>{p.current&&setTimeout(()=>{v(),h(!0)},100)},V=async()=>{s(!0);try{const F=await x();F&&t(F)}catch(F){console.error("Error al recortar imagen:",F)}finally{s(!1)}};return Ze.useEffect(()=>{const F=N=>{if(d||f){const G={clientX:N.clientX,clientY:N.clientY,preventDefault:()=>N.preventDefault()};E(G)}},R=N=>{if(d||f){N.preventDefault();const G={touches:N.touches,preventDefault:()=>N.preventDefault()};E(G)}},P=()=>{w()},O=()=>{w()};return(d||f)&&(document.addEventListener("mousemove",F),document.addEventListener("mouseup",P),document.addEventListener("touchmove",R,{passive:!1}),document.addEventListener("touchend",O)),()=>{document.removeEventListener("mousemove",F),document.removeEventListener("mouseup",P),document.removeEventListener("touchmove",R),document.removeEventListener("touchend",O)}},[d,f,E,w]),i(iX,{open:!0,onClose:n,maxWidth:"lg",className:`${Mr["image-crop-modal"]} ${I1["kit-gbc"]}`,children:i(dX,{sx:{maxWidth:"md",padding:0},children:_("div",{className:Mr["image-crop-container"],children:[_("div",{className:Mr["crop-header"],children:[i(Rn,{variant:"h5",component:"h2",children:"Recortar Imagen"}),i(Rn,{variant:"body2",color:"text.secondary",children:"Arrastra para mover el \xE1rea de recorte, usa las esquinas para redimensionar"}),i(p4,{sx:{height:"1px",bgcolor:"primary.main",mt:2}})]}),_("div",{className:Mr["crop-area"],ref:C,onMouseMove:E,onMouseUp:w,children:[!u&&i(c1,{display:"flex",justifyContent:"center",alignItems:"center",p:4,children:i(e0,{sx:{color:"var(--_primary)"}})}),i("img",{ref:p,src:e,alt:"Imagen a recortar",className:Mr["crop-image"],onLoad:A,style:{opacity:u?1:0}}),u&&i(Xi,{children:i("div",{className:Mr["crop-overlay"],style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",pointerEvents:"none"},children:_("div",{className:Mr["crop-selection"],style:{position:"absolute",left:`${I().x+g.x}px`,top:`${I().y+g.y}px`,width:`${g.width}px`,height:`${g.height}px`,pointerEvents:"all"},onMouseDown:F=>y(F),onTouchStart:F=>y(F),children:[_("div",{className:Mr["crop-grid"],children:[i("div",{className:Mr["grid-vertical"]}),i("div",{className:Mr["grid-vertical"]})]}),i("div",{className:`${Mr["crop-handle"]} ${Mr["handle-nw"]}`,onMouseDown:F=>y(F,"nw"),onTouchStart:F=>y(F,"nw")}),i("div",{className:`${Mr["crop-handle"]} ${Mr["handle-ne"]}`,onMouseDown:F=>y(F,"ne"),onTouchStart:F=>y(F,"ne")}),i("div",{className:`${Mr["crop-handle"]} ${Mr["handle-sw"]}`,onMouseDown:F=>y(F,"sw"),onTouchStart:F=>y(F,"sw")}),i("div",{className:`${Mr["crop-handle"]} ${Mr["handle-se"]}`,onMouseDown:F=>y(F,"se"),onTouchStart:F=>y(F,"se")})]})})})]}),_("div",{className:Mr["crop-actions"],children:[i(_n,{type:"button",variant:"outlined",onClick:n,disabled:a,children:"Cancelar"}),i(_n,{type:"button",variant:"contained",onClick:V,sx:{backgroundColor:"var(--_primary)",color:"white","&:hover":{backgroundColor:"var(--_primary)",opacity:.8}},disabled:!u||a,startIcon:a?i(e0,{size:20,sx:{color:"var(--_primary)"}}):null,children:a?"Recortando...":"Recortar"})]})]})})})};function fb(){const e=navigator.userAgent;return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|Mobile|mobile|CriOS|FxiOS/i.test(e)}function fte(e,t){return t.forEach(function(n){n&&typeof n!="string"&&!Array.isArray(n)&&Object.keys(n).forEach(function(r){if(r!=="default"&&!(r in e)){var o=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(e,r,o.get?o:{enumerable:!0,get:function(){return n[r]}})}})}),Object.freeze(e)}function pb(e,t){return new Promise(function(n,r){let o;return pte(e).then(function(a){try{return o=a,n(new Blob([t.slice(0,2),o,t.slice(2)],{type:"image/jpeg"}))}catch(s){return r(s)}},r)})}const pte=e=>new Promise((t,n)=>{const r=new FileReader;r.addEventListener("load",({target:{result:o}})=>{const a=new DataView(o);let s=0;if(a.getUint16(s)!==65496)return n("not a valid JPEG");for(s+=2;;){const u=a.getUint16(s);if(u===65498)break;const h=a.getUint16(s+2);if(u===65505&&a.getUint32(s+4)===1165519206){const g=s+10;let d;switch(a.getUint16(g)){case 18761:d=!0;break;case 19789:d=!1;break;default:return n("TIFF header contains invalid endian")}if(a.getUint16(g+2,d)!==42)return n("TIFF header contains invalid version");const f=a.getUint32(g+4,d),p=g+f+2+12*a.getUint16(g+f,d);for(let C=g+f+2;C<p;C+=12)if(a.getUint16(C,d)==274){if(a.getUint16(C+2,d)!==3)return n("Orientation data type is invalid");if(a.getUint32(C+4,d)!==1)return n("Orientation data count is invalid");a.setUint16(C+8,1,d);break}return t(o.slice(s,s+2+h))}s+=2+h}return t(new Blob)}),r.readAsArrayBuffer(e)});var p6={},gte={get exports(){return p6},set exports(e){p6=e}};(function(e){var t,n,r={};gte.exports=r,r.parse=function(o,a){for(var s=r.bin.readUshort,u=r.bin.readUint,h=0,g={},d=new Uint8Array(o),f=d.length-4;u(d,f)!=101010256;)f--;h=f,h+=4;var p=s(d,h+=4);s(d,h+=2);var C=u(d,h+=2),v=u(d,h+=4);h+=4,h=v;for(var y=0;y<p;y++){u(d,h),h+=4,h+=4,h+=4,u(d,h+=4),C=u(d,h+=4);var E=u(d,h+=4),w=s(d,h+=4),x=s(d,h+2),I=s(d,h+4);h+=6;var A=u(d,h+=8);h+=4,h+=w+x+I,r._readLocal(d,A,g,C,E,a)}return g},r._readLocal=function(o,a,s,u,h,g){var d=r.bin.readUshort,f=r.bin.readUint;f(o,a),d(o,a+=4),d(o,a+=2);var p=d(o,a+=2);f(o,a+=2),f(o,a+=4),a+=4;var C=d(o,a+=8),v=d(o,a+=2);a+=2;var y=r.bin.readUTF8(o,a,C);if(a+=C,a+=v,g)s[y]={size:h,csize:u};else{var E=new Uint8Array(o.buffer,a);if(p==0)s[y]=new Uint8Array(E.buffer.slice(a,a+u));else{if(p!=8)throw"unknown compression method: "+p;var w=new Uint8Array(h);r.inflateRaw(E,w),s[y]=w}}},r.inflateRaw=function(o,a){return r.F.inflate(o,a)},r.inflate=function(o,a){return o[0],o[1],r.inflateRaw(new Uint8Array(o.buffer,o.byteOffset+2,o.length-6),a)},r.deflate=function(o,a){a==null&&(a={level:6});var s=0,u=new Uint8Array(50+Math.floor(1.1*o.length));u[s]=120,u[s+1]=156,s+=2,s=r.F.deflateRaw(o,u,s,a.level);var h=r.adler(o,0,o.length);return u[s+0]=h>>>24&255,u[s+1]=h>>>16&255,u[s+2]=h>>>8&255,u[s+3]=h>>>0&255,new Uint8Array(u.buffer,0,s+4)},r.deflateRaw=function(o,a){a==null&&(a={level:6});var s=new Uint8Array(50+Math.floor(1.1*o.length)),u=r.F.deflateRaw(o,s,u,a.level);return new Uint8Array(s.buffer,0,u)},r.encode=function(o,a){a==null&&(a=!1);var s=0,u=r.bin.writeUint,h=r.bin.writeUshort,g={};for(var d in o){var f=!r._noNeed(d)&&!a,p=o[d],C=r.crc.crc(p,0,p.length);g[d]={cpr:f,usize:p.length,crc:C,file:f?r.deflateRaw(p):p}}for(var d in g)s+=g[d].file.length+30+46+2*r.bin.sizeUTF8(d);s+=22;var v=new Uint8Array(s),y=0,E=[];for(var d in g){var w=g[d];E.push(y),y=r._writeHeader(v,y,d,w,0)}var x=0,I=y;for(var d in g)w=g[d],E.push(y),y=r._writeHeader(v,y,d,w,1,E[x++]);var A=y-I;return u(v,y,101010256),y+=4,h(v,y+=4,x),h(v,y+=2,x),u(v,y+=2,A),u(v,y+=4,I),y+=4,y+=2,v.buffer},r._noNeed=function(o){var a=o.split(".").pop().toLowerCase();return"png,jpg,jpeg,zip".indexOf(a)!=-1},r._writeHeader=function(o,a,s,u,h,g){var d=r.bin.writeUint,f=r.bin.writeUshort,p=u.file;return d(o,a,h==0?67324752:33639248),a+=4,h==1&&(a+=2),f(o,a,20),f(o,a+=2,0),f(o,a+=2,u.cpr?8:0),d(o,a+=2,0),d(o,a+=4,u.crc),d(o,a+=4,p.length),d(o,a+=4,u.usize),f(o,a+=4,r.bin.sizeUTF8(s)),f(o,a+=2,0),a+=2,h==1&&(a+=2,a+=2,d(o,a+=6,g),a+=4),a+=r.bin.writeUTF8(o,a,s),h==0&&(o.set(p,a),a+=p.length),a},r.crc={table:function(){for(var o=new Uint32Array(256),a=0;a<256;a++){for(var s=a,u=0;u<8;u++)1&s?s=3988292384^s>>>1:s>>>=1;o[a]=s}return o}(),update:function(o,a,s,u){for(var h=0;h<u;h++)o=r.crc.table[255&(o^a[s+h])]^o>>>8;return o},crc:function(o,a,s){return 4294967295^r.crc.update(4294967295,o,a,s)}},r.adler=function(o,a,s){for(var u=1,h=0,g=a,d=a+s;g<d;){for(var f=Math.min(g+5552,d);g<f;)h+=u+=o[g++];u%=65521,h%=65521}return h<<16|u},r.bin={readUshort:function(o,a){return o[a]|o[a+1]<<8},writeUshort:function(o,a,s){o[a]=255&s,o[a+1]=s>>8&255},readUint:function(o,a){return 16777216*o[a+3]+(o[a+2]<<16|o[a+1]<<8|o[a])},writeUint:function(o,a,s){o[a]=255&s,o[a+1]=s>>8&255,o[a+2]=s>>16&255,o[a+3]=s>>24&255},readASCII:function(o,a,s){for(var u="",h=0;h<s;h++)u+=String.fromCharCode(o[a+h]);return u},writeASCII:function(o,a,s){for(var u=0;u<s.length;u++)o[a+u]=s.charCodeAt(u)},pad:function(o){return o.length<2?"0"+o:o},readUTF8:function(o,a,s){for(var u,h="",g=0;g<s;g++)h+="%"+r.bin.pad(o[a+g].toString(16));try{u=decodeURIComponent(h)}catch{return r.bin.readASCII(o,a,s)}return u},writeUTF8:function(o,a,s){for(var u=s.length,h=0,g=0;g<u;g++){var d=s.charCodeAt(g);if((4294967168&d)==0)o[a+h]=d,h++;else if((4294965248&d)==0)o[a+h]=192|d>>6,o[a+h+1]=128|d>>0&63,h+=2;else if((4294901760&d)==0)o[a+h]=224|d>>12,o[a+h+1]=128|d>>6&63,o[a+h+2]=128|d>>0&63,h+=3;else{if((4292870144&d)!=0)throw"e";o[a+h]=240|d>>18,o[a+h+1]=128|d>>12&63,o[a+h+2]=128|d>>6&63,o[a+h+3]=128|d>>0&63,h+=4}}return h},sizeUTF8:function(o){for(var a=o.length,s=0,u=0;u<a;u++){var h=o.charCodeAt(u);if((4294967168&h)==0)s++;else if((4294965248&h)==0)s+=2;else if((4294901760&h)==0)s+=3;else{if((4292870144&h)!=0)throw"e";s+=4}}return s}},r.F={},r.F.deflateRaw=function(o,a,s,u){var h=[[0,0,0,0,0],[4,4,8,4,0],[4,5,16,8,0],[4,6,16,16,0],[4,10,16,32,0],[8,16,32,32,0],[8,16,128,128,0],[8,32,128,256,0],[32,128,258,1024,1],[32,258,258,4096,1]][u],g=r.F.U,d=r.F._goodIndex;r.F._hash;var f=r.F._putsE,p=0,C=s<<3,v=0,y=o.length;if(u==0){for(;p<y;)f(a,C,p+(G=Math.min(65535,y-p))==y?1:0),C=r.F._copyExact(o,p,G,a,C+8),p+=G;return C>>>3}var E=g.lits,w=g.strt,x=g.prev,I=0,A=0,V=0,F=0,R=0,P=0;for(y>2&&(w[P=r.F._hash(o,0)]=0),p=0;p<y;p++){if(R=P,p+1<y-2){P=r.F._hash(o,p+1);var O=p+1&32767;x[O]=w[P],w[P]=O}if(v<=p){(I>14e3||A>26697)&&y-p>100&&(v<p&&(E[I]=p-v,I+=2,v=p),C=r.F._writeBlock(p==y-1||v==y?1:0,E,I,F,o,V,p-V,a,C),I=A=F=0,V=p);var N=0;p<y-2&&(N=r.F._bestMatch(o,p,x,R,Math.min(h[2],y-p),h[3]));var G=N>>>16,q=65535&N;if(N!=0){q=65535&N;var Q=d(G=N>>>16,g.of0);g.lhst[257+Q]++;var T=d(q,g.df0);g.dhst[T]++,F+=g.exb[Q]+g.dxb[T],E[I]=G<<23|p-v,E[I+1]=q<<16|Q<<8|T,I+=2,v=p+G}else g.lhst[o[p]]++;A++}}for(V==p&&o.length!=0||(v<p&&(E[I]=p-v,I+=2,v=p),C=r.F._writeBlock(1,E,I,F,o,V,p-V,a,C),I=0,A=0,I=A=F=0,V=p);(7&C)!=0;)C++;return C>>>3},r.F._bestMatch=function(o,a,s,u,h,g){var d=32767&a,f=s[d],p=d-f+32768&32767;if(f==d||u!=r.F._hash(o,a-p))return 0;for(var C=0,v=0,y=Math.min(32767,a);p<=y&&--g!=0&&f!=d;){if(C==0||o[a+C]==o[a+C-p]){var E=r.F._howLong(o,a,p);if(E>C){if(v=p,(C=E)>=h)break;p+2<E&&(E=p+2);for(var w=0,x=0;x<E-2;x++){var I=a-p+x+32768&32767,A=I-s[I]+32768&32767;A>w&&(w=A,f=I)}}}p+=(d=f)-(f=s[d])+32768&32767}return C<<16|v},r.F._howLong=function(o,a,s){if(o[a]!=o[a-s]||o[a+1]!=o[a+1-s]||o[a+2]!=o[a+2-s])return 0;var u=a,h=Math.min(o.length,a+258);for(a+=3;a<h&&o[a]==o[a-s];)a++;return a-u},r.F._hash=function(o,a){return(o[a]<<8|o[a+1])+(o[a+2]<<4)&65535},r.saved=0,r.F._writeBlock=function(o,a,s,u,h,g,d,f,p){var C,v,y,E,w,x,I,A,V,F=r.F.U,R=r.F._putsF,P=r.F._putsE;F.lhst[256]++,v=(C=r.F.getTrees())[0],y=C[1],E=C[2],w=C[3],x=C[4],I=C[5],A=C[6],V=C[7];var O=32+((p+3&7)==0?0:8-(p+3&7))+(d<<3),N=u+r.F.contSize(F.fltree,F.lhst)+r.F.contSize(F.fdtree,F.dhst),G=u+r.F.contSize(F.ltree,F.lhst)+r.F.contSize(F.dtree,F.dhst);G+=14+3*I+r.F.contSize(F.itree,F.ihst)+(2*F.ihst[16]+3*F.ihst[17]+7*F.ihst[18]);for(var q=0;q<286;q++)F.lhst[q]=0;for(q=0;q<30;q++)F.dhst[q]=0;for(q=0;q<19;q++)F.ihst[q]=0;var Q=O<N&&O<G?0:N<G?1:2;if(R(f,p,o),R(f,p+1,Q),p+=3,Q==0){for(;(7&p)!=0;)p++;p=r.F._copyExact(h,g,d,f,p)}else{var T,W;if(Q==1&&(T=F.fltree,W=F.fdtree),Q==2){r.F.makeCodes(F.ltree,v),r.F.revCodes(F.ltree,v),r.F.makeCodes(F.dtree,y),r.F.revCodes(F.dtree,y),r.F.makeCodes(F.itree,E),r.F.revCodes(F.itree,E),T=F.ltree,W=F.dtree,P(f,p,w-257),P(f,p+=5,x-1),P(f,p+=5,I-4),p+=4;for(var D=0;D<I;D++)P(f,p+3*D,F.itree[1+(F.ordr[D]<<1)]);p+=3*I,p=r.F._codeTiny(A,F.itree,f,p),p=r.F._codeTiny(V,F.itree,f,p)}for(var H=g,Z=0;Z<s;Z+=2){for(var J=a[Z],ee=J>>>23,ge=H+(8388607&J);H<ge;)p=r.F._writeLit(h[H++],T,f,p);if(ee!=0){var ce=a[Z+1],Ie=ce>>16,Ce=ce>>8&255,re=255&ce;P(f,p=r.F._writeLit(257+Ce,T,f,p),ee-F.of0[Ce]),p+=F.exb[Ce],R(f,p=r.F._writeLit(re,W,f,p),Ie-F.df0[re]),p+=F.dxb[re],H+=ee}}p=r.F._writeLit(256,T,f,p)}return p},r.F._copyExact=function(o,a,s,u,h){var g=h>>>3;return u[g]=s,u[g+1]=s>>>8,u[g+2]=255-u[g],u[g+3]=255-u[g+1],g+=4,u.set(new Uint8Array(o.buffer,a,s),g),h+(s+4<<3)},r.F.getTrees=function(){for(var o=r.F.U,a=r.F._hufTree(o.lhst,o.ltree,15),s=r.F._hufTree(o.dhst,o.dtree,15),u=[],h=r.F._lenCodes(o.ltree,u),g=[],d=r.F._lenCodes(o.dtree,g),f=0;f<u.length;f+=2)o.ihst[u[f]]++;for(f=0;f<g.length;f+=2)o.ihst[g[f]]++;for(var p=r.F._hufTree(o.ihst,o.itree,7),C=19;C>4&&o.itree[1+(o.ordr[C-1]<<1)]==0;)C--;return[a,s,p,h,d,C,u,g]},r.F.getSecond=function(o){for(var a=[],s=0;s<o.length;s+=2)a.push(o[s+1]);return a},r.F.nonZero=function(o){for(var a="",s=0;s<o.length;s+=2)o[s+1]!=0&&(a+=(s>>1)+",");return a},r.F.contSize=function(o,a){for(var s=0,u=0;u<a.length;u++)s+=a[u]*o[1+(u<<1)];return s},r.F._codeTiny=function(o,a,s,u){for(var h=0;h<o.length;h+=2){var g=o[h],d=o[h+1];u=r.F._writeLit(g,a,s,u);var f=g==16?2:g==17?3:7;g>15&&(r.F._putsE(s,u,d,f),u+=f)}return u},r.F._lenCodes=function(o,a){for(var s=o.length;s!=2&&o[s-1]==0;)s-=2;for(var u=0;u<s;u+=2){var h=o[u+1],g=u+3<s?o[u+3]:-1,d=u+5<s?o[u+5]:-1,f=u==0?-1:o[u-1];if(h==0&&g==h&&d==h){for(var p=u+5;p+2<s&&o[p+2]==h;)p+=2;(C=Math.min(p+1-u>>>1,138))<11?a.push(17,C-3):a.push(18,C-11),u+=2*C-2}else if(h==f&&g==h&&d==h){for(p=u+5;p+2<s&&o[p+2]==h;)p+=2;var C=Math.min(p+1-u>>>1,6);a.push(16,C-3),u+=2*C-2}else a.push(h,0)}return s>>>1},r.F._hufTree=function(o,a,s){var u=[],h=o.length,g=a.length,d=0;for(d=0;d<g;d+=2)a[d]=0,a[d+1]=0;for(d=0;d<h;d++)o[d]!=0&&u.push({lit:d,f:o[d]});var f=u.length,p=u.slice(0);if(f==0)return 0;if(f==1){var C=u[0].lit;return p=C==0?1:0,a[1+(C<<1)]=1,a[1+(p<<1)]=1,1}u.sort(function(A,V){return A.f-V.f});var v=u[0],y=u[1],E=0,w=1,x=2;for(u[0]={lit:-1,f:v.f+y.f,l:v,r:y,d:0};w!=f-1;)v=E!=w&&(x==f||u[E].f<u[x].f)?u[E++]:u[x++],y=E!=w&&(x==f||u[E].f<u[x].f)?u[E++]:u[x++],u[w++]={lit:-1,f:v.f+y.f,l:v,r:y};var I=r.F.setDepth(u[w-1],0);for(I>s&&(r.F.restrictDepth(p,s,I),I=s),d=0;d<f;d++)a[1+(p[d].lit<<1)]=p[d].d;return I},r.F.setDepth=function(o,a){return o.lit!=-1?(o.d=a,a):Math.max(r.F.setDepth(o.l,a+1),r.F.setDepth(o.r,a+1))},r.F.restrictDepth=function(o,a,s){var u=0,h=1<<s-a,g=0;for(o.sort(function(f,p){return p.d==f.d?f.f-p.f:p.d-f.d}),u=0;u<o.length&&o[u].d>a;u++){var d=o[u].d;o[u].d=a,g+=h-(1<<s-d)}for(g>>>=s-a;g>0;)(d=o[u].d)<a?(o[u].d++,g-=1<<a-d-1):u++;for(;u>=0;u--)o[u].d==a&&g<0&&(o[u].d--,g++);g!=0&&console.log("debt left")},r.F._goodIndex=function(o,a){var s=0;return a[16|s]<=o&&(s|=16),a[8|s]<=o&&(s|=8),a[4|s]<=o&&(s|=4),a[2|s]<=o&&(s|=2),a[1|s]<=o&&(s|=1),s},r.F._writeLit=function(o,a,s,u){return r.F._putsF(s,u,a[o<<1]),u+a[1+(o<<1)]},r.F.inflate=function(o,a){var s=Uint8Array;if(o[0]==3&&o[1]==0)return a||new s(0);var u=r.F,h=u._bitsF,g=u._bitsE,d=u._decodeTiny,f=u.makeCodes,p=u.codes2map,C=u._get17,v=u.U,y=a==null;y&&(a=new s(o.length>>>2<<3));for(var E,w,x=0,I=0,A=0,V=0,F=0,R=0,P=0,O=0,N=0;x==0;)if(x=h(o,N,1),I=h(o,N+1,2),N+=3,I!=0){if(y&&(a=r.F._check(a,O+(1<<17))),I==1&&(E=v.flmap,w=v.fdmap,R=511,P=31),I==2){A=g(o,N,5)+257,V=g(o,N+5,5)+1,F=g(o,N+10,4)+4,N+=14;for(var G=0;G<38;G+=2)v.itree[G]=0,v.itree[G+1]=0;var q=1;for(G=0;G<F;G++){var Q=g(o,N+3*G,3);v.itree[1+(v.ordr[G]<<1)]=Q,Q>q&&(q=Q)}N+=3*F,f(v.itree,q),p(v.itree,q,v.imap),E=v.lmap,w=v.dmap,N=d(v.imap,(1<<q)-1,A+V,o,N,v.ttree);var T=u._copyOut(v.ttree,0,A,v.ltree);R=(1<<T)-1;var W=u._copyOut(v.ttree,A,V,v.dtree);P=(1<<W)-1,f(v.ltree,T),p(v.ltree,T,E),f(v.dtree,W),p(v.dtree,W,w)}for(;;){var D=E[C(o,N)&R];N+=15&D;var H=D>>>4;if(H>>>8==0)a[O++]=H;else{if(H==256)break;var Z=O+H-254;if(H>264){var J=v.ldef[H-257];Z=O+(J>>>3)+g(o,N,7&J),N+=7&J}var ee=w[C(o,N)&P];N+=15&ee;var ge=ee>>>4,ce=v.ddef[ge],Ie=(ce>>>4)+h(o,N,15&ce);for(N+=15&ce,y&&(a=r.F._check(a,O+(1<<17)));O<Z;)a[O]=a[O++-Ie],a[O]=a[O++-Ie],a[O]=a[O++-Ie],a[O]=a[O++-Ie];O=Z}}}else{(7&N)!=0&&(N+=8-(7&N));var Ce=4+(N>>>3),re=o[Ce-4]|o[Ce-3]<<8;y&&(a=r.F._check(a,O+re)),a.set(new s(o.buffer,o.byteOffset+Ce,re),O),N=Ce+re<<3,O+=re}return a.length==O?a:a.slice(0,O)},r.F._check=function(o,a){var s=o.length;if(a<=s)return o;var u=new Uint8Array(Math.max(s<<1,a));return u.set(o,0),u},r.F._decodeTiny=function(o,a,s,u,h,g){for(var d=r.F._bitsE,f=r.F._get17,p=0;p<s;){var C=o[f(u,h)&a];h+=15&C;var v=C>>>4;if(v<=15)g[p]=v,p++;else{var y=0,E=0;v==16?(E=3+d(u,h,2),h+=2,y=g[p-1]):v==17?(E=3+d(u,h,3),h+=3):v==18&&(E=11+d(u,h,7),h+=7);for(var w=p+E;p<w;)g[p]=y,p++}}return h},r.F._copyOut=function(o,a,s,u){for(var h=0,g=0,d=u.length>>>1;g<s;){var f=o[g+a];u[g<<1]=0,u[1+(g<<1)]=f,f>h&&(h=f),g++}for(;g<d;)u[g<<1]=0,u[1+(g<<1)]=0,g++;return h},r.F.makeCodes=function(o,a){for(var s,u,h,g,d=r.F.U,f=o.length,p=d.bl_count,C=0;C<=a;C++)p[C]=0;for(C=1;C<f;C+=2)p[o[C]]++;var v=d.next_code;for(s=0,p[0]=0,u=1;u<=a;u++)s=s+p[u-1]<<1,v[u]=s;for(h=0;h<f;h+=2)(g=o[h+1])!=0&&(o[h]=v[g],v[g]++)},r.F.codes2map=function(o,a,s){for(var u=o.length,h=r.F.U.rev15,g=0;g<u;g+=2)if(o[g+1]!=0)for(var d=g>>1,f=o[g+1],p=d<<4|f,C=a-f,v=o[g]<<C,y=v+(1<<C);v!=y;)s[h[v]>>>15-a]=p,v++},r.F.revCodes=function(o,a){for(var s=r.F.U.rev15,u=15-a,h=0;h<o.length;h+=2){var g=o[h]<<a-o[h+1];o[h]=s[g]>>>u}},r.F._putsE=function(o,a,s){s<<=7&a;var u=a>>>3;o[u]|=s,o[u+1]|=s>>>8},r.F._putsF=function(o,a,s){s<<=7&a;var u=a>>>3;o[u]|=s,o[u+1]|=s>>>8,o[u+2]|=s>>>16},r.F._bitsE=function(o,a,s){return(o[a>>>3]|o[1+(a>>>3)]<<8)>>>(7&a)&(1<<s)-1},r.F._bitsF=function(o,a,s){return(o[a>>>3]|o[1+(a>>>3)]<<8|o[2+(a>>>3)]<<16)>>>(7&a)&(1<<s)-1},r.F._get17=function(o,a){return(o[a>>>3]|o[1+(a>>>3)]<<8|o[2+(a>>>3)]<<16)>>>(7&a)},r.F._get25=function(o,a){return(o[a>>>3]|o[1+(a>>>3)]<<8|o[2+(a>>>3)]<<16|o[3+(a>>>3)]<<24)>>>(7&a)},r.F.U=(t=Uint16Array,n=Uint32Array,{next_code:new t(16),bl_count:new t(16),ordr:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],of0:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],exb:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],ldef:new t(32),df0:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],dxb:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],ddef:new n(32),flmap:new t(512),fltree:[],fdmap:new t(32),fdtree:[],lmap:new t(32768),ltree:[],ttree:[],dmap:new t(32768),dtree:[],imap:new t(512),itree:[],rev15:new t(32768),lhst:new n(286),dhst:new n(30),ihst:new n(19),lits:new n(15e3),strt:new t(65536),prev:new t(32768)}),function(){for(var o=r.F.U,a=0;a<32768;a++){var s=a;s=(4278255360&(s=(4042322160&(s=(3435973836&(s=(2863311530&s)>>>1|(1431655765&s)<<1))>>>2|(858993459&s)<<2))>>>4|(252645135&s)<<4))>>>8|(16711935&s)<<8,o.rev15[a]=(s>>>16|s<<16)>>>17}function u(h,g,d){for(;g--!=0;)h.push(0,d)}for(a=0;a<32;a++)o.ldef[a]=o.of0[a]<<3|o.exb[a],o.ddef[a]=o.df0[a]<<4|o.dxb[a];u(o.fltree,144,8),u(o.fltree,112,9),u(o.fltree,24,7),u(o.fltree,8,8),r.F.makeCodes(o.fltree,9),r.F.codes2map(o.fltree,9,o.flmap),r.F.revCodes(o.fltree,9),u(o.fdtree,32,5),r.F.makeCodes(o.fdtree,5),r.F.codes2map(o.fdtree,5,o.fdmap),r.F.revCodes(o.fdtree,5),u(o.itree,19,0),u(o.ltree,286,0),u(o.dtree,30,0),u(o.ttree,320,0)}()})();var mte=fte({__proto__:null,default:p6},[p6]);const Ei=function(){var e={nextZero(d,f){for(;d[f]!=0;)f++;return f},readUshort:(d,f)=>d[f]<<8|d[f+1],writeUshort(d,f,p){d[f]=p>>8&255,d[f+1]=255&p},readUint:(d,f)=>16777216*d[f]+(d[f+1]<<16|d[f+2]<<8|d[f+3]),writeUint(d,f,p){d[f]=p>>24&255,d[f+1]=p>>16&255,d[f+2]=p>>8&255,d[f+3]=255&p},readASCII(d,f,p){let C="";for(let v=0;v<p;v++)C+=String.fromCharCode(d[f+v]);return C},writeASCII(d,f,p){for(let C=0;C<p.length;C++)d[f+C]=p.charCodeAt(C)},readBytes(d,f,p){const C=[];for(let v=0;v<p;v++)C.push(d[f+v]);return C},pad:d=>d.length<2?`0${d}`:d,readUTF8(d,f,p){let C,v="";for(let y=0;y<p;y++)v+=`%${e.pad(d[f+y].toString(16))}`;try{C=decodeURIComponent(v)}catch{return e.readASCII(d,f,p)}return C}};function t(d,f,p,C){const v=f*p,y=a(C),E=Math.ceil(f*y/8),w=new Uint8Array(4*v),x=new Uint32Array(w.buffer),{ctype:I}=C,{depth:A}=C,V=e.readUshort;if(I==6){const J=v<<2;if(A==8)for(var F=0;F<J;F+=4)w[F]=d[F],w[F+1]=d[F+1],w[F+2]=d[F+2],w[F+3]=d[F+3];if(A==16)for(F=0;F<J;F++)w[F]=d[F<<1]}else if(I==2){const J=C.tabs.tRNS;if(J==null){if(A==8)for(F=0;F<v;F++){var R=3*F;x[F]=255<<24|d[R+2]<<16|d[R+1]<<8|d[R]}if(A==16)for(F=0;F<v;F++)R=6*F,x[F]=255<<24|d[R+4]<<16|d[R+2]<<8|d[R]}else{var P=J[0];const ee=J[1],ge=J[2];if(A==8)for(F=0;F<v;F++){var O=F<<2;R=3*F,x[F]=255<<24|d[R+2]<<16|d[R+1]<<8|d[R],d[R]==P&&d[R+1]==ee&&d[R+2]==ge&&(w[O+3]=0)}if(A==16)for(F=0;F<v;F++)O=F<<2,R=6*F,x[F]=255<<24|d[R+4]<<16|d[R+2]<<8|d[R],V(d,R)==P&&V(d,R+2)==ee&&V(d,R+4)==ge&&(w[O+3]=0)}}else if(I==3){const J=C.tabs.PLTE,ee=C.tabs.tRNS,ge=ee?ee.length:0;if(A==1)for(var N=0;N<p;N++){var G=N*E,q=N*f;for(F=0;F<f;F++){O=q+F<<2;var Q=3*(T=d[G+(F>>3)]>>7-((7&F)<<0)&1);w[O]=J[Q],w[O+1]=J[Q+1],w[O+2]=J[Q+2],w[O+3]=T<ge?ee[T]:255}}if(A==2)for(N=0;N<p;N++)for(G=N*E,q=N*f,F=0;F<f;F++)O=q+F<<2,Q=3*(T=d[G+(F>>2)]>>6-((3&F)<<1)&3),w[O]=J[Q],w[O+1]=J[Q+1],w[O+2]=J[Q+2],w[O+3]=T<ge?ee[T]:255;if(A==4)for(N=0;N<p;N++)for(G=N*E,q=N*f,F=0;F<f;F++)O=q+F<<2,Q=3*(T=d[G+(F>>1)]>>4-((1&F)<<2)&15),w[O]=J[Q],w[O+1]=J[Q+1],w[O+2]=J[Q+2],w[O+3]=T<ge?ee[T]:255;if(A==8)for(F=0;F<v;F++){var T;O=F<<2,Q=3*(T=d[F]),w[O]=J[Q],w[O+1]=J[Q+1],w[O+2]=J[Q+2],w[O+3]=T<ge?ee[T]:255}}else if(I==4){if(A==8)for(F=0;F<v;F++){O=F<<2;var W=d[D=F<<1];w[O]=W,w[O+1]=W,w[O+2]=W,w[O+3]=d[D+1]}if(A==16)for(F=0;F<v;F++){var D;O=F<<2,W=d[D=F<<2],w[O]=W,w[O+1]=W,w[O+2]=W,w[O+3]=d[D+2]}}else if(I==0)for(P=C.tabs.tRNS?C.tabs.tRNS:-1,N=0;N<p;N++){const J=N*E,ee=N*f;if(A==1)for(var H=0;H<f;H++){var Z=(W=255*(d[J+(H>>>3)]>>>7-(7&H)&1))==255*P?0:255;x[ee+H]=Z<<24|W<<16|W<<8|W}else if(A==2)for(H=0;H<f;H++)Z=(W=85*(d[J+(H>>>2)]>>>6-((3&H)<<1)&3))==85*P?0:255,x[ee+H]=Z<<24|W<<16|W<<8|W;else if(A==4)for(H=0;H<f;H++)Z=(W=17*(d[J+(H>>>1)]>>>4-((1&H)<<2)&15))==17*P?0:255,x[ee+H]=Z<<24|W<<16|W<<8|W;else if(A==8)for(H=0;H<f;H++)Z=(W=d[J+H])==P?0:255,x[ee+H]=Z<<24|W<<16|W<<8|W;else if(A==16)for(H=0;H<f;H++)W=d[J+(H<<1)],Z=V(d,J+(H<<1))==P?0:255,x[ee+H]=Z<<24|W<<16|W<<8|W}return w}function n(d,f,p,C){const v=a(d),y=Math.ceil(p*v/8),E=new Uint8Array((y+1+d.interlace)*C);return f=d.tabs.CgBI?o(f,E):r(f,E),d.interlace==0?f=s(f,d,0,p,C):d.interlace==1&&(f=function(x,I){const A=I.width,V=I.height,F=a(I),R=F>>3,P=Math.ceil(A*F/8),O=new Uint8Array(V*P);let N=0;const G=[0,0,4,0,2,0,1],q=[0,4,0,2,0,1,0],Q=[8,8,8,4,4,2,2],T=[8,8,4,4,2,2,1];let W=0;for(;W<7;){const H=Q[W],Z=T[W];let J=0,ee=0,ge=G[W];for(;ge<V;)ge+=H,ee++;let ce=q[W];for(;ce<A;)ce+=Z,J++;const Ie=Math.ceil(J*F/8);s(x,I,N,J,ee);let Ce=0,re=G[W];for(;re<V;){let ue=q[W],me=N+Ce*Ie<<3;for(;ue<A;){var D;if(F==1&&(D=(D=x[me>>3])>>7-(7&me)&1,O[re*P+(ue>>3)]|=D<<7-((7&ue)<<0)),F==2&&(D=(D=x[me>>3])>>6-(7&me)&3,O[re*P+(ue>>2)]|=D<<6-((3&ue)<<1)),F==4&&(D=(D=x[me>>3])>>4-(7&me)&15,O[re*P+(ue>>1)]|=D<<4-((1&ue)<<2)),F>=8){const ye=re*P+ue*R;for(let ke=0;ke<R;ke++)O[ye+ke]=x[(me>>3)+ke]}me+=F,ue+=Z}Ce++,re+=H}J*ee!=0&&(N+=ee*(1+Ie)),W+=1}return O}(f,d)),f}function r(d,f){return o(new Uint8Array(d.buffer,2,d.length-6),f)}var o=function(){const d={H:{}};return d.H.N=function(f,p){const C=Uint8Array;let v,y,E=0,w=0,x=0,I=0,A=0,V=0,F=0,R=0,P=0;if(f[0]==3&&f[1]==0)return p||new C(0);const O=d.H,N=O.b,G=O.e,q=O.R,Q=O.n,T=O.A,W=O.Z,D=O.m,H=p==null;for(H&&(p=new C(f.length>>>2<<5));E==0;)if(E=N(f,P,1),w=N(f,P+1,2),P+=3,w!=0){if(H&&(p=d.H.W(p,R+(1<<17))),w==1&&(v=D.J,y=D.h,V=511,F=31),w==2){x=G(f,P,5)+257,I=G(f,P+5,5)+1,A=G(f,P+10,4)+4,P+=14;let J=1;for(var Z=0;Z<38;Z+=2)D.Q[Z]=0,D.Q[Z+1]=0;for(Z=0;Z<A;Z++){const ce=G(f,P+3*Z,3);D.Q[1+(D.X[Z]<<1)]=ce,ce>J&&(J=ce)}P+=3*A,Q(D.Q,J),T(D.Q,J,D.u),v=D.w,y=D.d,P=q(D.u,(1<<J)-1,x+I,f,P,D.v);const ee=O.V(D.v,0,x,D.C);V=(1<<ee)-1;const ge=O.V(D.v,x,I,D.D);F=(1<<ge)-1,Q(D.C,ee),T(D.C,ee,v),Q(D.D,ge),T(D.D,ge,y)}for(;;){const J=v[W(f,P)&V];P+=15&J;const ee=J>>>4;if(ee>>>8==0)p[R++]=ee;else{if(ee==256)break;{let ge=R+ee-254;if(ee>264){const ue=D.q[ee-257];ge=R+(ue>>>3)+G(f,P,7&ue),P+=7&ue}const ce=y[W(f,P)&F];P+=15&ce;const Ie=ce>>>4,Ce=D.c[Ie],re=(Ce>>>4)+N(f,P,15&Ce);for(P+=15&Ce;R<ge;)p[R]=p[R++-re],p[R]=p[R++-re],p[R]=p[R++-re],p[R]=p[R++-re];R=ge}}}}else{(7&P)!=0&&(P+=8-(7&P));const J=4+(P>>>3),ee=f[J-4]|f[J-3]<<8;H&&(p=d.H.W(p,R+ee)),p.set(new C(f.buffer,f.byteOffset+J,ee),R),P=J+ee<<3,R+=ee}return p.length==R?p:p.slice(0,R)},d.H.W=function(f,p){const C=f.length;if(p<=C)return f;const v=new Uint8Array(C<<1);return v.set(f,0),v},d.H.R=function(f,p,C,v,y,E){const w=d.H.e,x=d.H.Z;let I=0;for(;I<C;){const A=f[x(v,y)&p];y+=15&A;const V=A>>>4;if(V<=15)E[I]=V,I++;else{let F=0,R=0;V==16?(R=3+w(v,y,2),y+=2,F=E[I-1]):V==17?(R=3+w(v,y,3),y+=3):V==18&&(R=11+w(v,y,7),y+=7);const P=I+R;for(;I<P;)E[I]=F,I++}}return y},d.H.V=function(f,p,C,v){let y=0,E=0;const w=v.length>>>1;for(;E<C;){const x=f[E+p];v[E<<1]=0,v[1+(E<<1)]=x,x>y&&(y=x),E++}for(;E<w;)v[E<<1]=0,v[1+(E<<1)]=0,E++;return y},d.H.n=function(f,p){const C=d.H.m,v=f.length;let y,E,w,x;const I=C.j;for(var A=0;A<=p;A++)I[A]=0;for(A=1;A<v;A+=2)I[f[A]]++;const V=C.K;for(y=0,I[0]=0,E=1;E<=p;E++)y=y+I[E-1]<<1,V[E]=y;for(w=0;w<v;w+=2)x=f[w+1],x!=0&&(f[w]=V[x],V[x]++)},d.H.A=function(f,p,C){const v=f.length,y=d.H.m.r;for(let E=0;E<v;E+=2)if(f[E+1]!=0){const w=E>>1,x=f[E+1],I=w<<4|x,A=p-x;let V=f[E]<<A;const F=V+(1<<A);for(;V!=F;)C[y[V]>>>15-p]=I,V++}},d.H.l=function(f,p){const C=d.H.m.r,v=15-p;for(let y=0;y<f.length;y+=2){const E=f[y]<<p-f[y+1];f[y]=C[E]>>>v}},d.H.M=function(f,p,C){C<<=7&p;const v=p>>>3;f[v]|=C,f[v+1]|=C>>>8},d.H.I=function(f,p,C){C<<=7&p;const v=p>>>3;f[v]|=C,f[v+1]|=C>>>8,f[v+2]|=C>>>16},d.H.e=function(f,p,C){return(f[p>>>3]|f[1+(p>>>3)]<<8)>>>(7&p)&(1<<C)-1},d.H.b=function(f,p,C){return(f[p>>>3]|f[1+(p>>>3)]<<8|f[2+(p>>>3)]<<16)>>>(7&p)&(1<<C)-1},d.H.Z=function(f,p){return(f[p>>>3]|f[1+(p>>>3)]<<8|f[2+(p>>>3)]<<16)>>>(7&p)},d.H.i=function(f,p){return(f[p>>>3]|f[1+(p>>>3)]<<8|f[2+(p>>>3)]<<16|f[3+(p>>>3)]<<24)>>>(7&p)},d.H.m=function(){const f=Uint16Array,p=Uint32Array;return{K:new f(16),j:new f(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new f(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new p(32),J:new f(512),_:[],h:new f(32),$:[],w:new f(32768),C:[],v:[],d:new f(32768),D:[],u:new f(512),Q:[],r:new f(32768),s:new p(286),Y:new p(30),a:new p(19),t:new p(15e3),k:new f(65536),g:new f(32768)}}(),function(){const f=d.H.m;for(var p=0;p<32768;p++){let v=p;v=(2863311530&v)>>>1|(1431655765&v)<<1,v=(3435973836&v)>>>2|(858993459&v)<<2,v=(4042322160&v)>>>4|(252645135&v)<<4,v=(4278255360&v)>>>8|(16711935&v)<<8,f.r[p]=(v>>>16|v<<16)>>>17}function C(v,y,E){for(;y--!=0;)v.push(0,E)}for(p=0;p<32;p++)f.q[p]=f.S[p]<<3|f.T[p],f.c[p]=f.p[p]<<4|f.z[p];C(f._,144,8),C(f._,112,9),C(f._,24,7),C(f._,8,8),d.H.n(f._,9),d.H.A(f._,9,f.J),d.H.l(f._,9),C(f.$,32,5),d.H.n(f.$,5),d.H.A(f.$,5,f.h),d.H.l(f.$,5),C(f.Q,19,0),C(f.C,286,0),C(f.D,30,0),C(f.v,320,0)}(),d.H.N}();function a(d){return[1,null,3,1,2,null,4][d.ctype]*d.depth}function s(d,f,p,C,v){let y=a(f);const E=Math.ceil(C*y/8);let w,x;y=Math.ceil(y/8);let I=d[p],A=0;if(I>1&&(d[p]=[0,0,1][I-2]),I==3)for(A=y;A<E;A++)d[A+1]=d[A+1]+(d[A+1-y]>>>1)&255;for(let V=0;V<v;V++)if(w=p+V*E,x=w+V+1,I=d[x-1],A=0,I==0)for(;A<E;A++)d[w+A]=d[x+A];else if(I==1){for(;A<y;A++)d[w+A]=d[x+A];for(;A<E;A++)d[w+A]=d[x+A]+d[w+A-y]}else if(I==2)for(;A<E;A++)d[w+A]=d[x+A]+d[w+A-E];else if(I==3){for(;A<y;A++)d[w+A]=d[x+A]+(d[w+A-E]>>>1);for(;A<E;A++)d[w+A]=d[x+A]+(d[w+A-E]+d[w+A-y]>>>1)}else{for(;A<y;A++)d[w+A]=d[x+A]+u(0,d[w+A-E],0);for(;A<E;A++)d[w+A]=d[x+A]+u(d[w+A-y],d[w+A-E],d[w+A-y-E])}return d}function u(d,f,p){const C=d+f-p,v=C-d,y=C-f,E=C-p;return v*v<=y*y&&v*v<=E*E?d:y*y<=E*E?f:p}function h(d,f,p){p.width=e.readUint(d,f),f+=4,p.height=e.readUint(d,f),f+=4,p.depth=d[f],f++,p.ctype=d[f],f++,p.compress=d[f],f++,p.filter=d[f],f++,p.interlace=d[f],f++}function g(d,f,p,C,v,y,E,w,x){const I=Math.min(f,v),A=Math.min(p,y);let V=0,F=0;for(let W=0;W<A;W++)for(let D=0;D<I;D++)if(E>=0&&w>=0?(V=W*f+D<<2,F=(w+W)*v+E+D<<2):(V=(-w+W)*f-E+D<<2,F=W*v+D<<2),x==0)C[F]=d[V],C[F+1]=d[V+1],C[F+2]=d[V+2],C[F+3]=d[V+3];else if(x==1){var R=d[V+3]*.00392156862745098,P=d[V]*R,O=d[V+1]*R,N=d[V+2]*R,G=C[F+3]*(1/255),q=C[F]*G,Q=C[F+1]*G,T=C[F+2]*G;const H=1-R,Z=R+G*H,J=Z==0?0:1/Z;C[F+3]=255*Z,C[F+0]=(P+q*H)*J,C[F+1]=(O+Q*H)*J,C[F+2]=(N+T*H)*J}else if(x==2)R=d[V+3],P=d[V],O=d[V+1],N=d[V+2],G=C[F+3],q=C[F],Q=C[F+1],T=C[F+2],R==G&&P==q&&O==Q&&N==T?(C[F]=0,C[F+1]=0,C[F+2]=0,C[F+3]=0):(C[F]=P,C[F+1]=O,C[F+2]=N,C[F+3]=R);else if(x==3){if(R=d[V+3],P=d[V],O=d[V+1],N=d[V+2],G=C[F+3],q=C[F],Q=C[F+1],T=C[F+2],R==G&&P==q&&O==Q&&N==T)continue;if(R<220&&G>20)return!1}return!0}return{decode:function(f){const p=new Uint8Array(f);let C=8;const v=e,y=v.readUshort,E=v.readUint,w={tabs:{},frames:[]},x=new Uint8Array(p.length);let I,A=0,V=0;const F=[137,80,78,71,13,10,26,10];for(var R=0;R<8;R++)if(p[R]!=F[R])throw"The input is not a PNG file!";for(;C<p.length;){const W=v.readUint(p,C);C+=4;const D=v.readASCII(p,C,4);if(C+=4,D=="IHDR")h(p,C,w);else if(D=="iCCP"){for(var P=C;p[P]!=0;)P++;v.readASCII(p,C,P-C),p[P+1];const H=p.slice(P+2,C+W);let Z=null;try{Z=r(H)}catch{Z=o(H)}w.tabs[D]=Z}else if(D=="CgBI")w.tabs[D]=p.slice(C,C+4);else if(D=="IDAT"){for(R=0;R<W;R++)x[A+R]=p[C+R];A+=W}else if(D=="acTL")w.tabs[D]={num_frames:E(p,C),num_plays:E(p,C+4)},I=new Uint8Array(p.length);else if(D=="fcTL"){V!=0&&((T=w.frames[w.frames.length-1]).data=n(w,I.slice(0,V),T.rect.width,T.rect.height),V=0);const H={x:E(p,C+12),y:E(p,C+16),width:E(p,C+4),height:E(p,C+8)};let Z=y(p,C+22);Z=y(p,C+20)/(Z==0?100:Z);const J={rect:H,delay:Math.round(1e3*Z),dispose:p[C+24],blend:p[C+25]};w.frames.push(J)}else if(D=="fdAT"){for(R=0;R<W-4;R++)I[V+R]=p[C+R+4];V+=W-4}else if(D=="pHYs")w.tabs[D]=[v.readUint(p,C),v.readUint(p,C+4),p[C+8]];else if(D=="cHRM")for(w.tabs[D]=[],R=0;R<8;R++)w.tabs[D].push(v.readUint(p,C+4*R));else if(D=="tEXt"||D=="zTXt"){w.tabs[D]==null&&(w.tabs[D]={});var O=v.nextZero(p,C),N=v.readASCII(p,C,O-C),G=C+W-O-1;if(D=="tEXt")Q=v.readASCII(p,O+1,G);else{var q=r(p.slice(O+2,O+2+G));Q=v.readUTF8(q,0,q.length)}w.tabs[D][N]=Q}else if(D=="iTXt"){w.tabs[D]==null&&(w.tabs[D]={}),O=0,P=C,O=v.nextZero(p,P),N=v.readASCII(p,P,O-P);const H=p[P=O+1];var Q;p[P+1],P+=2,O=v.nextZero(p,P),v.readASCII(p,P,O-P),P=O+1,O=v.nextZero(p,P),v.readUTF8(p,P,O-P),G=W-((P=O+1)-C),H==0?Q=v.readUTF8(p,P,G):(q=r(p.slice(P,P+G)),Q=v.readUTF8(q,0,q.length)),w.tabs[D][N]=Q}else if(D=="PLTE")w.tabs[D]=v.readBytes(p,C,W);else if(D=="hIST"){const H=w.tabs.PLTE.length/3;for(w.tabs[D]=[],R=0;R<H;R++)w.tabs[D].push(y(p,C+2*R))}else if(D=="tRNS")w.ctype==3?w.tabs[D]=v.readBytes(p,C,W):w.ctype==0?w.tabs[D]=y(p,C):w.ctype==2&&(w.tabs[D]=[y(p,C),y(p,C+2),y(p,C+4)]);else if(D=="gAMA")w.tabs[D]=v.readUint(p,C)/1e5;else if(D=="sRGB")w.tabs[D]=p[C];else if(D=="bKGD")w.ctype==0||w.ctype==4?w.tabs[D]=[y(p,C)]:w.ctype==2||w.ctype==6?w.tabs[D]=[y(p,C),y(p,C+2),y(p,C+4)]:w.ctype==3&&(w.tabs[D]=p[C]);else if(D=="IEND")break;C+=W,v.readUint(p,C),C+=4}var T;return V!=0&&((T=w.frames[w.frames.length-1]).data=n(w,I.slice(0,V),T.rect.width,T.rect.height)),w.data=n(w,x,w.width,w.height),delete w.compress,delete w.interlace,delete w.filter,w},toRGBA8:function(f){const p=f.width,C=f.height;if(f.tabs.acTL==null)return[t(f.data,p,C,f).buffer];const v=[];f.frames[0].data==null&&(f.frames[0].data=f.data);const y=p*C*4,E=new Uint8Array(y),w=new Uint8Array(y),x=new Uint8Array(y);for(let A=0;A<f.frames.length;A++){const V=f.frames[A],F=V.rect.x,R=V.rect.y,P=V.rect.width,O=V.rect.height,N=t(V.data,P,O,f);if(A!=0)for(var I=0;I<y;I++)x[I]=E[I];if(V.blend==0?g(N,P,O,E,p,C,F,R,0):V.blend==1&&g(N,P,O,E,p,C,F,R,1),v.push(E.buffer.slice(0)),V.dispose!=0){if(V.dispose==1)g(w,P,O,E,p,C,F,R,0);else if(V.dispose==2)for(I=0;I<y;I++)E[I]=x[I]}}return v},_paeth:u,_copyTile:g,_bin:e}}();(function(){const{_copyTile:e}=Ei,{_bin:t}=Ei,n=Ei._paeth;var r={table:function(){const P=new Uint32Array(256);for(let O=0;O<256;O++){let N=O;for(let G=0;G<8;G++)1&N?N=3988292384^N>>>1:N>>>=1;P[O]=N}return P}(),update(P,O,N,G){for(let q=0;q<G;q++)P=r.table[255&(P^O[N+q])]^P>>>8;return P},crc:(P,O,N)=>4294967295^r.update(4294967295,P,O,N)};function o(P,O,N,G){O[N]+=P[0]*G>>4,O[N+1]+=P[1]*G>>4,O[N+2]+=P[2]*G>>4,O[N+3]+=P[3]*G>>4}function a(P){return Math.max(0,Math.min(255,P))}function s(P,O){const N=P[0]-O[0],G=P[1]-O[1],q=P[2]-O[2],Q=P[3]-O[3];return N*N+G*G+q*q+Q*Q}function u(P,O,N,G,q,Q,T){T==null&&(T=1);const W=G.length,D=[];for(var H=0;H<W;H++){const re=G[H];D.push([re>>>0&255,re>>>8&255,re>>>16&255,re>>>24&255])}for(H=0;H<W;H++){let re=4294967295;for(var Z=0,J=0;J<W;J++){var ee=s(D[H],D[J]);J!=H&&ee<re&&(re=ee,Z=J)}}const ge=new Uint32Array(q.buffer),ce=new Int16Array(O*N*4),Ie=[0,8,2,10,12,4,14,6,3,11,1,9,15,7,13,5];for(H=0;H<Ie.length;H++)Ie[H]=255*((Ie[H]+.5)/16-.5);for(let re=0;re<N;re++)for(let ue=0;ue<O;ue++){var Ce;H=4*(re*O+ue),T!=2?Ce=[a(P[H]+ce[H]),a(P[H+1]+ce[H+1]),a(P[H+2]+ce[H+2]),a(P[H+3]+ce[H+3])]:(ee=Ie[4*(3&re)+(3&ue)],Ce=[a(P[H]+ee),a(P[H+1]+ee),a(P[H+2]+ee),a(P[H+3]+ee)]),Z=0;let me=16777215;for(J=0;J<W;J++){const xe=s(Ce,D[J]);xe<me&&(me=xe,Z=J)}const ye=D[Z],ke=[Ce[0]-ye[0],Ce[1]-ye[1],Ce[2]-ye[2],Ce[3]-ye[3]];T==1&&(ue!=O-1&&o(ke,ce,H+4,7),re!=N-1&&(ue!=0&&o(ke,ce,H+4*O-4,3),o(ke,ce,H+4*O,5),ue!=O-1&&o(ke,ce,H+4*O+4,1))),Q[H>>2]=Z,ge[H>>2]=G[Z]}}function h(P,O,N,G,q){q==null&&(q={});const{crc:Q}=r,T=t.writeUint,W=t.writeUshort,D=t.writeASCII;let H=8;const Z=P.frames.length>1;let J,ee=!1,ge=33+(Z?20:0);if(q.sRGB!=null&&(ge+=13),q.pHYs!=null&&(ge+=21),q.iCCP!=null&&(J=pako.deflate(q.iCCP),ge+=21+J.length+4),P.ctype==3){for(var ce=P.plte.length,Ie=0;Ie<ce;Ie++)P.plte[Ie]>>>24!=255&&(ee=!0);ge+=8+3*ce+4+(ee?8+1*ce+4:0)}for(var Ce=0;Ce<P.frames.length;Ce++)Z&&(ge+=38),ge+=(ye=P.frames[Ce]).cimg.length+12,Ce!=0&&(ge+=4);ge+=12;const re=new Uint8Array(ge),ue=[137,80,78,71,13,10,26,10];for(Ie=0;Ie<8;Ie++)re[Ie]=ue[Ie];if(T(re,H,13),H+=4,D(re,H,"IHDR"),H+=4,T(re,H,O),H+=4,T(re,H,N),H+=4,re[H]=P.depth,H++,re[H]=P.ctype,H++,re[H]=0,H++,re[H]=0,H++,re[H]=0,H++,T(re,H,Q(re,H-17,17)),H+=4,q.sRGB!=null&&(T(re,H,1),H+=4,D(re,H,"sRGB"),H+=4,re[H]=q.sRGB,H++,T(re,H,Q(re,H-5,5)),H+=4),q.iCCP!=null){const ke=13+J.length;T(re,H,ke),H+=4,D(re,H,"iCCP"),H+=4,D(re,H,"ICC profile"),H+=11,H+=2,re.set(J,H),H+=J.length,T(re,H,Q(re,H-(ke+4),ke+4)),H+=4}if(q.pHYs!=null&&(T(re,H,9),H+=4,D(re,H,"pHYs"),H+=4,T(re,H,q.pHYs[0]),H+=4,T(re,H,q.pHYs[1]),H+=4,re[H]=q.pHYs[2],H++,T(re,H,Q(re,H-13,13)),H+=4),Z&&(T(re,H,8),H+=4,D(re,H,"acTL"),H+=4,T(re,H,P.frames.length),H+=4,T(re,H,q.loop!=null?q.loop:0),H+=4,T(re,H,Q(re,H-12,12)),H+=4),P.ctype==3){for(T(re,H,3*(ce=P.plte.length)),H+=4,D(re,H,"PLTE"),H+=4,Ie=0;Ie<ce;Ie++){const ke=3*Ie,xe=P.plte[Ie],Ue=255&xe,tt=xe>>>8&255,we=xe>>>16&255;re[H+ke+0]=Ue,re[H+ke+1]=tt,re[H+ke+2]=we}if(H+=3*ce,T(re,H,Q(re,H-3*ce-4,3*ce+4)),H+=4,ee){for(T(re,H,ce),H+=4,D(re,H,"tRNS"),H+=4,Ie=0;Ie<ce;Ie++)re[H+Ie]=P.plte[Ie]>>>24&255;H+=ce,T(re,H,Q(re,H-ce-4,ce+4)),H+=4}}let me=0;for(Ce=0;Ce<P.frames.length;Ce++){var ye=P.frames[Ce];Z&&(T(re,H,26),H+=4,D(re,H,"fcTL"),H+=4,T(re,H,me++),H+=4,T(re,H,ye.rect.width),H+=4,T(re,H,ye.rect.height),H+=4,T(re,H,ye.rect.x),H+=4,T(re,H,ye.rect.y),H+=4,W(re,H,G[Ce]),H+=2,W(re,H,1e3),H+=2,re[H]=ye.dispose,H++,re[H]=ye.blend,H++,T(re,H,Q(re,H-30,30)),H+=4);const ke=ye.cimg;T(re,H,(ce=ke.length)+(Ce==0?0:4)),H+=4;const xe=H;D(re,H,Ce==0?"IDAT":"fdAT"),H+=4,Ce!=0&&(T(re,H,me++),H+=4),re.set(ke,H),H+=ce,T(re,H,Q(re,xe,H-xe)),H+=4}return T(re,H,0),H+=4,D(re,H,"IEND"),H+=4,T(re,H,Q(re,H-4,4)),H+=4,re.buffer}function g(P,O,N){for(let G=0;G<P.frames.length;G++){const q=P.frames[G];q.rect.width;const Q=q.rect.height,T=new Uint8Array(Q*q.bpl+Q);q.cimg=C(q.img,Q,q.bpp,q.bpl,T,O,N)}}function d(P,O,N,G,q){const Q=q[0],T=q[1],W=q[2],D=q[3],H=q[4],Z=q[5];let J=6,ee=8,ge=255;for(var ce=0;ce<P.length;ce++){const Ve=new Uint8Array(P[ce]);for(var Ie=Ve.length,Ce=0;Ce<Ie;Ce+=4)ge&=Ve[Ce+3]}const re=ge!=255,ue=function(_e,qe,wt,he,Se,Ae){const Me=[];for(var ze=0;ze<_e.length;ze++){const Ye=new Uint8Array(_e[ze]),zt=new Uint32Array(Ye.buffer);var Oe;let It=0,De=0,Ct=qe,lt=wt,St=he?1:0;if(ze!=0){const Xt=Ae||he||ze==1||Me[ze-2].dispose!=0?1:2;let qt=0,S1=1e9;for(let F1=0;F1<Xt;F1++){var Re=new Uint8Array(_e[ze-1-F1]);const g1=new Uint32Array(_e[ze-1-F1]);let f1=qe,V1=wt,sn=-1,fn=-1;for(let cn=0;cn<wt;cn++)for(let In=0;In<qe;In++)zt[We=cn*qe+In]!=g1[We]&&(In<f1&&(f1=In),In>sn&&(sn=In),cn<V1&&(V1=cn),cn>fn&&(fn=cn));sn==-1&&(f1=V1=sn=fn=0),Se&&((1&f1)==1&&f1--,(1&V1)==1&&V1--);const nr=(sn-f1+1)*(fn-V1+1);nr<S1&&(S1=nr,qt=F1,It=f1,De=V1,Ct=sn-f1+1,lt=fn-V1+1)}Re=new Uint8Array(_e[ze-1-qt]),qt==1&&(Me[ze-1].dispose=2),Oe=new Uint8Array(Ct*lt*4),e(Re,qe,wt,Oe,Ct,lt,-It,-De,0),St=e(Ye,qe,wt,Oe,Ct,lt,-It,-De,3)?1:0,St==1?p(Ye,qe,wt,Oe,{x:It,y:De,width:Ct,height:lt}):e(Ye,qe,wt,Oe,Ct,lt,-It,-De,0)}else Oe=Ye.slice(0);Me.push({rect:{x:It,y:De,width:Ct,height:lt},img:Oe,blend:St,dispose:0})}if(he)for(ze=0;ze<Me.length;ze++){if((Ke=Me[ze]).blend==1)continue;const Ye=Ke.rect,zt=Me[ze-1].rect,It=Math.min(Ye.x,zt.x),De=Math.min(Ye.y,zt.y),Ct={x:It,y:De,width:Math.max(Ye.x+Ye.width,zt.x+zt.width)-It,height:Math.max(Ye.y+Ye.height,zt.y+zt.height)-De};Me[ze-1].dispose=1,ze-1!=0&&f(_e,qe,wt,Me,ze-1,Ct,Se),f(_e,qe,wt,Me,ze,Ct,Se)}let rt=0;if(_e.length!=1)for(var We=0;We<Me.length;We++){var Ke;rt+=(Ke=Me[We]).rect.width*Ke.rect.height}return Me}(P,O,N,Q,T,W),me={},ye=[],ke=[];if(G!=0){const Ve=[];for(Ce=0;Ce<ue.length;Ce++)Ve.push(ue[Ce].img.buffer);const _e=function(Se){let Ae=0;for(var Me=0;Me<Se.length;Me++)Ae+=Se[Me].byteLength;const ze=new Uint8Array(Ae);let Oe=0;for(Me=0;Me<Se.length;Me++){const Re=new Uint8Array(Se[Me]),rt=Re.length;for(let We=0;We<rt;We+=4){let Ke=Re[We],Ye=Re[We+1],zt=Re[We+2];const It=Re[We+3];It==0&&(Ke=Ye=zt=0),ze[Oe+We]=Ke,ze[Oe+We+1]=Ye,ze[Oe+We+2]=zt,ze[Oe+We+3]=It}Oe+=rt}return ze.buffer}(Ve),qe=y(_e,G);for(Ce=0;Ce<qe.plte.length;Ce++)ye.push(qe.plte[Ce].est.rgba);let wt=0;for(Ce=0;Ce<ue.length;Ce++){const he=(Ue=ue[Ce]).img.length;var xe=new Uint8Array(qe.inds.buffer,wt>>2,he>>2);ke.push(xe);const Se=new Uint8Array(qe.abuf,wt,he);Z&&u(Ue.img,Ue.rect.width,Ue.rect.height,ye,Se,xe),Ue.img.set(Se),wt+=he}}else for(ce=0;ce<ue.length;ce++){var Ue=ue[ce];const Ve=new Uint32Array(Ue.img.buffer);var tt=Ue.rect.width;for(Ie=Ve.length,xe=new Uint8Array(Ie),ke.push(xe),Ce=0;Ce<Ie;Ce++){const _e=Ve[Ce];if(Ce!=0&&_e==Ve[Ce-1])xe[Ce]=xe[Ce-1];else if(Ce>tt&&_e==Ve[Ce-tt])xe[Ce]=xe[Ce-tt];else{let qe=me[_e];if(qe==null&&(me[_e]=qe=ye.length,ye.push(_e),ye.length>=300))break;xe[Ce]=qe}}}const we=ye.length;for(we<=256&&H==0&&(ee=we<=2?1:we<=4?2:we<=16?4:8,ee=Math.max(ee,D)),ce=0;ce<ue.length;ce++){(Ue=ue[ce]).rect.x,Ue.rect.y,tt=Ue.rect.width;const Ve=Ue.rect.height;let _e=Ue.img;new Uint32Array(_e.buffer);let qe=4*tt,wt=4;if(we<=256&&H==0){qe=Math.ceil(ee*tt/8);var Le=new Uint8Array(qe*Ve);const he=ke[ce];for(let Se=0;Se<Ve;Se++){Ce=Se*qe;const Ae=Se*tt;if(ee==8)for(var Ne=0;Ne<tt;Ne++)Le[Ce+Ne]=he[Ae+Ne];else if(ee==4)for(Ne=0;Ne<tt;Ne++)Le[Ce+(Ne>>1)]|=he[Ae+Ne]<<4-4*(1&Ne);else if(ee==2)for(Ne=0;Ne<tt;Ne++)Le[Ce+(Ne>>2)]|=he[Ae+Ne]<<6-2*(3&Ne);else if(ee==1)for(Ne=0;Ne<tt;Ne++)Le[Ce+(Ne>>3)]|=he[Ae+Ne]<<7-1*(7&Ne)}_e=Le,J=3,wt=1}else if(re==0&&ue.length==1){Le=new Uint8Array(tt*Ve*3);const he=tt*Ve;for(Ce=0;Ce<he;Ce++){const Se=3*Ce,Ae=4*Ce;Le[Se]=_e[Ae],Le[Se+1]=_e[Ae+1],Le[Se+2]=_e[Ae+2]}_e=Le,J=2,wt=3,qe=3*tt}Ue.img=_e,Ue.bpl=qe,Ue.bpp=wt}return{ctype:J,depth:ee,plte:ye,frames:ue}}function f(P,O,N,G,q,Q,T){const W=Uint8Array,D=Uint32Array,H=new W(P[q-1]),Z=new D(P[q-1]),J=q+1<P.length?new W(P[q+1]):null,ee=new W(P[q]),ge=new D(ee.buffer);let ce=O,Ie=N,Ce=-1,re=-1;for(let me=0;me<Q.height;me++)for(let ye=0;ye<Q.width;ye++){const ke=Q.x+ye,xe=Q.y+me,Ue=xe*O+ke,tt=ge[Ue];tt==0||G[q-1].dispose==0&&Z[Ue]==tt&&(J==null||J[4*Ue+3]!=0)||(ke<ce&&(ce=ke),ke>Ce&&(Ce=ke),xe<Ie&&(Ie=xe),xe>re&&(re=xe))}Ce==-1&&(ce=Ie=Ce=re=0),T&&((1&ce)==1&&ce--,(1&Ie)==1&&Ie--),Q={x:ce,y:Ie,width:Ce-ce+1,height:re-Ie+1};const ue=G[q];ue.rect=Q,ue.blend=1,ue.img=new Uint8Array(Q.width*Q.height*4),G[q-1].dispose==0?(e(H,O,N,ue.img,Q.width,Q.height,-Q.x,-Q.y,0),p(ee,O,N,ue.img,Q)):e(ee,O,N,ue.img,Q.width,Q.height,-Q.x,-Q.y,0)}function p(P,O,N,G,q){e(P,O,N,G,q.width,q.height,-q.x,-q.y,2)}function C(P,O,N,G,q,Q,T){const W=[];let D,H=[0,1,2,3,4];Q!=-1?H=[Q]:(O*G>5e5||N==1)&&(H=[0]),T&&(D={level:0});const Z=mte;for(var J=0;J<H.length;J++){for(let ce=0;ce<O;ce++)v(q,P,ce,G,N,H[J]);W.push(Z.deflate(q,D))}let ee,ge=1e9;for(J=0;J<W.length;J++)W[J].length<ge&&(ee=J,ge=W[J].length);return W[ee]}function v(P,O,N,G,q,Q){const T=N*G;let W=T+N;if(P[W]=Q,W++,Q==0)if(G<500)for(var D=0;D<G;D++)P[W+D]=O[T+D];else P.set(new Uint8Array(O.buffer,T,G),W);else if(Q==1){for(D=0;D<q;D++)P[W+D]=O[T+D];for(D=q;D<G;D++)P[W+D]=O[T+D]-O[T+D-q]+256&255}else if(N==0){for(D=0;D<q;D++)P[W+D]=O[T+D];if(Q==2)for(D=q;D<G;D++)P[W+D]=O[T+D];if(Q==3)for(D=q;D<G;D++)P[W+D]=O[T+D]-(O[T+D-q]>>1)+256&255;if(Q==4)for(D=q;D<G;D++)P[W+D]=O[T+D]-n(O[T+D-q],0,0)+256&255}else{if(Q==2)for(D=0;D<G;D++)P[W+D]=O[T+D]+256-O[T+D-G]&255;if(Q==3){for(D=0;D<q;D++)P[W+D]=O[T+D]+256-(O[T+D-G]>>1)&255;for(D=q;D<G;D++)P[W+D]=O[T+D]+256-(O[T+D-G]+O[T+D-q]>>1)&255}if(Q==4){for(D=0;D<q;D++)P[W+D]=O[T+D]+256-n(0,O[T+D-G],0)&255;for(D=q;D<G;D++)P[W+D]=O[T+D]+256-n(O[T+D-q],O[T+D-G],O[T+D-q-G])&255}}}function y(P,O){const N=new Uint8Array(P),G=N.slice(0),q=new Uint32Array(G.buffer),Q=E(G,O),T=Q[0],W=Q[1],D=N.length,H=new Uint8Array(D>>2);let Z;if(N.length<2e7)for(var J=0;J<D;J+=4)Z=w(T,ee=N[J]*(1/255),ge=N[J+1]*(1/255),ce=N[J+2]*(1/255),Ie=N[J+3]*(1/255)),H[J>>2]=Z.ind,q[J>>2]=Z.est.rgba;else for(J=0;J<D;J+=4){var ee=N[J]*.00392156862745098,ge=N[J+1]*(1/255),ce=N[J+2]*(1/255),Ie=N[J+3]*(1/255);for(Z=T;Z.left;)Z=x(Z.est,ee,ge,ce,Ie)<=0?Z.left:Z.right;H[J>>2]=Z.ind,q[J>>2]=Z.est.rgba}return{abuf:G.buffer,inds:H,plte:W}}function E(P,O,N){N==null&&(N=1e-4);const G=new Uint32Array(P.buffer),q={i0:0,i1:P.length,bst:null,est:null,tdst:0,left:null,right:null};q.bst=V(P,q.i0,q.i1),q.est=F(q.bst);const Q=[q];for(;Q.length<O;){let W=0,D=0;for(var T=0;T<Q.length;T++)Q[T].est.L>W&&(W=Q[T].est.L,D=T);if(W<N)break;const H=Q[D],Z=I(P,G,H.i0,H.i1,H.est.e,H.est.eMq255);if(H.i0>=Z||H.i1<=Z){H.est.L=0;continue}const J={i0:H.i0,i1:Z,bst:null,est:null,tdst:0,left:null,right:null};J.bst=V(P,J.i0,J.i1),J.est=F(J.bst);const ee={i0:Z,i1:H.i1,bst:null,est:null,tdst:0,left:null,right:null};for(ee.bst={R:[],m:[],N:H.bst.N-J.bst.N},T=0;T<16;T++)ee.bst.R[T]=H.bst.R[T]-J.bst.R[T];for(T=0;T<4;T++)ee.bst.m[T]=H.bst.m[T]-J.bst.m[T];ee.est=F(ee.bst),H.left=J,H.right=ee,Q[D]=J,Q.push(ee)}for(Q.sort((W,D)=>D.bst.N-W.bst.N),T=0;T<Q.length;T++)Q[T].ind=T;return[q,Q]}function w(P,O,N,G,q){if(P.left==null)return P.tdst=function(J,ee,ge,ce,Ie){const Ce=ee-J[0],re=ge-J[1],ue=ce-J[2],me=Ie-J[3];return Ce*Ce+re*re+ue*ue+me*me}(P.est.q,O,N,G,q),P;const Q=x(P.est,O,N,G,q);let T=P.left,W=P.right;Q>0&&(T=P.right,W=P.left);const D=w(T,O,N,G,q);if(D.tdst<=Q*Q)return D;const H=w(W,O,N,G,q);return H.tdst<D.tdst?H:D}function x(P,O,N,G,q){const{e:Q}=P;return Q[0]*O+Q[1]*N+Q[2]*G+Q[3]*q-P.eMq}function I(P,O,N,G,q,Q){for(G-=4;N<G;){for(;A(P,N,q)<=Q;)N+=4;for(;A(P,G,q)>Q;)G-=4;if(N>=G)break;const T=O[N>>2];O[N>>2]=O[G>>2],O[G>>2]=T,N+=4,G-=4}for(;A(P,N,q)>Q;)N-=4;return N+4}function A(P,O,N){return P[O]*N[0]+P[O+1]*N[1]+P[O+2]*N[2]+P[O+3]*N[3]}function V(P,O,N){const G=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],q=[0,0,0,0],Q=N-O>>2;for(let T=O;T<N;T+=4){const W=P[T]*.00392156862745098,D=P[T+1]*(1/255),H=P[T+2]*(1/255),Z=P[T+3]*(1/255);q[0]+=W,q[1]+=D,q[2]+=H,q[3]+=Z,G[0]+=W*W,G[1]+=W*D,G[2]+=W*H,G[3]+=W*Z,G[5]+=D*D,G[6]+=D*H,G[7]+=D*Z,G[10]+=H*H,G[11]+=H*Z,G[15]+=Z*Z}return G[4]=G[1],G[8]=G[2],G[9]=G[6],G[12]=G[3],G[13]=G[7],G[14]=G[11],{R:G,m:q,N:Q}}function F(P){const{R:O}=P,{m:N}=P,{N:G}=P,q=N[0],Q=N[1],T=N[2],W=N[3],D=G==0?0:1/G,H=[O[0]-q*q*D,O[1]-q*Q*D,O[2]-q*T*D,O[3]-q*W*D,O[4]-Q*q*D,O[5]-Q*Q*D,O[6]-Q*T*D,O[7]-Q*W*D,O[8]-T*q*D,O[9]-T*Q*D,O[10]-T*T*D,O[11]-T*W*D,O[12]-W*q*D,O[13]-W*Q*D,O[14]-W*T*D,O[15]-W*W*D],Z=H,J=R;let ee=[Math.random(),Math.random(),Math.random(),Math.random()],ge=0,ce=0;if(G!=0)for(let Ce=0;Ce<16&&(ee=J.multVec(Z,ee),ce=Math.sqrt(J.dot(ee,ee)),ee=J.sml(1/ce,ee),!(Ce!=0&&Math.abs(ce-ge)<1e-9));Ce++)ge=ce;const Ie=[q*D,Q*D,T*D,W*D];return{Cov:H,q:Ie,e:ee,L:ge,eMq255:J.dot(J.sml(255,Ie),ee),eMq:J.dot(ee,Ie),rgba:(Math.round(255*Ie[3])<<24|Math.round(255*Ie[2])<<16|Math.round(255*Ie[1])<<8|Math.round(255*Ie[0])<<0)>>>0}}var R={multVec:(P,O)=>[P[0]*O[0]+P[1]*O[1]+P[2]*O[2]+P[3]*O[3],P[4]*O[0]+P[5]*O[1]+P[6]*O[2]+P[7]*O[3],P[8]*O[0]+P[9]*O[1]+P[10]*O[2]+P[11]*O[3],P[12]*O[0]+P[13]*O[1]+P[14]*O[2]+P[15]*O[3]],dot:(P,O)=>P[0]*O[0]+P[1]*O[1]+P[2]*O[2]+P[3]*O[3],sml:(P,O)=>[P*O[0],P*O[1],P*O[2],P*O[3]]};Ei.encode=function(O,N,G,q,Q,T,W){q==null&&(q=0),W==null&&(W=!1);const D=d(O,N,G,q,[!1,!1,!1,0,W,!1]);return g(D,-1),h(D,N,G,Q,T)},Ei.encodeLL=function(O,N,G,q,Q,T,W,D){const H={ctype:0+(q==1?0:2)+(Q==0?0:4),depth:T,frames:[]},Z=(q+Q)*T,J=Z*N;for(let ee=0;ee<O.length;ee++)H.frames.push({rect:{x:0,y:0,width:N,height:G},img:new Uint8Array(O[ee]),blend:0,dispose:1,bpp:Math.ceil(Z/8),bpl:Math.ceil(J/8)});return g(H,0,!0),h(H,N,G,W,D)},Ei.encode.compress=d,Ei.encode.dither=u,Ei.quantize=y,Ei.quantize.getKDtree=E,Ei.quantize.getNearest=w})();const gb={toArrayBuffer(e,t){const n=e.width,r=e.height,o=n<<2,a=e.getContext("2d").getImageData(0,0,n,r),s=new Uint32Array(a.data.buffer),u=(32*n+31)/32<<2,h=u*r,g=122+h,d=new ArrayBuffer(g),f=new DataView(d),p=1<<20;let C,v,y,E,w=p,x=0,I=0,A=0;function V(P){f.setUint16(I,P,!0),I+=2}function F(P){f.setUint32(I,P,!0),I+=4}function R(P){I+=P}V(19778),F(g),R(4),F(122),F(108),F(n),F(-r>>>0),V(1),V(32),F(3),F(h),F(2835),F(2835),R(8),F(16711680),F(65280),F(255),F(4278190080),F(1466527264),function P(){for(;x<r&&w>0;){for(E=122+x*u,C=0;C<o;)w--,v=s[A++],y=v>>>24,f.setUint32(E+C,v<<8|y),C+=4;x++}A<s.length?(w=p,setTimeout(P,gb._dly)):t(d)}()},toBlob(e,t){this.toArrayBuffer(e,n=>{t(new Blob([n],{type:"image/bmp"}))})},_dly:9};var Go={CHROME:"CHROME",FIREFOX:"FIREFOX",DESKTOP_SAFARI:"DESKTOP_SAFARI",IE:"IE",IOS:"IOS",ETC:"ETC"},vte={[Go.CHROME]:16384,[Go.FIREFOX]:11180,[Go.DESKTOP_SAFARI]:16384,[Go.IE]:8192,[Go.IOS]:4096,[Go.ETC]:8192};const qu=typeof window!="undefined",mb=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope,g6=qu&&window.cordova&&window.cordova.require&&window.cordova.require("cordova/modulemapper"),Cte=(qu||mb)&&(g6&&g6.getOriginalSymbol(window,"File")||typeof File!="undefined"&&File),vb=(qu||mb)&&(g6&&g6.getOriginalSymbol(window,"FileReader")||typeof FileReader!="undefined"&&FileReader);function Ju(e,t,n=Date.now()){return new Promise(r=>{const o=e.split(","),a=o[0].match(/:(.*?);/)[1],s=globalThis.atob(o[1]);let u=s.length;const h=new Uint8Array(u);for(;u--;)h[u]=s.charCodeAt(u);const g=new Blob([h],{type:a});g.name=t,g.lastModified=n,r(g)})}function Cb(e){return new Promise((t,n)=>{const r=new vb;r.onload=()=>t(r.result),r.onerror=o=>n(o),r.readAsDataURL(e)})}function bb(e){return new Promise((t,n)=>{const r=new Image;r.onload=()=>t(r),r.onerror=o=>n(o),r.src=e})}function n0(){if(n0.cachedResult!==void 0)return n0.cachedResult;let e=Go.ETC;const{userAgent:t}=navigator;return/Chrom(e|ium)/i.test(t)?e=Go.CHROME:/iP(ad|od|hone)/i.test(t)&&/WebKit/i.test(t)?e=Go.IOS:/Safari/i.test(t)?e=Go.DESKTOP_SAFARI:/Firefox/i.test(t)?e=Go.FIREFOX:(/MSIE/i.test(t)||!!document.documentMode)&&(e=Go.IE),n0.cachedResult=e,n0.cachedResult}function yb(e,t){const n=n0(),r=vte[n];let o=e,a=t,s=o*a;const u=o>a?a/o:o/a;for(;s>r*r;){const h=(r+o)/2,g=(r+a)/2;h<g?(a=g,o=g*u):(a=h*u,o=h),s=o*a}return{width:o,height:a}}function m6(e,t){let n,r;try{if(n=new OffscreenCanvas(e,t),r=n.getContext("2d"),r===null)throw new Error("getContext of OffscreenCanvas returns null")}catch{n=document.createElement("canvas"),r=n.getContext("2d")}return n.width=e,n.height=t,[n,r]}function wb(e,t){const{width:n,height:r}=yb(e.width,e.height),[o,a]=m6(n,r);return t&&/jpe?g/.test(t)&&(a.fillStyle="white",a.fillRect(0,0,o.width,o.height)),a.drawImage(e,0,0,o.width,o.height),o}function v6(){return v6.cachedResult!==void 0||(v6.cachedResult=["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&typeof document!="undefined"&&"ontouchend"in document),v6.cachedResult}function C6(e,t={}){return new Promise(function(n,r){let o,a;var s=function(){try{return a=wb(o,t.fileType||e.type),n([o,a])}catch(h){return r(h)}},u=function(h){try{var g=function(d){try{throw d}catch(f){return r(f)}};try{let d;return Cb(e).then(function(f){try{return d=f,bb(d).then(function(p){try{return o=p,function(){try{return s()}catch(C){return r(C)}}()}catch(C){return g(C)}},g)}catch(p){return g(p)}},g)}catch(d){g(d)}}catch(d){return r(d)}};try{if(v6()||[Go.DESKTOP_SAFARI,Go.MOBILE_SAFARI].includes(n0()))throw new Error("Skip createImageBitmap on IOS and Safari");return createImageBitmap(e).then(function(h){try{return o=h,s()}catch{return u()}},u)}catch{u()}})}function b6(e,t,n,r,o=1){return new Promise(function(a,s){let u;if(t==="image/png"){let g,d,f;return g=e.getContext("2d"),{data:d}=g.getImageData(0,0,e.width,e.height),f=Ei.encode([d.buffer],e.width,e.height,4096*o),u=new Blob([f],{type:t}),u.name=n,u.lastModified=r,h.call(this)}{let g=function(){return h.call(this)};if(t==="image/bmp")return new Promise(d=>gb.toBlob(e,d)).then(function(d){try{return u=d,u.name=n,u.lastModified=r,g.call(this)}catch(f){return s(f)}}.bind(this),s);{let d=function(){return g.call(this)};if(typeof OffscreenCanvas=="function"&&e instanceof OffscreenCanvas)return e.convertToBlob({type:t,quality:o}).then(function(f){try{return u=f,u.name=n,u.lastModified=r,d.call(this)}catch(p){return s(p)}}.bind(this),s);{let f;return f=e.toDataURL(t,o),Ju(f,n,r).then(function(p){try{return u=p,d.call(this)}catch(C){return s(C)}}.bind(this),s)}}}function h(){return a(u)}})}function ca(e){e.width=0,e.height=0}function bs(){return new Promise(function(e,t){let n,r,o,a;return bs.cachedResult!==void 0?e(bs.cachedResult):Ju("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==","test.jpg",Date.now()).then(function(s){try{return n=s,C6(n).then(function(u){try{return r=u[1],b6(r,n.type,n.name,n.lastModified).then(function(h){try{return o=h,ca(r),C6(o).then(function(g){try{return a=g[0],bs.cachedResult=a.width===1&&a.height===2,e(bs.cachedResult)}catch(d){return t(d)}},t)}catch(g){return t(g)}},t)}catch(h){return t(h)}},t)}catch(u){return t(u)}},t)})}function Ib(e){return new Promise((t,n)=>{const r=new vb;r.onload=o=>{const a=new DataView(o.target.result);if(a.getUint16(0,!1)!=65496)return t(-2);const s=a.byteLength;let u=2;for(;u<s;){if(a.getUint16(u+2,!1)<=8)return t(-1);const h=a.getUint16(u,!1);if(u+=2,h==65505){if(a.getUint32(u+=2,!1)!=1165519206)return t(-1);const g=a.getUint16(u+=6,!1)==18761;u+=a.getUint32(u+4,g);const d=a.getUint16(u,g);u+=2;for(let f=0;f<d;f++)if(a.getUint16(u+12*f,g)==274)return t(a.getUint16(u+12*f+8,g))}else{if((65280&h)!=65280)break;u+=a.getUint16(u,!1)}}return t(-1)},r.onerror=o=>n(o),r.readAsArrayBuffer(e)})}function Eb(e,t){const{width:n}=e,{height:r}=e,{maxWidthOrHeight:o}=t;let a,s=e;return isFinite(o)&&(n>o||r>o)&&([s,a]=m6(n,r),n>r?(s.width=o,s.height=r/n*o):(s.width=n/r*o,s.height=o),a.drawImage(e,0,0,s.width,s.height),ca(e)),s}function Sb(e,t){const{width:n}=e,{height:r}=e,[o,a]=m6(n,r);switch(t>4&&t<9?(o.width=r,o.height=n):(o.width=n,o.height=r),t){case 2:a.transform(-1,0,0,1,n,0);break;case 3:a.transform(-1,0,0,-1,n,r);break;case 4:a.transform(1,0,0,-1,0,r);break;case 5:a.transform(0,1,1,0,0,0);break;case 6:a.transform(0,1,-1,0,r,0);break;case 7:a.transform(0,-1,-1,0,r,n);break;case 8:a.transform(0,-1,1,0,0,n)}return a.drawImage(e,0,0,n,r),ca(e),o}function Ab(e,t,n=0){return new Promise(function(r,o){let a,s,u,h,g,d,f,p,C,v,y,E,w,x,I,A,V,F,R,P;function O(G=5){if(t.signal&&t.signal.aborted)throw t.signal.reason;a+=G,t.onProgress(Math.min(a,100))}function N(G){if(t.signal&&t.signal.aborted)throw t.signal.reason;a=Math.min(Math.max(G,a),100),t.onProgress(a)}return a=n,s=t.maxIteration||10,u=1024*t.maxSizeMB*1024,O(),C6(e,t).then(function(G){try{return[,h]=G,O(),g=Eb(h,t),O(),new Promise(function(q,Q){var T;if(!(T=t.exifOrientation))return Ib(e).then(function(D){try{return T=D,W.call(this)}catch(H){return Q(H)}}.bind(this),Q);function W(){return q(T)}return W.call(this)}).then(function(q){try{return d=q,O(),bs().then(function(Q){try{return f=Q?g:Sb(g,d),O(),p=t.initialQuality||1,C=t.fileType||e.type,b6(f,C,e.name,e.lastModified,p).then(function(T){try{{let D=function(){if(s--&&(I>u||I>w)){let Z,J;return Z=P?.95*R.width:R.width,J=P?.95*R.height:R.height,[V,F]=m6(Z,J),F.drawImage(R,0,0,Z,J),p*=C==="image/png"?.85:.95,b6(V,C,e.name,e.lastModified,p).then(function(ee){try{return A=ee,ca(R),R=V,I=A.size,N(Math.min(99,Math.floor((x-I)/(x-u)*100))),D}catch(ge){return o(ge)}},o)}return[1]},H=function(){return ca(R),ca(V),ca(g),ca(f),ca(h),N(100),r(A)};if(v=T,O(),y=v.size>u,E=v.size>e.size,!y&&!E)return N(100),r(v);var W;return w=e.size,x=v.size,I=x,R=f,P=!t.alwaysKeepResolution&&y,(W=function(Z){for(;Z;){if(Z.then)return void Z.then(W,o);try{if(Z.pop){if(Z.length)return Z.pop()?H.call(this):Z;Z=D}else Z=Z.call(this)}catch(J){return o(J)}}}.bind(this))(D)}}catch(D){return o(D)}}.bind(this),o)}catch(T){return o(T)}}.bind(this),o)}catch(Q){return o(Q)}}.bind(this),o)}catch(q){return o(q)}}.bind(this),o)})}const bte=`
1405
1405
  let scriptImported = false
1406
1406
  self.addEventListener('message', async (e) => {
1407
1407
  const { file, id, imageCompressionLibUrl, options } = e.data
@@ -1420,7 +1420,7 @@ self.addEventListener('message', async (e) => {
1420
1420
  self.postMessage({ error: e.message + '\\n' + e.stack, id })
1421
1421
  }
1422
1422
  })
1423
- `;let Zu;function yte(e,t){return new Promise((n,r)=>{Zu||(Zu=function(s){const u=[];return typeof s=="function"?u.push(`(${s})()`):u.push(s),URL.createObjectURL(new Blob(u))}(bte));const o=new Worker(Zu);o.addEventListener("message",function(s){if(t.signal&&t.signal.aborted)o.terminate();else if(s.data.progress===void 0){if(s.data.error)return r(new Error(s.data.error)),void o.terminate();n(s.data.file),o.terminate()}else t.onProgress(s.data.progress)}),o.addEventListener("error",r),t.signal&&t.signal.addEventListener("abort",()=>{r(t.signal.reason),o.terminate()}),o.postMessage({file:e,imageCompressionLibUrl:t.libURL,options:{...t,onProgress:void 0,signal:void 0}})})}function co(e,t){return new Promise(function(n,r){let o,a,s,u,h,g;if(o={...t},s=0,{onProgress:u}=o,o.maxSizeMB=o.maxSizeMB||Number.POSITIVE_INFINITY,h=typeof o.useWebWorker!="boolean"||o.useWebWorker,delete o.useWebWorker,o.onProgress=C=>{s=C,typeof u=="function"&&u(s)},!(e instanceof Blob||e instanceof Cte))return r(new Error("The file given is not an instance of Blob or File"));if(!/^image/.test(e.type))return r(new Error("The file given is not an image"));if(g=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope,!h||typeof Worker!="function"||g)return Ab(e,o).then(function(C){try{return a=C,p.call(this)}catch(v){return r(v)}}.bind(this),r);var d=function(){try{return p.call(this)}catch(C){return r(C)}}.bind(this),f=function(C){try{return Ab(e,o).then(function(v){try{return a=v,d()}catch(y){return r(y)}},r)}catch(v){return r(v)}};try{return o.libURL=o.libURL||"https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js",yte(e,o).then(function(C){try{return a=C,d()}catch{return f()}},f)}catch{f()}function p(){try{a.name=e.name,a.lastModified=e.lastModified}catch{}try{o.preserveExif&&e.type==="image/jpeg"&&(!o.fileType||o.fileType&&o.fileType===e.type)&&(a=pb(e,a))}catch{}return n(a)}})}co.getDataUrlFromFile=Cb,co.getFilefromDataUrl=Ju,co.loadImage=bb,co.drawImageInCanvas=wb,co.drawFileInCanvas=C6,co.canvasToFile=b6,co.getExifOrientation=Ib,co.handleMaxWidthOrHeight=Eb,co.followExifOrientation=Sb,co.cleanupCanvasMemory=ca,co.isAutoOrientationInBrowser=bs,co.approximateBelowMaximumCanvasSizeOfBrowser=yb,co.copyExifWithoutOrientation=pb,co.getBrowserName=n0,co.version="2.0.2";const wte=async e=>{const t={maxSizeMB:.8,maxWidthOrHeight:1280,useWebWorker:!0,fileType:"image/jpeg"};try{return await co(e,t)}catch(n){throw console.error("Error al comprimir la imagen:",n),n}},Ite=e=>new Promise((t,n)=>{const r=new FileReader;r.readAsDataURL(e),r.onload=o=>{const s=o.target.result.split(",")[1];t(s)},r.onerror=o=>{n(o)}}),Ete=e=>["image/jpeg","image/jpg","image/png"].includes(e.type)?e.size>3145728?`El archivo excede el tama\xF1o m\xE1ximo de 3MB. Tama\xF1o actual: ${(e.size/(1024*1024)).toFixed(2)} MB.`:"ok":`El archivo es de tipo ${e.type}. Debe ser una imagen (JPG, PNG).`,Ste=()=>{const[e,t]=Ze.useState(!1),[n,r]=Ze.useState(!1),[o,a]=Ze.useState([]),[s,u]=Ze.useState(null),[h,g]=Ze.useState(0),[d,f]=Ze.useState(!1),[p,C]=Ze.useState("front"),[v,y]=Ze.useState(!1),[E,w]=Ze.useState(null),[x,I]=Ze.useState(!1),[A,V]=Ze.useState({file:null,preview:null,base64:null,error:null}),[F,R]=Ze.useState({file:null,preview:null,base64:null,error:null}),[P,O]=Ze.useState(!1),[N,G]=Ze.useState(null),[q,Q]=Ze.useState(!1),T=Ze.useRef(null),W=Ze.useRef(null);Ze.useEffect(()=>{T.current&&s&&T.current.srcObject!==s&&(console.log("[Camera] Syncing stream to video element via useEffect"),T.current.srcObject=s,T.current.play().catch(we=>{console.error("[Camera] Error playing video in sync effect:",we)}))},[s,P]);const D=()=>{if(T.current&&W.current){const we=T.current,Le=W.current,Ne=Le.getContext("2d");Ne&&we.videoWidth>0&&(Le.width=we.videoWidth,Le.height=we.videoHeight,Ne.drawImage(we,0,0),Le.toBlob(Ve=>{if(Ve){const _e=new File([Ve],`document_${Date.now()}.jpg`,{type:"image/jpeg"});xe(_e)}},"image/jpeg",.9))}},H=()=>o.length>1&&N===!0,Z=()=>{O(!1),w(null)},J=async()=>{N===!1?await ce():(w(null),P&&(o.length===0?await ue():await ye(h)))},ee=async()=>{try{y(!0),w(null),await me(),await new Promise(we=>setTimeout(we,1e3)),P&&N&&await ye(h)}catch(we){console.error("Error al reiniciar c\xE1mara:",we),w("No se pudo reiniciar la c\xE1mara. Intenta nuevamente.")}finally{y(!1)}},ge=async()=>{try{const Le=(await navigator.mediaDevices.enumerateDevices()).filter(Ne=>{var Ve;return(Ve=Ne.kind==="videoinput"&&Ne.label.toLowerCase().includes("back"))!=null?Ve:Ne.kind==="videoinput"});a(Le)}catch(we){console.error("Error obteniendo dispositivos de c\xE1mara:",we),a([])}},ce=async()=>{try{y(!0),w(null),(await navigator.mediaDevices.getUserMedia({video:!0})).getTracks().forEach(Le=>Le.stop()),G(!0),await ge()}catch(we){throw console.error("Error solicitando permisos:",we),G(!1),w("Permisos de c\xE1mara denegados. Permite el acceso para continuar."),we}finally{y(!1)}},Ie=async we=>{if(C(we?"front":"rear"),N===null){r(!0);try{await ce(),O(!0)}catch{w("Se requieren permisos de c\xE1mara. Permite el acceso para continuar.")}finally{r(!1)}}else N===!0?O(!0):w("Se requieren permisos de c\xE1mara. Permite el acceso para continuar.")},Ce=A.base64&&F.base64&&!d,re=async()=>{var we,Le,Ne,Ve,_e;if(!(!A.base64||!F.base64)){loaderIncrement(),f(!0);try{const qe=await processOcrService(accessToken,{first_image:`data:image/jpeg;base64,${A.base64}`,second_image:`data:image/jpeg;base64,${F.base64}`});setOcr(qe);const wt=claroPayDataRegister&&Object.assign(claroPayDataRegister,{documentId:(we=qe.document_type)!=null&&we.includes("2021")?qe.document_number:(Le=qe.reference)!=null?Le:"",documentType:(Ne=qe.document_category)!=null?Ne:""});setDataClaroPay(wt),navigate("/data-confirmation")}catch(qe){console.error("Error al procesar documentos:",qe),registerOcrError({bodyParams:{doc_first_image:`data:image/jpeg;base64,${A.base64}`,doc_second_image:`data:image/jpeg;base64,${F.base64}`,id_onboarding:personalData==null?void 0:personalData.idOnboarding,identification:"",mobile_phone:(Ve=personalData==null?void 0:personalData.phone)!=null?Ve:"",email:(_e=personalData==null?void 0:personalData.email)!=null?_e:""},token:clientToken});const wt={file:null,preview:null,base64:null,error:"Error al procesar la imagen"};V(wt),R(wt)}finally{f(!1),loaderDecrement()}}},ue=async(we=0)=>{try{y(!0),Q(!0),w(null),await me();const Le=e?1e3:500;if(await new Promise(Ne=>setTimeout(Ne,Le)),navigator.mediaDevices&&navigator.mediaDevices.getUserMedia){const Ne=e?{video:{facingMode:{ideal:"environment"},width:{ideal:640,max:1280},height:{ideal:480,max:720}}}:{video:{facingMode:{ideal:"environment"},width:{ideal:1280,max:1920},height:{ideal:720,max:1080}}},Ve=await navigator.mediaDevices.getUserMedia(Ne);console.log("[Camera] Stream obtained, tracks:",Ve.getTracks().length),u(Ve),T.current?(T.current.srcObject=Ve,await T.current.play(),console.log("[Camera] Direct stream assignment succeeded")):console.log("[Camera] videoRef not ready yet \u2014 useEffect sync will handle it")}else w("La c\xE1mara no est\xE1 disponible en este dispositivo")}catch(Le){console.error("Error abriendo c\xE1mara con fallback:",Le);const Ne=Le;if(Ne.name==="NotAllowedError")w("Permisos de c\xE1mara denegados. Permite el acceso a la c\xE1mara."),G(!1);else if(Ne.name==="NotFoundError")w("No se encontr\xF3 ninguna c\xE1mara en el dispositivo.");else if(Ne.name==="NotReadableError"){if(we<(e?1:2))return await new Promise(Ve=>setTimeout(Ve,1500)),ue(we+1);w("C\xE1mara en uso. Intenta cerrar otras aplicaciones que usen la c\xE1mara.")}else w("No se pudo acceder a la c\xE1mara. Verifica los permisos.")}finally{y(!1),Q(!1)}},me=async()=>{if(s&&(s.getTracks().forEach(Le=>{Le.stop(),Le.enabled=!1}),u(null)),T.current&&(T.current.srcObject=null,T.current.load(),T.current.pause()),W.current){const Le=W.current.getContext("2d");Le&&Le.clearRect(0,0,W.current.width,W.current.height)}const we=e?800:300;await new Promise(Le=>setTimeout(Le,we))},ye=async(we,Le=0)=>{try{if(y(!0),Q(!0),w(null),N!==!0){w("Se requieren permisos de c\xE1mara para continuar");return}await me();const Ne=e?1200:500;if(await new Promise(Ve=>setTimeout(Ve,Ne)),navigator.mediaDevices&&navigator.mediaDevices.getUserMedia){let Ve;o.length>0&&o[we]?e?Ve={video:{facingMode:{ideal:"environment"},deviceId:{exact:o[we].deviceId},width:{ideal:640,max:1280},height:{ideal:480,max:720}}}:Ve={video:{facingMode:{ideal:"environment"},deviceId:{exact:o[we].deviceId},width:{ideal:1280,max:1920},height:{ideal:720,max:1080}}}:Ve=e?{video:{facingMode:{ideal:"environment"},width:{ideal:640,max:1280},height:{ideal:480,max:720}}}:{video:{facingMode:{ideal:"environment"},width:{ideal:1280,max:1920},height:{ideal:720,max:1080}}};const _e=await navigator.mediaDevices.getUserMedia(Ve);u(_e),T.current&&(T.current.srcObject=_e,await T.current.play())}else w("La c\xE1mara no est\xE1 disponible en este dispositivo")}catch(Ne){console.error("Error abriendo c\xE1mara:",Ne);const Ve=Ne;if(Ve.name==="NotAllowedError")w("Permisos de c\xE1mara denegados. Permite el acceso a la c\xE1mara."),G(!1);else if(Ve.name==="NotFoundError")w("No se encontr\xF3 ninguna c\xE1mara en el dispositivo.");else if(Ve.name==="NotReadableError")if(Le<(e?1:2)){const _e=e?2e3:1e3;return await new Promise(qe=>setTimeout(qe,_e)),ye(we,Le+1)}else w("C\xE1mara en uso. Intenta cerrar otras aplicaciones que usen la c\xE1mara.");else w("No se pudo acceder a la c\xE1mara. Verifica los permisos.")}finally{y(!1),Q(!1)}},ke=async(we,Le)=>{const Ne=Le?V:R,Ve=await wte(we),_e=Ete(Ve);if(_e!=="ok"){Ne({file:null,preview:null,base64:null,error:_e});return}try{const qe=URL.createObjectURL(Ve),wt=await Ite(Ve);Ne({file:Ve,preview:qe,base64:wt,error:null})}catch{Ne({file:null,preview:null,base64:null,error:"Error al procesar la imagen"})}},xe=we=>{ke(we,p==="front"),Z()};return{frontDocument:A,rearDocument:F,setFrontDocument:V,setRearDocument:R,isCameraOpen:P,hasPermissions:N,handleSubmit:re,canSubmit:Ce,isCheckingPermissions:n,isInitializing:q,isProcessing:d,availableCameras:o,currentCameraIndex:h,openCamera:ye,closeCamera:me,openCameraWithFallback:ue,setIsMobile:t,isMobile:e,IsMobileValidator:fb,handleCameraCapture:Ie,cameraTarget:p,setCameraTarget:C,isLoadingCamera:v,setIsLoadingCamera:y,error:E,setError:w,getAvailableCameras:ge,requestPermissions:ce,canSwitchCamera:H,capturePhoto:D,handleCloseCamera:Z,handleRetryCamera:J,handleRestartCamera:ee,videoRef:T,canvasRef:W,handleFileInputChange:(we,Le)=>{var Ve;const Ne=(Ve=we.target.files)==null?void 0:Ve[0];Ne&&ke(Ne,Le)},removeDocument:we=>{(we?V:R)({file:null,preview:null,base64:null,error:null})},setRecomendationsReviewed:I,recomendationsReviewed:x}},Ate=({onImageProcessed:e})=>{const[t,n]=Ze.useState(!1),[r,o]=Ze.useState(""),[a,s]=Ze.useState(!0),[u,h]=Ze.useState(null),g=Ze.useCallback((C,v,y)=>{o(C),s(y),h(v),n(!0)},[]),d=Ze.useCallback(()=>{n(!1),o(""),h(null)},[]),f=Ze.useCallback(async C=>{if(!!u)try{const y=await(await fetch(C.croppedImage)).blob(),E=u.name.replace(/\.[^/.]+$/,"_cropped.jpg"),w=new File([y],E,{type:"image/jpeg"});e(w,a),d()}catch(v){console.error("Error al procesar imagen recortada:",v)}},[u,a,e,d]),p=Ze.useCallback((C,v)=>{const y=new FileReader;y.onload=E=>{var x;const w=(x=E.target)==null?void 0:x.result;g(w,C,v)},y.readAsDataURL(C)},[g]);return{cropModalOpen:t,currentImage:r,currentIsFront:a,openCropModal:g,closeCropModal:d,handleCropComplete:f,processFileWithCrop:p}};var tr={"manual-document-upload":"_manual-document-upload_1w1k0_1","MuiListItemIcon-root":"_MuiListItemIcon-root_1w1k0_6","MuiCard-root":"_MuiCard-root_1w1k0_9","MuiCardContent-root":"_MuiCardContent-root_1w1k0_15",recommendations:"_recommendations_1w1k0_18","upload-zone":"_upload-zone_1w1k0_21","document-preview":"_document-preview_1w1k0_28","action-buttons":"_action-buttons_1w1k0_54","MuiButton-root":"_MuiButton-root_1w1k0_59","error-message":"_error-message_1w1k0_66","MuiAlert-root":"_MuiAlert-root_1w1k0_69","success-indicator":"_success-indicator_1w1k0_72","delete-button":"_delete-button_1w1k0_81","camera-button":"_camera-button_1w1k0_97","MuiButton-outlined":"_MuiButton-outlined_1w1k0_111","upload-icon":"_upload-icon_1w1k0_120","file-info":"_file-info_1w1k0_125","loading-overlay":"_loading-overlay_1w1k0_130","error-overlay":"_error-overlay_1w1k0_144","MuiTypography-root":"_MuiTypography-root_1w1k0_160","MuiBox-root":"_MuiBox-root_1w1k0_165","MuiListItem-root":"_MuiListItem-root_1w1k0_188"};const xte=({onSendSubmitDocument:e,isProcessing:t,setBase64:n,dualModeRequired:r})=>{const{frontDocument:o,rearDocument:a,isCameraOpen:s,hasPermissions:u,isCheckingPermissions:h,isInitializing:g,availableCameras:d,currentCameraIndex:f,openCamera:p,closeCamera:C,openCameraWithFallback:v,setIsMobile:y,isMobile:E,handleCameraCapture:w,cameraTarget:x,isLoadingCamera:I,error:A,videoRef:V,canvasRef:F,capturePhoto:R,handleCloseCamera:P,handleRetryCamera:O,handleRestartCamera:N,removeDocument:G,handleFileInputChange:q,currentCameraIndex:Q,setRecomendationsReviewed:T,recomendationsReviewed:W}=Ste(),D=()=>{const me=(Q+1)%d.length;p(me)},H=()=>{const me=(Q+1)%d.length;p(me)},Z=()=>d.length>1,{cropModalOpen:J,currentImage:ee,handleCropComplete:ge,closeCropModal:ce,processFileWithCrop:Ie}=Ate({onImageProcessed:(me,ye)=>{q({target:{files:[me]}},ye)}}),Ce=(me,ye)=>{if(me.length>0){const ke=me[0];ke.type.startsWith("image/")&&Ie(ke,ye)}},re=(me,ye)=>{var xe;const ke=(xe=me.target.files)==null?void 0:xe[0];ke&&Ie(ke,ye),me.target.value=""};Ze.useEffect(()=>{(o.base64||a.base64)&&n({firstImage:o.base64,secondImage:a.base64})},[o.base64,a.base64]);const ue=r?o.base64&&a.base64&&!t:o.base64&&!t;return Ze.useEffect(()=>{y(fb())},[]),Ze.useEffect(()=>{s&&u&&!h?d.length===0?v():p(f):s||C()},[s,u,h,f,d.length]),_(c1,{className:tr["manual-document-upload"],children:[!W&&i(c1,{sx:{mb:3},children:_(Bu,{className:tr.recommendations,children:[i(Rn,{variant:"subtitle2",gutterBottom:!0,fontWeight:"bold",sx:{color:"var(--_primary)"},textAlign:"left",children:"Recomendaciones:"}),_("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[_("div",{style:{display:"flex",gap:10,alignItems:"center",justifyContent:"left"},children:[i("div",{children:i(rb,{})}),i("p",{style:{marginBottom:0,textAlign:"left"},children:"Procura que la foto tenga buena iluminaci\xF3n"})]}),_("div",{style:{display:"flex",gap:10,alignItems:"center",justifyContent:"left"},children:[i("div",{children:i(ob,{})}),i("p",{style:{marginBottom:0,textAlign:"left"},children:"Evita reflejos en el documento de identidad"})]}),_("div",{style:{display:"flex",gap:10,alignItems:"center",justifyContent:"left"},children:[i("div",{children:i(u6,{})}),i("p",{style:{marginBottom:0,textAlign:"left"},children:"Procura que el texto en el documento sea legible, sino prueba cambiando a otra c\xE1mara de tu dispositivo"})]}),_("div",{style:{display:"flex",gap:10,alignItems:"center",justifyContent:"left"},children:[i("div",{children:i(ote,{})}),i("p",{style:{marginBottom:0,textAlign:"left"},children:"Recorta la imagen para que se ajuste al documento, recuerda dejar bordes suficientes para el reconocimiento del tipo de documento"})]})]}),i(_n,{type:"button",onClick:()=>T(!0),fullWidth:!0,children:"Continuar"})]})}),W&&_(Xi,{children:[_(c1,{display:"flex",flexDirection:"column",gap:3,width:"100%",children:[i(eC,{variant:"outlined",children:_(Bu,{children:[i(Rn,{variant:"subtitle1",gutterBottom:!0,fontWeight:"bold",children:"Frontal del Documento"}),o.preview?_(c1,{className:tr["document-preview"],children:[i("img",{src:o.preview,alt:"Documento frontal"}),i(Kr,{onClick:()=>G(!0),className:tr["delete-button"],children:i(d6,{color:"error"})})]}):s&&x==="front"?_(c1,{className:tr["document-preview"],children:[(I||h)&&_(c1,{className:tr["loading-overlay"],children:[i(e0,{sx:{display:"flex",color:"var(--_primary)"}}),i(Rn,{variant:"body2",sx:{mt:1},children:h?"Verificando permisos...":g?"Inicializando c\xE1mara...":"Cargando..."})]}),A&&_(c1,{className:tr["error-overlay"],children:[i(Rn,{variant:"body1",gutterBottom:!0,children:A}),i(c1,{sx:{display:"flex",gap:1,flexDirection:"column"},children:u===!1?i(Ii,{variant:"contained",onClick:O,children:"Solicitar Permisos"}):_(Xi,{children:[i(Ii,{variant:"contained",onClick:O,children:"Reintentar"}),i(Ii,{variant:"outlined",onClick:N,children:"Reiniciar C\xE1mara"}),E&&Z()&&i(Ii,{variant:"outlined",onClick:H,color:"secondary",children:"Cambiar C\xE1mara (Forzado)"})]})})]}),i("video",{ref:V,autoPlay:!0,playsInline:!0,muted:!0,style:{display:"block"}}),_(c1,{sx:{position:"absolute",bottom:16,left:"50%",transform:"translateX(-50%)",display:"flex",gap:2,zIndex:1},children:[Z()&&i(Kr,{onClick:D,disabled:I,sx:{backgroundColor:"rgba(255, 255, 255, 0.9)","&:hover":{backgroundColor:"rgba(255, 255, 255, 1)"},width:"3rem",height:"3rem"},children:i(nb,{})}),i(Kr,{onClick:R,disabled:I||!!A,sx:{backgroundColor:"var(--_primary)",color:"white","&:hover":{backgroundColor:"var(--_primary)",opacity:.8},width:"3rem",height:"3rem"},children:i(h6,{})}),i(Kr,{onClick:P,sx:{backgroundColor:"rgba(255, 255, 255, 0.9)","&:hover":{backgroundColor:"rgba(255, 255, 255, 1)"},width:"3rem",height:"3rem"},children:i(tb,{})})]}),i("canvas",{ref:F,style:{display:"none"}})]}):_(c1,{className:tr["upload-zone"],border:2,borderColor:"grey.300",borderRadius:2,p:3,textAlign:"center",sx:{borderStyle:"dashed","&:hover":{borderColor:"var(--_primary)",backgroundColor:"action.hover"}},onDragOver:me=>{me.preventDefault(),me.stopPropagation()},onDrop:me=>{me.preventDefault(),me.stopPropagation(),Ce(me.dataTransfer.files,!0)},children:[i("input",{type:"file",accept:"image/*",style:{display:"none"},id:"front-document-input",onChange:me=>re(me,!0)}),i("label",{htmlFor:"front-document-input",children:_(c1,{display:"flex",flexDirection:"column",alignItems:"center",gap:1,sx:{cursor:"pointer"},children:[i(Cs,{className:tr["upload-icon"]}),i(Rn,{variant:"body2",color:"text.secondary",children:"Arrastra y suelta la foto frontal de tu documento aqu\xED"}),i(Rn,{variant:"caption",className:tr["file-info"],children:"JPG, PNG"}),i(p4,{sx:{width:"100%"},children:"o"})]})}),_(c1,{className:tr["camera-button"],children:[i(_n,{type:"button",startIcon:i(h6,{}),onClick:()=>w(!0),children:"Usar C\xE1mara"}),i(_n,{type:"button",variant:"outlined",startIcon:i(Cs,{}),onClick:()=>{var me;return(me=document.getElementById("front-document-input"))==null?void 0:me.click()},children:"Sube de tu galer\xEDa"})]})]}),o.error&&i(c1,{className:tr["error-message"],children:i(bu,{severity:"error",children:o.error})})]})}),r!==!1&&i(eC,{variant:"outlined",children:_(Bu,{children:[i(Rn,{variant:"subtitle1",gutterBottom:!0,fontWeight:"bold",children:"Reverso del Documento"}),a.preview?_(c1,{className:tr["document-preview"],children:[i("img",{src:a.preview,alt:"Documento posterior"}),i(Kr,{onClick:()=>G(!1),className:tr["delete-button"],children:i(d6,{color:"error"})})]}):s&&x==="rear"?_(c1,{className:tr["document-preview"],children:[I&&_(c1,{className:tr["loading-overlay"],children:[i(e0,{sx:{display:"flex",color:"var(--_primary)"}}),i(Rn,{variant:"body2",sx:{mt:1},children:g?"Inicializando c\xE1mara...":"Cargando..."})]}),A&&_(c1,{className:tr["error-overlay"],children:[i(Rn,{variant:"body1",gutterBottom:!0,children:A}),i(c1,{sx:{display:"flex",gap:1,flexDirection:"column"},children:u===!1?i(Ii,{variant:"contained",onClick:O,children:"Solicitar Permisos"}):_(Xi,{children:[i(Ii,{variant:"contained",onClick:O,children:"Reintentar"}),i(Ii,{variant:"outlined",onClick:N,children:"Reiniciar C\xE1mara"}),E&&Z()&&i(Ii,{variant:"outlined",onClick:H,color:"secondary",children:"Cambiar C\xE1mara (Forzado)"})]})})]}),i("video",{ref:V,autoPlay:!0,playsInline:!0,muted:!0,style:{display:"block"}}),_(c1,{sx:{position:"absolute",bottom:16,left:"50%",transform:"translateX(-50%)",display:"flex",gap:2,zIndex:1},children:[Z()&&i(Kr,{onClick:D,disabled:I,sx:{backgroundColor:"rgba(255, 255, 255, 0.9)","&:hover":{backgroundColor:"rgba(255, 255, 255, 1)",width:"3rem",height:"3rem"}},children:i(nb,{})}),i(Kr,{onClick:R,disabled:I||!!A,sx:{backgroundColor:"var(--_primary)",color:"white","&:hover":{backgroundColor:"var(--_primary)",opacity:.8},width:"3rem",height:"3rem"},children:i(h6,{})}),i(Kr,{onClick:P,sx:{backgroundColor:"rgba(255, 255, 255, 0.9)","&:hover":{backgroundColor:"rgba(255, 255, 255, 1)"},width:"3rem",height:"3rem"},children:i(tb,{})})]}),i("canvas",{ref:F,style:{display:"none"}})]}):_(c1,{className:"upload-zone",border:2,borderColor:"grey.300",borderRadius:2,p:3,textAlign:"center",sx:{borderStyle:"dashed","&:hover":{borderColor:"var(--_primary)",backgroundColor:"action.hover"}},onDragOver:me=>{me.preventDefault(),me.stopPropagation()},onDrop:me=>{me.preventDefault(),me.stopPropagation(),Ce(me.dataTransfer.files,!1)},children:[i("input",{type:"file",accept:"image/*",style:{display:"none"},id:"rear-document-input",onChange:me=>re(me,!1)}),i("label",{htmlFor:"rear-document-input",children:_(c1,{display:"flex",flexDirection:"column",alignItems:"center",gap:1,sx:{cursor:"pointer"},children:[i(Cs,{className:tr["upload-icon"]}),i(Rn,{variant:"body2",color:"text.secondary",children:"Arrastra y suelta la foto del reverso de tu documento aqu\xED"}),i(Rn,{variant:"caption",className:tr["file-info"],children:"JPG, PNG"}),i(p4,{sx:{width:"100%"},children:"o"})]})}),_(c1,{className:tr["camera-button"],children:[i(_n,{type:"button",startIcon:i(h6,{}),onClick:()=>w(!1),children:"Usar C\xE1mara"}),i(_n,{type:"button",variant:"outlined",startIcon:i(Cs,{}),onClick:()=>{var me;return(me=document.getElementById("rear-document-input"))==null?void 0:me.click()},children:"Sube de tu galer\xEDa"})]})]}),a.error&&i(c1,{className:tr["error-message"],children:i(bu,{severity:"error",children:a.error})})]})})]}),i(c1,{className:tr["action-buttons"],children:i(Ii,{variant:"contained",sx:{backgroundColor:"var(--_primary)",color:"var(--_primary-contrastText)","&:hover":{backgroundColor:"var(--_primary)",opacity:.8}},onClick:e,fullWidth:!0,disabled:!ue,startIcon:t?i(e0,{size:20,sx:{color:"var(--_primary)"}}):null,children:t?"Procesando...":"Continuar"})})]}),J&&i(hte,{image:ee,onCropComplete:ge,onCancel:ce,aspectRatio:1.586,minCropSize:100})]})};function xb({mode:e="light",dataDocument:t,clientId:n,authorize:r,eventId:o=null,source:a="component",inProduction:s="prd",countryCodeAllowed:u=null,validateVpn:h=!1,successMessage:g,dualModeRequired:d=!0,showBackButtonWhenError:f=!0,version:p=1}){const{onSendSubmitDocument:C,simpleHandleSubmit:v,isLoading:y,status:E,message:w,clearState:x,base64:I,countryCode:A,onUploadImage:V,onUploadImage2:F,activateCamera:R,setActivateCamera:P,webcamRef:O,videoConstraints:N,setBase64:G,uploadDocumentByPhone:q,setUploadDocumentByPhone:Q}=ate(t,n,r,o,a,s,u,h,g,d);return i("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:_("div",{className:`${I1["kit-gbc"]} ${I1[e]} ${I1["without-shadow"]} ${I1.ocr}`,children:[i(N3,{className:"kit-gbc-toastify-container",position:"top-center",autoClose:5e3,hideProgressBar:!1,newestOnTop:!1,closeOnClick:!0,rtl:!1,pauseOnFocusLoss:!0,draggable:!0,pauseOnHover:!0}),y||u!==null&&!A?i(L8,{}):null,i("form",{onSubmit:v(C),id:"document-reader",children:_("div",{className:I1.sub,children:[_("div",{className:I1["header-component"],children:[i("h4",{children:"Lectura del documento"}),Rr(E)?p===1?i("p",{children:"Ubique su documento de identidad dentro del recuadro lo m\xE1s centrado posible."}):i("p",{children:"Por favor, tome una foto clara de su documento de identidad."}):i(I4,{status:E,message:w})]}),Rr(E)&&p===1&&i(ute,{base64:I,setBase64:G,setActivateCamera:P,activateCamera:R,webcamRef:O,Webcam:hb,videoConstraints:N,onUploadImage:V,dualModeRequired:d,status:E,onUploadImage2:F,uploadDocumentByPhone:q,setUploadDocumentByPhone:Q,onSendSubmitDocument:C}),Rr(E)&&p===2&&i(xte,{onSendSubmitDocument:C,isProcessing:y,setBase64:G,dualModeRequired:d}),(a!=="secure_link"||lte(w))&&E4(E)&&f&&i(_n,{type:"button",onClick:x,className:I1["px-2"],children:"Volver a intentar"})]})}),s!=="prd"&&i("span",{children:"Versi\xF3n 3.0.0"})]})})}xb.propTypes={mode:jt.exports.PropTypes.string,version:jt.exports.PropTypes.number,clientId:jt.exports.PropTypes.string.isRequired,authorize:jt.exports.PropTypes.func.isRequired,dataDocument:jt.exports.PropTypes.func.isRequired,inProduction:jt.exports.PropTypes.string,countryCodeAllowed:jt.exports.PropTypes.array,source:jt.exports.PropTypes.string,eventId:jt.exports.PropTypes.string,validateVpn:jt.exports.PropTypes.bool,dualModeRequired:jt.exports.PropTypes.bool,successMessage:jt.exports.PropTypes.string,showBackButtonWhenError:jt.exports.PropTypes.bool};const Fb=async(e,t,n,r)=>{const o={method:"POST",path:"api/v1/onboarding/face_match",inProduction:n,customHeaders:r,service:"services",bodyParams:{doc:e,selfie:t}};try{return(await V0(o)).data}catch(a){throw console.log(a),a}},Fte=(e,t,n,r,o,a,s,u,h,g,d,f)=>{const[p,C]=Ze.useState({}),[v,y]=Ze.useState(""),[E,w]=Ze.useState(!1),[x,I]=Ze.useState(t===void 0?Rl:o===void 0?f:""),A=Ze.useRef(null),[V,F]=Ze.useState(null),[R,P]=Ze.useState(null),O=D5(a),N=Ze.useCallback(async()=>{const T=A.current.getScreenshot({width:480,heigth:720,aspectRatio:.6,facingMode:"user"});F(T)},[A]);Ze.useEffect(()=>{h&&O&&h.length!==0&&!h.some(T=>T===(O==null?void 0:O.data_connection.isocode))&&(I(Tl),y(V5)),g&&(O==null?void 0:O.data_connection.proxy)==N5&&(I(Dl),y(H5)),h&&O&&P(O==null?void 0:O.data_connection.isocode)},[O,h]);const G=()=>{C({}),I(""),y(""),F(null),u(!1),w(!1)},{handleSubmit:q}=g5();return{onSendSubmitSelfie:async()=>{var T,W,D,H;w(!0);try{const Z=await o(),J={client_id:t,access_token:Z};try{const ee=await Fb(s,V,a,J);ee&&await e(ee.data),await N2({data:{first_image:V,second_image:s,similarity:ee.data.similarity,status_code:200},component:"facematch",eventId:n,source:r,inProduction:a,clientId:t,geolocation:O});const{message:ge}=ee.data;ge&&I(ge),y(d||"Comparaci\xF3n de rostro procesado con \xE9xito")}catch(ee){let ge="";const{status:ce}=(T=ee==null?void 0:ee.response)!=null?T:{status:"Error desconocido"};await N2({data:{first_image:V,second_image:s,similarity:(W=Z==null?void 0:Z.data)!=null&&W.similarity?Z.data.similarity:null,status_code:ce},component:"facematch",eventId:n,source:r,inProduction:a,clientId:t,geolocation:O}),(H=(D=ee==null?void 0:ee.response)==null?void 0:D.data)!=null&&H.message?ge=ee.response.data.message:ce===500&&(ge={limit_of_request:S7}),w(null),y(ge),I(ce),P8(ee)}}catch(Z){console.log(Z),kn.error("Error - Verificar host con el proveedor")}finally{w(!1)}},simpleHandleSubmit:q,isLoading:E,docImage:p,status:x,message:v,clearState:G,webcamRef:A,url:V,setUrl:F,capturePhoto:N,countryCode:R}};var Mb="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBw0NDQ0NDQ0ICA0IDQ0NDQ0NDQ8IDQ0NFREWFhURExMYHSggGBolGxMTITEhJSkrLi4uFx8zODMsNygtLisBCgoKDQ0NDg0PDy0ZFRk3KzctKysrKy03LTctKzcrKystKystKysrKysrKysrKysrKysrKysrKysrKysrKysrK//AABEIAPYAzQMBIgACEQEDEQH/xAAZAAEBAQEBAQAAAAAAAAAAAAAAAQMEAgf/xAAqEAEBAAECBQQCAgIDAAAAAAAAAQIDERIhQWFxBDFRgZGhYrEi8BMUQv/EABcBAQEBAQAAAAAAAAAAAAAAAAABAgP/xAAWEQEBAQAAAAAAAAAAAAAAAAAAARH/2gAMAwEAAhEDEQA/APqYDq5gAAAAAIAAioAAACAAgAACKgAABEWA1AAAAAABAAecspPeyAoxvqJ0lv6eL6i/GM/ZhrpHL/z5fx/C/wDYy/iuGugYT1HzPxWmOrjeu3nkmD2hQAAEAARUAIUgNgAAAAAQGHqNT/zOvuBq6/TH8ue37BpAAQQAAAe8NSzvPh045SzeON608+G/2liutDf9iKAAgAIsRQbAAAAIAJldpb8OG3e7/Lq9Tf8AHzXKsSgCoAgAAAAAAN/T5ctvhq5dG7ZTvydSVqCAgIqAKhAbgAAAgAOf1XT7YNvVe88Vi1EoAIIUAAAAAQAXG855jscUdiVYAiKAAECA3AAQoAioDn9V0+2Lf1PT7YNRKAggAAAACAAAs955dbkw955jrSrBARQEAWIQHQioAACAA49TLe2/7s8g0ygAAAAACFAAAHRpZbzxyc7f0/tfKVY0ARRFQAgQG4ACAAADj1MdsrHh16unxdrHLnjZyrURABAABKqAAAAAOnSm0882eGl1v4bJVgCIoAARCA6AQAAAEAYepntfpu86mO8s+QrjAaZAQAAAABcJvZPlGuhj1+hWwDKoAACAECA6EKCgAggAIqA59fDa79L/AGydmU3m3y5M8drtViIgKgAAACyb8vl04zabfDxo4bc771olagiogAAIUAIEBuAACAAgAADPWxll7c2jPWu2N/AOUBpkAAaaOMt59GbTQvPzBW4DKoAACAAAhAgOgABAAqDznnJ7366g9Fv058te9OX7rLK2++9XE105a2M7+GOrqcXaRmLhoAIAAEu3P4AG01p13n7e5lL7VzCYuuoc+OpZ38tMdWXsmK9gAIqAERYDoRUtAec85Pdlqa/TH8sLftcTWuetb7f4z9sgUEVBAAAAAAAABFQAEB6xzsa46svvy/pgGK6hz452d42xylZxVWIQVvnlJzrl1NS5dp8Jnlbd68rIzoAqAAIAAAAAAAAACAAIAAABL9ADbDU35X3/ALe45mmGp880salQBWQABAAAAAAAAAAQAAQAAAAAAAAGvBexwXsApwXsnBeygJwXscF7ABwXscPgAOG9k4b2UBOG9jhvYAOG9jhvYAOHwcN7ACcHg4PAAcN7HDewAcPg4fAJonD4OHwAHD4OHwoaP//Z";function zb({mode:e="light",dataFaceMatch:t,clientId:n,authorize:r,inProduction:o="prd",picBase64:a="",eventId:s=null,source:u="component",countryCodeAllowed:h=null,validateVpn:g=!1,successMessage:d}){const[f,p]=Ze.useState(!1),{onSendSubmitSelfie:C,simpleHandleSubmit:v,isLoading:y,docImage:E,status:w,message:x,clearState:I,capturePhoto:A,webcamRef:V,url:F,countryCode:R}=Fte(t,n,s,u,r,o,a,p,h,g,d),P=N=>{console.log(N,"userMedia")},O={with:1024,heigth:720,aspectRatio:1,facingMode:"user"};return _("div",{className:`${I1["kit-gbc"]} ${I1[e]}`,style:{padding:"16px"},children:[i(N3,{className:"kit-gbc-toastify-container",position:"top-center",autoClose:5e3,hideProgressBar:!1,newestOnTop:!1,closeOnClick:!0,rtl:!1,pauseOnFocusLoss:!0,draggable:!0,pauseOnHover:!0}),y||h!==null&&!R?i(L8,{}):null,i("form",{onSubmit:v(C),id:"face-match",children:_("div",{className:I1.sub,children:[E4(w)&&i(f6,{action:I}),_("div",{className:I1["header-component"],children:[i("h4",{children:"Comparaci\xF3n de rostro"}),Rr(w)?i("p",{children:"Utilice la c\xE1mara de su dispositivo para capturar una selfie."}):i(I4,{status:w,message:x})]}),Rr(w)&&_("div",{className:I1["pics-container"],children:[i("div",{className:I1["box-image"],children:Rr(a)?_("div",{className:`${I1["upload-document"]} ${I1["without-image"]}`,style:{backgroundImage:`url(${Mb})`},children:[i(ite,{}),i("p",{children:"Imagen no detectada"})]}):i("div",{className:`${I1["upload-document"]} ${I1["bg-img-container"]}`,style:{backgroundImage:`url(${a})`}})}),i("div",{className:I1.icon,children:i(nte,{})}),i("div",{children:f?i("div",{className:I1["box-image"],children:F?i(Xi,{children:i("div",{className:`${I1["upload-document"]} ${I1["bg-img-container"]}`,style:{backgroundImage:`url(${F})`}})}):i(hb,{ref:V,audio:!1,screenshotFormat:"image/png",videoConstraints:O,forceScreenshotSourceSize:!0,onUserMedia:P,mirrored:!0})}):i("label",{className:I1["box-image"],children:_("div",{className:`${I1["upload-document"]} ${I1["without-image"]}`,style:{backgroundImage:`url(${Mb})`},children:[i(Cs,{}),i("p",{children:Rr(E)?"Tomar selfie":E}),i("input",{hidden:!0,accept:"image/*",capture:"camera",id:"docImage",onClick:()=>p(!0)})]})})})]}),f&&!F&&V&&i(_n,{type:"button",onClick:A,children:"Capturar Selfie"}),i(Xi,{children:F&&i(c1,{width:"100%",mt:2,children:i(_n,{type:"submit",children:"Procesar"})})})]})})]})}zb.propTypes={mode:jt.exports.PropTypes.string,loader:jt.exports.PropTypes.bool,data:jt.exports.PropTypes.func,clientId:jt.exports.PropTypes.string.isRequired,authorize:jt.exports.PropTypes.func.isRequired,dataFaceMatch:jt.exports.PropTypes.func.isRequired,inProduction:jt.exports.PropTypes.string,picBase64:jt.exports.PropTypes.string.isRequired,countryCodeAllowed:jt.exports.PropTypes.array,eventId:jt.exports.PropTypes.string,source:jt.exports.PropTypes.string,validateVpn:jt.exports.PropTypes.bool,successMessage:jt.exports.PropTypes.string};const Mte=(e,t,n,r,o,a,s,u,h)=>{const[g,d]=Ze.useState(!1),[f,p]=Ze.useState(""),[C,v]=Ze.useState(e===void 0?Rl:f===void 0?W3:""),[y,E]=Ze.useState(""),[w,x]=Ze.useState(null),I=D5(r),[A,V]=Ze.useState({}),[F,R]=Ze.useState(0),[P,O]=Ze.useState(!1),[N,G]=Ze.useState({}),q=D=>{var H,Z;D.detail&&D.detail.action==="PROCESS_FINISHED"&&(((Z=(H=D.detail.data)==null?void 0:H.response)==null?void 0:Z.code)==0?V(D.detail.data.response):P||(O(!0),G(D)))};Ze.useEffect(()=>{var D,H,Z,J;P&&N2({data:{first_image:(H=(D=N.detail.data)==null?void 0:D.response)!=null&&H.images?"data:image/jpeg;base64,"+N.detail.data.response.images[0]:null,face_result_code:(J=(Z=N.detail.data)==null?void 0:Z.response)!=null&&J.code?N.detail.data.response.code:250},component:"liveness",eventId:t,source:n,inProduction:r,clientId:e,geolocation:I}).then(ee=>{s({countAttempts:ee.count_try,error:!0}),O(!1),G({})})},[P]),Ze.useEffect(()=>{o&&(I==null?void 0:I.data_connection.isocode)&&o.length!==0&&!o.some(D=>D===(I==null?void 0:I.data_connection.isocode))&&(v(Tl),E(V5)),u&&(I==null?void 0:I.data_connection.proxy)==N5&&(v(Dl),E(H5)),o&&I&&x(I==null?void 0:I.data_connection.isocode)},[I,o]);const Q=()=>{v(""),E(""),d(!1)};Ze.useEffect(()=>{Rr(A)||T()},[A]);const T=async()=>{var D;try{const H={client_id:e,access_token:f};try{a?await Fb(a,`data:image/jpeg;base64,${A.images[0]}`,r,H).then(Z=>{R(Z.data.similarity),E(h||"Verificaci\xF3n de identidad completada"),N2({data:{similarity:Z.data.similarity,first_image:`data:image/jpeg;base64,${A.images[0]}`,second_image:a,status_code:200},component:"facematch",eventId:t,source:n,inProduction:r,clientId:e,geolocation:I})}):W()}catch(Z){let J="";const{status:ee}=(D=Z==null?void 0:Z.response)!=null?D:{status:"Error desconocido"};N2({data:{similarity:0,first_image:`data:image/jpeg;base64,${A.images[0]}`,second_image:a,status_code:ee},component:"facematch",eventId:t,source:n,inProduction:r,clientId:e,geolocation:I}),ee===500&&(J=S7),E(J),v(ee),P8(Z)}}catch{kn.error("Error - Verificar host con el proveedor")}};Ze.useEffect(()=>{F!==0&&W()},[F]);const W=async()=>{try{await N2({data:{selfie:`data:image/jpeg;base64,${A.images[0]}`,similarity:a?F:null,face_result_code:0},component:"liveness",eventId:t,source:n,inProduction:r,clientId:e,geolocation:I}).then(D=>s(D))}catch(D){return D}};return{status:C,isLoading:g,listener:q,onSendSubmitLiveness:T,clearState:Q,message:y,countryCode:w,setToken:p,data:A,similarity:F}};function zte(e){const t=e!=null?e:document.documentElement,n=getComputedStyle(t),r=n.getPropertyValue("--primary").trim()||"#1976d2",o=n.getPropertyValue("--primary-hov").trim()||"#2689ed",a=n.getPropertyValue("--font-size").trim()||"14px",s=n.getPropertyValue("--font-family").trim()||"'Poppins', sans-serif";return{primaryColor:r,primaryColorHover:o,fontSize:a,fontFamily:s}}const kte=()=>i("div",{className:"custom_spinner_container",children:i("div",{className:"box_spinner",children:i("div",{className:"spinner"})})});var l1={},Xu={exports:{}};(function(e,t){(function(n,r){var o="1.0.40",a="",s="?",u="function",h="undefined",g="object",d="string",f="major",p="model",C="name",v="type",y="vendor",E="version",w="architecture",x="console",I="mobile",A="tablet",V="smarttv",F="wearable",R="embedded",P=500,O="Amazon",N="Apple",G="ASUS",q="BlackBerry",Q="Browser",T="Chrome",W="Edge",D="Firefox",H="Google",Z="Huawei",J="LG",ee="Microsoft",ge="Motorola",ce="Opera",Ie="Samsung",Ce="Sharp",re="Sony",ue="Xiaomi",me="Zebra",ye="Facebook",ke="Chromium OS",xe="Mac OS",Ue=" Browser",tt=function(Re,rt){var We={};for(var Ke in Re)rt[Ke]&&rt[Ke].length%2===0?We[Ke]=rt[Ke].concat(Re[Ke]):We[Ke]=Re[Ke];return We},we=function(Re){for(var rt={},We=0;We<Re.length;We++)rt[Re[We].toUpperCase()]=Re[We];return rt},Le=function(Re,rt){return typeof Re===d?Ne(rt).indexOf(Ne(Re))!==-1:!1},Ne=function(Re){return Re.toLowerCase()},Ve=function(Re){return typeof Re===d?Re.replace(/[^\d\.]/g,a).split(".")[0]:r},_e=function(Re,rt){if(typeof Re===d)return Re=Re.replace(/^\s\s*/,a),typeof rt===h?Re:Re.substring(0,P)},qe=function(Re,rt){for(var We=0,Ke,Ye,zt,It,De,Ct;We<rt.length&&!De;){var lt=rt[We],St=rt[We+1];for(Ke=Ye=0;Ke<lt.length&&!De&&lt[Ke];)if(De=lt[Ke++].exec(Re),De)for(zt=0;zt<St.length;zt++)Ct=De[++Ye],It=St[zt],typeof It===g&&It.length>0?It.length===2?typeof It[1]==u?this[It[0]]=It[1].call(this,Ct):this[It[0]]=It[1]:It.length===3?typeof It[1]===u&&!(It[1].exec&&It[1].test)?this[It[0]]=Ct?It[1].call(this,Ct,It[2]):r:this[It[0]]=Ct?Ct.replace(It[1],It[2]):r:It.length===4&&(this[It[0]]=Ct?It[3].call(this,Ct.replace(It[1],It[2])):r):this[It]=Ct||r;We+=2}},wt=function(Re,rt){for(var We in rt)if(typeof rt[We]===g&&rt[We].length>0){for(var Ke=0;Ke<rt[We].length;Ke++)if(Le(rt[We][Ke],Re))return We===s?r:We}else if(Le(rt[We],Re))return We===s?r:We;return rt.hasOwnProperty("*")?rt["*"]:Re},he={"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},Se={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Ae={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[E,[C,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[E,[C,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[C,E],[/opios[\/ ]+([\w\.]+)/i],[E,[C,ce+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[E,[C,ce+" GX"]],[/\bopr\/([\w\.]+)/i],[E,[C,ce]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[E,[C,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[E,[C,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[C,E],[/quark(?:pc)?\/([-\w\.]+)/i],[E,[C,"Quark"]],[/\bddg\/([\w\.]+)/i],[E,[C,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[E,[C,"UC"+Q]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[E,[C,"WeChat"]],[/konqueror\/([\w\.]+)/i],[E,[C,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[E,[C,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[E,[C,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[E,[C,"Smart Lenovo "+Q]],[/(avast|avg)\/([\w\.]+)/i],[[C,/(.+)/,"$1 Secure "+Q],E],[/\bfocus\/([\w\.]+)/i],[E,[C,D+" Focus"]],[/\bopt\/([\w\.]+)/i],[E,[C,ce+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[E,[C,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[E,[C,"Dolphin"]],[/coast\/([\w\.]+)/i],[E,[C,ce+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[E,[C,"MIUI"+Ue]],[/fxios\/([\w\.-]+)/i],[E,[C,D]],[/\bqihoobrowser\/?([\w\.]*)/i],[E,[C,"360"]],[/\b(qq)\/([\w\.]+)/i],[[C,/(.+)/,"$1Browser"],E],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[C,/(.+)/,"$1"+Ue],E],[/samsungbrowser\/([\w\.]+)/i],[E,[C,Ie+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[E,[C,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[C,"Sogou Mobile"],E],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[C,E],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[C],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[E,C],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[C,ye],E],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[C,E],[/\bgsa\/([\w\.]+) .*safari\//i],[E,[C,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[E,[C,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[E,[C,T+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[C,T+" WebView"],E],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[E,[C,"Android "+Q]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[C,E],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[E,[C,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[E,C],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[C,[E,wt,he]],[/(webkit|khtml)\/([\w\.]+)/i],[C,E],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[C,"Netscape"],E],[/(wolvic|librewolf)\/([\w\.]+)/i],[C,E],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[E,[C,D+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[C,[E,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[C,[E,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[w,"amd64"]],[/(ia32(?=;))/i],[[w,Ne]],[/((?:i[346]|x)86)[;\)]/i],[[w,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[w,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[w,"armhf"]],[/windows (ce|mobile); ppc;/i],[[w,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[w,/ower/,a,Ne]],[/(sun4\w)[;\)]/i],[[w,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[w,Ne]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[p,[y,Ie],[v,A]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[p,[y,Ie],[v,I]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[p,[y,N],[v,I]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[p,[y,N],[v,A]],[/(macintosh);/i],[p,[y,N]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[p,[y,Ce],[v,I]],[/(?:honor)([-\w ]+)[;\)]/i],[p,[y,"Honor"],[v,I]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[p,[y,Z],[v,A]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[p,[y,Z],[v,I]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[p,/_/g," "],[y,ue],[v,I]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[p,/_/g," "],[y,ue],[v,A]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[p,[y,"OPPO"],[v,I]],[/\b(opd2\d{3}a?) bui/i],[p,[y,"OPPO"],[v,A]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[p,[y,"Vivo"],[v,I]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[p,[y,"Realme"],[v,I]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[p,[y,ge],[v,I]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[p,[y,ge],[v,A]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[p,[y,J],[v,A]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[p,[y,J],[v,I]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[p,[y,"Lenovo"],[v,A]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[p,/_/g," "],[y,"Nokia"],[v,I]],[/(pixel c)\b/i],[p,[y,H],[v,A]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[p,[y,H],[v,I]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[p,[y,re],[v,I]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[p,"Xperia Tablet"],[y,re],[v,A]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[p,[y,"OnePlus"],[v,I]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[p,[y,O],[v,A]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[p,/(.+)/g,"Fire Phone $1"],[y,O],[v,I]],[/(playbook);[-\w\),; ]+(rim)/i],[p,y,[v,A]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[p,[y,q],[v,I]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[p,[y,G],[v,A]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[p,[y,G],[v,I]],[/(nexus 9)/i],[p,[y,"HTC"],[v,A]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[y,[p,/_/g," "],[v,I]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[p,[y,"TCL"],[v,A]],[/(itel) ((\w+))/i],[[y,Ne],p,[v,wt,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[p,[y,"Acer"],[v,A]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[p,[y,"Meizu"],[v,I]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[p,[y,"Ulefone"],[v,I]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[p,[y,"Energizer"],[v,I]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[p,[y,"Cat"],[v,I]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[p,[y,"Smartfren"],[v,I]],[/droid.+; (a(?:015|06[35]|142p?))/i],[p,[y,"Nothing"],[v,I]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (imo) ((?!tab)[\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[y,p,[v,I]],[/(imo) (tab \w+)/i,/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[y,p,[v,A]],[/(surface duo)/i],[p,[y,ee],[v,A]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[p,[y,"Fairphone"],[v,I]],[/(u304aa)/i],[p,[y,"AT&T"],[v,I]],[/\bsie-(\w*)/i],[p,[y,"Siemens"],[v,I]],[/\b(rct\w+) b/i],[p,[y,"RCA"],[v,A]],[/\b(venue[\d ]{2,7}) b/i],[p,[y,"Dell"],[v,A]],[/\b(q(?:mv|ta)\w+) b/i],[p,[y,"Verizon"],[v,A]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[p,[y,"Barnes & Noble"],[v,A]],[/\b(tm\d{3}\w+) b/i],[p,[y,"NuVision"],[v,A]],[/\b(k88) b/i],[p,[y,"ZTE"],[v,A]],[/\b(nx\d{3}j) b/i],[p,[y,"ZTE"],[v,I]],[/\b(gen\d{3}) b.+49h/i],[p,[y,"Swiss"],[v,I]],[/\b(zur\d{3}) b/i],[p,[y,"Swiss"],[v,A]],[/\b((zeki)?tb.*\b) b/i],[p,[y,"Zeki"],[v,A]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[y,"Dragon Touch"],p,[v,A]],[/\b(ns-?\w{0,9}) b/i],[p,[y,"Insignia"],[v,A]],[/\b((nxa|next)-?\w{0,9}) b/i],[p,[y,"NextBook"],[v,A]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[y,"Voice"],p,[v,I]],[/\b(lvtel\-)?(v1[12]) b/i],[[y,"LvTel"],p,[v,I]],[/\b(ph-1) /i],[p,[y,"Essential"],[v,I]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[p,[y,"Envizen"],[v,A]],[/\b(trio[-\w\. ]+) b/i],[p,[y,"MachSpeed"],[v,A]],[/\btu_(1491) b/i],[p,[y,"Rotor"],[v,A]],[/(shield[\w ]+) b/i],[p,[y,"Nvidia"],[v,A]],[/(sprint) (\w+)/i],[y,p,[v,I]],[/(kin\.[onetw]{3})/i],[[p,/\./g," "],[y,ee],[v,I]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[p,[y,me],[v,A]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[p,[y,me],[v,I]],[/smart-tv.+(samsung)/i],[y,[v,V]],[/hbbtv.+maple;(\d+)/i],[[p,/^/,"SmartTV"],[y,Ie],[v,V]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[y,J],[v,V]],[/(apple) ?tv/i],[y,[p,N+" TV"],[v,V]],[/crkey/i],[[p,T+"cast"],[y,H],[v,V]],[/droid.+aft(\w+)( bui|\))/i],[p,[y,O],[v,V]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[p,[y,Ce],[v,V]],[/(bravia[\w ]+)( bui|\))/i],[p,[y,re],[v,V]],[/(mitv-\w{5}) bui/i],[p,[y,ue],[v,V]],[/Hbbtv.*(technisat) (.*);/i],[y,p,[v,V]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[y,_e],[p,_e],[v,V]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[v,V]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[y,p,[v,x]],[/droid.+; (shield) bui/i],[p,[y,"Nvidia"],[v,x]],[/(playstation [345portablevi]+)/i],[p,[y,re],[v,x]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[p,[y,ee],[v,x]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[p,[y,Ie],[v,F]],[/((pebble))app/i],[y,p,[v,F]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[p,[y,N],[v,F]],[/droid.+; (glass) \d/i],[p,[y,H],[v,F]],[/droid.+; (wt63?0{2,3})\)/i],[p,[y,me],[v,F]],[/droid.+; (glass) \d/i],[p,[y,H],[v,F]],[/(pico) (4|neo3(?: link|pro)?)/i],[y,p,[v,F]],[/; (quest( \d| pro)?)/i],[p,[y,ye],[v,F]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[y,[v,R]],[/(aeobc)\b/i],[p,[y,O],[v,R]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[p,[v,I]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[p,[v,A]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[v,A]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[v,I]],[/(android[-\w\. ]{0,9});.+buil/i],[p,[y,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[E,[C,W+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[C,E],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[E,[C,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[C,E],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[E,C]],os:[[/microsoft (windows) (vista|xp)/i],[C,E],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[C,[E,wt,Se]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[E,wt,Se],[C,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[E,/_/g,"."],[C,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[C,xe],[E,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[E,C],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[C,E],[/\(bb(10);/i],[E,[C,q]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[E,[C,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[E,[C,D+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[E,[C,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[E,[C,"watchOS"]],[/crkey\/([\d\.]+)/i],[E,[C,T+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[C,ke],E],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[C,E],[/(sunos) ?([\w\.\d]*)/i],[[C,"Solaris"],E],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[C,E]]},Me=function(Re,rt){if(typeof Re===g&&(rt=Re,Re=r),!(this instanceof Me))return new Me(Re,rt).getResult();var We=typeof n!==h&&n.navigator?n.navigator:r,Ke=Re||(We&&We.userAgent?We.userAgent:a),Ye=We&&We.userAgentData?We.userAgentData:r,zt=rt?tt(Ae,rt):Ae,It=We&&We.userAgent==Ke;return this.getBrowser=function(){var De={};return De[C]=r,De[E]=r,qe.call(De,Ke,zt.browser),De[f]=Ve(De[E]),It&&We&&We.brave&&typeof We.brave.isBrave==u&&(De[C]="Brave"),De},this.getCPU=function(){var De={};return De[w]=r,qe.call(De,Ke,zt.cpu),De},this.getDevice=function(){var De={};return De[y]=r,De[p]=r,De[v]=r,qe.call(De,Ke,zt.device),It&&!De[v]&&Ye&&Ye.mobile&&(De[v]=I),It&&De[p]=="Macintosh"&&We&&typeof We.standalone!==h&&We.maxTouchPoints&&We.maxTouchPoints>2&&(De[p]="iPad",De[v]=A),De},this.getEngine=function(){var De={};return De[C]=r,De[E]=r,qe.call(De,Ke,zt.engine),De},this.getOS=function(){var De={};return De[C]=r,De[E]=r,qe.call(De,Ke,zt.os),It&&!De[C]&&Ye&&Ye.platform&&Ye.platform!="Unknown"&&(De[C]=Ye.platform.replace(/chrome os/i,ke).replace(/macos/i,xe)),De},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return Ke},this.setUA=function(De){return Ke=typeof De===d&&De.length>P?_e(De,P):De,this},this.setUA(Ke),this};Me.VERSION=o,Me.BROWSER=we([C,E,f]),Me.CPU=we([w]),Me.DEVICE=we([p,y,v,x,I,V,A,F,R]),Me.ENGINE=Me.OS=we([C,E]),e.exports&&(t=e.exports=Me),t.UAParser=Me;var ze=typeof n!==h&&(n.jQuery||n.Zepto);if(ze&&!ze.ua){var Oe=new Me;ze.ua=Oe.getResult(),ze.ua.get=function(){return Oe.getUA()},ze.ua.set=function(Re){Oe.setUA(Re);var rt=Oe.getResult();for(var We in rt)ze.ua[We]=rt[We]}}})(typeof window=="object"?window:zl)})(Xu,Xu.exports),Object.defineProperty(l1,"__esModule",{value:!0});function Pte(e){return e&&typeof e=="object"&&"default"in e?e.default:e}var uo=_t.default,Vn=Pte(uo),kb=Xu.exports,Gl=new kb,ho=Gl.getBrowser(),Ote=Gl.getCPU(),y2=Gl.getDevice(),_u=Gl.getEngine(),Kl=Gl.getOS(),A4=Gl.getUA(),Pb=function(t){return Gl.setUA(t)},x4=function(t){if(!t){console.error("No userAgent string was provided");return}var n=new kb(t);return{UA:n,browser:n.getBrowser(),cpu:n.getCPU(),device:n.getDevice(),engine:n.getEngine(),os:n.getOS(),ua:n.getUA(),setUserAgent:function(o){return n.setUA(o)}}},Ob=Object.freeze({ClientUAInstance:Gl,browser:ho,cpu:Ote,device:y2,engine:_u,os:Kl,ua:A4,setUa:Pb,parseUserAgent:x4});function Bb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Bte(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Bb(Object(n),!0).forEach(function(r){Rte(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function F4(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?F4=function(t){return typeof t}:F4=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},F4(e)}function Lte(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Lb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Tte(e,t,n){return t&&Lb(e.prototype,t),n&&Lb(e,n),e}function Rte(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $u(){return $u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$u.apply(this,arguments)}function Dte(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&td(e,t)}function ed(e){return ed=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},ed(e)}function td(e,t){return td=Object.setPrototypeOf||function(r,o){return r.__proto__=o,r},td(e,t)}function Vte(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a<r.length;a++)o=r[a],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Z2(e,t){if(e==null)return{};var n=Vte(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function y6(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Hte(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return y6(e)}function Nte(e,t){return Qte(e)||Wte(e,t)||jte(e,t)||Ute()}function Qte(e){if(Array.isArray(e))return e}function Wte(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,a=!1,s,u;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(h){a=!0,u=h}finally{try{!o&&n.return!=null&&n.return()}finally{if(a)throw u}}return r}}function jte(e,t){if(!!e){if(typeof e=="string")return Tb(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Tb(e,t)}}function Tb(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ute(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1423
+ `;let Zu;function yte(e,t){return new Promise((n,r)=>{Zu||(Zu=function(s){const u=[];return typeof s=="function"?u.push(`(${s})()`):u.push(s),URL.createObjectURL(new Blob(u))}(bte));const o=new Worker(Zu);o.addEventListener("message",function(s){if(t.signal&&t.signal.aborted)o.terminate();else if(s.data.progress===void 0){if(s.data.error)return r(new Error(s.data.error)),void o.terminate();n(s.data.file),o.terminate()}else t.onProgress(s.data.progress)}),o.addEventListener("error",r),t.signal&&t.signal.addEventListener("abort",()=>{r(t.signal.reason),o.terminate()}),o.postMessage({file:e,imageCompressionLibUrl:t.libURL,options:{...t,onProgress:void 0,signal:void 0}})})}function co(e,t){return new Promise(function(n,r){let o,a,s,u,h,g;if(o={...t},s=0,{onProgress:u}=o,o.maxSizeMB=o.maxSizeMB||Number.POSITIVE_INFINITY,h=typeof o.useWebWorker!="boolean"||o.useWebWorker,delete o.useWebWorker,o.onProgress=C=>{s=C,typeof u=="function"&&u(s)},!(e instanceof Blob||e instanceof Cte))return r(new Error("The file given is not an instance of Blob or File"));if(!/^image/.test(e.type))return r(new Error("The file given is not an image"));if(g=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope,!h||typeof Worker!="function"||g)return Ab(e,o).then(function(C){try{return a=C,p.call(this)}catch(v){return r(v)}}.bind(this),r);var d=function(){try{return p.call(this)}catch(C){return r(C)}}.bind(this),f=function(C){try{return Ab(e,o).then(function(v){try{return a=v,d()}catch(y){return r(y)}},r)}catch(v){return r(v)}};try{return o.libURL=o.libURL||"https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js",yte(e,o).then(function(C){try{return a=C,d()}catch{return f()}},f)}catch{f()}function p(){try{a.name=e.name,a.lastModified=e.lastModified}catch{}try{o.preserveExif&&e.type==="image/jpeg"&&(!o.fileType||o.fileType&&o.fileType===e.type)&&(a=pb(e,a))}catch{}return n(a)}})}co.getDataUrlFromFile=Cb,co.getFilefromDataUrl=Ju,co.loadImage=bb,co.drawImageInCanvas=wb,co.drawFileInCanvas=C6,co.canvasToFile=b6,co.getExifOrientation=Ib,co.handleMaxWidthOrHeight=Eb,co.followExifOrientation=Sb,co.cleanupCanvasMemory=ca,co.isAutoOrientationInBrowser=bs,co.approximateBelowMaximumCanvasSizeOfBrowser=yb,co.copyExifWithoutOrientation=pb,co.getBrowserName=n0,co.version="2.0.2";const wte=async e=>{const t={maxSizeMB:.8,maxWidthOrHeight:1280,useWebWorker:!0,fileType:"image/jpeg"};try{return await co(e,t)}catch(n){throw console.error("Error al comprimir la imagen:",n),n}},Ite=e=>new Promise((t,n)=>{const r=new FileReader;r.readAsDataURL(e),r.onload=o=>{const s=o.target.result.split(",")[1];t(s)},r.onerror=o=>{n(o)}}),Ete=e=>["image/jpeg","image/jpg","image/png"].includes(e.type)?e.size>3145728?`El archivo excede el tama\xF1o m\xE1ximo de 3MB. Tama\xF1o actual: ${(e.size/(1024*1024)).toFixed(2)} MB.`:"ok":`El archivo es de tipo ${e.type}. Debe ser una imagen (JPG, PNG).`,Ste=()=>{const[e,t]=Ze.useState(!1),[n,r]=Ze.useState(!1),[o,a]=Ze.useState([]),[s,u]=Ze.useState(null),[h,g]=Ze.useState(0),[d,f]=Ze.useState(!1),[p,C]=Ze.useState("front"),[v,y]=Ze.useState(!1),[E,w]=Ze.useState(null),[x,I]=Ze.useState(!1),[A,V]=Ze.useState({file:null,preview:null,base64:null,error:null}),[F,R]=Ze.useState({file:null,preview:null,base64:null,error:null}),[P,O]=Ze.useState(!1),[N,G]=Ze.useState(null),[q,Q]=Ze.useState(!1),T=Ze.useRef(null),W=Ze.useRef(null);Ze.useEffect(()=>{T.current&&s&&T.current.srcObject!==s&&(console.log("[Camera] Syncing stream to video element via useEffect"),T.current.srcObject=s,T.current.play().catch(we=>{console.error("[Camera] Error playing video in sync effect:",we)}))},[s,P]);const D=()=>{if(T.current&&W.current){const we=T.current,Le=W.current,Ne=Le.getContext("2d");Ne&&we.videoWidth>0&&(Le.width=we.videoWidth,Le.height=we.videoHeight,Ne.drawImage(we,0,0),Le.toBlob(Ve=>{if(Ve){const _e=new File([Ve],`document_${Date.now()}.jpg`,{type:"image/jpeg"});xe(_e)}},"image/jpeg",.9))}},H=()=>o.length>1&&N===!0,Z=()=>{O(!1),w(null)},J=async()=>{N===!1?await ce():(w(null),P&&(o.length===0?await ue():await ye(h)))},ee=async()=>{try{y(!0),w(null),await me(),await new Promise(we=>setTimeout(we,1e3)),P&&N&&await ye(h)}catch(we){console.error("Error al reiniciar c\xE1mara:",we),w("No se pudo reiniciar la c\xE1mara. Intenta nuevamente.")}finally{y(!1)}},ge=async()=>{try{const Le=(await navigator.mediaDevices.enumerateDevices()).filter(Ne=>{var Ve;return(Ve=Ne.kind==="videoinput"&&Ne.label.toLowerCase().includes("back"))!=null?Ve:Ne.kind==="videoinput"});a(Le)}catch(we){console.error("Error obteniendo dispositivos de c\xE1mara:",we),a([])}},ce=async()=>{try{y(!0),w(null),(await navigator.mediaDevices.getUserMedia({video:!0})).getTracks().forEach(Le=>Le.stop()),G(!0),await ge()}catch(we){throw console.error("Error solicitando permisos:",we),G(!1),w("Permisos de c\xE1mara denegados. Permite el acceso para continuar."),we}finally{y(!1)}},Ie=async we=>{if(C(we?"front":"rear"),N===null){r(!0);try{await ce(),O(!0)}catch{w("Se requieren permisos de c\xE1mara. Permite el acceso para continuar.")}finally{r(!1)}}else N===!0?O(!0):w("Se requieren permisos de c\xE1mara. Permite el acceso para continuar.")},Ce=A.base64&&F.base64&&!d,re=async()=>{var we,Le,Ne,Ve,_e;if(!(!A.base64||!F.base64)){loaderIncrement(),f(!0);try{const qe=await processOcrService(accessToken,{first_image:`data:image/jpeg;base64,${A.base64}`,second_image:`data:image/jpeg;base64,${F.base64}`});setOcr(qe);const wt=claroPayDataRegister&&Object.assign(claroPayDataRegister,{documentId:(we=qe.document_type)!=null&&we.includes("2021")?qe.document_number:(Le=qe.reference)!=null?Le:"",documentType:(Ne=qe.document_category)!=null?Ne:""});setDataClaroPay(wt),navigate("/data-confirmation")}catch(qe){console.error("Error al procesar documentos:",qe),registerOcrError({bodyParams:{doc_first_image:`data:image/jpeg;base64,${A.base64}`,doc_second_image:`data:image/jpeg;base64,${F.base64}`,id_onboarding:personalData==null?void 0:personalData.idOnboarding,identification:"",mobile_phone:(Ve=personalData==null?void 0:personalData.phone)!=null?Ve:"",email:(_e=personalData==null?void 0:personalData.email)!=null?_e:""},token:clientToken});const wt={file:null,preview:null,base64:null,error:"Error al procesar la imagen"};V(wt),R(wt)}finally{f(!1),loaderDecrement()}}},ue=async(we=0)=>{try{y(!0),Q(!0),w(null),await me();const Le=e?1e3:500;if(await new Promise(Ne=>setTimeout(Ne,Le)),navigator.mediaDevices&&navigator.mediaDevices.getUserMedia){const Ne=e?{video:{facingMode:{ideal:"environment"},width:{ideal:640,max:1280},height:{ideal:480,max:720}}}:{video:{facingMode:{ideal:"environment"},width:{ideal:1280,max:1920},height:{ideal:720,max:1080}}},Ve=await navigator.mediaDevices.getUserMedia(Ne);console.log("[Camera] Stream obtained, tracks:",Ve.getTracks().length),u(Ve),T.current?(T.current.srcObject=Ve,await T.current.play(),console.log("[Camera] Direct stream assignment succeeded")):console.log("[Camera] videoRef not ready yet \u2014 useEffect sync will handle it")}else w("La c\xE1mara no est\xE1 disponible en este dispositivo")}catch(Le){console.error("Error abriendo c\xE1mara con fallback:",Le);const Ne=Le;if(Ne.name==="NotAllowedError")w("Permisos de c\xE1mara denegados. Permite el acceso a la c\xE1mara."),G(!1);else if(Ne.name==="NotFoundError")w("No se encontr\xF3 ninguna c\xE1mara en el dispositivo.");else if(Ne.name==="NotReadableError"){if(we<(e?1:2))return await new Promise(Ve=>setTimeout(Ve,1500)),ue(we+1);w("C\xE1mara en uso. Intenta cerrar otras aplicaciones que usen la c\xE1mara.")}else w("No se pudo acceder a la c\xE1mara. Verifica los permisos.")}finally{y(!1),Q(!1)}},me=async()=>{if(s&&(s.getTracks().forEach(Le=>{Le.stop(),Le.enabled=!1}),u(null)),T.current&&(T.current.srcObject=null,T.current.load(),T.current.pause()),W.current){const Le=W.current.getContext("2d");Le&&Le.clearRect(0,0,W.current.width,W.current.height)}const we=e?800:300;await new Promise(Le=>setTimeout(Le,we))},ye=async(we,Le=0)=>{try{if(y(!0),Q(!0),w(null),N!==!0){w("Se requieren permisos de c\xE1mara para continuar");return}await me();const Ne=e?1200:500;if(await new Promise(Ve=>setTimeout(Ve,Ne)),navigator.mediaDevices&&navigator.mediaDevices.getUserMedia){let Ve;o.length>0&&o[we]?e?Ve={video:{facingMode:{ideal:"environment"},deviceId:{exact:o[we].deviceId},width:{ideal:640,max:1280},height:{ideal:480,max:720}}}:Ve={video:{facingMode:{ideal:"environment"},deviceId:{exact:o[we].deviceId},width:{ideal:1280,max:1920},height:{ideal:720,max:1080}}}:Ve=e?{video:{facingMode:{ideal:"environment"},width:{ideal:640,max:1280},height:{ideal:480,max:720}}}:{video:{facingMode:{ideal:"environment"},width:{ideal:1280,max:1920},height:{ideal:720,max:1080}}};const _e=await navigator.mediaDevices.getUserMedia(Ve);u(_e),T.current&&(T.current.srcObject=_e,await T.current.play())}else w("La c\xE1mara no est\xE1 disponible en este dispositivo")}catch(Ne){console.error("Error abriendo c\xE1mara:",Ne);const Ve=Ne;if(Ve.name==="NotAllowedError")w("Permisos de c\xE1mara denegados. Permite el acceso a la c\xE1mara."),G(!1);else if(Ve.name==="NotFoundError")w("No se encontr\xF3 ninguna c\xE1mara en el dispositivo.");else if(Ve.name==="NotReadableError")if(Le<(e?1:2)){const _e=e?2e3:1e3;return await new Promise(qe=>setTimeout(qe,_e)),ye(we,Le+1)}else w("C\xE1mara en uso. Intenta cerrar otras aplicaciones que usen la c\xE1mara.");else w("No se pudo acceder a la c\xE1mara. Verifica los permisos.")}finally{y(!1),Q(!1)}},ke=async(we,Le)=>{const Ne=Le?V:R,Ve=await wte(we),_e=Ete(Ve);if(_e!=="ok"){Ne({file:null,preview:null,base64:null,error:_e});return}try{const qe=URL.createObjectURL(Ve),wt=await Ite(Ve);Ne({file:Ve,preview:qe,base64:wt,error:null})}catch{Ne({file:null,preview:null,base64:null,error:"Error al procesar la imagen"})}},xe=we=>{ke(we,p==="front"),Z()};return{frontDocument:A,rearDocument:F,setFrontDocument:V,setRearDocument:R,isCameraOpen:P,hasPermissions:N,handleSubmit:re,canSubmit:Ce,isCheckingPermissions:n,isInitializing:q,isProcessing:d,availableCameras:o,currentCameraIndex:h,openCamera:ye,closeCamera:me,openCameraWithFallback:ue,setIsMobile:t,isMobile:e,IsMobileValidator:fb,handleCameraCapture:Ie,cameraTarget:p,setCameraTarget:C,isLoadingCamera:v,setIsLoadingCamera:y,error:E,setError:w,getAvailableCameras:ge,requestPermissions:ce,canSwitchCamera:H,capturePhoto:D,handleCloseCamera:Z,handleRetryCamera:J,handleRestartCamera:ee,videoRef:T,canvasRef:W,handleFileInputChange:(we,Le)=>{var Ve;const Ne=(Ve=we.target.files)==null?void 0:Ve[0];Ne&&ke(Ne,Le)},removeDocument:we=>{(we?V:R)({file:null,preview:null,base64:null,error:null})},setRecomendationsReviewed:I,recomendationsReviewed:x}},Ate=({onImageProcessed:e})=>{const[t,n]=Ze.useState(!1),[r,o]=Ze.useState(""),[a,s]=Ze.useState(!0),[u,h]=Ze.useState(null),g=Ze.useCallback((C,v,y)=>{o(C),s(y),h(v),n(!0)},[]),d=Ze.useCallback(()=>{n(!1),o(""),h(null)},[]),f=Ze.useCallback(async C=>{if(!!u)try{const y=await(await fetch(C.croppedImage)).blob(),E=u.name.replace(/\.[^/.]+$/,"_cropped.jpg"),w=new File([y],E,{type:"image/jpeg"});e(w,a),d()}catch(v){console.error("Error al procesar imagen recortada:",v)}},[u,a,e,d]),p=Ze.useCallback((C,v)=>{const y=new FileReader;y.onload=E=>{var x;const w=(x=E.target)==null?void 0:x.result;g(w,C,v)},y.readAsDataURL(C)},[g]);return{cropModalOpen:t,currentImage:r,currentIsFront:a,openCropModal:g,closeCropModal:d,handleCropComplete:f,processFileWithCrop:p}};var tr={"manual-document-upload":"_manual-document-upload_1w1k0_1","MuiListItemIcon-root":"_MuiListItemIcon-root_1w1k0_6","MuiCard-root":"_MuiCard-root_1w1k0_9","MuiCardContent-root":"_MuiCardContent-root_1w1k0_15",recommendations:"_recommendations_1w1k0_18","upload-zone":"_upload-zone_1w1k0_21","document-preview":"_document-preview_1w1k0_28","action-buttons":"_action-buttons_1w1k0_54","MuiButton-root":"_MuiButton-root_1w1k0_59","error-message":"_error-message_1w1k0_66","MuiAlert-root":"_MuiAlert-root_1w1k0_69","success-indicator":"_success-indicator_1w1k0_72","delete-button":"_delete-button_1w1k0_81","camera-button":"_camera-button_1w1k0_97","MuiButton-outlined":"_MuiButton-outlined_1w1k0_111","upload-icon":"_upload-icon_1w1k0_120","file-info":"_file-info_1w1k0_125","loading-overlay":"_loading-overlay_1w1k0_130","error-overlay":"_error-overlay_1w1k0_144","MuiTypography-root":"_MuiTypography-root_1w1k0_160","MuiBox-root":"_MuiBox-root_1w1k0_165","MuiListItem-root":"_MuiListItem-root_1w1k0_188"};const xte=({onSendSubmitDocument:e,isProcessing:t,setBase64:n,dualModeRequired:r})=>{const{frontDocument:o,rearDocument:a,isCameraOpen:s,hasPermissions:u,isCheckingPermissions:h,isInitializing:g,availableCameras:d,currentCameraIndex:f,openCamera:p,closeCamera:C,openCameraWithFallback:v,setIsMobile:y,isMobile:E,handleCameraCapture:w,cameraTarget:x,isLoadingCamera:I,error:A,videoRef:V,canvasRef:F,capturePhoto:R,handleCloseCamera:P,handleRetryCamera:O,handleRestartCamera:N,removeDocument:G,handleFileInputChange:q,currentCameraIndex:Q,setRecomendationsReviewed:T,recomendationsReviewed:W}=Ste(),D=()=>{const me=(Q+1)%d.length;p(me)},H=()=>{const me=(Q+1)%d.length;p(me)},Z=()=>d.length>1,{cropModalOpen:J,currentImage:ee,handleCropComplete:ge,closeCropModal:ce,processFileWithCrop:Ie}=Ate({onImageProcessed:(me,ye)=>{q({target:{files:[me]}},ye)}}),Ce=(me,ye)=>{if(me.length>0){const ke=me[0];ke.type.startsWith("image/")&&Ie(ke,ye)}},re=(me,ye)=>{var xe;const ke=(xe=me.target.files)==null?void 0:xe[0];ke&&Ie(ke,ye),me.target.value=""};Ze.useEffect(()=>{(o.base64||a.base64)&&n({firstImage:o.base64,secondImage:a.base64})},[o.base64,a.base64]);const ue=r?o.base64&&a.base64&&!t:o.base64&&!t;return Ze.useEffect(()=>{y(fb())},[]),Ze.useEffect(()=>{s&&u&&!h?d.length===0?v():p(f):s||C()},[s,u,h,f,d.length]),_(c1,{className:tr["manual-document-upload"],children:[!W&&i(c1,{sx:{mb:3},children:_(Bu,{className:tr.recommendations,children:[i(Rn,{variant:"subtitle2",gutterBottom:!0,fontWeight:"bold",sx:{color:"var(--_primary)"},textAlign:"left",children:"Recomendaciones:"}),_("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[_("div",{style:{display:"flex",gap:10,alignItems:"center",justifyContent:"left"},children:[i("div",{children:i(rb,{})}),i("p",{style:{marginBottom:0,textAlign:"left"},children:"Procura que la foto tenga buena iluminaci\xF3n"})]}),_("div",{style:{display:"flex",gap:10,alignItems:"center",justifyContent:"left"},children:[i("div",{children:i(ob,{})}),i("p",{style:{marginBottom:0,textAlign:"left"},children:"Evita reflejos en el documento de identidad"})]}),_("div",{style:{display:"flex",gap:10,alignItems:"center",justifyContent:"left"},children:[i("div",{children:i(u6,{})}),i("p",{style:{marginBottom:0,textAlign:"left"},children:"Procura que el texto en el documento sea legible, sino prueba cambiando a otra c\xE1mara de tu dispositivo"})]}),_("div",{style:{display:"flex",gap:10,alignItems:"center",justifyContent:"left"},children:[i("div",{children:i(ote,{})}),i("p",{style:{marginBottom:0,textAlign:"left"},children:"Recorta la imagen para que se ajuste al documento, recuerda dejar bordes suficientes para el reconocimiento del tipo de documento"})]})]}),i(_n,{type:"button",onClick:()=>T(!0),fullWidth:!0,children:"Continuar"})]})}),W&&_(Xi,{children:[_(c1,{display:"flex",flexDirection:"column",gap:3,width:"100%",children:[i(eC,{variant:"outlined",children:_(Bu,{children:[i(Rn,{variant:"subtitle1",gutterBottom:!0,fontWeight:"bold",children:"Frontal del Documento"}),o.preview?_(c1,{className:tr["document-preview"],children:[i("img",{src:o.preview,alt:"Documento frontal"}),i(Kr,{onClick:()=>G(!0),className:tr["delete-button"],children:i(d6,{color:"error"})})]}):s&&x==="front"?_(c1,{className:tr["document-preview"],children:[(I||h)&&_(c1,{className:tr["loading-overlay"],children:[i(e0,{sx:{display:"flex",color:"var(--_primary)"}}),i(Rn,{variant:"body2",sx:{mt:1},children:h?"Verificando permisos...":g?"Inicializando c\xE1mara...":"Cargando..."})]}),A&&_(c1,{className:tr["error-overlay"],children:[i(Rn,{variant:"body1",gutterBottom:!0,children:A}),i(c1,{sx:{display:"flex",gap:1,flexDirection:"column"},children:u===!1?i(Ii,{variant:"contained",onClick:O,children:"Solicitar Permisos"}):_(Xi,{children:[i(Ii,{variant:"contained",onClick:O,children:"Reintentar"}),i(Ii,{variant:"outlined",onClick:N,children:"Reiniciar C\xE1mara"}),E&&Z()&&i(Ii,{variant:"outlined",onClick:H,color:"secondary",children:"Cambiar C\xE1mara (Forzado)"})]})})]}),i("video",{ref:V,autoPlay:!0,playsInline:!0,muted:!0,style:{display:"block"}}),_(c1,{sx:{position:"absolute",bottom:16,left:"50%",transform:"translateX(-50%)",display:"flex",gap:2,zIndex:1},children:[Z()&&i(Kr,{onClick:D,disabled:I,sx:{backgroundColor:"rgba(255, 255, 255, 0.9)","&:hover":{backgroundColor:"rgba(255, 255, 255, 1)"},width:"3rem",height:"3rem"},children:i(nb,{})}),i(Kr,{onClick:R,disabled:I||!!A,sx:{backgroundColor:"var(--_primary)",color:"white","&:hover":{backgroundColor:"var(--_primary)",opacity:.8},width:"3rem",height:"3rem"},children:i(h6,{})}),i(Kr,{onClick:P,sx:{backgroundColor:"rgba(255, 255, 255, 0.9)","&:hover":{backgroundColor:"rgba(255, 255, 255, 1)"},width:"3rem",height:"3rem"},children:i(tb,{})})]}),i("canvas",{ref:F,style:{display:"none"}})]}):_(c1,{className:tr["upload-zone"],border:2,borderColor:"grey.300",borderRadius:2,p:3,textAlign:"center",sx:{borderStyle:"dashed","&:hover":{borderColor:"var(--_primary)",backgroundColor:"action.hover"}},onDragOver:me=>{me.preventDefault(),me.stopPropagation()},onDrop:me=>{me.preventDefault(),me.stopPropagation(),Ce(me.dataTransfer.files,!0)},children:[i("input",{type:"file",accept:"image/*",style:{display:"none"},id:"front-document-input",onChange:me=>re(me,!0)}),i("label",{htmlFor:"front-document-input",children:_(c1,{display:"flex",flexDirection:"column",alignItems:"center",gap:1,sx:{cursor:"pointer"},children:[i(Cs,{className:tr["upload-icon"]}),i(Rn,{variant:"body2",color:"text.secondary",children:"Arrastra y suelta la foto frontal de tu documento aqu\xED"}),i(Rn,{variant:"caption",className:tr["file-info"],children:"JPG, PNG"}),i(p4,{sx:{width:"100%"},children:"o"})]})}),_(c1,{className:tr["camera-button"],children:[i(_n,{type:"button",startIcon:i(h6,{}),onClick:()=>w(!0),children:"Usar C\xE1mara"}),i(_n,{type:"button",variant:"outlined",startIcon:i(Cs,{}),onClick:()=>{var me;return(me=document.getElementById("front-document-input"))==null?void 0:me.click()},children:"Sube de tu galer\xEDa"})]})]}),o.error&&i(c1,{className:tr["error-message"],children:i(bu,{severity:"error",children:o.error})})]})}),r!==!1&&i(eC,{variant:"outlined",children:_(Bu,{children:[i(Rn,{variant:"subtitle1",gutterBottom:!0,fontWeight:"bold",children:"Reverso del Documento"}),a.preview?_(c1,{className:tr["document-preview"],children:[i("img",{src:a.preview,alt:"Documento posterior"}),i(Kr,{onClick:()=>G(!1),className:tr["delete-button"],children:i(d6,{color:"error"})})]}):s&&x==="rear"?_(c1,{className:tr["document-preview"],children:[I&&_(c1,{className:tr["loading-overlay"],children:[i(e0,{sx:{display:"flex",color:"var(--_primary)"}}),i(Rn,{variant:"body2",sx:{mt:1},children:g?"Inicializando c\xE1mara...":"Cargando..."})]}),A&&_(c1,{className:tr["error-overlay"],children:[i(Rn,{variant:"body1",gutterBottom:!0,children:A}),i(c1,{sx:{display:"flex",gap:1,flexDirection:"column"},children:u===!1?i(Ii,{variant:"contained",onClick:O,children:"Solicitar Permisos"}):_(Xi,{children:[i(Ii,{variant:"contained",onClick:O,children:"Reintentar"}),i(Ii,{variant:"outlined",onClick:N,children:"Reiniciar C\xE1mara"}),E&&Z()&&i(Ii,{variant:"outlined",onClick:H,color:"secondary",children:"Cambiar C\xE1mara (Forzado)"})]})})]}),i("video",{ref:V,autoPlay:!0,playsInline:!0,muted:!0,style:{display:"block"}}),_(c1,{sx:{position:"absolute",bottom:16,left:"50%",transform:"translateX(-50%)",display:"flex",gap:2,zIndex:1},children:[Z()&&i(Kr,{onClick:D,disabled:I,sx:{backgroundColor:"rgba(255, 255, 255, 0.9)","&:hover":{backgroundColor:"rgba(255, 255, 255, 1)",width:"3rem",height:"3rem"}},children:i(nb,{})}),i(Kr,{onClick:R,disabled:I||!!A,sx:{backgroundColor:"var(--_primary)",color:"white","&:hover":{backgroundColor:"var(--_primary)",opacity:.8},width:"3rem",height:"3rem"},children:i(h6,{})}),i(Kr,{onClick:P,sx:{backgroundColor:"rgba(255, 255, 255, 0.9)","&:hover":{backgroundColor:"rgba(255, 255, 255, 1)"},width:"3rem",height:"3rem"},children:i(tb,{})})]}),i("canvas",{ref:F,style:{display:"none"}})]}):_(c1,{className:"upload-zone",border:2,borderColor:"grey.300",borderRadius:2,p:3,textAlign:"center",sx:{borderStyle:"dashed","&:hover":{borderColor:"var(--_primary)",backgroundColor:"action.hover"}},onDragOver:me=>{me.preventDefault(),me.stopPropagation()},onDrop:me=>{me.preventDefault(),me.stopPropagation(),Ce(me.dataTransfer.files,!1)},children:[i("input",{type:"file",accept:"image/*",style:{display:"none"},id:"rear-document-input",onChange:me=>re(me,!1)}),i("label",{htmlFor:"rear-document-input",children:_(c1,{display:"flex",flexDirection:"column",alignItems:"center",gap:1,sx:{cursor:"pointer"},children:[i(Cs,{className:tr["upload-icon"]}),i(Rn,{variant:"body2",color:"text.secondary",children:"Arrastra y suelta la foto del reverso de tu documento aqu\xED"}),i(Rn,{variant:"caption",className:tr["file-info"],children:"JPG, PNG"}),i(p4,{sx:{width:"100%"},children:"o"})]})}),_(c1,{className:tr["camera-button"],children:[i(_n,{type:"button",startIcon:i(h6,{}),onClick:()=>w(!1),children:"Usar C\xE1mara"}),i(_n,{type:"button",variant:"outlined",startIcon:i(Cs,{}),onClick:()=>{var me;return(me=document.getElementById("rear-document-input"))==null?void 0:me.click()},children:"Sube de tu galer\xEDa"})]})]}),a.error&&i(c1,{className:tr["error-message"],children:i(bu,{severity:"error",children:a.error})})]})})]}),i(c1,{className:tr["action-buttons"],children:i(Ii,{variant:"contained",sx:{backgroundColor:"var(--_primary)",color:"white","&:hover":{backgroundColor:"var(--_primary)",opacity:.8}},onClick:e,fullWidth:!0,disabled:!ue,startIcon:t?i(e0,{size:20,sx:{color:"var(--_primary)"}}):null,children:t?"Procesando...":"Continuar"})})]}),J&&i(hte,{image:ee,onCropComplete:ge,onCancel:ce,aspectRatio:1.586,minCropSize:100})]})};function xb({mode:e="light",dataDocument:t,clientId:n,authorize:r,eventId:o=null,source:a="component",inProduction:s="prd",countryCodeAllowed:u=null,validateVpn:h=!1,successMessage:g,dualModeRequired:d=!0,showBackButtonWhenError:f=!0,version:p=1}){const{onSendSubmitDocument:C,simpleHandleSubmit:v,isLoading:y,status:E,message:w,clearState:x,base64:I,countryCode:A,onUploadImage:V,onUploadImage2:F,activateCamera:R,setActivateCamera:P,webcamRef:O,videoConstraints:N,setBase64:G,uploadDocumentByPhone:q,setUploadDocumentByPhone:Q}=ate(t,n,r,o,a,s,u,h,g,d);return i("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:_("div",{className:`${I1["kit-gbc"]} ${I1[e]} ${I1["without-shadow"]} ${I1.ocr}`,children:[i(N3,{className:"kit-gbc-toastify-container",position:"top-center",autoClose:5e3,hideProgressBar:!1,newestOnTop:!1,closeOnClick:!0,rtl:!1,pauseOnFocusLoss:!0,draggable:!0,pauseOnHover:!0}),y||u!==null&&!A?i(L8,{}):null,i("form",{onSubmit:v(C),id:"document-reader",children:_("div",{className:I1.sub,children:[_("div",{className:I1["header-component"],children:[i("h4",{children:"Lectura del documento"}),Rr(E)?p===1?i("p",{children:"Ubique su documento de identidad dentro del recuadro lo m\xE1s centrado posible."}):i("p",{children:"Por favor, tome una foto clara de su documento de identidad."}):i(I4,{status:E,message:w})]}),Rr(E)&&p===1&&i(ute,{base64:I,setBase64:G,setActivateCamera:P,activateCamera:R,webcamRef:O,Webcam:hb,videoConstraints:N,onUploadImage:V,dualModeRequired:d,status:E,onUploadImage2:F,uploadDocumentByPhone:q,setUploadDocumentByPhone:Q,onSendSubmitDocument:C}),Rr(E)&&p===2&&i(xte,{onSendSubmitDocument:C,isProcessing:y,setBase64:G,dualModeRequired:d}),(a!=="secure_link"||lte(w))&&E4(E)&&f&&i(_n,{type:"button",onClick:x,className:I1["px-2"],children:"Volver a intentar"})]})}),s!=="prd"&&i("span",{children:"Versi\xF3n 3.0.0"})]})})}xb.propTypes={mode:jt.exports.PropTypes.string,version:jt.exports.PropTypes.number,clientId:jt.exports.PropTypes.string.isRequired,authorize:jt.exports.PropTypes.func.isRequired,dataDocument:jt.exports.PropTypes.func.isRequired,inProduction:jt.exports.PropTypes.string,countryCodeAllowed:jt.exports.PropTypes.array,source:jt.exports.PropTypes.string,eventId:jt.exports.PropTypes.string,validateVpn:jt.exports.PropTypes.bool,dualModeRequired:jt.exports.PropTypes.bool,successMessage:jt.exports.PropTypes.string,showBackButtonWhenError:jt.exports.PropTypes.bool};const Fb=async(e,t,n,r)=>{const o={method:"POST",path:"api/v1/onboarding/face_match",inProduction:n,customHeaders:r,service:"services",bodyParams:{doc:e,selfie:t}};try{return(await V0(o)).data}catch(a){throw console.log(a),a}},Fte=(e,t,n,r,o,a,s,u,h,g,d,f)=>{const[p,C]=Ze.useState({}),[v,y]=Ze.useState(""),[E,w]=Ze.useState(!1),[x,I]=Ze.useState(t===void 0?Rl:o===void 0?f:""),A=Ze.useRef(null),[V,F]=Ze.useState(null),[R,P]=Ze.useState(null),O=D5(a),N=Ze.useCallback(async()=>{const T=A.current.getScreenshot({width:480,heigth:720,aspectRatio:.6,facingMode:"user"});F(T)},[A]);Ze.useEffect(()=>{h&&O&&h.length!==0&&!h.some(T=>T===(O==null?void 0:O.data_connection.isocode))&&(I(Tl),y(V5)),g&&(O==null?void 0:O.data_connection.proxy)==N5&&(I(Dl),y(H5)),h&&O&&P(O==null?void 0:O.data_connection.isocode)},[O,h]);const G=()=>{C({}),I(""),y(""),F(null),u(!1),w(!1)},{handleSubmit:q}=g5();return{onSendSubmitSelfie:async()=>{var T,W,D,H;w(!0);try{const Z=await o(),J={client_id:t,access_token:Z};try{const ee=await Fb(s,V,a,J);ee&&await e(ee.data),await N2({data:{first_image:V,second_image:s,similarity:ee.data.similarity,status_code:200},component:"facematch",eventId:n,source:r,inProduction:a,clientId:t,geolocation:O});const{message:ge}=ee.data;ge&&I(ge),y(d||"Comparaci\xF3n de rostro procesado con \xE9xito")}catch(ee){let ge="";const{status:ce}=(T=ee==null?void 0:ee.response)!=null?T:{status:"Error desconocido"};await N2({data:{first_image:V,second_image:s,similarity:(W=Z==null?void 0:Z.data)!=null&&W.similarity?Z.data.similarity:null,status_code:ce},component:"facematch",eventId:n,source:r,inProduction:a,clientId:t,geolocation:O}),(H=(D=ee==null?void 0:ee.response)==null?void 0:D.data)!=null&&H.message?ge=ee.response.data.message:ce===500&&(ge={limit_of_request:S7}),w(null),y(ge),I(ce),P8(ee)}}catch(Z){console.log(Z),kn.error("Error - Verificar host con el proveedor")}finally{w(!1)}},simpleHandleSubmit:q,isLoading:E,docImage:p,status:x,message:v,clearState:G,webcamRef:A,url:V,setUrl:F,capturePhoto:N,countryCode:R}};var Mb="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBw0NDQ0NDQ0ICA0IDQ0NDQ0NDQ8IDQ0NFREWFhURExMYHSggGBolGxMTITEhJSkrLi4uFx8zODMsNygtLisBCgoKDQ0NDg0PDy0ZFRk3KzctKysrKy03LTctKzcrKystKystKysrKysrKysrKysrKysrKysrKysrKysrKysrK//AABEIAPYAzQMBIgACEQEDEQH/xAAZAAEBAQEBAQAAAAAAAAAAAAAAAQMEAgf/xAAqEAEBAAECBQQCAgIDAAAAAAAAAQIDERIhQWFxBDFRgZGhYrEi8BMUQv/EABcBAQEBAQAAAAAAAAAAAAAAAAABAgP/xAAWEQEBAQAAAAAAAAAAAAAAAAAAARH/2gAMAwEAAhEDEQA/APqYDq5gAAAAAIAAioAAACAAgAACKgAABEWA1AAAAAABAAecspPeyAoxvqJ0lv6eL6i/GM/ZhrpHL/z5fx/C/wDYy/iuGugYT1HzPxWmOrjeu3nkmD2hQAAEAARUAIUgNgAAAAAQGHqNT/zOvuBq6/TH8ue37BpAAQQAAAe8NSzvPh045SzeON608+G/2liutDf9iKAAgAIsRQbAAAAIAJldpb8OG3e7/Lq9Tf8AHzXKsSgCoAgAAAAAAN/T5ctvhq5dG7ZTvydSVqCAgIqAKhAbgAAAgAOf1XT7YNvVe88Vi1EoAIIUAAAAAQAXG855jscUdiVYAiKAAECA3AAQoAioDn9V0+2Lf1PT7YNRKAggAAAACAAAs955dbkw955jrSrBARQEAWIQHQioAACAA49TLe2/7s8g0ygAAAAACFAAAHRpZbzxyc7f0/tfKVY0ARRFQAgQG4ACAAADj1MdsrHh16unxdrHLnjZyrURABAABKqAAAAAOnSm0882eGl1v4bJVgCIoAARCA6AQAAAEAYepntfpu86mO8s+QrjAaZAQAAAABcJvZPlGuhj1+hWwDKoAACAECA6EKCgAggAIqA59fDa79L/AGydmU3m3y5M8drtViIgKgAAACyb8vl04zabfDxo4bc771olagiogAAIUAIEBuAACAAgAADPWxll7c2jPWu2N/AOUBpkAAaaOMt59GbTQvPzBW4DKoAACAAAhAgOgABAAqDznnJ7366g9Fv058te9OX7rLK2++9XE105a2M7+GOrqcXaRmLhoAIAAEu3P4AG01p13n7e5lL7VzCYuuoc+OpZ38tMdWXsmK9gAIqAERYDoRUtAec85Pdlqa/TH8sLftcTWuetb7f4z9sgUEVBAAAAAAAABFQAEB6xzsa46svvy/pgGK6hz452d42xylZxVWIQVvnlJzrl1NS5dp8Jnlbd68rIzoAqAAIAAAAAAAAACAAIAAABL9ADbDU35X3/ALe45mmGp880salQBWQABAAAAAAAAAAQAAQAAAAAAAAGvBexwXsApwXsnBeygJwXscF7ABwXscPgAOG9k4b2UBOG9jhvYAOG9jhvYAOHwcN7ACcHg4PAAcN7HDewAcPg4fAJonD4OHwAHD4OHwoaP//Z";function zb({mode:e="light",dataFaceMatch:t,clientId:n,authorize:r,inProduction:o="prd",picBase64:a="",eventId:s=null,source:u="component",countryCodeAllowed:h=null,validateVpn:g=!1,successMessage:d}){const[f,p]=Ze.useState(!1),{onSendSubmitSelfie:C,simpleHandleSubmit:v,isLoading:y,docImage:E,status:w,message:x,clearState:I,capturePhoto:A,webcamRef:V,url:F,countryCode:R}=Fte(t,n,s,u,r,o,a,p,h,g,d),P=N=>{console.log(N,"userMedia")},O={with:1024,heigth:720,aspectRatio:1,facingMode:"user"};return _("div",{className:`${I1["kit-gbc"]} ${I1[e]}`,style:{padding:"16px"},children:[i(N3,{className:"kit-gbc-toastify-container",position:"top-center",autoClose:5e3,hideProgressBar:!1,newestOnTop:!1,closeOnClick:!0,rtl:!1,pauseOnFocusLoss:!0,draggable:!0,pauseOnHover:!0}),y||h!==null&&!R?i(L8,{}):null,i("form",{onSubmit:v(C),id:"face-match",children:_("div",{className:I1.sub,children:[E4(w)&&i(f6,{action:I}),_("div",{className:I1["header-component"],children:[i("h4",{children:"Comparaci\xF3n de rostro"}),Rr(w)?i("p",{children:"Utilice la c\xE1mara de su dispositivo para capturar una selfie."}):i(I4,{status:w,message:x})]}),Rr(w)&&_("div",{className:I1["pics-container"],children:[i("div",{className:I1["box-image"],children:Rr(a)?_("div",{className:`${I1["upload-document"]} ${I1["without-image"]}`,style:{backgroundImage:`url(${Mb})`},children:[i(ite,{}),i("p",{children:"Imagen no detectada"})]}):i("div",{className:`${I1["upload-document"]} ${I1["bg-img-container"]}`,style:{backgroundImage:`url(${a})`}})}),i("div",{className:I1.icon,children:i(nte,{})}),i("div",{children:f?i("div",{className:I1["box-image"],children:F?i(Xi,{children:i("div",{className:`${I1["upload-document"]} ${I1["bg-img-container"]}`,style:{backgroundImage:`url(${F})`}})}):i(hb,{ref:V,audio:!1,screenshotFormat:"image/png",videoConstraints:O,forceScreenshotSourceSize:!0,onUserMedia:P,mirrored:!0})}):i("label",{className:I1["box-image"],children:_("div",{className:`${I1["upload-document"]} ${I1["without-image"]}`,style:{backgroundImage:`url(${Mb})`},children:[i(Cs,{}),i("p",{children:Rr(E)?"Tomar selfie":E}),i("input",{hidden:!0,accept:"image/*",capture:"camera",id:"docImage",onClick:()=>p(!0)})]})})})]}),f&&!F&&V&&i(_n,{type:"button",onClick:A,children:"Capturar Selfie"}),i(Xi,{children:F&&i(c1,{width:"100%",mt:2,children:i(_n,{type:"submit",children:"Procesar"})})})]})})]})}zb.propTypes={mode:jt.exports.PropTypes.string,loader:jt.exports.PropTypes.bool,data:jt.exports.PropTypes.func,clientId:jt.exports.PropTypes.string.isRequired,authorize:jt.exports.PropTypes.func.isRequired,dataFaceMatch:jt.exports.PropTypes.func.isRequired,inProduction:jt.exports.PropTypes.string,picBase64:jt.exports.PropTypes.string.isRequired,countryCodeAllowed:jt.exports.PropTypes.array,eventId:jt.exports.PropTypes.string,source:jt.exports.PropTypes.string,validateVpn:jt.exports.PropTypes.bool,successMessage:jt.exports.PropTypes.string};const Mte=(e,t,n,r,o,a,s,u,h)=>{const[g,d]=Ze.useState(!1),[f,p]=Ze.useState(""),[C,v]=Ze.useState(e===void 0?Rl:f===void 0?W3:""),[y,E]=Ze.useState(""),[w,x]=Ze.useState(null),I=D5(r),[A,V]=Ze.useState({}),[F,R]=Ze.useState(0),[P,O]=Ze.useState(!1),[N,G]=Ze.useState({}),q=D=>{var H,Z;D.detail&&D.detail.action==="PROCESS_FINISHED"&&(((Z=(H=D.detail.data)==null?void 0:H.response)==null?void 0:Z.code)==0?V(D.detail.data.response):P||(O(!0),G(D)))};Ze.useEffect(()=>{var D,H,Z,J;P&&N2({data:{first_image:(H=(D=N.detail.data)==null?void 0:D.response)!=null&&H.images?"data:image/jpeg;base64,"+N.detail.data.response.images[0]:null,face_result_code:(J=(Z=N.detail.data)==null?void 0:Z.response)!=null&&J.code?N.detail.data.response.code:250},component:"liveness",eventId:t,source:n,inProduction:r,clientId:e,geolocation:I}).then(ee=>{s({countAttempts:ee.count_try,error:!0}),O(!1),G({})})},[P]),Ze.useEffect(()=>{o&&(I==null?void 0:I.data_connection.isocode)&&o.length!==0&&!o.some(D=>D===(I==null?void 0:I.data_connection.isocode))&&(v(Tl),E(V5)),u&&(I==null?void 0:I.data_connection.proxy)==N5&&(v(Dl),E(H5)),o&&I&&x(I==null?void 0:I.data_connection.isocode)},[I,o]);const Q=()=>{v(""),E(""),d(!1)};Ze.useEffect(()=>{Rr(A)||T()},[A]);const T=async()=>{var D;try{const H={client_id:e,access_token:f};try{a?await Fb(a,`data:image/jpeg;base64,${A.images[0]}`,r,H).then(Z=>{R(Z.data.similarity),E(h||"Verificaci\xF3n de identidad completada"),N2({data:{similarity:Z.data.similarity,first_image:`data:image/jpeg;base64,${A.images[0]}`,second_image:a,status_code:200},component:"facematch",eventId:t,source:n,inProduction:r,clientId:e,geolocation:I})}):W()}catch(Z){let J="";const{status:ee}=(D=Z==null?void 0:Z.response)!=null?D:{status:"Error desconocido"};N2({data:{similarity:0,first_image:`data:image/jpeg;base64,${A.images[0]}`,second_image:a,status_code:ee},component:"facematch",eventId:t,source:n,inProduction:r,clientId:e,geolocation:I}),ee===500&&(J=S7),E(J),v(ee),P8(Z)}}catch{kn.error("Error - Verificar host con el proveedor")}};Ze.useEffect(()=>{F!==0&&W()},[F]);const W=async()=>{try{await N2({data:{selfie:`data:image/jpeg;base64,${A.images[0]}`,similarity:a?F:null,face_result_code:0},component:"liveness",eventId:t,source:n,inProduction:r,clientId:e,geolocation:I}).then(D=>s(D))}catch(D){return D}};return{status:C,isLoading:g,listener:q,onSendSubmitLiveness:T,clearState:Q,message:y,countryCode:w,setToken:p,data:A,similarity:F}};function zte(e){const t=e!=null?e:document.documentElement,n=getComputedStyle(t),r=n.getPropertyValue("--primary").trim()||"#1976d2",o=n.getPropertyValue("--primary-hov").trim()||"#2689ed",a=n.getPropertyValue("--font-size").trim()||"14px",s=n.getPropertyValue("--font-family").trim()||"'Poppins', sans-serif";return{primaryColor:r,primaryColorHover:o,fontSize:a,fontFamily:s}}const kte=()=>i("div",{className:"custom_spinner_container",children:i("div",{className:"box_spinner",children:i("div",{className:"spinner"})})});var l1={},Xu={exports:{}};(function(e,t){(function(n,r){var o="1.0.40",a="",s="?",u="function",h="undefined",g="object",d="string",f="major",p="model",C="name",v="type",y="vendor",E="version",w="architecture",x="console",I="mobile",A="tablet",V="smarttv",F="wearable",R="embedded",P=500,O="Amazon",N="Apple",G="ASUS",q="BlackBerry",Q="Browser",T="Chrome",W="Edge",D="Firefox",H="Google",Z="Huawei",J="LG",ee="Microsoft",ge="Motorola",ce="Opera",Ie="Samsung",Ce="Sharp",re="Sony",ue="Xiaomi",me="Zebra",ye="Facebook",ke="Chromium OS",xe="Mac OS",Ue=" Browser",tt=function(Re,rt){var We={};for(var Ke in Re)rt[Ke]&&rt[Ke].length%2===0?We[Ke]=rt[Ke].concat(Re[Ke]):We[Ke]=Re[Ke];return We},we=function(Re){for(var rt={},We=0;We<Re.length;We++)rt[Re[We].toUpperCase()]=Re[We];return rt},Le=function(Re,rt){return typeof Re===d?Ne(rt).indexOf(Ne(Re))!==-1:!1},Ne=function(Re){return Re.toLowerCase()},Ve=function(Re){return typeof Re===d?Re.replace(/[^\d\.]/g,a).split(".")[0]:r},_e=function(Re,rt){if(typeof Re===d)return Re=Re.replace(/^\s\s*/,a),typeof rt===h?Re:Re.substring(0,P)},qe=function(Re,rt){for(var We=0,Ke,Ye,zt,It,De,Ct;We<rt.length&&!De;){var lt=rt[We],St=rt[We+1];for(Ke=Ye=0;Ke<lt.length&&!De&&lt[Ke];)if(De=lt[Ke++].exec(Re),De)for(zt=0;zt<St.length;zt++)Ct=De[++Ye],It=St[zt],typeof It===g&&It.length>0?It.length===2?typeof It[1]==u?this[It[0]]=It[1].call(this,Ct):this[It[0]]=It[1]:It.length===3?typeof It[1]===u&&!(It[1].exec&&It[1].test)?this[It[0]]=Ct?It[1].call(this,Ct,It[2]):r:this[It[0]]=Ct?Ct.replace(It[1],It[2]):r:It.length===4&&(this[It[0]]=Ct?It[3].call(this,Ct.replace(It[1],It[2])):r):this[It]=Ct||r;We+=2}},wt=function(Re,rt){for(var We in rt)if(typeof rt[We]===g&&rt[We].length>0){for(var Ke=0;Ke<rt[We].length;Ke++)if(Le(rt[We][Ke],Re))return We===s?r:We}else if(Le(rt[We],Re))return We===s?r:We;return rt.hasOwnProperty("*")?rt["*"]:Re},he={"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},Se={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Ae={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[E,[C,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[E,[C,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[C,E],[/opios[\/ ]+([\w\.]+)/i],[E,[C,ce+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[E,[C,ce+" GX"]],[/\bopr\/([\w\.]+)/i],[E,[C,ce]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[E,[C,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[E,[C,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[C,E],[/quark(?:pc)?\/([-\w\.]+)/i],[E,[C,"Quark"]],[/\bddg\/([\w\.]+)/i],[E,[C,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[E,[C,"UC"+Q]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[E,[C,"WeChat"]],[/konqueror\/([\w\.]+)/i],[E,[C,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[E,[C,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[E,[C,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[E,[C,"Smart Lenovo "+Q]],[/(avast|avg)\/([\w\.]+)/i],[[C,/(.+)/,"$1 Secure "+Q],E],[/\bfocus\/([\w\.]+)/i],[E,[C,D+" Focus"]],[/\bopt\/([\w\.]+)/i],[E,[C,ce+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[E,[C,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[E,[C,"Dolphin"]],[/coast\/([\w\.]+)/i],[E,[C,ce+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[E,[C,"MIUI"+Ue]],[/fxios\/([\w\.-]+)/i],[E,[C,D]],[/\bqihoobrowser\/?([\w\.]*)/i],[E,[C,"360"]],[/\b(qq)\/([\w\.]+)/i],[[C,/(.+)/,"$1Browser"],E],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[C,/(.+)/,"$1"+Ue],E],[/samsungbrowser\/([\w\.]+)/i],[E,[C,Ie+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[E,[C,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[C,"Sogou Mobile"],E],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[C,E],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[C],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[E,C],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[C,ye],E],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[C,E],[/\bgsa\/([\w\.]+) .*safari\//i],[E,[C,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[E,[C,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[E,[C,T+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[C,T+" WebView"],E],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[E,[C,"Android "+Q]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[C,E],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[E,[C,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[E,C],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[C,[E,wt,he]],[/(webkit|khtml)\/([\w\.]+)/i],[C,E],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[C,"Netscape"],E],[/(wolvic|librewolf)\/([\w\.]+)/i],[C,E],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[E,[C,D+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[C,[E,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[C,[E,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[w,"amd64"]],[/(ia32(?=;))/i],[[w,Ne]],[/((?:i[346]|x)86)[;\)]/i],[[w,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[w,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[w,"armhf"]],[/windows (ce|mobile); ppc;/i],[[w,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[w,/ower/,a,Ne]],[/(sun4\w)[;\)]/i],[[w,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[w,Ne]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[p,[y,Ie],[v,A]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[p,[y,Ie],[v,I]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[p,[y,N],[v,I]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[p,[y,N],[v,A]],[/(macintosh);/i],[p,[y,N]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[p,[y,Ce],[v,I]],[/(?:honor)([-\w ]+)[;\)]/i],[p,[y,"Honor"],[v,I]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[p,[y,Z],[v,A]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[p,[y,Z],[v,I]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[p,/_/g," "],[y,ue],[v,I]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[p,/_/g," "],[y,ue],[v,A]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[p,[y,"OPPO"],[v,I]],[/\b(opd2\d{3}a?) bui/i],[p,[y,"OPPO"],[v,A]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[p,[y,"Vivo"],[v,I]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[p,[y,"Realme"],[v,I]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[p,[y,ge],[v,I]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[p,[y,ge],[v,A]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[p,[y,J],[v,A]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[p,[y,J],[v,I]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[p,[y,"Lenovo"],[v,A]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[p,/_/g," "],[y,"Nokia"],[v,I]],[/(pixel c)\b/i],[p,[y,H],[v,A]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[p,[y,H],[v,I]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[p,[y,re],[v,I]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[p,"Xperia Tablet"],[y,re],[v,A]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[p,[y,"OnePlus"],[v,I]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[p,[y,O],[v,A]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[p,/(.+)/g,"Fire Phone $1"],[y,O],[v,I]],[/(playbook);[-\w\),; ]+(rim)/i],[p,y,[v,A]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[p,[y,q],[v,I]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[p,[y,G],[v,A]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[p,[y,G],[v,I]],[/(nexus 9)/i],[p,[y,"HTC"],[v,A]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[y,[p,/_/g," "],[v,I]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[p,[y,"TCL"],[v,A]],[/(itel) ((\w+))/i],[[y,Ne],p,[v,wt,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[p,[y,"Acer"],[v,A]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[p,[y,"Meizu"],[v,I]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[p,[y,"Ulefone"],[v,I]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[p,[y,"Energizer"],[v,I]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[p,[y,"Cat"],[v,I]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[p,[y,"Smartfren"],[v,I]],[/droid.+; (a(?:015|06[35]|142p?))/i],[p,[y,"Nothing"],[v,I]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (imo) ((?!tab)[\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[y,p,[v,I]],[/(imo) (tab \w+)/i,/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[y,p,[v,A]],[/(surface duo)/i],[p,[y,ee],[v,A]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[p,[y,"Fairphone"],[v,I]],[/(u304aa)/i],[p,[y,"AT&T"],[v,I]],[/\bsie-(\w*)/i],[p,[y,"Siemens"],[v,I]],[/\b(rct\w+) b/i],[p,[y,"RCA"],[v,A]],[/\b(venue[\d ]{2,7}) b/i],[p,[y,"Dell"],[v,A]],[/\b(q(?:mv|ta)\w+) b/i],[p,[y,"Verizon"],[v,A]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[p,[y,"Barnes & Noble"],[v,A]],[/\b(tm\d{3}\w+) b/i],[p,[y,"NuVision"],[v,A]],[/\b(k88) b/i],[p,[y,"ZTE"],[v,A]],[/\b(nx\d{3}j) b/i],[p,[y,"ZTE"],[v,I]],[/\b(gen\d{3}) b.+49h/i],[p,[y,"Swiss"],[v,I]],[/\b(zur\d{3}) b/i],[p,[y,"Swiss"],[v,A]],[/\b((zeki)?tb.*\b) b/i],[p,[y,"Zeki"],[v,A]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[y,"Dragon Touch"],p,[v,A]],[/\b(ns-?\w{0,9}) b/i],[p,[y,"Insignia"],[v,A]],[/\b((nxa|next)-?\w{0,9}) b/i],[p,[y,"NextBook"],[v,A]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[y,"Voice"],p,[v,I]],[/\b(lvtel\-)?(v1[12]) b/i],[[y,"LvTel"],p,[v,I]],[/\b(ph-1) /i],[p,[y,"Essential"],[v,I]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[p,[y,"Envizen"],[v,A]],[/\b(trio[-\w\. ]+) b/i],[p,[y,"MachSpeed"],[v,A]],[/\btu_(1491) b/i],[p,[y,"Rotor"],[v,A]],[/(shield[\w ]+) b/i],[p,[y,"Nvidia"],[v,A]],[/(sprint) (\w+)/i],[y,p,[v,I]],[/(kin\.[onetw]{3})/i],[[p,/\./g," "],[y,ee],[v,I]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[p,[y,me],[v,A]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[p,[y,me],[v,I]],[/smart-tv.+(samsung)/i],[y,[v,V]],[/hbbtv.+maple;(\d+)/i],[[p,/^/,"SmartTV"],[y,Ie],[v,V]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[y,J],[v,V]],[/(apple) ?tv/i],[y,[p,N+" TV"],[v,V]],[/crkey/i],[[p,T+"cast"],[y,H],[v,V]],[/droid.+aft(\w+)( bui|\))/i],[p,[y,O],[v,V]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[p,[y,Ce],[v,V]],[/(bravia[\w ]+)( bui|\))/i],[p,[y,re],[v,V]],[/(mitv-\w{5}) bui/i],[p,[y,ue],[v,V]],[/Hbbtv.*(technisat) (.*);/i],[y,p,[v,V]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[y,_e],[p,_e],[v,V]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[v,V]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[y,p,[v,x]],[/droid.+; (shield) bui/i],[p,[y,"Nvidia"],[v,x]],[/(playstation [345portablevi]+)/i],[p,[y,re],[v,x]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[p,[y,ee],[v,x]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[p,[y,Ie],[v,F]],[/((pebble))app/i],[y,p,[v,F]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[p,[y,N],[v,F]],[/droid.+; (glass) \d/i],[p,[y,H],[v,F]],[/droid.+; (wt63?0{2,3})\)/i],[p,[y,me],[v,F]],[/droid.+; (glass) \d/i],[p,[y,H],[v,F]],[/(pico) (4|neo3(?: link|pro)?)/i],[y,p,[v,F]],[/; (quest( \d| pro)?)/i],[p,[y,ye],[v,F]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[y,[v,R]],[/(aeobc)\b/i],[p,[y,O],[v,R]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[p,[v,I]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[p,[v,A]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[v,A]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[v,I]],[/(android[-\w\. ]{0,9});.+buil/i],[p,[y,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[E,[C,W+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[C,E],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[E,[C,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[C,E],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[E,C]],os:[[/microsoft (windows) (vista|xp)/i],[C,E],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[C,[E,wt,Se]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[E,wt,Se],[C,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[E,/_/g,"."],[C,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[C,xe],[E,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[E,C],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[C,E],[/\(bb(10);/i],[E,[C,q]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[E,[C,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[E,[C,D+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[E,[C,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[E,[C,"watchOS"]],[/crkey\/([\d\.]+)/i],[E,[C,T+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[C,ke],E],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[C,E],[/(sunos) ?([\w\.\d]*)/i],[[C,"Solaris"],E],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[C,E]]},Me=function(Re,rt){if(typeof Re===g&&(rt=Re,Re=r),!(this instanceof Me))return new Me(Re,rt).getResult();var We=typeof n!==h&&n.navigator?n.navigator:r,Ke=Re||(We&&We.userAgent?We.userAgent:a),Ye=We&&We.userAgentData?We.userAgentData:r,zt=rt?tt(Ae,rt):Ae,It=We&&We.userAgent==Ke;return this.getBrowser=function(){var De={};return De[C]=r,De[E]=r,qe.call(De,Ke,zt.browser),De[f]=Ve(De[E]),It&&We&&We.brave&&typeof We.brave.isBrave==u&&(De[C]="Brave"),De},this.getCPU=function(){var De={};return De[w]=r,qe.call(De,Ke,zt.cpu),De},this.getDevice=function(){var De={};return De[y]=r,De[p]=r,De[v]=r,qe.call(De,Ke,zt.device),It&&!De[v]&&Ye&&Ye.mobile&&(De[v]=I),It&&De[p]=="Macintosh"&&We&&typeof We.standalone!==h&&We.maxTouchPoints&&We.maxTouchPoints>2&&(De[p]="iPad",De[v]=A),De},this.getEngine=function(){var De={};return De[C]=r,De[E]=r,qe.call(De,Ke,zt.engine),De},this.getOS=function(){var De={};return De[C]=r,De[E]=r,qe.call(De,Ke,zt.os),It&&!De[C]&&Ye&&Ye.platform&&Ye.platform!="Unknown"&&(De[C]=Ye.platform.replace(/chrome os/i,ke).replace(/macos/i,xe)),De},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return Ke},this.setUA=function(De){return Ke=typeof De===d&&De.length>P?_e(De,P):De,this},this.setUA(Ke),this};Me.VERSION=o,Me.BROWSER=we([C,E,f]),Me.CPU=we([w]),Me.DEVICE=we([p,y,v,x,I,V,A,F,R]),Me.ENGINE=Me.OS=we([C,E]),e.exports&&(t=e.exports=Me),t.UAParser=Me;var ze=typeof n!==h&&(n.jQuery||n.Zepto);if(ze&&!ze.ua){var Oe=new Me;ze.ua=Oe.getResult(),ze.ua.get=function(){return Oe.getUA()},ze.ua.set=function(Re){Oe.setUA(Re);var rt=Oe.getResult();for(var We in rt)ze.ua[We]=rt[We]}}})(typeof window=="object"?window:zl)})(Xu,Xu.exports),Object.defineProperty(l1,"__esModule",{value:!0});function Pte(e){return e&&typeof e=="object"&&"default"in e?e.default:e}var uo=_t.default,Vn=Pte(uo),kb=Xu.exports,Gl=new kb,ho=Gl.getBrowser(),Ote=Gl.getCPU(),y2=Gl.getDevice(),_u=Gl.getEngine(),Kl=Gl.getOS(),A4=Gl.getUA(),Pb=function(t){return Gl.setUA(t)},x4=function(t){if(!t){console.error("No userAgent string was provided");return}var n=new kb(t);return{UA:n,browser:n.getBrowser(),cpu:n.getCPU(),device:n.getDevice(),engine:n.getEngine(),os:n.getOS(),ua:n.getUA(),setUserAgent:function(o){return n.setUA(o)}}},Ob=Object.freeze({ClientUAInstance:Gl,browser:ho,cpu:Ote,device:y2,engine:_u,os:Kl,ua:A4,setUa:Pb,parseUserAgent:x4});function Bb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Bte(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Bb(Object(n),!0).forEach(function(r){Rte(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function F4(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?F4=function(t){return typeof t}:F4=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},F4(e)}function Lte(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Lb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Tte(e,t,n){return t&&Lb(e.prototype,t),n&&Lb(e,n),e}function Rte(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $u(){return $u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$u.apply(this,arguments)}function Dte(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&td(e,t)}function ed(e){return ed=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},ed(e)}function td(e,t){return td=Object.setPrototypeOf||function(r,o){return r.__proto__=o,r},td(e,t)}function Vte(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a<r.length;a++)o=r[a],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Z2(e,t){if(e==null)return{};var n=Vte(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function y6(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Hte(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return y6(e)}function Nte(e,t){return Qte(e)||Wte(e,t)||jte(e,t)||Ute()}function Qte(e){if(Array.isArray(e))return e}function Wte(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,a=!1,s,u;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(h){a=!0,u=h}finally{try{!o&&n.return!=null&&n.return()}finally{if(a)throw u}}return r}}function jte(e,t){if(!!e){if(typeof e=="string")return Tb(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Tb(e,t)}}function Tb(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ute(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1424
1424
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var fo={Mobile:"mobile",Tablet:"tablet",SmartTv:"smarttv",Console:"console",Wearable:"wearable",Embedded:"embedded",Browser:void 0},Ko={Chrome:"Chrome",Firefox:"Firefox",Opera:"Opera",Yandex:"Yandex",Safari:"Safari",InternetExplorer:"Internet Explorer",Edge:"Edge",Chromium:"Chromium",Ie:"IE",MobileSafari:"Mobile Safari",EdgeChromium:"Edge Chromium",MIUI:"MIUI Browser",SamsungBrowser:"Samsung Browser"},ys={IOS:"iOS",Android:"Android",WindowsPhone:"Windows Phone",Windows:"Windows",MAC_OS:"Mac OS"},Gte={isMobile:!1,isTablet:!1,isBrowser:!1,isSmartTV:!1,isConsole:!1,isWearable:!1},Kte=function(t){switch(t){case fo.Mobile:return{isMobile:!0};case fo.Tablet:return{isTablet:!0};case fo.SmartTv:return{isSmartTV:!0};case fo.Console:return{isConsole:!0};case fo.Wearable:return{isWearable:!0};case fo.Browser:return{isBrowser:!0};case fo.Embedded:return{isEmbedded:!0};default:return Gte}},Yte=function(t){return Pb(t)},O1=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"none";return t||n},nd=function(){return typeof window!="undefined"&&(window.navigator||navigator)?window.navigator||navigator:!1},rd=function(t){var n=nd();return n&&n.platform&&(n.platform.indexOf(t)!==-1||n.platform==="MacIntel"&&n.maxTouchPoints>1&&!window.MSStream)},qte=function(t,n,r,o,a){return{isBrowser:t,browserMajorVersion:O1(n.major),browserFullVersion:O1(n.version),browserName:O1(n.name),engineName:O1(r.name),engineVersion:O1(r.version),osName:O1(o.name),osVersion:O1(o.version),userAgent:O1(a)}},Rb=function(t,n,r,o){return Bte({},t,{vendor:O1(n.vendor),model:O1(n.model),os:O1(r.name),osVersion:O1(r.version),ua:O1(o)})},Jte=function(t,n,r,o){return{isSmartTV:t,engineName:O1(n.name),engineVersion:O1(n.version),osName:O1(r.name),osVersion:O1(r.version),userAgent:O1(o)}},Zte=function(t,n,r,o){return{isConsole:t,engineName:O1(n.name),engineVersion:O1(n.version),osName:O1(r.name),osVersion:O1(r.version),userAgent:O1(o)}},Xte=function(t,n,r,o){return{isWearable:t,engineName:O1(n.name),engineVersion:O1(n.version),osName:O1(r.name),osVersion:O1(r.version),userAgent:O1(o)}},_te=function(t,n,r,o,a){return{isEmbedded:t,vendor:O1(n.vendor),model:O1(n.model),engineName:O1(r.name),engineVersion:O1(r.version),osName:O1(o.name),osVersion:O1(o.version),userAgent:O1(a)}};function $te(e){var t=e?x4(e):Ob,n=t.device,r=t.browser,o=t.engine,a=t.os,s=t.ua,u=Kte(n.type),h=u.isBrowser,g=u.isMobile,d=u.isTablet,f=u.isSmartTV,p=u.isConsole,C=u.isWearable,v=u.isEmbedded;if(h)return qte(h,r,o,a,s);if(f)return Jte(f,o,a,s);if(p)return Zte(p,o,a,s);if(g||d)return Rb(u,n,a,s);if(C)return Xte(C,o,a,s);if(v)return _te(v,n,o,a,s)}var Db=function(t){var n=t.type;return n===fo.Mobile},Vb=function(t){var n=t.type;return n===fo.Tablet},Hb=function(t){var n=t.type;return n===fo.Mobile||n===fo.Tablet},Nb=function(t){var n=t.type;return n===fo.SmartTv},w6=function(t){var n=t.type;return n===fo.Browser},Qb=function(t){var n=t.type;return n===fo.Wearable},Wb=function(t){var n=t.type;return n===fo.Console},jb=function(t){var n=t.type;return n===fo.Embedded},Ub=function(t){var n=t.vendor;return O1(n)},Gb=function(t){var n=t.model;return O1(n)},Kb=function(t){var n=t.type;return O1(n,"browser")},Yb=function(t){var n=t.name;return n===ys.Android},qb=function(t){var n=t.name;return n===ys.Windows},Jb=function(t){var n=t.name;return n===ys.MAC_OS},Zb=function(t){var n=t.name;return n===ys.WindowsPhone},Xb=function(t){var n=t.name;return n===ys.IOS},_b=function(t){var n=t.version;return O1(n)},$b=function(t){var n=t.name;return O1(n)},ey=function(t){var n=t.name;return n===Ko.Chrome},ty=function(t){var n=t.name;return n===Ko.Firefox},ny=function(t){var n=t.name;return n===Ko.Chromium},I6=function(t){var n=t.name;return n===Ko.Edge},ry=function(t){var n=t.name;return n===Ko.Yandex},oy=function(t){var n=t.name;return n===Ko.Safari||n===Ko.MobileSafari},iy=function(t){var n=t.name;return n===Ko.MobileSafari},ay=function(t){var n=t.name;return n===Ko.Opera},ly=function(t){var n=t.name;return n===Ko.InternetExplorer||n===Ko.Ie},sy=function(t){var n=t.name;return n===Ko.MIUI},cy=function(t){var n=t.name;return n===Ko.SamsungBrowser},uy=function(t){var n=t.version;return O1(n)},dy=function(t){var n=t.major;return O1(n)},hy=function(t){var n=t.name;return O1(n)},fy=function(t){var n=t.name;return O1(n)},py=function(t){var n=t.version;return O1(n)},gy=function(){var t=nd(),n=t&&t.userAgent&&t.userAgent.toLowerCase();return typeof n=="string"?/electron/.test(n):!1},ws=function(t){return typeof t=="string"&&t.indexOf("Edg/")!==-1},my=function(){var t=nd();return t&&(/iPad|iPhone|iPod/.test(t.platform)||t.platform==="MacIntel"&&t.maxTouchPoints>1)&&!window.MSStream},ua=function(){return rd("iPad")},vy=function(){return rd("iPhone")},Cy=function(){return rd("iPod")},by=function(t){return O1(t)};function yy(e){var t=e||Ob,n=t.device,r=t.browser,o=t.os,a=t.engine,s=t.ua;return{isSmartTV:Nb(n),isConsole:Wb(n),isWearable:Qb(n),isEmbedded:jb(n),isMobileSafari:iy(r)||ua(),isChromium:ny(r),isMobile:Hb(n)||ua(),isMobileOnly:Db(n),isTablet:Vb(n)||ua(),isBrowser:w6(n),isDesktop:w6(n),isAndroid:Yb(o),isWinPhone:Zb(o),isIOS:Xb(o)||ua(),isChrome:ey(r),isFirefox:ty(r),isSafari:oy(r),isOpera:ay(r),isIE:ly(r),osVersion:_b(o),osName:$b(o),fullBrowserVersion:uy(r),browserVersion:dy(r),browserName:hy(r),mobileVendor:Ub(n),mobileModel:Gb(n),engineName:fy(a),engineVersion:py(a),getUA:by(s),isEdge:I6(r)||ws(s),isYandex:ry(r),deviceType:Kb(n),isIOS13:my(),isIPad13:ua(),isIPhone13:vy(),isIPod13:Cy(),isElectron:gy(),isEdgeChromium:ws(s),isLegacyEdge:I6(r)&&!ws(s),isWindows:qb(o),isMacOs:Jb(o),isMIUI:sy(r),isSamsungBrowser:cy(r)}}var wy=Nb(y2),Iy=Wb(y2),Ey=Qb(y2),e1e=jb(y2),t1e=iy(ho)||ua(),n1e=ny(ho),E6=Hb(y2)||ua(),Sy=Db(y2),Ay=Vb(y2)||ua(),xy=w6(y2),r1e=w6(y2),Fy=Yb(Kl),My=Zb(Kl),zy=Xb(Kl)||ua(),o1e=ey(ho),i1e=ty(ho),a1e=oy(ho),l1e=ay(ho),ky=ly(ho),s1e=_b(Kl),c1e=$b(Kl),u1e=uy(ho),d1e=dy(ho),h1e=hy(ho),f1e=Ub(y2),p1e=Gb(y2),g1e=fy(_u),m1e=py(_u),v1e=by(A4),C1e=I6(ho)||ws(A4),b1e=ry(ho),y1e=Kb(y2),w1e=my(),I1e=ua(),E1e=vy(),S1e=Cy(),A1e=gy(),x1e=ws(A4),F1e=I6(ho)&&!ws(A4),M1e=qb(Kl),z1e=Jb(Kl),k1e=sy(ho),P1e=cy(ho),O1e=function(t){if(!t||typeof t!="string"){console.error("No valid user agent string was provided");return}var n=x4(t),r=n.device,o=n.browser,a=n.os,s=n.engine,u=n.ua;return yy({device:r,browser:o,os:a,engine:s,ua:u})},B1e=function(t){var n=t.renderWithFragment,r=t.children,o=Z2(t,["renderWithFragment","children"]);return Fy?n?Vn.createElement(uo.Fragment,null,r):Vn.createElement("div",o,r):null},L1e=function(t){var n=t.renderWithFragment,r=t.children,o=Z2(t,["renderWithFragment","children"]);return xy?n?Vn.createElement(uo.Fragment,null,r):Vn.createElement("div",o,r):null},T1e=function(t){var n=t.renderWithFragment,r=t.children,o=Z2(t,["renderWithFragment","children"]);return ky?n?Vn.createElement(uo.Fragment,null,r):Vn.createElement("div",o,r):null},R1e=function(t){var n=t.renderWithFragment,r=t.children,o=Z2(t,["renderWithFragment","children"]);return zy?n?Vn.createElement(uo.Fragment,null,r):Vn.createElement("div",o,r):null},D1e=function(t){var n=t.renderWithFragment,r=t.children,o=Z2(t,["renderWithFragment","children"]);return E6?n?Vn.createElement(uo.Fragment,null,r):Vn.createElement("div",o,r):null},V1e=function(t){var n=t.renderWithFragment,r=t.children,o=Z2(t,["renderWithFragment","children"]);return Ay?n?Vn.createElement(uo.Fragment,null,r):Vn.createElement("div",o,r):null},H1e=function(t){var n=t.renderWithFragment,r=t.children,o=Z2(t,["renderWithFragment","children"]);return My?n?Vn.createElement(uo.Fragment,null,r):Vn.createElement("div",o,r):null},N1e=function(t){var n=t.renderWithFragment,r=t.children;t.viewClassName,t.style;var o=Z2(t,["renderWithFragment","children","viewClassName","style"]);return Sy?n?Vn.createElement(uo.Fragment,null,r):Vn.createElement("div",o,r):null},Q1e=function(t){var n=t.renderWithFragment,r=t.children,o=Z2(t,["renderWithFragment","children"]);return wy?n?Vn.createElement(uo.Fragment,null,r):Vn.createElement("div",o,r):null},W1e=function(t){var n=t.renderWithFragment,r=t.children,o=Z2(t,["renderWithFragment","children"]);return Iy?n?Vn.createElement(uo.Fragment,null,r):Vn.createElement("div",o,r):null},j1e=function(t){var n=t.renderWithFragment,r=t.children,o=Z2(t,["renderWithFragment","children"]);return Ey?n?Vn.createElement(uo.Fragment,null,r):Vn.createElement("div",o,r):null},U1e=function(t){var n=t.renderWithFragment,r=t.children;t.viewClassName,t.style;var o=t.condition,a=Z2(t,["renderWithFragment","children","viewClassName","style","condition"]);return o?n?Vn.createElement(uo.Fragment,null,r):Vn.createElement("div",a,r):null};function G1e(e){return function(t){Dte(n,t);function n(r){var o;return Lte(this,n),o=Hte(this,ed(n).call(this,r)),o.isEventListenerAdded=!1,o.handleOrientationChange=o.handleOrientationChange.bind(y6(o)),o.onOrientationChange=o.onOrientationChange.bind(y6(o)),o.onPageLoad=o.onPageLoad.bind(y6(o)),o.state={isLandscape:!1,isPortrait:!1},o}return Tte(n,[{key:"handleOrientationChange",value:function(){this.isEventListenerAdded||(this.isEventListenerAdded=!0);var o=window.innerWidth>window.innerHeight?90:0;this.setState({isPortrait:o===0,isLandscape:o===90})}},{key:"onOrientationChange",value:function(){this.handleOrientationChange()}},{key:"onPageLoad",value:function(){this.handleOrientationChange()}},{key:"componentDidMount",value:function(){(typeof window=="undefined"?"undefined":F4(window))!==void 0&&E6&&(this.isEventListenerAdded?window.removeEventListener("load",this.onPageLoad,!1):(this.handleOrientationChange(),window.addEventListener("load",this.onPageLoad,!1)),window.addEventListener("resize",this.onOrientationChange,!1))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.onOrientationChange,!1)}},{key:"render",value:function(){return Vn.createElement(e,$u({},this.props,{isLandscape:this.state.isLandscape,isPortrait:this.state.isPortrait}))}}]),n}(Vn.Component)}function K1e(){var e=uo.useState(function(){var a=window.innerWidth>window.innerHeight?90:0;return{isPortrait:a===0,isLandscape:a===90,orientation:a===0?"portrait":"landscape"}}),t=Nte(e,2),n=t[0],r=t[1],o=uo.useCallback(function(){var a=window.innerWidth>window.innerHeight?90:0,s={isPortrait:a===0,isLandscape:a===90,orientation:a===0?"portrait":"landscape"};n.orientation!==s.orientation&&r(s)},[n.orientation]);return uo.useEffect(function(){return(typeof window=="undefined"?"undefined":F4(window))!==void 0&&E6&&(o(),window.addEventListener("load",o,!1),window.addEventListener("resize",o,!1)),function(){window.removeEventListener("resize",o,!1),window.removeEventListener("load",o,!1)}},[o]),n}function Py(e){var t=e||window.navigator.userAgent;return x4(t)}function Y1e(e){var t=e||window.navigator.userAgent,n=Py(t),r=yy(n);return[r,n]}l1.AndroidView=B1e,l1.BrowserTypes=Ko,l1.BrowserView=L1e,l1.ConsoleView=W1e,l1.CustomView=U1e,l1.IEView=T1e,l1.IOSView=R1e,l1.MobileOnlyView=N1e,l1.MobileView=D1e,l1.OsTypes=ys,l1.SmartTVView=Q1e,l1.TabletView=V1e,l1.WearableView=j1e,l1.WinPhoneView=H1e,l1.browserName=h1e,l1.browserVersion=d1e,l1.deviceDetect=$te,l1.deviceType=y1e,l1.engineName=g1e,l1.engineVersion=m1e,l1.fullBrowserVersion=u1e,l1.getSelectorsByUserAgent=O1e,l1.getUA=v1e,l1.isAndroid=Fy,l1.isBrowser=xy,l1.isChrome=o1e,l1.isChromium=n1e,l1.isConsole=Iy,l1.isDesktop=r1e,l1.isEdge=C1e,l1.isEdgeChromium=x1e,l1.isElectron=A1e,l1.isEmbedded=e1e,l1.isFirefox=i1e,l1.isIE=ky,l1.isIOS=zy,l1.isIOS13=w1e,l1.isIPad13=I1e,l1.isIPhone13=E1e,l1.isIPod13=S1e,l1.isLegacyEdge=F1e,l1.isMIUI=k1e,l1.isMacOs=z1e;var q1e=l1.isMobile=E6;l1.isMobileOnly=Sy,l1.isMobileSafari=t1e,l1.isOpera=l1e,l1.isSafari=a1e,l1.isSamsungBrowser=P1e,l1.isSmartTV=wy,l1.isTablet=Ay,l1.isWearable=Ey,l1.isWinPhone=My,l1.isWindows=M1e,l1.isYandex=b1e,l1.mobileModel=p1e,l1.mobileVendor=f1e,l1.osName=c1e,l1.osVersion=s1e,l1.parseUserAgent=x4,l1.setUserAgent=Yte,l1.useDeviceData=Py,l1.useDeviceSelectors=Y1e,l1.useMobileOrientation=K1e,l1.withOrientationChange=G1e;function Oy({mode:e="light",clientId:t,eventId:n=null,source:r="component",authorize:o,inProduction:a="prd",countryCodeAllowed:s=null,faceMatch:u=null,dataLiveness:h,validateVpn:g=!1,successMessage:d}){const f=Ze.useRef(null),{status:p,isLoading:C,listener:v,clearState:y,message:E,countryCode:w,setToken:x,data:I,similarity:A}=Mte(t,n,r,a,s,u,h,g,d);return Ze.useEffect(()=>{const V=document.getElementsByTagName("face-liveness")[0];if(V){const{primaryColor:F,primaryColorHover:R,fontFamily:P,fontSize:O}=zte(f.current);V.settings={locale:"es",videoRecording:!0,closeDisabled:!0,workerPath:"https://regula-sandbox.globalbridgeconnections.com.py/face-sdk",customization:{fontFamily:P,fontSize:O,onboardingScreenStartButtonBackground:F,onboardingScreenStartButtonBackgroundHover:R,retryScreenRetryButtonBackground:F,retryScreenRetryButtonBackgroundHover:F,cameraScreenSectorActive:F,cameraScreenStrokeNormal:F,processingScreenProgress:F,cameraScreenSectorTarget:R}},V.addEventListener("face-liveness",v),o().then(N=>x(N))}},[]),i("div",{ref:f,className:`${I1["kit-gbc"]} ${I1["liveness-container"]} ${I1[e]} ${p==="NOT_VERIFY"&&I1.error}`,children:_("div",{id:"liveness-check",children:[i(N3,{className:"kit-gbc-toastify-container",position:"top-center",autoClose:5e3,hideProgressBar:!1,newestOnTop:!1,closeOnClick:!0,rtl:!1,pauseOnFocusLoss:!0,draggable:!0,pauseOnHover:!0}),C||s!==null&&!w?i(L8,{}):null,Rr(p)?Rr(I)&&u||u===null?i("face-liveness",{className:I1.liveness}):i(c1,{className:`${I1["box-liveness"]} ${q1e&&I1.responsive}`,children:A===0?_(c1,{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[i(kte,{}),i(Rn,{variant:"caption",style:{fontSize:"0.875em",paddingTop:"0.875em",color:"#000000"},children:"Comparando rostro..."})]}):i(Fg,{message:E})}):_("div",{className:I1.sub,children:[E4(p)&&i(f6,{action:y}),i("h4",{children:"Verificaci\xF3n liveness"}),i(I4,{status:p,message:E})]})]})})}Oy.propTypes={mode:jt.exports.PropTypes.string,clientId:jt.exports.PropTypes.string.isRequired,authorize:jt.exports.PropTypes.func.isRequired,inProduction:jt.exports.PropTypes.string,countryCodeAllowed:jt.exports.PropTypes.array,eventId:jt.exports.PropTypes.string,source:jt.exports.PropTypes.string,faceMatch:jt.exports.PropTypes.string,dataLiveness:jt.exports.PropTypes.func.isRequired,validateVpn:jt.exports.PropTypes.bool,successMessage:jt.exports.PropTypes.string};const J1e=()=>_("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 486.3 486.3",children:[i("path",{d:"M395.5,135.8c-5.2-30.9-20.5-59.1-43.9-80.5c-26-23.8-59.8-36.9-95-36.9c-27.2,0-53.7,7.8-76.4,22.5\r c-18.9,12.2-34.6,28.7-45.7,48.1c-4.8-0.9-9.8-1.4-14.8-1.4c-42.5,0-77.1,34.6-77.1,77.1c0,5.5,0.6,10.8,1.6,16\r C16.7,200.7,0,232.9,0,267.2c0,27.7,10.3,54.6,29.1,75.9c19.3,21.8,44.8,34.7,72,36.2c0.3,0,0.5,0,0.8,0h86\r c7.5,0,13.5-6,13.5-13.5s-6-13.5-13.5-13.5h-85.6C61.4,349.8,27,310.9,27,267.1c0-28.3,15.2-54.7,39.7-69\r c5.7-3.3,8.1-10.2,5.9-16.4c-2-5.4-3-11.1-3-17.2c0-27.6,22.5-50.1,50.1-50.1c5.9,0,11.7,1,17.1,3c6.6,2.4,13.9-0.6,16.9-6.9\r c18.7-39.7,59.1-65.3,103-65.3c59,0,107.7,44.2,113.3,102.8c0.6,6.1,5.2,11,11.2,12c44.5,7.6,78.1,48.7,78.1,95.6\r c0,49.7-39.1,92.9-87.3,96.6h-73.7c-7.5,0-13.5,6-13.5,13.5s6,13.5,13.5,13.5h74.2c0.3,0,0.6,0,1,0c30.5-2.2,59-16.2,80.2-39.6\r c21.1-23.2,32.6-53,32.6-84C486.2,199.5,447.9,149.6,395.5,135.8z"}),i("path",{d:"M324.2,280c5.3-5.3,5.3-13.8,0-19.1l-71.5-71.5c-2.5-2.5-6-4-9.5-4s-7,1.4-9.5,4l-71.5,71.5c-5.3,5.3-5.3,13.8,0,19.1\r c2.6,2.6,6.1,4,9.5,4s6.9-1.3,9.5-4l48.5-48.5v222.9c0,7.5,6,13.5,13.5,13.5s13.5-6,13.5-13.5V231.5l48.5,48.5\r C310.4,285.3,318.9,285.3,324.2,280z"})]});function By({message:e,id:t,subtitle:n,className:r}){return i("div",{className:`wrap-upload-animation ${r}`,children:_("div",{className:"first-animation",children:[i(J1e,{}),i("p",{className:"title",children:e}),i("p",{className:"subtitle",children:n})]})},t)}By.propTypes={message:jt.exports.PropTypes.string,id:jt.exports.PropTypes.string,subtitle:jt.exports.PropTypes.string,className:jt.exports.PropTypes.string};var Ly={exports:{}};(function(e){(function(t,n){e.exports?e.exports=n():t.CSV=n()})(zl,function(){var t=["|","^"],n=[",",";"," ","|","^"],r=[`\r
1425
1425
  `,"\r",`
1426
1426
  `];function o(I){var A=typeof I;return A==="function"||A==="object"&&!!I}var a=Array.isArray||function(I){return toString.call(I)==="[object Array]"};function s(I){return typeof I=="string"}function u(I){return!isNaN(Number(I))}function h(I){return I==!1||I==!0}function g(I){return I==null}function d(I){return I!=null}function f(I,A){return d(I)?I:A}function p(I,A){for(var V=0,F=I.length;V<F&&A(I[V],V)!==!1;V+=1);}function C(I){return I.replace(/"/g,'\\"')}function v(I){return"attrs["+I+"]"}function y(I,A){return u(I)?"Number("+v(A)+")":h(I)?"Boolean("+v(A)+" == true)":"String("+v(A)+")"}function E(I,A,V,F){var R=[];return arguments.length==3?(A?a(A)?p(V,function(P,O){s(A[O])?A[O]=A[O].toLowerCase():I[A[O]]=A[O],R.push("deserialize[cast["+O+"]]("+v(O)+")")}):p(V,function(P,O){R.push(y(P,O))}):p(V,function(P,O){R.push(v(O))}),R="return ["+R.join(",")+"]"):(A?a(A)?p(V,function(P,O){s(A[O])?A[O]=A[O].toLowerCase():I[A[O]]=A[O],R.push('"'+C(F[O])+'": deserialize[cast['+O+"]]("+v(O)+")")}):p(V,function(P,O){R.push('"'+C(F[O])+'": '+y(P,O))}):p(V,function(P,O){R.push('"'+C(F[O])+'": '+v(O))}),R="return {"+R.join(",")+"}"),new Function("attrs","deserialize","cast",R)}function w(I,A){var V=0,F;return p(A,function(R){var P=R,O;t.indexOf(R)!=-1&&(P="\\"+P),O=I.match(new RegExp(P,"g")),O&&O.length>V&&(V=O.length,F=R)}),F||A[0]}var x=function(){function I(R,P){if(P||(P={}),a(R))this.mode="encode";else if(s(R))this.mode="parse";else throw new Error("Incompatible format!");this.data=R,this.options={header:f(P.header,!1),cast:f(P.cast,!0)};var O=P.lineDelimiter||P.line,N=P.cellDelimiter||P.delimiter;this.isParser()?(this.options.lineDelimiter=O||w(this.data,r),this.options.cellDelimiter=N||w(this.data,n),this.data=V(this.data,this.options.lineDelimiter)):this.isEncoder()&&(this.options.lineDelimiter=O||`\r
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gbc-kyc-kit",
3
- "version": "3.3.5",
3
+ "version": "3.3.7",
4
4
  "description": "Componentes para el desarrollo de un Onboarding",
5
5
  "license": "MIT",
6
6
  "author": "Global Bridge Connections",