PageSourceSearch

https://www.mcalistersdeli.com/_next/static/chunks/1726.7784f6681759b6ae.js

js mcalistersdeli.com collected 2026-10-01 13:06:24 UTC 5,746 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1726],{1726:function(e,l,o){o.r(l),o.d(l,{CategoryNav:function(){return p}});var n=o(27573),t=o(7653),a=o(44713),i=o.n(a),c=o(51699),r=o(4148),d=o(88146),s=o(10607),u=o(48959),v=o(70689),m=o(79984),g=o(86686),f=o(79386),h=o(77584),w=o(78152),y=o(83125);let N=e=>{let{href:l,active:o,children:t,onClick:a,testid:i,ariaLabel:c,role:r,translation:u,tabIndex:v=0,shallow:m=!1,isScrollable:g,isNewCatering:f,cateringUrl:h}=e,w=()=>{h&&(window.location.href=h)};return(0,n.jsx)(d.default,{scroll:g,href:l,className:(0,s.Z)("menuName menuCat lg:!inline-block lg:leading-loose",{selected:o}),onClick:e=>{f&&(e.preventDefault(),w()),null==a||a()},"data-testid":i,"aria-label":c,role:u,shallow:m,id:i,tabIndex:v,onKeyDown:e=>{f&&(e.preventDefault(),w()),"Enter"===e.key&&(null==a||a())},children:t})},p=e=>{let{catName:l}=e,{t:o}=(0,c.$G)(),a=(0,g.TL)(),{getCustomizedCategories:d}=(0,w.p)(),{analytics:p}=(0,h.useAnalytics)(),C=(0,g.CG)(e=>e.menu.menu),{selectedStore:b}=(0,g.CG)(e=>e.storeSearch),E=(0,g.CG)(e=>e.menu.activeSubCategoryName),I=(0,g.CG)(e=>e.menu.activeCategoryId),{cartData:x}=(0,g.CG)(e=>e.cart),{isSubscription:j,isCategoryPage:k=!1,isIsrMenu:_=!0}=(0,r.Vb)(),[S,L]=(0,t.useState)(I),[T,A]=(0,t.useState)(I),G=["scroll"],[R,K]=(0,t.useState)(),P=(0,t.useRef)(null),O=(k||_)&&l;(0,t.useEffect)(()=>{var e;let l=document.getElementById("link_#".concat(S));if(null==l||l.click(),(null==C?void 0:C.categories)&&(null==C?void 0:null===(e=C.categories)||void 0===e?void 0:e.length)>0)return G.forEach(e=>window.addEventListener(e,Z)),()=>{G.forEach(e=>window.removeEventListener(e,Z))}},[null==C?void 0:C.categories]);let Z=(0,t.useCallback)(i()(()=>{let e=document.querySelectorAll("section"),l=window.scrollY,o=I;e.forEach(e=>{let n=e.id,t=y.W_j||y.aeN||y.mJY?e.offsetTop+y.Gfd:e.offsetTop,i=e.offsetHeight;l>=t&&l<t+i&&(L(o=(0,f.N0w)(n)),k||_||window.history.replaceState(null,"","#".concat(o)),a((0,v.jA)({activeCategoryId:o})))}),o&&B(o)},300),[I]),B=e=>{if(e&&(null==P?void 0:P.current)){var l;let o=null===(l=P.current)||void 0===l?void 0:l.firstElementChild;if(o){let l=Array.from(o.children).find(l=>{let o=(0,f.N0w)(l.innerText);return null==o?void 0:o.includes(e.toLocaleLowerCase())});l&&P.current.scrollBy({top:l.offsetTop,left:0,behavior:"instant"})}a((0,m.Kw)({isCategorySelected:!0,selectedCategoryName:(null==C?void 0:C.categories)&&(0,f.QZE)(null==C?void 0:C.categories,e)}))}};(0,t.useEffect)(()=>{(async()=>{K(await d())})()},[null==C?void 0:C.categories]),(0,t.useEffect)(()=>{(null==T?void 0:T.includes(E))&&(null==S?void 0:S.includes(I))||A("")},[E,I]),(0,t.useEffect)(()=>{if(O&&Z(),O||window.location.hash){var e;let o=window.location.hash.split("#")[1],n=null==o?void 0:null===(e=o.split("?"))||void 0===e?void 0:e[0],t=O?l:n,i=new MutationObserver((e,l)=>{var o;let i=null===(o=document)||void 0===o?void 0:o.getElementById(n);i&&(l.disconnect(),a((0,v.jA)({activeCategoryId:t})),a((0,u.H7)()),i.scrollIntoView({behavior:"smooth"}))});return i.observe(document.body,{childList:!0,subtree:!0}),()=>{i.disconnect()}}},[O]);let D=(e,l,o,n)=>{var t,a,i,c;let r="".concat(_?"/":"#").concat(l);if(k||_){if(y.gsH&&n===y.RyO&&o){let e=null==C?void 0:null===(i=C.products)||void 0===i?void 0:i[o],l=null==e?void 0:null===(c=e.product)||void 0===c?void 0:c.seoUrl;r=b&&l?(0,f.$1_)(b.locationName,b.ngdpId,l):""}else r="/menu/".concat((null==b?void 0:b.locationName)&&_?"".concat((0,f.K43)(null==b?void 0:b.locationName,null==b?void 0:b.ngdpId),"/"):"").concat(l)}let d=(0,f.I8_)(null==e?void 0:null===(a=e.subCategory)||void 0===a?void 0:null===(t=a[0])||void 0===t?void 0:t.name,"-");return d?"".concat(r,"#").concat(d):r};return(0,n.jsx)("div",{className:"categoryCont",ref:P,children:(0,n.jsx)("nav",{className:"subcategoryList flex lg:flex-col",children:null==R?void 0:R.map(e=>{var l;let t=(0,f.N0w)(null==e?void 0:e.categoryName);return(null==e?void 0:e.subscriptionProduct)&&!j?null:(0,n.jsxs)("li",{className:"categoriesList list-none ".concat(t),role:y.IPt.PRESENTATION,children:[(0,n.jsx)(N,{href:D(e,t,null==e?void 0:e.productId,null==e?void 0:e.templateId),shallow:k||_,active:I===t,translation:o("guestRecentError.role.text"),onClick:()=>{p("category_data",null==e?void 0:e.categoryId,(0,f.vjZ)(x))},testid:"link_#".concat(t),ariaLabel:"".concat(e.categoryName," category"),tabIndex:0,isScrollable:!_,isNewCatering:(null==b?void 0:b.isNewCatering)&&(null==e?void 0:e.isCatering),cateringUrl:null==b?void 0:b.cateringUrl,children:(0,n.jsx)("span",{className:"categoryName",children:e.categoryName})}),(0,n.jsx)("ul",{className:(0,s.Z)("subcategoryListitems lg:pr-2",{active:I===t}),children:null==e?void 0:null===(l=e.subCategory)||void 0===l?void 0:l.map(l=>{var o,a,i;let c=(0,f.I8_)(l.name,"-"),r=y.lwK?null==l?void 0:l.name:null==l?void 0:null===(o=l.name)||void 0===o?void 0:o.replace(RegExp((0,f.fmv)(t),"g"),""),d=null===(i=window.location.hash)||void 0===i?void 0:null===(a=i.split("#"))||void 0===a?void 0:a[1],s=(null==r?void 0:r.includes(_&&d?null==d?void 0:d.replaceAll("-"," "):E))&&I===t,u="/menu/".concat((null==b?void 0:b.locationName)&&_?"".concat((0,f.K43)(null==b?void 0:b.locationName,null==b?void 0:b.ngdpId),"/"):"").concat(t,"#").concat(c);return(0,n.jsx)("li",{role:y.IPt.PRESENTATION,children:(0,n.jsx)(N,{href:k||_?u:"#".concat(c),active:s,onClick:()=>{var o;p("sub_category_view",null===(o=l.name)||void 0===o?void 0:o.replace(RegExp(e.categoryName,"g"),""))},shallow:k||_,testid:"link_#".concat(c),ariaLabel:"".concat(l.name),translation:"menuitem",tabIndex:0,isScrollable:!0,children:(0,n.jsx)("span",{children:y.lwK?l.name:(0,f.zYs)(null==e?void 0:e.categoryName,l.name)})})},l.id)})})]},e.categoryId)})})})}}}]);

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.