PageSourceSearch

https://www.turijobs.com/_next/static/chunks/pages/search-offer/[[...slug]]-3590675396be3cdb.js

js turijobs.com collected 2026-10-02 13:09:45 UTC 10,972 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1556],{28840:function(e,t,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/search-offer/[[...slug]]",function(){return l(32051)}])},32051:function(e,t,l){"use strict";l.r(t),l.d(t,{Index:function(){return S},__N_SSP:function(){return T}});var o,n=l(52322),i=l(45484),a=l(11122),r=l(2784),u=l(4102),s=l(76413),d=l(94449),c=l(5632),v=l(98843),p=l(23950),m=l(56133),f=l(25035),h=l(45847),g=l.n(h);let b=e=>null!==(o=s.mt.path[e])&&void 0!==o?o:"",y={"valencia-valencia":"valencia",islasbaleares:"palma-de-mallorca",balearen:"palma-de-mallorca","palmademallorca-mallorca":"palma-de-mallorca",palma:"mallorca",majorca:"palma-de-mallorca"};var T=!0;function S(e){var t,l,o;let{params:i,salaryData:s,searchData:h,seo:T,currentPage:S,homeData:w,selectedOfferId:j,initialSortOption:I}=e,N=(0,d.I0)(),_=(0,d.v9)(u.DYR),O=(0,d.v9)(u.PRA),{t:A,i18n:{language:L}}=(0,a.$G)("common"),x=(0,c.useRouter)(),[P,k]=(0,r.useState)(h),[R,C]=(0,r.useState)(s),[q,V]=(0,r.useState)(w),[D,M]=(0,r.useState)(!1),K=(0,r.useRef)(null),[Z]=(0,u.xwF)();(0,r.useEffect)(()=>{k(h),M(!1)},[h]),(0,r.useEffect)(()=>{V(w)},[w]);let[J,{data:Q,isLoading:U,isError:H}]=(0,u.Uwf)();(0,r.useEffect)(()=>{!_||(null==O?void 0:O.userId)||N((0,u.Blz)())},[]),(0,r.useEffect)(()=>{var e;let t=e=>{try{let t=new URL(e);return t.pathname}catch(l){let t=e.match(/^https?:\/\/[^/]+(\/[^?#]*)/);return t?t[1]:e.split("?")[0].split("#")[0]}},l=()=>{let e=m.KK.getItem("searchPanelScrollPosition"),l=m.KK.getItem("searchPanelUrl");if(!e||!l)return!1;let o=t(window.location.href),n=t(l);if(o===n){let t=parseInt(e,10);if(!isNaN(t)){let e=()=>{window.scrollTo({top:t,behavior:"auto"})};return setTimeout(e,0),setTimeout(e,50),setTimeout(e,100),setTimeout(e,200),setTimeout(e,300),setTimeout(e,500),setTimeout(e,800),!0}}return!1},o=()=>{let e=m.KK.getItem("restoreScrollPosition");if(e){let t=parseInt(e,10);if(!isNaN(t)){window.scrollTo({top:t,behavior:"auto"}),m.KK.removeItem("restoreScrollPosition");return}}l()},n=()=>{o()};n(),setTimeout(n,0),setTimeout(n,50),setTimeout(n,100),setTimeout(n,200),setTimeout(n,300),setTimeout(n,500),setTimeout(n,800),"complete"===document.readyState?n():(window.addEventListener("load",n,{once:!0}),document.addEventListener("DOMContentLoaded",n,{once:!0}));let i=e=>{setTimeout(()=>{l()},0),setTimeout(()=>{l()},100),setTimeout(()=>{l()},300)},a=()=>{setTimeout(()=>{l()},0),setTimeout(()=>{l()},100),setTimeout(()=>{l()},300)},r=()=>{setTimeout(()=>{l()},0),setTimeout(()=>{l()},100),setTimeout(()=>{l()},300)};return window.addEventListener("pageshow",i),window.addEventListener("popstate",a),null===(e=x.events)||void 0===e||e.on("routeChangeComplete",r),()=>{var e;window.removeEventListener("pageshow",i),window.removeEventListener("popstate",a),null===(e=x.events)||void 0===e||e.off("routeChangeComplete",r)}},[x]);let[z,B]=(0,r.useState)(null),{data:F,isLoading:G}=(0,u.MEz)(z,{skip:!(null==z?void 0:z.jobTitleId)}),X=(0,r.useCallback)(e=>b(L).replace("/:slug*",e),[L]),[Y,W]=(0,r.useState)(null!=S?S:1),[$,ee]=(0,r.useState)(null!=I?String(I):void 0),et=(0,r.useRef)(null);(0,r.useEffect)(()=>{let e=x.query.sort;if(void 0!==e){let t=String(e);ee("0"===t?void 0:t)}else ee(void 0)},[x.query.sort]);let el="",eo=null===(t=u.zI_.find(e=>e.locale===L))||void 0===t?void 0:t.language;eo&&(null==P?void 0:P.urls)&&P.urls[eo]&&(el=(0,p.Tr)(L,b(L).replace("/:slug*",P.urls[eo])));let en=E(L,null==P?void 0:P.facets);(0,r.useEffect)(()=>{var e,t;if(null==h?void 0:null===(e=h.job)||void 0===e?void 0:e.id){let e={jobTitleId:h.job.id};(null==h?void 0:null===(t=h.location)||void 0===t?void 0:t.id)&&(e.cityId=h.location.id),B(e)}},[h]);let ei=e=>{var t,l;if(!(null==e?void 0:null===(t=e.job)||void 0===t?void 0:t.id)){C({hasData:!1}),B(null);return}let o={jobTitleId:e.job.id};(null==e?void 0:null===(l=e.location)||void 0===l?void 0:l.id)&&(o.cityId=e.location.id),B(o)};(0,r.useEffect)(()=>{if(!U&&Q){var e,t,l;let o=null===(e=u.zI_.find(e=>e.locale===L))||void 0===e?void 0:e.language;if(o&&(null===(t=Q.urls)||void 0===t?void 0:t[o])){let e=Q.urls[o],t=e.split("/").map(e=>null!==(l=y[e])&&void 0!==l?l:e).join("/"),n=t!==e,i=X(t),[a,r]=i.split("?"),u=new URLSearchParams(r||""),s=new URLSearchParams;Y>1&&s.set("page",String(Y)),null!=$&&"0"!==$&&s.set("sort",String($)),u.forEach((e,t)=>{"page"!==t&&"sort"!==t&&s.set(t,e)});let d=s.toString();n&&M(!0),x.replace({pathname:a,query:d?Object.fromEntries(s.entries()):{}},void 0,{scroll:!1,shallow:!n}),n||(k(Q),ei(Q))}else{let e=b(L).replace("/:slug*",""),t=(0,p.Tr)(L,e),l={};Y>1&&(l.page=String(Y)),null!=$&&"0"!==$&&(l.sort=String($)),x.replace({pathname:t,query:l},void 0,{scroll:!1,shallow:!0}),k(Q),ei(Q)}}},[U,Q,$,Y]),(0,r.useEffect)(()=>{var e,t,l,o,n,i,a,r,u,s,d;if(U||!Q)return;if(0!==Q.total){K.current=null;return}if(q&&"object"==typeof q&&((null!==(a=null===(t=q.topJobTitle)||void 0===t?void 0:t.length)&&void 0!==a?a:0)>0||(null!==(r=null===(l=q.topRegion)||void 0===l?void 0:l.length)&&void 0!==r?r:0)>0||(null!==(u=null===(o=q.topCity)||void 0===o?void 0:o.length)&&void 0!==u?u:0)>0||(null!==(s=null===(n=q.topSector)||void 0===n?void 0:n.length)&&void 0!==s?s:0)>0||(null!==(d=null===(i=q.topArea)||void 0===i?void 0:i.length)&&void 0!==d?d:0)>0)||K.current===Q)return;K.current=Q;let c=null!==(e=x.locale)&&void 0!==e?e:L;Z(c).unwrap().then(e=>{V(e)}).catch(e=>{console.error("Failed to fetch home data for empty search:",e),K.current===Q&&(K.current=null)})},[q,U,L,x.locale,Q,Z]),(0,r.useEffect)(()=>
1{if(F&&P){var e,t,l,o,n,i,a;let r=0,u=null==F?void 0:null===(e=F.monthlySalariesAverage)||void 0===e?void 0:e[0];u&&(r=Math.round((u.averageSalaryMin+u.averageSalaryMax)/2));let s={average:r,min:null!==(o=null==u?void 0:u.averageSalaryMin)&&void 0!==o?o:0,max:null!==(n=null==u?void 0:u.averageSalaryMax)&&void 0!==n?n:0,jobTitle:null!==(i=(null==F?void 0:F.titleName)||(null==P?void 0:null===(t=P.job)||void 0===t?void 0:t.label))&&void 0!==i?i:null,location:null!==(a=(null==F?void 0:F.cityName)||(null==P?void 0:null===(l=P.location)||void 0===l?void 0:l.label))&&void 0!==a?a:null,hasData:!!u};C(s)}},[F,P]);let ea=async e=>{(null==e?void 0:e.page)&&W(e.page),(null==e?void 0:e.sortOption)!==void 0&&ee(e.sortOption);let t={page:(null==e?void 0:e.page)||Y,filterValues:(null==e?void 0:e.filterValues)||{},keyword:(null==e?void 0:e.keyword)||"",denominationId:null==e?void 0:e.jobDenominationId,sortOption:null==e?void 0:e.sortOption},l=(0,f.vp)(t),o=await J(l);o&&"data"in o&&o.data&&ei(o.data)},er=async e=>{if(await ea(e),null==e?void 0:e.page){let e=document.querySelector("section");e&&e.scrollIntoView({behavior:"smooth",block:"start"})}},eu=async e=>{var t,l;let o=(0,f.vp)({page:1,filterValues:(null==e?void 0:e.filterValues)||{},keyword:(null==e?void 0:e.keyword)||"",denominationId:null==e?void 0:e.jobDenominationId}),n=await (0,u.Imk)(L,o,!0);null===(t=et.current)||void 0===t||t.updatePreSearchTotal(null!==(l=null==n?void 0:n.total)&&void 0!==l?l:0)},es=A("searchJob.subtitle");return(0,n.jsxs)(n.Fragment,{children:[Array.isArray(null==h?void 0:h.faqs)&&h.faqs.length>0&&(0,n.jsx)(g(),{id:"google-faqs",strategy:"beforeInteractive",type:"application/ld+json",children:'{\n              "@context": "https://schema.org/",\n              "@type": "FAQPage",\n                "mainEntity": ['.concat(h.faqs.map(e=>'\n                  {\n                      "@type": "Question",\n                      "name": '.concat(JSON.stringify(e.question),',\n                      "acceptedAnswer": {\n                        "@type": "Answer",\n                        "text": ').concat(JSON.stringify(e.answer),"\n                      }\n                  }")),"\n              ]\n            }")}),(0,n.jsx)(g(),{id:"google-breadcrumbs",strategy:"beforeInteractive",type:"application/ld+json",children:'{\n                    "@context": "https://schema.org/",\n                    "@type": "BreadcrumbList",\n                     "itemListElement": ['.concat(en.map((e,t)=>'\n                        {\n                            "@type": "ListItem",\n                            "position": '.concat(t+1,',\n                            "name": ').concat(JSON.stringify(e.text),',\n                            "item": "').concat(e.url,'"\n                        }')),"\n                    ]\n                }")}),(0,n.jsx)(v.Z,{searchResult:P,isLoadingSearch:U||D,isError:H,searchParamsChanged:er,preSearchParamsChanged:eu,page:Y,title:T.header,subtitle:es,salaryData:R,job:String(null!==(o=null===(l=x.query)||void 0===l?void 0:l.job)&&void 0!==o?o:""),homeData:q,ref:et,baseUrl:el,idValues:(e=>{let t=null!=e?e:h;return(null==t?void 0:t.facets)?Object.fromEntries(t.facets.filter(e=>e.values.some(e=>e.isSelected)).map(e=>[e.id.toString(),e.values.filter(e=>e.isSelected).map(e=>e.id)])):{}})(null!=P?P:h),initialSelectedOfferId:j,initialSortOption:void 0!==$?Number($):void 0})]})}let w=(e,t,l)=>a.ag.t(t,{ns:"seo",lng:e,...l}),E=(e,t)=>{let l=b(e).replace(":slug*",""),o=[{text:s.dZ.label[e],url:(0,p.Tr)(e,"/")}];o.push({text:w(e,"breadcrumb.search"),url:(0,p.Tr)(e,l)});let n=I(u.QaA.CITY,t),i=I(u.QaA.REGION,t),a=I(u.QaA.AREA,t),r=I(u.QaA.JOB_POSITION,t);return i||n?n?r?(o.push(j(e,r,null)),i&&o.push(j(e,r,i)),o.push(j(e,r,n))):(i&&o.push(j(e,null,i)),o.push(j(e,null,n))):r?(o.push(j(e,r,null)),o.push(j(e,r,i))):o.push(j(e,null,i)):r&&(a&&o.push(j(e,null,a)),o.push(j(e,r,null))),o},j=(e,t,l)=>t&&l?{text:w(e,"breadcrumb.search_jobtitle_location",{jobtitle:t.label,location:l.label}),url:(0,p.Tr)(e,b(e).replace(":slug*","".concat(t.key,"/").concat(l.key)))}:t?{text:w(e,"breadcrumb.search_jobtitle",{jobtitle:t.label}),url:(0,p.Tr)(e,b(e).replace(":slug*",t.key))}:{text:w(e,"breadcrumb.search_location",{location:l.label}),url:(0,p.Tr)(e,b(e).replace(":slug*",l.key))},I=(e,t)=>{var l;let o=null==t?void 0:t.find(t=>
1t.id==e);return null==o?void 0:null===(l=o.values)||void 0===l?void 0:l.find(e=>e.isSelected)};t.default=(0,i.Z)(S)},25035:function(e,t,l){"use strict";l.d(t,{W2:function(){return n},vp:function(){return i}});var o=l(65992);let n=(e,t)=>{if(null!=e&&e>0)return{orderType:o.ZH.RELEVANT,matching:{[o.Q.JOB_DENOMINATION.toString()]:{values:[e]}}};let l=Number(t),n=[o.ZH.RELEVANT,o.ZH.MOST_RECENT,o.ZH.MOST_POPULAR],i=n.includes(l)?l:o.ZH.RELEVANT;return{orderType:i,matching:null}},i=e=>{let{page:t=1,queryValues:l=[],queryParams:o={},filterValues:i={},keyword:a="",denominationId:r,sortOption:u,userId:s=null}=e,d=Array.isArray(l)?l:l?[l]:[],c=n(r,u),v=a;if(!v&&o){let e=[];o.job&&"string"==typeof o.job&&e.push(o.job.trim()),o.location&&"string"==typeof o.location&&e.push(o.location.trim()),v=e.filter(e=>e.length>0).join(" ").trim()}let p={userId:s,page:{index:t},filter:{idValues:i,queryValues:d,queryParams:o,...v&&{keyword:v}},orderBy:c};return p}}},function(e){e.O(0,[4304,6812,3094,6262,4789,6753,4116,6672,9e3,2391,2342,6671,8648,8843,9774,2888,179],function(){return e(e.s=28840)}),_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.