PageSourceSearch

https://micrology.com.au/cdn/shop/t/14/assets/MenuNavAdvancedItem-KBosfO8T.js?v=132049264125964006201785994606

js micrology.com.au collected 2026-10-08 08:51:48 UTC 10,089 bytes, 2 lines download raw bytes

1import{j as e}from"./TextContent-Cf8x2fCZ.js";import{r as b}from"./index-BlmOqGMO.js";import{b as N}from"./helpers-Bug6MyG5.js";import{u as y}from"./menu-state-Dy9h2Ehn.js";import{r as v}from"./ArrowRight.es-DPiBWhxg.js";import{A as u,m as h}from"./proxy-BbvVhzT2.js";import"./index-yBjzXJbu.js";import"./react-P8DYObfW.js";import"./IconBase.es-N0ZVnnNC.js";function O({label:r,featured_link_label:n,featured_link_url:l,items:t,openSubNavId:a,setOpenSubNavId:s}){let{activeMenu:i,setActiveMenu:c}=y();const o=b.useRef(null),j=N(t),f=a===r,m=()=>{o.current&&(clearTimeout(o.current),o.current=null),c(r)},d=()=>{o.current=setTimeout(()=>{c(null)},100)},g=()=>{s(f?null:r)};return e.jsxs(e.Fragment,{children:[e.jsx("button",{onMouseEnter:m,onMouseLeave:d,className:`hidden px-2 uppercase md:flex md:gap-2 md:items-center lg:px-4 focus:outline-none ${i===r?"text-blue fill-blue":""}`,children:e.jsx("span",{children:r})}),e.jsx(u,{children:i===r&&e.jsxs(h.div,{onMouseEnter:m,onMouseLeave:d,initial:{opacity:1,y:-20,maxHeight:0},animate:{opacity:1,y:0,maxHeight:"100vh"},exit:{opacity:1,y:-10,maxHeight:0},transition:{duration:.4,ease:[.4,0,.2,1],opacity:{duration:.3},maxHeight:{duration:.4,ease:[.4,0,.2,1]}},className:"hidden overflow-hidden absolute left-0 top-full z-[-1] grid-cols-2 w-full bg-white md:grid",children:[e.jsx(w,{blocks:t}),e.jsx("a",{href:l,className:"flex transition-all duration-300 hover:bg-[#FFFFFF] col-span-2 justify-center items-center text-center uppercase border-black border-y h-header bg-pink",children:n})]})}),e.jsx(u,{children:i===r&&e.jsx(h.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},transition:{duration:.3,ease:[.4,0,.2,1]},className:"hidden absolute left-0 top-full z-[-2] w-full h-screen backdrop-blur-md pointer-events-none md:block bg-white/40"})}),e.jsx("button",{className:"md:hidden",onClick:g,children:e.jsxs("span",{className:"flex gap-2 justify-center items-center px-3 uppercase border-b border-black focus:outline-none h-header-mobile",children:[r,e.jsx(v,{size:16,weight:"bold"})]})}),e.jsx(u,{children:f&&e.jsx(h.div,{initial:{x:"-100%"},animate:{x:0},exit:{x:"-100%"},transition:{duration:.3,ease:[.4,0,.2,1]},className:"flex overflow-y-auto absolute inset-0 flex-col w-full h-[calc(100svh-78px)] bg-white border-t border-black",children:e.jsxs("div",{children:[e.jsxs("div",{className:"grid grid-cols-2",children:[e.jsx("a",{href:t[0].menu[0].url,className:"flex justify-center items-center text-center uppercase border-r border-b border-black h-header-mobile",children:t[0].menu[0].title}),e.jsx("a",{href:t[1].menu[0].url,className:"flex justify-center items-center text-center uppercase border-b border-black h-header-mobile",children:t[1].menu[0].title})]}),j.map((x,F)=>e.jsx(C,{className:"border-b border-black",heading:x.collection.title,items:x.collection.products,url:x.collection.url,label:`Shop All ${x.collection.title}`},F)),e.jsx("a",{href:t[0].menu[1].url,className:"flex justify-center items-center text-center uppercase border-b border-black h-header-mobile",children:t[0].menu[1].title}),e.jsx("a",{href:t[0].menu[2].url,className:"flex justify-center items-center text-center uppercase border-b border-black h-header-mobile",children:t[0].menu[2].title}),e.jsx("a",{href:t[0].menu[3].url,className:"flex justify-center items-center text-center uppercase border-b border-black h-header-mobile",children:t[0].menu[3].title}),e.jsx("a",{href:t[1].menu[1].url,className:"flex justify-center items-center text-center uppercase border-b border-black h-header-mobile",children:t[1].menu[1].title}),e.jsx("a",{href:t[1].menu[2].url,className:"flex justify-center items-center text-center uppercase border-b border-black h-header-mobile",children:t[1].menu[2].title}),e.jsx("a",{href:t[1].menu[3].url,className:"flex justify-center items-center text-center uppercase border-b border-black h-header-mobile",children:t[1].menu[3].title}),t[0].featured_link_url&&e.jsxs("a",{href:t[0].featured_link_url,className:"flex transition-all duration-300 lg:hover:bg-[#FFFFFF] flex-col col-span-6 justify-center items-center text-center uppercase h-header-mobile",children:[e.jsx("span",{className:"text-sm uppercase font-alt",children:t[0].featured_link_label}),e.jsx("span",{className:"text-base uppercase font-subheadings",children:t[0].featured_link_title})]}),t[1].featured_link_url&&e.jsxs("a",{href:t[1].featured_link_url,className:"flex transition-all duration-300 lg:hover:bg-[#FFFFFF] flex-col col-span-6 justify-center items-center text-center uppercase border-y border-black h-header-mobile",children:[e.jsx("span",{className:"text-sm uppercase font-alt",children:t[1].featured_link_label}),e.jsx("span",{className:"text-base uppercase font-subheadings",children:t[1].featured_link_title})]}),e.jsx("a",{href:l,className:"flex justify-center items-center text-center uppercase bg-pink h-header-mobile",children:n})]})})})]})}function w({blocks:r}){const[n,l]=b.useState(null);return!r||r.length===0?null:e.jsx(e.Fragment,{children:r.map((t,a)=>e.jsx(_,{block:t,index:a,hoveredProduct:n,setHoveredProduct:l},t.id))})}function _({block:r,index:n,hoveredProduct:l,setHoveredProduct:t}){return e.jsxs("div",{className:`${n===0?"border-r border-black":""} grid grid-cols-6 grid-rows-[auto_1fr_auto] auto-rows-min`,children:[e.jsx("a",{href:r.menu[0].url,className:"flex col-span-6 transition-all duration-300 hover:bg-[#FFFFFF] justify-center items-center text-xs uppercase lg:text-base h-header max-h-header",children:r.menu[0].title}),e.jsxs("div",{className:"grid grid-cols-6 col-span-6 min-h-0",children:[e.jsx(p,{data:r?.items[0],className:"border-r border-black",hoveredProduct:l,setHoveredProduct:t}),e.jsx(p,{data:r?.items[1],hoveredProduct:l,setHoveredProduct:t})]}),e.jsx("a",{href:r.menu[1].url,className:"flex transition-all duration-300 hover:bg-[#FFFFFF] col-span-2 justify-center items-center text-xs text-center uppercase border-r border-black lg:text-base h-header",children:r.menu[1].title}),e.jsx("a",{href:r.menu[2].url,className:"flex transition-all duration-300 hover:bg-[#FFFFFF] col-span-2 justify-center items-center text-xs text-center uppercase border-r border-black lg:text-base h-header",children:r.menu[2].title}),e.jsx("a",{href:r.menu[3].url,className:"flex transition-all duration-300 hover:bg-[#FFFFFF] col-span-2 justify-center items-center text-xs text-center uppercase lg:text-base h-header",children:r.menu[3].title}),r.featured_link_url&&e.jsxs("a",{href:r.featured_link_url,className:"flex transition-all duration-300 hover:bg-[#FFFFFF] flex-col col-span-6 justify-center items-center text-center uppercase border-t border-black h-header",children:[e.jsx("span",{className:"text-base uppercase font-alt",children:r.featured_link_label}),e.jsx("span",{className:"text-lg uppercase font-subheadings",children:r.featured_link_title})]})]})}function p({data:r,className:n,hoveredProduct:l,setHoveredProduct:t}){if(!r)return null;const a=r.hasOwnProperty("product"),s=r.hasOwnProperty("collection");return a?e.jsx(k,{data:r,className:n,hoveredProduct:l}):s?e.jsx(M,{data:r,className:n,setHoveredProduct:t}):null}function k({data:r,className:n,hoveredProduct:l}){var a,s,i;const t=l||r?.product;return e.jsxs("a",{href:t?.url,className:`flex overflow-hidden transition-all duration-300 hover:bg-[#FFFFFF] flex-col col-span-3 justify-between p-5 h-full min-h-0 border-black border-y ${n}`,children:[e.jsx("h4",{className:"text-xs text-center uppercase lg:text-base font-alt shrink-0",children:"Featured Product"}),e.jsx("div",{className:"flex flex-1 justify-center items-center min-h-0",children:e.jsx("img",{src:(a=t?.image)==null?void 0:a.url,alt:(s=t?.image)==null?void 0:s.alt,className:"object-contain w-2/3 max-h-full"})}),e.jsxs("div",{className:"flex flex-col gap-2 items-center shrink-0",children:[e.jsx("p",{className:"overflow-hidden w-full text-xs text-center uppercase whitespace-nowrap lg:text-sm font-body text-ellipsis",children:(i=t?.collection)==null?void 0:i.title}),e.jsx("div",{className:"flex overflow-hidden justify-center items-center w-full h-[3rem] 2xl:h-[4rem]",children:e.jsx("p",{style:{lineHeight:"1"},className:"text-xs text-center uppercase line-clamp-3 2xl:text-lg font-subheadings",children:t?.title})}),e.jsx("p",{className:"text-xs text-center uppercase whitespace-nowrap lg:text-base font-alt",children:t?.price})]})]})}function M({data:r,className:n,setHoveredProduct:l}){var t,a,s,i;return e.jsxs("div",{className:`flex overflow-hidden relative flex-col col-span-3 justify-between items-start p-5 space-y-5 h-full min-h-0 border-black border-y ${n}`,children:[e.jsx("h4",{className:"text-xs text-left uppercase 2xl:text-base font-alt",children:(t=r?.collection)==null?void 0:t.t
1itle}),e.jsx("div",{className:"flex flex-col flex-1 gap-2 min-h-0",children:(a=r?.collection)==null?void 0:a.products.slice(0,6).map((c,o)=>e.jsx("a",{href:c?.url,style:{lineHeight:"1"},className:"transition-colors xl:text-xs text-xxs 3xl:text-base xxl:text-sm font-subheadings hover:text-pink",onMouseEnter:()=>l?.(c),onMouseLeave:()=>l?.(null),children:c?.title},o))}),e.jsx("div",{className:"absolute right-0 bottom-0 left-0 px-5 py-3 bg-white",children:e.jsxs("a",{href:(s=r?.collection)==null?void 0:s.url,className:"w-full text-xs text-center normal-case xl:text-base font-body",children:["Shop All ",(i=r?.collection)==null?void 0:i.title]})})]})}function C({heading:r,items:n,url:l,label:t,className:a}){return e.jsxs("div",{className:`flex flex-col gap-2 justify-start items-start p-4 text-left uppercase ${a}`,children:[e.jsx("h4",{className:"text-xs text-left uppercase lg:text-base font-alt",children:r}),e.jsx("div",{className:"flex flex-col font-subheadings",children:n.map((s,i)=>e.jsx("a",{href:s?.url,className:"flex col-span-1 justify-start items-start text-left uppercase",children:s?.title},i))}),e.jsx("a",{href:l,className:"flex justify-start items-start text-sm text-left normal-case font-body",children:t})]})}export{O as M};
2//# sourceMappingURL=/cdn/shop/t/14/assets/MenuNavAdvancedItem-KBosfO8T.js.map?v=132049264125964006201785994606

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.