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]="5385d8fd-5162-4476-96d1-4ac8af35921f",e._sentryDebugIdIdentifier="sentry-dbid-5385d8fd-5162-4476-96d1-4ac8af35921f")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7707,8481],{1228:(e,t,n)=>{"use strict";n.d(t,{J:()=>r,JE:()=>s,eH:()=>o});var i=n(10832);let o=e=>i.A.get("/v3/calendar/feed-token",{params:{source:e}}),r=e=>i.A.post("/v3/calendar/feed-token/regenerate",{source:e}),s=e=>i.A.post("/v3/calendar/nudge/".concat(e,"/shown"))},5768:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var i=n(44501),o=n(8972),r=n(14232),s=n(5695),a=n(66776),l=r.forwardRef(function(e,t){var n=e.classes,a=e.className,l=e.dividers,d=(0,o.A)(e,["classes","className","dividers"]);return r.createElement("div",(0,i.A)({className:(0,s.A)(n.root,a,void 0!==l&&l&&n.dividers),ref:t},d))});let d=(0,a.A)(function(e){return{root:{flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"8px 24px","&:first-child":{paddingTop:20}},dividers:{padding:"16px 24px",borderTop:"1px solid ".concat(e.palette.divider),borderBottom:"1px solid ".concat(e.palette.divider)}}},{name:"MuiDialogContent"})(l)},5803:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var i=n(66849),o=n(99109);function r(e){return(0,o.A)(1,arguments),(0,i.default)(e,Date.now())}},6732:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var i=n(14232),o=n(98477),r=n(3587),s=n(76475),a=n(42085);function l(e){return e.substring(2).toLowerCase()}let d=function(e){var t=e.children,n=e.disableReactTree,d=void 0!==n&&n,c=e.mouseEvent,u=void 0===c?"onClick":c,p=e.onClickAway,m=e.touchEvent,h=void 0===m?"onTouchEnd":m,y=i.useRef(!1),f=i.useRef(null),g=i.useRef(!1),x=i.useRef(!1);i.useEffect(function(){return setTimeout(function(){g.current=!0},0),function(){g.current=!1}},[]);var w=i.useCallback(function(e){f.current=o.findDOMNode(e)},[]),b=(0,s.A)(t.ref,w),C=(0,a.A)(function(e){var t=x.current;if(x.current=!1,!(!g.current||!f.current||document.documentElement.clientWidth<e.clientX||document.documentElement.clientHeight<e.clientY)){if(y.current){y.current=!1;return}(e.composedPath?e.composedPath().indexOf(f.current)>-1:!(0,r.A)(f.current).documentElement.contains(e.target)||f.current.contains(e.target))||!d&&t||p(e)}}),v=function(e){return function(n){x.current=!0;var i=t.props[e];i&&i(n)}},k={ref:b};return!1!==h&&(k[h]=v(h)),i.useEffect(function(){if(!1!==h){var e=l(h),t=(0,r.A)(f.current),n=function(){y.current=!0};return t.addEventListener(e,C),t.addEventListener("touchmove",n),function(){t.removeEventListener(e,C),t.removeEventListener("touchmove",n)}}},[C,h]),!1!==u&&(k[u]=v(u)),i.useEffect(function(){if(!1!==u){var e=l(u),t=(0,r.A)(f.current);return t.addEventListener(e,C),function(){t.removeEventListener(e,C)}}},[C,u]),i.createElement(i.Fragment,null,i.cloneElement(t,k))}},7697:(e,t,n)=>{"use strict";n.d(t,{Y:()=>o});let i=["https:","http:"],o=e=>{let t;if(!e)return"none";try{t=new URL(e)}catch(e){return"none"}if(!i.includes(t.protocol))return"none";let n=t.href.replace(/["\\]/g,e=>"\\".concat(e));return'url("'.concat(n,'")')}},9096:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var i=n(44501),o=n(99660),r=n(48454);let s=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,o.A)(e,(0,i.A)({defaultTheme:r.A},t))}},10026:(e,t,n)=>{"use strict";n.d(t,{S:()=>o});var i=n(37876);n(14232);let o=e=>(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",...e,children:[(0,i.jsx)("g",{clipPath:"url(#clip0_3570_25575)",children:(0,i.jsx)("path",{d:"M11.7212 1.96039C11.3499 1.58861 10.747 1.58884 10.3752 1.96039L4.31743 8.01838L1.62501 5.32599C1.25324 4.95422 0.650594 4.95422 0.278817 5.32599C-0.0929594 5.69777 -0.0929594 6.30041 0.278817 6.67219L3.64419 10.0376C3.82996 10.2233 4.07355 10.3165 4.31717 10.3165C4.56079 10.3165 4.80461 10.2236 4.99039 10.0376L11.7212 3.30656C12.0929 2.93504 12.0929 2.33214 11.7212 1.96039Z",fill:e.fill||"#718EBF"})}),(0,i.jsx)("defs",{children:(0,i.jsx)("clipPath",{id:"clip0_3570_25575",children:(0,i.jsx)("rect",{width:"12",height:"12",fill:"white"})})})]})},10286:(e,t,n)=>{"use strict";n.d(t,{X:()=>i});let i=(0,n(84976).DU)([".intercom-lightweight-app,.intercom-app,.intercom-launcher{display:none !important;}"])}
1,14938:(e,t,n)=>{"use strict";n.d(t,{I:()=>d});var i=n(37876),o=n(14232),r=n(84976);let s=r.Ay.div.withConfig({displayName:"styles__SegmentedControlContainer",componentId:"sc-1f8b1f7a-0"})(["background:",";width:100%;border-radius:12px;display:flex;position:relative;padding:2px;cursor:pointer;",""],e=>{let{theme:t}=e;return t.colors["gray-70"]},e=>{let{$disabled:t}=e;return t&&"\n opacity: 0.6;\n cursor: not-allowed;\n "}),a=r.Ay.div.withConfig({displayName:"styles__TabIndicator",componentId:"sc-1f8b1f7a-1"})(["position:absolute;top:2px;height:calc(100% - 4px);background:linear-gradient(109.394deg,#2132e6 0%,#009dfe 100%);border-radius:10px;transition:left 0.25s cubic-bezier(0.4,0,0.2,1),width 0.25s cubic-bezier(0.4,0,0.2,1);box-shadow:0 2px 10px rgba(33,50,230,0.3);z-index:0;"]),l=r.Ay.button.withConfig({displayName:"styles__TabButton",componentId:"sc-1f8b1f7a-2"})(["appearance:none;border:none;background:transparent;cursor:pointer;flex:1;display:flex;align-items:center;justify-content:center;font-family:",";font-weight:600;font-size:",";color:",";white-space:nowrap;padding:",";z-index:1;transition:color 0.3s ease;&:disabled{cursor:not-allowed;}@media (max-width:","){padding:12px 10px;font-size:14px;}"],e=>{let{theme:t}=e;return t.fonts.quaternary},e=>{let{$size:t}=e;return"compact"===t?"13px":"16px"},e=>
1e.isActive?"#ffffff":"#718ebf",e=>{let{$size:t}=e;return"compact"===t?"8px 18px":"10px 28px"},e=>{let{theme:t}=e;return t.breakpoints.md}),d=e=>{let{options:t,activeIndex:n,onChange:r,className:d,testIdPrefix:c="tab",uniformWidth:u=!1,size:p="default",disabled:m=!1}=e,h=(0,o.useRef)([]),[y,f]=(0,o.useState)(null),[g,x]=(0,o.useState)(null);(0,o.useLayoutEffect)(()=>{if(!u)return void x(null);let e=h.current.filter(e=>null!==e).map(e=>e.offsetWidth);0!==e.length&&x(Math.max(...e))},[u,t]);let w=(0,o.useCallback)(()=>{let e=h.current[n];e&&f({left:e.offsetLeft,width:e.offsetWidth})},[n,g,u]),b=u?null!==g?{flex:"none",width:"".concat(g,"px")}:{flex:"none",width:"max-content"}:void 0;return(0,o.useLayoutEffect)(()=>{h.current=h.current.slice(0,t.length),w()},[w,t]),(0,o.useEffect)(()=>(window.addEventListener("resize",w),()=>window.removeEventListener("resize",w)),[w]),(0,i.jsxs)(s,{className:d,$disabled:m,children:[y&&(0,i.jsx)(a,{"data-testid":"segmented-control-indicator",style:{left:y.left,width:y.width}}),t.map((e,t)=>(0,i.jsx)(l,{type:"button",ref:e=>{h.current[t]=e},isActive:n===t,$size:p,disabled:m,onClick:()=>r(t),style:b,"data-testid":null!=e.value&&""!==e.value?"".concat(c,"-").concat(e.value):void 0,children:e.label},e.value))]})}},15280:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var i=n(44501),o=n(8972),r=n(14232),s=n(5695),a=n(66776),l=r.forwardRef(function(e,t){var n=e.disableSpacing,a=e.classes,l=e.className,d=(0,o.A)(e,["disableSpacing","classes","className"]);return r.createElement("div",(0,i.A)({className:(0,s.A)(a.root,l,!(void 0!==n&&n)&&a.spacing),ref:t},d))});let d=(0,a.A)({root:{display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},spacing:{"& > :not(:first-child)":{marginLeft:8}}},{name:"MuiDialogActions"})(l)},18863:()=>{},22779:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var i=n(37876);n(14232);let o=e=>{let{variant:t=1,...n}=e;return 4===t?(0,i.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:(0,i.jsx)("path",{d:"M3 8L15 8M15 8C15 9.65686 16.3431 11 18 11C19.6569 11 21 9.65685 21 8C21 6.34315 19.6569 5 18 5C16.3431 5 15 6.34315 15 8ZM9 16L21 16M9 16C9 17.6569 7.65685 19 6 19C4.34315 19 3 17.6569 3 16C3 14.3431 4.34315 13 6 13C7.65685 13 9 14.3431 9 16Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):2===t?(0,i.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:[(0,i.jsx)("path",{d:"M9.3951 19.3711L9.97955 20.6856C10.1533 21.0768 10.4368 21.4093 10.7958 21.6426C11.1547 21.8759 11.5737 22.0001 12.0018 22C12.4299 22.0001 12.8488 21.8759 13.2078 21.6426C13.5667 21.4093 13.8503 21.0768 14.024 20.6856L14.6084 19.3711C14.8165 18.9047 15.1664 18.5159 15.6084 18.26C16.0532 18.0034 16.5678 17.8941 17.0784 17.9478L18.5084 18.1C18.9341 18.145 19.3637 18.0656 19.7451 17.8713C20.1265 17.6771 20.4434 17.3763 20.6573 17.0056C20.8715 16.635 20.9735 16.2103 20.9511 15.7829C20.9286 15.3555 20.7825 14.9438 20.5307 14.5978L19.684 13.4344C19.3825 13.0171 19.2214 12.5148 19.224 12C19.2239 11.4866 19.3865 10.9864 19.6884 10.5711L20.5351 9.40778C20.787 9.06175 20.933 8.65007 20.9555 8.22267C20.978 7.79528 20.8759 7.37054 20.6618 7C20.4479 6.62923 20.131 6.32849 19.7496 6.13423C19.3681 5.93997 18.9386 5.86053 18.5129 5.90556L17.0829 6.05778C16.5722 6.11141 16.0577 6.00212 15.6129 5.74556C15.17 5.48825 14.82 5.09736 14.6129 4.62889L14.024 3.31444C13.8503 2.92317 13.5667 2.59072 13.2078 2.3574C12.8488 2.12408 12.4299 1.99993 12.0018 2C11.5737 1.99993 11.1547 2.12408 10.7958 2.3574C10.4368 2.59072 10.1533 2.92317 9.97955 3.31444L9.3951 4.62889C9.18803 5.09736 8.83798 5.48825 8.3951 5.74556C7.95032 6.00212 7.43577 6.11141 6.9251 6.05778L5.49066 5.90556C5.06499 5.86053 4.6354 5.93997 4.25397 6.13423C3.87255 6.32849 3.55567 6.62923 3.34177 7C3.12759 7.37054 3.02555 7.79528 3.04804 8.22267C3.07052 8.65007 3.21656 9.06175 3.46844 9.40778L4.3151 10.5711C4.61704 10.9864 4.77964 11.4866 4.7795
15 12C4.77964 12.5134 4.61704 13.0137 4.3151 13.4289L3.46844 14.5922C3.21656 14.9382 3.07052 15.3499 3.04804 15.7773C3.02555 16.2047 3.12759 16.6295 3.34177 17C3.55589 17.3706 3.8728 17.6712 4.25417 17.8654C4.63554 18.0596 5.06502 18.1392 5.49066 18.0944L6.92066 17.9422C7.43133 17.8886 7.94587 17.9979 8.39066 18.2544C8.83519 18.511 9.18687 18.902 9.3951 19.3711Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,i.jsx)("path",{d:"M12 15C13.6568 15 15 13.6569 15 12C15 10.3431 13.6568 9 12 9C10.3431 9 8.99998 10.3431 8.99998 12C8.99998 13.6569 10.3431 15 12 15Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}):(0,i.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:[(0,i.jsx)("path",{d:"M12 15C13.6569 15 15 13.6569 15 12C15 10.3431 13.6569 9 12 9C10.3431 9 9 10.3431 9 12C9 13.6569 10.3431 15 12 15Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,i.jsx)("path",{d:"M18.7273 14.7273C18.6063 15.0015 18.5702 15.3056 18.6236 15.6005C18.6771 15.8954 18.8177 16.1676 19.0273 16.3818L19.0818 16.4364C19.2509 16.6052 19.385 16.8057 19.4765 17.0265C19.568 17.2472 19.6151 17.4838 19.6151 17.7227C19.6151 17.9617 19.568 18.1983 19.4765 18.419C19.385 18.6397 19.2509 18.8402 19.0818 19.0091C18.913 19.1781 18.7124 19.3122 18.4917 19.4037C18.271 19.4952 18.0344 19.5423 17.7955 19.5423C17.5565 19.5423 17.3199 19.4952 17.0992 19.4037C16.8785 19.3122 16.678 19.1781 16.5091 19.0091L16.4545 18.9545C16.2403 18.745 15.9682 18.6044 15.6733 18.5509C15.3784 18.4974 15.0742 18.5335 14.8 18.6545C14.5311 18.7698 14.3018 18.9611 14.1403 19.205C13.9788 19.4489 13.8921 19.7347 13.8909 20.0273V20.1818C13.8909 20.664 13.6994 21.1265 13.3584 21.4675C13.0174 21.8084 12.5549 22 12.0727 22C11.5905 22 11.1281 21.8084 10.7871 21.4675C10.4461 21.1265 10.2545 20.664 10.2545 20.1818V20.1C10.2475 19.7991 10.1501 19.5073 9.97501 19.2625C9.79991 19.0176 9.55521 18.8312 9.27273 18.7273C8.99853 18.6063 8.69437 18.5702 8.39947 18.6236C8.10456 18.6771 7.83244 18.8177 7.61818 19.0273L7.56364 19.0818C7.39478 19.2509 7.19425 19.385 6.97353 19.4765C6.7528 19.568 6.51621 19.6151 6.27727 19.6151C6.03834 19.6151 5.80174 19.568 5.58102 19.4765C5.36029 19.385 5.15977 19.2509 4.99091 19.0818C4.82186 18.913 4.68775 18.7124 4.59626 18.4917C4.50476 18.271 4.45766 18.0344 4.45766 17.7955C4.45766 17.5565 4.50476 17.3199 4.59626 17.0992C4.68775 16.8785 4.82186 16.678 4.99091 16.5091L5.04545 16.4545C5.25503 16.2403 5.39562 15.9682 5.4491 15.6733C5.50257 15.3784 5.46647 15.0742 5.34545 14.8C5.23022 14.5311 5.03887 14.3018 4.79497 14.1403C4.55107 13.9788 4.26526 13.8921 3.97273 13.8909H3.81818C3.33597 13.8909 2.87351 13.6994 2.53253 13.3584C2.19156 13.0174 2 12.5549 2 12.0727C2 11.5905 2.19156 11.1281 2.53253 10.7871C2.87351 10.4461 3.33597 10.2545 3.81818 10.2545H3.9C4.2009 10.2475 4.49273 10.1501 4.73754 9.97501C4.98236 9.79991 5.16883 9.55521 5.27273 9.27273C5.39374 8.99853 5.42984 8.69437 5.37637 8.39947C5.3229 8.10456 5.18231 7.83244 4.97273 7.61818L4.91818 7.56364C4.74913 7.39478 4.61503 7.19425 4.52353 6.97353C4.43203 6.7528 4.38493 6.51621 4.38493 6.27727C4.38493 6.03834 4.43203 5.80174 4.52353 5.58102C4.61503 5.36029 4.74913 5.15977 4.91818 4.99091C5.08704 4.82186 5.28757 4.68775 5.50829 4.59626C5.72901 4.50476 5.96561 4.45766 6.20455 4.45766C6.44348 4.45766 6.68008 4.50476 6.9008 4.59626C7.12152 4.68775 7.32205 4.82186 7.49091 4.99091L7.54545 5.04545C7.75971 5.25503 8.03183 5.39562 8.32674 5.4491C8.62164 5.50257 8.9258 5.46647 9.2 5.34545H9.27273C9.54161 5.23022 9.77093 5.03887 9.93245 4.79497C10.094 4.55107 10.1807 4.26526 10.1818 3.97273V3.81818C10.1818 3.33597 10.3734 2.87351 10.7144 2.53253C11.0553 2.19156 11.5178 2 12 2C12.4822 2 12.9447 2.19156 13.2856 2.53253C13.6266 2.87351 13.8182 3.33597 13.8182 3.81818V3.9C13.8193 4.19253 13.906 4.47834 14.0676 4.72224C14.2291 4.96614 14.4584 5.15749 14.7273 5.27273C15.0015 5.39374 15.3056 5.42984 15.6005 5.37637C15.8954 5.3229 16.1676 5.18231 16.3818 4.97273L16.4364 4.91818C16.6052 4.74913 16.8057 4.61503 17.0265 4.52353C17.2472 4.43203 17.4838 4.38493 17.7227 4.38493C17.9617 4.38493 18.1983 4.43203 18.419 4.52353C18.6397 4.61503 18.8402 4.74913 19.0091 4.91818C19.1781 5.08704 19.3122 5.28757 19.4037 5.50829C19.4952 5.72901 19.5423 5.96561 19.5423 6.20455C19.5423 6.44348 19.4952 6.68008 19.4037 6.9008C19.3
1122 7.12152 19.1781 7.32205 19.0091 7.49091L18.9545 7.54545C18.745 7.75971 18.6044 8.03183 18.5509 8.32674C18.4974 8.62164 18.5335 8.9258 18.6545 9.2V9.27273C18.7698 9.54161 18.9611 9.77093 19.205 9.93245C19.4489 10.094 19.7347 10.1807 20.0273 10.1818H20.1818C20.664 10.1818 21.1265 10.3734 21.4675 10.7144C21.8084 11.0553 22 11.5178 22 12C22 12.4822 21.8084 12.9447 21.4675 13.2856C21.1265 13.6266 20.664 13.8182 20.1818 13.8182H20.1C19.8075 13.8193 19.5217 13.906 19.2778 14.0676C19.0339 14.2291 18.8425 14.4584 18.7273 14.7273Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}},32840:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var i=n(44501),o=n(14232),r=n(33659),s=n(55573);function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(0,r.A)(),a=(0,s.A)({theme:n,name:"MuiUseMediaQuery",props:{}}),l="function"==typeof e?e(n):e;l=l.replace(/^@media( ?)/m,"");var d=void 0!==window.matchMedia,c=(0,i.A)({},a,t),u=c.defaultMatches,p=void 0!==u&&u,m=c.matchMedia,h=void 0===m?d?window.matchMedia:null:m,y=c.noSsr,f=void 0!==y&&y,g=c.ssrMatchMedia,x=void 0===g?null:g,w=o.useState(function(){return f&&d?h(l).matches:x?x(l).matches:p}),b=w[0],C=w[1];return o.useEffect(function(){var e=!0;if(d){var t=h(l),n=function(){e&&C(t.matches)};return n(),t.addListener(n),function(){e=!1,t.removeListener(n)}}},[l,h,d]),b}},33342:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var i=n(41235),o=n(99109);function r(e){return(0,o.A)(1,arguments),(0,i.default)(e).getTime()<Date.now()}},35742:(e,t,n)=>{"use strict";n.d(t,{e:()=>i});var i=function(e){return e.ANY="any",e.ONE_OF_EACH="one_of_each",e}({})},36742:(e,t,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/workspace/[id]/[[...tab]]",function(){return n(39332)}])},39332:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__N_SSP:()=>sM,default:()=>sP});var i=n(37876),o=n(89099),r=n(14232),s=n(74695),a=n(83083),l=n(68368),d=n(61661),c=n(84976);let u=c.Ay.section.withConfig({displayName:"styles__SectionContainer",componentId:"sc-220f2efd-0"})(["display:flex;width:100%;flex-direction:row;gap:clamp(16px,1.6vw,32px);"]),p=c.Ay.div.withConfig({displayName:"styles__LeftSideContent",componentId:"sc-220f2efd-1"})(["display:flex;flex:60%;flex-direction:column;gap:clamp(14px,2dvh,32px);"]),m=c.Ay.div.withConfig({displayName:"styles__RightSideContent",componentId:"sc-220f2efd-2"})(["display:flex;flex:40%;flex-direction:column;gap:clamp(14px,2dvh,32px);"]),h=c.Ay.p.withConfig({displayName:"styles__TransitText",componentId:"sc-220f2efd-3"})(["font-family:",";font-size:",";color:",";font-weight:600;padding:0;margin:0;@media (max-width:","){font-size:",";}text-align:right;"],e=>{let{theme:t}=e;return t.fonts.quaternary},e=>{let{theme:t}=e;return t.fontSize.body.md},e=>{let{theme:t}=e;return t.colors.orange},e=>{let{theme:t}=e;return t.breakpoints.md},e=>{let{theme:t}=e;return t.fontSize.body.sm}),y=c.Ay.p.withConfig({displayName:"styles__PaidText",componentId:"sc-220f2efd-4"})(["font-family:",";font-size:",";color:",";font-weight:600;padding:0;margin:0;@media (max-width:","){font-size:",";}text-align:right;"],e=>{let{theme:t}=e;return t.fonts.quaternary},e=>{let{theme:t}=e;return t.fontSize.body.md},e=>{let{theme:t}=e;return t.colors.green},e=>{let{theme:t}=e;return t.breakpoints.md},e=>{let{theme:t}=e;return t.fontSize.body.sm}),f=c.Ay.p.withConfig({displayName:"styles__UpcomingText",componentId:"sc-220f2efd-5"})(["font-family:",";font-size:",";color:",";font-weight:600;padding:0;margin:0;@media (max-width:","){font-size:",";}text-align:right;"],e=>{let{theme:t}=e;return t.fonts.quaternary},e=>{let{theme:t}=e;return t.fontSize.body.md},e=>{let{theme:t}=e;return t.colors.primary},e=>{let{theme:t}=e;return t.breakpoints.md},e=>{let{theme:t}=e;return t.fontSize.body.sm}),g=c.Ay.span.withConfig({displayName:"styles__ButtonLabel",componentId:"sc-220f2efd-6"})(["display:inline-flex;align-items:center;gap:6px;"]),x=c.Ay.div.withConfig({displayName:"styles__OverviewMobileContainer",componentId:"sc-220f2efd-7"})(["display:flex;flex-direction:column;gap:1.5rem;"]),w=c.Ay.div.withConfig({displayName:"styles__RatingsComponentContainer",componentId:"sc-220f2efd-8"})(["background-color:",";border-radius:1.5rem;display:flex;flex-direction:column;padding:clamp(14px,2dvh,24px);"],e=>{let{theme:t}=e;return t.colors.white}),b=c.Ay.h3.withConfig({displayName:"styles__ReviewComponentTitle",componentId:"sc-220f2efd-9"})(["font-family:",";font-size:clamp(1rem,1.6vh,1.2rem);color:",";font-weight:600;margin:0;margin-bottom:clamp(10px,1.4dvh,16px);padding-bottom:clamp(10px,1.4dvh,16px);border-bottom:1px solid ",";"],e=>{let{theme:t}=e;return t.fonts.quaternary},e=>{let{theme:t}=e;return t.colors["primary-dark"]},e=>{let{theme:t}=e;return t.colors["blue-30"]}),C=c.Ay.div.withConfig({displayName:"styles__ReviewComponentContainerStars",componentId:"sc-220f2efd-10"})(["width:100%;> div{display:flex;width:100%;justify-content:space-around;}"]);c.Ay.div.withConfig({displayName:"styles__ContainerTabContent",componentId:"sc-220f2efd-11"})(["border-radius:8px;flex:1;height:fit-content;margin-left:1rem;margin-right:1rem;@media (max-width:","){margin-left:0;margin-right:0;}"],e=>{let{theme:t}=e;return t.breakpoints.md});var v=n(37570),k=n(10881),j=n(86068),S=n(26693),_=n(1564),A=n(74013),I=n(23327);let N=c.Ay.div.withConfig({displayName:"styles__ListBlock",componentId:"sc-6496697c-0"})(["display:flex;flex-direction:column;padding:clamp(14px,2dvh,28px);",""],e=>{let{hasMore:t}=e;return!t&&(0,c.AH)([".hero-card-list-item{&:last-child{border-bottom:none;margin-bottom:-1rem;}}"])}),T=c.Ay.h3.withConfig({displayName:"styles__ListSectionHeader",componentId:"sc-6496697c-1"})(["padding:0;margin:0;text-align:left;font-size:clamp(1rem,1.6vh,1.2rem);margin-bottom:clamp(8px,1.2dvh,16px);color:",";font-weight:700;font-family:",";@media (max-width:","){font-size:",";}"],e=>{let{theme:t}=e;return t.colors["primary-dark"]},e=>{let{theme:t}=e;return t.fonts.quaternary},e=>{let{theme:t}=e;return t.breakpoints.md},e=>{let{theme:t}=e;return t.fontSize.body.lg}),E=c.Ay.button.withConfig({displayName:"styles__ViewMoreListItems",componentId:"sc-6496697c-2"})(["margin:0;border:none;background-color:transparent;padding:0;padding-top:0.5rem;text-align:center;font-size:",";font-weight:700;color:",";font-family:",";cursor:pointer;&:hover{text-decoration:underline;}&:active{transform:scale(0.95);}@media (max-width:","){font-size:",";}"],e=>{let{theme:t}=e;return t.fontSize.body.md},e=>{let{theme:t}=e;return t.colors["primary-dark"]},e=>{let{theme:t}=e;return t.fonts.quaternary},e=>{let{theme:t}=e;return t.breakpoints.md},e=>{let{theme:t}=e;return t.fontSize.body.sm}),D=c.Ay.div.withConfig({displayName:"styles__ModalInnerContainer",componentId:"sc-6496697c-3"})(["display:flex;flex-direction:column;gap:1rem;padding:1.5rem;width:100%;"]),L=c.Ay.div.withConfig({displayName:"styles__ListSectionContainer",componentId:"sc-6496697c-4"})(["&:first-of-type{margin-bottom:1rem;}"]),M=(0,c.Ay)(I.$).withConfig({displayName:"styles__StyledButton",componentId:"sc-6496697c-5"})(["margin:0 auto;"]),P=c.Ay.div.withConfig({displayName:"styles__PaymentAmountContainer",componentId:"sc-6496697c-6"})(["display:flex;flex-direction:row;gap:0.35rem;color:",";justify-content:flex-end;align-items:center;"],e=>{let{theme:t}=e;return t.colors.green}),R=c.Ay.p.withConfig({displayName:"styles__PaymentAmountText",componentId:"sc-6496697c-7"})(["font-family:",";font-size:",";color:",";font-weight:700;padding:0;margin:0;@media (max-width:","){font-size:",";}"],e=>{let{theme:t}=e;return t.fonts.quaternary},e=>{let{theme:t}=e;return t.fontSize.body.md},e=>{let{theme:t}=e;return t.colors["primary-dark"]},e=>{let{theme:t}=e;return t.breakpoints.md},e=>{let{theme:t}=e;return t.fontSize.body.sm});var O=n(80318);let z=(0,c.AH)(["display:flex;width:100%;flex-direction:row;padding:clamp(12px,1.6dvh,24px) 0;justify-content:space-between;border-bottom:1px solid ",";"],e=>{let{theme:t}=e;return t.colors["blue-30"]}),q=c.Ay.button.withConfig({displayName:"styles__ListItemBlockButton",componentId:"sc-88808872-0"})(["border:none;"," background:transparent;cursor:pointer;font-family:inherit;&:hover{opacity:0.8;}"],z),B=c.Ay.div.withConfig({displayName:"styles__ListItemBlock",componentId:"sc-88808872-1"})(["",""],z),V=c.Ay.div.withConfig({displayName:"styles__LeftColumn",componentId:"sc-88808872-2"})(["display:flex;flex-direction:row;flex:1;overflow:hidden;align-items:center;",""],e=>{let{leftColumnIsClickable:t}=e;return t&&(0,c.AH)(["cursor:pointer;"])}),U=c.Ay.div.withConfig({displayName:"styles__LeftColumnDescriptionSection",componentId:"sc-88808872-3"})(["display:flex;flex-direction:column;text-align:left;margin-left:",";overflow:hidden;"],e=>{let{hasImages:t}=e;return t?"1rem":"0"}),W=c.Ay.p.withConfig({displayName:"styles__Title",componentId:"sc-88808872-4"})(["font-size:",";color:",";font-weight:700;letter-spacing:-0.2px;font-family:",";margin:0;padding:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;@media (max-width:","){font-size:",";}"],e=>{let{theme:t}=e;return t.fontSize.body.lg},e=>{let{theme:t}=e;return t.colors["primary-dark"]},e=>{let{theme:t}=e;return t.fonts.quaternary},e=>{let{theme:t}=e;return t.breakpoints.md},e=>{let{theme:t}=e;return t.fontSize.body.md}),H=c.Ay.div.withConfig({displayName:"styles__Subtitle",componentId:"sc-88808872-5"})(["font-size:",";color:",";font-weight:500;letter-spacing:-0.2px;font-family:",";margin:0;margin-top:-0.25rem;padding:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;@media (max-width:","){font-size:",";}"],e=>{let{theme:t}=e;return t.fontSize.body.md},e=>{let{theme:t}=e;return t.colors["gray-120"]},e=>{let{theme:t}=e;return t.fonts.quaternary},e=>{let{theme:t}=e;return t.breakpoints.md},e=>{let{theme:t}=e;return t.fontSize.body.sm}),F=c.Ay.div.withConfig({displayName:"styles__RightColumn",componentId:"sc-88808872-6"})(["display:flex;flex-direction:column;justify-content:flex-end;flex-shrink:1;margin-left:0.5rem;color:",";font-weight:700;font-family:",";letter-spacing:-0.2px;"],e=>{let{theme:t}=e;return t.colors["primary-dark"]},e=>{let{theme:t}=e;return t.fonts.quaternary});var G=n(28359);let $=e=>{let{className:t,imageInfo:n=[],titleText:o,ariaLabel:r,subtitleText:s,amountComponent:a,dateComponent:l,onClick:d,itemIsButton:c=!0,leftColumnIsClickable:u=!0}=e;return(0,i.jsxs)(e=>{let{children:n}=e;return d&&c?(0,i.jsx)(q,{onClick:d,type:"button","aria-label":r||o,className:t,children:n}):(0,i.jsx)(B,{className:t,children:n})},{children:[(0,i.jsxs)(V,{leftColumnIsClickable:u,onClick:u?d:null,children:[n.length>0&&(0,i.jsx)(G.Z,{gap:"-1.4rem",data:n.slice(0,3).map(e=>({pictureUrl:e.srcUrl,name:e.altText}))}),(0,i.jsxs)(U,{hasImages:n.length,className:"left-column-description-section",children:[o&&(0,i.jsx)(W,{children:o}),s&&(0,i.jsx)(H,{children:s})]})]}),(0,i.jsxs)(F,{className:"right-column",children:[a,l]})]})};var Z=n(68302),Y=n(80892),K=n(69127),Q=n(34568),X=n(54572);let J=e=>{let{amount:t,isPaid:n}=e;return(0,i.jsxs)(P,{children:[n&&(0,i.jsx)(X.c,{width:12,height:12}),(0,i.jsx)(R,{children:t})]})},ee=e=>{let{listSections:t=[],showViewMore:n,outerHasMore:o=!1,viewMoreOverride:s=!1,viewMoreModalTitle:a,showFirstSectionHeaderInModal:l=!0,formatItems:d=e=>e,apiUrl:c,onClickViewMore:u,...p}=e,m=(0,Y.Q)("md").isResponsive,[h,y]=(0,r.useState)(!1),{setApiUrl:f,items:g,onNext:x,hasMore:w,isLoading:b,page:C,isFirstPageLoading:v}=(0,K.X)({apiUrl:null,itensPerPage:12,onParseResponse:e=>{let{data:t}=e;return{items:d(t)}}}),k=(0,r.useMemo)(()=>s?o:w,[s,w,o]),j=e=>{let{listItems:t,showAll:n}=e,o=g.length?g:t;return(n?o:o.slice(0,3)).map(e=>(0,i.jsx)($,{...e,className:"hero-card-list-item"},e.id))},S=e=>{let{showAll:n=!1}=e;return t.map((e,t)=>{if(e.items.length)return(0,i.jsxs)(L,{children:[(0===t&&l||t>0)&&(0,i.jsx)(T,{children:e.headerText}),(0,i.jsx)(j,{listItems:e.items,showAll:n})]},e.headerText)})};return(0,i.jsxs)(O.E,{...p,children:[t.length>0&&(0,i.jsxs)(N,{className:"hero-card-list-items",hasMore:n,children:[(0,i.jsx)(S,{}),n&&(0,i.jsx)(e=>{let{onClick:t}=e;return(0,i.jsx)(E,{type:"button","aria-label":"View more info",onClick:t,children:"VIEW MORE"})},{onClick:()=>
1{if(u)return void u();c&&f(c),y(!0)}})]}),(0,i.jsx)(Z.A,{open:h,onClose:()=>{y(!1),f(null)},maxWidth:"sm",height:"auto",isResponsive:m,modalData:{modalTitle:a,titleIsSticky:!0,footerIsSticky:!0,backButtonText:"CLOSE",onBack:()=>{y(!1),f(null)},nextButtonLoading:b,nextButtonDisabled:!k,buttonProps:{backButton:{width:"220px"}}},children:(0,i.jsxs)(D,{children:[v?[0,1,2,3,4,5].map(e=>(0,i.jsx)(Q.G,{height:70},"item-".concat(e))):(0,i.jsx)(S,{showAll:!0}),k&&(0,i.jsx)(M,{disabled:b,onClick:()=>{x(null,C+1)},width:"220px",children:"LOAD MORE"})]})})]})};var et=n(88424),en=n(75589),ei=n(27768),eo=n(35742);let er=function(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=new Date,r=Math.ceil((new Date(e)-o)/864e5);switch(i===ei.C.AWAITING_LINK?null:t){case"approved":return"Approved on ".concat((0,j.MM)(n));case"completed":return"Completed on ".concat((0,j.MM)(n));case"submitted":return"Submitted on ".concat((0,j.MM)(n));default:return r>0?"Due in ".concat(Math.abs(r)," day").concat(r>1?"s":""):"Due ".concat(Math.abs(r)," day").concat(r>1?"s":""," ago")}},es={[void 0]:{primary:"No content yet",secondary:["This is where requests for content and your content uploads and will show up."]},"not-started":{primary:"No content that needs to be started",secondary:["This is where requests for content will show up."]},pending:{primary:"No pending content yet.",secondary:["This is where content that youâve submitted and are waiting for approval on will show up."]},revision:{primary:"No content needing edits yet.",secondary:["This is where content that the company has reviewed and wants edits for will show up."]},approved:{primary:"No approved content yet.",secondary:["This is where content that is approved will show up."]},posted:{primary:"No posted content yet.",secondary:["This is where content you have put live on your own platforms will show up."]}};var ea=n(69257),el=n(6840),ed=n(45512),ec=n(21894),eu=n(93351),ep=n(4244),em=n(7936),eh=n(92652),ey=n(59859),ef=n(60342),eg=n(11300),ex=n(78234),ew=n(76456),eb=n(72442),eC=n(20313),ev=n(99225),ek=n(8792),ej=n(4969);let eS=e=>{let{gigTitle:t,gigId:n,rating:o,onSetRating:s}=e,[a,l]=(0,r.useState)(!1),[d,c]=(0,r.useState)(0);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(w,{children:[(0,i.jsx)(b,{children:o>0?"You rated this experience:":"Rate your GIG experience:"}),(0,i.jsx)(C,{children:(0,i.jsx)(eh.x,{setStars:e=>{c(e),l(!0)},selectedIndex:o,disabled:o>0,width:36,gap:"0"})})]}),(0,i.jsx)(ey.k,{isOpen:a,onClose:()=>{l(!1),c(0)},gigTitle:t,gigId:n,reviewType:"gig",initialSelectedStars:d,onSuccess:e=>{l(!1),c(0),(0,ef.addSuccessNotification)("Thank you for your review!"),s(e.rating)}})]})},e_=e=>{let{sectionTitle:t}=e,n=(0,c.DP)(),a=(0,o.useRouter)(),{queryParams:l,clearParam:d,addParam:w}=(0,ed.s)(),{adjustDatesModalOpened:b,contract:C}=l,{isResponsive:I}=(0,Y.Q)("md"),N=(0,s.wA)(),[T,E]=(0,r.useState)(!1),[D,L]=(0,r.useState)(!1),[M,P]=(0,r.useState)(!1),[R,O]=(0,r.useState)(!1),{id:z}=(0,s.d4)(e=>{let{User:t}=e;return t.data})||{},[q,B]=(0,r.useState)(null),V=(0,s.d4)(e=>e.StudentWorkspace.id),U=(0,s.d4)(e=>e.StudentWorkspace.title),W=(0,s.d4)(e=>e.StudentWorkspace.status),H=(0,s.d4)(e=>e.StudentWorkspace.listingType===eC.e.REGULAR),F=(0,s.d4)(e=>e.StudentWorkspace.listingType),G=(0,s.d4)(e=>e.StudentWorkspace.company.logo),$=(0,s.d4)(e=>e.StudentWorkspace.company.backgroundImage),Z=(0,s.d4)(e=>e.StudentWorkspace.skillsAndInterests),K=(0,s.d4)(e=>e.StudentWorkspace.locations),Q=(0,s.d4)(e=>e.StudentWorkspace.isRemote),X=(0,s.d4)(e=>e.StudentWorkspace.startDate),ei=(0,s.d4)(e=>e.StudentWorkspace.endDate),eo=(0,s.d4)(e=>e.StudentWorkspace.hoursPerWeek),es=(0,s.d4)(e=>e.StudentWorkspace.compensation),eh=(0,s.d4)(e=>e.StudentWorkspace.liveIsOngoing),ey=(0,s.d4)(e=>e.StudentWorkspace.isLiveProgram),e_=(0,s.d4)(e=>e.StudentWorkspace.isContractPending),eA=(0,s.d4)(e=>e.StudentWorkspace.applicationStatus),eI=(0,s.d4)(e=>e.StudentWorkspace.daysUntilGigDeactivates),eN=(0,s.d4)(e=>e.StudentWorkspace.liveNextProcessingDate),eT=(0,s.d4)(e=>e.StudentWorkspace.contractUrl),{upcomingPayments:eE,recentPayments:eD}=(0,s.d4)(e=>e.StudentWorkspace.overviewSection.paymentDetails),eL=(0,s.d4)(e=>e.StudentWorkspace.overviewSection.tasks),eM=(0,s.d4)(e=>e.StudentWorkspace.overviewSection.canSubmitEngagementReview),eP=(0,s.d4)(e=>Number(e.StudentWorkspace.overviewSection.rating)),eR=(0,s.d4)(e=>e.StudentWorkspace.compensationType),eO=(0,s.d4)(e=>e.StudentWorkspace.overviewSection.isLoadingBalance),ez=(0,s.d4)(e=>e.StudentWorkspace.overviewSection.currentBalance),eq=(0,s.d4)(e=>e.StudentWorkspace.endedGracePeriod),eB=(0,r.useMemo)(()=>eq&&new Date(eq)<new Date,[eq]),eV=(0,r.useMemo)(()=>(0,j.KC)(eN,eB),[eN,eB]),eU=(0,s.d4)(e=>e.StudentWorkspace.studentTimesheetCutoffDate),{data:eW}=(0,ev.GX)({targetUserId:z,gigId:V}),eH=(0,r.useMemo)(()=>{let{isSubmitDayAfterGracePeriodEnded:e}=(0,j.mI)(eN,eq),t=(0,j.MM)(eN),n=(0,j.MM)(eU);return eV?"You'll be able to submit and edit timesheets for this billing period until ".concat(n,". ").concat(e?"Final":""," Payments will be processed on ").concat(t).concat(e?".":" at which point you can submit new time."):"The timesheet submission period has ended for this pay period. ".concat(eq&&e?"":"Come back tomorrow to submit new time.")},[eV,eN,eq,eU]),eF=(0,s.d4)(e=>e.StudentWorkspace.company.slug),eG=(0,s.d4)(e=>e.StudentWorkspace.slug),e$=(0,s.d4)(e=>e.StudentWorkspace.chatId),[eZ,eY]=(0,r.useState)({}),eK=(0,r.useCallback)(e=>{window.localStorage.setItem("".concat(eF,"-").concat(V,"-").concat(e),"true"),eY(t=>
1({...t,["".concat(eF,"-").concat(V,"-").concat(e)]:!0}))},[eF,V]);(0,r.useEffect)(()=>{b&&P(!0)},[b]),(0,r.useEffect)(()=>{C&&E(!0)},[C]),(0,r.useEffect)(()=>{N((0,el.BT)())},[V]);let eQ=(0,r.useMemo)(()=>"ended"===W&&e_||6===eA||!H?null:e_?{"complete-contract":{title:"Complete your contract",text:H?"You cannot start GIG work and get paid until you sign your contract":"You cannot request samplings until you sign your contract",ctaText:"COMPLETE",onClick:()=>{w("contract","true"),E(!0)},icon:null,variant:"primary"}}:"ended"===W&&eB?{"program-ended":{title:"This program has ended",text:"Thanks for being a part of this GIG! Apply to more and keep earning.",ctaText:"APPLY TO GIGS",onClick:()=>a.push("/gigs"),icon:null,variant:"alert"}}:"ended"!==W||eB?"mo"===eR||"one-time"===eR?{"add-notes":{title:eV?"Don't forget to submit timesheets":"Current billing period ended",text:eH,ctaText:eV?"ADD NOTES":null,onClick:()=>a.push("/workspace/".concat(V,"/time")),icon:null,variant:"alert",onDismiss:()=>eK("add-notes")}}:{"submit-hours":{title:"Don't forget to submit your hours",text:eH,ctaText:eV?"SUBMIT HOURS":null,onClick:()=>a.push("/workspace/".concat(V,"/time")),icon:null,variant:"alert",onDismiss:()=>eK("submit-hours")}}:{"program-ended":{title:"This program has ended",text:eH,ctaText:"mo"===eR||"one-time"===eR?eV?"ADD NOTES":null:eV?"SUBMIT HOURS":null,onClick:()=>a.push("/workspace/".concat(V,"/time")),icon:null,variant:"alert"}},[eR,V,e_,a,W,eq,eN]),eX=(0,r.useCallback)(()=>{window.open(eT,"_blank")},[eT]),eJ=(0,r.useMemo)(()=>{let e=[];return eT&&e.push({key:"contract",component:(0,i.jsx)(eb.$,{variant:"solid",$bg:n.colors["gray-70"],$color:n.colors["primary-dark"],fullWidth:I,onClick:eX,children:(0,i.jsxs)(g,{children:["Contract ",(0,i.jsx)(ep.s,{width:16,height:16})]})})}),e.push({key:"extension",component:(0,i.jsx)(eb.$,{variant:"solid",fullWidth:I,onClick:()=>{w("adjustDatesModalOpened","true"),P(!0)},children:"Extend GIG"})}),e},[eT,I]),e0=(0,r.useCallback)(async()=>{let{href:e}=new URL(window.location.href),t=await (0,et.TW)(e);window.open(t.url,"_self")},[]),e1=e=>{let{status:t}=e;switch(t){case"paid":return(0,i.jsx)(y,{children:"PAID"});case"approved":return(0,i.jsx)(y,{children:"APPROVED"});case"upcoming":return(0,i.jsx)(f,{children:"UPCOMING"});case"submitted":return(0,i.jsx)(h,{children:"SUBMITTED"});case"pending":return(0,i.jsx)(h,{children:"PROCESSING"});default:return(0,i.jsx)(h,{children:"IN TRANSIT"})}},e2=(0,r.useMemo)(()=>{let e=[];return eE&&e.push({headerText:"Upcoming Payments",items:eE.map(e=>({imageInfo:[{srcUrl:G,altText:"company logo"}],titleText:"timesheet"===e.type?"mo"===e.compensationType?"Monthly Payment":"one-time"===e.compensationType?" One Time Payment":"".concat(e.hours," Hour").concat(e.hours>1?"s":""):e.type,subtitleText:(0,j.MM)(e.paymentDate),amountComponent:(0,i.jsx)(J,{amount:e.amountString,isPaid:!1}),dateComponent:(0,i.jsx)(e1,{status:e.status})}))}),eD&&eD.length&&e.push({headerText:"Past Payments",items:eD.map(e=>({imageInfo:[{srcUrl:G,altText:"company logo"}],titleText:"timesheet"===e.type?"mo"===e.compensationType?"Monthly":"one-time"===e.compensationType?" One Time":"".concat(e.hours," Hour").concat(e.hours>1?"s":""):e.type,subtitleText:(0,j.MM)(e.paymentDate),amountComponent:(0,i.jsx)(J,{amount:e.amountString,isPaid:!0}),dateComponent:(0,i.jsx)(e1,{status:"paid"})}))}),e},[G,eD,eE]),e3=(0,r.useCallback)(()=>{B(eG),N((0,ex.XV)(!0))},[eG,B]),e4=(0,r.useMemo)(()=>(0,eg.a)({gigId:V,status:eA,slug:eG,router:a,canReport:!0,hasChat:!!e$,hasResume:!!eW,daysUntilGigDeactivates:eI,customCallbacks:{ViewGig:e3,ReportGig:()=>{L(!0)},GoToChat:()=>{a.push("/messages/".concat(e$))},ViewResume:()=>O(!0)},optionsToDisableByKey:[eg.U.OpenGigWorkspace]}),[V,eA,eG,a,e$,eW,eI,e3]),e6=e=>{let{recommendationData:t}=e,n=Object.keys(t)[0],o=window.localStorage.getItem("".concat(eF,"-").concat(V,"-").concat(n)),r=eZ["".concat(eF,"-").concat(V,"-").concat(n)],s=t[n];return(0,i.jsx)(k.A,{...s,isDismissed:!!(o||r)})},e5=(0,r.useMemo)(()=>[{headerText:"Tasks",items:eL.map(e=>({titleText:e.name,subtitleText:er(e.endDate,e.status,e.lastActionDate,e.state),amountComponent:(0,i.jsx)(en.V,{variant:(0,eu._T)((0,eu.fi)(e.endDate,e.status,void 0,e.closedReason,e.state)),children:(0,eu.fi)(e.endDate,e.status,void 0,e.closedReason,e.state)}),itemIsButton:!0,leftColumnIsClickable:!1,onClick:()=>{a.push("/workspace/".concat(V,"/tasks/").concat(e.id))}}))}],[V,a,eL]),e7=(0,r.useMemo)(()=>
1{if(e5.length>0){for(let e=0;e<e5.length;e++)if(e5[e].items.length>0)return!0}},[e5]),e9=(0,s.d4)(e=>e.StudentWorkspace.overviewSection.isAdjustingProgramDates);return(0,i.jsx)(ea.El,{$isStudentWorkspace:!0,children:(0,i.jsxs)(ea.gx,{children:[!I&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ea.$d,{$isStudentWorkspace:!0,noBorderBottom:!0,children:(0,i.jsx)(ea.PF,{$isStudentWorkspace:!0,children:t})}),(0,i.jsxs)(u,{children:[(0,i.jsxs)(p,{children:[(0,i.jsx)(v.A,{statusLabel:W,companyBackgroundUrl:$,companyLogoUrl:G,companySlug:eF,gigTitle:U,skillsAndInterests:Z,locations:K,isRemote:Q,fromDate:X,toDate:ei,hoursPerWeek:eo,liveIsOngoing:eh,compensationString:es,isLiveProgram:ey,buttons:eJ,showKeyInfoBottomBorder:!0,listingType:F,showFollowButton:!1,options:e4}),e7&&(0,i.jsx)(ee,{renderHeroContent:!1,listSections:e5,showViewMore:!0,onClickViewMore:()=>{a.push("/workspace/".concat(V,"/tasks"))}})]}),(0,i.jsxs)(m,{children:[H&&(eM||eP>0)&&(0,i.jsx)(eS,{gigTitle:U,gigId:V,rating:eP,onSetRating:e=>{N((0,el.Tg)(e))}}),eQ&&(0,i.jsx)(e6,{recommendationData:eQ}),H&&(0,i.jsx)(ee,{listSections:e2,heroTitleText:ez,isHeroTitleTextLoading:eO,heroCaptionText:"GIG Earnings",heroHeaderNoteText:"UPDATE BANKING DETAILS",heroHeaderNoteOnClick:e0,showViewMore:!0,onClickViewMore:()=>{a.push("/workspace/".concat(V,"/time"))}})]})]})]}),I&&(0,i.jsxs)(x,{children:[(eM||eP>0)&&(0,i.jsx)(eS,{gigTitle:U,gigId:V,rating:eP,onSetRating:e=>{N((0,el.Tg)(e))}}),eQ&&(0,i.jsx)(e6,{recommendationData:eQ}),(0,i.jsx)(v.A,{statusLabel:W,companyBackgroundUrl:$,companyLogoUrl:G,gigTitle:U,skillsAndInterests:Z,locations:K,isRemote:Q,fromDate:X,toDate:ei,hoursPerWeek:eo,liveIsOngoing:eh,compensationString:es,isLiveProgram:ey,buttons:eJ,showKeyInfoBottomBorder:!0,listingType:F,showFollowButton:!1,footerFlexColumn:!0,companySlug:eF}),H&&(0,i.jsx)(ee,{listSections:e2,heroTitleText:ez,isHeroTitleTextLoading:eO,heroCaptionText:"Balance",heroHeaderNoteText:"UPDATE BANKING DETAILS",heroHeaderNoteOnClick:e0,showViewMore:!0,onClickViewMore:()=>{a.push("/workspace/".concat(V,"/time"))}}),e7&&(0,i.jsx)(ee,{renderHeroContent:!1,listSections:e5,showViewMore:!0,onClickViewMore:()=>{a.push("/workspace/".concat(V,"/tasks"))}})]}),(0,i.jsx)(ec.A,{open:M,onClose:()=>{d("adjustDatesModalOpened"),P(!1)},startDate:X,endDate:ei,liveIsOngoing:eh,liveStartedAt:ey?X:null,gigId:V,isStudent:!0,isLiveProgram:ey,isAdjustingProgramDates:e9,onAdjustProgramDates:(e,t,n)=>{N((0,el.$7)(e,t,n))}}),(0,i.jsx)(S.A,{isOpen:T,onClose:()=>{d("contract"),E(!1)},gigId:V,gigTitle:U,isStudent:!0,title:"Contractor Agreement",isSigned:!e_,onSubmit:e=>N((0,_.do)(V,e,()=>{(null==T?void 0:T.callback)&&T.callback(),N({type:A.O.SET_IS_CONTRACT_PENDING,payload:!1}),setTimeout(()=>{d("contract"),E(!1)},100)}))}),(0,i.jsx)(em.m,{isOpen:D,onClose:()=>L(!1),reportType:"gig",gigId:V,onSuccess:()=>{L(!1),(0,ef.addSuccessNotification)("Thank you for your report")}}),q&&(0,i.jsx)(ew.A,{disableNavigation:!0,gigSlug:q,onSuccess:()=>{B(null),N((0,ex.lt)(null))},closeGigInfoModal:()=>{B(null)}}),R&&(null==eW?void 0:eW.pdfUrl)&&(0,i.jsx)(ek.A,{pdfScale:I?.5:1,isOpen:!!R,onClose:()=>O(!1),content:{url:eW.pdfUrl,name:eW.name,format:"pdf"}}),R&&!(null==eW?void 0:eW.pdfUrl)&&(0,i.jsx)(ej.v,{isOpen:R,onClose:()=>O(!1),file:eW})]})})};var eA=n(14938);let eI=(0,c.Ay)(eA.I).withConfig({displayName:"styles__StyledSegmentedControl",componentId:"sc-c4c5e58f-0"})(["width:fit-content;@media (max-width:","){width:100%;}"],e=>{let{theme:t}=e;return t.breakpoints.md}),eN=c.Ay.div.withConfig({displayName:"styles__TabsHeaderBar",componentId:"sc-c4c5e58f-1"})(["display:inline-flex;align-items:center;padding:4px;border-radius:14px;background:",";box-shadow:0 4px 16px rgba(0,0,0,0.04);@media (max-width:","){width:100%;}"],e=>{let{theme:t}=e;return t.colors.white},e=>{let{theme:t}=e;return t.breakpoints.md}),eT=c.Ay.div.withConfig({displayName:"styles__WorkspaceTitleAndActionsHeader",componentId:"sc-c4c5e58f-2"})(["display:flex;flex-direction:row;align-items:center;position:relative;min-height:clamp(44px,6dvh,56px);gap:1rem;padding:clamp(0.75rem,1.8dvh,2rem) 0;","{align-items:center;padding:0;}",""],ea.$d,e=>{let{theme:t,noBorderBottom:n}=e;return n?(0,c.AH)(["border-bottom:none;"]):(0,c.AH)(["border-bottom:1px solid ",";"],t.colors["blue-30"])}),eE=c.Ay.div.withConfig({displayName:"styles__ToggleContainer",componentId:"sc-c4c5e58f-3"})(["position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;@media (max-width:","){position:static;transform:none;width:100%;}"],e=>{let{theme:t}=e;return t.breakpoints.md}),eD=e=>{let{title:t,headerComponent:n,noBorderBottom:o=!1}=e;return(0,i.jsxs)(ea.$d,{$isStudentWorkspace:!0,noBorderBottom:o,children:[t&&(0,i.jsx)(ea.PF,{$isStudentWorkspace:!0,children:t}),n&&n]})};var eL=n(78189),eM=n(21540);let eP=c.Ay.div.withConfig({displayName:"styles__TaskNameContainer",componentId:"sc-b42575a5-0"})(["width:",";margin-right:0.5rem;"],e=>{let{width:t}=e;return t||"auto"}),eR=c.Ay.p.withConfig({displayName:"styles__TaskLabel",componentId:"sc-b42575a5-1"})(["color:",";font-weight:500;margin:0;width:",";text-align:end;font-size:",";min-width:fit-content;"],e=>{let{isMuted:t,theme:n}=e;return t?n.colors["gray-90"]:n.colors["blue-70"]},e=>{let{width:t}=e;return t||"auto"},e=>{let{theme:t}=e;return t.fontSize.body.md}),eO=c.Ay.div.withConfig({displayName:"styles__StatusContainer",componentId:"sc-b42575a5-2"})(["display:flex;align-items:center;justify-content:flex-end;
1gap:0.5rem;width:",";"],e=>{let{width:t}=e;return t||"auto"}),ez=c.Ay.div.withConfig({displayName:"styles__PageContainer",componentId:"sc-b42575a5-3"})(["display:flex;flex-direction:column;"]),eq=c.Ay.div.withConfig({displayName:"styles__ListViewContainer",componentId:"sc-b42575a5-4"})(["gap:1rem;display:flex;flex-direction:column;"]),eB=c.Ay.div.withConfig({displayName:"styles__TaskHeaderContainer",componentId:"sc-b42575a5-5"})(["display:flex;width:100%;background-color:",";padding:0.5rem 1rem 0.5rem 3rem;border-top:1px solid ",";"],e=>{let{theme:t}=e;return t.colors["blue-50"]},e=>{let{theme:t}=e;return t.colors["blue-30"]}),eV=c.Ay.p.withConfig({displayName:"styles__TaskHeaderLabel",componentId:"sc-b42575a5-6"})(["width:",";text-align:end;font-family:",";color:",";margin:0;font-weight:600;&:first-child{text-align:start;}"],e=>{let{width:t}=e;return t},e=>{let{theme:t}=e;return t.fonts.quaternary},e=>{let{theme:t}=e;return t.colors.placeholder});(0,c.Ay)(eM.A).withConfig({displayName:"styles__StyledExpandableList",componentId:"sc-b42575a5-7"})([".list-header{display:flex;width:100%;background-color:",";border-radius:0.25rem;justify-content:space-between;padding:0.5rem;}.expanded-icon-container{color:",";}.custom-list-component-container{display:flex;flex-direction:column;gap:1rem;margin-bottom:1rem;}.load-more-button{margin-top:0;}"],e=>{let{theme:t,backgroundColor:n}=e;return n||t.colors["blue-50"]},e=>{let{theme:t,primary:n,isExpanded:i}=e;return n?t.colors.white:i?"black":t.colors["blue-70"]});let eU=c.Ay.span.withConfig({displayName:"styles__SectionLabel",componentId:"sc-b42575a5-8"})(["margin:0;font-size:",";font-weight:600;color:",";"],e=>{let{theme:t}=e;return t.fontSize.body.md},e=>{let{theme:t,fontColor:n}=e;return n||t.colors["blue-70"]}),eW=c.Ay.span.withConfig({displayName:"styles__TaskNumber",componentId:"sc-b42575a5-9"})(["margin:0;font-size:",";font-weight:500;color:",";margin-left:1rem;"],e=>{let{theme:t}=e;return t.fontSize.body.md},e=>{let{theme:t,primary:n}=e;return n?t.colors["blue-10"]:t.colors.placeholder}),eH=c.Ay.div.withConfig({displayName:"styles__TaskVerticalDivider",componentId:"sc-b42575a5-10"})(["height:30px;width:4px;border-radius:3px;margin-right:2rem;background-color:",";@media (max-width:","){display:none;}"],e=>{let{theme:t,type:n}=e;switch(n){case"content":return t.colors["blue-90"];case"regular":return t.colors["blue-10"];case"sampling":return t.colors["green-90"];default:return t.colors["gray-50"]}},e=>{let{theme:t}=e;return t.breakpoints.md}),eF=c.Ay.p.withConfig({displayName:"styles__NoTasksLabel",componentId:"sc-b42575a5-11"})(["margin:0;color:",";font-weight:600;font-size:",";font-family:",";text-align:center;padding:0 1rem;"],e=>{let{theme:t}=e;return t.colors.placeholder},e=>{let{theme:t}=e;return t.fontSize.body.md},e=>{let{theme:t}=e;return t.fonts.quaternary});var eG=n(67768),e$=n(40097),eZ=n(42656),eY=n(88239);let eK=e=>(0,i.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,i.jsx)("path",{d:"M15.7443 7.3785L9.9661 1.6002C9.80116 1.43526 9.58132 1.34473 9.34692 1.34473C9.11225 1.34473 8.89255 1.43539 8.7276 1.6002L8.20299 2.12495C8.03818 2.28963 7.94738 2.5096 7.94738 2.74413C7.94738 2.97853 8.03818 3.20591 8.20299 3.3706L11.5739 6.74891H0.864383C0.381525 6.74891 0 7.12692 0 7.60991V8.35176C0 8.83475 0.381525 9.25087 0.864383 9.25087H11.6121L8.20312 12.648C8.03831 12.813 7.94751 13.027 7.94751 13.2615C7.94751 13.4958 8.03831 13.7129 8.20312 13.8777L8.72773 14.4008C8.89268 14.5657 9.11238 14.6556 9.34705 14.6556C9.58145 14.6556 9.80129 14.5645 9.96623 14.3996L15.7444 8.62142C15.9097 8.45595 16.0007 8.23508 16 8.00028C16.0005 7.76471 15.9097 7.5437 15.7443 7.3785Z",fill:"currentColor"})}),eQ=e=>(0,i.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.99769 0.0527357C9.19364 0.0520562 10.3743 0.321308 11.4517 0.840425C12.5292 1.35956 13.4756 2.11521 14.2204 3.05101C14.965 3.98682 15.489 5.07866 15.753 6.24514C16.0172 7.41163 16.0144 8.62267 15.7454 9.78798C15.4762 10.9533 14.9476 12.0429 14.1986 12.9754C13.4498 13.908 12.5001 14.6594 11.4205 15.1739C10.3407 15.6883 9.15886 15.9525 7.96287 15.9465C6.8304 15.9409 5.71296 15.6934 4.68517 15.2213L0.724049 15.9375C0.521666 15.9741 0.315229 15.8991 0.183511 15.7411C0.0517943 15.5832 0.0151177 15.3666 0.0874769 15.1742L1.22374 12.1511C0.5262 11.0124 0.125946 9.71485 0.0622433 8.37789C-0.00617143 6.94203 0.316158 5.5145 0.994902 4.24734C1.67365 2.98019 2.68338 1.92086 3.91657 1.1822C5.14971 0.443558 6.56027 0.0532146 7.99769 0.0527357ZM4.31583 7.9979L4.31636 7.99966L4.31583 8.00144L4.31519 8.00256L4.31407 8.0032L4.3123 8.00372L4.31054 8.0032L4.30942 8.00256L4.30878 8.00144L4.30825 7.99966L4.30878 7.9979L4.30942 7.99678L4.31054 7.99614L4.3123 7.99562L4.31407 7.99614L4.31519 7.99678L4.31583 7.9979ZM8.00411 7.99966L8.00358 7.9979L8.00294 7.99678L8.00182 7.99614L8.00006 7.99562L7.99829 7.99614L7.99717 7.99678L7.99653 7.9979L7.996 7.99966L7.99653 8.00144L7.99717 8.00256L7.99829 8.0032L8.00006 8.00372L8.00182 8.0032L8.00294 8.00256L8.00358 8.00144L8.00411 7.99966ZM11.6913 7.9979L11.6919 7.99966L11.6913 8.00144L11.6906 8.00256L11.6896 8.0032L11.6878 8.00372L11.6861 8.0032L11.6849 8.00256L11.6842 8.00144L11.6838 7.99966L11.6842 7.9979L11.6849 7.99678L11.6861 7.99614L11.
16878 7.99562L11.6896 7.99614L11.6906 7.99678L11.6913 7.9979Z",fill:"currentColor"})});var eX=n(94403),eJ=n(66372),e0=n(58979),e1=n(59904),e2=n(7306),e3=n(32162),e4=n(5503);let e6=e=>{var t,n;return{id:e.task.id,name:e.task.name,subtype:null!=(t=e.task.subtype)?t:null,approvalFlow:null!=(n=e.task.approvalFlow)?n:null}};var e5=n(19947),e7=n(1675),e9=n(48343),e8=n(12458),te=n(86633);let tt=c.Ay.div.withConfig({displayName:"styles__TaskRowGroup",componentId:"sc-12d18310-0"})(["display:flex;flex-direction:column;gap:0.5rem;&& > *:first-child{margin-top:0;}&&:first-child > *:first-child{margin-top:1rem;}"]),tn=(0,c.Ay)(te.b).withConfig({displayName:"styles__TaskActionStrip",componentId:"sc-12d18310-1"})(["margin-left:calc(4px + 2rem + 1.5rem);@media (max-width:","){margin-left:0.75rem;}"],e=>{let{theme:t}=e;return t.breakpoints.md}),ti=ea.SR,to=e2.A,tr=["reupload","review-feedback"],ts=["complete-form","complete-regular"],ta=["upload","upload-after-rejection","upload-more"],tl=e=>ta.includes(e.kind)||null!==e.targetPieceId,td=e=>{var t,n,o;let{gigId:a,section:l,columns:d,initialExpanded:c,onClickSubmissions:u,viewerContext:p}=e,[m,h]=(0,r.useState)(c),[y,f]=(0,r.useState)(c),[g,x]=(0,r.useState)(null),[w,b]=(0,r.useState)(null),[C,v]=(0,r.useState)(null),k=(0,eG.jE)(),j=(0,s.wA)(),S=(0,e5.B)(a,l.id,y),_=e=>(e&&k.invalidateQueries({queryKey:(0,e0.U2)(e)}),(0,e5.Mu)(k,a)),A=()=>{x(null),_()},{submission:I,isLoading:N,isFetching:T}=(0,e0.KR)({taskId:null==w?void 0:w.task.id,enabled:!!w});(0,r.useEffect)(()=>{var e,t;if(!w||N||T)return;if(!I){b(null),j((0,e1.cM)()),u(w.task);return}let n=(0,eJ.NA)(w,p),i=null!=(t=null==(e=I.content)?void 0:e.find(e=>e.id===(null==n?void 0:n.targetPieceId)))?t:null,o=n&&(e=>{let{row:t,action:n,piece:i}=e,o=e6(t);if("submit-link"===n.kind)return i?(0,e3.L)({id:i.id,status:i.status,task:o}):null;if("reupload"===n.kind){var r;let e=null==i||null==(r=i.files)?void 0:r[0];return i&&(null==e?void 0:e.fileKey)?(0,e4.p)({...i,task:o}):null}return(0,e4.N)(o)})({row:w,action:n,piece:i});if(b(null),!n||!o){j((0,e1.cM)()),u(w.task);return}j((0,e1.$w)(o)),v({row:w,action:n,task:I.task,piece:i})},[w,I,N,T,p,j,u]);let E=(0,r.useRef)(null!=C?C:w);(0,r.useEffect)(()=>{E.current=null!=C?C:w},[C,w]),(0,r.useEffect)(()=>()=>{E.current&&j((0,e1.cM)())},[j]);let D=(0,e$.n)({mutationFn:e=>{let{submissionId:t,notes:n}=e;return(0,e8.vV)(a,t,n)},onSuccess:A,onError:()=>(0,ef.addErrorNotification)("There was an error completing this task")}),L=w?(0,eJ.NA)(w,p):null,M=w&&L?{row:w,action:L,piece:null!=(o=null==(t=w.content)?void 0:t.find(e=>e.id===L.targetPieceId))?o:null}:null,P=g?null==(n=(0,eJ.NA)(g,p))?void 0:n.kind:void 0,R=S.isPending||S.isError?l.value:S.totalItems;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(eX.u,{dataTestId:"student-task-section-".concat(l.id),list:S,backgroundColor:l.backgroundColor,isExpanded:m,onToggleExpanded:()=>{h(e=>!e),f(!0)},title:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(eU,{fontColor:l.color,children:l.label}),(0,i.jsxs)(eW,{children:[R," ",1===R?"Task":"Tasks"]})]}),renderItem:e=>{let t=(0,eJ.NA)(e,p),n=t?(0,eJ.it)(t):null;return(0,i.jsxs)(tt,{children:[(0,i.jsxs)(ti,{onClick:()=>u(e.task),children:[(0,i.jsx)(eH,{type:e.task.type}),(0,i.jsx)(ea.X$,{children:d.map(t=>t.onRenderItem(e,t.width))})]}),t&&n&&(0,i.jsx)(tn,{variant:"action",testId:"task-action-strip-".concat(e.id),icon:tr.includes(t.kind)?(0,i.jsx)(eQ,{"aria-hidden":!0,focusable:"false"}):(0,i.jsx)(eK,{"aria-hidden":!0,focusable:"false"}),text:n.message,actionLabel:n.ctaLabel,actionDisabled:(null==w?void 0:w.id)===e.id,onActionIntent:tl(t)?()=>k.prefetchQuery((0,e0.Pe)(e.task.id)):void 0,onAction:()=>{if(ts.includes(t.kind))return void x(e);if(tl(t)){j((0,e1.$w)((e=>{var t,n,i;let{row:o,action:r}=e,s=e6(o),a=null!=(n=null==(t=o.content)?void 0:t.find(e=>e.id===r.targetPieceId))?n:null;return"submit-link"===r.kind&&a?(0,e3.L)({id:a.id,status:a.status,task:s}):"reupload"===r.kind&&a?{...(0,e4.N)(s),id:a.id,view:"edit",status:null!=(i=a.status)?i:""}:(0,e4.N)(s)})({row:e,action:t}))),b(e);return}u(e.task)}})]})},renderEmptyState:()=>(0,i.jsx)(ti,{children:(0,i.jsx)(eF,{children:"No tasks"})})}),g&&"complete-form"===P&&(0,i.jsx)(e7.r,{isOpen:!0,onClose:()=>x(null),gigId:a,submissionId:g.id,taskName:g.task.name,onCompleted:A}),(0,i.jsx)(e9.t,{isOpen:!!g&&"complete-regular"===P,onClose:()=>x(null),isLoadingSubmit:D.isPending,onSubmit:e=>g&&D.mutate({submissionId:g.id,notes:e})}),!C&&M&&(0,i.jsx)(to,{isOpen:!0,isPreparing:!0,emitterId:"studentTaskList",linksContent:"submit-link"===M.action.kind&&M.piece?{...M.piece,task:M.row.task}:null,requiresLiveLink:M.row.task.subtype===eY.p.SOCIAL_POST&&M.row.task.approvalFlow===eZ.O.AUTO,contentFlow:{task:M.row.task,submissionState:M.row.state,content:M.piece},onClose:()=>{b(null),j((0,e1.cM)())}},"preparing-".concat(M.row.id)),C&&(0,i.jsx)(to,{isOpen:!0,emitterId:"studentTaskList",linksContent:"submit-link"===C.action.kind&&C.piece?{...C.piece,task:C.task}:null,requiresLiveLink:C.task.subtype===eY.p.SOCIAL_POST&&C.task.approvalFlow===eZ.O.AUTO,deliverableFormat:C.task.deliverableFormat,requiresAdCode:!!C.task.requiresAdCode,contentFlow:{task:C.task,submissionState:C.row.state,content:C.piece},onClose:()=>
1{v(null),j((0,e1.cM)())},onSuccess:()=>_(C.task.id),onPartialFailure:()=>_(C.task.id)},"ready-".concat(C.row.id))]})};var tc=n(22906),tu=n(32276),tp=n(74670);let tm=e=>{let{onClickSubmissions:t}=e,n=(0,Y.Q)("md").isResponsive,o=(0,s.d4)(e=>e.StudentWorkspace.id),a=(0,s.d4)(e=>{let{StudentWorkspace:t}=e;return t.tasksSection.taskOverviewSections}),l=(0,s.d4)(e=>e.StudentWorkspace.applicationStatus),d=(0,s.d4)(e=>e.StudentWorkspace.endedGracePeriod),c=(0,r.useMemo)(()=>({applicationStatus:l,endedGracePeriod:d}),[l,d]),u=(0,r.useMemo)(()=>{let e=a.find(e=>e.value>0);return e&&"completed"!==e.id?e.id:null},[a]),p=(0,r.useMemo)(()=>["task","dueDate","status"],[]),m=(0,r.useMemo)(()=>{let e=[{label:"Task",key:"task",width:n?"60%":"45%",onRenderItem:(e,t)=>(0,i.jsx)(eP,{width:t,children:(0,i.jsx)(tc.A,{title:e.task.name,type:e.task.type})})},{label:"Task Type",key:"taskType",width:"20%",onRenderItem:(e,t)=>(0,i.jsx)(eR,{width:t,children:(0,j.m)(e.task.type)})},{label:"Due Date",key:"dueDate",width:"15%",onRenderItem:(e,t)=>{let{isTerminal:n}=(0,eJ.jd)({status:e.status,closedReason:e.closedReason});return(0,i.jsx)(eR,{width:t,isMuted:n,children:(0,j.ZD)(e.endDate)})}},{label:"Status",key:"status",width:n?"25%":"20%",onRenderItem:(e,n)=>{var o,r;let s=(0,eJ.t9)({contents:e.content,requiredContentCount:null==(o=e.task)?void 0:o.requiredContentCount}),{isComplete:a,hasStarted:l,outcome:d,awaitsLink:c}=(0,eJ.jd)({status:e.status,state:e.state,contentCount:e.content.length,taskCompletedAt:null==(r=e.task)?void 0:r.completedAt,closedReason:e.closedReason});return(0,i.jsxs)(eO,{width:n,children:[(0,i.jsx)(tu.A,{hasStartedTask:l,completedCount:s.approvedCount,submittedCount:s.total,isComplete:a,outcome:d,awaitsLink:c,taskType:e.task.type}),(0,i.jsx)(tp.A,{item:e,options:[{label:"View Details",value:"view-details",onClick:()=>t(e.task)}]})]})}}];return n?e.filter(e=>p.includes(e.key)):e},[n,p,t]);return(0,i.jsx)(ez,{children:(0,i.jsxs)(eq,{children:[!n&&(0,i.jsx)(eB,{children:m.map(e=>(0,i.jsx)(eV,{width:e.width,children:e.label},e.label))}),a.map(e=>(0,i.jsx)(td,{gigId:o,section:e,columns:m,initialExpanded:u===e.id,onClickSubmissions:t,viewerContext:c},e.id))]})})},th=e=>async t=>{try{let{data:n}=await (0,e8.t9)(e);t({type:A.O.SET_TASK_SUBMISSIONS_BASIC_INFO,payload:n})}catch(e){if((null==e?void 0:e.type)==="RESOURCE_NOT_FOUND")return void t({type:A.O.SET_TASK_SUBMISSION_NOT_FOUND,payload:!0});(0,ef.addErrorNotification)("Failed to load basic information.")}},ty=e=>{let{sectionTitle:t,gigId:n}=e,{isResponsive:a}=(0,Y.Q)("md"),l=(0,s.wA)(),d=(0,o.useRouter)(),c=(0,s.d4)(e=>{let{StudentWorkspace:t}=e;return t.tasksSection.taskStep}),u=(0,r.useMemo)(()=>[{label:"Overview",step:"overview",component:tm,onClick:()=>{window.history.pushState(null,"","/workspace/".concat(n,"/tasks"))}}],[n]),p=(0,r.useMemo)(()=>{let e=u.findIndex(e=>e.step===c);return -1===e?0:e},[u,c]),m=(0,r.useMemo)(()=>u[p],[u,p]),h=(0,r.useMemo)(()=>(null==m?void 0:m.component)||null,[null==m?void 0:m.component]),y=!a,f=u.length>1;return(0,i.jsx)(ea.El,{$isStudentWorkspace:!0,children:(0,i.jsx)(ea.gx,{children:(0,i.jsx)(eL.nA,{children:(0,i.jsxs)(i.Fragment,{children:[(y||f)&&(0,i.jsxs)(eT,{noBorderBottom:!0,children:[y&&(0,i.jsx)(eD,{noBorderBottom:!0,title:t}),f&&(0,i.jsx)(eE,{children:(0,i.jsx)(eN,{children:(0,i.jsx)(eI,{options:u.map(e=>({label:e.label,value:e.step}
1)),activeIndex:p,size:a?"default":"compact",onChange:e=>{let t=u[e];if(t){let e;t.onClick&&t.onClick(),l((e=t.step,t=>{t({type:A.O.SET_TASK_STEP,payload:e})}))}},testIdPrefix:"student-task-tab"})})})]}),h&&(0,i.jsx)(h,{onClickSubmissions:e=>{let t="overview"===c?"":"?back=".concat(c);d.push("/workspace/".concat(n,"/tasks/").concat(e.id).concat(t))}})]})})})})};var tf=n(82660),tg=n(72133),tx=n(57761),tw=n(71720);let tb=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return async(n,i)=>{let o=i().StudentWorkspace.id,{isLoadingSubmit:r}=i().StudentWorkspace.timeTrackingSection,{needsToOnboardOnStripe:s,liveNextProcessingDate:a,endedGracePeriod:l}=i().StudentWorkspace;if(s)return void(0,ef.addErrorNotification)("Please onboard to Stripe to submit time");let d=l&&new Date(l)<new Date;if(!(0,j.KC)(a,d))return void(0,ef.addErrorNotification)("Time submission is closed for the current period");if(!r){n({type:A.O.SET_STUDENT_IS_SUBMIT_TIME_LOADING,payload:!0});try{await (0,e8.ys)(o,{hours:e.hours,date:(0,tw.iS)(e.date),notes:e.notes,compensationType:e.compensationType,amount:e.amount,id:e.id}),t&&t(),n({type:A.O.SET_STUDENT_IS_SUBMIT_TIME_LOADING,payload:!1})}catch(e){(0,ef.addErrorNotification)(e.message||"Something went wrong while adding time tracking item"),n({type:A.O.SET_STUDENT_IS_SUBMIT_TIME_LOADING,payload:!1})}}}},tC=e=>async t=>{try{t({type:A.O.SET_LOADING_TIME_ENTRY_DETAILS,payload:!0});let{data:n}=await (0,e8.Ux)(e);t({type:A.O.SET_TIME_ENTRY_PERIOD_DATA,payload:n}),t({type:A.O.SET_LOADING_TIME_ENTRY_DETAILS,payload:!1})}catch(e){(0,ef.addErrorNotification)("Something went wrong while loading time tracking details"),t({type:A.O.SET_LOADING_TIME_ENTRY_DETAILS,payload:!1})}},tv=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return async(n,i)=>{try{let{isLoadingUpdate:o}=i().StudentWorkspace.timeTrackingSection,r=i().StudentWorkspace.id,{endedGracePeriod:s,liveNextProcessingDate:a}=i().StudentWorkspace;if(o)return;let l=s&&new Date(s)<new Date;if(!(0,j.KC)(a,l))return void(0,ef.addErrorNotification)("Time submission is closed for the current period");n({type:A.O.SET_UPDATE_LOADING,payload:!0}),await (0,e8.sE)(r,{...e,date:(0,tw.iS)(e.date)}),t&&t(),n({type:A.O.SET_UPDATE_LOADING,payload:!1})}catch(e){(0,ef.addErrorNotification)("Something went wrong while updating time tracking details"),n({type:A.O.SET_UPDATE_LOADING,payload:!1})}}};var tk=n(954),tj=n(70627),tS=n(45108),t_=n(53380),tA=n(17404),tI=n(34162),tN=n(46340),tT=n(15558);let tE=c.Ay.div.withConfig({displayName:"styles__MobileTimeTrackingContainer",componentId:"sc-b9db8e72-0"})(["display:flex;flex-direction:column;gap:1rem;position:relative;"]),tD=c.Ay.div.withConfig({displayName:"styles__TimeTrackingMobileDetails",componentId:"sc-b9db8e72-1"})(["display:flex;flex-direction:column;gap:1rem;"]),tL=c.Ay.div.withConfig({displayName:"styles__MobileGridContainer",componentId:"sc-b9db8e72-2"})(["display:flex;flex-direction:column;"]),tM=c.Ay.button.withConfig({displayName:"styles__AddTimeButton",componentId:"sc-b9db8e72-3"})(["display:flex;justify-content:center;align-items:center;color:",";position:fixed;width:4rem;height:4rem;background-color:",";border:none;border-radius:99999999px;bottom:1rem;right:2rem;cursor:pointer;opacity:0;animation:"," 0.3s ease-out 0.75s forwards;z-index:999;"],e=>{let{theme:t}=e;return t.colors.white},e=>{let{theme:t}=e;return t.colors.primary},ea.MD),tP=c.Ay.div.withConfig({displayName:"styles__KeyPeriodInfoContainer",componentId:"sc-b9db8e72-4"})(["display:flex;flex-direction:row;gap:1rem;margin-left:auto;@media (max-width:","){justify-content:space-between;margin-left:unset;flex:1;gap:0;}"],e=>{let{theme:t}=e;return t.breakpoints.md}),tR=c.Ay.div.withConfig({displayName:"styles__DateSelectorContainer",componentId:"sc-b9db8e72-5"})(["width:max-content;margin-left:auto;@media (max-width:","){width:100%;}"],e=>{let{theme:t}=e;return t.breakpoints.md});var tO=n(21898),tz=n(29893),tq=n(5111),tB=n(31562),tV=n(10286);let tU=e=>{let{isStudentRemoved:t,onDeleteTimesheet:n,onEditTimesheet:o,onClickAddTime:r,items:s,onNext:a,onPrevious:l,page:d,hasMore:c,itemsPerPage:u,totalItems:p,infiniteScrollIsLoading:m,isHourlyCompensation:h,compensation:y,totalCompensation:f,currentPeriodData:g,dateInputOptions:x,hoursPerWeekNumberString:w,liveNextProcessingDate:b,setIsTimeEntryViewOnly:C,onGetStudentTimesheetActions:v,isLiveProgram:k,canSubmitTime:j,isRegularGig:S}=e;return(0,i.jsxs)(tE,{children:[(0,i.jsx)(tV.X,{}),(0,i.jsxs)(tD,{children:[(0,i.jsxs)(tP,{children:[(0,i.jsx)(tk.k,{mainText:y,captionText:"RATE"}),(0,i.jsx)(tB.GW,{}),(0,i.jsx)(tk.k,{mainText:h?g.totalHours||"0":g.hoursPerWeek||w,captionText:h?"TOTAL HOURS":"HOURS PER WEEK"}),(0,i.jsx)(tB.GW,{}),(0,i.jsx)(tT.P,{mainText:g.totalAmountString,captionText:"".concat(new Date(g.periodEnd)>new Date?"SCHEDULED":"PAID ON"," ").concat((0,tN.Du)(g.periodEnd||b))})]}),(0,i.jsx)(tR,{children:x.length>0&&(0,i.jsx)(tA.r,{datePeriodInputOptions:x,textColor:t_.A.colors.primary,borderColor:t_.A.colors.primary})})]}),m&&[0,1,2,3,4].map(()=>(0,i.jsx)(Q.G,{height:60})),!m&&0===s.length&&(0,i.jsx)(tz.Q,{mainDescriptionText:h?"No time submitted yet":"No compensation notes submitted yet",children:(0,i.jsx)(tq.b,{})}),!m&&0!==s.length&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(tL,{children:s.map((e,t)=>(0,i.jsx)(tO.A,{item:e,index:t,onDeleteTimesheet:n,onEditTimeSheet:o,isHourlyCompensation:h,setIsTimeEntryViewOnly:C,isStudent:!0,onGetTimesheetActions:v,compensation:f},e.id))}),(0,i.jsx)(tx.j,{onNext:a,onPrevious:l,page:d,hasMore:c,itemsPerPage:u,totalItems:p})]}),S&&!t&&k&&j&&(0,i.jsx)(tM,{type:"button","data-testid":"mobile-add-time-button",onClick:()=>r(),children:(0,i.jsx)(X.c,{})})]})};var tW=n(51332),tH=n(99195),tF=n(31996),tG=n(47924);let t$=e=>{var t;let{sectionTitle:n,gigId:a}=e,{isResponsive:l}=(0,Y.Q)("md"),d=(0,o.useRouter)(),c=(0,s.wA)(),[u,p]=(0,r.useState)("current"),[m,h]=(0,r.useState)(0),[y,f]=(0,r.useState)(!1),g=(0,s.d4)(e=>e.StudentWorkspace.compensation),x=(0,s.d4)(e=>e.StudentWorkspace.timeTrackingSection.paymentPeriods),w=(0,s.d4)(e=>e.StudentWorkspace.timeTrackingSection.isLoadingCSVData),b=(0,s.d4)(e=>e.StudentWorkspace.isStudentRemoved),C=(0,s.d4)(e=>e.StudentWorkspace.startDate),v=(0,s.d4)(e=>e.StudentWorkspace.endDate),k=(0,s.d4)(e=>e.StudentWorkspace.compensationType),S=(0,s.d4)(e=>e.StudentWorkspace.listingType===eC.e.REGULAR),_=(0,s.d4)(e=>e.StudentWorkspace.hoursPerWeekNumberString),N=(0,s.d4)(e=>e.StudentWorkspace.liveNextProcessingDate),T=(0,s.d4)(e=>e.StudentWorkspace.endedGracePeriod),E=(0,s.d4)(e=>e.StudentWorkspace.totalCompensation),D=(0,s.d4)(e=>e.StudentWorkspace.status),L=(0,s.d4)(e=>e.StudentWorkspace.isLiveProgram),M=new URLSearchParams(null==(t=window)?void 0:t.location.search),P=null==M?void 0:M.get("periodStart"),R=null==M?void 0:M.get("periodEnd"),[O,z]=(0,r.useState)(null),[q,B]=(0,r.useState)(!1),[V,U]=(0,r.useState)(!1),W=(0,r.useMemo)(()=>T&&new Date(T)<new Date,[T]),H=(0,r.useMemo)(()=>T&&new Date(T)>=new Date,[T]),F=(0,r.useMemo)(()=>(0,j.KC)(N,W),[N,W]),{storeVisitedItemInLocalStorage:G,isItemVisitedInLocalStorage:$}=(0,tG.s)("time-tracking-first-time-notice",e=>e),X=(0,r.useMemo)(()=>
1{if("ended"===D&&!F||H)return!1;let e=$(a),t=new Date(N);return t.setDate(t.getDate()-5),!(t>new Date)&&!e&&!y},[F,y,a,D,H,$,N]),J=(0,s.d4)(e=>e.StudentWorkspace.studentTimesheetCutoffDate),ee=(0,r.useMemo)(()=>{let{isSubmitDayAfterGracePeriodEnded:e}=(0,j.mI)(N,T),t=(0,j.MM)(N),n=(0,j.MM)(J);return F?"You'll be able to submit and edit timesheets until ".concat(n,". Payments will be processed on ").concat(t," ").concat(e?"at which point you can submit new time.":""):"The timesheet submission period has ended for this pay period. ".concat(e?"Come back tomorrow to submit new time.":"")},[F,N,T,J]);(0,r.useEffect)(()=>{if(P&&R){let e=new Date(P).getTime(),t=new Date(R).getTime(),n=new Date(C).getTime(),i=new Date(v).getTime();if(P<n||R>i)return;let o=x.find(n=>new Date(n.periodStart).getTime()===e&&new Date(n.periodEnd).getTime()===t);o&&p(o.period)}},[v,C,x,R,P]);let et=(0,r.useMemo)(()=>x.find(e=>e.period===u)||{},[u,x]),{items:ei,onNext:eo,onPrevious:er,hasMore:es,page:el,onSearch:ed,isFirstPageLoading:ec,isLoading:eu,onResetState:ep}=(0,K.X)({apiUrl:"/v3/student-workspace/time-tracking/".concat(a),itensPerPage:9,defaultFilters:P&&R?{periodStart:P,periodEnd:R}:{},onParseResponse:e=>{let{data:t}=e;return h(t.totalItems),{items:t.items}}});(0,r.useEffect)(()=>{c(tC(a))},[a]);let em=(0,r.useMemo)(()=>x.map(e=>({id:e.period,label:"".concat((0,j.MM)(e.periodStart)," to ").concat((0,j.MM)(e.periodEnd)),onClick:()=>{p(e.period),ed(null,"current"===e.period?{}:{periodStart:e.periodStart,periodEnd:e.periodEnd})}})),[x]),eh=(0,r.useCallback)((e,t)=>{c(tb({hours:e.hours,date:e.date,notes:e.notes,compensationType:e.compensationType.value,amount:e.amount},()=>{ep(),t(),c(tC(a))}))},[el]),ey=(0,r.useCallback)(e=>{c(((e,t)=>async(n,i)=>{try{let{isLoadingDelete:o}=i().StudentWorkspace.timeTrackingSection,r=i().StudentWorkspace.id;if(o)return;n({type:A.O.SET_DELETE_LOADING,payload:!0}),await (0,e8.Ql)(r,e),t&&t(),(0,ef.addSuccessNotification)("Time tracking details deleted successfully")}catch(e){(0,ef.addErrorNotification)("Something went wrong while deleting time tracking details")}finally{n({type:A.O.SET_DELETE_LOADING,payload:!1})}})(e,()=>{ep(),c(tC(a)),B(!1),z({})}))},[a]),eg=(0,r.useCallback)(e=>{B(!0),z({...e,compensationType:e.type})},[]),ex=(0,r.useCallback)(e=>{ey(e.id)},[]),ew=(0,r.useCallback)(e=>{let t=[{label:"View",onClick:()=>{U(!0),eg(e)}}];return e.invoiceId||"submitted"!==e.status||e.userId!==e.addedBy||e.companyEditedAt||!F||t.push({label:"Edit",onClick:()=>eg(e)},{label:"Delete",onClick:()=>ex(e)}),t},[F,ex,eg]),eb=[{label:"Date",key:"date",onRenderItem:e=>(0,i.jsx)(tj.m,{children:(0,j.po)(e.date,!1,!0)})},{label:"Type",key:"type",onRenderItem:e=>{let t="";switch(e.type){case"mo":t="Monthly";break;case"one-time":t="One-time";break;case"hr":t=0===e.amount?"Note":"Hourly";break;default:t=e.type.charAt(0).toUpperCase()+e.type.slice(1)}return(0,i.jsx)(tj.m,{wrapText:!1,children:t})}},{label:"Note",key:"note",onRenderItem:e=>(0,i.jsx)(tj.m,{tooltipText:e.note,children:e.note})},..."hr"===k?[{label:"Time",key:"time",onRenderItem:e=>["bonus","commission","other"].includes(e.type)?(0,i.jsx)(tW.A,{isLarge:!0,title:"".concat(e.type.charAt(0).toUpperCase()+e.type.slice(1)," compensation is not attached to time worked. It is a one-time payment for your work."),children:(0,i.jsx)("div",{children:(0,i.jsx)(tj.m,{children:"-"})})}):(0,i.jsxs)(tj.m,{children:[e.hours," ",Number(e.hours)>1?"hrs":"hr"]})}]:[],{label:"Total",key:"total",onRenderItem:e=>{if(!e.isStripeOnboarded)return(0,i.jsx)(tj.m,{children:(0,i.jsx)(tW.A,{isLarge:!0,title:"It looks like you still need to onboard to Stripe. The sooner you connect your account, the sooner you'll get paid. Any compensation you miss while you aren't onboarded will be paid on the first billing date after you onboard.",children:(0,i.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,i.jsx)(tH.m,{width:"20",height:"20"})})})});if("hr"===e.type&&0===e.amount)return(0,i.jsx)(tW.A,{isLarge:!0,title:"Notes are not associated with a total amount. They are used to give extra context to what you worked on during this pay period.",children:(0,i.jsx)("span",{children:(0,i.jsx)(tj.m,{children:"-"})})});let t=e.userId===e.addedBy;return(0,i.jsxs)(tf.fg,{children:["".concat(e.totalAmount),e.companyEditedAt&&(0,i.jsx)(tW.A,{title:"This time entry was edited by a company admin".concat(t?" and can no longer be edited.":"."),children:(0,i.jsx)(tf.Tu,{children:(0,i.jsx)(tF.q,{variant:4,width:14,height:14})})})]})}},{label:"Status",key:"status",setContentWidthFitContent:!0,onRenderItem:e=>{let t=ew(e);return(0,i.jsxs)(tf.g8,{children:[(0,i.jsx)(tS.t,{variant:"rejected"===e.status?en.J.RED:e.invoiceId?en.J.GREEN:e
1n.J.YELLOW,children:e.status.charAt(0).toUpperCase()+e.status.slice(1)}),(0,i.jsx)(tI.A,{options:t})]})}}],ev=(0,r.useCallback)(async()=>{let e=[];(await c(async(e,t)=>{try{let{isLoadingCSVData:n}=t().StudentWorkspace.timeTrackingSection;if(n)return;e({type:A.O.SET_LOADING_TIME_TRACKING_CSV_DATA,payload:!0});let i=t().StudentWorkspace.id,{data:o}=await (0,e8.Tk)(i);return e({type:A.O.SET_LOADING_TIME_TRACKING_CSV_DATA,payload:!1}),o}catch(t){(0,ef.addErrorNotification)("Something went wrong while loading CSV data"),e({type:A.O.SET_LOADING_TIME_TRACKING_CSV_DATA,payload:!1})}})).forEach(t=>{let n='"'.concat(t.note.replace(/(\r\n|#|\n|\r)/gm," "),'"'),i='"'.concat(t.totalAmount,'"');e.push([t.date,n,t.hours,i,t.status])}),(0,j.GF)(e,"time-entries")},[]),ek=(0,r.useCallback)(()=>{d.push("/workspace/".concat(a,"/invoices?expense=true"))},[a,d]),ej=(0,r.useMemo)(()=>V?"Time Submission":O?"Edit Time Submission":"Add New Time Submission",[V,O]);return(0,i.jsx)(ea.El,{$isStudentWorkspace:!0,children:(0,i.jsxs)(ea.gx,{children:[X&&(0,i.jsx)(ea.$J,{toolTipText:ee,descriptionText:(0,i.jsx)(()=>H?null:F&&l?(0,i.jsxs)(i.Fragment,{children:["Submissions for this pay period are closing soon. ",(0,i.jsx)("br",{}),"Be sure to submit your time."]}):F&&!l?(0,i.jsx)(i.Fragment,{children:"Timesheet submissions for this pay period are closing soon. Be sure to submit your time."}):!F&&l?(0,i.jsxs)(i.Fragment,{children:["The submission period has ended for this pay period. ",(0,i.jsx)("br",{}),"Come back tomorrow to submit time."]}):(0,i.jsx)(i.Fragment,{children:"The timesheet submission period has ended for this pay period. Come back tomorrow to submit time."}),{}),ctaText:l?null:"GOT IT",onClick:()=>{f(!0),G(a)}}),(0,i.jsxs)(eL.nA,{children:[!l&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(eD,{title:n,headerComponent:b||H?null:(0,i.jsx)(I.$,{type:"button",variant:"ghosted",onClick:ek,children:"ADD EXPENSE REIMBURSEMENT"})}),S&&(0,i.jsx)(tf.lt,{children:b?(0,i.jsx)(tf.Qp,{children:"You have been removed from this GIG and cannot submit new time"}):(0,i.jsx)(tg.A,{onSubmit:eh})}),(0,i.jsxs)(tf.iH,{children:[(0,i.jsxs)(tf.aH,{children:[em.length>0&&(0,i.jsx)(tA.r,{datePeriodInputOptions:em,textColor:t_.A.colors.primary,borderColor:t_.A.colors.primary}),(0,i.jsx)(ea.yW,{onClick:()=>ev(),loading:w,children:"Export to CSV"})]}),(0,i.jsxs)(tf.M7,{children:[(0,i.jsx)(tk.k,{mainText:g,captionText:"RATE"}),(0,i.jsx)(tk.k,{mainText:"hr"===k?et.totalHours||"0":et.hoursPerWeek||_,captionText:"hr"===k?"TOTAL HOURS":"HOURS PER WEEK"}),(0,i.jsx)(tT.P,{mainText:et.totalAmountString,captionText:"".concat(new Date(et.periodEnd)>new Date?"SCHEDULED":"PAID ON"," ").concat((0,tN.Du)(et.periodEnd||N))})]})]}),(0,i.jsxs)(tf.h7,{children:[(ec||eu)&&(0,i.jsx)("div",{style:{marginTop:"3rem",display:"flex",flexDirection:"column",gap:"1rem"},children:[0,1,2,3].map(e=>(0,i.jsx)(Q.G,{height:50},"item-".concat(e)))}),0===ei.length&&!ec&&!eu&&(0,i.jsx)(tz.Q,{mainDescriptionText:"hr"===k?"No time submitted yet":"No compensation notes submitted yet",children:(0,i.jsx)(tq.b,{})}),ei.length>0&&!ec&&!eu&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(tf.Ic,{header:eb,data:ei}),(0,i.jsx)(tx.j,{onNext:e=>eo(!0,e),onPrevious:e=>er(!0,e),page:el,hasMore:es,itemsPerPage:9,totalItems:m})]})]})]}),l&&(0,i.jsx)(tU,{isStudentRemoved:b,onClickAddExpense:ek,onSubmitTimeSubmission:eh,items:ei,onDeleteTimesheet:ex,onEditTimesheet:eg,onNext:e=>eo(!0,e),onPrevious:e=>er(!0,e),page:el,hasMore:es,itemsPerPage:9,totalItems:m,infiniteScrollIsLoading:eu,isHourlyCompensation:"hr"===k,onClickAddTime:()=>B(!0),compensation:g,currentPeriodData:et,dateInputOptions:em,hoursPerWeekNumberString:_,liveNextProcessingDate:N,setIsTimeEntryViewOnly:U,onGetStudentTimesheetActions:ew,totalCompensation:E,isLiveProgram:L,canSubmitTime:F,isRegularGig:S})]}),q&&(0,i.jsx)(Z.A,{open:q,onClose:()=>{B(!1),z(null),U(!1)},showFooter:!1,height:"auto",modalData:{modalTitle:ej,headerIsSticky:!0,headerProps:{lineHeight:"1.2",fontSize:"1.5rem",padding:"2rem 1.25rem"}},children:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(tf.Ht,{}),(0,i.jsx)(tg.A,{id:null==O?void 0:O.id,type:null==O?void 0:O.compensationType,notes:null==O?void 0:O.note,hours:null==O?void 0:O.hours,date:null==O?void 0:O.date,totalAmount:null==O?void 0:O.totalAmount,amount:null==O?void 0:O.amount,onSubmit:(e,t)=>
1{if(!O)return void eh(e,()=>{B(!1),t()});c(tv({...e,id:O.id,compensationType:e.compensationType.value},()=>{B(!1),t(),ep(),c(tC(a))}))},onDelete:()=>ex(O),isEditing:!!O,isReadOnly:V})]})})]})})};var tZ=n(74359),tY=n(15379),tK=n(20051),tQ=n(91408),tX=n(82955),tJ=n(32664),t0=n(70319),t1=n(67109),t2=n(63915);let t3=c.Ay.form.withConfig({displayName:"styles__FormContainer",componentId:"sc-d15d2882-0"})(["display:flex;flex-direction:column;align-items:flex-start;gap:2rem;width:100%;border-radius:1.5rem;padding:2rem;@media (max-width:","){padding:1.25rem;}"],e=>{let{theme:t}=e;return t.breakpoints.md}),t4=c.Ay.div.withConfig({displayName:"styles__FormFieldContainer",componentId:"sc-d15d2882-1"})(["width:100%;display:flex;flex-direction:column;"]);(0,c.Ay)(t1.N).withConfig({displayName:"styles__StyledTextAreaInput",componentId:"sc-d15d2882-2"})(["background-color:",";"],e=>{let{theme:t}=e;return t.colors["blue-20"]});let t6=(0,c.Ay)(t0.p).withConfig({displayName:"styles__StyledInput",componentId:"sc-d15d2882-3"})(["background-color:",";"],e=>{let{theme:t}=e;return t.colors["blue-20"]}),t5=(0,c.Ay)(tJ.A).withConfig({displayName:"styles__StyledDropdownInput",componentId:"sc-d15d2882-4"})(["background-color:",";"],e=>{let{theme:t}=e;return t.colors["blue-20"]}),t7=c.Ay.p.withConfig({displayName:"styles__ErrorContainer",componentId:"sc-d15d2882-5"})(["display:block;margin:0;padding:0.5rem;color:",";font-size:",";font-weight:500;font-family:",";"],e=>{let{theme:t}=e;return t.colors.red},e=>{let{theme:t}=e;return t.fontSize.body.sm},e=>{let{theme:t}=e;return t.fonts.quaternary}),t9=c.Ay.div.withConfig({displayName:"styles__ExpenseSecondRow",componentId:"sc-d15d2882-6"})(["display:flex;flex-direction:row;gap:2rem;width:100%;.dropdown-list{z-index:100;}"]),t8=c.Ay.p.withConfig({displayName:"styles__DisclaimerText",componentId:"sc-d15d2882-7"})(["text-align:center;width:75%;margin:0 auto;font-size:",";font-weight:500;font-family:",";"],e=>{let{theme:t}=e;return t.fontSize.body.xs},e=>{let{theme:t}=e;return t.fonts.quaternary}),ne=c.Ay.a.withConfig({displayName:"styles__TermsLink",componentId:"sc-d15d2882-8"})(["color:",";font-weight:700;cursor:pointer;&:focus{outline:2px solid ",";outline-offset:2px;}"],e=>{let{theme:t}=e;return t.colors.primary},e=>{let{theme:t}=e;return t.colors.primary}),nt=(0,c.Ay)(tX.d).withConfig({displayName:"styles__StyledRichTextEditor",componentId:"sc-d15d2882-9"})([".hfc-rich-text-label{color:",";font-family:",";font-size:",";font-weight:700;line-height:1.5rem;display:block;width:100%;margin-bottom:0.5rem;letter-spacing:normal;padding-bottom:0;}.hfc-rich-text-container{background-color:",";border:none;box-shadow:none;font-family:",";font-size:",";color:",";.ProseMirror p.is-editor-empty:first-child::before{content:attr(data-placeholder);float:left;height:0;pointer-events:none;font-family:",";font-size:",";font-weight:400;color:",";}}.hfc-rich-text-action-buttons{overflow:hidden;opacity:0;max-height:0;transition:all 0.2s ease-in-out;margin-top:0;}",""],e=>{let{theme:t}=e;return t.colors["primary-dark"]},e=>{let{theme:t}=e;return t.fonts.primary},e=>{let{theme:t}=e;return t.fontSize.body.lg},e=>{let{theme:t,disabled:n}=e;return n?t.colors["gray-02"]:t.colors["blue-20"]},e=>{let{theme:t}=e;return t.fonts.quaternary},e=>{let{theme:t}=e;return t.fontSize.body.md},e=>{let{theme:t,disabled:n}=e;return n?t.colors.placeholder:null},e=>{let{theme:t}=e;return t.fonts.quaternary},e=>{let{theme:t}=e;return t.fontSize.body.md},e=>{let{theme:t}=e;return t.colors.placeholder},e=>{let{isFocused:t}=e;return t&&(0,c.AH)([".hfc-rich-text-action-buttons{max-height:50px;opacity:1;}"])});(0,c.Ay)(t2.A).withConfig({displayName:"styles__StyledUploadInput",componentId:"sc-d15d2882-10"})(["background-color:",";.input-field{cursor:pointer;}",""],e=>{let{theme:t}=e;return t.colors["blue-20"]},e=>{let{disabled:t}=e;return t&&(0,c.AH)(["&:focus-within{outline:2px solid transparent;}.input-field{cursor:default;}"])}),(0,c.DU)([".MuiDialog-paper{overflow:unset !important;}.modal-container{overflow:unset !important;}"]);let nn=c.Ay.div.withConfig({displayName:"styles__TopSection",componentId:"sc-d15d2882-11"})(["display:flex;flex-direction:column;width:100%;"]),ni=c.Ay.div.withConfig({displayName:"styles__ReimbursementIdContainer",componentId:"sc-d15d2882-12"})(["display:flex;flex-direction:row;"]),no=c.Ay.p.withConfig({displayName:"styles__ReimbursementIdText",componentId:"sc-d15d2882-13"})(["margin:0;margin-left:auto;font-size:",";font-weight:400;color:",";padding:0;"],e=>{let{theme:t}=e;return t.fontSize.body.sm},e=>{let{theme:t}=e;return t.colors["primary-dark"]}),nr=c.Ay.div.withConfig({displayName:"styles__UploadButtonContainer",componentId:"sc-d15d2882-14"})(["display:flex;margin-top:1rem;"]),ns=(0,c.Ay)(I.$).withConfig({displayName:"styles__UploadButton",componentId:"sc-d15d2882-15"})(["background-color:",";color:",";font-weight:600;padding:0.75rem 1.5rem;border-radius:0.75rem;font-size:",";cursor:pointer;transition:background-color 0.2s ease-in-out;font-family:",";"],e=>{let{theme:t}=e;return t.colors["blue-20"]},e=>{let{theme:t}=e;return t.colors["primary-dark"]},e=>{let{theme:t}=e;return t.fontSize.body.md},e=>{let{theme:t}=e;return t.fonts.quaternary});var na=n(99915),nl=n(60524);n(92646);let nd=()=>async e=>{e({type:A.O.RESET_EXPENSE_AND_REIMBURSEMENT_DATA})},nc=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return async(n,i)=>{try{let n=i().StudentWorkspace.id;await (0,e8.lz)(n,e),t&&t(),(0,ef.addSuccessNotification)("Reimbursement deleted successfully")}catch(e){console.log(e),(0,ef.addErrorNotification)("Something went wrong while deleting reimbursement")}}};var nu=n(77622);let np=e=>{let{open:t,onClose:n,submitCallback:o}=e,a=(0,s.wA)(),[l,d]=(0,r.useState)(!1),[c,u]=(0,r.useState)(null),p=(0,s.d4)(e=>e.StudentWorkspace.invoiceSection.invoiceOrReimbursement),m=(0,s.d4)(e=>e.StudentWorkspace.id),{description:h,amount:y,expenseType:f,mode:g,attachments:x,reimbursementId:w}=p,b=(0,s.d4)(e=>e.StudentWorkspace.invoiceSection.isLoadingSubmitExpense),{mediaFiles:C,setMediaFiles:v,uploadFiles:k}=(0,nu.M)({files:x.filter(e=>!e.isDeleted).map(e=>({uploadProgress:100,fileExtension:e.format,fileType:null,title:e.name,url:e.url,tempId:null,batchId:null,key:e.key}))}),S=(0,s.d4)(e=>e.User.data.id);return(0,i.jsx)(tK.l1,{enableReinitialize:!0,initialValues:{description:h||"",amount:y||"",expenseType:f||{label:"",id:""},attachments:x.map(e=>({uploadProgress:100,fileExtension:e.format,fileType:null,title:e.name,url:e.url,tempId:null,batchId:null,key:e.key}))||[]},validationSchema:tQ.Ik({description:tQ.Yj().test("contains text","Description text required",e=>(0,j.TZ)(e).length>0).required("Required"),amount:tQ.Yj().test("is-positive-number","Must be a positive amount",e=>+e.replace(/[$,]/g,"")>0).required("Required"),expenseType:tQ.Ik().shape({id:tQ.Yj().required("Required"),label:tQ.Yj().required("Required")}),attachments:tQ.YO().of(tQ.Ik()).optional()}),onSubmit:(e,t)=>
1{let i,{resetForm:r}=t;if(g===na.c.EDIT){let e;return void a((e=()=>{n(),r(),a(nd()),o&&o()},async(t,n)=>{try{let{reimbursementId:i,description:o,amount:r,expenseType:s,attachments:a}=n().StudentWorkspace.invoiceSection.invoiceOrReimbursement,l=r.substring(1),{isLoadingSubmitExpense:d}=n().StudentWorkspace.invoiceSection;if(d)return;t({type:A.O.SET_IS_LOADING_SUBMIT_EXPENSE,payload:!0});let c=(0,j.Z0)(a);await (0,e8.Fz)(m,{id:i,amount:l,description:o,type:null==s?void 0:s.label,attachments:c}),(0,ef.addSuccessNotification)("Reimbursement request submitted successfully"),e()}catch(e){(0,ef.addErrorNotification)(e.message||"Something went wrong while submitting reimbursement")}finally{t({type:A.O.SET_IS_LOADING_SUBMIT_EXPENSE,payload:!1})}}))}a((i=()=>{n(),r(),a(nd()),o&&o()},async(e,t)=>{try{let{description:n,amount:o,expenseType:r,attachments:s}=t().StudentWorkspace.invoiceSection.invoiceOrReimbursement,{isLoadingSubmitExpense:a}=t().StudentWorkspace.invoiceSection,{needsToOnboardOnStripe:l}=t().StudentWorkspace;if(l)return void(0,ef.addErrorNotification)("Please onboard to Stripe to submit an expense");if(a)return;let d=+o.replace(/[$,]/g,"");e({type:A.O.SET_IS_LOADING_SUBMIT_EXPENSE,payload:!0});let c=(0,j.Z0)(s);await (0,e8.k4)(m,{amount:d,description:n,type:null==r?void 0:r.label,attachments:c}),(0,ef.addSuccessNotification)("Reimbursement request submitted successfully"),i()}catch(e){(0,ef.addErrorNotification)(e.message||"Something went wrong while submitting reimbursement")}finally{e({type:A.O.SET_IS_LOADING_SUBMIT_EXPENSE,payload:!1})}}))},children:e=>{let{values:o,handleSubmit:r,setFieldValue:s,resetForm:p}=e,y=(e,t)=>{s(e,t),a({type:A.O.SET_INVOICE_REIMBURSEMENT_DATA,payload:{[e]:t}})};return(0,i.jsx)(Z.A,{open:t,onClose:()=>{n(),p(),a(nd())},maxWidth:"sm",height:"auto",modalData:{titleIsSticky:!0,footerIsSticky:!0,modalTitle:g===na.c.CREATE?"Submit Expense":g===na.c.EDIT?"Edit Expense":"View Expense",nextButtonText:g===na.c.CREATE?"SUBMIT":g===na.c.EDIT?"UPDATE":null,onNext:r,nextButtonLoading:b,nextButtonDisabled:b,backButtonText:g===na.c.VIEW?"CLOSE":"CANCEL",onBack:()=>{n(),p(),a(nd())},headerVariant:"secondary",footerStyle:{flexDirection:"row"},buttonProps:{nextButton:{width:"180px"},backButton:{width:"180px"}}},children:(0,i.jsxs)(t3,{children:[(0,i.jsxs)(nn,{children:[(0,i.jsx)(ni,{children:w&&(0,i.jsx)(no,{children:"Reimbursement ID: ".concat(w)})}),(0,i.jsxs)(t4,{children:[(0,i.jsx)(nt,{name:"description",label:"Description",placeholder:"purchases, parking, etc...",maxLength:200,spellCheck:!0,mediaFiles:C.map(e=>({...e,uploadContentProgress:e.uploadProgress,addMediaContentType:e.fileType,addMediaContentTempId:e.tempId||e.key,addMediaContentFormat:e.fileExtension,addMediaContentUrl:e.url,addMediaContentFile:{name:e.title},addMediaContentTitle:e.title})),canUploadMedia:!0,onUploadMedia:e=>{if(C.length>=1)return void(0,ef.addErrorNotification)("You can only upload 1 file per expense.");k({files:e,fullFilePath:"expense/".concat(m,"/").concat(S)})},onUploadCompleted:()=>{y("attachments",[...o.attachments,...C])},showEditorToolbar:g!==na.c.VIEW,onRemoveMedia:e=>{v(t=>(y("attachments",t.map(t=>t.key===e.key?{...t,isDeleted:!0}:t)),t.filter(t=>t.key!==e.key)))},onFocus:()=>d(!0),onBlur:()=>d(!1),onChange:e=>y("description",e),isFocused:l,initialValue:h,disabled:g===na.c.VIEW,useCustomPreviewModal:!0,setPreviewContent:e=>u({url:e.url,name:e.title,format:e.fileExtension})}),(0,i.jsx)(tK.Kw,{name:"description",component:t7})]}),g!==na.c.VIEW&&C.length<1&&(0,i.jsx)(nr,{children:(0,i.jsx)(ns,{dataTestId:"submit-expense-attach-files-button",type:"button",ariaLabel:"Attach Files",onClick:e=>{e.preventDefault();let t=document.getElementById("rich-text-editor-file-upload-button");t&&t.click()},children:"Attach Receipt"})})]}),(0,i.jsxs)(t9,{children:[(0,i.jsxs)(t4,{children:[(0,i.jsx)(t6,{type:"text",name:"amount",label:"Amount",placeholder:"$0.00",value:o.amount,onChange:e=>{let{value:t}=e.target,[n,i]=t.replace(/[^0-9.]/g,"").split("."),o=null==i?void 0:i.slice(0,2),r=(0,j.vv)(n);y("amount",void 0!==o?"".concat(r,".").concat(o):r)},disabled:g===na.c.VIEW}),(0,i.jsx)(tK.Kw,{name:"amount",component:t7})]}),(0,i.jsxs)(t4,{children:[(0,i.jsx)(t5,{name:"expenseType",label:"Expense Type",value:o.expenseType,options:nl._,onChange:e=>{y("expenseType",e)},disabled:g===na.c.VIEW}),(0,i.jsx)(tK.Kw,{name:"expenseType",component:t7})]})]}),(0,i.jsxs)(t8,{children:["Expenses are subject to company approval, by submitting an expense you agree to our"," ",(0,i.jsx)(ne,{href:"/worker-terms",target:"_blank",rel:"noopener noreferrer",children:"Terms of Use."})]}),(0,i.jsx)(ek.A,{isOpen:!!c,onClose:()=>u(null),content:c})]})})}})};var nm=n(2115);let nh=c.Ay.div.withConfig({displayName:"styles__FilterContainer",componentId:"sc-93bab7f8-0"})(["display:flex;flex-direction:row;gap:1rem;padding:1.5rem 0;justify-content:end;border-bottom:1px solid ",";"],e=>{let{theme:t}=e;return t.colors["blue-30"]}),ny=(0,c.Ay)(nm.X).withConfig({displayName:"styles__StyledTable",componentId:"sc-93bab7f8-1"})(["margin-top:0rem;"]);c.Ay.p.withConfig({displayName:"styles__NoInvoicesText",componentId:"sc-93bab7f8-2"})(["font-size:",";font-weight:700;color:",";font-family:",";padding:1rem;margin:0 auto;"],e=>{let{theme:t}=e;return t.fontSize.body.lg},e=>{let{theme:t}=e;return t.colors["primary-dark"]},e=>{let{theme:t}=e;return t.fonts.quaternary});
1let nf=(0,c.Ay)(tj.m).withConfig({displayName:"styles__StyledTextCell",componentId:"sc-93bab7f8-3"})([".text-cell-text{margin:0;padding:0;font-size:",";font-weight:700;font-family:",";color:",";}"],e=>{let{theme:t}=e;return t.fontSize.body.lg},e=>{let{theme:t}=e;return t.fonts.primary},e=>{let{theme:t}=e;return t.colors["primary-dark"]}),ng=(0,c.Ay)(tj.m).withConfig({displayName:"styles__StyledAmountTextCell",componentId:"sc-93bab7f8-4"})(["cursor:pointer;.text-cell-text{display:flex;align-items:center;gap:0.25rem;}"]);(0,c.Ay)(I.$).withConfig({displayName:"styles__EditIconButton",componentId:"sc-93bab7f8-5"})(["display:flex;align-items:center;border:none;background:transparent;padding:0;min-width:unset;justify-content:center;color:",";z-index:10;"],e=>{let{theme:t}=e;return t.colors["gray-90"]});let nx=c.Ay.div.withConfig({displayName:"styles__IconContainer",componentId:"sc-93bab7f8-6"})(["display:flex;align-items:center;justify-content:center;color:",";"],e=>{let{theme:t}=e;return t.colors["gray-90"]});var nw=n(73830);let nb=c.Ay.div.withConfig({displayName:"styles__MobileStudentInvoicesSectionContainer",componentId:"sc-d216ec09-0"})(["display:flex;flex-direction:column;gap:1rem;"]),nC=c.Ay.div.withConfig({displayName:"styles__MobileGridContainer",componentId:"sc-d216ec09-1"})(["display:flex;flex-direction:column;"]);c.Ay.div.withConfig({displayName:"styles__InvoiceDetails",componentId:"sc-d216ec09-2"})(["display:flex;flex-direction:column;gap:0.2rem;"]),c.Ay.p.withConfig({displayName:"styles__MobileInvoiceItemType",componentId:"sc-d216ec09-3"})(["font-size:",";text-transform:capitalize;padding:0;margin:0;"],e=>{let{theme:t}=e;return t.fontSize.body.md});let nv=c.Ay.button.withConfig({displayName:"styles__AddReimbursementButton",componentId:"sc-d216ec09-4"})(["display:flex;justify-content:center;align-items:center;color:",";position:fixed;width:4rem;height:4rem;background-color:",";border:none;border-radius:99999999px;bottom:1rem;right:2rem;cursor:pointer;opacity:0;animation:"," 0.3s ease-out 0.75s forwards;z-index:999;"],e=>{let{theme:t}=e;return t.colors.white},e=>{let{theme:t}=e;return t.colors.primary},ea.MD);var nk=n(17452),nj=n(20712);let nS=e=>{let{items:t,gigId:n,infiniteScrollIsLoading:o,onGetInvoiceActions:r,onNext:s,onPrevious:a,page:l,hasMore:d,itemsPerPage:c,totalItems:u,isStudentRemoved:p,onClickAddReimbursement:m}=e;return(0,i.jsxs)(nb,{children:[(0,i.jsx)(tV.X,{}),o&&[0,1,2,3,4].map(()=>(0,i.jsx)(Q.G,{height:60})),!o&&0===t.length&&(0,i.jsx)(tz.Q,{mainDescriptionText:"No reimbursement requests yet",subDescriptionTexts:["This is where you can submit expenses for reimbursement and see the status of your requests."],children:(0,i.jsx)(nj.A,{})}),!o&&0!==t.length&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(nC,{children:t.map((e,t)=>(0,i.jsx)(nk.x,{isStudent:!0,item:e,gigId:n,index:t,onGetInvoiceActions:r},e.id))}),(0,i.jsx)(tx.j,{onNext:s,onPrevious:a,page:l,hasMore:d,itemsPerPage:c,totalItems:u})]}),!p&&(0,i.jsx)(nv,{type:"button",onClick:()=>m(),children:(0,i.jsx)(X.c,{})})]})};var n_=n(17920),nA=n(45167),nI=n(46774);let nN=e=>{let{sectionTitle:t,gigId:n}=e,{isResponsive:a}=(0,Y.Q)("md"),l=(0,s.wA)(),d=(0,o.useRouter)(),{queryParams:c,addParam:u,clearParam:p}=(0,ed.s)(),{expense:m}=c,[h,y]=(0,r.useState)(!1),[f,g]=(0,r.useState)(!1),[x,w]=(0,r.useState)(0),b=(0,s.d4)(e=>e.StudentWorkspace.invoiceSection.isLoadingCSVData),C=(0,s.d4)(e=>e.StudentWorkspace.isStudentRemoved),v=(0,s.d4)(e=>e.StudentWorkspace.needsToOnboardOnStripe),k=(0,s.d4)(e=>e.StudentWorkspace.endedGracePeriod),{items:S,onNext:_,onPrevious:N,hasMore:T,page:E,onResetState:D,isLoading:L}=(0,K.X)({apiUrl:"/v3/student-workspace/invoices/".concat(n),defaultFilters:{ignoreDates:!0},itensPerPage:9,onParseResponse:e=>{let{data:t}=e;return w(t.totalItems),{items:t.items}}}),M=(0,r.useCallback)(async()=>{try{let{href:e}=new URL(window.location.href),t=await (0,et.TW)("".concat(e,"?expense=true"));window.open(t.url,"_self")}catch(e){console.log("Error getting stripe onboarding link")}},[]);(0,r.useEffect)(()=>{"true"!==m||h||y(!0)},[m,h]),(0,r.useEffect)(()=>
1{l(async e=>{try{let{data:t}=await (0,e8.Uu)(n);e({type:A.O.SET_INVOICE_PERIOD_DATA,payload:t})}catch(e){console.log(e),(0,ef.addErrorNotification)("Something went wrong while fetching invoice details")}})},[n]);let P=(0,r.useCallback)(e=>{l({type:A.O.SET_INVOICE_REIMBURSEMENT_DATA,payload:{reimbursementId:e.reimbursementId,type:e.type,amount:e.amountString,description:e.description,expenseType:(0,nl.B)(e.expenseType),mode:"edit",attachments:e.attachments}}),y(!0)},[l]),R=(0,r.useCallback)(e=>{l({type:A.O.SET_INVOICE_REIMBURSEMENT_DATA,payload:{id:e.id,reimbursementId:e.reimbursementId,type:e.type,amount:e.amountString,description:e.description,expenseType:(0,nl.B)(e.expenseType),mode:"view",attachments:e.attachments}}),y(!0)},[l]);((e,t)=>{let n=(0,o.useRouter)(),[i,s]=(0,r.useState)(null),a=(0,r.useRef)(t);(0,r.useEffect)(()=>{a.current=t});let l=(0,r.useRef)(null);(0,r.useEffect)(()=>{let e=n.query.reimbursementId;if(void 0===e)return;let t=Number(Array.isArray(e)?e[0]:e);Number.isInteger(t)&&t>0&&(l.current=t,s(t));{let e=new URL(window.location.href);e.searchParams.delete("reimbursementId"),window.history.replaceState(window.history.state,"",e.toString())}},[n.query.reimbursementId]),(0,tZ.I)({queryKey:["student-reimbursement-deep-link",e,i],enabled:null!==i&&void 0!==e,queryFn:async()=>{s(null);try{var t;let n=await (0,tY.OW)(e,i);if(l.current!==i)return n.data;let o=null==(t=n.data.items)?void 0:t[0];return o?a.current(o):(0,ef.addErrorNotification)("This expense could not be found."),n.data}catch(e){if(l.current!==i)return null;return(0,ef.addErrorNotification)("This expense could not be found."),null}},staleTime:0})})(Number(n)||void 0,e=>R(e));let O=(0,r.useCallback)(e=>{l(nc(e.reimbursementId,()=>{D()}))},[]),z=(0,r.useMemo)(()=>{let e=!1;return k&&(e=new Date(k)<=new Date),!e},[k]),q=(0,r.useCallback)(e=>{let t=[],i=e.userId===e.createdByUserId;return"reimbursement"===e.type?t.push({label:"View",onClick:()=>R(e)}):"invoice"===e.type&&t.push({label:"View in Time Tracking",onClick:()=>{d.push("/workspace/".concat(n,"/time?periodStart=").concat(e.periodStart,"&periodEnd=").concat(e.periodEnd))}}),i&&!e.companyEditedAt&&"reimbursement"===e.type&&"submitted"===e.status&&z&&(t.push({label:"Edit",onClick:()=>P(e)}),t.push({label:"Delete",onClick:()=>O(e)})),t},[n,O,P,R,d,z]),B=[{label:"Invoice Number",key:"invoice",onRenderItem:e=>(0,i.jsx)(nf,{tooltipText:e.id?null:"The finalized invoice ID will be generated once the reimbursement is approved",children:e.id?"#".concat(e.id):"-"})},{label:"Type",key:"type",onRenderItem:e=>{let t=e.type===nw.e.INVOICE?"Invoice":e.expenseType;return(0,i.jsx)(tS.t,{backgroundColor:e.type===nw.e.INVOICE?t_.A.colors["green-40"]:t_.A.colors["blue-10"],textColor:t_.A.colors["primary-dark"],children:t})}},{label:"Amount",key:"amount",onRenderItem:e=>{let t=e.userId===e.createdByUserId;return(0,i.jsxs)(ng,{children:[e.amountString,e.companyEditedAt&&(0,i.jsx)(tW.A,{title:"This reimbursement was ".concat(t?"edited":"added"," by a company admin and can ").concat(t?"no longer":"not"," be edited."),children:(0,i.jsx)(nx,{children:(0,i.jsx)(tF.q,{variant:4,width:14,height:14})})})]})}},{label:"Billed",key:"billed",onRenderItem:e=>(0,i.jsx)(tj.m,{children:(0,j.n9)(e.submittedDate)})},{label:"Paid",key:"paid",onRenderItem:e=>(0,i.jsx)(tj.m,{children:e.paidOn?(0,j.n9)(e.paidOn):"Pending"})},{label:"Status",key:"status",onRenderItem:e=>{let t={[nA.S.PAID]:en.J.GREEN,[nI.d.APPROVED]:en.J.GREEN,[nI.d.SUBMITTED]:en.J.YELLOW,[nA.S.PENDING]:en.J.ORANGE,[nI.d.PENDING]:en.J.ORANGE,[nI.d.REJECTED]:en.J.RED}[e.status],n=e.status===nA.S.PENDING?"This payment is processing. You should receive payment soon.":null,o="pending"===e.status?"processing":e.status;return(0,i.jsx)(tW.A,{title:n,children:(0,i.jsx)("div",{children:(0,i.jsx)(tS.t,{variant:t,children:o.charAt(0).toUpperCase()+o.slice(1)})})})}},{label:"Actions",key:"actions",setContentWidthFitContent:!0,onRenderItem:e=>{let t=q(e);return(0,i.jsx)(tI.A,{options:t})}}],V=(0,r.useCallback)(async()=>{let e=[];(await l(async(e,t)=>{try{let{isLoadingCSVData:n}=t().StudentWorkspace.timeTrackingSection;if(n)return;e({type:A.O.SET_LOADING_INVOICE_CSV_DATA,payload:!0});let i=t().StudentWorkspace.id,{data:o}=await (0,e8.Cp)(i,{filters:{ignorePaging:!0,ignoreDates:!0}});return e({type:A.O.SET_LOADING_INVOICE_CSV_DATA,payload:!1}),o}catch(t){console.log(t),(0,ef.addErrorNotification)("Something went wrong while loading CSV data"),e({type:A.O.SET_LOADING_INVOICE_CSV_DATA,payload:!1})}}
1)).items.forEach(t=>{let n=(null==t?void 0:t.description)?'"'.concat((0,j.TZ)(null==t?void 0:t.description),'"'):null,i='"'.concat(t.amount,'"'),o='"'.concat((0,j.po)(t.submittedDate),'"'),r=t.paidOn?'"'.concat((0,j.po)(t.paidOn),'"'):"pending";e.push([t.id||"upcoming",t.type,i,n||"n/a",o,r,t.status])}),(0,j.GF)(e,"time-entries")},[]);return(0,i.jsx)(ea.El,{$isStudentWorkspace:!0,children:(0,i.jsx)(ea.gx,{children:(0,i.jsxs)(eL.nA,{children:[!a&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(eD,{title:t,headerComponent:z?(0,i.jsx)(I.$,{onClick:()=>{if(v)return void g(!0);y(!0),u("expense","true")},children:"SUBMIT EXPENSE"}):null}),(0,i.jsx)(nh,{children:(0,i.jsx)(ea.yW,{onClick:()=>V(),loading:b,children:"Export to CSV"})}),L&&(0,i.jsx)("div",{style:{marginTop:"3rem",display:"flex",flexDirection:"column",gap:"1rem"},children:[0,1,2,3].map(e=>(0,i.jsx)(Q.G,{height:70},"item-".concat(e)))}),0===S.length&&!L&&(0,i.jsx)(tz.Q,{mainDescriptionText:"No reimbursement requests yet",subDescriptionTexts:["This is where you can submit expenses for reimbursement and see the status of your requests."],children:(0,i.jsx)(nj.A,{})}),S.length>0&&!L&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ny,{header:B,data:S}),(0,i.jsx)(tx.j,{onNext:e=>_(!0,e),onPrevious:e=>N(!0,e),page:E,hasMore:T,itemsPerPage:9,totalItems:x})]})]}),a&&(0,i.jsx)(nS,{items:S,gigId:n,infiniteScrollIsLoading:L,onGetInvoiceActions:q,onNext:_,onPrevious:N,page:E,hasMore:T,itemsPerPage:9,totalItems:x,onClickAddReimbursement:()=>y(!0),isStudentRemoved:C}),!!h&&(0,i.jsx)(np,{open:h,onClose:()=>{y(!1),p("expense")},submitCallback:()=>D()}),v&&(0,i.jsx)(n_.A,{isOpen:f,onClose:()=>g(!1),onConfirm:M,renderStripeDescription:!0,description:"H\\FC uses Stripe to process payments. To submit an expense, please verify your country of residence. You'll then be redirected to Stripe to securely connect your account."})]})})})};var nT=n(17975),nE=n(75719),nD=n(5677),nL=n(76758);let nM=c.Ay.div.withConfig({displayName:"styles__ContainerContent",componentId:"sc-8a3e4907-0"})([""]),nP=c.Ay.div.withConfig({displayName:"styles__SectionList",componentId:"sc-8a3e4907-1"})([""]),nR=c.Ay.div.withConfig({displayName:"styles__ContentList",componentId:"sc-8a3e4907-2"})(["gap:1rem;margin-bottom:2rem;grid-template-columns:repeat(auto-fit,minmax(",",1fr));display:grid;"," ",""],nL.Kz,e=>{let{totalItems:t}=e;return 2===t&&(0,c.AH)(["max-width:calc(2 * "," + 1rem);"],nL.QR)},e=>{let{totalItems:t}=e;return 1===t&&(0,c.AH)(["max-width:",";"],nL.QR)}),nO=c.Ay.div.withConfig({displayName:"styles__EmptyList",componentId:"sc-8a3e4907-3"})(["display:flex;justify-content:center;align-items:center;height:20rem;font-size:",";font-weight:500;color:",";letter-spacing:0.02rem;"],e=>{let{theme:t}=e;return t.fontSize.body.lg},e=>{let{theme:t}=e;return t.colors["black-50"]}),nz=c.Ay.div.withConfig({displayName:"styles__LoadingContainer",componentId:"sc-8a3e4907-4"})(["display:flex;justify-content:center;height:5rem;align-items:center;"]),nq=(0,c.Ay)(nD.m).withConfig({displayName:"styles__StyledContentCard",componentId:"sc-8a3e4907-5"})(["width:100%;"]);var nB=n(84789),nV=n(58040),nU=n(65422),nW=n(18618),nH=n(76142);let nF=c.Ay.div.withConfig({displayName:"styles__StatusSelectorBoxesContainer",componentId:"sc-aa2629c7-0"})(["align-items:center;display:grid;grid-template-columns:repeat(auto-fit,minmax(100px,1fr) 24px);row-gap:0.5rem;@media (max-width:","){overflow:auto;padding:0.2rem;}"],e=>{let{theme:t}=e;return t.breakpoints.md}),nG=c.Ay.div.withConfig({displayName:"styles__ItemStatusBoxContainer",componentId:"sc-aa2629c7-1"})(["display:flex;align-items:center;"]),n$=c.Ay.div.withConfig({displayName:"styles__ItemStatusBoxItemNumber",componentId:"sc-aa2629c7-2"})(["color:",";margin-left:0.5rem;background-color:",";color:",";font-size:",";border-radius:99999px;min-width:24px;min-height:24px;display:flex;align-items:center;justify-content:center;padding:0 0.35rem;font-weight:600;transition:all 0.2s;"],e=>{let{theme:t}=e;return t.colors["primary-dark"]},e=>{let{theme:t}=e;return t.colors["primary-dark"]},e=>{let{theme:t}=e;return t.colors.white},e=>{let{theme:t}=e;return t.fontSize.body.md}),nZ=c.Ay.button.withConfig({displayName:"styles__ItemStatusBoxContent",componentId:"sc-aa2629c7-3"})(["border:none;background-color:",";font-weight:500;color:",";font-family:",";padding:0.65rem 1.4rem;border-radius:99999px;flex:1;font-size:",";transition:all 0.2s;display:flex;align-items:center;text-align:center;justify-content:space-between;cursor:help;
1"," "," @media (max-width:","){min-width:200px;}"],e=>{let{theme:t}=e;return t.colors["blue-10"]},e=>{let{theme:t}=e;return t.colors["primary-dark"]},e=>{let{theme:t}=e;return t.fonts.primary},e=>{let{theme:t}=e;return t.fontSize.body.md},e=>{let{canClick:t}=e;return t&&(0,c.AH)(["cursor:pointer;&:hover{background-color:",";}&:active{background-color:",";}"],e=>{let{theme:t}=e;return t.colors["blue-15"]},e=>{let{theme:t}=e;return t.colors["blue-16"]})},e=>{let{isSelected:t}=e;return t&&(0,c.AH)(["background-color:",";color:",";","{background-color:",";color:",";}"],e=>{let{theme:t}=e;return t.colors["green-40"]},e=>{let{theme:t}=e;return t.colors["gray-120"]},n$,e=>{let{theme:t}=e;return t.colors.white},e=>{let{theme:t}=e;return t.colors["gray-120"]})},e=>{let{theme:t}=e;return t.breakpoints.md}),nY=c.Ay.span.withConfig({displayName:"styles__ItemStatusLabel",componentId:"sc-aa2629c7-4"})([""]),nK=c.Ay.div.withConfig({displayName:"styles__SectionDivider",componentId:"sc-aa2629c7-5"})(["display:grid;color:",";width:24px;justify-items:center;"],e=>{let{theme:t}=e;return t.colors["gray-120"]}),nQ=c.Ay.div.withConfig({displayName:"styles__PipeDivider",componentId:"sc-aa2629c7-6"})(["width:2px;height:35px;background-color:",";margin:0 0.5rem;"],e=>{let{theme:t}=e;return t.colors["gray-50"]});var nX=n(19698);let nJ=e=>{let{options:t=[],className:n,itemStatusStyles:o={},selectedOptionValue:s,onSelectOptionValue:a,...l}=e;return(0,i.jsx)(nF,{...l,className:n,children:t.map((e,n)=>{let l=n===t.length-1;return(0,i.jsxs)(r.Fragment,{children:[(0,i.jsx)(nG,{totalItems:t.length,children:(0,i.jsx)(tW.A,{title:e.tooltip,children:(0,i.jsxs)(nZ,{style:o,className:"item-status-box",type:"button","aria-label":"view ".concat(e.label," applicants list"),isSelected:s===e.value,canClick:!!a,onClick:()=>{a&&a(e.value)},children:[(0,i.jsx)(nY,{className:"item-status-box-text",children:e.label}),(0,i.jsx)(n$,{className:"item-status-box-item-number",children:new Intl.NumberFormat().format(e.total)})]})})}),!l&&(0,i.jsxs)(nK,{children:[!e.isAllColumn&&(0,i.jsx)(nX.v,{}),e.isAllColumn&&(0,i.jsx)(nQ,{})]})]},e.value)})})};var n0=n(14486);let n1=c.Ay.div.withConfig({displayName:"styles__ContainerFiltersSection",componentId:"sc-9f62841-0"})(["width:100%;border-bottom:1px solid ",";.search-bar{width:100%;max-width:500px;}.suggestions-input{font-size:",";}@media (max-width:","){border-bottom:0;}"],e=>{let{theme:t}=e;return t.colors["gray-50"]},e=>{let{theme:t}=e;return t.fontSize.body.md},e=>{let{theme:t}=e;return t.breakpoints.md}),n2=c.Ay.div.withConfig({displayName:"styles__ActiveFiltersContainer",componentId:"sc-9f62841-1"})(["margin-top:1rem;"]),n3=c.Ay.div.withConfig({displayName:"styles__ContainerFilterAndActions",componentId:"sc-9f62841-2"})(["display:flex;width:100%;gap:1rem;min-height:48px;align-items:stretch;@media (max-width:","){display:grid;grid-template-columns:1fr 1fr;& > *:first-child{grid-column:1 / -1;}}"],e=>{let{theme:t}=e;return t.breakpoints.md}),n4=c.Ay.div.withConfig({displayName:"styles__SortByRefContainer",componentId:"sc-9f62841-3"})(["height:auto;display:flex;"]),n6=c.Ay.div.withConfig({displayName:"styles__TaskRefContainer",componentId:"sc-9f62841-4"})(["height:auto;display:flex;margin-left:auto;"]);c.Ay.div.withConfig({displayName:"styles__SearchBar",componentId:"sc-9f62841-5"})(["display:flex;flex-direction:row;align-items:center;background-color:",";border-radius:0.5rem;overflow:hidden;width:100%;max-width:40%;"],e=>{let{theme:t}=e;return t.colors.white});let n5=(0,c.Ay)(n0.A).withConfig({displayName:"styles__StyledSearchIcon",componentId:"sc-9f62841-6"})(["width:1.5rem;height:1.5rem;margin:0rem 1rem;z-index:9;justify-content:center;"]),n7=c.Ay.input.withConfig({displayName:"styles__SearchInput",componentId:"sc-9f62841-7"})(["display:flex;background-color:",";width:100%;padding:1rem 1rem 1rem 0;border:none;outline:none;font-size:",";color:",";&::placeholder{font-size:",";}"],e=>{let{theme:t}=e;return t.colors.white},e=>{let{theme:t}=e;return t.fontSize.body.md},e=>{let{theme:t}=e;return t.colors["gray-120"]},e=>{let{theme:t}=e;return t.fontSize.body.md});var n9=n(8914),n8=n(54538),ie=n(56170);let it=c.Ay.div.withConfig({displayName:"styles__SearchBar",componentId:"sc-df624f21-0"})(["display:flex;flex-direction:row;align-items:center;background-color:",";border-radius:0.5rem;overflow:hidden;width:100%;flex:1;"],e=>{let{theme:t}=e;return t.colors.white}),ii=c.Ay.div.withConfig({displayName:"styles__SearchBarContainer",componentId:"sc-df624f21-1"})(["border-bottom:1px solid ",";padding-bottom:1rem;display:flex;flex-direction:row;gap:1rem;"],e=>{let{theme:t}=e;return t.colors["blue-30"]}),io=c.Ay.div.withConfig({displayName:"styles__FilterContainer",componentId:"sc-df624f21-2"})(["display:flex;justify-content:center;align-items:center;height:100%;"]);c.Ay.button.withConfig({displayName:"styles__UploadButton",componentId:"sc-df624f21-3"})(["background-color:",";border-radius:0.5rem;border:none;padding:0.5rem;color:",";display:flex;justify-content:center;align-items:center;cursor:pointer;"],e=>{let{theme:t}=e;return t.colors.primary},e=>{let{theme:t}=e;return t.colors.white});let ir=c.Ay.div.withConfig({displayName:"styles__ItemsContainer",componentId:"sc-df624f21-4"})(["display:flex;flex-direction:column;"]),is=e=>{let{onClick:t,isActive:n,children:o,...r}=e;return(0,i.jsx)(ea.uI,{onClick:t,isActive:n,...r,children:o})};var ia=n(76597);let il=c.Ay.div.withConfig({displayName:"styles__ModalContainer",componentId:"sc-45ba3ff7-0"})(["display:flex;justify-content:space-between;background:linear-gradient(95deg,#2132e6 0%,#009dfe 100%),#fff186;padding:0.5rem 1rem;font-family:",";align-items:center;position:sticky;top:0;left:0;z-index:9;"],e=>{let{theme:t}=e;return t.fonts.primary}),id=c.Ay.h2.withConfig({displayName:"styles__HeaderTitle",componentId:"sc-45ba3ff7-1"})(["font-size:",";font-weight:700;color:",";"],e=>{let{theme:t}=e;return t.fontSize.body.lg},e=>{let{theme:t}=e;return t.colors.white}),ic=c.Ay.button.withConfig({displayName:"styles__ResetButton",componentId:"sc-45ba3ff7-2"})(["border:1px solid ",";background-color:transparent;color:",";padding:0rem 1rem;border-radius:9999px;margin:0;height:30px;"],e=>{let{theme:t}=e;return t.colors.white},e=>{let{theme:t}=e;return t.colors.white});c.Ay.div.withConfig({displayName:"styles__ToggleContainer",componentId:"sc-45ba3ff7-3"})(["position:relative;display:flex;flex-direction:row;width:100%;justify-content:space-between;border:1px solid ",";margin:0 auto;border-radius:0.5rem;"],e=>{let{theme:t}=e;return t.colors["primary-dark"]}),c.Ay.button.withConfig({displayName:"styles__FilterSection",componentId:"sc-45ba3ff7-4"})(["display:flex;z-index:5;align-items:center;border:none;background-color:transparent;color:",";padding:0.5rem 1rem;flex:1;justify-content:center;font-weight:700;font-size:",";font-family:",";transition:0.2s all ease-in-out;"],e=>{let{theme:t,isActive:n}=e;return n?t.colors.white:t.colors["primary-dark"]},e=>{let{theme:t}=e;return t.fontSize.body.md},e=>{let{theme:t}=e;return t.fonts.primary});let iu=c.Ay.div.withConfig({displayName:"styles__FilterContainer",componentId:"sc-45ba3ff7-5"})(["display:flex;flex-direction:column;gap:1rem;padding:1rem;flex:1;"]);
1c.Ay.div.withConfig({displayName:"styles__Background",componentId:"sc-45ba3ff7-6"})(["position:absolute;border-radius:0.4rem;width:",";height:100%;top:0;left:",";background-color:",";transition:0.2s all ease-in-out;"],e=>{let{length:t}=e;return 1===t?"100%":"50%"},e=>{let{sectionIndex:t}=e;return 0===t?"0":"50%"},e=>{let{theme:t}=e;return t.colors["primary-dark"]});let ip=c.Ay.button.withConfig({displayName:"styles__RowItem",componentId:"sc-45ba3ff7-7"})(["display:flex;border:none;flex-direction:row;justify-content:space-between;align-items:center;border-bottom:1px solid ",";padding:0.4rem 0.75rem;background-color:",";width:100%;height:35px;"],e=>{let{theme:t}=e;return t.colors["blue-30"]},e=>{let{theme:t,isActive:n}=e;return n?t.colors["green-40"]:"transparent"}),im=c.Ay.div.withConfig({displayName:"styles__LeftItems",componentId:"sc-45ba3ff7-8"})(["display:flex;flex-direction:row;align-items:center;gap:1rem;"]),ih=c.Ay.p.withConfig({displayName:"styles__ValueBubble",componentId:"sc-45ba3ff7-9"})(["background-color:",";color:",";padding:0.2rem 0.75rem;font-size:",";font-family:",";border-radius:4rem;margin:0;width:50px;font-weight:500;"],e=>{let{theme:t}=e;return t.colors["blue-10"]},e=>{let{theme:t}=e;return t.colors["primary-dark"]},e=>{let{theme:t}=e;return t.fontSize.body.md},e=>{let{theme:t}=e;return t.fonts.primary}),iy=c.Ay.p.withConfig({displayName:"styles__FilterLabel",componentId:"sc-45ba3ff7-10"})(["font-size:",";font-family:",";color:",";margin:0;padding:0;font-weight:500;"],e=>{let{theme:t}=e;return t.fontSize.body.sm},e=>{let{theme:t}=e;return t.fonts.primary},e=>{let{theme:t}=e;return t.colors["primary-dark"]}),ig=c.Ay.div.withConfig({displayName:"styles__BodyContainer",componentId:"sc-45ba3ff7-11"})(["display:flex;gap:1rem;flex-direction:column;"]),ix=c.Ay.h3.withConfig({displayName:"styles__SubSectionTitle",componentId:"sc-45ba3ff7-12"})(["margin:0;padding:0;width:100%;font-family:",";color:",";background-color:",";font-size:",";border-radius:0.5rem;padding:0.5rem 1rem;"],e=>{let{theme:t}=e;return t.fonts.primary},e=>{let{theme:t}=e;return t.colors["primary-dark"]},e=>{let{theme:t}=e;return t.colors["blue-01"]},e=>{let{theme:t}=e;return t.fontSize.body.md}),iw=c.Ay.div.withConfig({displayName:"styles__SubSectionContainer",componentId:"sc-45ba3ff7-13"})(["display:flex;flex-direction:column;"]);var ib=n(99447),iC=n(38937);let iv=e=>{let{onClick:t}=e;return(0,i.jsxs)(il,{children:[(0,i.jsx)(id,{children:"Filters"}),(0,i.jsx)(ic,{type:"button","aria-label":"Reset Filters",onClick:t,children:"Reset All"})]})},ik=e=>{let{value:t,label:n,onClick:o,isActive:r}=e;return(0,i.jsxs)(ip,{"aria-label":"".concat(n," filter"),isActive:r,onClick:o,type:"button",children:[(0,i.jsxs)(im,{children:["number"==typeof t&&(0,i.jsx)(ih,{children:t}),n&&(0,i.jsx)(iy,{children:n})]}),r&&(0,i.jsx)(ib.A,{})]})},ij=e=>{let{isOpened:t,onClose:n,onSuccess:o,filtersData:s,onResetFilters:a}=e,[l,d]=(0,r.useState)(0),c=(0,r.useMemo)(()=>s.map(e=>e.label),[s]),u=(0,r.useMemo)(()=>s[l].sections||[],[s,l]);return(0,i.jsx)(Z.A,{open:t,onClose:()=>{n(),d(0)},hideCloseButton:!0,modalData:{headerComponent:(0,i.jsx)(iv,{onClick:()=>{a(),d(0)}}),backButtonText:"CANCEL",onBack:()=>{n(),d(0)},onNext:()=>{o(),d(0)},nextButtonText:"APPLY",footerStyle:{flexDirection:"row"},titleIsSticky:!0,footerIsSticky:!0,buttonProps:{nextButton:{width:"180px"},backButton:{width:"180px"}}},children:(0,i.jsxs)(iu,{children:[(0,i.jsx)(iC.A,{sections:c.map((e,t)=>({label:e,onClick:()=>d(t)})),sectionIndex:l}),(0,i.jsx)(ig,{children:u.map((e,t)=>(0,i.jsxs)(iw,{children:[e.title&&(0,i.jsx)(ix,{children:e.title}),e.renderItems()]},e.title||t))})]})})},iS=e=>{let{searchText:t,onSearch:n,onTextSearch:o,filterPillOptions:s,sortByOptions:a,filters:l,sortBy:d,setSortBy:c}=e,[u,p]=(0,r.useState)(!1),[m,h]=(0,r.useState)({}),[y,f]=(0,r.useState)(void 0);return(0,i.jsxs)(ii,{children:[(0,i.jsxs)(it,{children:[(0,i.jsx)(n5,{color:t_.A.colors.placeholder}),(0,i.jsx)(n7,{placeholder:"Search Title, Description, etc.",value:t,onChange:o})]}),(0,i.jsx)(io,{children:(0,i.jsx)(is,{onClick:()=>p(!0),children:(0,i.jsx)(ia.M,{width:"16px",height:"16px"})})}),(0,i.jsx)(ij,{isOpened:u,onClose:()=>{p(!1),h(l)},onSuccess:()=>
1{if(m.status===l.status&&y===d)return void p(!1);m.status!==l.status&&n(t,m),y!==d&&c(y),p(!1)},onResetFilters:()=>{n("",{status:void 0}),c(void 0),f(void 0),h({status:void 0}),p(!1)},filtersData:[{label:"Filters",sections:[{title:"Status",renderItems:()=>(0,i.jsx)(ir,{children:s.map(e=>(0,i.jsx)(ik,{value:e.total,label:e.label,onClick:()=>{h({...m,status:e.value})},isActive:e.value===(null==m?void 0:m.status)},e.value))})}]},{label:"Sort By",sections:[{renderItems:()=>(0,i.jsx)(ir,{children:a.map(e=>(0,i.jsx)(ik,{value:e.total,label:e.label,onClick:()=>f(e.value),isActive:e.value===y},e.value))})}]}]})]})};var i_=n(78409);let iA=e=>{var t;let{onSelectTask:n,onSelectSortBy:o,filters:s,sortBy:a,gigId:l,searchText:d,onSearch:c,onTextSearch:u,onClearSearch:p,isMobile:m,filterPillOptions:h,setSortBy:y}=e,f=(0,r.useRef)(null),g=(0,r.useRef)(null),[x,w]=(0,r.useState)(!1),[b,C]=(0,r.useState)(!1),{onNext:v,onSearch:k,hasMore:j,isLoading:S,isFirstPageLoading:_,items:A,query:I}=(0,K.X)({apiUrl:"/v3/student-workspace/task/".concat(l,"/paginated-options?taskType=content"),itensPerPage:10,onParseResponse:e=>{let{data:t}=e;return{...t}}}),N=(0,r.useMemo)(()=>[{label:"Most Recent",value:void 0,onClick:()=>o()},{label:"Oldest",value:"oldest",onClick:()=>o("oldest")}],[o]),T=(0,r.useMemo)(()=>{let e=N.find(e=>e.value===a);return(null==e?void 0:e.label)||"Most Recent"},[a,N]);return(0,i.jsxs)(n1,{children:[(0,i.jsxs)(n3,{children:[!m&&!!(null==d?void 0:d.trim())&&(0,i.jsxs)(ea.N5,{"data-testid":"content-search-active-tag",children:[(0,i.jsx)("span",{children:d}),(0,i.jsx)(ea.b0,{"aria-label":"Clear search","data-testid":"content-search-active-tag-clear",onClick:p,children:(0,i.jsx)(ie.U,{width:"18px",height:"18px"})})]}),!m&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n6,{ref:g,children:(0,i.jsxs)(ea.uI,{isActive:!!(null==s?void 0:s.task),onClick:()=>C(!0),children:[(0,i.jsx)("p",{children:(null==s?void 0:s.task)?null==s?void 0:s.task.label:"Task"})," ",(0,i.jsx)(n9.D,{})]})}),(0,i.jsx)(i_.W,{isOpen:b,anchorElement:g.current,onClose:()=>C(!1),title:"Tasks in this GIG",options:A,onNext:v,onSearch:k,hasMore:j,isLoading:S,isFirstPageLoading:_,selectedOptionValue:null==s||null==(t=s.task)?void 0:t.value,onSelect:e=>{n(e)},query:I,hideImage:!0}),(0,i.jsx)(n4,{ref:f,children:(0,i.jsxs)(ea.uI,{onClick:()=>w(!0),children:["Sort By ",T," ",(0,i.jsx)(n9.D,{})]})}),(0,i.jsx)(n8.A,{isOpen:x,anchorElement:f.current,onClose:()=>w(!1),options:N})]}),m&&(0,i.jsx)(iS,{filterPillOptions:h,onTextSearch:u,searchText:d,onSearch:c,sortByOptions:N,filters:s,setSortBy:y,sortBy:a})]}),(0,i.jsx)(n2,{})]})};var iI=n(95086);let iN=c.Ay.div.withConfig({displayName:"styles__MobileContentContainer",componentId:"sc-ca57ac43-0"})(["display:flex;flex-direction:column;gap:1rem;"]),iT=c.Ay.button.withConfig({displayName:"styles__UploadButton",componentId:"sc-ca57ac43-1"})(["display:flex;justify-content:center;align-items:center;color:",";position:fixed;width:4rem;height:4rem;background-color:",";border:none;border-radius:99999999px;bottom:1rem;right:2rem;cursor:pointer;opacity:0;animation:"," 0.3s ease-out 0.75s forwards;z-index:999;"],e=>{let{theme:t}=e;return t.colors.white},e=>{let{theme:t}=e;return t.colors.primary},ea.MD),iE=(0,c.Ay)(tz.Q).withConfig({displayName:"styles__StyledEmptyInfoPanel",componentId:"sc-ca57ac43-2"})(["gap:4rem;"]);var iD=n(84683);let iL=e=>{let{searchText:t,onTextSearch:n,onSearch:o,studentContent:r,onNext:a,hasMore:l,isFirstPageLoading:d,isLoading:c,onEditContent:u,setIdItemBeingDeleted:p,onUploadContent:m,setPreviewingContentId:h,filters:y,filterPillOptions:f,sortBy:g,canUploadContent:x,canUploadWithoutTask:w,setSortBy:b}=e,C=(0,s.wA)();return(0,i.jsxs)(iN,{children:[(0,i.jsx)(iA,{searchText:t,onSearch:o,onTextSearch:n,filterPillOptions:f,filters:y,sortBy:g,setSortBy:b,isMobile:!0,isStudent:!0}),(0,i.jsx)(nM,{children:(0,i.jsx)(nU.A,{dataLength:r.length,next:a,hasMore:l,style:{overflow:"unset"},loader:(0,i.jsx)(nz,{children:(0,i.jsx)(nW.R,{color:"primary-dark"})}),children:(0,i.jsxs)(nP,{children:[d&&(0,i.jsx)(nR,{children:(0,i.jsx)(nV.$,{})}),(0,i.jsx)(nR,{totalItems:r.length,children:!d&&r.map(e=>(0,i.jsx)(nq,{canUploadOrEditContent:x,hasNewFeedbackMessage:e.hasNewFeedbackMessage,content:e,isStudent:!0,onViewMessages:e=>{h(e.id),C((0,e1.Mn)(!0))},onEditContent:u,onDeleteContent:e=>{p(e.id)},onUploadContent:m,onPreviewContent:e=>h(e.id)},e.id))}),!d&&!c&&!r.length&&(0,i.jsx)(nO,{children:(0,i.jsx)(iE,{mainDescriptionText:es[y.status].primary,subDescriptionTexts:es[y.status].secondary})})]})})}),w&&(0,i.jsx)(iT,{type:"button","aria-label":"upload content",onClick:()=>m({}),children:(0,i.jsx)(iD.J,{})})]})};var iM=n(74726),iP=n(70783);let iR=e=>{var t;let{gigId:n}=e,o=(0,s.wA)(),a=(0,eG.jE)(),l=(0,r.useCallback)(()=>{o((0,e1.HN)(n)),(0,e5.Mu)(a,n)}
1,[o,n,a]),{isResponsive:d}=(0,Y.Q)("md"),{queryParams:c,clearParam:u,addParam:p}=(0,ed.s)(),{contentId:m}=c,[h,y]=(0,r.useState)(!1),f=(0,s.d4)(e=>e.StudentWorkspace.contentSection.isMobileMessagesOpened),g=(0,s.d4)(e=>e.StudentWorkspace.contentSection.amountOfContent),x=(0,s.d4)(e=>e.StudentWorkspace.contentSection.amountOfContentPerStatus),w=(0,s.d4)(e=>e.StudentWorkspace.contentSection.content),b=(0,s.d4)(e=>e.StudentWorkspace.contentSection.openToNotStarted),C=(0,s.d4)(e=>e.StudentWorkspace.applicationStatus),v=(0,s.d4)(e=>e.StudentWorkspace.endedGracePeriod),k=(0,s.d4)(e=>e.StudentWorkspace.liveStartedAt),[j,S]=(0,r.useState)(null),[_,A]=(0,r.useState)(null),[N,T]=(0,r.useState)(null),[E,D]=(0,r.useState)(""),L=(0,nH.d)(E,500),M=(0,r.useMemo)(()=>b?{status:"not-started"}:{},[b]),{items:P,onNext:R,hasMore:O,filters:z,onSearch:q,isFirstPageLoading:B,query:V,setSortBy:U,sortBy:W,isLoading:H,setItems:F,onResetState:G}=(0,iP.V)({apiUrl:"/v3/student-workspace/content/".concat(n),itensPerPage:12,defaultFilters:M,onParseResponse:function(e){let{data:t}=e,{isSuperseded:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(n)return t;let i=Array.from(new Map([...P,...t.items].map(e=>[e.id,e])).values());return o((0,e1.um)(i)),t}}),$=(0,r.useMemo)(()=>(0,eJ.c8)({applicationStatus:C,endedGracePeriod:v}),[C,v]),Z=(0,r.useMemo)(()=>$&&!(0,eJ.KG)(k),[$,k]),K=(0,r.useCallback)(e=>{if((null==e?void 0:e.value)===0)return void q(L,{...z,task:void 0});q(L,{...z,task:e})},[L,z,q]);(0,r.useEffect)(()=>{o((0,e1.HN)(n))},[n]),(0,r.useEffect)(()=>{V!==L&&q(L,z)},[L,z]);let Q=(0,r.useMemo)(()=>[{isAllColumn:!0,label:"All Content",value:void 0,tooltip:"All content uploaded by participants",total:g||0},{label:"Not Started",value:"not-started",tooltip:"Content that has not been started yet",total:x["not-started"]||0},{label:"Pending",value:"pending",tooltip:"Content pending review",total:x.pending||0},{label:"Editing",value:"revision",tooltip:"Content that needs edits",total:x.revision||0},{label:"Approved",value:"approved",tooltip:"Content that has been approved",total:x.approved||0},{label:"Posted",value:"posted",tooltip:"Content the participant has put live",total:x.posted||0}],[g,x]),X=(0,r.useCallback)(e=>{if("approved"===e.status){o((0,e1.$w)((0,e3.L)(e))),T(e),A(null),u("contentId"),y(!0);return}o((0,e1.$w)((0,e4.p)(e))),A(null),u("contentId"),y(!0)},[]),J=(0,r.useCallback)(e=>{o((0,e1.$w)((0,e4.N)(e.task))),A(null),u("contentId"),y(!0)},[]),ee=(0,r.useMemo)(()=>{if(!_)return null;let e=w.find(e=>e.id===_);return e?(0,i.jsx)(iM.A,{isStudent:!0,readOnly:!$,content:e,onUploadContent:J,onEditContent:X,onDeleteContent:e=>S(e.id),hideViewAction:!0}):null},[$,X,J,_,w]),et=(0,r.useCallback)(e=>{D(e.target.value)},[z]);return(0,nE.FN)(e=>{D(e)},nT.R.CONTENT),(0,i.jsx)(ea.El,{$isStudentWorkspace:!0,children:(0,i.jsxs)(ea.gx,{children:[(0,i.jsx)(tV.X,{}),(0,i.jsxs)(eL.nA,{children:[!d&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(eD,{title:"Content",headerComponent:Z&&(0,i.jsx)(I.$,{onClick:()=>J({}),children:"Upload Content"})}),(0,i.jsxs)(ea.Yw,{children:[(0,i.jsx)(nJ,{selectedOptionValue:null==z?void 0:z.status,options:Q,onSelectOptionValue:async e=>{q(L,{...z,status:"all"===e?void 0:e})}}),(0,i.jsx)(ea.fm,{children:(0,i.jsx)(iA,{isStudent:!0,gigId:n,filters:z,searchText:E,onTextSearch:et,onClearSearch:()=>D(""),onSelectTask:e=>K(e),onSelectFilter:e=>{let t=(null==z?void 0:z.array)||[];-1===t.findIndex(t=>t.label===e.label)&&(t.push(e),q("",{...z,array:t}))},onRemoveFilter:e=>{let t=(null==z?void 0:z.array)||[],n=t.findIndex(t=>t.label===e.label);-1!==n&&(t.splice(n,1),q("",{...z,array:t}))},onSelectSortBy:e=>{U(e)},sortBy:W})})]}),(0,i.jsx)(nM,{children:(0,i.jsx)(nU.A,{dataLength:w.length,next:R,hasMore:O,style:{overflow:"unset"},loader:(0,i.jsx)(nz,{children:(0,i.jsx)(nW.R,{color:"primary-dark"})}),children:(0,i.jsxs)(nP,{children:[B&&(0,i.jsx)(nR,{children:(0,i.jsx)(nV.$,{})}),(0,i.jsx)(nR,{totalItems:w.length,children:!B&&w.map(e=>(0,i.jsx)(nq,{canUploadOrEditContent:$,hasNewFeedbackMessage:e.hasNewFeedbackMessage,content:e,isStudent:!0,onEditContent:X,onDeleteContent:e=>{S(e.id)},onUploadContent:J,onPreviewContent:e=>{A(e.id),p("contentId",e.id)}},e.id))}
1),!B&&!H&&!w.length&&(0,i.jsx)(nO,{children:(0,i.jsx)(tz.Q,{mainDescriptionText:es[z.status].primary,subDescriptionTexts:es[z.status].secondary})})]})})})]}),d&&(0,i.jsx)(iL,{canUploadContent:$,canUploadWithoutTask:Z,searchText:E,onTextSearch:et,onSearch:q,studentContent:w,onNext:R,hasMore:O,isFirstPageLoading:B,isLoading:H,onEditContent:X,setIdItemBeingDeleted:S,onUploadContent:J,setPreviewingContentId:e=>{A(e),p("contentId",e)},query:V,filters:z,filterPillOptions:Q,setSortBy:U,sortBy:W,onResetState:G}),(!!m||!!_)&&(0,i.jsx)(nB.J,{contentId:m,isMobileFeedbackMessagesOpened:f,onHandleMobileOpenMessages:()=>o((0,e1.Mn)(!0)),onHandleMobileCloseMessages:()=>o((0,e1.Mn)(!1)),actionButtons:ee,content:w.find(e=>e.id===_),onClose:()=>{A(null),u("contentId")},onViewMessages:e=>o((0,el.TN)(e))}),(0,i.jsx)(iI.n,{isOpen:!!j,onClose:()=>{S(null),A(null),u("contentId")},contentId:j,contentStatus:null==(t=w.find(e=>e.id===j))?void 0:t.status,onDelete:()=>{l(),G()}}),h&&(0,i.jsx)(e2.A,{emitterId:"studentContentPage",isOpen:h,linksContent:N,onClose:()=>{y(!1),T(null)},onSearchForTask:e=>K(e),onSuccess:e=>{if(l(),N){let t=w.map(t=>t.id===(null==e?void 0:e.id)?{...t,...e}:t);o((0,e1.um)(t)),F(t);return}G()},onPartialFailure:()=>{l(),G()}})]})]})})};var iO=n(50763);let iz=e=>{let{gigId:t}=e;return(0,i.jsx)(iO.j,{gigId:Number(t),canManage:!1})},iq=c.Ay.div.withConfig({displayName:"styles__TimeSubmissionContainer",componentId:"sc-2a5a6263-0"})(["display:flex;flex-direction:column;border-bottom:1px solid ",";padding:1.5rem 0;"],e=>{let{theme:t}=e;return t.colors["blue-30"]}),iB=c.Ay.div.withConfig({displayName:"styles__TimeSubmissionTableContainer",componentId:"sc-2a5a6263-1"})(["display:flex;flex-direction:column;gap:2rem;"]),iV=(0,c.Ay)(nm.X).withConfig({displayName:"styles__StyledTable",componentId:"sc-2a5a6263-2"})(["margin-top:0rem;"]),iU=c.Ay.div.withConfig({displayName:"styles__StatusContainer",componentId:"sc-2a5a6263-3"})(["display:flex;flex-direction:row;gap:0.5rem;"]),iW=(0,c.DU)([".MuiDialog-paper{overflow:unset !important;}.modal-container{overflow:unset !important;}.submit-time-modal-body{max-height:65vh;overflow:auto;}"]),iH=c.Ay.p.withConfig({displayName:"styles__RemovedText",componentId:"sc-2a5a6263-4"})(["color:",";text-align:center;"],e=>{let{theme:t}=e;return t.colors.placeholder});c.Ay.div.withConfig({displayName:"styles__TextContainer",componentId:"sc-2a5a6263-5"})(["max-width:300px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"]);var iF=n(60825),iG=n(34962),i$=n(14880),iZ=n(89647);let iY=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return async(n,i)=>{try{let{isLoadingUpdate:o}=i().StudentWorkspace.timeTrackingSection,r=i().StudentWorkspace.id;if(o)return;n({type:A.O.SET_UPDATE_LOADING,payload:!0}),await (0,e8.No)(r,e),t&&t(),n({type:A.O.SET_UPDATE_LOADING,payload:!1})}catch(e){(0,ef.addErrorNotification)("Something went wrong while updating time tracking details"),n({type:A.O.SET_UPDATE_LOADING,payload:!1})}}};n(49597);let iK={SUBMITTED:1},iQ=e=>{let{sectionTitle:t,gigId:n}=e,o=(0,s.wA)(),[a,l]=(0,r.useState)(0),d=(0,s.d4)(e=>e.StudentWorkspace.isStudentRemoved),c=(0,s.d4)(e=>e.StudentWorkspace.endedGracePeriod),[u,p]=(0,r.useState)(null),[m,h]=(0,r.useState)(!1),[y,f]=(0,r.useState)(!1),{items:g,onNext:x,onPrevious:w,hasMore:b,page:C,isFirstPageLoading:v,isLoading:k,onResetState:S}=(0,K.X)({apiUrl:"/v3/student-workspace/sampling-request/".concat(n),itensPerPage:9,onParseResponse:e=>{let{data:t}=e;return l(t.totalItems),{items:t.items}}}),_=(0,r.useCallback)((e,t)=>{o(((e,t,n)=>async i=>{try{i({type:A.O.SET_STUDENT_IS_SUBMIT_TIME_LOADING,payload:!0}),await (0,e8.lj)(e,t),n&&n()}catch(e){(0,ef.addErrorNotification)("Failed to submit sampling request");return}finally{i({type:A.O.SET_STUDENT_IS_SUBMIT_TIME_LOADING,payload:!1})}})(n,e,()=>{S(),t()}))},[C]),I=(0,r.useCallback)(e=>{o(((e,t)=>async(n,i)=>{try{let{isLoadingDelete:o}=i().StudentWorkspace.timeTrackingSection,r=i().StudentWorkspace.id;if(o)return;n({type:A.O.SET_DELETE_LOADING,payload:!0}),await (0,e8.p8)(r,e),t&&t(),(0,ef.addSuccessNotification)("Sampling request deleted successfully")}catch(e){(0,ef.addErrorNotification)("Something went wrong while deleting the sampling request")}finally{n({type:A.O.SET_DELETE_LOADING,payload:!1})}})(e,()=>{S(),h(!1),p({})}))},[n]),N=(0,r.useCallback)(e=>{h(!0),p(e)},[]),[T,E]=(0,r.useState)(null),D=(0,r.useCallback)(e=>{I(e.id)},[]),L=[{label:"Date",key:"createdAt",onRenderItem:e=>(0,i.jsx)(tj.m,{children:(0,j.po)(e.createdAt,!1,!0)})},{label:"Description",key:"description",onRenderItem:e=>(0,i.jsx)(tj.m,{tooltipText:e.description,children:e.description})},{label:"Number of cases",key:"numberOfCases",onRenderItem:e=>(0,i.jsx)(tj.m,{children:e.numberOfCases})},{label:"Status",key:"status",setContentWidthFitContent:!0,onRenderItem:e=>(0,i.jsxs)(iU,{children:[(0,i.jsx)(tS.t,{variant:(0,i$.oR)((0,i$.r3)(e)).variant,children:(0,i$.oR)((0,i$.r3)(e)).label}),!e.invoiceId&&(!c||new Date(c)>new Date)&&(0,i.jsx)(tI.A,{options:[{label:"View",onClick:()=>(e=>{let t=g.findIndex(t=>t.id===e.id);E(t>=0?t:null)})(e)},e.status===iK.SUBMITTED&&{label:"Edit",onClick:()=>N(e)},e.status===iK.SUBMITTED&&{label:"Delete",onClick:()=>D(e)}].filter(e=>!!e)})]})}];return(0,i.jsx)(ea.El,{$isStudentWorkspace:!0,children:(0,i.jsxs)(ea.gx,{children:[(0,i.jsxs)(eL.nA,{children:[(0,i.jsx)(eD,{title:t}),(0,i.jsx)(iq,{children:d?(0,i.jsx)(iH,{children:"You have been removed from this program and cannot submit new requests"}):(0,i.jsx)(iF.A,{onSubmit:_,gigId:n})}
1),(0,i.jsxs)(iB,{children:[(v||k)&&(0,i.jsx)("div",{style:{marginTop:"3rem",display:"flex",flexDirection:"column",gap:"1rem"},children:[0,1,2,3].map(e=>(0,i.jsx)(Q.G,{height:50},"item-".concat(e)))}),0===g.length&&!v&&!k&&(0,i.jsx)(tz.Q,{mainDescriptionText:"No sampling requests yet.",children:(0,i.jsx)(tq.b,{})}),g.length>0&&!v&&!k&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(iV,{header:L,data:g}),(0,i.jsx)(tx.j,{onNext:e=>x(!0,e),onPrevious:e=>w(!0,e),page:C,hasMore:b,itemsPerPage:9,totalItems:a})]})]})]}),m&&(0,i.jsx)(Z.A,{open:m,onClose:()=>{h(!1),p(null),f(!1)},showBorder:!1,showFooter:!1,height:"auto",children:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(iW,{}),(0,i.jsx)(iF.A,{samplingRequestBeingEdited:u,gigId:n,onSubmit:(e,t)=>{if(!u)return void _(e,()=>{h(!1),t()});o(iY({...e,id:u.id},()=>{h(!1),t(),S()}))},onDelete:()=>D(u),isEditing:!!u,isReadOnly:y})]})}),(0,i.jsx)(iG.t,{isOpen:null!==T,onClose:()=>E(null),request:null!==T?(e=>{var t;return e?{id:e.id,status:e.status,createdAt:e.createdAt,description:e.description,numberOfCases:e.numberOfCases,productRequestTypeLabel:null==(t=iZ.qh.find(t=>t.value===e.productRequestType))?void 0:t.label,productsSummary:(0,i$.OL)(e),eventTitle:e.eventTitle,nameOfOrganization:e.nameOfOrganization,desiredDeliveryDate:e.desiredDeliveryDate,shipmentSummary:[e.shipmentAddress,e.shipmentAddress2,e.shipmentCityTown,e.shipmentStateRegionProvince,e.shipmentZipPostCode,e.shipmentCountry].filter(Boolean).join(", "),shopifyOrderId:e.shopifyOrderId,fulfillment:e.fulfillment}:null})(g[T]):null,onPrevious:()=>E(e=>Math.max(0,(null!=e?e:0)-1)),onNext:()=>E(e=>Math.min(g.length-1,(null!=e?e:0)+1)),hasPrevious:T>0,hasNext:null!==T&&T<g.length-1})]})})},iX=c.Ay.div.withConfig({displayName:"styles__ContainerNonCircumventModal",componentId:"sc-cd191f9a-0"})(["padding:1.5rem 2rem;"]),iJ=c.Ay.p.withConfig({displayName:"styles__MainNonCircumventText",componentId:"sc-cd191f9a-1"})(["margin:0;font-weight:bold;font-family:",";color:",";font-size:",";"],e=>{let{theme:t}=e;return t.fonts.quaternary},e=>{let{theme:t}=e;return t.colors["primary-dark"]},e=>{let{theme:t}=e;return t.fontSize.body.lg}),i0=c.Ay.p.withConfig({displayName:"styles__BodyNonCircumventText",componentId:"sc-cd191f9a-2"})(["margin:1rem 0;color:",";font-size:",";font-family:",";font-weight:400;"],e=>{let{theme:t}=e;return t.colors["primary-dark"]},e=>{let{theme:t}=e;return t.fontSize.body.lg},e=>{let{theme:t}=e;return t.fonts.quaternary}),i1=(0,c.Ay)(I.$).withConfig({displayName:"styles__NonCircumventButton",componentId:"sc-cd191f9a-3"})(["margin-left:auto;margin-right:auto;margin-top:2rem;"]),i2=c.Ay.div.withConfig({displayName:"styles__CheckboxContainer",componentId:"sc-cd191f9a-4"})(["margin-top:1.5rem;label{font-family:",";color:",";font-size:",";}"],e=>{let{theme:t}=e;return t.fonts.quaternary},e=>{let{theme:t}=e;return t.colors["primary-dark"]},e=>{let{theme:t}=e;return t.fontSize.body.lg});var i3=n(16906);let i4=e=>{let{isOpen:t,onClose:n,buttonCTA:o="CONTINUE TO WORKSPACE"}=e,[s,a]=(0,r.useState)(!0);return(0,i.jsx)(Z.A,{open:t,onClose:()=>{},ariaLabel:"Reminder to keep payments on platform",ignoreDialogWidth:!0,height:"auto",showFooter:!1,hideCloseButton:!0,modalData:{modalTitle:"Reminder!",titleIsSticky:!0,headerProps:{textAlign:"left"}},children:(0,i.jsxs)(iX,{children:[(0,i.jsx)(iJ,{children:"Only accept payments through H\\FC."}),(0,i.jsxs)(i0,{children:["Getting paid off-platform or through other tools can be dangerous and",(0,i.jsx)("br",{}),"is in violation of our"," ",(0,i.jsx)("a",{href:"/worker-terms",target:"_blank",children:"Terms of Service"})," ","and can result in legal action."]}),(0,i.jsx)(i2,{children:(0,i.jsx)(i3.A,{label:"I understand the payment policies.",value:s,onChange:(e,t)=>
1a(t),name:"payment-policies"})}),(0,i.jsx)(i1,{"data-testid":"continue-to-workspace-button",onClick:n,disabled:!s,children:o})]})})};var i6=n(81650),i5=n(76096),i7=n(87933);let i9=c.Ay.div.withConfig({displayName:"styles__TaskStatsContainer",componentId:"sc-13401d46-0"})(["display:flex;gap:1rem;"]),i8=c.Ay.p.withConfig({displayName:"styles__TimeRemaining",componentId:"sc-13401d46-1"})(["margin:0;font-family:",";color:",";font-size:",";font-weight:600;"],e=>{let{theme:t}=e;return t.fonts.quaternary},e=>{let{theme:t}=e;return t.colors.placeholder},e=>{let{theme:t}=e;return t.fontSize.body.md}),oe=c.Ay.div.withConfig({displayName:"styles__ContainerTasks",componentId:"sc-13401d46-2"})(["display:flex;flex-direction:column;padding-top:1rem;"]),ot=(0,c.Ay)(i7.A).withConfig({displayName:"styles__StyledFileDropTargetFullScreen",componentId:"sc-13401d46-3"})(["padding:0 1.5rem;@media (max-width:","){padding:0rem;}"],e=>{let{theme:t}=e;return t.breakpoints.md}),on=c.Ay.div.withConfig({displayName:"styles__ContentListContainer",componentId:"sc-13401d46-4"})(["display:flex;flex-direction:column;background-color:",";border-radius:1.5rem;padding:1.5rem;"],e=>{let{theme:t}=e;return t.colors.white}),oi=c.Ay.h3.withConfig({displayName:"styles__ListSectionTitle",componentId:"sc-13401d46-5"})(["font-family:",";font-weight:700;font-size:",";margin:0;"],e=>{let{theme:t}=e;return t.fonts.quaternary},e=>{let{theme:t}=e;return t.fontSize.body.xl}),oo=c.Ay.div.withConfig({displayName:"styles__HeaderSection",componentId:"sc-13401d46-6"})(["display:flex;justify-content:space-between;align-items:center;"]),or=(0,c.Ay)(I.$).withConfig({displayName:"styles__StyledUploadButton",componentId:"sc-13401d46-7"})([""]),os=c.Ay.div.withConfig({displayName:"styles__RegularTaskDetailContainer",componentId:"sc-13401d46-8"})([""]),oa=c.Ay.div.withConfig({displayName:"styles__CompleteTaskEntry",componentId:"sc-13401d46-9"})(["display:flex;padding:1rem 0;flex-direction:column;"]),ol=c.Ay.p.withConfig({displayName:"styles__CompletedOnText",componentId:"sc-13401d46-10"})(["margin:0;font-family:",";font-size:",";font-weight:500;color:",";"],e=>{let{theme:t}=e;return t.fonts.quaternary},e=>{let{theme:t}=e;return t.fontSize.body.sm},e=>{let{theme:t}=e;return t.colors.placeholder}),od=c.Ay.p.withConfig({displayName:"styles__TaskNote",componentId:"sc-13401d46-11"})(["margin:0;color:",";font-family:",";font-size:",";font-weight:500;word-wrap:break-word;"],e=>{let{theme:t}=e;return t.colors["primary-dark"]},e=>{let{theme:t}=e;return t.fonts.quaternary},e=>{let{theme:t}=e;return t.fontSize.body.sm}),oc=c.Ay.p.withConfig({displayName:"styles__CompletedAlertText",componentId:"sc-13401d46-12"})(["margin:0;color:",";font-weight:600;font-size:",";font-family:",";"],e=>{let{theme:t}=e;return t.colors.green},e=>{let{theme:t}=e;return t.fontSize.body.sm},e=>{let{theme:t}=e;return t.fonts.quaternary}),ou=(0,c.Ay)(oc).withConfig({displayName:"styles__TaskStatusText",componentId:"sc-13401d46-13"})(["color:",";font-size:",";"],e=>{let{theme:t}=e;return t.colors["gray-90"]},e=>{let{theme:t}=e;return t.fontSize.body.md});var op=n(63151),om=n(11201),oh=n(37656);let oy=e=>["student-sampling-task-view",e],of=e=>{let{submissionId:t,enabled:n=!0,onRequested:i}=e,o=(0,eG.jE)(),{data:s=null,isLoading:a,isError:l,refetch:d}=(0,tZ.I)({queryKey:oy(t),queryFn:async()=>{var e;return null!=(e=(await (0,tY.b2)(t)).data)?e:null},enabled:n&&!!t}),c=(0,e$.n)({mutationFn:e=>(0,tY.kg)(t,e),onSuccess:e=>{(null==e?void 0:e.data)&&o.setQueryData(oy(t),e.data),null==i||i()},onError:e=>(0,ef.addErrorNotification)((null==e?void 0:e.userMessage)||(null==e?void 0:e.message)||"Could not submit the request.")});return{view:s,isLoadingView:a,isViewError:l,refetchView:()=>{d()},submitRequest:(0,r.useCallback)(async e=>{await c.mutateAsync(e)},[c]),isSubmitting:c.isPending}},og=(0,c.i7)(["from{opacity:0.55;}to{opacity:1;}"]),ox=c.Ay.div.withConfig({displayName:"styles__LoadingRoot",componentId:"sc-285d60a8-0"})(["display:flex;flex-direction:column;gap:1.25rem;width:100%;"]),ow=c.Ay.div.withConfig({displayName:"styles__Block",componentId:"sc-285d60a8-1"}
1)(["height:",";width:",";border-radius:",";background-color:",";animation:"," 1.2s ease-in-out infinite alternate;@media (prefers-reduced-motion:reduce){animation:none;}"],e=>{let{$height:t}=e;return t||"1rem"},e=>{let{$width:t}=e;return t||"100%"},e=>{let{$radius:t}=e;return t||"12px"},e=>{let{theme:t}=e;return t.colors["blue-20"]},og),ob=c.Ay.div.withConfig({displayName:"styles__Row",componentId:"sc-285d60a8-2"})(["display:flex;flex-wrap:wrap;gap:1rem;width:100%;"]),oC=c.Ay.div.withConfig({displayName:"styles__Card",componentId:"sc-285d60a8-3"})(["flex:1;min-width:240px;display:flex;flex-direction:column;gap:0.85rem;padding:1.5rem;border-radius:16px;background-color:",";"],e=>{let{theme:t}=e;return t.colors.white}),ov=()=>(0,i.jsxs)(ox,{"data-testid":"task-detail-loading","aria-busy":"true",children:[(0,i.jsxs)(ob,{children:[(0,i.jsx)(ow,{$width:"120px",$height:"52px"}),(0,i.jsx)(ow,{$height:"52px"})]}),(0,i.jsxs)(ob,{children:[(0,i.jsxs)(oC,{children:[(0,i.jsx)(ow,{$width:"45%",$height:"1.25rem"}),(0,i.jsx)(ow,{$height:"0.75rem",$radius:"200px"})]}),(0,i.jsxs)(oC,{children:[(0,i.jsx)(ow,{$width:"45%",$height:"1.25rem"}),(0,i.jsx)(ow,{$height:"0.75rem",$radius:"200px"})]})]}),(0,i.jsx)(ow,{$height:"260px",$radius:"16px"})]});var ok=n(52506),oj=n(42764),oS=n(66309),o_=n(52044),oA=n(7697);let oI=c.Ay.div.withConfig({displayName:"styles__ListRoot",componentId:"sc-3c12a059-0"})(["display:flex;flex-direction:column;gap:0.5rem;font-family:",";"],e=>{let{theme:t}=e;return t.fonts.quaternary}),oN=c.Ay.div.withConfig({displayName:"styles__ProductRow",componentId:"sc-3c12a059-1"})(["display:flex;align-items:center;gap:0.75rem;padding:0.6rem 0.85rem;border-radius:10px;background-color:",";opacity:",";"],e=>{let{theme:t}=e;return t.colors["gray-30"]},e=>{let{$muted:t}=e;return t?.55:1}),oT=c.Ay.div.withConfig({displayName:"styles__Thumb",componentId:"sc-3c12a059-2"})(["width:40px;height:40px;border-radius:8px;flex-shrink:0;border:1px solid ",";background-color:",";background-image:",";background-size:cover;background-position:center;display:flex;align-items:center;justify-content:center;font-size:",";font-weight:600;color:",";"],e=>{let{theme:t}=e;return t.colors["black-20"]},e=>{let{theme:t}=e;return t.colors.white},e=>{let{$imageUrl:t}=e;return(0,oA.Y)(t)},e=>{let{theme:t}=e;return t.fontSize.body.md},e=>{let{theme:t}=e;return t.colors["primary-dark"]}),oE=c.Ay.div.withConfig({displayName:"styles__RowMain",componentId:"sc-3c12a059-3"})(["flex:1;min-width:0;display:flex;flex-direction:column;gap:0.1rem;"]),oD=c.Ay.span.withConfig({displayName:"styles__RowName",componentId:"sc-3c12a059-4"})(["font-size:",";font-weight:600;color:",";overflow-wrap:anywhere;"],e=>{let{theme:t}=e;return t.fontSize.body.lg},e=>{let{theme:t}=e;return t.colors["primary-dark"]}),oL=c.Ay.span.withConfig({displayName:"styles__RowSubtitle",componentId:"sc-3c12a059-5"})(["font-size:",";color:",";"],e=>{let{theme:t}=e;return t.fontSize.body.sm},e=>{let{theme:t}=e;return t.colors["gray-40"]}),oM=c.Ay.span.withConfig({displayName:"styles__CapHint",componentId:"sc-3c12a059-6"})(["font-size:",";color:",";"],e=>{let{theme:t}=e;return t.fontSize.body.sm},e=>{let{theme:t}=e;return t.colors["gray-40"]}),oP=c.Ay.div.withConfig({displayName:"styles__Stepper",componentId:"sc-3c12a059-7"})(["display:flex;align-items:center;gap:0.5rem;flex-shrink:0;"]),oR=c.Ay.button.withConfig({displayName:"styles__StepperButton",componentId:"sc-3c12a059-8"})(["width:34px;height:34px;border:1px solid ",";border-radius:8px;background-color:",";font-family:inherit;font-size:",";color:",";cursor:pointer;display:flex;align-items:center;justify-content:center;&:disabled{opacity:0.4;cursor:not-allowed;}&:focus-visible{outline:2px solid ",";outline-offset:1px;}"],e=>{let{theme:t}=e;return t.colors["black-20"]},e=>{let{theme:t}=e;return t.colors.white},e=>{let{theme:t}=e;return t.fontSize.body.lg},e=>{let{theme:t}=e;return t.colors["primary-dark"]},e=>{let{theme:t}=e;return t.colors.primary}),oO=c.Ay.span.withConfig({displayName:"styles__StepperValue",componentId:"sc-3c12a059-9"})(["min-width:1.8rem;text-align:center;font-size:",";font-weight:700;color:",";font-variant-numeric:tabular-nums;"],e=>{let{theme:t}=e;return t.fontSize.body.lg},e=>{let{theme:t}=e;return t.colors.primary}),oz=c.Ay.div.withConfig({displayName:"styles__TotalRow",componentId:"sc-3c12a059-10"})(["font-size:",";font-weight:600;color:",";text-align:right;padding-top:0.15rem;"],e=>{let{theme:t}=e;return t.fontSize.body.sm},e=>{let{theme:t}=e;return t.colors["gray-40"]}
1),oq=e=>{let{products:t,quantities:n,onChange:o,maxPerOrder:r,disabled:s}=e,a=t.reduce((e,t)=>{var i;return e+(null!=(i=n[t.variantId])?i:0)},0),l=null!==r&&a>=r;return(0,i.jsxs)(oI,{children:[t.map(e=>{var t,r,a;let d=null!=(t=n[e.variantId])?t:0,c=e.remainingForStudent,u=null!==c&&c<=0;return(0,i.jsxs)(oN,{$muted:u,children:[(0,i.jsx)(oT,{$imageUrl:null!=(r=e.imageUrl)?r:void 0,children:!e.imageUrl&&e.label.charAt(0)}),(0,i.jsxs)(oE,{children:[(0,i.jsx)(oD,{children:e.label}),(0,i.jsxs)(oL,{children:[null!=(a=e.variantTitle)?a:"One size",u?(0,i.jsx)(oM,{children:" \xb7 Limit reached"}):null!==c&&(0,i.jsxs)(oM,{children:[" \xb7 ",c," item",1===c?"":"s"," left for you"]})]})]}),(0,i.jsxs)(oP,{children:[(0,i.jsx)(oR,{type:"button","aria-label":"Remove an item of ".concat(e.label),"data-testid":"sampling-request-decrement-".concat(e.variantId),disabled:s||d<=0,onClick:()=>o(e.variantId,Math.max(0,d-1)),children:"â"}),(0,i.jsx)(oO,{"data-testid":"sampling-request-quantity-".concat(e.variantId),children:d}),(0,i.jsx)(oR,{type:"button","aria-label":"Add an item of ".concat(e.label),"data-testid":"sampling-request-increment-".concat(e.variantId),disabled:s||null!==c&&d>=c||l,onClick:()=>o(e.variantId,d+1),children:"+"})]})]},e.variantId)}),(0,i.jsxs)(oz,{"data-testid":"sampling-request-total",children:[a," item",1===a?"":"s"," in this order",null!==r&&" \xb7 max ".concat(r," per order")]})]})},oB=c.Ay.div.withConfig({displayName:"styles__StepperRoot",componentId:"sc-57eae9e6-0"})(["display:flex;gap:0.4rem;width:100%;font-family:",";"],e=>{let{theme:t}=e;return t.fonts.quaternary}),oV=c.Ay.div.withConfig({displayName:"styles__StepChevron",componentId:"sc-57eae9e6-1"})(["flex:1;min-width:0;display:flex;align-items:center;gap:0.5rem;height:","px;padding-right:0.9rem;padding-left:",";clip-path:",";background:",";"," @media (max-width:560px){gap:0.35rem;padding-right:0.5rem;padding-left:",";}"],44,e=>{let{$first:t}=e;return t?"0.9rem":"1.5rem"},e=>{let{$first:t,$last:n}=e;return t?"polygon(".concat(6,"px 0, calc(100% - ").concat(13,"px) 0, 100% ").concat(22,"px, calc(100% - ").concat(13,"px) 100%, ").concat(6,"px 100%, 0 calc(100% - ").concat(6,"px), 0 ").concat(6,"px)"):n?"polygon(0 0, calc(100% - ".concat(6,"px) 0, 100% ").concat(6,"px, 100% calc(100% - ").concat(6,"px), calc(100% - ").concat(6,"px) 100%, 0 100%, ").concat(13,"px ").concat(22,"px)"):"polygon(0 0, calc(100% - ".concat(13,"px) 0, 100% ").concat(22,"px, calc(100% - ").concat(13,"px) 100%, 0 100%, ").concat(13,"px ").concat(22,"px)")},e=>{let{theme:t}=e;return t.colors["gray-70"]},e=>{let{$state:t,theme:n}=e;return"active"===t&&(0,c.AH)(["background:linear-gradient( 90deg,"," 0%,"," 100% );"],n.colors.primary,n.colors["blue-90"])},e=>{let{$first:t}=e;return t?"0.5rem":"1.1rem"}),oU=c.Ay.span.withConfig({displayName:"styles__StepBadge",componentId:"sc-57eae9e6-2"})(["flex-shrink:0;width:24px;height:24px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:",";font-weight:700;font-variant-numeric:tabular-nums;background:",";color:",";"],e=>{let{theme:t}=e;return t.fontSize.body.sm},e=>{let{theme:t}=e;return t.colors.white},e=>{let{theme:t,$state:n}=e;return"active"===n?t.colors.primary:t.colors["gray-90"]}),oW=c.Ay.span.withConfig({displayName:"styles__StepLabel",componentId:"sc-57eae9e6-3"})(["font-size:",";font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:",";@media (max-width:560px){font-size:",";}"],e=>{let{theme:t}=e;return t.fontSize.body.lg},e=>{let{theme:t,$state:n}=e;return"active"===n?t.colors.white:t.colors["primary-dark"]},e=>{let{theme:t}=e;return t.fontSize.body.sm}),oH=e=>{let{steps:t,activeIndex:n}=e;return(0,i.jsx)(oB,{"data-testid":"sampling-wizard-stepper",children:t.map((e,o)=>{let r=o===n?"active":o<n?"done":"upcoming";return(0,i.jsxs)(oV,{$state:r,$first:0===o,$last:o===t.length-1,"data-testid":"sampling-wizard-step-".concat(e.key),children:[(0,i.jsx)(oU,{$state:r,children:o+1}),(0,i.jsx)(oW,{$state:r,children:e.label})]},e.key)})})},oF=c.Ay.div.withConfig({displayName:"styles__ConfirmationRoot",componentId:"sc-1fe93354-0"})(["display:flex;flex-direction:column;align-items:center;gap:0.9rem;padding:1.5rem 1.5rem 0.5rem;text-align:center;font-family:",";"],e=>{let{theme:t}=e;return t.fonts.quaternary}),oG=c.Ay.div.withConfig({displayName:"styles__ConfirmationParcel",componentId:"sc-1fe93354-1"})(["font-size:3.5rem;line-height:1;"]),o$=c.Ay.h3.withConfig({displayName:"styles__ConfirmationTitle",componentId:"sc-1fe93354-2"})(["margin:0;font-size:",";font-weight:700;color:",";"],e=>{let{theme:t}=e;return t.fontSize.body.lg},e=>{let{theme:t}=e;return t.colors["primary-dark"]}),oZ=c.Ay.p.withConfig({displayName:"styles__ConfirmationBody",componentId:"sc-1fe93354-3"})(["margin:0;max-width:34ch;font-size:",";color:",";"],e=>{let{theme:t}=e;return t.fontSize.body.md},e=>{let{theme:t}=e;return t.colors["primary-dark"]}),oY=c.Ay.div.withConfig({displayName:"styles__ConfirmationHint",componentId:"sc-1fe93354-4"})(["width:100%;border-top:1px solid ",";margin-top:0.4rem;"],e=>{let{theme:t}=e;return t.colors["black-20"]}),oK=e=>{let{brandName:t}=e;return(0,i.jsxs)(oF,{"data-testid":"sampling-request-confirmation",children:[(0,i.jsx)(oG,{role:"img","aria-label":"Parcel",children:"\uD83D\uDCE6"}),(0,i.jsx)(o$,{children:t?"Now ".concat(t," takes a look"):"Now the brand takes a look"}),(0,i.jsx)(oZ,{children:"Brands choose who they send samples to, so a request isn't a guarantee. We'll email you either way, usually within 2 days. If you're picked, it ships to the address on your request."}),(0,i.jsx)(oY,{})]})},oQ=c.Ay.div.withConfig({displayName:"styles__MobileFooter",componentId:"sc-c4adc4c0-0"})(["position:sticky;bottom:0;margin:auto -1.5rem 0;display:flex;gap:0.75rem;padding:1rem 1.5rem calc(1rem + env(safe-area-inset-bottom));background:",";border-top:1px solid ",";& > button{flex:1;}"],e=>{let{theme:t}=e;return t.colors.white},e=>{let{theme:t}=e;return t.colors["gray-130"]}),oX=c.Ay.div.withConfig({displayName:"styles__ModalBody",componentId:"sc-c4adc4c0-1"})(["display:flex;flex-direction:column;padding:0 1.5rem 1rem;"," font-family:",";"],e=>{let{$mobile:t}=e;return t&&"min-height: 100%;"},e=>{let{theme:t}=e;return t.fonts.quaternary}),oJ=c.Ay.div.withConfig({displayName:"styles__StepHeaderRow",componentId:"sc-c4adc4c0-2"})(["padding:0 0rem;margin-bottom:1rem;margin-top:1rem;"]),o0=c.Ay.h3.withConfig({displayName:"styles__StepTitle",componentId:"sc-c4adc4c0-3"})(["margin:0;font-size:",";font-weight:700;color:",";"],e=>{let{theme:t}=e;return t.fontSize.body.lg},e=>{let{theme:t}=e;return t.colors.primary});c.Ay.h3.withConfig({displayName:"styles__SectionTitle",componentId:"sc-c4adc4c0-4"})(["margin:0;font-size:",";font-weight:700;color:",";"],e=>{let{theme:t}=e;return t.fontSize.body.lg},e=>{let{theme:t}=e;return t.colors["primary-dark"]}),c.Ay.p.withConfig({displayName:"styles__SectionHint",componentId:"sc-c4adc4c0-5"})(["margin:0.15rem 0 0;font-size:",";color:",";"],e=>{let{theme:t}=e;return t.fontSize.body.sm},e=>{let{theme:t}=e;return t.colors["gray-40"]}
1);let o1=c.Ay.section.withConfig({displayName:"styles__Section",componentId:"sc-c4adc4c0-6"})(["display:flex;flex-direction:column;gap:0.65rem;"]),o2=c.Ay.div.withConfig({displayName:"styles__RequirementBanner",componentId:"sc-c4adc4c0-7"})(["display:flex;align-items:center;gap:0.5rem;padding:0.6rem 0.85rem;border-radius:10px;background-color:",";color:",";font-size:",";font-weight:600;"],e=>{let{theme:t}=e;return t.colors["yellow-10"]},e=>{let{theme:t}=e;return t.colors["primary-dark"]},e=>{let{theme:t}=e;return t.fontSize.body.sm}),o3=c.Ay.div.withConfig({displayName:"styles__TwoColumn",componentId:"sc-c4adc4c0-8"})(["display:grid;grid-template-columns:1fr 1fr;gap:1rem 1.5rem;@media (max-width:640px){grid-template-columns:1fr;}"]),o4=c.Ay.div.withConfig({displayName:"styles__Column",componentId:"sc-c4adc4c0-9"})(["display:flex;flex-direction:column;gap:0.85rem;min-width:0;"]);c.Ay.div.withConfig({displayName:"styles__FieldGrid",componentId:"sc-c4adc4c0-10"})(["display:grid;grid-template-columns:1fr 1fr;gap:0.75rem;@media (max-width:640px){grid-template-columns:1fr;}"]),c.Ay.div.withConfig({displayName:"styles__FullWidthField",componentId:"sc-c4adc4c0-11"})(["grid-column:1 / -1;"]);let o6=c.Ay.label.withConfig({displayName:"styles__FieldLabel",componentId:"sc-c4adc4c0-12"})(["display:flex;flex-direction:column;gap:0.3rem;font-family:",";font-size:",";font-weight:600;color:",";"],e=>{let{theme:t}=e;return t.fonts.quaternary},e=>{let{theme:t}=e;return t.fontSize.body.lg},e=>{let{theme:t}=e;return t.colors["primary-dark"]});c.Ay.span.withConfig({displayName:"styles__FieldCaption",componentId:"sc-c4adc4c0-13"})(["font-size:",";font-weight:600;color:",";"],e=>{let{theme:t}=e;return t.fontSize.body.sm},e=>{let{theme:t}=e;return t.colors["primary-dark"]});let o5=c.Ay.input.withConfig({displayName:"styles__TextInput",componentId:"sc-c4adc4c0-14"})(["width:100%;padding:0.6rem 0.85rem;border:1px solid ",";border-radius:8px;font-family:",";font-weight:400;font-size:",";color:",";background-color:",";&:focus-visible{outline:2px solid ",";outline-offset:1px;}"],e=>{let{theme:t}=e;return t.colors["black-20"]},e=>{let{theme:t}=e;return t.fonts.quaternary},e=>{let{theme:t}=e;return t.fontSize.body.lg},e=>{let{theme:t}=e;return t.colors["primary-dark"]},e=>{let{theme:t}=e;return t.colors["blue-20"]},e=>{let{theme:t}=e;return t.colors.primary}),o7=c.Ay.select.withConfig({displayName:"styles__SelectInput",componentId:"sc-c4adc4c0-15"})(["width:100%;padding:0.6rem 0.85rem;border:1px solid ",";border-radius:8px;font-family:",";font-weight:400;font-size:",";color:",";background-color:",";&:focus-visible{outline:2px solid ",";outline-offset:1px;}"],e=>{let{theme:t}=e;return t.colors["black-20"]},e=>{let{theme:t}=e;return t.fonts.quaternary},e=>{let{theme:t}=e;return t.fontSize.body.lg},e=>{let{theme:t}=e;return t.colors["primary-dark"]},e=>{let{theme:t}=e;return t.colors["blue-20"]},e=>{let{theme:t}=e;return t.colors.primary}),o9=c.Ay.span.withConfig({displayName:"styles__ErrorText",componentId:"sc-c4adc4c0-16"})(["font-family:",";font-size:",";font-weight:400;color:",";"],e=>{let{theme:t}=e;return t.fonts.quaternary},e=>{let{theme:t}=e;return t.fontSize.body.xs},e=>{let{theme:t}=e;return t.colors["red-orange"]});c.Ay.p.withConfig({displayName:"styles__AddressNote",componentId:"sc-c4adc4c0-17"})(["margin:0;font-size:",";color:",";"],e=>{let{theme:t}=e;return t.fontSize.body.xs},e=>{let{theme:t}=e;return t.colors["gray-40"]});let o8=c.Ay.div.withConfig({displayName:"styles__QuestionBlock",componentId:"sc-c4adc4c0-18"})(["display:flex;flex-direction:column;gap:0.35rem;"]),re=c.Ay.p.withConfig({displayName:"styles__QuestionHint",componentId:"sc-c4adc4c0-19"})(["margin:0;font-size:",";color:",";"],e=>{let{theme:t}=e;return t.fontSize.body.xs},e=>{let{theme:t}=e;return t.colors["gray-40"]}),rt=c.Ay.p.withConfig({displayName:"styles__EmptyQuestions",componentId:"sc-c4adc4c0-20"})(["margin:0;padding:1rem 0;text-align:center;font-size:",";color:",";"],e=>{let{theme:t}=e;return t.fontSize.body.sm},e=>{let{theme:t}=e;return t.colors["gray-40"]});c.Ay.div.withConfig({displayName:"styles__LoadingState",componentId:"sc-c4adc4c0-21"})(["display:flex;flex-direction:column;gap:0.75rem;padding:1rem 0;"]);let rn=iZ.ZI,ri=e=>{var t,n;let{isOpen:o,onClose:s,gigId:a,view:l,onSubmit:d,isSubmitting:c,defaultName:u,defaultEmail:p,brandName:m}=e,[h,y]=(0,r.useState)(0),[f,g]=(0,r.useState)(!1),x=(0,Y.Q)("md").isResponsive,w=(0,r.useMemo)(()=>l.questions.filter(o_.HQ),[l.questions]),b=(0,r.useMemo)(()=>{let e=[{key:"product",label:"Product"}];return w.length>0&&e.push({key:"about",label:"About"}),e.push({key:"shipping",label:"Shipping"}),e},[w.length]),C=null!=(n=null==(t=b[h])?void 0:t.key)?n:"product",v=h===b.length-1,k=(0,r.useMemo)(()=>{var e,t,n,i,o,r,s,a,d,c,m,h;let y=l.shippingDefaults;return{answers:w.reduce((e,t)=>
1{let n=o_.yy[t.questionType];return n&&(e[(0,o_.U4)(t)]=n.initialValue()),e},{}),quantities:{},shipmentName:null!=(n=null!=(t=null==y?void 0:y.shipmentName)?t:u)?n:"",shipmentEmail:null!=(o=null!=(i=null==y?void 0:y.shipmentEmail)?i:p)?o:"",shipmentAddress:null!=(r=null==y?void 0:y.shipmentAddress)?r:"",shipmentAddress2:null!=(s=null==y?void 0:y.shipmentAddress2)?s:"",shipmentCityTown:null!=(a=null==y?void 0:y.shipmentCityTown)?a:"",shipmentStateRegionProvince:null!=(d=null==y?void 0:y.shipmentStateRegionProvince)?d:"",shipmentZipPostCode:null!=(c=null==y?void 0:y.shipmentZipPostCode)?c:"",shipmentCountry:null!=(h=null!=(m=null==y?void 0:y.shipmentCountry)?m:null==(e=rn[0])?void 0:e.value)?h:""}},[w,l.shippingDefaults,u,p]),j=(0,r.useMemo)(()=>{let e=w.reduce((e,t)=>{let n=o_.yy[t.questionType];return n&&(e[(0,o_.U4)(t)]=n.buildSchema(t)),e},{});return tQ.Ik().shape({answers:tQ.Ik().shape(e),quantities:tQ.Ik().test("sampling-request-has-items","Add at least one item to your order.",e=>Object.values(null!=e?e:{}).some(e=>Number(e)>0)),shipmentName:tQ.Yj().matches(RegExp("^\\p{L}[\\p{L}\\p{M}'â-]*(\\s+\\p{L}[\\p{L}\\p{M}'â-]*)+$","u"),"Please enter your full name").required("Required."),shipmentEmail:tQ.Yj().email("Invalid email address").required("Required."),shipmentAddress:tQ.Yj().required("Required."),shipmentAddress2:tQ.Yj(),shipmentCityTown:tQ.Yj().required("Required."),shipmentStateRegionProvince:tQ.Yj().required("Required."),shipmentZipPostCode:tQ.Yj().required("Required."),shipmentCountry:tQ.Yj().required("Required.")})},[w]),S=e=>"product"===e?["quantities"]:"about"===e?w.map(e=>"answers.".concat((0,o_.U4)(e))):["shipmentName","shipmentEmail","shipmentAddress","shipmentCityTown","shipmentStateRegionProvince","shipmentZipPostCode","shipmentCountry"],_=(0,r.useRef)(!1),A=()=>{c||_.current||s()},I=async e=>{if(_.current)return;_.current=!0;let t=l.products.map(t=>{var n;return{variantId:t.variantId,quantity:null!=(n=e.quantities[t.variantId])?n:0}}).filter(e=>e.quantity>0),n=w.map(t=>{var n;let i=o_.yy[t.questionType];return i?i.toAnswerDTO(t,null!=(n=e.answers[(0,o_.U4)(t)])?n:""):null}).filter(e=>null!==e);try{await d({shipmentName:e.shipmentName,shipmentEmail:e.shipmentEmail,shipmentAddress:e.shipmentAddress,shipmentAddress2:e.shipmentAddress2||void 0,shipmentCityTown:e.shipmentCityTown,shipmentStateRegionProvince:e.shipmentStateRegionProvince,shipmentZipPostCode:e.shipmentZipPostCode,shipmentCountry:e.shipmentCountry,products:t,answers:n}),g(!0)}catch(e){}finally{_.current=!1}},N=(e=>e.length>48?"".concat(e.slice(0,47).trimEnd(),"â¦"):e)(l.task.name||"Request samples");return(0,i.jsx)(tK.l1,{enableReinitialize:!0,initialValues:k,validationSchema:j,onSubmit:I,children:e=>{var t;let{values:n,errors:r,touched:d,handleSubmit:u,handleChange:p,handleBlur:g,setFieldValue:k,setFieldTouched:j,validateForm:_}=e,I=w.some(e=>(0,o_.lQ)(n.answers[(0,o_.U4)(e)])),T=rn.find(e=>e.value===n.shipmentCountry),E=null!=(t=null==T?void 0:T.states)?t:[],D=async()=>{let e=await _(),t=S(C);if(t.some(t=>!!(0,tK.O6)(e,t))){t.forEach(e=>j(e,!0,!1));let n=(e=>{if("about"===C){let t=w.find(t=>(0,tK.O6)(e,"answers.".concat((0,o_.U4)(t))));return t?"sampling-request-question-".concat(t.id):null}if("shipping"===C){let t=S("shipping").find(t=>(0,tK.O6)(e,t));return t?"sampling-request-".concat(t):null}return"sampling-request-total"})(e);n&&window.requestAnimationFrame(()=>{let e=document.querySelector('[data-testid="'.concat(n,'"]'));e&&"function"==typeof e.scrollIntoView&&e.scrollIntoView({behavior:"smooth",block:"center"})});return}v?u():y(e=>e+1)},L=()=>{0===h?A():y(e=>e-1)},M=e=>{let t=d.answers,n=r.answers;return(null==t?void 0:t[e])?null==n?void 0:n[e]:void 0},P=e=>d[e]?r[e]:void 0,R=f?{onNext:s,nextButtonText:"Got It!"}:{onBack:L,backButtonText:0===h?"Cancel":"Previous",onNext:D,nextButtonText:v?"Submit request":"Continue",nextButtonLoading:c,nextButtonDisabled:c||I,backButtonDisabled:c};return(0,i.jsx)(oS.default,{isOpen:o,onClose:A,ariaLabel:l.task.name||"Request samples",width:f?560:1e3,height:"auto",hideOtherModals:!1,modalData:{modalTitle:f?"Request Sent":N,titleIsSticky:!0,footerIsSticky:!0,footerStyle:{flexDirection:"row"},headerProps:{padding:"1.5rem",textAlign:"left",textTransform:"none"},buttonProps:{nextButton:{variant:"primaryGradient",width:"180px",noBorder:!0},backButton:{width:"180px"}},...R},children:f?x?(0,i.jsxs)(oX,{$mobile:!0,children:[(0,i.jsx)(oK,{brandName:m}),(0,i.jsx)(oQ,{children:(0,i.jsx)(eb.$,{type:"button",onClick:s,children:"Got It!"})})]}):(0,i.jsx)(oK,{brandName:m}):(0,i.jsxs)(oX,{$mobile:x,children:[(0,i.jsx)(oJ,{children:(0,i.jsx)(oH,{steps:b,activeIndex:h})}),"product"===C&&(0,i.jsxs)(o1,{children:[(0,i.jsx)(o0,{children:"Which products, and how many?"}),(0,i.jsxs)(o2,{"data-testid":"sampling-request-requirement",children:[(0,i.jsx)("span",{role:"img","aria-label":"Heads up",children:"â"}),"Requirement:"," ",l.task.requiredCount?"".concat(l.task.requiredCount," item").concat(1===l.task.requiredCount?"":"s"):"one of each product",null!==l.task.maxPerOrder&&", max ".concat(l.task.maxPerOrder," per order"),"."]}),(0,i.jsx)(oq,{products:l.products,quantities:n.quantities,onChange:(e,t)=>
1k("quantities",{...n.quantities,[e]:t}),maxPerOrder:l.task.maxPerOrder,disabled:c}),"string"==typeof r.quantities&&!!d.quantities&&(0,i.jsx)(o9,{children:r.quantities})]}),"about"===C&&(0,i.jsxs)(o1,{children:[(0,i.jsx)(o0,{children:"About you and your event"}),0===w.length?(0,i.jsx)(rt,{children:"No extra questions â continue to shipping."}):(0,i.jsx)(o3,{children:[0,1].map(e=>(0,i.jsx)(o4,{children:w.filter((t,n)=>n%2===e).map(e=>{var t;let o=o_.yy[e.questionType];if(!o)return null;let r=(0,o_.U4)(e);return(0,i.jsxs)(o8,{"data-testid":"sampling-request-question-".concat(e.id),children:[o.renderField({question:e,value:null!=(t=n.answers[r])?t:"",gigId:a,error:M(r),onChange:e=>k("answers.".concat(r),e),onBlur:()=>j("answers.".concat(r),!0)}),e.description&&(0,i.jsx)(re,{children:e.description}),M(r)&&(0,i.jsx)(o9,{children:M(r)})]},e.id)})},e))})]}),"shipping"===C&&(0,i.jsxs)(o1,{children:[(0,i.jsx)(o0,{children:"Shipping details"}),(0,i.jsxs)(o3,{children:[(0,i.jsxs)(o4,{children:[(0,i.jsxs)(o6,{children:["What is the name on the shipment?",(0,i.jsx)(o5,{name:"shipmentName",placeholder:"Name","data-testid":"sampling-request-shipmentName",value:n.shipmentName,onChange:p,onBlur:g,disabled:c}),P("shipmentName")&&(0,i.jsx)(o9,{children:P("shipmentName")}
1)]}),(0,i.jsxs)(o6,{children:["What is your email?",(0,i.jsx)(o5,{name:"shipmentEmail",type:"email",placeholder:"Email","data-testid":"sampling-request-shipmentEmail",value:n.shipmentEmail,onChange:p,onBlur:g,disabled:c}),P("shipmentEmail")&&(0,i.jsx)(o9,{children:P("shipmentEmail")})]}),(0,i.jsxs)(o6,{children:["Country",(0,i.jsx)(ro,{values:n,handleChange:p,handleBlur:g,setFieldValue:k,disabled:c}),P("shipmentCountry")&&(0,i.jsx)(o9,{children:P("shipmentCountry")})]})]}),(0,i.jsxs)(o4,{children:[(0,i.jsxs)(o6,{children:["Address",(0,i.jsx)(o5,{name:"shipmentAddress",placeholder:"Line 1","data-testid":"sampling-request-shipmentAddress",value:n.shipmentAddress,onChange:p,onBlur:g,disabled:c}),P("shipmentAddress")&&(0,i.jsx)(o9,{children:P("shipmentAddress")})]}),(0,i.jsx)(o6,{children:(0,i.jsx)(o5,{name:"shipmentAddress2",placeholder:"Apt, ste number (optional)","aria-label":"Apt, suite number (optional)","data-testid":"sampling-request-shipmentAddress2",value:n.shipmentAddress2,onChange:p,onBlur:g,disabled:c})}),(0,i.jsxs)(o6,{children:["City or town",(0,i.jsx)(o5,{name:"shipmentCityTown",placeholder:"City or town","data-testid":"sampling-request-shipmentCityTown",value:n.shipmentCityTown,onChange:p,onBlur:g,disabled:c}),P("shipmentCityTown")&&(0,i.jsx)(o9,{children:P("shipmentCityTown")})]}),(0,i.jsxs)(o6,{children:["State, region, or province",(0,i.jsx)(rr,{values:n,stateOptions:E,handleChange:p,handleBlur:g,disabled:c}),P("shipmentStateRegionProvince")&&(0,i.jsx)(o9,{children:P("shipmentStateRegionProvince")})]}),(0,i.jsxs)(o6,{children:["Zip code",(0,i.jsx)(o5,{name:"shipmentZipPostCode",placeholder:"Zip code","data-testid":"sampling-request-shipmentZipPostCode",value:n.shipmentZipPostCode,onChange:p,onBlur:g,disabled:c}),P("shipmentZipPostCode")&&(0,i.jsx)(o9,{children:P("shipmentZipPostCode")})]})]})]})]}),x&&(0,i.jsxs)(oQ,{children:[(0,i.jsx)(eb.$,{type:"button",variant:"ghost",onClick:L,disabled:c,children:0===h?"Cancel":"Previous"}),(0,i.jsx)(eb.$,{type:"button",onClick:D,loading:c,disabled:c||I,children:v?"Submit request":"Continue"})]})]})},f?"confirmation":"wizard")}})},ro=e=>{let{values:t,handleChange:n,handleBlur:o,setFieldValue:r,disabled:s}=e;return(0,i.jsx)(o7,{name:"shipmentCountry","aria-label":"Country","data-testid":"sampling-request-shipmentCountry",value:t.shipmentCountry,onChange:e=>{let i=e.target.value;n(e),i!==t.shipmentCountry&&r("shipmentStateRegionProvince","")},onBlur:o,disabled:s,children:rn.map(e=>(0,i.jsx)("option",{value:e.value,children:e.label},e.value))})},rr=e=>{let{values:t,stateOptions:n,handleChange:o,handleBlur:r,disabled:s}=e;return 0===n.length?(0,i.jsx)(o5,{name:"shipmentStateRegionProvince",placeholder:"State, region, or province","data-testid":"sampling-request-shipmentStateRegionProvince",value:t.shipmentStateRegionProvince,onChange:o,onBlur:r,disabled:s}):(0,i.jsxs)(o7,{name:"shipmentStateRegionProvince","aria-label":"State, region, or province","data-testid":"sampling-request-shipmentStateRegionProvince",value:t.shipmentStateRegionProvince,onChange:o,onBlur:r,disabled:s,children:[(0,i.jsx)("option",{value:"",disabled:!0,children:"State, region, or province"}),n.map(e=>(0,i.jsx)("option",{value:e.value,children:e.label},e.value))]})},rs=e=>((e.User||{}).profile||{}).email||null;var ra=n(28097),rl=n(7732),rd=n(48881);let rc=c.Ay.div.withConfig({displayName:"styles__PaneRoot",componentId:"sc-b058c625-0"})(["display:flex;flex-direction:column;gap:1rem;font-family:",";"],e=>{let{theme:t}=e;return t.fonts.quaternary}),ru=c.Ay.div.withConfig({displayName:"styles__HeaderRow",componentId:"sc-b058c625-1"})(["display:flex;align-items:center;justify-content:space-between;gap:0.75rem;flex-wrap:wrap;"]),rp=c.Ay.h3.withConfig({displayName:"styles__PaneTitle",componentId:"sc-b058c625-2"})(["margin:0;font-size:",";font-weight:700;color:",";"],e=>{let{theme:t}=e;return t.fontSize.body.lg},e=>{let{theme:t}=e;return t.colors["primary-dark"]}),rm=c.Ay.button.withConfig({displayName:"styles__RequestButton",componentId:"sc-b058c625-3"})(["border:none;border-radius:8px;padding:0.55rem 1.1rem;font-family:inherit;font-size:",";font-weight:600;color:",";background-color:",";cursor:pointer;&:disabled{opacity:0.5;cursor:not-allowed;}&:focus-visible{outline:2px solid ",";outline-offset:2px;}"],e=>{let{theme:t}=e;return t.fontSize.body.md},e=>{let{theme:t}=e;return t.colors.white},e=>{let{theme:t}=e;return t.colors.primary},e=>{let{theme:t}=e;return t.colors.primary}),rh=c.Ay.div.withConfig({displayName:"styles__ProgressCard",componentId:"sc-b058c625-4"})(["display:flex;flex-direction:column;gap:0.5rem;padding:1rem;border:1px solid ",";border-radius:12px;background-color:",";"],e=>{let{theme:t}=e;return t.colors["black-20"]},e=>{let{theme:t}=e;return t.colors.white}),ry=c.Ay.span.withConfig({displayName:"styles__ProgressHeadline",componentId:"sc-b058c625-5"})(["font-size:",";font-weight:700;color:",";font-variant-numeric:tabular-nums;"],e=>{let{theme:t}=e;return t.fontSize.body.lg},e=>{let{theme:t}=e;return t.colors["primary-dark"]}),rf=c.Ay.span.withConfig({displayName:"styles__ProgressSubline",componentId:"sc-b058c625-6"})(["font-size:",";color:",";"],e=>{let{theme:t}=e;return t.fontSize.body.sm},e=>{let{theme:t}=e;return t.colors["gray-40"]}
1),rg=c.Ay.div.withConfig({displayName:"styles__ProgressTrack",componentId:"sc-b058c625-7"})(["height:8px;border-radius:999px;background-color:",";overflow:hidden;"],e=>{let{theme:t}=e;return t.colors["blue-20"]}),rx=c.Ay.div.withConfig({displayName:"styles__ProgressFill",componentId:"sc-b058c625-8"})(["height:100%;width:","%;border-radius:999px;background-color:",";transition:width 0.2s ease;"],e=>{let{$ratio:t}=e;return Math.min(100,Math.round(100*t))},e=>{let{theme:t}=e;return t.colors.primary}),rw=c.Ay.div.withConfig({displayName:"styles__ChecklistRow",componentId:"sc-b058c625-9"})(["display:flex;align-items:center;gap:0.5rem;font-size:",";color:",";"],e=>{let{theme:t}=e;return t.fontSize.body.sm},e=>{let{theme:t}=e;return t.colors["primary-dark"]}),rb=c.Ay.span.withConfig({displayName:"styles__ChecklistMark",componentId:"sc-b058c625-10"})(["width:18px;height:18px;border-radius:50%;flex-shrink:0;display:flex;align-items:center;justify-content:center;font-size:0.7rem;color:",";background-color:",";"],e=>{let{theme:t}=e;return t.colors.white},e=>{let{theme:t,$done:n}=e;return n?t.colors["green-90"]:t.colors["black-20"]}),rC=c.Ay.div.withConfig({displayName:"styles__RequestList",componentId:"sc-b058c625-11"})(["display:flex;flex-direction:column;gap:0.5rem;"]),rv=c.Ay.button.withConfig({displayName:"styles__RequestRow",componentId:"sc-b058c625-12"})(["display:flex;align-items:center;gap:0.75rem;width:100%;padding:0.7rem 0.9rem;border:1px solid ",";border-radius:10px;background-color:",";font-family:inherit;text-align:left;cursor:pointer;&:hover{border-color:",";}&:focus-visible{outline:2px solid ",";outline-offset:1px;}"],e=>{let{theme:t}=e;return t.colors["black-20"]},e=>{let{theme:t}=e;return t.colors.white},e=>{let{theme:t}=e;return t.colors.primary},e=>{let{theme:t}=e;return t.colors.primary}),rk=c.Ay.div.withConfig({displayName:"styles__RequestMain",componentId:"sc-b058c625-13"})(["flex:1;min-width:0;display:flex;flex-direction:column;gap:0.15rem;"]),rj=c.Ay.span.withConfig({displayName:"styles__RequestSummary",componentId:"sc-b058c625-14"})(["font-size:",";font-weight:600;color:",";overflow-wrap:anywhere;"],e=>{let{theme:t}=e;return t.fontSize.body.md},e=>{let{theme:t}=e;return t.colors["primary-dark"]}),rS=c.Ay.span.withConfig({displayName:"styles__RequestDate",componentId:"sc-b058c625-15"})(["font-size:",";color:",";"],e=>{let{theme:t}=e;return t.fontSize.body.xs},e=>{let{theme:t}=e;return t.colors["gray-40"]}),r_=c.Ay.p.withConfig({displayName:"styles__EmptyState",componentId:"sc-b058c625-16"})(["margin:0;padding:1.25rem 0.5rem;font-size:",";color:",";text-align:center;"],e=>{let{theme:t}=e;return t.fontSize.body.sm},e=>{let{theme:t}=e;return t.colors["gray-40"]}),rA=c.Ay.p.withConfig({displayName:"styles__ClosedNote",componentId:"sc-b058c625-17"})(["margin:0;font-size:",";color:",";"],e=>{let{theme:t}=e;return t.fontSize.body.sm},e=>{let{theme:t}=e;return t.colors["gray-40"]}),rI=c.Ay.div.withConfig({displayName:"styles__LoadingBlock",componentId:"sc-b058c625-18"})(["height:96px;border-radius:12px;background-color:",";animation:samplingPanePulse 1.2s ease-in-out infinite alternate;@keyframes samplingPanePulse{from{opacity:0.55;}to{opacity:1;}}@media (prefers-reduced-motion:reduce){animation:none;}"],e=>{let{theme:t}=e;return t.colors["blue-20"]}),rN=e=>{let{view:t}=e,{progress:n,task:o}=t,s=o.requirementMode===eo.e.ONE_OF_EACH,a=(0,r.useMemo)(()=>{let e=new Map;return t.products.forEach(t=>{e.has(t.productId)||e.set(t.productId,t.label)}),e},[t.products]);return s?(0,i.jsxs)(rh,{"data-testid":"sampling-task-progress",children:[(0,i.jsxs)(ry,{children:[n.perProduct.filter(e=>e.accepted>0).length," ","of ",n.requiredCount," products accepted"]}),(0,i.jsx)(rf,{children:"Get one item of each product accepted to finish this task."}),n.perProduct.map(e=>{var t;return(0,i.jsxs)(rw,{children:[(0,i.jsx)(rb,{$done:e.accepted>0,children:e.accepted>0?"â":""}),null!=(t=a.get(e.shopifyProductId))?t:"Product ".concat(e.shopifyProductId),0===e.accepted&&e.requested>0&&" â requested"]},e.shopifyProductId)})]}):(0,i.jsxs)(rh,{"data-testid":"sampling-task-progress",children:[(0,i.jsxs)(ry,{children:[n.acceptedCases," of ",n.requiredCount," items accepted"]}),(0,i.jsxs)(rf,{children:[n.requestedCases," item",1===n.requestedCases?"":"s"," requested so far"]}),(0,i.jsx)(rg,{children:(0,i.jsx)(rx,{$ratio:n.requiredCount>0?n.acceptedCases/n.requiredCount:0})})]})},rT=e=>{var t;let{gigId:n,submissionId:o,canRequest:a,onRequested:l}=e,[d,c]=(0,r.useState)(!1),[u,p]=(0,r.useState)(null),m=(0,s.d4)(e=>{var t;let n=null==(t=e.User)?void 0:t.data;
1return n&&(n.name||[n.firstName,n.lastName].filter(Boolean).join(" "))||""}),h=(0,s.d4)(rs),y=(0,s.d4)(e=>{var t,n;return null==(n=e.StudentWorkspace)||null==(t=n.company)?void 0:t.name}),{view:f,isLoadingView:g,isViewError:x,refetchView:w,submitRequest:b,isSubmitting:C}=of({submissionId:o,onRequested:()=>{ra.N.track(rl.E.events.SAMPLING_TASK_REQUEST_SUBMITTED,{gigId:n,submissionId:o}),null==l||l()}});if(x&&!f)return(0,i.jsxs)(rc,{"data-testid":"sampling-task-pane-error",children:[(0,i.jsx)(r_,{children:"We couldn't load this sampling task. Check your connection and try again."}),(0,i.jsx)(rm,{type:"button",onClick:w,"data-testid":"sampling-task-pane-retry",children:"Try again"})]});if(g||!f)return(0,i.jsxs)(rc,{"data-testid":"sampling-task-pane-loading",children:[(0,i.jsx)(rI,{}),(0,i.jsx)(rI,{})]});let v=null!==u&&null!=(t=f.requests[u])?t:null;return(0,i.jsxs)(rc,{"data-testid":"sampling-task-pane",children:[(0,i.jsxs)(ru,{children:[(0,i.jsx)(rp,{children:"Sample requests"}),!f.submissionClosed&&a&&(0,i.jsx)(rm,{type:"button","data-testid":"sampling-task-request-cta",onClick:()=>{ra.N.track(rl.E.events.SAMPLING_TASK_REQUEST_STARTED,{gigId:n,submissionId:o}),c(!0)},children:"Request samples"})]}),f.submissionClosed&&(0,i.jsx)(rA,{children:"This task is closed and no longer accepts requests."}),(0,i.jsx)(rN,{view:f}),0===f.requests.length?(0,i.jsx)(r_,{"data-testid":"sampling-task-empty",children:"No requests yet â pick your products to get started."}):(0,i.jsx)(rC,{children:f.requests.map((e,t)=>{var n;let o=(0,i$.r3)(e),r=(0,i$.oR)(o);return(0,i.jsxs)(rv,{type:"button","data-testid":"sampling-task-request-row-".concat(e.id),onClick:()=>p(t),children:[(0,i.jsxs)(rk,{children:[(0,i.jsx)(rj,{children:null!=(n=(0,i$.OL)(e))?n:"Sample request"}),(0,i.jsx)(rS,{children:(0,i$.CS)(e.createdAt)})]}),(0,i.jsx)(oj.q,{variant:r.variant,label:r.label})]},e.id)})}),(0,i.jsx)(iG.t,{isOpen:null!==v,onClose:()=>p(null),request:v?((e,t)=>({id:t.id,status:t.status,createdAt:t.createdAt,productsSummary:(0,i$.OL)(t),numberOfCases:t.products.reduce((e,t)=>e+t.quantity,0),shipmentSummary:e.shippingDefaults?[e.shippingDefaults.shipmentAddress,e.shippingDefaults.shipmentCityTown,e.shippingDefaults.shipmentStateRegionProvince,e.shippingDefaults.shipmentZipPostCode].filter(Boolean).join(", "):void 0,fulfillment:t.fulfillment}))(f,v):null,extraCards:v?(0,rd.p)(f.questions,v.answers):void 0,onPrevious:null!==u&&u>0?()=>p(u-1):void 0,onNext:null!==u&&u<f.requests.length-1?()=>p(u+1):void 0,hasPrevious:null!==u&&u>0,hasNext:null!==u&&u<f.requests.length-1}),d&&(0,i.jsx)(ri,{isOpen:d,onClose:()=>c(!1),gigId:n,view:f,onSubmit:b,isSubmitting:C,defaultName:m,defaultEmail:null!=h?h:"",brandName:y})]})};var rE=n(49099),rD=n(12903);let rL=c.Ay.div.withConfig({displayName:"styles__SubmissionsContainer",componentId:"sc-36a6d3ee-0"})(["display:flex;flex-direction:column;padding:1rem 0rem;margin-top:1rem;"]),rM=c.Ay.p.withConfig({displayName:"styles__NoSubmissionsText",componentId:"sc-36a6d3ee-1"})(["margin:0 auto;padding:2rem;font-family:",";font-size:",";font-weight:600;color:",";text-align:center;"],e=>{let{theme:t}=e;return t.fonts.quaternary},e=>{let{theme:t}=e;return t.fontSize.body.md},e=>{let{theme:t}=e;return t.colors.placeholder}),rP=c.Ay.div.withConfig({displayName:"styles__StudentContentSubmissionList",componentId:"sc-36a6d3ee-2"})(["display:flex;flex-direction:column;width:100%;"]),rR=c.Ay.div.withConfig({displayName:"styles__LoadingContainer",componentId:"sc-36a6d3ee-3"})(["display:flex;justify-content:center;height:5rem;align-items:center;"]);var rO=n(99890),rz=n(50677);let rq=c.Ay.div.withConfig({displayName:"styles__ContentRowGroup",componentId:"sc-5b130662-0"})(["display:flex;flex-direction:column;gap:0.75rem;padding:1rem 0;&:first-child{padding-top:0;}&:not(:last-child){border-bottom:1px solid ",";}"],e=>{let{theme:t}=e;return t.colors["blue-30"]}),rB=c.Ay.div.withConfig({displayName:"styles__ContentSubmissionContainer",componentId:"sc-5b130662-1"})(["display:flex;gap:1rem;cursor:pointer;width:100%;"]),rV=(0,c.Ay)(te.b).withConfig({displayName:"styles__ContentActionStrip",componentId:"sc-5b130662-2"})(["","{background:",";}","{min-height:2.125rem;padding:0 1rem;}@media (max-width:","){&&{padding:8px 8px 8px 10px;}","{background:none;}}"],rz.g7,e=>{let{theme:t}=e;return t.colors["gray-70"]},rz.fT,e=>{let{theme:t}=e;return t.breakpoints.md}
1,rz.g7),rU=c.Ay.div.withConfig({displayName:"styles__ThumbnailContainer",componentId:"sc-5b130662-3"})(["display:flex;flex-shrink:0;align-items:center;justify-content:center;"]),rW=(0,c.Ay)(rO.Ay).withConfig({displayName:"styles__StyledMediaPreviewItem",componentId:"sc-5b130662-4"})(["width:3rem;height:3rem;.preview-item-container{width:3rem;height:3rem;}"]),rH=c.Ay.div.withConfig({displayName:"styles__SubmissionDetailsContainer",componentId:"sc-5b130662-5"})(["display:flex;flex-direction:column;justify-content:space-between;min-width:0;padding:0.2rem 0rem;overflow:hidden;"]),rF=c.Ay.p.withConfig({displayName:"styles__SubmissionTitle",componentId:"sc-5b130662-6"})(["margin:0;font-size:",";font-weight:600;color:",";overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"],e=>{let{theme:t}=e;return t.fontSize.body.md},e=>{let{theme:t}=e;return t.colors["primary-dark"]}),rG=c.Ay.span.withConfig({displayName:"styles__VersionText",componentId:"sc-5b130662-7"})(["margin:0;color:",";"],e=>{let{theme:t}=e;return t.colors.placeholder}),r$=c.Ay.p.withConfig({displayName:"styles__DescriptionText",componentId:"sc-5b130662-8"})(["margin:0;font-size:",";font-weight:400;color:",";width:100%;white-space:wrap;word-wrap:break-word;p{width:100%;margin:0;white-space:wrap;word-wrap:break-word;}@media (max-width:","){overflow:hidden;white-space:nowrap;text-overflow:ellipsis;p{display:inline;white-space:nowrap;}}"],e=>{let{theme:t}=e;return t.fontSize.body.sm},e=>{let{theme:t}=e;return t.colors["primary-dark"]},e=>{let{theme:t}=e;return t.breakpoints.md}),rZ=c.Ay.div.withConfig({displayName:"styles__LeftSideContainer",componentId:"sc-5b130662-9"})(["display:flex;gap:1rem;flex:1;overflow:hidden;align-items:center;"]),rY=c.Ay.div.withConfig({displayName:"styles__RightSideContainer",componentId:"sc-5b130662-10"})(["display:flex;align-items:center;justify-content:center;gap:1rem;width:min-content;"]),rK=c.Ay.span.withConfig({displayName:"styles__OptionalPill",componentId:"sc-5b130662-11"})(["flex-shrink:0;padding:0.5rem 1rem;border:1px solid ",";border-radius:37px;color:",";font-weight:700;font-size:",";text-transform:uppercase;white-space:nowrap;@media (max-width:","){padding:0.25rem 0.625rem;font-size:",";}"],e=>{let{theme:t}=e;return t.colors["gray-50"]},e=>{let{theme:t}=e;return t.colors["gray-90"]},e=>{let{theme:t}=e;return t.fontSize.body.sm},e=>{let{theme:t}=e;return t.breakpoints.md},e=>{let{theme:t}=e;return t.fontSize.body.xs}),rQ=c.Ay.button.withConfig({displayName:"styles__UnreadMessageAlertContainer",componentId:"sc-5b130662-12"})(["background:transparent;border:none;cursor:pointer;height:1.5rem;width:1.5rem;flex-shrink:0;display:flex;align-items:center;justify-content:center;padding:0;color:",";"],e=>{let{theme:t}=e;return t.colors["yellow-90"]});var rX=n(39858),rJ=n(64787);let r0=e=>{let{file:t,version:n,isOptional:o=!1,onClick:r,actionOptions:s,extraMargin:a,action:l=null,onAction:d=()=>{}}=e,c=(0,Y.Q)("md").isResponsive,u=l?(0,eJ.Iu)(l):null,p=!(o&&c);return(0,i.jsxs)(rq,{children:[(0,i.jsxs)(rB,{onClick:r,children:[(0,i.jsxs)(rZ,{children:[(0,i.jsx)(rU,{children:(0,i.jsx)(rW,{file:{title:t.title,url:t.url,fileExtension:t.fileExtension},disableHover:!0,disablePreview:!0,disableToolTip:!0})}),p&&(0,i.jsxs)(rH,{children:[(0,i.jsxs)(rF,{children:[t.title," ⢠",(0,i.jsx)(rG,{children:"V".concat(n)})]}),(0,i.jsx)(r$,{dangerouslySetInnerHTML:{__html:(0,j.p9)(t.description)}})]})]}),(0,i.jsxs)(rY,{children:[t.hasNewFeedbackMessage&&(0,i.jsx)(tW.A,{title:"You have new feedback on this content.",children:(0,i.jsx)(rQ,{type:"button","aria-label":"You have new feedback on this content. Click to view messages.",onClick:e=>{e.stopPropagation(),r(t)},children:(0,i.jsx)(rJ.A,{})})}),o&&(0,i.jsx)(rK,{children:"Optional"}),(0,i.jsx)(rX.A,{isStudent:!0,isSubmissionPending:!1,status:t.status,isPosted:!!t.postedAt}),(0,i.jsx)(tp.A,{item:t,options:s,extraMargin:a})]})]}),u&&(0,i.jsx)(rV,{variant:"action",testId:null!=t.id?"content-action-strip-".concat(t.id):void 0,icon:"add-new-version"===l.kind?(0,i.jsx)(eQ,{"aria-hidden":!0,focusable:"false"}):(0,i.jsx)(eK,{"aria-hidden":!0,focusable:"false"}),text:u.message,actionLabel:u.ctaLabel,onAction:d})]})};var r1=n(93661);let r2={"add-links":{label:"Add Live Links",value:"add-links"},"edit-links":{label:"Edit Live Links",value:"add-links"},"add-new-version":{label:"Add New Version",value:"add-new"}},r3=e=>
1{let{studentContent:t,optionalContentIds:n,onNext:o,hasMore:r,isLoading:s,isFirstPageLoading:a,onClickItem:l,viewOnClick:d,editOnClick:c,regularTaskAndComplete:u,canUploadOrEditContent:p=!0,subtype:m}=e;return(0,i.jsx)(rL,{children:(0,i.jsxs)(nU.A,{dataLength:t.length,next:o,hasMore:r,children:[s&&a&&[0,1,2,3,4].map(()=>(0,i.jsx)(Q.G,{height:60})),!s&&0===t.length&&(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(rM,{children:u?"No content submissions yet":"No submissions yet"})}),t.length>0&&(0,i.jsx)(rP,{children:t.map(e=>{let t=e.files[0],o=(0,r1.QD)(e.links,t),r=o.isLive?o.isThumbnailLive&&o.thumbnailUrl||o.url:o.thumbnailUrl||o.url,s=r&&r===o.thumbnailUrl?(0,r1.Bm)(r):o.format,a=(0,eJ.aK)({piece:e,subtype:m,canAct:p}),u=a&&r2[a.kind];return(0,i.jsx)(r0,{extraMargin:60,file:{id:e.id,url:r,title:e.title,fileExtension:s,description:e.description,status:e.status,postedAt:e.postedAt,hasNewFeedbackMessage:e.hasNewFeedbackMessage},version:e.files.length,isOptional:!!(null==n?void 0:n.has(e.id)),onClick:()=>l(e),action:a,onAction:()=>c(e),actionOptions:[{label:"View",value:"view",onClick:()=>d(e)},...u?[{...u,onClick:()=>c(e)}]:[]]},e.id)})}),s&&t.length>0&&(0,i.jsx)(rR,{children:(0,i.jsx)(nW.R,{color:"primary-dark"})})]})})},r4=c.Ay.div.withConfig({displayName:"styles__IncompleteTaskContainer",componentId:"sc-4091a1fb-0"})(["display:flex;flex-direction:column;gap:1rem;margin:1rem auto;padding:1rem;border:4px solid ",";background-color:",";border-radius:1.5rem;max-width:50%;@media (max-width:","){max-width:80%;}@media (max-width:","){max-width:100%;}"],e=>{let{theme:t}=e;return t.colors["blue-10"]},e=>{let{theme:t}=e;return t.colors.white},e=>{let{theme:t}=e;return t.breakpoints.lg},e=>{let{theme:t}=e;return t.breakpoints.md}),r6=c.Ay.p.withConfig({displayName:"styles__CompleteTaskText",componentId:"sc-4091a1fb-1"})(["margin:0;font-family:",";font-size:",";font-weight:500;text-align:center;color:",";"],e=>{let{theme:t}=e;return t.fonts.quaternary},e=>{let{theme:t}=e;return t.fontSize.body.md},e=>{let{theme:t}=e;return t.colors["primary-dark"]}),r5=(0,c.Ay)(I.$).withConfig({displayName:"styles__StyledCompleteButton",componentId:"sc-4091a1fb-2"})(["width:max-content;margin:0 auto;"]),r7=e=>{let{onCompleteTask:t}=e;return(0,i.jsxs)(r4,{children:[(0,i.jsx)(r6,{children:"To complete this task, either add a note by clicking below or upload some content."}),(0,i.jsx)(r5,{variant:"lightBlue",type:"button",onClick:t,children:"Complete Task with Note"})]})},r9={approved:{background:"green-04",text:"green-90"},pending:{background:"blue-10",text:"blue-70"},revision:{background:"orange-10",text:"orange"},"awaiting-link":{background:"orange-10",text:"orange"},canceled:{background:"gray-02",text:"gray-90"}},r8={approved:"green-90",revision:"orange",canceled:"gray-90",late:"red-90"},se=c.Ay.div.withConfig({displayName:"styles__CountersRow",componentId:"sc-d69d803d-0"})(["display:flex;gap:8px;font-family:",";"],e=>{let{theme:t}=e;return t.fonts.quaternary}),st=c.Ay.div.withConfig({displayName:"styles__ApprovedCounter",componentId:"sc-d69d803d-1"})(["flex:1;display:flex;flex-direction:column;align-items:center;padding:10px 14px;border-radius:12px;background-color:",";"],e=>{let{theme:t,$tone:n}=e;return t.colors[r9[n].background]}),sn=c.Ay.span.withConfig({displayName:"styles__ApprovedFraction",componentId:"sc-d69d803d-2"})(["font-size:16px;font-weight:700;color:",";"],e=>{let{theme:t,$tone:n}=e;return t.colors[r9[n].text]}),si=c.Ay.span.withConfig({displayName:"styles__CounterLabel",componentId:"sc-d69d803d-3"})(["font-size:14px;font-weight:600;line-height:1.4;color:",";"],e=>{let{theme:t}=e;return t.colors["text-secondary"]}),so=c.Ay.div.withConfig({displayName:"styles__DueCard",componentId:"sc-d69d803d-4"})(["flex:2;min-width:0;display:flex;flex-direction:column;justify-content:center;gap:8px;padding:10px 14px;border-radius:12px;background-color:",";"],e=>{let{theme:t}=e;return t.colors.white}),sr=c.Ay.div.withConfig({displayName:"styles__DueHeaderRow",componentId:"sc-d69d803d-5"})(["display:flex;justify-content:space-between;align-items:center;"]),ss=c.Ay.span.withConfig({displayName:"styles__DueTitle",componentId:"sc-d69d803d-6"})(["flex:1;min-width:0;margin-right:4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:14px;font-weight:600;line-height:1.4;color:",";"],e=>{let{theme:t}=e;return t.colors["primary-dark"]}),sa=c.Ay.span.withConfig({displayName:"styles__DueTimeLeft",componentId:"sc-d69d803d-7"})(["flex-shrink:0;font-size:14px;font-weight:600;line-height:1.4;color:",";"],e=>{let{theme:t,$tone:n}=e;return t.colors[r8[n]]}),sl=c.Ay.div.withConfig({displayName:"styles__ProgressTrack",componentId:"sc-d69d803d-8"})(["height:6px;border-radius:3px;overflow:hidden;background-color:",";"],e=>{let{theme:t}=e;return t.colors["gray-190"]}),sd=c.Ay.div.withConfig({displayName:"styles__ProgressFill",componentId:"sc-d69d803d-9"})(["width:","%;height:6px;border-radius:3px;background-color:",";"],e=>{let{$percentage:t}=e;return t},e=>{let{theme:t,$tone:n}=e;return t.colors[r8[n]]}),sc=e=>{let{display:t,approvedCount:n,totalCount:o,hideApprovedCounter:r=!1}=e;return(0,i.jsxs)(se,{"data-testid":"task-submission-counters",children:[t.showApprovedCounter&&!r&&(0,i.jsxs)(st,{$tone:t.approvedTone,"data-testid":"task-approved-counter",children:[(0,i.jsxs)(sn,{$tone:t.approvedTone,children:[n,"/",o]}),(0,i.jsx)(si,{children:"Approved"})]}),(0,i.jsxs)(so,{"data-testid":"task-due-card",children:[(0,i.jsxs)(sr,{children:[(0,i.jsx)(ss,{children:t.dueTitle}),(0,i.jsx)(sa,{$tone:t.dueTone,children:t.timeLeft})]}),(0,i.jsx)(sl,{children:(0,i.jsx)(sd,{$percentage:t.elapsedPercentage,$tone:t.dueTone})})]})]})},su=e=>(0,i.jsxs)("svg",{width:"56",height:"56",viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,i.jsx)("path",{d:"M52.3717 17.7568L49.5717 37.7768C48.965 41.9768 46.655 44.1935 42.8517 44.1935C42.5483 44.1935 42.245 44.1702 41.9183 44.1468C41.9858 43.6911 42.017 43.2308 42.0117 42.7702V22.5402C42.13 21.6954 42.0503 20.8346 41.7787 20.026C41.5071 19.2174 41.0511 18.483 40.4467 17.8809C39.8424 17.2789 39.1063 16.8256 38.2967 16.5571C37.487 16.2885 36.626 16.212 35.7817 16.3335H12.5183C12.5183 16.2868 12.5417 16.2168 12.5417 16.1702L13.1017 12.2502C13.1749 11.2515 13.4457 10.2773 13.8983 9.38413C14.3509 8.49093 14.9763 7.69647 15.7383 7.04683C16.5741 6.49618 17.5102 6.11586 18.4932 5.92767C19.4762 5.73948 20.4866 5.74713 21.4667 5.95017L4
16.1067 9.4035C47.1029 9.48332 48.0734 9.75945 48.9624 10.216C49.8514 10.6725 50.6414 11.3004 51.2867 12.0635C51.8442 12.8893 52.2279 13.8199 52.4144 14.7986C52.601 15.7774 52.5864 16.7839 52.3717 17.7568Z",fill:"currentColor"}),(0,i.jsx)("g",{opacity:"0.4",children:(0,i.jsx)("path",{d:"M4.66667 42.7773V22.552C4.54655 21.707 4.62475 20.8456 4.89509 20.036C5.16542 19.2265 5.62046 18.491 6.22421 17.8877C6.82795 17.2844 7.56381 16.8299 8.37357 16.5602C9.18333 16.2904 10.0448 16.2129 10.8897 16.3336H35.7817C36.6261 16.2142 37.4868 16.2927 38.2957 16.563C39.1046 16.8332 39.8397 17.2878 40.4427 17.8909C41.0458 18.494 41.5004 19.229 41.7707 20.0379C42.0409 20.8468 42.1194 21.7075 42 22.552V42.7773C42.1203 43.6221 42.0423 44.4833 41.7724 45.2929C41.5025 46.1024 41.048 46.838 40.4449 47.4417C39.8417 48.0453 39.1064 48.5003 38.2971 48.7709C37.4877 49.0414 36.6266 49.1199 35.7817 49.0003H10.8897C10.0443 49.1212 9.1824 49.0436 8.37224 48.7736C7.56208 48.5037 6.82591 48.0487 6.22207 47.4449C5.61822 46.8411 5.1633 46.1049 4.89332 45.2947C4.62335 44.4846 4.54575 43.6227 4.66667 42.7773Z",fill:"currentColor"})}),(0,i.jsx)("path",{d:"M29.1667 30.9168H25.0833V26.8335C25.0833 26.3694 24.899 25.9242 24.5708 25.5961C24.2426 25.2679 23.7975 25.0835 23.3333 25.0835C22.8692 25.0835 22.4241 25.2679 22.0959 25.5961C21.7677 25.9242 21.5833 26.3694 21.5833 26.8335V30.9168H17.5C17.0359 30.9168 16.5908 31.1012 16.2626 31.4294C15.9344 31.7576 15.75 32.2027 15.75 32.6668C15.75 33.131 15.9344 33.5761 16.2626 33.9043C16.5908 34.2325 17.0359 34.4168 17.5 34.4168H21.5833V38.5002C21.5833 38.9643 21.7677 39.4094 22.0959 39.7376C22.4241 40.0658 22.8692 40.2502 23.3333 40.2502C23.7975 40.2502 24.2426 40.0658 24.5708 39.7376C24.899 39.4094 25.0833 38.9643 25.0833 38.5002V34.4168H29.1667C29.6308 34.4168 30.0759 34.2325 30.4041 33.9043C30.7323 33.5761 30.9167 33.131 30.9167 32.6668C30.9167 32.2027 30.7323 31.7576 30.4041 31.4294C30.0759 31.1012 29.6308 30.9168 29.1667 30.9168Z",fill:"currentColor"})]}),sp=e=>(0,i.jsx)("svg",{width:"8",height:"14",viewBox:"0 0 8 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,i.jsx)("path",{d:"M7.60857 6.05723L2.27524 0.723892C2.02377 0.481014 1.68697 0.346622 1.33737 0.34966C0.987777 0.352698 0.65336 0.492923 0.406149 0.740134C0.158939 0.987344 0.0187133 1.32176 0.0156754 1.67136C0.0126375 2.02095 0.14703 2.35776 0.389907 2.60923L4.78057 6.99989L0.389907 11.3906C0.14703 11.642 0.0126375 11.9788 0.0156754 12.3284C0.0187133 12.678 0.158939 13.0124 0.406149 13.2596C0.65336 13.5069 0.987777 13.6471 1.33737 13.6501C1.68697 13.6532 2.02377 13.5188 2.27524 13.2759L7.60857 7.94256C7.85854 7.69252 7.99896 7.35344 7.99896 6.99989C7.99896 6.64634 7.85854 6.30726 7.60857 6.05723Z",fill:"currentColor"})}),sm=c.Ay.button.withConfig({displayName:"styles__UploadCardButton",componentId:"sc-7b28184c-0"})(["display:flex;justify-content:space-between;align-items:center;width:100%;margin:0;padding:32px;border:none;border-radius:24px;background:",";font-family:",";text-align:left;cursor:pointer;&:focus-visible{outline:2px solid ",";outline-offset:2px;}"],e=>{let{theme:t}=e;return t.colors["secondary-gradient-horizontal"]},e=>{let{theme:t}=e;return t.fonts.quaternary},e=>{let{theme:t}=e;return t.colors.primary}),sh=c.Ay.span.withConfig({displayName:"styles__UploadCardGroup",componentId:"sc-7b28184c-1"})(["display:flex;align-items:center;gap:16px;color:",";"],e=>{let{theme:t}=e;return t.colors["blue-hover"]}),sy=c.Ay.span.withConfig({displayName:"styles__UploadCardText",componentId:"sc-7b28184c-2"})(["display:flex;flex-direction:column;"]),sf=c.Ay.span.withConfig({displayName:"styles__UploadCardTitle",componentId:"sc-7b28184c-3"})(["font-size:1rem;font-weight:600;line-height:1.4;color:",";"],e=>{let{theme:t}=e;return t.colors["blue-110"]}),sg=c.Ay.span.withConfig({displayName:"styles__UploadCardSubtitle",componentId:"sc-7b28184c-4"})(["font-size:1.35rem;font-weight:600;line-height:1.4;color:",";"],e=>{let{theme:t}=e;return t.colors["blue-hover"]}),sx=c.Ay.span.withConfig({displayName:"styles__UploadCardChevron",componentId:"sc-7b28184c-5"})(["display:flex;color:",";"],e=>{let{theme:t}=e;return t.colors["blue-115"]}
1),sw=e=>{let{onClick:t,className:n}=e;return(0,i.jsxs)(sm,{type:"button",className:n,onClick:t,"data-testid":"upload-card",children:[(0,i.jsxs)(sh,{children:[(0,i.jsx)(su,{"aria-hidden":!0}),(0,i.jsxs)(sy,{children:[(0,i.jsx)(sf,{children:"Upload content"}),(0,i.jsx)(sg,{children:"to your GIGs"})]})]}),(0,i.jsx)(sx,{children:(0,i.jsx)(sp,{"aria-hidden":!0})})]})},sb=e=>{var t,n,a,l,d,c,u,p,m,h,y,f,g,x,w,b,C,v,k,S,_,A,I,N,T,E,D,L,M,P,R,O,z,q;let{gigId:B}=e,V=(0,Y.Q)("md").isResponsive,U=(0,s.d4)(e=>e.StudentWorkspace.contentSection.isMobileMessagesOpened),W=(0,o.useRouter)(),H=(0,s.wA)(),{queryParams:F}=(0,ed.s)(),{back:G}=F,[$,Z]=(0,r.useState)(null),[K,Q]=(0,r.useState)(null),[X,J]=(0,r.useState)(null),[ee,et]=(0,r.useState)(!1),[en,ei]=(0,r.useState)(null),[er,es]=(0,r.useState)(!1),[ec,eu]=(0,r.useState)(!1),[ep,em]=(0,r.useState)(!1),eh=(0,s.d4)(e=>e.StudentWorkspace.contentSection.content),ey=(0,s.d4)(e=>e.StudentWorkspace.company),[eg,ex]=(0,r.useMemo)(()=>{let e=window.location.pathname.split("/").pop();return[e,!(0,tK.yr)(e)]},[]),ew=(0,eG.jE)(),eb=(0,r.useCallback)(()=>{H(th(eg)),(0,e5.Mu)(ew,B)},[H,eg,ew,B]),eC=(0,s.d4)(e=>{let{StudentWorkspace:t}=e;return t.tasksSection.taskInfo}),ev=(0,s.d4)(e=>{let{StudentWorkspace:t}=e;return t.tasksSection.isTaskSubmissionNotFound}),ek=(0,s.d4)(e=>e.StudentWorkspace.applicationStatus),ej=(0,s.d4)(e=>e.StudentWorkspace.endedGracePeriod),{onNext:eS,hasMore:e_,isFirstPageLoading:eA,isLoading:eI,onResetState:eN}=(0,iP.V)({defaultFilters:{task:{label:eg,value:eg}},apiUrl:"/v3/student-workspace/content/".concat(B),itensPerPage:9,initialPage:1,onParseResponse:e=>{let{data:t}=e;return t},onUpdateItems:e=>H((0,e1.um)(e))}),eT=(0,r.useMemo)(()=>{var e;return(0,eJ.t9)({contents:eC.content,requiredContentCount:null==(e=eC.task)?void 0:e.requiredContentCount})},[eC.content,null==(t=eC.task)?void 0:t.requiredContentCount]),eE=eT.approvedCount,eD=(null!=(P=eC.content)?P:[]).some(e=>"revision"===e.status),{isComplete:eL,hasStarted:eM,outcome:eP,awaitsLink:eR}=(0,r.useMemo)(()=>{var e;return(0,eJ.jd)({status:eC.status,state:eC.state,contentCount:eC.content.length,taskCompletedAt:null==(e=eC.task)?void 0:e.completedAt,closedReason:eC.closedReason})},[eC.status,eC.state,eC.content.length,null==(n=eC.task)?void 0:n.completedAt,eC.closedReason]),eO=null!=eP?eP:"rejected"===eC.status?"canceled":null,ez=null!==eO,eq=(null==(a=eC.task)?void 0:a.type)==="sampling",{view:eB}=of({submissionId:eC.id,enabled:eq&&!!eC.id}),eV=(0,r.useMemo)(()=>eq?(e=>{if(!(null==e?void 0:e.progress))return null;let{progress:t,task:n}=e,i=t.requiredCount||0;return{completed:(null==n?void 0:n.requirementMode)===eo.e.ONE_OF_EACH?t.perProduct.filter(e=>e.accepted>0).length:t.acceptedCases,required:i}})(eB):null,[eq,eB]),eU=eq&&!eV,eW=eV?eV.completed:eE,eH=eV?eV.required:eT.total,eF=(0,r.useMemo)(()=>{let e=(0,j.DG)(eM,eW,eH,eL,eR);return"canceled"===eO?{...e,color:t_.A.colors["gray-90"]}:e},[eR,eW,eH,eM,eL,eO]),e$=(0,r.useMemo)(()=>{var e;return new Set((null!=(e=eC.content)?e:[]).filter(e=>{var t;return(0,eJ.ao)({contents:eC.content,requiredContentCount:null==(t=eC.task)?void 0:t.requiredContentCount,piece:e})}).map(e=>e.id))},[eC.content,null==(l=eC.task)?void 0:l.requiredContentCount]),eK=(null==(d=eC.task)?void 0:d.subtype)===eY.p.SOCIAL_POST&&(null==(c=eC.task)?void 0:c.approvalFlow)===eZ.O.AUTO,eQ=(0,r.useMemo)(()=>!!(0,eJ.c8)({applicationStatus:ek,endedGracePeriod:ej})&&"canceled"!==eO,[ek,eO,ej]),eX=!!(null==(u=eC.task)?void 0:u.manuallyCompletedAt),e0=eQ&&!eX&&!((null==(p=eC.task)?void 0:p.subtype)===eY.p.SOCIAL_POST&&0===eT.remainingUploadCount&&eT.deliveredCount>0),e6=eX||"completed"===eO||"canceled"===eO,te=(0,eJ.dc)(eC,{applicationStatus:ek,endedGracePeriod:ej}),tt=(0,r.useCallback)(e=>{if("approved"===e.status){H((0,e1.$w)((0,e3.L)(e))),Q(e),J(e),Z(null),et(!0);return}H((0,e1.$w)((0,e4.p)(e))),J(e),Z(null),et(!0)},[]),tn=(0,r.useCallback)(()=>{H((0,e1.$w)((0,e4.N)(eC.task))),J(null),Z(null),et(!0)},[H,eC.task]),ti=(0,r.useMemo)(()=>{if(!$)return null;let e=eh.find(e=>e.id===$);return e?(0,i.jsx)(iM.A,{isStudent:!0,hideViewAction:!0,readOnly:!eQ,content:e,onUploadContent:tn,onEditContent:tt,onDeleteContent:e=>ei(e.id)}):null}
1,[eQ,tt,tn,$,eh]),to=(0,r.useMemo)(()=>ez||eC.task.completedAt||eC.completedAt?1:new Date(eC.endDate)>new Date?new Date().getTime()-new Date(eC.task.startDate).getTime():1,[ez,eC]),tr=(0,r.useMemo)(()=>ez||eC.task.completedAt||eC.completedAt?1:new Date(eC.endDate)>new Date?new Date(eC.endDate).getTime()-new Date(eC.task.startDate).getTime():1,[ez,eC]),ts=(0,r.useMemo)(()=>!!eC&&!!eC.task&&"regular"===eC.task.type&&!ez&&!["completed","approved"].includes(eC.status),[ez,eC]),ta=(0,r.useCallback)(e=>{Z(e.id)},[]),{uploadFiles:tl}=(0,nu.M)({uploadCallback:e=>{H((0,e1.V0)(e))},emitterId:"studentTaskSubmission"}),td=(0,r.useCallback)(e=>{e0&&(H((0,e1.$w)((0,e4.N)(eC.task))),J(null),et(!0),tl({files:e,fullFilePath:"content/".concat(B)}))},[e0,H,B,eC.task,tl]),tc=(0,r.useMemo)(()=>{if(eO&&eC.closedAt){let e=(0,j.MM)(eC.closedAt);return"completed"===eO?"Completed on ".concat(e):"Closed on ".concat(e)}return eC.task.completedAt||eC.completedAt?"Task completed on ".concat((0,j.MM)(eC.task.completedAt||eC.completedAt)):eC.isPastDue?"Task is past due since ".concat((0,j.MM)(eC.endDate)):new Date(eC.endDate)>new Date?"Due on ".concat((0,j.MM)(eC.endDate)):"Task ended on ".concat((0,j.MM)(eC.endDate))},[eO,eC]),tu=(0,oh.lV)(eC.task),tp=(0,eJ.Gi)({status:eC.status,awaitsLink:eR,outcome:eO,approvedCount:eE,totalCount:eT.total,taskCompletedAt:null==(m=eC.task)?void 0:m.completedAt,taskStartDate:null==(h=eC.task)?void 0:h.startDate,endDate:null!=(R=eC.endDate)?R:null==(y=eC.task)?void 0:y.endDate,isPastDue:eC.isPastDue,closedAt:eC.closedAt,completedAt:eC.completedAt}),tm=!["form","sampling"].includes(null==(f=eC.task)?void 0:f.type);return((0,r.useEffect)(()=>{H(th(eg))},[eg]),ex)?ev?(0,i.jsx)(i6.A,{url:"/workspace/".concat(B,"/tasks")}):(null==eC||null==(g=eC.task)?void 0:g.id)==null||String(eC.task.id)!==String(eg)?(0,i.jsx)(ea.El,{$isStudentWorkspace:!0,children:(0,i.jsxs)(ea.gx,{children:[!V&&(0,i.jsx)(ea.$d,{$isStudentWorkspace:!0,children:(0,i.jsx)(ea.PF,{$isStudentWorkspace:!0,children:"TASKS"})}),(0,i.jsx)(ov,{})]})}):(0,i.jsx)(rE.Q,{backend:rD.t2,children:(0,i.jsx)(ot,{title:eC.task.name,subtitle:"Task Submission",description:"You can add a title and comments before uploading",onDrop:td,companyImage:ey.logo,children:(0,i.jsx)(ea.El,{$isStudentWorkspace:!0,children:(0,i.jsxs)(ea.gx,{children:[(0,i.jsxs)(i.Fragment,{children:[!V&&(0,i.jsx)(ea.$d,{$isStudentWorkspace:!0,children:(0,i.jsx)(ea.PF,{$isStudentWorkspace:!0,children:"TASKS"})}),(0,i.jsxs)(ea.E4,{children:[(0,i.jsx)(i5.A,{gigId:B,backQuery:G,taskType:eC.task.type,taskName:eC.task.name,taskId:eC.task.id,taskDescription:eC.task.description,deliverable:tu,creativeBrief:eC.task.creativeBrief,briefDos:eC.task.briefDos,briefDonts:eC.task.briefDonts,attachments:eC.task.attachments,baseUrl:"/workspace"}),V?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(sc,{display:tp,approvedCount:eE,totalCount:eT.total,hideApprovedCounter:eq}),tm&&e0&&(0,i.jsx)(sw,{onClick:()=>tn()})]}):(0,i.jsxs)(i9,{children:[!eU&&(0,i.jsx)(op.A,{type:"progress-bar-with-header",title:"Task Progress",options:{start:eF.completionPercentage,end:100,width:"100%",RightComponent:(0,i.jsx)(om.A,{hasStartedTask:eM,completePercentage:eF.completionPercentage,fillColor:eF.color,submittedCount:eH,completedCount:eW,status:eC.status,type:eC.task.type,isComplete:eL,outcome:eO,awaitsLink:eR})}}),(0,i.jsx)(op.A,{type:"progress-bar-with-header",title:tc,isPastDue:eC.isPastDue&&!eL&&!ez,options:{start:to,end:tr,width:"100%",RightComponent:new Date(eC.endDate)>new Date&&!ez&&!(null==(x=eC.task)?void 0:x.completedAt)&&!eC.completedAt&&(0,i.jsxs)(i8,{children:[(0,j.rz)(new Date,new Date(eC.endDate))," ","left"]})}})]}),!e6&&te&&(0,i.jsx)(ou,{"data-testid":"task-status-line",children:(0,eJ.OR)(te,{companyName:ey.name})}),eX&&(0,i.jsxs)(oc,{children:[ey.name," marked this task as complete. You are no longer required to add or update submissions."]}),!eX&&"completed"===eO&&(eD?(0,i.jsxs)(oc,{children:[ey.name," accepted your work on this task as complete. They have asked for edits on a piece below â updating it is optional."]}
1):(0,i.jsxs)(oc,{children:[ey.name," accepted your work on this task as complete. No further work is needed. Reach out if you have any questions."]})),!eX&&"canceled"===eO&&(0,i.jsxs)(oc,{children:[ey.name," canceled this task for you. No further work is needed. Reach out if you have any questions."]})]}),(0,i.jsxs)(oe,{children:[(null==(w=eC.task)?void 0:w.type)==="form"&&(0,i.jsxs)(on,{children:[(0,i.jsxs)(oo,{children:[(0,i.jsx)(oi,{children:"Form"}),!["completed","approved"].includes(eC.status)&&eQ&&(0,i.jsx)(or,{type:"button",ariaLabel:"Complete Form",onClick:()=>eu(!0),children:"Complete Form"})]}),["completed","approved"].includes(eC.status)&&(0,i.jsxs)(oa,{children:[(0,i.jsxs)(ol,{children:["Form completed on"," ",(0,j.MM)(eC.completedAt)]}),(0,i.jsx)(ok.A,{submissionId:eC.id})]})]}),(null==(b=eC.task)?void 0:b.type)==="sampling"&&(0,i.jsx)(on,{children:(0,i.jsx)(rT,{gigId:Number(B),submissionId:eC.id,canRequest:eQ,onRequested:()=>H(th(eg))})}),tm&&(0,i.jsxs)(on,{children:[(0,i.jsxs)(oo,{children:[(0,i.jsx)(oi,{children:"Past Submissions"}),!V&&e0&&(0,i.jsx)(or,{type:"button",ariaLabel:"Upload Content",onClick:()=>{tn()},children:"Upload Content"})]}),(null==(C=eC.task)?void 0:C.type)==="regular"&&(0,i.jsxs)(os,{children:[ts&&(!V||e0)&&(0,i.jsx)(r7,{onCompleteTask:()=>es(!0)}),!ts&&(null==(v=eC.task)?void 0:v.type)==="regular"&&(0,i.jsxs)(oa,{children:[(0,i.jsxs)(ol,{children:["Completed On:"," ",(0,j.MM)(eC.completedAt)]}),(0,i.jsxs)(od,{children:["Notes: ",eC.notes||"No notes provided"]})]})]}),(0,i.jsx)(r3,{studentContent:eh,optionalContentIds:e$,onNext:eS,hasMore:e_,isLoading:eI,isFirstPageLoading:eA,onClickItem:ta,viewOnClick:e=>Z(e.id),editOnClick:e=>tt(e),canUploadOrEditContent:eQ,subtype:null==(k=eC.task)?void 0:k.subtype,regularTaskAndComplete:(null==(S=eC.task)?void 0:S.type)==="regular"&&"completed"===eC.status})]})]})]}),!!$&&(0,i.jsx)(nB.J,{onApproveContent:!0,isMobileFeedbackMessagesOpened:U,onHandleMobileOpenMessages:()=>H((0,e1.Mn)(!0)),onHandleMobileCloseMessages:()=>H((0,e1.Mn)(!1)),actionButtons:ti,content:eh.find(e=>e.id===$),onClose:()=>Z(null),onViewMessages:e=>H((0,el.TN)(e))}),(0,i.jsx)(iI.n,{isOpen:!!en,onClose:()=>{ei(null),Z(null)},contentId:en,contentStatus:null==(_=(null!=(O=eC.content)?O:[]).find(e=>e.id===en))?void 0:_.status,onDelete:()=>{eb(),Q(null),eN()}}),ee&&(0,i.jsx)(e2.A,{emitterId:"studentTaskSubmission",requiresLiveLink:eK,deliverableFormat:null==(A=eC.task)?void 0:A.deliverableFormat,requiresAdCode:!!(null==(I=eC.task)?void 0:I.requiresAdCode),taskBrief:{deliverable:tu,taskDescription:null==(N=eC.task)?void 0:N.description,creativeBrief:null==(T=eC.task)?void 0:T.creativeBrief,briefDos:null==(E=eC.task)?void 0:E.briefDos,briefDonts:null==(D=eC.task)?void 0:D.briefDonts,attachments:null==(L=eC.task)?void 0:L.attachments},contentFlow:{task:null!=(z=eC.task)?z:null,submissionState:eC.state,content:X},isOpen:ee,linksContent:K,onClose:()=>{et(!1),J(null),Q(null)},onClickSeeContent:()=>{et(!1),J(null)},onSuccess:()=>{eb(),J(null),eN()},onPartialFailure:()=>{eb(),J(null),eN()}}),(0,i.jsx)(e9.t,{isOpen:er,onClose:()=>es(!1),isLoadingSubmit:ep,onSubmit:async e=>{em(!0),await (0,e8.vV)(B,eC.id,e)?((0,ef.addSuccessNotification)("Task completed successfully"),eb(),es(!1)):(0,ef.addErrorNotification)("There was an error completing this task"),em(!1)}}),ec&&(0,i.jsx)(e7.r,{isOpen:!0,onClose:()=>eu(!1),gigId:B,submissionId:eC.id,taskName:null!=(q=null==(M=eC.task)?void 0:M.name)?q:"",onCompleted:()=>{(0,ef.addSuccessNotification)("Form completed successfully"),eb()}})]})})})}):W.push("/company/gigs/".concat(B,"/tasks"))};var sC=n(53964),sv=n(43849),sk=n(1228);let sj=c.Ay.div.withConfig({displayName:"styles__GradientHeader",componentId:"sc-7b26c285-0"})(["display:flex;align-items:flex-start;justify-content:space-between;gap:",";margin:-"," -"," 0;padding:"," ",";background-image:",";border-radius:"," "," 0 0;"],t_.A.space[4],t_.A.space[6],t_.A.space[6],t_.A.space[5],t_.A.space[6],t_.A.ui.gradientBrand,t_.A.radius.lg,t_.A.radius.lg),sS=c.Ay.h2.withConfig({displayName:"styles__HeaderTitle",componentId:"sc-7b26c285-1"})(["margin:0;font-family:",";font-size:",";line-height:",";font-weight:",";color:",";"],t_.A.ui.fontBody,t_.A.text.h2.size,t_.A.text.h2.line,t_.A.text.h2.
1weight,t_.A.ui.textInverse),s_=c.Ay.div.withConfig({displayName:"styles__NudgeBody",componentId:"sc-7b26c285-2"})(["display:flex;flex-direction:column;gap:",";"],t_.A.space[6]),sA=c.Ay.div.withConfig({displayName:"styles__ActionGroup",componentId:"sc-7b26c285-3"})(["display:flex;flex-direction:column;gap:",";"],t_.A.space[4]),sI=c.Ay.p.withConfig({displayName:"styles__SettingsHint",componentId:"sc-7b26c285-4"})(["display:flex;align-items:baseline;justify-content:center;flex-wrap:wrap;gap:",";margin:0;text-align:center;"],t_.A.space[1]),sN=()=>(0,i.jsx)("svg",{viewBox:"0 0 20 20",width:"18",height:"18",fill:"none","aria-hidden":"true",children:(0,i.jsx)("path",{d:"m5 5 10 10M15 5 5 15",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})}),sT=e=>{let{isOpen:t,gigId:n,onClose:s}=e,a=(0,o.useRouter)(),l=(0,r.useRef)(!1);(0,r.useEffect)(()=>{t&&!l.current&&n&&(l.current=!0,ra.N.track(rl.E.events.CALENDAR_NUDGE_SHOWN,{gigId:String(n)}),(0,sk.JE)(n).catch(()=>{}))},[n,t]);let d=()=>{ra.N.track(rl.E.events.CALENDAR_NUDGE_DISMISSED,{gigId:String(n)}),s()};return(0,i.jsxs)(sv.aF,{open:t,onOpenChange:e=>{e||d()},size:"md",hideClose:!0,children:[(0,i.jsxs)(sj,{children:[(0,i.jsx)(sS,{children:"Add your tasks to your calendar"}),(0,i.jsx)(sv.K0,{variant:"ghost",tone:"inverse",size:"sm",rounded:!0,"aria-label":"Close",onClick:d,"data-testid":"calendar-nudge-close",icon:(0,i.jsx)(sN,{})})]}),(0,i.jsxs)(s_,{children:[(0,i.jsx)(sv.EY,{variant:"body-md",tone:"secondary",children:"This GIG's deadlines in the calendar you already use. New tasks show up on their own, and each moves if its deadline does."}),(0,i.jsxs)(sA,{children:[(0,i.jsx)(sC.v,{source:"nudge",showLinkFallback:!1,onSubscribeClick:s}),(0,i.jsxs)(sI,{children:[(0,i.jsxs)(sv.EY,{variant:"body-sm",tone:"subtle",as:"span",children:["You can always find this link in"," "]}),(0,i.jsx)(sv.Yq,{size:"sm",onClick:()=>{ra.N.track(rl.E.events.CALENDAR_SYNC_CTA_CLICKED,{cta:"settings",source:"nudge"}),s(),a.push("/settings/calendar")},"data-testid":"calendar-nudge-settings-link",children:"Settings"})]})]})]})]})};var sE=n(6468),sD=n(60122);let sL=()=>{let{id:e}=(0,o.useRouter)().query,t=(0,s.d4)(e=>e.StudentWorkspace.activeTab),n=(0,s.d4)(e=>e.StudentWorkspace.agreedToNonCircumventAt),a=(0,s.d4)(e=>e.StudentWorkspace.listingType),l=(0,s.d4)(e=>e.StudentWorkspace.samplingEnabled),c=(0,s.d4)(e=>e.StudentWorkspace.isContractPending),[u,p]=(0,r.useState)(()=>a===eC.e.REGULAR&&!n),m=(0,s.d4)(e=>e.StudentWorkspace.calendarNudge),{enabled:h}=(0,sD.u)(sE.a.CALENDAR_FEED),[y,f]=(0,r.useState)(!1),g=h&&!!(null==m?void 0:m.show)&&!y&&!u&&!c,x=(0,r.useMemo)(()=>[{title:"OVERVIEW",subTitle:"Review GIG details and upcoming payments",value:"",component:e_,key:"overview"},{title:"Resources Hub",subTitle:"Everything you need for your GIG",value:"resources",component:iz,key:"resources"},{title:"Tasks",subTitle:"Track task progress and content uploads",value:"tasks",component:ty,key:"tasks"},{title:"Tasks Submissions",subTitle:"Track task progress and content uploads",value:"tasks/:taskId",component:sb,key:"tasks"},{title:"Content",subTitle:"Content uploaded by your GIG participants",value:"content",component:iR,key:"content"},{title:"Time Tracking",subTitle:"Review and approve time for your GIG participants",value:"time",component:t$,key:"time"},{title:"Invoices",subTitle:"Invoices for your GIG",value:"invoices",component:nN},{title:"Samplings",subTitle:"Sampling requests for your GIG",value:"samplings",component:iQ}],[]),w=(0,r.useMemo)(()=>x.find(e=>new RegExp("^".concat(e.value.replace(":taskId","[^/]+"),"$")).test(t))||x[0],[t,x]),b=(0,r.useMemo)(()=>w.component,[w]),C=(0,r.useMemo)(()=>a!==eC.e.REGULAR?[{title:"Overview",value:"",key:"overview",enabled:!0},{title:"Samplings",value:"samplings",key:"sampling",enabled:!c},{title:"Tasks",value:"tasks",key:"tasks",enabled:!0},{title:"Time Tracking",value:"time",key:"time",enabled:!0},{title:"Content",value:"content",key:"content",enabled:!0},{title:"Invoices",value:"invoices",key:"invoices",enabled:!0},{title:"Resources Hub",value:"resources",key:"resources",enabled:!0}].filter(e=>e.enabled):[{title:"Overview",value:"",key:"overview",enabled:!0},{title:"Tasks",value:"tasks",key:"tasks",enabled:!0},{title:"Content",value:"content",key:"content",enabled:!0},{title:"Time Tracking",value:"time",key:"time",enabled:!0},{title:"Samplings",value:"samplings",key:"sampling",enabled:l},{title:"Invoices",value:"invoices",key:"invoices",enabled:!0},{title:"Resources Hub",value:"resources",key:"resources",enabled:!0}].filter(e=>e.enabled),[c,a,l]);return(0,i.jsx)(d.B,{tabs:C,children:(0,i.jsxs)(eL.M3,{children:[(0,i.jsx)(b,{sectionTitle:w.title,gigId:e}),a===eC.e.REGULAR&&(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(i4,{isOpen:u,onClose:async()=>{p(!1);try{await (0,e8.c_)(e)}catch(e){console.log("Error posting participant's agreement to non-circumvent")}}})}),g&&(0,i.jsx)(sT,{isOpen:!0,gigId:e,onClose:()=>f(!0)})]})})};var sM=!0;function sP(){let e=(0,s.d4)(e=>e.NotificationBanner),t=Number((0,o.useRouter)().query.id)||void 0;return(0,i.jsx)(a.f,{title:"Workspace",access:"student",footer:{isVisible:!1},banner:e,middleComponent:()=>(0,i.jsx)(l.Sz,{gigId:t}),mobileMiddleComponent:()=>(0,i.jsx)(l.aC,{gigId:t}),children:(0,i.jsx)(sL,{})})}},46340:(e,t,n)=>{"use strict";function i(e){if(!e||!(new Date(e)instanceof Date)||Number.isNaN(new Date(e).getTime()))return"";let t=e;e.toString().length<=10&&(t="".concat(e,"T00:00:00"));let n=new Date(t);return new Intl.DateTimeFormat("en-US",{month:"short",day:"2-digit"}).format(new Date(n))}function o(e){return!(new Date(e)instanceof Date)||Number.isNaN(new Date(e).getTime())?"":new Intl.DateTimeFormat("en-US",{month:"long",year:"numeric"}).format(new Date(e))}n.d(t,{Du:()=>i,Il:()=>o})},47015:(e,t,n)=>{"use strict";n.d(t,{y:()=>j});var i=n(37876),o=n(14232),r=n(23327),s=n(84976);let a=s.Ay.div.withConfig({displayName:"styles__SpotsCounterWrapper",componentId:"sc-d1e63afa-0"})(["padding:1rem 0rem 0.5rem 0rem;width:100%;flex-shrink:0;"]),l=s.Ay.div.withConfig({displayName:"styles__ContainerSpotsCounter",componentId:"sc-d1e63afa-1"})(["background-color:",";border-radius:24px;padding:1rem;margin-bottom:1rem;",""],e=>{let{theme:t}=e;return t.colors["blue-10"]},e=>
1{let{greenBackground:t}=e;return t&&(0,s.AH)(["background:linear-gradient( 92deg,rgba(146,227,169,0.8) 0%,#d6f559 100% ),#d6f559;"])}),d=s.Ay.p.withConfig({displayName:"styles__SpotsCounterHeading",componentId:"sc-d1e63afa-2"})(["margin:0;font-family:",";color:",";font-size:",";font-weight:600;text-transform:capitalize;"],e=>{let{theme:t}=e;return t.fonts.quaternary},e=>{let{theme:t}=e;return t.colors["primary-dark"]},e=>{let{theme:t}=e;return t.fontSize.body.md}),c=s.Ay.p.withConfig({displayName:"styles__PlanNameText",componentId:"sc-d1e63afa-3"})(["margin:0;margin-top:0.125rem;font-family:",";font-size:",";font-weight:600;color:",";background:",";-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;"],e=>{let{theme:t}=e;return t.fonts.quaternary},e=>{let{theme:t}=e;return t.fontSize.body.md},e=>{let{theme:t}=e;return t.colors.primary},e=>{let{theme:t}=e;return t.colors["primary-gradient"]}),u=s.Ay.div.withConfig({displayName:"styles__UsageProgressBar",componentId:"sc-d1e63afa-4"})(["width:100%;height:8px;background-color:",";border-radius:999px;margin-top:0.75rem;position:relative;overflow:hidden;&::before{content:'';position:absolute;top:0;left:0;width:","%;height:100%;background:",";background:",";border-radius:999px;transition:all 0.3s;}"],e=>{let{theme:t}=e;return t.colors.white},e=>{let{percentage:t}=e;return t},e=>{let{theme:t}=e;return t.colors.primary},e=>{let{theme:t}=e;return t.colors["primary-gradient"]}),p=s.Ay.div.withConfig({displayName:"styles__CardDivider",componentId:"sc-d1e63afa-5"})(["width:100%;height:1px;margin:1rem 0;background-color:#d2d2d2;"]),m=s.Ay.p.withConfig({displayName:"styles__LearnAboutYourPlanText",componentId:"sc-d1e63afa-6"})(["margin:0;font-family:",";color:",";font-size:",";margin-top:0.5rem;font-weight:700;cursor:pointer;",""],e=>{let{theme:t}=e;return t.fonts.quaternary},e=>{let{theme:t}=e;return t.colors["primary-dark"]},e=>{let{theme:t}=e;return t.fontSize.body.sm},e=>{let{alignCenter:t}=e;return t&&(0,s.AH)(["text-align:center;line-height:1.5;"])}),h=(0,s.Ay)(r.$).withConfig({displayName:"styles__UpgradePlanButton",componentId:"sc-d1e63afa-7"})(["font-size:",";width:100%;padding:0.55rem 1rem;"],e=>{let{theme:t}=e;return t.fontSize.body.sm}),y=s.Ay.p.withConfig({displayName:"styles__FreeTierTopText",componentId:"sc-d1e63afa-8"})(["margin:0;font-family:",";color:",";font-weight:600;letter-spacing:-0.2px;font-size:",";text-align:center;"],e=>{let{theme:t}=e;return t.fonts.quaternary},e=>{let{theme:t}=e;return t.colors["primary-dark"]},e=>{let{theme:t}=e;return t.fontSize.body.lg}),f=s.Ay.p.withConfig({displayName:"styles__FreeTierBottomText",componentId:"sc-d1e63afa-9"})(["margin:0;font-family:",";color:",";font-weight:700;font-size:",";letter-spacing:-0.2px;text-align:center;margin-bottom:0.6rem;"],e=>{let{theme:t}=e;return t.fonts.quaternary},e=>{let{theme:t}=e;return t.colors["primary-dark"]},e=>{let{theme:t}=e;return t.fontSize.h3});var g=n(74695),x=n(74732),w=n(45512),b=n(44462),C=n(50336),v=n(98156),k=n(70918);let j=e=>{let{totalAccepts:t,hideCounter:n,onUpgradeTier:r,maxAcceptedCandidates:s}=e,[j,S]=(0,o.useState)(!1),[_,A]=(0,o.useState)(!1),[I,N]=(0,o.useState)(),[T,E]=(0,o.useState)(!1),D=(0,g.d4)(e=>{var t;return null==(t=e.User.data.company)?void 0:t.subscriptionStatus}),{queryParams:L,clearParam:M,addParam:P}=(0,w.s)(),{showUpgradeModal:R}=L;(0,o.useEffect)(()=>{R&&!_&&(E(!0),A(!0))},[_,R]);let O=(0,g.d4)(e=>{var t,n;return(null==(t=e.User.data.company)?void 0:t.subscriptionStatus)==="active"&&(null==(n=e.User.data.company)?void 0:n.productId)}),z=(0,o.useMemo)(()=>"active"!==D||!O,[O,D]),q=(0,o.useMemo)(()=>k.JK.find(e=>e.id===O),[O]),B=(0,o.useMemo)(()=>(0,x.F5)(z,s,t,null==q?void 0:q.isEnterprise),[t,z,s,null==q?void 0:q.isEnterprise]),V=(0,o.useCallback)(()=>{S(!0)},[]),U=(0,o.useCallback)(()=>{S(!1),N(void 0)},[]),W=(0,o.useCallback)(()=>{E(!0),P("showUpgradeModal","true")},[P]),H=(0,o.useCallback)(()=>{E(!1),M("showUpgradeModal"),N(void 0)},[M]),F=(0,i.jsx)(h,{variant:"primaryGradient",noBorder:!0,onClick:()=>{if((null==q?void 0:q.isEnterprise)||(null==q?void 0:q.isPremium))return V();W()},"data-testid":"spots-counter-upgrade-plan-button",id:"spots-counter-upgrade-plan-button",children:B.cta});return(0,i.jsxs)(a,{children:[!z&&!n&&(0,i.jsxs)(l,{children:[(0,i.jsxs)(d,{children:[Number.isNaN(B.count)?"0":B.count," ",B.text]}),(null==q?void 0:q.name)&&(0,i.jsx)(c,{"data-testid":"spots-counter-plan-name",children:q.name}),!B.hidePercentage&&(0,i.jsx)(u,{percentage:B.percentage}),(0,i.jsx)(p,{}),F]}),!z&&n&&F,z&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(l,{greenBackgroun
1d:!0,children:[(0,i.jsx)(y,{children:"YOUâRE IN"}),(0,i.jsx)(f,{children:"FREE MODE"}),(0,i.jsxs)(m,{role:"button",onClick:V,"data-testid":"learn-more-about-pricing-options-button",alignCenter:!0,children:[(0,i.jsx)("u",{children:"learn more"})," about pricing options"]})]}),F]}),(0,i.jsx)(b.A,{isOpen:j&&!I,onClose:()=>U(),onClickPlan:e=>{N(e)}}),(0,i.jsx)(C.s,{triggerSource:v.Q.SPOTS_COUNTER,isOpen:T||!!I,title:(null==q?void 0:q.isEnterprise)?"Enterprise Plan":"Upgrade your plan",forceIntoTierBillingProduct:I,onClose:()=>H(),onConfirmTierUpdate:()=>{r&&r(),H(),N(void 0),S(!1)}})]})}},49596:(e,t,n)=>{"use strict";n.d(t,{q:()=>o});var i=n(37876);n(14232);let o=e=>(0,i.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,i.jsx)("path",{d:"M12.7076 18.3639L11.2933 19.7781C9.34072 21.7308 6.1749 21.7308 4.22228 19.7781C2.26966 17.8255 2.26966 14.6597 4.22228 12.7071L5.63649 11.2929M18.3644 12.7071L19.7786 11.2929C21.7312 9.34024 21.7312 6.17441 19.7786 4.22179C17.826 2.26917 14.6602 2.26917 12.7076 4.22179L11.2933 5.636M8.50045 15.4999L15.5005 8.49994",stroke:"black",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e})})},50677:(e,t,n)=>{"use strict";n.d(t,{D1:()=>r,cr:()=>u,fT:()=>m,g7:()=>d,pe:()=>h,pn:()=>o,vg:()=>a});var i=n(84976);let o=i.Ay.div.withConfig({displayName:"styles__BannerExpand",componentId:"sc-d0f8c9c0-0"})(["display:grid;grid-template-rows:",";transition:grid-template-rows 0.35s cubic-bezier(0.25,0.46,0.45,0.94);@media (prefers-reduced-motion:reduce){transition:none;}"],e=>{let{$mounted:t}=e;return t?"1fr":"0fr"}),r=i.Ay.div.withConfig({displayName:"styles__BannerInner",componentId:"sc-d0f8c9c0-1"})(["overflow:hidden;"]),s=(0,i.AH)(["background:none;border-radius:0;padding:0;gap:8px;@media (max-width:","){flex-direction:row;align-items:center;text-align:left;background:",";border-radius:0 12px 12px 12px;padding:8px 10px;flex-wrap:wrap;}"],e=>{let{theme:t}=e;return t.breakpoints.md},e=>{let{theme:t}=e;return t.colors.white}),a=i.Ay.div.withConfig({displayName:"styles__BannerRoot",componentId:"sc-d0f8c9c0-2"})(["opacity:",";transition:opacity 0.25s ease ",";@media (prefers-reduced-motion:reduce){transition:none;}display:flex;align-items:center;justify-content:space-between;background:",";border-radius:16px;padding:10px 18px;gap:12px;@media (max-width:","){flex-direction:column;align-items:stretch;text-align:center;padding:14px 16px;}",""],e=>{let{$mounted:t}=e;return+!!t},e=>{let{$mounted:t}=e;return t?"0.2s":"0s"},e=>{let{theme:t}=e;return t.colors["green-40"]},e=>{let{theme:t}=e;return t.breakpoints.md},e=>{let{$isAction:t}=e;return t&&s}),l=(0,i.AH)(["flex:1;align-items:flex-start;gap:10px;background:",";border-radius:0 12px 12px 12px;padding:12px 16px;color:",";@media (max-width:","){flex-direction:row;gap:10px;background:none;padding:0 0 0 4px;}"],e=>{let{theme:t}=e;return t.colors.white},e=>{let{theme:t}=e;return t.colors["blue-100"]},e=>{let{theme:t}=e;return t.breakpoints.md}),d=i.Ay.div.withConfig({displayName:"styles__BannerContent",componentId:"sc-d0f8c9c0-3"})(["display:flex;align-items:center;gap:12px;color:",";min-width:0;@media (max-width:","){flex-direction:column;gap:8px;}svg,img{flex-shrink:0;}",""],e=>{let{theme:t}=e;return t.colors["green-90"]},e=>{let{theme:t}=e;return t.breakpoints.md},e=>{let{$isAction:t}=e;return t&&l}),c=(0,i.AH)(["font-size:0.875rem;color:",";text-align:left;@media (max-width:","){display:block;font-size:0.75rem;}"],e=>{let{theme:t}=e;return t.colors["blue-100"]},e=>{let{theme:t}=e;return t.breakpoints.md}),u=i.Ay.p.withConfig({displayName:"styles__BannerText",componentId:"sc-d0f8c9c0-4"})(["font-family:",";font-size:1.125rem;font-weight:500;color:",";margin:0;min-width:0;@media (max-width:","){display:flex;flex-direction:column;gap:8px;font-size:",";}",""],e=>{let{theme:t}=e;return t.fonts.quaternary},e=>{let{theme:t}=e;return t.colors["green-90"]},e=>{let{theme:t}=e;return t.breakpoints.md},e=>{let{theme:t}=e;return t.fontSize.body.md},e=>{let{$isAction:t}=e;return t&&c}),p=(0,i.AH)(["background:",";color:",";border:1.5px solid ",";border-radius:100px;padding:12px 24px;white-space:normal;max-width:100%;@media (max-width:","){width:auto;max-width:none;padding:10px 18px;font-size:0.75rem;}"],e=>{let{theme:t}=e;return t.colors.white},e=>{let{theme:t}=e;return t.colors.primary},e=>{let{theme:t}=e;return t.colors.primary},e=>{let{theme:t}=e;return t.breakpoints.md}),m=i.Ay.button.withConfig({displayName:"styles__BannerActionButton",componentId:"sc-d0f8c9c0-5"})(["background:",";color:",";font-family:",";font-size:0.875rem;font-weight:600;border:none;border-radius:20px;padding:10px 24px;
1cursor:pointer;white-space:nowrap;flex-shrink:0;transition:opacity 0.15s ease;&:hover{opacity:0.9;}&:disabled{opacity:0.6;cursor:not-allowed;}@media (max-width:","){border-radius:100px;padding:12px 24px;width:100%;max-width:320px;align-self:center;}",""],e=>{let{theme:t}=e;return t.colors["primary-gradient"]},e=>{let{theme:t}=e;return t.colors.white},e=>{let{theme:t}=e;return t.fonts.quaternary},e=>{let{theme:t}=e;return t.breakpoints.md},e=>{let{$isAction:t}=e;return t&&p}),h=i.Ay.span.withConfig({displayName:"styles__BannerActionLabel",componentId:"sc-d0f8c9c0-6"})(["background:",";-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;"],e=>{let{theme:t}=e;return t.colors["primary-gradient"]})},53964:(e,t,n)=>{"use strict";n.d(t,{v:()=>_});var i=n(37876),o=n(14232),r=n(43849),s=n(13561),a=n(67768),l=n(74359),d=n(40097),c=n(74695),u=n(1228),p=n(60342);let m=function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=(0,a.jE)(),o=(0,c.d4)(e=>{var t,n,i,o,r;return null!=(r=null==(n=e.User)||null==(t=n.data)?void 0:t.id)?r:null==(o=e.User)||null==(i=o.profile)?void 0:i.id}),r=["calendar-feed-links",null!=o?o:null],{data:s,isLoading:m,isError:h,refetch:y}=(0,l.I)({queryKey:r,queryFn:()=>(0,u.eH)(e),staleTime:1/0,enabled:(null==(t=n.enabled)||t)&&null!=o}),{mutate:f,isPending:g}=(0,d.n)({mutationFn:()=>(0,u.J)(e),onSuccess:e=>{i.setQueryData(r,e),(0,p.addSuccessNotification)("New link created. Add it again to your calendar â the old one no longer works.")},onError:()=>{(0,p.addErrorNotification)("Couldn't create a new link. Please try again.")}});return{links:null==s?void 0:s.data,isLoading:m,isError:h,retry:()=>{y()},regenerate:f,isRegenerating:g}};var h=n(28097),y=n(7732),f=n(84976),g=n(53380);let x=f.Ay.div.withConfig({displayName:"styles__ActionsContainer",componentId:"sc-1eb6cbc1-0"})(["display:flex;flex-direction:column;gap:",";"],g.A.space[3]),w=f.Ay.div.withConfig({displayName:"styles__ButtonRow",componentId:"sc-1eb6cbc1-1"})(["display:flex;flex-direction:column;gap:",";"],g.A.space[3]),b=f.Ay.span.withConfig({displayName:"styles__ButtonContent",componentId:"sc-1eb6cbc1-2"})(["display:inline-flex;align-items:center;gap:",";"],g.A.space[2]),C=f.Ay.img.withConfig({displayName:"styles__ButtonGlyph",componentId:"sc-1eb6cbc1-3"})(["width:18px;height:18px;flex-shrink:0;"]),v=f.Ay.div.withConfig({displayName:"styles__LinkRow",componentId:"sc-1eb6cbc1-4"})(["display:flex;align-items:center;gap:",";padding:",";border-radius:",";background-color:",";"],g.A.space[2],g.A.space[3],g.A.radius.md,g.A.ui.surfaceSubtle),k=f.Ay.span.withConfig({displayName:"styles__FeedUrl",componentId:"sc-1eb6cbc1-5"})(["flex:1;min-width:0;font-family:",";font-size:",";line-height:",";color:",";word-break:break-all;"],g.A.ui.fontBody,g.A.text.bodySm.size,g.A.text.bodySm.line,g.A.ui.textSecondary),j=f.Ay.div.withConfig({displayName:"styles__RegenerateRow",componentId:"sc-1eb6cbc1-6"})(["display:flex;justify-content:flex-start;"]),S=()=>(0,i.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 18 17",fill:"none","aria-hidden":"true",focusable:"false",children:(0,i.jsx)("path",{d:"M4.6 0C3.83516 0 3.2 0.63516 3.2 1.4V2H1.4C0.63438 2 0 2.63438 0 3.4V15.4C0 16.1656 0.63438 16.8 1.4 16.8H15.8C16.5656 16.8 17.2 16.1656 17.2 15.4V3.4C17.2 2.63438 16.5656 2 15.8 2H14V1.4C14 0.63516 13.3648 0 12.6 0C11.8352 0 11.2 0.63516 11.2 1.4V2H6V1.4C6 0.63516 5.36484 0 4.6 0ZM1.4 3.2H3.2V3.8C3.2 4.56484 3.83516 5.2 4.6 5.2C5.36484 5.2 6 4.56484 6 3.8V3.2H11.2V3.8C11.2 4.56484 11.8352 5.2 12.6 5.2C13.3648 5.2 14 4.56484 14 3.8V3.2H15.8C15.9211 3.2 16 3.27891 16 3.4V5.6H1.2V3.4C1.2 3.27891 1.27891 3.2 1.4 3.2ZM1.2 6.8H16V15.4C16 15.5211 15.9211 15.6 15.8 15.6H1.4C1.27891 15.6 1.2 15.5211 1.2 15.4V6.8Z",fill:"currentColor"})}),_=e=>{let{source:t,showRegenerate:n=!1,showLinkFallback:a=!0,onSubscribeClick:l}=e,{links:d,isLoading:c,isError:u,retry:f,regenerate:g,isRegenerating:_}=m(t),[A,I]=(0,o.useState)(!1),N=(0,o.useCallback)(e=>{h.N.track(y.E.events.CALENDAR_SYNC_CTA_CLICKED,{cta:e,source:t})},[t]),T=(0,o.useCallback)(e=>{N(e),null==l||l()},[l,N]),E=(0,o.useCallback)(async()=>
1{if(d){N("copy");try{await navigator.clipboard.writeText(d.httpsUrl),(0,p.addSuccessNotification)("Calendar link copied to clipboard")}catch(e){(0,p.addErrorNotification)("Couldn't copy link to clipboard")}}},[d,N]);return u?(0,i.jsxs)(x,{children:[(0,i.jsx)(r.EY,{variant:"body-sm",tone:"secondary",children:"We couldnât load your calendar link. Please try again."}),(0,i.jsx)("div",{children:(0,i.jsx)(r.$n,{variant:"outline",size:"sm",onClick:f,"data-testid":"calendar-sync-retry",children:"Try again"})})]}):c||!d?(0,i.jsx)(r.EY,{variant:"body-sm",tone:"secondary",children:"Preparing your calendar linkâ¦"}):(0,i.jsxs)(x,{children:[(0,i.jsxs)(w,{children:[(0,i.jsx)(r.$n,{variant:"gradient",href:d.webcalUrl,width:"full",onClick:()=>T("webcal"),"data-testid":"calendar-sync-webcal",children:(0,i.jsxs)(b,{children:[(0,i.jsx)(S,{}),"Add to Calendar"]})}),(0,i.jsx)(r.$n,{variant:"secondary",href:d.googleCalendarUrl,target:"_blank",width:"full",onClick:()=>T("google"),"data-testid":"calendar-sync-google",children:(0,i.jsxs)(b,{children:[(0,i.jsx)(C,{src:"/icons/google.svg",alt:"","aria-hidden":"true"}),"Add via Google Calendar"]})})]}),a&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.EY,{variant:"body-sm",tone:"secondary",children:"Using a calendar app that asks for a URL? Paste this one into âAdd calendar from URLâ."}),(0,i.jsxs)(v,{children:[(0,i.jsx)(k,{className:"sensitive","data-testid":"calendar-sync-feed-url",children:d.httpsUrl}),(0,i.jsx)(r.$n,{variant:"outline",size:"sm",onClick:E,"data-testid":"calendar-sync-copy",children:"Copy"})]})]}),n&&(0,i.jsx)(j,{children:(0,i.jsx)(r.Yq,{size:"sm",onClick:()=>I(!0),"data-testid":"calendar-sync-regenerate",children:"Create a new link"})}),(0,i.jsx)(s.a,{isOpen:A,title:"Create a new link?",description:"Your current link stops working right away. Any calendar already using it stops updating until you add the new one.",confirmText:"CREATE NEW LINK",isConfirming:_,onConfirm:()=>{N("regenerate"),g(),I(!1)},onCancel:()=>I(!1)})]})}},54975:(e,t,n)=>{"use strict";n.d(t,{v:()=>x});var i=n(37876),o=n(14232),r=n(98477),s=n(27212),a=n(84976),l=n(10026),d=n(10945);let c=a.Ay.div.withConfig({displayName:"styles__AnchorContainer",componentId:"sc-47c303e8-0"})(["position:relative;display:flex;width:",";"],e=>{let{fullWidth:t}=e;return t?"100%":"fit-content"}),u=(0,a.Ay)(d.P.div).withConfig({displayName:"styles__DropdownContainer",componentId:"sc-47c303e8-1"})(["position:fixed;background:white;border-radius:12px;box-shadow:0 12px 40px rgba(0,0,0,0.15);border:1px solid ",";z-index:1000;overflow:hidden;padding:6px;min-width:180px;"],e=>{let{theme:t}=e;return t.colors["gray-70"]}),p=a.Ay.div.withConfig({displayName:"styles__DropdownHeader",componentId:"sc-47c303e8-2"})(["padding:8px 14px;font-family:",";font-size:10px;font-weight:600;color:",";background-color:",";"],e=>{let{theme:t}=e;return t.fonts.quaternary},e=>{let{theme:t}=e;return t.colors["gray-80"]},e=>{let{theme:t}=e;return t.colors["blue-20"]}),m=a.Ay.div.withConfig({displayName:"styles__DropdownItem",componentId:"sc-47c303e8-3"})(["display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 14px;cursor:pointer;border-radius:8px;font-family:",";font-size:14px;font-weight:500;background:",";color:",";transition:all 0.2s ease;"," &:hover{background:",";color:",";}&:active{transform:scale(0.98);}"],e=>{let{theme:t}=e;return t.fonts.quaternary},e=>{let{theme:t,$affirmative:n}=e;return n?t.colors["green-04"]:"transparent"},e=>{let{theme:t,$selected:n,$destructive:i,$affirmative:o,$muted:r}=e;return i?t.colors.red:o?t.colors["green-80"]:n?t.colors.primary:r?t.colors["gray-80"]:t.colors["gray-100"]},e=>{let{$sectioned:t,theme:n}=e;return t&&"\n border-radius: 0;\n border-top: 1px solid ".concat(n.colors["gray-70"],";\n ")},e=>{let{theme:t,$destructive:n,$affirmative:i}=e;return n?t.colors["red-05"]:i?t.colors["green-05"]:t.colors["gray-70"]},e=>{let{theme:t,$destructive:n,$affirmative:i}=e;return n?t.colors.red:i?t.colors["green-80"]:t.colors.primary}),h=a.Ay.span.withConfig({displayName:"styles__DropdownItemContent",componentId:"sc-47c303e8-4"})(["display:inline-flex;align-items:center;gap:10px;min-width:0;"]),y=a.Ay.span.withConfig({displayName:"styles__DropdownItemIcon",componentId:"sc-47c303e8-5"})(["flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;background:",";"],e=>{let{theme:t}=e;return t.colors["blue-50"]}),f=a.Ay.span.withConfig({displayName:"styles__DropdownCheck",componentId:"sc-47c303e8-6"})(["flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;"]),g=a.Ay.span.withConfig({displayName:"styles__DropdownCount",componentId:"sc-47c303e8-7"})(["flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;min-width:1.5rem;height:1.5rem;padding:0 0.5rem;border-radius:999px;background:",";color:",";font-size:12px;font-weight:600;"],e=>{let{theme:t}=e;return t.colors["blue-50"]},e=>{let{theme:t}=e;return t.colors["primary-dark"]}),x=e=>{let{children:t,items:n,header:d,className:x,disabled:w,fullWidth:b,matchTriggerWidth:C,mutedText:v}=e,k=(0,a.DP)(),[j,S]=(0,o.useState)(!1),_=(0,o.useRef)(null),A=(0,o.useRef)(null),[I,N]=(0,o.useState)({left:0,top:0,width:0,placement:"bottom"}),T=(0,o.useCallback)(()=>
1{if(j&&_.current){var e,t;let i=_.current.getBoundingClientRect(),o=window.innerHeight,r=window.innerWidth,s=(null==(e=A.current)?void 0:e.offsetHeight)||42*n.length+20,a=i.width,l=C?a:(null==(t=A.current)?void 0:t.offsetWidth)||200,d=i.bottom+8,c="bottom";d+s>o-20&&(i.top-8>s?(d=i.top-s-8,c="top"):i.top>o-i.bottom&&(d=Math.max(10,i.top-s-8),c="top"));let u=i.left;u+l>r-20&&(u=r-l-20),u<10&&(u=10),N({left:u,top:d,placement:c,width:a})}},[j,n.length,C]);return(0,o.useEffect)(()=>(T(),window.addEventListener("scroll",T,!0),window.addEventListener("resize",T),()=>{window.removeEventListener("scroll",T,!0),window.removeEventListener("resize",T)}),[T]),(0,o.useEffect)(()=>{j&&T()},[j,T]),(0,o.useEffect)(()=>{let e=e=>{_.current&&!_.current.contains(e.target)&&(e.target.closest('[data-anchor-dropdown="true"]')||S(!1))};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[]),(0,i.jsxs)(c,{ref:_,className:x,fullWidth:b,children:[(0,i.jsx)("div",{style:{cursor:w?"default":"pointer",display:"flex",width:b?"100%":"auto"},onClick:()=>!w&&S(e=>!e),children:t}),"undefined"!=typeof document&&(0,r.createPortal)((0,i.jsx)(s.N,{children:j&&(0,i.jsxs)(u,{ref:A,"data-anchor-dropdown":"true",style:{top:I.top,left:I.left,...C?{width:I.width,minWidth:I.width}:{},padding:d?"0px":"6px"},initial:{opacity:0,y:"bottom"===I.placement?-4:4,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:"bottom"===I.placement?-4:4,scale:.95},transition:{duration:.15,ease:"easeOut"},children:[d&&(0,i.jsx)(p,{"data-testid":"anchor-dropdown-header",children:d}),n.map((e,t)=>(0,i.jsxs)(m,{$selected:e.selected,$sectioned:!!d,$destructive:e.destructive,$affirmative:e.affirmative,$muted:v,onClick:()=>{var t;return t=e.action,void(!w&&(t(),S(!1)))},children:[e.icon?(0,i.jsxs)(h,{children:[(0,i.jsx)(y,{"data-testid":"dropdown-item-icon",children:e.icon}),e.label]}):e.label,"number"==typeof e.count&&(0,i.jsx)(g,{children:e.count.toLocaleString("en-US")}),e.selected&&(0,i.jsx)(f,{"data-testid":"anchor-dropdown-check",children:(0,i.jsx)(l.S,{fill:k.colors.primary})})]},"".concat(e.label,"-").concat(t)))]})}),document.body)]})}},57761:(e,t,n)=>{"use strict";n.d(t,{j:()=>f});var i=n(37876),o=n(14232),r=n(84976),s=n(19698),a=n(57557);let l=r.Ay.div.withConfig({displayName:"styles__StudentSearchPaginationElementContainer",componentId:"sc-b4d620db-0"})(["display:flex;align-items:center;justify-content:center;width:100%;padding:1rem;z-index:2;margin-top:1rem;"]),d=r.Ay.div.withConfig({displayName:"styles__PaginationControls",componentId:"sc-b4d620db-1"})(["display:flex;align-items:center;justify-content:center;flex-wrap:wrap;max-width:100%;"]),c=(0,r.AH)(["font-size:",";font-family:",";padding:0.5rem 0.8rem;min-width:40px;border-radius:8px;height:40px;background-color:",";"],e=>{let{theme:t}=e;return t.fontSize.body.md},e=>{let{theme:t}=e;return t.fonts.quaternary},e=>{let{theme:t}=e;return t.colors.white}),u=r.Ay.button.withConfig({displayName:"styles__PaginationControl",componentId:"sc-b4d620db-2"})(["background:none;color:inherit;border:none;padding:0;font:inherit;cursor:pointer;display:flex;align-items:center;cursor:pointer;",";"," &:first-child{margin-right:1rem;}&:last-child{margin-left:0.5rem;}"],c,e=>{let{disabled:t}=e;return t&&(0,r.AH)(["opacity:0.5;pointer-events:none;"])}),p=(0,r.Ay)(a.Y).withConfig({displayName:"styles__LeftSideIcon",componentId:"sc-b4d620db-3"})([""]),m=(0,r.Ay)(s.v).withConfig({displayName:"styles__RightSideIcon",componentId:"sc-b4d620db-4"})([""]),h=r.Ay.button.withConfig({displayName:"styles__PageItem",componentId:"sc-b4d620db-5"})(["background:none;border:none;padding:0;font:inherit;display:flex;align-items:center;justify-content:center;color:#333333;font-weight:500;",";cursor:pointer;position:relative;z-index:1;transition:all 0.2s ease;margin-right:0.5rem;&:last-child{margin-right:0;}"," &:hover{&:before{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:120%;height:120%;background-color:#f2f2f2;border-radius:0.25rem;z-index:-1;}}",""],c,e=>{let{selected:t}=e;return t&&(0,r.AH)(["background-color:",";color:",";"],e=>{let{theme:t}=e;return t.colors.primary},e=>{let{theme:t}=e;return t.colors.white})},e=>{let{disabled:t}=e;return t&&(0,r.AH)(["pointer-events:none;"])});var y=n(80892);let f=e=>{let{onNext:t,onPrevious:n,page:r,hasMore:s,totalItems:a,itemsPerPage:c,compact:f=!1}=e,{isResponsive:g}=(0,y.Q)("md"),x=(e=>{let{totalCount:t,pageSize:n,siblingCount:i=1,currentPage:r}=e,s=(e,t)=>Array.from({length:t-e+1},(t,n)=>n+e);return(0,o.useMemo)(()=>{let e=Math.ceil(t/n);if(i+5>=e)return s(1,e);let o=Math.max(r-i,1),a=Math.min(r+i,e),l=o>2,d=a<e-2;return!l&&d?[...s(1,3+2*i),"..."]:l&&!d?[1,"...",...s(e-(3+2*i)+1,e)]:l&&d?[1,"...",...s(o,a),"..."]:void 0},[t,n,i,r])||[]})({hasMore:s,totalCount:a,pageSize:c,currentPage:r,siblingCount:1});if(a<=c)return null;let w=Math.ceil(a/c)||1,b=r===w,C=Math.max(1,r-1),v=Math.min(w,r+1),k=[...C>1?["..."]:[],...Array.from({length:v-C+1},(e,t)=>C+t),...v<w?["..."]:[]];return(0,i.jsx)(l,{children:(0,i.jsxs)(d,{children:[(0,i.jsx)(u,{"aria-label":"Previous page of results",onClick:()=>n(),disabled:1===r,children:(0,i.jsx)(p,{className:"white-on-custom",color:"#333333",width:"16px",height:"16px"})}),(f||g?k:x).map((e,o)=>(0,i.jsx)(h,{"aria-label":"Go to page ".concat(e),className:"white-on-custom",selected:e===r,disabled:"..."===e||e===r,onClick:()=>{e<r&&n(e),e>r&&t(e)},children:e},"page-item-".concat(o,"-").concat(e))),!b&&(0,i.jsx)(u,{"aria-label":"Next page of results",onClick:()=>t(),disabled:!s,children:(0,i.jsx)(m,{className:"white-on-custom",color:"#333333",width:"16px",height:"16px"})})]})})}},63190:(e,t,n)=>{"use strict";n.d(t,{Dl:()=>o,Ho:()=>i,SM:()=>r,jI:()=>s});let i=e=>(null==e?void 0:e.socialSource)==="first_party",o=e=>{var t;return null!=(t=null==e?void 0:e.find(i))?t:null==e?void 0:e.find(e=>e&&"first_party"!==e.socialSource&&e.views>0)},r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e)return"â";if("dashboard"===t.style)return e>=1e6?"".concat((e/1e6).toFixed(2).replace(/\.?0+$/,""),"M"):e>=1e3?"".concat((e/1e3).toFixed(1),"k"):String(Math.round(e));return e>1e6?"".concat((e/1e6).toFixed(+(e%1e6!=0)),"m"):e>999?"".concat((e/1e3).toFixed(+(e%1e3!=0)),"k"):String(e)},s=e=>null==e?"â":"".concat((100*e).toFixed(1),"%")},65559:(e,t,n)=>{"use strict";n.d(t,{a:()=>o});var i=n(37876);n(14232);let o=e=>{let{variant:t,...n}=e,o="gradient"===t;return(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"508",height:"73",viewBox:"0 0 508 73",fill:"none",...n,children:[(0,i.jsx)("mask",{id:"mask0_3173_152",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"508",height:"73",children:(0,i.jsxs)("g",{clipPath:"url(#clip0_3173_152)",children:[(0,i.jsx)("path",{d:"M10.5316 40.3564H17.6668V71.3196H28.2127V0.855225H17.6668V29.0787H10.5316V0.855225H0V71.3196H10.5316V40.3564Z",fill:"white"}),(0,i.jsx)("path",{d:"M47.5336 0.0866699H45.7641C35.7748 0.0866699 32.25 6.43584 32.25 16.293V55.4318C32.25 65.2745 35.789 72.0006 45.864 72.0006H47.6336C57.7941 72.0006 61.0621 65.2745 61.0621 55.4318V16.1191C61.0621 6.53732 57.7941 0.0866699 47.5336 0.0866699ZM50.3877 56.2581C50.3877 59.2877 49.717 61.6651 46.8344 61.6651C43.9518 61.6651 43.0099 59.2877 43.0099 56.2581V15.6697C43.0099 11.9733 44.0374 10.2627 46.7345 10.2627C49.1605 10.2627 50.3877 12.0602 50.3877 15.6697V56.2581Z",fill:"white"}),(0,i.jsx)("path",{d:"M65.0723 71.3196H74.4907V25.7736L80.9267 71.3196H85.1223L91.4583 25.7736V71.3196H101.348V0.855225H88.747L83.6239 38.0806L78.5864 0.855225H65.0723V71.3196Z",fill:"white"}),(0,i.jsx)("path",{d:"M258.739 71.3196H268V25.7736L274.322 71.3196H278.446L284.682 25.7736V71.3196H294.415V0.855225H282.028L276.976 38.0806L272.025 0.855225H258.739V71.3196Z",fill:"white"}),(0,i.jsx)("path",{d:"M105.629 0.855225V71.3196H130.146V60.6216H116.161V40.3275H126.706V29.615H116.161V11.1473H129.589V0.91322L105.629 0.855225Z",fill:"white"}),(0,i.jsx)("path",{d:"M168.748 71.3196H179.279V40.3564H189.911V29.644H179.279V11.0893H192.708V0.855225H168.748V71.3196Z",fill:"white"}),(0,i.jsx)("path",{d:"M223.376 65.6371V40.9941C223.376 36.167 221.135 34.355 218.809 33.3258C220.679 32.5575 223.376 30.1947 223.376 24.3239V11.6835C223.376 3.73979 219.922 0.797119 212.844 0.797119H195.72V71.2615H206.251V39.82H208.963C212.316 39.82 212.873 41.1391 212.873 44.2702V65.4921C212.873 69.2755 213.429 70.5077 213.9 71.2905H224.346V70.8121C223.6 69.1972 223.267 67.4175 223.376 65.6371V65.6371ZM212.93 24.8168C212.93 27.9479 212.002 29.8323 209.105 29.8323H206.251V10.4224H209.105C212.373 10.4224 212.93 11.872 212.93 14.9596V24.8168Z",fill:"white"}),(0,i.jsx)("path",{d:"M242.413 0.0866699H240.643C230.654 0.0866699 227.115 6.43584 227.115 16.293V55.4318C227.115 65.2745 230.654 72.0006 240.729 72.0006H242.498C252.673 72.0006 255.927 65.2745 255.927 55.4318V16.1191C255.913 6.53732 252.659 0.0866699 242.413 0.0866699ZM245.267 56.2581C245.267 59.2877 244.61 61.6651 241.713 61.6651C238.817 61.6651 237.889 59.2877 237.889 56.2581V15.6697C237.889 11.9733 238.916 10.2627 241.628 10.2627C244.054 10.2627 245.267 12.0651 245.267 15.6697V56.2581Z",fill:"white"}),(0,i.jsx)("path",{d:"M324.511 56.9248C324.511 59.824 323.584 61.665 321.058 61.665C318.832 61.665 317.704 60.0559 317.704 56.8233V14.9738C317.704 11.8427 318.361 10.3351 320.972 10.3351C323.584 10.3351 324.511 11.9442 324.511 14.9738V27.3678H334.872V14.7854C334.872 7.87086 333.559 0.101074 322.028 0.101074H319.602C310.098 0.101074 307.016 7.01557 307.016 14.2055V57.2147C307.016 64.3177 309.256 72.0875 319.973 72.0875H322.328C332.403 72.0875 334.929 64.4192 334.929 56.8233V40.5445H324.568L324.511 56.9248Z",fill:"white"}),(0,i.jsx)("path",{d:"M353.594 0.0866699H351.824C341.835 0.0866699 338.31 6.43584 338.31 16.293V55.4318C338.31 65.2745 341.849 72.0006 351.924 72.0006H353.722C363.883 72.0006 367.136 65.2745 367.136 55.4318V16.1191C367.108 6.53732 363.854 0.0866699 353.594 0.0866699ZM356.448 56.2581C356.448 59.2877 355.791 61.6651 352.909 61.6651C350.026 61.6651 349.084 59.2877 349.084 56.2581V15.6697C349.084 11.9733 350.112 10.2627 352.809 10.2627C355.235 10.2627 356.448 12.0651 356.448 15.6697V56.2581Z",fill:"white"}),(0,i.jsx)("path",{d:"M371.132 0.855225V71.3196H394.536V60.4332H381.693V0.855225H371.132Z",fill:"white"}),(0,i.jsx)("path",{d:"M397.603 0.855225V71.3196H421.007V60.4332H408.163V0.855225H397.603Z",fill:"white"}),(0,i.jsx)("path",{d:"M424.09 0.855225V71.3196H448.606V60.6216H434.621V40.3275H445.153V29.615H434.621V11.1473H448.05V0.91322L424.09 0.855225Z",fill:"white"}),(0,i.jsx)("path",{d:"M462.176 72.1307C467.499 72.1307 471.038 66.6368 471.78 64.274C472.622 67.3036 473.464 70.8116 473.55 71.1885H479.515V28.3677H464.788V39.2251H469.54V56.8376C469.54 59.5048 468.327 61.3893 465.63 61.3893C463.304 61.3893 462.176 59.6788 462.176 56.3737V15.1765C462.176 11.9439 463.303 10.3493 465.444 10.3493C468.056 10.3493 468.798 12.0454 468.798 15.1765V23.1347H479.058V15.8868C479.058 7.55165 477.745 0.0717773 466.472 0.0717773H464.417C454.342 0.0717773 451.459 7.31973 451.459 15.22V59.2584C451.459 66.5063 455.269 72.1452 461.52 72.1452L462.176 72.1307Z",fill:"white"}),(0,i.jsx)("path",{d:"M483.468 0.855225V71.3196H507.999V60.6216H494.014V40.3275H504.545V29.615H494.014V11.1473H507.442V0.91322L483.468 0.855225Z",fill:"white"}),(0,i.jsx)("path",{d:"M139.325 0.021253L136.614 0.927246L159.697 72.2001L162.408 71.2941L139.325 0.021253Z",fill:"white"})]})}),(0,i.jsx)("g",{mask:"url(#mask0_3173_152)",children:(0,i.jsx)("rect",{x:"-55.519",y:"-49.9673",width:"688.437",height:"252.612",fill:o?"url(#hfc-logo-gradient)":"currentColor"})}),(0,i.jsxs)("defs",{children:[o&&(0,i.jsxs)("linearGradient",{id:"hfc-logo-gradient",x1:"0",y1:"0",x2:"508",y2:"73",gradientUnits:"userSpaceOnUse",children:[(0,i.jsx)("stop",{stopColor:"#2132E6"}),(0,i.jsx)("stop",{offset:"1",stopColor:"#009DFE"})]}),(0,i.jsx)("clipPath",{id:"clip0_3173_152",children:(0,i.jsx)("rect",{width:"508",height:"72.1749",fill:"white"})})]})]})}},68368:(e,t,n)=>{"use strict";n.d(t,{EJ:()=>l,Sz:()=>c,aC:()=>u,yr:()=>d});var i=n(37876);n(14232);var o=n(74695),r=n(69296),s=n(41015);let a=()=>(0,o.d4)(e=>{var t,n;return(null==(n=e.User)||null==(t=n.data)?void 0:t.userType)==="S"}),l=()=>a()?(0,i.jsx)(s.A,{context:r.o.STUDENT_HOME,label:"Search everything",ariaLabel:"Open search"}):null,d=()=>a()?(0,i.jsx)(s.A,{variant:"icon",context:r.o.STUDENT_HOME,ariaLabel:"Open search"}):null,c=e=>{let{gigId:t}=e;return a()?(0,i.jsx)(s.A,{context:r.o.STUDENT_WORKSPACE,label:"Search this GIG",ariaLabel:"Open search",gigId:t}):null},u=e=>{let{gigId:t}=e;return a()?(0,i.jsx)(s.A,{variant:"icon",context:r.o.STUDENT_WORKSPACE,ariaLabel:"Open search",gigId:t}):null}},69558:(e,t,n)=>{"use strict";n.d(t,{C:()=>o});var i=n(37876);n(14232);let o=e=>(0,i.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,i.jsx)("g",{clipPath:"url(#clip0_5177_6016)",children:(0,i.jsx)("path",{d:"M12 22.3784C11.8786 22.3784 11.7572 22.347 11.6485 22.2842C11.5304 22.2161 8.72392 20.5866 5.8772 18.1314C4.18999 16.6763 2.84318 15.233 1.87427 13.8417C0.620464 12.0415 -0.0100507 10.3098 0.000121129 8.69482C0.0120274 6.8156 0.685104 5.04833 1.89551 3.71848C3.12635 2.36624 4.76894 1.62158 6.5208 1.62158C8.76596 1.62158 10.8187 2.87924 12.0001 4.87151C13.1814 2.87928 15.2341 1.62158 17.4793 1.62158C19.1344 1.62158 20.7134 2.29349 21.9258 3.51355C23.2563 4.85243 24.0123 6.74421 23.9999 8.70372C23.9897 10.3159 23.3473 12.0449 22.0908 13.8427C21.1189 15.2333 19.7739 16.6759 18.0933 18.1306C15.257 20.5856 12.4707 22.215 12.3535 22.2831C12.2442 22.3466 12.1221 22.3784 12 22.3784Z",fill:e.fill||"#718EBF"})}),(0,i.jsx)("defs",{children:(0,i.jsx)("clipPath",{id:"clip0_5177_6016",children:(0,i.jsx)("rect",{width:"24",height:"24",fill:"white"})})})]})},74732:(e,t,n)=>{"use strict";n.d(t,{F5:()=>i}),n(37876),n(34622),n(14232),n(70918),n(99742);let i=(e,t,n,i)=>{if(e)return{count:"unlimited",text:"spots left",hidePercentage:!0,cta:"EXPLORE PLANS"};if(-1===t)return{count:n,text:"spots filled",hidePercentage:!0,cta:"LEARN MORE"};let o=t-n,r=n/t*100;return o<=0?{count:0,text:"spots left",percentage:r,cta:"EXPLORE PLANS"}:1===o?{count:1,text:"spot left",percentage:r,cta:"EXPLORE PLANS"}:{count:o,text:"spots left",percentage:r,cta:r>=60||i?"LEARN MORE":"EXPLORE PLANS"}}}
1,78189:(e,t,n)=>{"use strict";n.d(t,{M3:()=>r,_O:()=>a,ce:()=>s,nA:()=>o});var i=n(84976);let o=i.Ay.section.withConfig({displayName:"styles__SectionContainer",componentId:"sc-fb8f3c3c-0"})(["display:flex;width:100%;flex-direction:column;@media (max-width:","){padding:0rem;}"],e=>{let{theme:t}=e;return t.breakpoints.md}),r=i.Ay.div.withConfig({displayName:"styles__ContainerTabContent",componentId:"sc-fb8f3c3c-1"})(["border-radius:8px;width:100%;height:fit-content;padding:0rem 1rem;@media (max-width:","){margin-left:auto;margin-right:auto;padding:0;}"],e=>{let{theme:t}=e;return t.breakpoints.md}),s=i.Ay.h3.withConfig({displayName:"styles__EmptyStatePageTitle",componentId:"sc-fb8f3c3c-2"})(["color:",";font-family:",";font-size:clamp(1.375rem,3vh,1.75rem);font-weight:700;text-transform:uppercase;white-space:nowrap;display:flex;margin:0;padding:clamp(0.75rem,1.8dvh,2rem) 0;border-bottom:1px solid ",";"],e=>{let{theme:t}=e;return t.colors["gray-120"]},e=>{let{theme:t}=e;return t.fonts.secondary},e=>{let{theme:t}=e;return t.colors["blue-30"]}),a=i.Ay.div.withConfig({displayName:"styles__ContainerTabContentBody",componentId:"sc-fb8f3c3c-3"})(["background-color:transparent;@media (max-width:","){padding:0rem;}"],e=>{let{theme:t}=e;return t.breakpoints.md})},79898:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var i=n(37876);function o(e){let{variant:t=0,...n}=e;return 1===t?(0,i.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.33301 1.33301H3.99967C2.52701 1.33301 1.33301 2.52701 1.33301 3.99967V11.9997C1.33301 13.4723 2.52701 14.6663 3.99967 14.6663H11.9997C13.4723 14.6663 14.6663 13.4723 14.6663 11.9997C14.6663 10.4857 14.6663 8.66634 14.6663 8.66634C14.6663 8.29834 14.3677 7.99967 13.9997 7.99967C13.6317 7.99967 13.333 8.29834 13.333 8.66634V11.9997C13.333 12.7357 12.7357 13.333 11.9997 13.333C9.77967 13.333 6.21901 13.333 3.99967 13.333C3.26301 13.333 2.66634 12.7357 2.66634 11.9997C2.66634 9.77967 2.66634 6.21901 2.66634 3.99967C2.66634 3.26301 3.26301 2.66634 3.99967 2.66634H7.33301C7.70101 2.66634 7.99967 2.36767 7.99967 1.99967C7.99967 1.63167 7.70101 1.33301 7.33301 1.33301ZM12.3903 2.66634H9.99967C9.63167 2.66634 9.33301 2.36767 9.33301 1.99967C9.33301 1.63167 9.63167 1.33301 9.99967 1.33301H13.9997C14.3677 1.33301 14.6663 1.63167 14.6663 1.99967V5.99967C14.6663 6.36767 14.3677 6.66634 13.9997 6.66634C13.6317 6.66634 13.333 6.36767 13.333 5.99967V3.60901L8.47101 8.47101C8.21101 8.73101 7.78834 8.73101 7.52834 8.47101C7.26767 8.21101 7.26767 7.78834 7.52834 7.52834L12.3903 2.66634Z",fill:"#3A3A3A"})}):6===t?(0,i.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:(0,i.jsx)("path",{d:"M20.7914 12.6075C21.0355 12.3982 21.1575 12.2936 21.2023 12.1691C21.2415 12.0598 21.2415 11.9403 21.2023 11.831C21.1575 11.7065 21.0355 11.6019 20.7914 11.3926L12.3206 4.13202C11.9004 3.77182 11.6903 3.59172 11.5124 3.58731C11.3578 3.58348 11.2101 3.6514 11.1124 3.77128C11 3.90921 11 4.18595 11 4.73942V9.03468C8.86532 9.40813 6.91159 10.4898 5.45971 12.1139C3.87682 13.8846 3.00123 16.176 3 18.551V19.163C4.04934 17.8989 5.35951 16.8766 6.84076 16.166C8.1467 15.5395 9.55842 15.1684 11 15.0706V19.2607C11 19.8141 11 20.0909 11.1124 20.2288C11.2101 20.3487 11.3578 20.4166 11.5124 20.4128C11.6903 20.4084 11.9004 20.2283 12.3206 19.8681L20.7914 12.6075Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",width:"24",height:"24",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"w-6 h-6",...n,children:(0,i.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.217 10.9
107a2.25 2.25 0 100 2.186m0-2.186c.18.324.283.696.283 1.093s-.103.77-.283 1.093m0-2.186l9.566-5.314m-9.566 7.5l9.566 5.314m0 0a2.25 2.25 0 103.935 2.186 2.25 2.25 0 00-3.935-2.186zm0-12.814a2.25 2.25 0 103.933-2.185 2.25 2.25 0 00-3.933 2.185z"})})}n(14232)},81650:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var i=n(37876);n(14232);var o=n(89099),r=n(84976);let s=r.Ay.div.withConfig({displayName:"styles__Container",componentId:"sc-6a53d714-0"})(["display:flex;flex-direction:column;width:100%;height:100%;max-width:670px;margin:0 auto;align-items:center;justify-content:center;padding:10rem 2rem 4rem 2rem;"]),a=r.Ay.h1.withConfig({displayName:"styles__Title",componentId:"sc-6a53d714-1"})(["font-family:",";font-size:",";color:",";margin:0;"],e=>{let{theme:t}=e;return t.fonts.primary},e=>{let{theme:t}=e;return t.fontSize.title},e=>{let{theme:t}=e;return t.colors["gray-80"]}),l=r.Ay.p.withConfig({displayName:"styles__Description",componentId:"sc-6a53d714-2"})(["white-space:pre-line;font-family:",";font-size:",";color:",";margin:0;padding:2rem 0rem;text-align:center;"],e=>{let{theme:t}=e;return t.fonts.primary},e=>{let{theme:t}=e;return t.fontSize.body.md},e=>{let{theme:t}=e;return t.colors["gray-80"]}),d=r.Ay.button.withConfig({displayName:"styles__BackButton",componentId:"sc-6a53d714-3"})(["border:none;background-color:",";color:white;border-radius:5px;font-family:",";font-size:",";text-transform:uppercase;width:8rem;height:3rem;cursor:pointer;transition:all 0.2s;&:hover{scale:0.95;}"],e=>{let{theme:t}=e;return t.colors["gray-80"]},e=>{let{theme:t}=e;return t.fonts.primary},e=>{let{theme:t}=e;return t.fontSize.body.md}),c=e=>{let{comingSoon:t=!1,url:n}=e,r=(0,o.useRouter)();return(0,i.jsxs)(s,{children:[(0,i.jsx)(a,{children:t?"Coming Soon!":"Uh oh..."}),(0,i.jsx)(l,{children:t?"We're hard at work building this page. Check back soon!":"It looks like the page you're looking for doesn't exist."}),n&&(0,i.jsx)(d,{onClick:()=>{r.push(n)},children:"Go back"})]})}},84683:(e,t,n)=>{"use strict";n.d(t,{J:()=>o});var i=n(37876);n(14232);let o=e=>{let{variant:t,...n}=e;return 4===t?(0,i.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:(0,i.jsx)("path",{d:"M16 12L12 8M12 8L8 12M12 8V17.2C12 18.5907 12 19.2861 12.5505 20.0646C12.9163 20.5819 13.9694 21.2203 14.5972 21.3054C15.5421 21.4334 15.9009 21.2462 16.6186 20.8719C19.8167 19.2036 22 15.8568 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 15.7014 4.01099 18.9331 7 20.6622",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):(0,i.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:(0,i.jsx)("path",{d:"M21 15V16.2C21 17.8802 21 18.7202 20.673 19.362C20.3854 19.9265 19.9265 20.3854 19.362 20.673C18.7202 21 17.8802 21 16.2 21H7.8C6.11984 21 5.27976 21 4.63803 20.673C4.07354 20.3854 3.6146 19.9265 3.32698 19.362C3 18.7202 3 17.8802 3 16.2V15M17 8L12 3M12 3L7 8M12 3V15",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}},86584:(e,t,n)=>{"use strict";n.d(t,{$:()=>r});var i=n(37876);n(14232);var o=n(53380);let r=e=>(0,i.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,i.jsx)("rect",{width:"16",height:"16",rx:"8",fill:"#D6F559"}),(0,i.jsx)("rect",{width:"16",height:"16",rx:"8",fill:o.A.colors.red}),(0,i.jsxs)("g",{clipPath:"url(#clip0_12481_4993)",children:[(0,i.jsx)("path",{d:"M4.75836 11.9498C4.56222 11.9612 4.36933 11.896 4.22036 11.7679C3.92655 11.4723 3.92655 10.995 4.22036 10.6994L10.6538 4.266C10.9594 3.98005 11.4389 3.99595 11.7248 4.30153C11.9834 4.57787 11.9985 5.00261 11.7601 5.29657L5.28878 11.7679C5.14173 11.8941 4.95193 11.9592 4.75836 11.9498Z",fill:"white"}),(0,i.jsx)("path",{d:"M11.1842 11.9498C10.9854 11.9489 10.7949 11.87 10.6537 11.73L4.22029 5.29656C3.9481 4.9787 3.9851 4.50033 4.30297 4.22811C4.58667 3.98516 5.00507 3.98516 5.28875 4.22811L11.7601 10.6616C12.0656 10.9476 12.0814 11.4271 11.7954 11.7326C11.784 11.7448 11.7722 11.7565 11.7601 11.7679C11.6016 11.9057 11.3931 11.9716 11.1842 11.9498Z",fill:"white"})]}),(0,i.jsx)("defs",{children:(0,i.jsx)("clipPath",{id:"clip0_12481_4993",children:(0,i.jsx)("rect",{width:"8",he
1ight:"8",fill:"white",transform:"translate(4 4)"})})})]})},86633:(e,t,n)=>{"use strict";n.d(t,{b:()=>s});var i=n(37876),o=n(14232),r=n(50677);let s=e=>{let{icon:t,text:n,actionLabel:s,onAction:a,onActionIntent:l,actionDisabled:d=!1,className:c,variant:u="default",testId:p}=e,[m,h]=(0,o.useState)(!1),y="action"===u;return(0,o.useEffect)(()=>{let e=requestAnimationFrame(()=>h(!0));return()=>cancelAnimationFrame(e)},[]),(0,i.jsx)(r.pn,{$mounted:m,"data-testid":p,children:(0,i.jsx)(r.D1,{children:(0,i.jsxs)(r.vg,{$mounted:m,$isAction:y,className:c,children:[(0,i.jsxs)(r.g7,{$isAction:y,children:[t,(0,i.jsx)(r.cr,{$isAction:y,children:n})]}),(0,i.jsx)(r.fT,{type:"button",$isAction:y,onClick:a,onPointerEnter:l,onPointerDown:l,onFocus:l,disabled:d,children:y?(0,i.jsx)(r.pe,{children:s}):s})]})})})}}},e=>{e.O(0,[9195,4031,5352,6361,9207,665,9329,1471,9326,8230,1655,6688,9086,4587,815,4222,4688,9809,51,8278,945,9200,3474,7018,2976,2842,903,8339,9744,3758,6313,3083,4287,6422,2955,7282,6546,3809,1015,5981,336,4457,6427,8660,8006,6140,3099,5144,2904,1644,854,9728,636,6593,8792],()=>e(e.s=36742)),_N_E=e.O()}]);
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.