1import{z as N,c7 as c}from"#entry";import{t as g,E as i}from"./BZS6mqMC.js";const d={ch:"switzerland",li:"liechtenstein",at:"austria",de:"germany",gb:"united kingdom",fr:"france",it:"italy",es:"spain",pl:"poland",ro:"romania",sk:"slovakia",hr:"croatia"};function f(t,s){const e=t==null?void 0:t[s];return e?e.multiSelect?e.values:[e.values]:[]}function Q(t,s){const e=f(t==null?void 0:t.attributes,"countriesQuantityRestriction").filter(Boolean).map(p=>String(p.value??p.label??"").toLowerCase());if(!e.length)return c;const l=d[s]??"";if(!l||!e.includes(l))return c;const o=f(t==null?void 0:t.attributes,"maxQuantityPerPurchase")[0],a=o?parseInt(String(o.label??o.value??""),10):NaN;return isNaN(a)||a<=0?c:a}function h(t){const s=g(t),e=N(),l=i(()=>{var n,u;return((u=(((n=e.value)==null?void 0:n.locale)??"").split("-")[1])==null?void 0:u.toLowerCase())??""}),y=i(()=>{var r;return f((r=s.value)==null?void 0:r.attributes,"countriesQuantityRestriction").filter(Boolean).map(n=>String(n.value??n.label??"").toLowerCase())}),o=i(()=>{var m;const n=f((m=s.value)==null?void 0:m.attributes,"maxQuantityPerPurchase")[0],u=n?parseInt(String(n.label??n.value??""),10):NaN;return isNaN(u)||u<=0?c:u}),a=i(()=>
1{if(!y.value.length)return!1;const r=d[l.value]??"";return!!r&&y.value.includes(r)});return{effectiveMaxQuantity:i(()=>a.value?o.value:c),isCountryRestricted:a}}export{Q as g,h as u};
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.