PageSourceSearch

https://morgenlevering.no/assets/Calendar-D0mJkMb7.js

js morgenlevering.no collected 2026-10-05 03:54:35 UTC 1,673 bytes, 2 lines download raw bytes

1import{a as i,f as j,g as N,dn as k,dp as C,j as e,bV as D,cr as L,h as t,c as Y}from"./index-DnG2B5Nj.js";const w={nb:{available:"Ledig",unavailable:"Ikke levering",noCapacity:"Fullbooket"},en:{available:"Available",unavailable:"No delivery",noCapacity:"Fully booked"}};function R({selectedDeliveryDate:y,setDate:m}){const s=i(a=>a.distribution.dates),u=i(a=>a.distribution.deadline),v=i(a=>a.distribution.deadlineRange),d=j(w),b=N(),r=u??v?.latestDeadline,g=s.length>0?k(s[0].date):0,p=C(b);return e.jsxs("div",{className:"calendar",children:[e.jsx("div",{className:"calendar__days-of-week",children:p.map((a,n)=>e.jsx("div",{className:"calendar__day-of-week",children:a},n))}),e.jsx("div",{className:"calendar__days",children:s.map(({date:a,canDeliver:n,capacityStatus:f},h)=>{const l=D({date:a,canDeliver:n},r),o=!n&&f==="FULL",_=n&&L(a,r),c=t(a).isSame(y,"day"),x=Y({calendar__day:!0,"calendar__day--active":c&&l,"calendar__day--unavailable":!l&&!o&&!_,"calendar__day--no-capacity":o,"calendar__day--deadline-passed":_,[`calendar__day--offset-${g}`]:h===0});return e.jsx("div",{className:x,children:e.jsx("button",{type:"button",disabled:c||!l,onClick:()=>l&&!c&&m(t(a).format("YYYY-MM-DD")),children:t(a).format("D")})},a)})}),e.jsxs("div",{className:"calendar__legend",children:[e.jsx("span",{className:"calendar__legend-item calendar__legend-item--available",children:d.available}),e.jsx("span",{className:"calendar__legend-item calendar__legend-item--unavailable",children:d.unavailable}),e.jsx("span",{className:"calendar__legend-item calendar__legend-item--no-capacity",children:d.noCapacity})]})]})}export{R as C};
2//# sourceMappingURL=Calendar-D0mJkMb7.js.map

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.