1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="879635c0-581e-4e32-b37f-e5b5b9e59655",e._sentryDebugIdIdentifier="sentry-dbid-879635c0-581e-4e32-b37f-e5b5b9e59655")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9689],{2297:(e,t,n)=>{n.d(t,{u:()=>l});let l=(0,n(14232).createContext)(null)},47298:(e,t,n)=>{n.d(t,{Y:()=>r});var l=n(14232),a=n(2297);function r(){let e=(0,l.useContext)(a.u);if(!e)throw Error("useSurvey must be used within a SurveyProvider");return e}},59442:(e,t,n)=>{n.d(t,{b:()=>m});var l=n(38012),a=n(54103),r=n(25547),i=n(69830),u=n(27236),o=n(33130),s=n.n(o);let d=e=>{var t,n,l,a;let{surveyPageComponent:r}=e;switch(r.type){case"select":return null==(l=r.fields)||null==(n=l[0])||null==(t=n.options)?void 0:t.map(e=>e.value);case"checkbox":case"radiogroup":return(null==(a=r.fields)?void 0:a.map(e=>{var t,n,l,a,i;return"checkbox"===r.type?null!=(n=null!=(t=e.name)?t:e.value)?n:"":null!=(i=null!=(a=null!=(l=e.label)?l:e.value)?a:e.name)?i:""}))||void 0;default:return}};s().add_operation("filterLength",(e,t)=>Array.isArray(e)?e.filter(e=>e!==t).length:0);var c=new WeakMap,p=new WeakMap,g=new WeakMap,f=new WeakMap,v=new WeakSet,h=new WeakSet;class m{getPageSchema(e){return(0,l._)(this,p).pages[e]}transformToSurveySubmission(e){var t,n,a,r,u,o;let{currentPage:s,currentPageNumber:p,currentPageResults:g,surveyData:v}=e,m={},y={...v},x=null!=(t=(0,l._)(this,f).get(s.key))?t:[];for(let e in g){let t=x.find(t=>t.name===e);if(t){let{type:a}=t,r=(null==(n=(0,l._)(this,c))?void 0:n[a])?(0,l._)(this,c)[a]({page:s,formValues:{[e]:g[e]},name:e,previousValues:y[e]}):g[e];y[e]=r}}if(0===Object.keys(g).length)for(let e of x){if(!e.name||"component"===e.type)continue;let{name:t,type:n}=e,r=(null==(a=(0,l._)(this,c))?void 0:a[n])?(0,l._)(this,c)[n]({formValues:{},name:t,page:s,previousValues:y[t]}):void 0;y[t]=r}for(let e in y){let{component:t,page:n,position:l}=(0,i._)(this,h,b).call(this,e);if(!t||!n)continue;let a={title:null!=(o=null!=(u=null==(r=t.questionDataOverrides)?void 0:r.title)?u:n.title)?o:t.name,position:l,response:{type:t.type,value:y[e],choices:d({surveyPageComponent:t})}};t.internalOnly&&(a.internalOnly=!0),m[e]=a}return{questionData:m,rawSurveyData:{currentPageKey:s.key,currentPageNo:p,data:y}}}getNextPageNumber(e){let{currentPageNumber:t,results:n,variables:a}=e,r=t+1;for(;r<(0,l._)(this,p).pages.length;++r){let e=(0,l._)(this,p).pages[r].renderIf;if(!e||s().apply(e,{...a,...n}))break}return r}getPageNumberByKey(e){if(!e)return 0;for(let t=0;t<(0,l._)(this,p).pages.length;t++)if((0,l._)(this,p).pages[t].key===e)return t;return 0}constructor(e,t){(0,u._)(this,v),(0,u._)(this,h),(0,a._)(this,c,{writable:!0,value:void 0}),(0,a._)(this,p,{writable:!0,value:void 0}),(0,a._)(this,g,{writable:!0,value:void 0}),(0,a._)(this,f,{writable:!0,value:void 0}),(0,r._)(this,g,new Map),(0,r._)(this,f,new Map),(0,r._)(this,p,e),(0,r._)(this,c,t);for(let t=0;t<e.pages.length;++t){let n=(0,i._)(this,v,y).call(this,e.pages[t].components);(0,l._)(this,f).set(e.pages[t].key,n),(0,l._)(this,g).set(e.pages[t].key,[t,e.pages[t]])}}}function y(e){let t=[];for(let n of e)if("multirow"===n.type){let e=(0,i._)(this,v,y).call(this,n.components);t.push(...e)}else"node"!==n.type&&t.push(n);return t}function b(e){for(let[n,a]of(0,l._)(this,f))for(let r=0;r<a.length;++r)if(a[r].name===e){var t;let[e,i]=null!=(t=(0,l._)(this,g).get(n))?t:[-1,null],u=e+1+r/10**String(a.length-1).length;return{component:a[r],page:i,position:u}}return{component:null,page:null}}},98846:(e,t,n)=>{n.d(t,{M:()=>c});var l=n(37876),a=n(42667),r=n(66438),i=n(14232),u=n(19659),o=n(94158),s=n(43278);let d=(0,r.Ay)(a.A)(e=>{let{theme:t,variant:n,fullWidth:l}=e;return{alignItems:"center",backgroundColor:t.palette["text-neutral-black"],padding:"".concat(t.spacing(4)," ").concat(t.spacing(0)),borderRadius:t.spacing(20),maxHeight:t.spacing(14),boxSizing:"border-box",["@media (min-width: ".concat(s.A.breakpoints.mobile,"px)")]:{width:"max-content",padding:"".concat(t.spacing(4)," ").concat(t.spacing(14))},["@media (max-width: ".concat(s.A.breakpoints.mobile,"px)")]:{width:"100%"},...t.typography.bodyMMediumSansSerif,color:t.palette["bg-neutral-white"],textTransform:"none",...l&&{width:"100%"},..."outlined"===n&&{backgroundColor:"transparent",color:t.palette["text-neutral-strong"],border:"2px s
1olid ".concat(t.palette["bg-neutral-weaker"])},...(void 0===n||"contained"===n)&&{"&:disabled":{backgroundColor:t.palette["bg-neutral-weaker"],color:t.palette["icon-neutral-weak"]},"&:hover":{backgroundColor:t.palette["text-neutral-weak"]}},..."text"===n&&{backgroundColor:"transparent",color:t.palette["text-neutral-default"],textDecoration:"underline",textDecorationStyle:"solid",padding:t.spacing(3,0)}}}),c=e=>{let{children:t,onClick:n,...a}=e,r=(0,u.z1)(),s=(0,i.useCallback)(e=>{if(n){n(e);let l="string"==typeof t?t:"";r.trackEvent({event:o.Bp.ButtonClick,text:l})}},[n,t,r]);return(0,l.jsx)(d,{onClick:s,...a,children:t})}},99689:(e,t,n)=>{n.d(t,{B:()=>M});var l=n(37876),a=n(89099),r=n(14232),i=n(94158),u=n(66438),o=n(70683),s=n(27212),d=n(47298),c=n(98625),p=n(33130),g=n.n(p),f=n(88992),v=n(98846);function h(e){var t;let{pageData:{form:n}}=e,{formLayout:a,isSurveyAnimating:r,isSurveyMutating:i,results:u,submitPage:o,variables:s}=(0,d.Y)(),{formState:{isValid:c},getValues:p,handleSubmit:h}=(0,f.xW)();if(!(null==n?void 0:n.submitButton)||n.submitButton.renderIf&&!g().apply(n.submitButton.renderIf,{...u,...s,...p()}))return null;let m=(null==a?void 0:a.submitButton)||v.M;return(0,l.jsx)(m,{disabled:!c||r,loading:i,onClick:h(o),value:null==(t=n.submitButton)?void 0:t.value,...!(null==a?void 0:a.submitButton)&&{fullWidth:!0,sx:{marginTop:10}},children:n.submitButton.children})}var m=n(1729);function y(e){var t,n,a,i,u,o;let{form:s}=e,{formLayout:c,isSurveyAnimating:p,isSurveyMutating:v,results:h,variables:y,submitPage:b}=(0,d.Y)(),{getValues:x}=(0,f.xW)(),k=null==s||null==(t=s.skipButton)?void 0:t.submitValues,w=(0,r.useCallback)(()=>{b(null!=k?k:{})},[b,k]);if((null==s||null==(n=s.skipButton)?void 0:n.renderIf)&&!g().apply(s.skipButton.renderIf,{...h,...y,...x()})||!(null==s?void 0:s.skipButton))return null;let _=(null==c?void 0:c.skipButton)||m.FoundButton;return(0,l.jsx)(_,{disabled:p||v,loading:p||v,onClick:w,value:null==s||null==(a=s.skipButton)?void 0:a.value,...!(null==c?void 0:c.skipButton)&&{fullWidth:!0,flavor:m.FoundButtonFlavor.Tertiary,sx:e=>({marginTop:e.customTokens.spacing["2xs"],fontSize:"16px","&:hover":{fontSize:"16px"}})},children:null!=(o=null==s||null==(i=s.skipButton)?void 0:i.children)?o:null==s||null==(u=s.skipButton)?void 0:u.value})}let b=(0,u.Ay)(c.A)({flexDirection:"column",gap:2}),x={multirow:(0,u.Ay)(c.A)(e=>{let{theme:t}=e;return{flexDirection:"row",gap:t.spacing(2)}})};function k(e){var t,n,a;let{pageComponent:r}=e,{isSurveyMutating:i,submitPage:u,fields:o,variables:s,results:c}=(0,d.Y)(),{control:p,getValues:v,handleSubmit:h}=(0,f.xW)(),m=null==(t=r.fields)?void 0:t.filter(e=>!e.renderIf||g().apply(e.renderIf,{...c,...s,...v()})),y=null==o?void 0:o[r.type];if(!y||m&&0===m.length)return null;let b={...c,...s,...v()},x=r.rules?{...r.rules,validate:r.rules.validate&&"function"==typeof r.rules.validate?e=>{var t;return(null==(t=r.rules)?void 0:t.validate)(e,b)}:r.rules.validate}:void 0;return(0,l.jsx)(f.xI,{name:null!=(n=r.name)?n:"name",control:p,rules:x,defaultValue:(null==c?void 0:c[null!=(a=null==r?void 0:r.name)?a:""])||(null==r?void 0:r.defaultValue),render:e=>{let{field:t,fieldState:n}=e;return(0,l.jsx)(y,{field:t,fieldState:n,isSurveyMutating:i,handleSubmit:h,submitPage:u,fields:m,formValues:v(),pageComponent:r})}},r.name)}function w(e){let{component:t}=e,{type:n,renderIf:a}=t,{components:r,results:i,variables:u}=(0,d.Y)(),{formState:{isValid:o},getValues:s}=(0,f.xW)();if(a&&!g().apply(a,{...i,...u,...s()}))return null;if("node"===n)return(0,l.jsx)(l.Fragment,{children:t.node});if("component"===n&&t.name){let e=null==r?void 0:r[t.name];return"function"==typeof e?(0,l.jsx)(e,{formValues:s(),isValid:o}):null!=e?e:null}return(0,l.jsx)(k,{pageComponent:t})}function _(e){let{components:t}=e,{fields:n}=(0,d.Y)();return(0,l.jsx)(l.Fragment,{children:null==t?void 0:t.map((e,t)=>{let a="".concat(e.type,"-").concat(t);if("multirow"===e.type){let t=(null==n?void 0:n.multirow)||x.multirow;return(0,l.jsx)(t,{pageComponent:e,children:(0,l.jsx)(_,{components:e.components})},a)}return(0,l.jsx)(w,{component:e},a)})})}function S(e){let{pageData:t}=e,{components:n,form:a,footer:i,preventSubmitOnEnter:u}=t,{ButtonsLayout:o,FieldsLayout:s,results:c,submitPage:p,variables:v}=(0,d.Y)(),m=(0,f.mN)({mode:null==a?void 0:a.mode}),x=(0,r.useCallback)(e=>{"Enter"!==e.key||e.defaultPrevented||u||(e.preventDefault(),m.handleSubmit(p)())},[p,m,u]),k=m.watch(),w=null;(null==i?void 0:i.component)&&(i.renderIf?g().apply(i.renderIf,{...c,...v,...k})&&(w=i.component):w=i.component);let S=s||r.Fragment;return(0,l.jsx)(f.Op,{...m,children:(0,l.jsxs)("div",{onKeyDown:x,style:{display:"contents"},children:[(0,l.jsx)(S,{children:(0,l.jsx)(_,{components:n}
1)}),((null==a?void 0:a.submitButton)||(null==a?void 0:a.skipButton))&&(0,l.jsxs)(o||b,{children:[(0,l.jsx)(h,{pageData:t}),(null==a?void 0:a.skipButton)&&(0,l.jsx)(y,{form:a})]}),w]})})}let j=(0,u.Ay)("h1")(e=>{let{theme:t}=e;return{...t.typography.headerSRegularSansSerif,color:t.palette["text-neutral-weak"]}}),B=(0,u.Ay)("h2")(e=>{let{theme:t}=e;return{...t.typography.bodyXMRegularSansSerif,color:t.palette["text-neutral-weak"]}}),P=(0,u.Ay)(o.P.div)(e=>{let{theme:t}=e;return{display:"flex",flexDirection:"column",maxWidth:"640px",padding:t.spacing(5)}});function C(e){let{sx:t}=e,{currentPage:n,currentPageData:a,Subtitle:i,Title:u,TitlesLayout:o}=(0,d.Y)(),c=!!a.title&&!a.hideTitle,p=!!a.subtitle,g=o||r.Fragment;return(0,l.jsx)(s.N,{mode:"wait",children:(0,l.jsxs)(P,{initial:{opacity:0,x:100},animate:{x:0,opacity:1,transition:{delay:.25,duration:.5}},exit:{opacity:0,transition:{delay:0,duration:.25}},sx:t,children:[(p||c)&&(0,l.jsxs)(g,{children:[c&&(0,l.jsx)(u||j,{children:a.title}),p&&(0,l.jsx)(i||B,{children:a.subtitle})]}),(0,l.jsx)(S,{pageData:a})]},n)})}var D=n(2297),I=n(59442);function M(e){var t,n;let{ButtonsLayout:u,FieldsLayout:o,Subtitle:s,Title:d,TitlesLayout:c,basePath:p,components:g,fields:f,formLayout:v,onPageSubmit:h,onPrePageSubmit:m,schema:y,data:b,surveyPageResolvers:x,sx:k,variables:w}=e,[_,S]=(0,r.useState)(!1),[j,B]=(0,r.useState)(!1),P=(0,a.useRouter)(),M=(0,r.useRef)(!1),N=(0,r.useMemo)(()=>new I.b(y,x),[y,x]),A=null!=(n=null==(t=P.query.step)?void 0:t[0])?n:"",{currentPageNumber:T,currentPage:W}=(0,r.useMemo)(()=>{if(!A)return{currentPageNumber:0,currentPage:y.pages[0]};for(let e=0;e<y.pages.length;++e){let t=y.pages[e];if(t.key===A)return{currentPageNumber:e,currentPage:t}}return{currentPageNumber:0,currentPage:y.pages[0]}},[y.pages,A]);(0,r.useEffect)(()=>{A!==b.currentPageKey&&V(N.getPageNumberByKey(b.currentPageKey),!0)},[]);let V=(0,r.useCallback)(function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],l=arguments.length>2?arguments[2]:void 0;(e<0||e>=y.pages.length)&&(e=0);let a=n?P.replace:P.push,{step:r,...i}=P.query;l&&Object.entries(l).forEach(e=>{let[t,n]=e;i[t]=n}),a({pathname:"".concat(p,"/").concat(null!=(t=y.pages[e].key)?t:"page-".concat(e)),query:i},void 0,{shallow:!0})},[p,P,y.pages]),E=(0,r.useCallback)(async e=>{if(!M.current){M.current=!0,S(!0);try{let t,n=N.transformToSurveySubmission({currentPage:W,currentPageNumber:T,currentPageResults:e,surveyData:b.data});if((0,i.s9)(i.Bp.QuestionAnswered,{answers:n.rawSurveyData.data,page:W.key,path:window.location.pathname,surveyType:y.type}),m){let e=await m(n);if(!e.success)return void S(!1);t=e.variables}let l=N.getNextPageNumber({currentPageNumber:T,results:n.rawSurveyData.data,variables:{...w,...t}}),a=l>=y.pages.length,r=await h(a?n:{...n,rawSurveyData:{...n.rawSurveyData,currentPageKey:y.pages[l].key,currentPageNo:l}},a);if(a||(null==r?void 0:r.complete))return;B(!0),setTimeout(()=>B(!1),1e3),V(l,!1,null==r?void 0:r.queryParams)}finally{S(!1),setTimeout(()=>{M.current=!1},300)}}},[W,T,V,h,m,y.pages,y.type,N,b.data,w]),Y=(0,r.useMemo)(()=>({ButtonsLayout:u,FieldsLayout:o,Subtitle:s,Title:d,TitlesLayout:c,components:g,currentPage:T,currentPageData:W,fields:f,formLayout:v,isSurveyAnimating:j,isSurveyMutating:_,results:b.data,schema:y,submitPage:E,variables:w}),[u,o,s,d,c,g,W,T,f,v,_,j,y,E,b.data,w]);return(0,l.jsx)(D.u.Provider,{value:Y,children:(0,l.jsx)(C,{sx:k})})}}}]); 2//# sourceMappingURL=9689.ff0e5a3318d013f8.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.