1(function(){try{var g=typeof globalThis!=="undefined"?globalThis:typeof global!=="undefined"?global:typeof window!=="undefined"?window:typeof self!=="undefined"?self:{};g["__faroBundleId_Exchange-UI"]="2cb13e351f962f9865a92bac3916343eb2dbeef8"}catch(l){}})();import{o as e}from"./rolldown-runtime-CMxvf4Kt.js";import{j as t,o as n}from"./apollo-Cf1nTsKG.js";import{ht as r,jt as i,mt as a,nt as o,rt as s,tt as c}from"./mui-material-CffuPoxK.js";import{a as l}from"./misc-react-ChPEm5rr.js";import{Ht as u,ot as d}from"./mui-icons-Bi_So2ZS.js";import{Ct as f,Gn as p,M as m,Vn as h,Wn as g,an as _,rn as v,tn as y,vt as b}from"./SharedUI-X0VowGnd.js";import{n as x,t as S}from"./forms-CjrQTMj4.js";var C=e(t()),w=l();function T({children:e,surveyConfig:t,onSkip:n,errorMessage:i,loading:s=!1,skipLabel:l=`Cancel`}){return(0,w.jsx)(r,{ref:(0,C.useRef)(null),sx:{overflowY:`auto`},children:(0,w.jsx)(S,{children:(0,w.jsxs)(c,{sx:{pb:4},children:[e,i&&(0,w.jsx)(b,{message:i}),(0,w.jsxs)(o,{children:[(0,w.jsx)(a,{disabled:s,loading:s,type:`submit`,children:`Submit`}),(0,w.jsx)(m,{onClick:n,disabled:s,children:l})]}),t.disclosureText&&(0,w.jsxs)(f,{variant:`body2`,color:`text.secondary`,display:`flex`,justifyContent:`center`,mt:2,children:[(0,w.jsx)(d,{style:{marginRight:8}}),t.disclosureText]})]})})})}var E=`/assets/SurveyLogo-DhNEJfo5.svg`;function D({children:e,open:t,surveyConfig:n,onClose:a,onSkip:o,onSubmit:c,errorMessage:l,loading:d=!1,skipLabel:p=`Cancel`,disableBackdrop:m=!1}){return(0,w.jsx)(x,{initialValues:n.initialValues,onSubmit:c,validationSchema:n.validationSchema,children:(0,w.jsxs)(s,{fullWidth:!0,open:t,hideBackdrop:m,sx:{"& .MuiDialog-paper":{padding:0,overflow:`hidden`,maxWidth:`700px`}},"aria-labelledby":`enhanced-profile-dialog-title`,"aria-describedby":`enhanced-profile-dialog-description`,children:[(0,w.jsxs)(r,{sx:{bgcolor:`primary.main`,color:`primary.contrastText`,p:4,pb:1,display:`flex`},children:[(0,w.jsxs)(r,{children:[(0,w.jsx)(f,{id:`enhanced-profile-dialog-title`,variant:`h5`,fontWeight:`fontWeightMedium`,component:`h5`,mb:2,sx:{whiteSpace:`pre-line`},children:n.title}),(0,w.jsx)(f,{id:`enhanced-profile-dialog-description`,variant:`h6`,component:`h6`,fontWeight:`fontWeightRegular`,lineHeight:1.4,sx:{fontSize:`1.15rem`,whiteSpace:`pre-line`},children:n.description})]}),(0,w.jsx)(r,{mx:3,display:`flex`,children:(0,w.jsx)(`img`,{src:E,alt:`survey icon`,width:125})})]}),a&&(0,w.jsx)(i,{"aria-label":`close`,onClick:a,sx:{position:`absolute`,right:`1rem`,top:`1rem`,color:`primary.contrastText`,fontSize:`1.25rem`},children:(0,w.jsx)(u,{})}),(0,w.jsx)(T,{errorMessage:l,loading:d,skipLabel:p,surveyConfig:n,onSkip:o,children:e})]})})}function O({currentIndex:e,totalFeatures:t,onIndexChange:n}){let a=e===0,o=e===t-1;return t<=1?null:(0,w.jsxs)(r,{sx:{alignItems:`center`,backdropFilter:`blur(4px)`,backgroundColor:`rgba(18, 18, 18, 0.3)`,borderRadius:`50px`,bottom:0,color:`white`,display:`flex`,gap:3,left:`50%`,padding:.5,position:`absolute`,transform:`translateX(-50%) translateY(125%)`},children:[(0,w.jsx)(i,{onClick:()=>{a||n(e-1)},disabled:a,"aria-label":`previous feature`,sx:{color:`white`,fontSize:`2.5rem`,opacity:a?.3:1,p:.5,"&:hover":{bgcolor:`rgba(255, 255, 255, 0.1)`},"&.Mui-disabled":{color:`white`}},children:(0,w.jsx)(p,{fontSize:`medium`})}),(0,w.jsxs)(f,{color:`white`,component:`span`,fontWeight:`normal`,px:2,sx:{whiteSpace:`nowrap`},variant:`body1`,children:[e+1,` of `,t]}),(0,w.jsx)(i,{onClick:()=>{o||n(e+1)},disabled:o,"aria-label":`next feature`,sx:{color:`white`,fontSize:`2.5rem`,opacity:o?.3:1,p:.5,"&:hover":{bgcolor:`rgba(255, 255, 255, 0.1)`},"&.Mui-disabled":{color:`white`}},children:(0,w.jsx)(g,{fontSize:`medium`})})]})}function k({featureConfigs:e,open:t,onClose:n,disableBackdrop:a=!1}){let[o,l]=(0,C.useState)(0),[u,d]=(0,C.useState)(0),[m,b]=(0,C.useState)(`right`),x=e[o],S=e.length,T=x?.leftContent,E=x?.screenshots,D=E?.length??0,k=E?.[u],A=D>1,j=e=>{b(e),d(t=>e===`left`?t===0?D-1:t-1:t===D-1?0:t+1)};return x?(0,w.jsxs)(s,{fullWidth:!0,maxWidth:`md`,open:t,onClose:n,scroll:`body`,hideBackdrop:a,sx:{"& .MuiDialog-paper":{borderRadius:6,maxWidth:1100,overflow:`visible`,padding:0,position:`relative`}},"aria-labelledby":`enhanced-profile-announcement-title`,"aria-describedby":`enhanced-profile-announcement-description`,children:[(0,w.jsxs)(r,{sx:{overflow:`hidden`,borderRadius:6},children:[(0,w.jsxs)(r,{sx:{bgcolor:`primary.main`,color:`primary.contrastText`,pb:6,position:`relative`,pt:5,px:4,textAlign:`center`},children:[(0,w.jsx)(f,{id:`enhanced-profile-announcement-title`,component:`h2`,mb:1,sx:e=>({...e.typography.h5,fontWeight:e.typography.fontWeightSemiBold,[e.breakpoints.up(`sm`)]:{...e.typography.h4,fontWeight:e.typography.fontWeightSemiBold}}),children:x.title}),(0,w.jsx)(f,{id:`enhanced-profile-announcement-description`,component:`p`,color:_.tint,sx:e=>({...e.typography.body1,lineHeight:`110%`,[e.breakpoints.up(`sm`)]:{...e.typography.h6,fontWeight:e.typography.fontWeightRegular,lineHeight:`110%`}}),children:x.description}),(0,w.jsx)(i,{"aria-label":`close`,onClick:n,sx:{color:`primary.contrastText`,fontSize:{xs:`1.75rem`,sm:`2rem`},position:`absolute`,right:`.5rem`,top:`.5rem`},children:(0,w.jsx)(h,{})})]}),(0,w.jsx)(r,{children:(0,w.jsx)(c,{sx:{px:{xs:4,sm:6},py:4,overflow:`visible`},children:(0,w.jsxs)(r,{sx:{alignItems:`flex-start`,display:`flex`,flexDirection:{xs:`column`,md:`row`},gap:{xs:4,md:6}},children:[T&&(0,w.jsx)(r,{sx:{flex:1},children:(0,w.jsx)(T,{})}
1),k&&(0,w.jsxs)(r,{sx:{alignItems:`center`,display:`flex`,flexDirection:`column`,gap:2,order:{xs:-1,md:0},position:`relative`,pr:{xs:0,md:2},width:{xs:`100%`,md:`auto`},zIndex:1},children:[(0,w.jsxs)(r,{sx:{alignItems:`center`,display:`flex`,height:{xs:`auto`,sm:`299px`},position:`relative`,width:{xs:`100%`,sm:`477px`}},children:[A&&(0,w.jsx)(i,{onClick:()=>j(`left`),"aria-label":`previous screenshot`,sx:{position:`absolute`,left:0,transform:{xs:`translateX(-32px)`,sm:`translateX(-42px)`},color:`primary.main`,zIndex:2},children:(0,w.jsx)(p,{fontSize:`medium`})}),(0,w.jsx)(r,{component:`img`,src:k.src,alt:k.caption,sx:{aspectRatio:{xs:`1/1`,sm:`auto`},border:e=>`1px solid ${e.palette.grey[500]}`,borderRadius:6,height:`100%`,objectFit:`cover`,width:`100%`,animation:`slideIn${m===`right`?`Right`:`Left`} 0.4s ease-out`,"@keyframes slideInRight":{"0%":{opacity:0,transform:`translateX(30px)`},"100%":{opacity:1,transform:`translateX(0)`}},"@keyframes slideInLeft":{"0%":{opacity:0,transform:`translateX(-30px)`},"100%":{opacity:1,transform:`translateX(0)`}}}},u),A&&(0,w.jsx)(i,{onClick:()=>j(`right`),"aria-label":`next screenshot`,sx:{position:`absolute`,right:0,transform:{xs:`translateX(32px)`,sm:`translateX(42px)`},color:`primary.main`,zIndex:2},children:(0,w.jsx)(g,{fontSize:`medium`})})]}),(0,w.jsx)(f,{align:`center`,color:y[7],sx:{bgcolor:{xs:v.marble,sm:`transparent`},borderRadius:6,maxWidth:{xs:`100%`,sm:`477px`},px:{xs:2,sm:0},py:{xs:1.5,sm:0},typography:{xs:`body2`,sm:`body1`},animation:`fadeInCaption 0.5s ease-out`,"@keyframes fadeInCaption":{"0%":{opacity:0,transform:`translateY(8px)`},"100%":{opacity:1,transform:`translateY(0)`}}},children:k.caption},`caption-${u}`)]})]})})}),x.footer&&(0,w.jsx)(r,{sx:{bgcolor:v.marble,px:{xs:4,sm:8},py:4},children:x.footer(n)})]}),(0,w.jsx)(O,{currentIndex:o,totalFeatures:S,onIndexChange:l})]}):null}function A(e){let[t,{loading:r,error:i,data:a}]=n(e);return{submit:async(e,n)=>t({variables:{supplierId:e,input:n}}).then(()=>!0).catch(e=>{throw console.error(`Error submitting survey:`,e),Error(`Failed to submit survey: ${e instanceof Error?e.message:`Unknown error`}`)}),loading:r,error:i,data:a}}export{k as n,D as r,A as t}; 2//# sourceMappingURL=useSurveySubmit-CWV8NuKM.js.map
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.