(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[800],{11859:(e,t,n)=>{Promise.resolve().then(n.bind(n,33199))},77711:(e,t,n)=>{"use strict";n.d(t,{default:()=>l.a});var r=n(21956),l=n.n(r)},76046:(e,t,n)=>{"use strict";var r=n(66658);n.o(r,"useSearchParams")&&n.d(t,{useSearchParams:function(){return r.useSearchParams}}),n.o(r,"useServerInsertedHTML")&&n.d(t,{useServerInsertedHTML:function(){return r.useServerInsertedHTML}})},21956:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return l}});let r=n(60306)._(n(30580));function l(e,t){var n;let l={};"function"==typeof e&&(l.loader=e);let a={...l,...t};return(0,r.default)({...a,modules:null==(n=a.loadableGenerated)?void 0:n.modules})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},39827:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSR",{enumerable:!0,get:function(){return l}});let r=n(93719);function l(e){let{reason:t,children:n}=e;if("undefined"==typeof window)throw new r.BailoutToCSRError(t);return n}},30580:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i}});let r=n(95155),l=n(12115),a=n(39827),o=n(79214);function s(e){return{default:e&&"default"in e?e.default:e}}let u={loader:()=>Promise.resolve(s(()=>null)),loading:null,ssr:!0},i=function(e){let t={...u,...e},n=(0,l.lazy)(()=>t.loader().then(s)),i=t.loading;function d(e){let s=i?(0,r.jsx)(i,{isLoading:!0,pastDelay:!0,error:null}):null,u=!t.ssr||!!t.loading,d=u?l.Suspense:l.Fragment,c=t.ssr?(0,r.jsxs)(r.Fragment,{children:["undefined"==typeof window?(0,r.jsx)(o.PreloadChunks,{moduleIds:t.modules}):null,(0,r.jsx)(n,{...e})]}):(0,r.jsx)(a.BailoutToCSR,{reason:"next/dynamic",children:(0,r.jsx)(n,{...e})});return(0,r.jsx)(d,{...u?{fallback:s}:{},children:c})}return d.displayName="LoadableComponent",d}},79214:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadChunks",{enumerable:!0,get:function(){return s}});let r=n(95155),l=n(47650),a=n(75861),o=n(18284);function s(e){let{moduleIds:t}=e;if("undefined"!=typeof window)return null;let n=a.workAsyncStorage.getStore();if(void 0===n)return null;let s=[];if(n.reactLoadableManifest&&t){let e=n.reactLoadableManifest;for(let n of t){if(!e[n])continue;let t=e[n].files;s.push(...t)}}return 0===s.length?null:(0,r.jsx)(r.Fragment,{children:s.map(e=>{let t=n.assetPrefix+"/_next/"+(0,o.encodeURIPath)(e);return e.endsWith(".css")?(0,r.jsx)("link",{precedence:"dynamic",href:t,rel:"stylesheet",as:"style"},e):((0,l.preload)(t,{as:"script",fetchPriority:"low"}),null)})})}},21576:(e,t,n)=>{"use strict";n.d(t,{j:()=>a,w:()=>l});var r=n(82651);async function l(){try{let e=await r.A.get("".concat("https://undefined-api.undefined.co.th:4439/api/","frontend/jobReq/getJobOpenings"));if(e.data.status)return e.data.data;return[]}catch(e){return console.error("Error fetching jobs:",e),[]}}async function a(e){try{let t=await r.A.get("".concat("https://undefined-api.undefined.co.th:4439/api/","frontend/jobReq/getJobOpeningById/").concat(e));if(t.data.status)return t.data.data;return null}catch(e){return console.error("Error fetching job position:",e),null}}},33199:(e,t,n)=>{"use strict";n.d(t,{default:()=>c});var r=n(95155),l=n(12115),a=n(77711),o=n(76046),s=n(72093),u=n(21576);let i=(0,a.default)(()=>Promise.all([n.e(5592),n.e(8173),n.e(7913),n.e(4718),n.e(5922),n.e(5300)]).then(n.bind(n,25300)),{loadableGenerated:{webpack:()=>[25300]},ssr:!1}),d=(0,a.default)(()=>Promise.all([n.e(5592),n.e(8173),n.e(7913),n.e(4718),n.e(5922),n.e(1846)]).then(n.bind(n,21846)),{loadableGenerated:{webpack:()=>[21846]},ssr:!1}),c=()=>{let e=(0,o.useSearchParams)(),t=null==e?void 0:e.get("id"),[n,a]=l.useState(null),[c,f]=l.useState(!0);return(l.useEffect(()=>{(async()=>{if(t)try{let e=await (0,u.j)(t);a(e)}catch(e){console.error("Failed to fetch job position:",e)}finally{f(!1)}})()},[t]),c)?(0,r.jsx)("div",{className:"h-screen w-full flex items-center justify-center bg-black",children:(0,r.jsx)(s.A,{size:"large"})}):(0,r.jsxs)(r.Fragment,{children:[n&&(0,r.jsx)(i,{jobPosition:n,id:t||""}),n&&(0,r.jsx)(d,{jobPosition:n,id:t||""})]})}}},e=>{var t=t=>e(e.s=t);e.O(0,[2723,2093,2651,8441,1517,7358],()=>t(11859)),_N_E=e.O()}]);