1import{E as h,aw as C,b as _,bE as P,aE as R,O as b,f as w,W as x,bM as I,R as E,aO as O,c3 as B,c as K,bG as U,o as A,h as a,r as g}from"./Cl3Xr5BD.js";import{p}from"./D5uXLkT1.js";import{u as S}from"./B8WL8bZ9.js";function T(){const{apiClient:d}=h(),{sessionContext:t}=C();async function s(e){if(e==="/")return{routeName:"frontend.navigation.page",foreignKey:t.value?.salesChannel?.navigationCategoryId};const n=e.startsWith("/navigation/")||e.startsWith("/detail/")||e.startsWith("/landingPage/"),u=n?e:e.substring(1);return(await d.invoke("readSeoUrl post /seo-url",{body:{filter:[{type:"equals",field:n?"pathInfo":"seoPathInfo",value:u}]}})).data.elements?.[0]}return{resolvePath:s}}const W="errors/RoutingNotFound",M=_({name:"PageResolver",__name:"[...all]",async setup(d){let t,s;const{clearBreadcrumbs:e}=P(),{resolvePath:n}=T(),u=R(),{locale:c}=b(),o=u.path.replace(new RegExp(`^/${c.value}/?`),"/").replace("//","/"),f=w(()=>o==="/404"),{data:m}=([t,s]=x(async()=>U(`cmsResponse${o}`,async()=>history.state?.routeName?{routeName:history.state?.routeName,foreignKey:history.state?.foreignKey}:await n(o))),t=await t,s(),t);if(!m.value?.foreignKey&&!f.value)throw console.error("[...all].vue]: No data found for",o,c.value),I({statusCode:404,statusMessage:`No data fetched from API for ${o}`});f.value&&(E().payload.statusCode=404,O({title:"404 - Page Not Found",meta:[{name:"robots",content:"noindex, follow"}]}));const{routeName:v,foreignKey:y}=S(m),l=v.value;B(()=>{e()});function N(){if(!l)return a("div",a(g(p(W))));const r=p(l),i=v&&g(r);return i?i===r?a("div",{},`Problem resolving component: ${l}`):a("div",a(i,{navigationId:y.value})):a("div",{},"Loading...")}return(r,i)=>(A(),K(N))}});export{M 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.