1import{e as z,x as A,aM as D,C as F,Y as x,u as P,c as o,a as t,d as v,t as r,b as h,w as u,a0 as E,h as _,o as e,l as d,F as m,r as p,z as k,_ as I,k as T,q as b}from"./D8644rYh.js";import{L as w}from"./C6_vMGcy.js";import{u as H}from"./MRLRowXz.js";import"./BlUlAP2D.js";import"./BcAUFxgk.js";import"./BUCShxJ9.js";import"./nOwq7953.js";import"./Dem3fb71.js";import"./GOr6ghrU.js";import"./DyocCgo-.js";import"./Cx9uHq_g.js";const M={class:"container mx-auto px-4 py-10"},O={class:"flex items-center gap-3 uppercase tracking-[0.25em] text-xs font-semibold text-primary-600 dark:text-primary-300"},Y={class:"font-display text-3xl md:text-4xl font-semibold text-dark dark:text-white mt-3"},G={class:"text-grey-text mt-1 mb-8"},J={key:0,class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-x-3 gap-y-6"},K={key:1,role:"alert",class:"text-center py-20"},Q={class:"text-danger"},R={key:2,class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-x-3 gap-y-6"},U={key:3,class:"py-14"},W={class:"text-center"},X={class:"text-grey-text"},Z={class:"font-display text-xl font-semibold text-dark dark:text-white mt-14"}
1,tt={class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6 mt-5"},pt=z({__name:"favoris",async setup(et){let i,c;const $=A(),g=H(),n=D(),{t:C}=F(),{data:L}=([i,c]=x(async()=>_("favoris-suggested",async()=>n.ids.length?[]:(await g("/catalogue/lots",{query:{pageSize:3}})).items??[],{server:!1,default:()=>[]})),i=await i,c(),i),y=b(()=>L.value??[]),{data:N,pending:S,error:j,refresh:B}=([i,c]=x(()=>_("favoris-properties",()=>n.ids.length?g("/catalogue/lots",{query:{ids:n.ids.join(",")}}):Promise.resolve({items:[],total:0,page:1,pageSize:0}),{server:!1,watch:[()=>n.ids.join(",")]})),i=await i,c(),i),f=b(()=>N.value?.items??[]);return P({title:()=>C("favoris.metaTitle")}),(a,s)=>{const V=I,q=E;return e(),o("div",M,[t("p",O,[s[1]||(s[1]=t("span",{class:"h-px w-8 shrink-0 bg-primary-500/70","aria-hidden":"true"},null,-1)),v(" "+r(a.$t("fav.kicker")),1)]),t("h1",Y,r(a.$t("fav.title")),1),h(q,null,{fallback:u(()=>[...s[4]||(s[4]=[t("p",{class:"text-grey-text mt-1 mb-8"},"â¦",-1)])]),default:u(()=>[t("p",G,r(d(n).count)+" "+r(a.$t("fav.saved")),1),d(S)?(e(),o("div",J,[(e(),o(m,null,p(4,l=>t("div",{key:l,class:"animate-pulse"},[...s[2]||(s[2]=[t("div",{class:"h-64 rounded-xl bg-gray-200 dark:bg-white/10"},null,-1),t("div",{class:"h-3.5 w-3/4 rounded bg-gray-200 dark:bg-white/10 mt-3"},null,-1),t("div",{class:"h-3 w-1/2 rounded bg-gray-200 dark:bg-white/10 mt-2"},null,-1)])])),64))])):d(j)?(e(),o("div",K,[t("p",Q,r(a.$t("common.loadError")),1),t("button",{class:"inline-flex mt-6 items-center justify-center px-6 h-11 rounded-full bg-primary-600 hover:bg-primary-500 text-white font-semibold",onClick:s[0]||(s[0]=l=>d(B)())},r(a.$t("common.retry")),1)])):f.value.length?(e(),o("div",R,[(e(!0),o(m,null,p(f.value,l=>(e(),k(w,{key:l.id,lot:l},null,8,["lot"]))),128))])):(e(),o("div",U,[t("div",W,[s[3]||(s[3]=t("div",{class:"text-5xl mb-4","aria-hidden":"true"},"ð¤",-1)),t("p",X,r(a.$t("fav.empty")),1),h(V,{to:d($)("/catalogue"),class:"inline-flex mt-6 items-center justify-center px-6 h-11 rounded-full bg-primary-600 hover:bg-primary-500 text-white font-semibold"},{default:u(()=>[v(r(a.$t("fav.browse"))+" â ",1)]),_:1},8,["to"])]),y.value.length?(e(),o(m,{key:0},[t("h2",Z,r(a.$t("fav.emptySuggest")),1),t("div",tt,[(e(!0),o(m,null,p(y.value,l=>(e(),k(w,{key:l.id,lot:l},null,8,["lot"]))),128))])],64)):T("",!0)]))]),_:1})])}}});export{pt 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.