1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6767],{63224:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/account/applications",function(){return n(23078)}])},2814:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});var a=n(52322),l=n(10055),i=n(15613);function r(e){let{sectionTitle:t,title:n,subtitle:r,actionButtonText:s,onActionClick:o,wrapInSection:c=!0,className:d=""}=e,u=(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[c&&t&&(0,a.jsx)("h2",{className:"text-[26px] md:text-[40px] font-medium leading-normal text-carbon-800 font-abcgintonord",children:t}),(0,a.jsxs)("div",{className:"w-full bg-white-50 rounded-lg shadow-[0_2px_8px_0_rgba(0,0,0,0.06)] flex flex-col items-center justify-center gap-6 p-4 md:p-6",role:"region","aria-label":n,children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-4",children:[(0,a.jsx)("h3",{className:"text-xl font-bold text-carbon-800 text-center",children:n}),(0,a.jsx)("p",{className:"text-carbon-700 text-center",children:r})]}),(0,a.jsxs)(l.z,{color:"primary",fill:"solid",onClick:o,children:[(0,a.jsx)(i.JO,{name:"search",color:"tertiary",size:"large"}),s]})]})]});return c?(0,a.jsx)("section",{className:"py-10 md:py-20 ".concat(d).trim(),children:u}):(0,a.jsx)("div",{className:d.trim()||void 0,children:u})}},43930:function(e,t,n){"use strict";n.d(t,{m:function(){return u}});var a=n(5632),l=n(2784),i=n(76413),r=n(11122),s=n(4102),o=n(94449),c=n(68201),d=n(56133);function u(){var e;let t=(0,o.v9)(s.etS);console.log("userProfile in useAccountAuthRedirect:",t);let{i18n:{language:n}}=(0,r.$G)(),u=(0,a.useRouter)(),f=(0,o.I0)(),[p]=(0,s.Y5c)(),[m]=(0,s.z9E)(),[h,x]=(0,l.useState)(!1),b=d.EN.getItem("jwt"),v=u.query.token,g="string"==typeof v?v:Array.isArray(v)?v[0]:null;(0,l.useEffect)(()=>{if(!u.isReady)return;let e=async()=>{if(g&&!(null==t?void 0:t.userId)){try{await m({token:g}).unwrap();let[e=""]=u.asPath.split("#"),[t,n]=e.split("?"),a=new URLSearchParams(n||"");a.delete("token");let l=a.toString(),i=l?"".concat(t,"?").concat(l):t,r=u.asPath.includes("#")?u.asPath.slice(u.asPath.indexOf("#")):"";u.replace("".concat(i).concat(r),void 0,{shallow:!0})}catch(e){console.error("Error logging in with token:",e)}x(!0);return}if(b&&!(null==t?void 0:t.userId)){try{let e=await p();e.error&&(d.EN.removeItem("jwt"),f((0,s.VEE)()))}catch(e){console.error("Error fetching current user:",e),d.EN.removeItem("jwt"),f((0,s.VEE)())}f((0,s.DO1)(!0))}x(!0)};e()},[u.isReady,g,null==t?void 0:t.userId,b,p,m,u]),(0,l.useEffect)(()=>{if(!h)return;let e=!!(null==t?void 0:t.userId),a=(0,c.xq)(window.location.search);if(!e&&!b&&!a){let e=i.LR.path[n]||i.LR.path.es,t=u.asPath,a=encodeURIComponent(t);u.push("".concat(e,"?returnUrl=").concat(a))}},[t,n,u,h,b]);let j=u.isReady?null!==(e=(0,c.Mi)(u.query))&&void 0!==e?e:(0,c.O)(window.location.search):null,w=!!j&&!(null==t?void 0:t.userId);return{isCheckingAuth:!h||w,isAuthenticated:!!(null==t?void 0:t.userId)}}},31132:function(e,t,n){"use strict";n.d(t,{I:function(){return i}});var a=n(2784),l=n(4102);let i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en",[n,i]=(0,a.useState)(""),[r,s]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{s(!0)},[]),(0,a.useEffect)(()=>{r&&i((0,l.pi5)(e,t))},[e,t,r]),r?n:""}},23078:function(e,t,n){"use strict";n.r(t),n.d(t,{ApplicationsPage:function(){return K},__N_SSP:function(){return G},default:function(){return V}});var a=n(52322),l=n(2784),i=n(11122),r=n(5632),s=n(92928),o=n(94449),c=n(4102),d=n(65992),u=n(76413),f=n(57913);function p(){return(0,a.jsxs)("div",{className:"flex flex-col gap-6 md:px-6 pb-6 w-full",children:[(0,a.jsx)(f.O,{className:"h-8 w-48 mb-2"})," ",(0,a.jsxs)("div",{className:"flex w-full",children:[(0,a.jsx)(f.O,{className:"h-10 w-1/2 mr-2"}),(0,a.jsx)(f.O,{className:"h-10 w-1/2"})]}),(0,a.jsx)("div",{className:"flex flex-row gap-2 w-full mt-2",children:Array.from({length:6}).map((e,t)=>(0,a.jsx)(f.O,{className:"h-8 w-24 rounded"},t))}),(0,a.jsxs)("div",{className:"lg:flex grid lg:justify-between gap-4 lg:gap-0 w-full lg:items-center flex-wrap mt-4",children:[(0,a.jsx)(f.O,{className:"h-10 w-72 mb-2"}),(0,a.jsxs)("div",{className:"flex md:flex-row flex-col gap-2 md:max-w-[302px] items-center",children:[(0,a.jsx)(f.O,{className:"h-10 w-32"}),(0,a.jsx)(f.O,{className:"h-10 w-32"})]})]}),(0,a.jsx)("div",{className:"flex flex-col gap-6 mt-4",children:Array.from({length:3}).map((e,t)=>(0,a.jsx)(f.O,{className:"h-40 w-full rounded-lg"},t))})]})}var m=n(45484),h=n(2814),x=n(9559),b=n(31132);let v=(0,l.memo)(function(e){let{offer:t,language:n,date:l,...i}
1=e,r=(0,b.I)(null==t?void 0:t.publicationDate,n);return(0,a.jsx)(x.OfferCard,{offer:t,date:null!=l?l:r,hideRecommendedInDesktop:!0,...i})});var g=n(35747),j=n(93808);function w(e,t){let{isFetching:n,hasMore:a,enabled:i=!0,mobileThreshold:r=800,desktopThreshold:s=200,debounceMs:o=100}=t;(0,l.useEffect)(()=>{let t;if(!i)return;let l=()=>{t&&clearTimeout(t),t=setTimeout(()=>{if(n||!a)return;let t=window.scrollY+window.innerHeight,l=document.documentElement.scrollHeight,i=window.innerWidth<768?r:s;l-t<i&&e()},o)};return window.addEventListener("scroll",l),()=>{window.removeEventListener("scroll",l),t&&clearTimeout(t)}},[n,a,i,r,s,o,e])}var y=n(34613),N=n(43930),k=n(10055),C=n(2156),I=n(45372);let S=e=>{let{isOpen:t,onClose:n,onConfirm:r,isLoading:s=!1}=e,{t:o}=(0,i.$G)("profile"),{t:c}=(0,i.$G)("buttons"),{t:d}=(0,i.$G)("validationMessages"),[u,f]=(0,l.useState)(""),[p,m]=(0,l.useState)(""),h=e=>/^[A-Za-z0-9]{1,20}$/.test(e),x=()=>{let e=u.trim().toUpperCase();if(!e){m(d("fields.dniNie.required"));return}if(!h(e)){m(d("fields.dniNie.invalid"));return}m(""),r(e)},b=()=>{f(""),m(""),n()},v=e=>{let t=e.replace(/[^A-Za-z0-9]/g,"").toUpperCase();f(t),p&&m("")};return(0,a.jsx)(I.u,{isOpen:t,onClose:b,closeOnClickAction:!1,children:(0,a.jsxs)("div",{className:"flex flex-col gap-6 px-2 sm:px-0",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[(0,a.jsx)("h1",{className:"text-[28px] font-medium text-carbon-800 font-abcgintonord text-center",children:o("candidates.applications.dniNieModal.title")}),(0,a.jsx)("p",{className:"text-base text-carbon-800 text-center",children:o("candidates.applications.dniNieModal.subtitle")})]}),(0,a.jsxs)("div",{className:"flex flex-col w-full",children:[(0,a.jsx)(C.V,{id:"dniNie",placeholder:o("candidates.applications.dniNieModal.placeholder"),value:u,onChange:e=>v(e.target.value),isError:!!p,autoComplete:"off",maxLength:20,className:"w-full text-base placeholder:text-sm sm:placeholder:text-base h-12 sm:h-14 border border-gray-300 rounded-md",style:{minWidth:"100%",paddingLeft:"12px",paddingRight:"12px",minHeight:"48px"}}),p&&(0,a.jsx)("span",{className:"text-error-600 text-sm mt-1",children:p})]}),(0,a.jsxs)("div",{className:"flex justify-end gap-4",children:[(0,a.jsx)("div",{children:(0,a.jsx)(k.z,{fill:"clear",color:"secondary",onClick:b,disabled:s,className:"w-full",children:c("cancel")})}),(0,a.jsx)("div",{children:(0,a.jsx)(k.z,{onClick:x,disabled:s||!u.trim(),className:"w-full",children:o(s?"candidates.applications.generatingPDF":"candidates.applications.dniNieModal.confirm")})})]})]})})};var E=n(32911),T=n(92699),P=n(31763),O=n.n(P),_=n(10477),L=n(17029),A=n(96577),R=n.n(A);let $=e=>{switch(e){case"es-es":case"es":case"default":default:return"es-ES";case"en-es":case"en":return"en-US";case"pt-pt":return"pt-PT";case"en-pt":return"en-GB"}},D=e=>{let{candidateName:t,candidateDocument:n,applications:l,t:i,currentDate:r,city:s,locale:o="es-es",isFirstPage:c=!1,pageApplications:d=[],showHeader:u=!1,showFooter:f=!1}=e,p=$(o||"es-es"),m=e=>{let t=new Date(e);return t.toLocaleDateString(p,{day:"2-digit",month:"2-digit",year:"numeric"})};return(0,a.jsxs)("div",{className:"bg-white-50 shadow-sm print:shadow-none",style:{fontFamily:"IBMPlexSans, sans-serif",padding:"25px 50px",minHeight:"297mm",width:"210mm",boxSizing:"border-box"},children:[(0,a.jsxs)("div",{children:[u&&(0,a.jsxs)("div",{className:"header-section mb-6",children:[(0,a.jsx)("div",{className:"mb-4",children:(0,a.jsx)(R(),{src:"/images/logo-black.png",alt:"Turijobs Logo",width:150,height:40,priority:!0,unoptimized:!0})}),(0,a.jsxs)("div",{className:"text-center mb-5",children:[(0,a.jsx)("h1",{className:"text-2xl font-bold text-carbon-800 mb-3",children:i("candidates.activeJobSearch.certificateTitle")}),(0,a.jsxs)("p",{className:"text-base text-carbon-800",children:[s,", ",r]})]}),(0,a.jsx)("div",{className:"mb-4 text-sm leading-6 text-carbon-800",children:(0,a.jsx)("p",{children:i("candidates.activeJobSearch.companyInfo")})}),(0,a.jsxs)("div",{className:"mb-5",children:[(0,a.jsx)("h2",{className:"text-lg font-bold text-carbon-800 mb
1-3 text-center",children:i("candidates.activeJobSearch.certifies")}),(0,a.jsx)("p",{className:"text-sm leading-6 text-carbon-800 mb-4",children:i("candidates.activeJobSearch.certificateText",{candidateName:t,candidateDocument:n,applicationsCount:l.length})})]}),(0,a.jsxs)("div",{className:"mb-5",children:[(0,a.jsx)("h3",{className:"text-base font-bold text-carbon-800 mb-4",children:i("candidates.activeJobSearch.applicationsSubmitted")}),(0,a.jsx)("p",{className:"text-sm text-carbon-800 mb-5",children:i("candidates.activeJobSearch.applicationsListIntro")})]})]}),d.length>0&&(0,a.jsx)("div",{className:"applications-section",children:(0,a.jsx)("div",{className:"applications-list space-y-4",children:d.map((e,t)=>(0,a.jsxs)("div",{className:"border-l-3 border-peach-400 pl-4 py-2",style:{borderLeftWidth:"3px",borderLeftColor:"#fa824c",paddingLeft:"15px",paddingTop:"8px",paddingBottom:"8px",marginBottom:"15px"},children:[(0,a.jsx)("h4",{className:"font-semibold text-carbon-800 text-sm mb-2 leading-relaxed",children:e.offerTitle}),(0,a.jsx)("p",{className:"text-carbon-700 text-sm mb-2 leading-relaxed",children:e.companyName}),(0,a.jsxs)("p",{className:"text-carbon-700 text-xs leading-relaxed",children:[i("candidates.activeJobSearch.applicationDate"),": ",m(e.registrationDate)]})]},e.registrationId))})}),f&&(0,a.jsxs)("div",{className:"footer-text-section mt-6",children:[(0,a.jsxs)("div",{className:"text-sm text-carbon-800 mb-4",children:[(0,a.jsx)("p",{className:"mb-2",children:i("candidates.activeJobSearch.sincerely")}),(0,a.jsx)("p",{className:"font-semibold",children:i("candidates.activeJobSearch.turijobsTeam")})]}),(0,a.jsxs)("div",{className:"text-xs text-carbon-700 leading-4 mb-5",children:[(0,a.jsx)("p",{className:"font-semibold mb-1",children:i("candidates.activeJobSearch.confidentialInfo")}),(0,a.jsx)("p",{children:i("candidates.activeJobSearch.legalNotice")})]})]})]}),f&&(0,a.jsx)("div",{className:"mt-5 py-4 bg-peach-400 flex justify-center",children:(0,a.jsx)(R(),{src:"/images/logo-white.png",alt:"Turijobs Logo",width:150,height:40,priority:!0,unoptimized:!0})})]})},F=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"download",n=e.applications;if("view"===t){let t=document.createElement("div");t.style.position="fixed",t.style.top="0",t.style.left="0",t.style.width="100%",t.style.height="100%",t.style.backgroundColor="rgba(0,0,0,0.8)",t.style.zIndex="9999",t.style.padding="2rem",t.style.overflow="auto";let l=document.createElement("button");l.innerHTML="\xd7",l.style.position="fixed",l.style.right="2rem",l.style.top="1rem",l.style.fontSize="2rem",l.style.color="white",l.style.cursor="pointer",l.onclick=()=>t.remove(),document.body.appendChild(t),t.appendChild(l);let i=(0,L.createRoot)(t);i.render((0,a.jsx)(D,{...e,pageApplications:n,showHeader:!0,showFooter:!0}));return}try{let l=new _.ZP({orientation:"portrait",unit:"px",format:"a4"}),i=l.internal.pageSize.getHeight(),r=Math.floor((i-80-50)/50),s=[],o=[...n];if(o.length>0){let e=o.splice(0,Math.floor((i-250-80-50)/50));s.push({applications:e,isFirstPage:!0,isLastPage:0===o.length})}for(;o.length>0;){let e=o.splice(0,r);s.push({applications:e,isFirstPage:!1,isLastPage:0===o.length})}for(let t=0;t<s.length;t++){let i=s[t];t>0&&l.addPage();let r=document.createElement("div");document.body.appendChild(r);let o=(0,L.createRoot)(r);o.render((0,a.jsx)(D,{...e,applications:n,pageApplications:i.applications,showHeader:i.isFirstPage,showFooter:i.isLastPage,isFirstPage:i.isFirstPage})),await new Promise(e=>setTimeout(e,200));try{let e=await O()(r.firstChild,{backgroundColor:"#FFFFFF",scale:2,useCORS:!0,windowWidth:1050}),t=l.internal.pageSize.getWidth(),n=l.internal.pageSize.getHeight(),a=e.toDataURL("image/png"),i=e.height*t/e.width;l.addImage(a,"PNG",0,0,t,Math.min(i,n))}finally{o.unmount(),document.body.removeChild(r)}}"download"===t?l.save("certificado-busqueda-activa-empleo.pdf"):window.open(l.output("bloburl"),"_blank")}catch(e){throw console.error("Error generating PDF:",e),e}};function M(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:200;setTimeout(()=>{let e=document.querySelector(".react-tabs__tab--selected");e&&window.innerWidth<768&&e.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})},e)}let z={"es-es":"es-ES","en-es":"en-US","pt-pt":"pt-PT","en-pt":"en-GB",en:"en-US",es:"es-ES"},B={saved:"saved",sended:"sended",all:"all",active:"active",paused:"paused",closed:"closed"},U={stateId:-1,name:"candidates.applications.tabAll"},J={4:1,1:2,5:3,2:4,3:5};var W=n(15613),q=n(37322);let H=e=>{var t,n;let a=c.V1B.find(t=>t.code===e);return{languageId:(null==a?void 0:a.id)||c.bCY.SPANISH,siteId:(null==a?void 0:null===(t=a.site)||void 0===t?void 0:t.id)||c.Fxh.SPAIN,countryId:(null==a?void 0:null===(n=a.country)||void 0===n?void 0:n.id)||c.MQF.SPAIN}};function Z(e){let{isGenerating:t,onClick:n,label:l,loadingLabel:i}=e;return(0,a.jsxs)(k.z,{fill:"outline",size:"small",className:"self-center",onClick:n,disabled:t,children:[t?(0,a.jsx)("div",{className:"w-4 h-4",children:(0,a.jsx)(q.$,{color:"#fa824c",className:"!w-4 !h-4"})}):(0,a.jsx)(W.JO,{name:"download",size:"default"}),t?i:l]})}var G=!0;function K(){var e,t,n,f,m;let{isCheckingAuth:x,isAuthenticated:b}=(0,N.m)(),C=(0,r.useRouter)(),{t:I,i18n:{language:T}}=(0,i.$G)("profile"),P=(0,o.v9)(c.etS),O=(0,o.v9)(c.Ng8),{getCityUrl:_}=(0,g.L)(),{utm_source:L,utm_medium:A,utm_campaign:R}=(0,j.f)(),$=(0,l.useRef)(!1),[D,W]=(0,l.useState)(1),[G,K]=(0,l.useState)(1),[V,Q]=(0,l.useState)(U.stateId),[Y,X]=(0,l.useState)([]),ee=(0,l.useRef)(new Set),[et,en]=(0,l.useState)(!1),[ea,el]=(0,l.useState)(!1),[ei,er]=(0,l.useState)(!1),[es,eo]=(0,l.useState)(new Set),[ec]=(0,c.JD1)(),{languageId:ed,siteId:eu}=H(T||"es"),ef=(0,l.useMemo)(()=>{let e={siteId:eu,languageId:ed,page:D,offersPerPage:5};return V!==U.stateId&&(e.applicationStateId=V),e},[eu,ed,D,V]),ep=O===c.FWD.b2b,em=C.query.view||(ep?B.all:B.sended),{data:eh,refetch:ex}=(0,c.w8m)({userId:null==P?void 0:P.userId},{skip:!(null==P?void 0:P.userId)}),{data:eb,isFetching:ev,refetch:eg}=(0,c.Ns3)(ef,{skip:!(null==P?void 0:P.candidateId)}),{data:ej}=(0,c.KYu)(),{data:ew,isFetching:ey,refetch:eN}=(0,c.vF7)({page:G,offersPerPage:12},{skip:!(null==P?void 0:P.candidateId)}),{refetch:ek}=(0,c.Ka3)({days:90},{skip:!(null==P?void 0:P.candidateId)}),eC=(0,l.useMemo)(()=>{var e,t;return ej?[...ej].sort((n,a)=>(null!==(e=J[n.stateId])&&void 0!==e?e:999)-(null!==(t=J[a.stateId])&&void 0!==t?t:999)):[]},[ej]),eI=(0,l.useMemo)(()=>V===U.stateId?0:eC.findIndex(e=>e.stateId===V)+1,[V,eC]),eS=(0,l.useCallback)(e=>{let t=C.locale||T||"es",n=u.Dm.path[t];return n.replace(":slug",e.toString())},[C.locale,T]),eE=(0,l.useCallback)(()=>{let e=C.locale||T||"es",t=u.mt.path[e].split("/:")[0].replace(/^\//,"");return"/".concat(e,"/").concat(t)},[C.locale,T]),eT=(0,l.useCallback)((e,t)=>{let n={view:e};e===B.sended&&t&&t!==U.stateId&&(n.state=t);let a=C.asPath.split("?")[0];C.push({pathname:a,query:n},void 0,{shallow:!0})},[C]),eP=(0,l.useCallback)(e=>null!==(t=null==eh?void 0:eh.some(t=>t.offerId===e))&&void 0!==t&&t,[eh]),eO=(0,l.useCallback)(e=>{var t;return null!=e&&null!==(t=e.dates)&&void 0!==t&&!!t.finishDate&&new Date>new Date(e.dates.finishDate)},[]),e_=(0,l.useCallback)(()=>{W(e=>e+1)},[]),eL=(0,l.useCallback)(()=>{K(e=>e+1)},[]);w(e_,{isFetching:ev,hasMore:Boolean((null==eb?void 0:eb.hasMore)&&D<(null!==(n=null==eb?void 0:eb.totalPages)&&void 0!==n?n:0)),enabled:em===B.sended}
1),w(eL,{isFetching:ey,hasMore:Boolean((null==ew?void 0:ew.hasMore)&&G<(null!==(f=null==ew?void 0:ew.totalPages)&&void 0!==f?f:0)),enabled:em===B.saved,mobileThreshold:1200,desktopThreshold:800}),(0,l.useEffect)(()=>{W(1)},[em,V]),(0,l.useEffect)(()=>{let e=C.query.state?parseInt(C.query.state):null;null!==e&&e!==V&&(Q(e),M())},[C.query.state,C.isReady]),(0,l.useEffect)(()=>{eI>0&&eC.length&&C.isReady&&M(300)},[eI,eC,C.isReady]),(0,l.useEffect)(()=>{(null==P?void 0:P.candidateId)&&eg().catch(e=>console.error("Error refetching data:",e))},[null==P?void 0:P.candidateId,em,eg]),(0,l.useEffect)(()=>{(null==P?void 0:P.candidateId)&&!$.current&&(eN(),$.current=!0)},[null==P?void 0:P.candidateId,eN]),(0,l.useEffect)(()=>{if(!(null==ew?void 0:ew.favorites))return;ee.current.forEach(e=>{ew.favorites.some(t=>t.offer.id===e)||ee.current.delete(e)});let e=ee.current.size>0?ew.favorites.filter(e=>!ee.current.has(e.offer.id)):ew.favorites;X(e)},[null==ew?void 0:ew.favorites]);let eA=(0,l.useCallback)(e=>{var t;let n=0===e?U.stateId:null===(t=eC[e-1])||void 0===t?void 0:t.stateId;n!==V&&(Q(n),W(1),eT(B.sended,n),M(100))},[eC,V,eT]),eR=(0,l.useCallback)(async e=>{if((null==P?void 0:P.userId)&&e){ee.current.add(e),X(t=>t.filter(t=>t.offer.id!==e));try{await ec({offerId:e})}catch(t){console.error("Error managing favorite:",t),ee.current.delete(e),(null==ew?void 0:ew.favorites)&&X(ew.favorites)}}},[null==P?void 0:P.userId,ec,null==ew?void 0:ew.favorites]),e$=(0,l.useCallback)(async e=>{if(er(!0),null==P?void 0:P.userId){ee.current.add(e),X(t=>t.filter(t=>t.offer.id!==e));try{await ec({offerId:e})}catch(e){console.error("Error removing favorite after apply:",e)}}eg(),ex()},[null==P?void 0:P.userId,ec,eg,ex]),eD=(0,l.useCallback)(()=>C.push(eE()),[C,eE]),eF=(0,l.useCallback)(()=>{eT(B.sended,U.stateId),Q(U.stateId),er(!1)},[eT]),eM=(0,l.useCallback)(()=>{P&&el(!0)},[P]),ez=(0,l.useCallback)(async e=>{if(P){en(!0),el(!1);try{var t;let{data:n}=await ek(),a=C.locale||"es-es",l=null!==(t=z[a])&&void 0!==t?t:"es-ES",i=new Date().toLocaleDateString(l,{day:"numeric",month:"long",year:"numeric"});await F({candidateName:"".concat(P.firstName," ").concat(P.lastName),candidateDocument:e,applications:n||[],t:I,currentDate:i,city:"Barcelona",locale:a},"download")}catch(e){console.error("Error generating PDF:",e)}finally{en(!1)}}},[P,ek,C.locale,I]),eB=(0,l.useCallback)(()=>{el(!1)},[]),eU=(0,l.useCallback)(e=>{var t,n,a,l,i,r;es.has(e.id)||(eo(t=>new Set(t).add(e.id)),(0,y.L9)(d.tV.B2CViewItem,{flow:d.hm.B2CJobApplication,step:d.Md.Impression,origin:c.Qot.SavedOffers,origin_source:L,origin_medium:A,origin_campaign:R,id_candidate:null!==(r=null==P?void 0:P.candidateId)&&void 0!==r?r:0,id_job_vacancy:e.id,applied_job_vacancy:eP(e.id),items:[{item_id:e.id,item_name:e.title,item_brand:(null==e?void 0:null===(t=e.company)||void 0===t?void 0:t.brandName)||(null==e?void 0:null===(n=e.company)||void 0===n?void 0:n.enterpriseName),...(e.cardTags||[]).reduce((e,t,n)=>(e["item_category".concat(0===n?"":n+1)]=t,e),{}),item_city:null===(a=e.location)||void 0===a?void 0:a.cityName,location_id:"".concat(null===(l=e.location)||void 0===l?void 0:l.countryName,"-").concat(null===(i=e.location)||void 0===i?void 0:i.regionName),price:0,quantity:1}]}))},[es,L,A,R,null==P?void 0:P.candidateId,eP]);if(x)return(0,a.jsx)("div",{className:"flex items-center justify-center h-64",children:(0,a.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-t-2 border-b-2 border-carbon-800"})});if(!b)return null;let eJ=e=>(0,a.jsx)(v,{offer:e.offer,language:T,offerType:e.registrationState,date:"".concat(I("candidates.applications.registeredOn","Registered on")," ").concat(new Date(e.registrationDate).toLocaleDateString(T||"es")),onView:()=>window.open(eS(e.offer.id),"_blank"),tags:[{text:"".concat(e.offer.applies," ").concat(I("candidates.applications.applicantsLabel","applicants")),icon:"addUser",iconColor:"primary"}],isNationalDiffusion:e.offer.nationalDiffusion,isInternationalDiffusion:e.offer.internationalDiffusion,showButtons:!1,cityUrl:_(e.offer)},e.registrationId),eW=e=>{var t,n;return(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsx)("div",{className:"lg:flex grid lg:justify-between gap-4 lg:gap-0 w-full lg:items-center flex-wrap",children:(0,a.jsx)(Z,{isGenerating:et,onClick:eM,label:I("candidates.applications.activeJobSearch"),loadingLabel:I("candidates.applications.generatingPDF","Generating certificate...")})}),(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[ev&&1===D?(0,a.jsx)(q.$,{color:"#303133"}):(null==eb?void 0:null===(t=eb.applications)||void 0===t?void 0:t.length)?eb.applications.map(eJ):(0,a.jsx)(h.Z,{wrapInSection:!1,title:I("candidates.applications.noApplications"),subtitle:I("candidates.applications.noApplicationsDescription"),actionButtonText:I("candidates.applications.searchOffers"),onActionClick:eD}),ev&&D>1&&!(null==eb?void 0:null===(n=eb.loadedPages)||void 0===n?void 0:n.includes(D))&&(0,a.jsx)(q.$,{color:"#303133"})]})]})},eq=Y.length>
10?Y:null!==(m=null==ew?void 0:ew.favorites)&&void 0!==m?m:[];return(0,a.jsxs)("div",{className:"flex flex-col gap-6 md:px-6 pb-6",children:[(0,a.jsx)("h2",{className:"text-xl md:text-[28px] font-abcgintonord font-bold text-carbon-800",children:I("candidates.applications.title")}),ev&&1===D||!eb?(0,a.jsx)(p,{}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex w-full",children:[(0,a.jsx)("div",{className:"w-full border-b ".concat(em===B.sended?"border-carbon-800":"border-carbon-300"),children:(0,a.jsx)(k.z,{fill:"clear",color:"secondary",className:"w-full border-b ".concat(em===B.sended?"border-carbon-800":"border-transparent"),onClick:()=>eT(B.sended),children:(0,a.jsx)("span",{className:"text-carbon-800 text-sm ".concat(em===B.sended&&"font-bold"),children:I("candidates.applications.sentApplications")})})}),(0,a.jsx)("div",{className:"w-full border-b ".concat(em===B.saved?"border-carbon-800":"border-carbon-300"),children:(0,a.jsx)(k.z,{fill:"clear",color:"secondary",className:"w-full border-b ".concat(em===B.saved?"border-carbon-800":"border-transparent"),onClick:()=>eT(B.saved),children:(0,a.jsx)("span",{className:"text-carbon-800 text-sm ".concat(em===B.saved&&"font-bold"),children:I("candidates.applications.savedApplications")})})})]}),em===B.sended&&(0,a.jsx)("div",{className:"flex flex-col gap-6",children:(0,a.jsx)("div",{className:"flex w-full",children:(0,a.jsxs)(s.mQ,{className:"react-tabs md:react-tabs--secondary react-tabs--secondary w-full flex flex-col pb-16 md:pb-16",onSelect:eA,selectedIndex:eI,children:[(0,a.jsx)("div",{children:(0,a.jsxs)(s.td,{className:"!pb-6",children:[(0,a.jsxs)(s.OK,{children:[I(U.name),(0,a.jsx)("span",{className:"flex justify-center items-center rounded-full bg-carbon-800 text-white-50 w-6 h-6 text-xs",children:(null==eb?void 0:eb.totalApplications)||0})]},U.stateId),eC.map(e=>{var t,n;return(0,a.jsxs)(s.OK,{disabled:!(null==eb?void 0:null===(t=eb.totalApplicationsByState)||void 0===t?void 0:t[e.stateId]),children:[e.name,(0,a.jsx)("span",{className:"flex justify-center items-center rounded-full bg-carbon-800 text-white-50 w-6 h-6 text-xs",children:(null==eb?void 0:null===(n=eb.totalApplicationsByState)||void 0===n?void 0:n[e.stateId])||0})]},e.stateId)})]})}),(0,a.jsx)(s.x4,{children:eW()}),eC.map(e=>(0,a.jsx)(s.x4,{children:eW(e.stateId)},e.stateId))]})})}),em===B.saved&&(0,a.jsx)("div",{className:"flex flex-col gap-6",children:ey&&1===G&&!ew?(0,a.jsx)(q.$,{color:"#303133"}):(null==ew?void 0:null===(e=ew.favorites)||void 0===e?void 0:e.length)?(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 md:gap-6",children:eq.map(e=>{let t=eO(e.offer);return(0,a.jsx)("div",{children:(0,a.jsx)(v,{offer:e.offer,language:T,bookmark:!0,bookmarkActive:!0,...!t&&{onView:()=>C.push(eS(e.offer.id))},onBookmarkClick:()=>eR(e.offer.id),className:"shadow-sm rounded-lg p-6",isApplied:eP(e.offer.id),isNationalDiffusion:e.offer.nationalDiffusion,isInternationalDiffusion:e.offer.internationalDiffusion,..."featured"===e.offer.type&&{offerType:I("candidates.applications.featured","Featured")},...t&&{showButtons:!1},onApplySuccess:e$,cityUrl:_(e.offer),originFlow:c.Qot.SavedOffers,onTrackImpression:eU})},e.offer.id)})}),ey&&G>1&&(0,a.jsx)("div",{className:"col-span-full flex justify-center",children:(0,a.jsx)(q.$,{color:"#303133"})})]}):(0,a.jsx)(h.Z,{wrapInSection:!1,title:I("candidates.applications.noSavedApplications"),subtitle:I("candidates.applications.noSavedApplicationsDescription"),actionButtonText:I("candidates.applications.searchOffers"),onActionClick:eD})})]}),(0,a.jsx)(S,{isOpen:ea,onClose:eB,onConfirm:ez,isLoading:et}),ei&&(0,a.jsx)("div",{className:"fixed bottom-4 left-4 z-50",children:(0,a.jsx)(E.F,{variant:"success",onClose:()=>er(!1),children:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{children:I("candidates.applications.toastOneClick.description")})," ",(0,a.jsx)("button",{type:"button",className:"text-orange-600 cursor-pointer underline",onClick:eF,children:I("candidates.applications.toastOneClick.link")})]})})})]})}K.getLayout=e=>(0,a.jsx)(T.Z,{children:e});var V=(0,m.Z)(K)},68201:function(e,t,n){"use strict";function a(e){let t=new URLSearchParams(e.startsWith("?")?e:"?".concat(e));return t.get("jatoken")||t.get("jaToken")}function l(e){return null!==a(e)}function i(e){var t;let n=null!==(t=e.jatoken)&&void 0!==t?t:e.jaToken;return"string"==typeof n&&n?n:Array.isArray(n)&&n[0]?n[0]:null}n.d(t,{Mi:function(){return i},O:function(){return a},xq:function(){return l}})},92928:function(e,t,n){"use strict";let a;n.d(t,{OK:function(){return D},td:function(){return _},x4:function(){return U},mQ:function(){return E}});var l=n(13980),i=n(2784);function r(e){return t=>!!t.type&&t.type.tabsRole===e}let s=r("Tab"),o=r("TabList"),c=r("TabPanel");function d(e,t){return i.Children.map(e,e=>null===e?null:s(e)||o(e)||c(e)?t(e):e.props&&e.props.children&&"object"==typeof e.props.children?(0,i.cloneElement)(e,Object.assign({},e.props,{children:d(e.props.children,t)})):e)}
1function u(e,t){return i.Children.forEach(e,e=>{null!==e&&(s(e)||c(e)?t(e):e.props&&e.props.children&&"object"==typeof e.props.children&&(o(e)&&t(e),u(e.props.children,t)))})}function f(e,t,n){let a;let l=0,i=0,r=!1,d=[],f=e[t];return u(f,e=>{o(e)&&(e.props&&e.props.children&&"object"==typeof e.props.children&&u(e.props.children,e=>d.push(e)),r&&(a=Error("Found multiple 'TabList' components inside 'Tabs'. Only one is allowed.")),r=!0),s(e)?(r&&-1!==d.indexOf(e)||(a=Error("Found a 'Tab' component outside of the 'TabList' component. 'Tab' components have to be inside the 'TabList' component.")),l++):c(e)&&i++}),a||l===i||(a=Error(`There should be an equal number of 'Tab' and 'TabPanel' in \`${n}\`. Received ${l} 'Tab' and ${i} 'TabPanel'.`)),a}var p=n(40489);function m(e){let t=0;return u(e,e=>{s(e)&&t++}),t}let h=["children","className","disabledTabClassName","domRef","focus","forceRenderTabPanel","onSelect","selectedIndex","selectedTabClassName","selectedTabPanelClassName","environment","disableUpDownKeys","disableLeftRightKeys"];function x(e){return e&&"getAttribute"in e}function b(e){return x(e)&&e.getAttribute("data-rttab")}function v(e){return x(e)&&"true"===e.getAttribute("aria-disabled")}let g={className:"react-tabs",focus:!1},j={children:f},w=e=>{(0,l.checkPropTypes)(j,e,"prop","UncontrolledTabs");let t=(0,i.useRef)([]),n=(0,i.useRef)([]),r=(0,i.useRef)();function u(t,n){if(t<0||t>=w())return;let{onSelect:a,selectedIndex:l}=e;a(t,l,n)}function f(e){let t=w();for(let n=e+1;n<t;n++)if(!v(y(n)))return n;for(let t=0;t<e;t++)if(!v(y(t)))return t;return e}function x(e){let t=e;for(;t--;)if(!v(y(t)))return t;for(t=w();t-- >e;)if(!v(y(t)))return t;return e}function w(){let{children:t}=e;return m(t)}function y(e){return t.current[`tabs-${e}`]}function N(e){let t=e.target;do if(k(t)){if(v(t))return;let n=[].slice.call(t.parentNode.children).filter(b).indexOf(t);u(n,e);return}while(null!=(t=t.parentNode))}function k(e){if(!b(e))return!1;let t=e.parentElement;do{if(t===r.current)return!0;if(t.getAttribute("data-rttabs"))break;t=t.parentElement}while(t);return!1}let C=Object.assign({},g,e),{className:I,domRef:S}=C,E=function(e,t){if(null==e)return{};var n={};for(var a in e)if(({}).hasOwnProperty.call(e,a)){if(t.includes(a))continue;n[a]=e[a]}return n}(C,h);return i.createElement("div",Object.assign({},E,{className:(0,p.Z)(I),onClick:N,onKeyDown:function(t){let{direction:n,disableUpDownKeys:a,disableLeftRightKeys:l}=e;if(k(t.target)){let{selectedIndex:i}=e,r=!1,s=!1;("Space"===t.code||32===t.keyCode||"Enter"===t.code||13===t.keyCode)&&(r=!0,s=!1,N(t)),(l||37!==t.keyCode&&"ArrowLeft"!==t.code)&&(a||38!==t.keyCode&&"ArrowUp"!==t.code)?(l||39!==t.keyCode&&"ArrowRight"!==t.code)&&(a||40!==t.keyCode&&"ArrowDown"!==t.code)?35===t.keyCode||"End"===t.code?(i=function(){let e=w();for(;e--;)if(!v(y(e)))return e;return null}(),r=!0,s=!0):(36===t.keyCode||"Home"===t.code)&&(i=function(){let e=w();for(let t=0;t<e;t++)if(!v(y(t)))return t;return null}(),r=!0,s=!0):(i="rtl"===n?x(i):f(i),r=!0,s=!0):(i="rtl"===n?f(i):x(i),r=!0,s=!0),r&&t.preventDefault(),s&&u(i,t)}},ref:e=>{r.current=e,S&&S(e)},"data-rttabs":!0}),function(){let l=0,{children:r,disabledTabClassName:u,focus:f,forceRenderTabPanel:p,selectedIndex:m,selectedTabClassName:h,selectedTabPanelClassName:x,environment:b}=e;n.current=n.current||[];let v=n.current.length-w(),g=(0,i.useId)();for(;v++<0;)n.current.push(`${g}${n.current.length}`);return d(r,e=>{let r=e;if(o(e)){let l=0,o=!1;null==a&&function(e){let t=e||("undefined"!=typeof window?window:void 0);try{a=!!(void 0!==t&&t.document&&t.document.activeElement)}catch(e){a=!1}}(b);let c=b||("undefined"!=typeof window?window:void 0);a&&c&&(o=i.Children.toArray(e.props.children).filter(s).some((e,t)=>c.document.activeElement===y(t))),r=(0,i.cloneElement)(e,{children:d(e.props.children,e=>{let a=`tabs-${l}`,r=m===l,s={tabRef:e=>{t.current[a]=e},id:n.current[l],selected:r,focus:r&&(f||o)};return h&&(s.selectedClassName=h),u&&(s.disabledClassName=u),l++,(0,i.cloneElement)(e,s)})})}else if(c(e)){let t={id:n.current[l],selected:m===l};p&&(t.forceRender=p),x&&(t.selectedClassName=x),l++,r=(0,i.cloneElement)(e,t)}return r})}())},y=["children","defaultFocus","defaultIndex","focusTabOnClick","onSelect"],N={children:f,onSelect:function(e,t,n,a,l){let i=e[t],r=l||t,s=null;return i&&"function"!=typeof i?s=Error(`Invalid ${a} \`${r}\` of type \`${typeof i}\` supplied to \`${n}\`, expected \`function\`.`):null!=e.selectedIndex&&null==i&&(s=Error(`The ${a} \`${r}\` is marked as required in \`${n}\`, but its value is \`undefined\` or \`null\`. 2\`onSelect\` is required when \`selectedIndex\` is also set. Not doing so will make the tabs not do anything, as \`selectedIndex\` indicates that you want to handle the selected tab yourself. 3If you only want to set the inital tab replace \`selectedIndex\` with \`defaultIndex\`.`)),s},selectedIndex:function(e,t,n,a,l){let i=e[t],r=l||t,s=null;if(null!=i&&"number"!=typeof i)s=Error(`Invalid ${a} \`${r}\` of type \`${typeof i}\` supplied to \`${n}\`, expected \`number\`.`);else if(null!=e.defaultIndex&&null!=i)return Error(`The ${a} \`${r}\` cannot be used together with \`defaultIndex\` in \`${n}\`. 4Either remove \`${r}\` to let \`${n}\` handle the selected tab internally or remove \`defaultIndex\` to handle it yourself.`);return s}},k={defaultFocus:!1,focusTabOnClick:!0,forceRenderTabPanel:!1,selectedIndex:null,defaultIndex:null,environment:null,disableUpDownKeys:!1,disableLeftRightKeys:!1},C=e=>null===e.selectedIndex?1:0,I=(e,t)=>{},S=e=>{(0,l.checkPropTypes)(N,e,"prop","Tabs");let t=Object.assign({},k,e),{children:n,defaultFocus:a,defaultIndex:r,focusTabOnClick:s,onSelect:o}=t,c=function(e,t){if(null==e)return{};var n={};for(var a in e)if(({}).hasOwnProperty.call(e,a)){if(t.includes(a))continue;n[a]=e[a]}return n}(t,y),[d,u]=(0,i.useState)(a),[f]=(0,i.useState)(C(c)),[p,h]=(0,i.useState)(1===f?r||0:null);if((0,i.useEffect)(()=>{u(!1)},[]),1===f){let e=m(n);(0,i.useEffect)(()=>{null!=p&&h(Math.min(p,Math.max(0,e-1)))},[e])}I(c,f);let x=(e,t,n)=>
4{("function"!=typeof o||!1!==o(e,t,n))&&(s&&u(!0),1===f&&h(e))},b=Object.assign({},e,c);return b.focus=d,b.onSelect=x,null!=p&&(b.selectedIndex=p),delete b.defaultFocus,delete b.defaultIndex,delete b.focusTabOnClick,i.createElement(w,b,n)};S.tabsRole="Tabs";var E=S;let T=["children","className"],P={className:"react-tabs__tab-list"},O=e=>{let t=Object.assign({},P,e),{children:n,className:a}=t,l=function(e,t){if(null==e)return{};var n={};for(var a in e)if(({}).hasOwnProperty.call(e,a)){if(t.includes(a))continue;n[a]=e[a]}return n}(t,T);return i.createElement("ul",Object.assign({},l,{className:(0,p.Z)(a),role:"tablist"}),n)};O.tabsRole="TabList";var _=O;let L=["children","className","disabled","disabledClassName","focus","id","selected","selectedClassName","tabIndex","tabRef"],A="react-tabs__tab",R={className:A,disabledClassName:`${A}--disabled`,focus:!1,id:null,selected:!1,selectedClassName:`${A}--selected`},$=e=>{let t=(0,i.useRef)(),n=Object.assign({},R,e),{children:a,className:l,disabled:r,disabledClassName:s,focus:o,id:c,selected:d,selectedClassName:u,tabIndex:f,tabRef:m}=n,h=function(e,t){if(null==e)return{};var n={};for(var a in e)if(({}).hasOwnProperty.call(e,a)){if(t.includes(a))continue;n[a]=e[a]}return n}(n,L);return(0,i.useEffect)(()=>{d&&o&&t.current.focus()},[d,o]),i.createElement("li",Object.assign({},h,{className:(0,p.Z)(l,{[u]:d,[s]:r}),ref:e=>{t.current=e,m&&m(e)},role:"tab",id:`tab${c}`,"aria-selected":d?"true":"false","aria-disabled":r?"true":"false","aria-controls":`panel${c}`,tabIndex:f||(d?"0":null),"data-rttab":!0}),a)};$.tabsRole="Tab";var D=$;let F=["children","className","forceRender","id","selected","selectedClassName"],M="react-tabs__tab-panel",z={className:M,forceRender:!1,selectedClassName:`${M}--selected`},B=e=>{let t=Object.assign({},z,e),{children:n,className:a,forceRender:l,id:r,selected:s,selectedClassName:o}=t,c=function(e,t){if(null==e)return{};var n={};for(var a in e)if(({}).hasOwnProperty.call(e,a)){if(t.includes(a))continue;n[a]=e[a]}return n}(t,F);return i.createElement("div",Object.assign({},c,{className:(0,p.Z)(a,{[o]:s}),role:"tabpanel",id:`panel${r}`,"aria-labelledby":`tab${r}`}),l||s?n:null)};B.tabsRole="TabPanel";var U=B},40489:function(e,t,n){"use strict";t.Z=function(){for(var e,t,n=0,a="",l=arguments.length;n<l;n++)(e=arguments[n])&&(t=function e(t){var n,a,l="";if("string"==typeof t||"number"==typeof t)l+=t;else if("object"==typeof t){if(Array.isArray(t)){var i=t.length;for(n=0;n<i;n++)t[n]&&(a=e(t[n]))&&(l&&(l+=" "),l+=a)}else for(a in t)t[a]&&(l&&(l+=" "),l+=a)}return l}(e))&&(a&&(a+=" "),a+=t);return a}},37322:function(e,t,n){"use strict";n.d(t,{$:function(){return l}});var a=n(52322);let l=e=>{let{size:t="medium",color:n="#303133",className:l=""}=e;return(0,a.jsx)("div",{className:"h-20 flex items-center justify-center ".concat(l),children:(0,a.jsx)("div",{className:"animate-spin rounded-full border-t-2 border-b-2 transition-opacity duration-200 ".concat({small:"h-4 w-4",medium:"h-6 w-6",large:"h-8 w-8"}[t]),style:{borderColor:n}})})}},32911:function(e,t,n){"use strict";n.d(t,{F:function(){return c}});var a=n(52322),l=n(2784);function i(e){switch(e){case"success":return{iconColor:"text-lime-600",actionColor:"text-orange-600 border-orange-600"};case"warning":return{iconColor:"text-yellow-600",actionColor:"text-orange-600 border-orange-600"};default:return{iconColor:"text-red-600",actionColor:"text-orange-600 border-orange-600"}}}function r(e){let{variant:t}=e,{iconColor:n}=i(t);return"success"===t?(0,a.jsxs)("svg",{className:"w-5 h-5 ".concat(n),viewBox:"0 0 20 20",fill:"none","aria-hidden":!0,children:[(0,a.jsx)("circle",{cx:"10",cy:"10",r:"8",stroke:"currentColor",strokeWidth:1}),(0,a.jsx)("path",{d:"M6.5 10.5l2.5 2.5 4.5-5",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"})]}):"warning"===t?(0,a.jsxs)("svg",{className:"w-5 h-5 ".concat(n),viewBox:"0 0 20 20",fill:"none","aria-hidden":!0,children:[(0,a.jsx)("path",{d:"M10.9 2.9l6.3 11a1 1 0 01-.9 1.5H3.7a1 1 0 01-.9-1.5l6.3-11a1 1 0 011.8 0z",stroke:"currentColor",strokeWidth:1}),(0,a.jsx)("path",{d:"M10 6v5",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round"}),(0,a.jsx)("circle",{cx:"10",cy:"14.5",r:"1",fill:"currentColor"})]}
4):(0,a.jsxs)("svg",{className:"w-5 h-5 ".concat(n),viewBox:"0 0 20 20",fill:"none","aria-hidden":!0,children:[(0,a.jsx)("circle",{cx:"10",cy:"10",r:"8",stroke:"currentColor",strokeWidth:1}),(0,a.jsx)("path",{d:"M7 7l6 6M13 7l-6 6",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round"})]})}function s(){return(0,a.jsxs)("svg",{className:"h-4 w-4 shrink-0 text-carbon-800",viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,children:[(0,a.jsx)("path",{d:"M12 3.94L4 12.06",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"}),(0,a.jsx)("path",{d:"M4 3.94L12 12.06",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"})]})}function o(e){var t,n;let{action:l,actionPlacement:i,actionColor:r}=e,s="shrink-0 font-sans text-sm font-normal leading-normal text-tangaroa-950 hover:opacity-70",o="py-2 px-3 rounded border inline-flex justify-center items-center gap-2 text-sm ".concat(r);return l.href?(0,a.jsx)("a",{href:l.href,"aria-label":null!==(t=l.ariaLabel)&&void 0!==t?t:l.label,className:"inline"===i?s:o,children:l.label}):(0,a.jsx)("button",{type:"button","aria-label":null!==(n=l.ariaLabel)&&void 0!==n?n:l.label,onClick:l.onClick,className:"inline"===i?s:o,children:l.label})}function c(e){let{variant:t="success",children:n,onClose:c,action:d,actionPlacement:u="footer",showCloseButton:f=!0,className:p="",role:m="status",autoHideMs:h=5e3}=e,{actionColor:x}=i(t),[b,v]=(0,l.useState)(!0);(0,l.useEffect)(()=>{let e=window.setTimeout(()=>{v(!1),null==c||c()},h);return()=>window.clearTimeout(e)},[h,c]);let g=()=>{v(!1),null==c||c()};return b?(0,a.jsxs)("div",{role:m,"aria-live":"alert"===m?"assertive":"polite",className:"font-sans w-full max-w-sm sm:max-w-96 p-4 sm:p-6 bg-white-50 rounded-lg shadow-[0px_4px_4px_-4px_rgba(12,12,13,0.05),0px_16px_16px_-8px_rgba(12,12,13,0.10)] inline-flex flex-col justify-center items-start gap-4 ".concat(p),children:[(0,a.jsxs)("div",{className:"self-stretch inline-flex items-center justify-start gap-6",children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-4",children:[(0,a.jsx)(r,{variant:t}),(0,a.jsx)("div",{className:"min-w-0 flex-1 font-sans text-sm font-normal leading-normal text-carbon-800",children:n})]}),d&&"inline"===u?(0,a.jsx)(o,{action:d,actionPlacement:"inline",actionColor:x}):null,f?(0,a.jsx)("button",{type:"button","aria-label":"Close notification",onClick:g,className:"inline-flex shrink-0 items-center pt-0.5",children:(0,a.jsx)(s,{})}):null]}),d&&!(d&&"inline"===u)?(0,a.jsx)("div",{className:"flex flex-col items-end gap-2.5 self-stretch",children:(0,a.jsx)(o,{action:d,actionPlacement:"footer",actionColor:x})}):null]}):null}}},function(e){e.O(0,[8602,6070,4304,6517,2699,6753,6672,9e3,2391,9774,2888,179],function(){return e(e.s=63224)}),_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.