PageSourceSearch

https://www.turijobs.com/_next/static/chunks/pages/account/companies-8448b28468fe7b8f.js

js turijobs.com collected 2026-10-02 13:08:52 UTC 8,121 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1447],{78806:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/account/companies",function(){return s(89200)}])},43930:function(e,t,s){"use strict";s.d(t,{m:function(){return u}});var n=s(5632),a=s(2784),i=s(76413),l=s(11122),r=s(4102),c=s(94449),o=s(68201),d=s(56133);function u(){var e;let t=(0,c.v9)(r.etS);console.log("userProfile in useAccountAuthRedirect:",t);let{i18n:{language:s}}=(0,l.$G)(),u=(0,n.useRouter)(),f=(0,c.I0)(),[x]=(0,r.Y5c)(),[h]=(0,r.z9E)(),[m,p]=(0,a.useState)(!1),w=d.EN.getItem("jwt"),j=u.query.token,v="string"==typeof j?j:Array.isArray(j)?j[0]:null;(0,a.useEffect)(()=>{if(!u.isReady)return;let e=async()=>{if(v&&!(null==t?void 0:t.userId)){try{await h({token:v}).unwrap();let[e=""]=u.asPath.split("#"),[t,s]=e.split("?"),n=new URLSearchParams(s||"");n.delete("token");let a=n.toString(),i=a?"".concat(t,"?").concat(a):t,l=u.asPath.includes("#")?u.asPath.slice(u.asPath.indexOf("#")):"";u.replace("".concat(i).concat(l),void 0,{shallow:!0})}catch(e){console.error("Error logging in with token:",e)}p(!0);return}if(w&&!(null==t?void 0:t.userId)){try{let e=await x();e.error&&(d.EN.removeItem("jwt"),f((0,r.VEE)()))}catch(e){console.error("Error fetching current user:",e),d.EN.removeItem("jwt"),f((0,r.VEE)())}f((0,r.DO1)(!0))}p(!0)};e()},[u.isReady,v,null==t?void 0:t.userId,w,x,h,u]),(0,a.useEffect)(()=>{if(!m)return;let e=!!(null==t?void 0:t.userId),n=(0,o.xq)(window.location.search);if(!e&&!w&&!n){let e=i.LR.path[s]||i.LR.path.es,t=u.asPath,n=encodeURIComponent(t);u.push("".concat(e,"?returnUrl=").concat(n))}},[t,s,u,m,w]);let b=u.isReady?null!==(e=(0,o.Mi)(u.query))&&void 0!==e?e:(0,o.O)(window.location.search):null,g=!!b&&!(null==t?void 0:t.userId);return{isCheckingAuth:!m||g,isAuthenticated:!!(null==t?void 0:t.userId)}}},89200:function(e,t,s){"use strict";s.r(t),s.d(t,{CompaniesPage:function(){return m},__N_SSP:function(){return h}});var n=s(52322),a=s(45484),i=s(92699),l=s(11122),r=s(2784),c=s(43930),o=s(15613),d=s(10055),u=s(90655),f=s(86753);let x=[{title:"Company 1",avatar:"https://images.unsplash.com/photo-1633332755192-727a05c4013d?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1160&q=80",stars:4,votes:100,location:"Barcelona, Espa\xf1a",employees:200,category:"Hoteles",website:"#",notifications:{newOffers:1,newEvents:1,newPosts:1}},{title:"Company 2",avatar:"https://images.unsplash.com/photo-1633332755192-727a05c4013d?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1160&q=80",stars:3.5,votes:53,location:"Madrid, Espa\xf1a",employees:100,category:"Hoteles",website:"#",notifications:{newPosts:1}}];var h=!0;function m(e){let{followedCompanies:t=x}=e,{isCheckingAuth:s,isAuthenticated:a}=(0,c.m)(),{t:i}=(0,l.$G)(),[h,m]=(0,r.useState)(!1);return((0,r.useEffect)(()=>{let e=()=>{m(window.innerWidth>1e3)};e();let t=()=>e();return window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[]),s)?(0,n.jsx)("div",{className:"flex items-center justify-center h-64",children:(0,n.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-t-2 border-b-2 border-carbon-800"})}):a?(0,n.jsxs)("aside",{className:"flex flex-col gap-6 w-full h-full",children:[(0,n.jsx)(u.j,{title:"S\xe9 el primero en enterarte",description:"Ofertas de empleo, eventos, publicaciones... sigue a tus empresas favoritas para no perderte sus novedades.",icon:"megaphone",isVisible:!0}),(0,n.jsxs)("div",{className:"flex justify-between items-center",children:[(0,n.jsx)("h5",{className:"text-xl leading-[26px] text-carbon-800 font-bold",children:i("Seguir empresas")+" ("+t.length+") "}),(0,n.jsxs)(d.z,{fill:"outline",size:"small",disabled:0===t.length,children:["Buscar...",(0,n.jsx)(o.JO,{name:"search",size:"default"})]})]}),t.length>0?(0,n.jsx)("div",{className:"w-full flex flex-col gap-4",children:t.map((e,t)=>(0,n.jsx)(f.Z,{type:"company",title:e.title,avatar:e.avatar,stars:e.stars,votes:e.votes,location:e.location,category:e.category,website:e.website,showButtons:!1,children:(0,n.jsxs)("div",{className:"flex flex-col gap-4 w-full bg-alabaster-50 border border-carbon-300 p-6",children:[(0,n.jsx)("span",{className:"text-sm text-carbon-800",children:"Desde la \xfaltima vez que estuviste activo/a"}),e.notifications.newOffers>0&&(0,n.jsxs)("div",{className:"flex justify-between items-center gap-6",children:[(0,n.jsxs)("div",{className:"flex gap-4 items-center",children:[(0,n.jsx)("div",{className:"flex justify-center items-center rounded-full w-9 h-9 text-white-50 bg-peach-400",children:(0,n.jsx)(o.JO,{name:"clipboard"})}),(0,n.jsxs)("p",{className:"text-carbon-800 text-base leading-[20.8px]",children:["Nuevas ofertas",(0,n.jsx)("span",{className:"font-bold",children:" ("+e.notifications.newOffers+") "}),"publicadas"]})]}
1),(0,n.jsxs)(d.z,{size:"small",fill:"clear",children:["Ver ",h?"ofertas":">"]})]}),e.notifications.newEvents>0&&(0,n.jsxs)("div",{className:"flex justify-between items-center gap-6",children:[(0,n.jsxs)("div",{className:"flex gap-4 items-center",children:[(0,n.jsx)("div",{className:"flex justify-center items-center rounded-full w-9 h-9 text-white-50 bg-peach-400",children:(0,n.jsx)(o.JO,{name:"calendar"})}),(0,n.jsxs)("p",{className:"text-carbon-800 text-base leading-[20.8px]",children:["Nuevos ",h?"eventos":">",(0,n.jsx)("span",{className:"font-bold",children:" ("+e.notifications.newEvents+")"})]})]}),(0,n.jsxs)(d.z,{size:"small",fill:"clear",children:["Ver ",h?"eventos":">"]})]}),e.notifications.newPosts>0&&(0,n.jsxs)("div",{className:"flex justify-between items-center gap-6",children:[(0,n.jsxs)("div",{className:"flex gap-4 items-center",children:[(0,n.jsx)("div",{className:"flex justify-center items-center rounded-full w-9 h-9 text-white-50 bg-peach-400",children:(0,n.jsx)(o.JO,{name:"pencil"})}),(0,n.jsxs)("p",{className:"text-carbon-800 text-base leading-[20.8px]",children:["Nuevas publicaciones",(0,n.jsx)("span",{className:"font-bold",children:" ("+e.notifications.newPosts+")"})]})]}),(0,n.jsxs)(d.z,{size:"small",fill:"clear",children:["Ver ",h?"publicaciones":">"]})]})]})},t))}):(0,n.jsxs)("div",{className:"bg-white-50 w-full h-full p-6 rounded-lg shadow-[0_2px_8px_0_rgba(0,0,0,0.06)] flex flex-col gap-10 justify-center items-center",children:[(0,n.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,n.jsx)("h5",{className:"text-xl leading-[26px] text-carbon-800 font-bold text-center",children:"A\xfan no sigues a ninguna empresa"}),(0,n.jsx)("p",{className:"text-carbon-700 text-center",children:"Guarda las candidaturas que te llamen la atenci\xf3n y aplica cuando quieras"})]}),(0,n.jsx)(d.z,{children:i("Ver listado de empresas")})]})]}):null}m.getLayout=e=>(0,n.jsx)(i.Z,{children:e}),t.default=(0,a.Z)(m)},68201:function(e,t,s){"use strict";function n(e){let t=new URLSearchParams(e.startsWith("?")?e:"?".concat(e));return t.get("jatoken")||t.get("jaToken")}function a(e){return null!==n(e)}function i(e){var t;let s=null!==(t=e.jatoken)&&void 0!==t?t:e.jaToken;return"string"==typeof s&&s?s:Array.isArray(s)&&s[0]?s[0]:null}s.d(t,{Mi:function(){return i},O:function(){return n},xq:function(){return a}})},90655:function(e,t,s){"use strict";s.d(t,{j:function(){return r}});var n=s(52322),a=s(2784),i=s(15613),l=s(10055);function r(e){let{isVisible:t,title:s,description:r,icon:c="bulletList",className:o="",showCloseButton:d=!0}=e,[u,f]=(0,a.useState)(t);return u?(0,n.jsxs)("div",{className:"flex flex-col p-6 bg-white-50 rounded-lg shadow-[0_2px_8px_0_rgba(0,0,0,0.06)] ".concat(o),children:[d&&(0,n.jsx)("div",{className:"flex justify-end w-full",children:(0,n.jsx)(i.JO,{name:"xMark",onClick:()=>f(!1)})}),(0,n.jsxs)("div",{className:"flex flex-col gap-2 items-center",children:[(0,n.jsx)(l.z,{shape:"rounded",size:"auto",children:(0,n.jsx)(i.JO,{name:c})}),s&&(0,n.jsx)("p",{className:"font-bold text-carbon-800",children:s}),r&&(0,n.jsx)("p",{className:"text-sm text-carbon-700",children:r})]})]}):null}}},function(e){e.O(0,[2699,6753,9774,2888,179],function(){return e(e.s=78806)}),_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.