PageSourceSearch

https://crp-web-be.onrender.com/_next/static/chunks/app/(frontend)/layout-f1b90069838778bd.js

js crp-web-be.onrender.com collected 2026-10-03 11:39:53 UTC 11,483 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9559],{20307:(e,t,l)=>{"use strict";l.d(t,{ThemeProvider:()=>d});var n=l(71770),a=l(75602),i=l(45906);let r="payload-theme",s=()=>{let e=window.matchMedia("(prefers-color-scheme: dark)");return"boolean"==typeof e.matches?e.matches?"dark":"light":null},o=(0,a.createContext)({setTheme:()=>null,theme:void 0}),d=e=>{let{children:t}=e,[l,d]=(0,a.useState)(i.A?document.documentElement.getAttribute("data-theme"):void 0),c=(0,a.useCallback)(e=>{if(null===e){window.localStorage.removeItem(r);let e=s();document.documentElement.setAttribute("data-theme",e||""),e&&d(e)}else d(e),window.localStorage.setItem(r,e),document.documentElement.setAttribute("data-theme",e)},[]);return(0,a.useEffect)(()=>{let e="light",t=window.localStorage.getItem(r);if(function(e){return!!e&&["dark","light"].includes(e)}(t))e=t;else{let t=s();t&&(e=t)}document.documentElement.setAttribute("data-theme",e),d(e)},[]),(0,n.jsx)(o,{value:{setTheme:c,theme:l},children:t})}},22134:(e,t,l)=>{"use strict";l.d(t,{default:()=>r});var n=l(71770),a=l(75602),i=l(85286);let r=()=>{let[e,t]=(0,a.useState)(!1),l=()=>{window.scrollY>200?t(!0):t(!1)};return(0,a.useEffect)(()=>(window.addEventListener("scroll",l),()=>window.removeEventListener("scroll",l)),[]),(0,n.jsx)(n.Fragment,{children:e&&(0,n.jsx)("button",{id:"backToTop",onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},className:"fixed bottom-6 right-6 z-50 p-3 rounded-full bg-[#244df0]  text-white shadow-lg hover:bg-[#3a7db8] transition animate-float","aria-label":"Back to top",children:(0,n.jsx)(i.A,{size:24})})})}},36637:(e,t,l)=>{"use strict";l.d(t,{HeaderClient:()=>f});var n=l(71770),a=l(39092),i=l(15914),r=l.n(i),s=l(78495),o=l(75602),d=l(29933),c=l(21918);let u=e=>{let{loading:t,priority:l,className:a}=e;return(0,n.jsx)(c.default,{id:"header-logo",alt:"Cal-Royal Logo",width:364,height:64,loading:t||"lazy",fetchPriority:l||"low",quality:90,decoding:"async",className:(0,d.A)("w-full h-full",a),src:"/api/media/file/crp-prof-logo-1.png"})};var h=l(67277),m=l(91943),x=l(11518),p=l(74671),v=l(25071);let b=e=>{let{data:t}=e,l=(null==t?void 0:t.navItems)||[],a=(0,s.useRouter)(),[i,d]=(0,o.useState)(!1),[u,b]=(0,o.useState)(""),[g,f]=(0,o.useState)({}),w=e=>{let t=e.trim();return t?"/search?q=".concat(encodeURIComponent(t)):"/search"};return(0,n.jsxs)("nav",{id:"headerNav",role:"navigation",className:"bg-[#20368c] text-white shadow poppins-medium flex gap-3 items-center w-full transition-all duration-300",children:[(0,n.jsx)("div",{id:"header-burger",className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:(0,n.jsx)("div",{className:"flex items-center justify-between h-[48px]",children:(0,n.jsxs)("div",{className:"flex items-center justify-between w-full lg:w-auto",children:[(0,n.jsx)("div",{className:"lg:hidden",children:(0,n.jsx)("button",{id:"mobileMenu","aria-label":"Mobile Menu",onClick:()=>d(!i),className:"text-white focus:outline-none",children:i?(0,n.jsx)(m.A,{size:24}):(0,n.jsx)(x.A,{size:24})})}),(0,n.jsx)("div",{className:"hidden lg:flex flex-1 justify-center space-x-8",children:l.map(e=>{var t,l,i,r;return e.isDropdown?(0,n.jsxs)("div",{className:"relative group/menu",children:[(0,n.jsxs)("button",{className:"inline-flex items-center gap-1 text-md px-1 transition-colors duration-200 hover:bg-gray-400  xl:hover:bg-transparent xl:hover:text-gray-300",onClick:()=>{var t;let l=null==(t=e.link.reference)?void 0:t.value,n="";l&&"object"==typeof l&&"slug"in l&&(n=l.slug),a.push("/".concat(n.replace(/^\/+/,"")))},children:[(0,n.jsx)("span",{children:e.link.label}),(0,n.jsx)(p.A,{size:18,strokeWidth:2,className:"hidden xl:block transition-transform duration-200 xl:group-hover/menu:rotate-180"})]}),(null==(l=e.dropdownItems)||null==(t=l[0])?void 0:t.image)?(0,n.jsx)("div",{className:"absolute mt-[12px] left-1/2 top-1/2 -translate-x-[26.2rem] min-w-[1028px] min-h-[350px] hidden xl:group-hover/menu:grid bg-white ease-in duration-300 grid-cols-5 grid-rows-2 gap-6 shadow-2xl p-6 z-[70] transition-all border-[1px] border-gray-400 tiktok-sans-500 pointer-events-none xl:pointer-events-auto",onMouseEnter:e=>{window.innerWidth>=1280&&e.currentTarget.classList.add("grid")},onMouseLeave:e=>{window.innerWidth>=1280&&e.currentTarget.classList.remove("grid")},children:null==(i=e.dropdownItems)?void 0:i.map((e,t)=>(0,n.jsxs)("a",{href:e.href||"#",className:"overflow-hidden shadow-md transform transition duration-200 hover:scale-105 border-solid border-[1px] border-gray-500 flex flex-col bg-white",children:[(0,n.jsx)(c.default,{src:function(e){return"object"==typeof e&&null!==e&&"url"in e?e.url:void 0}(e.image||void 0)||"",alt:e.label||"",width:174,height:192,quality:90,className:"w-full h-48 object-cover"}),(0,n.jsx)("div",{className:"px-1 py-1 text-center border-t border-gray-200",children:(0,n.jsx)("span",{className:"text-base poppins-semibold text-gray-900",children:e.label})})]},t))}):(0,n.jsx)("ul",{className:"absolute left-[-4px] mt-0 w-48 bg-white text-[#20368c] shadow-lg p-2 space-y-1 opacity-0 invisible pointer-events-none xl:group-hover/menu:opacity-100 xl:group-hover/menu:visible xl:group-hover/menu:pointer-events-auto transition-all duration-300 min-w-[318px] poppins-medium xl:group-hover/menu:z-50 ease-in border-[1px] border-gray-400",children:null==(r=e.dropdownItems)?void 0:r.map((e,t)=>(0,n.jsxs)("li",{className:"relative group/sub",children:[(0,n.jsxs)("a",{href:e.href||"#",className:"overflow-hidden inline-flex items-center justify-between w-full px-3 py-2 hover:bg-gray-300 transition text-[#20368c]",children:[(0,n.jsx)("span",{children:e.label}),e.navItems&&e.navItems.length>0&&(0,n.jsx)(v.A,{size:16,strokeWidth:2,className:"transition-transform duration-200"})]}),e.navItems&&e.navItems.length>0&&(0,n.jsx)("ul",{className:"absolute left-[298px] top-[-8px] w-48 bg-white shadow-lg p-2 space-y-1 opacity-0 invisible pointer-events-none xl:group-hover/sub:opacity-100 xl:group-hover/sub:visible xl:group-hover/sub:pointer-events-auto transition-all duration-200 poppins-medium min-w-[318px] z-50 border-[1px] border-gray-400",children:e.navItems.map((e,t)=>(0,n.jsx)("li",{children:(0,n.jsx)("a",{href:e.href||"#",className:"overflow-hidden block px-3 py-2 hover:bg-gray-300 transition text-[#20368c]",children:e.label})},t))})]},t))})]},e.link.label):(0,n.jsx)("div",{className:"relative group/menu",children:(0,n.jsx)("button",{className:"inline-flex items-center gap-1 text-md transition-colors duration-200",onClick:()=>{var t;let l=null==(t=e.link.reference)?void 0:t.value,n="";l&&"object"==typeof l&&"slug"in l&&(n=l.slug),a.push("/".concat(n.replace(/^\/+/,"")))},children:(0,n.jsx)("span",{className:"hover:bg-gray-400 px-1 duration-200 ease-in",children:e.link.label})})},e.link.label)})})]})})}),(0,n.jsxs)("div",{className:"absolute right-0 px-4 w-full max-w-xs",children:[(0,n.jsx)("input",{id:"searchField",value:u,onChange:e=>b(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),d(!1),a.push(w(u)))},type:"text",placeholder:"Search...",className:"w-full pr-10 px-3 py-2 rounded-md text-black placeholder-gray-500 focus:outline-none"}),(0,n.jsxs)(r(),{id:"searchLink",href:w(u),className:"absolute inset-y-0 px-2 right-6 flex items-center",onClick:()=>d(!1),children:[(0,n.jsx)("span",{className:"sr-only",children:"Search"}),(0,n.jsx)(h.A,{size:24,strokeWidth:2,id:"searchIcon",className:"w-5 text-gray-700 hover:text-black"})]})]}),i&&(0,n.jsx)("div",{className:"lg:hidden bg-[#20368c] px-4 pb-4 space-y-4 max-h-[calc(100vh-80px)] overflow-y-auto overscroll-contain",children:l.map(e=>{var t;return e.isDropdown?(0,n.jsxs)("div",{children:[(0,n.jsxs)("button",{id:"nav-item",onClick:()=>{(e=>{f(t=>({...t,[e]:!t[e]}))})(e.link.label)},className:"text-xl w-full text-left flex items-center justify-between py-2",children:[(0,n.jsx)("span",{children:e.link.label}),(0,n.jsx)(p.A,{size:24,className:"transition-transform ".concat(g[e.link.label]?"rotate-180":"")})]}),g[e.link.label]&&(0,n.jsx)("ul",{id:"nav-list",className:"pl-4 space-y-2",children:null==(t=e.dropdownItems)?void 0:t.map((e,t)=>(0,n.jsx)("li",{id:"nav-sub-item",children:(0,n.jsx)(r(),{href:e.href||"",onClick:()=>d(!i),className:"text-lg block hover:text-gray-200 transition",children:e.label})},t))})]},e.link.label):(0,n.jsx)("div",{onClick:()=>{var t;let l=null==(t=e.link.reference)?void 0:t.value,n="";l&&"object"==typeof l&&"slug"in l&&(n=l.slug),d(!i),a.push("/".concat(n.replace(/^\/+/,"")))},className:"text-xl block py-2 text-md hover:text-gray-200 transition cursor-pointer",children:e.link.label},e.link.label)})})]})};var g=l(42886);let f=e=>{let{data:t}=e,[l,i]=(0,o.useState)(null),{headerTheme:d,setHeaderTheme:c}=(0,a.Y)(),h=(0,s.usePathname)(),[m,x]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{c(null)},[h]),(0,o.useEffect)(()=>{d&&d!==l&&i(d)},[d]),(0,o.useEffect)(()=>{let e=()=>{x(window.scrollY>20)};return window.addEventListener("scroll",e),()=>window.removeEventListener("scroll",e)},[]),(0,n.jsxs)("header",{role:"banner",className:"relative",...l?{"data-theme":l}:{},children:[(0,n.jsx)("div",{className:"pt-6 px-10 z-[60] justify-between fixed top-0 left-0 bg-white transition-all duration-300 origin-left\n        ".concat(m?"scale-[0.55]":"scale-100"," ").concat(m?"top-[-20px]":"top-0"),children:(0,n.jsx)(r(),{href:"/",children:(0,n.jsx)(u,{loading:"eager",priority:"high"})})}),(0,n.jsx)("div",{className:"fixed transition-all duration-300 origin-left z-[60] text-md\n        ".concat(m?"top-0":"top-6"," ").concat(m?"right-0":"right-12"),children:(0,n.jsxs)("a",{id:"onlineStoreLink","aria-label":"Online Store Link",href:"https://calroyalstore.com/signin.asp?autopage=%2FDefault%2Easp",target:"_blank",onClick:()=>{var e,t;null==(e=(t=window).gtag)||e.call(t,"event","online_store_click",{event_category:"engagement",event_label:"header_online_store"})},className:" inline-flex items-center gap-2 ml-auto \n            h-[48px] px-4 bg-[#2644bf] text-white poppins-semibold shadow-lg hover:bg-[#4fc3f7] \n            transition",children:[(0,n.jsx)(g.A,{size:20,strokeWidth:2}),(0,n.jsx)("span",{className:"hidden lg:inline",children:"ONLINE STORE"})]})}),(0,n.jsx)("div",{className:"fixed left-0 w-full z-50 bg-white shadow-xl transition-all duration-300 h-[142px] content-end ".concat(m?"top-[-46px]":"top-[0px]"),children:(0,n.jsx)(b,{data:t})})]})}},39092:(e,t,l)=>{"use strict";l.d(t,{HeaderThemeProvider:()=>s,Y:()=>o});var n=l(71770),a=l(75602),i=l(45906);let r=(0,a.createContext)({headerTheme:void 0,setHeaderTheme:()=>null}),s=e=>{let{children:t}=e,[l,s]=(0,a.useState)(i.A?document.documentElement.getAttribute("data-theme"):void 0),o=(0,a.useCallback)(e=>{s(e)},[]);return(0,n.jsx)(r,{value:{headerTheme:l,setHeaderTheme:o},children:t})},o=()=>(0,a.use)(r)},45906:(e,t,l)=>{"use strict";l.d(t,{A:()=>n});let n=!!window.document&&!!window.document.createElement},86747:()=>{},93705:(e,t,l)=>{Promise.resolve().then(l.t.bind(l,15914,23)),Promise.resolve().then(l.t.bind(l,40503,23)),Promise.resolve().then(l.t.bind(l,24875,23)),Promise.resolve().then(l.t.bind(l,70506,23)),Promise.resolve().then(l.t.bind(l,42282,23)),Promise.resolve().then(l.t.bind(l,61312,23)),Promise.resolve().then(l.t.bind(l,86747,23)),Promise.resolve().then(l.bind(l,22134)),Promise.resolve().then(l.bind(l,36637)),Promise.resolve().then(l.bind(l,39092)),Promise.resolve().then(l.bind(l,20307))}},e=>{e.O(0,[1715,6877,1416,5914,4268,8591,6650,5768,7358],()=>e(e.s=93705)),_N_E=e.O()}]);

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.