1import{d,bj as O,bk as S,n as _,aF as y,ba as C,bb as b,aG as n,bl as v,f as g,bm as L,aH as u,bn as x}from"./client-SG2CFJX7.js";import{B as $}from"./BlockList-CXsw58lP.js";import{B as w,g as P}from"./ButtonCheckbox-Bv7x_ar1.js";import"./JobAdCard-BrNegEQB.js";import"./_setToString-BoLQpde3.js";const B=d({name:"MatomoOptOutForm",components:{ButtonCheckbox:w},data(){return{optedOut:!1}},methods:{isUserOptedOut(){return this.$mixpanel?this.$mixpanel.has_opted_out_tracking():!!O(S)},changeOptedOut(){this.$mixpanel&&(this.optedOut?this.$mixpanel.opt_out_tracking():this.$mixpanel.opt_in_tracking()),window._paq&&(this.optedOut?window._paq.push(["optUserOut"]):window._paq.push(["forgetUserOptOut"]))}},mounted(){this.optedOut=this.isUserOptedOut()}});var M=function(){var e=this,t=e._self._c;return e._self._setupProxy,t("div",{staticClass:"matomo-opt-out-form"},[t("ButtonCheckbox",{staticClass:"matomo-opt-out-form__checkbox",attrs:{value:"optOut"},on:{change:e.changeOptedOut},model:{value:e.optedOut,callback:function(c){e.optedOut=c},expression:"optedOut"}},[e._v(" "+e._s(e.$t("career.consent.matomo-opt-out"))+" ")])],1)},T=[],V=_(B,M,T);const F=V.exports;function N(a){((t,c)=>{const s=document.createElement("script");s.type="text/javascript",s.src=t,s.onload=s.onreadystatechange=function(){(!this.readyState||this.readyState==="complete")&&c()},document.getElementsByTagName("script")[0].parentNode.insertBefore(s,null)})("https://chat-window.kmblabs.com",()=>{KMBotUI.init({projectKey:a})})}const U=d({name:"GenericPage",components:{MatomoOptOutForm:F,BlockList:$},data(){return{page:null,pageLogicValue:null}},async asyncData(a){const e=a.route.params.slug,t=a.route.params.folderSlug;let c,s;try{const o=g(a.app.$pinia),l=o.localizedCareersSite,h=o.careersSite,m=o.rootPages;let i;if(e?i=m.find(p=>p.slug===e):i=m.find(p=>p.logic_value==="company_link"),t){const p=l.navigation_links.find(r=>L(r)&&r.slug===t);if(!p)throw u({statusCode:404,message:"Not found"});i=p.items.map(r=>{const f=l?.pages.find(k=>k.id===r.page_id);return{...r,...f}}).find(r=>r.slug===e)}if(!i)throw u({statusCode:404,message:"Not found"});c=await P(a.app,l,h,i.id,i.logic_value),o.pageId=i.id,s=i.logic_value}catch(o){throw x(o)?o:u({statusCode:500,message:"Server error"})}return{page:c,pageLogicValue:s}},computed:{titleClass(){return["legal_link","cookies_link","accessibility_link"].includes(this.pageLogicValue)?"page__title":"sr-only"},careersSiteStore(){return g(this.$pinia)},careersSite(){return this.careersSiteStore.careersSite},domainName(){return this.careersSiteStore.domainName},pageTitle(){return this.page?.name?this.page.name:this.page?.meta?.title&&this.page.meta.title.split("|").shift()||""},blocks(){return this.page?this.page.blocks:[]},isCookiesPage(){return this.pageLogicValue===n.CookiesLink},displayMatomoOptOutForm(){return this.isCookiesPage&&(!!this.$mixpanel||v())},pageViewProperties(){const a={domain:this.domainName,page_type:"Custom"};return this.page?{...a,current_page_title:this.page.meta.title}:a},mainClass(){switch(this.pageLogicValue){case n.CookiesLink:return"cookies-page";case n.AccessibilityLink:return"accessibility-page";case n.LegalLink:return"legal-page";case n.CompanyLink:return"company-page";case n.PrivacyLink:return"privacy-page";case n.CustomLink:return"custom-page"}}},mounted(){this.$mixpanel?.track_pageview(this.pageViewProperties),this.$nextTick(C),this.$nextTick(b),this.careersSite?.is_chatbot_visible&&this.careersSite?.kmb_product_key&&this.$nextTick(()=>N(this.careersSite.kmb_product_key))},head(){if(this.page)return y(this.domainName,this.$route.params.slug?this.$route.path:"/",this.page.meta)}});var E=function(){var e=this,t=e._self._c;return e._self._setupProxy,t("main",{staticClass:"page__container slug",class:e.mainClass?e.mainClass:"",attrs:{role:"main"}},[e.pageLogicValue!="company_link"?t("div",{class:{page__header:e.pageLogicValue!="custom_link"}},[t("h1",{class:e.titleClass},[e._v(" "+e._s(e.pageTitle)+" ")])]):e._e(),t("BlockList",{attrs:{extended:e.careersSite&&e.careersSite.is_extended,blocks:e.blocks}}),t("client-only",[e.displayMatomoOptOutForm?t("div",{staticClass:"consent-block html-block"}
1,[t("MatomoOptOutForm")],1):e._e()])],1)},D=[],K=_(U,E,D);const A=K.exports;export{A as default};
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.