1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1928],{99547:(e,t,n)=>{n.r(t),n.d(t,{default:()=>b});var r=n(60143),o=n(45159),i=n(91167),s=n(62715),a=n(63233),l=n(54504),d=n(55404),c=n(3522),m=n(85406),u=n(49303),f=n(65575),g=n(79179),p=g.object({companyLogo:g.string().nullable(),companyName:g.string(),createdAt:g.string(),employerProfile:g.object({companyName:g.string(),logoUrl:g.string().nullable()}),featured:g.boolean(),title:g.string(),uuid:g.string(),workAddress:g.object({properties:g.object({country:g.string(),label:g.string(),municipality:g.string().optional(),neighborhood:g.string().optional(),postalCode:g.string().optional(),region:g.string().optional(),street:g.string().optional(),timeZone:g.object({name:g.string(),offset:g.number()})}),text:g.string()}),workLocation:g.string()}),h=n(65019);function y(e){var t=e.limit,n=e.offset,g=e.stickyFeatured,y=(0,s.GV)(function(e){return e.conf}),b=y.latitude,x=y.longitude,w=(0,s.GV)(function(e){return e.settings}).staticUrl,_=(0,s.GV)(function(e){return e.features.businessProfiles}),j=(0,i._)((0,o.useState)([]),2),v=j[0],k=j[1],N=(0,c.S_)();return((0,l.H5)(function(){return null!=b&&null!=x&&_.enabled&&_.data.radius&&(function(e){return(0,m._)(function(e){var t,n,r,o,i,s,a,l,d;return(0,u.YH)(this,function(c){switch(c.label){case 0:var g;return t=e.distance,n=e.latitude,r=e.limit,o=e.longitude,i=e.offset,s=e.stickyFeatured,[4,(g={query:'\nquery getListings (\n $distance: Float! = 5000000,\n $expiredBefore: timestamptz = "now()",\n $from: geography!,\n $limit: Int = 2,\n $offset: Int = 0,\n $orderBy: [listings_order_by]!,\n) {\n listings (\n limit: $limit,\n offset: $offset,\n where: {\n _and: [\n {\n deleted: {\n _eq: false\n }\n },\n {\n published: {\n _eq: true\n }\n },\n {\n expired_at: {\n _gt: $expiredBefore\n }\n },\n {\n geo: {\n _st_d_within: {\n distance: $distance,\n from: $from\n }\n }\n },\n ]\n },\n order_by: $orderBy\n ) {\n uuid\n createdAt: created_at\n featured\n title\n companyName: company_name\n companyLogo: company_logo\n workAddress: work_address\n workLocation: work_location\n employerProfile: employer_profile {\n companyName: company_name\n logoUrl: logo_url\n }\n }\n}',variables:{distance:t,expiredBefore:"now()",from:JSON.stringify({coordinates:[o,n],type:"Point"}),limit:r,offset:i,orderBy:s?[{featured:"desc"},{created_at:"desc"}]:[{created_at:"desc"},{featured:"desc"}]}},(0,m._)(function(){var e;return(0,u.YH)(this,function(t){switch(t.label){case 0:return[4,fetch("https://plycrhcbbwiargbgsvvr.graphql.ap-southeast-1.nhost.run/v1",{body:JSON.stringify(g),method:"POST"})];case 1:if(!(e=t.sent()).ok)throw Error("An error occured: ".concat(e.status));return[4,e.json()];case 2:return[2,t.sent()]}})})())];case 1:if("errors"in(l=c.sent()))throw Error("ViewJobs graphql api error: ".concat(JSON.stringify(l.errors)));if(!Array.isArray(d=null==l||null==(a=l.data)?void 0:a.listings))return[2,[]];return[2,d.flatMap(function(e){var t=p.safeParse(e);return t.success?[t.data]:(console.error("API Schema Mismatch - Listing dropped:",f.Ay$.treeifyError(t.error)),[])})]}})}).apply(this,arguments)})({distance:1e3*_.data.radius,latitude:b,limit:t,longitude:x,offset:n-1,stickyFeatured:g}).then(function(e){return k(e)}).catch(console.error),!0},[_,b,t,x,n,g]),(0,o.useEffect)(function(){v.length&&v.forEach(function(e){return(0,a.qE)({action:"impression",label:e.title||"",trigger:"viewjobs_listing_impression"})})},[v]),v.length)?(0,r.jsxs)("div",{className:"mb-5 rounded-md border border-gray-300 px-4 py-6 shadow-sm @md:px-10",children:[(0,r.jsx)("h2",{className:"mb-6 text-xl font-semibold",children:"Jobs in the area"}),(0,r.jsx)("div",{className:"grid divide-y-1 @md:grid-flow-row @md:grid-cols-2 @md:gap-y-6 @md:divide-y-0",children:v.map(function(e){var t,n,o="/jobs/listing/".concat(e.uuid),i=e.companyLogo||e.employerProfile.logoUrl||"https://cdn.newsnow.io/b5N3njmU7ggEmuQMNaxVEM/fe6c0fae-3a24-4ec7-a6f4-faee4d56d6d8.svg",s=null!=(t=e.companyName)?t:e.employerProfile.companyName,l=e.workAddress.properties.region?(null==(n=d.xP[e.workAddress.properties.region.toLowerCase()])?void 0:n.toLocaleUpperCase())||e.workAddress.properties.region:void 0,m=[e.workAddress.properties.municipality,l].filter(
1Boolean).join(", "),u=(0,c.fF)(N,new Date(e.createdAt),{beyondMaxFormat:e=>e.toLocaleString("en-AU",{day:"numeric",month:"short"}),maxTime:604800});return(0,r.jsxs)(h.A,{className:"flex flex-row gap-x-4 py-6 first:pt-0 @md:border-l-1 @md:py-0 @md:odd:border-l-0 @md:odd:pr-5 @md:even:pl-5","data-testid":"viewjobs-link",href:o,linkStyle:"index",onClick:function(){(0,a.qE)({label:e.title||"",trigger:"viewjobs_listing_click"})},target:"_blank",children:[(0,r.jsxs)("div",{className:"flex grow flex-col gap-y-2",children:[(0,r.jsx)("h3",{className:"text-sm font-semibold",children:e.title}),!!s&&(0,r.jsx)("div",{className:"text-sm font-medium",children:s}),(0,r.jsxs)("div",{className:"flex flex-row flex-wrap items-baseline gap-x-1.5 text-sm leading-5 text-gray-600 @md:gap-x-3.5 @md:text-xs",children:[m&&(0,r.jsxs)(r.Fragment,{children:[m," ",(0,r.jsx)("span",{className:"text-sm @md:text-gray-900",children:"â¢"})," "]}),(0,r.jsx)("span",{children:u})]})]}),(0,r.jsx)("img",{alt:s||"",className:"size-20 rounded-md object-contain object-top",height:"80",src:i,width:"80"})]},e.uuid)})}),(0,r.jsxs)(h.A,{className:"mt-8 flex gap-x-2 text-sm font-medium",href:"/jobs",linkStyle:"index",target:"_blank",children:["More Jobs at ",(0,r.jsx)("img",{alt:"ViewJobs",src:"".concat(w,"images/viewjobs/logos/viewjobs-logo-full.svg"),width:"90"})]})]}):null}let b=function(e){var t=e.zoneItemData,n=t.limit,o=t.offset,i=t.stickyFeatured;return(0,r.jsx)("div",{className:"@container",children:(0,r.jsx)(y,{limit:n,offset:o,stickyFeatured:i})})}}}]);
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.