1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`2644cce6aa245e75cea74934253db57b8faadf81`};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`c578143d-e5f9-4584-a193-8690d02b22bc`,e._sentryDebugIdIdentifier=`sentry-dbid-c578143d-e5f9-4584-a193-8690d02b22bc`)}catch{}})();import{Ai as e,Fi as t,Gr as n,Nr as r,Xr as i,Yn as a,_i as o,ar as s,cr as c,dr as l,fr as u,gr as d,hr as f,li as p,lr as m,ni as h,ur as g,xr as _}from"./Modal-DZRxhB1w.js";import{n as v}from"./translateutils-DePiQUAW.js";import{t as y}from"./BackButton-BEY1pSoI.js";import{t as b}from"./Overlay-DtiDxN92.js";import{t as x}from"./SecondaryButton-DD4_YtqT.js";import{t as S}from"./DangerButton-ChEzFhs6.js";import{t as C}from"./BackgroundImageCard-DRq7TKbq.js";o(),_(),i(),a();var w={class:`!tw-mb-0 tw-inline-flex tw-h-full tw-w-full tw-flex-col tw-justify-start tw-p-1 tw-pt-4 tw-text-center tw-text-white tw-text-shadow-text`},T={class:`tw-mb-4 tw-capitalize`},E={key:0,class:`tw-text-[min(0.875rem,3.6svw)] tw-leading-5`},D={class:`tw-absolute tw-left-0 tw-right-0 tw-top-1/2 tw-mx-auto tw-max-w-[700px] -tw-translate-y-1/2 tw-px-4 tw-text-center tw-font-normal`},O={class:`tw-relative -tw-mt-12 tw-text-center`},k={class:`text-uppercase mb-4`},A={class:`tw-text-center`},j={key:0,class:`tw-text-center`},M={class:`tw-mt-16 tw-flex tw-justify-center tw-gap-4`},N={__name:`UserImageInput`,props:{image:{type:Object},allowEdit:{type:Boolean,default:!1},allowRemove:{type:Boolean,default:!0},showGradientOverlay:{type:Boolean,default:!1}},emits:[`remove`,`edit`,`contest`],setup(i,{emit:a}){let o=i,_=h(!1),N=a,P=c(()=>[`preprocessing`,`pending`,`pending_verification`,`rejected`].includes(o.image.state)),F=c(()=>{let e=``;if(o.image.state!==`approved`)return[`preprocessing`,`pending`,`pending_verification`].includes(o.image.state)&&(e+=` tw-bg-approval-green/50`),o.image.state===`rejected`&&(e+=` tw-bg-rejection-red/50`),e}),I=c(()=>[`preprocessing`,`pending`,`pending_verification`].includes(o.image.state)?v(`Pending`):o.image.state===`rejected`?v(`Rejected`):o.image.state),L={preprocessing:v(`Typically approved in less than 24 hours`),pending:v(`Typically approved in less than 24 hours`),pending_verification:v(`Typically approved in less than 24 hours`),rejected:v(`Rejected`)};function R(){N(`contest`,o.image),_.value=!1}return(a,c)=>(r(),g(C,{image:i.image.image??i.image.overview,"show-gradient-overlay":!P.value&&i.showGradientOverlay},{default:n(()=>[P.value?(r(),u(`div`,{key:0,class:e([`tw-absolute tw-inset-0 tw-flex tw-h-full tw-w-full tw-flex-col tw-items-center tw-justify-center tw-rounded-lg`,F.value])},[m(`p`,w,[m(`span`,T,t(I.value),1),o.image.state===`rejected`?(r(),u(`button`,{key:1,class:`tw-z-10 tw-bg-transparent tw-py-3 tw-font-bold tw-text-white`,onClickCapture:c[0]||=e=>_.value=!0},t(p(v)(`More info`)),33)):(r(),u(`span`,E,t(L[o.image.state]),1))])],2)):l(``,!0),m(`div`,{onClick:c[2]||=e=>i.allowEdit&&N(`edit`,i.image),class:e([{"tw-bg-gradient-to-t tw-from-black/80 tw-from-0% tw-via-transparent tw-via-25% tw-to-transparent tw-to-100%":i.allowRemove},`tw-absolute tw-left-0 tw-top-0 tw-h-full tw-w-full tw-rounded-b-lg`])},[i.allowRemove?(r(),u(`button`,{key:0,onClick:c[1]||=s(e=>N(`remove`,i.image),[`stop`]),class:`tw-absolute tw-bottom-2 tw-left-0 tw-right-0 tw-w-full tw-bg-transparent tw-pt-2 tw-text-white tw-text-shadow-text`},t(p(v)(`Remove`)),1)):l(``,!0)],2),i.image.state===`rejected`?(r(),g(b,{key:1,modelValue:_.value,"onUpdate:modelValue":c[5]||=e=>_.value=e,"z-index-class":`tw-z-[1001]`,class:`tw-flex tw-flex-col tw-justify-center`},{default:n(()=>[m(`div`,D,[m(`div`,O,[d(y,{onClick:c[3]||=e=>_.value=!1,class:`tw-absolute !tw-left-0 !tw-top-0`}),m(`h4`,k,t(p(v)(`Photo rejection`)),1)]),m(`p`,A,t(i.image.contestable_rejection?p(v)(`Our automatic system detected the following issues with this photo:`):p(v)(`This photo was rejected for the following reason:`)),1),m(`ul`,null,[m(`li`,null,t(i.image.rejection_notice?p(v)(i.image.rejection_notice):p(v)(`Unknown reason`)),1)]),i.image.contestable_rejection?(r(),u(`p`,j,t(p(v)(`If you disagree with this assessment and believe we've made an error, you may submit the photo again for manual review`)),1)):l(``,!0),m(`div`,M,[d(x,{class:`tw-max-w-[50%] tw-flex-1`,onClick:c[4]||=e=>_.value=!1},{default:n(()=>[f(t(p(v)(`Close`)),1)]),_:1}),i.image.contestable_rejection?(r(),g(S,{key:0,onClick:s(R,[`stop`]),class:`tw-flex-1`},{default:n(()=>[f(t(p(v)(`Contest`)),1)]),_:1})):l(``,!0)])])]),_:1},8,[`modelValue`])):l(``,!0)]),_:1},8,[`image`,`show-gradient-overlay`]))}};export{N as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.